/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./src/comlib.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./src/bas/base.js":
/*!*************************!*\
  !*** ./src/bas/base.js ***!
  \*************************/
/*! exports provided: Base, DataTypes, SysConst, EnumEvent, EnumOperation, EnumRowStatus, EnumRoomEvent, EnumDatasetOperation, EnumDatasetEvent, EnumPages, EnumURLParam, EnumEntityStatus, EnumEditStatus, EnumRightCode, DeviceType, EnumJSFS */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Base\", function() { return fBase; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DataTypes\", function() { return fDataTypes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SysConst\", function() { return SysConst; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumEvent\", function() { return EnumEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumOperation\", function() { return EnumOperation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumRowStatus\", function() { return EnumRowStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumRoomEvent\", function() { return EnumRoomEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumDatasetOperation\", function() { return EnumDatasetOperation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumDatasetEvent\", function() { return EnumDatasetEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumPages\", function() { return EnumPages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumURLParam\", function() { return EnumURLParam; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumEntityStatus\", function() { return EnumEntityStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumEditStatus\", function() { return EnumEditStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumRightCode\", function() { return EnumRightCode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DeviceType\", function() { return DeviceType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"EnumJSFS\", function() { return EnumJSFS; });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"./src/bas/utils.js\");\n/* harmony import */ var _taskevent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./taskevent */ \"./src/bas/taskevent.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n/**\r\n * @readonly\r\n * @enum {String}\r\n * 前台常量\r\n */\n\nvar DeviceType = {\n  PRINTER: \"PRINTER\",\n  RFID: \"RFID\"\n};\nvar EnumJSFS = {\n  ZFB: \"1\",\n  //支付宝\n  WX: \"2\",\n  //微信支付\n  XX: \"3\" // 线下汇款\n\n};\nvar SysConst = {\n  //系统范围内常量的定义\n  MAX_ECODE: 30,\n  //ecode 字段的最大长度\n  MAX_ENAME: 255,\n  //ename字段的最大长度\n  MENU_DURATION: 100,\n  ROOM_MENU_WIDTH_EXPAND: 120,\n  ROOM_MENU_WIDTH: 0,\n  ADMIN: 'admin',\n\n  /** 组件属性定义*/\n  COMPATT_ID: \"id\",\n  //组件id属性的名称\n  COMPATT_TYPE: \"type\",\n  //组件类型属性的名称\n  COMPATT_OP: \"op\",\n  COMPATT_REF: 'ref',\n\n  /**角色，组件中用来标注组件的功能*/\n  COMPROLE_COMMAND: \"command\",\n\n  /**视图*/\n  VIEW_DEFAULT_WEB: \"ENTERPRISE.VIEWWEB:DEFAULT\",\n  //默认的视图路径\n  VIEW_DEFAULT: \"ENTERPRISE.VIEW:DEFAULT\",\n  //默认的视图路径\n  VIEW_ADMIN: \"ENTERPRISE.VIEW:ADMIN\",\n  //默认的视图路径\n  ENTERPRISE_DEFAULT: \"ENTERPRISE.DEFAULT\",\n  //企业默认属性定义\n\n  /*主题域的所需要的容器类型容器类型*/\n  CONTAINER_ZVIEW: \"CONTAINER_ZVIEW\",\n  ///ZVIEW类型容器\n  CONTAINER_TAB: \"CONTAINER_TAB\",\n  //tab类型容器\n  CONTAINER_DEFAULT: \"container_default\",\n  //默认窗口容器\n  CONTAINER_POP: \"container_pop\",\n  //弹出窗口\n\n  /**特殊颜色*/\n  COLOR_READONLY: '#F9F9F9',\n  COLOR_REQUIRED: '#F5FFF5',\n  //数据集格式相关常量\n  SizeRatioV: 1.35,\n  //模型布局实际布局的转换比例\n  SizeReduceY: 20,\n  //top 缩减的距离\n  //后台相关\n  HY_SYSTEM_TYPE_GATE: 3,\n  HY_ROOM_DIR: 1,\n  HY_ROOM_MNGR: \"MNGR\",\n  //管理room的代码\n  HY_ROOM_GATE: \"GATE\",\n  //所有house的，gate 的room的代码\n  HY_SERVICE_HOUSEINFO: \"SYSTEM.HOUSEMNGR\",\n  //目录检索路径\n  HY_SERVICE_RIGHT_LOGIN: \"SYSTEM.RIGHT_LOGIN\",\n  //登录服务的路径\n  HY_SERVICE_SYSTEM_ROOMRIGHT: \"SYSTEM.RIGHT\",\n  //每个room的权限管理，首先在目录登录，然后再从每个room获得权限\n  HY_SERVICE_SYSTEM_ROOMPARAM: \"SYSTEM.ROOMPARAM\",\n  //参数设置服务\n  HY_SERVICE_SYSTEM_TIME: \"SYSTEM.TIME\",\n  //获得当前系统时间\n  HY_SERVICE_SYSTEM_METAMNGR: \"SYSTEM.METAMNGR\",\n  //元数据的管理对象\n  HY_SERVICE_CENTER_HOUSEMNGR: \"SYSTEM.CENTER_HOUSEMNGR\",\n  //注册服务\n  HY_SERVICE_CENTER_DEPLOYMENTMNGR: \"SYSTEM.CENTER_DEPLOYMENTMNGR\",\n  //中心服务器的部署管\n  HY_SERVICE_ENTERPRISE_RIGHT: \"ENTERPRISE.RIGHT\",\n  //企业中的权限主题\n  HY_SERVICE_ENTERPRISE_SYSSETTING: \"ENTERPRISE.SYSSETTING\",\n  //企业中的权限主题\n  HY_SERVICE_YHGL_USERMNGR: \"YHGL.USERMNGR\",\n  //用户管理\n  // HY_SERVICE_SYSTEM_DEVICE:\"SYSTEM.DEVICE\", //用户管理\n  SERVICE_SYSROLE_ROLEMNGR: \"SYSROLE.ROLEMNGR\",\n  SERVICE_MNGR_PAY: \"SYSTEM.MNGR_PAY\",\n  //支付服务\n  HY_SERVICE_CENTER_MONITOR: \"SYSTEM.CENTER_MONITOR\",\n  //中心服务器的系统监视器\n  HY_SERVICE_WXUSER: \"SYSTEM.WXUSER:JSAPI\",\n  //微信用户管理\n  CLIENT_TYPE: \"WEB\",\n  CLIENT_ID: \"\",\n  PARAM_DEFAULTROOM: \"WEB_DEFAULTROOM\",\n  //默认的登录room\n  PARAM_USER_CARED_VIEWITEM: \"WEB_USER_CARED_VIEWITEM\",\n  ALIAS_USER: \"ALIAS_USER\",\n  // 浏览用户查询条件保存参数名称\n  FORMAT_USER: \"FORMAT_USER\" //浏览用户格式参数名称\n  // FORMAT_USERMB:\"FORMAT_USERMB\", //浏览用户格式参数名称 手机WEb端\n\n};\n/**\r\n * 通用事件常量\r\n * @readonly\r\n * @enum {String}\r\n*/\n\nvar EnumEvent = {\n  ON_LOGIN: \"OnLogin\",\n  ON_lOGOFF: \"OnLogoff\",\n  ON_RESIZE: \"OnResize\",\n  ON_STATUSCHANGE: \"OnStatusChange\",\n  //状态变化事件，用于主题，或者命令状态变化时触发\n  ON_TASKBEGIN: \"OnTasksBegin\",\n  //任务管理对象中的任务开始\n  ON_TASKEND: \"OnTasksEnd\",\n  //任务管理对象中的任务结束\n  ON_READY: \"OnReady\",\n  //主题域加载完毕事件\n  ON_DISPOSING: \"OnDisposing\",\n  //主题销毁事件\n  ON_CAPTIONCHANGE: \"ON_CAPTIONCHANGE\",\n  //容器合约中，的标题变化。\n  ON_ENTITYDATACHANGE: \"OnEntityDataChange\",\n  ON_CLICK: \"click\",\n  ON_CLOSE: \"onClose\",\n  ON_BACK: \"onBack\",\n  ON_ACTIVE: \"onActive\",\n  ON_COMMAND_BEGIN: \"ON_COMMAND_BEGIN\",\n  //主题域命令开始执行\n  ON_COMMAND_END: \"ON_COMMAND_END\" //主题域命令执行完毕\n\n};\nvar EnumEntityStatus = {\n  New: \"1\",\n  //\n  Submitted: \"2\",\n  //\n  Audit: \"7\",\n  //\n  Droped: \"0\" //\n\n};\n/**\r\n * 编辑状态枚举类型\r\n */\n\nvar EnumEditStatus = {\n  // edsDisable:-1, //子编辑处于不可编辑状态，一般是因为主编辑没有记录\n  edsNone: 0,\n  edsNew: 1,\n  edsModify: 2,\n  edsView: 3\n};\nvar EnumRightCode = {\n  rtGet: \"rtget\",\n  rtExport: 'rtexport',\n  // rtopen :'rtopen',\n  rtAdd: \"rtadd\",\n  rtSet: \"rtset\"\n};\n/**\r\n * 后台服务调用的Operation 枚举类型\r\n * @readonly\r\n * @enum {String}*\r\n */\n\nvar EnumOperation = {\n  opNone: \"non\",\n  opLogin: \"login\",\n  opLogOff: \"logoff\",\n  opEvent: \"evn\",\n  opExist: \"ext\",\n  //\n  opAdd: \"add\",\n  //增加\n  opDel: \"del\",\n  //删除\n  opSet: \"set\",\n  opGet: \"get\",\n  opInfo: \"inf\",\n  opAudit: \"audit\",\n  opUnAudit: \"unaudit\",\n  opLock: \"lock\",\n  opUnLock: \"unlock\",\n  opPause: \"pause\",\n  opStatus: \"status\",\n  opImage: \"img\",\n  opSynch: \"syn\",\n  opCommit: \"commit\",\n  opUnCommit: \"uncommit\",\n  opOpen: \"open\",\n  opClose: \"close\",\n  opRead: \"read\",\n  opUnRead: \"unread\",\n  opSend: \"sed\",\n  opReceive: \"rec\",\n  opGetRightDef: \"getrightdef\",\n  //获得主题域的权限定义\n  opPrint: \"print\",\n  opExport: \"export\",\n  opComment: \"comment\",\n  opCommentAdd: \"comadd\",\n  //评论添加\n  opCommentDel: \"comdel\",\n  //评论删除\n  opCommentGet: \"comget\",\n  //评论\n  opReFresh: \"refresh\",\n  opSettingGet: \"settingget\",\n  //主题域参数获得\n  opSettingSet: \"settingset\",\n  //主题域参数获得\n  opOperationStatus: \"operationstatus\",\n  ///用于查询是否允许操作执行\n  ///编辑主题域前台命令\n  edtNew: \"edtNew\",\n  edtOpen: \"edtOpen\",\n  edtTemplate: \"edtTemplate\",\n  edtDefaultValue: \"edtDefaultValue\",\n  edtCopy: \"edtCopy\",\n  edtPaste: \"edtPaste\",\n  edtModify: \"edtModify\",\n  edtSave: \"edtSave\",\n  GMTEdtNew: \"GMTEdtNew\",\n  GMTEdtOpen: \"GMTEdtOpen\",\n  opImportData: \"importdata\",\n  opExportData: \"exportdata\",\n  opPay: \"pay\",\n  //支付\n  opUnPay: \"unpay\",\n  //支付\n  opRestart: \"restart\",\n  opStop: \"stop\"\n};\n/**\r\n @readonly\r\n * @enum {String}\r\n * @type {{EXECOMMAND: string}}\r\n */\n\nvar EnumTaskType = {\n  EXECOMMAND: \"executeCommand\"\n};\n/**\r\n * 数据集记录更新类型\r\n * @type {{ROW_PROPSTATUS: string, ROW_PROPSTATUS_ORIGINAL_VALUE: string, ROW_PROPKEY: string, ROW_STATUSADD: string, ROW_STATUSDEL: string, ROW_STATUSSET: string, ROW_STATUSNONE: string}}\r\n */\n\nvar EnumRowStatus = {\n  ROW_PROPSTATUS: \"__OPERATION\",\n  ROW_PROPSTATUS_ORIGINAL_VALUE: \"__OPERATION__ORGINAL_VALUE\",\n  //用于更新保存原始的记录值,表明哪些字段需要更新。\n  ROW_PROPKEY: \"__$KEY\",\n  ROW_STATUSADD: \"add\",\n  ROW_STATUSDEL: \"del\",\n  ROW_STATUSSET: \"set\",\n  ROW_STATUSNONE: \"non\"\n};\n/**\r\n *  @readonly\r\n * @enum {String}\r\n * @type {{OnUserCaredViewItemChanged: string}}\r\n */\n\nvar EnumRoomEvent = {\n  OnUserCaredViewItemChanged: \"USER_CARED_VIEWITEM\" //用户收藏或者自自动项目发生变化，参数是event.data = EntityViewItem;\n\n}; //数据集格式Grid中添加删除记录\n\n/**\r\n *  @readonly\r\n * @enum {String}\r\n * @type {{MENU_ROW: string, MENU_EDIT: string, MENU_COPY: string, opInsert: string, opAdd: string, opDel: string, opCopy: string, opShowSelectionBox: string}}\r\n */\n\nvar EnumDatasetOperation = {\n  MENU_ROW: \"MENU_ROW\",\n  MENU_EDIT: \"MENU_EDIT\",\n  MENU_COPY: \"MENU_COPY\",\n  opInsert: \"insert\",\n  opAdd: \"add\",\n  opDel: \"del\",\n  opCopy: \"copy\",\n  //拷贝粘贴\n  opShowSelectionBox: \"showselectionBox\"\n};\n/***\r\n *  @readonly\r\n * @enum {String}\r\n * @type {{OnFieldChange: string, OnRemove: string, OnInsert: string, OnDataChange: string, onDataSourceLoadingChanged: string, OnRowChange: string, OnColChange: string, OnRowClick: string, OnRowRightClick: string, OnRowDoubleClick: string, OnKeyDown: string, OnKeyUp: string, OnSelectionChanged: string, OnPrepare: string, OnExecuteCommand: string}}\r\n */\n\nvar EnumDatasetEvent = {\n  OnFieldChange: \"OnChange\",\n  //数据集字段变化事件\n  OnRemove: \"OnRemove\",\n  //记录删除\n  OnInsert: \"OnInsert\",\n  //新纪录插入\n  OnDataChange: \"OnDataChange\",\n  //数据变化，重新查询或者清空，或者过滤,查询数据\n  onLoadingChanged: \"onLoadingChanged\",\n  //数据源的onDataSourceLoadingChanged 事件触发， function onDataSourceLoadingChanged(isLoadidng);\n  onDataLoaded: \"onDataLoaded\",\n  OnRowChange: \"OnRowChange\",\n  //数据源中当前记录变化\n  OnColChange: \"OnColChange\",\n  //数据源中当前记录变化\n  OnRowClick: \"OnRowClick\",\n  OnRowRightClick: \"OnRowRightClick\",\n  OnRowDoubleClick: \"OnRowDoubleClick\",\n  OnKeyDown: \"OnKeyDown\",\n  OnKeyUp: \"OnKeyUp\",\n  OnFocus: \"OnFocus\",\n  OnSelectionChanged: \"OnSelectionChanged\",\n  OnPrepare: \"OnPrepare\",\n  //数据集列准备显示的内容，adapter可以根据需要操作列，例如添加参与按钮，读写状态\n  OnExecuteCommand: \"OnExecuteCommand\",\n  //执行列命令\n  OnNaviNext: \"OnNaviNext\",\n  OnNaviPrevious: \"OnNaviPrevious\",\n  OnDatasourceUpdated: \"OnDatasourceUpdated\" //格式事件，数据源Datasource完成更新后触发\n\n};\n/**\r\n *  @readonly\r\n * @enum {String}\r\n * @type {{CP_lOGIN: string, CP_REGISTOR: string, CP_CHANGEPASS: string, CP_APPSTORE: string, CP_ORDEREDIT: string, CP_ORDERPAY: string, CP_ORDERPAYSUC: string, CP_ORDERREFUND: string, CP_CHARGEPAY: string, CP_WITHDRAW: string, APP_CONSOLE: string, APP_LOGIN: string, TEST: string}}\r\n */\n\nvar EnumPages = {\n  CP_HOME: \"home\",\n  //主页\n  CP_REGISTOR: \"registor\",\n  //注册账号\n  CP_FINDPASS: \"findpass\",\n  //修改控制台密码\n  CP_APPSTORE: \"appstore\",\n  //应用商店\n  CP_ORDEREDIT: \"orderedit\",\n  //订单生成，编辑\n  CP_ORDERPAY: \"orderpay\",\n  //订单支付\n  CP_ORDERPAYSUC: \"ordersuc\",\n  //支付成功\n  CP_ORDERCANEL: \"ordercancel\",\n  //订单撤销退款\n  CP_CHARGEPAY: \"chargepay\",\n  //充值\n  CP_WITHDRAW: \"withdraw\",\n  //提现\n  CP_ABOUT: \"about\",\n  //关于\n  CP_SERVICE: \"service\",\n  //客户服务\n  APP_CONSOLE: \"appconsole\",\n  // 应用程序\n  ADMIN_CONSOLE: \"adminconsole\",\n  // 控制台\n  APP_LOGIN: \"applogin\",\n  //登录页面\n  APP_DOMAIN: \"appdomain\",\n  //app的主题域页面\n  APP_LOGINSTANDALONG: \"apploginst\",\n  //独立应用程序\n  TEST: \"test\",\n  EMPTY: \"empty\"\n};\n/**\r\n *  @readonly\r\n * @enum {String}\r\n * @type {{UP_ID: string, UP_PAGE: string, UP_POSTPAGE: string, UP_ORDERID: string, UP_ACCOUNT: string, UP_USER: string, UP_CHARGEID: string, UP_TYPE: string}}\r\n */\n\nvar EnumURLParam = {\n  UP_SESSIONID: \"HYSID\",\n  //  登录记录的session的存储id\n  UP_PAGE: \"HYPAGE\",\n  // 页面类型\n  UP_POSTPAGE: \"HYPP\",\n  //登陆后打开的界面\n  UP_POSTPAGE_PARAM: \"HYPPPARAM\",\n  //登录后打开页面的参数\n  // UP_ORDERID :\"HYORDERID\", //订单id\n  // UP_ALIPAY_TRADENO :\"out_trade_no\", //结算方式id\n  // UP_PRODUCTID :\"HYPRODUCTID\",//产品id\n  // UP_ACCOUNT :\"account\", //用户登录账户 housecode\n  UP_USER: \"HYUSER\",\n  // UP_CHARGEID :\"HYCHARGEID\", //支付记录id\n  // UP_TYPE :\"HYTYPE\", //支付记录id\n  // UP_ROOMID :\"HYROOMID\", //roomid\n  // UP_HOUSEID :\"HYHOUSEID\", //houseid\n  // UP_DOMAIN:\"HYDOMAIN\",\n  PARAMNAME: \"pageinfo\"\n};\n/**\r\n *  数据类型：\r\n * 一共有 5中类型。\r\n * 类型实现的方法由：\r\n * {\r\n\t\t\t\tObject parse（aValue) //文本转化为合法的值\r\n\t\t\t    String toText(avalue) //转化为现实的字符\r\n\t\t\t\tString toString(aValue)//转化为Json可接受字符\r\n\t\t\t\tboolean isValid(Object) //给定的值是否合法。\r\n\t\t\t\t}\r\n\r\n * @constructor\r\n\r\n */\n\nfunction PKDataTypes() {\n  var myTypeSelf = this;\n  /**\r\n   *服务器端类型\r\n   * @type {{dtString: string, dtLong: string, dtInteger: string, dtDecimal: string, dtDouble: string, dtDatetime: string, dtBytes: string}}\r\n   */\n\n  var ServerTypes = /*#__PURE__*/function () {\n    function ServerTypes() {\n      _classCallCheck(this, ServerTypes);\n\n      this.dtString = \"dtString\";\n      this.dtLong = \"dtLong\";\n      this.dtInteger = \"dtInteger\";\n      this.dtDecimal = \"dtDecimal\";\n      this.dtDouble = \"dtDouble\";\n      this.dtDatetime = \"dtDatetime\";\n      this.dtBytes = \"dtBytes\";\n    }\n    /**\r\n     *  从服务器类型转化为客户端类型定义\r\n     * @param asType {String}\r\n     * @return  {DataType}\r\n     */\n\n\n    _createClass(ServerTypes, [{\n      key: \"toType\",\n      value: function toType(asType) {\n        if (asType === this.dtString) {\n          return myTypeSelf.typeStr;\n        } else if (asType === this.dtLong || asType === this.dtInteger) {\n          return myTypeSelf.typeInt;\n        } else if (asType === this.dtDecimal || asType === this.dtDouble) {\n          return myTypeSelf.typeDec;\n        } else if (asType === this.dtDatetime) {\n          return myTypeSelf.typeDatetime;\n        } else if (asType === this.dtBytes) {\n          return myTypeSelf.typeBytes;\n        } else {\n          return myTypeSelf.typeStr;\n        }\n      }\n      /**\r\n       * 从客户端类型定义转化为服务器类型\r\n       * @param aType {DataType}\r\n       * @return {string}\r\n       */\n\n    }, {\n      key: \"fromType\",\n      value: function fromType(aType) {\n        if (aType === myTypeSelf.typeStr) {\n          return this.dtString;\n        } else if (aType === myTypeSelf.typeInt) {\n          return this.dtLong;\n        } else if (aType === myTypeSelf.typeDec) {\n          return this.dtDecimal;\n        } else if (aType === myTypeSelf.typeDatetime) {\n          return this.dtDatetime;\n        } else if (aType === myTypeSelf.typeBytes) {\n          return this.dtBytes;\n        } else return this.dtString;\n      }\n      /**\r\n       *  从delphi的数据类型字符串转化为客户端系统类型\r\n       * @param asType {String}\r\n       * @return {DataType}\r\n       */\n\n    }, {\n      key: \"fromDelphiType\",\n      value: function fromDelphiType(asType) {\n        var lType;\n\n        if (asType) {\n          asType = Number(asType);\n\n          switch (asType) {\n            case 1: //string\n\n            case 16: //memo\n\n            case 23: //ftFixedChar\n\n            case 24:\n              //ftWideString\n              lType = myTypeSelf.typeStr;\n              break;\n\n            case 6: //浮点类型\n\n            case 8:\n              //浮点类型\n              lType = myTypeSelf.typeDec;\n              break;\n\n            case 25: //ftLargeint //长整型\n\n            case 14: //ftLargeint //长整型 自增长型\n\n            case 3:\n              //整形\n              lType = myTypeSelf.typeInt;\n              break;\n\n            case 11:\n              ///日期类型\n              lType = myTypeSelf.typeDatetime;\n              break;\n\n            case 15:\n              ///日期类型\n              lType = myTypeSelf.typeBytes;\n              break;\n\n            default:\n              lType = myTypeSelf.typeStr;\n          }\n        } else throw new Error(\"错误类型\" + asType);\n\n        return lType;\n      }\n    }]);\n\n    return ServerTypes;\n  }();\n  /**\r\n   * 所有数据类型的父类\r\n   * @param myDataTypeClientSelf\r\n   * @constructor\r\n   */\n\n\n  var DataType = /*#__PURE__*/function () {\n    function DataType() {\n      _classCallCheck(this, DataType);\n    }\n\n    _createClass(DataType, [{\n      key: \"isEmpty\",\n      value: function isEmpty(aValue) {\n        return aValue === undefined || aValue === null;\n      }\n      /**\r\n       *  将字符串转化转化为该类型的值\r\n       * @param aValue {String}\r\n       * @returns {any}\r\n       */\n\n    }, {\n      key: \"parse\",\n      value: function parse(aValue) {\n        if (aValue === undefined || aValue === null) {\n          return null;\n        }\n\n        return aValue;\n      }\n    }, {\n      key: \"isNumber\",\n      value: function isNumber() {\n        return false;\n      }\n      /**\r\n       * 转化为显示字符串\r\n       * @param aValue {any}\r\n       * @return {String}\r\n       */\n\n    }, {\n      key: \"toText\",\n      value: function toText(aValue) {\n        if (!aValue) return '';\n        return String(aValue);\n      }\n      /**\r\n       * 转化为序列化的字符串\r\n       * @param aValue {any}\r\n       * @return {String}\r\n       */\n\n    }, {\n      key: \"toString\",\n      value: function toString(aValue) {\n        if (!aValue) return null;\n        return String(aValue);\n      }\n      /**\r\n       * 验证值类型是否合法\r\n       * @param aValue {any}\r\n       * @return {boolean}\r\n       */\n\n    }, {\n      key: \"isValid\",\n      value: function isValid(aValue) {\n        return true;\n      }\n      /**\r\n       * 值比较\r\n       * @param value1\r\n       * @param value2\r\n       * @return {number}\r\n       */\n\n    }, {\n      key: \"compare\",\n      value: function compare(value1, value2) {\n        if (!value1 && value2) return -1;\n        if (!value1 && !value2) return 0;\n        if (value1 && !value2) return 1;\n        if (typeof value1 != \"string\") value1 = String(value1);\n        if (typeof value2 != \"string\") value2 = String(value2);\n        return value1.localeCompare(value2, _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].lang);\n      }\n    }]);\n\n    return DataType;\n  }();\n  /**\r\n   * 字符串类型\r\n       */\n\n\n  var DataTypeStr = /*#__PURE__*/function (_DataType) {\n    _inherits(DataTypeStr, _DataType);\n\n    var _super = _createSuper(DataTypeStr);\n\n    function DataTypeStr() {\n      _classCallCheck(this, DataTypeStr);\n\n      return _super.apply(this, arguments);\n    }\n\n    _createClass(DataTypeStr, [{\n      key: \"isEmpty\",\n      value: function isEmpty(aValue) {\n        return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(aValue);\n      }\n      /**\r\n       *  解析字符串，undefined 转化为null\r\n       */\n\n    }, {\n      key: \"parse\",\n      value: function parse(aValue) {\n        var lValue;\n\n        if (aValue === undefined || aValue === null) {\n          lValue = null;\n        } else if (typeof aValue != 'string') {\n          lValue = String(aValue);\n        } else lValue = aValue;\n\n        return lValue;\n      }\n    }, {\n      key: \"toText\",\n      value: function toText(aValue) {\n        if (!aValue) return '';\n        return aValue;\n      }\n    }, {\n      key: \"isValid\",\n      value: function isValid(aValue) {\n        return true;\n      }\n    }, {\n      key: \"compare\",\n      value: function compare(value1, value2) {\n        if (!value1 && value2) return -1;\n        if (!value1 && !value2) return 0;\n        if (value1 && !value2) return 1;\n        if (typeof value1 != \"string\") value1 = String(value1);\n        if (typeof value2 != \"string\") value2 = String(value2);\n        return value1.localeCompare(value2, _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].lang);\n      }\n    }, {\n      key: \"toString\",\n      value: function toString(aValue) {\n        return aValue;\n      }\n    }]);\n\n    return DataTypeStr;\n  }(DataType);\n  /**\r\n   * 整数类型 （long,integer)\r\n   * @param myDataTypeSelf\r\n     */\n\n\n  var DataTypeInteger = /*#__PURE__*/function (_DataType2) {\n    _inherits(DataTypeInteger, _DataType2);\n\n    var _super2 = _createSuper(DataTypeInteger);\n\n    function DataTypeInteger() {\n      _classCallCheck(this, DataTypeInteger);\n\n      return _super2.apply(this, arguments);\n    }\n\n    _createClass(DataTypeInteger, [{\n      key: \"parse\",\n      value: function parse(aValue) {\n        var lValue;\n\n        if (aValue === undefined || aValue === null || isNaN(aValue)) {\n          aValue = null;\n        } else if (typeof aValue == \"string\") {\n          lValue = parseInt(Number(aValue).toFixed(0));\n        } else if (typeof aValue == \"number\") {\n          lValue = parseInt(aValue.toFixed(0));\n        } else throw new Error(\"错误数据类型\" + aValue);\n\n        return lValue;\n      }\n    }, {\n      key: \"isNumber\",\n      value: function isNumber() {\n        return true;\n      }\n    }, {\n      key: \"toText\",\n      value: function toText(aValue) {\n        if (aValue === undefined || aValue === null) return '';\n        return String(aValue);\n      }\n    }, {\n      key: \"toString\",\n      value: function toString(aValue) {\n        if (aValue === null || aValue === undefined) {\n          return null;\n        }\n\n        if (typeof aValue == \"number\") {\n          return aValue.toFixed(0);\n        } else {\n          return String(Number(aValue).toFixed(0));\n        }\n      }\n    }, {\n      key: \"isValid\",\n      value: function isValid(aValue) {\n        if (typeof aValue == \"number\") {\n          return true;\n        } else {\n          return !isNaN(parseInt(aValue));\n        }\n      }\n    }, {\n      key: \"compare\",\n      value: function compare(value1, value2) {\n        return value1 - value2;\n      }\n    }]);\n\n    return DataTypeInteger;\n  }(DataType);\n  /**\r\n   * decimal 类型\r\n   * @param myDataTypeSelf\r\n   */\n\n\n  var DataTypeDecimal = /*#__PURE__*/function (_DataType3) {\n    _inherits(DataTypeDecimal, _DataType3);\n\n    var _super3 = _createSuper(DataTypeDecimal);\n\n    function DataTypeDecimal() {\n      _classCallCheck(this, DataTypeDecimal);\n\n      return _super3.apply(this, arguments);\n    }\n\n    _createClass(DataTypeDecimal, [{\n      key: \"parse\",\n      value: function parse(aValue, scale) {\n        var lValue;\n\n        if (aValue === undefined || aValue === null || isNaN(aValue)) {\n          lValue = null;\n        } else if (typeof aValue == \"string\") {\n          lValue = parseFloat(aValue);\n        } else if (typeof aValue == \"number\") {\n          lValue = parseFloat(aValue.toFixed(10));\n        } else {\n          throw new Error(\"错误数据类型\" + aValue);\n        }\n\n        if (aValue !== null && scale && scale > 0) {\n          lValue = parseFloat(lValue.toFixed(scale));\n        }\n\n        return lValue;\n      }\n    }, {\n      key: \"isNumber\",\n      value: function isNumber() {\n        return true;\n      }\n      /**\r\n       *\r\n       * @param aValue\r\n       * @param aFormat\r\n       * @return {string}\r\n       */\n\n    }, {\n      key: \"toText\",\n      value: function toText(aValue, aFormat) {\n        if (aValue === undefined || aValue === null) return '';\n        return String(aValue);\n      }\n    }, {\n      key: \"toString\",\n      value: function toString(aValue, scale) {\n        if (aValue === undefined || aValue === null) return null;\n        var lValue = this.parse(aValue);\n        return String(lValue);\n      }\n    }, {\n      key: \"isValid\",\n      value: function isValid(aValue) {\n        if (typeof aValue == \"number\") {\n          return true;\n        } else {\n          return !isNaN(Number(aValue));\n        }\n      }\n    }, {\n      key: \"compare\",\n      value: function compare(value1, value2) {\n        return value1 - value2;\n      }\n    }]);\n\n    return DataTypeDecimal;\n  }(DataType);\n  /**\r\n   * 日期时间类型\r\n   * @param myDataTypeSelf\r\n   */\n\n\n  var DataTypeDatetime = /*#__PURE__*/function (_DataType4) {\n    _inherits(DataTypeDatetime, _DataType4);\n\n    var _super4 = _createSuper(DataTypeDatetime);\n\n    function DataTypeDatetime() {\n      _classCallCheck(this, DataTypeDatetime);\n\n      return _super4.apply(this, arguments);\n    }\n\n    _createClass(DataTypeDatetime, [{\n      key: \"parse\",\n      value: function parse(aValue) {\n        var lValue;\n\n        if (aValue === undefined) {\n          lValue = null;\n        } else if (typeof aValue == \"string\") {\n          lValue = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].strToDate(aValue);\n        } else lValue = aValue;\n\n        return lValue;\n      }\n    }, {\n      key: \"toText\",\n      value: function toText(aValue, includeTime) {\n        if (aValue === undefined || aValue === null) return '';\n        return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].dateToStr(aValue, includeTime);\n      }\n    }, {\n      key: \"toString\",\n      value: function toString(aValue) {\n        if (!aValue) return null;\n        return aValue.toISOString();\n      }\n    }, {\n      key: \"isValid\",\n      value: function isValid(aValue, isIncludeTime) {\n        if (typeof aValue == \"string\") {\n          return new Date(aValue) != \"Invalid Date\";\n        }\n\n        return true;\n      }\n    }, {\n      key: \"compare\",\n      value: function compare(value1, value2) {\n        return value1 - value2;\n      }\n    }]);\n\n    return DataTypeDatetime;\n  }(DataType);\n  /**\r\n   * 二进制类型\r\n   * @param myDataTypeSelf\r\n     */\n\n\n  var DataTypeBytes = /*#__PURE__*/function (_DataType5) {\n    _inherits(DataTypeBytes, _DataType5);\n\n    var _super5 = _createSuper(DataTypeBytes);\n\n    function DataTypeBytes() {\n      _classCallCheck(this, DataTypeBytes);\n\n      return _super5.apply(this, arguments);\n    }\n\n    _createClass(DataTypeBytes, [{\n      key: \"parse\",\n      //解析值\n      value: function parse(aValue) {\n        var lValue;\n\n        if (aValue === undefined || aValue === null) {\n          lValue = null;\n        } else if (typeof aValue != 'string') {\n          lValue = String(aValue);\n        } else lValue = aValue;\n\n        return lValue;\n      }\n    }, {\n      key: \"toText\",\n      value: function toText(aValue) {\n        if (!aValue) return '';\n        return aValue;\n      }\n    }, {\n      key: \"toString\",\n      value: function toString(aValue) {\n        return aValue;\n      }\n    }, {\n      key: \"isValid\",\n      value: function isValid(aValue) {\n        return true;\n      }\n    }, {\n      key: \"compare\",\n      value: function compare(value1, value2) {\n        if (!value1 && value2) return -1;\n        if (!value1 && !value2) return 0;\n        if (value1 && !value2) return 1;\n        if (typeof value1 != \"string\") value1 = String(value1);\n        if (typeof value2 != \"string\") value2 = String(value2);\n        return value1.localeCompare(value2, _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].lang);\n      }\n    }]);\n\n    return DataTypeBytes;\n  }(DataType);\n\n  this.typeStr = new DataTypeStr();\n  this.typeInt = new DataTypeInteger();\n  this.typeDatetime = new DataTypeDatetime();\n  this.typeDec = new DataTypeDecimal();\n  this.typeBytes = new DataTypeBytes(); // myTypeSelf.isNumber= aType=> { aType == myTypeSelf.typeInt || aType ==myTypeSelf.typeDec};\n  // myTypeSelf.fromSvrType = myTypeSelf.EnumSvrTypes.toType;\n  // myTypeSelf.toSvrType = myTypeSelf.EnumSvrTypes.fromType;\n  // myTypeSelf.fromDelphiType = myTypeSelf.EnumSvrTypes.fromDelphiType;\n\n  myTypeSelf.svrTypes = new ServerTypes();\n}\n/**\r\n * 通用的属性功能，添加属性的同时添加角色\r\n * @param aObject\r\n * @param asProp\r\n */\n\n\nfunction Prop(aObject, asProp) {\n  aObject.Props = aObject.Props || [];\n  aObject.hasProp = aObject.hasProp || hasProp;\n  aObject.Props.push(asProp);\n\n  function hasProp(asProp) {\n    var i,\n        l = aObject.Props.length;\n\n    for (i = 0; i < l; i++) {\n      var lsTemp = aObject.Props[i];\n      if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(lsTemp, asProp)) return true;\n    }\n\n    return false;\n  }\n}\n/**\r\n *  具有根节点定义的属性\r\n * @param aObject {Object}\r\n * @param asRootNodePath {String|JQuery}\r\n * @constructor\r\n */\n\n\nfunction PropRootNode(aObject, asRootNodePath) {\n  Prop(aObject, \"PropRootNode\");\n  var fRootNode; // 主题域的根节点\n\n  var fRoot; // 组件的根节点\n\n  aObject.rootNode = rootNode; //前台节点定义，默认为跟节点。\n\n  aObject.root = root; //后代中可以重新定义跟节点\n\n  if (asRootNodePath) {\n    rootNode(asRootNodePath);\n  }\n  /**\r\n   *  设置、获得根节点\r\n   * @param asRootNodePath : JQuery|String 节点路径\r\n   * @return {JQuery}\r\n   */\n\n\n  function rootNode(asRootNodePath) {\n    if (arguments.length > 0) {\n      if (typeof asRootNodePath == \"string\") {\n        throw new Error(\"没有发现定义\" + asRootNodePath);\n      } else {\n        fRootNode = asRootNodePath;\n      }\n\n      fRoot = fRootNode;\n    }\n\n    return fRootNode;\n  }\n\n  function root(aRoot) {\n    if (arguments.length > 0) {\n      fRoot = aRoot;\n    }\n\n    return fRoot;\n  }\n}\n/**\r\n * 通用的命令执行者能力：\r\n * 前提：目标必须具备task属性\r\n * 能力：\r\n * 1）是否能够执行命令，异步执行，在promise中回答是否可以。\r\n * 2）执行命令，限制有任务不能同时执行，串行触发“事前”，“执行”和“事后”事件。\r\n * 虚拟方法:\r\n aObject.asynCommand(AgCommand) :JQueryPromise; //执行命令函数，可以返回异步Promise\r\n aObject.asynCanCommand(AgCommand) :JQueryPromise; //命令是否可以执行，不需要判断权限。\r\n aObject.asynBeforeCommand(AgCommand) :JQueryPromise; // 执行命令前， 可以返回异步 Promise\r\n aObject.asynAfterCommand(AgCommand) :JQueryPromise;// 执行命令后，可以返回异步Promise\r\n * @param aObject {Object} 目标对象，具备task属性\r\n * @constructor\r\n */\n\n\nfunction PropCommandExecutor(aObject) {\n  Prop(aObject, \"PropCommandExecutor\");\n  aObject.asynExecuteCommand = asynExecuteCommand; //串行方式执行命令\n\n  aObject.asynCanExecuteCommand = asynCanExecuteCommand; //判断命令是否可以执行。\n\n  /**\r\n   * 是否可以执行命令，promise的data中为true或false\r\n   * @param aCommand\r\n   * @return {JQueryPromise}\r\n   */\n\n  function asynCanExecuteCommand(aCommand) {\n    if (aObject.asynCanCommand) {\n      return aObject.asynCanCommand(aCommand);\n    }\n  }\n  /**\r\n   * 串行执行命令asynBeforeCommand， asynCommand ，asynAfterCommand\r\n   * @param aCommand\r\n   * @return {*}\r\n   */\n\n\n  function asynExecuteCommand(aCommand) {\n    if (aObject.asynCommand) {\n      aObject.asynCommand(aCommand);\n    }\n  }\n}\n/**\r\n * 主题域命令执行能力：\r\n * 增加了主题域权限判断功能。\r\n 前提需求：\r\n 1） aObject 必须是Domain，\r\n 2） aObject 必须实现 asynCommand , asynCanCommand\r\n 提供能力：\r\n 1） 执行命令 asynExecuteCommand\r\n 执行顺序为   ansyBeforeComand， asynCommand 和 asynAfterCommand 参数都是command对象，都是虚函数，后代中实现。\r\n 2） 判断命令是否可以执行 asynCanExecuteCommand\r\n 虚拟方法\r\n aObject.asynCommand(AgCommand) :JQueryPromise; //执行命令函数，可以返回异步Promise\r\n aObject.asynCanCommand(AgCommand) :JQueryPromise; //命令是否可以执行，不需要判断权限。\r\n aObject.asynBeforeCommand(AgCommand) :JQueryPromise; // 执行命令前， 可以返回异步 Promise\r\n aObject.asynAfterCommand(AgCommand) :JQueryPromise;// 执行命令后，可以返回异步Promise\r\n * @param aObject {Domain}\r\n * @constructor\r\n *\r\n */\n\n\nfunction PropCommandDomainExecutor(aObject) {\n  Prop(aObject, \"PropCommandDomainExecutor\");\n  aObject.asynExecuteCommand = asynExecuteCommand; //串行方式执行命令\n\n  aObject.asynCanExecuteCommand = asynCanExecuteCommand; //判断命令是否可以执行。\n\n  /**\r\n   * 是否可以执行命令，promise的data中为true或false\r\n   * @param aCommand\r\n   * @return\r\n   */\n\n  function asynCanExecuteCommand(aCommand) {\n    if (aObject.asynCanCommand) {\n      return aObject.asynCanCommand(aCommand);\n    }\n  }\n  /**\r\n   *  串行执行命令，判断是否具有权限，执行前，asynBeforeCommand， asynCommand ，asynAfterCommand\r\n   * @param aCommand {AgCommand}\r\n   * @return {JQueryPromise}\r\n   */\n\n\n  function asynExecuteCommand(aCommand) {\n    if (aObject.task.hasTask(EnumTaskType.EXECOMMAND)) {\n      //需要更加精确的控制，比如说执行命令，或者同样的命令的任务，否则逻辑上不合理。\n      console.log(\"有任务在执行不能执行命令\" + aCommand.operation());\n      return; //不能同时执行多个任务\n    }\n\n    var lTask = aObject.task.serialTasks(EnumTaskType.EXECOMMAND); //执行命令之前\n\n    lTask.add(function () {\n      var lEvent = aObject.event.asynParallelTrigger(EnumEvent.ON_COMMAND_BEGIN, aCommand);\n      return lEvent.task.promise();\n    }); //执行命令\n\n    lTask.add(function () {\n      return aObject.asynCommand(aCommand);\n    });\n    lTask.add(function () {\n      var lEvent = aObject.event.asynParallelTrigger(EnumEvent.ON_COMMAND_END, aCommand);\n      return lEvent.task.promise();\n    });\n    aCommand.task(lTask);\n    var lp = lTask.promise();\n    lTask.execute();\n    return lp;\n  }\n}\n/** 命令执行环境能力：\r\n 前提需求： 事件管理能力\r\n 提供能力：\r\n 1) 触发 EnumEvent.ON_STATUSCHANGE 异步事件\r\n 2) 实现 prepareData 方法返回ObjParamIds 数据\r\n * @param aObject : Object 具备event属性\r\n\r\n * @constructor\r\n */\n\n\nfunction PropCommandHoster(aObject) {\n  Prop(aObject, \"PropCommandHoster\");\n  aObject.triggerStatusChange = triggerStatusChange; //触发状态变化事件，命令可以更新自己。\n  // aObject.prepareData= prepareData;\n\n  /**\r\n   * 触发并行任务事件， EnumEvent.ON_STATUSCHANGE;\r\n   * @return {Event}\r\n   */\n\n  function triggerStatusChange() {\n    var lEvent = aObject.event.asynParallelTrigger(EnumEvent.ON_STATUSCHANGE);\n    return lEvent;\n  } // /**\n  //  * 根据当前的主题状态准备数据对象\n  //  * @return {ObjParamIds}\n  //  */\n  // function prepareData() {\n  //     return null;\n  // }\n\n}\n/**\r\n *  可以响应全局命令的主题域\r\n * @param aObject\r\n * @constructor\r\n */\n\n\nfunction PropGlobleDomain(aObject, aIsSingletong) {\n  Prop(aObject, \"PropGlobleDomain\");\n  var fIsSingleTon = aIsSingletong;\n  aObject.isSingleton = isSingleton;\n  /**\r\n   * 是否单例模式\r\n   * @return {boolean}\r\n   */\n\n  function isSingleton() {\n    return fIsSingleTon;\n  }\n}\n/**\r\n * 能够触发准备好事件的对象和销毁事件\r\n * @param aObject : Object\r\n * @constructor\r\n */\n\n\nfunction PropReadyDispose(aObject) {\n  Prop(aObject, \"PropReadyDispose\");\n  var fReady;\n  aObject.triggerReady = triggerReady;\n  aObject.triggerDispose = triggerDispose;\n  aObject.addPart = addPart;\n  aObject.addObserver = addObserver;\n  aObject.removeObserver = removeObserver;\n  var fParts = [];\n  var fObservers = [];\n  /**\r\n   * 增加监听外部事件，当本主题销毁时 自动从其他主题域主消息\r\n   * @param aTargetDomain {PropTaskEventOwner} 监听\r\n   * @param asEvent {String} 事件类型\r\n   * @param aFunction {Function} 监听函数\r\n   * @param [awaitForReady] {boolean} 是否在ready中添加监听\r\n   */\n\n  function addObserver(aTargetDomain, asEvent, aFunction, awaitForReady) {\n    fObservers.push({\n      domain: aTargetDomain,\n      event: asEvent,\n      fun: aFunction,\n      waitFormatReady: awaitForReady\n    });\n    if (!awaitForReady || fReady) aTargetDomain.event.on(asEvent, aFunction);\n  }\n\n  function removeObserver(aFunction) {\n    var i,\n        l = fObservers.length;\n\n    for (i = l - 1; i--; i >= 0) {\n      var lt = fObservers[i];\n\n      if (lt.fun === aFunction) {\n        fObservers.splice(i, 1);\n      }\n    }\n  }\n  /**\r\n   * 添加组件，可以与组件同生共死，且同时dispose和ready\r\n   * @param aDomain {Domain || Array}\r\n   */\n\n\n  function addPart(aDomain) {\n    if (Array.isArray(aDomain)) {\n      var i,\n          l = aDomain.length;\n\n      for (i = 0; i < l; i++) {\n        fParts.push(aDomain[i]);\n      }\n    } else {\n      fParts.push(aDomain);\n    }\n  }\n\n  function triggerReady() {\n    if (fReady) throw new Error(\"不能重复触发ready事件\");\n    fReady = true;\n    var lEvent = aObject.event.trigger(EnumEvent.ON_READY); //添加Observer监听事件\n\n    var i,\n        l = fObservers.length;\n\n    for (i = 0; i < l; i++) {\n      var lb = fObservers[i];\n      if (!lb.waitFormatReady) continue;\n      lb.domain.event.on(lb.event, lb.fun);\n    }\n\n    return lEvent;\n  }\n  /**\r\n   *\r\n   * 组件需要同时销毁，创建的时候自己触发ready\r\n   * @return {Event}\r\n   */\n\n\n  function triggerDispose() {\n    fReady = false;\n    var i,\n        l = fObservers.length;\n\n    for (i = 0; i < l; i++) {\n      //注销对外部的观察\n      var lb = fObservers[i];\n      lb.domain.event.off(lb.event, lb.fun);\n    }\n\n    var lEvent = aObject.event.trigger(EnumEvent.ON_DISPOSING);\n    l = fParts.length;\n\n    for (i = 0; i < l; i++) {\n      fParts[i].event.trigger(EnumEvent.ON_DISPOSING);\n    }\n\n    aObject.event.off(); //解散听众\n\n    return lEvent;\n  }\n}\n/**\r\n * 具有visible和enable属性的控件,子类中如果实现了 setEnable 或setVisible 函数才起作用。\r\n */\n\n\nfunction PropVisible(aObject) {\n  Prop(aObject, \"PropVisible\");\n  aObject.visible = visible; //可见性，组件必须通过 setVisible 方法来响应\n\n  aObject.enable = enable; //可用性，组件必须通过setEnable 来响应。\n\n  aObject.width = width;\n  aObject.height = height;\n  var fWidth = 0;\n  var fHeight = 0;\n  var fVisible = true;\n  var fEnable = true;\n  /**\r\n   * @param aStatus : boolean\r\n   * @return {boolean}\r\n   */\n\n  function enable(aStatus) {\n    if (arguments.length > 0) {\n      if (aObject.setEnable) {\n        aObject.setEnable(aStatus);\n      }\n\n      fEnable = aStatus;\n    }\n\n    return fEnable;\n  }\n  /**\r\n   *\r\n   * @param aStatus : boolean\r\n   * @return {boolean}\r\n   */\n\n\n  function visible(aStatus) {\n    if (arguments.length > 0) {\n      if (aObject.setVisible) {\n        aObject.setVisible(aStatus);\n      }\n\n      fVisible = aStatus;\n    }\n\n    return fVisible;\n  }\n\n  function width(aWidth) {\n    if (arguments.length > 0) {\n      fWidth = aWidth;\n\n      if (aObject.setWidth) {\n        aObject.setWidth(fWidth);\n      }\n    }\n\n    return fWidth;\n  }\n\n  function height(aHeight) {\n    if (arguments.length > 0) {\n      fHeight = aHeight;\n\n      if (aObject.setHeight) {\n        aObject.setHeight(fHeight);\n      }\n    }\n\n    return fHeight;\n  }\n}\n/**\r\n *  将事件转化为命令执行参数的能力\r\n * @param aObject : Object\r\n * @constructor\r\n */\n\n\nfunction PropEventToParam(aObject) {\n  Prop(aObject, \"PropEventToParam\");\n  aObject.eventToParam = eventToParam;\n  return;\n\n  function eventToParam(aEvent) {\n    return aEvent.data;\n  }\n}\n/**\r\n * 为同一个记录打开同一个主题域对象，能够判断打开的是否同一个记录。 ，需要主题域prepareData返回同样的记录id\r\n * @constructor\r\n */\n\n\nfunction PropDomainSingleDomainRecData(aDomain) {\n  Prop(aDomain, \"PropDomainSingleDomainRecData\");\n  aDomain.isSameRecordData = isSameRecordData;\n  return;\n  /**\r\n   * 是否相同的主题域和参数\r\n   * @param aPath {Svr.DomainPath}\r\n   * @param aObjParamID {Svr.ObjParamIds}\r\n   * @return boolean\r\n   */\n\n  function isSameRecordData(aObjParamID) {\n    if (!aObjParamID || !aObjParamID.ids || aObjParamID.ids.length !== 1) return false;\n    if (!aDomain.prepareData) return false;\n    /**@type {Svr.ObjParamIds}*/\n\n    var lData = aDomain.prepareData();\n    if (!lData || !lData.ids || lData.ids.length !== 1) return false;\n    return aObjParamID.ids[0] === lData.ids[0];\n  }\n}\n/**\r\n * 主题域的设置信息代理信息，  给菜单用的\r\n * 1. 获得主题域的设置参数\r\n * 2. 获得某个命令是否可以执行的信息\r\n * 3. 获得某个记录状态和数据分区等条件是否可以执行制定操作\r\n * 4. 能够根据前台操作转化为后台操作\r\n * @param aDomain\r\n * @constructor\r\n */\n\n\nfunction PropDomainSetting(aDomain) {\n  Prop(aDomain, \"PropDomainSetting\"); // /**@type Array<SysSet.ObjDomainParamValue>*/\n\n  var fSetting;\n  aDomain.getDomainSettingValue = getDomainSettingValue; //获得主题域的参数的设定值\n\n  aDomain.hasOperationRight = hasOperationRight; //需要后代中实现的\n\n  aDomain.clientOpToServerOp = clientOpToServerOp; //从前台命令转化为后台命令，用于权限控制\n  //根据 最终实际的执行者实现的， 1) 主题域参数设置, 2) 如果有第二个参数判断记录，3) 主题域状态判断，确定操作是否合法\n\n  aDomain.isValidOperation = isValidOperation;\n  return;\n  /**\r\n   * 根据主题域的设定 获得所有的可用的操作,默认全部合法\r\n   * 如果包含第二个参数就判断操作id状态是否合法\r\n   * 如果是主题域自身也可以（例如编辑）根据主题域状态判断是否合法，例如是否可以修改记录或者删除记录\r\n   * @param asOP 客户端操作类型的集合\r\n   * @return {boolean}\r\n   */\n\n  function isValidOperation(asOp, aParamIds) {\n    return true;\n  }\n  /**\r\n   *  是否具有命令的操作权限\r\n   * @param asOp\r\n   * @return {boolean}\r\n   */\n\n\n  function hasOperationRight(asOp) {\n    if (aDomain.room().roomSvr().roomSession()) {\n      var lsOp = aDomain.clientOpToServerOp(asOp);\n      return aDomain.room().roomSvr().roomSession().hasRight(aDomain.path(), lsOp);\n    }\n\n    return true;\n  }\n  /**\r\n   * 抽象方法 从前台操作类型到后台的操作类型，用于判断权限等，\r\n   * 默认不需要后台操作权限\r\n   * @param asOp {String}\r\n   * @return {String}\r\n   */\n\n\n  function clientOpToServerOp(asOp) {\n    if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asOp, \"GMTEdtNew\")) {\n      //编辑中的新建\n      return EnumOperation.opAdd;\n    } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asOp, \"GMTEdtOpen\")) {\n      return EnumOperation.opGet;\n    }\n\n    return EnumOperation.opOpen; //打开主题域\n  }\n  /**\r\n   * 同步获得主题域设置\r\n   * @param asParamCode\r\n   * @return {Object}\r\n   */\n\n\n  function getDomainSettingValue(asParamCode) {\n    if (!fSetting) {\n      fSetting = aDomain.room().roomSvr().createRoomSvr(aDomain.path()).getDomainSetting();\n    }\n\n    var i,\n        l = fSetting.length;\n\n    for (i = 0; i < l; i++) {\n      var lParam = fSetting[i];\n\n      if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(lParam.def.paramcode, asParamCode)) {\n        return lParam.value;\n      }\n    }\n\n    throw new Error(aDomain.path() + \"不存在参数\" + asParamCode);\n  }\n  /**\r\n   * */\n\n\n  function isOperationsValid(asOp) {\n    return true;\n  }\n}\n/**\r\n * 具有参数设置能力的主题域\r\n * @param aObject\r\n * @constructor\r\n */\n\n\nfunction PropDomainParam(aObject) {\n  Prop(aObject, \"PropDomainParam\"); //用户设定值\n\n  aObject.getUserParam = getUserParam; //获得主题域用户的参数\n\n  aObject.asynGetUserParam = asynGetUserParam; //异步获取参数值\n\n  aObject.asynGetUserParamJson = asynGetUserParamJson;\n  aObject.asynSetUserParam = asynSetUserParam;\n  aObject.setUserParam = setUserParam; //设置\n\n  aObject.parseParamValue = parseParamValue; //解析异步获得的参数值\n\n  /**\r\n   * 异步获取参数值\r\n   * @param asParamCode\r\n   * @return {*}\r\n   */\n\n  function asynGetUserParam(asParamCode) {\n    var lsParamPath = aObject.path() + \"//\" + asParamCode.trim().toUpperCase();\n    return aObject.room().roomSvr().paramSvr.get(lsParamPath, false);\n  }\n\n  function asynGetUserParamJson(asParamCode) {\n    var ld = $.Deferred();\n    var lp = asynGetUserParam(asParamCode);\n    lp.done(function (data) {\n      ld.resolve(JSON.parse(parseParamValue(asParamCode, data)));\n    });\n    return ld;\n  }\n\n  function parseParamValue(asParamCode, asParamData) {\n    var lsParamPath = aObject.path() + \"//\" + asParamCode.trim().toUpperCase();\n    var lParamObj = JSON.parse(asParamData);\n    return lParamObj.params[lsParamPath];\n  }\n  /**\r\n   * 同步获取参数值\r\n   * @param asParamCode\r\n   * @return {*}\r\n   */\n\n\n  function getUserParam(asParamCode) {\n    var lsParamPath = aObject.path() + \"//\" + asParamCode.trim().toUpperCase();\n    var lsParamValue = aObject.room().roomSvr().paramSvr.get(lsParamPath, true);\n    if (!lsParamValue) return;\n    var lParamObj = JSON.parse(lsParamValue);\n    return lParamObj.params[lsParamPath]; // \"{\"usercode\":\"ADMIN\",\"params\":{\"CGRK.VIEW:DEFAULT/ALIAS_USER\":null}}\"\n  }\n  /**\r\n   * 同步设置参数值\r\n   * @param asParamCode  {string}\r\n   * @param asParamValue {string}\r\n   */\n\n\n  function asynSetUserParam(asParamCode, asParamValue) {\n    var lsParamPath = aObject.path() + \"//\" + asParamCode.trim().toUpperCase();\n    return aObject.room().roomSvr().paramSvr.set(lsParamPath, asParamValue, false);\n  }\n\n  function setUserParam(asParamCode, asParamValue) {\n    var lsParamPath = aObject.path() + \"//\" + asParamCode.trim().toUpperCase();\n    aObject.room().roomSvr().paramSvr.set(lsParamPath, asParamValue, true);\n  }\n}\n/**\r\n * 粘贴，模板等导入，导出的管理对象\r\n * eventEnable = false\r\n 编辑形式的json数组\r\n 模板  拷贝粘贴  单据转换    PASTE\r\n <PASTEEXCEPTION  NOPASTE='TRUE' >id</PASTEEXCEPTION> 与参与平齐\r\n\r\n NOPASTE='TRUE'  排除在粘贴之外，\r\n MENUACTION :菜单属性的对应的ACTION\r\n <DATASETS   ORDER=’EDITDS~EDITDSSUB’>\r\n <PASTE EVENT=\"FALSE\"/>\r\n 生成模板的时候可以全面的生成， 导入的时候选择\r\n id字段，自动编号的字段， 排除在拷贝之外的字段 ，锁定，解锁，审核，记账等字段。\r\n 如果有时间，去除参与填充的字段。 去掉自动计算的字段 ,\r\n \"datasets\": [{\r\n\t\t\t\"code\": \"EDITDS\",\r\n\t\t\t\"rows\": [{\r\n\t\t\t\t\"modifyby\": \"admin\",\r\n\t\t\t\t\"createtime\": \"2003/1/1\",\r\n\t\t\t\t\"modifytime\": \"2003/1/3\"\r\n\t\t\t}]\r\n\t\t}]\r\n\r\n\r\n /**\r\n * 属于主题域的基本构件。具有XML定义\r\n *  能够创建子agent，能够更具id查找相关的agent\r\n * @param myAgSelf : Object\r\n * @param adomain : Domain\r\n * @param adef : JQuery\r\n * @constructor\r\n */\n\n\nfunction Agent(myAgSelf, adomain, adef) {\n  myAgSelf = myAgSelf || this;\n  myAgSelf.domain = domain;\n  myAgSelf.def = def; //private\n\n  var fDef = adef;\n  var fDomain = adomain;\n  /**\r\n   * @return {JQuery}\r\n   */\n\n  function def() {\n    return fDef;\n  }\n  /**\r\n   * 所属主题\r\n   * @return {Domain}\r\n   */\n\n\n  function domain() {\n    return fDomain;\n  }\n}\n/**\r\n * 主题域,如果containerContract 返回不为空，可以在容器中使用\r\n * @Event OnDisposing ： 销毁事件，无参数\r\n * @Event OnStatusChange  : 状态变化事件，更新菜单和工具栏\r\n * @Event OnTasksBegin： 任务开始\r\n * @Event OnTasksEnd  任务结束\r\n * @param myDomainSelf : Object self\r\n * @param aroom : PSRoom\r\n * @param aAttDef : ObjAttDef\r\n * @param aPath : DomainPath\r\n */\n\n\nfunction Domain(myDomainSelf, aroom, aAttDef, aPath) {\n  myDomainSelf = myDomainSelf || this;\n  var def = aAttDef ? aAttDef.def : null;\n  Agent(myDomainSelf, myDomainSelf, def); //继承关系\n\n  Prop(myDomainSelf, Domain);\n  PropReadyDispose(myDomainSelf); //ready和dispos事件能\n\n  _taskevent__WEBPACK_IMPORTED_MODULE_1__[\"TaskEvents\"].PropTaskEventOwner(myDomainSelf); //任务和事件能力\n  //public methods\n\n  myDomainSelf.room = room; //PSRoom\n\n  myDomainSelf.attDef = attDef; //function\n\n  myDomainSelf.path = path; //DomainPath\n\n  myDomainSelf.action = action; //当前打开主题的活动\n\n  myDomainSelf.actionDef = actionDef; //当前活动定义\n\n  myDomainSelf.domain = domain;\n  myDomainSelf.beforeShow = beforeShow;\n  myDomainSelf.getSubDefNodes = getSubDefNodes; //private\n\n  var fRoom = aroom; //PSRoom\n\n  var fPath = aPath; //DomainPath\n\n  var fAttDef = aAttDef; //ObjAttDef\n\n  var fAction; //actionCode 代码\n\n  var fActionDef; // ObjActDef 对象\n\n  if (def) {\n    myDomainSelf.name = fAttDef.name;\n\n    if (fPath) {\n      // if (Utils.isEmpty(fPath.actcode))\n      //     fPath.actcode = \"DEFAULT\";\n      action(fPath.actcode);\n    }\n  }\n\n  function domain() {\n    return myDomainSelf;\n  }\n  /**\r\n   * 第一次被显示正在ZView中被调用。 可以在后代中重写。\r\n   */\n\n\n  function beforeShow() {}\n  /**\r\n   * 属性定义\r\n   * @return {ObjAttDef}\r\n   */\n\n\n  function attDef() {\n    return fAttDef;\n  }\n  /**\r\n   * 所属room\r\n   * @return {PSRoom}\r\n   */\n\n\n  function room() {\n    return fRoom;\n  }\n  /**\r\n   * 主题域路径\r\n   * @return {DomainPath}\r\n   */\n\n\n  function path() {\n    return fPath;\n  }\n  /**\r\n   *活动定义\r\n   * @return {ObjActDef}\r\n   */\n\n\n  function actionDef() {\n    if (!fActionDef) {\n      throw new Error(\"不存在活动\" + aPath.toString());\n    }\n\n    return fActionDef;\n  }\n  /**\r\n   * 设置活动动代码，从而获得活动定义\r\n   * @param asAction : String\r\n   * @return { String }\r\n   */\n\n\n  function action(asAction) {\n    if (!asAction) return null;\n\n    if (arguments.length > 0) {\n      if (!myDomainSelf.attDef()) return;\n      var lsCode = asAction.trim().toUpperCase();\n      fActionDef = myDomainSelf.attDef().actDef(asAction);\n      fAction = lsCode;\n    }\n\n    return fAction;\n  }\n\n  function getSubDefNodes(asPath) {\n    return attDef().def.find(asPath);\n  }\n}\n/**\r\n *\r\n *  通用主题域代理父类，如果主题域没有指定专门的代理就使用此代理\r\n * @param myDomainSettingSelf\r\n * @param aroom\r\n * @param attDef 可以为空\r\n * @param path\r\n * @constructor\r\n */\n\n\nfunction DomainSetting(myDomainSettingSelf, aroom, attDef, path) {\n  myDomainSettingSelf = myDomainSettingSelf || this;\n  Domain(myDomainSettingSelf, aroom, attDef, path);\n  PropGlobleDomain(myDomainSettingSelf, true);\n  PropDomainSetting(myDomainSettingSelf);\n}\n/**\r\n * 主题域的引用，能够异步创建其他主题域\r\n * @param myDomainRefAg {Object}\r\n * @param domain {Domain}\r\n * @param aPath {DomainPath}\r\n * @constructor\r\n */\n\n\nfunction AgDomainRef(myDomainRefAg, aDomain, aPath) {\n  myDomainRefAg = myDomainRefAg || this;\n  Agent(myDomainRefAg, aDomain, null); //public\n\n  myDomainRefAg.refDomain = refDomain;\n  myDomainRefAg.createPart = createPart;\n  myDomainRefAg.path = path;\n  myDomainRefAg.createRefDomain = createRefDomain;\n  myDomainRefAg.asynTriggerDispose = asynTriggerDispose; //private\n\n  var fPath = aPath;\n  var fRefDomain;\n  return;\n\n  function asynTriggerDispose() {\n    if (fRefDomain) {\n      return fRefDomain.asynTriggerDispose();\n    }\n  }\n\n  function path(aPath) {\n    if (arguments.length > 0) {\n      fPath = aPath;\n    }\n\n    return fPath;\n  }\n  /**\r\n   * 创建引用的主题域\r\n   */\n\n\n  function createRefDomain() {\n    fRefDomain = aDomain.room().createDomain(fPath);\n  }\n  /**\r\n   * 创建引用主题域，作为主题域的部分添加到part中\r\n   */\n\n\n  function createPart(aParam, aParam1) {\n    fRefDomain = aDomain.room().createDomain(fPath, aParam, aParam1);\n    aDomain.addPart(fRefDomain);\n  }\n\n  function refDomain() {\n    return fRefDomain;\n  }\n}\n/**----------------------------------------------------------------------------------------\r\n * 用来选择条目， 保存条目，删除条目\r\n * 格式， 模板， 查询条件,查询条件包含id。\r\n * row（ id, code, name，value  (可以为空)）\r\n * options {\r\n\t\t\t\t{\r\n\t\t\t\t\t\t\t\t  caption : '保存模板',\r\n\t\t\t\t\t\t\t\t  defaultItem : defaultItem, //设置获得默认条目\r\n\t\t\t\t\t\t\t\t  row   : lr, //只有value属性。\r\n\t\t\t\t\t\t\t\t  rows :  fRows, //所有条目列表\r\n\t\t\t\t\t\t\t\t  del   :  true,\r\n\t\t\t\t\t\t\t\t  sort:true,\r\n\t\t\t\t\t\t\t\t  code :{caption :'模板编号',width :200},\r\n\t\t\t\t\t\t\t\t  name: { caption :'模版名称',width:200},\r\n\t\t\t\t\t\t\t\t  isdefault: { caption :'默认',width:20},//是否默认条目 ,如果没有指定改了标识不显示设置默认的列\r\n\t\t\t\t\t\t\t\t  getItems : asynGetTemplateList,//获得条目列表的函数,刷新列表条目\r\n\t\t\t\t\t\t\t\t  setItems : asynSetTemplateList,//保存列表的函数,可以修改列表\r\n\t\t\t\t\t\t\t\t  dropItem : asynDropTemplate, //都是异步操作，删除条目\r\n\t\t\t\t\t\t\t\t  setItem:asynSetTemplate;\r\n\t\t\t\t\t\t\t\t  addItem : asynSetTemplate,//新增条目 \tfunction asynSetTemplate(arow) {\r\n\r\n * }\r\n * <div  class='hy_item_content_mngr' hidden='true'>\r\n\t\t\t\t       <div class='hy_item_content_mngr_grid' ></div>\r\n\t\t\t\t       <div class='hy_item_content_mngr_code' ></div>\r\n\t\t\t\t       <div class='hy_item_content_mngr_name' ></div>\r\n\t\t\t\t       <div class='buttons' >\r\n\t\t\t\t               <div  class='btOk'></div>\r\n\t\t\t\t               <div  class='btCancel'></div>\r\n\t\t\t\t       </div>\r\n\t\t </div>\r\n\t\t       对象编辑器，用于模板管理，格式和查询条件的保存。\r\n\t\t       1）保存一个对象，修改对象（可以修改名称，代码和是否默认），只能有一个默认。\r\n\t\t       2）从多个对象中选择\r\n\t\t       3）删除对象。\r\n\t\t       4）将某个对象设置为默认对象。 默认格式，默认模板，默认查询条件。\r\n\t\t       关于 0000 的默认格式和查询条件兼容的问题 ，首先找是否有设置为默认的，如果没有再找 0000 的条件和格式。\r\n\r\n\t\t        let edsNone= 0;\r\n\t\t    let edsNew = 1;\r\n\t\t    let edsModify=2;\r\n\t\t    let edsView =3;\r\n\r\n */\n\n\nfunction AgObjectEditor(aDomain, myEditor, options, aTask) {\n  myEditor = myEditor || this;\n  options = options || {};\n  var fdxArrayStore;\n  var fdxDataSource;\n  var fRows;\n  var fCodeOption = options.code || {\n    caption: '代码',\n    width: 200\n  }; //代码列定义\n\n  var fNameOption = options.name || {\n    caption: '名称',\n    width: 200\n  }; //名称列定义\n\n  var fIsDefaultOption = options.isdefault; // ||{ caption :'默认' ,width :20};//名称列定义\n\n  var fDef = appDef.find(\".hy_item_content_mngr\").clone(true, true); //跟节点定义\n\n  var fGridNode = fDef.find(\".hy_item_content_mngr_grid\");\n  var fCodeNode = fDef.find(\".hy_item_content_mngr_code\");\n  var fNameNode = fDef.find(\".hy_item_content_mngr_name\");\n  var fDefaultNode = fDef.find(\".hy_item_content_mngr_default\");\n  var fCodeCaptionNode = fDef.find(\".hy_item_content_mngr_code_caption\");\n  var fNameCaptionNode = fDef.find(\".hy_item_content_mngr_name_caption\");\n  var fDefaultCaptionNode = fDef.find(\".hy_item_content_mngr_default_caption\");\n  var fOkNode = fDef.find(\".btOk\");\n  var fCancelNode = fDef.find(\".btCancel\");\n  var fOkButton;\n  var fCodeText; //代码编辑框\n\n  var fNameText; //名称编辑框\n\n  var fDefaultCheckbox; //是否默认编辑框\n\n  var fGrid; //记录列表\n\n  var fPopupWin; //弹出窗口\n\n  var fPopupNode; //弹出窗口的节点\n\n  var fTaskResolved;\n  var fSelectedRow; //再查看状态下，当前选择的记录\n\n  var fEditStatus = EnumEditStatus.edsNone; //\n\n  load();\n  return;\n\n  function load() {\n    if (options.row != null) {\n      fEditStatus = EnumEditStatus.edsNew; //新建状态\n\n      fSelectedRow = options.row; //当前要保存的记录\n    } else {\n      fEditStatus = EnumEditStatus.edsView; //查看状态，可以选择记录返回。返回作为人物的 data。 返回的是选择的row\n    }\n\n    fDef.removeAttr(\"hidden\");\n\n    if (options.rows) {\n      fRows = options.rows;\n    }\n\n    createGrid();\n    createEditor();\n    createPopup();\n    var lp = options.getItems();\n    lp.done(function () {\n      fGrid.refresh();\n    });\n    return;\n\n    function createGrid() {\n      //创建Grid\n      fdxArrayStore = new DevExpress.data.ArrayStore({\n        data: fRows,\n        key: 'id'\n      });\n      fdxDataSource = new DevExpress.data.DataSource({\n        store: fdxArrayStore\n      });\n      fdxDataSource.load(); //代码列\n\n      var fColumns = [];\n      fColumns.push(setCol(fCodeOption, {\n        name: 'code',\n        allowEditing: true,\n        allowSorting: true,\n        dataField: 'code',\n        editable: true,\n        sortable: true\n      })); //代码列\n\n      fColumns.push(setCol(fNameOption, {\n        name: 'name',\n        allowEditing: true,\n        allowSorting: true,\n        dataField: 'name',\n        editable: true,\n        sortable: true\n      }));\n\n      if (fIsDefaultOption) {\n        fColumns.push(setCheckBoxCol(fIsDefaultOption, {\n          name: 'isdefault',\n          allowEditing: true,\n          allowSorting: true,\n          dataField: 'isdefault',\n          editable: true,\n          sortable: true\n        }));\n      } //Grid的配置\n\n\n      var lConf = {\n        dataSource: fdxDataSource,\n        columns: fColumns,\n        keyExpr: 'id',\n        rowAlternationEnabled: true,\n        allowColumnReordering: false,\n        allowColumnResizing: true,\n        columnAutoWidth: true,\n        columnResizingMode: \"widget\",\n        cellHintEnabled: true,\n        noDataText: \"\",\n        showBorders: true,\n        showRowLines: true,\n        onRowUpdating: function onRowUpdating(e) {\n          var lp1 = $.Deferred();\n          _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].objCopy(e.newData, e.oldData);\n          var lp = options.setItem(e.oldData);\n          e.cancel = lp1.promise();\n          lp.then(function () {\n            lp1.resolve(false);\n            fGrid.refresh();\n          }, function () {\n            lp1.resolve(true);\n            fGrid.refresh();\n          });\n        },\n        onRowRemoving: function onRowRemoving(e) {\n          var lr = e.data; //要删除的行\n\n          var lp1 = $.Deferred();\n          e.canel = lp1.promise();\n          options.dropItem(lr).then(function () {\n            lp1.resolve();\n          }, function () {\n            lp1.resolve(true);\n          });\n        },\n        onSelectionChanged: function onSelectionChanged(e) {\n          if (fEditStatus == EnumEditStatus.edsNew) return;\n          var lrs = e.selectedRowsData;\n\n          if (lrs.length == 0) {\n            fSelectedRow = null;\n            fNameText.option(\"value\", \"\");\n            fCodeText.option(\"value\", \"\");\n\n            if (fDefaultCheckbox) {\n              fDefaultCheckbox.option(\"value\", false);\n            }\n          } else {\n            fSelectedRow = lrs[0];\n            fNameText.option(\"value\", fSelectedRow.name);\n            fCodeText.option(\"value\", fSelectedRow.code);\n\n            if (fDefaultCheckbox) {\n              fDefaultCheckbox.option(\"value\", options.defaultItem() == fSelectedRow.id);\n            }\n          }\n        },\n        editing: {\n          allowAdding: false,\n          allowDeleting: true,\n          allowUpdating: true,\n          mode: 'row',\n          texts: {\n            confirmDeleteMessage: '是否删除此条目?',\n            confirmDeleteTitle: '删除条目',\n            deleteRow: '删除',\n            editRow: '修改',\n            cancelRowChanges: '取消',\n            saveRowChanges: '保存'\n          },\n          useIcons: true\n        },\n        selection: {\n          allowSelectAll: false,\n          deferred: false,\n          mode: 'single',\n          selectAllMode: 'allPages',\n          showCheckBoxesMode: 'none'\n        },\n        paging: {\n          enabled: false\n        },\n        pager: {\n          showPageSizeSelector: false,\n          visible: false\n        }\n      };\n      fGridNode.dxDataGrid(lConf);\n      fGrid = fGridNode.dxDataGrid(\"instance\");\n    }\n\n    function createEditor() {\n      fCodeCaptionNode.text(fCodeOption.caption);\n      fNameCaptionNode.text(fNameOption.caption);\n\n      if (fIsDefaultOption) {\n        fDefaultCaptionNode.text(fIsDefaultOption.caption);\n        fDefaultCheckbox = fDefaultNode.dxCheckBox({\n          readOnly: false,\n          placeholder: \"\",\n          onValueChanged: function onValueChanged() {}\n        }).dxCheckBox(\"instance\");\n      }\n\n      fCodeNode.dxTextBox({\n        step: 0,\n        onChange: function onChange(e) {}\n      });\n      fCodeText = fCodeNode.dxTextBox(\"instance\");\n      fNameNode.dxTextBox({\n        step: 0,\n        onChange: function onChange(e) {}\n      });\n      fNameText = fNameNode.dxTextBox(\"instance\"); //按钮\n\n      fOkButton = fOkNode.dxButton({\n        text: fEditStatus == EnumEditStatus.edsNew ? '添加' : '确定',\n        onClick: function onClick(e) {\n          if (fEditStatus == edsNew) {\n            var _lp = asynSaveCurrentValue();\n\n            _lp.then(function () {\n              if (aTask) {\n                fTaskResolved = true;\n              }\n\n              fPopupWin.hide();\n            });\n          } else {\n            if (!fSelectedRow) return;\n            fTaskResolved = true;\n            fPopupWin.hide();\n          }\n        }\n      }).dxButton(\"instance\");\n      fCancelNode.dxButton({\n        text: '取消',\n        onClick: function onClick(e) {\n          fPopupWin.hide();\n        }\n      });\n\n      if (fEditStatus == EnumEditStatus.edsNew) {\n        fCodeText.option(\"readOnly\", false);\n        fNameText.option(\"readOnly\", false);\n\n        if (fDefaultCheckbox) {\n          fDefaultCheckbox.option(\"readOnly\", false);\n        }\n\n        fCodeNode.find(\"input\").css(\"background-color\", SysConst.COLOR_REQUIRED);\n        fNameNode.find(\"input\").css(\"background-color\", SysConst.COLOR_REQUIRED);\n        setTimeout(function () {\n          fCodeText.focus();\n        }, 1000);\n      } else {\n        fCodeText.option(\"readOnly\", true);\n        fNameText.option(\"readOnly\", true);\n\n        if (fDefaultCheckbox) {\n          fDefaultCheckbox.option(\"readOnly\", true);\n        }\n\n        fOkButton.option(\"disable\", 'true');\n        fCodeNode.find(\"input\").css(\"background-color\", SysConst.COLOR_READONLY);\n        fNameNode.find(\"input\").css(\"background-color\", SysConst.COLOR_READONLY);\n      }\n\n      if (!fIsDefaultOption) {\n        fDefaultCaptionNode.hide();\n        fDefaultNode.hide();\n        fCodeNode.width(490);\n      }\n    }\n\n    function createPopup() {\n      fPopupNode = $(\"<div></div>\");\n      fPopupNode.dxPopup({\n        height: 550,\n        width: 700,\n        title: options.caption,\n        contentTemplate: function contentTemplate(element) {\n          element.append(fDef);\n        },\n        closeOnBackButton: true,\n        hideOnOutsideClick: true,\n        shading: false,\n        resizeEnabled: true,\n        dragEnabled: true,\n        onHidden: function onHidden() {\n          fPopupNode.remove();\n\n          if (aTask) {\n            if (fTaskResolved) {\n              aTask.resolve(fSelectedRow);\n            } else {\n              aTask.resolve(null);\n            }\n          }\n        },\n        showCloseButton: true,\n        visible: false,\n        showTitle: true\n      });\n      fPopupNode.appendTo(options.root);\n      fPopupWin = fPopupNode.dxPopup(\"instance\");\n      fPopupWin.show();\n    }\n  } //end of load;\n\n  /**\r\n   * 保存当前编辑框中的内容 Ok按钮保存\r\n   * 保存当前值，刷新列表。\r\n   */\n\n\n  function asynSaveCurrentValue() {\n    if (!fSelectedRow) throw new Error(\"没有当前编辑行\");\n    var lsCode = fCodeText.option(\"value\"); //代码编辑框\n\n    var lsName = fNameText.option(\"value\"); //名称编辑框\n\n    var lDefault = false;\n\n    if (fDefaultCheckbox) {\n      lDefault = fDefaultCheckbox.option(\"value\"); //是否默认编辑框\n    }\n\n    if (!lsCode || !lsName) {\n      throw new Error(\"需要输入代码和名称\");\n    }\n\n    fSelectedRow.code = lsCode;\n    fSelectedRow.name = lsName;\n    fSelectedRow.isdefault = lDefault;\n    var lp = options.addItem(fSelectedRow);\n    lp.done(function () {\n      fGrid.refresh();\n    });\n    return lp;\n  }\n  /**\r\n   * 根据记录类型赋予记录额外的属性\r\n   * 如果记录指定不同的类型可以赋予记录不同的属性。 一道editTemplate和cellTemplate\r\n   */\n\n\n  function setCol(col, aObj) {\n    if (aObj) {\n      _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].objCopy(aObj, col);\n    }\n\n    col.editCellTemplate = editCellTemplate;\n    col.cellTemplate = cellTemplate;\n    return col;\n    /**\r\n     * 根据控件中的内容更新\r\n     */\n\n    function setValue(aValue, aCellInfo) {\n      var lValue = aValue; //\t\t\t\t\t\t\t\taCellInfo.data[col.dataField] = lValue;\n\n      aCellInfo.setValue(lValue); ///更新数据源，到row中\n    }\n\n    function editCellTemplate(cellElement, cellInfo) {\n      var fEditor;\n      var fNode = $(\"<div></div>\");\n      var lsType = \"string\";\n      var lConfig = {\n        step: 0,\n        value: cellInfo.text,\n        onChange: function onChange() {\n          var lValue = fEditor.inst().option(\"value\");\n          setValue(lValue, cellInfo);\n        }\n      };\n      fEditor = new Comps.EditorTextBox(fNode, lConfig, lsType);\n      fEditor.height(25);\n      fEditor.readOnly(false);\n      cellElement.append(fNode);\n      return;\n    }\n\n    function cellTemplate(cellElement, cellInfo) {\n      var lNode = $(\"<span></span>\");\n      lNode.text(cellInfo.text);\n      lNode.appendTo(cellElement); //双击事件\n\n      cellElement.dblclick(function (e) {}); //单击事件\n\n      cellElement.click(function (e) {});\n    }\n  }\n\n  function setCheckBoxCol(col, aObj) {\n    if (aObj) {\n      _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].objCopy(aObj, col);\n    }\n\n    col.editCellTemplate = editCellTemplate;\n    col.cellTemplate = cellTemplate;\n    return col;\n\n    function editCellTemplate(cellElement, cellInfo) {\n      var lr = cellInfo.data;\n      var ln = $(\"<div></div>\");\n      ln.css(\"padding\", \"6px\");\n      var fCheckBox;\n      ln.dxCheckBox({\n        value: lr[\"isdefault\"],\n        readOnly: false,\n        onValueChanged: function onValueChanged(e) {\n          var lValue = fCheckBox.option(\"value\");\n          setValue(lValue, cellInfo);\n        }\n      });\n      fCheckBox = ln.dxCheckBox(\"instance\");\n      ln.appendTo(cellElement);\n    }\n\n    function setValue(aValue, aCellInfo) {\n      var lValue = aValue; //\t\t\t\t\t\taCellInfo.data[col.dataField] = lValue;\n\n      aCellInfo.setValue(lValue); ///更新数据源，到row中\n    }\n\n    function cellTemplate(cellElement, cellInfo) {\n      var lValue = cellInfo.value;\n      var ln = $(\"<div></div>\");\n      ln.css(\"padding\", \"3px\");\n      ln.dxCheckBox({\n        value: lValue,\n        readOnly: true\n      });\n      var fCheckBox = ln.dxCheckBox(\"instance\");\n      ln.appendTo(cellElement);\n    }\n  }\n} //end of ItemContentMngr;\n\n/***-----------------------------------------------------------------------------------------------------------------------------------------\r\n 属性编辑Grid，有固定的行，行可以有不同的类型，可以编辑不同类型的值。 可以用来设置对象的属性，或者编辑参数的值。\r\n {\r\n\t\t\t\t  id   标识\r\n\t\t\t\t  name, 显示名称\r\n\t\t\t\t  value,  取值\r\n\t\t\t\t  type,  取值类型\r\n\t\t\t\t  expressions 可选值表达式\r\n\t\t\t  }\r\n *  type (radio, drop down ,  numberrange ,text\r\n **-------------------------------------------------------------------------------------------------------------------------------------------*/\n\n\nfunction AgPropertyEditor(myPropertyEditor, arows) {\n  myPropertyEditor = myPropertyEditor || this; //公开函数\n\n  myPropertyEditor.root = root;\n  myPropertyEditor.rows = rows;\n  myPropertyEditor.addRow = addRow;\n  myPropertyEditor.refresh = refresh; //\t\t\t\tmyPropertyEditor.update = update;\n\n  var fOuter = $(\"<div/>\");\n  var fRows = [];\n  var fdxArrayStore;\n  var fdxDataSource;\n  var fGrid;\n  var fColumns = [];\n  load();\n  return;\n\n  function load() {\n    if (arows) {\n      fRows = rows(arows);\n    }\n\n    fdxArrayStore = new DevExpress.data.ArrayStore({\n      data: fRows,\n      key: 'id'\n    });\n    fdxDataSource = new DevExpress.data.DataSource({\n      store: fdxArrayStore\n    });\n    fdxDataSource.load();\n    fColumns.push({\n      width: 200,\n      caption: '名称',\n      name: 'name',\n      allowEditing: false,\n      allowSorting: false,\n      dataField: 'name',\n      editable: false,\n      sortable: false,\n      cellTemplate: function cellTemplate(cellElement, cellInfo) {\n        cellElement.addClass(\"hy_propertyEditor_name\");\n        var lNode = $(\"<span></span>\");\n        lNode.text(cellInfo.text);\n        lNode.appendTo(cellElement);\n      }\n    });\n    fColumns.push({\n      width: 200,\n      caption: '取值',\n      name: 'value',\n      allowSorting: false,\n      allowEditing: true,\n      dataField: 'value',\n      editable: false,\n      sortable: false,\n      editCellTemplate: function editCellTemplate(cellElement, cellInfo) {\n        var lr = cellInfo.data;\n        lr.editCellTemplate(cellElement, cellInfo);\n      },\n      cellTemplate: function cellTemplate(cellElement, cellInfo) {\n        var lr = cellInfo.data;\n        lr.cellTemplate(cellElement, cellInfo);\n      }\n    });\n    var lConf = {\n      dataSource: fdxDataSource,\n      columns: fColumns,\n      keyExpr: 'id',\n      rowAlternationEnabled: true,\n      allowColumnReordering: false,\n      allowColumnResizing: true,\n      columnAutoWidth: true,\n      columnResizingMode: \"widget\",\n      cellHintEnabled: true,\n      noDataText: \"\",\n      showBorders: true,\n      showRowLines: true,\n      editing: {\n        allowAdding: false,\n        allowDeleting: false,\n        allowUpdating: true,\n        mode: 'cell'\n      },\n      paging: {\n        enabled: false\n      },\n      pager: {\n        showPageSizeSelector: false,\n        visible: false\n      }\n    };\n    fOuter.dxDataGrid(lConf);\n    fGrid = fOuter.dxDataGrid(\"instance\");\n  }\n  /**\r\n   * 重新设定数据\r\n   */\n\n\n  function rows(arows) {\n    if (arguments.length > 0) {\n      fRows.length = 0;\n      var i,\n          l = arows.length;\n\n      for (i = 0; i < l; i++) {\n        fRows.push(createObj(arows[i]));\n      }\n\n      if (fdxDataSource) {\n        fdxDataSource.reload();\n      }\n    }\n\n    return fRows;\n  }\n\n  function addRow(id, name, value, type, expression) {\n    var lr = {\n      id: id,\n      name: name,\n      value: value,\n      type: type,\n      expression: expression\n    };\n    fRows.push(createObj(lr));\n  }\n\n  function refresh() {\n    fdxDataSource.reload();\n  }\n\n  function root() {\n    return fOuter;\n  }\n  /**\r\n   * 根据记录类型赋予记录额外的属性\r\n   * 如果记录指定不同的类型可以赋予记录不同的属性。 一道editTemplate和cellTemplate\r\n   */\n\n\n  function createObj(arow) {\n    StrValue(arow);\n    return arow;\n    /**根据控件中的内容更新*/\n\n    function setValue(aValue, aCellInfo) {\n      var lValue = aValue;\n      aCellInfo.data[\"value\"] = lValue;\n      aCellInfo.setValue(lValue); ///更新数据源，到row中\n    }\n\n    function StrValue(arow) {\n      arow.editCellTemplate = editCellTemplate;\n      arow.cellTemplate = cellTemplate;\n      return;\n\n      function editCellTemplate(cellElement, cellInfo) {\n        var fEditor;\n        var fNode = $(\"<div></div>\");\n        var lsType = \"string\";\n        var lConfig = {\n          step: 0,\n          value: cellInfo.text,\n          onChange: function onChange() {\n            var lValue = fEditor.inst().option(\"value\");\n            setValue(lValue, cellInfo);\n          }\n        };\n        fEditor = new Comps.EditorTextBox(fNode, lConfig, lsType);\n        fEditor.height(25);\n        fEditor.readOnly(false);\n        cellElement.append(fNode);\n        return;\n      }\n\n      function cellTemplate(cellElement, cellInfo) {\n        var lNode = $(\"<span></span>\");\n        lNode.text(cellInfo.text);\n        lNode.appendTo(cellElement);\n      }\n    }\n  }\n} ///end of PropertyEditor\n\n\nconsole.log(\"base\");\nvar fBase = {\n  Prop: Prop,\n  PropVisible: PropVisible,\n  //包含visible，enable，width，height方法的对象。\n  PropRootNode: PropRootNode,\n  //能够从模板获得节点定义的对象\n  PropCommandExecutor: PropCommandExecutor,\n  //能够执行命令的对象\n  PropCommandDomainExecutor: PropCommandDomainExecutor,\n  //能够执行命令的主题域，包括权限的判定\n  PropCommandHoster: PropCommandHoster,\n  //能够为命令执行提供环境数据的对象\n  PropGlobleDomain: PropGlobleDomain,\n  PropDomainParam: PropDomainParam,\n  PropDomainSetting: PropDomainSetting,\n  PropReadyDispose: PropReadyDispose,\n  //能够触发ready和dispos事件的对象\n  Agent: Agent,\n  Domain: Domain,\n  DomainSetting: DomainSetting,\n  AgDomainRef: AgDomainRef,\n  PropDomainSingleDomainRecData: PropDomainSingleDomainRecData // AgMenuRefGloble : AgMenuRefGloble,\n\n};\nvar fDataTypes = new PKDataTypes();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 123160 characters]\n//# sourceURL=webpack-internal:///./src/bas/base.js\n");

/***/ }),

/***/ "./src/bas/server.js":
/*!***************************!*\
  !*** ./src/bas/server.js ***!
  \***************************/
/*! exports provided: Svr */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Svr\", function() { return fServer; });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"./src/bas/utils.js\");\n/* harmony import */ var _taskevent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./taskevent.js */ \"./src/bas/taskevent.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./src/bas/base.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// noinspection JSUnfilteredForInLoop,JSUnusedLocalSymbols,JSUnusedGlobalSymbols\n\n\n // import {Sys} from \"sys/system\";\n\nvar fHyService;\n\nfunction hy() {\n  if (!fHyService) {\n    fHyService = new ASHyServer();\n  }\n\n  return fHyService;\n}\n\nvar EntityInRoomRes = function EntityInRoomRes(aObj) {\n  _classCallCheck(this, EntityInRoomRes);\n\n  if (aObj) {\n    if (typeof aObj == 'string') {\n      aObj = JSON.parse(aObj);\n    }\n\n    this.ecode = aObj.ecode;\n    this.ename = aObj.ename;\n    this.estatus = aObj.estatus;\n    this.createby = aObj.createby;\n    this.createtime = aObj.createtime;\n    this.modifyby = aObj.modifyby;\n    this.modifytime = aObj.modifytime;\n    this.lockstatus = aObj.lockstatus;\n    this.closestatus = aObj.closestatus;\n    this.lockby = aObj.lockby;\n    this.locktime = aObj.locktime;\n    this.closeby = aObj.closeby;\n    this.closetime = aObj.closetime;\n    this.auditby = aObj.auditby;\n    this.audittime = aObj.audittime;\n    this.tranmemo = aObj.tranmemo;\n    this.roomid = aObj.roomid;\n    this.eversion = aObj.eversion;\n  }\n};\n/**\r\n * 主题域路径，实体.属性:活动ettcode.attcode:actcode\r\n * @param asPath\r\n * @constructor\r\n */\n\n\nvar DomainPath = /*#__PURE__*/function () {\n  function DomainPath(asPath) {\n    _classCallCheck(this, DomainPath);\n\n    this.ettcode = \"\";\n    this.attcode = \"\";\n    this.actcode = \"\";\n    this.path = asPath;\n  }\n\n  _createClass(DomainPath, [{\n    key: \"fromJson\",\n    value: function fromJson(aObj) {\n      this.ettcode = aObj.ettcode;\n      this.attcode = aObj.attcode;\n      this.actcode = aObj.actcode;\n    }\n    /**\r\n     * 相对路径转化为绝对路径\r\n     */\n\n  }, {\n    key: \"toFullPath\",\n    value: function toFullPath(asRelPath) {\n      var lp = new DomainPath(asRelPath);\n      if (!lp.ettcode) lp.ettcode = this.ettcode;\n      if (!lp.attcode) lp.attcode = this.attcode;\n      return lp;\n    }\n    /**\r\n     * 判断路径是否相同，实体代码和属性代码相同\r\n     */\n\n  }, {\n    key: \"samePath\",\n    value: function samePath(aPath) {\n      var lp = aPath;\n\n      if (typeof aPath == \"string\") {\n        lp = new DomainPath(aPath);\n      }\n\n      return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(lp.ettcode, this.ettcode) && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(lp.attcode, this.attcode);\n    }\n    /**\r\n     * 路径和活动是否相同。 即完全相同的主题域\r\n     */\n\n  }, {\n    key: \"isSameAction\",\n    value: function isSameAction(aPath) {\n      var lp = aPath;\n\n      if (typeof aPath == \"string\") {\n        lp = new DomainPath(aPath);\n      }\n\n      return this.samePath(lp) && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(this.actcode, lp.actcode);\n    }\n  }, {\n    key: \"isSameEntity\",\n    value: function isSameEntity(aPath) {\n      var lp = aPath;\n\n      if (typeof aPath == \"string\") {\n        lp = new DomainPath(aPath);\n      }\n\n      return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(lp.ettcode, this.ettcode);\n    }\n  }, {\n    key: \"toDomainString\",\n    value: function toDomainString() {\n      return this.ettcode + \".\" + this.attcode;\n    }\n    /**\r\n     * 转化为路径的字符串完整标识\r\n     * @return {string}\r\n     * @override\r\n     */\n\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var lsTemp = this.ettcode + \".\" + this.attcode;\n      if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(this.actcode)) lsTemp = lsTemp + \":\" + this.actcode;\n      return lsTemp;\n    }\n  }, {\n    key: \"path\",\n    get: function get() {\n      return this.toString();\n    },\n    set: function set(asPath) {\n      if (asPath == null) return;\n      asPath = asPath.trim().toUpperCase();\n\n      if (asPath.indexOf(\":\") >= 0) {\n        var lsTmp = asPath.split(\":\");\n        asPath = lsTmp[0];\n        this.actcode = lsTmp[1];\n      }\n\n      if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(asPath)) {\n        if (asPath[0] === \".\") asPath = asPath.substr(1);\n\n        var _lsTmp = asPath.split(\".\");\n\n        this.ettcode = _lsTmp[0];\n        if (_lsTmp.length > 1) this.attcode = _lsTmp[1];\n      }\n    }\n  }]);\n\n  return DomainPath;\n}();\n/**\r\n * 远程调用post\r\n * @param asUrl\r\n * @param aParamObj 参数对象，属性为参数名称，和值\r\n * @param synch\r\n * @return {null|jQuery}\r\n */\n\n\nfunction rmCall(asUrl, aParamObj, synch) {\n  var fDeferred = $.Deferred();\n  var lResult = null;\n  var lIsError = false;\n  var lsMessage;\n  var lParam = aParamObj ? aParamObj : {};\n  $.ajax({\n    url: asUrl,\n    type: \"POST\",\n    timeout: 600000,\n    //超时时间10分钟\n    data: lParam,\n    async: !synch,\n    success: onSuccess,\n    error: onError\n  });\n\n  if (synch) {\n    if (lIsError) throw new Error(lsMessage);\n    return lResult;\n  } else {\n    return fDeferred.promise();\n  }\n\n  function onSuccess(data, status, jqxhr) {\n    if (synch) {\n      if (data.result === \"error\") {\n        lIsError = true;\n        lsMessage = data.message;\n      } else {\n        lResult = data.returnvalue;\n      }\n    } else {\n      if (data.result === \"error\") {\n        fDeferred.reject(data.message);\n        throw new Error(\"调用错误,原因:\" + data.message);\n      } else {\n        fDeferred.resolve(data.returnvalue);\n      }\n    }\n  }\n\n  function onError(jqxhr, status, errorMsg) {\n    if (synch) {\n      throw new Error(errorMsg);\n    } else {\n      fDeferred.reject(errorMsg);\n\n      if (!errorMsg) {\n        throw new Error(errorMsg);\n      } else if (jqxhr.status === 0) {\n        throw new Error(\"通信错误\");\n      } else {\n        throw new Error(\"系统错误,错误状态码\" + jqxhr.status);\n      }\n    }\n  }\n}\n/**\r\n * @param asUrl\r\n * @param invokeInfo {ObjInvokeInfo}\r\n * @param objParam {*}\r\n * @param synch {boolean}\r\n * @Param noProgress {boolean}\r\n * @return {JQueryPromise || String}\r\n */\n\n\nfunction remoteCall(asUrl, invokeInfo, objParam, synch, noProgress) {\n  var fDeferred = $.Deferred();\n  var lsParam = \"\";\n\n  if (objParam !== undefined) {\n    lsParam = typeof objParam == \"string\" ? objParam : JSON.stringify(objParam);\n  }\n\n  if (!lsParam) lsParam = \"\"; // lsParam = encodeURIComponent(lsParam);\n\n  var lsInfo = JSON.stringify(invokeInfo); //encodeURIComponent()\n\n  var lResult = null;\n  var lIsError = false;\n  var lsMessage; // contentType: \"application/x-www-form-urlencoded\",\n\n  $.ajax({\n    url: asUrl,\n    type: \"POST\",\n    timeout: 6000000,\n    //超时时间10分钟\n    data: {\n      info: lsInfo,\n      param: lsParam\n    },\n    async: !synch,\n    success: onSuccess,\n    error: onError\n  });\n\n  if (synch) {\n    if (lIsError) throw new Error(lsMessage);\n    return lResult;\n  } else {\n    var lp = fDeferred.promise();\n\n    if (!noProgress) {\n      _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].showLoadPanel(lp, null, \"远程调用中\");\n    }\n\n    return lp;\n  }\n\n  function onSuccess(data, status, jqxhr) {\n    if (synch) {\n      if (data.result === \"error\") {\n        lIsError = true;\n        lsMessage = data.message;\n      } else {\n        lResult = data.returnvalue;\n      }\n    } else {\n      if (data.result === \"error\") {\n        _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].err(\"服务器返回错误:\" + data.message);\n        fDeferred.reject(data.message); // throw new Error(\"服务器返回错误:\" + data.message);\n      } else {\n        fDeferred.resolve(data.returnvalue);\n      }\n    }\n  }\n\n  function onError(jqxhr, status, errorMsg) {\n    console.log(lsInfo);\n\n    if (synch) {\n      throw new Error(errorMsg);\n    } else {\n      fDeferred.reject(errorMsg);\n\n      if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(errorMsg)) {\n        throw new Error(errorMsg);\n      } else if (jqxhr.status === 0) {\n        _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].err(\"通信错误\"); // throw new Error(\"通信错误\");\n      } else {\n        _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].err(\"系统错误,错误状态码\" + jqxhr.status); // throw new Error(\"系统错误,错误状态码\" + jqxhr.status );\n      }\n    }\n  }\n}\n/**\r\n * 远程调用post\r\n * @param asUrl\r\n * @param aParamObj 参数对象，属性为参数名称，和值\r\n * @param synch\r\n * @return {null|jQuery}\r\n */\n\n\nfunction httpGet(asUrl, aParamObj, synch) {\n  var fDeferred = $.Deferred();\n  var lResult = null;\n  var lIsError = false;\n  var lsMessage;\n  var lParam = aParamObj ? aParamObj : {};\n  $.ajax({\n    url: asUrl,\n    type: \"GET\",\n    timeout: 600000,\n    //超时时间10分钟\n    data: lParam,\n    async: !synch,\n    success: onSuccess,\n    error: onError\n  });\n\n  if (synch) {\n    if (lIsError) throw new Error(lsMessage);\n    return lResult;\n  } else {\n    return fDeferred.promise();\n  }\n\n  function onSuccess(data, status, jqxhr) {\n    return data;\n  }\n\n  function onError(jqxhr, status, errorMsg) {\n    if (synch) {\n      throw new Error(errorMsg);\n    } else {\n      fDeferred.reject(errorMsg);\n\n      if (!errorMsg) {\n        throw new Error(errorMsg);\n      } else if (jqxhr.status === 0) {\n        throw new Error(\"通信错误\");\n      } else {\n        throw new Error(\"系统错误,错误状态码\" + jqxhr.status);\n      }\n    }\n  }\n}\n\nvar ObjCallResult = /*#__PURE__*/function () {\n  function ObjCallResult(data) {\n    _classCallCheck(this, ObjCallResult);\n\n    if (typeof data === 'string') {\n      data = JSON.parse(data);\n      this.result = data.result; //ok 正确，error错误\n\n      this.message = data.message;\n      this.returnvalue = data.returnvalue;\n    }\n  }\n\n  _createClass(ObjCallResult, [{\n    key: \"isok\",\n    get: function get() {\n      return this.result = 'ok';\n    }\n  }]);\n\n  return ObjCallResult;\n}();\n\nvar REQUESTID = 1;\n\nfunction getRequestID() {\n  REQUESTID++;\n\n  if (REQUESTID > 99999) {\n    REQUESTID = 1;\n  }\n\n  return REQUESTID;\n}\n\nvar ObjDevRequest = function ObjDevRequest(assessionid, op, data) {\n  _classCallCheck(this, ObjDevRequest);\n\n  this.sessionid = assessionid; //请求用户端的Sessionid\n\n  this.reqid = getRequestID(); //请求用户赋予的id，对用户自身不重复就可以\n\n  this.op = op; //操作类型 opStatus,opGet//其他命令\n\n  this.data = data; //携带的数据,请求的参数，或者返回的结果。\n  // this.error = false;\n};\n/**\r\n *\r\n *  远程服务调用， 参数放在aObjParam对象中的属性， 返回值必须是ObjResult类型，\r\n *  即通过returnValue返回结果，错误消息通过message属性传递\r\n *    {\r\n *\r\n *  }\r\n * @param asUrl *\r\n * @param aObjParam {Object}\r\n * @param synch {Boolean}\r\n * @return {JQueryPromise || String}\r\n */\n\n\nfunction jsonCall(asUrl, aObjParam, synch) {\n  var fDeferred = $.Deferred();\n  /**\r\n   *\r\n   * @type {ObjCallResult}\r\n   */\n\n  var lResult = null; // contentType: \"application/x-www-form-urlencoded\",\n\n  $.ajax({\n    url: asUrl,\n    type: \"POST\",\n    timeout: 600000,\n    //超时时间10分钟\n    data: aObjParam,\n    async: !synch,\n    success: function success(data, status, jqxhr) {\n      lResult = new ObjCallResult(data);\n\n      if (!synch) {\n        if (!lResult.isok) {\n          fDeferred.reject(lResult.message);\n          _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].err(\"服务器返回错误:\" + lResult.message);\n        } else {\n          fDeferred.resolve(lResult.returnvalue);\n        }\n      }\n    },\n    error: function error(jqxhr, status, errorMsg) {\n      if (synch) {\n        throw new Error(errorMsg);\n      } else {\n        fDeferred.reject(errorMsg);\n\n        if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(errorMsg)) {\n          throw new Error(errorMsg);\n        } else if (jqxhr.status === 0) {\n          _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].err(\"通信错误\");\n        } else {\n          _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].err(\"系统错误,错误状态码\" + jqxhr.status);\n        }\n      }\n    }\n  });\n\n  if (synch) {\n    if (!lResult.isok) throw new Error(lResult.message);\n    return lResult.returnvalue;\n  } else {\n    return fDeferred.promise();\n  }\n}\n/**\r\n *  资源对象，包含id，ecode和name属性 ，公共父类。\r\n * @param myResourceSelf this参数\r\n * @param aResource  可选，可克隆的资源兑现\r\n * @constructor\r\n */\n\n\nvar ObjResource = function ObjResource(aResource) {\n  _classCallCheck(this, ObjResource);\n\n  if (aResource) {\n    this.id = aResource.id;\n    this.code = aResource.code;\n    this.name = aResource.name;\n  }\n};\n/**\r\n *  远程调用信息\r\n * @param roomid\r\n * @param path\r\n * @param operation\r\n * @param session\r\n * @constructor\r\n */\n\n\nvar ObjInvokeInfo = function ObjInvokeInfo(aroomInfo, path, operation, session, asTopic) {\n  _classCallCheck(this, ObjInvokeInfo);\n\n  this.roomid = aroomInfo.id;\n  this.deploymentid = aroomInfo.deploymentid;\n  this.systemid = aroomInfo.systemid; //所属系统\n\n  this.path = String(path); //可以是路径对象\n\n  this.operation = operation;\n\n  if (session) {\n    this.sessionid = session.sessionid;\n    this.sessionhouseid = session.houseid;\n  }\n\n  if (asTopic) {\n    this.topic = asTopic;\n  }\n};\n\nvar ObjInvokeData = function ObjInvokeData(ainfo, aparam) {\n  _classCallCheck(this, ObjInvokeData);\n\n  this.info = ainfo;\n  this.param = aparam;\n};\n/**\r\n * EntitySession\r\n {\r\n\r\n                     public String  usersessionid;\r\n                     public String  clienttype;\r\n                     public String  clientid=\"\";\r\n                     public Long    userid;\r\n                     public String  usercode;\r\n                     public Long    ahouseid;\r\n                     public String  username;\r\n                     public Date    begintime;\r\n                     public Date    endtime;\r\n                     public Long   roomid; //gateroom的id\r\n                     rooms[\r\n                         {\r\n                                public Long roomid;\r\n                                public String viewcode;\r\n                                public String employeecode;\r\n                                public String rolecode;\r\n                         }\r\n                     ]\r\n              }\r\n */\n\n\nvar ObjHouseSession = /*#__PURE__*/function () {\n  function ObjHouseSession(objSession) {\n    _classCallCheck(this, ObjHouseSession);\n\n    this.data = objSession; //原始数据可以缓存\n\n    this.uuid = objSession.uuid;\n    this.sessionid = objSession.usersessionid;\n    this.clienttype = objSession.clienttype;\n    this.clientid = objSession.clientid;\n    this.userid = objSession.userid;\n    this.usercode = objSession.usercode;\n    this.username = objSession.username;\n    this.houseid = objSession.ahouseid;\n    this.housecode = objSession.housecode;\n    this.begintime = new Date(objSession.begintime);\n    this.endtime = new Date(objSession.endtime);\n    this.gateroomid = objSession.roomid; //gateroom的id\n\n    this.isadminuser = objSession.isadminuser;\n    this.updatetime = new Date(); //更新时间\n\n    /**@type ObjHouseSessionRoomInfo[]*/\n\n    this.fRooms = [];\n    var i,\n        l = objSession.rooms.length;\n\n    for (i = 0; i < l; i++) {\n      this.fRooms.push(new ObjHouseSessionRoomInfo(objSession.rooms[i]));\n    } // console.log(\"new    Session uuid:\" +this.uuid+ \" sessionid:\"+this.sessionid)\n\n  }\n\n  _createClass(ObjHouseSession, [{\n    key: \"update\",\n\n    /**\r\n     * 服务器更新结束时间\r\n     * @param aEndTime\r\n     */\n    value: function update(aSession) {\n      if (!aSession || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(aSession)) {\n        return;\n      }\n\n      if (typeof aSession == \"string\") {\n        aSession = JSON.parse(aSession);\n      }\n\n      aSession.uuid = this.uuid;\n      this.endtime = new Date(aSession.endtime);\n      this.updatetime = new Date(); //更新续命时间\n\n      var lStore = new ASSesssionStore();\n      lStore.updateSession(aSession); // console.log(\"update Session uuid:\" +this.uuid+ \" sessionid:\"+this.sessionid)\n    }\n    /**\r\n     * 当前用户是否管理员，或者拥有管理员权限\r\n     * @return {boolean}\r\n     */\n\n  }, {\n    key: \"isAdmin\",\n    value: function isAdmin() {\n      return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(this.usercode, \"admin\") || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(this.isadminuser, \"1\");\n    }\n    /**\r\n     * 所有可以进入的rooom\r\n     * @return {ObjHouseSessionRoomInfo[]}\r\n     */\n\n  }, {\n    key: \"rooms\",\n    value: function rooms() {\n      return this.fRooms;\n    }\n    /**\r\n     * 根据id获得登录room的信息\r\n     * @param aid\r\n     * @return {ObjHouseSessionRoomInfo}\r\n     */\n\n  }, {\n    key: \"roomById\",\n    value: function roomById(aid) {\n      var _iterator = _createForOfIteratorHelper(this.fRooms),\n          _step;\n\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var lr = _step.value;\n\n          if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(lr.roomid, aid)) {\n            return lr;\n          }\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n    }\n  }], [{\n    key: \"isExpired\",\n    value: function isExpired(aSession) {\n      return (new Date().getTime() - new Date(aSession.updatetime)) / 3600000 > 36; //一天半没有更新过时了\n    }\n  }]);\n\n  return ObjHouseSession;\n}();\n/**\r\n * house登录后传递的用户的角色，视图和人员信息\r\n */\n\n\nvar ObjHouseSessionRoomInfo = function ObjHouseSessionRoomInfo(aRoom) {\n  _classCallCheck(this, ObjHouseSessionRoomInfo);\n\n  this.roomid = aRoom.roomid;\n  this.viewcode = aRoom.viewcode;\n  this.employeecode = aRoom.employeecode;\n  this.rolecode = aRoom.roles;\n  this.authorCount = aRoom.authorCount; //当前授权数量，登录的时候获得。用户srp购买数量\n};\n/**\r\n * 主题域权限的定义\r\n */\n\n\nvar ObjRightDef = /*#__PURE__*/function () {\n  function ObjRightDef(adef) {\n    _classCallCheck(this, ObjRightDef);\n\n    /**主题域路径*/\n    this.rightpath = new DomainPath(adef.rightpath);\n    this.domainname = adef.domainname;\n    /** 权限分类的名称*/\n\n    this.category = adef.category; //分类名称\n\n    /**实体id*/\n\n    this.entityid = adef.entityid;\n    /** 主题域id*/\n\n    this.attributeid = adef.attributeid;\n    /**权限代码*/\n\n    this.ecode = adef.ecode;\n    /**@type{String} 权限名称*/\n\n    this.ename = adef.ename;\n    this.ememo = adef.ememo;\n    this.operationsstr = adef.operationsstr.split(\",\"); //权限的操作类型\n\n    /**@type {boolean} 是否数据分区*/\n\n    this.partition = adef.partition; //是否需要数据分区。\n\n    this.actionid = adef.actionid;\n  }\n\n  _createClass(ObjRightDef, [{\n    key: \"isRightOfCode\",\n    value: function isRightOfCode(attid, actid, asCode) {\n      if (this.attributeid != attid) {\n        return false;\n      } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(this.ecode, asCode)) {\n        return false;\n      } else if (!this.actionid && !actid) {\n        return true;\n      } else {\n        return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(this.actionid, actid);\n      }\n    }\n    /**\r\n     * 是否为指定权限\r\n     * @param attid\r\n     * @param actid\r\n     * @param op\r\n     * @return {boolean}\r\n     */\n\n  }, {\n    key: \"isRight\",\n    value: function isRight(attid, actid, op) {\n      if (this.operationsstr.indexOf(op) < 0) return false;\n      if (this.attributeid !== attid) return false;\n\n      if (!this.actionid) {\n        //定义中没有指定活动,表明针对整个属性\n        return true;\n      } else {\n        return this.actionid === actid;\n      }\n    }\n  }]);\n\n  return ObjRightDef;\n}();\n/**\r\n *  * def            * { alias: ObjAlias ,\r\n *   datasets:{\r\n *       attributepath: Array invisiblecolumns code\r\n *   }}\r\n * { alias: ObjAlias ,\r\n *   datasets:{\r\n *       attributepath: Array invisiblecolumns code\r\n *   }}*\r\n */\n\n\nvar ObjDataPartition = function ObjDataPartition(adef) {\n  _classCallCheck(this, ObjDataPartition);\n\n  if (adef) {\n    if (typeof adef === 'string') {\n      adef = JSON.parse(adef);\n    }\n    /**\r\n     * @type {Object} 数据集的查询参数定义\r\n     */\n\n\n    this.alias = adef.alias; //数据查询条件的定义 Object\n\n    /**\r\n     * @type {Map<'datasetpath',Array<String>>} 所有不可见列的定义\r\n     */\n\n    this.datasets = adef.datasets; //,\"datasets\":{\"CPCK.BROWSEDS\":[\"c_wldw.ename\",\"s_employee.ecode\",\"c_zzjg.ename\"]}}\n    // \"datasets\":{\n    //     \"CGDD.BROWSEDS\":[\n    //\n    //     ],\n    //         \"CGDD.EDITDSSUB\":[\n    //\n    //     ]\n    // }\n  }\n};\n\nvar ObjRoleRight = /*#__PURE__*/function () {\n  function ObjRoleRight(aObj) {\n    _classCallCheck(this, ObjRoleRight);\n\n    this.optype = aObj.optype; //所有操作类型的数组\n\n    this.roleid = aObj.roleid;\n    this.entityid = aObj.entityid;\n    this.attributeid = aObj.attributeid;\n    this.actionid = aObj.actionid;\n    this.ecode = aObj.ecode;\n    this.datapartitionid = aObj.datapartitionid;\n    this.datapartiondef = null;\n\n    if (aObj.datapartiondef) {\n      this.datapartiondef = new ObjDataPartition(aObj.datapartiondef);\n    }\n  }\n  /** 是否某个权限定义的权限，只有定义的权限才可以分配\r\n   * @param aRightDef {ObjRightDef}\r\n   * @return {boolean}\r\n   */\n\n\n  _createClass(ObjRoleRight, [{\n    key: \"isRightDef\",\n    value: function isRightDef(aRightDef) {\n      if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(this.ecode, aRightDef.ecode)) return false;\n      if (aRightDef.attributeid !== this.attributeid) return false;\n\n      if (!aRightDef.actionid && !this.actionid) {\n        return true;\n      } else return aRightDef.actionid === this.actionid;\n    }\n  }]);\n\n  return ObjRoleRight;\n}();\n/**\r\n *\r\n */\n\n\nvar ObjRoomSession = /*#__PURE__*/function () {\n  /**\r\n   *\r\n   * @param aObj {Object}\r\n   * @param ahouse {ASHouse}\r\n   * @param aroom {ASRoom}\r\n   */\n  function ObjRoomSession(aObj, ahouse, aroom) {\n    _classCallCheck(this, ObjRoomSession);\n\n    this.employeeid = aObj.employeeid; //用户id Long\n\n    this.employeecode = aObj.employeecode; //用户代码 String\n\n    this.employeename = aObj.employeename; //用户姓名 String\n\n    this.room = aroom;\n    this.house = ahouse;\n    this.roomid = aObj.roomid; //Long\n\n    this.userproperties = {}; //用户属性对象\n    //数据集记录作为用户属性\n\n    if (aObj.userproperties) {\n      this.userproperties = JSON.parse(aObj.userproperties);\n    }\n    /** 拥有的权限\r\n     *  {Map<EntityID,Array<ObjRoleRight>>}\r\n     */\n\n\n    this.rights = {};\n\n    if (aObj.rights) {\n      for (var lEntityID in aObj.rights) {\n        var lRights = [];\n\n        var _iterator2 = _createForOfIteratorHelper(aObj.rights[lEntityID]),\n            _step2;\n\n        try {\n          for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n            var lr = _step2.value;\n            lRights.push(new ObjRoleRight(lr));\n          }\n        } catch (err) {\n          _iterator2.e(err);\n        } finally {\n          _iterator2.f();\n        }\n\n        this.rights[lEntityID] = lRights;\n      }\n    }\n  }\n\n  _createClass(ObjRoomSession, [{\n    key: \"userpropties\",\n    value: function userpropties(asProp) {\n      for (var _i in this.userproperties) {\n        if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(_i, asProp)) return this.userproperties[_i];\n      }\n\n      return null;\n    }\n    /**\r\n     * 获得权限对应的数据分区的不可见列 ，返回对象，属性为数据集的路径，取值为数据集列\r\n     * @param aDomainPath {DomainPath} 权限主题域，可以对应活动，由主题域自己确定。\r\n     * @param asRightCode {string}  权限代码\r\n     * @return //{CGDD.BROWSEDS: Array<String>} //例如{\"CGDD.BROWSEDS\":[\"t_cgdd.ecode\",\"t_cgdd.createby\",\"t_cgdd.createtime\"]}\r\n     */\n\n  }, {\n    key: \"getInvisibleColumns\",\n    value: function getInvisibleColumns(aDomainPath, asRightCode) {\n      var lrDef = this.getRightDefByRightCode(aDomainPath, asRightCode);\n      if (!lrDef) return null;\n      var lr = this.getRight(lrDef);\n\n      if (!lr) {\n        return null;\n      }\n\n      if (!lr.datapartiondef) return null;\n      return lr.datapartiondef.datasets;\n    }\n    /**\r\n     * 没有权限设定为有权限，有权限设定必须分配权限。\r\n     * @param aPath {DomainPath}\r\n     * @param asOperation {String}\r\n     * @return {boolean}\r\n     */\n\n  }, {\n    key: \"hasRight\",\n    value: function hasRight(aPath, asOperation) {\n      if (this.house.session.isAdmin()) return true;\n      var lRightDef = this.getRightDef(aPath, asOperation);\n      if (!lRightDef) return true;\n      return this.getRight(lRightDef) != null;\n    }\n    /**\r\n     * 获得权限定义对应的权限\r\n     * @param aRightDef {ObjRightDef}\r\n     * @return {ObjRoleRight}\r\n     */\n\n  }, {\n    key: \"getRight\",\n    value: function getRight(aRightDef) {\n      var lrs = this.rights[aRightDef.entityid];\n      if (!lrs) return null;\n\n      var _iterator3 = _createForOfIteratorHelper(lrs),\n          _step3;\n\n      try {\n        for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n          var lr = _step3.value;\n\n          if (lr.isRightDef(aRightDef)) {\n            return lr;\n          }\n        }\n      } catch (err) {\n        _iterator3.e(err);\n      } finally {\n        _iterator3.f();\n      }\n\n      return null;\n    }\n    /**\r\n     *  根据权限代码获得权限定义\r\n     * @param aPath   权限对应主题域以及活动的路径。\r\n     * @param asRightDefCode 权限代码\r\n     * @return {ObjRightDef | null}\r\n     */\n\n  }, {\n    key: \"getRightDefByRightCode\",\n    value: function getRightDefByRightCode(aPath, asRightDefCode) {\n      var lPath = typeof aPath === \"string\" ? new DomainPath(aPath) : aPath;\n      var ldef = this.room.metaSvr.getAttDef(lPath);\n      var lactid = null;\n\n      if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(lPath.actcode)) {\n        lactid = ldef.actDef(lPath.actcode).id;\n      }\n\n      var lrdefs = this.room.rightSvr.rightDefOfEntity(ldef.entityDef.id);\n\n      var _iterator4 = _createForOfIteratorHelper(lrdefs),\n          _step4;\n\n      try {\n        for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n          var lrdef = _step4.value;\n\n          if (lrdef.isRightOfCode(ldef.id, lactid, asRightDefCode)) {\n            return lrdef;\n          }\n        }\n      } catch (err) {\n        _iterator4.e(err);\n      } finally {\n        _iterator4.f();\n      }\n\n      return null;\n    }\n    /**\r\n     * 获取权限定义\r\n     * [enttiycode][rightdefs]\r\n     * @return {ObjRightDef}\r\n     */\n\n  }, {\n    key: \"getRightDef\",\n    value: function getRightDef(aPath, asOperation) {\n      var lPath = typeof aPath == \"string\" ? new DomainPath(aPath) : aPath;\n      var ldef = this.room.metaSvr.getAttDef(lPath);\n      var lactid = null;\n\n      if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(lPath.actcode)) {\n        lactid = ldef.actDef(lPath.actcode).id;\n      }\n\n      var lrdefs = this.room.rightSvr.rightDefOfEntity(ldef.entityDef.id);\n\n      if (!lrdefs) {\n        return null;\n      }\n\n      var _iterator5 = _createForOfIteratorHelper(lrdefs),\n          _step5;\n\n      try {\n        for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n          var lrdef = _step5.value;\n\n          if (lrdef.isRight(ldef.id, lactid, asOperation)) {\n            return lrdef;\n          }\n        }\n      } catch (err) {\n        _iterator5.e(err);\n      } finally {\n        _iterator5.f();\n      }\n\n      return null;\n    }\n  }]);\n\n  return ObjRoomSession;\n}();\n\nvar ObjHouseRegistInfo = function ObjHouseRegistInfo(registinfoid, ecode, ename, phonenumber, useremail, isReg, validphone, validatecode, houseuserpass) {\n  _classCallCheck(this, ObjHouseRegistInfo);\n\n  this.registinfoid = registinfoid;\n  this.ecode = ecode;\n  this.ename = ename;\n  this.useremail = useremail;\n  this.phonenumber = phonenumber;\n  this.estatus = isReg ? '1' : '2'; //1 注册2 修改\n\n  this.validphone = validphone; //true phone false email\n\n  this.houseuserpass = houseuserpass;\n  this.validatecode = validatecode;\n};\n\nvar ObjHouseInfoQueryParam = function ObjHouseInfoQueryParam(housecode, houseid, roomid, phonenumber, useremail, includeClosed) {\n  _classCallCheck(this, ObjHouseInfoQueryParam);\n\n  this.housecode = housecode;\n  this.houseid = houseid;\n  this.roomid = roomid;\n  this.phonenumber = phonenumber; //通过注册的电话号码，已经废弃\n\n  this.useremail = useremail; //email验证注册信息，已经废弃\n\n  this.includeClosed = includeClosed;\n};\n/**\r\n *\r\n * ObjHouseInfo数据结构\r\n {\r\n                 id,code,name\r\n                 public Boolean   closed;\r\n                 public Date      begintime;\r\n                 public Date      endtime;\r\n                 rooms[\r\n                     {\r\n                        id,code,name\r\n                        public Long    \tdeploymentid;\r\n                        public Long     deploymentroom; //部署所在room\r\n                        public Long \tsystemid;\r\n                        public String \turl;\r\n                        public Long    \tunitid; //所属数据库单元\r\n                        public Long  \thouseId;\r\n                        public Boolean  closed = false;\r\n                     }\r\n                 ]\r\n             }\r\n * @param aInfo\r\n * @constructor\r\n */\n\n\nvar ObjHouseInfo = /*#__PURE__*/function (_ObjResource) {\n  _inherits(ObjHouseInfo, _ObjResource);\n\n  var _super = _createSuper(ObjHouseInfo);\n\n  function ObjHouseInfo(aInfo) {\n    var _this;\n\n    _classCallCheck(this, ObjHouseInfo);\n\n    _this = _super.call(this, aInfo);\n    _this.data = aInfo;\n    _this.phonenumber = aInfo.phonenumber;\n    _this.useremail = aInfo.useremail;\n    /**\r\n     *\r\n     * @type {Array<ObjRoomInfo>}\r\n     */\n\n    _this.rooms = [];\n    var i,\n        l = aInfo.rooms.length;\n\n    for (i = 0; i < l; i++) {\n      _this.rooms.push(new ObjRoomInfo(aInfo.rooms[i]));\n    }\n\n    return _this;\n  }\n  /**\r\n   *  根据代码获得\r\n   * @param asCode\r\n   * @return {ObjRoomInfo}\r\n   */\n\n\n  _createClass(ObjHouseInfo, [{\n    key: \"roomInfoByCode\",\n    value: function roomInfoByCode(asCode) {\n      var i,\n          l = this.rooms.length;\n\n      for (i = 0; i < l; i++) {\n        if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asCode, this.rooms[i].code)) return this.rooms[i];\n      }\n    }\n  }, {\n    key: \"roomInfoByName\",\n    value: function roomInfoByName(asName) {\n      var i,\n          l = this.rooms.length;\n\n      for (i = 0; i < l; i++) {\n        if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asName, this.rooms[i].name)) return this.rooms[i];\n      }\n    }\n    /**\r\n     * 根据Id获得Room\r\n     * @param aRoomId\r\n     * @return {ObjRoomInfo}\r\n     */\n\n  }, {\n    key: \"roomInfoById\",\n    value: function roomInfoById(aRoomId) {\n      var i,\n          l = this.rooms.length;\n\n      for (i = 0; i < l; i++) {\n        if (aRoomId == this.rooms[i].id) return this.rooms[i];\n      }\n    }\n  }]);\n\n  return ObjHouseInfo;\n}(ObjResource);\n/**\r\n *\r\n id,code,name\r\n public Long    \tdeploymentid;\r\n public Long     deploymentroom; //部署所在room\r\n public Long \tsystemid;\r\n public String \turl;\r\n public Long    unitid; //所属数据库单元\r\n public Long  \thouseId;\r\n public Boolean  closed = false;\r\n */\n\n\nvar ObjRoomInfo = /*#__PURE__*/function (_ObjResource2) {\n  _inherits(ObjRoomInfo, _ObjResource2);\n\n  var _super2 = _createSuper(ObjRoomInfo);\n\n  function ObjRoomInfo(aInfo) {\n    var _this2;\n\n    _classCallCheck(this, ObjRoomInfo);\n\n    _this2 = _super2.call(this, aInfo);\n    _this2.url = aInfo.url;\n    _this2.deploymentid = aInfo.deploymentid;\n    _this2.groupid = aInfo.groupid;\n    _this2.systemid = aInfo.systemid; //所属系统\n\n    _this2.instid = aInfo.instid; //所属系统实例id\n\n    _this2.insttypeid = aInfo.insttypeid; //系统实例类型id;用于续费等操作\n\n    _this2.requireauth = aInfo.requireauth; ////是否需要授权,默认不需要0 or null 不需要 ;1 需要\n\n    /**\r\n     *角色的信息,room中包含的角色，只有更新后才有\r\n     * @type {Array<ObjResource>}\r\n     */\n\n    _this2.roles = [];\n    return _this2;\n  }\n\n  return ObjRoomInfo;\n}(ObjResource);\n/**\r\n *  实体id通用参数，可以包含多个记录id，\r\n * @param aids   :Array 实体id数组\r\n * @param idType  : String 数据集类型\r\n * @param aArrVers:Array 实体id记录对应的版本信息，用于编辑数据更新\r\n * @param aRows : {Array<ObjRow>} 行记录\r\n * @admdataset {DomainDataset}\r\n * @constructor\r\n */\n\n\nvar ObjParamIds = /*#__PURE__*/function () {\n  function ObjParamIds(aids, idType, aArrVers, aRows, admdataset) {\n    _classCallCheck(this, ObjParamIds);\n\n    if (!aids) throw new Error(\"必须指定ids\");\n\n    if (!Array.isArray(aids)) {\n      aids = [aids];\n    }\n\n    this.ids = aids;\n    this.type = idType ? idType : \"dtLong\";\n    this.versions = aArrVers;\n    this.fRows = aRows || [];\n    this.dataset = admdataset;\n  }\n\n  _createClass(ObjParamIds, [{\n    key: \"toJSON\",\n    value: function toJSON() {\n      return {\n        ids: this.ids,\n        type: this.type,\n        versions: this.versions\n      };\n    }\n    /**\r\n     * 根据表达式过滤记录,返回记录是否合法\r\n     * @param asExp\r\n     */\n\n  }, {\n    key: \"filterByExp\",\n    value: function filterByExp(asExp) {\n      if (!this.ids || !this.fRows || !this.dataset || this.fRows.length == 0 || this.fRows.length != this.ids.length) {\n        return false;\n      }\n\n      var lExp = this.dataset.store().expression(asExp);\n      var lids = [];\n      var lrs = [];\n\n      for (var _i2 = 0; _i2 < this.fRows.length; _i2++) {\n        var lr = this.fRows[_i2];\n        var lid = this.ids[_i2];\n\n        if (lExp.value(lr)) {\n          lids.push(lid);\n          lrs.push(lr);\n        }\n      }\n\n      return lids.length == this.ids.length;\n    }\n  }, {\n    key: \"expValue\",\n    value: function expValue(asExp, arow) {\n      if (!this.ids || !this.fRows || !this.dataset || this.fRows.length == 0 || this.fRows.length != this.ids.length) {\n        return;\n      }\n\n      var lr = arow ? arow : this.fRows[0];\n      var lExp = this.dataset.store().expression(asExp);\n      return lExp.value(lr);\n    } // addrow(arow) {\n    //     this.fRows.push(arow);\n    // }\n\n  }, {\n    key: \"rows\",\n    value: function rows(arows) {\n      if (arguments.length > 0) this.fRows = arows;\n      return this.fRows;\n    }\n  }]);\n\n  return ObjParamIds;\n}();\n/**\r\n *  传递完整的实体就来的编辑信息。包含多个数据集\r\n * @param aData Json数据\r\n * @constructor\r\n */\n\n\nvar ObjParamEdit = /*#__PURE__*/function () {\n  function ObjParamEdit(aData) {\n    _classCallCheck(this, ObjParamEdit);\n\n    this.datasets = [];\n\n    if (aData) {\n      this.parse(aData);\n    }\n  }\n  /**\r\n   *  记录的id\r\n   * @param [aParamId] {ObjParamIds}\r\n   */\n\n\n  _createClass(ObjParamEdit, [{\n    key: \"objParamId\",\n    value: function objParamId(aParamId) {\n      if (arguments.length > 0) {\n        this.id = aParamId;\n      }\n\n      return this.id;\n    }\n    /**\r\n     *添加数据集\r\n     * @param code 数据集代码\r\n     * @param ds  数据集对象 JsonString\r\n     */\n\n  }, {\n    key: \"add\",\n    value: function add(code, ds) {\n      this.datasets.push({\n        code: code,\n        data: ds\n      });\n    }\n    /**\r\n     * 获得数据集\r\n     * @param asCode 数据集代码\r\n     * @returns {*}\r\n     */\n\n  }, {\n    key: \"get\",\n    value: function get(asCode) {\n      var i,\n          l = this.datasets.length;\n\n      for (i = 0; i < l; i++) {\n        if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(this.datasets[i].code, asCode)) return this.datasets[i];\n      }\n    } //解析数据集\n\n  }, {\n    key: \"parse\",\n    value: function parse(asJsonStr) {\n      if (typeof asJsonStr == \"string\") {\n        asJsonStr = JSON.parse(asJsonStr);\n      }\n\n      this.datasets = asJsonStr.datasets;\n      this.message = asJsonStr.message;\n    }\n  }]);\n\n  return ObjParamEdit;\n}(); // /**\n//  *  ????\n//  * @param asPath\n//  * @param asOp\n//  * @param aids\n//  * @param idType\n//  * @constructor\n//  */\n// function ObjRoleRightOfId(asPath, asOp, aids, idType) {\n//     let myRoleRightOfIdSelf = this;\n//     myRoleRightOfIdSelf.recid = new ObjParamIds(aids, idType);\n//     myRoleRightOfIdSelf.attpath = asPath;\n//     myRoleRightOfIdSelf.operation = asOp;\n// }\n\n/**\r\n *  登录参数对象\r\n * @param asUserCode  用户名称\r\n * @param asLoginPass 密码\r\n * @param asClientType 客户端信息\r\n * @param asClientId  客户端的标识\r\n * @constructor\r\n */\n\n\nvar ObjLoginParam = function ObjLoginParam(asUserCode, asLoginPass, asClientType, asClientId) {\n  _classCallCheck(this, ObjLoginParam);\n\n  this.usercode = asUserCode;\n  this.userpass = asLoginPass;\n  this.clienttype = asClientType;\n  this.clientid = asClientId;\n};\n\nvar ObjCodeAndId = function ObjCodeAndId(id, id1, code, code1, code2) {\n  _classCallCheck(this, ObjCodeAndId);\n\n  this.id = id;\n  this.id1 = id1;\n  this.code = code;\n  this.code1 = code1;\n  this.code2 = code2;\n};\n/**\r\n *  实体定义，资源对象类型,\r\n *  {id,code,name,typecurver,attDefs:{\"editds\":{id,code,name,def,actDef :{\"default\":{id,code,name,def}}},}\r\n * @param aEntityDef\r\n * @constructor\r\n */\n\n\nvar ObjEntityDef = /*#__PURE__*/function (_ObjResource3) {\n  _inherits(ObjEntityDef, _ObjResource3);\n\n  var _super3 = _createSuper(ObjEntityDef);\n\n  function ObjEntityDef(aEntityDef) {\n    var _this3;\n\n    _classCallCheck(this, ObjEntityDef);\n\n    _this3 = _super3.call(this, aEntityDef);\n    _this3.fAttDefs = {};\n\n    if (aEntityDef) {\n      for (var _i3 in aEntityDef.attDefs) {\n        _this3.fAttDefs[_i3.trim().toUpperCase()] = new ObjAttDef(aEntityDef.attDefs[_i3], _assertThisInitialized(_this3));\n      }\n    }\n\n    return _this3;\n  }\n\n  _createClass(ObjEntityDef, [{\n    key: \"attDef\",\n    value: function attDef(asAttCode) {\n      return this.fAttDefs[asAttCode.trim().toUpperCase()];\n    }\n  }]);\n\n  return ObjEntityDef;\n}(ObjResource);\n/**\r\n *  实际的属性定义，资源对象类型\r\n *  { id,code,name, defxmlstr : String,actDefs:ArrayObject }\r\n * @param myAttDef\r\n * @param aAttDef\r\n * @constructor\r\n */\n\n\nvar ObjAttDef = /*#__PURE__*/function (_ObjResource4) {\n  _inherits(ObjAttDef, _ObjResource4);\n\n  var _super4 = _createSuper(ObjAttDef);\n\n  function ObjAttDef(aAttDef, aEntityDef) {\n    var _this4;\n\n    _classCallCheck(this, ObjAttDef);\n\n    _this4 = _super4.call(this, aAttDef);\n    _this4.entityDef = aEntityDef;\n    _this4.fActDefs = {};\n    _this4.def = $($.parseXML(aAttDef.defxmlstr)).find(\"ATTRIBUTE\");\n\n    for (var _i4 in aAttDef.actDefs) {\n      _this4.fActDefs[_i4.trim().toUpperCase()] = new ObjActDef(aAttDef.actDefs[_i4]);\n    }\n\n    return _this4;\n  }\n\n  _createClass(ObjAttDef, [{\n    key: \"actDef\",\n    value: function actDef(asActCode) {\n      return this.fActDefs[asActCode.trim().toUpperCase()];\n    }\n  }]);\n\n  return ObjAttDef;\n}(ObjResource);\n/**\r\n * 活动定义\r\n * @param myActDef\r\n * @param aActDef\r\n * @constructor\r\n */\n\n\nvar ObjActDef = /*#__PURE__*/function (_ObjResource5) {\n  _inherits(ObjActDef, _ObjResource5);\n\n  var _super5 = _createSuper(ObjActDef);\n\n  function ObjActDef(aActDef) {\n    var _this5;\n\n    _classCallCheck(this, ObjActDef);\n\n    _this5 = _super5.call(this, aActDef);\n\n    if (aActDef.defxmlstr) {\n      _this5.def = $($.parseXML(aActDef.defxmlstr));\n    }\n\n    return _this5;\n  }\n\n  return ObjActDef;\n}(ObjResource);\n/**\r\n * 系统或者用户参数\r\n * @param aObj\r\n * @constructor\r\n */\n\n\nvar ObjRoomParam = function ObjRoomParam(houseuserid, paramvalueobj) {\n  _classCallCheck(this, ObjRoomParam);\n\n  this.houseuserid = houseuserid;\n  this.params = paramvalueobj || {};\n};\n/**\r\n * 附件和图片对象存储的内容\r\n * //对象key 构成 roomid-domainid-subtypeid-objid-filename\r\n * 如果是图形存在缩略图，缩略图的key为 thb-key\r\n */\n\n\nvar ObjStore = /*#__PURE__*/function () {\n  function ObjStore(data) {\n    _classCallCheck(this, ObjStore);\n\n    if (data) {\n      this.id = data.id; //对象的id\n\n      this.key = data.key; //对象的key\n\n      this.url = data.url; //生成的url，用于生成客户端使用的URL。\n\n      this.thb = data.thb; //如果有缩略图  1 否则 0\n    }\n  }\n\n  _createClass(ObjStore, [{\n    key: \"hasThmb\",\n    value: function hasThmb() {\n      return this.thb === '1';\n    }\n    /**\r\n     * 返回文件名称\r\n     */\n\n  }, {\n    key: \"fileName\",\n    value: function fileName() {\n      if (this.key) {\n        var ls = this.key.split(\"-\");\n        return ls[ls.length - 1];\n      }\n    }\n  }]);\n\n  return ObjStore;\n}();\n/**\r\n * 对象存储内容列表,一般用来序列化后保存在字段中记录附件的对象存储信息\r\n */\n\n\nvar ObjStoreList = /*#__PURE__*/function () {\n  function ObjStoreList(asContent) {\n    _classCallCheck(this, ObjStoreList);\n\n    this.contents = [];\n  }\n  /**\r\n   * 根据对象的id获得对象\r\n   * @param aObjId\r\n   * @return {ObjStore || undefined}\r\n   */\n\n\n  _createClass(ObjStoreList, [{\n    key: \"objById\",\n    value: function objById(aObjId) {\n      var _iterator6 = _createForOfIteratorHelper(this.contents),\n          _step6;\n\n      try {\n        for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n          var lObj = _step6.value;\n          if (lObj.id === aObjId) return lObj;\n        }\n      } catch (err) {\n        _iterator6.e(err);\n      } finally {\n        _iterator6.f();\n      }\n    }\n    /**\r\n     * 添加对象\r\n     * @param aObj {ObjStore}\r\n     */\n\n  }, {\n    key: \"addObj\",\n    value: function addObj(aObj) {\n      this.contents.push(aObj);\n    }\n    /**\r\n     * 移除对象\r\n     * @param aObj\r\n     */\n\n  }, {\n    key: \"removeObj\",\n    value: function removeObj(aObj) {\n      var lIndex = this.contents.indexOf(aObj);\n      if (lIndex < 0) throw new Error(\"对象不存在\");\n      this.contents.splice(lIndex, 1);\n    }\n    /**\r\n     *  根据id移除对象\r\n     * @param aObjId\r\n     */\n\n  }, {\n    key: \"removeId\",\n    value: function removeId(aObjId) {\n      this.removeObj(this.objById(aObjId));\n    }\n    /**\r\n     * 获得文件名称的数组列表\r\n     * @return {Array<String>}\r\n     */\n\n  }, {\n    key: \"fileNames\",\n    value: function fileNames() {\n      var lsResult = [];\n\n      var _iterator7 = _createForOfIteratorHelper(this.contents),\n          _step7;\n\n      try {\n        for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n          var lObj = _step7.value;\n          var lsFileName = lObj.fileName();\n\n          if (lsFileName) {\n            lsResult.push(lsFileName);\n          }\n        }\n      } catch (err) {\n        _iterator7.e(err);\n      } finally {\n        _iterator7.f();\n      }\n\n      return lsResult;\n    }\n    /**\r\n     * 转化为JSON字符串\r\n     * @return {string}\r\n     */\n\n  }, {\n    key: \"toJson\",\n    value: function toJson() {\n      return JSON.stringify(this.contents);\n    }\n    /**\r\n     * 从JSON字符串恢复\r\n     * @param asContent {String} JSON字符串\r\n     */\n\n  }, {\n    key: \"fromJSON\",\n    value: function fromJSON(asContent) {\n      this.contents = [];\n\n      if (asContent) {\n        var lcs = JSON.parse(asContent);\n\n        var _iterator8 = _createForOfIteratorHelper(lcs),\n            _step8;\n\n        try {\n          for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n            var lc = _step8.value;\n            this.contents.push(new ObjStore(lc));\n          }\n        } catch (err) {\n          _iterator8.e(err);\n        } finally {\n          _iterator8.f();\n        }\n      }\n    }\n  }]);\n\n  return ObjStoreList;\n}();\n\nvar ObjLoginInfo = function ObjLoginInfo(account, user) {\n  _classCallCheck(this, ObjLoginInfo);\n\n  this.account = account;\n  this.user = user;\n};\n/**\r\n * session 的使用和保存规则，\r\n 1） session 采用urlsession 可以同时登录多个账号。 可以同时保留多个session\r\n 2） 保留登录信息只保存最后登录的账号信息\r\n 3） session定期续命2小时，如果没有本地清除\r\n {\r\n     uuid :ObjHouseSession,\r\n     default:uuid; //最后登录信息\r\n }\r\n */\n\n\nvar HY_SESSION_STORE = \"HY_SESSION_STORE\";\n\nvar ASSesssionStore = /*#__PURE__*/function () {\n  function ASSesssionStore() {\n    _classCallCheck(this, ASSesssionStore);\n  }\n  /**\r\n   * 保存服务器端原始登录信息\r\n   * 保存session,删除同houseid和userid的session\r\n     */\n\n\n  _createClass(ASSesssionStore, [{\n    key: \"saveSession\",\n    value: function saveSession(aSessionObj, akeepInfo) {\n      var lObj = this.restore();\n      aSessionObj.uuid = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].uuid();\n      lObj[aSessionObj.uuid] = aSessionObj;\n      lObj[\"default\"] = fSystemSetting.singleSession || akeepInfo ? aSessionObj.uuid : \"\";\n      this.save(lObj);\n    } //保存已经更新的信息，延长UUID的寿命 同时清除过期的Session\n\n  }, {\n    key: \"updateSession\",\n    value: function updateSession(aSessionObj) {\n      // console.log(\"update Session:\");\n      var lObj = this.restore();\n      var ls = lObj[aSessionObj.uuid];\n\n      if (ls) {\n        // ls.usersessionid = aSessionObj.usersessionid;\n        ls.endtime = aSessionObj.endtime;\n        ls.updatetime = aSessionObj.updatetime;\n        this.save(lObj);\n      } else {\n        throw new Error(\"不存在Session无法更新\");\n      }\n    }\n    /**\r\n     * 注销登录\r\n     * @param aSession\r\n     */\n\n  }, {\n    key: \"removeSession\",\n    value: function removeSession(aSession) {\n      var lObj = this.restore();\n      delete lObj[aSession.uuid];\n      this.save(lObj);\n    }\n    /**\r\n     * 恢复session\r\n     * @param asUUID {String} 获得的session的id，如果没有提供参数返回默认的Session\r\n     */\n\n  }, {\n    key: \"getSession\",\n    value: function getSession(asUUID) {\n      var lObj = this.restore();\n\n      if (fSystemSetting.singleSession || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(asUUID)) {\n        var lsDefault = lObj[\"default\"];\n\n        if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(lsDefault)) {\n          return null;\n        }\n\n        return lObj[lsDefault];\n      } else {\n        return lObj[asUUID];\n      }\n    }\n  }, {\n    key: \"restore\",\n    value: function restore() {\n      var lsContent = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].localStore(null, HY_SESSION_STORE);\n      if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(lsContent)) return {};\n      return JSON.parse(lsContent);\n    }\n  }, {\n    key: \"save\",\n    value: function save(aObj) {\n      this.clear(aObj);\n      _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].localStore(null, HY_SESSION_STORE, JSON.stringify(aObj));\n    }\n  }, {\n    key: \"clear\",\n    value: function clear(aObj) {\n      //更新\n      var lsIds = [];\n\n      for (var lsid in aObj) {\n        if (aObj.hasOwnProperty(lsid)) {\n          if (ObjHouseSession.isExpired(aObj[lsid])) {\n            lsIds.push(lsid);\n          }\n        }\n      }\n\n      for (var _i5 = 0, _lsIds = lsIds; _i5 < _lsIds.length; _i5++) {\n        var _lsid = _lsIds[_i5];\n        delete aObj[_lsid];\n      }\n    }\n  }]);\n\n  return ASSesssionStore;\n}();\n\nvar SVR_COMMAND = 'command';\n/***\r\n * room中的主题服务\r\n * @param myRoomService :Object\r\n * @param aPath :ASDomainPath or String\r\n * @constructor\r\n */\n\nvar ASRoomService = /*#__PURE__*/function () {\n  /**\r\n   * @param aRoom {ASRoom}\r\n   * @param aPath {DomainPath | string}\r\n   */\n  function ASRoomService(aRoom, aPath) {\n    _classCallCheck(this, ASRoomService);\n\n    this.path = typeof aPath == \"string\" ? new DomainPath(aPath) : aPath;\n    this.fRoomSvr = aRoom;\n  } //获得主题域的参数定义\n\n  /**\r\n   * 获得主题域设定的的参数值\r\n   * @return {Array<{code :,value:}>}\r\n   */\n\n\n  _createClass(ASRoomService, [{\n    key: \"getDomainSetting\",\n    value: function getDomainSetting() {\n      var lValue = this.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opSettingGet, \"\", true);\n      return JSON.parse(lValue);\n    }\n    /**\r\n     * 服务调用，如果同步调用直接返回，否则返回promise\r\n     * @param asOperation   {String} 动词\r\n     * @param objParam {String |Object} 参数对象\r\n     * @param synch {boolean} 是否同步调用，同步调用返回结果，异步调用返回Promise\r\n     * @param asTopic {string}消息主题 打印或者设备调用的消息队列\r\n     * @param noProgress{boolean} 必须按时进度窗口\r\n     * @return {JQueryPromise}\r\n     *\r\n     */\n\n  }, {\n    key: \"serviceCall\",\n    value: function serviceCall(asOperation) {\n      var objParam = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n      var synch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n      var asTopic = arguments.length > 3 ? arguments[3] : undefined;\n      var noProgress = arguments.length > 4 ? arguments[4] : undefined;\n      // let lParam = objParam ||\"\";\n      return this.fRoomSvr.roomCall(this.path, asOperation, objParam, synch, asTopic, noProgress);\n    }\n  }, {\n    key: \"createInvokeInfo\",\n    value: function createInvokeInfo(asOperation) {\n      var lInfo = new ObjInvokeInfo(this.fRoomSvr.fRoomInfo, this.path, asOperation, this.fRoomSvr.houseSvr.session);\n      return lInfo;\n    } // /**\n    //  * 创建串行任务对象\n    //  * @param asTaskName\n    //  */\n\n  }, {\n    key: \"createTask\",\n    value: function createTask(asTaskName) {\n      return this.fRoomSvr.houseSvr.task.serialTasks(asTaskName);\n    }\n  }]);\n\n  return ASRoomService;\n}(); //\n\n/**\r\n *  Room 获取用户定义参数\r\n \"{\"usercode\":\"ADMIN\",\"params\":{\"DEFAULTROOM\":null}}\"\r\n * @constructor\r\n */\n\n\nvar ASParamSvr = /*#__PURE__*/function (_ASRoomService) {\n  _inherits(ASParamSvr, _ASRoomService);\n\n  var _super6 = _createSuper(ASParamSvr);\n\n  function ASParamSvr(aRoom) {\n    _classCallCheck(this, ASParamSvr);\n\n    return _super6.call(this, aRoom, _base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_SYSTEM_ROOMPARAM);\n  }\n  /**\r\n   * 获得room的参数\r\n   * @param  asParamCode {String} 参数名称\r\n   * @param  [synch]  {boolean} -是否同步\r\n   * @param  [roomparam]  {boolean}// 是否room参数而非用户参数\r\n   * @return {String}\r\n   */\n\n\n  _createClass(ASParamSvr, [{\n    key: \"get\",\n    value: function get(asParamCode, synch, roomparam) {\n      var lParam = new ObjRoomParam(roomparam ? null : this.fRoomSvr.houseSvr.session.userid);\n      lParam.params[asParamCode] = \"\";\n      return this.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opGet, lParam, synch);\n    }\n  }, {\n    key: \"getValue\",\n    value: function getValue(asParamCode, roomparam) {\n      var lObj = this.get(asParamCode, true, roomparam);\n\n      if (lObj) {\n        lObj = JSON.parse(lObj);\n        return lObj.params[asParamCode];\n      }\n\n      return undefined;\n    } // setValue(asParamCode,asValue,roomparam) {\n    //     this.set(asParamCode, asValue, true, roomparam);\n    // }\n\n    /**\r\n     *  设置参数\r\n     * @param asParamCode {String} 参数没名称\r\n     * @param asValue {String} 参数值\r\n     * @param synch {boolean} 是否同步\r\n     * @param roomparam {boolean}  是否room参数而非用户参数\r\n     * @return {*}\r\n     */\n\n  }, {\n    key: \"set\",\n    value: function set(asParamCode, asValue, synch, roomparam) {\n      var lParam = new ObjRoomParam(roomparam ? null : this.fRoomSvr.houseSvr.session.userid);\n      lParam.params[asParamCode] = asValue;\n      return this.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opSet, lParam, synch);\n    }\n  }]);\n\n  return ASParamSvr;\n}(ASRoomService);\n/**\r\n * 同步获取当前服务器时间\r\n * @constructor\r\n */\n\n\nvar ASTimerSvr = /*#__PURE__*/function (_ASRoomService2) {\n  _inherits(ASTimerSvr, _ASRoomService2);\n\n  var _super7 = _createSuper(ASTimerSvr);\n\n  function ASTimerSvr(aRoom) {\n    _classCallCheck(this, ASTimerSvr);\n\n    return _super7.call(this, aRoom, _base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_SYSTEM_TIME);\n  }\n\n  _createClass(ASTimerSvr, [{\n    key: \"get\",\n    value: function get() {\n      var ldt = this.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opGet, null, true);\n      return _base__WEBPACK_IMPORTED_MODULE_2__[\"DataTypes\"].typeDatetime.parse(ldt);\n    }\n  }]);\n\n  return ASTimerSvr;\n}(ASRoomService);\n/**\r\n * 元数据管理服务\r\n * {id,code,name,typecurver,attDefs:{\"editds\":{id,code,name,def,actDef :{\"default\":{id,code,name,def}}},}\r\n * @constructor\r\n */\n\n\nvar ASMetaSvr = /*#__PURE__*/function (_ASRoomService3) {\n  _inherits(ASMetaSvr, _ASRoomService3);\n\n  var _super8 = _createSuper(ASMetaSvr);\n\n  function ASMetaSvr(aroom) {\n    var _this6;\n\n    _classCallCheck(this, ASMetaSvr);\n\n    _this6 = _super8.call(this, aroom, _base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_SYSTEM_METAMNGR);\n    _this6.fEntitys = {};\n    _this6.fPendingTasks = {}; //[ENTITYCODE] =Task\n\n    return _this6;\n  }\n  /**\r\n   * 获得包含指定属性代码的实体代码的数组\r\n   * @param asAttCodes  {Array<String>};\r\n   * @return //{code :name,code:name} 符合条件的实体代码\r\n   */\n\n\n  _createClass(ASMetaSvr, [{\n    key: \"asynGetEntityCodeHasAttributeCode\",\n    value: function asynGetEntityCodeHasAttributeCode(asAttCodes) {\n      var _this7 = this;\n\n      if (!asAttCodes) asAttCodes = [];\n      var lTask = this.createTask(\"getEntitys\");\n      var lData;\n      lTask.add(function () {\n        return _this7.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opInfo, asAttCodes).done(function (data) {\n          return lData = data;\n        });\n      });\n      lTask.add(function () {\n        lTask.resolve(JSON.parse(lData));\n      });\n      lTask.execute();\n      return lTask.promise();\n    }\n    /**\r\n     *同步方式获得实体属性定义\r\n     * @param aPath {DomainPath}\r\n     * @return { ObjAttDef}\r\n     */\n\n  }, {\n    key: \"getAttDef\",\n    value: function getAttDef(aPath) {\n      var lAttDef;\n\n      if (typeof aPath == \"string\") {\n        aPath = new DomainPath(aPath);\n      }\n\n      var lEntityDef = this.fEntitys[aPath.ettcode];\n\n      if (lEntityDef) {\n        lAttDef = lEntityDef.attDef(aPath.attcode);\n        return lAttDef;\n      }\n\n      var data = this.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opGet, aPath.ettcode, true);\n      var ldef = JSON.parse(data);\n      lEntityDef = new ObjEntityDef(ldef[aPath.ettcode]);\n      this.fEntitys[aPath.ettcode] = lEntityDef;\n      lEntityDef = this.fEntitys[aPath.ettcode];\n      lAttDef = lEntityDef.attDef(aPath.attcode);\n      return lAttDef;\n    }\n  }]);\n\n  return ASMetaSvr;\n}(ASRoomService);\n/***------------------------------------------------------------------------------------------\r\n *  类型： 数据集服务\r\n *  属性：\r\n *  方法：\r\n *  事件：\r\n *  ------------------------------------------------------------------------------------------ */\n\n/**\r\n * 通过Session解析变量\r\n * @constructor\r\n */\n\n\nvar ExpParser = /*#__PURE__*/function () {\n  function ExpParser(aRoom) {\n    _classCallCheck(this, ExpParser);\n\n    this.fRoomSvr = aRoom;\n  } //expression 调用来行程替换的表达式\n\n\n  _createClass(ExpParser, [{\n    key: \"parseToken\",\n    value: function parseToken(asToken, asRestExp) {\n      if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, 'userproperty')) {\n        return 'userProp';\n      } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, 'userName') || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, '_userName')) {\n        if (asRestExp[0] === \"(\") return 'userName';else return 'userName()';\n      } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, 'userCode') || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, '_userCode')) {\n        if (asRestExp[0] === \"(\") return 'userCode';else return 'userCode()';\n      } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, 'userid') || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, '_userid')) {\n        if (asRestExp[0] === \"(\") return 'userId';else return 'userId()';\n      } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, 'hostDate') || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, '_hostDate')) {\n        if (asRestExp[0] === \"(\") return 'hostDate';else return 'hostDate()';\n      } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, 'hostTime') || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, '_HOSTTIME')) {\n        if (asRestExp[0] === \"(\") return 'hostTime';else return 'hostTime()';\n      } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, 'DBSQLValue')) {\n        return 'dbSQLValue';\n      } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, 'userhouseid')) {\n        return \"houseid()\";\n      } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, 'useremployeeid')) {\n        return \"useremployeeid()\";\n      } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, 'useremployeename')) {\n        return \"useremployeename()\";\n      } else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asToken, 'userroomid')) {\n        return \"userroomid()\";\n      } else return '';\n    }\n  }, {\n    key: \"userhouseid\",\n    value: function userhouseid() {\n      return this.fRoomSvr.houseSvr.info().id;\n    }\n    /**\r\n     * 执行任意sql语句\r\n     */\n\n  }, {\n    key: \"dbSQLValue\",\n    value: function dbSQLValue(asSql) {\n      // let lValue = (new SysSvr(null, et)).dbSQLValue(asSql);\n      // return lValue;\n      return null;\n    } //获得用户属性数据集的内容\n\n  }, {\n    key: \"userProp\",\n    value: function userProp(asPropName) {\n      var lrs = this.fRoomSvr.roomSession();\n\n      if (lrs) {\n        return lrs.userpropties(asPropName);\n      }\n    }\n  }, {\n    key: \"useremployeeid\",\n    value: function useremployeeid() {\n      var lrs = this.fRoomSvr.roomSession();\n\n      if (lrs) {\n        return lrs.employeeid;\n      }\n    }\n  }, {\n    key: \"useremployeename\",\n    value: function useremployeename() {\n      var lrs = this.fRoomSvr.roomSession();\n\n      if (lrs) {\n        return lrs.employeename;\n      }\n    }\n  }, {\n    key: \"roomid\",\n    value: function roomid() {\n      var lrs = this.fRoomSvr.roomSession();\n\n      if (lrs) {\n        return lrs.roomid;\n      }\n    } //服务器日期\n\n  }, {\n    key: \"hostDate\",\n    value: function hostDate() {\n      var ldt = this.fRoomSvr.timerSvr.get();\n      ldt = new Date(ldt);\n      return new Date(ldt.getFullYear(), ldt.getMonth(), ldt.getDate());\n    } //服务器时间\n\n  }, {\n    key: \"hostTime\",\n    value: function hostTime() {\n      var ldt = this.fRoomSvr.timerSvr.get();\n      ldt = new Date(ldt);\n      return ldt;\n    }\n  }, {\n    key: \"userId\",\n    value: function userId() {\n      return this.fRoomSvr.houseSvr.session.userid;\n    }\n  }, {\n    key: \"userCode\",\n    value: function userCode() {\n      return this.fRoomSvr.houseSvr.session.usercode;\n    }\n  }, {\n    key: \"userName\",\n    value: function userName() {\n      return this.fRoomSvr.houseSvr.session.username;\n    }\n  }]);\n\n  return ExpParser;\n}();\n/**\r\n * 权限管理服务\r\n */\n\n\nvar ASHouseRight = /*#__PURE__*/function () {\n  function ASHouseRight(aHouseSvr) {\n    _classCallCheck(this, ASHouseRight);\n\n    this.fHouse = aHouseSvr;\n    this.fRoomService = aHouseSvr.gate().createRoomSvr(new DomainPath(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_RIGHT_LOGIN));\n  }\n\n  _createClass(ASHouseRight, [{\n    key: \"login\",\n    value: function login(aObjLoginParam) {\n      return this.fRoomService.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opLogin, aObjLoginParam);\n    }\n  }, {\n    key: \"logOff\",\n    value: function logOff() {\n      return this.fRoomService.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opLogOff);\n    }\n  }, {\n    key: \"getSession\",\n    value: function getSession(asUserSessionId) {\n      return this.fRoomService.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opInfo, asUserSessionId);\n    }\n    /**\r\n     * 服务器端更新Session 续命每小时更新一次，每个新一次延长 3个小时\r\n     */\n\n  }, {\n    key: \"updateSession\",\n    value: function updateSession(asSessionID, sync) {\n      return this.fRoomService.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opSet, asSessionID, sync);\n    }\n  }]);\n\n  return ASHouseRight;\n}(); //登录\n\n/**\r\n * 创建的时候应该已经登，如果设定了houseinfo 恢复的时候必须遵循houeinfo的账户\r\n * House对象用于实现与服务器端的业务逻辑封装\r\n * @param asHouseCode :String\r\n * @constructor\r\n */\n\n\nvar ASHouse = /*#__PURE__*/function () {\n  function ASHouse() {\n    _classCallCheck(this, ASHouse);\n\n    _taskevent_js__WEBPACK_IMPORTED_MODULE_1__[\"TaskEvents\"].PropTaskEventOwner(this);\n    this.fHouseInfo = null; //room信息\n\n    /**@type {Array<ASRoom>}*/\n\n    this.fRooms = [];\n    /**@type {ObjHouseSession}*/\n\n    this.fSession = null; // 登录的session\n\n    this.fUsers = []; //{code,name}\n\n    this.fWorkgroups = []; //{code,name}\n  }\n  /**\r\n   *  登录后确定的可以访问的room\r\n   * @return {Array<ASRoom>}\r\n   */\n\n\n  _createClass(ASHouse, [{\n    key: \"rooms\",\n    value: function rooms() {\n      return this.fRooms;\n    }\n    /**\r\n     *  根据代码获得room\r\n     * @param asCode :String room的代码\r\n     * @return {ASRoom}\r\n     */\n\n  }, {\n    key: \"roomByCode\",\n    value: function roomByCode(asCode) {\n      var _iterator9 = _createForOfIteratorHelper(this.fRooms),\n          _step9;\n\n      try {\n        for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n          var lr = _step9.value;\n          if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(asCode, lr.info().code)) return lr;\n        }\n      } catch (err) {\n        _iterator9.e(err);\n      } finally {\n        _iterator9.f();\n      }\n    }\n  }, {\n    key: \"roomById\",\n    value: function roomById(aId) {\n      var _iterator10 = _createForOfIteratorHelper(this.fRooms),\n          _step10;\n\n      try {\n        for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n          var lr = _step10.value;\n          if (lr.info().id === aId) return lr;\n        }\n      } catch (err) {\n        _iterator10.e(err);\n      } finally {\n        _iterator10.f();\n      }\n    }\n  }, {\n    key: \"restoreSession\",\n    value: function restoreSession(asUUID) {\n      var lStore = new ASSesssionStore();\n      this.fSession = null;\n      var lSession = lStore.getSession(asUUID);\n\n      if (lSession) {\n        if (!this.fHouseInfo) {\n          this.info(hy().synHouseInfo(lSession.housecode));\n        } else {\n          if (this.fHouseInfo.houseid !== lSession.houseid) {\n            throw new Error(\"错误session账号\");\n          }\n        }\n\n        var lSvr = new ASHouseRight(this);\n        var ls = lSvr.updateSession(lSession.usersessionid, true); //更新如果Session可用\n\n        if (ls) {\n          //session没有失效\n          this.session = lSession;\n          this.session.update(ls); //更新session时间\n        }\n      } else {\n        return null;\n      }\n\n      return this.session;\n    }\n    /**\r\n     * 异步更新Session的结束时间。 一般在定时任务中调用\r\n     */\n\n  }, {\n    key: \"asynUpdateSession\",\n    value: function asynUpdateSession() {\n      var _this8 = this;\n\n      if (!this.session) {\n        return;\n      }\n\n      if (this.session.endtime.getTime() - new Date().getTime() > 3660000) {\n        // console.log(\"无需更新 Session\");\n        return; //无需更新\n      }\n\n      var lData;\n      var lTask = this.task.serialTasks(\"updateSession\");\n      lTask.add(function () {\n        var lSvr = new ASHouseRight(_this8);\n        return lSvr.updateSession(_this8.fSession.sessionid).done(function (data) {\n          return lData = data;\n        });\n      });\n      lTask.add(function () {\n        if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(lData)) {\n          return;\n        } // console.log(lData);\n\n\n        _this8.session.update(lData); //更新时间\n\n      });\n      lTask.execute();\n      return lTask.promise();\n    }\n    /**\r\n     * 获得House的信息\r\n     * @param asHouseCode 如果没有指定采用当前的代码\r\n     * @return {*|jQuery|{}}\r\n     */\n\n  }, {\n    key: \"asynUpdateHouseInfo\",\n    value: function asynUpdateHouseInfo(asHouseCode) {\n      var _this9 = this;\n\n      var lsHouseCode = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(asHouseCode) ? this.fHouseInfo.code : asHouseCode;\n      return hy().asynHouseInfo({\n        housecode: lsHouseCode\n      }).done(function (aHouseInfo) {\n        return _this9.info(aHouseInfo);\n      });\n    }\n  }, {\n    key: \"updateHouseInfo\",\n    value: function updateHouseInfo(asHouseCode) {\n      var lsHouseCode = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(asHouseCode) ? this.fHouseInfo.code : asHouseCode;\n      var lsInfo = hy().synHouseInfo(lsHouseCode);\n      this.info(lsInfo);\n    }\n    /**\r\n     * 更新所有room的角色信息,更新后roomInfo.roles\r\n     * 里面包含角色信息的数据组ObjResource对象的数组。\r\n     * @return {JQueryPromise}\r\n     */\n\n  }, {\n    key: \"asynUpdateRoles\",\n    value: function asynUpdateRoles() {\n      var lMySelf = this;\n      var lTasks = this.task.parallelTasks(\"updateRoles\");\n\n      var _iterator11 = _createForOfIteratorHelper(this.fHouseInfo.rooms),\n          _step11;\n\n      try {\n        for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n          var lr = _step11.value;\n          if (lr.systemid < 3 || _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(lr.code, \"gate\") || lr.systemid == 6) //管理room\n            continue;\n          lTasks.add(getRoles(lr));\n        }\n      } catch (err) {\n        _iterator11.e(err);\n      } finally {\n        _iterator11.f();\n      }\n\n      return lTasks.promise();\n\n      function getRoles(aRoomInfo) {\n        return new ASRoom(lMySelf, aRoomInfo).createRoomSvr(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].SERVICE_SYSROLE_ROLEMNGR).serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opInfo).done(function (data) {\n          return aRoomInfo.roles = JSON.parse(data);\n        });\n      }\n    }\n    /**\r\n     * gate room\r\n     * @return {ASRoom}\r\n     */\n\n  }, {\n    key: \"gate\",\n    value: function gate() {\n      var lr = this.roomByCode(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_ROOM_GATE);\n\n      if (!lr) {\n        var lInfo = this.fHouseInfo.roomInfoByCode(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_ROOM_GATE);\n        if (!lInfo) throw new Error(\"无法获得Gate的信息\");\n        lr = new ASRoom(this, lInfo);\n        this.fRooms.push(lr);\n      }\n\n      return lr;\n    }\n  }, {\n    key: \"getOrCreateRoom\",\n    value: function getOrCreateRoom(roomid) {\n      var lr = this.roomByCode(roomid);\n\n      if (!lr) {\n        var lInfo = this.fHouseInfo.roomInfoById(roomid);\n        if (!lInfo) throw new Error(\"无法获得room的信息\");\n        lr = new ASRoom(this, lInfo);\n        this.fRooms.push(lr);\n      }\n\n      return lr;\n    }\n    /**\r\n     * 登录系统,登录完成后设置Session变量\r\n     * @param asHouseCode\r\n     * @param aObjLoginParam : ObjLoginParam 包含用户名称，密码和客户端信息\r\n     * @param aKeepLoginInfo {boolean} 是否保存登录信息\r\n     * @return\r\n     */\n\n  }, {\n    key: \"asynLogin\",\n    value: function asynLogin(asHouseCode, aObjLoginParam, aKeepLoginInfo) {\n      var _this10 = this;\n\n      var lTask = new this.task.serialTasks(\"login\");\n      this.fSession = null;\n      this.fHouseInfo = null;\n      var lData;\n      lTask.add(function () {\n        return _this10.asynUpdateHouseInfo(asHouseCode);\n      });\n      lTask.add(function () {\n        var lSvr = new ASHouseRight(_this10);\n        return lSvr.login(aObjLoginParam).done(function (data) {\n          return lData = data;\n        });\n      });\n      lTask.add(function () {\n        var lObj = JSON.parse(lData);\n        lObj.housecode = _this10.fHouseInfo.code; //增加账号信息\n\n        var lStore = new ASSesssionStore();\n\n        if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(lObj.apionly, \"1\")) {\n          //仅用于api访问，不能登录\n          throw new Error(\"该账号不能登录系统\");\n        }\n\n        lStore.saveSession(lObj, aKeepLoginInfo);\n        _this10.session = lObj;\n      });\n      lTask.execute();\n      return lTask.promise();\n    }\n    /**\r\n     *  注销登录\r\n     */\n\n  }, {\n    key: \"asynLogOff\",\n    value: function asynLogOff() {\n      if (this.fSession) {\n        var lStore = new ASSesssionStore();\n        lStore.removeSession(this.fSession);\n        var lSvr = new ASHouseRight(this);\n        var lp = lSvr.logOff();\n        this.session = null;\n        return lp;\n      }\n    }\n    /**\r\n     *   House的完整信息\r\n     * @return {ObjHouseInfo}\r\n     */\n\n  }, {\n    key: \"info\",\n    value: function info(aHouseInfo) {\n      if (arguments.length > 0) {\n        this.fHouseInfo = aHouseInfo;\n        this.fRooms = [];\n\n        var _iterator12 = _createForOfIteratorHelper(this.fHouseInfo.rooms),\n            _step12;\n\n        try {\n          for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n            var lInfo = _step12.value;\n            var lRoom = new ASRoom(this, lInfo);\n            this.fRooms.push(lRoom);\n          }\n        } catch (err) {\n          _iterator12.e(err);\n        } finally {\n          _iterator12.f();\n        }\n      }\n\n      return this.fHouseInfo;\n    }\n  }, {\n    key: \"asynUpdateWorkGroups\",\n    value: function asynUpdateWorkGroups() {\n      var _this11 = this;\n\n      this.fWorkgroups.length = 0; //{code,name}\n\n      var lTask = this.task.serialTasks(\"getEntitys\");\n      var lData;\n      lTask.add(function () {\n        var lSvr = _this11.gate().createRoomSvr(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_YHGL_USERMNGR + \":WORKGROUP\");\n\n        return lSvr.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opGet).done(function (data) {\n          return lData = data;\n        });\n      });\n      lTask.add(function () {\n        var lResult = JSON.parse(lData);\n\n        for (var _i6 in lResult) {\n          _this11.fWorkgroups.push({\n            code: String(_i6),\n            name: lResult[_i6]\n          });\n        }\n      });\n      lTask.execute();\n      return lTask.promise();\n    }\n    /**\r\n     * 获得用户可用的设备， 返回 [ObjResource] 数据类型，如果没有返回 []\r\n     * @param asType 设备类型{DeviceType} 类型\r\n     */\n\n  }, {\n    key: \"getUserDevices\",\n    value: function getUserDevices(asType) {\n      var lSvr = this.gate().createRoomSvr(new DomainPath(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_RIGHT_LOGIN + \":DEVICE\"));\n      var lData = lSvr.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opInfo, asType, true);\n      return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(lData) ? [] : JSON.parse(lData);\n    }\n  }, {\n    key: \"asynUpdateUsers\",\n    value: function asynUpdateUsers() {\n      var _this12 = this;\n\n      this.fUsers.length = 0; //{code,name}\n\n      var lTask = this.task.serialTasks(\"getEntitys\");\n      var lData;\n      lTask.add(function () {\n        var lSvr = _this12.gate().createRoomSvr(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_YHGL_USERMNGR + \":USER\");\n\n        return lSvr.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opGet).done(function (data) {\n          return lData = data;\n        });\n      });\n      lTask.add(function () {\n        var lResult = JSON.parse(lData);\n\n        for (var _i7 in lResult) {\n          _this12.fUsers.push({\n            code: String(_i7),\n            name: lResult[_i7]\n          });\n        }\n      });\n      lTask.execute();\n      return lTask.promise();\n    } // /**\n    //  * 发送远程设别执行命令\n    //  * @param asdevicecode 设别代码\n    //  * @param op 操作类型 {EnumOperaton}\n    //  * @param asInvokeData {ObjInvokeData} 设备执行的命令\n    //  * @return {JQueryPromise} //\n    //  */\n    // asynDeviceCall(asdevicecode,op,asInvokeData) {\n    //     let lsData =  (typeof asInvokeData ==='string') ? asInvokeData : JSON.stringify(asInvokeData);\n    //     let lReq = new ObjDevRequest(this.session.sessionid,op,lsData);\n    //     let lReqs =JSON.stringify( [{code:asdevicecode,value:JSON.stringify([lReq])}]);\n    //     let lp = this.gate().createRoomSvr(SysConst.HY_SERVICE_SYSTEM_DEVICE).serviceCall(EnumOperation.opGet,lReqs);\n    //     lp.done(()=>{\n    //         this.fetchDeviceResult(lp,lReq,asdevicecode);\n    //         // console.log(\"fetchResult\");\n    //     })\n    //     return lp;\n    // }\n    //\n    // /**\n    //  * 获得设备处理结果\n    //  * @param aPromise  处理的Promise\n    //  * @param lReq  请求对象 {ObjDevRequest}\n    //  * @param asdevicecode 设备代码代码\n    //  */\n    // fetchDeviceResult(aPromise,lReq,asdevicecode) {\n    //     class DeviceCall {\n    //         constructor(ap,arq,ascode) {\n    //             this.promise = ap;\n    //             this.request = arq;\n    //             this.code = ascode;\n    //             this.begintime = new Date();\n    //         }\n    //         isOld() {\n    //             return new Date().getTime() - this.begintime.getTime()> 300000; //5分钟没有回应\n    //         }\n    //     }\n    //     //添加获取结果任务，同时生成定时任务\n    //     let lMySelf = this;\n    //     if(!this.devicesResults) {\n    //         this.devicesResults =[];\n    //         this.deviceInterval = null;\n    //     }\n    //     this.devicesResults.push(new DeviceCall(aPromise,lReq,asdevicecode));\n    //     if(this.devicesResults.length>0 && !this.deviceInterval) {\n    //         this.deviceInterval = setInterval(()=>{\n    //             lMySelf.asynDevicelResult();\n    //         },3000);\n    //     }\n    // }\n    // asynDevicelResult() {\n    //     let lTask = this.task.serialTasks(\"getDeviceResults\") ;\n    //     let lData,lOlds=[];\n    //     lTask.add(()=>{\n    //         let lReqs =[];\n    //         for(let i=0;i<this.devicesResults.length;i++) {\n    //             let ldc  = this.devicesResults[i];\n    //             if(ldc.isOld()) {\n    //                 lOlds.push(i);\n    //             }else {\n    //                 let lReq = new ObjDevRequest(this.session.sessionid,EnumOperation.opGet,\"\");\n    //                 lReqs.push({code:ldc.code,value:JSON.stringify([lReq])});\n    //             }\n    //         }\n    //         for(let ld of lOlds) {\n    //              this.devicesResults.splice(ld,1);\n    //         }\n    //         if(this.devicesResults.length ==0 || lReqs.length==0) {\n    //             clearInterval(this.deviceInterval);\n    //             this.deviceInterval = null;\n    //             return;\n    //         }\n    //         return this.gate().createRoomSvr(SysConst.HY_SERVICE_SYSTEM_DEVICE).serviceCall(EnumOperation.opGet,JSON.stringify(lReqs))\n    //             .then(data=>lData=data,()=>{\n    //                 clearInterval(this.deviceInterval);\n    //                 this.deviceInterval = null;\n    //             });\n    //     });\n    //     lTask.add(()=>{\n    //         if(Utils.isEmpty(lData)) {\n    //             return; //没有结果\n    //         }\n    //         let lResults = JSON.parse(lData); //[{code:asdevicecode,value:JSON.stringify([lReq])}]\n    //         for(let lReqs of lResults) {\n    //              let lRes = JSON.parse(lReqs.value); //[lReq]\n    //              for(let lReq  of lRes) {\n    //                  for(let i =0;i<this.devicesResults.length;i++) {\n    //                      let ldc = this.devicesResults[i];\n    //                      if(lReq.reqid == ldc.request.reqid) {\n    //                          if(lReq.iserror) {\n    //                              Utils.notify(lReq.data,\"error\");\n    //                          }else {\n    //                              if(lReq.data) {\n    //                                  Utils.notify(\"设备处理完成:\" + lReq.data);\n    //                              }\n    //                          }\n    //                          this.devicesResults.splice(i,1);\n    //                          break;\n    //                      }\n    //                  }\n    //              }\n    //         }\n    //         if(this.devicesResults.length ==0) {\n    //             clearInterval(this.deviceInterval);\n    //             this.deviceInterval = null;\n    //         }\n    //     });\n    //     lTask.execute();\n    //     return lTask.promise();\n    // }\n\n    /**\r\n     * 获得当前用户默认登录的room\r\n     */\n\n  }, {\n    key: \"getDefaultRoom\",\n    value: function getDefaultRoom() {\n      return this.gate().paramSvr.getValue(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].PARAM_DEFAULTROOM, true);\n    }\n    /**\r\n     *  设置默认的room\r\n     * @param {String} asRoomCode\r\n     */\n\n  }, {\n    key: \"setDefaultRoom\",\n    value: function setDefaultRoom(asRoomCode) {\n      return this.gate().paramSvr.set(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].PARAM_DEFAULTROOM, asRoomCode, true);\n    }\n  }, {\n    key: \"session\",\n    get: function get() {\n      return this.fSession;\n    }\n    /**\r\n     * 根据 服务器端 Session对象创建前段Session对象\r\n     * @param objSession\r\n     */\n    ,\n    set: function set(objSession) {\n      if (objSession) {\n        this.fSession = new ObjHouseSession(objSession);\n      } else {\n        this.fSession = null;\n      }\n    }\n  }]);\n\n  return ASHouse;\n}();\n/**\r\n * Room的权限管理\r\n * @constructor\r\n */\n\n\nvar ASEnterpriseRightSvr = /*#__PURE__*/function (_ASRoomService4) {\n  _inherits(ASEnterpriseRightSvr, _ASRoomService4);\n\n  var _super9 = _createSuper(ASEnterpriseRightSvr);\n\n  function ASEnterpriseRightSvr(aRoom) {\n    var _this13;\n\n    _classCallCheck(this, ASEnterpriseRightSvr);\n\n    _this13 = _super9.call(this, aRoom, _base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_ENTERPRISE_RIGHT);\n    _this13.fRightDefs = [];\n    return _this13;\n  }\n\n  _createClass(ASEnterpriseRightSvr, [{\n    key: \"asynGetRoomSession\",\n    value: function asynGetRoomSession() {\n      return this.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opLogin);\n    }\n  }, {\n    key: \"getRoomSession\",\n    value: function getRoomSession() {\n      return this.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opLogin, null, true);\n    }\n  }, {\n    key: \"rightDefOfEntity\",\n    value: function rightDefOfEntity(aEntityId) {\n      var lDef = this.fRightDefs[aEntityId];\n\n      if (!lDef) {\n        lDef = [];\n        var lDefObjs = this.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opGet, aEntityId, true);\n\n        if (lDefObjs) {\n          lDefObjs = JSON.parse(lDefObjs);\n\n          var _iterator13 = _createForOfIteratorHelper(lDefObjs),\n              _step13;\n\n          try {\n            for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {\n              var ldf = _step13.value;\n              lDef.push(new ObjRightDef(ldf));\n            }\n          } catch (err) {\n            _iterator13.e(err);\n          } finally {\n            _iterator13.f();\n          }\n\n          this.fRightDefs[aEntityId] = lDef;\n        }\n      }\n\n      return lDef;\n    }\n  }]);\n\n  return ASEnterpriseRightSvr;\n}(ASRoomService);\n/**\r\n * Room 类型定义\r\n * @param ashouse {ASHouse}\r\n * @param aRoomInfo {ObjRoomInfo}\r\n * @constructor\r\n */\n\n\nvar ASRoom = /*#__PURE__*/function () {\n  function ASRoom(ashouse, aRoomInfo) {\n    _classCallCheck(this, ASRoom);\n\n    this.fRoomSession = null;\n    /***@type {ASHouse}*/\n\n    this.houseSvr = ashouse;\n    this.fRoomInfo = aRoomInfo;\n    this.fUrlApi = fSystemSetting.singleserver ? fSystemSetting.centerurl : this.fRoomInfo.url; //如果只有一个服务器，ip地址都都一样\n\n    this.fRoomInfo.url = this.fUrlApi;\n    var lsURL = this.fUrlApi; //api地址\n\n    lsURL = lsURL.substr(0, lsURL.lastIndexOf(\"/\"));\n    lsURL = lsURL.substr(0, lsURL.lastIndexOf(\"/\"));\n    this.fUrl = lsURL; //服务器地址\n\n    this.expParser = new ExpParser(this);\n    this.metaSvr = new ASMetaSvr(this); //元数据服务\n\n    this.paramSvr = new ASParamSvr(this); //用户参数服务\n\n    this.timerSvr = new ASTimerSvr(this); //服务器时间服务\n\n    this.rightSvr = new ASEnterpriseRightSvr(this); //服务器时间服务\n  }\n  /**\r\n   * 上传临时文件,完成后返回文件完整的服务器端路径，一天后自动删除\r\n   *             // cmd = tmpfile  type = '.jpg' content =base64\r\n   * @param asType 文件类型扩展名称 .jpg 包括点\r\n   * @param asContent\r\n   */\n\n\n  _createClass(ASRoom, [{\n    key: \"upLoadTmpFile\",\n    value: function upLoadTmpFile(asType, asContent) {\n      var fDeferred = $.Deferred();\n      var lsURL = this.fileSvrURL();\n      $.ajax({\n        url: lsURL,\n        type: \"POST\",\n        timeout: 600000,\n        //超时时间10分钟\n        data: {\n          cmd: \"tmpfile\",\n          type: asType,\n          content: asContent\n        },\n        async: true,\n        success: function success(data) {\n          var lResult = new ObjCallResult(data);\n\n          if (lResult.isok) {\n            fDeferred.resolve(lResult.returnvalue);\n          } else {\n            fDeferred.reject(lResult.message);\n            _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].err(lResult.message);\n          }\n        },\n        error: function error(jqxhr, status, errorMsg) {\n          fDeferred.reject(errorMsg);\n\n          if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(errorMsg)) {\n            throw new Error(errorMsg);\n          } else if (jqxhr.status === 0) {\n            _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].err(\"通信错误\"); // throw new Error(\"通信错误\");\n          } else {\n            _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].err(\"系统错误,错误状态码\" + jqxhr.status);\n          }\n        }\n      });\n      return fDeferred.promise();\n    }\n    /**\r\n     * 上传临时文件的服务，对象存储服务的\r\n     * @return {string}\r\n     */\n\n  }, {\n    key: \"fileSvrURL\",\n    value: function fileSvrURL(asPart) {\n      if (arguments.length > 0 && !_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(asPart)) {\n        var lsPart = asPart.trim();\n\n        if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].startWith(lsPart, \"http\")) {\n          return lsPart;\n        } else {\n          lsPart = lsPart[0] == \"/\" ? lsPart : \"/\" + lsPart.trim();\n          return this.fUrl + \"/HySrp/file\" + lsPart;\n        }\n      }\n\n      return this.fUrl + \"/HySrp/file\"; //文件上传下载地址\n    }\n    /**\r\n     * 外部服务的URL地址Serverlet\r\n     * @return {string}\r\n     */\n\n  }, {\n    key: \"svrURL\",\n    value: function svrURL(asURL) {\n      if (arguments.length > 0) {\n        return this.fUrl + \"/\" + asURL;\n      } else {\n        return this.fUrl + \"/HySvr\"; //其他服务的地址\n      }\n    }\n    /**\r\n     *  调用room中的服务\r\n     * @param asServicePath {DomainPath}  路径\r\n     * @param asOperation  {string}操作类型\r\n     * @param objParam  {Object} 参数\r\n     * @param synch  {boolean}是否同步\r\n     * @param asTopic  {string}\r\n     * @param noProgress {boolean}是否显示进度\r\n     * @return {JQueryPromise}\r\n     */\n\n  }, {\n    key: \"roomCall\",\n    value: function roomCall(asServicePath, asOperation, objParam, synch, asTopic, noProgress) {\n      var lInfo = new ObjInvokeInfo(this.fRoomInfo, asServicePath, asOperation, this.houseSvr.session, asTopic);\n      return remoteCall(this.fRoomInfo.url, lInfo, objParam, synch, noProgress);\n    }\n  }, {\n    key: \"createRoomSvr\",\n    value: function createRoomSvr(aPath) {\n      return new ASRoomService(this, aPath);\n    }\n    /*** @return {ObjRoomInfo}*/\n\n  }, {\n    key: \"info\",\n    value: function info() {\n      return this.fRoomInfo;\n    }\n    /**\r\n     * 登录room获得ObjRoomSession\r\n     * @return { JQueryPromise}\r\n     */\n\n  }, {\n    key: \"asynEnter\",\n    value: function asynEnter() {\n      var _this14 = this;\n\n      return this.rightSvr.asynGetRoomSession().done(function (data) {\n        var lResult = JSON.parse(data);\n\n        _this14.roomSession(new ObjRoomSession(lResult, _this14.houseSvr, _this14));\n      });\n    }\n  }, {\n    key: \"enter\",\n\n    /**\r\n     * 同步进入\r\n     */\n    value: function enter() {\n      var data = this.rightSvr.getRoomSession();\n      var lResult = JSON.parse(data);\n      this.roomSession(new ObjRoomSession(lResult, this.houseSvr, this));\n    }\n  }, {\n    key: \"roomSession\",\n    value: function roomSession(aSession) {\n      if (arguments.length > 0) {\n        this.fRoomSession = aSession;\n      }\n\n      return this.fRoomSession;\n    }\n    /**\r\n     * 创建表达式对象\r\n     * @param asExp\r\n     * @return {*|undefined}\r\n     */\n\n  }, {\n    key: \"createExp\",\n    value: function createExp(asExp) {\n      var lExp = new _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].Exp();\n      lExp.parsers(\"session\", this.expParser); //添加行解释对象\n\n      lExp.compile(asExp);\n      return lExp;\n    }\n  }]);\n\n  return ASRoom;\n}();\n/**\r\n * Hy的通用服务方法\r\n * @param myASHyServerSelf\r\n * @constructor\r\n */\n\n\nvar ASHyServer = /*#__PURE__*/function () {\n  function ASHyServer() {\n    _classCallCheck(this, ASHyServer);\n\n    this.fHyHouse = null;\n    this.fHyGate = null;\n    _taskevent_js__WEBPACK_IMPORTED_MODULE_1__[\"TaskEvents\"].PropTaskEventOwner(this);\n  }\n\n  _createClass(ASHyServer, [{\n    key: \"gate\",\n    value: function gate() {\n      this.hyHouse();\n      return this.fHyGate;\n    }\n  }, {\n    key: \"hyHouse\",\n    value: function hyHouse() {\n      if (this.fHyHouse == null) {\n        this.fHyHouse = new ASHouse();\n        this.fHyHouse.info(this.synHouseInfo(\"HY\"));\n        this.fHyGate = this.fHyHouse.gate();\n        this.fHyMngr = this.fHyHouse.roomByCode(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_ROOM_MNGR);\n      }\n    }\n  }, {\n    key: \"mngr\",\n    value: function mngr() {\n      this.hyHouse();\n      return this.fHyMngr;\n    }\n    /**\r\n     * 获得指定账号的HouseSvr\r\n     * @param asHouseCode\r\n     */\n\n  }, {\n    key: \"createHouseSvr\",\n    value: function createHouseSvr(asHouseCode) {\n      var lHouseSvr = new ASHouse();\n\n      if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(asHouseCode)) {\n        var lHouseInfo = this.synHouseInfo(asHouseCode);\n        lHouseSvr.info(lHouseInfo);\n      }\n\n      return lHouseSvr;\n    }\n    /**\r\n     *  获得目录的调用信息\r\n     * @param aDomainPath :路径\r\n     * @param asOperation: String\r\n     */\n\n  }, {\n    key: \"invokeInfoDir\",\n    value: function invokeInfoDir(aDomainPath, asOperation, session) {\n      var myInvokeInfo = {};\n      myInvokeInfo.deploymentid = _base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_ROOM_DIR;\n      myInvokeInfo.systemid = _base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_ROOM_DIR;\n      myInvokeInfo.roomid = _base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_ROOM_DIR;\n      myInvokeInfo.path = String(aDomainPath); //可以是路径对象\n\n      myInvokeInfo.operation = asOperation;\n\n      if (session) {\n        myInvokeInfo.sessionid = session.sessionid;\n        myInvokeInfo.sessionhouseid = session.houseid;\n      }\n\n      return myInvokeInfo;\n    } // invokeInfoHyGate(aDomainPath, asOperation) {\n    //     let myInvokeInfo = {};\n    //     myInvokeInfo.roomid = SysConst.HY_SYSTEM_TYPE_GATE;\n    //     myInvokeInfo.path   = String(aDomainPath); //可以是路径对象\n    //     myInvokeInfo.operation = asOperation;\n    //     return myInvokeInfo;\n    // }\n\n    /**\r\n     * 获得账户信息\r\n     * @param asHouseCode\r\n     * @return {*}\r\n     */\n\n  }, {\n    key: \"synHouseInfo\",\n    value: function synHouseInfo(asHouseCode, roomid) {\n      var lInfo = this.invokeInfoDir(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_HOUSEINFO, _base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opInfo);\n      var lData = remoteCall(fSystemSetting.centerurl, lInfo, {\n        housecode: asHouseCode,\n        roomid: roomid\n      }, true);\n      if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(lData)) return null;\n      return new ObjHouseInfo(JSON.parse(lData));\n    }\n  }, {\n    key: \"synHouseInfoByParam\",\n    value: function synHouseInfoByParam(aQueryParam) {\n      var lInfo = this.invokeInfoDir(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_HOUSEINFO, _base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opInfo);\n      var lData = remoteCall(fSystemSetting.centerurl, lInfo, aQueryParam, true);\n      if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(lData)) return null;\n      return new ObjHouseInfo(JSON.parse(lData));\n    }\n    /**\r\n     * 异步方式获得账号信息\r\n     */\n\n  }, {\n    key: \"asynHouseInfo\",\n    value: function asynHouseInfo(asHouseCode) {\n      var lInfo = this.invokeInfoDir(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_HOUSEINFO, _base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opInfo);\n      var lParam;\n\n      if (typeof asHouseCode == \"string\") {\n        lParam = {\n          housecode: asHouseCode\n        };\n      } else {\n        lParam = asHouseCode; //参数对象\n      }\n\n      var lp = remoteCall(fSystemSetting.centerurl, lInfo, lParam);\n      var lPromise = $.Deferred();\n      var lHouseInfo;\n      lp.then(function (data) {\n        if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(data)) {\n          lPromise.reject();\n          _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].alert(\"错误账号\");\n          return;\n        }\n\n        lHouseInfo = new ObjHouseInfo(JSON.parse(data));\n        lPromise.resolve(lHouseInfo);\n      });\n      return lPromise;\n    }\n  }, {\n    key: \"houseInfoList\",\n    value: function houseInfoList(asHouseCode, asPhoneNumber, asEmail, includeclosed) {\n      var lParam = new ObjHouseInfoQueryParam(asHouseCode, null, null, asPhoneNumber, asEmail, includeclosed);\n      var lInvokeInfo = this.invokeInfoDir(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_HOUSEINFO, _base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opGet);\n      var lTask = this.task.serialTasks(\"houseinfolist\");\n      var lsResult = remoteCall(fSystemSetting.centerurl, lInvokeInfo, lParam, true);\n      var lInfos = [];\n      var lData = JSON.parse(lsResult);\n\n      var _iterator14 = _createForOfIteratorHelper(lData),\n          _step14;\n\n      try {\n        for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {\n          var ld = _step14.value;\n          lInfos.push(new ObjHouseInfo(ld));\n        }\n      } catch (err) {\n        _iterator14.e(err);\n      } finally {\n        _iterator14.f();\n      }\n\n      return lInfos;\n    }\n    /**\r\n     *\r\n     * @param asOperation\r\n     * @param asParam\r\n     * @return {JQueryPromise|String}\r\n     */\n\n  }, {\n    key: \"asynCenterDplCall\",\n    value: function asynCenterDplCall(action, asOperation, asParam, session) {\n      var lInfo = this.invokeInfoDir(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_CENTER_DEPLOYMENTMNGR + (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(action) ? \"\" : \":\" + action), asOperation, session);\n      return remoteCall(fSystemSetting.centerurl, lInfo, asParam);\n    }\n    /**\r\n     *\r\n     * @param asOperation\r\n     * @param asParam\r\n     * @return {JQueryPromise|String}\r\n     */\n\n  }, {\n    key: \"asynCenterHMngrCall\",\n    value: function asynCenterHMngrCall(action, asOperation, asParam, session) {\n      var lInfo = this.invokeInfoDir(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_CENTER_HOUSEMNGR + (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(action) ? \"\" : \":\" + action), asOperation, session);\n      return remoteCall(fSystemSetting.centerurl, lInfo, asParam);\n    }\n    /**\r\n     *\r\n     * @param aInfo {ObjHouseRegistInfo}\r\n     */\n\n  }, {\n    key: \"asynSendValidationCodeByPhone\",\n    value: function asynSendValidationCodeByPhone(aInfo) {\n      aInfo.validphone = true;\n      var lInvokeInfo = this.invokeInfoDir(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_CENTER_HOUSEMNGR + \":REG\", _base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opAdd);\n      return remoteCall(fSystemSetting.centerurl, lInvokeInfo, aInfo);\n    }\n    /**\r\n     *\r\n     * @param aInfo {ObjHouseRegistInfo}\r\n     */\n\n  }, {\n    key: \"asynSendValidationCodeByEmail\",\n    value: function asynSendValidationCodeByEmail(aInfo) {\n      aInfo.validphone = false;\n      var lInvokeInfo = this.invokeInfoDir(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_CENTER_HOUSEMNGR + \":REG\", _base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opAdd);\n      return remoteCall(fSystemSetting.centerurl, lInvokeInfo, aInfo);\n    }\n    /**\r\n     *  @param aInfo {ObjHouseRegistInfo}\r\n     */\n\n  }, {\n    key: \"asynregHouse\",\n    value: function asynregHouse(aInfo) {\n      var lInvokeInfo = this.invokeInfoDir(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_CENTER_HOUSEMNGR + \":REG\", _base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opSet);\n      return remoteCall(fSystemSetting.centerurl, lInvokeInfo, aInfo);\n    }\n    /**\r\n     * 查找邮件和电话对应的注册账号信息\r\n     *  @param aInfo {ObjHouseRegistInfo}\r\n     */\n\n  }, {\n    key: \"regInfo\",\n    value: function regInfo(aInfo) {\n      var lInvokeInfo = this.invokeInfoDir(_base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_CENTER_HOUSEMNGR + \":REG\", _base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opInfo);\n      var lData = remoteCall(fSystemSetting.centerurl, lInvokeInfo, aInfo, true);\n      return JSON.parse(lData);\n    }\n  }]);\n\n  return ASHyServer;\n}();\n\nvar ObjWxConfig = function ObjWxConfig(data) {\n  _classCallCheck(this, ObjWxConfig);\n\n  if (typeof data == 'string') {\n    data = JSON.parse(data);\n  }\n\n  if (data) {\n    this.appId = data.appId;\n    this.timestamp = data.timestamp;\n    this.nonceStr = data.nonceStr;\n    this.signature = data.signature;\n  } else {\n    this.appId = \"\";\n    this.timestamp = 123;\n    this.nonceStr = \"234\";\n    this.signature = \"234\";\n  }\n\n  this.debug = false;\n  this.jsApiList = ['chooseImage', 'getLocalImgData', 'scanQRCode', 'chooseWXPay'];\n};\n\nvar ObjOpenIdSession = /*#__PURE__*/function () {\n  function ObjOpenIdSession(aData) {\n    _classCallCheck(this, ObjOpenIdSession);\n\n    if (typeof aData == 'string') {\n      aData = JSON.parse(aData);\n    }\n\n    if (aData) {\n      this.access_token = aData.access_token;\n      this.expires_in = aData.expires_in; //7200,\n\n      this.refresh_token = aData.refresh_token; //\":\"REFRESH_TOKEN\",\n\n      this.openid = aData.openid; //:\"OPENID\",\n\n      this.scope = aData.scope; //\":\"SCOPE\"\n\n      this.createtime = new Date().getTime();\n    }\n  }\n\n  _createClass(ObjOpenIdSession, [{\n    key: \"requireRefresh\",\n    value: function requireRefresh() {\n      return (new Date().getTime() - this.createtime) / 1000 > this.expires_in - 600;\n    }\n  }]);\n\n  return ObjOpenIdSession;\n}(); //wx57e64f27146325ed\n\n/**\r\n * 微信环境下可用的服务\r\n */\n\n\nvar ASWXServer = /*#__PURE__*/function () {\n  /**\r\n   * @param appid 公众号的appid URL参数获得，housecode='' appid=''\r\n   * @param aHouseCode 拥有appid的账号\r\n   */\n  function ASWXServer(appid, aHouseCode, onReady, onError) {\n    _classCallCheck(this, ASWXServer);\n\n    this.fReady = false;\n    this.fAppid = appid;\n    this.fHouseSvr = new ASHouse();\n    this.fHouseSvr.updateHouseInfo(aHouseCode);\n    this.fASWxSvr = new ASRoomService(this.fHouseSvr.gate(), _base__WEBPACK_IMPORTED_MODULE_2__[\"SysConst\"].HY_SERVICE_WXUSER);\n    this.fOnReady = onReady;\n    this.fOnError = onError;\n    this.fOpenId = \"\";\n    var lMySelf = this;\n    wx.ready(function () {\n      lMySelf.fReady = true;\n\n      if (lMySelf.fOnReady) {\n        lMySelf.fOnReady();\n      }\n    });\n    wx.error(function (res) {\n      if (lMySelf.fOnError) {\n        lMySelf.fOnError();\n      }\n\n      console.log(res);\n      throw new Error(res);\n    });\n    this.updateConfig();\n  }\n\n  _createClass(ASWXServer, [{\n    key: \"updateConfig\",\n\n    /**\r\n     *  更新配置信息，如果是实名认证的公众号，不需要服务器调用秩序谁便指定什么值就可以。\r\n     *  本方法一定要调用。\r\n     */\n    value: function updateConfig() {\n      var lsUrl = window.location.href.split(\"#\")[0];\n      var lParam = new ObjCodeAndId(this.fHouseSvr.info().id, undefined, this.fAppid, lsUrl);\n      var lsData = this.fASWxSvr.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opInfo, lParam, true);\n      var lResult = new ObjWxConfig(lsData);\n      wx.config(lResult);\n    }\n    /**\r\n     * * 同步从code获得AccessToken和OpenId 如果没有参数表明获得已经存在的session\r\n     * 获得Session openid与AccessToken 如果需要则刷新\r\n     * @return {null|ObjOpenIdSession|*}\r\n     */\n\n  }, {\n    key: \"session\",\n    value: function session(code) {\n      if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(code)) {\n        var lParam = new ObjCodeAndId(this.fHouseSvr.info().id, undefined, this.fAppid, code);\n        var lData = this.fASWxSvr.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opSend, lParam, true);\n        this.fSession = new ObjOpenIdSession(lData);\n        return this.fSession;\n      }\n\n      if (!this.fSession) {\n        return null;\n      }\n\n      if (this.fSession.requireRefresh()) {\n        var lsURL = \"https://api.weixin.qq.com/sns/oauth2/refresh_token?appid=\" + this.fAppid + \"&grant_type=refresh_token&refresh_token=\" + this.fSession.refresh_token;\n\n        var _lData = httpGet(lsURL, undefined, true);\n\n        this.fSession = new ObjOpenIdSession(_lData);\n      }\n\n      return this.fSession;\n    }\n  }, {\n    key: \"ready\",\n    get: function get() {\n      return this.fReady;\n    }\n  }]);\n\n  return ASWXServer;\n}();\n\nvar ObjPrePayInfo = function ObjPrePayInfo(data) {\n  _classCallCheck(this, ObjPrePayInfo);\n\n  data = JSON.parse(data);\n  this.appId = data.appId;\n  this.timestamp = data.timestamp;\n  this.nonceStr = data.nonceStr;\n  this.signature = data.signature;\n  this.prepay_id = data.prepay_id;\n};\n/**\r\n * 微信  jsapi支付接口\r\n */\n\n\nvar ASWxPaySvrJSAPI = /*#__PURE__*/function (_ASRoomService5) {\n  _inherits(ASWxPaySvrJSAPI, _ASRoomService5);\n\n  var _super10 = _createSuper(ASWxPaySvrJSAPI);\n\n  /**\r\n   *ACTION_PAY\r\n   * @param asRoom {ASRoom}\r\n   * @param aPath {DomainPath}\r\n   * @param aWxSvr {ASWXServer}\r\n   */\n  function ASWxPaySvrJSAPI(aWxSvr, asRoom, aPath) {\n    var _this15;\n\n    _classCallCheck(this, ASWxPaySvrJSAPI);\n\n    _this15 = _super10.call(this, asRoom, aPath);\n    _this15.fWxSvr = aWxSvr;\n    return _this15;\n  }\n  /**\r\n   * 生成预支付信息\r\n   * @param asOpenId\r\n   * @param aChargeRecID\r\n   * @return {*}\r\n   */\n\n\n  _createClass(ASWxPaySvrJSAPI, [{\n    key: \"asynPrepay\",\n    value: function asynPrepay(aChargeRecID) {\n      var _this16 = this;\n\n      var lTask = this.createTask(\"prepay\");\n      var ldata;\n      lTask.add(function () {\n        var lParam = new ObjCodeAndId(aChargeRecID, null, null, _base__WEBPACK_IMPORTED_MODULE_2__[\"EnumJSFS\"].WX, _this16.fWxSvr.session().openid);\n        return _this16.serviceCall(_base__WEBPACK_IMPORTED_MODULE_2__[\"EnumOperation\"].opPay, lParam).done(function (data) {\n          return ldata = data;\n        });\n      });\n      lTask.add(function () {\n        _this16.fPayInfo = new ObjPrePayInfo(ldata);\n      });\n      lTask.execute();\n      return lTask.promise();\n    }\n    /**\r\n     * 将支付记录提交到后台生成支付吗，弹出微信支付进行支付\r\n     * @param asOpenId   用户的id\r\n     * @param aChargeRecID   支付记录号\r\n     */\n\n  }, {\n    key: \"pay\",\n    value: function pay(aChargeRecID) {\n      var _this17 = this;\n\n      var lTask = this.createTask(\"pay\");\n\n      if (this.fPayInfo == null) {\n        lTask.add(function () {\n          return _this17.asynPrepay(aChargeRecID);\n        });\n      }\n\n      lTask.add(function () {\n        var ld = $.Deferred();\n        wx.chooseWXPay({\n          timestamp: _this17.fPayInfo.timestamp,\n          // 支付签名时间戳，注意微信 jssdk 中的所有使用 timestamp 字段均为小写。但最新版的支付后台生成签名使用的 timeStamp 字段名需大写其中的 S 字符\n          nonceStr: _this17.fPayInfo.nonceStr,\n          // 支付签名随机串，不长于 32 位\n          \"package\": \"prepay_id=\" + _this17.fPayInfo.prepay_id,\n          // 统一支付接口返回的prepay_id参数值，提交格式如：prepay_id=\\*\\*\\*）\n          signType: 'RSA',\n          // 微信支付V3的传入 RSA ,微信支付V2的传入格式与V2统一下单的签名格式保持一致\n          paySign: _this17.fPayInfo.signature,\n          // 支付签名\n          success: function success(res) {\n            // 支付成功后的回调函数\n            ld.resolve(res);\n          }\n        });\n        return ld.promise();\n      });\n      lTask.execute();\n      return lTask.promise();\n    }\n  }]);\n\n  return ASWxPaySvrJSAPI;\n}(ASRoomService);\n\nconsole.log(\"server\");\nvar fServer = {\n  DomainPath: DomainPath,\n  ASHouse: ASHouse,\n  ObjLoginParam: ObjLoginParam,\n  ObjParamIds: ObjParamIds,\n  ObjParamEdit: ObjParamEdit,\n  ObjHouseInfo: ObjHouseInfo,\n  ObjRoomInfo: ObjRoomInfo,\n  ObjCodeAndId: ObjCodeAndId,\n  ObjInvokeInfo: ObjInvokeInfo,\n  hy: hy,\n  EntityInRoomRes: EntityInRoomRes,\n  ObjRightDef: ObjRightDef,\n  ObjDataPartition: ObjDataPartition,\n  rmCall: rmCall,\n  remoteCall: remoteCall,\n  ASSesssionStore: ASSesssionStore,\n  ObjHouseInfoQueryParam: ObjHouseInfoQueryParam,\n  ObjHouseRegistInfo: ObjHouseRegistInfo,\n  ObjResource: ObjResource,\n  ObjDevRequest: ObjDevRequest,\n  ObjInvokeData: ObjInvokeData,\n  ASWXServer: ASWXServer,\n  httpGet: httpGet,\n  ASWxPaySvrJSAPI: ASWxPaySvrJSAPI\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 143172 characters]\n//# sourceURL=webpack-internal:///./src/bas/server.js\n");

/***/ }),

/***/ "./src/bas/taskevent.js":
/*!******************************!*\
  !*** ./src/bas/taskevent.js ***!
  \******************************/
/*! exports provided: TaskEvents, Event */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TaskEvents\", function() { return fTaskEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Event\", function() { return Event; });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"./src/bas/utils.js\");\n/* harmony import */ var bas_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! bas/base */ \"./src/bas/base.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _get(target, property, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n/**\r\n *  任务对象\r\n * @param asType : String 事件的类型标识\r\n * @param aData : Object|* 事件携带的数据\r\n * @param aTask : Task 并行或者串行任务的事件\r\n * @param aSource : 事件的来源，\r\n * @constructor\r\n */\n\nvar Event = /*#__PURE__*/function () {\n  function Event(asType, aData, aTask, aSource, aOwner) {\n    _classCallCheck(this, Event);\n\n    // myEvent.target = myEventMngrSelf; //触发事件的对象\n    this.type = asType; //类型\n\n    this.source = aSource; //事件的来源\n\n    this.data = aData; //携带的用户定义数据\n\n    this.task = aTask; //\n\n    this.owner = aOwner;\n    this.stoped = false; //默认行为阻止,用户撤销\n\n    this.defaultPrevented = false; //默认行为阻止,用户撤销\n\n    if (aOwner && aOwner.nextEventSn) {\n      //获得事件的序列号id\n      this.fSerialNumber = aOwner.nextEventSn();\n    }\n  }\n\n  _createClass(Event, [{\n    key: \"preventDefault\",\n    value: function preventDefault() {\n      this.defaultPrevented = true; //默认行为阻止,用户撤销\n    }\n  }, {\n    key: \"stop\",\n    value: function stop() {\n      this.stoped = true;\n    }\n  }, {\n    key: \"promise\",\n    value: function promise() {\n      if (this.task) return this.task.promise();else return undefined;\n    }\n    /**\r\n     *\r\n     * @return {*}\r\n     */\n\n  }, {\n    key: \"sn\",\n    get: function get() {\n      return this.fSerialNumber;\n    }\n  }]);\n\n  return Event;\n}();\n/**\r\n *   任务和事件工具类\r\n *\r\n * @constructor\r\n */\n\n\nfunction PKTaskEvents() {\n  var myTaskEventsSelf = this;\n  /**\r\n   * 并行或者串行任务\r\n   * @type {{PARALLEL: string, SERIAL: string}}\r\n   */\n\n  var EnumExecutionType = {\n    PARALLEL: 'parallel',\n    SERIAL: 'serial'\n  };\n\n  function taskPending(aTask) {\n    return aTask.promise().state() == \"pending\";\n  }\n  /**\r\n   * 具有事件属性的对象\r\n   * @param aObject\r\n   * @constructor\r\n   */\n\n\n  function PropEvent(aObject) {\n    aObject.event = new EventManager(aObject);\n  }\n  /**\r\n   *  @desc  将参数对象添加任务和事件处理能力\r\n   *   @param aObject :Object 目标对象\r\n   *   @constructor\r\n   */\n\n\n  function PropTaskEventOwner(aObject) {\n    aObject.event = new EventManager(aObject);\n    aObject.task = new TaskManager(aObject, aObject.event); //主题域的任务管理对象，管理所有主题域相关的异步任务\n\n    aObject.setTaskout = setTaskout; //所有活动任务执行完成后执行，没有活动任务立即执行\n\n    aObject.nextEventSn = function () {\n      return fEventSerialNumber++;\n    };\n\n    var fPostTasks = []; //定制执行的函数\n\n    aObject.event.on(\"onTasksEnd\", onTasksEnd);\n    var fEventSerialNumber = 0; ///事件的序列号，每次加1\n\n    return;\n    /**\r\n     *\r\n     * 当所有的任务结束执行是看是否有需要执行的函数\r\n     */\n\n    function onTasksEnd() {\n      if (fPostTasks.length == 0) {\n        return; //没有任务\n      }\n\n      var lObj = fPostTasks.shift(); //执行第一个，如果没有任务，再递归执行第二个\n\n      lObj.fun.apply(this, lObj.arg);\n      if (fPostTasks.length > 0) onTasksEnd();\n    }\n    /**\r\n     * 当前任务执行完成后执行的函数。\r\n     */\n\n\n    function setTaskout(afn) {\n      var largs = [];\n\n      if (arguments.length > 1) {\n        //添加其他的参数\n        for (var i = 1; i < arguments.length; i++) {\n          largs.push(arguments[i]);\n        }\n      }\n\n      var lObj = {\n        fun: afn,\n        arg: largs\n      };\n      fPostTasks.push(lObj);\n\n      if (!aObject.task.hasTask()) {\n        //如果当前没有任务，立即执行\n        onTasksEnd();\n      }\n    }\n  }\n  /**\r\n   *  对于普通任务的封装\r\n   */\n\n\n  var Task = /*#__PURE__*/function () {\n    function Task(asTaskName, asMessage) {\n      var _this = this;\n\n      _classCallCheck(this, Task);\n\n      this.name = asTaskName ? asTaskName : '';\n      this.message = asMessage ? asMessage : '';\n      this.fDeferred = $.Deferred();\n      this.fDeferred[\"catch\"](function () {\n        return _this.onError();\n      });\n    }\n\n    _createClass(Task, [{\n      key: \"task\",\n      value: function task() {\n        return this.fDeferred;\n      }\n    }, {\n      key: \"onError\",\n      value: function onError(e) {\n        console.log(e);\n      }\n    }, {\n      key: \"promise\",\n      value: function promise() {\n        return this.fDeferred.promise();\n      }\n    }, {\n      key: \"reject\",\n      value: function reject(data) {\n        var _this2 = this;\n\n        setTimeout(function () {\n          return _this2.fDeferred.reject(data);\n        }, 0);\n      }\n    }, {\n      key: \"resolve\",\n      value: function resolve(data) {\n        var _this3 = this;\n\n        setTimeout(function () {\n          return _this3.fDeferred.resolve(data);\n        }, 0);\n      }\n    }, {\n      key: \"pending\",\n      get: function get() {\n        return this.fDeferred.promise().state() === \"pending\";\n      }\n    }]);\n\n    return Task;\n  }();\n  /***------------------------------------------------------------------------------------------\r\n   *  类型： 异步执行Deferred 集合，可以包含多个异步执行的对象。 都完成后Resolve\r\n   *  属性：\r\n   *  方法：\r\n   *  事件：\r\n   *  参数： asTaskName 任务名称 ，aData 任务携带的数据， 完成后Resolve中返回\r\n   *  ------------------------------------------------------------------------------------------ */\n\n\n  var ParallelTasks = /*#__PURE__*/function (_Task) {\n    _inherits(ParallelTasks, _Task);\n\n    var _super = _createSuper(ParallelTasks);\n\n    function ParallelTasks(asTaskName, asMessage) {\n      var _this4;\n\n      _classCallCheck(this, ParallelTasks);\n\n      _this4 = _super.call(this, asTaskName, asMessage);\n      _this4.executiontype = EnumExecutionType.PARALLEL;\n      _this4.fTasks = [];\n\n      _this4.fDeferred.then(function (data) {// if (isDebuging && asMessage)\n        //     console.log(\"并行任务 \" + asMessage + \" 完成\");\n      }, function (data) {\n        console.log(\"并行任务 \" + asTaskName + ' ' + asMessage + \" 错误: \");\n        console.log(data);\n      });\n\n      setTimeout(function () {\n        return _this4.tryResolve();\n      }, 0);\n      return _this4;\n    }\n    /**\r\n     * 如果没有任务就结束\r\n     */\n\n\n    _createClass(ParallelTasks, [{\n      key: \"tryResolve\",\n      value: function tryResolve() {\n        var _this5 = this;\n\n        if (this.fTasks.length == 0) {\n          setTimeout(function () {\n            return _this5.resolve();\n          }, 0);\n        }\n      }\n    }, {\n      key: \"hasPromise\",\n      value: function hasPromise() {\n        return this.fTasks.length > 0;\n      }\n      /**\r\n       * 添加执行中的任务\r\n       */\n\n    }, {\n      key: \"add\",\n      value: function add(aTask) {\n        var mySelf = this;\n        if (!aTask) return;\n\n        if (typeof aTask == \"function\") {\n          //将函数添加进来，异步执行，函数在timeout后执行，返回promise 完成后，任务算完成。\n          var largs = [];\n\n          if (arguments.length > 1) {\n            //添加其他的参数\n            for (var i = 1; i < arguments.length; i++) {\n              largs.push(arguments[i]);\n            }\n          }\n\n          var ldf = $.Deferred();\n          mySelf.add(ldf);\n          setTimeout(function () {\n            try {\n              var lp = aTask.apply(mySelf, largs); //执行函数\n\n              if (lp) {\n                lp.then(function () {\n                  ldf.resolve();\n                }, function (data) {\n                  mySelf.reject(data);\n                });\n              } else {\n                ldf.resolve();\n              }\n            } catch (e) {\n              console.log(e);\n              mySelf.reject(e); //任务\n            }\n          }, 0);\n          return;\n        } else if (typeof aTask.promise != \"function\") throw new Error(\"加入的非任务对象\");\n\n        if (aTask.promise().state() == \"pending\") mySelf.fTasks.push(aTask);else if (aTask.promise().state() == \"rejected\") mySelf.reject(\"任务已经失败\");else return; //已经成功完成不需要在加入队列\n\n        aTask.promise().then(function (data) {\n          var idx = mySelf.fTasks.indexOf(aTask);\n          mySelf.fTasks.splice(idx, 1);\n\n          if (mySelf.fTasks.length == 0) {\n            mySelf.resolve();\n          }\n        }, function (data) {\n          return mySelf.reject(data);\n        });\n      }\n    }]);\n\n    return ParallelTasks;\n  }(Task);\n  /**\r\n   *  串行任务\r\n   */\n\n\n  var SerialTasks = /*#__PURE__*/function (_Task2) {\n    _inherits(SerialTasks, _Task2);\n\n    var _super2 = _createSuper(SerialTasks);\n\n    function SerialTasks(asTaskName, asMessage, executeEventFun) {\n      var _this6;\n\n      _classCallCheck(this, SerialTasks);\n\n      _this6 = _super2.call(this, asTaskName);\n      _this6.executiontype = EnumExecutionType.SERIAL;\n      _this6.fSteps = [];\n      _this6.fPostSteps = []; //放在正常步骤之后执行的步骤。 按照加入的先后顺序,一旦调用execute方法后就不能再添加\n\n      _this6.fExecuting = false;\n      _this6.fStoped = false;\n      _this6.executeEventFun = null;\n      _this6.fData;\n\n      _this6.task().then(function (data) {// console.log(\"串行任务 \"+asTaskName+ '  ' + asMessage+\" 完成\");\n      }, function (data) {\n        console.log(\"串行任务 \" + asTaskName + '  撤销 ' + asMessage + (data ? data : ''));\n      });\n\n      return _this6;\n    }\n\n    _createClass(SerialTasks, [{\n      key: \"result\",\n      value: function result(aData) {\n        if (arguments.length > 0) {\n          this.fData = aData;\n        }\n\n        return this.fData;\n      }\n    }, {\n      key: \"reject\",\n      value: function reject(data) {\n        this.fStoped = true;\n        this.task().reject(data);\n      }\n    }, {\n      key: \"resolve\",\n      value: function resolve(data) {\n        this.fStoped = true;\n\n        _get(_getPrototypeOf(SerialTasks.prototype), \"resolve\", this).call(this, data);\n      }\n    }, {\n      key: \"execute\",\n      value: function execute() {\n        if (this.executeEventFun) {\n          //执行事件回调函数，用于任务管理者确认任务开始执行。\n          this.executeEventFun(this);\n        }\n\n        if (this.fPostSteps.length > 0) {\n          for (var i = 0; i < this.fPostSteps.length; i++) {\n            this.fSteps.push(this.fPostSteps[i]);\n          }\n        }\n\n        this.fExecuting = true;\n        if (this.fSteps.length > 0) this.executeStep(0);else this.resolve();\n        return;\n      }\n    }, {\n      key: \"addPost\",\n      value: function addPost(aFun) {\n        if (this.fExecuting) throw new Error(\"执行中的序列任务不能再添加任务\");\n        var largs = [];\n        if (typeof aFun != \"function\") throw new Error(\"步骤必须是返回Promise 或者falsy的函数\");\n\n        if (arguments.length > 1) {\n          //添加其他的参数\n          for (var i = 1; i < arguments.length; i++) {\n            largs.push(arguments[i]);\n          }\n        }\n\n        this.fPostSteps.push({\n          fun: aFun,\n          arg: largs\n        });\n      }\n      /**\r\n       * 添加到所有的任务开始前。\r\n       */\n\n    }, {\n      key: \"addPre\",\n      value: function addPre(aFun) {\n        if (this.fExecuting) throw new Error(\"执行中的序列任务不能再添加任务\");\n        var largs = [];\n        if (typeof aFun != \"function\") throw new Error(\"步骤必须是返回Promise 或者falsy的函数\");\n\n        if (arguments.length > 1) {\n          //添加其他的参数\n          for (var i = 1; i < arguments.length; i++) {\n            largs.push(arguments[i]);\n          }\n        }\n\n        this.fSteps.unshift({\n          fun: aFun,\n          arg: largs\n        });\n      }\n      /**\r\n       * 添加函数，每个函数一定返回一个promise。\r\n       */\n\n    }, {\n      key: \"add\",\n      value: function add(aFun) {\n        if (this.fExecuting) throw new Error(\"执行中的序列任务不能再添加任务\");\n        var largs = [];\n        if (typeof aFun != \"function\") throw new Error(\"步骤必须是返回Promise 或者falsy的函数\");\n\n        if (arguments.length > 1) {\n          //添加其他的参数\n          for (var i = 1; i < arguments.length; i++) {\n            largs.push(arguments[i]);\n          }\n        }\n\n        this.fSteps.push({\n          fun: aFun,\n          arg: largs\n        });\n      }\n      /**\r\n       * 执行步骤\r\n       */\n\n    }, {\n      key: \"executeStep\",\n      value: function executeStep(stepIndex) {\n        var lPromise;\n        var lMySelf = this;\n        if (stepIndex >= this.fSteps.length) throw new Error(\"没有步骤\"); //当前任务是已经执行的Promise\n\n        var lCurrentStep = this.fSteps[stepIndex];\n        var lfun = lCurrentStep.fun;\n        var lArgs = lCurrentStep.arg;\n\n        try {\n          lPromise = lfun.apply(this, lArgs);\n\n          if (lPromise) {\n            //异步的步骤\n            if (lPromise.state() == \"pending\") {\n              lPromise.done(function (data) {\n                lMySelf.nextStep(stepIndex);\n              });\n              lPromise.fail(function (data) {\n                lMySelf.reject(data);\n              });\n            } else if (lPromise.state() == \"resolved\") {\n              lMySelf.nextStep(stepIndex);\n            } else if (lPromise.state() == \"rejected\") {\n              lMySelf.reject();\n            } else throw Error(\"错误任务状态\" + lPromise.state());\n          } else {\n            //同步步骤\n            lMySelf.nextStep(stepIndex);\n          }\n        } catch (e) {\n          console.log(e);\n          this.reject(e); //任务\n\n          var lsMsg = e.message;\n          _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].err(lsMsg); // throw e;\n        }\n      } //end of execute Step\n\n    }, {\n      key: \"nextStep\",\n      value: function nextStep(stepIndex) {\n        if (this.task().state() != \"pending\" || this.fStoped) return;\n        if (stepIndex < this.fSteps.length - 1) this.executeStep(1 + stepIndex);else {\n          this.task().resolve(this.fData);\n        }\n      }\n    }]);\n\n    return SerialTasks;\n  }(Task);\n  /**\r\n   *  任务管理对象\r\n   * @param <aOwner> : Object   Owner 拥有者\r\n   * @constructor\r\n   */\n\n\n  function EventManager(aOwner) {\n    //公开属性和方法\n    var myEventMngrSelf = this;\n    myEventMngrSelf.taskMngr = taskMngr;\n    myEventMngrSelf.asynParallelTrigger = asynParallelTrigger;\n    myEventMngrSelf.asynSerialTrigger = asynSerialTrigger;\n    myEventMngrSelf.trigger = trigger;\n    myEventMngrSelf.on = on;\n    myEventMngrSelf.off = off;\n    myEventMngrSelf.listeners = listeners;\n    var listener = []; //听众列表\n\n    var enableEvent = true;\n    var fStop;\n    var fTaskMngr; //实现异步触发的任务对象\n\n    return;\n    /**\r\n     * 设置异步事件执行是的任务管理对象，如果设定采用此任务管理对象，否则自己创建\r\n     * @param aMngr : TaskManager 任务管理对象\r\n     * @return {TaskManager}\r\n     */\n\n    function taskMngr(aMngr) {\n      if (arguments.length > 0) {\n        fTaskMngr = aMngr;\n      }\n\n      return fTaskMngr;\n    }\n\n    function listeners() {\n      return listener;\n    }\n    /**\r\n     * 触发异步任务,并行任务\r\n     * @param asEvent : String  type of event\r\n     * @param aData : Object data of event;\r\n     * @return {Event}\r\n     */\n\n\n    function asynParallelTrigger(asEvent, aData, aSource) {\n      if (!enableEvent) return;\n      var ld;\n      var lsName = asEvent; //aOwner ? asEvent + \"   \" + ( aOwner.xeri ? aOwner.path.attributeCode()  : \"\"):\"\";\n\n      if (fTaskMngr) ld = fTaskMngr.parallelTasks(lsName);else ld = new ParallelTasks(lsName);\n      var lEvent = trigger(asEvent, aData, ld, aSource);\n      return lEvent; //tasks 属性中包含当前执行的并行任务\n    }\n    /**\r\n     * 触发异步序列任务\r\n     * @param asEvent : String type of event\r\n     * @param aData : Object   data of event\r\n     * @param asMessage : String  给任务的调试消息\r\n     * @return {*}\r\n     */\n\n\n    function asynSerialTrigger(asEvent, aData, asMessage, aSource) {\n      if (!enableEvent) return;\n      var lEvent;\n      var ld;\n      var lsName = asEvent; // aOwner ? asEvent + \"   \" + ( aOwner.path ? aOwner.path.attcode  : \"\"):\"\";\n\n      if (fTaskMngr) ld = fTaskMngr.serialTasks(lsName, asMessage);else ld = new SerialTasks(lsName, asMessage);\n      lEvent = trigger(asEvent, aData, ld, aSource);\n      ld.execute(); //如果有人响应就会添加步骤，这里统一执行。\n\n      return lEvent; //tasks 属性中包含当前执行的并行任务\n    }\n    /**\r\n     * 触发事件，不能阻止时间执行,异步事件必须添加aParallelTasks参数。\r\n     * @param aEvent : String or Object 事件类型\r\n     * @param aData :Object 事件数据\r\n     * @param aTasks :Task\r\n     * @return {*}\r\n     */\n\n\n    function trigger(aEvent, aData, aTasks, aSource) {\n      if (!enableEvent) return;\n      var lEvent = aEvent;\n\n      try {\n        if (typeof aEvent == \"string\") {\n          lEvent = new Event(aEvent, aData, aTasks, aSource, aOwner);\n        }\n\n        for (var i in listener) {\n          var lis = listener[i];\n\n          if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(lis.type, lEvent.type) && !lEvent.stoped) {\n            lis.listener(lEvent);\n          }\n        }\n      } catch (e) {\n        if (aTasks) {\n          aTasks.reject(e);\n        } // Utils.err(e);\n\n\n        throw e;\n      }\n\n      return lEvent;\n    }\n\n    ; //添加，如果没有参数表示打开任何时间\n\n    /**\r\n     *  添加监听者\r\n     * @param astype {String} 事件类型\r\n     * @param aListener {Function} 听众\r\n     * @param aOrder 广播监听的顺序，大优先级低，从0-9，默认为0\r\n     */\n\n    function on(astype, aListener, aOrder) {\n      if (arguments.length == 0) {\n        enableEvent = true;\n        return;\n      }\n\n      if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isEmpty(astype) || !aListener) throw new Error(\"没有提供事件类型或响应函数\");\n      enableEvent = true;\n      listener.push({\n        type: astype,\n        listener: aListener,\n        order: aOrder === undefined ? 5 : aOrder\n      });\n      listener.sort(function (a, b) {\n        a.order - b.order;\n      });\n    }\n\n    ; //删除，如果没有参数表示暂停任何事件，不删除\n\n    function off(asType, aListener) {\n      if (arguments.length == 0) {\n        enableEvent = false;\n        listener = [];\n      } else if (arguments.length == 1) {\n        var lLength = listener.length;\n\n        for (var i = lLength - 1; i >= 0; i--) {\n          var lis = listener[i];\n\n          if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(lis.type, asType)) {\n            listener.splice(i, 1);\n          }\n        }\n      } else {\n        var _lLength = listener.length;\n\n        for (var _i = _lLength - 1; _i >= 0; _i--) {\n          var _lis = listener[_i];\n\n          if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"Utils\"].isSameStr(_lis.type, asType) && _lis.listener === aListener) {\n            listener.splice(_i, 1);\n          }\n        }\n      }\n    }\n  }\n  /**\r\n   * 任务管理对象， 能够创建监控和管理任务\r\n   * 当所有任务都停止的状态下，有任务开始执行触发 OnTasksBegin ，所有任务都结束后触发  OnTasksEnd\r\n   */\n\n\n  function TaskManager(aOwner, aEventMngr) {\n    var fManager = this;\n    fManager.serialTasks = serialTasks;\n    fManager.parallelTasks = parallelTasks;\n    fManager.task = task;\n    fManager.addTask = addTask;\n    fManager.hasTask = hasTask;\n    fManager.addSubMngr = addSubMngr;\n    fManager.parentMngr = parentMngr;\n    fManager.owner = aOwner;\n    fManager.tasks = [];\n    var fName;\n\n    if (aOwner) {\n      fName = aOwner.path ? aOwner.path().attcode : \"\";\n    }\n\n    var fTasks = fManager.tasks;\n    var fSubMngrs = [];\n    var fParentMngr;\n\n    if (aEventMngr) {\n      //管理由事件产生的任务\n      aEventMngr.taskMngr(this);\n    }\n\n    return;\n    /**\r\n     *  是否包含指定名称的任务，没有指定名称表明是否有任务\r\n     * @param asTaskType\r\n     * @return {boolean}\r\n     */\n\n    function hasTask(asTaskType) {\n      if (asTaskType) {\n        var _iterator = _createForOfIteratorHelper(fTasks),\n            _step;\n\n        try {\n          for (_iterator.s(); !(_step = _iterator.n()).done;) {\n            var lt = _step.value;\n            if (lt.name === asTaskType) return true;\n          }\n        } catch (err) {\n          _iterator.e(err);\n        } finally {\n          _iterator.f();\n        }\n\n        return false;\n      } else return fTasks.length > 0;\n    }\n    /**\r\n     子任务管理者\r\n     * @param aMngr\r\n     */\n\n\n    function addSubMngr(aMngr) {\n      aMngr.parentMngr(fManager);\n      fSubMngrs.push(aMngr);\n    }\n    /**\r\n     * 父任务管理者\r\n     * @param aMngr\r\n     * @return {*}\r\n     */\n\n\n    function parentMngr(aMngr) {\n      if (arguments.length > 0) {\n        fParentMngr = aMngr;\n      }\n\n      return fParentMngr;\n    }\n    /**\r\n     *\r\n     * 创建序列任务\r\n     * @param asTaskName {string} 任务名称\r\n     * @param [asMessage] {String} 任务消息\r\n     * @return {SerialTasks}\r\n     */\n\n\n    function serialTasks(asTaskName, asMessage) {\n      var lTask = new SerialTasks(asTaskName, asMessage, function () {\n        addTask(lTask);\n      });\n      return lTask;\n    }\n    /**\r\n     * 创建并行任务\r\n     * @param [asTaskName] {String}\r\n     * @param [asMessage]  {String}\r\n     * @return {ParallelTasks}\r\n     */\n\n\n    function parallelTasks(asTaskName, asMessage) {\n      var lTask = new ParallelTasks(asTaskName, asMessage);\n      addTask(lTask);\n      return lTask;\n    }\n    /**\r\n     * 创建独立任务\r\n     * @param [asTaskName] {String}\r\n     * @param [asMessage]  {String}\r\n     * @return {Task}\r\n     */\n\n\n    function task(asTaskName, asMessage) {\n      var lTask = new Task(asTaskName, asMessage);\n      addTask(lTask);\n      return lTask;\n    }\n    /**\r\n     * 添加任务\r\n     */\n\n\n    function addTask(aTask) {\n      var lp = aTask.promise();\n\n      if (lp.state() == \"pending\") {\n        if (fTasks.length == 0 && aEventMngr) {\n          aEventMngr.trigger(\"OnTasksBegin\", aTask);\n        }\n\n        fTasks.push(aTask); //\t\t\t\t    \tconsole.log(\"task add    \" + aTask.name +\"  / \" + fName + \"/\"+fTasks.length);\n\n        lp.always(function () {\n          var lIndex = fTasks.indexOf(aTask);\n          fTasks.splice(lIndex, 1);\n\n          if (fTasks.length == 0 && aEventMngr) {\n            aEventMngr.trigger(\"OnTasksEnd\", aTask);\n          }\n        });\n\n        if (fParentMngr) {\n          fParentMngr.addTask(aTask);\n        }\n      }\n    }\n  }\n\n  myTaskEventsSelf.Task = Task;\n  myTaskEventsSelf.SerialTasks = SerialTasks;\n  myTaskEventsSelf.taskPending = taskPending;\n  myTaskEventsSelf.PropEvent = PropEvent;\n  myTaskEventsSelf.PropTaskEventOwner = PropTaskEventOwner;\n  myTaskEventsSelf.EnumExecutionType = EnumExecutionType;\n  myTaskEventsSelf.systemEvent = new EventManager(); //私有变量\n\n  var fResizeDirty = false; //触发全局的Resize事件\n\n  $(window).resize(function () {\n    fResizeDirty = true;\n    setTimeout(function () {\n      if (!fResizeDirty) return;\n      fResizeDirty = false;\n      myTaskEventsSelf.systemEvent.trigger(bas_base__WEBPACK_IMPORTED_MODULE_1__[\"EnumEvent\"].ON_RESIZE);\n    }, 500);\n  });\n}\n\nvar fTaskEvent = new PKTaskEvents();\n //import {TaskEvents} from './taskevent.js'//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 39788 characters]\n//# sourceURL=webpack-internal:///./src/bas/taskevent.js\n");

/***/ }),

/***/ "./src/bas/utils.js":
/*!**************************!*\
  !*** ./src/bas/utils.js ***!
  \**************************/
/*! exports provided: Utils */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Utils\", function() { return fUtils; });\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\r\n * 工具类\r\n * @constructor\r\n */\nfunction PKUtils() {\n  \"use strict\";\n\n  var myUtilsSelf = this;\n  var fExpParserCommonFun = new ExpParserCommonFun();\n  var fDateFormator;\n  var fDateTimeFormator;\n  myUtilsSelf.lang = navigator.language || navigator.browserLanguage; //当前浏览器语言\n\n  myUtilsSelf.Exp = Exp;\n  myUtilsSelf.ExpParserObj = ExpParserObj;\n  myUtilsSelf.expToObjs = expToObjs;\n  myUtilsSelf.deepCopy = deepCopy;\n  myUtilsSelf.objCopy = objCopy;\n  myUtilsSelf.objIndexByField = objIndexByField;\n  myUtilsSelf.strToDate = strToDate;\n  myUtilsSelf.dateToStr = dateToStr;\n  myUtilsSelf.strToUtf8Bytes = strToUtf8Bytes;\n  myUtilsSelf.strToHexCharCode = strToHexCharCode;\n  myUtilsSelf.hexToString = hexToString;\n  myUtilsSelf.stringToHex = stringToHex;\n  myUtilsSelf.getURLParam = getURLParam;\n  myUtilsSelf.setURLParam = setURLParam;\n  myUtilsSelf.getURLParams = getURLParams;\n  myUtilsSelf.getFullPageURL = getFullPageURL;\n  myUtilsSelf.getLastPartURL = getLastPartURL;\n  myUtilsSelf.hasEmptyStr = hasEmptyStr;\n  myUtilsSelf.textToObj = textToObj;\n  myUtilsSelf.xmlToString = xmlToString;\n  myUtilsSelf.hyParseFloat = hyParseFloat;\n  myUtilsSelf.trim = trim;\n  myUtilsSelf.isEmpty = isEmpty;\n  myUtilsSelf.separatedFieldValue = separatedFieldValue;\n  myUtilsSelf.strtoBool = strtoBool;\n  myUtilsSelf.stringSort = stringSort;\n  myUtilsSelf.isSameStr = isSameStr;\n  myUtilsSelf.endWith = endWith;\n  myUtilsSelf.containStr = containStr;\n  myUtilsSelf.readFile = readFile;\n  myUtilsSelf.asynOpenBase64File = asynOpenBase64File;\n  myUtilsSelf.downloadBase64File = downloadBase64File;\n  myUtilsSelf.isFalsy = isFalsy;\n  myUtilsSelf.ValueObjects = ValueObjects;\n  myUtilsSelf.localStore = localStore;\n  myUtilsSelf.notify = notify;\n  myUtilsSelf.alert = alert;\n  myUtilsSelf.asynConfirm = asynConfirm;\n  myUtilsSelf.asynYesNoCancel = asynYesNoCancel;\n  myUtilsSelf.playSound = playSound;\n  myUtilsSelf.readTextCmd = readTextCmd;\n  myUtilsSelf.getUserMedia = getUserMedia;\n  myUtilsSelf.takePicture = takePicture;\n  myUtilsSelf.err = err;\n  myUtilsSelf.dataURItoBlob = dataURItoBlob;\n  myUtilsSelf.showLoadPanel = showLoadPanel;\n  myUtilsSelf.LoadPanel = LoadPanel;\n  myUtilsSelf.aysnLoadPanelForSecond = aysnLoadPanelForSecond;\n  myUtilsSelf.nodeAttStr = nodeAttStr;\n  myUtilsSelf.nodeAttInt = nodeAttInt;\n  myUtilsSelf.nodeAttFloat = nodeAttFloat;\n  myUtilsSelf.nodeAttIs = nodeAttIs;\n  myUtilsSelf.nodeAttBoolean = nodeAttBoolean;\n  myUtilsSelf.nodeInDoc = nodeInDoc;\n  myUtilsSelf.startWith = startWith;\n  myUtilsSelf.ppPathToID = ppPathToID;\n  myUtilsSelf.nextSn = new nextSn();\n  myUtilsSelf.loadCssCode = loadCssCode;\n  myUtilsSelf.launchIntoFullscreen = launchIntoFullscreen; //进入全屏\n\n  myUtilsSelf.exitFullscreen = exitFullscreen; //退出全屏\n\n  myUtilsSelf.isFullscreen = isFullscreen; //是否全屏\n\n  myUtilsSelf.uuid = uuid;\n  myUtilsSelf.dateDiffInDays = dateDiffInDays;\n  myUtilsSelf.dateTrim = dateTrim;\n  myUtilsSelf.dateAdd = dateAdd;\n  myUtilsSelf.monthAdd = monthAdd;\n  myUtilsSelf.yearAdd = yearAdd;\n  myUtilsSelf.round = round;\n  myUtilsSelf.TemplateMngr = TemplateMngr;\n  myUtilsSelf.DynamicExpMessage = DynamicExpMessage;\n  myUtilsSelf.formatMoney = formatMoney;\n  myUtilsSelf.parseInteger = parseInteger;\n  myUtilsSelf.asynPutUploadFile = asynPutUploadFile;\n  myUtilsSelf.asynPostFormatData = asynPostFormatData;\n  myUtilsSelf.formatdt = formatdt;\n  myUtilsSelf.encodeUtf8 = encodeUtf8;\n  myUtilsSelf.decodeUtf8 = decodeUtf8;\n  myUtilsSelf.buf2hex = buf2hex;\n  myUtilsSelf.getParamsInStr = getParamsInStr;\n  myUtilsSelf.setHTMLRootFontSize = setHTMLRootFontSize;\n\n  myUtilsSelf.root = function () {\n    return $(\"body\");\n  }; //系统的根节点，用于弹出窗口等空间的\n\n\n  myUtilsSelf.containerNode = function () {\n    return $(\"body\");\n  }; //用于承载弹出窗口的节点\n\n\n  myUtilsSelf.replaceURLThumbtoOrgin = replaceURLThumbtoOrgin;\n  load();\n\n  function load() {\n    Date.prototype.format = function (fmt) {\n      var o = {\n        \"M+\": this.getMonth() + 1,\n        //月份\n        \"d+\": this.getDate(),\n        //日\n        \"h+\": this.getHours(),\n        //小时\n        \"m+\": this.getMinutes(),\n        //分\n        \"s+\": this.getSeconds(),\n        //秒\n        \"q+\": Math.floor((this.getMonth() + 3) / 3),\n        //季度\n        \"S\": this.getMilliseconds() //毫秒\n\n      };\n\n      if (/(y+)/.test(fmt)) {\n        fmt = fmt.replace(RegExp.$1, (this.getFullYear() + \"\").substr(4 - RegExp.$1.length));\n      }\n\n      for (var k in o) {\n        if (new RegExp(\"(\" + k + \")\").test(fmt)) {\n          fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : (\"00\" + o[k]).substr((\"\" + o[k]).length));\n        }\n      }\n\n      return fmt;\n    };\n  }\n\n  function formatMoney(je) {\n    return new Intl.NumberFormat(\"zh\", {\n      style: \"currency\",\n      currency: \"CNY\"\n    }).format(je);\n  }\n\n  function formatdt(aDate, fmt) {\n    if (!aDate) return \"\";\n    if (!fmt) fmt = \"yyyy-MM-dd\";\n    return new Date(aDate).format(fmt);\n  }\n  /**\r\n   * 获得字符串中的参数并以数组的形式放回\r\n   *\r\n   * @param asStr\r\n   * @returns {*[]|*}\r\n   */\n\n\n  function getParamsInStr(asStr) {\n    // var str = '订单号bai：{0}，交易商品：du{1}，初步估zhi价：{2}元' 返回 [{0},\"{1}\",\"{2}\"]\n    length: 3;\n\n    if (isEmpty(asStr)) return [];\n    return asStr.match(/{(.*?)}/g);\n  }\n  /**\r\n   * 能够去除所有的非数字的字符\r\n   * @param aStr\r\n   * @return {number}\r\n   */\n\n\n  function parseInteger(aStr) {\n    if (isEmpty(aStr)) return NaN;\n    var q = \"\";\n\n    var _iterator = _createForOfIteratorHelper(aStr),\n        _step;\n\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var c = _step.value;\n        if (!isNaN(c)) q += c;\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n\n    return parseInt(q);\n  }\n  /**\r\n   *  计算天数差 date2-date1\r\n   * @param date1\r\n   * @param date2\r\n   * @return {number}\r\n   */\n\n\n  function dateDiffInDays(date1, date2) {\n    var dt1 = new Date(date1);\n    var dt2 = new Date(date2);\n    return Math.floor((Date.UTC(dt2.getFullYear(), dt2.getMonth(), dt2.getDate()) - Date.UTC(dt1.getFullYear(), dt1.getMonth(), dt1.getDate())) / (1000 * 60 * 60 * 24));\n  }\n\n  function dateAdd(aDate, aValue) {\n    if (!aDate || !aValue) {\n      return aDate;\n    }\n\n    var lDate = new Date(aDate);\n    lDate.setDate(lDate.getDate() + aValue);\n    return lDate;\n  }\n  /**\r\n   * 月份加减\r\n   * @param aDate 日期\r\n   * @param aValue 整数位增加 ，负数为减法\r\n   */\n\n\n  function monthAdd(aDate, aValue) {\n    if (!aDate || !aValue) {\n      return aDate;\n    }\n\n    var lDate = new Date(aDate);\n    lDate.setMonth(lDate.getMonth() + aValue); // 输出日期格式为毫秒形式1551398400000\n\n    return lDate;\n  }\n\n  function yearAdd(aDate, aValue) {\n    if (!aDate || !aValue) {\n      return aDate;\n    }\n\n    var lDate = new Date(aDate);\n    lDate.setFullYear(lDate.getFullYear() + aValue); // 输出日期格式为毫秒形式1551398400000\n\n    return lDate;\n  }\n  /**\r\n   *去掉事件部分\r\n   */\n\n\n  function dateTrim(aDate) {\n    if (!aDate) {\n      return aDate;\n    }\n\n    return new Date(aDate.getFullYear(), aDate.getMonth(), aDate.getDate());\n  }\n\n  function round(adata, apre) {\n    if (adata === null || adata === undefined) return null;\n    return Math.round(adata * Math.pow(10, apre)) / Math.pow(10, apre);\n  }\n\n  function uuid() {\n    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n      var r = Math.random() * 16 | 0,\n          v = c == 'x' ? r : r & 0x3 | 0x8;\n      return v.toString(16);\n    });\n  } // function createDivNode(aNode) {\n  //     let lNode;\n  //     if(aNode) {\n  //         lNode = aNode;\n  //     }else {\n  //         lNode = $(`<div></div>`);\n  //     }\n  //     fHideNodeInBody.append(lNode);\n  //     return lNode;\n  // }\n\n  /**\r\n   *  添加Css代码，返回添加后的节点\r\n   * @param code {String} css 代码\r\n   * @return {jQuery.fn.init|jQuery|HTMLElement}\r\n   */\n\n\n  function loadCssCode(code, aParentNode) {\n    var style = document.createElement('style');\n    style.type = 'text/css';\n    style.rel = 'stylesheet';\n\n    try {\n      //for Chrome Firefox Opera Safari\n      style.appendChild(document.createTextNode(code));\n    } catch (ex) {\n      //for IE\n      style.styleSheet.cssText = code;\n    }\n\n    var ln = $(style);\n\n    if (aParentNode) {\n      aParentNode.append(ln);\n    } else {\n      var head = document.getElementsByTagName('head')[0];\n      head.appendChild(style);\n    }\n\n    return ln;\n  }\n  /**\r\n   *\r\n   * @param aNode\r\n   * @param asAtt\r\n   * @param asDefaultValue\r\n   * @param asEmptyMsg  如果没有设定属性，触发的异常消息\r\n   * @return {*|jQuery|string}\r\n   */\n\n\n  function nodeAttStr(aNode, asAtt, asDefaultValue, asEmptyMsg) {\n    var lsValue;\n\n    if (aNode.length > 0) {\n      lsValue = aNode.attr(asAtt);\n    }\n\n    if (isEmpty(lsValue)) {\n      if (asEmptyMsg) throw Error(asEmptyMsg);\n      if (arguments.length > 2) lsValue = asDefaultValue;else lsValue = \"\";\n    }\n\n    return lsValue;\n  }\n\n  function nodeAttInt(aNode, asAtt, aDefaultValue, asEmptyMsg) {\n    var lValue;\n\n    if (aNode.length > 0) {\n      lValue = parseInt(aNode.attr(asAtt));\n    }\n\n    if (isNaN(lValue) || lValue === undefined || lValue === null) {\n      if (arguments.length > 3) {\n        throw new Error(asEmptyMsg);\n      } else if (arguments.length > 2) {\n        lValue = aDefaultValue;\n      } else {\n        lValue = 0;\n      }\n    }\n\n    return lValue;\n  }\n\n  function nodeAttFloat(aNode, asAtt, aDefaultValue) {\n    var lValue;\n\n    if (aNode.length > 0) {\n      lValue = parseFloat(aNode.attr(asAtt));\n    }\n\n    if (isNaN(lValue) || lValue === undefined || lValue === null) {\n      if (arguments.length > 2) {\n        lValue = aDefaultValue;\n      } else {\n        lValue = 0;\n      }\n    }\n\n    return lValue;\n  }\n\n  function nodeAttBoolean(aNode, asAtt, aDefaultValue) {\n    var lValue;\n    lValue = aNode.attr(asAtt);\n\n    if (lValue === undefined || lValue === null) {\n      if (arguments.length > 2) {\n        lValue = aDefaultValue;\n      } else {\n        lValue = false;\n      }\n\n      return lValue;\n    } else {\n      return isSameStr(lValue, \"TRUE\");\n    }\n  }\n\n  function nodeAttIs(aNode, asAtt, aDefaultValue) {\n    var lsValue = aNode.attr(asAtt);\n    return isSameStr(lsValue, aDefaultValue);\n  }\n\n  function nodeInDoc(aNode) {\n    if (aNode.length == 0) return false;else return $.contains(document, aNode[0]);\n  }\n  /**\r\n   * [获取URL中的参数名及参数值的集合]\r\n   */\n\n\n  function urlParam(urlStr, asParamName) {\n    var url = \"\";\n\n    if (typeof urlStr == \"undefined\") {\n      url = decodeURI(location.search); //获取url中\"?\"符后的字符串\n    } else {\n      url = \"?\" + urlStr.split(\"?\")[1];\n    }\n\n    var theRequest = new Object();\n\n    if (url.indexOf(\"?\") != -1) {\n      var str = url.substr(1);\n      var strs = str.split(\"&\");\n\n      for (var i = 0; i < strs.length; i++) {\n        theRequest[strs[i].split(\"=\")[0]] = decodeURI(strs[i].split(\"=\")[1]);\n      }\n    }\n\n    if (asParamName) {\n      for (var latt in theRequest) {\n        if (isSameStr(asParamName, latt)) {\n          return theRequest[latt];\n        }\n      }\n    } else {\n      return theRequest;\n    }\n  }\n\n  function replaceURLThumbtoOrgin(asURL) {\n    if (this.isEmpty(asURL)) {\n      return;\n    }\n\n    if (asURL.indexOf(\"?\") < 0) {\n      return asURL;\n    }\n\n    var lsStr = asURL.split(\"?\");\n    var lsKey = decodeURIComponent(urlParam(asURL, \"key\"));\n\n    if (!lsKey || !lsKey.startsWith(\"{\")) {\n      return asURL;\n    }\n\n    var lObj = JSON.parse(lsKey);\n    lObj[\"thumb\"] = false;\n    lObj.enddate = new Date(new Date().getTime() + 600 * 1000).toISOString();\n    var lsResult = lsStr[0] + \"?key=\" + encodeURIComponent(JSON.stringify(lObj));\n    return lsResult;\n  }\n  /**\r\n   *\r\n   *\r\n   * @param dataURI {String} //data:application/pdf;base64,...\r\n   * @return {Blob}\r\n   */\n\n\n  function dataURItoBlob(dataURI) {\n    // convert base64 to raw binary data held in a string\n    var byteString = atob(dataURI.split(',')[1]); // separate out the mime component\n\n    var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]; // write the bytes of the string to an ArrayBuffer\n\n    var arrayBuffer = new ArrayBuffer(byteString.length);\n\n    var _ia = new Uint8Array(arrayBuffer);\n\n    for (var i = 0; i < byteString.length; i++) {\n      _ia[i] = byteString.charCodeAt(i);\n    }\n\n    var dataView = new DataView(arrayBuffer);\n    var blob = new Blob([dataView], {\n      type: mimeString\n    });\n    return blob;\n  }\n  /***\r\n   * 表达式对象\r\n   * value() 计算表达式值\r\n   * exp() 解析后的表达式\r\n   * parsers(asName)获得parser数组或某个名称的parser\r\n   *  参数： asExp 表达式 ，parsers 表达式token解析对象。 能够将 能够对标识符，函数进行解析。\r\n   *  事件：\r\n   *  能够进行表达式编译，转化为js 函数的调用。\r\n   *  parser [{name,value}]   value 包含函数 ( parseToken(){ typeof eval(token) =='function' return token}\r\n   *  mySelf[row].field(value)\r\n   *  parsers = [{name:'row',value: new ExpParserObj()}];\r\n   *  所有表达式解析对象，只要实现了parseToken 就可以。\r\n   *  使用方法，\r\n   *  let lExp = new Exp(); //创建表达式对象\r\n   *  通过 parsers 增加解析对象\r\n   *  lExp.compile('expression');//编译表达式\r\n   *  lExp.value(); //计算表达式的值\r\n   *  hy_CurrentExpression 每个解析对象用来记录当前表达式\r\n   * @param myExpSelf\r\n   * @constructor\r\n   */\n\n\n  function Exp(myExpSelf) {\n    myExpSelf = myExpSelf || this;\n    myExpSelf.parsers = parsers;\n    myExpSelf.value = value;\n    myExpSelf.compile = compile; //编译表达式\n    //public\n\n    myExpSelf.valueFunction = null;\n    var fExpressOrginal; //原始表达式\n\n    var fParsers = []; //所有的表达式解析对象\n\n    var fExp = ''; //编译结果表达式\n    //注册通用的函数解析对象\n\n    parsers(\"__cmfn\", fExpParserCommonFun);\n    return;\n\n    function value() {\n      if (myExpSelf.valueFunction) {\n        try {\n          var lValue = myExpSelf.valueFunction(myExpSelf);\n          return lValue;\n        } catch (err) {\n          err.message = err.message + \"  \" + \"错误表达式 执行过程 \" + fExpressOrginal + \" 编译结果 \" + fExp;\n          throw err;\n        }\n      } else throw new Error(\"错误表达式编译\" + fExpressOrginal + \" 编译结果 \" + fExp);\n    }\n    /**\r\n     * 获得或者增加 parser\r\n     * parsers();//获得parser数组\r\n     * parsers(aArrayOfParsers) //增加多个parser\r\n     * parsers(asName,aParser);//增加一个parser\r\n     * parsers(asName);  //返回指定名称的parser\r\n     */\n\n\n    function parsers(asName, aValue) {\n      if (arguments.length > 1) {\n        fParsers.push({\n          name: asName,\n          value: aValue\n        });\n        myExpSelf[asName] = aValue;\n      } else if (arguments.length == 1) {\n        if (Array.isArray(asName)) {\n          //如果传递的是数组，那么是[{name :   value :}] 类型的parser集合\n          for (var i = 0; i < asName.length; i++) {\n            var lIndex = -1;\n\n            for (var j = 0; j < fParsers.length; j++) {\n              var lp = fParsers[j];\n\n              if (isSameStr(lp.name, asName[i].name)) {\n                lIndex = j;\n                break;\n              }\n            }\n\n            if (lIndex >= 0) {\n              fParsers.splice(lIndex, 1, {\n                name: asName[i].name,\n                value: asName[i].value\n              });\n            } else {\n              fParsers.push(asName[i]);\n            }\n\n            myExpSelf[asName[i].name] = asName[i].value;\n          }\n\n          return fParsers;\n        } else {\n          //获得指定名称的\n          var _lp;\n\n          $.each(fParsers, function (index, item) {\n            if (item.name == asName) {\n              _lp = item;\n              return false;\n            }\n          });\n          return _lp;\n        }\n      } else return fParsers;\n    }\n    /**\r\n     * 给sum的参数增加引号\r\n     */\n\n\n    function replaceOldSum(asExp) {\n      var lsExp = asExp;\n      var lReg = /sum[\\s]*[\\(][^\\\"\\'][^\\)]*[^\\'\\\"][\\)]/i.exec(\" \" + lsExp);\n\n      while (lReg) {\n        var lsTemp = lReg[0];\n        var len = lReg[0].length;\n        var lIndex = lsTemp.indexOf('(');\n        lsTemp = lsTemp.substr(0, lIndex + 1) + \"\\\"\" + lsTemp.substr(lIndex + 1, lsTemp.length - lIndex - 2) + \"\\\")\";\n        lIndex = lReg.index;\n        lsExp = lsExp.substr(0, lIndex - 1) + lsTemp + lsExp.substr(lIndex + len - 1, lsExp.length - lIndex - len + 1);\n        lReg = /sum[\\s]*[\\(][^\\\"\\'][^\\)]*[^\\'\\\"][\\)]/i.exec(\" \" + lsExp);\n      }\n\n      return lsExp;\n    }\n    /**进行表达式的编译，解析，替换为能够被js解释的表达式*/\n\n\n    function compile(asexp) {\n      fExpressOrginal = asexp;\n      myExpSelf.expOriginal = asexp;\n      asexp = asexp.replace(\"\\[\", \" \").replace(\"\\]\", \" \");\n      asexp = replaceOldSum(asexp); //替换没有引号参数的sum\n\n      while (true) {\n        if (!asexp) break;\n        asexp = asexp.trim();\n        if (tokenNum()) //数字常量\n          continue;else if (tokenStr()) //字符串常量\n          continue;else if (tokenOperatorAndKh()) //括号和操作符号\n          continue;else if (tokenConstValue()) //其他常量 true,false,null\n          continue;else if (tokenKHIdentifer()) {\n          //带中括号的标识符\n          continue;\n        } else if (tokenIdentifer()) {\n          //标识符\n          continue;\n        } else {\n          break;\n        }\n      }\n\n      if (fExp) {\n        try {\n          myExpSelf.valueFunction = new Function(\"myExpSelf\", \" return \" + fExp + \";\");\n          myExpSelf.exp = fExp;\n        } catch (e) {\n          myExpSelf.valueFunction = undefined;\n          throw Error(\"错误表达式\" + fExpressOrginal + \":=>\" + fExp);\n        }\n      } else {\n        myExpSelf.valueFunction = undefined;\n        throw Error(\"错误表达式\" + fExpressOrginal + \":=>\" + fExp);\n      }\n\n      return; //------------------------------------------------\n\n      function tokenNum() {\n        //常数\n        var tk = /^[0-9]+[\\.]?[0-9]*/.exec(asexp);\n\n        if (tk) {\n          advance(tk);\n          return true;\n        } else return false;\n      }\n\n      function tokenStr() {\n        //字符串 单引号，双引号\n        var tk = /(^['][^']*['])|(^[\"][^\"]*[\"])/.exec(asexp);\n\n        if (tk) {\n          advance(tk);\n          return true;\n        } else return false;\n      }\n\n      function tokenOperatorAndKh() {\n        //运算符\n        var tk = /(^<>)/.exec(asexp); //不等于\n\n        if (tk) {\n          advance(tk, \"!=\");\n          return true;\n        }\n\n        tk = /(^[\\(\\)\\*\\+-/!])|(^==)|(^>=)|(^<=)|(^[><])/.exec(asexp); // ( _ * + - / !  ==\n\n        if (tk) {\n          advance(tk);\n          return true;\n        }\n\n        tk = /(^and[\\s]+)/i.exec(asexp);\n\n        if (tk) {\n          advance(tk, \"&& \");\n          return true;\n        }\n\n        tk = /(^or[\\s]+)/i.exec(asexp);\n\n        if (tk) {\n          advance(tk, \"|| \");\n          return true;\n        }\n\n        return false;\n      }\n\n      function tokenConstValue() {\n        //其他常量  true  false\n        var tk = /(^true[\\s]*)|(^true$)/i.exec(asexp);\n\n        if (tk) {\n          advance(tk, \"true \");\n          return true;\n        }\n\n        tk = /(^false[\\s]*)|(^false$)/i.exec(asexp);\n\n        if (tk) {\n          advance(tk, \"false \");\n          return true;\n        }\n\n        tk = /(^null[\\s]*)|(^null$)/i.exec(asexp);\n\n        if (tk) {\n          advance(tk, \"null \");\n          return true;\n        }\n\n        return false;\n      }\n\n      function sumFun() {//let t= /^[\\(][^\\)]*[\\)]/.exec(\"(a+b)sdf)\")[0]    sum的参数没有引号，认为是错误的。\n      }\n\n      function tokenKHIdentifer() {\n        var tk = /^\\[[^\\]]+\\]/.exec(asexp);\n\n        if (tk) {\n          var ls = tk[0];\n          ls = ls.substr(1, ls.length - 2);\n          var lsValue = parseIdentifer(tk, ls);\n\n          if (lsValue) {\n            advance(tk, lsValue);\n            return true;\n          }\n\n          return false;\n        } else return false;\n      }\n      /**\r\n       * 函数或者字段名称,函数，替换为parse解释的函数或者表达式。\r\n       *  冒号是可以替换的表达式，在编辑计算中使用\r\n       *\r\n       */\n\n\n      function tokenIdentifer() {\n        var tk = /^[_A-z:][0-9A-z_]*/.exec(asexp);\n\n        if (tk) {\n          var lsValue = parseIdentifer(tk, tk[0]);\n\n          if (lsValue) {\n            advance(tk, lsValue);\n            return true;\n          }\n\n          return false;\n        } else return false;\n      }\n\n      function parseIdentifer(astk, asToken) {\n        if (asToken == \"editds\") {\n          console.log(asToken);\n        }\n\n        var lsValue;\n        var lsRestExp = asexp.substr(astk[0].length, asexp.length - astk[0].length);\n        $.each(fParsers, function (index, item) {\n          lsValue = item.value.parseToken(asToken, lsRestExp);\n\n          if (lsValue) {\n            lsValue = \"myExpSelf.\" + item.name + \".\" + lsValue;\n            return false;\n          }\n        });\n        if (!lsValue) throw new Error(\"错误标识符 \" + asToken + \" 在表达式 \" + fExpressOrginal);\n        return lsValue;\n      } //前进一个token,返回   ab123\n\n\n      function advance(astk, asParsedValue) {\n        var lsValue = astk[0];\n        fExp = fExp + \" \" + (asParsedValue ? asParsedValue : lsValue);\n        asexp = asexp.substr(lsValue.length, asexp.length - lsValue.length);\n      }\n    } //endof compile\n\n  } //end ofExp\n\n  /**\r\n   * 可以把一个对象的属性作为表达式公式来解析的对象\r\n   * @param myExpParserObjSelf {this}\r\n   * @constructor\r\n   */\n\n\n  function ExpParserObj(myExpParserObjSelf, aObj) {\n    myExpParserObjSelf = myExpParserObjSelf || this;\n    myExpParserObjSelf.parseToken = parseToken;\n    myExpParserObjSelf.field = field;\n    myExpParserObjSelf.obj = obj; //设置函数\n\n    var fObj = aObj;\n    return;\n    /**\r\n     * 对象\r\n     * @param aObj\r\n     * @return {*}\r\n     */\n\n    function obj(aObj) {\n      if (arguments.length > 0) {\n        fObj = aObj;\n      }\n\n      return fObj;\n    }\n\n    function parseToken(asToken) {\n      //expression 调用来行程替换的表达式\n      asToken = asToken.trim();\n\n      for (var lsProp in fObj) {\n        if (Utils.isSameStr(lsProp, asToken)) {\n          return \"field('\" + lsProp + \"')\";\n        }\n      }\n\n      return '';\n    }\n\n    function field(asName) {\n      return fObj[asName];\n    }\n  }\n  /**\r\n   * 通用函数 解析\r\n   */\n\n\n  function ExpParserCommonFun(myExpParserCommonFunSelf) {\n    myExpParserCommonFunSelf = myExpParserCommonFunSelf || this;\n    myExpParserCommonFunSelf.parseToken = parseToken; //可以在表达式中使用的公共函数\n\n    myExpParserCommonFunSelf.trim = trim;\n    myExpParserCommonFunSelf.isEmpty = isEmpty;\n    myExpParserCommonFunSelf[\"if\"] = iif;\n    myExpParserCommonFunSelf[\"iif\"] = iif;\n    myExpParserCommonFunSelf.str = str;\n    myExpParserCommonFunSelf.abs = abs;\n    myExpParserCommonFunSelf.isnull = isnull;\n    myExpParserCommonFunSelf.round = round;\n    myExpParserCommonFunSelf.roundUp = roundUp;\n    myExpParserCommonFunSelf.roundDown = roundDown;\n    myExpParserCommonFunSelf.roundpro = roundpro;\n    myExpParserCommonFunSelf.formatdt = formatdt;\n    myExpParserCommonFunSelf.right = right;\n    myExpParserCommonFunSelf.left = left;\n    myExpParserCommonFunSelf.upper = upper;\n    myExpParserCommonFunSelf.lower = lower;\n    myExpParserCommonFunSelf[\"double\"] = fdouble;\n    myExpParserCommonFunSelf[\"int\"] = fint;\n    myExpParserCommonFunSelf.strToDate = strToDate;\n    myExpParserCommonFunSelf.now = now;\n    myExpParserCommonFunSelf.zero = zero;\n    myExpParserCommonFunSelf.iszero = iszero;\n    myExpParserCommonFunSelf.power = power;\n    myExpParserCommonFunSelf.rmb = rmb;\n    myExpParserCommonFunSelf.dateAdd = dateAdd;\n    myExpParserCommonFunSelf.monthAdd = monthAdd;\n    myExpParserCommonFunSelf.yearAdd = yearAdd;\n    myExpParserCommonFunSelf.dateSub = dateSub;\n    myExpParserCommonFunSelf.quotedStr = quotedStr;\n    myExpParserCommonFunSelf.valueOf = valueOf;\n    myExpParserCommonFunSelf.choose = choose;\n    myExpParserCommonFunSelf.replace = replace;\n    myExpParserCommonFunSelf.replaceChar = replaceChar;\n    myExpParserCommonFunSelf.pos = pos;\n    myExpParserCommonFunSelf.subStr = subStr;\n    myExpParserCommonFunSelf.length = length;\n    myExpParserCommonFunSelf.mod = mod;\n    myExpParserCommonFunSelf.comb = comb;\n    myExpParserCommonFunSelf.execScript = execScript;\n    myExpParserCommonFunSelf.valueList = valueList;\n    myExpParserCommonFunSelf.enMoney = enMoney;\n    myExpParserCommonFunSelf.subword = subword;\n    myExpParserCommonFunSelf.monthindex = monthindex;\n    myExpParserCommonFunSelf.monthdate = monthdate;\n    return;\n\n    function parseToken(asToken) {\n      for (var lsProp in myExpParserCommonFunSelf) {\n        if (isSameStr(lsProp, asToken)) {\n          if (lsProp == \"if\") return \"iif\";else return lsProp;\n        }\n      }\n\n      return '';\n    }\n\n    function str(aValue) {\n      return String(aValue);\n    }\n    /**\r\n     * 表达式可用的通用函数\r\n     */\n\n\n    function trim(asStr) {\n      return $.trim(asStr);\n    }\n    /**\r\n     * 是否为falsy值\r\n     */\n\n\n    function isEmpty(aValue) {\n      if (!aValue) return true;\n\n      if (typeof aValue == \"string\") {\n        aValue = aValue.trim();\n      }\n\n      return aValue ? false : true;\n    }\n    /**\r\n     * if 函数\r\n     */\n\n\n    function iif(aValue, aValue1, aValue2) {\n      if (aValue) return aValue1;else return aValue2;\n    }\n    /**\r\n     * 绝对值函数\r\n     */\n\n\n    function abs(aValue) {\n      return Math.abs(aValue);\n    }\n\n    function isnull(aValue, aValue1) {\n      if (arguments.length == 1) {\n        return !aValue;\n      } else if (arguments.length >= 2) {\n        return aValue ? aValue : aValue1;\n      } else {\n        throw new Error(\"null 函数没有参数\");\n      }\n    }\n\n    function round(aValue, aPre) {\n      if (aValue === null || aValue === undefined) return;\n      return Math.round(aValue * Math.pow(10, aPre)) / Math.pow(10, aPre);\n    }\n    /**\r\n     * 奇偶不同的四舍五入\r\n     * @param aValue\r\n     * @param aPre\r\n     * @return {*}\r\n     */\n\n\n    function roundpro(aValue, aPre) {\n      if (!aValue) return aValue;\n      aPre = aPre ? aPre : 0;\n      return Number(aValue.toFixed(aPre));\n    }\n\n    function roundUp(aValue, aPre) {\n      aPre = aPre ? aPre : 0;\n      aValue = aValue * Math.power(aPre, 10);\n      return Math.ceil(aValue) / Math.power(aPre, 10);\n    }\n\n    function roundDown(aValue, aPre) {\n      aPre = aPre ? aPre : 0;\n      aValue = aValue * Math.power(aPre, 10);\n      return Math.floor(aValue) / Math.power(aPre, 10);\n    } //从右侧取字符串\n\n\n    function right(aValue, count) {\n      if (aValue == null || aValue == undefined) {\n        return \"\";\n      }\n\n      return aValue.substr(-count);\n    } //从左侧取指定数量字符串\n\n\n    function left(aValue, count) {\n      if (aValue == null || aValue == undefined) {\n        return \"\";\n      }\n\n      return aValue.substr(0, count);\n    } // 子字符串的位置\n\n\n    function pos(aValueStr, asSubStr) {\n      if (aValueStr == null || aValueStr == undefined) {\n        return -1;\n      }\n\n      return aValueStr.indexOf(asSubStr) + 1;\n    } //大写字符\n\n\n    function upper(aValue) {\n      if (aValue == null || aValue == undefined) {\n        return \"\";\n      }\n\n      return aValue.toUpperCase();\n    } //小写字符\n\n\n    function lower(aValue) {\n      if (aValue == null || aValue == undefined) {\n        return \"\";\n      }\n\n      return aValue.toLowerCase();\n    } //子字符串\n\n\n    function subStr(aValue, start, count) {\n      if (aValue == null || aValue == undefined) {\n        return \"\";\n      }\n\n      return aValue.substr(start - 1, count);\n    } //字符串转换数值\n\n\n    function fdouble(aValue) {\n      return parseFloat(aValue);\n    } //字符串转换为整数\n\n\n    function fint(aValue) {\n      return parseInteget(aValue);\n    } //参数是 0返回0 否则返回1\n\n\n    function zero(aValue) {\n      return aValue == 0 ? 0 : 1;\n    } //如果是 0 返回value1，否则返回avalue\n\n\n    function iszero(aValue, aValue1) {\n      return aValue ? aValue : aValue1;\n    } //\n\n\n    function power(aValue, aPower) {\n      return Math.pow(aValue, aPower);\n    } //转换为大写人民币\n\n\n    function rmb(money) {\n      //汉字的数字\n      var cnNums = new Array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'); //基本单位\n\n      var cnIntRadice = new Array('', '拾', '佰', '仟'); //对应整数部分扩展单位\n\n      var cnIntUnits = new Array('', '万', '亿', '兆'); //对应小数部分单位\n\n      var cnDecUnits = new Array('角', '分', '毫', '厘'); //整数金额时后面跟的字符\n\n      var cnInteger = '整'; //整型完以后的单位\n\n      var cnIntLast = '元'; //最大处理的数字\n\n      var maxNum = 999999999999999.9999; //金额整数部分\n\n      var integerNum; //金额小数部分\n\n      var decimalNum; //输出的中文金额字符串\n\n      var chineseStr = ''; //分离金额后用的数组，预定义\n\n      var parts;\n\n      if (typeof money == \"string\") {\n        if (money == '') {\n          return '';\n        }\n\n        money = parseFloat(money);\n      }\n\n      if (money >= maxNum) {\n        //超出最大处理数字\n        return '';\n      }\n\n      if (money == 0) {\n        chineseStr = cnNums[0] + cnIntLast + cnInteger;\n        return chineseStr;\n      } //转换为字符串\n\n\n      money = money.toString();\n\n      if (money.indexOf('.') == -1) {\n        integerNum = money;\n        decimalNum = '';\n      } else {\n        parts = money.split('.');\n        integerNum = parts[0];\n        decimalNum = parts[1].substr(0, 4);\n      } //获取整型部分转换\n\n\n      if (parseInteget(integerNum, 10) > 0) {\n        var zeroCount = 0;\n        var IntLen = integerNum.length;\n\n        for (var i = 0; i < IntLen; i++) {\n          var n = integerNum.substr(i, 1);\n          var p = IntLen - i - 1;\n          var q = p / 4;\n          var m = p % 4;\n\n          if (n == '0') {\n            zeroCount++;\n          } else {\n            if (zeroCount > 0) {\n              chineseStr += cnNums[0];\n            } //归零\n\n\n            zeroCount = 0;\n            chineseStr += cnNums[parseInteget(n)] + cnIntRadice[m];\n          }\n\n          if (m == 0 && zeroCount < 4) {\n            chineseStr += cnIntUnits[q];\n          }\n        }\n\n        chineseStr += cnIntLast;\n      } //小数部分\n\n\n      if (decimalNum != '') {\n        var decLen = decimalNum.length;\n\n        for (var _i = 0; _i < decLen; _i++) {\n          var _n = decimalNum.substr(_i, 1);\n\n          if (_n != '0') {\n            chineseStr += cnNums[Number(_n)] + cnDecUnits[_i];\n          }\n        }\n      }\n\n      if (chineseStr == '') {\n        chineseStr += cnNums[0] + cnIntLast + cnInteger;\n      } else if (decimalNum == '') {\n        chineseStr += cnInteger;\n      }\n\n      return chineseStr;\n    }\n\n    function now() {\n      return new Date();\n    }\n\n    function strToDate(aDate) {\n      if (!aDate) {\n        return null;\n      }\n\n      var ldt = new Date(aDate);\n\n      if (ldt == \"Invalid Date\") {\n        return null;\n      }\n\n      return ldt;\n    }\n\n    function formatdt(aValue, asFormat) {\n      if (!aValue) {\n        return \"\";\n      }\n\n      return new Date(aValue).format(asFormat);\n    }\n\n    function dateAdd(aDate, aValue) {\n      if (!aDate || !aValue) {\n        return aDate;\n      }\n\n      var lDate = new Date(aDate);\n      lDate.setDate(lDate.getDate() + aValue);\n      return lDate;\n    }\n    /**\r\n     * 月份加减\r\n     * @param aDate 日期\r\n     * @param aValue 整数位增加 ，负数为减法\r\n     */\n\n\n    function monthAdd(aDate, aValue) {\n      if (!aDate || !aValue) {\n        return aDate;\n      }\n\n      var lDate = new Date(aDate);\n      lDate.setMonth(lDate.getMonth() + aValue); // 输出日期格式为毫秒形式1551398400000\n\n      return lDate;\n    }\n\n    function yearAdd(aDate, aValue) {\n      if (!aDate || !aValue) {\n        return aDate;\n      }\n\n      var lDate = new Date(aDate);\n      lDate.setFullYear(lDate.getFullYear() + aValue); // 输出日期格式为毫秒形式1551398400000\n\n      return lDate;\n    }\n    /**\r\n     * 两个日期相减\r\n     * @param aDate\r\n     * @param aValue\r\n     * @return {null|number}\r\n     */\n\n\n    function dateSub(aDate, aValue) {\n      var ld2 = strToDate(aValue);\n      var ld1 = strToDate(aDate);\n\n      if (ld1 && ld2) {\n        return (ld2.getTime() - ld1.getTime()) / (60000 * 60 * 24);\n      } else {\n        return null;\n      }\n    }\n\n    function quotedStr(aValue) {}\n\n    function valueOf(aValue) {}\n\n    function choose(aValue) {}\n\n    function replace(asStr, asSubStr, asReplaceBy) {\n      if (!asStr) {\n        return \"\";\n      }\n\n      return asStr.replace(asSubStr, asReplaceBy);\n    }\n\n    function replaceChar(asStr, asSubStr, asReplaceBy) {\n      return replace(asStr, asSubStr, asReplaceBy);\n    }\n\n    function length(asStr) {\n      if (!asStr) {\n        return 0;\n      }\n\n      return asStr.length;\n    }\n\n    function mod(a, b) {\n      return a % b;\n    }\n\n    function comb() {}\n\n    function execScript() {}\n\n    function valueList() {}\n    /**\r\n     */\n\n\n    function enMoney(n, asYuan, asCent, custom_join_character) {\n      asYuan = asYuan || \"U.S. DOLLARS\";\n      asCent = asCent || \"CENTS\";\n    }\n    /**\r\n     * 分割字符串，取其中的一个部分\r\n     * @param asStr\r\n     * @param asSeparator\r\n     * @param aPos\r\n     * @return {string|*}\r\n     */\n\n\n    function subword(asStr, asSeparator, aPos) {\n      if (!asStr) {\n        return \"\";\n      }\n\n      var lsStr = asStr.split(asSeparator);\n\n      if (lsStr.length >= aPos) {\n        return \"\";\n      }\n\n      return lsStr[aPos];\n    }\n    /**\r\n     * 将月份转化为数值\r\n     * @param asMonth  yyyyMM格式\r\n     */\n\n\n    function monthindex(asMonth) {\n      if (isEmpty(asMonth)) {\n        return 0;\n      }\n\n      if (asMonth.length != 6) {\n        return 0;\n      }\n\n      var lYear = parseInt(asMonth.substr(0, 4));\n      var lMonth = parseInt(asMonth.substr(4, 2));\n\n      if (lYear < 1900 || lYear >= 10000 || lMonth <= 0 || lMonth > 12) {\n        return 0;\n      }\n\n      return lYear * 12 + lMonth;\n    }\n\n    function monthdate(asMonth) {\n      if (isEmpty(asMonth)) {\n        return null;\n      }\n\n      if (asMonth.length != 6) {\n        return null;\n      }\n\n      return new Date(asMonth.substr(0, 4) + \".\" + asMonth.substr(4, 2) + \".01\");\n    }\n  }\n  /**\r\n   * 动态文本解析，可以替换文本中的表达式 ，表达式用{}括起来\r\n   * 可替换表达式的消息     * 任意文字{exp1} 任意文字{exp2..}..\r\n   * @param asMessage\r\n   * @constructor\r\n   */\n\n\n  function DynamicExpMessage(asMessage, aFExpConstructor, encodeURLComp) {\n    var fMessage = asMessage;\n    var fExp = [];\n    var fReg = /[{][^}]+[}]/;\n    this.value = value;\n    load();\n    return;\n\n    function load() {\n      var lsMessage = fMessage,\n          lsExp,\n          lExp;\n      var lr = fReg.exec(lsMessage);\n\n      while (lr) {\n        lsExp = lsMessage.substr(lr.index + 1, lr[0].length - 2);\n        lExp = aFExpConstructor(lsExp);\n        fExp.push(lExp);\n        lsMessage = lsMessage.substr(lr.index + lr[0].length);\n        lr = fReg.exec(lsMessage);\n      }\n    }\n\n    function value(aRow) {\n      if (fExp.length == 0) return fMessage;\n      var lsMessage = fMessage,\n          lsValue,\n          lsResult = '';\n      var lr = fReg.exec(lsMessage);\n      var lIndex = 0;\n\n      while (lr) {\n        lsValue = fExp[lIndex].value(aRow);\n\n        if (encodeURLComp) {\n          lsValue = encodeURIComponent(lsValue);\n        }\n\n        lsResult += lsMessage.substr(0, lr.index) + lsValue;\n        lsMessage = lsMessage.substr(lr.index + lr[0].length);\n        lr = fReg.exec(lsMessage);\n        lIndex++;\n      }\n\n      lsResult += lsMessage;\n      return lsResult;\n    }\n  }\n\n  var fShowLoadingPanel = false;\n  /**\r\n   * 显示加载信息\r\n   * @param aPromise {JQueryPromise}正在执行的任务\r\n   * @param aContainerNode {JQuery} 容器节点，不指定为应用节点\r\n   * @param asMessage  {String} 显示的信息，不指定为\"加载中...\"\r\n   */\n\n  function showLoadPanel(aPromise, aContainerNode, asMessage) {\n    if (fShowLoadingPanel || aPromise.state() != \"pending\") return;\n    fShowLoadingPanel = true;\n    var fPanel = new LoadPanel(aContainerNode, asMessage);\n    aPromise.always(function () {\n      fPanel.close();\n      fShowLoadingPanel = false;\n    });\n  }\n\n  function aysnLoadPanelForSecond(aContainerNode, asMessage, asecond) {\n    var ld = $.Deferred();\n    var lp = new LoadPanel(aContainerNode, asMessage);\n    setTimeout(function () {\n      lp.close();\n      ld.resolve();\n    }, asecond * 1000);\n    return ld.promise();\n  }\n\n  function LoadPanel(aContainerNode, asMessage) {\n    var fParentNode = aContainerNode ? aContainerNode : $(\"body\");\n    var fRoot = $(\"<div></div>\");\n    var fMessage = asMessage ? asMessage : \"加载中...\";\n    var fLoadPanel;\n    this.close = close;\n    load();\n    return;\n\n    function load() {\n      fRoot.appendTo(fParentNode);\n      fLoadPanel = fRoot.dxLoadPanel({\n        shadingColor: \"transparent\",\n        position: {\n          my: 'center',\n          at: 'center',\n          of: fParentNode\n        },\n        visible: true,\n        delay: 300,\n        showIndicator: true,\n        showPane: true,\n        message: fMessage,\n        shading: true,\n        hideOnOutsideClick: false\n      }).dxLoadPanel(\"instance\");\n    }\n\n    function close() {\n      fLoadPanel.hide();\n      fRoot.remove();\n    }\n  }\n  /***------------------------------------------------------------------------------------------\r\n   *   列的数据值和显示值转化为对象或数组。\r\n   *        //checkbox\r\n   *        <ESTATUS EXPRESSION=\"FALSE=1~GRAY=7~TRUE=2\"/>\r\n   <LOCKSTATUS EXPRESSION=\"TRUE=1~FALSE=0\"/>\r\n   <CLOSESTATUS EXPRESSION=\"TRUE=1~FALSE=0\"/>\r\n   //下拉列表\r\n   <DDXZ EXPRESSION=\"1=内销~2=外贸~3=自营~4=开发\"/>\r\n   最后处理结果为 ：boolean /TRUE/FALSE/GRAY 为text\r\n   {text : displayvalue , value :  savevalue}\r\n   CHECKBOX  TRUE: 1 FALSE :2\r\n   DROPDOWN    TEXT ,VALUE\r\n     *  ---------------------------------------------------------------------------------------------------- */\n\n  /**\r\n   *\r\n   * @param asExp {String}\r\n   * @return {Object[]}\r\n   */\n\n\n  function expToObjs(asExp) {\n    if (!asExp) return undefined;\n    var lr; //checkbox类型\n\n    if (asExp.indexOf(\"TRUE=\") >= 0) {\n      lr = [];\n      $.each(asExp.split(\"~\"), function (index, item) {\n        var lt = item.split(\"=\");\n\n        if (lt.length > 1) {\n          lr.push({\n            text: lt[0],\n            //TRUE/FALSE\n            value: lt[1] //1,0\n\n          });\n        }\n      });\n    } else {\n      //dropdown类型\n      lr = [];\n      $.each(asExp.split(\"~\"), function (index, item) {\n        var lt = item.split(\"=\");\n\n        if (lt.length > 1) {\n          lr.push({\n            text: lt[1],\n            //显示值\n            value: lt[0] //存储值\n\n          }); // {text : displayvalue , value :  savevalue}\n        } else if (lt.length == 1) {\n          //如果就一个元素，不包含等号 认为值和显示一样\n          lr.push({\n            text: lt[0],\n            //显示值\n            value: lt[0] //存储值\n\n          });\n        }\n      });\n    }\n\n    return lr;\n  } //\tfunction extend(aSonType, aParentObject) {\n  //\t\taSonType.prototype = aParentObject;\n  //\t\taSonType.prototype.constructor = aSonType;\n  //\t}\n\n  /***------------------------------------------------------------------------------------------\r\n   *  工具函数：深度拷贝集成，可以实现多继承\r\n   *  ---------------------------------------------------------------------------------------------------- */\n\n\n  function deepCopy(aParent) {\n    return $.extend(true, {}, aParent);\n  }\n\n  function objCopy(aOldObj, aNewObj) {\n    var lObj = aNewObj || {};\n\n    for (var i in aOldObj) {\n      lObj[i] = aOldObj[i];\n    }\n\n    return lObj;\n  }\n  /**\r\n   * 在数组中根据属性的值查找对象\r\n   */\n\n\n  function objIndexByField(aArray, asField, asValue) {\n    var i,\n        l = aArray.length;\n\n    for (i = 0; i < l; i++) {\n      if (isSameStr(asValue, aArray[i][asField])) return i;\n    }\n\n    return -1;\n  }\n  /**\r\n   *\r\n   */\n\n\n  function strToDate(asDate) {\n    if (!asDate) return null;\n    var ld = new Date(asDate);\n    return ld; //\t\tlet lsPattern;\n    //\t\tif(asDate.length<=10)\n    //\t\t\t\tlsPattern ='YYYY-MM-DD';\n    //\t\telse\n    //\t\t\tlsPattern = 'YYYY-MM-DD HH:mm:ss';\n    //\t\tlet ld= moment(asDate,lsPattern).toDate();\n    //\t\treturn ld;\n  }\n  /**\r\n   * 日期格式化对象 ，直接返回创建的对象\r\n   * \" FORMAT=\"YYYY/MM/DD HH:MM\"\r\n   */\n\n\n  function dateToStr(aDate, includeTime) {\n    if (!aDate) return null;\n\n    if (!includeTime) {\n      return new Date(aDate).format('yyyy/MM/dd');\n    } else {\n      return new Date(aDate).format('yyyy/MM/dd hh:mm:ss');\n    } //\n    //\n    // if (!fDateFormator) {\n    //     fDateFormator = new Intl.DateTimeFormat(myUtilsSelf.lang, {\n    //         year: 'numeric',\n    //         month: '2-digit',\n    //         day: '2-digit',\n    //         hour12: false\n    //     });\n    //     fDateTimeFormator = new Intl.DateTimeFormat(myUtilsSelf.lang, {\n    //         year: 'numeric',\n    //         month: '2-digit',\n    //         day: '2-digit',\n    //         hour: 'numeric',\n    //         minute: 'numeric',\n    //         second: 'numeric',\n    //         hour12: false\n    //     });\n    // }\n    // try{\n    //     if (includeTime) {\n    //         return fDateTimeFormator.format(aDate);\n    //     } else {\n    //\n    //         return fDateFormator.format(aDate);\n    //     }\n    //\n    // }catch(e) {\n    //     throw new Error(\"错误日期值\" + aDate);\n    // }\n    //\t\treturn aDate.toLocaleDateString(Utils.lang, options);\n    //        let lsValue = new Intl.DateTimeFormat(Utils.lang, options).format(aDate);\n    //        if(!includeTime) {\n    //        \tlsValue = lsValue.substr(0,10);\n    //        }\n    //         return lsValue;\n    //\t\tif(typeof aDate == 'string') return aDate;\n    //\t\tlet lsPattern = 'yyyy-MM-dd hh:mm:ss';\n    //\t\tif(arguments.length>1)\n    //\t\t\tlsPattern = asPattern;\n    //\t\treturn format(lsPattern);\n    //\t\tfunction format(fmt) {\n    //\t\t     let o = {\n    //\t\t        \"M+\" : aDate.getMonth()+1,                 //月份\n    //\t\t        \"d+\" : aDate.getDate(),                    //日\n    //\t\t        \"h+\" : aDate.getHours(),                   //小时\n    //\t\t        \"m+\" : aDate.getMinutes(),                 //分\n    //\t\t        \"s+\" : aDate.getSeconds(),                 //秒\n    //\t\t        \"q+\" : Math.floor((aDate.getMonth()+3)/3), //季度\n    //\t\t        \"S\"  : aDate.getMilliseconds()             //毫秒\n    //\t\t    };\n    //\t\t    if(/(y+)/.test(fmt)) {\n    //\t\t            fmt=fmt.replace(RegExp.$1, (aDate.getFullYear()+\"\").substr(4 - RegExp.$1.length));\n    //\t\t    }\n    //\t\t     for(let k in o) {\n    //\t\t        if(new RegExp(\"(\"+ k +\")\").test(fmt)){\n    //\t\t             fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : ((\"00\"+ o[k]).substr((\"\"+ o[k]).length)));\n    //\t\t         }\n    //\t\t     }\n    //\t\t    return fmt;\n    //\t\t}\n\n  }\n  /***------------------------------------------------------------------------------------------\r\n   *  从get url中获得参数值     *\r\n   *  ---------------------------------------------------------------------------------------------------- */\n\n\n  function getURLParam(name) {\n    var reg = new RegExp(\"(^|&)\" + name + \"=([^&]*)(&|$)\", \"i\");\n    var r = window.location.search.substr(1).match(reg);\n    if (r != null) return unescape(r[2]);\n    return null;\n  }\n\n  function setURLParam(aparam) {\n    history.replaceState(null, document.title, \"?\" + aparam);\n  }\n  /**\r\n   * 获得当前页面URL中的参数，一对象的形式放回\r\n   */\n\n\n  function getURLParams() {\n    var url = window.location.search; //获取url中\"?\"符后的字串\n\n    url = decodeURI(url);\n    var theRequest = new Object();\n\n    if (url.indexOf(\"?\") != -1) {\n      var str = url.substr(1);\n      var strs = str.split(\"&\");\n\n      for (var i = 0; i < strs.length; i++) {\n        theRequest[strs[i].split(\"=\")[0]] = unescape(strs[i].split(\"=\")[1]);\n      }\n    }\n\n    return theRequest;\n  }\n  /**\r\n   * 获得URL的最后一个部分\r\n   * @return {string}\r\n   */\n\n\n  function getLastPartURL() {\n    var url = window.location.pathname;\n\n    if (isEmpty(url)) {\n      return \"\";\n    }\n\n    if (url[url.length - 1] == \"/\") {\n      url = url.substr(0, url.length - 1);\n    }\n\n    if (isEmpty(url)) {\n      return \"\";\n    }\n\n    var lsStrs = url.split(\"/\");\n    return lsStrs[lsStrs.length - 1];\n  }\n\n  function getFullPageURL(asRelativePath) {\n    var lsURL = window.location.href;\n    return lsURL.substr(0, lsURL.lastIndexOf(\"/\") + 1) + asRelativePath;\n  }\n  /***------------------------------------------------------------------------------------------\r\n   * 工具类用于确定是是否有空字符串，可以接受字符串或数组类型\r\n   *  ---------------------------------------------------------------------------------------------------- */\n\n\n  function hasEmptyStr(aStr) {\n    if (Array.isArray(aStr)) {\n      for (var i in aStr) {\n        if (!i) return true;\n      }\n    } else {\n      if (!aStr) return true;\n    }\n\n    if (typeof aStr == 'string' || aStr instanceof String) return !aStr.trim();\n    return false;\n  }\n\n  ;\n\n  function textToObj(asContent) {\n    if (!asContent) return null;\n    asContent = asContent.trim();\n    if (asContent[0] == \"{\" && asContent[asContent.length - 1] == \"}\") return JSON.parse(asContent);else if (asContent[0] == \"[\" && asContent[asContent.length - 1] == \"]\") return JSON.parse(asContent);else return null;\n  }\n  /**\r\n   * 将XML JQuery节点的第一个元素转化为XML文本\r\n   * @param aJQueryXMLObject\r\n   * @return {string}\r\n   */\n\n\n  function xmlToString(aJQueryXMLObject) {\n    return new XMLSerializer().serializeToString(aJQueryXMLObject[0]);\n  }\n  /***------------------------------------------------------------------------------------------\r\n   * 工具类函数： 获得下一个序列号\r\n   *  ---------------------------------------------------------------------------------------------------- */\n\n\n  function nextSn() {\n    this.currentNumber = 1;\n    this.get = get;\n    return;\n\n    function get() {\n      this.currentNumber++;\n      return this.currentNumber;\n    }\n  }\n\n  function hyParseFloat(aValue) {\n    if (!aValue) return 0;\n    return parseFloat(aValue.toFixed(10));\n  }\n\n  function endWith(str, substr) {\n    if (substr == null || substr == \"\" || this.length == 0 || substr.length > str.length) return false;\n    if (this.substring(str.length - substr.length) == substr) return true;else return false;\n    return true;\n  }\n\n  function trim(asStr) {\n    if (asStr) return asStr.trim();else return '';\n  }\n\n  function isEmpty() {\n    var i,\n        l = arguments.length;\n\n    for (i = 0; i < l; i++) {\n      var lsTemp = arguments[i];\n      if (lsTemp == null || lsTemp == undefined) return true;\n      if (typeof lsTemp == \"string\" && lsTemp.trim() === \"\") return true;\n    }\n\n    return false;\n  }\n  /**\r\n   * 获得数据记录某个字段，多行分割的数据值,或略falsy值\r\n   */\n\n\n  function separatedFieldValue(rows, fieldName, separator) {\n    var i,\n        l = rows.length,\n        lValues = [],\n        lv;\n\n    for (i = 0; i < l; i++) {\n      lv = rows[i][fieldName];\n      if (lv) lValues.push(lv);\n    }\n\n    return lValues.join(separator);\n  }\n\n  function strtoBool(aValue) {\n    if (isSameStr(aValue, \"TRUE\")) return true;else return false;\n  }\n\n  function stringSort(value1, value2) {\n    if (!value1 && value2) return -1;\n    if (!value1 && !value2) return 0;\n    if (value1 && !value2) return 1;\n    if (value1 == value2) return 0;\n    if (typeof value1 == 'string') return value1.localeCompare(value2, myUtilsSelf.lang);else return value1 > value2 ? 1 : -1;\n  }\n  /***------------------------------------------------------------------------------------------\r\n   * 工具类函数： 忽略大小写是否字符串相同\r\n   *  ---------------------------------------------------------------------------------------------------- */\n\n\n  function isSameStr(asStr1, asStr2) {\n    if (asStr1 == asStr2) return true;\n    if (asStr1 == null || asStr2 == null) return false;\n    asStr1 = String(asStr1);\n    asStr2 = String(asStr2);\n    return asStr1.trim().toUpperCase() == asStr2.trim().toUpperCase();\n  }\n\n  ;\n  /**\r\n   *  一个字符串中是否包含另外一个字符串，或者一个字符串数组中是否包含另外一个字符串 ， 不区分大小写。\r\n   * @param asStr1 {String || Array<String>} 字符串或者数组\r\n   * @param asStr2 {String} 子字符串\r\n   * @return {boolean}\r\n   */\n\n  function containStr(asStr1, asStr2) {\n    if (!asStr1 || !asStr2) return false;\n\n    if (!Array.isArray(asStr1)) {\n      return isSameStr(asStr1, asStr2);\n    } else {\n      var l = asStr1.length;\n\n      for (var i = 0; i < l; i++) {\n        if (isSameStr(asStr1[i], asStr2)) return true;\n      }\n\n      return false;\n    }\n  }\n\n  function containStrPart(asStr1, asStr2) {\n    if (!asStr1 || !asStr2) return false;\n\n    if (!Array.isArray(asStr1)) {\n      var a = new RegExp(asStr2, 'i');\n      return a.test(asStr1);\n    } else {\n      var l = asStr1.length;\n\n      for (var i = 0; i < l; i++) {\n        if (isSameStr(asStr1[i], asStr2)) return true;\n      }\n\n      return false;\n    }\n  }\n  /**\r\n   * 从本地读取文件，显示在图片中，并且更新字段的内容为Base64\r\n   * https://blog.csdn.net/zk437092645/article/details/8745647\r\n   *    <input type=\"file\" id=\"file\" />\r\n   let file = document.getElementById(\"file\").files[0];\r\n   if(!/image\\/\\w+/.test(file.type)){\r\n       alert(\"看清楚，这个需要图片！\");\r\n       return false;\r\n   }\r\n   *\r\n   */\n  //将文件以Data URL形式读入页面,resultType(url,text,其他，为binary)\n\n\n  function readFile(file, resultType, asTaskName) {\n    var ld = $.Deferred();\n    var reader = new FileReader();\n\n    reader.onload = function (e) {\n      ld.resolve(reader.result);\n    };\n\n    reader.onerror = function (e) {\n      ld.reject(e);\n    };\n\n    reader.onabort = function (e) {\n      ld.reject(e);\n    };\n\n    if (resultType == 'url') {\n      //url\n      reader.readAsDataURL(file);\n    } else if (resultType == 'text') {\n      //文本\n      reader.readAsText(file);\n    } else {\n      //二进制字符串\n      reader.readAsBinaryString(file);\n    }\n\n    return ld.promise();\n  }\n\n  function asynOpenBase64File(asFileType) {\n    var ln = $(\" <input  class='hy_globle_file_loader'  type='file'    accept='' style='display:none'/>\");\n    ln.appendTo($(\"body\"));\n\n    if (!isEmpty(asFileType)) {\n      ln.attr(\"accept\", asFileType);\n    }\n\n    ln[0].value = \"\";\n    ln[0].addEventListener(\"change\", onValueChanged);\n    var lOpenTasks = $.Deferred();\n    openFile();\n    $(\"body\").on(\"focusin\", onValueChanged);\n    var lp = lOpenTasks.promise();\n    return lp;\n\n    function openFile() {\n      return ln.click();\n    }\n\n    function onValueChanged() {\n      $(\"body\").off(\"focusin\", onValueChanged);\n      ln.remove();\n      var lfs = ln[0].files;\n\n      if (lfs.length == 0) {\n        lOpenTasks.reject();\n        return;\n      }\n\n      var file = lfs[0];\n      readFile(file, \"url\").then(function (data) {\n        lOpenTasks.resolve({\n          name: file.name,\n          content: data\n        });\n      }, function (data) {\n        lOpenTasks.reject(\"cancel\");\n      });\n    }\n  }\n  /**\r\n   * 通过下载的方式将base64 内容保存到文件，\r\n   * @param asFileName :String 文件名称\r\n   * @param asContent:String Base64 内容文本\r\n   */\n\n\n  function downloadBase64File(asFileName, asContent) {\n    var ln = $(\"<a></a>\");\n\n    try {\n      ln.attr(\"download\", asFileName);\n      ln.attr(\"href\", \"data:application/octet-stream;base64,\" + asContent);\n      $(\"body\").append(ln);\n      ln[0].click();\n    } finally {\n      ln.remove();\n    }\n  }\n  /**\r\n   * 不等于 0 的falsy值\r\n   */\n\n\n  function isFalsy(aValue) {\n    if (Array.isArray(aValue)) {\n      var i,\n          l = aValue.length;\n\n      for (i = 0; i < l; i++) {\n        if (!aValue[i] && aValue[i] != 0) continue;\n        return false;\n      }\n\n      return true;\n    } else {\n      return !aValue && aValue != 0;\n    }\n  }\n\n  var ObjCodeAndValue = function ObjCodeAndValue(asCode, aValue) {\n    _classCallCheck(this, ObjCodeAndValue);\n\n    this.code = asCode;\n    this.value = aValue;\n  };\n  /**\r\n   *  [{name,value}] 构成的数组\r\n   */\n\n\n  function ValueObjects(selfValueObj, aItems) {\n    selfValueObj = selfValueObj || this;\n    /**\r\n     *\r\n     * @type {Array<ObjCodeAndValue>}\r\n     */\n\n    var fItems = aItems || [];\n    selfValueObj.getObj = getObj;\n    selfValueObj.clear = clear;\n    selfValueObj.items = items;\n    selfValueObj.value = value;\n    return;\n\n    function clear() {\n      fItems.length = 0;\n    }\n    /**\r\n     * 获得参数对象，如果不存在返回null\r\n     */\n\n\n    function getObj(asCode) {\n      var _iterator2 = _createForOfIteratorHelper(fItems),\n          _step2;\n\n      try {\n        for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n          var lt = _step2.value;\n          if (isSameStr(lt.code, asCode)) return lt;\n        }\n      } catch (err) {\n        _iterator2.e(err);\n      } finally {\n        _iterator2.f();\n      }\n    }\n    /**\r\n     * 设置/获得条目\r\n     * @param aItems\r\n     * @return {Array}\r\n     */\n\n\n    function items(aItems) {\n      if (arguments.length > 0) {\n        fItems = aItems.concat();\n      }\n\n      return fItems;\n    }\n    /**\r\n     * 根据参数数量，获得或者设定对象的值。\r\n     */\n\n\n    function value(asCode, aValue) {\n      if (!asCode) throw new Error(\"必须提供取值名称\");\n      var lObj = getObj(asCode);\n\n      if (arguments.length == 1) {\n        if (lObj) return lObj.value;else return undefined;\n      } else if (arguments.length == 2) {\n        if (lObj) lObj.value = aValue;else {\n          lObj = new ObjCodeAndValue(asCode, aValue);\n          fItems.push(lObj);\n        }\n      } else throw new Error(\"参数数量错误\");\n    }\n  }\n  /***------------------------------------------------------------------------------------------\r\n   * 工具类函数： 能够解析zl中的xml list的工具,在对象和xml文档之间进行转换\r\n   *  ---------------------------------------------------------------------------------------------------- */\n\n\n  function xmlValueList(aValue) {\n    var lns, ln;\n\n    if (typeof aValue == \"string\") {\n      lns = $($.parseXML(aValue));\n      var lobj = {};\n      lns.children().children().each(function (index, data) {\n        lobj[data.tagName] = $(data).text();\n      });\n      return lobj;\n    } else if (_typeof(aValue) == \"object\") {\n      lns = $($.parseXML(\"<VALUES/>\").documentElement);\n\n      for (var i in aValue) {\n        ln = $($.parseXML(\"<\" + i + \"/>\").documentElement);\n        ln.text(aValue[i]);\n        lns.append(ln);\n      }\n\n      return lns.prop(\"outerHTML\");\n    } else {\n      throw new Error(\"参数错误\");\n    }\n  }\n  /***------------------------------------------------------------------------------------------\r\n   * 工具类函数： 本地存储   Key= eri +'_'+  asKey\r\n   *  ---------------------------------------------------------------------------------------------------- */\n\n\n  function localStore(asPath, asKey, aValue) {\n    if (isEmpty(asPath)) {\n      asPath = \"__hyLocalStorage_\";\n    } else if (_typeof(asPath) == \"object\") asPath = asPath.toString();\n\n    if (hasEmptyStr([asPath, asKey])) throw new Error('必须提供path和key');\n    var lsCode = asPath.trim().toUpperCase() + '_' + asKey.trim().toUpperCase();\n\n    if (arguments.length == 3) {\n      localStorage.setItem(lsCode, aValue);\n    }\n\n    return localStorage.getItem(lsCode);\n  }\n  /***------------------------------------------------------------------------------------------\r\n   * 工具类函数： 提示消息\r\n   *  ---------------------------------------------------------------------------------------------------- */\n\n  /***\r\n   *\r\n   * @param asMessage\r\n   * @param type {String} The message's type: \"info\", \"warning\", \"error\" or \"success\".\r\n   * @param duration\r\n   */\n\n\n  function notify(asMessage, type, duration) {\n    // alert(asMessage);\n    var lop = {\n      message: asMessage,\n      // maxWidth:'80%',\n      hideOnOutsideClick: true,\n      position: {\n        my: 'center',\n        at: 'center',\n        of: window\n      }\n    };\n    DevExpress.ui.notify(lop, type ? type : \"success\", duration ? duration : 6000);\n  }\n\n  function err(err) {\n    // if (typeof err == \"string\") {\n    //     notify(err, \"error\",  10000);\n    // } else {\n    //     notify(err.message, \"error\",  10000);\n    // }\n    if (typeof err == \"string\") {\n      alert(err, \"错误信息\");\n    } else {\n      alert(err.message, \"错误信息\");\n    }\n  }\n\n  function alert(asMessage, asTitle) {\n    if (isEmpty(asTitle)) asTitle = \"系统信息\";\n    return DevExpress.ui.dialog.alert(asMessage, asTitle);\n  }\n  /**\r\n   *  提示用户确定，取消，promoise 返回true或false\r\n   * @param asMessage\r\n   * @param asTitle\r\n   * @return {boolean}\r\n   */\n\n\n  function asynConfirm(asMessage, asTitle) {\n    if (isEmpty(asTitle)) asTitle = \"系统信息\";\n    return DevExpress.ui.dialog.confirm(asMessage, asTitle);\n  }\n\n  function asynYesNoCancel(asMessage, asTitle) {\n    var myDialog = DevExpress.ui.dialog.custom({\n      title: asTitle ? asTitle : \"系统信息\",\n      messageHtml: \"<b>\".concat(asMessage, \"</b>\"),\n      buttons: [{\n        text: \"确定\",\n        onClick: function onClick(e) {\n          return 'yes';\n        }\n      }, {\n        text: \"否\",\n        onClick: function onClick(e) {\n          return 'no';\n        }\n      }, {\n        text: \"取消\",\n        onClick: function onClick(e) {\n          return 'cancel';\n        }\n      }]\n    });\n    return myDialog.show();\n  }\n  /**\r\n   *             //回调函数实例 video为视频元素\r\n   // function onsuccess(stream) {\r\n      //     //兼容webkit核心浏览器\r\n      //     let CompatibleURL = window.URL || window.webkitURL;\r\n      //     //将视频流设置为video元素的源\r\n      //     console.log(stream);\r\n      //     //video.src = CompatibleURL.createObjectURL(stream);\r\n      //     video.srcObject = stream;\r\n      //     video.play();\r\n      //     resize();\r\n      // }\r\n   /*\r\n   <video  id=\"video\"  controls>\r\n   </video>\r\n   <canvas id=\"canvas\" width=\"480\" height=\"320\"></canvas>\r\n   let video = document.getElementById('video');\r\n   let canvas = document.getElementById('canvas');\r\n   let context = canvas.getContext('2d');\r\n   //调用\r\n   if (navigator.mediaDevices.getUserMedia || navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia) {\r\n      //调用用户媒体设备, 访问摄像头\r\n      getUserMedia( 480, 320, success, error);\r\n  } else {\r\n      alert('不支持访问用户媒体');\r\n  }\r\n   //拍照\r\n   document.getElementById('capture').addEventListener('click', function () {\r\n  context.drawImage(video, 0, 0, 480, 320);\r\n      console.log(canvas.toDataURL(\"image/png\"));\r\n    })\r\n   * @param width\r\n   * @param height\r\n   * @param success\r\n   * @param error\r\n   */\n\n  /**\r\n   *  获得本地的视频流\r\n   * @param width 视频的宽度\r\n   * @param height  视频的高度\r\n   * @param success成功处理函数\r\n   * @param error   错误处理函数\r\n   * @param back  后置摄像头，默认前置摄像头\r\n   */\n\n\n  function getUserMedia(width, height, success, error, back) {\n    // {video : {width: width, height: height}};\n    var constraints = {\n      video: {\n        width: width,\n        height: height,\n        facingMode: back ? \"environment\" : \"user\"\n      }\n    };\n\n    if (navigator.mediaDevices.getUserMedia) {\n      //最新的标准API\n      navigator.mediaDevices.getUserMedia(constraints).then(success)[\"catch\"](error);\n    } else if (navigator.webkitGetUserMedia) {\n      //webkit核心浏览器\n      navigator.webkitGetUserMedia(constraints, success, error);\n    } else if (navigator.mozGetUserMedia) {\n      //firfox浏览器\n      navigator.mozGetUserMedia(constraints, success, error);\n    } else if (navigator.getUserMedia) {\n      //旧版API\n      navigator.getUserMedia(constraints, success, error);\n    } else {\n      alert('不支持访问用户媒体');\n    }\n  } // let  canvas = document.createElement(\"canvas\");\n  // canvas.width = aVideo.videoWidth;\n  // canvas.height = aVideo.videoHeight;\n  // canvas.getContext('2d')\n  //     .drawImage(aVideo,0,0,canvas.width, canvas.height);\n  // return canvas.toDataURL();\n\n  /**\r\n   *\r\n   *\r\n   *  视频截图\r\n   * @param aVideo\r\n   * @param aCanvas\r\n   * @param width\r\n   * @param height\r\n   * @return {string}\r\n   */\n\n\n  function takePicture(aVideo, aCanvas, width, height) {\n    aCanvas.width = aVideo.videoWidth;\n    aCanvas.height = aVideo.videoHeight;\n    var lHeight = aVideo.videoHeight;\n    var lWidth = aVideo.videoWidth; // console.log('width'+ aCanvas.width +'height' +aCanvas.height);\n\n    var context = aCanvas.getContext('2d');\n    context.drawImage(aVideo, 0, 0, lWidth, lHeight);\n    return aCanvas.toDataURL('image/jpeg'); //\"image/png\"\n  }\n  /**\r\n   *\r\n   */\n\n\n  var fSounds = []; //{source:   , node: jqueryNode};\n\n  function playSound(asPath, interval) {\n    if (!asPath) return;\n    var ld;\n    var lsPath = Array.isArray(asPath) ? asPath : [asPath];\n    ld = $.Deferred();\n    playFiles(lsPath);\n    return ld;\n\n    function playFiles(asFiles) {\n      if (asFiles.length == 0) {\n        ld.resolve();\n        return;\n      }\n\n      var lsFile = asFiles.shift();\n      var lns = getNode(lsFile);\n      var lStart = new Date();\n\n      if (!lns) {\n        ld.reject();\n        return;\n      }\n\n      lns.on('ended', playEnd);\n      lns[0].play();\n\n      function playEnd() {\n        lns.off('ended'); //如果设定了间隔，并且间隔大于播放时间，指定时间后播放文件\n\n        if (interval > 0 && new Date() - lStart < interval) {\n          setTimeout(function () {\n            playFiles(asFiles);\n          }, new Date() - lStart < interval);\n        } else {\n          playFiles(asFiles);\n        }\n      }\n    }\n\n    function getNode(asFile) {\n      var i,\n          l = fSounds.length,\n          ln;\n\n      for (i = 0; i < l; i++) {\n        var ls = fSounds[i];\n\n        if (ls.source == asFile) {\n          ln = ls.node;\n          break;\n        }\n      }\n\n      if (!ln) {\n        ln = $(\"<audio hidden />\");\n        ln.attr(\"src\", asFile);\n        $(\"body\").append(ln);\n        fSounds.push({\n          source: asFile,\n          node: ln\n        });\n      }\n\n      return ln;\n    }\n  }\n\n  function readTextCmd(asText) {\n    if (isEmpty(asText)) return;\n    var utterThis = new window.SpeechSynthesisUtterance(asText);\n    utterThis.pitch = 2; //音高\n\n    utterThis.rate = 2;\n    window.speechSynthesis.speak(utterThis);\n  }\n  /**\r\n   * 将原有bl前台的eri路径转化为 html id属性的值\r\n   */\n\n\n  function ppPathToID(asPath, asAction) {\n    var lsPath = asPath + \"_\" + asAction;\n    lsPath = lsPath.trim().toLowerCase();\n    lsPath = lsPath.replace(/\\./g, \"_\");\n    return lsPath;\n  }\n\n  function startWith(asStr, asPart) {\n    if (!asStr || !asPart) return false;\n    return isSameStr(asStr.substr(0, asPart.length), asPart);\n  }\n  /**\r\n   *  将节点内容全屏\r\n   * @param element\r\n   */\n\n\n  function launchIntoFullscreen(element) {\n    var el = element || document.documentElement;\n    var rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullscreen;\n\n    if (typeof rfs != \"undefined\" && rfs) {\n      rfs.call(el);\n    }\n\n    ; // setTimeout(function(){\n    //     if(element.requestFullscreen){\n    //         element.requestFullscreen();\n    //     } else if(element.mozRequestFullScreen) {\n    //         element.mozRequestFullScreen();\n    //     }\n    //     else if(element.webkitRequestFullscreen) {\n    //         element.webkitRequestFullscreen();\n    //     }\n    //     else if(element.msRequestFullscreen) {\n    //         element.msRequestFullscreen();\n    //     }\n    //\n    // },2000);\n  }\n  /**\r\n   * 退出全屏\r\n   */\n\n\n  function exitFullscreen() {\n    if (document.exitFullscreen) {\n      document.exitFullscreen();\n    } else if (document.mozCancelFullScreen) {\n      document.mozCancelFullScreen();\n    } else if (document.webkitExitFullscreen) {\n      document.webkitExitFullscreen();\n    }\n  } // /**\n  //  * 是否处于全屏状态\n  //  * @return {*}\n  //  */\n  // function isFullscreen(){\n  //     if(navigator.userAgent.indexOf(\"Firefox\")!=-1) {\n  //         return document.mozFullScreen;\n  //     } else if(navigator.userAgent.indexOf(\"Chrome\")!=-1) {\n  //         return document.webkitIsFullScreen;\n  //     }\n  //     return document.fullscreen;\n  // }\n\n\n  function isFullscreen() {\n    return document.fullscreenElement || document.msFullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || false;\n  }\n\n  function TemplateMngr(asTemplateStr) {\n    var fTemplateNode = $(asTemplateStr);\n\n    this.get = function get(asPath) {\n      return fTemplateNode.find(asPath).clone(true, true);\n    };\n  }\n\n  function asynPostFormatData(asUrl, formData) {\n    var ld = $.Deferred();\n    $.ajax({\n      //jQuery方法，此处可以换成其它请求方式\n      url: asUrl,\n      // dataType: \"json\",\n      type: \"post\",\n      data: formData,\n      processData: false,\n      //不去处理发送的数据\n      contentType: false,\n      //不去设置Content-Type请求头\n      error: function error(jqxhr, status, errorMsg) {\n        ld.reject(errorMsg);\n        err(\"文件上传错误\" + errorMsg);\n      },\n      success: function success(data, status, jqxhr) {\n        ld.resolve();\n      }\n    });\n    return ld.promise();\n  }\n\n  function asynPutUploadFile(asUrl, file, progressCallback) {\n    var ld = $.Deferred();\n    var req = new XMLHttpRequest();\n    req.open(\"PUT\", asUrl);\n    req.setRequestHeader(\"Content-type\", \"application/octet-stream\");\n\n    if (progressCallback) {\n      progressCallback(0);\n\n      req.upload.onprogress = function (e) {\n        progressCallback(e.loaded);\n      };\n    }\n\n    req.onreadystatechange = function () {\n      if (req.readyState === XMLHttpRequest.DONE) {\n        if (req.status === 200) {\n          ld.resolve();\n        } else {\n          ld.reject(req.statusText || '访问错误');\n        }\n      }\n    };\n\n    req.send(file);\n    return ld.promise();\n  }\n\n  function encodeUtf8(text) {\n    var code = encodeURIComponent(text);\n    var bytes = [];\n\n    for (var i = 0; i < code.length; i++) {\n      var c = code.charAt(i);\n\n      if (c === '%') {\n        var hex = code.charAt(i + 1) + code.charAt(i + 2);\n        var hexVal = parseInt(hex, 16);\n        bytes.push(hexVal);\n        i += 2;\n      } else bytes.push(c.charCodeAt(0));\n    }\n\n    return bytes;\n  }\n\n  function decodeUtf8(bytes) {\n    var encoded = \"\";\n\n    for (var i = 0; i < bytes.length; i++) {\n      encoded += '%' + bytes[i].toString(16);\n    }\n\n    return decodeURIComponent(encoded);\n  }\n\n  function strToUtf8Bytes(str) {\n    var utf8 = [];\n\n    for (var ii = 0; ii < str.length; ii++) {\n      var charCode = str.charCodeAt(ii);\n      if (charCode < 0x80) utf8.push(charCode);else if (charCode < 0x800) {\n        utf8.push(0xc0 | charCode >> 6, 0x80 | charCode & 0x3f);\n      } else if (charCode < 0xd800 || charCode >= 0xe000) {\n        utf8.push(0xe0 | charCode >> 12, 0x80 | charCode >> 6 & 0x3f, 0x80 | charCode & 0x3f);\n      } else {\n        ii++;\n        charCode = 0x10000 + ((charCode & 0x3ff) << 10 | str.charCodeAt(ii) & 0x3ff);\n        utf8.push(0xf0 | charCode >> 18, 0x80 | charCode >> 12 & 0x3f, 0x80 | charCode >> 6 & 0x3f, 0x80 | charCode & 0x3f);\n      }\n    } //兼容汉字，ASCII码表最大的值为127，大于127的值为特殊字符\n\n\n    for (var jj = 0; jj < utf8.length; jj++) {\n      var code = utf8[jj];\n\n      if (code > 127) {\n        utf8[jj] = code - 256;\n      }\n    }\n\n    return utf8;\n  }\n\n  function strToHexCharCode(str) {\n    var hexCharCode = [];\n    var chars = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"];\n\n    for (var i = 0; i < str.length; i++) {\n      var bit = (str[i] & 0x0f0) >> 4;\n      hexCharCode.push(chars[bit]);\n      var bit = str[i] & 0x0f;\n      hexCharCode.push(chars[bit]);\n    }\n\n    return hexCharCode.join(\"\");\n  }\n  /**\r\n   * 将字符串转换为ASCII码的16进制数组字符串\r\n   * @param asStr\r\n   * @return {string}\r\n   */\n\n\n  function stringToHex(str) {\n    var val = \"\";\n\n    for (var i = 0; i < str.length; i++) {\n      if (val == \"\") val = str.charCodeAt(i).toString(16);else val += str.charCodeAt(i).toString(16);\n    }\n\n    return val;\n  }\n\n  function hexToString(hex) {\n    var arr = hex.split(\"\");\n    var out = \"\";\n\n    for (var i = 0; i < arr.length / 2; i++) {\n      var tmp = \"0x\" + arr[i * 2] + arr[i * 2 + 1];\n      var charValue = String.fromCharCode(tmp);\n      out += charValue;\n    }\n\n    return out;\n  }\n  /**\r\n   * ArrayBuffer to Hex\r\n   * @param buffer\r\n   * @return {string}\r\n   */\n\n\n  function buf2hex(buffer) {\n    // buffer is an ArrayBuffer\n    // create a byte array (Uint8Array) that we can use to read the array buffer\n    var byteArray = new Uint8Array(buffer); // for each element, we want to get its two-digit hexadecimal representation\n\n    var hexParts = [];\n\n    for (var i = 0; i < byteArray.length; i++) {\n      // convert value to hexadecimalo0\n      var hex = byteArray[i].toString(16); // pad with zeros to length 2\n\n      var paddedHex = ('00' + hex).slice(-2); // push to array\n\n      hexParts.push(paddedHex);\n    } // join all the hex values of the elements into a single string\n\n\n    return hexParts.join('');\n  }\n  /**\r\n   * 根据浏览器和操作系统设定html根节点的字体大小，在手机屏幕下适用。\r\n   * @param baseFontSize\r\n   * @param fontscale\r\n   * @returns {string}\r\n   */\n\n\n  function setHTMLRootFontSize(baseFontSize, fontscale) {\n    var win = window;\n\n    var _baseFontSize = baseFontSize || 100;\n\n    var _fontscale = fontscale || 1;\n\n    var doc = win.document; // const ua = navigator.userAgent;\n    // const matches = ua.match(/Android[\\S\\s]+AppleWebkit\\/(\\d{3})/i);\n    // const UCversion = ua.match(/U3\\/((\\d+|\\.){5,})/i);\n    // const isUCHd = UCversion && parseInt(UCversion[1].split('.').join(''), 10) >= 80;\n    // const isIos = navigator.appVersion.match(/(iphone|ipad|ipod)/gi);\n\n    var dpr = win.devicePixelRatio || 1; // if (!isIos && !(matches && matches[1] > 534) && !isUCHd) {\n    //     // 如果非iOS, 非Android4.3以上, 非UC内核, 就不执行高清, dpr设为1;\n    //     dpr = 1;\n    // }\n    // const scale = 1 / dpr;\n    // let metaEl = doc.querySelector('meta[name=\"viewport\"]');\n    // if (!metaEl) {\n    //     metaEl = doc.createElement('meta');\n    //     metaEl.setAttribute('name', 'viewport');\n    //     doc.head.appendChild(metaEl);\n    // }\n    // metaEl.setAttribute('content', `width=device-width,user-scalable=no,initial-scale=${scale},maximum-scale=${scale},minimum-scale=${scale}`);\n    //\n\n    doc.documentElement.style.fontSize = \"\".concat(_baseFontSize / 2 * dpr * _fontscale, \"px\");\n    return doc.documentElement.style.fontSize;\n  }\n}\n\nconsole.log(\"utils\");\nvar fUtils = new PKUtils();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 135252 characters]\n//# sourceURL=webpack-internal:///./src/bas/utils.js\n");

/***/ }),

/***/ "./src/comlib.js":
/*!***********************!*\
  !*** ./src/comlib.js ***!
  \***********************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var bas_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! bas/server */ \"./src/bas/server.js\");\n/* harmony import */ var bas_taskevent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! bas/taskevent */ \"./src/bas/taskevent.js\");\n/* harmony import */ var bas_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! bas/utils */ \"./src/bas/utils.js\");\n/* harmony import */ var bas_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! bas/base */ \"./src/bas/base.js\");\n\n\n\n\nfSystemSetting.lib = {\n  Svr: bas_server__WEBPACK_IMPORTED_MODULE_0__[\"Svr\"],\n  Utils: bas_utils__WEBPACK_IMPORTED_MODULE_2__[\"Utils\"],\n  TaskEvents: bas_taskevent__WEBPACK_IMPORTED_MODULE_1__[\"TaskEvents\"],\n  EnumOperation: bas_base__WEBPACK_IMPORTED_MODULE_3__[\"EnumOperation\"]\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvY29tbGliLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vc3JjL2NvbWxpYi5qcz9iNDM0Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7U3ZyfSBmcm9tIFwiYmFzL3NlcnZlclwiO1xyXG5pbXBvcnQge1Rhc2tFdmVudHN9IGZyb20gXCJiYXMvdGFza2V2ZW50XCI7XHJcbmltcG9ydCB7VXRpbHN9IGZyb20gXCJiYXMvdXRpbHNcIjtcclxuaW1wb3J0IHtFbnVtT3BlcmF0aW9ufSBmcm9tIFwiYmFzL2Jhc2VcIjtcclxuZlN5c3RlbVNldHRpbmcubGliID17XHJcbiAgICAgU3ZyIDogU3ZyLFxyXG4gICAgIFV0aWxzIDpVdGlscyxcclxuICAgICBUYXNrRXZlbnRzIDpUYXNrRXZlbnRzLFxyXG4gICAgIEVudW1PcGVyYXRpb24gOkVudW1PcGVyYXRpb24sXHJcbn07Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBSkEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/comlib.js\n");

/***/ })

/******/ });