VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/libs/absol-form/absol/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/libs/absol-form/absol/absol_form.js
/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 38851:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(23470);
__webpack_require__(14413);
__webpack_require__(57751);
__webpack_require__(36404);
var _RelativeAnchor = _interopRequireDefault(__webpack_require__(58493));
var _TextInput = _interopRequireDefault(__webpack_require__(72386));
var _RelativeLayout = _interopRequireDefault(__webpack_require__(56061));
var _Assembler = _interopRequireWildcard(__webpack_require__(2326));
var _DateInput = _interopRequireDefault(__webpack_require__(68452));
var _BaseComponent = _interopRequireDefault(__webpack_require__(32306));
var _LayoutEditor = _interopRequireDefault(__webpack_require__(22157));
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _FMLauncher = _interopRequireDefault(__webpack_require__(44556));
var _AllPropertyEditor = _interopRequireDefault(__webpack_require__(8122));
var _AttributeEditor = _interopRequireDefault(__webpack_require__(92176));
var _FOutline = _interopRequireDefault(__webpack_require__(43894));
var _ComponentPicker = _interopRequireDefault(__webpack_require__(30674));
var _ListEditor = _interopRequireDefault(__webpack_require__(79266));
var _PropertyEditor = _interopRequireDefault(__webpack_require__(96714));
var _StyleEditor = _interopRequireDefault(__webpack_require__(66498));
var _ContentScalelessComponent = _interopRequireDefault(__webpack_require__(98003));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _FModel = _interopRequireDefault(__webpack_require__(93274));
var _FNode = _interopRequireWildcard(__webpack_require__(88215));
var _FViewable = _interopRequireDefault(__webpack_require__(23600));
var _Button = _interopRequireDefault(__webpack_require__(9776));
var _Checkbox = _interopRequireDefault(__webpack_require__(29370));
var _ComboBox = _interopRequireDefault(__webpack_require__(1956));
var _Image = _interopRequireDefault(__webpack_require__(65661));
var _Label = _interopRequireDefault(__webpack_require__(31608));
var _NumberInput = _interopRequireDefault(__webpack_require__(53422));
var _Radio = _interopRequireDefault(__webpack_require__(57031));
var _Table = _interopRequireDefault(__webpack_require__(53968));
var _Text = _interopRequireDefault(__webpack_require__(36685));
var _TextArea = _interopRequireDefault(__webpack_require__(48310));
var _RelativeAnchorEditor = _interopRequireDefault(__webpack_require__(29098));
var _LayoutSizeEditor = _interopRequireDefault(__webpack_require__(98736));
var _PluginManager = _interopRequireDefault(__webpack_require__(19617));
var _R = _interopRequireDefault(__webpack_require__(25280));
var framePlugins = _interopRequireWildcard(__webpack_require__(24384));
var _LayoutEditorCmd = _interopRequireDefault(__webpack_require__(34555));
var _FormPreviewCmd = _interopRequireWildcard(__webpack_require__(25195));
var _FormEditorPreconfig = _interopRequireDefault(__webpack_require__(82599));
var _FmFragment = _interopRequireWildcard(__webpack_require__(9098));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _BlockTreeList = _interopRequireDefault(__webpack_require__(28053));
var _GCore = _interopRequireDefault(__webpack_require__(66723));
var _CircuitDiagramEditor = _interopRequireDefault(__webpack_require__(65748));
var _CKTemplateEditor = __webpack_require__(69918);
var _FLauncher = _interopRequireDefault(__webpack_require__(37100));
var _BlocklyDataModel = _interopRequireDefault(__webpack_require__(38267));
var _BlocklyStartExploringFragment = _interopRequireDefault(__webpack_require__(90360));
var _SCLauncher = _interopRequireDefault(__webpack_require__(34217));
var _RemoteFormPreview = _interopRequireDefault(__webpack_require__(3479));
var _FDEditor = _interopRequireDefault(__webpack_require__(81055));
var _ProcessFlowDiagramEditor = _interopRequireWildcard(__webpack_require__(3963));
var _ProjectExplorer = _interopRequireWildcard(__webpack_require__(44241));
var _EComponent = _interopRequireDefault(__webpack_require__(89168));
var _EContainer = _interopRequireDefault(__webpack_require__(9655));
var _EBuilder = _interopRequireDefault(__webpack_require__(55813));
var _EZUIEditor = _interopRequireDefault(__webpack_require__(81424));
var _EZELauncher = _interopRequireDefault(__webpack_require__(59096));
var _EZMockDataModel = _interopRequireDefault(__webpack_require__(85869));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = {
  FormEditorPreconfig: _FormEditorPreconfig["default"],
  framePlugin: framePlugins,
  blocklyPlugin: {
    'BlocklyDataModel': _BlocklyDataModel["default"],
    'BlocklyStartExploringFragment': _BlocklyStartExploringFragment["default"]
  },
  R: _R["default"],
  FMExploreDelegate: _ProjectExplorer.FMExploreDelegate,
  ProjectExplorer: _ProjectExplorer["default"],
  AllPropertyEditor: _AllPropertyEditor["default"],
  AttributeEditor: _AttributeEditor["default"],
  AnchorEditor: _RelativeAnchorEditor["default"],
  ComponentOutline: _FOutline["default"],
  ComponentPicker: _ComponentPicker["default"],
  ListEditor: _ListEditor["default"],
  PropertyEditor: _PropertyEditor["default"],
  StyleEditor: _StyleEditor["default"],
  LayoutSizeEditor: _LayoutSizeEditor["default"],
  LayoutEditorCmd: _LayoutEditorCmd["default"],
  FormPreviewCmd: _FormPreviewCmd["default"],
  FormPreviewCmdDescriptors: _FormPreviewCmd.FormPreviewCmdDescriptors,
  PluginManager: _PluginManager["default"],
  FViewable: _FViewable["default"],
  FNode: _FNode["default"],
  FModel: _FModel["default"],
  FormEditor: _FMLauncher["default"],
  LayoutEditor: _LayoutEditor["default"],
  FDEditor: _FDEditor["default"],
  ScalableComponent: _ScalableComponent["default"],
  ContentScalelessComponent: _ContentScalelessComponent["default"],
  RelativeAnchor: _RelativeAnchor["default"],
  BaseComponent: _BaseComponent["default"],
  RelativeLayout: _RelativeLayout["default"],
  TextInput: _TextInput["default"],
  DateInput: _DateInput["default"],
  Button: _Button["default"],
  CheckBox: _Checkbox["default"],
  ComboBox: _ComboBox["default"],
  Image: _Image["default"],
  Label: _Label["default"],
  NumberInput: _NumberInput["default"],
  Radio: _Radio["default"],
  Table: _Table["default"],
  Text: _Text["default"],
  TextArea: _TextArea["default"],
  Assembler: _Assembler["default"],
  core: _FCore["default"],
  coreSvg: _GCore["default"],
  FmFragment: _FmFragment["default"],
  makeFmFragmentConstructor: _FmFragment.makeFmFragmentClass,
  makeFmFragmentClass: _FmFragment.makeFmFragmentClass,
  AssemblerInstance: _Assembler.AssemblerInstance,
  findComponentsByName: _Assembler.findComponentByName,
  findComponent: _Assembler.findComponent,
  findComponentsById: _Assembler.findComponentById,
  traversal: _FNode.traversal,
  inheritComponentClass: _inheritComponentClass["default"],
  BlockTreeList: _BlockTreeList["default"],
  CircuitDiagramEditor: _CircuitDiagramEditor["default"],
  parseCKTemplate: _CKTemplateEditor.parseCKTemplate,
  'FLauncher': _FLauncher["default"],
  'RemoteFormPreview': _RemoteFormPreview["default"],
  'SCLauncher': _SCLauncher["default"],
  ProcessFlowDiagramEditor: _ProcessFlowDiagramEditor["default"],
  PFDEInteractDelegate: _ProcessFlowDiagramEditor.PFDEInteractDelegate,
  FComponent: _EComponent["default"],
  FContainer: _EContainer["default"],
  EBuilder: _EBuilder["default"],
  EasyUIEditor: _EZUIEditor["default"],
  'EZELauncher': _EZELauncher["default"],
  'EZMockDataModel': _EZMockDataModel["default"]
};
exports["default"] = _default;

/***/ }),

/***/ 14177:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Broadcast = _interopRequireDefault(__webpack_require__(15910));
var _stringGenerate = __webpack_require__(10713);
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * Share bestween tab(same origin) use localStorage and BroardCast
 */
function ClipboardManager() {
  _EventEmitter["default"].call(this);
  this.broadcast = new _Broadcast["default"]('formeditor_clipboard', (0, _stringGenerate.randomIdent)(20));
  var localDataText = localStorage.getItem(this.LOCAL_STORE_KEY);
  var localData;
  try {
    localData = (0, _generator.replaceDateStringJSVariable)(JSON.parse(localDataText || '{}'));
  } catch (error) {
    localData.data = {};
  }
  this.data = localData.data || {};
  this.broadcast.on('set', this.ev_BroadcastSet.bind(this));
}
;
Object.defineProperties(ClipboardManager.prototype, Object.getOwnPropertyDescriptors(_EventEmitter["default"].prototype));
ClipboardManager.prototype.constructor = ClipboardManager;
ClipboardManager.prototype.LOCAL_STORE_KEY = 'AS_Form_ClipboardManager';
ClipboardManager.prototype.ev_BroadcastSet = function (key, value) {
  this.set(key, value, true);
};
ClipboardManager.prototype.set = function (key, value, isPrivate) {
  this.data[key] = value;
  this.emit('set', key, value, this);
  if (!isPrivate) {
    this.broadcast.emit('set', key, value);
    localStorage.setItem(this.LOCAL_STORE_KEY, JSON.stringify({
      data: this.data
    }));
  }
};
ClipboardManager.prototype.get = function (key) {
  return this.data[key];
};
var _default = new ClipboardManager();
exports["default"] = _default;

/***/ }),

/***/ 92311:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.EV_SELECTED_COMP_CHANGE = exports.EV_EDITING_LAYOUT_CHANGE = exports.EV_COMP_TREE_CHANGE = exports.EV_COMP_BOUND_CHANGE = exports.EV_ANCHOR_EDITOR_CHANGE = void 0;
var EV_COMP_BOUND_CHANGE = 'EV_COMP_BOUND_CHANGE';
exports.EV_COMP_BOUND_CHANGE = EV_COMP_BOUND_CHANGE;
var EV_EDITING_LAYOUT_CHANGE = 'EV_EDITING_LAYOUT_CHANGE';
exports.EV_EDITING_LAYOUT_CHANGE = EV_EDITING_LAYOUT_CHANGE;
var EV_COMP_TREE_CHANGE = 'EV_COMP_TREE_CHANGE';
exports.EV_COMP_TREE_CHANGE = EV_COMP_TREE_CHANGE;
var EV_SELECTED_COMP_CHANGE = 'EV_SELECTED_COMP_CHANGE';
exports.EV_SELECTED_COMP_CHANGE = EV_SELECTED_COMP_CHANGE;
var EV_ANCHOR_EDITOR_CHANGE = 'EV_ANCHOR_EDITOR_CHANGE';
exports.EV_ANCHOR_EDITOR_CHANGE = EV_ANCHOR_EDITOR_CHANGE;

/***/ }),

/***/ 82599:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var FormEditorPreconfig = window.FormEditorPreconfig || {
  description: "This object must be create in global before FMLauncher's modules is loaded, it mean if you see that line, default config will be applied",
  extendAttributes: {}
};
var _default = FormEditorPreconfig;
exports["default"] = _default;

/***/ }),

/***/ 25280:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var R = {
  NOTIFICATION_CENTER: 'NOTIFICATION_CENTER',
  TASK: 'TASK',
  BUNDLE: 'BUNDLE',
  CLASSES: 'CLASSES',
  LAYOUT_EDITOR: 'LAYOUT_EDITOR',
  LAYOUT_EDITOR_EMITTER: 'LAYOUT_EDITOR_EMITTER',
  BLOCK_EDITOR: 'BLOCK_EDITOR',
  DIAGRAM_EDITOR: 'DIAGRAM_EDITOR',
  FD_EDITOR: 'FD_EDITOR',
  FLEX_FORM_EDITOR: 'FLEX_FORM_EDITOR',
  FLEX_FORM_OUTLINE: 'FLEX_FORM_OUTLINE',
  FLEX_FORM_COMPONENT_TOOL: 'FLEX_FORM_COMPONENT_TOOL',
  ATTRIBUTE_EDITOR: 'ATTRIBUTE_EDITOR',
  EVENT_EDITOR: 'EVENT_EDITOR',
  STYLE_EDITOR: 'STYLE_EDITOR',
  ALL_PROPERTY_EDITOR: 'ALL_PROPERTY_EDITOR',
  COMPONENT_PROPERTIES_EDITOR: 'COMPONENT_PROPERTIES_EDITOR',
  COMPONENT_OUTLINE: 'COMPONENT_OUTLINE',
  COMPONENT_PICKER: 'COMPONENT_PICKER',
  CMD_TOOL: 'CMD_TOOL',
  UNDO_HISTORY: 'UNDO_HISTORY',
  FORM_EDITOR: 'FORM_EDITOR',
  LAUNCHER: 'LAUNCHER',
  HAS_CMD_EDITOR: "HAS_CMD_EDITOR",
  PROJECT_EXPLORER: 'PROJECT_EXPLORER',
  PLUGINS: {
    COMPILE_FUNCTION: 'COMPILE_FUNCTION',
    COMPONENT_PICKER_VIEW: 'COMPONENT_PICKER_VIEW',
    BUILD_COMPONENT: 'BUILD_COMPONENT',
    PROJECT_EXPLORER: 'PROJECT_EXPLORER',
    LOAD_CONTENT_DATA: 'LOAD_CONTENT_DATA',
    SAVE_CONTENT_DATA: 'SAVE_CONTENT_DATA',
    SAVE_AS_CONTENT_DATA: 'SAVE_AS_CONTENT_DATA',
    SAVE_AS_SYSTEM: 'SAVE_AS_SYSTEM'
  },
  CLIPBOARD: {
    COMPONENTS: 'COMPONENTS'
  },
  APP: 'ABSOL_FORM_EDITOR',
  VERSION: '1.0.0',
  STATUS_BAR_ELT: 'STATUS_BAR_ELT',
  DATA_MODEL: 'DATABASE',
  EZUI_TEST_CONFIG_EDITOR: 'EZUI_TEST_CONFIG_EDITOR',
  EZUI_EDITOR: 'EZUI_EDITOR',
  EZUI_APP: 'EZUI',
  EZUI_VERSION: 1,
  EZ_FORM_TASK: 'EZ_FORM_TASK',
  EZ_COMPONENT_GENERATOR: 'EZ_COMPONENT_GENERATOR'
};
var _default = R;
exports["default"] = _default;

/***/ }),

/***/ 28053:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(2326);
var _CBFunction = _interopRequireDefault(__webpack_require__(26094));
var _CBSnackBar = _interopRequireDefault(__webpack_require__(20254));
var _CBFileDownloader = _interopRequireDefault(__webpack_require__(25291));
var _CBEntry = _interopRequireDefault(__webpack_require__(51798));
var _CBTimer = _interopRequireDefault(__webpack_require__(22607));
var _CBRadioGroup = _interopRequireDefault(__webpack_require__(7352));
var _CBPropsGate = _interopRequireDefault(__webpack_require__(65301));
var _CBCmpSwitch = _interopRequireDefault(__webpack_require__(46572));
var _CBYesNoQuestion = _interopRequireDefault(__webpack_require__(62483));
var _CBExtendProperty = _interopRequireDefault(__webpack_require__(25985));
var _CBExtendConfig = _interopRequireDefault(__webpack_require__(22517));
var _CBEntryCompleted = _interopRequireDefault(__webpack_require__(52175));
var _CBExternalTrigger = _interopRequireDefault(__webpack_require__(14798));
__webpack_require__(83935);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var BlockTreeList = {
  text: 'all',
  children: [_CBEntry["default"], _CBEntryCompleted["default"], _CBFunction["default"], _CBFileDownloader["default"], _CBTimer["default"], _CBRadioGroup["default"], _CBPropsGate["default"], _CBExtendProperty["default"], _CBExtendConfig["default"], _CBExternalTrigger["default"], _CBCmpSwitch["default"], {
    text: 'message',
    children: [_CBSnackBar["default"], _CBYesNoQuestion["default"]]
  }]
};
var _default = BlockTreeList;
exports["default"] = _default;

/***/ }),

/***/ 46572:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Assembler = __webpack_require__(2326);
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function CBCmpSwitch() {
  _BaseBlock["default"].call(this);
  this.value = null;
  this.result = {};
  this.patternByRet = {};
  /***
   *
   * @type {{pattern: string|number|boolean|null|undefined, ret: string}[]}
   */
  this.attributes.cases = [];
  this.pinHandlers = Object.assign({}, CBCmpSwitch.prototype.pinHandlers);
}
(0, _inheritComponentClass["default"])(CBCmpSwitch, _BaseBlock["default"]);
CBCmpSwitch.prototype.menuIcon = 'span.mdi.mdi-set-split';
CBCmpSwitch.prototype.tag = 'CBCmpSwitch';
CBCmpSwitch.prototype.attributeHandlers.cases = {
  set: function set(value, ref) {
    ref.set(value);
    this.rebuildSwitch();
    return value;
  }
};
CBCmpSwitch.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.value = value;
    var cases = this.attributes.cases || [];
    for (var i = 0; i < cases.length; ++i) {
      this.pinFire(cases[i].ret);
    }
  }
};
CBCmpSwitch.prototype.rebuildSwitch = function () {
  var self = this;
  var cases = this.attributes.cases || [];
  this.pinHandlers = CBCmpSwitch.prototype.pinHandlers;
  var patternByRet = cases.reduce(function (ac, cr) {
    ac[cr.ret] = ac[cr.ret] || [];
    ac[cr.ret].push(cr.pattern);
    return ac;
  }, {});
  this.patternByRet = patternByRet;
  Object.keys(patternByRet).reduce(function (ac, pin) {
    var patterns = patternByRet[pin];
    ac[pin] = {
      get: function get() {
        var value = self.value;
        return patterns.reduce(function (res, pattern) {
          res = res || value === pattern;
          res = res || value + '' === pattern;
          res = res || JSON.stringify(value) === pattern;
          return res;
        }, false);
      }
    };
    return ac;
  }, this.pinHandlers);
};
_Assembler.AssemblerInstance.addClass(CBCmpSwitch);
var _default = CBCmpSwitch;
exports["default"] = _default;

/***/ }),

/***/ 83935:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Assembler = __webpack_require__(2326);
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FNode = __webpack_require__(88215);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function CBComponentGroup() {
  _BaseBlock["default"].call(this);
}
(0, _inheritComponentClass["default"])(CBComponentGroup, _BaseBlock["default"]);
CBComponentGroup.prototype.tag = 'CBComponentGroup';
CBComponentGroup.prototype.menuIcon = 'span.mdi.mdi-format-list-group';
CBComponentGroup.prototype.pinHandlers.embark = {
  receives: function receives(value) {
    return true;
  },
  descriptor: {
    type: "bool"
  }
};
CBComponentGroup.prototype.attributeHandlers.name = {
  descriptor: {
    type: 'text'
  }
};
CBComponentGroup.prototype.attributeHandlers.id = {
  set: function set(value) {
    this.attributes.name = value;
  },
  get: function get() {
    return this.attributes.name;
  }
};
CBComponentGroup.prototype.pinHandlers.disembark = {
  receives: function receives(value) {
    var fragment = this.fragment;
    var name = this.attributes.name;
    (0, _FNode.traversal)(fragment.view, function (path) {
      var node = path.node;
      if (node.attributes.group === name) {
        node.attributes.disembark = !!value;
      }
      if (node.fragment !== fragment) path.skipChildren();
    });
  },
  descriptor: {
    type: "bool"
  }
};
CBComponentGroup.prototype.pinHandlers.embark = {
  receives: function receives(value) {
    var fragment = this.fragment;
    var name = this.attributes.name;
    (0, _FNode.traversal)(fragment.view, function (path) {
      var node = path.node;
      if (node.attributes.group === name) {
        node.attributes.disembark = !value;
      }
      if (node.fragment !== fragment) path.skipChildren();
    });
  },
  descriptor: {
    type: "bool"
  }
};
CBComponentGroup.prototype.pinHandlers.hidden = {
  receives: function receives(value) {
    var fragment = this.fragment;
    var name = this.attributes.name;
    // console.log('hidden', name, value)
    (0, _FNode.traversal)(fragment.view, function (path) {
      var node = path.node;
      if (node.attributes.group === name) {
        // console.log(node)
        node.style.hidden = !!value;
      }
      if (node.fragment !== fragment) path.skipChildren();
    });
  },
  descriptor: {
    type: "bool"
  }
};
CBComponentGroup.prototype.pinHandlers.display = {
  receives: function receives(value) {
    var fragment = this.fragment;
    var name = this.attributes.name;
    (0, _FNode.traversal)(fragment.view, function (path) {
      var node = path.node;
      if (node.attributes.group === name) {
        node.style.hidden = !value;
      }
      if (node.fragment !== fragment) path.skipChildren();
    });
  },
  descriptor: {
    type: "bool"
  }
};
_Assembler.AssemblerInstance.addClass(CBComponentGroup);
var _default = CBComponentGroup;
exports["default"] = _default;

/***/ }),

/***/ 51798:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Assembler = __webpack_require__(2326);
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function CBEntry() {
  _BaseBlock["default"].call(this);
}
(0, _inheritComponentClass["default"])(CBEntry, _BaseBlock["default"]);
CBEntry.prototype.tag = 'CBEntry';
CBEntry.prototype.menuIcon = 'span.mdi.mdi-ray-start-arrow';
CBEntry.prototype.autoStart = true;
CBEntry.prototype.pinHandlers.signal = {
  get: function get() {
    return true;
  },
  descriptor: {
    type: "bool"
  }
};
CBEntry.prototype.exec = function () {
  this.pinFire('signal');
};
_Assembler.AssemblerInstance.addClass(CBEntry);
var _default = CBEntry;
exports["default"] = _default;

/***/ }),

/***/ 52175:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _CBEntry = _interopRequireDefault(__webpack_require__(51798));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEEntry
 * @constructor
 */
function CBEntryCompleted() {
  _CBEntry["default"].call(this);
}
(0, _inheritComponentClass["default"])(CBEntryCompleted, _CBEntry["default"]);
CBEntryCompleted.prototype.tag = 'CBEntryCompleted';
CBEntryCompleted.prototype.menuIcon = 'span.mdi.mdi-database-arrow-right-outline';
CBEntryCompleted.prototype.autoStart = false;
_Assembler.AssemblerInstance.addClass(CBEntryCompleted);
var _default = CBEntryCompleted;
exports["default"] = _default;

/***/ }),

/***/ 22517:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _Assembler = __webpack_require__(2326);
var _BaseComponent = _interopRequireDefault(__webpack_require__(32306));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BaseBlock
 * @constructor
 */
function CBExtendConfig() {
  _BaseBlock["default"].call(this);
  this.value = undefined;
  this.configBindingDescriptor = this.createConfigBindingDescriptor();
}
(0, _inheritComponentClass["default"])(CBExtendConfig, _BaseBlock["default"]);
CBExtendConfig.prototype.tag = 'CBExtendConfig';
CBExtendConfig.prototype.menuIcon = 'span.mdi.mdi-cog-transfer-outline';

/***
 *
 */
CBExtendConfig.prototype.bindConfigToFragment = function () {
  if (!this.fragment) return;
  var name = this.attributes.name;
  if (!name) return;
  var boundConfig = this.fragment.boundConfig[name];
  if (boundConfig === this) return;
  var descriptor = this.configBindingDescriptor;
  if (!descriptor) return;
  var obj = this.fragment.config;
  Object.assign(descriptor, {
    enumerable: true,
    configurable: true
  });
  Object.defineProperty(obj, name, descriptor);
  this.fragment.boundConfig[name] = this;
};
CBExtendConfig.prototype.unbindConfigToFragment = function () {
  if (!this.fragment) return;
  var name = this.attributes.name;
  if (!name) return;
  var boundConfig = this.fragment.boundConfig[name];
  if (boundConfig !== this) return;
  var obj = this.fragment._config;
  delete obj[name];
  delete this.fragment.boundConfig[name];
};
CBExtendConfig.prototype.attributes.disembark = false;
CBExtendConfig.prototype.onAttached = function () {
  this.bindConfigToFragment();
};
CBExtendConfig.prototype.onDetach = function () {
  this.unbindConfigToFragment();
};
CBExtendConfig.prototype.createConfigBindingDescriptor = function () {
  var self = this;
  return {
    set: function set(value) {
      if (self.value !== value) {
        self.value = value;
        self.pinFire('value');
      }
    },
    get: function get() {
      return self.value;
    }
  };
};
CBExtendConfig.prototype.pinHandlers.value = {
  receives: function receives(value) {
    if (this.value !== value) {
      this.value = value;
      this.pinFire('value');
    }
  },
  get: function get() {
    return this.value;
  }
};
_Assembler.AssemblerInstance.addClass(CBExtendConfig);
var _default = CBExtendConfig;
exports["default"] = _default;

/***/ }),

/***/ 25985:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _Assembler = __webpack_require__(2326);
var _BaseComponent = _interopRequireDefault(__webpack_require__(32306));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BaseBlock
 * @constructor
 */
function CBExtendProperty() {
  _BaseBlock["default"].call(this);
  this.value = undefined;
  this.dataBindingDescriptor = this.createDataBindingDescriptor();
}
(0, _inheritComponentClass["default"])(CBExtendProperty, _BaseBlock["default"]);
CBExtendProperty.prototype.tag = 'CBExtendProperty';
CBExtendProperty.prototype.menuIcon = 'span.mdi.mdi-source-commit-start';
CBExtendProperty.prototype.bindDataToFragment = _BaseComponent["default"].prototype.bindDataToFragment;
CBExtendProperty.prototype.unbindDataToFragment = _BaseComponent["default"].prototype.unbindDataToFragment;
CBExtendProperty.prototype.attributes.disembark = false;
CBExtendProperty.prototype.attributes.dataBinding = true;
CBExtendProperty.prototype.attributeHandlers.disembark = {
  set: function set(value, ref) {
    value = !!value;
    ref.set(value);
    this.bindDataToFragment(value, true);
    return value;
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  }
};
CBExtendProperty.prototype.createDataBindingDescriptor = function () {
  var self = this;
  return {
    set: function set(value) {
      if (self.value !== value) {
        self.value = value;
        self.pinFire('value');
        this.notifyChange();
      }
    },
    get: function get() {
      return self.value;
    }
  };
};
CBExtendProperty.prototype.pinHandlers.value = {
  receives: function receives(value) {
    if (this.value !== value) {
      this.value = value;
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.value;
  }
};
CBExtendProperty.prototype.notifyChange = _BaseComponent["default"].prototype.notifyChange;
_Assembler.AssemblerInstance.addClass(CBExtendProperty);
var _default = CBExtendProperty;
exports["default"] = _default;

/***/ }),

/***/ 14798:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _CBEntry = _interopRequireDefault(__webpack_require__(51798));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEEntry
 * @constructor
 */
function CBExternalTrigger() {
  _CBEntry["default"].call(this);
}
(0, _inheritComponentClass["default"])(CBExternalTrigger, _CBEntry["default"]);
CBExternalTrigger.prototype.tag = 'CBExternalTrigger';
CBExternalTrigger.prototype.menuIcon = 'span.mdi.mdi-square-wave';
CBExternalTrigger.prototype.autoStart = false;
_Assembler.AssemblerInstance.addClass(CBExternalTrigger);
var _default = CBExternalTrigger;
exports["default"] = _default;

/***/ }),

/***/ 25291:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Assembler = __webpack_require__(2326);
var _FileSaver = __webpack_require__(53069);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BaseBlock
 * @constructor
 */
function CBFileDownloader() {
  _BaseBlock["default"].call(this);
}
(0, _inheritComponentClass["default"])(CBFileDownloader, _BaseBlock["default"]);
CBFileDownloader.prototype.tag = "CBFileDownloader";
CBFileDownloader.prototype.pinHandlers.data = {
  receives: function receives(value) {
    if (typeof value === 'string') {
      (0, _FileSaver.saveTextAs)(value, this.attributes.fileName);
    } else if (value instanceof File || value instanceof Blob) {
      (0, _FileSaver.saveAs)(value, this.attributes.fileName);
    } else {
      (0, _FileSaver.saveTextAs)(JSON.stringify(value, null, 4), this.attributes.fileName);
    }
  },
  descriptor: {
    type: 'text'
  }
};
CBFileDownloader.prototype.attributeHandlers.fileName = {
  descriptor: {
    type: 'text'
  }
};
_Assembler.AssemblerInstance.addClass(CBFileDownloader);
var _default = CBFileDownloader;
exports["default"] = _default;

/***/ }),

/***/ 26094:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Assembler = __webpack_require__(2326);
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function CBFunction() {
  _BaseBlock["default"].call(this);
  this.func = _noop["default"];
  this.attributes.args = [];
  this.attributes.body = '';
  this.pinHandlers = Object.assign({}, CBFunction.prototype.pinHandlers);
  this.receivedArgValues = {};
  this.result = undefined;
}
(0, _inheritComponentClass["default"])(CBFunction, _BaseBlock["default"]);
CBFunction.prototype.tag = 'function';
CBFunction.prototype.menuIcon = 'span.mdi.mdi-function';
CBFunction.prototype.attributeHandlers.body = {
  set: function set(value, ref) {
    ref.set(value);
    if (value && this.attributes.args) {
      this.rebuildFunction();
    }
    return value;
  },
  descriptor: {
    type: 'text'
  }
};
CBFunction.prototype.attributeHandlers.args = {
  set: function set(args, ref) {
    ref.set(args || []);
    this.rebuildFunction();
    return ref.get();
  },
  descriptor: {
    type: 'text[]'
  }
};
CBFunction.prototype.attributeHandlers.defaultArgs = {
  set: function set(value) {
    Object.assign(this.receivedArgValues, value);
    return value;
  },
  descriptor: {
    type: 'object'
  }
};
CBFunction.prototype.pinHandlers.exec = {
  receives: function receives() {
    this.exec();
  },
  descriptor: {
    type: 'bool'
  }
};
CBFunction.prototype.pinHandlers.result = {
  get: function get() {
    return this.result;
  }
};
CBFunction.prototype.rebuildFunction = function () {
  var self = this;
  try {
    this.pinHandlers = this.attributes.args.reduce(function (ac, cr) {
      ac[cr] = {
        receives: function receives(value) {
          if (value && value.then) {
            value.then(function () {
              self.receivedArgValues[cr] = value;
              self.exec();
            });
          } else {
            self.receivedArgValues[cr] = value;
            self.exec();
          }
        }
      };
      return ac;
    }, {});
    Object.assign(this.pinHandlers, CBFunction.prototype.pinHandlers);
    this.func = new Function(["return function(".concat(this.attributes.args.join(', '), "){"), this.attributes.body, '}'].join('\n'))();
  } catch (error) {
    (0, _safeThrow["default"])(error);
    this.func = _noop["default"];
  }
};
CBFunction.prototype.exec = function () {
  var self = this;
  var receivedArgValues = this.receivedArgValues;
  var completeArg = true;
  var result;
  var args = this.attributes.args.map(function (name) {
    if (name in receivedArgValues) {
      return receivedArgValues[name];
    } else completeArg = false;
  });
  if (completeArg) {
    var task = this.fragment.newTask();
    try {
      result = this.func.apply(this, args);
    } catch (err) {
      task.finish();
      (0, _safeThrow["default"])(err);
      console.error("Execute script error", this, err);
      return;
    }
    if (result && result.then) {
      result.then(function (result) {
        self.result = result;
        if (result !== undefined) self.pinFire('result');
        task.finish();
      })["catch"](function (err) {
        (0, _safeThrow["default"])(err);
        console.error("Execute script error", this, err);
        task.finish();
      }.bind(this));
    } else {
      this.result = result;
      if (result !== undefined) this.pinFire('result');
      task.finish();
    }
  }
};
_Assembler.AssemblerInstance.addClass(CBFunction);
var _default = CBFunction;
exports["default"] = _default;

/***/ }),

/***/ 65301:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Assembler = __webpack_require__(2326);
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function CBPropsGate() {
  _BaseBlock["default"].call(this);
}
(0, _inheritComponentClass["default"])(CBPropsGate, _BaseBlock["default"]);
CBPropsGate.prototype.tag = 'CBPropsGate';
CBPropsGate.prototype.pinHandlers.props = {
  receives: function receives(value) {
    this.fragment.props = value;
  },
  get: function get() {
    return this.fragment.props;
  },
  descriptor: {
    type: "object"
  }
};
CBPropsGate.prototype.pinHandlers.propsChangeInfo = {
  get: function get() {
    return this.fragment._propsChangeInfo;
  },
  descriptor: {
    type: "object"
  }
};
CBPropsGate.prototype.pinHandlers.get = {
  receives: function receives() {
    this.pinFire('props');
  },
  descriptor: {
    type: "bool"
  }
};
_Assembler.AssemblerInstance.addClass(CBPropsGate);
var _default = CBPropsGate;
exports["default"] = _default;

/***/ }),

/***/ 7352:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Assembler = __webpack_require__(2326);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BaseBlock
 * @constructor
 */
function CBRadioGroup() {
  this._value = undefined; //not define yet
  this['ev_radio'] = this.ev_radio.bind(this);
  _BaseBlock["default"].call(this);
}
(0, _inheritComponentClass["default"])(CBRadioGroup, _BaseBlock["default"]);
CBRadioGroup.prototype.tag = "CBRadioGroup";
CBRadioGroup.prototype.attributeHandlers.groupName = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    this._assignToFragment(ref.get(), value);
    return value;
  },
  descriptor: {
    type: 'text'
  }
};
CBRadioGroup.prototype.attributeHandlers.value = {
  set: function set(value) {
    value = value || null;
    var prev = this._getValue(value);
    if (this.fragment) {
      this._value = this._setValue(value);
    } else {
      this._value = value;
    }
    if (prev !== value) this.pinFire('value');
  },
  get: function get() {
    if (this.fragment) {
      this._value = this._getValue(value);
    }
    return this._value;
  },
  descriptor: {
    type: "text"
  }
};
CBRadioGroup.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this._value;
  },
  descriptor: {
    type: 'text'
  }
};
CBRadioGroup.prototype._getValue = function () {
  if (!this.fragment) return this._value;
  if (!this.fragment.__radio_assigned__) return null;
  var assigned = this.fragment.__radio_assigned__;
  var list = assigned[this.attributes.groupName];
  if (!list) return null;
  var radio;
  for (var i = 0; i < list.length; ++i) {
    radio = list[i];
    if (radio.attributes.checked) return radio.attributes.value;
  }
  return null;
};
CBRadioGroup.prototype._setValue = function (value) {
  if (!this.fragment) return this._value;
  if (!this.fragment.__radio_assigned__) return null;
  var assigned = this.fragment.__radio_assigned__;
  var list = assigned[this.attributes.groupName];
  if (!list) return null;
  if (value) value = value + '';
  var res = null;
  var radio;
  for (var i = 0; i < list.length; ++i) {
    radio = list[i];
    if (radio.attributes.value === value) {
      radio.attributes.checked = true;
      res = value;
    } else radio.attributes.checked = false;
  }
  return res;
};
CBRadioGroup.prototype.onAttached = function () {
  if (this._value !== undefined) this._setValue(this._value);
};
CBRadioGroup.prototype._assignToFragment = function (oldGName, newGName) {
  if (!this.fragment) return;
  this.fragment.emittor.off('radio.' + oldGName, this.ev_radio);
  this.fragment.emittor.on('radio.' + newGName, this.ev_radio);
};
CBRadioGroup.prototype.ev_radio = function (event) {
  this._value = event.value;
  this.pinFire('value', this._value);
};
_Assembler.AssemblerInstance.addClass(CBRadioGroup);
var _default = CBRadioGroup;
exports["default"] = _default;

/***/ }),

/***/ 20254:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Assembler = __webpack_require__(2326);
var _Snackbar = _interopRequireDefault(__webpack_require__(96206));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends BaseBlock
 * @constructor
 */
function CBSnackBar() {
  _BaseBlock["default"].call(this);
}
(0, _inheritComponentClass["default"])(CBSnackBar, _BaseBlock["default"]);
CBSnackBar.prototype.tag = "CBSnackBar";
CBSnackBar.prototype.pinHandlers.message = {
  receives: function receives(value) {
    var text;
    var typeV = _typeof(value);
    if (typeV === 'string' || typeV === 'number' || typeV === 'boolean' || value === undefined) {
      text = value + '';
    } else text = JSON.stringify(value);
    _Snackbar["default"].show(text);
  },
  descriptor: {
    type: 'text'
  }
};
_Assembler.AssemblerInstance.addClass(CBSnackBar);
var _default = CBSnackBar;
exports["default"] = _default;

/***/ }),

/***/ 22607:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Assembler = __webpack_require__(2326);
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function CBTimer() {
  _BaseBlock["default"].call(this);
  this._intervalId = -1;
  this.attributes.duration = 0;
  this['tick'] = this.tick.bind(this);
}
(0, _inheritComponentClass["default"])(CBTimer, _BaseBlock["default"]);
CBTimer.prototype.tag = 'CBTimer';
CBTimer.prototype.pinHandlers.signal = {
  get: function get() {
    return true;
  },
  descriptor: {
    type: "bool"
  }
};
CBTimer.prototype.attributeHandlers.duration = {
  set: function set(value) {
    if (!(value > 0)) {
      value = 0;
    }
    if (this._intervalId >= 0) {
      clearInterval(this._intervalId);
      this._intervalId = -1;
    }
    if (value > 0) {
      this._intervalId = setInterval(this.tick, value);
    }
    return value;
  },
  descriptor: {
    type: 'number',
    min: 0
  }
};
CBTimer.prototype.tick = function () {
  if (this._intervalId >= 0 && this.fragment.state === 'STOP' || this.fragment.state === 'DIE') {
    clearInterval(this._intervalId);
    this._intervalId = -1;
  }
  this.pinFire('signal');
};
_Assembler.AssemblerInstance.addClass(CBTimer);
var _default = CBTimer;
exports["default"] = _default;

/***/ }),

/***/ 62483:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Assembler = __webpack_require__(2326);
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _YesNoQuestionDialog = _interopRequireDefault(__webpack_require__(57318));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BaseBlock
 * @constructor
 */
function CBYesNoQuestion() {
  _BaseBlock["default"].call(this);
}
(0, _inheritComponentClass["default"])(CBYesNoQuestion, _BaseBlock["default"]);
CBYesNoQuestion.prototype.tag = 'CBYesNoQuestion';
CBYesNoQuestion.prototype.menuIcon = 'span.mdi.mdi-chat-question-outline';
CBYesNoQuestion.prototype.exec = function () {
  var self = this;
  if (window.ModalElement && window.ModalElement.question) {
    ModalElement.question({
      title: this.attributes.title,
      message: this.attributes.message,
      onclick: function onclick(buttonIdx) {
        self.resolve(buttonIdx == 0);
      }
    });
  } else {
    this.executeBuildInModal();
  }
};
CBYesNoQuestion.prototype.executeBuildInModal = function () {
  var self = this;
  var modal = (0, _FCore._)({
    tag: 'modal',
    child: {
      tag: _YesNoQuestionDialog["default"].tag,
      props: {
        dialogTitle: this.attributes.title,
        message: this.attributes.message
      },
      on: {
        action: function action(event) {
          modal.remove();
          self.resolve(event.action === 'yes');
        }
      }
    }
  }).addTo(document.body);
};
CBYesNoQuestion.prototype.resolve = function (val) {
  this.result = val;
  this.pinFire('result');
};
CBYesNoQuestion.prototype.pinHandlers.signal = {
  receives: function receives(value) {
    if (value) this.exec();
  },
  descriptor: {
    type: "bool"
  }
};
CBYesNoQuestion.prototype.pinHandlers.question = {
  receives: function receives(questionText) {
    this.attributes.message = questionText;
    this.exec();
  }
};
CBYesNoQuestion.prototype.pinHandlers.result = {
  get: function get() {
    return this.result;
  },
  descriptor: {
    type: 'bool'
  }
};
_Assembler.AssemblerInstance.addClass(CBYesNoQuestion);
var _default = CBYesNoQuestion;
exports["default"] = _default;

/***/ }),

/***/ 46228:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _FCore = __webpack_require__(51518);
__webpack_require__(52058);
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _BEFunction = _interopRequireDefault(__webpack_require__(90441));
var _BEEntry = _interopRequireDefault(__webpack_require__(78704));
var _BEFileDownloader = _interopRequireDefault(__webpack_require__(17500));
var _BEPropsGate = _interopRequireDefault(__webpack_require__(6830));
var _BERadioGroup = _interopRequireDefault(__webpack_require__(4305));
var _BESnackBar = _interopRequireDefault(__webpack_require__(70260));
var _BETimer = _interopRequireDefault(__webpack_require__(82213));
var _BEEntryCompleted = _interopRequireDefault(__webpack_require__(93781));
var _BEYesNoQuestion = _interopRequireDefault(__webpack_require__(5948));
var _BECmpSwitch = _interopRequireDefault(__webpack_require__(23365));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _CMDTool = _interopRequireDefault(__webpack_require__(8982));
var _BlockEditorCmd = _interopRequireWildcard(__webpack_require__(68678));
var _ClipboardManager = _interopRequireDefault(__webpack_require__(14177));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _FOutline = _interopRequireWildcard(__webpack_require__(43894));
var _utils = __webpack_require__(84512);
var _Assembler = __webpack_require__(2326);
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _IndexedPropertyNames = _interopRequireDefault(__webpack_require__(63017));
var _BEExtendProperty = _interopRequireDefault(__webpack_require__(37645));
var _BEExtendConfig = _interopRequireDefault(__webpack_require__(82178));
var _BEExternalTrigger = _interopRequireDefault(__webpack_require__(1876));
var _utils2 = __webpack_require__(16907);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function BlockEditor() {
  _BaseEditor["default"].call(this);
  this.computedEditorClasses();
  this.cmdRunner.assign(_BlockEditorCmd["default"]);
  this.cmdRunner.assign(this.insertCmd);
  /***
   *
   * @type {BEBase[]}
   */
  this.activatedBlocks = [];
  this.CMDTool = new _CMDTool["default"]();
  this.CMDTool.attach(this);
  this.CMDTool.bindWithEditor(this);
  var self = this;
  Object.keys(_BlockEditorCmd.BlockEditorCmdDescriptors).forEach(function (cmd) {
    if (_BlockEditorCmd.BlockEditorCmdDescriptors[cmd].bindKey) self.bindKeyToCmd(_BlockEditorCmd.BlockEditorCmdDescriptors[cmd].bindKey.win, cmd);
  });
  this.outlineDelegate = new BlockEditorOutlineDelegate(this);
}
_OOP["default"].mixClass(BlockEditor, _BaseEditor["default"]);
BlockEditor.prototype.clipboardType = "CB_BLOCKS";
BlockEditor.prototype.createView = function () {
  this.$view = (0, _FCore._)({
    attr: {
      tabindex: 1
    },
    "class": 'as-block-editor',
    child: [{
      "class": 'as-block-editor-header',
      child: this.CMDTool.getView()
    }, {
      tag: _BoardTable["default"].tag,
      "class": ['as-block-editor-body', 'as-bscroller']
    }]
  });
  this.$cmdToolCtn = (0, _FCore.$)('.as-block-editor-header', this.$view);
  this.$body = (0, _FCore.$)('.as-block-editor-body', this.$view).on('orderchange', this.ev_blockOrderChange.bind(this));
  this.$view.on('keydown', this.ev_cmdKeyDown.bind(this));
};
BlockEditor.prototype.onAttached = function () {
  /***
   *
   * @type {LayoutEditor}
   */
  this.layoutEditor = this.getContext(_R["default"].LAYOUT_EDITOR);

  /***
   *
   * @type {FormEditor}
   */
  this.formEditor = this.getContext(_R["default"].FORM_EDITOR);
  this.flexFormEditor = this.getContext(_R["default"].FLEX_FORM_EDITOR);
  /***
   *
   * @type {CircuitDiagramEditor}
   */
  this.diagramEditor = this.getContext(_R["default"].DIAGRAM_EDITOR);
  this.propertyEditor = this.getContext(_R["default"].ALL_PROPERTY_EDITOR);
  this.outline = this.getContext(_R["default"].COMPONENT_OUTLINE);
};
BlockEditor.prototype.computedEditorClasses = function () {
  var _this = this;
  this.insertCmd = {};
  var editorClasses = this.getBlockEditorClasses();
  var classCommands = editorClasses.map(function (clazz) {
    return 'insert_' + clazz.prototype.tag;
  });
  this.tag2Class = editorClasses.reduce(function (ac, cr) {
    ac[cr.prototype.tag] = cr;
    return ac;
  }, {});
  this.insertCmdTree = {
    type: 'tab',
    name: 'Insert',
    children: [{
      type: 'group_x2',
      children: classCommands
    }]
  };
  this.insertCmdDescriptors = {};
  editorClasses.forEach(function (clazz) {
    _this.insertCmdDescriptors['insert_' + clazz.prototype.tag] = {
      type: 'trigger',
      icon: clazz.prototype.menuIcon,
      desc: clazz.prototype.displayTag || clazz.prototype.tag
    };
    _this.insertCmd['insert_' + clazz.prototype.tag] = function () {
      var _this2 = this;
      var block = new clazz(this);
      block.setData({});
      block.on('select', function (event) {
        if (_this2.isActivatedBlock(block)) {
          if (event.shiftKey && _this2.activatedBlocks.length > 1) {
            _this2.deactivateBlock(block);
          } else _this2.activateBlock(block);
        } else {
          _this2.activateBlock(block, event.shiftKey);
        }
      });
      this.$body.addChild(block.getView());
      this.blocks.push(block);
      (0, _utils.vScrollIntoView)(block.getView());
      block.setData({
        attributes: {
          id: (0, _utils2.randomUniqueIdent)()
        }
      });
      this.activateBlock(block);
      this.notifyUnsaved();
      this.outlineDelegate.notifyTreeChange();
    };
  });
};
BlockEditor.prototype.onStart = function () {
  // this.selfHolder = this.formEditor.getEditorHolderByEditor(this);
  this.CMDTool.start();
};
BlockEditor.prototype.onPause = function () {
  if (this.outline && this.outline.delegate === this.outlineDelegate) this.outline.delegate = null;
  // if (this.selfHolder.tabframe.modified)
  //     this.layoutEditor.setBlockData(this.getData());
};

BlockEditor.prototype.onResume = function () {
  this._updateLineCount();
  if (this.propertyEditor) this.propertyEditor.delegate = null;
  if (this.outline) this.outline.delegate = this.outlineDelegate;
};
BlockEditor.prototype.scrollIntoBlock = function (block) {
  if (this.$view && block && block.$view && block.$view.isDescendantOf(this.$view)) (0, _utils.vScrollIntoView)(block.$view);
};
BlockEditor.prototype._updateLineCount = function () {
  var lineData = this.diagramEditor.getLineData();
  var lineCountById = lineData.reduce(function (ac, cr) {
    ac[cr.u] = ac[cr.u] || 0;
    ac[cr.v] = ac[cr.v] || 0;
    ac[cr.u]++;
    if (cr.u !== cr.v) ac[cr.v]++;
    return ac;
  }, {});
  this.blocks.forEach(function (be) {
    be.lineCount = lineCountById[be._data.attributes.id] || 0;
  });
};
BlockEditor.prototype.setData = function (data) {
  var self = this;
  this._data = data;
  this.$body.clearChild();
  this.blocks = data.map(function (it) {
    var clazz = self.tag2Class[it.tag] || _BEBase["default"];
    var block = new clazz(self);
    block.setData(it);
    block.on('select', function (event) {
      if (self.isActivatedBlock(block)) {
        if (event.shiftKey && self.activatedBlocks.length > 1) {
          self.deactivateBlock(block);
        } else self.activateBlock(block);
      } else {
        self.activateBlock(block, event.shiftKey);
      }
    });
    return block;
  });
  this.blocks.forEach(function (blk) {
    self.$body.addChild(blk.getView());
  });
  this.outlineDelegate.notifyTreeChange();
};
BlockEditor.prototype.getData = function () {
  return this.blocks.map(function (blk) {
    return blk.getData();
  });
};
BlockEditor.prototype.getCmdNames = function () {
  return Object.keys(_BlockEditorCmd["default"]);
};
BlockEditor.prototype.getCmdDescriptor = function (name) {
  var descriptor = this.insertCmdDescriptors[name] || _BlockEditorCmd.BlockEditorCmdDescriptors[name];
  var res = Object.assign({
    type: 'trigger',
    desc: 'command: ' + name,
    icon: 'span.mdi.mdi-apple-keyboard-command'
  }, descriptor);
  var needActive = ['cut', 'copy', 'delete', 'system_owner_lock', 'system_owner_unlock'];
  if (needActive.indexOf(name) >= 0) {
    res.disabled = this.activatedBlocks.length === 0;
    if (name === 'delete' || name === 'cut') {
      res.disabled = res.disabled || this.activatedBlocks.length === 0 || this.activatedBlocks.length > 0 && this.activatedBlocks.every(function (blk) {
        return !this.isDeletableBlock(blk);
      }.bind(this));
    }
  } else if (name === 'paste') {
    res.disabled = !_ClipboardManager["default"].get(this.clipboardType);
  }
  var task = this.getContext(_R["default"].TASK);
  var isSystemForm = task && task.bundle && task.bundle.contentArguments && task.bundle.contentArguments && task.bundle.contentArguments.formid < 0;
  if (name === 'saveAsSystem') {
    if (isSystemForm) res.disabled = true;
  }
  return res;
};
BlockEditor.prototype.getBlockEditorClasses = function () {
  return [_BEEntry["default"], _BEEntryCompleted["default"], _BEFunction["default"], _BERadioGroup["default"], _BEPropsGate["default"], _BETimer["default"], _BESnackBar["default"], _BEFileDownloader["default"], _BEExtendProperty["default"], _BEExtendConfig["default"], _BEExternalTrigger["default"], _BEYesNoQuestion["default"], _BECmpSwitch["default"]];
};
BlockEditor.prototype.getCmdGroupTree = function () {
  var tree = Object.assign({}, _BlockEditorCmd.BlockEditorCmdTree);
  tree.children = tree.children.slice();
  tree.children.splice(1, 0, this.insertCmdTree);
  return tree;
};
BlockEditor.prototype.activateBlock = function (block, append) {
  var idx = this.activatedBlocks.indexOf(block);
  if (idx >= 0) {
    this.activatedBlocks.splice(idx, 1);
    if (!append) {
      this.activatedBlocks.splice(0, this.activatedBlocks.length).forEach(function (blk) {
        blk.getView().removeClass('as-activated').removeClass('as-focus');
      });
    }
    this.activatedBlocks.push(block);
  } else {
    if (!append) {
      this.activatedBlocks.splice(0, this.activatedBlocks.length).forEach(function (blk) {
        blk.getView().removeClass('as-activated').removeClass('as-focus');
      });
    }
    this.activatedBlocks.push(block);
    block.getView().addClass('as-activated');
  }
  this.activatedBlocks.forEach(function (blk, i, arr) {
    if (i + 1 === arr.length) {
      blk.getView().addClass('as-focus');
    } else {
      blk.getView().removeClass('as-focus');
    }
  });
  this.notifyCmdDescriptorsChange();
  this.outlineDelegate.notifySelectedChange();
};
BlockEditor.prototype.deactivateBlock = function (block) {
  var idx = this.activatedBlocks.indexOf(block);
  if (idx < 0) return;
  this.activatedBlocks.splice(idx, 1);
  block.getView().removeClass('as-activated').removeClass('as-focus');
  this.notifyCmdDescriptorsChange();
  this.outlineDelegate.notifySelectedChange();
};
BlockEditor.prototype.deleteBlock = function (block) {
  this.deactivateBlock(block);
  var idx = this.blocks.indexOf(block);
  if (idx < 0) return;
  this.blocks.splice(idx, 1);
  block.destroy();
  block.getView().remove();
  this.notifyUnsaved();
  this.outlineDelegate.notifyTreeChange();
};

/***
 *
 * @param {BEBase} blk
 * @returns {*}
 */
BlockEditor.prototype.isDeletableBlock = function (blk) {
  if (!blk) return false;
  if (blk.lineCount > 0) return false;
  if (window['FORM_DEV_MODE']) return true;
  if (blk._data && blk._data.attributes && blk._data.attributes.permissions && blk._data.attributes.permissions.owner === "system") return false;
  return true;
};
BlockEditor.prototype.isActivatedBlock = function (block) {
  return this.activatedBlocks.indexOf(block) >= 0;
};
BlockEditor.prototype.setClipboardBlocks = function (blocks) {
  if (blocks.length === 0) return;
  blocks = blocks.map(function (blk) {
    return blk.getData();
  });
  _ClipboardManager["default"].set(this.clipboardType, blocks);
  this.notifyCmdDescriptorsChange();
};
BlockEditor.prototype.getClipboardBlocks = function () {
  var blocks = _ClipboardManager["default"].get(this.clipboardType);
  if (blocks && blocks.length > 0 && blocks.push) {
    return blocks;
  }
  return null;
};
BlockEditor.prototype.findBlockById = function (id) {
  var block;
  for (var i = 0; i < this.blocks.length; ++i) {
    block = this.blocks[i];
    if (block._data && block._data.attributes && block._data.attributes.id === id) {
      return block;
    }
  }
  return null;
};
BlockEditor.prototype.ev_blockOrderChange = function (event) {
  var from = event.from;
  var to = event.to;
  var block = this.blocks.splice(from, 1)[0];
  this.blocks.splice(to, 0, block);
  this.notifyUnsaved();
  this.layoutEditor.notifyUnsaved();
};
BlockEditor.prototype.notifyUnsaved = function () {
  this.layoutEditor.notifyUnsaved();
};
BlockEditor.prototype.notifySaved = function () {
  this.layoutEditor.notifySaved();
};
BlockEditor.prototype.getBlockClassByTag = function (tag) {
  return _Assembler.AssemblerInstance.classes['BLOCK'][tag] || _BaseBlock["default"];
};
BlockEditor.prototype.getCircuitNodes = function () {
  var _this3 = this;
  var list = [];
  var blocks = this.getData();
  blocks.forEach(function (block) {
    var id = block.attributes && block.attributes.id;
    var name = block.attributes && block.attributes.name;
    var clazz = _this3.getBlockClassByTag(block.tag);
    var pinCmp;
    if (!id) return;
    var item = {
      type: 'BLOCK',
      id: id,
      name: name,
      displayName: block.attributes.displayName,
      text: '[' + block.tag + '] ' + id,
      value: id,
      order: 'b_' + block.tag + '_' + id,
      bTag: block.tag,
      pinList: Object.keys(clazz.prototype.pinHandlers).map(function (name) {
        return {
          text: name,
          value: name
        };
      }),
      clazz: clazz
    };
    pinCmp = function pinCmp(a, b) {
      var av = _IndexedPropertyNames["default"][a.name] || 100;
      if (clazz.prototype.pinHandlers[a.name] && clazz.prototype.pinHandlers[a.name].get && clazz.prototype.pinHandlers[a.name].receives) {
        av /= 1000;
      }
      var bv = _IndexedPropertyNames["default"][b.name] || 100;
      if (clazz.prototype.pinHandlers[b.name] && clazz.prototype.pinHandlers[b.name].get && clazz.prototype.pinHandlers[b.name].receives) {
        bv /= 1000;
      }
      return av - bv;
    };
    item.inputPins = Object.keys(clazz.prototype.pinHandlers).map(function (pinName) {
      if (clazz.prototype.pinHandlers[pinName].receives) return {
        name: pinName
      };else return null;
    }).filter(function (it) {
      return !!it;
    });
    if ((block.tag === 'function' || block.tag === 'Function') && block.attributes && block.attributes.args) {
      item.inputPins.unshift.apply(item.inputPins, block.attributes.args.map(function (it) {
        return {
          name: it
        };
      }));
    }
    item.inputPins.sort(pinCmp);
    item.outputPins = Object.keys(clazz.prototype.pinHandlers).map(function (pinName) {
      if (clazz.prototype.pinHandlers[pinName].get) return {
        name: pinName
      };else return null;
    }).filter(function (it) {
      return !!it;
    });
    if (block.tag === 'CBCmpSwitch' && block.attributes && block.attributes.cases) {
      item.outputPins.unshift.apply(item.outputPins, block.attributes.cases.map(function (it) {
        return {
          name: it.ret
        };
      }));
    }
    item.outputPins.sort(pinCmp);
    list.push(item);
  });
  return list;
};
var _default = BlockEditor;
/**
 *
 * @param  {BlockEditor} editor
 * @constructor
 */
exports["default"] = _default;
function BlockEditorOutlineDelegate(editor) {
  _FOutline.OutlineDelegate.call(this);
  this.editor = editor;
}
(0, _OOP.mixClass)(BlockEditorOutlineDelegate, _FOutline.OutlineDelegate);
BlockEditorOutlineDelegate.prototype.getTreeData = function () {
  if (!this.editor.blocks) return [];
  return this.editor.blocks.map(function (blk) {
    return {
      icon: blk.menuIcon,
      name: blk.$id.value,
      id: blk._data.attributes.id
    };
  });
};
BlockEditorOutlineDelegate.prototype.getSelectedIdList = function () {
  return this.editor.activatedBlocks.map(function (blk) {
    return blk._data.attributes.id;
  });
};

/**
 *
 * @param  nodeElt
 * @param {MouseEvent} event
 */
BlockEditorOutlineDelegate.prototype.onClickNode = function (nodeElt, event) {
  var data = nodeElt.data;
  var block = this.editor.findBlockById(data.id);
  if (!block) return;
  this.editor.activateBlock(block, event.shiftKey || event.ctrlKey);
  this.editor.scrollIntoBlock(block);
};

/***/ }),

/***/ 68678:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.BlockEditorCmdTree = exports.BlockEditorCmdDescriptors = void 0;
var _BEEntry = _interopRequireDefault(__webpack_require__(78704));
var _BEFunction = _interopRequireDefault(__webpack_require__(90441));
var _BERadioGroup = _interopRequireDefault(__webpack_require__(4305));
var _BEPropsGate = _interopRequireDefault(__webpack_require__(6830));
var _BETimer = _interopRequireDefault(__webpack_require__(82213));
var _BESnackBar = _interopRequireDefault(__webpack_require__(70260));
var _BEFileDownloader = _interopRequireDefault(__webpack_require__(17500));
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _utils = __webpack_require__(16907);
var _utils2 = __webpack_require__(84512);
var _BEExtendProperty = _interopRequireDefault(__webpack_require__(37645));
var _BEExtendConfig = _interopRequireDefault(__webpack_require__(82178));
var _FlagManager = _interopRequireDefault(__webpack_require__(64805));
var _BEEntryCompleted = _interopRequireDefault(__webpack_require__(93781));
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
var _BEYesNoQuestion = _interopRequireDefault(__webpack_require__(5948));
var _BECmpSwitch = _interopRequireDefault(__webpack_require__(23365));
var _BEExternalTrigger = _interopRequireDefault(__webpack_require__(1876));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_FlagManager["default"].add('FORM_DEV_MODE');
var editors = [_BEEntry["default"], _BEEntryCompleted["default"], _BEFunction["default"], _BERadioGroup["default"], _BEPropsGate["default"], _BETimer["default"], _BESnackBar["default"], _BEFileDownloader["default"], _BEExtendProperty["default"], _BEExtendConfig["default"], _BEExternalTrigger["default"], _BEYesNoQuestion["default"], _BECmpSwitch["default"]];
var BlockEditorCmd = {};
BlockEditorCmd.preview = function () {
  this.layoutEditor.execCmd('preview');
};
BlockEditorCmd.runTest = function () {
  this.layoutEditor.execCmd('runTest');
};
BlockEditorCmd.importFromJson = function () {
  this.flexFormEditor.execCmd('importFromJson');
};
BlockEditorCmd.export2Json = function () {
  this.flexFormEditor.execCmd('export2Json');
};
BlockEditorCmd.export2sharpEncode = function () {
  this.flexFormEditor.execCmd('export2sharpEncode');
};
BlockEditorCmd.export2clipboard = function () {
  this.flexFormEditor.execCmd('export2clipboard');
};

/***
 * @this BlockEditor
 */
BlockEditorCmd["delete"] = function () {
  var blocks = this.activatedBlocks.slice();
  for (var i = 0; i < blocks.length; ++i) {
    if (this.isDeletableBlock(blocks[i])) this.deleteBlock(blocks[i]);
  }
};
BlockEditorCmd.system_owner_lock = function () {
  var blocks = this.activatedBlocks.slice();
  var changed = false;
  for (var i = 0; i < blocks.length; ++i) {
    if (blocks[i].owner !== 'system') {
      blocks[i].owner = 'system';
      blocks[i].setLock(true);
      changed = true;
    }
  }
  if (changed) this.notifyUnsaved();
};
BlockEditorCmd.system_owner_unlock = function () {
  // console.log('system_owner_lock');

  var blocks = this.activatedBlocks.slice();
  for (var i = 0; i < blocks.length; ++i) {
    blocks[i].owner = null;
    blocks[i].setLock(false);
  }
};
BlockEditorCmd.copy = function () {
  this.setClipboardBlocks(this.activatedBlocks);
};
BlockEditorCmd.save = function () {
  this.flexFormEditor.execCmd('save');
};
BlockEditorCmd.saveAs = function () {
  this.flexFormEditor.execCmd('saveAs');
};
BlockEditorCmd.saveAsSystem = function () {
  this.flexFormEditor.execCmd('saveAsSystem');
};
BlockEditorCmd.paste = function () {
  var rawBlocks = this.getClipboardBlocks();
  if (!rawBlocks) return;
  var self = this;
  rawBlocks.forEach(function (rawBlock, i) {
    var clazz = _BEBase["default"].prototype.tag2Class[rawBlock.tag] || _BEBase["default"];
    var block = new clazz(this);
    block.on('select', function (event) {
      if (self.isActivatedBlock(block)) {
        if (event.shiftKey && self.activatedBlocks.length > 1) {
          self.deactivateBlock(block);
        } else self.activateBlock(block);
      } else {
        self.activateBlock(block, event.shiftKey);
      }
    });
    this.$body.addChild(block.getView());
    this.blocks.push(block);
    if (i + 1 === rawBlocks.length) (0, _utils2.vScrollIntoView)(block.getView());
    var id = rawBlock.attributes && rawBlock.attributes.id || (0, _utils.randomUniqueIdent)();
    var idPart;
    var idNum;
    if (self.findBlockById(id)) {
      idPart = id.split('_');
      idNum = parseInt(idPart[idPart.length - 1]);
      if (isNaN(idNum)) {
        idPart.push(0);
        idNum = 1;
      }
      idPart[idPart.length - 1] = idNum;
      id = idPart.join('_');
      while (self.findBlockById(id)) {
        idNum++;
        idPart[idPart.length - 1] = idNum;
        id = idPart.join('_');
      }
      rawBlock.attributes = rawBlock.attributes || {};
      rawBlock.attributes.id = id;
    }
    if (rawBlock.attributes && rawBlock.attributes.permissions && rawBlock.attributes.permissions.edit_attributes) {
      delete rawBlock.attributes.permissions.edit_attributes;
    }
    block.setData(rawBlock);
    this.activateBlock(block, i > 0);
  }.bind(this));
  this.notifyUnsaved();
  this.outlineDelegate.notifyTreeChange();
};
var classCommands = editors.map(function (clazz) {
  return 'insert_' + clazz.prototype.tag;
});
var BlockEditorCmdTree = {
  type: 'tab_list',
  children: [{
    type: 'tab',
    name: 'Home',
    children: [{
      type: 'group_x2',
      children: ['preview', 'save', 'saveAs', 'saveAsSystem']
    }, {
      type: 'group_x2',
      children: ['copy', 'paste', 'delete']
    }]
  },
  // {
  //     type: 'tab',
  //     name: 'Insert',
  //     children: [
  //         {
  //             type: 'group_x2',
  //             children: classCommands
  //         }
  //     ]
  // },
  {
    type: 'tab',
    name: 'Data',
    children: [{
      type: 'group_x2',
      children: ['export2Json', 'export2sharpEncode', 'export2clipboard']
    }]
  }]
};
exports.BlockEditorCmdTree = BlockEditorCmdTree;
if (window['FORM_DEV_MODE']) {
  BlockEditorCmdTree.children[0].children.push({
    type: 'group_x2',
    children: ['system_owner_lock', 'system_owner_unlock']
  });
}
var BlockEditorCmdDescriptors = Object.assign({}, _CmdDescriptors["default"]);
exports.BlockEditorCmdDescriptors = BlockEditorCmdDescriptors;
var _default = BlockEditorCmd;
exports["default"] = _default;

/***/ }),

/***/ 27724:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _EventEmitter = _interopRequireWildcard(__webpack_require__(46833));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _IdentTextInput = _interopRequireDefault(__webpack_require__(77104));
var _utils = __webpack_require__(16907);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {BlockEditor} editor
 * @constructor
 */

/***
 * @extends {EventEmitter}
 * @param {BlockEditor} editor
 * @constructor
 */
function BEBase(editor) {
  _EventEmitter["default"].call(this);
  this.editor = editor;
  this.isLocked = false;
}
_OOP["default"].mixClass(BEBase, _EventEmitter["default"]);
BEBase.prototype.menuIcon = 'span.mdi.mdi-cube-outline';
BEBase.prototype.tag2Class = {
  base: BEBase
};
BEBase.prototype.tag = 'CBBase';
BEBase.prototype.createHeader = function () {
  this.$header = (0, _FCore._)({
    "class": ['as-be-base-header', _BoardTable["default"].DRAG_ZONE_CLASS_NAME],
    child: [this.menuIcon, {
      tag: 'span',
      "class": 'as-be-base-tag',
      child: {
        text: this.tag
      }
    }, {
      "class": 'as-be-base-header-right-ctn',
      child: [{
        "class": 'as-be-line-count-ctn',
        child: [{
          tag: 'span',
          "class": 'as-be-line-count',
          child: {
            text: '0'
          }
        }, 'span.mdi.mdi-relation-one-to-one']
      }, {
        "class": 'as-be-base-permission-ctn',
        child: ['span.mdi.mdi-lock-outline']
      }]
    }]
  });
  this.$lineCount = (0, _FCore.$)('.as-be-line-count', this.$header);
  return this.$header;
};
BEBase.prototype.createNameAttr = function () {
  this.$nameAttr = (0, _FCore._)({
    "class": 'as-be-base-attribute',
    child: [{
      "class": 'as-be-base-attribute-name-ctn',
      child: '<label class="as-be-base-attribute-name">ID</label>'
    }, {
      "class": 'as-be-base-attribute-value-ctn',
      child: {
        tag: _IdentTextInput["default"].tag,
        "class": 'as-be-base-id',
        attr: {
          type: 'text'
        }
      }
    }]
  });
  this.$id = (0, _FCore.$)('.as-be-base-id', this.$nameAttr).on('change', this.notifyChange.bind(this));
  return this.$nameAttr;
};
BEBase.prototype.createBody = function () {
  this.$body = (0, _FCore._)({
    "class": 'as-be-base-body',
    child: [this.createNameAttr()]
  });
  return this.$body;
};
BEBase.prototype.createView = function () {
  this.$view = (0, _FCore._)({
    tag: _Board["default"].tag,
    attr: {
      'data-tag': this.tag
    },
    "class": 'as-be-base',
    child: [this.createHeader(), this.createBody()]
  });
  this.$view.on('click', this.ev_click.bind(this));
  this.$view.fmBlock = this;
  return this.$view;
};
BEBase.prototype.getView = function () {
  if (this.$view) return this.$view;
  var v = this.createView();
  this.$view = this.$view || v;
  return this.$view;
};
BEBase.prototype.setData = function (data) {
  if (!this.$view) this.getView();
  this._data = data;
  data.attributes = data.attributes || {};
  data.attributes.id = data.attributes.id || (0, _utils.randomUniqueIdent)();
  this.$id.value = data.attributes && (data.attributes.name || data.attributes.id) || (0, _utils.randomUniqueIdent)();
  this.setLock(data.attributes && data.attributes.permissions && data.attributes.permissions.owner === "system");
  this.owner = data.attributes && data.attributes.permissions && data.attributes.permissions.owner;
};
BEBase.prototype.setLock = function (flag) {
  this.$id.disabled = flag;
  this.isLocked = flag;
};
BEBase.prototype.getData = function () {
  var data = Object.assign({}, this._data);
  data.attributes = Object.assign({}, data.attributes);
  data.attributes.name = this.$id.value;
  data.tag = this.tag;
  if (!data.attributes.permissions && this.owner) data.attributes.permissions = {};
  if (this.owner) {
    data.attributes.permissions.owner = this.owner;
  }
  if (!this.owner && data.attributes.permissions) delete data.attributes.owner;
  if (data.attributes.permissions && Object.keys(data.attributes.permissions).length === 0) delete data.attributes.permissions;
  return data;
};
BEBase.prototype.notifySelect = function (originEvent) {
  this.emit('select', originEvent, this);
};
BEBase.prototype.notifyChange = function () {
  this.editor.outlineDelegate.notifyTreeChange();
  this.editor.notifyUnsaved();
};
BEBase.prototype.ev_inputKeydown = function (input, event) {
  var prev = input.value;
  setTimeout(function () {
    if (input.value !== prev) {
      this.notifyChange();
    }
  }.bind(this), 10);
};
BEBase.prototype.ev_click = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$header, event) || event.target === this.$view) {
    this.notifySelect(event);
  }
};
Object.defineProperty(BEBase.prototype, 'owner', {
  set: function set(value) {
    if (value) {
      this.$view.attr('data-permission-owner', value);
    } else {
      this.$view.attr('data-permission-owner', undefined);
    }
  },
  get: function get() {
    this.getView();
    return this.$view.attr('data-permission-owner') || undefined;
  }
});
Object.defineProperty(BEBase.prototype, 'lineCount', {
  set: function set(value) {
    this.getView();
    this.$lineCount.firstChild.data = value + '';
    if (value > 0) {
      this.$view.addClass('as-has-lines');
    } else {
      this.$view.removeClass('as-has-lines');
    }
  },
  get: function get() {
    return parseInt(this.$lineCount.firstChild.data, 10);
  }
});
BEBase.prototype.destroy = _noop["default"];
var _default = BEBase;
exports["default"] = _default;

/***/ }),

/***/ 23365:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _EventEmitter = __webpack_require__(46833);
var _IdentTextInput = _interopRequireDefault(__webpack_require__(77104));
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _utils = __webpack_require__(16907);
var _CBCmpSwitch = _interopRequireDefault(__webpack_require__(46572));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BECmpSwitch(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BECmpSwitch, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class.CBCmpSwitch = BECmpSwitch;
BECmpSwitch.prototype.menuIcon = 'span.mdi.mdi-set-split';
BECmpSwitch.prototype.tag = 'CBCmpSwitch';
var _default = BECmpSwitch;
exports["default"] = _default;

/***/ }),

/***/ 78704:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _EventEmitter = __webpack_require__(46833);
var _IdentTextInput = _interopRequireDefault(__webpack_require__(77104));
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _utils = __webpack_require__(16907);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BEEntry(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BEEntry, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class.CBEntry = BEEntry;
BEEntry.prototype.menuIcon = 'span.mdi.mdi-ray-start-arrow';
BEEntry.prototype.tag = 'CBEntry';
BEEntry.prototype.displayTag = 'Entry';
var _default = BEEntry;
exports["default"] = _default;

/***/ }),

/***/ 93781:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BEEntryCompleted(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BEEntryCompleted, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class.CBEntryCompleted = BEEntryCompleted;
BEEntryCompleted.prototype.menuIcon = 'span.mdi.mdi-database-arrow-right-outline';
BEEntryCompleted.prototype.tag = 'CBEntryCompleted';
BEEntryCompleted.prototype.displayTag = 'Entry Completed';
var _default = BEEntryCompleted;
exports["default"] = _default;

/***/ }),

/***/ 82178:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _IdentTextInput = _interopRequireDefault(__webpack_require__(77104));
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
var _CBExtendConfig = _interopRequireDefault(__webpack_require__(22517));
var _BEExtendProperty = _interopRequireDefault(__webpack_require__(37645));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEExtendProperty
 * @param {BlockEditor} editor
 * @constructor
 */
function BEExtendConfig(editor) {
  _BEExtendProperty["default"].call(this, editor);
}
_OOP["default"].mixClass(BEExtendConfig, _BEExtendProperty["default"]);
_BEBase["default"].prototype.tag2Class.CBExtendConfig = BEExtendConfig;
BEExtendConfig.prototype.menuIcon = _CBExtendConfig["default"].prototype.menuIcon;
BEExtendConfig.prototype.tag = 'CBExtendConfig';
BEExtendConfig.prototype.displayTag = 'Extend Config';
var _default = BEExtendConfig;
exports["default"] = _default;

/***/ }),

/***/ 37645:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _EventEmitter = __webpack_require__(46833);
var _IdentTextInput = _interopRequireDefault(__webpack_require__(77104));
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _utils = __webpack_require__(84512);
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BEExtendProperty(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BEExtendProperty, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class.CBExtendProperty = BEExtendProperty;
BEExtendProperty.prototype.menuIcon = 'span.mdi.mdi-source-commit-start';
BEExtendProperty.prototype.tag = 'CBExtendProperty';
BEExtendProperty.prototype.displayTag = 'Extend Property';
BEExtendProperty.prototype.createDisembarkAttr = function () {
  this.$disembarkAttr = (0, _FCore._)({
    "class": 'as-be-base-attribute',
    child: [{
      "class": 'as-be-base-attribute-name-ctn',
      child: '<label class="as-be-base-attribute-name">disembark</label>'
    }, {
      "class": 'as-be-base-attribute-value-ctn',
      child: {
        tag: _CheckBoxInput["default"].tag,
        "class": 'as-be-base-disembark'
      }
    }]
  });
  this.$disembark = (0, _FCore.$)('.as-be-base-disembark', this.$disembarkAttr);
  return this.$disembarkAttr;
};
BEExtendProperty.prototype.createBody = function () {
  var body = _BEBase["default"].prototype.createBody.apply(this, arguments);
  body.addChild(this.createDisembarkAttr());
  return body;
};
BEExtendProperty.prototype.setData = function (data) {
  _BEBase["default"].prototype.setData.apply(this, arguments);
  this.$disembark.checked = data.attributes.disembark;
};
BEExtendProperty.prototype.getData = function () {
  var data = _BEBase["default"].prototype.getData.call(this);
  data.attributes.disembark = this.$disembark.checked;
  return data;
};
var _default = BEExtendProperty;
exports["default"] = _default;

/***/ }),

/***/ 1876:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BEExternalTrigger(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BEExternalTrigger, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class.CBExternalTrigger = BEExternalTrigger;
BEExternalTrigger.prototype.menuIcon = 'span.mdi.mdi.mdi-square-wave';
BEExternalTrigger.prototype.tag = 'CBExternalTrigger';
BEExternalTrigger.prototype.displayTag = 'External Trigger';
var _default = BEExternalTrigger;
exports["default"] = _default;

/***/ }),

/***/ 17500:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _EventEmitter = __webpack_require__(46833);
var _IdentTextInput = _interopRequireDefault(__webpack_require__(77104));
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BEFileDownloader(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BEFileDownloader, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class.CBFileDownloader = BEFileDownloader;
BEFileDownloader.prototype.menuIcon = 'span.mdi.mdi-download';
BEFileDownloader.prototype.tag = 'CBFileDownloader';
BEFileDownloader.prototype.displayTag = 'File Downloader';
BEFileDownloader.prototype.createFileNameAttr = function () {
  this.$fileNameAttr = (0, _FCore._)({
    "class": 'as-be-base-attribute',
    child: [{
      "class": 'as-be-base-attribute-name-ctn',
      child: '<label class="as-be-base-attribute-name">fileName</label>'
    }, {
      "class": 'as-be-base-attribute-value-ctn',
      child: {
        tag: 'input',
        "class": 'as-be-file-downloader-file-name',
        attr: {
          type: 'text'
        }
      }
    }]
  });
  this.$fileName = (0, _FCore.$)('.as-be-file-downloader-file-name', this.$fileNameAttr);
  this.$fileName.on('keydown', this.ev_inputKeydown.bind(this, this.$fileName));
  return this.$fileNameAttr;
};
BEFileDownloader.prototype.createBody = function () {
  var body = _BEBase["default"].prototype.createBody.apply(this, arguments);
  body.addChild(this.createFileNameAttr());
  return body;
};
BEFileDownloader.prototype.setData = function (data) {
  _BEBase["default"].prototype.setData.apply(this, arguments);
  this.$fileName.value = data.attributes && data.attributes.fileName || '';
};
BEFileDownloader.prototype.getData = function () {
  var data = _BEBase["default"].prototype.getData.call(this);
  data.attributes.fileName = this.$fileName.value;
  return data;
};
var _default = BEFileDownloader;
exports["default"] = _default;

/***/ }),

/***/ 90441:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _IdentTextInput = _interopRequireDefault(__webpack_require__(77104));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BEFunction(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BEFunction, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class["function"] = BEFunction;
BEFunction.prototype.tag = 'function';
BEFunction.prototype.menuIcon = 'span.mdi.mdi-function';
BEFunction.prototype.displayTag = 'Function';
BEFunction.prototype.createArgsAttr = function () {
  this.$argsAttr = (0, _FCore._)({
    "class": 'as-be-base-attribute',
    child: [{
      "class": 'as-be-base-attribute-name-ctn',
      child: '<label class="as-be-base-attribute-name">args</label>'
    }, {
      "class": 'as-be-base-attribute-value-ctn',
      child: {
        "class": 'as-be-function-args',
        child: {
          tag: 'button',
          "class": ['as-be-function-args-add-btn', 'as-from-tool-button'],
          child: 'span.mdi.mdi-plus'
        }
      }
    }]
  });
  this.$args = (0, _FCore.$)('.as-be-function-args', this.$argsAttr);
  this.$addArgbtn = (0, _FCore.$)('.as-be-function-args-add-btn', this.$args).on('click', this._newArgs.bind(this, '', true));
  return this.$argsAttr;
};
BEFunction.prototype.createBody = function () {
  var body = _BEBase["default"].prototype.createBody.apply(this, arguments);
  body.addChild(this.createArgsAttr());
  body.addChild(this.createBodyAttr());
  return body;
};
BEFunction.prototype.createBodyAttr = function () {
  this.$bodyAttr = (0, _FCore._)({
    "class": 'as-be-base-attribute',
    child: [{
      "class": 'as-be-base-attribute-name-ctn',
      child: '<label class="as-be-base-attribute-name">body</label>'
    }, {
      "class": 'as-be-base-attribute-value-ctn',
      child: {
        tag: 'pre',
        "class": 'as-be-function-body'
      }
    }]
  });
  this.$functionBody = (0, _FCore.$)('.as-be-function-body', this.$bodyAttr);
  this.bodyEditor = ace.edit(this.$functionBody);
  this.bodyEditor.$blockScrolling = Infinity;
  this.bodyEditor.setOption('maxLines', 80);
  this.bodyEditor.session.setMode("ace/mode/javascript");
  this.bodyEditor.setOptions({
    enableBasicAutocompletion: true,
    enableSnippets: true
  });
  this.bodyEditor.on('change', this.ev_bodyEditorChange.bind(this));
  return this.$bodyAttr;
};
BEFunction.prototype.setData = function (data) {
  this._setDataTime = new Date().getTime();
  _BEBase["default"].prototype.setData.apply(this, arguments);
  var args = data.attributes.args || [];
  for (var i = 0; i < args.length; ++i) {
    this._newArgs(args[i], false);
  }
  this.bodyEditor.setValue(data.attributes.body || '', -1);
};
BEFunction.prototype.getData = function () {
  var data = _BEBase["default"].prototype.getData.call(this);
  data.attributes.args = (0, _FCore.$$)('.as-be-function-arg', this.$args).map(function (e) {
    return e.value;
  }).filter(function (value) {
    return value.trim().length > 0;
  });
  data.attributes.body = this.bodyEditor.getValue();
  return data;
};
BEFunction.prototype.setLock = function (flag) {
  _BEBase["default"].prototype.setLock.call(this, flag);
  this.bodyEditor.setReadOnly(flag);
  this.$addArgbtn.addStyle('visibility', flag ? 'hidden' : 'visible');
  Array.prototype.forEach.call(this.$args.childNodes, function (c) {
    return c.disabled = flag;
  });
};
BEFunction.prototype._newArgs = function (value, userAction) {
  /***
   * @type {PreInput}
   */
  var argsInput = (0, _FCore._)({
    tag: _IdentTextInput["default"].tag,
    elt: (0, _FCore._)('preinput'),
    "class": ['as-be-function-arg'],
    props: {
      value: value || '',
      disabled: this.isLocked
    },
    on: {
      blur: function blur() {
        var value = this.value;
        value = value.trim();
        if (value.length === 0) {
          var beforeElt = this.parentElement.findChildBefore(this);
          if (beforeElt && beforeElt.innerHTML === ', ') {
            beforeElt.remove();
          }
          this.remove();
        } else {
          this.removeClass('as-be-function-arg-new-input');
        }
      },
      focus: function focus() {
        this.addClass('as-be-function-arg-new-input');
        this._prevValue = this.value;
      }
    }
  });
  if (this.$args.childNodes.length > 1) {
    this.$args.addChildBefore((0, _FCore._)('<span>, </span>'), this.$addArgbtn);
  }
  this.$args.addChildBefore(argsInput, this.$addArgbtn);
  if (userAction) argsInput.focus();
  var now = new Date().getTime();
  if (!this._setDataTime || now - this._setDataTime > 1000) this.notifyChange();
};
BEFunction.prototype.ev_bodyEditorChange = function () {
  var now = new Date().getTime();
  if (!this._setDataTime || now - this._setDataTime > 1000) this.notifyChange();
};
var _default = BEFunction;
exports["default"] = _default;

/***/ }),

/***/ 6830:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _EventEmitter = __webpack_require__(46833);
var _IdentTextInput = _interopRequireDefault(__webpack_require__(77104));
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BEPropsGate(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BEPropsGate, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class.CBPropsGate = BEPropsGate;
BEPropsGate.prototype.menuIcon = 'span.mdi.mdi-code-json';
BEPropsGate.prototype.tag = 'CBPropsGate';
BEPropsGate.prototype.displayTag = 'Props Gate';
var _default = BEPropsGate;
exports["default"] = _default;

/***/ }),

/***/ 4305:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _EventEmitter = __webpack_require__(46833);
var _IdentTextInput = _interopRequireDefault(__webpack_require__(77104));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _FNode = __webpack_require__(88215);
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BERadioGroup(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BERadioGroup, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class.CBRadioGroup = BERadioGroup;
BERadioGroup.prototype.tag = 'CBRadioGroup';
BERadioGroup.prototype.menuIcon = 'span.mdi.mdi-radiobox-marked';
BERadioGroup.prototype.displayTag = 'Radio Group';
BERadioGroup.prototype.createGroupNameAttr = function () {
  this.$groupNameAttr = (0, _FCore._)({
    "class": 'as-be-base-attribute',
    child: [{
      "class": 'as-be-base-attribute-name-ctn',
      child: '<label class="as-be-base-attribute-name">groupName</label>'
    }, {
      "class": 'as-be-base-attribute-value-ctn',
      child: {
        tag: 'selectmenu',
        "class": 'as-be-as-be-radio-group-name'
      }
    }]
  });
  this.$groupName = (0, _FCore.$)('.as-be-as-be-radio-group-name', this.$groupNameAttr).on('change', this.notifyChange.bind(this));
  return this.$groupNameAttr;
};
BERadioGroup.prototype.createBody = function () {
  _BEBase["default"].prototype.createBody.apply(this, arguments);
  this.$body.addChild(this.createGroupNameAttr());
  return this.$body;
};
BERadioGroup.prototype.setData = function (data) {
  _BEBase["default"].prototype.setData.apply(this, arguments);
  this.$groupName.items = this._getRadioGroupNames();
  this.$groupName.value = this._data.attributes.groupName;
};
BERadioGroup.prototype.getData = function () {
  var data = _BEBase["default"].prototype.getData.call(this);
  data.attributes.groupName = this.$groupName.value;
  return data;
};
BERadioGroup.prototype._getRadioGroupNames = function () {
  /***
   *
   * @type {LayoutEditor}
   */
  var layoutEditor = this.editor.getContext(_R["default"].LAYOUT_EDITOR);
  var rootLayout = layoutEditor.rootLayout;
  var rootFragment = layoutEditor.rootFragment;
  var nameDict = {};
  (0, _FNode.traversal)(rootLayout, function (path) {
    var node = path.node;
    if (node.fragment !== rootFragment) {
      path.skipChildren();
      return;
    }
    if (node.tag === 'Radio' && node.attributes.groupName) {
      nameDict[node.attributes.groupName] = true;
    }
  });
  return Object.keys(nameDict).map(function (name) {
    return {
      text: name,
      value: name
    };
  });
};
var _default = BERadioGroup;
exports["default"] = _default;

/***/ }),

/***/ 70260:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _EventEmitter = __webpack_require__(46833);
var _IdentTextInput = _interopRequireDefault(__webpack_require__(77104));
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BESnackBar(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BESnackBar, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class.CBSnackBar = BESnackBar;
BESnackBar.prototype.menuIcon = 'span.mdi.mdi-message-text';
BESnackBar.prototype.tag = 'CBSnackBar';
BESnackBar.prototype.displayTag = 'SnackBar';
var _default = BESnackBar;
exports["default"] = _default;

/***/ }),

/***/ 82213:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _EventEmitter = __webpack_require__(46833);
var _IdentTextInput = _interopRequireDefault(__webpack_require__(77104));
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BETimer(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BETimer, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class.CBTimer = BETimer;
BETimer.prototype.menuIcon = 'span.mdi.mdi-timer-outline';
BETimer.prototype.tag = 'CBTimer';
BETimer.prototype.displayTag = 'Timer';
BETimer.prototype.createDurationAttr = function () {
  this.$durationAttr = (0, _FCore._)({
    "class": 'as-be-base-attribute',
    child: [{
      "class": 'as-be-base-attribute-name-ctn',
      child: '<label class="as-be-base-attribute-name">duration</label>'
    }, {
      "class": 'as-be-base-attribute-value-ctn',
      child: {
        tag: 'input',
        "class": 'as-be-timer-duration',
        attr: {
          type: 'number',
          min: '0'
        }
      }
    }]
  });
  this.$duration = (0, _FCore.$)('.as-be-timer-duration', this.$durationAttr);
  this.$duration.on('mousedown', this.ev_inputKeydown.bind(this, this.$duration)).on('keydown', this.ev_inputKeydown.bind(this, this.$duration));
  return this.$durationAttr;
};
BETimer.prototype.createBody = function () {
  var body = _BEBase["default"].prototype.createBody.apply(this, arguments);
  body.addChild(this.createDurationAttr());
  return body;
};
BETimer.prototype.setData = function (data) {
  _BEBase["default"].prototype.setData.apply(this, arguments);
  if (!(0, _utils.isRealNumber)(data.attributes.duration)) data.attributes.duration = 60000;
  this.$duration.value = data.attributes.duration;
};
BETimer.prototype.getData = function () {
  var data = _BEBase["default"].prototype.getData.apply(this, arguments);
  var duration = parseFloat(this.$duration.value);
  if (!(0, _utils.isRealNumber)(duration)) duration = 60000;
  data.attributes.duration = duration;
  return data;
};
var _default = BETimer;
exports["default"] = _default;

/***/ }),

/***/ 5948:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEBase = _interopRequireDefault(__webpack_require__(27724));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BEBase
 * @param {BlockEditor} editor
 * @constructor
 */
function BEYesNoQuestion(editor) {
  _BEBase["default"].call(this, editor);
}
_OOP["default"].mixClass(BEYesNoQuestion, _BEBase["default"]);
_BEBase["default"].prototype.tag2Class.CBYesNoQuestion = BEYesNoQuestion;
BEYesNoQuestion.prototype.menuIcon = 'span.mdi.mdi-comment-question-outline';
BEYesNoQuestion.prototype.tag = 'CBYesNoQuestion';
BEYesNoQuestion.prototype.displayTag = 'Yes/No Question';
BEYesNoQuestion.prototype.createMessageAttr = function () {
  this.$messageAttr = (0, _FCore._)({
    "class": 'as-be-base-attribute',
    child: [{
      "class": 'as-be-base-attribute-name-ctn',
      child: '<label class="as-be-base-attribute-name">message</label>'
    }, {
      "class": 'as-be-base-attribute-value-ctn',
      child: {
        "class": 'as-be-base-attribute-value-ctn',
        child: {
          tag: 'textarea2',
          "class": 'as-be-message'
        }
      }
    }]
  });
  this.$message = (0, _FCore.$)('.as-be-message', this.$messageAttr);
  return this.$messageAttr;
};
BEYesNoQuestion.prototype.createBody = function () {
  var body = _BEBase["default"].prototype.createBody.apply(this, arguments);
  body.addChild(this.createMessageAttr());
  return body;
};
BEYesNoQuestion.prototype.setData = function (data) {
  _BEBase["default"].prototype.setData.apply(this, arguments);
  this.$message.value = data.attributes && data.attributes.message || '';
};
BEYesNoQuestion.prototype.getData = function () {
  var data = _BEBase["default"].prototype.getData.call(this);
  data.attributes.message = this.$message.value;
  return data;
};
var _default = BEYesNoQuestion;
exports["default"] = _default;

/***/ }),

/***/ 65748:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
__webpack_require__(94066);
var _SvgViewBox = _interopRequireDefault(__webpack_require__(51235));
var _GCore = _interopRequireDefault(__webpack_require__(66723));
var _Assembler = __webpack_require__(2326);
var _CDENode = _interopRequireDefault(__webpack_require__(59328));
var _IndexedPropertyNames = _interopRequireDefault(__webpack_require__(63017));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _FNode = __webpack_require__(88215);
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _Thread = _interopRequireDefault(__webpack_require__(44067));
var _GraphOptimizerFactor = _interopRequireDefault(__webpack_require__(1748));
var _NodePositionController = _interopRequireDefault(__webpack_require__(81786));
var _ViewBoxController = _interopRequireDefault(__webpack_require__(62592));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _NodeSelectController = _interopRequireDefault(__webpack_require__(18127));
var _CMDTool = _interopRequireDefault(__webpack_require__(8982));
var _CircuitDiagramEditorCmd = _interopRequireWildcard(__webpack_require__(45553));
var _LoadingCubeModal = _interopRequireDefault(__webpack_require__(95521));
var _NewLineController = _interopRequireDefault(__webpack_require__(82489));
var _LineSelectController = _interopRequireDefault(__webpack_require__(64927));
var _IncludedBlockManager = _interopRequireDefault(__webpack_require__(92040));
var _utils = __webpack_require__(84512);
var _MultiObjectPropertyEditor = __webpack_require__(95567);
var _CBComponentGroup = _interopRequireDefault(__webpack_require__(83935));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _FOutline = __webpack_require__(43894);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends BaseEditor
 * @constructor
 */
function CircuitDiagramEditor() {
  _BaseEditor["default"].call(this);
  this.viewBoxCtroller = new _ViewBoxController["default"](this);
  this.nodeController = new _NodePositionController["default"](this);
  this.nodeSelectController = new _NodeSelectController["default"](this);
  this.lineSelectController = new _LineSelectController["default"](this);
  this.newLineController = new _NewLineController["default"](this);
  this.cmdTool = new _CMDTool["default"]();
  this.includedBlockManager = new _IncludedBlockManager["default"](this);
  this.nodeOutlineDelegate = new CircuitDiagramEditorOutlineDelegate(this);
  for (var i in this) {
    if (i.startsWith('ev_')) {
      this[i] = this[i].bind(this);
    }
  }
  this.$nodes = {};
  this.$lines = {};
  this.lines = [];
  this.diagram = {};
  if (!CircuitDiagramEditor.optimizer) {
    CircuitDiagramEditor.optimizer = new _Thread["default"]({
      methods: {
        GraphOptimizerFactor: _GraphOptimizerFactor["default"]
      },
      extendCode: 'GraphOptimizerFactor(self);'
    });
    CircuitDiagramEditor.optimizer.findBeautyGrid = function () {
      return this.invoke.apply(this, ['findBeautyGrid'].concat(Array.prototype.slice.call(arguments)));
    };
  }
  this.optimizer = CircuitDiagramEditor.optimizer;
  this.cmdTool.attach(this);
  this.cmdTool.bindWithEditor(this);
  this.cmdRunner.assign(_CircuitDiagramEditorCmd["default"]);
  Object.keys(_CircuitDiagramEditorCmd.CircuitDiagramEditorCmdDescriptors).forEach(function (cmd) {
    if (_CircuitDiagramEditorCmd.CircuitDiagramEditorCmdDescriptors[cmd].bindKey) this.bindKeyToCmd(_CircuitDiagramEditorCmd.CircuitDiagramEditorCmdDescriptors[cmd].bindKey.win, cmd);
  }.bind(this));
}
_OOP["default"].mixClass(CircuitDiagramEditor, _BaseEditor["default"]);
CircuitDiagramEditor.prototype.onStart = function () {
  this.cmdTool.start();
};
CircuitDiagramEditor.prototype.onPause = function () {
  this.cmdTool.pause();
  if (this.outline && this.outline.delegate === this.nodeOutlineDelegate) {
    this.outline.delegate = null;
  }
};
CircuitDiagramEditor.prototype.notifySaved = function () {
  this.flexFormEditor.notifySaved();
};
CircuitDiagramEditor.prototype.notifyUnsaved = function () {
  this.flexFormEditor.notifyUnsaved();
};
CircuitDiagramEditor.prototype.createView = function () {
  var _this = this;
  this.$view = (0, _FCore._)({
    "class": ['as-cde', 'as-choose-remove-line'],
    attr: {
      tabindex: 1
    },
    child: [{
      "class": 'as-cde-header',
      child: [this.cmdTool.getView()]
    }, {
      "class": 'as-cde-body',
      child: [_GCore["default"]._({
        tag: _SvgViewBox["default"].tag,
        "class": 'as-cde-line-layer'
      }), {
        "class": 'as-cde-node-layer',
        style: {
          left: '10px',
          top: '10px'
        }
      }, {
        "class": 'as-cde-loading-modal',
        child: {
          "class": 'as-cde-loading',
          child: 'cube-loading-ico'
        }
      }, {
        tag: 'vscrollbar',
        "class": 'as-cde-v-scroll-bar'
      }, {
        tag: 'hscrollbar',
        "class": 'as-cde-h-scroll-bar'
      }]
    }]
  });
  this.$body = (0, _FCore.$)('.as-cde-body', this.$view);
  this.$vscrollbar = (0, _FCore.$)('.as-cde-v-scroll-bar', this.$view);
  this.$hscrollbar = (0, _FCore.$)('.as-cde-h-scroll-bar', this.$view);
  this.$lineLayer = (0, _FCore._)({
    tag: _Hanger["default"].tag,
    elt: (0, _FCore.$)('.as-cde-line-layer', this.$view)
  });
  this.$lineLayer.box.origin = new _Vec["default"](10, 10);
  this.$attachhook = (0, _FCore._)('attachhook').addTo(this.$view).on('attached', function () {
    _ResizeSystem["default"].add(_this.$attachhook);
  });
  this.$nodeLayer = (0, _FCore.$)('.as-cde-node-layer', this.$view);
  this.viewBoxCtroller.onCreateView();
  this.$view.on('keydown', this.ev_cmdKeyDown.bind(this));
  this.$view.requestUpdateSize = function () {
    _this.viewBoxCtroller.ev_resize();
  };
  this.$attachhook.requestUpdateSize = this.$view.requestUpdateSize;
};
CircuitDiagramEditor.prototype._clearView = function () {
  this.lineSelectController.unSelectAll();
  this.nodeSelectController.unSelectAll();
  var id;
  for (id in this.$nodes) {
    this.$nodes[id].remove();
  }
  for (id in this.$lines) {
    this.$lines[id].remove();
  }
  this.$nodes = {};
  this.$lines = {};
};
CircuitDiagramEditor.prototype.setData = function (lines, diagram) {
  this._clearView();
  this.lines = lines;
  this.diagram = diagram;
  this._updateNodes();
  this._updateLines();
  if (!diagram || !diagram.positions) setTimeout(this.autoAlignPosition.bind(this), 100);
};
CircuitDiagramEditor.prototype.getLineData = function () {
  return this.lines;
};
CircuitDiagramEditor.prototype.getDiagramData = function () {
  var positions = {};
  var nodeElt;
  for (var nodeId in this.$nodes) {
    nodeElt = this.$nodes[nodeId];
    positions[nodeId] = {
      x: nodeElt.x,
      y: nodeElt.y
    };
  }
  return {
    includedBlocks: Object.keys(this.$nodes),
    positions: positions
  };
};
CircuitDiagramEditor.prototype._makeNodeElt = function (props) {
  /***
   * @type {CDENode}
   */
  var nodeElt = (0, _FCore._)({
    tag: _CDENode["default"].tag,
    props: Object.assign({
      lines: []
    }, props)
  });
  nodeElt.$header.on('dblclick', this.viewTo.bind(this, props.classType, props.nodeId));
  this.nodeController.addEventControl(nodeElt);
  this.newLineController.addNodeEventControl(nodeElt);
  return nodeElt;
};
CircuitDiagramEditor.prototype.onAttached = function () {
  /***
   *
   * @type {FlexFormEditor}
   */
  this.flexFormEditor = this.getContext(_R["default"].FLEX_FORM_EDITOR);

  /***
   *
   * @type {LayoutEditor}
   */
  this.layoutEditor = this.getContext(_R["default"].LAYOUT_EDITOR);

  /***
   *
   * @type {FormEditor}
   */
  this.formEditor = this.getContext(_R["default"].FORM_EDITOR);

  /***
   * @type {BlockEditor}
   */
  this.blockEditor = this.getContext(_R["default"].BLOCK_EDITOR);
  /**
   *
   * @type {MultiObjectPropertyEditor}
   */
  this.propertyEditor = this.getContext(_R["default"].ALL_PROPERTY_EDITOR);
};
CircuitDiagramEditor.prototype.onResume = function () {
  this._updateNodes();
  this._updateLines();
  this.cmdTool.resume();
  this.propertyEditor.delegate = null;
  this.outline = this.getContext(_R["default"].COMPONENT_OUTLINE);
  if (this.outline) {
    this.outline.delegate = this.nodeOutlineDelegate;
  }
};
CircuitDiagramEditor.prototype._updateNodes = function () {
  var nodeSheet = this.getNodeSheet();
  var displayedBlockDict = this.lines.reduce(function (ac, cr) {
    var uNode = nodeSheet.byId[cr.u];
    var vNode = nodeSheet.byId[cr.v];
    if (uNode) ac[uNode.id] = uNode;
    if (vNode) ac[vNode.id] = vNode;
    return ac;
  }, {});
  if (this.diagram && this.diagram.includedBlocks) {
    // get all node must display
    this.diagram.includedBlocks.reduce(function (ac, cr) {
      var node = nodeSheet.byId[cr];
      if (node) {
        ac[node.id] = node;
      }
      return ac;
    }, displayedBlockDict);
  }
  var nodeId;
  for (nodeId in this.$nodes) {
    if (!displayedBlockDict[nodeId]) {
      this.$nodes[nodeId].remove();
      delete this.$nodes[nodeId];
    }
  }
  var nodeElt;
  var nodeInf;
  var needReloadPosition;
  for (nodeId in displayedBlockDict) {
    nodeElt = this.$nodes[nodeId];
    needReloadPosition = false;
    nodeInf = displayedBlockDict[nodeId];
    if (!nodeElt) {
      if (!nodeInf.clazz) {
        console.error('block error', nodeInf);
      }
      nodeElt = this._makeNodeElt({
        typeIcon: nodeInf.clazz.prototype.menuIcon,
        name: nodeInf.displayName || nodeInf.name || nodeInf.id,
        displayName: nodeInf.displayName,
        inputPins: nodeInf.inputPins,
        outputPins: nodeInf.outputPins,
        inputLines: {},
        outputLines: {},
        title: nodeId,
        nodeId: nodeId,
        classType: nodeInf.type
      });
      if (this.diagram && this.diagram && this.diagram.positions && this.diagram.positions[nodeId]) {
        nodeElt.x = this.diagram.positions[nodeId].x;
        nodeElt.y = this.diagram.positions[nodeId].y;
      }
      this.$nodes[nodeId] = nodeElt;
      this.$nodeLayer.addChild(nodeElt);
      needReloadPosition = true;
    } else {
      if (nodeElt.name !== (nodeInf.displayName || nodeInf.name)) {
        nodeElt.name = nodeInf.displayName || nodeInf.name;
        needReloadPosition = true;
      }
      if ((0, _utils.keyStringOf)(nodeInf.inputPins) !== (0, _utils.keyStringOf)(nodeElt.inputPins)) {
        nodeElt.inputPins = nodeInf.inputPins;
        needReloadPosition = true;
      }
    }
    if (needReloadPosition) nodeElt.reloadPinPosition();
  }
};
CircuitDiagramEditor.prototype._updateLines = function () {
  var line;
  var lineElt;
  var startNode, endNode;
  var nodeSheet = this.getNodeSheet();
  var u, v;
  var uId, vId;
  var invalidLines = [];
  var lineColor;
  for (var i = 0; i < this.lines.length; ++i) {
    line = this.lines[i];
    u = nodeSheet.byId[line.u];
    v = nodeSheet.byId[line.v];
    lineElt = this.$lines[line.id];
    uId = u && u.id;
    vId = v && v.id;
    startNode = this.$nodes[uId];
    endNode = this.$nodes[vId];
    if (!u || !v) {
      if (lineElt) {
        lineElt.remove();
        delete this.$lines[line.id];
      }
      if (startNode) delete startNode.lines[line.id];
      if (endNode) delete endNode.lines[line.id];
      continue;
    }
    if (!lineElt) {
      lineColor = new _Color["default"]([Math.random(), Math.random(), Math.random(), 1]);
      lineElt = _GCore["default"]._({
        tag: 'g',
        "class": 'as-cde-line-group',
        style: {
          '--line-color': lineColor.toString(),
          '--line-lock-color': lineColor.getContrastYIQ().toString()
        },
        attr: {
          'data-id': line.id
        },
        child: [{
          tag: 'path',
          "class": 'as-cde-hit-line'
        }, {
          tag: 'path',
          "class": 'as-cde-line'
        }, {
          tag: 'path',
          "class": 'as-cde-line-lock'
        }],
        props: {
          uId: uId,
          vId: vId,
          uPin: line.uPin,
          vPin: line.vPin,
          lineId: line.id
        }
      });
      if (line.permissions && line.permissions.owner) {
        lineElt.attr('data-permission-owner', line.permissions.owner);
      }
      this.lineSelectController.addLineControlEvent(lineElt);
      this.$lines[line.id] = lineElt;
      this.$lineLayer.addChild(lineElt);
      startNode.lines[line.id] = line;
      endNode.lines[line.id] = line;
    }
    if (!this.updateLinePosition(line.id)) {
      invalidLines.push(line.id);
    }
  }
  if (invalidLines.length > 0) {
    if (window.ABSOL_DEBUG) console.error("Invalid lines: ", invalidLines.map(function (id) {
      return this.lines.find(function (line) {
        return line.id === id;
      });
    }.bind(this)));
  }
  invalidLines.forEach(function (id) {
    this.deleteLine(id);
  }.bind(this));
};
CircuitDiagramEditor.prototype.updateLinePosition = function (id) {
  var lineElt = this.$lines[id];
  if (!lineElt) return true;
  var uId = lineElt.uId;
  var vId = lineElt.vId;
  var startNode = this.$nodes[uId];
  var endNode = this.$nodes[vId];
  if (!startNode || !endNode) {
    return false;
  }
  var startPinHolder = startNode.pinHolders.out[lineElt.uPin];
  var endPinHolder = endNode.pinHolders["in"][lineElt.vPin];
  if (!startPinHolder || !endPinHolder) {
    return false;
  }
  var startPos = startNode.position.add(startPinHolder.pos);
  var endPos = endNode.position.add(endPinHolder.pos);
  var dx = 50;
  if (startPos.x > endPos.x) dx += Math.min(200, startPos.x - endPos.x) / 2;
  var path = ['M', startPos.x, startPos.y, 'C', startPos.x + dx, startPos.y, ',', endPos.x - dx, endPos.y, ',', endPos.x, endPos.y].join(' ');
  lineElt.lastChild.attr('d', path);
  lineElt.childNodes[1].attr('d', path);
  lineElt.firstChild.attr('d', path);
  return true;
};
CircuitDiagramEditor.prototype.focusNode = function (node) {
  node = node || null;
  this.nodeSelectController.select(node, false);
};

/***
 *
 * @param {string} id
 */
CircuitDiagramEditor.prototype.deleteLine = function (id) {
  var lineElt = this.$lines[id];
  if (!lineElt) return;
  lineElt.remove();
  var uNodeElt = this.$nodes[lineElt.uId];
  var vNodeElt = this.$nodes[lineElt.vId];
  delete uNodeElt.lines[lineElt.lineId];
  delete vNodeElt.lines[lineElt.lineId];
  delete this.$lines[lineElt.lineId];
  var lineIdx = this.lines.findIndex(function (it) {
    return it.id === lineElt.lineId;
  });
  if (lineIdx >= 0) {
    this.lines.splice(lineIdx, 1);
    this.notifyUnsaved();
  } else {
    console.error("Editor error: Could not find line id: " + lineElt.lineId);
  }
};

/***
 *
 * @param {string} id
 */
CircuitDiagramEditor.prototype.setLinePermissionOwner = function (id, owner) {
  var lineElt = this.$lines[id];
  var lineIdx = this.lines.findIndex(function (it) {
    return it.id === lineElt.lineId;
  });
  if (!lineElt || lineIdx < 0) return;
  var line = this.lines[lineIdx];
  var lineColor;
  if (owner) {
    lineElt.attr('data-permission-owner', owner);
    lineColor = _Color["default"].parse(lineElt.style.getPropertyValue('--line-color') || 'white');
    lineElt.addStyle('--line-lock-color', lineColor.getContrastYIQ().toString('rgba'));
    line.permissions = line.permissions || {};
    if (line.permissions.owner !== owner) {
      line.permissions.owner = owner;
      this.notifyUnsaved();
    }
  } else {
    lineElt.attr('data-permission-owner', undefined);
    if (line.permissions) {
      if (line.permissions.owner) {
        delete line.permissions.owner;
        this.notifyUnsaved();
      }
      if (Object.keys(line.permissions).length === 0) {
        delete line.permissions;
      }
    }
  }
};
CircuitDiagramEditor.prototype.getNodeSheet = function () {
  if (this._pointListCache && !this._pointListCache.expire) {
    return this._pointListCache;
  }
  this._pointListCache = {};
  setTimeout(function () {
    this.expire = true;
  }.bind(this._pointListCache), 300);
  var list = this.layoutEditor.getCircuitNodes().concat(this.blockEditor.getCircuitNodes());
  list.sort(function (a, b) {
    a = a.order;
    b = b.order;
    if (a === b) return 0;
    if (a < b) return -1;
    return 1;
  });
  this._pointListCache.list = list;
  this._pointListCache.byId = list.reduce(function (ac, cr) {
    ac[cr.id] = cr;
    return ac;
  }, {});
  return this._pointListCache;
};
CircuitDiagramEditor.prototype.getGridData = function () {
  var res = {
    nodes: {},
    lines: {}
  };
  var nodeElt;
  var nodeData;
  for (var i in this.$nodes) {
    nodeElt = this.$nodes[i];
    nodeData = {
      x: nodeElt.x / 25,
      y: nodeElt.y / 25,
      width: Math.ceil(nodeElt.rect.width / 25),
      height: Math.ceil(nodeElt.rect.height / 25),
      inputPos: nodeElt.inputPins.reduce(function (ac, cr, idx) {
        var pos = nodeElt.pinHolders["in"][cr.name].pos;
        ac[cr.name] = {
          x: pos.x / 25,
          y: pos.y / 25
        };
        return ac;
      }, {}),
      outputPos: nodeElt.outputPins.reduce(function (ac, cr, idx) {
        var pos = nodeElt.pinHolders.out[cr.name].pos;
        ac[cr.name] = {
          x: pos.x / 25,
          y: pos.y / 25
        };
        return ac;
      }, {})
    };
    res.nodes[i] = nodeData;
  }
  var lineElt;
  for (var j in this.$lines) {
    lineElt = this.$lines[j];
    res.lines[j] = {
      uId: lineElt.uId,
      vId: lineElt.vId,
      uPin: lineElt.uPin,
      vPin: lineElt.vPin
    };
  }
  return res;
};
CircuitDiagramEditor.prototype.autoAlignPosition = function () {
  var self = this;
  var token = _LoadingCubeModal["default"].show();
  this.optimizer.findBeautyGrid(this.getGridData(), 3000).then(function (res) {
    _LoadingCubeModal["default"].close(token);
    if (res.noChange) return;
    var positions = res.positions;
    var nodeElt;
    var pos;
    for (var i in positions) {
      nodeElt = self.$nodes[i];
      if (!nodeElt) continue;
      pos = positions[i];
      if (!pos) continue;
      nodeElt.x = pos.x * 25;
      nodeElt.y = pos.y * 25;
    }
    for (var j in self.$lines) {
      self.updateLinePosition(j);
    }
    self.notifyUnsaved();
  })["catch"](function () {
    _LoadingCubeModal["default"].close(token);
  });
};
CircuitDiagramEditor.prototype.getCmdDescriptor = function (name) {
  var _this2 = this;
  var descriptor = _CircuitDiagramEditorCmd.CircuitDiagramEditorCmdDescriptors[name];
  var res = Object.assign({
    type: 'trigger',
    desc: 'command: ' + name,
    icon: 'span.mdi.mdi-apple-keyboard-command'
  }, descriptor);
  var selectedLineIdList = this.lineSelectController.getSelectedIdList();
  if (name === 'delete') {
    res.disabled = selectedLineIdList.length === 0 || selectedLineIdList.some(function (id) {
      var line = _this2.lines.find(function (line) {
        return line.id === id;
      });
      if (!line) return false;
      return line.permissions && line.permissions.owner === 'system';
    });
  }
  var task = this.getContext(_R["default"].TASK);
  var isSystemForm = task && task.bundle && task.bundle.contentArguments && task.bundle.contentArguments && task.bundle.contentArguments.formid < 0;
  if (name === 'saveAsSystem') {
    if (isSystemForm) res.disabled = true;
  }
  return res;
};
CircuitDiagramEditor.prototype.getCmdGroupTree = function () {
  var tree = _CircuitDiagramEditorCmd.CircuitDiagramEditorCmdTree;
  return tree;
};
CircuitDiagramEditor.prototype.viewTo = function (classType, id) {
  if (classType === 'BLOCK') {
    this.viewToBlock(id);
  } else if (classType === 'COMPONENT') {
    this.viewToComponent(id);
  }
};
CircuitDiagramEditor.prototype.viewToBlock = function (id) {
  var blockEd = this.blockEditor.findBlockById(id);
  this.flexFormEditor.activeEditorTab(1);
  (0, _utils.vScrollIntoView)(blockEd.$view);
  this.blockEditor.activateBlock(blockEd);
};
CircuitDiagramEditor.prototype.viewToComponent = function (id) {
  // console.log(id)
};
var _default = CircuitDiagramEditor;
/**
 * @extends
 * @param {CircuitDiagramEditor} editor
 * @param {[]} lines
 * @constructor
 */
exports["default"] = _default;
function LinePropertyDelegate(editor, lines) {
  _MultiObjectPropertyEditor.MultiObjectPropertyDelegate.call(this);
  this.editor = editor;
  this.lines = lines;
}
LinePropertyDelegate.prototype.getPropertyNames = function () {};

/**
 * @extends OutlineDelegate
 * @param {CircuitDiagramEditor}  editor
 * @constructor
 */
function CircuitDiagramEditorOutlineDelegate(editor) {
  _FOutline.OutlineDelegate.call(this);
  this.editor = editor;
}
(0, _OOP.mixClass)(CircuitDiagramEditorOutlineDelegate, _FOutline.OutlineDelegate);
CircuitDiagramEditorOutlineDelegate.prototype.getTreeData = function () {
  var _this3 = this;
  return Object.keys(this.editor.$nodes).map(function (key) {
    var ndElt = _this3.editor.$nodes[key];
    return {
      name: ndElt.name,
      icon: ndElt.typeIcon,
      id: key
    };
  });
};
CircuitDiagramEditorOutlineDelegate.prototype.onClickNode = function (expElt, event) {
  var data = expElt.data;
  var id = data.id;
  var nodeElt = this.editor.$nodes[id];
  if (!nodeElt) return;
  this.editor.nodeSelectController.select(nodeElt, event.shiftKey || event.ctrlKey);
  this.editor.viewBoxCtroller.scrollIntoNode(nodeElt);
};
CircuitDiagramEditorOutlineDelegate.prototype.getSelectedIdList = function () {
  return this.editor.nodeSelectController.getSelectedIdList();
};

/***/ }),

/***/ 45553:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.CircuitDiagramEditorCmdTree = exports.CircuitDiagramEditorCmdDescriptors = void 0;
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var CircuitDiagramEditorCmd = {};

/***
 * @this CircuitDiagramEditor
 */
CircuitDiagramEditorCmd.preview = function () {
  this.layoutEditor.execCmd('preview');
};

/***
 * @this CircuitDiagramEditor
 */
CircuitDiagramEditorCmd.runTest = function () {
  this.layoutEditor.execCmd('runTest');
};
CircuitDiagramEditorCmd.importFromJson = function () {
  this.flexFormEditor.execCmd('importFromJson');
};
CircuitDiagramEditorCmd.export2sharpEncode = function () {
  this.flexFormEditor.execCmd('export2sharpEncode');
};
CircuitDiagramEditorCmd.export2clipboard = function () {
  this.flexFormEditor.execCmd('export2clipboard');
};
CircuitDiagramEditorCmd.export2Json = function () {
  this.flexFormEditor.execCmd('export2Json');
};
/***
 * @this CircuitDiagramEditor
 */
CircuitDiagramEditorCmd.autoAlignPosition = function () {
  this.autoAlignPosition();
};

/***
 * @this CircuitDiagramEditor
 */
CircuitDiagramEditorCmd["delete"] = function () {
  var selectedIdList = this.lineSelectController.getSelectedIdList();
  for (var i = 0; i < selectedIdList.length; ++i) {
    this.deleteLine(selectedIdList[i]);
  }
  this.notifyCmdDescriptorsChange();
};

/***
 * @this CircuitDiagramEditor
 */
CircuitDiagramEditorCmd.system_owner_unlock = function () {
  var selectedIdList = this.lineSelectController.getSelectedIdList();
  for (var i = 0; i < selectedIdList.length; ++i) {
    this.setLinePermissionOwner(selectedIdList[i], null);
  }
  this.notifyCmdDescriptorsChange();
};
/***
 * @this CircuitDiagramEditor
 */
CircuitDiagramEditorCmd.system_owner_lock = function () {
  var selectedIdList = this.lineSelectController.getSelectedIdList();
  for (var i = 0; i < selectedIdList.length; ++i) {
    this.setLinePermissionOwner(selectedIdList[i], 'system');
  }
  this.notifyCmdDescriptorsChange();
};

/***
 * @this CircuitDiagramEditor
 */
CircuitDiagramEditorCmd.save = function () {
  this.flexFormEditor.execCmd('save');
};
/***
 * @this CircuitDiagramEditor
 */
CircuitDiagramEditorCmd.saveAs = function () {
  this.flexFormEditor.execCmd('saveAs');
};

/***
 * @this CircuitDiagramEditor
 */
CircuitDiagramEditorCmd.saveAsSystem = function () {
  this.flexFormEditor.execCmd('saveAsSystem');
};

/***
 * @this CircuitDiagramEditor
 */
CircuitDiagramEditorCmd.scrollIntoNodes = function () {
  this.viewBoxCtroller.scrollIntoNodes();
};

/***
 * @this CircuitDiagramEditor
 */
CircuitDiagramEditorCmd.openIncludedBlockManager = function () {
  this.includedBlockManager.start();
};
var _default = CircuitDiagramEditorCmd;
exports["default"] = _default;
var CircuitDiagramEditorCmdDescriptors = Object.assign({}, _CmdDescriptors["default"]);
exports.CircuitDiagramEditorCmdDescriptors = CircuitDiagramEditorCmdDescriptors;
var CircuitDiagramEditorCmdTree = {
  type: 'tab_list',
  children: [{
    type: 'tab',
    name: 'Home',
    children: [{
      type: 'group_x2',
      children: ['preview', 'save', 'saveAs', 'saveAsSystem']
    }, {
      type: 'group_x2',
      children: ['openIncludedBlockManager', 'delete', 'autoAlignPosition', 'scrollIntoNodes']
    }]
  }, {
    type: 'tab',
    name: 'Data',
    children: [{
      type: 'group_x2',
      children: ['importFromJson', 'export2Json', 'export2sharpEncode', 'export2clipboard']
    }]
  }]
};
exports.CircuitDiagramEditorCmdTree = CircuitDiagramEditorCmdTree;
if (window['FORM_DEV_MODE']) {
  CircuitDiagramEditorCmdTree.children[0].children.push({
    type: 'group_x2',
    children: ['system_owner_lock', 'system_owner_unlock']
  });
}

/***/ }),

/***/ 1748:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = GraphOptimizerFactor;
function GraphOptimizerFactor(global) {
  function Vec2(t, e) {
    this.x = t, this.y = e;
  }
  Vec2.prototype.copy = function () {
    return new Vec2(this.x, this.y);
  }, Vec2.prototype.toString = function () {
    return "(" + this.x + ", " + this.y + ")";
  }, Vec2.prototype.abs = function () {
    return Math.sqrt(this.x * this.x + this.y * this.y);
  }, Vec2.prototype.normalized = function () {
    var t = this.abs();
    return 0 == t && (t = 1), this.div(t);
  }, Vec2.prototype.mult = function (t) {
    return new Vec2(this.x * t, this.y * t);
  }, Vec2.prototype.div = function (t) {
    return new Vec2(this.x / t, this.y / t);
  }, Vec2.prototype.dist = function (t) {
    var e = t.x - this.x,
      n = t.y - this.y;
    return Math.sqrt(e * e + n * n);
  }, Vec2.prototype.sub = function (t) {
    return new Vec2(this.x - t.x, this.y - t.y);
  }, Vec2.prototype.add = function (t) {
    return new Vec2(this.x + t.x, this.y + t.y);
  }, Vec2.prototype.inv = function () {
    return new Vec2(-this.x, -this.y);
  }, Vec2.prototype.linear = function (t, e) {
    return new Vec2(this.x * (1 - e) + t.x * e, this.y * (1 - e) + t.y * e);
  }, Vec2.prototype.dot = function (t) {
    return this.x * t.x + this.y * t.y;
  }, Vec2.prototype.direction = function () {
    return Math.atan2(this.y, this.x);
  }, Vec2.prototype.translate = function (t, e) {
    return this.add(new Vec2(t, e));
  }, Vec2.prototype.rotate = function (t) {
    var e = Math.sin(t),
      n = Math.cos(t);
    return new Vec2(this.x * n - this.y * e, this.x * e + this.y * n);
  }, Vec2.prototype.rotate90 = function () {
    return new Vec2(-this.y, this.x);
  }, Vec2.fromDirection = function (t) {
    return new Vec2(Math.cos(t), Math.sin(t));
  }, Vec2.make = function (t, e) {
    return t instanceof Array ? new Vec2(t[0], t[1]) : t instanceof Vec2 ? t.copy() : new Vec2(t, e);
  };
  Vec2.prototype.cross = function (t) {
    return this.x * t.y - this.y * t.x;
  };
  function randomPosition(nodeIdArr, nodes) {
    var n = Math.sqrt(nodeIdArr.length);
    var minX = Infinity;
    var minY = Infinity;
    var d = {};
    return nodeIdArr.map(function (id) {
      var x, y;
      var found = false;
      var node = nodes[id];
      var width = node.width;
      var height = node.height;
      while (!found) {
        x = Math.floor(Math.random() * n * 5) * 4;
        y = Math.floor(Math.random() * n * 4) * 4;
        found = true;
        for (var dx = 0; dx < width && found; ++dx) {
          for (var dy = 0; dy < height && found; ++dy) {
            if (d[x + dx + '_' + (y + dy)]) found = false;
          }
        }
      }
      for (var dx = 0; dx < node.width; ++dx) {
        for (var dy = 0; dy < node.height; ++dy) {
          d[x + dx + '_' + (y + dy)] = true;
        }
      }
      minX = Math.min(minX, x);
      minY = Math.min(minY, y);
      return new Vec2(x, y);
    }).reduce(function (ac, cr, idx) {
      cr.x -= minX;
      cr.y -= minY;
      ac[nodeIdArr[idx]] = cr;
      return ac;
    }, {});
  }
  function hybrid(a, b) {
    var res = {};
    var prev, temp;
    for (var i in res) {
      if (Math.random() < 0.5 / i) res = a[i];else res = b[i];
      if (Math.random() < 0.2) {
        if (!prev) prev = i;else {
          temp = res[prev];
          res[prev] = res[i];
          res[i] = temp;
        }
      }
      if (Math.random() < 0.2 && res[i].x > 0) res[i].x -= Math.floor(Math.random() * 5) * (Math.random() > 0.5 ? 1 : -1);
      if (Math.random() < 0.2 && res[i].y > 0) res[i].y -= Math.floor(Math.random() * 5) * (Math.random() > 0.5 ? 1 : -1);
    }
    return res;
  }
  function isCross(A, B, C, D) {
    var t1 = C.sub(D).cross(D.sub(A));
    var t2 = C.sub(D).cross(D.sub(B));
    if (t1 * t2 >= 0) return false;
    var t3 = A.sub(B).cross(B.sub(C));
    var t4 = A.sub(B).cross(B.sub(D));
    if (t3 * t4 >= 0) return false;
    return true;
  }
  function calcBadScore(nodes, lines, positions) {
    var node1, node2;
    var pos1, pos2;
    var line1, line2;
    var res = 0;
    var i, j;
    var maxX = -Infinity,
      maxY = -Infinity,
      minX = Infinity,
      minY = Infinity;
    for (i in nodes) {
      node1 = nodes[i];
      pos1 = positions[i];
      maxX = Math.max(maxX, pos1.x + node1.width);
      maxY = Math.max(maxY, pos1.y + node1.height);
      minX = Math.min(minX, pos1.x);
      minY = Math.min(minY, pos1.y);
      res += pos1.x * 30 + pos1.y * 30;
      for (j in nodes) {
        if (i === j) continue;
        node2 = nodes[j];
        pos2 = positions[j];
        if (!(pos1.x > pos2.x + node2.width || pos1.y > pos2.y + node2.height || pos2.x > pos1.x + node1.width || pos2.y > pos1.y + node1.height)) {
          res += 1e7;
        }
      }
    }
    res += (maxX - minX) * (maxY - minY) * 1e2;
    var uNode, vNode;
    var posU, posV;
    var v1;
    var A, B, C, D;
    for (i in lines) {
      line1 = lines[i];
      uNode = nodes[line1.uId];
      vNode = nodes[line1.vId];
      posU = positions[line1.uId];
      posV = positions[line1.vId];
      A = new Vec2(posU.x + uNode.outputPos[line1.uPin].x, posU.y + +uNode.outputPos[line1.uPin].y);
      B = new Vec2(posV.x + vNode.inputPos[line1.vPin].x, posV.y + vNode.inputPos[line1.vPin].y);
      v1 = A.sub(B);
      res += v1.abs() * v1.abs() * 1e3;
      if (v1.x > 0) res += v1.x * v1.x * 1e4;
      res += Math.abs(v1.y) * 1e3;
      for (j in lines) {
        if (i === j) continue;
        line2 = lines[j];
        uNode = nodes[line2.uId];
        vNode = nodes[line2.vId];
        posU = positions[line2.uId];
        posV = positions[line2.vId];
        C = new Vec2(posU.x + uNode.outputPos[line2.uPin].x, posU.y + +uNode.outputPos[line2.uPin].y);
        D = new Vec2(posV.x + vNode.inputPos[line2.vPin].x, posV.y + vNode.inputPos[line2.vPin].y);
        if (isCross(A, B, C, D)) {
          res += 1e4;
        }
      }
    }
    return res;
  }
  function normalize(pos) {
    var minX = Infinity;
    var minY = Infinity;
    for (var i in pos) {
      minX = Math.min(minX, pos[i].x);
      minY = Math.min(minX, pos[i].y);
    }
    for (var i in pos) {
      pos[i].x -= minX;
      pos[i].y -= minY;
    }
  }
  global.findBeautyGrid1 = function (gridData, timeOut) {
    var now = new Date().getTime();
    var nodeIdArr = Object.keys(gridData.nodes);
    var nodes = gridData.nodes;
    var lines = gridData.lines;
    var current = nodeIdArr.reduce(function (ac, id) {
      ac[id] = {
        x: nodes[id].x,
        y: nodes[id].y
      };
      return ac;
    }, {});
    var gen = Array(6000).fill(0).map(function () {
      var positions = randomPosition(nodeIdArr, nodes);
      var badScore = calcBadScore(nodes, lines, positions);
      return {
        positions: positions,
        badScore: badScore
      };
    });
    gen.push({
      positions: current,
      badScore: calcBadScore(nodes, lines, current)
    });
    gen.sort(function (a, b) {
      return a.badScore - b.badScore;
    });
    var best = gen[0];
    var now1 = new Date().getTime();
    var gen1;
    var i, j;
    var counter = 0;
    while (now1 - now < timeOut && counter < 40) {
      gen1 = [best];
      for (i = 0; i < 33; ++i) {
        gen1.push(randomPosition(nodeIdArr, nodes));
        for (j = 0; j < 33; ++j) {
          if (i !== j) {
            gen1.push(hybrid(gen[i], gen[j]));
          }
        }
      }
      gen1.sort(function (a, b) {
        return a.badScore - b.badScore;
      });
      counter++;
      if (gen1[0].badScore < best.badScore) {
        best = gen1[0];
        counter = 0;
      }
      gen = gen1;
      now1 = new Date().getTime();
    }
    if (best === current) return null;
    normalize(best.positions);
    return best;
  };
  global.findBeautyGrid = function (gridData, timeout) {
    timeout = timeout || 2000;
    var now = new Date().getTime();
    var nodeIdArr = Object.keys(gridData.nodes);
    var nodes = gridData.nodes;
    var lines = gridData.lines;
    Object.keys(lines).forEach(function (lineId) {
      line = lines[lineId];
      if (!nodes[line.uId] || !nodes[line.vId]) {
        delete lines[lineId];
      }
    });
    var current = nodeIdArr.reduce(function (ac, id) {
      ac[id] = {
        x: nodes[id].x,
        y: nodes[id].y
      };
      return ac;
    }, {});
    var best = {
      positions: current,
      badScore: calcBadScore(nodes, lines, current),
      noChange: true
    };
    var inCount = Object.keys(nodes).reduce(function (ac, cr) {
      ac[cr] = 0;
      return ac;
    }, {});
    var lineByU = {};
    var lineByV = {};
    var line;
    for (var lineId in lines) {
      line = lines[lineId];
      inCount[line.vId]++;
      lineByU[line.uId] = lineByU[line.uId] || [];
      lineByU[line.uId].push(line);
      lineByV[line.vId] = lineByV[line.vId] || [];
      lineByV[line.vId].push(line);
    }
    var cols = [];
    var colWidths = [];
    var col;
    var colWidth;
    var node;
    var count = 0;
    var nodeId;
    var nodes1 = Object.assign({}, nodes);
    var minCount;
    while (count++ < 1000) {
      col = [];
      colWidth = 0;
      minCount = Infinity;
      for (nodeId in nodes1) {
        if (inCount[nodeId] === minCount) {
          col.push(nodeId);
        } else if (inCount[nodeId] < minCount) {
          minCount = inCount[nodeId];
          col = [nodeId];
        }
      }
      if (col.length > 0) {
        cols.push(col);
        col.forEach(function (nodeId) {
          colWidth = Math.max(colWidth, nodes[nodeId].width);
          delete nodes1[nodeId];
          if (lineByU[nodeId]) lineByU[nodeId].forEach(function (line) {
            var vId = line.vId;
            inCount[vId]--;
          });
        });
        colWidths.push(colWidth);
      } else break;
    }
    var maxGenLength = 2000000 / nodeIdArr.length >> 0;
    var gen = [best];
    var positions = {};
    var stop = false;
    function tryAlign(i, x) {
      if (i >= cols.length) {
        gen.push({
          positions: Object.assign({}, positions),
          badScore: calcBadScore(nodes, lines, positions)
        });
        if (gen.length % 1000 === 0) {
          if (new Date().getTime() - now > timeout) stop = true;
        }
        return;
      }
      var y;
      col = cols[i];
      var j1, j2, t;
      for (var k = col.length * col.length; !stop && k >= 0; --k) {
        y = 0;
        for (var j = 0; j < col.length; ++j) {
          nodeId = col[j];
          node = nodes[nodeId];
          positions[nodeId] = new Vec2(x, y);
          y += node.height + 2;
        }
        tryAlign(i + 1, x + colWidths[i] + 4);
        if (gen.length < maxGenLength) {
          j1 = Math.random() * col.length >> 0;
          j2 = Math.random() * col.length >> 0;
          if (j1 !== j2) {
            t = col[j1];
            col[j1] = col[j2];
            col[j2] = t;
          }
        }
      }
    }
    tryAlign(0, 0);
    gen.sort(function (a, b) {
      return a.badScore - b.badScore;
    });
    best = gen[0];
    //recover cols
    cols.forEach(function (col) {
      col.sort(function (a, b) {
        return best.positions[a].y - best.positions[b].y;
      });
    });
    makeLineStraight(nodes, lines, lineByU, lineByV, cols, best.positions);
    normalize(best.positions);
    return best;
  };
  function makeLineStraight(nodes, lines, lineByU, lineByV, cols, positions) {
    var count = 10000;
    var cont = true;
    var i, j, col;
    var top, bot;
    var fLeft, fRight, f;
    var cId, cNode;
    while (count-- > 0 && cont) {
      cont = false;
      for (i = 0; i < cols.length; ++i) {
        col = cols[i];
        for (j = 0; j < col.length; ++j) {
          top = -Infinity;
          bot = Infinity;
          cId = col[j];
          cNode = nodes[cId];
          if (j > 0) {
            top = positions[col[j - 1]].y + nodes[col[j - 1]].height + 2;
          }
          if (j + 1 < col.length) {
            bot = positions[col[j + 1]].y - nodes[cId].height - 2;
          }
          fLeft = lineByV[cId] && lineByV[cId].reduce(function (ac, cr) {
            var node = nodes[cr.uId];
            var y0 = node.outputPos[cr.uPin].y + positions[cr.uId].y;
            var y1 = cNode.inputPos[cr.vPin].y + positions[cr.vId].y;
            var dy = y0 - y1;
            ac.min = Math.min(ac.min, dy);
            ac.max = Math.max(ac.max, dy);
            return ac;
          }, {
            min: Infinity,
            max: -Infinity
          });
          fLeft = fLeft || {
            min: 0,
            max: 0
          };
          fRight = lineByU[cId] && lineByU[cId].reduce(function (ac, cr) {
            var node = nodes[cr.vId];
            var y0 = node.inputPos[cr.vPin].y + positions[cr.vId].y;
            var y1 = cNode.outputPos[cr.uPin].y + positions[cr.uId].y;
            var dy = y0 - y1;
            ac.min = Math.min(ac.min, dy);
            ac.max = Math.max(ac.max, dy);
            return ac;
          }, {
            min: Infinity,
            max: -Infinity
          });
          fRight = fRight || {
            min: 0,
            max: 0
          };
          f = Math.round((fLeft.min + fLeft.max + fRight.min + fRight.max) / 4);
          if (f < 0 && positions[cId].y > top) {
            positions[cId].y--;
            cont = true;
          } else if (f > 0 && positions[cId].y < bot) {
            cont = true;
            positions[cId].y++;
          }
        }
      }
    }
  }
}
;

/***/ }),

/***/ 92040:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
__webpack_require__(39814);
__webpack_require__(40210);
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _search = _interopRequireWildcard(__webpack_require__(67858));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/****
 * @extends Fragment
 * @constructor
 * @param {CircuitDiagramEditor} editor
 */
function IncludedBlockManager(editor) {
  _Fragment["default"].call(this);
  this.editor = editor;
  this.changed = {};
}
_OOP["default"].mixClass(IncludedBlockManager, _Fragment["default"]);
IncludedBlockManager.prototype.createView = function () {
  this.$view = (0, _FCore._)({
    "class": ['as-included-block-manager', 'as-message-dialog'],
    child: [{
      "class": 'as-message-dialog-header',
      child: {
        tag: 'span',
        "class": 'as-message-dialog-title',
        child: {
          text: 'Included Block Manager'
        }
      }
    }, {
      "class": ['as-message-dialog-body'],
      child: [{
        "class": 'as-included-block-manager-search-ctn',
        child: [{
          tag: _Searcher["default"].tag
        }]
      }, {
        "class": ['as-included-block-manager-table-wrapper'],
        child: [{
          "class": ['as-included-block-manager-table-scroller', 'as-bscroller'],
          child: {
            tag: 'table',
            "class": 'as-included-block-manager-table',
            child: [{
              tag: 'thead',
              child: [{
                tag: 'tr',
                child: [{
                  tag: 'th',
                  child: {
                    text: 'Include'
                  }
                }, {
                  tag: 'th',
                  child: {
                    text: 'ID'
                  }
                }, {
                  tag: 'th',
                  child: {
                    text: 'Name'
                  }
                }, {
                  tag: 'th',
                  child: {
                    text: 'Type'
                  }
                }, {
                  tag: 'th',
                  child: {
                    text: 'Lines'
                  }
                }]
              }]
            }, {
              tag: 'tbody',
              child: []
            }]
          }
        }, {
          "class": 'as-included-block-manager-table-header-ctn',
          child: [{
            "class": 'as-included-block-manager-table-header-cell',
            child: {
              text: 'Include'
            }
          }, {
            "class": 'as-included-block-manager-table-header-cell',
            child: {
              text: 'ID'
            }
          }, {
            "class": 'as-included-block-manager-table-header-cell',
            child: {
              text: 'Type'
            }
          }, {
            "class": 'as-included-block-manager-table-header-cell',
            child: {
              text: 'Name'
            }
          }, {
            "class": 'as-included-block-manager-table-header-cell',
            child: {
              text: 'Lines'
            }
          }]
        }]
      }]
    }, {
      "class": 'as-message-dialog-footer',
      child: [{
        tag: _FlexiconButton["default"].tag,
        "class": ['as-included-block-manager-ok-btn', 'primary'],
        props: {
          text: 'OK'
        }
      }, {
        tag: _FlexiconButton["default"].tag,
        "class": ['as-included-block-manager-cancel-btn', 'secondary'],
        props: {
          text: 'Cancel'
        }
      }]
    }]
  });
  this.$modal = (0, _FCore._)('modal');
  this.$modal.addChild(this.$view);
  this.$table = (0, _FCore.$)('.as-included-block-manager-table', this.$view);
  this.$tbody = (0, _FCore.$)('tbody', this.$table);
  this.$ths = (0, _FCore.$$)('thead th', this.$table);
  this.$fixedCells = (0, _FCore.$$)('.as-included-block-manager-table-header-cell', this.$view);
  this.$okBtn = (0, _FCore.$)('.as-included-block-manager-ok-btn', this.$view).on('click', this.ok.bind(this));
  this.$cancelBtn = (0, _FCore.$)('.as-included-block-manager-cancel-btn', this.$view).on('click', this.cancel.bind(this));
  this.$search = (0, _FCore.$)(_Searcher["default"].tag, this.$view).on('stoptyping', this.ev_search.bind(this));
};
IncludedBlockManager.prototype.onResume = function () {
  this.getView();
  document.body.appendChild(this.$modal);
  this.$search.value = '';
  this.loadTable();
};
IncludedBlockManager.prototype.onPause = function () {
  this.$modal.remove();
};
IncludedBlockManager.prototype.ok = function () {
  var _this = this;
  this.pause();
  var nodeSheet = this.editor.getNodeSheet();
  var changed = this.changed;
  var editor = this.editor;
  var nodeElt;
  var nodeInf;
  var count = 0;
  var posChange = false;
  var nodesBound = editor.viewBoxCtroller.getNodesBound();
  var y = nodesBound.y + nodesBound.height + 10;
  var x = 0;
  var i;
  var newNodes = [];
  for (var nodeId in changed) {
    posChange = true;
    if (changed[nodeId]) {
      nodeInf = nodeSheet.byId[nodeId];
      nodeElt = editor._makeNodeElt({
        typeIcon: nodeInf.clazz.prototype.menuIcon,
        name: nodeInf.displayName || nodeInf.name || nodeInf.id,
        inputPins: nodeInf.inputPins,
        outputPins: nodeInf.outputPins,
        inputLines: {},
        outputLines: {},
        title: nodeId,
        nodeId: nodeId,
        x: x,
        y: y
      });
      editor.$nodes[nodeId] = nodeElt;
      editor.$nodeLayer.addChild(nodeElt);
      nodeElt.reloadPinPosition();
      if (this.editor.diagram.includedBlocks.indexOf(nodeId) < 0) this.editor.diagram.includedBlocks.push(nodeId);
      this.editor.diagram.positions[nodeId] = {
        x: x,
        y: y
      };
      x += 10 + nodeElt.rect.width;
      newNodes.push(nodeElt);
    } else {
      nodeElt = editor.$nodes[nodeId];
      nodeElt.remove();
      i = this.editor.diagram.includedBlocks.indexOf(nodeId);
      if (i >= 0) this.editor.diagram.includedBlocks.splice(i, 1);
      delete this.editor.diagram.positions[nodeId];
    }
  }
  if (newNodes.length > 0) {
    this.editor.nodeSelectController.unSelectAll();
    newNodes.forEach(function (node) {
      _this.editor.nodeSelectController.select(node, true);
    });
    this.editor.viewBoxCtroller.scrollIntoSelectedNodes();
  }
  this.editor.nodeOutlineDelegate.notifyTreeChange();
};
IncludedBlockManager.prototype.cancel = function () {
  this.pause();
};
IncludedBlockManager.prototype.query = function (text) {
  text = text.trim();
  if (text.length === 0) {
    this.$tbody.clearChild().addChild(this.$rows);
    this.requestUpdateSize();
    return;
  }
  var items = this.$rows.map(function (elt) {
    return elt.searchItem;
  });
  var sItems = (0, _search.searchListByText)(text, items);
  var rows = sItems.map(function (item) {
    return this.$rows[item.value];
  }.bind(this));
  this.$tbody.clearChild();
  this.$tbody.addChild(rows);
  this.requestUpdateSize();
};
IncludedBlockManager.prototype.requestUpdateSize = function () {
  this.$fixedCells.forEach(function (cell, i, arr) {
    var oCell = this.$ths[i];
    var oBound = oCell.getBoundingClientRect();
    cell.addStyle('width', (arr.length - 1 === i ? 1 : 0) + oBound.width + 'px');
  }.bind(this));
};
IncludedBlockManager.prototype.loadTable = function () {
  var _this2 = this;
  var changed = {};
  this.changed = changed;
  this.$tbody.clearChild();
  var nodeSheet = this.editor.getNodeSheet();
  var lineByU = this.editor.lines.reduce(function (ac, line) {
    ac[line.u] = ac[line.u] || {};
    ac[line.u][line.id] = line;
    return ac;
  }, {});
  var lineByV = this.editor.lines.reduce(function (ac, line) {
    ac[line.v] = ac[line.v] || {};
    ac[line.v][line.id] = line;
    return ac;
  }, {});
  this.$rows = nodeSheet.list.map(function (it, idx) {
    var id = it.id;
    var name = it.name;
    var lines = Object.assign({}, lineByU[id], lineByU[name], lineByV[id], lineByV[name]);
    var lineCount = Object.keys(lines).length;
    var checked = !!_this2.editor.$nodes[id];
    var rowElt = (0, _FCore._)({
      tag: 'tr',
      props: {
        idx: idx,
        searchItem: (0, _search["default"])({
          text: [checked ? 'checked' : '', it.bTag, id || '', name || '', it.displayName || ''].join(' '),
          value: idx
        }),
        blockId: id
      },
      child: [{
        tag: 'td',
        child: {
          tag: 'checkboxbutton',
          props: {
            checked: checked,
            disabled: checked && lineCount > 0
          },
          on: {
            change: function change() {
              if (this.checked !== checked) {
                rowElt.addClass(checked ? 'as-will-removed' : 'as-will-added');
                changed[id] = this.checked;
              } else {
                delete changed[id];
                rowElt.removeClass(checked ? 'as-will-removed' : 'as-will-added');
              }
            }
          }
        }
      }, {
        tag: 'td',
        child: {
          tag: 'span',
          child: {
            text: it.name
          }
        }
      }, {
        tag: 'td',
        child: [it.clazz.prototype.menuIcon, {
          tag: 'span',
          child: {
            text: it.bTag
          }
        }]
      }, {
        tag: 'td',
        child: {
          tag: 'span',
          child: {
            text: it.displayName || ''
          }
        }
      }, {
        tag: 'td',
        child: {
          tag: 'span',
          child: {
            text: lineCount + ''
          }
        }
      }]
    });
    return rowElt;
  });
  this.$tbody.addChild(this.$rows);
  this.requestUpdateSize();
};
IncludedBlockManager.prototype.ev_search = function (event) {
  this.query(this.$search.value);
};
var _default = IncludedBlockManager;
exports["default"] = _default;

/***/ }),

/***/ 64927:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 *
 * @param {CircuitDiagramEditor}  editor
 * @constructor
 */
function LineSelectController(editor) {
  this.editor = editor;
  for (var i in this) {
    if (i.startsWith('ev_')) {
      this[i] = this[i].bind(this);
    }
  }
  this.$selectedLines = [];
}
LineSelectController.prototype.select = function (nodeElt, append) {
  var idx;
  if (nodeElt) {
    idx = this.$selectedLines.indexOf(nodeElt);
    if (append) {
      if (idx < 0) {
        this.blur();
        nodeElt.addClass('as-focus').addClass('as-selected');
        this.$selectedLines.push(nodeElt);
      } else {
        if (idx + 1 < this.$selectedLines.length) {
          this.blur();
          this.$selectedLines.splice(idx, 1);
          this.$selectedLines.push(nodeElt);
          nodeElt.addClass('as-focus');
        }
      }
    } else {
      if (idx >= 0) {
        if (idx + 1 < this.$selectedLines.length) {
          this.blur();
          this.$selectedLines.splice(idx, 1);
          this.unSelectAll();
          this.$selectedLines.push(nodeElt);
          nodeElt.addClass('as-focus');
        } else {
          this.$selectedLines.pop();
          this.unSelectAll();
          this.$selectedLines.push(nodeElt);
        }
      } else {
        this.unSelectAll();
        this.$selectedLines.push(nodeElt);
        nodeElt.addClass('as-focus').addClass('as-selected');
      }
    }
  } else {
    this.blur();
    this.unSelectAll();
  }
  this.editor.notifyCmdDescriptorsChange();
};
LineSelectController.prototype.unSelect = function (node) {
  if (!node) return;
  var idx = this.$selectedLines.indexOf(node);
  if (idx < 0) return;
  var refocus = node.containsClass('as-focus');
  node.removeClass('as-selected');
  if (refocus) {
    this.blur();
  }
  this.$selectedLines.splice(idx, 1);
  if (refocus) {
    if (this.$selectedLines.length > 0) {
      this.$selectedLines[this.$selectedLines.length - 1].addClass('as-focus');
    }
  }
};
LineSelectController.prototype.toggleSelect = function (node, append) {
  if (node.hasClass('as-selected')) {
    if (append) this.unSelect(node);else {
      this.select(node, false);
    }
  } else {
    this.select(node, append);
  }
};
LineSelectController.prototype.blur = function () {
  if (this.$selectedLines.length > 0) {
    if (this.$selectedLines[this.$selectedLines.length - 1].hasClass('as-focus')) {
      this.$selectedLines[this.$selectedLines.length - 1].removeClass('as-focus');
    }
  }
};
LineSelectController.prototype.getSelectedIdList = function () {
  return this.$selectedLines.map(function (elt) {
    return elt.lineId;
  });
};
LineSelectController.prototype.unSelectAll = function () {
  this.blur();
  this.$selectedLines.splice(0, this.$selectedLines.length).forEach(function (elt) {
    elt.removeClass('as-selected');
  });
  this.editor.notifyCmdDescriptorsChange();
};
LineSelectController.prototype.addLineControlEvent = function (lineElt) {
  lineElt.on('click', this.ev_lineClick.bind(this, lineElt));
};
LineSelectController.prototype.ev_lineClick = function (lineElt, event) {
  this.editor.nodeSelectController.unSelectAll();
  this.toggleSelect(lineElt, event.shiftKey);
};
var _default = LineSelectController;
exports["default"] = _default;

/***/ }),

/***/ 82489:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _GCore = _interopRequireDefault(__webpack_require__(66723));
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _utils = __webpack_require__(16907);
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function NewLineController(editor) {
  this.editor = editor;
  for (var i in this) {
    if (i.startsWith('ev_')) {
      this[i] = this[i].bind(this);
    }
  }
  this.isMouseListenning = false;
  this.u = null;
  this.v = null;
  this.lineElt = null;
  this.mousePos = null;
  this._prevClick = null;
}
NewLineController.prototype.addNodeEventControl = function (nodeElt) {
  nodeElt.on('presspin', this.ev_pressPin.bind(this, nodeElt));
};
NewLineController.prototype.ev_pressPin = function (nodeElt, event) {
  this.mousePos = new _Vec["default"](event.clientX, event.clientY);
  var cClick = nodeElt.nodeId + '.' + event.mode + '.' + event.pinName;
  if (this._prevClick === cClick) {
    this.cancel();
    return;
  }
  this._prevClick = cClick;
  if (event.mode === 'out') {
    this.u = {
      nodeElt: nodeElt,
      pinName: event.pinName
    };
  } else {
    this.v = {
      nodeElt: nodeElt,
      pinName: event.pinName
    };
  }
  var id;
  if (!this.lineElt) {
    id = (0, _utils.randomUniqueIdent)();
    this.lineElt = _GCore["default"]._({
      tag: 'g',
      "class": ['as-cde-line-group', 'as-new'],
      attr: {
        'data-line-id': id
      },
      style: {
        '--line-color': new _Color["default"]([Math.random(), Math.random(), Math.random(), 1]).toString()
      },
      child: [{
        tag: 'path',
        "class": 'as-cde-hit-line'
      }, {
        tag: 'path',
        "class": 'as-cde-line'
      }, {
        tag: 'path',
        "class": 'as-cde-line-lock'
      }],
      props: {
        lineId: id
      }
    });
    this.editor.$lineLayer.addChild(this.lineElt);
  }
  if (!!this.u !== !!this.v && !this.isMouseListenning) {
    document.body.addEventListener('mousemove', this.ev_mouseMove);
    document.body.addEventListener('wheel', this.ev_mouseMove);
    this.isMouseListenning = true;
  }
  this._updateLinePath();
  if (this.u && this.v) {
    this.flushToEditor();
  }
};
NewLineController.prototype.ev_mouseMove = function (event) {
  this.mousePos = new _Vec["default"](event.clientX, event.clientY);
  this._updateLinePath();
};
NewLineController.prototype._updateLinePath = function () {
  var viewportBound = this.editor.$lineLayer.getBoundingClientRect();
  var pInViewport = this.mousePos.sub(new _Vec["default"](viewportBound.left, viewportBound.top));
  var p = pInViewport.sub(this.editor.$lineLayer.box.origin);
  var startPos;
  var endPos;
  if (this.u) {
    startPos = this.u.nodeElt.position.add(this.u.nodeElt.pinHolders.out[this.u.pinName].pos);
  }
  if (this.v) {
    endPos = this.v.nodeElt.position.add(this.v.nodeElt.pinHolders["in"][this.v.pinName].pos);
  }
  startPos = startPos || p;
  endPos = endPos || p;
  var dx = 50;
  if (startPos.x > endPos.x) dx += Math.min(200, startPos.x - endPos.x) / 2;
  var path = ['M', startPos.x, startPos.y, 'C', startPos.x + dx, startPos.y, ',', endPos.x - dx, endPos.y, ',', endPos.x, endPos.y].join(' ');
  this.lineElt.lastChild.attr('d', path);
  this.lineElt.childNodes[1].attr('d', path);
  this.lineElt.firstChild.attr('d', path);
};
NewLineController.prototype.flushToEditor = function () {
  var u = this.u.nodeElt.nodeId;
  var v = this.v.nodeElt.nodeId;
  var uPin = this.u.pinName;
  var vPin = this.v.pinName;
  var lineId = this.lineElt.lineId;
  var line = {
    u: u,
    v: v,
    uPin: uPin,
    vPin: vPin,
    id: lineId
  };
  if (!this.isDuplicatedLine(line)) {
    this.lineElt.uId = this.u.nodeElt.nodeId;
    this.lineElt.vId = this.v.nodeElt.nodeId;
    this.lineElt.uPin = uPin;
    this.lineElt.vPin = vPin;
    this.lineElt.removeClass('as-new');
    this.editor.lines.push(line);
    this.editor.$lines[lineId] = this.lineElt;
    this.u.nodeElt.lines[lineId] = line;
    this.v.nodeElt.lines[lineId] = line;
    this.editor.lineSelectController.addLineControlEvent(this.lineElt);
    this.editor.notifyUnsaved();
  } else {
    this.lineElt.remove();
  }
  if (this.isMouseListenning) {
    document.body.removeEventListener('mousemove', this.ev_mouseMove);
    document.body.removeEventListener('wheel', this.ev_mouseMove);
    this.isMouseListenning = false;
  }
  this.u = null;
  this.v = null;
  this.lineElt = null;
  this._prevClick = null;
  this.editor.notifyCmdChange();
};
NewLineController.prototype.isDuplicatedLine = function (line) {
  var nodes = this.editor.$nodes;
  return this.editor.lines.some(function (other) {
    var uId = other.u;
    if (nodes[uId]) {
      uId = nodes[uId].nodeId;
    }
    var vId = other.v;
    if (nodes[vId]) {
      vId = nodes[vId].nodeId;
    }
    return uId === line.u && vId === line.v && other.uPin === line.uPin && other.vPin === line.vPin;
  }.bind(this));
};
NewLineController.prototype.cancel = function () {
  if (this.isMouseListenning) {
    document.body.removeEventListener('mousemove', this.ev_mouseMove);
    document.body.removeEventListener('wheel', this.ev_mouseMove);
    this.isMouseListenning = false;
  }
  this.u = null;
  this.v = null;
  this._prevClick = null;
  if (this.lineElt) {
    this.lineElt.remove();
    this.lineElt = null;
  }
};
var _default = NewLineController;
exports["default"] = _default;

/***/ }),

/***/ 81786:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {CircuitDiagramEditor}  editor
 * @constructor
 */

function NodePositionController(editor) {
  this.editor = editor;
  for (var i in this) {
    if (i.startsWith('ev_')) {
      this[i] = this[i].bind(this);
    }
  }
}
NodePositionController.prototype.addEventControl = function (nodeElt) {
  nodeElt.$header.on('click', this.ev_clickNode.bind(this, nodeElt));
  nodeElt.$header.on('dragstart', this.ev_dragStart.bind(this, nodeElt));
  nodeElt.$header.on('dragend', this.ev_dragEnd.bind(this, nodeElt));
  nodeElt.$header.on('drag', this.ev_drag.bind(this, nodeElt));
};
NodePositionController.prototype.ev_clickNode = function (node, event) {
  if (node.__draging) return;
  this.editor.lineSelectController.unSelectAll();
  this.editor.nodeSelectController.toggleSelect(node, event.shiftKey);
};
NodePositionController.prototype.ev_dragStart = function (node, event) {
  if (!node.containsClass('as-selected')) {
    this.editor.lineSelectController.unSelectAll();
    this.editor.nodeSelectController.select(node);
  }
  node.__draging = Math.random() + '';
  this.dragingNodeHolders = this.editor.nodeSelectController.$selectedNodes.reduce(function (ac, cr) {
    ac[cr.nodeId] = {
      elt: cr,
      pos: new _Vec["default"](cr.x, cr.y)
    };
    return ac;
  }, {});
};
NodePositionController.prototype.ev_dragEnd = function (node, event) {
  var currentDragSession = node.__draging;
  this.dragingNodeHolders = null;
  setTimeout(function () {
    if (node.__draging === currentDragSession) {
      node.__draging = null;
    }
  }, 100);
  this.editor.notifyUnsaved();
};
NodePositionController.prototype.ev_drag = function (node, event) {
  var d = event.currentPoint.sub(event.startingPoint);
  var lines = {};
  var holder;
  for (var nodeId in this.dragingNodeHolders) {
    holder = this.dragingNodeHolders[nodeId];
    holder.newPos = holder.pos.add(d);
    holder.elt.x = holder.newPos.x;
    holder.elt.y = holder.newPos.y;
    Object.assign(lines, holder.elt.lines);
  }
  for (var lineId in lines) {
    this.editor.updateLinePosition(lineId);
  }
};
var _default = NodePositionController;
exports["default"] = _default;

/***/ }),

/***/ 18127:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 *
 * @param {CircuitDiagramEditor}  editor
 * @constructor
 */
function NodeSelectController(editor) {
  this.editor = editor;
  for (var i in this) {
    if (i.startsWith('ev_')) {
      this[i] = this[i].bind(this);
    }
  }
  this.$selectedNodes = [];
}
NodeSelectController.prototype.select = function (nodeElt, append) {
  var idx;
  if (nodeElt) {
    idx = this.$selectedNodes.indexOf(nodeElt);
    if (append) {
      if (idx < 0) {
        this.blur();
        nodeElt.addClass('as-focus').addClass('as-selected');
        this.$selectedNodes.push(nodeElt);
      } else {
        if (idx + 1 < this.$selectedNodes.length) {
          this.blur();
          this.$selectedNodes.splice(idx, 1);
          this.$selectedNodes.push(nodeElt);
          nodeElt.addClass('as-focus');
        }
      }
    } else {
      if (idx >= 0) {
        if (idx + 1 < this.$selectedNodes.length) {
          this.blur();
          this.$selectedNodes.splice(idx, 1);
          this.unSelectAll();
          this.$selectedNodes.push(nodeElt);
          nodeElt.addClass('as-focus');
        } else {
          this.$selectedNodes.pop();
          this.unSelectAll();
          this.$selectedNodes.push(nodeElt);
        }
      } else {
        this.unSelectAll();
        this.$selectedNodes.push(nodeElt);
        nodeElt.addClass('as-focus').addClass('as-selected');
      }
    }
  } else {
    this.blur();
    this.unSelectAll();
  }
  this.editor.nodeOutlineDelegate.notifySelectedChange();
};
NodeSelectController.prototype.unSelectNode = function (node) {
  if (!node) return;
  var idx = this.$selectedNodes.indexOf(node);
  if (idx < 0) return;
  var refocus = node.containsClass('as-focus');
  node.removeClass('as-selected');
  if (refocus) {
    this.blur();
  }
  this.$selectedNodes.splice(idx, 1);
  if (refocus) {
    if (this.$selectedNodes.length > 0) {
      this.$selectedNodes[this.$selectedNodes.length - 1].addClass('as-focus');
    }
  }
  this.editor.nodeOutlineDelegate.notifySelectedChange();
};
NodeSelectController.prototype.toggleSelect = function (node, append) {
  if (node.containsClass('as-selected')) {
    if (append) this.unSelectNode(node);else {
      this.select(node, false);
    }
  } else {
    this.select(node, append);
  }
};
NodeSelectController.prototype.blur = function () {
  if (this.$selectedNodes.length > 0) {
    if (this.$selectedNodes[this.$selectedNodes.length - 1].containsClass('as-focus')) {
      this.$selectedNodes[this.$selectedNodes.length - 1].removeClass('as-focus');
    }
  }
};
NodeSelectController.prototype.unSelectAll = function () {
  this.blur();
  this.$selectedNodes.splice(0, this.$selectedNodes.length).forEach(function (elt) {
    elt.removeClass('as-selected');
  });
  this.editor.nodeOutlineDelegate.notifySelectedChange();
};
NodeSelectController.prototype.getSelectedIdList = function () {
  return this.$selectedNodes.map(function (elt) {
    return elt.nodeId;
  });
};
var _default = NodeSelectController;
exports["default"] = _default;

/***/ }),

/***/ 62592:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {CircuitDiagramEditor}  editor
 * @constructor
 */
function ViewBoxController(editor) {
  this.editor = editor;
  for (var i in this) {
    if (i.startsWith('ev_')) {
      this[i] = this[i].bind(this);
    }
  }
}
ViewBoxController.prototype.onCreateView = function () {
  this.$lineLayer = this.editor.$lineLayer;
  this.$lineLayer.on('dragstart', this.ev_dragStart);
  this.$nodeLayer = this.editor.$nodeLayer;
  this.$body = this.editor.$body;
  this.$body.on('wheel', this.ev_wheel);
  this.$vscrollbar = this.editor.$vscrollbar;
  this.$vscrollbar.on('scroll', this.ev_scbScroll).on('inactive', this.ev_scbInactive);
  this.$hscrollbar = this.editor.$hscrollbar;
  this.$hscrollbar.on('scroll', this.ev_scbScroll).on('inactive', this.ev_scbInactive);
};
ViewBoxController.prototype.ev_dragStart = function (event) {
  if (event.target === this.$lineLayer) {
    this.startOrigin = this.$lineLayer.box.origin;
    this.$lineLayer.on('drag', this.ev_drag).on('dragend', this.ev_dragEnd);
  }
};
ViewBoxController.prototype.ev_drag = function (event) {
  var d = event.currentPoint.sub(event.startingPoint);
  var newOrigin = this.startOrigin.add(d);
  this.$lineLayer.box.origin = newOrigin;
  this.$nodeLayer.addStyle({
    left: newOrigin.x + 'px',
    top: newOrigin.y + 'px'
  });
  this.updateScrollbar();
};
ViewBoxController.prototype.ev_dragEnd = function (event) {
  this.$lineLayer.off('drag', this.ev_drag).off('dragend', this.ev_dragEnd);
};
ViewBoxController.prototype.ev_wheel = function (event) {
  var d = event.deltaY < 0 ? 100 : -100;
  var newOrigin = this.$lineLayer.box.origin.add(new _Vec["default"](event.shiftKey ? d : 0, event.shiftKey ? 0 : d));
  this.$lineLayer.box.origin = newOrigin;
  this.$nodeLayer.addStyle({
    left: newOrigin.x + 'px',
    top: newOrigin.y + 'px'
  });
  this.updateScrollbar();
};
ViewBoxController.prototype.ev_resize = function () {
  this.updateScrollbar();
};
ViewBoxController.prototype.ev_scbScroll = function () {
  var offsetY = this.$vscrollbar.innerOffset - this.$vscrollbar.offsetToOY;
  var offsetX = this.$hscrollbar.innerOffset - this.$hscrollbar.offsetToOX;
  this.$lineLayer.box.origin = new _Vec["default"](-offsetX, -offsetY);
  this.$nodeLayer.addStyle({
    top: -offsetY + 'px',
    left: -offsetX + 'px'
  });
};
ViewBoxController.prototype.ev_scbInactive = function () {
  this.updateScrollbar();
};
ViewBoxController.prototype.updateScrollbar = function () {
  if (!this.getNodes()) return;
  /**
   *
   * @type {Rectangle[]}
   */
  var rects = [];
  if (rects.length === 0) return;
  var nodeDict = this.getNodes();
  for (var key in nodeDict) {
    rects.push(_Rectangle["default"].fromClientRect(nodeDict[key].getBoundingClientRect()));
  }
  var contentRect = rects.reduce(function (ac, cr) {
    return ac.merge(cr);
  });
  contentRect.x -= 10;
  contentRect.y -= 10; //for padding
  contentRect.width += 20;
  contentRect.height += 20;
  var nodeLayerBound = _Rectangle["default"].fromClientRect(this.$nodeLayer.getBoundingClientRect());
  nodeLayerBound.x -= 10;
  nodeLayerBound.y -= 10;
  var bodyBound = _Rectangle["default"].fromClientRect(this.$body.getBoundingClientRect());
  var innerRect = contentRect.merge(bodyBound).merge(nodeLayerBound);
  this.$vscrollbar.outerHeight = bodyBound.height;
  this.$vscrollbar.innerHeight = innerRect.height;
  this.$vscrollbar.innerOffset = bodyBound.y - innerRect.y;
  this.$vscrollbar.offsetToOY = this.$vscrollbar.innerOffset - -this.$lineLayer.box.origin.y;
  this.$hscrollbar.outerWidth = bodyBound.width;
  this.$hscrollbar.innerWidth = innerRect.width;
  this.$hscrollbar.innerOffset = bodyBound.x - innerRect.x;
  this.$hscrollbar.offsetToOX = this.$hscrollbar.innerOffset - -this.$lineLayer.box.origin.x;
};
ViewBoxController.prototype.scrollIntoNodes = function () {
  var nodesBound = this.getNodesBound();
  this.scrollIntoBound(nodesBound);
};
ViewBoxController.prototype.scrollIntoSelectedNodes = function () {
  var nodes = Object.values(this.editor.nodeSelectController.$selectedNodes);
  var nodesBound = this.getBoundOf(nodes);
  this.scrollIntoBound(nodesBound);
};
ViewBoxController.prototype.scrollIntoNode = function (nodeElt) {
  var nodeBound = this.getBoundOf([nodeElt]);
  this.scrollIntoBound(nodeBound);
};
ViewBoxController.prototype.scrollIntoBound = function (bound) {
  var maxX = bound.x + bound.width;
  var minX = bound.x;
  var minY = bound.y;
  var maxY = bound.y + bound.height;
  var viewBox = this.$lineLayer.box.viewBox;
  /***
   * @type {Vec2}
   */
  var curOrigin = this.$lineLayer.box.origin;
  var viewRect = new _Rectangle["default"](-curOrigin.x, -curOrigin.y, viewBox.width, viewBox.height);
  var contentRect = new _Rectangle["default"](bound.x - 10, bound.y - 10, bound.width + 30, bound.height + 20);
  if (viewRect.contains(contentRect) || contentRect.contains(viewRect)) {
    return;
  }
  var newOriginOptions = [contentRect.A().inv(), contentRect.B().sub(new _Vec["default"](viewRect.width, 0)).inv(), contentRect.C().sub(new _Vec["default"](viewRect.width, viewRect.height)).inv(), contentRect.D().sub(new _Vec["default"](0, viewRect.height)).inv()];
  var newOrigin = newOriginOptions.reduce(function (ac, cr) {
    if (ac.dist(curOrigin) > cr.dist(curOrigin)) return cr;
    return ac;
  });
  this.$lineLayer.box.origin = newOrigin;
  this.$nodeLayer.addStyle({
    left: newOrigin.x + 'px',
    top: newOrigin.y + 'px'
  });
  this.updateScrollbar();
};
ViewBoxController.prototype.getNodes = function () {
  return this.editor.$nodes;
};
ViewBoxController.prototype.getNodesBound = function () {
  var nodes = Object.values(this.getNodes());
  return this.getBoundOf(nodes);
};
ViewBoxController.prototype.getBoundOf = function (nodes) {
  var minY = Infinity,
    maxY = -Infinity,
    minX = Infinity,
    maxX = -Infinity;
  var node, found;
  for (var i = 0; i < nodes.length; ++i) {
    found = true;
    node = nodes[i];
    minX = Math.min(minX, node.x);
    minY = Math.min(minY, node.y);
    maxX = Math.max(maxX, node.x + node.rect.width);
    maxY = Math.max(maxY, node.y + node.rect.height);
  }
  return found ? {
    x: minX,
    y: minY,
    width: maxX - minX,
    height: maxY - minY
  } : {
    x: 0,
    y: 0,
    width: 0,
    height: 0
  };
};
var _default = ViewBoxController;
exports["default"] = _default;

/***/ }),

/***/ 77976:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var CmdDescriptors = {
  'new': {
    type: 'trigger',
    desc: "New",
    icon: 'span.mdi.mdi-file-plus-outline'
  },
  reload: {
    type: 'trigger',
    desc: "Reload",
    icon: 'span.mdi.mdi-reload'
  },
  editRootLayout: {
    type: 'trigger',
    desc: "Edit Root Layout",
    icon: 'span.mdi.mdi-border-outside'
  },
  edit: {
    type: 'trigger',
    icon: 'span.mdi.mdi-pencil-outline',
    desc: 'Edit'
  },
  preview: {
    type: 'trigger',
    icon: 'span.mdi.mdi-play',
    desc: 'Preview',
    bindKey: {
      win: 'Ctrl-K',
      mac: 'TODO?'
    }
  },
  runTest: {
    type: 'trigger',
    icon: 'span.mdi.mdi-bug-play[style="color:rgb(155, 30, 255)"]',
    desc: 'Run Test'
  },
  cut: {
    type: 'trigger',
    icon: 'span.mdi.mdi-content-cut',
    desc: 'Cut',
    bindKey: {
      win: 'Ctrl-X',
      mac: 'TODO?'
    }
  },
  copy: {
    type: 'trigger',
    icon: 'span.mdi.mdi-content-copy',
    desc: 'Copy',
    bindKey: {
      win: 'Ctrl-C',
      mac: 'TODO?'
    }
  },
  paste: {
    type: 'trigger',
    icon: 'span.mdi.mdi-content-paste',
    desc: 'Paste',
    bindKey: {
      win: 'Ctrl-V',
      mac: 'TODO?'
    }
  },
  pasteSCBlock: {
    type: 'ribbon',
    desc: 'Depth Select',
    icon: 'span.mdi.mdi-content-paste',
    items: [{
      text: 'Paste In',
      icon: 'span.mdi.mdi-content-paste',
      args: ['IN']
    }, {
      text: 'Paste Before',
      icon: 'span.mdi.mdi-content-paste',
      args: ['BEFORE']
    }, {
      text: 'Paste After',
      icon: 'span.mdi.mdi-content-paste',
      args: ['AFTER']
    }]
  },
  viewClipboard: {
    type: 'trigger',
    icon: 'clipboard-view-ico',
    desc: 'View Clipboard'
  },
  "delete": {
    type: 'trigger',
    icon: 'span.mdi.mdi-delete-variant',
    desc: 'Delete',
    bindKey: {
      win: 'Delete',
      mac: 'Delete'
    }
  },
  save: {
    type: 'trigger',
    icon: 'span.mdi.mdi-content-save',
    desc: 'Save',
    bindKey: {
      win: 'Ctrl-S',
      mac: '//todo'
    }
  },
  saveAs: {
    type: 'trigger',
    icon: 'span.mdi.mdi-content-save-edit',
    desc: 'Save As'
  },
  saveAsSystem: {
    type: 'trigger',
    icon: 'span.mdi.mdi-content-save-cog-outline',
    desc: 'Save As System'
  },
  importFromJson: {
    type: 'trigger',
    icon: 'span.mdi.mdi-cloud-upload[style="color:#1da8f2"]',
    desc: 'Import From JSON',
    bindKey: {
      win: 'Ctrl-Shift-I',
      mac: 'TODO?'
    }
  },
  importFromFile: {
    type: 'trigger',
    icon: 'span.mdi.mdi-cloud-upload[style="color:#1da8f2"]',
    desc: 'Import From File',
    bindKey: {
      win: 'Ctrl-Shift-I',
      mac: 'TODO?'
    }
  },
  export2Json: {
    type: 'trigger',
    icon: 'span.mdi.mdi-cloud-download-outline',
    desc: 'Export To JSON',
    bindKey: {
      win: 'Ctrl-Shift-E',
      mac: 'TODO?'
    }
  },
  export2sharpEncode: {
    type: 'trigger',
    icon: 'span.mdi.mdi-music-accidental-sharp',
    desc: 'Export Use EncodingClass',
    bindKey: {
      win: 'Ctrl-Shift-#',
      mac: 'TODO?'
    }
  },
  exportToFile: {
    type: 'trigger',
    icon: 'span.mdi.mdi-cloud-download-outline',
    desc: 'Export To File'
  },
  export2clipboard: {
    type: 'trigger',
    icon: 'span.mdi.mdi-clipboard-arrow-down-outline',
    desc: 'Copy JS To clipboard'
    // bindKey: { win: 'Ctrl-Shift-C', mac: 'TODO?' }
  },

  undo: {
    type: 'trigger',
    icon: 'span.mdi.mdi-undo',
    desc: 'Undo',
    bindKey: {
      win: 'Ctrl-Z',
      mac: 'TODO?'
    }
  },
  redo: {
    type: 'trigger',
    icon: 'span.mdi.mdi-redo',
    desc: 'Redo',
    bindKey: {
      win: 'Ctrl-Y',
      mac: 'TODO?'
    }
  },
  toggleHistory: {
    type: 'trigger',
    icon: 'history-ico',
    desc: 'Undo History',
    bindKey: {
      win: 'Ctrl-H',
      mac: 'TODO?'
    }
  },
  selectAll: {
    type: 'trigger',
    desc: 'Select All',
    icon: 'span.mdi.mdi-select-all',
    bindKey: {
      win: 'Ctrl-A',
      mac: 'TODO?'
    }
  },
  setSelectMode: {
    type: 'ribbon',
    desc: 'Depth Select',
    icon: 'span.mdi.mdi-selection',
    items: [{
      text: 'Select In Current Layout',
      icon: 'span.mdi.mdi-selection',
      args: ['CURRENT_LAYOUT']
    }, {
      text: 'Depth Select',
      icon: 'depth-select-ico',
      args: ['DEPTH']
    }]
  },
  zoomIn: {
    type: 'trigger',
    desc: 'Zoom In',
    icon: 'span.mdi.mdi-magnify-plus-outline'
  },
  zoomOut: {
    type: 'trigger',
    desc: 'Zoom Out',
    icon: 'span.mdi.mdi-magnify-minus-outline'
  },
  resetZoom: {
    type: 'trigger',
    desc: 'Reset Zoom ',
    icon: 'span.mdi.mdi-magnify-close'
  },
  autoAlignPosition: {
    type: 'trigger',
    icon: 'span.mdi.mdi-auto-fix',
    desc: 'Auto Align Position'
  },
  scrollIntoNodes: {
    type: 'trigger',
    icon: 'span.mdi.mdi-image-filter-center-focus-weak',
    desc: 'Scroll Into Nodes'
  },
  scrollIntoBlock: {
    type: 'trigger',
    icon: 'span.mdi.mdi-image-filter-center-focus-weak',
    desc: "Scroll Into Block"
  },
  openIncludedBlockManager: {
    type: 'trigger',
    icon: {
      tag: 'span',
      "class": ['mdi', 'mdi-package-variant-plus'],
      style: {
        color: 'rgb(30, 200, 200)'
      }
    },
    desc: 'Included Block Manager'
  },
  system_owner_lock: {
    type: 'trigger',
    desc: "System Lock",
    icon: {
      tag: 'span',
      style: {
        color: 'red'
      },
      "class": ['mdi', 'mdi-lock-outline']
    }
  },
  system_owner_unlock: {
    type: 'trigger',
    desc: "System Unlock",
    icon: {
      tag: 'span',
      style: {
        color: 'rgb(100, 100, 255)'
      },
      "class": ['mdi', 'mdi-lock-open-variant-outline']
    }
  },
  addComponent: {
    type: 'trigger',
    icon: {
      tag: 'span',
      style: {
        color: 'rgb(68,138,251)'
      },
      "class": ['mdi', 'mdi-shape-plus']
    },
    desc: 'Add Component'
  },
  transformComponentType: {
    type: 'trigger',
    icon: 'transform-ico'
  },
  moveUp: {
    type: 'trigger',
    icon: 'span.mdi.mdi-arrow-up',
    desc: 'Move Up'
  },
  moveDown: {
    type: 'trigger',
    icon: 'span.mdi.mdi-arrow-down',
    desc: 'Move Down'
  },
  remotePreview: {
    type: 'trigger',
    icon: 'span.mdi.mdi-cellphone-play',
    desc: 'Remote Preview'
  },
  editAsSCLang: {
    type: 'trigger',
    icon: 'span.mdi.mdi-text-box-edit-outline[style="color: green;"]',
    desc: 'Edit as Script'
  },
  pageSetting: {
    type: 'trigger',
    icon: 'span.mdi.mdi-file-cog-outline',
    desc: 'Page Setting(print)'
  },
  editContent: {
    type: 'trigger',
    icon: 'span.mdi.mdi-edit',
    desc: 'EditContent',
    bindKey: {
      win: 'F2',
      mac: 'TODO?'
    }
  },
  moveOrderToFirst: {
    type: 'trigger',
    icon: 'span.mdi.mdi-chevron-double-up',
    desc: 'Move To First'
  },
  moveOrderToPrevious: {
    type: 'trigger',
    icon: 'span.mdi.mdi-chevron-up',
    desc: 'Move To Previous'
  },
  moveOrderToNext: {
    type: 'trigger',
    icon: 'span.mdi.mdi-chevron-down',
    desc: 'Move To Next'
  },
  moveOrderToLast: {
    type: 'trigger',
    icon: 'span.mdi.mdi-chevron-double-down',
    desc: 'Move To Last'
  },
  formatFont: {
    type: 'font',
    icon: 'span.mdi.mdi-format-font',
    desc: 'Format Font'
  },
  hyperDisplayAs: {
    type: 'trigger',
    desc: 'Display As'
  },
  hyperDisplayAsInline: {
    type: 'trigger',
    desc: 'Inline',
    icon: 'span.mdi.mdi-format-wrap-inline'
  },
  hyperDisplayAsBlock: {
    type: 'trigger',
    desc: "Block",
    icon: 'span.mdi.mdi-view-array-outline'
  },
  hyperDisplayAsParagraph: {
    type: 'trigger',
    icon: 'span.mdi.mdi-view-day-outline',
    desc: 'Paragraph'
  },
  hyperDisplayFrontOfText: {
    type: 'trigger',
    icon: 'span.mdi.mdi-arrange-bring-to-front',
    desc: 'Front Of Text'
  },
  formatStyle: {
    desc: "Format Style"
  },
  beautifyJS: {
    type: 'trigger',
    icon: 'span.mdi.mdi-auto-fix',
    desc: 'Format Code'
  },
  formatTextBold: {
    type: 'toggle_switch',
    icon: 'span.mdi.mdi-format-bold'
  },
  formatTextItalic: {
    type: 'toggle_switch',
    icon: 'span.mdi.mdi-format-italic'
  },
  formatTextUnderline: {
    type: 'toggle_switch',
    icon: 'span.mdi.mdi-format-underline'
  },
  formatTextAlignLeft: {
    type: 'toggle_switch',
    icon: 'span.mdi.mdi-format-align-left'
  },
  formatTextAlignCenter: {
    type: 'toggle_switch',
    icon: 'span.mdi.mdi-format-align-center'
  },
  formatTextAlignRight: {
    type: 'toggle_switch',
    icon: 'span.mdi.mdi-format-align-right'
  },
  insertProcessBlock: {
    type: 'trigger',
    icon: 'span.mdi.mdi-puzzle-plus',
    desc: "Insert Process"
  },
  insertSubProcedureBlock: {
    type: 'trigger',
    icon: 'span.mdi.mdi-chart-sankey-variant',
    desc: "Insert SubProcess"
  },
  distributeVerticalDistance: {
    type: 'trigger',
    desc: "Distribute Verlical Distance",
    icon: '<svg width="24" height="24" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\
                    <path d="m7 3h10v5h5v2h-20v-2h5v-5"/>\
                    <path d="m2 16v-2h20v2h-3v5h-14v-5z"/>\
                </svg>'
  },
  distributeVerticalBottom: {
    type: 'trigger',
    desc: "Distribute Vertical Bottom",
    icon: 'span.mdi.mdi-distribute-vertical-bottom'
  },
  distributeVerticalCenter: {
    type: 'trigger',
    desc: "Distribute Vertical Center",
    icon: 'span.mdi.mdi-distribute-vertical-center'
  },
  distributeVerticalTop: {
    type: 'trigger',
    desc: "Distribute Vertical Top",
    icon: 'span.mdi.mdi-distribute-vertical-top'
  },
  distributeHorizontalDistance: {
    icon: '<svg width="24" height="24" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\
                    <path d="m21 7v10h-5v5h-2v-20h2v5h5"/>\
                    <path d="m8 2h2v20h-2v-3h-5v-14h5z"/>\
                </svg>',
    type: 'trigger',
    desc: "Distribute Horizontal Distance"
  },
  distributeHorizontalRight: {
    type: 'trigger',
    desc: "Distribute Horizontal Right",
    icon: 'span.mdi.mdi-distribute-horizontal-right'
  },
  distributeHorizontalCenter: {
    icon: 'span.mdi.mdi-distribute-horizontal-center',
    type: 'trigger',
    desc: "Distribute Horizontal Center"
  },
  distributeHorizontalLeft: {
    icon: 'span.mdi.mdi-distribute-horizontal-left',
    type: 'trigger',
    desc: "Distribute Horizontal Left"
  },
  equaliseHeight: {
    type: 'trigger',
    icon: 'span.mdi.mdi-arrow-expand-vertical',
    desc: 'Equalise Height'
  },
  alignVerticalCenter: {
    type: 'trigger',
    icon: 'span.mdi.mdi-align-vertical-center',
    desc: 'Align Vertical Center'
  },
  alignBottomEdge: {
    type: 'trigger',
    icon: 'span.mdi.mdi-align-vertical-bottom',
    desc: 'Align Bottom Edges'
  },
  alignTopEdge: {
    type: 'trigger',
    icon: 'span.mdi.mdi-align-vertical-top',
    desc: 'Align Top Edges'
  },
  equaliseWidth: {
    type: 'trigger',
    icon: 'span.mdi.mdi-arrow-expand-horizontal',
    desc: 'Equalise Width'
  },
  alignHorizontalCenter: {
    type: 'trigger',
    icon: 'span.mdi.mdi-align-horizontal-center',
    desc: 'Align Horizontal Center'
  },
  alignRightEdge: {
    type: 'trigger',
    icon: 'span.mdi.mdi-align-horizontal-right',
    desc: 'Align Right Edges'
  },
  alignLeftEdge: {
    type: 'trigger',
    icon: 'span.mdi.mdi-align-horizontal-left',
    desc: 'Align Left Edges'
  },
  sendBackward: {
    type: 'trigger',
    desc: 'Send Backward',
    icon: 'span.mdi.mdi-arrange-send-backward'
  },
  insertImage: {
    type: 'trigger',
    desc: 'Insert Image',
    icon: 'span.mdi.mdi-image-plus'
  },
  openHangTool: {
    type: 'toggle_switch',
    desc: 'Hang Tool(Middle Mouse Drag)',
    icon: 'span.mdi.mdi-hand-back-left-outline'
  },
  openSelectTool: {
    type: 'toggle_switch',
    desc: 'Select Tool',
    icon: 'select-tool-ico'
  },
  cancelActivatedTool: {
    type: 'trigger',
    desc: 'Cancel Activated Tool',
    icon: 'span.mdi.mdi-close-circle',
    bindKey: {
      win: 'escape',
      mac: 'Esc'
    }
  },
  openDrawLineTool: {
    type: 'toggle_switch',
    desc: 'Path Tool',
    icon: 'span.mdi.mdi-vector-polyline-plus'
  },
  lineColor: {
    type: 'color',
    desc: 'Line Color',
    icon: 'drawpenico'
  }
};
var _default = CmdDescriptors;
exports["default"] = _default;

/***/ }),

/***/ 25195:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.FormPreviewCmdDescriptors = void 0;
var FormPreviewCmd = {
  reload: function reload() {
    this.refresh();
  }
};
var _default = FormPreviewCmd;
exports["default"] = _default;
var FormPreviewCmdDescriptors = {
  reload: {
    type: 'trigger',
    desc: "Reload",
    icon: 'span.mdi.mdi-reload'
  }
};
exports.FormPreviewCmdDescriptors = FormPreviewCmdDescriptors;

/***/ }),

/***/ 73903:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.SelectListCmdTree = exports.SelectListCmdDescriptors = void 0;
var SelectListCmd = {};
SelectListCmd.save = function () {
  setTimeout(function () {
    if (this.verify()) this.emit('save', {
      type: 'save',
      target: this
    }, this);
  }.bind(this), 100); //wait for complete saving
};

SelectListCmd.insertRowBefore = function () {
  this.insertRowBeforeCurrent();
};
SelectListCmd.insertRowAfter = function () {
  this.insertRowAfterCurrent();
};
SelectListCmd.removeCurrentRow = function () {
  this.removeCurrentRow();
};
var _default = SelectListCmd;
exports["default"] = _default;
var SelectListCmdTree = [['save'], ['insertRowBefore', 'insertRowAfter', 'removeCurrentRow']];
exports.SelectListCmdTree = SelectListCmdTree;
var SelectListCmdDescriptors = {
  save: {
    desc: 'Save',
    icon: 'span.mdi.mdi-content-save-move-outline'
  },
  insertRowBefore: {
    desc: 'Insert Row Before',
    icon: 'span.mdi.mdi-table-row-plus-before'
  },
  insertRowAfter: {
    desc: 'Insert Row After',
    icon: 'span.mdi.mdi-table-row-plus-after'
  },
  removeCurrentRow: {
    desc: 'Remove Current Row',
    icon: 'span.mdi.mdi-table-row-remove'
  }
};
exports.SelectListCmdDescriptors = SelectListCmdDescriptors;

/***/ }),

/***/ 63650:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _FCore = __webpack_require__(51518);
var _Assembler = __webpack_require__(2326);
__webpack_require__(57626);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ScalableComponent
 * @constructor
 */
function ArrayOfFragment() {
  _ScalableComponent["default"].call(this);
  this.fragments = [];
  this._makeArray();
}
(0, _inheritComponentClass["default"])(ArrayOfFragment, _ScalableComponent["default"]);
ArrayOfFragment.prototype.tag = "ArrayOfFragment";
ArrayOfFragment.prototype.menuIcon = "span.mdi.mdi-tray-full";
ArrayOfFragment.prototype.styleHandlers.itemSpacing = {
  set: function set(value) {
    this.domElt.addStyle('--as-aof-item-spacing', value + 'px');
    return value;
  },
  descriptor: {
    type: 'measureSize',
    units: ['px']
  },
  "export": function _export() {
    var ref = arguments[arguments.length - 1];
    var value = ref.get();
    if (value === 10) return undefined;
    return value;
  }
};
ArrayOfFragment.prototype.render = function () {
  return (0, _FCore._)({
    "class": 'as-array-of-fragment'
  });
};
ArrayOfFragment.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.style.itemSpacing = 10;
};
ArrayOfFragment.prototype.attributeHandlers.itemFragmentClass = {
  descriptor: {
    type: 'fragmentClass'
  }
};
ArrayOfFragment.prototype.attributeHandlers.disabled = {
  set: function set(value) {
    if (value) this.domElt.addClass('as-disabled');else this.domElt.removeClass('as-disabled');
  },
  get: function get() {
    return this.domElt.containsClass('as-disabled');
  },
  descriptor: {
    type: 'bool'
  }
};
ArrayOfFragment.prototype._clearAllFragment = function () {
  this.domElt.clearChild();
};
ArrayOfFragment.prototype._makeArray = function () {
  if (this._dataArr) return;
  var self = this;
  this._dataArr = [];
  this._dataArr.push = function () {
    this.splice.apply(this, [this.length, this.length].concat(Array.prototype.slice.apply(arguments)));
    return arguments.length;
  };
  var oUnShift = this._dataArr.unshift;
  this._dataArr.unshift = function () {
    var newItems = Array.prototype.slice.call(arguments);
    self.notifyChange();
    return oUnShift.apply(this._array, newItems);
  };
  this._dataArr.pop = function () {
    if (this.length <= 0) return undefined;
    var res = this[this.length - 1];
    this.slice(this.length - 1, this.length);
    self.notifyChange();
    return res;
  };
  this._dataArr.shift = function () {
    if (this.length <= 0) return undefined;
    var res = this[0];
    this.slice(0, 1);
    self.notifyChange();
    return res;
  };
  this._dataArr.splice = function () {
    var start;
    var end;
    var addedItems;
    if (arguments.length < 1) start = 0;else start = arguments[0];
    if (arguments.length < 2) end = this.length;else end = arguments[1];
    if (start < 0) start = this.length - start;
    if (end < 0) end = this.length - end;
    start = Math.max(0, start);
    end = Math.max(start, end);
    if (arguments.length > 2) addedItems = Array.prototype.slice.call(arguments, 2);else addedItems = [];
    var className = self.getAttribute('itemFragmentClass');
    var newFragments = addedItems.map(function (item) {
      var frag = _Assembler.AssemblerInstance.buildFragment({
        "class": className
      });
      frag.props = item;
      return frag;
    });
    var endElt = self.fragments[end] && self.fragments[end].domElt;
    var removedFragments = self.fragments.splice.apply(self.fragments, [start, end].concat(newFragments));
    removedFragments.forEach(function (frg) {
      self.fragment.removeChild(frg);
      frg.domElt.remove();
    });
    newFragments.forEach(function (frg) {
      if (endElt) self.domElt.addChildBefore(frg.domElt, endElt);else self.domElt.addChild(frg.domElt);
      self.fragment.addChild(frg);
    });
    var newBindItems = newFragments.map(function (frg) {
      return frg.props;
    });
    self.notifyChange();
    return Array.prototype.splice.apply(this, [start, end].concat(newBindItems));
  };
};
ArrayOfFragment.prototype.createDataBindingDescriptor = function () {
  var self = this;
  return {
    set: function set(value) {
      value = value || [];
      if (!value.slice) value = [];
      self._dataArr.splice.apply(self._dataArr, [0, self._dataArr.length].concat(value));
    },
    get: function get() {
      return self._dataArr;
    }
  };
};
var _default = ArrayOfFragment;
exports["default"] = _default;

/***/ }),

/***/ 5535:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Assembler = __webpack_require__(2326);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function Break() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(Break, _ScalableComponent["default"]);
Break.prototype.tag = "Break";
Break.prototype.menuIcon = "span.mdi.mdi-square-medium-outline";
Break.prototype.style.display = 'block';
Break.prototype.style.position = 'static';
Break.prototype.style.width = 'auto';
Break.prototype.style.height = 10;
Break.prototype.render = function () {
  this.domElt = _('div.as-break');
};
_Assembler.AssemblerInstance.addClass(Break);
var _default = Break;
exports["default"] = _default;

/***/ }),

/***/ 9776:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _TextStyleHandlers = _interopRequireDefault(__webpack_require__(42702));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function Button() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(Button, _ScalableComponent["default"]);
Button.prototype.tag = "Button";
Button.prototype.menuIcon = "span.mdi.mdi-alpha-b-box";
Object.assign(Button.prototype.styleHandlers, _TextStyleHandlers["default"]);
Object.assign(Button.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Button.prototype.style.colorTheme = 'default';
Button.prototype.style.font = 'none';
Button.prototype.style.height = 30;
Button.prototype.style.display = 'inline-block';
Button.prototype.attributes.icon = 'span.mdi.mdi-format-font';
Button.prototype.attributeHandlers.text = {
  set: function set(value) {
    this.domElt.text = value;
  },
  get: function get() {
    return this.domElt.text;
  },
  descriptor: {
    type: "text",
    sign: 'SimpleText'
  },
  "export": function _export() {
    return this.attributes.text || undefined;
  }
};
Button.prototype.attributeHandlers.icon = {
  set: function set(value) {
    this.domElt.icon = value;
  },
  get: function get() {
    return this.domElt.icon;
  },
  descriptor: {
    type: "icon",
    sign: "SimpleIcon"
  }
};
Button.prototype.attributeHandlers.disabled = {
  set: function set(value) {
    this.domElt.disabled = !!value;
  },
  get: function get() {
    return this.domElt.disabled;
  },
  descriptor: {
    type: 'bool'
  }
};
Button.prototype.pinHandlers.signal = {
  get: function get() {
    return true;
  },
  descriptor: {
    type: "bool"
  }
};
Button.prototype.pinHandlers.disabled = {
  receives: function receives(value) {
    this.attributes.disabled = value;
  },
  descriptor: {
    type: "bool"
  }
};
Button.prototype.colorThemeList = ['default', 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark', 'link'];
Button.prototype.styleHandlers.colorTheme = {
  set: function set(value) {
    if (this.colorThemeList.indexOf(value) < 0) value = this.colorThemeList[0];
    var currentValue = arguments[arguments.length - 1].get();
    this.domElt.removeClass(currentValue || 'default').addClass(value);
    return value;
  },
  descriptor: {
    type: 'enum',
    values: Button.prototype.colorThemeList
  }
};
Button.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.apply(this, arguments);
  this.attributes.text = this.attributes.name;
};
Button.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  var self = this;
  this.domElt.on('click', function (event) {
    self.emit('click', {
      type: 'click',
      target: this,
      originEvent: event.originEvent || event
    }, self);
    self.pinFire('signal');
  });
};
Button.prototype.render = function () {
  this.domElt = _('flexiconbutton');
};
Button.prototype.measureMinSize = function () {
  var fontSize = this.domElt && this.domElt.getFontSize() || 14;
  return {
    width: fontSize * 2 + 2,
    height: fontSize * 2 + 2
  };
};
_Assembler.AssemblerInstance.addClass(Button);
var _default = Button;
exports["default"] = _default;

/***/ }),

/***/ 18869:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _FCore = __webpack_require__(51518);
var _Assembler = __webpack_require__(2326);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _CKPlaceholder = _interopRequireDefault(__webpack_require__(24471));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ScalableComponent
 * @constructor
 */
function CKEditor() {
  var _this = this;
  _ScalableComponent["default"].call(this);
  this.editior = null;
  this._pendingData = null;
  setTimeout(function () {
    if (_this.style.width !== 'auto') return;
    var bf = _this.domElt.previousSibling;
    if (!bf || !bf.fmComponent) return;
    var bfComp = bf.fmComponent;
    var subWidth = 0;
    if (bfComp.tag !== 'Label') return;
    if (bfComp.style.hidden === true) return;
    if (typeof bfComp.style.width === "number") {
      subWidth = bfComp.style.width;
      if (typeof bfComp.style.marginRight === "number") {
        subWidth += bfComp.style.marginRight;
      }
    }
    if (subWidth) {
      _this.domElt.style.setProperty('width', 'calc(100% - ' + Math.ceil(subWidth) + 'px)');
      dispatchEvent(new Event('change'));
    }
  });
}
(0, _inheritComponentClass["default"])(CKEditor, _ScalableComponent["default"]);
CKEditor.prototype.menuIcon = 'span.mdi.mdi-file-word-box';
CKEditor.prototype.tag = 'CKEditor';
CKEditor.prototype.style.width = 600;
CKEditor.prototype.style.height = 'auto';
CKEditor.prototype.style.display = 'inline-block';
CKEditor.prototype.style.vAlign = 'top';
CKEditor.prototype.render = function () {
  this.placeHolderElt = (0, _FCore._)({
    tag: _CKPlaceholder["default"].tag,
    on: {
      editorcreated: this.ev_editorCreated.bind(this),
      change: function () {
        this.pinFire('data');
        this.notifyChange();
      }.bind(this),
      editorready: function editorready() {
        _ResizeSystem["default"].update();
      }
    }
  });
  return (0, _FCore._)({
    "class": 'as-ckeditor-wrapper',
    child: this.placeHolderElt
  });
};
CKEditor.prototype.onCreated = function () {
  this.placeHolderElt.requestUpdateSize = this.requestUpdateSize.bind(this);
  _ResizeSystem["default"].add(this.placeHolderElt);
};
CKEditor.prototype.ev_editorCreated = function () {
  this.editor = this.placeHolderElt.editor;
  this.editor.on('instanceReady', this.requestUpdateSize.bind(this));
};
CKEditor.prototype.onSizeChange = function () {
  this.requestUpdateSize();
};
CKEditor.prototype.requestUpdateSize = function () {
  if (this.editor) {
    var b = this.domElt.getBoundingClientRect();
    try {
      this.editor.resize(typeof this.style.width === "number" ? this.style.width : null, typeof this.style.height === "number" ? this.style.height : b.height);
    } catch (err) {}
  }
};
CKEditor.prototype.attributes.toolbar = 'SIMPLE';
CKEditor.prototype.pinHandlers.data = {
  get: function get() {
    return this.attributes.data;
  },
  receives: function receives(value) {
    this.attributes.data = value;
  },
  descriptor: {
    type: 'text'
  }
};
CKEditor.prototype.attributeHandlers.data = {
  set: function set(value) {
    var prevData = this.placeHolderElt.data;
    this.placeHolderElt.data = value;
    if (value !== prevData) {
      this.pinFire('data');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.placeHolderElt.data;
  },
  descriptor: {
    type: 'text'
  }
};
CKEditor.prototype.attributeHandlers.toolbar = {
  set: function set(value) {
    this.placeHolderElt.config = this.placeHolderElt.config || {};
    this.placeHolderElt.config.toolbar = value;
  },
  descriptor: {
    type: 'enum',
    values: ['SIMPLE', 'ADVANCE']
  }
};
CKEditor.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.attributes.data = value;
    },
    get: function get() {
      return thisC.attributes.data;
    }
  };
};
_Assembler.AssemblerInstance.addClass(CKEditor);
var _default = CKEditor;
exports["default"] = _default;

/***/ }),

/***/ 43704:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _Assembler = __webpack_require__(2326);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _CKTemplateEditor = _interopRequireDefault(__webpack_require__(69918));
var _CKInlineShortText = _interopRequireDefault(__webpack_require__(43501));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ScalableComponent
 * @constructor
 */
function CKInlineShortTemplate() {
  _CKTemplateEditor["default"].call(this);
}
(0, _inheritComponentClass["default"])(CKInlineShortTemplate, _CKTemplateEditor["default"]);
CKInlineShortTemplate.prototype.menuIcon = 'span.mdi.mdi-file-word-box';
CKInlineShortTemplate.prototype.tag = 'CKInlineShortTemplate';
CKInlineShortTemplate.prototype.style.vAlign = 'center';
CKInlineShortTemplate.prototype.style.display = 'inline-block';
CKInlineShortTemplate.prototype.style.height = 30;
delete CKInlineShortTemplate.prototype.attributeHandlers.toolbar;
CKInlineShortTemplate.prototype.render = function () {
  this.placeHolderElt = (0, _FCore._)({
    tag: _CKInlineShortText["default"].tag,
    style: {
      width: '100%',
      height: '100%'
    },
    on: {
      editorcreated: this.ev_editorCreated.bind(this),
      change: function () {
        this.pinFire('data');
        this.notifyChange();
      }.bind(this),
      editorready: function editorready() {
        _ResizeSystem["default"].update();
      },
      command: function (event) {
        if (event.command === 'insert_expression') this.pinFire('requestExpression');
      }.bind(this)
    },
    props: {
      extensions: ['expression']
    }
  });
  return (0, _FCore._)({
    "class": 'as-ckeditor-wrapper',
    child: this.placeHolderElt
  });
};
_Assembler.AssemblerInstance.addClass(CKInlineShortTemplate);
var _default = CKInlineShortTemplate;
exports["default"] = _default;

/***/ }),

/***/ 69918:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.parseCKTemplate = parseCKTemplate;
var _Assembler = __webpack_require__(2326);
var _CKEditor = _interopRequireDefault(__webpack_require__(18869));
var _base = __webpack_require__(6954);
var _utils = __webpack_require__(84512);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
var _CKPlaceholder = _interopRequireDefault(__webpack_require__(24471));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function parseCKTemplate(data, replacements) {
  var replaceF = replacements;
  if (typeof replacements !== "function") {
    replaceF = function replaceF(variable) {
      return replacements[variable] || '{{' + variable + '}}';
    };
  }
  return data.replace(/\{\{([a-zA-Z_$]([a-zA-Z_$0-9]*))(\.([a-zA-Z_$]([a-zA-Z_$0-9]*)))*\}\}/g, function (all) {
    var variable = all.substr(2, all.length - 2);
    return replaceF(variable) || '{{' + variable + '}}';
  }.bind(this));
}

/***
 * @extends CKEditor
 * @constructor
 */
function CKTemplateEditor() {
  _CKEditor["default"].call(this);
}
(0, _inheritComponentClass["default"])(CKTemplateEditor, _CKEditor["default"]);
CKTemplateEditor.prototype.menuIcon = 'span.mdi.mdi-file-word-box-outline';
CKTemplateEditor.prototype.tag = 'CKTemplateEditor';
CKTemplateEditor.prototype.render = function () {
  this.placeHolderElt = (0, _FCore._)({
    tag: _CKPlaceholder["default"].tag,
    on: {
      editorcreated: this.ev_editorCreated.bind(this),
      change: function () {
        this.pinFire('data');
        this.notifyChange();
      }.bind(this),
      editorready: function editorready() {
        _ResizeSystem["default"].update();
      },
      command: function (event) {
        if (event.command === 'insert_expression') this.pinFire('requestExpression');
      }.bind(this)
    },
    props: {
      extensions: ['expression']
    }
  });
  return (0, _FCore._)({
    "class": 'as-ckeditor-wrapper',
    child: this.placeHolderElt
  });
};
CKTemplateEditor.prototype.pinHandlers.requestExpression = {
  get: function get() {
    return this.placeHolderElt.getSelectedExpression();
  },
  descriptor: {
    type: 'bool'
  }
};
CKTemplateEditor.prototype.pinHandlers.insertExpression = {
  receives: function receives(value) {
    if (!this.editor) return;
    if (value) this.placeHolderElt.insertExpression(value);
  },
  descriptor: {
    type: '{text:string, value:string}'
  }
};
CKTemplateEditor.prototype.pinHandlers.previewHTML = {
  get: function get() {
    return this.placeHolderElt.rawData;
  },
  descriptor: {
    type: 'text'
  }
};
_Assembler.AssemblerInstance.addClass(CKTemplateEditor);
var _default = CKTemplateEditor;
exports["default"] = _default;

/***/ }),

/***/ 29370:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(26189);
var _ContentScalelessComponent = _interopRequireDefault(__webpack_require__(98003));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireDefault(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/***
 * @extends ContentScalelessComponent
 * @constructor
 */
function CheckBox() {
  _ContentScalelessComponent["default"].call(this);
  this._firedValue = undefined;
}
(0, _inheritComponentClass["default"])(CheckBox, _ContentScalelessComponent["default"]);
CheckBox.prototype.tag = "CheckBox";
CheckBox.prototype.menuIcon = "span.mdi.mdi-checkbox-outline.mdi-check-box-outline";
CheckBox.prototype.style.display = 'inline-block';
CheckBox.prototype.style.vAlign = 'center';
CheckBox.prototype.style.width = 18;
CheckBox.prototype.style.height = 18;
CheckBox.prototype.style.vAlign = 'center';
CheckBox.prototype.attributes.checked = false;
CheckBox.prototype.onCreated = function () {
  _ContentScalelessComponent["default"].prototype.onCreated.call(this);
  this.$content.on('change', function () {
    if (this._firedValue !== this.$content.checked) {
      this._firedValue = this.$content.checked;
      this.pinFire('checked');
    }
    this.notifyChange();
  }.bind(this));
};
CheckBox.prototype.renderContent = function () {
  this.$content = _('checkboxbutton');
};
CheckBox.prototype.measureMinSize = function () {
  return {
    width: 18,
    height: 18
  };
};
CheckBox.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    set: function set(value) {
      return thisC.setAttribute('checked', !!value);
    },
    get: function get() {
      return thisC.getAttribute('checked');
    }
  };
};
CheckBox.prototype.attributeHandlers.checked = {
  set: function set(value) {
    var prev = this.$content.checked;
    this.$content.checked = !!value;
    if (this.$content.checked !== prev) {
      this.notifyChange();
    }
    if (this._firedValue !== this.$content.checked) {
      this._firedValue = this.$content.checked;
      this.pinFire('checked');
    }
  },
  get: function get() {
    return this.$content.checked;
  },
  descriptor: {
    type: "bool",
    sign: "NotDependentBool"
  },
  "export": function _export() {
    return this.$content.checked || undefined;
  }
};
Object.assign(CheckBox.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(CheckBox.prototype.styleHandlers, _InputStyleHandlers["default"]);
CheckBox.prototype.attributeHandlers.disabled = {
  set: function set(value) {
    this.$content.disabled = value;
  },
  get: function get() {
    return this.$content.disabled;
  },
  descriptor: {
    type: "bool"
  },
  "export": function _export() {
    return this.$content.disabled || undefined;
  }
};
CheckBox.prototype.pinHandlers.checked = {
  receives: function receives(value) {
    this.attributes.checked = !!value;
  },
  get: function get() {
    return this.$content.checked;
  },
  descriptor: {
    type: "bool"
  }
};
CheckBox.prototype.pinHandlers.disabled = {
  receives: function receives(value) {
    this.attributes.disabled = !!value;
  },
  descriptor: {
    type: "bool"
  }
};
_Assembler.AssemblerInstance.addClass(CheckBox);
var _default = CheckBox;
exports["default"] = _default;

/***/ }),

/***/ 87290:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _ColorPickerButton = _interopRequireDefault(__webpack_require__(34443));
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function ColorInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(ColorInput, _ScalableComponent["default"]);
ColorInput.prototype.tag = "ColorInput";
ColorInput.prototype.menuIcon = "span.mdi.mdi-palette";
ColorInput.prototype.SUPPORT_EVENT_NAMES = ['change'];
Object.assign(ColorInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
ColorInput.prototype.style.vAlign = 'center';
ColorInput.prototype.style.display = 'inline-block';
ColorInput.prototype.styleHandlers.border = _InputStyleHandlers["default"].border;
ColorInput.prototype.attributes.mode = 'HEX6';
ColorInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    value = value || 'black';
    var same = false;
    try {
      var valueText = (_Color["default"].parse(value + '') || '').toString('rgba');
      var oldText = (_Color["default"].parse(this.domElt.value + '') || '').toString('rgba');
      same = valueText === oldText;
    } catch (err) {}
    if (same) return;
    this.domElt.value = value;
    this.pinFire('value');
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'Color',
    nullable: true,
    defaultValue: 'transparent',
    sign: 'ColorValue'
  }
};
ColorInput.prototype.attributeHandlers.mode = {
  set: function set(value) {
    this.domElt.mode = value;
  },
  get: function get() {
    return this.domElt.mode;
  },
  descriptor: {
    type: 'enum',
    values: ['HEX6', 'HEX8', 'RGB', 'RGBA', 'OBJECT']
  }
};
ColorInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.value;
  }
};
ColorInput.prototype.render = function () {
  return _(_ColorPickerButton["default"]);
};
ColorInput.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.value = null;
  this.style.width = 80;
  this.style.height = 30;
};
ColorInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  this.domElt.on('change', this.ev_inputChange.bind(this));
};
ColorInput.prototype.measureMinSize = function () {
  return {
    width: 75,
    height: 16
  };
};
ColorInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.setAttribute('value', value);
    },
    get: function get() {
      return thisC.getAttribute('value');
    }
  };
};
ColorInput.prototype.ev_inputChange = function () {
  this.pinFire('value');
  this.notifyChange();
};
_Assembler.AssemblerInstance.addClass(ColorInput);
var _default = ColorInput;
exports["default"] = _default;

/***/ }),

/***/ 1956:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _MSelectMenu = _interopRequireDefault(__webpack_require__(53984));
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _ComboBoxHandlers = __webpack_require__(79554);
var _FNode = __webpack_require__(88215);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function ComboBox() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(ComboBox, _ScalableComponent["default"]);
ComboBox.prototype.tag = "ComboBox";
ComboBox.prototype.menuIcon = 'span.mdi.mdi-arrow-down-drop-circle-outline';
Object.assign(ComboBox.prototype.attributeHandlers, _InputAttributeHandlers["default"], _ComboBoxHandlers.ComboBoxAttributeHandlers);
Object.assign(ComboBox.prototype.styleHandlers, _InputStyleHandlers["default"]);
ComboBox.prototype.style.vAlign = 'center';
ComboBox.prototype.style.display = 'inline-block';
ComboBox.prototype.styleHandlers.dropdownIcon = {
  set: function set(value) {
    if (value) {
      this.domElt.addClass('as-keep-dropdown-icon');
    } else {
      this.domElt.removeClass('as-keep-dropdown-icon');
    }
  },
  get: function get() {
    return this.domElt.hasClass('as-keep-dropdown-icon');
  },
  "export": function _export() {
    return this.style.dropdownIcon || undefined;
  },
  descriptor: {
    type: 'bool'
  }
};
Object.assign(ComboBox.prototype.pinHandlers, _ComboBoxHandlers.ComboBoxPinHandlers);

//
// ComboBox.prototype.pinHandlers.value = {
//     receives: function (value) {
//         this.attributes.value = value;
//     },
//     get: function () {
//         return this.domElt.value;
//     },
//     descriptor: {
//         type: 'text|number'
//     }
// };

ComboBox.prototype.pinHandlers.onClick = {
  get: function get() {
    return {
      sender: this
    };
  }
};
ComboBox.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
};
ComboBox.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  var self = this;
  this.domElt.on('minwidthchange', function (event) {
    if (!(self.style.width > event.value)) {
      self.setStyle('width', event.value);
    }
  }).on('change', function () {
    // self.attributes.value = this.value;
    self.notifyUnion();
    self.pinFire('value');
    self.pinFire('text');
    self.notifyChange();
  }).on('click', function (event) {
    if (this.readOnly) self.pinFire('onClick');
  });
};
ComboBox.prototype.onResume = function () {
  _ScalableComponent["default"].prototype.onResume.apply(this, arguments);
  this.notifyUnion();
};
ComboBox.prototype.render = function () {
  return _('selectmenu');
};
ComboBox.prototype.measureMinSize = function () {
  var minWidthStyle = this.domElt ? parseFloat(this.domElt.getComputedStyleValue('min-width').replace('px')) : 24;
  return {
    width: Math.max(minWidthStyle, 24),
    height: 25
  };
};
ComboBox.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  var subObj = {};
  Object.defineProperties(subObj, {
    value: {
      configurable: true,
      enumerable: true,
      set: function set(value) {
        thisC.setAttribute('value', value);
      },
      get: function get() {
        return thisC.getAttribute('value');
      }
    },
    list: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.getAttribute('list');
      },
      set: function set(value) {
        thisC.setAttribute('list', value);
      }
    }
  });
  return {
    set: function set(value) {
      Object.assign(subObj, value);
    },
    get: function get() {
      return subObj;
    }
  };
};
ComboBox.prototype.verify = function () {
  if (!this.attributes.required) return {
    completed: true
  };
  var value = this.attributes.value;
  if (value === null) {
    return {
      completed: false,
      comp: this
    };
  }
};
ComboBox.prototype.notifyUnion = function () {
  var fragment = this.fragment;
  var name = this.attributes.name;
  var value = this.attributes.value + '';
  if (!fragment || !fragment.view) return;
  (0, _FNode.traversal)(fragment.view, function (path) {
    var node = path.node;
    var unionValues;
    var hidden;
    if (node.attributes.union === name) {
      unionValues = node.attributes.unionValues;
      if (unionValues && unionValues.length > 0) {
        hidden = !unionValues.some(function (val) {
          return val + '' === value;
        });
        node.attributes.disembark = !unionValues.some(function (val) {
          return val + '' === value;
        });
        if (hidden) {
          node.domElt.addClass('as-union-hidden');
        } else {
          node.domElt.removeClass('as-union-hidden');
        }
      } else {
        node.domElt.removeClass('as-union-hidden');
        node.attributes.disembark = true;
      }
    }
    if (node.fragment !== fragment) path.skipChildren();
  });
};
_Assembler.AssemblerInstance.addClass(ComboBox);
var _default = ComboBox;
exports["default"] = _default;

/***/ }),

/***/ 17214:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _RelativeLayout = _interopRequireDefault(__webpack_require__(56061));
var _LinearLayout = _interopRequireDefault(__webpack_require__(86527));
var _ChainLayout = _interopRequireDefault(__webpack_require__(74445));
var _DateInput = _interopRequireDefault(__webpack_require__(68452));
var _TimeInput = _interopRequireDefault(__webpack_require__(49540));
var _TextArea = _interopRequireDefault(__webpack_require__(48310));
var _NumberInput = _interopRequireDefault(__webpack_require__(53422));
var _ComboBox = _interopRequireDefault(__webpack_require__(1956));
var _MultiselectComboBox = _interopRequireDefault(__webpack_require__(62683));
var _TreeComboBox = _interopRequireDefault(__webpack_require__(70420));
var _Checkbox = _interopRequireDefault(__webpack_require__(29370));
var _TrackBar = _interopRequireDefault(__webpack_require__(63318));
var _TrackBarInput = _interopRequireDefault(__webpack_require__(90587));
var _TableInput = _interopRequireDefault(__webpack_require__(39215));
var _ImageFileInput = _interopRequireDefault(__webpack_require__(28032));
var _Radio = _interopRequireDefault(__webpack_require__(57031));
var _Label = _interopRequireDefault(__webpack_require__(31608));
var _Text = _interopRequireDefault(__webpack_require__(36685));
var _Image = _interopRequireDefault(__webpack_require__(65661));
var _Table = _interopRequireDefault(__webpack_require__(53968));
var _Button = _interopRequireDefault(__webpack_require__(9776));
var _ArrayOfFragment = _interopRequireDefault(__webpack_require__(63650));
var _EditableArrayOfFragment = _interopRequireDefault(__webpack_require__(54187));
var _Ellipse = _interopRequireDefault(__webpack_require__(52933));
var _Rectangle = _interopRequireDefault(__webpack_require__(82026));
var _DateTimeInput = _interopRequireDefault(__webpack_require__(17902));
var _FileInput = _interopRequireDefault(__webpack_require__(38488));
var _TextInput = _interopRequireDefault(__webpack_require__(72386));
var _Time24Input = _interopRequireDefault(__webpack_require__(78145));
var _TimeRange24Input = _interopRequireDefault(__webpack_require__(42336));
var _MultiSelectTreeComboBox = _interopRequireDefault(__webpack_require__(72555));
var _SelectListText = _interopRequireDefault(__webpack_require__(72186));
var _CKEditor = _interopRequireDefault(__webpack_require__(18869));
var _CKTemplateEditor = _interopRequireDefault(__webpack_require__(69918));
var _TreeLeafComboBox = _interopRequireDefault(__webpack_require__(29723));
var _MultiSelectTreeLeafComboBox = _interopRequireDefault(__webpack_require__(18378));
var _WeekInput = _interopRequireDefault(__webpack_require__(63117));
var _FileListInput = _interopRequireDefault(__webpack_require__(26252));
var _DateInYearInput = _interopRequireDefault(__webpack_require__(82494));
var _DualComboBox = _interopRequireDefault(__webpack_require__(37459));
var _CKInlineShortTemplate = _interopRequireDefault(__webpack_require__(43704));
var _LocationInput = _interopRequireDefault(__webpack_require__(97122));
var _LocationView = _interopRequireDefault(__webpack_require__(68804));
var _MultiSelectListText = _interopRequireDefault(__webpack_require__(88759));
var _DualSelectListText = _interopRequireDefault(__webpack_require__(34847));
var _ColorInput = _interopRequireDefault(__webpack_require__(87290));
var _MonthInput = _interopRequireDefault(__webpack_require__(46834));
var _TreeTable = _interopRequireDefault(__webpack_require__(80230));
var _CopyableIconTooltip = _interopRequireDefault(__webpack_require__(25973));
var _DateLevelInput = _interopRequireDefault(__webpack_require__(83413));
var _HyperLayout = _interopRequireDefault(__webpack_require__(77616));
var _Break = _interopRequireDefault(__webpack_require__(5535));
var _GridLayout = _interopRequireDefault(__webpack_require__(67454));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var ComponentTreeList = {
  text: "all",
  children: [{
    text: 'layout',
    children: [_RelativeLayout["default"], _LinearLayout["default"], _ChainLayout["default"], _HyperLayout["default"], _GridLayout["default"], _Break["default"]]
  }, {
    text: 'input',
    children: [_DateInput["default"], _DateInYearInput["default"], _TimeInput["default"], _Time24Input["default"], _TimeRange24Input["default"], _DateTimeInput["default"], _WeekInput["default"], _MonthInput["default"], _DateLevelInput["default"], _TextInput["default"], _TextArea["default"], _NumberInput["default"], _ColorInput["default"], _ComboBox["default"], _MultiselectComboBox["default"], _TreeComboBox["default"], _TreeLeafComboBox["default"], _MultiSelectTreeComboBox["default"], _MultiSelectTreeLeafComboBox["default"], _DualComboBox["default"], _Radio["default"], _Checkbox["default"], _TrackBar["default"], _TrackBarInput["default"], _TableInput["default"], _ImageFileInput["default"], _FileInput["default"], _FileListInput["default"], _CKEditor["default"], _CKTemplateEditor["default"], _CKInlineShortTemplate["default"], _LocationInput["default"], _LocationView["default"]]
  }, {
    text: 'static',
    children: [_Label["default"], _Text["default"], _Image["default"], _Table["default"], _TreeTable["default"], _SelectListText["default"], _MultiSelectListText["default"], _DualSelectListText["default"], _CopyableIconTooltip["default"]]
  }, {
    text: 'trigger',
    children: [_Button["default"]]
  }, {
    text: 'mapping',
    children: [_ArrayOfFragment["default"], _EditableArrayOfFragment["default"]]
  }, {
    text: 'shape',
    children: [_Ellipse["default"], _Rectangle["default"]]
  }, {
    text: 'fragment',
    children: []
  }, {
    text: 'template',
    children: []
  }]
};
var _default = ComponentTreeList;
exports["default"] = _default;

/***/ }),

/***/ 25973:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(26189);
var _ContentScalelessComponent = _interopRequireDefault(__webpack_require__(98003));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Assembler = __webpack_require__(2326);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/***
 * @extends ContentScalelessComponent
 * @constructor
 */
function CopyableIconTooltip() {
  _ContentScalelessComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(CopyableIconTooltip, _ContentScalelessComponent["default"]);
CopyableIconTooltip.prototype.tag = "CopyableIconTooltip";
CopyableIconTooltip.prototype.menuIcon = "span.mdi.mdi-information-outline";
CopyableIconTooltip.prototype.style.vAlign = 'center';
CopyableIconTooltip.prototype.style.display = 'inline-block';
CopyableIconTooltip.prototype.style.boxAlign = 'centercenter';
CopyableIconTooltip.prototype.style.width = 30;
CopyableIconTooltip.prototype.style.height = 30;
CopyableIconTooltip.prototype.attributes.dataBinding = false;
CopyableIconTooltip.prototype.renderContent = function () {
  this.$content = _('CopyableIconTooltip'.toLowerCase());
};
CopyableIconTooltip.prototype.measureMinSize = function () {
  return {
    width: 18,
    height: 18
  };
};
CopyableIconTooltip.prototype.createDataBindingDescriptor = function () {
  var _this = this;
  var thisC = this;
  var o = {};
  Object.defineProperties(o, {
    text: {
      set: function set(value) {
        _this.attributes.text = value;
      },
      get: function get() {
        return _this.attributes.text;
      },
      enumerable: true
    },
    icon: {
      set: function set(value) {
        _this.attributes.icon = value;
      },
      get: function get() {
        return _this.attributes.icon;
      },
      enumerable: true
    }
  });
  return {
    set: function set(value) {
      return Object.assign(0, value);
    },
    get: function get() {
      return o;
    }
  };
};
CopyableIconTooltip.prototype.attributeHandlers.text = {
  set: function set(value) {
    this.$content.value = value;
  },
  get: function get() {
    return this.$content.value;
  },
  descriptor: {
    independence: true,
    type: "text",
    sign: "text"
  },
  "export": function _export() {
    return this.$content.value || undefined;
  }
};
CopyableIconTooltip.prototype.attributeHandlers.tooltip = {
  set: function set(value) {
    this.$content.content = value;
  },
  get: function get() {
    return this.$content.content;
  },
  descriptor: {
    independence: true,
    type: "text",
    "long": true,
    sign: "text"
  },
  "export": function _export() {
    return this.$content.content || undefined;
  }
};
CopyableIconTooltip.prototype.attributeHandlers.icon = {
  set: function set(value) {
    this.$content.icon = value;
  },
  get: function get() {
    return this.$content.icon;
  },
  descriptor: {
    independence: true,
    type: "icon",
    sign: "icon"
  },
  "export": function _export() {
    return this.$content.icon || undefined;
  }
};
_Assembler.AssemblerInstance.addClass(CopyableIconTooltip);
var _default = CopyableIconTooltip;
exports["default"] = _default;

/***/ }),

/***/ 82494:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _datetime = __webpack_require__(58286);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function DateInYearInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(DateInYearInput, _ScalableComponent["default"]);
DateInYearInput.prototype.tag = "DateInYearInput";
DateInYearInput.prototype.menuIcon = "span.mdi.mdi-calendar-today";
DateInYearInput.prototype.SUPPORT_EVENT_NAMES = ['change'];
Object.assign(DateInYearInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(DateInYearInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
DateInYearInput.prototype.style.vAlign = 'center';
DateInYearInput.prototype.style.display = 'inline-block';
DateInYearInput.prototype.attributeHandlers.notNull = {
  set: function set(value) {
    this.domElt.notNull = !!value;
  },
  get: function get() {
    return this.domElt.notNull;
  },
  "export": function _export() {
    return this.domElt.notNull || undefined;
  },
  descriptor: {
    type: 'bool',
    sign: 'value_not_null'
  }
};
DateInYearInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    if (value instanceof Date) this.domElt.value = {
      month: value.getMonth(),
      date: value.getDate()
    };else if (typeof value == 'string' || typeof value == "number") {
      value = new Date(value);
      this.domElt.value = {
        month: value.getMonth(),
        date: value.getDate()
      };
    }
    if (_typeof(value) === 'object') {
      this.domElt.value = value;
    } else {
      value = null;
      this.domElt.value = null;
    }
    var cur = this.domElt.value;
    if (!prev !== !cur || prev && cur && (prev.month !== cur.month || prev.date !== cur.date)) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'DateMonth',
    nullable: true,
    defaultValue: (0, _datetime.beginOfDay)(new Date()),
    sign: 'DateMonth_value'
  }
};
DateInYearInput.prototype.attributeHandlers.format = {
  set: function set(value) {
    this.domElt.format = value || 'dd/MM';
  },
  get: function get() {
    return this.domElt.format;
  },
  descriptor: {
    type: 'enum',
    values: ['dd/MM', 'MM/dd', 'MMM-dd', 'dd tháng MM']
  }
};
DateInYearInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: "DateMonth"
  }
};
DateInYearInput.prototype.render = function () {
  return _('dateinyearinput');
};
DateInYearInput.prototype.style.width = 100;
DateInYearInput.prototype.style.height = 30;
DateInYearInput.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.value = null;
};
DateInYearInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  this.domElt.on('change', this.ev_inputChange.bind(this));
};
DateInYearInput.prototype.measureMinSize = function () {
  return {
    width: 75,
    height: 16
  };
};
DateInYearInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.setAttribute('value', value);
    },
    get: function get() {
      return thisC.getAttribute('value');
    }
  };
};
DateInYearInput.prototype.ev_inputChange = function () {
  this.pinFire('value');
  this.notifyChange();
};
_Assembler.AssemblerInstance.addClass(DateInYearInput);
var _default = DateInYearInput;
exports["default"] = _default;

/***/ }),

/***/ 68452:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _datetime = __webpack_require__(58286);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _DateInput = _interopRequireDefault(__webpack_require__(47156));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var dateKeyOf = function dateKeyOf(date) {
  if (!date) return 'NULL';
  if (date.getTime) return (0, _datetime.beginOfDay)(date).toString();
  return date + '';
};

/***
 * @extends ScalableComponent
 * @constructor
 */
function DateInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(DateInput, _ScalableComponent["default"]);
DateInput.prototype.tag = "DateInput";
DateInput.prototype.menuIcon = "span.mdi.mdi-calendar-edit";
DateInput.prototype.SUPPORT_EVENT_NAMES = ['change'];
Object.assign(DateInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(DateInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
DateInput.prototype.style.vAlign = 'center';
DateInput.prototype.style.display = 'inline-block';
DateInput.prototype.style.width = 150;
DateInput.prototype.style.height = 30;
DateInput.prototype.attributes.value = null;
DateInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prevKey = dateKeyOf(this.domElt.value);
    value = (0, _datetime.implicitDate)(value);
    if (value) value = (0, _datetime.beginOfDay)(value);
    this.domElt.value = value;
    var cur = dateKeyOf(this.domElt.value);
    if (prevKey !== cur) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.view.value;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    // defaultValue: beginOfDay(new Date()),//??
    sign: 'SimpleDate'
  },
  "export": function _export() {
    if (this.domElt.notNull && !this.domElt._value) return undefined; //this is auto, not assign
    var value = this.domElt.value;
    if (!value) return undefined;
    return value;
  }
};
DateInput.prototype.attributeHandlers.min = {
  set: function set(value) {
    value = (0, _datetime.implicitDate)(value);
    this.domElt.min = value;
  },
  get: function get() {
    return this.domElt.min;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    sign: 'date_min'
  },
  "export": function _export() {
    var value = this.domElt.min;
    if (!value) return undefined;
    if ((0, _datetime.compareDate)(value, new Date(1890, 0, 1, 0, 0, 0, 0)) === 0) return undefined;
    return value;
  }
};
DateInput.prototype.attributeHandlers.max = {
  set: function set(value) {
    value = (0, _datetime.implicitDate)(value);
    this.domElt.max = value;
  },
  get: function get() {
    return this.domElt.max;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    sign: 'date_min'
  },
  "export": function _export() {
    var value = this.domElt.max;
    if (!value) return undefined;
    if ((0, _datetime.compareDate)(value, new Date(2090, 0, 1, 0, 0, 0, 0)) === 0) return undefined;
    if (_DateInput["default"]) return value;
  }
};
DateInput.prototype.attributeHandlers.format = {
  set: function set(value) {
    this.domElt.format = value || 'dd/MM/yyyy';
  },
  get: function get() {
    return this.domElt.format;
  },
  descriptor: {
    type: 'enum',
    values: ['dd/MM/yyyy', 'MM/dd/yyyy', 'yyyy/MM/dd', 'dd-MM-yyyy', 'MM-dd-yyyy', 'MM/yyyy', 'MM-yyyy', 'yyyy']
  }
};
DateInput.prototype.attributeHandlers.notNull = {
  set: function set(value) {
    this.domElt.notNull = !!value;
  },
  get: function get() {
    return this.domElt.notNull;
  },
  "export": function _export() {
    return this.domElt.notNull || undefined;
  },
  descriptor: {
    type: 'bool',
    sign: 'value_not_null'
  }
};
DateInput.prototype.pinHandlers.min = {
  receives: function receives(value) {
    this.domElt.min = (0, _datetime.implicitDate)(value);
  },
  descriptor: {
    type: "Date"
  }
};
DateInput.prototype.pinHandlers.max = {
  receives: function receives(value) {
    value = (0, _datetime.implicitDate)(value);
    this.domElt.max = value;
  },
  descriptor: {
    type: "Date"
  }
};
DateInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: "Date"
  }
};
DateInput.prototype.render = function () {
  return _('dateinput');
};
DateInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  this.domElt.on('change', this.ev_inputChange.bind(this));
};
DateInput.prototype.measureMinSize = function () {
  return {
    width: 75,
    height: 16
  };
};
DateInput.prototype.verify = function () {
  if (!this.attributes.required) return {
    completed: true
  };
  var value = this.attributes.value;
  if (value === null) {
    return {
      completed: false,
      comp: this
    };
  }
};
DateInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.setAttribute('value', value);
    },
    get: function get() {
      return thisC.getAttribute('value');
    }
  };
};
DateInput.prototype.ev_inputChange = function () {
  this.pinFire('value');
  this.notifyChange();
};
_Assembler.AssemblerInstance.addClass(DateInput);
var _default = DateInput;
exports["default"] = _default;

/***/ }),

/***/ 83413:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _datetime = __webpack_require__(58286);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _DateNLevelInput = _interopRequireDefault(__webpack_require__(45627));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var dateKeyOf = function dateKeyOf(date) {
  if (!date) return 'NULL';
  if (date.getTime) return (0, _datetime.beginOfDay)(date).toString();
  return date + '';
};

/***
 * @extends ScalableComponent
 * @constructor
 */
function DateNLevelInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(DateNLevelInput, _ScalableComponent["default"]);
DateNLevelInput.prototype.tag = "DateNLevelInput";
DateNLevelInput.prototype.menuIcon = "span.mdi.mdi-calendar-edit";
DateNLevelInput.prototype.SUPPORT_EVENT_NAMES = ['change'];
Object.assign(DateNLevelInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(DateNLevelInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
DateNLevelInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prevKey = dateKeyOf(this.domElt.value);
    value = (0, _datetime.implicitDate)(value);
    if (value) value = (0, _datetime.beginOfDay)(value);
    this.domElt.value = value;
    var cur = dateKeyOf(this.domElt.value);
    if (prevKey !== cur) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.view.value;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    // defaultValue: beginOfDay(new Date()),//??
    sign: 'SimpleDate'
  },
  "export": function _export() {
    if (this.domElt.notNull && !this.domElt._value) return undefined; //this is auto, not assign
    var value = this.domElt.value;
    if (!value) return undefined;
    return value;
  }
};
DateNLevelInput.prototype.attributeHandlers.level = {
  set: function set(value) {
    this.domElt.level = value;
  },
  get: function get() {
    return this.domElt.level;
  },
  "export": function _export() {
    var val = this.domElt.level;
    if (val === 'date') return true;
    return val;
  },
  descriptor: {
    type: "enum",
    values: ['date', 'week', 'month', 'quarter', 'year']
  }
};
DateNLevelInput.prototype.attributeHandlers.min = {
  set: function set(value) {
    this.domElt.min = value;
  },
  get: function get() {
    return this.domElt.min;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    sign: 'date_min'
  },
  "export": function _export() {
    var value = this.domElt.min;
    if (!value) return undefined;
    if ((0, _datetime.compareDate)(value, new Date(1890, 0, 1, 0, 0, 0, 0)) === 0) return undefined;
    return value;
  }
};
DateNLevelInput.prototype.attributeHandlers.max = {
  set: function set(value) {
    value = (0, _datetime.implicitDate)(value);
    this.domElt.max = value;
  },
  get: function get() {
    return this.domElt.max;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    sign: 'date_max'
  },
  "export": function _export() {
    var value = this.domElt.max;
    if (!value) return undefined;
    if ((0, _datetime.compareDate)(value, new Date(2090, 0, 1, 0, 0, 0, 0)) === 0) return undefined;
    return value;
  }
};
DateNLevelInput.prototype.pinHandlers.min = {
  receives: function receives(value) {
    this.attributes.min = value;
  },
  get: function get() {
    return this.domElt.min;
  },
  descriptor: {
    type: "Date"
  }
};
DateNLevelInput.prototype.pinHandlers.max = {
  receives: function receives(value) {
    this.attributes.max = value;
  },
  get: function get() {
    return this.domElt.max;
  },
  descriptor: {
    type: "Date"
  }
};
DateNLevelInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: "Date"
  }
};
DateNLevelInput.prototype.pinHandlers.level = {
  receives: function receives(value) {
    this.attributes.level = value;
  },
  get: function get() {
    return this.domElt.level;
  },
  descriptor: {
    type: "enum",
    values: ['date', 'week', 'month', 'quarter', 'year']
  }
};
DateNLevelInput.prototype.style.vAlign = 'center';
DateNLevelInput.prototype.style.display = 'inline-block';
DateNLevelInput.prototype.style.width = 'auto';
DateNLevelInput.prototype.style.height = 30;
DateNLevelInput.prototype.attributes.value = null;
DateNLevelInput.prototype.render = function () {
  return _({
    tag: _DateNLevelInput["default"]
  });
};
DateNLevelInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  this.domElt.on('change', this.ev_inputChange.bind(this));
};
DateNLevelInput.prototype.measureMinSize = function () {
  return {
    width: 155,
    height: 16
  };
};
DateNLevelInput.prototype.verify = function () {
  if (!this.attributes.required) return {
    completed: true
  };
  var value = this.attributes.value;
  if (value === null) {
    return {
      completed: false,
      comp: this
    };
  }
};
DateNLevelInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      value = value || {
        level: 'date'
      };
      thisC.attributes.level = value.level;
      thisC.attributes.value = value.value;
    },
    get: function get() {
      var value = thisC.attributes.value;
      if (!value) return undefined;
      return {
        level: thisC.attributes.level,
        value: value
      };
    }
  };
};
DateNLevelInput.prototype.ev_inputChange = function () {
  this.pinFire('value');
  this.notifyChange();
};
_Assembler.AssemblerInstance.addClass(DateNLevelInput);
var _default = DateNLevelInput;
exports["default"] = _default;

/***/ }),

/***/ 17902:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _FCore = __webpack_require__(51518);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _stringFormat = __webpack_require__(22294);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function removeTimeFormat(format) {
  if (!format) return null;
  return format.replace(/[hH].+$/g, '');
}

/***
 * @extends ScalableComponent
 * @constructor
 */
function DateTimeInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(DateTimeInput, _ScalableComponent["default"]);
DateTimeInput.prototype.tag = 'DateTimeInput';
DateTimeInput.prototype.menuIcon = 'span.mdi.mdi-calendar-clock';
DateTimeInput.prototype.style.vAlign = 'center';
DateTimeInput.prototype.style.display = 'inline-block';
DateTimeInput.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.style.width = 174;
  this.style.height = 30;
  this.attributes.format = 'dd/MM/yyyy HH:mm';
};
Object.assign(DateTimeInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(DateTimeInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
DateTimeInput.prototype.attributeHandlers.format = {
  set: function set(value) {
    if (value === 'date') value = 'dd/MM/yyyy HH:mm';else if (value === 'datetime') value = 'dd/MM/yyyy HH:mm';
    // console.log(value)
    this.$datetimeInput.format = value;
  },
  get: function get() {
    return this.domElt.format;
  },
  descriptor: {
    type: 'text',
    dependency: ['dateOnly']
  },
  "export": function _export() {
    var value = this.domElt.format;
    if (value === 'dd/MM/yyyy HH:mm') return undefined;
    return value;
  }
};
DateTimeInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.$datetimeInput.value;
    this.$datetimeInput.value = value;
    var cur = this.domElt.value;
    if (!prev !== !cur || prev && cur && prev.getTime() !== cur.getTime()) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'DateTime'
  },
  "export": function _export() {
    return this.value || undefined;
  }
};
DateTimeInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: "Date"
  }
};
DateTimeInput.prototype.pinHandlers.dateOnly = {
  receives: function receives(value) {
    this.attributes.dateOnly = value;
  },
  descriptor: {
    type: "bool"
  }
};
DateTimeInput.prototype.attributeHandlers.dateOnly = {
  set: function set(value) {
    if (value) {
      this.$datetimeInput.format = 'dd/MM/yyyy';
    } else this.$datetimeInput.format = 'dd/MM/yyyy HH:mm';
    var prev = this.$datetimeInput.value;
    var cur = this.domElt.value;
    if (!prev !== !cur || prev && cur && prev.getTime() !== cur.getTime()) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    var format = this.$datetimeInput.format || '';
    var tks = (0, _stringFormat.nonAccentVietnamese)(format).split(/[^A-Za-z0-9]+/);
    return tks.indexOf('H') < 0 && tks.indexOf('h') < 0 && tks.indexOf('HH') < 0 && tks.indexOf('hh') < 0;
  },
  descriptor: {
    type: 'bool'
  }
};
DateTimeInput.prototype.onCreated = function () {
  this.$datetimeInput.on('change', function () {
    this.pinFire('value');
    this.notifyChange();
  }.bind(this));
};
DateTimeInput.prototype.render = function () {
  this.$datetimeInput = (0, _FCore._)({
    tag: 'datetimeinput'
  });
  return this.$datetimeInput;
};
DateTimeInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.attributes.value = value;
    },
    get: function get() {
      return thisC.attributes.value;
    }
  };
};
_Assembler.AssemblerInstance.addClass(DateTimeInput);
var _default = DateTimeInput;
exports["default"] = _default;

/***/ }),

/***/ 37459:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _ComboBox = _interopRequireDefault(__webpack_require__(1956));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function DualComboBox() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(DualComboBox, _ScalableComponent["default"]);
DualComboBox.prototype.tag = "DualComboBox";
DualComboBox.prototype.menuIcon = 'span.mdi.mdi-chevron-double-down';
Object.assign(DualComboBox.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(DualComboBox.prototype.styleHandlers, _InputStyleHandlers["default"]);
DualComboBox.prototype.style.vAlign = 'center';
DualComboBox.prototype.style.display = 'inline-block';
DualComboBox.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = (this.domElt.value || [null, null]).join('/');
    this.domElt.value = value;
    var cur = (this.domElt.value || [null, null]).join('/');
    if (prev !== cur) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  }
};
DualComboBox.prototype.attributeHandlers.searchable = _ComboBox["default"].prototype.attributeHandlers.searchable;
DualComboBox.prototype.attributeHandlers.enableSearch = _ComboBox["default"].prototype.attributeHandlers.enableSearch;
DualComboBox.prototype.attributeHandlers.strictValue = _ComboBox["default"].prototype.attributeHandlers.strictValue;
DualComboBox.prototype.attributeHandlers.treeList = Object.assign({}, _ComboBox["default"].prototype.attributeHandlers.list, {
  set: function set(items) {
    var prev = (this.domElt.value || [null, null]).join('/');
    this.domElt.items = items;
    var cur = (this.domElt.value || [null, null]).join('/');
    if (prev !== cur) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  descriptor: {
    type: 'SelectTreeList'
  },
  "export": function _export() {
    var treeList = this.domElt.items;
    return treeList.map(function copyItem(item) {
      var newItem = {
        value: item.value,
        text: item.text
      };
      if (item.items && item.items.length) newItem.items = item.items.map(copyItem);
      return newItem;
    });
  }
});
DualComboBox.prototype.pinHandlers.treeList = {
  receives: function receives(value) {
    this.attributes.treeList = value;
  },
  descriptor: {
    type: 'SelectTreeList'
  }
};
DualComboBox.prototype.pinHandlers.value = _ComboBox["default"].prototype.pinHandlers.value;
DualComboBox.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
};
DualComboBox.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  var self = this;
  if (!this.domElt.domSignal) {
    this.domElt.$domSignal = _('attachhook').addTo(this.domElt);
    this.domElt.domSignal = new _DomSignal["default"](this.domElt.$domSignal);
  }
  this.domSignal = this.domElt.domSignal;
  this.domSignal.on('pinFireAll', this.pinFireAll.bind(this));
  this.view.on('change', function () {
    self.pinFire('value');
    self.notifyChange();
  });
};
DualComboBox.prototype.render = function () {
  return _('dualselectmenu');
};
DualComboBox.prototype.measureMinSize = function () {
  var minWidthStyle = this.domElt ? parseFloat(this.domElt.getComputedStyleValue('min-width').replace('px')) : 24;
  return {
    width: Math.max(minWidthStyle, 24),
    height: 25
  };
};
DualComboBox.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  var subObj = {};
  Object.defineProperties(subObj, {
    value: {
      configurable: true,
      enumerable: true,
      set: function set(value) {
        thisC.setAttribute('value', value);
      },
      get: function get() {
        return thisC.getAttribute('value');
      }
    },
    treeList: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.getAttribute('treeList');
      },
      set: function set(value) {
        thisC.setAttribute('treeList', value);
      }
    }
  });
  return {
    set: function set(value) {
      Object.assign(subObj, value);
    },
    get: function get() {
      return subObj;
    }
  };
};
_Assembler.AssemblerInstance.addClass(DualComboBox);
var _default = DualComboBox;
exports["default"] = _default;

/***/ }),

/***/ 34847:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _showdown = _interopRequireDefault(__webpack_require__(47127));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _TextStyleHandlers = _interopRequireDefault(__webpack_require__(42702));
var _Assembler = __webpack_require__(2326);
var _Text = _interopRequireDefault(__webpack_require__(36685));
var _SelectListText = _interopRequireDefault(__webpack_require__(72186));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function DualSelectListText() {
  _ScalableComponent["default"].call(this);
  this._items = [];
  this._value = null;
  this._itemByValue = {};
}
(0, _inheritComponentClass["default"])(DualSelectListText, _ScalableComponent["default"]);
DualSelectListText.prototype.tag = "DualSelectListText";
DualSelectListText.prototype.menuIcon = "span.mdi.mdi-format-color-text";
DualSelectListText.prototype.style.vAlign = 'center';
DualSelectListText.prototype.style.display = 'inline-block';
DualSelectListText.prototype.attributeHandlers.items = {
  /***
   * @this DualSelectListText
   * @param items
   */
  set: function set(items) {
    items = items || [];
    this._items = items;
    this._itemByValue = {};
    var dict = this._itemByValue;
    function makeVisit(pre) {
      return function (item) {
        dict[pre + item.value] = item;
        if (item.items && item.items.length > 0) item.items.forEach(makeVisit(pre + item.value + '/'));
      };
    }
    items.forEach(makeVisit(''));
    this._updateText();
  },
  get: function get() {
    return this._items;
  },
  descriptor: {
    type: 'SelectList'
  }
};
DualSelectListText.prototype.attributeHandlers.treeList = {
  set: function set(value) {
    this.attributes.items = value;
  },
  get: function get() {
    return this.attributes.items;
  },
  descriptor: {
    type: 'SelectList'
  }
};
DualSelectListText.prototype.attributeHandlers.list = DualSelectListText.prototype.attributeHandlers.treeList;
DualSelectListText.prototype.attributeHandlers.value = {
  set: function set(value) {
    if (this._value !== value) {
      this._value = value;
      this._updateText();
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    if (!this._itemByValue[this._value] && this._items.length > 0 && this.attributes.strictValue) {
      return this._items[0].value;
    }
    return this._value;
  }
};
Object.assign(DualSelectListText.prototype.styleHandlers, _TextStyleHandlers["default"]);
DualSelectListText.prototype.pinHandlers.value = {
  get: function get() {
    return this.attributes.value;
  },
  receives: function receives(value) {
    this.attributes.value = value;
  },
  descriptor: {
    type: 'number|text'
  }
};
DualSelectListText.prototype.pinHandlers.text = {
  get: function get() {
    return this.domElt.firstChild.firstChild.data;
  },
  descriptor: {
    type: 'text'
  }
};
DualSelectListText.prototype.pinHandlers.items = {
  receives: function receives(value) {
    this.attributes.items = value;
  },
  descriptor: {
    type: 'SelectList'
  }
};
DualSelectListText.prototype.pinHandlers.treeList = DualSelectListText.prototype.pinHandlers.items;
DualSelectListText.prototype.pinHandlers.list = DualSelectListText.prototype.pinHandlers.items;
DualSelectListText.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.text = this.attributes.name;
  this.attributes.textDecode = 'none';
  this.style.font = undefined;
  this.style.fontStyle = undefined;
  this.style.textSize = 0;
  this.style.textAlign = 'left';
  this.style.textColor = 'black';
  this.style.font = 'unset';
};
DualSelectListText.prototype._updateText = function () {
  var value = this.attributes.value || [null, null];
  var prevText = this.domElt.firstChild.firstChild.data;
  var item = this._itemByValue[value[0]];
  var newText = '';
  if (item) newText += item.text;
  item = this._itemByValue[value.join('/')];
  if (item) newText += ', ' + item.text;
  this.domElt.firstChild.firstChild.data = newText;
  if (prevText !== this.domElt.firstChild.firstChild.data) {
    this.pinFire('text');
    this.notifyChange();
  }
};
DualSelectListText.prototype.render = _SelectListText["default"].prototype.render;
DualSelectListText.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  var subObj = {};
  Object.defineProperties(subObj, {
    value: {
      configurable: true,
      enumerable: true,
      set: function set(value) {
        thisC.setAttribute('value', value);
      },
      get: function get() {
        return thisC.getAttribute('value');
      }
    },
    items: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.items;
      },
      set: function set(value) {
        thisC.attributes.items = value;
      }
    },
    list: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.items;
      },
      set: function set(value) {
        thisC.attributes.items = value;
      }
    },
    treeList: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.items;
      },
      set: function set(value) {
        thisC.attributes.items = value;
      }
    }
  });
  return {
    set: function set(value) {
      if (_typeof(value) === "object") {
        Object.assign(subObj, value);
      } else {
        subObj.value = value;
      }
    },
    get: function get() {
      return subObj;
    }
  };
};
_Assembler.AssemblerInstance.addClass(DualSelectListText);
var _default = DualSelectListText;
exports["default"] = _default;

/***/ }),

/***/ 54187:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _Assembler = __webpack_require__(2326);
var _ArrayOfFragment = _interopRequireDefault(__webpack_require__(63650));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
__webpack_require__(33130);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ArrayOfFragment
 * @constructor
 */
function EditableArrayOfFragment() {
  _ArrayOfFragment["default"].call(this);
  this.fragments = [];
  this._makeArray();
}
(0, _inheritComponentClass["default"])(EditableArrayOfFragment, _ArrayOfFragment["default"]);
EditableArrayOfFragment.prototype.tag = "EditableArrayOfFragment";
EditableArrayOfFragment.prototype.menuIcon = "span.mdi.mdi-tray-full";
EditableArrayOfFragment.prototype.render = function () {
  return (0, _FCore._)({
    "class": 'as-editable-array-of-fragment',
    child: ['.as-editable-array-of-fragment-item-list', {
      "class": 'as-editable-array-of-fragment-bottom',
      child: [{
        tag: _FlexiconButton["default"].tag,
        props: {
          text: 'LanguageModule' in window ? LanguageModule.text('txt_add') : 'Add'
        }
      }]
    }]
  });
};
EditableArrayOfFragment.prototype.onCreated = function () {
  this.$list = (0, _FCore.$)('.as-editable-array-of-fragment-item-list', this.domElt);
  this.$addBtn = (0, _FCore.$)('.as-editable-array-of-fragment-bottom .as-flexicon-button', this.domElt).on('click', this.addNewRow.bind(this));
  _ArrayOfFragment["default"].prototype.onCreated.call(this);
};
EditableArrayOfFragment.prototype.getAttributeItemFragmentClassDescriptor = function () {
  return {
    type: 'fragmentClass'
  };
};
EditableArrayOfFragment.prototype._makeArray = function () {
  if (this._dataArr) return;
  var self = this;
  this._dataArr = [];
  this._dataArr.push = function () {
    this.splice.apply(this, [this.length, this.length].concat(Array.prototype.slice.apply(arguments)));
    self.notifyChange();
    return arguments.length;
  };
  var oUnShift = this._dataArr.unshift;
  this._dataArr.unshift = function () {
    var newItems = Array.prototype.slice.call(arguments);
    self.notifyChange();
    return oUnShift.apply(this._array, newItems);
  };
  this._dataArr.pop = function () {
    if (this.length <= 0) return undefined;
    var res = this[this.length - 1];
    this.slice(this.length - 1, this.length);
    self.notifyChange();
    return res;
  };
  this._dataArr.shift = function () {
    if (this.length <= 0) return undefined;
    var res = this[0];
    this.slice(0, 1);
    self.notifyChange();
    return res;
  };
  this._dataArr.splice = function () {
    var start;
    var deleteCount;
    var addedItems;
    if (arguments.length < 1) start = 0;else start = arguments[0];
    if (start < 0) start = this.length - start;
    start = Math.max(0, start);
    if (arguments.length < 2) deleteCount = this.length - start;else deleteCount = arguments[1];
    if (deleteCount < 0) deleteCount = 0;
    deleteCount = Math.min(deleteCount, this.length - start);
    if (arguments.length > 2) addedItems = Array.prototype.slice.call(arguments, 2);else addedItems = [];
    var className = self.getAttribute('itemFragmentClass');
    var newFragments = addedItems.map(function (item) {
      var frag = _Assembler.AssemblerInstance.buildFragment({
        "class": className
      });
      frag.props = item;
      return frag;
    });
    var endCtnElt = self.fragments[start + deleteCount] && self.fragments[start + deleteCount].domElt.parentElement;
    var removedFragments = self.fragments.splice.apply(self.fragments, [start, deleteCount].concat(newFragments));
    removedFragments.forEach(function (frg) {
      self.fragment.removeChild(frg);
      frg.domElt.parentElement.remove();
    });
    newFragments.forEach(function (frg) {
      self.fragment.addChild(frg);
      var itemCtn = (0, _FCore._)({
        "class": 'as-editable-array-of-fragment-item',
        child: [frg.domElt, {
          "class": ['as-editable-array-of-fragment-remove-btn-ctn'],
          child: {
            tag: 'button',
            "class": 'as-from-tool-button',
            child: 'span.mdi.mdi-delete',
            on: {
              click: function click() {
                var eventData = {};
                eventData.type = 'cmd_remove_row';
                var idx = self._dataArr.indexOf(frg.props);
                eventData.rowIdx = idx;
                eventData.accepted = true;
                eventData.accept = function (isAccepted) {
                  this.accepted = isAccepted;
                };
                self.emit(eventData.type, eventData, self);
                if (eventData.accepted && eventData.accepted.then) {
                  eventData.accepted.then(function (isAccept) {
                    if (isAccept) {
                      if (idx >= 0) self._dataArr.splice(idx, 1);
                    }
                  });
                } else if (eventData.accepted) {
                  if (idx >= 0) self._dataArr.splice(idx, 1);
                }
              }
            }
          }
        }]
      });
      if (endCtnElt) self.$list.addChildBefore(itemCtn, endCtnElt);else self.$list.addChild(itemCtn);
    });
    var newBindItems = newFragments.map(function (frg) {
      return frg.props;
    });
    self.notifyChange();
    return Array.prototype.splice.apply(this, [start, deleteCount].concat(newBindItems));
  };
};
EditableArrayOfFragment.prototype.createDataBindingDescriptor = function () {
  var self = this;
  return {
    set: function set(value) {
      value = value || [];
      if (!value.slice) value = [];
      self._dataArr.splice.apply(self._dataArr, [0, self._dataArr.length].concat(value));
    },
    get: function get() {
      return self._dataArr;
    }
  };
};
EditableArrayOfFragment.prototype.addNewRow = function () {
  var eventData = {};
  eventData.type = 'cmd_insert_row';
  eventData.rowIdx = this._dataArr.length;
  eventData.result = {};
  eventData.resolve = function (result) {
    this.result = result;
  };
  var self = this;
  self.emit(eventData.type, eventData, self);
  if (eventData.result) {
    if (eventData.result.then) {
      eventData.result.then(function (result) {
        if (result) {
          self._dataArr.push(result);
        }
      });
    } else {
      self._dataArr.push(eventData.result);
    }
  }
};
_Assembler.AssemblerInstance.addClass(EditableArrayOfFragment);
var _default = EditableArrayOfFragment;
exports["default"] = _default;

/***/ }),

/***/ 38488:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
__webpack_require__(58072);
var _utils = __webpack_require__(84512);
var _Assembler = __webpack_require__(2326);
var _FileInputBox = _interopRequireDefault(__webpack_require__(28794));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function FileInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(FileInput, _ScalableComponent["default"]);
FileInput.prototype.tag = "FileInput";
FileInput.prototype.menuIcon = "span.mdi.mdi-file-plus";
FileInput.prototype.style.vAlign = 'center';
FileInput.prototype.style.display = 'inline-block';
FileInput.prototype.attributes.allowUpload = true;
FileInput.prototype.attributes.removable = true;
FileInput.prototype.attributes.downloadable = true;
FileInput.prototype.render = function () {
  return _({
    tag: _FileInputBox["default"].tag
  });
};
FileInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    this.domElt.value = value;
    if (prev !== this.domElt.value) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: "FileSource",
    sign: 'FileSource'
  },
  "export": function _export() {
    return this.value || undefined;
  }
};
FileInput.prototype.attributeHandlers.fileName = {
  set: function set(value) {
    value = value || null;
    this.domElt.fileName = value;
  },
  get: function get() {
    return this.domElt.fileName;
  },
  descriptor: {
    type: 'text'
  },
  "export": function _export() {}
};
FileInput.prototype.pinHandlers.value = {
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: "FileSource"
  }
};
FileInput.prototype.attributeHandlers.allowUpload = {
  set: function set(value) {
    this.domElt.allowUpload = value;
  },
  get: function get() {
    return this.domElt.allowUpload;
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export() {
    return this.domElt.allowUpload ? undefined : false;
  }
};
FileInput.prototype.attributeHandlers.removable = {
  set: function set(value) {
    this.domElt.removable = value;
  },
  get: function get() {
    return this.domElt.removable;
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export() {
    return this.domElt.removable ? undefined : false;
  }
};
FileInput.prototype.attributeHandlers.downloadable = {
  set: function set(value) {
    this.domElt.downloadable = value;
  },
  get: function get() {
    return this.domElt.downloadable;
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export() {
    return this.domElt.downloadable ? undefined : false;
  }
};
FileInput.prototype.attributeHandlers.accept = {
  set: function set(value) {
    this.domElt.accept = value;
  },
  get: function get() {
    return this.domElt.accept;
  },
  descriptor: {
    type: 'text'
  },
  "export": function _export() {
    return this.domElt.accept || undefined;
  }
};
FileInput.prototype.attributeHandlers.directUpload = {
  descriptor: {
    type: 'bool'
  }
};
FileInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  this.domElt.on('change', function () {
    this.pinFire('value');
    this.notifyChange();
  }.bind(this));
  this.domElt.$input.on('click', function (event) {
    event.preventDefault();
    this.openFileDialog();
  }.bind(this));
};
FileInput.prototype.openFileDialog = function () {
  if (!this.attributes.directUpload && window.contentModule && window.contentModule.chooseFile) {
    window.contentModule.chooseFile({
      accept: this.attributes.accept
    }).then(function (result) {
      if (result && result.length > 0) result = result[0];
      if (result) {
        this.attributes.value = result;
      }
    }.bind(this));
  } else {
    (0, _utils.openFileDialog)({
      accept: this.attributes.accept
    }).then(function (files) {
      if (files && files.length > 0) {
        this.attributes.value = files[0];
      }
    }.bind(this));
  }
};
FileInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.attributes.value = value;
    },
    get: function get() {
      return thisC.attributes.value;
    }
  };
};
_Assembler.AssemblerInstance.addClass(FileInput);
var _default = FileInput;
exports["default"] = _default;

/***/ }),

/***/ 26252:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _InputAttributeHandlers = _interopRequireDefault(__webpack_require__(53165));
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends ScalableComponent
 * @constructor
 */
function FileListInput() {
  _ScalableComponent["default"].call(this);
  this._prevFiles = [];
}
(0, _inheritComponentClass["default"])(FileListInput, _ScalableComponent["default"]);
FileListInput.prototype.tag = 'FileListInput';
FileListInput.prototype.menuIcon = 'span.mdi.mdi-file-multiple-outline';
Object.assign(FileListInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(FileListInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
FileListInput.prototype.style.vAlign = 'center';
FileListInput.prototype.style.display = 'inline-block';
FileListInput.prototype.render = function () {
  var self = this;
  var elt = (0, _FCore._)({
    tag: 'filelistinput',
    props: {
      droppable: false
    },
    on: {
      change: function change() {
        self.pinFire('files');
        self.notifyChange();
      }
    }
  });
  elt.$addedFile.on('click', function (event) {
    if (window.contentModule && window.contentModule.chooseFile && !self.attributes.useSystemDialog) {
      event.preventDefault();
      window.contentModule.chooseFile({
        accept: this.attributes.accept
      }).then(function (result) {
        if (result) {
          if (result instanceof Array) {
            result.forEach(function (it) {
              elt.add(it);
            });
          } else if (result) {
            elt.add(result);
          } else {
            return;
          }
          self.pinFire('files');
          self.notifyChange();
        }
      });
    }
  });
  return elt;
};
FileListInput.prototype.style.height = 100;
FileListInput.prototype.style.width = 100;
FileListInput.prototype.attributeHandlers.files = {
  set: function set(files) {
    files = files || [];
    var changed = this._prevFiles.length !== files.length;
    if (!changed) {
      for (var i = 0; i < this._prevFiles.length && !changed; ++i) {
        if (files[i] === this._prevFiles[i]) changed = true;
      }
    }
    this._prevFiles = files.slice();
    if (changed) {
      this.domElt.files = files;
      this.pinFire('files');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.files;
  },
  descriptor: {
    type: 'file[]'
  }
};
FileListInput.prototype.attributeHandlers.multiple = {
  set: function set(value) {
    this.domElt.multiple = !!value;
  },
  get: function get() {
    return this.domElt.multiple;
  },
  descriptor: {
    type: 'boolean'
  }
};
FileListInput.prototype.attributeHandlers.useSystemDialog = {
  set: function set(value) {
    value = !!value;
    this.domElt.droppable = value;
    return value;
  },
  descriptor: {
    type: 'boolean'
  }
};
FileListInput.prototype.pinHandlers.files = {
  get: function get() {
    return this.attributes.files;
  },
  receives: function receives(files) {
    this.attributes.files = files;
  },
  descriptor: {
    type: 'file[]'
  }
};
FileListInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.attributes.files = value;
    },
    get: function get() {
      return thisC.attributes.files;
    }
  };
};
_Assembler.AssemblerInstance.addClass(FileListInput);
var _default = FileListInput;
exports["default"] = _default;

/***/ }),

/***/ 65661:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _ = _FCore["default"]._;

/**
 * @extends ScalableComponent
 * @constructor
 */
function Image() {
  _ScalableComponent["default"].call(this);
  this.naturalWidth = 0;
  this.naturalHeight = 0;
  this.loadedSync = Promise.resolve([0, 0]);
}
(0, _inheritComponentClass["default"])(Image, _ScalableComponent["default"]);
Image.prototype.tag = "Image";
Image.prototype.menuIcon = "span.mdi.mdi-image-outline";
Image.prototype.style.display = 'inline-block';
Image.prototype.style.vAlign = 'center';
Image.prototype.attributeHandlers.src = {
  set: function set(value) {
    var src;
    if (typeof value === 'string') {
      src = value;
    } else if (value && value.url) {
      src = value.url;
    }
    this.$img.src = src;
    if (value) {
      this.domElt.removeClass('as-empty');
    } else {
      this.domElt.addClass('as-empty');
    }
    return value;
  },
  descriptor: {
    type: "text",
    "long": true,
    sign: 'SimpleUrl'
  },
  "export": function _export(ref) {
    var value = ref.get() || undefined;
    if (value === this.constructor.prototype.attributes.src) value = undefined;
    return value;
  }
};
Image.prototype.attributeHandlers.placeHolder = {
  set: function set(value) {
    if (value !== 'avatar') value = 'default';
    this.domElt.attr('data-place-holder', value);
    return value;
  },
  descriptor: {
    type: 'enum',
    values: ['default', 'avatar']
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value !== 'avatar') value = undefined;
    return value || undefined;
  }
};
Image.prototype.attributeHandlers.naturalSize = {
  descriptor: function descriptor() {
    return {
      type: 'const',
      value: this.loadedSync.then(function (wh) {
        return wh.join(' x ');
      })
    };
  }
};
Image.prototype.pinHandlers.src = {
  receives: function receives(value) {
    this.attributes.src = value;
  }
};
Image.prototype.render = function () {
  var _this = this;
  this.domElt = _({
    "class": ['as-image', 'as-empty'],
    child: 'img'
  });
  this.$img = (0, _FCore.$)('img', this.domElt);
  this.$img.on('load', function () {
    _this.domElt.addStyle('--as-natural-width', _this.$img.naturalWidth + 'px').addStyle('--as-natural-height', _this.$img.naturalHeight + 'px').addStyle('--as-image-ratio', _this.$img.naturalWidth / _this.$img.naturalHeight);
    _this.updateViewStyle();
  });
};
Image.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.setAttribute('src', value);
    },
    get: function get() {
      return thisC.getAttribute('src');
    }
  };
};
_Assembler.AssemblerInstance.addClass(Image);
var _default = Image;
exports["default"] = _default;

/***/ }),

/***/ 28032:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
__webpack_require__(58072);
var _utils = __webpack_require__(84512);
var _Assembler = __webpack_require__(2326);
var _FileInput = _interopRequireDefault(__webpack_require__(38488));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function ImageFileInput() {
  _ScalableComponent["default"].call(this);
  this._imageSrc = undefined;
}
(0, _inheritComponentClass["default"])(ImageFileInput, _ScalableComponent["default"]);
ImageFileInput.prototype.tag = "ImageFileInput";
ImageFileInput.prototype.menuIcon = "span.mdi.mdi-image-plus";
ImageFileInput.prototype.style.vAlign = 'center';
ImageFileInput.prototype.style.display = 'inline-block';
ImageFileInput.prototype._defaultBackgroundImg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiICB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgIDxwYXRoIGZpbGw9IiNhYWFhYWEiIGQ9Ik01LDNBMiwyIDAgMCwwIDMsNVYxOUEyLDIgMCAwLDAgNSwyMUgxNC4wOUMxNC4wMywyMC42NyAxNCwyMC4zNCAxNCwyMEMxNCwxOS4zMiAxNC4xMiwxOC42NCAxNC4zNSwxOEg1TDguNSwxMy41TDExLDE2LjVMMTQuNSwxMkwxNi43MywxNC45N0MxNy43LDE0LjM0IDE4Ljg0LDE0IDIwLDE0QzIwLjM0LDE0IDIwLjY3LDE0LjAzIDIxLDE0LjA5VjVDMjEsMy44OSAyMC4xLDMgMTksM0g1TTE5LDE2VjE5SDE2VjIxSDE5VjI0SDIxVjIxSDI0VjE5SDIxVjE2SDE5WiIgLz4KPC9zdmc+';
ImageFileInput.prototype.attributes.uploadMethol = 'default';
ImageFileInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    var prev = ref.get();
    if (typeof value === 'string') {
      this._imageSrc = value;
    } else if (value instanceof File || value instanceof Blob) {
      this._imageSrc = URL.createObjectURL(value);
    } else if (value && value.url) {
      this._imageSrc = value.url;
    } else {
      this._imageSrc = undefined;
      value = null;
    }
    if (this._imageSrc) {
      this.$img.addStyle('backgroundImage', 'url(' + this._imageSrc + ')');
      this.domElt.addClass('as-has-file');
    } else {
      this.$img.addStyle('backgroundImage', 'url(' + this._defaultBackgroundImg + ')');
      this.domElt.removeClass('as-has-file');
    }
    ref.set(value); //set before send to pin
    if (!value !== !prev || value && prev && value !== prev) {
      this.pinFire('value');
      this.notifyChange();
    }
    return value;
  },
  descriptor: {
    type: "ImageSource",
    sign: 'ImageSource'
  },
  "export": function _export() {
    return this._imageSrc;
  }
};
ImageFileInput.prototype.attributeHandlers.readonly = {
  set: function set(value) {
    return !!value;
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export() {
    return arguments[arguments.length - 1].get() || undefined;
  }
};
ImageFileInput.prototype.styleHandlers.previewSize = {
  set: function set(value) {
    if (!['contain', 'cover'].includes(value)) value = 'contain';
    if (value === 'contain') this.$img.removeStyle('backgroundSize');else this.$img.addStyle('backgroundSize', value);
    return value;
  },
  "export": function _export() {
    var value = arguments[arguments.length - 1];
    return value === 'contain' ? undefined : value;
  },
  descriptor: {
    type: 'enum',
    values: ['contain', 'cover']
  }
};
ImageFileInput.prototype.attributeHandlers.uploadMethol = {
  set: function set(value) {
    if (['default', 'quick', 'browser_file'].indexOf(value) < 0) {
      value = 'default';
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'default') value = undefined;
    return value;
  },
  descriptor: {
    type: 'enum',
    values: ['default', 'quick', 'browser_file']
  }
};
ImageFileInput.prototype.pinHandlers.value = {
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: "ImageFile"
  }
};
ImageFileInput.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.readonly = false;
  this.style.previewSize = 'contain';
  this.attributes.value = null;
};
ImageFileInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  this.domElt.on('click', this.openImageFileDialog.bind(this));
};
ImageFileInput.prototype.openImageFileDialog = function () {
  if (this.attributes.uploadMethol !== 'browser_file' && window.contentModule && window.contentModule.chooseFile) {
    window.contentModule.chooseFile({
      type: "image_file",
      accept: 'image/*',
      hideFinder: this.attributes.uploadMethol === 'quick'
    }).then(function (result) {
      if (result && result.length > 0) result = result[0];
      if (result) {
        this.attributes.value = result;
      }
    }.bind(this));
  } else {
    (0, _utils.openFileDialog)({
      accept: 'image/*'
    }).then(function (files) {
      if (files && files.length > 0) {
        this.attributes.value = files[0];
      }
    }.bind(this));
  }
};
ImageFileInput.prototype.render = function () {
  var res = _({
    "class": 'asf-image-file-input',
    child: [{
      "class": 'asf-image-file-input-img',
      style: {
        backgroundImage: 'url(' + this._defaultBackgroundImg + ')'
      }
    }]
  });
  this.$img = (0, _FCore.$)('.asf-image-file-input-img', res);
  return res;
};
ImageFileInput.prototype.getAcceptsStyleNames = function () {
  return _ScalableComponent["default"].prototype.getAcceptsStyleNames.call(this).concat(['previewSize']);
};
ImageFileInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    set: function set(value) {
      thisC.setAttribute('value', value);
    },
    get: function get() {
      return thisC.getAttribute('value');
    }
  };
};
_Assembler.AssemblerInstance.addClass(ImageFileInput);
var _default = ImageFileInput;
exports["default"] = _default;

/***/ }),

/***/ 31608:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(26189);
var _ContentScalelessComponent = _interopRequireDefault(__webpack_require__(98003));
var _TextStyleHandlers = _interopRequireDefault(__webpack_require__(42702));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Assembler = __webpack_require__(2326);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/***
 * @extends ContentScalelessComponent
 * @constructor
 */
function Label() {
  _ContentScalelessComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(Label, _ContentScalelessComponent["default"]);
Object.assign(Label.prototype.styleHandlers, _TextStyleHandlers["default"]);
Label.prototype.attributeHandlers.text = {
  set: function set(value) {
    value = (value || '') + '';
    this.$content.clearChild().addChild(_({
      text: value
    }));
    return value;
  },
  descriptor: {
    type: "text",
    "long": false,
    sign: "innerText"
  }
};
Label.prototype.tag = "Label";
Label.prototype.menuIcon = 'span.mdi.mdi-label-outline';
Label.prototype.style.display = 'inline-block';
Label.prototype.style.vAlign = 'center';
Label.prototype.style.height = 'auto';
Label.prototype.onCreate = function () {
  _ContentScalelessComponent["default"].prototype.onCreate.call(this);
  this.attributes.text = this.attributes.name;
  this.style.font = undefined;
  this.style.fontStyle = undefined;
  this.style.textSize = 0;
  this.style.textColor = 'black';
  this.attributes.dataBinding = false;
};
Label.prototype.renderContent = function () {
  return _({
    tag: 'label',
    child: {
      text: ''
    }
  });
};
Label.prototype.render = function () {
  _ContentScalelessComponent["default"].prototype.render.call(this);
  this.domElt.addClass('as-label');
};
Label.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    get: function get() {
      return thisC.getAttribute('text');
    },
    set: function set(value) {
      thisC.setAttribute('text', value);
    }
  };
};
Label.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.text = value + '';
  },
  descriptor: {
    type: 'text'
  }
};
_Assembler.AssemblerInstance.addClass(Label);
var _default = Label;
exports["default"] = _default;

/***/ }),

/***/ 97122:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
var _InputAttributeHandlers = _interopRequireDefault(__webpack_require__(53165));
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ScalableComponent
 * @constructor
 */
function LocationInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(LocationInput, _ScalableComponent["default"]);
LocationInput.prototype.menuIcon = 'span.mdi.mdi-map-marker';
LocationInput.prototype.tag = 'LocationInput';
LocationInput.prototype.style.vAlign = 'center';
LocationInput.prototype.style.display = 'inline-block';
LocationInput.prototype.style.width = 232;
LocationInput.prototype.style.height = 30;
Object.assign(LocationInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
Object.assign(LocationInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
LocationInput.prototype.onCreated = function () {
  this.domElt.on('change', function () {
    this.pinFire('value');
    this.notifyChange();
  }.bind(this));
};
LocationInput.prototype.render = function () {
  return (0, _FCore._)({
    tag: 'locationinput'
  });
};
LocationInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    if (prev === value) return;
    this.domElt.value = value;
    this.pinFire('value');
    this.notifyChange();
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'LatLng'
  }
};
Object.assign(LocationInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
LocationInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: 'LatLng'
  } //{latitude: number, longitude: number}
};

LocationInput.prototype.measureMinSize = function () {
  return {
    width: 232,
    height: 30
  };
};
LocationInput.prototype.createDataBindingDescriptor = function () {
  var self = this;
  return {
    set: function set(value) {
      self.attributes.value = value;
    },
    get: function get() {
      return self.attributes.value;
    }
  };
};
_Assembler.AssemblerInstance.addClass(LocationInput);
var _default = LocationInput;
exports["default"] = _default;

/***/ }),

/***/ 68804:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ScalableComponent
 * @constructor
 */
function LocationView() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(LocationView, _ScalableComponent["default"]);
LocationView.prototype.menuIcon = 'span.mdi.mdi-map-legend';
LocationView.prototype.tag = 'LocationView';
LocationView.prototype.style.width = 300;
LocationView.prototype.style.height = 200;
LocationView.prototype.render = function () {
  return (0, _FCore._)({
    tag: 'locationview'
  });
};
LocationView.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    if (!value && !prev === !value) return;
    if (prev && value && typeof prev.latitude === "number" && typeof prev.longitude === "number" && prev.latitude === value.latitude && prev.longitude === value.longitude) return;
    this.domElt.value = value;
    this.notifyChange();
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'LatLng'
  }
};
LocationView.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  descriptor: {
    type: 'LatLng'
  }
};
LocationView.prototype.measureMinSize = function () {
  return {
    width: 232,
    height: 30
  };
};
LocationView.prototype.createDataBindingDescriptor = function () {
  var self = this;
  return {
    set: function set(value) {
      self.attributes.value = value;
    },
    get: function get() {
      return self.attributes.value;
    }
  };
};
_Assembler.AssemblerInstance.addClass(LocationView);
var _default = LocationView;
exports["default"] = _default;

/***/ }),

/***/ 46834:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _datetime = __webpack_require__(58286);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _DateInput = _interopRequireDefault(__webpack_require__(68452));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function MonthInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(MonthInput, _ScalableComponent["default"]);
MonthInput.prototype.tag = "MonthInput";
MonthInput.prototype.menuIcon = "span.mdi.mdi-calendar-month-outline";
MonthInput.prototype.SUPPORT_EVENT_NAMES = ['change'];
Object.assign(MonthInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(MonthInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
MonthInput.prototype.style.vAlign = 'center';
MonthInput.prototype.style.display = 'inline-block';
MonthInput.prototype.attributes.format = 'Tháng MM-yyyy';
MonthInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    if (value instanceof Date) this.domElt.value = value;else if (typeof value == 'string' || typeof value == "number") {
      value = new Date(value);
      this.domElt.value = value;
    } else {
      value = null;
      this.domElt.value = null;
    }
    var cur = this.domElt.value;
    if (!!prev !== !!cur || prev && cur && (0, _datetime.compareDate)(prev, cur) !== 0) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.view.value;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    defaultValue: (0, _datetime.beginOfDay)(new Date()),
    sign: 'SimpleDate'
  }
};
MonthInput.prototype.attributeHandlers.format = {
  set: function set(value) {
    this.domElt.format = value || 'Tháng MM-yyyy';
  },
  get: function get() {
    return this.domElt.format;
  },
  descriptor: {
    type: 'enum',
    values: ['Tháng MM-yyyy', 'MM-yyyy']
  },
  "export": function _export() {
    var val = this.attributes.format;
    if (val === 'Tháng MM-yyyy') return null;
    return val || null;
  }
};
MonthInput.prototype.attributeHandlers.notNull = _DateInput["default"].prototype.attributeHandlers.notNull;
MonthInput.prototype.pinHandlers.min = {
  receives: function receives(value) {
    this.domElt.min = value;
  },
  descriptor: {
    type: "Date"
  }
};
MonthInput.prototype.pinHandlers.max = {
  receives: function receives(value) {
    this.domElt.max = value;
  },
  descriptor: {
    type: "Date"
  }
};
MonthInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: "Date"
  }
};
MonthInput.prototype.render = function () {
  return _('dateinput');
};
MonthInput.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.value = null;
  this.style.width = 100;
  this.style.height = 30;
};
MonthInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  this.domElt.on('change', this.ev_inputChange.bind(this));
};
MonthInput.prototype.measureMinSize = function () {
  return {
    width: 75,
    height: 16
  };
};
MonthInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.attributes.value = value;
    },
    get: function get() {
      return thisC.attributes.value;
    }
  };
};
MonthInput.prototype.ev_inputChange = function () {
  this.pinFire('value');
  this.notifyChange();
};
_Assembler.AssemblerInstance.addClass(MonthInput);
var _default = MonthInput;
exports["default"] = _default;

/***/ }),

/***/ 88759:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _TextStyleHandlers = _interopRequireDefault(__webpack_require__(42702));
var _Assembler = __webpack_require__(2326);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _MultiselectComboBox = _interopRequireDefault(__webpack_require__(62683));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _FCore["default"]._;
function MultiSelectListText() {
  _MultiselectComboBox["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(MultiSelectListText, _MultiselectComboBox["default"]);
MultiSelectListText.prototype.tag = "MultiSelectListText";
MultiSelectListText.prototype.style.border = 'none';
MultiSelectListText.prototype.attributes.readOnly = true;
MultiSelectListText.prototype.attributeHandlers.disabled = {
  set: function set(value) {
    //always false
  },
  get: function get() {
    return false;
  },
  descriptor: {
    type: 'bool',
    hidden: true
  }
};
_Assembler.AssemblerInstance.addClass(MultiSelectListText);
var _default = MultiSelectListText;
/***
 * @extends ScalableComponent
 * @constructor
 */
exports["default"] = _default;
function MultiSelectListTextV0() {
  _ScalableComponent["default"].call(this);
  this._items = [];
  this._value = null;
  this._itemByValue = {};
}
(0, _inheritComponentClass["default"])(MultiSelectListTextV0, _ScalableComponent["default"]);
MultiSelectListTextV0.prototype.tag = "MultiSelectListTextV0";
MultiSelectListTextV0.prototype.menuIcon = "span.mdi.mdi-format-color-text";
MultiSelectListTextV0.prototype.style.vAlign = 'center';
MultiSelectListTextV0.prototype.style.display = 'inline-block';
MultiSelectListTextV0.prototype.height = 'auto';
MultiSelectListTextV0.prototype.attributeHandlers.items = {
  /***
   * @this MultiSelectListTextV0
   * @param items
   */
  set: function set(items) {
    items = items || [];
    this._items = items;
    this._itemByValue = {};
    var dict = this._itemByValue;
    items.forEach(function visit(item) {
      dict[item.value] = item;
      if (item.items && item.items.length > 0) item.items.forEach(visit);
    });
    this._updateText();
  },
  get: function get() {
    return this._items;
  },
  descriptor: {
    type: 'SelectList'
  }
};
MultiSelectListTextV0.prototype.attributeHandlers.treeList = {
  set: function set(value) {
    this.attributes.items = value;
  },
  get: function get() {
    return this.attributes.items;
  },
  descriptor: {
    type: 'SelectList'
  }
};
MultiSelectListTextV0.prototype.attributeHandlers.list = MultiSelectListTextV0.prototype.attributeHandlers.treeList;
MultiSelectListTextV0.prototype.attributeHandlers.values = {
  set: function set(values) {
    if (this._values !== values) {
      this._values = values;
      this._updateText();
      this.pinFire('values');
      this.notifyChange();
    }
  },
  get: function get() {
    return this._values;
  }
};
Object.assign(MultiSelectListTextV0.prototype.styleHandlers, _TextStyleHandlers["default"]);
MultiSelectListTextV0.prototype.pinHandlers.values = {
  get: function get() {
    return this.attributes.values;
  },
  receives: function receives(values) {
    this.attributes.values = values;
  },
  descriptor: {
    type: 'number|text'
  }
};
MultiSelectListTextV0.prototype.pinHandlers.text = {
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'text'
  }
};
MultiSelectListTextV0.prototype.pinHandlers.items = {
  receives: function receives(value) {
    this.attributes.items = value;
  },
  descriptor: {
    type: 'SelectList'
  }
};
MultiSelectListTextV0.prototype.pinHandlers.treeList = MultiSelectListTextV0.prototype.pinHandlers.items;
MultiSelectListTextV0.prototype.pinHandlers.list = MultiSelectListTextV0.prototype.pinHandlers.items;
MultiSelectListTextV0.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.text = this.attributes.name;
  this.attributes.textDecode = 'none';
  this.style.font = undefined;
  this.style.fontStyle = undefined;
  this.style.textSize = 0;
  this.style.textAlign = 'left';
  this.style.textColor = 'black';
  this.style.font = 'unset';
};
MultiSelectListTextV0.prototype._updateText = function () {
  var values = this.attributes.values || [];
  var items = values.map(function (value) {
    return this._itemByValue[value];
  }.bind(this)).filter(function (item) {
    return !!item;
  });
  var newText = items.map(function (item) {
    return item.text;
  }).join('; ');
  var bound = this.domElt.getBoundingClientRect();
  var prevText = this.domElt.value;
  this.domElt.value = newText;
  this.domElt.clearChild().addChild(_({
    text: newText
  }));
  var newBound = this.domElt.getBoundingClientRect();
  if (bound.width !== newBound.width || bound.height !== newBound.height) {
    _ResizeSystem["default"].requestUpdateUpSignal(this.domElt);
  }
  if (prevText !== this.domElt.value) {
    this.pinFire('text');
    this.notifyChange();
  }
  // this.attributes.text = this.attributes.text + '';
};

MultiSelectListTextV0.prototype.render = function () {
  return _('div.as-select-list-text');
};
MultiSelectListTextV0.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  var subObj = {};
  Object.defineProperties(subObj, {
    values: {
      configurable: true,
      enumerable: true,
      set: function set(value) {
        thisC.setAttribute('values', value);
      },
      get: function get() {
        return thisC.getAttribute('values');
      }
    },
    items: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.items;
      },
      set: function set(value) {
        thisC.attributes.items = value;
      }
    },
    list: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.items;
      },
      set: function set(value) {
        thisC.attributes.items = value;
      }
    },
    treeList: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.items;
      },
      set: function set(value) {
        thisC.attributes.items = value;
      }
    }
  });
  return {
    set: function set(value) {
      if (_typeof(value) === "object") {
        Object.assign(subObj, value);
      } else {
        subObj.value = value;
      }
    },
    get: function get() {
      return subObj;
    }
  };
};
_Assembler.AssemblerInstance.addClass(MultiSelectListTextV0);

/***/ }),

/***/ 72555:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _FCore = __webpack_require__(51518);
var _MultiCheckTreeMenu = _interopRequireDefault(__webpack_require__(74934));
var _InputAttributeHandlers = _interopRequireDefault(__webpack_require__(53165));
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _MultiselectComboBoxHandlers = __webpack_require__(2453);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ScalableComponent
 * @constructor
 */
function MultiSelectTreeComboBox() {
  var _this = this;
  _ScalableComponent["default"].apply(this, arguments);
  setTimeout(function () {
    //TODO: better rule
    if (_this.style.width !== 'auto') return;
    var bf = _this.domElt.previousSibling;
    if (!bf || !bf.fmComponent) return;
    var bfComp = bf.fmComponent;
    var subWidth = 0;
    if (bfComp.tag !== 'Label') return;
    if (bfComp.style.hidden === true) return;
    if (typeof bfComp.style.width === "number") {
      subWidth = bfComp.style.width;
      if (typeof bfComp.style.marginRight === "number") {
        subWidth += bfComp.style.marginRight;
      }
    }
    if (subWidth) {
      _this.domElt.style.setProperty('max-width', 'calc(100% - ' + Math.ceil(subWidth) + 'px)');
    }
  }, 10);
}
(0, _inheritComponentClass["default"])(MultiSelectTreeComboBox, _ScalableComponent["default"]);
MultiSelectTreeComboBox.prototype.style.height = 'auto';
MultiSelectTreeComboBox.prototype.tag = 'MultiSelectTreeComboBox';
MultiSelectTreeComboBox.prototype.style.vAlign = 'center';
MultiSelectTreeComboBox.prototype.style.display = 'inline-block';
MultiSelectTreeComboBox.prototype.render = function () {
  return (0, _FCore._)({
    // tag: BrowserDetector.isMobile ? MultiCheckTreeMenuV2 : MultiCheckTreeMenu
    tag: _MultiCheckTreeMenu["default"],
    props: {
      leafOnly: this.opt && this.opt.layoutData && this.opt.layoutData.attributes && this.opt.layoutData.attributes.leafOnly
    }
  });
};
MultiSelectTreeComboBox.prototype.onCreated = function () {
  this.domElt.on('change', function () {
    this.pinFire('values');
    this.pinFire('text');
    this.notifyChange();
  }.bind(this));
};
Object.assign(MultiSelectTreeComboBox.prototype.attributeHandlers, _InputAttributeHandlers["default"], _MultiselectComboBoxHandlers.MultiselectComboBoxAttributeHandlers);
Object.assign(MultiSelectTreeComboBox.prototype.styleHandlers, _InputStyleHandlers["default"]);
Object.assign(MultiSelectTreeComboBox.prototype.pinHandlers, _MultiselectComboBoxHandlers.MultiselectComboBoxPinHandlers);
MultiSelectTreeComboBox.prototype.attributeHandlers.leafOnly = {
  set: function set(value) {
    this.domElt.leafOnly = !!value;
  },
  get: function get() {
    return this.domElt.leafOnly;
  },
  "export": function _export() {
    return this.domElt.leafOnly || undefined;
  },
  descriptor: {
    type: 'bool'
  }
};
MultiSelectTreeComboBox.prototype.attributeHandlers.values = {
  set: function set(values) {
    var prev = this.domElt.values;
    this.domElt.values = values || [];
    var cur = this.domElt.values;
    var changed = prev.length !== cur.length;
    var pDict;
    if (!changed) {
      pDict = prev.reduce(function (ac, cr) {
        ac[cr] = true;
        return ac;
      }, {});
      changed = cur.some(function (val) {
        return !pDict[val];
      });
    }
    if (changed) {
      this.pinFire('values');
      this.pinFire('text');
    }
  },
  get: function get() {
    return this.domElt.values;
  },
  descriptor: {
    type: 'string[]|number[]'
  }
};
MultiSelectTreeComboBox.prototype.pinHandlers.values = {
  receives: function receives(values) {
    this.attributes.values = values || [];
  },
  get: function get() {
    return this.attributes.values;
  },
  descriptor: {
    type: 'string[]|number[]'
  }
};
MultiSelectTreeComboBox.prototype.pinHandlers.list = {
  receives: function receives(items) {
    this.attributes.items = items;
  },
  descriptor: {
    type: 'CheckTreeList'
  }
};
MultiSelectTreeComboBox.prototype.pinHandlers.treeList = MultiSelectTreeComboBox.prototype.pinHandlers.list;
MultiSelectTreeComboBox.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  var subObj = {};
  Object.defineProperties(subObj, {
    values: {
      enumerable: true,
      set: function set(value) {
        thisC.setAttribute('values', value);
      },
      get: function get() {
        return thisC.getAttribute('values');
      }
    },
    list: {
      enumerable: false,
      get: function get() {
        return thisC.getAttribute('list');
      },
      set: function set(value) {
        thisC.setAttribute('list', value);
      }
    },
    treeList: {
      enumerable: false,
      get: function get() {
        return thisC.getAttribute('list');
      },
      set: function set(value) {
        thisC.setAttribute('list', value);
      }
    }
  });
  return {
    set: function set(value) {
      Object.assign(subObj, value);
    },
    get: function get() {
      return subObj;
    }
  };
};
_Assembler.AssemblerInstance.addClass(MultiSelectTreeComboBox);
_Assembler.AssemblerInstance.addClass('MultiCheckTreeComboBox', MultiSelectTreeComboBox);
var _default = MultiSelectTreeComboBox;
exports["default"] = _default;

/***/ }),

/***/ 18378:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _FCore = __webpack_require__(51518);
var _MultiCheckTreeLeafMenu = _interopRequireDefault(__webpack_require__(8306));
var _InputAttributeHandlers = _interopRequireDefault(__webpack_require__(53165));
var _ComboBox = _interopRequireDefault(__webpack_require__(1956));
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _MultiselectComboBoxHandlers = __webpack_require__(2453);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ScalableComponent
 * @constructor
 */
function MultiSelectTreeLeafComboBox() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(MultiSelectTreeLeafComboBox, _ScalableComponent["default"]);
MultiSelectTreeLeafComboBox.prototype.style.height = 'auto';
MultiSelectTreeLeafComboBox.prototype.tag = 'MultiSelectTreeLeafComboBox';
MultiSelectTreeLeafComboBox.prototype.style.vAlign = 'center';
MultiSelectTreeLeafComboBox.prototype.style.display = 'inline-block';
MultiSelectTreeLeafComboBox.prototype.render = function () {
  return (0, _FCore._)({
    tag: _MultiCheckTreeLeafMenu["default"].tag
  });
};
MultiSelectTreeLeafComboBox.prototype.onCreated = function () {
  this.domElt.on('change', function () {
    this.pinFire('values');
    this.pinFire('text');
    this.notifyChange();
  }.bind(this));
};
Object.assign(MultiSelectTreeLeafComboBox.prototype.attributeHandlers, _InputAttributeHandlers["default"], _MultiselectComboBoxHandlers.MultiselectComboBoxAttributeHandlers);
Object.assign(MultiSelectTreeLeafComboBox.prototype.styleHandlers, _InputStyleHandlers["default"]);
Object.assign(MultiSelectTreeLeafComboBox.prototype.pinHandlers, _MultiselectComboBoxHandlers.MultiselectComboBoxPinHandlers);
MultiSelectTreeLeafComboBox.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  var subObj = {};
  Object.defineProperties(subObj, {
    values: {
      enumerable: true,
      set: function set(value) {
        thisC.setAttribute('values', value);
      },
      get: function get() {
        return thisC.getAttribute('values');
      }
    },
    treeList: {
      enumerable: false,
      get: function get() {
        return thisC.getAttribute('list');
      },
      set: function set(value) {
        thisC.setAttribute('list', value);
      }
    }
  });
  return {
    set: function set(value) {
      Object.assign(subObj, value);
    },
    get: function get() {
      return subObj;
    }
  };
};
_Assembler.AssemblerInstance.addClass(MultiSelectTreeLeafComboBox);
var _default = MultiSelectTreeLeafComboBox;
exports["default"] = _default;

/***/ }),

/***/ 62683:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _ComboBox = _interopRequireDefault(__webpack_require__(1956));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _MultiCheckMenu = _interopRequireDefault(__webpack_require__(59346));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _MMultiCheckMenu = _interopRequireDefault(__webpack_require__(87523));
var _MultiselectComboBoxHandlers = __webpack_require__(2453);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function valueListCmp(a, b) {
  var dictA = a.reduce(function (ac, cr) {
    ac[cr] = cr;
    return ac;
  }, {});
  return a.length === b.length && b.every(function (it) {
    return dictA[it] === it;
  });
}

/***
 * @extends ScalableComponent
 * @constructor
 */
function MultiselectComboBox() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(MultiselectComboBox, _ScalableComponent["default"]);
MultiselectComboBox.prototype.style.height = 'auto';
MultiselectComboBox.prototype.tag = 'MultiselectComboBox';
MultiselectComboBox.prototype.menuIcon = 'span.mdi.mdi-format-list-checkbox';
MultiselectComboBox.prototype.style.vAlign = 'center';
MultiselectComboBox.prototype.style.display = 'inline-block';
MultiselectComboBox.prototype.render = function () {
  //var tag = BrowserDetector.isMobile? MMultiCheckMenu.tag: MultiCheckMenu.tag;
  return (0, _FCore._)({
    tag: _MultiCheckMenu["default"].tag //tag
  });
};

MultiselectComboBox.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.style.height = 'auto';
  this.style.width = 100;
};
MultiselectComboBox.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  var self = this;
  if (!this.domElt.domSignal) {
    this.domElt.$domSignal = (0, _FCore._)('attachhook').addTo(this.domElt);
    this.domElt.domSignal = new _DomSignal["default"](this.domElt.$domSignal);
  }
  /***
   * @type DomSignal
   */
  this.domSignal = this.domElt.domSignal;
  this.domSignal.on('pinFireAll', this.pinFireAll.bind(this));
  this.domElt.on('change', function () {
    self.pinFire('values');
    self.pinFire('text');
    self.notifyChange();
  });
};
Object.assign(MultiselectComboBox.prototype.attributeHandlers, _InputAttributeHandlers["default"], _MultiselectComboBoxHandlers.MultiselectComboBoxAttributeHandlers);
Object.assign(MultiselectComboBox.prototype.pinHandlers, _MultiselectComboBoxHandlers.MultiselectComboBoxPinHandlers);
Object.assign(MultiselectComboBox.prototype.styleHandlers, _InputStyleHandlers["default"]);
MultiselectComboBox.prototype.measureMinSize = function () {
  var minWidthStyle = this.domElt ? parseFloat(this.domElt.getComputedStyleValue('min-width').replace('px')) : 24;
  return {
    width: Math.max(minWidthStyle, 24),
    height: 30
  };
};
MultiselectComboBox.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  var subObj = {};
  Object.defineProperties(subObj, {
    values: {
      enumerable: true,
      set: function set(value) {
        thisC.setAttribute('values', value);
      },
      get: function get() {
        return thisC.getAttribute('values');
      }
    },
    list: {
      enumerable: false,
      get: function get() {
        return thisC.getAttribute('list');
      },
      set: function set(value) {
        thisC.setAttribute('list', value);
      }
    }
  });
  return {
    set: function set(value) {
      Object.assign(subObj, value);
    },
    get: function get() {
      return subObj;
    }
  };
};
_Assembler.AssemblerInstance.addClass(MultiselectComboBox);
_Assembler.AssemblerInstance.addClass('MultiselectCombobox', MultiselectComboBox);
_Assembler.AssemblerInstance.addClass('MultiSelectCombobox', MultiselectComboBox);
var _default = MultiselectComboBox;
exports["default"] = _default;

/***/ }),

/***/ 53422:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _utils = __webpack_require__(84512);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function NumberInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(NumberInput, _ScalableComponent["default"]);
NumberInput.prototype.tag = "NumberInput";
NumberInput.prototype.menuIcon = 'span.mdi.mdi-numeric-2-box-outline';
NumberInput.prototype.SUPPORT_ATTRIBUTE_NAMES = ['value'];
NumberInput.prototype.SUPPORT_EVENT_NAMES = ['change'];
NumberInput.prototype.attributes.floatFixed = 'auto';
NumberInput.prototype.style.vAlign = 'center';
NumberInput.prototype.style.display = 'inline-block';
NumberInput.prototype.style.textAlign = 'default';
Object.assign(NumberInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(NumberInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
NumberInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    this.domElt.value = value;
    if (prev !== this.domElt.value) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: function descriptor() {
    return {
      type: "number",
      max: this.attributes.max,
      min: this.attributes.min
    };
  }
};
NumberInput.prototype.attributeHandlers.min = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) value = -Infinity;
    this.domElt.min = value;
  },
  get: function get() {
    return this.domElt.min;
  },
  descriptor: function descriptor() {
    return {
      type: "number",
      nullable: true,
      defaultValue: -1e12
    };
  },
  "export": function _export() {
    var value = this.attributes.min;
    if (value === -Infinity) return undefined;
    return value;
  }
};
NumberInput.prototype.attributeHandlers.max = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) value = Infinity;
    this.domElt.max = value;
  },
  get: function get() {
    return this.domElt.max;
  },
  descriptor: function descriptor() {
    return {
      type: "number",
      nullable: true,
      defaultValue: 1e12
    };
  },
  "export": function _export() {
    var value = this.attributes.max;
    if (value === Infinity) return undefined;
    return value;
  }
};
NumberInput.prototype.attributeHandlers.floatFixed = {
  set: function set(value) {
    if (value !== 'auto' && !(value >= 0 && value < 20)) value = 'auto';
    this.domElt.floatFixed = value === 'auto' ? null : value;
    return value;
  },
  descriptor: {
    type: "enum",
    values: ['auto', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
  },
  "export": function _export() {
    var value = this.attributes.floatFixed;
    if (value !== 'auto' && !(value >= 0 && value < 20)) value = undefined;
    return value;
  }
};
NumberInput.prototype.attributeHandlers.step = {
  set: function set(value) {
    this.domElt.step = value;
  },
  get: function get() {
    return this.domElt.step;
  },
  descriptor: {
    type: 'number',
    min: 0
  },
  "export": function _export() {
    var value = this.domElt.step;
    if (value === 1) return undefined;
    return value;
  }
};
NumberInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'number'
  }
};
NumberInput.prototype.pinHandlers.min = {
  receives: function receives(value) {
    this.attributes.min = value;
  },
  descriptor: {
    type: 'number'
  }
};
NumberInput.prototype.pinHandlers.max = {
  receives: function receives(value) {
    this.attributes.max = value;
  },
  descriptor: {
    type: 'number'
  }
};
NumberInput.prototype.pinHandlers.userModified = {
  get: function get() {
    return true;
  }
};
NumberInput.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
};
NumberInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  var self = this;
  this.domElt.on('change', function (event) {
    self.pinFire('userModified');
    self.pinFire('value');
    self.notifyChange();
  });
  this.view._debug = true;
};
NumberInput.prototype.render = function () {
  return _('numberinput');
};
NumberInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.setAttribute('value', value);
    },
    get: function get() {
      return thisC.getAttribute('value');
    }
  };
};
_Assembler.AssemblerInstance.addClass(NumberInput);
var _default = NumberInput;
exports["default"] = _default;

/***/ }),

/***/ 57031:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(26189);
var _ContentScalelessComponent = _interopRequireDefault(__webpack_require__(98003));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Checkbox = _interopRequireDefault(__webpack_require__(29370));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;
function Radio() {
  _ContentScalelessComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(Radio, _ContentScalelessComponent["default"]);
Radio.prototype.tag = "Radio";
Radio.prototype.menuIcon = "span.mdi.mdi-radiobox-marked";
Object.assign(Radio.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Radio.prototype.style.vAlign = 'center';
Radio.prototype.style.display = 'inline-block';
Radio.prototype.attributeHandlers.checked = {
  set: function set(value) {
    var prev = this.$content.checked;
    this.$content.checked = !!value;
    if (prev !== this.$content.checked && this.fragment) {
      this.fragment.emittor.emit('radio.' + this.attributes.name, {
        target: this,
        checked: this.$content.checked,
        value: this.attributes.value
      });
    }
  },
  get: function get() {
    return this.$content.checked;
  },
  descriptor: {
    type: "bool"
  }
};

// after fragment complete created, do not change groupName, it make the disembark work incorrectly
Radio.prototype.attributeHandlers.groupName = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    var prev = ref.get();
    value = (value || '') + '';
    if (this.fragment) this.$content.name = this.fragment.id + value;else this.$content.name = value;
    this._assignToFragment(prev, value);
    if (value !== prev) this.unbindDataInFragment();
    ref.set(value);
    if (value !== prev) this.bindDataToFragment();
    return value;
  },
  descriptor: {
    type: "text",
    regex: /[a-zA-Z0-9_\-]+/,
    sign: "RadioGroupIndent",
    independence: true
  },
  "export": function _export() {
    var value = this.attributes.groupName || '';
    if (value === '') return undefined;
    return value;
  }
};
Radio.prototype.attributeHandlers.value = {
  set: function set(value) {
    this.$content.value = value;
  },
  get: function get() {
    return this.$content.value;
  },
  descriptor: {
    type: "text",
    sign: "RadioValue",
    independence: true
  }
};
Radio.prototype.attributeHandlers.disabled = _Checkbox["default"].prototype.attributeHandlers.disabled;
Radio.prototype.onCreate = function () {
  _ContentScalelessComponent["default"].prototype.onCreate.call(this);
  this.style.width = 18;
  this.style.height = 18;
  this.style.vAlign = 'top';
  this.style.hAlign = 'left';
  this.style.textHAlign = 'center';
  this.style.textVAlign = 'center';
  this.attributes.checked = false;
  this.attributes.value = '';
  this.attributes.groupName = 'Radio_group_' + this.constructor.count;
};
Radio.prototype.onCreated = function () {
  _ContentScalelessComponent["default"].prototype.onCreated.call(this);
  this.$content.on('change', function () {
    if (this.fragment) {
      this.fragment.emittor.emit('radio.' + this.attributes.groupName, {
        target: this,
        checked: this.$content.checked,
        value: this.attributes.value
      });
      this.notifyChange();
    }
  }.bind(this));
};
Radio.prototype.renderContent = function () {
  return _('radiobutton');
};
Radio.prototype.notifyChange = function () {
  var bounded;
  if (this.attributes.dataBinding && this.fragment) {
    bounded = this.fragment.boundProps[this.attributes.name];
    if (bounded) {
      if (bounded === this || bounded.indexOf && bounded.indexOf(this) >= 0) {
        this.fragment.notifyPropsChange({
          name: this.attributes.groupName
        });
      }
    }
  }
};
Radio.prototype.setStyleWidth = function (value) {
  value = value >= 18 ? value : 18;
  return _ContentScalelessComponent["default"].prototype.setStyleWidth.call(this, value);
};
Radio.prototype.setStyleHeight = function (value) {
  value = value >= 18 ? value : 18;
  return _ContentScalelessComponent["default"].prototype.setStyleHeight.call(this, value);
};
Radio.prototype.setAttributeGroupName = function (value) {
  this.$content.attr('name', value);
  return value;
};
Radio.prototype.measureMinSize = function () {
  return {
    width: 18,
    height: 18
  };
};
Radio.prototype._assignToFragment = function (oldGName, newGName) {
  if (!this.fragment) return;
  this.fragment.__radio_assigned__ = this.fragment.__radio_assigned__ || {};
  var assigned = this.fragment.__radio_assigned__;
  var list = assigned[oldGName];
  var idx = -1;
  if (list) {
    idx = list.indexOf(this);
  }
  if (idx >= 0) {
    list.splice(idx, 1);
  }
  list = assigned[newGName];
  if (!list) {
    list = [];
    assigned[newGName] = list;
  }
  list.push(this);
};
Radio.prototype.bindDataToFragment = function () {
  if (!this.fragment) return;
  var obj = this.fragment.props;
  var assigned = this.fragment.__radio_assigned__;
  if (!assigned) return;
  var groupName = this.attributes.groupName;
  var list = assigned[groupName];
  if (!list) return; // not assigned yet
  if (!obj.hasOwnProperty(groupName)) {
    Object.defineProperty(obj, groupName, {
      enumerable: !this.attributes.disembark,
      configurable: true,
      set: function set(value) {
        var tempList = list.slice();
        var radio;
        for (var i = 0; i < list.length; ++i) {
          radio = tempList[i];
          if (radio.attributes.value === value) {
            radio.attributes.checked = false;
          }
        }
      },
      get: function get() {
        var tempList = list.slice();
        var radio;
        for (var i = 0; i < list.length; ++i) {
          radio = tempList[i];
          if (radio.attributes.checked) {
            return radio.attributes.value;
          }
        }
      }
    });
  }
};
Radio.prototype.unbindDataInFragment = function () {
  if (!this.fragment) return;
  var obj = this.fragment.props;
  var assigned = this.fragment.__radio_assigned__;
  if (!assigned) return;
  var groupName = this.attributes.groupName;
  var list = assigned[groupName];
  if (!list) return; // not assigned yet
  if (list.length === 1 && list[0] === this) {
    delete obj[groupName];
  }
};
_Assembler.AssemblerInstance.addClass(Radio);
var _default = Radio;
exports["default"] = _default;

/***/ }),

/***/ 72186:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _TextStyleHandlers = _interopRequireDefault(__webpack_require__(42702));
var _Assembler = __webpack_require__(2326);
var _ComboBox = _interopRequireDefault(__webpack_require__(1956));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function SelectListText() {
  _ScalableComponent["default"].call(this);
  this._items = [];
  this._value = null;
  this._itemByValue = {};
}
(0, _inheritComponentClass["default"])(SelectListText, _ScalableComponent["default"]);
SelectListText.prototype.tag = "SelectListText";
SelectListText.prototype.menuIcon = "span.mdi.mdi-format-color-text";
SelectListText.prototype.style.vAlign = 'center';
SelectListText.prototype.style.display = 'inline-block';
SelectListText.prototype.attributeHandlers.items = {
  /***
   * @this SelectListText
   * @param items
   */
  set: function set(items) {
    items = items || [];
    this._items = items;
    this._itemByValue = {};
    var dict = this._itemByValue;
    items.forEach(function visit(item) {
      dict[item.value] = item;
      if (item.items && item.items.length > 0) item.items.forEach(visit);
    });
    this._updateText();
    this.notifyUnion();
  },
  get: function get() {
    return this._items;
  },
  descriptor: {
    type: 'SelectList'
  }
};
SelectListText.prototype.attributeHandlers.treeList = {
  set: function set(value) {
    this.attributes.items = value;
  },
  get: function get() {
    return this.attributes.items;
  },
  descriptor: {
    type: 'SelectList'
  }
};
SelectListText.prototype.attributeHandlers.list = SelectListText.prototype.attributeHandlers.treeList;
SelectListText.prototype.attributeHandlers.value = {
  set: function set(value) {
    if (this._value !== value) {
      this._value = value;
      this._updateText();
      this.notifyUnion();
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    if (!this._itemByValue[this._value] && this._items.length > 0 && this.attributes.strictValue) {
      return this._items[0].value;
    }
    return this._value;
  }
};
Object.assign(SelectListText.prototype.styleHandlers, _TextStyleHandlers["default"]);
SelectListText.prototype.pinHandlers.value = {
  get: function get() {
    return this.attributes.value;
  },
  receives: function receives(value) {
    this.attributes.value = value;
  },
  descriptor: {
    type: 'number|text'
  }
};
SelectListText.prototype.pinHandlers.text = {
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: 'text'
  }
};
SelectListText.prototype.pinHandlers.items = {
  receives: function receives(value) {
    this.attributes.items = value;
  },
  descriptor: {
    type: 'SelectList'
  }
};
SelectListText.prototype.pinHandlers.treeList = SelectListText.prototype.pinHandlers.items;
SelectListText.prototype.pinHandlers.list = SelectListText.prototype.pinHandlers.items;
SelectListText.prototype.pinHandlers.onClick = {
  get: function get() {
    return true;
  }
};
SelectListText.prototype.style.textAlign = 'left';
SelectListText.prototype.style.textAlign = 'none';
SelectListText.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.text = this.attributes.name;
};
SelectListText.prototype._updateText = function () {
  var item = this._itemByValue[this.attributes.value];
  var prevText = this.domElt.firstChild.firstChild.data;
  if (item) {
    this.domElt.firstChild.firstChild.data = item.text;
  } else {
    this.domElt.firstChild.firstChild.data = '';
  }
  if (prevText !== this.domElt.firstChild.firstChild.data) {
    this.pinFire('text');
    this.notifyChange();
  }
  // this.attributes.text = this.attributes.text + '';
};

SelectListText.prototype.render = function () {
  return _({
    "class": 'as-select-list-text',
    child: {
      tag: 'span',
      "class": 'fd-text-ctn',
      child: {
        text: ''
      }
    }
  }).on('click', function () {
    this.pinFire('onClick');
  }.bind(this));
};
SelectListText.prototype.notifyUnion = _ComboBox["default"].prototype.notifyUnion;
SelectListText.prototype.onResume = function () {
  _ScalableComponent["default"].prototype.onResume.apply(this, arguments);
  this.notifyUnion();
};
SelectListText.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  var subObj = {};
  Object.defineProperties(subObj, {
    value: {
      configurable: true,
      enumerable: true,
      set: function set(value) {
        thisC.setAttribute('value', value);
      },
      get: function get() {
        return thisC.getAttribute('value');
      }
    },
    items: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.items;
      },
      set: function set(value) {
        thisC.attributes.items = value;
      }
    },
    list: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.items;
      },
      set: function set(value) {
        thisC.attributes.items = value;
      }
    },
    treeList: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.items;
      },
      set: function set(value) {
        thisC.attributes.items = value;
      }
    }
  });
  return {
    set: function set(value) {
      if (_typeof(value) === "object") {
        Object.assign(subObj, value);
      } else {
        subObj.value = value;
      }
    },
    get: function get() {
      return subObj;
    }
  };
};
_Assembler.AssemblerInstance.addClass(SelectListText);
var _default = SelectListText;
exports["default"] = _default;

/***/ }),

/***/ 53968:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _stringGenerate = __webpack_require__(10713);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;
function Table() {
  _ScalableComponent["default"].call(this);
}
Object.defineProperties(Table.prototype, Object.getOwnPropertyDescriptors(_ScalableComponent["default"].prototype));
Table.prototype.constructor = Table;
Table.prototype.tag = "Table";
Table.prototype.menuIcon = "span.mdi.mdi-table-large";
Table.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.header = this.attributes.header || [(0, _stringGenerate.randomPhrase)(10), (0, _stringGenerate.randomPhrase)(10), (0, _stringGenerate.randomPhrase)(10)];
  this.attributes.body = this.attributes.body || [[(0, _stringGenerate.randomPhrase)(10), (0, _stringGenerate.randomPhrase)(10), (0, _stringGenerate.randomPhrase)(10)], [(0, _stringGenerate.randomPhrase)(10), (0, _stringGenerate.randomPhrase)(10), (0, _stringGenerate.randomPhrase)(10)], [(0, _stringGenerate.randomPhrase)(10), (0, _stringGenerate.randomPhrase)(10), (0, _stringGenerate.randomPhrase)(10)]];
  this.style.height = 100;
  this.style.width = 300;
};

// Table.prototype.onCreated = function () {
//     ScalableComponent.prototype.onCreate.call(this);
// }

Table.prototype.render = function () {
  this.$table = _({
    tag: 'table',
    "class": 'as-inner-table',
    child: ['thead', 'tbody']
  });
  return _({
    tag: 'tablescroller',
    child: this.$table,
    props: {
      fixedCol: 0
    }
  });
};
Table.prototype.setStyle = function () {
  var res = _ScalableComponent["default"].prototype.setStyle.apply(this, arguments);
  return res;
};
Table.prototype.getAttributeHeaderDescriptor = function () {
  return {
    type: "array"
  };
};
Table.prototype.getAttributeBodyDescriptor = function () {
  return {
    type: "array2d"
  };
};
Table.prototype.getAttributeFixedColDescriptor = function () {
  return {
    type: "number",
    min: 0,
    max: Infinity
  };
};
Table.prototype.setAttributeHeader = function (header) {
  if (!(header.length > 0)) {
    header = ["Data Error"];
  }
  var headerElt = $('thead', this.$table).clearChild();
  headerElt.clearChild();
  var rowElt = _('tr');
  var cellElt;
  for (var i = 0; i < header.length; ++i) {
    cellElt = _({
      tag: 'th',
      child: {
        text: header[i] + ''
      }
    });
    rowElt.addChild(cellElt);
  }
  headerElt.addChild(rowElt);
  this.view._updateContent();
  return header;
};
Table.prototype.setAttributeBody = function (body) {
  if (!(body.length > 0)) {
    body = [["Data Error"]];
  }
  var bodyElt = $('tbody', this.$table).clearChild();
  var rowElt;
  // var cellElt;
  var row, cell;
  for (var i = 0; i < body.length; ++i) {
    row = body[i];
    rowElt = _('tr').addTo(bodyElt);
    for (var j = 0; j < row.length; ++j) {
      cell = row[j];
      _({
        tag: 'td',
        child: {
          text: cell + ''
        }
      }).addTo(rowElt);
    }
  }
  this.view._updateContent();
  return body;
};
Table.prototype.setAttributeFixedCol = function (value) {
  if (value >= 0) {} else {
    value = 0;
  }
  this.view.fixedCol = value;
  return value;
};
var _default = Table;
exports["default"] = _default;

/***/ }),

/***/ 39215:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _TableEditor = _interopRequireDefault(__webpack_require__(79470));
var _FCore = __webpack_require__(51518);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Assembler = __webpack_require__(2326);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _FormArrayEditor = _interopRequireDefault(__webpack_require__(490));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ScalableComponent
 * @constructor
 */
function TableInput(opt) {
  var appearance = opt.layoutData && opt.layoutData.attributes && opt.layoutData.attributes.appearance;
  appearance = appearance || 'sheet';
  this.ctnElt = (0, _FCore._)('div.as-base-component');
  var clazz = appearance === 'sheet' ? _TableEditor["default"] : _FormArrayEditor["default"];
  this.attributes = Object.assign({}, this.attributes, {
    appearance: appearance
  });
  this.editor = new clazz({
    elt: this.ctnElt
  });
  this.editor.getView();
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(TableInput, _ScalableComponent["default"]);
TableInput.prototype.tag = 'TableInput';
TableInput.prototype.menuIcon = 'span.mdi.mdi-table-edit';
TableInput.prototype.style.vAlign = 'top';
TableInput.prototype.style.display = 'inline-block';
TableInput.prototype.attributes.appearance = 'sheet';
TableInput.prototype.render = function () {
  return this.ctnElt;
};
TableInput.prototype.focusIncompleteCell = function () {
  if (this._incompleteCell) this.editor.focusIncompleteCell();
};

/***
 *
 * @return {FmVerifyInfo}
 */
TableInput.prototype.verify = function () {
  /***
   *
   * @type {FmVerifyInfo}
   */
  var result = {
    comp: this,
    completed: true
  };
  if (this.editor.tableData) {
    this._incompleteCell = this.editor.tableData.findFirsIncompleteCell();
    if (this._incompleteCell) {
      result.completed = false;
      result.incompleteCell = this._incompleteCell;
      this.pinFire('incomplete');
    } else {}
  }
  return result;
};
TableInput.prototype.styleHandlers.maxHeight = {
  set: function set(value) {
    if (!(value > 0 && value < Infinity)) value = null;
    if (value) {
      this.domElt.addStyle('max-height', value + 'px');
    } else {
      this.domElt.removeStyle('max-height');
    }
    return value;
  },
  "export": function _export() {
    var ref = arguments[arguments.length - 1];
    var value = ref.get();
    if (value) return value;
    return undefined;
  },
  descriptor: {
    type: 'LengthInPixel'
  }
};
TableInput.prototype.styleHandlers.rowHeight = {
  set: function set(value) {
    var _this = this;
    value = parseFloat(value + '');
    if (!(0, _utils.isRealNumber)(value)) value = 21;
    if (value <= 0) value = 21;
    if (this.editor.tableData && this.editor.tableData.config) this.editor.tableData.config.rowHeight = value;else {
      this.domElt.addStyle('--row-height', value + 'px');
    }
    var td = (0, _FCore.$)('tr td', this.elt);
    _ResizeSystem["default"].updateUp(td || this.domElt);
    setTimeout(function () {
      _ResizeSystem["default"].updateUp(td || _this.domElt);
    }, 10);
    setTimeout(function () {
      _ResizeSystem["default"].requestUpdateSignal();
    }, 20);
    return value;
  },
  get: function get(ref) {
    var value = ref.get();
    if (!(0, _utils.isRealNumber)(value) || value <= 0) return 21;
    return value;
  },
  "export": function _export() {
    var value = this.style.rowHeight;
    if (value === 21) return undefined;
    return value;
  },
  descriptor: {
    type: 'number',
    min: 21
  }
};
TableInput.prototype.getAcceptsStyleNames = function () {
  return _ScalableComponent["default"].prototype.getAcceptsStyleNames.call(this).concat(['maxHeight']);
};
TableInput.prototype.attributeHandlers.propertyNames = {
  set: function set(value) {
    this._dataFlushed = false;
    this._requestUpdateContent();
    return value;
  }
  // get: function () {
  //     var ref = arguments[arguments.length - 1];
  //     if (this._dataFlushed) {
  //         return this.editor.tableData.propertyNames;
  //     }
  //     else {
  //         return ref.get();
  //     }
  // }
};

TableInput.prototype.attributeHandlers.propertyDescriptors = {
  set: function set(value) {
    this._dataFlushed = false;
    this._requestUpdateContent();
    return value;
  }
  // get: function () {
  //     var ref = arguments[arguments.length - 1];
  //     if (this._dataFlushed) {
  //         return this.editor.tableData.propertyDescriptors;
  //     }
  //     else {
  //         return ref.get();
  //     }
  // }
};

TableInput.prototype.attributeHandlers.config = {
  set: function set(value) {
    this._dataFlushed = false;
    this._requestUpdateContent();
    return value;
  },
  get: function get() {
    var ref = arguments[arguments.length - 1];
    if (this._dataFlushed && this.editor.tableData) {
      return this.editor.tableData.config;
    } else {
      return ref.get();
    }
  },
  "export": function _export() {
    return Object.assign({}, this.attributes.config);
  }
};
TableInput.prototype.attributeHandlers.records = {
  set: function set(value) {
    value = value || [];
    this._dataFlushed = false;
    this._requestUpdateContent();
    return value;
  },
  get: function get() {
    var ref = arguments[arguments.length - 1];
    if (this.attributes.appearance !== 'form' && this._dataFlushed && this.editor.tableData && this.editor.tableData["export"]) {
      return this.editor.tableData["export"]().records;
    } else {
      return ref.get();
    }
  }
};
TableInput.prototype.pinHandlers.records = {
  receives: function receives(value) {
    this.attributes.records = value;
  },
  get: function get() {
    return this.attributes.records;
  },
  descriptor: {
    type: 'object[]'
  }
};
TableInput.prototype.pinHandlers.verify = {
  /***
   * @this TableInput
   * @param value
   */
  receives: function receives(value) {
    if (value) this.verify();
  },
  descriptor: {
    type: 'bool'
  }
};
TableInput.prototype.pinHandlers.incomplete = {
  get: function get() {
    return this._incompleteCell;
  },
  descriptor: {
    type: 'bool'
  }
};
TableInput.prototype.pinHandlers.focusIncompleteCell = {
  /***
   * @this TableInput
   * @param value
   */
  receives: function receives(value) {
    if (value) {
      this.editor.focusIncompleteCell();
    }
  },
  descriptor: {
    type: 'bool'
  }
};
TableInput.prototype.attributeHandlers.readOnly = {
  set: function set(value) {
    this.editor.opt.readOnly = !!value;
  },
  get: function get() {
    return this.editor.opt.readOnly;
  },
  "export": function _export() {
    return this.editor.opt.readOnly ? true : undefined;
  },
  descriptor: {
    type: 'bool'
  }
};
TableInput.prototype.attributeHandlers.headless = {
  set: function set(value) {
    this.editor.opt.headless = !!value;
  },
  get: function get() {
    return this.editor.opt.headless;
  },
  "export": function _export() {
    return this.editor.opt.headless ? true : undefined;
  },
  descriptor: {
    type: 'bool'
  }
};
TableInput.prototype.attributeHandlers.disabled = {
  set: function set(value) {
    this.editor.opt.readOnly = !!value;
  },
  get: function get() {
    return this.editor.opt.readOnly;
  },
  "export": function _export() {
    return this.editor.opt.readOnly ? true : undefined;
  },
  descriptor: {
    type: 'bool',
    hidden: true
  }
};
TableInput.prototype.attributeHandlers.appearance = {
  set: function set(value, ref) {
    if (['sheet', 'form'].indexOf(value) < 0) value = 'sheet';
    if (value === ref.get()) return value;
    var data;
    if (this._dataFlushed) data = this.editor.getData();
    this.ctnElt.clearChild();
    if (value === 'sheet') {
      this.editor = new _TableEditor["default"]({
        elt: this.ctnElt
      });
    } else {
      this.editor = new _FormArrayEditor["default"]({
        elt: this.ctnElt
      });
    }
    this.editor.getView();
    if (!data) data = {
      records: []
    };
    if (this._dataFlushed && this.attributes.propertyDescriptors && this.attributes.propertyNames) {
      this.editor.setData(Object.assign({}, data, {
        propertyDescriptors: this.attributes.propertyDescriptors,
        propertyNames: this.attributes.propertyNames
      }));
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'sheet') value = undefined;
    return value;
  },
  descriptor: {
    type: 'enum',
    values: ['sheet', 'form']
  }
};
TableInput.prototype.onCreated = function () {
  this.$domSignal = (0, _FCore._)('attachhook.as-dom-signal');
  this.view.appendChild(this.$domSignal);
  this.domSignal = new _DomSignal["default"](this.$domSignal);
  this.domSignal.on('requestUpdateContent', this._updateContent.bind(this));
  this._dataFlushed = true;
  this.attributes.records = [];
  this.attributes.propertyDescriptors = {
    "done": {
      "type": "text",
      "text": "example"
    }
  };
  this.attributes.propertyNames = ['done'];
  this.editor.on('change', function () {
    this.pinFire('records');
    this.notifyChange();
    _ResizeSystem["default"].updateUp(this.domElt);
  }.bind(this));
};
TableInput.prototype._verifyTableData = function () {
  if (!this.attributes.propertyNames || !(this.attributes.propertyNames instanceof Array) || !this.attributes.propertyDescriptors || !this.attributes.records || !this.attributes.records) return false;
  return true;
};
TableInput.prototype._updateContent = function () {
  var config;
  if (this._verifyTableData()) {
    var prevRecords = this.editor.records;
    this.editor.fragment = this.fragment;
    config = Object.assign({}, this.attributes.config);
    config.rowHeight = this.style.rowHeight;
    this.editor.setData({
      propertyNames: this.attributes.propertyNames,
      propertyDescriptors: this.attributes.propertyDescriptors,
      records: this.attributes.records,
      config: config
    });
    this._dataFlushed = true;
    if (prevRecords !== this.editor.records) {
      this.pinFire('records');
      this.notifyChange();
    }
    _ResizeSystem["default"].updateUp(this.domElt);
  }
};
TableInput.prototype._requestUpdateContent = function () {
  this.domSignal.emit('requestUpdateContent');
};
TableInput.prototype.createDataBindingDescriptor = function () {
  var thisTI = this;
  var props = {};
  Object.defineProperties(props, {
    propertyNames: {
      enumerable: true,
      set: function set(pnA) {
        thisTI.setAttribute('propertyNames', pnA);
      },
      get: function get() {
        return thisTI.getAttribute('propertyNames');
      }
    },
    propertyDescriptors: {
      enumerable: true,
      set: function set(pdO) {
        thisTI.setAttribute('propertyDescriptors', pdO);
      },
      get: function get() {
        return thisTI.getAttribute('propertyDescriptors');
      }
    },
    records: {
      enumerable: true,
      set: function set(records) {
        thisTI.setAttribute('records', records);
      },
      get: function get() {
        return thisTI.getAttribute('records');
      }
    }
  });
  return {
    enumerable: true,
    set: function set(value) {
      Object.assign(props, value);
    },
    get: function get() {
      return props;
    }
  };
};
_Assembler.AssemblerInstance.addClass(TableInput);
var _default = TableInput;
exports["default"] = _default;

/***/ }),

/***/ 36685:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _showdown = _interopRequireDefault(__webpack_require__(47127));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _TextStyleHandlers = _interopRequireDefault(__webpack_require__(42702));
var _Assembler = __webpack_require__(2326);
var _datetime = __webpack_require__(58286);
var _utils = __webpack_require__(49633);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var showDownConverter = new _showdown["default"].Converter();

/***
 * @extends ScalableComponent
 * @constructor
 */
function Text() {
  var _this = this;
  _ScalableComponent["default"].call(this);
  setTimeout(function () {
    //TODO: better rule
    if (_this.style.width !== 'auto') return;
    var bf = _this.domElt.previousSibling;
    if (!bf || !bf.fmComponent) return;
    var bfComp = bf.fmComponent;
    var subWidth = 0;
    if (bfComp.tag !== 'Label') return;
    if (bfComp.style.hidden === true) return;
    if (typeof bfComp.style.width === "number") {
      subWidth = bfComp.style.width;
      if (typeof bfComp.style.marginRight === "number") {
        subWidth += bfComp.style.marginRight;
      }
    }
    if (subWidth) {
      _this.domElt.style.setProperty('max-width', 'calc(100% - ' + Math.ceil(subWidth) + 'px)');
    }
  }, 10);
}
(0, _inheritComponentClass["default"])(Text, _ScalableComponent["default"]);
Text.prototype.tag = "Text";
Text.prototype.menuIcon = "span.mdi.mdi-format-color-text";
Text.prototype.style.vAlign = 'center';
Text.prototype.style.display = 'inline-block';
Text.prototype.attributes.text = '';
Text.prototype.style.fontStyle = 'Regular';
Text.prototype.style.padding = '';
Text.prototype.attributeHandlers.text = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    var prev = ref.get();
    switch (this.attributes.textDecode) {
      case 'html':
        this.domElt.innerHTML = (value || '') + '';
        break;
      case 'markdown':
        this.domElt.innerHTML = showDownConverter.makeHtml((value || '') + '').trim().replace(/(^<p>)|(<\/p>$)/, '');
        break;
      case 'dd/MM/yyyy':
      case 'date':
        if (value instanceof Date) {
          this.domElt.clearChild().addChild(_({
            text: (0, _datetime.formatDateTime)(value, 'dd/MM/yyyy')
          }));
        } else {
          this.domElt.clearChild().addChild(_({
            text: (value || '') + ''
          }));
        }
        break;
      case 'dd/MM/yyyy hh:mm a':
      case 'date_time':
        if (value instanceof Date) {
          this.domElt.clearChild().addChild(_({
            text: (0, _datetime.formatDateTime)(value, 'dd/MM/yyyy HH:mm')
          }));
        } else {
          this.domElt.clearChild().addChild(_({
            text: (value || '') + ''
          }));
        }
        break;
      default:
        if (typeof value === "number") value = value + '';else if (typeof value === "boolean") value = value + '';else if (value instanceof Array) {
          value = JSON.stringify(value);
        } else if (value === undefined || value === null) {
          value = '';
        } else if (typeof value !== "string") {
          value = value + '';
        }
        this.domElt.clearChild().addChild(_({
          text: (value || _utils.CHAR_ZWS) + ''
        }));
    }
    ref.set(value);
    if (this.domElt.childNodes.length === 1 && this.domElt.firstChild.nodeType === Node.TEXT_NODE && this.domElt.firstChild.data === '') {
      this.domElt.addClass('as-empty');
    } else {
      this.domElt.removeClass('as-empty');
    }
    if (prev !== value) {
      this.pinFire('text');
      this.pinFire('value');
      this.notifyChange();
    }
    return value;
  },
  descriptor: {
    type: "text",
    "long": true,
    sign: "HyperText"
  }
};
Text.prototype.attributeHandlers.textDecode = {
  set: function set(value) {
    // if (['none', 'markdown', 'html'].indexOf(value) < 0) value = 'none';
    var ref = arguments[arguments.length - 1];
    var currentValue = ref.get();
    if (currentValue !== value) {
      this.domElt.removeClass('as-decode-' + currentValue);
      this.domElt.addClass('as-decode-' + value);
      ref.set(value);
      this.attributes['text'] = this.attributes.text;
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get() || 'none';
    if (value === 'none') return undefined;
    return value;
  },
  descriptor: {
    type: "enum",
    values: ['none', 'markdown', 'html', 'date', 'date_time'],
    sign: 'TextDecode'
  }
};
Text.prototype.attributeHandlers.placeHolder = {
  set: function set(value) {
    if (typeof value === "string" && value.length > 0 || typeof value === 'number') {
      this.domElt.attr('data-place-holder', value + '');
    } else {
      this.domElt.attr('data-place-holder', undefined);
    }
  },
  get: function get() {
    return this.domElt.attr('data-place-holder') || '';
  },
  "export": function _export() {
    return this.attributes.placeHolder || undefined;
  },
  descriptor: {
    type: "text",
    "long": true,
    sign: "placeHolder"
  }
};
Object.assign(Text.prototype.styleHandlers, _TextStyleHandlers["default"]);
Text.prototype.styleHandlers.padding = {
  set: function set(value) {
    this.domElt.addStyle('padding', value);
    return value;
  },
  descriptor: {
    type: "text"
  }
};
Text.prototype.pinHandlers.text = {
  receives: function receives(value) {
    this.attributes.text = value;
  },
  get: function get() {
    return this.attributes.text;
  },
  descriptor: {
    type: 'text',
    "long": true
  }
};
Text.prototype.pinHandlers.value = Text.prototype.pinHandlers.text;
Text.prototype.attributes.textDecode = 'none';
Text.prototype.style.textAlign = 'left';
Text.prototype.style.textColor = 'black';
Text.prototype.style.font = 'unset';
Text.prototype.styleHandlers.border = {
  set: function set(value) {
    this.domElt.style.border = value;
    return value;
  },
  get: function get(ref) {
    var value = ref.get();
    value = value || '';
    return value;
  },
  descriptor: {
    type: 'text'
  }
};
Text.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.text = this.attributes.name;
};
Text.prototype.render = function () {
  this.domElt = _({
    "class": ['absol-bscroller', 'as-text', 'cke_contents_ltr'],
    child: {
      text: ''
    }
  });
};
Text.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    set: function set(value) {
      thisC.setAttribute('text', value);
    },
    get: function get() {
      return thisC.getAttribute('text');
    }
  };
};
_Assembler.AssemblerInstance.addClass(Text);
var _default = Text;
exports["default"] = _default;

/***/ }),

/***/ 48310:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _TextInput = _interopRequireDefault(__webpack_require__(72386));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Assembler = __webpack_require__(2326);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends TextInput
 * @constructor
 */
function TextArea() {
  _TextInput["default"].call(this);
}
(0, _inheritComponentClass["default"])(TextArea, _TextInput["default"]);
TextArea.prototype.tag = "TextArea";
TextArea.prototype.menuIcon = "span.mdi.mdi-form-textarea";
TextArea.prototype.style.vAlign = 'center';
TextArea.prototype.style.display = 'inline-block';
TextArea.prototype.style.width = 400;
TextArea.prototype.style.height = 80;
TextArea.prototype.render = function () {
  return _('textarea2.absol-bscroller');
};
TextArea.prototype.attributeHandlers.value = Object.assign({}, _TextInput["default"].prototype.attributeHandlers.value);
TextArea.prototype.attributeHandlers.placeHolder = Object.assign({}, _TextInput["default"].prototype.attributeHandlers.placeHolder);
TextArea.prototype.attributeHandlers.value.descriptor = {
  type: "text",
  "long": true,
  sign: "SimpleTextLong"
};
TextArea.prototype.attributeHandlers.placeHolder.descriptor = {
  type: "text",
  "long": true,
  sign: "SimpleTextLong"
};
delete TextArea.prototype.attributeHandlers.textType;
_Assembler.AssemblerInstance.addClass(TextArea);
var _default = TextArea;
exports["default"] = _default;

/***/ }),

/***/ 72386:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
__webpack_require__(26189);
var _Text = _interopRequireDefault(__webpack_require__(36685));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function TextInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(TextInput, _ScalableComponent["default"], _Text["default"]);
delete TextInput.prototype.attributeHandlers.text;
delete TextInput.prototype.attributeHandlers.textDecode;
TextInput.prototype.tag = "TextInput";
TextInput.prototype.menuIcon = "span.mdi.mdi-form-textbox";
TextInput.prototype.SUPPORT_ATTRIBUTE_NAMES = ['value'];
TextInput.prototype.SUPPORT_EVENT_NAMES = ['change'];
Object.assign(TextInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(TextInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
TextInput.prototype.style.vAlign = 'center';
TextInput.prototype.style.display = 'inline-block';
TextInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    this.domElt.value = value;
    if (this.domElt.updateSize) {
      this.domElt.updateSize(); //textarea2 module
    }

    if (prev !== this.domElt.value) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: "text",
    sign: "SimpleText"
  }
};
TextInput.prototype.attributeHandlers.placeHolder = {
  set: function set(value) {
    this.domElt.placeholder = value;
  },
  get: function get() {
    return this.domElt.placeholder;
  },
  descriptor: {
    type: "text",
    sign: "TextPlaceHolder"
  },
  "export": function _export() {
    var value = this.domElt.placeholder;
    return value || undefined;
  }
};
TextInput.prototype.attributeHandlers.textType = {
  set: function set(value) {
    if (['normal', 'password'].indexOf(value) < 0) value = 'normal';
    this.domElt.attr('type', {
      normal: 'text',
      password: 'password'
    }[value]);
    if (value === 'password') this.domElt.attr('autocomplete', 'new-password');else this.domElt.attr('autocomplete', undefined);
    return value;
  },
  descriptor: {
    type: "enum",
    values: ['normal', 'password'],
    sign: 'InputTextType'
  },
  "export": function _export() {
    var ref = arguments[arguments.length - 1];
    var value = ref.get();
    return value === 'normal' ? undefined : value;
  }
};
TextInput.prototype.pinHandlers.value = {
  get: function get() {
    return this.attributes.value;
  },
  receives: function receives(value) {
    this.attributes.value = value;
  }
};
TextInput.prototype.pinHandlers.disabled = {
  receives: function receives(value) {
    this.attributes.disabled = value;
  }
};
TextInput.prototype.pinHandlers.blur = {
  get: function get() {
    return true;
  }
};
TextInput.prototype.pinHandlers.userModified = {
  get: function get() {
    return true;
  }
};
TextInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  var self = this;
  var lastValue;
  this.domElt.on('focus', function () {
    lastValue = this.value;
  }).on('keyup', function (event) {
    if (this.value !== lastValue) {
      self.pinFire('userModified');
      self.pinFire('value');
      self.notifyChange();
      lastValue = this.value;
    }
  }).on('blur', function () {
    if (this.value !== lastValue) {
      self.pinFire('value');
      self.notifyChange();
      lastValue = this.value;
    }
    self.pinFire('blur');
  });
};
TextInput.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.style.textAlign = 'left';
  this.attributes.value = '';
  this.attributes.placeHolder = '';
  this.style.textType = 'normal';
  this.style.textColor = 'black';
  this.style.textSize = 0;
  this.style.textAlign = 'left';
  this.style.font = 'unset';
};
TextInput.prototype.render = function () {
  return _('input[type="text"][autocomplete="off"].as-text-input');
};
TextInput.prototype.getAcceptsStyleNames = function () {
  return _Text["default"].prototype.getAcceptsStyleNames.call(this);
};
TextInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.setAttribute('value', value);
    },
    get: function get() {
      return thisC.getAttribute('value');
    }
  };
};
TextInput.prototype.verify = function () {
  if (this.attributes.required) {
    if (this.attributes.value.trim().length > 0) {
      return {
        completed: true
      };
    } else {
      return {
        completed: false,
        comp: this
      };
    }
  } else {
    return {
      completed: true
    };
  }
};
_Assembler.AssemblerInstance.addClass(TextInput);
var _default = TextInput;
exports["default"] = _default;

/***/ }),

/***/ 78145:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _datetime = __webpack_require__(58286);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function Time24Input() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(Time24Input, _ScalableComponent["default"]); //5p

Time24Input.prototype.tag = "Time24Input";
Time24Input.prototype.menuIcon = "span.mdi.mdi-clock-end";
Object.assign(Time24Input.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(Time24Input.prototype.attributeHandlers, _InputStyleHandlers["default"]);
Time24Input.prototype.style.vAlign = 'center';
Time24Input.prototype.style.display = 'inline-block';
Time24Input.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    this.domElt.value = value;
    if (this.domElt.value !== value) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'number',
    min: 0,
    max: _datetime.MILLIS_PER_DAY - 1
  }
};
Time24Input.prototype.attributeHandlers.offset = {
  set: function set(value) {
    this.domElt.dayOffset = value;
  },
  get: function get() {
    return this.domElt.dayOffset;
  },
  descriptor: {
    type: 'number',
    min: 0,
    max: _datetime.MILLIS_PER_DAY - 1
  }
};
Time24Input.prototype.attributeHandlers.format = {
  set: function set(value) {
    this.domElt.format = value;
  },
  get: function get() {
    return this.domElt.format;
  },
  "export": function _export() {
    if (this.domElt.format === 'HH:mm') return undefined;
    return this.domElt.format;
  },
  descriptor: {
    type: 'enum',
    values: ['hh:mm a', 'HH:mm']
  }
};
Time24Input.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: 'number'
  }
};
Time24Input.prototype.pinHandlers.offset = {
  receives: function receives(value) {
    this.attributes.offset = value;
  },
  descriptor: {
    type: 'number'
  }
};
Time24Input.prototype.render = function () {
  return _('time24input');
};
Time24Input.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.value = null;
  this.attributes.format = 'HH:mm';
  this.style.width = 160;
  this.style.height = 30;
};
Time24Input.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  this.domElt.on('change', function () {
    this.pinFire('value');
    this.notifyChange();
  }.bind(this));
};
Time24Input.prototype.measureMinSize = function () {
  return {
    width: 75,
    height: 16
  };
};
Time24Input.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.setAttribute('value', value);
    },
    get: function get() {
      return thisC.getAttribute('value');
    }
  };
};
_Assembler.AssemblerInstance.addClass(Time24Input);
var _default = Time24Input;
exports["default"] = _default;

/***/ }),

/***/ 49540:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _datetime = __webpack_require__(58286);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function TimeInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(TimeInput, _ScalableComponent["default"]);
TimeInput.prototype.tag = "TimeInput";
TimeInput.prototype.menuIcon = "span.mdi.mdi-clock-outline";
Object.assign(TimeInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(TimeInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
TimeInput.prototype.style.vAlign = 'center';
TimeInput.prototype.style.display = 'inline-block';
TimeInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.dayOffset;
    this.domElt.dayOffset = value;
    if (this.domElt.dayOffset !== value) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.dayOffset;
  },
  descriptor: {
    type: 'number',
    min: 0,
    max: _datetime.MILLIS_PER_DAY - 1
  }
};
TimeInput.prototype.attributeHandlers.format = {
  set: function set(value) {
    this.domElt.format = value;
  },
  get: function get() {
    return this.domElt.format;
  },
  "export": function _export() {
    if (this.domElt.format === 'HH:mm') return undefined;
    return this.domElt.format;
  },
  descriptor: {
    type: 'enum',
    values: ['hh:mm a', 'HH:mm']
  }
};
TimeInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.dayOffset;
  },
  descriptor: {
    type: 'number'
  }
};
TimeInput.prototype.render = function () {
  return _('timeinput');
};
TimeInput.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.value = null;
  this.attributes.format = 'HH:mm';
  this.style.width = 130;
  this.style.height = 30;
};
TimeInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  this.domElt.on('change', function () {
    this.pinFire('value');
    this.notifyChange();
  }.bind(this));
};
TimeInput.prototype.measureMinSize = function () {
  return {
    width: 75,
    height: 16
  };
};
TimeInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.setAttribute('value', value);
    },
    get: function get() {
      return thisC.getAttribute('value');
    }
  };
};
_Assembler.AssemblerInstance.addClass(TimeInput);
var _default = TimeInput;
exports["default"] = _default;

/***/ }),

/***/ 42336:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _Assembler = __webpack_require__(2326);
var _datetime = __webpack_require__(58286);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _InputAttributeHandlers = _interopRequireDefault(__webpack_require__(53165));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ScalableComponent
 * @constructor
 */
function TimeRange24Input() {
  _ScalableComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(TimeRange24Input, _ScalableComponent["default"]);
TimeRange24Input.prototype.tag = 'TimeRange24Input';
TimeRange24Input.prototype.menuIcon = 'span.mdi.mdi-timelapse';
TimeRange24Input.prototype.style.vAlign = 'center';
TimeRange24Input.prototype.style.display = 'inline-block';
TimeRange24Input.prototype.render = function () {
  return (0, _FCore._)('timerange24input');
};
TimeRange24Input.prototype.measureMinSize = function () {
  return {
    height: 30,
    width: 318
  };
};
TimeRange24Input.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.apply(this, arguments);
  var self = this;
  this.domElt.on('change', function (event) {
    if (self.pinHandlers[event.property]) self.pinFire(event.property);
    self.pinFire('value');
    self.notifyChange();
  });
};
Object.assign(TimeRange24Input.prototype.styleHandlers, _InputStyleHandlers["default"]);
Object.assign(TimeRange24Input.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
TimeRange24Input.prototype.attributeHandlers.dayOffset = {
  set: function set(value) {
    var prev = this.domElt.dayOffset;
    this.domElt.dayOffset = value;
    if (prev !== this.domElt.dayOffset) {
      this.pinFire('dayOffset');
      this.pinFire('value');
    }
  },
  get: function get() {
    return this.domElt.dayOffset;
  },
  descriptor: {
    type: 'number',
    min: 0,
    max: _datetime.MILLIS_PER_DAY
  }
};
TimeRange24Input.prototype.attributeHandlers.duration = {
  set: function set(value) {
    var prev = this.domElt.duration;
    this.domElt.duration = value;
    if (prev !== this.domElt.duration) {
      this.pinFire('duration');
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.duration;
  },
  descriptor: {
    type: 'number',
    min: 0,
    max: _datetime.MILLIS_PER_DAY
  }
};
TimeRange24Input.prototype.attributeHandlers.notNull = {
  set: function set(value) {
    this.domElt.notNull = !!value;
  },
  get: function get() {
    return this.domElt.notNull;
  },
  "export": function _export() {
    if (this.domElt.notNull) return undefined;
    return this.domElt.notNull;
  },
  descriptor: {
    type: 'bool'
  }
};
TimeRange24Input.prototype.pinHandlers.duration = {
  get: function get() {
    return this.attributes.duration;
  },
  receives: function receives(value) {
    this.attributes.duration = value;
  },
  descriptor: {
    type: 'number'
  }
};
TimeRange24Input.prototype.pinHandlers.dayOffset = {
  get: function get() {
    return this.attributes.dayOffset;
  },
  receives: function receives(value) {
    this.attributes.dayOffset = value;
  },
  descriptor: {
    type: 'number'
  }
};
TimeRange24Input.prototype.pinHandlers.value = {
  get: function get() {
    return {
      dayOffset: this.attributes.dayOffset,
      duration: this.attributes.duration
    };
  },
  receives: function receives(value) {
    value = value || {};
    if ('dayOffset' in value) {
      this.attributes.dayOffset = value.dayOffset;
    }
    if ('duration' in value) {
      this.attributes.duration = value.duration;
    }
  },
  descriptor: {
    type: 'object'
  }
};

//mock attribute
['minStart', 'maxStart', 'minEnd', 'maxEnd', 'minDuration', 'maxDuration'].forEach(function (name) {
  TimeRange24Input.prototype.attributeHandlers[name] = {
    descriptor: {
      type: 'number'
    }
  };
  TimeRange24Input.prototype.pinHandlers[name] = {
    receives: function receives(value) {
      this.attributes[name] = value;
    }
  };
});
TimeRange24Input.prototype.createDataBindingDescriptor = function () {
  var self = this;
  var subObj = {};
  Object.defineProperties(subObj, {
    dayOffset: {
      set: function set(value) {
        self.attributes.dayOffset = value;
      },
      get: function get() {
        return self.attributes.dayOffset;
      },
      configurable: true,
      enumerable: true
    },
    duration: {
      set: function set(value) {
        self.attributes.duration = value;
      },
      get: function get() {
        return self.attributes.duration;
      },
      configurable: true,
      enumerable: true
    }
  });
  return {
    set: function set(props) {
      props = props || {};
      if ('dayOffset' in props) subObj.dayOffset = props.dayOffset;
      if ('duration' in props) subObj.duration = props.duration;
    },
    get: function get() {
      return subObj;
    }
  };
};
_Assembler.AssemblerInstance.addClass(TimeRange24Input);
var _default = TimeRange24Input;
exports["default"] = _default;

/***/ }),

/***/ 63318:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function TrackBar() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(TrackBar, _ScalableComponent["default"]);
TrackBar.prototype.tag = 'TrackBar';
TrackBar.prototype.menuIcon = 'span.mdi.mdi-source-commit.mdi-rotate-90';
Object.assign(TrackBar.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(TrackBar.prototype.styleHandlers, _InputStyleHandlers["default"]);
TrackBar.prototype.style.vAlign = 'center';
TrackBar.prototype.style.display = 'inline-block';
TrackBar.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    this.domElt.value = value;
    if (this.domElt.value !== prev) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'number',
    max: 1,
    min: 0,
    floatFixed: 2
  }
};
TrackBar.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'number',
    max: 1,
    min: 0,
    floatFixed: 2
  }
};
TrackBar.prototype.render = function () {
  return (0, _FCore._)('trackbar');
};
TrackBar.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.apply(this, arguments);
  this.style.height = 18;
};
TrackBar.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.apply(this, arguments);
  this.domElt.on('change', function () {
    this.pinFire('value');
    this.notifyChange();
  }.bind(this));
};
TrackBar.prototype.measureMinSize = function () {
  return {
    width: 40,
    height: 18
  };
};
TrackBar.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    set: function set(value) {
      thisC.setAttribute('value', value);
    },
    get: function get() {
      return thisC.getAttribute('value');
    }
  };
};
_Assembler.AssemblerInstance.addClass(TrackBar);
var _default = TrackBar;
exports["default"] = _default;

/***/ }),

/***/ 90587:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _TrackBar = _interopRequireDefault(__webpack_require__(63318));
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function TrackBarInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(TrackBarInput, _ScalableComponent["default"]);
TrackBarInput.prototype.tag = 'TrackBarInput';
TrackBarInput.prototype.menuIcon = 'span.mdi.mdi-source-commit.mdi-rotate-90';
TrackBarInput.prototype.render = function () {
  return (0, _FCore._)('trackbarinput');
};
Object.assign(TrackBarInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(TrackBarInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
TrackBarInput.prototype.style.vAlign = 'center';
TrackBarInput.prototype.style.display = 'inline-block';
TrackBarInput.prototype.attributeHandlers.value = {
  set: _TrackBar["default"].prototype.attributeHandlers.value.set,
  get: _TrackBar["default"].prototype.attributeHandlers.value.get,
  descriptor: function descriptor() {
    return {
      type: 'number',
      max: this.domElt.rightValue,
      min: this.domElt.leftValue,
      floatFixed: 2,
      dependency: ['leftValue', 'rightValue']
    };
  }
};
TrackBarInput.prototype.attributeHandlers.leftValue = {
  set: function set(value) {
    this.domElt.leftValue = value;
  },
  get: function get() {
    return this.domElt.leftValue;
  },
  descriptor: function descriptor() {
    return {
      type: 'number',
      max: this.domElt.rightValue,
      floatFixed: 2,
      dependency: ['rightValue', 'value']
    };
  }
};
TrackBarInput.prototype.attributeHandlers.rightValue = {
  set: function set(value) {
    this.domElt.rightValue = value;
  },
  get: function get() {
    return this.domElt.rightValue;
  },
  descriptor: function descriptor() {
    return {
      type: 'number',
      min: this.domElt.leftValue,
      floatFixed: 2,
      dependency: ['leftValue', 'value']
    };
  }
};
TrackBarInput.prototype.attributeHandlers.unit = {
  set: function set(value) {
    this.domElt.unit = value;
  },
  get: function get() {
    return this.domElt.unit;
  },
  descriptor: function descriptor() {
    return {
      type: 'text'
    };
  }
};
TrackBarInput.prototype.pinHandlers.value = Object.assign({}, _TrackBar["default"].prototype.pinHandlers.value, {
  descriptor: function descriptor() {
    return {
      type: 'number',
      max: this.domElt.rightValue,
      min: this.domElt.leftValue,
      floatFixed: 2
    };
  }
});
TrackBarInput.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.apply(this, arguments);
  this.style.height = 26;
};
TrackBarInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.apply(this, arguments);
  this.domElt.on('change', function () {
    this.pinFire('value');
    this.notifyChange();
  }.bind(this));
};
TrackBarInput.prototype.measureMinSize = function () {
  return {
    width: 40,
    height: 26
  };
};
_Assembler.AssemblerInstance.addClass(TrackBarInput);
var _default = TrackBarInput;
exports["default"] = _default;

/***/ }),

/***/ 70420:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _ComboBox = _interopRequireDefault(__webpack_require__(1956));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _ComboBoxHandlers = __webpack_require__(79554);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function TreeComboBox() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(TreeComboBox, _ScalableComponent["default"]);
TreeComboBox.prototype.tag = "TreeComboBox";
TreeComboBox.prototype.menuIcon = ['<svg style="width:22px;height:22px" viewBox="0 0 24 24" width="24" height="24">', '<g transform="scale(0.5, 0.5) translate(10, 10)">', '<path fill="currentColor" d="M3,3H9V7H3V3M15,10H21V14H15V10M15,17H21V21H15V17M13,13H7V18H13V20H7L5,20V9H7V11H13V13Z" />', '</g>', '<path fill="currentColor" d="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4" />', '</svg>'].join('\n');
Object.assign(TreeComboBox.prototype.attributeHandlers, _InputAttributeHandlers["default"], _ComboBoxHandlers.ComboBoxAttributeHandlers);
Object.assign(TreeComboBox.prototype.pinHandlers, _ComboBoxHandlers.ComboBoxPinHandlers);
Object.assign(TreeComboBox.prototype.styleHandlers, _InputStyleHandlers["default"]);
TreeComboBox.prototype.style.vAlign = 'center';
TreeComboBox.prototype.style.display = 'inline-block';
TreeComboBox.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
};
TreeComboBox.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  var self = this;
  this.domElt.on('change', function () {
    self.pinFire('value');
    self.pinFire('text');
    self.notifyChange();
  });
};
TreeComboBox.prototype.render = function () {
  return _('selecttreemenu');
};
TreeComboBox.prototype.measureMinSize = function () {
  var minWidthStyle = this.domElt ? parseFloat(this.domElt.getComputedStyleValue('min-width').replace('px')) : 24;
  return {
    width: Math.max(minWidthStyle, 24),
    height: 25
  };
};
TreeComboBox.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  var subObj = {};
  Object.defineProperties(subObj, {
    value: {
      configurable: true,
      enumerable: true,
      set: function set(value) {
        thisC.setAttribute('value', value);
      },
      get: function get() {
        return thisC.getAttribute('value');
      }
    },
    treeList: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.list;
      },
      set: function set(value) {
        thisC.attributes.list = value;
      }
    },
    list: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.list;
      },
      set: function set(value) {
        thisC.attributes.list = value;
      }
    }
  });
  return {
    set: function set(value) {
      Object.assign(subObj, value);
    },
    get: function get() {
      return subObj;
    }
  };
};
_Assembler.AssemblerInstance.addClass(TreeComboBox);
var _default = TreeComboBox;
exports["default"] = _default;

/***/ }),

/***/ 29723:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _ComboBox = _interopRequireDefault(__webpack_require__(1956));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _SelectTreeLeafMenu = _interopRequireDefault(__webpack_require__(66138));
var _TreeComboBox = _interopRequireDefault(__webpack_require__(70420));
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _ComboBoxHandlers = __webpack_require__(79554);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function TreeLeafComboBox() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(TreeLeafComboBox, _ScalableComponent["default"]);
TreeLeafComboBox.prototype.tag = "TreeLeafComboBox";
TreeLeafComboBox.prototype.menuIcon = ['<svg style="width:22px;height:22px" viewBox="0 0 24 24" width="24" height="24">', '<g transform="scale(0.5, 0.5) translate(10, 10)">', '<path fill="currentColor" d="M3,3H9V7H3V3M15,10H21V14H15V10M15,17H21V21H15V17M13,13H7V18H13V20H7L5,20V9H7V11H13V13Z" />', '</g>', '<path fill="currentColor" d="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4" />', '</svg>'].join('\n');
Object.assign(TreeLeafComboBox.prototype.attributeHandlers, _InputAttributeHandlers["default"], _ComboBoxHandlers.ComboBoxAttributeHandlers);
Object.assign(TreeLeafComboBox.prototype.styleHandlers, _InputStyleHandlers["default"]);
Object.assign(TreeLeafComboBox.prototype.pinHandlers, _ComboBoxHandlers.ComboBoxPinHandlers);
TreeLeafComboBox.prototype.style.vAlign = 'center';
TreeLeafComboBox.prototype.style.display = 'inline-block';
TreeLeafComboBox.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  var self = this;
  this.view.on('change', function () {
    self.pinFire('value');
    self.pinFire('text');
    self.notifyChange();
  });
};
TreeLeafComboBox.prototype.render = function () {
  return _(_SelectTreeLeafMenu["default"].tag);
};
TreeLeafComboBox.prototype.measureMinSize = function () {
  var minWidthStyle = this.domElt ? parseFloat(this.domElt.getComputedStyleValue('min-width').replace('px')) : 24;
  return {
    width: Math.max(minWidthStyle, 24),
    height: 25
  };
};
TreeLeafComboBox.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  var subObj = {};
  Object.defineProperties(subObj, {
    value: {
      configurable: true,
      enumerable: true,
      set: function set(value) {
        thisC.setAttribute('value', value);
      },
      get: function get() {
        return thisC.getAttribute('value');
      }
    },
    treeList: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.list;
      },
      set: function set(value) {
        thisC.attributes.list = value;
      }
    },
    list: {
      enumerable: false,
      configurable: true,
      get: function get() {
        return thisC.attributes.list;
      },
      set: function set(value) {
        thisC.attributes.list = value;
      }
    }
  });
  return {
    set: function set(value) {
      Object.assign(subObj, value);
    },
    get: function get() {
      return subObj;
    }
  };
};
_Assembler.AssemblerInstance.addClass(TreeLeafComboBox);
var _default = TreeLeafComboBox;
exports["default"] = _default;

/***/ }),

/***/ 80230:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _FCore = __webpack_require__(51518);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Assembler = __webpack_require__(2326);
var _TreeTable = _interopRequireDefault(__webpack_require__(29950));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ScalableComponent
 * @constructor
 */
function TreeTable() {
  _ScalableComponent["default"].call(this);
  this._adapter = {};
}
(0, _inheritComponentClass["default"])(TreeTable, _ScalableComponent["default"]);
TreeTable.prototype.tag = 'TreeTable';
TreeTable.prototype.menuIcon = 'span.mdi.mdi-table';
TreeTable.prototype.render = function () {
  return (0, _FCore._)({
    tag: _TreeTable["default"]
  });
};
TreeTable.prototype.attributes.propertyNames = ['sample_data'];
TreeTable.prototype.attributes.propertyDescriptors = {
  'sample_data': {
    type: 'text',
    text: 'Dữ liệu mẫu'
  }
};
TreeTable.prototype.attributes.records = [{}, {}];
TreeTable.prototype.attributeHandlers.propertyNames = {
  set: function set(value, ref) {
    ref.set(value);
    this._updateContent();
    return value;
  }
};
TreeTable.prototype.attributeHandlers.propertyDescriptors = {
  set: function set(value, ref) {
    ref.set(value);
    this._updateContent();
    return value;
  }
};
TreeTable.prototype.attributeHandlers.records = {
  set: function set(value, ref) {
    value = value || [];
    ref.set(value);
    this._updateContent();
    return value;
  }
};
TreeTable.prototype.pinHandlers.records = {
  receives: function receives(value) {
    this.attributes.records = value;
  },
  descriptor: {
    type: 'object[]'
  }
};
TreeTable.prototype._updateContent = function () {
  var propertyDescriptors = this.attributes.propertyDescriptors;
  var propertyNames = this.attributes.propertyNames;
  var records = this.attributes.records;
  if (propertyDescriptors && propertyNames && records) {
    this.domElt.adapter = {
      type: 'struct',
      treeBy: this.attributes.treeBy || propertyNames[0],
      propertyNames: propertyNames,
      propertyDescriptors: propertyDescriptors,
      records: records
    };
  }
};
TreeTable.prototype.createDataBindingDescriptor = function () {
  var thisTI = this;
  var props = {};
  Object.defineProperties(props, {
    propertyNames: {
      enumerable: true,
      set: function set(pnA) {
        thisTI.setAttribute('propertyNames', pnA);
      },
      get: function get() {
        return thisTI.getAttribute('propertyNames');
      }
    },
    propertyDescriptors: {
      enumerable: true,
      set: function set(pdO) {
        thisTI.setAttribute('propertyDescriptors', pdO);
      },
      get: function get() {
        return thisTI.getAttribute('propertyDescriptors');
      }
    },
    records: {
      enumerable: true,
      set: function set(records) {
        thisTI.setAttribute('records', records);
      },
      get: function get() {
        return thisTI.getAttribute('records');
      }
    }
  });
  return {
    enumerable: true,
    set: function set(value) {
      Object.assign(props, value);
    },
    get: function get() {
      return props;
    }
  };
};
_Assembler.AssemblerInstance.addClass(TreeTable);
var _default = TreeTable;
exports["default"] = _default;

/***/ }),

/***/ 63117:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _datetime = __webpack_require__(58286);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _InputAttributeHandlers = _interopRequireWildcard(__webpack_require__(53165));
var _Assembler = __webpack_require__(2326);
var _InputStyleHandlers = _interopRequireDefault(__webpack_require__(55558));
var _DateInput = _interopRequireDefault(__webpack_require__(68452));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends ScalableComponent
 * @constructor
 */
function WeekInput() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(WeekInput, _ScalableComponent["default"]);
WeekInput.prototype.tag = "WeekInput";
WeekInput.prototype.menuIcon = "span.mdi.mdi-calendar-week";
WeekInput.prototype.SUPPORT_EVENT_NAMES = ['change'];
Object.assign(WeekInput.prototype.attributeHandlers, _InputAttributeHandlers["default"]);
Object.assign(WeekInput.prototype.styleHandlers, _InputStyleHandlers["default"]);
WeekInput.prototype.attributes.format = 'Tuần ww, yyyy';
WeekInput.prototype.style.vAlign = 'center';
WeekInput.prototype.style.display = 'inline-block';
WeekInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    if (value instanceof Date) this.domElt.value = value;else if (typeof value == 'string' || typeof value == "number") {
      value = new Date(value);
      this.domElt.value = value;
    } else {
      value = null;
      this.domElt.value = null;
    }
    var cur = this.domElt.value;
    if (!!prev !== !!cur || prev && cur && (0, _datetime.compareDate)(prev, cur) !== 0) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.view.value;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    defaultValue: (0, _datetime.beginOfDay)(new Date()),
    sign: 'SimpleDate'
  }
};
WeekInput.prototype.attributeHandlers.format = {
  set: function set(value) {
    this.domElt.format = value || 'Tuần ww, yyyy';
  },
  get: function get() {
    return this.domElt.format;
  },
  descriptor: {
    type: 'enum',
    values: ['Tuần ww, yyyy', 'Week ww, yyyy']
  },
  "export": function _export() {
    var val = this.attributes.format;
    if (val === 'Tuần ww, yyyy') return null;
    return val || null;
  }
};
WeekInput.prototype.attributeHandlers.notNull = _DateInput["default"].prototype.attributeHandlers.notNull;
WeekInput.prototype.pinHandlers.min = {
  receives: function receives(value) {
    this.domElt.min = value;
  },
  descriptor: {
    type: "Date"
  }
};
WeekInput.prototype.pinHandlers.max = {
  receives: function receives(value) {
    this.domElt.max = value;
  },
  descriptor: {
    type: "Date"
  }
};
WeekInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: "Date"
  }
};
WeekInput.prototype.render = function () {
  return _('dateinput');
};
WeekInput.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
  this.attributes.value = null;
  this.style.width = 100;
  this.style.height = 30;
};
WeekInput.prototype.onCreated = function () {
  _ScalableComponent["default"].prototype.onCreated.call(this);
  this.domElt.on('change', this.ev_inputChange.bind(this));
};
WeekInput.prototype.measureMinSize = function () {
  return {
    width: 75,
    height: 16
  };
};
WeekInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.attributes.value = value;
    },
    get: function get() {
      return thisC.attributes.value;
    }
  };
};
WeekInput.prototype.ev_inputChange = function () {
  this.pinFire('value');
  this.notifyChange();
};
_Assembler.AssemblerInstance.addClass(WeekInput);
var _default = WeekInput;
exports["default"] = _default;

/***/ }),

/***/ 79554:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ComboBoxPinHandlers = exports.ComboBoxAttributeHandlers = void 0;
var _SelectionHandlers = __webpack_require__(54825);
var _generator = __webpack_require__(18528);
var ComboBoxAttributeHandlers = Object.assign({}, _SelectionHandlers.SelectionAttributeHandlers);
exports.ComboBoxAttributeHandlers = ComboBoxAttributeHandlers;
var ComboBoxPinHandlers = Object.assign({}, _SelectionHandlers.SelectionPinHandlers);
exports.ComboBoxPinHandlers = ComboBoxPinHandlers;
ComboBoxAttributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    this.domElt.value = value;
    var prevText;
    var textConnectionCount = this.pinOutCountOf('text');
    if (textConnectionCount > 0) {
      prevText = this.attributes.text; //optimize performance
    }

    if (!(0, _generator.isJSVariableEqual)(this.value, prev)) {
      if (this.notifyUnion) {
        this.notifyUnion();
      }
      this.pinFire('value');
    }
    if (textConnectionCount && this.attributes.text !== prevText) {
      this.pinFire('text');
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  "export": function _export() {
    return this.domElt.value;
  }
};
ComboBoxAttributeHandlers.text = {
  get: function get() {
    var value = this.attributes.value;
    // var item;
    var items;
    if (this.domElt.findItemsByValue) {
      items = this.domElt.findItemsByValue(value);
      if (items && items.length > 0) {
        return items[0].item.text;
      }
    } else if (this.domElt.$holderItem && this.domElt.$holderItem.data) {
      return this.domElt.$holderItem.data.text;
    }
    var list;
    if (list) {
      for (var i = 0; i < list.length; ++i) {
        if ((0, _generator.isJSVariableEqual)(list[i].value, value)) {
          return list[i].text;
        }
      }
      return '';
    } else {
      return "";
    }
  },
  "export": function _export() {
    return undefined;
  },
  descriptor: {
    type: 'string'
  }
};
ComboBoxAttributeHandlers.strictValue = {
  get: function get() {
    return this.domElt.strictValue;
  },
  set: function set(value) {
    var prev = this.domElt.value;
    var prevText;
    var textConnectionCount = this.pinOutCountOf('text');
    if (textConnectionCount > 0) {
      prevText = this.attributes.text; //optimize performance
    }

    this.domElt.strictValue = value;
    if (!(0, _generator.isJSVariableEqual)(this.domElt.value, prev)) {
      this.pinFire('value');
    }
    if (textConnectionCount && this.attributes.text !== prevText) {
      this.pinFire('text');
    }
  },
  "export": function _export() {
    var res = this.domElt.strictValue;
    return res ? true : undefined;
  },
  descriptor: {
    type: 'bool'
  }
};
ComboBoxPinHandlers.text = {
  get: function get() {
    return this.attributes.text;
  },
  descriptor: {
    type: 'string'
  }
};
ComboBoxPinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: 'text|number'
  }
};

/***/ }),

/***/ 53165:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.InputAttributeNames = void 0;
var InputAttributeHandlers = {};
InputAttributeHandlers.disabled = {
  set: function set(value) {
    if (this.$content) {
      this.$content.disabled = !!value;
    } else {
      this.domElt.disabled = !!value;
    }
  },
  get: function get() {
    if (this.$content) {
      return this.$content.disabled;
    } else {
      return this.domElt.disabled;
    }
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export() {
    return this.attributes.disabled || undefined;
  }
};
InputAttributeHandlers.readOnly = {
  set: function set(value) {
    if (this.$content) {
      this.$content.readOnly = value;
    } else {
      this.domElt.readOnly = !!value;
    }
  },
  get: function get() {
    if (this.$content) {
      return this.$content.readOnly;
    } else {
      return this.domElt.readOnly;
    }
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export() {
    return this.attributes.readOnly || undefined;
  }
};
InputAttributeHandlers.required = {
  set: function set(value) {
    return !!value;
  },
  get: function get(ref) {
    return ref.get() || false;
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export() {
    return this.attributes.required || undefined;
  }
};
var _default = InputAttributeHandlers;
exports["default"] = _default;
var InputAttributeNames = ['disabled'];
exports.InputAttributeNames = InputAttributeNames;

/***/ }),

/***/ 55558:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var InputStyleHandlers = {};
InputStyleHandlers.border = {
  set: function set(value) {
    if (value === 'none') {
      if (this.$content) {
        this.$content.addClass('as-border-none');
      } else {
        this.domElt.addClass('as-border-none');
      }
    } else {
      if (this.$content) {
        this.$content.removeClass('as-border-none');
      } else {
        this.domElt.removeClass('as-border-none');
      }
    }
    return value || undefined;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'default') value = undefined;
    return value;
  },
  descriptor: {
    type: 'enum',
    values: ['default', 'none']
  }
};
InputStyleHandlers.textAlign = {
  set: function set(value) {
    if (['default', 'left', 'center', 'right'].indexOf(value) < 0) {
      value = 'default';
    }
    this.domElt.attr('data-text-align', value);
    return value;
  },
  descriptor: {
    type: "enum",
    sign: "InputTextAlign",
    independence: true,
    values: ['default', 'left', 'center', 'right']
  },
  "export": function _export() {
    var value = this.style.textAlign;
    if (['left', 'center', 'right'].indexOf(value) >= 0) return value;
    return undefined;
  }
};
var _default = InputStyleHandlers;
exports["default"] = _default;

/***/ }),

/***/ 2453:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MultiselectComboBoxPinHandlers = exports.MultiselectComboBoxAttributeHandlers = void 0;
var _SelectionHandlers = __webpack_require__(54825);
var _generator = __webpack_require__(18528);
var MultiselectComboBoxAttributeHandlers = Object.assign({}, _SelectionHandlers.SelectionAttributeHandlers);
exports.MultiselectComboBoxAttributeHandlers = MultiselectComboBoxAttributeHandlers;
var MultiselectComboBoxPinHandlers = Object.assign({}, _SelectionHandlers.SelectionPinHandlers);
exports.MultiselectComboBoxPinHandlers = MultiselectComboBoxPinHandlers;
MultiselectComboBoxAttributeHandlers.values = {
  set: function set(values) {
    var prev = (0, _generator.copyJSVariable)(this.domElt.values);
    this.domElt.values = values;
    var cur = this.domElt.values;
    var changed = prev.length !== cur.length;
    var pDict;
    if (!changed) {
      pDict = prev.reduce(function (ac, cr) {
        ac[cr] = true;
        return ac;
      }, {});
      changed = cur.some(function (val) {
        return !pDict[val];
      });
    }
    if (changed) {
      this.pinFire('values');
      this.pinFire('text');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.values;
  },
  "export": function _export() {
    return this.domElt.values;
  },
  descriptor: {
    type: 'string[]|number[]'
  }
};
MultiselectComboBoxAttributeHandlers.text = {
  get: function get() {
    var elt = this.domElt;
    if (elt.findItemsByValues) {
      return elt.findItemsByValues(elt.values).map(function (it) {
        return it.text;
      }).join(', ');
    }
    return elt.values.map(function (value) {
      var res = value + '';
      var holders;
      if (elt.findItemsByValue) {
        holders = elt.findItemsByValue(value);
        if (holders && holders.length > 0) {
          res = holders[0].item.text;
        }
      }
      return res;
    }).join(', ');
  },
  "export": function _export() {
    return undefined;
  },
  descriptor: {
    type: 'string'
  }
};
MultiselectComboBoxAttributeHandlers.strictValue = {
  get: function get() {
    return this.domElt.strictValue;
  },
  set: function set(value) {
    var prev = (0, _generator.copyJSVariable)(this.domElt.value);
    this.domElt.strictValue = value;
    if (!(0, _generator.isJSVariableEqual)(this.domElt.values, prev)) {
      this.pinFire('value');
    }
  },
  "export": function _export() {
    var res = this.domElt.strictValue;
    return res ? true : undefined;
  },
  descriptor: {
    type: 'bool'
  }
};
MultiselectComboBoxPinHandlers.values = {
  receives: function receives(value) {
    this.attributes.values = value;
  },
  get: function get() {
    return this.attributes.values;
  }
};
MultiselectComboBoxPinHandlers.text = {
  get: function get() {
    return this.attributes.text;
  }
};

/***/ }),

/***/ 54825:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.SelectionPinHandlers = exports.SelectionAttributeHandlers = void 0;
var _generator = __webpack_require__(18528);
var SelectionAttributeHandlers = {};
exports.SelectionAttributeHandlers = SelectionAttributeHandlers;
var SelectionPinHandlers = {};
exports.SelectionPinHandlers = SelectionPinHandlers;
SelectionAttributeHandlers.items = {
  set: function set(items) {
    items = items || [];
    if (!(items instanceof Array)) items = [];
    items = items.filter(function (it) {
      return !!it;
    });
    var prevText;
    var textConnectionCount = this.pinOutCountOf('text');
    if (textConnectionCount > 0) {
      prevText = this.attributes.text; //optimize performance
    }

    var prevValue = this.domElt.value;
    this.domElt.items = items;
    if (!(0, _generator.isJSVariableEqual)(this.domElt.value, prevValue)) {
      if (this.notifyUnion) {
        this.notifyUnion();
      }
      this.pinFire('value');
    }
    if (textConnectionCount && this.attributes.text !== prevText) {
      this.pinFire('text');
    }
    var minWidth = this.domElt.style.getPropertyPriority('--list-min-width') || this.domElt.getComputedStyleValue('min-width');
    if (this.anchor && minWidth) {
      minWidth = parseInt(minWidth.replace('px', ''));
      if (parseInt(this.style.width) < minWidth) this.style.width = 'auto';
    }
  },
  get: function get() {
    return this.domElt.items;
  },
  descriptor: {
    type: 'Selection',
    sign: 'ItemSelection'
  },
  "export": function _export() {
    var copy = function copy(it) {
      var res = {
        text: it.text,
        value: it.value
      };
      if (it.items && it.items.length > 0) {
        res.items = it.items.map(copy);
      }
    };
    var items = this.domElt.items || [];
    items = items.map(copy);
    if (items && items.length === 0) return undefined;
    return items;
  }
};
SelectionAttributeHandlers.enableSearch = {
  set: function set(value) {
    this.domElt.enableSearch = !!value;
  },
  get: function get() {
    return this.domElt.enableSearch;
  },
  descriptor: {
    sign: "SelectionEnableSearch",
    type: 'bool'
  },
  "export": function _export() {
    return this.domElt.enableSearch || undefined;
  }
};
SelectionAttributeHandlers.searchable = {
  set: function set(value) {
    this.attributes.enableSearch = value;
  },
  get: function get() {
    return this.attributes.enableSearch;
  },
  descriptor: {
    sign: "SelectionEnableSearch",
    type: 'bool',
    hidden: true
  },
  "export": function _export() {
    return undefined;
  }
};
SelectionPinHandlers.items = {
  receives: function receives(items) {
    this.attributes.items = items;
  },
  descriptor: {
    type: 'Selection'
  }
};
['list', 'treeList'].forEach(function (key) {
  SelectionAttributeHandlers[key] = {
    set: function set(items) {
      this.attributes.items = items;
    },
    get: function get() {
      return this.attributes.items;
    },
    descriptor: {
      type: 'Selection',
      hidden: true
    },
    "export": function _export() {
      return undefined;
    }
  };
  SelectionPinHandlers[key] = SelectionPinHandlers.items;
});

/***/ }),

/***/ 42702:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.fontStyle2DomStyle = exports["default"] = void 0;
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var TextStyleHandlers = {};
TextStyleHandlers.textColor = {
  set: function set(value) {
    var vColor;
    try {
      if (value instanceof _Color["default"]) vColor = value;else if (typeof value === 'string') {
        vColor = _Color["default"].parse(value);
      } else vColor = new _Color["default"]([0, 0, 0, 0]);
    } catch (err) {
      (0, _safeThrow["default"])(err);
      vColor = new _Color["default"]([0, 0, 0, 0]);
    }
    value = vColor.toString('HEX8');
    this.domElt.addStyle('color', value);
    return value;
  },
  get: function get(ref) {
    var value = ref.get();
    value = value || '#000000';
    return value;
  },
  descriptor: {
    type: "color",
    sign: "TextColor",
    independence: true
  }
};
TextStyleHandlers.textSize = {
  set: function set(value) {
    if (value > 0) {
      this.domElt.addStyle('font-size', value + 'px');
    } else {
      this.domElt.removeStyle('font-size');
      value = undefined;
    }
    return value;
  },
  descriptor: {
    type: "number",
    nullable: true,
    defaultValue: 14,
    sign: "FontSize",
    independence: true
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  }
};
TextStyleHandlers.font = {
  set: function set(value) {
    if (value && value !== 'None' && value !== 'unset') this.domElt.addStyle('font-family', value);else this.domElt.removeStyle('font-family');
    return value;
  },
  descriptor: {
    type: "font",
    sign: 'TextFont',
    independence: true
  }
};
TextStyleHandlers.fontStyle = {
  set: function set(value) {
    if (!fontStyle2DomStyle[value]) value = 'Regular';
    this.domElt.addStyle(fontStyle2DomStyle[value] || fontStyle2DomStyle.Regular);
    return value;
  },
  descriptor: {
    type: "enum",
    values: ['Regular', 'Italic', 'Bold', 'Bold italic'],
    sign: 'FontStyle'
  },
  "export": function _export() {
    var value = arguments[arguments.length - 1].get();
    if (value === 'Regular') return undefined;
    return value;
  }
};
TextStyleHandlers.textDecoration = {
  set: function set(value) {
    this.domElt.addStyle('textDecoration', value);
    return value;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  },
  descriptor: {
    type: 'TextDecoration'
  }
};
var fontStyle2DomStyle = {
  Regular: {
    fontWeight: 'normal',
    fontStyle: 'normal'
  },
  Bold: {
    fontWeight: 'bold',
    fontStyle: 'normal'
  },
  'Bold italic': {
    fontWeight: 'bold',
    fontStyle: 'italic'
  },
  Italic: {
    fontWeight: 'normal',
    fontStyle: 'italic'
  }
};
exports.fontStyle2DomStyle = fontStyle2DomStyle;
TextStyleHandlers.textAlign = {
  set: function set(value) {
    if (['left', 'center', 'right'.indexOf(value) >= 0]) this.domElt.addStyle('text-align', value);else {}
    return value;
  },
  descriptor: {
    type: "textAlign",
    sign: "TextAlign",
    independence: true
  },
  "export": function _export() {
    var value = this.style.textAlign;
    if (['center', 'right'].indexOf(value) >= 0) return value;
    return undefined;
  }
};
var _default = TextStyleHandlers;
exports["default"] = _default;

/***/ }),

/***/ 2326:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.AssemblerInstance = void 0;
exports.findComponent = findComponent;
exports.findComponentById = findComponentById;
exports.findComponentByName = findComponentByName;
var _FNode = __webpack_require__(88215);
var _BaseComponent = _interopRequireDefault(__webpack_require__(32306));
var _FmFragment = _interopRequireDefault(__webpack_require__(9098));
var _CCLine = _interopRequireDefault(__webpack_require__(83141));
var _NotFoundForm = _interopRequireDefault(__webpack_require__(48389));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function Assembler() {}
Assembler.prototype.classes = {};
Assembler.prototype.componentConstructors = {};
Assembler.prototype.fragmentConstructors = {}; //share data

Assembler.prototype.traces = {};
Assembler.prototype.addClass = function () {
  var type;
  var tag;
  var clazz;
  if (arguments.length === 1) {
    clazz = arguments[0];
    if (typeof clazz !== 'function') return this;
    tag = clazz.prototype.tag;
  } else if (arguments.length === 2) {
    clazz = arguments[1];
    if (typeof clazz !== 'function') return this;
    tag = arguments[0];
  }
  if (!clazz) return this;
  type = clazz.prototype.type;
  this.classes[type] = this.classes[type] || {};
  this.classes[type][tag] = clazz;
  var trace = new Error();
  this.traces[trace.stack] = trace;
};

/***
 *
 * @param data
 * @param {FmFragment=} frag
 * @return {BaseComponent|FmFragment}
 */
Assembler.prototype.build = function (data, frag) {
  if (data["class"]) {
    return this.buildFragment(data);
  } else if (data.tag) {
    return this.buildComponent(data, frag);
  } else throw new Error("Can not detect data type!");
};
Assembler.prototype.buildFragment = function (data) {
  var constructor;
  if (typeof data["class"] === 'string') {
    constructor = this.classes[_FmFragment["default"].prototype.type] && this.classes[_FmFragment["default"].prototype.type][data["class"]] || data["class"].split('.').reduce(function (ac, cr) {
      if (ac) {
        ac = ac[cr];
      }
      return ac;
    }, window);
  } else if (typeof data["class"] === "function" && data["class"].prototype.type === "FRAGMENT") {
    constructor = data["class"];
  }
  if (!constructor) {
    console.error(data);
    constructor = _NotFoundForm["default"];
    // throw  new Error("Invalid FmFragment class!");
  }

  var frag = new constructor();
  if (constructor === _NotFoundForm["default"] && typeof data["class"] === 'string') {
    frag.tag = data["class"];
  }
  if (data.style) frag.view.setStyles(data.style);
  if (data.attributes) frag.view.setAttributes(data.attributes);
  try {
    if (typeof data.onCreated === "function") {
      frag.createdSync = data.onCreated.apply(frag, []);
    } else if (typeof data.onCreated === "string") {
      frag.createdSync = new Function(data.onCreated).apply(frag, []);
    }
  } catch (error) {
    (0, _safeThrow["default"])(error);
  }
  return frag;
};

/***
 *
 * @param data
 * @param {FmFragment=} frag
 * @return {BaseComponent}
 */
Assembler.prototype.buildComponent = function (data, frag) {
  var construction;
  if (typeof data.tag === "function") construction = data.tag;else construction = this.classes[_BaseComponent["default"].prototype.type][data.tag];
  if (!construction) throw new Error("Invalid tag " + data.tag);
  var result = new construction({
    layoutData: data
  });
  result.fragment = frag;
  var style = data.style;
  if (_typeof(style) == 'object') Object.assign(result.style, style);
  var attributes = data.attributes;
  if (_typeof(attributes) == 'object') Object.assign(result.attributes, attributes);
  var events = data.events;
  if (_typeof(events) == 'object') for (var eventName in events) {
    result.setEvent(eventName, events[eventName]);
  }
  try {
    if (typeof data.onCreated === "function") {
      result.createdSync = data.onCreated.apply(result, []);
    } else if (typeof data.onCreated === "string") {
      result.createdSync = new Function(data.onCreated).apply(result, []);
    }
  } catch (error) {
    (0, _safeThrow["default"])(error);
  }
  var children = data.children;
  if (children && children.length > 0) {
    for (var i = 0; i < children.length; ++i) {
      var child = this.build(children[i], frag);
      if (child.type === "FRAGMENT") {
        result.addChild(child.view);
        if (frag) frag.addChild(child);
      } else result.addChild(child);
    }
  }
  return result;
};
Assembler.prototype.buildBlock = function (data, frag) {
  var clazz;
  if (typeof data.tag === 'function') {
    clazz = data.tag;
  } else if (typeof data.tag === 'string') {
    clazz = this.classes['BLOCK'][data.tag];
  }
  if (!clazz) throw new Error('Invalid block tag ' + data.tag);
  var result = new clazz();
  result.fragment = frag;
  if (_typeof(data.attributes) === "object") {
    Object.assign(result.attributes, data.attributes);
  }
  try {
    if (typeof data.onCreated === "function") {
      result.createdSync = data.onCreated.apply(result, []);
    } else if (typeof data.onCreated === "string") {
      result.createdSync = new Function(data.onCreated).call(result);
    }
  } catch (error) {
    (0, _safeThrow["default"])(error);
  }
  return result;
};
Assembler.prototype.buildLine = function (data, blocks) {
  var u = blocks[data.u];
  var v = blocks[data.v];
  if (u && v) {
    return new _CCLine["default"](u, data.uPin, v, data.vPin, !!data.twoWay);
  }
};

/***
 * @deprecated
 * @returns {Assembler}
 */
Assembler.prototype.addConstructor = function () {
  return this.addClass.apply(this, arguments);
};

/***
 * @deprecated
 * @param arg0
 * @param arg1
 */
Assembler.prototype.removeConstructor = function (arg0, arg1) {
  if (typeof arg0 == 'function') {
    var name = arg0.prototype.tag || arg0.name;
    switch (arg0.prototype.type) {
      case "FRAGMENT":
        delete this.fragmentConstructors[name];
        break;
      case "COMPONENT":
        delete this.componentConstructors[name];
        break;
    }
  } else if (typeof arg0 == 'string' && (this.componentConstructors[arg0] === arg1 || arg1 == undefined)) {
    delete this.componentConstructors[arg0];
    delete this.fragmentConstructors[arg0];
  }
};
Assembler.prototype.addComponent = function (name, construction) {
  this.addConstructor(name, construction);
};
Assembler.prototype.removeComponent = function (name, construction) {
  this.removeConstructor(name, construction);
};
var _default = Assembler;
exports["default"] = _default;
var AssemblerInstance = new Assembler();
exports.AssemblerInstance = AssemblerInstance;
function findComponentByName(root, name) {
  var res = null;
  (0, _FNode.traversal)(root, function (ac) {
    if (ac.node.getAttribute('name') === name) {
      ac.stop();
      res = ac.node;
    }
  });
  return res;
}
function findComponentById(root, id) {
  var res = null;
  (0, _FNode.traversal)(root, function (ac) {
    if (ac.node.attributes.id === id) {
      ac.stop();
      res = ac.node;
    }
  });
  return res;
}
function findComponent(root, opt) {
  var res = null;
  opt = opt || {};
  if (typeof opt === 'string') {
    opt = {
      name: opt
    };
  }
  function isMatch(comp) {
    if (opt.name && opt.name === comp.getAttribute('name')) return true;
    return false;
  }
  (0, _FNode.traversal)(root, function (ac) {
    if (ac.node !== root && !opt.depth && ac.node.isFragmentView) {
      ac.skipChildren();
      return;
    }
    if (isMatch(ac.node)) {
      ac.stop();
      res = ac.node;
    }
  });
  return res;
}

/***/ }),

/***/ 29384:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _FModel = _interopRequireDefault(__webpack_require__(93274));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _stringGenerate = __webpack_require__(10713);
var _utils = __webpack_require__(16907);
var _CCBlock = _interopRequireDefault(__webpack_require__(99125));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @constructor
 * @augments EventEmitter
 * @augments FViewable
 * @augments FNode
 * @augments FModel
 */
function BaseBlock() {
  _EventEmitter["default"].call(this);
  _FModel["default"].call(this);
  _CCBlock["default"].call(this, {
    id: (0, _utils.randomUniqueIdent)()
  });
  /***
   *
   * @type {null|FmFragment}
   */
  this.fragment = null;
  this.attributes.loadAttributeHandlers(this.attributeHandlers);
  this.onCreated();
}
(0, _inheritComponentClass["default"])(BaseBlock, _EventEmitter["default"], _FModel["default"], _CCBlock["default"]);
BaseBlock.prototype.type = "BLOCK";
BaseBlock.prototype.tag = "BaseBlock";
BaseBlock.prototype.menuIcon = 'span.mdi.mdi-cube-outline';
BaseBlock.prototype.attributeHandlers.tag = {
  get: function get() {
    return this.tag;
  },
  descriptor: function descriptor() {
    return {
      type: 'const',
      value: this.tag
    };
  },
  "export": function _export() {
    return undefined;
  }
};
BaseBlock.prototype.attributeHandlers.id = {
  set: function set(value) {
    if (!value) value = (0, _stringGenerate.randomIdent)(16);
    this.id = value + '';
  },
  get: function get() {
    return this.id;
  },
  descriptor: function descriptor() {
    return {
      type: 'const',
      value: this.id
    };
  }
};
BaseBlock.prototype.attributeHandlers.displayName = {
  set: function set(value) {
    value = value || '';
    value += '';
    return value;
  },
  descriptor: {
    type: 'text',
    displayName: "Name"
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  }
};
BaseBlock.prototype.attributeHandlers.permissions = {
  descriptor: function descriptor() {
    return {
      type: 'Permission',
      disabled: !window['FORM_DEV_MODE']
    };
  },
  "export": function _export(ref) {
    var per = ref.get() || undefined;
    if (per && Object.keys(per).length > 0) return per;
    return undefined;
  }
};
BaseBlock.prototype.onCreate = function () {
  this.constructor.count = this.constructor.count || 0;
  this.attributes.displayName = '';
  this.attributes.name = this.tag + "_" + this.constructor.count++;
};
BaseBlock.prototype.onCreated = _noop["default"];
BaseBlock.prototype.onAttached = _noop["default"];
BaseBlock.prototype.getData = function () {
  var data = {
    tag: this.tag
  };
  var key;
  var attributes = this.attributes["export"]();
  for (key in attributes) {
    data.attributes = attributes;
    break;
  }
  return data;
};
BaseBlock.prototype.setAttributes = function (attributes) {
  Object.assign(this.attributes, attributes);
};
BaseBlock.prototype.pinOutCountOf = function (pinName) {
  if (!this.__cc_listener__[pinName]) return 0;
  return this.__cc_listener__[pinName].length;
};
var _default = BaseBlock;
exports["default"] = _default;

/***/ }),

/***/ 32306:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _FViewable = _interopRequireDefault(__webpack_require__(23600));
var _FNode = _interopRequireWildcard(__webpack_require__(88215));
var _FModel = _interopRequireDefault(__webpack_require__(93274));
var _PluginManager = _interopRequireDefault(__webpack_require__(19617));
var _FormEditorPreconfig = _interopRequireDefault(__webpack_require__(82599));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _stringGenerate = __webpack_require__(10713);
var _utils = __webpack_require__(16907);
var _CCBlock = _interopRequireDefault(__webpack_require__(99125));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _FAttributes = _interopRequireDefault(__webpack_require__(96720));
var _IndexedPropertyNames = _interopRequireDefault(__webpack_require__(63017));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _utils2 = __webpack_require__(84512);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var extendAttributeNames = Object.keys(_FormEditorPreconfig["default"].extendAttributes);

/***
 * @param {{layoutData:Object}=} opt
 * @constructor
 * @augments EventEmitter
 * @augments FViewable
 * @augments FNode
 * @augments BaseBlock
 */
function BaseComponent(opt) {
  this.opt = opt || {};
  _EventEmitter["default"].call(this);
  _FViewable["default"].call(this);
  _FNode["default"].call(this);
  _FModel["default"].call(this);
  _CCBlock["default"].call(this, {
    id: (0, _utils.randomUniqueIdent)()
  });
  /**
   * @type {AnchorBox|null}
   */
  this.anchor = null;
  /***
   *
   * @type {FmFragment}
   */
  this.fragment = null;
  this.onCreate();
  /***
   * @type {AElement}
   */
  this.domElt = this.render() || this.domElt;
  this.domElt.fmComponent = this;
  this.domElt.classList.add(this.BASE_COMPONENT_CLASS_NAME);
  this.onDomCreated();
  this.attributes.loadAttributeHandlers(this.attributeHandlers);
  this.style.loadAttributeHandlers(this.styleHandlers);
  this.events = new _FAttributes["default"](this);
  this.dataBindingDescriptor = this.createDataBindingDescriptor();
  this.compiledEvents = {};
  this.onCreated();
}
(0, _inheritComponentClass["default"])(BaseComponent, _FViewable["default"], _FNode["default"], _BaseBlock["default"]);
extendAttributeNames.forEach(function (name) {
  var prototypeConfig = _FormEditorPreconfig["default"].extendAttributes[name];
  if (prototypeConfig.setValue) BaseComponent.prototype['setAttribute' + name.substr(0, 1).toUpperCase() + name.substr(1)] = prototypeConfig.setValue;
  if (prototypeConfig.getValue) BaseComponent.prototype['getAttribute' + name.substr(0, 1).toUpperCase() + name.substr(1)] = prototypeConfig.getValue;
  if (prototypeConfig.getDescriptor) BaseComponent.prototype['getAttribute' + name.substr(0, 1).toUpperCase() + name.substr(1) + 'Descriptor'] = prototypeConfig.getDescriptor;else console.console.error('FormEditorPreconfig.extendAttributes["' + name + '"] must contains getDescriptor function');
});
BaseComponent.prototype.type = "COMPONENT";
BaseComponent.prototype.tag = "BaseComponent";
BaseComponent.prototype.menuIcon = "span.mdi.mdi-package-variant-closed";
BaseComponent.prototype.BASE_COMPONENT_CLASS_NAME = 'as-base-component';
BaseComponent.prototype.anchor = null;
BaseComponent.prototype.isLayout = false;
BaseComponent.prototype.style.display = 'block';
BaseComponent.prototype.style.position = 'static';
BaseComponent.prototype.style.vAlign = 'top';
BaseComponent.prototype.style.hAlign = 'left';
BaseComponent.prototype.style.width = 'auto';
BaseComponent.prototype.style.height = 'auto';
BaseComponent.prototype.attributeHandlers.id = {
  set: function set(value) {
    if (!value) value = (0, _stringGenerate.randomIdent)(16);
    this.id = value + '';
  },
  get: function get() {
    return this.id;
  },
  descriptor: function descriptor() {
    return {
      type: 'const',
      value: this.id,
      hidden: true
    };
  }
};
BaseComponent.prototype.attributeHandlers.permissions = _BaseBlock["default"].prototype.attributeHandlers.permissions;
BaseComponent.prototype.attributeHandlers.name = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    var prev = ref.get();
    value = value || (0, _utils.randomUniqueIdent)();
    value = value + '';
    this.domElt.attr('data-fm-name', value);
    if (value) this.domElt.attr('data-tutor-id', value);
    if (value !== prev) this.unbindDataInFragment();
    ref.set(value);
    this.bindDataToFragment();
    return value;
  },
  descriptor: function descriptor() {
    var root = this;
    while (root.parent && !root.formType) {
      root = root.parent;
    }
    var names = {};
    var self = this;
    function visit(node) {
      if (node !== self) {
        names[node.attributes.name] = node;
      }
      node.children.forEach(visit);
    }
    visit(root);
    return {
      type: 'uniqueText',
      others: names,
      regex: /^[a-zA-Z_0-9]$/,
      displayName: "ID",
      disabled: this.attributes.permissions && this.attributes.permissions.owner === 'system',
      dependency: ['permissions']
    };
  }
};
BaseComponent.prototype.attributeHandlers.tooltip = {
  set: function set(value) {
    if (!value) this.domElt.attr('title', undefined);else this.domElt.title = value;
  },
  get: function get() {
    return this.domElt.title;
  },
  descriptor: {
    type: 'text',
    "long": true
  },
  "export": function _export() {
    return this.domElt.title || undefined;
  }
};
BaseComponent.prototype.attributeHandlers.disembark = {
  set: function set(value, ref) {
    var prev = ref.get();
    if (value !== false || value === 'false') value = true;else value = false;
    ref.set(value);
    this.updateEmbark();
    if (prev !== value) {
      this.notifyChange();
    }
    //todo: check
    _ResizeSystem["default"].updateUp(this.domElt, true);
    _ResizeSystem["default"].requestUpdateUpSignal(this.domElt, true);
    setTimeout(function () {
      _ResizeSystem["default"].update();
    }, 100);
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (!value) return undefined;
    return !!value;
  },
  descriptor: {
    type: 'bool'
  }
};
BaseComponent.prototype.attributeHandlers.dataBinding = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    value = !!value;
    ref.set(value);
    if (value) {
      this.bindDataToFragment();
    } else {
      this.unbindDataInFragment();
    }
    return value;
  },
  descriptor: {
    type: 'bool'
  }
};
BaseComponent.prototype.attributeHandlers.union = {
  set: function set(value) {
    if (value === 'none') value = '';
    if (value === null || value === undefined) value = '';
    value = value + '';
    return value;
  },
  descriptor: function descriptor() {
    var _this = this;
    var res = {
      type: 'enum',
      values: ['none']
    };
    if (this.fragment) {
      (0, _FNode.traversal)(this.fragment.view, function (path) {
        if (path.node.tag === 'ComboBox' || "SelectListText") {
          res.values.push(path.node.attributes.name);
        }
        if (path.node.fragment !== _this.fragment) path.skipChildren();
      });
    }
    return res;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  }
};
BaseComponent.prototype.attributeHandlers.unionValues = {
  set: function set(value) {
    if (typeof value === 'string') value = value.split(/\s*;\s*/).map(function (s) {
      return s.trim();
    }).filter(function (x) {
      return !!x;
    });else if (!value || !value.map) value = [];
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (!value || value.length === 0) value = undefined;
    return value;
  },
  descriptor: {
    type: 'arrayOfText'
  }
};
BaseComponent.prototype.attributeHandlers.group = {
  set: function set(value) {
    value = value && value.trim();
    if (!value) value = undefined;
    return value;
  },
  descriptor: {
    type: 'text',
    sign: 'Group'
  },
  "export": function _export(ref) {
    var value = ref.get();
    value = value && value.trim();
    if (!value) value = undefined;
    return value;
  }
};
BaseComponent.prototype.pinHandlers.attributes = {
  receives: function receives(value) {
    if (_typeof(value) === "object") {
      Object.assign(this.attributes, value);
    }
  },
  descriptor: {
    type: 'object'
  }
};
BaseComponent.prototype.pinHandlers.style = {
  receives: function receives(value) {
    if (_typeof(value) === "object") {
      Object.assign(this.style, value);
    }
  },
  descriptor: {
    type: 'object'
  }
};
BaseComponent.prototype.pinHandlers.disembark = {
  receives: function receives(value) {
    this.attributes.disembark = !!value;
  },
  descriptor: {
    type: 'bool'
  }
};
BaseComponent.prototype.pinHandlers.embark = {
  receives: function receives(value) {
    this.attributes.disembark = !value;
  },
  descriptor: {
    type: 'bool'
  }
};
BaseComponent.prototype.pinHandlers.display = {
  receives: function receives(value) {
    this.style.hidden = !value;
    _ResizeSystem["default"].updateUp(this.domElt, true);
    _ResizeSystem["default"].requestUpdateUpSignal(this.domElt, true);
  },
  descriptor: {
    type: 'bool'
  }
};
BaseComponent.prototype.pinHandlers.hidden = {
  receives: function receives(value) {
    this.style.hidden = !!value;
  },
  descriptor: {
    type: 'bool'
  }
};
BaseComponent.prototype.onCreate = function () {
  this.constructor.count = this.constructor.count || 0;
  this.attributes.displayName = '';
  this.attributes.name = this.tag + "_" + this.constructor.count++;
  this.attributes.disembark = false;
  this.attributes.dataBinding = true;
  var self = this;
  extendAttributeNames.forEach(function (name) {
    var func = _FormEditorPreconfig["default"].extendAttributes[name].getDefault;
    if (func) self.attributes[name] = func.call(self);
  });
};
BaseComponent.prototype.onCreated = _noop["default"];
BaseComponent.prototype.onAnchorAttached = _noop["default"];
BaseComponent.prototype.onAnchorDetached = _noop["default"];
BaseComponent.prototype.onAttached = _noop["default"];
BaseComponent.prototype.onFragmentAttached = _noop["default"];
BaseComponent.prototype.onStart = function () {
  this.updateViewStyle();
  var value;
  if (this.pinHandlers.value) {
    value = this.pinHandlers.value.get && this.pinHandlers.value.get.call(this);
    if (value !== undefined && value !== null) {
      this.pinFire('value');
    }
  }
};
BaseComponent.prototype.getData = function () {
  var self = this;
  var data = {
    tag: this.tag
  };
  var key;
  var attributes = this.attributes["export"]();
  for (key in attributes) {
    data.attributes = attributes;
    break;
  }
  var style = this.style["export"]();
  for (key in attributes) {
    data.style = style;
    break;
  }
  var eventsKeys = Object.keys(this.events || {}).filter(function (key) {
    return self.events[key] !== undefined || self.events[key] !== null;
  });
  if (eventsKeys.length > 0) {
    data.events = eventsKeys.reduce(function (ac, key) {
      ac[key] = self.events[key];
      return ac;
    }, {});
  }
  if (this.children.length > 0) {
    data.children = this.children.map(function (child) {
      if (child.isFragmentView) {
        var childStyle = child.style["export"]();
        var childAttributes = child.attributes["export"]();
        var childData = {
          "class": child.fragment.tag
        };
        for (key in childStyle) {
          childData.style = childStyle;
          break;
        }
        for (key in childAttributes) {
          childData.attributes = childAttributes;
          break;
        }
        return childData;
      } else {
        return child.getData();
      }
    });
  }
  return data;
};
BaseComponent.prototype.fire = function (name) {
  _EventEmitter["default"].prototype.fire.apply(this, arguments);
  if (this.events && this.events[name]) {
    _PluginManager["default"].exec(this, 'EXEC_SCRIPT', this.events[name], Array.prototype.slice.call(arguments, 1));
  }
  return this;
};
BaseComponent.prototype.setEvents = function (events) {
  for (var name in events) {
    this.setEvent(name, events[name]);
  }
};
BaseComponent.prototype.setAttributes = function (attributes) {
  Object.assign(this.attributes, attributes);
};
BaseComponent.prototype.setStyles = function (styles) {
  Object.assign(this.style, styles);
};
BaseComponent.prototype.setEvent = function (key, value) {
  if (value === undefined) {
    delete this.events[key];
  } else this.events[key] = value;
  return value;
};
BaseComponent.prototype.getAcceptsStyleNames = function () {
  var dict = Object.assign({}, this.styleHandlers);
  if (this.anchor) Object.assign(dict, this.anchor.styleHandlers);
  var names = Object.keys(dict);
  var indexed = _IndexedPropertyNames["default"];
  names.sort(function (a, b) {
    return indexed[a] - indexed[b];
  });
  return names;
};
BaseComponent.prototype.measureMinSize = function () {
  return {
    width: 0,
    height: 0
  };
};

/**
 * @param {String} name
 * @returns {}
 */
BaseComponent.prototype.getEventDescriptor = function (name) {
  return {
    type: 'function'
  };
};
BaseComponent.prototype.getAttributeDataBindingDescriptor = function () {
  return {
    type: 'bool',
    value: !!this.attributes.dataBinding,
    "default": true
  };
};
BaseComponent.prototype.updateViewStyle = function () {
  var bound = this.domElt.getBoundingClientRect();
  this.domElt.addStyle('--as-view-width', bound.width + 'px');
  this.domElt.addStyle('--as-view-height', bound.height + 'px');
};

/****
 *
 * @param value
 * @param {"%"|"px"|null}unit
 * @param {"width"|"height"} by
 * @param {string=} targetUnit
 */
BaseComponent.prototype.implicitMeasureSizeValue = function (value, unit, by, targetUnit) {
  var parentElement = this.parent ? this.parent.domElt : this.domElt.parentElement;
  var byMS = (0, _utils.parseMeasureValue)(this.style[by]) || {
    value: 'auto',
    unit: null
  };
  if (targetUnit === undefined) targetUnit = byMS.unit;
  var newValue;
  var parsedNew;
  if (value === 'match_parent') {
    newValue = 'match_parent';
  } else if (value === 'auto') {
    newValue = 'auto';
  } else if (unit) {
    //need convert
    value = parseFloat(value) || 0;
    if (targetUnit === '%') {
      if (unit === 'px') {
        newValue = value * 100 / parentElement.getBoundingClientRect()[by] + '%';
      } else if (unit === '%') {
        newValue = value + '%';
      }
    } else if (targetUnit === 'px' || !targetUnit) {
      if (unit === '%') {
        newValue = value / 100 * parentElement.getBoundingClientRect()[by];
      } else if (unit === 'px') {
        newValue = value;
      }
    } else {
      newValue = 'auto';
    }
  } else {
    parsedNew = (0, _utils.parseMeasureValue)(value) || {
      value: "auto",
      unit: null
    };
    newValue = parsedNew.unit === 'px' ? parsedNew.value || 0 : parsedNew.value + (parsedNew.unit || '');
  }
  return newValue;
};

/****
 *
 * @param value
 * @param {"%"|"px"|null}unit
 * @param {"width"|"height"} by
 * @returns {string|*|number|number}
 */
BaseComponent.prototype.explicitMeasureSizeValue = function (value, unit, by) {
  var parentElement = this.parent ? this.parent.domElt : this.domElt.parentElement;
  var current = (0, _utils.parseMeasureValue)(value) || {
    value: 'auto',
    unit: null
  };
  if (unit) {
    if (unit === 'px') {
      if (current.unit === 'px') {
        return current.value || 0;
      } else if (current.unit === '%') {
        return parentElement.getBoundingClientRect()[by] * (current.value || 0) / 100;
      } else {
        return parentElement.getBoundingClientRect()[by];
      }
    } else if (unit === '%') {
      if (current.unit === '%') {
        return current.value || 0;
      } else {
        return this.domElt.getBoundingClientRect()[by] * 100 / parentElement.getBoundingClientRect()[by];
      }
    }
  }
  return value;
};
BaseComponent.prototype.positionHandlers = {};
BaseComponent.prototype.positionHandlers.width = {
  by: 'width'
};
BaseComponent.prototype.positionHandlers.height = {
  by: 'height'
};
Object.keys(BaseComponent.prototype.positionHandlers).forEach(function (key) {
  var handler = BaseComponent.prototype.positionHandlers[key];
  BaseComponent.prototype.styleHandlers[key] = {};
  BaseComponent.prototype.styleHandlers[key].set = function (value) {
    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }
    var ref = args.pop();
    var unit = args.shift();
    var newValue = this.implicitMeasureSizeValue(value, unit, handler.by);
    var styleValue = newValue;
    if (newValue === 'match_parent') styleValue = '100%';
    if (newValue === 'auto') {
      this.domElt.removeStyle('--as-' + key);
      this.domElt.addClass('as-' + key + '-auto');
    } else if ((0, _utils2.isRealNumber)(value)) {
      this.domElt.addStyle('--as-' + key, styleValue + 'px');
      this.domElt.removeClass('as-' + key + '-auto');
    } else {
      this.domElt.addStyle('--as-' + key, styleValue);
      this.domElt.removeClass('as-' + key + '-auto');
    }
    ref.set(newValue);
    this.updateViewStyle();
    this.onSizeChange();
    return newValue;
  };
  BaseComponent.prototype.styleHandlers[key].get = function () {
    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
      args[_key2] = arguments[_key2];
    }
    var ref = args.pop();
    var unit = args.shift();
    return this.explicitMeasureSizeValue(ref.get(), unit, handler.by);
  };
  BaseComponent.prototype.styleHandlers[key].descriptor = {
    type: 'measureSize'
  };
  BaseComponent.prototype.styleHandlers[key]["export"] = function (ref) {
    var value = ref.get();
    if (value === this.constructor.prototype.style.width) value = undefined;
    return value;
  };
});
BaseComponent.prototype.onSizeChange = _noop["default"];
BaseComponent.prototype.styleHandlers.hidden = {
  set: function set(value) {
    value = !!value;
    if (value) this.domElt.addClass('as-display-hidden');else this.domElt.removeClass('as-display-hidden');
    return value;
  },
  descriptor: {
    type: 'boolean'
  }
};
BaseComponent.prototype.updateEmbarkStyle = function () {
  var disembark = this.attributes.disembark;
  if (disembark) {
    if (this.anchor) {
      this.domElt.removeClass('as-disembark');
      this.anchor.domElt.addClass('as-disembark');
    } else {
      this.domElt.addClass('as-disembark');
    }
  } else {
    this.domElt.removeClass('as-disembark');
    if (this.anchor) this.anchor.domElt.removeClass('as-disembark');
  }
};
BaseComponent.prototype.updateEmbark = function () {
  var disembark = this.attributes.disembark;
  this.updateEmbarkStyle();
  if (!this.fragment || !this.fragment.view) return;
  var parent = this.parent;
  while (parent && !parent.isFragmentView) {
    if (parent.attributes.disembark) break;
    parent = parent.parent;
  }
  if (parent && !parent.isFragmentView) return;
  var fragment = this.fragment;
  (0, _FNode.traversal)(this, function (path) {
    var node = path.node;
    var pDE = path.path.some(function (node) {
      return node.attributes.disembark;
    });
    node.updateEmbarkStyle();
    node.bindDataToFragment(disembark || pDE, true);
    if (node.fragment !== fragment) {
      path.skipChildren();
    }
  });
  _ResizeSystem["default"].requestUpdateSignal();
};
BaseComponent.prototype.createDataBindingDescriptor = function () {};

/***
 *
 * @param {boolean=} parentDisembark
 * @param {boolean=} reset
 */
BaseComponent.prototype.bindDataToFragment = function (parentDisembark, reset) {
  if (!this.fragment) return;
  var name = this.attributes.name;
  if (!name) return;
  var boundProp = this.fragment.boundProps[name];
  if (boundProp === this && !reset) return;
  var descriptor = this.dataBindingDescriptor;
  if (!descriptor) return;
  if (!this.attributes.dataBinding) return;
  var obj = this.fragment._props;
  Object.assign(descriptor, {
    enumerable: !this.attributes.disembark && !parentDisembark,
    configurable: true
  });
  Object.defineProperty(obj, name, descriptor);
  this.fragment.boundProps[name] = this;
};
BaseComponent.prototype.unbindDataInFragment = function () {
  if (!this.fragment) return;
  var name = this.attributes.name;
  if (!name) return;
  var boundProp = this.fragment.boundProps[name];
  if (boundProp !== this) return;
  var obj = this.fragment._props;
  delete obj[name];
  delete this.fragment.boundProps[name];
};

/***
 * @param {*=} data
 */
BaseComponent.prototype.notifyChange = function (data) {
  this.emit('change', Object.assign({
    type: 'change'
  }, data || {}), this);
  var bounded;
  if (this.attributes.dataBinding && this.fragment) {
    bounded = this.fragment.boundProps[this.attributes.name];
    if (bounded) {
      if (bounded === this || bounded.indexOf && bounded.indexOf(this) >= 0) {
        this.fragment.notifyPropsChange({
          name: this.attributes.name
        });
      }
    }
  }
};
Object.defineProperty(BaseComponent.prototype, 'view', {
  get: function get() {
    return this.domElt;
  }
});
Object.defineProperty(BaseComponent.prototype, 'isFragmentView', {
  get: function get() {
    return this.fragment && this.fragment.view === this;
  }
});
var _default = BaseComponent;
exports["default"] = _default;

/***/ }),

/***/ 90889:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _CMDRunner = _interopRequireDefault(__webpack_require__(34470));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @constructor
 * @augments Fragment
 * @augments EventEmitter
 */
function BaseEditor() {
  _EventEmitter["default"].call(this);
  _Fragment["default"].call(this);
  this.cmdRunner = new _CMDRunner["default"](this);
  this.cmdBindKeys = {};
  this.loadConfig();
}
_OOP["default"].mixClass(BaseEditor, _EventEmitter["default"], _Fragment["default"]);
BaseEditor.prototype.CONFIG_STORE_KEY = "AS_BaseEditor_config";
BaseEditor.prototype.config = {}; //share width differentInstance

BaseEditor.prototype.loadConfig = function () {
  var raw = localStorage.getItem(this.CONFIG_STORE_KEY);
  if (raw) {
    try {
      Object.assign(this.config, (0, _generator.replaceDateStringJSVariable)(JSON.parse(raw)));
    } catch (error) {
      (0, _safeThrow["default"])(error);
      console.error("Config fail:", error);
    }
  }
};

/***
 *
 * @param {boolean=} immediately
 */
BaseEditor.prototype.saveConfig = function (immediately) {
  if (this._saveConfigTimeOut > 0) {
    clearTimeout(this._saveConfigTimeOut);
    this._saveConfigTimeOut = -1;
  }
  var self = this;
  var save = function save() {
    var raw = JSON.stringify(self.config);
    localStorage.setItem(self.CONFIG_STORE_KEY, raw);
  };
  if (immediately) {
    save();
  } else {
    this._saveConfigTimeOut = setTimeout(save, 2000);
  }
};
BaseEditor.prototype.setupCmd = function (commands, descriptors) {
  if (commands) this.cmdRunner.assign(commands);
  if (descriptors) Object.keys(descriptors).forEach(function (cmd) {
    if (descriptors[cmd].bindKey) this.bindKeyToCmd(descriptors[cmd].bindKey.win, cmd);
  }.bind(this));
};
BaseEditor.prototype.setData = function (data) {
  throw new Error('Not implement!');
};
BaseEditor.prototype.getData = function () {
  throw new Error('Not implement!');
};
BaseEditor.prototype.getComponentTool = function () {
  return undefined;
};
BaseEditor.prototype.getOutlineTool = function () {
  return undefined;
};
BaseEditor.prototype.notifyDataChange = function () {
  this.emit('datachange', {
    type: 'datachange',
    target: this
  }, this);
};
BaseEditor.prototype.execCmd = function () {
  return this.cmdRunner.invoke.apply(this.cmdRunner, arguments);
};
BaseEditor.prototype.getCmdNames = function () {
  return [];
};
BaseEditor.prototype.getCmdDescriptors = function () {
  var self = this;
  return this.getCmdNames().reduce(function (ac, name) {
    ac[name] = self.getCmdDescriptor(name);
    return ac;
  }, {});
};
BaseEditor.prototype.getCmdDescriptor = function (name) {
  return {
    type: 'trigger',
    args: [],
    desc: '',
    bindKey: undefined
  };
};
BaseEditor.prototype.notifyCmdDescriptorsChange = function () {
  this.emit('cmddescriptorschange');
};
BaseEditor.prototype.notifyCmdChange = function () {
  console.trace(1);
  this.emit('cmdchange', {
    type: 'cmdchange'
  }, this);
};
BaseEditor.prototype.getCmdGroupTree = function () {
  return [];
};
BaseEditor.prototype.bindKeyToCmd = function (key, cmd) {
  this.cmdBindKeys[key] = cmd;
};
BaseEditor.prototype._isInputSupportedKey = function (target, key) {
  var isTextInput = !!(target.tagName && target.tagName.toLowerCase().match(/input|textarea/));
  isTextInput = isTextInput || target.contentEditable === 'true' || target.contentEditable === true || target.getAttribute('contenteditable') !== null;
  var cur = target.parentElement;
  while (cur && !!isTextInput) {
    isTextInput = isTextInput || cur.contentEditable === 'true' || cur.contentEditable === true || cur.getAttribute('contenteditable') !== null;
    cur = cur.parentElement;
  }
  return isTextInput && ['Ctrl-A', 'Ctrl-C', 'Ctrl-X', 'Ctrl-V', 'Ctrl-Z', 'Ctrl-Y', 'Delete', 'Backspace', 'Esc', 'Enter', 'Alt-Enter', 'Ctrl-Enter'].indexOf(key) >= 0;
};

/**
 * @param {KeyboardEvent}event
 */
BaseEditor.prototype.ev_cmdKeyDown = function (event) {
  var specKeys = [];
  if (event.ctrlKey) specKeys.push('Ctrl');
  if (event.shiftKey) specKeys.push('Shift');
  if (event.altKey) specKeys.push('Alt');
  var key = event.key;
  if (key.length == 1) key = key.toUpperCase();
  var key1 = specKeys.concat([key]).join('-');
  var key2 = specKeys.concat([event.keyCode]).join('-');
  var cmd = this.cmdBindKeys[key1] || this.cmdBindKeys[key2];
  if (cmd && !this._isInputSupportedKey(event.target, key1)) {
    this.execCmd(cmd, event);
    event.preventDefault();
  }
};
var _default = BaseEditor;
exports["default"] = _default;

/***/ }),

/***/ 94975:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(16907);
var _utils2 = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends ScalableComponent
 * @constructor
 */
function BaseLayout() {
  _ScalableComponent["default"].call(this);
  /**
   * @type {BaseComponent[]}
   * @name children
   * @memberof BaseLayout#
   */
}

(0, _inheritComponentClass["default"])(BaseLayout, _ScalableComponent["default"]);
BaseLayout.prototype.isLayout = true;
['left', 'right', 'top', 'bottom'].forEach(function (pos) {
  var key = 'padding' + pos[0].toUpperCase() + pos.substring(1);
  BaseLayout.prototype.style[key] = 0;
  BaseLayout.prototype.styleHandlers[key] = {
    /***
     * @this BaseComponent
     * @param value
     * @returns {*}
     */
    set: function set(value) {
      var ref = arguments[arguments.length - 1];
      var unit = arguments.length > 2 ? arguments[1] : undefined;
      var currentValue = ref.get();
      var current = (0, _utils.parseMeasureValue)(currentValue) || {
        value: 'auto',
        unit: null
      };
      value = this.implicitMeasureSizeValue(value, unit, 'width', current.unit);
      if (value === 'auto' || !current) {
        this.domElt.removeStyle('padding-' + pos);
      } else if (value === 'match_parent') {
        this.domElt.addStyle('padding-' + pos, '100%');
      } else if ((0, _utils2.isRealNumber)(value)) {
        this.domElt.addStyle('padding-' + pos, value + 'px');
      } else this.domElt.addStyle('padding-' + pos, value);
      return value;
    },
    get: function get() {
      var unit = arguments.length > 1 ? arguments[0] : undefined;
      var ref = arguments[arguments.length - 1];
      var value = ref.get();
      var parentBound;
      if (unit === 'px') {
        if (value !== 'number') {
          return parseFloat(this.domElt.getComputedStyleValue('padding-' + pos).replace('px', ''));
        } else {
          return value;
        }
      } else if (unit === '%') {
        if (typeof value === 'string' && value.match(/%$/)) return parseFloat(value.replace('%', ''));else {
          parentBound = this.parent.domElt.getBoundingClientRect();
          return parseFloat(this.domElt.getComputedStyleValue('padding-' + pos).replace('px', '')) * 100 / parentBound.width;
        }
      } else return value;
    },
    descriptor: {
      type: 'measurePosition',
      sign: 'padding_' + pos
    },
    "export": function _export() {
      var value = this.style[key];
      if (value === this.constructor.prototype.style[key]) value = undefined;
      return value;
    }
  };
});
BaseLayout.prototype.styleHandlers.backgroundImage = {
  set: function set(value) {
    if (value && value.length > 0) {
      this.domElt.addStyle('backgroundImage', 'url(' + value + ')');
      this.domElt.addStyle('backgroundSize', '100% 100%');
    } else {
      this.domElt.removeStyle('backgroundImage');
      this.domElt.removeStyle('backgroundSize');
    }
    return value;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  },
  descriptor: {
    type: 'text',
    "long": true,
    sign: 'BackgroundImageSrc',
    independence: true
  }
};
BaseLayout.prototype.styleHandlers.backgroundColor = {
  set: function set(value) {
    if (value) {
      this.domElt.addStyle('backgroundColor', value);
    } else {
      this.domElt.removeStyle('backgroundColor');
    }
    return value;
  },
  descriptor: {
    type: 'color',
    sign: 'BackgroundColor',
    independence: true
  }
};
BaseLayout.prototype.styleHandlers['print:break-inside'] = {
  set: function set(value) {
    if (value === 'avoid') {
      this.domElt.addStyle('break-inside', 'avoid');
    } else {
      this.domElt.removeStyle('break-inside');
    }
    return value;
  },
  get: function get(ref) {
    var value = ref.get();
    if (value === 'avoid') return 'avoid';
    return 'unset';
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'avoid') return 'avoid';
    return undefined;
  },
  descriptor: {
    type: 'enum',
    sign: 'print:break-inside',
    independence: true,
    values: ['unset', 'avoid']
  }
};
BaseLayout.prototype.create = function () {
  _ScalableComponent["default"].prototype.create.call(this);
  this.style.vAlign = 'fixed';
  this.style.hAlign = 'fixed';
  this.style.backgroundColor = 'rgba(0, 0, 0, 0)';
  this.style.backgroundImage = '';
};
BaseLayout.prototype.addChildByPosition = function (child, posX, posY) {
  throw new Error("Not implement!");
};
BaseLayout.prototype.getAcceptsStyleNames = function () {
  return _ScalableComponent["default"].prototype.getAcceptsStyleNames.call(this).concat(['backgroundColor', 'backgroundImage']);
};
BaseLayout.prototype.bindDataToFragment = function (parentDisembark, reset) {
  if (!this.fragment) return;
  if (!this.fragment.parent) return;
  /***
   *
   * @type {FmFragment}
   */
  var parentFragment = this.fragment.parent;
  var fragment = this.fragment;
  var name = this.attributes.name;
  if (!name) return;
  var boundProp = parentFragment.boundProps[name];
  if (!reset && boundProp === this) return;
  var descriptor = {
    set: function set(obj) {
      fragment.props = obj;
    },
    get: function get() {
      return fragment.props;
    }
  };
  if (!this.attributes.dataBinding) return;
  var obj = parentFragment.props;
  Object.assign(descriptor, {
    enumerable: !this.attributes.disembark && !parentDisembark,
    configurable: true
  });
  Object.defineProperty(obj, name, descriptor);
  this.fragment.boundProps[name] = this;
};
BaseLayout.prototype.unbindDataInFragment = function () {
  if (!this.fragment) return;
  if (!this.fragment.parent) return;
  var name = this.attributes.name;
  if (!name) return;
  /***
   *
   * @type {FmFragment}
   */
  var parentFragment = this.fragment.parent;
  var boundProp = parentFragment.boundProps[name];
  if (boundProp !== this) return;
  var obj = parentFragment.props;
  delete obj[name];
  delete parentFragment.boundProps[name];
};
var _default = BaseLayout;
exports["default"] = _default;

/***/ }),

/***/ 25729:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Svg = _interopRequireDefault(__webpack_require__(98315));
__webpack_require__(26189);
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Svg["default"].ShareInstance._;
var $ = _Svg["default"].ShareInstance.$;

/**
 * @extends ScalableComponent
 * @constructor
 */
function BaseShape() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(BaseShape, _ScalableComponent["default"]);
BaseShape.prototype.tag = "BaseShape";
BaseShape.prototype.style.fillColor = 'red';
BaseShape.prototype.style.strokeColor = 'blue';
BaseShape.prototype.style.strokeWidth = 1;
BaseShape.prototype.style.width = 30;
BaseShape.prototype.style.height = 30;
BaseShape.prototype.onDomCreated = function () {
  this.$content = $('.as-base-shape-content', this.domElt);
};
BaseShape.prototype.render = function () {
  return _({
    tag: 'svg',
    "class": 'as-base-shape',
    child: [this.renderContent().addClass('as-base-shape-content'), {
      tag: 'attachhook',
      on: {
        attached: this.updateShape.bind(this)
      }
    }]
  });
};
BaseShape.prototype.renderContent = function () {
  throw new Error('Not Implement!');
};
BaseShape.prototype.onAttached = function () {
  this.updateShape();
};
BaseShape.prototype.onSizeChange = function () {
  this.updateShape();
};
BaseShape.prototype.updateShape = function () {
  //not implement
};
BaseShape.prototype.styleHandlers.fillColor = {
  set: function set(value) {
    var color = undefined;
    if (!(color instanceof _Color["default"])) {
      try {
        color = _Color["default"].parse(value);
      } catch (error) {
        color = undefined;
      }
    }
    color = color || new _Color["default"]([0, 0, 0, 0]);
    value = color.toString();
    this.$content.addStyle('fill', value);
    return value;
  },
  descriptor: {
    type: 'color',
    sign: 'FillColor'
  }
};
BaseShape.prototype.styleHandlers.strokeColor = {
  set: function set(value) {
    var color = undefined;
    if (!(color instanceof _Color["default"])) {
      try {
        color = _Color["default"].parse(value);
      } catch (error) {
        color = undefined;
      }
    }
    color = color || new _Color["default"]([0, 0, 0, 0]);
    value = color.toString();
    this.$content.addStyle('stroke', value);
    return value;
  },
  descriptor: {
    type: 'color',
    sign: 'StrokeColor'
  }
};
BaseShape.prototype.styleHandlers.strokeWidth = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    this.$content.addStyle('strokeWidth', value + '');
    ref.set(value);
    this.updateShape();
    return value;
  },
  descriptor: {
    type: 'number'
  }
};
var _default = BaseShape;
exports["default"] = _default;

/***/ }),

/***/ 98003:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(26189);
var _ScalableComponent = _interopRequireDefault(__webpack_require__(86655));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/***
 * @extends ScalableComponent
 * @constructor
 */
function ContentScalelessComponent() {
  _ScalableComponent["default"].call(this);
}
(0, _inheritComponentClass["default"])(ContentScalelessComponent, _ScalableComponent["default"]);
ContentScalelessComponent.prototype.tag = "ContentScalelessComponent";
ContentScalelessComponent.prototype.BOX_ALIGN_CLASSES = {
  lefttop: 'as-align-left-top',
  centertop: 'as-align-center-top',
  righttop: 'as-align-right-top',
  leftcenter: 'as-align-left-center',
  centercenter: 'as-align-center-center',
  rightcenter: 'as-align-right-center',
  leftbottom: 'as-align-left-bottom',
  centerbottom: 'as-align-center-bottom',
  rightbottom: 'as-align-right-bottom'
};
ContentScalelessComponent.prototype.style.boxAlign = 'lefttop';
ContentScalelessComponent.prototype.styleHandlers.boxAlign = {
  set: function set(value) {
    var accepts = Object.keys(this.BOX_ALIGN_CLASSES);
    if (accepts.indexOf(value) < 0) value = 'lefttop';
    var lastClass = this.BOX_ALIGN_CLASSES[this.style.boxAlign];
    if (lastClass) this.domElt.removeClass(lastClass);
    this.domElt.addClass(this.BOX_ALIGN_CLASSES[value]);
    return value;
  },
  descriptor: {
    type: 'boxAlign'
  }
};
ContentScalelessComponent.prototype.onCreate = function () {
  _ScalableComponent["default"].prototype.onCreate.call(this);
};
ContentScalelessComponent.prototype.render = function () {
  this.$content = this.renderContent() || this.$content;
  this.$cell = _({
    "class": 'as-component-content-scaleless-cell',
    child: this.$content
  });
  this.domElt = _({
    "class": 'as-component-content-scaleless',
    child: this.$cell
  });
};
ContentScalelessComponent.prototype.renderContent = function () {
  throw new Error('Not Implement!');
};
ContentScalelessComponent.prototype.getAcceptsStyleNames = function () {
  return _ScalableComponent["default"].prototype.getAcceptsStyleNames.call(this).concat(['boxAlign']);
};
ContentScalelessComponent.prototype.measureMinSize = function () {
  if (!this.$content) return {
    width: 69,
    height: 30
  };
  var bound = this.$content.getBoundingClientRect();
  return {
    width: bound.width,
    height: bound.height
  };
};
var _default = ContentScalelessComponent;
exports["default"] = _default;

/***/ }),

/***/ 96720:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = _Attributes["default"];
exports["default"] = _default;

/***/ }),

/***/ 51518:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports._ = exports.$$ = exports.$ = void 0;
var _absolAcomp = _interopRequireDefault(__webpack_require__(2515));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _absolColorpicker = _interopRequireDefault(__webpack_require__(3600));
var _install = _interopRequireDefault(__webpack_require__(4337));
var _install2 = _interopRequireDefault(__webpack_require__(40234));
var _ColorPickerButton = _interopRequireDefault(__webpack_require__(34443));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var FCore = new _Dom["default"]();
(0, _install["default"])(FCore);
var _ = FCore._;
exports._ = _;
var $ = FCore.$;
exports.$ = $;
var $$ = FCore.$$;
exports.$$ = $$;
(0, _install2["default"])(FCore);
FCore.install(_absolColorpicker["default"].core);
FCore.install(_ColorPickerButton["default"]);
var _default = FCore;
exports["default"] = _default;

/***/ }),

/***/ 93274:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FAttributes = _interopRequireDefault(__webpack_require__(96720));
var _IndexedPropertyNames = _interopRequireDefault(__webpack_require__(63017));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function FModel() {
  var defaultAttribute = this.attributes;
  var attributes = new _FAttributes["default"](this);
  Object.defineProperty(this, 'attributes', {
    enumerable: true,
    set: function set(value) {
      Object.assign(attributes, value);
    },
    get: function get() {
      return attributes;
    }
  });
  Object.assign(this.attributes, defaultAttribute);
}
FModel.prototype.attributes = {};

/**
 * @returns {Array<String>}
 */
FModel.prototype.getAcceptsAttributeNames = function () {
  var dict = Object.assign({}, this.attributeHandlers);
  var names = Object.keys(dict);
  var indexed = _IndexedPropertyNames["default"];
  names.sort(function (a, b) {
    return indexed[a] - indexed[b];
  });
  return names;
};

/**
 * @param {String} name
 * @returns {}
 */
FModel.prototype.getAttributeDescriptor = function (name) {
  return this.attributes.getPropertyDescriptor(name);
};

/**
 * @returns {}
 */
FModel.prototype.getAttributeDescriptors = function () {
  var result = {};
  var names = this.getAcceptsAttributeNames();
  var key;
  for (var i = 0; i < names.length; ++i) {
    key = names[i];
    result[key] = this.getAttributeDescriptor(key);
  }
  return result;
};

/**
 * @param {String} name
 * @param {} value
 * @returns {} value which is set
 */
FModel.prototype.setAttribute = function (name, value) {
  this.attributes[name] = value;
};

/**
 * @param {String} name
 * @returns {} value which is set
 */
FModel.prototype.getAttribute = function (name) {
  return this.attributes[name];
};
FModel.prototype.getAttributes = function () {
  var res = Object.assign({}, this.attributes["export"]());
};
FModel.prototype.setAttributes = function (attributes) {
  Object.assign(this.attributes, attributes);
};
FModel.prototype.attributeHandlers = {};
FModel.prototype.getAttributeHandlers = function () {
  return this.attributeHandlers;
};
var _default = FModel;
exports["default"] = _default;

/***/ }),

/***/ 88215:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.traversal = traversal;
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/****
 * @extends Context
 * @constructor
 */
function FNode() {
  _Context["default"].apply(this, arguments);
  /**
   * @type {Array<FNode>}
   */
  this.children = [];
  /**
   * @type {FNode}
   * @name parent
   * @memberOf FNode#
   */
}

_OOP["default"].mixClass(FNode, _Context["default"]);
FNode.prototype.start = function (standBy) {
  if (this.state.match(/DIE/)) {
    console.error(this, 'DIED!');
    return;
  }
  if (this.state.match(/RUNNING/)) return;
  if (this.state.match(/STOP|CREATE/)) {
    this.state = "STANDBY";
    this.onStart && this.onStart();
    this.children.forEach(function (child) {
      return child.start(true);
    });
  }
  if (!standBy && this.state.match(/STANDBY|PAUSE/)) {
    this.resume();
  }
};
FNode.prototype.resume = function () {
  _Context["default"].prototype.resume.apply(this, arguments);
  this.children.forEach(function (child) {
    return child.resume();
  });
};
FNode.prototype.pause = function () {
  this.children.forEach(function (child) {
    return child.pause();
  });
  _Context["default"].prototype.pause.apply(this, arguments);
};
FNode.prototype.stop = function () {
  if (this.state.match(/STOP|DIE|CREATE/)) return;
  if (this.state.match(/RUNNING/)) this.pause();
  this.children.forEach(function (child) {
    return child.stop();
  });
  this.state = "STOP";
  this.onStop && this.onStop();
};
FNode.prototype.destroy = function () {
  this.children.forEach(function (child) {
    return child.destroy();
  });
  _Context["default"].prototype.destroy.apply(this, arguments);
};

/**
 * do something when remove
 * @param {FNode} child
 * @param {number} index
 */
FNode.prototype.onRemoveChild = function (child, index) {};

/**
 * do something when add child
 * @param {FNode} child
 * @param {Number} index
 */
FNode.prototype.onAddChild = function (child, index) {};

/***
 * do something when attach
 */
FNode.prototype.onAttach = function (parent) {};

/***
 * do something when attach
 */
FNode.prototype.onDetach = function () {};

/**
 * @return {FNode}
 */
FNode.prototype.remove = function () {
  if (this.parent) this.parent.removeChild(this);
};
FNode.prototype._updateDownState = function (child) {
  if (this.state === 'DIE' || child.state === 'DIE') {
    console.error("Violation: Node destroyed", this, child);
  } else if (this.state === 'CREATE' || this.state === 'STOP') {} else if (this.state === "STANDBY" || this.state === 'PAUSE') {
    child.start(true);
  } else if (this.state === 'RUNNING') {
    child.start();
  }
};

/**
 * @param {FNode} child
 * @return {FNode}
 */
FNode.prototype.addChild = function (child) {
  child.remove();
  this.children.push(child);
  child.parent = this;
  //data ready
  child.onAttach(this);
  this.onAddChild(child, this.children.length - 1); //negative index for appending child
  child.onAttached();
  this._updateDownState(child);
};

/**
 * @param {FNode} child
 * @return {Boolean}
 */
FNode.prototype.removeChild = function (child) {
  var childIndex = this.children.indexOf(child);
  if (childIndex < 0) return false;
  child.stop();
  child.onDetach();
  this.onRemoveChild(child, childIndex);
  this.children.splice(childIndex, 1);
  child.parent = undefined;
  child.onDetached();
  return true;
};

/**
 * @param {FNode} child
 * @param {FNode=} at
 * @return {FNode}
 */
FNode.prototype.addChildBefore = function (child, at) {
  var atIndex;
  if (at) {
    atIndex = this.children.indexOf(at);
    if (atIndex >= 0) {
      child.remove();
      this.children.splice(atIndex, 0, child);
      child.parent = this;
      this.onAttach();
      this.onAddChild(child, atIndex);
      child.onAttached();
    } else {
      throw new Error('Element does not contain [at]');
    }
  } else {
    child.remove();
    this.children.push(child);
    child.parent = this;
    this.onAttach();
    this.onAddChild(child, this.children.length - 1);
    child.onAttached();
  }
  this._updateDownState(child);
  return this;
};

/**
 * @param {FNode} child
 * @param {FNode=} at
 * @return {FNode}
 */
FNode.prototype.addChildAfter = function (child, at) {
  child.remove();
  var atIndex;
  if (at) {
    atIndex = this.children.indexOf(at);
    if (atIndex >= 0) {
      this.children.splice(atIndex + 1, 0, child);
      child.parent = this;
      this.onAttach();
      this.onAddChild(child, atIndex + 1);
      child.onAttached();
    } else {
      throw new Error('Element does not contain [at]');
    }
  } else {
    this.children.unshift(child);
    child.parent = this;
    this.onAttach();
    this.onAddChild(child, 0);
    child.onAttached();
  }
  this._updateDownState(child);
  return this;
};

/**
 * @param {FNode} child
 * @return {FNode}
 */
FNode.prototype.findChildBefore = function (child) {
  var index = this.children.indexOf(child);
  if (index > 0) return this.children[index - 1];
};

/**
 * @param {FNode} child
 * @return {FNode}
 */
FNode.prototype.findChildAfter = function (child) {
  var index = this.children.indexOf(child);
  if (index < this.children.length - 1) return this.children[index + 1] || null;
};

/**
 * @param {FNode} child
 * @return {Number}
 */
FNode.prototype.indexOfChild = function (child) {
  return this.children.indexOf(child);
};
var _default = FNode;
/***
 *
 *
 * @param  {FNode} root
 * @param cb
 */
exports["default"] = _default;
function traversal(root, cb) {
  var ac = {
    path: [],
    node: null,
    isStopped: false,
    stop: function stop() {
      this.isStopped = true;
    },
    isSkipChildren: false,
    skipChildren: function skipChildren() {
      this.isSkipChildren = true;
    }
  };
  function visit(node) {
    ac.path.push(node);
    ac.node = node;
    ac.isSkipChildren = false;
    ac.isStopped = false;
    cb(ac);
    if (!ac.isSkipChildren) {
      if (node.children) for (var i = 0; i < node.children.length && !ac.isStopped; ++i) {
        visit(node.children[i]);
      }
    }
    ac.node = ac.path.pop();
  }
  visit(root);
}

/***/ }),

/***/ 23600:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FAttributes = _interopRequireDefault(__webpack_require__(96720));
var _IndexedPropertyNames = _interopRequireDefault(__webpack_require__(63017));
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function FViewable() {
  var defaultStyle = this.style;
  var style = new _FAttributes["default"](this);
  Object.defineProperty(this, 'style', {
    enumerable: true,
    set: function set(value) {
      Object.assign(style, value);
    },
    get: function get() {
      return style;
    }
  });
  Object.assign(this.style, defaultStyle);
}

/***
 *
 * @type {{}|FAttributes}
 */
FViewable.prototype.style = {};

/**
 * @returns {Array<String>}
 */
FViewable.prototype.getAcceptsStyleNames = function () {
  var dict = Object.assign({}, this.styleHandlers);
  var names = Object.keys(dict);
  var indexed = _IndexedPropertyNames["default"];
  names.sort(function (a, b) {
    return indexed[a] - indexed[b];
  });
  return names;
};

/***
 * @returns {AElement|void}
 */
FViewable.prototype.render = function () {
  throw new Error('Not Implement');
};
FViewable.prototype.onDomCreated = _noop["default"];

/**
 * @param {String} name
 * @returns {}
 */
FViewable.prototype.getStyleDescriptor = function (name) {
  var functionName = 'getStyle' + name.substr(0, 1).toUpperCase() + name.substr(1) + 'Descriptor';
  return this[functionName] && this[functionName].apply(this, Array.prototype.slice.call(arguments, 1)) || this.style.getPropertyDescriptor(name);
};

/**
 * @returns {}
 */
FViewable.prototype.getStyleDescriptors = function () {
  var result = {};
  var names = this.getAcceptsStyleNames();
  var key;
  for (var i = 0; i < names.length; ++i) {
    key = names[i];
    result[key] = this.getStyleDescriptor(key);
  }
  return result;
};

/**
 * @param {String} name
 * @param {*} value
 * @returns {*} value which is set
 */
FViewable.prototype.setStyle = function (name, value) {
  return this.style.setProperty.apply(this.style, arguments);
};

/**
 * @param {String} name
 * @returns {Object} value which is set
 */
FViewable.prototype.getStyle = function (name) {
  return this.style.getProperty.apply(this.style, arguments);
};
FViewable.prototype.getStyles = function () {
  var self = this;
  var styleKeys = Object.keys(this.style).filter(function (key) {
    return self.style[key] !== undefined || self.style[key] !== null;
  });
  if (styleKeys.length > 0) {
    return styleKeys.reduce(function (ac, key) {
      ac[key] = self.style[key];
      return ac;
    }, {});
  }
  return null;
};
FViewable.prototype.setStyles = function (styles) {
  var self = this;
  Object.keys(styles).forEach(function (key) {
    self.setStyle(key, styles[key]);
  });
};
FViewable.prototype.styleHandlers = {};
var _default = FViewable;
exports["default"] = _default;

/***/ }),

/***/ 9098:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.makeFmFragmentClass = makeFmFragmentClass;
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _stringGenerate = __webpack_require__(10713);
var _FNode = _interopRequireWildcard(__webpack_require__(88215));
var _FModel = _interopRequireDefault(__webpack_require__(93274));
var _Assembler = __webpack_require__(2326);
var _FCore = __webpack_require__(51518);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _CCBlock = _interopRequireDefault(__webpack_require__(99125));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(16907);
var _BaseBlock = _interopRequireDefault(__webpack_require__(29384));
var _utils2 = __webpack_require__(84512);
var _ContextManager = _interopRequireDefault(__webpack_require__(88062));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/****
 * life cycle
 * on_start: CONFIG => VIEW => AUTO_START_BLOCK => LOADED
 */

/***
 * @constructor
 * @augments FNode
 * @augments BaseBlock
 */
function FmFragment() {
  var _this = this;
  _FNode["default"].call(this);
  this.ctxMng = new _ContextManager["default"](); //like GrandContext
  _EventEmitter["default"].call(this);
  _FModel["default"].call(this);
  _CCBlock["default"].call(this, {
    id: (0, _utils.randomUniqueIdent)()
  });
  this.emittor = this;
  this._componentNameList = [];
  this.boundConfig = {};
  this._config = {};
  Object.defineProperty(this, 'config', {
    set: function set(value) {
      Object.assign(this._config, value);
    },
    get: function get() {
      return this._config;
    }
  });
  this.boundProps = {};
  this._props = {};
  this.view = null;
  this.conponentCreatedSyncs = [];
  this.blocks = [];
  this.lines = [];
  this.entries = [];
  this.propsGates = [];
  this.domSignal = null;
  this.entryCompletedBlocks = [];
  this.entryCompleted = false;
  this.entryTasks = [];
  this.onCreate();
  this.buildContentView();
  this._bindView();
  this.onCreated();
  var counter = 6000;
  var _int = setInterval(function () {
    if (_this.parent) {
      clearInterval(_int);
    }
    if (_this.view.domElt.isDescendantOf(document.body)) {
      if (!_this.parent) _this.start();
      clearInterval(_int);
    }
  }, 200);
  this.domSignal.emit('request_fragment_auto_start');
  this.domSignal.on('check_entry_completed', this._checkEntryCompleted.bind(this));
}
(0, _inheritComponentClass["default"])(FmFragment, _FNode["default"], _BaseBlock["default"]);
FmFragment.prototype.type = 'FRAGMENT';
FmFragment.prototype.tag = 'FmFragment';
FmFragment.prototype.menuIcon = 'span.mdi.mdi-terraform';
FmFragment.prototype.primaryName = '$value$';
FmFragment.prototype.buildContentView = function () {
  var _this2 = this;
  var contentViewData = this.contentViewData;
  if (contentViewData.attributes && contentViewData.attributes.primaryName) {
    this.primaryName = contentViewData.attributes.primaryName;
  }
  var blocks; //data
  var layout;
  var lines; //data
  var i;
  var block;
  var line;
  var blockDict = {};
  if (contentViewData.tag) {
    layout = contentViewData;
  } else {
    layout = contentViewData.layout;
    blocks = contentViewData.circuit && contentViewData.circuit.blocks;
    lines = contentViewData.circuit && contentViewData.circuit.lines;
  }
  if (layout) {
    this.view = _Assembler.AssemblerInstance.buildComponent(layout, this);
    this.view.domElt.addClass('as-fm-fragment');
    (0, _FNode.traversal)(this.view, function (path) {
      var node = path.node;
      blockDict[node.attributes.id] = node;
      blockDict[node.attributes.name] = node;
      if (node.attributes.group && !blockDict[node.attributes.group]) {
        blockDict[node.attributes.group] = _Assembler.AssemblerInstance.buildBlock({
          tag: 'CBComponentGroup',
          attributes: {
            name: node.attributes.group
          }
        }, _this2);
        _this2.blocks.push(blockDict[node.attributes.group]);
      }
      if (node.fragment !== _this2) {
        blockDict[node.attributes.id] = node.fragment;
        blockDict[node.attributes.name] = node.fragment;
        path.skipChildren();
      }
    });
  } else {
    throw new Error("Invalid Fragment class: layout must not be null!");
  }
  if (blocks) {
    for (i = 0; i < blocks.length; ++i) {
      block = _Assembler.AssemblerInstance.buildBlock(blocks[i], this);
      blockDict[block.attributes.id] = block;
      if (block.attributes.name) blockDict[block.attributes.name] = block;
      this.blocks.push(block);
      if (block.autoStart) {
        this.entries.push(block);
      }
      if (block.tag === 'CBPropsGate') {
        this.propsGates.push(block);
      }
      if (block.tag === 'CBEntryCompleted') {
        this.entryCompletedBlocks.push(block);
      }
    }
  }
  if (lines) {
    for (i = 0; i < lines.length; ++i) {
      line = _Assembler.AssemblerInstance.buildLine(lines[i], blockDict);
      if (line) this.lines.push(line);
    }
  }
  if (!this.view.domElt.domSignal) {
    this.view.domElt.$domSignal = (0, _FCore._)('attachhook');
    this.view.domElt.appendChild(this.view.domElt.$domSignal);
    this.view.domElt.domSignal = new _DomSignal["default"](this.view.domElt.$domSignal);
  }
  this.domSignal = this.view.domElt.domSignal;
  this.domSignal.on('fire_props_pin', this.pinFirePropsChange.bind(this));
  (0, _FNode.traversal)(this.view, function (path) {
    path.node.onFragmentAttached();
    if (path.node.fragment !== _this2) {
      path.skipChildren();
    }
  });
  this.blocks.forEach(function (block) {
    if (block.onAttached) block.onAttached();
    if (block.bindDataToFragment) {
      block.bindDataToFragment();
    }
  });
  this.view.updateEmbark();
  (0, _FNode.traversal)(this.view, function (path) {
    var sync = path.node.createdSync;
    if (sync && typeof sync.then === "function") {
      _this2.conponentCreatedSyncs.push(sync);
    }
  });
};
FmFragment.prototype.execEntry = function () {
  var _this3 = this;
  var t = this.newTask();
  for (var i = 0; i < this.entries.length; ++i) {
    this.entries[i].exec();
  }
  (0, _FNode.traversal)(this.view, function (path) {
    var node = path.node;
    if (node.fragment !== _this3) {
      path.skipChildren();
    }
    if (node.tag === 'CheckBox') {
      node.pinFire('checked');
    }
  });
  t.finish();
};
FmFragment.prototype.execEntryCompleted = function () {
  for (var i = 0; i < this.entryCompletedBlocks.length; ++i) {
    this.entryCompletedBlocks[i].exec();
  }
};
FmFragment.prototype.execTrigger = function (name) {
  var path;
  if (name instanceof Array) {
    path = name;
  } else {
    path = name.split('.');
  }
  var frag = this;
  var view;
  while (path.length > 1) {
    view = frag.findViewByName(frag.primaryName);
    if (!view) view = frag.findViewByName(path.shift());
    if (!view) {
      console.error('Not found:', name);
      return;
    }
    frag = view.fragment;
  }
  name = path.pop();
  var block = frag.blocks.find(function (block) {
    return block.attributes.name === name;
  });
  if (block) {
    if (block.exec) block.exec();
  } else {
    console.error('Not found:', name);
  }
};
FmFragment.prototype.onReady = _noop["default"];

//reassign this property in constructor or onCreate to change default layout,
// this data will be use for assembler
FmFragment.prototype.contentViewData = {
  tag: 'LinearLayout'
};
FmFragment.prototype.onCreate = _noop["default"];

/**
 * call by assembly
 */
FmFragment.prototype.onCreated = _noop["default"];
FmFragment.prototype.start = function (standBy) {
  var _this4 = this;
  if (this.state.match(/DIE/)) return;
  if (this.state.match(/RUNNING/)) return;
  var componentCreatedTask = this.newTask();
  if (this.state.match(/STOP|CREATE/)) {
    this.state = "STANDBY";
    this.onStart && this.onStart();
    this.view.start(true);
    this.children.forEach(function (child) {
      return child.start(true);
    });
    this.emit('start', {
      type: 'start',
      target: this
    }, this);
    if (this.conponentCreatedSyncs.length > 0) {
      Promise.all(this.conponentCreatedSyncs).then(function () {
        componentCreatedTask.finish();
        //ready here
        // console.log('fragment ready')
        _this4.onReady();
        _this4.emit('ready', {
          target: _this4,
          type: 'ready'
        }, _this4);
        _this4.execEntry();
        _this4._waitEntryCompleted();
      });
    } else {
      componentCreatedTask.finish();
      // console.log('fragment ready')
      this.onReady();
      this.emit('ready', {
        target: this,
        type: 'ready'
      }, this);
      this.execEntry();
      this._waitEntryCompleted();
    }
  }
  if (!standBy && this.state.match(/STANDBY|PAUSE/)) {
    this.resume();
  }
};
FmFragment.prototype.resume = function () {
  var state = this.state;
  this.view.start();
  _FNode["default"].prototype.resume.apply(this, arguments);
  if (state !== this.state) this.emit('resume', {
    type: 'resume',
    target: this
  }, this);
  this.children.forEach(function (child) {
    return child.resume();
  });
};
FmFragment.prototype.pause = function () {
  var state = this.state;
  this.view.pause();
  this.children.forEach(function (child) {
    return child.pause();
  });
  _FNode["default"].prototype.pause.apply(this, arguments);
  if (state !== this.state) this.emit('pause', {
    type: 'pause',
    target: this
  }, this);
};
FmFragment.prototype.stop = function () {
  this.children.forEach(function (child) {
    return child.stop();
  });
  if (this.state.match(/STOP|DIE|CREATE/)) return;
  if (this.state.match(/RUNNING/)) this.pause();
  this.children.forEach(function (child) {
    return child.stop();
  });
  this.view.stop();
  this.state = "STOP";
  this.onStop && this.onStop();
  this.emit('stop', {
    type: 'stop',
    target: this
  }, this);
};
FmFragment.prototype.destroy = function () {
  this.children.forEach(function (child) {
    return child.destroy();
  });
  if (this.state.match(/DIE/)) return;
  if (this.state.match(/RUNNING|PAUSE/)) this.stop();
  this.view.destroy();
  this.state = "DIE";
  this.onDestroy && this.onDestroy();
  this.emit('destroy', {
    type: 'destroy',
    target: this
  }, this);
};

/***
 *
 * @param {String} id
 */
FmFragment.prototype.findViewByName = function (id) {
  return this['$' + id];
};
FmFragment.prototype._bindView = function () {
  while (this._componentNameList.length > 0) {
    delete this['$' + this._componentNameList.pop()];
  }
  if (!this.view) return;
  var thisFm = this;

  /***
   *
   * @param {BaseComponent} root
   */
  function visit(root) {
    var id = root.getAttribute('name');
    if (id) {
      thisFm['$' + id] = root;
      thisFm._componentNameList.push(id);
      if (root.fragment && root.fragment !== thisFm) return; //hold by other fragment
      root.children.forEach(visit);
    }
  }
  visit(this.view);
};
FmFragment.prototype.notifyPropsChange = function (info) {
  if (this.domSignal) {
    this._propsChangeInfo = this._propsChangeInfo || {};
    this._propsChangeInfo.names = this._propsChangeInfo.names || [];
    if (this._propsChangeInfo.names.indexOf(info.name) < 0) this._propsChangeInfo.names.push(info.name);
    this._propsChangeInfo.path = [];
    this.domSignal.emit('fire_props_pin', this._propsChangeInfo);
  }
};
FmFragment.prototype.pinFirePropsChange = function (info) {
  this._propsChangeInfo = info;
  var frag = this;
  var parent = frag.parent;
  this.propsGates.forEach(function (block) {
    block.pinFire('props');
    if (info) block.pinFire('props_change_info', info);
  });
  this.pinFire('props');
  if (parent && this.view.attributes.dataBinding) {
    parent.pinFirePropsChange(info && {
      names: info.names,
      path: [frag.view.attributes.name].concat(info.path)
    });
  }
  this._propsChangeInfo = null;
};
FmFragment.prototype.newTask = function () {
  var self = this;
  var id = (0, _stringGenerate.randomIdent)(10);
  var trace = new Error('trace');
  function finish() {
    var idx = self.entryTasks.indexOf(id);
    if (idx >= 0) {
      self.entryTasks.splice(idx, 1);
      if (self.entryTasks.length === 0) self.domSignal.emit('check_entry_completed');
    }
  }
  this.entryTasks.push(id);
  return {
    fragment: this,
    id: id,
    finish: finish
  };
};
FmFragment.prototype._checkEntryCompleted = function () {
  if (!this.entryCompleted && this.entryTasks.length === 0) {
    this.entryCompleted = true;
    this.emit("entry_completed");
    // window.ABSOL_DEBUG && console.log("entryCompleted", this);
    this.execEntryCompleted();
  }
};
FmFragment.prototype._waitEntryCompleted = function () {
  this.children.forEach(function (fc) {
    var loadingTask = this.newTask();
    fc.start();
    fc.afterEntryCompleted().then(loadingTask.finish.bind(loadingTask));
  }.bind(this));
  this._checkEntryCompleted();
};
FmFragment.prototype.afterEntryCompleted = function () {
  if (this.entryCompleted) return Promise.resolve();
  return new Promise(function (resolve) {
    this.once('entry_completed', resolve);
  }.bind(this));
};

/***
 * @typedef FmVerifyInfo
 * @property {boolean} completed
 * @property {BaseComponent} [comp] - null when ok=true
 * @property {any} [incompletedCell] - null when ok=true
 */

/**
 * @return {FmVerifyInfo}
 */
FmFragment.prototype.verify = function () {
  var _this5 = this;
  var result = {
    completed: true
  };
  (0, _FNode.traversal)(this.view, function (path) {
    if (!result.completed) return;
    var node = path.node;
    var cResult;
    if (node.attributes.disembark) {
      path.skipChildren();
    } else if (node.fragment === _this5) {
      if (node.verify) {
        cResult = node.verify();
      }
      if (cResult && cResult.completed === false) {
        result = cResult;
        path.stop();
      }
    } else {
      cResult = node.fragment.verify();
      path.skipChildren();
      if (cResult && cResult.completed === false) {
        result = cResult;
        path.stop();
      }
    }
  });
  return result;
};
Object.defineProperty(FmFragment.prototype, 'domElt', {
  get: function get() {
    return this.view && this.view.view;
  }
});
Object.defineProperty(FmFragment.prototype, 'props', {
  get: function get() {
    if (this.primaryName in this._props) return this._props[this.primaryName];
    return this._props;
  },
  set: function set(props) {
    var prevKey = (0, _utils2.keyStringOf)(this.props);
    if (this.primaryName in this._props) {
      this._props[this.primaryName] = props;
    } else {
      /*bug not call setter in safari?*/
      for (var key in props) {
        this._props[key] = props[key];
      }
    }
    var newKey = (0, _utils2.keyStringOf)(this.props);
    if (newKey !== prevKey) {
      this.pinFire('props');
    }
  },
  enumerable: true
});
Object.defineProperty(FmFragment.prototype, 'parentFragment', {
  get: function get() {
    var pE = this.domElt.parentElement;
    while (pE) {
      if (pE.fragment) return pE.fragment;
      pE = pE.parentElement;
    }
    return null;
  }
});
FmFragment.prototype.pinHandlers.props = {
  receives: function receives(value) {
    this.props = value;
  },
  get: function get() {
    return this.props;
  }
};
var _default = FmFragment;
/***
 *
 * @param {{tag: string ,contentViewData?:Object, prototype?: Object}} opt
 * @return {Function}
 */
exports["default"] = _default;
function makeFmFragmentClass(opt) {
  function CustomFmFragment() {
    FmFragment.apply(this, arguments);
  }
  (0, _inheritComponentClass["default"])(CustomFmFragment, FmFragment);
  CustomFmFragment.prototype.tag = opt.tag || 'CustomFmFragment_' + (0, _stringGenerate.randomIdent)(10);
  if (opt.contentViewData) {
    CustomFmFragment.prototype.contentViewData = opt.contentViewData;
    if (opt.contentViewData.layout instanceof Array) {
      console.trace("Invalid form data", opt.contentViewData);
    }
  }
  if (opt.prototype) {
    Object.defineProperties(CustomFmFragment.prototype, Object.getOwnPropertyDescriptors(opt.prototype));
  }
  return CustomFmFragment;
}

/***/ }),

/***/ 66723:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports._ = exports.$$ = exports.$ = void 0;
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _install = _interopRequireDefault(__webpack_require__(79435));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var GCore = new _Svg["default"]();
(0, _install["default"])(GCore);
var _ = GCore._;
exports._ = _;
var $ = GCore.$;
exports.$ = $;
var $$ = GCore.$$;
exports.$$ = $$;
var _default = GCore;
exports["default"] = _default;

/***/ }),

/***/ 63017:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.PropertyNames = void 0;
var PropertyNames = ['tag', 'id', 'name', 'displayName', 'permissions', 'text', 'textDecode', 'offset', 'items', 'value', 'list', 'treeList', 'strictValue', 'placeHolder', 'disabled', 'tooltip', 'disembark', 'dataBinding', 'union', 'unionValues', /*****layout***************/
'layout', 'alignItems', 'justifyItems', 'columns', 'columnGap', 'rows', 'rowGap', /*self position*/
'justifySelf', 'alignSelf', 'x', 'y', 'width', 'height', /**/
'display', 'position', 'float', 'hAlign', 'left', 'right', 'vAlign', 'top', 'bottom', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'overflowY', 'itemSpacing', 'hidden'];
exports.PropertyNames = PropertyNames;
var IndexedPropertyNames = PropertyNames.reduce(function (ac, cr, i) {
  ac[cr] = i;
  return ac;
}, {});
var _default = IndexedPropertyNames;
exports["default"] = _default;

/***/ }),

/***/ 48389:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FmFragment = _interopRequireDefault(__webpack_require__(9098));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends FmFragment
 * @constructor
 */
function NotFoundForm() {
  _FmFragment["default"].apply(this, arguments);
}
_OOP["default"].mixClass(NotFoundForm, _FmFragment["default"]);
NotFoundForm.prototype.contentViewData = {
  "app": "ABSOL_FORM_EDITOR",
  "version": "1.0.0",
  "layout": {
    "tag": "ChainLayout",
    "attributes": {
      "name": "Linear1",
      "dataBinding": true,
      "id": "Q_fhEZHA63qZw2sb"
    },
    "style": {
      "paddingLeft": 10,
      "paddingRight": 10,
      "paddingTop": 10,
      "paddingBottom": 10,
      "height": "auto",
      "width": "auto"
    },
    "children": [{
      "tag": "Text",
      "attributes": {
        "name": "Text_0",
        "dataBinding": true,
        "text": "<span  class=\"mdi mdi-alert-decagram\"> Lỗi không tìm thấy form &nbsp;</span>",
        "textDecode": "html",
        "id": "Q_fhEZLR9P8Y9WDC"
      },
      "style": {
        "height": "auto",
        "width": "auto",
        "font": "unset",
        "textAlign": "left",
        "textColor": "#bf360cff",
        "hidden": false,
        "vAlign": "top",
        "hAlign": "left"
      }
    }, {
      "tag": "Text",
      "attributes": {
        "name": "tag",
        "dataBinding": true,
        "target": "",
        "text": " ",
        "id": "Q_fWM5LoCeYUPK4G"
      },
      "style": {
        "height": "auto",
        "width": "auto",
        "font": "unset",
        "fontStyle": "Bold",
        "textAlign": "left",
        "textColor": "#e64a19ff",
        "hidden": false,
        "vAlign": "top"
      }
    }]
  },
  "circuit": {
    "blocks": [{
      "attributes": {
        "id": "Q_fWM5Jq3rReI1Uo",
        "name": "onStart"
      },
      "tag": "CBEntry"
    }, {
      "attributes": {
        "id": "Q_fWM5KanxCitlte",
        "name": "getTag",
        "args": [],
        "body": "return this.fragment.tag;"
      },
      "tag": "function"
    }],
    "lines": [{
      "u": "onStart",
      "v": "getTag",
      "uPin": "signal",
      "vPin": "exec",
      "id": "Q_fWM5B8gpdgiWAO"
    }, {
      "u": "getTag",
      "v": "tag",
      "uPin": "result",
      "vPin": "text",
      "id": "Q_fWM5Mp9FgxLv4z"
    }]
  }
};
var _default = NotFoundForm;
exports["default"] = _default;

/***/ }),

/***/ 19617:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PluginManager = _interopRequireDefault(__webpack_require__(20298));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = new _PluginManager["default"]();
exports["default"] = _default;

/***/ }),

/***/ 86655:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseComponent = _interopRequireDefault(__webpack_require__(32306));
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/***
 * @extends BaseComponent
 * @constructor
 */
function ScalableComponent() {
  _BaseComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(ScalableComponent, _BaseComponent["default"]);
ScalableComponent.prototype.tag = "ScalableComponent";
ScalableComponent.prototype.SUPPORT_STYLE_NAMES = ['width', 'height', 'top', 'left', 'right', 'top', 'bottom'];
ScalableComponent.prototype.onCreate = function () {
  _BaseComponent["default"].prototype.onCreate.call(this);
  var minSize = this.measureMinSize();
  this.style.height = this.style.height || minSize && minSize.height || 30;
  this.style.width = this.style.width || minSize && minSize.width || 69;
};
var _default = ScalableComponent;
exports["default"] = _default;

/***/ }),

/***/ 67620:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = inheritComponentClass;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function inheritComponentClass(constructor) {
  _OOP["default"].mixClass.apply(_OOP["default"], arguments);
  var cClass;
  var attributeHandlers = undefined;
  var styleHandlers = undefined;
  var compStyleHandlers = undefined;
  var pinHandlers = undefined;
  var style = undefined;
  var attributes = undefined;
  for (var i = 1; i < arguments.length; ++i) {
    cClass = arguments[i];
    if (cClass.prototype.attributeHandlers) {
      attributeHandlers = attributeHandlers || {};
      Object.keys(cClass.prototype.attributeHandlers || {}).forEach(function (key) {
        attributeHandlers[key] = Object.assign({}, cClass.prototype.attributeHandlers[key]);
      });
    }
    if (cClass.prototype.styleHandlers) {
      styleHandlers = styleHandlers || {};
      Object.keys(cClass.prototype.styleHandlers || {}).forEach(function (key) {
        styleHandlers[key] = Object.assign({}, cClass.prototype.styleHandlers[key]);
      });
    }
    if (cClass.prototype.compStyleHandlers) {
      compStyleHandlers = compStyleHandlers || {};
      Object.keys(cClass.prototype.compStyleHandlers || {}).forEach(function (key) {
        compStyleHandlers[key] = Object.assign({}, cClass.prototype.compStyleHandlers[key]);
      });
    }
    if (cClass.prototype.pinHandlers) {
      pinHandlers = pinHandlers || {};
      Object.keys(cClass.prototype.pinHandlers || {}).forEach(function (key) {
        pinHandlers[key] = Object.assign({}, cClass.prototype.pinHandlers[key]);
      });
    }
    if (cClass.prototype.style) {
      style = style || {};
      Object.assign(style, cClass.prototype.style);
    }
    if (cClass.prototype.attributes) {
      attributes = attributes || {};
      Object.assign(attributes, cClass.prototype.attributes);
    }
  }
  if (attributeHandlers) constructor.prototype.attributeHandlers = attributeHandlers;
  if (styleHandlers) constructor.prototype.styleHandlers = styleHandlers;
  if (compStyleHandlers) constructor.prototype.compStyleHandlers = compStyleHandlers;
  if (pinHandlers) constructor.prototype.pinHandlers = pinHandlers;
  if (style) {
    constructor.prototype.style = style;
  }
  if (attributes) {
    constructor.prototype.attributes = attributes;
  }
}

/***/ }),

/***/ 16907:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.nextIdString = nextIdString;
exports.parseMeasureValue = parseMeasureValue;
exports.randomUniqueIdent = randomUniqueIdent;
var _stringGenerate = __webpack_require__(10713);
var _utils = __webpack_require__(84512);
var randomSeed = new Date().getTime();
function randomUniqueIdent() {
  var s = '';
  var l = _stringGenerate.identCharacters.length;
  var x = ++randomSeed;
  while (x > 0) {
    s = _stringGenerate.identCharacters[x % l] + s;
    x = Math.floor(x / l);
  }
  while (s.length < 16) {
    s += _stringGenerate.identCharacters[Math.floor(Math.random() * l)];
  }
  return s;
}
function parseMeasureValue(mValue) {
  if (mValue === 'auto') return {
    unit: null,
    value: 'auto'
  };
  if (mValue === 'match_parent') return {
    unit: null,
    value: 'match_parent'
  };
  var value = NaN;
  var unit = null;
  var matched;
  if (typeof mValue === "number") {
    value = mValue;
    unit = 'px';
  } else if (typeof mValue === "string") {
    matched = mValue.match(/([+-]?([0-9]*[.])?[0-9]+([eE][+-]?[0-9]+)?)(px|%|vw|vh)?/i);
    if (matched) {
      value = parseFloat(matched[1]);
      unit = matched[4];
    }
  }
  if (isNaN(value)) return null;
  unit = unit || 'px';
  return {
    value: value,
    unit: unit
  };
}

/***
 *
 * @param {string} id
 */
function nextIdString(id) {
  var lfm = id.match(/\d+$/g);
  var idx = 0;
  var lf = '';
  if (lfm) {
    lf = lfm[0];
    idx = parseInt(lf, 10);
  }
  idx++;
  return id.substring(0, id.length - lf.length) + (0, _utils.zeroPadding)(idx, lf.length);
}

/***/ }),

/***/ 9915:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(94875);
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function FontIconInput() {
  this.on('click', this.eventHandler.click);
}
FontIconInput.tag = 'FontIconInput'.toLowerCase();
FontIconInput.eventHandler = {};
FontIconInput.eventHandler.click = function (event) {
  this.togglePicker();
};
FontIconInput.eventHandler.clickIcon = function (event) {
  this.value = event.value;
  this.emit('change', {
    type: 'change',
    value: event.value,
    target: this,
    originEvent: event.originEvent || event
  }, this);
  this.closePicker();
};
FontIconInput.prototype.share = {
  $follower: null,
  $picker: null,
  $holder: null
};
FontIconInput.eventHandler.clickBody = function (event) {
  if (_EventEmitter["default"].hitElement(this, event) || _EventEmitter["default"].hitElement(this.share.$picker, event)) return;
  this.closePicker();
};
FontIconInput.prototype.togglePicker = function () {
  if (this.containsClass('as-font-icon-selecting')) {
    this.closePicker();
  } else {
    this.openPicker();
  }
};
FontIconInput.prototype.openPicker = function () {
  this.prepare();
  if (this.share.$holder) {
    this.share.$holder.closePicker();
  }
  this.share.$holder = this;
  this.addClass('as-font-icon-selecting');
  this.share.$picker.on('clickicon', this.eventHandler.clickIcon);
  this.share.$follower.addTo(document.body);
  this.share.$follower.followTarget = this;
  $(document.body).on('click', this.eventHandler.clickBody);
  this.share.$picker.selectValues(this.value);
};
FontIconInput.prototype.closePicker = function () {
  this.removeClass('as-font-icon-selecting');
  document.body.off('click', this.eventHandler.clickBody);
  this.share.$picker.off('clickicon', this.eventHandler.clickIcon);
  if (this.share.$holder === this) {
    this.share.$holder = null;
    this.share.$follower.remove();
  }
};
FontIconInput.prototype.prepare = function () {
  if (!this.share.$picker) {
    this.share.$follower = _('follower.as-font-icon-follower');
    this.share.$picker = _('fonticonpicker').addTo(this.share.$follower);
  }
};
FontIconInput.render = function () {
  return _({
    tag: 'button',
    extendEvent: 'change',
    "class": 'as-font-icon-input'
  });
};
FontIconInput.property = {};
FontIconInput.property.value = {
  set: function set(value) {
    this.clearChild();
    this._value = value;
    if (this._value) {
      this.addChild(_(value));
    } else {
      this.addChild(_('<span></span>'));
    }
  },
  get: function get() {
    return this._value;
  }
};
_FCore["default"].install(FontIconInput);
var _default = FontIconInput;
exports["default"] = _default;

/***/ }),

/***/ 94875:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(46185);
var _stringMatching = __webpack_require__(59163);
var _MaterialDesignIcons = __webpack_require__(73037);
var _GoogleMaterialIcons = __webpack_require__(29465);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;
function FontIconPicker() {
  var self = this;
  this._fontIndex = 0;
  this._viewingFontIndex = -1;
  this.$searchInput = $('searchtextinput', this).on('stoptyping', this.search.bind(this));
  this.$selectFont = $('.as-font-icon-picker-select-font', this).on('change', this.updateContent.bind(this));
  this.$option = $('.as-font-icon-picker-option', this);
  this.$materialDesignContent = $('.as-font-icon-picker-content.as-font-icon-picker-material-design-icons', this);
  this.$googleMaterialContent = $('.as-font-icon-picker-content.as-font-icon-picker-google-material-icons', this);
  this.$mdiButtons = [];
  this.$googleMaterialIconButtons = [];
  this.on('click', this.eventHandler.clickContent);
  this.$activeButtons = {};
  this.$buttonList = {};
  (0, _MaterialDesignIcons.getMaterialDesignIconNames)().then(function (result) {
    var button;
    for (var i = 0; i < result.length; ++i) {
      button = _({
        tag: 'button',
        "class": 'as-font-icon-picker-icon',
        child: 'span.mdi.mdi-' + result[i],
        attr: {
          title: result[i]
        },
        props: {
          __keywods__: result[i].split(/[\-\_\s]+/),
          __data__: 'span.mdi.mdi-' + result[i]
        }
      }).addTo(self.$materialDesignContent);
      self.$mdiButtons.push(button);
      self.$buttonList[button.__data__] = button;
    }
  });
  _GoogleMaterialIcons.GOOGLE_MATERIAL_ICON_NAMES.forEach(function (name) {
    var button = _({
      tag: 'button',
      "class": 'as-font-icon-picker-icon',
      attr: {
        title: name
      },
      props: {
        __keywods__: name.split(/[\-\_\s]+/),
        __data__: '<i class="material-icons">' + name + '</i>'
      },
      child: {
        tag: 'i',
        "class": 'material-icons',
        child: {
          text: name
        }
      }
    }).addTo(self.$googleMaterialContent);
    self.$googleMaterialIconButtons.push(button);
    self.$buttonList[button.__data__] = button;
  });
  this.updateContent();
  this.$noneBtn = $('button.none-icon', this);
  this.$noneBtn.__data__ = null;
  this.$noneBtn.on('click', this.eventHandler.clickContent);
}
FontIconPicker.render = function () {
  return _({
    extendEvent: 'clickicon',
    "class": 'as-font-icon-picker',
    child: ['searchtextinput', {
      tag: 'selectmenu',
      "class": 'as-font-icon-picker-select-font',
      props: {
        items: [{
          text: 'Material Design Icons',
          value: 0
        }, {
          text: 'Google Material Icons',
          value: 1
        }]
      },
      value: 0
    }, {
      tag: 'button',
      "class": ['as-font-icon-picker-icon', 'none-icon'],
      attr: {
        title: 'None'
      },
      style: {
        height: '2em',
        verticalAlign: 'top'
      },
      child: {
        tag: 'span',
        style: {
          fontSize: '1em'
        },
        child: {
          text: 'None'
        }
      }
    }, {
      tag: 'bscroller',
      "class": ['as-font-icon-picker-content', 'as-font-icon-picker-material-design-icons']
    }, {
      tag: 'bscroller',
      "class": ['as-font-icon-picker-content', 'as-font-icon-picker-google-material-icons']
    }]
  });
};
FontIconPicker.eventHandler = {};
FontIconPicker.eventHandler.clickContent = function (event) {
  var target = event.target;
  while (target !== this && target) {
    if (target.containsClass('as-font-icon-picker-icon')) break;
    target = target.parentNode;
  }
  if (target && target.containsClass('as-font-icon-picker-icon')) {
    this.emit('clickicon', {
      type: 'clickicon',
      value: target.__data__,
      originEvent: event,
      target: this
    }, this);
  }
};
FontIconPicker.prototype.selectValues = function () {
  for (var name in this.$activeButtons) {
    this.$activeButtons[name].removeClass('as-font-icon-picker-selected');
  }
  this.$activeButtons = {};
  var button;
  for (var i = 0; i < arguments.length; ++i) {
    button = this.$buttonList[arguments[i]];
    if (button) {
      this.$activeButtons[arguments[i]] = button;
      button.addClass('as-font-icon-picker-selected');
    }
  }
};
FontIconPicker.prototype.updateContent = function () {
  this._fontIndex = this.$selectFont.value;
  if (this._fontIndex == 0) this.showMaterialDesignIcons();else if (this._fontIndex == 1) this.showGoogleMaterialIcons();
};
FontIconPicker.prototype.showMaterialDesignIcons = function () {
  this._fontIndex = 0;
  if (this._viewingFontIndex == 0) return;
  this._viewingFontIndex = 0;
  this.$materialDesignContent.removeStyle('display');
  this.$googleMaterialContent.addStyle('display', 'none');
  this.search();
};
FontIconPicker.prototype.showGoogleMaterialIcons = function () {
  this._fontIndex = 1;
  if (this._viewingFontIndex == 1) return;
  this._viewingFontIndex = 1;
  this.$materialDesignContent.addStyle('display', 'none');
  this.$googleMaterialContent.removeStyle('display');
  this.search();
};
FontIconPicker.prototype.search = function () {
  var keyword = this.$searchInput.value.trim().split(/[\-\_\s]+/).filter(function (w) {
    return !!w;
  });
  var viewList = this._fontIndex == 0 ? this.$mdiButtons : this.$googleMaterialIconButtons;
  var contentElt = this._fontIndex == 0 ? this.$materialDesignContent : this.$googleMaterialContent;
  if (keyword.length > 0) {
    var list = viewList.map(function (button) {
      return {
        elt: button,
        value: (0, _stringMatching.wordsMatch)(keyword, button.__keywods__)
      };
    });
    list.sort(function (a, b) {
      return b.value - a.value;
    });
    var minValue = list[0].value;
    var maxValue = list[list.length - 1].value;
    var midValue = (minValue * 2 + maxValue) / 3;
    list = list.filter(function (item) {
      return item.value > midValue;
    });
    viewList = list.map(function (item) {
      return item.elt;
    });
  }
  contentElt.clearChild();
  viewList.forEach(function (elt) {
    elt.addTo(contentElt);
  });
};
_FCore["default"].install('fonticonpicker', FontIconPicker);
var _default = FontIconPicker;
exports["default"] = _default;

/***/ }),

/***/ 1005:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(77030);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var $ = _FCore["default"].$;
var _ = _FCore["default"]._;
function HLine() {}
HLine.render = function () {
  return _({
    "class": 'as-hline',
    child: {
      "class": 'as-hline-body',
      child: ['.as-hline-dot.left', '.as-hline-dot.right']
    }
  });
};
_FCore["default"].install('hline', HLine);
var _default = HLine;
exports["default"] = _default;

/***/ }),

/***/ 78064:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.DrawPenIco = DrawPenIco;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _ACore = _interopRequireDefault(__webpack_require__(34093));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
_FCore["default"].install('mdi-align-horizontal-left', function () {
  return (0, _FCore._)('<svg width="24px" height="24px" viewBox="0 0 24 24">\
            <path fill="#000000" d = "M22 13V19H6V13H22M6 5V11H16V5H6M2 2V22H4V2H2" />\
        </svg>');
});
_FCore["default"].install('mdi-align-horizontal-center', function () {
  return (0, _FCore._)('<svg width="24px" height="24px" viewBox="0 0 24 24">\
             <path fill="#000000" d="M20 19H13V22H11V19H4V13H11V11H7V5H11V2H13V5H17V11H13V13H20V19Z" />\
        </svg>');
});
_FCore["default"].install('mdi-align-horizontal-right', function () {
  return (0, _FCore._)('<svg width="24px" height="24px" viewBox="0 0 24 24">\
             <path fill="#000000" d="M18 13V19H2V13H18M8 5V11H18V5H8M20 2V22H22V2H20Z" />\
        </svg>');
});
_FCore["default"].install('mdi-align-vertical-bottom', function () {
  return (0, _FCore._)('<svg width="24px" height="24px" viewBox="0 0 24 24">\
             <path fill="#000000" d="M11 18H5V2H11V18M19 8H13V18H19V8M22 20H2V22H22V20Z" />\
        </svg>');
});
_FCore["default"].install('mdi-align-vertical-center', function () {
  return (0, _FCore._)('<svg width="24px" height="24px" viewBox="0 0 24 24">\
             <path fill="#000000" d="M5 20V13H2V11H5V4H11V11H13V7H19V11H22V13H19V17H13V13H11V20H5Z" />\
        </svg>');
});
_FCore["default"].install('mdi-align-vertical-top', function () {
  return (0, _FCore._)('<svg width="24px" height="24px" viewBox="0 0 24 24">\
           <path fill="#000000" d="M11 22H5V6H11V22M19 6H13V16H19V6M22 2H2V4H22V2Z" />\
        </svg>');
});
_FCore["default"].install('frame-ico', function () {
  return (0, _FCore._)('<svg width="25.03mm" height="26.1mm" version="1.1" viewBox="0 0 25.03 26.1" xmlns="http://www.w3.org/2000/svg">' + '    <g transform="translate(0,-270.9)">' + '        <path d="m12.662 270.91-7.0158 3.7418v4.0759l6.9156-4.0424 7.0492 3.9756-0.13363-3.9422z" style="fill:gray" />' + '        <path d="m12.628 276.89-6.7486 3.6416 6.6817 4.0424 6.7151-3.842z" style="fill:rgb(240, 122, 0)" />' + '        <path d="m5.2452 282.4-0.03341 7.3165 6.3811 3.8754 0.03341-7.4167z" style="fill:rgb( 122, 240, 0)" />' + '        <path d="m19.745 282.37-6.3811 3.842v7.3499l6.4145-3.7084z" style="fill:rgb(0, 122, 240)" />' + '        <path d="m21.816 283.07-0.13364 7.8176-6.7486 4.1093 3.2406 2.0045 6.7152-3.9088 0.13363-8.1517z" style="fill:gray" />' + '        <path d="m3.1738 283.04-3.1738 2.0045v7.7842l6.7151 4.1093 3.3409-1.8709-6.7151-3.9756z" style="fill:gray" />' + '    </g>' + '</svg>');
});
_FCore["default"].install('mdi-shape', function () {
  return (0, _FCore._)('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"  width="24" height="24" viewBox="0 0 24 24">\n' + '    <path fill="green" d="M11,13.5V21.5H3V13.5H11Z" />\n' + '    <path fill="red" d="M12,2L17.5,11H6.5L12,2Z" />\n' + '    <path fill="cyan" d="M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z" />\n' + '</svg>');
});
_FCore["default"].install('mdi-package-variant-closed-plus', function () {
  return (0, _FCore._)('<svg  viewBox="0 0 24 24">\n' + '    <path fill="currentColor" d="M13 19.3V12.6L19 9.2V13C19.7 13 20.4 13.1 21 13.4V7.5C21 7.1 20.8 6.8 20.5 6.6L12.6 2.2C12.4 2.1 12.2 2 12 2S11.6 2.1 11.4 2.2L3.5 6.6C3.2 6.8 3 7.1 3 7.5V16.5C3 16.9 3.2 17.2 3.5 17.4L11.4 21.8C11.6 21.9 11.8 22 12 22S12.4 21.9 12.6 21.8L13.5 21.3C13.2 20.7 13.1 20 13 19.3M12 4.2L18 7.5L16 8.6L10.1 5.2L12 4.2M11 19.3L5 15.9V9.2L11 12.6V19.3M12 10.8L6 7.5L8 6.3L14 9.8L12 10.8M20 15V18H23V20H20V23H18V20H15V18H18V15H20Z" />\n' + '</svg>');
});
_FCore["default"].install('mdi-package-variant-closed-minus', function () {
  return (0, _FCore._)('<svg  viewBox="0 0 24 24">\n' + '    <path fill="currentColor" d="M13 12.6L19 9.2V13C19.7 13 20.4 13.1 21 13.4V7.5C21 7.1 20.8 6.8 20.5 6.6L12.6 2.2C12.4 2.1 12.2 2 12 2S11.6 2.1 11.4 2.2L3.5 6.6C3.2 6.8 3 7.1 3 7.5V16.5C3 16.9 3.2 17.2 3.5 17.4L11.4 21.8C11.6 21.9 11.8 22 12 22S12.4 21.9 12.6 21.8L13.5 21.3C13.2 20.7 13.1 20 13 19.3M12 4.2L18 7.5L16 8.6L10.1 5.2L12 4.2M11 19.3L5 15.9V9.2L11 12.6V19.3M12 10.8L6 7.5L8 6.3L14 9.8L12 10.8M23 18V20H15V18H23Z" />\n' + '</svg>');
});
_FCore["default"].install('mdi-package-variant', function () {
  return (0, _FCore._)('<svg viewBox="0 0 24 24">\n' + '    <path fill="currentColor" d="M2,10.96C1.5,10.68 1.35,10.07 1.63,9.59L3.13,7C3.24,6.8 3.41,6.66 3.6,6.58L11.43,2.18C11.59,2.06 11.79,2 12,2C12.21,2 12.41,2.06 12.57,2.18L20.47,6.62C20.66,6.72 20.82,6.88 20.91,7.08L22.36,9.6C22.64,10.08 22.47,10.69 22,10.96L21,11.54V16.5C21,16.88 20.79,17.21 20.47,17.38L12.57,21.82C12.41,21.94 12.21,22 12,22C11.79,22 11.59,21.94 11.43,21.82L3.53,17.38C3.21,17.21 3,16.88 3,16.5V10.96C2.7,11.13 2.32,11.14 2,10.96M12,4.15V4.15L12,10.85V10.85L17.96,7.5L12,4.15M5,15.91L11,19.29V12.58L5,9.21V15.91M19,15.91V12.69L14,15.59C13.67,15.77 13.3,15.76 13,15.6V19.29L19,15.91M13.85,13.36L20.13,9.73L19.55,8.72L13.27,12.35L13.85,13.36Z" />\n' + '</svg>');
});
function UndoHistoryIco() {
  return (0, _FCore._)('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"  width="24" height="24" viewBox="0 0 24 24">\n' + ' <path\n' + '     d="m 8.5714285,16.428572 v 5.142857 H 3.4285714 v -5.142857 h 5.1428571 z"\n' + '     style="fill:currentColor;stroke:currentColor;stroke-width:0.85714287000000000;stroke-miterlimit:4;stroke-dasharray:none;fill-opacity:1" />\n' + '  <path\n' + '     d="M 8.5714285,9.4285715 V 14.571429 H 3.4285714 V 9.4285715 h 5.1428571 z"\n' + '     style="fill:none;stroke:currentColor;stroke-width:0.85714287000000000;stroke-miterlimit:4;" />\n' + '  <path\n' + '     d="M 8.5714285,2.4285715 V 7.5714286 H 3.4285714 V 2.4285715 h 5.1428571 z"\n' + '     style="fill:none;stroke:currentColor;stroke-width:0.85714287000000000;stroke-miterlimit:4;" />\n' + '  <path\n' + '     style="fill:currentColor;stroke:none"\n' + '     d="m 12.339568,4.5767936 -0.15625,6.1875004 2.15625,-2.0000004 c 0.879856,0.7652568 2.363959,2.1299684 2.71875,2.9687504 0.492648,1.164699 0.489398,2.646431 0,3.8125 -0.804992,1.918024 -4.46875,4.375 -4.46875,4.375 0,0 4.702305,-1.849124 5.875,-3.875 0.869421,-1.501959 0.796593,-3.552189 0.3125,-5.21875 -0.320362,-1.1028937 -2.001577,-2.813619 -2.78125,-3.5625004 l 2.875,-2.625 -6.53125,-0.0625 z"\n' + '   />' + '</svg>');
}
_FCore["default"].install('history-ico', UndoHistoryIco);
_ACore["default"].install('history-ico', UndoHistoryIco);
_FCore["default"].install('properties-ico', function () {
  return (0, _FCore._)('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"  width="24" height="24" viewBox="0 0 24 24">\n' + ' <path\n' + '     d="M 21.088366,8.5817384 V 12.59352 H 17.076583 V 8.5817384 h 4.011783 z"\n' + '     style="fill:currentColor;stroke:currentColor;stroke-width:0.66863036;stroke-miterlimit:4;" />\n' + '  <path\n' + '     d="M 21.088366,2.5301916 V 6.5419728 H 17.076583 V 2.5301916 h 4.011783 z"\n' + '     style="fill:currentColor;stroke:currentColor;stroke-width:0.66863036;stroke-miterlimit:4;" />\n' + '  <path\n' + '     style="fill:currentColor;stroke:none"\n' + '     d="m 3.518875,16.506 2.5e-4,4.781 17.925,0 -2.5e-4,-4.781 z m 13.137375,1.46275 3.5625,0 -1.78125,1.9375 z"\n/>' + '  <path\n' + '     style="fill:none;stroke:currentColor;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;"\n' + '     d="m 8.763,13.691 5.051433,-2.804402 0,-6.103093 M 8.8247425,7.4639175 8.763,13.691 3.7113405,10.886598 3.711,4.784 8.7628865,7.5051544 13.814433,4.783505 8.7835052,2.5979381 3.711,4.784"\n' + '   />' + '</svg>');
});
_FCore["default"].install('depth-select-ico', function () {
  return (0, _FCore._)('<svg width="24" height="24" version="1.1" viewBox="0 0 6.35 6.35" xmlns="http://www.w3.org/2000/svg">\n' + ' <path transform="scale(.264583)" d="m1 1v22h22v-22h-22" fill="none" stroke="#000" stroke-dasharray="3.99999993,3.99999993"/>\n' + ' <path transform="matrix(.198438 0 0 .272852 .79375 -.322461)" d="m12 7-8 4 8 4 8-4zm-6 7-2 1 8 4 8-4-2-1-6 3z"/>\n' + '</svg>');
});
_ACore["default"].install('depth-select-ico', function () {
  return (0, _FCore._)('<svg width="24" height="24" version="1.1" viewBox="0 0 6.35 6.35" xmlns="http://www.w3.org/2000/svg">\n' + ' <path transform="scale(.264583)" d="m1 1v22h22v-22h-22" fill="none" stroke="#000" stroke-dasharray="3.99999993,3.99999993"/>\n' + ' <path transform="matrix(.198438 0 0 .272852 .79375 -.322461)" d="m12 7-8 4 8 4 8-4zm-6 7-2 1 8 4 8-4-2-1-6 3z"/>\n' + '</svg>');
});
_FCore["default"].install('transform-light-ico', function () {
  return (0, _FCore._)('<svg width="24" height="24" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n' + ' <path transform="matrix(.04898654 0 0 .04898654 -.8429306 .17263626)" d="m44.5 389.15193-0.489142-150.65193 132.489142-56.20932 132.51235 56.20932-0.51235 150.7291-132.31345 58.69987zm123.5-85.70762-105.679954-45.44431-0.320046 119.73619 105.25 47.22098zm122.5 74.62154 0.16737-121.06585-104.41737 46.32669 0.5 121.24531zm-15.29463-133.89991-99.45728-42.37533-99.038659 42.19063 99.495559 43.96131zm59.54463 64.09075-7.75-0.34082 1.1e-4 -8.70793 1.1e-4 -8.70794 35.24989-0.0286c36.99453-0.03 46.60413-0.79133 70.24989-5.56552 16.92621-3.41749 37.5-11.03944 37.5-13.89259 0-0.45297-17.80989-33.60377-39.57754-73.66844-21.76764-40.06467-45.95514-84.64365-53.75-99.064399-7.79485-14.420736-14.39746-26.228838-14.67246-26.240217-0.275-0.01138-17.32963 30.977726-37.89919 68.864676l-37.39918 68.88536-7.60082-3.2435c-4.18044-1.78393-7.60081-3.73517-7.60081-4.33609s20.25-38.43924 45-84.08516c38.01389-70.10822 45.19115-82.744319 46.23128-81.393521 0.6772 0.879475 29.1397 52.984843 63.25 115.789711 45.12619 83.08765 62.01872 115.05781 62.01872 117.37431 0 1.75101-0.86741 4.88393-1.92758 6.96203-11.26366 22.0786-72.81879 34.85098-151.32242 31.39864zm34.41698-175.17571 16.35549-5.88634 50.46521 130.61427-15.57179 6.98347zm-236.57186 40.16902c2.216-30.15029 18.14118-54.63743 43.96045-67.59522 14.15639-7.1046 18.8079-7.904962 48.83893-8.403492l26.8945-0.446462-46.31016-46.341631 12.55348-12.441897 67.95657 67.978622-67.9543 67.00008-6.76739-5.73038-5.7908-5.73037 46.50764-46.53925h-24.53192c-27.46851 0-31.48625 0.60544-43.74836 6.59251-12.86808 6.28294-25.23116 19.84659-30.2036 33.13662-2.53611 6.61703-2.95365 13.0428-4.3001 19.89373l-7.83795 3.18857c-4.31086 1.75371-8.28764 3.18857-8.83727 3.18857-0.62881 0-0.78814-2.87345-0.42972-7.75z"/>\n' + '</svg>\n');
});
_FCore["default"].install('transform-ico', function () {
  return (0, _FCore._)('<svg width="24" height="24" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n' + ' <path transform="matrix(.02592263 0 0 .02592263 -2.5007162 -2.5036093)" d="m207.44439 493.6263c-5.91296-2.75339-11.64003-8.99821-13.28383-14.48474-1.66176-5.54644-1.66176-263.73668 0-269.28312 1.6438-5.48653 7.37087-11.73135 13.28383-14.48474 5.05561-2.35416 5.05561-2.35416 136.43959-2.36393 96.84015-7e-3 132.40244 0.29537 135.25758 1.15079 5.48653 1.6438 11.73135 7.37087 14.48474 13.28383 2.35416 5.05561 2.35416 5.05561 2.34197 137.05561-0.0121 130.64631-0.0331 132.04615-2.04918 136.5-2.7355 6.04311-6.40969 9.77576-12.41909 12.61671-5 2.36375-5 2.36375-137 2.36375s-132 0-137.05561-2.35416zm-52.32029 56.95419c-8.17116-3.80493-16.08543-12.43469-18.35701-20.01656-2.2964-7.66466-2.2964-364.45942 0-372.12408 2.27158-7.58187 10.18585-16.21163 18.35701-20.01656 6.98638-3.25323 6.98638-3.25323 188.54675-3.26673 133.82403-0.01 182.96779 0.40818 186.91333 1.59029 7.58187 2.27157 16.21163 10.18585 20.01655 18.35701 3.25323 6.98638 3.25323 6.98638 3.23639 189.39803-0.0167 180.54098-0.0457 182.47543-2.83178 188.63023-3.7802 8.35102-8.85759 13.50919-17.16202 17.43512-6.90953 3.26648-6.90953 3.26648-189.32119 3.26648-182.41165 0-182.41165 0-189.39803-3.25323zm646.11812-34.399c-3.58909-1.08898-15.7781-12.33759-47.25479-43.60903-47.2957-46.98731-49.11417-49.40912-47.66228-63.47657 2.39426-23.19808 25.70648-35.23337 47.03691-24.28353 2.39255 1.2282 9.48044 7.2293 15.75084 13.33576 11.40072 11.10267 11.40072 11.10267 11.40072-29.84382 0-40.94648 0-40.94648-63.22222-41.35684-61.74233-0.40075-63.3516-0.48017-68.74984-3.39309-13.62168-7.35032-20.19976-20.7746-17.14942-34.99787 2.06799-9.64268 8.23025-17.49941 16.8863-21.52961 7.17265-3.33953 7.17265-3.33953 89.39608-3.32268 76.90538 0.0158 82.58594 0.1815 87.82819 2.56261 6.90045 3.13427 14.83196 12.15616 16.97483 19.30842 1.10877 3.70076 1.60378 23.61312 1.60378 64.51425 0 59.1613 0 59.1613 11.40073 48.05863 12.28744-11.96619 16.68666-14.8037 26.28694-16.95516 18.80127-4.21346 38.29329 12.84029 36.66031 32.07442-0.33806 3.98166-1.67298 9.45319-2.96651 12.15898-1.31475 2.75013-21.07642 23.5617-44.81264 47.19338-35.43589 35.27985-43.37526 42.52377-47.98838 43.78489-6.71058 1.83449-14.91978 1.74898-21.41955-0.22314zm-48.07374 408.45848c-59.17584-8.50731-107.947-51.16421-124.72968-109.09281-8.16826-28.19427-7.22343-62.60589 2.48358-90.45471 15.4401-44.2967 49.90695-78.76356 94.20366-94.20365 27.84881-9.70701 62.26043-10.65184 90.45471-2.48359 48.7905 14.13526 86.88759 50.49408 102.56593 97.88612 6.67429 20.17489 9.24307 44.93923 6.80547 65.60806-7.22122 61.2297-51.67926 112.92924-110.68026 128.70832-17.79404 4.75879-44.01412 6.48908-61.10341 4.03226zm-8.10594 57.42997c-81.78365-11.75747-149.18757-70.71122-172.38198-150.77111-11.28889-38.96575-9.9831-86.52413 3.43241-125.01245 21.33891-61.22001 68.97364-108.85474 130.19366-130.19365 38.48831-13.41552 86.0467-14.72131 125.01244-3.43242 67.43066 19.53556 120.08254 69.78506 141.75069 135.28298 9.22417 27.88259 12.77434 62.10802 9.40546 90.67326-9.98004 84.62217-71.42303 156.07324-152.96506 177.88062-24.59215 6.57687-60.82947 8.9682-84.44762 5.57277zm-432.32425-115.77695c-10.29493-1.82797-18.2615-7.91261-23.68013-18.08619-2.37055-4.45076-2.63122-9.77359-3.26705-66.71159-0.69095-61.87493-0.69095-61.87493-11.74621-50.68141-14.09605 14.27234-19.30837 17.13241-31.09289 17.0611-5.57201-0.0337-10.63191-0.91962-13.32694-2.33332-6.09936-3.19949-12.95363-10.385-15.39308-16.13698-3.05974-7.21452-2.57255-19.11255 1.08141-26.41044 2.00054-3.99562 16.73875-19.85283 42.64059-45.87808 41.72138-41.92022 47.61267-46.5972 58.69553-46.5972 13.3893 0 14.05236 0.50589 58.73077 44.80839 23.36604 23.16945 43.2177 44.00684 44.86084 47.08839 4.06409 7.62179 4.07534 21.35999 0.0238 29.02004-7.41759 14.02393-22.76628 20.17455-37.84597 15.16588-5.83361-1.93761-9.98486-4.99506-20.20128-14.87851-12.85884-12.43976-12.85884-12.43976-12.85884 29.91147 0 42.35125 0 42.35125 57.69459 42.3816 52.8871 0.0278 58.15776 0.24074 63.25289 2.55531 23.77884 10.80196 24.94545 43.55885 1.99957 56.14536-7.55786 4.14572-7.55786 4.14572-80.79891 4.35171-40.28257 0.11332-75.72847-0.2357-78.76866-0.77553z" fill-rule="evenodd"/>\n' + '</svg>\n');
});
_FCore["default"].install('clipboard-view-ico', function () {
  return (0, _FCore._)('<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">' + '<path\n' + '     transform="translate(0.22253123,11.759387)"\n' + '     d="m 16,6 c 0.56,0 1,0.44 1,1 0,0.56 -0.44,1 -1,1 -0.56,0 -1,-0.44 -1,-1 0,-0.56 0.44,-1 1,-1 m 0,-3 c 2.73,0 5.06,1.66 6,4 -0.94,2.34 -3.27,4 -6,4 -2.73,0 -5.06,-1.66 -6,-4 0.94,-2.34 3.27,-4 6,-4 m 0,1.5 A 2.5,2.5 0 0 0 13.5,7 2.5,2.5 0 0 0 16,9.5 2.5,2.5 0 0 0 18.5,7 2.5,2.5 0 0 0 16,4.5 m -4.222531,-16.259387 c -1.3,0 -2.4003127,0.84 -2.8203127,2 H 4.7774688 a 2,2 0 0 0 -2,2 v 16 a 2,2 0 0 0 2,2 h 3.3457031 v -2 H 4.7774688 v -16 h 2 v 3 H 16.777469 v -3 h 2 v 8.617188 h 2 v -8.617188 a 2,2 0 0 0 -2,-2 h -4.179688 c -0.419999,-1.16 -1.520312,-2 -2.820312,-2 z m 0,2 a 1,1 0 0 1 1,1 1,1 0 0 1 -1,1 1,1 0 0 1 -1,-1 1,1 0 0 1 1,-1 z" />\n' + '</svg>');
});
_FCore["default"].install('send-to-back-ico', function () {
  return (0, _FCore._)('<svg  viewBox="0,0,2048,2048">' + '    <path class="OfficeIconColors_HighContrast" d="M 922 102 v 820 h -820 v -820 m 717 103 h -614 v 614 h 614 m 1127 307 v 820 h -820 v -820 m 717 103 h -614 v 614 h 614 m -205 -1433 v 614 h -614 v 614 h -614 v -616 h 614 v -612 z"></path><path type="path" class="OfficeIconColors_m20" d="M 154 870 v -716 h 716 v 716 m 308 1024 v -716 h 716 v 716 z"></path><path type="path" class="OfficeIconColors_m22" d="M 922 102 v 820 h -820 v -820 m 717 103 h -614 v 614 h 614 m 1127 307 v 820 h -820 v -820 m 717 103 h -614 v 614 h 614 z"></path>' + '    <path  class="OfficeIconColors_m212" d="M 1587 1024 h -563 v 563 h -561 v -565 h 561 v -561 h 563 z"></path><path type="path" class="OfficeIconColors_m211" d="M 1024 1638 h -614 v -614 h 102 v 512 h 512 m 512 -1024 h -512 v -102 h 614 v 614 h -102 z"></path>' + '</svg>');
});
_FCore["default"].install('send-to-back-icon', function () {
  return (0, _FCore._)('<svg viewBox="0,0,2048,2048">' + '<path  class="OfficeIconColors_HighContrast" d="M 922 102 v 820 h -820 v -820 m 717 103 h -614 v 614 h 614 m 1127 307 v 820 h -820 v -820 m 717 103 h -614 v 614 h 614 m -205 -1433 v 614 h -614 v 614 h -614 v -616 h 614 v -612 z"></path>' + '<path class="OfficeIconColors_m20" d="M 154 870 v -716 h 716 v 716 m 308 1024 v -716 h 716 v 716 z"></path><path type="path" class="OfficeIconColors_m22" d="M 922 102 v 820 h -820 v -820 m 717 103 h -614 v 614 h 614 m 1127 307 v 820 h -820 v -820 m 717 103 h -614 v 614 h 614 z"></path>' + '<path type="path" class="OfficeIconColors_m212" d="M 1587 1024 h -563 v 563 h -561 v -565 h 561 v -561 h 563 z"></path>' + '<path type="path" class="OfficeIconColors_m211" d="M 1024 1638 h -614 v -614 h 102 v 512 h 512 m 512 -1024 h -512 v -102 h 614 v 614 h -102 z"></path>' + '</svg>');
});
function SelectToolIco() {
  return (0, _FCore._)('<svg class="select-tool-ico" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240">\n' + '    <path style="fill: currentColor"  d="M219.9,39.9v30h-20v-30h-30v-20h30c11,0,20,8.9,20,20M20.1,39.9c0-11,8.9-20,20-20h30v20h-30s0,30,0,30h-20v-30M20.1,199.8v-30h20v30h30v20h-30c-11,0-20-8.9-20-20M219.9,199.8c0,11-8.9,20-20,20h-30v-20h30s0-30,0-30h20v30M100,19.9h40v20h-40v-20M100,199.8h40v20h-40v-20M199.9,99.9h20v40h-20v-40M20.1,99.9h20v40h-20v-40ZM80,59.9v120l40-30h50L80,59.9Z"/>\n' + '</svg>');
}
_FCore["default"].install('select-tool-ico', SelectToolIco);
_ACore["default"].install('select-tool-ico', SelectToolIco);
function DrawPenIco() {
  this._strokeColor = 'currentColor';
}
DrawPenIco.tag = 'DrawPenIco'.toLowerCase();
DrawPenIco.render = function () {
  return (0, _FCore._)("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">" + "<path style=\"fill:var(--value);stroke: none\" d=\"M9.75 20.85C11.53 20.15 11.14 18.22 10.24 17C9.35 15.75 8.12 14.89 6.88 14.06C6 13.5 5.19 12.8 4.54 12C4.26 11.67 3.69 11.06 4.27 10.94C4.86 10.82 5.88 11.4 6.4 11.62C7.31 12 8.21 12.44 9.05 12.96L10.06 11.26C8.5 10.23 6.5 9.32 4.64 9.05C3.58 8.89 2.46 9.11 2.1 10.26C1.78 11.25 2.29 12.25 2.87 13.03C4.24 14.86 6.37 15.74 7.96 17.32C8.3 17.65 8.71 18.04 8.91 18.5C9.12 18.94 9.07 18.97 8.6 18.97C7.36 18.97 5.81 18 4.8 17.36L3.79 19.06C5.32 20 7.88 21.47 9.75 20.85\" ></path>" + "<path d=\"M18.96 7.33L13.29 13H11V10.71L16.67 5.03L18.96 7.33\" ></path>" + "<path d=\"M22.36 6.55C22.35 6.85 22.04 7.16 21.72 7.47L19.2 10L18.33 9.13L20.93 6.54L20.34 5.95L19.67 6.62L17.38 4.33L19.53 2.18C19.77 1.94 20.16 1.94 20.39 2.18L21.82 3.61C22.06 3.83 22.06 4.23 21.82 4.47C21.61 4.68 21.41 4.88 21.41 5.08C21.39 5.28 21.59 5.5 21.79 5.67C22.08 5.97 22.37 6.25 22.36 6.55Z\" /></svg>");
};
_FCore["default"].install(DrawPenIco);
_ACore["default"].install(DrawPenIco);

/***/ }),

/***/ 77104:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _Text = __webpack_require__(35844);
var _stringFormat = __webpack_require__(22294);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @augments HTMLInputElement
 * @augments AElement
 * @augments PreInput
 * @constructor
 */
function IdentTextInput() {
  this.on('keydown', this.eventHandler.identTextKeyDown).on('paste', this.applyData ? this.eventHandler.identTextPaste : this.eventHandler.identTextPaste1);
}
IdentTextInput.tag = 'IdentTextInput'.toLowerCase();
IdentTextInput.render = function () {
  return (0, _FCore._)('input[type="text"]');
};
IdentTextInput.eventHandler = {};
IdentTextInput.prototype.getSelectionStart = function () {
  var start = 0;
  if (this.getSelectPosition) {
    start = this.getSelectPosition().start;
  } else {
    if (this.selectionStart || this.selectionStart === 0) start = this.selectionStart;
  }
  return start;
};
IdentTextInput.prototype.getSelectionEnd = function () {
  var start = 0;
  if (this.getSelectPosition) {
    start = this.getSelectPosition().end;
  } else {
    if (this.selectionEnd || this.selectionEnd === 0) start = this.selectionEnd;
  }
  return start;
};
IdentTextInput.prototype._filterHistory = function () {
  if (!this.history) return;
  var temp = this.history.filter(function (t) {
    return !t.text.match(/(^[^a-zA-Z_$])|([^a-zA-Z$_0-9]+)/);
  });
  this.history.splice(0, this.history.length);
  this.history.push.apply(this.history, temp);
};
IdentTextInput.prototype._setNewText = function (text, caretPos) {
  this._filterHistory();
  if (typeof caretPos !== "number") caretPos = text.length;
  caretPos = Math.max(0, Math.min(text.length, caretPos >> 0));
  if (this.applyData) {
    this.applyData(text, {
      start: caretPos,
      end: caretPos,
      direction: 'forward'
    });
  } else {
    this.value = text;
    (0, _Text.setCaretPosition)(this, caretPos);
  }
};
IdentTextInput.eventHandler.identTextKeyDown = function (event) {
  var selectedPositionStart;
  var key = event.key;
  if (key === ' ') {
    event.preventDefault();
  } else if (key === 'Enter') {
    event.preventDefault();
    this.blur();
  } else if (key === "Escape") {
    this.value = this._prevValue || '';
    this.blur();
  } else if (!event.ctrlKey && !event.altKey && key.length === 1) {
    // if (key.match(/[a-zA-Z$_0-9]/)) {
    //     selectedPositionStart = this.getSelectionStart();
    //     if (selectedPositionStart === 0 && key.match(/[0-9]/)) {
    //         event.preventDefault();
    //     }
    // }
    // else {
    //     event.preventDefault();
    // }
  }
  if (!this.applyData) {
    var prevValue = this.value;
    setTimeout(function () {
      if (this.value !== prevValue) {
        this.emit('change', {}, this);
      }
    }.bind(this), 10);
  }
};
IdentTextInput.eventHandler.identTextPaste = function (event) {
  var prevValue = this.value;
  var startPos = this.getSelectionStart();
  var endPos = this.getSelectionEnd();
  setTimeout(function () {
    var newValue = this.value;
    var newEndPos = endPos + newValue.length - prevValue.length;
    var pastedText = (0, _stringFormat.nonAccentVietnamese)(newValue).substr(startPos, newEndPos - startPos).replace(/(^[^a-zA-Z_$])|([^a-zA-Z$_0-9]+)/g, '');
    var newValue1 = newValue.substr(0, startPos) + pastedText + newValue.substr(newEndPos);
    if (!newValue1 !== newValue) {
      this._setNewText(newValue1, startPos + pastedText.length);
    }
  }.bind(this), 0);
};
IdentTextInput.eventHandler.identTextPaste1 = function (event) {
  var clipboardData = event.clipboardData || window.clipboardData;
  var pastedText = clipboardData.getData('text/plain');
  var pastedText1 = (0, _stringFormat.nonAccentVietnamese)(pastedText).replace(/(^[^a-zA-Z_$])|([^a-zA-Z$_0-9]+)/g, '');
  if (pastedText !== pastedText1) {
    document.execCommand("insertText", false, pastedText1);
    event.preventDefault();
  }
};
_FCore["default"].install(IdentTextInput);
var _default = IdentTextInput; // Core
exports["default"] = _default;

/***/ }),

/***/ 43675:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _FollowerToggler = _interopRequireDefault(__webpack_require__(49049));
var _ACore = _interopRequireDefault(__webpack_require__(34093));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @extends FollowerToggler
 * @constructor
 */
function LineStyleSelectMenu() {
  var _this = this;
  this._value = 'solid';
  this.$styleListBox = (0, _FCore._)({
    tag: 'follower',
    props: {
      anchor: [1, 6]
    },
    "class": ['as-line-style-select-menu-list-box', 'as-dropdown-box-common-style'],
    child: ['solid', 'double', 'dotted', 'dashed', 'wavy'].map(function (value) {
      return {
        "class": ['as-line-style-select-menu-item'].concat(value === _this._value ? ['as-selected'] : []),
        attr: {
          'data-value': value
        },
        style: {
          textDecoration: 'line-through ' + value
        },
        child: {
          text: ' '.repeat(32)
        },
        on: {
          click: function click(event) {
            _this._value = value;
            _this._updateSelectedItem();
            _this.close();
            _this.addStyle('textDecoration', 'line-through ' + value);
            _this.emit('change', {
              type: 'change',
              value: value,
              target: _this,
              originalEvent: event
            }, _this);
          }
        }
      };
    })
  });
  this.bindFollower(this.$styleListBox);
  this.$items = (0, _FCore.$$)('.as-line-style-select-menu-item', this.$styleListBox);
  this.on('preopen', function () {
    _this.$styleListBox.addTo(document.body);
    var cur = _this;
    var zIndex = 0;
    while (cur) {
      zIndex = Math.max(parseInt(getComputedStyle(cur).zIndex) || 0, zIndex);
      cur = cur.parentElement;
    }
    _this.$styleListBox.addStyle('zIndex', zIndex + 2);
    // console.log(zIndex)
  }).on('close', function () {
    _this.$styleListBox.remove();
  });
}
LineStyleSelectMenu.tag = 'LineStyleSelectMenu'.toLowerCase();
LineStyleSelectMenu.render = function () {
  return (0, _FCore._)({
    tag: _FollowerToggler["default"],
    extendEvent: 'change',
    "class": 'as-line-style-select-menu',
    style: {
      textDecorationLine: 'line-through',
      textDecorationStyle: 'solid'
    },
    child: [{
      text: ' '.repeat(32)
    }, {
      tag: 'button',
      "class": 'absol-selectmenu-btn',
      child: _ACore["default"]._('dropdown-ico')
    }]
  });
};
LineStyleSelectMenu.prototype._updateSelectedItem = function () {
  var value = this._value;
  this.$items.forEach(function (itemElt) {
    var itemValue = itemElt.attr('data-value');
    if (value === itemValue) {
      itemElt.addClass('as-selected');
    } else {
      itemElt.removeClass('as-selected');
    }
  });
};
LineStyleSelectMenu.property = {};
LineStyleSelectMenu.property.value = {
  set: function set(value) {
    if (!['solid', 'double', 'dotted', 'dashed', 'wavy'].includes(value)) value = 'solid';
    this._value = value;
    this._updateSelectedItem();
  },
  get: function get() {
    return this._value;
  }
};
_FCore["default"].install(LineStyleSelectMenu);
var _default = LineStyleSelectMenu;
exports["default"] = _default;

/***/ }),

/***/ 49844:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(42879);
var _FCore = _interopRequireDefault(__webpack_require__(51518));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *  Left: branch, sync, error, warning 
 *  Right: position(Ln x, Col y) , font-size, indent mode , language, status ,alert  
 */

var _ = _FCore["default"]._;
var $ = _FCore["default"].$;
function StatusBar() {
  this.$leftCtn = $('.as-status-bar-left', this);
  this.$rightCtn = $('.as-status-bar-right', this);
}
StatusBar.tag = 'statusbar';
StatusBar.render = function () {
  return _({
    "class": 'as-status-bar',
    child: ['.as-status-bar-left', '.as-status-bar-right']
  });
};
_FCore["default"].install(StatusBar);
var _default = StatusBar;
exports["default"] = _default;

/***/ }),

/***/ 69957:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
__webpack_require__(47515);
__webpack_require__(26795);
__webpack_require__(21540);
var _ColorPickerButton = _interopRequireDefault(__webpack_require__(34443));
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _generator = __webpack_require__(18528);
var _LineStyleSelectMenu = _interopRequireDefault(__webpack_require__(43675));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _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); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _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; }
/**
 * @extends AElement
 * @constructor
 */
function TextDecorationPicker() {
  var _this = this;
  this._valueObj = {
    lines: [],
    style: 'solid',
    thickness: 'auto',
    color: 'currentColor'
  };
  this._hiddenConfigs = ['thickness'];
  this.$lines = (0, _FCore.$$)('div[data-name="lines"] .as-table-grid-cell button', this);
  this.$lines.forEach(function (btn) {
    var value = btn.attr('data-value');
    btn.on('click', function (event) {
      var idx = _this._valueObj.lines.indexOf(value);
      if (idx >= 0) {
        btn.removeClass('as-selected');
        _this._valueObj.lines.splice(idx, 1);
      } else {
        btn.addClass('as-selected');
        _this._valueObj.lines.push(value);
      }
      _this._updatePreview();
      _this._notifyIfChange(event.originalEvent || event);
    });
  });
  this.$rows = (0, _FCore.$$)('.as-table-grid-row', this);
  this.$preview = (0, _FCore.$)('.as-text-decoration-picker-preview', this);
  this.$style = (0, _FCore.$)(_LineStyleSelectMenu["default"].tag, this).on('change', function (event) {
    _this._valueObj.style = _this.$style.value;
    _this._updatePreview();
    _this._notifyIfChange(event.originalEvent || event);
  });
  this.$style.valye = this._valueObj.style;
  this.$colorDefault = (0, _FCore.$)('div[data-name="color"] checkbox', this);
  this.$color = (0, _FCore.$)('div[data-name="color"] ' + _ColorPickerButton["default"].tag, this).on('change', function (event) {
    _this._valueObj.color = _this.$color.value;
    _this._updatePreview();
    _this._notifyIfChange(event.originalEvent || event);
  });
  this.$colorDefault.on('change', function (event) {
    if (_this.$colorDefault.checked) {
      _this._valueObj.color = 'currentColor';
      _this.$color.disabled = true;
    } else {
      _this._valueObj.color = _this.$color.value;
      _this.$color.disabled = false;
    }
    _this._updatePreview();
    _this._notifyIfChange(event.originalEvent || event);
  });

  /**
   * @type {string}
   * @name value
   * @memberof TextDecorationPicker#
   */
  /**
   * @type {("lines"|"color"|"style"|"thickness")[]}
   * @name hiddenConfigs
   * @memberof TextDecorationPicker#
   */
}

TextDecorationPicker.tag = 'TextDecorationPicker'.toLowerCase();
TextDecorationPicker.render = function () {
  return (0, _FCore._)({
    extendEvent: 'change',
    "class": ['as-text-decoration-picker' /*, 'as-dropdown-box-common-style'*/],
    child: [{
      "class": 'as-table-grid',
      child: [{
        "class": 'as-table-grid-row',
        attr: {
          'data-name': 'lines'
        },
        child: [{
          "class": 'as-table-grid-cell',
          child: {
            tag: 'span',
            child: {
              text: 'Line'
            }
          }
        }, {
          "class": ['as-table-grid-cell'],
          child: [{
            tag: 'button',
            "class": 'as-transparent-button',
            attr: {
              "data-value": 'underline'
            },
            child: {
              tag: 'span',
              style: {
                textDecoration: 'underline'
              },
              child: {
                text: 'underline'
              }
            }
          }, {
            tag: 'button',
            "class": 'as-transparent-button',
            attr: {
              "data-value": 'line-through'
            },
            child: {
              tag: 'span',
              style: {
                textDecoration: 'line-through'
              },
              child: {
                text: 'line-through'
              }
            }
          }, {
            tag: 'button',
            "class": 'as-transparent-button',
            attr: {
              "data-value": 'overline'
            },
            child: {
              tag: 'span',
              style: {
                textDecoration: 'overline'
              },
              child: {
                text: 'overline'
              }
            }
          }]
        }]
      }, {
        "class": 'as-table-grid-row',
        attr: {
          "data-name": 'style'
        },
        child: [{
          "class": 'as-table-grid-cell',
          child: {
            tag: 'span',
            child: {
              text: 'Style'
            }
          }
        }, {
          "class": 'as-table-grid-cell',
          child: {
            tag: _LineStyleSelectMenu["default"]
          }
        }]
      }, {
        "class": 'as-table-grid-row',
        attr: {
          "data-name": 'thickness'
        },
        style: {
          display: 'none'
        },
        //simple mode
        child: [{
          "class": 'as-table-grid-cell',
          child: {
            tag: 'span',
            child: {
              text: 'Thickness'
            }
          }
        }, {
          "class": 'as-table-grid-cell',
          child: [{
            tag: 'numberinput',
            props: {
              disabled: true,
              value: 1
            }
          }, {
            tag: 'selectmenu',
            props: {
              items: [{
                text: 'auto',
                value: 'auto'
              }, {
                text: 'px',
                value: 'px'
              }, {
                text: '%',
                value: '%'
              }]
            }
          }]
        }]
      }, {
        "class": 'as-table-grid-row',
        attr: {
          'data-name': 'color'
        },
        child: [{
          "class": 'as-table-grid-cell',
          child: {
            tag: 'span',
            child: {
              text: 'Color'
            }
          }
        }, {
          "class": 'as-table-grid-cell',
          child: [{
            tag: _ColorPickerButton["default"],
            props: {
              value: 'black',
              disabled: true
            }
          }, {
            tag: 'checkbox',
            props: {
              checked: true,
              text: 'default'
            }
          }]
        }]
      }]
    }, {
      "class": 'as-text-decoration-picker-preview',
      child: {
        tag: 'span',
        child: {
          text: 'AaBbCc DdEeFfGg'
        }
      }
    }]
  });
};
TextDecorationPicker.prototype._updatePreview = function () {
  this.$preview.addStyle('textDecoration', this.value);
};
TextDecorationPicker.prototype._notifyIfChange = function (event) {
  var value = this.value;
  if (value !== this._prevValue) {
    this.emit('change', {
      type: 'change',
      originalEvent: event,
      target: this,
      value: value,
      prevValue: this._prevValue
    }, this);
    this._prevValue = value;
  }
};
TextDecorationPicker.property = {};
TextDecorationPicker.property.value = {
  /**
   * @this TextDecorationPicker
   * @param {string}value
   */
  set: function set(value) {
    var _this2 = this;
    value = value || '';
    if (typeof value !== "string") value = '';
    var lines = value.match(/underline|line-through|overline/g);
    this._valueObj.lines = lines || [];
    this.$lines.forEach(function (btn) {
      var value = btn.attr('data-value');
      if (_this2._valueObj.lines.includes(value)) {
        btn.addClass('as-selected');
      } else {
        btn.removeClass('as-selected');
      }
    });
    var style = value.match(/solid|double|dotted|dashed|wavy/);
    if (style) {
      style = style[0];
    } else {
      style = 'solid';
    }
    this._valueObj.style = style;
    var thickness = value.match(/[0-9]+(px|%)/);
    if (thickness) {
      thickness = thickness[0];
    } else {
      thickness = 'auto';
    }
    this._valueObj.thickness = thickness;
    var tokens = value.match(/[a-zA-Z-#0-9%]+(\([^)]+\))?/g);
    var color;
    if (tokens) {
      color = tokens.reduce(function (ac, cr) {
        try {
          var color = _Color["default"].parse(cr);
          if (color) return cr;
        } catch (err) {}
        return ac;
      }, null);
    }
    color = color || 'currentColor';
    this._valueObj.color = color;
    if (color !== 'currentColor') {
      this.$color.value = color;
      this.$color.disabled = false;
      this.$colorDefault.checked = false;
    } else {
      this.$color.value = 'black';
      this.$color.disabled = true;
      this.$colorDefault.checked = true;
    }
    this._prevValue = this.value;
    this._updatePreview();
  },
  /**
   * @this TextDecorationPicker
   */
  get: function get() {
    var parts = [];
    if (!this._hiddenConfigs.includes('lines')) {
      if (this._valueObj.lines.length === 0) return null;
      parts.push.apply(parts, _toConsumableArray(this._valueObj.lines));
    }
    if (!this._hiddenConfigs.includes('style') && this._valueObj.style !== 'solid') {
      parts.push(this._valueObj.style);
    }
    if (!this._hiddenConfigs.includes('color') && this._valueObj.color !== 'currentColor') {
      parts.push(this._valueObj.color);
    }
    if (!this._hiddenConfigs.includes('thickness') && this._valueObj.thickness !== "auto") {
      parts.push(this._valueObj.thickness);
    }
    return parts.join(' ') || null;
  }
};
TextDecorationPicker.property.valueObj = {
  get: function get() {
    return (0, _generator.copyJSVariable)(this._valueObj);
  }
};
TextDecorationPicker.property.hiddenConfigs = {
  set: function set(value) {
    var _this3 = this;
    value = value || [];
    if (typeof value === "string") value = [value];else if (!(_typeof(value) instanceof Array)) value = [];
    this._hiddenConfigs = [];
    this.$rows.forEach(function (rowElt) {
      var name = rowElt.attr('data-name');
      if (value.indexOf(name)) {
        _this3._hiddenConfigs.push(name);
      }
    });
  },
  get: function get() {
    return this._hiddenConfigs;
  }
};
_FCore["default"].install(TextDecorationPicker);
var _default = TextDecorationPicker;
exports["default"] = _default;

/***/ }),

/***/ 86124:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(75638);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var $ = _FCore["default"].$;
var _ = _FCore["default"]._;
function VLine() {}
VLine.render = function () {
  return _({
    "class": 'as-vline',
    child: {
      "class": 'as-vline-body',
      child: ['.as-vline-dot.top', '.as-vline-dot.bottom']
    }
  });
};
_FCore["default"].install('vline', VLine);
var _default = VLine;
exports["default"] = _default;

/***/ }),

/***/ 52545:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function WindowManager() {
  this.windowHolders = [];
  this.zIndex = 100;
}
WindowManager.prototype.ev_mouseDownWindow = function (holder, event) {
  holder.delta = 1000;
  this.reIndex();
};
WindowManager.prototype.remove = function (elt) {
  var holder = this.getHolder(elt);
  if (!holder) return;
  elt.off('mousedown', holder.onmousedown);
  elt.remove();
  holder.delta -= 100000000;
  this.reIndex();
};
WindowManager.prototype.getHolder = function (elt) {
  for (var i = 0; i < this.windowHolders.length; ++i) {
    if (this.windowHolders[i].elt == elt) return this.windowHolders[i];
  }
};
WindowManager.prototype.add = function (elt) {
  var holder = this.getHolder(elt);
  if (holder) return holder;
  var holder = {
    elt: elt,
    zIndex: 100,
    delta: 1000
  };
  holder.onmousedown = this.ev_mouseDownWindow.bind(this, holder);
  this.windowHolders.push(holder);
  elt.on('mousedown', holder.onmousedown);
  elt.addTo(document.body);
  this.reIndex();
  return holder;
};
WindowManager.prototype.reIndex = function () {
  this.windowHolders.sort(function (a, b) {
    return a.zIndex + a.delta - b.zIndex - b.delta;
  });
  while (this.windowHolders.length > 0 && this.windowHolders[0].delta < 0) {
    this.windowHolders.shift();
  }
  var holder;
  for (var i = 0; i < this.windowHolders.length; ++i) {
    holder = this.windowHolders[i];
    holder.delta = 0;
    if (holder.zIndex != this.zIndex + i) {
      holder.zIndex = this.zIndex + i;
      holder.elt.addStyle('zIndex', holder.zIndex + '');
    }
  }
};
var _default = new WindowManager();
exports["default"] = _default;

/***/ }),

/***/ 59328:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _utils = __webpack_require__(84512);
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _GCore = _interopRequireDefault(__webpack_require__(66723));
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function CDENode() {
  this.pinHolders = {
    "in": {},
    out: {}
  };
  this.rect = {
    width: 0,
    height: 0
  };
  this.$typeIcon = null;
  this.$nameCtn = (0, _FCore.$)('.as-cde-node-name-ctn', this);
  this.$name = (0, _FCore.$)('.as-cde-node-name', this);
  this.$decs = (0, _FCore.$)('.as-cde-node-description', this);
  /***
   *
   * @type {Hanger}
   */
  this.$header = (0, _FCore.$)('.as-cde-node-header', this);
  this.$header.hangOn = 3;
  this.$inputCtn = (0, _FCore.$)('.as-cde-node-input-ctn', this);
  this.$outputCtn = (0, _FCore.$)('.as-cde-node-output-ctn', this);
  this.$inputPins = [];
  this.$outputPins = [];
  this._inputPins = [];
  this.inputPins = this._inputPins;
  this._outputPins = [];
  this.outputPins = this._outputPins;
  this._x = 0;
  this._y = 0;

  /***
   * @name x
   * @type {number}
   * @memberOf! CDENode#
   *
   */
  /***
   * @name y
   * @type {number}
   * @memberOf! CDENode#
   *
   */

  /***
   * @name position
   * @type {Vec2}
   * @memberOf! CDENode#
   *
   */
}

CDENode.tag = 'CDENode'.toLowerCase();
CDENode.render = function () {
  return (0, _FCore._)({
    extendEvent: ['presspin'],
    "class": 'as-cde-node',
    child: [{
      tag: _Hanger["default"].tag,
      "class": 'as-cde-node-header',
      child: [{
        "class": 'as-cde-node-name-ctn',
        child: [{
          "class": 'as-cde-node-name',
          child: {
            text: 'Tiêu đề'
          }
        }, {
          "class": 'as-cde-node-description',
          child: {
            text: ''
          }
        }]
      }]
    }, {
      "class": 'as-cde-node-body',
      child: [{
        "class": 'as-cde-node-input-ctn',
        child: Array(5).fill(null).map(function (u, i) {
          return {
            "class": 'as-cde-node-pin',
            child: [_GCore["default"]._({
              tag: 'svg',
              child: {
                tag: 'path',
                attr: {
                  d: "m 13.570174,6.3342697 c 1.607518,1.5146681 2.614487,3.6595924 2.614487,6.0338973 0,2.009296 -0.720663,3.857835 -1.916484,5.297565 L 17.83082,15.634259 23.864715,12.19871 17.83082,8.7611427 Z M 13.800004,12 A 6.7499998,6.7499998 0 0 1 7.0500003,18.75 6.7499998,6.7499998 0 0 1 0.3,12 6.7499998,6.7499998 0 0 1 7.0500003,5.25 6.7499998,6.7499998 0 0 1 13.800004,12 Z"
                }
              }
            }), {
              tag: 'span',
              child: {
                text: 'pin ' + i
              }
            }]
          };
        })
      }, {
        "class": 'as-cde-node-output-ctn',
        child: Array(5).fill(null).map(function (u, i) {
          return {
            "class": 'as-cde-node-pin',
            child: [{
              tag: 'span',
              child: {
                text: 'pin ' + i
              }
            }, 'span.mdi.mdi-arrow-right-bold-outline']
          };
        })
      }]
    }]
  });
};
CDENode.property = {};
CDENode.prototype.reloadPinPosition = function () {
  var pinName;
  var bound = this.getBoundingClientRect();
  this.rect.width = bound.width;
  this.rect.height = bound.height;
  var pinBound;
  for (pinName in this.pinHolders["in"]) {
    pinBound = this.pinHolders["in"][pinName].elt.getBoundingClientRect();
    this.pinHolders["in"][pinName].pos = new _Vec["default"](pinBound.left - bound.left + 5, pinBound.top - bound.top + pinBound.height / 2);
  }
  for (pinName in this.pinHolders.out) {
    pinBound = this.pinHolders.out[pinName].elt.getBoundingClientRect();
    this.pinHolders.out[pinName].pos = new _Vec["default"](pinBound.right - bound.left - 5, pinBound.top - bound.top + pinBound.height / 2);
  }
};
CDENode.property.inputPins = {
  set: function set(pins) {
    var self = this;
    pins = pins || [];
    this._inputPins = pins;
    this.$inputPins = pins.map(function (pin) {
      return (0, _FCore._)({
        "class": 'as-cde-node-pin',
        child: [_GCore["default"]._({
          tag: 'svg',
          "class": 'as-cde-node-pin-ico',
          attr: {
            viewBox: '0 0 24 24'
          },
          child: {
            tag: 'path',
            attr: {
              d: "m 13.570174,6.3342697 c 1.607518,1.5146681 2.614487,3.6595924 2.614487,6.0338973 0,2.009296 -0.720663,3.857835 -1.916484,5.297565 L 17.83082,15.634259 23.864715,12.19871 17.83082,8.7611427 Z M 13.800004,12 A 6.7499998,6.7499998 0 0 1 7.0500003,18.75 6.7499998,6.7499998 0 0 1 0.3,12 6.7499998,6.7499998 0 0 1 7.0500003,5.25 6.7499998,6.7499998 0 0 1 13.800004,12 Z"
            }
          }
        }), {
          tag: 'span',
          child: {
            text: pin.text || pin.name
          }
        }],
        props: {
          name: pin.name
        },
        on: {
          click: self.eventHandler.pressPin.bind(null, pin.name, 'in')
        }
      });
    });
    this.$inputCtn.clearChild().addChild(this.$inputPins);
    this.pinHolders["in"] = this.$inputPins.reduce(function (ac, pinElt) {
      ac[pinElt.name] = {
        elt: pinElt,
        pos: new _Vec["default"](0, 0)
      };
      return ac;
    }, {});
  },
  get: function get() {
    return this._inputPins;
  }
};
CDENode.property.outputPins = {
  set: function set(pins) {
    pins = pins || [];
    this._outputPins = pins;
    var self = this;
    this.$outputPins = pins.map(function (pin) {
      return (0, _FCore._)({
        "class": 'as-cde-node-pin',
        child: [{
          tag: 'span',
          child: {
            text: pin.text || pin.name
          }
        }, _GCore["default"]._({
          tag: 'svg',
          "class": 'as-cde-node-pin-ico',
          attr: {
            viewBox: '0 0 24 24'
          },
          child: {
            tag: 'path',
            attr: {
              d: "m 13.570174,6.3342697 c 1.607518,1.5146681 2.614487,3.6595924 2.614487,6.0338973 0,2.009296 -0.720663,3.857835 -1.916484,5.297565 L 17.83082,15.634259 23.864715,12.19871 17.83082,8.7611427 Z M 13.800004,12 A 6.7499998,6.7499998 0 0 1 7.0500003,18.75 6.7499998,6.7499998 0 0 1 0.3,12 6.7499998,6.7499998 0 0 1 7.0500003,5.25 6.7499998,6.7499998 0 0 1 13.800004,12 Z"
            }
          }
        })],
        props: {
          name: pin.name
        },
        on: {
          click: self.eventHandler.pressPin.bind(null, pin.name, 'out')
        }
      });
    });
    this.$outputCtn.clearChild().addChild(this.$outputPins);
    this.pinHolders.out = this.$outputPins.reduce(function (ac, pinElt) {
      ac[pinElt.name] = {
        elt: pinElt,
        pos: new _Vec["default"](0, 0)
      };
      return ac;
    }, {});
  },
  get: function get() {
    return this._outputPins;
  }
};
CDENode.property.typeIcon = {
  set: function set(value) {
    this._typeIcon = value;
    if (this.$typeIcon) {
      this.$typeIcon.remove();
      this.$typeIcon = null;
    }
    if (value) {
      this.$typeIcon = (0, _FCore._)(value).addClass('as-cde-node-type-icon');
      this.$header.addChildBefore(this.$typeIcon, this.$nameCtn);
    }
  },
  get: function get() {
    return this._typeIcon;
  }
};
CDENode.property.name = {
  set: function set(value) {
    this.$name.firstChild.data = (value || '') + '';
  },
  get: function get() {
    return this.$name.firstChild.data;
  }
};
CDENode.property.desc = {
  set: function set(value) {
    this.$decs.firstChild.data = (value || '') + '';
    if (!value) {
      this.$decs.addStyle('display', 'none');
    } else {
      this.$decs.removeStyle('display');
    }
  },
  get: function get() {
    return this.$decs.firstChild.data;
  }
};
CDENode.property.x = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) value = 0;
    this._x = value;
    this.addStyle('left', value + 'px');
  },
  get: function get() {
    return this._x;
  }
};
CDENode.property.y = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) value = 0;
    this._y = value;
    this.addStyle('top', value + 'px');
  },
  get: function get() {
    return this._y;
  }
};
CDENode.property.position = {
  set: function set(value) {
    this.x = value.x;
    this.y = value.y;
  },
  get: function get() {
    return new _Vec["default"](this.x, this.y);
  }
};
CDENode.eventHandler = {};
CDENode.eventHandler.pressPin = function (pinName, mode, event) {
  this.emit('presspin', (0, _EventEmitter.copyEvent)(event, {
    type: 'presspin',
    pinName: pinName,
    mode: mode,
    target: this
  }), this);
};
_FCore["default"].install(CDENode);
var _default = CDENode;
exports["default"] = _default;

/***/ }),

/***/ 56036:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = install;
exports.publicCreators = void 0;
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _CDENode = _interopRequireDefault(__webpack_require__(59328));
var _TokenizeInput = _interopRequireDefault(__webpack_require__(49042));
var _SCExpressionInput = _interopRequireDefault(__webpack_require__(34586));
var _TextDecorationPicker = _interopRequireDefault(__webpack_require__(69957));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var publicCreators = [_CDENode["default"], _TokenizeInput["default"], _SCExpressionInput["default"], _TextDecorationPicker["default"]];

/***
 *
 * @param {Dom} core
 */
exports.publicCreators = publicCreators;
function install(core) {
  return core.install(publicCreators);
}

/***/ }),

/***/ 34586:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
__webpack_require__(83373);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _SCParser = _interopRequireDefault(__webpack_require__(11547));
var _PreInput = _interopRequireDefault(__webpack_require__(76606));
var _Text = _interopRequireDefault(__webpack_require__(36685));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function SCExpressionInput() {
  this._stopChangeTO = -1;
  this.on('stopchange', this.highlightError.bind(this));
  this.$content = (0, _FCore.$)('.as-sc-expression-input-content', this).on('keydown', this.eventHandler.keydown).on('cut', this.eventHandler.cut).on('blur', this.eventHandler.blur).on('focus', this.eventHandler.focus).on('paste', this.eventHandler.paste);
  this.$domSignal = (0, _FCore._)('attachhook').addTo(this);
  this.domSignal = new _DomSignal["default"](this.$domSignal);
  this.domSignal.on('redrawTokens', this.redrawTokens.bind(this));
  this.lastSelectedPostion = null;
  /****
   * @name value
   * @type {string}
   * @memberOf SCExpressionInput#
   */
}

SCExpressionInput.tag = 'SCExpressionInput'.toLowerCase();
SCExpressionInput.render = function () {
  return (0, _FCore._)({
    extendEvent: ['stopchange'],
    "class": ['as-sc-expression-input'],
    child: [{
      "class": 'as-sc-expression-input-icon-ctn',
      child: ['span.mdi.mdi-function-variant', 'span.mdi.mdi-alert-circle']
    }, {
      "class": 'as-sc-expression-input-content',
      attr: {
        contenteditable: "true"
      }
    }]
  });
};
SCExpressionInput.prototype.tokenize = function (source) {
  return [];
};
SCExpressionInput.prototype.getSelectPosition = _PreInput["default"].prototype.getSelectPosition;
SCExpressionInput.prototype.getPosition = _PreInput["default"].prototype.getPosition;
SCExpressionInput.prototype.stringOf = _PreInput["default"].prototype.stringOf;
SCExpressionInput.prototype.tokenOf = function (elt) {};
SCExpressionInput.prototype.delayNotifyStopChange = function () {
  if (this._stopChangeTO > 0) {
    clearTimeout(this._stopChangeTO);
  }
  this._stopChangeTO = setTimeout(function () {
    this._stopChangeTO = -1;
    this.emit('stopchange', {}, this);
  }.bind(this), 200);
};
SCExpressionInput.prototype.makeTokenElt = function (token) {
  return (0, _FCore._)({
    tag: 'span',
    "class": ['as-token'],
    attr: {
      'data-type': token.type
    },
    child: {
      text: token.content
    }
  });
};
SCExpressionInput.prototype.tokenOf = function (elt) {
  if (!elt.classList.contains('as-token')) return null;
  var res = {};
  res.type = elt.getAttribute('data-type');
  res.content = elt.firstChild && elt.firstChild.data;
  if (res.type && res.content) return res;
  return null;
};
SCExpressionInput.prototype.highlightError = function () {
  var value = this.value.trim();
  var it = _SCParser["default"].parse(value, 'exp');
  var i,
    notSkipCount = 0;
  var tokenErrorIdx = -1;
  if (value && it.error) {
    this.addClass('as-error');
    this.attr('title', it.error.message);
    tokenErrorIdx = it.error.tokenIdx;
  } else {
    this.removeClass('as-error');
  }
  for (i = 0; i < this.$content.childNodes.length; ++i) {
    if (this.$content.childNodes[i].classList.contains('as-token') && this.$content.childNodes[i].getAttribute('data-type') !== 'skip') {
      if (notSkipCount === tokenErrorIdx) {
        this.$content.childNodes[i].classList.add('as-unexpected-token');
      } else {
        this.$content.childNodes[i].classList.remove('as-unexpected-token');
      }
      notSkipCount++;
    }
  }
};
SCExpressionInput.prototype.clearErrorHighlight = function () {
  for (var i = 0; i < this.$content.childNodes.length; ++i) {
    if (this.$content.childNodes[i].classList.contains('as-token') && this.$content.childNodes[i].getAttribute('data-type') !== 'skip') {
      this.$content.childNodes[i].classList.remove('as-unexpected-token');
    }
  }
};
SCExpressionInput.prototype.setSelectedPosition = function (pos) {
  //when tokenized
  var start;
  var end;
  if (typeof pos === "number") {
    start = pos;
    end = pos;
  } else {
    start = pos.start;
    end = pos.end;
  }
  var curOffset = 0;
  var elt;
  var childNodes = this.$content.childNodes;
  var content;
  var i;
  var sel = window.getSelection();
  var range = document.createRange();
  var d1 = true,
    d2 = true;
  for (i = 0; i < childNodes.length && d1 && d2; ++i) {
    elt = childNodes[i];
    content = elt.firstChild && elt.firstChild.data || '';
    if (d1 && curOffset <= start && (curOffset + content.length > start || i + 1 === childNodes.length)) {
      range.setStart(elt.firstChild || elt, start - curOffset);
      d1 = false;
    }
    if (d2 && curOffset <= end && (curOffset + content.length > end || i + 1 === childNodes.length)) {
      range.setEnd(elt.firstChild || elt, end - curOffset);
      d2 = false;
    }
    curOffset += content.length;
  }
  sel.removeAllRanges();
  sel.addRange(range);
  this.lastSelectedPostion = {
    start: start,
    end: end,
    direction: 'forward'
  };
};
SCExpressionInput.prototype.insertText = function (text) {
  var lastPos = this.lastSelectedPostion;
  var value;
  if (this.lastSelectedPostion) {
    value = this.value;
    this.value = value.substring(0, lastPos.start) + text + value.substring(lastPos.end);
    this.lastSelectedPostion = Object.assign({
      direction: 'forward',
      start: lastPos.start + text.length,
      end: lastPos.start + text.length
    });
    if (document.activeElement === this.$content) {
      this.setSelectedPosition(this.lastSelectedPostion);
    }
  } else this.appendText(text);
  this.delayNotifyStopChange();
};
SCExpressionInput.prototype.appendText = function (text) {
  var newValue = this.value + text;
  this.value = newValue;
  if (document.activeElement === this.$content) {
    this.setSelectedPosition(newValue.length);
  }
  this.delayNotifyStopChange();
};
SCExpressionInput.prototype.redrawTokens = function () {
  var selectedPos = this.getSelectPosition();
  var value = this.value;
  var tokens = _SCParser["default"].tokenizer.tokenize(value);
  var tokenEltChain = Array.prototype.slice.call(this.$content.childNodes);
  while (tokenEltChain[tokenEltChain.length - 1] && tokenEltChain[tokenEltChain.length - 1].tagName === 'BR') {
    tokenEltChain.pop();
  }
  var leftPassed = 0;
  while (leftPassed < tokenEltChain.length && leftPassed < tokens.length) {
    if (!tokenEltChain[leftPassed].firstChild || !tokenEltChain[leftPassed].classList.contains('as-token') || tokens[leftPassed].content !== tokenEltChain[leftPassed].firstChild.data) break;
    if (!tokenEltChain[leftPassed].token || tokenEltChain[leftPassed].getAttribute('data-type') !== tokens[leftPassed].type) {
      tokenEltChain[leftPassed].setAttribute('data-type', tokens[leftPassed].type);
    }
    leftPassed++;
  }
  var rightPassed = 0;
  while (rightPassed < tokenEltChain.length && rightPassed < tokens.length) {
    if (!tokenEltChain[tokenEltChain.length - 1 - rightPassed].firstChild || !tokenEltChain[tokenEltChain.length - 1 - rightPassed].classList.contains('as-token') || tokens[tokens.length - 1 - rightPassed].content !== tokenEltChain[tokenEltChain.length - 1 - rightPassed].firstChild.data) break;
    if (tokenEltChain[tokenEltChain.length - 1 - rightPassed].getAttribute('data-type') !== tokens[tokens.length - 1 - rightPassed].type) {
      tokenEltChain[tokenEltChain.length - 1 - rightPassed].setAttribute('data-type', tokens[tokens.length - 1 - rightPassed].type);
    }
    rightPassed++;
  }
  var beforeToken;
  if (leftPassed + rightPassed < Math.max(tokenEltChain.length, tokens.length)) {
    beforeToken = tokenEltChain[tokenEltChain.length - rightPassed];
    tokenEltChain.splice(leftPassed, tokenEltChain.length - leftPassed - rightPassed).forEach(function (elt) {
      elt.remove();
    });
    tokens.slice(leftPassed, tokens.length - rightPassed).forEach(function (token) {
      var tokenElt = this.makeTokenElt(token);
      if (beforeToken) {
        this.$content.addChildBefore(tokenElt, beforeToken);
      } else {
        this.$content.addChild(tokenElt);
      }
    }.bind(this));
  }
  if (selectedPos) this.setSelectedPosition(selectedPos);
};
SCExpressionInput.property = {};
SCExpressionInput.property.value = {
  get: function get() {
    return this.stringOf(this.$content);
  },
  set: function set(value) {
    var tokens = _SCParser["default"].tokenizer.tokenize(value || '');
    this.$content.clearChild().addChild(tokens.map(function (token) {
      return this.makeTokenElt(token);
    }.bind(this)));
    this.lastSelectedPostion = null;
  }
};

/***
 * @memberOf SCExpressionInput#
 * @type {{}}
 */
SCExpressionInput.eventHandler = {};

/***
 *
 * @param {KeyboardEvent} event
 */
SCExpressionInput.eventHandler.keydown = function (event) {
  if (event.key === 'Enter') {
    event.preventDefault();
  } else if (event.ctrlKey && event.key === 'X' || !event.ctrlKey && event.key.length === 1 || event.key === 'Delete' || event.key === 'Backspace') {
    this.domSignal.emit('redrawTokens');
  }
  this.delayNotifyStopChange();
};

/***
 *
 * @param {MouseEvent} event
 */
SCExpressionInput.eventHandler.mousedown = function (event) {};
SCExpressionInput.eventHandler.paste = function (event) {
  var paste = (event.clipboardData || window.clipboardData).getData('text');
  paste = paste.replace(/[\r\n]+/g, ' ');
  event.preventDefault();
  var pos = this.getSelectPosition();
  if (!pos || !paste) return;
  var value = this.value;
  var newValue = value.substring(0, pos.start) + paste + value.substring(pos.end);
  this.value = newValue;
  this.setSelectedPosition(pos.start + paste.length);
  this.highlightError();
};
SCExpressionInput.eventHandler.cut = function (event) {
  this.domSignal.emit('redrawTokens');
  this.delayNotifyStopChange();
};

/***
 * @this SCExpressionInput
 */
SCExpressionInput.eventHandler.blur = function () {
  this.highlightError();
};

/***
 * @this SCExpressionInput
 */
SCExpressionInput.eventHandler.focus = function () {
  this.clearErrorHighlight();
  setTimeout(function () {
    this.lastSelectedPostion = this.getSelectPosition();
  }.bind(this), 100);
};
_FCore["default"].install(SCExpressionInput);
var _default = SCExpressionInput;
exports["default"] = _default;

/***/ }),

/***/ 49042:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _SCParser = _interopRequireDefault(__webpack_require__(11547));
__webpack_require__(93499);
var _PreInput = _interopRequireDefault(__webpack_require__(76606));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function TokenizeInput() {
  this._readOnly = true;
  this._value = '';
  this.on('keydown', this.eventHandler.keydown).on('mousedown', this.eventHandler.mousedown).on('mouseup', this.eventHandler.mouseup).on('focus', this.eventHandler.focus);
  this.$highlightingElts = [];
}
TokenizeInput.tag = 'TokenizeInput'.toLowerCase();
TokenizeInput.render = function () {
  return (0, _FCore._)({
    "class": 'as-tokenize-input',
    attr: {
      contenteditable: 'true'
    }
  });
};
TokenizeInput.property = {};
TokenizeInput.property.value = {
  set: function set(value) {
    value = (value || '') + '';
    this._value = value;
    var tokens = _SCParser["default"].tokenizer.tokenize(value);
    tokens = tokens.reduce(function (ac, cr) {
      var last = ac[ac.length - 1];
      if (last && last.content[0] === '{' && last.content[last.content.length - 1] !== '}') {
        last.content += cr.content;
        last.end = cr.end;
        last.type = 'constance';
      } else {
        ac.push(cr);
      }
      return ac;
    }, []);
    var tokenEltArr = tokens.map(function (token) {
      return (0, _FCore._)({
        tag: 'span',
        "class": ['as-token', 'as-type-' + token.type],
        child: {
          text: token.content
        },
        props: {
          token: token
        }
      });
    });
    this.clearChild();
    this.addChild(tokenEltArr);
  },
  get: function get() {
    return this._value;
  }
};
TokenizeInput.property.readOnly = {
  set: function set(value) {
    value = value || true;
    this._readOnly = value;
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this._readOnly;
  }
};

/***
 * @memberOf TokenizeInput#
 * @type {{}}
 */
TokenizeInput.eventHandler = {};
TokenizeInput.eventHandler.keydown = function (event) {
  if (this._readOnly) {
    if (event.key === 'Delete' || event.key === 'Backspace' || event.key === 'Enter' || event.key.length === 1) {
      event.preventDefault();
      return;
    }
  }
  setTimeout(this.updateHighlight.bind(this), 1);

  // console.log(event.key)
};

TokenizeInput.prototype.getSelectPosition = _PreInput["default"].prototype.getSelectPosition;
TokenizeInput.prototype.getPosition = _PreInput["default"].prototype.getPosition;
TokenizeInput.prototype.stringOf = _PreInput["default"].prototype.stringOf;
TokenizeInput.prototype.updateHighlight = function () {
  this.$highlightingElts.forEach(function (elt) {
    elt.removeClass('as-highlight');
  });
  this.$highlightingElts = [];
  var selPos = this.getSelectPosition();
  if (!selPos) return;
  var startElt, endElt, i, elt, token;
  var c, pos;
  if (selPos.start === selPos.end) {
    c = this._value[selPos.start];
    pos = selPos.start;
    if (c !== '(' && c !== ')') {
      c = this._value[selPos.start - 1];
      pos = selPos.start - 1;
    }
    if (c === '(' || c === ')') {
      if (c === '(') {
        for (i = 0; i < this.childNodes.length; ++i) {
          elt = this.childNodes[i];
          token = elt.token;
          if (token.start <= pos && token.end > pos) {
            startElt = elt;
          } else if (startElt && token.content === ')') {
            endElt = elt;
            break;
          }
        }
      } else {
        for (i = this.childNodes.length - 1; i >= 0; --i) {
          elt = this.childNodes[i];
          token = elt.token;
          if (token.start <= pos && token.end > pos) {
            endElt = elt;
          } else if (endElt && token.content === '(') {
            startElt = elt;
            break;
          }
        }
      }
      if (startElt && endElt) {
        startElt.addClass('as-highlight');
        endElt.addClass('as-highlight');
        this.$highlightingElts = [startElt, endElt];
      }
    }
  }
};
TokenizeInput.eventHandler.focus = function () {
  setTimeout(this.updateHighlight.bind(this), 1);
};
TokenizeInput.eventHandler.blur = function () {
  setTimeout(this.updateHighlight.bind(this), 1);
};
TokenizeInput.eventHandler.mousedown = function () {
  setTimeout(this.updateHighlight.bind(this), 1);
};
TokenizeInput.eventHandler.mouseup = function () {
  setTimeout(this.updateHighlight.bind(this), 1);
};
_FCore["default"].install(TokenizeInput);
var _default = TokenizeInput;
exports["default"] = _default;

/***/ }),

/***/ 19356:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.documentOff = documentOff;
exports.documentOn = documentOn;
exports.openFormDialog = openFormDialog;
var _FCore = __webpack_require__(51518);
__webpack_require__(78064);
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @typedef FormDialogField
 * @property {string} name
 * @property {string} displayName
 * @property {function} [verify]
 * @property {function} [getValue]
 *
 *
 * @param {{getFormField:(function(): Array<FormDialogField>)}} adapter
 * @returns {Promise<unknown>}
 */
function openFormDialog(adapter) {
  return new Promise(function (rs, rj) {
    var errorText = (0, _FCore._)({
      tag: 'span',
      style: {
        color: 'red',
        fontSize: '0.8em'
      },
      child: {
        text: ''
      }
    });
    var context = {};
    var formFields = adapter.getFormField(context);
    var verify = function verify(noError) {
      var formOK = formFields.every(function (field) {
        if (!field.verify) return true;
        var ok = field.verify(field.input);
        if (ok || noError) {
          errorText.firstChild.data = "";
        } else {
          errorText.firstChild.data = "Invalid \"" + field.displayName + "\"";
        }
        return ok;
      });
      dialog.$actionBtns[0].disabled = !formOK;
      return formOK;
    };
    context.verify = verify;
    var dialog = (0, _FCore._)({
      tag: _MessageDialog["default"].tag,
      style: {
        fontSize: '14px'
      },
      props: {
        dialogTitle: 'New Package',
        dialogIcon: 'span.mdi.mdi-package-variant-plus',
        dialogActions: [{
          text: 'OK',
          name: 'ok'
        }, {
          text: 'Cancel',
          name: 'cancel'
        }]
      },
      child: {
        "class": 'as-table-grid',
        style: {
          whiteSpace: 'nowrap'
        },
        child: formFields.map(function (field) {
          return {
            "class": 'as-table-grid-row',
            attr: {
              'data-field-name': field.name
            },
            child: [{
              "class": 'as-table-grid-cell',
              style: {
                paddingRight: '10px',
                paddingBottom: '10px',
                verticalAlign: 'middle'
              },
              child: {
                tag: 'label',
                child: {
                  text: field.displayName
                }
              }
            }, {
              "class": ['as-table-grid-cell', 'as-input-ctn'],
              style: {
                paddingBottom: '10px',
                verticalAlign: 'middle'
              },
              child: field.input
            }]
          };
        }).concat([{
          "class": 'as-table-grid-row',
          child: [{
            "class": 'as-table-grid-cell'
          }, {
            "class": 'as-table-grid-cell',
            child: errorText
          }]
        }])
      }
    });
    var getValue = function getValue() {
      return formFields.reduce(function (ac, field) {
        ac[field.name] = field.getValue(field.input);
        return ac;
      }, {});
    };
    var modal = (0, _FCore._)({
      tag: _Modal["default"].tag,
      child: [dialog]
    }).addTo(document.body);
    verify(true);
    setTimeout(function () {
      var input = (0, _FCore.$)('input[type="text"]', dialog) || (0, _FCore.$)('textarea', dialog);
      if (input) input.focus();
    }, 200);
    dialog.on('action', function (event) {
      if (event.action.name === 'ok') {
        if (verify()) {
          rs(getValue());
        }
      } else if (event.action.name === 'cancel') {
        rj();
      }
      modal.remove();
    });
  });
}
var documentListeners = {};
function documentOn(name, listener) {
  if (!documentListeners[name]) documentListeners[name] = [];
  if (documentListeners[name].indexOf(listener) < 0) {
    documentListeners[name].push(listener);
    document.addEventListener(name, listener);
  } else {
    // console.warn('Dup event', name, listener);
  }
}
function documentOff(name, listener) {
  if (!documentListeners[name]) documentListeners[name] = [];
  var idx = documentListeners[name].indexOf(listener);
  if (idx >= 0) {
    documentListeners[name].splice(idx, 1);
    document.removeEventListener(name, listener);
  } else {
    // console.warn('Not found event', name, listener);
  }
}

/***/ }),

/***/ 55813:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.EBuilderInstance = void 0;
exports.makeEComponentClass = makeEComponentClass;
var _EComponent = __webpack_require__(89168);
var _EFragment = _interopRequireDefault(__webpack_require__(56504));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/**
 *
 * @param {object}data
 * @param {EBuilder=} builder
 */
function makeEComponentClass(data, builder) {
  builder = builder || EBuilder.shareInstance;

  /**
   * @extends EFragment
   * @constructor
   */
  function AutoGeneratedComponent() {
    _EFragment["default"].apply(this, arguments);
  }
  (0, _EComponent.inheritEZUIClass)(AutoGeneratedComponent, _EFragment["default"]);
  AutoGeneratedComponent.prototype.tag = data.tag;
  AutoGeneratedComponent.prototype.builder = builder;
  AutoGeneratedComponent.prototype.sourceData = data;
  return AutoGeneratedComponent;
}
function EBuilder() {
  this.ComponentClasses = {};
}

/**
 *
 * @param {function | object}clazz
 */
EBuilder.prototype.install = function (clazz) {
  if (_typeof(clazz) === "object") {
    clazz = this.makeClass(clazz);
  }
  var tag = clazz.prototype.tag;
  this.ComponentClasses[tag] = clazz;
  return this;
};
EBuilder.prototype.makeClass = function (sourceData) {
  return makeEComponentClass(sourceData, this);
};

/**
 *
 * @param sourceData
 * @param {*=} opt
 * @returns {EComponent|*}
 */
EBuilder.prototype.build = function (sourceData, opt) {
  opt = opt || {};
  sourceData = Object.assign({}, sourceData);
  delete sourceData.context;
  var Clazz = this.makeClass(sourceData);
  var component = new Clazz(opt || {});
  if (opt.element) {
    if (opt.element.addChild) opt.element.addChild(component.domElt);else opt.element.appendChild(component.domElt);
  }
  //todo: initValue
  return component;
};

/**
 *
 * @param sourceBlock
 * @returns {EComponent|EBlock}
 */
EBuilder.prototype.inflate = function (sourceBlock) {
  var Clazz = this.ComponentClasses[sourceBlock.tag];
  if (!Clazz) {
    throw new Error("Invalid tag " + sourceBlock.tag);
  }
  var children = sourceBlock.children;
  var attributes = Object.assign({}, sourceBlock);
  delete attributes.tag;
  delete attributes.children;
  Clazz.prototype.sourceAttributes = attributes;
  var component = new Clazz();
  Clazz.prototype.sourceAttributes = null;
  var i, key, child;
  for (key in attributes) {
    component.attributes[key] = attributes[key];
  }
  if (children && children.length > 0) {
    for (i = 0; i < children.length; ++i) {
      child = this.inflate(children[i]);
      component.addChild(child);
    }
  }
  return component;
};

/**
 *
 * @type {EBuilder}
 */
var EBuilderInstance = new EBuilder();
exports.EBuilderInstance = EBuilderInstance;
EBuilder.shareInstance = EBuilderInstance;
_EFragment["default"].prototype.builder = EBuilder.shareInstance;
var _default = EBuilder;
exports["default"] = _default;

/***/ }),

/***/ 13605:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ELabel = _interopRequireDefault(__webpack_require__(41252));
var _ETextInput = _interopRequireDefault(__webpack_require__(87570));
var _EButton = _interopRequireDefault(__webpack_require__(63237));
var _EComboBox = _interopRequireDefault(__webpack_require__(15726));
var _ECheckBox = _interopRequireDefault(__webpack_require__(34261));
__webpack_require__(27134);
var _EBuilder = __webpack_require__(55813);
var _EFunction = _interopRequireDefault(__webpack_require__(85930));
var _EColorInput = _interopRequireDefault(__webpack_require__(93664));
var _ECopyableIconTooltip = _interopRequireDefault(__webpack_require__(50861));
var _EImage = _interopRequireDefault(__webpack_require__(31880));
var _EImageFileInput = _interopRequireDefault(__webpack_require__(64652));
var _ELocationInput = _interopRequireDefault(__webpack_require__(42725));
var _ELocationView = _interopRequireDefault(__webpack_require__(84031));
var _EText = _interopRequireDefault(__webpack_require__(37253));
var _EDateInput = _interopRequireDefault(__webpack_require__(52597));
var _ETextArea = _interopRequireDefault(__webpack_require__(22932));
var _ETreeLeafComboBox = _interopRequireDefault(__webpack_require__(70723));
var _EDateInYearInput = _interopRequireDefault(__webpack_require__(24058));
var _EDateLevelInput = _interopRequireDefault(__webpack_require__(25857));
var _EDateTimeInput = _interopRequireDefault(__webpack_require__(78916));
var _EMultiSelectComboBox = _interopRequireDefault(__webpack_require__(51302));
var _EMultiSelectTreeComboBox = _interopRequireDefault(__webpack_require__(57365));
var _ENumberInput = _interopRequireDefault(__webpack_require__(50737));
var _EDualComboBox = _interopRequireDefault(__webpack_require__(61362));
var _EFileInput = _interopRequireDefault(__webpack_require__(75861));
var _EFileListInput = _interopRequireDefault(__webpack_require__(49079));
var _EMultiSelectTreeLeafComboBox = _interopRequireDefault(__webpack_require__(96270));
var _ETableInput = _interopRequireDefault(__webpack_require__(69080));
var _ECKEditor = _interopRequireDefault(__webpack_require__(98202));
var _ETime24Input = _interopRequireDefault(__webpack_require__(35400));
var _ETimeRange24Input = _interopRequireDefault(__webpack_require__(20287));
var _ETrackBar = _interopRequireDefault(__webpack_require__(22611));
var _ETrackBarInput = _interopRequireDefault(__webpack_require__(10460));
var _ETreeComboBox = _interopRequireDefault(__webpack_require__(68277));
var _ECKTemplateEditor = _interopRequireDefault(__webpack_require__(44422));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var EZUI = {
  Label: _ELabel["default"],
  TextInput: _ETextInput["default"],
  build: _EBuilder.EBuilderInstance.build.bind(_EBuilder.EBuilderInstance),
  install: _EBuilder.EBuilderInstance.install.bind(_EBuilder.EBuilderInstance),
  inflate: _EBuilder.EBuilderInstance.inflate.bind(_EBuilder.EBuilderInstance)
};
var _default = EZUI;
exports["default"] = _default;

/***/ }),

/***/ 19905:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CCBlock = _interopRequireDefault(__webpack_require__(99125));
var _OOP = __webpack_require__(38608);
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _stringGenerate = __webpack_require__(10713);
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _EComponent = _interopRequireDefault(__webpack_require__(89168));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @augments CCBlock
 * @augments Context
 * @constructor
 */
function EBlock() {
  _Context["default"].call(this);
  _CCBlock["default"].call(this);
  this.id = this.id || (0, _stringGenerate.randomIdent)(8);
  this.attributes = Object.assign(new _Attributes["default"](this), this.attributes);
  this.attributes.loadAttributeHandlers(this.attributeHandlers);
}
(0, _OOP.mixClass)(EBlock, _CCBlock["default"], _Context["default"]);
EBlock.prototype.tag = 'Block';

/**
 * check block is in async process
 * @type {null|Promise}
 */
EBlock.prototype.mutex = null;
EBlock.prototype.attributeHandlers = {};
EBlock.prototype.attributes = {};
/**
 *
 * @type {null|object}
 */
EBlock.prototype.sourceAttributes = null;
EBlock.prototype.attributeHandlers.id = {
  set: function set(value) {
    if (typeof value === "number") {
      value = value + '';
    }
    if (typeof value === 'string' && value.length > 0) {
      this.id = value;
    }
  },
  get: function get() {
    return this.id;
  },
  descriptor: {
    type: 'string'
  }
};
Object.defineProperty(EBlock.prototype, 'fragment', {
  get: function get() {
    var current = this;
    while (current.parent) {
      if (current.parent.layout) return current.parent;
      current = current.parent;
    }
    return null;
  }
});
var _default = EBlock;
exports["default"] = _default;

/***/ }),

/***/ 34678:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EBlock = _interopRequireDefault(__webpack_require__(19905));
var _EComponent = __webpack_require__(89168);
var _EBuilder = __webpack_require__(55813);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @constructor
 */
function EComponentGroup() {
  _EBlock["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EComponentGroup, _EBlock["default"]);
EComponentGroup.prototype.tag = 'ComponentGroup';
EComponentGroup.prototype.menuIcon = 'span.mdi.mdi-format-list-group';
EComponentGroup.prototype.attributes.hidden = false;
EComponentGroup.prototype.attributeHandlers.hidden = {
  set: function set(value, ref) {
    if (value === 'true') value = true;
    value = value || false;
    ref.set(value);
    this.notifyHidden();
    return value;
  },
  get: function get(ref) {
    return ref.get() || false;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  }
};
EComponentGroup.prototype.onStart = function () {
  this.notifyHidden();
};
EComponentGroup.prototype.notifyHidden = function () {
  var hidden = this.attributes.hidden;
  var fragment = this.fragment;
  if (!fragment) return;
  var id = this.attributes.id;
  var targetObjects = fragment.graph.group2objects[id];
  if (!targetObjects) return;
  targetObjects.forEach(function (targetObject) {
    var parent = targetObject.parent;
    if (!parent) return;
    if (parent.domElt === targetObject.domElt) return;
    var domElt = targetObject.domElt;
    var parentElt = parent.domElt;
    while (domElt && domElt.parentElement !== parentElt) {
      domElt = domElt.parentElement;
    }
    if (!domElt) return; //maybe error
    if (hidden) {
      domElt.addClass('as-group-hidden');
    } else {
      domElt.removeClass('as-group-hidden');
    }
  });
};
EComponentGroup.prototype.pinHandlers.hidden = {
  receives: function receives(value) {
    this.attributes.hidden = value;
  }
};
EComponentGroup.prototype.pinHandlers.visible = {
  receives: function receives(value) {
    this.attributes.hidden = !value;
  }
};
_EBuilder.EBuilderInstance.install(EComponentGroup);
var _default = EComponentGroup;
exports["default"] = _default;

/***/ }),

/***/ 85930:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = __webpack_require__(89168);
var _EBlock = _interopRequireDefault(__webpack_require__(19905));
var _EBuilder = __webpack_require__(55813);
var _SCScope = _interopRequireDefault(__webpack_require__(55830));
var _SCParser = _interopRequireDefault(__webpack_require__(13682));
var _SCProgramInstance = _interopRequireDefault(__webpack_require__(47790));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends EBlock
 * @constructor
 */
function EFunction() {
  _EBlock["default"].call(this);
  this.pinHandlers = Object.assign({}, EFunction.prototype.pinHandlers);
  this.receivedArgValues = {};
  this.result = null;
}
(0, _EComponent.inheritEZUIClass)(EFunction, _EBlock["default"]);
EFunction.prototype.tag = "Function";
EFunction.prototype.menuIcon = 'span.mdi.mdi-function';
EFunction.prototype.attributes.args = [];
EFunction.prototype.attributes.body = "";
EFunction.prototype.attributes.lang = "js";
EFunction.prototype.buildFunction = function () {
  var self = this;
  this.pinHandlers = this.attributes.args.reduce(function (ac, cr) {
    ac[cr] = {
      receives: function receives(value) {
        if (value && value.then) {
          value.then(function () {
            self.receivedArgValues[cr] = value;
            self.exec();
          });
        } else {
          self.receivedArgValues[cr] = value;
          self.exec();
        }
      }
    };
    return ac;
  }, {});
  Object.assign(this.pinHandlers, EFunction.prototype.pinHandlers);
};
EFunction.prototype.exec = function () {
  var _this = this;
  var sync;
  var i;
  var args = this.attributes.args || [];
  for (i = 0; i < args.length; i++) {
    if (!(args[i] in this.receivedArgValues))
      //not enough params
      return;
  }
  var factor = '';
  var code = this.attributes.body || '';
  var localScope = new _SCScope["default"](this.getContext('variableScope')).makeFlattenedScope();
  for (i = 0; i < args.length; i++) {
    localScope.declareVar(args[i], this.receivedArgValues[args[i]]);
  }
  factor += "/** auto generate params **/";
  factor += Object.keys(localScope.data).map(function (key) {
    return "var ".concat(key, " = localScope.get(\"").concat(key, "\");");
  }).join('\n') + "\n\n";
  factor += "return function ".concat(this.attributes.name || 'noname', "(){\n").concat(code, "\n};");
  var func = new Function('localScope', factor)(localScope);
  var result = func.call(this);
  if (result && result.then) {
    sync = result.then(function (res) {
      _this.result = res;
      _this.pinFire('result');
    });
  } else {
    this.result = result;
    console.log(result);
    this.pinFire('result');
  }
  if (this.mutex && sync) {
    this.mutex = Promise.all([this.mutex, sync]);
  }
};
EFunction.prototype.onStart = function () {
  this.exec();
};
EFunction.prototype.pinHandlers = {};
EFunction.prototype.attributeHandlers.args = {
  set: function set(value, ref) {
    ref.set(value);
    this.buildFunction();
    return value;
  }
};
EFunction.prototype.attributeHandlers.body = {
  // set: function (value) {
  //
  // },
  // get: function (value) {
  //
  // }
};
EFunction.prototype.pinHandlers.exec = {
  receives: function receives() {
    this.exec();
  }
};
EFunction.prototype.pinHandlers.result = {
  get: function get() {
    return this.result;
  }
};
var _default = EFunction;
exports["default"] = _default;
_EBuilder.EBuilderInstance.install(EFunction);

/***/ }),

/***/ 18662:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.AbstractInput = AbstractInput;
exports.AbstractMultiSelectMenu = AbstractMultiSelectMenu;
exports.AbstractSelectMenu = AbstractSelectMenu;
exports.AbstractText = void 0;
exports.AbstractUnion = AbstractUnion;
exports.isUnionValueEqual = void 0;
var _utils = __webpack_require__(84512);
var _EComponent = __webpack_require__(89168);
var _OOP = __webpack_require__(38608);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @augments {EComponent}
 * @constructor
 */
function AbstractInput() {}
AbstractInput.prototype.attributeHandlers = {};
AbstractInput.prototype.pinHandlers = {};
AbstractInput.prototype.attributeHandlers.readOnly = {
  set: function set(value) {
    value = !!value;
    if (value) {
      this.domElt.readOnly = true;
    } else {
      this.domElt.readOnly = this.attributes.outputMode;
    }
  },
  "export": function _export(ref) {
    var value = ref.get();
    return value || undefined;
  },
  descriptor: {
    type: 'bool',
    sign: 'readOnly'
  }
};
AbstractInput.prototype.attributeHandlers.outputMode = {
  set: function set(value) {
    value = !!value;
    if (value) {
      this.domElt.readOnly = true;
      this.domElt.addClass('as-border-none');
    } else {
      this.domElt.readOnly = this.attributes.readOnly;
      this.domElt.removeClass('as-border-none');
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    return value || undefined;
  },
  descriptor: {
    type: 'bool',
    sign: 'outputMode'
  }
};
AbstractInput.prototype.attributeHandlers.disabled = {
  set: function set(value) {
    this.domElt.disabled = !!value;
  },
  get: function get() {
    return this.domElt.disabled;
  },
  "export": function _export() {
    return this.domElt.disabled || undefined;
  },
  descriptor: {
    type: 'bool',
    sign: 'disabled'
  }
};
AbstractInput.prototype.attributeHandlers.onChange = {
  descriptor: {
    type: 'string'
  }
};
AbstractInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.value;
  }
};
AbstractInput.prototype.pinHandlers.readOnly = {
  receives: function receives(value) {
    this.attributes.readOnly = value;
  }
};
AbstractInput.prototype.pinHandlers.disabled = {
  receives: function receives(value) {
    this.attributes.disabled = value;
  }
};
var isUnionValueEqual = function isUnionValueEqual(a, b) {
  if (typeof a === 'boolean' || typeof b === 'boolean') {
    a = a + '';
    b = b + '';
    a = a.toLowerCase();
    b = b.toLowerCase();
  } else {
    a = a + '';
    b = b + '';
  }
  return a === b;
};

/**
 * @augments {EComponent}
 * @constructor
 */
exports.isUnionValueEqual = isUnionValueEqual;
function AbstractUnion() {}
AbstractUnion.prototype.notifyUnion = function () {
  if (this.state === "CREATE") return;
  var fragment = this;
  var id = this.attributes.id;
  var name = this.attributes.name;
  var value = this.attributes.value + '';
  while (fragment.parent) {
    if (fragment.parent.layout) break;
    fragment = fragment.parent;
  }
  var visit = function visit(nd) {
    var unionValues;
    var hidden;
    var wrapper;
    var union = nd.attributes.union;
    if (union === name || union === id) {
      unionValues = nd.attributes.unionValues;
      if (nd.parent && nd.parent.domElt !== nd.domElt.parentElement) {
        wrapper = nd.domElt.parentElement;
      }
      if (unionValues && unionValues.length > 0) {
        hidden = !unionValues.some(function (val) {
          return isUnionValueEqual(val, value);
        });
        if (hidden) {
          nd.domElt.addClass('as-union-hidden');
          if (wrapper) {
            wrapper.addClass('as-union-hidden');
          }
        } else {
          nd.domElt.removeClass('as-union-hidden');
          if (wrapper) {
            wrapper.removeClass('as-union-hidden');
          }
        }
      } else {
        nd.domElt.removeClass('as-union-hidden');
        if (wrapper) {
          wrapper.removeClass('as-union-hidden');
        }
      }
    }
    if (nd.children && nd.children.length > 0) {
      nd.children.forEach(visit);
    }
  };
  visit(fragment);
};

/**
 * @augments {EComponent}
 * @augments {AbstractUnion}
 * @augments {AbstractInput}
 * @constructor
 */
function AbstractSelectMenu() {}
(0, _EComponent.inheritEZUIClass)(AbstractSelectMenu, AbstractInput, AbstractUnion);
AbstractSelectMenu.prototype.attributeHandlers.items = {
  set: function set(value, ref) {
    ref.set(value);
    this.computeItems();
    return value;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  },
  descriptor: {
    type: 'string',
    "long": true,
    sign: 'select_items_func'
  }
};
AbstractSelectMenu.prototype.attributeHandlers.text = {
  get: function get() {
    return this.domElt.text || '';
  }
};
AbstractSelectMenu.prototype.attributeHandlers.value = {
  set: function set(value) {
    this.domElt.value = value;
    //todo: check change and fire pin
    this.notifyUnion();
  },
  get: function get() {
    return this.domElt.value;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  }
};
AbstractSelectMenu.prototype.attributeHandlers.searchable = {
  set: function set(value) {
    this.domElt.enableSearch = value;
  },
  get: function get() {
    return this.domElt.enableSearch;
  },
  "export": function _export() {
    return this.domElt.enableSearch || undefined;
  }
};
AbstractSelectMenu.prototype.attributeHandlers.strictValue = {
  set: function set(value) {
    this.domElt.strictValue = value;
    //todo: value may be changed, text change
  },

  get: function get() {
    return this.domElt.strictValue;
  },
  "export": function _export() {
    if (this.domElt.strictValue) {
      return undefined;
    }
    return this.domElt.strictValue;
  },
  descriptor: {
    type: 'bool'
  }
};
AbstractSelectMenu.prototype.pinHandlers.text = {
  get: function get() {
    var value = this.domElt.value;
    var item = this.domElt.findItemByValue && this.domElt.findItemByValue(value);
    if (item) return item.text;
    return '';
  }
};
AbstractSelectMenu.prototype.computeItems = function () {
  var _this = this;
  if (this.state === "CREATE") return; //not init anything
  var bound0, bound1;
  var items = this.attributes.items;
  if (typeof items === "string") {
    this.evalSCExpression(items, function (result) {
      bound0 = _this.domElt.getBoundingClientRect();
      _this.domElt.items = result;
      bound1 = _this.domElt.getBoundingClientRect();
      if (bound0.width !== bound1.width || bound0.height !== bound1.height) {
        _ResizeSystem["default"].update();
      }
      _this.notifyUnion();
      _this.pinFire('value');
    });
  } else if (Array.isArray(items)) {
    bound0 = this.domElt.getBoundingClientRect();
    this.domElt.items = items;
    bound1 = this.domElt.getBoundingClientRect();
    if (bound0.width !== bound1.width || bound0.height !== bound1.height) {
      _ResizeSystem["default"].update();
    }
    this.notifyUnion();
    this.pinFire('value');
  }
};

/**
 * @extends {AbstractSelectMenu}
 * @constructor
 */
function AbstractMultiSelectMenu() {}
(0, _EComponent.inheritEZUIClass)(AbstractMultiSelectMenu, AbstractSelectMenu);
AbstractMultiSelectMenu.prototype.notifyUnion = function () {//
  // not support
};
AbstractMultiSelectMenu.prototype.attributeHandlers.value = {
  set: function set(value) {
    this.domElt.values = value;
    //todo: check change and fire pin
    this.notifyUnion();
  },
  get: function get() {
    return this.domElt.values;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  }
};
var AbstractText = {
  attributeHandlers: {}
};
exports.AbstractText = AbstractText;
AbstractText.attributeHandlers.fontFamily = {
  set: function set(value) {
    if (typeof value === 'string') {
      if (value === 'default' || value.length === 0) {
        value = null;
      }
    }
    if (value) {
      this.domElt.addStyle('font-family', value);
    } else {
      this.domElt.removeStyle('font-family');
    }
    return value;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  },
  descriptor: {
    type: "font",
    sign: 'TextFont'
  }
};
AbstractText.attributeHandlers.fontSize = {
  set: function set(value) {
    if ((0, _utils.isRealNumber)(value) && value > 0) {
      this.domElt.addStyle('font-size', value + 'px');
    } else {
      this.domElt.removeStyle('font-size', value);
      value = undefined;
    }
    return value;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  },
  descriptor: {
    type: 'FontSize'
  }
};
AbstractText.attributeHandlers.textAlign = {
  set: function set(value) {
    if (['left', 'right', 'center'].indexOf(value) >= 0) {} else value = 'default';
    if (value === 'default') {
      this.domElt.removeStyle('text-align', value);
    } else {
      this.domElt.addStyle('text-align', value);
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'default') value = undefined;
    return value || undefined;
  },
  descriptor: {
    type: 'enum',
    values: ['left', 'center', 'right']
  }
};
AbstractText.attributeHandlers.fontWeight = {
  set: function set(value) {
    if (typeof value === 'string') {
      if (value === 'normal' || value.length === 0) {
        value = null;
      }
    }
    if (value) {
      this.domElt.addStyle('font-weight', value);
    } else {
      this.domElt.removeStyle('font-weight');
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'normal') value = undefined;
    return value || undefined;
  },
  descriptor: {
    type: 'enum',
    values: ['normal', 'bold']
  }
};

/***/ }),

/***/ 63237:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EBuilder = _interopRequireWildcard(__webpack_require__(55813));
var _FCore = __webpack_require__(51518);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function EButton() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EButton, _EComponent["default"]);
EButton.prototype.tag = 'Button';
EButton.prototype.menuIcon = "span.mdi.mdi-alpha-b-box";
EButton.prototype.attributes.height = 30;
EButton.prototype.attributes.width = 100;
EButton.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)({
    tag: 'flexiconbutton',
    "class": 'ez-button',
    on: {
      click: function click() {
        var onClick = _this.attributes.onClick;
        if (typeof onClick === 'string') {
          _this.evalSCExpression(onClick);
        }
        _this.pinFire('signal');
      }
    }
  });
};
EButton.prototype.attributeHandlers.text = {
  set: function set(value) {
    this.domElt.text = value;
  },
  get: function get() {
    return this.domElt.text;
  },
  "export": function _export() {
    return this.domElt.text || undefined;
  },
  descriptor: {
    type: 'string'
  }
};
EButton.prototype.attributeHandlers.icon = {
  set: function set(value) {
    this.domElt.icon = value;
  },
  get: function get() {
    return this.domElt.icon;
  },
  descriptor: {
    type: "icon",
    sign: "SimpleIcon"
  }
};
EButton.prototype.attributeHandlers.onClick = {
  "export": function _export(ref) {
    return ref.get() || undefined;
  },
  descriptor: {
    type: 'string'
  }
};
_EBuilder.EBuilderInstance.install(EButton);
var _default = EButton;
exports["default"] = _default;

/***/ }),

/***/ 98202:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CKPlaceholder = _interopRequireDefault(__webpack_require__(24471));
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _EBuilder = __webpack_require__(55813);
var _FCore = __webpack_require__(51518);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @augments AbstractInput
 * @extends EComponent
 * @constructor
 */
function ECKEditor() {
  _EComponent["default"].call(this);
  this.editior = null;
}
(0, _EComponent.inheritEZUIClass)(ECKEditor, _EComponent["default"], _EAbstractComponent.AbstractInput);
ECKEditor.prototype.menuIcon = 'span.mdi.mdi-file-word-box';
ECKEditor.prototype.tag = 'CKEditor';
ECKEditor.prototype.attributes.width = 600;
ECKEditor.prototype.attributes.height = 'auto';
ECKEditor.prototype.render = function () {
  var _this = this;
  this.placeHolderElt = (0, _FCore._)({
    tag: _CKPlaceholder["default"].tag,
    on: {
      editorcreated: this.onEditorCreated.bind(this),
      editorready: this.onEditorReady.bind(this),
      // editorcreated: this.ev_editorCreated.bind(this),
      change: function change(event) {
        _this.notifyChange(event || {});
      }
    }
  });
  this.domElt = (0, _FCore._)({
    "class": 'ez-ckeditor',
    child: this.placeHolderElt
  });
};
ECKEditor.prototype.onCreated = function () {
  // this.placeHolderElt.requestUpdateSize = this.requestUpdateSize.bind(this);
  // ResizeSystem.add(this.placeHolderElt)
};
ECKEditor.prototype.onEditorCreated = function () {
  this.handleSize(this.attributes.width, this.attributes.height);
  this.placeHolderElt.requestUpdateSize = this.onResize.bind(this);
  _ResizeSystem["default"].add(this.placeHolderElt);
};
ECKEditor.prototype.onEditorReady = function () {
  this.handleSize(this.attributes.width, this.attributes.height);
};
ECKEditor.prototype.onResize = function () {
  this.handleSize(this.attributes.width, this.attributes.height);
};
ECKEditor.prototype.onStart = function () {
  if (this.placeHolderElt.$attachhook && this.placeHolderElt.$attachhook.isDescendantOf(document.body)) {
    this.placeHolderElt.$attachhook.emit('attached');
  }
};
ECKEditor.prototype.handleSize = function (width, height) {
  var bound;
  var widthPX, heightPX;
  if (typeof width === 'number') {
    widthPX = width;
    this.placeHolderElt.addStyle('width', widthPX + 'px');
  }
  if (typeof height === 'number') {
    heightPX = height;
    this.placeHolderElt.addStyle('height', heightPX + 'px');
  }
  var editor = this.editor;
  if (!editor) return;
  if (!widthPX) {
    bound = this.domElt.getBoundingClientRect();
    widthPX = bound.width;
  }
  if (!heightPX) {
    bound = bound || this.domElt.getBoundingClientRect();
    heightPX = bound.height;
  }
  if (widthPX && heightPX && editor.ui && editor.ui.space && editor.ui.space("contents")) {
    //make sure editor can resize
    editor.resize(widthPX, heightPX);
  }
};
ECKEditor.prototype.attributes.toolbar = 'SIMPLE';
ECKEditor.prototype.attributeHandlers.width.set = function () {
  var res = _EComponent["default"].prototype.attributeHandlers.width.set.apply(this, arguments);
  this.handleSize(res, this.attributes.height);
  return res;
};
ECKEditor.prototype.attributeHandlers.height.set = function () {
  var res = _EComponent["default"].prototype.attributeHandlers.height.set.apply(this, arguments);
  this.handleSize(this.attributes.width, res);
  return res;
};
ECKEditor.prototype.pinHandlers.value = {
  get: function get() {
    return this.attributes.value;
  },
  receives: function receives(value) {
    this.attributes.value = value;
  },
  descriptor: {
    type: 'text'
  }
};
ECKEditor.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prevData = this.placeHolderElt.data;
    this.placeHolderElt.data = value;
    if (value !== prevData) {
      this.notifyChange();
    }
  },
  get: function get() {
    return this.placeHolderElt.data;
  },
  descriptor: {
    type: 'text'
  }
};
ECKEditor.prototype.attributeHandlers.toolbar = {
  set: function set(value) {
    this.placeHolderElt.config = this.placeHolderElt.config || {};
    this.placeHolderElt.config.toolbar = value;
  },
  descriptor: {
    type: 'enum',
    values: ['SIMPLE', 'ADVANCE']
  }
};
Object.defineProperty(ECKEditor.prototype, 'editor', {
  enumerable: true,
  get: function get() {
    return this.placeHolderElt && this.placeHolderElt.editor || null;
  }
});
_EBuilder.EBuilderInstance.install(ECKEditor);
var _default = ECKEditor;
exports["default"] = _default;

/***/ }),

/***/ 44422:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CKPlaceholder = _interopRequireDefault(__webpack_require__(24471));
var _ECKEditor = _interopRequireDefault(__webpack_require__(98202));
var _EComponent = __webpack_require__(89168);
var _FCore = __webpack_require__(51518);
var _EBuilder = __webpack_require__(55813);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends CKEditor
 * @constructor
 */
function ECKTemplateEditor() {
  _ECKEditor["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ECKTemplateEditor, _ECKEditor["default"]);
ECKTemplateEditor.prototype.menuIcon = 'span.mdi.mdi-file-word-box-outline';
ECKTemplateEditor.prototype.tag = 'ECKTemplateEditor';
ECKTemplateEditor.prototype.render = function () {
  var _this = this;
  this.placeHolderElt = (0, _FCore._)({
    tag: _CKPlaceholder["default"].tag,
    on: {
      editorcreated: this.onEditorCreated.bind(this),
      editorready: this.onEditorReady.bind(this),
      command: function command(event) {
        if (event.command === 'insert_expression') _this.pinFire('requestExpression');
      },
      change: function change(event) {
        _this.notifyChange(event || {});
      }
    }
  });
  this.domElt = (0, _FCore._)({
    "class": 'ez-ckeditor',
    child: this.placeHolderElt
  });
};
ECKTemplateEditor.prototype.pinHandlers.requestExpression = {
  get: function get() {
    return true;
  },
  descriptor: {
    type: 'boolean'
  }
};
ECKTemplateEditor.prototype.pinHandlers.insertExpression = {
  receives: function receives(value) {
    if (!this.editor) return;
    if (value) this.placeHolderElt.insertExpression(value);
  },
  descriptor: {
    type: '{text:string, value:string}'
  }
};
ECKTemplateEditor.prototype.pinHandlers.previewHTML = {
  get: function get() {
    return this.placeHolderElt.rawData;
  },
  descriptor: {
    type: 'text'
  }
};
_EBuilder.EBuilderInstance.install(ECKTemplateEditor);
var _default = ECKTemplateEditor;
exports["default"] = _default;

/***/ }),

/***/ 34261:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
var _EComboBox = _interopRequireDefault(__webpack_require__(15726));
var _EBuilder = __webpack_require__(55813);
var _FCore = __webpack_require__(51518);
var _EAbstractComponent = __webpack_require__(18662);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @augments {EComponent}
 * @extends {AbstractUnion}
 * @constructor
 */
function ECheckBox() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ECheckBox, _EComponent["default"], _EAbstractComponent.AbstractUnion);
ECheckBox.prototype.tag = 'CheckBox';
ECheckBox.prototype.menuIcon = "span.mdi.mdi-checkbox-outline.mdi-check-box-outline";
ECheckBox.prototype.attributes.height = 'auto';
ECheckBox.prototype.attributes.width = 'auto';
ECheckBox.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)({
    tag: _CheckBoxInput["default"].tag,
    "class": ['ez-check-box'],
    on: {
      change: function change() {
        _this.notifyUnion();
      }
    }
  });
};
ECheckBox.prototype.onStart = function () {
  this.notifyUnion();
};
ECheckBox.prototype.attributeHandlers.value = {
  set: function set(value) {
    if (value === undefined || value === null) {
      value = false;
    } else value = !!value;
    this.domElt.checked = value;
    this.notifyUnion();
  },
  get: function get() {
    return this.domElt.checked;
  },
  "export": function _export() {
    return this.domElt.checked || undefined;
  }
};
_EBuilder.EBuilderInstance.install(ECheckBox);
var _default = ECheckBox;
exports["default"] = _default;

/***/ }),

/***/ 93664:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _ColorPickerButton = _interopRequireDefault(__webpack_require__(34443));
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _FCore = __webpack_require__(51518);
var _EBuilder = __webpack_require__(55813);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends EComponent
 * @constructor
 */
function EColorInput() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EColorInput, _EComponent["default"], _EAbstractComponent.AbstractInput);
EColorInput.prototype.tag = "ColorInput";
EColorInput.prototype.menuIcon = "span.mdi.mdi-palette";
EColorInput.prototype.attributes.width = 80;
EColorInput.prototype.attributes.height = 30;
EColorInput.prototype.attributes.value = null;
EColorInput.prototype.attributes.mode = 'HEX6';
EColorInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    value = value || 'black';
    var same = false;
    try {
      var valueText = (_Color["default"].parse(value + '') || '').toString('rgba');
      var oldText = (_Color["default"].parse(this.domElt.value + '') || '').toString('rgba');
      same = valueText === oldText;
    } catch (err) {}
    if (same) return;
    this.domElt.value = value;
    this.pinFire('value');
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'color',
    nullable: true,
    defaultValue: 'transparent',
    sign: 'ColorValue'
  }
};
EColorInput.prototype.attributeHandlers.mode = {
  set: function set(value) {
    this.domElt.mode = value;
  },
  get: function get() {
    return this.domElt.mode;
  },
  descriptor: {
    type: 'enum',
    values: ['HEX6', 'HEX8', 'RGB', 'RGBA', 'OBJECT']
  }
};
EColorInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.value;
  }
};
EColorInput.prototype.render = function () {
  var _this = this;
  return (0, _FCore._)({
    tag: _ColorPickerButton["default"],
    on: {
      change: function change() {
        _this.pinFire('value');
      }
    }
  });
};
EColorInput.prototype.measureMinSize = function () {
  return {
    width: 75,
    height: 16
  };
};
EColorInput.prototype.createDataBindingDescriptor = function () {
  var thisC = this;
  return {
    configurable: true,
    set: function set(value) {
      thisC.setAttribute('value', value);
    },
    get: function get() {
      return thisC.getAttribute('value');
    }
  };
};
_EBuilder.EBuilderInstance.install(EColorInput);
var _default = EColorInput;
exports["default"] = _default;

/***/ }),

/***/ 15726:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EBuilder = __webpack_require__(55813);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _FCore = __webpack_require__(51518);
var _EAbstractComponent = __webpack_require__(18662);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @augments {AbstractSelectMenu}
 * @extends EComponent
 * @constructor
 */
function EComboBox() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EComboBox, _EComponent["default"], _EAbstractComponent.AbstractSelectMenu);
EComboBox.prototype.tag = 'ComboBox';
EComboBox.prototype.menuIcon = 'span.mdi.mdi-arrow-down-drop-circle-outline';
EComboBox.prototype.attributes.height = 30;
EComboBox.prototype.attributes.width = 'auto';
EComboBox.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)({
    tag: 'selectmenu',
    "class": ['ez-combo-box'],
    on: {
      change: function change(event) {
        _this.notifyUnion();
        _this.notifyChange(event);
      }
    }
  });
};
EComboBox.prototype.onStart = function () {
  this.computeItems();
  this.notifyUnion();
};
var _default = EComboBox;
exports["default"] = _default;
_EBuilder.EBuilderInstance.install(EComboBox);

/***/ }),

/***/ 89168:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.implicitMeasureSizeValue = implicitMeasureSizeValue;
exports.inheritEZUIClass = inheritEZUIClass;
var _OOP = __webpack_require__(38608);
var _stringGenerate = __webpack_require__(10713);
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _CCBlock = _interopRequireDefault(__webpack_require__(99125));
var _FCore = __webpack_require__(51518);
var _utils = __webpack_require__(16907);
var _utils2 = __webpack_require__(84512);
var _SCScope = _interopRequireDefault(__webpack_require__(55830));
var _SCParser = _interopRequireDefault(__webpack_require__(13682));
var _SCProgramInstance = _interopRequireDefault(__webpack_require__(47790));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function inheritEZUIClass(constructor) {
  var createFunction;
  var cClass, proto;
  var descriptors = {};
  var attributeHandlers = undefined;
  var pinHandlers = undefined;
  var attributes = undefined;
  var i, key;
  for (var _len = arguments.length, ParentClasses = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    ParentClasses[_key - 1] = arguments[_key];
  }
  for (i = 0; i < ParentClasses.length; ++i) {
    cClass = ParentClasses[i];
    if (typeof cClass === "function") {
      proto = cClass.prototype;
      createFunction = cClass.create || createFunction;
    } else {
      proto = cClass;
    }
    Object.assign(descriptors, Object.getOwnPropertyDescriptors(proto));
    if (proto.attributeHandlers) {
      attributeHandlers = attributeHandlers || {};
      Object.keys(proto.attributeHandlers || {}).forEach(function (key) {
        attributeHandlers[key] = Object.assign({}, proto.attributeHandlers[key]);
      });
    }
    if (proto.pinHandlers) {
      pinHandlers = pinHandlers || {};
      Object.keys(proto.pinHandlers || {}).forEach(function (key) {
        pinHandlers[key] = Object.assign({}, proto.pinHandlers[key]);
      });
    }
    if (proto.attributes) {
      attributes = attributes || {};
      Object.assign(attributes, proto.attributes);
    }
  }
  delete descriptors.constructor;
  delete descriptors.attributes;
  delete descriptors.attributeHandlers;
  delete descriptors.pinHandlers;
  Object.defineProperties(constructor.prototype, descriptors);
  if (attributeHandlers) constructor.prototype.attributeHandlers = attributeHandlers;
  if (pinHandlers) constructor.prototype.pinHandlers = pinHandlers;
  if (attributes) {
    constructor.prototype.attributes = attributes;
  }
  constructor.create = createFunction;
}

/**
 * form version 2
 * @augments CCBlock
 * @augments Context
 * @constructor
 */
function EComponent() {
  _CCBlock["default"].call(this);
  _Context["default"].call(this);
  this.id = this.id || (0, _stringGenerate.randomIdent)(8);
  this.domElt = this.render() || this.domElt;
  this.domElt.ezComponent = this;
  this.domElt.addClass('ez-component');
  this.attributes = Object.assign(new _Attributes["default"](this), this.attributes);
  this.attributes.loadAttributeHandlers(this.attributeHandlers);
  /**
   * @type {EContainer}
   * @name parent
   * @memberOf EComponent#
   */
  /**
   * @type {AElement}
   * @name domElt
   * @memberOf EComponent#
   */

  /**
   * @type {Attribute}
   * @name attributes
   * @memberOf EComponent#
   */
}

(0, _OOP.mixClass)(EComponent, _CCBlock["default"], _Context["default"]);
EComponent.prototype.menuIcon = 'span.mdi.mdi-cube-outline';
EComponent.prototype.fragment = null; //which fragment this component belongs to
/**
 * check block is in async process
 * @type {null|Promise}
 */
EComponent.prototype.mutex = null;
EComponent.create = function (params) {
  var element = params.element;
  var attributes = Object.assign({}, params);
  delete attributes.element;
  var Class = this;
  var result = new Class();
  for (var key in attributes) {
    result.attributes[key] = attributes[key];
  }
  if (element) {
    element.appendChild(result.domElt);
  }
  return result;
};
EComponent.prototype.exportSourceData = function () {
  var res = {
    tag: this.tag
  };
  Object.assign(res, this.attributes["export"]());
  return res;
};
EComponent.prototype.tag = 'FComponent';
EComponent.prototype.render = function () {
  return (0, _FCore._)('<div></div>>');
};
EComponent.prototype.remove = function () {
  if (this.parent) this.parent.removeChild(this);
};

/**
 *
 * @type {null|object}
 */
EComponent.prototype.sourceAttributes = null; //attributes from builder
EComponent.prototype.attributes = {};
EComponent.prototype.attributes.x = 0;
EComponent.prototype.attributes.y = 0;
EComponent.prototype.attributes.name = '';
EComponent.prototype.attributes.colSpan = 1;
EComponent.prototype.attributes.rowSpan = 1;
EComponent.prototype.attributes.displayName = '';
EComponent.prototype.attributeHandlers = {};
EComponent.prototype.attributeHandlers.tag = {
  set: function set() {},
  get: function get() {
    return this.tag;
  },
  "export": function _export() {
    return undefined;
  },
  descriptor: function descriptor() {
    return {
      type: 'const',
      value: this.tag
    };
  }
};
EComponent.prototype.attributeHandlers.id = {
  set: function set(value) {
    if (typeof value === "number") {
      value = value + '';
    }
    if (typeof value === 'string' && value.length > 0) {
      this.id = value;
    }
  },
  get: function get() {
    return this.id;
  },
  descriptor: {
    type: 'string'
  }
};
EComponent.prototype.attributeHandlers.name = {
  set: function set(value) {
    if (typeof value === "number" || typeof value === 'boolean') {
      value = value + '';
    }
    if (!value) {
      value = '';
    }
    value = value.trim();
    return value;
  },
  get: function get(ref) {
    var value = ref.get();
    if (!value) value = '';
    return value;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  },
  descriptor: {
    type: 'string'
  }
};
EComponent.prototype.attributeHandlers.displayName = {
  descriptor: {
    type: 'string'
  }
};
EComponent.prototype.attributeHandlers.union = {
  set: function set(value) {
    if (value === 'none') value = '';
    if (value === null || value === undefined) value = '';
    value = value + '';
    if (value) {
      this.domElt.attr('data-union', value);
    } else {
      this.domElt.attr('data-union', null);
    }
    return value;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  },
  descriptor: function descriptor() {
    var fragment = this.fragment;
    var layout = fragment.layout;
    var values = [{
      text: 'none',
      value: ''
    }];
    var visit = function visit(block) {
      var name, displayName;
      if (block.tag === 'ComboBox' || block.tag === 'CheckBox') {
        name = block.attributes.name;
        displayName = block.attributes.displayName;
        if (name) {
          values.push({
            text: displayName || name,
            value: name
          });
        }
      }
      if (block.children && block.children.length > 0) {
        block.children.forEach(visit);
      }
    };
    visit(layout);
    return {
      type: 'enum',
      sign: 'union',
      //,
      values: values
    };
  }
};
EComponent.prototype.attributeHandlers.unionValues = {
  set: function set(value) {
    if (typeof value === 'string') value = value.split(/\s*;\s*/).map(function (s) {
      return s.trim();
    });else if (!value || !value.map) value = [];
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (!value || value.length === 0) value = undefined;
    return value;
  },
  descriptor: {
    type: 'string[]',
    sign: 'union_values'
  }
};
EComponent.prototype.attributeHandlers.group = {
  set: function set(value) {
    if (value === undefined || value === null) value = undefined;
    if (typeof value !== "string") value = value + '';
    if (value.length === 0) value = undefined;
    return value;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  },
  descriptor: function descriptor() {
    return {
      type: 'string',
      autoCompleteValues: [],
      //todo: get exist group,
      sign: 'group_name'
    };
  }
};
EComponent.prototype.attributeHandlers.x = {
  set: function set(value) {},
  descriptor: {
    type: 'measureSize'
  }
};
EComponent.prototype.attributeHandlers.y = {
  set: function set(value) {},
  descriptor: {
    type: 'measureSize'
  }
};

// number,px is fixed, % is outer, auto is inner

EComponent.prototype.attributeHandlers.colSpan = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    ref.set(value);
    if (this.parent) {
      this.parent.onChildAttribute(this, 'colSpan', value);
    }
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'number',
      disabled: !this.fragment || !this.parent.attributes || this.parent.attributes.layout !== 'grid',
      hidden: !this.fragment,
      sign: 'col_span'
    };
  }
};
EComponent.prototype.attributeHandlers.rowSpan = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    ref.set(value);
    if (this.parent) {
      this.parent.onChildAttribute(this, 'rowSpan', value);
    }
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'number',
      disabled: !this.fragment || !this.parent.attributes || this.parent.attributes.layout !== 'grid',
      hidden: !this.fragment,
      sign: 'row_span'
    };
  }
};
EComponent.prototype.attributeHandlers.justifySelf = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    ref.set(value);
    if (this.parent) {
      this.parent.onChildAttribute(this, 'justifySelf', value);
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'auto') value = undefined;
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'enum',
      values: ['auto', "start", "end", "center", "stretch"]
    };
  }
};
EComponent.prototype.attributeHandlers.alignSelf = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    ref.set(value);
    if (this.parent) {
      this.parent.onChildAttribute(this, 'alignSelf', value);
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'auto') value = undefined;
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'enum',
      values: ['auto', "start", "end", "center", "stretch"]
    };
  }
};
EComponent.prototype.attributeHandlers.hidden = {
  set: function set(value) {
    if (value) {
      this.domElt.addClass('as-hidden');
    } else {
      this.domElt.removeClass('as-hidden');
    }
  },
  get: function get() {
    return this.domElt.hasClass('as-hidden');
  },
  "export": function _export() {
    return this.domElt.hasClass('as-hidden') ? true : undefined;
  }
};
EComponent.prototype.attributeHandlers.isExtraField = {
  set: function set(value) {
    if (value) {
      this.domElt.addClass('as-extra-field');
    } else {
      this.domElt.removeClass('as-extra-field');
    }
  },
  get: function get() {
    return this.domElt.hasClass('as-extra-field');
  },
  "export": function _export() {
    return this.domElt.hasClass('as-extra-field') ? true : undefined;
  },
  descriptor: {
    type: 'boolean'
  }
};
EComponent.prototype.pinHandlers = {};
EComponent.prototype.pinHandlers.attributes = {
  receives: function receives(obj) {
    for (var key in obj) {
      this.attributes[key] = obj[key];
    }
  }
};
EComponent.prototype.pinHandlers.hidden = {
  receives: function receives(value) {
    this.attributes.hidden = value;
  }
};
EComponent.prototype.pinHandlers.visible = {
  receives: function receives(value) {
    this.attributes.hidden = !value;
  }
};

/**
 * it can run in sync or async mode
 * @param {string} code
 * @param {function=} callback
 * @param {object=} env
 */
EComponent.prototype.evalSCExpression = function (code, callback, env) {
  code = code.trim();
  var sync, key;
  var localScope = new _SCScope["default"](this.getContext('variableScope'));
  localScope.declareVar('__result__');
  localScope.declareVar('this', this);
  if (env) {
    for (key in env) {
      localScope.declareVar(key, env[key]);
    }
  }
  if (code.startsWith('=')) {
    code = '__result__  ' + code + ';';
  } else {
    code = "function noname_function(){".concat(code, "}\n __result__ = noname_function();");
  }
  try {
    var resolve = function resolve() {
      if (callback) {
        callback(localScope.get('__result__'));
      }
    };
    var parsed = _SCParser["default"].parse(code, 'program');
    var caller;
    if (parsed.ast) {
      caller = new _SCProgramInstance["default"](parsed.ast, localScope);
      sync = caller.exec();
      if (sync && sync.then) {
        sync = sync.then(resolve);
        this.mutex = Promise.all([sync, this.mutex]);
      } else {
        resolve();
      }
    } else {
      console.error(this, code, parsed.error);
    }
  } catch (e) {
    console.error(this, code, e);
  }
};
EComponent.prototype.notifyChange = function (event) {
  if (this.state === "CREATE" || this.state === "STANDBY" || this.state === "STOP" || this.state === "DIE") return;
  if (this.pinHandlers && this.pinHandlers.value && this.pinHandlers.value.get) {
    this.pinFire('value');
  }
  if (this.pinHandlers && this.pinHandlers.text && this.pinHandlers.text.get) {
    this.pinFire('text');
  }
  var onChange = this.attributes.onChange;
  if (typeof onChange === 'string') {
    this.evalSCExpression(onChange, null, {
      event: event,
      sender: this
    });
  }
  var fragment = this.fragment;
  if (!fragment) return;
  fragment.notifyChange();
};
EComponent.prototype.getPinConnectionCount = function (pinName) {
  if (!this.__cc_listener__[pinName]) return 0;
  return this.__cc_listener__[pinName].length;
};
Object.defineProperty(EComponent.prototype, 'fragment', {
  get: function get() {
    var current = this;
    while (current.parent) {
      if (current.parent.layout === current) return current.parent;
      current = current.parent;
    }
    return null;
  }
});

/***  POSITION ***/

/****
 * @param {EComponent} comp
 * @param {number|"match_parent"|"auto"|string} value
 * @param {"%"|"px"|null} unit -input unit
 * @param {"width"|"height"} by
 * @param {string=} targetUnit
 * @returns {string|number} - return number if unit is px, return string in otherwise
 */
function implicitMeasureSizeValue(comp, value, unit, by, targetUnit) {
  var parentElement = comp.parent ? comp.parent.domElt : comp.domElt.parentElement;
  var byMS = (0, _utils.parseMeasureValue)(comp.attributes[by]) || {
    value: 'auto',
    unit: null
  };
  if (targetUnit === undefined) targetUnit = byMS.unit;
  var newValue;
  var parsedNew;
  if (value === 'match_parent') {
    newValue = 'match_parent';
  } else if (value === 'auto') {
    newValue = 'auto';
  } else if (unit) {
    //need convert
    value = parseFloat(value) || 0;
    if (targetUnit === '%') {
      if (unit === 'px') {
        newValue = value * 100 / parentElement.getBoundingClientRect()[by] + '%';
      } else if (unit === '%') {
        newValue = value + '%';
      }
    } else if (targetUnit === 'px' || !targetUnit) {
      if (unit === '%') {
        newValue = value / 100 * parentElement.getBoundingClientRect()[by];
      } else if (unit === 'px') {
        newValue = value;
      }
    } else {
      newValue = 'auto';
    }
  } else {
    parsedNew = (0, _utils.parseMeasureValue)(value) || {
      value: "auto",
      unit: null
    };
    newValue = parsedNew.unit === 'px' ? parsedNew.value || 0 : parsedNew.value + (parsedNew.unit || '');
  }
  return newValue;
}

/****
 * @param {EComponent} comp
 * @param {string|number} value - original value
 * @param {"%"|"px"|null} unit - output unit
 * @param {"width"|"height"} by
 * @returns {string|number} - return number if unit is px, return string in otherwise
 */
function explicitMeasureSizeValue(comp, value, unit, by) {
  var parentElement = comp.parent ? comp.parent.domElt : comp.domElt.parentElement;
  var current = (0, _utils.parseMeasureValue)(value) || {
    value: 'auto',
    unit: null
  };
  if (unit) {
    if (unit === 'px') {
      if (current.unit === 'px') {
        return current.value || 0;
      } else if (current.unit === '%') {
        return parentElement.getBoundingClientRect()[by] * (current.value || 0) / 100;
      } else {
        return parentElement.getBoundingClientRect()[by];
      }
    } else if (unit === '%') {
      if (current.unit === '%') {
        return current.value || 0;
      } else {
        return comp.domElt.getBoundingClientRect()[by] * 100 / parentElement.getBoundingClientRect()[by];
      }
    }
  }
  return value;
}
['width', 'height'].forEach(function (key) {
  var by = key === 'height' ? 'height' : 'width';
  EComponent.prototype.attributeHandlers[key] = {};
  EComponent.prototype.attributeHandlers[key].set = function (value) {
    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
      args[_key2 - 1] = arguments[_key2];
    }
    //todo: check unit value in px
    var ref = args.pop();
    var unit = args.shift();
    var newValue = implicitMeasureSizeValue(this, value, unit, by);
    var styleValue = newValue;
    if (newValue === 'match_parent') styleValue = '100%';
    if (newValue === 'auto') {
      this.domElt.removeStyle('--as-' + key);
      this.domElt.addClass('as-' + key + '-auto');
    } else if ((0, _utils2.isRealNumber)(value)) {
      this.domElt.addStyle('--as-' + key, styleValue + 'px');
      this.domElt.removeClass('as-' + key + '-auto');
    } else {
      this.domElt.addStyle('--as-' + key, styleValue);
      this.domElt.removeClass('as-' + key + '-auto');
    }
    ref.set(newValue);
    if (this.parent) {
      this.parent.onChildAttribute(this, key, value);
    }
    return newValue;
  };
  EComponent.prototype.attributeHandlers[key].get = function () {
    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
      args[_key3] = arguments[_key3];
    }
    var ref = args.pop();
    var unit = args.shift();
    return explicitMeasureSizeValue(this, ref.get(), unit, by);
  };
  EComponent.prototype.attributeHandlers[key].descriptor = {
    type: 'measureSize'
  };
  EComponent.prototype.attributeHandlers[key]["export"] = function (ref) {
    var value = ref.get();
    if (value === this.constructor.prototype.attributes[key]) value = undefined;
    return value;
  };
});
['x', 'y'].forEach(function (key) {
  var by = key === 'y' ? 'height' : 'width';
  EComponent.prototype.attributeHandlers[key] = {};
  EComponent.prototype.attributeHandlers[key].set = function (value) {
    for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
      args[_key4 - 1] = arguments[_key4];
    }
    var ref = args.pop();
    var unit = args.shift();
    var newValue = implicitMeasureSizeValue(this, value, unit, by);
    var styleValue = newValue;
    if ((0, _utils2.isRealNumber)(value)) {
      this.domElt.addStyle('--as-' + key, styleValue + 'px');
    } else {
      this.domElt.addStyle('--as-' + key, styleValue);
    }
    ref.set(newValue);
    if (this.parent) {
      this.parent.onChildAttribute(this, key, value);
    }
    return newValue;
  };
  EComponent.prototype.attributeHandlers[key].get = function () {
    for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
      args[_key5] = arguments[_key5];
    }
    var ref = args.pop();
    var unit = args.shift();
    return explicitMeasureSizeValue(this, ref.get(), unit, by);
  };
  EComponent.prototype.attributeHandlers[key].descriptor = {
    type: 'measureSize'
  };
  EComponent.prototype.attributeHandlers[key]["export"] = function (ref) {
    var value = ref.get();
    if (value === this.constructor.prototype.attributes[key]) value = undefined;
    return value;
  };
});
var _default = EComponent;
exports["default"] = _default;

/***/ }),

/***/ 9655:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _utils = __webpack_require__(84512);
var _EBuilder = _interopRequireDefault(__webpack_require__(55813));
var _utils2 = __webpack_require__(16907);
var _int = __webpack_require__(65909);
var _EAbstractComponent = __webpack_require__(18662);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @extends EComponent
 * @constructor
 */
function EContainer() {
  _EComponent["default"].call(this);
  /**
   *
   * @type {Array<EComponent|EContainer>}
   */
  this.children = [];
}
(0, _EComponent.inheritEZUIClass)(EContainer, _EComponent["default"]);
EContainer.prototype.tag = 'Container';
EContainer.prototype.menuIcon = 'span.mdi.mdi-tangram';
EContainer.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": 'ez-container'
  });
  this.layoutCtrl = new FCLayoutController(this);
};
EContainer.prototype.attributes.width = 'auto';
EContainer.prototype.attributes.height = 'auto';
EContainer.prototype.attributes.fontSize = 'default';
EContainer.prototype.attributes.border = '';
EContainer.prototype.attributeHandlers.layout = {
  set: function set(value) {
    this.layoutCtrl.layout = value;
  },
  get: function get() {
    return this.layoutCtrl.layout;
  },
  descriptor: {
    type: 'enum',
    values: ['row', 'column', 'grid', 'absolute']
  }
};
EContainer.prototype.attributeHandlers.indent = {
  set: function set(value) {
    this.domElt.addStyle('--ez-indent', value);
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    return value || undefined;
  },
  descriptor: function descriptor() {
    return {
      type: 'string',
      disabled: this.attributes.layout !== 'row'
    };
  }
};
EContainer.prototype.attributeHandlers.columns = {
  set: function set(value, ref) {
    if (typeof value === 'string' && value.trim().match(/^[0-9]+$/)) {
      value = parseInt(value, 10);
    }
    ref.set(value);
    this.layoutCtrl.updateLayoutStyle();
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (this.attributes.layout !== 'grid') value = undefined;
    return value || undefined;
  },
  descriptor: function descriptor() {
    return {
      type: 'string',
      disabled: this.attributes.layout !== 'grid',
      dependency: ['layout']
    };
  }
};
EContainer.prototype.attributeHandlers.fontSize = _EAbstractComponent.AbstractText.attributeHandlers.fontSize;
EContainer.prototype.attributeHandlers.columnGap = {
  set: function set(value, ref) {
    ref.set(value);
    this.layoutCtrl.updateLayoutStyle();
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'number',
      disabled: this.attributes.layout !== 'grid',
      dependency: ['layout']
    };
  }
};
EContainer.prototype.attributeHandlers.rowGap = {
  set: function set(value, ref) {
    ref.set(value);
    this.layoutCtrl.updateLayoutStyle();
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'number',
      disabled: this.attributes.layout !== 'grid',
      dependency: ['layout']
    };
  }
};
EContainer.prototype.attributeHandlers.alignItems = {
  set: function set(value, ref) {
    ref.set(value);
    this.layoutCtrl.updateLayoutStyle();
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'enum',
      values: ['start', 'end', 'center', 'stretch'],
      desc: "Canh các phần tử con theo chiều dọc",
      disabled: this.attributes.layout !== 'grid',
      dependency: ['layout']
    };
  }
};
EContainer.prototype.attributeHandlers.justifyItems = {
  set: function set(value, ref) {
    ref.set(value);
    this.layoutCtrl.updateLayoutStyle();
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'enum',
      values: ['start', 'end', 'center', 'stretch'],
      disabled: this.attributes.layout !== 'grid',
      desc: "Canh các phần tử con theo chiều ngang",
      dependency: ['layout']
    };
  }
};
EContainer.prototype.attributeHandlers.border = {
  set: function set(value) {},
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'none') return undefined;
    return value || undefined;
  },
  descriptor: {
    type: 'string',
    sign: 'ct_border'
  }
};

//align-content: not needed

EContainer.prototype.exportSourceData = function () {
  var res = _EComponent["default"].prototype.exportSourceData.call(this);
  if (this.children && this.children.length > 0) {
    res.children = this.children.map(function (c) {
      return c.exportSourceData();
    });
  }
  return res;
};
EContainer.prototype.onChildAttribute = function (child, name, value) {
  var handler = this.layoutCtrl.childStyleHandlers[name];
  if (typeof handler === 'function') {
    handler.call(this.layoutCtrl, child, value);
  }
};
EContainer.prototype.addChild = function () {
  var i;
  if (arguments.length > 1) {
    for (i = 0; i < arguments.length; i++) {
      this.addChild(arguments[i]);
    }
  } else if (arguments.length === 1) {
    if (Array.isArray(arguments[0])) {
      this.addChildAt(arguments[0], this.children.length);
    } else {
      this.addChildAt(arguments[0], this.children.length);
    }
  }
};
EContainer.prototype.addChildBefore = function (child, bf) {
  if (child.parent) child.remove();
  var index;
  if (!bf) index = this.children.length;else index = this.children.indexOf(bf);
  if (index < 0) index = this.children.length;
  this.addChildAt(child, index);
};
EContainer.prototype.addChildAfter = function (child, at) {
  if (child.parent) child.remove();
  var index;
  if (!at) index = 0;else index = this.children.indexOf(at);
  if (index < 0) index = 0;
  index++;
  this.addChildAt(child, index);
};

/**
 *
 * @param {EComponent} child
 * @param {number} index
 */
EContainer.prototype.addChildAt = function (child, index) {
  if (child.parent) child.remove();
  if (!(0, _utils.isRealNumber)(index)) index = 0;
  index = Math.round(index);
  if (index < 0) index = 0;
  if (index > this.children.length) index = this.children.length;
  this.children.splice(index, 0, child);
  child.attach(this);
  this.layoutCtrl.addChildAt(index);
  switch (this.state) {
    case 'STANDBY':
    case 'PAUSE':
      child.start(true);
      break;
    case 'RUNNING':
      child.start();
      break;
    default:
      //todo: handle
      break;
  }
};
EContainer.prototype.removeChild = function (child) {
  var index = this.children.indexOf(child);
  if (index < 0) return;
  child.pause();
  this.layoutCtrl.removeChildAt(index);
  this.children.splice(index, 1);
  child.stop();
  child.detach();
  child.parent = null;
};
EContainer.prototype.start = function (standBy) {
  _EComponent["default"].prototype.start.call(this, standBy);
  var i;
  for (i = 0; i < this.children.length; i++) {
    this.children[i].start(standBy);
  }
};
EContainer.prototype.resume = function () {
  _EComponent["default"].prototype.resume.call(this);
  var i;
  for (i = 0; i < this.children.length; i++) {
    this.children[i].resume();
  }
};
EContainer.prototype.pause = function () {
  var i;
  for (i = 0; i < this.children.length; i++) {
    this.children[i].pause();
  }
  _EComponent["default"].prototype.pause.call(this);
};
EContainer.prototype.stop = function () {
  var i;
  for (i = 0; i < this.children.length; i++) {
    this.children[i].stop();
  }
  _EComponent["default"].prototype.stop.call(this);
};
EContainer.prototype.destroy = function () {
  var i;
  for (i = 0; i < this.children.length; i++) {
    this.children[i].destroy();
  }
  _EComponent["default"].prototype.destroy.call(this);
};
Object.defineProperty(EContainer.prototype, 'firstChild', {
  get: function get() {
    return this.children[0] || null;
  }
});
Object.defineProperty(EContainer.prototype, 'lastChild', {
  get: function get() {
    return this.children[this.children.length - 1] || null;
  }
});
['left', 'right', 'top', 'bottom'].forEach(function (pos) {
  EContainer.prototype.attributeHandlers['padding' + pos[0].toUpperCase() + pos.substring(1)] = {
    /***
     * @this EContainer
     * @param value
     * @returns {*}
     */
    set: function set(value) {
      var ref = arguments[arguments.length - 1];
      var unit = arguments.length > 2 ? arguments[1] : undefined;
      var currentValue = ref.get();
      var current = (0, _utils2.parseMeasureValue)(currentValue) || {
        value: 'auto',
        unit: null
      };
      value = (0, _EComponent.implicitMeasureSizeValue)(this, value, unit, 'width', current.unit);
      if (value === 'auto') {
        this.domElt.removeStyle('padding-' + pos);
      } else if (value === 'match_parent') {
        this.domElt.addStyle('padding-' + pos, '100%');
      } else if ((0, _utils.isRealNumber)(value)) {
        this.domElt.addStyle('padding-' + pos, value + 'px');
      } else this.domElt.addStyle('padding-' + pos, value);
      return value;
    },
    get: function get() {
      var unit = arguments.length > 1 ? arguments[0] : undefined;
      var ref = arguments[arguments.length - 1];
      var value = ref.get();
      var parentBound;
      if (unit === 'px') {
        if (value !== 'number') {
          return parseFloat(this.domElt.getComputedStyleValue('padding-' + pos).replace('px', ''));
        } else {
          return value;
        }
      } else if (unit === '%') {
        if (typeof value === 'string' && value.match(/%$/)) return parseFloat(value.replace('%', ''));else {
          parentBound = this.parent.domElt.getBoundingClientRect();
          return parseFloat(this.domElt.getComputedStyleValue('padding-' + pos).replace('px', '')) * 100 / parentBound.width;
        }
      } else return value;
    },
    descriptor: {
      type: 'measurePosition',
      sign: 'padding_' + pos
    }
  };
});
var _default = EContainer;
exports["default"] = _default;
_EBuilder["default"].shareInstance.install(EContainer);

/**
 *
 * @param {EContainer} ctn
 * @constructor
 */
function FCLayoutController(ctn) {
  this.ctn = ctn;
  this.domElt = ctn.domElt;
  this._layout = 'column';
  this.domElt.addClass('ez-column');
}
FCLayoutController.prototype.addChildAt = function (index) {
  var bf = this.domElt.childNodes[index];
  var child = this.ctn.children[index];
  var childElt = child.domElt;
  if (this._layout === 'grid') {
    childElt = (0, _FCore._)({
      "class": 'ez-grid-item',
      child: childElt
    });
  }
  if (bf) {
    this.domElt.addChildBefore(childElt, bf);
  } else {
    this.domElt.addChild(childElt);
  }
  for (var key in this.childStyleHandlers) {
    this.childStyleHandlers[key].call(this, child, child.attributes[key]);
  }
};
FCLayoutController.prototype.removeChildAt = function (index) {
  var childElt = this.ctn.children[index].domElt;
  if (this._layout === 'grid') {
    childElt = childElt.parentElement;
  }
  this.domElt.removeChild(childElt);
};
FCLayoutController.prototype.updateLayoutStyle = function () {
  var columns = this.ctn.attributes.columns;
  var columnGap = this.ctn.attributes.columnGap;
  var rowGap = this.ctn.attributes.rowGap;
  var alignItems = this.ctn.attributes.alignItems;
  var justifyItems = this.ctn.attributes.justifyItems;
  if (this._layout === 'grid') {
    this.domElt.addStyle('align-items', alignItems);
    this.domElt.addStyle('justify-items', justifyItems);
    if ((0, _utils.isNaturalNumber)(columns)) {
      this.domElt.addStyle('grid-template-columns', Array(columns).fill('auto').join(' '));
    } else if (Array.isArray(columns)) {
      columns = columns.map(function (it) {
        if ((0, _utils.isNaturalNumber)(it)) it = it + 'px';
        return it;
      });
      this.domElt.addStyle('grid-template-columns', columns.join(' '));
    } else if (typeof columns === 'string') {
      this.domElt.addStyle('grid-template-columns', columns);
    } else {
      this.domElt.removeStyle('grid-template-columns');
    }
    if ((0, _utils.isRealNumber)(columnGap)) {
      this.domElt.addStyle('column-gap', columnGap + 'px');
    } else {
      this.domElt.removeStyle('column-gap');
    }
    if ((0, _utils.isRealNumber)(rowGap)) {
      this.domElt.addStyle('row-gap', rowGap + 'px');
    } else {
      this.domElt.removeStyle('row-gap');
    }
  } else {
    this.domElt.removeStyle('grid-template-columns');
    this.domElt.removeStyle('align-items');
    this.domElt.removeStyle('justify-items');
    this.domElt.removeStyle('column-gap');
    this.domElt.removeStyle('row-gap');
  }
};
FCLayoutController.prototype.transform2Grid = function () {
  var i, key;
  var child, childElt, wrapperElt;
  var children = this.ctn.children;
  var domElt = this.ctn.domElt;
  for (i = 0; i < children.length; i++) {
    child = children[i];
    childElt = child.domElt;
    if (child.tag !== 'Container') {
      if (childElt.parentItemElt === domElt) {
        // not wrapped
        wrapperElt = (0, _FCore._)({
          "class": 'ez-grid-item'
        });
        domElt.replaceChild(wrapperElt, childElt);
        wrapperElt.addChild(childElt);
      }
    }
  }
  for (i = 0; i < children.length; i++) {
    child = children[i];
    for (key in this.childStyleHandlers) {
      this.childStyleHandlers[key].call(this, child, child.attributes[key]);
    }
  }
};
FCLayoutController.prototype.transform2Normal = function () {};
FCLayoutController.prototype.childStyleHandlers = {};
FCLayoutController.prototype.childStyleHandlers.width = function (child, value) {};
FCLayoutController.prototype.childStyleHandlers.colSpan = function (child, value) {
  if (this._layout !== 'grid') return;
  var elt = child.domElt;
  if (elt.parentElement !== this.domElt) elt = elt.parentElement; //is wrapped
  if (value) {
    elt.addStyle('grid-column', 'span ' + value);
  } else {
    elt.removeStyle('grid-column');
  }
};
FCLayoutController.prototype.childStyleHandlers.rowSpan = function (child, value) {
  if (this._layout !== 'grid') return;
  var elt = child.domElt;
  if (elt.parentElement !== this.domElt) elt = elt.parentElement; //is wrapped
  if (value) {
    elt.addStyle('grid-row', 'span ' + value);
  } else {
    elt.removeStyle('grid-row');
  }
};
FCLayoutController.prototype.childStyleHandlers.justifySelf = function (child, value) {
  if (this._layout !== 'grid') return;
  var elt = child.domElt;
  if (elt.parentElement !== this.domElt) elt = elt.parentElement; //is wrapped
  if (value) {
    elt.addStyle('justify-self', value);
  } else {
    elt.removeStyle('justify-self');
  }
};
FCLayoutController.prototype.childStyleHandlers.alignSelf = function (child, value) {
  if (this._layout !== 'grid') return;
  var elt = child.domElt;
  if (elt.parentElement !== this.domElt) elt = elt.parentElement; //is wrapped
  if (value) {
    elt.addStyle('align-self', value);
  } else {
    elt.removeStyle('align-self');
  }
};
Object.defineProperty(FCLayoutController.prototype, 'layout', {
  set: function set(value) {
    if (['row', 'column', 'grid'].indexOf(value) === -1) {
      value = 'row';
    }
    if (this._layout === value) return;
    this.domElt.removeClass('ez-' + this._layout);
    this.domElt.addClass('ez-' + value);
    this._layout = value;
    if (value === 'grid') {
      this.transform2Grid();
      this.updateLayoutStyle();
    } else {
      this.transform2Normal();
    }
  },
  get: function get() {
    return this._layout;
  }
});

/***/ }),

/***/ 50861:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EBuilder = __webpack_require__(55813);
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends EComponent
 * @constructor
 */
function ECopyableIconTooltip() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ECopyableIconTooltip, _EComponent["default"]);
ECopyableIconTooltip.prototype.tag = "CopyableIconTooltip";
ECopyableIconTooltip.prototype.menuIcon = "span.mdi.mdi-information-outline";
ECopyableIconTooltip.prototype.attributes.width = 30;
ECopyableIconTooltip.prototype.attributes.height = 30;
ECopyableIconTooltip.prototype.render = function () {
  this.domElt = (0, _FCore._)('CopyableIconTooltip'.toLowerCase());
};
ECopyableIconTooltip.prototype.attributeHandlers.value = {
  set: function set(value) {
    this.domElt.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    independence: true,
    type: "text",
    sign: "text"
  },
  "export": function _export() {
    return this.domElt.value || undefined;
  }
};
ECopyableIconTooltip.prototype.attributeHandlers.tooltip = {
  set: function set(value) {
    this.domElt.content = value;
  },
  get: function get() {
    return this.domElt.content;
  },
  descriptor: {
    independence: true,
    type: "text",
    "long": true,
    sign: "text"
  },
  "export": function _export() {
    return this.domElt.content || undefined;
  }
};
ECopyableIconTooltip.prototype.attributeHandlers.icon = {
  set: function set(value) {
    this.domElt.icon = value;
  },
  get: function get() {
    return this.domElt.icon;
  },
  descriptor: {
    independence: true,
    type: "icon",
    sign: "icon"
  },
  "export": function _export() {
    return this.domElt.icon || undefined;
  }
};
_EBuilder.EBuilderInstance.install(ECopyableIconTooltip);
var _default = ECopyableIconTooltip;
exports["default"] = _default;

/***/ }),

/***/ 24058:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _datetime = __webpack_require__(58286);
var _FCore = __webpack_require__(51518);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _EBuilder = _interopRequireWildcard(__webpack_require__(55813));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends ScalableComponent
 * @constructor
 */
function EDateInYearInput() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EDateInYearInput, _EComponent["default"], _EAbstractComponent.AbstractInput);
EDateInYearInput.prototype.tag = "DateInYearInput";
EDateInYearInput.prototype.menuIcon = "span.mdi.mdi-calendar-today";
EDateInYearInput.prototype.attributeHandlers.notNull = {
  set: function set(value) {
    this.domElt.notNull = !!value;
  },
  get: function get() {
    return this.domElt.notNull;
  },
  "export": function _export() {
    return this.domElt.notNull || undefined;
  },
  descriptor: {
    type: 'bool',
    sign: 'value_not_null'
  }
};
EDateInYearInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    if (value instanceof Date) this.domElt.value = {
      month: value.getMonth(),
      date: value.getDate()
    };else if (typeof value == 'string' || typeof value == "number") {
      value = new Date(value);
      this.domElt.value = {
        month: value.getMonth(),
        date: value.getDate()
      };
    }
    if (_typeof(value) === 'object') {
      this.domElt.value = value;
    } else {
      value = null;
      this.domElt.value = null;
    }
    var cur = this.domElt.value;
    if (!prev !== !cur || prev && cur && (prev.month !== cur.month || prev.date !== cur.date)) {
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'DateMonth',
    nullable: true,
    defaultValue: (0, _datetime.beginOfDay)(new Date()),
    sign: 'DateMonth_value'
  }
};
EDateInYearInput.prototype.attributeHandlers.format = {
  set: function set(value) {
    this.domElt.format = value || 'dd/MM';
  },
  get: function get() {
    return this.domElt.format;
  },
  descriptor: {
    type: 'enum',
    values: ['dd/MM', 'MM/dd', 'MMM-dd', 'dd tháng MM']
  }
};
EDateInYearInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: "DateMonth"
  }
};
EDateInYearInput.prototype.render = function () {
  var _this = this;
  return (0, _FCore._)({
    tag: 'dateinyearinput',
    "class": 'ez-date-in-year-input',
    on: {
      change: function change() {
        _this.pinFire('value');
      }
    }
  });
};
EDateInYearInput.prototype.attributes.width = 100;
EDateInYearInput.prototype.attributes.height = 30;
EDateInYearInput.prototype.attributes.value = null;
_EBuilder.EBuilderInstance.install(EDateInYearInput);
EDateInYearInput.prototype.tag = 'DateInYearInput';
var _default = EDateInYearInput;
exports["default"] = _default;

/***/ }),

/***/ 52597:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _datetime = __webpack_require__(58286);
var _DateInput = _interopRequireDefault(__webpack_require__(47156));
var _FCore = __webpack_require__(51518);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _EBuilder = __webpack_require__(55813);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var dateKeyOf = function dateKeyOf(date) {
  if (!date) return 'NULL';
  if (date.getTime) return (0, _datetime.beginOfDay)(date).toString();
  return date + '';
};

/***
 * @extends EComponent
 * @constructor
 */
function EDateInput() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EDateInput, _EComponent["default"], _EAbstractComponent.AbstractInput);
EDateInput.prototype.tag = "DateInput";
EDateInput.prototype.menuIcon = "span.mdi.mdi-calendar-edit";
EDateInput.prototype.attributes.width = 150;
EDateInput.prototype.attributes.height = 30;
EDateInput.prototype.attributes.value = null;
EDateInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prevKey = dateKeyOf(this.domElt.value);
    value = (0, _datetime.implicitDate)(value);
    if (value) value = (0, _datetime.beginOfDay)(value);
    this.domElt.value = value;
    var cur = dateKeyOf(this.domElt.value);
    if (prevKey !== cur) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    // defaultValue: beginOfDay(new Date()),//??
    sign: 'SimpleDate'
  },
  "export": function _export() {
    if (this.domElt.notNull && !this.domElt._value) return undefined; //this is auto, not assign
    var value = this.domElt.value;
    if (!value) return undefined;
    return value;
  }
};
EDateInput.prototype.attributeHandlers.min = {
  set: function set(value) {
    value = (0, _datetime.implicitDate)(value);
    this.domElt.min = value;
  },
  get: function get() {
    return this.domElt.min;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    sign: 'date_min'
  },
  "export": function _export() {
    var value = this.domElt.min;
    if (!value) return undefined;
    if ((0, _datetime.compareDate)(value, new Date(1890, 0, 1, 0, 0, 0, 0)) === 0) return undefined;
    return value;
  }
};
EDateInput.prototype.attributeHandlers.max = {
  set: function set(value) {
    value = (0, _datetime.implicitDate)(value);
    this.domElt.max = value;
  },
  get: function get() {
    return this.domElt.max;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    sign: 'date_min'
  },
  "export": function _export() {
    var value = this.domElt.max;
    if (!value) return undefined;
    if ((0, _datetime.compareDate)(value, new Date(2090, 0, 1, 0, 0, 0, 0)) === 0) return undefined;
    if (_DateInput["default"]) return value;
  }
};
EDateInput.prototype.attributeHandlers.format = {
  set: function set(value) {
    this.domElt.format = value || 'dd/MM/yyyy';
  },
  get: function get() {
    return this.domElt.format;
  },
  descriptor: {
    type: 'enum',
    values: ['dd/MM/yyyy', 'MM/dd/yyyy', 'yyyy/MM/dd', 'dd-MM-yyyy', 'MM-dd-yyyy', 'MM/yyyy', 'MM-yyyy', 'yyyy']
  }
};
EDateInput.prototype.attributeHandlers.notNull = {
  set: function set(value) {
    this.domElt.notNull = !!value;
  },
  get: function get() {
    return this.domElt.notNull;
  },
  "export": function _export() {
    return this.domElt.notNull || undefined;
  },
  descriptor: {
    type: 'bool',
    sign: 'value_not_null'
  }
};
EDateInput.prototype.pinHandlers.min = {
  receives: function receives(value) {
    this.domElt.min = (0, _datetime.implicitDate)(value);
  },
  descriptor: {
    type: "Date"
  }
};
EDateInput.prototype.pinHandlers.max = {
  receives: function receives(value) {
    value = (0, _datetime.implicitDate)(value);
    this.domElt.max = value;
  },
  descriptor: {
    type: "Date"
  }
};
EDateInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: "Date"
  }
};
EDateInput.prototype.pinHandlers.text = {
  get: function get() {
    var value = this.domElt.value;
    if (value) {
      return (0, _datetime.formatDateTime)(value, this.domElt.format || 'dd/MM/yyyy');
    } else return '';
  }
};
EDateInput.prototype.render = function () {
  var _this = this;
  return (0, _FCore._)({
    tag: 'dateinput',
    "class": 'ez-date-input',
    on: {
      change: function change(event) {
        _this.notifyChange(event);
      }
    }
  });
};
_EBuilder.EBuilderInstance.install(EDateInput);
var _default = EDateInput;
exports["default"] = _default;

/***/ }),

/***/ 25857:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _datetime = __webpack_require__(58286);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _DateNLevelInput = _interopRequireDefault(__webpack_require__(45627));
var _FCore = __webpack_require__(51518);
var _EBuilder = __webpack_require__(55813);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var dateKeyOf = function dateKeyOf(date) {
  if (!date) return 'NULL';
  if (date.getTime) return (0, _datetime.beginOfDay)(date).toString();
  return date + '';
};

/***
 * @extends EComponent
 * @constructor
 */
function EDateLevelInput() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EDateLevelInput, _EComponent["default"]);
EDateLevelInput.prototype.tag = "DateLevelInput";
EDateLevelInput.prototype.menuIcon = "span.mdi.mdi-calendar-edit";
EDateLevelInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prevKey = dateKeyOf(this.domElt.value);
    value = (0, _datetime.implicitDate)(value);
    if (value) value = (0, _datetime.beginOfDay)(value);
    this.domElt.value = value;
    var cur = dateKeyOf(this.domElt.value);
    if (prevKey !== cur) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    // defaultValue: beginOfDay(new Date()),//??
    sign: 'SimpleDate'
  },
  "export": function _export() {
    if (this.domElt.notNull && !this.domElt._value) return undefined; //this is auto, not assign
    var value = this.domElt.value;
    if (!value) return undefined;
    return value;
  }
};
EDateLevelInput.prototype.attributeHandlers.level = {
  set: function set(value) {
    this.domElt.level = value;
  },
  get: function get() {
    return this.domElt.level;
  },
  "export": function _export() {
    var val = this.domElt.level;
    if (val === 'date') return true;
    return val;
  },
  descriptor: {
    type: "enum",
    values: ['date', 'week', 'month', 'quarter', 'year']
  }
};
EDateLevelInput.prototype.attributeHandlers.min = {
  set: function set(value) {
    this.domElt.min = value;
  },
  get: function get() {
    return this.domElt.min;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    sign: 'date_min'
  },
  "export": function _export() {
    var value = this.domElt.min;
    if (!value) return undefined;
    if ((0, _datetime.compareDate)(value, new Date(1890, 0, 1, 0, 0, 0, 0)) === 0) return undefined;
    return value;
  }
};
EDateLevelInput.prototype.attributeHandlers.max = {
  set: function set(value) {
    value = (0, _datetime.implicitDate)(value);
    this.domElt.max = value;
  },
  get: function get() {
    return this.domElt.max;
  },
  descriptor: {
    type: 'date',
    nullable: true,
    sign: 'date_max'
  },
  "export": function _export() {
    var value = this.domElt.max;
    if (!value) return undefined;
    if ((0, _datetime.compareDate)(value, new Date(2090, 0, 1, 0, 0, 0, 0)) === 0) return undefined;
    return value;
  }
};
EDateLevelInput.prototype.pinHandlers.min = {
  receives: function receives(value) {
    this.attributes.min = value;
  },
  get: function get() {
    return this.domElt.min;
  },
  descriptor: {
    type: "Date"
  }
};
EDateLevelInput.prototype.pinHandlers.max = {
  receives: function receives(value) {
    this.attributes.max = value;
  },
  get: function get() {
    return this.domElt.max;
  },
  descriptor: {
    type: "Date"
  }
};
EDateLevelInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: "Date"
  }
};
EDateLevelInput.prototype.pinHandlers.level = {
  receives: function receives(value) {
    this.attributes.level = value;
  },
  get: function get() {
    return this.domElt.level;
  },
  descriptor: {
    type: "enum",
    values: ['date', 'week', 'month', 'quarter', 'year']
  }
};
EDateLevelInput.prototype.attributes.width = 'auto';
EDateLevelInput.prototype.attributes.height = 30;
EDateLevelInput.prototype.attributes.value = null;
EDateLevelInput.prototype.render = function () {
  var _this = this;
  return (0, _FCore._)({
    tag: _DateNLevelInput["default"],
    on: {
      change: function change() {
        _this.pinFire('value');
      }
    }
  });
};
EDateLevelInput.prototype.verify = function () {
  if (!this.attributes.required) return {
    completed: true
  };
  var value = this.attributes.value;
  if (value === null) {
    return {
      completed: false,
      comp: this
    };
  }
};
_EBuilder.EBuilderInstance.install(EDateLevelInput);
var _default = EDateLevelInput;
exports["default"] = _default;

/***/ }),

/***/ 78916:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _stringFormat = __webpack_require__(22294);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _EBuilder = __webpack_require__(55813);
var _FCore = __webpack_require__(51518);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function removeTimeFormat(format) {
  if (!format) return null;
  return format.replace(/[hH].+$/g, '');
}

/***
 * @extends ScalableComponent
 * @constructor
 */
function EDateTimeInput() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EDateTimeInput, _EComponent["default"], _EAbstractComponent.AbstractInput);
EDateTimeInput.prototype.tag = 'DateTimeInput';
EDateTimeInput.prototype.menuIcon = 'span.mdi.mdi-calendar-clock';
EDateTimeInput.prototype.attributes.width = 174;
EDateTimeInput.prototype.attributes.height = 30;
EDateTimeInput.prototype.attributes.format = 'dd/MM/yyyy HH:mm';
EDateTimeInput.prototype.attributeHandlers.format = {
  set: function set(value) {
    if (value === 'date') value = 'dd/MM/yyyy HH:mm';else if (value === 'datetime') value = 'dd/MM/yyyy HH:mm';
    // console.log(value)
    this.domElt.format = value;
  },
  get: function get() {
    return this.domElt.format;
  },
  descriptor: {
    type: 'text',
    dependency: ['dateOnly']
  },
  "export": function _export() {
    var value = this.domElt.format;
    if (value === 'dd/MM/yyyy HH:mm') return undefined;
    return value;
  }
};
EDateTimeInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    this.domElt.value = value;
    var cur = this.domElt.value;
    if (!prev !== !cur || prev && cur && prev.getTime() === cur.getTime()) {
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'DateTime'
  },
  "export": function _export() {
    return this.value || undefined;
  }
};
EDateTimeInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: "Date"
  }
};
EDateTimeInput.prototype.pinHandlers.dateOnly = {
  receives: function receives(value) {
    this.attributes.dateOnly = value;
  },
  descriptor: {
    type: "bool"
  }
};
EDateTimeInput.prototype.attributeHandlers.dateOnly = {
  set: function set(value) {
    if (value) {
      this.domElt.format = 'dd/MM/yyyy';
    } else this.domElt.format = 'dd/MM/yyyy HH:mm';
    this.pinFire('value');
    this.notifyChange();
  },
  get: function get() {
    var format = this.domElt.format || '';
    var tks = (0, _stringFormat.nonAccentVietnamese)(format).split(/[^A-Za-z0-9]+/);
    return tks.indexOf('H') < 0 && tks.indexOf('h') < 0 && tks.indexOf('HH') < 0 && tks.indexOf('hh') < 0;
  },
  descriptor: {
    type: 'bool'
  }
};
EDateTimeInput.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)({
    tag: 'datetimeinput',
    "class": 'ez-date-time-input',
    on: {
      change: function change(event) {
        _this.notifyChange(event);
      }
    }
  });
  return this.domElt;
};
_EBuilder.EBuilderInstance.install(EDateTimeInput);
var _default = EDateTimeInput;
exports["default"] = _default;

/***/ }),

/***/ 61362:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _FCore = __webpack_require__(51518);
var _EAbstractComponent = __webpack_require__(18662);
var _EComboBox = _interopRequireDefault(__webpack_require__(15726));
var _EBuilder = __webpack_require__(55813);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends EComponent
 * @constructor
 */
function EDualComboBox() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EDualComboBox, _EComponent["default"], _EAbstractComponent.AbstractSelectMenu);
EDualComboBox.prototype.tag = "DualComboBox";
EDualComboBox.prototype.menuIcon = 'span.mdi.mdi-chevron-double-down';
EDualComboBox.prototype.attributes.height = 30;
EDualComboBox.prototype.attributes.width = 'auto';
EDualComboBox.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = (this.domElt.value || [null, null]).join('/');
    this.domElt.value = value;
    var cur = (this.domElt.value || [null, null]).join('/');
    if (prev !== cur) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  }
};
EDualComboBox.prototype.attributeHandlers.strictValue = _EComboBox["default"].prototype.attributeHandlers.strictValue;
EDualComboBox.prototype.attributeHandlers.items = Object.assign({}, _EComboBox["default"].prototype.attributeHandlers.items);
EDualComboBox.prototype.attributeHandlers.treeList = Object.assign({}, _EComboBox["default"].prototype.attributeHandlers.list, {
  set: function set(items) {
    var prev = (this.domElt.value || [null, null]).join('/');
    this.domElt.items = items;
    var cur = (this.domElt.value || [null, null]).join('/');
    if (prev !== cur) {
      this.pinFire('value');
      this.notifyChange();
    }
  },
  descriptor: {
    type: 'SelectTreeList'
  },
  "export": function _export() {
    var treeList = this.domElt.items;
    return treeList.map(function copyItem(item) {
      var newItem = {
        value: item.value,
        text: item.text
      };
      if (item.items && item.items.length) newItem.items = item.items.map(copyItem);
      return newItem;
    });
  }
});
EDualComboBox.prototype.pinHandlers.value = _EComboBox["default"].prototype.pinHandlers.value;
EDualComboBox.prototype.computeItems = function () {
  var _this = this;
  if (this.state === "CREATE") return; //not init anything
  var items = this.attributes.items;
  if (typeof items === "string") {
    this.evalSCExpression(items, function (result) {
      _this.domElt.items = result;
    });
  } else if (Array.isArray(items)) {
    this.domElt.items = items;
  }
};
EDualComboBox.prototype.render = function () {
  var _this2 = this;
  return (0, _FCore._)({
    tag: 'dualselectmenu',
    "class": 'ez-dual-combobox',
    on: {
      change: function change(event) {
        _this2.notifyChange(event);
      }
    }
  });
};
EDualComboBox.prototype.onStart = function () {
  this.computeItems();
};
_EBuilder.EBuilderInstance.install(EDualComboBox);
var _default = EDualComboBox;
exports["default"] = _default;

/***/ }),

/***/ 75861:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _utils = __webpack_require__(84512);
var _FileInputBox = _interopRequireDefault(__webpack_require__(28794));
var _EAbstractComponent = __webpack_require__(18662);
var _FCore = __webpack_require__(51518);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EBuilder = __webpack_require__(55813);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @augments AbstractInput
 * @extends EComponent
 * @constructor
 */
function EFileInput() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EFileInput, _EComponent["default"], _EAbstractComponent.AbstractInput);
EFileInput.prototype.tag = "FileInput";
EFileInput.prototype.menuIcon = "span.mdi.mdi-file-plus";
EFileInput.prototype.attributes.allowUpload = true;
EFileInput.prototype.attributes.removable = true;
EFileInput.prototype.attributes.downloadable = true;
EFileInput.prototype.attributes.width = 100;
EFileInput.prototype.attributes.height = 120;
EFileInput.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    tag: _FileInputBox["default"].tag,
    "class": 'ez-file-input'
  });
  this.domElt.on('change', function () {
    this.notifyChange();
  }.bind(this));
  this.domElt.$input.on('click', function (event) {
    event.preventDefault();
    this.openFileDialog();
  }.bind(this));
};
EFileInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    this.domElt.value = value;
    if (prev !== this.domElt.value) {
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: "FileSource",
    sign: 'FileSource'
  },
  "export": function _export() {
    return this.value || undefined;
  }
};
EFileInput.prototype.attributeHandlers.fileName = {
  set: function set(value) {
    value = value || null;
    this.domElt.fileName = value;
  },
  get: function get() {
    return this.domElt.fileName;
  },
  descriptor: {
    type: 'text'
  },
  "export": function _export() {}
};
EFileInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: "FileSource"
  }
};
EFileInput.prototype.attributeHandlers.allowUpload = {
  set: function set(value) {
    this.domElt.allowUpload = value;
  },
  get: function get() {
    return this.domElt.allowUpload;
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export() {
    return this.domElt.allowUpload ? undefined : false;
  }
};
EFileInput.prototype.attributeHandlers.removable = {
  set: function set(value) {
    this.domElt.removable = value;
  },
  get: function get() {
    return this.domElt.removable;
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export() {
    return this.domElt.removable ? undefined : false;
  }
};
EFileInput.prototype.attributeHandlers.downloadable = {
  set: function set(value) {
    this.domElt.downloadable = value;
  },
  get: function get() {
    return this.domElt.downloadable;
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export() {
    return this.domElt.downloadable ? undefined : false;
  }
};
EFileInput.prototype.attributeHandlers.accept = {
  set: function set(value) {
    this.domElt.accept = value;
  },
  get: function get() {
    return this.domElt.accept;
  },
  descriptor: {
    type: 'text'
  },
  "export": function _export() {
    return this.domElt.accept || undefined;
  }
};
EFileInput.prototype.attributeHandlers.directUpload = {
  descriptor: {
    type: 'bool'
  }
};
EFileInput.prototype.openFileDialog = function () {
  if (!this.attributes.directUpload && window.contentModule && window.contentModule.chooseFile) {
    window.contentModule.chooseFile({
      accept: this.attributes.accept
    }).then(function (result) {
      if (result && result.length > 0) result = result[0];
      if (result) {
        this.attributes.value = result;
      }
    }.bind(this));
  } else {
    (0, _utils.openFileDialog)({
      accept: this.attributes.accept
    }).then(function (files) {
      if (files && files.length > 0) {
        this.attributes.value = files[0];
      }
    }.bind(this));
  }
};
_EBuilder.EBuilderInstance.install(EFileInput);
var _default = EFileInput;
exports["default"] = _default;

/***/ }),

/***/ 49079:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _EBuilder = __webpack_require__(55813);
var _FCore = __webpack_require__(51518);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @augments AbstractInput
 * @extends EComponent
 * @constructor
 */
function EFileListInput() {
  _EComponent["default"].call(this);
  this._prevFiles = [];
}
(0, _EComponent.inheritEZUIClass)(EFileListInput, _EComponent["default"], _EAbstractComponent.AbstractInput);
EFileListInput.prototype.tag = 'FileListInput';
EFileListInput.prototype.menuIcon = 'span.mdi.mdi-file-multiple-outline';
EFileListInput.prototype.render = function () {
  var self = this;
  var elt = (0, _FCore._)({
    tag: 'filelistinput',
    props: {
      droppable: false
    },
    on: {
      change: function change(event) {
        self.notifyChange(event);
      }
    }
  });
  elt.$addedFile.on('click', function (event) {
    if (window.contentModule && window.contentModule.chooseFile && !self.attributes.useSystemDialog) {
      event.preventDefault();
      window.contentModule.chooseFile({
        accept: this.attributes.accept
      }).then(function (result) {
        if (result) {
          if (result instanceof Array) {
            result.forEach(function (it) {
              elt.add(it);
            });
          } else if (result) {
            elt.add(result);
          } else {
            return;
          }
          self.notifyChange();
        }
      });
    }
  });
  return elt;
};
EFileListInput.prototype.attributeHandlers.value = {
  set: function set(files) {
    files = files || [];
    var changed = this._prevFiles.length !== files.length;
    if (!changed) {
      for (var i = 0; i < this._prevFiles.length && !changed; ++i) {
        if (files[i] === this._prevFiles[i]) changed = true;
      }
    }
    this._prevFiles = files.slice();
    if (changed) {
      this.domElt.files = files;
      this.pinFire('value');
    }
  },
  get: function get() {
    return this.domElt.files;
  },
  descriptor: {
    type: 'file[]'
  }
};
EFileListInput.prototype.attributeHandlers.multiple = {
  set: function set(value) {
    this.domElt.multiple = !!value;
  },
  get: function get() {
    return this.domElt.multiple;
  },
  descriptor: {
    type: 'boolean'
  }
};
EFileListInput.prototype.attributeHandlers.useSystemDialog = {
  set: function set(value) {
    value = !!value;
    this.domElt.droppable = value;
    return value;
  },
  descriptor: {
    type: 'boolean'
  }
};
EFileListInput.prototype.pinHandlers.value = {
  get: function get() {
    return this.attributes.value;
  },
  receives: function receives(files) {
    this.attributes.value = files;
  },
  descriptor: {
    type: 'file[]'
  }
};
_EBuilder.EBuilderInstance.install(EFileListInput);
var _default = EFileListInput;
exports["default"] = _default;

/***/ }),

/***/ 56504:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _CCLine = _interopRequireDefault(__webpack_require__(83141));
var _ContextManager = _interopRequireDefault(__webpack_require__(88062));
var _SCScope = _interopRequireDefault(__webpack_require__(55830));
var _SCProgramInstance = __webpack_require__(47790);
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _EAbstractComponent = __webpack_require__(18662);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @extends EComponent
 * @constructor
 */
function EFragment(opt) {
  this._props = {};
  this.graph = {
    id2object: {},
    name2objects: {},
    objects: [],
    group2objects: {}
  };
  _EComponent["default"].call(this);
  this.ctxMng = new _ContextManager["default"]();
  this.emitter = new _EventEmitter["default"]();
  this.variableScope = new _SCScope["default"](_SCProgramInstance.SCDynamicLibScope);
  if (opt && opt.context) {
    this.ctxMng.set('variableScope', this.variableScope);
    for (var key in opt.context) {
      this.variableScope.declareConst(key, opt.context[key]);
    }
  }
}
(0, _EComponent.inheritEZUIClass)(EFragment, _EComponent["default"]);
EFragment.prototype.tag = 'Fragment';
EFragment.prototype.menuIcon = 'span.mdi.mdi-terraform';
EFragment.prototype.render = function () {
  var _this = this;
  this.layout = this.builder.inflate(this.sourceData.layout);
  this.domElt = this.layout.domElt;
  this.blocks = (this.sourceData.blocks || []).map(function (blkData) {
    return _this.builder.inflate(blkData);
  });
  var objectDict = {};
  var groupDict = {};
  var visit = function visit(block) {
    var blockId = block.attributes.id;
    if (blockId) {
      objectDict[blockId] = block;
      _this.graph.id2object[blockId] = block;
      if (block.attributeHandlers && block.attributeHandlers.value) {
        Object.defineProperty(_this._props, blockId, {
          enumerable: true,
          configurable: true,
          get: function get() {
            return block.attributes.value;
          },
          set: function set(value) {
            block.attributes.value = value;
          }
        });
      }
    }
    var blockName = block.attributes.name;
    if (blockName) {
      objectDict[blockName] = block;
      if (block.attributeHandlers && block.attributeHandlers.value) {
        _this.graph.name2objects[blockName] = _this.graph.name2objects[blockName] || [];
        _this.graph.name2objects[blockName].push(block);
        _this.graph.objects.push(block);
        Object.defineProperty(_this._props, blockName, {
          enumerable: true,
          configurable: true,
          get: function get() {
            return block.attributes.value;
          },
          set: function set(value) {
            block.attributes.value = value;
          }
        });
      }
    }
    var groupName = block.attributes.group;
    if (groupName) {
      _this.graph.group2objects[groupName] = _this.graph.group2objects[groupName] || [];
      _this.graph.group2objects[groupName].push(block);
      groupDict[groupName] = groupDict[groupName] || [];
      groupDict[groupName].push(block);
    }
  };
  this.getViewAsArray().forEach(visit);
  Object.keys(groupDict).forEach(function (groupName) {
    _this.blocks.push(_this.builder.inflate({
      tag: 'ComponentGroup',
      id: groupName
    }));
  });
  this.blocks.forEach(visit);
  this.lines = (this.sourceData.lines || []).map(function (lineData) {
    var u = objectDict[lineData.u];
    var v = objectDict[lineData.v];
    if (u && v) return new _CCLine["default"](u, lineData.uPin, v, lineData.vPin);
  }).filter(function (x) {
    return !!x;
  });
  this.layout.attach(this);
  this.blocks.forEach(function (block) {
    return block.attach(_this);
  });
};
EFragment.prototype.attributeHandlers.value = {
  set: function set(value) {
    // this.value = value;
  },
  get: function get() {
    var graph = this.graph;
    var objects = graph.objects;
    var name2objects = graph.name2objects;
    if (objects.length === 0) return null;
    if (objects.length === 1 && objects[0] === this.layout) {
      return this.layout.attributes.value;
    }
    if (name2objects['$value$'] && name2objects['$value$'].length === 1) {
      return name2objects['$value$'][0].attributes.value;
    }
    var res = {};
    var obj;
    for (var i = 0; i < objects.length; ++i) {
      //todo: union
      obj = objects[i];
      res[obj.attributes.name] = obj.attributes.value;
    }
    return res;
  },
  descriptor: function descriptor() {}
};

/**
 *
 */
EFragment.prototype.validate = function () {
  //todo: validate by union if need
  return true;
};
EFragment.prototype.onChildAttribute = function () {};
EFragment.prototype.start = function (standBy) {
  if (this.parent) {
    this.variableScope.parent = this.parent.getContext('variableScope');
  }
  if (this.state.match(/DIE/)) {
    // console.warn(this, 'DIED!');
    return;
  }
  if (this.state.match(/RUNNING/)) return;
  if (this.state.match(/STOP|CREATE/)) {
    this.state = "STANDBY";
    //additional process
    this.layout.start(true);
    this.blocks.forEach(function (blk) {
      return blk.start(true);
    });
    this.onStart && this.onStart();
  }
  if (!standBy && this.state.match(/STANDBY|PAUSE/)) {
    this.resume();
  }
};
EFragment.prototype.resume = function () {
  _EComponent["default"].prototype.resume.call(this);
  this.layout.resume();
  this.blocks.forEach(function (blk) {
    return blk.resume();
  });
};
EFragment.prototype.pause = function () {
  this.layout.pause();
  _EComponent["default"].prototype.pause.call(this);
};
EFragment.prototype.stop = function () {
  this.layout.stop();
  _EComponent["default"].prototype.stop.call(this);
};
EFragment.prototype.destroy = function () {
  this.layout.destroy();
  _EComponent["default"].prototype.destroy.call(this);
};
EFragment.prototype.ready = function () {
  if (this.state !== "RUNNING") this.start();
  var syncs = [];
  var visit = function visit(nd) {
    if (nd.ready) {
      syncs.push(nd.ready());
    }
    if (nd.sync) syncs.push(nd.sync);
    if (nd.children && nd.children.length > 0) {
      for (var i = 0; i < nd.children.length; i++) {
        visit(nd.children[i]);
      }
    }
  };
  return Promise.all(syncs);
};

/**
 *
 * @returns {Promise} value
 */
EFragment.prototype.setValue = function (value) {};

/**
 *
 * @returns {Promise}
 */
EFragment.prototype.getValue = function () {};

/**
 *
 * @param {"DFS"|"BFS"=} searchType - default is DFS
 * @returns {*[]}
 */
EFragment.prototype.getViewAsArray = function (searchType) {
  var res = [];
  var visitDFS = function visitDFS(nd) {
    res.push(nd);
    if (nd.children && nd.children.length > 0) {
      for (var i = 0; i < nd.children.length; i++) {
        visitDFS(nd.children[i]);
      }
    }
  };
  var visitBFS = function visitBFS(nd) {
    var queue = [nd];
    var i;
    while (queue.length) {
      nd = queue.shift();
      res.push(nd);
      if (nd.children && nd.children.length > 0) {
        for (i = 0; i < nd.children.length; i++) {
          queue.push(nd.children[i]);
        }
      }
    }
  };
  if (searchType === "BFS") {
    visitBFS(this.layout);
  } else {
    visitDFS(this.layout);
  }
  return res;
};
Object.defineProperty(EFragment.prototype, 'props', {
  enumerable: true,
  configurable: true,
  set: function set(value) {
    //set, get by name, and id
    Object.assign(this._props, value);
  },
  get: function get() {
    return this._props;
  }
});
Object.defineProperty(EFragment.prototype, 'value', {
  enumerable: true,
  configurable: true,
  get: function get() {
    var blocks = this.blocks.filter(function (blk) {
      return blk && blk.attributeHandlers && !!blk.attributeHandlers.value;
    });
    if (blocks.length === 0 && this.layout.attributeHandlers.value) {
      return this.layout.attributes.value;
    } else if ('$value$' in this._props) {
      return this._props['$value$'];
    }
    var res = {};
    var comArray = this.getViewAsArray("DFS");
    var compById = comArray.reduce(function (ac, cr) {
      var name = cr.attributes.name;
      if (name) {
        ac[name] = cr;
      }
      var id = cr.attributes.id;
      ac[id] = cr;
      return ac;
    }, {});
    this.getViewAsArray("DFS").concat(blocks).forEach(function (comp) {
      var name = comp.attributes.name;
      if (!name) return;
      var union = comp.attributes.union;
      var unionComp, unionValue;
      var unionValues;
      var isUsedField = true;
      if (union) {
        unionComp = compById[union];
        unionValue = unionComp.attributes.value;
        unionValues = comp.attributes.unionValues;
        if (unionValues) {
          isUsedField = unionValues.some(function (a) {
            return (0, _EAbstractComponent.isUnionValueEqual)(a, unionValue);
          });
        }
      }
      if (isUsedField) {
        res[name] = comp.attributes.value;
      }
    });
    return res;
  },
  set: function set(value) {
    var _this2 = this;
    var blocks = this.blocks.filter(function (blk) {
      return blk && blk.attributeHandlers && !!blk.attributeHandlers.value;
    });
    if (blocks.length === 0 && this.layout.attributeHandlers.value) {
      this.layout.attributes.value = value;
    } else if ('$value$' in this._props) {
      this._props['$value$'] = value;
    }
    value = value || {};
    var comArray = this.getViewAsArray("DFS");
    var compById = comArray.reduce(function (ac, cr) {
      var name = cr.attributes.name;
      if (name) {
        ac[name] = cr;
      }
      var id = cr.attributes.id;
      ac[id] = cr;
      return ac;
    }, {});
    this.getViewAsArray("DFS").concat(blocks).forEach(function (comp) {
      var doAssign = function doAssign() {
        var name = comp.attributes.name;
        if (!name) return;
        var union = comp.attributes.union;
        var unionComp, unionValue;
        var unionValues;
        var isUsedField = true;
        if (union) {
          unionComp = compById[union];
          if (unionComp.attributes.name in value) {
            unionValue = value[unionComp.attributes.name];
          } else if (unionComp.attributes.id in value) {
            unionValue = value[unionComp.attributes.id];
          }
          unionValue = value[union];
          unionValues = comp.attributes.unionValues;
          if (unionValues) {
            isUsedField = unionValues.some(function (a) {
              return (0, _EAbstractComponent.isUnionValueEqual)(a, unionValue);
            });
          }
        }
        if (isUsedField) {
          comp.attributes.value = value[name];
        }
      };
      var mutex = _this2.mutex;
      if (!mutex) doAssign();else mutex.then(function () {
        return doAssign();
      });
    });
  }
});
Object.defineProperty(EFragment.prototype, 'mutex', {
  get: function get() {
    var mutex = this.getViewAsArray().map(function (x) {
      return x.mutex;
    }).filter(function (x) {
      return !!x;
    });
    if (mutex.length === 0) return null;
    return Promise.all(mutex);
  }
});

//TODO: handle value of fragment

EFragment.prototype.builder = null;
EFragment.prototype.sourceData = {
  tag: "EPluginComponent",
  layout: {
    type: "row",
    children: [{
      tag: 'Label',
      value: 'EPluginComponent'
    }]
  }
};

/*********Adapt functions ******************/

/**
 * adapt function
 * @returns {Promise<Awaited<unknown>[]>}
 */
EFragment.prototype.afterEntryCompleted = function () {
  return this.ready();
};
EFragment.prototype.findViewByName = function (name) {
  return this.graph.name2objects[name] && this.graph.name2objects[name][0] || null;
};
EFragment.prototype.findViewById = function (id) {
  var result = null;
  var visit = function visit(nd) {
    if (result) return;
    if (nd.attributes.id === id) {
      result = nd;
      return;
    }
    if (nd.children && nd.children.length > 0) {
      for (var i = 0; i < nd.children.length; i++) {
        visit(nd.children[i]);
        if (result) return;
      }
    }
  };
  return result;
};
var _default = EFragment;
exports["default"] = _default;

/***/ }),

/***/ 31880:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EBuilder = __webpack_require__(55813);
var _Dom = __webpack_require__(64821);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @extends EComponent
 * @constructor
 */
function Image() {
  _EComponent["default"].call(this);
  this.naturalWidth = 0;
  this.naturalHeight = 0;
  this.loadedSync = Promise.resolve([0, 0]);
}
(0, _EComponent.inheritEZUIClass)(Image, _EComponent["default"]);
Image.prototype.tag = "Image";
Image.prototype.menuIcon = "span.mdi.mdi-image-outline";
Image.prototype.attributes.width = 'auto';
Image.prototype.attributes.height = 'auto';
Image.prototype.attributeHandlers.value = {
  set: function set(value) {
    var _this = this;
    var src;
    if (value instanceof File || value instanceof Blob) {
      src = URL.createObjectURL(value);
    } else if (typeof value === 'string') {
      src = value;
    } else if (value && value.url) {
      src = value.url;
    }
    this.$img.src = src;
    if (value) {
      this.domElt.removeClass('as-empty');
      this.loadedSync = (0, _Dom.waitImageLoaded)(this.$img).then(function (wh) {
        var width = _this.$img.naturalWidth;
        var height = _this.$img.naturalHeight;
        _this.domElt.addStyle('--as-natural-width', width + 'px').addStyle('--as-natural-height', height + 'px').addStyle('--as-image-ratio', width / height);
        return [width, height];
      });
    } else {
      this.domElt.addClass('as-empty');
    }
    return value;
  },
  descriptor: {
    type: "text",
    "long": true,
    sign: 'SimpleUrl'
  },
  "export": function _export(ref) {
    var value = ref.get() || undefined;
    if (value === this.constructor.prototype.attributes.value) value = undefined;
    if (typeof value === 'string') {
      return value || undefined;
    }
    return undefined;
  }
};
Image.prototype.attributeHandlers.placeHolder = {
  set: function set(value) {
    if (value !== 'avatar') value = 'default';
    this.domElt.attr('data-place-holder', value);
    return value;
  },
  descriptor: {
    type: 'enum',
    values: ['default', 'avatar']
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value !== 'avatar') value = undefined;
    return value || undefined;
  }
};
Image.prototype.attributeHandlers.naturalSize = {
  descriptor: function descriptor() {
    return {
      type: 'const',
      value: this.loadedSync.then(function (wh) {
        return wh.join(' x ');
      })
    };
  }
};
Image.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  }
};
Image.prototype.render = function () {
  var _this2 = this;
  this.domElt = (0, _FCore._)({
    "class": ['ez-image', 'as-empty'],
    child: 'img'
  });
  this.$img = (0, _FCore.$)('img', this.domElt);
  this.$img.on('load', function () {
    _this2.domElt.addStyle('--as-natural-width', _this2.$img.naturalWidth + 'px').addStyle('--as-natural-height', _this2.$img.naturalHeight + 'px').addStyle('--as-image-ratio', _this2.$img.naturalWidth / _this2.$img.naturalHeight);
  });
};
_EBuilder.EBuilderInstance.install(Image);
var _default = Image;
exports["default"] = _default;

/***/ }),

/***/ 64652:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
__webpack_require__(58072);
var _utils = __webpack_require__(84512);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EBuilder = __webpack_require__(55813);
var _EAbstractComponent = __webpack_require__(18662);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _ = _FCore["default"]._;

/***
 * @augments AbstractInput
 * @extends EComponent
 * @constructor
 */
function EImageFileInput() {
  _EComponent["default"].call(this);
  this._imageSrc = undefined;
}
(0, _EComponent.inheritEZUIClass)(EImageFileInput, _EComponent["default"], _EAbstractComponent.AbstractInput);
EImageFileInput.prototype.tag = "ImageFileInput";
EImageFileInput.prototype.menuIcon = "span.mdi.mdi-image-plus";
EImageFileInput.prototype._defaultBackgroundImg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiICB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgIDxwYXRoIGZpbGw9IiNhYWFhYWEiIGQ9Ik01LDNBMiwyIDAgMCwwIDMsNVYxOUEyLDIgMCAwLDAgNSwyMUgxNC4wOUMxNC4wMywyMC42NyAxNCwyMC4zNCAxNCwyMEMxNCwxOS4zMiAxNC4xMiwxOC42NCAxNC4zNSwxOEg1TDguNSwxMy41TDExLDE2LjVMMTQuNSwxMkwxNi43MywxNC45N0MxNy43LDE0LjM0IDE4Ljg0LDE0IDIwLDE0QzIwLjM0LDE0IDIwLjY3LDE0LjAzIDIxLDE0LjA5VjVDMjEsMy44OSAyMC4xLDMgMTksM0g1TTE5LDE2VjE5SDE2VjIxSDE5VjI0SDIxVjIxSDI0VjE5SDIxVjE2SDE5WiIgLz4KPC9zdmc+';
EImageFileInput.prototype.attributes.uploadMethol = 'default';
EImageFileInput.prototype.attributes.readonly = false;
EImageFileInput.prototype.attributes.previewSize = 'contain';
EImageFileInput.prototype.attributes.value = null;
EImageFileInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    var prev = ref.get();
    if (typeof value === 'string') {
      this._imageSrc = value;
    } else if (value instanceof File || value instanceof Blob) {
      this._imageSrc = URL.createObjectURL(value);
    } else if (value && value.url) {
      this._imageSrc = value.url;
    } else {
      this._imageSrc = undefined;
      value = null;
    }
    if (this._imageSrc) {
      this.$img.addStyle('backgroundImage', 'url(' + this._imageSrc + ')');
      this.domElt.addClass('as-has-file');
    } else {
      this.$img.addStyle('backgroundImage', 'url(' + this._defaultBackgroundImg + ')');
      this.domElt.removeClass('as-has-file');
    }
    ref.set(value); //set before send to pin
    if (!value !== !prev || value && prev && value !== prev) {
      this.notifyChange();
    }
    return value;
  },
  descriptor: {
    type: "ImageSource",
    sign: 'ImageSource'
  },
  "export": function _export() {
    return this._imageSrc;
  }
};
EImageFileInput.prototype.attributeHandlers.readonly = {
  set: function set(value) {
    return !!value;
  },
  descriptor: {
    type: 'bool'
  },
  "export": function _export() {
    return arguments[arguments.length - 1].get() || undefined;
  }
};
EImageFileInput.prototype.attributeHandlers.previewSize = {
  set: function set(value) {
    if (!['contain', 'cover'].includes(value)) value = 'contain';
    if (value === 'contain') this.$img.removeStyle('backgroundSize');else this.$img.addStyle('backgroundSize', value);
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    return value === 'contain' ? undefined : value;
  },
  descriptor: {
    type: 'enum',
    values: ['contain', 'cover']
  }
};
EImageFileInput.prototype.attributeHandlers.uploadMethol = {
  set: function set(value) {
    if (['default', 'quick', 'browser_file'].indexOf(value) < 0) {
      value = 'default';
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'default') value = undefined;
    return value;
  },
  descriptor: {
    type: 'enum',
    values: ['default', 'quick', 'browser_file']
  }
};
EImageFileInput.prototype.pinHandlers.value = {
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: "ImageFile"
  }
};
EImageFileInput.prototype.openImageFileDialog = function () {
  if (this.attributes.uploadMethol !== 'browser_file' && window.contentModule && window.contentModule.chooseFile) {
    window.contentModule.chooseFile({
      type: "image_file",
      accept: 'image/*',
      hideFinder: this.attributes.uploadMethol === 'quick'
    }).then(function (result) {
      if (result && result.length > 0) result = result[0];
      if (result) {
        this.attributes.value = result;
      }
    }.bind(this));
  } else {
    (0, _utils.openFileDialog)({
      accept: 'image/*'
    }).then(function (files) {
      if (files && files.length > 0) {
        this.attributes.value = files[0];
      }
    }.bind(this));
  }
};
EImageFileInput.prototype.render = function () {
  this.domElt = _({
    "class": 'asf-image-file-input',
    child: [{
      "class": 'asf-image-file-input-img',
      style: {
        backgroundImage: 'url(' + this._defaultBackgroundImg + ')'
      }
    }]
  });
  this.$img = (0, _FCore.$)('.asf-image-file-input-img', this.domElt);
  this.domElt.on('click', this.openImageFileDialog.bind(this));
};
_EBuilder.EBuilderInstance.install(EImageFileInput);
var _default = EImageFileInput;
exports["default"] = _default;

/***/ }),

/***/ 41252:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EBuilder = _interopRequireWildcard(__webpack_require__(55813));
var _FCore = __webpack_require__(51518);
var _EAbstractComponent = __webpack_require__(18662);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function ELabel() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ELabel, _EComponent["default"], _EAbstractComponent.AbstractText);
ELabel.prototype.tag = 'Label';
ELabel.prototype.menuIcon = 'span.mdi.mdi-label-outline';
ELabel.prototype.attributes.height = 'auto';
ELabel.prototype.attributes.width = 'auto';
ELabel.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    tag: 'label',
    "class": 'ez-label',
    child: {
      text: ''
    }
  });
};
ELabel.prototype.attributeHandlers.value = {
  set: function set(value) {
    if (value === undefined || value === null) {
      value = '';
    } else value = value + '';
    this.domElt.firstChild.data = value;
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    return value || undefined;
  },
  descriptor: {
    type: 'string'
  }
};
ELabel.prototype.attributeHandlers.requiredIndicator = {
  set: function set(value) {
    if (value) {
      this.domElt.addClass('as-has-required-indicator');
    } else {
      this.domElt.removeClass('as-has-required-indicator');
    }
  },
  get: function get() {
    return this.domElt.hasClass('as-has-required-indicator');
  },
  "export": function _export() {
    if (this.domElt.hasClass('as-has-required-indicator')) {
      return true;
    } else return undefined;
  },
  descriptor: {
    type: 'boolean',
    sign: 'requiredIndicator'
  }
};
ELabel.prototype.attributeHandlers["for"] = {
  set: function set(value) {
    if (typeof value === 'string') {
      value = value.trim();
    } else value = null;
    if (value) {
      this.domElt.attr('data-for', value);
    } else {
      this.domElt.attr('data-for', null);
    }
  },
  get: function get() {
    var value = this.domElt.attr('data-for') || '';
    return value.trim();
  },
  "export": function _export() {
    var value = this.domElt.attr('data-for') || '';
    value = value.trim();
    if (value) return value;
    return undefined;
  },
  descriptor: {
    type: 'string',
    sign: 'labelFor'
  }
};
_EBuilder.EBuilderInstance.install(ELabel);
var _default = ELabel;
exports["default"] = _default;

/***/ }),

/***/ 42725:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _EBuilder = __webpack_require__(55813);
var _FCore = __webpack_require__(51518);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 @augments AbstractInput
 * @extends EComponent
 * @constructor
 */
function ELocationInput() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ELocationInput, _EComponent["default"], _EAbstractComponent.AbstractInput);
ELocationInput.prototype.menuIcon = 'span.mdi.mdi-map-marker';
ELocationInput.prototype.tag = 'LocationInput';
ELocationInput.prototype.attributes.width = 232;
ELocationInput.prototype.attributes.height = 30;
ELocationInput.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    tag: 'locationinput'
  });
  this.domElt.on('change', function () {
    this.notifyChange();
  }.bind(this));
};
ELocationInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    if (prev === value) return;
    this.domElt.value = value;
    this.pinFire('value');
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'LatLng'
  }
};
ELocationInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: 'LatLng'
  } //{latitude: number, longitude: number}
};

_EBuilder.EBuilderInstance.install(ELocationInput);
var _default = ELocationInput;
exports["default"] = _default;

/***/ }),

/***/ 84031:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _FCore = __webpack_require__(51518);
var _EBuilder = __webpack_require__(55813);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends EComponent
 * @constructor
 */
function ELocationView() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ELocationView, _EComponent["default"]);
ELocationView.prototype.menuIcon = 'span.mdi.mdi-map-legend';
ELocationView.prototype.tag = 'LocationView';
ELocationView.prototype.attributes.width = 300;
ELocationView.prototype.attributes.height = 200;
ELocationView.prototype.render = function () {
  return (0, _FCore._)({
    tag: 'locationview',
    "class": 'ez-location-view'
  });
};
ELocationView.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    if (!value && !prev === !value) return;
    if (prev && value && typeof prev.latitude === "number" && typeof prev.longitude === "number" && prev.latitude === value.latitude && prev.longitude === value.longitude) return;
    this.domElt.value = value;
    this.notifyChange();
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'LatLng'
  }
};
ELocationView.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  descriptor: {
    type: 'LatLng'
  }
};
_EBuilder.EBuilderInstance.install(ELocationView);
var _default = ELocationView;
exports["default"] = _default;

/***/ }),

/***/ 51302:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _MultiCheckMenu = _interopRequireDefault(__webpack_require__(59346));
var _EAbstractComponent = __webpack_require__(18662);
var _EBuilder = __webpack_require__(55813);
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function valueListCmp(a, b) {
  var dictA = a.reduce(function (ac, cr) {
    ac[cr] = cr;
    return ac;
  }, {});
  return a.length === b.length && b.every(function (it) {
    return dictA[it] === it;
  });
}

/***
 * @augments AbstractMultiSelectMenu
 * @augments AbstractInput
 * @extends EComponent
 * @constructor
 */
function EMultiSelectComboBox() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EMultiSelectComboBox, _EComponent["default"], _EAbstractComponent.AbstractMultiSelectMenu);
EMultiSelectComboBox.prototype.attributes.height = 'auto';
EMultiSelectComboBox.prototype.tag = 'MultiSelectComboBox';
EMultiSelectComboBox.prototype.menuIcon = 'span.mdi.mdi-format-list-checkbox';
EMultiSelectComboBox.prototype.attributes.width = 100;
EMultiSelectComboBox.prototype.render = function () {
  var _this = this;
  return (0, _FCore._)({
    tag: _MultiCheckMenu["default"].tag,
    "class": 'ez-multi-select-combo-box',
    on: {
      change: function change(event) {
        _this.notifyChange(event);
      }
    }
  });
};
EMultiSelectComboBox.prototype.onStart = function () {
  this.computeItems();
};
_EBuilder.EBuilderInstance.install(EMultiSelectComboBox);
var _default = EMultiSelectComboBox;
exports["default"] = _default;

/***/ }),

/***/ 57365:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _MultiCheckTreeMenu = _interopRequireDefault(__webpack_require__(74934));
var _EBuilder = __webpack_require__(55813);
var _FCore = _interopRequireDefault(__webpack_require__(51518));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @augments AbstractMultiSelectMenu
 * @extends EComponent
 * @constructor
 */
function EMultiSelectTreeComboBox() {
  _EComponent["default"].apply(this, arguments);
}
(0, _EComponent.inheritEZUIClass)(EMultiSelectTreeComboBox, _EComponent["default"], _EAbstractComponent.AbstractMultiSelectMenu);
EMultiSelectTreeComboBox.prototype.attributes.height = 'auto';
EMultiSelectTreeComboBox.prototype.attributes.width = 200;
EMultiSelectTreeComboBox.prototype.tag = 'MultiSelectTreeComboBox';
EMultiSelectTreeComboBox.prototype.render = function () {
  var sourceAttributes = this.sourceAttributes;
  this.domElt = _FCore["default"]._({
    tag: _MultiCheckTreeMenu["default"],
    "class": 'ez-multi-select-tree-combo-box',
    props: {
      leafOnly: sourceAttributes && sourceAttributes.leafOnly
    }
  });
  this.domElt.on('change', function () {
    this.pinFire('values');
    this.pinFire('text');
    this.notifyChange();
  }.bind(this));
};
EMultiSelectTreeComboBox.prototype.attributeHandlers.leafOnly = {
  set: function set(value) {
    //not change by editor
    return value;
  },
  descriptor: {
    type: 'bool'
  }
};
EMultiSelectTreeComboBox.prototype.attributeHandlers.value = {
  set: function set(values) {
    var prev = this.domElt.values;
    this.domElt.values = values || [];
    var cur = this.domElt.values;
    var changed = prev.length !== cur.length;
    var pDict;
    if (!changed) {
      pDict = prev.reduce(function (ac, cr) {
        ac[cr] = true;
        return ac;
      }, {});
      changed = cur.some(function (val) {
        return !pDict[val];
      });
    }
    if (changed) {
      this.pinFire('values');
      this.pinFire('text');
    }
  },
  get: function get() {
    return this.domElt.values;
  },
  descriptor: {
    type: 'string[]|number[]'
  }
};
EMultiSelectTreeComboBox.prototype.pinHandlers.value = {
  receives: function receives(values) {
    this.attributes.value = values || [];
  },
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: 'string[]|number[]'
  }
};
EMultiSelectTreeComboBox.prototype.onStart = function () {
  this.computeItems();
};
_EBuilder.EBuilderInstance.install(EMultiSelectTreeComboBox);
var _default = EMultiSelectTreeComboBox;
exports["default"] = _default;

/***/ }),

/***/ 96270:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _MultiCheckTreeLeafMenu = _interopRequireDefault(__webpack_require__(8306));
var _EBuilder = __webpack_require__(55813);
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @augments AbstractMultiSelectMenu
 * @extends EComponent
 * @constructor
 */
function EMultiSelectTreeLeafComboBox() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EMultiSelectTreeLeafComboBox, _EComponent["default"], _EAbstractComponent.AbstractMultiSelectMenu);
EMultiSelectTreeLeafComboBox.prototype.attributes.height = 'auto';
EMultiSelectTreeLeafComboBox.prototype.attributes.width = 'auto';
EMultiSelectTreeLeafComboBox.prototype.tag = 'MultiSelectTreeLeafComboBox';
EMultiSelectTreeLeafComboBox.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)({
    tag: _MultiCheckTreeLeafMenu["default"].tag,
    "class": 'ez-multi-select-tree-leaf-combo-box',
    on: {
      change: function change(event) {
        _this.notifyChange(event);
      }
    }
  });
};
EMultiSelectTreeLeafComboBox.prototype.onStart = function () {
  this.computeItems();
};
_EBuilder.EBuilderInstance.install(EMultiSelectTreeLeafComboBox);
var _default = EMultiSelectTreeLeafComboBox;
exports["default"] = _default;

/***/ }),

/***/ 50737:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _utils = __webpack_require__(84512);
var _FCore = __webpack_require__(51518);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _EBuilder = __webpack_require__(55813);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends EComponent
 * @constructor
 */
function ENumberInput() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ENumberInput, _EComponent["default"], _EAbstractComponent.AbstractInput);
ENumberInput.prototype.tag = "NumberInput";
ENumberInput.prototype.menuIcon = 'span.mdi.mdi-numeric-2-box-outline';
ENumberInput.prototype.attributes.height = 30;
ENumberInput.prototype.attributes.width = 120;
ENumberInput.prototype.attributes.floatFixed = 'auto';
ENumberInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    this.domElt.value = value;
    if (prev !== this.domElt.value) {
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: function descriptor() {
    return {
      type: "number",
      max: this.attributes.max,
      min: this.attributes.min
    };
  }
};
ENumberInput.prototype.attributeHandlers.stepper = {
  set: function set(value) {
    this.domElt.stepper = value;
  },
  get: function get() {
    return this.domElt.stepper;
  },
  "export": function _export() {
    return this.domElt.stepper || undefined;
  },
  descriptor: {
    type: 'bool',
    sign: 'number_stepper'
  }
};
ENumberInput.prototype.attributeHandlers.min = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) value = -Infinity;
    this.domElt.min = value;
  },
  get: function get() {
    return this.domElt.min;
  },
  descriptor: function descriptor() {
    return {
      type: "number",
      nullable: true,
      defaultValue: -1e12
    };
  },
  "export": function _export() {
    var value = this.attributes.min;
    if (value === -Infinity) return undefined;
    return value;
  }
};
ENumberInput.prototype.attributeHandlers.max = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) value = Infinity;
    this.domElt.max = value;
  },
  get: function get() {
    return this.domElt.max;
  },
  descriptor: function descriptor() {
    return {
      type: "number",
      nullable: true,
      defaultValue: 1e12
    };
  },
  "export": function _export() {
    var value = this.attributes.max;
    if (value === Infinity) return undefined;
    return value;
  }
};
ENumberInput.prototype.attributeHandlers.floatFixed = {
  set: function set(value) {
    if (value !== 'auto' && !(value >= 0 && value < 20)) value = 'auto';
    this.domElt.floatFixed = value === 'auto' ? null : value;
    return value;
  },
  descriptor: {
    type: "enum",
    values: ['auto', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
  },
  "export": function _export() {
    var value = this.attributes.floatFixed;
    if (value !== 'auto' && !(value >= 0 && value < 20)) value = undefined;
    return value;
  }
};
ENumberInput.prototype.attributeHandlers.step = {
  set: function set(value) {
    this.domElt.step = value;
  },
  get: function get() {
    return this.domElt.step;
  },
  descriptor: {
    type: 'number',
    min: 0
  },
  "export": function _export() {
    var value = this.domElt.step;
    if (value === 1) return undefined;
    return value;
  }
};
ENumberInput.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'number'
  }
};
ENumberInput.prototype.pinHandlers.min = {
  receives: function receives(value) {
    this.attributes.min = value;
  },
  descriptor: {
    type: 'number'
  }
};
ENumberInput.prototype.pinHandlers.max = {
  receives: function receives(value) {
    this.attributes.max = value;
  },
  descriptor: {
    type: 'number'
  }
};
//
// ENumberInput.prototype.pinHandlers.userModified = {
//     get: function () {
//         return true;
//     }
// };

ENumberInput.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)('numberinput.ez-number-input');
  this.domElt.on('change', function (event) {
    _this.pinFire('userModified');
    _this.notifyChange(event);
  });
};
_EBuilder.EBuilderInstance.install(ENumberInput);
var _default = ENumberInput;
exports["default"] = _default;

/***/ }),

/***/ 69080:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TableEditor = _interopRequireDefault(__webpack_require__(79470));
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _FormArrayEditor = _interopRequireDefault(__webpack_require__(490));
var _utils = __webpack_require__(84512);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _FCore = __webpack_require__(51518);
var _EBuilder = _interopRequireWildcard(__webpack_require__(55813));
var _generator = __webpack_require__(18528);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/**
 * todo: lasted
 */
/***
 * @extends EComponent
 * @constructor
 */
function ETableInput(opt) {
  var attributes = this.sourceAttributes || {};
  var appearance = attributes.appearance;
  appearance = appearance || 'sheet';
  this.ctnElt = (0, _FCore._)('div.ez-table-input');
  var clazz = appearance === 'sheet' ? _TableEditor["default"] : _FormArrayEditor["default"];
  this.attributes = Object.assign({}, this.attributes, {
    appearance: appearance
  });
  this.editor = new clazz({
    elt: this.ctnElt
  });
  this.editor.getView();
  _EComponent["default"].call(this);
  this.$domSignal = (0, _FCore._)('attachhook.as-dom-signal');
  this.ctnElt.appendChild(this.$domSignal);
  this.domSignal = new _DomSignal["default"](this.$domSignal);
  this.domSignal.on('requestUpdateContent', this._updateContent.bind(this));
  this._dataFlushed = true;
  this.attributes.records = [];
  this.attributes.propertyDescriptors = {
    "done": {
      "type": "text",
      "text": "example"
    }
  };
  this.attributes.propertyNames = ['done'];
  this.editor.on('change', function () {
    this.pinFire('records');
    this.notifyChange();
    _ResizeSystem["default"].updateUp(this.ctnElt);
  }.bind(this));
}
(0, _EComponent.inheritEZUIClass)(ETableInput, _EComponent["default"]);
ETableInput.prototype.tag = 'TableInput';
ETableInput.prototype.menuIcon = 'span.mdi.mdi-table-edit';
ETableInput.prototype.attributes.width = 'auto';
ETableInput.prototype.attributes.height = 'auto';
ETableInput.prototype.attributes.appearance = 'sheet';
ETableInput.prototype.attributes.extendCommands = [];
ETableInput.prototype.render = function () {
  this.domElt = this.ctnElt;
};
ETableInput.prototype.focusIncompleteCell = function () {
  if (this._incompleteCell) this.editor.focusIncompleteCell();
};
ETableInput.prototype.onStart = function () {
  this.updateFormSource();
};
ETableInput.prototype.updateFormSource = function () {};

/***
 *
 * @return {FmVerifyInfo}
 */
ETableInput.prototype.verify = function () {
  /***
   *
   * @type {FmVerifyInfo}
   */
  var result = {
    comp: this,
    completed: true
  };
  if (this.editor.tableData) {
    this._incompleteCell = this.editor.tableData.findFirsIncompleteCell();
    if (this._incompleteCell) {
      result.completed = false;
      result.incompleteCell = this._incompleteCell;
      this.pinFire('incomplete');
    } else {}
  }
  return result;
};
ETableInput.prototype.attributeHandlers.maxHeight = {
  set: function set(value) {
    if (!(value > 0 && value < Infinity)) value = null;
    if (value) {
      this.domElt.addStyle('max-height', value + 'px');
    } else {
      this.domElt.removeStyle('max-height');
    }
    return value;
  },
  "export": function _export() {
    var ref = arguments[arguments.length - 1];
    var value = ref.get();
    if (value) return value;
    return undefined;
  },
  descriptor: {
    type: 'LengthInPixel'
  }
};
ETableInput.prototype.attributeHandlers.propertyNames = {
  set: function set(value) {
    this._dataFlushed = false;
    this._requestUpdateContent();
    return value;
  },
  descriptor: {
    type: 'object',
    hidden: true
  }
};
ETableInput.prototype.attributeHandlers.propertyDescriptors = {
  set: function set(value) {
    this._dataFlushed = false;
    this._requestUpdateContent();
    return value;
  },
  descriptor: {
    type: 'object',
    hidden: true
  }
};
ETableInput.prototype.attributeHandlers.formSource = {
  /**
   * @this ETableInput
   * @param value
   * @param ref
   * @returns {string}
   */
  set: function set(value, ref) {
    if (typeof value === 'number') value = value + '';else if (typeof value === 'string') value = value.trim();else if (value && _typeof(value) === 'object' && value.layout) {
      //is form
      value = '=' + (0, _generator.generateJSVariable)(value);
    } else value = '';
    ref.set(value);
    if (this.state === "RUNNING") this.updateFormSource();
    return value;
  },
  get: function get(ref) {
    return ref.get() || '';
  },
  "export": function _export(ref) {
    var value = ref.get();
    return value || undefined;
  },
  descriptor: {
    type: 'string',
    sign: 'formSource'
  }
};
ETableInput.prototype.attributeHandlers.config = {
  set: function set(value) {
    this._dataFlushed = false;
    this._requestUpdateContent();
    return value;
  },
  get: function get() {
    var ref = arguments[arguments.length - 1];
    if (this._dataFlushed && this.editor.tableData) {
      return this.editor.tableData.config;
    } else {
      return ref.get();
    }
  },
  "export": function _export() {
    return Object.assign({}, this.attributes.config);
  }
};
ETableInput.prototype.attributeHandlers.records = {
  set: function set(value) {
    value = value || [];
    this._dataFlushed = false;
    this._requestUpdateContent();
    return value;
  },
  get: function get() {
    var ref = arguments[arguments.length - 1];
    if (this.attributes.appearance !== 'form' && this._dataFlushed && this.editor.tableData && this.editor.tableData["export"]) {
      return this.editor.tableData["export"]().records;
    } else {
      return ref.get();
    }
  }
};
ETableInput.prototype.pinHandlers.records = {
  receives: function receives(value) {
    this.attributes.records = value;
  },
  get: function get() {
    return this.attributes.records;
  },
  descriptor: {
    type: 'object[]'
  }
};
ETableInput.prototype.pinHandlers.verify = {
  /***
   * @this ETableInput
   * @param value
   */
  receives: function receives(value) {
    if (value) this.verify();
  },
  descriptor: {
    type: 'bool'
  }
};
ETableInput.prototype.pinHandlers.incomplete = {
  get: function get() {
    return this._incompleteCell;
  },
  descriptor: {
    type: 'bool'
  }
};
ETableInput.prototype.pinHandlers.focusIncompleteCell = {
  /***
   * @this ETableInput
   * @param value
   */
  receives: function receives(value) {
    if (value) {
      this.editor.focusIncompleteCell();
    }
  },
  descriptor: {
    type: 'bool'
  }
};
ETableInput.prototype.attributeHandlers.readOnly = {
  set: function set(value) {
    this.editor.opt.readOnly = !!value;
  },
  get: function get() {
    return this.editor.opt.readOnly;
  },
  "export": function _export() {
    return this.editor.opt.readOnly ? true : undefined;
  },
  descriptor: {
    type: 'bool'
  }
};
ETableInput.prototype.attributeHandlers.headless = {
  set: function set(value) {
    this.editor.opt.headless = !!value;
  },
  get: function get() {
    return this.editor.opt.headless;
  },
  "export": function _export() {
    return this.editor.opt.headless ? true : undefined;
  },
  descriptor: {
    type: 'bool'
  }
};
ETableInput.prototype.attributeHandlers.disabled = {
  set: function set(value) {
    this.editor.opt.readOnly = !!value;
  },
  get: function get() {
    return this.editor.opt.readOnly;
  },
  "export": function _export() {
    return this.editor.opt.readOnly ? true : undefined;
  },
  descriptor: {
    type: 'bool',
    hidden: true
  }
};
ETableInput.prototype.attributeHandlers.appearance = {
  set: function set(value, ref) {
    if (['sheet', 'form'].indexOf(value) < 0) value = 'sheet';
    if (value === ref.get()) return value;
    var data;
    if (this._dataFlushed) data = this.editor.getData();
    this.ctnElt.clearChild();
    if (value === 'sheet') {
      this.editor = new _TableEditor["default"]({
        elt: this.ctnElt
      });
    } else {
      this.editor = new _FormArrayEditor["default"]({
        elt: this.ctnElt
      });
    }
    this.editor.getView();
    if (!data) data = {
      records: []
    };
    if (this._dataFlushed && this.attributes.propertyDescriptors && this.attributes.propertyNames) {
      this.editor.setData(Object.assign({}, data, {
        propertyDescriptors: this.attributes.propertyDescriptors,
        propertyNames: this.attributes.propertyNames
      }));
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'sheet') value = undefined;
    return value;
  },
  descriptor: {
    type: 'enum',
    values: ['sheet', 'form']
  }
};
ETableInput.prototype.attributeHandlers.extendCommands = {
  /**
   * @this ETableInput
   * @param value
   */
  set: function set(value) {
    this.editor.opt.extendCommands = value || [];
  },
  get: function get() {
    return this.editor.opt.extendCommands || [];
  },
  "export": function _export() {
    var value = this.editor.opt.extendCommands || [];
    if (value.length === 0) return undefined;
    return value;
  },
  descriptor: {
    type: 'arrayOfText'
  }
};
ETableInput.prototype.onCreated = function () {};
ETableInput.prototype._verifyTableData = function () {
  if (!this.attributes.propertyNames || !(this.attributes.propertyNames instanceof Array) || !this.attributes.propertyDescriptors || !this.attributes.records || !this.attributes.records) return false;
  return true;
};
ETableInput.prototype._updateContent = function () {
  var config;
  if (this._verifyTableData()) {
    var prevRecords = this.editor.records;
    this.editor.fragment = this.fragment;
    config = Object.assign({}, this.attributes.config);
    config.rowHeight = this.attributes.rowHeight;
    this.editor.setData({
      propertyNames: this.attributes.propertyNames,
      propertyDescriptors: this.attributes.propertyDescriptors,
      records: this.attributes.records,
      config: config
    });
    this._dataFlushed = true;
    if (prevRecords !== this.editor.records) {
      this.pinFire('records');
      this.notifyChange();
    }
    _ResizeSystem["default"].updateUp(this.domElt);
  }
};
ETableInput.prototype._requestUpdateContent = function () {
  this.domSignal.emit('requestUpdateContent');
};
_EBuilder.EBuilderInstance.install(ETableInput);
var _default = ETableInput;
exports["default"] = _default;

/***/ }),

/***/ 37253:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _showdown = _interopRequireDefault(__webpack_require__(47127));
var _FCore = __webpack_require__(51518);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EBuilder = __webpack_require__(55813);
var _utils = __webpack_require__(49633);
var _datetime = __webpack_require__(58286);
var _EAbstractComponent = __webpack_require__(18662);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var showDownConverter = new _showdown["default"].Converter();

/***
 * @extends EComponent
 * @constructor
 */
function EText() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(EText, _EComponent["default"], _EAbstractComponent.AbstractText);
EText.prototype.tag = "Text";
EText.prototype.menuIcon = "span.mdi.mdi-format-color-text";
EText.prototype.attributes.fontStyle = 'Regular';
EText.prototype.attributeHandlers.value = {
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    var prev = ref.get();
    switch (this.attributes.textDecode) {
      case 'html':
        this.domElt.innerHTML = (value || '') + '';
        break;
      case 'markdown':
        this.domElt.innerHTML = showDownConverter.makeHtml((value || '') + '').trim().replace(/(^<p>)|(<\/p>$)/, '');
        break;
      case 'dd/MM/yyyy':
      case 'date':
        if (value instanceof Date) {
          this.domElt.clearChild().addChild((0, _FCore._)({
            text: (0, _datetime.formatDateTime)(value, 'dd/MM/yyyy')
          }));
        } else {
          this.domElt.clearChild().addChild((0, _FCore._)({
            text: (value || '') + ''
          }));
        }
        break;
      case 'dd/MM/yyyy hh:mm a':
      case 'date_time':
        if (value instanceof Date) {
          this.domElt.clearChild().addChild((0, _FCore._)({
            text: (0, _datetime.formatDateTime)(value, 'dd/MM/yyyy HH:mm')
          }));
        } else {
          this.domElt.clearChild().addChild((0, _FCore._)({
            text: (value || '') + ''
          }));
        }
        break;
      default:
        if (typeof value === "number") value = value + '';else if (typeof value === "boolean") value = value + '';else if (value instanceof Array) {
          value = JSON.stringify(value);
        } else if (value === undefined || value === null) {
          value = '';
        } else if (typeof value !== "string") {
          value = value + '';
        }
        this.domElt.clearChild().addChild((0, _FCore._)({
          text: (value || _utils.CHAR_ZWS) + ''
        }));
    }
    ref.set(value);
    if (this.domElt.childNodes.length === 1 && this.domElt.firstChild.nodeType === Node.TEXT_NODE && this.domElt.firstChild.data === '') {
      this.domElt.addClass('as-empty');
    } else {
      this.domElt.removeClass('as-empty');
    }
    if (prev !== value) {
      this.pinFire('text');
      this.pinFire('value');
      this.notifyChange();
    }
    return value;
  },
  descriptor: {
    type: "text",
    "long": true,
    sign: "HyperText"
  }
};
EText.prototype.attributeHandlers.textDecode = {
  set: function set(value) {
    // if (['none', 'markdown', 'html'].indexOf(value) < 0) value = 'none';
    var ref = arguments[arguments.length - 1];
    var currentValue = ref.get();
    if (currentValue !== value) {
      this.domElt.removeClass('as-decode-' + currentValue);
      this.domElt.addClass('as-decode-' + value);
      ref.set(value);
      this.attributes['text'] = this.attributes.text;
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get() || 'none';
    if (value === 'none') return undefined;
    return value;
  },
  descriptor: {
    type: "enum",
    values: ['none', 'markdown', 'html', 'date', 'date_time'],
    sign: 'TextDecode'
  }
};
EText.prototype.attributeHandlers.placeHolder = {
  set: function set(value) {
    if (typeof value === "string" && value.length > 0 || typeof value === 'number') {
      this.domElt.attr('data-place-holder', value + '');
    } else {
      this.domElt.attr('data-place-holder', undefined);
    }
  },
  get: function get() {
    return this.domElt.attr('data-place-holder') || '';
  },
  "export": function _export() {
    return this.attributes.placeHolder || undefined;
  },
  descriptor: {
    type: "text",
    "long": true,
    sign: "placeHolder"
  }
};
EText.prototype.attributes.padding = {
  set: function set(value) {
    this.domElt.addStyle('padding', value);
    return value;
  },
  descriptor: {
    type: "text"
  }
};
EText.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.text;
  },
  descriptor: {
    type: 'text',
    "long": true
  }
};
EText.prototype.attributes.textDecode = 'none';
EText.prototype.attributes.textAlign = 'left';
EText.prototype.attributes.textColor = 'black';
EText.prototype.attributes.font = 'unset';
EText.prototype.attributeHandlers.border = {
  set: function set(value) {
    this.domElt.style.border = value;
    return value;
  },
  get: function get(ref) {
    var value = ref.get();
    value = value || '';
    return value;
  },
  descriptor: {
    type: 'text'
  }
};
EText.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": ['absol-bscroller', 'ez-text', 'cke_contents_ltr'],
    child: {
      text: ''
    }
  });
};
_EBuilder.EBuilderInstance.install(EText);
var _default = EText;
exports["default"] = _default;

/***/ }),

/***/ 22932:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _ETextInput = _interopRequireDefault(__webpack_require__(87570));
var _EComponent = __webpack_require__(89168);
var _EBuilder = __webpack_require__(55813);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ETextInput
 * @constructor
 */
function ETextArea() {
  _ETextInput["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ETextArea, _ETextInput["default"]);
ETextArea.prototype.tag = "TextArea";
ETextArea.prototype.menuIcon = "span.mdi.mdi-form-textarea";
ETextArea.prototype.attributes.width = 400;
ETextArea.prototype.attributes.height = 80;
ETextArea.prototype.render = function () {
  return (0, _FCore._)('textarea2.absol-bscroller.ez-text-area');
};
ETextArea.prototype.attributeHandlers.value.descriptor = {
  type: "text",
  "long": true,
  sign: "SimpleTextLong"
};
ETextArea.prototype.attributeHandlers.placeHolder.descriptor = {
  type: "text",
  "long": true,
  sign: "SimpleTextLong"
};
delete ETextArea.prototype.attributeHandlers.textType;
_EBuilder.EBuilderInstance.install(ETextArea);
var _default = ETextArea;
exports["default"] = _default;

/***/ }),

/***/ 87570:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EBuilder = __webpack_require__(55813);
var _FCore = __webpack_require__(51518);
var _EAbstractComponent = __webpack_require__(18662);
var _Text = _interopRequireDefault(__webpack_require__(36685));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function ETextInput() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ETextInput, _EComponent["default"], _EAbstractComponent.AbstractInput, _EAbstractComponent.AbstractText);
ETextInput.prototype.tag = 'TextInput';
ETextInput.prototype.menuIcon = "span.mdi.mdi-form-textbox";
ETextInput.prototype.attributes.height = 30;
ETextInput.prototype.attributes.width = 200;
ETextInput.prototype.attributes.required = false;
ETextInput.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)({
    tag: 'input',
    "class": ['ez-text-input', 'as-text-input'],
    attr: {
      type: 'text'
    },
    on: {
      keyup: function keyup(event) {
        _this.updateError();
        _this.notifyChange(event);
      }
    }
  });
};
ETextInput.prototype.validate = function () {
  var value = this.domElt.value.trim();
  if (this.attributes.required && value.length === 0) {
    return false;
  }
  switch (this.attributes.purpose) {
    case 'email':
      value = value.trim();
      if (!/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(value)) {
        return false;
      }
      break;
    case 'tel':
      value = value.trim();
      if (!/^\+?[0-9\s\-()]+$/.test(value)) {
        return false;
      }
      break;
    case 'url':
      value = value.trim();
      if (!/^(https?:\/\/)?([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?$/.test(value)) {
        return false;
      }
      break;
  }
  return true;
};
ETextInput.prototype.updateError = function () {
  if (this.validate()) {
    this.domElt.removeClass('as-error');
  } else {
    this.domElt.addClass('as-error');
  }
};
ETextInput.prototype.focus = function () {
  this.domElt.focus();
};
ETextInput.prototype.attributeHandlers.placeHolder = {
  set: function set(value) {
    if (value === undefined || value === null) {
      value = '';
    } else value = value + '';
    this.domElt.attr('placeholder', value);
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    return value || undefined;
  },
  descriptor: {
    type: 'string'
  }
};
ETextInput.prototype.attributeHandlers.value = {
  set: function set(value) {
    if (value === undefined || value === null) {
      value = '';
    } else value = value + '';
    this.domElt.value = value;
    if (value.length > 0) this.updateError();
  },
  get: function get() {
    var value = this.domElt.value;
    if (!this.validate()) return '';
    return this.domElt.value;
  },
  "export": function _export() {
    return this.domElt.value || '';
  },
  descriptor: {
    type: 'string'
  }
};
ETextInput.prototype.attributeHandlers.purpose = {
  set: function set(value, ref) {
    if (['text', 'email', 'password', 'tel', 'url'].indexOf(value) < 0) value = 'text';
    ref.set(value);
    if (this.domElt.value.length > 0) this.updateError();
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'text') return undefined;
    return value;
  },
  descriptor: {
    type: 'enum',
    values: ['text', 'email', 'password', 'tel', 'url'],
    sign: 'InputPurpose'
  }
};
ETextInput.prototype.attributeHandlers.required = {
  set: function set(value) {
    value = !!value;
    return value;
  },
  get: function get(ref) {
    return ref.get() || false;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  },
  descriptor: {
    type: 'boolean',
    sign: 'required'
  }
};
_EBuilder.EBuilderInstance.install(ETextInput);
var _default = ETextInput;
exports["default"] = _default;

/***/ }),

/***/ 35400:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _datetime = __webpack_require__(58286);
var _EBuilder = __webpack_require__(55813);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends EComponent
 * @constructor
 */
function ETime24Input() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ETime24Input, _EComponent["default"], _EAbstractComponent.AbstractInput);
ETime24Input.prototype.tag = "Time24Input";
ETime24Input.prototype.menuIcon = "span.mdi.mdi-clock-end";
ETime24Input.prototype.attributes.width = 160;
ETime24Input.prototype.attributes.height = 30;
ETime24Input.prototype.attributes.value = null;
ETime24Input.prototype.attributes.format = 'HH:mm';
ETime24Input.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    this.domElt.value = value;
    if (this.domElt.value !== prev) {
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'number',
    min: 0,
    max: _datetime.MILLIS_PER_DAY - 1
  }
};
ETime24Input.prototype.attributeHandlers.offset = {
  set: function set(value) {
    this.domElt.dayOffset = value;
  },
  get: function get() {
    return this.domElt.dayOffset;
  },
  descriptor: {
    type: 'number',
    min: 0,
    max: _datetime.MILLIS_PER_DAY - 1
  }
};
ETime24Input.prototype.attributeHandlers.format = {
  set: function set(value) {
    this.domElt.format = value;
  },
  get: function get() {
    return this.domElt.format;
  },
  "export": function _export() {
    if (this.domElt.format === 'HH:mm') return undefined;
    return this.domElt.format;
  },
  descriptor: {
    type: 'enum',
    values: ['hh:mm a', 'HH:mm']
  }
};
ETime24Input.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.attributes.value;
  },
  descriptor: {
    type: 'number'
  }
};
ETime24Input.prototype.pinHandlers.offset = {
  receives: function receives(value) {
    this.attributes.offset = value;
  },
  descriptor: {
    type: 'number'
  }
};
ETime24Input.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)('time24input.ez-time-24-input');
  this.domElt.on('change', function (event) {
    _this.notifyChange(event);
  });
};
_EBuilder.EBuilderInstance.install(ETime24Input);
var _default = ETime24Input;
exports["default"] = _default;

/***/ }),

/***/ 20287:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _datetime = __webpack_require__(58286);
var _EAbstractComponent = __webpack_require__(18662);
var _EBuilder = __webpack_require__(55813);
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends EComponent
 * @constructor
 */
function ETimeRange24Input() {
  _EComponent["default"].apply(this, arguments);
}
(0, _EComponent.inheritEZUIClass)(ETimeRange24Input, _EComponent["default"], _EAbstractComponent.AbstractInput);
ETimeRange24Input.prototype.tag = 'TimeRange24Input';
ETimeRange24Input.prototype.menuIcon = 'span.mdi.mdi-timelapse';
ETimeRange24Input.prototype.attributes.height = 30;
ETimeRange24Input.prototype.attributes.width = 'auto';
ETimeRange24Input.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)('timerange24input');
  this.domElt.on('change', function (event) {
    if (_this.pinHandlers[event.property]) _this.pinFire(event.property);
    _this.notifyChange(event);
  });
};
ETimeRange24Input.prototype.attributeHandlers.dayOffset = {
  set: function set(value) {
    var prev = this.domElt.dayOffset;
    this.domElt.dayOffset = value;
    if (prev !== this.domElt.dayOffset) {
      this.pinFire('dayOffset');
      this.pinFire('value');
    }
  },
  get: function get() {
    return this.domElt.dayOffset;
  },
  descriptor: {
    type: 'number',
    min: 0,
    max: _datetime.MILLIS_PER_DAY
  }
};
ETimeRange24Input.prototype.attributeHandlers.duration = {
  set: function set(value) {
    var prev = this.domElt.duration;
    this.domElt.duration = value;
    if (prev !== this.domElt.duration) {
      this.pinFire('duration');
      this.pinFire('value');
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.duration;
  },
  descriptor: {
    type: 'number',
    min: 0,
    max: _datetime.MILLIS_PER_DAY
  }
};
ETimeRange24Input.prototype.attributeHandlers.notNull = {
  set: function set(value) {
    this.domElt.notNull = !!value;
  },
  get: function get() {
    return this.domElt.notNull;
  },
  "export": function _export() {
    if (this.domElt.notNull) return undefined;
    return this.domElt.notNull;
  },
  descriptor: {
    type: 'bool'
  }
};
ETimeRange24Input.prototype.pinHandlers.duration = {
  get: function get() {
    return this.attributes.duration;
  },
  receives: function receives(value) {
    this.attributes.duration = value;
  },
  descriptor: {
    type: 'number'
  }
};
ETimeRange24Input.prototype.pinHandlers.dayOffset = {
  get: function get() {
    return this.attributes.dayOffset;
  },
  receives: function receives(value) {
    this.attributes.dayOffset = value;
  },
  descriptor: {
    type: 'number'
  }
};
ETimeRange24Input.prototype.pinHandlers.value = {
  get: function get() {
    return {
      dayOffset: this.attributes.dayOffset,
      duration: this.attributes.duration
    };
  },
  receives: function receives(value) {
    value = value || {};
    if ('dayOffset' in value) {
      this.attributes.dayOffset = value.dayOffset;
    }
    if ('duration' in value) {
      this.attributes.duration = value.duration;
    }
  },
  descriptor: {
    type: 'object'
  }
};

//mock attribute
['minStart', 'maxStart', 'minEnd', 'maxEnd', 'minDuration', 'maxDuration'].forEach(function (name) {
  ETimeRange24Input.prototype.attributeHandlers[name] = {
    descriptor: {
      type: 'number'
    }
  };
  ETimeRange24Input.prototype.pinHandlers[name] = {
    receives: function receives(value) {
      this.attributes[name] = value;
    }
  };
});
_EBuilder.EBuilderInstance.install(ETimeRange24Input);
var _default = ETimeRange24Input;
exports["default"] = _default;

/***/ }),

/***/ 22611:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _EBuilder = __webpack_require__(55813);
var _FCore = __webpack_require__(51518);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/**
 * @augments AbstractInput
 * @extends EComponent
 * @constructor
 */
function ETrackBar() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ETrackBar, _EComponent["default"], _EAbstractComponent.AbstractInput);
ETrackBar.prototype.tag = 'TrackBar';
ETrackBar.prototype.menuIcon = 'span.mdi.mdi-source-commit.mdi-rotate-90';
ETrackBar.prototype.attributes.height = 30;
ETrackBar.prototype.attributes.width = 200;
ETrackBar.prototype.attributeHandlers.value = {
  set: function set(value) {
    var prev = this.domElt.value;
    this.domElt.value = value;
    value = this.domElt.value;
    if (_typeof(this.domElt.value) !== _typeof(prev) || Math.abs(prev - value) > 0.0001) {
      this.notifyChange();
    }
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'number',
    max: 1,
    min: 0,
    floatFixed: 2
  }
};
ETrackBar.prototype.pinHandlers.value = {
  receives: function receives(value) {
    this.attributes.value = value;
  },
  get: function get() {
    return this.domElt.value;
  },
  descriptor: {
    type: 'number',
    max: 1,
    min: 0,
    floatFixed: 2
  }
};
ETrackBar.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)('trackbar.ez-track-bar');
  this.domElt.on('change', function (event) {
    _this.notifyChange(event);
  });
};
_EBuilder.EBuilderInstance.install(ETrackBar);
var _default = ETrackBar;
exports["default"] = _default;

/***/ }),

/***/ 10460:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = __webpack_require__(89168);
var _EBuilder = __webpack_require__(55813);
var _ETrackBar = _interopRequireDefault(__webpack_require__(22611));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _TrackBarInput = _interopRequireDefault(__webpack_require__(49748));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends ETrackBar
 * @constructor
 */
function ETrackBarInput() {
  _ETrackBar["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ETrackBarInput, _ETrackBar["default"]);
ETrackBarInput.prototype.tag = 'TrackBarInput';
ETrackBarInput.prototype.menuIcon = 'span.mdi.mdi-source-commit.mdi-rotate-90';
ETrackBarInput.prototype.attributes.floatFixed = 2;
ETrackBarInput.prototype.render = function () {
  /**
   * @type {TrackBarInput}
   */
  this.domElt = (0, _FCore._)(_TrackBarInput["default"].tag + '.ez-track-bar-input');
  this.domElt.on('change', function (event) {
    this.notifyChange(event);
  }.bind(this));
};
ETrackBarInput.prototype.attributeHandlers.value.descriptor = function () {
  return {
    type: 'number',
    max: this.domElt.rightValue,
    min: this.domElt.leftValue,
    floatFixed: 2,
    dependency: ['leftValue', 'rightValue']
  };
};
ETrackBarInput.prototype.attributeHandlers.leftValue = {
  set: function set(value) {
    this.domElt.leftValue = value;
  },
  get: function get() {
    return this.domElt.leftValue;
  },
  descriptor: function descriptor() {
    return {
      type: 'number',
      max: this.domElt.rightValue,
      floatFixed: 2,
      dependency: ['rightValue', 'value']
    };
  }
};
ETrackBarInput.prototype.attributeHandlers.rightValue = {
  set: function set(value) {
    this.domElt.rightValue = value;
  },
  get: function get() {
    return this.domElt.rightValue;
  },
  descriptor: function descriptor() {
    return {
      type: 'number',
      min: this.domElt.leftValue,
      floatFixed: 2,
      dependency: ['leftValue', 'value']
    };
  }
};
ETrackBarInput.prototype.attributeHandlers.unit = {
  set: function set(value) {
    this.domElt.unit = value;
  },
  get: function get() {
    return this.domElt.unit;
  },
  descriptor: function descriptor() {
    return {
      type: 'text'
    };
  }
};
ETrackBarInput.prototype.attributeHandlers.floatFixed = {
  set: function set(value) {
    if (value === 'auto') value = null;
    this.domElt.valueFixed = value;
  },
  get: function get() {
    return this.domElt.valueFixed;
  },
  "export": function _export() {
    var value = this.domElt.valueFixed;
    if (value === this.constructor.prototype.attributes.floatFixed) value = undefined;
    if (value === null) value = 'auto';
    return value;
  },
  descriptor: {
    type: "enum",
    values: ['auto', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
  }
};
ETrackBarInput.prototype.pinHandlers.value = Object.assign({}, _ETrackBar["default"].prototype.pinHandlers.value, {
  descriptor: function descriptor() {
    return {
      type: 'number',
      max: this.domElt.rightValue,
      min: this.domElt.leftValue,
      floatFixed: 2
    };
  }
});
_EBuilder.EBuilderInstance.install(ETrackBarInput);
var _default = ETrackBarInput;
exports["default"] = _default;

/***/ }),

/***/ 68277:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _EBuilder = __webpack_require__(55813);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @augments AbstractSelectMenu
 * @augments AbstractUnion
 * @extends EComponent
 * @constructor
 */
function ETreeComboBox() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ETreeComboBox, _EComponent["default"], _EAbstractComponent.AbstractSelectMenu, _EAbstractComponent.AbstractUnion);
ETreeComboBox.prototype.tag = "TreeComboBox";
ETreeComboBox.prototype.menuIcon = ['<svg style="width:22px;height:22px" viewBox="0 0 24 24" width="24" height="24">', '<g transform="scale(0.5, 0.5) translate(10, 10)">', '<path fill="currentColor" d="M3,3H9V7H3V3M15,10H21V14H15V10M15,17H21V21H15V17M13,13H7V18H13V20H7L5,20V9H7V11H13V13Z" />', '</g>', '<path fill="currentColor" d="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4" />', '</svg>'].join('\n');
ETreeComboBox.prototype.attributes.height = 30;
ETreeComboBox.prototype.attributes.width = 200;
ETreeComboBox.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)('selecttreemenu.ez-tree-combo-box');
  this.domElt.on('change', function (event) {
    _this.notifyChange(event);
  });
};
ETreeComboBox.prototype.onStart = function () {
  this.computeItems();
};
_EBuilder.EBuilderInstance.install(ETreeComboBox);
var _default = ETreeComboBox;
exports["default"] = _default;

/***/ }),

/***/ 70723:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EComponent = _interopRequireWildcard(__webpack_require__(89168));
var _EAbstractComponent = __webpack_require__(18662);
var _FCore = __webpack_require__(51518);
var _SelectTreeLeafMenu = _interopRequireDefault(__webpack_require__(66138));
var _EBuilder = __webpack_require__(55813);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @augments AbstractUnion
 * @augments AbstractSelectMenu
 * @extends EComponent
 * @constructor
 */
function ETreeLeafComboBox() {
  _EComponent["default"].call(this);
}
(0, _EComponent.inheritEZUIClass)(ETreeLeafComboBox, _EComponent["default"], _EAbstractComponent.AbstractUnion, _EAbstractComponent.AbstractSelectMenu);
ETreeLeafComboBox.prototype.tag = "TreeLeafComboBox";
ETreeLeafComboBox.prototype.menuIcon = ['<svg style="width:22px;height:22px" viewBox="0 0 24 24" width="24" height="24">', '<g transform="scale(0.5, 0.5) translate(10, 10)">', '<path fill="currentColor" d="M3,3H9V7H3V3M15,10H21V14H15V10M15,17H21V21H15V17M13,13H7V18H13V20H7L5,20V9H7V11H13V13Z" />', '</g>', '<path fill="currentColor" d="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4" />', '</svg>'].join('\n');
ETreeLeafComboBox.prototype.attributes.width = 200;
ETreeLeafComboBox.prototype.attributes.height = 30;
ETreeLeafComboBox.prototype.render = function () {
  var _this = this;
  this.domElt = (0, _FCore._)(_SelectTreeLeafMenu["default"].tag).addClass('ez-tree-leaf-combo-box');
  this.domElt.on('change', function () {
    _this.notifyUnion();
    _this.notifyChange();
  });
};
ETreeLeafComboBox.prototype.onStart = function () {
  this.computeItems();
};
_EBuilder.EBuilderInstance.install(ETreeLeafComboBox);
var _default = ETreeLeafComboBox;
exports["default"] = _default;

/***/ }),

/***/ 53199:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = __webpack_require__(38608);
var _BlockEditor = _interopRequireDefault(__webpack_require__(46228));
var _EBEFunction = _interopRequireDefault(__webpack_require__(1996));
var _EBuilder = __webpack_require__(55813);
var _EBlock = _interopRequireDefault(__webpack_require__(19905));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends BlockEditor
 * @constructor
 */
function EBlockEditor() {
  _BlockEditor["default"].call(this);
}
(0, _OOP.mixClass)(EBlockEditor, _BlockEditor["default"]);
EBlockEditor.prototype.getBlockEditorClasses = function () {
  return [_EBEFunction["default"]];
};
EBlockEditor.prototype.getBlockClassByTag = function (tag) {
  return _EBuilder.EBuilderInstance.ComponentClasses[tag] || _EBlock["default"];
};
EBlockEditor.prototype.getCmdGroupTree = function () {
  var tree = _BlockEditor["default"].prototype.getCmdGroupTree.call(this);
  tree.children[0].children[0].children = tree.children[0].children[0].children.slice();
  tree.children[0].children[0].children[0] = 'runTest';
  return tree;
};
var _default = EBlockEditor;
exports["default"] = _default;

/***/ }),

/***/ 85862:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CircuitDiagramEditor = _interopRequireDefault(__webpack_require__(65748));
var _OOP = __webpack_require__(38608);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends CircuitDiagramEditor
 * @constructor
 */
function ECircuitDiagramEditor() {
  _CircuitDiagramEditor["default"].apply(this, arguments);
}
(0, _OOP.mixClass)(ECircuitDiagramEditor, _CircuitDiagramEditor["default"]);
ECircuitDiagramEditor.prototype.getCmdGroupTree = function () {
  var res = _CircuitDiagramEditor["default"].prototype.getCmdGroupTree.apply(this, arguments);
  res.children[0].children[0].children = res.children[0].children[0].children.slice();
  res.children[0].children[0].children[0] = 'runTest';
  return res;
};
var _default = ECircuitDiagramEditor;
exports["default"] = _default;

/***/ }),

/***/ 23988:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SelectEComponentTypeDialog = __webpack_require__(96820);
var _EBuilder = __webpack_require__(55813);
var _R = _interopRequireDefault(__webpack_require__(25280));
var _PluginManager = _interopRequireDefault(__webpack_require__(19617));
var _Constants = __webpack_require__(92311);
var _FormPreview = __webpack_require__(31642);
var _EZTestRunner = _interopRequireWildcard(__webpack_require__(4699));
var _FileSaver = __webpack_require__(53069);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var EECmd = {};

/**
 * @this {EZUIEditor}
 */
EECmd.save = function () {
  var task = this.getContext(_R["default"].TASK);
  var data = this.getData();
  var formTask = this.getContext(_R["default"].EZ_FORM_TASK);
  var id = task.bundle.contentArguments.id;
  this.dataModel.saveForm({
    id: id,
    ver: task.bundle.contentArguments.ver,
    content: data
  }).then(function () {
    console.log('Save', task.bundle);
  });
  // // console.log(data);
  // task.modified = false;
};

/**
 * @this {EZUIEditor}
 */
EECmd.runTest = function () {
  /**
   * @type {FLauncher}
   */
  var launcher = this.getContext(_R["default"].LAUNCHER);
  var task = this.getContext(_R["default"].TASK);
  var bundle = {
    id: task.bundle.id + '_preview',
    name: task.bundle.name + '(Preview)'
  };
  var previewTask = launcher.getTaskById(bundle.id) || launcher.newTask(_EZTestRunner.EZTestRunnerTask, bundle);
  previewTask.requestActive();
  previewTask.mainFragment.setData(this.getData());
};
EECmd.export2Json = function () {
  var task = this.getContext(_R["default"].TASK);
  var data = this.getData();
  var name = task.bundle.name + '.json';
  var text = JSON.stringify(data, null, 4);
  (0, _FileSaver.saveTextAs)(text, name);
};
var _default = EECmd;
exports["default"] = _default;

/***/ }),

/***/ 12370:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.ELECmdTree = void 0;
var _SelectEComponentTypeDialog = __webpack_require__(96820);
var _EBuilder = __webpack_require__(55813);
var _R = _interopRequireDefault(__webpack_require__(25280));
var _PluginManager = _interopRequireDefault(__webpack_require__(19617));
var _Constants = __webpack_require__(92311);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var ELECmd = {};
['save', 'runTest', 'export2Json'].forEach(function (name) {
  /**
   * @this {EZLayoutEditor}
   */
  ELECmd[name] = function () {
    if (this.flexFormEditor) {
      var _this$flexFormEditor;
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      return (_this$flexFormEditor = this.flexFormEditor).execCmd.apply(_this$flexFormEditor, [name].concat(args));
    }
  };
});

/**
 * @this {EZLayoutEditor}
 */
ELECmd.addComponent = function () {
  var _this = this;
  (0, _SelectEComponentTypeDialog.openSelectEComponentTypeDialog)().then(function (result) {
    if (!result) return;
    var components = _this.selectCtrl.components;
    var focusComp = components[components.length - 1];
    var container = _this.selectCtrl.container || _this.rootLayout;
    if (!container) return;
    var nameDict = {};
    var visit = function visit(nd) {
      nameDict[nd.attributes.name] = true;
      if (nd.children) {
        for (var i = 0; i < nd.children.length; i++) {
          visit(nd.children[i]);
        }
      }
    };
    visit(_this.rootLayout);
    var count = 1;
    var tag = result.prototype.tag;
    while (nameDict[tag + '_' + count]) {
      count++;
    }
    var newComp = _EBuilder.EBuilderInstance.inflate({
      tag: tag
    });
    newComp.attributes.name = tag + '_' + count;
    var descriptor = newComp.attributes.getPropertyDescriptor('text');
    if (descriptor && descriptor.type === 'string') {
      newComp.attributes.text = newComp.attributes.name;
    }
    descriptor = newComp.attributes.getPropertyDescriptor('value');
    if (descriptor && descriptor.type === 'string') {
      newComp.attributes.value = newComp.attributes.name;
    }
    if (focusComp && focusComp.parent === container) {
      container.addChildAfter(newComp, focusComp);
    } else {
      container.addChild(newComp);
    }
    _this.selectCtrl.select(newComp);
    _this.outlineDelegate.notifyTreeChange();
  });
};
/**
 * @this {EZLayoutEditor}
 */
ELECmd.moveOrderToFirst = function () {
  var container = this.selectCtrl.container;
  if (!container) return;
  var components = this.selectCtrl.components.slice();
  if (components.length === 0) return;
  var comp;
  for (var i = components.length - 1; i >= 0; --i) {
    comp = components[i];
    comp.remove();
    container.addChildAfter(comp, null);
  }
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
};

/**
 * @this {EZLayoutEditor}
 */
ELECmd.moveOrderToLast = function () {
  var container = this.selectCtrl.container;
  if (!container) return;
  var components = this.selectCtrl.components.slice();
  if (components.length === 0) return;
  var comp;
  for (var i = 0; i < components.length; ++i) {
    comp = components[i];
    comp.remove();
    container.addChild(comp);
  }
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
};
ELECmd.moveOrderToPrevious = function () {
  var container = this.selectCtrl.container;
  if (!container) return;
  var components = this.selectCtrl.components.slice();
  if (components.length === 0) return;
  var minIdx = components.reduce(function (ac, cr) {
    return Math.min(ac, container.children.indexOf(cr));
  }, Infinity);
  if (minIdx <= 0) return;
  var bf = container.children[minIdx - 1];
  var comp;
  for (var i = 0; i < components.length; i++) {
    comp = components[i];
    comp.remove();
    container.addChildBefore(comp, bf);
  }
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
};

/**
 * @this {EZLayoutEditor}
 */
ELECmd.moveOrderToNext = function () {
  var container = this.selectCtrl.container;
  if (!container) return;
  var components = this.selectCtrl.components.slice();
  if (components.length === 0) return;
  var maxIdx = components.reduce(function (ac, cr) {
    return Math.max(ac, container.children.indexOf(cr));
  }, -Infinity);
  if (maxIdx < 0) return;
  if (maxIdx >= container.children.length - 1) return;
  var at = container.children[maxIdx + 1];
  var comp;
  for (var i = components.length - 1; i >= 0; i--) {
    comp = components[i];
    comp.remove();
    container.addChildAfter(comp, at);
  }
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
};

/**
 * @this {EZLayoutEditor}
 */
ELECmd["delete"] = function () {
  var components = this.selectCtrl.components.slice();
  this.selectCtrl.deselectAll();
  for (var i = 0; i < components.length; i++) {
    var comp = components[i];
    if (comp.parent) {
      comp.parent.removeChild(comp);
    }
  }
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
};
var _default = ELECmd;
exports["default"] = _default;
var ELECmdTree = {
  type: 'tab_list',
  children: [{
    type: 'tab',
    name: 'Home',
    children: [{
      type: 'group_x2',
      children: ['runTest']
    }, {
      type: 'group_x2',
      children: ['save', 'saveAs', 'saveAsSystem']
    }, {
      type: 'group_x2',
      children: ['undo', 'redo', 'toggleHistory']
    }, {
      type: 'group_x2',
      children: ['cut', 'copy', 'paste', 'delete']
    }]
  }, {
    type: 'tab',
    name: 'Edit',
    children: [{
      type: 'group_x2',
      children: ['addComponent']
    }, {
      type: 'group_x2',
      children: ['pageSetting', 'editRootLayout', 'selectAll', 'setSelectMode']
    }, {
      type: 'group_x2',
      children: ['moveOrderToFirst', 'moveOrderToPrevious', 'moveOrderToNext', 'moveOrderToLast']
    }]
  }, {
    type: 'tab',
    name: 'Data',
    children: [{
      type: 'group_x2',
      children: ['importFromJson', 'export2Json', 'export2sharpEncode', 'export2clipboard']
    }]
  }, {
    type: 'tab',
    name: 'Layout & Format'
  }]
};
exports.ELECmdTree = ELECmdTree;

/***/ }),

/***/ 35034:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function EZEDataModel() {}

/**
 *
 * @returns {EZFormMeta[]|Promise<EZFormMeta[]>}
 */
EZEDataModel.prototype.getFormMetas = function (formTask) {
  return [];
};

/**
 *
 * @returns {[]|Promise<[]>}
 */
EZEDataModel.prototype.getTypeLists = function () {
  return [];
};

/**
 *
 * @param {{task: string, name: string, sourceData: object}} params
 * @returns {Promise}
 */
EZEDataModel.prototype.saveForm = function (params) {};

/**
 *
 * @param {number[]} idArr
 * @returns {Promise<{error?:string, result?:object}>}
 */
EZEDataModel.prototype.loadForms = function (idArr) {};
var _default = EZEDataModel;
/**
 * @typedef {Object} EZFormMeta
 * @property {any} id
 * @property {string} name
 * @property {any} [typeid]
 * @property {string} [descendantids]
 *
 */
exports["default"] = _default;

/***/ }),

/***/ 21680:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FExplorer = _interopRequireDefault(__webpack_require__(78377));
var _OOP = __webpack_require__(38608);
var _FCore = __webpack_require__(51518);
var _CMDTool = _interopRequireWildcard(__webpack_require__(97847));
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _ExpTree = __webpack_require__(87326);
var _R = _interopRequireDefault(__webpack_require__(25280));
var _NewEZFormDialog = __webpack_require__(75750);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FExplorer
 * @constructor
 */
function EZEExplorer() {
  _CMDTool.CMDToolDelegate.call(this);
  _FExplorer["default"].apply(this, arguments);
  this.cmdTool = new _CMDTool["default"]();
  this.cmdDelegate = new EZEExplorerCMDDelegate(this);
  this.cmdTool.delegate = this.cmdDelegate;
}
(0, _OOP.mixClass)(EZEExplorer, _FExplorer["default"]);
EZEExplorer.prototype.onStart = function () {
  /**
   * @type {EZELauncher}
   */
  this.launcher = this.getContext(_R["default"].LAUNCHER);
  /**
   * @type {EZEDataModel}
   */
  this.dataModel = this.getContext(_R["default"].DATA_MODEL);
  this.formTask = this.getContext(_R["default"].EZ_FORM_TASK) || 'ez_input';
  this.cmdDelegate.refresh();
  this.redrawExpTree();
};
EZEExplorer.prototype.onPause = function () {};
EZEExplorer.prototype.createView = function () {
  this.$searchInput = (0, _FCore._)({
    tag: _Searcher["default"]
  });
  this.$view = (0, _FCore._)({
    "class": ['ez-explorer'],
    style: {
      display: 'grid',
      'grid-template-rows': 'auto 1fr'
    },
    child: [{
      "class": 'ez-explorer-header',
      child: [this.cmdTool.getView(), {
        style: {
          padding: '5px',
          'border-top': '1px solid #ddd'
        },
        child: this.$searchInput
      }]
    }, {
      "class": ['ez-explorer-body'],
      style: {
        height: 'unset'
      },
      child: [{
        "class": ['ez-explorer-content', 'as-bscroller']
      }]
    }]
  });
  this.$body = (0, _FCore.$)('.ez-explorer-body', this.$view);
  this.$header = (0, _FCore.$)('.ez-explorer-body', this.$view);
  this.$content = (0, _FCore.$)('.ez-explorer-content', this.$view);
  this.$content.name = "ez_all";
  this.expSearcher = new _ExpTree.ExpSearcher(this.$content, {
    inputElt: this.$searchInput
  });
};
EZEExplorer.prototype.getExploreTree = function () {
  return this.dataModel.getFormMetas(this.formTask).then(function (result) {
    if (!result) return [];
    if (result.error) return [];
    var nds = [];
    if (result.result) result.result.forEach(function (item) {
      var isSystem = item.contentArguments && item.contentArguments.id < 0;
      var nd = {
        id: 'ez_' + item.id,
        name: item.name,
        icon: 'span.mdi.mdi-memory',
        contentArguments: Object.assign({}, item, {
          tabId: 'ez_' + item.id
        })
      };
      if (isSystem) {
        nd.desc = "Hệ thống";
      }
      nds.push(nd);
    });
    nds.sort(function (a, b) {
      if (a.name < b.name) return -1;
      if (a.name > b.name) return 1;
      return 0;
    });
    return nds;
  });
};
EZEExplorer.prototype.onTreeAction = function (treeData, action, nodeElt) {
  if (action.cmd === 'open') {
    this.launcher.openItem('ezui', treeData.contentArguments.tabId, treeData.name, treeData.contentArguments, '');
    console.log(treeData);
  }
};
EZEExplorer.prototype.getActionContextMenuProps = function (treeData) {
  var items = [];
  items.push({
    icon: 'span.mdi.mdi-folder-open',
    text: 'Open',
    cmd: 'open'
  });
  var isSystem = treeData.contentArguments && treeData.contentArguments.id < 0;
  if (!isSystem) {
    items.push({
      icon: 'span.mdi.mdi-rename-outline',
      text: 'Rename',
      cmd: 'rename'
    });
    items.push({
      icon: 'span.mdi.mdi-delete-variant',
      text: 'Xóa',
      cmd: 'delete',
      extendStyle: {
        color: 'red'
      }
    });
  }
  return {
    items: items
  };
};
var _default = EZEExplorer;
/**
 * @extends CMDToolDelegate
 * @param {EZEExplorer} explorer
 * @constructor
 */
exports["default"] = _default;
function EZEExplorerCMDDelegate(explorer) {
  _CMDTool.CMDToolDelegate.apply(this, arguments);
  this.explorer = explorer;
}
(0, _OOP.mixClass)(EZEExplorerCMDDelegate, _CMDTool.CMDToolDelegate);
EZEExplorerCMDDelegate.prototype.getCmdGroupTree = function () {
  return ['new', 'reload'];
};
EZEExplorerCMDDelegate.prototype.getCmdDescriptor = function (name) {
  var res = Object.assign({
    type: 'trigger',
    desc: name,
    icon: 'span.mdi.mdi-apple-keyboard-command'
  }, _CmdDescriptors["default"][name]);
  return res;
};
EZEExplorerCMDDelegate.prototype.execCmd = function (name) {
  if (name === 'new') {
    this.openNewFunctionDialog();
  }
};
EZEExplorerCMDDelegate.prototype.openNewFunctionDialog = function () {
  var _this = this;
  console.log(this.explorer);
  (0, _NewEZFormDialog.openNewEZFormDialog)(this.explorer, {}).then(function (result) {
    if (!result) return;
    //todo: open form wizard

    /**
     * @type {KVEZUIComponentGenerator}
     */
    var generator = _this.explorer.getContext(_R["default"].EZ_COMPONENT_GENERATOR);
    var newForm = generator.generateFragmentSourceDataByTypeId(result.typeId);
    console.log(newForm);
    // return;

    var formName = result.formName;
    var params = {
      typeId: result.typeId,
      name: formName,
      content: newForm,
      available: true,
      id: 0,
      task: _this.explorer.getContext(_R["default"].EZ_FORM_TASK)
    };
    _this.explorer.dataModel.saveForm(params).then(function (response) {
      if (response.error) return;
      var contentArguments = {};
      contentArguments.id = response.result.id;
      _this.explorer.launcher.openItem('ezui', 'ez_' + contentArguments.id, formName, contentArguments);
    });
  });
};

/***/ }),

/***/ 59096:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FLauncher = _interopRequireDefault(__webpack_require__(37100));
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _EZEExplorer = _interopRequireDefault(__webpack_require__(21680));
var _MultiObjectPropertyEditor = _interopRequireDefault(__webpack_require__(95567));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _CMDTool = _interopRequireDefault(__webpack_require__(97847));
var _KVEZUIComponentGenerator = _interopRequireDefault(__webpack_require__(49944));
var _PluginManager = _interopRequireDefault(__webpack_require__(19617));
var _FMLauncher = _interopRequireDefault(__webpack_require__(44556));
var _FLTask = _interopRequireDefault(__webpack_require__(95778));
var _EZUIEditor = _interopRequireDefault(__webpack_require__(81424));
var _FOutline = _interopRequireDefault(__webpack_require__(43894));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends FLTask
 * @constructor
 */
function EZUITask() {
  _FLTask["default"].apply(this, arguments);
}
_OOP["default"].mixClass(EZUITask, _FLTask["default"]);
EZUITask.prototype.MainFragmentClass = _EZUIEditor["default"];
EZUITask.prototype.onStart = function () {
  var _this = this;
  _FLTask["default"].prototype.onStart.apply(this, arguments);
  /**
   * @type {EZEDataModel}
   */
  this.dataModel = this.getContext(_R["default"].DATA_MODEL);
  this.dataModel.loadForms([this.bundle.contentArguments.id]).then(function (res) {
    if (res.result && res.result.length > 0) {
      Object.assign(_this.bundle.contentArguments, res.result[0]);
      console.log(res.result);
      _this.mainFragment.setData(res.result[0].content);
    }
  });
};

/**
 *
 * @extends FLauncher
 * @constructor
 * @param {{dataModel: EZEDataModel, formTask: string}} options
 */
function EZELauncher(options) {
  _FLauncher["default"].apply(this, arguments);
  this.setupGenerator();
  this.propertyEditor = new _MultiObjectPropertyEditor["default"]();
  this.setContext(_R["default"].ALL_PROPERTY_EDITOR, this.propertyEditor);
  this.setContext(_R["default"].EZ_FORM_TASK, this.options.formTask || 'ez_input');
  this.componentOutline = new _FOutline["default"]();
  this.setContext(_R["default"].COMPONENT_OUTLINE, this.componentOutline);
  this.propertyEditor.attach(this);
  this.componentOutline.attach(this);
}
(0, _OOP.mixClass)(EZELauncher, _FLauncher["default"]);
EZELauncher.prototype.classes = {
  Explorer: _EZEExplorer["default"]
};
EZELauncher.prototype.createView = function () {
  _FLauncher["default"].prototype.createView.call(this);
  this.$siteRight.addChild(this.propertyEditor.getWindow());
  this.$siteLeft.addChild(this.componentOutline.getWindow());
};
EZELauncher.prototype.setupGenerator = function () {
  switch (this.options.formTask) {
    default:
      this.componentGenerator = new _KVEZUIComponentGenerator["default"]({
        dataModel: this.dataModel
      });
  }
  if (this.componentGenerator) this.componentGenerator.ready();
  this.setContext(_R["default"].EZ_COMPONENT_GENERATOR, this.componentGenerator);
};

/**
 *
 * @param {string} type
 * @param {string} ident
 * @param {string} name
 * @param {KVFormContentArgs|Object} contentArguments
 * @param {string} desc
 */
EZELauncher.prototype.openItem = function (type, ident, name, contentArguments, desc) {
  var task = this.getTaskById(ident);
  if (task) {
    task.requestActive();
    return;
  }
  var bundle = {
    type: type,
    name: name,
    contentArguments: contentArguments,
    id: ident,
    sync: Promise.resolve(),
    waitFor: function waitFor(sync) {
      this.sync = Promise.all([sync, this.sync]);
    },
    desc: desc,
    launcher: this
  };
  task = this.newTask(EZUITask, bundle);
  bundle.editor = task.mainFragment;
};
var _default = EZELauncher;
exports["default"] = _default;

/***/ }),

/***/ 81523:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _FCore = __webpack_require__(51518);
var _OOP = __webpack_require__(38608);
__webpack_require__(81274);
var _CMDTool = _interopRequireWildcard(__webpack_require__(97847));
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _EBuilder = _interopRequireWildcard(__webpack_require__(55813));
var _Scroller = __webpack_require__(87780);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _FOutline = __webpack_require__(43894);
var _R = _interopRequireDefault(__webpack_require__(25280));
var _ELECmd = _interopRequireWildcard(__webpack_require__(12370));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _Constants = __webpack_require__(92311);
var _MultiObjectPropertyEditor = __webpack_require__(95567);
var _IndexedPropertyNames = _interopRequireDefault(__webpack_require__(63017));
var _Assembler = __webpack_require__(2326);
var _CBComponentGroup = _interopRequireDefault(__webpack_require__(83935));
var _EComponentGroup = _interopRequireDefault(__webpack_require__(34678));
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @constructor
 */
function EZLayoutEditor() {
  var _this = this;
  _BaseEditor["default"].call(this);
  this.cmdRunner.assign(_ELECmd["default"]);
  this.lcEmitter = new _EventEmitter["default"]();
  this.cmdTool = new _CMDTool["default"]();
  this.cmdTool.delegate = new ELECmdToolDelegate(this);
  this.outlineDelegate = new ELEOutlineDelegate(this);
  this.viewportCtrl = new ELEViewportController(this);
  this.selectCtrl = new ELESelectController(this);
  this.componentPropertyDelegate = new LELComponentPropertyDelegate(this, []);
  this.selectTool = new ELESelectTool(this);
  this.lcEmitter.on(_Constants.EV_SELECTED_COMP_CHANGE, function () {
    _this.outlineDelegate.notifySelectedChange();
    _this.componentPropertyDelegate = new LELComponentPropertyDelegate(_this, _this.selectCtrl.components);
    if (_this.state === "RUNNING" && _this.propertyEditor) {
      _this.propertyEditor.delegate = _this.componentPropertyDelegate;
    }
  }).on(_Constants.EV_COMP_TREE_CHANGE, function () {
    _this.outlineDelegate.notifyTreeChange();
    _this.selectCtrl.onResize();
  }).on(_Constants.EV_COMP_BOUND_CHANGE, function () {
    _this.selectCtrl.onResize();
  });

  /**
   *
   * @type {null|EComponent}
   * @name rootLayout
   * @memberOf EZLayoutEditor#
   */
}

(0, _OOP.mixClass)(EZLayoutEditor, _BaseEditor["default"]);
EZLayoutEditor.prototype.createView = function () {
  var _this2 = this;
  this.$view = (0, _FCore._)({
    "class": 'ez-layout-editor',
    child: [{
      "class": 'ez-layout-editor-header',
      child: [{
        "class": 'as-layout-editor-cmd-tool-container',
        child: this.cmdTool.getView()
      }, {
        "class": 'as-layout-editor-quickpath-container',
        child: {
          tag: 'quickpath'
        }
      }]
    }, {
      "class": 'ez-layout-editor-body',
      child: [{
        "class": 'as-layout-editor-vrule-container',
        child: 'vruler'
      }, {
        "class": 'as-layout-editor-hrule-container',
        child: 'hruler'
      }, {
        "class": 'ez-layout-editor-space',
        child: [{
          "class": 'ez-layout-editor-desk'
        }, {
          "class": 'ez-layout-editor-select-overlay'
        }, {
          tag: _Scroller.VScrollbar
        }, {
          tag: _Scroller.HScrollbar
        }]
      }]
    }, {
      "class": 'ez-layout-editor-footer'
    }]
  });
  this.$space = (0, _FCore.$)('.ez-layout-editor-space', this.$view);
  this.$desk = (0, _FCore.$)('.ez-layout-editor-desk', this.$view);
  this.$attachhook = (0, _FCore._)('attachhook').addTo(this.$view);
  this.$attachhook.requestUpdateSize = this.onResize.bind(this);
  this.$space.requestUpdateSize = this.onResize.bind(this);
  this.$attachhook.on('attached', function () {
    _ResizeSystem["default"].add(_this2.$attachhook);
    _this2.$attachhook.requestUpdateSize();
  });
  this.viewportCtrl.onCreateView();
  this.selectTool.onCreateView();
  this.selectCtrl.onCreateView();
};
EZLayoutEditor.prototype.onAttached = function () {
  this.outline = this.getContext(_R["default"].COMPONENT_OUTLINE);
  this.propertyEditor = this.getContext(_R["default"].ALL_PROPERTY_EDITOR);
  this.flexFormEditor = this.getContext(_R["default"].FLEX_FORM_EDITOR);
};
EZLayoutEditor.prototype.notifyUnsaved = function () {
  this.flexFormEditor.notifyUnsaved();
};
EZLayoutEditor.prototype.onResize = function (e) {
  this.viewportCtrl.onResize();
  this.selectCtrl.onResize();
};
EZLayoutEditor.prototype.onStart = function () {
  /**
   * @type {EZEDataModel}
   */
  this.dataModel = this.getContext(_R["default"].DATA_MODEL);
};
EZLayoutEditor.prototype.onResume = function () {
  if (this.propertyEditor) this.propertyEditor.delegate = this.componentPropertyDelegate;
  if (this.outline) this.outline.delegate = this.outlineDelegate;
};

/**
 * not fire change event
 * @param data
 */
EZLayoutEditor.prototype.applyData = function (data) {
  if (this.rootLayout) this.rootLayout.domElt.remove();
  this.editableFragment = new ELEEditableFragment(data);
  this.layout = this.editableFragment.layout;
  this.$desk.addChild(this.editableFragment.domElt);
  this.outlineDelegate.notifyTreeChange();
};
EZLayoutEditor.prototype.setData = function (data) {
  this.getView();
  this.applyData(data);
};
EZLayoutEditor.prototype.getData = function () {
  return this.rootLayout ? this.rootLayout.exportSourceData() : {
    tag: "Container"
  };
};
EZLayoutEditor.prototype.findComponentById = function (id, from) {
  from = from || this.rootLayout;
  if (!from) return null;
  var res = null;
  if (from.attributes.id === id) return from;
  if (from.children && from.children.length) {
    for (var i = 0; i < from.children.length && !res; ++i) {
      res = this.findComponentById(id, from.children[i]);
    }
  }
  return res;
};
Object.defineProperty(EZLayoutEditor.prototype, 'rootLayout', {
  get: function get() {
    return this.editableFragment && this.editableFragment.layout;
  }
});

/**
 * for CircuitDiagramEditor
 */
EZLayoutEditor.prototype.getCircuitNodes = function () {
  var list = [];
  if (!this.editableFragment.layout) return [];
  var checkedGroup = {};
  var visit = function visit(nd) {
    var item = {
      type: 'COMPONENT',
      id: nd.attributes.id,
      name: nd.attributes.name,
      displayName: nd.attributes.displayName,
      text: '[' + nd.tag + '] ' + nd.attributes.name,
      value: nd.attributes.id,
      order: 'z_' + nd.tag + '_' + nd.attributes.name,
      bTag: nd.tag,
      pinList: Object.keys(nd.pinHandlers).map(function (name) {
        return {
          text: name,
          value: name
        };
      }),
      clazz: nd.constructor
    };
    var pinCmp = function pinCmp(a, b) {
      var av = _IndexedPropertyNames["default"][a.name] || 100;
      if (nd.pinHandlers[a.name].get && nd.pinHandlers[a.name].receives) {
        av /= 1000;
      }
      var bv = _IndexedPropertyNames["default"][b.name] || 100;
      if (nd.pinHandlers[b.name].get && nd.pinHandlers[b.name].receives) {
        bv /= 1000;
      }
      return av - bv;
    };
    item.inputPins = Object.keys(nd.pinHandlers).map(function (pinName) {
      if (nd.pinHandlers[pinName].receives) return {
        name: pinName
      };else return null;
    }).filter(function (it) {
      return !!it;
    });
    item.inputPins.sort(pinCmp);
    item.outputPins = Object.keys(nd.pinHandlers).map(function (pinName) {
      if (nd.pinHandlers[pinName].get) return {
        name: pinName
      };else return null;
    }).filter(function (it) {
      return !!it;
    });
    item.outputPins.sort(pinCmp);
    if (nd.tag.toLowerCase().match(/input|radio|checkbox|track|combo/)) {
      item.order = 'a_' + nd.tag + '_' + nd.attributes.name;
    } else if (nd.tag.toLowerCase().match(/button|label|text/)) {
      item.order = 'c_' + nd.tag + '_' + nd.attributes.name;
    }
    list.push(item);
    if (nd.attributes.group && !checkedGroup[nd.attributes.group]) {
      checkedGroup[nd.attributes.group] = true;
      item = {
        type: 'BLOCK',
        id: nd.attributes.group,
        name: nd.attributes.group,
        displayName: nd.attributes.group,
        text: '[' + _CBComponentGroup["default"] + '] ' + nd.attributes.group,
        value: nd.attributes.group,
        order: 'd_' + nd.attributes.group + '_' + nd.attributes.group,
        bTag: 'CBComponentGroup',
        pinList: Object.keys(nd.pinHandlers).map(function (name) {
          return {
            text: name,
            value: name
          };
        }),
        clazz: _EComponentGroup["default"]
      };
      item.inputPins = Object.keys(nd.pinHandlers).map(function (pinName) {
        if (nd.pinHandlers[pinName].receives) return {
          name: pinName
        };else return null;
      }).filter(function (it) {
        return !!it;
      });
      item.inputPins.sort(pinCmp);
      item.outputPins = [];
      list.push(item);
    }
    if (nd.children && nd.children.length) {
      for (var i = 0; i < nd.children.length; ++i) {
        visit(nd.children[i]);
      }
    }
  };
  visit(this.editableFragment.layout);
  return list;
};
var _default = EZLayoutEditor;
/**
 *
 * @param {EZLayoutEditor} editor
 * @constructor
 */
exports["default"] = _default;
function ELECmdToolDelegate(editor) {
  _CMDTool.CMDToolDelegate.call(this);
  this.editor = editor;
}
(0, _OOP.mixClass)(ELECmdToolDelegate, _CMDTool.CMDToolDelegate);
ELECmdToolDelegate.prototype.getCmdGroupTree = function () {
  return _ELECmd.ELECmdTree;
};
ELECmdToolDelegate.prototype.getCmdDescriptor = function (name) {
  return _CmdDescriptors["default"][name];
};
ELECmdToolDelegate.prototype.execCmd = function (cmd) {
  var _this$editor;
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }
  return (_this$editor = this.editor).execCmd.apply(_this$editor, [cmd].concat(args));
};

/**
 *
 * @param {EZLayoutEditor} editor
 * @constructor
 */
function ELEViewportController(editor) {
  this.editor = editor;
  this.isScrollingByBar = false;
  this.origin = new _Vec["default"](0, 0);
}
ELEViewportController.prototype.onCreateView = function () {
  var _this3 = this;
  /**
   *
   * @type {VScrollbar}
   */
  this.$vscrollbar = (0, _FCore.$)('vscrollbar', this.editor.$view);
  /**
   *
   * @type {HScrollbar}
   */
  this.$hscrollbar = (0, _FCore.$)('hscrollbar', this.editor.$view);
  this.$space = this.editor.$space;
  this.$space.on('wheel', this.ev_wheel.bind(this));
  this.$desk = this.editor.$desk;
  this.$vscrollbar.on({
    active: function active() {
      _this3.$desk.addClass('as-no-transition');
      _this3.isScrollingByBar = true;
    },
    inactive: function inactive() {
      _this3.isScrollingByBar = false;
      _this3.updateScrollbar();
      _this3.$desk.removeClass('as-no-transition');
    },
    scroll: function scroll(event) {
      _this3.origin = new _Vec["default"](_this3.origin.x, -_this3.$vscrollbar.innerOffset - _this3.overOffset.y);
      _this3.origin2View(event);
    }
  });
  this.$hscrollbar.on({
    active: function active() {
      _this3.isScrollingByBar = true;
      _this3.$desk.addClass('as-no-transition');
    },
    inactive: function inactive() {
      _this3.isScrollingByBar = false;
      _this3.updateScrollbar();
      _this3.$desk.removeClass('as-no-transition');
    },
    scroll: function scroll(event) {
      _this3.origin = new _Vec["default"](-_this3.$hscrollbar.innerOffset - _this3.overOffset.x, _this3.origin.y);
      _this3.origin2View(event);
    }
  });
  this.$space.on('dblclick', this.ev_dblClick.bind(this));
};
ELEViewportController.prototype.onResize = function () {
  this.updateScrollbar();
};
ELEViewportController.prototype.updateScrollbar = function () {
  if (this.isScrollingByBar) return;
  var innerBound = _Rectangle["default"].fromClientRect(this.$desk.getBoundingClientRect());
  var outerBound = _Rectangle["default"].fromClientRect(this.$space.getBoundingClientRect());
  innerBound.x -= 10;
  innerBound.y -= 10;
  innerBound.width += 20;
  innerBound.height += 20;
  var scrollingRect = innerBound.merge(outerBound);
  var scrollingOffset = outerBound.A().sub(scrollingRect.A());
  this.overOffset = scrollingRect.A().sub(innerBound.A());
  this.$vscrollbar.innerHeight = scrollingRect.height;
  this.$vscrollbar.outerHeight = outerBound.height;
  this.$vscrollbar.innerOffset = scrollingOffset.y;
  this.$hscrollbar.innerWidth = scrollingRect.width;
  this.$hscrollbar.outerWidth = outerBound.width;
  this.$hscrollbar.innerOffset = scrollingOffset.x;
  if (scrollingRect.height > outerBound.height) {
    this.$hscrollbar.addStyle('right', '10px');
    this.$vscrollbar.removeStyle('display');
  } else {
    this.$hscrollbar.removeStyle('right');
    this.$vscrollbar.addStyle('display', 'none');
  }
  if (scrollingRect.width > outerBound.width) {
    this.$vscrollbar.addStyle('bottom', '10px');
    this.$hscrollbar.removeStyle('display');
  } else {
    this.$vscrollbar.removeStyle('bottom');
    this.$hscrollbar.addStyle('display', 'none');
  }
};
ELEViewportController.prototype.autoHoming = function () {
  this.origin = new _Vec["default"](0, 0);
  this.origin2View();
};
ELEViewportController.prototype.origin2View = function (event) {
  this.$space.addStyle({
    '--desk-x': this.origin.x + 10 + 'px',
    '--desk-y': this.origin.y + 10 + 'px'
  });
  for (var i = 3; i >= 0; --i) {
    // setTimeout(this.editor.rulerCtrl.update.bind(this.editor.rulerCtrl), 120);
    // setTimeout(this.editor.rulerCtrl.update.bind(this.editor.rulerCtrl), 60);
    // setTimeout(this.editor.rulerCtrl.ev_mouseMove.bind(this.editor.rulerCtrl, event), 120);
    setTimeout(this.updateScrollbar.bind(this), i * 40 + 1);
  }
  //todo: update ruler
  this.updateScrollbar();
};

/**
 *
 * @param {WheelEvent} event
 */
ELEViewportController.prototype.ev_wheel = function (event) {
  var deltaY = event.deltaY;
  if (event.shiftKey) {
    this.origin = this.origin.add(new _Vec["default"](-deltaY, 0));
  } else {
    this.origin = this.origin.add(new _Vec["default"](0, -deltaY));
  }
  this.origin2View();
};
ELEViewportController.prototype.ev_dblClick = function (event) {
  if (event.target === this.$space) {
    this.autoHoming();
  }
};

/**
 *
 * @param {EZLayoutEditor} editor
 * @constructor
 */
function ELESelectController(editor) {
  this.editor = editor;
  this.lcEditor = editor.lcEmitter;
  this.components = [];
  this.$selectRects = [];
  this.container = null;
  this.$containerRect = null;
}
ELESelectController.prototype.onResize = function () {
  var rootBound = this.$selectOverlay.getBoundingClientRect();
  while (this.$selectRects.length < this.components.length) {
    this.$selectRects.push((0, _FCore._)({
      "class": 'ez-layout-editor-select-rect'
    }).addTo(this.$selectOverlay));
  }
  while (this.$selectRects.length > this.components.length) {
    this.$selectRects.pop().remove();
  }
  var component;
  var bound;
  for (var i = 0; i < this.components.length; ++i) {
    component = this.components[i];
    bound = component.domElt.getBoundingClientRect();
    this.$selectRects[i].addStyle({
      left: bound.left - rootBound.left - 2 + 'px',
      top: bound.top - rootBound.top - 2 + 'px',
      width: bound.width + 4 + 'px',
      height: bound.height + 4 + 'px'
    });
    if (i + 1 === this.components.length) {
      this.$selectRects[i].addClass('as-focus');
    } else {
      this.$selectRects[i].removeClass('as-focus');
    }
  }
  if (this.container && !this.$containerRect) {
    this.$containerRect = (0, _FCore._)({
      "class": 'ez-layout-editor-editing-container-rect'
    }).addTo(this.$selectOverlay);
  }
  if (!this.container && this.$containerRect) {
    this.$containerRect.remove();
    this.$containerRect = null;
  }
  if (this.container) {
    bound = this.container.domElt.getBoundingClientRect();
    this.$containerRect.addStyle({
      left: bound.left - rootBound.left - 1 + 'px',
      top: bound.top - rootBound.top - 1 + 'px',
      width: bound.width + 2 + 'px',
      height: bound.height + 2 + 'px'
    });
  }
};
ELESelectController.prototype.onCreateView = function () {
  this.$selectOverlay = (0, _FCore.$)('.ez-layout-editor-select-overlay', this.editor.$view);
};
ELESelectController.prototype.selectAll = function () {
  if (!this.container) this.container = this.editor.rootLayout;
  this.components = this.container.children.slice();
  this.onResize();
  this.lcEditor.emit(_Constants.EV_SELECTED_COMP_CHANGE);
};

/**
 *
 * @param {EComponent} component
 * @param {boolean=} append
 */
ELESelectController.prototype.select = function (component, append) {
  if (!append) this.components = [];
  if (!component) {
    this.onResize();
    return;
  }
  if (component.parent !== this.container) {
    //can not append, default to select
    this.container = component.parent;
    this.components = [];
  }
  var idx = this.components.indexOf(component);
  if (idx >= 0) {
    this.components.splice(idx, 1);
  }
  this.components.push(component);
  this.container = component.parent;
  if (this.container && this.container.tag !== 'Container') {
    this.container = null;
  }
  this.onResize();
  this.lcEditor.emit(_Constants.EV_SELECTED_COMP_CHANGE);
  //todo: update container
};

ELESelectController.prototype.deselect = function (component) {
  var idx = this.components.indexOf(component);
  console.log('deselect', component, idx);
  if (idx >= 0) {
    this.components.splice(idx, 1);
    this.onResize();
    this.lcEditor.emit(_Constants.EV_SELECTED_COMP_CHANGE);
  }
};
ELESelectController.prototype.toggleComponent = function (component) {
  var idx = this.components.indexOf(component);
  if (idx >= 0) {
    this.deselect(component);
  } else {
    this.select(component, true);
  }
};
ELESelectController.prototype.deselectAll = function () {
  while (this.components.length > 0) {
    this.components.pop();
  }
  this.onResize();
};
ELESelectController.prototype.editContainer = function (container) {
  if (this.container === container) return;
  if (container.tag !== 'Container') return;
  this.deselectAll();
  this.container = container;
  this.onResize();
};

/**
 *
 * @param {EZLayoutEditor} editor
 * @constructor
 */
function ELESelectTool(editor) {
  this.editor = editor;
}
ELESelectTool.prototype.onCreateView = function () {
  this.$space = this.editor.$space;
  this.$space.on('click', this.ev_click.bind(this));
  this.$desk = this.editor.$desk;
};

/**
 *
 * @param root
 * @param {boolean} depth
 * @param {Vec2} point
 */
ELESelectTool.prototype.findCompByMousePosition = function (root, depth, point) {
  if (!root) return null;
  var res = null;
  if (root.tag !== 'Container') return null;
  var children = root.children.slice().reverse();
  var child, childRect;
  for (var i = 0; i < children.length; i++) {
    child = children[i];
    if (depth) res = this.findCompByMousePosition(child, depth, point);
    if (res) break;
    childRect = _Rectangle["default"].fromClientRect(child.domElt.getBoundingClientRect());
    if (childRect.containsPoint(point)) {
      res = child;
    }
    if (res) break;
  }
  return res;
};
ELESelectTool.prototype.ev_click = function (event) {
  if (event.target !== this.$desk) return;
  var point = new _Vec["default"](event.clientX, event.clientY);
  var comp = this.findCompByMousePosition(this.editor.rootLayout, true, point);
  this.editor.selectCtrl.select(comp);
};

/**
 *
 * @param {EZLayoutEditor} editor
 * @constructor
 */
function ELEOutlineDelegate(editor) {
  _FOutline.OutlineDelegate.call(this);
  this.editor = editor;
}
(0, _OOP.mixClass)(ELEOutlineDelegate, _FOutline.OutlineDelegate);
ELEOutlineDelegate.prototype.getTreeData = function () {
  var layout = this.editor.rootLayout;
  if (!layout) return [];
  var visit = function visit(nd) {
    var dataNode = {
      name: nd.attributes.displayName || nd.attributes.name || nd.attributes.id,
      id: nd.attributes.id,
      icon: nd.menuIcon || 'span.mdi.mdi-cube-outline'
    };
    if (nd.children && nd.children.length) {
      dataNode.children = nd.children.map(visit);
    }
    return dataNode;
  };
  return visit(layout);
};
ELEOutlineDelegate.prototype.getSelectedIdList = function () {
  return this.editor.selectCtrl.components.map(function (comp) {
    return comp.attributes.id;
  });
};
ELEOutlineDelegate.prototype.getNodeContextMenu = function (nodeElt) {
  if (!nodeElt) return null;
  var id = nodeElt.data.id;
  var comp = this.editor.findComponentById(id);
  if (!comp) return null;
  if (!nodeElt.hasClass('as-component-outline-node-selected')) {
    this.editor.selectCtrl.select(comp);
  }
  var items = [];
  if (comp.tag === 'Container' && this.editor.selectCtrl.components.length === 1) {
    items.push({
      icon: 'span.mdi.mdi-square-edit-outline',
      text: 'Edit Layout',
      cmd: 'edit_layout',
      extendStyle: {
        color: 'blue'
      }
    }, '---');
  }
  if (items.length > 0) {
    return {
      items: items
    };
  }
  return null;
};
ELEOutlineDelegate.prototype.onNodeSelectContextMenu = function (nodeElt, item, event) {
  if (item.cmd === 'edit_layout') {
    this.editor.selectCtrl.editContainer(this.editor.selectCtrl.components[0]);
  }
};

/**
 *
 * @param nodeElt
 * @param {MouseEvent} event
 */
ELEOutlineDelegate.prototype.onClickNode = function (nodeElt, event) {
  var _this4 = this;
  var id = nodeElt.data.id;
  console.log(id);
  var comp = this.editor.findComponentById(id);
  if (event.altKey) {
    //todo: edit layout
  }
  if (!comp) return;
  if (event.shiftKey || event.ctrlKey) {
    this.editor.selectCtrl.toggleComponent(comp);
  } else {
    this.editor.selectCtrl.select(comp);
  }
  setTimeout(function () {
    var activeElement = document.activeElement;
    var tree;
    if (activeElement && activeElement.hasClass && activeElement.hasClass('absol-exp-node')) {
      tree = activeElement.parentElement;
      if (!tree.hasClass('as-component-outline-node-selected')) {
        activeElement = (0, _FCore.$)('.as-component-outline-node-focus>button', _this4.partner.$view);
        if (activeElement) {
          activeElement.focus();
        }
      }
    }
  }, 100);
};

// MultiObjectPropertyDelegate
/**
 *
 * @param {EZLayoutEditor} editor
 * @param components
 * @constructor
 */
function LELComponentPropertyDelegate(editor, components) {
  this.editor = editor;
  this.components = components.slice();
  _MultiObjectPropertyEditor.MultiObjectPropertyDelegate.call(this);
  this.editor = editor;
}
LELComponentPropertyDelegate.prototype.getPropertyNames = function () {
  var _this5 = this;
  if (this.components.length === 0) return [];
  var descriptors = {};
  var hasDependency = {};
  this.components.forEach(function (comp) {
    Object.keys(comp.attributeHandlers).forEach(function (name) {
      var desc = comp.attributes.getPropertyDescriptor(name);
      if (desc.dependency && desc.dependency.length > 0) hasDependency[name] = true;
      descriptors[name] = descriptors[name] || [];
      descriptors[name].push(desc);
    });
  });
  var checkOKDescArr = function checkOKDescArr(arr) {
    if (arr.length !== _this5.components.length) return false;
    if (arr.length === 1) return true;
    var first = arr[0];
    return arr.every(function (it) {
      return it.sign && it.sign === first.sign;
    });
  };
  var names = Object.keys(descriptors).filter(function (key) {
    return (!hasDependency[key] || _this5.components.length === 1) && checkOKDescArr(descriptors[key]);
  });
  names.sort(function (a, b) {
    var aIdx = _IndexedPropertyNames["default"][a];
    var bIdx = _IndexedPropertyNames["default"][b];
    if (aIdx === undefined) aIdx = 1000;
    if (bIdx === undefined) bIdx = 1000;
    if (aIdx !== bIdx) return aIdx - bIdx;
    if (a < b) return -1;
    return 1;
  });
  return names;
};
LELComponentPropertyDelegate.prototype.getPropertyDescriptor = function (name) {
  return this.components[this.components.length - 1].attributes.getPropertyDescriptor(name);
};
LELComponentPropertyDelegate.prototype.setProperty = function (name) {
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
    args[_key2 - 1] = arguments[_key2];
  }
  var comps = this.components;
  var id, newName;
  comps.forEach(function (component) {
    var _component$attributes;
    (_component$attributes = component.attributes).setProperty.apply(_component$attributes, [name].concat(args));
  });
  if (comps.length === 1 && (name === 'name' || name === 'displayName' || name === 'id')) {
    id = comps[0].attributes.id;
    newName = comps[0].attributes.displayName || comps[0].attributes.name || id;
    this.editor.outlineDelegate.renameNode(id, newName);
  }
  this.editor.lcEmitter.emit(_Constants.EV_COMP_BOUND_CHANGE);
};
LELComponentPropertyDelegate.prototype.getProperty = function (name) {
  var _this$components$attr;
  for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
    args[_key3 - 1] = arguments[_key3];
  }
  return (_this$components$attr = this.components[this.components.length - 1].attributes).getProperty.apply(_this$components$attr, [name].concat(args));
};
LELComponentPropertyDelegate.prototype.onSetPropertyComplete = function (name) {};

/**
 * @extends Context
 * mock fragment class for editing
 * @constructor
 */
function ELEEditableFragment(layoutData) {
  this.layout = _EBuilder.EBuilderInstance.inflate(layoutData);
  this.layout.attach(this);
  this.domElt = this.layout.domElt;
}
ELEEditableFragment.prototype.onChildAttribute = _noop["default"];

/***/ }),

/***/ 4699:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.EZTestRunnerTask = EZTestRunnerTask;
exports["default"] = void 0;
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _OOP = __webpack_require__(38608);
var _FLTask = _interopRequireDefault(__webpack_require__(95778));
var _FCore = __webpack_require__(51518);
var _EBuilder = __webpack_require__(55813);
var _Toast = _interopRequireDefault(__webpack_require__(68105));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends BaseEditor
 * @constructor
 */
function EZTestRunner() {
  _BaseEditor["default"].call(this);
}
(0, _OOP.mixClass)(EZTestRunner, _BaseEditor["default"]);
EZTestRunner.prototype.createView = function () {
  this.$view = (0, _FCore._)({
    "class": 'ez-test-runner',
    child: [{
      "class": 'ez-test-runner-header'
    }, {
      "class": ['ez-test-runner-body', 'as-bscroller'],
      child: [{
        "class": 'ez-test-runner-content'
      }]
    }]
  });
  this.$content = (0, _FCore.$)('.ez-test-runner-content', this.$view);
};
EZTestRunner.prototype.setData = function (data) {
  this.$content.clearChild();
  var script = data.test && data.test.script || '';
  script = "async function __main__(){\n".concat(script, "\n}\n__main__(); ");
  try {
    var factor = new Function('sourceData', 'container', 'build', '_', '$', script);
    factor(data, this.$content, _EBuilder.EBuilderInstance.build.bind(_EBuilder.EBuilderInstance), _FCore._, _FCore.$);
  } catch (e) {
    _Toast["default"].make({
      props: {
        message: 'Error: ' + e.message,
        variant: 'error',
        disappearTimeout: 10000
      }
    });
  }
};
var _default = EZTestRunner;
/**
 * @extends FLTask
 * @constructor
 */
exports["default"] = _default;
function EZTestRunnerTask() {
  _FLTask["default"].apply(this, arguments);
}
(0, _OOP.mixClass)(EZTestRunnerTask, _FLTask["default"]);
EZTestRunnerTask.prototype.MainFragmentClass = EZTestRunner;

/***/ }),

/***/ 81424:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = __webpack_require__(38608);
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _CircuitDiagramEditor = _interopRequireDefault(__webpack_require__(65748));
var _EZLayoutEditor = _interopRequireDefault(__webpack_require__(81523));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _EZUITestConfigEditor = _interopRequireDefault(__webpack_require__(97013));
var _EECmd = _interopRequireDefault(__webpack_require__(23988));
var _EBlockEditor = _interopRequireDefault(__webpack_require__(53199));
var _ECircuitDiagramEditor = _interopRequireDefault(__webpack_require__(85862));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var implicitBlockSource = function implicitBlockSource(newSource) {
  if (!newSource) return [];
  return newSource.map(function (it) {
    var attributes = Object.assign({}, it);
    delete attributes.tag;
    delete attributes.attributes;
    return {
      tag: it.tag,
      attributes: attributes
    };
  });
};
var explicitBlockSource = function explicitBlockSource(oldSource) {
  if (!oldSource) return [];
  return oldSource.map(function (it) {
    var res = {
      tag: it.tag
    };
    Object.assign(res, it.attributes);
    return res;
  });
};
function EZUIEditor() {
  _BaseEditor["default"].call(this);
  this.cmdRunner.assign(_EECmd["default"]);
  this.layoutEditor = new _EZLayoutEditor["default"]();
  this.blockEditor = new _EBlockEditor["default"]();
  this.diagramEditor = new _ECircuitDiagramEditor["default"]();
  this.testConfigEditor = new _EZUITestConfigEditor["default"]();
  /***
   *
   * @type {(EZLayoutEditor|BlockEditor|CircuitDiagramEditor)[]}
   */
  this.subEditors = [this.layoutEditor, this.blockEditor, this.diagramEditor, this.testConfigEditor];
  this.setContext(_R["default"].EZUI_EDITOR, this);
  this.setContext(_R["default"].LAYOUT_EDITOR, this.layoutEditor);
  this.setContext(_R["default"].DIAGRAM_EDITOR, this.diagramEditor);
  this.setContext(_R["default"].BLOCK_EDITOR, this.blockEditor);
  this.setContext(_R["default"].EZUI_TEST_CONFIG_EDITOR, this.blockEditor);
  this.setContext(_R["default"].FLEX_FORM_EDITOR, this);
  this.tabCtrl = new EUIETabController(this);
}
(0, _OOP.mixClass)(EZUIEditor, _BaseEditor["default"]);
EZUIEditor.prototype.onAttached = function () {
  this.blockEditor.attach(this);
  this.diagramEditor.attach(this);
  this.layoutEditor.attach(this);
  this.testConfigEditor.attach(this);
  this.task = this.getContext(_R["default"].TASK);
};
EZUIEditor.prototype.createView = function () {
  this.$tabFrames = [(0, _FCore._)({
    tag: 'tabframe',
    child: this.layoutEditor.getView()
  }), (0, _FCore._)({
    tag: 'tabframe',
    child: this.blockEditor.getView()
  }), (0, _FCore._)({
    tag: 'tabframe',
    child: this.diagramEditor.getView()
  }), (0, _FCore._)({
    tag: 'tabframe',
    child: this.testConfigEditor.getView()
  })];
  this.$view = (0, _FCore._)({
    "class": 'as-flex-form-editor',
    child: [{
      "class": 'as-flex-form-editor-right-tab',
      child: [{
        "class": 'as-flex-form-editor-right-tab-top',
        child: [{
          tag: 'button',
          "class": 'as-form-editor-vertical-tab-btn',
          child: ['span.mdi.mdi-view-quilt[style="color:rgb(30, 100, 255)"]', {
            text: 'Layout'
          }],
          on: {
            click: this.tabCtrl.activeEditorTab.bind(this.tabCtrl, 0)
          }
        }, {
          tag: 'button',
          "class": 'as-form-editor-vertical-tab-btn',
          child: ['mdi-shape', {
            text: 'Blocks'
          }],
          on: {
            click: this.tabCtrl.activeEditorTab.bind(this.tabCtrl, 1)
          }
        }, {
          tag: 'button',
          "class": 'as-form-editor-vertical-tab-btn',
          child: ['span.mdi.mdi-transit-connection-variant[style="color:rgb(255, 100, 50)"]', {
            text: 'Lines'
          }],
          on: {
            click: this.tabCtrl.activeEditorTab.bind(this.tabCtrl, 2)
          }
        }, {
          tag: 'button',
          "class": 'as-form-editor-vertical-tab-btn',
          child: ['span.mdi.mdi-bug-play[style="color:rgb(155, 30, 255)"]', {
            text: 'Test'
          }],
          on: {
            click: this.tabCtrl.activeEditorTab.bind(this.tabCtrl, 3)
          }
        }]
      }]
    }, {
      tag: 'frameview',
      "class": 'as-flex-form-editor-frame-view',
      child: this.$tabFrames
    }]
  });
  this.$tabBtns = (0, _FCore.$$)('.as-flex-form-editor-right-tab-top > button', this.$view);
  this.$frameView = (0, _FCore.$)('.as-flex-form-editor-frame-view', this.$view);
  // console.log(this.$tabFrames[0]);
  this.tabCtrl.onCreateView();
  this.tabCtrl.activeEditorTab(0);
};
EZUIEditor.prototype.onStart = function () {
  /**
   * @type {EZEDataModel}
   */
  this.dataModel = this.getContext(_R["default"].DATA_MODEL);
  this.tabCtrl.onStart();
};
EZUIEditor.prototype.onResume = function () {
  this.tabCtrl.onResume();
};
EZUIEditor.prototype.onPause = function () {
  this.tabCtrl.onPause();
};
EZUIEditor.prototype.onStop = function () {
  this.tabCtrl.onStop();
};
EZUIEditor.prototype.onDestroy = function () {
  this.tabCtrl.onDestroy();
};
EZUIEditor.prototype.setData = function (data) {
  data = data || {};
  this.layoutEditor.setData(data.layout || {
    tag: "Container"
  });
  this.blockEditor.setData(implicitBlockSource(data.blocks) || []);
  this.diagramEditor.setData(data.lines || [], data.diagram || {
    includedBlocks: [],
    positions: {}
  });
  this.testConfigEditor.setData(data.test);
};
EZUIEditor.prototype.getData = function () {
  var res = {
    app: _R["default"].EZUI_APP
  };
  res.layout = this.layoutEditor.getData();
  res.blocks = explicitBlockSource(this.blockEditor.getData());
  res.lines = this.diagramEditor.getLineData();
  res.diagram = this.diagramEditor.getDiagramData();
  res.test = this.testConfigEditor.getData();
  return res;
};
EZUIEditor.prototype.notifyUnsaved = function () {
  this.task.modified = true;
};
EZUIEditor.prototype.notifySaved = function () {
  this.task.modified = false;
};
var _default = EZUIEditor;
/**
 *
 * @param {EZUIEditor} editor
 * @constructor
 */
exports["default"] = _default;
function EUIETabController(editor) {
  this.editor = editor;
  this.activeIdx = -1;
}
EUIETabController.prototype.onCreateView = function () {
  this.$tabBtns = this.editor.$tabBtns;
  this.$tabFrames = this.editor.$tabFrames;
  this.subEditors = this.editor.subEditors;
};
EUIETabController.prototype.onStart = function () {
  var editor = this.subEditors[this.activeIdx];
  if (editor) {
    editor.start(true);
  }
};
EUIETabController.prototype.onResume = function () {
  var editor = this.subEditors[this.activeIdx];
  if (editor) {
    editor.resume();
  }
};
EUIETabController.prototype.onPause = function () {
  var editor = this.subEditors[this.activeIdx];
  if (editor) {
    editor.pause();
  }
};
EUIETabController.prototype.onStop = function () {
  var editor = this.subEditors[this.activeIdx];
  if (editor) {
    editor.stop();
  }
};
EUIETabController.prototype.onDestroy = function () {
  for (var i = 0; i < this.subEditors.length; ++i) {
    this.subEditors[i].destroy();
  }
};
EUIETabController.prototype.activeEditorTab = function (idx) {
  if (this.activeIdx === idx) return;
  this.activeIdx = idx;
  for (var i = 0; i < this.$tabFrames.length; ++i) {
    if (i === idx) {
      this.$tabFrames[i].requestActive();
      if (!this.$tabBtns[i].hasClass('active')) {
        this.$tabBtns[i].addClass('active');
        if (this.editor.state === "RUNNING") {
          this.subEditors[i].start();
        }
      }
    } else {
      if (this.$tabBtns[i].hasClass('active')) {
        this.$tabBtns[i].removeClass('active');
        if (this.editor.state === "RUNNING") this.subEditors[i].pause();
      }
    }
  }
};

/***/ }),

/***/ 97013:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _OOP = __webpack_require__(38608);
var _FCore = __webpack_require__(51518);
var _absolBrace = _interopRequireDefault(__webpack_require__(90834));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @typedef {object} EZUITestConfigData
 * @property {string} script
 *
 */

/**
 *
 * @constructor
 */
function EZUITestConfigEditor() {
  _BaseEditor["default"].call(this);
  this.aceEditor = null;
}
(0, _OOP.mixClass)(EZUITestConfigEditor, _BaseEditor["default"]);
EZUITestConfigEditor.prototype.createView = function () {
  this.$view = (0, _FCore._)({
    "class": 'ez-test-config-editor',
    child: [{
      "class": 'ez-test-test-config-editor-header',
      child: [{
        "class": 'ez-test-config-editor-static-code'
      }]
    }, {
      "class": 'ez-test-config-editor-body',
      child: [{
        tag: 'pre',
        "class": 'ez-test-config-editor-script'
      }]
    }]
  });
  this.$script = (0, _FCore.$)('.ez-test-config-editor-script', this.$view);
  this.aceEditor = _absolBrace["default"].ace.edit(this.$script);
  this.aceEditor.setOption('mode', 'ace/mode/javascript');
};
EZUITestConfigEditor.prototype.defaultTestFactor = function (sourceData, container, build) {
  var context = {
    contentModule: window.contentModule,
    Math: window.Math
  };
  var frag = build(sourceData, {
    context: context
  });
  container.addChild(frag.domElt);
  frag.start();
};
EZUITestConfigEditor.prototype.getAutoScript = function () {
  var autoScript = (this.defaultTestFactor + '').split('\n');
  autoScript.shift();
  autoScript.pop();
  var indentLength = autoScript.reduce(function (ac, cr) {
    if (cr.trim().length === 0) return ac;
    var indent = cr.match(/^\s+/);
    if (indent) {
      return Math.min(ac, indent[0].length);
    }
    return ac;
  }, 100);
  autoScript = autoScript.map(function (line) {
    if (line.trim().length === 0) return line;
    return line.substring(indentLength);
  }).join('\n');
  return autoScript;
};

/**
 * @param {EZUITestConfigData|null} data
 */
EZUITestConfigEditor.prototype.setData = function (data) {
  data = data || {};
  var script = data.script || this.getAutoScript();
  this.aceEditor.setValue(script);
};
EZUITestConfigEditor.prototype.getData = function () {
  var script = this.aceEditor.getValue();
  return {
    script: script
  };
};
var _default = EZUITestConfigEditor;
exports["default"] = _default;

/***/ }),

/***/ 1996:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BEFunction = _interopRequireDefault(__webpack_require__(90441));
var _OOP = __webpack_require__(38608);
var _EBuilder = __webpack_require__(55813);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends BEFunction
 * @constructor
 */
function EBEFunction() {
  _BEFunction["default"].apply(this, arguments);
}
(0, _OOP.mixClass)(EBEFunction, _BEFunction["default"]);
EBEFunction.prototype.tag = 'Function';
_EBuilder.EBuilderInstance.install(EBEFunction);
var _default = EBEFunction;
exports["default"] = _default;

/***/ }),

/***/ 75750:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.openNewEZFormDialog = openNewEZFormDialog;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _EBuilder = _interopRequireWildcard(__webpack_require__(55813));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _OOP = __webpack_require__(38608);
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _R = _interopRequireDefault(__webpack_require__(25280));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @constructor
 */
function NewEZFormDialog() {
  _Fragment["default"].call(this);
}
(0, _OOP.mixClass)(NewEZFormDialog, _Fragment["default"]);
NewEZFormDialog.prototype.formSource = {
  app: "EZUI",
  layout: {
    tag: "Container",
    colSpan: 1,
    rowSpan: 1,
    displayName: "",
    id: "mPo32Cxu6ePvVfpS",
    layout: "grid",
    columns: 2,
    columnGap: 20,
    rowGap: 10,
    alignItems: "center",
    children: [{
      tag: "Label",
      colSpan: 1,
      rowSpan: 1,
      displayName: "Label:Tên form",
      id: "name_label",
      value: "Tên form",
      requiredIndicator: true
    }, {
      tag: "TextInput",
      name: "formName",
      colSpan: 1,
      rowSpan: 1,
      displayName: "",
      width: '100%',
      id: "ZiBuAz6TwgH0XfJe",
      value: "",
      required: true
    }, {
      tag: "Label",
      colSpan: 1,
      rowSpan: 1,
      displayName: "",
      id: "data_type_label",
      value: "Kiểu dữ liệu"
    }, {
      tag: "ComboBox",
      name: "typeId",
      colSpan: 1,
      rowSpan: 1,
      displayName: "",
      width: "100%",
      id: "UlJcyJqBkiNAetDc",
      items: "= getTypeListItems()",
      text: "",
      searchable: true
    }, {
      tag: "Label",
      colSpan: 1,
      rowSpan: 1,
      displayName: "",
      id: "appearance_label",
      value: "Hình thức hiển thị",
      group: "appearance_group"
    }, {
      tag: "ComboBox",
      name: "appearance",
      colSpan: 1,
      rowSpan: 1,
      displayName: "",
      width: "100%",
      id: "MHvctmd1__qfwRVu",
      group: "appearance_group",
      items: "=[{text:\"Danh sách\", value:\"list\"},\n{text:\"DataSheet\", value:\"datasheet\"}]",
      text: ""
    }]
  },
  blocks: [{
    tag: "Function",
    id: "W9OZ3Yb9nF1gW7hF",
    name: "not_select_appearance",
    args: ["value"],
    body: "return isNotViewAppearance(value);"
  }],
  lines: [{
    u: "W9OZ3Yb9nF1gW7hF",
    v: "appearance_group",
    uPin: "result",
    vPin: "hidden",
    id: "W9OZ3YnGctJMke0w"
  }, {
    u: "UlJcyJqBkiNAetDc",
    v: "W9OZ3Yb9nF1gW7hF",
    uPin: "value",
    vPin: "value",
    id: "W9OZ3YmHV2LFTe7K"
  }]
};
NewEZFormDialog.prototype.createView = function () {
  var _this = this;
  this.form = _EBuilder.EBuilderInstance.build(this.formSource, {
    context: {
      getTypeListItems: function getTypeListItems() {
        return _this.getTypeListItems();
      },
      isNotViewAppearance: function isNotViewAppearance(value) {
        return _this.isNotViewAppearance(value);
      }
    }
  });
  this.$view = (0, _FCore._)({
    tag: _Modal["default"],
    child: {
      "class": ['as-new-ez-form-dialog', 'as-message-dialog'],
      child: [{
        "class": 'as-message-dialog-body',
        style: {
          padding: '10px'
        },
        child: this.form.domElt
      }, {
        "class": 'as-message-dialog-footer',
        style: {
          textAlign: 'center'
        },
        child: [{
          tag: _FlexiconButton["default"],
          "class": ['as-new-ez-form-dialog-confirm-btn'],
          props: {
            text: 'OK'
          },
          on: {
            click: function click() {
              _this.onConfirm();
            }
          }
        }, {
          tag: _FlexiconButton["default"],
          "class": ['as-new-ez-form-dialog-cancel-btn'],
          props: {
            text: 'Cancel'
          },
          on: {
            click: function click() {
              _this.onCancel();
            }
          }
        }]
      }]
    }
  });
  this.$okBtn = (0, _FCore.$)('.as-new-ez-form-dialog-confirm-btn', this.$view);
  this.$cancelBtn = (0, _FCore.$)('.as-new-ez-form-dialog-cancel-btn', this.$view);
};
NewEZFormDialog.prototype.onConfirm = function () {
  var value = this.form.attributes.value;
  var input;
  if (!value.formName) {
    input = this.form.findViewByName('formName');
    input.updateError();
    input.focus();
  } else {
    this.resolve(value);
    this.resolve = _noop["default"];
    this.stop();
    this.destroy();
  }
};
NewEZFormDialog.prototype.onCancel = function () {
  this.resolve(null);
  this.resolve = _noop["default"];
  this.stop();
  this.destroy();
};
NewEZFormDialog.prototype.onStart = function () {
  this.getView().addTo(document.body);
  this.form.start();
};
NewEZFormDialog.prototype.onStop = function () {
  this.$view.remove();
  this.resolve(null);
};
NewEZFormDialog.prototype.getTypeListItems = function () {
  return this.getTypeLists().then(function (result) {
    return result.map(function (type) {
      return {
        text: type.name,
        value: type.id
      };
    });
  });
};
NewEZFormDialog.prototype.getTypeLists = function () {
  var _this2 = this;
  if (this._typeListSync) return this._typeListSync;
  var dataModel = this.getContext(_R["default"].DATA_MODEL);
  if (!dataModel) return Promise.resolve([]);
  this._typeListSync = dataModel.getTypeLists().then(function (result) {
    _this2._dict = result.reduce(function (ac, cr) {
      ac[cr.id] = cr;
      return ac;
    }, {});
    return result;
  });
  return this._typeListSync;
};
NewEZFormDialog.prototype.isNotViewAppearance = function (value) {
  var _this3 = this;
  return this.getTypeLists().then(function () {
    var t = _this3._dict[value];
    if (!t) return true;
    if (t.type === 'array') return false;
    return true;
  });
};
NewEZFormDialog.prototype.resolve = _noop["default"];
NewEZFormDialog.prototype.startForResult = function () {
  var _this4 = this;
  this.start();
  return new Promise(function (resolve) {
    _this4.resolve = resolve;
  });
};

/**
 *
 * @param context
 * @param {object=}opt
 * @returns {Promise<null|{formName, typeId, appearance}>}
 */
function openNewEZFormDialog(context, opt) {
  opt = opt || {};
  var dialog = new NewEZFormDialog();
  dialog.attach(context);
  return dialog.startForResult();
}

/***/ }),

/***/ 96820:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.openSelectEComponentTypeDialog = openSelectEComponentTypeDialog;
__webpack_require__(50562);
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _Assembler = __webpack_require__(2326);
var _ExpTree = _interopRequireDefault(__webpack_require__(87326));
var _search = _interopRequireWildcard(__webpack_require__(67858));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _EBuilder = __webpack_require__(55813);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/****
 * @extends Context
 * @constructor
 */
function SelectEComponentTypeDialog(opt) {
  _Fragment["default"].call(this);
  this.opt = Object.assign({
    confirmButtonText: 'CONFIRM'
  }, opt);
  this.cache = {};
  this.selectedClass = null;
}
_OOP["default"].mixClass(SelectEComponentTypeDialog, _Fragment["default"]);
SelectEComponentTypeDialog.prototype.createView = function () {
  var self = this;
  var Classes = _EBuilder.EBuilderInstance.ComponentClasses;
  var componentClasses = Object.keys(Classes).reduce(function (ac, cr) {
    var clazz = Classes[cr];
    if (cr === clazz.prototype.tag && clazz.prototype.render && !clazz.prototype.getViewAsArray) {
      //exclude adapt class, fragment
      ac.push(clazz);
    }
    return ac;
  }, []);
  componentClasses.sort(function (a, b) {
    if (a.prototype.tag < b.prototype.tag) return -1;
    return 1;
  });
  this.componentClasses = componentClasses;
  this.$activeNode = null;
  this.$typeNodes = this.componentClasses.map(function (clazz) {
    var elt = (0, _FCore._)({
      tag: _ExpTree["default"].tag,
      props: {
        name: clazz.prototype.tag,
        icon: clazz.prototype.menuIcon,
        componentClass: clazz
      },
      on: {
        click: function click() {
          if (self.$activeNode === this) return;
          if (self.$activeNode) self.$activeNode.removeClass('as-selected');
          self.$activeNode = this;
          self.$activeNode.addClass('as-selected');
          self.$confirmBtn.disabled = false;
          self.selectedClass = clazz;
        },
        dblclick: function dblclick() {
          if (self.$activeNode === this) {
            self.onConfirm();
            return;
          }
          if (self.$activeNode) self.$activeNode.removeClass('as-selected');
          self.$activeNode = this;
          self.$activeNode.addClass('as-selected');
          self.$confirmBtn.disabled = false;
          self.selectedClass = clazz;
          self.onConfirm();
        }
      }
    });
    return elt;
  });
  this.$searchInput = (0, _FCore._)({
    tag: _Searcher["default"].tag,
    on: {
      stoptyping: this.ev_inputChange.bind(this)
    }
  });
  this.$view = (0, _FCore._)({
    "class": ['as-select-component-type-dialog', 'as-message-dialog'],
    child: [{
      "class": 'as-message-dialog-header',
      child: this.$searchInput
    }, {
      "class": ['as-message-dialog-body', 'absol-bscroller'],
      child: this.$typeNodes
    }, {
      "class": 'as-message-dialog-footer',
      child: [{
        tag: _FlexiconButton["default"].tag,
        "class": ['as-message-dialog-cancel-btn', 'secondary'],
        props: {
          text: 'Cancel'
        },
        on: {
          click: function click() {
            self.onCancel();
          }
        }
      }, {
        tag: _FlexiconButton["default"].tag,
        "class": ['as-message-dialog-confirm-btn', 'primary'],
        props: {
          text: this.opt.confirmButtonText,
          disabled: true
        },
        on: {
          click: function click() {
            self.onConfirm();
          }
        }
      }]
    }]
  });
  this.$body = (0, _FCore.$)('.as-message-dialog-body', this.$view);
  this.$confirmBtn = (0, _FCore.$)('.as-message-dialog-confirm-btn', this.$view);
};
SelectEComponentTypeDialog.prototype._getNodesBySearch = function (query) {
  this._searchingItems = this._searchingItems || this.$typeNodes.map(function (elt) {
    return (0, _search["default"])({
      text: elt.name,
      value: elt
    });
  });
  return (0, _search.searchListByText)(query, this._searchingItems).map(function (item) {
    return item.value;
  });
};
SelectEComponentTypeDialog.prototype.ev_inputChange = function () {
  var query = this.$searchInput.value.trim().replace(/\s\s+/g, ' ');
  var cNodes;
  this.$body.clearChild();
  if (query.length === 0) {
    this.$body.addChild(this.$typeNodes);
  } else {
    cNodes = this.cache[query] || this._getNodesBySearch(query);
    this.$body.addChild(cNodes);
  }
};
SelectEComponentTypeDialog.prototype.onStart = function () {
  this.$searchInput.focus();
};
SelectEComponentTypeDialog.prototype.onConfirm = _noop["default"];
SelectEComponentTypeDialog.prototype.onCancel = _noop["default"];
function openSelectEComponentTypeDialog(opt) {
  var frg = new SelectEComponentTypeDialog(opt);
  var modal = (0, _FCore._)('modal.as-select-component-type-modal').addTo(document.body);
  modal.addChild(frg.getView());
  frg.start();
  return new Promise(function (resolve) {
    frg.onCancel = function () {
      frg.destroy();
      modal.remove();
      resolve(null);
    };
    frg.onConfirm = function () {
      frg.destroy();
      modal.remove();
      return resolve(frg.selectedClass);
    };
  });
}
var _default = SelectEComponentTypeDialog;
exports["default"] = _default;

/***/ }),

/***/ 8122:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _MultiObjectPropertyEditor = _interopRequireDefault(__webpack_require__(95567));
var _IndexedPropertyNames = _interopRequireDefault(__webpack_require__(63017));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function AllPropertyEditor() {
  _MultiObjectPropertyEditor["default"].call(this);
}
Object.defineProperties(AllPropertyEditor.prototype, Object.getOwnPropertyDescriptors(_MultiObjectPropertyEditor["default"].prototype));
AllPropertyEditor.prototype.constructor = AllPropertyEditor;
AllPropertyEditor.prototype.setProperty = function (object, name, value) {
  if (object.__AllPropertyEditorGroupName__.attributes[name]) return object.setAttribute(object.__AllPropertyEditorGroupName__.attributes[name], value);
  if (object.__AllPropertyEditorGroupName__.style[name]) return object.setStyle(object.__AllPropertyEditorGroupName__.style[name], value);
  throw new Error('not found ' + name);
};
AllPropertyEditor.prototype.getProperty = function (object, name) {
  if (object.__AllPropertyEditorGroupName__.attributes[name]) return object.getAttribute(object.__AllPropertyEditorGroupName__.attributes[name]);
  if (object.__AllPropertyEditorGroupName__.style[name]) return object.getStyle.apply(object, [object.__AllPropertyEditorGroupName__.style[name]].concat(Array.prototype.slice.call(arguments, 2)));
  throw new Error('not found ' + name);
};
AllPropertyEditor.prototype.getPropertyDescriptor = function (object, name) {
  if (object.__AllPropertyEditorGroupName__.attributes[name]) return object.getAttributeDescriptor(object.__AllPropertyEditorGroupName__.attributes[name]);
  if (object.__AllPropertyEditorGroupName__.style[name]) return object.getStyleDescriptor(object.__AllPropertyEditorGroupName__.style[name]);
  throw new Error('not found ' + name);
};
AllPropertyEditor.prototype.getPropertyNames = function (object) {
  var indexed = _IndexedPropertyNames["default"];
  return Object.keys(object.__AllPropertyEditorGroupName__.attributes).concat(Object.keys(object.__AllPropertyEditorGroupName__.style)).sort(function (a, b) {
    return indexed[a] - indexed[b];
  });
};
AllPropertyEditor.prototype.edit = function () {
  if (this.objects) this.objects.forEach(function (object) {
    delete object.__AllPropertyEditorGroupName__;
  });
  Array.prototype.forEach.call(arguments, function (object) {
    object.__AllPropertyEditorGroupName__ = {};
    var attributes = object.getAcceptsAttributeNames();
    var style = object.getAcceptsStyleNames();
    object.__AllPropertyEditorGroupName__.attributes = attributes.reduce(function (ac, cr) {
      ac[cr] = cr;
      return ac;
    }, {});
    object.__AllPropertyEditorGroupName__.style = style.reduce(function (ac, cr) {
      ac[cr] = cr;
      return ac;
    }, {});
    var key;
    for (key in object.__AllPropertyEditorGroupName__.attributes) {
      if (object.__AllPropertyEditorGroupName__.style[key]) {
        delete object.__AllPropertyEditorGroupName__.attributes[key];
        delete object.__AllPropertyEditorGroupName__.style[key];
        object.__AllPropertyEditorGroupName__.attributes[key + '(attribute)'] = key;
        object.__AllPropertyEditorGroupName__.style[key + '(style)'] = key;
      }
    }
  });
  return _MultiObjectPropertyEditor["default"].prototype.edit.apply(this, arguments);
};
var _default = AllPropertyEditor;
exports["default"] = _default;

/***/ }),

/***/ 92176:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _MultiObjectPropertyEditor = _interopRequireDefault(__webpack_require__(95567));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function AttributeEditor() {
  _MultiObjectPropertyEditor["default"].call(this);
}
Object.defineProperties(AttributeEditor.prototype, Object.getOwnPropertyDescriptors(_MultiObjectPropertyEditor["default"].prototype));
_MultiObjectPropertyEditor["default"].prototype.constructor = AttributeEditor;
AttributeEditor.prototype.setProperty = function (object, name, value) {
  return object.setAttribute(name, value);
};
AttributeEditor.prototype.getProperty = function (object, name) {
  return object.getAttribute(name);
};
AttributeEditor.prototype.getPropertyDescriptor = function (object, name) {
  return object.getAttributeDescriptor(name);
};
AttributeEditor.prototype.getPropertyNames = function (object) {
  return object.getAcceptsAttributeNames();
};
var _default = AttributeEditor;
exports["default"] = _default;

/***/ }),

/***/ 36243:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _absolBrace = _interopRequireDefault(__webpack_require__(90834));
__webpack_require__(39917);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;
function CodeEditor() {
  _BaseEditor["default"].call(this);
  this.aceEditor = null;
  this._openningData = {
    type: 'txt',
    value: ''
  };
}
Object.defineProperties(CodeEditor.prototype, Object.getOwnPropertyDescriptors(_BaseEditor["default"].prototype));
CodeEditor.prototype.constructor = CodeEditor;
CodeEditor.prototype.TYPE_MODE = {
  js: 'ace/mode/javascript',
  txt: 'ace/mode/plain_text',
  json: 'ace/mode/json',
  md: 'ace/mode/markdown',
  html: 'ace/mode/html',
  css: 'ace/mode/css',
  LICENSE: 'ace/mode/plain_text'
};
CodeEditor.prototype.createView = function () {
  this.$view = _({
    tag: 'pre',
    "class": 'as-code-editor'
  });
  this.aceEditor = _absolBrace["default"].ace.edit(this.$view);
};

/**
 * @param {{type:String, value: String}} data
 */
CodeEditor.prototype.setData = function (data) {
  this._openningData = data;
  this.aceEditor.setValue(data.value);
  this.aceEditor.setOption('mode', this.TYPE_MODE[data.type] || this.TYPE_MODE.txt);
  this.aceEditor.setOptions({
    enableBasicAutocompletion: true,
    enableSnippets: true
  });
};
CodeEditor.prototype.getData = function () {
  var value = this.aceEditor.getValue();
  return Object.assign({}, this._openningData, {
    value: value
  });
};
var _default = CodeEditor;
exports["default"] = _default;

/***/ }),

/***/ 50571:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(59019);
var _AttributeEditor = _interopRequireDefault(__webpack_require__(92176));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _StyleEditor = _interopRequireDefault(__webpack_require__(66498));
var _AllPropertyEditor = _interopRequireDefault(__webpack_require__(8122));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;
function ComponentPropertiesEditor(editor) {
  _BaseEditor["default"].call(this);
  this.editor = editor;
  var self = this;
  var repeatEvents = {
    change: function change(event) {
      self.emit('change', Object.assign({
        componentPropertiesEditor: self
      }, event), self);
    },
    stopchange: function stopchange(event) {
      self.emit('stopchange', Object.assign({
        componentPropertiesEditor: self
      }, event), self);
    }
  };
  this.attributeEditor = new _AttributeEditor["default"]().on(repeatEvents).on('stopchange', function (event) {
    self.allPropertyEditor.updatePropertyRecursive(event.name);
  });
  this.styleEditor = new _StyleEditor["default"]().on(repeatEvents).on('stopchange', function (event) {
    self.allPropertyEditor.updatePropertyRecursive(event.name);
  });
  this.allPropertyEditor = new _AllPropertyEditor["default"]().on(repeatEvents).on('stopchange', function (event) {
    self.attributeEditor.updatePropertyRecursive(event.name);
    self.styleEditor.updatePropertyRecursive(event.name);
  });
  this.$dockElt = null;
  this.component = undefined;
}
Object.defineProperties(ComponentPropertiesEditor.prototype, Object.getOwnPropertyDescriptors(_BaseEditor["default"].prototype));
ComponentPropertiesEditor.prototype.constructor = ComponentPropertiesEditor;
ComponentPropertiesEditor.prototype.CONFIG_STORE_KEY = "AS_ComponentPropertiesEditor_config";
ComponentPropertiesEditor.prototype.config = {};
ComponentPropertiesEditor.prototype.getView = function () {
  if (this.$view) return this.$view;
  var thisEditor = this;
  this.$attachhook = _('attachhook');
  this.$view = _({
    tag: 'tabview',
    "class": ["as-form-component-properties-editor", 'xp-tiny'],
    child: [{
      tag: 'tabframe',
      "class": 'absol-bscroller',
      attr: {
        name: 'Attribute'
      },
      child: this.attributeEditor.getView()
    }, {
      tag: 'tabframe',
      attr: {
        name: 'Style'
      },
      child: this.styleEditor.getView()
    }, {
      tag: 'tabframe',
      "class": 'absol-bscroller',
      attr: {
        name: 'All'
      },
      child: this.allPropertyEditor.getView()
    }]
  });
  this.$view.appendChild(this.$attachhook);
  this.$attachhook.requestUpdateSize = this.updateSize.bind(this);
  _ResizeSystem["default"].add(this.$attachhook);
  this.$quickmenuBtn = _({
    tag: 'button',
    "class": ['as-form-component-properties-editor-quickmenu-button', 'as-from-tool-button'],
    child: 'span.mdi.mdi-dots-horizontal'
  });
  _QuickMenu["default"].toggleWhenClick(this.$quickmenuBtn, {
    getMenuProps: function getMenuProps() {
      return {
        extendStyle: {
          'font-size': '12px'
        },
        items: [{
          text: 'Undock',
          icon: 'span.mdi.mdi-dock-window',
          cmd: 'undock'
        }, {
          text: 'Help',
          icon: 'span.mdi.mdi-help'
        }]
      };
    },
    onSelect: function onSelect(item) {
      switch (item.cmd) {
        case 'undock':
          break;
      }
    }
  });
  this.$view.appendChild(this.$quickmenuBtn);
  return this.$view;
};
ComponentPropertiesEditor.prototype.onAttached = function () {
  this.setContext(_R["default"].ATTRIBUTE_EDITOR, this.attributeEditor);
  this.setContext(_R["default"].STYLE_EDITOR, this.styleEditor);
  this.setContext(_R["default"].ALL_PROPERTY_EDITOR, this.allPropertyEditor);
  this.attributeEditor.attach(this);
  this.styleEditor.attach(this);
  this.allPropertyEditor.attach(this);
};
ComponentPropertiesEditor.prototype.onStart = function () {
  this.getView();
  this.attributeEditor.start();
  this.styleEditor.start();
  this.allPropertyEditor.start();
};
ComponentPropertiesEditor.prototype.onDestroy = function () {
  this.attributeEditor.destroy();
  this.styleEditor.destroy();
  this.allPropertyEditor.destroy();
};
ComponentPropertiesEditor.prototype.onPause = function () {
  this.attributeEditor.pause();
  this.styleEditor.pause();
  this.allPropertyEditor.pause();
};
ComponentPropertiesEditor.prototype.onResume = function () {
  this.attributeEditor.resume();
  this.styleEditor.resume();
  this.allPropertyEditor.resume();
};
ComponentPropertiesEditor.prototype.edit = function () {
  this.component = arguments[0];
  this.components = Array.prototype.slice.call(arguments);
  this.styleEditor.edit.apply(this.styleEditor, arguments);
  this.attributeEditor.edit.apply(this.attributeEditor, arguments);
  this.allPropertyEditor.edit.apply(this.allPropertyEditor, arguments);
};
ComponentPropertiesEditor.prototype.updateSize = function () {
  var ateB = this.attributeEditor.getBound();
  var steB = this.styleEditor.getBound();
  var aleB = this.allPropertyEditor.getBound();
  var width = Math.max(ateB.width, steB.width, aleB.width);
  var height = Math.max(ateB.height, steB.height, aleB.height);
  if (width > 0 && height > 0) {
    this.$view.addStyle('min-width', Math.max(200, width) + 'px').addStyle('height', height + 'px');
  }
  this.$view.addStyle('max-height', '100%');
};
var _default = ComponentPropertiesEditor;
exports["default"] = _default;

/***/ }),

/***/ 31642:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.FormPreviewTask = FormPreviewTask;
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _Assembler = _interopRequireDefault(__webpack_require__(2326));
__webpack_require__(35196);
var _R = _interopRequireDefault(__webpack_require__(25280));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _FormPreviewCmd = _interopRequireWildcard(__webpack_require__(25195));
var _FmFragment = __webpack_require__(9098);
var _CMDTool = _interopRequireDefault(__webpack_require__(8982));
var _FLTask = _interopRequireDefault(__webpack_require__(95778));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;
function FormPreview() {
  _BaseEditor["default"].call(this);
  _Assembler["default"].call(this);
  this.cmdRunner.assign(_FormPreviewCmd["default"]);
  this.cmdTool = new _CMDTool["default"]();
  this.data = null;
  this.dataFlushed = true;
  this.cmdTool.bindWithEditor(this);
}
Object.defineProperties(FormPreview.prototype, Object.getOwnPropertyDescriptors(_BaseEditor["default"].prototype));
Object.defineProperties(FormPreview.prototype, Object.getOwnPropertyDescriptors(_Assembler["default"].prototype));
FormPreview.prototype.constructor = FormPreview;
FormPreview.prototype.onStart = function () {
  this.cmdTool.start();
};
FormPreview.prototype.onResume = function () {
  this.flushDataToView();
};
FormPreview.prototype.getView = function () {
  if (this.$view) return this.$view;
  var self = this;
  this.$view = _({
    tag: 'bscroller',
    "class": 'as-form-preview',
    child: [{
      "class": 'as-form-preview-size-setting',
      child: [{
        tag: 'span',
        child: {
          text: 'Size : '
        }
      }, {
        tag: 'input',
        "class": 'as-input-width',
        props: {
          type: 'number',
          min: '0'
        },
        on: {
          change: this.ev_sizeInputChange.bind(this)
        }
      }, {
        tag: 'span',
        child: {
          text: ' x '
        }
      }, {
        tag: 'input',
        "class": 'as-input-height',
        props: {
          type: 'number',
          min: '0'
        },
        on: {
          change: this.ev_sizeInputChange.bind(this)
        }
      }]
    }, {
      "class": 'as-form-preview-content'
    }],
    on: {
      sizechange: this.ev_sizeChange.bind(this)
    }
  });
  this.$content = $('.as-form-preview-content', this.$view);
  this.$widthIp = $('input.as-input-width', this.$view);
  this.$heightIp = $('input.as-input-height', this.$view);
  this.refresh();
  return this.$view;
};
FormPreview.prototype.refresh = function () {
  var data;
  var editor = this.getContext(_R["default"].LAYOUT_EDITOR);
  if (editor) data = editor.getData();
  if (data) this.setData(data);
};
FormPreview.prototype.ev_sizeChange = function (event) {
  _Dom["default"].updateResizeSystem.bind(_Dom["default"]);
  var bound = this.$view.getBoundingClientRect();
  var contentBound = (this.$content.children.length > 0 ? this.$content.children[0] : this.$content).getBoundingClientRect();
  this.$content.addStyle({
    width: bound.width + 'px',
    height: bound.height - (contentBound.top - bound.top) + 'px'
  });
};
FormPreview.prototype.flushDataToView = function () {
  if (this.dataFlushed) return;
  this.dataFlushed = true;
  //TODO: remove older view
  if (!this.data) return;
  this.$content.clearChild();
  if (this.data && this.$view) {
    if (this.previewFrg) {
      this.previewFrg.stop();
      this.previewFrg.destroy();
    }
    this.PreviewClass = (0, _FmFragment.makeFmFragmentClass)({
      tag: 'preview',
      contentViewData: this.data
    });
    this.previewFrg = new this.PreviewClass();
    this.rootComponent = this.previewFrg.view;
    this.$content.addChild(this.rootComponent.domElt);
    this.$widthIp.value = this.rootComponent.getStyle('width', 'px');
    this.$heightIp.value = this.rootComponent.getStyle('height', 'px');
    this.previewFrg.start();
  }
};
FormPreview.prototype.setData = function (data) {
  this.data = data;
  this.data.tracking = "OK";
  this.dataFlushed = false;
  if (this.state == "RUNNING") this.flushDataToView();
};
FormPreview.prototype.getCmdNames = function () {
  return Object.keys(_FormPreviewCmd["default"]);
};
FormPreview.prototype.getCmdDescriptor = function (name) {
  var res = Object.assign({
    type: 'trigger',
    desc: 'command: ' + name,
    icon: 'span.mdi.mdi-apple-keyboard-command'
  }, _FormPreviewCmd.FormPreviewCmdDescriptors[name]);
  return res;
};
FormPreview.prototype.getCmdGroupTree = function () {
  return ['reload'];
};
FormPreview.prototype.ev_sizeInputChange = function () {
  var width = this.$widthIp.value;
  var height = this.$heightIp.value;
  if (this.rootComponent) {
    this.rootComponent.setStyle('width', width);
    this.rootComponent.setStyle('height', height);
  }
};
FormPreview.prototype.onStop = function () {
  if (this.previewFrg) {
    this.previewFrg.stop();
    this.previewFrg.destroy();
  }
};
var _default = FormPreview;
exports["default"] = _default;
function FormPreviewTask() {
  _FLTask["default"].apply(this, arguments);
}
_OOP["default"].mixClass(FormPreviewTask, _FLTask["default"]);
FormPreviewTask.prototype.MainFragmentClass = FormPreview;

/***/ }),

/***/ 79266:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
__webpack_require__(97121);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;
function ListEditor() {
  _Context["default"].call(this);
  _EventEmitter["default"].call(this);
  this._data = [];
  this._lashHashValue = -1.1;
}
Object.defineProperties(ListEditor.prototype, Object.getOwnPropertyDescriptors(_Context["default"].prototype));
Object.defineProperties(ListEditor.prototype, Object.getOwnPropertyDescriptors(_EventEmitter["default"].prototype));
ListEditor.prototype.constructor = ListEditor;
ListEditor.prototype.getView = function () {
  if (this.$view) return this.$view;
  var self = this;
  this.$view = _({
    tag: 'table',
    "class": 'as-list-editor',
    child: [{
      tag: 'thead',
      child: [{
        tag: 'tr',
        child: [{
          tag: 'td',
          child: {
            text: 'Text'
          }
        }, {
          tag: 'td',
          child: {
            text: 'Value'
          }
        }, {
          tag: 'td'
        }]
      }]
    }, {
      tag: 'tbody',
      child: [{
        tag: 'tr',
        "class": 'as-list-editor-add-row',
        child: {
          tag: 'td',
          attr: {
            colspan: '3'
          },
          child: ['span.mdi.mdi-plus', {
            tag: 'span',
            child: {
              text: 'Add new item'
            }
          }]
        }
      }]
    }]
  });
  this.$body = $('tbody', this.$view);
  this.$addRow = $('.as-list-editor-add-row', this.$view).on('click', function () {
    self.appendRowElement();
  });
  this.updateData();
  return this.$view;
};
ListEditor.prototype.updateData = function () {
  if (!this.$view) return;
  if (this._lashHashValue == this.getDataHash()) return;
  this.$body.clearChild();
  var self = this;
  this.$items = this._data.map(function (item) {
    return self.makeNewRow(item).addTo(self.$body);
  });
  this.$body.addChild(this.$addRow);
  this.checkEmpty();
  this.checkDuplicate();
};
ListEditor.prototype.makeNewRow = function (data) {
  var self = this;
  var itemRow = _({
    tag: 'tr',
    "class": 'as-list-editor-row',
    child: [{
      tag: 'td',
      "class": ['as-list-editor-cell'],
      child: [{
        tag: 'span',
        "class": 'as-list-editor-text',
        attr: {
          contenteditable: 'true'
        },
        child: {
          text: data.text
        }
      }]
    }, {
      tag: 'td',
      "class": ['as-list-editor-cell'],
      child: {
        tag: 'span',
        "class": 'as-list-editor-value',
        attr: {
          contenteditable: 'true'
        },
        child: {
          text: '' + data.value
        }
      }
    }, {
      tag: 'td',
      child: {
        tag: 'button',
        "class": 'as-list-editor-quick-menu-trigger',
        child: {
          tag: 'span',
          "class": ['mdi', 'mdi-dots-vertical']
        }
      }
    }]
  });
  itemRow.__data__ = data;
  itemRow.$textInput = $('.as-list-editor-text', itemRow).on('keydown', function (event) {
    if (event.key == 'Enter') {
      event.preventDefault();
      this.blur();
    }
  }).on('blur', function () {
    var newText = itemRow.$textInput.innerText.trim();
    if (data.text != newText) {
      data.text = newText;
      if (self.checkEmpty() && self.checkDuplicate()) {
        self.notifyChange();
      }
    }
  });
  (0, _utils.contenteditableTextOnly)(itemRow.$textInput, function (text) {
    return text.replace(/[\r\n]/g, '');
  });
  if ((data.text + '').trim() == '') {
    itemRow.$textInput.parentNode.addClass('empty-cell');
  }
  itemRow.$valueInput = $('.as-list-editor-value', itemRow).on('keydown', function (event) {
    if (event.key == 'Enter') {
      event.preventDefault();
      this.blur();
    }
  }).on('blur', function () {
    var newValue = itemRow.$valueInput.innerText.trim();
    if (data.value != newValue) {
      data.value = newValue;
      if (self.checkEmpty() && self.checkDuplicate()) {
        self.notifyChange();
      }
    }
  });
  (0, _utils.contenteditableTextOnly)(itemRow.$valueInput, function (text) {
    return text.replace(/[\r\n]/g, '');
  });
  if ((data.value + '').trim() == '') {
    itemRow.$valueInput.parentNode.addClass('empty-cell');
  }
  itemRow.$menuTrigger = $('.as-list-editor-quick-menu-trigger', itemRow);
  itemRow.quickMenuData = _QuickMenu["default"].toggleWhenClick(itemRow.$menuTrigger, {
    getMenuProps: function getMenuProps() {
      return {
        extendStyle: {
          'font-size': '12px'
        },
        items: [{
          icon: '.mdi.mdi-table-row-plus-before',
          text: 'Insert Row Before',
          cmd: 'insert-before'
        }, {
          icon: '.mdi.mdi-table-row-plus-after',
          text: 'Insert Row After',
          cmd: 'insert-after'
        }, {
          icon: '.mdi.mdi-table-row-remove',
          text: 'Remove',
          cmd: 'remove'
        }]
      };
    },
    onSelect: function onSelect(itemElt) {
      switch (itemElt.cmd) {
        case 'remove':
          self.removeRowByElt(itemRow);
          break;
        case 'insert-before':
          self.insertRowBeforeElt(itemRow);
          break;
        case 'insert-after':
          self.insertRowAfterElt(itemRow);
          break;
      }
    }
  });
  return itemRow;
};

/**
 * @returns {Boolean}
 */
ListEditor.prototype.checkDuplicate = function () {
  var res = true;
  var textDict = {};
  var valueDict = {};
  var rows = Array.apply(null, this.$body.childNodes);
  var row;
  for (var i = 0; i < rows.length; ++i) {
    row = rows[i];
    if (row.__data__ && (row.__data__.text + '').trim() != '') {
      if (textDict[row.__data__.text]) {
        row.$textInput.parentNode.addClass('duplicate-cell');
      } else {
        textDict[row.__data__.text] = true;
        row.$textInput.parentNode.removeClass('duplicate-cell');
      }
    }
    if (row.__data__ && (row.__data__.value + '').trim() != '') {
      if (valueDict[row.__data__.value]) {
        row.$valueInput.parentNode.addClass('duplicate-cell');
        res = false;
      } else {
        valueDict[row.__data__.value] = true;
        row.$valueInput.parentNode.removeClass('duplicate-cell');
      }
    }
  }
  ;
  return res;
};

/**
 * @returns {Boolean}
 */
ListEditor.prototype.checkEmpty = function () {
  var res = true;
  var rows = Array.apply(null, this.$body.childNodes);
  var row;
  for (var i = 0; i < rows.length; ++i) {
    row = rows[i];
    if (row.__data__) {
      if (!row.__data__.text || row.__data__.text.trim() == '') {
        res = false;
        row.$textInput.parentNode.addClass('empty-cell');
      } else {
        row.$textInput.parentNode.removeClass('empty-cell');
      }
      if (!row.__data__.value || row.__data__.value.trim() == '') {
        res = false;
        row.$valueInput.parentNode.addClass('empty-cell');
      } else {
        row.$valueInput.parentNode.removeClass('empty-cell');
      }
    }
  }
  ;
  return res;
};
ListEditor.prototype.removeRowByElt = function (rowElement) {
  rowElement.remove();
  this._data = this._data.filter(function (item) {
    return rowElement.__data__ != item;
  });
  if (this.checkEmpty() && this.checkDuplicate()) {
    this.notifyChange();
  }
};
ListEditor.prototype.removeRowByData = function (rowData) {
  this._data = this._data.filter(function (item) {
    return rowData != item;
  });
  if (this.$view) $('.as-list-editor-row', this.$view, function (elt) {
    if (elt.__data__ == rowData) elt.remove();
    return true;
  });
  if (this.checkEmpty() && this.checkDuplicate()) {
    this.notifyChange();
  }
};
ListEditor.prototype.insertRowBeforeElt = function (elt) {
  var itemData = {
    text: '',
    value: ''
  };
  var res = this.makeNewRow(itemData);
  this.$body.addChildBefore(res, elt);
  var index = this._data.indexOf(elt.__data__);
  this._data.splice(index, 0, itemData);
  return res;
};
ListEditor.prototype.insertRowAfterElt = function (elt) {
  var itemData = {
    text: '',
    value: ''
  };
  var res = this.makeNewRow(itemData);
  this.$body.addChildAfter(res, elt);
  var index = this._data.indexOf(elt.__data__);
  this._data.splice(index + 1, 0, itemData);
  return res;
};
ListEditor.prototype.appendRowElement = function () {
  var itemData = {
    text: '',
    value: ''
  };
  var res = this.makeNewRow(itemData);
  this.$body.addChildBefore(res, this.$addRow);
  this._data.push(itemData);
  if (this.checkEmpty() && this.checkDuplicate()) {
    this.notifyChange();
  }
  return res;
};
ListEditor.prototype.setData = function (items) {
  items = items || [];
  this._data = items;
  this.updateData();
};
ListEditor.prototype.getData = function () {
  return this._data; //todo
};

/**
 * @returns {Number}
 */
ListEditor.prototype.getDataHash = function () {
  return this.data2Hash(this._data || []);
};
ListEditor.prototype.data2Hash = function (data) {
  return data.reduce(function (hash, item, idx) {
    var c;
    var s = idx + ':' + item.text + ':' + item.value;
    for (var i = 0; i < s.length; ++i) {
      c = s.charCodeAt(i);
      hash = (hash << 5) - hash + c;
      hash |= 0;
    }
    return hash;
  }, 0);
};
ListEditor.prototype.notifyChange = function () {
  var currentHash = this.getDataHash();
  if (this._lashHashValue != currentHash) {
    this._lashHashValue = currentHash;
    this.emit('change', {
      target: this,
      hash: currentHash
    }, this);
  }
};
var _default = ListEditor;
exports["default"] = _default;

/***/ }),

/***/ 45741:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PhotoSwipeFrag = _interopRequireDefault(__webpack_require__(93713));
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _Context = _interopRequireDefault(__webpack_require__(16311));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function PhotoViewer() {
  _BaseEditor["default"].call(this);
  _PhotoSwipeFrag["default"].call(this);
}
Object.assign(PhotoViewer.prototype, _PhotoSwipeFrag["default"].prototype);
for (var prot in _BaseEditor["default"].prototype) {
  if (_BaseEditor["default"].prototype[prot] == _Context["default"].prototype[prot]) continue;
  if (PhotoViewer.prototype[prot] != _Context["default"].prototype[prot]) continue;
  PhotoViewer.prototype[prot] = _BaseEditor["default"].prototype[prot];
}
PhotoViewer.prototype.constructor = PhotoViewer;
PhotoViewer.prototype.setData = function (data) {
  var self = this;
  if (data.images) {
    data.images.forEach(function (photoItem) {
      self.push(photoItem);
    });
  }
};
var _default = PhotoViewer;
exports["default"] = _default;

/***/ }),

/***/ 96714:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
__webpack_require__(75628);
var _stringFormat = __webpack_require__(22294);
var _datetime = __webpack_require__(58286);
var _ListEditor = _interopRequireDefault(__webpack_require__(79266));
var _GoogleFont = __webpack_require__(68117);
__webpack_require__(9915);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _base = __webpack_require__(6954);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
// FontIconPicker

var _ = _FCore["default"]._;
var $ = _FCore["default"].$;
function PropertyEditor() {
  _Context["default"].call(this);
  _EventEmitter["default"].call(this);
  this.dependents = {};
  this.$view = null;
  this.propertyHolders = {};
  /**
   * @type {import('../core/BaseComponent').default}
   */
  this.object = null;
  this.propertyNames = [];
  this.$needUpdate = []; // all element which had .as-need-update
  this.queuePools = {};
}
Object.defineProperties(PropertyEditor.prototype, Object.getOwnPropertyDescriptors(_Context["default"].prototype));
Object.defineProperties(PropertyEditor.prototype, Object.getOwnPropertyDescriptors(_EventEmitter["default"].prototype));
PropertyEditor.prototype.constructor = PropertyEditor;
PropertyEditor.prototype.pools = {}; //share object

PropertyEditor.prototype.onDestroy = function () {
  this.flushAllToPools();
};
PropertyEditor.prototype.edit = function (object) {
  this.object = object;
  this.loadAttributes();
};
PropertyEditor.prototype.setProperty = function (name, value) {
  return this.object[name] = value;
};
PropertyEditor.prototype.getProperty = function (name) {
  return this.object[name];
};
PropertyEditor.prototype.getPropertyDescriptor = function (name) {
  return {
    type: _typeof(this.object)
  };
};
PropertyEditor.prototype.getPropertyNames = function () {
  return Object.keys(this.object);
};
PropertyEditor.prototype.flushAllToPools = function () {
  var self = this;
  Object.keys(this.queuePools).forEach(function (key) {
    self.pools[key] = self.pools[key] === undefined ? [] : self.pools[key];
    var all = self.queuePools[key].splice(0);
    self.pools[key].push.apply(self.pools[key], all);
  });
};
PropertyEditor.prototype.assignToPool = function (key, value) {
  this.queuePools[key] = this.queuePools[key] === undefined ? [] : this.queuePools[key];
  if (value.__pool_assign__) {
    console.warn("Pool: reassign object", key, value);
  } else {
    value.__pool_assign__ = true;
    this.queuePools[key].push(value);
  }
};
PropertyEditor.prototype.putOnceFromPool = function (key) {
  var res = null;
  if (this.pools[key] && this.pools[key].length > 0) {
    res = this.pools[key].pop();
  }
  if (res) res.__pool_assign__ = false;
  return res;
};
PropertyEditor.prototype.loadAttributes = function () {
  var self = this;
  this.flushAllToPools();
  self.$body.clearChild();
  this.clearAllDependents();
  this.propertyNames = [];
  this.$rows = [];
  this.$needUpdate = [];
  if (!this.object) return;
  this.propertyNames = this.getPropertyNames();
  this.propertyHolders = {};
  this.propertyNames.forEach(function (name) {
    var descriptor = self.getPropertyDescriptor(name) || {
      type: "NoDescriptor"
    };
    if (descriptor.dependency) {
      self.addDependents(name, descriptor.dependency);
    }
    var functionName = 'load' + (0, _stringFormat.camelCaseToPascalCase)(descriptor.type) + 'Property';
    var cell = _('td');
    if (!self[functionName]) {
      // throw new Error('Not support type' + descriptor.type + '!')
      functionName = 'loadNotSupportedProperty';
    }
    ;
    var rowElt = _({
      tag: 'tr',
      child: [{
        tag: 'td',
        child: {
          text: name
        }
      }, cell]
    });
    rowElt.addTo(self.$body);
    self.propertyHolders[name] = self[functionName](name, descriptor, cell, cell);
  });
};
PropertyEditor.prototype.loadNotSupportedProperty = function (name, descriptor, cell, cellElt) {
  cellElt.addChild(_({
    text: 'Not supported '
  })).addChild(_({
    tag: 'strong',
    child: {
      text: descriptor.type
    }
  }));
  return {};
};
PropertyEditor.prototype.loadEnumProperty = function (name, descriptor, cell) {
  var self = this;
  var res = {};
  var selectMenu = descriptor.sign ? this.putOnceFromPool(descriptor.sign) : null;
  if (selectMenu === null) {
    selectMenu = _({
      tag: 'selectmenu',
      props: {
        items: descriptor.values.map(function (value) {
          return {
            text: value + "",
            value: value
          };
        }),
        value: this.getProperty(name)
      },
      on: {
        change: function change() {
          this.peditor.setProperty(name, this.value);
          this.peditor.notifyChange(name, this);
          this.peditor.notifyStopChange(name);
        }
      }
    });
  }
  if (descriptor.sign) this.assignToPool(descriptor.sign, selectMenu);
  selectMenu.value = this.getProperty(name);
  selectMenu.peditor = this;
  res.requestUpdate = function () {
    var value = self.getProperty(name);
    if (value != this.value) {
      selectMenu.value = value;
    }
  };
  cell.addChild(selectMenu);
  return res;
};
PropertyEditor.prototype.loadFontProperty = function (name, descriptor, cell) {
  var self = this;
  var res = {};
  var fontInput = descriptor.sign ? this.putOnceFromPool(descriptor.sign) : null;
  if (fontInput === null) {
    fontInput = _({
      tag: 'selectmenu',
      "class": 'as-need-update',
      props: {
        items: [{
          text: 'None',
          value: undefined
        }].concat(_GoogleFont.FONT_ITEMS)
      },
      on: {
        change: function change() {
          this.peditor.setProperty(name, this.value);
          this.peditor.notifyChange(name, this);
          this.peditor.notifyStopChange(name);
        }
      }
    });
  }
  if (descriptor.sign) this.assignToPool(descriptor.sign, fontInput);
  fontInput.value = this.getProperty(name);
  fontInput.peditor = this;
  res.elt = fontInput;
  cell.addChild(res.elt);
  res.requestUpdate = function () {
    var value = self.getProperty(name);
    if (value != fontInput.value) {
      fontInput.value = value;
    }
  };
  return res;
};
PropertyEditor.prototype.loadConstProperty = function (name, descriptor, cell) {
  var self = this;
  var res = {};
  res.elt = _({
    tag: 'strong',
    child: {
      text: '' + descriptor.value
    }
  });
  cell.addChild(res.elt);
  return res;
};
PropertyEditor.prototype.loadTextProperty = function (name, descriptor, cell) {
  var self = this;
  var res = {};
  res.elt = _({
    tag: descriptor["long"] ? 'textarea' : 'input',
    attr: {
      type: 'text'
    },
    on: {
      keyup: function keyup() {
        self.setProperty(name, this.value);
        self.notifyChange(name, this);
      },
      change: function change() {
        self.notifyStopChange(name);
      }
    }
  });
  cell.addChild(res.elt);
  res.requestUpdate = function () {
    var value = self.getProperty(name);
    if (value != this.value) {
      res.elt.value = value;
    }
  };
  res.requestUpdate();
  return res;
};
PropertyEditor.prototype.loadUniqueTextProperty = function (name, descriptor, cell) {
  var self = this;
  var res = {};
  res.elt = _({
    tag: descriptor["long"] ? 'textarea' : 'input',
    attr: {
      type: 'text'
    },
    on: {
      keyup: function keyup() {
        if (descriptor.others[this.value]) {
          this.addStyle('border-color', '#f99');
          this.attr('title', 'This name is used!');
        } else {
          this.attr('title', null);
          this.removeStyle('border-color');
        }
        self.setProperty(name, this.value);
        self.notifyChange(name, this);
      },
      change: function change() {
        if (descriptor.others[this.value]) {
          this.addStyle('border-color', '#f99');
          this.attr('title', 'This name is used!');
        } else {
          this.attr('title', null);
          this.removeStyle('border-color');
        }
        self.notifyStopChange(name);
      }
    }
  });
  cell.addChild(res.elt);
  res.requestUpdate = function () {
    var value = self.getProperty(name);
    if (value != this.value) {
      res.elt.value = value;
    }
  };
  res.requestUpdate();
  return res;
};
PropertyEditor.prototype.loadBoolProperty = function (name, descriptor, cell) {
  var self = this;
  var res = {};
  res.elt = _({
    tag: 'checkboxbutton',
    "class": 'as-need-update',
    props: {
      checked: this.getProperty(name),
      notifyChange: function notifyChange() {}
    },
    on: {
      change: function change() {
        self.setProperty(name, this.checked);
        self.notifyChange(name, this);
        self.notifyStopChange(name);
      }
    }
  });
  res.requestUpdate = function () {
    var value = self.getProperty(name);
    if (value != res.elt.checked) {
      res.elt.checked = value;
    }
  };
  cell.addChild(res.elt);
  return res;
};
PropertyEditor.prototype.loadDateProperty = function (name, descriptor, cell) {
  var self = this;
  var res = {};
  res.calendarInput = _({
    tag: 'calendarinput',
    props: {
      disabled: descriptor.disabled,
      value: self.getProperty(name)
    },
    on: {
      change: function change() {
        self.setProperty(name, this.value);
        self.notifyChange(name, this);
        res.nullCheckElt.checked = false;
        self.notifyStopChange(name);
      }
    }
  });
  cell.addChild(res.calendarInput);
  res.nullCheckElt = _({
    tag: 'checkbox',
    style: {
      marginLeft: '10px'
    },
    props: {
      text: 'NULL'
    },
    on: {
      change: function change() {
        if (this.checked) {
          self.setProperty(name, null);
        } else {
          self.setProperty(name, (0, _datetime.beginOfDay)(new Date()));
        }
        self.notifyChange(name, this);
        self.notifyStopChange(name);
      }
    }
  });
  cell.addChild(res.nullCheckElt);
  res.requestUpdate = function () {
    var value = self.getProperty(name);
    if (!value) {
      res.calendarInput.value = null;
      res.nullCheckElt.checked = true;
    } else {
      res.calendarInput.value = value;
      res.nullCheckElt.checked = false;
    }
    res.calendarInput.disabled = self.getPropertyDescriptor(name).disabled;
  };
  return res;
};
PropertyEditor.prototype.loadNumberProperty = function (name, descriptor, cell) {
  var self = this;
  var numberInput = this.putOnceFromPool("NUMBER_INPUT"); //same with all sign
  if (numberInput === null) {
    numberInput = _({
      tag: 'numberinput',
      "class": 'as-need-update',
      props: {},
      on: {
        change: function change(event) {
          if (event.by == 'keyup') return;
          if (!descriptor.livePreview && event.by == 'long_press_button') return;
          this.peditor.setProperty(this._propertyName, this.value);
          this.peditor.notifyChange(this._propertyName, this);
          if (event.by != 'long_press_button') this.peditor.notifyStopChange(this._propertyName);
        }
      }
    });
  }
  if (descriptor.sign) this.assignToPool(descriptor.sign, numberInput);
  numberInput.min = typeof descriptor.min == 'number' ? descriptor.min : -Infinity;
  numberInput.max = typeof descriptor.max == 'number' ? descriptor.max : Infinity;
  numberInput.value = this.getProperty(name);
  numberInput.disabled = descriptor.disabled;
  numberInput._propertyName = name;
  numberInput.peditor = this;
  var res = {
    elt: numberInput
  };
  res.requestUpdate = function () {
    var value = self.getProperty(name);
    if (value === null) res.elt.value = descriptor.defaultValue;else res.elt.value = value;
    res.elt.disabled = self.getPropertyDescriptor(name).disabled;
  };
  cell.addChild(res.elt);
  //todo NULL
  return res;
};
PropertyEditor.prototype.loadIconProperty = function (name, descriptor, cell) {
  var self = this;
  var res = {};
  //todo: disabled
  res.elt = _({
    tag: 'fonticoninput',
    "class": 'as-need-update',
    props: {
      value: self.getProperty(name),
      disabled: descriptor.disabled
    },
    on: {
      change: function change(event) {
        self.setProperty(name, this.value);
        self.notifyStopChange(name, this);
      }
    }
  });
  cell.addChild(res.elt);
  res.requestUpdate = function () {
    res.elt.value = self.getProperty(name);
  };
  return res;
};
PropertyEditor.prototype.loadListProperty = function (name, descriptor, cell) {
  var self = this;
  var listEditor = new _ListEditor["default"]();
  var res = {};
  res.elt = listEditor.getView();
  cell.addChild(res.elt);
  listEditor.on('change', function () {
    self.setProperty(name, this.getData());
    self.notifyStopChange(name);
  });
  listEditor.start();
  // res.
  listEditor.setData(this.getProperty(name));
  return res;
};
PropertyEditor.prototype.loadTextAlignProperty = function (name, descriptor, cell) {
  var self = this;
  var icons = {
    left: 'mdi-format-align-left',
    right: 'mdi-format-align-right',
    center: 'mdi-format-align-center'
  };
  var res = {};
  res.elt = _({
    tag: 'button',
    "class": 'as-property-editor-text-align-input',
    child: 'span.mdi'
  });
  cell.addChild(res.elt);
  var $button = res.elt;
  var $icon = $('span.mdi', $button);
  var lasIconClass = icons[this.getProperty(name)] || icons.left;
  $icon.addClass(lasIconClass);
  res.requestUpdate = function () {
    $icon.removeClass(lasIconClass);
    lasIconClass = icons[self.getProperty(name)] || icons.left;
    $icon.addClass(lasIconClass);
  };
  var self = this;
  _QuickMenu["default"].toggleWhenClick($button, {
    getMenuProps: function getMenuProps() {
      return {
        items: [{
          text: 'Left',
          icon: 'span.mdi.mdi-format-align-left',
          menuData: 'left'
        }, {
          text: 'Center',
          icon: 'span.mdi.mdi-format-align-center',
          menuData: 'center'
        }, {
          text: 'Right',
          icon: 'span.mdi.mdi-format-align-right',
          menuData: 'right'
        }]
      };
    },
    onSelect: function onSelect(item) {
      $icon.removeClass(lasIconClass);
      lasIconClass = icons[item.menuData];
      $icon.addClass(lasIconClass);
      self.setProperty(name, item.menuData);
      self.notifyStopChange(name);
    }
  });
  return res;
};
PropertyEditor.prototype.loadBoxAlignProperty = function (name, descriptor, cell) {
  var self = this;
  var icons = {
    lefttop: 'm0 0v24h24v-24zm1 1h22v22h-22zm2 2h10.3v2h-10.3v-2m0 4h14v2h-14v-2m0 4h9.9v2h-9.9v-2',
    centertop: 'm24 24v-24h-24v24zm-1-1h-22v-22h22zm-6.05-18h-9.9v-2h9.9v2m2.05 4h-14v-2h14v2m-1.85 4h-10.3v-2h10.3v2',
    righttop: 'm24 0v24h-24v-24zm-1 1h-22v22h22zm-2 2h-10.3v2h10.3v-2m0 4h-14v2h14v-2m0 4h-9.9v2h9.9v-2',
    leftcenter: 'm0 24v-24h24v24zm1-1h22v-22h-22zm2-6h10.3v-2h-10.3v2m0-4h14v-2h-14v2m0-4h9.9v-2h-9.9v2',
    centercenter: 'm0 24v-24h24v24zm1-1h22v-22h-22zm6.05-14h9.9v-2h-9.9v2m-2.05 4h14v-2h-14v2m1.85 4h10.3v-2h-10.3v2',
    rightcenter: 'm24 24v-24h-24v24zm-1-1h-22v-22h22zm-2-6h-10.3v-2h10.3v2m0-4h-14v-2h14v2m0-4h-9.9v-2h9.9v2',
    leftbottom: 'm0 24v-24h24v24zm1-1h22v-22h-22zm2-2h10.3v-2h-10.3v2m0-4h14v-2h-14v2m0-4h9.9v-2h-9.9v2',
    centerbottom: 'm24 0v24h-24v-24zm-1 1h-22v22h22zm-6.05 18h-9.9v2h9.9v-2m2.05-4h-14v2h14v-2m-1.85-4h-10.3v2h10.3v-2',
    rightbottom: 'm24 24v-24h-24v24zm-1-1h-22v-22h22zm-2-2h-10.3v-2h10.3v2m0-4h-14v-2h14v2m0-4h-9.9v-2h9.9v2'
  };
  function makeIcon(path) {
    var data = '<svg width="24" height="24" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\
                    <path d="' + path + '" style="stroke-width:0"/>\
                </svg>';
    return {
      tag: 'img',
      style: {
        'image-rendering': 'pixelated'
      },
      props: {
        src: 'data:image/svg+xml;base64,' + (0, _base.base64EncodeUnicode)(data)
      }
    };
  }
  var res = {};
  res.elt = _('button.as-property-editor-text-align-input', res);
  cell.addChild(res.elt);
  res.elt.addChild(_(makeIcon(icons[this.getProperty(name)] || icons.lefttop)));
  _QuickMenu["default"].toggleWhenClick(res.elt, {
    getMenuProps: function getMenuProps() {
      return {
        items: [{
          text: 'Left-Top',
          icon: makeIcon(icons.lefttop),
          menuData: 'lefttop'
        }, {
          text: 'Center-Top',
          icon: makeIcon(icons.centertop),
          menuData: 'centertop'
        }, {
          text: 'Right-Top',
          icon: makeIcon(icons.righttop),
          menuData: 'righttop'
        }, {
          text: 'Left-Center',
          icon: makeIcon(icons.leftcenter),
          menuData: 'leftcenter'
        }, {
          text: 'Center-Center',
          icon: makeIcon(icons.centercenter),
          menuData: 'centercenter'
        }, {
          text: 'Right-Center',
          icon: makeIcon(icons.rightcenter),
          menuData: 'rightcenter'
        }, {
          text: 'Left-Botttom',
          icon: makeIcon(icons.leftbottom),
          menuData: 'leftbottom'
        }, {
          text: 'Center-Botttom',
          icon: makeIcon(icons.centerbottom),
          menuData: 'centerbottom'
        }, {
          text: 'Right-Botttom',
          icon: makeIcon(icons.rightbottom),
          menuData: 'rightbottom'
        }]
      };
    },
    onSelect: function onSelect(item) {
      res.elt.clearChild().addChild(_(makeIcon(icons[item.menuData])));
      self.setProperty(name, item.menuData);
      self.notifyStopChange(name);
    }
  });
  res.requestUpdate = function () {
    res.elt.clearChild().addChild(_(makeIcon(icons[self.getProperty(name)] || icons.lefttop)));
  };
  return res;
};
PropertyEditor.prototype.loadColorProperty = function (name, descriptor, cell) {
  var self = this;
  var res = {};
  res.elt = _({
    tag: 'colorpickerbutton',
    on: {
      change: function change(event) {
        self.setProperty(name, '#' + event.value.toHex8());
        self.notifyChange(name);
      },
      stopchange: function stopchange(event) {
        self.notifyStopChange(name);
      }
    },
    props: {
      value: 'transparent',
      mode: 'OBJECT'
    }
  });
  cell.addChild(res.elt);
  res.requestUpdate = function () {
    res.elt.value = self.getProperty(name);
  };
  res.requestUpdate();
  return res;
};
PropertyEditor.prototype.loadMeasureSizeProperty = function (name, descriptor, cell) {
  var self = this;
  var res = {};
  cell.addStyle('white-space', 'nowrap');
  res.numberInputElt = _('numberinput').addStyle('margin-right', '5px');
  res.typeSelectElt = _({
    tag: 'selectmenu',
    style: {
      verticalAlign: 'middle'
    },
    props: {
      items: [{
        text: 'px',
        value: 'px'
      }, {
        text: '%',
        value: '%'
      }, {
        text: 'match_parent',
        value: 'match_parent'
      }, {
        text: 'auto',
        value: 'auto'
      }]
    }
  });
  cell.addChild(res.numberInputElt).addChild(res.typeSelectElt);
  res.numberInputElt.on('change', function (event) {
    if (event.by == 'keyup') return;
    switch (res.typeSelectElt.value) {
      case '%':
        self.setProperty(name, this.value + '%');
        break;
      case 'px':
        self.setProperty(name, this.value);
        break;
    }
    self.notifyChange(name);
    if (event.by != 'long_press_button') self.notifyStopChange(name);
  }).on('stopchange', function () {
    switch (res.typeSelectElt.value) {
      case '%':
        self.setProperty(name, this.value + '%');
        break;
      case 'px':
        self.setProperty(name, this.value);
        break;
    }
    self.notifyStopChange(name);
  });
  res.typeSelectElt.on('change', function (event) {
    if (this.value == 'match_parent' || this.value == 'auto') {
      self.setProperty(name, this.value);
      res.numberInputElt.disabled = true;
    } else {
      res.numberInputElt.disabled = false;
      var value = self.getProperty(name, this.value);
      res.numberInputElt.value = value;
      if (this.value == '%') {
        self.setProperty(name, value + '%');
      } else {
        self.setProperty(name, value);
      }
    }
    self.notifyChange(name);
    self.notifyStopChange(name);
  });
  res.requestUpdate = function () {
    var descriptor = self.getPropertyDescriptor(name);
    if (descriptor.disabled) res.numberInputElt.disabled = !!descriptor.disabled;
    var value = self.getProperty(name);
    if (typeof value == 'number') {
      res.numberInputElt.value = value;
      res.typeSelectElt.value = 'px';
    } else if (typeof value == 'string') {
      if (value.match(/\%$/)) {
        res.typeSelectElt.value = '%';
        res.numberInputElt.value = parseFloat(value.replace('%', ''));
        res.numberInputElt.disabled = false;
      } else if (value == 'match_parent' || value == 'auto') {
        res.numberInputElt.disabled = true;
        res.typeSelectElt.value = value;
      } else {
        console.error("Unknow typeof " + name, value);
      }
    }
  };
  res.requestUpdate();
  return res;
};
PropertyEditor.prototype.loadMeasurePositionProperty = function (name, descriptor, cell) {
  var self = this;
  var res = {};
  cell.addStyle('white-space', 'nowrap');
  res.numberInputElt = _('numberinput').addStyle('margin-right', '5px');
  res.typeSelectElt = _({
    tag: 'selectmenu',
    style: {
      verticalAlign: 'middle'
    },
    props: {
      items: [{
        text: 'px',
        value: 'px'
      }, {
        text: '%',
        value: '%'
      }]
    }
  });
  cell.addChild(res.numberInputElt).addChild(res.typeSelectElt);
  res.numberInputElt.on('change', function (event) {
    if (event.by == 'keyup') return;
    switch (res.typeSelectElt.value) {
      case '%':
        self.setProperty(name, this.value + '%');
        break;
      case 'px':
        self.setProperty(name, this.value);
        break;
    }
    self.notifyChange(name);
    if (event.by != 'long_press_button') self.notifyStopChange(name);
  }).on('stopchange', function () {
    switch (res.typeSelectElt.value) {
      case '%':
        self.setProperty(name, this.value + '%');
        break;
      case 'px':
        self.setProperty(name, this.value);
        break;
    }
    self.notifyStopChange(name);
  });
  res.typeSelectElt.on('change', function (event) {
    if (this.value == 'match_parent' || this.value == 'auto') {
      self.setProperty(name, this.value);
      res.numberInputElt.disabled = true;
    } else {
      res.numberInputElt.disabled = false;
      var value = self.getProperty(name, this.value);
      res.numberInputElt.value = value;
      if (this.value == '%') {
        self.setProperty(name, value + '%');
      } else {
        self.setProperty(name, value);
      }
    }
    self.notifyChange(name);
    self.notifyStopChange(name);
  });
  res.requestUpdate = function () {
    var descriptor = self.getPropertyDescriptor(name);
    res.numberInputElt.disabled = !!descriptor.disabled;
    var value;
    if (descriptor.disabled) {
      value = self.getProperty(name, res.typeSelectElt.value);
      res.numberInputElt.value = value;
      //set-back
      if (res.typeSelectElt.value == 'px') {
        self.setProperty(name, value);
      } else if (res.typeSelectElt.value == '%') {
        self.setProperty(name, value + '%');
      }
    } else {
      value = self.getProperty(name);
      if (typeof value == 'number') {
        res.numberInputElt.value = value;
        res.typeSelectElt.value = 'px';
      } else if (typeof value == 'string') {
        if (value.match(/\%$/)) {
          res.typeSelectElt.value = '%';
          res.numberInputElt.value = parseFloat(value.replace('%', ''));
        } else {
          console.error("Unknow typeof " + name, value);
        }
      }
    }
  };
  res.requestUpdate();
  return res;
};
PropertyEditor.prototype.getView = function () {
  if (this.$view) return this.$view;
  this.$view = _({
    "class": 'as-property-editor',
    child: {
      tag: 'table',
      "class": 'as-basic-table',
      child: [{
        tag: 'thead',
        child: [{
          tag: 'tr',
          child: [{
            tag: 'td',
            child: {
              text: "key"
            }
          }, {
            tag: 'td',
            attr: {
              colspan: '3'
            },
            child: {
              text: 'value'
            }
          }]
        }]
      }, {
        tag: 'tbody'
      }]
    }
  });
  this.$body = $('tbody', this.$view);
  return this.$view;
};
PropertyEditor.prototype.clearAllDependents = function () {
  for (var key in this.dependents) {
    delete this.dependents[key];
  }
};

/**
 * @param {String} propertyName
 * @param {Array<String>} dependencyProperties
 */
PropertyEditor.prototype.addDependents = function (propertyName, dependencyProperties) {
  var dependencyProperty;
  for (var i = 0; i < dependencyProperties.length; ++i) {
    dependencyProperty = dependencyProperties[i];
    this.dependents[dependencyProperty] = this.dependents[dependencyProperty] || {};
    this.dependents[dependencyProperty][propertyName] = true;
  }
};
PropertyEditor.prototype.updateDependentsOf = function (name, excludes) {
  excludes = excludes || {};
  excludes[name] = true;
  for (var dependentPropertyName in this.dependents[name]) {
    if (!excludes[dependentPropertyName] && this.propertyHolders[dependentPropertyName]) {
      excludes[dependentPropertyName] = true;
      if (this.propertyHolders[dependentPropertyName].requestUpdate) {
        this.propertyHolders[dependentPropertyName].requestUpdate();
      }
      this.updateDependentsOf(dependentPropertyName, excludes);
    }
  }
};
PropertyEditor.prototype.updatePropertyRecursive = function (name) {
  if (!this.propertyHolders[name]) return;
  if (this.propertyHolders[name].requestUpdate) this.propertyHolders[name].requestUpdate();
  this.updateDependentsOf(name);
};
PropertyEditor.prototype.notifyChange = function (name, from) {
  this.updateDependentsOf(name);
  this.emit('change', {
    type: 'change',
    target: this,
    from: from,
    name: name,
    object: this.object
  }, this);
};
PropertyEditor.prototype.notifyStopChange = function (name) {
  this.emit('stopchange', {
    type: 'stopchange',
    name: name,
    object: this.object
  }, this);
};
var _default = PropertyEditor;
exports["default"] = _default;

/***/ }),

/***/ 98795:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
__webpack_require__(16702);
var _TableEditor = _interopRequireDefault(__webpack_require__(79470));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _SelectListEditorCmd = _interopRequireWildcard(__webpack_require__(73903));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _Toast = _interopRequireDefault(__webpack_require__(68105));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function SelectListEditor() {
  _BaseEditor["default"].call(this);
  this.cmdRunner.assign(_SelectListEditorCmd["default"]);
  this.tableEditor = new _TableEditor["default"]();
  window.E = this;
}
_OOP["default"].mixClass(SelectListEditor, _BaseEditor["default"]);
SelectListEditor.prototype.createView = function () {
  this.$view = (0, _FCore._)({
    "class": 'as-select-list-editor',
    child: [{
      "class": 'as-select-list-editor-header',
      child: {
        "class": 'as-select-list-editor-cmd-tool-container'
      }
    }, {
      "class": 'as-select-list-editor-body',
      child: this.tableEditor.getView()
    }]
  });
  this.$header = (0, _FCore.$)('.as-select-list-editor-header', this.$view);
  this.$body = (0, _FCore.$)('.as-select-list-editor-body', this.$view);
  this.$cmdToolCtn = (0, _FCore.$)('.as-select-list-editor-cmd-tool-container', this.$view);
  this.$attachhook = (0, _FCore._)('attachhook').on('attached', function () {
    this.requestUpdateSize();
    _ResizeSystem["default"].add(this);
  });
  this.$attachhook.requestUpdateSize = this.updateSize.bind(this);
  this.$view.addChild(this.$attachhook);
};
SelectListEditor.prototype.updateSize = function () {
  this.$body.addStyle('top', this.$header.offsetHeight + 'px');
};
SelectListEditor.prototype.setData = function (data) {
  var valueType = 'string';
  for (var i = 0; i < data.length; i++) {
    if (typeof data[i].value === 'number') {
      valueType = 'number';
    }
  }
  var tableData = {
    propertyDescriptors: [{
      text: {
        text: 'Text',
        type: 'string'
      },
      value: {
        text: 'Value',
        type: valueType
      }
    }],
    propertyNames: ['text', 'value'],
    records: data.map(function (item) {
      return {
        text: item.text,
        value: item.value
      };
    })
  };
  this.tableEditor.setData(tableData);
};
SelectListEditor.prototype.getData = function (data) {
  return this.tableEditor.getData().records;
};
SelectListEditor.prototype.onAttached = function () {
  this.CMDTool = this.getContext(_R["default"].CMD_TOOL);
};
SelectListEditor.prototype.onResume = function () {
  this.updateSize();
  this.CMDTool = this.getContext(_R["default"].CMD_TOOL);
  if (this.CMDTool) {
    this.CMDTool.bindWithEditor(this);
    this.CMDTool.start();
  }
};
SelectListEditor.prototype.onPause = function () {
  if (this.CMDTool) {
    this.CMDTool.pause();
  }
};
SelectListEditor.prototype.insertRowAfterCurrent = function () {
  var cellEditor = this.tableEditor.currentCellEditor;
  if (cellEditor) {
    this.tableEditor.insertRow(cellEditor.row.idx + 1, {});
  } else {
    this.tableEditor.insertRow(cellEditor.records.length, {});
  }
};
SelectListEditor.prototype.insertRowBeforeCurrent = function () {
  var cellEditor = this.tableEditor.currentCellEditor;
  if (cellEditor) {
    this.tableEditor.insertRow(cellEditor.row.idx, {});
  } else {
    this.tableEditor.insertRow(0, {});
  }
};
SelectListEditor.prototype.removeCurrentRow = function () {
  var cellEditor = this.tableEditor.currentCellEditor;
  var rowIdx;
  var colIdx;
  if (cellEditor) {
    rowIdx = cellEditor.row.idx;
    colIdx = cellEditor.col.index;
  } else {
    rowIdx = this.tableEditor.records.length - 1;
    colIdx = 0;
  }
  if (rowIdx >= 0) {
    this.tableEditor.removeRow(rowIdx);
    rowIdx = Math.min(rowIdx, this.tableEditor.records.length - 1);
    if (rowIdx >= 0) {
      this.tableEditor.editCell(this.tableEditor.tableData.findRowByIndex(rowIdx), this.tableEditor.tableData.findColByIndex(colIdx));
    }
  }
};
SelectListEditor.prototype.verify = function () {
  var record;
  var records = this.tableEditor.records;
  var error = false;
  var dict = {};
  for (var i = 0; i < records.length; ++i) {
    record = records[i];
    if (typeof record.text !== "string" || record.text.length == 0) {
      error = 'Invalid data!';
      this.tableEditor.editCell(this.tableEditor.tableData.findRowByIndex(i), this.tableEditor.tableData.findColByIndex(0));
      break;
    }
    if (typeof record.value !== "string" || record.value.length == 0 || dict[record.value]) {
      if (typeof record.value !== "string" || record.value.length == 0) {
        error = 'Invalid data!';
      } else {
        error = 'Duplicate value!';
      }
      this.tableEditor.editCell(this.tableEditor.tableData.findRowByIndex(i), this.tableEditor.tableData.findColByIndex(1));
      break;
    }
    dict[record.value] = true;
  }
  if (error) {
    var errorToast = _Toast["default"].make({
      props: {
        htitle: 'Error',
        message: error,
        variant: 'error'
      }
    });
    setTimeout(function () {
      errorToast.disappear();
    }, 3000);
  }
  return !error;
};
SelectListEditor.prototype.getCmdDescriptor = function (name) {
  var descriptor = _SelectListEditorCmd.SelectListCmdDescriptors[name];
  var res = Object.assign({
    type: 'trigger',
    desc: 'command: ' + name,
    icon: 'span.mdi.mdi-apple-keyboard-command',
    disabled: false
  }, descriptor);
  return res;
};
SelectListEditor.prototype.getCmdGroupTree = function () {
  return _SelectListEditorCmd.SelectListCmdTree;
};
SelectListEditor.prototype.getCmdToolCtn = function () {
  return this.$cmdToolCtn;
};
var _default = SelectListEditor;
exports["default"] = _default;

/***/ }),

/***/ 66498:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _MultiObjectPropertyEditor = _interopRequireDefault(__webpack_require__(95567));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function StyleEditor() {
  _MultiObjectPropertyEditor["default"].call(this);
}
Object.defineProperties(StyleEditor.prototype, Object.getOwnPropertyDescriptors(_MultiObjectPropertyEditor["default"].prototype));
StyleEditor.prototype.constructor = StyleEditor;
StyleEditor.prototype.setProperty = function (object, name, value) {
  return object.setStyle(name, value);
};
StyleEditor.prototype.getProperty = function (object) {
  return object.getStyle.apply(object, Array.prototype.slice.call(arguments, 1));
};
StyleEditor.prototype.getPropertyDescriptor = function (object) {
  return object.getStyleDescriptor.apply(object, Array.prototype.slice.call(arguments, 1));
};
StyleEditor.prototype.getPropertyNames = function (object) {
  return object.getAcceptsStyleNames();
};
var _default = StyleEditor;
exports["default"] = _default;

/***/ }),

/***/ 95394:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UndoHistoryItem = UndoHistoryItem;
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _Context = _interopRequireDefault(__webpack_require__(16311));
__webpack_require__(87778);
var _R = _interopRequireDefault(__webpack_require__(25280));
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _WindowManager = _interopRequireDefault(__webpack_require__(52545));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/**
 * @constructor
 */
function UndoHistory() {
  _BaseEditor["default"].call(this);
  this._lastPosition = undefined;
  this.items = [];
  this.lastItemIndex = this.items.length - 1;
}
Object.defineProperties(UndoHistory.prototype, Object.getOwnPropertyDescriptors(_BaseEditor["default"].prototype));
UndoHistory.prototype.constructor = UndoHistory;
UndoHistory.prototype.CONFIG_STORE_KEY = "AS_UndoHistory_config";
UndoHistory.prototype.config = {
  windowStyle: {
    left: '57px',
    top: _Dom["default"].getScreenSize().height - 230 + 'px'
  }
};
UndoHistory.prototype.getView = function () {
  if (this.$view) return this.$view;
  this.$view = _({
    attr: {
      tabIndex: '1'
    },
    "class": ['as-undo-history'],
    child: [{
      "class": 'as-undo-history-active-buttons',
      child: [{
        tag: 'button',
        "class": 'as-undo-history-active-undo',
        attr: {
          title: 'Undo'
        },
        props: {
          disabled: true
        },
        child: 'span.mdi.mdi-undo'
      }, {
        tag: 'button',
        "class": 'as-undo-history-active-redo',
        attr: {
          title: 'Redo'
        },
        props: {
          disabled: true
        },
        child: 'span.mdi.mdi-redo'
      }, {
        "class": 'as-undo-history-active-buttons-right-container',
        child: {
          tag: 'button',
          attr: {
            title: 'Clear'
          },
          "class": 'as-undo-history-active-clear',
          child: 'span.mdi.mdi-delete'
        }
      }]
    }, {
      tag: 'bscroller',
      "class": ['as-undo-history-item-list'],
      child: this.items.map(function (item) {
        return item.getView();
      })
    }],
    on: {
      keydown: this.ev_cmdKeyDown.bind(this)
    }
  });
  this.$list = $('.as-undo-history-item-list', this.$view);
  this.$undoBtn = $('button.as-undo-history-active-undo', this.$view).on('click', this.undo.bind(this));
  this.$redoBtn = $('button.as-undo-history-active-redo', this.$view).on('click', this.redo.bind(this));
  this.$clear = $('button.as-undo-history-active-clear', this.$view).on('click', this.clear.bind(this));
  return this.$view;
};
UndoHistory.prototype.checkout = function (item, viewOnly) {
  var cItem;
  var found = false;
  for (var i = this.items.length - 1; i >= 0; --i) {
    cItem = this.items[i];
    if (cItem == item) {
      cItem.setActive(true);
      found = true;
      this.lastItemIndex = i;
    } else {
      cItem.setActive(false);
    }
    cItem.setDisabled(!found);
  }
  this.$list.scrollInto(item.getView());
  this.$undoBtn.disabled = this.lastItemIndex <= 0;
  this.$redoBtn.disabled = this.lastItemIndex >= this.items.length - 1;
  if (!viewOnly) this.emit('checkout', {
    type: 'checkout',
    target: this,
    item: item
  }, this);
};
UndoHistory.prototype.undo = function () {
  if (this.lastItemIndex > 0) {
    this.checkout(this.items[this.lastItemIndex - 1]);
  }
};
UndoHistory.prototype.redo = function () {
  if (this.lastItemIndex < this.items.length - 1) {
    this.checkout(this.items[this.lastItemIndex + 1]);
  }
};
UndoHistory.prototype.canUndo = function () {
  return this.lastItemIndex > 0;
};
UndoHistory.prototype.canRedo = function () {
  return this.lastItemIndex < this.items.length - 1;
};

/**
 * @param {String} type
 * @param {*} data
 * @param {String=} description
 * @param {Date=} timestamp
 */
UndoHistory.prototype.commit = function (type, data, description, timestamp) {
  var item;
  while (this.items.length > this.lastItemIndex + 1) {
    item = this.items.pop();
    item.getView().remove();
  }
  var res = new UndoHistoryItem(this, type, data, description, timestamp);
  this.items.push(res);
  this.$list.addChild(res.getView());
  this.checkout(res, true);
  return res;
};
UndoHistory.prototype.clear = function () {
  if (this.items.length < 2) return;
  var lastItem = this.items.pop();
  var lastData = lastItem.data;
  lastItem.getView().remove();
  while (this.items.length > 0) {
    lastItem = this.items.pop();
    lastItem.getView().remove();
  }
  this.commit('clear', lastData, 'Clear History');
};
UndoHistory.prototype.renew = function () {
  var lastItem;
  while (this.items.length > 0) {
    lastItem = this.items.pop();
    lastItem.getView().remove();
  }
};
UndoHistory.prototype.ev_cmdKeyDown = function (event) {
  this.editor && this.editor.ev_cmdKeyDown(event);
};

/**
 * @param {UndoHistory}parent
 * @param {String} type
 * @param {*} data
 * @param {String} description
 * @param {Date} timestamp
 */
function UndoHistoryItem(parent, type, data, description, timestamp) {
  this.parent = parent;
  this.type = type || 'edit';
  this.data = data;
  this.description = description || 'Change';
  this.timestamp = timestamp || new Date();
  this._active = false;
  this._disabled = false;
}

/**
 * @typedef {string|"move"|"remove"|"edit-attribute"|"edit"|"add"|"set-data"|"move-resize"|"move-order"|"clear"|"cut"} UndoTypeNames
 */

UndoHistoryItem.prototype.typeIcon = {
  move: 'span.mdi.mdi-cursor-move',
  remove: 'span.mdi.mdi-delete-variant[style="color: rgb(255,59,59)"]',
  'edit-attribute': 'span.mdi.mdi-circle-edit-outline',
  edit: 'span.mdi.mdi-circle-edit-outline',
  add: 'span.mdi.mdi-pen-plus',
  'set-data': 'span.mdi.mdi-open-in-app',
  'move-resize': 'span.mdi.mdi-move-resize',
  'move-order': 'span.mdi.mdi-arrow-up-down-bold',
  'clear': 'span.mdi.mdi-check-outline',
  'cut': 'span.mdi.mdi-content-cut'
};
UndoHistoryItem.prototype.setActive = function (bool) {
  this._active = !!bool;
  if (this.$view) {
    if (bool) {
      this.$view.addClass('as-undo-history-item-active');
    } else {
      this.$view.removeClass('as-undo-history-item-active');
    }
  }
};
UndoHistoryItem.prototype.setDisabled = function (bool) {
  this._disabled = !!bool;
  if (this.$view) {
    if (bool) {
      this.$view.addClass('as-undo-history-item-disabled');
    } else {
      this.$view.removeClass('as-undo-history-item-disabled');
    }
  }
};
UndoHistoryItem.prototype.getActive = function () {
  return this._active;
};
UndoHistoryItem.prototype.getView = function () {
  if (this.$view) return this.$view;
  this.$view = _({
    "class": ['as-undo-history-item'].concat(this._active ? ['as-undo-history-item-active'] : []).concat(this._disabled ? ['as-undo-history-item-disabled'] : []),
    attr: {
      title: this.timestamp.toLocaleTimeString()
    },
    child: [{
      "class": 'as-undo-history-item-icon-container',
      child: this.typeIcon[this.type]
    }, {
      text: this.description
    }],
    on: {
      click: this.ev_click.bind(this)
    }
  });
  return this.$view;
};
UndoHistoryItem.prototype.ev_click = function (event) {
  this.parent.checkout(this);
};
var _default = UndoHistory;
exports["default"] = _default;

/***/ }),

/***/ 5959:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _utils = __webpack_require__(49633);
var _DateLevelInput = _interopRequireDefault(__webpack_require__(83413));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function FDDateNLevelInput() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDDateNLevelInput, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDDateNLevelInput, _DateLevelInput["default"]);
FDDateNLevelInput.prototype.render = function () {
  return (0, _FCore._)({
    "class": 'as-date-n-level-input',
    child: [{
      "class": 'as-date-input',
      child: [{
        "class": 'as-date-input-text',
        attr: {
          'data-text': 'dd/mm/yyyy'
        }
      }, {
        tag: 'button',
        "class": 'as-date-input-icon-ctn',
        child: 'span.mdi.mdi-calendar'
      }]
    }, {
      "class": 'as-transparent-button as-date-n-level-input-select-level as-quick-menu-trigger'.split(/\s+/),
      child: 'span.mdi.mdi-cog'
    }]
  });
};
var _default = FDDateNLevelInput;
exports["default"] = _default;

/***/ }),

/***/ 81055:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.FDELayoutOutlineDelegate = FDELayoutOutlineDelegate;
exports.FDEPropertyDelegate = FDEPropertyDelegate;
exports["default"] = void 0;
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
__webpack_require__(21230);
var _FDText = _interopRequireDefault(__webpack_require__(72838));
var _FDImage = _interopRequireDefault(__webpack_require__(25520));
var _FDHyperLayout = _interopRequireDefault(__webpack_require__(87745));
var _utils = __webpack_require__(49633);
var _FDLabel = _interopRequireDefault(__webpack_require__(50223));
var _FDDateInput = _interopRequireDefault(__webpack_require__(66786));
var _FDBreak = _interopRequireDefault(__webpack_require__(79663));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _FDSelectListText = _interopRequireDefault(__webpack_require__(6473));
var _MultiObjectPropertyEditor = __webpack_require__(95567);
var _IndexedPropertyNames = _interopRequireDefault(__webpack_require__(63017));
var _Assembler = __webpack_require__(2326);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _FDButton = _interopRequireDefault(__webpack_require__(14642));
var _FDCheckBox = _interopRequireDefault(__webpack_require__(45159));
var _FDColorInput = _interopRequireDefault(__webpack_require__(57457));
var _FDCopyableIconTooltip = _interopRequireDefault(__webpack_require__(58361));
var _FDDateInYearInput = _interopRequireDefault(__webpack_require__(15143));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _FDHyperAnchorEditor = _interopRequireDefault(__webpack_require__(27126));
var _FDDateNLevelInput = _interopRequireDefault(__webpack_require__(5959));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _CMDTool = _interopRequireDefault(__webpack_require__(8982));
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
var _FDEditorCmd = _interopRequireWildcard(__webpack_require__(93635));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _Snackbar = _interopRequireDefault(__webpack_require__(96206));
var _Toast = _interopRequireDefault(__webpack_require__(68105));
var _FDLinearLayout = _interopRequireDefault(__webpack_require__(89830));
var _FDChainLayout = _interopRequireDefault(__webpack_require__(23084));
var _FDTextInput = _interopRequireDefault(__webpack_require__(89214));
var _FDComboBox = _interopRequireDefault(__webpack_require__(98112));
var _FDRelativeLayout = _interopRequireDefault(__webpack_require__(86743));
var _FDRadio = _interopRequireDefault(__webpack_require__(81166));
var _FDNumberInput = _interopRequireDefault(__webpack_require__(13612));
var _FNode = __webpack_require__(88215);
var _FDTableInput = _interopRequireDefault(__webpack_require__(26538));
var _FDDateTimeInput = _interopRequireDefault(__webpack_require__(16939));
var _FDMonthInput = _interopRequireDefault(__webpack_require__(5563));
var _FDWeekInput = _interopRequireDefault(__webpack_require__(90903));
var _FDMultiSelectListText = _interopRequireDefault(__webpack_require__(24912));
var _FDTimeRange24Input = _interopRequireDefault(__webpack_require__(33935));
var _FDDualSelectListText = _interopRequireDefault(__webpack_require__(78845));
var _FDFileListInput = _interopRequireDefault(__webpack_require__(10714));
var _FDTreeLeafComboBox = _interopRequireDefault(__webpack_require__(94581));
var _FDTextArea = _interopRequireDefault(__webpack_require__(62419));
var _FDGridLayout = _interopRequireDefault(__webpack_require__(50015));
var _Constants = __webpack_require__(92311);
var _FOutline = __webpack_require__(43894);
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _stringGenerate = __webpack_require__(10713);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends BaseEditor
 * @constructor
 */
function FDEditor() {
  _BaseEditor["default"].apply(this);
  this.CMDTool = new _CMDTool["default"]();
  this.cmdRunner.assign(_FDEditorCmd["default"]);
  this.lcEmitter = new _EventEmitter["default"]();
  this.outlineDelegate = new FDELayoutOutlineDelegate(this);
  this.assembler = new FDAssembler(this);
  this.rootFragment = null;
  this.rootLayout = null;
  this.selection = new FDSelection(this);
  this.selectCtrl = new FDESelectController(this);
  this.keyboardCtrl = new FDEKeyboardController(this);
  this.contentEditable = new FDContentEditable(this);
  this.propertyDelegate = new FDEPropertyDelegate(this, []);
  this.CMDTool.bindWithEditor(this);
  this.lcEmitter.on(_Constants.EV_COMP_TREE_CHANGE, function () {
    console.log(_Constants.EV_COMP_TREE_CHANGE);
  });
}
_OOP["default"].mixClass(FDEditor, _BaseEditor["default"]);
FDEditor.prototype.createView = function () {
  this.$view = (0, _FCore._)({
    "class": 'fde-editor',
    child: [{
      "class": 'fde-editor-header',
      child: [this.CMDTool.getView()]
    }, {
      "class": 'fde-editor-body',
      child: [{
        "class": 'fde-viewport',
        child: {
          "class": 'fde-space',
          child: [{
            "class": 'fde-content',
            attr: {
              contenteditable: 'true',
              spellcheck: 'false'
            },
            on: {},
            child: []
          }, {
            "class": 'fde-foreground'
          }]
        }
      }]
    }]
  });
  this.$content = (0, _FCore.$)('.fde-content', this.$view);
  this.contentEditable.onCreateView();
  this.$foreground = (0, _FCore.$)('.fde-foreground', this.$view);
  this.selection.onViewCreated();
  this.selectCtrl.onViewCreated();
  this.keyboardCtrl.onViewCreated();
};
FDEditor.prototype.setData = function (data) {
  if (this.rootLayout) {
    this.rootFragment.view.domElt.remove();
    this.rootFragment.destroy();
  }
  this.rootFragment = new FDEFragment(this, data);
  this.rootLayout = this.rootFragment.view;
  this.$content.addChild(this.rootLayout.domElt);
  this.rootFragment.start();
  this.propertyDelegate = new FDEPropertyDelegate(this, []);
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
};
FDEditor.prototype.getData = function () {
  if (this.rootLayout) {
    return this.rootLayout.getData();
  }
  return null;
};
FDEditor.prototype.onStart = function () {
  this.flexFormEditor = this.getContext(_R["default"].FLEX_FORM_EDITOR);
  this.propertyEditor = this.getContext(_R["default"].ALL_PROPERTY_EDITOR);
  this.CMDTool.start();
};
FDEditor.prototype.onResume = function () {
  if (this.error) return;
  try {
    var layoutEditor = this.getContext(_R["default"].LAYOUT_EDITOR);
    var data = layoutEditor.getData();
    this.setData(data);
    this.selectCtrl.onResume();
    this.contentEditable.onResume();
    if (this.propertyEditor) {
      this.propertyEditor.delegate = this.propertyDelegate;
    }
    this.CMDTool.resume();
  } catch (e) {
    _Toast["default"].make({
      props: {
        message: e.message,
        variant: 'error',
        htitle: 'Error'
      }
    });
    this.error = e;
    console.error(e);
  }
};
FDEditor.prototype.onPause = function () {
  if (this.error) return;
  /**
   *
   * @type {LayoutEditor}
   */
  var layoutEditor = this.getContext(_R["default"].LAYOUT_EDITOR);
  var data = this.getData();
  if (layoutEditor) {
    layoutEditor.setData(data);
  }
  this.selectCtrl.onPause();
  this.contentEditable.onPause();
  this.CMDTool.pause();
};
FDEditor.prototype.notifySizeChange = function () {
  console.log(this);
};
FDEditor.prototype.getCmdGroupTree = function () {
  return [['preview', 'remotePreview'], ['save', 'saveAs', 'saveAsSystem', 'export2Json', 'export2sharpEncode', 'export2clipboard'], ['importFromJson'], ['pageSetting'], ['formatTextAlignLeft', 'formatTextAlignCenter', 'formatTextAlignRight'], ['formatTextBold', 'formatTextItalic', 'formatTextUnderline']];
};
FDEditor.prototype.getCmdDescriptor = function (name) {
  var descriptor = _FDEditorCmd.FDEditorCmdDescriptors[name];
  if (typeof descriptor === "function") {
    descriptor = descriptor.call(this);
  }
  return Object.assign({
    text: name,
    icon: 'span.mdi.mdi-command'
  }, _CmdDescriptors["default"][name], descriptor);
};
var _default = FDEditor;
/**
 *
 * @param {FDEditor} editor
 * @constructor
 */
exports["default"] = _default;
function FDAssembler(editor) {
  /**
   *
   * @type {FDEditor}
   */
  this.editor = editor;
  this.classes = {};
  this.addClass(_FDGridLayout["default"], _FDRelativeLayout["default"], _FDLinearLayout["default"], _FDChainLayout["default"], _FDText["default"], _FDImage["default"], _FDHyperLayout["default"], _FDLabel["default"], _FDBreak["default"], _FDSelectListText["default"], _FDDateInput["default"], _FDButton["default"], _FDCheckBox["default"], _FDRadio["default"], _FDNumberInput["default"], _FDColorInput["default"], _FDCopyableIconTooltip["default"], _FDDateInYearInput["default"], _FDDateNLevelInput["default"], _FDTextInput["default"], _FDComboBox["default"], _FDTableInput["default"], _FDDateTimeInput["default"], _FDMonthInput["default"], _FDWeekInput["default"], _FDMultiSelectListText["default"], _FDTimeRange24Input["default"], _FDDualSelectListText["default"], _FDFileListInput["default"], _FDTreeLeafComboBox["default"], _FDTextArea["default"]);
}
FDAssembler.prototype.addClass = function () {
  var _this = this;
  for (var _len = arguments.length, constructors = new Array(_len), _key = 0; _key < _len; _key++) {
    constructors[_key] = arguments[_key];
  }
  constructors.forEach(function (constructor) {
    _this.classes[constructor.prototype.tag] = constructor;
  });
};

/**
 *
 * @param data
 * @param frag
 * @returns {*}
 */
FDAssembler.prototype.build = function (data, frag) {
  if (data["class"]) return this.buildFragment(data, frag);
  if (data.tag) return this.buildComponent(data, frag);
};
FDAssembler.prototype.buildComponent = function (data, frag) {
  var _this2 = this;
  var clazz = this.classes[data.tag];
  if (!clazz) throw new Error("Not handle " + data.tag);
  var comp = new clazz(this.editor);
  comp.fragment = frag;
  Object.assign(comp.attributes, data.attributes || {});
  Object.assign(comp.style, data.style || {});
  if (data.children) {
    data.children.forEach(function (it) {
      var c = _this2.build(it, frag);
      if (!c) {
        throw {
          message: 'Can not build data',
          data: it
        };
      }
      if (c.type === 'FRAGMENT') {
        comp.addChild(c.view);
      } else if (c.type === 'COMPONENT') {
        comp.addChild(c);
      }
    });
  }
  return comp;
};
FDAssembler.prototype.buildFragment = function (data, parentFrag) {
  /**
   * @extends FDEFragment
   * @constructor
   */
  function SubFragment(editor) {
    FDEFragment.call(this, editor, {
      tag: 'HyperLayout',
      style: data.style || {},
      attributes: data.attributes || {},
      children: [{
        tag: 'Text',
        style: {
          textColor: 'rgb(200, 0, 0)'
        },
        attributes: {
          text: "Form [" + data["class"] + ']'
        }
      }]
    });
  }
  _OOP["default"].mixClass(SubFragment, FDEFragment);
  SubFragment.prototype.tag = data["class"];
  return new SubFragment(this.editor);
};

/**
 * @extends Fragment
 * @param {FDEditor} editor
 * @param contentViewData
 * @constructor
 */
function FDEFragment(editor, contentViewData) {
  _Fragment["default"].call(this);
  this.editor = editor;
  this.view = this.editor.assembler.build(contentViewData, this);
}
_OOP["default"].mixClass(FDEFragment, _Fragment["default"]);
FDEFragment.prototype.type = 'FRAGMENT';
FDEFragment.prototype.destroy = function () {};
FDEFragment.prototype.onStart = function () {
  (0, _FNode.traversal)(this.view, function (path) {
    path.node.updateViewStyle();
  });
};

/**
 *
 * @param {FDSelection} selection
 * @constructor
 */
function FDRange(selection) {
  this.selection = selection;
  /**
   *
   * @type {FDBaseComponent}
   */
  this.startContainer = null;
  /**
   *
   * @type {"start"|number|"end"}
   */
  this.startOffset = 0;
  /**
   *
   * @type {FDBaseComponent}
   */
  this.endContainer = null;
  /**
   *
   * @type {"start"|number|"end"}
   */
  this.endOffset = 0;
  this.leafComponents = [];
  this.ancestorComponent = null;
}
FDRange.prototype.pool = [];
FDRange.prototype.getBoundingClientRect = function () {
  return null;
};

/**
 *
 * @param {FDBaseComponent}container
 * @param {number} offset
 */
FDRange.prototype.setStart = function (container, offset) {
  this.startContainer = container;
  this.startOffset = offset;
  if (!this.endContainer) {
    this.endContainer = container;
    this.endOffset = offset;
  }
  return this;
};

/**
 *
 * @param {FDBaseComponent}container
 * @param {number} offset
 */
FDRange.prototype.setEnd = function (container, offset) {
  this.endContainer = container;
  this.endOffset = offset;
  return this;
};

/**
 *
 * @param {Range} range
 */
FDRange.prototype.fromDomRange = function (range) {
  var offsetOf = function offsetOf(comp, ctn, ofs) {
    return comp.offsetFromDom(ctn, ofs);
  };
  var startContainer = (0, _utils.findFDComponentOfNode)(range.startContainer);
  var startOffset = offsetOf(startContainer, range.startContainer, range.startOffset);
  var endContainer = (0, _utils.findFDComponentOfNode)(range.endContainer);
  var endOffset = offsetOf(endContainer, range.endContainer, range.endOffset);
  this.setStart(startContainer, startOffset).setEnd(endContainer, endOffset).commit();
  return this;
};
FDRange.prototype.commit = function () {
  var startCtn = this.startContainer;
  var endCtn = this.endContainer;
  var findStack = function findStack(comp) {
    var res = [];
    while (comp) {
      res.unshift(comp);
      comp = comp.parent;
    }
    return res;
  };
  var sStack = findStack(startCtn);
  var eStack = findStack(endCtn);
  var from;
  while (eStack[0] === sStack[0] && eStack.length > 0 && sStack.length > 0) {
    from = eStack.shift();
    sStack.shift();
  }
  var leafNodes = [];
  var started = false;
  var ended = false;
  var visit = function visit(comp) {
    if (ended) return;
    if (comp === startCtn) {
      started = true;
    }
    if (started && (!comp.children || comp.children.length === 0)) {
      leafNodes.push(comp);
    }
    if (comp.children) comp.children.forEach(function (child) {
      return visit(child);
    });
    if (comp === endCtn) ended = true;
  };
  visit(from);
  this.ancestorComponent = from;
  this.leafComponents = leafNodes;
  return this;
};
Object.defineProperty(FDRange.prototype, 'collapsed', {
  get: function get() {
    return this.startOffset === this.endOffset && this.startContainer === this.endContainer;
  }
});

/**
 *
 * @param {FDEditor} editor
 * @constructor
 */
function FDSelection(editor) {
  this.fdEditor = editor;
  /**
   *
   * @type {null|FDRange}
   */
  this.range = null;
  this.$textRanges = [];
  this.anchorEditors = {}; //by objId
  this.$virtualCaret = (0, _FCore._)('.fde-virtual-caret');
}
FDSelection.prototype.onViewCreated = function () {
  this.$foreground = this.fdEditor.$foreground;
};
FDSelection.prototype.$textRangePool = [];
FDSelection.prototype.importFromDomRange = function (domRange) {
  this.range = new FDRange(this);
  this.range.fromDomRange(domRange);
  this.draw();
};
FDSelection.prototype.draw = function () {
  var _this3 = this;
  var wait2Pool = this.$textRanges;
  this.$textRanges = [];
  var fBound = _Rectangle["default"].fromClientRect(this.$foreground.getBoundingClientRect());
  var wait2destroy = this.anchorEditors;
  this.anchorEditors = {};
  var domRange, drBound;
  var anchorEditor, comp;
  if (this.range) {
    if (this.range.collapsed) {
      if (!this.$virtualCaret.parentElement) this.$foreground.addChild(this.$virtualCaret);
      drBound = this.range.startContainer.getTextRects(this.range.startOffset)[0];
      this.$virtualCaret.addStyle({
        left: drBound.x - fBound.x + 'px',
        top: drBound.y - fBound.y + 'px',
        height: drBound.height + 'px'
      });
      if (!this.range.startContainer.isText) {
        comp = this.range.startContainer;
        if (wait2destroy[comp.objId]) {
          anchorEditor = wait2destroy[comp.objId];
          anchorEditor.updatePosition();
          delete wait2destroy[comp.objId];
        } else {
          anchorEditor = new _FDHyperAnchorEditor["default"](this.fdEditor, comp);
        }
        this.anchorEditors[comp.objId] = anchorEditor;
      }
    } else {
      if (this.$virtualCaret.parentElement) this.$virtualCaret.remove();
      this.range.leafComponents.forEach(function (comp) {
        var rangeElt, startOffset, endOffset;
        var bounds;
        var anchorEditor;
        if (comp.isText) {
          if (comp === _this3.range.endContainer) {
            endOffset = _this3.range.endOffset;
          } else {
            endOffset = Infinity;
          }
          if (comp === _this3.range.startContainer) {
            startOffset = _this3.range.startOffset;
          } else startOffset = 0;
          bounds = comp.getTextRects(startOffset, endOffset);
          bounds.forEach(function (it) {
            rangeElt = wait2Pool.pop() || (0, _FCore._)('.fde-virtual-selected-range').addTo(_this3.$foreground);
            _this3.$textRanges.push(rangeElt);
            var bound = it.rect || it;
            rangeElt.addStyle({
              width: bound.width + 'px',
              height: bound.height + 'px',
              left: bound.x - fBound.x + 'px',
              top: bound.y - fBound.y + 'px'
            });
          });
        } else {
          if (wait2destroy[comp.objId]) {
            anchorEditor = wait2destroy[comp.objId];
            anchorEditor.updatePosition();
            delete wait2destroy[comp.objId];
          } else {
            anchorEditor = new _FDHyperAnchorEditor["default"](_this3.fdEditor, comp);
          }
          _this3.anchorEditors[comp.objId] = anchorEditor;
        }
      });
    }
  }
  wait2Pool.forEach(function (elt) {
    elt.remove();
    _this3.$textRangePool.push(wait2Pool);
  });
  for (var objId in wait2destroy) {
    wait2destroy[objId].destroy();
  }
};

/**
 *
 * @param {FDEditor} editor
 * @constructor
 */
function FDESelectController(editor) {
  this.editor = editor;
  this.ev_selectionChange = this.ev_selectionChange.bind(this);
  this.ev_click = this.ev_click.bind(this);
  this.$virtualCaret = (0, _FCore._)('.fde-virtual-caret');
  this.anchorEditors = [];
  this.scTO = -1;
}
FDESelectController.prototype.$rangePool = [];
FDESelectController.prototype.onViewCreated = function () {
  this.$content = this.editor.$content;
  this.$foreground = this.editor.$foreground;
  this.$virtualCaret.addTo(this.$foreground);
  this.$content.on('click', this.ev_click).on('blur', this.ev_blur.bind(this)).on('focus', this.ev_focus.bind(this));
};
FDESelectController.prototype.onResume = function () {
  // document.addEventListener('selectionchange', this.ev_selectionChange);
};
FDESelectController.prototype.onPause = function () {
  // document.removeEventListener('selectionchange', this.ev_selectionChange)
};
FDESelectController.prototype.ev_selectionChange = function (event) {
  var _this4 = this;
  var contentEditable = this.editor.contentEditable;
  var isIn = contentEditable.isFocusIn;
  if (!isIn) return;
  var range = contentEditable.range;
  var dispatchSingleEvent = function dispatchSingleEvent(elt, eventData) {
    while (elt) {
      if (elt.isSupportedEvent && elt.isSupportedEvent(eventData.type)) {
        elt.emit(eventData.type, eventData, elt);
      }
      elt = elt.parentElement;
      if (elt === _this4.$content) break;
    }
  };
  var dispatchMultiEvent = function dispatchMultiEvent(elt0, elt1, eventData, op0, op1, op01) {
    var arr0 = [];
    var arr1 = [];
    while (elt0) {
      if (elt0.isSupportedEvent && elt0.isSupportedEvent(eventData.type)) {
        arr0.unshift(elt0);
      }
      elt0 = elt0.parentElement;
      if (elt0 === _this4.$content) break;
    }
    while (elt1) {
      if (elt1.isSupportedEvent && elt1.isSupportedEvent(eventData.type)) {
        arr1.unshift(elt1);
      }
      elt1 = elt1.parentElement;
      if (elt1 === _this4.$content) break;
    }
    var c;
    while (arr0.length > arr1.length) {
      c = arr0.pop();
      c.emit(eventData.type, Object.assign(eventData, op0), c);
    }
    while (arr1.length > arr0.length) {
      c = arr1.pop();
      c.emit(eventData.type, Object.assign(eventData, op1), c);
    }
    var c0, c1;
    while (arr0.length > 0) {
      c0 = arr0.pop();
      c1 = arr1.pop();
      if (c0 === c1) {
        c0.emit(eventData.type, Object.assign(eventData, op01), c0);
      } else {
        c0.emit(eventData.type, Object.assign(eventData, op0), c0);
        c1.emit(eventData.type, Object.assign(eventData, op1), c0);
      }
    }
  };
  var newRange;
  var eventData;
  if (range.collapsed) {
    if (_AElement["default"].prototype.isDescendantOf.call(range.startContainer, this.$content)) {
      eventData = {
        type: 'range',
        range: range,
        target: range.startContainer,
        comp: (0, _utils.findFDComponentOfNode)(range.startContainer),
        pos: 'in'
      };
      dispatchSingleEvent(range.startContainer, eventData);
    }
  } else {
    if (range.startContainer !== range.endContainer) {
      newRange = document.createRange();
      newRange.setStart(range.startContainer, range.endOffset);
      if (range.startContainer.nodeType === Node.TEXT_NODE) {
        newRange.setEnd(range.startContainer, range.startContainer.data.length);
      } else {
        newRange.setEnd(range.startContainer, range.startOffset);
      }
      sel.removeAllRanges();
      sel.addRange(newRange);
      _Snackbar["default"].show("TODO: Select range");
    }

    // this.showVirtualRangeByRange(range);
  }

  clearTimeout(this.selectTO);
  this.selectTO = setTimeout(function () {
    var sel = getSelection();
    var range = sel.getRangeAt(0);
    _this4.editor.selection.importFromDomRange(range);
    _this4.editor.notifyCmdDescriptorsChange();
    _this4.changeComponentDelegateIfNeed();
  }, 5);
};
FDESelectController.prototype.ev_click = function (event) {
  var comp = (0, _utils.findFDComponentOfNode)(event.target);
  if (comp) comp.onClick(event);
};
FDESelectController.prototype.ev_focus = function (event) {
  this.$foreground.addClass('fd-focus');
};
FDESelectController.prototype.ev_blur = function () {
  this.$foreground.removeClass('fd-focus');
};
FDESelectController.prototype.changeComponentDelegateIfNeed = function () {
  var oldComponents = this.editor.propertyDelegate ? this.editor.propertyDelegate.components : [];
  var newComponents = this.editor.selection.range && this.editor.selection.range.leafComponents;
  newComponents = newComponents || [];
  var newIndexDict = newComponents.reduce(function (ac, cr, i) {
    ac[cr.objId] = i;
    return ac;
  }, {});
  var oldIndexDict = oldComponents.reduce(function (ac, cr, i) {
    ac[cr.objId] = i;
    return ac;
  }, {});
  var newAEs = [];
  var isDiff = newComponents.length !== oldComponents.length;
  isDiff = isDiff || newComponents.some(function (x) {
    return !(x.objId in oldIndexDict);
  });

  // var
  if (isDiff) {
    this.editor.propertyDelegate = new FDEPropertyDelegate(this.editor, newComponents);
    if (this.editor.propertyEditor) {
      this.editor.propertyEditor.delegate = this.editor.propertyDelegate;
    }
  }
  // else {
  //     console.log('no change')
  // }
};

/**
 *
 * @param {FDEditor} editor
 * @constructor
 */
function FDContentEditable(editor) {
  this.editor = editor;
  this.focusingDict = {};
  this.focusingArr = [];
  this.inRangeDict = {};
  this.inRangeArr = [];
  this.range = null;
  this.isFocusIn = false;
}
FDContentEditable.prototype.onCreateView = function () {
  this.$content = this.editor.$content;
  this.$content.on('focus', this.ev_focus.bind(this));
  this.ev_selectionChange = this.ev_selectionChange.bind(this);
};

/**
 *
 * @param {*=} elt
 */
FDContentEditable.prototype.setupElt = function (elt) {
  var _this5 = this;
  elt = elt || this.$content;
  if (elt !== this.$content && !elt.fdAttached && elt.nodeType !== Node.TEXT_NODE) {
    elt.fdAttached = true;
    elt.fdId = (0, _stringGenerate.randomIdent)(10);
    (0, _FCore.$)(elt).defineEvent(['fdselectfocus', 'fdselectblur', 'fdrange', "fdrangeblur", 'fdkeyup', 'fdeydown']);
  }
  Array.prototype.forEach.call(elt.childNodes, function (child) {
    return _this5.setupElt(child);
  });
};
FDContentEditable.prototype.onResume = function () {
  document.addEventListener('selectionchange', this.ev_selectionChange);
};
FDContentEditable.prototype.onPause = function () {
  document.removeEventListener('selectionchange', this.ev_selectionChange);
};
FDContentEditable.prototype.ev_focus = function (event) {

  // console.log(event);
};
FDContentEditable.prototype.onSel = function (sel) {
  var _this6 = this;
  var focusNode = sel.focusNode;
  var newFocusingDict = {};
  var newFocusingArray = [];
  var isIn = false;
  var target = focusNode;
  while (target && target !== this.$content && target !== document.body) {
    if (target.fdAttached && target.emit) {
      newFocusingArray.push(target);
      newFocusingDict[target.fdId] = target;
    }
    target = target.parentElement;
    if (target === this.$content) {
      isIn = true;
    }
  }
  this.focusingArr.forEach(function (elt) {
    if (elt.isDescendantOf(_this6.$content)) {
      if (!newFocusingDict[elt.fdId]) {
        elt.emit('fdselectblur', {
          focusNode: focusNode,
          inContent: isIn
        }, elt);
      }
    }
  });
  newFocusingArray.forEach(function (elt) {
    if (!_this6.focusingDict[elt.fdId]) {
      elt.emit('fdselectfocus', {
        focusNode: focusNode,
        inContent: isIn
      }, elt);
    }
  });
  if (isIn) {
    this.focusingDict = newFocusingDict;
    this.focusingArr = newFocusingArray;
    this.isFocusIn = true;
    this.editor.$view.addClass('as-content-selected');
  } else {
    this.isFocusIn = false;
    this.editor.$view.removeClass('as-content-selected');
  }
};

/**
 *
 * @param {Range} range
 */
FDContentEditable.prototype.onRange = function (range) {
  var _this7 = this;
  var startCtn = range.startContainer;
  var endCtn = range.endContainer;
  var startOfs = range.startOffset;
  var endOfs = range.endOffset;
  var started = false;
  var ended = false;
  var newInRangeDict = {};
  var newInRangeArray = [];
  var visit = function visit(node) {
    var prevStart = started;
    var prevEnd = ended;
    if (startCtn === node && endCtn === node) {
      started = true;
      if (node.nodeType !== Node.TEXT_NODE) {
        Array.prototype.slice.call(node.childNodes, startOfs, endOfs).forEach(function (child) {
          return visit(child);
        });
      }
      ended = true;
    } else if (startCtn === node) {
      started = true;
      if (node.nodeType !== Node.TEXT_NODE) {
        Array.prototype.slice.call(node.childNodes, startOfs).forEach(function (child) {
          return visit(child);
        });
      }
    } else if (endCtn === node) {
      if (node.nodeType !== Node.TEXT_NODE) {
        Array.prototype.slice.call(node.childNodes, 0, endOfs).forEach(function (child) {
          return visit(child);
        });
      }
      ended = true;
    } else if (node.nodeType !== Node.TEXT_NODE) {
      Array.prototype.slice.call(node.childNodes).forEach(function (child) {
        return visit(child);
      });
    }
    var newStart = started;
    var newEnd = ended;
    var position;
    if (prevStart) {
      if (!prevEnd) {
        if (newEnd) {
          position = 'contain-end';
        } else {
          position = 'in';
        }
      }
    } else {
      if (newStart) {
        if (newEnd) {
          position = 'contain-all';
        } else {
          position = 'contain-start';
        }
      }
    }
    if (node.emit) {
      if (position) {
        node.emit('fdrange', {
          type: 'fdrange',
          position: position,
          range: range
        }, node);
        newInRangeDict[node.fdId] = {
          node: node,
          position: position
        };
        newInRangeArray.push(newInRangeDict[node.fdId]);
      } else if (_this7.inRangeDict[node.fdId]) {
        node.emit('fdrange', {
          type: 'fdrange',
          position: 'out',
          range: range
        }, node);
      }
    }
  };
  Array.prototype.forEach.call(this.$content.childNodes, function (child) {
    return visit(child);
  });
  this.inRangeDict = newInRangeDict;
  this.inRangeArr = newInRangeArray;
};
FDContentEditable.prototype.ev_selectionChange = function () {
  var sel = document.getSelection();
  this.setupElt();
  this.onSel(sel);
  if (this.isFocusIn) {
    this.range = sel.getRangeAt(0);
    this.onRange(this.range);
  } else {
    this.inRangeArr.forEach(function (it) {
      return it.node.emit('fdrangeblur', {
        type: 'dfrangeblur'
      }, it.node);
    });
  }
  this.editor.selectCtrl.ev_selectionChange();
};
FDContentEditable.prototype.destroy = function () {
  document.removeEventListener('range', this.ev_selectionChange);
};

/**
 *
 * @param {FDEditor} editor
 * @constructor
 */
function FDEKeyboardController(editor) {
  var _this8 = this;
  this.editor = editor;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) _this8[key] = _this8[key].bind(_this8);
  });
}
FDEKeyboardController.prototype.onViewCreated = function () {
  this.$content = this.editor.$content;
  this.$content.on('keydown', this.ev_keyDown);
};
FDEKeyboardController.prototype.ev_keyDown = function (event) {
  var _this9 = this;
  var range = getSelection().getRangeAt(0);
  var dispatchSingleEvent = function dispatchSingleEvent(elt, eventData) {
    while (elt) {
      if (elt.isSupportedEvent && elt.isSupportedEvent(eventData.type)) {
        elt.emit(eventData.type, eventData, elt);
      }
      elt = elt.parentElement;
      if (elt === _this9.$content) break;
    }
  };
  var comp;
  if (range) {
    if (range.collapsed) {
      dispatchSingleEvent(range.startContainer, event);
      comp = (0, _utils.findFDComponentOfNode)(range.startContainer);
      if (comp) {
        comp.onKeyDown(event);
      }
    } else {
      if (range.startContainer !== range.endContainer && range.startContainer.nodeType !== Node.TEXT_NODE) {
        event.preventDefault();
      }
    }
  }
  setTimeout(function () {
    _this9.editor.selectCtrl.ev_selectionChange();
    _this9.editor.propertyDelegate.updatePropertyRecursive('text');
    _this9.editor.propertyDelegate.updatePropertyRecursive('value');
  }, 10);
};

/***
 * @extends MultiObjectPropertyDelegate
 * @param {FDEditor} editor
 * @param {Array<BaseComponent>} components
 * @constructor
 */
function FDEPropertyDelegate(editor, components) {
  this.editor = editor;
  this.components = components;
  _MultiObjectPropertyEditor.MultiObjectPropertyDelegate.call(this);
}
_OOP["default"].mixClass(FDEPropertyDelegate, _MultiObjectPropertyEditor.MultiObjectPropertyDelegate);
FDEPropertyDelegate.prototype.getPropertyNames = function () {
  var _this10 = this;
  if (this.components.length === 0) return [];
  var descriptors = {};
  var hasDependency = {};
  this.components.forEach(function (comp) {
    if (comp.fragment !== _this10.editor.rootFragment) {
      descriptors['class'] = [{
        type: 'enum',
        values: [comp.fragment.tag] //
      }];
    }

    Object.keys(comp.attributeHandlers).forEach(function (name) {
      if (comp.fragment !== _this10.editor.rootFragment) {
        if (!['id', 'name'].includes(name)) return;
      }
      var desc = comp.attributes.getPropertyDescriptor(name);
      if (desc.dependency && desc.dependency.length > 0) hasDependency[name] = true;
      descriptors[name] = descriptors[name] || [];
      descriptors[name].push(desc);
    });
    Object.keys(Object.assign({}, comp.styleHandlers, comp.anchor && comp.anchor.styleHandlers)).forEach(function (name) {
      var desc = comp.style.getPropertyDescriptor(name);
      if (desc.dependency && desc.dependency.length > 0) hasDependency[name] = true;
      descriptors[name] = descriptors[name] || [];
      descriptors[name].push(desc);
    });
  });
  var checkOKDescArr = function checkOKDescArr(arr) {
    if (arr.length !== _this10.components.length) return false;
    if (arr.length === 1) return true;
    var first = arr[0];
    return arr.every(function (it) {
      return it.sign && it.sign === first.sign;
    });
  };
  var names = Object.keys(descriptors).filter(function (key) {
    return (!hasDependency[key] || _this10.components.length === 1) && checkOKDescArr(descriptors[key]);
  });
  names.sort(function (a, b) {
    var vA = _IndexedPropertyNames["default"][a] + 1 || 10000;
    var vB = _IndexedPropertyNames["default"][b] + 1 || 10000;
    if (vA === vB) {
      if (a < b) vB += 1;else vA += 1;
    }
    return vA - vB;
  });
  return names;
};
FDEPropertyDelegate.prototype.getAllTagsByTypeId = function (typeId) {
  var res = Object.keys(_Assembler.AssemblerInstance.classes['FRAGMENT']).map(function (formId) {
    var clazz = _Assembler.AssemblerInstance.classes['FRAGMENT'][formId];
    var cvd = clazz.prototype.contentViewData;
    var layout = cvd.layout || cvd;
    var id = layout.attributes && layout.attributes.typeId;
    if (id === typeId) return formId;
    return null;
  }).filter(function (x) {
    return x !== null;
  });
  return res;
};
FDEPropertyDelegate.prototype.getPropertyDescriptor = function (key) {
  if (key === 'class') return {
    type: 'enum',
    values: this.getAllTagsByTypeId(this.components[0].fragment.contentViewData.layout.attributes && this.components[0].fragment.contentViewData.layout.attributes.typeId) //
  };

  var obj = this.components[this.components.length - 1];
  var disabled = ['name', 'disembark', 'dataBinding', 'value', 'values', 'list', 'treeList', 'disabled', 'text', 'checked', 'textType'].indexOf(key) >= 0 && this.components.some(function (obj) {
    return obj.attributes && obj.attributes.permissions && obj.attributes.permissions.edit_attributes === 'GENERATOR';
  });
  var res = obj.attributeHandlers[key] ? obj.attributes.getPropertyDescriptor(key) : obj.style.getPropertyDescriptor(key);
  res = Object.assign({}, res);
  res.disabled = res.disabled || disabled;
  return res;
};
FDEPropertyDelegate.prototype.getProperty = function (key) {
  var _obj$attributes, _obj$style;
  var obj = this.components[this.components.length - 1];
  if (key === 'class') {
    return this.components[0].fragment.contentViewData.layout.attributes && this.components[0].fragment.contentViewData.layout.attributes.typeId;
  }
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
    args[_key2 - 1] = arguments[_key2];
  }
  return obj.attributeHandlers[key] ? (_obj$attributes = obj.attributes).getProperty.apply(_obj$attributes, [key].concat(args)) : (_obj$style = obj.style).getProperty.apply(_obj$style, [key].concat(args));
};
FDEPropertyDelegate.prototype.mesureKeys = ['left', 'right', 'top', 'bottom', 'width', 'height', /^padding/, /^margin/];
FDEPropertyDelegate.prototype.setProperty = function (key, value) {
  for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
    args[_key3 - 2] = arguments[_key3];
  }
  var isMeasure;
  switch (key) {
    case 'class':
      this.components.forEach(function (obj) {
        var style = obj.style["export"]();
        var attributes = {
          id: obj.attributes.id,
          name: obj.attributes.name
        };
        if (obj.attributes.permissions) {
          attributes.permissions = obj.attributes.permissions;
        }
        var newFrag = _Assembler.AssemblerInstance.build({
          "class": value,
          style: style,
          attributes: attributes
        });
        obj.parent.addChildBefore(newFrag.view, obj);
        obj.fragment.parent.addChildBefore(newFrag, obj.fragment);
        obj.parent.removeChild(obj);
        obj.fragment.parent.removeChild(newFrag);
      });
      // this.editor.anchorEditorsCtrl.setActiveComponent();
      _ResizeSystem["default"].update();
      break;
    case 'position':
      this.components.forEach(function (obj) {
        if (obj.style.position === 'absolute' && (value === 'relative' || value === 'static') || obj.style.position === 'relative' && value === 'static') {
          obj.style.left = 0;
          obj.style.top = 0;
          obj.style.bottom = 0;
          obj.style.right = 0;
        }
        obj.style.position = value;
      });
      // this.editor.anchorEditorsCtrl.updateAnchorEditors();
      break;
    default:
      this.components.forEach(function (obj) {
        var _obj$attributes2, _obj$style2;
        return obj.attributeHandlers[key] ? (_obj$attributes2 = obj.attributes).setProperty.apply(_obj$attributes2, [key, value].concat(args)) : (_obj$style2 = obj.style).setProperty.apply(_obj$style2, [key, value].concat(args));
      });
      isMeasure = this.mesureKeys.some(function (t) {
        return key === t || t.test && t.test(key);
      });
      if (isMeasure) {
        // this.editor.anchorEditorsCtrl.updateAnchorEditorPositions();
      } else if (key.toLowerCase().indexOf('align')) {
        // this.editor.anchorEditorsCtrl.updateAnchorEditors();
      }
  }
  Object.values(this.editor.selection.anchorEditors).forEach(function (ae) {
    return ae.updatePosition();
  }); //todo: update cursor
};

FDEPropertyDelegate.prototype.onSetPropertyComplete = function (name) {};

/***
 * @extends OutlineDelegate
 * @param {FDEditor} editor
 * @constructor
 */
function FDELayoutOutlineDelegate(editor) {
  _FOutline.OutlineDelegate.call(this);
  this.editor = editor;
}
_OOP["default"].mixClass(FDELayoutOutlineDelegate, _FOutline.OutlineDelegate);
FDELayoutOutlineDelegate.prototype.getTreeData = function () {
  var layout = this.editor.rootLayout;
  if (!layout) return [];
  var frag = layout.fragment;
  var visit = function visit(compNode) {
    var dataNode = {
      name: compNode.attributes.displayName || compNode.attributes.name,
      id: compNode.attributes.id,
      icon: compNode.fragment === frag ? compNode.menuIcon : compNode.fragment.menuIcon
    };
    if (compNode.fragment === frag && compNode.children && compNode.children.length > 0) {
      dataNode.children = compNode.children.map(function (c) {
        return visit(c);
      });
    }
    return dataNode;
  };
  return visit(layout);
};
FDELayoutOutlineDelegate.prototype.onClickNode = function (nodeELt, event) {
  console.log(nodeELt);
};

/***/ }),

/***/ 93635:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.FDEditorCmdDescriptors = void 0;
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _LEPageSettingDialog = __webpack_require__(23609);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var FDEditorCmd = {};

/**
 * @this FDEditor
 */
FDEditorCmd.flushToLayoutEditor = function () {
  if (this.error) return;
  var layoutEditor = this.getContext(_R["default"].LAYOUT_EDITOR);
  var data = this.getData();
  if (layoutEditor) {
    layoutEditor.setData(data);
  }
};

/**
 * @this FDEditor
 */
FDEditorCmd.preview = function () {
  this.execCmd('flushToLayoutEditor');
  this.flexFormEditor.execCmd('preview');
};

/**
 * @this FDEditor
 */

FDEditorCmd.save = function () {
  this.execCmd('flushToLayoutEditor');
  this.flexFormEditor.execCmd('save');
};

/**
 * @this FDEditor
 */

FDEditorCmd.saveAs = function () {
  this.execCmd('flushToLayoutEditor');
  this.flexFormEditor.execCmd('saveAs');
};

/**
 * @this FDEditor
 */

FDEditorCmd.saveAsSystem = function () {
  this.execCmd('flushToLayoutEditor');
  this.flexFormEditor.execCmd('saveAsSystem');
};

/**
 * @this FDEditor
 */

FDEditorCmd.importFromJson = function () {
  this.execCmd('flushToLayoutEditor');
  this.flexFormEditor.execCmd('importFromJson');
};

/**
 * @this FDEditor
 */
FDEditorCmd.export2Json = function () {
  this.execCmd('flushToLayoutEditor');
  this.flexFormEditor.execCmd('export2Json');
};

/**
 * @this FDEditor
 */
FDEditorCmd.export2sharpEncode = function () {
  this.execCmd('flushToLayoutEditor');
  this.flexFormEditor.execCmd('export2sharpEncode');
};

/**
 * @this FDEditor
 */
FDEditorCmd.export2clipboard = function () {
  this.execCmd('flushToLayoutEditor');
  this.flexFormEditor.execCmd('export2clipboard');
};

/**
 * @this FDEditor
 */
FDEditorCmd.pageSetting = function () {
  (0, _LEPageSettingDialog.openPageSettingDialog)().then(function (result) {
    console.log(result);
    // if (!result || !this.rootLayout) return;
    // this.rootLayout.style.width = result[0];
    // this.rootLayout.style.height = 'auto';
    // if (this.rootLayout.tag === 'LinearLayout') {
    //     this.rootLayout.style.paddingLeft = result[2];
    //     this.rootLayout.style.paddingRight = result[2];
    //     this.rootLayout.style.paddingTop = result[3];
    //     this.rootLayout.style.paddingBottom = result[3];
    // }
  });
};

/**
 * @this FDEditor
 */
FDEditorCmd.formatTextAlignLeft = function () {
  var _this = this;
  var range = this.selection.range;
  if (!range) return;
  range.leafComponents.forEach(function (comp) {
    if (!comp.styleHandlers.fontStyle) return;
    if (comp.tag === 'HyperLayout' && comp.parent === _this.rootLayout) {
      comp.style.contentAlign = 'left';
    } else if (comp.isText && comp.parent && comp.parent.tag === 'HyperLayout' && comp.parent !== _this.rootLayout) {
      comp.parent.style.contentAlign = 'left';
    }
  });
  this.notifyCmdDescriptorsChange();
};
FDEditorCmd.formatTextAlignCenter = function () {
  var _this2 = this;
  var range = this.selection.range;
  if (!range) return;
  range.leafComponents.forEach(function (comp) {
    if (!comp.styleHandlers.fontStyle) return;
    if (comp.tag === 'HyperLayout' && comp.parent === _this2.rootLayout) {
      comp.style.contentAlign = 'center';
    } else if (comp.isText && comp.parent && comp.parent.tag === 'HyperLayout' && comp.parent !== _this2.rootLayout) {
      comp.parent.style.contentAlign = 'center';
    }
  });
  this.notifyCmdDescriptorsChange();
};
FDEditorCmd.formatTextAlignRight = function () {
  var _this3 = this;
  var range = this.selection.range;
  if (!range) return;
  range.leafComponents.forEach(function (comp) {
    if (!comp.styleHandlers.fontStyle) return;
    if (comp.tag === 'HyperLayout' && comp.parent === _this3.rootLayout) {
      comp.style.contentAlign = 'right';
    } else if (comp.isText && comp.parent && comp.parent.tag === 'HyperLayout' && comp.parent !== _this3.rootLayout) {
      comp.parent.style.contentAlign = 'right';
    }
  });
  this.notifyCmdDescriptorsChange();
};

/**
 * @this FDEditor
 */
FDEditorCmd.formatTextItalic = function (flag) {
  var range = this.selection.range;
  if (!range) return;
  //todo: separate text segment
  range.leafComponents.forEach(function (comp) {
    if (!comp.styleHandlers.fontStyle) return;
    var value = comp.style.fontStyle || 'Regular';
    if (flag) {
      if (value === 'Bold') {
        value = 'Bold italic';
      } else value = 'Italic';
    } else {
      if (value === 'Bold Italic') value = 'Bold';else value = 'Regular';
    }
    comp.style.fontStyle = value;
  });
};
FDEditorCmd.formatTextBold = function (flag) {
  var range = this.selection.range;
  if (!range) return;
  //todo: separate text segment
  range.leafComponents.forEach(function (comp) {
    if (!comp.styleHandlers.fontStyle) return;
    var value = comp.style.fontStyle || 'Regular';
    if (flag) {
      if (value === 'Italic') {
        value = 'Bold italic';
      } else value = 'Bold';
    } else {
      if (value === 'Bold Italic') value = 'Italic';else value = 'Regular';
    }
    comp.style.fontStyle = value;
  });
};

/**
 * @this FDEditor
 */
FDEditorCmd.formatTextUnderline = function (flag) {
  var range = this.selection.range;
  if (!range) return;
  //todo: separate text segment
  range.leafComponents.forEach(function (comp) {
    if (!comp.styleHandlers.textDecoration) return;
    if (flag) comp.style.textDecoration = 'underline';else comp.style.textDecoration = '';
  });
};
var _default = FDEditorCmd;
exports["default"] = _default;
var FDEditorCmdDescriptors = {};

/**
 * @this FDEditor
 */
exports.FDEditorCmdDescriptors = FDEditorCmdDescriptors;
FDEditorCmdDescriptors.formatTextItalic = function () {
  var res = {};
  res.checked = this.selection.range && this.selection.range.leafComponents.length > 0 && this.selection.range.leafComponents.every(function (comp) {
    var value = comp.style.fontStyle;
    if (value && value.toLowerCase().indexOf('italic') >= 0) return true;
    return false;
  });
  return res;
};

/**
 * @this FDEditor
 */
FDEditorCmdDescriptors.formatTextBold = function () {
  var res = {};
  res.checked = this.selection.range && this.selection.range.leafComponents.length > 0 && this.selection.range.leafComponents.every(function (comp) {
    var value = comp.style.fontStyle;
    if (value && value.toLowerCase().indexOf('bold') >= 0) return true;
    return false;
  });
  return res;
};

/**
 * @this FDEditor
 */
FDEditorCmdDescriptors.formatTextUnderline = function () {
  var res = {};
  res.checked = this.selection.range && this.selection.range.leafComponents.length > 0 && this.selection.range.leafComponents.every(function (comp) {
    var value = comp.style.textDecoration;
    if (value && value.toLowerCase().indexOf('underline') >= 0) return true;
    return false;
  });
  return res;
};

/***/ }),

/***/ 14624:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(21230);
var _FCore = __webpack_require__(51518);
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @param {FDEditor} fdEditor
 * @param {FDBaseComponent} component
 * @constructor
 */
function FDBaseAnchorEditor(fdEditor, component) {
  this.fdEditor = fdEditor;
  this.component = component;
  this.render();
}
FDBaseAnchorEditor.prototype.render = function () {
  var _this = this;
  this.$foreground = this.fdEditor.$foreground;
  this.domElt = (0, _FCore._)({
    tag: _Hanger["default"],
    props: {
      hangOn: 3
    },
    "class": 'fde-anchor-editor',
    child: [{
      "class": 'fde-anchor-editor-size-box'
    }, {
      "class": 'fde-anchor-editor-move',
      child: 'span.mdi.mdi-cursor-move'
    }, '.fde-anchor-editor-resize-width', '.fde-anchor-editor-resize-height', '.fde-anchor-editor-resize-width-height']
  }).addTo(this.$foreground);
  this.$sizeBox = (0, _FCore.$)('.fde-anchor-editor-size-box', this.domElt);
  this.$resizeWidth = (0, _FCore.$)('.fde-anchor-editor-resize-width', this.domElt);
  this.$resizeHeight = (0, _FCore.$)('.fde-anchor-editor-resize-height', this.domElt);
  this.$resizeWidthHeight = (0, _FCore.$)('.fde-anchor-editor-resize-width-height', this.domElt);
  this.$move = (0, _FCore.$)('.fde-anchor-editor-move', this.domElt);
  var operatorOf = function operatorOf(event) {
    var op = null;
    if (event.target === _this.$resizeWidth) op = {
      width: true
    };else if (event.target === _this.$resizeHeight) op = {
      height: true
    };else if (event.target === _this.$resizeWidthHeight) op = {
      width: true,
      height: true
    };else if ((0, _EventEmitter.hitElement)(_this.$move, event)) {
      op = {
        move: true
      };
    }
    return op;
  };
  this.domElt.on('draginit', function (event) {
    var op = operatorOf(event);
    if (op) {
      event.preventDefault();
      _this.curOP = op;
    } else {
      event.cancel();
    }
  });
  this.domElt.on('dragstart', function (event) {
    event.preventDefault();
    _this.onDragStart(_this.curOP, event);
  });
  this.domElt.on('drag', function (event) {
    event.preventDefault();
    _this.onDrag(_this.curOP, event);
  });
  this.domElt.on('dragend', function (event) {
    event.preventDefault();
    _this.onDragEnd(_this.curOP, event);
    _this.curOP = null;
  });
  this.update();
};
FDBaseAnchorEditor.prototype.getAcceptOptions = function () {
  return ['width', 'height', 'move'];
};
FDBaseAnchorEditor.prototype.updatePosition = function () {
  var bound = this.component.domElt.getBoundingClientRect();
  var fBound = this.$foreground.getBoundingClientRect();
  this.compBound = bound;
  this.foregroundBound = fBound;
  this.domElt.addStyle({
    top: bound.top - fBound.top + 'px',
    left: bound.left - fBound.left + 'px',
    width: bound.width + 'px',
    height: bound.height + 'px'
  });
};
FDBaseAnchorEditor.prototype.updateStyle = function () {
  var _this2 = this;
  var ao = this.getAcceptOptions();
  ['width', 'height', 'move'].forEach(function (op) {
    if (ao.includes(op)) {
      _this2.domElt.addClass('fde-option-' + op);
    } else {
      _this2.domElt.removeClass('fde-option-' + op);
    }
  });
};
FDBaseAnchorEditor.prototype.onDragStart = function (op, event) {
  console.log(op);
};
FDBaseAnchorEditor.prototype.onDrag = function (op, event) {};
FDBaseAnchorEditor.prototype.onDragEnd = function (op, event) {};
FDBaseAnchorEditor.prototype.update = function () {
  this.updateStyle();
  this.updatePosition();
};
FDBaseAnchorEditor.prototype.destroy = function () {
  this.domElt.remove();
};
var _default = FDBaseAnchorEditor;
exports["default"] = _default;

/***/ }),

/***/ 27126:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseAnchorEditor = _interopRequireDefault(__webpack_require__(14624));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseAnchorEditor
 * @constructor
 */
function FDHyperAnchorEditor() {
  _FDBaseAnchorEditor["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDHyperAnchorEditor, _FDBaseAnchorEditor["default"]);
FDHyperAnchorEditor.prototype.onDragStart = function (op, event) {
  if (op.width) {
    this._width0 = this.component.style.getProperty('width', 'px');
  }
  if (op.height) {
    this._height0 = this.component.style.getProperty('height', 'px');
  }
};
FDHyperAnchorEditor.prototype.onDrag = function (op, event) {
  var delta = event.currentPoint.sub(event.startingPoint);
  var changed;
  if (op.width) {
    this.component.style.setProperty('width', Math.max(0, this._width0 + delta.x), 'px');
    changed = true;
  }
  if (op.height) {
    this.component.style.setProperty('height', Math.max(0, this._height0 + delta.y), 'px');
    changed = true;
  }
  if (changed) {
    this.fdEditor.selection.draw();
    this.fdEditor.propertyDelegate.updatePropertyRecursive('width');
    this.fdEditor.propertyDelegate.updatePropertyRecursive('height');
  }
};
var _default = FDHyperAnchorEditor;
exports["default"] = _default;

/***/ }),

/***/ 13095:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FAttributes = _interopRequireDefault(__webpack_require__(96720));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _HyperAnchor = _interopRequireDefault(__webpack_require__(94243));
var _BaseComponent = _interopRequireDefault(__webpack_require__(32306));
var _stringGenerate = __webpack_require__(10713);
var _FCore = __webpack_require__(51518);
var _FNode = _interopRequireDefault(__webpack_require__(88215));
var _utils = __webpack_require__(49633);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FNode
 * @param {FDEditor} fdEditor
 * @constructor
 */
function FDBaseComponent(fdEditor) {
  _FNode["default"].call(this);
  /**
   *
   * @type {null| FDEFragment}
   */
  this.fragment = null;
  this.fdEditor = fdEditor;
  this.objId = (0, _stringGenerate.randomIdent)(5);
  this.anchor = null;
  /**
   * @type {AElement}
   */
  this.domElt = this.render() || this.domElt;
  this.domElt.addClass('fd-component').addClass('as-base-component');
  this.$textCtn = this.$textCtn || (0, _FCore.$)('.fd-text-ctn', this.domElt);
  this.domElt.fdComponent = this;
  this.attributes = Object.assign(new _FAttributes["default"](this), this.attributes, {
    id: this.objId
  });
  this.style = Object.assign(new _FAttributes["default"](this), this.style);
  this.attributes.loadAttributeHandlers(this.attributeHandlers);
  this.style.loadAttributeHandlers(this.styleHandlers);
}
(0, _inheritComponentClass["default"])(FDBaseComponent, _FNode["default"]);
FDBaseComponent.prototype.type = 'COMPONENT';
FDBaseComponent.prototype.tag = 'Base';
FDBaseComponent.prototype.isText = false;
FDBaseComponent.prototype.isLayout = false;
FDBaseComponent.prototype.render = function () {
  throw new Error("Not implement!");
};
FDBaseComponent.prototype.implicitMeasureSizeValue = _BaseComponent["default"].prototype.implicitMeasureSizeValue;
FDBaseComponent.prototype.explicitMeasureSizeValue = _BaseComponent["default"].prototype.explicitMeasureSizeValue;
FDBaseComponent.prototype.updateViewStyle = _BaseComponent["default"].prototype.updateViewStyle;
FDBaseComponent.prototype.onSizeChange = _BaseComponent["default"].prototype.onSizeChange;
FDBaseComponent.prototype.style = {};
FDBaseComponent.prototype.attributes = {};
FDBaseComponent.prototype.styleHandlers = {};
FDBaseComponent.prototype.attributeHandlers = {};
FDBaseComponent.prototype.anchor = Object.assign({}, _HyperAnchor["default"].prototype);
Object.assign(FDBaseComponent.prototype.styleHandlers);
FDBaseComponent.prototype.pinFire = _noop["default"];
FDBaseComponent.prototype.notifyChange = _noop["default"];
FDBaseComponent.prototype.destroy = _noop["default"];
FDBaseComponent.prototype.unbindDataInFragment = _noop["default"];
FDBaseComponent.prototype.bindDataToFragment = _noop["default"];
FDBaseComponent.prototype.updateEmbark = _noop["default"];
FDBaseComponent.prototype.updateEmbarkStyle = _noop["default"]; //todo: embark for editor

FDBaseComponent.prototype.notifySizeChange = function () {
  this.fdEditor.notifySizeChange();
};
FDBaseComponent.prototype.getData = _BaseComponent["default"].prototype.getData;

/**
 * @type {KeyboardEvent}
 * @param event
 */
FDBaseComponent.prototype.onKeyDown = function (event) {};
FDBaseComponent.prototype.offsetFromDom = function (domCtn, ofs) {
  if (this.$textCtn && this.$textCtn.firstChild === domCtn) {
    return ofs;
  } else if (this.hasDomNode(domCtn)) {
    console.error('TODO: compOffsetFromDom', domCtn, ofs);
  }
  return NaN;
};

/**
 * @returns {{ctn: Node|AElement, ofs: number}|null}
 */
FDBaseComponent.prototype.offsetToDom = function (ofs) {
  if (this.$textCtn && this.$textCtn.firstChild) {
    return {
      ctn: this.$textCtn.firstChild,
      ofs: ofs
    };
  }
  return null;
};

/**
 *
 * @param {"start"|"end"|number=} startOffset
 * @param {"start"|"end"|number=}endOffset
 * @returns {Rectangle[]}
 */
FDBaseComponent.prototype.getTextRects = function (startOffset, endOffset) {
  return [];
};

/**
 *
 * @param {Node|AElement}node
 */
FDBaseComponent.prototype.hasDomNode = function (node) {
  while (node) {
    if (node === this.domElt) return true;
    node = node.parentElement;
  }
  return false;
};

/**
 * on press backspace from next comp

 * @param {KeyboardEvent} event
 */
FDBaseComponent.prototype.deleteLastChar = function () {};

/**
 *
 * @param {Event} event
 */
FDBaseComponent.prototype.onDomRange = function (event) {};

/**
 *
 * @param {MouseEvent} event
 */
FDBaseComponent.prototype.onClick = function (event) {};
FDBaseComponent.prototype.addNewParagraphBefore = function () {
  var root = this.fdEditor.rootLayout;
  var parent = this.parent;
  var newParagraph;
  if (root === parent) {
    newParagraph = this.assembler.build({
      tag: 'HyperLayout',
      style: {
        display: 'block',
        paddingBottom: 10
      },
      children: [{
        tag: 'Text',
        style: {
          display: 'inline'
        }
      }]
    }, this.fragment);
    parent.addChildBefore(newParagraph, this);
  } else {}
  return newParagraph;
};
Object.defineProperty(FDBaseComponent.prototype, 'assembler', {
  /**
   *
   * @returns {FDAssembler}
   */
  get: function get() {
    return this.fdEditor.assembler;
  }
});
Object.defineProperty(FDBaseComponent.prototype, 'lcEmitter', {
  /**
   *
   * @returns {EventEmitter}
   */
  get: function get() {
    return this.fdEditor.lcEmitter;
  }
});
Object.defineProperty(FDBaseComponent.prototype, 'isFragmentView', {
  /**
   *
   * @returns {boolean}
   */
  get: function get() {
    return this.fragment.view === this;
  }
});
var _default = FDBaseComponent;
exports["default"] = _default;

/***/ }),

/***/ 9208:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseComponent = _interopRequireDefault(__webpack_require__(13095));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _keyboard = __webpack_require__(95141);
var _utils = __webpack_require__(49633);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDBlockComponent() {
  _FDBaseComponent["default"].apply(this, arguments);
  this.domElt.addClass('fd-block-component');
  this.$textCtn.defineEvent('keydown').on('keydown', this.ev_textKeyDown.bind(this));
}
(0, _inheritComponentClass["default"])(FDBlockComponent, _FDBaseComponent["default"]);
FDBlockComponent.prototype.onDomRange = function (event) {
  console.log(event);
  var sel = getSelection();
  var range = sel.getRangeAt(0);
  var newText;
  var newTextComp;
  var textNode;
  if (range.startContainer === this.$textCtn.firstChild) {
    newText = range.startContainer.data.replace(_utils.CHAR_EMQ, "").replace(_utils.CHAR_ZWS, "");
    if (newText.length > 0) {
      newTextComp = this.assembler.build({
        tag: "Text",
        attributes: {
          text: newText
        }
      }, this.fragment);
      this.parent.addChildAfter(newTextComp, this);
      if (this.style.display === 'inline-block') {
        newTextComp.style.display = 'inline-block';
        newTextComp.style.vAlign = this.style.vAlign;
      } else {
        newTextComp.style.display = 'inline';
      }
      this.$textCtn.firstChild.data = _utils.CHAR_EMQ;
      textNode = (0, _utils.findLastTextNode)(newTextComp.domElt);
      range = document.createRange();
      range.setStart(textNode, textNode.data.length);
      range.setEnd(textNode, textNode.data.length);
      sel.removeAllRanges();
      sel.addRange(range);
    }
  } else if (range.startContainer !== this.$textCtn.firstChild) {
    range.setStart(this.$textCtn.firstChild, 0);
    range.setEnd(this.$textCtn.firstChild, 0);
  }
};
FDBlockComponent.prototype.offsetFromDom = function (domCtn, ofs) {
  if (domCtn !== this.$textCtn.firstChild) return 'end';
  return ofs === 0 ? 'start' : 'end';
};
FDBlockComponent.prototype.offsetToDom = function (ofs) {
  if (ofs === 0 || ofs === 'start') return {
    ctn: this.$textCtn.firstChild,
    ofs: 0
  };
  return {
    ctn: this.$textCtn.firstChild,
    ofs: 1
  };
};
FDBlockComponent.prototype.getTextRects = function (startOffset, endOffset) {
  var bound = this.domElt.getBoundingClientRect();
  var h = bound.height;
  var y = bound.top;
  if (arguments.length === 0) {
    startOffset = 'start';
    endOffset = 'end';
  } else if (arguments.length === 1) {
    endOffset = startOffset;
  }
  var left = startOffset === 0 || startOffset === 'start' ? bound.left : bound.right;
  var right = endOffset === 0 || endOffset === 'start' ? bound.left : bound.right;
  return [new _Rectangle["default"](left, y, right - left, h)];
};
FDBlockComponent.prototype.deleteLastChar = function () {
  this.remove();
};
FDBlockComponent.prototype.onKeyDown = function (event) {};
FDBlockComponent.prototype.ev_textKeyDown = function (event) {
  var _this = this;
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  var handlers = {};
  handlers['backspace'] = function () {
    _this.remove();
    event.preventDefault();
  };
  handlers['arrowleft'] = function () {
    var sel = getSelection();
    var textNode = (0, _utils.findPrevTextNode)(_this.domElt);
    var range;
    event.preventDefault();
    if (textNode) {
      range = document.createRange();
      range.setStart(textNode, textNode.data.length);
      range.setEnd(textNode, textNode.data.length);
      sel.removeAllRanges();
      sel.addRange(range);
    }
  };
  handlers['arrowright'] = function () {
    var sel = getSelection();
    var textNode = (0, _utils.findNextTextNode)(_this.domElt);
    event.preventDefault();
    var range;
    if (textNode) {
      range = document.createRange();
      range.setStart(textNode, 0);
      range.setEnd(textNode, 0);
      sel.removeAllRanges();
      sel.addRange(range);
    }
  };
  if (handlers[key]) {
    handlers[key]();
  } else {}
};
FDBlockComponent.prototype.onClick = function (event) {
  var sel = getSelection();
  var range = sel.rangeCount > 0 ? sel.getRangeAt(0) : null;
  if (!range || range.startContainer !== this.$textCtn) {
    range = document.createRange();
    range.setStart(this.$textCtn.firstChild, this.$textCtn.firstChild.data.length);
    range.setEnd(this.$textCtn.firstChild, this.$textCtn.firstChild.data.length);
    sel.removeAllRanges();
    sel.addRange(range);
  }
};
var _default = FDBlockComponent;
exports["default"] = _default;

/***/ }),

/***/ 79663:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseComponent = _interopRequireDefault(__webpack_require__(13095));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _Break = _interopRequireDefault(__webpack_require__(5535));
var _FCore = __webpack_require__(51518);
var _utils = __webpack_require__(49633);
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDBreak() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDBreak, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDBreak, _Break["default"]);
FDBreak.prototype.tag = 'Break';
FDBreak.prototype.render = function () {
  _Break["default"].prototype.render.call(this);
  this.domElt.addChild((0, _FCore._)({
    "class": 'fd-text-ctn',
    child: {
      text: ' '
    }
  }));
};
FDBreak.prototype.deleteLastChar = function () {
  this.remove();
};
FDBreak.prototype.onDomRange = function (event) {
  var sel = getSelection();
  var range = sel.getRangeAt(0);
  var nextTextNode = (0, _utils.findNextTextNode)(this.domElt);
  if (nextTextNode) {
    range = document.createRange();
    range.setStart(nextTextNode, 0);
    range.setEnd(nextTextNode, 0);
    sel.removeAllRanges();
    sel.addRange(range);
  }
};
var _default = FDBreak;
exports["default"] = _default;

/***/ }),

/***/ 14642:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Button = _interopRequireDefault(__webpack_require__(9776));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(49633);
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDButton() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDButton, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDButton, _Button["default"]);
FDButton.prototype.colorThemeList = _Button["default"].prototype.colorThemeList;
FDButton.prototype.tag = 'Button';
FDButton.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    tag: 'button',
    "class": 'as-flexicon-button',
    child: {
      tag: 'span',
      "class": 'fd-text-ctn',
      child: {
        text: _utils.CHAR_EMQ
      }
    }
  });
};
FDButton.prototype.attributeHandlers.text.set = function (value) {
  this.domElt.attr('data-text', value + '');
  return value;
};
delete FDButton.prototype.attributeHandlers.text.get;
var _default = FDButton;
exports["default"] = _default;

/***/ }),

/***/ 23084:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseComponent = _interopRequireDefault(__webpack_require__(13095));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
var _ChainLayout = _interopRequireDefault(__webpack_require__(74445));
var _utils = __webpack_require__(49633);
var _keyboard = __webpack_require__(95141);
var _ChainAnchor = _interopRequireDefault(__webpack_require__(91081));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDChainLayout() {
  _FDBaseComponent["default"].apply(this, arguments);
  this.children = [];
}
(0, _inheritComponentClass["default"])(FDChainLayout, _FDBaseComponent["default"]);
FDChainLayout.prototype.tag = 'ChainLayout';
FDChainLayout.prototype.isLayout = true;
FDChainLayout.prototype.render = function () {
  this.$lastText = (0, _FCore._)({
    tag: 'span',
    "class": 'fd-text-ctn',
    child: {
      text: _utils.CHAR_ZWS
    }
  });
  this.domElt = (0, _FCore._)({
    "class": ['fd-chain-layout', 'as-chain-layout'],
    child: [this.$lastText]
  });
};
Object.keys(_ChainLayout["default"].prototype.styleHandlers).forEach(function (key) {
  FDChainLayout.prototype.styleHandlers[key] = Object.assign({}, _ChainLayout["default"].prototype.styleHandlers[key]);
});
FDChainLayout.prototype.addChild = function (child) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  child.anchor = new _ChainAnchor["default"](child);
  this.domElt.addChildBefore(child.domElt, this.$lastText);
  this.children.push(child);
  child.parent = this;
};
FDChainLayout.prototype.addChildAfter = function (child, at) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  var idx;
  if (at) {
    idx = this.children.indexOf(at);
    if (idx < 0) {
      throw {
        message: "[at] is not a child!",
        at: at,
        trace: new Error()
      };
    } else idx++;
  } else {
    idx = 0;
  }
  child.anchor = new _ChainAnchor["default"](child);
  this.children.splice(idx, 0, child);
  this.domElt.addChildAfter(child.domElt, at && at.domElt || null);
  child.parent = this;
};
FDChainLayout.prototype.addChildBefore = function (child, bf) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  var idx;
  if (bf) {
    idx = this.children.indexOf(bf);
    if (idx < 0) {
      throw {
        message: "[bf] is not a child!",
        bf: bf,
        trace: new Error()
      };
    }
  } else {
    this.children.length;
  }
  child.anchor = new _ChainAnchor["default"](child);
  this.children.splice(idx, 0, child);
  this.domElt.addChildBefore(child.domElt, bf && bf.domElt || this.$lastText);
  child.parent = this;
};
FDChainLayout.prototype.removeChild = function (child) {
  var idx = this.children.indexOf(child);
  if (idx >= 0) {
    this.domElt.removeChild(child.domElt);
    this.children.splice(idx, 1);
    child.anchor.destroy();
    child.parent = null;
    child.anchor = null;
    child.destroy();
  }
  return this;
};
FDChainLayout.prototype.findChildBefore = function (child) {
  var idx = this.children.indexOf(child);
  return this.children[idx - 1] || null;
};
FDChainLayout.prototype.findChildAfter = function (child) {
  var idx = this.children.indexOf(child);
  return this.children[idx + 1] || null;
};
FDChainLayout.prototype.offsetFromDom = function (ctn, ofs) {
  if (ctn === this.$lastText.firstChild) return 'end';
  return 'start';
};
FDChainLayout.prototype.getTextRects = function (startOffset, endOffset) {
  switch (arguments.length) {
    case 0:
      startOffset = 'start';
      endOffset = 'end';
      break;
    case 1:
      endOffset = startOffset;
      break;
  }
  var range = document.createRange();
  range.setStart(this.$lastText.firstChild, 0);
  range.setEnd(this.$lastText.firstChild, 0);
  return [_Rectangle["default"].fromClientRect(range.getBoundingClientRect())];
};
FDChainLayout.prototype.onDomRange = function (event) {
  var sel = getSelection();
  var range = sel.getRangeAt(0);
  var textNode, comp;
  if (range.startContainer === this.$lastText || range.startContainer === this.$lastText.firstChild) {
    comp = this.children[this.children.length - 1];
    if (comp && comp.isText) {
      textNode = comp.$textCtn.firstChild;
      if (textNode.data.length > 0) range.setStart(textNode, textNode.data.length);
    } else {
      console.log("TODO", comp);
    }
  }
  if (range.endContainer === this.$lastText || range.endContainer === this.$lastText.firstChild) {
    comp = this.children[this.children.length - 1];
    if (comp && comp.isText) {
      textNode = comp.$textCtn.firstChild;
      if (textNode.data.length > 0) range.setEnd(textNode, textNode.data.length);
    } else {
      console.log("TODO", range);
    }
  }
};

/**
 *
 * @param {KeyboardEvent} event
 */
FDChainLayout.prototype.onKeyDown = function (event) {
  var _this = this;
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  // if (!event.ctrlKey && event.shiftKey)
  //     console.log(key)
  // event.preventDefault();
  var waitLastText = function waitLastText() {
    setTimeout(function () {
      var newTextAtLast = _this.$lastText.firstChild.data;
      newTextAtLast = newTextAtLast.replace(_utils.CHAR_ZWS, '');
      var comp, textNode, range, sel;
      if (newTextAtLast.length > 0) {
        comp = _this.children[_this.children.length - 1];
        if (comp && comp.isText) {
          textNode = comp.$textCtn.firstChild;
          textNode.data += newTextAtLast;
        } else {
          comp = _this.assembler.build({
            tag: 'Text',
            attributes: {
              textDecode: 'html',
              text: newTextAtLast
            }
          }, _this.fragment);
          _this.addChild(comp);
          textNode = comp.$textCtn.firstChild;
        }
        _this.$lastText.firstChild.data = _utils.CHAR_ZWS;
        range = document.createRange();
        range.setStart(textNode, textNode.data.length);
        range.setEnd(textNode, textNode.data.length);
        sel = getSelection();
        sel.removeAllRanges();
        sel.addRange(range);
      }
    }, 10);
  };
  waitLastText();
};
var _default = FDChainLayout;
exports["default"] = _default;

/***/ }),

/***/ 45159:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _Checkbox = _interopRequireDefault(__webpack_require__(29370));
var _utils = __webpack_require__(49633);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBlockComponent
 * @constructor
 */
function FDCheckBox() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDCheckBox, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDCheckBox, _Checkbox["default"]);
FDCheckBox.prototype.tag = 'CheckBox';
FDCheckBox.prototype.BOX_ALIGN_CLASSES = _Checkbox["default"].prototype.BOX_ALIGN_CLASSES;
FDCheckBox.prototype.renderContent = function () {
  _Checkbox["default"].prototype.renderContent.call(this);
};
FDCheckBox.prototype.render = function () {
  _Checkbox["default"].prototype.render.call(this);
  this.$textCtn = (0, _FCore._)({
    tag: 'span',
    "class": 'fd-text-ctn',
    child: {
      text: _utils.CHAR_EMQ
    }
  });
  this.$content.addChild(this.$textCtn);
};
var _default = FDCheckBox;
exports["default"] = _default;

/***/ }),

/***/ 57457:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(49633);
var _ColorInput = _interopRequireDefault(__webpack_require__(87290));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBlockComponent
 * @constructor
 */
function FDColorInput() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDColorInput, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDColorInput, _ColorInput["default"]);
FDColorInput.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    tag: 'button',
    "class": 'as-color-picker-button',
    child: {
      "class": 'as-color-picker-button-inner',
      child: {
        "class": 'as-color-picker-button-inner-value'
      }
    }
  });
  this.$value = (0, _FCore.$)('.as-color-picker-button-inner-value', this.domElt);
};
FDColorInput.prototype.attributeHandlers.value.set = function (value) {
  this.$value.addStyle('background-color', value + '');
  return value;
};
FDColorInput.prototype.attributeHandlers.value.get = function (ref) {
  return ref.get();
};
var _default = FDColorInput;
exports["default"] = _default;

/***/ }),

/***/ 98112:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _utils = __webpack_require__(49633);
var _ComboBox = _interopRequireDefault(__webpack_require__(1956));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
var _SelectMenu = _interopRequireDefault(__webpack_require__(41735));
var _ACore = _interopRequireDefault(__webpack_require__(34093));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBlockComponent
 * @constructor
 */
function FDComboBox() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDComboBox, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDComboBox, _ComboBox["default"]);
delete FDComboBox.prototype.attributeHandlers.value.set;
delete FDComboBox.prototype.attributeHandlers.value.get;
delete FDComboBox.prototype.attributeHandlers.items.set;
delete FDComboBox.prototype.attributeHandlers.items.get;
delete FDComboBox.prototype.attributeHandlers.strictValue.set;
delete FDComboBox.prototype.attributeHandlers.strictValue.get;
FDComboBox.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": ['absol-selectmenu', 'as-select-menu'],
    child: [{
      "class": 'fd-text-ctn',
      child: {
        text: _utils.CHAR_EMQ
      }
    }, {
      tag: 'button',
      style: {
        pointerEvents: 'none'
      },
      "class": 'absol-selectmenu-btn',
      child: [_ACore["default"]._('dropdown-ico')]
    }]
  });
};
var _default = FDComboBox;
exports["default"] = _default;

/***/ }),

/***/ 58361:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(49633);
var _CopyableIconTooltip = _interopRequireDefault(__webpack_require__(25973));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @constructor
 */
function FDCopyableIconTooltip() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDCopyableIconTooltip, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDCopyableIconTooltip, _CopyableIconTooltip["default"]);
FDCopyableIconTooltip.prototype.renderContent = function () {
  this.$content = (0, _FCore._)({
    tag: 'button',
    "class": 'as-copyable-icon-tooltip',
    child: 'span.mdi.mdi-information-outline.as-cit-icon'
  });
};
FDCopyableIconTooltip.prototype.render = function () {
  return _CopyableIconTooltip["default"].prototype.render.call(this);
};
var _default = FDCopyableIconTooltip;
exports["default"] = _default;

/***/ }),

/***/ 15143:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _utils = __webpack_require__(49633);
var _DateInYearInput = _interopRequireDefault(__webpack_require__(82494));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _utils2 = __webpack_require__(84512);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/**
 * @extends FDBlockComponent
 * @constructor
 */
function FDDateInYearInput() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDDateInYearInput, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDDateInYearInput, _DateInYearInput["default"]);
FDDateInYearInput.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": ['as-date-time-input', 'as-date-in-year-input'],
    child: [{
      "class": 'as-date-time-input-text',
      attr: {
        'data-text': 'dd/MM'
      }
    }, {
      tag: 'button',
      "class": 'as-date-time-input-icon-btn',
      child: 'span.mdi.mdi-calendar-today'
    }]
  });
  this.$text = (0, _FCore.$)('.as-date-time-input-text', this.domElt);
};
FDDateInYearInput.prototype.attributeHandlers.value.set = function (value) {
  var mTxt = 'MM';
  var dTxt = 'dd';
  if (value && _typeof(value) === "object") {
    if ((0, _utils2.isNaturalNumber)(value.date)) {
      dTxt = (0, _utils2.zeroPadding)(value.date, 2);
    }
    if ((0, _utils2.isNaturalNumber)(value.month)) {
      mTxt = (0, _utils2.zeroPadding)(value.month, 2);
    }
  }
  this.$text.attr('data-text', dTxt + '/' + mTxt);
  return value;
};
var _default = FDDateInYearInput;
exports["default"] = _default;

/***/ }),

/***/ 66786:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _DateInput = _interopRequireDefault(__webpack_require__(68452));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _utils = __webpack_require__(49633);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDDateInput() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDDateInput, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDDateInput, _DateInput["default"], "style");
FDDateInput.prototype.attributeHandlers = {};
FDDateInput.prototype.tag = 'DateInput';
FDDateInput.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": ['fd-date-input', 'as-date-input'],
    child: [{
      "class": 'as-date-input-text',
      attr: {
        'data-text': 'dd/MM/yyyy'
      },
      child: {
        tag: 'span',
        "class": 'fd-text-ctn',
        child: {
          text: _utils.CHAR_EMQ
        }
      }
    }, {
      tag: 'button',
      "class": 'as-date-input-icon-ctn',
      style: {
        userSelect: 'none'
      },
      child: 'span.mdi.mdi-calendar'
    }]
  });
  this.$text = (0, _FCore.$)('.as-date-input-text', this.domElt);
};
var _default = FDDateInput;
exports["default"] = _default;

/***/ }),

/***/ 16939:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(49633);
var _DateTimeInput = _interopRequireDefault(__webpack_require__(17902));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function FDDateTimeInput() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDDateTimeInput, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDDateTimeInput, _DateTimeInput["default"], 'style');
FDDateTimeInput.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": ['as-date-time-input'],
    child: [{
      "class": 'as-date-time-input-text',
      attr: {
        'data-text': 'dd/MM/yyyy HH:mm'
      },
      child: {
        tag: 'span',
        "class": 'fd-text-ctn',
        child: {
          text: _utils.CHAR_EMQ
        }
      }
    }, {
      tag: 'button',
      "class": 'as-date-time-input-icon-btn',
      child: 'span.mdi.mdi-calendar-clock'
    }]
  });
  this.$text = (0, _FCore.$)('.as-date-time-input-text', this.domElt);
};
var _default = FDDateTimeInput;
exports["default"] = _default;

/***/ }),

/***/ 78845:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(49633);
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _FCore = __webpack_require__(51518);
var _DualSelectListText = _interopRequireDefault(__webpack_require__(34847));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDDualSelectListText() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDDualSelectListText, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDDualSelectListText, _DualSelectListText["default"]);
Object.values(FDDualSelectListText.prototype.attributeHandlers).forEach(function (handler) {
  delete handler.set;
  delete handler.get;
  delete handler["export"];
});
FDDualSelectListText.prototype.tag = 'DualSelectListText';
FDDualSelectListText.prototype.attributeHandlers.name.set = function (value) {
  this.$textCtn.attr('data-text', "[dual-selection:".concat(value || this.attributes.id, "]"));
  return value;
};
FDDualSelectListText.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": 'as-select-list-text',
    child: {
      tag: 'span',
      "class": 'fd-text-ctn',
      attr: {
        'data-text': '[dual-selection]'
      },
      child: {
        text: _utils.CHAR_EMQ
      }
    }
  });
};
FDDualSelectListText.prototype._updateText = function () {};
FDDualSelectListText.prototype.notifyUnion = _noop["default"];
var _default = FDDualSelectListText;
exports["default"] = _default;

/***/ }),

/***/ 10714:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _FCore = __webpack_require__(51518);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(49633);
var _FileListInput = _interopRequireDefault(__webpack_require__(26252));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBlockComponent
 * @constructor
 */
function FDFileListInput() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDFileListInput, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDFileListInput, _FileListInput["default"]);
Object.values(FDFileListInput.prototype.attributeHandlers).forEach(function (handler) {
  if (handler.set) {
    delete handler.set;
    delete handler["export"];
  }
});
FDFileListInput.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": 'as-file-list-input',
    child: [{
      tag: 'span',
      "class": 'fd-text-ctn',
      child: {
        text: _utils.CHAR_EMQ
      }
    }, {
      tag: 'label',
      "class": "as-file-list-input-add",
      child: {
        "class": 'as-file-list-input-add-icon-ctn',
        child: 'span.mdi.mdi-upload-outline'
      }
    }]
  });
};
var _default = FDFileListInput;
exports["default"] = _default;

/***/ }),

/***/ 50015:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseComponent = _interopRequireDefault(__webpack_require__(13095));
var _utils = __webpack_require__(49633);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _GridLayout = _interopRequireDefault(__webpack_require__(67454));
var _FCore = __webpack_require__(51518);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _GridAnchor = _interopRequireDefault(__webpack_require__(88334));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDGridLayout() {
  _FDBaseComponent["default"].apply(this, arguments);
  this.children = [];
}
(0, _inheritComponentClass["default"])(FDGridLayout, _FDBaseComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDGridLayout, _GridLayout["default"]);
FDGridLayout.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": 'as-grid-layout',
    child: {
      tag: 'span',
      "class": 'fd-text-ctn',
      child: {
        text: _utils.CHAR_ZWS
      }
    }
  });
};
FDGridLayout.prototype.offsetFromDom = function (ctn, ofs) {
  //todo
  return 'end';
};
FDGridLayout.prototype.getTextRects = function (startOffset, endOffset) {
  if (arguments.length === 0) {
    startOffset = 'start';
    endOffset = 'end';
  } else if (arguments.length === 1) {
    endOffset = startOffset;
  }
  var range = document.createRange();
  range.setStart(this.$textCtn, 0);
  range.setEnd(this.$textCtn, 0);
  return [_Rectangle["default"].fromClientRect(range.getBoundingClientRect())];
};
FDGridLayout.prototype.onAddChild = function (child, idx) {
  child.anchor = new _GridAnchor["default"](child);
  this.domElt.addChildBefore(child.domElt, this.domElt.childNodes[idx]);
};
FDGridLayout.prototype.onRemoveChild = function (child, idx) {
  child.anchor.destroy();
  child.domElt.remove();
};
var _default = FDGridLayout;
exports["default"] = _default;

/***/ }),

/***/ 87745:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseComponent = _interopRequireDefault(__webpack_require__(13095));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
var _HyperAnchor = _interopRequireDefault(__webpack_require__(94243));
var _HyperLayout = _interopRequireDefault(__webpack_require__(77616));
var _utils = __webpack_require__(49633);
var _keyboard = __webpack_require__(95141);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDHyperLayout() {
  _FDBaseComponent["default"].apply(this, arguments);
  this.children = [];
}
(0, _inheritComponentClass["default"])(FDHyperLayout, _FDBaseComponent["default"]);
FDHyperLayout.prototype.tag = 'HyperLayout';
FDHyperLayout.prototype.isLayout = true;
FDHyperLayout.prototype.render = function () {
  this.$lastText = (0, _FCore._)({
    tag: 'span',
    "class": 'fd-text-ctn',
    child: {
      text: _utils.CHAR_ZWS
    }
  });
  this.domElt = (0, _FCore._)({
    "class": ['fd-hyper-layout', 'as-hyper-layout'],
    child: [this.$lastText]
  });
};
Object.keys(_HyperLayout["default"].prototype.styleHandlers).forEach(function (key) {
  FDHyperLayout.prototype.styleHandlers[key] = Object.assign({}, _HyperLayout["default"].prototype.styleHandlers[key]);
});
FDHyperLayout.prototype.addChild = function (child) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  child.anchor = new _HyperAnchor["default"](child);
  this.domElt.addChildBefore(child.domElt, this.$lastText);
  this.children.push(child);
  child.parent = this;
};
FDHyperLayout.prototype.addChildAfter = function (child, at) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  var idx;
  if (at) {
    idx = this.children.indexOf(at);
    if (idx < 0) {
      throw {
        message: "[at] is not a child!",
        at: at,
        trace: new Error()
      };
    } else idx++;
  } else {
    idx = 0;
  }
  child.anchor = new _HyperAnchor["default"](child);
  this.children.splice(idx, 0, child);
  this.domElt.addChildAfter(child.domElt, at && at.domElt || null);
  child.parent = this;
};
FDHyperLayout.prototype.addChildBefore = function (child, bf) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  var idx;
  if (bf) {
    idx = this.children.indexOf(bf);
    if (idx < 0) {
      throw {
        message: "[bf] is not a child!",
        bf: bf,
        trace: new Error()
      };
    }
  } else {
    this.children.length;
  }
  child.anchor = new _HyperAnchor["default"](child);
  this.children.splice(idx, 0, child);
  this.domElt.addChildBefore(child.domElt, bf && bf.domElt || this.$lastText);
  child.parent = this;
};
FDHyperLayout.prototype.removeChild = function (child) {
  var idx = this.children.indexOf(child);
  if (idx >= 0) {
    this.domElt.removeChild(child.domElt);
    this.children.splice(idx, 1);
    child.anchor.destroy();
    child.parent = null;
    child.anchor = null;
    child.destroy();
  }
  return this;
};
FDHyperLayout.prototype.findChildBefore = function (child) {
  var idx = this.children.indexOf(child);
  return this.children[idx - 1] || null;
};
FDHyperLayout.prototype.findChildAfter = function (child) {
  var idx = this.children.indexOf(child);
  return this.children[idx + 1] || null;
};
FDHyperLayout.prototype.offsetFromDom = function (ctn, ofs) {
  if (ctn === this.$lastText.firstChild) return 'end';
  return 'start';
};
FDHyperLayout.prototype.getTextRects = function (startOffset, endOffset) {
  if (arguments.length === 0) {
    startOffset = 'start';
    endOffset = 'end';
  } else if (arguments.length === 1) {
    endOffset = startOffset;
  }
  var range = document.createRange();
  range.setStart(this.$textCtn.firstChild, 0);
  range.setEnd(this.$textCtn.firstChild, 0);
  return [_Rectangle["default"].fromClientRect(range.getBoundingClientRect())];
};
FDHyperLayout.prototype.onDomRange = function (event) {
  var sel = getSelection();
  var range = sel.getRangeAt(0);
  var textNode, comp;
  if (range.startContainer === this.$lastText || range.startContainer === this.$lastText.firstChild) {
    comp = this.children[this.children.length - 1];
    if (comp && comp.isText) {
      textNode = comp.$textCtn.firstChild;
      if (textNode.data.length > 0) range.setStart(textNode, textNode.data.length);
    } else {
      console.log("TODO", comp);
    }
  }
  if (range.endContainer === this.$lastText || range.endContainer === this.$lastText.firstChild) {
    comp = this.children[this.children.length - 1];
    if (comp && comp.isText) {
      textNode = comp.$textCtn.firstChild;
      if (textNode.data.length > 0) range.setEnd(textNode, textNode.data.length);
    } else {
      console.log("TODO");
    }
  }
};

/**
 *
 * @param {KeyboardEvent} event
 */
FDHyperLayout.prototype.onKeyDown = function (event) {
  var _this = this;
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  // if (!event.ctrlKey && event.shiftKey)
  //     console.log(key)
  // event.preventDefault();
  var waitLastText = function waitLastText() {
    setTimeout(function () {
      var newTextAtLast = _this.$lastText.firstChild.data;
      newTextAtLast = newTextAtLast.replace(_utils.CHAR_ZWS, '');
      var comp, textNode, range, sel;
      if (newTextAtLast.length > 0) {
        comp = _this.children[_this.children.length - 1];
        if (comp && comp.isText) {
          textNode = comp.$textCtn.firstChild;
          textNode.data += newTextAtLast;
        } else {
          comp = _this.assembler.build({
            tag: 'Text',
            attributes: {
              textDecode: 'html',
              text: newTextAtLast
            }
          }, _this.fragment);
          _this.addChild(comp);
          textNode = comp.$textCtn.firstChild;
        }
        _this.$lastText.firstChild.data = _utils.CHAR_ZWS;
        range = document.createRange();
        range.setStart(textNode, textNode.data.length);
        range.setEnd(textNode, textNode.data.length);
        sel = getSelection();
        sel.removeAllRanges();
        sel.addRange(range);
      }
    }, 10);
  };
  waitLastText();
};
var _default = FDHyperLayout;
exports["default"] = _default;

/***/ }),

/***/ 25520:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
var _Image = _interopRequireDefault(__webpack_require__(65661));
var _utils = __webpack_require__(49633);
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDImage() {
  _FDBlockComponent["default"].apply(this, arguments);
  this.naturalWidth = 0;
  this.naturalHeight = 0;
  this.loadedSync = Promise.resolve([0, 0]);
}
(0, _inheritComponentClass["default"])(FDImage, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDImage, _Image["default"]);
FDImage.prototype.tag = 'Image';
FDImage.prototype.type = 'COMPONENT';
FDImage.prototype.render = function () {
  _Image["default"].prototype.render.call(this);
  this.$textCtn = (0, _FCore._)({
    tag: 'span',
    "class": "fd-text-ctn",
    child: {
      text: _utils.CHAR_EMQ
    }
  });
  this.domElt.appendChild(this.$textCtn);
};
FDImage.prototype.deleteLastChar = function (event) {
  this.remove();
};
var _default = FDImage;
exports["default"] = _default;

/***/ }),

/***/ 50223:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseComponent = _interopRequireDefault(__webpack_require__(13095));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
var _Label = _interopRequireDefault(__webpack_require__(31608));
var _keyboard = __webpack_require__(95141);
var _utils = __webpack_require__(49633);
var _FDTextComponent = _interopRequireDefault(__webpack_require__(51280));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDLabel() {
  _FDTextComponent["default"].apply(this, arguments);
  /**
   * @type {AElement}
   * @name domElt
   * @memberof FDLabel#
   */
  /**
   * @type {AElement}
   * @name $content
   * @memberof FDLabel#
   */
}

(0, _inheritComponentClass["default"])(FDLabel, _FDTextComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDLabel, _Label["default"]);
FDLabel.prototype.tag = 'Label';
FDLabel.prototype.BOX_ALIGN_CLASSES = _Label["default"].prototype.BOX_ALIGN_CLASSES;
FDLabel.prototype.isText = true;
FDLabel.prototype.render = function () {
  _Label["default"].prototype.render.call(this);
  (0, _FCore.$)('label', this.domElt).addClass('fd-text-ctn');
};
FDLabel.prototype.renderContent = function () {
  return _Label["default"].prototype.renderContent.call(this);
};
FDLabel.prototype.attributeHandlers.text.get = function () {
  return this.$textCtn.firstChild.data.replace(_utils.CHAR_ZWS, '');
};
FDLabel.prototype.attributeHandlers.text.set = function (value) {
  value = value || _utils.CHAR_ZWS;
  this.$textCtn.firstChild.data = value;
  this._updatePlaceHolder();
};
FDLabel.prototype._updatePlaceHolder = function () {
  var text = this.$textCtn.firstChild.data;
  if (text.length > 0 && text !== _utils.CHAR_ZWS) {
    this.$textCtn.attr('data-place-holder', undefined);
    this.domElt.removeClass('fd-empty');
  } else {
    this.domElt.addClass('fd-empty');
    this.$textCtn.attr('data-place-holder', "[Label:".concat(this.attributes.displayName || this.attributes.name || this.attributes.id, "]"));
  }
};
FDLabel.prototype.onKeyDown = function (event) {
  var _this = this;
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  var prevTextNode;
  var prevComp;
  var sel = getSelection();
  var range = sel.getRangeAt(0);
  var addParagraphBefore = function addParagraphBefore() {};
  var addParagraphAfter = function addParagraphAfter(text) {};
  var deleteToPreParagraph = function deleteToPreParagraph() {};
  var deleteToPrevNode = function deleteToPrevNode() {
    var parent = _this.parent;
    var preComp = parent.findChildBefore(_this);
    if (!preComp) {
      deleteToPreParagraph();
      return;
    }
    if (preComp.tag === 'Break') {
      preComp.remove();
    } else if (preComp.tag === 'Label') {} else if (preComp.tag === 'Text') {}
  };
  var leftText, rightText;
  var newComp, newParagraph;
  var firstTextNode;
  if (range) {
    if (key === 'backspace') {
      if (range.collapsed && range.startOffset === 0) {
        event.preventDefault();
        deleteToPrevNode();
        /*
        prevTextNode = findPrevTextNode(range.startContainer);
        prevComp = findFDComponentOfNode(prevTextNode);
        if (prevComp && prevComp !== this) {
            event.preventDefault();
            if (prevComp.tag === 'Label') {
                leftText = prevComp.attributes.text;
                rightText = this.attributes.text;
                prevComp.attributes.text = leftText + rightText;
                this.remove();
                range = document.createRange();
                range.setStart(prevComp.$textCtn.firstChild, leftText.length);
                range.setEnd(prevComp.$textCtn.firstChild, leftText.length);
                sel.removeAllRanges();
                sel.addRange(range);
            }
            else {
                prevComp.deleteLastChar();
            }
        }*/
      } else if (range.startOffset === 1 && this.$content.firstChild === range.endContainer && this.$content.firstChild.data.length === 1) {
        event.preventDefault();
        this.$content.firstChild.data = '';
        range = document.createRange();
        range.setStart(this.$content.firstChild, 0);
        range.setEnd(this.$content.firstChild, 0);
        sel.removeAllRanges();
        sel.addRange(range);
      }
    } else if (key === 'delete') {
      if (range.collapsed && range.startOffset === 0) {
        prevTextNode = (0, _utils.findPrevTextNode)(range.startContainer);
        prevComp = (0, _utils.findFDComponentOfNode)(prevTextNode);
        if (prevComp && prevComp !== this) {
          event.preventDefault();
          prevComp.deleteLastChar(event);
        }
      }
      // else
    } else if (key === 'enter') {
      if (range.collapsed) {
        event.preventDefault();
        leftText = this.$content.firstChild.data;
        rightText = leftText.substring(range.endOffset);
        leftText = leftText.substring(0, range.startOffset);
        if (leftText.length > 0) {
          this.$content.firstChild.data = leftText;
          newParagraph = this.fdEditor.assembler.build({
            tag: 'HyperLayout',
            style: {
              marginBottom: 10
            },
            children: [{
              tag: "Text",
              attributes: {
                text: rightText
              }
            }]
          }, this.fragment);
          this.parent.addChildAfter(newParagraph, this);
          newComp = newParagraph.children[0];
          firstTextNode = (0, _utils.findFirstTextNode)(newComp.domElt);
          range = document.createRange();
          range.setStart(firstTextNode, 0);
          range.setEnd(firstTextNode, 0);
          sel.removeAllRanges();
          sel.addRange(range);
        } else {
          this.addNewParagraphBefore();
        }
      }
    }
  }
  setTimeout(function () {
    return _this._updatePlaceHolder();
  }, 10);
};
FDLabel.prototype.deleteLastChar = function () {
  var text = this.attributes.text;
  var textNode;
  var sel, range;
  if (text.length === 0) {
    this.remove();
  } else {
    textNode = this.$content.lastChild;
    text = text.substring(0, text.length - 1);
    textNode.data = text;
    sel = getSelection();
    range = document.createRange();
    range.setStart(textNode, text.length);
    range.setEnd(textNode, text.length);
    sel.removeAllRanges();
    sel.addRange(range);
  }
};
FDLabel.prototype.onDomRange = function (event) {
  var sel = getSelection();
  var range = sel.getRangeAt(0);
  var newText;
  if (range.collapsed) {
    if (range.startContainer !== this.$content.firstChild) {
      if (range.startContainer.nodeType === Node.TEXT_NODE) {
        newText = range.startContainer.data;
        range.startContainer.remove();
        this.$content.firstChild.data = newText + this.$content.firstChild.data;
        range = document.createRange();
        range.setStart(this.$content.firstChild, newText.length);
        range.setEnd(this.$content.firstChild, newText.length);
        sel.removeAllRanges();
        sel.addRange(range);
      }
    }
  } else {}
};
FDLabel.prototype.offsetFromDom = function (domCtn, ofs) {
  if (domCtn === this.$textCtn.firstChild) {
    return ofs;
  }
  return 0;
};
FDLabel.prototype.getTextRects = function (startOffset, endOffset) {
  var range = document.createRange();
  if (arguments.length === 0) {
    startOffset = 0;
    endOffset = this.$textCtn.firstChild.data.length;
  } else if (arguments.length === 1) {
    endOffset = startOffset;
  }
  range.setStart(this.$textCtn.firstChild, startOffset);
  range.setEnd(this.$textCtn.firstChild, endOffset);
  return [_Rectangle["default"].fromClientRect(range.getBoundingClientRect())];
};
var _default = FDLabel;
exports["default"] = _default;

/***/ }),

/***/ 89830:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseComponent = _interopRequireDefault(__webpack_require__(13095));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
var _LinearLayout = _interopRequireDefault(__webpack_require__(86527));
var _utils = __webpack_require__(49633);
var _keyboard = __webpack_require__(95141);
var _LinearAnchor = _interopRequireDefault(__webpack_require__(49085));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDLinearLayout() {
  _FDBaseComponent["default"].apply(this, arguments);
  this.children = [];
}
(0, _inheritComponentClass["default"])(FDLinearLayout, _FDBaseComponent["default"]);
FDLinearLayout.prototype.tag = 'LinearLayout';
FDLinearLayout.prototype.isLayout = true;
FDLinearLayout.prototype.render = function () {
  this.$lastText = (0, _FCore._)({
    tag: 'span',
    "class": 'fd-text-ctn',
    child: {
      text: _utils.CHAR_ZWS
    }
  });
  this.domElt = (0, _FCore._)({
    "class": ['fd-linear-layout', 'as-linear-layout'],
    child: [this.$lastText]
  });
};
Object.keys(_LinearLayout["default"].prototype.styleHandlers).forEach(function (key) {
  FDLinearLayout.prototype.styleHandlers[key] = Object.assign({}, _LinearLayout["default"].prototype.styleHandlers[key]);
});
FDLinearLayout.prototype.addChild = function (child) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  child.anchor = new _LinearAnchor["default"](child);
  this.domElt.addChildBefore(child.domElt, this.$lastText);
  this.children.push(child);
  child.parent = this;
};
FDLinearLayout.prototype.addChildAfter = function (child, at) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  var idx;
  if (at) {
    idx = this.children.indexOf(at);
    if (idx < 0) {
      throw {
        message: "[at] is not a child!",
        at: at,
        trace: new Error()
      };
    } else idx++;
  } else {
    idx = 0;
  }
  child.anchor = new _LinearAnchor["default"](child);
  this.children.splice(idx, 0, child);
  this.domElt.addChildAfter(child.domElt, at && at.domElt || null);
  child.parent = this;
};
FDLinearLayout.prototype.addChildBefore = function (child, bf) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  var idx;
  if (bf) {
    idx = this.children.indexOf(bf);
    if (idx < 0) {
      throw {
        message: "[bf] is not a child!",
        bf: bf,
        trace: new Error()
      };
    }
  } else {
    this.children.length;
  }
  child.anchor = new _LinearAnchor["default"](child);
  this.children.splice(idx, 0, child);
  this.domElt.addChildBefore(child.domElt, bf && bf.domElt || this.$lastText);
  child.parent = this;
};
FDLinearLayout.prototype.removeChild = function (child) {
  var idx = this.children.indexOf(child);
  if (idx >= 0) {
    this.domElt.removeChild(child.domElt);
    this.children.splice(idx, 1);
    child.anchor.destroy();
    child.parent = null;
    child.anchor = null;
    child.destroy();
  }
  return this;
};
FDLinearLayout.prototype.findChildBefore = function (child) {
  var idx = this.children.indexOf(child);
  return this.children[idx - 1] || null;
};
FDLinearLayout.prototype.findChildAfter = function (child) {
  var idx = this.children.indexOf(child);
  return this.children[idx + 1] || null;
};
FDLinearLayout.prototype.offsetFromDom = function (ctn, ofs) {
  if (ctn === this.$lastText.firstChild) return 'end';
  return 'start';
};
FDLinearLayout.prototype.getTextRects = function (startOffset, endOffset) {
  if (arguments.length === 0) {
    startOffset = 'start';
    endOffset = 'end';
  } else if (arguments.length === 1) {
    endOffset = startOffset;
  }
  var range = document.createRange();
  range.setStart(this.$textCtn.firstChild, 0);
  range.setEnd(this.$textCtn.firstChild, 0);
  return [_Rectangle["default"].fromClientRect(range.getBoundingClientRect())];
};
FDLinearLayout.prototype.onDomRange = function (event) {
  var sel = getSelection();
  var range = sel.getRangeAt(0);
  console.log(range);
  var textNode, comp;
  if (range.startContainer === this.$lastText || range.startContainer === this.$lastText.firstChild) {
    comp = this.children[this.children.length - 1];
    if (comp && comp.isText) {
      textNode = comp.$textCtn.firstChild;
      if (textNode.data.length > 0) range.setStart(textNode, textNode.data.length);
    } else {
      console.log("TODO", comp);
    }
  }
  if (range.endContainer === this.$lastText || range.endContainer === this.$lastText.firstChild) {
    comp = this.children[this.children.length - 1];
    if (comp && comp.isText) {
      textNode = comp.$textCtn.firstChild;
      if (textNode.data.length > 0) range.setEnd(textNode, textNode.data.length);
    } else {
      console.log("TODO");
    }
  }
};

/**
 *
 * @param {KeyboardEvent} event
 */
FDLinearLayout.prototype.onKeyDown = function (event) {
  var _this = this;
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  // if (!event.ctrlKey && event.shiftKey)
  //     console.log(key)
  // event.preventDefault();
  var waitLastText = function waitLastText() {
    setTimeout(function () {
      var newTextAtLast = _this.$lastText.firstChild.data;
      newTextAtLast = newTextAtLast.replace(_utils.CHAR_ZWS, '');
      var comp, textNode, range, sel;
      if (newTextAtLast.length > 0) {
        comp = _this.children[_this.children.length - 1];
        if (comp && comp.isText) {
          textNode = comp.$textCtn.firstChild;
          textNode.data += newTextAtLast;
        } else {
          comp = _this.assembler.build({
            tag: 'Text',
            attributes: {
              textDecode: 'html',
              text: newTextAtLast
            }
          }, _this.fragment);
          _this.addChild(comp);
          textNode = comp.$textCtn.firstChild;
        }
        _this.$lastText.firstChild.data = _utils.CHAR_ZWS;
        range = document.createRange();
        range.setStart(textNode, textNode.data.length);
        range.setEnd(textNode, textNode.data.length);
        sel = getSelection();
        sel.removeAllRanges();
        sel.addRange(range);
      }
    }, 10);
  };
  waitLastText();
};
var _default = FDLinearLayout;
exports["default"] = _default;

/***/ }),

/***/ 5563:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDDateInput = _interopRequireDefault(__webpack_require__(66786));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDDateInput
 * @constructor
 */
function FDMonthInput() {
  _FDDateInput["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDMonthInput, _FDDateInput["default"]);
FDMonthInput.prototype.tag = 'MonthInput';
FDMonthInput.prototype.render = function () {
  _FDDateInput["default"].prototype.render.call(this);
  this.$text.attr('data-text', 'Tháng MM-yyyy');
};
var _default = FDMonthInput;
exports["default"] = _default;

/***/ }),

/***/ 24912:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(49633);
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _FCore = __webpack_require__(51518);
var _MultiSelectListText = _interopRequireDefault(__webpack_require__(88759));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDMultiSelectListText() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDMultiSelectListText, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDMultiSelectListText, _MultiSelectListText["default"]);
Object.values(FDMultiSelectListText.prototype.attributeHandlers).forEach(function (handler) {
  delete handler.set;
  delete handler.get;
  delete handler["export"];
});
FDMultiSelectListText.prototype.tag = 'MultiSelectListText';
FDMultiSelectListText.prototype.attributeHandlers.name.set = function (value) {
  this.$textCtn.attr('data-text', "[multi-selection:".concat(value || this.attributes.id, "]"));
  return value;
};
FDMultiSelectListText.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": 'as-select-list-text',
    child: {
      tag: 'span',
      "class": 'fd-text-ctn',
      attr: {
        'data-text': '[multi-selection]'
      },
      child: {
        text: _utils.CHAR_EMQ
      }
    }
  });
};
FDMultiSelectListText.prototype._updateText = function () {};
FDMultiSelectListText.prototype.notifyUnion = _noop["default"];
var _default = FDMultiSelectListText;
exports["default"] = _default;

/***/ }),

/***/ 13612:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _FCore = __webpack_require__(51518);
var _utils = __webpack_require__(49633);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _NumberInput = _interopRequireDefault(__webpack_require__(53422));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function FDNumberInput() {
  _FDBlockComponent["default"].apply(this);
}
(0, _inheritComponentClass["default"])(FDNumberInput, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDNumberInput, _NumberInput["default"]);
Object.values(FDNumberInput.prototype.attributeHandlers).forEach(function (handler) {
  delete handler.set;
  delete handler.get;
  delete handler["export"];
});
FDNumberInput.prototype.attributeHandlers.value.set = function (value) {
  this.$textCtn.attr('data-value', value + '');
  return value;
};
FDNumberInput.prototype.attributeHandlers.readOnly.set = function (value) {
  if (value) {
    this.domElt.addClass('as-read-only');
  } else {
    this.domElt.removeClass('as-read-only');
  }
  return value;
};
FDNumberInput.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": ['absol-number-input', 'as-must-not-null'],
    extendEvent: ['change'],
    child: [{
      "class": ['absol-number-input-text-container', 'fd-text-ctn'],
      child: {
        text: _utils.CHAR_EMQ
      }
    }, {
      "class": 'absol-number-input-button-up-container',
      child: {
        tag: 'button',
        child: 'span.mdi.mdi-menu-up'
      }
    }, {
      "class": 'absol-number-input-button-down-container',
      child: {
        tag: 'button',
        child: 'span.mdi.mdi-menu-down'
      }
    }]
  });
};
var _default = FDNumberInput;
exports["default"] = _default;

/***/ }),

/***/ 81166:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _Radio = _interopRequireDefault(__webpack_require__(57031));
var _utils = __webpack_require__(49633);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function FDRadio() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDRadio, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDRadio, _Radio["default"]);
FDRadio.prototype.tag = 'Radio';
FDRadio.prototype.BOX_ALIGN_CLASSES = _Radio["default"].prototype.BOX_ALIGN_CLASSES;
delete FDRadio.prototype.attributeHandlers.groupName.set;
delete FDRadio.prototype.attributeHandlers.groupName.get;
FDRadio.prototype.renderContent = function () {
  return _Radio["default"].prototype.renderContent.call(this);
};
FDRadio.prototype.render = function () {
  return _Radio["default"].prototype.render.call(this);
};
var _default = FDRadio;
exports["default"] = _default;

/***/ }),

/***/ 86743:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseComponent = _interopRequireDefault(__webpack_require__(13095));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
var _RelativeAnchor = _interopRequireDefault(__webpack_require__(58493));
var _RelativeLayout = _interopRequireDefault(__webpack_require__(56061));
var _utils = __webpack_require__(49633);
var _keyboard = __webpack_require__(95141);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDRelativeLayout() {
  _FDBaseComponent["default"].apply(this, arguments);
  this.children = [];
}
(0, _inheritComponentClass["default"])(FDRelativeLayout, _FDBaseComponent["default"]);
FDRelativeLayout.prototype.tag = 'RelativeLayout';
FDRelativeLayout.prototype.isLayout = true;
FDRelativeLayout.prototype.render = function () {
  this.$lastText = (0, _FCore._)({
    tag: 'span',
    "class": 'fd-text-ctn',
    child: {
      text: _utils.CHAR_ZWS
    }
  });
  this.domElt = (0, _FCore._)({
    "class": ['fd-relative-layout', 'as-relative-layout'],
    child: [this.$lastText]
  });
};
Object.keys(_RelativeLayout["default"].prototype.styleHandlers).forEach(function (key) {
  FDRelativeLayout.prototype.styleHandlers[key] = Object.assign({}, _RelativeLayout["default"].prototype.styleHandlers[key]);
});
FDRelativeLayout.prototype.addChild = function (child) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  child.anchor = new _RelativeAnchor["default"](child);
  this.domElt.addChildBefore(child.domElt, this.$lastText);
  this.children.push(child);
  child.parent = this;
};
FDRelativeLayout.prototype.addChildAfter = function (child, at) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  var idx;
  if (at) {
    idx = this.children.indexOf(at);
    if (idx < 0) {
      throw {
        message: "[at] is not a child!",
        at: at,
        trace: new Error()
      };
    } else idx++;
  } else {
    idx = 0;
  }
  child.anchor = new _RelativeAnchor["default"](child);
  this.children.splice(idx, 0, child);
  this.domElt.addChildAfter(child.domElt, at && at.domElt || null);
  child.parent = this;
};
FDRelativeLayout.prototype.addChildBefore = function (child, bf) {
  if (child.parent) {
    child.parent.removeChild(child);
  }
  var idx;
  if (bf) {
    idx = this.children.indexOf(bf);
    if (idx < 0) {
      throw {
        message: "[bf] is not a child!",
        bf: bf,
        trace: new Error()
      };
    }
  } else {
    this.children.length;
  }
  child.anchor = new _RelativeAnchor["default"](child);
  this.children.splice(idx, 0, child);
  this.domElt.addChildBefore(child.domElt, bf && bf.domElt || this.$lastText);
  child.parent = this;
};
FDRelativeLayout.prototype.removeChild = function (child) {
  var idx = this.children.indexOf(child);
  if (idx >= 0) {
    this.domElt.removeChild(child.domElt);
    this.children.splice(idx, 1);
    child.anchor.destroy();
    child.parent = null;
    child.anchor = null;
    child.destroy();
  }
  return this;
};
FDRelativeLayout.prototype.findChildBefore = function (child) {
  var idx = this.children.indexOf(child);
  return this.children[idx - 1] || null;
};
FDRelativeLayout.prototype.findChildAfter = function (child) {
  var idx = this.children.indexOf(child);
  return this.children[idx + 1] || null;
};
FDRelativeLayout.prototype.offsetFromDom = function (ctn, ofs) {
  if (ctn === this.$lastText.firstChild) return 'end';
  return 'start';
};
FDRelativeLayout.prototype.onDomRange = function (event) {
  var sel = getSelection();
  var range = sel.getRangeAt(0);
  console.log(range);
  var textNode, comp;
  if (range.startContainer === this.$lastText || range.startContainer === this.$lastText.firstChild) {
    comp = this.children[this.children.length - 1];
    if (comp && comp.isText) {
      textNode = comp.$textCtn.firstChild;
      if (textNode.data.length > 0) range.setStart(textNode, textNode.data.length);
    } else {
      console.log("TODO", comp);
    }
  }
  if (range.endContainer === this.$lastText || range.endContainer === this.$lastText.firstChild) {
    comp = this.children[this.children.length - 1];
    if (comp && comp.isText) {
      textNode = comp.$textCtn.firstChild;
      if (textNode.data.length > 0) range.setEnd(textNode, textNode.data.length);
    } else {
      console.log("TODO");
    }
  }
};

/**
 *
 * @param {KeyboardEvent} event
 */
FDRelativeLayout.prototype.onKeyDown = function (event) {
  var _this = this;
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  // if (!event.ctrlKey && event.shiftKey)
  //     console.log(key)
  // event.preventDefault();
  var waitLastText = function waitLastText() {
    setTimeout(function () {
      var newTextAtLast = _this.$lastText.firstChild.data;
      newTextAtLast = newTextAtLast.replace(_utils.CHAR_ZWS, '');
      var comp, textNode, range, sel;
      if (newTextAtLast.length > 0) {
        comp = _this.children[_this.children.length - 1];
        if (comp && comp.isText) {
          textNode = comp.$textCtn.firstChild;
          textNode.data += newTextAtLast;
        } else {
          comp = _this.assembler.build({
            tag: 'Text',
            attributes: {
              textDecode: 'html',
              text: newTextAtLast
            }
          }, _this.fragment);
          _this.addChild(comp);
          textNode = comp.$textCtn.firstChild;
        }
        _this.$lastText.firstChild.data = _utils.CHAR_ZWS;
        range = document.createRange();
        range.setStart(textNode, textNode.data.length);
        range.setEnd(textNode, textNode.data.length);
        sel = getSelection();
        sel.removeAllRanges();
        sel.addRange(range);
      }
    }, 10);
  };
  waitLastText();
};
var _default = FDRelativeLayout;
exports["default"] = _default;

/***/ }),

/***/ 6473:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseComponent = _interopRequireDefault(__webpack_require__(13095));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _SelectListText = _interopRequireDefault(__webpack_require__(72186));
var _utils = __webpack_require__(49633);
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDSelectListText() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDSelectListText, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDSelectListText, _SelectListText["default"]);
Object.values(FDSelectListText.prototype.attributeHandlers).forEach(function (handler) {
  delete handler.set;
  delete handler.get;
  delete handler["export"];
});
FDSelectListText.prototype.tag = 'SelectListText';
FDSelectListText.prototype.attributeHandlers.name.set = function (value) {
  this.$textCtn.attr('data-text', "[selection:".concat(value || this.attributes.id, "]"));
  return value;
};
FDSelectListText.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": 'as-select-list-text',
    child: {
      tag: 'span',
      "class": 'fd-text-ctn',
      attr: {
        'data-text': '[selection]'
      },
      child: {
        text: _utils.CHAR_EMQ
      }
    }
  });
};
FDSelectListText.prototype._updateText = function () {};
FDSelectListText.prototype.notifyUnion = _noop["default"];
var _default = FDSelectListText;
exports["default"] = _default;

/***/ }),

/***/ 26538:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(49633);
var _TableInput = _interopRequireDefault(__webpack_require__(39215));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBlockComponent
 * @constructor
 */
function FDTableInput() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDTableInput, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDTableInput, _TableInput["default"]);
Object.values(FDTableInput.prototype.attributeHandlers).forEach(function (handle) {
  delete handle.set;
  delete handle.get;
  delete handle["export"];
});
FDTableInput.prototype.attributeHandlers.propertyDescriptors.set = function (value, ref) {
  ref.set(value);
  this._flushData();
  return value;
};
FDTableInput.prototype.attributeHandlers.propertyNames.set = function (value, ref) {
  ref.set(value);
  this._flushData();
  return value;
};
FDTableInput.prototype._flushData = function () {
  var names = this.attributes.propertyNames;
  var descriptors = this.attributes.propertyDescriptors;
  var ok = descriptors && names && names.length > 0 && names.every(function (name) {
    return descriptors[name];
  });
  if (!ok) return;
  while (this.$headerRow.childNodes.length > 1) {
    this.$headerRow.lastChild.remove();
  }
  while (this.$bodyRow.childNodes.length > names.length + 1) {
    this.$bodyRow.lastChild.remove();
  }
  while (this.$bodyRow.childNodes.length < names.length + 1) {
    this.$bodyRow.addChild((0, _FCore._)({
      tag: 'td',
      child: {
        tag: 'span',
        child: {
          text: _utils.CHAR_EMQ
        }
      }
    }));
  }
  this.$headerCells = names.map(function (name) {
    var desc = descriptors[name];
    return (0, _FCore._)({
      tag: 'td',
      child: {
        tag: 'span',
        child: {
          text: desc.text || name
        }
      }
    });
  });
  this.$headerRow.addChild(this.$headerCells);
};
FDTableInput.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    child: [{
      "class": 'asht-table-editor',
      child: [{
        "class": 'asht-table-editor-body',
        child: [{
          "class": 'asht-table-editor-content',
          child: {
            tag: 'table',
            "class": 'asht-table-data',
            child: [{
              tag: 'thead',
              child: [{
                tag: 'tr',
                child: {
                  tag: 'td',
                  "class": 'asht-table-data-root-cell',
                  child: {
                    tag: 'span',
                    "class": 'fd-text-ctn',
                    child: {
                      text: _utils.CHAR_EMQ
                    }
                  }
                }
              }]
            }, {
              tag: 'tbody',
              child: {
                tag: 'tr',
                child: {
                  tag: 'td',
                  child: {
                    tag: 'span',
                    child: {
                      text: "*"
                    }
                  }
                }
              }
            }]
          }
        }]
      }]
    }]
  });
  this.$headerRow = (0, _FCore.$)('tr', this.domElt);
  this.$bodyRow = (0, _FCore.$)('tbody tr', this.domElt);
};
var _default = FDTableInput;
exports["default"] = _default;

/***/ }),

/***/ 72838:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseComponent = _interopRequireDefault(__webpack_require__(13095));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _Text = _interopRequireDefault(__webpack_require__(36685));
var _keyboard = __webpack_require__(95141);
var _utils = __webpack_require__(49633);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDText() {
  _FDBaseComponent["default"].apply(this, arguments);
  this._textDecode = 'none';
  this._text = '';
}
(0, _inheritComponentClass["default"])(FDText, _FDBaseComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDText, _Text["default"]);
FDText.prototype.tag = 'Text';
FDText.prototype.isText = true;
FDText.prototype.render = function () {
  _Text["default"].prototype.render.call(this);
  this.domElt.addClass('fd-text-ctn');
};
FDText.prototype._flushText = function () {
  var textContent = '';
  switch (this._textDecode) {
    case 'html':
      this.$textCtn.innerHTML = (this._text || '') + '';
      textContent = this.$textCtn.textContent;
      "";
      this.$textCtn.clearChild().addChild((0, _FCore._)({
        text: textContent
      }));
      break;
    default:
      this.$textCtn.clearChild().addChild((0, _FCore._)({
        text: this._text || _utils.CHAR_ZWS
      }));
  }
};
FDText.prototype.attributeHandlers.text.set = function (value) {
  this._text = (value || '') + '';
  this._flushText();
};
FDText.prototype.attributeHandlers.text.get = function () {
  return this.domElt.textContent.replace(_utils.CHAR_ZWS, '');
};
FDText.prototype.attributeHandlers.textDecode.get = function () {
  return 'none';
};
FDText.prototype.attributeHandlers.textDecode.set = function (value) {
  this._textDecode = value;
  this._flushText();
};
FDText.prototype.attributeHandlers.textDecode.descriptor = Object.assign({}, FDText.prototype.attributeHandlers.textDecode.descriptor, {
  disabled: true
});
FDText.prototype._getContentNodes = function () {
  var nodes = [];
  var visit = function visit(nd) {
    if (nd.nodeType === Node.TEXT_NODE || nd.tagName === 'BR') {
      nodes.push(nd);
    } else {
      Array.prototype.forEach.call(nd.childNodes, function (c) {
        return visit(c);
      });
    }
  };
  visit(this.domElt);
  return nodes;
};
FDText.prototype.offsetFromDom = function (domCtn, ofs) {
  var nodes = this._getContentNodes();
  var nd;
  var textLength;
  var j = 0;
  for (var i = 0; i < nodes.length; ++i) {
    nd = nodes[i];
    textLength = nd.tagName === 'BR' ? 1 : nd.data.length;
    if (domCtn === nd) {
      return j + ofs;
    }
    j += textLength;
  }
  return j;
};
FDText.prototype.getTextRects = function (startOffset, endOffset) {
  var nodes = this._getContentNodes();
  if (arguments.length < 1) {
    startOffset = 0;
  }
  if (arguments.length === 1) {
    endOffset = startOffset;
  } else if (arguments.length === 0) {
    endOffset = Infinity;
  }
  var j = 0;
  var nd;
  var rects = [];
  var prevRect = new _Rectangle["default"](-10000, -10000, 0, 0);
  var curRect;
  var started, textLength;
  var range;
  for (var i = 0; i < nodes.length && j <= endOffset; ++i) {
    nd = nodes[i];
    textLength = nd.tagName === 'BR' ? 1 : nd.data.length;
    if (!started && j + textLength >= startOffset) {
      started = true;
    }
    if (started && nd.tagName !== 'BR') {
      for (var k = Math.max(startOffset - j, 0); k <= textLength && k + j <= endOffset; ++k) {
        range = document.createRange();
        range.setStart(nd, k);
        range.setEnd(nd, Math.min(k + 1, textLength));
        curRect = _Rectangle["default"].fromClientRect(range.getBoundingClientRect());
        if (prevRect.B().sub(curRect.A()).abs() < 2 && prevRect.C().sub(curRect.D()).abs() < 2) {
          prevRect = prevRect.merge(curRect);
          rects[rects.length - 1] = prevRect;
        } else {
          prevRect = curRect;
          rects.push(curRect);
        }
      }
    }
    j += textLength;
  }
  return rects;
};
FDText.prototype.onKeyDown = function (event) {
  var _this = this;
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  var prevTextNode;
  var prevComp;
  var sel = getSelection();
  var range = sel.getRangeAt(0);
  var breakParagraph = function breakParagraph() {
    var left = '',
      rightText = '';
    var nodes = _this._getContentNodes();
    var tempRange;
    if (nodes.length > 0) {
      tempRange = document.createRange();
      tempRange.setStart(nodes[0], 0);
      tempRange.setEnd(range.startContainer, range.startOffset);
      left = tempRange.toString();
      tempRange = document.createRange();
      tempRange.setStart(range.endContainer, range.endOffset);
      if (nodes[nodes.length - 1].tagName === 'BR') {
        tempRange.setEnd(nodes[nodes.length - 1], 1);
      } else {
        tempRange.setEnd(nodes[nodes.length - 1], nodes[nodes.length - 1].data.length);
      }
      rightText = tempRange.toString();
    }
    _this.attributes.text = left;
    var parent = _this.parent;
    var idx = parent.children.indexOf(_this);
    var rightChildren = parent.children.slice(idx + 1);
    var newRightComp;
    if (rightText || rightChildren.length === 0) {
      newRightComp = _this.assembler.build({
        tag: 'Text',
        style: Object.assign({}, _this.style["export"](), {
          display: 'inline'
        }),
        attributes: {
          text: rightText
        }
      }, _this.fragment);
    }
    var newParagraph = _this.assembler.build({
      tag: 'HyperLayout',
      style: {
        marginBottom: 10,
        display: 'block',
        position: 'static'
      }
    }, _this.fragment);
    if (newRightComp) {
      newParagraph.addChild(newRightComp);
    }
    rightChildren.forEach(function (child) {
      return newParagraph.addChild(child);
    });
    if (parent === _this.fdEditor.rootLayout) {
      parent.addChildAfter(newParagraph, _this);
    } else {
      Object.assign(newParagraph.style, parent.style["export"]());
      parent.parent.addChildAfter(newParagraph, parent);
    }
    var textNode = (0, _utils.findFirstTextNode)(newParagraph.domElt);
    tempRange = document.createRange();
    tempRange.setStart(textNode, 0);
    tempRange.setEnd(textNode, 0);
    sel.removeAllRanges();
    sel.addRange(tempRange);
  };
  var joinPrevParagraph = function joinPrevParagraph() {
    var parent = _this.parent;
    var prevParagraph = parent.parent.findChildBefore(parent);
    if (!prevParagraph) return;
    var children = parent.children.slice();
    parent.remove();
    var ctnComp = _this,
      ctnOffset = 0;
    var prevLastChild = prevParagraph.children[prevParagraph.children.length - 1];
    var text = _this.attributes.text;
    if (prevParagraph && _this.equalTextStyle(prevLastChild)) {
      children.shift();
      prevLastChild.attributes.text += text;
      ctnComp = prevLastChild;
      ctnOffset = prevLastChild.attributes.text.length - text.length;
    }
    children.forEach(function (child) {
      prevParagraph.addChild(child);
    });
    var textNode, range;
    range = document.createRange();
    textNode = (0, _utils.findFirstTextNode)(ctnComp.domElt);
    range.setStart(textNode, ctnOffset);
    range.setEnd(textNode, ctnOffset);
    sel.removeAllRanges();
    sel.addRange(range);
  };
  var deleteToPrevNode = function deleteToPrevNode() {
    var parent = _this.parent;
    var compBF = parent.findChildBefore(_this);
    if (compBF) {
      compBF.deleteLastChar();
    } else if (parent !== _this.fdEditor.rootLayout) {
      joinPrevParagraph();
    }
  };
  var deleteSelected = function deleteSelected() {};
  var deleteBackCharacter = function deleteBackCharacter() {};
  if (range.collapsed) {
    if (key === 'backspace') {
      if (range.startOffset === 0) {
        event.preventDefault();
        deleteToPrevNode();
      } else if (range.startOffset === 1 && this.$textCtn.firstChild.data.replace(_utils.CHAR_ZWS, '').length === 1) {
        event.preventDefault();
        this.$textCtn.firstChild.data = _utils.CHAR_ZWS;
        range = document.createRange();
        range.setStart(this.$textCtn.firstChild, 0);
        range.setEnd(this.$textCtn.firstChild, 0);
        sel.removeAllRanges();
        sel.addRange(range);
      }
    } else if (key === 'enter') {
      event.preventDefault();
      breakParagraph();
    }
  }
};
FDText.prototype.deleteLastChar = function () {
  var text = this.$textCtn.firstChild.data;
  var newText = text.replace(_utils.CHAR_ZWS, '');
  newText = newText.substring(0, newText.length - 1) || _utils.CHAR_ZWS;
  this.$textCtn.firstChild.data = newText;
};
FDText.prototype.onDomRange = function (event) {
  var sel = getSelection();
  var range = sel.getRangeAt(0);
  if (range.collapsed) {
    if (range.startContainer === this.$textCtn.firstChild) {} else {
      console.log('TODO', range);
    }
  } else {}
};
FDText.prototype.equalTextStyle = function (other) {
  var _this2 = this;
  if (!other) return false;
  if (other.tag !== this.tag) return false;
  return ['font', 'fontStyle', 'textDecoration', 'textSize', 'textColor', 'display'].every(function (key) {
    return _this2.style[key] === other.style[key];
  });
};
var _default = FDText;
exports["default"] = _default;

/***/ }),

/***/ 62419:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _utils = __webpack_require__(49633);
var _TextArea = _interopRequireDefault(__webpack_require__(48310));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBlockComponent
 * @constructor
 */
function FDTextArea() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDTextArea, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDTextArea, _TextArea["default"]);
Object.values(FDTextArea.prototype.attributeHandlers).forEach(function (handler) {
  if (handler.set) {
    delete handler.set;
    delete handler["export"];
  }
});
FDTextArea.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": 'absol-textarea2',
    child: {
      tag: 'span',
      "class": 'fd-text-ctn',
      child: {
        text: _utils.CHAR_EMQ
      }
    }
  });
};
var _default = FDTextArea;
exports["default"] = _default;

/***/ }),

/***/ 51280:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBaseComponent = _interopRequireDefault(__webpack_require__(13095));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBaseComponent
 * @constructor
 */
function FDTextComponent() {
  _FDBaseComponent["default"].apply(this, arguments);
  this.domElt.addClass('fd-is-text');
}
(0, _inheritComponentClass["default"])(FDTextComponent, _FDBaseComponent["default"]);
FDTextComponent.prototype.isText = true;
var _default = FDTextComponent;
exports["default"] = _default;

/***/ }),

/***/ 89214:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _utils = __webpack_require__(49633);
var _TextInput = _interopRequireDefault(__webpack_require__(72386));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBlockComponent
 * @constructor
 */
function FDTextInput() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDTextInput, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDTextInput, _TextInput["default"]);
FDTextInput.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": 'as-text-input',
    child: {
      tag: 'span',
      "class": 'fd-text-ctn',
      child: {
        text: _utils.CHAR_EMQ
      }
    }
  });
};
var _default = FDTextInput;
exports["default"] = _default;

/***/ }),

/***/ 33935:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(49633);
var _TimeRange24Input = _interopRequireDefault(__webpack_require__(42336));
var _datetime = __webpack_require__(58286);
var _utils2 = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBlockComponent
 * @constructor
 */
function FDTimeRange24Input() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDTimeRange24Input, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDTimeRange24Input, _TimeRange24Input["default"]);
Object.values(FDTimeRange24Input.prototype.attributeHandlers).forEach(function (handler) {
  delete handler.set;
  delete handler.get;
  delete handler["export"];
});
FDTimeRange24Input.prototype.attributeHandlers.readOnly.set = function (value) {
  if (value) {
    this.domElt.addClass('as-read-only');
  } else {
    this.domElt.removeClass('as-read-only');
  }
  return value;
};
FDTimeRange24Input.prototype._updateTextData = function () {
  var dayOffset = this.attributes.dayOffset;
  var duration = this.attributes.duration;
  var format = this.attributes.format;
  var bD = (0, _datetime.beginOfDay)(new Date()).getTime();
  var text0 = (0, _utils2.isRealNumber)(dayOffset) ? (0, _datetime.formatDateTime)(new Date(bD + dayOffset), format || 'HH:mm') : 'HH:mm';
  var text1 = (0, _utils2.isRealNumber)(dayOffset + duration) ? (0, _datetime.formatDateTime)(new Date(bD + dayOffset + duration), format || 'HH:mm') : 'HH:mm';
  this.domElt.attr('data-text', text0 + ' - ' + text1);
  this.$timeTexts[0].attr('data-text', text0);
  this.$timeTexts[1].attr('data-text', text1);
};
FDTimeRange24Input.prototype.attributeHandlers.dayOffset.set = function (value, ref) {
  ref.set(value);
  this._updateTextData();
  return value;
};
FDTimeRange24Input.prototype.attributeHandlers.duration.set = function (value, ref) {
  ref.set(value);
  this._updateTextData();
  return value;
};
FDTimeRange24Input.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": 'as-time-range-24-input',
    attr: {
      'data-text': 'HH:mm - HH:mm'
    },
    child: [{
      "class": 'ac-time-input',
      child: [{
        "class": 'as-time-input-text',
        child: {
          tag: 'span',
          "class": 'fd-text-ctn',
          child: {
            text: _utils.CHAR_EMQ
          }
        }
      }, {
        tag: 'button',
        "class": 'as-time-input-icon-btn',
        child: 'span.mdi.mdi-clock-outline'
      }]
    }, {
      "class": ['ac-time-input', 'as-time-24-input'],
      child: [{
        "class": 'as-time-input-text'
      }, {
        tag: 'button',
        "class": 'as-time-input-icon-btn',
        child: 'span.mdi.mdi-clock-outline'
      }]
    }]
  });
  this.$timeTexts = (0, _FCore.$$)('.as-time-input-text', this.domElt);
};
var _default = FDTimeRange24Input;
exports["default"] = _default;

/***/ }),

/***/ 94581:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDBlockComponent = _interopRequireDefault(__webpack_require__(9208));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(49633);
var _TreeLeafComboBox = _interopRequireDefault(__webpack_require__(29723));
var _FCore = __webpack_require__(51518);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDBlockComponent
 * @constructor
 */
function FDTreeLeafComboBox() {
  _FDBlockComponent["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDTreeLeafComboBox, _FDBlockComponent["default"]);
(0, _utils.inheritComponentClassAttribute)(FDTreeLeafComboBox, _TreeLeafComboBox["default"]);
Object.values(FDTreeLeafComboBox.prototype.attributeHandlers).forEach(function (handler) {
  if (handler.set) {
    delete handler.set;
    delete handler.get;
    delete handler["export"];
  }
});
FDTreeLeafComboBox.prototype.render = function () {
  //absol-selectmenu as-select-menu as-select-tree-leaf-menu as-base-component as-height-auto
  this.domElt = (0, _FCore._)({
    "class": ['absol-selectmenu', 'as-select-menu', 'as-select-tree-leaf-menu'],
    child: [{
      "class": 'fd-text-ctn',
      child: {
        text: _utils.CHAR_EMQ
      }
    }, {
      tag: 'button',
      style: {
        pointerEvents: 'none'
      },
      "class": 'absol-selectmenu-btn',
      child: [_ACore["default"]._('dropdown-ico')]
    }]
  });
};
var _default = FDTreeLeafComboBox;
exports["default"] = _default;

/***/ }),

/***/ 90903:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDDateInput = _interopRequireDefault(__webpack_require__(66786));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends FDDateInput
 * @constructor
 */
function FDWeekInput() {
  _FDDateInput["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(FDWeekInput, _FDDateInput["default"]);
FDWeekInput.prototype.tag = 'WeekInput';
FDWeekInput.prototype.render = function () {
  _FDDateInput["default"].prototype.render.call(this);
  this.$text.attr('data-text', 'Tuần ww, yyyy');
};
var _default = FDWeekInput;
exports["default"] = _default;

/***/ }),

/***/ 49633:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.CHAR_ZWS = exports.CHAR_EMQ = void 0;
exports.decodeHtmlText = decodeHtmlText;
exports.findFDComponentOfNode = findFDComponentOfNode;
exports.findFirstTextNode = findFirstTextNode;
exports.findLastTextNode = findLastTextNode;
exports.findNextTextNode = findNextTextNode;
exports.findPrevTextNode = findPrevTextNode;
exports.getTextNodeBounds = getTextNodeBounds;
exports.inheritComponentClassAttribute = inheritComponentClassAttribute;
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _utils = __webpack_require__(84512);
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var CHAR_ZWS = String.fromCharCode(8203);
exports.CHAR_ZWS = CHAR_ZWS;
var CHAR_EMQ = String.fromCharCode(8193);
exports.CHAR_EMQ = CHAR_EMQ;
function findPrevTextNode(node) {
  // console.log('findPrevTextNode', node)
  var parent = node.parentElement;
  if (!parent) return null;
  var idx = Array.prototype.indexOf.call(parent.childNodes, node);
  var found = null;
  for (var i = idx - 1; !found && i >= 0; --i) {
    found = findLastTextNode(parent.childNodes[i]);
  }
  if (!found) found = findPrevTextNode(parent);
  return found;
}

/**
 *
 * @param {Text | AElement}node
 * @returns {*|null}
 */
function findNextTextNode(node) {
  // console.log('findPrevTextNode', node)
  var parent = node.parentElement;
  if (!parent) return null;
  var idx = Array.prototype.indexOf.call(parent.childNodes, node);
  var found = null;
  var n = parent.childNodes.length;
  for (var i = idx + 1; !found && i < n; ++i) {
    found = findLastTextNode(parent.childNodes[i]);
  }
  if (!found) found = findNextTextNode(parent);
  return found;
}

/**
 *
 * @param {Text | AElement|*} node
 * @returns {Text}
 */
function findLastTextNode(node) {
  if (!node) return null;
  if (node.nodeType === Node.TEXT_NODE) return node;
  var n = node.childNodes.length - 1;
  var found = null;
  for (var i = n; !found && i >= 0; --i) {
    found = findLastTextNode(node.childNodes[i]);
  }
  return found;
}

/**
 *
 * @param {Text | AElement|*} node
 * @returns {Text}
 */
function findFirstTextNode(node) {
  if (!node) return null;
  if (node.nodeType === Node.TEXT_NODE) return node;
  var n = node.childNodes.length;
  var found = null;
  for (var i = 0; !found && i < n; ++i) {
    found = findLastTextNode(node.childNodes[i]);
  }
  return found;
}
function findFDComponentOfNode(node) {
  while (node) {
    if (node.fdComponent) return node.fdComponent;
    node = node.parentElement;
  }
  return null;
}

/**
 *TODO: import from absol-acomp
 * @param {Text} text
 * @param {number=} startOffset
 * @param {number=} endOffset
 * @returns {*[]}
 */
function getTextNodeBounds(text, startOffset, endOffset) {
  if (!text || text.nodeType !== Node.TEXT_NODE || !text.parentElement) return null;
  var style = getComputedStyle(text.parentElement);
  var fontSize = parseFloat(style.getPropertyValue('font-size').replace('px', ''));
  var lineHeight = style.getPropertyValue('line-height');
  if (lineHeight === 'normal') lineHeight = 1.2;else lineHeight = parseFloat(lineHeight.replace('px', '')) / fontSize;
  var txt = text.data;
  var y = -Infinity;
  var c;
  var range;
  var parts = [];
  var cPart;
  var j;
  var delta = lineHeight * fontSize / 3;
  var rect;
  var i = 0;
  if ((0, _utils.isNaturalNumber)(startOffset)) i = Math.max(startOffset, i);
  if ((0, _utils.isNaturalNumber)(endOffset)) endOffset = Math.min(txt.length, endOffset);else endOffset = txt.length;
  while (i < endOffset) {
    c = txt[i];
    j = i + 1;
    range = document.createRange();
    range.setStart(text, i);
    range.setEnd(text, j);
    rect = _Rectangle["default"].fromClientRect(range.getBoundingClientRect());
    if (Math.abs(rect.y - y) < delta) {
      cPart.end = j;
      cPart.rect = cPart.rect.merge(rect);
    } else {
      cPart = {
        start: i,
        end: j,
        rect: rect
      };
      y = rect.y;
      parts.push(cPart);
    }
    i = j;
  }
  parts.forEach(function (part) {
    rect = part.rect;
    part.text = txt.substring(part.start, part.end);
  });
  return parts;
}

/**
 *
 * @param target
 * @param source
 * @param {"style"|"attr"|null=}opt
 */
function inheritComponentClassAttribute(target, source, opt) {
  target.prototype.tag = source.prototype.tag;
  if (!opt || opt === 'attr') {
    Object.keys(source.prototype.attributeHandlers).filter(function (key) {
      return !target.prototype.attributeHandlers[key];
    }).forEach(function (key) {
      target.prototype.attributeHandlers[key] = Object.assign({}, source.prototype.attributeHandlers[key]);
    });
    Object.assign(target.prototype.attributes, source.prototype.attributes);
  }
  if (!opt || opt === "style") {
    if (source.prototype.BOX_ALIGN_CLASSES) {
      target.prototype.BOX_ALIGN_CLASSES = source.prototype.BOX_ALIGN_CLASSES;
    }
    Object.keys(source.prototype.styleHandlers).filter(function (key) {
      return !target.prototype.styleHandlers[key];
    }).forEach(function (key) {
      target.prototype.styleHandlers[key] = Object.assign({}, source.prototype.styleHandlers[key]);
    });
    Object.assign(target.prototype.style, source.prototype.style);
  }
}
function decodeHtmlText(html) {
  var txt = document.createElement("textarea");
  txt.innerHTML = html;
  return txt.value;
}

//
// export function hyperLayoutConverter(data) {
//     if (data.class) return copyJSVariable(data);
//     if (!data.tag.endsWith('Layout')) return copyJSVariable(data);
//     var res = {
//         tag:'HyperLayout'
//     }
//     switch (data.tag) {
//         case 'HyperLayout':
//
//             break;
//         case 'LinearLayout': break;
//         case 'RelativeLayout':break;
//         case 'ChainLayout':break;
//     }
//
//     return res;
//
// }

/***/ }),

/***/ 64413:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
__webpack_require__(38140);
var _LayoutEditor = _interopRequireDefault(__webpack_require__(22157));
var _BlockEditor = _interopRequireDefault(__webpack_require__(46228));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _utils = __webpack_require__(16907);
var _CircuitDiagramEditor = _interopRequireDefault(__webpack_require__(65748));
var _FlexFormEditorCmd = _interopRequireDefault(__webpack_require__(33548));
var _generator = __webpack_require__(18528);
var _FOutline = __webpack_require__(43894);
var _FDEditor = _interopRequireDefault(__webpack_require__(81055));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function FlexFormEditor() {
  _BaseEditor["default"].call(this);
  this.cmdRunner.assign(_FlexFormEditorCmd["default"]);
  this._data = null;
  this._activatedEditorIdx = -1;
  this.setContext(_R["default"].FLEX_FORM_EDITOR, this);
  this.layoutEditor = new _LayoutEditor["default"]();
  this.blockEditor = new _BlockEditor["default"]();
  this.diagramEditor = new _CircuitDiagramEditor["default"]();
  this.fdEditor = new _FDEditor["default"]();
  /***
   *
   * @type {(LayoutEditor|BlockEditor|CircuitDiagramEditor)[]}
   */
  this.subEditors = [this.layoutEditor, this.blockEditor, this.diagramEditor, this.fdEditor];
  this.setContext(_R["default"].LAYOUT_EDITOR, this.layoutEditor);
  this.setContext(_R["default"].DIAGRAM_EDITOR, this.diagramEditor);
  this.setContext(_R["default"].BLOCK_EDITOR, this.blockEditor);
  this.setContext(_R["default"].FD_EDITOR, this.fdEditor);
}
_OOP["default"].mixClass(FlexFormEditor, _BaseEditor["default"]);
FlexFormEditor.prototype.setData = function (data) {
  try {
    data = this.implicitData(data);
    this.getView();
    this._data = data || {};
    this.layoutEditor.setData(data.layout);
    this.blockEditor.setData(data.circuit.blocks);
    this.diagramEditor.setData(data.circuit.lines, data.circuit.diagram);
  } catch (err) {
    var dataBlob = new Blob(['data = ' + (0, _generator.generateJSVariable)(data)], {
      type: 'text/plain'
    });
    console.error("Error data", [URL.createObjectURL(dataBlob), data]);
    console.error(err);
  }
};
FlexFormEditor.prototype.getData = function () {
  this._data.layout = this.layoutEditor.getData();
  this._data.circuit.blocks = this.blockEditor.getData();
  this._data.circuit.lines = this.diagramEditor.getLineData();
  this._data.circuit.diagram = this.diagramEditor.getDiagramData();
  return this.explicitData(this._data);
};

/***
 * @typedef FDPermissions
 * @property {string} owner
 */

/***
 *
 * @typedef FDAttributes
 * @property {string} id
 * @property {string} name
 * @property {FDPermissions} permissions
 *
 * */

/***
 * @typedef FDStyle
 * @extends Object
 * * */

/***
 * @typedef ComponentData
 * @property {string} tag
 * @property {FDAttributes} attributes
 * @property {FDStyle} style
 * @property {ComponentData[]} children
 * */

/***
 * @typedef DiagramData
 * @property {string[]} includedBlocks
 * @property {{}} positions
 *
 */

/***
 * @typedef BlockData
 * @property {string} tag
 * @property {FDAttributes} attributes
 */

/***
 * @typedef LineData
 * @property {string} u
 * @property {string} uPin
 * @property {string} v
 * @property {string} vPin
 * @property {string} id
 * @property {FDPermissions} permissions
 */

/***
 * @typedef CircuitData
 * @property {BlockData[]} blocks
 * @property {LineData[]} lines
 * @property {DiagramData} diagram
 */

/***
 *
 * @typedef FormData
 * @property {string} app
 * @property {string} version
 * @property {ComponentData} layout
 * @property {CircuitData} circuit
 *
 *
 */

FlexFormEditor.prototype.implicitData = function (data) {
  data = (0, _generator.copyJSVariable)(data);
  var layout = data.layout || data;
  var version = '1.1.1';
  var circuit = data.circuit || {};
  circuit.blocks = circuit.blocks || [];
  circuit.lines = circuit.lines || [];
  circuit.diagram = circuit.diagram || {};
  circuit.diagram.includedBlocks = circuit.diagram.includedBlocks || [];
  circuit.diagram.positions = circuit.diagram.positions || {};
  circuit.blocks.forEach(function (block) {
    block.attributes.id = block.attributes.id || (0, _utils.randomUniqueIdent)();
    block.attributes.name = block.attributes.name || block.attributes.id;
  });
  var twoWayLines = [];
  circuit.lines.forEach(function (line) {
    line.id = line.id || (0, _utils.randomUniqueIdent)();
    if (line.twoWay) {
      delete line.twoWay;
      twoWayLines.push(Object.assign({}, line, {
        u: line.v,
        v: line.u,
        uPin: line.vPin,
        vPin: line.uPin
      }));
    }
  });
  circuit.lines.push.apply(circuit.lines, twoWayLines);
  var id2Name = {};
  var name2Id = {};
  var idList = {};
  function visit(node) {
    var name = node.attributes && node.attributes.name;
    var id = node.attributes && node.attributes.id;
    //auto fix tag
    if (!node.tag && !node["class"]) {
      if (node.attributes && node.attributes.body && 'args' in node.attributes) {
        node.tag = 'function';
        console.warn("Detect node without tag", 'fixed with tag = "function"');
      } else {
        console.warn("Detect node without tag, can not be fixed", node);
      }
    }
    if (!id) {
      if (!node.attributes) {
        node.attributes = {};
      }
      id = (0, _utils.randomUniqueIdent)();
      node.attributes.id = id;
    }
    if (idList[id]) {
      id = (0, _utils.randomUniqueIdent)();
      if (!node.attributes) {
        node.attributes = {};
      }
      node.attributes.id = id;
    }
    idList[id] = true;
    if (id && name) {
      id2Name[id] = name;
      name2Id[name] = id;
    }
    var group = node.attributes && node.attributes.group;
    if (group && group.trim && group.trim().length > 0) {
      idList[group.trim()] = true;
    }
    if (node.children) node.children.forEach(visit);
  }
  visit(layout);
  circuit.blocks.forEach(visit);
  circuit.blocks.forEach(function (block) {
    delete block.id; //fix invalid data
  });

  circuit.lines.forEach(function (line) {
    if (name2Id[line.u]) {
      line.u = name2Id[line.u];
    }
    if (name2Id[line.v]) {
      line.v = name2Id[line.v];
    }
  });
  circuit.lines = circuit.lines.filter(function (line) {
    if (!idList[line.u] || !idList[line.v]) {
      if (window.ABSOL_DEBUG) console.error("invalid line ", line);
    }
    return idList[line.u] && idList[line.v];
  });
  circuit.diagram.includedBlocks = circuit.diagram.includedBlocks.filter(function (id) {
    return idList[id];
  });
  return {
    app: _R["default"].APP,
    version: version,
    layout: layout,
    circuit: circuit
  };
};
FlexFormEditor.prototype.explicitData = function (data) {
  data = (0, _generator.replaceDateStringJSVariable)(data);
  var id2Name = {};
  var nameList = {};
  function visit(node) {
    var name = node.attributes && node.attributes.name;
    var id = node.attributes && node.attributes.id;
    if (id && name && !nameList[name]) {
      nameList[name] = true;
      id2Name[id] = name;
    }
    if (node.children) node.children.forEach(visit);
  }
  visit(data.layout);
  data.circuit && data.circuit.blocks && data.circuit.blocks.forEach(visit);
  data.circuit && data.circuit.lines && data.circuit.lines.forEach(function (line) {
    if (id2Name[line.u]) line.u = id2Name[line.u];
    if (id2Name[line.v]) line.v = id2Name[line.v];
  });
  return data;
};
FlexFormEditor.prototype.createView = function () {
  this.$tabFrames = [(0, _FCore._)({
    tag: 'tabframe',
    child: this.layoutEditor.getView()
  }), (0, _FCore._)({
    tag: 'tabframe',
    child: this.blockEditor.getView()
  }), (0, _FCore._)({
    tag: 'tabframe',
    child: this.diagramEditor.getView()
  }), (0, _FCore._)({
    tag: 'tabframe',
    child: this.fdEditor.getView()
  })];
  this.$view = (0, _FCore._)({
    "class": 'as-flex-form-editor',
    child: [{
      "class": 'as-flex-form-editor-right-tab',
      child: [{
        "class": 'as-flex-form-editor-right-tab-top',
        child: [{
          tag: 'button',
          "class": 'as-form-editor-vertical-tab-btn',
          child: ['span.mdi.mdi-view-quilt[style="color:rgb(30, 100, 255)"]', {
            text: 'Layout'
          }],
          on: {
            click: this.activeEditorTab.bind(this, 0)
          }
        }, {
          tag: 'button',
          "class": 'as-form-editor-vertical-tab-btn',
          child: ['mdi-shape', {
            text: 'Blocks'
          }],
          on: {
            click: this.activeEditorTab.bind(this, 1)
          }
        }, {
          tag: 'button',
          "class": 'as-form-editor-vertical-tab-btn',
          child: ['span.mdi.mdi-transit-connection-variant[style="color:rgb(255, 100, 50)"]', {
            text: 'Lines'
          }],
          on: {
            click: this.activeEditorTab.bind(this, 2)
          }
        }, {
          tag: 'button',
          "class": 'as-form-editor-vertical-tab-btn',
          style: !window['ABSOL_DEBUG'] ? {
            display: 'none'
          } : {},
          child: ['span.mdi.mdi-text-recognition[style="color:rgb(50, 100, 255)"]', {
            text: 'Wysiwyg(Test)'
          }],
          on: {
            click: this.activeEditorTab.bind(this, 3)
          }
        }]
      }]
    }, {
      tag: 'frameview',
      "class": 'as-flex-form-editor-frame-view',
      child: this.$tabFrames
    }]
  });
  this.$tabBtns = (0, _FCore.$$)('.as-flex-form-editor-right-tab-top > button', this.$view);
  this.$frameView = (0, _FCore.$)('.as-flex-form-editor-frame-view', this.$view);
  // console.log(this.$tabFrames[0]);
  this.activeEditorTab(0);
};
FlexFormEditor.prototype.activeEditorTab = function (idx) {
  if (this._activatedEditorIdx === idx) return;
  this._activatedEditorIdx = idx;
  for (var i = 0; i < this.$tabFrames.length; ++i) {
    if (i === idx) {
      this.$tabFrames[i].requestActive();
      if (!this.$tabBtns[i].hasClass('active')) {
        this.$tabBtns[i].addClass('active');
        if (this.state === "RUNNING") {
          this.subEditors[i].start();
        }
      }
    } else {
      if (this.$tabBtns[i].hasClass('active')) {
        this.$tabBtns[i].removeClass('active');
        if (this.state === "RUNNING") this.subEditors[i].pause();
      }
    }
  }
};
FlexFormEditor.prototype.onAttached = function () {
  this.layoutEditor.attach(this);
  this.blockEditor.attach(this);
  this.diagramEditor.attach(this);
  this.fdEditor.attach(this);
};
FlexFormEditor.prototype.onStart = function () {
  /**
   * @type {FLTask}
   */
  this.task = this.getContext(_R["default"].TASK);
  /****
   *
   * @type {FormEditor}
   */
  this.formEditor = this.getContext(_R["default"].FORM_EDITOR);
  this.selfHolder = this.formEditor.getEditorHolderByEditor(this);
  this.layoutEditor.start(true);
  this.blockEditor.start(true);
  this.diagramEditor.start(true);
  this.fdEditor.start(true);
  // this.flexFormOutline.start();
};

FlexFormEditor.prototype.onResume = function () {
  if (this._activatedEditorIdx >= 0) {
    this.subEditors[this._activatedEditorIdx].resume();
  }
};
FlexFormEditor.prototype.onPause = function () {
  if (this._activatedEditorIdx >= 0) this.subEditors[this._activatedEditorIdx].pause();
};
FlexFormEditor.prototype.onStop = function () {
  this.layoutEditor.stop();
  this.blockEditor.stop();
  this.diagramEditor.stop();
  // this.flexFormOutline.stop();
};

FlexFormEditor.prototype.onDestroy = function () {
  this.layoutEditor.destroy();
  this.blockEditor.destroy();
  this.diagramEditor.destroy();
};
FlexFormEditor.prototype.notifyUnsaved = function () {
  this.task.modified = true;
};
FlexFormEditor.prototype.notifySaved = function () {
  this.task.modified = false;
};
var _default = FlexFormEditor;
/***
 * @deprecated
 * @extends OutlineDelegate
 * @param {FlexFormEditor} editor
 * @constructor
 */
exports["default"] = _default;
function FlexFormOutlineDelegate(editor) {
  this.editor = editor;
  _FOutline.OutlineDelegate.call(this);
  this.layoutOutlineDelegate = this.editor.layoutEditor.outlineDelegate;
  this.layoutOutlineDelegate.partner = this;
  this.fdLayoutOutlineDelegate = this.editor.fdEditor.outlineDelegate;
  this.fdLayoutOutlineDelegate.partner = this;
}
_OOP["default"].mixClass(FlexFormOutlineDelegate, _FOutline.OutlineDelegate);
FlexFormOutlineDelegate.prototype.getTreeData = function () {
  return [this.layoutOutlineDelegate, this.fdLayoutOutlineDelegate].reduce(function (ac, d) {
    var subTree = d.getTreeData();
    if (subTree instanceof Array) {
      ac.push.apply(ac, subTree);
      subTree.forEach(function (it) {
        return it.ofDelegate = d;
      });
    } else if (subTree) {
      ac.push(subTree);
      subTree.ofDelegate = d;
    }
    return ac;
  }, []);
};
FlexFormOutlineDelegate.prototype._delegateOf = function (nodeElt) {
  var delegate;
  var c = nodeElt;
  while (c && !delegate) {
    delegate = c.data && c.data.ofDelegate;
    c = c.parentElement;
  }
  return delegate || null;
};
FlexFormOutlineDelegate.prototype.getNodeContextMenu = function (nodeElt) {
  var delegate = this._delegateOf(nodeElt);
  if (delegate) {
    return delegate.getNodeContextMenu(nodeElt);
  }
};
FlexFormOutlineDelegate.prototype.getSelectedIdList = function () {
  return this.layoutOutlineDelegate.getSelectedIdList();
};
FlexFormOutlineDelegate.prototype.onNodeSelectContextMenu = function (nodeElt, menuItem, event) {
  var delegate = this._delegateOf(nodeElt);
  if (delegate) {
    return delegate.onNodeSelectContextMenu(nodeElt, menuItem, event);
  }
};
FlexFormOutlineDelegate.prototype.onClickNode = function (nodeElt, event) {
  if (nodeElt.data.id) {
    this.layoutOutlineDelegate.onClickNode(nodeElt, event);
  }
};

/***/ }),

/***/ 33548:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PluginManager = _interopRequireDefault(__webpack_require__(19617));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _FormPreview = __webpack_require__(31642);
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
var _utils = __webpack_require__(84512);
var _FileSaver = __webpack_require__(53069);
var _generator = __webpack_require__(18528);
var _SBIdentifierInput = __webpack_require__(97631);
var _Toast = _interopRequireDefault(__webpack_require__(68105));
var _Snackbar = _interopRequireDefault(__webpack_require__(96206));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @type {FlexFormEditor||Object}
 */

var FlexFormEditorCmd = {};
FlexFormEditorCmd.save = function () {
  var task = this.getContext(_R["default"].TASK);
  var isSystemForm = task && task.bundle && task.bundle.contentArguments && task.bundle.contentArguments && task.bundle.contentArguments.formid < 0;
  if (task) {
    if (isSystemForm) {
      _PluginManager["default"].exec(this, _R["default"].PLUGINS.SAVE_AS_SYSTEM, task.bundle);
    } else {
      _PluginManager["default"].exec(this, _R["default"].PLUGINS.SAVE_CONTENT_DATA, task.bundle);
    }
  }
  this.notifySaved();
};
FlexFormEditorCmd.saveAs = function () {
  var task = this.formEditor.getEditorHolderByEditor(this);
  if (task) _PluginManager["default"].exec(this, _R["default"].PLUGINS.SAVE_AS_CONTENT_DATA, task.bundle);
  this.notifySaved();
};
FlexFormEditorCmd.saveAsSystem = function () {
  var task = this.formEditor.getEditorHolderByEditor(this);
  if (task) _PluginManager["default"].exec(this, _R["default"].PLUGINS.SAVE_AS_SYSTEM, task.bundle);
  this.notifySaved();
};
FlexFormEditorCmd.importFromJson = function () {
  var self = this;
  (0, _utils.openFileDialog)({
    accept: 'application/JSON'
  }).then(function (files) {
    if (!files || files.length === 0) return;
    var file = files[0];
    var reader = new FileReader();
    reader.onload = function () {
      try {
        var data = (0, _generator.replaceDateStringJSVariable)(JSON.parse(reader.result));
        if (data.app === _R["default"].APP) {
          self.setData(data);
          self.notifyUnsaved();
        } else {
          console.error('Invalid data!');
        }
      } catch (error) {
        (0, _safeThrow["default"])(error);
      }
    };
    reader.readAsText(file);
  });
};
FlexFormEditorCmd.export2Json = function () {
  var fileName = 'exported.json';
  var formEditor = this.getContext(_R["default"].FORM_EDITOR);
  var tabHolder;
  if (formEditor) {
    tabHolder = formEditor.getEditorHolderByEditor(this);
    // console.log(tabHolder)
    fileName = tabHolder.name.replace(/[\\\/\.\?]/g, '_') + '.json';
  }
  if (formEditor.options.downloadPrefixFileName) {
    fileName = formEditor.options.downloadPrefixFileName + fileName;
  }
  var text = JSON.stringify(Object.assign(this.getData(), {
    app: _R["default"].APP,
    version: _R["default"].VERSION
  }), null, '    ');
  var fileType = 'json';
  var blob = new Blob([text], {
    type: fileType,
    encoding: "UTF-8"
  });
  (0, _FileSaver.saveAs)(blob, fileName);
};
FlexFormEditorCmd.export2sharpEncode = function () {
  if (!window.EncodingClass) return;
  var fileName = 'exported.txt';
  var formEditor = this.getContext(_R["default"].FORM_EDITOR);
  if (formEditor) {
    var tabHolder = formEditor.getEditorHolderByEditor(this);
    fileName = tabHolder.name.replace(/[\\\/\.\?]/g, '_') + '.txt';
  }
  if (formEditor.options.downloadPrefixFileName) {
    fileName = formEditor.options.downloadPrefixFileName + fileName;
  }
  var text = window.EncodingClass.string.fromVariable(Object.assign(this.getData(), {
    app: _R["default"].APP,
    version: _R["default"].VERSION
  }), null, '    ');
  (0, _FileSaver.saveTextAs)(text, fileName);
};
FlexFormEditorCmd.export2clipboard = function () {
  var fileName = 'exported.json';
  var formEditor = this.getContext(_R["default"].FORM_EDITOR);
  if (formEditor) {
    var tabHolder = formEditor.getEditorHolderByEditor(this);
    fileName = tabHolder.name.replace(/[\\\/\.\?]/g, '_') + '.json';
  }
  if (formEditor.options.downloadPrefixFileName) {
    fileName = formEditor.options.downloadPrefixFileName + fileName;
  }
  var text = (0, _generator.generateJSVariable)(Object.assign(this.getData(), {
    app: _R["default"].APP,
    version: _R["default"].VERSION
  }), null, '    ');
  navigator.clipboard.writeText(text).then(function () {
    _Snackbar["default"].show("Copied JS to clipboard");
  });
};
FlexFormEditorCmd.preview = function () {
  var launcher = this.getContext(_R["default"].LAUNCHER);
  var task = this.getContext(_R["default"].TASK);
  var bundle = {
    id: task.bundle.id + '_preview',
    name: task.bundle.name + '(Preview)'
  };
  var previewTask = launcher.newTask(_FormPreview.FormPreviewTask, bundle);
  previewTask.mainFragment.setData(this.getData());
};

//todo: save variable in context
var mqttClient;
var deviceIdSync;
FlexFormEditorCmd.linkToPhone = function () {};
FlexFormEditorCmd.remotePreview = function () {
  var _this = this;
  mqttClient = mqttClient || window.MQTT.connect('wss:absol.cf:9884');
  this.$remotePreviewBtn = this.$remotePreviewBtn || (0, _FCore.$)('button[data-cmd-name="remotePreview"]', this.$view);
  deviceIdSync = deviceIdSync || (0, _SBIdentifierInput.openIdentifierInputDialog)(this.$remotePreviewBtn, '').then(function (result) {
    if (!result) return null;
    _this.$remotePreviewBtn.title = "Connect to client: " + result;
    return result;
  });
  deviceIdSync.then(function (result) {
    if (!result) {
      deviceIdSync = null;
      return;
    }
    var data = _this.getData();
    mqttClient.publish('rfp/' + result, JSON.stringify({
      type: 'form',
      data: data
    }), function (err) {
      if (err) {
        _Toast["default"].make({
          props: {
            variant: 'error',
            htitle: "Send data error",
            disappearTimeout: 4000
          },
          child: {
            style: {
              padding: '5px'
            },
            child: {
              text: err.message
            }
          }
        });
      }
    });
  });
};
var _default = FlexFormEditorCmd;
exports["default"] = _default;

/***/ }),

/***/ 68117:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.FONT_NAMES = exports.FONT_ITEMS = exports.FONT_FACES_BY_NAME = exports.FONT_FACES = void 0;
exports.queryURL = queryURL;
function queryURL(fontNames) {
  return 'https://fonts.googleapis.com/css?family=' + fontNames.join('_') + '&display=swap';
}
var FONT_NAMES = ["Alegreya", "Alegreya+SC", "Alegreya+Sans", "Alegreya+Sans+SC", "Alfa+Slab+One", "Amatic+SC", "Andika", "Anton", "Archivo", "Archivo+Narrow", "Arima+Madurai", "Arimo", "Arsenal", "Asap", "Asap+Condensed", "Athiti", "Bahianita", "Bai+Jamjuree", "Baloo", "Baloo+Bhai", "Baloo+Bhaijaan", "Baloo+Bhaina", "Baloo+Chettan", "Baloo+Da", "Baloo+Paaji", "Baloo+Tamma", "Baloo+Tammudu", "Baloo+Thambi", "Bangers", "Barlow", "Barlow+Condensed", "Barlow+Semi+Condensed", "Barriecito", "Be+Vietnam", "Bevan", "Big+Shoulders+Display", "Big+Shoulders+Text", "Bungee", "Bungee+Hairline", "Bungee+Inline", "Bungee+Outline", "Bungee+Shade", "Cabin", "Cabin+Condensed", "Chakra+Petch", "Charm", "Charmonman", "Chonburi", "Coiny", "Comfortaa", "Cormorant", "Cormorant+Garamond", "Cormorant+Infant", "Cormorant+SC", "Cormorant+Unicase", "Cormorant+Upright", "Cousine", "Crimson+Pro", "Cuprum", "Dancing+Script", "Darker+Grotesque", "David+Libre", "Dosis", "EB+Garamond", "Encode+Sans", "Encode+Sans+Condensed", "Encode+Sans+Expanded", "Encode+Sans+Semi+Condensed", "Encode+Sans+Semi+Expanded", "Exo", "Exo+2", "Fahkwang", "Farsan", "Faustina", "Fira+Sans", "Fira+Sans+Condensed", "Fira+Sans+Extra+Condensed", "Francois+One", "Grenze", "Hepta+Slab", "IBM+Plex+Mono", "IBM+Plex+Sans", "IBM+Plex+Sans+Condensed", "IBM+Plex+Serif", "Inconsolata", "Itim", "Josefin+Sans", "Judson", "Jura", "K2D", "Kanit", "KoHo", "Kodchasan", "Krub", "Lalezar", "Lemonada", "Lexend+Deca", "Lexend+Exa", "Lexend+Giga", "Lexend+Mega", "Lexend+Peta", "Lexend+Tera", "Lexend+Zetta", "Literata", "Livvic", "Lobster", "Lora", "M+PLUS+1p", "M+PLUS+Rounded+1c", "Maitree", "Major+Mono+Display", "Mali", "Manuale", "Markazi+Text", "Maven+Pro", "Merriweather", "Metrophobic", "Mitr", "Montserrat", "Montserrat+Alternates", "Muli", "Niramit", "Noticia+Text", "Noto+Sans", "Noto+Sans+SC", "Noto+Serif", "Noto+Serif+SC", "Noto+Serif+TC", "Nunito", "Nunito+Sans", "Old+Standard+TT", "Open+Sans", "Open+Sans+Condensed:300", "Oswald", "Pacifico", "Pangolin", "Patrick+Hand", "Patrick+Hand+SC", "Pattaya", "Paytone+One", "Philosopher", "Play", "Playfair+Display", "Playfair+Display+SC", "Podkova", "Prata", "Pridi", "Prompt", "Quicksand", "Roboto", "Roboto+Condensed", "Roboto+Mono", "Roboto+Slab", "Rokkitt", "Rosario", "Saira", "Saira+Condensed", "Saira+Extra+Condensed", "Saira+Semi+Condensed", "Saira+Stencil+One", "Sarabun", "Sawarabi+Gothic", "Sedgwick+Ave", "Sedgwick+Ave+Display", "Sigmar+One", "Source+Code+Pro", "Source+Sans+Pro", "Space+Mono", "Spectral", "Spectral+SC", "Sriracha", "Srisakdi", "Taviraj", "Thasadith", "Tinos", "Trirong", "VT323", "Varela+Round", "Vollkorn", "Vollkorn+SC", "Yanone+Kaffeesatz", "Yeseva+One"];
exports.FONT_NAMES = FONT_NAMES;
var FONT_FACES = ["'Open Sans', sans-serif", "'Roboto', sans-serif", "'Big Shoulders Text', cursive", "'Montserrat', sans-serif", "'Oswald', sans-serif", "'Source Sans Pro', sans-serif", "'Roboto Condensed', sans-serif", "'Literata', serif", "'Roboto Mono', monospace", "'Roboto Slab', serif", "'Merriweather', serif", "'Noto Sans', sans-serif", "'Lora', serif", "'Muli', sans-serif", "'Open Sans Condensed', sans-serif", "'Playfair Display', serif", "'Nunito', sans-serif", "'Noto Serif', serif", "'Fira Sans', sans-serif", "'Inconsolata', monospace", "'Dosis', sans-serif", "'Nunito Sans', sans-serif", "'Arimo', sans-serif", "'Quicksand', sans-serif", "'Cabin', sans-serif", "'Josefin Sans', sans-serif", "'Varela Round', sans-serif", "'Anton', sans-serif", "'Lobster', cursive", "'Yanone Kaffeesatz', sans-serif", "'Source Code Pro', monospace", "'Baloo Bhai', cursive", "'Barlow', sans-serif", "'Dancing Script', cursive", "'Pacifico', cursive", "'Exo 2', sans-serif", "'Barlow Semi Condensed', sans-serif", "'EB Garamond', serif", "'Archivo Narrow', sans-serif", "'Asap', sans-serif", "'Comfortaa', cursive", "'Barlow Condensed', sans-serif", "'IBM Plex Sans', sans-serif", "'Maven Pro', sans-serif", "'Play', sans-serif", "'Exo', sans-serif", "'Amatic SC', cursive", "'Kanit', sans-serif", "'Fira Sans Condensed', sans-serif", "'Noto Sans SC', sans-serif", "'Vollkorn', serif", "'Prompt', sans-serif", "'Rokkitt', serif", "'Cuprum', sans-serif", "'Alegreya Sans', sans-serif", "'Francois One', sans-serif", "'Cormorant Garamond', serif", "'Alegreya', serif", "'Alfa Slab One', cursive", "'Noticia Text', serif", "'Saira Extra Condensed', sans-serif", "'Old Standard TT', serif", "'Tinos', serif", "'Fira Sans Extra Condensed', sans-serif", "'IBM Plex Serif', serif", "'Patrick Hand', cursive", "'M PLUS 1p', sans-serif", "'Prata', serif", "'Philosopher', sans-serif", "'Saira Semi Condensed', sans-serif", "'Archivo', sans-serif", "'Big Shoulders Display', cursive", "'Bangers', cursive", "'Playfair Display SC', serif", "'Cabin Condensed', sans-serif", "'Paytone One', sans-serif", "'Montserrat Alternates', sans-serif", "'Taviraj', serif", "'Spectral', serif", "'Lalezar', cursive", "'Asap Condensed', sans-serif", "'M PLUS Rounded 1c', sans-serif", "'Sigmar One', cursive", "'Saira', sans-serif", "'Pridi', serif", "'Mitr', sans-serif", "'Baloo', cursive", "'Cormorant', serif", "'Sarabun', sans-serif", "'Saira Condensed', sans-serif", "'Be Vietnam', sans-serif", "'Yeseva One', cursive", "'Lexend Peta', sans-serif", "'Alegreya Sans SC', sans-serif", "'IBM Plex Mono', monospace", "'Jura', sans-serif", "'Bevan', cursive", "'Lexend Exa', sans-serif", "'Sawarabi Gothic', sans-serif", "'Cousine', monospace", "'Markazi Text', serif", "'VT323', monospace", "'Baloo Bhaina', cursive", "'Space Mono', monospace", "'Encode Sans', sans-serif", "'Encode Sans Semi Expanded', sans-serif", "'Arima Madurai', cursive", "'Lexend Deca', sans-serif", "'Lexend Tera', sans-serif", "'Lexend Giga', sans-serif", "'Lexend Zetta', sans-serif", "'Lexend Mega', sans-serif", "'Arsenal', sans-serif", "'Itim', cursive", "'Noto Serif SC', serif", "'Pangolin', cursive", "'Lemonada', cursive", "'Encode Sans Condensed', sans-serif", "'Bai Jamjuree', sans-serif", "'Alegreya SC', serif", "'Noto Serif TC', serif", "'Judson', serif", "'Livvic', sans-serif", "'Krub', sans-serif", "'Trirong', serif", "'Niramit', sans-serif", "'Bungee Inline', cursive", "'Mali', cursive", "'Pattaya', sans-serif", "'Rosario', sans-serif", "'Bungee', cursive", "'Sriracha', cursive", "'Metrophobic', sans-serif", "'Faustina', serif", "'Darker Grotesque', sans-serif", "'Encode Sans Expanded', sans-serif", "'Chakra Petch', sans-serif", "'IBM Plex Sans Condensed', sans-serif", "'Maitree', serif", "'Baloo Bhaijaan', cursive", "'Cormorant Infant', serif", "'Saira Stencil One', cursive", "'Chonburi', cursive", "'Barriecito', cursive", "'Bahianita', cursive", "'Athiti', sans-serif", "'Sedgwick Ave', cursive", "'Patrick Hand SC', cursive", "'Srisakdi', cursive", "'Cormorant SC', serif", "'Andika', sans-serif", "'Podkova', serif", "'Bungee Shade', cursive", "'Baloo Da', cursive", "'Spectral SC', serif", "'Baloo Thambi', cursive", "'Baloo Chettan', cursive", "'Cormorant Upright', serif", "'Encode Sans Semi Condensed', sans-serif", "'Charm', cursive", "'Baloo Paaji', cursive", "'K2D', sans-serif", "'Farsan', cursive", "'David Libre', serif", "'Coiny', cursive", "'Baloo Tamma', cursive", "'Manuale', serif", "'Thasadith', sans-serif", "'Vollkorn SC', serif", "'Bungee Hairline', cursive", "'Kodchasan', sans-serif", "'Hepta Slab', serif", "'Cormorant Unicase', serif", "'Crimson Pro', serif", "'Grenze', serif", "'Charmonman', cursive", "'Baloo Tammudu', cursive", "'KoHo', sans-serif", "'Major Mono Display', monospace", "'Fahkwang', sans-serif", "'Bungee Outline', cursive", "'Sedgwick Ave Display', cursive"];
exports.FONT_FACES = FONT_FACES;
var FONT_ITEMS = FONT_FACES.map(function (fontFamily) {
  var fontName = fontFamily.match(/\'([^\']+)\'/)[1];
  return {
    text: fontName,
    value: fontFamily,
    extendStyle: {
      fontFamily: fontFamily
    }
  };
}, {});
exports.FONT_ITEMS = FONT_ITEMS;
var FONT_FACES_BY_NAME = FONT_ITEMS.reduce(function (ac, cr) {
  ac[cr.text] = cr.value;
  return ac;
}, {});
exports.FONT_FACES_BY_NAME = FONT_FACES_BY_NAME;

/***/ }),

/***/ 29465:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.GOOGLE_MATERIAL_ICON_NAMES = void 0;
var GOOGLE_MATERIAL_ICON_NAMES = ["backup", "3d_rotation", "accessibility", "accessibility_new", "accessible", "accessible_forward", "account_balance", "account_balance_wallet", "account_box", "account_circle", "add_shopping_cart", "alarm", "alarm_add", "alarm_off", "alarm_on", "all_inbox", "all_out", "android", "announcement", "arrow_right_alt", "aspect_ratio", "assessment", "assignment", "assignment_ind", "assignment_late", "assignment_return", "assignment_returned", "assignment_turned_in", "autorenew", "backup", "book", "bookmark", "bookmark_border", "bookmarks", "bug_report", "build", "cached", "calendar_today", "calendar_view_day", "camera_enhance", "cancel_schedule_send", "card_giftcard", "card_membership", "card_travel", "change_history", "check_circle", "check_circle_outline", "chrome_reader_mode", "class", "code", "commute", "compare_arrows", "contact_support", "contactless", "copyright", "credit_card", "dashboard", "date_range", "delete", "delete_forever", "delete_outline", "description", "dns", "done", "done_all", "done_outline", "donut_large", "donut_small", "drag_indicator", "eco", "eject", "euro_symbol", "event", "event_seat", "exit_to_app", "explore", "explore_off", "extension", "face", "favorite", "favorite_border", "feedback", "find_in_page", "find_replace", "fingerprint", "flight_land", "flight_takeoff", "flip_to_back", "flip_to_front", "g_translate", "gavel", "get_app", "gif", "grade", "group_work", "help", "help_outline", "highlight_off", "history", "home", "horizontal_split", "hourglass_empty", "hourglass_full", "http", "https", "important_devices", "info", "input", "invert_colors", "label", "label_important", "label_off", "language", "launch", "line_style", "line_weight", "list", "lock", "lock_open", "loyalty", "markunread_mailbox", "maximize", "minimize", "motorcycle", "note_add", "offline_bolt", "offline_pin", "opacity", "open_in_browser", "open_in_new", "open_with", "pageview", "pan_tool", "payment", "perm_camera_mic", "perm_contact_calendar", "perm_data_setting", "perm_device_information", "perm_identity", "perm_media", "perm_phone_msg", "perm_scan_wifi", "pets", "picture_in_picture", "picture_in_picture_alt", "play_for_work", "polymer", "power_settings_new", "pregnant_woman", "print", "query_builder", "question_answer", "receipt", "record_voice_over", "redeem", "remove_shopping_cart", "reorder", "report_problem", "restore", "restore_from_trash", "restore_page", "room", "rounded_corner", "rowing", "schedule", "search", "settings_applications", "settings_backup_restore", "settings_bluetooth", "settings_brightness", "settings_cell", "settings_ethernet", "settings_input_antenna", "settings_input_component", "settings_input_composite", "settings_input_hdmi", "settings_input_svideo", "settings_overscan", "settings_phone", "settings_power", "settings_remote", "settings_voice", "shop", "shop_two", "shopping_basket", "shopping_cart", "speaker_notes", "speaker_notes_off", "spellcheck", "stars", "store", "subject", "supervised_user_circle", "supervisor_account", "swap_horiz", "swap_horizontal_circle", "swap_vert", "swap_vertical_circle", "sync_alt", "system_update_alt", "tab", "tab_unselected", "text_rotate_up", "text_rotate_vertical", "text_rotation_angledown", "text_rotation_angleup", "text_rotation_down", "text_rotation_none", "theaters", "thumb_down", "thumb_up", "thumbs_up_down", "timeline", "toc", "today", "toll", "touch_app", "track_changes", "translate", "trending_down", "trending_flat", "trending_up", "turned_in", "turned_in_not", "update", "verified_user", "vertical_split", "view_agenda", "view_array", "view_carousel", "view_column", "view_day", "view_headline", "view_list", "view_module", "view_quilt", "view_stream", "view_week", "visibility", "visibility_off", "voice_over_off", "watch_later", "work", "work_off", "work_outline", "youtube_searched_for", "zoom_in", "zoom_out", "add_alert", "error", "error_outline", "notification_important", "warning", "4k", "add_to_queue", "airplay", "album", "art_track", "av_timer", "branding_watermark", "call_to_action", "closed_caption", "control_camera", "equalizer", "explicit", "fast_forward", "fast_rewind", "featured_play_list", "featured_video", "fiber_dvr", "fiber_manual_record", "fiber_new", "fiber_pin", "fiber_smart_record", "forward_10", "forward_30", "forward_5", "games", "hd", "hearing", "high_quality", "library_add", "library_books", "library_music", "loop", "mic", "mic_none", "mic_off", "missed_video_call", "movie", "music_video", "new_releases", "not_interested", "note", "pause", "pause_circle_filled", "pause_circle_outline", "play_arrow", "play_circle_filled", "play_circle_outline", "playlist_add", "playlist_add_check", "playlist_play", "queue", "queue_music", "queue_play_next", "radio", "recent_actors", "remove_from_queue", "repeat", "repeat_one", "replay", "replay_10", "replay_30", "replay_5", "shuffle", "skip_next", "skip_previous", "slow_motion_video", "snooze", "sort_by_alpha", "speed", "stop", "subscriptions", "subtitles", "surround_sound", "video_call", "video_label", "video_library", "videocam", "videocam_off", "volume_down", "volume_mute", "volume_off", "volume_up", "web", "web_asset", "business", "call", "call_end", "call_made", "call_merge", "call_missed", "call_missed_outgoing", "call_received", "call_split", "cancel_presentation", "chat", "chat_bubble", "chat_bubble_outline", "clear_all", "comment", "contact_mail", "contact_phone", "contacts", "desktop_access_disabled", "dialer_sip", "dialpad", "domain_disabled", "duo", "email", "forum", "import_contacts", "import_export", "invert_colors_off", "list_alt", "live_help", "mail_outline", "message", "mobile_screen_share", "no_sim", "pause_presentation", "person_add_disabled", "phone", "phone_disabled", "phone_enabled", "phonelink_erase", "phonelink_lock", "phonelink_ring", "phonelink_setup", "portable_wifi_off", "present_to_all", "print_disabled", "ring_volume", "rss_feed", "screen_share", "sentiment_satisfied_alt", "speaker_phone", "stay_current_landscape", "stay_current_portrait", "stay_primary_landscape", "stay_primary_portrait", "stop_screen_share", "swap_calls", "textsms", "unsubscribe", "voicemail", "vpn_key", "add", "add_box", "add_circle", "add_circle_outline", "amp_stories", "archive", "backspace", "ballot", "block", "clear", "create", "delete_sweep", "drafts", "dynamic_feed", "file_copy", "filter_list", "flag", "font_download", "forward", "gesture", "how_to_reg", "how_to_vote", "inbox", "link", "link_off", "low_priority", "mail", "markunread", "move_to_inbox", "next_week", "outlined_flag", "policy", "redo", "remove", "remove_circle", "remove_circle_outline", "reply", "reply_all", "report", "report_off", "save", "save_alt", "select_all", "send", "sort", "square_foot", "text_format", "unarchive", "undo", "waves", "where_to_vote", "access_alarm", "access_alarms", "access_time", "add_alarm", "add_to_home_screen", "airplanemode_active", "airplanemode_inactive", "battery_alert", "battery_charging_full", "battery_full", "battery_std", "battery_unknown", "bluetooth", "bluetooth_connected", "bluetooth_disabled", "bluetooth_searching", "brightness_auto", "brightness_high", "brightness_low", "brightness_medium", "data_usage", "developer_mode", "devices", "dvr", "gps_fixed", "gps_not_fixed", "gps_off", "graphic_eq", "location_disabled", "location_searching", "mobile_friendly", "mobile_off", "nfc", "screen_lock_landscape", "screen_lock_portrait", "screen_lock_rotation", "screen_rotation", "sd_storage", "settings_system_daydream", "signal_cellular_4_bar", "signal_cellular_alt", "signal_cellular_connected_no_internet_4_bar", "signal_cellular_no_sim", "signal_cellular_null", "signal_cellular_off", "signal_wifi_4_bar", "signal_wifi_4_bar_lock", "signal_wifi_off", "storage", "usb", "wallpaper", "widgets", "wifi_lock", "wifi_tethering", "add_comment", "attach_file", "attach_money", "bar_chart", "border_all", "border_bottom", "border_clear", "border_horizontal", "border_inner", "border_left", "border_outer", "border_right", "border_style", "border_top", "border_vertical", "bubble_chart", "drag_handle", "format_align_center", "format_align_justify", "format_align_left", "format_align_right", "format_bold", "format_clear", "format_color_reset", "format_indent_decrease", "format_indent_increase", "format_italic", "format_line_spacing", "format_list_bulleted", "format_list_numbered", "format_list_numbered_rtl", "format_paint", "format_quote", "format_shapes", "format_size", "format_strikethrough", "format_textdirection_l_to_r", "format_textdirection_r_to_l", "format_underlined", "functions", "height", "highlight", "insert_chart", "insert_chart_outlined", "insert_comment", "insert_drive_file", "insert_emoticon", "insert_invitation", "insert_link", "insert_photo", "linear_scale", "merge_type", "mode_comment", "monetization_on", "money_off", "multiline_chart", "notes", "pie_chart", "post_add", "publish", "scatter_plot", "score", "short_text", "show_chart", "space_bar", "strikethrough_s", "table_chart", "text_fields", "title", "vertical_align_bottom", "vertical_align_center", "vertical_align_top", "wrap_text", "attachment", "cloud", "cloud_circle", "cloud_done", "cloud_download", "cloud_off", "cloud_queue", "cloud_upload", "create_new_folder", "folder", "folder_open", "folder_shared", "cast", "cast_connected", "computer", "desktop_mac", "desktop_windows", "developer_board", "device_hub", "device_unknown", "devices_other", "dock", "gamepad", "headset", "headset_mic", "keyboard", "keyboard_arrow_down", "keyboard_arrow_left", "keyboard_arrow_right", "keyboard_arrow_up", "keyboard_backspace", "keyboard_capslock", "keyboard_hide", "keyboard_return", "keyboard_tab", "keyboard_voice", "laptop", "laptop_chromebook", "laptop_mac", "laptop_windows", "memory", "mouse", "phone_android", "phone_iphone", "phonelink", "phonelink_off", "power_input", "router", "scanner", "security", "sim_card", "smartphone", "speaker", "speaker_group", "tablet", "tablet_android", "tablet_mac", "toys", "tv", "videogame_asset", "watch", "add_a_photo", "add_photo_alternate", "add_to_photos", "adjust", "assistant", "assistant_photo", "audiotrack", "blur_circular", "blur_linear", "blur_off", "blur_on", "brightness_1", "brightness_2", "brightness_3", "brightness_4", "brightness_5", "brightness_6", "brightness_7", "broken_image", "brush", "burst_mode", "camera", "camera_alt", "camera_front", "camera_rear", "camera_roll", "center_focus_strong", "center_focus_weak", "collections", "collections_bookmark", "color_lens", "colorize", "compare", "control_point", "control_point_duplicate", "crop", "crop_16_9", "crop_3_2", "crop_5_4", "crop_7_5", "crop_din", "crop_free", "crop_landscape", "crop_original", "crop_portrait", "crop_rotate", "crop_square", "dehaze", "details", "edit", "euro", "exposure", "exposure_neg_1", "exposure_neg_2", "exposure_plus_1", "exposure_plus_2", "exposure_zero", "filter", "filter_1", "filter_2", "filter_3", "filter_4", "filter_5", "filter_6", "filter_7", "filter_8", "filter_9", "filter_9_plus", "filter_b_and_w", "filter_center_focus", "filter_drama", "filter_frames", "filter_hdr", "filter_none", "filter_tilt_shift", "filter_vintage", "flare", "flash_auto", "flash_off", "flash_on", "flip", "flip_camera_android", "flip_camera_ios", "gradient", "grain", "grid_off", "grid_on", "hdr_off", "hdr_on", "hdr_strong", "hdr_weak", "healing", "image", "image_aspect_ratio", "image_search", "iso", "landscape", "leak_add", "leak_remove", "lens", "linked_camera", "looks", "looks_3", "looks_4", "looks_5", "looks_6", "looks_one", "looks_two", "loupe", "monochrome_photos", "movie_creation", "movie_filter", "music_note", "music_off", "nature", "nature_people", "navigate_before", "navigate_next", "palette", "panorama", "panorama_fish_eye", "panorama_horizontal", "panorama_vertical", "panorama_wide_angle", "photo", "photo_album", "photo_camera", "photo_filter", "photo_library", "photo_size_select_actual", "photo_size_select_large", "photo_size_select_small", "picture_as_pdf", "portrait", "remove_red_eye", "rotate_90_degrees_ccw", "rotate_left", "rotate_right", "shutter_speed", "slideshow", "straighten", "style", "switch_camera", "switch_video", "tag_faces", "texture", "timelapse", "timer", "timer_10", "timer_3", "timer_off", "tonality", "transform", "tune", "view_comfy", "view_compact", "vignette", "wb_auto", "wb_cloudy", "wb_incandescent", "wb_iridescent", "wb_sunny", "360", "atm", "beenhere", "category", "compass_calibration", "departure_board", "directions", "directions_bike", "directions_boat", "directions_bus", "directions_car", "directions_railway", "directions_run", "directions_subway", "directions_transit", "directions_walk", "edit_attributes", "ev_station", "fastfood", "flight", "hotel", "layers", "layers_clear", "local_activity", "local_airport", "local_atm", "local_bar", "local_cafe", "local_car_wash", "local_convenience_store", "local_dining", "local_drink", "local_florist", "local_gas_station", "local_grocery_store", "local_hospital", "local_hotel", "local_laundry_service", "local_library", "local_mall", "local_movies", "local_offer", "local_parking", "local_pharmacy", "local_phone", "local_pizza", "local_play", "local_post_office", "local_printshop", "local_see", "local_shipping", "local_taxi", "map", "menu_book", "money", "museum", "my_location", "navigation", "near_me", "person_pin", "rate_review", "restaurant", "restaurant_menu", "satellite", "store_mall_directory", "streetview", "subway", "terrain", "traffic", "train", "tram", "transfer_within_a_station", "transit_enterexit", "trip_origin", "zoom_out_map", "apps", "arrow_back", "arrow_back_ios", "arrow_downward", "arrow_drop_down", "arrow_drop_down_circle", "arrow_drop_up", "arrow_forward", "arrow_forward_ios", "arrow_left", "arrow_right", "arrow_upward", "cancel", "check", "chevron_left", "chevron_right", "close", "double_arrow", "expand_less", "expand_more", "first_page", "fullscreen", "fullscreen_exit", "home_work", "last_page", "menu", "menu_open", "more_horiz", "more_vert", "refresh", "subdirectory_arrow_left", "subdirectory_arrow_right", "unfold_less", "unfold_more", "account_tree", "adb", "airline_seat_flat", "airline_seat_flat_angled", "airline_seat_individual_suite", "airline_seat_legroom_extra", "airline_seat_legroom_normal", "airline_seat_legroom_reduced", "airline_seat_recline_extra", "airline_seat_recline_normal", "bluetooth_audio", "confirmation_number", "disc_full", "drive_eta", "enhanced_encryption", "event_available", "event_busy", "event_note", "folder_special", "live_tv", "mms", "more", "network_check", "network_locked", "no_encryption", "ondemand_video", "personal_video", "phone_bluetooth_speaker", "phone_callback", "phone_forwarded", "phone_in_talk", "phone_locked", "phone_missed", "phone_paused", "power", "power_off", "priority_high", "sd_card", "sms", "sms_failed", "sync", "sync_disabled", "sync_problem", "system_update", "tap_and_play", "time_to_leave", "tv_off", "vibration", "voice_chat", "vpn_lock", "wc", "wifi", "wifi_off", "ac_unit", "airport_shuttle", "all_inclusive", "apartment", "bathtub", "beach_access", "business_center", "casino", "child_care", "child_friendly", "fitness_center", "free_breakfast", "golf_course", "hot_tub", "house", "kitchen", "meeting_room", "no_meeting_room", "pool", "room_service", "rv_hookup", "smoke_free", "smoking_rooms", "spa", "storefront", "cake", "deck", "emoji_emotions", "emoji_events", "emoji_flags", "emoji_food_beverage", "emoji_nature", "emoji_objects", "emoji_people", "emoji_symbols", "emoji_transportation", "fireplace", "group", "group_add", "king_bed", "location_city", "mood", "mood_bad", "nights_stay", "notifications", "notifications_active", "notifications_none", "notifications_off", "notifications_paused", "outdoor_grill", "pages", "party_mode", "people", "people_alt", "people_outline", "person", "person_add", "person_outline", "plus_one", "poll", "public", "school", "sentiment_dissatisfied", "sentiment_satisfied", "sentiment_very_dissatisfied", "sentiment_very_satisfied", "share", "single_bed", "sports", "sports_baseball", "sports_basketball", "sports_cricket", "sports_esports", "sports_football", "sports_golf", "sports_handball", "sports_hockey", "sports_kabaddi", "sports_mma", "sports_motorsports", "sports_rugby", "sports_soccer", "sports_tennis", "sports_volleyball", "thumb_down_alt", "thumb_up_alt", "whatshot", "check_box", "check_box_outline_blank", "indeterminate_check_box", "radio_button_checked", "radio_button_unchecked", "star", "star_border", "star_half", "toggle_off", "toggle_on"];
exports.GOOGLE_MATERIAL_ICON_NAMES = GOOGLE_MATERIAL_ICON_NAMES;

/***/ }),

/***/ 73037:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getMaterialDesignIconNames = getMaterialDesignIconNames;
exports.getMaterialDesignLinkElt = getMaterialDesignLinkElt;
var _XHR = _interopRequireDefault(__webpack_require__(53710));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var loadFontPromise = null;
function getMaterialDesignIconNames() {
  if (!loadFontPromise) loadFontPromise = _Dom["default"].documentReady.then(function () {
    var href = 'https://absol.cf/vendor/materialdesignicons/materialdesignicons.css';
    return _XHR["default"].getRequest(href, 'text').then(function (text) {
      var regex = /\.mdi-([^:]+)::before/g;
      var iconNames = [];
      var iconNameMatch;
      do {
        iconNameMatch = regex.exec(text);
        if (iconNameMatch) iconNames.push(iconNameMatch[1]);
      } while (iconNameMatch);
      return {
        iconNames: iconNames
      };
    });
  });
  return loadFontPromise.then(function (data) {
    return data.iconNames;
  });
}
function getMaterialDesignLinkElt() {
  var linkElts = document.getElementsByTagName('link');
  var linkElt;
  for (var i = 0; i < linkElts.length; ++i) {
    linkElt = linkElts[i];
    if (linkElt.href && linkElt.href.indexOf('materialdesignicons') >= 0) return linkElt;
  }
}

/***/ }),

/***/ 8982:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "CMDToolDelegate", ({
  enumerable: true,
  get: function get() {
    return _CMDTool.CMDToolDelegate;
  }
}));
exports.OldCMDToolDelegate = OldCMDToolDelegate;
exports["default"] = void 0;
var _CMDTool = _interopRequireWildcard(__webpack_require__(97847));
var _OOP = __webpack_require__(38608);
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @extends CMDTool
 * @constructor
 */
function FmCMDTool() {
  _CMDTool["default"].apply(this, arguments);
}
(0, _OOP.mixClass)(FmCMDTool, _CMDTool["default"]);
FmCMDTool.prototype.bindWithEditor = function (editor) {
  if (!this._oldDelegate) {
    this._oldDelegate = new OldCMDToolDelegate();
  }
  this.delegate = this._oldDelegate;
  this._oldDelegate.bindWithEditor(editor);
};
FmCMDTool.prototype.ev_cmdKeyDown = function (event) {
  if (this._delegate && this._delegate.ev_cmdKeyDown)
    //adapt old version
    this._delegate.ev_cmdKeyDown(event); //repeat event
};
var _default = FmCMDTool;
/**
 * @extends CMDToolDelegate
 * @constructor
 */
exports["default"] = _default;
function OldCMDToolDelegate() {
  _CMDTool.CMDToolDelegate.call(this);
  this.editor = null;
  this.refresh = this.refresh.bind(this);
  this.updateVisibility = this.updateVisibility.bind(this);
}
(0, _OOP.mixClass)(OldCMDToolDelegate, _CMDTool.CMDToolDelegate);
OldCMDToolDelegate.prototype.bindWithEditor = function (editor) {
  if (this.editor) {
    this.editor.off('cmddescriptorschange', this.updateVisibility);
    this.editor.off('cmdchange', this.refresh);
  }
  this.editor = editor;
  if (this.editor) {
    this.editor.on('cmdchange', this.refresh);
    this.editor.on("cmddescriptorschange", this.updateVisibility);
  }
  this.refresh();
};
OldCMDToolDelegate.prototype.getCmdDescriptor = function (name) {
  return _CmdDescriptors["default"][name] || _CMDTool.CMDToolDelegate.prototype.getCmdDescriptor.apply(this, arguments);
};
OldCMDToolDelegate.prototype.execCmd = function (name) {
  var _this$editor$cmdRunne;
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }
  return (_this$editor$cmdRunne = this.editor.cmdRunner).invoke.apply(_this$editor$cmdRunne, [name].concat(args));
};
OldCMDToolDelegate.prototype.getCmdGroupTree = function () {
  return this.editor.getCmdGroupTree();
};
OldCMDToolDelegate.prototype.getCmdDescriptor = function (name) {
  if (this.editor && this.editor.getCmdDescriptor) return this.editor.getCmdDescriptor(name);
  return _CMDTool.CMDToolDelegate.prototype.getCmdDescriptor.apply(this, arguments);
};

/***/ }),

/***/ 44241:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.FMExploreDelegate = FMExploreDelegate;
exports["default"] = void 0;
var _EventEmitter = _interopRequireWildcard(__webpack_require__(46833));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
__webpack_require__(67243);
var _PluginManager = _interopRequireDefault(__webpack_require__(19617));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _CMDTool = _interopRequireDefault(__webpack_require__(8982));
var _CMDRunner = _interopRequireDefault(__webpack_require__(34470));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _search = _interopRequireWildcard(__webpack_require__(67858));
var _stringUtils = __webpack_require__(26243);
var _stringGenerate = __webpack_require__(10713);
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _FExplorer = _interopRequireDefault(__webpack_require__(78377));
var _ExpTree = __webpack_require__(87326);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _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); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _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; }
/***
 * @augments FExplorer
 * @augments EventEmitter
 * @constructor
 */
function ProjectExplorer() {
  _EventEmitter["default"].call(this);
  _FExplorer["default"].call(this);
  this.pluginContext = new _Context["default"]();
  Object.assign(this.pluginContext, {
    isV2: localStorage.getItem("Fv2"),
    self: this,
    _: _FCore._,
    $: _FCore.$
  });
  this.pluginContext.attach(this);

  /**
   *
   * @type {null|FMExploreDelegate}
   * @private
   */
  this._delegate = null;
  this.commands = this.commands.map(function (it) {
    return Object.assign({}, it);
  });
  this.commandByName = this.commands.reduce(function (ac, it) {
    ac[it.name] = it;
    return ac;
  }, {});
  this.cmdTool = new _CMDTool["default"]();
  this.data = {
    projectName: null
  };
  this.cmdRunner = new _CMDRunner["default"](this, this.commands.reduce(function (ac, cmd) {
    ac[cmd.name] = cmd.exec;
    return ac;
  }, {}));
  this.cmdTool.bindWithEditor(this);
}
_OOP["default"].mixClass(ProjectExplorer, _EventEmitter["default"], _FExplorer["default"]);
ProjectExplorer.prototype.windowTitle = "Explorer";
ProjectExplorer.prototype.onStart = function () {
  _PluginManager["default"].exec(this, _R["default"].PLUGINS.PROJECT_EXPLORER, this.pluginContext);
  if (this.pluginContext.delegate) {
    this.delegate = this.pluginContext.delegate;
  }
  this.cmdTool.start(true);
};
ProjectExplorer.prototype.onResume = function () {
  this.cmdTool.resume();
};
ProjectExplorer.prototype.createView = function () {
  var self = this;
  this.$view = (0, _FCore._)({
    "class": 'as-form-explorer',
    style: {
      height: '100%'
    },
    child: [this.cmdTool.getView(), _Searcher["default"], {
      "class": 'as-form-explorer-body',
      style: {
        position: 'absolute',
        left: 0,
        top: '80px',
        right: 0,
        height: 'calc(100% - 80px)',
        overflowY: 'auto'
      }
      // child: {
      //     tag: ExpTree.tag,
      //     props: {
      //         name: this.data.projectName || 'NONE',
      //         status: 'open',
      //         icon: 'span.mdi.mdi-folder-star-multiple-outline'
      //     }
      // }
    }]
  });

  this.$searchInput = (0, _FCore.$)(_Searcher["default"].tag, this.$view);
  this.$body = (0, _FCore.$)('.as-form-explorer-body', this.$view);
  this.$body.name = "NoName";

  // this.$droppanel = $('exptree', this.$view);
  /** before new feature release, I cheated here */
  this.searcher = new _ExpTree.ExpSearcher(this.$body, {
    inputElt: this.$searchInput
  });
  this.$cmdCtn = (0, _FCore._)('.absol-drop-panel-head-cmd-button-container');
  this.$reloadCmdBtn = (0, _FCore._)({
    tag: 'button',
    child: 'span.mdi.mdi-reload',
    on: {
      click: this.redrawExpTree.bind(this)
    }
  }).addTo(this.$cmdCtn);
  setTimeout(this.redrawExpTree.bind(this), 100);
};
ProjectExplorer.prototype.openProject = function (value) {
  if (typeof value == 'string') this.data = {
    projectName: value || "Unknown"
  };else {
    this.data = value || {};
  }
  if (this.$window) {
    this.windowTitle = this.data.projectName;
    this.$window.windowTitle = this.windowTitle;
    this.redrawExpTree();
  }
};
ProjectExplorer.prototype.getExploreTree = function () {
  return this._delegate.getTreeData();
};
ProjectExplorer.prototype.loadExpTree = function () {
  if (!this._delegate && this.pluginContext.loadExpTree) {
    this.pluginContext.loadExpTree();
    return;
  }
};
ProjectExplorer.prototype.openItem = function (type, ident, name, contentArguments, desc) {
  var formEditor = this.getContext(_R["default"].FORM_EDITOR);
  if (formEditor) {
    formEditor.openItem(type, ident, name, contentArguments, desc);
  }
};

/***Cmd***/
ProjectExplorer.prototype.commands = [{
  name: 'new',
  icon: 'span.mdi.mdi-file-plus-outline',
  desc: 'New',
  /***
   * @this {ProjectExplorer}
   */
  exec: function exec() {
    // console.log(this)
  }
}, {
  name: 'reload',
  icon: 'span.mdi.mdi-reload',
  desc: 'Reload',
  /***
   * @this {ProjectExplorer}
   */
  exec: function exec() {
    var _this = this;
    var sync = this.redrawExpTree();
    Promise.resolve(sync).then(function () {
      _this.searcher.query(_this.$searchInput.value);
    });
  }
}];
ProjectExplorer.prototype.getCmdGroupTree = function () {
  return this.commands.map(function (it) {
    return it.name;
  });
};
ProjectExplorer.prototype.getCmdDescriptor = function (name) {
  return Object.assign({
    type: 'trigger'
  }, this.commandByName[name]);
};
ProjectExplorer.prototype.onTreeAction = function (treeData, action, nodeElt) {
  var _this2 = this;
  var ac;
  switch (action.cmd) {
    case 'open':
      this.openItem.apply(this, _toConsumableArray(treeData.openArgs));
      break;
    case 'rename':
      /**
       * @type {Context}
       */
      ac = Object.assign(new _Context["default"](), treeData);
      ac.attach(this);
      ac.nodeElt = nodeElt;
      nodeElt.getNode().rename(function (newName) {
        ac.newName = newName;
        if (_this2._delegate) return _this2._delegate.onUserRenameCompleted(ac);
        return true;
      });
      break;
    default:
      if (this._delegate) this._delegate.onTreeAction(treeData, action, nodeElt);
  }
};
ProjectExplorer.prototype.getActionContextMenuProps = function (treeData) {
  if (!this._delegate) return {
    items: [{
      icon: 'span.mdi.mdi-folder-open',
      text: 'Open',
      cmd: 'open'
    }]
  };
  return this._delegate.getActionContextMenuProps(treeData);
};

/***
 * @param {{type: string,name: string, icon: string, exec: function}} commandDesc
 * @param {string=} bf before
 */
ProjectExplorer.prototype.addCommand = function (commandDesc, bf) {
  var idx = this.commands.findIndex(function (it) {
    return it.name === commandDesc.name;
  });
  if (idx >= 0) {
    Object.assign(this.commands[idx], commandDesc);
  } else {
    if (bf) {
      idx = this.commands.findIndex(function (it) {
        return it.name === bf;
      });
      if (idx < 0) this.commands.push(commandDesc);else {
        this.commands.splice(idx, 0, commandDesc);
      }
    } else {
      if (idx < 0) this.commands.push(commandDesc);
    }
    this.commandByName[commandDesc.name] = commandDesc;
  }
  this.cmdRunner.add(commandDesc.name, commandDesc.exec);
  return this;
};
ProjectExplorer.prototype.execCmd = function () {
  this.cmdRunner.invoke.apply(this.cmdRunner, arguments);
};

/**
 *
 * @param any
 * @returns {ExpTree}
 */
ProjectExplorer.prototype.nodeEltOf = function (any) {};
ProjectExplorer.prototype.userRenameNode = function (any, ac) {
  var _this3 = this;
  var nodeElt = this.nodeEltOf(any);
  if (!nodeElt) return;
  /**
   * @type {Context}
   */
  ac = Object.assign(new _Context["default"](), ac);
  ac.nodeElt = nodeElt;
  nodeElt.getNode().rename(function (newName) {
    ac.newName = newName;
    if (_this3._delegate) _this3._delegate.onUserRenameCompleted(ac);
  });
};
ProjectExplorer.prototype.removeNode = function (any) {
  var nodeElt = this.nodeEltOf(any);
  if (!nodeElt) return;
  if (nodeElt) {
    nodeElt.selfRemove();
    this.searcher.cache = {};
    this.searcher.query(this.$searchInput.value);
  }
};
Object.defineProperty(ProjectExplorer.prototype, 'delegate', {
  set: function set(delegate) {
    if (this._delegate) this._delegate.explorePartner = null;
    this._delegate = delegate || null;
    if (this._delegate) {
      this._delegate.explorePartner = this;
      this._delegate.attach(this);
    }
  },
  get: function get() {
    return this._delegate;
  }
});
var _default = ProjectExplorer;
/**
 * @extends Context
 * @constructor
 */
exports["default"] = _default;
function FMExploreDelegate() {
  _Context["default"].call(this);
  /**
   *
   * @type {null|ProjectExplorer}
   */
  this.explorePartner = null;
}
_OOP["default"].mixClass(FMExploreDelegate, _Context["default"]);
FMExploreDelegate.prototype.redrawExpTree = function () {
  if (this.explorePartner) this.explorePartner.redrawExpTree();
};
FMExploreDelegate.prototype.getTreeData = function () {
  return [];
};
FMExploreDelegate.prototype.onClickNode = function () {};
FMExploreDelegate.prototype.removeNode = function (any) {
  if (!this.explorePartner) return;
  this.explorePartner.removeNode(any);
};
FMExploreDelegate.prototype.renameNode = function (any) {};
FMExploreDelegate.prototype.onTreeAction = function (treeData, action, nodeElt) {};
FMExploreDelegate.prototype.getActionContextMenuProps = function (treeData) {
  return {
    items: [{
      icon: 'span.mdi.mdi-folder-open',
      text: 'Open',
      cmd: 'open'
    }]
  };
};

/**
 *
 * @param any
 * @param {Context|{}} ac
 * @param ac
 */
FMExploreDelegate.prototype.userRenameNode = function (any, ac) {
  if (!this.explorePartner) return;
  this.explorePartner.userRenameNode(any, ac);
};
FMExploreDelegate.prototype.onUserRenameCompleted = function (ac) {};
FMExploreDelegate.prototype.openItem = function () {
  var _this$explorePartner;
  (_this$explorePartner = this.explorePartner).openItem.apply(_this$explorePartner, arguments);
};

/***/ }),

/***/ 38267:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FDataModel = _interopRequireDefault(__webpack_require__(51251));
var _LoadingCubeModal = _interopRequireDefault(__webpack_require__(95521));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends FDataModel
 * @constructor
 */
function BlocklyDataModel() {
  _FDataModel["default"].apply(this, arguments);
  this.runningTasks = [];
  this.cache = {};
  this.callTask = window.callTask || this.callTask;
  this.typeDescriptorsCache = null;
}
BlocklyDataModel.prototype.callTask = function (callee, args) {
  //for test only
  var txt = "return ".concat(callee, "(").concat(args.map(function (arg) {
    return absol.generateJSVariable(arg);
  }).join(', '), ")");
  return new Function(txt)();
};
BlocklyDataModel.prototype.getPackageTreeList = function () {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.getPackageTreeList', []).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.getExploreTree = function () {};
BlocklyDataModel.prototype.loadNodeById = function (id) {
  var task = this.newTask();
  return this.callTask('data_module.loadSCLangNodeById', [id]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.saveNewPackage = function (name, description) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.saveNewPackage', [name, description]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.saveNewSystemPackage = function (name, description) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.saveNewSystemPackage', [name, description]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.saveNewSubpackage = function (parentId, name, description) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.saveNewSubpackage', [parentId, name, description]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.saveNewSystemSubpackage = function (parentId, name, description) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.saveNewSystemSubpackage', [parentId, name, description]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.deletePackage = function (id) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.deletePackage', [id]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.deleteSystemPackage = function (id) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.deleteSystemPackage', [id]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.deletePackageList = function (idList) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.deletePackageList', [idList]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.deleteSystemPackageList = function (idList) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.deleteSystemPackageList', [idList]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.saveNewNode = function (packageId, type, name, description) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.saveNewNode', [packageId, type, name, description]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.saveNewSystemNode = function (packageId, type, name, description) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.saveNewSystemNode', [packageId, type, name, description]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.deleteNode = function (id) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.deleteNode', [id]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.deleteSystemNode = function (id) {
  var task = this.newTask();
  this.cache = {};
  return this.callTask('hr.sclang.deleteNodeSystem', [id]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.getTypeDescriptors = function () {
  var _this = this;
  var task;
  if (!this.typeDescriptorsCache) {
    task = this.newTask();
    this.typeDescriptorsCache = this.callTask('contentModule.getTypeList', []).then(function (typeList) {
      var sync = typeList.map(function (id) {
        return _this.callTask('contentModule.getTypeDescriptor', [id]);
      });
      return Promise.all(sync).then(function (descriptorList) {
        return typeList.reduce(function (ac, cr, i) {
          ac[cr] = descriptorList[i];
          return ac;
        }, {});
      });
    }).then(function (result) {
      task.finish();
      return result;
    });
  }
  return this.typeDescriptorsCache;
};
BlocklyDataModel.prototype.updateNode = function (id, modifiedData) {
  var task = this.newTask();
  return this.callTask('hr.sclang.updateNode', [id, modifiedData]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.updateSystemNode = function (id, modifiedData) {
  var task = this.newTask();
  return this.callTask('hr.sclang.updateSystemNode', [id, modifiedData]).then(function (result) {
    task.finish();
    return result;
  });
};
BlocklyDataModel.prototype.newTask = function () {
  var _this2 = this;
  var task = {};
  task.finish = function () {
    var idx = _this2.runningTasks.indexOf(task);
    if (idx < 0) return;
    _this2.runningTasks.splice(idx, 1);
    if (_this2.runningTasks.length === 0) {
      if (window.ModalElement && window.ModalElement.close) {
        window.ModalElement.close();
      } else {
        _LoadingCubeModal["default"].close(_this2._loadingToken);
      }
    }
  };
  if (this.runningTasks.length === 0) {
    if (window.ModalElement && window.ModalElement.show_loading) {
      window.ModalElement.show_loading();
    } else {
      this._loadingToken = _LoadingCubeModal["default"].show();
    }
  }
  this.runningTasks.push(task);
  return task;
};
var _default = BlocklyDataModel;
exports["default"] = _default;

/***/ }),

/***/ 90360:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _FCore = __webpack_require__(51518);
var _R = _interopRequireDefault(__webpack_require__(25280));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends Fragment
 * @constructor
 */
function BlocklyStartExploringFragment() {
  _Fragment["default"].apply(this, arguments);
}
_OOP["default"].mixClass(BlocklyStartExploringFragment, _Fragment["default"]);
BlocklyStartExploringFragment.prototype.createView = function () {
  var _this = this;
  this.$view = (0, _FCore._)({
    "class": '',
    child: [{
      // tag:''
      style: {
        padding: '10px 5px'
      },
      child: {
        text: 'You have not open a package'
      }
    }, {
      style: {
        textAlign: 'center'
      },
      child: {
        tag: _FlexiconButton["default"].tag,
        props: {
          text: 'Open Package',
          icon: 'span.mdi.mdi-package-variant'
        },
        on: {
          click: function click() {
            _this.explorer.openPackageListDialog();
          }
        }
      }
    }, {
      // tag:''
      style: {
        padding: '10px 5px'
      },
      child: {
        text: 'Or'
      }
    }, {
      style: {
        textAlign: 'center'
      },
      child: {
        tag: _FlexiconButton["default"].tag,
        props: {
          text: 'New Package',
          icon: 'span.mdi.mdi-package-variant-plus'
        }
      },
      on: {
        click: function click() {
          _this.explorer.openNewPackageDialog();
        }
      }
    }]
  });
};
BlocklyStartExploringFragment.prototype.onAttached = function () {
  /***
   *
   * @type {BlocklyDataModel}
   */
  this.dataModel = this.getContext(_R["default"].DATA_MODEL);
  /***
   * @type {SCLauncher}
   */
  this.launcher = this.getContext(_R["default"].LAUNCHER);
  /***
   * @type {SCExplorer}
   */
  this.explorer = this.getContext(_R["default"].PROJECT_EXPLORER);
};
BlocklyStartExploringFragment.prototype.onStart = function () {
  var _this2 = this;
  this.dataModel.getPackageTreeList().then(function (list) {
    if (list.length === 0) {
      _this2.$view.childNodes[0].addStyle('display', 'none');
      _this2.$view.childNodes[1].addStyle('display', 'none');
      _this2.$view.childNodes[2].firstChild.data = "No package found!";
    } else {
      _this2.$view.childNodes[0].removeStyle('display');
      _this2.$view.childNodes[1].removeStyle('display');
    }
  });
};
var _default = BlocklyStartExploringFragment;
exports["default"] = _default;

/***/ }),

/***/ 85869:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EZEDataModel = _interopRequireDefault(__webpack_require__(35034));
var _OOP = __webpack_require__(38608);
var _XHR = _interopRequireDefault(__webpack_require__(53710));
var _base = __webpack_require__(6954);
var _MQTTExec = __webpack_require__(54707);
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends EZEDataModel
 * @constructor
 */
function EZMockDataModel() {
  _EZEDataModel["default"].apply(this, arguments);
  this.cache = {};
  window.MQTT = window.MQTT || window.mqtt;
  this.master = new _MQTTExec.MQTTExecMaster();
}
(0, _OOP.mixClass)(EZMockDataModel, _EZEDataModel["default"]);
EZMockDataModel.prototype.getFormMetas = function (formTask) {
  return this.master.invoke('getFormMetas', formTask);
};
EZMockDataModel.prototype.getTypeLists = function () {
  var t = localStorage.getItem("typeLists");
  if (t) {
    t = new (Function("return " + t))();
    this.typeListsSync = Promise.resolve(t);
  } else {
    this.typeListsSync = this.typeListsSync || this.master.invoke('getTypeLists').then(function (result) {
      var t = (0, _generator.generateJSVariable)(result);
      localStorage.setItem("typeLists", t);
      return result;
    });
  }
  return this.typeListsSync;
};
EZMockDataModel.prototype.loadForms = function (idList) {
  return this.master.invoke('loadForms', idList);
};
EZMockDataModel.prototype.saveForm = function (params) {
  return this.master.invoke('saveForm', params);
};
var _default = EZMockDataModel;
exports["default"] = _default;

/***/ }),

/***/ 24384:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.PluginBuildComponent = PluginBuildComponent;
exports.PluginComponentPickerView = PluginComponentPickerView;
exports.PluginLoadContentData = PluginLoadContentData;
exports.PluginProjectExplore = PluginProjectExplore;
exports.PluginSaveContentData = PluginSaveContentData;
exports.catWorkspace = catWorkspace;
exports.downloadFragmentData = downloadFragmentData;
exports.lsWorkspace = lsWorkspace;
exports.removeFile = removeFile;
exports.writeFile = writeFile;
exports.writeFileBase64 = writeFileBase64;
exports.writeFileBase64X = writeFileBase64X;
var _XHR = _interopRequireDefault(__webpack_require__(53710));
var _CodeEditor = _interopRequireDefault(__webpack_require__(36243));
var _base = __webpack_require__(6954);
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _ExpTree = _interopRequireDefault(__webpack_require__(87326));
var _FmFragment = __webpack_require__(9098);
var _Assembler = __webpack_require__(2326);
var _OnsScreenWindow = _interopRequireDefault(__webpack_require__(28217));
var _generator = __webpack_require__(18528);
var _random = __webpack_require__(88917);
var _TaskManager = _interopRequireDefault(__webpack_require__(95619));
var _ProjectExplorer = __webpack_require__(44241);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _stringFormat = __webpack_require__(22294);
var _EZUI = _interopRequireDefault(__webpack_require__(13605));
var _EBuilder = _interopRequireWildcard(__webpack_require__(55813));
var _KVEZUIComponentGenerator = __webpack_require__(49944);
var _Context = _interopRequireDefault(__webpack_require__(16311));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var JSZip = window.JSZip;
var WORKSPACE_FOLDER = 'formeditor/workspace';
var extIcons = {
  form: 'span.mdi.mdi-card-bulleted-outline',
  jpg: 'span.mdi.mdi-file-image-outline',
  js: 'span.mdi.mdi-nodejs',
  json: 'span.mdi.mdi-json',
  html: 'span.mdi.mdi-xml',
  css: 'span.mdi.mdi-language-css3',
  gitignore: 'span.mdi.mdi-git',
  license: 'span.mdi.mdi-license',
  md: 'span.mdi.mdi-markdown-outline',
  "*": 'span.mdi.mdi-file-document-outline',
  'ezui': {
    tag: 'span',
    "class": ['mdi', 'mdi-chip'],
    style: {
      color: '#2f00ff'
    }
  }
};
function openNewFormDialog() {
  var formSource = {
    layout: {
      tag: 'Container',
      layout: "grid",
      columns: 2,
      columGap: 10,
      rowGap: 10,
      paddingLeft: 10,
      paddingRight: 10,
      paddingTop: 10,
      paddingBottom: 10,
      alignItems: 'center',
      children: [{
        tag: 'Label',
        value: 'Framework'
      }, {
        tag: 'ComboBox',
        width: '100%',
        items: [{
          text: 'EZUI',
          value: 'ezui'
        }, {
          text: 'Form',
          value: 'form'
        }],
        name: 'framework'
      }, {
        tag: 'Label',
        value: 'Name'
      }, {
        tag: 'TextInput',
        width: '100%',
        name: 'name'
      }, {
        tag: 'Label',
        value: "Data type",
        union: 'framework',
        unionValues: ['ezui']
      }, {
        tag: 'ComboBox',
        name: 'typeId',
        width: '100%',
        union: 'framework',
        unionValues: ['ezui'],
        searchable: true,
        items: '= getAvailableDataTypes()'
      }, {
        tag: 'Label',
        value: "Layout",
        union: 'framework',
        unionValues: ['form']
      }, {
        tag: 'ComboBox',
        name: "layout",
        width: '100%',
        items: [{
          text: 'HyperLayout',
          value: 'HyperLayout'
        }, {
          text: 'RelativeLayout',
          value: 'RelativeLayout'
        }, {
          text: 'LinearLayout',
          value: 'LinearLayout'
        }, {
          text: 'ChainLayout',
          value: 'ChainLayout'
        }],
        union: 'framework',
        unionValues: ['form']
      }, {
        tag: 'Container',
        width: '100%',
        colSpan: 2,
        justifyItems: 'center',
        layout: 'grid',
        columns: 2,
        children: [{
          tag: 'Button',
          text: "OK",
          name: 'okBtn'
        }, {
          tag: 'Button',
          text: "Cancel",
          name: 'cancelBtn',
          onClick: "cancel();"
        }]
      }]
    },
    blocks: [{
      tag: "Function",
      name: "ok_function",
      body: "ok();"
    }],
    lines: [{
      u: 'okBtn',
      v: 'ok_function',
      uPin: 'signal',
      vPin: 'exec'
    }, {
      u: 'cancelBtn',
      v: 'cancel_function',
      uPin: 'signal',
      vPin: 'exec'
    }]
  };
  var resolve;
  var ok = function ok() {
    var framework = frag.props.framework;
    var name = frag.props.name;
    var layout = frag.props.layout;
    if (!name) return;
    var res = {
      framework: framework,
      name: name
    };
    if (framework === 'form') {
      if (!layout) return;
      res.layout = layout;
    } else {
      res.typeId = frag.props.typeId;
    }
    modal.remove();
    resolve(res);
  };
  var cancel = function cancel() {
    modal.remove();
    resolve(null);
  };
  var getAvailableDataTypes = function getAvailableDataTypes() {
    return _KVEZUIComponentGenerator.KVEZUIComponentGeneratorInstance.getAvailableDataTypeSelection();
  };
  var frag = _EZUI["default"].build(formSource, {
    context: {
      ok: ok,
      cancel: cancel,
      getAvailableDataTypes: getAvailableDataTypes
    }
  });

  /***
   * @type {OnScreenWindow}
   */
  var windowElt = (0, _FCore._)({
    tag: _OnsScreenWindow["default"].tag,
    style: {
      left: 'calc(50vw - 150px)',
      top: 'calc(40vh - 100px)',
      width: 'auto',
      height: 'auto'
    },
    props: {
      windowTitle: 'New Form',
      windowIcon: 'span.mdi.mdi-file-plus-outline'
    },
    child: [frag.domElt.addStyle('font-family', 'Arial, sans-serif')]
  });
  var modal = (0, _FCore._)({
    tag: 'modal',
    style: {
      zIndex: 100000
    },
    child: windowElt
  });
  modal.addTo(document.body);
  frag.start();
  return new Promise(function (rs) {
    resolve = rs;
  });
}
function lsWorkspace(path) {
  return _XHR["default"].postRepquest('https://absol.cf/shell_exec.php', JSON.stringify({
    cmd: 'ls -la -F "' + path + '"',
    cwd: WORKSPACE_FOLDER
  })).then(function (out) {
    return out.trim().split(/[\r\n]+/).slice(1).map(function (line) {
      var parts = line.split(/\s+/);
      var name = parts[8];
      var type = 'FILE';
      var ext = undefined;
      if (name[name.length - 1] == '/' || name[name.length - 1] == '\\') {
        type = "FOLDER";
        name = name.substr(0, name.length - 1);
      } else {
        ext = (name.split('.').pop() || '').toLowerCase();
      }
      return {
        type: type,
        name: name,
        fullPath: path + '/' + name,
        time: parts[5] + ' ' + parts[6],
        size: parseInt(parts[4]),
        owner: parts[2],
        ext: ext
      };
    }).filter(function (obj) {
      return obj.name.indexOf('.') != 0;
    });
  })["catch"](function (error) {
    console.error(error);
  });
}
function writeFileBase64X(path, b64) {
  return _XHR["default"].postRepquest('https://absol.cf/shell_exec.php', JSON.stringify({
    cmd: 'echo \'' + b64 + '\'>' + path,
    cwd: WORKSPACE_FOLDER
  })).then(function (out) {
    console.log(out);
  });
}
function removeFile(path) {
  return _XHR["default"].postRepquest('https://absol.cf/shell_exec.php', JSON.stringify({
    cmd: "rm  \"".concat(path, "\""),
    cwd: WORKSPACE_FOLDER
  })).then(function (out) {
    console.log(out);
  });
}
function writeFileBase64(path, b64) {
  var taskMng = new _TaskManager["default"]({
    limit: 4
  });
  var onProcess = function onProcess(value) {
    console.log('upload ', Math.round(value * 100) + '%');
  };
  var data = new Blob([b64]);
  var folderPath = path.split('/');
  folderPath.pop();
  var prefix = ['file', new Date().getTime(), (0, _random.randomArbitrary)(0, 1000000) >> 0].join('_');
  var parts = [];
  var chuck_limit = 2 << 20;
  var partName;
  var fileSize = data.size;
  var fileStartOffset = 0;
  var fileEndOffset = 0;
  var idx = 0;
  var syncs = [];
  var syncDone = 0;
  var bundle;
  var began = false;
  var handle = function handle(bundle) {
    return new Promise(function (rs) {
      taskMng.requestTask(function (finishTask, bundle) {
        if (typeof onProcess === "function" && !began) {
          began = true;
          onProcess(syncDone / (syncs.length || 1));
        }
        var form = new FormData();
        form.append('action', 'upload_part');
        form.append('fileUpload', bundle.file, bundle.name);
        fetch('https://absol.cf/filesystem/writefile.php', {
          method: 'POST',
          body: form
        }).then(function (res) {
          return res.text();
        }).then(function (text) {
          if (text !== 'OK') throw new Error(text);
          syncDone++;
          if (typeof onProcess === "function") {
            onProcess(syncDone / (syncs.length || 1));
          }
          rs(location.origin);
          finishTask();
        });
      }, bundle);
    });
  };
  while (fileStartOffset < fileSize) {
    fileEndOffset = Math.min(fileStartOffset + chuck_limit, fileSize);
    partName = prefix + '.p' + idx;
    parts.push(partName);
    bundle = {
      file: data.slice(fileStartOffset, fileEndOffset),
      idx: idx,
      name: partName
    };
    idx++;
    fileStartOffset = fileEndOffset;
    syncs.push(handle(bundle));
  }
  return Promise.all(syncs).then(function () {
    var form = new FormData();
    form.append('action', 'join_parts');
    form.append('parts', parts.join(';'));
    form.append('path', '/html/' + WORKSPACE_FOLDER + '/' + path);
    fetch('https://absol.cf/filesystem/writefile.php', {
      method: 'POST',
      body: form
    }).then(function (res) {
      return res.text();
    }).then(function (text) {
      if (text !== 'OK') throw new Error(text);
    });
  });
}
function writeFile(path, text) {
  var b64 = (0, _base.base64EncodeUnicode)(text);
  return _XHR["default"].postRepquest('https://absol.cf/shell_exec.php', JSON.stringify({
    cmd: 'echo \'' + b64 + '\' | base64 -d >' + path,
    cwd: WORKSPACE_FOLDER
  })).then(function (out) {
    console.log(out);
  });
}
function catWorkspace(path) {
  return _XHR["default"].postRepquest('https://absol.cf/shell_exec.php', JSON.stringify({
    cmd: 'cat "' + path + '"',
    cwd: WORKSPACE_FOLDER
  }));
}

/**
 * @extends FMExploreDelegate
 * @constructor
 */
function FrameProjectExploreDelegate(context) {
  _ProjectExplorer.FMExploreDelegate.call(this);
  this.context = context;
  this.self = context.self;
}
_OOP["default"].mixClass(FrameProjectExploreDelegate, _ProjectExplorer.FMExploreDelegate);
FrameProjectExploreDelegate.prototype.getTreeData = function () {
  var res = [];
  var folder2icon = {
    form: {
      tag: 'img',
      props: {
        src: 'https://absol.cf/exticons/extra/folder-neon.svg'
      }
    },
    template: {
      tag: 'img',
      props: {
        src: 'https://absol.cf/exticons/extra/folder-svn.svg'
      }
    }
  };
  function visit(cArr, path, depth) {
    depth = depth || 0;
    if (depth >= 2) return;
    return lsWorkspace(path.join('/')).then(function (result) {
      // console.log(result)
      var syncArr = [];
      result.forEach(function (it) {
        var res;
        if (it.type === 'FOLDER') {
          res = {
            name: it.name,
            id: (0, _stringFormat.normalizeIdent)(path + it.name, {}),
            icon: folder2icon[it.name] || 'span.mdi.mdi-folder',
            status: 'close',
            children: [],
            rawData: it
          };
          syncArr.push(visit(res.children, path.concat([it.name]), depth + 1));
        } else if (it.type === 'FILE') {
          res = {
            name: it.name,
            icon: extIcons[it.ext] || extIcons['*'],
            id: (0, _stringFormat.normalizeIdent)(path + it.name, {}),
            rawData: it,
            openArgs: [it.ext, it.fullPath.replace(/[^a-zA-Z0-9\_]/g, '_'), it.name, it, it.fullPath]
          };
        }
        cArr.push(res);
      });
      return Promise.all(syncArr);
    });
  }
  var sync = visit(res, [this.self.data.projectName]);
  return Promise.resolve(sync).then(function () {
    return res;
  });
};
FrameProjectExploreDelegate.prototype.getActionContextMenuProps = function (treeData) {
  var props = {
    items: []
  };
  if (treeData.rawData.type === 'FILE') {
    props.items.push({
      icon: 'span.mdi.mdi-menu-open',
      text: 'Open',
      cmd: 'open'
    });
    props.items.push({
      icon: 'span.mdi.mdi-rename-box',
      text: 'Rename',
      cmd: 'rename'
    });
    props.items.push({
      icon: 'span.mdi.mdi-delete',
      text: 'Delete',
      cmd: 'delete'
    });
  }
  return props;
};
FrameProjectExploreDelegate.prototype.onTreeAction = function (treeData, action, nodeElt) {
  var _this = this;
  switch (action.cmd) {
    case 'delete':
      removeFile(treeData.rawData.fullPath).then(function () {
        _this.redrawExpTree();
      });
      break;
  }
};
FrameProjectExploreDelegate.prototype.onUserRenameCompleted = function (ac) {
  console.log(ac);
};
function PluginProjectExplore(context) {
  var _ = context._;
  var $ = context.$;
  context.delegate = new FrameProjectExploreDelegate(context);
  var self = context.self;
  self.cmdRunner.add('new', function () {
    openNewFormDialog().then(function (result) {
      if (!result) return;
      var accumulator = {};
      var ext = result.framework === 'form' ? 'form' : 'ezui';
      accumulator.contentArguments = {};
      accumulator.contentArguments.fullPath = self.data.projectName + '/form/' + result.name + '.' + ext;
      accumulator.name = result.name + '.' + ext;
      accumulator.contentArguments.ext = ext;
      if (ext === 'form') {
        accumulator.editor = {
          getData: function getData() {
            return {
              app: _R["default"].APP,
              version: _R["default"].VERSION,
              layout: {
                tag: result._layout
              }
            };
          }
        };
      } else {
        accumulator.editor = {
          getData: function getData() {
            return _KVEZUIComponentGenerator.KVEZUIComponentGeneratorInstance.generateFragmentSourceDataByTypeId(result.typeId);
          }
        };
      }
      PluginSaveContentData(accumulator);
      setTimeout(function () {
        context.delegate.redrawExpTree();
        context.delegate.openItem(accumulator.contentArguments.ext, accumulator.contentArguments.fullPath.replace(/[^a-zA-Z0-9\_]/g, '_'), accumulator.name, accumulator.contentArguments, accumulator.contentArguments.fullPath);
      }, 1000);
    });
  });
}
function downloadFragmentData(path) {
  return catWorkspace(path).then(function (out) {
    if (out[0] == '{') {
      // is json
      try {
        var data = (0, _generator.replaceDateStringJSVariable)(JSON.parse(out));
        return data;
      } catch (error) {
        console.error(error);
      }
    } else {
      return JSZip.loadAsync(out, {
        base64: true
      }).then(function (zip) {
        return zip.file('data.txt').async('text').then(function (text) {
          try {
            var data = (0, _generator.replaceDateStringJSVariable)(JSON.parse(text));
            return data;
          } catch (error) {
            console.error(error);
          }
        });
      });
    }
  });
}
function PluginLoadContentData(accumulator) {
  var sync;
  if (accumulator.contentArguments.ext == 'form' || accumulator.contentArguments.ext == 'ezui') {
    sync = downloadFragmentData(accumulator.contentArguments.fullPath).then(function (data) {
      accumulator.editor.setData(data);
    });
  } else if (_CodeEditor["default"].prototype.TYPE_MODE[accumulator.contentArguments.ext]) {
    sync = catWorkspace(accumulator.contentArguments.fullPath).then(function (out) {
      try {
        accumulator.editor.setData({
          value: out,
          type: accumulator.contentArguments.ext
        });
      } catch (error) {
        console.error(error);
      }
    });
  } else if (accumulator.contentArguments.ext == 'jpg') {
    accumulator.editor.setData({
      images: ['//absol.cf/' + WORKSPACE_FOLDER + '/' + accumulator.contentArguments.fullPath]
    });
    sync = Promise.resolve();
  }
  accumulator.waitFor(sync);
}
function PluginSaveContentData(accumulator) {
  if (accumulator.contentArguments.ext === 'form') {
    var data = accumulator.editor.getData();
    var FrgClass = (0, _FmFragment.makeFmFragmentClass)({
      tag: accumulator.name.replace('.form', ''),
      contentViewData: data
    });
    _Assembler.AssemblerInstance.addClass(FrgClass);
    var textData = JSON.stringify(data);
    var zip = new JSZip();
    zip.file('data.txt', textData);
    zip.generateAsync({
      type: 'base64'
    }).then(function (b64) {
      writeFileBase64(accumulator.contentArguments.fullPath, b64).then(function (out) {
        console.log("Save success: ", accumulator.contentArguments.fullPath);
      });
    });
  } else if (accumulator.contentArguments.ext === 'ezui') {
    var data = accumulator.editor.getData();
    _EBuilder.EBuilderInstance.install({
      tag: accumulator.name.replace('.ezui', ''),
      contentViewData: data
    });
    var textData = JSON.stringify(data);
    var zip = new JSZip();
    zip.file('data.txt', textData);
    zip.generateAsync({
      type: 'base64'
    }).then(function (b64) {
      writeFileBase64(accumulator.contentArguments.fullPath, b64).then(function (out) {
        console.log("Save success: ", accumulator.contentArguments.fullPath);
      });
    });
  }
}
function PluginBuildComponent(context) {
  var data = context.data;
  if (data.tag == "LoginForm") {
    context.result = context.self.inflate({
      "tag": "RelativeLayout",
      "attributes": {
        "name": "PesionalInfor",
        "target": "",
        "formType": "SO_YEU_LY_LICH"
      },
      "style": {
        "hAlign": "left",
        "vAlign": "top",
        "left": 0,
        "right": 0,
        "top": -20.040624999999977,
        "bottom": 0,
        "height": 353.40625,
        "width": 960.1563,
        "backgroundImage": "",
        "backgroundColor": "#ffffff00"
      },
      "children": [{
        "tag": "Ellipse",
        "attributes": {
          "name": "Circle_0",
          "target": ""
        },
        "style": {
          "hAlign": "left",
          "vAlign": "top",
          "left": 36.0625,
          "right": 624.0938,
          "top": 18.40625,
          "bottom": 35,
          "height": 300,
          "width": 300,
          "boxAlign": "lefttop",
          "fillColor": "#ebe936ee",
          "strokeColor": "#e31919e0",
          "strokeWidth": 1
        }
      }, {
        "tag": "Ellipse",
        "attributes": {
          "name": "Ellipse_1",
          "target": ""
        },
        "style": {
          "hAlign": "left",
          "vAlign": "top",
          "left": 83.703125,
          "right": 820.453175,
          "top": 80.40625,
          "bottom": 217,
          "height": 56,
          "width": 56,
          "boxAlign": "lefttop",
          "fillColor": "white",
          "strokeColor": "black",
          "strokeWidth": 1
        }
      }, {
        "tag": "Ellipse",
        "attributes": {
          "name": "Ellipse_2",
          "target": ""
        },
        "style": {
          "hAlign": "left",
          "vAlign": "top",
          "left": 209,
          "right": 695.1563,
          "top": 79,
          "bottom": 218.40625,
          "height": 56,
          "width": 56,
          "boxAlign": "lefttop",
          "fillColor": "white",
          "strokeColor": "black",
          "strokeWidth": 1
        }
      }, {
        "tag": "Ellipse",
        "attributes": {
          "name": "Ellipse_3",
          "target": ""
        },
        "style": {
          "hAlign": "left",
          "vAlign": "top",
          "left": 91.703125,
          "right": 827.453175,
          "top": 94.40625,
          "bottom": 218,
          "height": 41,
          "width": 41,
          "boxAlign": "lefttop",
          "fillColor": "#000000ff",
          "strokeColor": "black",
          "strokeWidth": 0
        }
      }, {
        "tag": "Ellipse",
        "attributes": {
          "name": "Ellipse_9",
          "target": ""
        },
        "style": {
          "hAlign": "left",
          "vAlign": "top",
          "left": 216,
          "right": 703.1563,
          "top": 92,
          "bottom": 220.40625,
          "height": 41,
          "width": 41,
          "boxAlign": "lefttop",
          "fillColor": "#000000ff",
          "strokeColor": "black",
          "strokeWidth": 0
        }
      }, {
        "tag": "Rectangle",
        "attributes": {
          "name": "Rectangle_0",
          "target": ""
        },
        "style": {
          "hAlign": "left",
          "vAlign": "top",
          "left": 378.703125,
          "right": 348.453175,
          "top": 41.40625,
          "bottom": 163,
          "height": 149,
          "width": 233,
          "boxAlign": "lefttop",
          "fillColor": "#4fe01dc2",
          "strokeColor": "#3819b2c0",
          "strokeWidth": 11,
          "roundCornerX": 25,
          "roundCornerY": 0
        }
      }]
    });
    context.result.formType = 'LoginForm';
    context.result.getData = function () {
      return {
        tag: 'LoginForm',
        style: this.style,
        attributes: this.attributes
      };
    };
  }
}
function PluginComponentPickerView(context) {
  var allNode = (0, _FCore.$)('exptree', context.self.$view, function (node) {
    return node.name == "all";
  });
  console.log(context);
  var projectExplorer = context.self.getContext(_R["default"].PROJECT_EXPLORER);
  var projectName = projectExplorer.data.projectName;
  var formNode = (0, _FCore._)({
    tag: _ExpTree["default"].tag,
    props: {
      name: 'fragment',
      status: 'close'
    },
    on: {
      press: context.toggleGroup
    },
    child: []
  });
  allNode.addChild(formNode);
  lsWorkspace(projectName + '/' + 'form').then(function (res) {
    Promise.all(res.map(function (file) {
      var fragmentTag = file.name.replace(/\.form$/, '');
      return downloadFragmentData(projectName + '/' + 'form/' + file.name).then(function (fData) {
        var fragmentConstructor = (0, _FmFragment.makeFmFragmentClass)({
          tag: fragmentTag,
          contentViewData: fData
        });
        _Assembler.AssemblerInstance.addConstructor(fragmentConstructor);
        return (0, _FCore._)({
          tag: 'exptree',
          props: {
            name: fragmentTag,
            icon: 'span.mdi.mdi-terraform',
            componentConstructor: fragmentConstructor
          }
        });
      });
    })).then(function (eltList) {
      eltList.forEach(function (elt) {
        formNode.addChild(elt);
      });
    });
  });
  var templateNode = (0, _FCore._)({
    tag: _ExpTree["default"].tag,
    props: {
      name: 'template',
      status: 'close'
    },
    on: {
      press: context.toggleGroup
    },
    child: []
  });
  allNode.addChild(templateNode);
  lsWorkspace(projectName + '/' + 'template').then(function (res) {
    Promise.all(res.map(function (file) {
      var templateName = file.name.replace(/\.ftl$/, '');
      return downloadFragmentData(projectName + '/' + 'template/' + file.name).then(function (fData) {
        return (0, _FCore._)({
          tag: 'exptree',
          props: {
            name: templateName,
            icon: 'span.mdi.mdi-terraform',
            componentConstructor: fData
          }
        });
      });
    })).then(function (eltList) {
      eltList.forEach(function (elt) {
        templateNode.addChild(elt);
      });
    });
  });
}

/***/ }),

/***/ 49944:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _remoteRequireNodeAsync = _interopRequireDefault(__webpack_require__(40332));
var _EBuilder = __webpack_require__(55813);
var _R = _interopRequireDefault(__webpack_require__(25280));
var _generator = __webpack_require__(18528);
var _OOP = __webpack_require__(38608);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @param {{dataModel: EZEDataModel}} opt
 * @constructor
 */
function KVEZUIComponentGenerator(opt) {
  this.adapter = new KVEZUICGAdapter(opt.dataModel);
  this.builder = _EBuilder.EBuilderInstance;
}
KVEZUIComponentGenerator.prototype.ready = function () {
  return this.adapter.ready();
};
KVEZUIComponentGenerator.prototype.prefix = 'Dkt_';
KVEZUIComponentGenerator.prototype.types = ['string', 'note', 'number', 'date', 'datetime', 'boolean', 'email_address', 'enum', 'enum_multi', 'phonenumber', 'website', 'gps', 'structure', 'geopos', 'image_file', 'any_file', 'time', 'files', 'array', 'currency', 'hour_period', 'datemonth', 'nation_city', 'html', 'variable_input', 'variable_textarea', 'color_picker', 'month', 'week', 'performance_chart', 'year', 'date_level', 'extends_structure', 'extends_enum'];
KVEZUIComponentGenerator.prototype.getAvailableDataTypeSelection = function () {
  var _this = this;
  return this.adapter.getIdList().map(function (typeId) {
    var nd = _this.adapter.getItemById(typeId);
    if (!nd) return null;
    return {
      value: typeId,
      text: nd.name || typeId + ''
    };
  }).filter(function (it) {
    return !!it;
  });
};
KVEZUIComponentGenerator.prototype.generateFragmentSourceDataByTypeId = function (typeId) {
  var nd = this.adapter.getItemById(typeId);
  return this.generateFragmentSourceData(nd || {
    type: "unknown",
    id: typeId
  });
};

/**
 *
 * @param typeId
 * @param {Object<string, {typeId: number, parentTypeId?:number}>|{}=} ac
 * @return {Object<string, {typeId: number, parentTypeId?:number}>|{}}
 */
KVEZUIComponentGenerator.prototype.getRequiredTypeIdList = function (typeId, ac) {
  var _this2 = this;
  ac = ac || {};
  var nd = this.adapter.getItemById(typeId);
  if (!nd) return ac;
  var type = nd.type;
  var type2 = nd.type2; // type2 is real type
  if (this.fieldMapping[type2 || type]) return {};
  switch (type2 || type) {
    case 'structure':
      if (nd.content && nd.content.details) {
        nd.content.details.forEach(function (field) {
          ac[field.type] = ac[field.type] || {
            typeId: field.type,
            parentTypeId: typeId
          };
          _this2.getRequiredTypeIdList(field.type, ac);
        });
      }
      break;
    case 'array':
      if (nd.content && nd.content["typeof"]) ac[nd.content["typeof"]] = {
        typeId: nd.content["typeof"],
        parentTypeId: typeId
      };
      break;
    case 'extends_structure':
      throw new Error("not support " + 'extends_structure' + ' yet');
      if (nd.content && nd.content["typeof"]) {
        ac[nd.content["typeof"]] = {
          typeId: nd.content["typeof"],
          parentTypeId: typeId
        };
      }
      if (nd.content && nd.content.details) {
        nd.content.details.forEach(function (field) {
          ac[field.type] = ac[field.type] || {
            typeId: field.type,
            parentTypeId: typeId
          };
          _this2.getRequiredTypeIdList(field.type, ac);
        });
      }
      break;
    case 'extends_enum':
      throw new Error("not support " + 'extends_enum' + ' yet');
      break;
    case 'union':
      throw new Error("not support " + 'union' + ' yet');
      console.log('union', nd);
      break;
    default:
      throw 1;
  }
  return ac;
};
KVEZUIComponentGenerator.prototype.generateFragmentSourceData = function (nd) {
  console.log('generateFragmentSourceData', nd);
  var res = {
    app: _R["default"].EZUI_APP,
    version: _R["default"].EZUI_VERSION,
    typeId: nd && nd.id,
    layout: {
      tag: 'Container'
    },
    blocks: [],
    lines: []
  };
  if (!nd) return res;
  var type = nd.type;
  var type2 = nd.type2; // type2 is real type
  var fm;
  fm = this.objectMapping[type] || this.objectMapping[type2];
  if (typeof fm === 'function') {
    fm = fm.call(this, nd);
  }
  if (!fm) {
    fm = this.fieldMapping[type2] || this.fieldMapping[type];
    if (fm) fm = (0, _generator.copyJSVariable)(fm);
  }
  if (fm) {
    if (typeof fm === 'string') {
      res.layout = {
        tag: fm
      };
    } else if (fm.tag) {
      res.layout = fm;
    } else if (fm.layout) {
      res.layout = fm.layout;
      if (fm.blocks) res.blocks = res.blocks.concat(fm.blocks);
      if (fm.lines) res.lines = res.lines.concat(fm.lines);
    }
  }
  return res;
};
KVEZUIComponentGenerator.prototype.fieldMapping = {
  string: 'TextInput',
  note: 'TextArea',
  number: 'NumberInput',
  date: 'DateInput',
  datetime: 'DateTimeInput',
  "boolean": 'CheckBox',
  email_address: {
    tag: 'TextInput',
    purpose: 'email'
  },
  "enum": 'ComboBox',
  enum_multi: 'MultiSelectComboBox',
  phonenumber: {
    tag: 'TextInput',
    purpose: 'tel'
  },
  website: {
    tag: 'TextInput',
    purpose: 'url'
  },
  gps: 'LocationInput',
  image_file: 'ImageInput',
  any_file: {
    tag: 'FileInput'
  },
  time: 'TimeInput',
  files: 'FileListInput',
  html: 'CKEditor',
  color_picker: 'ColorInput',
  month: {
    tag: 'DateInput',
    level: 'month'
  },
  week: {
    tag: 'DateInput',
    level: 'week'
  },
  year: {
    tag: 'DateInput',
    level: 'year'
  },
  date_level: {
    tag: 'DateLevelInput'
  },
  datemonth: '????',
  geopos: {
    tag: "ComboBox",
    items: '= todo: load geopos items expression'
  },
  nation_city: {
    tag: 'DualComboBox',
    items: "= contentModule.loadListPrimaryTypeEnum(\"nation_city\", \"DualComboBox\")"
  },
  currency: {
    tag: 'NumberInput'
  },
  hour_period: "TimeRange24Input",
  variable_input: 'CKInlineShortTemplate',
  variable_textarea: 'CKTemplateEditor',
  performance_chart: 'PerformanceChart'
};
KVEZUIComponentGenerator.prototype.objectMapping = {};
KVEZUIComponentGenerator.prototype.objectMapping.unknown = function (nd) {
  return {
    layout: {
      tag: 'Label',
      value: "Error: Not found typeId = " + nd.id
    }
  };
};

/**
 * @his KVEZUIComponentGenerator
 * @param nd
 */
KVEZUIComponentGenerator.prototype.objectMapping["enum"] = function (nd) {
  var res = {
    layout: {
      tag: 'ComboBox',
      items: [],
      width: '500px'
    }
  };
  console.log('enum', nd);
  if (nd.type2 === 'enum' && nd.type) {
    res.layout.items = "= contentModule.loadListPrimaryTypeEnum(".concat((0, _generator.generateJSVariable)(nd.type), ", \"ComboBox\")");
  } else if (nd.content && nd.content.details) {
    res.layout.items = nd.content.details.map(function (field) {
      return {
        text: field.text,
        value: field.value
      };
    });
    res.layout.items = "= ".concat((0, _generator.generateJSVariable)(res.layout.items));
  }
  return res;
};

/**
 * @his KVEZUIComponentGenerator
 * @param nd
 */
KVEZUIComponentGenerator.prototype.objectMapping.enum_multi = function (nd) {
  var res = {
    layout: {
      tag: 'MultiSelectComboBox',
      items: []
    }
  };

  //todo: tag base on nd.type

  if (nd.type2 === 'enum_multi' && nd.type) {
    res.layout.items = "= contentModule.loadListPrimaryTypeEnum(".concat((0, _generator.generateJSVariable)(nd.type), ", \"MultiSelectComboBox\")");
  } else if (nd.content && nd.content.details) {
    res.layout.items = nd.content.details.map(function (field) {
      return {
        text: field.text,
        value: field.value
      };
    });
    res.layout.items = "= ".concat((0, _generator.generateJSVariable)(res.layout.items));
  }
  return res;
};

/**
 * @his KVEZUIComponentGenerator
 * @param nd
 */
KVEZUIComponentGenerator.prototype.objectMapping.structure = function (nd) {
  var _this3 = this;
  var res = {
    layout: {
      tag: 'Container',
      layout: 'grid',
      alignItems: 'center',
      columns: 'auto 1fr',
      columnGap: 20,
      rowGap: 10,
      children: []
    }
  };
  if (!nd.content || !nd.content.details) return res;
  var makeRow = function makeRow(field, forceType) {
    var temp;
    var unionInfo = field.union;
    temp = {
      tag: 'Label',
      value: field.name,
      id: field.localid + '_label',
      name: '',
      displayName: "Label:".concat(field.name || field.localid)
    }; //not bind data
    if (unionInfo) {
      temp.union = unionInfo.by;
      temp.unionValues = unionInfo.values;
    }
    res.layout.children.push(temp);
    var type = forceType || field.type;
    temp = _this3.generateFragmentSourceDataByTypeId(type);
    if (temp && temp.layout) temp = temp.layout;else temp = {
      tag: 'Label',
      value: "Error: " + field.type + ' not handled!'
    };
    temp.width = '500px';
    temp.id = field.localid;
    temp.name = field.key;
    temp.displayName = field.name;
    if (unionInfo) {
      temp.union = unionInfo.by;
      temp.unionValues = unionInfo.values;
    }
    res.layout.children.push(temp);
  };
  nd.content.details.forEach(function (field) {
    var i;
    makeRow(field, field.type === 'union' ? field.typeOfUnion : null);
    var graph;
    if (field.type === 'union') {
      graph = createUnionGraph(field.detailUnion, field.key);
      for (i = 0; i < graph.topo.length; ++i) {
        makeRow(graph.nodes[graph.topo[i]]);
      }
    }
  });
  //Yen: Nên nếu là là enum thì Th thêm cho nó 1 item đầu tiên là {value: 0, text: LanguageModule.text("txt_select_value")}
  return res;
};

/**
 * @his KVEZUIComponentGenerator
 * @param nd
 */
KVEZUIComponentGenerator.prototype.objectMapping.array = function (nd) {
  console.log("ARRAY", nd);
  var res = {
    layout: {
      tag: 'TableInput'
    },
    lines: [],
    blocks: []
  };
  return res;
};
var _default = KVEZUIComponentGenerator;
/**
 *
 * @param {EZEDataModel} dataModel
 * @constructor
 */
exports["default"] = _default;
function KVEZUICGAdapter(dataModel) {
  this.dataModel = dataModel;
  this.itemById = {};
}

/**
 * full load data for sync process
 */
KVEZUICGAdapter.prototype.ready = function () {
  var _this4 = this;
  return this.dataModel.getTypeLists().then(function (res) {
    _this4.data = res;
    _this4.data.forEach(function (item) {
      _this4.itemById[item.id] = item;
    });
  });
};
KVEZUICGAdapter.prototype.getIdList = function () {
  return this.data.map(function (it) {
    return it.id;
  });
};
KVEZUICGAdapter.prototype.getItemById = function (id) {
  return this.itemById[id] || null;
};

/**
 * @extends KVEZUICGAdapter
 * @constructor
 */
function KVEZUICGMockAdapter() {
  this.data = null;
  this.itemById = {};
  this.ready();
}
(0, _OOP.mixClass)(KVEZUICGMockAdapter, KVEZUICGAdapter);
KVEZUICGMockAdapter.prototype.ready = function () {
  var _this5 = this;
  if (this.sync) return this.sync;
  this.sync = (0, _remoteRequireNodeAsync["default"])('./demo/typelist.js').then(function (res) {
    _this5.data = res;
    _this5.data.forEach(function (item) {
      _this5.itemById[item.id] = item;
    });
  });
  return this.sync;
};

/*****************Utilities for KVEZUIComponentGenerator******************/

function createUnionGraph(detailUnion, by) {
  var graph = {
    nodes: {},
    edges: [],
    // edges[a+"/"+b] = label=> a before b width label is minimum of (index+ 1) union rule
    topo: []
  };
  // graph[a] = b mean a before b
  var keys = Object.keys(detailUnion);
  var prev;
  var branch;
  var i, j, id;
  for (i = 0; i < keys.length; ++i) {
    branch = detailUnion[keys[i]];
    prev = "ENTRY";
    for (j = 0; j < branch.length; ++j) {
      id = branch[j].localid;
      if (!graph.nodes[id]) graph.nodes[id] = Object.assign({
        union: {
          by: by,
          values: []
        }
      }, branch[j]);
      graph.nodes[id].union.values.push(keys[i]);
      graph.edges.push({
        u: prev,
        v: id
      });
      prev = id;
    }
    graph.edges.push({
      u: prev,
      v: "END"
    });
  }
  var edges = graph.edges.slice();
  var edges1;
  var count = edges.reduce(function (ac, cr) {
    ac[cr.v] = (ac[cr.v] || 0) + 1;
    return ac;
  }, {});
  edges = edges.filter(function (edge) {
    return edge.u !== 'ENTRY';
  });
  var minCount, edge;
  while (edges.length) {
    minCount = Infinity;
    for (i in count) {
      minCount = Math.min(minCount, count[i]);
    }
    for (i = 0; i < edges.length; ++i) {
      edge = edges[i];
      if (count[edge.u] <= minCount) break;
    }
    graph.topo.push(edge.u);
    delete count[edge.u];
    edges1 = [];
    for (i = 0; i < edges.length; ++i) {
      if (edges[i].u === edge.u && count[edges[i].v] > 0) {
        count[edges[i].v] -= 1;
      } else {
        edges1.push(edges[i]);
      }
    }
    edges = edges1;
  }
  return graph;
}

//
// export var KVEZUIComponentGeneratorInstance = new KVEZUIComponentGenerator();
//
// var generator = KVEZUIComponentGeneratorInstance;
//
//
// generator.ready().then(() => {
//     generator.adapter.data.forEach(item => {
//         try {
//             // var res = generator.generateFragmentSourceDataByTypeId(item.id);
//             // console.log(res);
//
//         } catch (e) {
//             console.log(e, item);
//         }
//     });
// })

/***/ }),

/***/ 51251:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function FDataModel() {}
FDataModel.prototype.getExploreTree = function () {};
var _default = FDataModel;
exports["default"] = _default;

/***/ }),

/***/ 78377:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
__webpack_require__(69267);
var _R = _interopRequireDefault(__webpack_require__(25280));
var _ExpTree = _interopRequireDefault(__webpack_require__(87326));
var _utils = __webpack_require__(84512);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _EventEmitter = __webpack_require__(46833);
var _FFloatWindow = _interopRequireDefault(__webpack_require__(72649));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends Fragment
 * @constructor
 */
function FExplorer() {
  _FFloatWindow["default"].call(this);
  this.savedState = {};
  this.$nodeById = {};
  this.$forcusNode = null;
}
_OOP["default"].mixClass(FExplorer, _FFloatWindow["default"]);
FExplorer.prototype.windowTitle = 'Explorer';
FExplorer.prototype.createView = function () {
  this.$view = (0, _FCore._)({
    "class": 'af-explore',
    child: [{
      "class": 'af-explore-title-bar',
      child: {
        "class": 'as-form-editor-quick-toolbar',
        child: [{
          tag: 'button',
          "class": 'af-explore-header-menu',
          child: 'span.mdi.mdi-dots-horizontal'
        }]
      }
    }, {
      "class": 'af-explore-body',
      child: []
    }]
  });
  this.$body = (0, _FCore.$)('.af-explore-body', this.$view);
  this.$headerMenuBtn = (0, _FCore.$)('.af-explore-header-menu', this.$view);
  _QuickMenu["default"].toggleWhenClick(this.$headerMenuBtn, {
    getMenuProps: this.getHeaderActionContextMenuProps.bind(this),
    onSelect: this.onHeaderAction.bind(this),
    anchor: [2, 3, 9, 1, 0]
  });
};
FExplorer.prototype.onStart = function () {
  var classes = this.getContext(_R["default"].CLASSES);
  if (!classes) return;
  this.startExploringFrg = new classes.StartExploringFragment();
  this.startExploringFrg.attach(this);
  this.$body.addChild(this.startExploringFrg.getView());
  this.startExploringFrg.start();
};
FExplorer.prototype.onDestroy = function () {
  if (this.startExploringFrg) this.startExploringFrg.destroy();
};
FExplorer.prototype.getExploreTree = function () {
  return [];
};
FExplorer.prototype.redrawExpTree = function () {
  var _this = this;
  var treeData = this.getExploreTree();
  if (!treeData) return;
  this.$nodeById = {};
  var visit = function visit(treeData, parentElt) {
    var props = Object.assign({}, treeData);
    var id = treeData.id;
    delete props.id;
    delete props.children;
    delete props.parent;
    var treeElt = (0, _FCore._)({
      tag: _ExpTree["default"].tag,
      props: props,
      on: {
        statuschange: function statuschange() {
          _this.savedState[id] = treeElt.status;
        }
      }
    });
    if (id) treeElt.attr('data-id', id);
    _this.$nodeById[id] = treeElt;
    treeElt.getNode().defineEvent('contextmenu').on('contextmenu', function (event) {
      var menuProps = _this.getActionContextMenuProps(treeData);
      event.showContextMenu(menuProps, function (event) {
        var item = (0, _utils.cleanMenuItemProperty)(event.menuItem);
        _this.onTreeAction(treeData, item, treeElt);
      });
    }).on('dblclick', function (event) {
      var toggleIco = treeElt.getNode().$toggleIcon;
      if (treeElt.status === 'close') {
        if (!(0, _EventEmitter.hitElement)(toggleIco, event)) {
          treeElt.status = 'open';
          treeElt.emit('statuschange', {});
        }
      } else if (treeElt.status === 'open') {
        if (!(0, _EventEmitter.hitElement)(toggleIco, event)) {
          treeElt.status = 'close';
          treeElt.emit('statuschange', {});
        }
      } else {}
      _this.onTreeAction(treeData, {
        cmd: 'open'
      }, treeElt);
    });
    parentElt.addChild(treeElt);
    if (treeData.children && treeData.children.length > 0) {
      treeElt.status = _this.savedState[id] === 'open' ? 'open' : 'close';
      treeData.children.forEach(function (it) {
        return visit(it, treeElt);
      });
    }
  };
  var handleTreeData = function handleTreeData(treeData) {
    if (treeData && treeData.then) {
      return treeData.then(handleTreeData);
    } else if (treeData instanceof Array) {
      _this.$body.clearChild();
      treeData.forEach(function (node) {
        return visit(node, _this.$body);
      });
    } else {
      _this.$body.clearChild();
      return visit(treeData, _this.$body);
    }
  };
  return handleTreeData(treeData);
};
FExplorer.prototype.getActionContextMenuProps = function (treeData) {
  var items = [];
  items.push({
    icon: 'span.mdi.mdi-folder-open',
    text: 'Open',
    cmd: 'open'
  });
  return {
    items: items
  };
};
FExplorer.prototype.onTreeAction = function (treeData, action, nodeElt) {
  console.log(treeData, action, nodeElt);
};
FExplorer.prototype.getHeaderActionContextMenuProps = function () {
  return {
    items: [{
      icon: 'span.mdi.mdi-exit-to-app',
      text: 'Close Package',
      cmd: 'close_package'
    }]
  };
};
FExplorer.prototype.onHeaderAction = function (action) {
  console.log(action);
};
FExplorer.prototype.focusNode = function (nodeId) {
  if (this.$forcusNode) {
    this.$forcusNode.getNode().removeClass('as-active');
    this.$forcusNode = null;
  }
  var nodeElt = this.$nodeById[nodeId];
  if (nodeElt) {
    this.$forcusNode = nodeElt;
    this.$forcusNode.getNode().addClass('as-active');
    (0, _utils.vScrollIntoView)(this.$forcusNode.getNode());
  }
};
var _default = FExplorer;
exports["default"] = _default;

/***/ }),

/***/ 72649:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _WindowBox = _interopRequireDefault(__webpack_require__(24405));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends Fragment
 * @constructor
 */
function FFloatWindow() {
  _Fragment["default"].call(this);
  this.$window = null;
}
_OOP["default"].mixClass(FFloatWindow, _Fragment["default"]);
FFloatWindow.prototype.windowTitle = 'Float Window';
FFloatWindow.prototype.createWindow = function () {
  var _this = this;
  this.$window = (0, _FCore._)({
    tag: _WindowBox["default"],
    "class": 'af-float-window',
    child: this.getView(),
    props: {
      windowTitle: this.windowTitle,
      windowActions: [{
        name: 'minimize',
        icon: 'span.mdi.mdi-window-minimize'
      }]
    },
    on: {
      action: function action(event) {
        switch (event.actionData.name) {
          case 'minimize':
            _this.minimizeWindow();
            break;
          case 'restore':
            _this.restoreWindow();
            break;
        }
      }
    }
  });
};
FFloatWindow.prototype.minimizeWindow = function () {
  this.$window.addClass('af-minimize');
  this.$window.windowActions = [{
    name: 'restore',
    icon: 'span.mdi.mdi-window-restore'
  }];
};
FFloatWindow.prototype.restoreWindow = function () {
  this.$window.removeClass('af-minimize');
  this.$window.windowActions = [{
    name: 'minimize',
    icon: 'span.mdi.mdi-window-minimize'
  }];
};
FFloatWindow.prototype.getWindow = function () {
  if (this.$window) return this.$window;
  this.createWindow();
  return this.$window;
};
var _default = FFloatWindow;
exports["default"] = _default;

/***/ }),

/***/ 37100:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _generator = __webpack_require__(18528);
__webpack_require__(64883);
var _R = _interopRequireDefault(__webpack_require__(25280));
var _FCore = __webpack_require__(51518);
var _StatusBar = _interopRequireDefault(__webpack_require__(49844));
var _FLUserInteractionController = _interopRequireDefault(__webpack_require__(97184));
var _utils = __webpack_require__(84512);
var _FLResizeController = _interopRequireDefault(__webpack_require__(82938));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _FLAutoStateController = _interopRequireDefault(__webpack_require__(65380));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _FExplorer = _interopRequireDefault(__webpack_require__(78377));
var _FDataModel = _interopRequireDefault(__webpack_require__(51251));
var _FLTaskManager = _interopRequireDefault(__webpack_require__(65768));
var _TabView = _interopRequireDefault(__webpack_require__(3475));
var _Context = _interopRequireDefault(__webpack_require__(16311));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @typedef FLauncherOptionClass
 * @property {Function} Explorer
 * @property {Function} DataModel
 * @property {Function} StartExploringFragment
 *
 *
 */

/***
 * @typedef FLauncherOptions
 * @property {FLauncherOptionClass} classes?
 * @property {FDataModel} database?
 *
 */

/***
 * @extends BaseEditor
 * @param options
 * @constructor
 */
function FLauncher(options) {
  this.options = Object.assign({}, options);
  _BaseEditor["default"].apply(this, arguments);
  this.userInteractionCtrl = new _FLUserInteractionController["default"](this);
  this.resizeCtrl = new _FLResizeController["default"](this);
  this.autoStateCtrl = new _FLAutoStateController["default"](this);
  this.$statusBar = (0, _FCore._)(_StatusBar["default"].tag);
  this.classes = Object.assign({}, this.classes, this.options.classes);
  var DataModelClass = this.classes.DataModel || _FDataModel["default"];
  var ExplorerClass = this.classes.Explorer || _FExplorer["default"];
  this.explorer = new ExplorerClass();
  this.dataModel = this.options.dataModel || new DataModelClass();
  this.taskMng = new _FLTaskManager["default"](this);
  this.toolWindowMng = new FToolWindowManager(this);
  this.setContext(_R["default"].CLASSES, this.classes);
  this.setContext(_R["default"].LAUNCHER, this);
  this.setContext(_R["default"].PROJECT_EXPLORER, this.explorer);
  this.setContext(_R["default"].STATUS_BAR_ELT, this.$statusBar);
  this.setContext(_R["default"].DATA_MODEL, this.dataModel);
  this.explorer.attach(this);
}
_OOP["default"].mixClass(FLauncher, _BaseEditor["default"]);
FLauncher.prototype.CONFIG_STORE_KEY = 'FLauncherConfig';
FLauncher.prototype.config = {};
FLauncher.prototype.classes = {};
FLauncher.prototype.loadConfig = function () {
  _BaseEditor["default"].prototype.loadConfig.apply(this, arguments);
  if (!(0, _utils.isRealNumber)(this.config.siteLeftWidth)) this.config.siteLeftWidth = 200;
  if (!(0, _utils.isRealNumber)(this.config.siteRightWidth)) this.config.siteRightWidth = 200;
};
FLauncher.prototype.createView = function () {
  var _this = this;
  this.$view = (0, _FCore._)({
    "class": 'af-launcher',
    style: {
      '--f-launcher-site-right-width': this.config.siteRightWidth + 'px',
      '--f-launcher-site-left-width': this.config.siteLeftWidth + 'px'
    },
    attr: {
      tabindex: '1'
    },
    child: [{
      "class": 'af-launcher-header',
      child: []
    }, {
      "class": 'af-launcher-body',
      child: [{
        "class": 'af-launcher-tab-bar-left',
        style: {
          display: 'none'
        },
        child: [
          // {
          //     class: 'af-launcher-tab-bar-left-top',
          //     child: [{
          //         tag: 'button',
          //         class: 'as-form-editor-vertical-tab-btn',
          //         attr: {
          //             'data-name': 'explore',
          //         },
          //         child: ['span.mdi.mdi-file-tree-outline', { text: 'Explorer' }]
          //     }]
          // }
        ]
      }, {
        "class": 'af-launcher-site-left'
      }, {
        "class": 'af-launcher-site-middle',
        child: {
          tag: _TabView["default"].tag,
          "class": ['metro-flat', 'af-launcher-main-tab-view']
        }
      }, {
        "class": 'af-launcher-site-right',
        child: [this.explorer.getWindow()]
      }, {
        style: {
          display: 'none'
        },
        "class": 'af-launcher-tab-bar-right',
        child: [{
          "class": 'af-launcher-tab-bar-right-top',
          child: [{
            tag: 'button',
            "class": 'as-form-editor-vertical-tab-btn',
            attr: {
              'data-name': 'explore'
            },
            child: ['span.mdi.mdi-file-tree-outline', {
              text: 'Explorer'
            }]
          }]
        }]
      }]
    }, {
      "class": 'af-launcher-footer',
      child: [{
        style: {
          display: 'none'
        },
        "class": 'af-launcher-tab-bar-bottom',
        child: [{
          tag: 'button',
          "class": 'as-form-editor-vertical-tab-btn',
          attr: {
            'data-name': 'explore'
          },
          child: ['span.mdi.mdi-file-tree-outline', {
            text: 'Explorer'
          }]
        }]
      }, this.$statusBar]
    }, {
      tag: _Hanger["default"],
      "class": 'af-launcher-resizer',
      attr: {
        'data-target': 'site-right-width',
        "data-matrix": '-1 0',
        'data-min': '150px'
      }
    }, {
      tag: _Hanger["default"],
      "class": 'af-launcher-resizer',
      attr: {
        'data-target': 'site-left-width',
        "data-matrix": '1 0',
        'data-min': '150px'
      }
    }]
  });
  this.$frameViewLeft = (0, _FCore.$)('.af-launcher-frame-view-left', this.$view);
  this.$mainTabView = (0, _FCore.$)('.af-launcher-main-tab-view', this.$view);
  this.$resizerLeft = (0, _FCore.$)('.af-launcher-resizer-left', this.$view);
  this.$siteLeft = (0, _FCore.$)('.af-launcher-site-left', this.$view);
  this.$siteRight = (0, _FCore.$)('.af-launcher-site-right', this.$view);
  // this.$siteLeft = $('.af-launcher-site-left', this.$view);
  // this.$frameExplorer = $('.af-launcher-frame-explorer', this.$siteLeft);
  // this.$tabBarLeft = $('.af-launcher-tab-bar-left', this.$siteLeft);
  // this.$frameExplorer.requestActive();

  this.$attachhook = (0, _FCore._)('attachhook').addTo(this.$view);
  this.$attachhook.requestUpdateSize = this.resizeCtrl.onDocumentResize.bind(this.resizeCtrl);
  this.$attachhook.once('attached', function () {
    _ResizeSystem["default"].add(_this.$attachhook);
    _this.resizeCtrl.onDocumentResize();
    _this.autoStateCtrl.onViewAttached();
  });
  this.resizeCtrl.onCreateView();
  this.userInteractionCtrl.onCreateView();
  this.taskMng.onCreateView();
  this.toolWindowMng.onCreateView();
};
FLauncher.prototype.onStart = function () {
  this.explorer.start(true);
  this.taskMng.onStart();
  this.toolWindowMng.start(true);
};
FLauncher.prototype.onResume = function () {
  this.explorer.resume();
  this.toolWindowMng.resume();
  this.taskMng.onResume();
};
FLauncher.prototype.onPause = function () {
  this.explorer.pause();
  this.toolWindowMng.pause();
  this.taskMng.onPause();
};
FLauncher.prototype.onStop = function () {
  this.explorer.stop();
  this.toolWindowMng.stop();
  this.taskMng.onStop();
};
FLauncher.prototype.onDestroy = function () {
  this.taskMng.onDestroy();
  this.toolWindowMng.destroy();
  // console.log('onDestroy', this.options.name);
};

/**
 *
 * @param clazz
 * @param {{id:string}|object} bundle
 * @returns {*}
 */
FLauncher.prototype.newTask = function (clazz, bundle) {
  return this.taskMng.newTask(clazz, bundle);
};
FLauncher.prototype.getTaskById = function (id) {
  return this.taskMng.getTaskById(id);
};
var _default = FLauncher;
/***
 * @extends Context
 * @param {FLauncher} launcher
 * @constructor
 */
exports["default"] = _default;
function FToolWindowManager(launcher) {
  _Context["default"].apply(this);
  this.laucher = launcher;
}
_OOP["default"].mixClass(FToolWindowManager, _Context["default"]);
FToolWindowManager.prototype.onCreateView = function () {};
FToolWindowManager.prototype.onStart = function () {};
FToolWindowManager.prototype.onResume = function () {};
FToolWindowManager.prototype.onPause = function () {};
FToolWindowManager.prototype.onStop = function () {};

/***/ }),

/***/ 44556:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(81329);
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _ProjectExplorer = _interopRequireDefault(__webpack_require__(44241));
var _PluginManager = _interopRequireDefault(__webpack_require__(19617));
var _CodeEditor = _interopRequireDefault(__webpack_require__(36243));
var _PhotoViewer = _interopRequireDefault(__webpack_require__(45741));
__webpack_require__(49844);
var _FlexFormEditor = _interopRequireDefault(__webpack_require__(64413));
var _FLauncher = _interopRequireDefault(__webpack_require__(37100));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FLTask = _interopRequireDefault(__webpack_require__(95778));
var _ComponentPicker = _interopRequireDefault(__webpack_require__(30674));
var _FOutline = _interopRequireDefault(__webpack_require__(43894));
var _MultiObjectPropertyEditor = _interopRequireDefault(__webpack_require__(95567));
var _EZUIEditor = _interopRequireDefault(__webpack_require__(81424));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/***
 * @extends FLTask
 * @constructor
 */
function FlexFormTask() {
  _FLTask["default"].apply(this, arguments);
}
_OOP["default"].mixClass(FlexFormTask, _FLTask["default"]);
FlexFormTask.prototype.MainFragmentClass = _FlexFormEditor["default"];
Object.defineProperty(FlexFormTask.prototype, 'editor', {
  get: function get() {
    return this.mainFragment;
  }
});

/***
 * @extends FLTask
 * @constructor
 */
function PhotoTask() {
  _FLTask["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PhotoTask, _FLTask["default"]);
PhotoTask.prototype.MainFragmentClass = _PhotoViewer["default"];

/***
 * @extends FLTask
 * @constructor
 */
function EZUITask() {
  _FLTask["default"].apply(this, arguments);
}
_OOP["default"].mixClass(EZUITask, _FLTask["default"]);
EZUITask.prototype.MainFragmentClass = _EZUIEditor["default"];

/***
 * @extends {FLauncher}
 * @param options
 * @constructor
 */
function FMLauncher(options) {
  _FLauncher["default"].apply(this, arguments);
  this.setContext(_R["default"].FORM_EDITOR, this);
  this.setContext(_R["default"].PROJECT_EXPLORER, this.explorer);
  this.propertyEditor = new _MultiObjectPropertyEditor["default"]();
  this.setContext(_R["default"].ALL_PROPERTY_EDITOR, this.propertyEditor);
  this.componentPicker = new _ComponentPicker["default"]();
  this.setContext(_R["default"].COMPONENT_PICKER, this.componentPicker);
  this.componentOutline = new _FOutline["default"]();
  this.setContext(_R["default"].COMPONENT_OUTLINE, this.componentOutline);
  this.componentPicker.attach(this);
  this.propertyEditor.attach(this);
}
_OOP["default"].mixClass(FMLauncher, _FLauncher["default"]);
FMLauncher.prototype.CONFIG_STORE_KEY = "AS_FormEditor_config";
FMLauncher.prototype.classes = Object.assign({}, FMLauncher.prototype.classes);
FMLauncher.prototype.classes.Explorer = _ProjectExplorer["default"];
FMLauncher.prototype.SUPPORT_EDITOR = {
  form: _FlexFormEditor["default"],
  image: _PhotoViewer["default"],
  jpg: _PhotoViewer["default"]
};
FMLauncher.prototype.SUPPORT_TASK = {
  form: FlexFormTask,
  image: PhotoTask,
  jpg: PhotoTask,
  ezui: EZUITask
};
Object.keys(_CodeEditor["default"].prototype.TYPE_MODE).forEach(function (typeName) {
  FMLauncher.prototype.SUPPORT_EDITOR[typeName] = _CodeEditor["default"];
});
FMLauncher.prototype.createView = function () {
  _FLauncher["default"].prototype.createView.apply(this);
  this.$siteRight.addChild(this.propertyEditor.getWindow());
  this.$siteLeft.addChild(this.componentPicker.getWindow());
  this.$siteLeft.addChild(this.componentOutline.getWindow());
};
FMLauncher.prototype.openProject = function (name) {
  this.explorer.openProject(name);
};

/**
 *
 * @param {string} type
 * @param {string} ident
 * @param {string} name
 * @param {KVFormContentArgs|Object} contentArguments
 * @param {string} desc
 */
FMLauncher.prototype.openItem = function (type, ident, name, contentArguments, desc) {
  var task = this.getTaskById(ident);
  if (task) {
    task.requestActive();
    return;
  }
  var accumulator = {
    type: type,
    name: name,
    contentArguments: contentArguments,
    id: ident,
    sync: Promise.resolve(),
    waitFor: function waitFor(sync) {
      this.sync = Promise.all([sync, this.sync]);
    },
    desc: desc,
    formEditor: this
  };
  task = this.newTask(this.SUPPORT_TASK[type], accumulator);
  accumulator.editor = task.mainFragment;
  _PluginManager["default"].exec(this, _R["default"].PLUGINS.LOAD_CONTENT_DATA, accumulator);
};
FMLauncher.prototype.getEditorHolderByEditor = function (editor) {
  return this.taskMng.tasks.find(function (it) {
    return it.mainFragment === editor;
  });
};
var _default = FMLauncher;
exports["default"] = _default;

/***/ }),

/***/ 43894:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.OutlineDelegate = OutlineDelegate;
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(30402);
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ExpTree = _interopRequireWildcard(__webpack_require__(87326));
var _FFloatWindow = _interopRequireDefault(__webpack_require__(72649));
var _stringGenerate = __webpack_require__(10713);
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _utils = __webpack_require__(84512);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/***
 * @augments FFloatWindow
 * @constructor
 */
function FOutline() {
  _FFloatWindow["default"].call(this);
  _BaseEditor["default"].call(this);
  this.$view = null;
  this.idPrefix = (0, _stringGenerate.randomIdent)(3);
  /**
   *
   * @type {OutlineDelegate}
   * @private
   */
  this._delegate = null;
  this.$focusNode = undefined;
  this._lastPressTime = 0;
  this.$nodesById = {};
  this._savedStatus = {};
  this._selectedIds = {};
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
}
_OOP["default"].mixClass(FOutline, _FFloatWindow["default"], _BaseEditor["default"]);
FOutline.prototype.windowTitle = 'Outline';
FOutline.prototype._updateAllTree = function () {
  var _this = this;
  this.$treeCtn.clearChild();
  if (!this._delegate) return;
  var treeData = this._delegate.getTreeData();
  if (!treeData) treeData = [];else if (!Array.isArray(treeData)) treeData = [treeData];
  this.$nodesById = {};
  var createTree = function createTree(nodeData) {
    var nodeElt = _this._makeNode();
    nodeData.id = nodeData.id || (0, _stringGenerate.randomIdent)(5);
    nodeElt.data = nodeData;
    nodeElt.name = nodeData.name;
    nodeElt.icon = nodeData.icon;
    nodeElt.id = _this.idPrefix + nodeData.id;
    _this.$nodesById[nodeData.id] = nodeElt;
    if (_this._selectedIds[nodeData.id]) nodeElt.addClass('as-component-outline-node-selected');
    if (nodeData.children) {
      nodeElt.status = 'open';
      if (['close', 'open'].indexOf(_this._savedStatus[nodeElt.id]) >= 0) nodeElt.status = _this._savedStatus[nodeElt.id];
      nodeData.children.map(function (d) {
        return createTree(d);
      }).forEach(function (elt) {
        return nodeElt.addChild(elt);
      });
    }
    return nodeElt;
  };
  this.$treeCtn.addChild(treeData.map(function (d) {
    return createTree(d);
  }));
  this.notifySelectedChange();
};
FOutline.prototype.notifyTreeChange = function (data) {
  //todo: optimize
  this._updateAllTree();
};
FOutline.prototype.notifySelectedChange = function (data) {
  var _this2 = this;
  if (!this._delegate) return;
  var selectedIdList = this._delegate.getSelectedIdList();
  var focusId = selectedIdList[selectedIdList.length - 1];
  selectedIdList = selectedIdList.reduce(function (ac, cr) {
    ac[cr] = true;
    return ac;
  }, {});
  Object.keys(this._selectedIds).forEach(function (id) {
    if (_this2.$nodesById[id] && !selectedIdList[id]) {
      _this2.$nodesById[id].removeClass('as-component-outline-node-selected').removeClass('as-component-outline-node-focus');
    }
  });
  this._selectedIds = selectedIdList;
  Object.keys(this._selectedIds).forEach(function (id) {
    if (_this2.$nodesById[id]) {
      _this2.$nodesById[id].addClass('as-component-outline-node-selected');
      if (id === focusId) {
        (0, _utils.vScrollIntoView)(_this2.$nodesById[id].$node);
        _this2.$nodesById[id].addClass('as-component-outline-node-focus');
      } else {
        _this2.$nodesById[id].removeClass('as-component-outline-node-focus');
      }
    }
  });
};
FOutline.prototype.ev_contextNode = function (nodeElt, event) {
  var _this3 = this;
  if (!this._delegate) return;
  var menuProps = this._delegate.getNodeContextMenu(nodeElt);
  if (!menuProps) return;
  menuProps = Object.assign({}, menuProps);
  menuProps.extendStyle = Object.assign({
    fontSize: '12px'
  }, menuProps.extendStyle || {});
  event.showContextMenu(menuProps, function (event) {
    _this3._delegate.onNodeSelectContextMenu(nodeElt, event.menuItem, event);
  });
};
FOutline.prototype._makeNode = function () {
  var savedStatus = this._savedStatus;
  /**
   *
   * @type {ExpTree}
   */
  var node = _({
    tag: _ExpTree["default"].tag,
    on: {
      statuschange: function statuschange() {
        savedStatus[this.id] = this.status;
      }
    }
  });
  node.on('press', this.ev_PressNode.bind(this, node));
  node.getNode().defineEvent('contextmenu').on('contextmenu', this.ev_contextNode.bind(this, node));
  return node;
};
FOutline.prototype.ev_PressNode = function (node, event) {
  if (this._delegate) this._delegate.onClickNode(node, event);
};
FOutline.prototype.createView = function () {
  /**
   *
   * @type {SearchTextInput}
   */
  this.$searchInput = _({
    tag: _Searcher["default"]
  });
  this.$treeCtn = _('.as-component-outline-tree-ctn.as-bscroller');
  this.$treeCtn.name = "NoName";
  this.$view = _({
    "class": ['as-component-outline'],
    child: [this.$searchInput, this.$treeCtn]
  });
  this.expSearcher = new _ExpTree.ExpSearcher(this.$treeCtn, {
    inputElt: this.$searchInput
  });
};
Object.defineProperty(FOutline.prototype, 'delegate', {
  set: function set(delegate) {
    if (this._delegate) {
      if (this.$searchInput) {
        this._delegate.savedQuery = this.$searchInput.value;
      }
      this._delegate.partner = null;
    }
    this._delegate = delegate;
    if (delegate) {
      if (delegate.partner && delegate.partner.delegate === delegate) delegate.partner.delegate = null; //swap partner
      delegate.partner = this;
    }
    if (this.$searchInput && delegate) {
      this.$searchInput.value = delegate.savedQuery;
    }
    this._updateAllTree();
    if (this.expSearcher) {
      this.expSearcher.reset();
      if (delegate && delegate.savedQuery.trim()) {
        this.expSearcher.query(delegate.savedQuery);
      }
    }
  },
  get: function get() {
    return this._delegate;
  }
});
var _default = FOutline;
exports["default"] = _default;
function OutlineDelegate() {
  this.partner = null;
  this.savedQuery = ''; //save query for next time
}

OutlineDelegate.prototype.getTreeData = function () {
  return [];
};

/**
 *
 * @param  nodeElt
 * @returns {{items: *[]} | null}
 */
OutlineDelegate.prototype.getNodeContextMenu = function (nodeElt) {
  return {
    items: []
  };
};

/**
 *
 * @returns {string[]} - last id is focus id
 */
OutlineDelegate.prototype.getSelectedIdList = function () {
  return [];
};
OutlineDelegate.prototype.onNodeSelectContextMenu = function (nodeElt, item, event) {};
OutlineDelegate.prototype.onClickNode = function (nodeElt, event) {};
OutlineDelegate.prototype.notifyTreeChange = function (data) {
  if (this.partner) this.partner.notifyTreeChange(Object.assign({
    sender: this
  }, data));
};
OutlineDelegate.prototype.notifySelectedChange = function () {
  if (this.partner) this.partner.notifySelectedChange();
};
OutlineDelegate.prototype.renameNode = function (nodeId, newName) {
  if (!this.partner) return;
  var nodeElt = this.partner.$nodesById[nodeId];
  if (!nodeElt) return;
  nodeElt.name = newName;
};

/***/ }),

/***/ 65380:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 *
 * @param {FLauncher} launcher
 * @constructor
 */
function FLAutoStateController(launcher) {
  this.launcher = launcher;
  this.trackedTabFrames = [];
  this['onTabFrameStateChange'] = this['onTabFrameStateChange'].bind(this);
  this.checkInv = -1;
  this.state = 'STANDBY';
}
FLAutoStateController.prototype.onViewAttached = function () {
  var _this = this;
  this.state = 'RUNNING';
  var p = this.launcher.$view.parentElement;
  while (p) {
    if (p.isSupportedEvent && p.isSupportedEvent('active') && p.isSupportedEvent('inactive')) {
      this.trackedTabFrames.push(p);
      p.on('active', this.onTabFrameStateChange).on('inactive', this.onTabFrameStateChange).on('remove', this.onTabFrameStateChange);
    }
    p = p.parentElement;
  }
  this.launcher.start(!this._checkIsActivated());
  this.checkInv = setInterval(function () {
    if (!_this.launcher.$view.isDescendantOf(document.body)) {
      _this._stopTracking();
      _this.launcher.destroy();
    }
  }, 3000);
};
FLAutoStateController.prototype._stopTracking = function () {
  var _this2 = this;
  if (this.state !== 'RUNNING') return;
  if (this.checkInv > 0) {
    clearInterval(this.checkInv);
    this.checkInv = -1;
  }
  this.trackedTabFrames.forEach(function (p) {
    p.off('active', _this2.onTabFrameStateChange).off('inactive', _this2.onTabFrameStateChange).off('remove', _this2.onTabFrameStateChange);
  });
  this.trackedTabFrames = [];
};
FLAutoStateController.prototype._checkIsActivated = function () {
  return this.trackedTabFrames.length === 0 || this.trackedTabFrames.every(function (elt) {
    if (elt.parentElement.classList.contains('absol-tabview-container')) {
      return !elt.parentElement.classList.contains('absol-tabview-container-hidden');
    } else {
      return elt.parentElement.classList.contains('absol-active');
    }
  });
};
FLAutoStateController.prototype.onTabFrameStateChange = function () {
  if (!this.launcher.$view.isDescendantOf(document.body)) {
    this._stopTracking();
    this.launcher.destroy();
  } else {
    if (this._checkIsActivated()) this.launcher.start();else if (this.launcher.state === "RUNNING") this.launcher.pause();
  }
};
var _default = FLAutoStateController;
exports["default"] = _default;

/***/ }),

/***/ 82938:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _stringFormat = __webpack_require__(22294);
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _utils = __webpack_require__(16907);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function FLResizeController(launcher) {
  this.launcher = launcher;
  this.$resizing = null;
}
FLResizeController.prototype.onCreateView = function () {
  var _this = this;
  this.$resizers = (0, _FCore.$$)('.af-launcher-resizer', this.launcher.$view);
  this.$resizers.forEach(function (elt) {
    elt.on({
      draginit: _this.ev_dragInit.bind(_this),
      dragstart: _this.ev_dragStart.bind(_this),
      drag: _this.ev_drag.bind(_this),
      dragend: _this.ev_dragEnd.bind(_this),
      dragdeinit: _this.ev_dragDeinit.bind(_this)
    });
  });
  this.$modal = (0, _FCore._)({
    tag: _Modal["default"],
    "class": 'af-launcher-resize-modal'
  });
};
FLResizeController.prototype.onDocumentResize = function () {
  var newBound = this.launcher.$view.getBoundingClientRect();
  if (this.bound && newBound.width === this.bound.width && newBound.height === this.bound.height) return;
  this.bound = newBound;
  this.launcher.$view.addStyle({
    '--f-launcher-client-width': this.bound.width + 'px',
    '--f-launcher-client-height': this.bound.height + 'px'
  });
};
FLResizeController.prototype.ev_dragInit = function (event, sender) {
  var _this2 = this;
  event.preventDefault();
  this.$resizing = sender;
  this.styleTarget = this.$resizing.attr('data-target').split(/\s+/);
  this.configTarget = this.styleTarget.map(function (s) {
    return (0, _stringFormat.kebabCaseToCamelCase)(s);
  });
  this.initConfigValue = this.configTarget.map(function (s) {
    return _this2.launcher.config[s];
  });
  this.styleMatrix = this.$resizing.attr('data-matrix').split(/\s+/).map(function (s) {
    return parseFloat(s);
  });
  this.minVaule = ((0, _utils.parseMeasureValue)(this.$resizing.attr('data-min')) || {
    value: 0
  }).value;
  this.$modal.addTo(document.body).addStyle('cursor', sender.getComputedStyleValue('cursor'));
};
FLResizeController.prototype.ev_dragStart = function (event, sender) {
  event.preventDefault();
};
FLResizeController.prototype.ev_drag = function (event) {
  var _this3 = this;
  var d = event.currentPoint.sub(event.startingPoint);
  this.styleTarget.forEach(function (st, i) {
    var configValue = _this3.initConfigValue[i];
    var newConfigValue = configValue + _this3.styleMatrix[i * 2] * d.x + _this3.styleMatrix[i * 2 + 1] * d.y;
    newConfigValue = Math.max(newConfigValue, _this3.minVaule);
    _this3.launcher.$view.addStyle('--f-launcher-' + st, newConfigValue + 'px');
    _this3.launcher.config[_this3.configTarget[i]] = newConfigValue;
  });
  _ResizeSystem["default"].updateDown(this.launcher.$view);
};
FLResizeController.prototype.ev_dragEnd = function (event) {
  this.launcher.saveConfig(true);
};
FLResizeController.prototype.ev_dragDeinit = function (event) {
  this.$modal.remove();
};
var _default = FLResizeController;
exports["default"] = _default;

/***/ }),

/***/ 95778:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _GrandContext = _interopRequireDefault(__webpack_require__(84179));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TabFrame = _interopRequireDefault(__webpack_require__(13089));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _FCore = __webpack_require__(51518);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends {GrandContext}
 * @param bundle
 * @constructor
 */
function FLTask(bundle) {
  var _this = this;
  _GrandContext["default"].apply(this);
  this.taskName = bundle.name || this.taskName;
  this.bundle = bundle;
  this.setContext(_R["default"].BUNDLE, bundle);
  this.setContext(_R["default"].TASK, this);
  Object.defineProperty(this, 'id', {
    value: this.computeIdent(),
    enumerable: true
  });
  this.mainFragment = null;
  if (this.MainFragmentClass) {
    this.mainFragment = new this.MainFragmentClass();
  }
  this.navigatorFragments = this.navigators.reduce(function (ac, cr) {
    ac[cr.name] = new cr.FragmentClass();
    ac[cr.name].attach(_this);
    return ac;
  }, {});
}
_OOP["default"].mixClass(FLTask, _GrandContext["default"]);
FLTask.prototype.taksIcon = null;
FLTask.prototype.taskName = "NoName";

//adapt old version of tab holder
Object.defineProperty(FLTask.prototype, 'name', {
  get: function get() {
    return this.taskName;
  },
  set: function set(value) {
    if (this.$tab) {
      this.$tab.name = value;
      this.taskName = value;
    }
  }
});
Object.defineProperty(FLTask.prototype, 'modified', {
  get: function get() {
    return this._modified;
  },
  set: function set(value) {
    value = !!value;
    if (this.$tab) {
      this.$tab.modified = value;
    }
    this._modified = value;
  }
});
FLTask.prototype.onStart = function () {
  var _this2 = this;
  this.mainFragment.start(true);
  this.navigators.forEach(function (name) {
    return _this2.navigatorFragments[name].start(true);
  });
};
FLTask.prototype.onResume = function () {
  var _this3 = this;
  this.mainFragment.resume();
  this.navigators.forEach(function (name) {
    return _this3.navigatorFragments[name].resume();
  });
};
FLTask.prototype.onPause = function () {
  var _this4 = this;
  this.mainFragment.pause();
  this.navigators.forEach(function (name) {
    return _this4.navigatorFragments[name].pause();
  });
};
FLTask.prototype.onStop = function () {
  var _this5 = this;
  this.mainFragment.stop();
  this.navigators.forEach(function (name) {
    return _this5.navigatorFragments[name].stop();
  });
};
FLTask.prototype.onDestroy = function () {
  var _this6 = this;
  this.mainFragment.destroy();
  this.navigators.forEach(function (name) {
    return _this6.navigatorFragments[name].destroy();
  });
};
FLTask.prototype.onAttached = function () {
  /***
   *
   * @type {FLauncher}
   */
  this.laucher = this.getContext(_R["default"].LAUNCHER);
  if (this.mainFragment) this.mainFragment.attach(this);
};
FLTask.prototype.computeIdent = function () {
  return this.bundle.id || (0, _utils.keyStringOf)(this.bundle);
};
FLTask.prototype.attachView = function () {
  var _this7 = this;
  this.$tab = (0, _FCore._)({
    tag: _TabFrame["default"].tag,
    "class": 'af-launcher-main-tab-frame',
    child: this.mainFragment.getView(),
    props: {
      name: this.taskName,
      tabIcon: this.taksIcon,
      modified: this.modified
    }
  });
  this.laucher.$mainTabView.addChild(this.$tab);
  this.$tab.on({
    active: function active() {
      _this7.laucher.taskMng.onActiveTask(_this7);
      _this7.start();
    },
    inactive: function inactive() {
      _this7.pause();
      _this7.laucher.taskMng.onInactiveTask(_this7);
    },
    remove: function remove() {
      _this7.destroy();
      _this7.laucher.taskMng.removeTask(_this7);
    }
  });
};
FLTask.prototype.requestActive = function () {
  this.$tab.requestActive();
};
FLTask.prototype.remove = function () {
  if (this.laucher) {
    this.laucher.$mainTabView.removeTab(this.$tab.id);
  }
};
/****
 *
 * @type {{name:string, icon:any, FragmentClass: Function, displayName}[]}
 */
FLTask.prototype.navigators = [];
FLTask.prototype.MainFragmentClass = null;
var _default = FLTask;
exports["default"] = _default;

/***/ }),

/***/ 65768:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function FLTaskManager(launcher) {
  this.launcher = launcher;
  /***
   *
   * @type {null| FLTask}
   */
  this.activatedTask = null;
  this.tasks = [];
}
FLTaskManager.prototype.newTask = function (clazz, bundle) {
  var task = new clazz(bundle);
  this.tasks.push(task);
  task.attach(this.launcher);
  task.attachView();
  this.onActiveTask(task);
  switch (this.launcher.state) {
    case "RUNNING":
      task.start();
      break;
    case "PAUSE":
      task.start(true);
      break;
    case "STANDBY":
      break;
    case "STOP":
      break;
  }
  return task;
};
FLTaskManager.prototype.getTaskById = function (id) {
  return this.tasks.find(function (task) {
    return task.id === id;
  });
};
FLTaskManager.prototype.onStart = function () {
  if (this.activatedTask) this.activatedTask.start(true);
};
FLTaskManager.prototype.onPause = function () {
  if (this.activatedTask) {
    console.log(this.activatedTask.id);
    this.activatedTask.pause();
  }
};
FLTaskManager.prototype.onResume = function () {
  if (this.activatedTask) {
    this.activatedTask.resume();
  }
};
FLTaskManager.prototype.onStop = function () {
  if (this.activatedTask) {
    this.activatedTask.stop();
  }
};
FLTaskManager.prototype.onDestroy = function () {
  this.tasks.forEach(function (task) {
    task.destroy();
  });
};
FLTaskManager.prototype.removeTask = function (task) {
  if (this.activatedTask === task) this.onInactiveTask(task);
  var idx = this.tasks.indexOf(task);
  if (idx >= 0) {
    this.tasks.splice(idx, 1);
  }
};
FLTaskManager.prototype.onCreateView = function () {
  // this.$tabView = this.launcher.$mainTabView;
};

/***
 *
 * @param {FLTask|*} task
 */
FLTaskManager.prototype.onActiveTask = function (task) {
  this.activatedTask = task;
  this.launcher.explorer.focusNode(task.id);
};
FLTaskManager.prototype.onInactiveTask = function (task) {
  if (this.activatedTask === task) this.activatedTask = null;
};
var _default = FLTaskManager;
exports["default"] = _default;

/***/ }),

/***/ 97184:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 *
 * @param {FMLauncher|FLauncher} launcher
 * @constructor
 */
function FLUserInteractionController(launcher) {
  this.launcher = launcher;
  this.ctrlKey = false;
  this.altKey = false;
  this.capsLockKey = false;
  this.shiftKey = false;
  this.clientX = 0;
  this.clientY = 0;
}
FLUserInteractionController.prototype.onCreateView = function () {
  this.launcher.$view.on('keydown', this.onEvent.bind(this)).on('keydown', this.onEvent.bind(this)).on('keyup', this.onEvent.bind(this)).on('mousemove', this.onEvent.bind(this)).on('mousedown', this.onEvent.bind(this)).on('mouseup', this.onEvent.bind(this));
  this.$keyCapsLock = (0, _FCore._)('span.mdi.mdi-apple-keyboard-caps').addStyle('opacity', '0.2');
  this.$keyShift = (0, _FCore._)('span.mdi.mdi-apple-keyboard-shift').addStyle('opacity', '0.2');
  this.$keyCtrl = (0, _FCore._)('span.mdi.mdi-apple-keyboard-command').addStyle('opacity', '0.2');
  this.$keyAlt = (0, _FCore._)('span.mdi.mdi-apple-keyboard-option').addStyle('opacity', '0.2');
  this.$statusItem = (0, _FCore._)({
    tag: 'span',
    "class": ['as-status-bar-item', 'as-keyboard-status'],
    child: [{
      text: ' '
    }, 'span.mdi.mdi-keyboard-variant', this.$keyCapsLock, this.$keyShift, this.$keyCtrl, this.$keyAlt, {
      text: ' '
    }]
  });
  this.launcher.$statusBar.$rightCtn.addChild(this.$statusItem);
};

/***
 *
 * @param {MouseEvent|KeyboardEvent} event
 */
FLUserInteractionController.prototype.onEvent = function (event) {
  this.ctrlKey = event.ctrlKey;
  this.altKey = event.altKey;
  this.shiftKey = event.shiftKey;
  this.capsLockKey = event.getModifierState("CapsLock");
  if (event.clientX !== undefined) {
    this.clientX = event.clientX;
    this.clientY = event.clientY;
  }
  this.$keyShift.addStyle('opacity', this.shiftKey ? '1' : 0.1);
  this.$keyCtrl.addStyle('opacity', this.ctrlKey ? '1' : 0.1);
  this.$keyCapsLock.addStyle('opacity', this.capsLockKey ? '1' : 0.1);
  this.$keyAlt.addStyle('opacity', this.altKey ? '1' : 0.1);
};
var _default = FLUserInteractionController;
exports["default"] = _default;

/***/ }),

/***/ 30674:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _RelativeLayout = _interopRequireDefault(__webpack_require__(56061));
var _DateInput = _interopRequireDefault(__webpack_require__(68452));
var _TextInput = _interopRequireDefault(__webpack_require__(72386));
var _TextArea = _interopRequireDefault(__webpack_require__(48310));
var _NumberInput = _interopRequireDefault(__webpack_require__(53422));
var _ComboBox = _interopRequireDefault(__webpack_require__(1956));
var _Radio = _interopRequireDefault(__webpack_require__(57031));
var _Checkbox = _interopRequireDefault(__webpack_require__(29370));
var _Label = _interopRequireDefault(__webpack_require__(31608));
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
__webpack_require__(35646);
var _Draggable = _interopRequireDefault(__webpack_require__(39891));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _PluginManager = _interopRequireDefault(__webpack_require__(19617));
var _ComponentTreeList = _interopRequireDefault(__webpack_require__(17214));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FFloatWindow = _interopRequireDefault(__webpack_require__(72649));
var _ShareConfiguration = _interopRequireDefault(__webpack_require__(23376));
var _BaseComponent = _interopRequireDefault(__webpack_require__(32306));
var _ExpTree = __webpack_require__(87326);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/***
 * @augments EventEmitter
 * @augments FFloatWindow
 * @constructor
 */
function ComponentPicker() {
  _FFloatWindow["default"].call(this);
  _EventEmitter["default"].call(this);
  this.$view = null;
  /**
   * @type {import('./LayoutEditor').default}
   */
  this.layoutEditor = null;
}
_OOP["default"].mixClass(ComponentPicker, _Context["default"], _FFloatWindow["default"]);
ComponentPicker.prototype.windowTitle = "Toolbox";
ComponentPicker.prototype.config = new _ShareConfiguration["default"]({
  storageKey: 'FM_COMPONENT_PICKER'
});
ComponentPicker.prototype.bindWithEditor = function (editor) {
  this.layoutEditor = editor;
};
ComponentPicker.prototype.getView = function () {
  var _this = this;
  if (this.$view) return this.$view;
  var recentTagDict = (this.config.get('recent_component_tags') || []).reduce(function (ac, cr) {
    ac[cr] = true;
    return ac;
  }, {});
  function toggleGroup() {
    this.status = {
      open: 'close',
      close: 'open'
    }[this.status];
  }

  /**
   *
   * @type {ExpTree}
   */
  this.$recent = _({
    tag: _ExpTree.ExpTree,
    props: {
      name: 'recent',
      status: 'open'
    }
  });
  var makeExp = function makeExp(node) {
    if (_typeof(node) === 'object') {
      return {
        tag: 'exptree',
        props: {
          name: node.text,
          status: 'close'
        },
        on: {
          press: toggleGroup
        },
        child: node.children ? node.children.map(makeExp) : []
      };
    } else if (typeof node === 'function') {
      if (recentTagDict[node.prototype.tag]) {
        _this.$recent.addChild(_({
          tag: 'exptree',
          props: {
            name: node.prototype.tag,
            icon: node.prototype.menuIcon,
            componentConstructor: node
          }
        }));
      }
      return {
        tag: 'exptree',
        props: {
          name: node.prototype.tag,
          icon: node.prototype.menuIcon,
          componentConstructor: node
        }
      };
    } else {
      console.error('Invalid node ', node);
    }
  };
  this.$all = _(makeExp(_ComponentTreeList["default"]));
  this.$view = _({
    "class": ['as-component-picker', 'as-bscroller'],
    child: [this.$recent, this.$all]
  });
  this.$all.status = 'open';
  setTimeout(function () {
    var context = {
      self: _this,
      toggleGroup: toggleGroup.bind(_this.$all),
      $view: _this.$view
    };
    _PluginManager["default"].exec(_this, _R["default"].PLUGINS.COMPONENT_PICKER_VIEW, context);
  }, 100);

  //todo: find and call
  _({
    tag: 'hanger',
    elt: this.$view,
    on: {
      predrag: this.ev_constructorPreDrag.bind(this),
      dragstart: this.ev_constructorBeginDrag.bind(this),
      drag: this.ev_constructorDrag.bind(this),
      dragend: this.ev_constructorEndDrag.bind(this),
      dblclick: this.ev_dblClick.bind(this)
    }
  });
  return this.$view;
};
ComponentPicker.prototype._findComponentConstructor = function (elt) {
  while (elt) {
    if (elt.componentConstructor) return elt.componentConstructor;
    elt = elt.parentElement;
  }
  return null;
};
ComponentPicker.prototype.pushToRecent = function (constructor) {
  if (typeof constructor !== "function" || constructor.prototype.type !== _BaseComponent["default"].prototype.type) {
    return;
  }
  var children = this.$recent.getChildren();
  var oldNode = children.find(function (child) {
    return child.componentConstructor === constructor;
  });
  if (oldNode) {
    oldNode.selfRemove();
  } else {
    oldNode = _({
      tag: _ExpTree.ExpTree,
      props: {
        name: constructor.prototype.tag,
        icon: constructor.prototype.menuIcon,
        componentConstructor: constructor
      }
    });
  }
  this.$recent.addChildBefore(oldNode, this.$recent.getChildren()[0]);
  children = this.$recent.getChildren();
  while (children.length > 10) {
    children.pop().selfRemove();
  }
  var tags = children.map(function (children) {
    return children.componentConstructor.prototype.tag;
  }).filter(function (x) {
    return !!x;
  });
  this.config.set('recent_component_tags', tags).save();
};
ComponentPicker.prototype.ev_dblClick = function (event) {
  if (!this.layoutEditor) return;
  var constructor = this._findComponentConstructor(event.target);
  if (!constructor) return;
  this.layoutEditor.layoutStructTool.addChildBySelected(constructor);
  this.pushToRecent(constructor);
};
ComponentPicker.prototype.ev_constructorPreDrag = function (event) {
  if (!this.layoutEditor || !this._findComponentConstructor(event.target)) {
    event.cancel();
  }
};
ComponentPicker.prototype.ev_constructorBeginDrag = function (event) {
  var constructor = this._findComponentConstructor(event.target);
  this._currentComponentConstructor = constructor;
  this.$modal = this.$modal || _('.as-component-picker-foreground');
  this.$higne = this.$higne || _('.as-component-picker-higne').addTo(this.$modal);
  this.$addBoxCtn = this.$addBoxCtn || _('.as-component-picker-add-box-container').addTo(this.$higne);
  this.$addBox = this.$addBox || _({
    "class": 'as-component-picker-add-box',
    child: {
      "class": 'as-component-picker-add-box-plus',
      child: 'span.mdi.mdi-plus'
    }
  }).addTo(this.$addBoxCtn);
  if (this.$addBoxIcon) this.$addBoxIcon.remove();
  this.$addBoxIcon = _(constructor.prototype && constructor.prototype.menuIcon || 'span.mdi.mdi-select-place').addTo(this.$addBox);
  this.$modal.addTo(document.body);
  if (this.layoutEditor.rootLayout) {
    this._dragRect = this.layoutEditor.rootLayout.domElt.getBoundingClientRect();
  } else {
    this._dragRect = undefined;
  }
};
ComponentPicker.prototype.ev_constructorEndDrag = function (event) {
  if (!this.$modal) return; //quick fix, must fix in Draggable
  this.$modal.remove();
  var constructor = this._currentComponentConstructor;
  var x = event.clientX;
  var y = event.clientY;
  var rect = this._dragRect;
  if (rect && rect.top <= y && rect.bottom >= y && rect.left <= x && rect.right >= x) {
    this.layoutEditor.addNewComponent(constructor, x - rect.left, y - rect.top);
  }
  this.pushToRecent(constructor);
};
ComponentPicker.prototype.ev_constructorDrag = function (event) {
  this.$addBoxCtn.addStyle({
    left: event.clientX + 'px',
    top: event.clientY + 'px'
  });
  var x = event.clientX;
  var y = event.clientY;
  var rect = this._dragRect;
  if (rect && rect.top <= y && rect.bottom >= y && rect.left <= x && rect.right >= x) {
    this.$addBox.addClass('as-can-drop');
  } else {
    this.$addBox.removeClass('as-can-drop');
  }
};
var _default = ComponentPicker;
exports["default"] = _default;

/***/ }),

/***/ 22157:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.LEComponentPropertyDelegate = LEComponentPropertyDelegate;
exports.LayoutOutlineDelegate = LayoutOutlineDelegate;
exports["default"] = void 0;
var _Assembler = _interopRequireWildcard(__webpack_require__(2326));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(1005);
__webpack_require__(86124);
var _R = _interopRequireDefault(__webpack_require__(25280));
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _UndoHistory = _interopRequireDefault(__webpack_require__(95394));
var _ComponentPropertiesEditor = _interopRequireDefault(__webpack_require__(50571));
var _LayoutEditorCmd = _interopRequireWildcard(__webpack_require__(34555));
var _ClipboardManager = _interopRequireDefault(__webpack_require__(14177));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _RelativeAnchorEditor = _interopRequireDefault(__webpack_require__(29098));
var _FmFragment = _interopRequireWildcard(__webpack_require__(9098));
var _BaseComponent = _interopRequireDefault(__webpack_require__(32306));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _CMDTool = _interopRequireDefault(__webpack_require__(8982));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
var _LEQuickPathController = _interopRequireDefault(__webpack_require__(49806));
var _LEUndoController = _interopRequireDefault(__webpack_require__(49489));
var _LERulerController = _interopRequireDefault(__webpack_require__(25934));
var _LEToolTabController = _interopRequireDefault(__webpack_require__(4562));
var _LEViewportController = _interopRequireDefault(__webpack_require__(41351));
var _LESelectController = _interopRequireDefault(__webpack_require__(14637));
var _LEEditingLayoutControl = _interopRequireDefault(__webpack_require__(68534));
var _LEAnchorEditorController = _interopRequireDefault(__webpack_require__(3314));
var _LEClipboardTool = _interopRequireDefault(__webpack_require__(11570));
var _LEBoundViewController = _interopRequireDefault(__webpack_require__(23307));
var _LETextEditTool = _interopRequireDefault(__webpack_require__(3283));
var _Scroller = __webpack_require__(87780);
var _FOutline = __webpack_require__(43894);
var _MultiObjectPropertyEditor = __webpack_require__(95567);
var _IndexedPropertyNames = _interopRequireDefault(__webpack_require__(63017));
var _Toast = _interopRequireDefault(__webpack_require__(68105));
var _OnsScreenWindow = _interopRequireDefault(__webpack_require__(28217));
var _FNode = __webpack_require__(88215);
var _utils = __webpack_require__(16907);
var _LinearAnchorEditor = _interopRequireDefault(__webpack_require__(41862));
var _HyperAnchorEditor = _interopRequireDefault(__webpack_require__(54577));
var _Constants = __webpack_require__(92311);
var _LELayoutStructTool = _interopRequireDefault(__webpack_require__(60733));
var _generator = __webpack_require__(18528);
var _CBComponentGroup = _interopRequireDefault(__webpack_require__(83935));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _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); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _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; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/***
 *
 */

/****
 * @extends BaseEditor
 * @constructor
 */
function LayoutEditor() {
  var _this = this;
  _BaseEditor["default"].call(this);
  _Assembler["default"].call(this);
  this._bindEvent();
  this.CMDTool = new _CMDTool["default"]();
  this._softScale = 1;
  var self = this;
  this.setContext(_R["default"].LAYOUT_EDITOR, this);
  this.setContext(_R["default"].HAS_CMD_EDITOR, this);
  this.setContext(_R["default"].CMD_TOOL, this.CMDTool);
  this.setupCmd(_LayoutEditorCmd["default"], _LayoutEditorCmd.LayoutEditorCmdDescriptors);
  this.outlineDelegate = new LayoutOutlineDelegate(this);
  this.lcEmitter = new _EventEmitter["default"]();
  this.setContext(_R["default"].LAYOUT_EDITOR_EMITTER, this.lcEmitter);
  this.undoHistory = new _UndoHistory["default"]();
  this.setContext(_R["default"].UNDO_HISTORY, this.undoHistory);
  /*
      this.cpeListenner = {
          change: function (event) {
              self.updateAnchorPosition();
              self.updateEditing();
              Dom.updateResizeSystem();
              if (event.name && event.name.match(/vAlign|hAlign|top|bottom|left|right/)) {
                  self.updateAnchor();
                  self.updateEditing();
              }
          },
          stopchange: function (event) {
              var compName = event.object ? event.object.getAttribute('name') : ('{' + event.objects.map(function (object) {
                  return object.getAttribute('name')
              }).join(', ') + '}');
              self.undoCtrl.commit('edit', compName + '.' + event.name + '');
              self.notifyUnsaved();
              if (event.name === 'name') {
                  self.outlineDelegate.notifyTreeChange();
              }
          }
      };
  */
  this.layoutStructTool = new _LELayoutStructTool["default"](this);
  this.quickPathCtrl = new _LEQuickPathController["default"](this);
  this.undoCtrl = new _LEUndoController["default"](this);
  this.toolTabCtrl = new _LEToolTabController["default"](this);
  this.rulerCtrl = new _LERulerController["default"](this);
  this.viewportCtrl = new _LEViewportController["default"](this);
  this.selectCtrl = new _LESelectController["default"](this);
  this.editingLayoutCtrl = new _LEEditingLayoutControl["default"](this);
  this.anchorEditorsCtrl = new _LEAnchorEditorController["default"](this);
  this.boundViewCtrl = new _LEBoundViewController["default"](this);
  this.clipboardCtrl = new _LEClipboardTool["default"](this);
  this.lastComponentPropertyDelegate = new LEComponentPropertyDelegate(this, []);

  /***
   *
   * @type {null|Context}
   */
  this.conponetEditTool = null;
  this.CMDTool.bindWithEditor(this);
  this.lcEmitter.on(_Constants.EV_COMP_BOUND_CHANGE, function () {
    _this.rulerCtrl.updateEditing();
    _this.boundViewCtrl.update();
    _this.anchorEditorsCtrl.updateAnchorEditorPositions();
  }).on(_Constants.EV_COMP_TREE_CHANGE, function () {
    _this.boundViewCtrl.update();
    _this.selectCtrl.calcSelectBoundStyle();
    _this.outlineDelegate.notifyTreeChange();
    _this.boundViewCtrl.update();
    _this.anchorEditorsCtrl.updateAnchorEditorPositions();
  }).on(_Constants.EV_SELECTED_COMP_CHANGE, function () {
    _this.outlineDelegate.notifySelectedChange();
    _this.notifyCmdChange();
  }).on(_Constants.EV_EDITING_LAYOUT_CHANGE, function () {
    _this.rulerCtrl.updateEditing();
  }).on(_Constants.EV_ANCHOR_EDITOR_CHANGE, function () {
    if (_this.lastComponentPropertyDelegate) {
      _this.lastComponentPropertyDelegate.updatePropertyRecursive('left');
      _this.lastComponentPropertyDelegate.updatePropertyRecursive('right');
      _this.lastComponentPropertyDelegate.updatePropertyRecursive('top');
      _this.lastComponentPropertyDelegate.updatePropertyRecursive('bottom');
      _this.lastComponentPropertyDelegate.updatePropertyRecursive('width');
      _this.lastComponentPropertyDelegate.updatePropertyRecursive('height');
    }
    _this.rulerCtrl.updateEditing();
    _this.boundViewCtrl.update();
  });
}
_OOP["default"].mixClass(LayoutEditor, _Assembler["default"], _BaseEditor["default"]);
LayoutEditor.prototype.CONFIG_STORE_KEY = "FM_LayoutEditor_config";
LayoutEditor.prototype.config = {};
LayoutEditor.prototype.tag2AnchorEditorClass = {
  RelativeLayout: _RelativeAnchorEditor["default"],
  LinearLayout: _LinearAnchorEditor["default"],
  ChainLayout: _LinearAnchorEditor["default"],
  HyperLayout: _HyperAnchorEditor["default"],
  GridLayout: _HyperAnchorEditor["default"]
};
LayoutEditor.prototype._bindEvent = function () {
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
};
LayoutEditor.prototype.setSoftScale = function (val) {
  //todo
  this._softScale = val;
  this.$editorSpace.addStyle('transform', 'scale(' + val + ')');
};
LayoutEditor.prototype.getSoftScale = function (val) {
  return this._softScale;
};
LayoutEditor.prototype.zoomBy = function (val) {
  this.setSoftScale(val * this._softScale);
};
LayoutEditor.prototype.onAttached = function () {
  this.flexFormEditor = this.getContext(_R["default"].FLEX_FORM_EDITOR);
  this.undoHistory.attach(this);
  this.propertyEditor = this.getContext(_R["default"].ALL_PROPERTY_EDITOR);
};
LayoutEditor.prototype.onStart = function () {
  this.undoHistory.start();
  this.CMDTool.start();
};
LayoutEditor.prototype.onResume = function () {
  /**
   * @type {import('../launcher/FMLauncher').default}
   */
  this.formEditor = this.getContext(_R["default"].FORM_EDITOR);
  this.flexFormEditor = this.getContext(_R["default"].FLEX_FORM_EDITOR);
  this.componentPicker = this.getContext(_R["default"].COMPONENT_PICKER);
  this.componentPicker.bindWithEditor(this);
  this.selfHolder = this.formEditor.getEditorHolderByEditor(this);
  this.outline = this.getContext(_R["default"].COMPONENT_OUTLINE);
  if (this.outline) this.outline.delegate = this.outlineDelegate;
  /**
   * @type {import('../editor/UndoHistory').default}
   */
  this.undoHistory.resume();
  // this.componentOtline.resume();
  /**
   * @type {import('../fragment/CMDTool'.default)}
   */

  _ClipboardManager["default"].on('set', this.ev_clipboardSet);
  this.getView().focus();
  this.rulerCtrl.onEditorResume();
  if (this.propertyEditor && this.lastComponentPropertyDelegate) {
    this.propertyEditor.delegate = this.lastComponentPropertyDelegate;
  }
};
LayoutEditor.prototype.onPause = function () {
  // this.componentPropertiesEditor.off(this.cpeListenner);
  // this.componentPicker.bindWithEditor(null);

  // release undoHistory
  this.undoHistory.pause();
  // this.componentOtline.pause();

  if (this.CMDTool) {
    this.CMDTool.pause();
  }
  _ClipboardManager["default"].off('set', this.ev_clipboardSet);
  this.getView().blur();
  this.rulerCtrl.onEditorPause();
  if (this.outline && this.outline.delegate === this.outlineDelegate) {
    this.outline.delegate = null;
  }
};
LayoutEditor.prototype.onStop = function () {
  this.undoHistory.stop();
};
LayoutEditor.prototype.onDestroy = function () {
  this.undoHistory.destroy();
  if (this.autoDestroyInt > 0) {
    clearInterval(this.autoDestroyInt);
  }
};

/**
 * call whenever component is edited, event will not be fired if disable publicDataChange flag
 */
LayoutEditor.prototype.notifyDataChange = function () {
  this.emit('change', {
    type: 'change',
    target: this
  }, this);
};
LayoutEditor.prototype.createView = function () {
  var _this2 = this;
  var self = this;
  this.$view = _({
    "class": ['as-layout-editor'],
    attr: {
      tabindex: '1'
    },
    child: [{
      "class": 'as-layout-editor-left',
      child: [{
        "class": 'as-layout-editor-header',
        child: [{
          "class": 'as-layout-editor-cmd-tool-container',
          child: this.CMDTool.getView()
        }, {
          "class": 'as-layout-editor-quickpath-container',
          child: {
            tag: 'quickpath'
          }
        }]
      }, {
        "class": 'as-layout-editor-body',
        child: [{
          "class": 'as-layout-editor-measure-container',
          child: [{
            "class": 'as-layout-editor-vrule-container',
            child: 'vruler'
          }, {
            "class": 'as-layout-editor-hrule-container',
            child: 'hruler'
          }, {
            "class": 'as-layout-editor-background-container'
          }, {
            "class": ["as-layout-editor-space-container"],
            child: [{
              "class": 'as-layout-editor-space',
              child: [{
                "class": 'as-layout-editor-layout-container'
              }, 'svg.as-layout-editor-overlay-graphic', {
                "class": 'as-layout-editor-foreground',
                extendEvent: 'contextmenu',
                on: {
                  contextmenu: this.ev_contextMenuLayout.bind(this)
                }
              }]
            }, {
              tag: _Scroller.VScrollbar,
              "class": 'as-layout-editor-v-scroll-bar'
            }, {
              tag: _Scroller.HScrollbar,
              "class": 'as-layout-editor-h-scroll-bar'
            }]
          }]
        }]
      }]
    }],
    on: {
      keydown: this.ev_cmdKeyDown.bind(this)
    }
  });
  this.$history = this.undoHistory.getView();
  /**
   *
   * @type {OnScreenWindow}
   */
  this.$historyCtn = _({
    tag: _OnsScreenWindow["default"],
    "class": 'as-undo-history-window',
    child: this.$history,
    props: {
      windowTitle: 'History',
      windowActions: [{
        name: 'close',
        icon: 'span.mdi.mdi-close'
      }]
    },
    on: {
      relocation: function relocation() {
        var bound = _this2.$historyCtn.getBoundingClientRect();
        _this2.config.historyWindow = {
          left: bound.left,
          top: bound.top,
          width: bound.width,
          height: bound.height
        };
        _this2.saveConfig();
      },
      action: function action() {
        _this2.$historyCtn.remove();
      }
    }
  });
  this.$historyCtn.$header.hangOn = 4;
  this.$header = $('.as-layout-editor-header', this.$view);
  this.$editorSpace = $('.as-layout-editor-space', this.$view);
  this.$layoutCtn = $('.as-layout-editor-layout-container', this.$view);
  this.$foreground = $('.as-layout-editor-foreground', this.$view);
  // .on('mousedown', this.ev_mousedownForeground.bind(this));//todo
  this.$overlayGraphic = $('svg.as-layout-editor-overlay-graphic', this.$view);
  this.$vscrollbar = $('.as-layout-editor-v-scroll-bar', this.$view);
  this.$hscrollbar = $('.as-layout-editor-h-scroll-bar', this.$view);
  this.quickPathCtrl.onCreateView();
  this.rulerCtrl.onCreateView();
  this.toolTabCtrl.onCreateView();
  this.viewportCtrl.onCreateView();
  this.selectCtrl.onCreateView();
  this.editingLayoutCtrl.onCreateView();
  this.anchorEditorsCtrl.onCreateView();
  this.boundViewCtrl.onCreateView();
  this.$attachHook = _('attachhook').on('attached', function () {
    this.updateSize = self.updateSize.bind(self);
    _Dom["default"].addToResizeSystem(this);
    self.updateSize();
  }).addTo(this.$view);
  this.$editorSpaceCtn = $('.as-layout-editor-space-container', this.$view).on('click', this.ev_clickEditorSpaceCtn);
  this.autoDestroyInt = setInterval(function () {
    if (!self.$view.isDescendantOf(document.body)) {
      self.destroy();
    }
  }, 6900);
  this.$mouseSelectingBox = _('.as-layout-editor-mouse-selecting-box');
  this.$measureCtn = $('.as-layout-editor-measure-container', this.$view);
  // this.$vscrollbar = $('.as-layout-editor-v-scroll-bar', this.$view);
  this.$layoutCtn.requestUpdateSize = function () {
    // console.log('ctn request update')
  };
  this.$view.layoutEditor = this;
};
/**
 *
 * @param {UndoTypeNames} type
 * @param {string} descriptor
 */
LayoutEditor.prototype.commitChange = function (type, descriptor) {
  this.undoCtrl.commit(type, descriptor);
  this.notifyUnsaved();
  this.notifyDataChange();
};
LayoutEditor.prototype.ev_clickEditorSpaceCtn = function (event) {
  if (event.target === this.$editorSpaceCtn) {
    this.setActiveComponent();
  }
};
LayoutEditor.prototype.ev_mousedownForeground = function (event) {
  if (!_EventEmitter["default"].isMouseLeft(event)) return;
  if (event.target !== this.$foreground) return;
  var hitComponent = this.findComponentsByMousePosition(event.clientX, event.clientY);
  if (hitComponent) {
    if (event.shiftKey) this.toggleActiveComponent(hitComponent);else this.setActiveComponent(hitComponent);
    var anchorEditor = this.anchorEditors[this.anchorEditors.length - 1];

    //cheating
    var repeatedEvent = _EventEmitter["default"].copyEvent(event, {
      target: $('.as-resize-box-body', anchorEditor.$resizeBox),
      preventDefault: event.preventDefault.bind(event)
    });
    anchorEditor.$resizeBox.eventHandler.mouseDownBody(repeatedEvent);
    this.$view.focus(); // layouteditor may be not focus before, prevent default effect make it not focus

    // prevent auto toggle with click event
    anchorEditor.preventClick = true;
    anchorEditor.once('click', function () {
      setTimeout(function () {
        anchorEditor.preventClick = false;
      }, 1);
    });
    anchorEditor.$resizeBox.on('endmove', function () {
      anchorEditor.preventClick = false;
    });
  } else {
    $(document.body).on('mouseup', this.ev_mouseFinishForeground).on('mouseleave', this.ev_mouseFinishForeground).on('mousemove', this.ev_mouseMoveForeground);
    this.$editorSpaceCtn.off('click', this.ev_clickEditorSpaceCtn);
    this.$mouseSelectingBox.addTo(this.$foreground);
    var foregroundBound = this.$foreground.getBoundingClientRect();
    this._forgroundMovingData = {
      left: event.clientX - foregroundBound.left,
      top: event.clientY - foregroundBound.top,
      width: 0,
      height: 0,
      event0: event
    };
    this.$mouseSelectingBox.addStyle({
      left: this._forgroundMovingData.left + 'px',
      top: this._forgroundMovingData.top + 'px',
      width: '0',
      height: '0'
    });
  }
};
LayoutEditor.prototype.ev_mouseMoveForeground = function (event) {
  var foregroundBound = this.$foreground.getBoundingClientRect();
  this._forgroundMovingData.width = event.clientX - foregroundBound.left - this._forgroundMovingData.left;
  this._forgroundMovingData.height = event.clientY - foregroundBound.top - this._forgroundMovingData.top;
  if (this._forgroundMovingData.width < 0) {
    this.$mouseSelectingBox.addStyle({
      left: this._forgroundMovingData.left + this._forgroundMovingData.width + 'px',
      width: -this._forgroundMovingData.width + 'px'
    });
  } else {
    this.$mouseSelectingBox.addStyle({
      left: this._forgroundMovingData.left + 'px',
      width: this._forgroundMovingData.width + 'px'
    });
  }
  if (this._forgroundMovingData.height < 0) {
    this.$mouseSelectingBox.addStyle({
      top: this._forgroundMovingData.top + this._forgroundMovingData.height + 'px',
      height: -this._forgroundMovingData.height + 'px'
    });
  } else {
    this.$mouseSelectingBox.addStyle({
      top: this._forgroundMovingData.top + 'px',
      height: this._forgroundMovingData.height + 'px'
    });
  }
};
LayoutEditor.prototype.ev_mouseFinishForeground = function (event) {
  $(document.body).off('mouseup', this.ev_mouseFinishForeground).off('mouseleave', this.ev_mouseFinishForeground).off('mousemove', this.ev_mouseMoveForeground);
  setTimeout(this.$editorSpaceCtn.on.bind(this.$editorSpaceCtn, 'click', this.ev_clickEditorSpaceCtn), 10);
  this.$mouseSelectingBox.remove();
  //find all rectangle
  var selectedComp = [];
  var event0 = this._forgroundMovingData.event0;
  var left = Math.min(event0.clientX, event.clientX);
  var right = Math.max(event0.clientX, event.clientX);
  var top = Math.min(event0.clientY, event.clientY);
  var bottom = Math.max(event0.clientY, event.clientY);
  var selectRect = new _Rectangle["default"](left, top, right - left, bottom - top);
  var children = this.editingLayout.children;
  if (this.anchorEditors.length > 0) {
    children = this.editingLayout.children;
  }
  var comp, compRect;
  for (var i = 0; i < children.length; ++i) {
    comp = children[i];
    compRect = _Rectangle["default"].fromClientRect(comp.view.getBoundingClientRect());
    if (compRect.isCollapse(selectRect)) selectedComp.push(comp);
  }
  var self = this;
  if (event.shiftKey) {
    this.toggleActiveComponent.apply(this, selectedComp.filter(function (comp) {
      return !self.findAnchorEditorByComponent(comp);
    }));
  } else {
    this.setActiveComponent.apply(this, selectedComp);
  }
};
LayoutEditor.prototype.ev_layoutCtnScroll = function () {
  this.rulerCtrl.update();
};
LayoutEditor.prototype.ev_contextMenuLayout = function (event) {
  var self = this;
  if (event.target === this.$foreground) {
    event.showContextMenu({
      // play-box-outline
      items: [{
        text: 'Preview',
        icon: 'span.mdi.mdi-pencil-box-multiple-outline',
        cmd: 'preview'
      }],
      extendStyle: {
        fontSize: '12px'
      }
    }, function (menuEvent) {
      var cmd = menuEvent.menuItem.cmd;
      self.execCmd(cmd);
    });
  }
};
LayoutEditor.prototype.ev_clipboardSet = function () {
  this.notifyCmdDescriptorsChange();
};
LayoutEditor.prototype.updateEditing = function () {
  this.rulerCtrl.updateEditing();
};
LayoutEditor.prototype.updateAnchor = function () {
  this.anchorEditorsCtrl.updateAnchorEditors();
};
LayoutEditor.prototype.updateAnchorPosition = function () {
  this.anchorEditorsCtrl.updateAnchorEditorPositions();
};
LayoutEditor.prototype.findComponentsByName = function (name, from) {
  from = from || this.rootLayout;
  if (!from) return;
  var res = undefined;
  if (from.attributes.name === name) {
    return [from];
  }
  var self = this;
  if (from.fragment !== this.rootFragment) return undefined;
  if (from.children) res = from.children.reduce(function (ac, child) {
    var found = self.findComponentsByName(name, child);
    if (found) return ac.concat(found);
    return ac;
  }, []);
  if (res.length > 0) return res;
  return undefined;
};
LayoutEditor.prototype.findComponentsById = function (id, from) {
  from = from || this.rootLayout;
  if (!from) return undefined;
  var res = undefined;
  if (from.attributes.id === id) {
    return [from];
  }
  if (from.fragment !== this.rootFragment) return undefined;
  var self = this;
  if (from.children) {
    res = from.children.reduce(function (ac, child) {
      var found = self.findComponentsById(id, child);
      if (found) return ac.concat(found);
      return ac;
    }, []);
  }
  if (res.length > 0) return res;
  return undefined;
};
LayoutEditor.prototype.updateSize = function () {
  this.updateAnchorPosition();
  var gBound = this.$overlayGraphic.getBoundingClientRect();
  this.$overlayGraphic.attr('viewBox', [0, 0, gBound.width, gBound.height].join(' '));
  this.boundViewCtrl.update();
  this.viewportCtrl.updateScrollbar();
};
LayoutEditor.prototype.setActiveComponent = function () {
  this.anchorEditorsCtrl.setActiveComponent.apply(this.anchorEditorsCtrl, arguments);
};
LayoutEditor.prototype.setActiveComponentByName = function () {
  this.anchorEditorsCtrl.setActiveComponentByName.apply(this.anchorEditorsCtrl, arguments);
};
LayoutEditor.prototype.setActiveComponentById = function () {
  this.anchorEditorsCtrl.setActiveComponentById.apply(this.anchorEditorsCtrl, arguments);
};
LayoutEditor.prototype.openComponentProperties = function (components) {
  this.lastComponentPropertyDelegate = new LEComponentPropertyDelegate(this, components);
  if (this.propertyEditor) {
    this.propertyEditor.delegate = this.lastComponentPropertyDelegate;
  }
};
LayoutEditor.prototype.findFocusAnchorEditor = function () {
  // faster
  for (var i = this.anchorEditors.length - 1; i >= 0; --i) {
    if (this.anchorEditors[i].isFocus) return this.anchorEditors[i];
  }
  return null;
};
LayoutEditor.prototype.getActivatedComponents = function () {
  return this.anchorEditors.map(function (e) {
    return e.component;
  }).filter(function (e) {
    return !!e;
  });
};
LayoutEditor.prototype.applyData = function (data) {
  var FmClass = (0, _FmFragment.makeFmFragmentClass)({
    tag: 'LayoutTest',
    contentViewData: {
      layout: data
    }
  });
  this.rootFragment = new FmClass();
  this.$layoutCtn.clearChild().addChild(this.rootLayout.domElt);
  this.rootLayout.onAttached(this);
  this.rulerCtrl.assignRoot();
  this.editingLayoutCtrl.edit(this.rootLayout);
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
  this.emit('change', {
    type: 'change',
    target: this,
    data: data
  }, this);
};
LayoutEditor.prototype.setData = function (data) {
  this.applyData(data);
  this.undoCtrl.commit('set-data', "Set data");
  this.boundViewCtrl.update();
};
LayoutEditor.prototype.autoExpandRootLayout = function () {
  //?todo: check usage
  if (this.rootLayout) {
    var minSize = this.rootLayout.measureMinSize();
    var isChange = false;
    if (minSize.width > this.rootLayout.style.width) {
      this.rootLayout.setStyle('width', minSize.width);
      isChange = true;
    }
    if (minSize.height > this.rootLayout.style.height) {
      this.rootLayout.setStyle('height', minSize.height);
      isChange = true;
    }
    if (isChange) {
      this.emit('layoutexpand', {
        type: 'layoutexpand',
        target: this,
        layout: this.rootLayout
      }, this);
      this.notifyDataChange();
    }
  }
};
LayoutEditor.prototype.editLayout = function (layout) {
  if (layout && layout.isLayout) {
    this.anchorEditorsCtrl.setActiveComponent();
    this.editingLayoutCtrl.edit(layout);
  }
};

/***
 *
 * @param {BaseComponent} comp
 */
LayoutEditor.prototype.editComponent = function (comp) {
  if (this.conponetEditTool) {
    this.conponetEditTool.stop();
    this.conponetEditTool = null;
  }
  if (comp.tag === 'Text' || comp.tag === 'Label') {
    this.conponetEditTool = new _LETextEditTool["default"](this, comp);
    this.conponetEditTool.start();
  }
};
LayoutEditor.prototype.editLayoutByName = function (name) {
  var comps = this.findComponentsByName(name);
  if (comps && comps.length > 0) this.editLayout(comps[0]);
};
LayoutEditor.prototype.getData = function () {
  if (this.rootLayout) {
    return this.rootLayout.getData();
  }
  return null;
};
LayoutEditor.prototype.getCmdDescriptor = function (name) {
  var descriptor = null;
  descriptor = descriptor || this.selectCtrl.getCmdDescriptor(name);
  if (this.editingLayout) {
    var anchorEditorConstructor = this.tag2AnchorEditorClass[this.editingLayout.tag];
    if (anchorEditorConstructor.prototype.getCmdDescriptor) {
      descriptor = descriptor || anchorEditorConstructor.prototype.getCmdDescriptor.call(null, name);
    }
  }
  descriptor = descriptor || _LayoutEditorCmd.LayoutEditorCmdDescriptors[name];
  var res = Object.assign({
    type: 'trigger',
    desc: 'command: ' + name,
    icon: 'span.mdi.mdi-apple-keyboard-command'
  }, descriptor);
  if ((name.startsWith('align') || name.startsWith('equalise')) && this.anchorEditors.length < 2) {
    res.disabled = true;
  } else if (name.startsWith('distribute') && this.anchorEditors.length < 3) {
    res.disabled = true;
  } else if (name.match(/^(delete|copy|cut|horizontalAlign|verticalAlign)/) && this.anchorEditors.length < 1) {
    res.disabled = true;
  } else if (name === 'paste') {
    res.disabled = !_ClipboardManager["default"].get(_R["default"].CLIPBOARD.COMPONENTS);
  } else if (name === 'undo') {
    res.disabled = this.undoHistory.lastItemIndex <= 0;
  } else if (name === 'redo') {
    res.disabled = this.undoHistory.lastItemIndex >= this.undoHistory.items.length - 1;
  }
  var task = this.getContext(_R["default"].TASK);
  var isSystemForm = task && task.bundle && task.bundle.contentArguments && task.bundle.contentArguments && task.bundle.contentArguments.formid < 0;
  if (name === 'saveAsSystem') {
    if (isSystemForm) res.disabled = true;
  }
  return res;
};
LayoutEditor.prototype.getCmdGroupTree = function () {
  /**
   *
   * @type {CMDTabListNodeDeclaration}
   */
  var res = (0, _generator.copyJSVariable)(_LayoutEditorCmd.LayoutEditorCmdTree);
  res.children[res.children.length - 1].children = this.anchorEditorsCtrl.getCmdGroupTree();
  return res;
};
LayoutEditor.prototype.findNearestLayoutParent = function (comp) {
  while (comp) {
    if (comp.addChildByPosition) {
      break;
    }
    comp = comp.parent;
  }
  return comp;
};

/**
 * @returns {BaseComponent}
 */
LayoutEditor.prototype.addNewComponent = function (constructor, posX, posY) {
  var comps = this.layoutStructTool.makeNewComponents(constructor);
  this.layoutStructTool.addComponentByPosition(comps, posX, posY);
};
LayoutEditor.prototype.notifyUnsaved = function () {
  this.flexFormEditor.notifyUnsaved();
};
LayoutEditor.prototype.notifySaved = function () {
  this.flexFormEditor.notifySaved();
};
LayoutEditor.prototype.getSelected = function () {
  return this.anchorEditors.map(function (aed) {
    return aed.component.attributes.id;
  });
};
LayoutEditor.prototype.execCmd = function () {
  try {
    return _BaseEditor["default"].prototype.execCmd.apply(this, arguments);
  } catch (error) {
    if (!error.message.startsWith('No command')) (0, _safeThrow["default"])(error);
  }
  try {
    var focusEditor = this.findFocusAnchorEditor();
    if (focusEditor) {
      return focusEditor.execCmd.apply(focusEditor, arguments);
    }
  } catch (error1) {
    if (!error1.message.startsWith('No command')) (0, _safeThrow["default"])(error1);
  }
};
Object.defineProperty(LayoutEditor.prototype, 'editingLayout', {
  get: function get() {
    return this.editingLayoutCtrl && this.editingLayoutCtrl.editingLayout;
  }
});
Object.defineProperty(LayoutEditor.prototype, 'rootLayout', {
  get: function get() {
    return this.rootFragment && this.rootFragment.view || null;
  }
});
Object.defineProperty(LayoutEditor.prototype, 'anchorEditors', {
  get: function get() {
    return this.anchorEditorsCtrl.anchorEditors;
  }
});

/**
 * for CircuitDiagramEditor
 */
LayoutEditor.prototype.getCircuitNodes = function () {
  var list = [];
  var checkedGroup = {};
  var rootLayout = this.rootLayout;
  if (!rootLayout) return list;
  var rootFragment = this.rootFragment;
  (0, _FNode.traversal)(rootLayout, function (path) {
    var node = path.node;
    var item;
    var pinCmp;
    if (node.fragment === rootFragment) {
      var clazz = _Assembler.AssemblerInstance.classes['COMPONENT'][node.tag];
      item = {
        type: 'COMPONENT',
        id: node.attributes.id,
        name: node.attributes.name,
        displayName: node.attributes.displayName,
        text: '[' + node.tag + '] ' + node.attributes.name,
        value: node.attributes.id,
        order: 'z_' + node.tag + '_' + node.attributes.name,
        bTag: node.tag,
        pinList: Object.keys(node.pinHandlers).map(function (name) {
          return {
            text: name,
            value: name
          };
        }),
        clazz: clazz
      };
      pinCmp = function pinCmp(a, b) {
        var av = _IndexedPropertyNames["default"][a.name] || 100;
        if (clazz.prototype.pinHandlers[a.name].get && clazz.prototype.pinHandlers[a.name].receives) {
          av /= 1000;
        }
        var bv = _IndexedPropertyNames["default"][b.name] || 100;
        if (clazz.prototype.pinHandlers[b.name].get && clazz.prototype.pinHandlers[b.name].receives) {
          bv /= 1000;
        }
        return av - bv;
      };
      item.inputPins = Object.keys(clazz.prototype.pinHandlers).map(function (pinName) {
        if (clazz.prototype.pinHandlers[pinName].receives) return {
          name: pinName
        };else return null;
      }).filter(function (it) {
        return !!it;
      });
      item.inputPins.sort(pinCmp);
      item.outputPins = Object.keys(clazz.prototype.pinHandlers).map(function (pinName) {
        if (clazz.prototype.pinHandlers[pinName].get) return {
          name: pinName
        };else return null;
      }).filter(function (it) {
        return !!it;
      });
      item.outputPins.sort(pinCmp);
      if (node.tag.toLowerCase().match(/input|radio|checkbox|track|combo/)) {
        item.order = 'a_' + node.tag + '_' + node.attributes.name;
      } else if (node.tag.toLowerCase().match(/button|label|text/)) {
        item.order = 'c_' + node.tag + '_' + node.attributes.name;
      }
      list.push(item);
      if (node.attributes.group && !checkedGroup[node.attributes.group]) {
        checkedGroup[node.attributes.group] = true;
        clazz = _Assembler.AssemblerInstance.classes['BLOCK']['CBComponentGroup'];
        item = {
          type: 'BLOCK',
          id: node.attributes.group,
          name: node.attributes.group,
          displayName: node.attributes.group,
          text: '[' + _CBComponentGroup["default"] + '] ' + node.attributes.group,
          value: node.attributes.group,
          order: 'd_' + node.attributes.group + '_' + node.attributes.group,
          bTag: 'CBComponentGroup',
          pinList: Object.keys(node.pinHandlers).map(function (name) {
            return {
              text: name,
              value: name
            };
          }),
          clazz: clazz
        };
        item.inputPins = Object.keys(clazz.prototype.pinHandlers).map(function (pinName) {
          if (clazz.prototype.pinHandlers[pinName].receives) return {
            name: pinName
          };else return null;
        }).filter(function (it) {
          return !!it;
        });
        item.inputPins.sort(pinCmp);
        item.outputPins = [];
        list.push(item);
      }
    } else {
      item = {
        type: 'FRAGMENT',
        id: node.attributes.id,
        name: node.attributes.name,
        displayName: node.attributes.displayName,
        text: '[' + node.tag + '] ' + node.attributes.name,
        value: node.attributes.id,
        order: 'f_fragment' + +'_' + node.attributes.name,
        bTag: node.tag,
        pinList: Object.keys(node.fragment.pinHandlers).map(function (name) {
          return {
            text: name,
            value: name
          };
        }),
        clazz: node.fragment.constructor
      };
      item.inputPins = [{
        name: 'props'
      }];
      item.outputPins = [{
        name: 'props'
      }];
      list.push(item);
      path.skipChildren();
    }
  });
  return list;
};
var _default = LayoutEditor;
/***
 * @extends OutlineDelegate
 * @param {LayoutEditor} editor
 * @constructor
 */
exports["default"] = _default;
function LayoutOutlineDelegate(editor) {
  _FOutline.OutlineDelegate.call(this);
  this.editor = editor;
}
_OOP["default"].mixClass(LayoutOutlineDelegate, _FOutline.OutlineDelegate);
LayoutOutlineDelegate.prototype.getTreeData = function () {
  var layout = this.editor.rootLayout;
  if (!layout) return [];
  var frag = layout.fragment;
  var visit = function visit(compNode) {
    var dataNode = {
      name: compNode.attributes.displayName || compNode.attributes.name,
      id: compNode.attributes.id,
      icon: compNode.fragment === frag ? compNode.menuIcon : compNode.fragment.menuIcon
    };
    if (compNode.fragment === frag && compNode.children && compNode.children.length > 0) {
      dataNode.children = compNode.children.map(function (c) {
        return visit(c);
      });
    }
    return dataNode;
  };
  return visit(layout);
};
LayoutOutlineDelegate.prototype.onClickNode = function (nodeElt, event) {
  var id = nodeElt.data.id;
  var comp = this.editor.findComponentsById(id);
  if (!comp) return;
  comp = comp[0];
  var parentLayout = this.editor.findNearestLayoutParent(comp.parent);
  var newEditingLayout = parentLayout || this.editor.editingLayout;
  if (event.altKey) {
    if (comp.isLayout) {
      newEditingLayout = comp;
    }
  }
  if (newEditingLayout !== this.editor.editingLayout) {
    this.editor.editLayout(newEditingLayout);
    this.editor.anchorEditorsCtrl.setActiveComponent();
  }
  if (event.altKey) return;
  if (event.shiftKey) {
    this.editor.anchorEditorsCtrl.toggleActiveComponent(comp);
  } else {
    this.editor.setActiveComponent(comp);
  }
};
LayoutOutlineDelegate.prototype.getSelectedIdList = function () {
  return this.editor.anchorEditorsCtrl.getComponents().map(function (comp) {
    return comp.attributes.id;
  });
};
LayoutOutlineDelegate.prototype.getNodeContextMenu = function (nodeElt) {
  var id = nodeElt.data.id;
  var comp = this.editor.findComponentsById(id)[0];
  if (!comp) return null;
  //todo: check component can delete
  var items = [];
  items.push({
    icon: 'span.mdi.mdi-delete-variant',
    text: 'Delete',
    cmd: 'delete',
    extendStyle: {
      color: 'red'
    }
  });
  var anchorEditor = this.editor.anchorEditorsCtrl.findAnchorEditorByComponent(comp);
  if (anchorEditor) {
    anchorEditor.focus();
    // this.updateComponentStatus();
  } else {
    this.editor.setActiveComponent(comp);
  }
  if (this.editor.anchorEditors.length >= 1) {
    items = [{
      icon: 'span.mdi.mdi-chevron-double-up',
      text: 'Move To First',
      cmd: 'move-to-top'
    }, {
      icon: 'span.mdi.mdi-chevron-up',
      text: 'Move To Previous',
      cmd: 'move-up'
    }, {
      icon: 'span.mdi.mdi-chevron-down',
      text: 'Move To Next',
      cmd: 'move-down'
    }, {
      icon: 'span.mdi.mdi-chevron-double-down',
      text: 'Move To Last',
      cmd: 'move-to-bottom'
    }, '================='].concat(items);
  }
  if (comp.isLayout && comp.fragment === this.editor.rootFragment && this.editor.anchorEditors.length === 1) {
    items = [{
      icon: 'span.mdi.mdi-square-edit-outline',
      text: comp.isFragmentView ? "Edit Fragment" : 'Edit Layout',
      cmd: comp.isFragmentView ? 'edit_fragment' : 'edit_layout',
      extendStyle: {
        color: 'blue'
      }
    }, '=============='].concat(items);
  }
  return {
    items: items
  };
};
LayoutOutlineDelegate.prototype.onNodeSelectContextMenu = function (nodeElt, menuItem, event) {
  var _this$editor$layoutSt, _this$editor$layoutSt2, _this$editor$layoutSt3, _this$editor$layoutSt4;
  var id = nodeElt.data.id;
  var comp = this.editor.findComponentsById(id)[0];
  var comps = this.editor.anchorEditorsCtrl.getComponents();
  if (comps.length === 0) return;
  switch (event.menuItem.cmd) {
    case "delete":
      this.editor.execCmd('delete');
      break;
    case 'move-to-top':
      (_this$editor$layoutSt = this.editor.layoutStructTool).moveComponentToFirst.apply(_this$editor$layoutSt, _toConsumableArray(comps));
      break;
    case 'move-up':
      (_this$editor$layoutSt2 = this.editor.layoutStructTool).moveComponentToPrevious.apply(_this$editor$layoutSt2, _toConsumableArray(comps));
      break;
    case 'move-down':
      (_this$editor$layoutSt3 = this.editor.layoutStructTool).moveComponentToNext.apply(_this$editor$layoutSt3, _toConsumableArray(comps));
      break;
    case 'move-to-bottom':
      (_this$editor$layoutSt4 = this.editor.layoutStructTool).moveComponentToLast.apply(_this$editor$layoutSt4, _toConsumableArray(comps));
      break;
    case 'edit_layout':
      this.editor.editLayout(comp);
      break;
    case 'edit_fragment':
      var toast = _Toast["default"].make({
        props: {
          htitle: "TODO",
          message: "Edit form"
        }
      });
      setTimeout(toast.disappear.bind(toast), 2000);
      break;
  }
};

/***
 * @extends MultiObjectPropertyDelegate
 * @param {LayoutEditor} editor
 * @param {Array<BaseComponent>} components
 * @constructor
 */
function LEComponentPropertyDelegate(editor, components) {
  this.editor = editor;
  this.components = components;
  _MultiObjectPropertyEditor.MultiObjectPropertyDelegate.call(this);
}
_OOP["default"].mixClass(LEComponentPropertyDelegate, _MultiObjectPropertyEditor.MultiObjectPropertyDelegate);
LEComponentPropertyDelegate.prototype.getPropertyNames = function () {
  var _this3 = this;
  if (this.components.length === 0) return [];
  var descriptors = {};
  var hasDependency = {};
  this.components.forEach(function (comp) {
    if (comp.fragment !== _this3.editor.rootFragment) {
      descriptors['class'] = [{
        type: 'enum',
        values: [comp.fragment.tag] //
      }];
    }

    Object.keys(comp.attributeHandlers).forEach(function (name) {
      if (comp.fragment !== _this3.editor.rootFragment) {
        if (!['id', 'name'].includes(name)) return;
      }
      var desc = comp.attributes.getPropertyDescriptor(name);
      if (desc.dependency && desc.dependency.length > 0) hasDependency[name] = true;
      descriptors[name] = descriptors[name] || [];
      descriptors[name].push(desc);
    });
    Object.keys(Object.assign({}, comp.styleHandlers, comp.anchor && comp.anchor.styleHandlers)).forEach(function (name) {
      var desc = comp.style.getPropertyDescriptor(name);
      if (desc.dependency && desc.dependency.length > 0) hasDependency[name] = true;
      descriptors[name] = descriptors[name] || [];
      descriptors[name].push(desc);
    });
  });
  var checkOKDescArr = function checkOKDescArr(arr) {
    if (arr.length !== _this3.components.length) return false;
    if (arr.length === 1) return true;
    var first = arr[0];
    return arr.every(function (it) {
      return it.sign && it.sign === first.sign;
    });
  };
  var names = Object.keys(descriptors).filter(function (key) {
    return (!hasDependency[key] || _this3.components.length === 1) && checkOKDescArr(descriptors[key]);
  });
  names.sort(function (a, b) {
    var vA = _IndexedPropertyNames["default"][a] + 1 || 10000;
    var vB = _IndexedPropertyNames["default"][b] + 1 || 10000;
    if (vA === vB) {
      if (a < b) vB += 1;else vA += 1;
    }
    return vA - vB;
  });
  return names;
};
LEComponentPropertyDelegate.prototype.getAllTagsByTypeId = function (typeId) {
  var res = Object.keys(_Assembler.AssemblerInstance.classes['FRAGMENT']).map(function (formId) {
    var clazz = _Assembler.AssemblerInstance.classes['FRAGMENT'][formId];
    var cvd = clazz.prototype.contentViewData;
    var layout = cvd.layout || cvd;
    var id = layout.attributes && layout.attributes.typeId;
    if (id === typeId) return formId;
    return null;
  }).filter(function (x) {
    return x !== null;
  });
  return res;
};
LEComponentPropertyDelegate.prototype.getPropertyDescriptor = function (key) {
  if (key === 'class') return {
    type: 'enum',
    values: this.getAllTagsByTypeId(this.components[0].fragment.contentViewData.layout.attributes && this.components[0].fragment.contentViewData.layout.attributes.typeId) //
  };

  var obj = this.components[this.components.length - 1];
  var disabled = ['name', 'disembark', 'dataBinding', 'value', 'values', 'list', 'treeList', 'disabled', 'text', 'checked', 'textType'].indexOf(key) >= 0 && this.components.some(function (obj) {
    return obj.attributes && obj.attributes.permissions && obj.attributes.permissions.edit_attributes === 'GENERATOR';
  });
  var res = obj.attributeHandlers[key] ? obj.attributes.getPropertyDescriptor(key) : obj.style.getPropertyDescriptor(key);
  res = Object.assign({}, res);
  res.disabled = res.disabled || disabled;
  return res;
};
LEComponentPropertyDelegate.prototype.getProperty = function (key) {
  var _obj$attributes, _obj$style;
  var obj = this.components[this.components.length - 1];
  if (key === 'class') {
    return this.components[0].fragment.contentViewData.layout.attributes && this.components[0].fragment.contentViewData.layout.attributes.typeId;
  }
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }
  return obj.attributeHandlers[key] ? (_obj$attributes = obj.attributes).getProperty.apply(_obj$attributes, [key].concat(args)) : (_obj$style = obj.style).getProperty.apply(_obj$style, [key].concat(args));
};
LEComponentPropertyDelegate.prototype.mesureKeys = ['left', 'right', 'top', 'bottom', 'width', 'height', /^padding/, /^margin/];
LEComponentPropertyDelegate.prototype.setProperty = function (key, value) {
  for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
    args[_key2 - 2] = arguments[_key2];
  }
  var isMeasure;
  switch (key) {
    case 'class':
      this.components.forEach(function (obj) {
        var style = obj.style["export"]();
        var attributes = {
          id: obj.attributes.id,
          name: obj.attributes.name
        };
        if (obj.attributes.permissions) {
          attributes.permissions = obj.attributes.permissions;
        }
        var newFrag = _Assembler.AssemblerInstance.build({
          "class": value,
          style: style,
          attributes: attributes
        });
        obj.parent.addChildBefore(newFrag.view, obj);
        obj.fragment.parent.addChildBefore(newFrag, obj.fragment);
        obj.parent.removeChild(obj);
        obj.fragment.parent.removeChild(newFrag);
      });
      this.editor.anchorEditorsCtrl.setActiveComponent();
      _ResizeSystem["default"].update();
      break;
    case 'position':
      this.components.forEach(function (obj) {
        if (obj.style.position === 'absolute' && (value === 'relative' || value === 'static') || obj.style.position === 'relative' && value === 'static') {
          obj.style.left = 0;
          obj.style.top = 0;
          obj.style.bottom = 0;
          obj.style.right = 0;
        }
        obj.style.position = value;
      });
      this.editor.anchorEditorsCtrl.updateAnchorEditors();
      break;
    default:
      this.components.forEach(function (obj) {
        var _obj$attributes2, _obj$style2;
        return obj.attributeHandlers[key] ? (_obj$attributes2 = obj.attributes).setProperty.apply(_obj$attributes2, [key, value].concat(args)) : (_obj$style2 = obj.style).setProperty.apply(_obj$style2, [key, value].concat(args));
      });
      isMeasure = this.mesureKeys.some(function (t) {
        return key === t || t.test && t.test(key);
      });
      if (isMeasure) {
        this.editor.anchorEditorsCtrl.updateAnchorEditorPositions();
      } else if (key.toLowerCase().indexOf('align')) {
        this.editor.anchorEditorsCtrl.updateAnchorEditors();
      }
  }
};
LEComponentPropertyDelegate.prototype.onSetPropertyComplete = function (name) {
  this.editor.commitChange('move', 'Set ' + name);
};

/***/ }),

/***/ 34555:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.LayoutEditorCmdTree = exports.LayoutEditorCmdNames = exports.LayoutEditorCmdDescriptors = void 0;
var _R = _interopRequireDefault(__webpack_require__(25280));
var _FormPreview = _interopRequireDefault(__webpack_require__(31642));
var _ClipboardManager = _interopRequireDefault(__webpack_require__(14177));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _FileSaver = __webpack_require__(53069);
var _BlockEditor = _interopRequireDefault(__webpack_require__(46228));
var _CircuitDiagramEditor = _interopRequireDefault(__webpack_require__(65748));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
var _SelectComponentTypeDialog = __webpack_require__(50122);
var _layoutUtils = __webpack_require__(14457);
var _LEDeleteErrorDialog = _interopRequireDefault(__webpack_require__(76422));
var _LEPageSettingDialog = _interopRequireWildcard(__webpack_require__(23609));
var _FNode = __webpack_require__(88215);
var _Constants = __webpack_require__(92311);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _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); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _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; }
/**
 * @type {import('./LayoutEditor').default}
 */
var LayoutEditorCmd = {};
LayoutEditorCmd.preview = function () {
  this.flexFormEditor.execCmd('preview');
};
LayoutEditorCmd.remotePreview = function () {
  this.flexFormEditor.execCmd('remotePreview');
};
LayoutEditorCmd.save = function () {
  this.flexFormEditor.execCmd('save');
  // var tabHolder = this.formEditor.getEditorHolderByEditor(this);
  // if (tabHolder)
  //     PluginManager.exec(this, R.PLUGINS.SAVE_CONTENT_DATA, tabHolder);
  // this.notifySaved();
};

LayoutEditorCmd.saveAs = function () {
  this.flexFormEditor.execCmd('saveAs');
};
LayoutEditorCmd.saveAsSystem = function () {
  this.flexFormEditor.execCmd('saveAsSystem');
};
LayoutEditorCmd.update_from_other = function () {
  var formEditor = this.getContext(_R["default"].FORM_EDITOR);
  if (formEditor) {
    var tabHolder = formEditor.getEditorHolderByEditor(this);
    var currentTabIdent = tabHolder.ident;
    var blockEditorTabIdent = currentTabIdent + '_blocks';
    var blockEditor;
    var blockEditorTabHolder = formEditor.getTaskById(blockEditorTabIdent);
    if (blockEditorTabHolder) blockEditor = blockEditorTabHolder.editor;
    if (blockEditor) {
      this.setBlockData(blockEditor.getData());
      blockEditor.notifySaved();
    }
    var lineEditorTabIdent = currentTabIdent + '_lines';
    var lineEditor;
    var lineEditorTabHolder = formEditor.getTaskById(lineEditorTabIdent);
    if (lineEditorTabHolder) lineEditor = lineEditorTabHolder.editor;
    if (lineEditor) {
      this.setLineData(lineEditor.getLineData());
      this.setDiagramData(lineEditor.getDiagramData());
      lineEditor.notifySaved();
    }
  }
};

/***
 * @this LayoutEditor
 */
LayoutEditorCmd.importFromJson = function () {
  this.flexFormEditor.execCmd('importFromJson');
};
LayoutEditorCmd.export2Json = function () {
  this.flexFormEditor.execCmd('export2Json');
};
LayoutEditorCmd.export2sharpEncode = function () {
  this.flexFormEditor.execCmd('export2sharpEncode');
};
LayoutEditorCmd.export2clipboard = function () {
  this.flexFormEditor.execCmd('export2clipboard');
};
LayoutEditorCmd.editBlocks = function () {
  if (!this.rootLayout) return;
  /**
   * @type {import('./FormEditor').default}
   */
  var formEditor = this.getContext(_R["default"].FORM_EDITOR);
  if (!formEditor) return;
  var tabHolder = formEditor.getEditorHolderByEditor(this);
  var currentTabIdent = tabHolder.ident;
  var blockEditorTabIdent = currentTabIdent + '_blocks';
  var blockEditor;
  var blockEditorTabHolder = formEditor.getTaskById(blockEditorTabIdent);
  if (blockEditorTabHolder) blockEditor = blockEditorTabHolder.editor;
  if (!blockEditor) {
    blockEditor = new _BlockEditor["default"]();
    blockEditor.attach(this);
    var name = tabHolder.name + '(blocks)';
    var desc = tabHolder.desc;
    formEditor.openEditorTab(blockEditorTabIdent, name, desc, blockEditor, {
      layoutEditor: this
    });
  } else {
    blockEditorTabHolder.tabframe.requestActive();
  }
  var data = this.getBlockData();
  blockEditor.setData(data);
};
LayoutEditorCmd.editLines = function () {
  if (!this.rootLayout) return;
  var formEditor = this.getContext(_R["default"].FORM_EDITOR);
  if (!formEditor) return;
  var tabHolder = formEditor.getEditorHolderByEditor(this);
  var currentTabIdent = tabHolder.ident;
  var lineEditorTabIdent = currentTabIdent + '_lines';
  var lineEditor;
  var lineEditorTabHolder = formEditor.getTaskById(lineEditorTabIdent);
  if (lineEditorTabHolder) lineEditor = lineEditorTabHolder.editor;
  if (!lineEditor) {
    lineEditor = new _CircuitDiagramEditor["default"]();
    lineEditor.attach(this);
    var name = tabHolder.name + '(lines)';
    var desc = tabHolder.desc;
    formEditor.openEditorTab(lineEditorTabIdent, name, desc, lineEditor, {
      layoutEditor: this
    });
  } else {
    lineEditorTabHolder.tabframe.requestActive();
  }
  var lines = this.getLineData();
  var diagram = this.getDiagramData();
  lineEditor.setData(lines, diagram);
};

/**
 * @this {LayoutEditor}
 */
LayoutEditorCmd.cut = function () {
  this.clipboardCtrl.cut();
  return;
  if (this.anchorEditors.length < 1) return;
  var components = this.anchorEditors.map(function (ed) {
    return ed.component;
  });
  var componentsData = components.map(function (component) {
    var data = component.getData();
    data.bound = component.view.getBoundingClientRect().toJSON();
    return data;
  });
  _ClipboardManager["default"].set(_R["default"].CLIPBOARD.COMPONENTS, componentsData);

  //code copy and edit from LayoutEditor.prototype.removeComponent

  var self = this;
  this.anchorEditors.forEach(function (ed) {
    ed.component.remove();
    self.emit('removecomponent', {
      type: 'removecomponent',
      target: this,
      component: ed.component
    }, this);
  });
  function visit(node) {
    if (node.attributes && node.attributes.name) {
      node.attributes.id = undefined;
      delete node.attributes.id;
    }
    if (node.children) node.children.forEach(visit);
  }
  componentsData.forEach(visit);

  // this.componentPropertiesEditor.edit();
  this.setActiveComponent();
  this.notifyDataChange();
  this.notifyUnsaved();
  this.outlineDelegate.notifyTreeChange();
  this.commitHistory('cut', 'Cut ' + components.map(function (c) {
    return c.getAttribute('name');
  }).join(', '));
};
LayoutEditorCmd.copy = function () {
  this.clipboardCtrl.copy();
  return;
  if (this.anchorEditors.length < 1) return;
  var componentsData = this.anchorEditors.map(function (ed) {
    var data = ed.component.getData();
    data.bound = ed.component.view.getBoundingClientRect().toJSON();
    return data;
  });
  function visit(node) {
    if (node.attributes && node.attributes.name) {
      node.attributes.name = undefined;
      delete node.attributes.name;
      node.attributes.id = undefined;
      delete node.attributes.id;
    }
    if (node.children) node.children.forEach(visit);
  }
  componentsData.forEach(visit);
  _ClipboardManager["default"].set(_R["default"].CLIPBOARD.COMPONENTS, componentsData);
};
LayoutEditorCmd.paste = function (event) {
  this.clipboardCtrl.paste();
};

/***
 * @this LayoutEditor
 */
LayoutEditorCmd["delete"] = function () {
  var editors = this.anchorEditors;
  var components = editors.map(function (e) {
    return e.component;
  });
  var diagramEditor = this.getContext(_R["default"].DIAGRAM_EDITOR);
  var refCountById = diagramEditor.getLineData().reduce(function (ac, line) {
    ac[line.u] = (ac[line.u] || 0) + 1;
    if (line.u !== line.v) {
      ac[line.v] = (ac[line.v] || 0) + 1;
    }
    return ac;
  }, {});
  var reasons = components.reduce(function (ac, comp) {
    (0, _layoutUtils.collectDeleteLockReason)(refCountById, comp, ac);
    return ac;
  }, []);
  if (reasons.length === 0) {
    var _this$layoutStructToo;
    (_this$layoutStructToo = this.layoutStructTool).removeComponent.apply(_this$layoutStructToo, _toConsumableArray(components));
  } else {
    new _LEDeleteErrorDialog["default"]({
      reasons: reasons
    }).start();
  }
};
LayoutEditorCmd.undo = function () {
  this.undoHistory.undo();
};
LayoutEditorCmd.redo = function () {
  this.undoHistory.redo();
};

/**
 * @this {LayoutEditor}
 */
LayoutEditorCmd.toggleHistory = function () {
  var btn, btnBound;
  if (this.$historyCtn.parentElement) {
    this.$historyCtn.remove();
  } else {
    this.$historyCtn.addTo(this.$view);
    if (this.config.historyWindow) {
      this.$historyCtn.addStyle({
        left: this.config.historyWindow.left + 'px',
        top: this.config.historyWindow.top + 'px',
        width: this.config.historyWindow.width + 'px',
        height: this.config.historyWindow.height + 'px'
      });
    } else {
      btn = (0, _FCore.$)('button[data-cmd-name="toggleHistory"]', this.$header);
      btnBound = btn.getBoundingClientRect();
      this.$historyCtn.removeStyle('display');
      this.$historyCtn.addStyle({
        left: btnBound.left + 'px',
        top: btnBound.bottom + 2 + 'px'
      });
    }
    this.$historyCtn.relocation();
  }
};
LayoutEditorCmd.selectAll = function () {
  var now = new Date().getTime();
  var comp;
  if (this.anchorEditors.length == 0) {
    comp = this.rootLayout.children;
  } else {
    comp = (this.findNearestLayoutParent(this.anchorEditors[0].component.parent) || this.rootLayout).children;
  }
  this.setActiveComponent.apply(this, comp);
};
LayoutEditorCmd.editRootLayout = function () {
  this.editLayout(this.rootLayout);
  this.setActiveComponent(this.rootLayout);
};
LayoutEditorCmd.zoomIn = function () {
  this.zoomBy(1 / 0.9);
};
LayoutEditorCmd.zoomOut = function () {
  this.zoomBy(0.9);
};
LayoutEditorCmd.resetZoom = function () {
  this.setSoftScale(1);
};

/***
 * @this {LayoutEditor}
 */
LayoutEditorCmd.setSelectMode = function (mode) {
  this.selectCtrl.setSelectMode(mode);
};

/***
 * @this {LayoutEditor}
 */
LayoutEditorCmd.addComponent = function () {
  (0, _SelectComponentTypeDialog.openSelectComponentTypeDialog)({
    confirmButtonText: 'ADD'
  }).then(function (clazz) {
    if (!clazz) return;
    var focusAE = this.anchorEditorsCtrl.anchorEditors[this.anchorEditorsCtrl.anchorEditors.length - 1];
    var focusC = focusAE && focusAE.component;
    var editingLayout = this.editingLayout;
    if (focusC) editingLayout = focusC.parent; //todo: fix undefined
    editingLayout = editingLayout || this.rootLayout;
    var newComponent = this.buildComponent({
      tag: clazz.prototype.tag
    }, editingLayout.fragment);
    var nameDict = {};
    (0, _FNode.traversal)(editingLayout, function (path) {
      nameDict[path.node.attributes.name] = true;
    });
    var name = newComponent.attributes.name.replace(/[0-9]+$/, '');
    var i = 0;
    if (nameDict) {
      while (nameDict[name + i]) {
        ++i;
      }
      name = name + i;
      newComponent.attributes.name = name;
    }
    if (focusC) {
      editingLayout.addChildAfter(newComponent, focusC);
    } else {
      editingLayout.addChild(newComponent);
    }
    this.anchorEditorsCtrl.setActiveComponent(newComponent);
    this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
  }.bind(this));
};
LayoutEditorCmd.transformComponentType = function () {
  alert('In processing!');
};

/***
 * @this {LayoutEditor}
 */
LayoutEditorCmd.pageSetting = function () {
  var _this = this;
  (0, _LEPageSettingDialog.openPageSettingDialog)().then(function (result) {
    if (!result || !_this.rootLayout) return;
    _this.rootLayout.style.width = result[0];
    _this.rootLayout.style.height = 'auto';
    if (_this.rootLayout.tag === 'LinearLayout') {
      _this.rootLayout.style.paddingLeft = result[2];
      _this.rootLayout.style.paddingRight = result[2];
      _this.rootLayout.style.paddingTop = result[3];
      _this.rootLayout.style.paddingBottom = result[3];
    }
  });
};

/***
 * @this {LayoutEditor}
 */
LayoutEditorCmd.editContent = function () {
  var editors = this.anchorEditors;
  var components = editors.map(function (e) {
    return e.component;
  });
  var comp = components.pop();
  if (comp) {
    if (comp.isLayout) this.editLayout(comp);else this.editComponent(comp);
  }
};

/***
 * @this {LayoutEditor}
 */
LayoutEditorCmd.moveOrderToFirst = function () {
  var _this$layoutStructToo2;
  var components = this.anchorEditorsCtrl.getComponents();
  if (components.length === 0) return;
  (_this$layoutStructToo2 = this.layoutStructTool).moveComponentToFirst.apply(_this$layoutStructToo2, _toConsumableArray(components));
};

/***
 * @this {LayoutEditor}
 */
LayoutEditorCmd.moveOrderToPrevious = function () {
  var _this$layoutStructToo3;
  var components = this.anchorEditorsCtrl.getComponents();
  if (components.length === 0) return;
  (_this$layoutStructToo3 = this.layoutStructTool).moveComponentToPrevious.apply(_this$layoutStructToo3, _toConsumableArray(components));
};

/***
 * @this {LayoutEditor}
 */
LayoutEditorCmd.moveOrderToNext = function () {
  var _this$layoutStructToo4;
  var components = this.anchorEditorsCtrl.getComponents();
  if (components.length === 0) return;
  (_this$layoutStructToo4 = this.layoutStructTool).moveComponentToNext.apply(_this$layoutStructToo4, _toConsumableArray(components));
};

/***
 * @this {LayoutEditor}
 */
LayoutEditorCmd.moveOrderToLast = function () {
  var _this$layoutStructToo5;
  var components = this.anchorEditorsCtrl.getComponents();
  if (components.length === 0) return;
  (_this$layoutStructToo5 = this.layoutStructTool).moveComponentToLast.apply(_this$layoutStructToo5, _toConsumableArray(components));
};
var _default = LayoutEditorCmd;
exports["default"] = _default;
var LayoutEditorCmdNames = [];
exports.LayoutEditorCmdNames = LayoutEditorCmdNames;
var LayoutEditorCmdTree = {
  type: 'tab_list',
  children: [{
    type: 'tab',
    name: 'Home',
    children: [{
      type: 'group_x2',
      children: ['preview']
    }, {
      type: 'group_x2',
      children: ['save', 'saveAs', 'saveAsSystem']
    }, {
      type: 'group_x2',
      children: ['undo', 'redo', 'toggleHistory']
    }, {
      type: 'group_x2',
      children: ['cut', 'copy', 'paste', 'delete']
    }]
  }, {
    type: 'tab',
    name: 'Edit',
    children: [{
      type: 'group_x2',
      children: ['addComponent']
    }, {
      type: 'group_x2',
      children: ['pageSetting', 'editRootLayout', 'selectAll', 'setSelectMode']
    }, {
      type: 'group_x2',
      children: ['moveOrderToFirst', 'moveOrderToPrevious', 'moveOrderToNext', 'moveOrderToLast']
    }]
  }, {
    type: 'tab',
    name: 'Data',
    children: [{
      type: 'group_x2',
      children: ['importFromJson', 'export2Json', 'export2sharpEncode', 'export2clipboard']
    }]
  }, {
    type: 'tab',
    name: 'Layout & Format'
  }]
};
exports.LayoutEditorCmdTree = LayoutEditorCmdTree;
var LayoutEditorCmdDescriptors = Object.assign({}, _CmdDescriptors["default"]);
exports.LayoutEditorCmdDescriptors = LayoutEditorCmdDescriptors;

/***/ }),

/***/ 3479:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Toast = _interopRequireDefault(__webpack_require__(68105));
var _FmFragment = __webpack_require__(9098);
var _Assembler = __webpack_require__(2326);
__webpack_require__(52344);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function RemoteFormPreview() {
  _BaseEditor["default"].call(this);
  this.id = location.search.replace(/^\?/, '').split('&').reduce(function (ac, txt) {
    var p = txt.split('=');
    var key = p[0].trim();
    var value = (p[1] || '').trim();
    ac[key] = value;
    return ac;
  }, {
    client_id: 0
  }).client_id || 'D' + Math.floor(Math.random() * 1000) + '';
}
_OOP["default"].mixClass(RemoteFormPreview, _BaseEditor["default"]);
RemoteFormPreview.prototype.createView = function () {
  this.$view = (0, _FCore._)({
    "class": 'af-remote-form-preview',
    child: [{
      "class": 'af-remote-form-preview-header',
      child: ['span.mdi.mdi-cellphone-play', {
        text: 'ID: ' + this.id
      }]
    }, {
      "class": 'af-remote-form-preview-body'
    }]
  });
  this.$body = (0, _FCore.$)('.af-remote-form-preview-body', this.$view);
};
RemoteFormPreview.prototype.onStart = function () {
  if (!window.MQTT) {
    _Toast["default"].make({
      props: {
        variant: 'error',
        htitle: "Can not start",
        disappearTimeout: 4000
      },
      child: {
        style: {
          padding: '5px'
        },
        child: {
          text: 'Can not fount MQTT library!'
        }
      }
    });
    return;
  }
  this.prepareMQTT();
};
RemoteFormPreview.prototype.prepareMQTT = function () {
  var _this = this;
  var client = window.MQTT.connect('wss:absol.cf:9884');
  this.mqttClient = client;
  window.mqttClient = client;
  client.on('connect', function () {
    client.subscribe('rfp/' + _this.id, function (err) {
      if (!err) {
        _Toast["default"].make({
          props: {
            variant: 'success',
            htitle: "Connect with id = " + _this.id,
            disappearTimeout: 14000
          },
          child: {
            style: {
              padding: '5px'
            },
            child: {
              text: 'Subscribe channel ' + 'rfp/' + _this.id
            }
          }
        });
      }
    });
  });
  client.on('message', function (topic, payload) {
    try {
      var message = JSON.parse(payload.toString());
      if (message.type === 'form') {
        var clazz = (0, _FmFragment.makeFmFragmentClass)({
          tag: 'TestFragment',
          contentViewData: message.data
        });
        _Assembler.AssemblerInstance.addClass(clazz);
        _this.$body.clearChild();
        var frg = _Assembler.AssemblerInstance.build({
          "class": 'TestFragment'
        });
        _this.$body.addChild(frg.domElt);
        frg.start();
      }
    } catch (e) {
      console.error(e);
    }
  });
};
RemoteFormPreview.prototype.onStop = function () {};
var _default = RemoteFormPreview;
exports["default"] = _default;

/***/ }),

/***/ 86091:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _CMDRunner = _interopRequireDefault(__webpack_require__(34470));
var _Toast = _interopRequireDefault(__webpack_require__(68105));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _stringGenerate = __webpack_require__(10713);
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @param {LayoutEditor} layoutEditor
 * @param {BaseComponent} component
 */
function BaseAnchorEditor(layoutEditor, component) {
  _EventEmitter["default"].call(this);
  this._bindEvent();
  this.id = (0, _stringGenerate.randomIdent)();
  this.component = component;
  this.layoutEditor = layoutEditor;
  this.cmdRunner = new _CMDRunner["default"](this);
}
_OOP["default"].mixClass(BaseAnchorEditor, _EventEmitter["default"]);
BaseAnchorEditor.prototype.share = {
  $modal: null,
  holderId: null,
  to: -1
};
BaseAnchorEditor.prototype.modalBegin = function () {
  if (!this.share.$modal) {
    this.share.$modal = (0, _FCore._)({
      tag: 'modal',
      style: {
        zIndex: 1e8,
        userSelect: 'none'
      }
    });
  }
  clearTimeout(this.share.to);
  this.share.$modal.addTo(document.body);
  this.share.holderId = this.id;
};
BaseAnchorEditor.prototype.modalEnd = function () {
  var _this = this;
  if (this.share.holderId !== this.id) return;
  clearTimeout(this.share.to);
  this.share.to = setTimeout(function () {
    _this.share.$modal.remove();
    _this.share.holderId = null;
  }, 100);
};
BaseAnchorEditor.prototype._bindEvent = function () {
  for (var key in this) {
    if (key.startsWith('ev_')) this[key] = this[key].bind(this);
  }
};
BaseAnchorEditor.prototype.focus = function () {
  //not implement
};
BaseAnchorEditor.prototype.blur = function () {
  //not implement
};
BaseAnchorEditor.prototype.update = function () {
  //not implement
};
BaseAnchorEditor.prototype.getComponentRelativeToForeground = function () {
  var bound = this.layoutEditor.$foreground.getBoundingClientRect();
  var compBound = this.component.domElt.getBoundingClientRect();
  return new _Rectangle["default"](compBound.left - bound.left, compBound.top - bound.top, compBound.width, compBound.height);
};
BaseAnchorEditor.prototype.getCmdGroupTree = function () {
  return [];
};
BaseAnchorEditor.prototype.getCmdDescriptor = function (name) {};
BaseAnchorEditor.prototype.destroy = function () {
  //not implement
};
BaseAnchorEditor.prototype.viewMouseDrag = function (x, y) {
  this.layoutEditor.rulerCtrl.viewMouseDrag(x, y);
};
BaseAnchorEditor.prototype.ev_dblClick = function () {
  if (!this.component) return;
  if (this.component.isFragmentView) {
    var message = _Toast["default"].make({
      props: {
        title: "TODO",
        message: "Edit Form"
      }
    }, 'auto');
    setTimeout(message.disappear.bind(message), 2000);
  } else if (this.component.isLayout) {
    this.layoutEditor.editLayout(this.component);
  } else {
    this.layoutEditor.editComponent(this.component);
  }
};
var _default = BaseAnchorEditor;
exports["default"] = _default;

/***/ }),

/***/ 27804:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.BaseAnchorEditorCmdDescriptors = void 0;
var BaseAnchorEditorCmdDescriptors = {};
exports.BaseAnchorEditorCmdDescriptors = BaseAnchorEditorCmdDescriptors;
var BaseAnchorEditorCmd = {};
BaseAnchorEditorCmd.layoutEdit = function () {
  if (this.component.isLayout && !this.component.isFragmentView) {
    this.layoutEditor.editLayout(this.component);
  }
};
var _default = BaseAnchorEditorCmd;
exports["default"] = _default;

/***/ }),

/***/ 54577:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(4365);
__webpack_require__(78064);
var _BaseAnchorEditor = _interopRequireDefault(__webpack_require__(86091));
var _LinearAnchorEditorCmd = __webpack_require__(65071);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ResizeBox = _interopRequireDefault(__webpack_require__(32615));
var _Constants = __webpack_require__(92311);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
var _Toast = _interopRequireDefault(__webpack_require__(68105));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;
var HyperAnchorEditorCmd = {};

/**
 * @this HyperAnchorEditor
 */
HyperAnchorEditorCmd.edit = function () {
  if (this.component.isFragmentView) {
    var message = _Toast["default"].make({
      props: {
        title: "TODO",
        message: "Edit Form"
      }
    }, 'auto');
    setTimeout(message.disappear.bind(message), 2000);
  } else if (this.component.isLayout) {
    this.layoutEditor.editLayout(this.component);
  } else {
    this.layoutEditor.editComponent(this.component);
  }
};
/**
 * @this HyperAnchorEditor
 */
HyperAnchorEditorCmd.equaliseWidth = function () {
  var components = this.layoutEditor.anchorEditorsCtrl.getComponents();
  var allAutoWidth = components.every(function (comp) {
    return comp.style.width === 'auto';
  });
  var focusComp = components.pop();
  var maxWidth;
  if (focusComp.style.display === 'inline-block' && allAutoWidth) {
    maxWidth = components.reduce(function (ac, comp) {
      return Math.max(ac, focusComp.style.getProperty('width', 'px'));
    }, 0);
    components.forEach(function (comp) {
      return comp.style.width = maxWidth;
    });
  } else {
    components.forEach(function (comp) {
      if (focusComp.style.display === 'block') {
        comp.style.display = 'block';
        comp.style.width = focusComp.style.width;
      } else if (focusComp.style.display === 'inline-block') {
        comp.style.width = focusComp.style.getProperty('width', 'px');
      }
    });
  }
  this.layoutEditor.lcEmitter.emit(_Constants.EV_COMP_BOUND_CHANGE);
  this.layoutEditor.commitChange('move-resize', 'Equalise Width');
};
HyperAnchorEditorCmd.equaliseHeight = function () {
  var components = this.layoutEditor.anchorEditorsCtrl.getComponents();
  var focusComp = components.pop();
  components.forEach(function (comp) {
    if (focusComp.style.height === 'auto') {
      comp.style.height = focusComp.style.getProperty('height', 'px');
    } else {
      comp.style.height = focusComp.style.height;
    }
  });
  this.layoutEditor.lcEmitter.emit(_Constants.EV_COMP_BOUND_CHANGE);
  this.layoutEditor.commitChange('move-resize', 'Equalise Width');
};
HyperAnchorEditorCmd.hyperDisplayAsInline = function () {
  var components = this.layoutEditor.anchorEditorsCtrl.getComponents();
  components.forEach(function (comp) {
    comp.style.display = 'inline';
    comp.style.position = 'static';
    if (comp.tag === 'text') {
      comp.style.width = 'auto';
    }
  });
  this.layoutEditor.lcEmitter.emit(_Constants.EV_COMP_BOUND_CHANGE);
  this.layoutEditor.commitChange('move-resize', 'Display: Inline');
};
HyperAnchorEditorCmd.hyperDisplayAsBlock = function () {
  var components = this.layoutEditor.anchorEditorsCtrl.getComponents();
  components.forEach(function (comp) {
    comp.style.display = 'inline-block';
    comp.style.position = 'static';
  });
  this.layoutEditor.lcEmitter.emit(_Constants.EV_COMP_BOUND_CHANGE);
  this.layoutEditor.commitChange('move-resize', 'Display: Block');
};
HyperAnchorEditorCmd.hyperDisplayAsParagraph = function () {
  var components = this.layoutEditor.anchorEditorsCtrl.getComponents();
  components.forEach(function (comp) {
    comp.style.display = 'paragraph';
    comp.style.position = 'static';
  });
  this.layoutEditor.lcEmitter.emit(_Constants.EV_COMP_BOUND_CHANGE);
  this.layoutEditor.commitChange('move-resize', 'Display: Block');
};
HyperAnchorEditorCmd.hyperDisplayFrontOfText = function () {
  var components = this.layoutEditor.anchorEditorsCtrl.getComponents();
  components.forEach(function (comp) {
    var pBound = comp.domElt.parentElement.getBoundingClientRect();
    var bound = comp.domElt.getBoundingClientRect();
    comp.style.display = 'inline-block';
    comp.style.position = 'absolute';
    comp.style.vAlign = 'top';
    comp.style.hAlign = 'left';
    comp.style.left = bound.left - pBound.left;
    comp.style.top = bound.top - pBound.top;
  });
  this.layoutEditor.lcEmitter.emit(_Constants.EV_COMP_BOUND_CHANGE);
  this.layoutEditor.commitChange('move-resize', 'Display: Block');
};

/**
 * @extends BaseAnchorEditor
 * @param {LayoutEditor} layoutEditor
 * @param {BaseComponent} component
 * @constructor
 */
function HyperAnchorEditor(layoutEditor, component) {
  _BaseAnchorEditor["default"].call(this, layoutEditor, component);
  this.cmdRunner.assign(HyperAnchorEditorCmd);
  var self = this;
  this.$foreground = this.layoutEditor.$foreground;
  /**
   * @type ResizeBox
   */
  this.$resizeBox = _({
    tag: _ResizeBox["default"]
  }).on('click', function (ev) {
    self.emit('click', ev, true);
  }).on('dblclick', this.ev_dblClick);
  this.$newPos = _({
    "class": 'as-hae-new-pos'
  });
  this.$commandCtn = _({
    style: {
      position: 'absolute',
      background: 'red',
      width: '30px',
      height: '30px',
      left: '0px',
      bottom: 'calc(100% + 10px)'
    }
  });
  // this.$commandCtn.addTo(this.$resizeBox);
  this.moveCtrl = new HAEMoveController(this);
  this.$resizeBox.defineEvent('contextmenu');
  this.$resizeBox.on('contextmenu', this.ev_contextMenu.bind(this));
  this.movingData = null;
  this.isFocus = false;
  this.$resizeBox.addTo(this.$foreground);
  this.update();
}
_OOP["default"].mixClass(HyperAnchorEditor, _BaseAnchorEditor["default"]);
HyperAnchorEditor.prototype.destroy = function () {
  this.$resizeBox.remove();
};
HyperAnchorEditor.prototype.ev_contextMenu = function (event) {
  var _this = this;
  var makeItem = function makeItem(cmd, child) {
    if (!cmd) return '===';
    var name = cmd instanceof Array ? cmd[0] : cmd;
    var cmdDescriptor = _CmdDescriptors["default"][name] || {
      desc: '',
      icon: 'span.mdi.mdi-item'
    };
    var res = {
      icon: cmdDescriptor.icon,
      text: cmdDescriptor.desc,
      cmd: cmd
    };
    if (child) res.items = child.map(function (it) {
      return makeItem(it);
    });
    return res;
  };
  var menuItems = [makeItem('edit'), makeItem('delete'), '----', makeItem('hyperDisplayAs', ['hyperDisplayAsInline', 'hyperDisplayAsBlock', 'hyperDisplayAsParagraph', 'hyperDisplayFrontOfText']), makeItem('formatStyle')];
  console.log(menuItems);

  /*
    var    items = [
          'horizontalAlignLeft',
          'horizontalAlignCenter',
          'horizontalAlignRight'
      ].concat(this.layoutEditor.anchorEditors.length > 1 ? [] : [
          'equaliseWidth'
      ]).concat([
          null,
          'verticalAlignTop',
          'verticalAlignCenter',
          'verticalAlignBottom'
      ]).concat(this.layoutEditor.anchorEditors.length > 1 ? [] : [
          'equaliseHeight'
      ]).concat([null]).map(makeItem);
        if (this.layoutEditor.anchorEditors.length === 1 && this.layoutEditor.anchorEditors[0].component.isLayout) {
          items.push({
              icon: 'span.mdi.mdi-square-edit-outline[style="color:blue"]',
              text: 'Edit Layout',
              cmd: this.execCmd.bind(this, 'layoutEdit')
          });
      }
        items = [];
      items.push({
          icon: 'span.mdi.mdi-delete-variant[style="color:red"]',
          text: 'Delete',
          cmd: 'delete'
      });
  */
  event.showContextMenu({
    items: menuItems,
    extendStyle: {
      fontSize: '12px'
    }
  }, function (event) {
    var cmd = event.menuItem.cmd;
    _this.execCmd(cmd);
    // if (typeof cmd == 'function') {
    //     cmd();
    //     self.layoutEditor.notifyDataChange();
    // }
    // else if (typeof cmd == 'string') {
    //     self.layoutEditor.execCmd(cmd);
    // }
    // self.layoutEditor.getView().focus();
  });

  // event.stopPropagation();
};

HyperAnchorEditor.prototype.focus = function () {
  if (!this.component) return;
  this.$resizeBox.addClass('as-focus');
  // this.$marginBox.removeClass('as-focus');
  if (this.isFocus) return;
  this.isFocus = true;
  var editor;
  for (var i = 0; i < this.layoutEditor.anchorEditors.length; ++i) {
    editor = this.layoutEditor.anchorEditors[i];
    if (editor === this) continue;
    editor.blur();
  }
  this.emit('focus', {
    type: 'focus',
    target: this
  }, this);
};
HyperAnchorEditor.prototype.blur = function () {
  if (!this.isFocus) return;
  this.isFocus = false;
  this.$resizeBox.removeClass('as-focus');
  this.emit('blur', {
    type: 'blur',
    target: this
  }, this);
};
HyperAnchorEditor.prototype.update = function () {
  var styleDescriptors = this.component.getStyleDescriptors();
  if (styleDescriptors.top || styleDescriptors.bottom || styleDescriptors.left || styleDescriptors.right) {
    // this.$marginBox.addTo(this.layoutEditor.$foreground);
  } else {
    // this.$marginBox.selfRemove();
  }
  this.$resizeBox.canMove = !!(styleDescriptors.top || styleDescriptors.bottom || styleDescriptors.left || styleDescriptors.right);
  this.$resizeBox.canResize = !!(styleDescriptors.width || styleDescriptors.height);
  // this.$marginBox.canClick = !!(styleDescriptors.top || styleDescriptors.bottom || styleDescriptors.left || styleDescriptors.right);
  // this.$marginBox.canResize = true;
  this.updatePosition();
};
HyperAnchorEditor.prototype.updatePosition = function () {
  var bound = this.layoutEditor.$foreground.getBoundingClientRect();
  var compBound = this.component.domElt.getBoundingClientRect();
  this.$resizeBox.addStyle({
    left: (compBound.left - bound.left) / this.layoutEditor._softScale + 'px',
    top: (compBound.top - bound.top) / this.layoutEditor._softScale + 'px',
    width: compBound.width / this.layoutEditor._softScale + 'px',
    height: compBound.height / this.layoutEditor._softScale + 'px'
  });
  this.layoutEditor.boundViewCtrl.update();
};
HyperAnchorEditor.prototype.alignHorizontalCenter = function (centerValue) {
  // right - left
  if (!this.component) return;
  var currentHAlign = this.component.getStyle('hAlign');
  var cRight = this.component.getStyle('right');
  var cLeft = this.component.getStyle('left');
  var newLeft = (cRight + cLeft - centerValue) / 2;
  var newRight = (cRight + cLeft + centerValue) / 2;
  switch (currentHAlign) {
    case 'right':
      this.component.setStyle('right', newRight);
      break;
    case 'fixed':
      this.component.setStyle('left', newLeft);
      this.component.setStyle('right', newRight);
      break;
    case 'left':
      this.component.setStyle('left', newLeft);
      break;
    case 'center':
      //noway to align center
      break;
  }
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
HyperAnchorEditor.prototype.getCmdGroupTree = function () {
  var res = [];
  res.push(['equaliseWidth', 'equaliseHeight']);
  return res;
};
HyperAnchorEditor.prototype.getCmdDescriptor = function (name) {
  return _LinearAnchorEditorCmd.LinearAnchorEditorCmdDescriptors[name];
};
HyperAnchorEditor.prototype.execCmd = function () {
  return this.cmdRunner.invoke.apply(this.cmdRunner, arguments);
};
var _default = HyperAnchorEditor;
/**
 *
 * @param {HyperAnchorEditor} editor
 * @constructor
 */
exports["default"] = _default;
function HAEMoveController(editor) {
  this.editor = editor;
  this.lcEmitter = this.editor.layoutEditor.lcEmitter;
  // this.
  this.component = this.editor.component;
  this.$resizeBox = this.editor.$resizeBox;
  this.$resizeBox.on('beginmove', this.ev_beginMove.bind(this, true)).on('moving', this.ev_moving.bind(this, true)).on('endmove', this.ev_endMove.bind(this, true));
  this.$newPos = this.editor.$newPos;
  this.$foreground = this.editor.$foreground;
}
HAEMoveController.prototype.ev_beginMove = function (userAction, event) {
  this.editor.modalBegin();
  this.editor.viewMouseDrag(event.clientDX, event.clientDY);
  this.style0 = Object.assign({}, this.component.style, {
    left: this.component.getStyle('left', 'px'),
    right: this.component.getStyle('right', 'px'),
    top: this.component.getStyle('top', 'px'),
    bottom: this.component.getStyle('bottom', 'px'),
    width: this.component.getStyle('width', 'px'),
    height: this.component.getStyle('height', 'px')
  });
  if (this.style0.position === 'static' && event.option.body) {
    this.beginMoveBodyStatic(event);
  }
};
HAEMoveController.prototype.ev_moving = function (userAction, event) {
  this.editor.viewMouseDrag(event.clientDX, event.clientDY);
  if (event.option.body) this.moveBody(event);
  if (event.option.right) this.moveRight(event);
  if (event.option.bottom) this.moveBottom(event);
  if (event.option.left) this.moveLeft(event);
  this.editor.updatePosition();
  if (userAction) this.lcEmitter.emit(_Constants.EV_ANCHOR_EDITOR_CHANGE);
};
HAEMoveController.prototype.ev_endMove = function (userAction, event) {
  this.editor.modalEnd();
  this.editor.viewMouseDrag(null);
  if (this.style0.position === 'static' && event.option.body) {
    this.endMoveBodyStatic(event);
  } else {
    if (userAction) this.editor.layoutEditor.commitChange("move", "Drag " + this.component.attributes.name);
  }
};
HAEMoveController.prototype.beginMoveBodyStatic = function (event) {
  this.$newPos.addTo(this.$foreground);
  this.$resizeBox.addClass('as-order-moving');
};
HAEMoveController.prototype.moveBody = function (event) {
  switch (this.style0.position) {
    case 'absolute':
      this.moveBodyAbsolute(event);
      break;
    case 'static':
      this.moveBodyStatic(event);
      break;
    case 'relative':
      this.moveBodyRelative(event);
      break;
  }
};
HAEMoveController.prototype.moveBodyStatic = function (event) {
  var children = this.component.parent.children.slice();
  var i, cBound, child, found;
  var pos = new _Vec["default"](event.clientX, event.clientY);
  for (i = 0; i < children.length && (!found || found.type === 'after'); ++i) {
    child = children[i];
    cBound = _Rectangle["default"].fromClientRect(child.domElt.getBoundingClientRect());
    if (child.style.position !== 'absolute') {
      cBound = _Rectangle["default"].fromClientRect(child.domElt.getBoundingClientRect());
      if (pos.x < cBound.C().x && pos.y < cBound.C().y) {
        found = {
          type: 'before',
          child: child,
          cBound: cBound
        };
      } else if (pos.x >= cBound.x && pos.y > cBound.C().y || pos.x >= cBound.B().x && pos.y > cBound.y) {
        found = {
          type: 'after',
          child: child,
          cBound: cBound
        };
      }
    }
  }
  this.newStatictPostion = found;
  var fBound = _Rectangle["default"].fromClientRect(this.$foreground.getBoundingClientRect());
  var newPos;
  if (found) {
    newPos = found.cBound.A().sub(fBound.A());
    if (found.type === "before" && found.child === this.component || found.type === "before" && found.child === this.component.parent.findChildAfter(this.component) || found.type === 'after' && this.component.parent.findChildBefore(this.component) === found.child) {
      this.$newPos.addStyle('display', 'none');
      found.changed = false;
    } else {
      found.changed = true;
      this.$newPos.removeStyle('display');
      this.$newPos.addStyle({
        top: newPos.y + 'px',
        left: newPos.x + 'px',
        width: found.cBound.width + 'px',
        height: found.cBound.height + 'px'
      });
      this.$newPos.attr('data-type', found.type);
      this.$newPos.attr('data-of-pos', found.child.style.display);
    }
  } else {
    this.$newPos.addStyle('display', 'none');
  }
};
HAEMoveController.prototype.moveBodyAbsolute = function (event) {
  switch (this.style0.hAlign) {
    case 'left':
      this.component.style.setProperty('left', this.style0.left + event.clientDX, 'px');
      break;
    case 'right':
      this.component.style.setProperty('right', this.style0.right - event.clientDX, 'px');
      break;
    case 'fixed':
      this.component.style.setProperty('left', this.style0.left + event.clientDX, 'px');
      this.component.style.setProperty('right', this.style0.right - event.clientDX, 'px');
      break;
    default:
      break;
  }
  switch (this.style0.vAlign) {
    case 'top':
      this.component.style.setProperty('top', this.style0.top + event.clientDY, 'px');
      break;
    case 'bottom':
      this.component.style.setProperty('bottom', this.style0.bottom - event.clientDY, 'px');
      break;
    case 'fixed':
      this.component.style.setProperty('top', this.style0.top + event.clientDY, 'px');
      this.component.style.setProperty('bottom', this.style0.bottom - event.clientDY, 'px');
      break;
    default:
      break;
  }
};
HAEMoveController.prototype.moveBodyRelative = function (event) {
  switch (this.style0.hAlign) {
    case 'left':
      this.component.style.setProperty('left', this.style0.left + event.clientDX, 'px');
      break;
    case 'right':
      this.component.style.setProperty('right', this.style0.right - event.clientDX, 'px');
      break;
    default:
      break;
  }
  switch (this.style0.vAlign) {
    case 'top':
      this.component.style.setProperty('top', this.style0.top + event.clientDY, 'px');
      break;
    case 'bottom':
      this.component.style.setProperty('bottom', this.style0.bottom - event.clientDY, 'px');
      break;
  }
};
HAEMoveController.prototype.moveRight = function (event) {
  switch (this.style0.position) {
    case 'absolute':
      this.moveRightAbsolute(event);
      break;
    case 'static':
      this.moveRightStatic(event);
      break;
    case 'relative':
      this.moveRightRelative(event);
      break;
  }
};
HAEMoveController.prototype.moveRightAbsolute = function (event) {
  switch (this.style0.hAlign) {
    case 'left':
      this.component.style.setProperty('width', this.style0.width + event.clientDX, 'px');
      break;
    case 'right':
      this.component.style.setProperty('width', this.style0.width + event.clientDX, 'px');
      this.component.style.setProperty('right', this.style0.right - event.clientDX, 'px');
      break;
    case 'center':
      this.component.style.setProperty('width', this.style0.width + event.clientDX * 2, 'px');
      break;
    case 'fixed':
      this.component.style.setProperty('right', this.style0.right - event.clientDX, 'px');
      break;
  }
};
HAEMoveController.prototype.moveRightStatic = function (event) {
  this.component.style.setProperty('width', Math.max(0, this.style0.width + event.clientDX), 'px');
};
HAEMoveController.prototype.moveRightRelative = function (event) {
  switch (this.style0.hAlign) {
    case 'left':
      this.component.style.setProperty('width', this.style0.width + event.clientDX, 'px');
      break;
    case 'right':
      this.component.style.setProperty('width', this.style0.width + event.clientDX, 'px');
      this.component.style.setProperty('right', this.style0.right - event.clientDX, 'px');
      break;
  }
};
HAEMoveController.prototype.moveBottom = function (event) {
  switch (this.style0.position) {
    case 'absolute':
      this.moveBottomAbsolute(event);
      break;
    case 'static':
      this.moveBottomStatic(event);
      break;
    case 'relative':
      this.moveBottomRelative(event);
      break;
  }
};
HAEMoveController.prototype.moveBottomAbsolute = function (event) {
  switch (this.style0.vAlign) {
    case 'top':
      this.component.style.setProperty('height', this.style0.height + event.clientDY, 'px');
      break;
    case 'bottom':
      this.component.style.setProperty('height', this.style0.height + event.clientDY, 'px');
      this.component.style.setProperty('bottom', this.style0.bottom - event.clientDY, 'px');
      break;
    case 'center':
      this.component.style.setProperty('height', this.style0.height + event.clientDY * 2, 'px');
      break;
    case 'fixed':
      this.component.style.setProperty('bottom', this.style0.bottom - event.clientDY, 'px');
      break;
  }
  this.editor.updatePosition();
};
HAEMoveController.prototype.moveBottomStatic = function (event) {
  this.component.style.setProperty('height', Math.max(0, this.style0.height + event.clientDY), 'px');
};
HAEMoveController.prototype.moveBottomRelative = function (event) {
  switch (this.style0.vAlign) {
    case 'top':
      this.component.style.setProperty('height', this.style0.height + event.clientDY, 'px');
      break;
    case 'bottom':
      this.component.style.setProperty('height', this.style0.height + event.clientDY, 'px');
      this.component.style.setProperty('bottom', this.style0.bottom - event.clientDY, 'px');
      break;
    case 'center':
      this.component.style.setProperty('height', this.style0.height + event.clientDY, 'px');
  }
  this.editor.updatePosition();
};
HAEMoveController.prototype.moveLeft = function (event) {
  switch (this.style0.position) {
    case 'relative':
      this.moveLeftRelative(event);
      break;
    case 'absolute':
      this.moveLeftAbsolute(event);
      break;
    case 'static':
      this.moveLeftStatic(event);
      break;
  }
};
HAEMoveController.prototype.moveLeftRelative = function (event) {
  switch (this.style0.hAlign) {
    case 'left':
      this.component.style.setProperty('left', this.style0.left + event.clientDX, 'px');
      this.component.style.setProperty('width', Math.max(this.style0.width - event.clientDX), 'px');
      break;
    case 'right':
      this.component.style.setProperty('right', this.style0.left - event.clientDX, 'px');
      this.component.style.setProperty('width', Math.max(this.style0.width - event.clientDX), 'px');
      break;
  }
};
HAEMoveController.prototype.moveLeftAbsolute = function (event) {
  switch (this.style0.hAlign) {
    case 'left':
      this.component.style.setProperty('left', this.style0.left + event.clientDX, 'px');
      this.component.style.setProperty('width', Math.max(this.style0.width - event.clientDX), 'px');
      break;
    case 'right':
      this.component.style.setProperty('width', Math.max(this.style0.width - event.clientDX), 'px');
      break;
    case 'center':
      this.component.style.setProperty('width', Math.max(this.style0.width - event.clientDX * 2), 'px');
      break;
    case 'fixed':
      this.component.style.setProperty('left', this.style0.left + event.clientDX, 'px');
      break;
  }
};
HAEMoveController.prototype.moveLeftStatic = function (event) {
  //todo
};
HAEMoveController.prototype.endMoveBodyStatic = function (event) {
  this.$newPos.remove();
  this.$resizeBox.removeClass('as-order-moving');
  var found = this.newStatictPostion;
  var parent = this.component.parent;
  if (found && found.changed) {
    this.component.remove();
    if (found.type === 'before') {
      parent.addChildBefore(this.component, found.child);
    } else {
      parent.addChildAfter(this.component, found.child);
    }
    this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
    this.editor.layoutEditor.commitChange('move', "Move " + this.component.attributes.name);
  }
};

/***/ }),

/***/ 41862:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(4365);
__webpack_require__(78064);
var _BaseAnchorEditor = _interopRequireDefault(__webpack_require__(86091));
var _LinearAnchorEditorCmd = _interopRequireWildcard(__webpack_require__(65071));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/**
 * @extends BaseAnchorEditor
 * @param {LayoutEditor} layoutEditor
 * @param {BaseComponent} component
 */
function LinearAnchorEditor(layoutEditor, component) {
  _BaseAnchorEditor["default"].call(this, layoutEditor, component);
  this.cmdRunner.assign(_LinearAnchorEditorCmd["default"]);
  var self = this;
  this.$modal = _({
    style: {
      zIndex: '10000000',
      left: '1px',
      right: '1px',
      top: '1px',
      bottom: '1px',
      position: 'fixed'
    }
  });
  this.$marginBox = _('resizebox').on('click', this.focusMarginBox.bind(this)).on('beginmove', this.ev_beginMove.bind(this, true)).on('moving', this.ev_movingMargin.bind(this, true)).on('endmove', this.ev_endMove.bind(this, true));
  this.$resizeBox = _('resizebox').on('mousedown', this.focus.bind(this)).on('beginmove', this.ev_beginMove.bind(this, true)).on('moving', this.ev_moving.bind(this, true)).on('endmove', this.ev_endMove.bind(this, true)).on('click', function (ev) {
    self.emit('click', ev, true);
  }).on('dblclick', this.ev_dblClick);
  this.$resizeBox.defineEvent('contextmenu');
  this.$resizeBox.on('contextmenu', this.ev_contextMenu.bind(this));
  this.movingData = null;
  this.isFocus = false;
  this.update();
}
_OOP["default"].mixClass(LinearAnchorEditor, _BaseAnchorEditor["default"]);
LinearAnchorEditor.prototype.ev_contextMenu = function (event) {
  var self = this;
  var items = [];
  function makeItem(name) {
    if (name === null) return '=====';
    var cmdDescriptor = _LinearAnchorEditorCmd.LinearAnchorEditorCmdDescriptors[name];
    var res = {
      icon: cmdDescriptor.icon,
      text: cmdDescriptor.desc,
      cmd: name
    };
    if (cmdDescriptor.bindKey && cmdDescriptor.bindKey.win) {
      res.key = cmdDescriptor.bindKey.win;
    }
    return res;
  }
  items = ['horizontalAlignLeft', 'horizontalAlignCenter', 'horizontalAlignRight'].concat(this.layoutEditor.anchorEditors.length > 1 ? [] : ['equaliseWidth']).concat([null, 'verticalAlignTop', 'verticalAlignCenter', 'verticalAlignBottom']).concat(this.layoutEditor.anchorEditors.length > 1 ? [] : ['equaliseHeight']).concat([null]).map(makeItem);
  if (this.layoutEditor.anchorEditors.length === 1 && this.layoutEditor.anchorEditors[0].component.isLayout) {
    items.push({
      icon: 'span.mdi.mdi-square-edit-outline[style="color:blue"]',
      text: 'Edit Layout',
      cmd: this.execCmd.bind(this, 'layoutEdit')
    });
  }
  items.push({
    icon: 'span.mdi.mdi-delete-variant[style="color:red"]',
    text: 'Delete',
    cmd: 'delete'
  });
  event.showContextMenu({
    items: items,
    extendStyle: {
      fontSize: '12px'
    }
  }, function (event) {
    var cmd = event.menuItem.cmd;
    if (typeof cmd == 'function') {
      cmd();
      self.layoutEditor.notifyDataChange();
    } else if (typeof cmd == 'string') {
      self.layoutEditor.execCmd(cmd);
    }
    self.layoutEditor.getView().focus();
  });

  // event.stopPropagation();
};

LinearAnchorEditor.prototype.focusMarginBox = function () {
  if (!this.component) return;
  if (this.isFocus) {
    // this.$resizeBox.removeClass('as-focus');// this is feature, not bug
    // this.$marginBox.addClass('as-focus');
  } else {
    // this.$marginBox.addClass('as-focus');
    this.$resizeBox.addClass('as-focus');
    this.isFocus = true;
    var editor;
    for (var i = 0; i < this.layoutEditor.anchorEditors.length; ++i) {
      editor = this.layoutEditor.anchorEditors[i];
      if (editor === this) continue;
      editor.blur();
    }
    this.emit('focus', {
      type: 'focus',
      target: this
    }, this);
  }
};
LinearAnchorEditor.prototype.focus = function () {
  if (!this.component) return;
  this.$resizeBox.addClass('as-focus');
  this.$marginBox.removeClass('as-focus');
  if (this.isFocus) return;
  this.isFocus = true;
  var editor;
  for (var i = 0; i < this.layoutEditor.anchorEditors.length; ++i) {
    editor = this.layoutEditor.anchorEditors[i];
    if (editor == this) continue;
    editor.blur();
  }
  this.emit('focus', {
    type: 'focus',
    target: this
  }, this);
};
LinearAnchorEditor.prototype.blur = function () {
  if (!this.isFocus) return;
  this.isFocus = false;
  this.$resizeBox.removeClass('as-focus');
  this.emit('blur', {
    type: 'blur',
    target: this
  }, this);
};
LinearAnchorEditor.prototype.destroy = function () {
  this.$resizeBox.remove();
  this.$marginBox.remove();
};
LinearAnchorEditor.prototype.update = function () {
  var styleDescriptors = this.component.getStyleDescriptors();
  if (styleDescriptors.top || styleDescriptors.bottom || styleDescriptors.left || styleDescriptors.right) {
    this.$marginBox.addTo(this.layoutEditor.$foreground);
  } else {
    this.$marginBox.selfRemove();
  }
  this.$resizeBox.addTo(this.layoutEditor.$foreground);
  this.$resizeBox.canMove = !!(styleDescriptors.top || styleDescriptors.bottom || styleDescriptors.left || styleDescriptors.right);
  this.$resizeBox.canResize = !!(styleDescriptors.width || styleDescriptors.height);
  this.$marginBox.canClick = !!(styleDescriptors.top || styleDescriptors.bottom || styleDescriptors.left || styleDescriptors.right);
  this.$marginBox.canResize = true;
  this.updatePosition();
};
LinearAnchorEditor.prototype.updatePosition = function () {
  var bound = this.layoutEditor.$foreground.getBoundingClientRect();
  var compBound = this.component.view.getBoundingClientRect();
  this.$resizeBox.addStyle({
    left: (compBound.left - bound.left) / this.layoutEditor._softScale + 'px',
    top: (compBound.top - bound.top) / this.layoutEditor._softScale + 'px',
    width: compBound.width / this.layoutEditor._softScale + 'px',
    height: compBound.height / this.layoutEditor._softScale + 'px'
  });
  this.$marginBox.addStyle({
    left: (compBound.left - bound.left) / this.layoutEditor._softScale - this.component.getStyle('left', 'px') + 'px',
    top: (compBound.top - bound.top) / this.layoutEditor._softScale - this.component.getStyle('top', 'px') + 'px',
    width: compBound.width / this.layoutEditor._softScale + this.component.getStyle('left', 'px') + this.component.getStyle('right', 'px') + 'px',
    height: compBound.height / this.layoutEditor._softScale + this.component.getStyle('top', 'px') + this.component.getStyle('bottom', 'px') + 'px'
  });
  this.layoutEditor.boundViewCtrl.update();
};
LinearAnchorEditor.prototype.ev_beginMove = function (userAction, event) {
  var bound = this.layoutEditor.$foreground.getBoundingClientRect();
  this.movingData = {
    x0: (event.clientX - bound.left) / this.layoutEditor._softScale,
    y0: (event.clientY - bound.top) / this.layoutEditor._softScale,
    dx: 0,
    dy: 0,
    option: event.option,
    styleDescriptors: this.component.getStyleDescriptors(),
    style0: Object.assign({}, this.component.style, {
      left: this.component.getStyle('left', 'px'),
      right: this.component.getStyle('right', 'px'),
      top: this.component.getStyle('top', 'px'),
      bottom: this.component.getStyle('bottom', 'px'),
      width: this.component.getStyle('width', 'px'),
      height: this.component.getStyle('height', 'px')
    }),
    comp: this.component,
    changedNameDict: {}
  };
  if (userAction) {
    this.emit('beginmove', {
      type: 'beginmove',
      target: this,
      originEvent: event,
      repeatEvent: event
    }, this);
    this.$modal.addTo(document.body);
    this.layoutEditor.rulerCtrl.viewMouseDrag(this.movingData.dx, this.movingData.dy);
    this.layoutEditor.selectCtrl.calcSelectBoundStyle();
  }
};
LinearAnchorEditor.prototype.ev_moving = function (userAction, event) {
  var movingData = this.movingData;
  var bound = this.layoutEditor.$foreground.getBoundingClientRect();
  var x = (event.clientX - bound.left) / this.layoutEditor._softScale;
  var y = (event.clientY - bound.top) / this.layoutEditor._softScale;
  movingData.dx = x - movingData.x0;
  movingData.dy = y - movingData.y0;
  var changedNames = [];
  if (movingData.styleDescriptors.left && !movingData.styleDescriptors.left.disabled && (movingData.option.left || movingData.option.body)) {
    movingData.comp.setStyle('left', Math.max(0, movingData.style0.left + movingData.dx), 'px');
    changedNames.push('left');
  }
  if (movingData.styleDescriptors.right && !movingData.styleDescriptors.right.disabled && (movingData.option.right || movingData.option.body)) {
    movingData.comp.setStyle('right', Math.max(0, movingData.style0.right - movingData.dx), 'px');
    changedNames.push('right');
  }
  if (movingData.styleDescriptors.width && !movingData.styleDescriptors.width.disabled) {
    if (movingData.option.left) {
      if (!!movingData.styleDescriptors.left.disabled && !!movingData.styleDescriptors.right.disabled) {
        movingData.comp.setStyle('width', Math.max(movingData.comp.measureMinSize().width, movingData.style0.width - movingData.dx * 2), 'px');
      } else {
        movingData.comp.setStyle('width', Math.max(movingData.style0.width - movingData.dx), 'px');
      }
      changedNames.push('width');
    }
    if (movingData.option.right) {
      if (movingData.styleDescriptors.left && !!movingData.styleDescriptors.left.disabled && !!movingData.styleDescriptors.right.disabled) {
        movingData.comp.setStyle('width', Math.max(movingData.comp.measureMinSize().width, movingData.style0.width + movingData.dx * 2), 'px');
        //center align
      } else {
        movingData.comp.setStyle('width', Math.max(movingData.comp.measureMinSize().width, movingData.style0.width + movingData.dx), 'px');
      }
      changedNames.push('width');
    }
  }
  if (movingData.styleDescriptors.top && !movingData.styleDescriptors.top.disabled && (movingData.option.top || movingData.option.body)) {
    movingData.comp.setStyle('top', Math.max(0, movingData.style0.top + movingData.dy), 'px');
    changedNames.push('top');
  }
  if (movingData.styleDescriptors.bottom && !movingData.styleDescriptors.bottom.disabled && (movingData.option.bottom || movingData.option.body)) {
    movingData.comp.setStyle('bottom', Math.max(0, movingData.style0.bottom - movingData.dy), 'px');
    changedNames.push('bottom');
  }
  if (movingData.styleDescriptors.height && !movingData.styleDescriptors.height.disabled) {
    if (movingData.option.top) {
      if (movingData.styleDescriptors.top && !!movingData.styleDescriptors.top.disabled && !!movingData.styleDescriptors.bottom.disabled) {
        movingData.comp.setStyle('height', Math.max(movingData.comp.measureMinSize().height, movingData.style0.height - movingData.dy * 2), 'px');
      } else {
        movingData.comp.setStyle('height', Math.max(movingData.comp.measureMinSize().height, movingData.style0.height - movingData.dy), 'px');
      }
      changedNames.push('height');
    }
    if (movingData.option.bottom) {
      if (movingData.styleDescriptors.top && !!movingData.styleDescriptors.top.disabled && !!movingData.styleDescriptors.bottom.disabled) {
        movingData.comp.setStyle('height', Math.max(movingData.comp.measureMinSize().height, movingData.style0.height + movingData.dy * 2), 'px');
      } else {
        movingData.comp.setStyle('height', Math.max(movingData.comp.measureMinSize().height, movingData.style0.height + movingData.dy), 'px');
      }
      changedNames.push('height');
    }
  }
  this.updatePosition();
  if (changedNames.length > 0) {
    this.emit("reposition", {
      type: 'reposition',
      component: movingData.comp,
      movingData: movingData,
      originEvent: event,
      repeatEvent: event
    }, this);
    changedNames.forEach(function (name) {
      return movingData.changedNameDict[name] = true;
    });
    _ResizeSystem["default"].updateDown(movingData.comp.view);
  }
  if (userAction) {
    this.emit('moving', {
      target: this,
      type: 'moving',
      originEvent: event,
      repeatEvent: event
    }, this);
    this.layoutEditor.rulerCtrl.viewMouseDrag(this.movingData.dx, this.movingData.dy);
    this.layoutEditor.selectCtrl.calcSelectBoundStyle();
  }
};
LinearAnchorEditor.prototype.ev_movingMargin = function (userAction, event) {
  var movingData = this.movingData;
  var bound = this.layoutEditor.$foreground.getBoundingClientRect();
  var x = (event.clientX - bound.left) / this.layoutEditor._softScale;
  var y = (event.clientY - bound.top) / this.layoutEditor._softScale;
  movingData.dx = x - movingData.x0;
  movingData.dy = y - movingData.y0;
  var changedNames = [];
  if (movingData.styleDescriptors.bottom && event.option.bottom) {
    movingData.comp.setStyle('bottom', Math.max(0, movingData.style0.bottom + movingData.dy), 'px');
    changedNames.push('bottom');
  }
  if (movingData.styleDescriptors.right && event.option.right) {
    movingData.comp.setStyle('right', Math.max(0, movingData.style0.right + movingData.dx), 'px');
    changedNames.push('right');
  }
  this.updatePosition();
  if (changedNames.length > 0) {
    this.emit("reposition", {
      type: 'reposition',
      component: movingData.comp,
      movingData: movingData,
      originEvent: event
    }, this);
    changedNames.forEach(function (name) {
      return movingData.changedNameDict[name] = true;
    });
  }
  if (userAction) {
    this.emit('moving', {
      target: this,
      type: 'moving',
      originEvent: event
    }, this);
    this.layoutEditor.rulerCtrl.viewMouseDrag(this.movingData.dx, this.movingData.dy);
    this.layoutEditor.selectCtrl.calcSelectBoundStyle();
  }
};
LinearAnchorEditor.prototype.ev_endMove = function (userAction, event) {
  var _this = this;
  var changedNames = Object.keys(this.movingData.changedNameDict);
  if (changedNames.length > 0) {
    this.emit('change', {
      type: 'change',
      target: this,
      component: this.movingData.comp,
      originEvent: event
    }, this);
  }
  this.movingData = undefined;
  if (userAction) {
    this.emit('endmove', {
      target: this,
      type: 'moving',
      originEvent: event
    }, this);
    setTimeout(this.$modal.selfRemove.bind(this.$modal), 100);
    this.layoutEditor.rulerCtrl.viewMouseDrag(null);
    if (this.layoutEditor.propertyEditor) {
      changedNames.forEach(function (name) {
        _this.layoutEditor.propertyEditor.updatePropertyRecursive(name);
      });
    }
  }
};
LinearAnchorEditor.prototype.alignHorizontalCenter = function (centerValue) {
  // right - left
  if (!this.component) return;
  var currentHAlign = this.component.getStyle('hAlign');
  var cRight = this.component.getStyle('right');
  var cLeft = this.component.getStyle('left');
  var newLeft = (cRight + cLeft - centerValue) / 2;
  var newRight = (cRight + cLeft + centerValue) / 2;
  switch (currentHAlign) {
    case 'right':
      this.component.setStyle('right', newRight);
      break;
    case 'fixed':
      this.component.setStyle('left', newLeft);
      this.component.setStyle('right', newRight);
      break;
    case 'left':
      this.component.setStyle('left', newLeft);
      break;
    case 'center':
      //noway to align center
      break;
  }
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
LinearAnchorEditor.prototype.equaliseWidth = function (widthValue) {
  if (!this.component) return;
  this.component.setStyle('width', widthValue, 'px');
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
LinearAnchorEditor.prototype.equaliseHeight = function (heightValue) {
  if (!this.component) return;
  this.component.setStyle('height', heightValue, 'px');
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
LinearAnchorEditor.prototype.verticalAlignTop = function () {
  if (!this.component) return;
  var styleBot = this.component.getStyle('top', 'px') + this.component.getStyle('bottom', 'px');
  this.component.setStyle('top', 0, 'px');
  this.component.setStyle('bottom', styleBot, 'px');
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
LinearAnchorEditor.prototype.verticalAlignCenter = function () {
  if (!this.component) return;
  var styleTopBot = (this.component.getStyle('top', 'px') + this.component.getStyle('bottom', 'px')) / 2;
  this.component.setStyle('top', styleTopBot, 'px');
  this.component.setStyle('bottom', styleTopBot, 'px');
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
LinearAnchorEditor.prototype.verticalAlignBottom = function () {
  if (!this.component) return;
  var styleTop = this.component.getStyle('top', 'px') + this.component.getStyle('bottom', 'px');
  this.component.setStyle('top', styleTop, 'px');
  this.component.setStyle('bottom', 0, 'px');
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
LinearAnchorEditor.prototype.horizontalAlignRight = function () {
  if (!this.component) return;
  var styleLeft = this.component.getStyle('left', 'px') + this.component.getStyle('right', 'px');
  this.component.setStyle('left', styleLeft, 'px');
  this.component.setStyle('right', 0, 'px');
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
LinearAnchorEditor.prototype.horizontalAlignLeft = function () {
  if (!this.component) return;
  var styleRight = this.component.getStyle('left', 'px') + this.component.getStyle('right', 'px');
  this.component.setStyle('right', styleRight, 'px');
  this.component.setStyle('left', 0, 'px');
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
LinearAnchorEditor.prototype.horizontalAlignCenter = function () {
  if (!this.component) return;
  var styleLeftRight = (this.component.getStyle('left', 'px') + this.component.getStyle('right', 'px')) / 2;
  this.component.setStyle('left', styleLeftRight, 'px');
  this.component.setStyle('right', styleLeftRight, 'px');
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
LinearAnchorEditor.prototype.getCmdGroupTree = function () {
  return _LinearAnchorEditorCmd.LinearAnchorEditorCmdTree;
};
LinearAnchorEditor.prototype.getCmdDescriptor = function (name) {
  return _LinearAnchorEditorCmd.LinearAnchorEditorCmdDescriptors[name];
};
LinearAnchorEditor.prototype.execCmd = function () {
  return this.cmdRunner.invoke.apply(this.cmdRunner, arguments);
};
var _default = LinearAnchorEditor;
exports["default"] = _default;

/***/ }),

/***/ 65071:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.LinearAnchorEditorCmdTree = exports.LinearAnchorEditorCmdDescriptors = void 0;
var _BaseAnchorEditorCmd = _interopRequireDefault(__webpack_require__(27804));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @type {import('./LinearAnchorEditor').default}
 */
var LinearAnchorEditorCmd = Object.assign({}, _BaseAnchorEditorCmd["default"]);
;
LinearAnchorEditorCmd.equaliseWidth = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var widthValue = this.component.getStyle('width', 'px');
  for (var i = 0; i < editors.length; ++i) {
    var editor = editors[i];
    if (editor == this) continue;
    editor.equaliseWidth(widthValue);
  }
  this.layoutEditor.commitHistory('move', 'Equalise Width');
};
LinearAnchorEditorCmd.equaliseHeight = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var heightValue = this.component.getStyle('height', 'px');
  for (var i = 0; i < editors.length; ++i) {
    var editor = editors[i];
    if (editor == this) continue;
    editor.equaliseHeight(heightValue);
  }
  this.layoutEditor.commitHistory('move', 'Equalise Height');
};
LinearAnchorEditorCmd.verticalAlignTop = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  for (var i = 0; i < editors.length; ++i) {
    var editor = editors[i];
    editor.verticalAlignTop();
  }
  this.layoutEditor.commitHistory('move', 'Vertical Align Top');
};
LinearAnchorEditorCmd.verticalAlignCenter = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  for (var i = 0; i < editors.length; ++i) {
    var editor = editors[i];
    editor.verticalAlignCenter();
  }
  this.layoutEditor.commitHistory('move', 'Vertical Align Center');
};
LinearAnchorEditorCmd.verticalAlignBottom = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  for (var i = 0; i < editors.length; ++i) {
    var editor = editors[i];
    editor.verticalAlignBottom();
  }
  this.layoutEditor.commitHistory('move', 'Vertical Align Bottom');
};
LinearAnchorEditorCmd.horizontalAlignLeft = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  for (var i = 0; i < editors.length; ++i) {
    var editor = editors[i];
    editor.horizontalAlignLeft();
  }
  this.layoutEditor.commitHistory('move', 'Horizontal Align Left');
};
LinearAnchorEditorCmd.horizontalAlignCenter = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  for (var i = 0; i < editors.length; ++i) {
    var editor = editors[i];
    editor.horizontalAlignCenter();
  }
  this.layoutEditor.commitHistory('move', 'Horizontal Align Center');
};
LinearAnchorEditorCmd.horizontalAlignRight = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  for (var i = 0; i < editors.length; ++i) {
    var editor = editors[i];
    editor.horizontalAlignRight();
  }
  this.layoutEditor.commitHistory('move', 'Horizontal Align Right');
};
var _default = LinearAnchorEditorCmd;
exports["default"] = _default;
var LinearAnchorEditorCmdTree = [[['horizontalAlignLeft', 'horizontalAlignCenter', 'horizontalAlignRight', 'equaliseWidth'], ['verticalAlignTop', 'verticalAlignCenter', 'verticalAlignBottom', 'equaliseHeight']]];
exports.LinearAnchorEditorCmdTree = LinearAnchorEditorCmdTree;
var LinearAnchorEditorCmdDescriptors = {
  equaliseWidth: {
    type: 'trigger',
    icon: 'span.mdi.mdi-arrow-expand-horizontal',
    desc: 'Equalise Width'
  },
  equaliseHeight: {
    type: 'trigger',
    icon: 'span.mdi.mdi-arrow-expand-vertical',
    desc: 'Equalise Height'
  },
  verticalAlignTop: {
    type: 'trigger',
    icon: 'span.mdi.mdi-format-vertical-align-top',
    desc: 'Vertical Align Top'
  },
  verticalAlignCenter: {
    type: 'trigger',
    icon: 'span.mdi.mdi-format-vertical-align-center',
    desc: 'Vertical Align Center'
  },
  verticalAlignBottom: {
    type: 'trigger',
    icon: 'span.mdi.mdi-format-vertical-align-bottom',
    desc: 'Vertical Align Bottom'
  },
  horizontalAlignLeft: {
    type: 'trigger',
    icon: 'span.mdi.mdi-format-horizontal-align-left',
    desc: 'Horizontal Align Left'
  },
  horizontalAlignCenter: {
    type: 'trigger',
    icon: 'span.mdi.mdi-format-horizontal-align-center',
    desc: 'Horizontal Align Center'
  },
  horizontalAlignRight: {
    type: 'trigger',
    icon: 'span.mdi.mdi-format-horizontal-align-right',
    desc: 'Horizontal Align Right'
  }
};
exports.LinearAnchorEditorCmdDescriptors = LinearAnchorEditorCmdDescriptors;

/***/ }),

/***/ 29098:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(4365);
__webpack_require__(78064);
var _BaseAnchorEditor = _interopRequireDefault(__webpack_require__(86091));
var _RelativeAnchorEditorCmd = _interopRequireWildcard(__webpack_require__(35757));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _Array = __webpack_require__(40411);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/**
 * @extends BaseAnchorEditor
 * @param {LayoutEditor} layoutEditor
 * @param {BaseComponent} component
 */
function RelativeAnchorEditor(layoutEditor, component) {
  _BaseAnchorEditor["default"].call(this, layoutEditor, component);
  this.cmdRunner.assign(_RelativeAnchorEditorCmd["default"]);
  var self = this;
  this.$modal = _({
    style: {
      zIndex: '10000000',
      left: '1px',
      right: '1px',
      top: '1px',
      bottom: '1px',
      position: 'fixed'
    }
  });
  this.$resizeBox = _('resizebox').on('mousedown', this.focus.bind(this)).on('beginmove', this.ev_beginMove.bind(this, true)).on('moving', this.ev_moving.bind(this, true)).on('endmove', this.ev_endMove.bind(this, true)).on('click', function (ev) {
    self.emit('click', ev, true);
  }).on('dblclick', this.ev_dblClick);
  this.$resizeBox.defineEvent('contextmenu');
  this.$resizeBox.on('contextmenu', this.ev_contextMenu.bind(this));
  this.$topAlignLine = _('vline');
  this.$bottomAlignLine = _('vline');
  this.$leftAlignLine = _('hline');
  this.$rightAlignLine = _('hline');
  this.movingData = null;
  this.isFocus = false;
  this.snapDistance = 2;
  this.update();
}
_OOP["default"].mixClass(RelativeAnchorEditor, _BaseAnchorEditor["default"]);
RelativeAnchorEditor.prototype.ev_contextMenu = function (event) {
  var self = this;
  var items = [];
  function makeItem(name) {
    if (name === null) return '=====';
    var cmdDescriptor = _RelativeAnchorEditorCmd.RelativeAnchorEditorCmdDescriptors[name];
    var res = {
      icon: cmdDescriptor.icon,
      text: cmdDescriptor.desc,
      cmd: name
    };
    if (cmdDescriptor.bindKey && cmdDescriptor.bindKey.win) {
      res.key = cmdDescriptor.bindKey.win;
    }
    return res;
  }
  if (this.layoutEditor.anchorEditors.length > 1) {
    items.push.apply(items, ['alignLeftEdge', 'alignHorizontalCenter', 'alignRightEdge', 'equaliseWidth', null, 'alignTopEdge', 'alignVerticalCenter', 'alignBottomEdge', 'equaliseHeight', null].map(makeItem));
  }
  if (this.layoutEditor.anchorEditors.length > 2) {
    items.push.apply(items, ['distributeHorizontalLeft', 'distributeHorizontalCenter', 'distributeHorizontalRight', 'distributeHorizontalDistance', null, 'distributeVerticalTop', 'distributeVerticalCenter', 'distributeVerticalBottom', 'distributeVerticalDistance', null].map(makeItem));
  }
  if (this.layoutEditor.anchorEditors.length === 1 && this.layoutEditor.anchorEditors[0].component.isLayout) {
    items.push({
      icon: 'span.mdi.mdi-square-edit-outline[style="color:blue"]',
      text: 'Edit Layout',
      cmd: this.execCmd.bind(this, 'layoutEdit')
    });
  }
  items.push({
    icon: 'span.mdi.mdi-delete-variant[style="color:red"]',
    text: 'Delete',
    cmd: 'delete'
  });
  event.showContextMenu({
    items: items,
    extendStyle: {
      fontSize: '12px'
    }
  }, function (event) {
    var cmd = event.menuItem.cmd;
    if (typeof cmd == 'function') {
      cmd();
      self.layoutEditor.notifyDataChange();
    } else if (typeof cmd == 'string') {
      self.layoutEditor.execCmd(cmd);
    }
    self.layoutEditor.getView().focus();
  });
  event.stopPropagation();
};
RelativeAnchorEditor.prototype.focus = function () {
  if (this.isFocus) return;
  this.isFocus = true;
  this.$resizeBox.addClass('as-focus');
  var editor;
  for (var i = 0; i < this.layoutEditor.anchorEditors.length; ++i) {
    editor = this.layoutEditor.anchorEditors[i];
    if (editor === this) continue;
    editor.blur();
  }
  this.emit('focus', {
    type: 'focus',
    target: this
  }, this);
};
RelativeAnchorEditor.prototype.blur = function () {
  if (!this.isFocus) return;
  this.isFocus = false;
  this.$resizeBox.removeClass('as-focus');
  this.emit('blur', {
    type: 'blur',
    target: this
  }, this);
};
RelativeAnchorEditor.prototype.update = function () {
  this.$resizeBox.addTo(this.layoutEditor.$foreground);
  var styleDescriptors = this.component.getStyleDescriptors();
  this.$resizeBox.canMove = !!(styleDescriptors.top || styleDescriptors.bottom || styleDescriptors.left || styleDescriptors.right);
  this.$resizeBox.canResize = !!(styleDescriptors.width || styleDescriptors.height);
  if (!styleDescriptors.top || styleDescriptors.top.disabled) {
    this.$topAlignLine.remove();
  } else {
    this.$topAlignLine.addTo(this.layoutEditor.$foreground);
  }
  if (!styleDescriptors.bottom || styleDescriptors.bottom.disabled) {
    this.$bottomAlignLine.remove();
  } else {
    this.$bottomAlignLine.addTo(this.layoutEditor.$foreground);
  }
  if (!styleDescriptors.left || styleDescriptors.left.disabled) {
    this.$leftAlignLine.remove();
  } else {
    this.$leftAlignLine.addTo(this.layoutEditor.$foreground);
  }
  if (!styleDescriptors.right || styleDescriptors.right.disabled) {
    this.$rightAlignLine.remove();
  } else {
    this.$rightAlignLine.addTo(this.layoutEditor.$foreground);
  }
  this.updatePosition();
};
RelativeAnchorEditor.prototype.destroy = function () {
  this.$resizeBox.remove();
  this.$leftAlignLine.remove();
  this.$rightAlignLine.remove();
  this.$topAlignLine.remove();
  this.$bottomAlignLine.remove();
};
RelativeAnchorEditor.prototype.updatePosition = function () {
  var bound = this.layoutEditor.$foreground.getBoundingClientRect();
  var compBound = this.component.view.getBoundingClientRect();
  var styleLeft = this.component.getStyle('left', 'px');
  var styleTop = this.component.getStyle('top', 'px');
  var styleRight = this.component.getStyle('right', 'px');
  var styleBottom = this.component.getStyle('bottom', 'px');
  this.$resizeBox.addStyle({
    left: (compBound.left - bound.left) / this.layoutEditor._softScale + 'px',
    top: (compBound.top - bound.top) / this.layoutEditor._softScale + 'px',
    width: compBound.width / this.layoutEditor._softScale + 'px',
    height: compBound.height / this.layoutEditor._softScale + 'px'
  });
  if (this.$leftAlignLine.parentNode) this.$leftAlignLine.addStyle({
    left: (compBound.left - bound.left) / this.layoutEditor._softScale - styleLeft + 'px',
    width: styleLeft + 'px',
    top: (compBound.top - bound.top + compBound.height / 2) / this.layoutEditor._softScale + 'px'
  });
  if (this.$rightAlignLine.parentNode) this.$rightAlignLine.addStyle({
    left: (compBound.right - bound.left) / this.layoutEditor._softScale + 'px',
    width: styleRight + 'px',
    top: (compBound.top - bound.top + compBound.height / 2) / this.layoutEditor._softScale + 'px'
  });
  if (this.$topAlignLine.parentNode) this.$topAlignLine.addStyle({
    top: (compBound.top - bound.top) / this.layoutEditor._softScale - styleTop + 'px',
    height: styleTop + 'px',
    left: (compBound.left - bound.left + compBound.width / 2) / this.layoutEditor._softScale + 'px'
  });
  if (this.$bottomAlignLine.parentNode) this.$bottomAlignLine.addStyle({
    top: (compBound.bottom - bound.top) / this.layoutEditor._softScale + 'px',
    height: styleBottom + 'px',
    left: (compBound.left - bound.left + compBound.width / 2) / this.layoutEditor._softScale + 'px'
  });
  this.layoutEditor.boundViewCtrl.update();
};
RelativeAnchorEditor.prototype.ev_beginMove = function (userAction, event) {
  var bound = this.layoutEditor.$foreground.getBoundingClientRect();
  var snapLines = this.getSnapLines();
  this.movingData = {
    userAction: userAction,
    x0: (event.clientX - bound.left) / this.layoutEditor._softScale,
    y0: (event.clientY - bound.top) / this.layoutEditor._softScale,
    dx: 0,
    dy: 0,
    option: event.option,
    styleDescriptors: this.component.getStyleDescriptors(),
    style0: Object.assign({}, this.component.style, {
      left: this.component.getStyle('left', 'px'),
      right: this.component.getStyle('right', 'px'),
      top: this.component.getStyle('top', 'px'),
      bottom: this.component.getStyle('bottom', 'px'),
      width: this.component.getStyle('width', 'px'),
      height: this.component.getStyle('height', 'px')
    }),
    comp: this.component,
    changesNameDict: {},
    snapLines: snapLines,
    $snapXLines: [],
    $snapYLines: [],
    nearestYVal: 10000000,
    nearestY: [],
    nearestXVal: 10000000,
    nearestX: []
  };
  if (userAction) {
    this.emit('beginmove', {
      type: 'beginmove',
      target: this,
      originEvent: event.originEvent || event,
      repeatEvent: event
    }, this);
    this.$modal.addTo(document.body);
    this._updateSnapLines();
    this.viewMouseDrag(this.movingData.dx, this.movingData.dy);
    this.layoutEditor.selectCtrl.calcSelectBoundStyle();
  }
};
RelativeAnchorEditor.prototype.ev_moving = function (userAction, event) {
  var movingData = this.movingData;
  var bound = this.layoutEditor.$foreground.getBoundingClientRect();
  var x = (event.clientX - bound.left) / this.layoutEditor._softScale;
  var y = (event.clientY - bound.top) / this.layoutEditor._softScale;
  movingData.dx = x - movingData.x0;
  movingData.dy = y - movingData.y0;
  if (event.originEvent.ctrlKey) {
    var newW, newH, dH, dW;
    if (movingData.option.body) {
      if (Math.abs(movingData.dx) < Math.abs(movingData.dy)) {
        movingData.dx = 0;
      } else {
        movingData.dy = 0;
      }
    } else {
      if (movingData.option.right) {
        if (!!movingData.styleDescriptors.left.disabled && !!movingData.styleDescriptors.right.disabled) {
          newW = Math.max(0, movingData.style0.width + movingData.dx * 2);
        } else {
          newW = Math.max(0, movingData.style0.width + movingData.dx);
        }
        newH = movingData.style0.height * newW / Math.max(1, movingData.style0.width);
      } else if (movingData.option.left) {
        if (!!movingData.styleDescriptors.left.disabled && !!movingData.styleDescriptors.right.disabled) {
          newW = Math.max(0, movingData.style0.width - movingData.dx * 2);
        } else {
          newW = Math.max(0, movingData.style0.width - movingData.dx);
        }
        newH = movingData.style0.height * newW / Math.max(1, movingData.style0.width);
      }
    }
    if (movingData.option.bottom) {
      movingData.dy = newH - movingData.style0.height;
      if (!!movingData.styleDescriptors.top.disabled && !!movingData.styleDescriptors.bottom.disabled) {
        movingData.dy /= 2;
      }
    } else if (movingData.option.top) {
      movingData.dy = -(newH - movingData.style0.height);
      if (!!movingData.styleDescriptors.top.disabled && !!movingData.styleDescriptors.bottom.disabled) {
        movingData.dy /= 2;
      }
    }
  }
  var changedSNames = [];
  if (movingData.styleDescriptors.left && !movingData.styleDescriptors.left.disabled && (movingData.option.left || movingData.option.body)) {
    movingData.comp.setStyle('left', Math.max(0, movingData.style0.left + movingData.dx), 'px');
    changedSNames.push('left');
  }
  if (movingData.styleDescriptors.right && !movingData.styleDescriptors.right.disabled && (movingData.option.right || movingData.option.body)) {
    movingData.comp.setStyle('right', Math.max(0, movingData.style0.right - movingData.dx), 'px');
    changedSNames.push('right');
  }
  if (movingData.styleDescriptors.width && !movingData.styleDescriptors.width.disabled) {
    if (movingData.option.left) {
      if (!!movingData.styleDescriptors.left.disabled && !!movingData.styleDescriptors.right.disabled) {
        movingData.comp.setStyle('width', Math.max(movingData.comp.measureMinSize().width, movingData.style0.width - movingData.dx * 2), 'px');
      } else {
        movingData.comp.setStyle('width', Math.max(movingData.style0.width - movingData.dx), 'px');
      }
      changedSNames.push('width');
    }
    if (movingData.option.right) {
      if (movingData.styleDescriptors.left && !!movingData.styleDescriptors.left.disabled && !!movingData.styleDescriptors.right.disabled) {
        movingData.comp.setStyle('width', Math.max(movingData.comp.measureMinSize().width, movingData.style0.width + movingData.dx * 2), 'px');
        //center align
      } else {
        movingData.comp.setStyle('width', Math.max(movingData.comp.measureMinSize().width, movingData.style0.width + movingData.dx), 'px');
      }
      changedSNames.push('width');
    }
  }
  if (movingData.styleDescriptors.top && !movingData.styleDescriptors.top.disabled && (movingData.option.top || movingData.option.body)) {
    movingData.comp.setStyle('top', Math.max(0, movingData.style0.top + movingData.dy), 'px');
    changedSNames.push('top');
  }
  if (movingData.styleDescriptors.bottom && !movingData.styleDescriptors.bottom.disabled && (movingData.option.bottom || movingData.option.body)) {
    movingData.comp.setStyle('bottom', Math.max(0, movingData.style0.bottom - movingData.dy), 'px');
    changedSNames.push('bottom');
  }
  if (movingData.styleDescriptors.height && !movingData.styleDescriptors.height.disabled) {
    if (movingData.option.top) {
      if (movingData.styleDescriptors.top && !!movingData.styleDescriptors.top.disabled && !!movingData.styleDescriptors.bottom.disabled) {
        movingData.comp.setStyle('height', Math.max(movingData.comp.measureMinSize().height, movingData.style0.height - movingData.dy * 2), 'px');
      } else {
        movingData.comp.setStyle('height', Math.max(movingData.comp.measureMinSize().height, movingData.style0.height - movingData.dy), 'px');
      }
      changedSNames.push('height');
    }
    if (movingData.option.bottom) {
      if (movingData.styleDescriptors.top && !!movingData.styleDescriptors.top.disabled && !!movingData.styleDescriptors.bottom.disabled) {
        movingData.comp.setStyle('height', Math.max(movingData.comp.measureMinSize().height, movingData.style0.height + movingData.dy * 2), 'px');
      } else {
        movingData.comp.setStyle('height', Math.max(movingData.comp.measureMinSize().height, movingData.style0.height + movingData.dy), 'px');
      }
      changedSNames.push('height');
    }
  }
  this.updatePosition();
  changedSNames = (0, _Array.arrayUnique)(changedSNames);
  if (changedSNames.length > 0) {
    this.emit("reposition", {
      type: 'reposition',
      component: movingData.comp,
      movingData: movingData,
      originEvent: event.originEvent || event,
      repeatEvent: event
    }, this);
    changedSNames.forEach(function (name) {
      return movingData.changesNameDict[name] = true;
    });
    _ResizeSystem["default"].updateDown(movingData.comp.view);
    _ResizeSystem["default"].updateUp(movingData.comp.domElt, true);
  }
  if (userAction) {
    this.emit('moving', {
      target: this,
      type: 'moving',
      originEvent: event.originEvent || event,
      repeatEvent: event
    }, this);
    this._updateSnapLines();
    this.viewMouseDrag(this.movingData.dx, this.movingData.dy);
    this.layoutEditor.selectCtrl.calcSelectBoundStyle();
  }
};
RelativeAnchorEditor.prototype.ev_endMove = function (userAction, event) {
  var _this = this;
  var changedNames = Object.keys(this.movingData.changesNameDict);
  if (changedNames.length > 0) {
    this.emit('change', {
      type: 'change',
      target: this,
      component: this.movingData.comp,
      originEvent: event.originEvent || event,
      repeatEvent: event
    }, this);
  }
  if (userAction) {
    this.emit('endmove', {
      target: this,
      type: 'moving',
      originEvent: event.originEvent || event,
      repeatEvent: event
    }, this);
    this.$modal.remove();
    this.viewMouseDrag(null);
    this.movingData.$snapYLines.forEach(function (e) {
      e.remove();
    });
    this.movingData.$snapXLines.forEach(function (e) {
      e.remove();
    });
    if (this.movingData.nearestXVal <= this.snapDistance) {
      var firsLineX = this.movingData.nearestX[0];
      if (firsLineX.flat & 1) {
        this.alignLeftEdge(firsLineX.value, this.movingData.body);
      } else if (firsLineX.flat & 2) {
        this.alignHorizontalCenter(this.layoutEditor.rootLayout.style.width - 2 * firsLineX.value);
      } else if (firsLineX.flat & 4) {
        this.alignRightEdge(this.layoutEditor.rootLayout.style.width - firsLineX.value, this.movingData.body);
      }
    }
    if (this.movingData.nearestYVal <= this.snapDistance) {
      var firsLineY = this.movingData.nearestY[0];
      if (firsLineY.flat & 1) {
        this.alignTopEdge(firsLineY.value, this.movingData.body);
      } else if (firsLineY.flat & 2) {
        this.alignVerticalCenter(this.layoutEditor.rootLayout.style.height - 2 * firsLineY.value);
      } else if (firsLineY.flat & 4) {
        this.alignBottomEdge(this.layoutEditor.rootLayout.style.height - firsLineY.value, this.movingData.body);
      }
    }
    if (this.layoutEditor.propertyEditor) {
      changedNames.forEach(function (name) {
        _this.layoutEditor.propertyEditor.updatePropertyRecursive(name);
      });
    }
  }
  this.movingData = undefined;
};
RelativeAnchorEditor.prototype._updateSnapLines = function () {
  return; //todo
  // as-align-horizontal-lin
  var nearestYVal = 10000;
  var nearestY = [];
  var top = this.component.style.top;
  var middleY = this.component.style.top + this.component.style.height / 2;
  var bottom = this.component.style.top + this.component.style.height;
  var yLines = this.movingData.snapLines.y;
  var line;
  var dist;
  var yIsSmaller;
  var option = this.movingData.option;
  for (var i = 0; i < yLines.length; ++i) {
    line = yLines[i];
    if (line.flat & 1 && (option.body || option.top)) {
      dist = Math.abs(line.value - top);
      if (dist < nearestYVal) {
        nearestY = [line];
        nearestYVal = dist;
        yIsSmaller = line.value < top;
      } else if (dist == nearestYVal && line.value < top == yIsSmaller) {
        nearestY.push(line);
      }
    } else if (line.flat & 2 && option.body) {
      dist = Math.abs(line.value - middleY);
      if (dist < nearestYVal) {
        nearestY = [line];
        nearestYVal = dist;
        yIsSmaller = line.value < middleY;
      } else if (dist == nearestYVal && line.value < middleY == yIsSmaller) {
        nearestY.push(line);
      }
    } else if (line.flat & 4 && (option.body || option.bottom)) {
      dist = Math.abs(line.value - bottom);
      if (dist < nearestYVal) {
        nearestY = [line];
        nearestYVal = dist;
        yIsSmaller = line.value < bottom;
      } else if (dist == nearestYVal && line.value < bottom == yIsSmaller) {
        nearestY.push(line);
      }
    }
    // if 
  }

  var layoutBound = this.layoutEditor.rootLayout.domElt.getBoundingClientRect();
  var foregroundBound = this.layoutEditor.$foreground.getBoundingClientRect();
  while (this.movingData.$snapYLines.length < nearestY.length) {
    this.movingData.$snapYLines.push(_({
      "class": 'as-align-horizontal-line',
      style: {
        left: layoutBound.left - foregroundBound.left + 'px',
        width: layoutBound.width + 'px'
      }
    }).addTo(this.layoutEditor.$foreground));
  }
  while (this.movingData.$snapYLines.length > nearestY.length) {
    this.movingData.$snapYLines.pop().remove();
  }
  for (var i = 0; i < nearestY.length; ++i) {
    this.movingData.$snapYLines[i].addStyle('top', layoutBound.left - foregroundBound.left + nearestY[i].value + 'px');
    if (nearestYVal <= this.snapDistance) {
      this.movingData.$snapYLines[i].addClass('as-active');
    } else {
      this.movingData.$snapYLines[i].removeClass('as-active');
    }
  }
  this.movingData.nearestY = nearestY;
  this.movingData.nearestYVal = nearestYVal;
  var nearestXVal = 10000;
  var nearestX = [];
  var left = this.component.style.left;
  var middleX = this.component.style.left + this.component.style.width / 2;
  var right = this.component.style.left + this.component.style.width;
  var xLines = this.movingData.snapLines.x;
  var line;
  var dist;
  var xIsSmaller;
  for (var i = 0; i < xLines.length; ++i) {
    line = xLines[i];
    if (line.flat & 1 && (option.body || option.left)) {
      dist = Math.abs(line.value - left);
      if (dist < nearestXVal) {
        nearestX = [line];
        nearestXVal = dist;
        xIsSmaller = line.value < left;
      } else if (dist == nearestXVal && line.value < left == xIsSmaller) {
        nearestX.push(line);
      }
    } else if (line.flat & 2 && option.body) {
      dist = Math.abs(line.value - middleX);
      if (dist < nearestXVal) {
        nearestX = [line];
        nearestXVal = dist;
        xIsSmaller = line.value < middleX;
      } else if (dist == nearestXVal && line.value < middleX == xIsSmaller) {
        nearestX.push(line);
      }
    } else if (line.flat & 4 && (option.body || option.right)) {
      dist = Math.abs(line.value - right);
      if (dist < nearestXVal) {
        nearestX = [line];
        nearestXVal = dist;
        xIsSmaller = line.value < right;
      } else if (dist == nearestXVal && line.value < right == xIsSmaller) {
        nearestX.push(line);
      }
    }
    // if 
  }

  var layoutBound = this.layoutEditor.rootLayout.domElt.getBoundingClientRect();
  var foregroundBound = this.layoutEditor.$foreground.getBoundingClientRect();
  while (this.movingData.$snapXLines.length < nearestX.length) {
    this.movingData.$snapXLines.push(_({
      "class": 'as-align-vertical-line',
      style: {
        top: layoutBound.top - foregroundBound.top + 'px',
        height: layoutBound.height + 'px'
      }
    }).addTo(this.layoutEditor.$foreground));
  }
  while (this.movingData.$snapXLines.length > nearestX.length) {
    this.movingData.$snapXLines.pop().remove();
  }
  for (var i = 0; i < nearestX.length; ++i) {
    this.movingData.$snapXLines[i].addStyle('left', layoutBound.left - foregroundBound.left + nearestX[i].value + 'px');
    if (nearestXVal <= this.snapDistance) {
      this.movingData.$snapXLines[i].addClass('as-active');
    } else {
      this.movingData.$snapXLines[i].removeClass('as-active');
    }
  }
  this.movingData.nearestX = nearestX;
  this.movingData.nearestXVal = nearestXVal;
};
RelativeAnchorEditor.prototype.alignLeftEdge = function (leftValue, keepSize) {
  if (!this.component) return;
  var lLeft = this.component.getStyle('left', 'px');
  var lRight = this.component.getStyle('right', 'px');
  var currentHAlign = this.component.getStyle('hAlign');
  switch (currentHAlign) {
    case 'left':
      this.component.setStyle('left', leftValue, 'px');
      break;
    case 'fixed':
      this.component.setStyle('left', leftValue, 'px');
      if (keepSize) {
        this.component.setStyle('right', lRight - (leftValue - lLeft), 'px');
      }
      break;
    case 'right':
      this.component.setStyle('right', this.component.getStyle('right') + (leftValue - this.component.getStyle('left')), 'px');
      break;
    case 'center':
      var center = this.component.getStyle('left', 'px') + this.component.getStyle('width', 'px') / 2;
      if (center - this.component.measureMinSize().width / 2 >= leftValue) {
        this.component.setStyle('width', (center - leftValue) * 2, 'px');
      }
      break;
  }
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
RelativeAnchorEditor.prototype.alignRightEdge = function (rightValue, keepSize) {
  if (!this.component) return;
  var currentHAlign = this.component.getStyle('hAlign');
  var lLeft = this.component.getStyle('left', 'px');
  var lRight = this.component.getStyle('right', 'px');
  var dX = lRight - rightValue;
  switch (currentHAlign) {
    case 'right':
      this.component.setStyle('right', rightValue, 'px');
      break;
    case 'fixed':
      this.component.setStyle('right', rightValue, 'px');
      if (keepSize) {
        this.component.setStyle('left', lLeft - dX, 'px');
      }
      break;
    case 'left':
      this.component.setStyle('left', lLeft + dX, 'px');
      break;
    case 'center':
      if (!keepSize) {
        var center = this.component.getStyle('right', 'px') - this.component.getStyle('width', 'px') / 2;
        if (center + this.component.measureMinSize().width / 2 <= rightValue) {
          this.component.setStyle('width', (rightValue - center) * 2, 'px');
        }
      }
      break;
  }
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
RelativeAnchorEditor.prototype.alignHorizontalCenter = function (centerValue) {
  // right - left
  if (!this.component) return;
  var currentHAlign = this.component.getStyle('hAlign', 'px');
  var cRight = this.component.getStyle('right', 'px');
  var cLeft = this.component.getStyle('left', 'px');
  var newLeft = (cRight + cLeft - centerValue) / 2;
  var newRight = (cRight + cLeft + centerValue) / 2;
  switch (currentHAlign) {
    case 'right':
      this.component.setStyle('right', newRight, 'px');
      break;
    case 'fixed':
      this.component.setStyle('left', newLeft, 'px');
      this.component.setStyle('right', newRight, 'px');
      break;
    case 'left':
      this.component.setStyle('left', newLeft, 'px');
      break;
    case 'center':
      //noway to align center
      break;
  }
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
RelativeAnchorEditor.prototype.equaliseWidth = function (widthValue) {
  if (!this.component) return;
  var currentHAlign = this.component.getStyle('hAlign');
  var cRight = this.component.getStyle('right', 'px');
  var cLeft = this.component.getStyle('left', 'px');
  var cWidth = this.component.getStyle('width', 'px');
  var dw = widthValue - cWidth;
  switch (currentHAlign) {
    case 'right':
      if (cLeft < dw) this.component.setStyle('right', cRight - (dw - cLeft), 'px');
      this.component.setStyle('width', widthValue, 'px');
      break;
    case 'left':
      if (cRight < dw) this.component.setStyle('left', cLeft - (dw - cWidth), 'px');
      this.component.setStyle('width', widthValue, 'px');
      break;
    case 'fixed':
      if (dw > cRight) {
        this.component.setStyle('right', 0, 'px');
        this.component.setStyle('left', cLeft - (dw - cWidth), 'px');
      } else {
        this.component.setStyle('right', cRight - dw, 'px');
      }
      break;
    case 'center':
      this.component.setStyle('width', widthValue, 'px');
      break;
  }
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
RelativeAnchorEditor.prototype.alignTopEdge = function (topValue, keepSize) {
  if (!this.component) return;
  var currentVAlign = this.component.getStyle('vAlign');
  var lTop = this.component.style.top;
  var lBottom = this.component.style.bottom;
  switch (currentVAlign) {
    case 'top':
      this.component.setStyle('top', topValue, 'px');
      break;
    case 'fixed':
      this.component.setStyle('top', topValue, 'px');
      if (keepSize) {
        this.component.setStyle('bottom', lBottom - (topValue - lTop), 'px');
      }
      break;
    case 'bottom':
      this.component.setStyle('bottom', this.component.getStyle('bottom', 'px') + (topValue - this.component.getStyle('top')), 'px');
      break;
    case 'center':
      var center = this.component.getStyle('top', 'px') + this.component.getStyle('height', 'px') / 2;
      if (center - this.component.measureMinSize().height / 2 >= topValue) {
        this.component.setStyle('height', (center - topValue) * 2, 'px');
      }
      break;
  }
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
RelativeAnchorEditor.prototype.alignBottomEdge = function (bottomValue, keepSize) {
  if (!this.component) return;
  var currentVAlign = this.component.getStyle('vAlign');
  var lBottom = this.component.getStyle('bottom', 'px');
  var lTop = this.component.getStyle('top', 'px');
  switch (currentVAlign) {
    case 'bottom':
      this.component.setStyle('bottom', bottomValue, 'px');
      break;
    case 'fixed':
      this.component.setStyle('bottom', bottomValue, 'px');
      if (keepSize) {
        this.component.setStyle('top', lTop - (bottomValue - lBottom), 'px');
      }
      break;
    case 'top':
      var dY = lBottom - bottomValue;
      this.component.setStyle('top', lTop + dY, 'px');
      break;
    case 'center':
      var center = this.component.getStyle('bottom', 'px') - this.component.getStyle('height', 'px') / 2;
      if (center + this.component.measureMinSize().height / 2 <= bottomValue) {
        this.component.setStyle('height', (bottomValue - center) * 2, 'px');
      }
      break;
  }
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
RelativeAnchorEditor.prototype.alignVerticalCenter = function (centerValue) {
  // bottom - top
  if (!this.component) return;
  var currentVAlign = this.component.getStyle('vAlign');
  var cBottom = this.component.getStyle('bottom', 'px');
  var cTop = this.component.getStyle('top', 'px');
  var newTop = (cBottom + cTop - centerValue) / 2;
  var newBottom = (cBottom + cTop + centerValue) / 2;
  switch (currentVAlign) {
    case 'bottom':
      this.component.setStyle('bottom', newBottom, 'px');
      break;
    case 'fixed':
      this.component.setStyle('top', newTop, 'px');
      this.component.setStyle('bottom', newBottom, 'px');
      break;
    case 'top':
      this.component.setStyle('top', newTop, 'px');
      break;
    case 'center':
      //noway to align center
      break;
  }
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};
RelativeAnchorEditor.prototype.equaliseHeight = function (heightValue) {
  if (!this.component) return;
  var currentVAlign = this.component.getStyle('vAlign');
  var cBottom = this.component.getStyle('bottom', 'px');
  var cTop = this.component.getStyle('top', 'px');
  var cHeight = this.component.getStyle('height', 'px');
  var dh = heightValue - cHeight;
  switch (currentVAlign) {
    case 'bottom':
      if (cTop < dh) this.component.setStyle('bottom', cBottom - (dh - cTop), 'px');
      this.component.setStyle('height', heightValue, 'px');
      break;
    case 'top':
      if (cBottom < dh) this.component.setStyle('top', cTop - (dh - cHeight), 'px');
      this.component.setStyle('height', heightValue, 'px');
      break;
    case 'fixed':
      if (dh > cBottom) {
        this.component.setStyle('bottom', 0, 'px');
        this.component.setStyle('top', cTop - (dh - cHeight), 'px');
      } else {
        this.component.setStyle('bottom', cBottom - dh, 'px');
      }
      break;
    case 'center':
      this.component.setStyle('height', heightValue, 'px');
      break;
  }
  this.updatePosition();
  this.layoutEditor.selectCtrl.calcSelectBoundStyle();
};

/**
 * @returns {{x:Array<{components:Array, value:Number}>, y:Array<{components:Array, value:Number}, flat:Number>}}
 */
RelativeAnchorEditor.prototype.getSnapLines = function () {
  if (!this.component.parent) return {
    x: [],
    y: []
  };
  var children = this.component.parent.children;
  var xComp = [];
  var yComp = [];
  var comp;
  for (var i = 0; i < children.length; ++i) {
    comp = children[i];
    if (this.component == comp) continue;
    xComp.push({
      component: comp,
      value: comp.style.left,
      flat: 1
    });
    xComp.push({
      component: comp,
      value: comp.style.left + comp.style.width / 2,
      flat: 2
    });
    xComp.push({
      component: comp,
      value: comp.style.left + comp.style.width,
      flat: 4
    });
    yComp.push({
      component: comp,
      value: comp.style.top,
      flat: 1
    });
    yComp.push({
      component: comp,
      value: comp.style.top + comp.style.height / 2,
      flat: 2
    });
    yComp.push({
      component: comp,
      value: comp.style.top + comp.style.height,
      flat: 4
    });
  }
  var cmp = function cmp(a, b) {
    return a.value - b.value;
  };
  xComp.sort(cmp);
  yComp.sort(cmp);
  var reducer = function reducer(ac, cr) {
    if (ac.last.value != cr.value) {
      ac.last = {
        components: [cr.component],
        value: cr.value,
        flat: 0
      };
      ac.result.push(ac.last);
    } else {
      if (ac.last.components.indexOf(cr.component) < 0) ac.last.components.push(cr.component);
    }
    ac.last.flat = ac.last.flat | cr.flat;
    return ac;
  };
  return {
    x: xComp.reduce(reducer, {
      result: [],
      last: {
        value: -1000000,
        components: [],
        flat: 0
      }
    }).result,
    y: yComp.reduce(reducer, {
      result: [],
      last: {
        value: -1000000,
        components: [],
        flat: 0
      }
    }).result
  };
};
RelativeAnchorEditor.prototype.getCmdGroupTree = function () {
  return _RelativeAnchorEditorCmd.RelativeAnchorEditorCmdTree;
};
RelativeAnchorEditor.prototype.getCmdDescriptor = function (name) {
  return _RelativeAnchorEditorCmd.RelativeAnchorEditorCmdDescriptors[name];
};
RelativeAnchorEditor.prototype.execCmd = function () {
  return this.cmdRunner.invoke.apply(this.cmdRunner, arguments);
};
var _default = RelativeAnchorEditor;
exports["default"] = _default;

/***/ }),

/***/ 35757:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.RelativeAnchorEditorCmdTree = exports.RelativeAnchorEditorCmdDescriptors = void 0;
var _BaseAnchorEditorCmd = _interopRequireDefault(__webpack_require__(27804));
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @type {RelativeAnchorEditor}
 */
var RelativeAnchorEditorCmd = Object.assign({}, _BaseAnchorEditorCmd["default"]);
RelativeAnchorEditorCmd.distributeHorizontalLeft = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var i;
  var editorHolders = editors.map(function (e) {
    return {
      left: e.component.getStyle('left', 'px'),
      editor: e
    };
  });
  editorHolders.sort(function (a, b) {
    return a.left - b.left;
  });
  var minX = editorHolders[0].left;
  var maxX = editorHolders[editors.length - 1].left;
  if (minX == maxX) return;
  for (i = 1; i < editors.length - 1; ++i) {
    editor = editorHolders[i].editor;
    editor.alignLeftEdge(minX + (maxX - minX) / (editors.length - 1) * i, true);
  }
  this.layoutEditor.commitHistory('move', 'Distribute Horizontal Left');
};
RelativeAnchorEditorCmd.distributeHorizontalCenter = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var i;
  var editorHolders = editors.map(function (e) {
    return {
      left: e.component.getStyle('left', 'px'),
      width: e.component.getStyle('width', 'px'),
      editor: e
    };
  });
  editorHolders.sort(function (a, b) {
    return a.left + a.width / 2 - (b.left + b.width / 2);
  });
  var minX = editorHolders[0].left + editorHolders[0].width / 2;
  var maxX = editorHolders[editors.length - 1].left + editorHolders[editors.length - 1].width / 2;
  if (minX == maxX) return;
  var eHolder;
  for (i = 1; i < editors.length - 1; ++i) {
    eHolder = editorHolders[i];
    editor = eHolder.editor;
    editor.alignLeftEdge(minX + (maxX - minX) / (editors.length - 1) * i - eHolder.width / 2, true);
  }
  this.layoutEditor.commitHistory('move', 'Distribute Horizontal Center');
};
RelativeAnchorEditorCmd.distributeHorizontalRight = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var i;
  var editorHolders = editors.map(function (e) {
    return {
      right: e.component.getStyle('right', 'px'),
      editor: e
    };
  });
  editorHolders.sort(function (a, b) {
    return a.right - b.right;
  });
  var minX = editorHolders[0].right;
  var maxX = editorHolders[editorHolders.length - 1].right;
  if (minX == maxX) return;
  for (i = 1; i < editors.length - 1; ++i) {
    editor = editorHolders[i].editor;
    editor.alignRightEdge(minX + (maxX - minX) / (editorHolders.length - 1) * i, true);
  }
  this.layoutEditor.commitHistory('move', 'Distribute Horizontal Right');
};
RelativeAnchorEditorCmd.distributeHorizontalDistance = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var i;
  var editorHolders = editors.map(function (e) {
    return {
      left: e.component.getStyle('left', 'px'),
      width: e.component.getStyle('width', 'px'),
      right: e.component.getStyle('right', 'px'),
      editor: e
    };
  });
  editorHolders.sort(function (a, b) {
    return a.left + a.width / 2 - (b.left + b.width / 2);
  });
  var sumDistance = editorHolders[editorHolders.length - 1].left - (editorHolders[0].left + editorHolders[0].width);
  var eHolder;
  for (i = 1; i < editors.length - 1; ++i) {
    eHolder = editorHolders[i];
    sumDistance -= eHolder.width;
  }
  var distance = sumDistance / (editors.length - 1);
  var curentLeft = editorHolders[0].left + editorHolders[0].width + distance;
  for (i = 1; i < editorHolders.length - 1; ++i) {
    eHolder = editorHolders[i];
    editor = eHolder.editor;
    editor.alignLeftEdge(curentLeft, true);
    curentLeft += eHolder.width + distance;
  }
  this.layoutEditor.commitHistory('move', 'Distribute Horizontal Distance');
};
RelativeAnchorEditorCmd.distributeVerticalTop = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var i;
  var editorHolders = editors.map(function (e) {
    return {
      top: e.component.getStyle('top', 'px'),
      editor: e
    };
  });
  editorHolders.sort(function (a, b) {
    return a.top - b.top;
  });
  var minX = editorHolders[0].top;
  var maxX = editorHolders[editorHolders.length - 1].top;
  if (minX == maxX) return;
  for (i = 1; i < editorHolders.length - 1; ++i) {
    editor = editorHolders[i].editor;
    editor.alignTopEdge(minX + (maxX - minX) / (editors.length - 1) * i);
  }
  this.layoutEditor.commitHistory('move', 'Distribute Vertical Top');
};
RelativeAnchorEditorCmd.distributeVerticalCenter = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var i;
  var editorHolders = editors.map(function (e) {
    return {
      top: e.component.getStyle('top', 'px'),
      height: e.component.getStyle('height', 'px'),
      editor: e
    };
  });
  editorHolders.sort(function (a, b) {
    return a.top + a.height / 2 - (b.top + b.height / 2);
  });
  var minX = editorHolders[0].top + editorHolders[0].height / 2;
  var maxX = editorHolders[editorHolders.length - 1].top + editorHolders[editorHolders.length - 1].height / 2;
  if (minX == maxX) return;
  var eHolder;
  for (i = 1; i < editorHolders.length - 1; ++i) {
    eHolder = editorHolders[i];
    editor = eHolder.editor;
    editor.alignTopEdge(minX + (maxX - minX) / (editors.length - 1) * i - eHolder.height / 2);
  }
  this.layoutEditor.commitHistory('move', 'Distribute Vertical Center');
};
RelativeAnchorEditorCmd.distributeVerticalBottom = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var i;
  var editorHolders = editors.map(function (e) {
    return {
      bottom: e.component.getStyle('bottom', 'px'),
      editor: e
    };
  });
  editorHolders.sort(function (a, b) {
    return a.bottom - b.bottom;
  });
  var minX = editorHolders[0].bottom;
  var maxX = editorHolders[editorHolders.length - 1].bottom;
  if (minX == maxX) return;
  for (i = 1; i < editorHolders.length - 1; ++i) {
    editor = editorHolders[i].editor;
    editor.alignBottomEdge(minX + (maxX - minX) / (editors.length - 1) * i);
  }
  this.layoutEditor.commitHistory('move', 'Distribute Vertical Bottom');
};
RelativeAnchorEditorCmd.distributeVerticalDistance = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var i;
  var editorHolders = editors.map(function (e) {
    return {
      top: e.component.getStyle('top', 'px'),
      height: e.component.getStyle('height', 'px'),
      editor: e
    };
  });
  editorHolders.sort(function (a, b) {
    return a.top + a.height / 2 - (b.top + b.height / 2);
  });
  var eHolder;
  var sumDistance = editorHolders[editorHolders.length - 1].top - (editorHolders[0].top + editorHolders[0].height);
  for (i = 1; i < editorHolders.length - 1; ++i) {
    eHolder = editorHolders[i];
    sumDistance -= eHolder.height;
  }
  var distance = sumDistance / (editorHolders.length - 1);
  var curentTop = editorHolders[0].top + editorHolders[0].height + distance;
  for (i = 1; i < editorHolders.length - 1; ++i) {
    eHolder = editorHolders[i];
    editor = eHolder.editor;
    editor.alignTopEdge(curentTop);
    curentTop += eHolder.height + distance;
  }
  this.layoutEditor.commitHistory('move', 'Distribute Vertical Distance');
};
RelativeAnchorEditorCmd.alignLeftEdge = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var leftValue = this.component.getStyle('left', 'px');
  for (var i = 0; i < editors.length; ++i) {
    editor = editors[i];
    if (editor == this) continue;
    editor.alignLeftEdge(leftValue);
  }
  this.layoutEditor.commitHistory('move', 'Align Left Edge');
};
RelativeAnchorEditorCmd.alignRightEdge = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var rightValue = this.component.getStyle('right', 'px');
  for (var i = 0; i < editors.length; ++i) {
    editor = editors[i];
    if (editor == this) continue;
    editor.alignRightEdge(rightValue);
  }
  this.layoutEditor.commitHistory('move', 'Align Right Edge');
};
RelativeAnchorEditorCmd.alignHorizontalCenter = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var centerValue = this.component.getStyle('right', 'px') - this.component.getStyle('left', 'px');
  ;
  for (var i = 0; i < editors.length; ++i) {
    editor = editors[i];
    if (editor == this) continue;
    editor.alignHorizontalCenter(centerValue);
  }
  this.layoutEditor.commitHistory('move', 'Align Horizontal Center');
};
RelativeAnchorEditorCmd.equaliseWidth = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var widthValue = this.component.getStyle('width', 'px');
  for (var i = 0; i < editors.length; ++i) {
    var editor = editors[i];
    if (editor == this) continue;
    editor.equaliseWidth(widthValue);
  }
  this.layoutEditor.commitHistory('move', 'Equalise Width');
};
RelativeAnchorEditorCmd.alignTopEdge = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var topValue = this.component.getStyle('top', 'px');
  for (var i = 0; i < editors.length; ++i) {
    editor = editors[i];
    if (editor == this) continue;
    editor.alignTopEdge(topValue);
  }
  this.layoutEditor.commitHistory('move', 'Align Top Edge');
};
RelativeAnchorEditorCmd.alignBottomEdge = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var bottomValue = this.component.getStyle('bottom', 'px');
  for (var i = 0; i < editors.length; ++i) {
    editor = editors[i];
    if (editor == this) continue;
    editor.alignBottomEdge(bottomValue);
  }
  this.layoutEditor.commitHistory('move', 'Align Bottom Edge');
};
RelativeAnchorEditorCmd.alignVerticalCenter = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var centerValue = this.component.getStyle('bottom', 'px') - this.component.getStyle('top', 'px');
  for (var i = 0; i < editors.length; ++i) {
    editor = editors[i];
    if (editor == this) continue;
    editor.alignVerticalCenter(centerValue);
  }
  this.layoutEditor.commitHistory('move', 'Align Verlical Center');
};
RelativeAnchorEditorCmd.equaliseHeight = function () {
  var editors = this.layoutEditor.anchorEditors;
  var editor;
  var heightValue = this.component.getStyle('height', 'px');
  for (var i = 0; i < editors.length; ++i) {
    editor = editors[i];
    if (editor == this) continue;
    editor.equaliseHeight(heightValue);
  }
  this.layoutEditor.commitHistory('move', 'Equalise Height');
};
var RelativeAnchorEditorCmdTree = [['alignLeftEdge', 'alignHorizontalCenter', 'alignRightEdge', 'equaliseWidth'], ['alignTopEdge', 'alignVerticalCenter', 'alignBottomEdge', 'equaliseHeight'], ['distributeHorizontalLeft', 'distributeHorizontalCenter', 'distributeHorizontalRight', 'distributeHorizontalDistance'], ['distributeVerticalTop', 'distributeVerticalCenter', 'distributeVerticalBottom', 'distributeVerticalDistance']];
exports.RelativeAnchorEditorCmdTree = RelativeAnchorEditorCmdTree;
var RelativeAnchorEditorCmdDescriptors = Object.assign({}, _CmdDescriptors["default"]);
exports.RelativeAnchorEditorCmdDescriptors = RelativeAnchorEditorCmdDescriptors;
var _default = RelativeAnchorEditorCmd;
exports["default"] = _default;

/***/ }),

/***/ 60733:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FNode = __webpack_require__(88215);
var _FmFragment = _interopRequireDefault(__webpack_require__(9098));
var _BaseComponent = _interopRequireDefault(__webpack_require__(32306));
var _utils = __webpack_require__(16907);
var _Constants = __webpack_require__(92311);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _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); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _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; }
var sortComponentsInLayout = function sortComponentsInLayout(components, layout) {
  var holders = components.map(function (comp) {
    return {
      idx: layout.children.indexOf(comp),
      comp: comp
    };
  }).filter(function (h) {
    return h.idx >= 0;
  });
  holders.sort(function (a, b) {
    return a.idx - b.idx;
  });
  return holders.map(function (h) {
    return h.comp;
  });
};

/**
 *
 * @param {LayoutEditor} editor
 * @constructor
 */
function LELayoutStructTool(editor) {
  this.editor = editor;
  this.lcEmitter = this.editor.lcEmitter;
}
LELayoutStructTool.prototype.makeNewComponents = function (constructors) {
  var _this = this;
  if (!(constructors instanceof Array)) {
    constructors = [constructors];
  }
  var idDict = {};
  (0, _FNode.traversal)(this.editor.rootLayout, function (path) {
    var nd = path.node;
    if (nd.attributes.id) idDict[nd.attributes.id] = true;
    if (nd.attributes.name) idDict[nd.attributes.name] = true;
    if (nd.fragment !== _this.editor.rootFragment) {
      path.skipChildren();
    }
  });
  return constructors.map(function (cst) {
    var comp;
    if (typeof cst === 'function') {
      if (cst.prototype.type === _FmFragment["default"].prototype.type) {
        var frg = new cst();
        comp = frg.view;
        _this.editor.rootFragment.addChild(frg);
      } else if (cst.prototype.type === _BaseComponent["default"].prototype.type) {
        comp = new cst();
        comp.fragment = _this.editor.rootFragment;
      }
    } else {
      comp = _this.editor.buildComponent(cst, _this.editor.rootFragment);
    }
    var id = comp.attributes.id || (0, _utils.randomUniqueIdent)();
    while (idDict[id]) {
      id = (0, _utils.nextIdString)(id);
    }
    comp.attributes.id = id;
    idDict[id] = true;
    var name = comp.attributes.name || (0, _utils.randomUniqueIdent)();
    while (idDict[name]) {
      name = (0, _utils.nextIdString)(name);
    }
    comp.attributes.name = name;
    idDict[name] = true;
    return comp;
  });
};
LELayoutStructTool.prototype.addChildByPositionHadlers = {
  RelativeLayout: function RelativeLayout(layout, comp, layoutPosX, layoutPosY) {
    comp.style.vAlign = 'top';
    comp.style.hAlign = 'left';
    comp.style.left = layoutPosX;
    comp.style.top = layoutPosY;
    layout.addChild(comp);
  },
  ChainLayout: function ChainLayout(layout, comp, x, y) {
    var bound = _Rectangle["default"].fromClientRect(layout.domElt.getBoundingClientRect());
    var pos = new _Vec["default"](x, y).add(bound.A());
    var children = layout.children;
    var found = null;
    var cBound;
    var i, child;
    for (i = 0; i < children.length && (!found || found.type === 'after'); ++i) {
      child = children[i];
      cBound = _Rectangle["default"].fromClientRect(child.domElt.getBoundingClientRect());
      if (child.style.position !== 'absolute') {
        cBound = _Rectangle["default"].fromClientRect(child.domElt.getBoundingClientRect());
        if (pos.x < cBound.C().x && pos.y < cBound.C().y) {
          found = {
            type: 'before',
            child: child
          };
        } else if (pos.x >= cBound.x && pos.y > cBound.C().y || pos.x >= cBound.B().x && pos.y > cBound.y) {
          found = {
            type: 'after',
            child: child
          };
        }
      }
    }
    if (found) {
      if (found.type === "before") {
        layout.addChildBefore(comp, found.child);
      } else {
        layout.addChildAfter(comp, found.child);
      }
    } else {
      layout.addChild(comp);
    }
  },
  LinearLayout: function LinearLayout(layout, comp, x, y) {
    var bound = _Rectangle["default"].fromClientRect(layout.domElt.getBoundingClientRect());
    var pos = new _Vec["default"](x, y).add(bound.A());
    var children = layout.children;
    var bf = null;
    var cBound;
    var i, child;
    for (i = 0; i < children.length && !bf; ++i) {
      child = children[i];
      cBound = _Rectangle["default"].fromClientRect(child.domElt.getBoundingClientRect());
      if (!cBound.x && !cBound.y) continue;
      if (cBound.y > pos.y) bf = child;
    }
    if (bf) {
      layout.addChildBefore(comp, bf);
    } else layout.addChild(comp);
  },
  HyperLayout: function HyperLayout(layout, comp, x, y) {
    var bound = _Rectangle["default"].fromClientRect(layout.domElt.getBoundingClientRect());
    var pos = new _Vec["default"](x, y).add(bound.A());
    var children = layout.children;
    var found = null;
    var cBound;
    var i, child;
    if (comp.tag === 'Image') {
      comp.style.position = 'absolute';
      comp.style.vAlign = 'top';
      comp.style.hAlign = 'left';
      comp.style.left = x;
      comp.style.top = y;
      if (!comp.attributes.src) {
        comp.style.width = 100;
        comp.style.height = 100;
      }
      layout.addChild(comp);
    } else {
      comp.style.position = 'static';

      /// multiline block
      for (i = 0; i < children.length && (!found || found.type === 'after'); ++i) {
        child = children[i];
        cBound = _Rectangle["default"].fromClientRect(child.domElt.getBoundingClientRect());
        if (child.style.position !== 'absolute') {
          cBound = _Rectangle["default"].fromClientRect(child.domElt.getBoundingClientRect());
          if (pos.x < cBound.C().x && pos.y < cBound.C().y) {
            found = {
              type: 'before',
              child: child
            };
          } else if (pos.x >= cBound.x && pos.y > cBound.C().y || pos.x >= cBound.B().x && pos.y > cBound.y) {
            found = {
              type: 'after',
              child: child
            };
          }
        }
      }
      if (found) {
        if (found.type === "before") {
          layout.addChildBefore(comp, found.child);
        } else {
          layout.addChildAfter(comp, found.child);
        }
      } else {
        layout.addChild(comp);
      }
    }
  }
};
LELayoutStructTool.prototype.addComponentByPosition = function (components, posX, posY) {
  var _this2 = this,
    _this$editor;
  var layout = this.editor.editingLayout;
  var rootBound = this.editor.rootLayout.domElt.getBoundingClientRect();
  var layoutBound = layout.domElt.getBoundingClientRect();
  var layoutPosX = posX - (layoutBound.left - rootBound.left);
  var layoutPosY = posY - (layoutBound.top - rootBound.top);
  var addedComponents = [];
  addedComponents = components.map(function (comp) {
    _this2.addChildByPositionHadlers[layout.tag](layout, comp, layoutPosX, layoutPosY);
    return comp;
  });
  this.editor.emit('addcomponent', {
    type: 'addcomponent',
    components: addedComponents,
    target: this
  }, this);
  (_this$editor = this.editor).setActiveComponent.apply(_this$editor, _toConsumableArray(addedComponents));
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
  this.editor.commitChange("add", "Add " + components.map(function (c) {
    return c.tag;
  }).join(', '));
};
LELayoutStructTool.prototype.addChildBySelected = function (constructor) {
  var layout = this.editor.editingLayout || this.editor.rootLayout;
  var selectedComp = this.editor.anchorEditorsCtrl.getComponents().pop();
  var comp = this.makeNewComponents([constructor])[0];
  if (selectedComp && selectedComp.parent === layout) {
    layout.addChildAfter(comp, selectedComp);
  } else {
    layout.addChild(comp);
  }
  this.editor.setActiveComponent(comp);
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
  this.editor.commitChange("add", "Add " + comp.tag);
};
LELayoutStructTool.prototype.moveComponentToNext = function () {
  for (var _len = arguments.length, components = new Array(_len), _key = 0; _key < _len; _key++) {
    components[_key] = arguments[_key];
  }
  if (components.length === 0) return;
  var layout = components[components.length - 1].parent;
  if (layout.children.length === 0) return;
  components = sortComponentsInLayout(components, layout);
  var at = layout.findChildAfter(components[components.length - 1]);
  if (!at) return;
  components.forEach(function (comp) {
    return layout.removeChild(comp);
  });
  var bf = layout.findChildAfter(at);
  var comp;
  if (bf) {
    while (components.length > 0) {
      comp = components.pop();
      layout.addChildBefore(comp, bf);
      bf = comp;
    }
  } else {
    while (components.length > 0) {
      comp = components.shift();
      layout.addChild(comp);
    }
  }
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
  this.editor.commitChange("move-order", "Move components to next");
};
LELayoutStructTool.prototype.moveComponentToPrevious = function () {
  for (var _len2 = arguments.length, components = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
    components[_key2] = arguments[_key2];
  }
  if (components.length === 0) return;
  var layout = components[components.length - 1].parent;
  if (layout.children.length === 0) return;
  components = sortComponentsInLayout(components, layout);
  var bf = layout.findChildBefore(components[0]);
  if (!bf) return;
  components.forEach(function (comp) {
    return layout.removeChild(comp);
  });
  var comp;
  while (components.length > 0) {
    comp = components.pop();
    layout.addChildBefore(comp, bf);
    bf = comp;
  }
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
};
LELayoutStructTool.prototype.moveComponentToFirst = function () {
  for (var _len3 = arguments.length, components = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
    components[_key3] = arguments[_key3];
  }
  if (components.length === 0) return;
  var layout = components[components.length - 1].parent;
  if (layout.children.length === 0) return;
  components = sortComponentsInLayout(components, layout);
  var comp;
  components.forEach(function (comp) {
    return layout.removeChild(comp);
  });
  var bf = layout.children[0];
  if (bf) {
    while (components.length > 0) {
      comp = components.pop();
      layout.addChildBefore(comp, bf);
      bf = comp;
    }
  } else {
    while (components.length > 0) {
      comp = components.shift();
      layout.addChild(comp);
      bf = comp;
    }
  }
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
  this.editor.commitChange("move-order", "Move components to first");
};
LELayoutStructTool.prototype.moveComponentToLast = function () {
  for (var _len4 = arguments.length, components = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
    components[_key4] = arguments[_key4];
  }
  if (components.length === 0) return;
  var layout = components[components.length - 1].parent;
  if (layout.children.length === 0) return;
  components = sortComponentsInLayout(components, layout);
  var comp;
  components.forEach(function (comp) {
    return layout.removeChild(comp);
  });
  while (components.length > 0) {
    comp = components.shift();
    layout.addChild(comp);
  }
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
  this.editor.commitChange("move-order", "Move components to last");
};
LELayoutStructTool.prototype.removeComponent = function () {
  for (var _len5 = arguments.length, components = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
    components[_key5] = arguments[_key5];
  }
  components.forEach(function (comp) {
    comp.remove();
  });
  this.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
  this.editor.commitChange("remove", "Remove " + components.map(function (c) {
    return c.attributes.name;
  }));
};
var _default = LELayoutStructTool;
exports["default"] = _default;

/***/ }),

/***/ 3283:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _PreInput = _interopRequireDefault(__webpack_require__(76606));
var _FCore = __webpack_require__(51518);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _EventEmitter = __webpack_require__(46833);
var _Constants = __webpack_require__(92311);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends Context
 * @param editor
 * @param component
 * @constructor
 */
function LETextEditTool(editor, component) {
  _Context["default"].apply(this, arguments);
  this.editor = editor;
  this.component = component;
  this.attach(this.editor);
  this.$content = this.component.$content || this.component.domElt;
  this.ev_clickOut = this.ev_clickOut.bind(this);
}
_OOP["default"].mixClass(LETextEditTool, _Context["default"]);
LETextEditTool.prototype.onStart = function () {
  var _this = this;
  this.text = this.component.attributes.text;
  this.editor.$editorSpace.addClass('as-text-editing-tool-attached');
  this.$content.addClass('as-text-editing-tool-target');
  if (!this.$content.__preinput__) {
    this.$content.__preinput__ = (0, _FCore._)({
      tag: _PreInput["default"].tag,
      elt: this.$content,
      props: {
        contentEditable: true
      },
      on: {
        keydown: function keydown(event) {
          if (event.key === 'Enter' && !event.shiftKey && !event.ctrlKey && !event.altKey) {
            event.preventDefault();
            _this.$input.blur();
            _this.stop();
          } else if (event.key === 'Escape') {
            _this.$input.value = _this.text;
            _this.$input.blur();
            _this.stop();
          }
          _ResizeSystem["default"].requestUpdateSignal();
        }
      }
    });
  }
  /***
   *
   * @type {PreInput}
   */
  this.$input = this.$content.__preinput__;
  this.$input.value = this.text;
  this.$input.focus();
  this.$input.select(this.text.length);
  document.addEventListener('mousedown', this.ev_clickOut);
};
LETextEditTool.prototype.onStop = function () {
  var newText = this.$input.value;
  this.editor.$editorSpace.removeClass('as-text-editing-tool-attached');
  document.removeEventListener('mousedown', this.ev_clickOut);
  if (newText !== this.text) {
    this.component.attributes.text = this.$input.value;
    this.editor.notifyDataChange();
    this.editor.undoCtrl.commit('edit', "Edit  " + this.component.attributes.name + '.text');
    this.editor.lcEmitter.emit(_Constants.EV_COMP_BOUND_CHANGE);
  }
};
LETextEditTool.prototype.ev_clickOut = function (event) {
  if (!(0, _EventEmitter.hitElement)(this.$input, event)) this.stop();
};
var _default = LETextEditTool;
exports["default"] = _default;

/***/ }),

/***/ 3314:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _RelativeAnchorEditor = _interopRequireDefault(__webpack_require__(29098));
var _Constants = __webpack_require__(92311);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param  {LayoutEditor} editor
 * @constructor
 */
function LEAnchorEditorController(editor) {
  this.editor = editor;
  /**
   * @type {Array<BaseAnchorEditor>}
   */
  this.anchorEditors = [];
  this.lcEmitter = this.editor.lcEmitter;
}
LEAnchorEditorController.prototype.onCreateView = function () {};
LEAnchorEditorController.prototype.updateAnchorEditorPositions = function () {
  this.anchorEditors.forEach(function (e) {
    return e.updatePosition && e.updatePosition();
  });
};
LEAnchorEditorController.prototype.updateAnchorEditors = function () {
  this.anchorEditors.forEach(function (e) {
    return e.update();
  });
};
LEAnchorEditorController.prototype._newAnchorEditor = function (component) {
  var self = this;
  var layoutEditor = this.editor;
  var AnchorEditor = component.parent ? this.editor.tag2AnchorEditorClass[component.parent.tag] : _RelativeAnchorEditor["default"];
  var editor = new AnchorEditor(layoutEditor, component).on('click', function (event) {
    if (editor.preventClick) return;
    if (this.component) if (event.shiftKey) {
      self.toggleActiveComponent(this.component);
    } else {
      self.setActiveComponent(this.component);
    }
  }).on('beginmove', function (event) {
    var repeatEvent = event.repeatEvent;
    var other;
    for (var i = 0; i < self.anchorEditors.length; ++i) {
      other = self.anchorEditors[i];
      if (other !== this) {
        other.ev_beginMove(false, repeatEvent);
      }
    }
  }).on('moving', function (event) {
    var repeatEvent = event.repeatEvent;
    var other;
    for (var i = 0; i < self.anchorEditors.length; ++i) {
      other = self.anchorEditors[i];
      if (other !== this) {
        other.ev_moving(false, repeatEvent);
      }
    }
    layoutEditor.notifyDataChange();
    // layoutEditor.componentPropertiesEditor.updatePropertyRecursive('width');
    layoutEditor.updateEditing();
  }).on('endmove', function (event) {
    var originEvent = event.originEvent;
    var other;
    for (var i = 0; i < self.anchorEditors.length; ++i) {
      other = self.anchorEditors[i];
      if (other !== this) {
        other.ev_endMove(false, originEvent);
      }
    }
    layoutEditor.undoCtrl.commit('move', 'Move/Resize component');
    layoutEditor.notifyUnsaved();
  }).on('focus', function (event) {
    // layoutEditor.componentPropertiesEditor.edit.apply(layoutEditor.componentPropertiesEditor, layoutEditor.getActivatedComponents());
    layoutEditor.emit('focuscomponent', {
      type: 'focuscomponent',
      component: this.component,
      originEvent: event,
      target: layoutEditor
    }, layoutEditor);
  }).on('change', function (event) {
    layoutEditor.notifyDataChange();
  });
  return editor;
};

/***
 * @param  {BaseComponent[]} components
 */
LEAnchorEditorController.prototype.setActiveComponent = function () {
  var oldEditors = this.anchorEditors.slice();
  var oldComponents = this.anchorEditors.map(function (editor) {
    return editor.component;
  });

  //todo
  while (this.anchorEditors.length > 0) {
    this.anchorEditors.pop();
  }
  var oldIndex;
  var component;
  var editor;
  for (var _len = arguments.length, components = new Array(_len), _key = 0; _key < _len; _key++) {
    components[_key] = arguments[_key];
  }
  while (this.anchorEditors.length < components.length) {
    component = components[this.anchorEditors.length];
    oldIndex = oldComponents.indexOf(component);
    if (oldIndex >= 0) {
      editor = oldEditors[oldIndex];
      oldEditors[oldIndex] = null; // for removing
    } else {
      editor = this._newAnchorEditor(components[this.anchorEditors.length]);
    }
    this.anchorEditors.push(editor);
  }
  oldEditors.forEach(function (editor) {
    editor && editor.destroy();
  });
  if (this.anchorEditors.length > 0) this.anchorEditors[this.anchorEditors.length - 1].focus();

  //todo: event to emit
  // this.editor.componentOtline.updateComponentStatus();
  this.editor.undoCtrl.modifyLastCommit({
    selected: this.editor.getSelected(),
    editing: this.editor.editingLayout.getAttribute('name')
  });
  this.editor.openComponentProperties(this.anchorEditors.map(function (e) {
    return e.component;
  }));
  this.lcEmitter.emit(_Constants.EV_SELECTED_COMP_CHANGE);
  // this.editor.notifyCmdDescriptorsChange();
};

LEAnchorEditorController.prototype.findAnchorEditorByComponent = function (comp) {
  for (var i = 0; i < this.anchorEditors.length; ++i) {
    if (this.anchorEditors[i].component === comp) return this.anchorEditors[i];
  }
  return undefined;
};

/***
 * @param {BaseComponent} comp
 */
LEAnchorEditorController.prototype.toggleActiveComponent = function (comp) {
  var editor;
  var focusEditor = undefined;
  for (var i = 0; i < arguments.length; ++i) {
    editor = this.findAnchorEditorByComponent(arguments[i]);
    if (editor) {
      editor.destroy();
    } else {
      editor = this._newAnchorEditor(arguments[i]);
      this.anchorEditors.push(editor);
      focusEditor = editor;
    }
  }
  this.anchorEditors = this.anchorEditors.filter(function (e) {
    return !!e.component;
  });
  if (this.anchorEditors.length > 0) {
    focusEditor = this.anchorEditors[this.anchorEditors.length - 1];
  }
  if (focusEditor) focusEditor.focus();

  // this.editor.componentOtline.updateComponentStatus();
  this.editor.undoCtrl.modifyLastCommit({
    selected: this.editor.getSelected(),
    editing: this.editor.editingLayout.attributes.name
  });
  this.editor.openComponentProperties(this.anchorEditors.map(function (e) {
    return e.component;
  }));
  this.lcEmitter.emit(_Constants.EV_SELECTED_COMP_CHANGE);
};
LEAnchorEditorController.prototype.setActiveComponentById = function () {
  var components = Array(arguments.length).fill(null);
  var dict = Array.prototype.reduce.call(arguments, function (ac, cr, i) {
    ac[cr] = i;
    return ac;
  }, {});
  var rootFragment = this.editor.rootFragment;
  function visit(node) {
    var id = node.attributes.id;
    if (typeof dict[id] == 'number') {
      components[dict[id]] = node;
    }
    if (node.fragment === rootFragment) node.children.forEach(visit);
  }
  visit(this.editor.rootLayout);
  components = components.filter(function (c) {
    return !!c;
  });
  this.setActiveComponent.apply(this, components);
};
LEAnchorEditorController.prototype.setActiveComponentByName = function () {
  var components = Array(arguments.length).fill(null);
  var dict = Array.prototype.reduce.call(arguments, function (ac, cr, i) {
    ac[cr] = i;
    return ac;
  }, {});
  var rootFragment = this.editor.rootFragment;
  function visit(node) {
    var name = node.getAttribute('name');
    if (typeof dict[name] == 'number') {
      components[dict[name]] = node;
    }
    if (node.fragment === rootFragment) node.children.forEach(visit);
  }
  visit(this.editor.rootLayout);
  this.setActiveComponent.apply(this, components);
};
LEAnchorEditorController.prototype.getComponents = function () {
  return this.anchorEditors.map(function (e) {
    return e.component;
  });
};
LEAnchorEditorController.prototype.getCmdGroupTree = function () {
  if (this.anchorEditors.length === 0) return [];
  return this.anchorEditors[0].getCmdGroupTree();
};
LEAnchorEditorController.prototype.getCmdDescriptor = function (name) {};
var _default = LEAnchorEditorController;
exports["default"] = _default;

/***/ }),

/***/ 23307:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FNode = __webpack_require__(88215);
var _GCore = __webpack_require__(66723);
/***
 *
 * @param {LayoutEditor} editor
 * @constructor
 */
function LEBoundViewController(editor) {
  this.editor = editor;
  /***
   *
   * @type {AElement|SVGAElement|null}
   */
  this.$graphic = null;
  this.$ctn = null;
  this.$bounds = {};
}
LEBoundViewController.prototype.onCreateView = function () {
  this.$graphic = this.editor.$overlayGraphic;
  /***
   * @type {AElementNS}
   */
  this.$ctn = (0, _GCore._)('g').addTo(this.$graphic);
  this.$editingLayoutBound = (0, _GCore._)({
    tag: 'rect',
    "class": ['as-le-bound-rect', 'as-le-editing-layout-bound']
  }).addTo(this.$graphic);
};
LEBoundViewController.prototype.update = function () {
  var _this = this;
  var boundElements = this.$bounds;
  var gBound = this.$graphic.getBoundingClientRect();
  var updatedId = Math.random() * 10000 >> 0;
  var depth = this.editor.selectCtrl.mode === this.editor.selectCtrl.MODE_DEPTH;
  var drawRect = function drawRect(comp, rectElt) {
    var bound;
    var id;
    bound = comp.domElt.getBoundingClientRect();
    id = comp.attributes.id;
    rectElt = rectElt || boundElements[id];
    if (!rectElt) {
      rectElt = (0, _GCore._)({
        tag: 'rect',
        "class": ['as-le-bound-rect']
      });
      boundElements[id] = rectElt;
      _this.$ctn.addChild(rectElt);
    }
    rectElt.attr({
      x: bound.left - gBound.left,
      y: bound.top - gBound.top,
      width: bound.width,
      height: bound.height
    });
    rectElt.__updatedId__ = updatedId;
  };
  var deptDraw = function deptDraw(comp) {
    drawRect(comp);
    comp.children.forEach(deptDraw);
  };
  if (this.editor.editingLayout) {
    drawRect(this.editor.editingLayout, this.$editingLayoutBound);
    this.editor.editingLayout.children.forEach(function (comp) {
      if (depth) deptDraw(comp);else drawRect(comp);
    });
  }
  Object.keys(boundElements).forEach(function (key) {
    if (boundElements[key].__updatedId__ !== updatedId) {
      boundElements[key].remove();
      delete boundElements[key];
    }
  });
};
var _default = LEBoundViewController;
exports["default"] = _default;

/***/ }),

/***/ 68534:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
/***
 * @param {LayoutEditor} editor
 * @constructor
 */
function LEEditingLayoutControl(editor) {
  this.editor = editor;
  this.$anchor = null;
  this.editingLayout = null;
}
LEEditingLayoutControl.prototype.onCreateView = function () {};
LEEditingLayoutControl.prototype.edit = function (layout) {
  layout = layout || this.editor.rootLayout;
  if (!layout || !layout.isLayout) return;
  this.editingLayout = layout;
  if (this.$anchor) {
    this.$anchor.removeClass('as-editing-layout-anchor');
  }
  this.$anchor = layout.anchor && layout.anchor.domElt || layout.domElt.parentElement;
  this.$anchor.addClass('as-editing-layout-anchor');
  this.editor.quickPathCtrl.update();
  this.editor.boundViewCtrl.update();
};
var _default = LEEditingLayoutControl;
exports["default"] = _default;

/***/ }),

/***/ 49806:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
/***
 *
 * @param {LayoutEditor} editor
 * @constructor
 */

function LEQuickPathController(editor) {
  this.editor = editor;
}
LEQuickPathController.prototype.update = function () {
  this.$quickpath.path = this.getQuickPathFrom(this.editor.editingLayout);
};
LEQuickPathController.prototype.ev_quickPathChange = function (event) {
  var layout = event.item.layout;
  var editor = this.editor;
  setTimeout(function () {
    editor.editLayout(layout);
  }, 10);
};
LEQuickPathController.prototype.onCreateView = function () {
  this.$quickpath = (0, _FCore.$)('quickpath', this.editor.$header).on('change', this.ev_quickPathChange.bind(this));
};
LEQuickPathController.prototype.getQuickPathFrom = function (layout) {
  while (layout && !layout.isLayout) {
    layout = layout.parent;
  }
  var res = [];
  if (layout) {
    var childLayoutItems = layout.children.filter(function (comp) {
      return comp.isLayout;
    }).map(function (comp) {
      return {
        name: comp.getAttribute('name'),
        icon: comp.menuIcon,
        layout: comp
      };
    });
    if (childLayoutItems.length > 0) {
      res.push({
        name: '...',
        items: childLayoutItems
      });
    }
  }
  var node;
  while (layout) {
    node = {
      name: layout.getAttribute('name'),
      icon: layout.menuIcon,
      layout: layout
    };
    if (layout.parent && layout.parent.children) {
      node.items = layout.parent.children.filter(function (comp) {
        return comp.isLayout;
      }).map(function (comp) {
        return {
          name: comp.getAttribute('name'),
          icon: comp.menuIcon,
          layout: comp,
          extendStyle: layout == comp ? {
            color: "#009"
          } : {}
        };
      });
    } else node.items = [{
      name: layout.getAttribute('name'),
      icon: layout.menuIcon,
      layout: layout
    }];
    res.unshift(node);
    layout = layout.parent;
  }
  return res;
};
var _default = LEQuickPathController;
exports["default"] = _default;

/***/ }),

/***/ 25934:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _R = _interopRequireDefault(__webpack_require__(25280));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param editor
 * @constructor
 */
function LERulerController(editor) {
  this.editor = editor;
}
LERulerController.prototype.onCreateView = function () {
  this.$hruler = (0, _FCore.$)('hruler', this.editor.$view);
  this.$hruler.measureElement((0, _FCore.$)('.as-relative-layout', this.editor.$view));
  this.$hrulerMouse = (0, _FCore._)('.as-hruler-mouse').addTo(this.$hruler);
  this.$hrulerEditing = (0, _FCore._)('.as-hruler-editing').addTo(this.$hruler);
  this.$vruler = (0, _FCore.$)('vruler', this.editor.$view);
  this.$vruler.measureElement((0, _FCore.$)('.as-relative-layout', this.editor.$view));
  this.$vrulerMouse = (0, _FCore._)('.as-vruler-mouse').addTo(this.$vruler);
  this.$vrulerEditing = (0, _FCore._)('.as-vruler-editing').addTo(this.$vruler);
  this.$mouseOffsetStatus = (0, _FCore._)({
    tag: 'button',
    "class": ['as-status-bar-item', 'as-mouse-status'],
    child: [{
      tag: 'span',
      "class": 'as-mouse-status-pos',
      child: ['span.mdi.mdi-cursor-default-outline', 'span']
    }, {
      tag: 'span',
      "class": 'as-mouse-status-drag',
      style: {
        display: 'none'
      },
      child: ['<span> Δ<span>', 'span']
    }]
  });
  this.$mouseSDrag = (0, _FCore.$)('.as-mouse-status-drag', this.$mouseOffsetStatus);
  this.$mouseSPosText = (0, _FCore.$)('.as-mouse-status-pos', this.$mouseOffsetStatus).lastChild;
  this.$mouseSDragText = (0, _FCore.$)('.as-mouse-status-drag', this.$mouseOffsetStatus).lastChild;
  this.editor.$view.on('mousemove', this.ev_mouseMove.bind(this));
};
LERulerController.prototype.ev_mouseMove = function (event) {
  var vruleBound = this.$vruler.getBoundingClientRect();
  var hruleBound = this.$hruler.getBoundingClientRect();
  this.$vrulerMouse.addStyle('top', event.clientY - vruleBound.top - 1 - 1 + 'px');
  this.$hrulerMouse.addStyle('left', event.clientX - hruleBound.left - 1 - 1 + 'px');
  this.mouseClientX = event.clientX;
  this.mouseClientY = event.clientY;
  if (this.editor.rootLayout) {
    var rootBound = this.editor.rootLayout.domElt.getBoundingClientRect();
    this.mouseOffsetX = Math.round(event.clientX - rootBound.left);
    this.mouseOffsetY = Math.round(event.clientY - rootBound.top);
    this.viewMousePos(this.mouseOffsetX, this.mouseOffsetY);
  }
};
LERulerController.prototype.viewMousePos = function (x, y) {
  this.$mouseSPosText.innerHTML = x + ',' + y;
};

/***
 *
 * @param {number|null} x
 * @param {number=} y
 */
LERulerController.prototype.viewMouseDrag = function (x, y) {
  if (typeof x === "number") {
    this.$mouseSDrag.removeStyle('display');
    this.$mouseSDragText.innerHTML = x + ',' + y;
  } else {
    this.$mouseSDrag.addStyle('display', 'none');
  }
};
LERulerController.prototype.updateEditing = function () {
  var hruleBound = this.$hruler.getBoundingClientRect();
  var vruleBound = this.$vruler.getBoundingClientRect();
  var editingBound = this.editor.editingLayout.domElt.getBoundingClientRect();
  this.$hrulerEditing.addStyle({
    left: editingBound.left - hruleBound.left - 1 + 'px',
    width: editingBound.width + 'px'
  });
  this.$vrulerEditing.addStyle({
    top: editingBound.top - vruleBound.top - 1 + 'px',
    height: editingBound.height + 'px'
  });
};
LERulerController.prototype.update = function () {
  this.$vruler.update();
  this.$hruler.update();
  this.updateEditing();
};
LERulerController.prototype.onEditorResume = function () {
  var $statusBar = this.editor.getContext(_R["default"].STATUS_BAR_ELT);
  this.$mouseOffsetStatus.addTo($statusBar.$rightCtn);
};
LERulerController.prototype.onEditorPause = function () {
  this.$mouseOffsetStatus.remove();
};
LERulerController.prototype.assignRoot = function () {
  this.$vruler.measureElement(this.editor.rootLayout.domElt);
  this.$hruler.measureElement(this.editor.rootLayout.domElt);
};
var _default = LERulerController;
exports["default"] = _default;

/***/ }),

/***/ 14637:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {LayoutEditor} editor
 * @constructor
 */
function LESelectController(editor) {
  this.editor = editor;
  this.mode = this.MODE_CURRENT_LAYOUT;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
}
LESelectController.prototype.MODE_CURRENT_LAYOUT = 0;
LESelectController.prototype.MODE_DEPTH = 1;
LESelectController.prototype.onCreateView = function () {
  this.editor.$foreground.on('click', this.ev_mouseClickFG);
  this.editor.$layoutCtn.addClass('as-current-layout-selecting-mode');
};
LESelectController.prototype.findCompByMousePosition = function (root, depth, x, y) {
  var res = null;
  var child;
  var rect;
  var mouse = new _Vec["default"](x, y);
  var children = root.children.slice();
  switch (root.tag) {
    case 'HyperLayout':
      children = children.map(function (it, i) {
        return {
          idx: i,
          comp: it
        };
      });
      children.sort(function (a, b) {
        if (a.comp.style.position === b.comp.style.position) {
          return b.idx - a.idx;
        } else if (a.comp.style.position === 'absolute') {
          return -1;
        } else if (b.comp.style.position === 'absolute') {
          return 1;
        } else {
          return b.idx - a.idx;
        }
      });
      children = children.map(function (it) {
        return it.comp;
      });
      break;
    default:
      children = children.reverse();
  }
  for (var i = 0; i < children.length; ++i) {
    child = children[i];
    if (depth && child.fragment === root.fragment) {
      res = this.findCompByMousePosition(child, true, x, y);
    }
    if (res) break;
    rect = _Rectangle["default"].fromClientRect(child.domElt.getBoundingClientRect());
    if (rect.containsPoint(mouse)) {
      res = child;
    }
    if (res) break;
  }
  return res;
};
LESelectController.prototype.setSelectMode = function (mode) {
  switch (this.mode) {
    case this.MODE_CURRENT_LAYOUT:
      this.editor.$layoutCtn.removeClass('as-current-layout-selecting-mode');
      break;
    case this.MODE_DEPTH:
      this.editor.$layoutCtn.removeClass('as-depth-selecting-mode');
      break;
  }
  switch (mode) {
    case 'CURRENT_LAYOUT':
      this.mode = this.MODE_CURRENT_LAYOUT;
      this.editor.$layoutCtn.addClass('as-current-layout-selecting-mode');
      break;
    case 'DEPTH':
      this.mode = this.MODE_DEPTH;
      this.editor.$layoutCtn.addClass('as-depth-selecting-mode');
      break;
  }
  this.editor.boundViewCtrl.update();
};
LESelectController.prototype.calcSelectBoundStyle = function () {
  var rootFragment = this.editor.rootFragment;
  function visit(node) {
    var bound;
    var anchorElt;
    if (node.style.vAlign === 'center' || node.style.hAlign === 'center') {
      bound = node.domElt.getBoundingClientRect();
      anchorElt = node.anchor && node.anchor.domElt || node.domElt.parentElement;
      anchorElt.addStyle('--select-bound-width', bound.width + 'px');
      anchorElt.addStyle('--select-bound-height', bound.height + 'px');
    }
    if (node.fragment === rootFragment && node.children) node.children.forEach(visit);
  }
  if (this.editor.rootLayout) visit(this.editor.rootLayout);
};
LESelectController.prototype.getCmdDescriptor = function (name) {
  if (name !== 'setSelectMode') return;
  var descriptor = Object.assign({}, _CmdDescriptors["default"][name]);
  switch (this.mode) {
    case this.MODE_CURRENT_LAYOUT:
      descriptor.desc = 'Select In Current Layout';
      descriptor.icon = 'span.mdi.mdi-selection';
      break;
    case this.MODE_DEPTH:
      descriptor.desc = 'Depth Select';
      descriptor.icon = 'depth-select-ico';
      break;
  }
  return descriptor;
};

/***
 *
 * @param {MouseEvent} event
 */
LESelectController.prototype.ev_normalSelect = function (event) {
  var comp = this.findCompByMousePosition(this.editor.editingLayout, false, event.clientX, event.clientY);
  if (comp) {
    if (event.altKey) {
      if (!comp.isLayout) comp = comp.parent;
      if (this.editor.editingLayout !== comp) {
        this.editor.editingLayoutCtrl.edit(comp);
        this.editor.setActiveComponent();
      }
    } else if (event.shiftKey) {
      this.editor.anchorEditorsCtrl.toggleActiveComponent(comp);
    } else {
      this.editor.setActiveComponent(comp);
    }
  } else {
    this.editor.editingLayoutCtrl.edit(this.editor.rootLayout);
    this.editor.setActiveComponent();
  }
};

/***
 *
 * @param {MouseEvent} event
 */
LESelectController.prototype.ev_depthSelect = function (event) {
  var comp = this.findCompByMousePosition(this.editor.rootLayout, true, event.clientX, event.clientY);
  if (comp) {
    if (event.altKey) {
      if (!comp.isLayout) comp = comp.parent;
      if (this.editor.editingLayout !== comp) {
        this.editor.editingLayoutCtrl.edit(comp);
        this.editor.anchorEditorsCtrl.setActiveComponent();
      }
    } else if (event.shiftKey) {
      if (this.editor.editingLayout === comp.parent) {
        this.editor.anchorEditorsCtrl.toggleActiveComponent(comp);
      } else {
        this.editor.editingLayoutCtrl.edit(comp.parent);
        this.editor.anchorEditorsCtrl.setActiveComponent(comp);
      }
    } else {
      if (this.editor.editingLayout !== comp.parent) {
        this.editor.editingLayoutCtrl.edit(comp.parent);
      }
      this.editor.anchorEditorsCtrl.setActiveComponent(comp);
    }
  } else {
    this.editor.editingLayoutCtrl.edit(this.editor.rootLayout);
    this.editor.setActiveComponent();
  }
};
LESelectController.prototype.ev_mouseClickFG = function (event) {
  if (event.target === this.editor.$foreground) {
    switch (this.mode) {
      case this.MODE_CURRENT_LAYOUT:
        this.ev_normalSelect(event);
        break;
      case this.MODE_DEPTH:
        this.ev_depthSelect(event);
        break;
    }
  }
};
var _default = LESelectController;
exports["default"] = _default;

/***/ }),

/***/ 4562:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {LayoutEditor} editor
 * @constructor
 */
function LEToolTabController(editor) {
  this.editor = editor;
  this._activatedToolTab = null;
}
LEToolTabController.prototype.onCreateView = function () {
  this._tabToolHolders = {
    history: {
      $tabBtn: (0, _FCore.$)('.as-layout-editor-tool-tab-btn[data-tab="history"]', this.editor.$view),
      $ctn: (0, _FCore.$)('.as-layout-editor-tool-ctn[data-tab="history"]', this.editor.$view)
    },
    properties: {
      $tabBtn: (0, _FCore.$)('.as-layout-editor-tool-tab-btn[data-tab="properties"]', this.editor.$view),
      $ctn: (0, _FCore.$)('.as-layout-editor-tool-ctn[data-tab="properties"]', this.editor.$view)
    }
  };
};
LEToolTabController.prototype.toggle = function (name) {
  var holder = this._tabToolHolders[this._activatedToolTab];
  if (holder) {
    holder.$tabBtn.removeClass('active');
    holder.$ctn.addStyle('display', 'none');
  }
  holder = this._tabToolHolders[name];
  if (!holder) {
    name = null;
  }
  if (name === this._activatedToolTab) {
    this._activatedToolTab = null;
    return;
  }
  this._activatedToolTab = name;
  holder.$tabBtn.addClass('active');
  holder.$ctn.removeStyle('display');
  _ResizeSystem["default"].update();
};
var _default = LEToolTabController;
exports["default"] = _default;

/***/ }),

/***/ 49489:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
/***
 *
 * @param {LayoutEditor} editor
 * @constructor
 */
function LEUndoController(editor) {
  this.editor = editor;
  this.undoHistory = editor.undoHistory;
  this.lastCommitData = {
    editing: null,
    data: null,
    selected: []
  };
  this.setup();
}
LEUndoController.prototype.setup = function () {
  var editor = this.editor;
  this.undoHistory.on('checkout', function (event) {
    var editing = event.item.data.editing;
    var selected = event.item.data.selected;
    editor.applyData(event.item.data.data);
    editor.lastCommitData = event.item.data;
    if (editing) {
      editor.editLayoutByName(editing);
    } else {
      editor.editLayout(editor.rootLayout);
    }
    editor.setActiveComponentById.apply(editor, selected);
    editor.updateAnchor();
    editor.notifyCmdDescriptorsChange();
    editor.notifyUnsaved();
  });
};
LEUndoController.prototype.commit = function (type, desc) {
  this.lastCommitData = {
    editing: this.editor.editingLayout && this.editor.editingLayout.attributes.name,
    selected: this.editor.getSelected(),
    data: this.editor.getData()
  };
  this.undoHistory.commit(type, this.lastCommitData, desc, new Date());
  this.editor.notifyCmdDescriptorsChange();
};

/***
 *
 * @param {{editing?: string, data?:Object, selected?: string[]}} o
 */
LEUndoController.prototype.modifyLastCommit = function (o) {
  Object.assign(this.lastCommitData, o);
};
var _default = LEUndoController;
exports["default"] = _default;

/***/ }),

/***/ 41351:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _keyboard = __webpack_require__(95141);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {LayoutEditor} editor
 * @constructor
 */
function LEViewportController(editor) {
  this.editor = editor;
  this.origin = new _Vec["default"](0, 0);
  this.overOffset = new _Vec["default"](0, 0);
  this._isScrollingByBar = false;
}
LEViewportController.prototype.onCreateView = function () {
  var _this = this;
  this.$spaceCtn = (0, _FCore.$)('.as-layout-editor-space-container', this.editor.$view).on('wheel', this.ev_wheel.bind(this)).on('auxclick', this.ev_auxclick.bind(this)).on('dblclick', this.ev_dblClick.bind(this));
  this.editor.$view.on('keydown', this.ev_keydown.bind(this));
  this.$layoutCtn = this.editor.$layoutCtn;
  this.$vscrollbar = this.editor.$vscrollbar.on({
    active: function active() {
      _this._isScrollingByBar = true;
    },
    inactive: function inactive() {
      _this._isScrollingByBar = false;
      _this.updateScrollbar();
    },
    scroll: function scroll(event) {
      _this.origin = new _Vec["default"](_this.origin.x, -_this.$vscrollbar.innerOffset - _this.overOffset.y);
      _this._origin2View(event);
    }
  });
  this.$hscrollbar = this.editor.$hscrollbar.on({
    active: function active() {
      _this._isScrollingByBar = true;
    },
    inactive: function inactive() {
      _this._isScrollingByBar = false;
      _this.updateScrollbar();
    },
    scroll: function scroll(event) {
      _this.origin = new _Vec["default"](-_this.$hscrollbar.innerOffset - _this.overOffset.x, _this.origin.y);
      _this._origin2View(event);
    }
  });
};
LEViewportController.prototype.autoHoming = function () {
  if (this.$spaceCtn.hasClass('as-homing')) return;
  this.$spaceCtn.addClass('as-homing');
  this.homingTimeout = setTimeout(function () {
    this.origin = new _Vec["default"](0, 0);
    this.$spaceCtn.addStyle('--viewport-x', this.origin.x + 'px');
    this.$spaceCtn.addStyle('--viewport-y', this.origin.y + 'px');
    this.homingTimeout = setTimeout(function () {
      this.homingTimeout = -1;
      this.$spaceCtn.removeClass('as-homing');
      this.editor.rulerCtrl.update();
    }.bind(this), 300);
  }.bind(this), 3);
  setTimeout(this.editor.rulerCtrl.update.bind(this.editor.rulerCtrl), 320);
  setTimeout(this.editor.rulerCtrl.update.bind(this.editor.rulerCtrl), 240);
  setTimeout(this.editor.rulerCtrl.update.bind(this.editor.rulerCtrl), 120);
  setTimeout(this.editor.rulerCtrl.update.bind(this.editor.rulerCtrl), 60);
  setTimeout(this.updateScrollbar.bind(this), 320);
  setTimeout(this.updateScrollbar.bind(this), 240);
  setTimeout(this.updateScrollbar.bind(this), 120);
  setTimeout(this.updateScrollbar.bind(this), 60);
};
LEViewportController.prototype.updateScrollbar = function () {
  if (this._isScrollingByBar) return;
  var innerBound = _Rectangle["default"].fromClientRect(this.$layoutCtn.getBoundingClientRect());
  var outerBound = _Rectangle["default"].fromClientRect(this.$spaceCtn.getBoundingClientRect());
  var scrollingRect = innerBound.merge(outerBound);
  var scrollingOffset = outerBound.A().sub(scrollingRect.A());
  this.overOffset = scrollingRect.A().sub(innerBound.A());
  this.$vscrollbar.innerHeight = scrollingRect.height;
  this.$vscrollbar.outerHeight = outerBound.height;
  this.$vscrollbar.innerOffset = scrollingOffset.y;
  this.$hscrollbar.innerWidth = scrollingRect.width;
  this.$hscrollbar.outerWidth = outerBound.width;
  this.$hscrollbar.innerOffset = scrollingOffset.x;
  if (scrollingRect.height > outerBound.height) this.$hscrollbar.addStyle('right', '10px');else this.$hscrollbar.removeStyle('right');
  if (scrollingRect.width > outerBound.width) this.$vscrollbar.addStyle('bottom', '10px');else this.$vscrollbar.removeStyle('bottom');
};
LEViewportController.prototype._origin2View = function (event) {
  this.$spaceCtn.addStyle('--viewport-x', this.origin.x + 'px');
  this.$spaceCtn.addStyle('--viewport-y', this.origin.y + 'px');
  this.editor.rulerCtrl.update();
  setTimeout(this.editor.rulerCtrl.update.bind(this.editor.rulerCtrl), 120);
  setTimeout(this.editor.rulerCtrl.update.bind(this.editor.rulerCtrl), 60);
  setTimeout(this.editor.rulerCtrl.ev_mouseMove.bind(this.editor.rulerCtrl, event), 120);
  setTimeout(this.updateScrollbar.bind(this), 120);
  setTimeout(this.updateScrollbar.bind(this), 60);
};

/***
 *
 * @param {WheelEvent} event
 */
LEViewportController.prototype.ev_wheel = function (event) {
  var dy = event.deltaY;
  var d = event.shiftKey ? new _Vec["default"](-dy, 0) : new _Vec["default"](0, -dy);
  this.origin = this.origin.add(d);
  this._origin2View(event);
};
LEViewportController.prototype.ev_dblClick = function (event) {
  var layoutCtnRect;
  var mPos;
  if (event.target === this.editor.$foreground) {
    layoutCtnRect = _Rectangle["default"].fromClientRect(this.editor.$layoutCtn.getBoundingClientRect());
    mPos = new _Vec["default"](event.clientX, event.clientY);
    if (!layoutCtnRect.containsPoint(mPos)) {
      this.autoHoming();
    }
  } else if (event.target === this.$spaceCtn) this.autoHoming();
};

/***
 *
 * @param {KeyboardEvent} event
 */
LEViewportController.prototype.ev_keydown = function (event) {
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  if (key === 'space' && event.target === this.editor.$view) {
    this.autoHoming();
  }
};

/***
 *
 * @param {MouseEvent} event
 */
LEViewportController.prototype.ev_auxclick = function (event) {
  this.autoHoming();
};
var _default = LEViewportController;
exports["default"] = _default;

/***/ }),

/***/ 76422:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function LEDeleteErrorDialog(data) {
  _Fragment["default"].call(this);
  this.data = data;
}
_OOP["default"].mixClass(LEDeleteErrorDialog, _Fragment["default"]);
LEDeleteErrorDialog.prototype.createView = function () {
  var _this = this;
  this.$reasons = this.data.reasons.map(function (reason) {
    return (0, _FCore._)({
      tag: 'tr',
      child: [{
        tag: 'td',
        child: [(0, _FCore._)(reason.comp.menuIcon).addStyle({
          'font-size': '1.5em',
          verticalAlign: 'middle'
        }), {
          tag: 'span',
          style: {
            verticalAlign: 'middle'
          },
          child: {
            text: ' ' + (reason.comp.attributes.name || reason.comp.attributes.name)
          }
        }]
      }, {
        tag: 'td',
        style: {
          textAlign: 'right'
        },
        child: {
          tag: 'span',
          child: {
            text: reason.ref ? reason.ref : ''
          }
        }
      }, {
        tag: 'td',
        style: {
          textAlign: 'right'
        },
        child: {
          tag: 'span',
          child: {
            text: reason.owner ? 'owner=system' : ''
          }
        }
      }]
    });
  });
  this.$reasonTable = (0, _FCore._)({
    tag: 'table',
    "class": 'as-basic-table',
    child: [{
      tag: 'thead',
      child: {
        tag: 'tr',
        child: [{
          tag: 'td',
          child: {
            text: 'Component'
          }
        }, {
          tag: 'td',
          child: {
            text: 'Reference Lines'
          }
        }, {
          tag: 'td',
          child: {
            text: 'Permission'
          }
        }]
      }
    }, {
      tag: 'tbody',
      child: this.$reasons
    }]
  });
  this.$view = (0, _FCore._)({
    tag: _MessageDialog["default"],
    props: {
      dialogTitle: 'Can not delete components',
      dialogActions: [{
        "class": 'primary',
        text: 'OK'
      }]
    },
    child: this.$reasonTable,
    on: {
      action: function action(event) {
        _this.stop();
      }
    }
  });
};
LEDeleteErrorDialog.prototype.onStart = function () {
  this.$modal = (0, _FCore._)({
    tag: _Modal["default"],
    child: this.getView()
  }).addTo(document.body);
};
LEDeleteErrorDialog.prototype.onStop = function () {
  this.$modal.remove();
};
var _default = LEDeleteErrorDialog;
exports["default"] = _default;

/***/ }),

/***/ 23609:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.LEBorderFormatFragment = LEBorderFormatFragment;
exports.LEPaperSizeFragment = LEPaperSizeFragment;
exports["default"] = void 0;
exports.openPageSettingDialog = openPageSettingDialog;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _FCore = __webpack_require__(51518);
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _measurements = __webpack_require__(23873);
var _noop = _interopRequireDefault(__webpack_require__(5025));
__webpack_require__(47515);
var _TabView = _interopRequireDefault(__webpack_require__(3475));
var _TabFrame = _interopRequireDefault(__webpack_require__(13089));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function LEPageSettingDialog() {
  _Fragment["default"].call(this);
  this.pageSizeFrag = new LEPaperSizeFragment();
  this.pageSizeFrag.attach(this);
}
_OOP["default"].mixClass(LEPageSettingDialog, _Fragment["default"]);
LEPageSettingDialog.prototype.createView = function () {
  var _this = this;
  this.$pageStyle = (0, _FCore._)({
    tag: _TabFrame["default"],
    props: {
      name: 'Style'
    },
    child: []
  });
  this.$tabview = (0, _FCore._)({
    tag: _TabView["default"],
    "class": 'xp-tiny',
    style: {
      width: '500px',
      height: '700px'
    },
    child: [this.pageSizeFrag.getView(), this.$pageStyle]
  });
  this.$view = (0, _FCore._)({
    tag: _MessageDialog["default"],
    props: {
      dialogTitle: 'Setup',
      dialogActions: [{
        "class": 'primary',
        text: 'OK',
        name: 'ok'
      }, {
        // class: 'primary',
        text: 'CANCEL',
        name: 'cancel'
      }]
    },
    child: [this.$tabview],
    on: {
      action: function action(event) {
        _this.stop();
        if (event.action.name === 'ok') {
          _this.onOK();
        } else {
          _this.onCancel();
        }
      }
    }
  });
  this.$modal = (0, _FCore._)({
    tag: _Modal["default"],
    child: this.$view
  });
};
LEPageSettingDialog.prototype.onStart = function () {
  this.getView();
  this.$modal.addTo(document.body);
};
LEPageSettingDialog.prototype.onStop = function () {
  this.$modal.remove();
};
LEPageSettingDialog.prototype.onOK = _noop["default"];
LEPageSettingDialog.prototype.onCancel = _noop["default"];
var _default = LEPageSettingDialog;
exports["default"] = _default;
function openPageSettingDialog() {
  var dialog = new LEPageSettingDialog();
  return new Promise(function (rs) {
    dialog.onOK = function () {
      rs(dialog.selectedSize || null);
    };
    dialog.onCancel = function () {
      rs(null);
    };
    dialog.start();
  });
}

/**
 * @extends Fragment
 * @constructor
 */
function LEBorderFormatFragment() {}
LEBorderFormatFragment.prototype.createView = function () {
  this.$view = (0, _FCore._)({
    tag: _TabFrame["default"]
  });
};

/**
 * @extends Fragment
 * @constructor
 */
function LEPaperSizeFragment() {
  _Fragment["default"].call(this);
  this.pageList = Object.keys(_measurements.PAGE_SIZE_IN_POINT);
  this.pageList.sort();
  this.pageInPx = this.pageList.reduce(function (ac, cr) {
    var size = _measurements.PAGE_SIZE_IN_POINT[cr].map(function (x) {
      return Math.round(x);
    });
    var sc = _measurements.PAGE_SIZE_IN_POINT[cr][1] / _measurements.PAGE_SIZE_IN_POINT['a4'][1];
    size.push(Math.round((0, _measurements.centimeterToPx)(2) * sc));
    size.push(Math.round((0, _measurements.centimeterToPx)(1.5) * sc));
    ac[cr] = size;
    return ac;
  }, {});
}
_OOP["default"].mixClass(LEPaperSizeFragment, _Fragment["default"]);
LEPaperSizeFragment.prototype.createView = function () {
  var items = this.pageList.map(function (key) {
    return {
      text: "".concat(key.toUpperCase(), " (").concat(Math.round(_measurements.PAGE_SIZE_IN_POINT[key][0]), " x ").concat(Math.round(_measurements.PAGE_SIZE_IN_POINT[key][1]), ")"),
      value: key
    };
  });
  this.$view = (0, _FCore._)({
    tag: _TabFrame["default"],
    props: {
      name: 'Layout'
    },
    child: [{
      "class": 'as-section-text-n-line',
      child: {
        tag: 'span',
        child: {
          text: 'Size'
        }
      }
    }, {
      child: [{
        tag: 'table',
        style: {
          marginTop: '10px'
        },
        child: [{
          tag: 'tr',
          child: [{
            tag: 'td',
            style: {
              padding: '0 20px 10px 10px'
            },
            child: {
              tag: 'span',
              child: {
                text: 'Paper'
              }
            }
          }, {
            tag: 'td',
            attr: {
              colspan: 3
            },
            style: {
              paddingBottom: '10px'
            },
            child: {
              tag: 'selectmenu',
              attr: {
                "data-field": 'paper'
              },
              props: {
                enableSearch: true,
                items: items,
                value: 'a4'
              }
            }
          }]
        }, {
          tag: 'tr',
          child: [{
            tag: 'td',
            style: {
              padding: '0 20px 10px 10px'
            },
            child: {
              tag: 'span',
              child: {
                text: 'Orientation'
              }
            }
          }, {
            tag: 'td',
            attr: {
              colspan: 3
            },
            style: {
              paddingBottom: '10px'
            },
            child: {
              tag: 'selectmenu',
              attr: {
                'data-field': 'orientation'
              },
              props: {
                items: [{
                  text: 'Portrait',
                  value: 'portrait'
                }, {
                  text: 'Landscape',
                  value: 'landscape'
                }],
                value: 'portrait'
              }
            }
          }]
        }, {
          tag: 'tr',
          child: [{
            tag: 'td',
            style: {
              padding: '0 20px 10px 10px'
            },
            child: {
              tag: 'span',
              child: {
                text: 'Width'
              }
            }
          }, {
            tag: 'td',
            style: {
              paddingBottom: '10px'
            },
            child: {
              tag: 'numberinput',
              attr: {
                'data-field': 'width'
              },
              props: {}
            }
          }, {
            tag: 'td',
            style: {
              paddingBottom: '10px',
              textAlign: 'left'
            },
            child: {
              tag: 'checkbox',
              attr: {
                'data-field': 'width_auto'
              },
              props: {
                text: 'auto'
              }
            }
          }]
        }, {
          tag: 'tr',
          child: [{
            tag: 'td',
            style: {
              padding: '0 20px 10px 10px'
            },
            child: {
              tag: 'span',
              child: {
                text: 'Height'
              }
            }
          }, {
            tag: 'td',
            style: {
              paddingBottom: '10px'
            },
            child: {
              tag: 'numberinput',
              attr: {
                'data-field': 'height'
              },
              props: {}
            }
          }, {
            tag: 'td',
            style: {
              paddingBottom: '10px',
              textAlign: 'left'
            },
            child: {
              tag: 'checkbox',
              attr: {
                'data-field': 'height_auto'
              },
              props: {
                text: 'auto'
              }
            }
          }]
        }]
      }]
    }, {
      "class": 'as-section-text-n-line',
      child: {
        tag: 'span',
        child: {
          text: 'Padding'
        }
      }
    }, {
      "class": 'as-table-grid',
      child: [{
        "class": 'as-table-grid-row',
        child: [{
          "class": 'as-table-grid-cell',
          style: {
            padding: '0 20px 10px 10px'
          },
          child: {
            tag: 'span',
            child: {
              text: 'Left'
            }
          }
        }, {
          "class": 'as-table-grid-cell',
          style: {
            paddingBottom: '10px'
          },
          child: {
            tag: 'numberinput',
            props: {}
          }
        }, {
          "class": 'as-table-grid-cell',
          style: {
            padding: '0 20px 10px 10px'
          },
          child: {
            tag: 'span',
            child: {
              text: 'Right'
            }
          }
        }, {
          "class": 'as-table-grid-cell',
          style: {
            paddingBottom: '10px'
          },
          child: {
            tag: 'numberinput',
            props: {}
          }
        }]
      }, {
        "class": 'as-table-grid-row',
        child: [{
          "class": 'as-table-grid-cell',
          style: {
            padding: '0 20px 10px 10px'
          },
          child: {
            tag: 'span',
            child: {
              text: 'Top'
            }
          }
        }, {
          "class": 'as-table-grid-cell',
          style: {
            paddingBottom: '10px'
          },
          child: {
            tag: 'numberinput'
          }
        }, {
          "class": 'as-table-grid-cell',
          style: {
            padding: '0 20px 10px 10px'
          },
          child: {
            tag: 'span',
            child: {
              text: 'Bottom'
            }
          }
        }, {
          "class": 'as-table-grid-cell',
          style: {
            paddingBottom: '10px'
          },
          child: {
            tag: 'numberinput',
            props: {}
          }
        }]
      }]
    }, {
      "class": 'as-section-text-n-line',
      child: {
        tag: 'span',
        child: {
          text: 'Preview'
        }
      }
    }, {
      style: {
        padding: '5px',
        textAlign: 'center'
      },
      child: {
        "class": 'as-page-setting-paper-box',
        child: [{
          "class": 'as-page-setting-padding-tb',
          child: {
            tag: 'span',
            "class": 'as-page-setting-padding-value',
            child: {
              text: '-'
            }
          }
        }, {
          child: [{
            "class": 'as-page-setting-padding-lr',
            child: {
              tag: 'span',
              "class": 'as-page-setting-padding-value',
              child: {
                text: '-'
              }
            }
          }, {
            "class": 'as-page-setting-paper-content-box',
            child: {
              tag: 'span',
              child: {
                text: '- x -'
              }
            }
          }, {
            "class": 'as-page-setting-padding-lr',
            child: {
              tag: 'span',
              "class": 'as-page-setting-padding-value',
              child: {
                text: '-'
              }
            }
          }]
        }, {
          "class": 'as-page-setting-padding-tb',
          child: {
            tag: 'span',
            "class": 'as-page-setting-padding-value',
            child: {
              text: '-'
            }
          }
        }]
      }
    }]
  });
  this.$inputs = (0, _FCore.$$)('numberinput', this.$view).concat((0, _FCore.$$)('selectmenu', this.$view)).concat((0, _FCore.$$)('checkbox', this.$view)).reduce(function (ac, cr) {
    ac[cr.attr('data-field')] = cr;
    return ac;
  }, {});
  this.$width = this.$inputs['width'].on('change', this.ev_sizeChange.bind(this));
  this.$height = this.$inputs['height'].on('change', this.ev_sizeChange.bind(this));
  this.$heightAuto = this.$inputs['height_auto'];
  this.$widthAuto = this.$inputs['height_auto'];
  this.$orientation = this.$inputs['orientation'].on('change', this.ev_paperChange.bind(this));
  this.$pageSelect = this.$inputs['paper'].on('change', this.ev_paperChange.bind(this));
  this.$paddingValues = (0, _FCore.$$)('.as-page-setting-padding-value', this.$view);
  this.$contentSize = (0, _FCore.$)('.as-page-setting-paper-content-box span', this.$view);
  this._updatePreview();
};
LEPaperSizeFragment.prototype._updatePreview = function () {
  var pageId = this.$pageSelect.value;
  var pageSize = this.pageInPx[pageId];
  this.selectedSize = pageSize;
  this.$paddingValues[0].innerHTML = '' + pageSize[3];
  this.$paddingValues[1].innerHTML = '' + pageSize[3];
  this.$paddingValues[2].innerHTML = '' + pageSize[2];
  this.$paddingValues[3].innerHTML = '' + pageSize[2];
  this.$contentSize.innerHTML = [pageSize[0] - pageSize[2] * 2, pageSize[1] - pageSize[3] * 2].join(' x ');
};
LEPaperSizeFragment.prototype.ev_paperChange = function () {
  var pageId = this.$pageSelect.value;
  var width;
  var height;
  var orientation = this.$orientation.value;
  var pageSize = this.pageInPx[pageId];
  if (pageId === 'custom') {
    width = this.$width.value;
    height = this.$height.value;
  } else {
    width = pageSize[0];
    height = pageSize[1];
  }
  var temp;
  if (orientation === 'landscape' && width < height) {
    temp = width;
    width = height;
    height = temp;
  }
  this.$width.value = width;
  this.$height.value = height;
};
LEPaperSizeFragment.prototype.ev_sizeChange = function () {
  var width = this.$width.value;
  var height = this.$height.value;
  var newOrient = width > height ? 'landscape' : 'portrait';
  if (newOrient !== this.$orientation.value) {
    this.$orientation.value = newOrient;
  }
};

/**
 * @typedef {Object} LEPaperSizeFragmentData
 * @property {string} paper
 * @property {null|"landscape"|"portrait"} orienttation
 * @property {number} width
 * @property {number} height
 * @property {number} paddingTop
 * @property {number} paddingLeft
 * @property {number} paddingBottom
 * @property {number} paddingRight
 */

/**
 * @returns LEPaperSizeFragmentData
 */
LEPaperSizeFragment.prototype.getData = function () {};

/**
 *
 * @param {LEPaperSizeFragmentData} data
 */
LEPaperSizeFragment.prototype.setData = function (data) {};

/***/ }),

/***/ 14457:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.collectComponentIdList = collectComponentIdList;
exports.collectDeleteLockReason = collectDeleteLockReason;
exports.componentHasSystemLock = componentHasSystemLock;
function componentHasSystemLock(comp, recursive) {
  if (comp.attributes.permissions && comp.attributes.permissions.owner === "system") {
    return true;
  }
  if (recursive && comp.children && comp.children.length > 0) {
    return comp.children.some(function (c) {
      return componentHasSystemLock(c, recursive);
    });
  }
  return false;
}
function collectComponentIdList(root, ac) {
  var res = ac || [];
  res.push(root.attributes.id);
  if (root.children && root.children.length > 0) {
    root.children.forEach(function (child) {
      return collectComponentIdList(child, res);
    });
  }
  return res;
}

/**
 *
 * @param {Object<string, number>}idRefs number of line referent to(by id)
 * @param comp
 * @param ac
 * @returns {*[]}
 */
function collectDeleteLockReason(idRefs, comp, ac) {
  ac = ac || [];
  var reason;
  if (comp.attributes.permissions && comp.attributes.permissions.owner === "system") {
    reason = reason || {};
    reason.owner = 'system';
  }
  if (idRefs[comp.attributes.id]) {
    reason = reason || {};
    reason.ref = idRefs[comp.attributes.id];
  }
  if (reason) reason.comp = comp;
  if (reason) ac.push(reason);
  if (comp.children && comp.children.length > 0) {
    comp.children.forEach(function (child) {
      return collectDeleteLockReason(idRefs, child, ac);
    });
  }
  return ac;
}

/***/ }),

/***/ 11570:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _Broadcast = _interopRequireDefault(__webpack_require__(15910));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _stringGenerate = __webpack_require__(10713);
var _ClipboardManager = _interopRequireDefault(__webpack_require__(14177));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _FNode = __webpack_require__(88215);
var _utils = __webpack_require__(16907);
var _generator = __webpack_require__(18528);
var _Constants = __webpack_require__(92311);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param editor
 * @constructor
 */
function LEClipboardTool(editor) {
  this.editor = editor;
  this.id = (0, _stringGenerate.randomIdent)(12);
  this.preInit();
  this.share.emitter.on('data', this.ev_data.bind(this));
  this.share.broadcast.on('data', this.ev_data.bind(this));
  this.share.emitter.on('paste', this.ev_paste.bind(this));
  this.share.broadcast.on('paste', this.ev_paste.bind(this));
  this.editor.on('change', this.ev_editorChange.bind(this));
  this.$anchorBorders = [];
  this.cuttingComponents = [];
}
LEClipboardTool.prototype.copy = function () {
  var data = this.editor.anchorEditorsCtrl.anchorEditors.map(function (ae) {
    return ae.component.getData();
  });
  if (data.length === 0) return;
  this.clearAnchorBorders();
  this.$anchorBorders = this.editor.anchorEditorsCtrl.anchorEditors.map(function (ae) {
    var comp = ae.component;
    var anchorElt = comp.anchor && comp.anchor.domElt || comp.domElt.parentElement;
    var borderElt = (0, _FCore._)({
      "class": ['as-clipboard-anchor-border', 'as-action-copy']
    });
    anchorElt.insertBefore(borderElt, anchorElt.firstChild);
    return borderElt;
  });
  _ClipboardManager["default"].set(_R["default"].CLIPBOARD.COMPONENTS, {
    action: 'copy',
    controllerId: this.id,
    id: (0, _stringGenerate.randomIdent)(),
    data: data
  });
  this.emit('data', {
    action: 'copy'
  });
};
LEClipboardTool.prototype.cut = function () {
  var data = this.editor.anchorEditorsCtrl.anchorEditors.map(function (ae) {
    return ae.component.getData();
  });
  if (data.length === 0) return;
  this.clearAnchorBorders();
  this.$anchorBorders = this.editor.anchorEditorsCtrl.anchorEditors.map(function (ae) {
    var comp = ae.component;
    var anchorElt = comp.anchor && comp.anchor.domElt || comp.domElt.parentElement;
    var borderElt = (0, _FCore._)({
      "class": ['as-clipboard-anchor-border', 'as-action-cut']
    });
    anchorElt.insertBefore(borderElt, anchorElt.firstChild);
    return borderElt;
  });
  _ClipboardManager["default"].set(_R["default"].CLIPBOARD.COMPONENTS, {
    action: 'cut',
    controllerId: this.id,
    id: (0, _stringGenerate.randomIdent)(),
    data: data
  });
  this.cuttingComponents = this.editor.anchorEditorsCtrl.anchorEditors.map(function (ae) {
    return ae.component;
  });
  this.emit('data', {
    action: 'cut'
  });
};
LEClipboardTool.prototype._pasteNormal = function () {
  var launcher = this.editor.getContext(_R["default"].LAUNCHER);
  var shiftKey = launcher.userInteractionCtrl.shiftKey;
  var cTransfer = _ClipboardManager["default"].get(_R["default"].CLIPBOARD.COMPONENTS);
  var aeArr = this.editor.anchorEditorsCtrl.anchorEditors;
  var after = aeArr.length > 0 ? aeArr[aeArr.length - 1].component : null;
  var before = aeArr.length > 0 ? aeArr[0].component : null;
  var parent = this.editor.editingLayoutCtrl.editingLayout || this.editor.rootLayout;
  var nameDict = {};
  (0, _FNode.traversal)(this.editor.rootLayout, function (path) {
    nameDict[path.node.attributes.name] = true;
  });
  var data = (0, _generator.replaceDateStringJSVariable)(cTransfer.data);
  var comps = data.map(function (compData) {
    //todo: make new id and name
    (0, _FNode.traversal)(compData, function (path) {
      var node = path.node;
      node.attributes = node.attributes || {};
      node.attributes.id = (0, _utils.randomUniqueIdent)();
      var name = node.attributes.name || node.attributes.id;
      while (nameDict[name]) {
        name = (0, _utils.nextIdString)(name);
      }
      node.attributes.name = name;
      nameDict[name] = true;
    });
    return this.editor.buildComponent(compData, this.editor.rootFragment);
  }.bind(this));
  var comp;
  for (var i = 0; i < comps.length; ++i) {
    comp = comps[i];
    if (aeArr.length > 0) {
      if (shiftKey) {
        parent.addChildBefore(comp, before);
      } else {
        parent.addChildAfter(comp, after);
        after = comp;
      }
    } else {
      parent.addChild(comp);
    }
  }
  this.editor.setActiveComponent.apply(this.editor, comps);
};
LEClipboardTool.prototype._pasteForMoving = function () {
  var launcher = this.editor.getContext(_R["default"].LAUNCHER);
  var shiftKey = launcher.userInteractionCtrl.shiftKey;
  var activeCompArr = this.editor.anchorEditorsCtrl.anchorEditors.map(function (ea) {
    return ea.component;
  });
  var cuttingCompDict = this.cuttingComponents.reduce(function (ac, cr) {
    ac[cr.attributes.id] = cr;
    return ac;
  }, {});
  activeCompArr = activeCompArr.filter(function (comp) {
    return !cuttingCompDict[comp.attributes.id];
  });
  var beforeComp = null;
  var afterComp = null;
  if (activeCompArr.length > 0) {
    beforeComp = activeCompArr[0];
    afterComp = activeCompArr[activeCompArr.length - 1];
  }
  var editingLayout = this.editor.editingLayoutCtrl.editingLayout || this.editor.rootLayout;
  var isSub = this.cuttingComponents.some(function (comp) {
    return editingLayout.domElt.isDescendantOf(comp.domElt) || comp === editingLayout;
  });
  if (isSub) {
    console.error("error", "Can not move to here");
    //todo fail
  } else {
    if (!afterComp) {
      this.cuttingComponents.forEach(function (comp) {
        //todo: after select or before select
        editingLayout.addChild(comp);
      });
    } else {
      if (shiftKey) {
        this.cuttingComponents.forEach(function (comp) {
          //todo: after select or before select
          editingLayout.addChildBefore(comp, beforeComp);
        });
      } else {
        this.cuttingComponents.reverse().forEach(function (comp) {
          //todo: after select or before select
          editingLayout.addChildAfter(comp, beforeComp);
        });
      }
    }
    this.editor.setActiveComponent.apply(this.editor, this.cuttingComponents);
    this.cuttingComponents = [];
  }
};
LEClipboardTool.prototype.paste = function () {
  var cTransfer = _ClipboardManager["default"].get(_R["default"].CLIPBOARD.COMPONENTS);
  var rootElt = this.editor.rootLayout.domElt;
  var cuttingOK = cTransfer.action === 'cut' && cTransfer.controllerId === this.id && this.cuttingComponents.length > 0 && this.cuttingComponents.every(function (component) {
    return component.domElt.isDescendantOf(rootElt);
  });
  if (cuttingOK) {
    this._pasteForMoving();
  } else {
    this._pasteNormal();
  }
  this.editor.lcEmitter.emit(_Constants.EV_COMP_TREE_CHANGE);
  this.emit('paste', {});
};
LEClipboardTool.prototype.emit = function (name, eventData) {
  var data = Object.assign({
    fromId: this.id,
    type: name
  }, eventData);
  this.share.emitter.emit(name, data);
  this.share.broadcast.emit(name, data);
};
LEClipboardTool.prototype.clearAnchorBorders = function () {
  this.$anchorBorders.forEach(function (elt) {
    elt.remove();
  });
  this.$anchorBorders = [];
};
LEClipboardTool.prototype.onStart = function () {
  console.log("START");
};
LEClipboardTool.prototype.onStop = function () {
  console.log("STOP");
};
LEClipboardTool.prototype.share = {
  emitter: null,
  broadcast: null
};
LEClipboardTool.prototype.preInit = function () {
  this.share.broadcast = new _Broadcast["default"]('LEClipboardControllerBroadcastChannel');
  this.share.emitter = new _EventEmitter["default"]();
  var cTransfer = _ClipboardManager["default"].get(_R["default"].CLIPBOARD.COMPONENTS);
  if (cTransfer && !cTransfer.action && !cTransfer.data) {
    _ClipboardManager["default"].set(_R["default"].CLIPBOARD.COMPONENTS, null);
  }
};
LEClipboardTool.prototype.onOtherCopy = function () {
  this.cuttingComponents = [];
  this.clearAnchorBorders();
};
LEClipboardTool.prototype.ev_data = function (event) {
  if (event.fromId !== this.id) {
    this.onOtherCopy();
  }
};
LEClipboardTool.prototype.ev_paste = function () {
  this.cuttingComponents = [];
  this.clearAnchorBorders();
};
LEClipboardTool.prototype.ev_editorChange = function () {
  this.cuttingComponents = [];
  this.clearAnchorBorders();
};
var _default = LEClipboardTool;
exports["default"] = _default;

/***/ }),

/***/ 50122:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.openSelectComponentTypeDialog = openSelectComponentTypeDialog;
__webpack_require__(50562);
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _Assembler = __webpack_require__(2326);
var _ExpTree = _interopRequireDefault(__webpack_require__(87326));
var _search = _interopRequireWildcard(__webpack_require__(67858));
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/****
 * @extends Context
 * @constructor
 */
function SelectComponentTypeDialog(opt) {
  _Fragment["default"].call(this);
  this.opt = Object.assign({
    confirmButtonText: 'CONFIRM'
  }, opt);
  this.cache = {};
  this.selectedClass = null;
}
_OOP["default"].mixClass(SelectComponentTypeDialog, _Fragment["default"]);
SelectComponentTypeDialog.prototype.createView = function () {
  var self = this;
  var componentClasses = Object.keys(_Assembler.AssemblerInstance.classes['COMPONENT']).reduce(function (ac, cr) {
    var clazz = _Assembler.AssemblerInstance.classes['COMPONENT'][cr];
    if (cr === clazz.prototype.tag) {
      ac.push(clazz);
    }
    return ac;
  }, []);
  componentClasses.sort(function (a, b) {
    if (a.prototype.tag < b.prototype.tag) return -1;
    return 1;
  });
  this.componentClasses = componentClasses;
  this.$activeNode = null;
  this.$typeNodes = this.componentClasses.map(function (clazz) {
    var elt = (0, _FCore._)({
      tag: _ExpTree["default"].tag,
      props: {
        name: clazz.prototype.tag,
        icon: clazz.prototype.menuIcon,
        componentClass: clazz
      },
      on: {
        click: function click() {
          if (self.$activeNode === this) return;
          if (self.$activeNode) self.$activeNode.removeClass('as-selected');
          self.$activeNode = this;
          self.$activeNode.addClass('as-selected');
          self.$confirmBtn.disabled = false;
          self.selectedClass = clazz;
        },
        dblclick: function dblclick() {
          if (self.$activeNode === this) {
            self.onConfirm();
            return;
          }
          if (self.$activeNode) self.$activeNode.removeClass('as-selected');
          self.$activeNode = this;
          self.$activeNode.addClass('as-selected');
          self.$confirmBtn.disabled = false;
          self.selectedClass = clazz;
          self.onConfirm();
        }
      }
    });
    return elt;
  });
  this.$searchInput = (0, _FCore._)({
    tag: _Searcher["default"].tag,
    on: {
      stoptyping: this.ev_inputChange.bind(this)
    }
  });
  this.$view = (0, _FCore._)({
    "class": ['as-select-component-type-dialog', 'as-message-dialog'],
    child: [{
      "class": 'as-message-dialog-header',
      child: this.$searchInput
    }, {
      "class": ['as-message-dialog-body', 'absol-bscroller'],
      child: this.$typeNodes
    }, {
      "class": 'as-message-dialog-footer',
      child: [{
        tag: _FlexiconButton["default"].tag,
        "class": ['as-message-dialog-cancel-btn', 'secondary'],
        props: {
          text: 'Cancel'
        },
        on: {
          click: function click() {
            self.onCancel();
          }
        }
      }, {
        tag: _FlexiconButton["default"].tag,
        "class": ['as-message-dialog-confirm-btn', 'primary'],
        props: {
          text: this.opt.confirmButtonText,
          disabled: true
        },
        on: {
          click: function click() {
            self.onConfirm();
          }
        }
      }]
    }]
  });
  this.$body = (0, _FCore.$)('.as-message-dialog-body', this.$view);
  this.$confirmBtn = (0, _FCore.$)('.as-message-dialog-confirm-btn', this.$view);
};
SelectComponentTypeDialog.prototype._getNodesBySearch = function (query) {
  this._searchingItems = this._searchingItems || this.$typeNodes.map(function (elt) {
    return (0, _search["default"])({
      text: elt.name,
      value: elt
    });
  });
  return (0, _search.searchListByText)(query, this._searchingItems).map(function (item) {
    return item.value;
  });
};
SelectComponentTypeDialog.prototype.ev_inputChange = function () {
  var query = this.$searchInput.value.trim().replace(/\s\s+/g, ' ');
  var cNodes;
  this.$body.clearChild();
  if (query.length === 0) {
    this.$body.addChild(this.$typeNodes);
  } else {
    cNodes = this.cache[query] || this._getNodesBySearch(query);
    this.$body.addChild(cNodes);
  }
};
SelectComponentTypeDialog.prototype.onStart = function () {
  this.$searchInput.focus();
};
SelectComponentTypeDialog.prototype.onConfirm = _noop["default"];
SelectComponentTypeDialog.prototype.onCancel = _noop["default"];
function openSelectComponentTypeDialog(opt) {
  var frg = new SelectComponentTypeDialog(opt);
  var modal = (0, _FCore._)('modal.as-select-component-type-modal').addTo(document.body);
  modal.addChild(frg.getView());
  frg.start();
  return new Promise(function (resolve) {
    frg.onCancel = function () {
      frg.destroy();
      modal.remove();
      resolve(null);
    };
    frg.onConfirm = function () {
      frg.destroy();
      modal.remove();
      return resolve(frg.selectedClass);
    };
  });
}
var _default = SelectComponentTypeDialog;
exports["default"] = _default;

/***/ }),

/***/ 74445:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _ChainAnchor = _interopRequireDefault(__webpack_require__(91081));
var _LinearLayout = _interopRequireDefault(__webpack_require__(86527));
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
function ChainLayout() {
  _LinearLayout["default"].call(this);
}
(0, _inheritComponentClass["default"])(ChainLayout, _LinearLayout["default"]);
ChainLayout.prototype.tag = 'ChainLayout';
ChainLayout.prototype.menuIcon = 'span.mdi.mdi-id-card';
ChainLayout.prototype.TOP_CLASS_NAME = 'as-chain-layout';
ChainLayout.prototype.AnchorClass = _ChainAnchor["default"];
ChainLayout.prototype.styleHandlers.overflowX = {
  set: function set(value) {
    if (['visible', 'hidden', 'auto'].indexOf(value) < 0) value = 'visible';
    this.view.addStyle('overflowX', value);
    return value;
  },
  descriptor: {
    type: 'enum',
    values: ['visible', 'hidden', 'auto']
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'auto') return undefined;
    return value;
  }
};
ChainLayout.prototype.styleHandlers.hAlignItem = {
  set: function set(value) {
    if (['left', 'center', 'right'].indexOf(value) <= 0) value = 'left';
    if (value === 'left') {
      this.domElt.removeClass('as-h-align-item-right').removeClass('as-h-align-item-center');
    } else if (value === 'center') {
      this.domElt.addClass('as-h-align-item-center').removeClass('as-h-align-item-right');
    } else {
      this.domElt.removeClass('as-h-align-item-center').addClass('as-h-align-item-right');
    }
    return value;
  },
  descriptor: {
    type: 'enum',
    values: ['left', 'center', 'right']
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'left') return undefined;
    return value;
  }
};
ChainLayout.prototype.measureMinSize = function () {
  var width = 0;
  var height = 0;
  var child;
  for (var i = 0; i < this.children.length; ++i) {
    child = this.children[i];
    var minSize = child.measureMinSize();
    width = Math.max(width, child.style.left + minSize.width + child.style.right);
    height = Math.max(height, child.style.top + minSize.height + child.style.bottom);
  }
  return {
    width: width,
    height: height
  };
};
ChainLayout.prototype.render = function () {
  return _({
    "class": this.TOP_CLASS_NAME
  });
};
ChainLayout.prototype.onAddChild = function (child, index) {
  var anchor = new _ChainAnchor["default"](child);
  if (index === -1 || !this.view.childNodes[index]) {
    this.domElt.addChild(child.domElt);
  } else {
    this.view.addChildBefore(child.domElt, this.domElt.childNodes[index]);
  }
};
ChainLayout.prototype.addChildByPosition = function (child, posX, posY) {
  var bound = this.view.getBoundingClientRect();
  var at = undefined;
  var x;
  for (var i = 0; i < this.children.length; ++i) {
    x = this.children[i].view.getBoundingClientRect().right - bound.left;
    if (x >= posX) {
      at = this.children[i];
      break;
    }
  }
  if (at) {
    this.addChildBefore(child, at);
  } else {
    this.addChild(child);
  }
};
_Assembler.AssemblerInstance.addClass(ChainLayout);
var _default = ChainLayout;
exports["default"] = _default;

/***/ }),

/***/ 67454:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseLayout = _interopRequireDefault(__webpack_require__(94975));
var _FCore = __webpack_require__(51518);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _utils = __webpack_require__(84512);
var _GridAnchor = _interopRequireDefault(__webpack_require__(88334));
var _Assembler = __webpack_require__(2326);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends BaseLayout
 * @constructor
 */
function GridLayout() {
  _BaseLayout["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(GridLayout, _BaseLayout["default"]);
GridLayout.prototype.tag = 'GridLayout';
GridLayout.prototype.render = function () {
  this.domElt = (0, _FCore._)({
    "class": 'as-grid-layout'
  });
};
GridLayout.prototype.styleHandlers.rowGap = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value) || value < 0) {
      value = 0;
    }
    if (value) {
      this.domElt.addStyle('row-gap', value + '');
    } else {
      this.domElt.removeStyle('row-gap');
    }
    return value;
  },
  get: function get(ref) {
    var value = ref.get();
    if ((0, _utils.isRealNumber)(value) && value >= 0) return value;
    return 0;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if ((0, _utils.isRealNumber)(value) && value > 0) return value;
    return undefined;
  }
};
GridLayout.prototype.styleHandlers.columnGap = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value) || value < 0) {
      value = 0;
    }
    if (value) {
      this.domElt.addStyle('column-gap', value + '');
    } else {
      this.domElt.removeStyle('column-gap');
    }
    return value;
  },
  get: function get(ref) {
    var value = ref.get();
    if ((0, _utils.isRealNumber)(value) && value >= 0) return value;
    return 0;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if ((0, _utils.isRealNumber)(value) && value > 0) return value;
    return undefined;
  }
};
GridLayout.prototype.styleHandlers.templateRows = {
  set: function set(value) {
    if (typeof value === "string") {
      value = value.trim();
    }
    value = value || '';
    if (value) {
      this.domElt.addStyle('grid-template-rows', value);
    } else {
      this.domElt.removeStyle('grid-template-rows');
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (!value || typeof value !== "string") return undefined;
    return value;
  },
  descriptor: {
    type: 'text'
  }
};
GridLayout.prototype.styleHandlers.templateColumns = {
  set: function set(value) {
    if (typeof value === "string") {
      value = value.trim();
    }
    value = value || '';
    if (value) {
      this.domElt.addStyle('grid-template-columns', value);
    } else {
      this.domElt.removeStyle('grid-template-columns');
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (!value || typeof value !== "string") return undefined;
    return value;
  },
  descriptor: {
    type: 'text'
  }
};
GridLayout.prototype.onAddChild = function (child, index) {
  var anchor = new _GridAnchor["default"](child);
  if (index === this.domElt.childNodes.length) {
    this.domElt.addChild(child.domElt);
  } else {
    this.domElt.addChildBefore(child.domElt, this.domElt.childNodes[index]);
  }
};
GridLayout.prototype.onRemoveChild = function (child, index) {
  child.domElt.remove();
  child.anchor.destroy();
};
_Assembler.AssemblerInstance.addClass(GridLayout);
var _default = GridLayout;
exports["default"] = _default;

/***/ }),

/***/ 77616:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseLayout = _interopRequireDefault(__webpack_require__(94975));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _RelativeLayout = _interopRequireDefault(__webpack_require__(56061));
var _Assembler = __webpack_require__(2326);
var _FCore = __webpack_require__(51518);
var _HyperAnchor = _interopRequireDefault(__webpack_require__(94243));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends BaseLayout
 * @constructor
 */
function HyperLayout() {
  _BaseLayout["default"].call(this);
}
(0, _inheritComponentClass["default"])(HyperLayout, _BaseLayout["default"]);
HyperLayout.prototype.tag = 'HyperLayout';
HyperLayout.prototype.menuIcon = 'span.mdi.mdi-tangram';
HyperLayout.prototype.TOP_CLASS_NAME = 'as-hyper-layout';
HyperLayout.prototype.render = function () {
  return (0, _FCore._)({
    "class": this.TOP_CLASS_NAME
  });
};
HyperLayout.prototype.style.contentAlign = 'left';
HyperLayout.prototype.styleHandlers.contentAlign = {
  set: function set(value) {
    if (!['left', 'center', 'right'].includes(value)) value = 'left';
    switch (value) {
      case 'right':
        this.domElt.removeClass('as-content-align-center').addClass('as-content-align-right');
        break;
      case 'center':
        this.domElt.removeClass('as-content-align-right').addClass('as-content-align-center');
        break;
      default:
        this.domElt.removeClass('as-content-align-center').removeClass('as-content-align-right');
    }
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === this.constructor.prototype.style.contentAlign) value = undefined;
    return value || undefined;
  },
  descriptor: {
    type: 'enum',
    values: ['left', 'center', 'right']
  }
};
HyperLayout.prototype.onAddChild = function (child, index) {
  var anchor = new _HyperAnchor["default"](child);
  if (index === this.domElt.childNodes.length) {
    this.domElt.addChild(child.domElt);
  } else {
    this.domElt.addChildBefore(child.domElt, this.domElt.childNodes[index]);
  }
};
HyperLayout.prototype.onRemoveChild = function (child, index) {
  child.domElt.remove();
  child.anchor.destroy();
};
_Assembler.AssemblerInstance.addClass(HyperLayout);
var _default = HyperLayout;
exports["default"] = _default;

/***/ }),

/***/ 86527:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _BaseLayout = _interopRequireDefault(__webpack_require__(94975));
var _LinearAnchor = _interopRequireDefault(__webpack_require__(49085));
var _LinearAnchorEditor = _interopRequireDefault(__webpack_require__(41862));
var _Assembler = __webpack_require__(2326);
var _utils = __webpack_require__(16907);
var _utils2 = __webpack_require__(84512);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
function LinearLayout() {
  _BaseLayout["default"].call(this);
}
(0, _inheritComponentClass["default"])(LinearLayout, _BaseLayout["default"]);
LinearLayout.prototype.tag = 'LinearLayout';
LinearLayout.prototype.menuIcon = 'span.mdi.mdi-post-outline';
LinearLayout.prototype.TOP_CLASS_NAME = 'as-linear-layout';
LinearLayout.prototype.SUPPORT_STYLE_NAMES = ['width', 'height']; //, 'left', 'right', 'top', 'bottom'];

LinearLayout.prototype.AnchorClass = _LinearAnchor["default"];
LinearLayout.prototype.style.paddingLeft = 0;
LinearLayout.prototype.style.paddingRight = 0;
LinearLayout.prototype.style.paddingTop = 0;
LinearLayout.prototype.style.paddingBottom = 0;
LinearLayout.prototype.styleHandlers.overflowY = {
  set: function set(value) {
    if (['visible', 'hidden', 'auto'].indexOf(value) < 0) value = 'visible';
    this.domElt.addStyle('overflowY', value);
    return value;
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'visible' || !value) return undefined;
    return value;
  },
  descriptor: {
    type: 'enum',
    values: ['visible', 'hidden', 'auto']
  }
};
LinearLayout.prototype.styleHandlers.paddingLeft = {
  set: function set(value) {},
  get: function get() {},
  descriptor: {
    type: 'measurePosition'
  }
};
LinearLayout.prototype.styleHandlers.paddingRight = {
  set: function set(value) {},
  get: function get() {},
  descriptor: {
    type: 'measurePosition'
  }
};
['left', 'right', 'top', 'bottom'].forEach(function (pos) {
  LinearLayout.prototype.styleHandlers['padding' + pos[0].toUpperCase() + pos.substring(1)] = {
    /***
     * @this BaseComponent
     * @param value
     * @returns {*}
     */
    set: function set(value) {
      var ref = arguments[arguments.length - 1];
      var unit = arguments.length > 2 ? arguments[1] : undefined;
      var currentValue = ref.get();
      var current = (0, _utils.parseMeasureValue)(currentValue) || {
        value: 'auto',
        unit: null
      };
      value = this.implicitMeasureSizeValue(value, unit, 'width', current.unit);
      if (value === 'auto') {
        this.domElt.removeStyle('padding-' + pos);
      } else if (value === 'match_parent') {
        this.domElt.addStyle('padding-' + pos, '100%');
      } else if ((0, _utils2.isRealNumber)(value)) {
        this.domElt.addStyle('padding-' + pos, value + 'px');
      } else this.domElt.addStyle('padding-' + pos, value);
      return value;
    },
    get: function get() {
      var unit = arguments.length > 1 ? arguments[0] : undefined;
      var ref = arguments[arguments.length - 1];
      var value = ref.get();
      var parentBound;
      if (unit === 'px') {
        if (value !== 'number') {
          return parseFloat(this.domElt.getComputedStyleValue('padding-' + pos).replace('px', ''));
        } else {
          return value;
        }
      } else if (unit === '%') {
        if (typeof value === 'string' && value.match(/%$/)) return parseFloat(value.replace('%', ''));else {
          parentBound = this.parent.domElt.getBoundingClientRect();
          return parseFloat(this.domElt.getComputedStyleValue('padding-' + pos).replace('px', '')) * 100 / parentBound.width;
        }
      } else return value;
    },
    descriptor: {
      type: 'measurePosition',
      sign: 'padding_' + pos
    }
  };
});
LinearLayout.prototype.onCreate = function () {
  _BaseLayout["default"].prototype.onCreate.apply(this, arguments);
  this.style.overflowY = false;
};
LinearLayout.prototype.render = function () {
  return _({
    "class": this.TOP_CLASS_NAME
  });
};

/**
 *
 * @param {BaseComponent} child
 * @param index
 */
LinearLayout.prototype.onAddChild = function (child, index) {
  var anchor = new _LinearAnchor["default"](child);
  if (index === -1 || !this.view.childNodes[index]) {
    this.domElt.addChild(child.domElt);
  } else {
    this.view.addChildBefore(child.domElt, this.domElt.childNodes[index]);
  }
};

/**
 *
 * @param {BaseComponent} child
 * @param index
 */
LinearLayout.prototype.onRemoveChild = function (child, index) {
  child.anchor.destroy();
  child.domElt.remove();
};

/**
 *
 * @returns {{width:Number, height:Number}}
 */
LinearLayout.prototype.measureMinSize = function () {
  //todo
  var width = 0;
  var height = 0;
  var cW;
  var cH;
  var child;
  for (var i = 0; i < this.children.length; ++i) {
    child = this.children[i];
    var minSize = child.measureMinSize();
    cW = child.style.left + minSize.width + child.style.right;
    cH = child.style.top + minSize.height + child.style.bottom;
    width = Math.min(cW, width);
    height += cH;
  }
  return {
    width: width,
    height: height
  };
};
LinearLayout.prototype.addChildByPosition = function (child, posX, posY) {
  var bound = this.view.getBoundingClientRect();
  var at = undefined;
  var y;
  for (var i = 0; i < this.children.length; ++i) {
    y = this.children[i].view.getBoundingClientRect().bottom - bound.top;
    if (y >= posY) {
      at = this.children[i];
      break;
    }
  }
  if (at) {
    this.addChildBefore(child, at);
  } else {
    this.addChild(child);
  }
};
_Assembler.AssemblerInstance.addClass(LinearLayout);
var _default = LinearLayout;
exports["default"] = _default;

/***/ }),

/***/ 56061:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _RelativeAnchor = _interopRequireDefault(__webpack_require__(58493));
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _BaseLayout = _interopRequireDefault(__webpack_require__(94975));
var _RelativeAnchorEditor = _interopRequireDefault(__webpack_require__(29098));
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;

/**
 * @extends BaseLayout
 * @constructor
 */
function RelativeLayout() {
  _BaseLayout["default"].call(this);
}
(0, _inheritComponentClass["default"])(RelativeLayout, _BaseLayout["default"]);
RelativeLayout.prototype.tag = 'RelativeLayout';
RelativeLayout.prototype.menuIcon = 'span.mdi.mdi-relative-scale';
RelativeLayout.prototype.TOP_CLASS_NAME = 'as-relative-layout';
RelativeLayout.prototype.SUPPORT_STYLE_NAMES = ['width', 'height']; //, 'left', 'right', 'top', 'bottom'];
RelativeLayout.prototype.AnchorClass = _RelativeAnchor["default"];
RelativeLayout.prototype.render = function () {
  return _({
    "class": this.TOP_CLASS_NAME,
    props: {
      requestUpdateSize: this._updateMinSizeStyle.bind(this)
    }
  });
};

/**
 *
 * @param {BaseComponent} child
 * @param index
 */
RelativeLayout.prototype.onAddChild = function (child, index) {
  var anchor = new _RelativeAnchor["default"](child);
  if (index === -1 || !this.domElt.childNodes[index]) {
    this.domElt.addChild(child.domElt);
  } else {
    this.domElt.addChildBefore(child.domElt, this.domElt.childNodes[index]);
  }
};

/**
 *
 * @param {BaseComponent} child
 */
RelativeLayout.prototype.onRemoveChild = function (child) {
  child.domElt.remove();
  child.anchor.destroy();
};

/**
 * @param {BaseComponent} child,
 * @param {Number} posX
 * @param {Number} posY
 */
RelativeLayout.prototype.addChildByPosition = function (child, posX, posY) {
  this.addChild(child);
  var width = this.style.getProperty('width', 'px');
  var height = this.style.getProperty('height', 'px');
  var cWidth = child.style.getProperty('width', 'px');
  var cHeight = child.style.getProperty('height', 'px');
  posX = Math.max(0, Math.min(width - cWidth, posX));
  posY = Math.max(0, Math.min(height - cHeight, posY));
  child.style.left = posX;
  child.style.top = posY;
  child.style.vAlign = 'top';
  this._updateMinSizeStyle();
};
RelativeLayout.prototype.onStart = function () {
  _BaseLayout["default"].prototype.onStart.apply(this);
  this._updateMinSizeStyle();
};
RelativeLayout.prototype.onResume = function () {
  _BaseLayout["default"].prototype.onResume.apply(this);
  this._updateMinSizeStyle();
};
RelativeLayout.prototype.measureMinSize = function () {
  if (!this.domElt) return {
    width: 0,
    height: 0
  };
  var prevBound = this.domElt.getBoundingClientRect();
  var bound = this.children.reduce(function (ac, child) {
    var cBound = _Rectangle["default"].fromClientRect(child.domElt.getBoundingClientRect());
    return ac.merge(cBound);
  }, new _Rectangle["default"](prevBound.left, prevBound.top, 0, 0));
  return {
    width: bound.width,
    height: bound.height
  };
};
RelativeLayout.prototype._updateMinSizeStyle = function () {
  var prevBound = this.domElt.getBoundingClientRect();
  var bound = this.children.reduce(function (ac, child) {
    var cBound = _Rectangle["default"].fromClientRect(child.domElt.getBoundingClientRect());
    if (cBound.width * cBound.height === 0) return ac;
    return ac.merge(cBound);
  }, new _Rectangle["default"](prevBound.left, prevBound.top, 0, 0));
  this.domElt.addStyle('--as-min-width', bound.width + 'px');
  this.domElt.addStyle('--as-min-height', bound.height + 'px');
  this.updateViewStyle();
  var newBound = this.domElt.getBoundingClientRect();
  if (newBound.width !== prevBound.width || newBound.height !== prevBound.height) _ResizeSystem["default"].updateUp(this.domElt.parentElement);
};
_Assembler.AssemblerInstance.addClass(RelativeLayout);
var _default = RelativeLayout;
exports["default"] = _default;

/***/ }),

/***/ 41465:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FViewable = _interopRequireDefault(__webpack_require__(23600));
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * AnchorBox only has on child node
 * @extends FViewable
 * @param {BaseComponent} childNode
 * @constructor
 */
function AnchorBox(childNode) {
  this.childNode = childNode;
  childNode.anchor = this;
  this.domElt = childNode.domElt;
  _FViewable["default"].call(this);
  /**
   * @type {BaseComponent}
   */

  this.childNode.style.loadAttributeHandlers(Object.assign({}, this.childNode.styleHandlers, this.compStyleHandlers));
}
(0, _inheritComponentClass["default"])(AnchorBox, _FViewable["default"]);
AnchorBox.prototype.compStyleHandlers = {};
AnchorBox.prototype.destroy = function () {
  this.childNode.style.unloadAttributeHandlers(Object.assign({}, this.childNode.styleHandlers, this.compStyleHandlers));
  this.childNode.anchor = null;
  this.childNode = null;
};
var _default = AnchorBox;
exports["default"] = _default;

/***/ }),

/***/ 91081:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _FViewable = _interopRequireDefault(__webpack_require__(23600));
var _LinearAnchor = _interopRequireDefault(__webpack_require__(49085));
__webpack_require__(58181);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _makeMapStyleHandler = _interopRequireDefault(__webpack_require__(43895));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/***
 * @extends LinearAnchor
 * @constructor
 */
function ChainAnchor() {
  _LinearAnchor["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(ChainAnchor, _LinearAnchor["default"]);
ChainAnchor.prototype.TOP_CLASS_NAME = 'as-chain-anchor-box';
ChainAnchor.prototype.V_ALIGN_CLASS_NAMES = {
  top: 'as-v-align-top',
  center: 'as-v-align-center',
  bottom: 'as-v-align-bottom'
};
ChainAnchor.prototype.V_ALIGN_ACCEPTS_VALUES = ['top', 'center', 'bottom'];
['left', 'right', 'top', 'bottom', 'width', 'height', 'vAlign', 'hidden'].forEach(function (name) {
  ChainAnchor.prototype.styleHandlers[name] = (0, _makeMapStyleHandler["default"])(name);
});
ChainAnchor.prototype.compStyleHandlers.vAlign = {
  set: function set(value) {
    var currentValue = arguments[arguments.length - 1].get();
    if (this.anchor.V_ALIGN_ACCEPTS_VALUES.indexOf(value) < 0) value = this.anchor.V_ALIGN_ACCEPTS_VALUES[0];
    if (this.anchor.V_ALIGN_CLASS_NAMES[currentValue]) {
      this.anchor.domElt.removeClass(this.anchor.V_ALIGN_CLASS_NAMES[currentValue]);
    }
    this.domElt.addClass(this.anchor.V_ALIGN_CLASS_NAMES[value]);
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'enum',
      values: this.anchor.V_ALIGN_ACCEPTS_VALUES,
      disabled: false,
      sign: 'ChainAnchor_VAlign',
      independence: true
    };
  }
};
ChainAnchor.prototype.render = function () {
  var layout = {
    "class": ['as-anchor-box', this.TOP_CLASS_NAME]
  };
  return _(layout);
};
var _default = ChainAnchor;
exports["default"] = _default;

/***/ }),

/***/ 88334:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(90062);
__webpack_require__(17067);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _makeMapStyleHandler = _interopRequireDefault(__webpack_require__(43895));
var _AnchorBox = _interopRequireDefault(__webpack_require__(41465));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/**
 * AnchorBox only has on child node
 * @extends AnchorBox
 * @constructor
 */
function GridAnchor(childNode) {
  _AnchorBox["default"].call(this, childNode);
}
(0, _inheritComponentClass["default"])(GridAnchor, _AnchorBox["default"]);
GridAnchor.prototype.compStyleHandlers = {};
['column', 'row'].forEach(function (name) {
  var cssKey = 'grid-' + name;
  GridAnchor.prototype.compStyleHandlers[name] = {
    set: function set(value, ref) {
      if (typeof value !== "string") value = '';
      value = value.trim();
      if (value) {
        this.domElt.addStyle(cssKey, value);
      } else {
        this.domElt.removeStyle(cssKey);
      }
      return value;
    },
    get: function get(ref) {
      return ref.get() || '';
    },
    revoked: function revoked() {
      this.domElt.removeStyle(cssKey);
    },
    descriptor: {
      type: 'text'
    }
  };
});
Object.keys(GridAnchor.prototype.compStyleHandlers).forEach(function (name) {
  GridAnchor.prototype.styleHandlers[name] = (0, _makeMapStyleHandler["default"])(name);
});
GridAnchor.prototype.destroy = function () {
  this.childNode.style.unloadAttributeHandlers(Object.assign({}, this.childNode.styleHandlers, this.compStyleHandlers));
  this.childNode.anchor = null;
  this.childNode = null;
};
Object.defineProperty(GridAnchor.prototype, 'view', {
  get: function get() {
    return this.domElt;
  }
});
var _default = GridAnchor;
exports["default"] = _default;

/***/ }),

/***/ 94243:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _FViewable = _interopRequireDefault(__webpack_require__(23600));
__webpack_require__(90062);
__webpack_require__(17067);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _makeMapStyleHandler = _interopRequireDefault(__webpack_require__(43895));
var _utils = __webpack_require__(16907);
var _AnchorBox = _interopRequireDefault(__webpack_require__(41465));
var _utils2 = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/**
 * AnchorBox only has on child node
 * @extends AnchorBox
 * @constructor
 */
function HyperAnchor(childNode) {
  _AnchorBox["default"].call(this, childNode);
}
(0, _inheritComponentClass["default"])(HyperAnchor, _AnchorBox["default"]);
HyperAnchor.prototype.V_ALIGN_VALUE = ['top', 'bottom', 'center', 'fixed'];
HyperAnchor.prototype.H_ALIGN_VALUE = ['left', 'right', 'center', 'fixed'];
HyperAnchor.prototype.H_ALIGN_CLASS_NAMES = {
  left: 'as-h-align-left',
  right: 'as-h-align-right',
  center: 'as-h-align-center',
  fixed: 'as-h-align-fixed'
};
HyperAnchor.prototype.V_ALIGN_CLASS_NAMES = {
  top: 'as-v-align-top',
  bottom: 'as-v-align-bottom',
  center: 'as-v-align-center',
  fixed: 'as-v-align-fixed'
};
HyperAnchor.prototype.compStyleHandlers = {};
HyperAnchor.prototype.compStyleHandlers.display = {
  set: function set(value, ref) {
    if (['block', 'inline-block', 'inline'].indexOf(value) < 0) value = this.constructor.prototype.style.display; //to default
    this.domElt.removeClass('as-display-' + ref.get()).addClass('as-display-' + value);
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'enum',
      hidden: !this.parent || this.parent.tag !== 'HyperLayout',
      values: ['block', 'inline-block', 'inline']
    };
  },
  "export": function _export(ref) {
    var value = ref.get() || undefined;
    if (['block', 'inline-block', 'inline'].indexOf(value) < 0) {
      value = undefined;
    }
    if (value === this.constructor.prototype.style.display) value = undefined;
    return value;
  }
};
HyperAnchor.prototype.compStyleHandlers.position = {
  set: function set(value, ref) {
    if (['static', 'relative', 'absolute'].indexOf(value) < 0) value = this.constructor.prototype.style.position; //to default
    this.domElt.removeClass('as-position-' + ref.get()).addClass('as-position-' + value);
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'enum',
      hidden: !this.parent || this.parent.tag !== 'HyperLayout',
      values: ['static', 'relative', 'absolute']
    };
  },
  "export": function _export(ref) {
    var value = ref.get() || undefined;
    if (['static', 'relative', 'absolute'].indexOf(value) < 0) {
      value = undefined;
    }
    if (value === this.constructor.prototype.style.position) value = undefined;
    return value;
  }
};
HyperAnchor.prototype.compStyleHandlers["float"] = {
  set: function set(value) {
    if (['none', 'left', 'right'].indexOf(value) < 0) value = 'none';
    switch (value) {
      case 'left':
        this.domElt.removeClass('as-float-right').addClass('as-float-left');
        break;
      case 'right':
        this.domElt.removeClass('as-float-left').addClass('as-float-right');
        break;
      default:
        this.domElt.removeClass('as-float-left').removeClass('as-float-right');
    }
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'LayoutAlign',
      values: ['none', 'left', 'right'],
      disabled: this.style.position === 'absolute',
      sign: 'HyperAnchor_float',
      dependency: ['position']
    };
  },
  "export": function _export(ref) {
    var value = ref.get();
    if (value === 'none') value = undefined;
    return value;
  }
};
HyperAnchor.prototype.compStyleHandlers.hAlign = {
  set: function set(value) {
    var anchor = this.anchor;
    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }
    var ref = args.pop();
    var needConvert = args.shift();
    var currentValue = ref.get();
    if (!anchor.H_ALIGN_VALUE.includes(value)) value = anchor.H_ALIGN_VALUE[0];
    if (needConvert) {
      switch (value) {
        case "right":
          this.style.width = this.style.getProperty('width');
          this.style.right = this.style.getProperty('right');
          break;
        case 'left':
          this.style.width = this.style.getProperty('width');
          this.style.left = this.style.getProperty('left');
          break;
        case 'fixed':
          this.style.left = this.style.getProperty('left');
          this.style.right = this.style.getProperty('right');
          break;
        case 'center':
          this.style.width = this.style.getProperty('width');
      }
    }
    this.domElt.removeClass(anchor.H_ALIGN_CLASS_NAMES[currentValue]);
    this.domElt.addClass(anchor.H_ALIGN_CLASS_NAMES[value]);
    ref.set(value);
    return value;
  },
  descriptor: function descriptor() {
    var position = this.style.position;
    return {
      type: 'LayoutAlign',
      values: position === 'absolute' ? ['left', 'right', 'center', 'fixed'] : ['left', 'right'],
      disabled: position === 'static',
      sign: 'HyperAnchorHAlign',
      dependency: ['position']
    };
  }
};
HyperAnchor.prototype.compStyleHandlers.vAlign = {
  set: function set(value) {
    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
      args[_key2 - 1] = arguments[_key2];
    }
    var ref = args.pop();
    var anchor = this.anchor;
    var currentValue = ref.get();
    var needConvert = args.shift();
    if (needConvert && this.style.position === 'absolute') {
      switch (value) {
        case "bottom":
          this.style.bottom = this.style.getProperty('bottom');
          this.style.height = this.style.getProperty('height');
          break;
        case 'top':
          this.style.top = this.style.getProperty('top');
          this.style.height = this.style.getProperty('height');
          break;
        case 'fixed':
          this.style.top = this.style.getProperty('top');
          this.style.bottom = this.style.getProperty('bottom');
          break;
        case 'center':
          this.style.height = this.style.getProperty('height');
      }
    }
    if (!anchor.V_ALIGN_VALUE.includes(value)) value = anchor.V_ALIGN_VALUE[0];
    this.domElt.removeClass(anchor.V_ALIGN_CLASS_NAMES[currentValue]);
    this.domElt.addClass(anchor.V_ALIGN_CLASS_NAMES[value]);
    ref.set(value);
    return value;
  },
  descriptor: function descriptor() {
    return {
      type: 'LayoutAlign',
      values: this.style.position === 'absolute' ? ['top', 'bottom', 'center', 'fixed'] : ['top', 'center', 'bottom'],
      // disabled: this.style.position === 'static',
      sign: 'HyperAnchorVAlign',
      dependency: ['position']
    };
  }
};
HyperAnchor.prototype.positionHandlers = {};
HyperAnchor.prototype.positionHandlers.left = {
  by: 'width',
  isDisabled: function isDisabled() {
    return this.style.position === 'static' || ['right', 'center'].indexOf(this.style.hAlign) >= 0;
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    var ms;
    switch (this.style.position) {
      case 'absolute':
        return bound.left - parentBound.left;
      case 'relative':
        if (this.style.hAlign === 'left') {
          ms = (0, _utils.parseMeasureValue)(this.domElt.getComputedStyleValue('left'));
          if (ms.unit === 'px') return ms;
          return 0;
        } else return 0;
      default:
        return 0;
    }
  },
  dependency: ['position', 'display', 'hAlign', 'right', 'width']
};
HyperAnchor.prototype.positionHandlers.right = {
  by: 'width',
  valueInPixel: function valueInPixel(parentBound, bound) {
    var ms;
    switch (this.style.position) {
      case 'absolute':
        return parentBound.right - bound.right;
      case 'relative':
        if (this.style.hAlign === 'right') {
          ms = (0, _utils.parseMeasureValue)(this.domElt.getComputedStyleValue('right'));
          if (ms.unit === 'px') return ms;
          return 0;
        } else return 0;
      default:
        return 0;
    }
  },
  isDisabled: function isDisabled() {
    return this.style.position === 'static' || ['left', 'center'].indexOf(this.style.hAlign) >= 0;
  },
  dependency: ['position', 'display', 'hAlign', 'left', 'width']
};
HyperAnchor.prototype.positionHandlers.width = {
  type: 'measureSize',
  by: 'width',
  hasAuto: true,
  isDisabled: function isDisabled() {},
  convertValue: function convertValue(value) {
    if (value === 'match_parent') value = '100%';
    return value;
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    return bound.width;
  },
  dependency: ['position', 'display', 'hAlign', 'left', 'right']
};
HyperAnchor.prototype.positionHandlers.top = {
  by: 'height',
  isDisabled: function isDisabled() {
    return this.style.position === 'static' || ['bottom', 'center'].indexOf(this.style.vAlign) >= 0;
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    var ms;
    switch (this.style.position) {
      case 'relative':
        if (this.style.vAlign === 'top') {
          ms = (0, _utils.parseMeasureValue)(this.domElt.getComputedStyleValue('top'));
          if (ms.unit === 'px') return ms;
        }
        return 0;
      case 'absolute':
        return bound.top - parentBound.top;
      default:
        return 0;
    }
  },
  dependency: ['position', 'display', 'vAlign', 'bottom', 'height']
};
HyperAnchor.prototype.positionHandlers.bottom = {
  by: 'height',
  isDisabled: function isDisabled() {
    return this.style.position === 'static' || ['top', 'center'].indexOf(this.style.vAlign) >= 0;
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    var ms;
    switch (this.style.position) {
      case 'relative':
        if (this.style.vAlign === 'bottom') {
          ms = (0, _utils.parseMeasureValue)(this.domElt.getComputedStyleValue('bottom'));
          if (ms.unit === 'px') return ms;
        }
        return 0;
      case 'absolute':
        return parentBound.bottom - bound.bottom;
      default:
        return 0;
    }
  },
  dependency: ['position', 'display', 'vAlign', 'top', 'height']
};
HyperAnchor.prototype.positionHandlers.height = {
  type: 'measureSize',
  by: 'height',
  hasAuto: true,
  isDisabled: function isDisabled() {},
  convertValue: function convertValue(value) {
    if (value === 'match_parent') value = '100%';
    return value;
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    return bound.height;
  },
  dependency: ['position', 'display', 'vAlign', 'top', 'bottom']
};
HyperAnchor.prototype.positionHandlers.marginLeft = {
  varName: 'margin-left',
  by: 'width',
  isDisabled: function isDisabled() {
    return this.style.position === 'absolute';
  },
  valueInPixel: function valueInPixel() {
    var value = this.domElt.getComputedStyleValue('margin-left');
    var ms = (0, _utils.parseMeasureValue)(value);
    if (!ms) return 0;
    return ms.value;
  }
};
HyperAnchor.prototype.positionHandlers.marginRight = {
  varName: 'margin-right',
  by: 'width',
  isDisabled: function isDisabled() {
    return this.style.position === 'absolute';
  },
  valueInPixel: function valueInPixel() {
    var value = this.domElt.getComputedStyleValue('margin-left');
    var ms = (0, _utils.parseMeasureValue)(value);
    if (!ms) return 0;
    return ms.value;
  }
};
HyperAnchor.prototype.positionHandlers.marginTop = {
  varName: 'margin-top',
  by: 'width',
  isDisabled: function isDisabled() {
    return this.style.position === 'absolute';
  },
  valueInPixel: function valueInPixel() {
    var value = this.domElt.getComputedStyleValue('margin-left');
    var ms = (0, _utils.parseMeasureValue)(value);
    if (!ms) return 0;
    return ms.value;
  }
};
HyperAnchor.prototype.positionHandlers.marginBottom = {
  varName: 'margin-bottom',
  by: 'width',
  isDisabled: function isDisabled() {
    return this.style.position === 'absolute';
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    var value = this.domElt.getComputedStyleValue('margin-left');
    var ms = (0, _utils.parseMeasureValue)(value);
    if (!ms) return 0;
    return ms.value;
  }
};
Object.keys(HyperAnchor.prototype.positionHandlers).forEach(function (key) {
  var handler = HyperAnchor.prototype.positionHandlers[key];
  HyperAnchor.prototype.compStyleHandlers[key] = {};
  HyperAnchor.prototype.compStyleHandlers[key].set = function (value) {
    for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
      args[_key3 - 1] = arguments[_key3];
    }
    var ref = args.pop(); //todo: handle position
    var unit = args.shift();
    var currentValue = ref.get();
    var currentMS = (0, _utils.parseMeasureValue)(currentValue) || {
      value: "auto",
      unit: null
    };
    value = this.implicitMeasureSizeValue(value, unit, handler.by, currentMS.unit);
    if (handler.convertValue) {
      value = handler.convertValue.call(this, value);
    }
    var styleValue = (0, _utils2.isRealNumber)(value) ? value + 'px' : value;
    if (styleValue === 'auto') {
      this.domElt.removeStyle('--as-' + (handler.varName || key));
      if (handler.hasAuto) {
        this.domElt.addClass('as-' + (handler.varName || key) + '-auto');
      }
    } else {
      if (handler.hasAuto) {
        this.domElt.removeClass('as-' + (handler.varName || key) + '-auto');
      }
      this.domElt.addStyle('--as-' + (handler.varName || key), styleValue);
    }
    ref.set(value);
    this.updateViewStyle();
    this.onSizeChange();
    return value;
  };
  HyperAnchor.prototype.compStyleHandlers[key].get = function () {
    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
      args[_key4] = arguments[_key4];
    }
    var ref = args.pop();
    var currentValue = ref.get();
    var currentMS = (0, _utils.parseMeasureValue)(currentValue) || {
      value: "auto",
      unit: null
    };
    var unit = args.shift(); //want to get
    var disabled = handler.isDisabled.call(this);
    if (disabled && !unit) {
      unit = currentMS.unit || 'px';
    }
    var bound, parentBound;
    if (unit === 'px') {
      if (disabled || currentMS.unit !== 'px') {
        bound = this.domElt.getBoundingClientRect();
        parentBound = this.parent.domElt.getBoundingClientRect();
        return handler.valueInPixel.call(this, parentBound, bound);
      } else {
        return currentMS.value;
      }
    } else if (unit === '%') {
      if (currentMS.unit !== '%' || disabled) {
        bound = this.domElt.getBoundingClientRect();
        parentBound = this.parent.domElt.getBoundingClientRect();
        return handler.valueInPixel.call(this, parentBound, bound) * 100 / parentBound[handler.by];
      } else {
        return currentMS.value;
      }
    }
    return currentValue;
  };
  HyperAnchor.prototype.compStyleHandlers[key].descriptor = function () {
    return {
      type: handler.type || 'measurePosition',
      min: -Infinity,
      max: Infinity,
      disabled: handler.isDisabled.call(this),
      livePreview: true,
      dependency: handler.dependency
    };
  };
  HyperAnchor.prototype.compStyleHandlers[key]["export"] = function (ref) {
    var value = ref.get();
    if (handler.isDisabled.call(this)) value = undefined;
    if (value === this.constructor.prototype.style[key]) value = undefined;
    return value;
  };
});
Object.keys(HyperAnchor.prototype.compStyleHandlers).forEach(function (name) {
  HyperAnchor.prototype.styleHandlers[name] = (0, _makeMapStyleHandler["default"])(name);
});
HyperAnchor.prototype.destroy = function () {
  var _this = this;
  Object.keys(this.H_ALIGN_CLASS_NAMES).forEach(function (value) {
    _this.childNode.domElt.removeClass(_this.H_ALIGN_CLASS_NAMES[value]);
  });
  Object.keys(this.V_ALIGN_CLASS_NAMES).forEach(function (value) {
    _this.childNode.domElt.removeClass(_this.V_ALIGN_CLASS_NAMES[value]);
  });
  this.childNode.style.unloadAttributeHandlers(Object.assign({}, this.childNode.styleHandlers, this.compStyleHandlers));
  this.childNode.anchor = null;
  this.childNode = null;
};
Object.defineProperty(HyperAnchor.prototype, 'view', {
  get: function get() {
    return this.domElt;
  }
});
var _default = HyperAnchor;
exports["default"] = _default;

/***/ }),

/***/ 49085:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _FViewable = _interopRequireDefault(__webpack_require__(23600));
__webpack_require__(70332);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _makeMapStyleHandler = _interopRequireDefault(__webpack_require__(43895));
var _utils = __webpack_require__(16907);
var _AnchorBox = _interopRequireDefault(__webpack_require__(41465));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/**
 * AnchorBox only has one child node
 * @extends AnchorBox
 */
function LinearAnchor() {
  _AnchorBox["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(LinearAnchor, _AnchorBox["default"]);
LinearAnchor.prototype.TOP_CLASS_NAME = 'as-linear-anchor-box';
LinearAnchor.prototype.onCreate = function () {/* NOOP */
};
LinearAnchor.prototype.compStyleHandlers = {};
LinearAnchor.prototype.compStyleHandlers.height = {
  /***
   * @this BaseComponent
   * @param value
   * @returns {string}
   */
  set: function set(value) {
    var anchor = this.anchor;
    var ref = arguments[arguments.length - 1];
    var currentValue = ref.get();
    var unit = arguments.length > 2 ? arguments[1] : undefined;
    var current = (0, _utils.parseMeasureValue)(currentValue) || {
      value: 'auto',
      unit: null
    };
    value = this.implicitMeasureSizeValue(value, unit, "height", current.unit);
    var styleValue;
    if (value === 'auto') {
      this.domElt.addClass('as-height-auto');
    } else {
      this.domElt.removeClass('as-height-auto');
      styleValue = value >= 0 ? value + 'px' : value;
      if (styleValue === 'match_parent') styleValue = '100%';
      this.domElt.addStyle('--as-height', styleValue);
    }
    ref.set(value);
    this.onSizeChange();
    return value;
  },
  /***
   * @this BaseComponent
   *
   * */
  get: function get() {
    var unit = arguments.length > 1 ? arguments[0] : undefined;
    var ref = arguments[arguments.length - 1];
    var value = ref.get();
    var bound, parentBound;
    if (unit === 'px') {
      if (value !== 'number') {
        bound = this.domElt.getBoundingClientRect();
        return bound.height;
      } else {
        return value;
      }
    } else if (unit === '%') {
      if (typeof value === 'string' && value.match(/%$/)) return parseFloat(value.replace('%', ''));else {
        bound = this.domElt.getBoundingClientRect();
        parentBound = this.parent.domElt.getBoundingClientRect();
        return bound.height * 100 / parentBound.height;
      }
    } else return value;
  },
  descriptor: {
    type: 'measureSize',
    sign: 'LinearHeight',
    independence: true
  }
};
LinearAnchor.prototype.compStyleHandlers.width = {
  /***
   * @this BaseComponent
   * @param value
   * @returns {*}
   */
  set: function set(value) {
    var ref = arguments[arguments.length - 1];
    var unit = arguments.length > 2 ? arguments[1] : undefined;
    var currentValue = ref.get();
    var current = (0, _utils.parseMeasureValue)(currentValue) || {
      value: 'auto',
      unit: null
    };
    value = this.implicitMeasureSizeValue(value, unit, 'width', current.unit);
    var styleValue;
    if (value === 'auto') {
      this.domElt.addClass('as-width-auto');
    } else {
      this.domElt.removeClass('as-width-auto');
      styleValue = value >= 0 ? value + 'px' : value;
      if (styleValue === 'match_parent') styleValue = '100%';
      this.domElt.addStyle('--as-width', styleValue);
    }
    ref.set(value);
    this.onSizeChange();
    return value;
  },
  get: function get() {
    var unit = arguments.length > 1 ? arguments[0] : undefined;
    var ref = arguments[arguments.length - 1];
    var value = ref.get();
    var bound, parentBound;
    if (unit === 'px') {
      if (value !== 'number') {
        bound = this.domElt.getBoundingClientRect();
        return bound.width;
      } else {
        return value;
      }
    } else if (unit === '%') {
      if (typeof value === 'string' && value.match(/%$/)) return parseFloat(value.replace('%', ''));else {
        bound = this.domElt.getBoundingClientRect();
        parentBound = this.parent.domElt.getBoundingClientRect();
        return bound.width * 100 / parentBound.width;
      }
    } else return value;
  },
  descriptor: {
    type: 'measureSize',
    sign: 'LinearWidth',
    independence: true
  }
};
LinearAnchor.prototype.compStyleHandlers.hidden = {
  set: function set(value) {
    value = !!value;
    if (value) this.anchor.domElt.addClass('as-display-hidden');else this.anchor.domElt.removeClass('as-display-hidden');
    this.domElt.removeClass('as-display-hidden');
    return value;
  },
  descriptor: {
    type: 'bool',
    sign: 'hidden'
  }
};
['left', 'right', 'top', 'bottom', 'width', 'height', 'hidden'].forEach(function (name) {
  LinearAnchor.prototype.styleHandlers[name] = (0, _makeMapStyleHandler["default"])(name);
});
['left', 'right', 'top', 'bottom'].forEach(function (name) {
  LinearAnchor.prototype.compStyleHandlers[name] = {
    /***
     * @this BaseComponent
     * @param value
     * @returns {string|number}
     */
    set: function set(value) {
      var ref = arguments[arguments.length - 1];
      var unit = arguments.length > 2 ? arguments[1] : undefined;
      var currentValue = ref.get();
      var current = (0, _utils.parseMeasureValue)(currentValue) || {
        value: 'auto',
        unit: null
      };
      value = this.implicitMeasureSizeValue(value, unit, "width", current.unit);
      var styleValue = typeof value === "number" ? value + 'px' : value;
      this.domElt.addStyle('margin-' + name, styleValue);
      return value;
    },
    /**
     * @this BaseComponent
     * @returns {number|*}
     */
    get: function get() {
      var unit = arguments.length > 1 ? arguments[0] : undefined;
      var ref = arguments[arguments.length - 1];
      var value = ref.get();
      var styleValue;
      if (unit === 'px') {
        styleValue = this.domElt.getComputedStyleValue('margin-' + name);
        return parseFloat(styleValue.replace('px', '')) || 0;
      }
      return this.explicitMeasureSizeValue(value, unit, "width");
    },
    "export": function _export(ref) {
      var value = ref.get();
      if (value === 0 || value === '0%') return undefined;
      return value;
    },
    descriptor: {
      type: 'measurePosition',
      min: -Infinity,
      max: Infinity,
      dependency: ['width'],
      sign: 'Linear' + name.substr(0, 1).toUpperCase() + name.substr(1),
      independence: true
    }
  };
});
LinearAnchor.prototype.render = function () {
  var layout = {
    "class": ['as-anchor-box', this.TOP_CLASS_NAME]
  };
  return _(layout);
};

/**
 * @param {BaseComponent} child
 */
/*
LinearAnchor.prototype.attachChild = function (child) {
    if (this.childNode) {
        this.childNode.view.remove();
        this.childNode = null;
        this.childNode.anchor = null;
    }

    if (child.anchor) throw new Error("Detach anchorBox first");
    this.childNode = child;
    child.anchor = this;
    this.childNode.style.width = this.childNode.style.width || 0;
    this.childNode.style.height = this.childNode.style.height || 0;
    this.childNode.style.left = this.childNode.style.left || 0;
    this.childNode.style.right = this.childNode.style.right || 0;
    this.childNode.style.top = this.childNode.style.top || 0;
    this.childNode.style.bottom = this.childNode.style.bottom || 0;
    this.style.left = this.childNode.style.left;
    this.style.right = this.childNode.style.right;
    this.style.top = this.childNode.style.top;
    this.style.bottom = this.childNode.style.bottom;

    this.domElt.addChild(child.view);
    this.view.attr('data-anchor-of', child.tag);
    this.style.loadAttributeHandlers(this.styleHandlers);
    child.style.loadAttributeHandlers(Object.assign({}, child.styleHandlers, this.compStyleHandlers));
    child.onAnchorAttached();
};
LinearAnchor.prototype.detachChild = function () {
    if (this.childNode) {
        this.childNode.view.remove();

        this.style.unloadAttributeHandlers(this.styleHandlers);
        this.childNode.style.unloadAttributeHandlers(Object.assign({}, this.childNode.styleHandlers, this.compStyleHandlers));

        this.childNode.onAnchorDetached();
        this.childNode.anchor = null;
        this.childNode = null;
    }
    else
        throw new Error("Nothing to detach");
};
*/

Object.defineProperty(LinearAnchor.prototype, 'view', {
  get: function get() {
    return this.domElt;
  }
});
var _default = LinearAnchor;
exports["default"] = _default;

/***/ }),

/***/ 58493:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireDefault(__webpack_require__(51518));
__webpack_require__(90062);
__webpack_require__(17067);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
var _makeMapStyleHandler = _interopRequireDefault(__webpack_require__(43895));
var _utils = __webpack_require__(16907);
var _utils2 = __webpack_require__(84512);
var _AnchorBox = _interopRequireDefault(__webpack_require__(41465));
var _HyperAnchor = _interopRequireDefault(__webpack_require__(94243));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/**
 * AnchorBox only has on child node
 * @extends FViewable
 * @constructor
 */
function RelativeAnchor(childNode) {
  _AnchorBox["default"].apply(this, arguments);
}
(0, _inheritComponentClass["default"])(RelativeAnchor, _AnchorBox["default"]);
RelativeAnchor.prototype.V_ALIGN_VALUE = _HyperAnchor["default"].prototype.V_ALIGN_VALUE;
RelativeAnchor.prototype.H_ALIGN_VALUE = _HyperAnchor["default"].prototype.H_ALIGN_VALUE;
RelativeAnchor.prototype.H_ALIGN_CLASS_NAMES = {
  left: 'as-h-align-left',
  right: 'as-h-align-right',
  center: 'as-h-align-center',
  fixed: 'as-h-align-fixed'
};
RelativeAnchor.prototype.V_ALIGN_CLASS_NAMES = {
  top: 'as-v-align-top',
  bottom: 'as-v-align-bottom',
  center: 'as-v-align-center',
  fixed: 'as-v-align-fixed'
};
RelativeAnchor.prototype.compStyleHandlers = {};
RelativeAnchor.prototype.compStyleHandlers.hAlign = {
  set: function set(value) {
    var anchor = this.anchor;
    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }
    var ref = args.pop();
    var needConvert = args.shift();
    var currentValue = ref.get();
    if (!anchor.H_ALIGN_VALUE.includes(value)) value = anchor.H_ALIGN_VALUE[0];
    if (needConvert) {
      switch (value) {
        case "right":
          this.style.right = this.style.getProperty('right');
          break;
        case 'left':
          this.style.left = this.style.getProperty('left');
          break;
        case 'fixed':
          this.style.left = this.style.getProperty('left');
          this.style.right = this.style.getProperty('right');
          break;
        case 'center':
          this.style.width = this.style.getProperty('width');
      }
    }
    this.domElt.removeClass(anchor.H_ALIGN_CLASS_NAMES[currentValue]);
    this.domElt.addClass(anchor.H_ALIGN_CLASS_NAMES[value]);
    ref.set(value);
    return value;
  },
  descriptor: {
    type: 'LayoutAlign',
    values: ['left', 'right', 'center', 'fixed'],
    disabled: false,
    sign: 'RelativeAnchor_HAlign'
  }
};
RelativeAnchor.prototype.compStyleHandlers.vAlign = {
  set: function set(value) {
    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
      args[_key2 - 1] = arguments[_key2];
    }
    var ref = args.pop();
    var anchor = this.anchor;
    var currentValue = ref.get();
    var needConvert = args.shift();
    if (needConvert) {
      switch (value) {
        case "bottom":
          this.style.right = this.style.getProperty('bottom');
          break;
        case 'top':
          this.style.left = this.style.getProperty('top');
          break;
        case 'fixed':
          this.style.left = this.style.getProperty('top');
          this.style.right = this.style.getProperty('bottom');
          break;
        case 'center':
          this.style.width = this.style.getProperty('height');
      }
    }
    if (!anchor.V_ALIGN_VALUE.includes(value)) value = anchor.V_ALIGN_VALUE[0];
    this.domElt.removeClass(anchor.V_ALIGN_CLASS_NAMES[currentValue]);
    this.domElt.addClass(anchor.V_ALIGN_CLASS_NAMES[value]);
    ref.set(value);
    return value;
  },
  descriptor: {
    type: 'LayoutAlign',
    values: ['top', 'bottom', 'center', 'fixed'],
    disabled: false,
    sign: 'RelativeAnchor_VAlign'
  }
};
RelativeAnchor.prototype.positionHandlers = {};
RelativeAnchor.prototype.positionHandlers.left = {
  by: 'width',
  isDisabled: function isDisabled() {
    return this.style.hAlign === 'center' || this.style.hAlign === 'right';
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    return bound.left - parentBound.left;
  },
  dependency: ['hAlign', 'right', 'width']
};
RelativeAnchor.prototype.positionHandlers.right = {
  by: 'width',
  isDisabled: function isDisabled() {
    return this.style.hAlign === 'center' || this.style.hAlign === 'left';
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    return parentBound.right - bound.right;
  },
  dependency: ['hAlign', 'left', 'width']
};
RelativeAnchor.prototype.positionHandlers.width = {
  type: 'measureSize',
  by: 'width',
  hasAuto: true,
  convertValue: function convertValue(value) {
    if (value === 'match_parent') value = '100%';
    return value;
  },
  isDisabled: function isDisabled() {
    return this.style.hAlign === 'fixed';
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    return bound.width;
  },
  dependency: ['hAlign', 'left', 'right']
};
RelativeAnchor.prototype.positionHandlers.top = {
  by: 'width',
  isDisabled: function isDisabled() {
    return this.style.vAlign === 'center' || this.style.vAlign === 'bottom';
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    return bound.top - parentBound.top;
  },
  dependency: ['vAlign', 'bottom', 'height']
};
RelativeAnchor.prototype.positionHandlers.bottom = {
  by: 'height',
  isDisabled: function isDisabled() {
    return this.style.vAlign === 'center' || this.style.vAlign === 'top';
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    return parentBound.bottom - bound.bottom;
  },
  dependency: ['hAlign', 'top', 'height']
};
RelativeAnchor.prototype.positionHandlers.height = {
  type: 'measureSize',
  by: 'height',
  hasAuto: true,
  convertValue: function convertValue(value) {
    if (value === 'match_parent') value = '100%';
    return value;
  },
  isDisabled: function isDisabled() {
    return this.style.vAlign === 'fixed';
  },
  valueInPixel: function valueInPixel(parentBound, bound) {
    return bound.height;
  },
  dependency: ['vAlign', 'top', 'bottom']
};
Object.keys(RelativeAnchor.prototype.positionHandlers).forEach(function (key) {
  var handler = RelativeAnchor.prototype.positionHandlers[key];
  RelativeAnchor.prototype.compStyleHandlers[key] = {};
  RelativeAnchor.prototype.compStyleHandlers[key].set = function (value) {
    for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
      args[_key3 - 1] = arguments[_key3];
    }
    var ref = args.pop();
    var unit = args.shift();
    var currentValue = ref.get();
    var currentMS = (0, _utils.parseMeasureValue)(currentValue) || {
      value: "auto",
      unit: null
    };
    value = this.implicitMeasureSizeValue(value, unit, handler.by, currentMS.unit);
    if (handler.convertValue) {
      value = handler.convertValue.call(this, value);
    }
    var styleValue = (0, _utils2.isRealNumber)(value) ? value + 'px' : value;
    if (styleValue === 'auto') {
      this.domElt.removeStyle('--as-' + key);
      if (handler.hasAuto) {
        this.domElt.addClass('as-' + key + '-auto');
      }
    } else {
      this.domElt.addStyle('--as-' + key, styleValue);
    }
    ref.set(value);
    this.updateViewStyle();
    this.onSizeChange();
    return value;
  };
  RelativeAnchor.prototype.compStyleHandlers[key].get = function () {
    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
      args[_key4] = arguments[_key4];
    }
    var ref = args.pop();
    var currentValue = ref.get();
    var currentMS = (0, _utils.parseMeasureValue)(currentValue) || {
      value: "auto",
      unit: null
    };
    var unit = args.shift(); //want to get
    if (!unit) return currentValue;
    var disabled = handler.isDisabled.call(this);
    if (disabled && !unit) {
      unit = currentMS.unit || 'px';
    }
    var bound, parentBound;
    if (unit === 'px') {
      if (disabled || currentMS.unit !== 'px') {
        bound = this.domElt.getBoundingClientRect();
        parentBound = this.domElt.parentElement.getBoundingClientRect();
        return handler.valueInPixel.call(this, parentBound, bound);
      } else {
        return currentMS.value;
      }
    } else if (unit === '%') {
      if (currentMS.unit !== '%' || disabled) {
        bound = this.domElt.getBoundingClientRect();
        parentBound = this.domElt.parentElement.getBoundingClientRect();
        return handler.valueInPixel.call(this, parentBound, bound) * 100 / parentBound[handler.by];
      } else {
        return currentMS.value;
      }
    }
    return currentValue;
  };
  RelativeAnchor.prototype.compStyleHandlers[key].descriptor = function () {
    return {
      type: handler.type || 'measurePosition',
      min: -Infinity,
      max: Infinity,
      disabled: handler.isDisabled.call(this),
      livePreview: true,
      dependency: handler.dependency
    };
  };
  RelativeAnchor.prototype.compStyleHandlers[key]["export"] = function (ref) {
    var value = ref.get();
    if (handler.isDisabled.call(this)) value = undefined;
    if (value === this.constructor.prototype.style[key]) value = undefined;
    return value;
  };
});
Object.keys(RelativeAnchor.prototype.compStyleHandlers).forEach(function (name) {
  RelativeAnchor.prototype.styleHandlers[name] = (0, _makeMapStyleHandler["default"])(name);
});
RelativeAnchor.prototype.destroy = function () {
  var _this = this;
  Object.keys(this.H_ALIGN_CLASS_NAMES).forEach(function (value) {
    _this.childNode.domElt.removeClass(_this.H_ALIGN_CLASS_NAMES[value]);
  });
  Object.keys(this.V_ALIGN_CLASS_NAMES).forEach(function (value) {
    _this.childNode.domElt.removeClass(_this.V_ALIGN_CLASS_NAMES[value]);
  });
  this.childNode.style.unloadAttributeHandlers(Object.assign({}, this.childNode.styleHandlers, this.compStyleHandlers));
  this.childNode.anchor = null;
  this.childNode = null;
};
var _default = RelativeAnchor;
exports["default"] = _default;

/***/ }),

/***/ 43895:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = makeMapStyleHandler;
/**
 * map from component to anchor
 * @param {string} name
 * @returns {{descriptor: function, set: set, get: (function(): *)}}
 */
function makeMapStyleHandler(name) {
  return {
    set: function set(value) {
      this.childNode.style[name] = value;
    },
    get: function get() {
      return this.childNode.style[name];
    },
    descriptor: function descriptor() {
      return this.childNode.style.getPropertyDescriptor(name);
    }
  };
}

/***/ }),

/***/ 21882:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.PFDEBFail = PFDEBFail;
exports.PFDEBProcess = PFDEBProcess;
exports.PFDEBStart = PFDEBStart;
exports.PFDEBSubProcedure = PFDEBSubProcedure;
exports.PFDEBSuccess = PFDEBSuccess;
exports.beautifyCurve = beautifyCurve;
exports.beautifyPFDEline = beautifyPFDEline;
exports.curveConnectCost = curveConnectCost;
exports.directoryOfVec2 = directoryOfVec2;
exports.directoryOutFromRect = directoryOutFromRect;
exports.pfdeDirs = void 0;
var _FCore = __webpack_require__(51518);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
__webpack_require__(92380);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _utils = __webpack_require__(84512);
var _stringGenerate = __webpack_require__(10713);
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Polyline = _interopRequireDefault(__webpack_require__(67161));
var _SegmentLine = _interopRequireDefault(__webpack_require__(86767));
var _NumRange = _interopRequireDefault(__webpack_require__(96667));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var pfdeDirs = [new _Vec["default"](1, 0), new _Vec["default"](0, 1), new _Vec["default"](-1, 0), new _Vec["default"](0, -1), new _Vec["default"](1, 1), new _Vec["default"](-1, 1), new _Vec["default"](-1, -1), new _Vec["default"](1, -1)];

/**
 *
 * @param {Vec2} v
 * @returns
 */
exports.pfdeDirs = pfdeDirs;
function directoryOfVec2(v) {
  var res = {
    idx: 0
  };
  var max = -Infinity;
  for (var i = 0; i < pfdeDirs.length; ++i) {
    var t = v.dot(pfdeDirs[i]);
    if (t > max) {
      max = t;
      res.idx = i;
    }
  }
  res.dir = pfdeDirs[res.idx];
  res.angle = res.dir.direction();
  return res;
}

/**
 *
 * @param {Vec2} A
 * @param {Vec2} B
 * @param {Vec2} C
 * @param {Vec2} D
 * @returns {boolean}
 */
function isCross(A, B, C, D) {
  var t1 = C.sub(D).cross(D.sub(A));
  var t2 = C.sub(D).cross(D.sub(B));
  if (t1 * t2 >= 0) return false;
  var t3 = A.sub(B).cross(B.sub(C));
  var t4 = A.sub(B).cross(B.sub(D));
  if (t3 * t4 >= 0) return false;
  return true;
}

/**
 *
 *      dir
 *                3
 *       2                      0
 *                 1
 *
 * @param {Rectangle} rect
 * @param {Vec2} point
 * @returns {{pos: Vec2, dir: Vec2, dirIdx: number, angle: number}}
 */
function directoryOutFromRect(rect, point) {
  var Ps = [rect.B(), rect.C(), rect.D(), rect.A(), rect.B()];
  var O = rect.centerPoint();
  for (var i = 0; i < 4; ++i) {
    if (isCross(Ps[i], Ps[i + 1], O, point)) {
      return {
        pos: Ps[i].add(Ps[i + 1].sub(Ps[i]).mult(0.5)),
        dir: pfdeDirs[i],
        dirIdx: i,
        angle: point.sub(O).direction()
      };
    }
  }
  return {
    pos: Ps[1].add(Ps[2 + 1].sub(Ps[i]).mult(0.5)),
    dir: pfdeDirs[1],
    dirIdx: i,
    angle: 0
  };
}

/**
 * //50 is control vector length
 * @param {Vec2} p1
 * @param {Vec2} ctrl1
 * @param {Vec2} ctrl2
 * @param {Vec2} p2
 */
function curveConnectCost(p1, ctrl1, ctrl2, p2) {
  var points = [p1, ctrl1, ctrl2, p2];
  var sign = 0;
  var v0, v1;
  var isCross = false;
  for (var i = 0; i < points.length && !isCross; ++i) {
    v0 = points[i].sub(points[(i + 1) % points.length]);
    v1 = points[(i + 1) % points.length].sub(points[(i + 2) % points.length]);
    if (sign === 0) {
      sign = v0.cross(v1);
    } else {
      if (sign * v0.cross(v1) < 0) {
        isCross = true;
      }
    }
  }
  var dist = p2.sub(p1).abs();
  var ctrLength = ctrl2.sub(ctrl1).abs();
  var v1Length = ctrl1.sub(p1).abs();
  var v2Length = p2.sub(ctrl2).abs();
  if (isCross) {
    //not an arc
    if (dist < ctrLength) {
      return 1e6; //bad case
    } else if (v1Length * v1Length + v2Length * v2Length > ctrLength * ctrLength) {
      return 1e3; //bad case
    } else {
      return 6;
    }
  } else {
    if (ctrl1.dot(ctrl2) > 0) {
      return 5;
    } else if (Math.abs(ctrl1.dot(ctrl2)) < 0.001) {
      return 2;
    } else return 1;
  }
}

/**
 * @param {Vec2} start
 * @param {Vec2} startDir
 * @param {Vec2} end
 * @param {Vec2} endDir
 * @param {Vec2[]} interPoints
 * @returns {number[]}
 */
function beautifyCurve(start, startDir, end, endDir, interPoints) {
  var Q = {};
  Q['-1'] = [{
    val: Infinity,
    prev: 0
  }, {
    val: Infinity,
    prev: 0
  }, {
    val: Infinity,
    prev: 0
  }, {
    val: Infinity,
    prev: 0
  }];
  Q['-1'][startDir].val = 0;
  var point, i, d1, d2;
  var prevPoint = start;
  var ctrl1, ctrl2;
  var cost;
  for (i = 0; i < interPoints.length; ++i) {
    Q[i] = [{
      val: Infinity,
      prev: 0
    }, {
      val: Infinity,
      prev: 0
    }, {
      val: Infinity,
      prev: 0
    }, {
      val: Infinity,
      prev: 0
    }];
    point = interPoints[i];
    for (d1 = 0; d1 < 4; ++d1) {
      ctrl1 = prevPoint.add(pfdeDirs[d1].mult(50));
      for (d2 = 0; d2 < 4; ++d2) {
        ctrl2 = point.add(pfdeDirs[(d2 + 2) % 4].mult(50));
        cost = curveConnectCost(prevPoint, ctrl1, ctrl2, point);
        if (Q[i][d2].val > Q[i - 1][d1].val + cost) {
          Q[i][d2].val = Q[i - 1][d1].val + cost;
          Q[i][d2].prevDir = d1;
        }
      }
    }
    prevPoint = point;
  }
  point = end;
  Q[interPoints.length] = [{
    val: Infinity,
    prev: 0
  }, {
    val: Infinity,
    prev: 0
  }, {
    val: Infinity,
    prev: 0
  }, {
    val: Infinity,
    prev: 0
  }];
  d2 = (endDir + 2) % 4;
  for (d1 = 0; d1 < 4; ++d1) {
    ctrl1 = prevPoint.add(pfdeDirs[d1].mult(50));
    ctrl2 = point.add(pfdeDirs[(d2 + 2) % 4].mult(50));
    cost = curveConnectCost(prevPoint, ctrl1, ctrl2, point);
    if (Q[interPoints.length][d2].val > Q[interPoints.length - 1][d1].val + cost) {
      Q[interPoints.length][d2].val = Q[interPoints.length - 1][d1].val + cost;
      Q[interPoints.length][d2].prevDir = d1;
    }
  }
  var res = [];
  var dir = d2;
  for (i = interPoints.length; i >= 0; --i) {
    res.unshift(Q[i][dir].prevDir);
    dir = Q[i][dir].prevDir;
  }
  return res;
  //todo: trace back
}

function invDirIdx(idx) {
  if (idx < 4) {
    idx = (idx + 2) % 4;
  } else {
    idx = (idx - 2) % 4 + 4;
  }
  return idx;
}

/**
 *
 * @param {Rectangle} rect
 * @param {Vec2} point
 */
function dir8IdxFromRect2Point(rect, point, inv) {
  var dir = new _Vec["default"](0, 0);
  if (point.x < rect.x) dir.x = -1;else if (point.x > rect.x + rect.width) dir.x = 1;
  if (point.y < rect.y) dir.y = -1;else if (point.y > rect.y + rect.height) dir.y = 1;
  var res = -1;
  for (var i = 0; i < pfdeDirs.length; ++i) {
    if (dir.equals(pfdeDirs[i])) {
      res = i;
      break;
    }
  }
  if (res >= 0 && inv) {
    res = invDirIdx(res);
  }
  return res;
}

/**
 *
 * @param {Rectangle} startRect
 * @param {Vec2[]} interPoints - length > 0
 * @param {Rectangle}endRect
 * @return {Polyline[]}
 */
function beautifyPFDElineWithInterPoints(startRect, interPoints, endRect) {
  var vtRects = [startRect.clone()];
  var i, j;
  for (i = 0; i < interPoints.length; ++i) {
    vtRects.push(new _Rectangle["default"](interPoints[i].x - 0.1, interPoints[i].y - 0.1, 0.2, 0.2));
  }
  vtRects.push(endRect.clone());
  var Q = Array(vtRects.length);
  var prevDir, cost;
  Q[0] = Array(4).fill(0).map(function (u, j) {
    return {
      cost: 0,
      idx: 0,
      dir: j
    };
  });
  var dir, dirList, relativeDir;
  for (i = 1; i < vtRects.length; ++i) {
    Q[i] = Array(4).fill(0).map(function (u, j) {
      return {
        cost: Infinity,
        idx: i,
        dir: j
      };
    });
    if (i === vtRects.length - 1) {
      relativeDir = dir8IdxFromRect2Point(vtRects[i], interPoints[i - 2], true);
    } else {
      relativeDir = dir8IdxFromRect2Point(vtRects[i - 1], interPoints[i - 1], false);
    }
    if (relativeDir < 4) {
      dirList = [relativeDir];
    } else {
      dirList = [relativeDir - 4, (relativeDir - 3) % 4];
    }
    for (j = 0; j < dirList.length; ++j) {
      dir = dirList[j];
      for (prevDir = 0; prevDir < 4; ++prevDir) {
        cost = Q[i - 1][prevDir].cost;
        if (relativeDir < 4) {
          if (prevDir !== dir) {
            cost += 1e3;
          }
        } else {
          if (pfdeDirs[prevDir].add(pfdeDirs[dir]).equals(pfdeDirs[relativeDir])) {
            cost += 1;
          } else {
            cost += 1e3;
          }
        }
        if (Q[i][dir].cost > cost) {
          Q[i][dir].cost = cost;
          Q[i][dir].prevDir = prevDir;
          Q[i][dir].prevIdx = i - 1;
        }
      }
    }
    for (prevDir = 0; prevDir < 4; ++prevDir) {
      for (dir = 0; dir < 4; ++dir) {
        if (dir === prevDir) continue;
        if (Q[i][prevDir].prevIdx === i) continue;
        cost = Q[i][prevDir].cost;
        if (invDirIdx(dir) === prevDir) {
          cost += 1e3;
        } else cost += 1; //rotate 90 degree
        if (cost < Q[i][dir].cost) {
          Q[i][dir].cost = cost;
          Q[i][dir].prevDir = prevDir;
          Q[i][dir].prevIdx = i;
        }
      }
    }
  }
  var minCost = Infinity;
  for (i = 0; i < 4; ++i) {
    if (Q[vtRects.length - 1][i].cost < minCost) {
      minCost = Q[vtRects.length - 1][i].cost;
      dir = i;
    }
  }
  i = vtRects.length - 1;
  var res = [];
  var cur = Q[i][dir];
  var plLinePoints;
  var rectPoints, sPoint, hPoint, smt, ePoint;
  while (cur) {
    plLinePoints = null;
    if (cur.idx === vtRects.length - 1) {
      sPoint = interPoints[cur.idx - 2];
      plLinePoints = [sPoint];
      rectPoints = [endRect.D(), endRect.A(), endRect.B(), endRect.C(), endRect.D()];
      smt = new _SegmentLine["default"](rectPoints[cur.dir], rectPoints[cur.dir + 1]);
      if (cur.prevDir === cur.dir) {
        ePoint = smt.orthogonalProjectionPoint(sPoint);
        plLinePoints.push(ePoint);
      } else {
        ePoint = smt.midpoint();
        smt = new _SegmentLine["default"](sPoint, sPoint.add(pfdeDirs[cur.prevDir]));
        hPoint = smt.orthogonalProjectionPoint(ePoint);
        plLinePoints.push(hPoint);
        plLinePoints.push(ePoint);
      }
    } else if (cur.idx !== cur.prevIdx && cur.idx > 1) {
      sPoint = interPoints[cur.idx - 2];
      ePoint = interPoints[cur.idx - 1];
      plLinePoints = [sPoint];
      if (cur.prevDir !== cur.dir) {
        smt = new _SegmentLine["default"](sPoint, sPoint.add(pfdeDirs[cur.prevDir]));
        hPoint = smt.orthogonalProjectionPoint(ePoint);
        plLinePoints.push(hPoint);
      }
      plLinePoints.push(ePoint);
    } else if (cur.idx !== cur.prevIdx && cur.idx === 1) {
      ePoint = interPoints[0];
      plLinePoints = [ePoint];
      rectPoints = [startRect.B(), startRect.C(), startRect.D(), startRect.A(), startRect.B()];
      smt = new _SegmentLine["default"](rectPoints[cur.prevDir], rectPoints[cur.prevDir + 1]);
      if (cur.prevDir === cur.dir) {
        sPoint = smt.orthogonalProjectionPoint(ePoint);
        plLinePoints.unshift(sPoint);
      } else {
        sPoint = smt.midpoint();
        smt = new _SegmentLine["default"](sPoint, sPoint.add(pfdeDirs[cur.prevDir]));
        hPoint = smt.orthogonalProjectionPoint(ePoint);
        plLinePoints.unshift(hPoint);
        plLinePoints.unshift(sPoint);
      }
    }
    if (plLinePoints) {
      res.unshift(new _Polyline["default"](plLinePoints));
    }
    dir = cur.prevDir;
    i = cur.prevIdx;
    cur = Q[i] && Q[i][dir];
  }
  return res;
}
function beautifyPFDElineWithoutInterPoints(startRect, endRect) {
  var sPoint, ePoint, hPoint, dir, smt;
  sPoint = new _Vec["default"](0, 0);
  ePoint = new _Vec["default"](0, 0);
  dir = new _Vec["default"](0, 0);
  if (startRect.x + startRect.width <= endRect.x) {
    dir.x = 1;
  } else if (startRect.x >= endRect.x + endRect.width) {
    dir.x = -1;
  }
  if (startRect.y + startRect.height <= endRect.y) {
    dir.y = 1;
  } else if (startRect.y >= endRect.y + endRect.height) {
    dir.y = -1;
  }
  var startDirIdx;
  var endDirIdx;
  var startDir, endDir;
  var minLength = Infinity;
  var length;
  var bestPolyline = null;
  var nRangeStart, nRangeEnd, nRangeOverlap;
  var rectPoints;
  if (dir.dot(dir) === 0) {
    dir = directoryOfVec2(dir).dir;
  }
  if (dir.dot(dir) === 1) {
    if (dir.x === 0) {
      nRangeStart = new _NumRange["default"](startRect.x, startRect.width);
      nRangeEnd = new _NumRange["default"](endRect.x, endRect.width);
      nRangeOverlap = nRangeStart.collapsedNumRange(nRangeEnd);
      sPoint.x = nRangeOverlap.centerValue();
      ePoint.x = sPoint.x;
      if (dir.y === 1) {
        sPoint.y = startRect.y + startRect.height;
        ePoint.y = endRect.y;
      } else {
        sPoint.y = startRect.y;
        ePoint.y = endRect.y + endRect.height;
      }
    } else {
      nRangeStart = new _NumRange["default"](startRect.y, startRect.height);
      nRangeEnd = new _NumRange["default"](endRect.y, endRect.height);
      nRangeOverlap = nRangeStart.collapsedNumRange(nRangeEnd);
      sPoint.y = nRangeOverlap.centerValue();
      ePoint.y = sPoint.y;
      if (dir.x === 1) {
        sPoint.x = startRect.x + startRect.width;
        ePoint.x = endRect.x;
      } else {
        sPoint.x = startRect.x;
        ePoint.x = endRect.x + endRect.width;
      }
    }
    return [new _Polyline["default"]([sPoint, ePoint])];
  } else {
    for (startDirIdx = 0; startDirIdx < 4; ++startDirIdx) {
      startDir = pfdeDirs[startDirIdx];
      rectPoints = [startRect.B(), startRect.C(), startRect.D(), startRect.A(), startRect.B()];
      smt = new _SegmentLine["default"](rectPoints[startDirIdx], rectPoints[startDirIdx + 1]);
      sPoint = smt.midpoint();
      for (endDirIdx = 0; endDirIdx < 4; ++endDirIdx) {
        endDir = pfdeDirs[endDirIdx];
        rectPoints = [endRect.D(), endRect.A(), endRect.B(), endRect.C(), endRect.D()];
        smt = new _SegmentLine["default"](rectPoints[endDirIdx], rectPoints[endDirIdx + 1]);
        ePoint = smt.midpoint();
        if (dir.equals(startDir.add(endDir))) {
          smt = new _SegmentLine["default"](sPoint, sPoint.add(startDir));
          hPoint = smt.orthogonalProjectionPoint(ePoint);
          length = sPoint.dist(hPoint) + hPoint.dist(ePoint);
          if (length < minLength) {
            minLength = length;
            bestPolyline = new _Polyline["default"]([sPoint, hPoint, ePoint]);
          }
        }
      }
    }
    return [bestPolyline];
  }
}

/**
 *
 * @param {Rectangle} startRect
 * @param {Vec2[]}interPoints
 * @param {Rectangle}endRect
 * @returns {*|Polyline[]}
 */
function beautifyPFDEline(startRect, interPoints, endRect) {
  interPoints = interPoints || [];
  interPoints = interPoints.filter(function (p) {
    return !startRect.containsPoint(p) && !endRect.containsPoint(p);
  });
  if (interPoints.length === 0) {
    return beautifyPFDElineWithoutInterPoints(startRect, endRect);
  } else {
    return beautifyPFDElineWithInterPoints(startRect, interPoints, endRect);
  }
}
function testBT() {
  var startRect = new _Rectangle["default"](0, 0, 50, 20);
  var endRect = new _Rectangle["default"](400, 500, 50, 20);
  var interPoints = [new _Vec["default"](150, 150), new _Vec["default"](100, 300), new _Vec["default"](420, 420)];
  var res = beautifyPFDElineWithInterPoints(startRect, interPoints, endRect);
  console.log(res);
}

// testBT();

/**
 *
 * @param {ProcessFlowDiagramEditor} editor
 * @param {Object} data
 * @constructor
 */
function PFDEBlock(editor, data) {
  editor.blocks.push(this);
  this.attributes = new _Attributes["default"](this);
  Object.assign(this.attributes, data.attributes);
  this.attributes.id = this.attributes.id || (0, _stringGenerate.randomIdent)(8);
  this.editor = editor;
  this.bound = new _Rectangle["default"](0, 0, 0, 0);
  if (data.position) {
    if (typeof data.position.x === "number") this.bound.x = data.position.x;
    if (typeof data.position.y === "number") this.bound.y = data.position.y;
  }
  _OOP["default"].drillProperty(this, this, 'rect', 'bound');
  this.computedPinData = null;
  /**
   *
   * @type {PFDELine[]}
   */
  this.lines = [];
  this.render();
  if (data.position) this.position = data.position;
  this.attributes.loadAttributeHandlers(this.attributeHandlers);
  this.dragging = false;
}
PFDEBlock.prototype.nodeType = 'BLOCK';
PFDEBlock.prototype.tag = 'Common';
PFDEBlock.prototype.hasPinOut = true;
PFDEBlock.prototype.hasPinIn = true;
PFDEBlock.prototype.canGoTo = true;
PFDEBlock.prototype.canDelete = true;
Object.defineProperty(PFDEBlock.prototype, 'id', {
  set: function set(value) {
    this.attributes.id = value;
  },
  get: function get() {
    return this.attributes.id;
  }
});
PFDEBlock.prototype.exportData = function () {
  return {
    tag: this.tag,
    attributes: this.attributes["export"]()
  };
};
PFDEBlock.prototype.exportDiagram = function () {
  var position = this.position;
  return {
    position: {
      x: position.x,
      y: position.y
    }
  };
};
PFDEBlock.prototype.isConnectedTo = function (v) {
  return this.lines.some(function (line) {
    return line.v === v || line.v.id === v;
  });
};

/**
 * @param {boolean=} silent - default: false - true: do not call onBlockRemoved
 */
PFDEBlock.prototype.remove = function (silent) {
  this.lines.slice().forEach(function (line) {
    return line.remove(silent);
  });
  this.domElt.remove();
  var idx = this.editor.blocks.indexOf(this);
  if (idx >= 0) {
    this.editor.blocks.splice(idx, 1);
    if (!silent) this.editor.interactDelegate.onBlockRemoved(this);
  }
};
PFDEBlock.prototype.share = {
  prerenderDiv: null
};
PFDEBlock.prototype.calcBound = function () {
  var bound;
  bound = this.domElt.getBoundingClientRect();
  var placeHolder;
  if (!bound.width && !bound.height) {
    if (!this.share.prerenderDiv) {
      this.share.prerenderDiv = (0, _FCore._)({
        "class": 'pfde-prerender',
        style: {
          fontSize: '14px',
          position: 'fixed',
          left: 0,
          top: 0,
          width: '500px',
          height: '500px',
          zIndex: '-1000',
          opacity: 0,
          visibility: 'hidden',
          pointerEvents: 'none'
        }
      }).addTo(document.body);
    }
    placeHolder = (0, _FCore._)('div');
    this.domElt.selfReplace(placeHolder);
    bound = this.domElt.getBoundingClientRect();
    placeHolder.selfReplace(this.domElt);
  }
  this.bound.width = bound.width;
  this.bound.height = bound.height;
  this.lines.forEach(function (line) {
    return line.updatePosition();
  });
};
PFDEBlock.prototype.attributeHandlers = {};
PFDEBlock.prototype.attributeHandlers.id = {
  set: function set(value) {
    var _this = this;
    if (typeof value !== "string") value = value + '';
    value = value || (0, _stringGenerate.randomIdent)(8);
    this.domElt.attr('data-id', value);
    this.$displayName.firstChild.data = this.attributes.displayName || value;
    setTimeout(function () {
      return _this.calcBound();
    }, 50);
    return value;
  }
};
PFDEBlock.prototype.attributeHandlers.displayName = {
  set: function set(value) {
    var _this2 = this;
    this.$displayName.firstChild.data = value || this.attributes.id;
    setTimeout(function () {
      return _this2.calcBound();
    }, 50);
    return value || undefined;
  }
};

/**
 *
 * @param {Vec2} v
 * @returns {{pos: Vec2, dir: Vec2, dirIdx: number, angle: number}}
 */
PFDEBlock.prototype.getPinPositionToPoint = function (v) {
  var bound = this.bound;
  return directoryOutFromRect(bound, v);
};
PFDEBlock.prototype.typeIcon = 'span.mdi.mdi-puzzle';
PFDEBlock.prototype.renderHeader = function () {
  var _this3 = this;
  this.$header = (0, _FCore._)({
    "class": 'as-cde-node-header',
    child: [(0, _FCore._)(this.typeIcon).addClass('as-cde-node-type-icon'), {
      "class": 'as-cde-node-name-ctn',
      child: [{
        "class": 'as-cde-node-name',
        child: {
          text: this.attributes.displayName || this.attributes.id
        }
      }, {
        "class": 'as-cde-node-description',
        child: {
          text: this.attributes.description || ''
        }
      }]
    }]
  });
  this.$header.headerOfPFDEBlock = this;
  this.$displayName = (0, _FCore.$)('.as-cde-node-name', this.$header);
  this.$displayName.on('dblclick', function () {
    _this3.editDisplayName();
  });
  if (this.canGoTo) {
    this.$goToBtn = (0, _FCore._)({
      tag: 'button',
      "class": ['as-transparent-button', 'pfde-block-go-to-btn'],
      child: 'span.mdi.mdi-logout-variant'
    });
    this.$header.addChild(this.$goToBtn);
    this.$goToBtn.on('click', function () {
      if (!_this3.dragging) _this3.editor.interactDelegate.goToBlock(_this3);
    });
  }
};
PFDEBlock.prototype.renderPinConnectCtn = function () {
  this.$pinConnectCtn = (0, _FCore._)({
    "class": 'pfde-block-pin-to-connect-ctn',
    child: ['.pfde-block-pin-to-connect.as-left', '.pfde-block-pin-to-connect.as-right', '.pfde-block-pin-to-connect.as-top', '.pfde-block-pin-to-connect.as-bottom']
  });
};
PFDEBlock.prototype.render = function () {
  this.renderPinConnectCtn();
  this.renderHeader();
  this.domElt = (0, _FCore._)({
    "class": ['pfde-block', 'as-cde-node'],
    attr: {
      'data-tag': this.tag
    },
    child: [this.$pinConnectCtn, this.$header]
  });
  this.domElt.pfdeBlock = this;
  this.editor.$nodeLayer.addChild(this.domElt);
  this.calcBound();
};
PFDEBlock.prototype.calcPins = function () {
  var _this4 = this;
  // if (this.computedPinData) return this.computedPinData;
  this.computedPinData = {};
  this.computedPinData.lines = this.lines.map(function (obj, idx) {
    var res = {
      idx: idx
    };
    res.obj = obj;
    var l;
    if (obj.u === _this4) {
      res.dirIdx = obj.startDir.idx;
      res.of = 'u';
      res.locked = obj.lockedPathStart;
      res.nextPoint = obj.originSimplifiedLine.points[2] || obj.originSimplifiedLine.points[1];
    } else {
      l = obj.originSimplifiedLine.points.length;
      res.nextPoint = obj.originSimplifiedLine.points[l - 3] || obj.originSimplifiedLine.points[l - 2];
      res.dirIdx = invDirIdx(obj.endDir.idx);
      res.of = 'v';
      res.locked = obj.lockedPathEnd;
    }
    return res;
  });
  this.computedPinData.lineByDirIdx = this.computedPinData.lines.reduce(function (ac, line) {
    ac[line.dirIdx].push(line);
    return ac;
  }, [[], [], [], []]);
  this.computedPinData.lineByDirIdx.forEach(function (lines, idx) {
    lines.sort(function (a, b) {
      var nextPointA = a.nextPoint;
      var nextPointB = b.nextPoint;
      var res = 0;
      if (idx === 0 || idx === 2) {
        res = nextPointA.y - nextPointB.y;
      } else {
        res = nextPointA.x - nextPointB.x;
      }
      if (Math.abs(res) < 10) {
        res = a.idx - b.idx;
      }
      return res;
    });
    var line,
      i,
      j,
      offset = 0;
    var d = {};
    var arr = [];
    i = 0;
    j = lines.length - 1;
    while (i <= j) {
      arr.push(lines[i]);
      if (i !== j) {
        arr.push(lines[j]);
      }
      i++;
      j--;
    }
    if (lines.length % 2 === 0) offset = 1;
    arr = arr.reverse();
    var k;
    for (i = 0; i < arr.length; ++i) {
      line = arr[i];
      if (line.locked) {
        //todo: not handle now
        if (idx === 0 || idx === 2) {
          line.delta = new _Vec["default"](0, 0);
        }
        continue;
      } else if (i % 2 === 0) {
        k = offset + i;
      } else {
        k = offset - i - 1;
      }
      if (idx === 0 || idx === 2) {
        line.delta = new _Vec["default"](0, 8 * k);
        // d[line.idx] = k;
      } else {
        line.delta = new _Vec["default"](8 * k, 0);
      }
    }
  });
  return this.computedPinData;
};

/**
 * @param {PFDELine} line
 * @returns {Vec2}
 */
PFDEBlock.prototype.getPinDelta = function (line) {
  var pinData = this.calcPins();
  return pinData.lines.find(function (l) {
    return l.obj === line;
  }).delta;
};
//
// PFDEBlock.prototype.getPinOuts = function () {
//     var pinData = this.calcPins();
//     return pinData.lines.find()
// };

PFDEBlock.prototype.editDisplayName = function () {
  var _this5 = this;
  return new Promise(function (resolve) {
    var cpStyle = getComputedStyle(_this5.$displayName);
    var style = ['background-color', 'color', 'font', 'padding', 'border', 'display', 'width'].reduce(function (ac, name) {
      ac[name] = cpStyle.getPropertyValue(name);
      return ac;
    }, {
      outline: 'none'
    });
    var paddingLeft = parseFloat(cpStyle.getPropertyValue('padding-left').replace('px', '')) || 0;
    var paddingRight = parseFloat(cpStyle.getPropertyValue('padding-right').replace('px', '')) || 0;
    var applyWidthOf = function applyWidthOf(text) {
      var width = (0, _utils.measureText)(text, style.font).width;
      input.addStyle('width', width + paddingLeft + paddingRight + 'px');
      _this5.calcBound();
      _this5.lines.forEach(function (line) {
        return line.updatePosition();
      });
    };
    var input = (0, _FCore._)({
      tag: 'input',
      style: style,
      props: {
        value: _this5.attributes.displayName || _this5.attributes.id
      },
      on: {
        blur: function blur() {
          var value = input.value.trim();
          _this5.attributes.displayName = value;
          input.remove();
          _this5.$displayName.removeStyle('display');
          resolve(value);
        },
        keyup: function keyup() {
          applyWidthOf(input.value);
          _this5.calcBound();
          _this5.lines.forEach(function (line) {
            line.calcPath();
            line.updatePosition();
          });
        },
        keydown: function keydown(event) {
          var key = event.key;
          if (key.length === 1 && !event.ctrlKey && !event.altKey) {
            applyWidthOf(input.value + key);
          } else if (key === 'Enter') input.blur();
          setTimeout(function () {
            _this5.calcBound();
            _this5.lines.forEach(function (line) {
              line.calcPath();
              line.updatePosition();
            });
          }, 5);
        }
      }
    });
    _this5.$displayName.addStyle('display', 'none');
    _this5.$displayName.parentElement.addChildBefore(input, _this5.$displayName);
    input.focus();
    input.select();
  });
};
Object.defineProperty(PFDEBlock.prototype, 'position', {
  set: function set(value) {
    value = value || _Vec["default"].ZERO;
    var x = (0, _utils.isRealNumber)(value.x) ? value.x : 0;
    var y = (0, _utils.isRealNumber)(value.y) ? value.y : 0;
    this.bound.x = x;
    this.bound.y = y;
    this.domElt.addStyle({
      left: this.bound.x + 'px',
      top: this.bound.y + 'px'
    });
    this.lines.forEach(function (line) {
      line.calcPath();
      line.updatePosition();
    });
  },
  get: function get() {
    return this.bound.A();
  }
});
Object.defineProperty(PFDEBlock.prototype, 'hovering', {
  set: function set(value) {
    if (value) {
      this.domElt.addClass('as-hovering');
    } else {
      this.domElt.removeClass('as-hovering');
    }
  },
  get: function get() {
    return this.domElt.hasClass('as-hovering');
  }
});

/**
 * @extends PFDEBlock
 * @constructor
 */
function PFDEBStart(editor, data) {
  data = data || {};
  data.displayName = data.displayName || "Bắt đầu";
  PFDEBlock.call(this, editor, data);
}
(0, _inheritComponentClass["default"])(PFDEBStart, PFDEBlock);
PFDEBStart.prototype.typeIcon = 'span.mdi.mdi-ray-start-arrow';
PFDEBStart.prototype.tag = 'Start';
PFDEBStart.prototype.canDelete = false;
function PFDEBSuccess(editor, data) {
  data = data || {};
  data.displayName = data.displayName || "Thành công";
  PFDEBlock.call(this, editor, data);
}
(0, _inheritComponentClass["default"])(PFDEBSuccess, PFDEBlock);
PFDEBSuccess.prototype.typeIcon = 'span.mdi.mdi-flag-checkered';
PFDEBSuccess.prototype.tag = 'Success';
PFDEBSuccess.prototype.canGoTo = false;
PFDEBSuccess.prototype.canDelete = false;
PFDEBSuccess.prototype.hasPinOut = false;
function PFDEBFail(editor, data) {
  data = data || {};
  data.displayName = data.displayName || "Thất bại";
  PFDEBlock.call(this, editor, data);
}
(0, _inheritComponentClass["default"])(PFDEBFail, PFDEBlock);
PFDEBFail.prototype.typeIcon = 'span.mdi.mdi-flag-off-outline';
PFDEBFail.prototype.tag = 'Fail';
PFDEBFail.prototype.canGoTo = false;
PFDEBFail.prototype.canDelete = false;
PFDEBFail.prototype.hasPinOut = false;
function PFDEBProcess(editor, data) {
  PFDEBlock.apply(this, arguments);
}
(0, _inheritComponentClass["default"])(PFDEBProcess, PFDEBlock);
function PFDEBSubProcedure(editor, data) {
  PFDEBlock.apply(this, arguments);
}
(0, _inheritComponentClass["default"])(PFDEBSubProcedure, PFDEBlock);
PFDEBSubProcedure.prototype.typeIcon = 'span.mdi.mdi-chart-sankey-variant';
PFDEBSubProcedure.prototype.tag = 'SubProcedure';

/***/ }),

/***/ 17745:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PFDEBlocks = __webpack_require__(21882);
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var PFDECmd = {};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.save = function () {
  console.log(this.getData());
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd["delete"] = function () {
  var i;
  var blocks = this.selectionCtrl.getSelectedObjectsByType('BLOCK');
  for (i = 0; i < blocks.length; ++i) {
    blocks[i].remove();
    return;
  }
  var iPoints = this.selectionCtrl.getSelectedObjectsByType('INTERMEDIATE_POINT');
  for (i = 0; i < iPoints.length; ++i) {
    iPoints[i].remove();
  }
  var lines = this.selectionCtrl.getSelectedObjectsByType('LINE');
  for (i = 0; i < lines.length; ++i) {
    lines[i].remove();
  }
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.toggleHistory = function () {
  this.history.toggleListView();
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.undo = function () {
  this.history.undo();
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.redo = function () {
  this.history.redo();
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.openHangTool = function (checked) {
  if (checked) {
    if (this.selectTool.isActivated) {
      this.selectTool.stop();
    }
    if (this.drawLineTool.isActivated) {
      this.drawLineTool.stop();
    }
    this.hangTool.start();
  } else {
    this.hangTool.stop();
  }
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.openSelectTool = function (checked) {
  if (checked) {
    if (this.hangTool.isActivated) {
      this.hangTool.stop();
    }
    if (this.drawLineTool.isActivated) {
      this.drawLineTool.stop();
    }
    this.selectTool.start();
  } else {
    this.selectTool.stop();
  }
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.openDrawLineTool = function (checked) {
  if (checked) {
    if (this.hangTool.isActivated) {
      this.hangTool.stop();
    }
    if (this.selectTool.isActivated) {
      this.selectTool.stop();
    }
    this.drawLineTool.start();
  } else {
    this.drawLineTool.stop();
  }
};

/**
 * @this ProcessFlowDiagramEditor
 * @param color
 */
PFDECmd.lineColor = function (color) {
  var lines = this.selectionCtrl.getSelectedObjectsByType('LINE');
  lines.forEach(function (line) {
    line.color = color;
  });
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.insertProcessBlock = function () {
  var newNode = new _PFDEBlocks.PFDEBProcess(this, {
    position: this.viewBoxCtrl.$graphicLayer.box.origin.inv().add(new _Vec["default"](20, 20))
  });
  this._interactDelegate.onNewBlockCreated(newNode);
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.insertSubProcedureBlock = function () {
  var newNode = new _PFDEBlocks.PFDEBSubProcedure(this, {
    position: this.viewBoxCtrl.$graphicLayer.box.origin.inv().add(new _Vec["default"](20, 20))
  });
  this._interactDelegate.onNewSubProcedureBlockCreated(newNode);
};
/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.rename = function () {};
PFDECmd.alignHorizontal = function (offset) {
  var objects = this.selectionCtrl.getSelectedObjectsByType('BLOCK', 'INTERMEDIATE_POINT');
  if (objects.length <= 1) return;
  var focusObject = objects.pop();
  var rightX = 0;
  if (focusObject.nodeType === 'BLOCK') {
    rightX = focusObject.position.x + focusObject.domElt.getBoundingClientRect().width * offset;
  } else if (focusObject.nodeType === 'INTERMEDIATE_POINT') {
    rightX = focusObject.x;
  }
  objects.forEach(function (obj) {
    var x, y;
    if (obj.nodeType === 'BLOCK') {
      y = obj.position.y;
      x = rightX - obj.domElt.getBoundingClientRect().width * offset;
      obj.position = new _Vec["default"](x, y);
    } else if (obj.nodeType === 'INTERMEDIATE_POINT') {
      y = obj.y;
      x = rightX;
      obj.position = new _Vec["default"](x, y);
    }
  });
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.alignLeftEdge = function () {
  return PFDECmd.alignHorizontal.call(this, 0);
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.alignHorizontalCenter = function () {
  return PFDECmd.alignHorizontal.call(this, 0.5);
};
/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.alignRightEdge = function () {
  return PFDECmd.alignHorizontal.call(this, 1);
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.alignVertical = function (offset) {
  var objects = this.selectionCtrl.getSelectedObjectsByType('BLOCK', 'INTERMEDIATE_POINT');
  if (objects.length <= 1) return;
  var focusObject = objects.pop();
  var botY = 0;
  if (focusObject.nodeType === 'BLOCK') {
    botY = focusObject.position.y + focusObject.domElt.getBoundingClientRect().height * offset;
  } else if (focusObject.nodeType === 'INTERMEDIATE_POINT') {
    botY = focusObject.y;
  }
  objects.forEach(function (obj) {
    var x, y;
    if (obj.nodeType === 'BLOCK') {
      x = obj.position.x;
      y = botY - obj.domElt.getBoundingClientRect().height * offset;
      obj.position = new _Vec["default"](x, y);
    } else if (obj.nodeType === 'INTERMEDIATE_POINT') {
      x = obj.x;
      y = botY;
      obj.position = new _Vec["default"](x, y);
    }
  });
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.alignVerticalCenter = function () {
  return PFDECmd.alignVertical.call(this, 0.5);
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.alignTopEdge = function () {
  return PFDECmd.alignVertical.call(this, 0);
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.alignBottomEdge = function () {
  return PFDECmd.alignVertical.call(this, 1);
};
PFDECmd.distributeHorizontal = function (offset) {
  var objects = this.selectionCtrl.getSelectedObjectsByType('BLOCK', 'INTERMEDIATE_POINT');
  if (objects.length <= 2) return;
  var xList = objects.map(function (obj) {
    var x = 0;
    if (obj.nodeType === 'BLOCK') {
      x = obj.position.x + obj.domElt.getBoundingClientRect().width * offset;
    } else if (obj.nodeType === 'INTERMEDIATE_POINT') {
      x = obj.x;
    }
    return {
      obj: obj,
      x: x
    };
  });
  xList.sort(function (a, b) {
    return a.x - b.x;
  });
  var left = xList[0].x;
  var right = xList[xList.length - 1].x;
  var obj;
  for (var i = 1; i < xList.length - 1; ++i) {
    obj = xList[i].obj;
    var x = left + (right - left) / (xList.length - 1) * i;
    if (obj.nodeType === 'BLOCK') {
      obj.position = new _Vec["default"](x - obj.domElt.getBoundingClientRect().width * offset, obj.position.y);
    } else if (obj.nodeType === 'INTERMEDIATE_POINT') {
      obj.position = new _Vec["default"](x, obj.y);
    }
  }
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.distributeHorizontalLeft = function () {
  return PFDECmd.distributeHorizontal.call(this, 0);
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.distributeHorizontalCenter = function () {
  return PFDECmd.distributeHorizontal.call(this, 0.5);
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.distributeHorizontalRight = function () {
  return PFDECmd.distributeHorizontal.call(this, 1);
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.distributeVertical = function (offset) {
  var objects = this.selectionCtrl.getSelectedObjectsByType('BLOCK', 'INTERMEDIATE_POINT');
  if (objects.length <= 2) return;
  var yList = objects.map(function (obj) {
    var y = 0;
    if (obj.nodeType === 'BLOCK') {
      y = obj.position.y + obj.domElt.getBoundingClientRect().height * offset;
    } else if (obj.nodeType === 'INTERMEDIATE_POINT') {
      y = obj.y;
    }
    return {
      obj: obj,
      y: y
    };
  });
  var top = yList[0].y;
  var bottom = yList[yList.length - 1].y;
  var obj;
  for (var i = 1; i < yList.length - 1; ++i) {
    obj = yList[i].obj;
    var y = top + (bottom - top) / (yList.length - 1) * i;
    if (obj.nodeType === 'BLOCK') {
      obj.position = new _Vec["default"](obj.position.x, y - obj.domElt.getBoundingClientRect().height * offset);
    } else if (obj.nodeType === 'INTERMEDIATE_POINT') {
      obj.position = new _Vec["default"](obj.x, y);
    }
  }
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.distributeVerticalTop = function () {
  return PFDECmd.distributeVertical.call(this, 0);
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.distributeVerticalCenter = function () {
  return PFDECmd.distributeVertical.call(this, 0.5);
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.distributeVerticalBottom = function () {
  return PFDECmd.distributeVertical.call(this, 1);
};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.autoAlignPosition = function () {
  this.autoAlignPosition();
};
PFDECmd.startIntermediatePointTool = function () {};

/**
 * @this ProcessFlowDiagramEditor
 */
PFDECmd.cancelActivatedTool = function () {
  if (this.hangTool.isActivated) {
    this.hangTool.stop();
  }
  if (this.selectTool.isActivated) {
    this.selectTool.stop();
  }
};
var _default = PFDECmd;
exports["default"] = _default;

/***/ }),

/***/ 33734:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function PFDEGraphOptimizerFactor(global) {
  function Vec2(t, e) {
    this.x = t, this.y = e;
  }
  Vec2.prototype.copy = function () {
    return new Vec2(this.x, this.y);
  }, Vec2.prototype.toString = function () {
    return "(" + this.x + ", " + this.y + ")";
  }, Vec2.prototype.abs = function () {
    return Math.sqrt(this.x * this.x + this.y * this.y);
  }, Vec2.prototype.normalized = function () {
    var t = this.abs();
    return 0 == t && (t = 1), this.div(t);
  }, Vec2.prototype.mult = function (t) {
    return new Vec2(this.x * t, this.y * t);
  }, Vec2.prototype.div = function (t) {
    return new Vec2(this.x / t, this.y / t);
  }, Vec2.prototype.dist = function (t) {
    var e = t.x - this.x,
      n = t.y - this.y;
    return Math.sqrt(e * e + n * n);
  }, Vec2.prototype.sub = function (t) {
    return new Vec2(this.x - t.x, this.y - t.y);
  }, Vec2.prototype.add = function (t) {
    return new Vec2(this.x + t.x, this.y + t.y);
  }, Vec2.prototype.inv = function () {
    return new Vec2(-this.x, -this.y);
  }, Vec2.prototype.linear = function (t, e) {
    return new Vec2(this.x * (1 - e) + t.x * e, this.y * (1 - e) + t.y * e);
  }, Vec2.prototype.dot = function (t) {
    return this.x * t.x + this.y * t.y;
  }, Vec2.prototype.direction = function () {
    return Math.atan2(this.y, this.x);
  }, Vec2.prototype.translate = function (t, e) {
    return this.add(new Vec2(t, e));
  }, Vec2.prototype.rotate = function (t) {
    var e = Math.sin(t),
      n = Math.cos(t);
    return new Vec2(this.x * n - this.y * e, this.x * e + this.y * n);
  }, Vec2.prototype.rotate90 = function () {
    return new Vec2(-this.y, this.x);
  }, Vec2.fromDirection = function (t) {
    return new Vec2(Math.cos(t), Math.sin(t));
  }, Vec2.make = function (t, e) {
    return t instanceof Array ? new Vec2(t[0], t[1]) : t instanceof Vec2 ? t.copy() : new Vec2(t, e);
  };
  Vec2.prototype.cross = function (t) {
    return this.x * t.y - this.y * t.x;
  };
  function isCross(A, B, C, D) {
    var t1 = C.sub(D).cross(D.sub(A));
    var t2 = C.sub(D).cross(D.sub(B));
    if (t1 * t2 >= 0) return false;
    var t3 = A.sub(B).cross(B.sub(C));
    var t4 = A.sub(B).cross(B.sub(D));
    if (t3 * t4 >= 0) return false;
    return true;
  }
  function randomPos(o, maxGridN) {
    var res = {};
    for (var key in o) {
      if (Math.random() > 0.0) {
        res[key] = new Vec2(Math.round(Math.random() * maxGridN) * 50, Math.round(Math.random() * maxGridN) * 50);
      } else res[key] = o[key];
    }
    return res;
  }
  function mixPos(a, b) {
    var res = {};
    for (var key in a) {
      if (Math.random() > 0.5) {
        res[key] = a[key];
      } else res[key] = b[key];
      if (Math.random() > 0.95) {
        res[key] = new Vec2(a[key].x, b[key].y);
      } else if (Math.random() > 0.95) {
        res[key] = new Vec2(b[key].x, a[key].y);
      }
    }
    return res;
  }
  function depthSort(keys, lines) {
    var lineDict = lines.reduce(function (ac, cr) {
      ac[cr.u + '>' + cr.v] = true;
      return ac;
    }, {});
    var inCount = lines.reduce(function (ac, cr) {
      ac[cr.v] = (ac[cr.v] || 0) + 1;
      return ac;
    }, {});
    var outCount = lines.reduce(function (ac, cr) {
      ac[cr.u] = (ac[cr.u] || 0) + 1;
      return ac;
    }, {});
    var res = [];
    keys = keys.slice();
    keys.sort(function (a, b) {
      if (inCount[a] !== outCount[b]) return (inCount[a] || 0) - (outCount[b] || 0);
      if (a < b) return -1;
      return 1;
    });
    var levels = {};
    var visit = function visit(key, lv) {
      if (levels[key] === undefined || levels[key] > lv) {
        levels[key] = lv;
        keys.forEach(function (sKey) {
          if (lineDict[key + '>' + sKey] || lineDict[sKey + '>' + key]) {
            visit(sKey, lv + 1);
          }
        });
      }
    };
    keys.forEach(function (key) {
      if (levels[key] === undefined) visit(key, 0);
    });
    return keys.reduce(function (ac, key) {
      var lv = levels[key];
      while (ac.length <= lv) {
        ac.push([]);
      }
      ac[lv].push(key);
      return ac;
    }, []);
  }
  global.findBetterPositions = function (oP, sizes, lines, timeout) {
    timeout = timeout || 1000;
    var keys = Object.keys(oP);
    keys.forEach(function (key) {
      oP[key] = new Vec2(oP[key].x, oP[key].y);
    });
    var calcScore = function calcScore(pos) {
      var rects = keys.reduce(function (ac, key) {
        var size = sizes[key];
        var O = oP[key];
        ac[key] = [O.add(new Vec2(-size.width / 2, -size.height / 2)), O.add(new Vec2(size.width / 2, -size.height / 2)), O.add(new Vec2(size.width / 2, size.height / 2)), O.add(new Vec2(-size.width / 2, size.height / 2))];
        return ac;
      }, {});
      var score = 0;
      var i, j, k;
      var A, B, C, D;
      var minX = Infinity;
      var minY = Infinity;
      var maxX = -Infinity;
      var maxY = -Infinity;
      var n = 0;
      for (i in pos) {
        n++;
        maxX = Math.max(maxX, pos[i].x);
        maxY = Math.max(maxY, pos[i].y);
        minX = Math.min(minX, pos[i].x);
        minY = Math.min(minY, pos[i].y);
      }
      if (minX < maxX) {
        score += 100 * n / (maxX - minX) + 100 * n / (maxY - minY);
      }
      score -= Math.abs(1 - (maxX - minX) / (maxY - minY)) * 10 + Math.abs(1 - (maxY - minY) / (maxX - minX)) * 10;
      for (i in pos) {
        for (j in pos) {
          if (i === j) continue;
          if (Math.abs(pos[i].x - pos[j].x) < (sizes[i].width + sizes[j].width) / 2 + 30 && Math.abs(pos[i].y - pos[j].y) < (sizes[i].height + sizes[j].height) / 2 + 30) {
            score -= 20;
          }
        }
      }
      for (i = 0; i < lines.length - 1; ++i) {
        A = pos[lines[i].u];
        B = pos[lines[i].v];
        for (j = i + 1; j < lines.length; ++j) {
          C = pos[lines[j].u];
          D = pos[lines[j].v];
          if (isCross(A, B, C, D)) {} else {
            score += 10;
          }
        }
      }
      for (i = 0; i < lines.length; ++i) {
        A = pos[lines[i].u];
        B = pos[lines[i].v];
        score -= A.sub(B).abs() / 100;
        for (j in rects) {
          if (j === lines[i].u || j === lines[i].v) continue;
          for (k = 0; k < 4; ++k) {
            C = rects[j][k];
            D = rects[j][(k + 1) % 4];
            if (isCross(A, B, C, D)) {
              score -= 100;
            }
          }
        }
      }
      return score;
    };
    var tp = depthSort(keys, lines);
    var lineDict = lines.reduce(function (ac, cr) {
      ac[cr.u + '>' + cr.v] = true;
      return ac;
    }, {});
    var now = Date.now();
    var newPos, newScore;
    var bestSolution = oP;
    var bestScore = calcScore(oP);
    while (Date.now() - now < timeout) {
      newPos = randomPos(oP, Math.sqrt(keys.length) * 2 * 5 >> 0);
      newScore = calcScore(newPos);
      if (newScore > bestScore) {
        bestSolution = newPos;
        bestScore = newScore;
      }
    }
    var O = keys.reduce(function (ac, key) {
      ac.x = Math.min(ac.x, oP[key].x);
      ac.y = Math.min(ac.y, oP[key].y);
      return ac;
    }, new Vec2(1e8, 1e8));
    var O1 = keys.reduce(function (ac, key) {
      ac.x = Math.min(ac.x, bestSolution[key].x);
      ac.y = Math.min(ac.y, bestSolution[key].y);
      return ac;
    }, new Vec2(1e8, 1e8));
    keys.forEach(function (key) {
      bestSolution[key] = bestSolution[key].sub(O1).add(O);
    });
    return bestSolution;
  };
}
var _default = PFDEGraphOptimizerFactor;
exports["default"] = _default;

/***/ }),

/***/ 43061:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.PFDEDrawingLine = PFDEDrawingLine;
exports.PFDEIntermediatePoint = PFDEIntermediatePoint;
exports["default"] = void 0;
var _GCore = _interopRequireDefault(__webpack_require__(66723));
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _stringGenerate = __webpack_require__(10713);
var _FCore = __webpack_require__(51518);
var _Turtle = _interopRequireDefault(__webpack_require__(90942));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _PFDEBlocks = __webpack_require__(21882);
var _Polyline = _interopRequireDefault(__webpack_require__(67161));
var _stringUtils = __webpack_require__(26243);
var _SegmentLine = _interopRequireDefault(__webpack_require__(86767));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _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); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _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; }
/**
 *
 * @param {ProcessFlowDiagramEditor} editor
 * @param {PFDEBlock} u
 * @param {PFDEBlock} v
 * @param {PFDLineData=} data
 * @param  extraData
 * @constructor
 */
function PFDELine(editor, u, v, data, extraData) {
  var _this = this;
  editor.lines.push(this);
  data = Object.assign({}, data || {});
  data.id = data.id || (0, _stringGenerate.randomIdent)(8);
  /**
   *
   * @type {PFDEIntermediatePoint[]}
   */
  this.intermediatePoints = [];
  if (extraData && extraData.intermediatePoints) {
    this.intermediatePoints = extraData.intermediatePoints.map(function (point) {
      return new PFDEIntermediatePoint(_this, point);
    });
  }
  this.color = extraData.color || null;
  this.attributes = new _Attributes["default"](this);
  _OOP["default"].drillProperty(this, this.attributes, 'id');
  Object.keys(this.attributeHandlers).forEach(function (key) {
    if (key in data) _this.attributes[key] = data[key];
  });
  this.editor = editor;
  this.u = u;
  this.v = v;

  // this.data = data;
  u.lines.push(this);
  if (u !== v) v.lines.push(this);

  /**
   *
   * @type {Polyline[]}
   */
  this.viewPolylines = [new _Polyline["default"]([])];
  this.render();
  this.attributes.loadAttributeHandlers(this.attributeHandlers);
  this.calcPath();
  /**
   * @type {string}
   * @memberof PFDELine#
   * @name id
   */
  u.lines.forEach(function (line) {
    return line.updatePosition();
  });
  if (u !== v) v.lines.forEach(function (line) {
    return line.updatePosition();
  });
}
PFDELine.prototype.nodeType = "LINE";
PFDELine.prototype.canDelete = true;
PFDELine.prototype.shareColors = {};
PFDELine.prototype.getAutoColor = function () {
  var id = this.id;
  var color;
  var hash = (0, _stringUtils.stringHashCode)(id + '');
  hash = Math.abs(hash) % (256 * 256 * 256);
  color = _Color["default"].parse('#' + ('00000' + hash.toString(16)).slice(-6));
  var hsla = color.toHSLA();
  if (hsla[2] > 0.8) {
    hsla[2] -= 0.4;
    color = _Color["default"].fromHSLA.apply(_Color["default"], _toConsumableArray(hsla));
  }
  return color;
};

/**
 * render and add to editor
 */
PFDELine.prototype.render = function () {
  var markerId = (0, _stringGenerate.randomIdent)(8);
  var lineColor = this.color;
  this.$marker = _GCore["default"]._({
    tag: 'marker',
    style: {
      '--line-color': lineColor
    },
    attr: {
      id: markerId,
      markerWidth: '3',
      markerHeight: '8',
      orient: 'auto',
      refX: '4.1',
      refY: '4'
    },
    child: {
      tag: 'path',
      attr: {
        d: 'M0,0 V8 L4,4 Z'
      },
      style: {
        fill: 'var(--line-color)'
      }
    }
  });
  this.$intermediatePoints = this.intermediatePoints.map(function (it) {
    return it.domElt;
  });
  this.$itGroup = _GCore["default"]._({
    style: {
      '--line-color': lineColor
    },
    child: this.$intermediatePoints
  });
  this.domElt = _GCore["default"]._({
    tag: 'g',
    "class": ['as-cde-line-group'],
    attr: {
      'data-line-id': this.attributes.id
    },
    style: {
      '--line-color': lineColor
    },
    child: [{
      tag: 'path',
      "class": 'as-cde-hit-line'
    }, {
      tag: 'path',
      "class": 'as-cde-line',
      style: {
        'marker-end': "url(#".concat(markerId, ")")
      }
    }, {
      tag: 'path',
      "class": 'as-cde-line-lock'
    }, {
      tag: 'text',
      "class": 'as-cde-line-text-shadow',
      style: {
        backgroundColor: 'white'
      },
      attr: {
        x: 0,
        y: 0,
        "text-anchor": 'middle',
        'dominant-baseline': "middle"
      },
      child: {
        text: ''
      }
    }, {
      tag: 'text',
      "class": 'as-cde-line-text',
      style: {
        backgroundColor: 'white'
      },
      attr: {
        x: 0,
        y: 0,
        "text-anchor": 'middle',
        'dominant-baseline': "middle"
      },
      child: {
        text: ''
      }
    }],
    props: {
      pfdeLine: this
    }
  });
  _OOP["default"].drillProperty(this.domElt, this.attributes, 'lineId', 'id');
  this.$paths = (0, _FCore.$$)('path', this.domElt);
  this.$texts = (0, _FCore.$$)('text', this.domElt);
  this.editor.$lineDefs.addChild(this.$marker);
  this.editor.$lineLayer.addChild(this.domElt);
  this.editor.$intermediatePointLayer.addChild(this.$itGroup);
};
PFDELine.prototype.attributeHandlers = {};
PFDELine.prototype.attributeHandlers.id = {
  set: function set(value) {
    if (typeof value !== "string") value = value + '';
    value = value || (0, _stringGenerate.randomIdent)(8);
    this.domElt.attr('data-line-id', value);
    return value;
  }
};
PFDELine.prototype.attributeHandlers.text = {
  set: function set(value) {
    value = value + '';
    this.$texts.forEach(function (elt) {
      return elt.firstChild.data = value;
    });
    return value;
  },
  "export": function _export(ref) {
    return ref.get() || undefined;
  }
};

/**
 *
 * @param {boolean=} silent - not fire event
 */
PFDELine.prototype.remove = function (silent) {
  var u = this.u;
  var v = this.v;
  this.domElt.remove();
  this.$itGroup.remove();
  this.$marker.remove();
  var idx = this.u.lines.indexOf(this);
  if (idx >= 0) this.u.lines.splice(idx, 1);
  idx = this.v.lines.indexOf(this);
  if (idx >= 0) this.v.lines.splice(idx, 1);
  idx = this.editor.lines.indexOf(this);
  if (idx >= 0) this.editor.lines.splice(idx, 1);
  if (idx >= 0) {
    if (!silent) this.editor.interactDelegate.onLineRemoved(this);
  }
  u.lines.forEach(function (line) {
    return line.updatePosition();
  });
  if (u !== v) v.lines.forEach(function (line) {
    return line.updatePosition();
  });
};
PFDELine.prototype.calcPath = function () {
  var u = this.u;
  var v = this.v;
  var interPoints = this.intermediatePoints.map(function (point) {
    return point.position;
  });
  this.originPolyLines = (0, _PFDEBlocks.beautifyPFDEline)(u.bound, interPoints, v.bound);
  var points = this.originPolyLines.reduce(function (ac, pl) {
    return ac.concat(pl.points);
  }, []);
  this.originSimplifiedLine = new _Polyline["default"](points).simplify();
  var startSM = new _SegmentLine["default"](points[0], points[1]);
  this.lockedPathStart = this.originSimplifiedLine.points.length < 3 || interPoints.some(function (point) {
    return startSM.nearestPointToPoint(point).dist(point) < 0.001;
  });
  var endSM = new _SegmentLine["default"](points[points.length - 2], points[points.length - 1]);
  this.lockedPathEnd = this.originSimplifiedLine.points.length < 3 || interPoints.some(function (point) {
    return endSM.nearestPointToPoint(point).dist(point) < 0.001;
  });
  this.startDir = (0, _PFDEBlocks.directoryOfVec2)(points[1].sub(points[0]));
  this.endDir = (0, _PFDEBlocks.directoryOfVec2)(points[points.length - 1].sub(points[points.length - 2]));
  this.u.computedPinData = null; //force update
  this.v.computedPinData = null;
  return this.originPolyLines;
};

/**
 * @param {boolean} reverse
 * @return {Vec2[]}
 */
PFDELine.prototype.getPolyLinePoints = function (reverse) {
  var points = this.viewPolylines.reduce(function (ac, cr) {
    return ac.concat(cr.points);
  }, []);
  if (reverse) points = points.slice().reverse();
  return new _Polyline["default"](points).simplify().points;
};
PFDELine.prototype.updatePath = function () {
  //line
  var polyLines = this.originPolyLines;
  if (!polyLines) return;
  this.viewPolylines = polyLines.map(function (pl) {
    return pl.copy();
  });
  var startDelta = this.u.getPinDelta(this) || new _Vec["default"](0, 0);
  var endDelta = this.v.getPinDelta(this) || new _Vec["default"](0, 0);
  var points = this.viewPolylines.reduce(function (ac, cr) {
    return ac.concat(cr.points);
  }, []);
  var i = 0;
  var prevPoint = points[0].copy();
  while (i < points.length) {
    if (Math.abs(points[i].x - prevPoint.x) < 0.001 || Math.abs(points[i].y - prevPoint.y) < 0.001) {
      points[i].x += startDelta.x;
      points[i].y += startDelta.y;
      i++;
    } else break;
  }
  i = points.length - 1;
  prevPoint = points[points.length - 1].copy();
  while (i >= 0) {
    if (Math.abs(points[i].x - prevPoint.x) < 0.001 || Math.abs(points[i].y - prevPoint.y) < 0.001) {
      points[i].x += endDelta.x;
      points[i].y += endDelta.y;
      i--;
    } else break;
  }
  var turtle = new _Turtle["default"]();
  turtle.moveTo(points[0].x, points[0].y);
  for (i = 1; i < points.length; ++i) {
    turtle.lineTo(points[i].x, points[i].y);
  }
  this.$paths.forEach(function (pathElt) {
    return pathElt.attr('d', turtle.getPath());
  });
};
PFDELine.prototype.updatePosition = function () {
  this.updatePath();
};
PFDELine.prototype["export"] = function () {
  return Object.assign({}, this.attributes["export"], {
    u: this.u.id,
    v: this.v.id,
    id: this.id
  });
};
PFDELine.prototype.exportDiagram = function () {
  return {
    intermediatePoints: this.exportIntermediatePoints(),
    color: this.color.toString('hex6')
  };
};
PFDELine.prototype.exportIntermediatePoints = function () {
  if (this.intermediatePoints.length === 0) return undefined;
  return this.intermediatePoints.map(function (point) {
    return {
      x: point.x,
      y: point.y
    };
  });
};
PFDELine.prototype.addIntermediatePoint = function (data, at) {
  var newPoint = new PFDEIntermediatePoint(this, data);
  if (this.intermediatePoints[at]) {
    this.intermediatePoints.splice(at, 0, newPoint);
  } else {
    this.intermediatePoints.push(newPoint);
  }
  this.domElt.addChild(newPoint.domElt); //todo: add before text
  this.updatePosition(); //todo: update other
  return newPoint;
};
Object.defineProperty(PFDELine.prototype, 'loopBack', {
  "return": function _return() {
    return this.u === this.v;
  }
});
Object.defineProperty(PFDELine.prototype, 'color', {
  get: function get() {
    return this._color || this.getAutoColor();
  },
  set: function set(value) {
    if (typeof value === "string") {
      try {
        value = _Color["default"].parse(value);
      } catch (error) {
        value = null;
      }
    }
    if (value instanceof _Color["default"]) {
      this._color = value;
    } else {
      this._color = null;
    }
    if (this.domElt) {
      this.domElt.addStyle('--line-color', this.color.toString('hex6'));
      this.$marker.addStyle('--line-color', this.color.toString('hex6'));
      this.$itGroup.addStyle('--line-color', this.color.toString('hex6'));
    }
  }
});
var _default = PFDELine;
/**
 *
 * @param {null|PFDELine} line - null for new point
 * @param data
 * @constructor
 */
exports["default"] = _default;
function PFDEIntermediatePoint(line, data) {
  this.line = line;
  this._position = new _Vec["default"](0, 0);
  if (data && typeof data.x === "number" && typeof data.y === "number") {
    this._position.x = data.x;
    this._position.y = data.y;
  }
  if (typeof data.id === "string") {
    this.id = data.id;
  } else {
    this.id = (0, _stringGenerate.randomIdent)(8) + '_' + Date.now();
  }
  this.render();
}
PFDEIntermediatePoint.prototype.nodeType = "INTERMEDIATE_POINT";
PFDEIntermediatePoint.prototype.render = function () {
  this.domElt = _GCore["default"]._({
    tag: 'g',
    "class": 'as-cde-intermediate-point',
    child: [{
      tag: 'circle',
      "class": 'as-cde-intermediate-point-circle-highlight',
      attr: {
        cx: 0,
        cy: 0,
        r: 8
      }
    }, {
      tag: 'circle',
      "class": 'as-cde-intermediate-point-circle',
      attr: {
        cx: 0,
        cy: 0,
        r: 5
      }
    }]
  });
  this.domElt.pfdeIntermediatePoint = this;
  if (!this.line) this.domElt.addClass('pfde-new-point');
  this.updatePosition();
};
PFDEIntermediatePoint.prototype.updatePosition = function () {
  this.domElt.attr('transform', "translate(".concat(this._position.x, ", ").concat(this._position.y, ")"));
};
PFDEIntermediatePoint.prototype.remove = function () {
  if (this.domElt.parentElement) this.domElt.remove();
  if (!this.line) return;
  var idx = this.line.intermediatePoints.indexOf(this);
  if (idx < 0) return;
  this.line.intermediatePoints.splice(idx, 1);
  this.line.updatePosition();
  this.line = null;
};
Object.defineProperty(PFDEIntermediatePoint.prototype, 'position', {
  enumerable: true,
  configurable: true,
  set: function set(value) {
    if (value && typeof value.x === "number" && typeof value.y === "number") {
      this._position.x = value.x;
      this._position.y = value.y;
      this.updatePosition();
      if (this.line) {
        this.line.calcPath();
        this.line.updatePosition();
      }
    }
  },
  get: function get() {
    return this._position.copy();
  }
});
Object.defineProperty(PFDEIntermediatePoint.prototype, 'x', {
  get: function get() {
    return this._position.x;
  }
});
Object.defineProperty(PFDEIntermediatePoint.prototype, 'y', {
  get: function get() {
    return this._position.y;
  }
});

/**
 *
 * @param {ProcessFlowDiagramEditor} editor
 * @param {PFDEBlock} u
 * @constructor
 */
function PFDEDrawingLine(editor, u) {
  this.editor = editor;
  this.u = u;
  this.v = null;
  /**
   *
   * @type {PFDEIntermediatePoint[]}
   */
  this.intermediatePoints = [];
  this.tartgetPoint = null;
  this.render();
}
PFDEDrawingLine.prototype.nodeType = "DRAWING_LINE";
PFDEDrawingLine.prototype.render = function () {
  this.$newLineMarker = _GCore["default"]._({
    tag: 'marker',
    attr: {
      id: (0, _stringGenerate.randomIdent)(8),
      markerWidth: '3',
      markerHeight: '8',
      orient: 'auto',
      refX: '4.1',
      refY: '4'
    },
    child: {
      tag: 'path',
      attr: {
        d: 'M0,0 V8 L4,4 Z'
      }
    }
  });
  this.$newLineMarkerPath = (0, _FCore.$)('path', this.$newLineMarker);
  this.editor.$lineDefs.addChild(this.$newLineMarker);
  this.$newLine = _GCore["default"]._({
    tag: 'path',
    "class": 'as-cde-line',
    attr: {
      d: new _Turtle["default"]().moveTo(10, 10).lineBy(100, 100).getPath()
    },
    style: {
      '--line-color': 'red',
      'marker-end': "url(#".concat(this.$newLineMarker.id, ")"),
      display: 'none',
      pointerEvents: 'none'
    }
  });
  this.domElt = _GCore["default"]._({
    tag: 'g',
    "class": 'as-cde-drawing-line',
    child: [this.$newLine]
  });
};
PFDEDrawingLine.prototype.remove = function () {
  this.domElt.remove();
  this.$newLineMarker.remove();
};
PFDEDrawingLine.prototype.updatePath = function () {};
PFDEDrawingLine.prototype.updatePosition = function () {};

/***/ }),

/***/ 3963:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.PFDEInteractDelegate = PFDEInteractDelegate;
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _GCore = _interopRequireDefault(__webpack_require__(66723));
var _SvgViewBox = _interopRequireDefault(__webpack_require__(51235));
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _CMDRunner = _interopRequireDefault(__webpack_require__(34470));
var _CMDTool = _interopRequireWildcard(__webpack_require__(8982));
var _PFDEBlocks = __webpack_require__(21882);
var _utils = __webpack_require__(19356);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _stringGenerate = __webpack_require__(10713);
var _PFDELine = _interopRequireWildcard(__webpack_require__(43061));
var _PFDECmd = _interopRequireDefault(__webpack_require__(17745));
var _ContextMenu = _interopRequireDefault(__webpack_require__(24733));
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _Thread = _interopRequireDefault(__webpack_require__(44067));
var _PFDEGraphOptimizerFactor = _interopRequireDefault(__webpack_require__(33734));
var _OnsScreenWindow = _interopRequireDefault(__webpack_require__(28217));
var _UndoHistory = _interopRequireDefault(__webpack_require__(95394));
var _utils2 = __webpack_require__(84512);
var _generator = __webpack_require__(18528);
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _EventEmitter = __webpack_require__(46833);
var _keyboard = __webpack_require__(95141);
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
var _stringUtils = __webpack_require__(26243);
var _Color = _interopRequireDefault(__webpack_require__(64974));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _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); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _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; }
/**
 *
 * @typedef {{}} PFDBockData
 * @property {string} tag
 */
/**
 * @typedef {{}} PFDLineData
 * @property {string} u
 * @property {string} v
 * @property {string} id
 *
 */

/**
 * @typedef {{}} PFDData
 * @property {PFDBockData[]} blocks
 * @property {PFDLineData[]} lines
 * @property {{}} diagram
 *
 */

/**
 * @augments CMDToolDelegate
 * @augments Fragment
 * @constructor
 */
function ProcessFlowDiagramEditor() {
  this.trace = new Error("ProcessFlowDiagramEditor");
  _Fragment["default"].call(this);
  _CMDTool.CMDToolDelegate.call(this);
  this.viewBoxCtrl = new PFDEViewBoxController(this);
  this.cmdRunner = new _CMDRunner["default"](this, _PFDECmd["default"]);
  this.cmdTool = new _CMDTool["default"]();
  this.dragTool = new PFDEDragTool(this);
  this.drawLineTool = new PFDEDrawLineTool(this);
  this.hangTool = new PFDEHangTool(this);
  this.selectTool = new PFDESelectTool(this);
  this.cmdTool.delegate = this;
  this.selectionCtrl = new PFDESelectionController(this);
  this.contextMenuCtr = new PFDEContextMenuController(this);
  this.history = new PFDEHistory(this);
  this._interactDelegate = null;
  /**
   *
   * @type {PFDELine[]}
   */
  this.lines = [];
  /**
   *
   * @type {PFDEBlock[]}
   */
  this.blocks = [];
  this.interactDelegate = new PFDEInteractDelegate();
  if (!ProcessFlowDiagramEditor.optimizer) {
    ProcessFlowDiagramEditor.optimizer = new _Thread["default"]({
      methods: {
        PFDEGraphOptimizerFactor: _PFDEGraphOptimizerFactor["default"]
      },
      extendCode: 'PFDEGraphOptimizerFactor(self)'
    });
    ProcessFlowDiagramEditor.optimizer.findBetterPositions = function (originPositions, lines, timeout) {
      return this.invoke.apply(this, ['findBetterPositions'].concat(Array.prototype.slice.call(arguments)));
    };
  }
  this.optimizer = ProcessFlowDiagramEditor.optimizer;
}
_OOP["default"].mixClass(ProcessFlowDiagramEditor, _Fragment["default"], _CMDTool.CMDToolDelegate);
ProcessFlowDiagramEditor.prototype.createView = function () {
  var _this = this;
  this.$view = (0, _FCore._)({
    "class": ['as-cde', 'as-process-flow-diagram-editor'],
    attr: {
      tabindex: 1
    },
    child: [{
      "class": 'as-cde-header',
      child: [this.cmdTool.getView()]
    }, {
      tag: _Hanger["default"],
      "class": 'as-cde-body',
      child: [_GCore["default"]._({
        tag: _SvgViewBox["default"].tag,
        "class": 'pfde-graphic-canvas',
        child: [{
          tag: 'defs',
          child: []
        }, {
          tag: 'g',
          "class": 'pfde-line-layer'
        }, {
          tag: 'g',
          "class": 'pfde-intermediate-point-layer'
        }]
      }), {
        "class": 'as-cde-node-layer',
        style: {
          left: '10px',
          top: '10px'
        },
        child: []
      }, {
        "class": 'as-cde-loading-modal',
        child: {
          "class": 'as-cde-loading',
          child: 'cube-loading-ico'
        }
      }, {
        tag: 'vscrollbar',
        "class": 'as-cde-v-scroll-bar'
      }, {
        tag: 'hscrollbar',
        "class": 'as-cde-h-scroll-bar'
      }]
    }],
    props: {
      pfde: this
    }
  });
  this.$body = (0, _FCore.$)('.as-cde-body', this.$view);
  this.$vscrollbar = (0, _FCore.$)('.as-cde-v-scroll-bar', this.$view);
  this.$hscrollbar = (0, _FCore.$)('.as-cde-h-scroll-bar', this.$view);
  this.$graphicLayer = (0, _FCore.$)('.pfde-graphic-canvas', this.$view);
  this.$lineLayer = (0, _FCore.$)('.pfde-line-layer', this.$view);
  this.$intermediatePointLayer = (0, _FCore.$)('.pfde-intermediate-point-layer', this.$view);
  (0, _FCore._)({
    tag: _Hanger["default"],
    elt: this.$graphicLayer
  });
  this.$lineDefs = (0, _FCore.$)('defs', this.$graphicLayer);
  this.$graphicLayer.box.origin = new _Vec["default"](10, 10);
  this.$domSignal = (0, _FCore._)('attachhook').addTo(this.$view);
  this.domSignal = new _DomSignal["default"](this.$domSignal);
  this.$attachhook = (0, _FCore._)('attachhook').addTo(this.$view).on('attached', function () {
    _ResizeSystem["default"].add(_this.$attachhook);
  });
  this.$view.requestUpdateSize = function () {
    _this.viewBoxCtrl.ev_resize();
  };
  this.$attachhook.requestUpdateSize = this.$view.requestUpdateSize;
  var counter = 1000;
  var waitView = function waitView() {
    if (_this.$view.getBoundingClientRect().height < 10 && counter--) {
      setTimeout(waitView, 100);
    } else {
      _ResizeSystem["default"].update();
    }
  };
  waitView();

  /**
   *
   * @type {Hanger}
   */
  this.$nodeLayer = (0, _FCore.$)('.as-cde-node-layer', this.$view);
  this.$view.on('keydown', this.ev_cmdKeyDown.bind(this));
  this.viewBoxCtrl.onCreateView();
  this.dragTool.onCreateView();
  // this.lineSelectionCtrl.onCreateView();
  // this.blockSelectionCtrl.onCreateView();
  this.drawLineTool.onCreateView();
  this.contextMenuCtr.onCreateView();
  this.hangTool.onCreateView();
  this.selectTool.onCreateView();
  this.history.getWindow();
};
ProcessFlowDiagramEditor.prototype.getCmdGroupTree = function () {
  var res = ['insertProcessBlock', 'insertSubProcedureBlock', 'delete',
  //'toggleHistory',
  // 'undo', 'redo',
  'openHangTool', 'openSelectTool', 'openDrawLineTool', 'lineColor',
  // 'autoAlignPosition',
  'alignTopEdge', 'alignVerticalCenter', 'alignBottomEdge', 'alignLeftEdge', 'alignHorizontalCenter', 'alignRightEdge', 'distributeHorizontalLeft', 'distributeHorizontalCenter', 'distributeHorizontalRight', 'distributeVerticalTop', 'distributeVerticalCenter', 'distributeVerticalBottom'];
  if (location.href.indexOf('localhost') >= 0) {
    res.unshift('save');
  }
  return res;
};
ProcessFlowDiagramEditor.prototype.getCmdDescriptor = function (name) {
  var res = _CMDTool.CMDToolDelegate.prototype.getCmdDescriptor.apply(this, arguments);
  Object.assign(res, _CmdDescriptors["default"][name]);
  switch (name) {
    case 'undo':
      res.disabled = !this.history.canUndo();
      break;
    case 'redo':
      res.disabled = !this.history.canRedo();
      break;
    case 'delete':
      // res.disabled = !this.lineSelectionCtrl.canDelete() && !this.blockSelectionCtrl.canDelete();
      break;
    case 'openHangTool':
      res.checked = this.hangTool.isActivated;
      break;
    case 'openSelectTool':
      res.checked = this.selectTool.isActivated;
      break;
    case 'openDrawLineTool':
      res.checked = this.drawLineTool.isActivated;
      break;
    case 'lineColor':
      res.value = this.selectTool.getSelectedLineColor();
  }
  return res;
};
ProcessFlowDiagramEditor.prototype.onStart = function () {
  this.cmdTool.start(true);
};
ProcessFlowDiagramEditor.prototype.onResume = function () {
  this.cmdTool.resume();
};
ProcessFlowDiagramEditor.prototype.normalizeData = function (data) {
  data = Object.assign({}, data);
  data.diagram = data.diagram || {};
  var positions = data.diagram.positions; //old version
  delete data.diagram.positions;
  data.diagram.blocks = data.diagram.blocks || {}; //by id
  data.diagram.lines = data.diagram.lines || {}; //by id

  //adapt old version
  if (positions) Object.keys(positions).forEach(function (id) {
    if (!data.diagram.blocks[id]) {
      data.diagram.blocks[id] = {};
    }
    data.diagram.blocks[id].position = positions[id];
  });
  var d = 0;
  if (!(data.blocks instanceof Array)) data.blocks = [];
  if (!(data.lines instanceof Array)) data.lines = [];
  data.blocks.forEach(function (blk) {
    if (!blk.attributes) blk.attributes = {};
    var id = blk.attributes.id;
    if (typeof id === "string" && id.trim().length === 0 || typeof id !== "number" && typeof id !== "string") {
      id = (0, _stringGenerate.randomIdent)(5);
      blk.attributes.id = id;
    }
    if (!data.diagram.blocks[id]) {
      data.diagram.blocks[id] = {};
    }
    if (!data.diagram.blocks[id].position) {
      data.diagram.blocks[id].position = {
        x: d++ * 150,
        y: 0
      };
    }
  });
  var autoIdDict = {};
  data.lines.forEach(function (lData) {
    var id = lData.id;
    var counter = 0;
    var idPrefix;
    if (!id) {
      idPrefix = 'atid_' + lData.u + '_' + lData.v;
      id = idPrefix;
      while (autoIdDict[id]) {
        id = idPrefix + '_' + counter++;
      }
      lData.id = id;
    }
    autoIdDict[id] = true;
    var extraData = data.diagram.lines[id];
    if (!extraData) {
      extraData = {};
      data.diagram.lines[id] = extraData;
    }
    var hash, color, hsla; //auto color
    if (!extraData.color) {
      hash = (0, _stringUtils.stringHashCode)(id + '');
      hash = Math.abs(hash) % (256 * 256 * 256);
      color = _Color["default"].parse('#' + ('00000' + hash.toString(16)).slice(-6));
      hsla = color.toHSLA();
      if (hsla[2] > 0.8) {
        hsla[2] -= 0.4;
        color = _Color["default"].fromHSLA.apply(_Color["default"], _toConsumableArray(hsla));
      }
      extraData.color = color.toString('hex6');
    }
  });
  return data;
};
ProcessFlowDiagramEditor.prototype.setData = function (data) {
  data = this.normalizeData(data);
  if (data.diagram.screen && data.diagram.screen.origin) {
    this.viewBoxCtrl.origin = data.diagram.screen.origin;
  }
  // console.log("Set Data", data);
  this.applyData(data);
  this.commitHistory('set-data', 'Set Data');
};
ProcessFlowDiagramEditor.prototype.applyData = function (data) {
  var _this2 = this;
  while (this.blocks.length > 0) {
    this.blocks[0].remove(true);
  }
  var blockById = {};
  (data && data.blocks || []).forEach(function (bData) {
    var Clazz = {
      Start: _PFDEBlocks.PFDEBStart,
      Success: _PFDEBlocks.PFDEBSuccess,
      Fail: _PFDEBlocks.PFDEBFail,
      Process: _PFDEBlocks.PFDEBProcess,
      Common: _PFDEBlocks.PFDEBProcess,
      SubProcedure: _PFDEBlocks.PFDEBSubProcedure
    }[bData.tag];
    var opt = {
      attributes: bData.attributes
    };
    var id = bData.attributes && bData.attributes.id;
    if (data.diagram && data.diagram.blocks && data.diagram.blocks[id].position) {
      opt.position = data.diagram.blocks[id].position;
    }
    var blk;
    if (Clazz) {
      blk = new Clazz(_this2, opt);
      blockById[blk.id] = blk;
    } else {
      console.error("Can not handle block", bData);
    }
  });
  (data && data.lines || []).forEach(function (lData) {
    var extraData = Object.assign({}, lData, data.diagram.lines[lData.id]);
    if (data.diagram && data.diagram.lineIntermediatePoints && data.diagram.lineIntermediatePoints[lData.id]) {
      //adapt old version
      extraData.intermediatePoints = data.diagram.lineIntermediatePoints[lData.id];
    }
    if (blockById[lData.u] && blockById[lData.v]) {
      new _PFDELine["default"](_this2, blockById[lData.u], blockById[lData.v], lData, extraData);
    }
  });
  this.updateVisibility();
};
ProcessFlowDiagramEditor.prototype.getData = function () {
  var res = {};
  res.blocks = this.blocks.map(function (blk) {
    return blk.exportData();
  });
  res.lines = this.lines.map(function (ln) {
    return ln["export"]();
  });
  /**
   *
   * @type {{blocks: {}, lines: {}, screen: {}}}
   */
  res.diagram = {
    blocks: {},
    lines: {},
    screen: {}
  };
  this.blocks.reduce(function (ac, block) {
    var id = block.attributes.id;
    var da = block.exportDiagram();
    if (!ac.blocks[id]) ac.blocks[id] = {};
    ac.blocks[id].position = {
      x: da.position.x,
      y: da.position.y
    };
    return ac;
  }, res.diagram);
  res.diagram = this.lines.reduce(function (ac, line) {
    var id = line.id;
    ac.lines[id] = line.exportDiagram();
    return ac;
  }, res.diagram);
  res.diagram.screen.origin = {
    x: this.viewBoxCtrl.origin.x,
    y: this.viewBoxCtrl.origin.y
  };
  return res;
};
ProcessFlowDiagramEditor.prototype.newBlock = function (bData) {
  var Clazz = {
    Start: _PFDEBlocks.PFDEBStart,
    Success: _PFDEBlocks.PFDEBSuccess,
    Fail: _PFDEBlocks.PFDEBFail,
    Process: _PFDEBlocks.PFDEBProcess,
    Common: _PFDEBlocks.PFDEBProcess,
    SubProcedure: _PFDEBlocks.PFDEBSubProcedure
  }[bData.tag];
  var opt = {
    attributes: bData.attributes
  };
  var id = bData.attributes && bData.attributes.id;
  if (data.diagram && data.diagram.positions && data.diagram.positions[id]) {
    opt.position = data.diagram.positions[id];
  }
  var blk;
  if (Clazz) {
    blk = new Clazz(this, opt);
  } else {
    console.error("Can not handle block", bData);
  }
  return blk;
};
ProcessFlowDiagramEditor.prototype.clearUndoHistory = function () {
  this.history.clear();
};
ProcessFlowDiagramEditor.prototype.commitHistory = function (type, des) {
  this.history.commit(type, this.getData(), des);
  this.updateVisibility();
};
ProcessFlowDiagramEditor.prototype.getSummaryHistory = function () {
  return this.history.getSummary();
};
ProcessFlowDiagramEditor.prototype.getBlockById = function (id) {
  return this.blocks.find(function (block) {
    return block.attributes.id === id;
  });
};
ProcessFlowDiagramEditor.prototype.autoAlignPosition = function () {
  var _this3 = this;
  var originPositions = this.blocks.reduce(function (ac, block) {
    ac[block.attributes.id] = Object.assign({}, block.bound.centerPoint());
    return ac;
  }, {});
  var lines = this.lines.map(function (line) {
    return {
      u: line.u.attributes.id,
      v: line.v.attributes.id
    };
  });
  var sizes = this.blocks.reduce(function (ac, block) {
    ac[block.attributes.id] = {
      width: block.bound.width,
      height: block.bound.height
    };
    return ac;
  }, {});
  this.optimizer.findBetterPositions(originPositions, sizes, lines, 2000).then(function (result) {
    _this3.blocks.forEach(function (block) {
      block.position = {
        x: result[block.attributes.id].x - block.bound.width / 2,
        y: result[block.attributes.id].y - block.bound.height / 2
      };
    });
  });
};
Object.defineProperty(ProcessFlowDiagramEditor.prototype, 'interactDelegate', {
  set: function set(value) {
    value = value || new PFDEInteractDelegate(); //default
    this._interactDelegate = value;
    value.pfdePartner = this;
  },
  get: function get() {
    return this._interactDelegate;
  }
});
ProcessFlowDiagramEditor.prototype.ev_cmdKeyDown = function (event) {
  var target = event.target;
  while (target) {
    if (target === this.$view) break;
    if (target.contentEditable) return;
    if (target.getAttribute && target.getAttribute('tabindex')) return;
    target = target.parentElement;
  }
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  // console.log(key)
  if (!this.key2Cmd) {
    this.key2Cmd = Object.keys(_PFDECmd["default"]).reduce(function (ac, cmdName) {
      var des = _CmdDescriptors["default"][cmdName];
      if (des && des.bindKey && des.bindKey.win) {
        ac[des.bindKey.win] = cmdName;
      }
      return ac;
    }, {});
  }
  var cmdName = this.key2Cmd[key];
  if (this.cmdRunner.has(cmdName)) {
    this.cmdRunner.invoke(cmdName);
    event.preventDefault();
  }
};
var _default = ProcessFlowDiagramEditor;
/**
 * @extends ViewBoxController
 * @param {ProcessFlowDiagramEditor} editor
 * @constructor
 */
exports["default"] = _default;
function PFDEViewBoxController(editor) {
  this.editor = editor;
  for (var key in this) {
    if (typeof this[key] === 'function') {
      this[key] = this[key].bind(this);
    }
  }
}
PFDEViewBoxController.prototype.onCreateView = function () {
  this.$body = this.editor.$body;
  this.$lineLayer = this.editor.$lineLayer;
  this.$nodeLayer = this.editor.$nodeLayer;
  this.$graphicLayer = this.editor.$graphicLayer;
};
PFDEViewBoxController.prototype.getNodes = function () {
  return this.editor.blocks.map(function (blk) {
    return blk.domElt;
  });
};
PFDEViewBoxController.prototype.ev_resize = function () {
  //todo: update scrollbar
};
PFDEViewBoxController.prototype.updateScrollbar = function () {
  // console.log('update scroll bar')
};
Object.defineProperty(PFDEViewBoxController.prototype, 'origin', {
  set: function set(value) {
    if (value && (0, _utils2.isRealNumber)(value.x) && (0, _utils2.isRealNumber)(value.y)) {
      this.$graphicLayer.box.origin = new _Vec["default"](value.x, value.y);
      this.$nodeLayer.addStyle({
        left: value.x + 'px',
        top: value.y + 'px'
      });
      this.updateScrollbar();
    }
  },
  get: function get() {
    return this.$graphicLayer.box.origin.copy();
  }
});

/**
 * @extends Context
 * @param {ProcessFlowDiagramEditor} editor
 * @constructor
 */
function PFDEHangTool(editor) {
  _Context["default"].call(this);
  this.editor = editor;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.eventHistory = [];
}
(0, _OOP.mixClass)(PFDEHangTool, _Context["default"]);
PFDEHangTool.prototype.onCreateView = function () {
  this.$body = this.editor.$body;
  this.$body.on('wheel', this.ev_wheel);
  this.$graphicLayer = this.editor.$graphicLayer;
  this.$graphicLayer.on('mousedown', this.ev_mouseDown);
};
PFDEHangTool.prototype.onResume = function () {
  this.$body.addClass('pfde-hanging-tool-active');
  this.editor.updateVisibility('openHangTool');
};
PFDEHangTool.prototype.onPause = function () {
  this.$body.removeClass('pfde-hanging-tool-active');
  this.editor.updateVisibility('openHangTool');
};
PFDEHangTool.prototype._pushEvent = function (event) {
  var _this4 = this;
  var cpEvent = {
    button: event.button,
    type: event.type,
    target: event.target,
    clientX: event.clientX,
    clientY: event.clientY,
    shiftKey: event.shiftKey,
    timestamp: Date.now()
  };
  if ('which' in event) cpEvent.which = event.which;
  this.eventHistory.push(cpEvent);
  while (this.eventHistory.length > 20) {
    this.eventHistory.shift();
  }
  if (cpEvent.type === 'mousedown') {
    document.addEventListener('mouseup', this.ev_mouseUp);
    document.addEventListener('mousemove', this.ev_mouseMove);
  } else if (cpEvent.type === 'mouseup') {
    document.removeEventListener('mouseup', this.ev_mouseUp);
    document.removeEventListener('mousemove', this.ev_mouseMove);
  }
  var checkDblClick = function checkDblClick() {
    if (_this4.eventHistory.length < 2) return false;
    var cEv;
    var state = 'init';
    var initPos = new _Vec["default"](0, 0);
    var prevTime = Infinity;
    //state: init, up, down, up1, down1
    for (var i = _this4.eventHistory.length - 1; i >= 0; --i) {
      cEv = _this4.eventHistory[i];
      switch (state) {
        case 'init':
          if (cEv.type !== 'mouseup') return false;
          state = 'up';
          initPos = new _Vec["default"](cEv.clientX, cEv.clientY);
          prevTime = cEv.timestamp;
          break;
        case 'up':
          if (prevTime - cEv.timestamp > 500) {
            return false;
          } else if (cEv.type === 'mousemove') {
            if (initPos.sub(new _Vec["default"](cEv.clientX, cEv.clientY)).abs() > 10) return false;
          } else if (cEv.type === 'mousedown') {
            if (cEv.target !== _this4.$lineLayer || !(0, _EventEmitter.isMouseLeft)(cEv)) return false;
            state = 'down';
            prevTime = cEv.timestamp;
          } else {
            return false;
          }
          break;
        case 'down':
          if (cEv.type === 'mouseup') {
            if (prevTime - cEv.timestamp < 500) {
              state = 'up1';
            } else {
              return false;
            }
          } else if (cEv.type === 'mousemove') {
            if (initPos.sub(new _Vec["default"](cEv.clientX, cEv.clientY)).abs() > 10) return false;
          } else {
            return false;
          }
          break;
        case 'up1':
          if (cEv.type === 'mousedown') {
            if (cEv.target !== _this4.$graphicLayer || !(0, _EventEmitter.isMouseLeft)(cEv)) return false;
            if (prevTime - cEv.timestamp < 500) {
              state = 'down1';
              return true;
            } else {
              return false;
            }
          } else if (cEv.type === 'mousemove') {
            if (initPos.sub(new _Vec["default"](cEv.clientX, cEv.clientY)).abs() > 10) return false;
          } else {
            return false;
          }
          break;
      }
    }
    return false;
  };
  var checkMiddleDrag = function checkMiddleDrag() {
    if (_this4.eventHistory.length === 0) return false;
    var cEv = _this4.eventHistory[_this4.eventHistory.length - 1];
    var delta;
    if (cEv.type === 'mousedown' && ((0, _EventEmitter.isMouseMiddle)(cEv) || _this4.$body.hasClass('pfde-hanging-tool-active'))) {
      if (cEv.target !== _this4.$graphicLayer) return false;
      _this4._dragData = {
        state: 'start',
        startingPoint: new _Vec["default"](cEv.clientX, cEv.clientY),
        startingOrigin: _this4.editor.viewBoxCtrl.origin
      };
      document.body.classList.add('pfde-hanging-tool-dragging');
      _this4.editor.updateVisibility('openHangTool');
      return true;
    } else if (cEv.type === 'mousemove' && _this4._dragData) {
      delta = new _Vec["default"](cEv.clientX, cEv.clientY).sub(_this4._dragData.startingPoint);
      _this4.editor.viewBoxCtrl.origin = _this4._dragData.startingOrigin.add(delta);
      return true;
    } else if (cEv.type === 'mouseup' && _this4._dragData) {
      _this4._dragData = null;
      document.body.classList.remove('pfde-hanging-tool-dragging');
      _this4.editor.updateVisibility('openHangTool');
      return true;
    }
  };
  [checkDblClick, checkMiddleDrag].some(function (fn) {
    return fn();
  });
};
PFDEHangTool.prototype.ev_wheel = function (event) {
  var d = event.deltaY < 0 ? 100 : -100;
  this.editor.viewBoxCtrl.origin = this.editor.viewBoxCtrl.origin.add(new _Vec["default"](event.shiftKey ? d : 0, event.shiftKey ? 0 : d));
};
PFDEHangTool.prototype.ev_mouseDown = function (event) {
  this._pushEvent(event);
};
PFDEHangTool.prototype.ev_mouseUp = function (event) {
  this._pushEvent(event);
};
PFDEHangTool.prototype.ev_mouseMove = function (event) {
  this._pushEvent(event);
};
Object.defineProperty(PFDEHangTool.prototype, 'isActivated', {
  get: function get() {
    if (this._dragData) return true;
    if (this.$body && this.$body.hasClass('pfde-hanging-tool-active')) return true;
    return false;
  }
});

/**
 * @extends Context
 * @param {ProcessFlowDiagramEditor} editor
 * @constructor
 */
function PFDESelectTool(editor) {
  _Context["default"].call(this);
  this.editor = editor;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.slState = "NONE";
  this._dragData = null;
  this.$selectedArea = null;
  this.goToState('NONE');
}
(0, _OOP.mixClass)(PFDESelectTool, _Context["default"]);
PFDESelectTool.prototype.states = {
  NONE: {
    /**
     * @this PFDESelectTool
     * @param event
     */
    onMouseDown: function onMouseDown(event) {
      if (this.editor.drawLineTool.isActivated) return;
      if (this.editor.hangTool.isActivated) return;
      if (!(0, _EventEmitter.isMouseLeft)(event)) return;
      var object = this.editor.selectionCtrl.findObject(event.target);
      if (object) {
        if (this.editor.selectionCtrl.isSelected(object)) {
          this.goToState('WAIT_CLICK', object, event);
        } else {
          this.editor.selectionCtrl.select(object, event.ctrlKey || event.shiftKey);
          this.goToState("NONE");
        }
      } else {
        this.goToState('MOUSE_DOWN', event);
      }
    }
  },
  MOUSE_DOWN: {
    enter: function enter(prevState, event) {
      if (this.editor.drawLineTool.isActivated) return;
      if (this.editor.hangTool.isActivated) return;
      if (!(0, _EventEmitter.isMouseLeft)(event)) return;
      var object = this.editor.selectionCtrl.findObject(event.target);
      if (object) {
        if (this.editor.selectionCtrl.isSelected(object)) {
          this.goToState('WAIT_CLICK', object, event);
        } else {
          this.editor.selectionCtrl.select(object, event.ctrlKey);
          this.goToState("NONE");
        }
      } else {
        this.goToState('WAIT_AREA_SELECT', event);
      }
    }
  },
  WAIT_AREA_SELECT: {
    enter: function enter(event) {
      this.startingPoint = new _Vec["default"](event.clientX, event.clientY);
    },
    onMouseMove: function onMouseMove(event) {
      var currentPoint = new _Vec["default"](event.clientX, event.clientY);
      if (currentPoint.sub(this.startingPoint).abs() > this.hangOn) {
        this.goToState('DRAGGING', event);
      }
    },
    onMouseUp: function onMouseUp(event) {
      this.goToState('CLICK_NONE', event);
    }
  },
  DRAG_FINISHED: {},
  CLICK_NONE: {
    /**
     * @this PFDESelectTool
     */
    enter: function enter() {
      this.editor.selectionCtrl.unSelectAll();
      this.goToState('NONE');
    }
  },
  WAIT_CLICK: {
    /**
     * @this PFDESelectTool
     * @param prevState
     * @param object
     * @param event
     */
    enter: function enter(prevState, object, event) {
      this.waitClickObject = object;
      this.isAppend = event.ctrlKey || event.shiftKey;
      this.startingPoint = new _Vec["default"](event.clientX, event.clientY);
    },
    /**
     * @this PFDESelectTool
     */
    leave: function leave() {},
    /**
     * @this PFDESelectTool
     */
    onMouseMove: function onMouseMove(event) {
      var currentPoint = new _Vec["default"](event.clientX, event.clientY);
      if (currentPoint.sub(this.startingPoint).abs() > this.hangOn) {
        this.goToState('CLICK_FAIL');
      }
    },
    onMouseUp: function onMouseUp(event) {
      this.goToState('CLICK_OK');
    }
  },
  CLICK_FAIL: {
    onMouseUp: function onMouseUp() {
      this.goToState('NONE');
    },
    leave: function leave() {
      this.waitClickObject = null;
      this.isAppend = false;
    }
  },
  CLICK_OK: {
    /**
     * @this PFDESelectTool
     */
    enter: function enter() {
      this.editor.selectionCtrl.select(this.waitClickObject, this.isAppend);
      this.goToState('NONE');
    },
    leave: function leave() {
      this.waitClickObject = null;
      this.isAppend = false;
    }
  }
};
PFDESelectTool.prototype.goToState = function (state) {
  var prevState = this.slState;
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }
  if (this.states[prevState] && this.states[prevState].leave) {
    var _this$states$prevStat;
    (_this$states$prevStat = this.states[prevState].leave).call.apply(_this$states$prevStat, [this, state].concat(args));
  }
  this.slState = state;
  if (this.states[state] && this.states[state].enter) {
    var _this$states$state$en;
    (_this$states$state$en = this.states[state].enter).call.apply(_this$states$state$en, [this, prevState].concat(args));
  }
  this.editor.updateVisibility('openSelectTool');
};
PFDESelectTool.prototype.hangOn = 3;
PFDESelectTool.prototype.onCreateView = function () {
  this.$body = this.editor.$body;
  this.$body.on('mousedown', this.ev_mouseDown);
  this.$lineLayer = this.editor.$lineLayer;
};
PFDESelectTool.prototype.onResume = function () {
  this.editor.updateVisibility('openSelectTool');
};
PFDESelectTool.prototype.onPause = function () {
  this.editor.updateVisibility('openSelectTool');
};
PFDESelectTool.prototype.isMouseLeftIdent = function (ident) {
  return ident === 'w_1' || ident === 'b_0';
};

/**
 *
 * @param {MouseEvent} event
 */
PFDESelectTool.prototype.ev_mouseDown = function (event) {
  (0, _utils.documentOn)('mouseup', this.ev_mouseUp);
  (0, _utils.documentOn)('mousemove', this.ev_mouseMove);
  if (this.states[this.slState] && this.states[this.slState].onMouseDown) {
    this.states[this.slState].onMouseDown.call(this, event);
  }

  // var buttonIdent = ('which' in event) ? ('w_' + event.which) : ('b_' + event.button);
  // if (!this.isMouseLeftIdent(buttonIdent)) return;
  // if (this.editor.drawLineTool.isActivated) return;
  // if (this.editor.hangTool.isActivated) return;
  // var object = this.editor.selectionCtrl.findObject(event.target);
  // if (object && !this.editor.selectionCtrl.isSelected(object)) {
  //     this.editor.selectionCtrl.select(object, event.ctrlKey);
  // }
  //
  // document.addEventListener('mouseup', this.ev_mouseUp);
  // document.addEventListener('mousemove', this.ev_mouseMove);
  // this._dragData = {
  //     state: 'init',
  //     startingMousePoint: new Vec2(event.clientX, event.clientY),
  //     target: event.target,
  //     buttonIdent: buttonIdent,
  //     startingOrigin: this.editor.viewBoxCtrl.origin,
  //     objects: object ? [object] : []
  // };
};

PFDESelectTool.prototype.ev_mouseMove = function (event) {
  if (this.states[this.slState] && this.states[this.slState].onMouseMove) {
    this.states[this.slState].onMouseMove.call(this, event);
  }
  // var buttonIdent = ('which' in event) ? ('w_' + event.which) : ('b_' + event.button);
  // if (this._dragData.buttonIdent !== buttonIdent) return;
  // var currentMousePoint = new Vec2(event.clientX, event.clientY);
  // if (this._dragData.state === 'init') {
  //     if (currentMousePoint.sub(this._dragData.startingMousePoint).abs() > this.hangOn) {
  //         if (this._dragData.objects.length > 0) {
  //             this._dragData.state = 'other'; //move tool will trigger
  //         }
  //         else {
  //             this._dragData.state = 'dragging';
  //             this._dragData.currentMousePoint = currentMousePoint;
  //             this._dragData.currentOrigin = this.editor.viewBoxCtrl.origin;
  //
  //             if (!this.$selectedArea) {
  //                 this.$selectedArea = _({
  //                     class: 'pfde-selecting-area',
  //                 });
  //             }
  //             this.$body.addChild(this.$selectedArea);
  //             this.editor.updateVisibility('openSelectTool');
  //         }
  //     }
  // }
  // else if (this._dragData.state === 'dragging') {
  //     this._dragData.currentMousePoint = currentMousePoint;
  //     this._dragData.currentOrigin = this.editor.viewBoxCtrl.origin;
  //
  // }
  // this.updateSelectingArea();
};

PFDESelectTool.prototype.ev_mouseUp = function (event) {
  (0, _utils.documentOff)('mouseup', this.ev_mouseUp);
  (0, _utils.documentOff)('mousemove', this.ev_mouseMove);
  if (this.states[this.slState] && this.states[this.slState].onMouseUp) {
    this.states[this.slState].onMouseUp.call(this, event);
  }
  // document.removeEventListener('mouseup', this.ev_mouseUp);
  // document.removeEventListener('mousemove', this.ev_mouseMove);
  // var rect;
  // var objects;
  // if (this._dragData.state === 'dragging') {
  //     objects = this._dragData.objects;
  //     objects.forEach((obj, i) => {
  //         this.editor.selectionCtrl.select(obj, i > 0 || event.ctrlKey);
  //
  //     });
  // }
  // else if (this._dragData.state === 'init') {
  //     if (this.editor.selectionCtrl.isSelected(this._dragData.object) && event.ctrlKey) {
  //         this.editor.selectionCtrl.focusTo(this._dragData.object);
  //     }
  // }
  //
  // if (this.$selectedArea)
  //     this.$selectedArea.remove();
  // this._dragData = null;
  // this.editor.updateVisibility('openSelectTool');
};

PFDESelectTool.prototype.getSelectedLineColor = function () {
  var lines = this.editor.selectionCtrl.getSelectedObjectsByType('LINE');
  if (lines.length === 1) {
    return lines[0].color;
  }
  return 'black';
};
PFDESelectTool.prototype.updateSelectingArea = function () {
  if (!this.$selectedArea) return;
  if (!this._dragData || this._dragData.state !== 'dragging') return;
  var bodyBound = this.$body.getBoundingClientRect();
  var deltaV = this._dragData.currentOrigin.sub(this._dragData.startingOrigin);
  var A = this._dragData.startingMousePoint.add(deltaV);
  A = A.sub(new _Vec["default"](bodyBound.left, bodyBound.top));
  var B = this._dragData.currentMousePoint;
  B = B.sub(new _Vec["default"](bodyBound.left, bodyBound.top));
  var rect = _Rectangle["default"].boundingPoints([A, B]);
  var oldDict = this._dragData.objects.reduce(function (ac, cr) {
    ac[cr.id] = cr;
    return ac;
  }, {});
  var selectRect = rect.clone();
  selectRect.x -= this.editor.viewBoxCtrl.origin.x;
  selectRect.y -= this.editor.viewBoxCtrl.origin.y;
  var newObjects = this.getIntermediatePointsByRect(selectRect).concat(this.getBlocksByRect(selectRect));
  var newDict = newObjects.reduce(function (ac, cr) {
    ac[cr.id] = cr;
    return ac;
  }, {});
  this._dragData.objects = this._dragData.objects.filter(function (x) {
    return !!newDict[x.id];
  }).concat(newObjects.filter(function (x) {
    return !oldDict[x.id];
  }));
  this.$selectedArea.addStyle({
    left: rect.x + 'px',
    top: rect.y + 'px',
    width: rect.width + 'px',
    height: rect.height + 'px'
  });
};

/**
 *
 * @param {Rectangle} rect
 * @returns {*[]}
 */
PFDESelectTool.prototype.getIntermediatePointsByRect = function (rect) {
  var lines = this.editor.lines;
  var res = [];
  var i, j;
  var point, points;
  for (i = 0; i < lines.length; ++i) {
    points = lines[i].intermediatePoints;
    for (j = 0; j < points.length; ++j) {
      point = points[j];
      if (rect.containsPoint(point)) {
        res.push(point);
      }
    }
  }
  return res;
};

/**
 *
 * @param {Rectangle} rect
 * @returns {*[]}
 */
PFDESelectTool.prototype.getBlocksByRect = function (rect) {
  var blocks = this.editor.blocks;
  var res = [];
  var block, blockRect;
  for (var i = 0; i < blocks.length; ++i) {
    block = blocks[i];
    blockRect = _Rectangle["default"].fromClientRect(block.domElt.getBoundingClientRect());
    blockRect.x = block.position.x;
    blockRect.y = block.position.y;
    if (rect.collapsedSquare(blockRect) > 0) {
      res.push(block);
    }
  }
  return res;
};
Object.defineProperty(PFDESelectTool.prototype, 'isActivated', {
  get: function get() {
    return this.state === "RUNNING" || this._dragData && this._dragData.state === 'dragging';
  }
});

/**
 * @param {ProcessFlowDiagramEditor} editor
 * @constructor
 */
function PFDEDragTool(editor) {
  this.editor = editor;

  /**
   *
   * @type {PFDEBlock[]|null}
   */
  this.objects = null;
  this.hitObject = null;
  /**
   *
   * @type {Vec2}
   */
  this.startingOrigin = _Vec["default"].ZERO;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.hangerListener = {
    dragstart: this.ev_dragStart,
    drag: this.ev_drag,
    dragend: this.ev_dragEnd,
    dragdeinit: this.ev_dragDeinit
  };
}
PFDEDragTool.prototype.onCreateView = function () {
  this.editor.$body.hangOn = 3;
  this.editor.$body.on({
    draginit: this.ev_dragInit.bind(this)
  });
};
PFDEDragTool.prototype.findHitObject = function (target) {
  while (target && target !== this.editor.$nodeLayer && ['INPUT', 'TEXTAREA', 'BUTTON'].indexOf(target.tagName) < 0) {
    if (target.headerOfPFDEBlock) {
      return target.headerOfPFDEBlock;
    } else if (target.pfdeIntermediatePoint) {
      return target.pfdeIntermediatePoint;
    }
    target = target.parentElement;
  }
  return null;
};
PFDEDragTool.prototype.ev_dragInit = function (event) {
  if (this.editor.drawLineTool.isActivated) return;
  this.hitObject = this.findHitObject(event.target);
  if (!this.hitObject) return;
  this.startingOrigin = this.editor.viewBoxCtrl.origin;
  this.editor.$body.on(this.hangerListener);
};
PFDEDragTool.prototype.ev_dragStart = function (event) {
  this.objects = this.editor.selectionCtrl.getSelectedObjectsByType("BLOCK", "INTERMEDIATE_POINT");
  this.positions = this.objects.map(function (obj) {
    return obj.position;
  });
};
PFDEDragTool.prototype.ev_drag = function (event) {
  var _this5 = this;
  var originDelta = this.startingOrigin.sub(this.editor.viewBoxCtrl.origin);
  var delta = event.currentPoint.sub(event.startingPoint);
  this.objects.forEach(function (obj, i) {
    obj.position = _this5.positions[i].add(delta).add(originDelta);
  });
};
PFDEDragTool.prototype.ev_dragEnd = function (event) {
  // this.editor.commitHistory('move', 'Move')
};
PFDEDragTool.prototype.ev_dragDeinit = function (event) {
  this.editor.$body.off(this.hangerListener);

  // this.editor.$body.off(this.hangerListener);
  // setTimeout(() => {
  //     this.objects.forEach(blk => blk.dragging = false);
  //     if (this.objects.length === 1 && this.editor.blockSelectionCtrl.selectedObjects.indexOf(this.objects[0]) < 0) {
  //         this.editor.blockSelectionCtrl.select(this.objects[0]);
  //     }
  // }, 30);
};

/**
 * @extends Context
 * @param {ProcessFlowDiagramEditor} editor
 * @constructor
 */
function PFDEDrawLineTool(editor) {
  _Context["default"].call(this);
  this.editor = editor;
  this.mousePosition = new _Vec["default"](0, 0);
  /**
   *
   * @type {Object<string,{toId:number, block:PFDEBlock }>}
   */
  this.activeBlocks = {};
  this.hoveringObject = null;

  /**
   *
   * @type {"HOVERING_LINE"|"NONE"|"STARTING"|"STARTED"|"END"}
   */
  this.toolState = "NONE";
  this.startingBlock = null;
  this.endingBlock = null;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }

  //mousedown in line -> not move=. mouseup=> create a point
}

(0, _OOP.mixClass)(PFDEDrawLineTool, _Context["default"]);
PFDEDrawLineTool.prototype.onCreateView = function () {
  //hover event
  this.editor.$body.on('mouseover', this.ev_mouseOver, true);
  this.editor.$body.on('mouseleave', this.ev_mouseLeave, true);
  this.editor.$body.on('mousedown', this.ev_mouseDown);
  this.editor.$body.on('mousemove', this.ev_mouseMove);
  this.goToState('NONE');
};
PFDEDrawLineTool.prototype.onResume = function () {
  this.editor.updateVisibility('openDrawLineTool');
  this.editor.$body.addClass('pfde-draw-line-tool-active');
};
PFDEDrawLineTool.prototype.onPause = function () {
  this.editor.updateVisibility('openDrawLineTool');
  this.editor.$body.removeClass('pfde-draw-line-tool-active');
};
PFDEDrawLineTool.prototype.states = {
  NONE: {
    /**
     * @this PFDEDrawLineTool
     */
    enter: function enter() {
      this.startingBlock = null;
      this.endingBlock = null;
      // this.$newLine.addStyle('display', 'none');
      // documentOff('mouseup', this.ev_mouseUp);
    },

    /**
     * @this PFDEDrawLineTool
     */
    leave: function leave() {},
    /**
     * @this PFDEDrawLineTool
     */
    onMouseEnterBlock: function onMouseEnterBlock(block) {
      // this.goToState('STARTING');
    },
    /**
     * @this PFDEDrawLineTool
     * @param {PFDELine} line
     * @param {{}} event
     */
    onMouseEnterLine: function onMouseEnterLine(line, event) {
      if (this.state !== 'RUNNING') return;
      this.goToState('HOVERING_LINE');
    },
    onMouseEnterPoint: function onMouseEnterPoint(point, event) {
      if (this.state !== 'RUNNING') return;
      this.goToState('HOVERING_POINT');
    }
  },
  STARTING: {
    /**
     * @this PFDEDrawLineTool
     */
    enter: function enter() {
      // this.$newLine.removeStyle('display').attr('d', '');
    },
    leave: function leave() {}
  },
  STARTED: {
    enter: function enter() {},
    leave: function leave() {}
  },
  END: {
    enter: function enter() {
      this.makeNewLine();
      this.goToState('NONE');
    },
    leave: function leave() {}
  },
  HOVERING_LINE: {
    /**
     * @this PFDEDrawLineTool
     */
    enter: function enter() {
      this.activeLine = this.hoveringObject;
      this.newIntermediatePoint = new _PFDELine.PFDEIntermediatePoint(null, {});
      this.editor.$lineLayer.addChild(this.newIntermediatePoint.domElt);
    },
    /**
     * @this PFDEDrawLineTool
     */
    leave: function leave(nextState) {
      if (nextState !== 'HOVERING_LINE_DOWN' && this.newIntermediatePoint) {
        this.newIntermediatePoint.remove();
        this.newIntermediatePoint = null;
      }
    },
    /**
     * @this PFDEDrawLineTool
     */
    onMouseLeaveLine: function onMouseLeaveLine(line) {
      this.goToState('NONE');
    },
    /**
     * @this PFDEDrawLineTool
     */
    onMouseMove: function onMouseMove(event) {
      var line = this.activeLine;
      var viewPolylines = line.viewPolylines;
      var bestPolylineIdx = -1;
      var bestDistance = Infinity;
      var bestPoint;
      var i, param, polyline, dist, point;
      for (i = 0; i < viewPolylines.length; ++i) {
        polyline = viewPolylines[i];
        param = polyline.nearestParamToPoint(this.mousePosition);
        point = polyline.pointAt(param);
        dist = point.sub(this.mousePosition).abs();
        if (dist < bestDistance) {
          bestPoint = point;
          bestDistance = dist;
          bestPolylineIdx = i;
        }
      }
      this.newIntermediatePoint.position = bestPoint;
      this.newIntermediatePointIdx = bestPolylineIdx;
    },
    /**
     * @this PFDEDrawLineTool
     */
    onMouseDown: function onMouseDown(event) {
      this.goToState('HOVERING_LINE_DOWN');
    }
  },
  HOVERING_LINE_DOWN: {
    onMouseUp: function onMouseUp(event) {
      this.goToState('HOVERING_LINE_UP');
    }
  },
  HOVERING_LINE_UP: {
    /**
     * @this PFDEDrawLineTool
     */
    enter: function enter() {
      var _this6 = this;
      var newPoint = this.activeLine.addIntermediatePoint({
        x: this.newIntermediatePoint.x,
        y: this.newIntermediatePoint.y
      }, this.newIntermediatePointIdx);
      this.newIntermediatePoint.remove();
      this.editor.selectionCtrl.select(newPoint);
      setTimeout(function () {
        _this6.goToState('NONE');
        _this6.ev_mouseOver({
          target: _this6.hoveringObject.domElt
        });
      }, 10);
    }
  },
  HOVERING_POINT: {
    enter: function enter() {
      console.log('hovering point');
    },
    /**
     * @this PFDEDrawLineTool
     */
    onMouseDown: function onMouseDown() {
      this.goToState('POINT_HOLD');
    },
    onMouseLeavePoint: function onMouseLeavePoint(point) {
      this.goToState('NONE');
    }
  },
  POINT_HOLD: {
    enter: function enter() {
      this.activeIntPoint = this.hoveringObject;
      this.mouseStartPos = this.mousePosition;
      this.pointStartPos = this.activeIntPoint.position;
      this.editor.selectionCtrl.select(this.activeIntPoint);
    },
    onMouseMove: function onMouseMove(event) {
      var delta = this.mousePosition.sub(this.mouseStartPos);
      if (delta.abs() > 3) {
        this.goToState('POINT_DRAGGING');
      }
    },
    onMouseUp: function onMouseUp() {
      if (this.activeIntPoint === this.hoveringObject) {
        this.goToState('HOVERING_POINT');
      } else {
        this.goToState('NONE');
      }
    }
  },
  POINT_DRAGGING: {
    enter: function enter() {},
    leave: function leave(nextState) {
      if (nextState !== 'POINT_HOLD') {
        this.activeIntPoint = null;
      }
    },
    onMouseMove: function onMouseMove() {
      var delta = this.mousePosition.sub(this.mouseStartPos);
      this.activeIntPoint.position = this.pointStartPos.add(delta);
      console.log("move point");
    },
    onMouseUp: function onMouseUp() {
      if (this.activeIntPoint === this.hoveringObject) {
        this.goToState('HOVERING_POINT');
      } else {
        this.goToState('NONE');
      }
    }
  }
};
PFDEDrawLineTool.prototype.states.HOVERING_LINE_DOWN.onMouseMove = PFDEDrawLineTool.prototype.states.HOVERING_LINE.onMouseMove;
PFDEDrawLineTool.prototype.makeNewLine = function () {
  if (!this.startingBlock || !this.endingBlock) return;
  if (this.startingBlock.isConnectedTo(this.endingBlock)) return;
  var newLine = new _PFDELine["default"](this.editor, this.startingBlock, this.endingBlock); //push by itself
  this.editor.interactDelegate.onNewLineCreated(newLine);
};
PFDEDrawLineTool.prototype.goToState = function (state) {
  var prevState = this.toolState;
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
    args[_key2 - 1] = arguments[_key2];
  }
  if (this.states[prevState] && this.states[prevState].leave) {
    var _this$states$prevStat2;
    (_this$states$prevStat2 = this.states[prevState].leave).call.apply(_this$states$prevStat2, [this, state].concat(args));
  }
  this.toolState = state;
  if (this.states[state] && this.states[state].enter) {
    var _this$states$state$en2;
    (_this$states$state$en2 = this.states[state].enter).call.apply(_this$states$state$en2, [this, prevState].concat(args));
  }
  this.editor.updateVisibility('openDrawLineTool');
};

/**
 *
 * @param elt
 * @returns {PFDEBlock|number}
 * @private
 */
PFDEDrawLineTool.prototype._findBlock = function (elt) {
  while (elt && elt !== this.editor.$view) {
    if (elt.pfdeIntermediatePoint) return null;
    if (elt.pfdeBlock) return elt.pfdeBlock;
    elt = elt.parentElement;
  }
  return null;
};
PFDEDrawLineTool.prototype._findObject = function (elt) {
  while (elt && elt !== this.editor.$view) {
    if (elt.pfdeIntermediatePoint) return elt.pfdeIntermediatePoint;
    if (elt.pfdeBlock) return elt.pfdeBlock;
    if (elt.pfdeLine) return elt.pfdeLine;
    elt = elt.parentElement;
  }
  return null;
};

/**
 * @param {PFDEIntermediatePoint} point
 * @param {MouseEvent} event
 */
PFDEDrawLineTool.prototype.onMouseEnterPoint = function (point, event) {
  if (this.states[this.toolState].onMouseEnterPoint) {
    this.states[this.toolState].onMouseEnterPoint.call(this, point, event);
  }
};

/**
 * @param {PFDEIntermediatePoint} point
 * @param {MouseEvent} event
 */
PFDEDrawLineTool.prototype.onMouseLeavePoint = function (point, event) {
  if (this.states[this.toolState].onMouseLeavePoint) {
    this.states[this.toolState].onMouseLeavePoint.call(this, point, event);
  }
};

/**
 *
 * @param {PFDEBlock} block
 */
PFDEDrawLineTool.prototype.onMouseEnterBlock = function (block) {
  if (this.states[this.toolState].onMouseEnterBlock) {
    this.states[this.toolState].onMouseEnterBlock.call(this, block);
  }
};

/**
 *
 * @param {PFDEBlock} block
 * @param {MouseEvent} event
 */
PFDEDrawLineTool.prototype.onMouseLeaveBlock = function (block, event) {
  if (this.states[this.toolState].onMouseLeaveBlock) {
    this.states[this.toolState].onMouseLeaveBlock.call(this, block);
  }
};

/**
 *
 * @param {PFDELine} line
 * @param {MouseEvent} event
 */
PFDEDrawLineTool.prototype.onMouseEnterLine = function (line, event) {
  if (this.states[this.toolState].onMouseEnterLine) {
    this.states[this.toolState].onMouseEnterLine.call(this, line, event);
  }
};

/**
 *
 * @param {PFDELine} line
 * @param {MouseEvent} event
 */
PFDEDrawLineTool.prototype.onMouseLeaveLine = function (line, event) {
  if (this.states[this.toolState].onMouseLeaveLine) {
    this.states[this.toolState].onMouseLeaveLine.call(this, line, event);
  }
};
PFDEDrawLineTool.prototype.onHoverBlock = function (block) {
  var _this7 = this;
  var id;
  if (block && block.hasPinOut) {
    id = block.id;
    if (this.activeBlocks[id]) {
      clearTimeout(this.activeBlocks[id].toId);
      delete this.activeBlocks[id].toId;
    } else {
      this.activeBlocks[id] = {
        block: block
      };
      block.hovering = true;
    }
  } else {
    Object.keys(this.activeBlocks).forEach(function (id) {
      if (!_this7.activeBlocks[id].toId) {
        _this7.activeBlocks[id].toId = setTimeout(function () {
          _this7.activeBlocks[id].block.hovering = false;
          delete _this7.activeBlocks[id];
        }, 1500);
      }
    });
  }
};
PFDEDrawLineTool.prototype.ev_mouseOver = function (event) {
  var object = this._findObject(event.target);
  var outObj, inObject;
  if (object) {
    if (this.hoveringObject) {
      if (this.hoveringObject !== object) {
        outObj = this.hoveringObject;
        inObject = object;
      }
    } else {
      inObject = object;
    }
  } else {
    if (this.hoveringObject) {
      outObj = this.hoveringObject;
    }
  }
  this.hoveringObject = object;
  if (outObj) {
    switch (outObj.nodeType) {
      case 'BLOCK':
        this.onMouseLeaveBlock(outObj, event);
        break;
      case 'LINE':
        this.onMouseLeaveLine(outObj, event);
        break;
      case 'INTERMEDIATE_POINT':
        this.onMouseLeavePoint(outObj, event);
        break;
    }
  }
  if (inObject) {
    switch (inObject.nodeType) {
      case 'BLOCK':
        this.onMouseEnterBlock(inObject);
        break;
      case 'LINE':
        this.onMouseEnterLine(inObject, event);
        break;
      case 'INTERMEDIATE_POINT':
        this.onMouseEnterPoint(inObject);
        break;
    }
  }
};
PFDEDrawLineTool.prototype.ev_mouseLeave = function (event) {
  // var block = this._findBlock(event.target.parentElement);
  // this.onHoverBlock(block);
};
PFDEDrawLineTool.prototype.ev_mouseUp = function (event) {
  // console.log('mouse up');
  //
  // var block;
  // switch (this.toolState) {
  //     case "STARTING":
  //         block = this._findBlock(event.target);
  //         if (block) {
  //             if (block === this.startingBlock) {
  //                 this.goToState('STARTED');
  //             }
  //             else {
  //                 this.endingBlock = block;
  //                 this.goToState("END");
  //             }
  //         }
  //         else {
  //             this.startingBlock = null;
  //             this.goToState('NONE');
  //         }
  //         break;
  //     case "STARTED":
  //         block = this._findBlock(event.target);
  //         if (block && block !== this.startingBlock) {
  //             this.endingBlock = block;
  //             this.goToState("END");
  //         }
  //         else {
  //             this.goToState('NONE');
  //         }
  //         break;
  // }

  if (this.states[this.toolState].onMouseUp) {
    this.states[this.toolState].onMouseUp.call(this, event);
  }
  (0, _utils.documentOff)('mouseup', this.ev_mouseUp);
};
PFDEDrawLineTool.prototype.onMouseDownPinConnect = function (block) {
  // switch (this.toolState) {
  //     case "NONE":
  //         this.startingBlock = block;
  //         this.goToState('STARTING');
  //         break;
  // }
};
PFDEDrawLineTool.prototype.ev_mouseDown = function (event) {
  // var block;
  // if (event.target.hasClass && event.target.hasClass('pfde-block-pin-to-connect')) {
  //     block = this._findBlock(event.target);
  //     if (block) this.onMouseDownPinConnect(block);
  // }
  // else {
  //
  // }
  (0, _utils.documentOn)('mouseup', this.ev_mouseUp);
  if (this.states[this.toolState].onMouseDown) {
    this.states[this.toolState].onMouseDown.call(this, event);
  }
  // console.log('mouse down');
};

PFDEDrawLineTool.prototype.ev_mouseMove = function (event) {
  var bodyBound = this.editor.$body.getBoundingClientRect();
  var origin = this.editor.$graphicLayer.box.origin;
  this.mousePosition = new _Vec["default"](event.clientX, event.clientY).sub(new _Vec["default"](bodyBound.left, bodyBound.top)).sub(origin);
  if (this.states[this.toolState].onMouseMove) {
    this.states[this.toolState].onMouseMove.call(this, event);
  }

  // console.log(this.mousePosition)
  // if (this.toolState !== "STARTING" && this.toolState !== "STARTED") return;
  //
  // var bound = Rectangle.fromClientRect(this.editor.$lineLayer.getBoundingClientRect());
  // var mousePos = new Vec2(event.clientX, event.clientY).sub(bound.A()).sub(origin);
  // var startingBlock = this.startingBlock;
  // var pinInfo = startingBlock.getPinPositionToPoint(mousePos);
  // var d = new Turtle().moveTo(pinInfo.pos.x, pinInfo.pos.y)
  //     .cubicBezierTo(pinInfo.pos.x + 50 * pinInfo.dir.x, pinInfo.pos.y + 50 * pinInfo.dir.y,
  //         mousePos.x - 55 * pinInfo.dir.x, mousePos.y - 55 * pinInfo.dir.y,
  //         mousePos.x - 5 * pinInfo.dir.x, mousePos.y - 5 * pinInfo.dir.y
  //     ).getPath();
  // this.$newLine.attr('d', d);
};

Object.defineProperty(PFDEDrawLineTool.prototype, 'isActivated', {
  get: function get() {
    return !!(this.toolState !== 'NONE' || this.state === 'RUNNING');
  }
});

/**
 *
 * @param {ProcessFlowDiagramEditor} editor
 * @constructor
 */
function PFDESelectionController(editor) {
  this.editor = editor;
  this.selectedObjects = [];
}
PFDESelectionController.prototype.onCreateView = function () {};
PFDESelectionController.prototype.findObject = function (elt) {
  return null;
};
PFDESelectionController.prototype.objectOfDom = function (elt) {
  var res = elt && (elt.pfdeBlock || elt.pfdeLine || elt.pfdeIntermediatePoint);
  if (!res) res = null;
  return res;
};
PFDESelectionController.prototype.findObject = function (elt) {
  var obj;
  while (elt && elt !== this.editor.$view) {
    obj = this.objectOfDom(elt);
    if (obj) return obj;
    elt = elt.parentElement;
  }
  return null;
};
PFDESelectionController.prototype.deleteSelectedObjects = function () {
  //todo: move this function
  var objects = this.selectedObjects.slice().filter(function (obj) {
    return obj.canDelete;
  });
  this.unSelectAll();
  objects.forEach(function (obj) {
    return obj.remove();
  });
};
PFDESelectionController.prototype.canDelete = function () {
  var objects = this.selectedObjects.slice().filter(function (obj) {
    return obj.canDelete;
  });
  return objects.length > 0;
};
PFDESelectionController.prototype.select = function (obj, append) {
  var idx;
  if (obj) {
    idx = this.selectedObjects.indexOf(obj);
    if (append) {
      if (idx < 0) {
        this.blur();
        obj.domElt.addClass('as-focus').addClass('as-selected');
        this.selectedObjects.push(obj);
      } else {
        if (idx + 1 < this.selectedObjects.length) {
          this.blur();
          this.selectedObjects.splice(idx, 1);
          this.selectedObjects.push(obj);
          obj.domElt.addClass('as-focus');
        }
      }
    } else {
      if (idx >= 0) {
        if (idx + 1 < this.selectedObjects.length) {
          this.blur();
          this.selectedObjects.splice(idx, 1);
          this.unSelectAll();
          this.selectedObjects.push(obj);
          obj.domElt.addClass('as-focus');
        } else {
          this.selectedObjects.pop();
          this.unSelectAll();
          this.selectedObjects.push(obj);
        }
      } else {
        this.unSelectAll();
        this.selectedObjects.push(obj);
        obj.domElt.addClass('as-focus').addClass('as-selected');
      }
    }
  } else {
    this.blur();
    this.unSelectAll();
  }
  this.editor.cmdTool.refresh();
};
PFDESelectionController.prototype.toggleSelect = function (obj, append) {
  if (obj.domElt.hasClass('as-selected')) {
    if (append) this.unSelect(obj);else this.select(obj, false);
  } else {
    this.select(obj, append);
  }
};
PFDESelectionController.prototype.unSelectAll = function () {
  this.blur();
  this.selectedObjects.splice(0, this.selectedObjects.length).forEach(function (obj) {
    obj.domElt.removeClass('as-selected');
  });
};
PFDESelectionController.prototype.unSelect = function (obj) {
  if (!obj) return;
  var idx = this.selectedObjects.indexOf(obj);
  if (idx < 0) return;
  var refocus = obj.domElt.hasClass('as-focus');
  obj.domElt.removeClass('as-selected');
  if (refocus) {
    this.blur();
  }
  this.selectedObjects.splice(idx, 1);
  if (refocus) {
    if (this.selectedObjects.length > 0) {
      this.selectedObjects[this.selectedObjects.length - 1].domElt.addClass('as-focus');
    }
  }
};
PFDESelectionController.prototype.focusTo = function (elt) {
  this.select(elt, true);
};
PFDESelectionController.prototype.blur = function () {
  if (this.selectedObjects.length > 0) {
    this.selectedObjects[this.selectedObjects.length - 1].domElt.removeClass('as-focus');
  }
};

/**
 *
 * @param {"BLOCK"|"LINE"| "INTERMEDIATE_POINT"|"*"} types
 */
PFDESelectionController.prototype.getSelectedObjectsByType = function () {
  for (var _len3 = arguments.length, types = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
    types[_key3] = arguments[_key3];
  }
  return this.selectedObjects.filter(function (x) {
    return types.indexOf("*") >= 0 || types.indexOf(x.nodeType) >= 0;
  });
};
PFDESelectionController.prototype.isSelected = function (obj) {
  return this.selectedObjects.indexOf(obj) >= 0;
};
PFDESelectionController.prototype.ev_click = function (event) {
  var obj = this.findObject(event.target);
  if (obj && obj.dragging) return;
  this.select(obj, event.ctrlKey || event.shiftKey);
};

/**
 *
 * @param {ProcessFlowDiagramEditor} editor
 * @constructor
 */
function PFDEContextMenuController(editor) {
  this.editor = editor;
}
PFDEContextMenuController.prototype.onCreateView = function () {
  _ContextMenu["default"].auto();
  this.editor.$body.defineEvent('contextmenu').on('contextmenu', this.ev_contextMenu.bind(this));
};
PFDEContextMenuController.prototype.onBlockContextMenu = function (event, block) {
  event.showContextMenu({
    items: [{
      text: 'Sửa tên hiển thị',
      icon: 'span.mdi.mdi-rename',
      cmd: 'rename'
    }]
  }, function (event) {
    switch (event.menuItem.cmd) {
      case 'rename':
        block.editDisplayName();
        break;
    }
  });
};
PFDEContextMenuController.prototype.onLineContextMenu = function (event, line) {};
PFDEContextMenuController.prototype.ev_contextMenu = function (event) {
  return;
  var target = event.target;
  var block = this.editor.blockSelectionCtrl.findObject(target);
  if (block) {
    this.onBlockContextMenu(event, block);
    return;
  }
  var line = this.editor.lineSelectionCtrl.findObject(target);
  if (line) {
    this.onLineContextMenu(event, line);
  }
};

/**
 * @extends UndoHistory
 * @param {ProcessFlowDiagramEditor} editor
 * @constructor
 */
function PFDEHistory(editor) {
  var _this8 = this;
  this.editor = editor;
  _UndoHistory["default"].call(this);
  this.attach(this.editor);
  this.on('checkout', function (event) {
    _this8.editor.applyData(event.item.data);
  });
}
_OOP["default"].mixClass(PFDEHistory, _UndoHistory["default"]);
PFDEHistory.prototype.createWindow = function () {
  var _this9 = this;
  this.$historyCtn = (0, _FCore._)({
    tag: _OnsScreenWindow["default"],
    "class": 'as-undo-history-window',
    child: this.getView(),
    props: {
      windowTitle: 'History',
      windowActions: [{
        name: 'close',
        icon: 'span.mdi.mdi-close'
      }]
    },
    on: {
      relocation: function relocation() {
        var bound = _this9.$historyCtn.getBoundingClientRect();
        _this9.config.historyWindow = {
          left: bound.left,
          top: bound.top,
          width: bound.width,
          height: bound.height
        };
        _this9.saveConfig();
      },
      action: function action() {
        _this9.$historyCtn.remove();
      }
    }
  });
  this.$historyCtn.$header.hangOn = 4;
};
PFDEHistory.prototype.getWindow = function () {
  if (!this.$historyCtn) this.createWindow();
  return this.$historyCtn;
};

// PFDEHistory.prototype.commit = function (type, data, desc, timestamp) {
//     var res = UndoHistory.prototype.commit.apply(this, arguments);
//     return res;
// }

PFDEHistory.prototype.toggleListView = function () {
  var btn, btnBound;
  this.getWindow();
  if (this.$historyCtn.parentElement) {
    this.$historyCtn.remove();
  } else {
    this.$historyCtn.addTo(this.editor.$view);
    if (this.config.historyWindow) {
      this.$historyCtn.addStyle({
        left: this.config.historyWindow.left + 'px',
        top: this.config.historyWindow.top + 'px',
        width: this.config.historyWindow.width + 'px',
        height: this.config.historyWindow.height + 'px'
      });
    } else {
      btn = (0, _FCore.$)('button.as-from-tool-button[data-cmd-name="toggleHistory"]');
      btnBound = btn.getBoundingClientRect();
      this.$historyCtn.removeStyle('display');
      this.$historyCtn.addStyle({
        left: btnBound.left + 'px',
        top: btnBound.bottom + 2 + 'px'
      });
    }
    this.$historyCtn.relocation();
  }
};
PFDEHistory.prototype.getSummary = function () {
  var res = {
    addedBlocks: [],
    removedBlocks: [],
    addedLines: [],
    removedLines: []
    // modifiedBlocks: [],
  };

  if (this.items.length <= 1) return res;
  var fData = this.items[0].data;
  var lData = this.items[this.items.length - 1].data;
  var makeLineDict = function makeLineDict(lines) {
    return lines.reduce(function (ac, cr) {
      ac[(0, _utils2.keyStringOf)([cr.u, cr.v])] = true;
      return ac;
    }, {});
  };
  var makeBlockDict = function makeBlockDict(blocks) {
    return blocks.reduce(function (ac, cr) {
      var id = cr.attributes.id;
      ac[(0, _utils2.keyStringOf)(id)] = cr;
      return ac;
    }, {});
  };
  var filterLineNotInDict = function filterLineNotInDict(lines, dict) {
    return lines.filter(function (cr) {
      var key = (0, _utils2.keyStringOf)([cr.u, cr.v]);
      return !dict[key];
    });
  };
  var filterBlockNotInDict = function filterBlockNotInDict(blocks, dict) {
    return blocks.filter(function (cr) {
      var id = cr.attributes.id;
      var key = (0, _utils2.keyStringOf)(id);
      return !dict[key];
    });
  };
  var filterBlockInDict = function filterBlockInDict(blocks, dict1, dict2) {
    return blocks.filter(function (cr) {
      var id = cr.attributes.id;
      var key = (0, _utils2.keyStringOf)(id);
      return dict1[key] && dict2[key];
    });
  };

  // var isEmptyObject = o=>{
  //     for (var i in o) {
  //         return false;
  //     }
  //     return true;
  // }
  //todoTacs
  var calcModifiedObject = function calcModifiedObject(oldO, newO) {
    var oT = _typeof(oldO);
    var nT = _typeof(newO);
    if (oT === nT) return (0, _generator.copyJSVariable)(newO);
    if (oldO === newO) return (0, _generator.copyJSVariable)(newO);
    if (oldO instanceof Date) {
      if (newO instanceof Date) {
        if (newO.getTime() !== oldO.getTime()) {
          return new Date(oldO.getTime());
        }
      } else {
        return (0, _generator.copyJSVariable)(newO);
      }
    }
    var mergedO = Object.assign({}, oldO, newO);
    var res = {};
    var changed = false;
    for (var key in mergedO) {}
  };
  var fLineDict = makeLineDict(fData.lines);
  var lLineDict = makeLineDict(lData.lines);
  res.addedLines = filterLineNotInDict(lData.lines, fLineDict);
  res.removedLines = filterLineNotInDict(fData.lines, lLineDict);
  var fBlockDict = makeBlockDict(fData.blocks);
  var lBlockDict = makeBlockDict(lData.blocks);
  res.removedBlocks = filterBlockNotInDict(fData.blocks, lBlockDict);
  res.addedBlocks = filterBlockNotInDict(lData.blocks, fBlockDict);
  var modifiedBlocks = filterBlockInDict(lData.blocks, lBlockDict, fBlockDict);

  // console.log(modifiedBlocks)

  return res;
};

/**
 *
 * @constructor
 */
function PFDEInteractDelegate() {
  /**
   *
   * @type {ProcessFlowDiagramEditor}
   */
  this.pfdePartner = null;
}
PFDEInteractDelegate.prototype.goToBlock = function (block) {
  console.log("goto", block);
};
PFDEInteractDelegate.prototype.onNewBlockCreated = function (newNode) {
  console.log("TODO: override onNewBlockCreated(newNode)", newNode);
};
PFDEInteractDelegate.prototype.onNewSubProcedureBlockCreated = function (newNode) {
  console.log("TODO: override onNewSubProcedureBlockCreated(newNode)", newNode);
};
PFDEInteractDelegate.prototype.onNewLineCreated = function (newLine) {
  console.log("TODO: override onNewLineCreated(newLine)", newLine);
};
PFDEInteractDelegate.prototype.onLineRemoved = function (line) {
  console.log("TODO: override onLineRemoved(line)", line);
};
PFDEInteractDelegate.prototype.onBlockRemoved = function (block) {
  console.log("TODO: override onBlockRemoved(block)", block);
};
PFDEInteractDelegate.prototype.nextNumberName = function () {
  if (!this.pfdePartner) return 1;
  var dict = this.pfdePartner.blocks.reduce(function (ac, block) {
    var name = block.attributes.displayName;
    if (typeof name !== "string") return ac;
    var number = name.trim().match(/[0-9]+$/);
    if (number) {
      ac[number] = true;
    }
    return ac;
  }, {});
  for (var i = 1; i < 1e6; ++i) {
    if (!dict[i]) return i;
  }
  return NaN;
};

/***/ }),

/***/ 98736:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.SizeBox = SizeBox;
exports["default"] = void 0;
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
__webpack_require__(94998);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;
function LayoutSizeEditor() {
  _Context["default"].call(this);
  _EventEmitter["default"].call(this);
}
Object.defineProperties(LayoutSizeEditor.prototype, Object.getOwnPropertyDescriptors(_Context["default"].prototype));
Object.defineProperties(LayoutSizeEditor.prototype, Object.getOwnPropertyDescriptors(_EventEmitter["default"].prototype));
LayoutSizeEditor.prototype.constructor = LayoutSizeEditor;
LayoutSizeEditor.prototype.getView = function () {
  if (this.$view) return this.$view;
  this.$view = _({
    "class": 'as-layout-size-editor',
    tag: 'sizebox',
    props: {
      boxTitle: 'Position'
    },
    child: {
      tag: 'sizebox',
      props: {
        boxTitle: 'marrgin'
      }
    }
  });
  ;
  return this.$view;
};
function SizeBox() {
  this.$left = _({
    tag: 'spaninput',
    elt: $('.as-size-box-editor-position-left>span.absol-span-input', this),
    props: {
      type: 'number'
    }
  });
  this.$right = _({
    tag: 'spaninput',
    elt: $('.as-size-box-editor-position-right>span.absol-span-input', this),
    props: {
      type: 'number'
    }
  });
  this.$top = _({
    tag: 'spaninput',
    elt: $('.as-size-box-editor-position-top span.absol-span-input', this),
    props: {
      type: 'number'
    }
  });
  this.$bottom = _({
    tag: 'spaninput',
    elt: $('.as-size-box-editor-position-bottom span.absol-span-input', this),
    props: {
      type: 'number'
    }
  });
  this.$center = $('.as-size-box-editor-position-center', this);
  this.$title = $('.as-size-box-editor-title', this);
}
SizeBox.prototype.addChild = function (elt) {
  this.$center.addChild(elt);
  return this;
};
SizeBox.property = {};
SizeBox.property.boxTitle = {
  set: function set(value) {
    this.$title.innerHTML = value + '';
  },
  get: function get() {
    return this.$title.innerHTML;
  }
};
SizeBox.render = function () {
  return _('<div class="as-size-box-editor">\
            <div class="as-size-box-editor-position-top">\
                <div><div class="as-size-box-editor-title">Title text</div></div>\
                <div><span  class="absol-span-input" contenteditable="true"></span></div>\
                <div></div>\
            </div>\
            <div class="as-size-box-editor-position-mid">\
                <div class="as-size-box-editor-position-left">\
                    <span class="absol-span-input" contenteditable="true"></span>\
                </div>\
                <div class="as-size-box-editor-position-center">\
                </div>\
                <div class="as-size-box-editor-position-right">\
                     <span class="absol-span-input" contenteditable="true"></span>\
                </div>\
            </div>\
            <div class="as-size-box-editor-position-bottom">\
                <div></div>\
                <div><span class="absol-span-input" contenteditable="true"></span></div>\
                <div></div>\
            </div>\
        </div>');
};
_FCore["default"].install('sizebox', SizeBox);
var _default = LayoutSizeEditor;
exports["default"] = _default;

/***/ }),

/***/ 95567:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MultiObjectPropertyDelegate = MultiObjectPropertyDelegate;
exports["default"] = void 0;
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _FCore = _interopRequireDefault(__webpack_require__(51518));
var _stringFormat = __webpack_require__(22294);
var _PEText = _interopRequireDefault(__webpack_require__(48588));
var _PEUniqueText = _interopRequireDefault(__webpack_require__(60932));
var _PEColor = _interopRequireDefault(__webpack_require__(45636));
var _PEConst = _interopRequireDefault(__webpack_require__(16465));
var _PEEnum = _interopRequireDefault(__webpack_require__(53640));
var _PEArrayOfText = _interopRequireDefault(__webpack_require__(90973));
var _PEMeasureSize = _interopRequireDefault(__webpack_require__(61148));
var _PEMeasurePosition = _interopRequireDefault(__webpack_require__(12315));
var _PEFont = _interopRequireDefault(__webpack_require__(47266));
var _PETextAlign = _interopRequireDefault(__webpack_require__(19071));
var _PEBoxAlign = _interopRequireDefault(__webpack_require__(41238));
var _PEBool = _interopRequireDefault(__webpack_require__(54957));
var _PENumber = _interopRequireDefault(__webpack_require__(12913));
var _PEFragmentClass = _interopRequireDefault(__webpack_require__(8005));
var _PESelectList = _interopRequireDefault(__webpack_require__(28143));
var _PELengthInPixel = _interopRequireDefault(__webpack_require__(15928));
var _PEIcon = _interopRequireDefault(__webpack_require__(87586));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _PEPermission = _interopRequireDefault(__webpack_require__(29188));
var _PEDate = _interopRequireDefault(__webpack_require__(94409));
var _FFloatWindow = _interopRequireDefault(__webpack_require__(72649));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _PELayoutAlign = _interopRequireDefault(__webpack_require__(52795));
var _PETextDecoration = _interopRequireDefault(__webpack_require__(76628));
var _PEFontSize = _interopRequireDefault(__webpack_require__(14061));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _FCore["default"]._;
var $ = _FCore["default"].$;

/***
 * @augments FFloatWindow
 * @augments EventEmitter
 * @augments Context
 * @constructor
 */
function MultiObjectPropertyEditor() {
  _Context["default"].call(this);
  _EventEmitter["default"].call(this);
  _FFloatWindow["default"].call(this);
  /***
   *
   * @type {MultiObjectPropertyDelegate}
   * @private
   */
  this._delegate = null;
  this.dependents = {};
  this.propertyHolders = {};
  /**
   * @type {Array<import('../core/BaseComponent').default>}
   */
  this.propertyNames = [];
  this.queuePools = {};
}
_OOP["default"].mixClass(MultiObjectPropertyEditor, _Context["default"], _EventEmitter["default"], _FFloatWindow["default"]);
MultiObjectPropertyEditor.prototype.pools = {};
MultiObjectPropertyEditor.prototype.windowTitle = "Properties";
MultiObjectPropertyEditor.prototype.type2EditorClass = {
  text: _PEText["default"],
  string: _PEText["default"],
  uniqueText: _PEUniqueText["default"],
  color: _PEColor["default"],
  'const': _PEConst["default"],
  'enum': _PEEnum["default"],
  arrayOfText: _PEArrayOfText["default"],
  'string[]': _PEArrayOfText["default"],
  measureSize: _PEMeasureSize["default"],
  measurePosition: _PEMeasurePosition["default"],
  font: _PEFont["default"],
  FontSize: _PEFontSize["default"],
  textAlign: _PETextAlign["default"],
  boxAlign: _PEBoxAlign["default"],
  bool: _PEBool["default"],
  "boolean": _PEBool["default"],
  number: _PENumber["default"],
  fragmentClass: _PEFragmentClass["default"],
  SelectList: _PESelectList["default"],
  LengthInPixel: _PELengthInPixel["default"],
  icon: _PEIcon["default"],
  Permission: _PEPermission["default"],
  date: _PEDate["default"],
  LayoutAlign: _PELayoutAlign["default"],
  TextDecoration: _PETextDecoration["default"]
};
MultiObjectPropertyEditor.prototype.getPropertyNames = function () {
  if (!this._delegate) return [];
  return this._delegate.getPropertyNames();
};
MultiObjectPropertyEditor.prototype.getProperty = function (key) {
  var _this$_delegate;
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }
  return (_this$_delegate = this._delegate).getProperty.apply(_this$_delegate, [key].concat(args));
};
MultiObjectPropertyEditor.prototype.setProperty = function (key, value) {
  var _this$_delegate2;
  for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
    args[_key2 - 2] = arguments[_key2];
  }
  return (_this$_delegate2 = this._delegate).setProperty.apply(_this$_delegate2, [key, value].concat(args));
};
MultiObjectPropertyEditor.prototype.getPropertyDescriptor = function (key) {
  return this._delegate.getPropertyDescriptor(key);
};
MultiObjectPropertyEditor.prototype.loadAttributes = function () {
  var _this = this;
  this.flushAllToPools();
  this.$body.clearChild();
  this.clearAllDependents();
  this.propertyNames = this._delegate.getPropertyNames();
  this.propertyHolders = {};
  this.propertyNames.forEach(function (name) {
    var descriptor = _this.getPropertyDescriptor(name) || {
      type: "NoDescriptor"
    };
    var displayName = descriptor.displayName || name;
    if (descriptor.hidden) return;
    var EditorClass = _this.type2EditorClass[descriptor.type];
    var functionName = 'load' + (0, _stringFormat.camelCaseToPascalCase)(descriptor.type) + 'Property';
    var cell = _('td');
    if (!_this[functionName]) {
      // throw new Error('Not support type' + descriptor.type + '!')
      functionName = 'loadNotSupportedProperty';
    }
    var rowElt = _({
      tag: 'tr',
      attr: {
        "data-type": descriptor.type
      },
      child: [{
        tag: 'td',
        child: {
          text: displayName
        }
      }, cell]
    });
    rowElt.addTo(_this.$body);
    if (descriptor.dependency) {
      _this.addDependents(name, descriptor.dependency);
    }
    if (EditorClass) {
      _this.propertyHolders[name] = new EditorClass(_this, name, descriptor, cell);
    } else {
      _this.propertyHolders[name] = _this[functionName](name, descriptor, cell, cell);
    }
  });
  _ResizeSystem["default"].update();
};
MultiObjectPropertyEditor.prototype.flushAllToPools = function () {
  var self = this;
  Object.keys(this.queuePools).forEach(function (key) {
    self.pools[key] = self.pools[key] === undefined ? [] : self.pools[key];
    var all = self.queuePools[key].splice(0);
    self.pools[key].push.apply(self.pools[key], all);
  });
};
MultiObjectPropertyEditor.prototype.assignToPool = function (key, value) {
  this.queuePools[key] = this.queuePools[key] === undefined ? [] : this.queuePools[key];
  if (value.__pool_assign__) {
    console.warn("Pool: reassign object", key, value);
  } else {
    value.__pool_assign__ = true;
    this.queuePools[key].push(value);
  }
};
MultiObjectPropertyEditor.prototype.putOnceFromPool = function (key) {
  var res = null;
  if (this.pools[key] && this.pools[key].length > 0) {
    res = this.pools[key].pop();
  }
  if (res) res.__pool_assign__ = false;
  return res;
};
MultiObjectPropertyEditor.prototype.getView = function () {
  if (this.$view) return this.$view;
  this.$view = _({
    "class": 'as-property-editor',
    child: {
      tag: 'table',
      "class": 'as-basic-table',
      child: [{
        tag: 'thead',
        child: [{
          tag: 'tr',
          child: [{
            tag: 'td',
            child: {
              text: "key"
            }
          }, {
            tag: 'td',
            attr: {
              colspan: '3'
            },
            child: {
              text: 'value'
            }
          }]
        }]
      }, {
        tag: 'tbody'
      }]
    }
  });
  this.$body = $('tbody', this.$view);
  return this.$view;
};
MultiObjectPropertyEditor.prototype.loadNotSupportedProperty = function (name, descriptor, cell, cellElt) {
  cellElt.addChild(_({
    text: 'Not supported '
  })).addChild(_({
    tag: 'strong',
    child: {
      text: descriptor.type
    }
  }));
  return {};
};
MultiObjectPropertyEditor.prototype.clearAllDependents = function () {
  for (var key in this.dependents) {
    delete this.dependents[key];
  }
};

/**
 * @param {String} propertyName
 * @param {Array<String>} dependencyProperties
 */
MultiObjectPropertyEditor.prototype.addDependents = function (propertyName, dependencyProperties) {
  var dependencyProperty;
  for (var i = 0; i < dependencyProperties.length; ++i) {
    dependencyProperty = dependencyProperties[i];
    this.dependents[dependencyProperty] = this.dependents[dependencyProperty] || {};
    this.dependents[dependencyProperty][propertyName] = true;
  }
};
MultiObjectPropertyEditor.prototype.updateDependentsOf = function (name, excludes) {
  excludes = excludes || {};
  excludes[name] = true;
  for (var dependentPropertyName in this.dependents[name]) {
    if (!excludes[dependentPropertyName] && this.propertyHolders[dependentPropertyName]) {
      excludes[dependentPropertyName] = true;
      if (this.propertyHolders[dependentPropertyName].requestUpdate) {
        this.propertyHolders[dependentPropertyName].requestUpdate();
      } else if (this.propertyHolders[dependentPropertyName].reload) {
        this.propertyHolders[dependentPropertyName].reload();
      }
      this.updateDependentsOf(dependentPropertyName, excludes);
    }
  }
};
MultiObjectPropertyEditor.prototype.updatePropertyRecursive = function (name) {
  if (!this.propertyHolders[name]) return;
  if (this.propertyHolders[name].requestUpdate) this.propertyHolders[name].requestUpdate();else if (this.propertyHolders[name].reload) {
    this.propertyHolders[name].reload();
  }
  this.updateDependentsOf(name);
};
MultiObjectPropertyEditor.prototype.notifyChange = function (name, from) {
  this.updateDependentsOf(name);
  this.emit('change', {
    type: 'change',
    target: this,
    from: from,
    name: name,
    objects: this.objects
  }, this);
};
MultiObjectPropertyEditor.prototype.notifyStopChange = function (name) {
  if (this._delegate) {
    this._delegate.onSetPropertyComplete(name);
  }
};
MultiObjectPropertyEditor.prototype.getBound = function () {
  var bound = this.$body.getBoundingClientRect();
  return {
    width: bound.width + 15,
    height: bound.height + 24 + 24 + 10
  };
};
Object.defineProperty(MultiObjectPropertyEditor.prototype, 'delegate', {
  set: function set(delegate) {
    delegate = delegate || new MultiObjectPropertyDelegate(); //empty
    if (this._delegate) this._delegate.partner = null;
    this._delegate = delegate;
    if (delegate) {
      delegate.partner = this;
    }
    this.loadAttributes();
  }
});
var _default = MultiObjectPropertyEditor;
exports["default"] = _default;
function MultiObjectPropertyDelegate() {
  /**
   *
   * @type {null|MultiObjectPropertyEditor}
   */
  this.partner = null;
}
MultiObjectPropertyDelegate.prototype.setProperty = function (key, value) {};
MultiObjectPropertyDelegate.prototype.getProperty = function (key) {};
MultiObjectPropertyDelegate.prototype.getPropertyDescriptor = function (key) {};
MultiObjectPropertyDelegate.prototype.getPropertyNames = function () {
  return [];
};
MultiObjectPropertyDelegate.prototype.updatePropertyRecursive = function (name) {
  if (this.partner) this.partner.updatePropertyRecursive(name);
};
MultiObjectPropertyDelegate.prototype.onSetPropertyComplete = function (name) {};

/***/ }),

/***/ 90973:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _TokenField = _interopRequireDefault(__webpack_require__(89951));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEArrayOfText() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEArrayOfText, _PEBaseType["default"]);
PEArrayOfText.prototype.attachInput = function () {
  var self = this;
  this.$input = (0, _FCore._)({
    tag: _TokenField["default"].tag,
    attr: {
      title: 'Each value is separated by ;'
    },
    props: {
      separator: ';',
      placeHolder: 'Enter item text, separated by ;'
    },
    on: {
      change: function change() {
        self.setValue(this.items);
        self.notifyChange();
      }
    }
  });
  this.cellElt.addChild(this.$input);
};
PEArrayOfText.prototype.reload = function () {
  this.renewDescriptor();
  this.$input.autocomplete = this.descriptor.autocomplete;
  this.$input.items = this.getValue();
};
var _default = PEArrayOfText;
exports["default"] = _default;

/***/ }),

/***/ 3090:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {MultiObjectPropertyEditor} editor
 * @param {string} pName
 * @param {Object} descriptor
 * @param {AElement} cellElt
 * @constructor
 */
function PEBaseType(editor, pName, descriptor, cellElt) {
  this.editor = editor;
  this.cellElt = cellElt;
  this.pName = pName;
  this.descriptor = descriptor;
  this.attachInput();
  this.reload();
}
PEBaseType.prototype.attachInput = _noop["default"];
PEBaseType.prototype.reload = _noop["default"];
PEBaseType.prototype.renewDescriptor = function () {
  this.descriptor = Object.assign({}, this.editor.getPropertyDescriptor(this.pName));
  return this.descriptor;
};
PEBaseType.prototype.getValue = function () {
  var _this$editor;
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
    args[_key] = arguments[_key];
  }
  return (_this$editor = this.editor).getProperty.apply(_this$editor, [this.pName].concat(args));
};
PEBaseType.prototype.setValue = function (value) {
  var _this$editor2;
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
    args[_key2 - 1] = arguments[_key2];
  }
  return (_this$editor2 = this.editor).setProperty.apply(_this$editor2, [this.pName, value].concat(args));
};
PEBaseType.prototype.notifyChange = function () {
  this.editor.notifyChange(this.pName, this);
};
PEBaseType.prototype.notifyStopChange = function () {
  this.editor.notifyStopChange(this.pName);
};
var _default = PEBaseType;
exports["default"] = _default;

/***/ }),

/***/ 54957:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEBool() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEBool, _PEBaseType["default"]);
PEBool.prototype.attachInput = function () {
  var self = this;
  this.$input = (0, _FCore._)({
    tag: 'checkboxbutton',
    "class": 'as-need-update',
    on: {
      change: function change() {
        self.setValue(this.checked);
        self.notifyChange();
        self.notifyStopChange();
      }
    }
  });
  this.cellElt.addChild(this.$input);
};
PEBool.prototype.reload = function () {
  this.renewDescriptor();
  var value = this.getValue() || false;
  if (value !== this.$input.checked) {
    this.$input.checked = value;
  }
  this.$input.disabled = this.descriptor.disabled;
};
var _default = PEBool;
exports["default"] = _default;

/***/ }),

/***/ 41238:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _base = __webpack_require__(6954);
var _FCore = __webpack_require__(51518);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEBoxAlign() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEBoxAlign, _PEBaseType["default"]);
PEBoxAlign.prototype.icons = {
  lefttop: 'm0 0v24h24v-24zm1 1h22v22h-22zm2 2h10.3v2h-10.3v-2m0 4h14v2h-14v-2m0 4h9.9v2h-9.9v-2',
  centertop: 'm24 24v-24h-24v24zm-1-1h-22v-22h22zm-6.05-18h-9.9v-2h9.9v2m2.05 4h-14v-2h14v2m-1.85 4h-10.3v-2h10.3v2',
  righttop: 'm24 0v24h-24v-24zm-1 1h-22v22h22zm-2 2h-10.3v2h10.3v-2m0 4h-14v2h14v-2m0 4h-9.9v2h9.9v-2',
  leftcenter: 'm0 24v-24h24v24zm1-1h22v-22h-22zm2-6h10.3v-2h-10.3v2m0-4h14v-2h-14v2m0-4h9.9v-2h-9.9v2',
  centercenter: 'm0 24v-24h24v24zm1-1h22v-22h-22zm6.05-14h9.9v-2h-9.9v2m-2.05 4h14v-2h-14v2m1.85 4h10.3v-2h-10.3v2',
  rightcenter: 'm24 24v-24h-24v24zm-1-1h-22v-22h22zm-2-6h-10.3v-2h10.3v2m0-4h-14v-2h14v2m0-4h-9.9v-2h9.9v2',
  leftbottom: 'm0 24v-24h24v24zm1-1h22v-22h-22zm2-2h10.3v-2h-10.3v2m0-4h14v-2h-14v2m0-4h9.9v-2h-9.9v2',
  centerbottom: 'm24 0v24h-24v-24zm-1 1h-22v22h22zm-6.05 18h-9.9v2h9.9v-2m2.05-4h-14v2h14v-2m-1.85-4h-10.3v2h10.3v-2',
  rightbottom: 'm24 24v-24h-24v24zm-1-1h-22v-22h22zm-2-2h-10.3v-2h10.3v2m0-4h-14v-2h14v2m0-4h-9.9v-2h9.9v2'
};
PEBoxAlign.prototype._makeIcon = function (name) {
  var path = this.icons[name];
  var data = '<svg width="24" height="24" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\
                    <path d="' + path + '" style="stroke-width:0"/>\
                </svg>';
  return (0, _FCore._)({
    tag: 'img',
    style: {
      'image-rendering': 'pixelated'
    },
    props: {
      src: 'data:image/svg+xml;base64,' + (0, _base.base64EncodeUnicode)(data)
    }
  });
};
PEBoxAlign.prototype.attachInput = function () {
  this.$button = (0, _FCore._)('button.as-property-editor-text-align-input');
  this.cellElt.addChild(this.$button);
  var self = this;
  _QuickMenu["default"].toggleWhenClick(this.$button, {
    getMenuProps: function getMenuProps() {
      return {
        items: [{
          text: 'Left-Top',
          icon: self._makeIcon('lefttop'),
          menuData: 'lefttop'
        }, {
          text: 'Center-Top',
          icon: self._makeIcon('centertop'),
          menuData: 'centertop'
        }, {
          text: 'Right-Top',
          icon: self._makeIcon('righttop'),
          menuData: 'righttop'
        }, {
          text: 'Left-Center',
          icon: self._makeIcon('leftcenter'),
          menuData: 'leftcenter'
        }, {
          text: 'Center-Center',
          icon: self._makeIcon('centercenter'),
          menuData: 'centercenter'
        }, {
          text: 'Right-Center',
          icon: self._makeIcon('rightcenter'),
          menuData: 'rightcenter'
        }, {
          text: 'Left-Botttom',
          icon: self._makeIcon('leftbottom'),
          menuData: 'leftbottom'
        }, {
          text: 'Center-Botttom',
          icon: self._makeIcon('centerbottom'),
          menuData: 'centerbottom'
        }, {
          text: 'Right-Botttom',
          icon: self._makeIcon('rightbottom'),
          menuData: 'rightbottom'
        }]
      };
    },
    onSelect: function onSelect(item) {
      self.$button.clearChild().addChild(self._makeIcon(item.menuData));
      self.setValue(item.menuData);
      self.notifyStopChange();
    }
  });
};
PEBoxAlign.prototype.reload = function () {
  this.$button.clearChild().addChild(this._makeIcon(this.getValue() || 'lefttop'));
};
var _default = PEBoxAlign;
exports["default"] = _default;

/***/ }),

/***/ 45636:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEColor() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEColor, _PEBaseType["default"]);
PEColor.prototype.attachInput = function () {
  var self = this;
  this.$input = (0, _FCore._)({
    tag: 'colorpickerbutton',
    on: {
      change: function change(event) {
        self.setValue('#' + event.value.toHex8());
        self.notifyChange();
      },
      stopchange: function stopchange() {
        self.notifyStopChange();
      }
    },
    props: {
      value: 'transparent',
      mode: 'RGBA'
    }
  });
  this.cellElt.addChild(this.$input);
};
PEColor.prototype.reload = function () {
  this.$input.value = this.getValue() || 'transparent';
};
var _default = PEColor;
exports["default"] = _default;

/***/ }),

/***/ 16465:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEConst() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEConst, _PEBaseType["default"]);
PEConst.prototype.attachInput = function () {
  var self = this;
  var value = this.descriptor.value;
  this.$input = (0, _FCore._)({
    tag: 'strong'
  });
  this.cellElt.addChild(this.$input);
  if (value && value.then) {
    value.then(function (value) {
      self.$input.addChild((0, _FCore._)({
        text: '' + value
      }));
    });
  } else {
    this.$input.addChild((0, _FCore._)({
      text: '' + value
    }));
  }
};
var _default = PEConst;
exports["default"] = _default;

/***/ }),

/***/ 94409:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PENumber() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PENumber, _PEBaseType["default"]);
PENumber.prototype.attachInput = function () {
  var self = this;
  this.$input = (0, _FCore._)({
    tag: 'dateinput',
    "class": 'as-need-update',
    style: {
      width: '120px'
    },
    props: {},
    on: {
      change: function change(event) {
        self.setValue(this.value);
        self.notifyChange();
        self.notifyStopChange();
      }
    }
  });
  this.cellElt.addChild(this.$input);
};
PENumber.prototype.reload = function () {
  this.renewDescriptor();
  var value = this.getValue();
  this.$input.value = value;
};
var _default = PENumber;
exports["default"] = _default;

/***/ }),

/***/ 53640:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEEnum() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEEnum, _PEBaseType["default"]);
PEEnum.prototype.attachInput = function () {
  var self = this;
  this.$input = (0, _FCore._)({
    tag: 'selectmenu',
    props: {
      items: this.descriptor.values.map(function (value) {
        if (_typeof(value) === 'object') {
          return {
            text: value.text,
            value: value.value
          };
        } else {
          return {
            text: value + "",
            value: value
          };
        }
      }),
      value: this.getValue()
    },
    on: {
      change: function change() {
        self.setValue(this.value);
        self.notifyChange();
        self.notifyStopChange();
      }
    }
  });
  this.cellElt.addChild(this.$input);
};
PEEnum.prototype.reload = function () {
  var descriptor = this.renewDescriptor();
  this.$input.value = descriptor.values.map(function (value) {
    return {
      text: value + "",
      value: value
    };
  });
  this.$input.disabled = descriptor.disabled;
  var value = this.getValue();
  if (value !== this.$input.value) {
    this.$input.value = value;
  }
};
var _default = PEEnum;
exports["default"] = _default;

/***/ }),

/***/ 47266:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _GoogleFont = __webpack_require__(68117);
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEFont() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEFont, _PEBaseType["default"]);
PEFont.prototype.attachInput = function () {
  var self = this;
  this.$input = (0, _FCore._)({
    tag: 'selectmenu',
    "class": 'as-need-update',
    props: {
      items: [{
        text: 'None',
        value: 'unset'
      }].concat(_GoogleFont.FONT_ITEMS),
      value: 'unset'
    },
    on: {
      change: function change() {
        if (this.value === 'unset') self.setValue(undefined);else self.setValue(this.value);
        self.notifyChange();
        self.notifyStopChange();
      }
    }
  });
  this.cellElt.addChild(this.$input);
};
PEFont.prototype.reload = function () {
  var value = this.getValue() || 'unset';
  if (value !== this.$input.value) {
    this.$input.value = value;
  }
};
var _default = PEFont;
exports["default"] = _default;

/***/ }),

/***/ 14061:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEFontSize() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEFontSize, _PEBaseType["default"]);
PEFontSize.prototype.attachInput = function () {
  var _this = this;
  var value = this.getValue();
  var numberValue = 14;
  if ((0, _utils.isRealNumber)(value) && value >= 0) numberValue = value;
  this.$input = (0, _FCore._)({
    tag: 'numberinput',
    props: {
      stepper: true,
      value: numberValue
    },
    on: {
      change: function change() {
        _this.setValue(_this.$input.value);
        _this.notifyChange();
        _this.notifyStopChange();
      }
    }
  });
  this.cellElt.addChild(this.$input);
  this.$default = (0, _FCore._)({
    tag: 'checkbox',
    style: {
      'margin-left': '10px'
    },
    props: {
      text: 'default',
      checked: !(0, _utils.isRealNumber)(value) || value < 0
    },
    on: {
      change: function change() {
        console.log(_this.$default.checked);
        if (_this.$default.checked) {
          _this.$input.disabled = true;
          _this.setValue('default');
        } else {
          _this.$input.disabled = false;
          _this.$input.value = 14;
          _this.setValue(14);
        }
      }
    }
  });
  this.cellElt.addChild(this.$default);
};
PEFontSize.prototype.reload = function () {
  var value = this.getValue();
  var numberValue = 14;
  if ((0, _utils.isRealNumber)(value) && value >= 0) numberValue = value;
  this.$input.value = numberValue;
  this.$default.checked = !(0, _utils.isRealNumber)(value) || value < 0;
  this.$input.disabled = this.$default.checked;
};
var _default = PEFontSize;
exports["default"] = _default;

/***/ }),

/***/ 8005:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _Assembler = __webpack_require__(2326);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEFragmentClass() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEFragmentClass, _PEBaseType["default"]);
PEFragmentClass.prototype.attachInput = function () {
  var self = this;
  this.$input = (0, _FCore._)({
    tag: 'selectmenu',
    on: {
      change: function change() {
        if (this.value === 'null') self.setValue(null);else self.setValue(this.value);
      }
    }
  });
  this.cellElt.addChild(this.$input);
};
PEFragmentClass.prototype.reload = function () {
  var constructors = _Assembler.AssemblerInstance.classes["FRAGMENT"];
  var items = Object.keys(constructors).map(function (key) {
    var cst = constructors[key];
    var cstName = cst.prototype.displayName || cst.prototype.contentViewData && cst.prototype.contentViewData.attributes && cst.prototype.contentViewData.attributes.name || cst.prototype.name || cst.prototype.tag;
    return {
      text: cstName,
      value: key
    };
  });
  items.unshift({
    text: "none",
    value: 'null',
    extendStyle: {
      "color": "#aaa"
    }
  });
  var value = this.getValue() || 'null';
  this.$input.items = items;
  this.$input.value = value;
};
var _default = PEFragmentClass;
exports["default"] = _default;

/***/ }),

/***/ 87586:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _FontIconInput = _interopRequireDefault(__webpack_require__(9915));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEIcon() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEIcon, _PEBaseType["default"]);
PEIcon.prototype.attachInput = function () {
  var self = this;
  this.$input = (0, _FCore._)({
    tag: _FontIconInput["default"].tag,
    props: {},
    on: {
      change: function change() {
        self.setValue(this.value);
        self.notifyChange();
        self.notifyStopChange();
      }
    }
  });
  this.cellElt.addChild(this.$input);
};
PEIcon.prototype.reload = function () {
  var value = this.getValue();
  if (value !== this.$input.value) {
    this.$input.value = value;
  }
};
var _default = PEIcon;
exports["default"] = _default;

/***/ }),

/***/ 52795:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PELayoutAlign() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PELayoutAlign, _PEBaseType["default"]);
PELayoutAlign.prototype.value2Icon = {
  left: 'span.mdi.mdi-format-horizontal-align-left',
  right: 'span.mdi.mdi-format-horizontal-align-right',
  hcenter: 'span.mdi.mdi-format-horizontal-align-center',
  hfixed: 'span.mdi.mdi-arrow-expand-horizontal',
  vfixed: 'span.mdi.mdi-arrow-expand-vertical',
  vcenter: 'span.mdi.mdi-format-vertical-align-center',
  bottom: 'span.mdi.mdi-format-vertical-align-bottom',
  top: 'span.mdi.mdi-format-vertical-align-top'
};
PELayoutAlign.prototype.attachInput = function () {
  var _this = this;
  var self = this;
  var iPre = this.descriptor.values[0] === 'left' ? 'h' : 'v';
  this.$input = (0, _FCore._)({
    tag: 'selectmenu',
    props: {
      items: this.descriptor.values.map(function (value) {
        return {
          text: value + "",
          value: value,
          icon: _this.value2Icon[value] || _this.value2Icon[iPre + value]
        };
      }),
      value: this.getValue()
    },
    on: {
      change: function change() {
        self.setValue(this.value, true);
        self.notifyChange();
        self.notifyStopChange();
      }
    }
  });
  this.cellElt.addChild(this.$input);
};
PELayoutAlign.prototype.reload = function () {
  var _this2 = this;
  var descriptor = this.renewDescriptor();
  var iPre = descriptor.values[0] === 'left' ? 'h' : 'v';
  var value = this.getValue();
  this.$input.items = descriptor.values.map(function (value) {
    return {
      text: value + "",
      value: value,
      icon: _this2.value2Icon[value] || _this2.value2Icon[iPre + value]
    };
  });
  if (value !== this.$input.value) {
    this.$input.value = value;
  }
  this.$input.disabled = descriptor.disabled;
};
var _default = PELayoutAlign;
exports["default"] = _default;

/***/ }),

/***/ 15928:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PELengthInPixel() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PELengthInPixel, _PEBaseType["default"]);
PELengthInPixel.prototype.attachInput = function () {
  var self = this;
  this.cellElt.addStyle('white-space', 'nowrap');
  this.$numberInput = (0, _FCore._)('numberinput').addStyle('margin-right', '5px');
  this.$unsetCBx = (0, _FCore._)({
    tag: 'checkbox',
    props: {
      text: 'unset'
    },
    style: {
      verticalAlign: 'middle'
    }
  });
  this.cellElt.addChild([this.$numberInput, this.$unsetCBx]);
  this.$numberInput.on('change', function (event) {
    if (event.by === 'keyup') return;
    self.setValue(this.value);
    self.notifyChange();
    if (event.by !== 'long_press_button') self.notifyStopChange();
  }).on('stopchange', function () {
    self.setValueFromInput();
    self.notifyStopChange();
  });
  this.$unsetCBx.on('change', function () {
    if (this.checked) {
      self.$numberInput.disabled = true;
      self.setValue(null);
    } else {
      self.$numberInput.disabled = false;
      self.setValue(512);
    }
  });
};
PELengthInPixel.prototype.reload = function () {
  var descriptor = this.renewDescriptor();
  this.$numberInput.disabled = !!descriptor.disabled;
  this.$unsetCBx.disabled = !!descriptor.disabled;
  var value = this.getValue();
  if (value > 0 && value < Infinity) {
    this.$numberInput.value = value;
    this.$unsetCBx.checked = false;
  } else {
    this.$numberInput.value = 512;
    this.$unsetCBx.checked = true;
    this.$numberInput.disabled = false;
  }
};
var _default = PELengthInPixel;
exports["default"] = _default;

/***/ }),

/***/ 12315:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEMeasurePosition() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEMeasurePosition, _PEBaseType["default"]);
PEMeasurePosition.prototype.attachInput = function () {
  var _this = this;
  var self = this;
  this.cellElt.addStyle('white-space', 'nowrap');
  this.$numberInput = (0, _FCore._)('numberinput').addStyle('margin-right', '5px');
  this.$numberInput.format = {
    maximumFractionDigits: 2,
    minimumFractionDigits: 0
  };
  this.$typeSelect = (0, _FCore._)({
    tag: 'selectmenu',
    style: {
      verticalAlign: 'middle'
    },
    props: {
      items: [{
        text: 'px',
        value: 'px'
      }, {
        text: '%',
        value: '%'
      }]
    }
  });
  this.cellElt.addChild([this.$numberInput, this.$typeSelect]);
  this._stopT0 = -1;
  this.$numberInput.on('change', function (event) {
    _this.setValueFromInput();
    _this.notifyChange();
    if (event.by === 'press_button' || event.by === 'long_press_button') {
      clearTimeout(_this._stopT0);
      _this._stopT0 = setTimeout(function () {
        return _this.notifyStopChange();
      }, 500);
    } else {
      _this.notifyStopChange();
    }
  });
  this.$typeSelect.on('change', function (event) {
    self.$numberInput.disabled = false;
    var value = self.getValue(this.value);
    self.$numberInput.value = value;
    if (this.value === '%') {
      self.setValue(value + '%');
    } else {
      self.setValue(value);
    }
    self.notifyChange();
    self.notifyStopChange();
  });
};
PEMeasurePosition.prototype.reload = function () {
  var descriptor = this.renewDescriptor();
  this.$numberInput.disabled = !!descriptor.disabled;
  var value;
  if (descriptor.disabled) {
    value = this.getValue(this.$typeSelect.value);
    this.$numberInput.value = value;
    //set-back
    if (this.$typeSelect.value === 'px') {
      this.setValue(value);
    } else if (this.$typeSelect.value === '%') {
      this.setValue(value + '%');
    }
  } else {
    value = this.getValue();
    if (typeof value === 'number') {
      this.$numberInput.value = value;
      this.$typeSelect.value = 'px';
    } else if (typeof value == 'string') {
      if (value.match(/%$/)) {
        this.$typeSelect.value = '%';
        this.$numberInput.value = parseFloat(value.replace('%', ''));
      } else {
        // console.error("Unknow typeof " + this.pName, value);
      }
    }
  }
};
PEMeasurePosition.prototype.setValueFromInput = function () {
  switch (this.$typeSelect.value) {
    case '%':
      this.setValue(this.$numberInput.value + '%');
      break;
    case 'px':
      this.setValue(this.$numberInput.value);
      break;
  }
};
var _default = PEMeasurePosition;
exports["default"] = _default;

/***/ }),

/***/ 61148:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _NumberInput = _interopRequireDefault(__webpack_require__(51394));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEMeasureSize() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEMeasureSize, _PEBaseType["default"]);
PEMeasureSize.prototype.attachInput = function () {
  var _this = this;
  var self = this;
  var units = this.descriptor.units || ['px', '%', 'match_parent', 'auto'];
  this.cellElt.addStyle('white-space', 'nowrap');
  /**
   * @type NumberInput
   */
  this.$numberInput = (0, _FCore._)('numberinput').addStyle('margin-right', '5px');
  this.$numberInput.stepper = true;
  this.$numberInput.format = {
    maximumFractionDigits: 2,
    minimumFractionDigits: 0
  };
  this.$typeSelect = (0, _FCore._)({
    tag: 'selectmenu',
    style: {
      verticalAlign: 'middle'
    },
    props: {
      items: units.map(function (unit) {
        return {
          text: unit,
          value: unit
        };
      })
    }
  });
  this.cellElt.addChild([this.$numberInput, this.$typeSelect]);
  this._stopT0 = -1;
  this.$numberInput.on('change', function (event) {
    _this.setValueFromInput();
    _this.notifyChange();
    if (event.by === 'press_button' || event.by === 'long_press_button') {
      clearTimeout(_this._stopT0);
      _this._stopT0 = setTimeout(function () {
        return _this.notifyStopChange();
      }, 500);
    } else {
      _this.notifyStopChange();
    }
  });
  this.$typeSelect.on('change', function (event) {
    var cValue;
    switch (this.value) {
      case "px":
        cValue = self.getValue('px');
        self.$numberInput.value = cValue;
        break;
      case 'match_parent':
        cValue = '100%';
        self.$numberInput.value = 100;
        break;
      case '%':
        cValue = self.getValue('%');
        self.$numberInput.value = cValue;
        cValue += '%';
        break;
      case 'auto':
        self.$numberInput.value = self.getValue('px');
        cValue = 'auto';
        break;
    }
    self.setValue(cValue);
    self.$numberInput.disabled = this.value === 'match_parent' || this.value === 'auto';
    self.notifyChange();
    self.notifyStopChange();
    if (this.value === 'auto') {
      self.$numberInput.value = self.getValue('px');
    }
  });
};
PEMeasureSize.prototype.reload = function () {
  var descriptor = this.renewDescriptor();
  this.$numberInput.disabled = !!descriptor.disabled;
  var value = this.getValue();
  if (typeof value === 'number') {
    this.$numberInput.value = value;
    this.$typeSelect.value = 'px';
  } else if (typeof value == 'string') {
    if (value.match(/%$/)) {
      this.$typeSelect.value = '%';
      this.$numberInput.value = parseFloat(value.replace('%', ''));
      this.$numberInput.disabled = false;
    } else if (value === 'match_parent' || value === 'auto') {
      this.$numberInput.disabled = true;
      this.$numberInput.value = this.getValue('px');
      this.$typeSelect.value = value;
    } else {
      console.error("Unknow typeof " + name, value);
    }
  }
};
PEMeasureSize.prototype.setValueFromInput = function () {
  switch (this.$typeSelect.value) {
    case '%':
      this.setValue(this.$numberInput.value + '%');
      break;
    case 'px':
      this.setValue(this.$numberInput.value);
      break;
  }
};
var _default = PEMeasureSize;
exports["default"] = _default;

/***/ }),

/***/ 12913:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PENumber() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PENumber, _PEBaseType["default"]);
PENumber.prototype.attachInput = function () {
  var self = this;
  this.$input = (0, _FCore._)({
    tag: 'numberinput',
    "class": 'as-need-update',
    style: {
      width: '120px'
    },
    props: {
      value: 0,
      stepper: true
    },
    on: {
      change: function change(event) {
        if (event.by === 'keyup') return;
        if (!self.descriptor.livePreview && event.by === 'long_press_button') return;
        self.setValue(this.value);
        self.notifyChange();
        if (event.by !== 'long_press_button') self.notifyStopChange();
      }
    }
  });
  this.$null = (0, _FCore._)({
    tag: 'checkbox',
    style: {
      marginLeft: '5px'
    },
    props: {
      checked: false,
      text: 'null'
    },
    on: {
      change: function change() {
        self.renewDescriptor();
        if (this.checked) {
          self.$input.disabled = true;
          self.setValue(null);
        } else {
          self.$input.disabled = false;
          self.$input.value = self.descriptor.defaultValue;
          self.setValue(self.descriptor.defaultValue);
        }
        self.notifyChange();
        self.notifyStopChange();
      }
    }
  });
  this.cellElt.addChild(this.$input).addChild(this.$null);
};
PENumber.prototype.reload = function () {
  this.renewDescriptor();
  if (typeof this.descriptor.floatFixed === "number") this.$input.floatFixed = this.descriptor.floatFixed;
  this.$input.min = (0, _utils.isRealNumber)(this.descriptor.min) ? this.descriptor.min : -Infinity;
  this.$input.max = (0, _utils.isRealNumber)(this.descriptor.max) ? this.descriptor.max : Infinity;
  var value = this.getValue();
  if (this.descriptor.nullable) {
    this.$null.removeStyle('display');
    if (!(0, _utils.isRealNumber)(value)) {
      this.$input.value = (0, _utils.isRealNumber)(this.descriptor.defaultValue) ? this.descriptor.defaultValue : 0;
      this.$input.disabled = true;
      this.$null.checked = true;
    } else {
      this.$input.disabled = !!this.descriptor.disabled;
      this.$null.checked = false;
      this.$input.value = value;
    }
  } else {
    this.$null.addStyle('display', 'none');
    if (!(0, _utils.isRealNumber)(value)) {
      this.$input.value = 0;
    } else {
      this.$input.value = value;
    }
    this.$input.disabled = this.descriptor.disabled;
  }
};
var _default = PENumber;
exports["default"] = _default;

/***/ }),

/***/ 29188:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEPermission() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEPermission, _PEBaseType["default"]);
PEPermission.prototype.attachInput = function () {
  var self = this;
  this.$lock = (0, _FCore._)({
    tag: 'button',
    "class": 'as-from-tool-button',
    style: {
      color: 'rgb(190, 190, 192)'
    },
    child: 'span.mdi.mdi-lock-open-variant-outline',
    on: {
      click: function click() {
        var per = Object.assign({}, self.getValue() || {});
        if (per.owner === 'system') {
          delete per.owner;
        } else {
          per.owner = 'system';
        }
        self.setValue(per);
        self.reload();
        self.notifyChange();
        self.notifyStopChange();
      }
    }
  });
  this.cellElt.addChild(this.$lock);
};
PEPermission.prototype.reload = function () {
  this.renewDescriptor();
  var value = this.getValue();
  if (value && value.owner === 'system') {
    this.$lock.addStyle('color', 'red');
    this.$lock.firstChild.removeClass('mdi-lock-open-variant-outline').addClass('mdi-lock-outline');
  } else {
    this.$lock.addStyle('color', 'rgb(190, 190, 192)');
    this.$lock.firstChild.addClass('mdi-lock-open-variant-outline').removeClass('mdi-lock-outline');
  }
  this.$lock.disabled = this.descriptor.disabled;
};
var _default = PEPermission;
exports["default"] = _default;

/***/ }),

/***/ 28143:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _stringGenerate = __webpack_require__(10713);
var _SelectListEditor = _interopRequireDefault(__webpack_require__(98795));
var _FCore = __webpack_require__(51518);
var _Toast = _interopRequireDefault(__webpack_require__(68105));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PESelectList() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PESelectList, _PEBaseType["default"]);
PESelectList.prototype.attachInput = function () {
  this.$input = (0, _FCore._)({
    tag: 'button',
    "class": 'as-from-tool-button',
    child: 'span.mdi.mdi-table-edit',
    on: {
      click: this.openTabForEditing.bind(this)
    }
  });
  this.cellElt.addChild(this.$input);
};
PESelectList.prototype.openTabForEditing = function () {
  var self = this;
  var listData = this.getValue();
  /**
   * @type {FormEditor}
   */
  var formEditor = this.editor.getContext(_R["default"].FORM_EDITOR);
  if (!formEditor) return;
  this._objects = this.editor.objects.slice();
  var object = this._objects[this._objects.length - 1];
  object.__objectIdent__ = object.__objectIdent__ || 'layout_' + (Math.random() * 10000 >> 0);
  var selectListTabIdent = object.__objectIdent__ + '_selectList_' + name;
  var selectListEditor;
  var editorTabHolder = formEditor.getTaskById(selectListTabIdent);
  if (editorTabHolder) selectListEditor = editorTabHolder.editor;
  if (!selectListEditor) {
    selectListEditor = new _SelectListEditor["default"]();
    selectListEditor.attach(self.editor);
    var tabName = self.editor.getProperty(object, 'name') + '(' + self.pName + ')';
    var desc = 'SelectList';
    formEditor.openEditorTab(selectListTabIdent, tabName, desc, selectListEditor, {
      layoutEditor: this
    });
  } else {
    editorTabHolder.tabframe.requestActive();
  }
  selectListEditor.setData(listData);
  selectListEditor.on('save', function () {
    listData = this.getData();
    self.setValue(listData);
  });
};
PESelectList.prototype._verifyObjectList = function () {
  var currentObjects = this.editor.objects;
  var res = this._objects.every(function (obj, i) {
    return obj === currentObjects[i];
  });
  if (!res) {
    var toast = _Toast["default"].make({
      props: {
        htitle: "Error",
        message: "Invalid object!"
      }
    });
    setTimeout(toast.disappear.bind(toast), 2000);
  }
  return res;
};
var _default = PESelectList;
exports["default"] = _default;

/***/ }),

/***/ 48588:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEText() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEText, _PEBaseType["default"]);
PEText.prototype.reload = function () {
  this.renewDescriptor();
  this.$input.value = this.getValue() || '';
  this.$input.disabled = this.descriptor.disabled;
};
PEText.prototype.attachInput = function () {
  var self = this;
  this.$input = (0, _FCore._)({
    tag: this.descriptor["long"] ? 'textarea' : 'input',
    attr: {
      type: 'text'
    },
    on: {
      keyup: function keyup() {
        self.setValue(this.value);
        self.notifyChange();
      },
      change: function change() {
        self.notifyStopChange();
      }
    }
  });
  this.cellElt.addChild(this.$input);
};
var _default = PEText;
exports["default"] = _default;

/***/ }),

/***/ 19071:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PETextAlign() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PETextAlign, _PEBaseType["default"]);
PETextAlign.prototype.icons = {
  left: 'mdi-format-align-left',
  right: 'mdi-format-align-right',
  center: 'mdi-format-align-center'
};
PETextAlign.prototype.attachInput = function () {
  var self = this;
  this.$button = (0, _FCore._)({
    tag: 'button',
    "class": 'as-property-editor-text-align-input',
    child: 'span.mdi'
  });
  this.cellElt.addChild(this.$button);
  this.$icon = (0, _FCore.$)('span.mdi', this.$button);
  this._lastClass = this.icons[this.getValue()] || this.icons.left;
  _QuickMenu["default"].toggleWhenClick(this.$button, {
    getMenuProps: function getMenuProps() {
      return {
        items: [{
          text: 'Left',
          icon: 'span.mdi.' + self.icons.left,
          menuData: 'left'
        }, {
          text: 'Center',
          icon: 'span.mdi.' + self.icons.center,
          menuData: 'center'
        }, {
          text: 'Right',
          icon: 'span.mdi.' + self.icons.right,
          menuData: 'right'
        }]
      };
    },
    onSelect: function onSelect(item) {
      var newIcon = self.icons[item.menuData];
      if (newIcon !== self._lastClass) {
        self.$icon.removeClass(self._lastClass).addClass(newIcon);
        self._lastClass = newIcon;
      }
      self.setValue(item.menuData);
      self.notifyStopChange();
    }
  });
};
PETextAlign.prototype.reload = function () {
  this.$icon.removeClass(this._lastClass).addClass(this.icons[this.getValue()] || this.icons.left);
};
var _default = PETextAlign;
exports["default"] = _default;

/***/ }),

/***/ 76628:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _TextDecorationPicker = _interopRequireDefault(__webpack_require__(69957));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends PEBaseType
 * @constructor
 */
function PETextDecoration() {
  this.ev_click = this.ev_click.bind(this);
  this.ev_clickOut = this.ev_clickOut.bind(this);
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PETextDecoration, _PEBaseType["default"]);
PETextDecoration.prototype.share = {
  $picker: null,
  holder: null
};
PETextDecoration.prototype.attachInput = function () {
  var _this = this;
  /**
   * @type {FollowerToggler}
   */
  this.$preview = (0, _FCore._)({
    tag: 'button',
    "class": 'as-property-editor-text-decoration-input',
    child: {
      tag: 'span',
      child: {
        text: 'AaBbCc DdEeFfGg'
      }
    },
    on: {
      click: this.ev_click
    }
  });
  if (!this.share.$picker) {
    this.share.$picker = (0, _FCore._)({
      tag: _TextDecorationPicker["default"],
      on: {
        change: function change() {
          var value;
          if (_this.share.holder) {
            value = _this.share.$picker.value;
            _this.share.holder.$preview.addStyle('textDecoration', value);
            _this.share.holder.setValue(value);
          }
        }
      }
    });
    this.share.$follower = (0, _FCore._)({
      tag: _Follower["default"],
      "class": 'as-dropdown-box-common-style',
      child: this.share.$picker
    });
  }
  this.cellElt.addChild(this.$preview);
};
PETextDecoration.prototype.reload = function () {
  this.$preview.addStyle('textDecoration', this.getValue());
};
PETextDecoration.prototype.onValue = function (value) {
  // console.log(value)
};
PETextDecoration.prototype.ev_clickOut = function (event) {
  // if (hitElement(this.share.$picker, event)) return;
  var c = event.target;
  while (c) {
    if (c.hasClass && c.hasClass('absol-follower')) {
      return;
    }
    c = c.parentElement;
  }
  document.removeEventListener('click', this.ev_clickOut);
  this.$preview.on('click', this.ev_click);
  if (this.share.holder === this) {
    this.share.holder = null;
    this.share.$follower.remove();
  }
};
PETextDecoration.prototype.ev_click = function () {
  var _this2 = this;
  this.share.$follower.addTo(document.body);
  this.share.holder = this;
  this.share.$follower.followTarget = this.$preview;
  this.share.$picker.value = this.getValue();
  this.$preview.off('click', this.ev_click);
  setTimeout(function () {
    document.addEventListener('click', _this2.ev_clickOut);
  }, 10);
};
var _default = PETextDecoration;
exports["default"] = _default;

/***/ }),

/***/ 60932:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PEBaseType = _interopRequireDefault(__webpack_require__(3090));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends PEBaseType
 * @constructor
 */
function PEUniqueText() {
  _PEBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(PEUniqueText, _PEBaseType["default"]);
PEUniqueText.prototype.attachInput = function () {
  var self = this;
  this.$input = (0, _FCore._)({
    tag: this.descriptor["long"] ? 'textarea' : 'input',
    attr: {
      type: 'text'
    },
    on: {
      keyup: function keyup() {
        self._verifyDuplicate();
        self.setValue(this.value);
        self.notifyChange();
      },
      change: function change() {
        self._verifyDuplicate();
        self.notifyStopChange();
      }
    }
  });
  this.cellElt.addChild(this.$input);
};
PEUniqueText.prototype.reload = function () {
  this.renewDescriptor();
  this.$input.value = this.getValue();
  this.$input.disabled = !!this.descriptor.disabled;
  this._verifyDuplicate();
};
PEUniqueText.prototype._verifyDuplicate = function () {
  if (this.descriptor.others[this.$input.value]) {
    this.$input.addStyle('border-color', '#f99');
    this.$input.attr('title', 'This name is used!');
  } else {
    this.$input.attr('title', null);
    this.$input.removeStyle('border-color');
  }
};
var _default = PEUniqueText;
exports["default"] = _default;

/***/ }),

/***/ 70547:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _SBStatement = _interopRequireDefault(__webpack_require__(23917));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends SBBase
 * @constructor
 */
function SBAddArgumentDeclaration() {
  _SBBase["default"].apply(this, arguments);
}
_OOP["default"].mixClass(SBAddArgumentDeclaration, _SBBase["default"]);
SBAddArgumentDeclaration.prototype.render = function () {
  _SBBase["default"].prototype.render.call(this);
  this.$elt.addClass('sb-add-argument-declaration');
  this.$text = (0, _FCore._)({
    tag: 'span',
    child: {
      text: "+ Add ArgumentDeclaration "
    }
  });
  this.$elt.addChild(this.$text);
};
SBAddArgumentDeclaration.prototype.getBoundingPath = function () {
  return _SBStatement["default"].prototype.getBoundingPath.call(this);
};
var _default = SBAddArgumentDeclaration;
exports["default"] = _default;

/***/ }),

/***/ 84343:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends SBBase
 * @constructor
 */
function SBAddExpression(opt) {
  _SBBase["default"].apply(this, arguments);
  this.opt = Object.assign({
    text: '+ Add Expression'
  }, opt);
}
_OOP["default"].mixClass(SBAddExpression, _SBBase["default"]);
SBAddExpression.prototype.render = function () {
  _SBBase["default"].prototype.render.call(this);
  this.$elt.addClass('sb-add-expression');
  this.$text = (0, _FCore._)({
    tag: 'span',
    "class": 'sb-inline-text',
    child: {
      text: this.opt.text
    }
  });
  this.$elt.addChild(this.$text);
};
SBAddExpression.prototype.getBoundingPath = function () {
  return _SBExpression["default"].prototype.getBoundingPath.call(this);
};
var _default = SBAddExpression;
exports["default"] = _default;

/***/ }),

/***/ 77516:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBStatement = _interopRequireDefault(__webpack_require__(23917));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends SBBase
 * @constructor
 */
function SBAddObjectProperty() {
  _SBBase["default"].apply(this, arguments);
}
_OOP["default"].mixClass(SBAddObjectProperty, _SBBase["default"]);
SBAddObjectProperty.prototype.render = function () {
  _SBBase["default"].prototype.render.call(this);
  this.$elt.addClass('sb-add-object-property');
  this.$text = (0, _FCore._)({
    tag: 'span',
    child: {
      text: "+ Add Property"
    }
  });
  this.$elt.addChild(this.$text);
};
SBAddObjectProperty.prototype.getBoundingPath = function () {
  return _SBStatement["default"].prototype.getBoundingPath.call(this);
};
var _default = SBAddObjectProperty;
exports["default"] = _default;

/***/ }),

/***/ 33085:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBAddReferent() {
  _SBBase["default"].apply(this, arguments);
}
_OOP["default"].mixClass(SBAddReferent, _SBBase["default"]);
SBAddReferent.prototype.render = function () {
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-add-referent',
    child: {
      tag: 'span',
      "class": 'sb-inner-text',
      child: {
        text: '+ Add Reference Variable'
      }
    }
  });
};
SBAddReferent.prototype.getBoundingPath = _SBExpression["default"].prototype.getBoundingPath;
var _default = SBAddReferent;
exports["default"] = _default;

/***/ }),

/***/ 5921:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
var _FCore = __webpack_require__(51518);
var _SBStatement = _interopRequireDefault(__webpack_require__(23917));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends SBBase
 * @constructor
 */
function SBAddStatement() {
  _SBBase["default"].apply(this, arguments);
}
_OOP["default"].mixClass(SBAddStatement, _SBBase["default"]);
SBAddStatement.prototype.render = function () {
  _SBBase["default"].prototype.render.call(this);
  this.$elt.addClass('sb-add-statement');
  this.$text = (0, _FCore._)({
    tag: 'span',
    child: {
      text: "+ Add Statement"
    }
  });
  this.$elt.addChild(this.$text);
};
SBAddStatement.prototype.getBoundingPath = function () {
  return _SBStatement["default"].prototype.getBoundingPath.call(this);
};
var _default = SBAddStatement;
exports["default"] = _default;

/***/ }),

/***/ 7072:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBStatement = _interopRequireDefault(__webpack_require__(23917));
var _FCore = __webpack_require__(51518);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends SBBase
 * @constructor
 */
function SBAddVariableDeclaration() {
  _SBBase["default"].apply(this, arguments);
}
_OOP["default"].mixClass(SBAddVariableDeclaration, _SBBase["default"]);
SBAddVariableDeclaration.prototype.render = function () {
  _SBBase["default"].prototype.render.call(this);
  this.$elt.addClass('sb-add-variable-declaration');
  this.$text = (0, _FCore._)({
    tag: 'span',
    child: {
      text: "+ Declare variable"
    }
  });
  this.$elt.addChild(this.$text);
};
SBAddVariableDeclaration.prototype.getBoundingPath = function () {
  return _SBStatement["default"].prototype.getBoundingPath.call(this);
};
var _default = SBAddVariableDeclaration;
exports["default"] = _default;

/***/ }),

/***/ 74735:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBStatement = _interopRequireDefault(__webpack_require__(23917));
var _FCore = __webpack_require__(51518);
var _SBIdentifierInput = _interopRequireDefault(__webpack_require__(97631));
var _SBTokenSelection = _interopRequireDefault(__webpack_require__(33360));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _SCParser = _interopRequireDefault(__webpack_require__(13682));
var _utils = __webpack_require__(11997);
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBStatement
 * @constructor
 */
function SBArgumentDeclaration() {
  _SBStatement["default"].apply(this, arguments);
  this._ast = {
    type: 'ArgumentDeclaration'
  };
  this.$name = (0, _FCore._)({
    tag: _SBIdentifierInput["default"],
    props: {
      // value: this._ast.id.name
    }
  });
  this.$type = (0, _FCore._)({
    tag: _SBTokenSelection["default"],
    props: {
      text: 'any'
      // text: type2text(this._ast.typeAnnotation.typeAnnotation)
    }
  });

  this.$of = (0, _FCore._)({
    tag: _SBTokenSelection["default"],
    "class": 'sb-argument-declaration-of',
    props: {
      // text: type2text(this._ast.typeAnnotation.typeAnnotation)
    }
  });
  this.$domSignal = (0, _FCore._)('attachhook');
  this.domSignal = new _DomSignal["default"](this.$domSignal).on('update', this.updateTypeDisplayName.bind(this));
  this._astBinding();
}
_OOP["default"].mixClass(SBArgumentDeclaration, _SBStatement["default"]);
SBArgumentDeclaration.prototype.astType = 'ArgumentDeclaration';
SBArgumentDeclaration.prototype.render = function () {
  var _this = this;
  _SBStatement["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-argument-declaration',
    child: [this.$name, {
      tag: 'span',
      "class": ['sb-inline-text'],
      child: {
        text: ' : '
      }
    }, this.$type, {
      tag: 'span',
      "class": ['sb-inline-text', 'sb-argument-declaration-of-text'],
      child: {
        text: ' of '
      }
    }, this.$of, this.$domSignal]
  });
  this.$id = (0, _FCore.$)(_SBIdentifierInput["default"].tag, this.$elt);
  this.$id.on('change', function () {
    _this._ast.id.name = _this.$id.identifierText;
    _this.notifyASTChange();
  }).on('keyup', function () {
    _this._ast.id.name = _this.$id.identifierText;
  });
  this.$type = (0, _FCore.$)(_SBTokenSelection["default"].tag, this.$elt);
  _QuickMenu["default"].toggleWhenClick(this.$type, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this.getTypeItemSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var typeAnnotation = {
          type: 'TypeAnnotation',
          typeAnnotation: ast
        };
        if (item.value === 'Array') {
          typeAnnotation.typeAnnotation.typeParameters = [{
            type: 'GenericType',
            id: {
              type: 'Identifier',
              name: 'any'
            }
          }];
        }
        _this._ast.typeAnnotation = typeAnnotation;
        _this.domSignal.emit('update');
        _this.notifySizeChange();
        _this.notifyASTChange();
      };
      if (item.cmd === 'chose_type') {
        _this.editor.typeSelectionDialog.openForResult((0, _utils.type2text)(_this._ast.typeAnnotation.typeAnnotation)).then(function (result) {
          if (result !== null) {
            handleAst({
              type: 'LinkedType',
              address: _SCParser["default"].parse(result + '', 'exp').ast
            });
            _this.notifyASTChange();
          }
        });
      } else {
        handleAst({
          type: 'GenericType',
          id: {
            type: 'Identifier',
            name: item.value
          }
        });
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.$of, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this.getTypeItemSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var typeAnnotation = (0, _generator.copyJSVariable)(_this._ast.typeAnnotation);
        typeAnnotation.typeAnnotation.typeParameters = [ast];
        _this._ast.typeAnnotation = typeAnnotation;
        _this.domSignal.emit('update');
        _this.notifySizeChange();
        _this.notifyASTChange();
      };
      if (item.cmd === 'chose_type') {
        _this.editor.typeSelectionDialog.openForResult((0, _utils.type2text)(_this._ast.typeAnnotation.typeAnnotation)).then(function (result) {
          if (result !== null) {
            handleAst({
              type: 'LinkedType',
              address: _SCParser["default"].parse(result + '', 'exp').ast
            });
            _this.notifyASTChange();
          }
        });
      } else {
        handleAst({
          type: 'GenericType',
          id: {
            type: 'Identifier',
            name: item.value
          }
        });
      }
    }
  });
};
SBArgumentDeclaration.prototype._astBinding = function () {
  var _this2 = this;
  var typeAnnotation = {
    type: 'TypeAnnotation',
    typeAnnotation: {
      type: 'GenericType',
      id: {
        type: 'Identifier',
        name: 'any'
      }
    }
  };
  var id = {
    type: 'Identifier',
    name: ''
  };
  Object.defineProperties(this._ast, {
    id: {
      set: function set(value) {
        value = value || {
          type: 'Identifier',
          name: ''
        };
        id = value;
        _this2.$name.identifierText = value && value.name || '';
      },
      get: function get() {
        return id;
      },
      enumerable: true
    },
    typeAnnotation: {
      set: function set(value) {
        value = value || {
          type: 'TypeAnnotation',
          typeAnnotation: {
            type: 'GenericType',
            id: {
              type: 'Identifier',
              name: 'any'
            }
          }
        };
        if (value.typeAnnotation && value.typeAnnotation.typeParameters && value.typeAnnotation.typeParameters && value.typeAnnotation.typeParameters.length > 0) {
          _this2.elt.addClass('sb-has-type-parameters');
          _this2.$of.text = (0, _utils.type2text)(value.typeAnnotation.typeParameters[0]);
        } else {
          _this2.elt.removeClass('sb-has-type-parameters');
        }
        _this2.$type.text = (0, _utils.type2text)(value.typeAnnotation);
        typeAnnotation = value;
        _this2.domSignal.emit('update');
      },
      get: function get() {
        return typeAnnotation;
      },
      enumerable: true
    }
  });
};
SBArgumentDeclaration.prototype.getTypeItemSelection = function () {
  return [{
    text: 'number',
    value: 'number'
  }, {
    text: 'string',
    value: 'string'
  }, {
    text: 'Date',
    value: 'Date'
  }, {
    text: 'Array',
    value: 'Array'
  }, {
    text: 'any',
    value: 'any'
  }, '=================', {
    text: 'Chọn kiểu dữ liệu',
    cmd: 'chose_type'
  }];
};
SBArgumentDeclaration.prototype.updateTypeDisplayName = function () {
  var editor = this.editor;
  var fullTypeName = (0, _utils.type2text)(this._ast.typeAnnotation.typeAnnotation);
  var typeName = (fullTypeName.match(/[^<]+/) || [''])[0];
  var ofName = (fullTypeName.match(/<([^>]+)/) || ['', ''])[1].trim();
  var isJSType = ['number', 'string', 'Date', 'any'].indexOf(typeName) >= 0;
  var typeDescriptor;
  if (isJSType) {
    this.$type.text = typeName;
  } else {
    typeDescriptor = editor.getTypeDescriptor(typeName);
    this.$type.text = typeDescriptor && typeDescriptor.displayName || typeName;
  }
  isJSType = ['number', 'string', 'Date', 'any'].indexOf(ofName) >= 0;
  if (isJSType) {
    this.$of.text = ofName;
  } else {
    typeDescriptor = editor.getTypeDescriptor(ofName);
    this.$of.text = typeDescriptor && typeDescriptor.displayName || ofName;
  }
  this.notifySizeChange();
};
Object.defineProperty(SBArgumentDeclaration.prototype, 'ast', {
  set: function set(ast) {
    this._ast.id = ast.id;
    //todo: other type
    this._ast.typeAnnotation = ast.typeAnnotation || {
      type: 'TypeAnnotation',
      typeAnnotation: {
        type: 'GenericType',
        id: {
          type: 'Identifier',
          name: 'any'
        }
      }
    };
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBArgumentDeclaration);
var _default = SBArgumentDeclaration;
exports["default"] = _default;

/***/ }),

/***/ 35103:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _SBBase = __webpack_require__(31057);
var _utils = __webpack_require__(11997);
var _utils2 = __webpack_require__(33192);
var _SCCodeGenerator = __webpack_require__(31647);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends {SBExpression}
 * @constructor
 */
function SBArrayExpression() {
  var _this = this;
  _SBExpression["default"].apply(this, arguments);
  this._ast = {
    type: "ArrayExpression"
  };
  this.addElementBlock = new _SBAddExpression["default"]();
  this.elementBlocks = [];
  Object.defineProperty(this._ast, 'elements', {
    enumerable: true,
    set: function set(astArr) {
      astArr = astArr || [];
      astArr = astArr.filter(function (astArr) {
        return !!astArr;
      });
      if (astArr.length === 0) {
        _this.elt.addClass('sb-empty');
      } else {
        _this.elt.removeClass('sb-empty');
      }
      _this.$elementCtn.clearChild();
      _this.elementBlocks = astArr.map(function (eAst, i) {
        var clazz = _SBClassManager["default"].get(eAst);
        var block = new clazz();
        block.ast = eAst;
        return block;
      });
      var domElements = _this.elementBlocks.map(function (blk, i) {
        return _this._makeWrapper(blk).attr('data-idx', i + '');
      });
      _this.$elementCtn.addChild(domElements);
      _this.$elementCtn.addChild(_this.$addItemWrapper);
    },
    get: function get() {
      return _this.elementBlocks.map(function (blk) {
        return blk ? blk.ast : null;
      });
    }
  });
}
_OOP["default"].mixClass(SBArrayExpression, _SBExpression["default"]);
SBArrayExpression.prototype.astType = 'ArrayExpression';
SBArrayExpression.prototype.render = function () {
  var _this2 = this;
  _SBExpression["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": ['sb-array-expression', 'sb-empty'],
    child: [{
      tag: 'span',
      "class": ['sb-array-expression-text', 'sb-inline-text']
    }, {
      "class": 'sb-array-expression-element-ctn',
      child: [{
        "class": ['sb-array-element-wrapper', 'sb-array-add-item-wrapper'],
        attr: {
          'data-idx': '*'
        },
        child: {
          "class": 'sb-sub-ctn',
          child: this.addElementBlock.elt
        }
      }]
    }]
  });
  this.$elementCtn = (0, _FCore.$)('.sb-array-expression-element-ctn', this.$elt);
  this.$addItemWrapper = (0, _FCore.$)('.sb-array-add-item-wrapper', this.$elt);
  _QuickMenu["default"].toggleWhenClick(this.$addItemWrapper, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz;
        clazz = _SBClassManager["default"].get(ast);
        var block = new clazz();
        var wrapperElt = _this2._makeWrapper(block);
        wrapperElt.attr('data-idx', _this2.$elementCtn.childNodes.length + '');
        _this2.$elementCtn.addChildBefore(wrapperElt, _this2.$addItemWrapper);
        block.ast = ast;
        _this2.elementBlocks.push(block);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
        _this2.editor.selectTool.selectBlock(block);
      };
      if (item.astType) {
        handleAst({
          type: item.astType
        });
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$addItemWrapper, '').then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      }
    }
  });
};
SBArrayExpression.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var bottom = bound.height - 1;
  var addBound = this.addElementBlock.elt.getBoundingClientRect();
  var turtle = new _SBTurtle["default"]().moveTo(0, 0).hLineTo(addBound.left - bound.left);
  Array.prototype.forEach.call(this.$elementCtn.childNodes, function (elt) {
    elt.$subCtn = (0, _FCore.$)('.sb-sub-ctn', elt);
    var sBound = elt.$subCtn.getBoundingClientRect();
    turtle.vLineTo(sBound.top + 8 - bound.top).expKnop();
  });
  turtle.vLineTo(bottom).hLineTo(0).vLineTo(17).expKnop().closePath();
  return turtle.getPath();
};
SBArrayExpression.prototype.removeChild = function (child) {
  var idx = this.elementBlocks.indexOf(child);
  if (idx < 0) return;
  this.elementBlocks.splice(idx, 1);
  this.$elementCtn.childNodes[idx].remove();
  for (var i = idx; i < this.elementBlocks.length; ++i) {
    this.$elementCtn.childNodes[i].attr('data-idx', i + '');
  }
};
SBArrayExpression.prototype.canMoveChild = function (child, direction) {
  // console.log(this.elementBlocks)
  var idx = this.elementBlocks.indexOf(child);
  if (idx < 0) return false;
  return idx > 0 && direction === 'up' || idx < this.elementBlocks.length - 1 && direction === "down";
};
SBArrayExpression.prototype.moveChild = function (child, direction) {
  var idx = this.elementBlocks.indexOf(child);
  if (idx < 0) return;
  var wrapper;
  if (idx > 0 && direction === 'up') {
    this.elementBlocks.splice(idx, 1);
    this.elementBlocks.splice(idx - 1, 0, child);
    wrapper = this.$elementCtn.childNodes[idx];
    wrapper.selfRemove();
    this.$elementCtn.addChildBefore(wrapper, this.$elementCtn.childNodes[idx - 1]);
    this.$elementCtn.childNodes[idx - 1].attr('data-idx', idx - 1 + '');
    this.$elementCtn.childNodes[idx].attr('data-idx', idx + '');
  } else if (idx < this.elementBlocks.length - 1 && direction === "down") {
    this.elementBlocks.splice(idx, 1);
    this.elementBlocks.splice(idx + 1, 0, child);
    wrapper = this.$elementCtn.childNodes[idx];
    wrapper.selfRemove();
    this.$elementCtn.addChildAfter(wrapper, this.$elementCtn.childNodes[idx]);
    this.$elementCtn.childNodes[idx].attr('data-idx', idx + '');
    this.$elementCtn.childNodes[idx + 1].attr('data-idx', idx + 1 + '');
  }
};
SBArrayExpression.prototype.canAddChildBefore = function (child, bf) {
  if (!bf) return true;
  var astType = child.astType || child.type;
  return (astType.endsWith('Expression') || astType.endsWith('Literal') || astType === 'Identifier') && this.elementBlocks.indexOf(bf) >= 0;
};
SBArrayExpression.prototype.addChildBefore = function (child, bf) {
  var astType = child.astType;
  if (!astType.endsWith('Expression') && !astType.endsWith('Literal') && astType !== 'Identifier') return;
  var idx;
  var bfElt;
  if (bf) {
    idx = this.elementBlocks.indexOf(bf);
    if (idx < 0) return;
    this.elementBlocks.splice(idx, 0, child);
    bfElt = this.$elementCtn.childNodes[idx];
  } else {
    idx = this.elementBlocks.length;
    this.elementBlocks.push(child);
    bfElt = this.$elementCtn.lastChild;
  }
  this.$elementCtn.addChildBefore(this._makeWrapper(child), bfElt);
  for (var i = idx; i < this.elementBlocks.length; ++i) {
    this.$elementCtn.childNodes[i].attr('data-idx', i + '');
  }
};
SBArrayExpression.prototype._makeWrapper = function (child) {
  var _this3 = this;
  var subCtn = (0, _FCore._)({
    "class": 'sb-sub-ctn',
    child: child.elt
  });
  var wrapper = (0, _FCore._)({
    "class": ['sb-array-element-wrapper'],
    child: subCtn
  });
  _QuickMenu["default"].toggleWhenClick(subCtn, {
    onClick: function onClick(event) {
      var ok = (0, _SBBase.isBoundOfChild)(event.target, subCtn);
      // console.log(ok)
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this3.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var idx = _this3.elementBlocks.indexOf(child);
      var handleAst = function handleAst(ast) {
        if (idx < 0) return;
        var clazz;
        clazz = _SBClassManager["default"].get(ast);
        var block = new clazz();
        child = block;
        _this3.elementBlocks[idx] = child;
        subCtn.clearChild().addChild(child.elt);
        block.ast = ast;
        _this3.notifySizeChange();
        _this3.notifyASTChange();
        _this3.editor.selectTool.selectBlock(block);
      };
      if (item.astType) {
        handleAst((0, _utils2.autoMigrateAst)(child.ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this3.$addItemWrapper, _this3.elementBlocks[idx] ? (0, _SCCodeGenerator.generateSCCode)(_this3.elementBlocks[idx].ast) : '').then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      }
    }
  });
  return wrapper;
};
SBArrayExpression.prototype.canAddChildAfter = function (child, at) {
  if (!at) return true;
  var astType = child.astType || child.type;
  return (astType.endsWith('Expression') || astType.endsWith('Literal') || astType === 'Identifier') && this.elementBlocks.indexOf(at) >= 0;
};
SBArrayExpression.prototype.addChildAfter = function (child, at) {
  var astType = child.astType || child.type;
  if (!astType.endsWith('Expression') && !astType.endsWith('Literal') && astType !== 'Identifier') return;
  var idx;
  var atElt;
  if (at) {
    idx = this.elementBlocks.indexOf(at);
    if (idx < 0) return;
    atElt = this.$elementCtn.childNodes[idx];
    this.elementBlocks.splice(idx + 1, 0, child);
  } else {
    atElt = null;
    idx = -1;
    this.elementBlocks.unshift(child);
  }
  this.$elementCtn.addChildAfter(this._makeWrapper(child), atElt);
  for (var i = idx + 1; i < this.elementBlocks.length; ++i) {
    this.$elementCtn.childNodes[i].attr('data-idx', i + '');
  }
};
Object.defineProperty(SBArrayExpression.prototype, 'ast', {
  enumerable: true,
  configurable: true,
  set: function set(ast) {
    this._ast.elements = ast && ast.elements;
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBArrayExpression);
var _default = SBArrayExpression;
exports["default"] = _default;

/***/ }),

/***/ 67562:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBBase = _interopRequireWildcard(__webpack_require__(31057));
var _SBStatement = _interopRequireDefault(__webpack_require__(23917));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _SBAddReferent = _interopRequireDefault(__webpack_require__(33085));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _EventEmitter = __webpack_require__(46833);
var _utils = __webpack_require__(11997);
var _SCCodeGenerator = __webpack_require__(31647);
var _utils2 = __webpack_require__(33192);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var verifyLeftAst = function verifyLeftAst(ast) {
  return ast.type === "Identifier" || ast.type === 'MemberExpression';
};

/***
 * AssignmentExpression in ExpressionStatement
 * @extends SBStatement
 *
 * @constructor
 */
function SBAssignStatement() {
  var _this = this;
  _SBStatement["default"].apply(this, arguments);
  this._ast = {
    type: 'ExpressionStatement',
    expression: {
      type: 'AssignmentExpression',
      left: null,
      right: null
    }
  };
  this.addReferentBlock = new _SBAddReferent["default"]();
  this.addExpressionBlock = new _SBAddExpression["default"]();
  this.leftBlock = null;
  this.rightBlock = null;
  Object.defineProperty(this._ast.expression, 'left', {
    get: function get() {
      return _this.leftBlock && _this.leftBlock.ast || null;
    }
  });
  Object.defineProperty(this._ast.expression, 'right', {
    get: function get() {
      return _this.rightBlock && _this.rightBlock.ast || null;
    }
  });
}
_OOP["default"].mixClass(SBAssignStatement, _SBStatement["default"]);
SBAssignStatement.prototype.astType = 'AssignStatement';
SBAssignStatement.isAstClassOf = function (ast) {
  if (!ast) return false;
  if (ast.type === 'ExpressionStatement' && ast.expression && ast.expression.type === 'AssignmentExpression') return true;
  return ast.type === 'AssignStatement';
};
SBAssignStatement.prototype.render = function () {
  var _this2 = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": ['sb-block', 'sb-assign-statement'],
    child: [{
      "class": 'sb-assign-statement-front',
      child: [{
        tag: 'span',
        "class": 'sb-inline-text',
        child: {
          text: 'set'
        }
      }, {
        tag: 'span',
        "class": ['sb-block-sub-ctn', 'sb-assign-statement-left-ctn'],
        child: [(this.leftBlock || this.addReferentBlock).elt]
      }, {
        tag: 'span',
        "class": 'sb-inline-text',
        child: {
          text: 'to'
        }
      }]
    }, {
      "class": ['sb-block-sub-ctn', 'sb-assign-statement-right-ctn'],
      child: [(this.rightBlock || this.addExpressionBlock).elt]
    }]
  });
  this.$leftCtn = (0, _FCore.$)('.sb-assign-statement-left-ctn', this.$elt);
  this.$rightCtn = (0, _FCore.$)('.sb-assign-statement-right-ctn', this.$elt);
  this.leftQMN = _QuickMenu["default"].toggleWhenClick(this.$leftCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this2.addReferentBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$leftCtn);
      ok = ok || _this2.leftBlock && _this2.leftBlock.ast.type === 'Identifier';
      if (!ok) event.cancel();
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getVariableSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz;
        clazz = _SBClassManager["default"].get(ast);
        _this2.leftBlock = new clazz();
        _this2.$leftCtn.clearChild().addChild(_this2.leftBlock.elt);
        _this2.leftBlock.ast = ast;
        _this2.notifySizeChange();
        _this2.notifyASTChange();
        _this2.editor.selectTool.selectBlock(_this2.leftBlock);
      };
      if (item.astType) {
        handleAst((0, _utils2.autoMigrateAst)(_this2.leftBlock && _this2.leftBlock.ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst({
          type: 'Identifier',
          name: item.variable
        });
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$leftCtn, '', verifyLeftAst).then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      }
    }
  });
  this.rightQMN = _QuickMenu["default"].toggleWhenClick(this.$rightCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this2.addExpressionBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$rightCtn);
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        clazz = _SBClassManager["default"].get(ast);
        _this2.rightBlock = new clazz();
        _this2.rightBlock.ast = ast;
        _this2.$rightCtn.clearChild().addChild(_this2.rightBlock.elt);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
        _this2.editor.selectTool.selectBlock(_this2.rightBlock);
      };
      var initValue;
      var clazz;
      if (item.astType) {
        handleAst((0, _utils2.autoMigrateAst)(_this2.rightBlock && _this2.rightBlock.ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        initValue = _this2.rightBlock ? (0, _SCCodeGenerator.generateSCCode)(_this2.rightBlock.ast) : '';
        (0, _utils.openExpressionInputDialog)(_this2.$rightCtn, initValue).then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      }
    }
  });
};
SBAssignStatement.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var leftBound = this.$leftCtn.getBoundingClientRect();
  var rightBound = this.$rightCtn.getBoundingClientRect();
  var right = rightBound.left - bound.left;
  var bottom = bound.height - 1;
  var turtle = new _SBTurtle["default"]().moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).lineTo(18, 0).statementKnop().lineTo(right, 0).vLineBy(8).expKnop().lineTo(right, bottom).lineTo(28, bottom).statementKnop().lineTo(8, bound.height - 1).arcBy(8, 8, 0, 0, 1, -8, -8).closePath().expBound(leftBound.left - bound.left, leftBound.top - bound.top, leftBound.width, leftBound.height);
  return turtle.getPath();
};
SBAssignStatement.prototype.removeChild = function (child) {
  if (child === this.leftBlock) {
    child.elt.selfReplace(this.addReferentBlock.elt);
    this.leftBlock = null;
  } else if (child === this.rightBlock) {
    child.elt.selfReplace(this.addExpressionBlock.elt);
    this.rightBlock = null;
  }
};
SBAssignStatement.prototype.canAddChildBefore = function (child, bf) {
  var astType = child.astType || child.type;
  var isRef = astType === 'Identifier' || astType === 'MemberExpression';
  var isExpression = astType === 'Identifier' || astType.endsWith('Literal') || astType.endsWith('Expression');
  if (bf) {
    if (bf === this.rightBlock && isRef) return true;
  } else {
    if (!this.leftBlock && isRef) return true;
    if (!this.rightBlock && isExpression) return true;
  }
  return false;
};
SBAssignStatement.prototype.addChildBefore = function (child, bf) {
  var astType = child.astType;
  var isRef = astType === 'Identifier' || astType === 'MemberExpression';
  var isExpression = astType === 'Identifier' || astType.endsWith('Literal') || astType.endsWith('Expression');
  if (bf) {
    if (bf === this.rightBlock && isRef) {
      this.leftBlock = child;
      this.$leftCtn.clearChild().addChild(child.elt);
    }
  } else {
    if (!this.leftBlock && isRef) {
      this.leftBlock = child;
      this.$leftCtn.clearChild().addChild(child.elt);
    } else if (!this.rightBlock && isExpression) {
      this.rightBlock = child;
      this.$rightCtn.clearChild().addChild(child.elt);
    }
  }
};
SBAssignStatement.prototype.canAddChildAfter = function (child, at) {
  var astType = child.astType || child.type;
  var isRef = astType === 'Identifier' || astType === 'MemberExpression';
  var isExpression = astType === 'Identifier' || astType.endsWith('Literal') || astType.endsWith('Expression');
  if (at) {
    if (at === this.leftBlock && isExpression) return true;
  } else {
    if (!this.leftBlock && isRef) return true;
    if (!this.rightBlock && isExpression) return true;
  }
  return false;
};
SBAssignStatement.prototype.addChildAfter = function (child, at) {
  var astType = child.astType || child.type;
  var isRef = astType === 'Identifier' || astType === 'MemberExpression';
  var isExpression = astType === 'Identifier' || astType.endsWith('Literal') || astType.endsWith('Expression');
  if (at) {
    if (at === this.leftBlock && isExpression) {
      this.rightBlock = child;
      this.$rightCtn.clearChild().addChild(child.elt);
    }
  } else {
    if (!this.rightBlock && isExpression) {
      this.rightBlock = child;
      this.$rightCtn.clearChild().addChild(child.elt);
    } else if (!this.leftBlock && isRef) {
      this.leftBlock = child;
      this.$leftCtn.clearChild().addChild(child.elt);
    }
  }
};
SBAssignStatement.prototype.getVariableSelection = function () {
  var variables = this.getVariables();
  var keys = Object.keys(variables);
  keys.sort(function (a, b) {
    return variables[a].order - variables[b].order;
  });
  var res = keys.map(function (key) {
    return {
      text: key,
      variable: key
    };
  });
  res.push('===========', {
    text: 'Object->property',
    astType: 'MemberExpression'
  }, {
    text: "Parse form text",
    cmd: 'parse_text',
    icon: 'span.mdi.mdi-form-textbox'
  });
  return res;
};
Object.defineProperty(SBAssignStatement.prototype, 'ast', {
  set: function set(ast) {
    if (ast.type === 'AssignStatement') {
      ast = {
        type: 'ExpressionStatement',
        expression: {
          type: 'AssignmentExpression',
          left: ast.left,
          right: ast.right
        }
      };
    }
    // console.log(ast);
    var clazz;
    if (ast.expression.left) {
      clazz = _SBClassManager["default"].get(ast.expression.left);
      this.leftBlock = new clazz();
      this.leftBlock.ast = ast.expression.left;
      if (this.$leftCtn) this.$leftCtn.clearChild().addChild(this.leftBlock.elt);
    } else {
      this.leftBlock = null;
      if (this.$leftCtn) this.$leftCtn.clearChild().addChild(this.addReferentBlock.elt);
    }
    if (ast.expression.right) {
      clazz = _SBClassManager["default"].get(ast.expression.right);
      this.rightBlock = new clazz();
      this.rightBlock.ast = ast.expression.right;
      if (this.$rightCtn) this.$rightCtn.clearChild().addChild(this.rightBlock.elt);
    } else {
      if (this.$rightCtn) this.$rightCtn.clearChild().addChild(this.addExpressionBlock.elt);
    }
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBAssignStatement);
var _default = SBAssignStatement;
exports["default"] = _default;

/***/ }),

/***/ 31057:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.isBoundOfChild = isBoundOfChild;
var _FCore = __webpack_require__(51518);
__webpack_require__(29211);
var _GCore = _interopRequireDefault(__webpack_require__(66723));
var _Turtle = _interopRequireDefault(__webpack_require__(90942));
var _sbWhileStatement = _interopRequireDefault(__webpack_require__(89667));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {AElement|HTMLElement} elt
 * @param {AElement|HTMLElement} ctnElt
 * @returns {boolean}
 */
function isBoundOfChild(elt, ctnElt) {
  if (!elt || !elt.tagName || elt.tagName.toLowerCase() !== 'path' || !elt.hasClass || !elt.hasClass('sb-block-bound')) return false;
  return elt.parentElement && elt.parentElement.parentElement && elt.parentElement.parentElement.parentElement === ctnElt;
}
function SBBase() {
  this._editor = null;
}
SBBase.prototype.astType = null;
SBBase.prototype.render = function () {
  this.$elt = (0, _FCore._)({
    "class": 'sb-block',
    props: {
      sbBlock: this
    },
    child: [_GCore["default"]._({
      tag: 'svg',
      "class": 'sb-block-img',
      child: [{
        tag: 'path',
        "class": 'sb-block-bound'
      }]
    })]
  });
  this.$elt.requestUpdateSize = this.updateImg.bind(this);
  if (this.astType) this.$elt.attr('data-ast-type', this.astType);
  this.$img = (0, _FCore.$)('.sb-block-img', this.$elt);
  this.$bound = (0, _FCore.$)('.sb-block-bound', this.$img);
};
SBBase.prototype.updateImg = function () {
  if (!this.$elt) return;
  this.bound = this.$elt.getBoundingClientRect();
  this.imgBound = this.$img.getBoundingClientRect();
  this.$img.attr('viewBox', [-10.5, -0.5, this.imgBound.width, this.imgBound.height].join(' '));
  this.$bound.attr('d', this.getBoundingPath());
};
SBBase.prototype.notifySizeChange = function () {
  var cr = this.$elt;
  var topElt;
  while (cr) {
    if (cr.sbBlock) topElt = cr;
    cr = cr.parentElement;
  }
  (0, _FCore.$)('.sb-block', cr, function (elt) {
    elt.sbBlock.updateImg();
  });
};
SBBase.prototype.notifyASTChange = function () {
  var parent = this.parent;
  while (parent) {
    parent.onChildAstChange(this);
    parent = parent.parent;
  }
  var editor = this.editor;
  if (editor) editor.notifyASTChange();
};
SBBase.prototype.onChildAstChange = function (targetBlock) {};
SBBase.prototype.getBoundingPath = function () {
  return new _Turtle["default"]().moveTo(0, 0).lineTo(this.bound.width - 1, 0).lineTo(this.bound.width - 1, this.bound.height - 1).lineTo(0, this.bound.height - 1).closePath().getPath();
};
SBBase.prototype.getVariables = function (ac) {
  var parent = this.parent;
  if (parent) return this.parent.getVariables(ac);
};
SBBase.prototype.getExpressionTypeSelection = function () {
  var res = [];
  var variables = this.getVariables();
  var variableArr = Object.keys(variables);
  variableArr.sort(function (a, b) {
    return variables[a].order - variables[b].order;
  });
  res.push({
    "class": 'sb-menu-selection-title',
    child: {
      text: 'Libs'
    }
  });
  variableArr.reduce(function (ac, key) {
    if (variables[key].type.type === 'object' && variables[key].isLib) ac.push({
      text: key,
      variable: variables[key]
    });
    return ac;
  }, res);
  res.push({
    "class": 'sb-menu-selection-title',
    child: {
      text: 'Variable'
    }
  });
  variableArr.reduce(function (ac, key) {
    if (variables[key].type.type === 'class' || variables[key].isLib) return ac;
    ac.push({
      text: key,
      variable: variables[key]
    });
    return ac;
  }, res);
  res.push({
    "class": 'sb-menu-selection-title',
    child: {
      text: 'Class'
    }
  });
  variableArr.reduce(function (ac, key) {
    if (variables[key].type.type !== 'class') return ac;
    ac.push({
      text: key,
      variable: variables[key]
    });
    return ac;
  }, res);
  res.push({
    tag: 'span',
    "class": 'sb-menu-selection-title',
    child: {
      text: 'Literal'
    }
  }, {
    text: 'null',
    astType: 'NullLiteral'
  }, {
    text: 'boolean',
    astType: 'BooleanLiteral'
  }, {
    text: 'number',
    astType: 'NumericLiteral'
  }, {
    text: 'string',
    astType: 'StringLiteral'
  }, {
    tag: 'span',
    "class": 'sb-menu-selection-title',
    child: {
      text: 'Expression'
    }
  }, {
    text: '[] + []',
    astType: 'BinaryExpression'
  }, {
    text: '- []',
    astType: 'UnaryExpression'
  }, {
    text: 'create array',
    astType: 'ArrayExpression'
  }, {
    text: 'create struct',
    astType: 'ObjectExpression'
  }, {
    text: 'new Object',
    astType: 'NewExpression'
  }, {
    text: 'object->property',
    astType: 'MemberExpression'
  }, {
    text: 'fx(...)',
    astType: 'CallExpression'
  }, '==========', {
    text: "Parse form text",
    cmd: 'parse_text',
    icon: 'span.mdi.mdi-form-textbox'
  }, {
    icon: 'span.mdi.mdi-puzzle-star-outline',
    text: 'Open Expression builder(TODO)',
    cmd: 'open_expression_builder'
  });
  return res;
};
SBBase.prototype.getStatementTypeSelection = function () {
  var items = [{
    text: 'Assign Statement',
    astType: 'AssignStatement',
    icon: 'span.mdi.mdi-equal'
  }, {
    text: 'Call function',
    astType: 'ExpressionStatement',
    icon: 'span.mdi.mdi-function'
  }, {
    text: 'If statement',
    astType: 'IfStatement',
    icon: 'span.mdi.mdi-help'
  }, {
    text: 'While loop',
    astType: 'WhileStatement',
    icon: _sbWhileStatement["default"]
  }, {
    text: 'For count loop',
    astType: 'ForCountStatement',
    icon: _sbWhileStatement["default"]
  }, {
    text: 'For of loop',
    astType: 'ForOfStatement',
    icon: _sbWhileStatement["default"]
  }, {
    text: 'For in loop',
    astType: 'ForInStatement',
    icon: _sbWhileStatement["default"]
  }, {
    text: 'ReturnStatement',
    astType: 'ReturnStatement',
    icon: 'span.mdi.mdi-location-exit'
  }];
  if (this.inLoop) {
    items.push({
      text: 'Break loop',
      astType: 'BreakStatement',
      icon: 'span.mdi.mdi-repeat-off'
    });
  }
  items.unshift({
    text: 'From Text',
    cmd: 'parse_text',
    icon: 'span.mdi.mdi-form-textbox'
  }, '===================');
  return items;
};

//****** CHILD  **********//
SBBase.prototype.remove = function () {
  var parent = this.parent;
  if (parent) parent.removeChild(this);
};
SBBase.prototype.removeChild = function (child) {
  throw new Error("Not implement!");
};

/***
 *
 * @param {"up" | "down"}direction
 * @return {boolean}
 */
SBBase.prototype.canMove = function (direction) {
  var parent = this.parent;
  if (parent) return parent.canMoveChild(this, direction);
  return false;
};

/***
 *
 * @param {SBBase|*} child
 * @param {"up" | "down"} direction
 * @return {boolean}
 */
SBBase.prototype.canMoveChild = function (child, direction) {
  return false;
};

/***
 *
 * @param {"up" | "down"}direction
 */
SBBase.prototype.move = function (direction) {
  var parent = this.parent;
  if (parent) parent.moveChild(this, direction);
};

/***
 *
 * @param {SBBase|*} child
 * @param {"up" | "down"} direction
 *
 */
SBBase.prototype.moveChild = function (child, direction) {};

/***
 *
 * @param {SBBase|*} child
 * @returns {boolean}
 */
SBBase.prototype.canAddChildBefore = function (child, bf) {
  return false;
};

/***
 *
 * @param {SBBase|*} child
 * @param {SBBase|*} bf
 */
SBBase.prototype.addChildBefore = function (child, bf) {};

/***
 *
 * @param {SBBase|*} child
 * @returns {boolean}
 */
SBBase.prototype.canAddChildAfter = function (child, at) {
  return false;
};

/***
 *
 * @param {SBBase|*} child
 */
SBBase.prototype.addChildAfter = function (child, at) {};
SBBase.prototype.getExpectedType = function () {
  return null;
};
SBBase.prototype.isCompleted = function () {
  return true;
};
Object.defineProperty(SBBase.prototype, 'elt', {
  get: function get() {
    if (!this.$elt) {
      this.render();
    }
    return this.$elt;
  }
});
Object.defineProperty(SBBase.prototype, 'parent', {
  get: function get() {
    if (!this.$elt) {
      return null;
    }
    var p = this.$elt.parentElement;
    while (p) {
      if (p.sbEditor) {
        this._editor = p.sbEditor;
        return null;
      }
      if (p.sbBlock) return p.sbBlock;
      p = p.parentElement;
    }
    return null;
  }
});
Object.defineProperty(SBBase.prototype, 'inLoop', {
  get: function get() {
    var inLoop = false;
    var cr = this;
    while (cr && !inLoop) {
      if (cr.astType === 'FunctionDeclaration') break;
      if (cr.astType === 'ForCountStatement') inLoop = true;
      if (cr.astType === 'WhileStatement') inLoop = true;
      cr = cr.parent;
    }
    return inLoop;
  }
});

/***
 * @name editor
 * @memberOf SBBase#
 * @type {SCBlocklyEditor|null}
 */
Object.defineProperty(SBBase.prototype, 'editor', {
  get: function get() {
    var parent = this.parent;
    if (this._editor) return this._editor;
    if (parent) {
      this._editor = parent.editor;
    }
    return this._editor;
  }
});
var _default = SBBase;
exports["default"] = _default;

/***/ }),

/***/ 33759:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBTokenSelection = _interopRequireDefault(__webpack_require__(33360));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _EventEmitter = __webpack_require__(46833);
var _utils = __webpack_require__(11997);
var _SBBase = __webpack_require__(31057);
var _utils2 = __webpack_require__(33192);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBExpression
 * @constructor
 */
function SBBinaryExpression() {
  var _this = this;
  _SBExpression["default"].call(this);
  this._ast = {
    type: 'BinaryExpression',
    left: null,
    right: null,
    operator: {
      type: 'BinaryOperator',
      content: '+'
    }
  };
  this.addExpressionLeftBlock = new _SBAddExpression["default"]();
  this.addExpressionRightBlock = new _SBAddExpression["default"]();
  this.leftBlock = null;
  this.rightBlock = null;
  Object.defineProperty(this._ast, 'left', {
    get: function get() {
      return _this.leftBlock && _this.leftBlock.ast || null;
    }
  });
  Object.defineProperty(this._ast, 'right', {
    get: function get() {
      return _this.rightBlock && _this.rightBlock.ast || null;
    }
  });
}
_OOP["default"].mixClass(SBBinaryExpression, _SBExpression["default"]);
SBBinaryExpression.prototype.astType = 'BinaryExpression';
SBBinaryExpression.prototype.render = function () {
  var _this2 = this;
  _SBExpression["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-binary-expression',
    child: [{
      "class": ['sb-block-sub-ctn', 'sb-binary-expression-left-ctn'],
      child: [(this.leftBlock || this.addExpressionLeftBlock).elt]
    }, {
      tag: _SBTokenSelection["default"],
      props: {
        text: this._ast.operator.content
      }
    }, {
      "class": ['sb-block-sub-ctn', 'sb-binary-expression-right-ctn'],
      child: [(this.rightBlock || this.addExpressionRightBlock).elt]
    }]
  });
  this.$leftCtn = (0, _FCore.$)('.sb-binary-expression-left-ctn', this.$elt);
  this.$rightCtn = (0, _FCore.$)('.sb-binary-expression-right-ctn', this.$elt);
  this.$op = (0, _FCore.$)(_SBTokenSelection["default"].tag, this.$elt);
  _QuickMenu["default"].toggleWhenClick(this.$op, {
    getMenuProps: function getMenuProps() {
      return {
        extendClasses: ['sb-quick-menu'],
        items: _this2.getOperatorSelection()
      };
    },
    onSelect: function onSelect(item) {
      if (item.op) {
        _this2._ast.operator.content = item.op;
        if (_this2.$op) {
          _this2.$op.text = item.op;
        }
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      }
    }
  });
  this.leftQMN = _QuickMenu["default"].toggleWhenClick(this.$leftCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this2.addExpressionLeftBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$leftCtn);
      ok = ok || _this2.leftBlock && _this2.leftBlock.astType === 'Identifier';
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz = _SBClassManager["default"].get(ast);
        _this2.leftBlock = new clazz();
        _this2.leftBlock.ast = ast;
        _this2.$leftCtn.clearChild().addChild(_this2.leftBlock.elt);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
        _this2.editor.selectTool.selectBlock(_this2.leftBlock);
      };
      if (item.astType) {
        handleAst((0, _utils2.autoMigrateAst)(_this2.leftBlock && _this2.leftBlock.ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$leftCtn, '').then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      }
    }
  });
  this.rightQMN = _QuickMenu["default"].toggleWhenClick(this.$rightCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this2.addExpressionRightBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$rightCtn);
      ok = ok || _this2.rightBlock && _this2.rightBlock.astType === 'Identifier';
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz = _SBClassManager["default"].get(ast);
        _this2.rightBlock = new clazz();
        _this2.rightBlock.ast = ast;
        _this2.$rightCtn.clearChild().addChild(_this2.rightBlock.elt);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
        _this2.editor.selectTool.selectBlock(_this2.rightBlock);
      };
      if (item.astType) {
        handleAst((0, _utils2.autoMigrateAst)(_this2.rightBlock && _this2.rightBlock.ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$leftCtn, '').then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      }
    }
  });
};
SBBinaryExpression.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var leftBound = this.$leftCtn.getBoundingClientRect();
  var rightBound = this.$rightCtn.getBoundingClientRect();
  return new _SBTurtle["default"]().expBound(0, 0, bound.width - 1, bound.height - 1).expBound(leftBound.left - bound.left, leftBound.top - bound.top, leftBound.width, leftBound.height).expBound(rightBound.left - bound.left, rightBound.top - bound.top, rightBound.width, rightBound.height).getPath();
};
SBBinaryExpression.prototype.getOperatorSelection = function () {
  return ['+', '-', '*', '/', '%', '&&', '||', '==', '!=', '<', '>', '>=', '<='].map(function (op) {
    return {
      text: op,
      op: op
    };
  });
};
SBBinaryExpression.prototype.removeChild = function (child) {
  if (child === this.leftBlock) {
    child.elt.selfReplace(this.addExpressionLeftBlock.elt);
  } else if (child === this.rightBlock) {
    child.elt.selfReplace(this.addExpressionRightBlock.elt);
  }
};
Object.defineProperty(SBBinaryExpression.prototype, 'ast', {
  set: function set(ast) {
    if (ast.operator) {
      this._ast.operator.content = ast.operator.content;
      if (this.$op) {
        this.$op.text = ast.operator.content;
      }
    }
    var clazz;
    if (ast.left) {
      clazz = _SBClassManager["default"].get(ast.left);
      this.leftBlock = new clazz();
      this.leftBlock.ast = ast.left;
      if (this.$leftCtn) this.$leftCtn.clearChild().addChild(this.leftBlock.elt);
    } else {
      this.leftBlock = null;
      if (this.$leftCtn) this.$leftCtn.clearChild().addChild(this.addExpressionLeftBlock.elt);
    }
    if (ast.right) {
      clazz = _SBClassManager["default"].get(ast.right);
      this.rightBlock = new clazz();
      this.rightBlock.ast = ast.right;
      if (this.$leftCtn) this.$rightCtn.clearChild().addChild(this.rightBlock.elt);
    } else {
      this.rightBlock = null;
      if (this.$leftCtn) this.$rightCtn.clearChild().addChild(this.addExpressionRightBlock.elt);
    }
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBBinaryExpression);
var _default = SBBinaryExpression;
exports["default"] = _default;

/***/ }),

/***/ 75278:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _NumberInput = _interopRequireDefault(__webpack_require__(51394));
var _FCore = __webpack_require__(51518);
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
var _SBTokenSelection = _interopRequireDefault(__webpack_require__(33360));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBBooleanLiteral() {
  var _this = this;
  _SBBase["default"].apply(this, arguments);
  this._ast = {
    type: 'BooleanLiteral',
    value: false
  };
  var value = false;
  Object.defineProperty(this._ast, 'value', {
    enumerable: true,
    set: function set(_value) {
      value = !!_value;
      if (_this.$elt) {
        _this.$elt.attr('data-value', value ? 'true' : 'false');
        _this.$value.text = value ? 'true' : 'false';
      }
    },
    get: function get() {
      return value;
    }
  });
}
_OOP["default"].mixClass(SBBooleanLiteral, _SBBase["default"]);
SBBooleanLiteral.prototype.astType = 'BooleanLiteral';
SBBooleanLiteral.prototype.render = function () {
  var _this2 = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-boolean-literal',
    child: {
      tag: _SBTokenSelection["default"],
      props: {
        text: this._ast.value ? 'true' : 'false'
      }
    }
  });
  this.$value = (0, _FCore.$)(_SBTokenSelection["default"].tag, this.$elt);
  _QuickMenu["default"].toggleWhenClick(this.$value, {
    getMenuProps: function getMenuProps() {
      return {
        items: [{
          text: 'true',
          value: true
        }, {
          text: 'false',
          value: false
        }]
      };
    },
    onSelect: function onSelect(item) {
      if (item.value !== _this2._ast.value) {
        _this2._ast.value = item.value;
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      }
    }
  });
};
SBBooleanLiteral.prototype.getBoundingPath = _SBExpression["default"].prototype.getBoundingPath;
Object.defineProperty(SBBooleanLiteral.prototype, 'ast', {
  set: function set(ast) {
    this._ast.value = !!ast.value;
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBBooleanLiteral);
var _default = SBBooleanLiteral;
exports["default"] = _default;

/***/ }),

/***/ 58035:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBStatement = _interopRequireDefault(__webpack_require__(23917));
var _FCore = __webpack_require__(51518);
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBStatement
 * @constructor
 */
function SBBreakStatement() {
  this._ast = {
    type: 'BreakStatement'
  };
}
_OOP["default"].mixClass(SBBreakStatement, _SBStatement["default"]);
SBBreakStatement.prototype.astType = 'BreakStatement';
SBBreakStatement.prototype.render = function () {
  _SBStatement["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-break-statement',
    child: [{
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: 'break'
      }
    }]
  });
};
Object.defineProperty(SBBreakStatement.prototype, 'ast', {
  set: function set(ast) {},
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBBreakStatement);
var _default = SBBreakStatement;
exports["default"] = _default;

/***/ }),

/***/ 561:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBBase = __webpack_require__(31057);
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _utils = __webpack_require__(84512);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _EventEmitter = __webpack_require__(46833);
var _SBIdentifier = _interopRequireDefault(__webpack_require__(39425));
var _utils2 = __webpack_require__(11997);
var _utils3 = __webpack_require__(33192);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBCallExpression() {
  _SBExpression["default"].apply(this, arguments);
  this._ast = {
    type: this.astType
  };
  this.calleeBlock = null;
  this.addCalleeBlock = new _SBAddExpression["default"]({
    text: this.ADD_CALLEE_TXT
  });
  this.addArgumentExpressionBlocks = [];
  this.argumentExpressionBlocks = [];
  this._bindAst();
}
_OOP["default"].mixClass(SBCallExpression, _SBExpression["default"]);
SBCallExpression.prototype.astType = 'CallExpression';
SBCallExpression.prototype.ADD_CALLEE_TXT = '+ Add Function';
SBCallExpression.prototype.render = function () {
  var _this = this;
  _SBExpression["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-call-expression',
    child: [{
      tag: 'button',
      "class": 'sb-call-expression-option-btn',
      child: 'span.mdi.mdi-cog'
    }, {
      "class": 'sb-call-expression-callee-row',
      child: [{
        tag: 'span',
        "class": 'sb-inline-text'
      }, {
        "class": 'sb-call-expression-callee-ctn',
        child: this.addCalleeBlock.elt
      }]
    }, {
      "class": 'sb-call-expression-with-ctn',
      child: [{
        tag: 'span',
        "class": 'sb-inline-text',
        child: {
          text: 'with'
        }
      }, {
        "class": 'sb-call-expression-argument-list-ctn',
        child: []
      }]
    }]
  });
  this.$calleeCtn = (0, _FCore.$)('.sb-call-expression-callee-ctn', this.$elt);
  this.$argumentListCtn = (0, _FCore.$)('.sb-call-expression-argument-list-ctn', this.$elt);
  this.$optionBtn = (0, _FCore.$)('.sb-call-expression-option-btn', this.$elt);
  this.$argumentRows = [];
  this.$argNames = [];
  this._renderArgumentRows(0);
  this._updateTextWidth();
  _QuickMenu["default"].toggleWhenClick(this.$calleeCtn, {
    onClick: function onClick(event) {
      var ok = false;
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this.$calleeCtn);
      ok = ok || _this.calleeBlock && _this.calleeBlock.astType === 'Identifier';
      ok = ok || (0, _EventEmitter.hitElement)(_this.addCalleeBlock.elt, event);
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this.getCalleeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz = _SBClassManager["default"].get(ast);
        _this.calleeBlock = new clazz();
        _this.calleeBlock.ast = ast;
        _this.$calleeCtn.clearChild().addChild(_this.calleeBlock.elt);
        _this.notifyASTChange();
        _this.notifySizeChange();
        _this.editor.selectTool.selectBlock(_this.calleeBlock);
      };
      var clazz;
      if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.astType) {
        handleAst((0, _utils3.autoMigrateAst)(_this.calleeBlock && _this.calleeBlock.ast, {
          type: item.astType
        }));
      } else if (item.cmd === 'parse_text') {
        (0, _utils2.openExpressionInputDialog)(_this.$calleeCtn, '', function (ast) {
          return ast.type === 'Identifier' || ast.type === 'MemberExpression';
        }).then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      } else if (item.cmd === 'choose_from_package') {
        _this.editor.openFunctionPickerDialog().then(function (ast) {
          if (ast) {
            handleAst(ast);
          }
        });
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.$optionBtn, {
    getMenuProps: function getMenuProps() {
      var items = [{
        text: '+ Add argument',
        cmd: 'push_arg'
      }];
      if (_this.argumentExpressionBlocks.length > 0) {
        items.push({
          text: '- Remove last argument',
          cmd: 'pop_arg'
        });
      }
      return {
        items: items
      };
    },
    onSelect: function onSelect(item) {
      switch (item.cmd) {
        case 'push_arg':
          _this._renderArgumentRows(_this.argumentExpressionBlocks.length + 1);
          break;
        case 'pop_arg':
          _this._renderArgumentRows(_this.argumentExpressionBlocks.length - 1);
          break;
      }
      _this.notifySizeChange();
      _this.notifyASTChange();
    }
  });
};
SBCallExpression.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var calleeBound = this.$calleeCtn.getBoundingClientRect();
  var rowBounds = this.$argumentRows.map(function (elt) {
    return elt.getBoundingClientRect();
  });
  var turtle = new _SBTurtle["default"]().moveTo(0, 0).hLineTo(calleeBound.left - bound.left).vLineBy(8).expKnop();
  if (this.$argumentRows.length > 0) {
    turtle.vLineTo(rowBounds[0].top - bound.top);
    this.$argumentRows.forEach(function (rowElt, i, array) {
      var valueBound = rowElt.$valueCtn.getBoundingClientRect();
      if (i === 0) {
        turtle.hLineTo(valueBound.left - bound.left);
      }
      turtle.vLineTo(valueBound.top + 8 - bound.top).expKnop();
      if (i + 1 === array.length) {
        turtle.vLineTo(valueBound.bottom - bound.top - 1);
      }
    });
  } else {
    turtle.vLineTo(bound.height - 1);
  }
  turtle.hLineTo(0).vLineTo(17).expKnop();
  turtle.closePath();
  return turtle.getPath();
};
SBCallExpression.prototype._bindAst = function () {
  var _this2 = this;
  this.elt;
  Object.defineProperty(this._ast, 'callee', {
    set: function set(ast) {
      var clazz, block;
      if (ast) {
        clazz = _SBClassManager["default"].get(ast);
        block = new clazz();
        block.ast = ast;
        _this2.calleeBlock = block;
      } else {
        _this2.calleeBlock = null;
        block = _this2.addCalleeBlock;
      }
      _this2.$calleeCtn.clearChild().addChild(block.elt);
    },
    get: function get() {
      return _this2.calleeBlock && _this2.calleeBlock.ast || null;
    },
    enumerable: true
  });
  Object.defineProperty(this._ast, 'arguments', {
    set: function set(args) {
      args = args || [];
      _this2._renderArgumentRows(args.length);
      _this2.argumentExpressionBlocks = args.map(function (arg) {
        if (!arg) return null;
        var clazz = _SBClassManager["default"].get(arg);
        var block = new clazz();
        block.ast = arg;
        return block;
      });
      _this2.argumentExpressionBlocks.forEach(function (blk, i) {
        _this2.$argumentRows[i].$valueCtn.clearChild().addChild((_this2.argumentExpressionBlocks[i] || _this2.addArgumentExpressionBlocks[i]).elt);
      });
    },
    get: function get() {
      return _this2.argumentExpressionBlocks.map(function (blk) {
        return blk && blk.ast || null;
      });
    },
    enumerable: true
  });
};
SBCallExpression.prototype._renderArgumentRows = function (n) {
  this.elt.attr('data-arguments-length', n + '');
  while (this.addArgumentExpressionBlocks.length < n) {
    this.addArgumentExpressionBlocks.push(new _SBAddExpression["default"]());
  }
  while (this.argumentExpressionBlocks.length < n) {
    this.argumentExpressionBlocks.push(null);
  }
  while (this.argumentExpressionBlocks.length > n) {
    this.argumentExpressionBlocks.pop();
  }
  var rowElt;
  while (this.$argumentRows.length < n) {
    rowElt = this._renderArgumentRow(this.$argumentRows.length);
    this.$argumentRows.push(rowElt);
    this.$argumentListCtn.addChild(rowElt);
  }
  while (this.$argumentRows.length > n) {
    rowElt = this.$argumentRows.pop();
    rowElt.remove();
  }
  this._updateTextWidth();
};
SBCallExpression.prototype._renderArgumentRow = function (i) {
  var _this3 = this;
  var paramName = 'args[' + i + ']';
  var rowElt = (0, _FCore._)({
    "class": 'sb-call-expression-param',
    child: [{
      tag: 'span',
      "class": 'sb-call-expression-param-name',
      child: {
        text: paramName
      }
    }, {
      "class": 'sb-call-expression-param-value-ctn',
      child: this.addArgumentExpressionBlocks[i].elt
    }]
  });
  rowElt.$name = (0, _FCore.$)('.sb-call-expression-param-name', rowElt);
  rowElt.$valueCtn = (0, _FCore.$)('.sb-call-expression-param-value-ctn', rowElt);
  Object.defineProperty(rowElt, 'paramName', {
    set: function set(value) {
      paramName = value || 'args[' + i + ']';
      rowElt.$name.firstChild.data = paramName;
    },
    get: function get() {
      return paramName;
    }
  });
  _QuickMenu["default"].toggleWhenClick(rowElt.$valueCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this3.addArgumentExpressionBlocks[i].elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, rowElt.$valueCtn);
      ok = ok || _this3.argumentExpressionBlocks[i] && _this3.argumentExpressionBlocks[i] === 'Identifier';
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this3.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz = _SBClassManager["default"].get(ast);
        _this3.argumentExpressionBlocks[i] = new clazz();
        _this3.argumentExpressionBlocks[i].ast = ast;
        rowElt.$valueCtn.clearChild().addChild(_this3.argumentExpressionBlocks[i].elt);
        _this3.notifySizeChange();
        _this3.notifyASTChange();
        _this3.editor.selectTool.selectBlock(_this3.argumentExpressionBlocks[i]);
      };
      var clazz;
      if (item.astType) {
        handleAst((0, _utils3.autoMigrateAst)(_this3.argumentExpressionBlocks[i] && _this3.argumentExpressionBlocks[i].ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils2.openExpressionInputDialog)(rowElt.$valueCtn, '').then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      }
    }
  });
  return rowElt;
};
SBCallExpression.prototype._updateTextWidth = function () {
  var texts = this.$argumentRows.map(function (elt) {
    return elt.$name.innerHTML;
  });
  var width = texts.reduce(function (ac, text) {
    return Math.max(ac, (0, _utils.measureText)(text, '14px arial').width + 15);
  }, 50);
  this.$elt.addStyle('--argument-text-width', width + 'px');
};
SBCallExpression.prototype.getCalleeSelection = function () {
  var variables = Object.values(this.getVariables()).map(function (variable) {
    return {
      text: variable.id.name,
      variable: variable
    };
  });
  variables.push('==========');
  variables.push({
    text: 'object->property',
    astType: 'MemberExpression'
  });
  variables.push({
    text: "Parse form text",
    cmd: 'parse_text',
    icon: 'span.mdi.mdi-form-textbox'
  });
  variables.unshift('=======');
  variables.unshift({
    text: "Choose from packages",
    cmd: 'choose_from_package',
    icon: 'span.mdi.mdi-file-tree'
  });
  return variables;
};
SBCallExpression.prototype.removeChild = function (child) {
  var idx;
  if (child === this.calleeBlock) {
    this.$calleeCtn.clearChild().addChild(this.addCalleeBlock.elt);
  } else {
    idx = this.argumentExpressionBlocks.indexOf(child);
    if (idx >= 0) {
      this.$argumentRows[idx].$valueCtn.clearChild().addChild(this.addArgumentExpressionBlocks[idx].elt);
      this.argumentExpressionBlocks[idx] = null;
    }
  }
};
SBCallExpression.prototype.onChildAstChange = function () {
  this._updateArgumentNames();
};
SBCallExpression.prototype._updateArgumentNames = function () {
  var calleeExpectType = null;
  if (this.calleeBlock) calleeExpectType = this.calleeBlock.getExpectedType();
  var argsDesc = calleeExpectType && calleeExpectType.args || [];
  this.$argumentRows.forEach(function (rowElt, i) {
    var desc = argsDesc[i];
    if (desc) {
      rowElt.paramName = desc.name;
    } else {
      rowElt.paramName = null;
    }
  });
  this._updateTextWidth();
  this.notifySizeChange();
};
Object.defineProperty(SBCallExpression.prototype, 'ast', {
  set: function set(ast) {
    var _this4 = this;
    this._ast.callee = ast.callee;
    this._ast['arguments'] = ast.arguments;
    if (this.editor) this._updateArgumentNames();else {
      setTimeout(function () {
        return _this4._updateArgumentNames();
      }, 100);
    }
  },
  get: function get() {
    return this._ast;
  },
  enumerable: true,
  configurable: true
});
_SBClassManager["default"].add(SBCallExpression);
var _default = SBCallExpression;
exports["default"] = _default;

/***/ }),

/***/ 98937:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBCallExpression = _interopRequireDefault(__webpack_require__(561));
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * Call expression in expression statatement
 * @extends SBCallExpression
 * @constructor
 */
function SBCallExpressionStatement() {
  _SBCallExpression["default"].apply(this, arguments);
  this._ast.type = _SBCallExpression["default"].prototype.astType;
  this._statementAst = {
    type: 'ExpressionStatement',
    expression: this._ast
  };
}
_OOP["default"].mixClass(SBCallExpressionStatement, _SBCallExpression["default"]);
SBCallExpressionStatement.prototype.astType = 'ExpressionStatement';
SBCallExpressionStatement.isAstClassOf = function (ast) {
  return ast.type === 'ExpressionStatement' && ast.expression && ast.expression.type === 'CallExpression';
};
SBCallExpressionStatement.prototype.render = function () {
  _SBCallExpression["default"].prototype.render.call(this);
  this.$elt.addClass('sb-call-expression-statement');
};
SBCallExpressionStatement.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var calleeBound = this.$calleeCtn.getBoundingClientRect();
  var rowBounds = this.$argumentRows.map(function (elt) {
    return elt.getBoundingClientRect();
  });
  var turtle = new _SBTurtle["default"]().moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).lineTo(18, 0).statementKnop().hLineTo(calleeBound.left - bound.left).vLineBy(8).expKnop();
  if (this.$argumentRows.length > 0) {
    turtle.vLineTo(rowBounds[0].top - bound.top);
    this.$argumentRows.forEach(function (rowElt, i, array) {
      var valueBound = rowElt.$valueCtn.getBoundingClientRect();
      if (i === 0) {
        turtle.hLineTo(valueBound.left - bound.left);
      }
      turtle.vLineTo(valueBound.top + 8 - bound.top).expKnop();
      if (i + 1 === array.length) {
        turtle.vLineTo(valueBound.bottom - bound.top - 1);
      }
    });
  } else {
    turtle.vLineTo(bound.height - 1);
  }
  turtle.hLineTo(28).statementKnop().hLineTo(8).arcBy(8, 8, 0, 0, 1, -8, -8).closePath();
  return turtle.getPath();
};
Object.defineProperty(SBCallExpressionStatement.prototype, 'ast', {
  set: function set(ast) {
    var _this = this;
    var copyExpression;
    if (ast.expression) {
      copyExpression = (0, _generator.copyJSVariable)(ast.expression);
      this._ast.callee = copyExpression.callee;
      this._ast['arguments'] = copyExpression['arguments'];
    }
    setTimeout(function () {
      return _this._updateArgumentNames();
    }, 100);
  },
  get: function get() {
    return this._statementAst;
  }
});
_SBClassManager["default"].add(SBCallExpressionStatement);
var _default = SBCallExpressionStatement;
exports["default"] = _default;

/***/ }),

/***/ 87048:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _getFunctionName = _interopRequireDefault(__webpack_require__(13721));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function SBClassManager() {
  this.classes = [];
  this.astType2Class = {};
}
SBClassManager.prototype.add = function (clazz) {
  if (this.classes.indexOf(clazz) >= 0) return;
  this.classes.push(clazz);
  var name = clazz.prototype.type || clazz.name || (0, _getFunctionName["default"])(clazz);
  this.classes[name] = clazz;
  if (clazz.prototype.astType) {
    this.astType2Class[clazz.prototype.astType] = clazz;
  }
};

/**
 *
 * @param {string|object} o
 * @returns {*}
 */
SBClassManager.prototype.get = function (o) {
  if (!o) return null;
  var res;
  if (typeof o === 'string') {
    res = this.classes[o] || this.astType2Class[o];
  } else {
    res = this.classes.find(function (clazz) {
      if (clazz.isAstClassOf) {
        return clazz.isAstClassOf(o);
      } else {
        return clazz.prototype.astType === o.type;
      }
    });
  }
  return res;
};
SBClassManager.prototype.getClassNames = function () {
  return Object.keys(this.classes);
};
var _default = new SBClassManager();
exports["default"] = _default;

/***/ }),

/***/ 54816:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBExpression() {
  _SBBase["default"].apply(this, arguments);
}
_OOP["default"].mixClass(SBExpression, _SBBase["default"]);
SBExpression.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var right = bound.width - 1;
  var bottom = bound.height - 1;
  var turtle = new _SBTurtle["default"]().moveTo(0, 0).hLineTo(right).vLineTo(bottom).hLineTo(0).vLineTo(17).expKnop().closePath();
  return turtle.getPath();
};
var _default = SBExpression;
exports["default"] = _default;

/***/ }),

/***/ 9650:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBBase = _interopRequireWildcard(__webpack_require__(31057));
var _FCore = __webpack_require__(51518);
var _SBVariable = _interopRequireDefault(__webpack_require__(46086));
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _SBAddStatement = _interopRequireDefault(__webpack_require__(5921));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _EventEmitter = __webpack_require__(46833);
var _SBAddReferent = _interopRequireDefault(__webpack_require__(33085));
var _utils = __webpack_require__(11997);
var _SBWhileStatement = _interopRequireDefault(__webpack_require__(29034));
var _SCCodeGenerator = __webpack_require__(31647);
var _SCTypeManager = _interopRequireDefault(__webpack_require__(6360));
var _SCProgramInstance = __webpack_require__(47790);
var _utils2 = __webpack_require__(33192);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBForCountStatement() {
  var _this = this;
  _SBBase["default"].apply(this, arguments);
  this._ast = {
    type: "ForCountStatement"
  };
  Object.defineProperties(this._ast, {
    "for": {
      enumerable: true,
      set: function set(ast) {
        var clazz;
        if (ast) {
          clazz = _SBClassManager["default"].get(ast);
          _this.forBlock = new clazz();
          _this.forBlock.ast = ast;
          if (_this.$forCtn) {
            _this.$forCtn.clearChild().addChild(_this.forBlock.elt);
          }
        } else if (_this.forBlock) {
          _this.forBlock = null;
          if (_this.$forCtn) {
            _this.$forCtn.clearChild().addChild(_this.addForIdentBlock.elt);
          }
        }
      },
      get: function get() {
        return _this.forBlock ? _this.forBlock.ast : null;
      }
    },
    from: {
      enumerable: true,
      set: function set(ast) {
        var clazz;
        if (ast) {
          clazz = _SBClassManager["default"].get(ast);
          _this.fromBlock = new clazz();
          _this.fromBlock.ast = ast;
          if (_this.$fromCtn) {
            _this.$fromCtn.clearChild().addChild(_this.fromBlock.elt);
          }
        } else if (_this.forBlock) {
          _this.fromBlock = null;
          if (_this.$fromCtn) {
            _this.$fromCtn.clearChild().addChild(_this.addFromExpressionBlock.elt);
          }
        }
      },
      get: function get() {
        return _this.fromBlock ? _this.fromBlock.ast : null;
      }
    },
    to: {
      enumerable: true,
      set: function set(ast) {
        var clazz;
        if (ast) {
          clazz = _SBClassManager["default"].get(ast);
          _this.toBlock = new clazz();
          _this.toBlock.ast = ast;
          if (_this.$toCtn) {
            _this.$toCtn.clearChild().addChild(_this.toBlock.elt);
          }
        } else if (_this.forBlock) {
          _this.toBlock = null;
          if (_this.$toCtn) {
            _this.$toCtn.clearChild().addChild(_this.addToExpressionBlock.elt);
          }
        }
      },
      get: function get() {
        return _this.toBlock ? _this.toBlock.ast : null;
      }
    },
    body: {
      enumerable: true,
      set: function set(ast) {
        if (!ast) {
          ast = {
            type: 'BlockStatement',
            body: []
          };
        } else if (ast.type !== 'BlockStatement') {
          ast = {
            type: 'BlockStatement',
            body: [ast]
          };
        }
        _this.doBlocks = ast.body.map(function (sAst) {
          var clazz = _SBClassManager["default"].get(sAst);
          var block = new clazz();
          block.ast = sAst;
          return block;
        });
        if (_this.elt) {
          //call getter
          _this.$doCtn.clearChild().addChild(_this.doBlocks.map(function (blk) {
            return blk.elt;
          })).addChild(_this.addStatementBlock.elt);
        }
      },
      get: function get() {
        return {
          type: 'BlockStatement',
          body: _this.doBlocks.map(function (blk) {
            return blk.ast;
          })
        };
      }
    }
  });
  this.addForIdentBlock = new _SBAddReferent["default"]();
  this.addFromExpressionBlock = new _SBAddExpression["default"]();
  this.addToExpressionBlock = new _SBAddExpression["default"]();
  this.addStatementBlock = new _SBAddStatement["default"]();
  this.forBlock = null;
  this.fromBlock = null;
  this.toBlock = null;
  this.doBlocks = [];
}
_OOP["default"].mixClass(SBForCountStatement, _SBBase["default"]);
SBForCountStatement.prototype.astType = 'ForCountStatement';
SBForCountStatement.prototype.render = function () {
  var _this2 = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-for-count-statement',
    child: [{
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: 'for count'
      }
    }, {
      "class": ['sb-block-sub-ctn', 'sb-for-count-statement-for-ctn'],
      child: this.forBlock ? this.forBlock.elt : this.addForIdentBlock.elt
    }, {
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: 'from'
      }
    }, {
      "class": ['sb-block-sub-ctn', 'sb-for-count-statement-from-ctn'],
      child: this.fromBlock ? this.fromBlock.elt : this.addFromExpressionBlock.elt
    }, {
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: 'to'
      }
    }, {
      "class": ['sb-block-sub-ctn', 'sb-for-count-statement-to-ctn'],
      child: this.toBlock ? this.toBlock.elt : this.addToExpressionBlock.elt
    }, {
      "class": ['sb-block-sub-ctn', 'sb-for-count-statement-body-ctn'],
      child: [this.addStatementBlock.elt]
    }]
  });
  this.$forCtn = (0, _FCore.$)('.sb-for-count-statement-for-ctn', this.$elt);
  this.$fromCtn = (0, _FCore.$)('.sb-for-count-statement-from-ctn', this.$elt);
  this.$toCtn = (0, _FCore.$)('.sb-for-count-statement-to-ctn', this.$elt);
  this.$bodyCtn = (0, _FCore.$)('.sb-for-count-statement-body-ctn', this.$elt);
  this.$doCtn = this.$bodyCtn;
  _QuickMenu["default"].toggleWhenClick(this.$forCtn, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getLocalVariableSelection()
      };
    },
    onSelect: function onSelect(item) {
      var clazz;
      if (item.variable) {
        clazz = _SBClassManager["default"].get('Identifier');
        _this2.forBlock = new clazz();
        _this2.forBlock.ast = item.variable.id;
        _this2.$forCtn.clearChild().addChild(_this2.forBlock.elt);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.$fromCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this2.addFromExpressionBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$fromCtn);
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz = _SBClassManager["default"].get(ast);
        _this2.fromBlock = new clazz();
        _this2.fromBlock.ast = ast;
        _this2.$fromCtn.clearChild().addChild(_this2.fromBlock.elt);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      };
      if (item.astType) {
        handleAst((0, _utils2.autoMigrateAst)(_this2.fromBlock && _this2.fromBlock.ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$fromCtn, _this2.fromBlock ? (0, _SCCodeGenerator.generateSCCode)(_this2.forBlock.ast) : '').then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.$toCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this2.addToExpressionBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$toCtn);
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz;
        clazz = _SBClassManager["default"].get(ast);
        _this2.toBlock = new clazz();
        _this2.$toCtn.clearChild().addChild(_this2.toBlock.elt);
        _this2.toBlock.ast = ast;
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      };
      if (item.astType) {
        handleAst((0, _utils2.autoMigrateAst)(_this2.toBlock && _this2.toBlock.ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$toCtn, _this2.toBlock ? (0, _SCCodeGenerator.generateSCCode)(_this2.toBlock.ast) : '').then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.addStatementBlock.elt, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getStatementTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz = _SBClassManager["default"].get(ast);
        var block = new clazz();
        block.ast = ast;
        _this2.$doCtn.addChildBefore(block.elt, _this2.addStatementBlock.elt);
        _this2.doBlocks.push(block);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      };
      if (item.astType) {
        handleAst({
          type: item.astType
        });
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openStatementInputDialog)(_this2.addStatementBlock.elt, '').then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
};
SBForCountStatement.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var forBound = this.$forCtn.getBoundingClientRect();
  var bodyBound = this.$bodyCtn.getBoundingClientRect();
  var fromBound = this.$fromCtn.getBoundingClientRect();
  var toBound = this.$toCtn.getBoundingClientRect();
  return new _SBTurtle["default"]().moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).lineTo(18, 0).statementKnop().hLineTo(bound.width - 1).vLineTo(bodyBound.top - bound.top).hLineTo(bodyBound.left - bound.left + 28).statementKnop().hLineTo(bodyBound.left - bound.left + 8).arcBy(8, 8, 0, 0, 0, -8, 8).vLineBy(bodyBound.height - 16).arcBy(8, 8, 0, 0, 0, 8, 8).hLineTo(bound.width).vLineTo(bound.height).hLineTo(28).statementKnop().hLineTo(8).arcBy(8, 8, 0, 0, 1, -8, -8).closePath().expBound(forBound.left - bound.left, forBound.top - bound.top, forBound.width, forBound.height).expBound(fromBound.left - bound.left, fromBound.top - bound.top, fromBound.width, fromBound.height).expBound(toBound.left - bound.left, toBound.top - bound.top, toBound.width, toBound.height).getPath();
};
SBForCountStatement.prototype.getLocalVariableSelection = function () {
  var variables = this.getVariables();
  var res = [];
  Object.keys(variables).filter(function (name) {
    var va = variables[name];
    if (va.type === 'any' || va.type === 'number') {
      return true;
    }
    if (_SCProgramInstance.SCStaticLibScope.findScope(name) || _SCProgramInstance.SCDynamicLibScope.findScope(name)) return false;
    if (va.type && va.type.type === 'GenericType' && (va.type.id.name === 'number' || va.type.id.name === 'any')) return true;
    var desc = _SCTypeManager["default"].detectTypeDescriptorOf(va.type);
    if (desc && desc.type === 'number') return true;
    return false;
  }).forEach(function (key) {
    res.push({
      text: key,
      variable: variables[key]
    });
  });
  return res;
};
SBForCountStatement.prototype.removeDoChild = _SBWhileStatement["default"].prototype.removeDoChild;
SBForCountStatement.prototype.canMoveChild = _SBWhileStatement["default"].prototype.canMoveChild;
SBForCountStatement.prototype.moveChild = _SBWhileStatement["default"].prototype.moveChild;
SBForCountStatement.prototype.removeChild = _SBWhileStatement["default"].prototype.removeChild;
SBForCountStatement.prototype.removeChild = function (child) {
  this.removeDoChild(child);
  if (child === this.fromBlock) {
    this.fromBlock = null;
    this.$fromCtn.clearChild().addChild(this.addFromExpressionBlock.elt);
  } else if (child === this.forBlock) {
    this.forBlock = null;
    this.$forCtn.clearChild().addChild(this.addForIdentBlock.elt);
  } else if (child === this.toBlock) {
    this.toBlock = null;
    this.$toCtn.clearChild().addChild(this.addToExpressionBlock.elt);
  }
};
Object.defineProperty(SBForCountStatement.prototype, 'ast', {
  set: function set(ast) {
    ast = ast || {};
    this._ast["for"] = ast["for"];
    this._ast.from = ast.from;
    this._ast.to = ast.to;
    this._ast.body = ast.body;
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBForCountStatement);
var _default = SBForCountStatement;
exports["default"] = _default;

/***/ }),

/***/ 66675:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _SBBase = _interopRequireWildcard(__webpack_require__(31057));
var _FCore = __webpack_require__(51518);
var _SBAddReferent = _interopRequireDefault(__webpack_require__(33085));
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _SBAddStatement = _interopRequireDefault(__webpack_require__(5921));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBWhileStatement = _interopRequireDefault(__webpack_require__(29034));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _utils = __webpack_require__(11997);
var _EventEmitter = __webpack_require__(46833);
var _SCCodeGenerator = __webpack_require__(31647);
var _SBForOfStatement = _interopRequireDefault(__webpack_require__(15045));
var _utils2 = __webpack_require__(33192);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBForInStatement() {
  _SBBase["default"].apply(this, arguments);
  this._ast = {
    type: this.astType
  };
  this.forBlock = null;
  this.inBlock = null;
  this.doBlocks = [];
  this.addForIdentBlock = new _SBAddReferent["default"]();
  this.addOfExpressionBlock = new _SBAddExpression["default"]();
  this.addStatementBlock = new _SBAddStatement["default"]();
  this._astBinding();
}
_OOP["default"].mixClass(SBForInStatement, _SBBase["default"]);
SBForInStatement.prototype.astType = 'ForInStatement';
SBForInStatement.prototype.removeDoChild = _SBWhileStatement["default"].prototype.removeDoChild;
SBForInStatement.prototype.canMoveChild = _SBWhileStatement["default"].prototype.canMoveChild;
SBForInStatement.prototype.moveChild = _SBWhileStatement["default"].prototype.moveChild;
SBForInStatement.prototype.removeChild = _SBWhileStatement["default"].prototype.removeChild;
SBForInStatement.prototype.removeChild = function (child) {
  this.removeDoChild(child);
  if (child === this.forBlock) {
    this.forBlock = null;
    this.$forCtn.clearChild().addChild(this.addForIdentBlock.elt);
  } else if (child === this.inBlock) {
    this.inBlock = null;
    this.$inCtn.clearChild().addChild(this.addOfExpressionBlock.elt);
  }
};
SBForInStatement.prototype.getLocalVariableSelection = _SBForOfStatement["default"].prototype.getLocalVariableSelection;
SBForInStatement.prototype._astBinding = function () {
  var _this = this;
  Object.defineProperties(this._ast, {
    "for": {
      enumerable: true,
      set: function set(ast) {
        var clazz;
        if (ast) {
          clazz = _SBClassManager["default"].get(ast);
          _this.forBlock = new clazz();
          _this.forBlock.ast = ast;
          if (_this.$forCtn) {
            _this.$forCtn.clearChild().addChild(_this.forBlock.elt);
          }
        } else if (_this.forBlock) {
          _this.forBlock = null;
          if (_this.$forCtn) {
            _this.$forCtn.clearChild().addChild(_this.addForIdentBlock.elt);
          }
        }
      },
      get: function get() {
        return _this.forBlock ? _this.forBlock.ast : null;
      }
    },
    "in": {
      enumerable: true,
      set: function set(ast) {
        var clazz;
        if (ast) {
          clazz = _SBClassManager["default"].get(ast);
          _this.inBlock = new clazz();
          _this.inBlock.ast = ast;
          if (_this.$inCtn) {
            _this.$inCtn.clearChild().addChild(_this.inBlock.elt);
          }
        } else if (_this.forBlock) {
          _this.inBlock = null;
          if (_this.$inCtn) {
            _this.$inCtn.clearChild().addChild(_this.addOfExpressionBlock.elt);
          }
        }
      },
      get: function get() {
        return _this.inBlock ? _this.inBlock.ast : null;
      }
    },
    body: {
      enumerable: true,
      set: function set(ast) {
        if (!ast) {
          ast = {
            type: 'BlockStatement',
            body: []
          };
        } else if (ast.type !== 'BlockStatement') {
          ast = {
            type: 'BlockStatement',
            body: [ast]
          };
        }
        _this.doBlocks = ast.body.map(function (sAst) {
          var clazz = _SBClassManager["default"].get(sAst);
          var block = new clazz();
          block.ast = sAst;
          return block;
        });
        if (_this.elt) {
          //call getter
          _this.$doCtn.clearChild().addChild(_this.doBlocks.map(function (blk) {
            return blk.elt;
          })).addChild(_this.addStatementBlock.elt);
        }
      },
      get: function get() {
        return {
          type: 'BlockStatement',
          body: _this.doBlocks.map(function (blk) {
            return blk.ast;
          })
        };
      }
    }
  });
};
SBForInStatement.prototype.render = function () {
  var _this2 = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-for-in-statement',
    child: [{
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: 'for key'
      }
    }, {
      "class": ['sb-block-sub-ctn', 'sb-for-in-statement-for-ctn'],
      child: this.forBlock ? this.forBlock.elt : this.addForIdentBlock.elt
    }, {
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: 'in'
      }
    }, {
      "class": ['sb-block-sub-ctn', 'sb-for-in-statement-in-ctn'],
      child: this.inBlock ? this.inBlock.elt : this.addOfExpressionBlock.elt
    }, {
      "class": ['sb-block-sub-ctn', 'sb-for-in-statement-body-ctn'],
      child: [this.addStatementBlock.elt]
    }]
  });
  this.$forCtn = (0, _FCore.$)('.sb-for-in-statement-for-ctn', this.$elt);
  this.$inCtn = (0, _FCore.$)('.sb-for-in-statement-in-ctn', this.$elt);
  this.$bodyCtn = (0, _FCore.$)('.sb-for-in-statement-body-ctn', this.$elt);
  this.$doCtn = this.$bodyCtn;
  _QuickMenu["default"].toggleWhenClick(this.$forCtn, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getLocalVariableSelection()
      };
    },
    onSelect: function onSelect(item) {
      var clazz;
      if (item.variable) {
        clazz = _SBClassManager["default"].get('Identifier');
        _this2.forBlock = new clazz();
        _this2.forBlock.ast = item.variable.id;
        _this2.$forCtn.clearChild().addChild(_this2.forBlock.elt);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.$inCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this2.addOfExpressionBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$inCtn);
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz;
        clazz = _SBClassManager["default"].get(ast);
        _this2.inBlock = new clazz();
        _this2.$inCtn.clearChild().addChild(_this2.inBlock.elt);
        _this2.inBlock.ast = ast;
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      };
      if (item.astType) {
        handleAst((0, _utils2.autoMigrateAst)(_this2.inBlock && _this2.inBlock.ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$inCtn, _this2.inBlock ? (0, _SCCodeGenerator.generateSCCode)(_this2.inBlock.ast) : '').then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.addStatementBlock.elt, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getStatementTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz = _SBClassManager["default"].get(ast);
        var block = new clazz();
        block.ast = ast;
        _this2.$doCtn.addChildBefore(block.elt, _this2.addStatementBlock.elt);
        _this2.doBlocks.push(block);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      };
      if (item.astType) {
        handleAst({
          type: item.astType
        });
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openStatementInputDialog)(_this2.addStatementBlock.elt, '').then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
};
SBForInStatement.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var forBound = this.$forCtn.getBoundingClientRect();
  var bodyBound = this.$bodyCtn.getBoundingClientRect();
  var ofBound = this.$inCtn.getBoundingClientRect();
  return new _SBTurtle["default"]().moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).lineTo(18, 0).statementKnop().hLineTo(bound.width - 1).vLineTo(bodyBound.top - bound.top).hLineTo(bodyBound.left - bound.left + 28).statementKnop().hLineTo(bodyBound.left - bound.left + 8).arcBy(8, 8, 0, 0, 0, -8, 8).vLineBy(bodyBound.height - 16).arcBy(8, 8, 0, 0, 0, 8, 8).hLineTo(bound.width).vLineTo(bound.height).hLineTo(28).statementKnop().hLineTo(8).arcBy(8, 8, 0, 0, 1, -8, -8).closePath().expBound(forBound.left - bound.left, forBound.top - bound.top, forBound.width, forBound.height).expBound(ofBound.left - bound.left, ofBound.top - bound.top, ofBound.width, ofBound.height).getPath();
};
Object.defineProperty(SBForInStatement.prototype, 'ast', {
  set: function set(ast) {
    this.ast["for"] = ast["for"];
    this.ast["in"] = ast["in"];
    this.ast.body = ast.body;
  },
  get: function get() {
    return this._ast;
  }
});
var _default = SBForInStatement;
exports["default"] = _default;
_SBClassManager["default"].add(SBForInStatement);

/***/ }),

/***/ 15045:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _SBBase = _interopRequireWildcard(__webpack_require__(31057));
var _FCore = __webpack_require__(51518);
var _SBAddReferent = _interopRequireDefault(__webpack_require__(33085));
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _SBAddStatement = _interopRequireDefault(__webpack_require__(5921));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBWhileStatement = _interopRequireDefault(__webpack_require__(29034));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _SCProgramInstance = __webpack_require__(47790);
var _utils = __webpack_require__(11997);
var _EventEmitter = __webpack_require__(46833);
var _SCCodeGenerator = __webpack_require__(31647);
var _utils2 = __webpack_require__(33192);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBForOfStatement() {
  _SBBase["default"].apply(this, arguments);
  this._ast = {
    type: this.astType
  };
  this.forBlock = null;
  this.ofBlock = null;
  this.doBlocks = [];
  this.addForIdentBlock = new _SBAddReferent["default"]();
  this.addOfExpressionBlock = new _SBAddExpression["default"]();
  this.addStatementBlock = new _SBAddStatement["default"]();
  this._astBinding();
}
_OOP["default"].mixClass(SBForOfStatement, _SBBase["default"]);
SBForOfStatement.prototype.astType = 'ForOfStatement';
SBForOfStatement.prototype.removeDoChild = _SBWhileStatement["default"].prototype.removeDoChild;
SBForOfStatement.prototype.canMoveChild = _SBWhileStatement["default"].prototype.canMoveChild;
SBForOfStatement.prototype.moveChild = _SBWhileStatement["default"].prototype.moveChild;
SBForOfStatement.prototype.removeChild = _SBWhileStatement["default"].prototype.removeChild;
SBForOfStatement.prototype.removeChild = function (child) {
  this.removeDoChild(child);
  if (child === this.forBlock) {
    this.forBlock = null;
    this.$forCtn.clearChild().addChild(this.addForIdentBlock.elt);
  } else if (child === this.ofBlock) {
    this.ofBlock = null;
    this.$ofCtn.clearChild().addChild(this.addOfExpressionBlock.elt);
  }
};
SBForOfStatement.prototype.getLocalVariableSelection = function () {
  var variables = this.getVariables();
  var res = [];
  Object.keys(variables).filter(function (name) {
    var va = variables[name];
    if (va.type === 'any' || va.type === 'number') {
      return true;
    }
    if (va.type && va.type.type === 'GenericType' && (va.type.id.name === 'number' || va.type.id.name === 'any')) return true;
    if (_SCProgramInstance.SCStaticLibScope.findScope(name) || _SCProgramInstance.SCDynamicLibScope.findScope(name)) return false;
    return true;
    // var desc = SCTypeManager.detectTypeDescriptorOf(va.type);
  }).forEach(function (key) {
    res.push({
      text: key,
      variable: variables[key]
    });
  });
  return res;
};
SBForOfStatement.prototype._astBinding = function () {
  var _this = this;
  Object.defineProperties(this._ast, {
    "for": {
      enumerable: true,
      set: function set(ast) {
        var clazz;
        if (ast) {
          clazz = _SBClassManager["default"].get(ast);
          _this.forBlock = new clazz();
          _this.forBlock.ast = ast;
          if (_this.$forCtn) {
            _this.$forCtn.clearChild().addChild(_this.forBlock.elt);
          }
        } else if (_this.forBlock) {
          _this.forBlock = null;
          if (_this.$forCtn) {
            _this.$forCtn.clearChild().addChild(_this.addForIdentBlock.elt);
          }
        }
      },
      get: function get() {
        return _this.forBlock ? _this.forBlock.ast : null;
      }
    },
    of: {
      enumerable: true,
      set: function set(ast) {
        var clazz;
        if (ast) {
          clazz = _SBClassManager["default"].get(ast);
          _this.ofBlock = new clazz();
          _this.ofBlock.ast = ast;
          if (_this.$ofCtn) {
            _this.$ofCtn.clearChild().addChild(_this.ofBlock.elt);
          }
        } else if (_this.forBlock) {
          _this.ofBlock = null;
          if (_this.$ofCtn) {
            _this.$ofCtn.clearChild().addChild(_this.addOfExpressionBlock.elt);
          }
        }
      },
      get: function get() {
        return _this.ofBlock ? _this.ofBlock.ast : null;
      }
    },
    body: {
      enumerable: true,
      set: function set(ast) {
        if (!ast) {
          ast = {
            type: 'BlockStatement',
            body: []
          };
        } else if (ast.type !== 'BlockStatement') {
          ast = {
            type: 'BlockStatement',
            body: [ast]
          };
        }
        _this.doBlocks = ast.body.map(function (sAst) {
          var clazz = _SBClassManager["default"].get(sAst);
          var block = new clazz();
          block.ast = sAst;
          return block;
        });
        if (_this.elt) {
          //call getter
          _this.$doCtn.clearChild().addChild(_this.doBlocks.map(function (blk) {
            return blk.elt;
          })).addChild(_this.addStatementBlock.elt);
        }
      },
      get: function get() {
        return {
          type: 'BlockStatement',
          body: _this.doBlocks.map(function (blk) {
            return blk.ast;
          })
        };
      }
    }
  });
};
SBForOfStatement.prototype.render = function () {
  var _this2 = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-for-of-statement',
    child: [{
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: 'for item'
      }
    }, {
      "class": ['sb-block-sub-ctn', 'sb-for-of-statement-for-ctn'],
      child: this.forBlock ? this.forBlock.elt : this.addForIdentBlock.elt
    }, {
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: 'of'
      }
    }, {
      "class": ['sb-block-sub-ctn', 'sb-for-of-statement-of-ctn'],
      child: this.ofBlock ? this.ofBlock.elt : this.addOfExpressionBlock.elt
    }, {
      "class": ['sb-block-sub-ctn', 'sb-for-of-statement-body-ctn'],
      child: [this.addStatementBlock.elt]
    }]
  });
  this.$forCtn = (0, _FCore.$)('.sb-for-of-statement-for-ctn', this.$elt);
  this.$ofCtn = (0, _FCore.$)('.sb-for-of-statement-of-ctn', this.$elt);
  this.$bodyCtn = (0, _FCore.$)('.sb-for-of-statement-body-ctn', this.$elt);
  this.$doCtn = this.$bodyCtn;
  _QuickMenu["default"].toggleWhenClick(this.$forCtn, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getLocalVariableSelection()
      };
    },
    onSelect: function onSelect(item) {
      var clazz;
      if (item.variable) {
        clazz = _SBClassManager["default"].get('Identifier');
        _this2.forBlock = new clazz();
        _this2.forBlock.ast = item.variable.id;
        _this2.$forCtn.clearChild().addChild(_this2.forBlock.elt);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.$ofCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this2.addOfExpressionBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$ofCtn);
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz;
        clazz = _SBClassManager["default"].get(ast);
        _this2.ofBlock = new clazz();
        _this2.$ofCtn.clearChild().addChild(_this2.ofBlock.elt);
        _this2.ofBlock.ast = ast;
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      };
      if (item.astType) {
        handleAst((0, _utils2.autoMigrateAst)(_this2.ofBlock && _this2.ofBlock.ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$ofCtn, _this2.ofBlock ? (0, _SCCodeGenerator.generateSCCode)(_this2.ofBlock.ast) : '').then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.addStatementBlock.elt, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getStatementTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz = _SBClassManager["default"].get(ast);
        var block = new clazz();
        block.ast = ast;
        _this2.$doCtn.addChildBefore(block.elt, _this2.addStatementBlock.elt);
        _this2.doBlocks.push(block);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      };
      if (item.astType) {
        handleAst({
          type: item.astType
        });
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openStatementInputDialog)(_this2.addStatementBlock.elt, '').then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
};
SBForOfStatement.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var forBound = this.$forCtn.getBoundingClientRect();
  var bodyBound = this.$bodyCtn.getBoundingClientRect();
  var ofBound = this.$ofCtn.getBoundingClientRect();
  return new _SBTurtle["default"]().moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).lineTo(18, 0).statementKnop().hLineTo(bound.width - 1).vLineTo(bodyBound.top - bound.top).hLineTo(bodyBound.left - bound.left + 28).statementKnop().hLineTo(bodyBound.left - bound.left + 8).arcBy(8, 8, 0, 0, 0, -8, 8).vLineBy(bodyBound.height - 16).arcBy(8, 8, 0, 0, 0, 8, 8).hLineTo(bound.width).vLineTo(bound.height).hLineTo(28).statementKnop().hLineTo(8).arcBy(8, 8, 0, 0, 1, -8, -8).closePath().expBound(forBound.left - bound.left, forBound.top - bound.top, forBound.width, forBound.height).expBound(ofBound.left - bound.left, ofBound.top - bound.top, ofBound.width, ofBound.height).getPath();
};
Object.defineProperty(SBForOfStatement.prototype, 'ast', {
  set: function set(ast) {
    this.ast["for"] = ast["for"];
    this.ast.of = ast.of;
    this.ast.body = ast.body;
  },
  get: function get() {
    return this._ast;
  }
});
var _default = SBForOfStatement;
exports["default"] = _default;
_SBClassManager["default"].add(SBForOfStatement);

/***/ }),

/***/ 28226:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBBase = _interopRequireWildcard(__webpack_require__(31057));
var _FCore = __webpack_require__(51518);
var _SBAddStatement = _interopRequireDefault(__webpack_require__(5921));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBArgumentDeclaration = _interopRequireDefault(__webpack_require__(74735));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _SBVariableDeclaration = _interopRequireDefault(__webpack_require__(96636));
var _SBAddArgumentDeclaration = _interopRequireDefault(__webpack_require__(70547));
var _SBAddVariableDeclaration = _interopRequireDefault(__webpack_require__(7072));
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _SBIdentifierInput = _interopRequireDefault(__webpack_require__(97631));
var _utils = __webpack_require__(11997);
var _SCProgramInstance = __webpack_require__(47790);
var _Array = __webpack_require__(40411);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends SBBase
 * @constructor
 */
function SBFunctionDeclaration() {
  var _this = this;
  _SBBase["default"].apply(this, arguments);
  this.addArgumentDeclarationBlock = new _SBAddArgumentDeclaration["default"]();
  this.argumentDeclarationBlocks = [];
  this.addVariableDeclarationBlock = new _SBAddVariableDeclaration["default"]();
  this.variableDeclarationBlocks = [];
  this.addStatementBlock = new _SBAddStatement["default"]();
  this.statementBlocks = [];

  // this.returnTypeBlock = null;
  this.returnExpressionBlock = null;
  this.addReturnExpression = new _SBAddExpression["default"]();
  this.$nameInput = (0, _FCore._)({
    tag: _SBIdentifierInput["default"],
    "class": 'sb-identifier-input'
  });
  this._functionType = 'procedure';
  this._returnStatementAst = {
    type: 'ReturnStatement'
  };
  this._ast = {
    type: 'FunctionDeclaration',
    id: {
      type: 'Identifier',
      name: 'NoName'
    },
    params: [],
    body: {
      type: 'BlockStatement',
      body: []
    }
  };
  Object.defineProperty(this._ast.body, 'body', {
    enumerable: true,
    get: function get() {
      var body = _this.variableDeclarationBlocks.concat(_this.statementBlocks).map(function (blk) {
        return blk.ast;
      });
      if (_this._functionType === 'function') {
        body.push(_this._returnStatementAst);
      }
      return body;
    },
    set: function set(body) {
      if (_this.$bodyCtn) {
        _this.variableDeclarationBlocks.forEach(function (blk) {
          return blk.elt.remove();
        });
        _this.statementBlocks.forEach(function (blk) {
          return blk.elt.remove();
        });
      }
      body = body || [];
      var variableDeclarations = body.filter(function (it) {
        return it.type === 'VariableDeclaration';
      }).reduce(function (ac, cr) {
        var declarators = cr.declarations;
        var newDecl;
        if (declarators) {
          if (declarators.length > 1) {
            for (var i = 0; i < declarators.length; ++i) {
              newDecl = Object.assign({}, cr);
              newDecl.declarations = [declarators[i]];
              ac.push(newDecl);
            }
          } else {
            ac.push(cr);
          }
        } else {
          ac.push({
            type: 'VariableDeclaration',
            declarations: [Object.assign({}, cr, {
              type: 'VariableDeclarator'
            })],
            kind: 'var'
          });
        }
        return ac;
      }, []);
      _this.variableDeclarationBlocks = variableDeclarations.map(function (it) {
        var newBlock = new _SBVariableDeclaration["default"]();
        if (_this.$bodyCtn) {
          _this.$bodyCtn.addChildBefore(newBlock.elt, _this.addVariableDeclarationBlock.elt);
        }
        newBlock.ast = it;
        return newBlock;
      });
      var statements = body.filter(function (it) {
        return it.type !== 'VariableDeclaration';
      });
      var returnStatement;
      if (statements.length > 0 && statements[statements.length - 1].type === 'ReturnStatement') {
        returnStatement = statements.pop();
      }
      _this.statementBlocks = statements.map(function (it) {
        var clazz = _SBClassManager["default"].get(it);
        var newBlock = new clazz();
        if (_this.$bodyCtn) {
          _this.$bodyCtn.addChildBefore(newBlock.elt, _this.addStatementBlock.elt);
        }
        newBlock.ast = it;
        return newBlock;
      });
      var returned = body.some(function checkReturn(it) {
        if (!it) return false;
        if (it instanceof Array) return it.some(checkReturn);
        if (_typeof(it) !== "object") return false;
        if (it.type === 'ReturnStatement') return !!it.argument;
        return Object.values(it).some(checkReturn);
      });
      if (returned) {
        _this.functionType = 'function';
        if (returnStatement) _this._returnStatementAst.argument = returnStatement.argument;
      } else {
        _this.functionType = 'procedure';
        _this._returnStatementAst.argument = null;
      }
    }
  });
  Object.defineProperty(this._ast.id, 'name', {
    enumerable: true,
    get: function get() {
      return _this.$nameInput.identifierText;
    },
    set: function set(name) {
      _this.$nameInput.value = name;
      _this.$nameInput.autoWidthBy();
    }
  });
  Object.defineProperty(this._ast, 'params', {
    get: function get() {
      return _this.argumentDeclarationBlocks.map(function (blk) {
        return blk.ast;
      });
    },
    set: function set(params) {
      if (_this.$paramCtn) {
        _this.argumentDeclarationBlocks.forEach(function (blk) {
          return blk.elt.remove();
        });
      }
      _this.argumentDeclarationBlocks = (params || []).map(function (it) {
        var newBlock = new _SBArgumentDeclaration["default"]();
        if (_this.$paramCtn) _this.$paramCtn.addChildBefore(newBlock.elt, _this.addArgumentDeclarationBlock.elt);
        newBlock.ast = it;
        return newBlock;
      });
    }
  });
  Object.defineProperty(this._returnStatementAst, 'argument', {
    set: function set(ast) {
      var clazz;
      if (ast) {
        clazz = _SBClassManager["default"].get(ast);
        _this.returnExpressionBlock = new clazz();
        _this.returnExpressionBlock.ast = ast;
        _this.$returnCtn.clearChild().addChild(_this.returnExpressionBlock.elt);
      } else {
        _this.$returnCtn.clearChild().addChild(_this.addReturnExpression.elt);
      }
    },
    get: function get() {
      return _this.returnExpressionBlock && _this.returnExpressionBlock.ast || null;
    },
    enumerable: true
  });
}
_OOP["default"].mixClass(SBFunctionDeclaration, _SBBase["default"]);
SBFunctionDeclaration.prototype.astType = 'FunctionDeclaration';
SBFunctionDeclaration.prototype.render = function () {
  var _this2 = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-function',
    attr: {
      'data-function-type': this._functionType
    },
    child: [{
      "class": 'sb-function-head',
      child: [{
        "class": 'sb-function-head-left',
        child: [{
          tag: 'button',
          "class": 'sb-function-option-btn',
          child: 'span.mdi.mdi-cog'
        }, {
          tag: 'span',
          "class": ['sb-inline-text', 'sb-function-type']
        }, this.$nameInput, {
          tag: 'span',
          "class": 'sb-inline-text',
          child: {
            text: 'with: '
          }
        }]
      }, {
        "class": ['sb-block-sub-ctn', 'sb-function-argument-ctn'],
        child: [this.addArgumentDeclarationBlock.elt]
      }]
    }, {
      "class": ['sb-block-sub-ctn', 'sb-function-statement-body-ctn'],
      child: [this.addVariableDeclarationBlock.elt, this.addStatementBlock.elt]
    }, {
      "class": ['sb-function-statement-return-row'],
      child: [{
        tag: 'span',
        "class": 'sb-inline-text',
        child: {
          text: 'return'
        }
      }, {
        "class": 'sb-block-sub-ctn',
        child: (this.returnExpressionBlock || this.addReturnExpression).elt
      }]
    }]
  });
  this.$bodyCtn = (0, _FCore.$)('.sb-function-statement-body-ctn', this.$elt);
  this.$paramCtn = (0, _FCore.$)('.sb-function-argument-ctn', this.$elt);
  this.addArgumentDeclarationBlock.elt.on('click', function () {
    var block = _this2.addArgumentDeclaration();
    _this2.editor.selectTool.selectBlock(block);
  });
  this.addVariableDeclarationBlock.elt.on('click', function () {
    var block = _this2.addVariableDeclaration();
    _this2.notifySizeChange();
    _this2.notifyASTChange();
    _this2.editor.selectTool.selectBlock(block);
  });
  this.$optionBtn = (0, _FCore.$)('.sb-function-option-btn', this.$elt);
  this.$returnCtn = (0, _FCore.$)('.sb-function-statement-return-row > .sb-block-sub-ctn', this.$elt);
  _QuickMenu["default"].toggleWhenClick(this.addStatementBlock.elt, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getStatementTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var block;
        if (ast.type === 'VariableDeclaration') {
          block = _this2.addVariableDeclaration(ast);
        } else {
          block = _this2.addStatement(ast);
        }
        _this2.editor.selectTool.selectBlock(block);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      };
      if (item.astType) {
        handleAst({
          type: item.astType
        });
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openStatementInputDialog)(_this2.addStatementBlock.elt, '', function (ast) {
          return ast.type !== 'BreakStatement';
        }).then(function (ast) {
          if (ast) {
            handleAst(ast);
          }
        });
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.$optionBtn, {
    getMenuProps: function getMenuProps() {
      return {
        items: [{
          text: 'procedure',
          value: 'procedure'
        }, {
          text: 'function',
          value: 'function'
        }]
      };
    },
    onSelect: function onSelect(item) {
      _this2.functionType = item.value;
      _this2.notifySizeChange();
      _this2.notifyASTChange();
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.$returnCtn, {
    onClick: function onClick(event) {
      var ok = false;
      ok = ok || !_this2.returnExpressionBlock;
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$returnCtn);
      if (_this2.returnExpressionBlock && _this2.returnExpressionBlock.astType === 'Identifier') ok = true;
      if (!ok) event.cancel();
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz;
        clazz = _SBClassManager["default"].get(ast);
        _this2.returnExpressionBlock = new clazz();
        _this2.returnExpressionBlock.ast = ast;
        _this2.$returnCtn.clearChild().addChild(_this2.returnExpressionBlock.elt);
        _this2.notifyASTChange();
        _this2.notifySizeChange();
      };
      if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.astType) {
        handleAst({
          type: item.astType
        });
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$returnCtn).then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
  this.$nameInput.on('change', function () {
    _this2.notifySizeChange();
    _this2.notifyASTChange();
  });
};
SBFunctionDeclaration.prototype.removeChild = function (child) {
  var idx = this.statementBlocks.indexOf(child);
  if (idx >= 0) {
    child.elt.remove();
    this.statementBlocks.splice(idx, 1);
    return;
  }
  idx = this.variableDeclarationBlocks.indexOf(child);
  if (idx >= 0) {
    child.elt.remove();
    this.variableDeclarationBlocks.splice(idx, 1);
    return;
  }
  idx = this.argumentDeclarationBlocks.indexOf(child);
  if (idx >= 0) {
    child.elt.remove();
    this.argumentDeclarationBlocks.splice(idx, 1);
    return;
  }
  if (this.returnExpressionBlock === child) {
    child.elt.selfReplace(this.addReturnExpression.elt);
    this.returnExpressionBlock = null;

    // return;
  }
};

SBFunctionDeclaration.prototype.canAddChildBefore = function (child, bf) {
  var astType = child.astType || child.type;
  if (astType === 'BreakStatement') return false;
  if (astType === 'VariableDeclaration') {
    return !bf || bf.astType !== 'ArgumentDeclaration';
  } else if (astType === 'ArgumentDeclaration') {
    if (!bf || bf.astType === 'ArgumentDeclaration') return true;
  } else if (astType.endsWith('Statement')) {
    if (!bf) return true;
    if (bf.astType.endsWith('Statement')) return true;
  }
  return false;
};
SBFunctionDeclaration.prototype.addChildBefore = function (child, bf) {
  var ast = child.astType ? child.ast : child;
  var idx;
  if (ast.type === 'VariableDeclaration') {
    idx = this.variableDeclarationBlocks.indexOf(bf);
    if (idx < 0) {
      this.variableDeclarationBlocks.push(child);
      this.$bodyCtn.addChildBefore(child.elt, this.addVariableDeclarationBlock.elt);
    } else {
      this.variableDeclarationBlocks.splice(idx, 0, child);
      this.$bodyCtn.addChildBefore(child.elt, bf.elt);
    }
  } else if (ast.type === 'ArgumentDeclaration') {
    if (!bf || bf.astType !== 'ArgumentDeclaration') {
      this.argumentDeclarationBlocks.push(child);
      this.$paramCtn.addChildBefore(child.elt, this.addArgumentDeclarationBlock.elt);
    } else {
      idx = this.argumentDeclarationBlocks.indexOf(bf);
      if (idx >= 0) {
        this.argumentDeclarationBlocks.splice(idx, 0, child);
        this.$paramCtn.addChildBefore(child.elt, bf.elt);
      } else {
        throw {
          before: bf,
          message: 'Can not add child',
          child: child
        };
      }
    }
  } else if (ast.type.endsWith('Statement')) {
    if (!bf) {
      this.statementBlocks.push(child);
      this.$bodyCtn.addChildBefore(child.elt, this.addStatementBlock.elt);
    } else {
      idx = this.statementBlocks.indexOf(bf);
      if (idx >= 0) {
        this.statementBlocks.splice(idx, 0, child);
        this.$bodyCtn.addChildBefore(child.elt, bf.elt);
      } else {
        throw {
          before: bf,
          message: 'Can not add child',
          child: child
        };
      }
    }
  }
};
SBFunctionDeclaration.prototype.canAddChildAfter = function (child, at) {
  var astType = child.astType || child.type;
  if (astType === 'BreakStatement') return false;
  if (astType.endsWith('Statement')) {
    return true;
  } else if (astType.endsWith('ArgumentDeclaration')) {
    if (!at || at.astType === 'ArgumentDeclaration') return true;
  } else if (astType === 'VariableDeclaration') {
    if (!at || !at.astType.endsWith('Statement')) return true;
  }
  return false;
};
SBFunctionDeclaration.prototype.addChildAfter = function (child, at) {
  var ast = child.astType ? child.ast : child;
  var idx;
  if (ast.type === 'VariableDeclaration') {
    if (!at || at.parent === this && at.astType === 'ArgumentDeclaration') {
      this.variableDeclarationBlocks.unshift(child);
      this.$bodyCtn.addChildBefore(child.elt, this.$bodyCtn.firstChild);
    } else {
      idx = this.variableDeclarationBlocks.indexOf(at);
      if (idx >= 0) {
        this.variableDeclarationBlocks.splice(idx + 1, 0, child);
        this.$bodyCtn.addChildAfter(child.elt, at.elt);
      } else {
        throw {
          after: at,
          message: 'Can not add child',
          child: child
        };
      }
    }
  } else if (ast.type === 'ArgumentDeclaration') {
    if (!at) {
      this.argumentDeclarationBlocks.unshift(child);
      this.$paramCtn.addChildBefore(child.elt, this.$paramCtn.firstChild);
    } else {
      idx = this.argumentDeclarationBlocks.indexOf(at);
      if (idx >= 0) {
        this.argumentDeclarationBlocks.splice(idx + 1, 0, child);
        this.$paramCtn.addChildAfter(child.elt, at.elt);
      } else {
        throw {
          after: at,
          message: 'Can not add child',
          child: child
        };
      }
    }
  } else if (ast.type.endsWith('Statement')) {
    if (!at) {
      this.statementBlocks.unshift(child);
      this.$bodyCtn.addChildAfter(child.elt, this.addVariableDeclarationBlock.elt);
    } else {
      idx = this.statementBlocks.indexOf(at);
      if (idx >= 0) {
        this.statementBlocks.splice(idx + 1, 0, child);
        this.$bodyCtn.addChildAfter(child.elt, at.elt);
      } else if (at.parent === this) {
        this.statementBlocks.unshift(child);
        this.$bodyCtn.addChildAfter(child.elt, this.addVariableDeclarationBlock.elt);
      } else {
        throw {
          after: at,
          message: 'Can not add child',
          child: child
        };
      }
    }
  }
};
SBFunctionDeclaration.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var bodyBound = this.$bodyCtn.getBoundingClientRect();
  var paramBound = this.$paramCtn.getBoundingClientRect();
  var returnBound = this.$returnCtn.getBoundingClientRect();
  var turtle = new _SBTurtle["default"]().moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).lineTo(18, 0).statementKnop().hLineTo(paramBound.right - bound.left).vLineTo(paramBound.top - bound.top).hLineBy(-paramBound.width + 28).statementKnop().hLineTo(paramBound.left - bound.left + 8).arcBy(8, 8, 0, 0, 0, -8, 8).vLineBy(paramBound.height - 16).arcBy(8, 8, 0, 0, 0, 8, 8).hLineTo(paramBound.right - bound.left).vLineTo(bodyBound.top - bound.top).hLineTo(bodyBound.left - bound.left + 28).statementKnop().hLineTo(bodyBound.left - bound.left + 8).arcBy(8, 8, 0, 0, 0, -8, 8).vLineBy(bodyBound.height - 16).arcBy(8, 8, 0, 0, 0, 8, 8);
  if (this.$elt.attr('data-function-type') === "function") {
    turtle.hLineTo(returnBound.left - bound.left).vLineBy(8).expKnop();
  } else {
    turtle.hLineTo(bound.width);
  }
  turtle.vLineTo(bound.height).hLineTo(8).arcBy(8, 8, 0, 0, 1, -8, -8).closePath();
  return turtle.getPath();
};
SBFunctionDeclaration.prototype.getVariables = function (ac) {
  if (!ac) {
    ac = {};
    Object.defineProperty(ac, '__length__', {
      writable: true,
      enumerable: false,
      value: 0
    });
  }
  var libKeys = (0, _Array.arrayUnique)(Object.keys(_SCProgramInstance.SCStaticLibScope.data).concat(Object.keys(_SCProgramInstance.SCDynamicLibScope.data)));
  var typeMng = this.editor.typeMng;
  libKeys.reduce(function (ac, cr) {
    var desc = typeMng.detectTypeDescriptorOf(cr) || {
      type: 'any'
    };
    if (desc.type !== 'object' && desc.type !== 'class') return ac;
    var id = {
      type: 'Identifier',
      name: cr
    };
    ac[cr] = {
      id: id,
      order: ac.__length__++,
      type: desc,
      isLib: true
    };
    return ac;
  }, ac);
  this._ast.params.reduce(function (ac, cr) {
    var id = cr.id;
    if (id.name.trim().length > 0) ac[id.name] = {
      id: id,
      type: (0, _utils.type2text)(cr.typeAnnotation.typeAnnotation),
      //cr.typeAnnotation.typeAnnotation,
      order: ac.__length__++
    };
    return ac;
  }, ac);
  this._ast.body.body.reduce(function (ac, cr) {
    if (cr.type !== 'VariableDeclaration') return ac;
    if (cr.declarations) cr = cr.declarations[0]; //adapt old
    var id = cr.id;
    if (!id) return ac;
    if (id.name.trim().length > 0) ac[id.name] = {
      id: id,
      type: (0, _utils.type2text)(cr.typeAnnotation.typeAnnotation),
      order: ac.__length__++
    };
    return ac;
  }, ac);
  return ac;
};
Object.defineProperty(SBFunctionDeclaration.prototype, 'ast', {
  set: function set(ast) {
    this._ast.id.name = ast.id.name;
    this._ast.params = ast.params;
    this._ast.body.body = ast.body.body;
  },
  get: function get() {
    return this._ast;
  }
});
Object.defineProperty(SBFunctionDeclaration.prototype, 'functionType', {
  set: function set(value) {
    if (value !== 'function') {
      value = 'procedure';
    }
    this._functionType = value;
    if (this.$elt) this.$elt.attr('data-function-type', value);
  },
  get: function get() {
    return this._functionType;
  }
});
SBFunctionDeclaration.prototype.addArgumentDeclaration = function () {
  var newBlock = new _SBArgumentDeclaration["default"]();
  this.argumentDeclarationBlocks.push(newBlock);
  this.$paramCtn.addChildBefore(newBlock.elt, this.addArgumentDeclarationBlock.elt);
  this.notifySizeChange();
  (0, _FCore.$)('input', newBlock.elt, function (elt) {
    elt.focus();
    return true;
  });
  this.notifyASTChange();
  return newBlock;
};
SBFunctionDeclaration.prototype.addVariableDeclaration = function (ast) {
  var newBlock = new _SBVariableDeclaration["default"]();
  this.variableDeclarationBlocks.push(newBlock);
  if (ast && ast.type === 'VariableDeclaration') {
    newBlock.ast = ast;
  }
  this.$bodyCtn.addChildBefore(newBlock.elt, this.addVariableDeclarationBlock.elt);
  return newBlock;
};
SBFunctionDeclaration.prototype.addStatement = function (o) {
  var clazz = _SBClassManager["default"].get(o);
  if (!clazz) return;
  var newBlock = new clazz();
  this.statementBlocks.push(newBlock);
  this.$bodyCtn.addChildBefore(newBlock.elt, this.addStatementBlock.elt);
  if (o && o.type) newBlock.ast = o;
  return newBlock;
};
SBFunctionDeclaration.prototype.canMoveChild = function (child, direction) {
  var arr, idx;
  idx = this.argumentDeclarationBlocks.indexOf(child);
  if (idx >= 0) {
    arr = this.argumentDeclarationBlocks;
  } else {
    idx = this.variableDeclarationBlocks.indexOf(child);
    if (idx >= 0) {
      arr = this.variableDeclarationBlocks;
    } else {
      idx = this.statementBlocks.indexOf(child);
      if (idx >= 0) arr = this.statementBlocks;
    }
  }
  if (idx < 0) return false;
  if (direction === "up") {
    return idx > 0;
  } else if (direction === 'down') {
    return idx < arr.length - 1;
  }
  return false;
};
SBFunctionDeclaration.prototype.moveChild = function (child, direction) {
  var arr, idx, ctn;
  idx = this.argumentDeclarationBlocks.indexOf(child);
  if (idx >= 0) {
    arr = this.argumentDeclarationBlocks;
    ctn = this.$paramCtn;
  } else {
    idx = this.variableDeclarationBlocks.indexOf(child);
    if (idx >= 0) {
      arr = this.variableDeclarationBlocks;
      ctn = this.$bodyCtn;
    } else {
      idx = this.statementBlocks.indexOf(child);
      if (idx >= 0) {
        arr = this.statementBlocks;
        ctn = this.$bodyCtn;
      }
    }
  }
  if (idx < 0) return;
  var at, bf;
  if (direction === "up" && idx > 0) {
    bf = arr[idx - 1];
    arr.splice(idx, 1);
    arr.splice(idx - 1, 0, child);
    child.elt.selfRemove();
    ctn.addChildBefore(child.elt, bf.elt);
  } else if (direction === 'down' && idx < idx < arr.length - 1) {
    at = arr[idx + 1];
    arr.splice(idx, 1);
    arr.splice(idx + 1, 0, child);
    child.elt.selfRemove();
    ctn.addChildAfter(child.elt, at.elt);
  }
};
_SBClassManager["default"].add(SBFunctionDeclaration);
var _default = SBFunctionDeclaration;
exports["default"] = _default;

/***/ }),

/***/ 39425:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _SBTokenSelection = _interopRequireDefault(__webpack_require__(33360));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBIdentifier() {
  _SBBase["default"].apply(this, arguments);
  this._ast = {
    type: 'Identifier',
    name: ''
  };
}
_OOP["default"].mixClass(SBIdentifier, _SBBase["default"]);
SBIdentifier.prototype.astType = 'Identifier';
SBIdentifier.prototype.render = function () {
  var _this = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": ['sb-identifier'],
    child: [{
      tag: _SBTokenSelection["default"],
      "class": 'sb-identifier-name',
      props: {
        text: this._ast.name
      }
    }]
  });
  this.$name = (0, _FCore.$)('.sb-identifier-name', this.elt);
  if (false) {}
};
SBIdentifier.prototype.getBoundingPath = function () {
  var bound = this.bound;
  return new _SBTurtle["default"]().moveTo(0, 0).hLineTo(bound.width - 1).vLineTo(bound.height - 1).hLineTo(0).vLineTo(17).expKnop().closePath().getPath();
};
SBIdentifier.prototype.getExpectedType = function () {
  var variables = this.getVariables() || {};
  var name = this.ast.name;
  if (variables[name]) return variables[name].type;
  return null;
};
Object.defineProperty(SBIdentifier.prototype, 'ast', {
  set: function set(ast) {
    if (this.$name) this.$name.text = (ast.name || '') + '';
    this._ast.name = (ast.name || '') + '';
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBIdentifier);
var _default = SBIdentifier;
exports["default"] = _default;

/***/ }),

/***/ 12663:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBBase = _interopRequireWildcard(__webpack_require__(31057));
var _SBStatement = _interopRequireDefault(__webpack_require__(23917));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _SBAddStatement = _interopRequireDefault(__webpack_require__(5921));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _EventEmitter = __webpack_require__(46833);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _utils = __webpack_require__(11997);
var _Snackbar = _interopRequireDefault(__webpack_require__(96206));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBStatement
 * @constructor
 */
function SBIfChainStatement() {
  _SBStatement["default"].apply(this, arguments);
  this._ast = {
    type: 'IfStatement',
    test: null,
    consequent: null,
    alternate: null
  };
  this._astByLevel = [];
  this.addTestBlocks = [new _SBAddExpression["default"]()];
  this.addDoStatementBlocks = [];
  this.testBlocks = [null];
  this.doBlocks = [];
  this.elseBlock = null;
  this.addElseStatementBlock = null;
  this._astBinding(this._ast, 0);
  this.render();
}
_OOP["default"].mixClass(SBIfChainStatement, _SBStatement["default"]);
SBIfChainStatement.prototype.astType = 'IfStatement';
SBIfChainStatement.prototype._astBinding = function (ast, i) {
  var _this = this;
  while (this._astByLevel.length > i) {
    this._astByLevel.pop();
  }
  while (this._astByLevel.length < i) {
    this._astByLevel.push(null);
  }
  this._astByLevel.push(ast);
  Object.defineProperty(ast, 'test', {
    get: function get() {
      return _this.testBlocks[i] && _this.testBlocks[i].ast || null;
    },
    set: function set(ast) {
      _this._renderDepth(i + 1, !!_this.elseBlock);
      var clazz;
      if (ast) {
        clazz = _SBClassManager["default"].get(ast);
        _this.testBlocks[i] = new clazz();
        _this.testBlocks[i].ast = ast;
        _this.$testes[i].$subCtn.clearChild().addChild(_this.testBlocks[i].elt);
      } else {
        _this.testBlocks[i] = null;
        _this.$testes[i].$subCtn.clearChild().addChild(_this.addTestBlocks[i].elt);
      }
    },
    enumerable: true
  });
  Object.defineProperty(ast, 'consequent', {
    set: function set(ast) {
      _this._renderDepth(i + 1, !!_this.elseBlock);
      var statements = [];
      if (ast) {
        if (ast.type === 'BlockStatement') {
          statements = ast.body || [];
        } else {
          statements = [ast];
        }
      }
      _this.doBlocks[i] = statements.map(function (subAst) {
        var clazz = _SBClassManager["default"].get(subAst);
        var block = new clazz();
        block.ast = subAst;
        return block;
      });
      var statementElements = _this.doBlocks[i].map(function (blk) {
        return blk.elt;
      });
      statementElements.push(_this.addDoStatementBlocks[i].elt);
      _this.$does[i].$subCtn.clearChild(statementElements).addChild(statementElements);
    },
    get: function get() {
      return {
        type: 'BlockStatement',
        body: _this.doBlocks[i].map(function (blk) {
          return blk.ast;
        })
      };
    },
    enumerable: true
  });
  var elseIfAst = null;
  Object.defineProperty(ast, 'alternate', {
    set: function set(ast) {
      if (!ast) {
        elseIfAst = null;
        _this._renderDepth(i + 1, false);
        while (_this._astByLevel.length > i + 1) {
          _this._astByLevel.pop();
        }
        return;
      }
      if (ast.type === 'IfStatement') {
        elseIfAst = {
          type: 'IfStatement'
        };
        _this._astBinding(elseIfAst, i + 1);
        elseIfAst.test = ast.test;
        elseIfAst.consequent = ast.consequent;
        elseIfAst.alternate = ast.alternate;
      } else {
        if (ast.type !== 'BlockStatement') {
          ast = {
            type: 'BlockStatement',
            body: [ast]
          };
        }
        _this._renderDepth(i + 1, true);
        while (_this._astByLevel.length > i + 1) {
          _this._astByLevel.pop();
        }
        _this.elseBlock = ast.body.map(function (subAst) {
          var clazz = _SBClassManager["default"].get(subAst);
          var block = new clazz();
          block.ast = subAst;
          return block;
        });
        var statementElements = _this.elseBlock.map(function (blk) {
          return blk.elt;
        });
        _this.$else.$subCtn.clearChild().addChild(statementElements).addChild(_this.addElseStatementBlock.elt);
      }
    },
    get: function get() {
      if (elseIfAst) return elseIfAst;
      if (_this.elseBlock) {
        return {
          type: 'BlockStatement',
          body: _this.elseBlock.map(function (blk) {
            return blk.ast;
          })
        };
      }
      return null;
    },
    enumerable: true
  });
};
SBIfChainStatement.prototype._renderDepth = function (n, hasElse) {
  var _this2 = this;
  while (this.addDoStatementBlocks.length < n) {
    this.addDoStatementBlocks.push(this._makeAddDoStatementBlock(this.addDoStatementBlocks.length));
  }
  while (this.addTestBlocks.length < n) {
    this.addTestBlocks.push(new _SBAddExpression["default"]());
  }
  while (this.testBlocks.length < n) {
    this.testBlocks.push(null);
  }
  while (this.testBlocks.length > n) {
    this.testBlocks.pop();
  }
  while (this.doBlocks.length < n) {
    this.doBlocks.push([]);
  }
  while (this.doBlocks.length > n) {
    this.doBlocks.pop();
  }
  if (this.$else) this.$else.remove();
  var rowElt;
  while (this.$testes.length > n) {
    rowElt = this.$testes.pop();
    rowElt.remove();
    rowElt = this.$does.pop();
    rowElt.remove();
  }
  var i;
  while (this.$testes.length < n) {
    i = this.$testes.length;
    rowElt = this._makeTestExpressionRow(i);
    this.$testes.push(rowElt);
    this.$elt.addChild(rowElt);
    rowElt = (0, _FCore._)({
      "class": 'sb-if-statement-do',
      child: [{
        tag: 'span',
        "class": 'sb-inline-text',
        child: {
          text: 'then'
        }
      }, {
        "class": ['sb-block-sub-ctn'],
        child: [this.addDoStatementBlocks[i].elt]
      }]
    });
    rowElt.$subCtn = (0, _FCore.$)('.sb-block-sub-ctn', rowElt);
    this.$does.push(rowElt);
    this.$elt.addChild(rowElt);
  }
  if (hasElse) {
    if (!this.$else) {
      this.addElseStatementBlock = new _SBAddStatement["default"]();
      this.$else = (0, _FCore._)({
        "class": 'sb-if-statement-else',
        child: [{
          tag: 'span',
          "class": 'sb-inline-text',
          child: {
            text: 'else'
          }
        }, {
          "class": ['sb-block-sub-ctn'],
          child: [this.addElseStatementBlock.elt]
        }]
      });
      this.$else.$subCtn = (0, _FCore.$)('.sb-block-sub-ctn', this.$else);
      _QuickMenu["default"].toggleWhenClick(this.addElseStatementBlock.elt, {
        getMenuProps: function getMenuProps() {
          return {
            items: _this2.getStatementTypeSelection()
          };
        },
        onSelect: function onSelect(item) {
          var handleAst = function handleAst(ast) {
            clazz = _SBClassManager["default"].get(ast);
            block = new clazz();
            block.ast = ast;
            _this2.$else.$subCtn.addChildBefore(block.elt, _this2.addElseStatementBlock.elt);
            _this2.elseBlock.push(block);
            _this2.notifySizeChange();
            _this2.notifyASTChange();
          };
          var clazz, block;
          if (item.astType) {
            handleAst({
              type: item.astType
            });
          } else if (item.cmd === 'parse_text') {
            (0, _utils.openStatementInputDialog)(_this2.addElseStatementBlock.elt, '', function (ast) {
              return ast.type !== 'BreakStatement' || _this2.inLoop;
            }).then(function (ast) {
              if (ast) handleAst(ast);
            });
          }
        }
      });
    }
    this.$else.$subCtn.clearChild().addChild(this.addElseStatementBlock.elt);
    this.elseBlock = [];
    this.$elt.addChild(this.$else);
  } else {
    if (this.$else) this.$else.remove();
    this.elseBlock = null;
  }
};
SBIfChainStatement.prototype.render = function () {
  var _this3 = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": ['sb-if-statement'],
    child: [{
      tag: 'button',
      "class": 'sb-if-statement-option-btn',
      child: 'span.mdi.mdi-cog'
    }]
  });
  this.$else = null;
  this.$testes = [];
  this.$does = [];
  this._renderDepth(1, false);
  this.$optionBtn = (0, _FCore.$)('.sb-if-statement-option-btn', this.$elt);
  _QuickMenu["default"].toggleWhenClick(this.$optionBtn, {
    getMenuProps: function getMenuProps() {
      var items = [{
        text: '+ Add else if',
        cmd: 'else_if'
      }];
      if (!_this3.elseBlock) {
        items.push({
          text: '+ Add else',
          cmd: 'else'
        });
      } else {
        items.push({
          text: '- Remove else',
          cmd: 'remove_else'
        });
      }
      if (_this3._astByLevel.length > 1) {
        items.push({
          text: '- Remove else if',
          cmd: 'remove_else_if'
        });
      }
      return {
        items: items
      };
    },
    onSelect: function onSelect(item) {
      var n = _this3._astByLevel.length;
      switch (item.cmd) {
        case 'else_if':
          _this3._astByLevel[n - 1].alternate = {
            type: 'IfStatement',
            consequent: null,
            alternate: null
          };
          break;
        case 'else':
          _this3._astByLevel[n - 1].alternate = {
            type: 'BlockStatement',
            body: []
          };
          break;
        case 'remove_else':
          _this3._astByLevel[n - 1].alternate = null;
          break;
        case 'remove_else_if':
          _this3._astByLevel[n - 2].alternate = JSON.parse(JSON.stringify(_this3._astByLevel[n - 1].alternate)) || null;
          break;
      }
      _this3.notifySizeChange();
      _this3.notifyASTChange();
    }
  });
};
SBIfChainStatement.prototype._makeTestExpressionRow = function (i) {
  var _this4 = this;
  var testBlock = this.addTestBlocks[i];
  var elt = (0, _FCore._)({
    "class": i === 0 ? 'sb-if-statement-if' : 'sb-if-statement-else-if',
    child: [{
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: i === 0 ? 'if' : 'else if'
      }
    }, {
      "class": ['sb-block-sub-ctn', 'sb-if-statement-test-ctn'],
      child: testBlock.elt
    }]
  });
  var subCtn = (0, _FCore.$)('.sb-if-statement-test-ctn', elt);
  elt.$subCtn = subCtn;
  _QuickMenu["default"].toggleWhenClick(subCtn, {
    onClick: function onClick(event) {
      if (!(0, _EventEmitter.hitElement)(testBlock.elt, event) && _this4.testBlocks[i].astType !== 'Identifier' && !(0, _SBBase.isBoundOfChild)(event.target, subCtn)) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this4.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz;
        clazz = _SBClassManager["default"].get(ast);
        _this4.testBlocks[i] = new clazz();
        _this4.testBlocks[i].ast = ast;
        subCtn.clearChild().addChild(_this4.testBlocks[i].elt);
        _this4.notifyASTChange();
        _this4.notifySizeChange();
      };
      var clazz;
      if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.astType) {
        handleAst(Object.assign({
          type: item.astType
        }));
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(subCtn, '').then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
  return elt;
};
SBIfChainStatement.prototype._makeAddDoStatementBlock = function (i) {
  var _this5 = this;
  var block = new _SBAddStatement["default"]();
  _QuickMenu["default"].toggleWhenClick(block.elt, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this5.getStatementTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var subCtn = _this5.$does[i].$subCtn;
        var clazz = _SBClassManager["default"].get(ast);
        var block = new clazz();
        block.ast = ast;
        var blocks = _this5.doBlocks[i];
        if (blocks.length > 0) {
          subCtn.addChildAfter(block.elt, blocks[blocks.length - 1].elt);
        } else {
          subCtn.addChildBefore(block.elt, subCtn.firstChild);
        }
        _this5.doBlocks[i].push(block);
        _this5.notifySizeChange();
        _this5.notifyASTChange();
      };
      if (item.astType) {
        handleAst({
          type: item.astType
        });
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openStatementInputDialog)(block.elt, '', function (ast) {
          return ast.type !== 'BreakStatement' || _this5.inLoop;
        }).then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
  return block;
};
SBIfChainStatement.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var turtle = new _SBTurtle["default"]();
  var children = Array.prototype.slice.call(this.$elt.childNodes, 2);
  turtle.moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).lineTo(18, 0).statementKnop();
  var expLeft;
  children.forEach(function (child) {
    child.$subCtn = child.$subCtn || (0, _FCore.$)('.sb-block-sub-ctn', child);
    var cBound = child.$subCtn.getBoundingClientRect();
    if (child.hasClass('sb-if-statement-if') || child.hasClass('sb-if-statement-else-if')) {
      expLeft = cBound.left - bound.left;
      turtle.hLineTo(cBound.left - bound.left).vLineBy(8).expKnop().vLineTo(cBound.bottom - bound.top);
    } else {
      if (child.hasClass('sb-if-statement-else')) {
        turtle.hLineTo(expLeft).vLineTo(cBound.top - bound.top);
      }
      turtle.hLineTo(cBound.left - bound.left + 28).statementKnop().hLineTo(cBound.left - bound.left + 8).arcBy(8, 8, 0, 0, 0, -8, 8).vLineTo(cBound.bottom - bound.top - 8).arcBy(8, 8, 0, 0, 0, 8, 8);
    }
  });
  turtle.hLineTo(expLeft);
  turtle.vLineTo(bound.height - 1).hLineTo(28).statementKnop().hLineTo(8).arcBy(8, 8, 0, 0, 1, -8, -8).closePath();
  return turtle.getPath();
};
SBIfChainStatement.prototype.removeChild = function (child) {
  var _this6 = this;
  var found = false;
  found = found || this.testBlocks.slice().some(function (blk, i) {
    if (blk !== child) return false;
    _this6.testBlocks[i].elt.selfReplace(_this6.addTestBlocks[i].elt);
    _this6.testBlocks[i] = null;
    return true;
  });
  found = found || this.doBlocks.some(function (blocks) {
    var idx = blocks.indexOf(child);
    if (idx < 0) return false;
    child.elt.remove();
    blocks.splice(idx, 1);
    return true;
  });
  var idx;
  if (!found && this.elseBlock) {
    idx = this.elseBlock.indexOf(child);
    if (idx >= 0) {
      child.elt.remove();
      this.elseBlock.splice(idx, 1);
    }
  }
};
SBIfChainStatement.prototype.canMoveChild = function (child, direction) {
  var idx;
  var arr = this.doBlocks.find(function (blocks) {
    var idx = blocks.indexOf(child);
    return idx >= 0;
  });
  if (!arr) return false;
  idx = arr.indexOf(child);
  if (direction === "up") return idx > 0;
  if (direction === "down") return idx + 1 < arr.length;
};
SBIfChainStatement.prototype.moveChild = function (child, direction) {
  var idx;
  var arr = this.doBlocks.find(function (blocks) {
    var idx = blocks.indexOf(child);
    return idx >= 0;
  });
  if (!arr) return;
  idx = arr.indexOf(child);
  var ctn = child.elt.parentElement;
  var at;
  if (direction === 'up' && idx > 0) {
    at = arr[idx - 1];
    arr.splice(idx, 1);
    arr.splice(idx - 1, 0, child);
    ctn.addChildBefore(child.elt, at.elt);
  } else if (direction === 'down' && idx + 1 < arr.length) {
    at = arr[idx + 1];
    arr.splice(idx, 1);
    arr.splice(idx + 1, 0, child);
    ctn.addChildAfter(child.elt, at.elt);
  }
};
SBIfChainStatement.prototype.canAddChildBefore = function (child, bf) {
  var astType = child.astType || child.type;
  if (astType === 'BreakStatement' && !this.inLoop) return false;
  if (astType.endsWith('Statement')) return !bf || this.testBlocks.indexOf(bf) !== 0;
  if (!astType.endsWith('Expression') && astType !== 'Identifier') return false;
  var emptyTestIdx = this.testBlocks.indexOf(null);
  if (emptyTestIdx === -1) emptyTestIdx = this.testBlocks.indexOf(undefined);
  if (emptyTestIdx === -1) return false;
  var idx;
  if (bf) {
    idx = this.testBlocks.indexOf(bf);
    for (var i = 0; i < this.doBlocks.length && idx === -1; ++i) {
      if (this.doBlocks[i].indexOf(bf) >= 0) idx = i + 0.5;
    }
    if (idx === -1 && this.elseBlock && this.elseBlock.indexOf(bf) >= 0) idx = this.doBlocks.length;
    if (idx === -1) return false;
    if (emptyTestIdx < idx) return true;
  } else {
    return true;
  }
  return false;
};
SBIfChainStatement.prototype.addChildBefore = function (child, bf) {
  var astType = child.astType;
  var idx, jdx;
  var emptyTestIdx;
  var i;
  if (astType === 'Identifier' || astType.endsWith('Expression')) {
    emptyTestIdx = this.testBlocks.indexOf(null);
    if (emptyTestIdx < 0) emptyTestIdx = this.testBlocks.indexOf(undefined);
    if (emptyTestIdx === -1) {
      throw {
        child: child,
        before: bf,
        message: 'Can not find empty test to add'
      };
    }
    if (bf) {
      idx = this.testBlocks.indexOf(bf);
      for (i = 0; i < this.doBlocks.length && idx === -1; ++i) {
        if (this.doBlocks[i].indexOf(bf) >= 0) idx = i + 1;
      }
      if (emptyTestIdx < idx) {
        this.testBlocks[emptyTestIdx] = child;
        this.$testes[emptyTestIdx].$subCtn.clearChild().addChild(child.elt);
      }
    } else {
      this.testBlocks[emptyTestIdx] = child;
      this.$testes[emptyTestIdx].$subCtn.clearChild().addChild(child.elt);
    }
  } else if (astType.endsWith('Statement')) {
    idx = this.testBlocks.indexOf(bf);
    if (!bf) {
      for (i = 0; i < this.doBlocks.length; ++i) {
        if (this.doBlocks[i].length === 0) {
          this.doBlocks[i].push(child);
          this.$does[i].$subCtn.addChildBefore(child.elt, this.addDoStatementBlocks[i].elt);
          break;
        }
      }
      if (i === this.doBlocks.length) {
        if (this.elseBlock) {
          this.elseBlock.push(child);
          this.$else.$subCtn.addChildBefore(child.elt, this.addElseStatementBlock.elt);
        } else {
          this.doBlocks[0].push(child);
          this.$does[0].$subCtn.addChildBefore(child.elt, this.addDoStatementBlocks[0].elt);
        }
      }
    } else if (idx > 0) {
      this.doBlocks[idx - 1].push(child);
      this.$does[idx - 1].$subCtn.addChildBefore(child.elt, this.addDoStatementBlocks[idx - 1].elt);
    } else {
      for (i = 0; i < this.doBlocks.length && idx === -1; ++i) {
        idx = this.doBlocks[i].indexOf(bf);
        if (idx >= 0) {
          this.doBlocks[i].splice(idx, 0, child);
          this.$does[i].$subCtn.addChildBefore(child.elt, bf.elt);
        }
      }
    }
  } else {
    throw {
      child: child,
      before: bf,
      message: 'Can not add child type ' + astType
    };
  }
};
SBIfChainStatement.prototype.canAddChildAfter = function (child, at) {
  return false;
  var astType = child.astType || child.type;
  if (astType === 'BreakStatement' && !this.inLoop) return false;
  if (astType.endsWith('Statement')) return true;
  if (!astType.endsWith('Expression') && astType !== 'Identifier') return false;
  var emptyTestIdx = this.testBlocks.slice().reverse().indexOf(null);
  if (emptyTestIdx === -1) emptyTestIdx = this.testBlocks.slice().reverse().indexOf(undefined);
  var idx, i;
  if (at) {
    idx = this.testBlocks.indexOf(at);
    for (i = 0; i < this.doBlocks.length && idx === -1; ++i) {
      if (this.doBlocks[i].indexOf(at) >= 0) idx = i + 0.5;
    }
    if (idx === -1) return false;
    if (emptyTestIdx > idx) return true;
  } else return true;
  return false;
};
SBIfChainStatement.prototype.addChildAfter = function (child, at) {
  //todo
  _Snackbar["default"].show("Chức năng này đang làm ....");
  return;
  var astType = child.astType;
  var emptyTestIdx;
  if (astType === 'Identifier' || astType.endsWith('Expression') || astType.endsWith('Literal')) {
    emptyTestIdx = this.testBlocks.indexOf(null);
    if (emptyTestIdx < 0) emptyTestIdx = this.testBlocks.indexOf(undefined);
    if (at) {} else {
      this.testBlocks[emptyTestIdx] = child;
      this.$testes[emptyTestIdx].$subCtn.clearChild().addChild(child.elt);
    }
  } else {}
};
Object.defineProperty(SBIfChainStatement.prototype, 'ast', {
  set: function set(ast) {
    Object.assign(this._ast, ast);
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBIfChainStatement);
var _default = SBIfChainStatement;
exports["default"] = _default;

/***/ }),

/***/ 99541:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _SBIdentifierInput = __webpack_require__(97631);
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _generator = __webpack_require__(18528);
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _EventEmitter = __webpack_require__(46833);
var _SBIdentifier = _interopRequireDefault(__webpack_require__(39425));
var _SBTokenSelection = _interopRequireDefault(__webpack_require__(33360));
var _SBBase = __webpack_require__(31057);
var _SCTypeManager = _interopRequireDefault(__webpack_require__(6360));
var _utils = __webpack_require__(33192);
var _utils2 = __webpack_require__(11997);
var _SCCodeGenerator = __webpack_require__(31647);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function PropertyHolder(block, ast, computed) {
  this._ast = ast;
  this.block = block;
  this.computed = computed;
  this.$elt = (0, _FCore._)({
    "class": 'sb-member-chain-expression-property-ctn',
    child: {
      text: 'property'
    }
  });
  this.addExpressionBlock = new _SBAddExpression["default"]();
  this.expressionBlock = null;
  var clazz;
  if (ast) {
    clazz = _SBClassManager["default"].get(ast);
    this.expressionBlock = new clazz();
    this.expressionBlock.ast = ast;
  }
  this.render();
}
PropertyHolder.prototype.genBoundingPath = function (turtle) {
  if (!this.computed) return;
  var subBound = this.$subCtn.getBoundingClientRect();
  var bound = this.block.bound;
  turtle.moveTo(subBound.left - bound.left, subBound.top - bound.top).hLineBy(subBound.width).vLineBy(subBound.height).hLineBy(-subBound.width).vLineBy(-subBound.height + 17).expKnop().closePath();
};
PropertyHolder.prototype.render = function () {
  var _this = this;
  this.$elt.clearChild();
  if (this.computed) {
    this.$elt.addClass('sb-computed');
    this.$subCtn = (0, _FCore._)({
      "class": 'sb-block-sub-ctn',
      child: this.expressionBlock ? this.expressionBlock.elt : this.addExpressionBlock.elt
    });
    this.$elt.addChild(this.$subCtn);
    _QuickMenu["default"].toggleWhenClick(this.$elt, {
      onClick: function onClick(event) {
        var ok = false;
        ok = ok || _this.expressionBlock && _this.expressionBlock.astType === 'Identifier';
        ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this.$subCtn);
        ok = ok || (0, _EventEmitter.hitElement)(_this.addExpressionBlock.elt, event);
        if (!ok) event.cancel();
      },
      getMenuProps: function getMenuProps() {
        return {
          items: _this.block.getExpressionTypeSelection()
        };
      },
      onSelect: function onSelect(item) {
        var handleAst = function handleAst(ast) {
          var clazz = _SBClassManager["default"].get(ast);
          _this.expressionBlock = new clazz();
          _this.$subCtn.clearChild().addChild(_this.expressionBlock.elt);
          _this.expressionBlock.ast = ast;
          _this.block.editor.selectTool.selectBlock(_this.expressionBlock);
          _this.block.notifyASTChange();
          _this.block.notifySizeChange();
          _this.block.editor.selectTool.selectBlock(_this.expressionBlock);
        };
        if (item.variable) {
          handleAst(Object.assign({
            type: 'Identifier'
          }, item.variable.id));
        } else if (item.astType) {
          handleAst((0, _utils.autoMigrateAst)(_this.expressionBlock && _this.expressionBlock.ast, {
            type: item.astType
          }));
        } else if (item.cmd === 'parse_text') {
          (0, _utils2.openExpressionInputDialog)(_this.$subCtn, _this.expressionBlock ? (0, _SCCodeGenerator.generateSCCode)(_this.expressionBlock.ast) : '').then(function (ast) {
            if (ast) handleAst(ast);
          });
        }
      }
    });
  } else {
    this.$elt.removeClass('sb-computed');
    this.$elt.addChild((0, _FCore._)('span.mdi.mdi-chevron-right'));
    this.$identSelection = (0, _FCore._)({
      tag: _SBTokenSelection["default"]
    });
    if (this._ast) {
      this.$identSelection.text = this._ast.name;
      this.$identSelection.displayText = this._ast.displayName;
    }
    this.$elt.addChild(this.$identSelection);
    _QuickMenu["default"].toggleWhenClick(this.$identSelection, {
      getMenuProps: function getMenuProps() {
        var items = [];
        var pItems = [];
        var methodItems = [];
        var holders = _this.block.holders;
        var holderIdx = holders.indexOf(_this);
        var objectType = holders[holderIdx - 1].getExpectedType();
        var objectTypeDesc = _this.block.editor.typeMng.detectTypeDescriptorOf(objectType);
        var keys;
        if (objectTypeDesc) {
          if (objectTypeDesc.type === 'class' && objectTypeDesc.proto) {
            keys = Object.keys(objectTypeDesc.proto);
            keys.sort();
            keys.reduce(function (items, key) {
              var it = objectTypeDesc.proto[key];
              if (it.type === 'function') {
                methodItems.push({
                  text: key,
                  pType: it,
                  ident: {
                    name: key
                  }
                });
              } else {
                pItems.push({
                  text: key,
                  pType: it,
                  ident: {
                    name: key
                  }
                });
              }
            }, items);
          } else if (objectTypeDesc.type === 'object' && objectTypeDesc.properties) {
            if (objectTypeDesc.properties instanceof Array) {
              pItems = objectTypeDesc.properties.map(function (it) {
                return {
                  text: it.displayName || it.name,
                  ident: {
                    name: it.name,
                    displayName: it.displayName
                  },
                  pType: it
                };
              });
            } else {
              pItems = Object.keys(objectTypeDesc.properties).map(function (key) {
                var it = objectTypeDesc.properties[key];
                return {
                  text: it.displayName || it.name || key,
                  ident: {
                    name: it.name || key,
                    displayName: it.displayName
                  },
                  pType: it
                };
              });
            }
          }
        }
        if (pItems.length > 0) {
          pItems.unshift({
            "class": 'sb-menu-selection-title',
            child: {
              text: 'properties'
            }
          });
          items = items.concat(pItems);
        }
        if (methodItems.length > 0) {
          methodItems.unshift({
            "class": 'sb-menu-selection-title',
            child: {
              text: 'methods'
            }
          });
          items = items.concat(methodItems);
        }
        items.push({
          text: "*",
          cmd: 'input'
        });
        return {
          items: items
        };
      },
      onSelect: function onSelect(item) {
        if (item.cmd === 'input') {
          (0, _SBIdentifierInput.openIdentifierInputDialog)(_this.$elt, _this.$identSelection.text).then(function (value) {
            if (value !== _this.$identSelection.text) {
              _this.$identSelection.text = value;
              _this.block.notifySizeChange();
              _this.block.notifyASTChange();
            }
          });
        } else if (item.ident) {
          _this.$identSelection.text = item.ident.name;
          _this.$identSelection.displayText = item.ident.displayName;
          _this.block.notifySizeChange();
          _this.block.notifyASTChange();
        }
      }
    });
  }
};
PropertyHolder.prototype.getExpectedType = function () {
  if (this.computed) return null;
  var ast = this.ast;
  if (!ast || ast.type !== 'Identifier' || !ast.name) return null;
  var holders = this.block.holders;
  var holderIdx = holders.indexOf(this);
  var prevType = holders[holderIdx - 1] && holders[holderIdx - 1].getExpectedType();
  var prevTypeDesc = this.block.editor.typeMng.detectTypeDescriptorOf(prevType);
  if (!prevType || !prevTypeDesc) return null;
  var currentProperty;
  if (prevTypeDesc.type === 'class') {
    currentProperty = prevTypeDesc.proto[ast.name] || null;
  } else if (prevTypeDesc.type === 'object') {
    if (prevTypeDesc.properties instanceof Array) currentProperty = prevTypeDesc.properties.find(function (p) {
      return p.name === ast.name;
    });else currentProperty = prevTypeDesc.properties[ast.name] || null;
  }
  if (currentProperty) return currentProperty.type;
  return null;
};
Object.defineProperty(PropertyHolder.prototype, 'ast', {
  get: function get() {
    var res = null;
    if (this.computed) {
      if (this.expressionBlock) {
        res = this.expressionBlock.ast;
      }
    } else {
      if (this.$identSelection.text.length > 0) {
        res = {
          type: 'Identifier',
          name: this.$identSelection.text
        };
        if (this.$identSelection.displayText) {
          res.displayName = this.$identSelection.displayText;
        }
      }
    }
    return res;
  }
});
function ObjectHolder(block, ast) {
  var _this2 = this;
  this._ast = ast;
  this.block = block;
  this.$elt = (0, _FCore._)({
    "class": 'sb-member-chain-expression-object-ctn',
    child: {
      "class": 'sb-sub-ctn'
    }
  });
  this.$subCtn = (0, _FCore.$)('.sb-sub-ctn', this.$elt);
  this.addExpressionBlock = new _SBAddExpression["default"]();
  this.expressionBlock = null;
  var clazz;
  if (ast) {
    clazz = _SBClassManager["default"].get(ast);
    this.expressionBlock = new clazz();
    this.expressionBlock.ast = ast;
  }
  this.render();
  _QuickMenu["default"].toggleWhenClick(this.$elt, {
    onClick: function onClick(event) {
      var ok = false;
      ok = ok || _this2.expressionBlock && _this2.expressionBlock.astType === 'Identifier';
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$subCtn);
      ok = ok || (0, _EventEmitter.hitElement)(_this2.addExpressionBlock.elt, event);
      if (!ok) event.cancel();
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.block.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz = _SBClassManager["default"].get(ast);
        _this2.expressionBlock = new clazz();
        _this2.$subCtn.clearChild().addChild(_this2.expressionBlock.elt);
        _this2.expressionBlock.ast = ast;
        _this2.block.notifyASTChange();
        _this2.block.notifySizeChange();
        _this2.block.editor.selectTool.selectBlock(_this2.expressionBlock);
      };
      if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.astType) {
        handleAst((0, _utils.autoMigrateAst)(_this2.expressionBlock && _this2.expressionBlock.ast, {
          type: item.astType
        }));
      } else {
        (0, _utils2.openExpressionInputDialog)(_this2.$subCtn, _this2.expressionBlock ? (0, _SCCodeGenerator.generateSCCode)(_this2.expressionBlock.ast) : '').then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
}

/***
 *
 * @param {SBTurtle} turtle
 */
ObjectHolder.prototype.genBoundingPath = function (turtle) {
  var subBound = this.$subCtn.getBoundingClientRect();
  var bound = this.block.bound;
  turtle.moveTo(subBound.left - bound.left, subBound.top - bound.top).hLineBy(subBound.width).vLineBy(subBound.height).hLineBy(-subBound.width).vLineBy(-subBound.height + 17).expKnop().closePath();
};
ObjectHolder.prototype.render = function () {
  this.$subCtn.clearChild();
  if (this.expressionBlock) {
    this.$subCtn.addChild(this.expressionBlock.elt);
  } else {
    this.$subCtn.addChild(this.addExpressionBlock.elt);
  }
};
ObjectHolder.prototype.getExpectedType = function () {
  var res = null;
  if (this.expressionBlock) {
    res = this.expressionBlock.getExpectedType();
    if (!res && this.expressionBlock.astType === 'Identifier') {
      if (_SCTypeManager["default"].detectTypeDescriptorOf(this.expressionBlock.ast.name)) res = this.expressionBlock.ast.name;
    }
  }
  return res;
};
Object.defineProperty(ObjectHolder.prototype, 'ast', {
  get: function get() {
    if (this.expressionBlock) return this.expressionBlock.ast;
    return null;
  }
});

/***
 * @extends SBExpression
 * @constructor
 */
function SBMemberChainExpression() {
  var _this3 = this;
  _SBExpression["default"].apply(this, arguments);
  this._ast = {
    type: 'MemberExpression'
  };
  /***
   *
   * @type {Array<ObjectHolder|PropertyHolder>}
   * @private
   */
  this.holders = [new ObjectHolder(this, null), new PropertyHolder(this, null, false)];
  Object.defineProperties(this._ast, {
    computed: {
      get: function get() {
        return _this3.holders[_this3.holders.length - 1].computed;
      },
      enumerable: true
    },
    object: {
      enumerable: true,
      get: function get() {
        return _this3.holders.slice(0, _this3.holders.length - 1).reduce(function (ac, holder, i, arr) {
          if (ac === 'init') return holder.ast;
          return {
            type: 'MemberExpression',
            computed: holder.computed,
            object: ac,
            property: holder.ast
          };
        }, 'init');
      }
    },
    property: {
      enumerable: true,
      get: function get() {
        return _this3.holders[_this3.holders.length - 1].ast;
      }
    }
  });
}
_OOP["default"].mixClass(SBMemberChainExpression, _SBExpression["default"]);
SBMemberChainExpression.prototype.astType = 'MemberExpression';
SBMemberChainExpression.prototype._applyAst = function (ast) {
  var _this4 = this;
  var elt = this.elt;
  this.holders.forEach(function (holder) {
    return holder.$elt.remove();
  });
  var makeChain = function makeChain(node, arr) {
    arr = arr || [];
    arr.unshift();
    arr.unshift(new PropertyHolder(_this4, node.property, node.computed));
    if (node.object && node.object.type === 'MemberExpression') {
      makeChain(node.object, arr);
    } else {
      arr.unshift(new ObjectHolder(_this4, node.object));
    }
    return arr;
  };
  this.holders = makeChain(ast);
  this.holders.forEach(function (holder) {
    return elt.addChild(holder.$elt);
  });
};
SBMemberChainExpression.prototype.render = function () {
  var _this5 = this;
  _SBExpression["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-member-chain-expression',
    child: [{
      tag: 'button',
      "class": 'sb-member-chain-expression-option-btn',
      child: 'span.mdi.mdi-cog'
    }, this.holders[0].$elt, this.holders[1].$elt]
  });
  this.$optionBtn = (0, _FCore.$)('.sb-member-chain-expression-option-btn', this.$elt);
  _QuickMenu["default"].toggleWhenClick(this.$optionBtn, {
    getMenuProps: function getMenuProps() {
      var items = [{
        text: '+ Add Expression',
        cmd: 'add_expression'
      }, {
        text: '+ Add Identifier',
        cmd: 'add_ident'
      }];
      if (_this5.holders.length > 2) items.push({
        text: '- Remove last',
        cmd: 'pop'
      });
      if (_this5.holders[_this5.holders.length - 1].computed) items.unshift({
        text: '*  Change to  identifier',
        cmd: 'to_ident'
      });else items.unshift({
        text: '*  Change to  expression',
        cmd: 'to_expression'
      });
      return {
        items: items
      };
    },
    onSelect: function onSelect(item) {
      var holder;
      switch (item.cmd) {
        case 'add_expression':
          holder = new PropertyHolder(_this5, null, true);
          _this5.$elt.addChild(holder.$elt);
          _this5.holders.push(holder);
          break;
        case 'add_ident':
          holder = new PropertyHolder(_this5, null, false);
          _this5.$elt.addChild(holder.$elt);
          _this5.holders.push(holder);
          break;
        case 'pop':
          holder = _this5.holders.pop();
          holder.$elt.remove();
          break;
        case 'to_ident':
          holder = _this5.holders.pop();
          holder.$elt.remove();
          holder = new PropertyHolder(_this5, null, false);
          _this5.$elt.addChild(holder.$elt);
          _this5.holders.push(holder);
          break;
        case 'to_expression':
          holder = _this5.holders.pop();
          holder.$elt.remove();
          holder = new PropertyHolder(_this5, null, true);
          _this5.$elt.addChild(holder.$elt);
          _this5.holders.push(holder);
          break;
      }
      _this5.notifySizeChange();
      _this5.notifyASTChange();
    }
  });
};
SBMemberChainExpression.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var right = bound.width - 1;
  var bottom = bound.height - 1;
  var turtle = new _SBTurtle["default"]().moveTo(0, 0).hLineTo(right).vLineTo(bottom).hLineTo(0).vLineTo(17).expKnop().closePath();
  this.holders.forEach(function (holder) {
    return holder.genBoundingPath(turtle);
  });
  return turtle.getPath();
};
SBMemberChainExpression.prototype.getExpectedType = function () {
  if (!this.editor) return null;
  var holders = this.holders;
  if (holders[holders.length - 1]) return holders[holders.length - 1].getExpectedType();
  return null;
};
SBMemberChainExpression.prototype.removeChild = function (child) {
  this.holders.forEach(function (holder) {
    if (holder.expressionBlock === child) {
      holder.expressionBlock = null;
      holder.render();
    }
  });
};
Object.defineProperty(SBMemberChainExpression.prototype, 'ast', {
  set: function set(ast) {
    ast = (0, _generator.copyJSVariable)(ast);
    this._applyAst(ast);

    // setTimeout(() => {
    //     console.log('exp', this.getExpectedType())
    // }, 1000)
  },

  get: function get() {
    return this._ast;
  },
  enumerable: true
});
_SBClassManager["default"].add(SBMemberChainExpression);
var _default = SBMemberChainExpression;
exports["default"] = _default;

/***/ }),

/***/ 59014:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBCallExpression = _interopRequireDefault(__webpack_require__(561));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function SBNewExpression() {
  _SBCallExpression["default"].apply(this, arguments);
}
_OOP["default"].mixClass(SBNewExpression, _SBCallExpression["default"]);
SBNewExpression.prototype.astType = 'NewExpression';
_SBClassManager["default"].add(SBNewExpression);
var _default = SBNewExpression;
exports["default"] = _default;

/***/ }),

/***/ 41502:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _NumberInput = _interopRequireDefault(__webpack_require__(51394));
var _FCore = __webpack_require__(51518);
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBNullLiteral() {
  _SBBase["default"].apply(this, arguments);
  this._ast = {
    type: 'NullLiteral'
  };
}
_OOP["default"].mixClass(SBNullLiteral, _SBBase["default"]);
SBNullLiteral.prototype.astType = 'NullLiteral';
SBNullLiteral.prototype.render = function () {
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-null-literal',
    child: {
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: 'null'
      }
    }
  });
};
SBNullLiteral.prototype.getBoundingPath = _SBExpression["default"].prototype.getBoundingPath;
Object.defineProperty(SBNullLiteral.prototype, 'ast', {
  set: function set(ast) {},
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBNullLiteral);
var _default = SBNullLiteral;
exports["default"] = _default;

/***/ }),

/***/ 37892:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _NumberInput = _interopRequireDefault(__webpack_require__(51394));
var _FCore = __webpack_require__(51518);
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBNumericLiteral() {
  _SBBase["default"].apply(this, arguments);
  this._ast = {
    type: 'NumericLiteral',
    value: 0
  };
}
_OOP["default"].mixClass(SBNumericLiteral, _SBBase["default"]);
SBNumericLiteral.prototype.astType = 'NumericLiteral';
SBNumericLiteral.prototype.render = function () {
  var _this = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-numeric-literal',
    child: {
      tag: _NumberInput["default"],
      "class": 'as-width-auto',
      props: {
        value: this._ast.value
      }
    }
  });
  this.$number = (0, _FCore.$)(_NumberInput["default"].tag, this.$elt).on('change', function () {
    _this._ast.value = _this.$number.value;
    _this.notifyASTChange();
  });
};
SBNumericLiteral.prototype.getBoundingPath = _SBExpression["default"].prototype.getBoundingPath;
Object.defineProperty(SBNumericLiteral.prototype, 'ast', {
  set: function set(ast) {
    this._ast.value = typeof ast.value !== "number" ? 0 : ast.value;
    if (this.$number) this.$number.value = ast.value;
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBNumericLiteral);
var _default = SBNumericLiteral;
exports["default"] = _default;

/***/ }),

/***/ 63182:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBObjectProperty = _interopRequireDefault(__webpack_require__(58414));
var _SBAddObjectProperty = _interopRequireDefault(__webpack_require__(77516));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends {SBExpression}
 * @constructor
 */
function SBObjectExpression() {
  var _this = this;
  _SBExpression["default"].apply(this, arguments);
  this._ast = {
    type: "ObjectExpression"
  };
  this.propertyBlocks = [];
  this.addPropertyBlock = new _SBAddObjectProperty["default"]();
  Object.defineProperty(this._ast, 'properties', {
    enumerable: true,
    set: function set(astArr) {
      astArr = astArr || [];
      _this.propertyBlocks = astArr.map(function (eAst) {
        var block = new _SBObjectProperty["default"]();
        block.ast = eAst;
        return block;
      });
      if (_this.elt) {
        _this.$subCtn.clearChild().addChild(_this.propertyBlocks.map(function (blk) {
          return blk.elt;
        })).addChild(_this.addPropertyBlock.elt);
      }
    },
    get: function get() {
      return _this.propertyBlocks.map(function (blk) {
        return blk.ast;
      });
    }
  });
}
_OOP["default"].mixClass(SBObjectExpression, _SBExpression["default"]);
SBObjectExpression.prototype.astType = 'ObjectExpression';
SBObjectExpression.prototype.render = function () {
  var _this2 = this;
  _SBExpression["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": ['sb-object-expression'],
    child: [{
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: '{'
      }
    }, {
      "class": 'sb-sub-ctn',
      child: [this.addPropertyBlock.elt]
    }, {
      tag: 'span',
      "class": 'sb-inline-text',
      child: {
        text: '}'
      }
    }]
  });
  this.$subCtn = (0, _FCore.$)('.sb-sub-ctn', this.$elt);
  this.addPropertyBlock.elt.on('click', function () {
    var blk = new _SBObjectProperty["default"]();
    _this2.propertyBlocks.push(blk);
    _this2.$subCtn.addChildBefore(blk.elt, _this2.addPropertyBlock.elt);
    _this2.notifySizeChange();
    _this2.notifyASTChange();
    blk.$identifierKey.focus();
  });
};
SBObjectExpression.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var bottom = bound.height - 1;
  var subBound = this.$subCtn.getBoundingClientRect();
  var turtle = new _SBTurtle["default"]().moveTo(0, 0).hLineTo(subBound.left + 38 - bound.left).vLineTo(subBound.top - bound.top).hLineTo(subBound.left + 28 - bound.left).statementKnop().hLineTo(subBound.left + 8 - bound.left).arcBy(8, 8, 0, 0, 0, -8, 8).vLineBy(subBound.height - 16).arcBy(8, 8, 0, 0, 0, 8, 8).hLineTo(subBound.left + 18 - bound.left).statementKnop().hLineTo(subBound.left + 38 - bound.left).vLineTo(bottom).hLineTo(0).vLineTo(17).expKnop().closePath();
  return turtle.getPath();
};
SBObjectExpression.prototype.removeChild = function (child) {
  var idx = this.propertyBlocks.indexOf(child);
  if (idx < 0) return;
  this.propertyBlocks.splice(idx, 1);
  child.elt.selfRemove();
};
SBObjectExpression.prototype.canMoveChild = function (child, direction) {
  var idx = this.propertyBlocks.indexOf(child);
  if (idx < 0) return false;
  return idx > 0 && direction === "up" || idx < this.propertyBlocks.length - 1 && direction === "down";
};
SBObjectExpression.prototype.moveChild = function (child, direction) {
  var idx = this.propertyBlocks.indexOf(child);
  if (idx < 0) return false;
  if (idx > 0 && direction === "up") {
    this.propertyBlocks.splice(idx, 1);
    this.propertyBlocks.splice(idx - 1, 0, child);
    child.elt.selfRemove();
    this.$subCtn.addChildBefore(child.elt, this.propertyBlocks[idx].elt);
  } else if (idx < this.propertyBlocks.length - 1 || direction === "down") {
    this.propertyBlocks.splice(idx, 1);
    this.propertyBlocks.splice(idx + 1, 0, child);
    child.elt.selfRemove();
    this.$subCtn.addChildAfter(child.elt, this.propertyBlocks[idx].elt);
  }
};
Object.defineProperty(SBObjectExpression.prototype, 'ast', {
  enumerable: true,
  configurable: true,
  set: function set(ast) {
    this._ast.properties = ast.properties;
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBObjectExpression);
var _default = SBObjectExpression;
exports["default"] = _default;

/***/ }),

/***/ 58414:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBBase = _interopRequireWildcard(__webpack_require__(31057));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _SBIdentifierInput = _interopRequireDefault(__webpack_require__(97631));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _SBStringInput = _interopRequireDefault(__webpack_require__(71083));
var _EventEmitter = __webpack_require__(46833);
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _utils = __webpack_require__(11997);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends SBBase
 * @constructor
 */
function SBObjectProperty() {
  var _this = this;
  _SBBase["default"].apply(this, arguments);
  this._ast = {
    type: 'ObjectProperty'
  };
  Object.defineProperties(this._ast, {
    key: {
      enumerable: true,
      set: function set(ast) {
        ast = ast || {
          type: 'Identifier',
          name: ''
        };
        if (ast.type === 'Identifier') {
          _this.elt.attr('data-key-type', 'Identifier');
          _this.$identifierKey.identifierText = ast.name;
        } else {
          _this.elt.attr('data-key-type', 'StringLiteral');
          _this.$stringKey.value = (ast.value || '') + '';
        }
      },
      get: function get() {
        if (_this.elt.attr('data-key-type') === 'StringLiteral') {
          return {
            type: 'StringLiteral',
            value: _this.$stringKey.value
          };
        } else {
          return {
            type: 'Identifier',
            name: _this.$identifierKey.identifierText
          };
        }
      }
    },
    value: {
      enumerable: true,
      set: function set(ast) {
        var clazz;
        if (ast) {
          clazz = _SBClassManager["default"].get(ast);
          _this.valueBlock = new clazz();
          _this.valueBlock.ast = ast;
          _this.$subCtn.clearChild().addChild(_this.valueBlock.elt);
        } else {
          _this.valueBlock = null;
          _this.$subCtn.clearChild().addChild(_this.addExpressionBlock.elt);
        }
      },
      get: function get() {
        if (_this.valueBlock) return _this.valueBlock.ast;
        return null;
      }
    }
  });
  this.addExpressionBlock = new _SBAddExpression["default"]();
  this.valueBlock = null;
}
_OOP["default"].mixClass(SBObjectProperty, _SBBase["default"]);
SBObjectProperty.prototype.astType = 'ObjectProperty';
SBObjectProperty.prototype.render = function () {
  var _this2 = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    attr: {
      'data-key-type': 'Identifier'
    },
    "class": 'sb-object-property',
    child: [{
      "class": 'sb-object-property-key',
      child: [{
        tag: 'button',
        "class": 'sb-option-btn',
        child: 'span.mdi.mdi-cog'
      }, {
        tag: _SBIdentifierInput["default"]
      }, 'span.mdi.mdi-format-quote-open', {
        tag: _SBStringInput["default"]
      }, 'span.mdi.mdi-format-quote-close', {
        tag: 'span',
        "class": 'sb-inline-text',
        child: {
          text: ' :'
        }
      }]
    }, {
      "class": 'sb-sub-ctn',
      child: this.addExpressionBlock.elt
    }]
  });
  this.$subCtn = (0, _FCore.$)('.sb-sub-ctn', this.$elt);
  this.$optionBtn = (0, _FCore.$)('.sb-option-btn', this.$elt);
  this.$stringKey = (0, _FCore.$)(_SBStringInput["default"].tag, this.$elt).on('updatesize', this.notifySizeChange.bind(this));
  /***
   *
   * @type {SBIdentifierInput}
   */
  this.$identifierKey = (0, _FCore.$)(_SBIdentifierInput["default"].tag, this.$elt);
  _QuickMenu["default"].toggleWhenClick(this.$optionBtn, {
    getMenuProps: function getMenuProps() {
      var items = [];
      if (_this2.$elt.attr('data-key-type') === 'StringLiteral') {
        items.push({
          text: 'Identifier as key',
          keyType: 'Identifier',
          icon: 'span.mdi.mdi-swap-horizontal'
        });
      } else {
        items.push({
          text: 'String as key',
          keyType: 'StringLiteral',
          icon: 'span.mdi.mdi-swap-horizontal'
        });
      }
      return {
        items: items
      };
    },
    onSelect: function onSelect(item) {
      var prevKey;
      if (item.keyType === 'Identifier') {
        prevKey = _this2.$stringKey.value;
        // console.log(prevKey);
        // prevKey = this.
      } else if (item.keyType === 'StringLiteral') {
        prevKey = _this2.$identifierKey.identifierText;
        // console.log(prevKey);
      }

      if (item.keyType) {
        _this2.$elt.attr('data-key-type', item.keyType);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.$subCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this2.addExpressionBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$subCtn);
      if (!ok) event.cancel();
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        // console.log(ast);
        var clazz = _SBClassManager["default"].get(ast);
        _this2.valueBlock = new clazz();
        _this2.valueBlock.ast = ast;
        _this2.$subCtn.clearChild().addChild(_this2.valueBlock.elt);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      };
      if (item.astType) {
        handleAst({
          type: item.astType
        });
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$subCtn, '').then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
};
SBObjectProperty.prototype.getBoundingPath = function () {
  var bound = this.$elt.getBoundingClientRect();
  var sBound = this.$subCtn.getBoundingClientRect();
  var turtle = new _SBTurtle["default"]().moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).lineTo(18, 0).statementKnop().hLineTo(sBound.left - bound.left).vLineBy(8).expKnop().vLineTo(bound.height - 1).hLineTo(28).statementKnop().hLineTo(8).arcBy(8, 8, 0, 0, 1, -8, -8).vLineTo(17).closePath();
  return turtle.getPath();
};
SBObjectProperty.prototype.removeChild = function (child) {
  if (this.valueBlock === child) {
    this.valueBlock = null;
    this.$subCtn.clearChild().addChild(this.addExpressionBlock.elt);
  }
};
Object.defineProperty(SBObjectProperty.prototype, 'ast', {
  set: function set(ast) {
    this._ast.key = ast.key;
    this._ast.value = ast.value;
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBObjectProperty);
var _default = SBObjectProperty;
exports["default"] = _default;

/***/ }),

/***/ 47412:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBBase = _interopRequireWildcard(__webpack_require__(31057));
var _SBStatement = _interopRequireDefault(__webpack_require__(23917));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _EventEmitter = __webpack_require__(46833);
var _utils = __webpack_require__(11997);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBStatement
 * @constructor
 */
function SBReturnStatement() {
  var _this = this;
  _SBStatement["default"].apply(this, arguments);
  this._ast = {
    type: 'ReturnStatement',
    argument: null
  };
  this.addExpressionBlock = new _SBAddExpression["default"]();
  this.argumentBlock = null;
  Object.defineProperty(this._ast, 'argument', {
    get: function get() {
      var c = _this.parent;
      while (c) {
        if (c.astType === 'FunctionDeclaration') break;
        c = c.parent;
      }
      if (c && c.astType === 'FunctionDeclaration' && c.functionType === 'procedure') return null;
      return _this.argumentBlock && _this.argumentBlock.ast || null;
    },
    set: function set(ast) {
      var clazz, blk;
      if (ast) {
        clazz = _SBClassManager["default"].get(ast);
        blk = new clazz();
        blk.ast = ast;
      } else {
        blk = null;
      }
      _this.argumentBlock = blk;
      if (_this.$elt) {
        if (blk) {
          _this.$argumentCtn.clearChild().addChild(blk.elt);
        } else {
          _this.$argumentCtn.clearChild().addChild(_this.addExpressionBlock.elt);
        }
      }
    }
  });
}
_OOP["default"].mixClass(SBReturnStatement, _SBStatement["default"]);
SBReturnStatement.prototype.astType = 'ReturnStatement';
SBReturnStatement.prototype.render = function () {
  var _this2 = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": ['sb-block', 'sb-return-statement'],
    child: [{
      "class": 'sb-return-statement-left',
      child: [{
        tag: 'span',
        "class": 'sb-inline-text',
        child: {
          text: 'return '
        }
      }]
    }, {
      "class": ['sb-block-sub-ctn', 'sb-return-statement-argument-ctn'],
      child: [(this.argumentBlock || this.addExpressionBlock).elt]
    }]
  });
  this.$argumentCtn = (0, _FCore.$)('.sb-return-statement-argument-ctn', this.$elt);
  _QuickMenu["default"].toggleWhenClick(this.$argumentCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this2.addExpressionBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$argumentCtn);
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        clazz = _SBClassManager["default"].get(ast);
        _this2.argumentBlock = new clazz();
        _this2.$argumentCtn.clearChild().addChild(_this2.argumentBlock.elt);
        _this2.argumentBlock.ast = ast;
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      };
      var clazz;
      if (item.astType) {
        handleAst({
          type: item.astType
        });
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$argumentCtn, '').then(function (ast) {
          if (ast) handleAst(ast);
        });
      }
    }
  });
};
SBReturnStatement.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var rightBound = this.$argumentCtn.getBoundingClientRect();
  var right = rightBound.width > 0 ? rightBound.left - bound.left : bound.right - 1;
  var bottom = bound.height - 1;
  var turtle = new _SBTurtle["default"]().moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).hLineTo(18).statementKnop().hLineTo(right);
  if (rightBound.width > 0) {
    turtle.vLineBy(8).expKnop();
  }
  turtle.vLineTo(bottom).hLineTo(28).statementKnop().hLineTo(8).arcBy(8, 8, 0, 0, 1, -8, -8).closePath();
  return turtle.getPath();
};
SBReturnStatement.prototype.removeChild = function (child) {
  if (child === this.argumentBlock) {
    child.elt.selfReplace(this.addExpressionBlock.elt);
    this.argumentBlock = null;
  }
};
Object.defineProperty(SBReturnStatement.prototype, 'ast', {
  set: function set(ast) {
    this._ast.argument = ast.argument;
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBReturnStatement);
var _default = SBReturnStatement;
exports["default"] = _default;

/***/ }),

/***/ 23917:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBStatement() {
  _SBBase["default"].apply(this, arguments);
}
_OOP["default"].mixClass(SBStatement, _SBBase["default"]);
SBStatement.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var right = bound.width - 1;
  var bottom = bound.height - 1;
  var turtle = new _SBTurtle["default"]().moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).lineTo(18, 0).statementKnop().lineTo(right, 0).lineTo(right, bottom).lineTo(28, bottom).statementKnop().lineTo(8, bound.height - 1).arcBy(8, 8, 0, 0, 1, -8, -8).closePath();
  return turtle.getPath();
};
var _default = SBStatement;
exports["default"] = _default;

/***/ }),

/***/ 58661:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _FCore = __webpack_require__(51518);
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
var _SBStringInput = _interopRequireDefault(__webpack_require__(71083));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBBase
 * @constructor
 */
function SBStringLiteral() {
  _SBBase["default"].apply(this, arguments);
  this._ast = {
    type: 'StringLiteral',
    value: ""
  };
}
_OOP["default"].mixClass(SBStringLiteral, _SBBase["default"]);
SBStringLiteral.prototype.getBoundingPath = _SBExpression["default"].prototype.getBoundingPath;
SBStringLiteral.prototype.astType = 'StringLiteral';
SBStringLiteral.prototype.render = function () {
  var _this = this;
  _SBBase["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-string-literal',
    child: ['span.mdi.mdi-format-quote-open.sb-inline-text', {
      tag: _SBStringInput["default"],
      props: {
        value: this._ast.value
      }
    }, 'span.mdi.mdi-format-quote-close.sb-inline-text']
  });
  this.$value = (0, _FCore.$)(_SBStringInput["default"].tag, this.$elt).on('change', function () {
    _this._ast.value = _this.$value.value;
    _this.notifyASTChange();
  }).on('updatesize', function () {
    _this.notifySizeChange();
  });
};
Object.defineProperty(SBStringLiteral.prototype, 'ast', {
  set: function set(ast) {
    this._ast.value = typeof ast.value !== 'string' ? "" : ast.value;
    if (this.$value) this.$value.value = ast.value;
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBStringLiteral);
var _default = SBStringLiteral;
exports["default"] = _default;

/***/ }),

/***/ 47410:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Turtle = _interopRequireDefault(__webpack_require__(90942));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends Turtle
 * @constructor
 */
function SBTurtle() {
  _Turtle["default"].apply(this);
}
_OOP["default"].mixClass(SBTurtle, _Turtle["default"]);

/***
 *
 * @returns {SBTurtle}
 */
SBTurtle.prototype.statementKnop = function () {
  if (this._tangent.x > 0) {
    return this.lineBy(3, 3).arcBy(5, 5, 0, 0, 0, 4, 0).lineBy(3, -3);
  } else {
    return this.lineBy(-3, 3).arcBy(5, 5, 0, 0, 1, -4, 0).lineBy(-3, -3);
  }
};

/***
 *
 * @returns {SBTurtle}
 */
SBTurtle.prototype.expKnop = function () {
  if (this._tangent.y > 0) {
    //(0, 0)||(0, 3)  (-8, -8) (-8, 5) => (-8, 15) (0, 4) (0, 9)
    return this.cubicBezierBy(0, 3, -8, -8, -8, 5).cubicBezierBy(0, 10, 8, -1, 8, 4);
  } else {
    //(0, 9)|| (0, 4)  (-8, 15)   (-8, 5)||(-8, -8) (0, 3) (0, 0)
    return this.cubicBezierBy(0, -5, -8, 6, -8, -4).cubicBezierBy(0, -13, 8, -2, 8, -5);
  }
};
SBTurtle.prototype.expBound = function (left, top, width, height) {
  return this.moveTo(left, top).hLineBy(width).vLineBy(height).hLineBy(-width).vLineTo(top + 17).expKnop().closePath();
};
var _default = SBTurtle;
exports["default"] = _default;

/***/ }),

/***/ 40594:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SBExpression = _interopRequireDefault(__webpack_require__(54816));
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBTokenSelection = _interopRequireDefault(__webpack_require__(33360));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _EventEmitter = __webpack_require__(46833);
var _SBBinaryExpression = _interopRequireDefault(__webpack_require__(33759));
var _SBBase = __webpack_require__(31057);
var _utils = __webpack_require__(33192);
var _utils2 = __webpack_require__(11997);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBExpression
 * @constructor
 */
function SBUnaryExpression() {
  var _this = this;
  _SBExpression["default"].call(this);
  this._ast = {
    type: 'UnaryExpression',
    argument: null,
    operator: {
      type: 'UnaryOperator',
      content: '+'
    }
  };
  this.addExpressionBlock = new _SBAddExpression["default"]();
  this.argumentBlock = null;
  Object.defineProperty(this._ast, 'argument', {
    get: function get() {
      return _this.argumentBlock && _this.argumentBlock.ast || null;
    }
  });
}
_OOP["default"].mixClass(SBUnaryExpression, _SBExpression["default"]);
SBUnaryExpression.prototype.astType = 'UnaryExpression';
SBUnaryExpression.prototype.render = function () {
  var _this2 = this;
  _SBExpression["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-unary-expression',
    child: [{
      tag: _SBTokenSelection["default"],
      props: {
        text: this._ast.operator.content
      }
    }, {
      "class": ['sb-block-sub-ctn', 'sb-unary-expression-argument-ctn'],
      child: [(this.argumentBlock || this.addExpressionBlock).elt]
    }]
  });
  this.$op = (0, _FCore.$)(_SBTokenSelection["default"].tag, this.$elt);
  this.$argumentCtn = (0, _FCore.$)('.sb-unary-expression-argument-ctn', this.$elt);
  _QuickMenu["default"].toggleWhenClick(this.$op, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getOperatorSelection()
      };
    },
    onSelect: function onSelect(item) {
      if (item.op) {
        _this2._ast.operator.content = item.op;
        if (_this2.$op) {
          _this2.$op.text = item.op;
        }
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      }
    }
  });
  this.argQMN = _QuickMenu["default"].toggleWhenClick(this.$argumentCtn, {
    anchor: [0, 7, 3, 4, 8, 10],
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this2.addExpressionBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$argumentCtn);
      ok = ok || _this2.argumentBlock && _this2.argumentBlock.astType === 'Identifier';
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        extendClasses: ['sb-quick-menu'],
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz = _SBClassManager["default"].get(ast);
        _this2.argumentBlock = new clazz();
        _this2.argumentBlock.ast = ast;
        _this2.$argumentCtn.clearChild().addChild(_this2.argumentBlock.elt);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
        _this2.editor.selectTool.selectBlock(_this2.argumentBlock);
      };
      if (item.astType) {
        handleAst((0, _utils.autoMigrateAst)(_this2.argumentBlock && _this2.argumentBlock.ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        (0, _utils2.openExpressionInputDialog)(_this2.$argumentCtn, '').then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      }
    }
  });
};
SBUnaryExpression.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var argBound = this.$argumentCtn.getBoundingClientRect();
  return new _SBTurtle["default"]().expBound(0, 0, bound.width - 1, bound.height - 1).expBound(argBound.left - bound.left, argBound.top - bound.top, argBound.width, argBound.height).getPath();
};
SBUnaryExpression.prototype.removeChild = function (child) {
  if (child === this.argumentBlock) {
    child.elt.selfReplace(this.addExpressionBlock.elt);
  }
};
SBUnaryExpression.prototype.getOperatorSelection = function () {
  return ['+', '-', '!'].map(function (op) {
    return {
      text: op,
      op: op
    };
  });
};
Object.defineProperty(SBUnaryExpression.prototype, 'ast', {
  set: function set(ast) {
    if (ast.operator) {
      this._ast.operator.content = ast.operator.content;
      if (this.$op) this.$op.text = ast.operator.content;
    }
    var clazz;
    if (ast.argument) {
      clazz = _SBClassManager["default"].get(ast.argument);
      this.argumentBlock = new clazz();
      this.argumentBlock.ast = ast.argument;
      if (this.$argumentCtn) {
        this.$argumentCtn.clearChild().addChild(this.argumentBlock.elt);
      }
    }
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBUnaryExpression);
var _default = SBUnaryExpression;
exports["default"] = _default;

/***/ }),

/***/ 46086:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _SBBase = _interopRequireDefault(__webpack_require__(31057));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBTokenSelection = _interopRequireDefault(__webpack_require__(33360));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _SBIdentifier = _interopRequireDefault(__webpack_require__(39425));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBIdentifier
 * @constructor
 */
function SBVariable() {
  _SBIdentifier["default"].apply(this, arguments);
}
_OOP["default"].mixClass(SBVariable, _SBIdentifier["default"]);
SBVariable.prototype.render = function () {
  var _this = this;
  _SBIdentifier["default"].prototype.render.call(this);
  this.quickMenu = _QuickMenu["default"].toggleWhenClick(this.$name, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this.getVariableMenuItems()
      };
    },
    onSelect: this.onSelectVariableMenuItem.bind(this)
  });
};
SBVariable.prototype.getVariableMenuItems = function () {
  return Object.values(this.getVariables()).map(function (variable) {
    return {
      variable: variable,
      text: variable.id.name
    };
  });
};
SBVariable.prototype.onSelectVariableMenuItem = function (item) {
  if (item.value) {
    this.$name.text = item.text;
    this.notifySizeChange();
  } else {
    //run command
    console.log(item);
  }
};
var _default = SBVariable;
exports["default"] = _default;

/***/ }),

/***/ 96636:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBStatement = _interopRequireDefault(__webpack_require__(23917));
var _FCore = __webpack_require__(51518);
var _SBIdentifierInput = _interopRequireDefault(__webpack_require__(97631));
var _SBTokenSelection = _interopRequireDefault(__webpack_require__(33360));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _utils = __webpack_require__(11997);
var _SCParser = _interopRequireDefault(__webpack_require__(13682));
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _EventEmitter = __webpack_require__(46833);
var _SBBase = __webpack_require__(31057);
var _SCCodeGenerator = __webpack_require__(31647);
var _utils2 = __webpack_require__(33192);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends SBStatement
 * @constructor
 */
function SBVariableDeclaration() {
  this._ast = {
    type: 'VariableDeclaration',
    declarations: [{
      type: "VariableDeclarator",
      id: {
        type: 'Identifier',
        name: ''
      },
      typeAnnotation: {
        type: 'TypeAnnotation',
        typeAnnotation: {
          type: 'GenericType',
          id: {
            type: 'Identifier',
            name: 'any'
          }
        }
      }
    }]
  };
  this.$domSignal = (0, _FCore._)('attachhook');
  this.domSignal = new _DomSignal["default"](this.$domSignal).on('update', this.updateTypeDisplayName.bind(this));
  this.addExpressionBlock = new _SBAddExpression["default"]();
  this.initBlock = null;
  this._astBinding();
}
_OOP["default"].mixClass(SBVariableDeclaration, _SBStatement["default"]);
SBVariableDeclaration.prototype.astType = 'VariableDeclaration';
SBVariableDeclaration.prototype.render = function () {
  var _this = this;
  _SBStatement["default"].prototype.render.call(this);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-variable-declaration',
    child: [{
      "class": 'sb-variable-declaration-left',
      child: [{
        tag: 'span',
        "class": 'sb-inline-text',
        child: {
          text: 'var'
        }
      }, {
        tag: _SBIdentifierInput["default"]
      }, {
        tag: 'span',
        "class": 'sb-inline-text',
        child: {
          text: ' : '
        }
      }, {
        tag: _SBTokenSelection["default"],
        props: {
          text: (0, _utils.type2text)(this._ast.declarations[0].typeAnnotation.typeAnnotation)
        }
      }, {
        tag: 'button',
        "class": 'sb-option-btn',
        child: 'span.mdi.mdi-cog'
      }]
    }, {
      "class": 'sb-variable-declaration-right',
      child: [this.addExpressionBlock.elt]
    }]
  });
  this.$left = (0, _FCore.$)('.sb-variable-declaration-left', this.$elt);
  this.$rightCtn = (0, _FCore.$)('.sb-variable-declaration-right', this.$elt);
  this.$optionBtn = (0, _FCore.$)('.sb-option-btn', this.$elt);
  this.$type = (0, _FCore.$)(_SBTokenSelection["default"].tag, this.$elt);
  this.$id = (0, _FCore.$)(_SBIdentifierInput["default"].tag, this.$elt);
  this.$id.value = this._ast.declarations[0].id.name;
  this.$id.on('change', function () {
    _this._ast.declarations[0].id.name = _this.$id.identifierText;
    _this.notifyASTChange();
  }).on('keyup', function () {
    _this._ast.declarations[0].id.name = _this.$id.identifierText;
  });
  _QuickMenu["default"].toggleWhenClick(this.$type, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this.getTypeItemSelection()
      };
    },
    onSelect: function onSelect(item) {
      if (item.cmd) {
        _this.editor.typeSelectionDialog.openForResult((0, _utils.type2text)(_this._ast.declarations[0].typeAnnotation.typeAnnotation)).then(function (result) {
          if (result !== null) {
            _this._ast.declarations[0].typeAnnotation.typeAnnotation = {
              type: 'LinkedType',
              address: _SCParser["default"].parse('' + result, 'exp').ast
            };
            _this.domSignal.emit('update');
            _this.notifyASTChange();
          }
        });
      } else {
        _this.$type.text = item.text;
        _this._ast.declarations[0].typeAnnotation.typeAnnotation = {
          type: 'GenericType',
          id: {
            type: 'Identifier',
            name: item.value
          }
        };
        _this.domSignal.emit('update');
        _this.notifyASTChange();
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.$optionBtn, {
    getMenuProps: function getMenuProps() {
      var items = [];
      if (_this.$elt.hasClass('sb-has-init')) {
        items.push({
          text: '- Remove init value',
          cmd: 'remove_init_value'
        });
      } else {
        items.push({
          text: '- Add init value',
          cmd: 'add_init_value'
        });
      }
      return {
        items: items
      };
    },
    onSelect: function onSelect(item) {
      if (item.cmd === 'add_init_value') {
        _this.$elt.addClass('sb-has-init');
      } else {
        _this._ast.declarations[0].init = null;
      }
      _this.notifySizeChange();
      _this.notifyASTChange();
    }
  });
  this.rightQMN = _QuickMenu["default"].toggleWhenClick(this.$rightCtn, {
    onClick: function onClick(event) {
      var ok = (0, _EventEmitter.hitElement)(_this.addExpressionBlock.elt, event);
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this.$rightCtn);
      if (!ok) {
        event.cancel();
      }
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz;
        clazz = _SBClassManager["default"].get(ast);
        _this.initBlock = new clazz();
        _this.$rightCtn.clearChild().addChild(_this.initBlock.elt);
        _this.initBlock.ast = ast;
        _this.notifySizeChange();
        _this.notifyASTChange();
      };
      var initValue;
      if (item.astType) {
        handleAst((0, _utils2.autoMigrateAst)(_this.initBlock && _this.initBlock.ast, {
          type: item.astType
        }));
      } else if (item.variable) {
        handleAst(Object.assign({
          type: 'Identifier'
        }, item.variable.id));
      } else if (item.cmd === 'parse_text') {
        initValue = _this.initBlock ? (0, _SCCodeGenerator.generateSCCode)(_this.initBlock.ast) : '';
        (0, _utils.openExpressionInputDialog)(_this.$rightCtn, initValue).then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      }
    }
  });
};
SBVariableDeclaration.prototype._astBinding = function () {
  var _this2 = this;
  var typeAnnotation = {
    type: 'TypeAnnotation',
    typeAnnotation: {
      type: 'GenericType',
      id: {
        type: 'Identifier',
        name: 'any'
      }
    }
  };
  Object.defineProperties(this._ast.declarations[0], {
    init: {
      enumerable: true,
      set: function set(ast) {
        var clazz;
        if (ast) {
          clazz = _SBClassManager["default"].get(ast);
          _this2.initBlock = new clazz();
          _this2.elt.addClass('sb-has-init');
          _this2.$rightCtn.clearChild().addChild(_this2.initBlock.elt);
          _this2.initBlock.ast = ast;
        } else {
          _this2.initBlock = null;
          _this2.$rightCtn.clearChild().addChild(_this2.addExpressionBlock.elt);
          _this2.elt.removeClass('sb-has-init');
        }
      },
      get: function get() {
        return _this2.initBlock ? _this2.initBlock.ast : null;
      }
    },
    typeAnnotation: {
      enumerable: true,
      set: function set(value) {
        value = value || {
          type: 'TypeAnnotation',
          typeAnnotation: {
            type: 'GenericType',
            id: {
              type: 'Identifier',
              name: 'any'
            }
          }
        };
        _this2.$type.text = (0, _utils.type2text)(value.typeAnnotation);
        typeAnnotation = value;
        _this2.domSignal.emit('update');
      },
      get: function get() {
        return typeAnnotation;
      }
    }
  });
};
SBVariableDeclaration.prototype.updateTypeDisplayName = function () {
  var editor = this.editor;
  var fullTypeName = (0, _utils.type2text)(this._ast.declarations[0].typeAnnotation.typeAnnotation);
  var typeName = (fullTypeName.match(/[^<]+/) || [''])[0];
  var ofName = (fullTypeName.match(/<([^>]+)/) || ['', ''])[1].trim();
  var isJSType = ['number', 'string', 'Date', 'any'].indexOf(typeName) >= 0;
  var typeDescriptor;
  if (isJSType) {
    this.$type.text = typeName;
  } else {
    typeDescriptor = editor.getTypeDescriptor(typeName);
    this.$type.text = typeDescriptor && typeDescriptor.displayName || typeName;
  }
  isJSType = ['number', 'string', 'Date', 'any'].indexOf(ofName) >= 0;
  // if (isJSType) {
  //     this.$of.text = ofName;
  // }
  // else {
  //     typeDescriptor = editor.getTypeDescriptor(ofName);
  //     this.$of.text = (typeDescriptor && typeDescriptor.displayName) || ofName;
  // }
  this.notifySizeChange();
};
SBVariableDeclaration.prototype.removeChild = function (child) {
  if (child !== this.initBlock) return;
  this.initBlock = null;
  this.$rightCtn.clearChild().addChild(this.addExpressionBlock.elt);
};
SBVariableDeclaration.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var bottom = bound.height - 1;
  var leftBound = this.$left.getBoundingClientRect();
  var right = leftBound.right - bound.left;
  var turtle = new _SBTurtle["default"]().moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).lineTo(18, 0).statementKnop().lineTo(right, 0);
  if (this.$elt.hasClass('sb-has-init')) {
    turtle.vLineBy(8).expKnop();
  }
  turtle.lineTo(right, bottom).lineTo(28, bottom).statementKnop().lineTo(8, bound.height - 1).arcBy(8, 8, 0, 0, 1, -8, -8).closePath();
  return turtle.getPath();
};
SBVariableDeclaration.prototype.getTypeItemSelection = function () {
  return [{
    text: 'number',
    value: 'number'
  }, {
    text: 'string',
    value: 'string'
  }, {
    text: 'Date',
    value: 'Date'
  }, {
    text: 'any',
    value: 'any'
  }, '=============', {
    text: 'Chon kiểu dữ liệu',
    cmd: 'chose_type'
  }];
};
Object.defineProperty(SBVariableDeclaration.prototype, 'ast', {
  set: function set(ast) {
    this._ast.declarations[0].id.name = ast.declarations[0].id.name;
    if (this.$id) this.$id.identifierText = ast.declarations[0].id.name;
    //todo: other type
    this._ast.declarations[0].typeAnnotation = ast.declarations[0].typeAnnotation || {
      type: 'TypeAnnotation',
      typeAnnotation: {
        type: 'GenericType',
        id: {
          type: 'Identifier',
          name: 'any'
        }
      }
    };
    this._ast.declarations[0].init = ast.declarations[0].init || null;
    this.domSignal.emit('update');
  },
  get: function get() {
    console.log(this._ast);
    return this._ast;
  }
});
_SBClassManager["default"].add(SBVariableDeclaration);
var _default = SBVariableDeclaration;
exports["default"] = _default;

/***/ }),

/***/ 29034:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(29211);
var _SBBase = _interopRequireWildcard(__webpack_require__(31057));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SBTurtle = _interopRequireDefault(__webpack_require__(47410));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _FCore = __webpack_require__(51518);
var _SBAddExpression = _interopRequireDefault(__webpack_require__(84343));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _SBAddStatement = _interopRequireDefault(__webpack_require__(5921));
var _utils = __webpack_require__(11997);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends SBBase
 * @constructor
 */
function SBWhileStatement() {
  var _this = this;
  _SBBase["default"].apply(this, arguments);
  this._ast = {
    type: 'WhileStatement'
  };
  this.testBlock = null;
  this.doBlocks = [];
  this.addTestBlock = new _SBAddExpression["default"]();
  this.addStatementBlock = new _SBAddStatement["default"]();
  Object.defineProperty(this._ast, 'test', {
    get: function get() {
      return _this.testBlock && _this.testBlock.ast || null;
    },
    set: function set(ast) {
      var clazz;
      if (ast) {
        clazz = _SBClassManager["default"].get(ast);
        _this.testBlock = new clazz();
        _this.testBlock.ast = ast;
      } else {
        _this.testBlock = null;
      }
      if (_this.$testCtn) {
        _this.$testCtn.clearChild();
        if (_this.testBlock) _this.$testCtn.addChild(_this.testBlock.elt);
      }
    },
    enumerable: true
  });
  Object.defineProperty(this._ast, 'body', {
    enumerable: true,
    set: function set(ast) {
      if (!ast) {
        ast = {
          type: 'BlockStatement',
          body: []
        };
      } else if (ast.type !== 'BlockStatement') {
        ast = {
          type: 'BlockStatement',
          body: [ast]
        };
      }
      _this.doBlocks = ast.body.map(function (sAst) {
        var clazz = _SBClassManager["default"].get(sAst);
        var block = new clazz();
        block.ast = sAst;
        return block;
      });
      if (_this.$doCtn) {
        _this.$doCtn.clearChild().addChild(_this.doBlocks.map(function (blk) {
          return blk.elt;
        })).addChild(_this.addStatementBlock.elt);
      }
    },
    get: function get() {
      return {
        type: 'BlockStatement',
        body: _this.doBlocks.map(function (blk) {
          return blk.ast;
        })
      };
    }
  });
}
_OOP["default"].mixClass(SBWhileStatement, _SBBase["default"]);
SBWhileStatement.prototype.astType = 'WhileStatement';
SBWhileStatement.prototype.render = function () {
  var _this2 = this;
  _SBBase["default"].prototype.render.call(this, arguments);
  (0, _FCore._)({
    elt: this.$elt,
    "class": 'sb-while-statement',
    child: [{
      "class": 'sb-while-statement-test',
      child: [{
        tag: 'span',
        "class": 'sb-inline-text',
        child: {
          text: 'While'
        }
      }, {
        "class": 'sb-block-sub-ctn'
      }]
    }, {
      "class": 'sb-while-statement-do',
      child: [{
        tag: 'span',
        "class": 'sb-inline-text',
        child: {
          text: 'do'
        }
      }, {
        "class": 'sb-block-sub-ctn'
      }]
    }]
  });
  this.$testCtn = (0, _FCore.$)('.sb-while-statement-test>.sb-block-sub-ctn', this.$elt);
  this.$doCtn = (0, _FCore.$)('.sb-while-statement-do>.sb-block-sub-ctn', this.$elt);
  if (this.testBlock) {
    this.$testCtn.addChild(this.testBlock.elt);
  } else {
    this.$testCtn.addChild(this.addTestBlock.elt);
  }
  this.$doCtn.addChild(this.doBlocks.map(function (blk) {
    return blk.elt;
  })).addChild(this.addStatementBlock.elt);
  _QuickMenu["default"].toggleWhenClick(this.$testCtn, {
    onClick: function onClick(event) {
      var ok = false;
      ok = ok || !_this2.testBlock;
      ok = ok || (0, _SBBase.isBoundOfChild)(event.target, _this2.$testCtn);
      ok = ok || _this2.testBlock && _this2.testBlock.astType === 'Identifier';
      if (!ok) event.cancel();
    },
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getExpressionTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        _this2._ast.test = ast;
        _this2.notifyASTChange();
        _this2.notifySizeChange();
      };
      if (item.variable) {
        handleAst(item.variable.id);
      } else if (item.astType) {
        handleAst({
          type: item.astType
        });
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.$testCtn, '').then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      }
    }
  });
  _QuickMenu["default"].toggleWhenClick(this.addStatementBlock.elt, {
    getMenuProps: function getMenuProps() {
      return {
        items: _this2.getStatementTypeSelection()
      };
    },
    onSelect: function onSelect(item) {
      var handleAst = function handleAst(ast) {
        var clazz = _SBClassManager["default"].get(ast);
        var block = new clazz();
        if (_this2.doBlocks.length > 0) {
          _this2.$doCtn.addChildAfter(block.elt, _this2.doBlocks[_this2.doBlocks.length - 1].elt);
        } else {
          _this2.$doCtn.addChildBefore(block.elt, _this2.$doCtn.firstChild);
        }
        _this2.doBlocks.push(block);
        _this2.notifySizeChange();
        _this2.notifyASTChange();
      };
      if (item.astType) {
        handleAst({
          type: item.astType
        });
      } else if (item.cmd === 'parse_text') {
        (0, _utils.openExpressionInputDialog)(_this2.addStatementBlock.elt, '').then(function (ast) {
          if (!ast) return;
          handleAst(ast);
        });
      }
    }
  });
};
SBWhileStatement.prototype.getBoundingPath = function () {
  var bound = this.bound;
  var testBound = this.$testCtn.getBoundingClientRect();
  var doBound = this.$doCtn.getBoundingClientRect();
  var turtle = new _SBTurtle["default"]().moveTo(0, 8).arcTo(8, 8, 0, 0, 1, 8, 0).lineTo(18, 0).statementKnop().hLineTo(testBound.left - bound.left).vLineBy(8).expKnop().vLineTo(testBound.bottom - bound.top).hLineTo(doBound.left - bound.left + 28).statementKnop().hLineTo(doBound.left - bound.left + 8).arcBy(8, 8, 0, 0, 0, -8, 8).vLineTo(doBound.bottom - bound.top - 8).arcBy(8, 8, 0, 0, 0, 8, 8).hLineTo(bound.right - bound.left).vLineTo(bound.height - 1).hLineTo(28).statementKnop().hLineTo(8).arcBy(8, 8, 0, 0, 1, -8, -8).closePath();
  return turtle.getPath();
};
SBWhileStatement.prototype.removeDoChild = function (child) {
  var idx = this.doBlocks.indexOf(child);
  if (idx < 0) return;
  this.doBlocks.splice(idx, 1);
  child.elt.remove();
};
SBWhileStatement.prototype.removeChild = function (child) {
  //todo: remove test expression
  this.removeDoChild(child);
};
SBWhileStatement.prototype.canMoveChild = function (child, direction) {
  var idx = this.doBlocks.indexOf(child);
  if (idx < 0) return false;
  if (direction === 'up') {
    return idx > 0;
  } else if (direction === 'down') {
    return idx + 1 < this.doBlocks.length;
  }
  return false;
};
SBWhileStatement.prototype.moveChild = function (child, direction) {
  var idx = this.doBlocks.indexOf(child);
  var at;
  if (direction === 'up' && idx > 0) {
    at = this.doBlocks[idx - 1];
    this.doBlocks.splice(idx, 1);
    this.doBlocks.splice(idx - 1, 0, child);
    child.elt.selfRemove();
    this.$doCtn.addChildBefore(child.elt, at.elt);
  } else if (direction === 'down' && idx + 1 < this.doBlocks.length) {
    at = this.doBlocks[idx + 1];
    this.doBlocks.splice(idx, 1);
    this.doBlocks.splice(idx + 1, 0, child);
    child.elt.selfRemove();
    this.$doCtn.addChildAfter(child.elt, at.elt);
  }
};
Object.defineProperty(SBWhileStatement.prototype, 'ast', {
  set: function set(ast) {
    this._ast.test = ast.test;
    this._ast.body = ast.body;
  },
  get: function get() {
    return this._ast;
  }
});
_SBClassManager["default"].add(SBWhileStatement);
var _default = SBWhileStatement;
exports["default"] = _default;

/***/ }),

/***/ 97631:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.openIdentifierInputDialog = openIdentifierInputDialog;
var _FCore = __webpack_require__(51518);
var _utils = __webpack_require__(84512);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _stringFormat = __webpack_require__(22294);
var _Follower = _interopRequireDefault(__webpack_require__(48414));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @augments HTMLInputElement
 * @augments AElement
 * @constructor
 */
function SBIdentifierInput() {
  this.addEventListener('change', this.eventHandler.change);
  this.on('keydown', this.eventHandler.keyDown);
  this.autoWidthBy();
  /***
   * @type {string}
   * @name identifierText
   * @memberOf SBIdentifierInput#
   */
}

SBIdentifierInput.tag = 'SBIdentifierInput';
SBIdentifierInput.render = function () {
  return (0, _FCore._)({
    tag: 'input',
    extendEvent: ['change', 'contextmenu'],
    "class": 'sb-identifier-input',
    attr: {
      type: 'text',
      placeholder: 'ident...'
    },
    on: {
      contextmenu: function contextmenu(event) {
        event.stopPropagation();
      }
    }
  });
};
SBIdentifierInput.prototype.autoWidthBy = function (value) {
  var cBound = this.getBoundingClientRect();
  value = value || this.value;
  var width = (0, _utils.measureText)(value, '14px arial').width;
  this.addStyle('width', Math.max(50, width + 10) + 'px');
  var nBound = this.getBoundingClientRect();
  if (cBound.width !== nBound.width) _ResizeSystem["default"].updateUp(this, true);
};
SBIdentifierInput.property = {};
SBIdentifierInput.property.identifierText = {
  get: function get() {
    var newText = this.value.replace(/[^a-zA-Z0-9$_]/g, '').replace(/^[0-9]+/, '');
    newText = (0, _stringFormat.nonAccentVietnamese)(newText);
    return newText;
  },
  set: function set(value) {
    value = value || '';
    value = value.replace(/[^a-zA-Z0-9$_]/g, '').replace(/^[0-9]+/, '');
    value = (0, _stringFormat.nonAccentVietnamese)(value);
    this.value = value;
    this.autoWidthBy();
  }
};
SBIdentifierInput.eventHandler = {};

/***
 * @this {SBIdentifierInput}
 * @param {KeyboardEvent} event
 */
SBIdentifierInput.eventHandler.keyDown = function (event) {
  var _this = this;
  if (event.key === ' ') {
    event.preventDefault();
    return;
  }
  if (event.key.length === 1 && !event.altKey && !event.ctrlKey) {
    this.autoWidthBy(this.value + event.key);
  }
  setTimeout(function () {
    return _this.autoWidthBy(_this.value);
  }, 10);
};
SBIdentifierInput.eventHandler.change = function (event) {
  var newText = this.identifierText;
  if (this.value !== newText) this.value = newText;
  this.autoWidthBy();
  this.emit('change', event);
};
var _default = SBIdentifierInput;
exports["default"] = _default;
function openIdentifierInputDialog(targetElt, initValue) {
  initValue = initValue || '';
  var inputElt = (0, _FCore._)({
    tag: SBIdentifierInput,
    props: {
      value: initValue
    }
  });
  var followerElt = (0, _FCore._)({
    tag: _Follower["default"],
    "class": ['sb-identifier-input-dialog', 'as-dropdown-box-common-style'],
    props: {
      followTarget: targetElt
    },
    child: [inputElt]
  });
  document.body.appendChild(followerElt);
  followerElt.updatePosition();
  inputElt.autoWidthBy();
  return new Promise(function (rs) {
    inputElt.focus();
    var resolved = false;
    inputElt.on('change', function () {
      if (resolved) return;
      resolved = true;
      followerElt.remove();
      rs(inputElt.identifierText);
    }).on('keydown', function (event) {
      if (resolved) return;
      if (event.key === 'Enter') {
        resolved = true;
        followerElt.remove();
        rs(inputElt.identifierText);
        event.preventDefault();
      } else if (event.key === 'Escape') {
        resolved = true;
        followerElt.remove();
        rs(initValue);
      }
    });
  });
}

/***/ }),

/***/ 71083:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends {AElement}
 * @constructor
 */
function SBStringInput() {
  var _this = this;
  this.$content = (0, _FCore.$)('.sb-string-input-content', this).on('keydown', function () {
    setTimeout(_this._updateSize.bind(_this), 0);
    setTimeout(_this._updateSize.bind(_this), 100);
  });
  this.$content.on('change', function (event) {
    return _this.emit('change', event, _this);
  });
  /***
   * @type {string}
   * @name value
   * @memberOf SBStringInput#
   */
}

SBStringInput.tag = 'SBStringInput';
SBStringInput.render = function () {
  return (0, _FCore._)({
    extendEvent: ['updatesize', 'change'],
    "class": 'sb-string-input',
    child: {
      tag: 'preinput',
      "class": 'sb-string-input-content'
    }
  });
};
SBStringInput.prototype._updateSize = function () {
  var bound = this.$content.getBoundingClientRect();
  var temp, tempCt;
  if (bound.width === 0) {
    tempCt = (0, _FCore._)({
      tag: 'pre',
      "class": ['as-preinput', 'sb-string-input-content'],
      style: {
        position: 'static'
      },
      child: [{
        text: this.value
      }, 'br']
    });
    temp = (0, _FCore._)({
      "class": 'sb-string-input',
      style: {
        position: 'fixed',
        top: 0,
        left: 0,
        visibility: 'hidden',
        opacity: 0,
        overflow: 'visibility',
        zIndex: 100000,
        background: 'red'
      },
      child: tempCt
    }).addTo(document.body);
    bound = tempCt.getBoundingClientRect();
    temp.remove();
  }
  this.addStyle({
    width: bound.width + 'px',
    height: bound.height + 'px'
  });
  this.emit('updatesize', {
    type: 'updatesize'
  });
};
SBStringInput.property = {};
SBStringInput.property.value = {
  set: function set(value) {
    this.$content.value = value;
    this._updateSize();
  },
  get: function get() {
    return this.$content.value;
  }
};
_FCore["default"].install(SBStringInput);
var _default = SBStringInput;
exports["default"] = _default;

/***/ }),

/***/ 33360:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
/***
 * @extends AElement
 * @constructor
 */
function SBTokenSelection() {
  this.$text = (0, _FCore.$)('.sb-token-text', this);
  this._text = '';
  this._displayText = '';
}
SBTokenSelection.tag = 'SBTokenSelection'.toLowerCase();
SBTokenSelection.render = function () {
  return (0, _FCore._)({
    "class": 'sb-token-selection',
    extendEvent: 'contextmenu',
    child: [{
      tag: 'span',
      "class": 'sb-token-text',
      child: {
        text: ''
      }
    }],
    on: {
      contextmenu: function contextmenu(event) {
        event.stopPropagation();
      }
    }
  });
};
SBTokenSelection.property = {};
SBTokenSelection.property.text = {
  get: function get() {
    return this._text;
  },
  set: function set(text) {
    this._text = text || '';
    this.$text.firstChild.data = this._displayText || this._text;
    if (this._displayText !== this._text && this._displayText && this._text) {
      this.attr('title', this._text);
    } else {
      this.attr('title', null);
    }
  }
};
SBTokenSelection.property.displayText = {
  get: function get() {
    return this._displayText;
  },
  set: function set(value) {
    this._displayText = value || '';
    this.$text.firstChild.data = this._displayText || this._text;
    if (this._displayText !== this._text && this._displayText && this._text) {
      this.attr('title', this._text);
    } else {
      this.attr('title', null);
    }
  }
};
var _default = SBTokenSelection;
exports["default"] = _default;

/***/ }),

/***/ 11997:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.openExpressionInputDialog = openExpressionInputDialog;
exports.openStatementInputDialog = openStatementInputDialog;
exports.type2text = type2text;
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _FCore = __webpack_require__(51518);
var _PreInput = _interopRequireDefault(__webpack_require__(76606));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _keyboard = __webpack_require__(95141);
var _SCParser = _interopRequireDefault(__webpack_require__(11547));
var _EventEmitter = __webpack_require__(46833);
var _SCCodeGenerator = __webpack_require__(31647);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function openExpressionInputDialog(targetElt, initValue, astVerifyFunc) {
  return new Promise(function (resolve) {
    initValue = initValue || '';
    var timeout = -1;
    var currentAst = null;
    /***
     * @type {PreInput}
     */
    var input = (0, _FCore._)({
      tag: _PreInput["default"].tag,
      on: {
        keydown: function keydown(event) {
          if ((0, _keyboard.keyboardEventToKeyBindingIdent)(event) === 'enter') {
            submit();
          }
        },
        keyup: function keyup() {
          okBtn.disabled = true;
          clearTimeout(timeout);
          timeout = setTimeout(verify, 500);
        }
      },
      props: {
        value: initValue
      }
    });
    var okBtn = (0, _FCore._)({
      tag: _FlexiconButton["default"].tag,
      props: {
        icon: 'span.mdi.mdi-check-outline'
      }
    });
    var cancelBtn = (0, _FCore._)({
      tag: _FlexiconButton["default"].tag,
      props: {
        icon: 'span.mdi.mdi-close-outline'
      }
    });
    var dialog = (0, _FCore._)({
      "class": ['sc-expression-input-dialog', 'as-dropdown-box-common-style'],
      child: [input, okBtn, cancelBtn]
    });
    var verify = function verify() {
      var ok;
      var result = _SCParser["default"].parse(input.value, 'exp');
      if (!result.error && result.ast) {
        if (astVerifyFunc) ok = astVerifyFunc(result.ast);else ok = true;
      } else {
        ok = false;
      }
      if (ok) {
        okBtn.disabled = false;
        currentAst = result.ast;
      } else {
        okBtn.disabled = true;
      }
      return ok;
    };
    var followerElt = (0, _FCore._)({
      tag: _Follower["default"].tag,
      child: dialog
    });
    followerElt.addTo(document.body);
    followerElt.followTarget = targetElt;
    setTimeout(function () {
      input.focus();
      input.select({
        start: 0,
        end: initValue.length
      });
    }, 100);
    var clickOut = function clickOut(event) {
      if ((0, _EventEmitter.hitElement)(dialog, event)) return;
      cancel();
    };
    setTimeout(function () {
      document.addEventListener('click', clickOut);
    }, 100);
    var finish = function finish() {
      followerElt.followTarget = null;
      followerElt.remove();
      document.removeEventListener('click', clickOut);
    };
    var submit = function submit() {
      if (!verify()) return;
      finish();
      resolve(currentAst);
    };
    var cancel = function cancel() {
      finish();
      resolve(null);
    };
    okBtn.on('click', function () {
      submit();
    });
    cancelBtn.on('click', cancel);
  });
}
function openStatementInputDialog(targetElt, initValue, astVerifyFunc) {
  return new Promise(function (resolve) {
    var timeout = -1;
    var currentAst = null;
    /***
     * @type {PreInput}
     */
    var input = (0, _FCore._)({
      tag: _PreInput["default"].tag,
      on: {
        keydown: function keydown(event) {
          if ((0, _keyboard.keyboardEventToKeyBindingIdent)(event) === 'enter') {
            submit();
          }
        },
        keyup: function keyup() {
          okBtn.disabled = true;
          clearTimeout(timeout);
          timeout = setTimeout(verify, 500);
        }
      }
    });
    var okBtn = (0, _FCore._)({
      tag: _FlexiconButton["default"].tag,
      props: {
        icon: 'span.mdi.mdi-check-outline'
      }
    });
    var cancelBtn = (0, _FCore._)({
      tag: _FlexiconButton["default"].tag,
      props: {
        icon: 'span.mdi.mdi-close-outline'
      }
    });
    var dialog = (0, _FCore._)({
      "class": ['sc-statement-input-dialog', 'as-dropdown-box-common-style'],
      child: [input, okBtn, cancelBtn]
    });
    var verify = function verify() {
      var ok;
      var value = input.value.trim();
      var result = _SCParser["default"].parse(value, 'statement');
      if (result.error && !value.endsWith(';')) {
        result = _SCParser["default"].parse(value + ';', 'statement');
      }
      if (!result.error && result.ast) {
        if (astVerifyFunc) ok = astVerifyFunc(result.ast);else ok = true;
      } else {
        ok = false;
      }
      if (ok) {
        okBtn.disabled = false;
        currentAst = result.ast;
      } else {
        okBtn.disabled = true;
      }
      return ok;
    };
    var followerElt = (0, _FCore._)({
      tag: _Follower["default"].tag,
      child: dialog
    });
    followerElt.addTo(document.body);
    followerElt.followTarget = targetElt;
    setTimeout(function () {
      input.focus();
    }, 100);
    var clickOut = function clickOut(event) {
      if ((0, _EventEmitter.hitElement)(dialog, event)) return;
      cancel();
    };
    setTimeout(function () {
      document.addEventListener('click', clickOut);
    }, 100);
    var finish = function finish() {
      followerElt.followTarget = null;
      followerElt.remove();
      document.removeEventListener('click', clickOut);
    };
    var submit = function submit() {
      if (!verify()) return;
      finish();
      resolve(currentAst);
    };
    var cancel = function cancel() {
      finish();
      resolve(null);
    };
    okBtn.on('click', function () {
      submit();
    });
    cancelBtn.on('click', cancel);
  });
}
function type2text(ast) {
  return (0, _SCCodeGenerator.generateSCCode)(ast).replace('linktype', '').trim();
}

/***/ }),

/***/ 49425:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var _SCProgramInstance = __webpack_require__(47790);
if ('ace' in window) {
  ace.define('ace/mode/sclang', ['require', 'exports', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/custom_highlight_rules'], function (acequire, exports) {
    var oop = acequire('ace/lib/oop');
    var TextMode = acequire('ace/mode/text').Mode;
    var SCLangHighlightRules = acequire('ace/mode/sclang_highlight_rules').SCLangHighlightRules;
    var Mode = function Mode() {
      // this ensures that all your highlight rules are set for your custom mode
      this.HighlightRules = SCLangHighlightRules;
    };
    oop.inherits(Mode, TextMode); // ACE's way of doing inheritance

    exports.Mode = Mode; // eslint-disable-line no-param-reassign
  });

  // This is where we really create the highlighting rules
  ace.define('ace/mode/sclang_highlight_rules', ['require', 'exports', 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function (acequire, exports) {
    "use strict";

    var oop = acequire('ace/lib/oop');
    var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules;
    var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules;

    // TODO: Unicode escape sequences
    var identifierRe = "[a-zA-Z\\$_\xA1-\uFFFF][a-zA-Z\\d\\$_\xA1-\uFFFF]*";
    var SCLangHighlightRules = function SCLangHighlightRules(options) {
      // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
      console.log(_SCProgramInstance.SCStaticLibScope);
      var keywordMapper = this.createKeywordMapper({
        "variable.language": Object.keys(_SCProgramInstance.SCStaticLibScope.data).concat(Object.keys(_SCProgramInstance.SCDynamicLibScope)).join('|'),
        // Pseudo
        "keyword": "const|yield|import|get|set|async|await|" + "break|case|catch|continue|default|delete|do|else|finally|linktype|for|from|to|function|" + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
        // invalid or reserved
        "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
        "storage.type": "const|let|var|function",
        "constant.language": "null|Infinity|NaN|undefined",
        "support.function": "alert",
        "constant.language.boolean": "true|false"
      }, "identifier");

      // keywords which can be followed by regular expressions
      var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
      var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" +
      // hex
      "u[0-9a-fA-F]{4}|" +
      // unicode
      "u{[0-9a-fA-F]{1,6}}|" +
      // es6 unicode
      "[0-2][0-7]{0,2}|" +
      // oct
      "3[0-7][0-7]?|" +
      // oct
      "[4-7][0-7]?|" +
      //oct
      ".)";
      // regexp must not have capturing parentheses. Use (?:) instead.
      // regexps are ordered -> the first match is used

      this.$rules = {
        "no_regex": [DocCommentHighlightRules.getStartRule("doc-start"), comments("no_regex"), {
          token: "string",
          regex: "'(?=.)",
          next: "qstring"
        }, {
          token: "string",
          regex: '"(?=.)',
          next: "qqstring"
        }, {
          token: "constant.numeric",
          // hexadecimal, octal and binary
          regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
        }, {
          token: "constant.numeric",
          // decimal integers and floats
          regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
        }, {
          // Sound.prototype.play =
          token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"],
          regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
          next: "function_arguments"
        }, {
          // Sound.play = function() {  }
          token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"],
          regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
          next: "function_arguments"
        }, {
          // play = function() {  }
          token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"],
          regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
          next: "function_arguments"
        }, {
          // Sound.play = function play() {  }
          token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"],
          regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",
          next: "function_arguments"
        }, {
          // function myFunc(arg) { }
          token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"],
          regex: "(function\\*?)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
          next: "function_arguments"
        }, {
          // foobar: function() { }
          token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"],
          regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",
          next: "function_arguments"
        }, {
          // : function() { } (this is for issues with 'foo': function() { })
          token: ["text", "text", "storage.type", "text", "paren.lparen"],
          regex: "(:)(\\s*)(function\\*?)(\\s*)(\\()",
          next: "function_arguments"
        }, {
          // from "module-path" (this is the only case where 'from' should be a keyword)
          token: "keyword",
          regex: "from(?=\\s*('|\"))"
        }, {
          token: "keyword",
          regex: "(?:" + kwBeforeRe + ")\\b",
          next: "start"
        }, {
          token: "support.constant",
          regex: /that\b/
        }, {
          token: ["storage.type", "punctuation.operator", "support.function.firebug"],
          regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
        }, {
          token: keywordMapper,
          regex: identifierRe
        }, {
          token: "punctuation.operator",
          regex: /[.](?![.])/,
          next: "property"
        }, {
          token: "storage.type",
          regex: /=>/,
          next: "start"
        }, {
          token: "keyword.operator",
          regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
          next: "start"
        }, {
          token: "punctuation.operator",
          regex: /[?:,;.]/,
          next: "start"
        }, {
          token: "paren.lparen",
          regex: /[\[({]/,
          next: "start"
        }, {
          token: "paren.rparen",
          regex: /[\])}]/
        }, {
          token: "comment",
          regex: /^#!.*$/
        }],
        property: [{
          token: "text",
          regex: "\\s+"
        }, {
          // Sound.play = function play() {  }
          token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"],
          regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",
          next: "function_arguments"
        }, {
          token: "punctuation.operator",
          regex: /[.](?![.])/
        }, {
          token: "support.function",
          regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
        }, {
          token: "support.function.dom",
          regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
        }, {
          token: "support.constant",
          regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
        }, {
          token: "identifier",
          regex: identifierRe
        }, {
          regex: "",
          token: "empty",
          next: "no_regex"
        }],
        // regular expressions are only allowed after certain tokens. This
        // makes sure we don't mix up regexps with the divison operator
        "start": [DocCommentHighlightRules.getStartRule("doc-start"), comments("start"), {
          token: "string.regexp",
          regex: "\\/",
          next: "regex"
        }, {
          token: "text",
          regex: "\\s+|^$",
          next: "start"
        }, {
          // immediately return to the start mode without matching
          // anything
          token: "empty",
          regex: "",
          next: "no_regex"
        }],
        "regex": [{
          // escapes
          token: "regexp.keyword.operator",
          regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
        }, {
          // flag
          token: "string.regexp",
          regex: "/[sxngimy]*",
          next: "no_regex"
        }, {
          // invalid operators
          token: "invalid",
          regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
        }, {
          // operators
          token: "constant.language.escape",
          regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
        }, {
          token: "constant.language.delimiter",
          regex: /\|/
        }, {
          token: "constant.language.escape",
          regex: /\[\^?/,
          next: "regex_character_class"
        }, {
          token: "empty",
          regex: "$",
          next: "no_regex"
        }, {
          defaultToken: "string.regexp"
        }],
        "regex_character_class": [{
          token: "regexp.charclass.keyword.operator",
          regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
        }, {
          token: "constant.language.escape",
          regex: "]",
          next: "regex"
        }, {
          token: "constant.language.escape",
          regex: "-"
        }, {
          token: "empty",
          regex: "$",
          next: "no_regex"
        }, {
          defaultToken: "string.regexp.charachterclass"
        }],
        "default_parameter": [{
          token: "string",
          regex: "'(?=.)",
          push: [{
            token: "string",
            regex: "'|$",
            next: "pop"
          }, {
            include: "qstring"
          }]
        }, {
          token: "string",
          regex: '"(?=.)',
          push: [{
            token: "string",
            regex: '"|$',
            next: "pop"
          }, {
            include: "qqstring"
          }]
        }, {
          token: "constant.language",
          regex: "null|Infinity|NaN|undefined"
        }, {
          token: "constant.numeric",
          // hexadecimal, octal and binary
          regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
        }, {
          token: "constant.numeric",
          // decimal integers and floats
          regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
        }, {
          token: "punctuation.operator",
          regex: ",",
          next: "function_arguments"
        }, {
          token: "text",
          regex: "\\s+"
        }, {
          token: "punctuation.operator",
          regex: "$"
        }, {
          token: "empty",
          regex: "",
          next: "no_regex"
        }],
        "function_arguments": [comments("function_arguments"), {
          token: "variable.parameter",
          regex: identifierRe
        }, {
          token: "punctuation.operator",
          regex: ","
        }, {
          token: "text",
          regex: "\\s+"
        }, {
          token: "punctuation.operator",
          regex: "$"
        }, {
          token: "empty",
          regex: "",
          next: "no_regex"
        }],
        "qqstring": [{
          token: "constant.language.escape",
          regex: escapedRe
        }, {
          token: "string",
          regex: "\\\\$",
          consumeLineEnd: true
        }, {
          token: "string",
          regex: '"|$',
          next: "no_regex"
        }, {
          defaultToken: "string"
        }],
        "qstring": [{
          token: "constant.language.escape",
          regex: escapedRe
        }, {
          token: "string",
          regex: "\\\\$",
          consumeLineEnd: true
        }, {
          token: "string",
          regex: "'|$",
          next: "no_regex"
        }, {
          defaultToken: "string"
        }]
      };
      if (!options || !options.noES6) {
        this.$rules.no_regex.unshift({
          regex: "[{}]",
          onMatch: function onMatch(val, state, stack) {
            this.next = val == "{" ? this.nextState : "";
            if (val == "{" && stack.length) {
              stack.unshift("start", state);
            } else if (val == "}" && stack.length) {
              stack.shift();
              this.next = stack.shift();
              if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) return "paren.quasi.end";
            }
            return val == "{" ? "paren.lparen" : "paren.rparen";
          },
          nextState: "start"
        }, {
          token: "string.quasi.start",
          regex: /`/,
          push: [{
            token: "constant.language.escape",
            regex: escapedRe
          }, {
            token: "paren.quasi.start",
            regex: /\${/,
            push: "start"
          }, {
            token: "string.quasi.end",
            regex: /`/,
            next: "pop"
          }, {
            defaultToken: "string.quasi"
          }]
        }, {
          token: ["variable.parameter", "text"],
          regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
        }, {
          token: "paren.lparen",
          regex: "(\\()(?=.+\\s*=>)",
          next: "function_arguments"
        }, {
          token: "variable.language",
          regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
        });
        this.$rules["function_arguments"].unshift({
          token: "keyword.operator",
          regex: "=",
          next: "default_parameter"
        }, {
          token: "keyword.operator",
          regex: "\\.{3}"
        });
        this.$rules["property"].unshift({
          token: "support.function",
          regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|" + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
        }, {
          token: "constant.language",
          regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
        });
        if (!options || options.jsx != false) JSX.call(this);
      }
      this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]);
      this.normalizeRules();
    };
    oop.inherits(SCLangHighlightRules, TextHighlightRules);
    function JSX() {
      var tagRegex = identifierRe.replace("\\d", "\\d\\-");
      var jsxTag = {
        onMatch: function onMatch(val, state, stack) {
          var offset = val.charAt(1) == "/" ? 2 : 1;
          if (offset == 1) {
            if (state != this.nextState) stack.unshift(this.next, this.nextState, 0);else stack.unshift(this.next);
            stack[2]++;
          } else if (offset == 2) {
            if (state == this.nextState) {
              stack[1]--;
              if (!stack[1] || stack[1] < 0) {
                stack.shift();
                stack.shift();
              }
            }
          }
          return [{
            type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
            value: val.slice(0, offset)
          }, {
            type: "meta.tag.tag-name.xml",
            value: val.substr(offset)
          }];
        },
        regex: "</?" + tagRegex + "",
        next: "jsxAttributes",
        nextState: "jsx"
      };
      this.$rules.start.unshift(jsxTag);
      var jsxJsRule = {
        regex: "{",
        token: "paren.quasi.start",
        push: "start"
      };
      this.$rules.jsx = [jsxJsRule, jsxTag, {
        include: "reference"
      }, {
        defaultToken: "string"
      }];
      this.$rules.jsxAttributes = [{
        token: "meta.tag.punctuation.tag-close.xml",
        regex: "/?>",
        onMatch: function onMatch(value, currentState, stack) {
          if (currentState == stack[0]) stack.shift();
          if (value.length == 2) {
            if (stack[0] == this.nextState) stack[1]--;
            if (!stack[1] || stack[1] < 0) {
              stack.splice(0, 2);
            }
          }
          this.next = stack[0] || "start";
          return [{
            type: this.token,
            value: value
          }];
        },
        nextState: "jsx"
      }, jsxJsRule, comments("jsxAttributes"), {
        token: "entity.other.attribute-name.xml",
        regex: tagRegex
      }, {
        token: "keyword.operator.attribute-equals.xml",
        regex: "="
      }, {
        token: "text.tag-whitespace.xml",
        regex: "\\s+"
      }, {
        token: "string.attribute-value.xml",
        regex: "'",
        stateName: "jsx_attr_q",
        push: [{
          token: "string.attribute-value.xml",
          regex: "'",
          next: "pop"
        }, {
          include: "reference"
        }, {
          defaultToken: "string.attribute-value.xml"
        }]
      }, {
        token: "string.attribute-value.xml",
        regex: '"',
        stateName: "jsx_attr_qq",
        push: [{
          token: "string.attribute-value.xml",
          regex: '"',
          next: "pop"
        }, {
          include: "reference"
        }, {
          defaultToken: "string.attribute-value.xml"
        }]
      }, jsxTag];
      this.$rules.reference = [{
        token: "constant.language.escape.reference.xml",
        regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
      }];
    }
    function comments(next) {
      return [{
        token: "comment",
        // multi line comment
        regex: /\/\*/,
        next: [DocCommentHighlightRules.getTagRule(), {
          token: "comment",
          regex: "\\*\\/",
          next: next || "pop"
        }, {
          defaultToken: "comment",
          caseInsensitive: true
        }]
      }, {
        token: "comment",
        regex: "\\/\\/",
        next: [DocCommentHighlightRules.getTagRule(), {
          token: "comment",
          regex: "$|^",
          next: next || "pop"
        }, {
          defaultToken: "comment",
          caseInsensitive: true
        }]
      }];
    }
    exports.SCLangHighlightRules = SCLangHighlightRules;
  });
}

/***/ }),

/***/ 91835:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
__webpack_require__(37892);
__webpack_require__(40594);
__webpack_require__(98937);
__webpack_require__(12663);
__webpack_require__(58661);
__webpack_require__(29034);
__webpack_require__(561);
__webpack_require__(59014);
__webpack_require__(99541);
__webpack_require__(28226);
var _SBForCountStatement = _interopRequireDefault(__webpack_require__(9650));
__webpack_require__(46086);
__webpack_require__(96636);
__webpack_require__(39425);
__webpack_require__(67562);
__webpack_require__(58035);
__webpack_require__(75278);
__webpack_require__(35103);
__webpack_require__(63182);
__webpack_require__(47412);
__webpack_require__(41502);
__webpack_require__(15045);
__webpack_require__(66675);
__webpack_require__(49425);
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _utils = __webpack_require__(84512);
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _SCBlocklyEditorCmd = _interopRequireDefault(__webpack_require__(67673));
var _SCBESelectTool = _interopRequireDefault(__webpack_require__(33242));
var _CMDTool = _interopRequireDefault(__webpack_require__(8982));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
var _SCTypeSelectionDialog = _interopRequireDefault(__webpack_require__(14425));
var _generator = __webpack_require__(18528);
var _SCTypeManager = _interopRequireDefault(__webpack_require__(6360));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _ExpTree = __webpack_require__(87326);
var _EventEmitter = __webpack_require__(46833);
var _SCBEViewportController = _interopRequireDefault(__webpack_require__(25211));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _SCBEClipboard = _interopRequireDefault(__webpack_require__(22430));
var _Scroller = __webpack_require__(87780);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BaseEditor
 * @constructor
 * @augments {{}=} opt
 */
function SCBlocklyEditor(opt) {
  opt = opt || {};
  _BaseEditor["default"].call(this);
  this.clipboard = new _SCBEClipboard["default"](this);
  this.cmdRunner.assign(_SCBlocklyEditorCmd["default"]);
  this.rootNode = null;
  this.style = Object.assign(new _Attributes["default"](this), opt.style);
  this.opt = opt;
  this.selectTool = new _SCBESelectTool["default"](this);
  this.cmdTool = new _CMDTool["default"]();
  this.cmdTool.bindWithEditor(this);
  this.viewportCtrl = new _SCBEViewportController["default"](this);
  this.typeMng = _SCTypeManager["default"];
  this.typeSelectionDialog = new _SCTypeSelectionDialog["default"](this);
}
_OOP["default"].mixClass(SCBlocklyEditor, _BaseEditor["default"]);
SCBlocklyEditor.prototype.createView = function () {
  var _this = this;
  this.$view = (0, _FCore._)({
    attr: {
      tabindex: '1'
    },
    "class": 'sb-blockly-editor',
    child: [{
      "class": 'sb-blockly-editor-header',
      child: this.cmdTool.getView()
    }, {
      tag: _Hanger["default"],
      "class": 'sb-blockly-editor-body',
      child: [{
        "class": 'sb-blockly-editor-content'
      }, {
        tag: _Scroller.VScrollbar,
        "class": 'sb-blockly-editor-v-scrollbar'
      }, {
        tag: _Scroller.HScrollbar,
        "class": 'sb-blockly-editor-h-scrollbar'
      }]
    }],
    props: {
      sbEditor: this
    }
  });
  if (this.opt.readOnly) this.$view.addStyle('pointer-events', 'none');
  this.$body = (0, _FCore.$)('.sb-blockly-editor-body', this.$view);
  this.$content = (0, _FCore.$)('.sb-blockly-editor-content', this.$view);
  this.$vscrollbar = (0, _FCore.$)('.sb-blockly-editor-v-scrollbar', this.$view);
  this.$hscrollbar = (0, _FCore.$)('.sb-blockly-editor-h-scrollbar', this.$view);
  this.$attachhook = (0, _FCore._)('attachhook').addTo(this.$view);
  this.$attachhook.requestUpdateSize = function () {
    _this.viewportCtrl.updateSize();
    if (_this.rootNode) _this.rootNode.notifySizeChange();
  };
  this.$attachhook.on('attached', function () {
    this.requestUpdateSize();
    _ResizeSystem["default"].add(this);
  });
  var style = this.style;
  this.style.loadAttributeHandlers(this.styleHandlers);
  Object.assign(this.style, style);
  this.selectTool.onCreateView();
  this.viewportCtrl.onCreateView();
  // this.
};

SCBlocklyEditor.prototype.setAST = function (ast) {
  if (!ast) return;
  if (ast.type !== 'FunctionDeclaration') {
    throw new Error("SCBlocklyEditor only support FunctionDeclaration!");
  }
  this.rootNode = null;
  var clazz = ast ? _SBClassManager["default"].get(ast) : null;
  if (clazz) {
    this.rootNode = new clazz();
  }
  if (this.$content) {
    this.$content.clearChild();
    if (this.rootNode) {
      this.$content.addChild(this.rootNode.elt);
      this.rootNode.ast = ast;
      this.rootNode.notifySizeChange();
    }
  }
};
SCBlocklyEditor.prototype.getAST = function () {
  return JSON.parse(JSON.stringify(this.rootNode.ast));
};
SCBlocklyEditor.prototype.notifyASTChange = function () {
  this.selectTool.deselectHiddenBlock();
  this.emit('ast_change');
};
SCBlocklyEditor.prototype.addTypeDescriptors = function (descriptors) {
  this.typeMng.addTypeDescriptors(descriptors);
};
SCBlocklyEditor.prototype.getTypeDescriptor = function (typeId) {
  return this.typeMng.getTypeDescriptor(typeId);
};
SCBlocklyEditor.prototype.getCmdGroupTree = function () {
  return [['save'], ['importFromFile', 'export2Json', 'editAsSCLang'], ['moveUp', 'moveDown', 'delete'], ['copy', 'cut', 'viewClipboard', 'pasteSCBlock'], ['scrollIntoBlock']];
};
SCBlocklyEditor.prototype.getCmdDescriptor = function (name) {
  var descriptor = _CmdDescriptors["default"][name];
  var ast, block;
  var res = Object.assign({
    type: 'trigger',
    desc: 'command: ' + name,
    icon: 'span.mdi.mdi-apple-keyboard-command'
  }, descriptor);
  var selectedBlocks = this.selectTool.selectedBlocks;
  if (name === 'delete' || name === 'copy') {
    if (selectedBlocks.length === 0) res.disabled = true;
  } else if (name === 'moveUp') {
    if (selectedBlocks.length !== 1) res.disabled = true;else if (!selectedBlocks[0].canMove('up')) res.disabled = true;
  } else if (name === 'moveDown') {
    if (selectedBlocks.length !== 1) res.disabled = true;else if (!selectedBlocks[0].canMove('down')) res.disabled = true;
  } else if (name === 'pasteSCBlock') {
    ast = this.clipboard.getAst();
    block = this.selectTool.selectedBlocks[this.selectTool.selectedBlocks.length - 1] || this.rootNode;
    res.items = [];
    if (this.clipboard && ast && block) {
      if (block.canAddChildBefore(ast, null)) {
        res.items.push({
          text: 'Paste In',
          icon: 'span.mdi.mdi-content-paste',
          args: ['IN']
        });
      }
      if (block.parent) {
        if (block.parent.canAddChildBefore(ast, block)) {
          res.items.push({
            text: 'Paste Before',
            icon: 'span.mdi.mdi-content-paste',
            args: ['BEFORE']
          });
        }
        if (block.parent.canAddChildAfter(ast, block)) {
          res.items.push({
            text: 'Paste After',
            icon: 'span.mdi.mdi-content-paste',
            args: ['AFTER']
          });
        }
      }
    }
    // console.log(res.items)
    if (res.items.length === 0) res.disabled = true;
  }
  return res;
};
SCBlocklyEditor.prototype.styleHandlers = {};
SCBlocklyEditor.prototype.styleHandlers.height = {
  set: function set(value) {
    if (value === 'auto-grow') {
      this.$view.removeStyle('height');
      this.$view.addClass('as-grow-height');
    } else if (typeof value === "string") {
      this.$view.addStyle('height', value);
    } else if ((0, _utils.isRealNumber)(value)) {
      this.$view.addStyle('height', value + 'px');
    } else {
      this.$view.removeStyle('height');
      this.$view.addClass('sb-grow-height');
    }
    return value;
  }
};
SCBlocklyEditor.prototype.openFunctionPickerDialog = function () {
  var _this2 = this;
  return new Promise(function (rs) {
    var finish = function finish(fullPath) {
      modal.remove();
      var value = null;
      if (fullPath) {
        value = fullPath.reduce(function (ac, cr) {
          if (ac) {
            return {
              type: 'MemberExpression',
              object: ac,
              property: {
                type: 'Identifier',
                name: cr.name
              },
              computed: false
            };
          } else {
            return {
              type: 'Identifier',
              name: cr.name
            };
          }
        }, null);
      }
      rs(value);
    };
    /***
     *
     * @type {BlocklyDataModel}
     */
    var dataModel = _this2.getContext(_R["default"].DATA_MODEL);
    var treeCtn = (0, _FCore._)({
      style: {
        maxHeight: 'calc(80vh - 200px)',
        overflow: 'auto'
      }
    });
    var activeTree = null;
    var selectedFullPath = null;
    dataModel.getPackageTreeList().then(function (list) {
      var visit = function visit(path, pElt, nodeInfo) {
        var icon;
        if (nodeInfo.type === 0) {
          icon = 'span.mdi.mdi-package-variant';
        } else if (nodeInfo.type + '' === '129') {
          icon = 'span.mdi.mdi-function-variant';
        }
        var nodeElt = (0, _FCore._)({
          tag: _ExpTree.ExpTree.tag,
          props: {
            name: nodeInfo.name,
            icon: icon
          }
        });
        if (nodeInfo.type + '' === '129') {
          nodeElt.on('press', function () {
            if (activeTree) activeTree.active = false;
            activeTree = nodeElt;
            activeTree.active = true;
            selectedFullPath = path.concat([nodeInfo]);
            dialog.$actionBtns[0].disabled = false;
          });
          nodeElt.getNode().on('dblclick', function () {
            if (activeTree) activeTree.active = false;
            activeTree = nodeElt;
            activeTree.active = true;
            finish(path.concat([nodeInfo]));
          });
        } else if (nodeInfo.type === 0) {
          nodeElt.getNode().on('click', function (event) {
            if (!(0, _EventEmitter.hitElement)(nodeElt.getNode().$toggleIcon, event)) {
              if (nodeElt.status === 'close') {
                nodeElt.status = 'open';
              } else if (nodeElt.status === 'open') {
                nodeElt.status = 'close';
              }
            }
          });
        }
        pElt.addChild(nodeElt);
        if (nodeInfo.children && nodeInfo.children.length > 0) {
          nodeElt.status = 'close';
          nodeInfo.children.forEach(function (it) {
            return visit(path.concat([nodeInfo]), nodeElt, it);
          });
        }
      };
      list.forEach(function (it) {
        return visit([], treeCtn, it);
      });
    });

    // console.log(this.typeMng.globalDescriptors)

    var dialog = (0, _FCore._)({
      tag: _MessageDialog["default"].tag,
      child: [treeCtn],
      props: {
        dialogTitle: 'Choose Function',
        dialogActions: [{
          text: 'OK',
          name: 'ok'
        }, {
          text: 'Cancel',
          name: 'cancel'
        }]
      },
      on: {
        action: function action(event) {
          if (event.action.name === 'cancel') finish(null);else finish(selectedFullPath);
        }
      }
    });
    dialog.$actionBtns[0].disabled = true;
    var modal = (0, _FCore._)({
      tag: _Modal["default"].tag,
      child: [dialog]
    }).addTo(document.body);
  });
};
SCBlocklyEditor.prototype.getContextMenuPropsOfBlock = function (block) {
  var _this3 = this;
  var items = [];
  ['moveUp', 'moveDown', 'delete'].forEach(function (cmd) {
    var desc = _this3.getCmdDescriptor(cmd);
    if (!desc.disabled) {
      items.push({
        text: desc.desc,
        icon: desc.icon,
        cmd: cmd
      });
    }
  });
  return {
    items: items
  };
};
SCBlocklyEditor.prototype.onContextMenuOfBlock = function (block, action) {
  if (['moveUp', 'moveDown', 'delete'].indexOf(action.cmd) >= 0) {
    this.execCmd(action.cmd);
  }
};
var _default = SCBlocklyEditor;
exports["default"] = _default;

/***/ }),

/***/ 67673:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _FileSaver = __webpack_require__(53069);
var _utils = __webpack_require__(84512);
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _FCore = __webpack_require__(51518);
var _Snackbar = _interopRequireDefault(__webpack_require__(96206));
var _SCCodeGenerator = __webpack_require__(31647);
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _SCParser = _interopRequireDefault(__webpack_require__(13682));
var _stringUtils = __webpack_require__(26243);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var SCBlocklyEditorCmd = {};

/***
 * @this {SCBlocklyEditor}
 */
SCBlocklyEditorCmd["delete"] = function () {
  var blocks = this.selectTool.selectedBlocks.slice();
  this.selectTool.deselectAll();
  blocks.forEach(function (blk) {
    blk.remove();
  });
  if (this.rootNode) this.rootNode.notifySizeChange();
  this.notifyASTChange();
};

/***
 * @this {SCBlocklyEditor}
 */
SCBlocklyEditorCmd.save = function () {
  var task = this.getContext(_R["default"].TASK);
  if (task) task.save();
};

/***
 * @this {SCBlocklyEditor}
 */
SCBlocklyEditorCmd.export2Json = function () {
  var data = this.getAST();
  var json = JSON.stringify(data, null, 4);
  var name = "export.json";
  var task = this.getContext(_R["default"].TASK);
  if (task) name = task.taskName;
  (0, _FileSaver.saveTextAs)(json, name + '.json');
};

/***
 * @this {SCBlocklyEditor}
 */
SCBlocklyEditorCmd.importFromFile = function () {
  var _this = this;
  (0, _utils.openFileDialog)({
    accept: 'application/JSON'
  }).then(function (result) {
    var file;
    if (result && result.length > 0) {
      file = result[0];
      var reader = new FileReader();
      reader.onload = function () {
        try {
          var data = JSON.parse(reader.result.toString());
          //todo: verify data
          _this.setAST(data);
          _this.notifyASTChange();
        } catch (error) {
          (0, _safeThrow["default"])(error);
        }
      };
      reader.readAsText(file);
    }
  });
};

/***
 * @this {SCBlocklyEditor}
 */
SCBlocklyEditorCmd.moveUp = function () {
  var blocks = this.selectTool.selectedBlocks;
  if (blocks.length !== 1) return;
  blocks[0].move('up');
  if (this.rootNode) this.rootNode.notifySizeChange();
  this.notifyASTChange();
  this.notifyCmdDescriptorsChange();
};

/***
 * @this {SCBlocklyEditor}
 */
SCBlocklyEditorCmd.moveDown = function () {
  var blocks = this.selectTool.selectedBlocks;
  if (blocks.length !== 1) return;
  blocks[0].move('down');
  if (this.rootNode) this.rootNode.notifySizeChange();
  this.notifyASTChange();
  this.notifyCmdDescriptorsChange();
};

/***
 * @this {SCBlocklyEditor}
 */
SCBlocklyEditorCmd.copy = function () {
  this.clipboard.copy();
};

/***
 * @this {SCBlocklyEditor}
 */
SCBlocklyEditorCmd.cut = function () {
  this.clipboard.cut();
};

/***
 * @this {SCBlocklyEditor}
 */
SCBlocklyEditorCmd.viewClipboard = function () {
  this.clipboard.viewContent();
};

/***
 * @this {SCBlocklyEditor}
 * @param place
 */
SCBlocklyEditorCmd.pasteSCBlock = function (place) {
  switch (place) {
    case 'IN':
      this.clipboard.pasteIn();
      break;
    case 'BEFORE':
      this.clipboard.pasteBefore();
      break;
    case 'AFTER':
      this.clipboard.pasteAfter();
      break;
  }
  if (this.rootNode) this.rootNode.notifySizeChange();
  this.notifyASTChange();
  this.notifyCmdDescriptorsChange();
};

/***
 * @this {SCBlocklyEditor}
 */
SCBlocklyEditorCmd.scrollIntoBlock = function () {
  this.viewportCtrl.reset();
};

/***
 * @this {SCBlocklyEditor}
 */
SCBlocklyEditorCmd.editAsSCLang = function () {
  var _this2 = this;
  if (!window['ace']) {
    _Snackbar["default"].show("Could not find ACE module!");
  }

  /***
   * @type {MessageDialog}
   */
  var dialog = (0, _FCore._)({
    tag: _MessageDialog["default"].tag,
    "class": 'sb-sc-lang-editor-dialog',
    child: ['.sb-sc-lang-editor-dialog-editor-ctn', {
      "class": 'sb-sc-lang-editor-dialog-error-message'
    }, {
      "class": 'sb-sc-lang-editor-dialog-footer'
    }],
    props: {
      dialogTitle: "SCLang Editor",
      dialogActions: [{
        name: 'ok',
        text: 'OK'
      }, {
        name: 'cancel',
        text: 'CANCEL'
      }]
    },
    on: {
      action: function action(event) {
        console.log(currentAst);
        // return;
        modal.remove();
        clearTimeout(verifyTimeout);
        if (event.action.name === 'ok' && currentAst) {
          _this2.setAST(currentAst);
          _this2.notifyASTChange();
        }
      }
    }
  });
  var errorMessage = (0, _FCore.$)('.sb-sc-lang-editor-dialog-error-message', dialog);
  var okBtn = dialog.$actionBtns[0];
  okBtn.disabled = true;
  var currentAst = null;
  var cache = {};
  var verify = function verify() {
    if (!modal.parentElement) return;
    var code = editor.getValue();
    var id = (0, _stringUtils.stringHashCode)(code);
    var ist = cache[id] || _SCParser["default"].parse(code, 'function_declare');
    cache[id] = ist;
    var rows = code.split('\n');
    var errorText = '';
    var error = ist.error;
    var token, charIdx, rowIdx;
    if (error) {
      ast = null;
      okBtn.disabled = true;
      switch (error.type) {
        case 'unexpected':
          errorText = "<span style=\"color:red\">".concat(error.message, "</span>");
          token = ist.tokens[error.tokenIdx];
          charIdx = token.start;
          rowIdx = 0;
          while (rowIdx < rows.length) {
            if (charIdx <= rows[rowIdx].length) {
              errorText = "<strong>Line ".concat(rowIdx + 1, ":</strong> ") + errorText;
              errorText += '<br>';
              errorText += "<div style=\"color:blue\">".concat(rows[rowIdx], "</div>");
              errorText += "<div style=\" --text-color:red\" class=\"as-blink-text\">".concat(' '.repeat(charIdx), "^</div>");
              break;
            }
            charIdx -= rows[rowIdx].length + 1; //by \n
            rowIdx++;
          }
          break;
        default:
          errorText = "<span style=\"color:red\">".concat(error.message, "</span>");
          break;
      }
    } else {
      okBtn.disabled = false;
      currentAst = ist.ast;
    }
    errorMessage.innerHTML = errorText;
  };
  var editorCt = (0, _FCore.$)('.sb-sc-lang-editor-dialog-editor-ctn', dialog);
  var modal = (0, _FCore._)({
    tag: _Modal["default"].tag,
    child: dialog
  });
  modal.addTo(document.body);
  var editor = ace.edit(editorCt);
  editor.getSession().setMode("ace/mode/sclang");
  editor.setOptions({
    enableBasicAutocompletion: true,
    enableLiveAutocompletion: true,
    behavioursEnabled: true
  });
  var verifyTimeout = -1;
  editor.on("change", function (e) {
    clearTimeout(verifyTimeout);
    verifyTimeout = setTimeout(verify, 400);
  });
  var ast = this.getAST();
  var code = (0, _SCCodeGenerator.generateSCCode)(ast);
  editor.setValue(code, true);
  verify();
};
var _default = SCBlocklyEditorCmd;
exports["default"] = _default;

/***/ }),

/***/ 76539:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FLTask = _interopRequireDefault(__webpack_require__(95778));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _SCBlocklyEditor = _interopRequireDefault(__webpack_require__(91835));
var _SCTypeManager = _interopRequireDefault(__webpack_require__(6360));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends FLTask
 * @constructor
 */
function SCBlocklyTask() {
  _FLTask["default"].apply(this, arguments);
  /***
   * @type {SCBlocklyEditor}
   * @name mainFragment
   * @memberOf SCBlocklyTask#
   */
  this.setContext(_R["default"].TASK, this);
  this.taskName = this.bundle.nodeInfo.name;
}
_OOP["default"].mixClass(SCBlocklyTask, _FLTask["default"]);
SCBlocklyTask.prototype.taksIcon = 'span.mdi.mdi-puzzle-outline';
SCBlocklyTask.prototype.onAttached = function () {
  _FLTask["default"].prototype.onAttached.call(this);
  /***
   * @type {BlocklyDataModel}
   */
  this.dataModel = this.getContext(_R["default"].DATA_MODEL);
  /***
   *
   * @type {EventEmitter}
   */
  this.notificationCenter = this.getContext(_R["default"].NOTIFICATION_CENTER);
};
SCBlocklyTask.prototype.onStart = function () {
  var _this = this;
  _FLTask["default"].prototype.onStart.call(this);
  this.mainFragment.on('ast_change', function () {
    _this.$tab.modified = true;
  });
  var typeSync = this.dataModel.getTypeDescriptors().then(function (result) {
    Object.keys(result).forEach(function (key) {
      if (!('typeId' in result[key])) result[key].typeId = key;
    });
    _SCTypeManager["default"].addTypeDescriptors(result);
  });
  this.dataModel.loadNodeById(this.bundle.nodeInfo.id).then(function (result) {
    var ast = result && result.content && result.content.ast;
    ast = ast || {
      type: "FunctionDeclaration",
      id: {
        type: "Identifier",
        name: _this.bundle.nodeInfo.name
      },
      params: [],
      body: {
        type: "BlockStatement",
        body: []
      }
    };
    typeSync.then(function () {
      _this.mainFragment.setAST(ast);
    });
  });
};
SCBlocklyTask.prototype.MainFragmentClass = _SCBlocklyEditor["default"];
SCBlocklyTask.prototype.computeIdent = function () {
  return 'SCBlocklyTask_' + this.bundle.nodeInfo.id;
};
SCBlocklyTask.prototype.save = function () {
  this.$tab.modified = false;
  var content = {
    content: {
      ast: this.mainFragment.getAST()
    }
  };
  if (this.bundle.nodeInfo.id > 0) {
    this.dataModel.updateNode(this.bundle.nodeInfo.id, content);
  } else {
    this.dataModel.updateSystemNode(this.bundle.nodeInfo.id, content);
  }
};
var _default = SCBlocklyTask;
exports["default"] = _default;

/***/ }),

/***/ 22697:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FExplorer = _interopRequireDefault(__webpack_require__(78377));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _Icons = __webpack_require__(39285);
var _ExpTree = __webpack_require__(87326);
var _generator = __webpack_require__(18528);
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _utils = __webpack_require__(84512);
var _SCBlocklyTask = _interopRequireDefault(__webpack_require__(76539));
__webpack_require__(47515);
var _utils2 = __webpack_require__(19356);
var _SCJavaScriptTask = _interopRequireDefault(__webpack_require__(13237));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends FExplorer
 * @constructor
 */
function SCExplorer() {
  _FExplorer["default"].apply(this, arguments);
  this.attachedPackageIdList = [];
  this.packageInfoById = {};
  this.nodeInfoById = {};
}
_OOP["default"].mixClass(SCExplorer, _FExplorer["default"]);
SCExplorer.prototype.onAttached = function () {
  /**
   *
   * @type {BlocklyDataModel}
   */
  this.dataModel = this.getContext(_R["default"].DATA_MODEL);
  /***
   *
   * @type {SCLauncher}
   */
  this.launcher = this.getContext(_R["default"].LAUNCHER);
};
SCExplorer.prototype.attachPackage = function (id) {
  if (this.attachedPackageIdList.indexOf(id) >= 0) return;
  this.attachedPackageIdList.push(id);
  this.redrawExpTree();
  this.$headerMenuBtn.removeStyle('display');
};
SCExplorer.prototype.detachPackage = function (id) {
  var idx = this.attachedPackageIdList.indexOf(id);
  if (idx < 0) return;
  this.attachedPackageIdList.splice(idx, 1);
  if (this.attachedPackageIdList.length > 0) {
    this.redrawExpTree();
    this.$headerMenuBtn.removeStyle('display');
  } else {
    this.$body.clearChild().addChild(this.startExploringFrg.getView());
    this.$headerMenuBtn.addStyle('display', 'none');
  }
};
SCExplorer.prototype.detachAllPackage = function () {
  this.attachedPackageIdList.splice(0, this.attachedPackageIdList.length);
  this.$body.clearChild().addChild(this.startExploringFrg.getView());
  this.$headerMenuBtn.addStyle('display', 'none');
};
SCExplorer.prototype.getExploreTree = function () {
  var _this = this;
  var cmp = function cmp(a, b) {
    if (a.info.type !== b.info.type) {
      return parseInt(a.info.type) - parseInt(b.info.type);
    }
    if (a.name < b.name) return -1;
    if (a.name > b.name) return 1;
    return 0;
  };
  return this.dataModel.getPackageTreeList().then(function (treeList) {
    return treeList.filter(function (tree) {
      return _this.attachedPackageIdList.indexOf(tree.id) >= 0;
    });
  }).then(function (treeList) {
    treeList = (0, _generator.copyJSVariable)(treeList);
    _this.packageInfoById = {};
    _this.nodeInfoById = {};
    var visit = function visit(parent, node) {
      var res = {
        info: node,
        name: node.name,
        id: node.id,
        parent: parent
      };
      if (node.type === 0) {
        _this.packageInfoById[node.id] = node;
        res.icon = node.id < 0 ? 'span.mdi.mdi-archive-star-outline' : 'span.mdi.mdi-package-variant';
      } else if (node.type + '' === '129') {
        _this.nodeInfoById[node.id] = node;
        res.icon = (0, _FCore._)('span.mdi.mdi-puzzle-outline').addStyle('color', 'rgb(57,116,241)');
      } else if (node.type + '' === '130') {
        _this.nodeInfoById[node.id] = node;
        res.icon = (0, _FCore._)('span.mdi.mdi-nodejs').addStyle('color', 'rgb(192,134,21)');
      }
      if (node.children && node.children.length >= 0) {
        res.children = node.children.map(function (it) {
          return visit(res, it);
        });
        res.children.sort(cmp);
      }
      return res;
    };
    var res = treeList.map(function (it) {
      return visit(null, it);
    });
    res.sort(cmp);
    return res;
  });
};
SCExplorer.prototype.openIdentInputDialog = function (options) {
  options = Object.assign({
    title: 'New Package',
    field: 'Name'
  }, options);
  return new Promise(function (resolve, reject) {
    var nameInput = (0, _FCore._)({
      tag: 'input',
      "class": 'as-text-input',
      attr: {
        type: 'text'
      }
    });
    var errorText = (0, _FCore._)({
      tag: 'span',
      style: {
        color: 'red',
        fontSize: '0.8em'
      },
      child: {
        text: ''
      }
    });
    /***
     * @type {MessageDialog}
     */
    var dialog = (0, _FCore._)({
      tag: _MessageDialog["default"].tag,
      style: {
        fontSize: '14px'
      },
      props: {
        dialogTitle: options.title,
        dialogIcon: 'span.mdi.mdi-package-variant-plus',
        dialogActions: [{
          text: 'OK',
          name: 'ok'
        }, {
          text: 'Cancel',
          name: 'cancel'
        }]
      },
      child: {
        "class": 'as-table-grid',
        style: {
          whiteSpace: 'nowrap'
        },
        child: [{
          "class": 'as-table-grid-row',
          child: [{
            "class": 'as-table-grid-cell',
            child: {
              tag: 'label',
              child: {
                text: options.fieldName || 'Name'
              },
              style: {
                paddingRight: '10px'
              }
            }
          }, {
            "class": 'as-table-grid-cell',
            child: nameInput
          }]
        }, {
          "class": 'as-table-grid-row',
          child: [{
            "class": 'as-table-grid-cell'
          }, {
            "class": 'as-table-grid-cell',
            child: errorText
          }]
        }]
      }
    });
    var okBtn = dialog.$actionBtns[0];
    okBtn.disabled = true;
    var verify = function verify() {
      var name = nameInput.value;
      if (name.match(/^[a-zA-Z_$]([a-zA-Z_$0-9]*)$/)) {
        errorText.firstChild.data = '';
        okBtn.disabled = false;
        return true;
      } else {
        errorText.firstChild.data = 'Invalid name!';
        okBtn.disabled = true;
        return false;
      }
    };
    nameInput.on('keyup', verify);
    var modal = (0, _FCore._)({
      tag: _Modal["default"].tag,
      child: [dialog]
    }).addTo(document.body);
    setTimeout(function () {
      nameInput.focus();
    }, 100);
    dialog.on('action', function (event) {
      var name;
      if (event.action.name === 'ok') {
        name = nameInput.value;
        if (verify()) {
          resolve(name);
        }
      } else if (event.action.name === 'cancel') {
        reject();
      }
      modal.remove();
    });
  });
};
SCExplorer.prototype.openNewPackageDialog = function () {
  var _this2 = this;
  return (0, _utils2.openFormDialog)({
    getFormField: function getFormField(context) {
      var res = [{
        name: 'name',
        displayName: 'Name',
        input: (0, _FCore._)({
          tag: 'input',
          "class": 'as-text-input',
          attr: {
            type: 'text'
          },
          style: {
            width: '300px'
          },
          on: {
            keyup: function keyup() {
              context.verify();
            }
          }
        }),
        verify: function verify(input) {
          var value = input.value;
          return value.match(/^[a-zA-Z_$]([a-zA-Z_$0-9]*)$/);
        },
        getValue: function getValue(input) {
          return input.value;
        }
      }, {
        name: 'desc',
        displayName: 'Description',
        input: (0, _FCore._)({
          tag: 'textarea2',
          "class": 'as-text-input',
          style: {
            width: '300px',
            minHeight: '30px'
          }
        }),
        getValue: function getValue(input) {
          return input.value;
        }
      }];
      if (window['FORM_DEV_MODE']) {
        res.push({
          name: 'isSystemPackage',
          displayName: 'System Package',
          input: (0, _FCore._)({
            tag: 'checkboxinput'
          }),
          getValue: function getValue(input) {
            return input.checked;
          }
        });
      }
      return res;
    }
  }).then(function (result) {
    var res;
    if (result.isSystemPackage) {
      res = _this2.dataModel.saveNewSystemPackage(result.name, result.desc);
    } else {
      res = _this2.dataModel.saveNewPackage(result.name, result.desc);
    }
    return res;
  }, function () {});
};
SCExplorer.prototype.openPackageListDialog = function () {
  var _this3 = this;
  var packageListElt = (0, _FCore._)({
    style: {
      width: '500px',
      maxWidth: 'calc(100vw - 100px)',
      overflowY: 'auto',
      maxHeight: 'calc(100vh - 200px)',
      minHeight: '30vh',
      border: '1px solid #ddd'
    },
    child: {
      child: {
        tag: _Icons.SpinnerIco.tag
      }
    }
  });
  var dialog = (0, _FCore._)({
    tag: _MessageDialog["default"].tag,
    props: {
      dialogTitle: 'Open Package',
      dialogActions: [{
        text: 'OK',
        name: 'ok'
      }, {
        text: 'Cancel',
        name: 'cancel'
      }]
    },
    child: [packageListElt],
    on: {
      action: function action(event) {
        if (event.action.name === 'ok' && typeof selectedId === "number") {
          _this3.launcher.attachPackage(selectedId);
        }
        modal.remove();
      }
    }
  });
  var modal = (0, _FCore._)({
    tag: _Modal["default"].tag,
    style: {
      zIndex: '90001'
    },
    child: [dialog]
  }).addTo(document.body);
  dialog.$actionBtns[0].disabled = true;
  var itemElementDict = {};
  var selectedId = -1;
  var selectItem = function selectItem(id) {
    dialog.$actionBtns[0].disabled = false;
    var elt = itemElementDict[selectedId];
    if (elt) {
      elt.active = false;
    }
    selectedId = id;
    elt = itemElementDict[selectedId];
    elt.active = true;
  };
  var drawList = function drawList() {
    return _this3.dataModel.getPackageTreeList().then(function (list) {
      packageListElt.clearChild();
      list.forEach(function (packageInfo) {
        var pElt = (0, _FCore._)({
          tag: _ExpTree.ExpTree.tag,
          props: {
            name: packageInfo.name,
            icon: packageInfo.id < 0 ? 'span.mdi.mdi-archive-star-outline' : 'span.mdi.mdi-package-variant',
            desc: packageInfo.description
          },
          on: {
            dblclick: function dblclick() {
              "";
            },
            click: function click() {
              selectItem(packageInfo.id);
            }
          }
        });
        itemElementDict[packageInfo.id] = pElt;
        packageListElt.addChild(pElt);
        if (packageInfo.id > 0 || window['FORM_DEV_MODE']) pElt.getNode().defineEvent('contextmenu').on('contextmenu', function (event) {
          event.showContextMenu({
            items: [{
              text: 'delete',
              icon: 'span.mdi.mdi-delete',
              cmd: 'delete'
            }]
          }, function (event) {
            switch (event.menuItem.cmd) {
              case 'delete':
                _this3.openDeletePackageDialog(packageInfo).then(function (deleted) {
                  if (deleted) {
                    drawList();
                    dialog.$actionBtns[0].disabled = true;
                    selectedId = -1;
                  }
                });
                break;
            }
          });
        });
      });
    });
  };
  drawList();
};
SCExplorer.prototype.createView = function () {
  _FExplorer["default"].prototype.createView.call(this);
  if (this.$headerMenuBtn) this.$headerMenuBtn.addStyle('display', 'none');
};
SCExplorer.prototype.getActionContextMenuProps = function (treeData) {
  var items = [];
  if (!window['FORM_DEV_MODE'] && treeData.info.id < 0) return items;
  if (treeData.info.type === 0) {
    items.push({
      text: 'New Subpackage',
      icon: 'span.mdi.mdi-package-variant-plus',
      cmd: 'new_subpackage'
    });
    if (treeData.parent) items.push({
      text: 'Delete',
      cmd: 'delete_subpackage',
      icon: 'span.mdi.mdi-delete'
    });
    items.push({
      text: 'New Function',
      icon: 'span.mdi.mdi-function-variant',
      cmd: 'new_function'
    });
  } else if (treeData.info.type === 129 || treeData.info.type === 130) {
    items.push({
      text: 'Delete',
      cmd: 'delete_node',
      icon: 'span.mdi.mdi-delete'
    });
  }
  return {
    items: items
  };
};
SCExplorer.prototype.getHeaderActionContextMenuProps = function () {
  var items = [];
  if (this.attachedPackageIdList.length === 1) {
    items.push({
      text: 'Close Package',
      cmd: 'close_all_package',
      icon: 'span.mdi.mdi-location-exit'
    });
    items.push({
      text: 'Attach Package',
      cmd: 'attach_package',
      icon: 'span.mdi.mdi-shape-circle-plus'
    });
  } else if (this.attachedPackageIdList.length > 1) {
    items.push({
      text: 'Close Al Packages',
      cmd: 'close_all_package',
      icon: 'span.mdi.mdi-location-exit'
    });
    items.push({
      text: 'Attach Package',
      cmd: 'attach_package',
      icon: 'span.mdi.mdi-shape-circle-plus'
    });
  }
  if (this.attachedPackageIdList.length > 0) {
    items.push('================');
    items.push({
      text: 'Expand All',
      cmd: 'expand_all',
      icon: 'span.mdi.mdi-arrow-expand-vertical'
    });
    items.push({
      text: 'Collapse All',
      cmd: 'collapse_all',
      icon: 'span.mdi.mdi-format-vertical-align-center'
    });
  }
  return {
    items: items
  };
};
SCExplorer.prototype.onTreeAction = function (treeData, action, nodeElt) {
  switch (action.cmd) {
    case 'new_subpackage':
      this.openNewSubpackageDialog(treeData.info);
      break;
    case 'delete_subpackage':
      this.openDeleteSubpackageDialog(treeData.info);
      break;
    case 'new_function':
      this.openNewFunctionDialog(treeData.info);
      break;
    case 'delete_node':
      this.openDeleteNodeDialog(treeData.info);
      break;
    case 'open':
      if (treeData.info.type === 129 || treeData.info.type === 130) this.openFunction(treeData.info);
  }
};
SCExplorer.prototype.onHeaderAction = function (action) {
  switch (action.cmd) {
    case 'close_all_package':
      this.detachAllPackage();
      break;
    case 'attach_package':
      this.openPackageListDialog();
      break;
    case 'expand_all':
      (0, _FCore.$)(_ExpTree.ExpTree.tag, this.$body, function (elt) {
        if (elt.status === 'close') {
          elt.status = 'open';
          elt.emit('statuschange', {});
        }
      });
      break;
    case 'collapse_all':
      (0, _FCore.$)(_ExpTree.ExpTree.tag, this.$body, function (elt) {
        if (elt.status === 'open') {
          elt.status = 'close';
          elt.emit('statuschange', {});
        }
      });
      break;
  }
};
SCExplorer.prototype.openNewSubpackageDialog = function (parentPackageInfo) {
  var _this4 = this;
  var handleResult = function handleResult(result) {
    var res;
    if (parentPackageInfo.id > 0) {
      res = _this4.dataModel.saveNewSubpackage(parentPackageInfo.id, result, '');
    } else {
      res = _this4.dataModel.saveNewSystemSubpackage(parentPackageInfo.id, result, '');
    }
    return res.then(function () {
      _this4.redrawExpTree();
    });
  };
  this.openIdentInputDialog({
    title: 'New Subpackage'
  }).then(handleResult, _noop["default"]);
};
SCExplorer.prototype.openDeletePackageDialog = function (packageInfo) {
  var _this5 = this;
  return (0, _utils.openYesNoQuestionDialog)('Delete Package', "[".concat(packageInfo.id, "]").concat(packageInfo.name)).then(function (result) {
    console.log('ok', result);
    if (!result) return Promise.resolve(false);
    var ids = {};
    var visit = function visit(pI) {
      if (pI.type === 0) {
        ids[pI.id] = true;
        if (pI.children) pI.children.forEach(visit);
      }
    };
    visit(packageInfo);
    var res;
    ids = Object.keys(ids).map(function (x) {
      return parseInt(x, 10);
    });
    if (packageInfo.id > 0) {
      res = _this5.dataModel.deletePackageList(ids);
    } else {
      console.log('delete sys', ids);
      res = _this5.dataModel.deleteSystemPackageList(ids);
    }
    return res.then(function () {
      return true;
    });
  });
};
SCExplorer.prototype.openDeleteSubpackageDialog = function (packageInfo) {
  var _this6 = this;
  var path = [];
  var p = packageInfo;
  while (p) {
    path.unshift(p.name);
    p = this.packageInfoById[p.parentid];
  }
  (0, _utils.openYesNoQuestionDialog)('Delete Subpackage', path.join('/')).then(function (result) {
    if (!result) return;
    var ids = {};
    var visit = function visit(pI) {
      if (pI.type === 0) {
        ids[pI.id] = true;
        if (pI.children) pI.children.forEach(visit);
      }
    };
    visit(packageInfo);
    var res;
    if (packageInfo.id > 0) {
      res = _this6.dataModel.deletePackageList(Object.keys(ids));
    } else {
      res = _this6.dataModel.deleteSystemPackageList(Object.keys(ids));
    }
    res.then(function () {
      return _this6.redrawExpTree();
    });
  });
};
SCExplorer.prototype.openNewFunctionDialog = function (packageInfo) {
  var _this7 = this;
  (0, _utils2.openFormDialog)({
    getFormField: function getFormField(context) {
      return [{
        name: 'name',
        displayName: 'Name',
        input: (0, _FCore._)({
          tag: 'input',
          attr: {
            type: 'text'
          },
          "class": 'as-text-input',
          style: {
            width: '300px'
          },
          on: {
            keyup: function keyup() {
              context.verify();
            }
          }
        }),
        getValue: function getValue(input) {
          return input.value;
        },
        verify: function verify(input) {
          var value = input.value;
          return value.match(/^[a-zA-Z_$]([a-zA-Z_$0-9]*)$/);
        }
      }, {
        name: 'type',
        displayName: 'type',
        input: (0, _FCore._)({
          tag: 'selectmenu',
          props: {
            items: [{
              text: 'Blockly',
              value: 129
            }, {
              text: 'JavaScript',
              value: 130
            }]
          }
        }),
        getValue: function getValue(input) {
          return input.value;
        }
      }, {
        name: 'desc',
        displayName: 'Description',
        input: (0, _FCore._)({
          tag: 'textarea2',
          "class": 'as-text-input',
          style: {
            width: '300px',
            minHeight: '30px'
          }
        }),
        getValue: function getValue(input) {
          return input.value;
        }
      }];
    }
  }).then(function (result) {
    var saveRes;
    if (packageInfo.id > 0) {
      saveRes = _this7.dataModel.saveNewNode(packageInfo.id, result.type, result.name, result.desc);
    } else {
      saveRes = _this7.dataModel.saveNewSystemNode(packageInfo.id, result.type, result.name, result.desc);
    }
    saveRes.then(function (res) {
      _this7.redrawExpTree();
      _this7.openFunction({
        name: result.name,
        id: res.id,
        namespace: packageInfo.id,
        type: result.type
      });
    });
  }, _noop["default"]);
};
SCExplorer.prototype.openDeleteNodeDialog = function (nodeInfo) {
  var _this8 = this;
  var handleResult = function handleResult(result) {
    var res;
    if (result) {
      if (nodeInfo.id > 0) {
        res = _this8.dataModel.deleteNode(nodeInfo.id);
      } else {
        res = _this8.dataModel.deleteSystemNode(nodeInfo.id);
      }
      res.then(function () {
        _this8.redrawExpTree();
      });
    }
  };
  var path = [];
  var p = nodeInfo;
  while (p) {
    path.unshift(p.name);
    p = this.packageInfoById[p.parentid || p.namespaceid];
  }
  (0, _utils.openYesNoQuestionDialog)('Delete Function', path.join('/')).then(handleResult, _noop["default"]);
};
SCExplorer.prototype.openFunction = function (nodeInfo) {
  var id = nodeInfo.type === 129 ? 'SCBlocklyTask_' + nodeInfo.id : 'SCJavaScriptTask_' + nodeInfo.id;
  var task = this.launcher.getTaskById(id);
  if (task) {
    task.requestActive();
  } else {
    this.launcher.newTask(nodeInfo.type === 129 ? _SCBlocklyTask["default"] : _SCJavaScriptTask["default"], {
      nodeInfo: nodeInfo
    });
  }
};
var _default = SCExplorer;
exports["default"] = _default;

/***/ }),

/***/ 85271:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BaseEditor = _interopRequireDefault(__webpack_require__(90889));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = _interopRequireWildcard(__webpack_require__(51518));
var _CodeEditor = _interopRequireDefault(__webpack_require__(36243));
var _CMDTool = _interopRequireDefault(__webpack_require__(8982));
var _absolBrace = _interopRequireDefault(__webpack_require__(90834));
var _CmdDescriptors = _interopRequireDefault(__webpack_require__(77976));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _FileSaver = __webpack_require__(53069);
var _utils = __webpack_require__(84512);
var _XLoader = _interopRequireDefault(__webpack_require__(47913));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var beautifySync = null;
var SCJavaScriptEditorCmd = {};

/**
 * @this SCJavaScriptEditor
 */
SCJavaScriptEditorCmd.save = function () {
  var task = this.getContext(_R["default"].TASK);
  if (task) task.save();
};

/**
 * @this SCJavaScriptEditor
 */
SCJavaScriptEditorCmd.undo = function () {
  this.aceEditor.undo();
};

/**
 * @this SCJavaScriptEditor
 */
SCJavaScriptEditorCmd.redo = function () {
  this.aceEditor.redo();
};

/**
 * @this SCJavaScriptEditor
 */
SCJavaScriptEditorCmd.beautifyJS = function () {
  var _this = this;
  if (!beautifySync) {
    if (window.js_beautify) beautifySync = Promise.resolve();else beautifySync = _XLoader["default"].loadScript('https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.9/beautify.min.js');
  }
  beautifySync.then(function () {
    if (!window.js_beautify) return;
    var code = _this.aceEditor.getValue();
    var newCode = js_beautify(code);
    if (newCode !== code) {
      _this.aceEditor.setValue(newCode, true);
    }
  });
};

/**
 * @this SCJavaScriptEditor
 */
SCJavaScriptEditorCmd.importFromFile = function () {
  this.aceEditor.redo();
};

/**
 * @this SCJavaScriptEditor
 */
SCJavaScriptEditorCmd.exportToFile = function () {
  var code = this.aceEditor.getValue();
  var fileName = 'export.js';
  var task = this.getContext(_R["default"].TASK);
  if (task) fileName = task.taskName;
  if (!fileName.toLowerCase().endsWith('.js')) task += '.js';
  (0, _FileSaver.saveTextAs)(code, fileName);
};

/**
 * @this SCJavaScriptEditor
 */
SCJavaScriptEditorCmd.importFromFile = function () {
  var _this2 = this;
  (0, _utils.openFileDialog)({
    accept: '*.js'
  }).then(function (files) {
    if (!files || !files.length) return;
    var file = files[0];
    var reader = new FileReader();
    reader.onload = function () {
      _this2.aceEditor.setValue(reader.result);
    };
    reader.readAsText(file);
  });
};

/**
 * @extends CodeEditor
 * @constructor
 */
function SCJavaScriptEditor() {
  _BaseEditor["default"].call(this);
  this.cmdTool = new _CMDTool["default"]();
  this.cmdRunner.assign(SCJavaScriptEditorCmd);
}
_OOP["default"].mixClass(SCJavaScriptEditor, _BaseEditor["default"]);
SCJavaScriptEditor.prototype.onAttached = function () {
  this.cmdTool.attach(this);
};
SCJavaScriptEditor.prototype.onStart = function () {
  this.cmdTool.start(true);
  this.cmdTool.bindWithEditor(this);
};
SCJavaScriptEditor.prototype.onResume = function () {
  this.cmdTool.resume();
  this.cmdTool.updateVisibility();
};
SCJavaScriptEditor.prototype.onPause = function () {
  this.cmdTool.pause();
};
SCJavaScriptEditor.prototype.onStop = function () {
  this.cmdTool.stop();
};
SCJavaScriptEditor.prototype.createView = function () {
  var _this3 = this;
  this.$view = (0, _FCore._)({
    attr: {
      tabindex: '1'
    },
    "class": 'sc-javascript-editor',
    child: [{
      "class": 'sc-javascript-editor-header',
      child: this.cmdTool.getView()
    }, {
      "class": 'sc-javascript-editor-header'
    }, {
      "class": 'sc-javascript-editor-body',
      child: {
        tag: 'pre',
        "class": 'sc-javascript-editor-content'
      }
    }]
  });
  this.$content = (0, _FCore.$)('.sc-javascript-editor-content', this.$view);
  this.aceEditor = _absolBrace["default"].ace.edit(this.$content);
  this.aceEditor.on('change', function () {
    if (_this3._localChange) return;
    _this3.notifyChangeDelay();
  });
  this.aceEditor.commands.addCommand({
    name: 'save',
    bindKey: {
      win: 'ctrl-s',
      mac: 'cmd-s'
    },
    exec: function exec() {
      _this3.execCmd('save');
    }
  });
  this.aceEditor.$blockScrolling = Infinity;
  this.aceEditor.setOption('mode', 'ace/mode/javascript');
  this.aceEditor.setOptions({
    enableBasicAutocompletion: true,
    enableSnippets: true
  });
  console.log(this.aceEditor);
};
SCJavaScriptEditor.prototype.getCmdGroupTree = function () {
  return [['save'], ['importFromFile', 'exportToFile'], ['undo', 'redo'], ['beautifyJS']];
};
SCJavaScriptEditor.prototype.getCmdDescriptor = function (name) {
  var res = Object.assign({
    type: 'trigger'
  }, _CmdDescriptors["default"][name]);
  var undoMng;
  if (name === 'undo' || name === 'redo') {
    undoMng = this.aceEditor.session.getUndoManager();
    if (name === 'undo' && undoMng.$undoStack && undoMng.$undoStack.length === 0) res.disabled = true;else if (name === 'redo' && undoMng.$redoStack && undoMng.$redoStack.length === 0) res.disabled = true;
  }
  return res;
};
SCJavaScriptEditor.prototype.notifyChangeDelay = function () {
  var _this4 = this;
  clearTimeout(this.changeTO);
  clearTimeout(this.verifyTO);
  this.changeTO = setTimeout(function () {
    var task = _this4.getContext(_R["default"].TASK);
    if (task) {
      task.$tab.modified = true;
    }
    _this4.notifyCmdDescriptorsChange();
  }, 100);
  this.verifyTO = setTimeout(function () {
    _this4.verify();
  }, 1000);
};
SCJavaScriptEditor.prototype.verify = function () {
  return;
  var code = this.aceEditor.getValue();
  var ast;
  var errorInfo;
  var session;
  session = this.aceEditor.getSession();
  // var parseError = text => {
  //     var res = {};
  //     if (typeof text !== "string") return res;
  //     var rows = text.split('\n');
  //     var matched;
  //     if (rows[0]) {
  //         matched = rows[0].match(/\((\d+):(\d+)\)$/);
  //         if (matched) {
  //             res.loc = { row: parseInt(matched[1], 10), column: parseInt(matched[2], 10) };
  //         }
  //         res.message = rows[0].replace(/(^[a-zA-Z0-9]+:\s+)|(\s*\((\d+):(\d+)\)$)/g, '');
  //     }
  //     return res;
  // };
  try {
    ast = babel.parse(code);
  } catch (err) {
    // errorInfo = parseError(err.message);
    // if (errorInfo.loc) {
    //     this.aceEditor.getSession().addAnnotation({
    //         row: errorInfo.loc.row - 1,
    //         column: errorInfo.loc.column,
    //         text: errorInfo.message,
    //         type: "error" // also warning and information
    //     });
    // }
  }
};
SCJavaScriptEditor.prototype.getOriginalJS = function () {
  return this.aceEditor.getValue();
};
SCJavaScriptEditor.prototype.getRunnableJS = function () {
  var originalJS = this.aceEditor.getValue();
  var runnabelJS = 'function() noName{ console.log("Todo: in processing");}';
  var ast;
  try {
    ast = babel.parse(originalJS);
    babel.traverse(ast, {
      Identifier: function Identifier(path) {
        if (path.node.name === '__getExternalConst') {
          path.skip();
          return;
        }
        var name = path.node.name;
        var newNode;
        if ((['object', 'right', 'left'].includes(path.key) || path.listKey === 'arguments') && !path.scope.bindings[name]) {
          if (path.key === 'left' && path.container && path.container.type === 'AssignmentExpression') {
            throw new Error("Violation: can not assign to const " + name);
          }
          newNode = babel.types.callExpression(babel.types.identifier("__getExternalConst"), [babel.types.stringLiteral(name)]);
          path.replaceWith(newNode);
        }
      }
    });
    runnabelJS = babel.generator(ast, {}, originalJS).code;
  } catch (err) {
    runnabelJS = 'function errorFunction() { throw new Error(' + JSON.stringify(err.message) + ');}';
  }
  return runnabelJS;
};
SCJavaScriptEditor.prototype.setOriginalJS = function (js) {
  var _this5 = this;
  this._localChange = true;
  if (typeof js !== 'string') js = '';
  this.aceEditor.setValue(js, true);
  this.aceEditor.session.getUndoManager().reset();
  this.notifyCmdDescriptorsChange();
  this._localChange = false;
  this.verifyTO = setTimeout(function () {
    _this5.verify();
  }, 1000);
};
var _default = SCJavaScriptEditor;
exports["default"] = _default;

/***/ }),

/***/ 13237:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FLTask = _interopRequireDefault(__webpack_require__(95778));
var _R = _interopRequireDefault(__webpack_require__(25280));
var _SCBlocklyEditor = _interopRequireDefault(__webpack_require__(91835));
var _SCTypeManager = _interopRequireDefault(__webpack_require__(6360));
var _SCJavaScriptEditor = _interopRequireDefault(__webpack_require__(85271));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends FLTask
 * @constructor
 */
function SCJavaScriptTask() {
  _FLTask["default"].apply(this, arguments);
  /***
   * @type {SCJavaScriptEditor}
   * @name mainFragment
   * @memberOf SCJavaScriptTask#
   */
  this.setContext(_R["default"].TASK, this);
  this.taskName = this.bundle.nodeInfo.name;
}
_OOP["default"].mixClass(SCJavaScriptTask, _FLTask["default"]);
SCJavaScriptTask.prototype.taksIcon = 'span.mdi.mdi-function-variant';
SCJavaScriptTask.prototype.onAttached = function () {
  _FLTask["default"].prototype.onAttached.call(this);
  /***
   * @type {BlocklyDataModel}
   */
  this.dataModel = this.getContext(_R["default"].DATA_MODEL);
  /***
   *
   * @type {EventEmitter}
   */
  this.notificationCenter = this.getContext(_R["default"].NOTIFICATION_CENTER);
};
SCJavaScriptTask.prototype.onStart = function () {
  var _this = this;
  _FLTask["default"].prototype.onStart.call(this);

  /*
  this.mainFragment.on('ast_change', () => {
      this.$tab.modified = true;
  });
    var typeSync = this.dataModel.getTypeDescriptors().then(result => {
      Object.keys(result).forEach(key => {
          if (!('typeId' in result[key]))
              result[key].typeId = key;
      });
      SCTypeManager.addTypeDescriptors(result);
  });
  */
  this.dataModel.loadNodeById(this.bundle.nodeInfo.id).then(function (result) {
    var originalJS = result && result.content && result.content.originalJS;
    originalJS = originalJS || "function ".concat(_this.bundle.nodeInfo.name, "() {\n}");
    _this.mainFragment.setOriginalJS(originalJS);
  });
};
SCJavaScriptTask.prototype.MainFragmentClass = _SCJavaScriptEditor["default"];
SCJavaScriptTask.prototype.computeIdent = function () {
  return 'SCJavaScriptTask_' + this.bundle.nodeInfo.id;
};
SCJavaScriptTask.prototype.save = function () {
  this.$tab.modified = false;
  var content = {
    content: {
      originalJS: this.mainFragment.getOriginalJS(),
      runnableJS: this.mainFragment.getRunnableJS()
    }
  };
  if (this.bundle.nodeInfo.id > 0) {
    this.dataModel.updateNode(this.bundle.nodeInfo.id, content);
  } else {
    this.dataModel.updateSystemNode(this.bundle.nodeInfo.id, content);
  }
};
var _default = SCJavaScriptTask;
exports["default"] = _default;

/***/ }),

/***/ 34217:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FLauncher = _interopRequireDefault(__webpack_require__(37100));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _BlocklyDataModel = _interopRequireDefault(__webpack_require__(38267));
var _BlocklyStartExploringFragment = _interopRequireDefault(__webpack_require__(90360));
var _SCExplorer = _interopRequireDefault(__webpack_require__(22697));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _R = _interopRequireDefault(__webpack_require__(25280));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends FLauncher
 * @param options
 * @constructor
 */
function SCLauncher(options) {
  _FLauncher["default"].apply(this, arguments);
  this.notificationCenter = options.notificationCenter || new _EventEmitter["default"]();
  this.setContext(_R["default"].NOTIFICATION_CENTER, this.notificationCenter);
}
_OOP["default"].mixClass(SCLauncher, _FLauncher["default"]);
SCLauncher.prototype.classes = {
  DataModel: _BlocklyDataModel["default"],
  StartExploringFragment: _BlocklyStartExploringFragment["default"],
  Explorer: _SCExplorer["default"]
};
SCLauncher.prototype.attachPackage = function (id) {
  this.explorer.attachPackage(id);
};
var _default = SCLauncher;
exports["default"] = _default;

/***/ }),

/***/ 93154:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.SCLiteralType2GlobalClassName = exports.SCGlobalDescriptor = void 0;
var GlobalProperties = {};
var SCGlobalDescriptor = {
  type: 'object',
  typeId: 'Global',
  properties: GlobalProperties
};
exports.SCGlobalDescriptor = SCGlobalDescriptor;
GlobalProperties.Date = {
  typeId: 'Date',
  type: 'class',
  args: [{
    name: 'milliseconds',
    type: 'number'
  }],
  //default
  overrides: [
    // []
  ],
  proto: {
    getDate: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getDay: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getFullYear: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getHours: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getMilliseconds: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getMinutes: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getMonth: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getSeconds: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getTime: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getTimezoneOffset: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    /*** UTC **/
    getUTCDate: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getUTCDay: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getUTCFullYear: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getUTCHours: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getUTCMilliseconds: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getUTCMinutes: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getUTCMonth: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getUTCSeconds: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getUTCTime: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    getUTCTimezoneOffset: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    /*** set ******/
    setDate: {
      type: 'function',
      args: [{
        name: 'date',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    setFullYear: {
      type: 'function',
      args: [{
        name: 'year',
        type: 'number'
      }, {
        name: 'month',
        type: 'number',
        optional: true
      }, {
        name: 'date',
        type: 'number',
        optional: true
      }],
      returns: {
        type: 'number'
      }
    },
    setHours: {
      type: 'function',
      args: [{
        name: 'hours',
        type: 'number'
      }, {
        name: 'min',
        type: 'number',
        optional: true
      }, {
        name: 'sec',
        type: 'number',
        optional: true
      }, {
        name: 'ms',
        type: 'number',
        optional: true
      }],
      returns: {
        type: 'number'
      }
    },
    setMilliseconds: {
      type: 'function',
      args: [{
        name: 'ms',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    setMinutes: {
      type: 'function',
      args: [{
        name: 'min',
        type: 'number'
      }, {
        name: 'sec',
        type: 'number',
        optional: true
      }, {
        name: 'ms',
        type: 'number',
        optional: true
      }],
      returns: {
        type: 'number'
      }
    },
    setMonth: {
      type: 'function',
      args: [{
        name: 'month',
        type: 'number'
      }, {
        name: 'date',
        type: 'number',
        optional: true
      }],
      returns: {
        type: 'number'
      }
    },
    setSeconds: {
      type: 'function',
      args: [{
        name: 'sec',
        type: 'number'
      }, {
        name: 'ms',
        type: 'number',
        optional: true
      }],
      returns: {
        type: 'number'
      }
    },
    setTime: {
      type: 'function',
      args: [{
        name: 'time',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    /*** utc ****/
    setUTCDate: {
      type: 'function',
      args: [{
        name: 'date',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    setUTCFullYear: {
      type: 'function',
      args: [{
        name: 'year',
        type: 'number'
      }, {
        name: 'month',
        type: 'number',
        optional: true
      }, {
        name: 'date',
        type: 'number',
        optional: true
      }],
      returns: {
        type: 'number'
      }
    },
    setUTCHours: {
      type: 'function',
      args: [{
        name: 'hours',
        type: 'number'
      }, {
        name: 'min',
        type: 'number',
        optional: true
      }, {
        name: 'sec',
        type: 'number',
        optional: true
      }, {
        name: 'ms',
        type: 'number',
        optional: true
      }],
      returns: {
        type: 'number'
      }
    },
    setUTCMilliseconds: {
      type: 'function',
      args: [{
        name: 'ms',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    setUTCMinutes: {
      type: 'function',
      args: [{
        name: 'min',
        type: 'number'
      }, {
        name: 'sec',
        type: 'number',
        optional: true
      }, {
        name: 'ms',
        type: 'number',
        optional: true
      }],
      returns: {
        type: 'number'
      }
    },
    setUTCMonth: {
      type: 'function',
      args: [{
        name: 'month',
        type: 'number'
      }, {
        name: 'date',
        type: 'number',
        optional: true
      }],
      returns: {
        type: 'number'
      }
    },
    setUTCSeconds: {
      type: 'function',
      args: [{
        name: 'sec',
        type: 'number'
      }, {
        name: 'ms',
        type: 'number',
        optional: true
      }],
      returns: {
        type: 'number'
      }
    },
    setUTCTime: {
      type: 'function',
      args: [{
        name: 'time',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    toString: {
      type: 'function',
      args: []
    }
  }
};
GlobalProperties.Math = {
  typeId: 'Math',
  type: 'object',
  properties: {
    E: {
      type: 'number'
    },
    LN2: {
      type: 'number'
    },
    LN10: {
      type: 'number'
    },
    LOG2E: {
      type: 'number'
    },
    LOG10E: {
      type: 'number'
    },
    PI: {
      type: 'number'
    },
    SQRT1_2: {
      type: 'number'
    },
    SQRT2: {
      type: 'number'
    },
    abs: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    acos: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    asin: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    atan: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    atan2: {
      type: 'function',
      args: [{
        name: 'y',
        type: 'number'
      }, {
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    ceil: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    cos: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    exp: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    floor: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    log: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    min: {
      type: 'function',
      args: [{
        name: '...args',
        type: 'number[]'
      }],
      returns: {
        type: 'number'
      }
    },
    max: {
      type: 'function',
      args: [{
        name: '...args',
        type: 'number[]'
      }],
      returns: {
        type: 'number'
      }
    },
    pow: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }, {
        name: 'y',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    random: {
      type: 'function',
      args: [],
      returns: {
        type: 'number'
      }
    },
    round: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    sin: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    sqrt: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    tan: {
      type: 'function',
      args: [{
        name: 'x',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    }
  }
};
GlobalProperties.Number = {
  typeId: 'Number',
  type: 'class',
  proto: {
    toFixed: {
      type: 'function',
      args: [{
        name: 'fractionDigits',
        type: 'number'
      }],
      returns: {
        type: 'string'
      }
    },
    toString: {
      type: 'function',
      args: []
    }
  }
};
GlobalProperties.Object = {
  typeId: 'Object',
  type: 'class',
  proto: {
    toString: {
      type: 'function',
      args: []
    }
  }
};
GlobalProperties.Array = {
  typeId: 'Array',
  type: 'class',
  proto: {
    length: {
      type: 'number'
    },
    pop: {
      type: 'function',
      args: [],
      returns: {
        type: 'any'
      }
    },
    shift: {
      type: 'function',
      args: [],
      returns: {
        type: 'any'
      }
    },
    push: {
      type: 'function',
      args: [{
        name: '...items',
        type: 'array',
        of: 'any'
      }],
      returns: {
        type: 'number'
      }
    },
    unshift: {
      type: 'function',
      args: [{
        name: '...items',
        type: 'array',
        of: 'any'
      }],
      returns: {
        type: 'number'
      }
    },
    concat: {
      type: 'function',
      args: [{
        name: 'items',
        type: 'array',
        of: 'any'
      } //todo:  overloading
      ],

      returns: {
        type: 'array',
        of: 'any'
      }
    },
    join: {
      type: 'function',
      args: [{
        name: 'separator',
        type: 'string',
        optional: true
      }],
      returns: {
        type: 'string'
      }
    },
    reverse: {
      type: 'function',
      args: [],
      returns: {
        type: 'array',
        of: 'any'
      }
    },
    slice: {
      type: 'function',
      args: [{
        name: 'start',
        type: 'number',
        optional: true
      }, {
        name: 'end',
        type: 'number',
        optional: true
      }],
      returns: {
        type: 'array',
        of: 'any'
      }
    },
    sort: {
      type: 'function',
      args: [{
        name: 'compareFn',
        optional: true,
        type: 'function',
        args: [{
          name: 'a',
          type: 'any'
        }, {
          name: 'b',
          type: 'any'
        }]
      }],
      returns: 'this'
    },
    splice: {
      type: 'function',
      args: [{
        name: 'start',
        type: 'number',
        optional: true
      }, {
        name: 'end',
        type: 'number',
        optional: true
      }, {
        name: '...addItems',
        type: 'array',
        of: 'any'
      }],
      returns: {
        type: 'array',
        of: 'any'
      }
    },
    indexOf: {
      type: 'function',
      args: [{
        name: 'searchElement',
        type: 'any'
      }, {
        name: 'fromIndex',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    lastIndexOf: {
      type: 'function',
      args: [{
        name: 'searchElement',
        type: 'any'
      }, {
        name: 'fromIndex',
        type: 'number'
      }],
      returns: {
        type: 'number'
      }
    },
    every: {
      type: 'function',
      args: [{
        name: 'predicate',
        type: 'function',
        args: [{
          name: 'value',
          type: 'any'
        }, {
          name: 'index',
          type: 'number'
        }, {
          name: 'array',
          type: 'array',
          of: 'any'
        }]
      }],
      returns: {
        type: 'boolean'
      }
    },
    some: {
      type: 'function',
      args: [{
        name: 'predicate',
        type: 'function',
        args: [{
          name: 'value',
          type: 'any'
        }, {
          name: 'index',
          type: 'number'
        }, {
          name: 'array',
          type: 'array',
          of: 'any'
        }],
        returns: {
          type: 'boolean'
        }
      }],
      returns: {
        type: 'boolean'
      }
    },
    forEach: {
      type: 'function',
      args: [{
        name: 'callbackfn',
        type: 'function',
        args: [{
          name: 'value',
          type: 'any'
        }, {
          name: 'index',
          type: 'number'
        }, {
          name: 'array',
          type: 'array',
          of: 'any'
        }]
      }]
    },
    map: {
      type: 'function',
      args: [{
        name: 'callbackfn',
        type: 'function',
        args: [{
          name: 'value',
          type: 'any'
        }, {
          name: 'index',
          type: 'number'
        }, {
          name: 'array',
          type: 'array',
          of: 'any'
        }],
        returns: {
          type: 'any'
        }
      }]
    },
    filter: {
      type: 'function',
      args: [{
        name: 'predicate',
        type: 'function',
        args: [{
          name: 'value',
          type: 'any'
        }, {
          name: 'index',
          type: 'number'
        }, {
          name: 'array',
          type: 'array',
          of: 'any'
        }],
        returns: {
          type: 'boolean'
        }
      }],
      returns: {
        type: 'boolean'
      }
    },
    reduce: {
      type: 'function',
      args: [{
        name: 'callbackfn',
        type: 'function',
        args: [{
          name: 'previousValue',
          type: 'any'
        }, {
          name: 'value',
          type: 'any'
        }, {
          name: 'index',
          type: 'number'
        }, {
          name: 'array',
          type: 'array',
          of: 'any'
        }],
        returns: {
          type: 'any'
        }
      }, {
        name: 'initValue',
        type: 'any',
        optional: true
      }],
      returns: {
        type: 'any'
      }
    },
    reduceRight: {
      type: 'function',
      args: [{
        name: 'callbackfn',
        type: 'function',
        args: [{
          name: 'previousValue',
          type: 'any'
        }, {
          name: 'value',
          type: 'any'
        }, {
          name: 'index',
          type: 'number'
        }, {
          name: 'array',
          type: 'array',
          of: 'any'
        }],
        returns: {
          type: 'any'
        }
      }, {
        name: 'initValue',
        type: 'any',
        optional: true
      }],
      returns: {
        type: 'any'
      }
    }
  }
};
GlobalProperties.Boolean = {
  typeId: 'Boolean',
  type: 'class',
  proto: {
    toString: {
      type: 'function',
      args: [],
      returns: {
        type: 'string'
      }
    }
  }
};
var SCLiteralType2GlobalClassName = {
  number: 'Number',
  array: 'Array',
  string: 'String',
  object: 'Object',
  "boolean": 'Boolean',
  datetime: 'Date',
  date: 'Date',
  "enum": 'Number'
};
exports.SCLiteralType2GlobalClassName = SCLiteralType2GlobalClassName;
Object.keys(SCLiteralType2GlobalClassName).forEach(function (key) {
  GlobalProperties[key] = {
    type: SCLiteralType2GlobalClassName[key],
    typeId: key
  };
});

/***/ }),

/***/ 6360:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _generator = __webpack_require__(18528);
var _SCStaticDescriptors = __webpack_require__(93154);
var _utils = __webpack_require__(84512);
var _stringUtils = __webpack_require__(26243);
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function TypeManager() {
  this.typeDescriptors = {};
  this.addTypeDescriptors(_SCStaticDescriptors.SCGlobalDescriptor);
}
TypeManager.prototype.addTypeDescriptors = function (descriptors) {
  var typeDescriptors = this.typeDescriptors;
  var cleanUpObj = function cleanUpObj(data) {
    Object.keys(data).forEach(function (key) {
      if (data[key] === undefined || data[key] === null) delete data[key];
    });
    return data;
  };
  var visitors = {
    "function": function _function(data) {
      var desc = Object.assign({}, data, {
        args: data.args.map(function (arg) {
          return accept('*', arg);
        }),
        returns: accept('*', data.returns)
      });
      return declareNewType(desc);
    },
    "class": function _class(data) {
      var res = Object.assign({}, data, {
        proto: accept('dict', data.proto)
      });
      return declareNewType(res);
    },
    struct: function struct(data) {
      var res = Object.assign({}, data, {
        type: 'object',
        properties: accept(data.properties instanceof Array ? 'list' : 'dict', data.properties)
      });
      return declareNewType(res);
    },
    object: function object(data) {
      var res = Object.assign({}, data, {
        properties: accept(data.properties instanceof Array ? 'list' : 'dict', data.properties)
      });
      return declareNewType(res);
    },
    dict: function dict(data) {
      return Object.keys(data).reduce(function (ac, key) {
        ac[key] = accept('*', data[key]);
        return ac;
      }, {});
    },
    string: function string(data) {
      if (typeof data.typeId === 'string' || typeof data.typeId === "number") {
        var res = Object.assign(data);
        return declareNewType(res);
      } else return data;
    },
    list: function list(data) {
      return data.map(function (it) {
        return accept('*', it);
      });
    },
    '*': function _(data) {
      if (!data) return data;
      if (data instanceof Array) return accept('list', data);
      if (data.type && visitors[data.type]) return accept(data.type, data);
      if (data.type && (typeof data.type === 'number' || typeof data.type === "string")) {
        if (data.typeId) return declareNewType(data);
        return data;
      }
      if (_typeof(data) === "object") {
        return accept('dict', data);
      }
      return data;
    }
  };
  var declareNewType = function declareNewType(data) {
    cleanUpObj(data);
    var name = data.name;
    delete data.name;
    if (!data.typeId) {
      data.typeId = (0, _utils.keyStringOf)(data);
      data.typeId = (0, _stringUtils.stringHashCode)(data.typeId) + '' + (0, _stringUtils.stringHashCode)(data.typeId.split('').reverse().join(''));
      if (!typeDescriptors[data.typeId]) {
        typeDescriptors[data.typeId] = data;
      }
    } else {
      typeDescriptors[data.typeId] = data;
    }
    var res = {
      type: data.typeId
    };
    if (name) res.name = name;
    return res;
  };
  var accept = function accept(rule, data) {
    return visitors[rule](data);
  };
  accept('*', descriptors);
  return this;
};
TypeManager.prototype.getTypeDescriptor = function (id) {
  var descriptors = this.typeDescriptors;
  var descriptor = descriptors[id];
  if (!descriptor) return null;
  return Object.assign({
    typeId: id
  }, descriptor);
};
TypeManager.prototype.detectTypeDescriptorOf = function (o) {
  var tO;
  if (!o) {
    return null;
  }
  var result = null;
  tO = _typeof(o);
  if (tO === "string" || tO === 'number') {
    if (this.typeDescriptors[o]) {
      result = (0, _generator.copyJSVariable)(this.typeDescriptors[o]);
      result.typeId = o;
      if (_SCStaticDescriptors.SCLiteralType2GlobalClassName[result.superType]) {
        result.className = _SCStaticDescriptors.SCLiteralType2GlobalClassName[result.superType];
        Object.assign(result, (0, _generator.copyJSVariable)(this.typeDescriptors[_SCStaticDescriptors.SCLiteralType2GlobalClassName[result.superType]]));
      }
    } else if (this.typeDescriptors[o]) {
      result = (0, _generator.copyJSVariable)(this.typeDescriptors[o]);
      if (this.typeDescriptors[o].type === 'class') {
        result.className = o;
      } else {
        result.varariableName = o;
      }
    }
  } else if (_typeof(o) === 'object') {
    if (o.type === 'GenericType' && o.id) {
      result = this.detectTypeDescriptorOf(o.id.name);
    } else if (o.type === 'object') {
      result = o;
    }
  }
  return result;
};

/***
 * @returns {TypeManager}
 */
TypeManager.prototype.clone = function () {
  var newInstance = new TypeManager();
  this.addTypeDescriptors(this.typeDescriptors);
  return newInstance;
};
var SCTypeManager = new TypeManager();
var _default = SCTypeManager;
exports["default"] = _default;

/***/ }),

/***/ 14425:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _FCore = __webpack_require__(51518);
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _TOCList = _interopRequireDefault(__webpack_require__(89860));
var _TOCItem = _interopRequireDefault(__webpack_require__(64836));
var _search = __webpack_require__(67858);
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _utils = __webpack_require__(84512);
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends Fragment
 * @param {SCBlocklyEditor} editor
 * @constructor
 */
function SCTypeSelectionDialog(editor) {
  _Fragment["default"].call(this);
  _EventEmitter["default"].call(this);
  this.editor = editor;
  this.$itemById = {};
  this.searchItems = [];
  this.$cache = {};
}
_OOP["default"].mixClass(SCTypeSelectionDialog, _Fragment["default"], _EventEmitter["default"]);
SCTypeSelectionDialog.prototype.type2icon = {
  'object': 'span.mdi.mdi-terraform',
  'number': 'span.mdi.mdi-numeric',
  'enum': 'span.mdi.mdi-circle-small',
  '{enum}': 'span.mdi.mdi-dots-triangle',
  'file': 'span.mdi.mdi-file-outline',
  'file[]': 'span.mdi.mdi-file-multiple-outline',
  'string': 'span.mdi.mdi-format-color-text',
  date: 'span.mdi.mdi-calendar-outline',
  datetime: 'span.mdi.mdi-calendar-clock',
  bool: 'span.mdi.mdi-check-box-outline',
  html: 'span.mdi.mdi-xml',
  color: 'span.mdi.mdi-palette',
  image: 'span.mdi.mdi-image-outline',
  'enum<pair>': 'span.mdi.mdi-music-note-whole-dotted',
  treetable: 'span.mdi.mdi-file-tree-outline'
};
SCTypeSelectionDialog.prototype.type2order = {
  'object': 100,
  'treetable': 101,
  'number': 0,
  'enum': 10,
  '{enum}': 11,
  'file': 7,
  'file[]': 8,
  'string': 2,
  date: 4,
  datetime: 5,
  bool: 3,
  html: 13,
  color: 9,
  image: 6,
  'enum<pair>': 12
};
SCTypeSelectionDialog.prototype.onStart = function () {
  var _this = this;
  this.getView();
  var descriptors = this.editor.typeMng.typeDescriptors;
  var findSupperType = function findSupperType(type) {
    var counter = 100;
    while (counter--) {
      if (descriptors[type] && _this.type2icon[descriptors[type].type]) {
        type = descriptors[type].type;
        if (_this.type2icon[type]) break;
      } else break;
    }
    return type;
  };
  this.$itemById = {};
  var keys = Object.keys(descriptors).filter(function (key) {
    var dst = descriptors[key];
    if (parseInt(dst.typeId) + '' !== key) return false;
    if (dst.type === 'class') return false;
    return true;
  });
  this.$items = keys.map(function (key) {
    var dst = descriptors[key];
    var type = findSupperType(dst.type);
    var isArray = false;
    if (type === 'array') {
      type = findSupperType(dst.of);
      isArray = true;
    }

    // if (!this.type2icon[type]) console.log(dst.type, type)

    var itemElt = (0, _FCore._)({
      tag: _TOCItem["default"],
      "class": isArray ? 'sc-is-array' : [],
      attr: {
        "data-original-type": type,
        "data-is-array": isArray ? 'true' : 'false'
      },
      props: {
        name: dst.displayName,
        icon: _this.type2icon[type] || _this.type2icon['*'],
        descriptor: Object.assign({
          originalType: type,
          isArray: isArray,
          typeId: key
        }, dst)
      },
      on: {
        click: function click() {
          _this.selectedTypeId = key;
        },
        dblclick: function dblclick() {
          _this.selectedTypeId = key;
          _this.notifyResolve(_this.selectedTypeId);
        }
      }
    });
    _this.$itemById[key] = itemElt;
    return itemElt;
  });
  this.$items.sort(function (a, b) {
    var aType = a.descriptor.originalType;
    var bType = b.descriptor.originalType;
    if (isNaN(_this.type2order[aType] - _this.type2order[bType])) {
      console.log(a.descriptor, b.descriptor);
    }
    if (aType !== bType) {
      return _this.type2order[aType] - _this.type2order[bType];
    } else if (a.descriptor.isArray !== b.descriptor.isArray) {
      if (a.descriptor.isArray) return 1;
      return -1;
    } else if (a.descriptor.displayName > b.descriptor.displayName) {
      return 1;
    } else if (a.descriptor.displayName < b.descriptor.displayName) {
      return -1;
    } else return 0;
  });
  this.$list.clearChild().addChild(this.$items);
  this.searchItems = this.$items.map(function (elt) {
    return {
      text: elt.descriptor.displayName,
      value: elt.descriptor.typeId
    };
  });
  (0, _search.prepareSearchForList)(this.searchItems);
  this.$okBtn.disabled = this.selectedTypeId === null;
};
SCTypeSelectionDialog.prototype.onResume = function () {
  this.$modal.addTo(document.body);
  this.scrollIntoSelected();
};
SCTypeSelectionDialog.prototype.onPause = function () {
  this.$modal.remove();
};
SCTypeSelectionDialog.prototype.scrollIntoSelected = function () {
  if (!this.$itemById) return;
  var itemElt = this.$itemById[this._selectedTypeId];
  if (itemElt && itemElt.isDescendantOf(this.$view)) (0, _utils.vScrollIntoView)(itemElt);
};
SCTypeSelectionDialog.prototype.createView = function () {
  var _this2 = this;
  /***
   * @type {Follower}
   */
  this.$view = (0, _FCore._)({
    tag: _MessageDialog["default"],
    "class": ['as-message-dialog', 'sc-type-selection-dialog'],
    child: [{
      tag: _Searcher["default"].tag
    }, {
      "class": 'as-message-dialog-list-ctn',
      child: {
        tag: _TOCList["default"].tag,
        "class": 'as-message-dialog-list'
      }
    }],
    props: {
      dialogActions: [{
        text: 'OK',
        cmd: 'ok',
        "class": 'as-message-dialog-ok-btn'
      }, {
        text: 'Cancel',
        cmd: 'cancel'
      }]
    },
    on: {
      action: function action(event) {
        if (event.action.cmd === 'ok') {
          _this2.notifyResolve(_this2.selectedTypeId);
        } else {
          _this2.notifyResolve(null);
        }
      }
    }
  });
  this.$okBtn = (0, _FCore.$)('.as-message-dialog-ok-btn', this.$view);
  this.$list = (0, _FCore.$)('.as-message-dialog-list', this.$view);
  this.$searchInput = (0, _FCore.$)(_Searcher["default"].tag, this.$view).on('stoptyping', this.ev_search.bind(this));
  this.$modal = (0, _FCore._)({
    tag: 'modal',
    child: this.$view
  });
};
SCTypeSelectionDialog.prototype.ev_search = function () {
  var _this3 = this;
  var query = this.$searchInput.value.trim().replace(/\s+/, ' ');
  if (!query) {
    this.$list.clearChild().addChild(this.$items);
    return;
  }
  var newList;
  var itemEltList;
  itemEltList = this.$cache[query];
  if (!itemEltList) {
    newList = (0, _search.searchListByText)(query, this.searchItems);
    itemEltList = newList.map(function (item) {
      return _this3.$itemById[item.value];
    });
    this.$cache[query] = itemEltList;
  }
  this.$list.clearChild().addChild(itemEltList);
};
Object.defineProperty(SCTypeSelectionDialog.prototype, 'selectedTypeId', {
  set: function set(value) {
    var prevId = this._selectedTypeId;
    this._selectedTypeId = value;
    if (!this.$itemById) return;
    var itemElt = this.$itemById[prevId];
    if (itemElt) itemElt.removeClass('sc-selected');
    itemElt = this.$itemById[value];
    if (itemElt) {
      itemElt.addClass('sc-selected');
      this.$okBtn.disabled = false;
    } else {
      this.$okBtn.disabled = true;
    }
    this.scrollIntoSelected();
  },
  get: function get() {
    if (this.$itemById && this.$itemById[this._selectedTypeId]) return this._selectedTypeId;
    return null;
  }
});
SCTypeSelectionDialog.prototype.notifyResolve = function (value) {
  this.emit('resolve', {
    value: value
  });
};
SCTypeSelectionDialog.prototype.openForResult = function (initValue) {
  var _this4 = this;
  if (arguments.length === 0) initValue = null;
  return new Promise(function (rs) {
    if (_this4._prevResolveCallback) {
      _this4._prevResolveCallback({
        value: null
      });
      _this4._prevResolveCallback = null;
    }
    var callback = function callback(event) {
      _this4.pause();
      _this4.off('resolve', callback);
      rs(event.value);
    };
    _this4._prevResolveCallback = callback;
    _this4.on('resolve', callback);
    _this4.start();
    _this4.selectedTypeId = initValue;
  });
};
var _default = SCTypeSelectionDialog;
exports["default"] = _default;

/***/ }),

/***/ 22430:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _FCore = __webpack_require__(51518);
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _SBClassManager = _interopRequireDefault(__webpack_require__(87048));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {SCBlocklyEditor} editor
 * @constructor
 */
function SCBEClipboard(editor) {
  this.editor = editor;
}
SCBEClipboard.prototype.version = 0;
SCBEClipboard.prototype.storageKey = 'SCBClipboardData';
SCBEClipboard.prototype.copy = function () {
  var blocks = this.editor.selectTool.selectedBlocks;
  if (blocks.length === 0) return;
  var ast = blocks[blocks.length - 1].ast;
  var json = JSON.stringify({
    descriptor: 'Blockly Clipboard',
    version: this.version,
    ast: ast
  });
  localStorage.setItem(this.storageKey, json);
  this.editor.notifyCmdDescriptorsChange();
};
SCBEClipboard.prototype.cut = function () {
  var blocks = this.editor.selectTool.selectedBlocks.slice();
  this.editor.selectTool.deselectAll();
  if (blocks.length === 0) return;
  var ast = blocks[blocks.length - 1].ast;
  var json = JSON.stringify({
    descriptor: 'Blockly Clipboard',
    version: this.version,
    ast: ast
  });
  localStorage.setItem(this.storageKey, json);
  blocks[blocks.length - 1].remove();
  this.editor.notifyASTChange();
  this.editor.rootNode.notifySizeChange();
  this.editor.notifyCmdDescriptorsChange();
};
SCBEClipboard.prototype.getAst = function () {
  var _this = this;
  if (this._astCache !== undefined) return this._astCache;
  setTimeout(function () {
    _this._astCache = undefined;
  }, 300);
  this._astCache = null;
  var raw, data;
  try {
    raw = localStorage.getItem(this.storageKey);
    if (raw) {
      data = JSON.parse(raw);
      if (data && data.version === this.version) {
        this._astCache = data.ast;
      }
    }
  } catch (err) {}
  return this._astCache;
};
SCBEClipboard.prototype.viewContent = function () {
  var ast = this.getAst();
  var blockElt;
  var clazz, block;
  if (ast) {
    clazz = _SBClassManager["default"].get(ast);
    block = new clazz();
    blockElt = block.elt;
    block.ast = ast;
  } else {
    blockElt = (0, _FCore._)({
      text: "Clipboard is empty!"
    });
  }
  var content = (0, _FCore._)({
    "class": ['sb-blockly-clipboard-content', 'as-bscroller'],
    child: blockElt
  });
  var dialog = (0, _FCore._)({
    tag: _MessageDialog["default"],
    "class": ['sb-blockly-clipboard-dialog'],
    child: [content],
    props: {
      dialogTitle: 'Clipboard',
      dialogActions: [{
        name: 'ok',
        text: "OK"
      }]
    },
    on: {
      action: function action(event) {
        modal.selfRemove();
      }
    }
  });
  var modal = (0, _FCore._)({
    tag: _Modal["default"],
    child: [dialog]
  });
  modal.addTo(document.body);
  if (block) {
    block.notifySizeChange();
  }
};
SCBEClipboard.prototype.pasteIn = function () {
  var ast = this.getAst();
  var clazz = _SBClassManager["default"].get(ast);
  var block = new clazz();
  var parentBlock = this.editor.selectTool.selectedBlocks[this.editor.selectTool.selectedBlocks.length - 1] || this.editor.rootNode;
  block.ast = ast;
  parentBlock.addChildBefore(block, null);
  this.editor.selectTool.selectBlock(block, 'normal');
};
SCBEClipboard.prototype.pasteBefore = function () {
  var ast = this.getAst();
  var selectedBlock = this.editor.selectTool.selectedBlocks[this.editor.selectTool.selectedBlocks.length - 1];
  if (!selectedBlock) return;
  var clazz = _SBClassManager["default"].get(ast);
  var block = new clazz();
  var parentBlock = selectedBlock.parent;
  block.ast = ast;
  parentBlock.addChildBefore(block, selectedBlock);
  this.editor.selectTool.selectBlock(block, 'normal');
};
SCBEClipboard.prototype.pasteAfter = function () {
  var ast = this.getAst();
  var selectedBlock = this.editor.selectTool.selectedBlocks[this.editor.selectTool.selectedBlocks.length - 1];
  if (!selectedBlock) return;
  var clazz = _SBClassManager["default"].get(ast);
  var block = new clazz();
  var parentBlock = selectedBlock.parent;
  block.ast = ast;
  parentBlock.addChildAfter(block, selectedBlock);
  this.editor.selectTool.selectBlock(block, 'normal');
};
var _default = SCBEClipboard;
exports["default"] = _default;

/***/ }),

/***/ 33242:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FCore = __webpack_require__(51518);
var _utils = __webpack_require__(84512);
var findBlock = function findBlock(elt) {
  while (elt) {
    if (elt.sbBlock) return elt.sbBlock;
    elt = elt.parentElement;
  }
  return null;
};
function SCBESelectTool(editor) {
  var _this = this;
  this.editor = editor;
  Object.keys(SCBESelectTool.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) _this[key] = _this[key].bind(_this);
  });
  this.selectedBlocks = [];
}
SCBESelectTool.prototype.onCreateView = function () {
  this.editor.$content.on('click', this.ev_click);
  this.editor.$content.defineEvent('contextmenu').on('contextmenu', this.ev_contextMenu);
};
SCBESelectTool.prototype.deselectAll = function () {
  this.selectedBlocks.forEach(function (block) {
    block.elt.removeClass('as-last-selected').removeClass('as-selected');
  });
  this.selectedBlocks.splice(0, this.selectedBlocks.length);
  this.editor.notifyCmdDescriptorsChange();
};
SCBESelectTool.prototype.deselectHiddenBlock = function () {
  var _this2 = this;
  var blocks = this.selectedBlocks.slice();
  blocks.forEach(function (blk) {
    if (!blk.$elt || blk.$elt.getBoundingClientRect().height === 0) _this2.selectBlock(blk, "remove");
  });
};

/***
 *
 * @param {SBBase|null} block
 * @param {"normal"|"append"|"remove"|"toggle"=}selectMode
 */
SCBESelectTool.prototype.selectBlock = function (block, selectMode) {
  if (!block) {
    this.deselectAll();
    return;
  }
  var idx = this.selectedBlocks.indexOf(block);
  switch (selectMode) {
    case "append":
      if (idx >= 0) this.selectedBlocks.splice(idx, 1);
      this.selectedBlocks.push(block);
      block.elt.addClass('as-selected');
      break;
    case "remove":
      if (idx >= 0) {
        this.selectedBlocks.splice(idx, 1);
        block.elt.removeClass('as-selected').removeClass('as-last-selected');
      }
      break;
    case "toggle":
      if (idx >= 0) this.selectBlock(block, "remove");else this.selectBlock(block, 'append');
      return;
    default:
      this.selectedBlocks.forEach(function (block) {
        return block.elt.removeClass('as-selected').removeClass('as-last-selected');
      });
      this.selectedBlocks.splice(0, this.selectedBlocks.length);
      this.selectedBlocks.push(block);
      block.elt.addClass('as-selected');
  }
  this.selectedBlocks.forEach(function (block, i, arr) {
    if (i + 1 < arr.length) {
      block.elt.removeClass('as-last-selected');
    } else {
      block.elt.addClass('as-last-selected');
    }
  });
  this.editor.notifyCmdDescriptorsChange();
};
SCBESelectTool.prototype.ev_click = function (event) {
  var block = findBlock(event.target);
  if (block && block.astType) this.selectBlock(block);
};
SCBESelectTool.prototype.ev_contextMenu = function (event) {
  var _this3 = this;
  var block = findBlock(event.target);
  if (block && block.astType) {
    this.selectBlock(block);
    event.showContextMenu(this.editor.getContextMenuPropsOfBlock(block), function (event) {
      _this3.editor.onContextMenuOfBlock(block, (0, _utils.cleanMenuItemProperty)(event.menuItem));
    });
  }
};
var _default = SCBESelectTool;
exports["default"] = _default;

/***/ }),

/***/ 25211:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {SCBlocklyEditor} editor
 * @constructor
 */
function SCBEViewportController(editor) {
  var _this = this;
  this.editor = editor;
  Object.keys(SCBEViewportController.prototype).filter(function (key) {
    return key.startsWith('ev_');
  }).forEach(function (key) {
    return _this[key] = _this[key].bind(_this);
  });
  this.OXY = new _Vec["default"](0, 0);
  this.overOffset = new _Vec["default"](0, 0);
}
SCBEViewportController.prototype.onCreateView = function () {
  var _this2 = this;
  this.$content = this.editor.$content.on('scroll', this.updateScrollbar.bind(this));
  this.$body = this.editor.$body.on('wheel', this.ev_wheel).on('dragstart', this.ev_dragStart);
  this.$vscrollbar = this.editor.$vscrollbar;
  this.$hscrollbar = this.editor.$hscrollbar;
  this.$vscrollbar.on('active', function () {
    _this2._isScrollActivated = true;
  }).on('inactive', function () {
    _this2._isScrollActivated = false;
    _this2.updateScrollbar();
  }).on('scroll', function () {
    var top = _this2.$vscrollbar.innerOffset - _this2.overOffset.y;
    _this2.OXY = new _Vec["default"](_this2.OXY.x, -top);
    _this2.$content.addStyle({
      top: _this2.OXY.y + 'px'
    });
    _this2.$content.emit('scroll');
  });
  this.$hscrollbar.on('active', function () {
    _this2._isScrollActivated = true;
  }).on('inactive', function () {
    _this2._isScrollActivated = false;
    _this2.updateScrollbar();
  }).on('scroll', function () {
    var left = _this2.$hscrollbar.innerOffset - _this2.overOffset.x;
    _this2.OXY = new _Vec["default"](-left, _this2.OXY.x);
    _this2.$content.addStyle({
      left: _this2.OXY.x + 'px'
    });
    _this2.$content.emit('scroll');
  });
};
SCBEViewportController.prototype.ev_wheel = function (event) {
  event.preventDefault();
  var dx = 0;
  var dy = 0;
  if (event.shiftKey) {
    dx = -event.deltaY;
  } else {
    dy = -event.deltaY;
  }
  this.OXY = this.OXY.add(new _Vec["default"](dx, dy));
  this.$content.addStyle({
    left: this.OXY.x + 'px',
    top: this.OXY.y + 'px'
  });
  this.$content.emit('scroll');
};
SCBEViewportController.prototype.ev_dragStart = function (event) {
  if (event.target === this.$body) {
    this.$body.on('drag', this.ev_drag).on('dragend', this.ev_dragEnd);
  }
};
SCBEViewportController.prototype.ev_dragEnd = function (event) {
  this.$body.off('drag', this.ev_drag).off('dragend', this.ev_dragEnd);
  this.OXY = this.OXY.add(event.currentPoint.sub(event.startingPoint));
};
SCBEViewportController.prototype.ev_drag = function (event) {
  var newXY = this.OXY.add(event.currentPoint.sub(event.startingPoint));
  this.$content.addStyle({
    left: newXY.x + 'px',
    top: newXY.y + 'px'
  });
  this.$content.emit('scroll');
};
SCBEViewportController.prototype.reset = function () {
  var _this3 = this;
  this.OXY = new _Vec["default"](0, 0);
  if (this.$content) {
    this.$content.addStyle('transition', 'all 0.2s');
    setTimeout(function () {
      _this3.$content.addStyle({
        left: '0',
        top: '0'
      });
      _this3.updateScrollbar();
    }, 1);
    setTimeout(function () {
      _this3.$content.removeStyle('transition');
      _this3.updateScrollbar();
    }, 210);
  }
};
SCBEViewportController.prototype.updateScrollbar = function () {
  if (this._isScrollActivated) return;
  var outerBound = _Rectangle["default"].fromClientRect(this.$body.getBoundingClientRect());
  var innerBound = this.$content.firstChild ? _Rectangle["default"].fromClientRect(this.$content.firstChild.getBoundingClientRect()) : null;
  if (innerBound) {
    innerBound.x -= 4;
    innerBound.y -= 9;
    innerBound.width += 14;
    innerBound.height += 19;
  } else {
    innerBound = outerBound;
  }
  var scrollingRect = innerBound.merge(outerBound);
  this.overOffset = innerBound.A().sub(scrollingRect.A());
  var scrollingOffset = outerBound.A().sub(scrollingRect.A());
  this.$vscrollbar.innerHeight = scrollingRect.height;
  this.$vscrollbar.outerHeight = outerBound.height;
  this.$vscrollbar.innerOffset = scrollingOffset.y;
  this.$hscrollbar.innerWidth = scrollingRect.width;
  this.$hscrollbar.outerWidth = outerBound.width;
  this.$hscrollbar.innerOffset = scrollingOffset.x;
  if (scrollingRect.height > outerBound.height) {
    this.$hscrollbar.addStyle('right', '10px');
  } else {
    this.$hscrollbar.removeStyle('right');
  }
  if (scrollingRect.width > outerBound.width) {
    this.$vscrollbar.addStyle('bottom', '10px');
  } else {
    this.$vscrollbar.removeStyle('bottom');
  }
};
SCBEViewportController.prototype.updateSize = function () {
  this.updateScrollbar();
};
var _default = SCBEViewportController;
exports["default"] = _default;

/***/ }),

/***/ 52942:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var _exportNames = {};
Object.defineProperty(exports, "default", ({
  enumerable: true,
  get: function get() {
    return _SCExpressionCaller["default"];
  }
}));
var _SCExpressionCaller = _interopRequireWildcard(__webpack_require__(53018));
Object.keys(_SCExpressionCaller).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _SCExpressionCaller[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function get() {
      return _SCExpressionCaller[key];
    }
  });
});
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

/***/ }),

/***/ 11547:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "default", ({
  enumerable: true,
  get: function get() {
    return _SCParser["default"];
  }
}));
var _SCParser = _interopRequireDefault(__webpack_require__(13682));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

/***/ }),

/***/ 45540:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "default", ({
  enumerable: true,
  get: function get() {
    return _SCProgramInstance["default"];
  }
}));
var _SCProgramInstance = _interopRequireWildcard(__webpack_require__(47790));
var ExcelFx = _interopRequireWildcard(__webpack_require__(91550));
var _utils = __webpack_require__(84512);
var _SCTypeManager = _interopRequireDefault(__webpack_require__(6360));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var std = {
  isRealNumber: _utils.isRealNumber,
  isNaturalNumber: _utils.isNaturalNumber
};
std.delay = function (mil) {
  return new Promise(function (rs) {
    setTimeout(rs, mil);
  });
};
Object.keys(ExcelFx).reduce(function (ac, key) {
  Object.defineProperty(ac, key, {
    enumerable: true,
    writable: false,
    value: ExcelFx[key]
  });
  return ac;
}, std);
_SCProgramInstance.SCStaticLibScope.declareConst('std', std, true, 'std');
_SCProgramInstance.SCStaticLibScope.declareConst('Date', Date, true, 'Date');
_SCProgramInstance.SCStaticLibScope.declareConst('Math', Math, true, 'Math');
_SCProgramInstance.SCStaticLibScope.declareConst('Date', Date, true, 'Math');
_SCProgramInstance.SCStaticLibScope.declareConst('Object', Object, true, 'Math');
_SCProgramInstance.SCStaticLibScope.declareConst('Array', Array, true, 'Math');
var descriptors = {};
function argsOf(func) {
  var res = [];
  var txt, matched;
  txt = func + '';
  matched = txt.match(/^\s*function[^(]*\(([^)]*)\)/);
  if (matched) {
    res = matched[1].split(',').map(function (x) {
      return x.trim();
    }).filter(function (x) {
      return !!x;
    }).map(function (name) {
      name = name + '';
      var optional = false;
      if (name.indexOf('=') >= 0) {
        name = name.split('=').shift().trim();
        optional = true;
      }
      var desc = {
        type: 'any',
        name: name
      };
      if (optional) desc.optional = true;
      return desc;
    });
  }
  return res;
}
function visit(target, path) {
  var res = {
    typeId: path.join('.')
  };
  if (target === undefined) {
    delete res.typeId;
    res.type = 'null';
  } else if (target === null) {
    delete res.typeId;
    res.type = 'null';
  } else if (_typeof(target) === "object") {
    res.type = 'object';
    res.properties = Object.keys(target).map(function (key) {
      var p = visit(target[key], path.concat([key]));
      p.name = key;
      return p;
    });
  } else if (typeof target === "function") {
    res.type = 'function';
    res.args = argsOf(target);
  }
  return res;
}
descriptors['std'] = visit(std, ['std']);
_SCTypeManager["default"].addTypeDescriptors(descriptors);

/***/ }),

/***/ 33192:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.autoMigrateAst = autoMigrateAst;
exports.isExpressionAst = isExpressionAst;
function isExpressionAst(ast) {
  return ast.type && ast.type && (ast.type === 'Identifier' || ast.type.endsWith('Expression') || ast.type.endsWith('Literal'));
}
function autoMigrateAst(oldAst, newAst) {
  if (!oldAst) return newAst;
  if (newAst.type === 'MemberExpression' && !newAst.object && isExpressionAst(oldAst)) {
    newAst.object = oldAst;
  } else if (newAst.type === 'CallExpression' && !newAst.callee && (oldAst.type === 'Identifier' || oldAst.type === 'MemberExpression')) {
    newAst.callee = oldAst;
  } else if (newAst.type === 'UnaryExpression' && !newAst.argument && isExpressionAst(oldAst)) {
    newAst.argument = oldAst;
  } else if (newAst.type === 'BinaryExpression' && !newAst.left && isExpressionAst(oldAst)) {
    newAst.left = oldAst;
  } else if (newAst.type === 'ArrayExpression' && !newAst.elements && isExpressionAst(oldAst)) {
    newAst.elements = [oldAst];
  }
  return newAst;
}

/***/ }),

/***/ 52933:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _BaseShape = _interopRequireDefault(__webpack_require__(25729));
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Svg["default"].ShareInstance._;
var $ = _Svg["default"].ShareInstance.$;

/***
 * @extends BaseShape
 * @constructor
 */
function Ellipse() {
  _BaseShape["default"].call(this);
}
(0, _inheritComponentClass["default"])(Ellipse, _BaseShape["default"]);
Ellipse.prototype.tag = "Ellipse";
Ellipse.prototype.menuIcon = "span.mdi.mdi-ellipse-outline";
Ellipse.prototype.renderContent = function () {
  return _('ellipse');
};
Ellipse.prototype.setStyleStrokeWidth = function (value) {
  value = _BaseShape["default"].prototype.setStyleStrokeWidth.call(this, value);
  if (this.$content) this.$content.addStyle('strokeWidth', value + '');
  this.updateShape();
  return value;
};
Ellipse.prototype.updateShape = function () {
  if (!this.domElt) return;
  var bound = this.view.getBoundingClientRect();
  this.$content.addStyle({
    cx: bound.width / 2 + '',
    cy: bound.height / 2 + '',
    rx: Math.max(bound.width - this.style.strokeWidth - 0.1, 0) / 2 + '',
    // prevent miss some pixel
    ry: Math.max(bound.height - this.style.strokeWidth - 0.1, 0) / 2 + ''
  });
};
_Assembler.AssemblerInstance.addClass(Ellipse);
var _default = Ellipse;
exports["default"] = _default;

/***/ }),

/***/ 82026:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _BaseShape = _interopRequireDefault(__webpack_require__(25729));
var _Ellipse = _interopRequireDefault(__webpack_require__(52933));
var _Assembler = __webpack_require__(2326);
var _inheritComponentClass = _interopRequireDefault(__webpack_require__(67620));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Svg["default"].ShareInstance._;
var $ = _Svg["default"].ShareInstance.$;
function Rectangle() {
  _BaseShape["default"].call(this);
}
(0, _inheritComponentClass["default"])(Rectangle, _BaseShape["default"]);
Rectangle.prototype.tag = "Rectangle";
Rectangle.prototype.menuIcon = "span.mdi.mdi-rectangle-outline";
_BaseShape["default"].prototype.onCreate = function () {
  _BaseShape["default"].prototype.onCreate.call(this);
  this.style.roundCornerX = 0;
  this.style.roundCornerY = 0;
};
Rectangle.prototype.renderContent = function () {
  return _('rect');
};
Rectangle.prototype.setStyleRoundCornerX = function (value) {
  if (!(value >= 0)) value = 0;
  if (this.$content) {
    this.$content.attr('rx', value === 0 ? undefined : value + '');
  }
  return value;
};
Rectangle.prototype.setStyleRoundCornerY = function (value) {
  if (!(value >= 0)) value = 0;
  if (this.$content) this.$content.attr('ry', value === 0 ? undefined : value + '');
  return value;
};
Rectangle.prototype.getStyleRoundCornerXDescriptor = function () {
  return {
    type: 'number',
    min: 0,
    max: Infinity,
    sign: 'ShapeRoundCornerX'
  };
};
Rectangle.prototype.getStyleRoundCornerYDescriptor = function () {
  return {
    type: 'number',
    min: 0,
    max: Infinity,
    sign: 'ShapeRoundCornerY'
  };
};
Rectangle.prototype.updateShape = function () {
  var bound = this.view.getBoundingClientRect();
  this.$content.attr({
    x: (this.style.strokeWidth + 0.1) / 2,
    y: (this.style.strokeWidth + 0.1) / 2,
    width: Math.max(0, bound.width - this.style.strokeWidth - 0.1) + '',
    height: Math.max(0, bound.height - this.style.strokeWidth - 0.1) + ''
  });
};
_Assembler.AssemblerInstance.addClass(Rectangle);
var _default = Rectangle;
exports["default"] = _default;

/***/ }),

/***/ 2515:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
__webpack_require__(89074);
var _DebugTask = _interopRequireDefault(__webpack_require__(69382));
__webpack_require__(19858);
__webpack_require__(47515);
var _Draggable = _interopRequireDefault(__webpack_require__(39891));
var _EmojiChars = _interopRequireDefault(__webpack_require__(24394));
var _EmojiAnims = _interopRequireDefault(__webpack_require__(98541));
var _install = _interopRequireDefault(__webpack_require__(4337));
var _BlurTrigger = _interopRequireDefault(__webpack_require__(17471));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var AComp = {
  core: _ACore["default"],
  $: _ACore["default"].$,
  _: _ACore["default"]._,
  creator: _ACore["default"].creator,
  buildDom: _ACore["default"].buildDom,
  runDebugTask: _DebugTask["default"].start.bind(_DebugTask["default"]),
  Draggable: _Draggable["default"],
  EmojiChars: _EmojiChars["default"],
  EmojiAnims: _EmojiAnims["default"],
  install: _install["default"],
  BlurTrigger: _BlurTrigger["default"]
};
window.runDebugTask = _DebugTask["default"].start.bind(_DebugTask["default"]);
var _default = AComp;
exports["default"] = _default;

/***/ }),

/***/ 34093:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports._ = exports.$$ = exports.$ = void 0;
__webpack_require__(7425);
var _Dom = _interopRequireDefault(__webpack_require__(64821));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var ACore = new _Dom["default"]({
  creator: Object.assign({}, _Dom["default"].ShareInstance.creator)
});
var _ = ACore._;
exports._ = _;
var $ = ACore.$;
exports.$ = $;
var $$ = ACore.$$;
exports.$$ = $$;
var _default = ACore;
exports["default"] = _default;

/***/ }),

/***/ 65554:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
__webpack_require__(23470);
__webpack_require__(46790);
var _AComp = _interopRequireDefault(__webpack_require__(2515));
var string = _interopRequireWildcard(__webpack_require__(59163));
__webpack_require__(44629);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _ChromeCalendar = _interopRequireDefault(__webpack_require__(51631));
var _Radio = _interopRequireDefault(__webpack_require__(78994));
var _EmojiChars = _interopRequireDefault(__webpack_require__(24394));
var _EmojiAnims = _interopRequireDefault(__webpack_require__(98541));
var _MessageInput = _interopRequireWildcard(__webpack_require__(42049));
var _EmojiPicker = _interopRequireDefault(__webpack_require__(24169));
var _ContextMenu = _interopRequireDefault(__webpack_require__(24733));
var _install = _interopRequireDefault(__webpack_require__(4337));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var utils = _interopRequireWildcard(__webpack_require__(84512));
var _materializeIconTrigger = _interopRequireDefault(__webpack_require__(49401));
var _VariantColors = _interopRequireDefault(__webpack_require__(97428));
var _Tooltip = _interopRequireDefault(__webpack_require__(54946));
var _TextMeasure = _interopRequireDefault(__webpack_require__(60268));
var _BContextCapture = _interopRequireDefault(__webpack_require__(29885));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _CPUViewer = _interopRequireDefault(__webpack_require__(84963));
var _ListDictionary = _interopRequireDefault(__webpack_require__(50218));
var _OverviewWidget = _interopRequireDefault(__webpack_require__(82609));
var _OverviewPage = _interopRequireDefault(__webpack_require__(73759));
var _DynamicCSS = _interopRequireDefault(__webpack_require__(30401));
var _Finder = __webpack_require__(14591);
var _printer = __webpack_require__(1130);
var _MApplication = _interopRequireDefault(__webpack_require__(32878));
var _MActivity = _interopRequireDefault(__webpack_require__(5478));
var _ListSearchMaster = _interopRequireDefault(__webpack_require__(85604));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
absol.VariantColors = _VariantColors["default"];
absol.parseMessage = _MessageInput.parseMessage;
absol.vScrollIntoView = utils.vScrollIntoView;

//for export to window
absol.Tooltip = _Tooltip["default"];
absol.QuickMenu = _QuickMenu["default"];
absol.AComp = _AComp["default"];
absol.Radio = _Radio["default"];
absol.EmojiChars = _EmojiChars["default"];
absol.EmojiAnims = _EmojiAnims["default"];
absol.ChromeCalendar = _ChromeCalendar["default"];
(0, _install["default"])(absol.coreDom);
//old module
absol.coreDom.install('searchcrosstextinput', _Searcher["default"]);
Object.assign(absol.string, string);
absol.MessageInput = _MessageInput["default"];
absol.EmojiPicker = _EmojiPicker["default"];
absol.ContextCaptor = _ContextMenu["default"];
absol.ListDictionary = _ListDictionary["default"];
absol.FinderFileSystem = _Finder.FinderFileSystem;
window.AComp = absol.AComp;
absol.TextMeasure = _TextMeasure["default"];
absol.printer.silentDownloadAsPdf = _printer.silentDownloadAsPdf;
absol.ListSearchMaster = _ListSearchMaster["default"];
_Dom["default"].documentReady.then(function () {
  var mdiLink = absol.$('link', document.head, function (e) {
    if (e.href && e.href.toLowerCase().indexOf('materialdesignicons') >= 0) return true;
  });
  if (!mdiLink) {
    mdiLink = absol._({
      tag: 'link',
      attr: {
        rel: 'stylesheet',
        href: 'https://absol.cf/vendor/materialdesignicons/materialdesignicons.css'
      }
    }).addTo(document.head);
  }
});
Object.assign(absol.$, utils);

// materializeIconTrigger();

absol.openFileDialog = utils.openFileDialog;
absol.CPUViewer = _CPUViewer["default"];
absol.OverviewWidget = _OverviewWidget["default"];
absol.OverviewPage = _OverviewPage["default"];
absol.MApplication = _MApplication["default"];
absol.MActivity = _MActivity["default"];
_Dom["default"].documentReady.then(function () {
  _ContextMenu["default"].auto();
});
function testFont() {
  var dynamicCSs = new _DynamicCSS["default"]();
  var value = parseInt(localStorage.getItem('as_test_font_size')) || 14;
  var fontSizeInput = absol._({
    tag: 'numberinput',
    props: {
      step: 1,
      min: 5,
      value: value
    },
    on: {
      change: function change() {
        localStorage.setItem('as_test_font_size', fontSizeInput.value + '');
        dynamicCSs.setProperty(':root', 'font-size', fontSizeInput.value + 'px').commit();
        window.dispatchEvent(new Event('resize'));
      }
    }
  });
  dynamicCSs.setProperty(':root', 'font-size', fontSizeInput.value + 'px').commit();
  window.dispatchEvent(new Event('resize'));
  var modal = absol._({
    style: {
      background: 'white',
      position: 'fixed',
      top: '5px',
      right: '5px',
      padding: '5px',
      border: '1px solid #ddd',
      zIndex: 1e9
    },
    child: ['<label>font-size </label>', fontSizeInput]
  }).addTo(document.body);
}
if (location.href.indexOf('localhost') >= 0) {
  // Dom.documentReady.then(testFont);
}

/***/ }),

/***/ 54845:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(63824);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _SearchStringArrayAdapter = _interopRequireDefault(__webpack_require__(27521));
var _SearchObjectArrayAdapter = _interopRequireDefault(__webpack_require__(10035));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 *
 * @extends {AElement}
 * @constructor
 */
function AutoCompleteInput() {
  this.$input = $('input', this).on('keyup', this.eventHandler.keyup).on('keydown', this.eventHandler.keydown).on('focus', this.eventHandler.focus).on('blur', this.eventHandler.blur);
  this.$dropdown = $('.absol-autocomplete-input-dropdown', this);
  this.$vscroller = $('bscroller', this).on('click', this.eventHandler.vscrollerClick);
  this.$poolItems = [];
  this._currentData = [];
  this._sessionIndex = 0;
  this._updatedSession = -1;
  this._cache = {};
  _OOP["default"].drillProperty(this, this.$input, 'value');
}
AutoCompleteInput.tag = 'AutoCompleteInput'.toLowerCase();
AutoCompleteInput.render = function () {
  return _({
    extendEvent: 'change',
    "class": 'absol-autocomplete-input',
    child: ['input[type="text"].absol-autocomplete-input-text', {
      "class": 'absol-autocomplete-input-dropdown',
      style: {
        display: 'none'
      },
      child: {
        tag: 'bscroller',
        style: {
          'max-height': '500px'
        }
      }
    }]
  });
};
AutoCompleteInput.eventHandler = {};
AutoCompleteInput.eventHandler.keyup = function (event) {
  if (this._keyTimeout) {
    clearTimeout(this._keyTimeout);
    this._keyTimeout = 0;
  }
  var cTimeout = setTimeout(function () {
    clearTimeout(cTimeout);
    this.find();
  }.bind(this), 300);
  if (this._cacheTimeout) {
    clearTimeout(this._cacheTimeout);
    this._cacheTimeout = 0;
  }
  var cacheTimeout = setTimeout(function () {
    clearTimeout(cacheTimeout);
    this.clearCache();
  }.bind(this), 300);
  this._cacheTimeout = cacheTimeout;
  this._keyTimeout = cTimeout;
};
AutoCompleteInput.eventHandler.blur = function () {
  if (!this.hasClass('focus')) return;
  this.removeClass('focus');
  $(document.body).off('mousedown', this.eventHandler.clickOut);
};
AutoCompleteInput.eventHandler.focus = function () {
  if (this.hasClass('focus')) return;
  this.addClass('focus');
  $(document.body).on('mousedown', this.eventHandler.clickOut);
};
AutoCompleteInput.eventHandler.clickOut = function (event) {
  if (_EventEmitter["default"].hitElement(this, event)) return;
  $(document.body).off('mousedown', this.eventHandler.clickOut);
  var text = this.$input.value;
  if (this._lastValue != text) {
    this._lastValue = text;
    this.$dropdown.addStyle('display', 'none');
    this._lastValue = text;
    this.emit('change', {
      target: this,
      value: text
    }, this);
  }
};
AutoCompleteInput.eventHandler.vscrollerClick = function (event) {
  var current = event.target;
  while (current && current.hasClass && !current.hasClass('absol-autocomplete-input-item') && current != this.$vscroller) {
    current = current.parentElement;
  }
  if (current && current._holderItem) {
    var text = this.getItemText(current._holderItem);
    this.$input.value = text;
    this._lastQuery = text;
    this._selectedIndex = current._holderIndex;
    this.$dropdown.addStyle('display', 'none');
    this._lastValue = text;
    this.emit('change', {
      target: this,
      value: text
    }, this);
  }
};
AutoCompleteInput.eventHandler.keydown = function (event) {
  var key = event.key;
  if (key === 'ArrowDown') {
    if (this._selectedIndex + 1 < this._currentData.length) {
      if (this.$poolItems[this._selectedIndex]) {
        this.$poolItems[this._selectedIndex].removeClass('active');
      }
      this._selectedIndex += 1;
      if (this.$poolItems[this._selectedIndex]) {
        this.$poolItems[this._selectedIndex].addClass('active');
        this.$vscroller.scrollInto(this.$poolItems[this._selectedIndex]);
      }
    }
    event.preventDefault();
  } else if (key === 'ArrowUp') {
    if (this._selectedIndex - 1 >= 0) {
      if (this.$poolItems[this._selectedIndex]) {
        this.$poolItems[this._selectedIndex].removeClass('active');
      }
      this._selectedIndex -= 1;
      if (this.$poolItems[this._selectedIndex]) {
        this.$poolItems[this._selectedIndex].addClass('active');
        this.$vscroller.scrollInto(this.$poolItems[this._selectedIndex]);
      }
    }
    event.preventDefault();
  } else if (key === 'Enter') {
    var text;
    if (this._currentData[this._selectedIndex] === undefined) {
      text = this.$input.value;
    } else {
      text = this.getItemText(this._currentData[this._selectedIndex]);
      this.$input.value = text;
    }
    this._lastQuery = text;
    this.$dropdown.addStyle('display', 'none');
    this._lastValue = text;
    this.emit('change', {
      target: this,
      value: text
    }, this);
  }
};
AutoCompleteInput.prototype.focus = function () {
  if (this.disabled) return;
  this.$input.focus.apply(this.$input, arguments);
};
AutoCompleteInput.prototype.blur = function () {
  this.$input.blur.apply(this.$input, arguments);
};
AutoCompleteInput.prototype.select = function () {
  this.$input.select.apply(this.$input, arguments);
};
AutoCompleteInput.prototype.find = function () {
  var query = this.$input.value;
  if (query == this._lastQuery) return;
  this._lastQuery = query;
  var currentSession = ++this._sessionIndex;
  if (!query) {
    this.pushData([], currentSession, query);
    return;
  }
  if (this.disableCache) {
    var onReciveData = function (data) {
      cacheHolder.data = data;
      this.pushData(data, currentSession, query); //sessionIndex may be change
    }.bind(this);
    var result = this.queryItems(query);
    if (typeof result.then == 'function') result.then(onReciveData);else onReciveData(result);
  } else {
    if (this._cache[query]) {
      this._cache[query].sessionIndex = currentSession;
      if (!this._cache[query].pending) {
        var data = this._cache[query].data;
        this.pushData(data, currentSession);
      }
    } else {
      var cacheHolder = {
        pending: true,
        sessionIndex: currentSession
      };
      var onReciveData = function (data) {
        cacheHolder.data = data;
        cacheHolder.pending = false;
        this.pushData(data, cacheHolder.sessionIndex, query); //sessionIndex may be change
      }.bind(this);
      var result = this.queryItems(query);
      if (typeof result.then == 'function') result.then(onReciveData);else onReciveData(result);
      this._cache[query] = cacheHolder;
    }
  }
};
AutoCompleteInput.prototype.pushData = function (data, sessionIndex, query) {
  if (sessionIndex > this._updatedSession) {
    this._updatedSession = sessionIndex;
    this.$vscroller.clearChild();
    this._currentData = data;
    if (data && data.length > 0) {
      this.$dropdown.removeStyle('display');
    } else {
      this.$dropdown.addStyle('display', 'none');
    }
    var maxHeight = this.getComputedStyleValue('max-height');
    if (maxHeight == 'none' || !maxHeight) {
      maxHeight = 10000;
    } else {
      maxHeight = parseFloat(maxHeight.replace('px', ''));
    }
    var outBound = _Dom["default"].traceOutBoundingClientRect(this);
    var bound = this.$input.getBoundingClientRect();
    var aTop = bound.top - outBound.top;
    var aBotom = outBound.bottom - bound.bottom;
    this.$dropdown.removeClass('top');
    if (aTop > aBotom) {
      maxHeight = Math.min(maxHeight, aTop - 10);
    } else {
      maxHeight = Math.min(maxHeight, aBotom - 10);
    }
    this.$vscroller.addStyle('max-height', maxHeight + 'px');
    this._selectedIndex = -1;
    data.reduce(function (sync, item, i, arr) {
      return sync.then(function () {
        if (this._updatedSession != sessionIndex) return;
        return new Promise(function (rs) {
          if (this._updatedSession != sessionIndex) return;
          var reuseItem = this.$poolItems.length > i ? this.$poolItems[i] : undefined;
          if (reuseItem) {
            reuseItem.removeClass('active');
          }
          var newView = this.getItemView(item, i, _, $, query, reuseItem, this);
          newView.addClass('absol-autocomplete-input-item');
          newView._holderItem = item;
          newView._holderIndex = i;
          if (i == this._selectedIndex) newView.addClass('active');
          if (this.$poolItems.length <= i) {
            this.$poolItems.push(newView);
          } else {
            this.$poolItems[i] = newView;
          }
          this.$vscroller.addChild(newView);
          if (i == 0) {
            var estimateHeight = newView.getBoundingClientRect().height * arr.length;
            if (aTop > aBotom && estimateHeight > aBotom) {
              this.$dropdown.addClass('top');
            }
          }
          if (i >= 50 && i % 50 == 0) setTimeout(rs, 0);else rs();
        }.bind(this));
      }.bind(this));
    }.bind(this), Promise.resolve());
  }
};
AutoCompleteInput.prototype.getItemText = function (item) {
  if (this.adapter && this.adapter.getItemText) {
    return this.adapter.getItemText(item, this);
  } else if (typeof item == 'string') {
    return item;
  } else {
    throw Error('You need adapter.getItemText(item, mAutoCompleteInput) to handle your item text!');
  }
};
AutoCompleteInput.prototype.getItemView = function (item, index, _, $, query, reuseItem, refParent) {
  if (this.adapter && this.adapter.getItemView) {
    return this.adapter.getItemView(item, index, _, $, query, reuseItem, refParent, this);
  } else {
    var text = this.getItemText(item);
    if (reuseItem) {
      reuseItem.childNodes[0].innerHTML = text;
      return reuseItem;
    }
    return _({
      child: {
        tag: 'span',
        "class": 'absol-autocomplete-input-item-text',
        child: {
          text: text
        }
      }
    });
  }
};

/**
 * @param {String} query
 * @returns {Array}
 */
AutoCompleteInput.prototype.queryItems = function (query) {
  if (this.adapter && this.adapter.queryItems) {
    return this.adapter.queryItems(query, this);
  } else {
    throw new Error('Invalid adapter: queryItems(query, mAutoCompleteInput) not found!');
  }
};
AutoCompleteInput.prototype.clearCache = function (old) {
  if (typeof old != "number") old = 30;
  for (var key in this._cache) {
    var cacheHolder = this._cache[key];
    if (this._sessionIndex - cacheHolder.sessionIndex > old) {
      delete this._cache[key];
    }
  }
};
AutoCompleteInput.property = {};
AutoCompleteInput.property.adapter = {
  set: function set(value) {
    if (value instanceof Array) {
      if (value[0] == 'SearchStringArray') {
        this._adapter = new _SearchStringArrayAdapter["default"](value[1], value[2]);
      } else if (value[0] == 'SearchObjectArray') {
        this._adapter = new _SearchObjectArrayAdapter["default"](value[1], value[2]);
      } else {
        throw new Error("Unknown adapter type name");
      }
    } else {
      this._adapter = value;
    }
    if (this.adapter && this.adapter.onAttached) {
      this.adapter.onAttached(this);
    }
  },
  get: function get() {
    return this._adapter;
  }
};
AutoCompleteInput.property.selectedItem = {
  get: function get() {
    return this._currentData && this._currentData[this._selectedIndex] || null;
  }
};
AutoCompleteInput.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('absol-disabled');
    } else {
      this.removeClass('absol-disabled');
    }
  },
  get: function get() {
    return this.hasClass('absol-disabled');
  }
};
AutoCompleteInput.attribute = {};
AutoCompleteInput.attribute.disabled = {
  set: function set(value) {
    if (value === true || value === 'true' || value === null) {
      this.disabled = true;
    } else {
      this.disabled = false;
    }
  },
  get: function get() {
    return this.disabled ? 'true' : 'false';
  },
  remove: function remove() {
    this.disabled = false;
  }
};
_ACore["default"].install(AutoCompleteInput);
var _default = AutoCompleteInput;
exports["default"] = _default;

/***/ }),

/***/ 29885:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _ContextMenu = _interopRequireDefault(__webpack_require__(24733));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * simple way, to replace old ContextCapture version
 ***/

function BContextCapture() {
  _EventEmitter["default"].call(this);
  this.sync = Promise.resolve();
  this.$root = null;
  this._pointerSession = 0;
  this.ev_contextMenu = this.ev_contextMenu.bind(this);
}
_OOP["default"].mixClass(BContextCapture, _EventEmitter["default"]);
BContextCapture.prototype.attachTo = function (elt) {
  if (this.$root) this.$root.removeEventListener('contextmenu', this.ev_contextMenu, false);
  this.$root = elt;
  if (this.$root) this.$root.addEventListener('contextmenu', this.ev_contextMenu, false);
};
BContextCapture.prototype.auto = function () {
  _Dom["default"].documentReady.then(function () {
    this.attachTo(document.body);
  }.bind(this));
};
BContextCapture.prototype.showContextMenu = _ContextMenu["default"].prototype.showContextMenu;
BContextCapture.prototype._fireContextMenuEvent = _ContextMenu["default"].prototype._fireContextMenuEvent;
BContextCapture.prototype._checkNeedHandle = _ContextMenu["default"].prototype._checkNeedHandle;
/***
 *
 * @param {PointerEvent} event
 */
BContextCapture.prototype.ev_contextMenu = function (event) {
  this._pointerSession++;
  this._posCurrent = new _Vec["default"](event.clientX, event.clientY);
  this.$target = event.target;
  if (this._checkNeedHandle(event.target)) {
    if (this._fireContextMenuEvent()) {
      event.preventDefault();
    }
  }
};
var instance = new BContextCapture();
if ((!_BrowserDetector["default"].isMobile || !_BrowserDetector["default"].isSafari) && _BrowserDetector["default"].os.type !== 'ios') {
  _BrowserDetector["default"].nativeContextMenuSupport = true;
  _ContextMenu["default"].auto = instance.auto.bind(instance); //override old version
} else {
  _BrowserDetector["default"].nativeContextMenuSupport = false;
}
var _default = instance;
exports["default"] = _default;

/***/ }),

/***/ 1446:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(931);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Element = _interopRequireDefault(__webpack_require__(55781));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function BScroller() {
  this.addClass('as-bscroller');
}
BScroller.tag = "bscroller";
BScroller.render = function (data) {
  if (data && data.elt) {
    return $(data.elt);
  } else return _('div');
};
BScroller.prototype.scrollInto = function (element) {
  if (_Element["default"].prototype.isDescendantOf.call(element, this)) {
    var elementBound = element.getBoundingClientRect();
    var viewportBound = this.getBoundingClientRect();
    var currentScrollTop = this.scrollTop;
    var newScrollTop = currentScrollTop;
    if (elementBound.bottom > viewportBound.bottom) {
      newScrollTop = currentScrollTop + (elementBound.bottom - viewportBound.bottom);
    }
    if (elementBound.top < viewportBound.top) {
      newScrollTop = currentScrollTop - (viewportBound.top - elementBound.top);
    }
    if (newScrollTop != currentScrollTop) {
      this.scrollTop = newScrollTop;
    }
    var currentScrollLeft = this.scrollLeft;
    var newScrollLeft = currentScrollLeft;
    if (elementBound.right > viewportBound.right) {
      newScrollLeft = currentScrollLeft + (elementBound.right - viewportBound.right);
    }
    if (elementBound.left < viewportBound.left) {
      newScrollLeft = currentScrollLeft - (viewportBound.left - elementBound.left);
    }
    if (newScrollLeft != currentScrollLeft) {
      this.scrollLeft = newScrollLeft;
    }
  }
};
_ACore["default"].install(BScroller);
var _default = BScroller;
exports["default"] = _default;

/***/ }),

/***/ 67711:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(98521);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function Board() {}
Board.tag = "board";
Board.render = function () {
  return _({
    "class": 'as-board',
    extendEvent: ['sizechange', 'changeposition']
  });
};
Board.prototype.getParent = function () {
  var parent = this.parentElement;
  while (parent) {
    if (parent.classList.contains('ac-board-table')) return parent;
    parent = parent.parentElement;
  }
  return null;
};
_ACore["default"].install(Board);
var _default = Board;
exports["default"] = _default;

/***/ }),

/***/ 76372:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.FREE_ZONE_CLASS_NAME = exports.EFFECT_ZONE_CLASS_NAME = exports.DRAG_ZONE_CLASS_NAME = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
__webpack_require__(98521);
__webpack_require__(67711);
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Element = _interopRequireDefault(__webpack_require__(55781));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _EventEmitter = _interopRequireWildcard(__webpack_require__(46833));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function BoardTable() {
  var events = {
    touchstart: this.eventHandler.mousedown,
    mousedown: this.eventHandler.mousedown
  };
  _Hanger["default"].prototype.on2.call(this, events);
  this._childHolders = [];
  this._dragEventData = null;
  this._friends = [];
  this._longPressEventData = null;
}
BoardTable.tag = 'boardtable';
BoardTable.render = function () {
  return _({
    "class": 'as-board-table',
    extendEvent: ['sizechange', 'orderchange', 'itemleave', 'itementer', 'dragitemstart', 'dragitemend']
  });
};
var EFFECT_ZONE_CLASS_NAME = 'as-board-table-effect-zone';
exports.EFFECT_ZONE_CLASS_NAME = EFFECT_ZONE_CLASS_NAME;
var DRAG_ZONE_CLASS_NAME = 'as-board-drag-zone';
exports.DRAG_ZONE_CLASS_NAME = DRAG_ZONE_CLASS_NAME;
var FREE_ZONE_CLASS_NAME = 'as-board-free-zone';
exports.FREE_ZONE_CLASS_NAME = FREE_ZONE_CLASS_NAME;
BoardTable.EFFECT_ZONE_CLASS_NAME = EFFECT_ZONE_CLASS_NAME;
BoardTable.DRAG_ZONE_CLASS_NAME = DRAG_ZONE_CLASS_NAME;
BoardTable.FREE_ZONE_CLASS_NAME = FREE_ZONE_CLASS_NAME;
BoardTable.prototype.$preventContext = _({
  tag: 'textarea',
  "class": 'as-board-table-prevent-context',
  props: {
    readOnly: true
  }
});
BoardTable.prototype.maxScrollSpeed = 300;
BoardTable.prototype.findDomChildBefore = function (elt) {
  var nodes = this.childNodes;
  for (var i = 0; i < nodes.length; ++i) {
    if (nodes[i] == elt) return nodes[i - 1];
  }
  return null;
};
BoardTable.prototype.findDomChildAfter = function (elt) {
  var nodes = this.childNodes;
  for (var i = 0; i < nodes.length; ++i) {
    if (nodes[i] == elt) return nodes[i + 1];
  }
  return null;
};
BoardTable.prototype.addChild = function (elt) {
  if (elt.classList.contains('as-board')) {
    elt.selfRemove();
    var atElt;
    if (this._childHolders.length > 0) {
      atElt = this.findDomChildAfter(this._childHolders[this._childHolders.length - 1].elt);
      if (atElt) {
        if (atElt != -1) this.insertBefore(elt, atElt);else throw new Error("Violation data!");
      } else {
        this.appendChild(elt);
      }
    } else {
      this.appendChild(elt);
    }
    var holder = {
      elt: elt
    };
    // elt.on('sizechange', holder.onsizechange);
    this._childHolders.push(holder);
  } else {
    this.appendChild(elt);
  }
  return this;
};
BoardTable.prototype.removeChild = function (elt) {
  var holderIndex = this.findChildHolderIndex(elt);
  if (holderIndex >= 0) {
    var holder = this._childHolders[holderIndex];
    // holder.elt.off('sizechange', holder.onsizechange);
    this._childHolders.splice(holderIndex, 1);
    holder.elt.remove();
  } else {
    this["super"](elt);
  }
};
BoardTable.prototype.findChildBefore = function (elt) {
  var holderIndex = this.findChildHolderIndex(elt);
  if (holderIndex < 0) return holderIndex;
  if (holderIndex < 1) return null;
  return this._childHolders[holderIndex - 1];
};
BoardTable.prototype.findChildAfter = function (elt) {
  var holderIndex = this.findChildHolderIndex(elt);
  if (holderIndex < 0) return holderIndex;
  if (holderIndex <= this._childHolders.length) return null;
  return this._childHolders[holderIndex + 1];
};
BoardTable.prototype.addChildBefore = function (elt, at) {
  elt.selfRemove();
  var atIndex = this.findChildHolderIndex(at);
  if (elt.classList.contains('as-board')) {
    if (atIndex < 0) {
      if (this._childHolders.length > 0) {
        if (this.findDomChildAfter(this._childHolders[this._childHolders.length - 1].elt) == at) {
          atIndex = this._childHolders.length;
        } else {
          throw new Error("Invalid position, you must insert board next to other board!");
        }
      }
    }
    this.insertBefore(elt, at);
    var holder = {
      elt: elt
    };
    this._childHolders.splice(atIndex, 0, holder);
  } else {
    if (atIndex > 0) {
      throw new Error("Invalid position, you can not insert othert type between two board!");
    } else {
      this.insertBefore(elt, at);
    }
  }
  return this;
};
BoardTable.prototype.addChildAfter = function (elt, at) {
  //todo: testing
  elt.selfRemove();
  var atIndex = this.findChildHolderIndex(at);
  var afterAt = this.findDomChildAfter(at);
  if (elt.classList.contains('as-board')) {
    if (atIndex < 0) {
      if (this._childHolders.length > 0) {
        if (this.findDomChildBefore(this._childHolders[0].elt) == at) {
          atIndex = -1;
        } else throw new Error("Invalid position,  you must insert board next to other board!");
      }
    }
    var holder = {
      elt: elt
    };
    if (atIndex === -1) {
      this.insertBefore(elt, afterAt || this.firstChild);
    } else if (!afterAt) {
      this.appendChild(elt);
    } else {
      this.insertBefore(elt, afterAt);
    }
    this._childHolders.splice(atIndex + 1, 0, holder);
  } else {
    if (this._childHolders.length > 1 && atIndex >= 0 && atIndex + 1 < this._childHolders.length) {
      throw new Error("Invalid position, you can not insert othert type between two board!");
    } else {
      if (!afterAt) {
        this.appendChild(elt);
      } else {
        this.insertBefore(elt, afterAt);
      }
    }
  }
  return this;
};
BoardTable.prototype.clearChild = function () {
  this._childHolders = [];
  return _Element["default"].prototype.clearChild.call(this);
};
BoardTable.prototype.findChildHolder = function (elt) {
  return this._childHolders[this.findChildHolderIndex(elt)];
};
BoardTable.prototype.findChildHolderIndex = function (elt) {
  for (var i = 0; i < this._childHolders.length; ++i) {
    if (this._childHolders[i].elt == elt) return i;
  }
  return -1;
};
BoardTable.prototype.getEffectZone = function () {
  var ez = this;
  while (ez) {
    if (ez.classList.contains(EFFECT_ZONE_CLASS_NAME)) {
      return ez;
    }
    ez = ez.parentElement;
  }
  return this;
};
BoardTable.prototype._findDragZone = function (elt) {
  var res = null;
  while (elt != this && elt) {
    if (elt.classList.contains('as-board-table')) return null; //maybe in other
    if (!res && elt.classList.contains(DRAG_ZONE_CLASS_NAME)) {
      res = elt;
    }
    if (!res && elt.classList.contains(FREE_ZONE_CLASS_NAME)) return null; // do not drag
    elt = elt.parentElement;
  }
  return res;
};
BoardTable.prototype._findBoard = function (elt) {
  while (elt != this && elt) {
    if (elt.classList.contains('as-board')) return elt;
    elt = elt.parentElement;
  }
  return null;
};
BoardTable.prototype.getAllFriends = function () {
  var thisBT = this;
  var res = [];
  var friendQR;
  for (var i = 0; i < this._friends.length; ++i) {
    friendQR = this._friends[i];
    if (friendQR != this && friendQR && friendQR.classList && friendQR.classList.contains('as-board-table')) {
      res.push(friendQR);
    } else if (typeof friendQR == 'string') {
      // query
      $(friendQR, false, function (elt) {
        if (thisBT != elt && elt.classList && elt.classList.contains('as-board-table')) {
          res.push(elt);
        }
        return false;
      });
    }
  }
  return res;
};
BoardTable.prototype._findHoverBoardIndex = function (clientX, clientY, excludes) {
  var cli = new _Vec["default"](clientX, clientY);
  var bound;
  for (var i = 0; i < this._childHolders.length; ++i) {
    // holder =
    if (excludes && excludes.indexOf(this._childHolders[i].elt) >= 0) continue;
    bound = _Rectangle["default"].fromClientRect(this._childHolders[i].elt.getBoundingClientRect());
    if (bound.containsPoint(cli)) return i;
  }
  return -1;
};

/**
 * @type {BoardTable}
 */
BoardTable.eventHandler = {};
BoardTable.eventHandler.mousedown = function (event) {
  if (this._dragEventData) return;
  var mousePos;
  var pointerIdent = -1;
  var target;
  var isTouch = event.type === 'touchstart';
  if (isTouch) {
    var touch = event.changedTouches[0];
    target = touch.target;
    pointerIdent = touch.identifier;
    mousePos = new _Vec["default"](touch.clientX, touch.clientY);
  } else {
    mousePos = new _Vec["default"](event.clientX, event.clientY);
    target = event.target;
  }
  var dragzone = this._findDragZone(target);
  if (dragzone) {
    var boardElt = this._findBoard(dragzone);
    var holderIndex = this.findChildHolderIndex(boardElt);
    if (holderIndex < 0) return; // can not move
    var cBound = boardElt.getBoundingClientRect();
    var mouseBoardOffset = mousePos.sub(new _Vec["default"](cBound.left, cBound.top));
    this._dragEventData = {
      boardElt: boardElt,
      state: 'WAIT',
      mouseStartPos: mousePos,
      mousePos: mousePos,
      mouseBoardOffset: mouseBoardOffset,
      holderIndex: holderIndex,
      boardBound: cBound,
      isTouch: isTouch,
      pointerIdent: pointerIdent
    };
    var cEvent = _EventEmitter["default"].copyEvent(event);
    if (isTouch) {
      _Hanger["default"].prototype.on2.call(document.body, {
        touchend: this.eventHandler.touchFinishBeforeReadyDrag,
        touchcancel: this.eventHandler.touchFinishBeforeReadyDrag,
        touchmove: this.eventHandler.touchMoveBeforeReadyDrag
      });
      this.$preventContext.off('contextmenu', this.eventHandler.contextMenu); //event maybe not remove because of double click
      this.$preventContext.on('contextmenu', this.eventHandler.contextMenu);
      var thisBT = this;
      this._dragEventData._longPressTimeout = setTimeout(function () {
        thisBT._longPressEventData = -1;
        thisBT.$preventContext.addStyle({
          '--x': mousePos.x + 'px',
          '--y': mousePos.y + 'px'
        }).addTo(document.body);
        if (thisBT._dragEventData) thisBT.eventHandler.readyDrag(cEvent);
      }, 400);
    } else {
      this.eventHandler.readyDrag(event);
    }
  }
};
BoardTable.eventHandler.touchFinishBeforeReadyDrag = function (event) {
  var thisBT = this;
  var dragEventData = this._dragEventData;
  if (!dragEventData) return;
  _Hanger["default"].prototype.off2.call(document.body, {
    touchend: this.eventHandler.touchFinishBeforeReadyDrag,
    touchcancel: this.eventHandler.touchFinishBeforeReadyDrag,
    touchmove: this.eventHandler.touchMoveBeforeReadyDrag
  });
  if (this._dragEventData._longPressTimeout > 0) {
    clearTimeout(this._dragEventData._longPressTimeout);
  }
  if (dragEventData.state === 'WAIT') {
    this._dragEventData = null; // canceled
  } else {
    setTimeout(function () {
      thisBT.$preventContext.off('contextmenu', thisBT.eventHandler.contextMenu);
      thisBT.$preventContext.remove();
    }, 60);
  }
};
BoardTable.eventHandler.contextMenu = function (event) {
  event.preventDefault();
  this.$preventContext.off('contextmenu', this.eventHandler.contextMenu);
  this.$preventContext.remove();
  this.eventHandler.touchFinishBeforeReadyDrag(event);
};
BoardTable.eventHandler.touchMoveBeforeReadyDrag = function (event) {
  var dragEventData = this._dragEventData;
  var touch = (0, _EventEmitter.findChangedTouchByIdent)(event, dragEventData.pointerIdent);
  if (!touch) return;
  var mousePos = new _Vec["default"](touch.clientX, touch.clientY);
  if (dragEventData.state === 'WAIT') {
    var dv = mousePos.sub(dragEventData.mouseStartPos);
    if (dv.abs() > 8) {
      this.eventHandler.touchFinishBeforeReadyDrag(event);
      this._dragEventData = null; // cancel
    }
  } else {
    this.$preventContext.addStyle({
      '--x': mousePos.x + 'px',
      '--y': mousePos.y + 'px'
    });
  }
};
BoardTable.eventHandler.readyDrag = function (event) {
  var dragEventData = this._dragEventData;
  dragEventData.state = "PRE_DRAG";
  var bodyEvents = {};
  if (dragEventData.isTouch) {
    bodyEvents.touchmove = this.eventHandler.mousemove;
    bodyEvents.touchcancel = this.eventHandler.mousefinish;
    bodyEvents.touchend = this.eventHandler.mousefinish;
  } else {
    bodyEvents.mousemove = this.eventHandler.mousemove;
    bodyEvents.mouseup = this.eventHandler.mousefinish;
    bodyEvents.mouseleave = this.eventHandler.mousefinish;
  }
  _Hanger["default"].prototype.on2.call(document.body, bodyEvents);
  if (dragEventData.isTouch) {
    this.eventHandler.mousemove(event);
  }
};
BoardTable.eventHandler.mousemovePredrag = function (event) {
  var dragEventData = this._dragEventData;
  var mousePos = dragEventData.mousePos;
  var thisBT = this;
  event.preventDefault();
  var cBound = dragEventData.boardElt.getBoundingClientRect();
  if (mousePos.sub(dragEventData.mouseStartPos).abs() > 8 || dragEventData.isTouch) {
    dragEventData.placeHolderElt = $(dragEventData.boardElt.cloneNode(false)).addClass('as-board-place-holder').addStyle({
      width: cBound.width + 'px',
      height: cBound.height + 'px'
    });
    dragEventData.friendHolders = this.getAllFriends().concat([this]).map(function (elt) {
      //include itself
      var effectZone = elt.getEffectZone();
      var res = {
        elt: elt,
        effectZone: effectZone
      };
      if (!dragEventData.isTouch) {
        var enterEvent = thisBT.eventHandler.enterFriendEffectZone.bind(thisBT, elt);
        _Hanger["default"].prototype.on2.call(effectZone, dragEventData.isTouch ? 'touchmove' : 'mouseenter', enterEvent);
        res.enterEvent = enterEvent;
      } else {
        // use move event to detect
      }
      return res;
    });
    dragEventData.inEffectZoneOf = this;
    dragEventData.cardStyle = {
      width: dragEventData.boardElt.style.width,
      height: dragEventData.boardElt.style.height
    };
    dragEventData.boardElt.addStyle({
      width: cBound.width + 'px',
      height: cBound.height + 'px'
    });
    this.insertBefore(dragEventData.placeHolderElt, dragEventData.boardElt);
    dragEventData.state = "DRAG";
    $(document.body).addClass('as-has-board-table-drag');
    dragEventData.boardElt.addClass('as-board-moving');
    dragEventData.boardAt = dragEventData.holderIndex;
    dragEventData.boardIn = thisBT;
    this.emit('dragitemstart', {
      type: 'dragitemstart',
      target: this,
      boardElt: this._dragEventData.boardElt
    }, this);
  }
};
BoardTable.eventHandler.mousemoveDragInSelf = function (event) {
  var dragEventData = this._dragEventData;
  var mousePos = dragEventData.mousePos;
  if (this._childHolders.length < 2) {
    if (dragEventData.boardIn != this) {
      this.insertBefore(dragEventData.placeHolderElt, this._childHolders[0].elt);
      dragEventData.boardIn = this;
      dragEventData.boardAt = 0;
    }
  } else {
    // bản thân chỉ có 1, hoặc nhiều hơn
    var i = this._findHoverBoardIndex(mousePos.x, mousePos.y, [dragEventData.boardElt]);
    if (i >= 0) {
      if (dragEventData.boardIn != this) {
        dragEventData.boardIn = this;
      }
      var viewIndex;
      if (i < dragEventData.holderIndex && i < dragEventData.boardAt || i > dragEventData.holderIndex && i > dragEventData.boardAt || dragEventData.holderIndex == dragEventData.boardAt) {
        viewIndex = i;
      } else {
        if (dragEventData.holderIndex > dragEventData.boardAt) {
          viewIndex = i + 1;
        } else {
          viewIndex = i - 1;
        }
      }
      var fbound = this._childHolders[i].elt.getBoundingClientRect();
      var displayStyple = this._childHolders[i].elt.getComputedStyleValue('display');
      if (mousePos.x > fbound.left && mousePos.x < fbound.right && mousePos.y > fbound.top && mousePos.y < fbound.bottom) {
        if (displayStyple.startsWith('inline')) {
          if (dragEventData.boardBound.width < fbound.width) {
            if (dragEventData.boardAt > viewIndex && mousePos.x > fbound.left + dragEventData.boardBound.width) {
              viewIndex += 1;
            } else if (dragEventData.boardAt < viewIndex && mousePos.x < fbound.left + fbound.width - dragEventData.boardBound.width) {
              viewIndex -= 1;
            }
          }
        } else {
          if (dragEventData.boardBound.height < fbound.height) {
            if (dragEventData.boardAt > viewIndex && mousePos.y >= fbound.top + dragEventData.boardBound.height) {
              viewIndex += 1;
            } else if (dragEventData.boardAt < viewIndex && mousePos.y <= fbound.top + fbound.height - dragEventData.boardBound.height) {
              viewIndex -= 1;
            }
          }
        }
        viewIndex = Math.max(0, Math.min(this._childHolders.length, viewIndex));
        if (viewIndex != dragEventData.boardAt) {
          dragEventData.boardAt = viewIndex;
          if (dragEventData.holderIndex >= viewIndex) {
            this.insertBefore(dragEventData.placeHolderElt, this._childHolders[viewIndex].elt);
          } else {
            var bf = _Element["default"].prototype.findChildAfter.call(this, this._childHolders[viewIndex].elt);
            if (bf) this.insertBefore(dragEventData.placeHolderElt, bf);else {
              this.appendChild(dragEventData.placeHolderElt);
            }
          }
        }
      }
    }
  }
};
BoardTable.eventHandler.mousemoveDragInOther = function (event) {
  var dragEventData = this._dragEventData;
  var mousePos = dragEventData.mousePos;
  var other = dragEventData.inEffectZoneOf;
  if (other._childHolders.length == 0) {
    if (dragEventData.boardIn != other) {
      dragEventData.boardIn = other;
      dragEventData.boardAt = 0;
      other.appendChild(dragEventData.placeHolderElt);
    }
  } else {
    var i = other._findHoverBoardIndex(mousePos.x, mousePos.y);
    if (i >= 0) {
      if (dragEventData.boardIn != other) {
        dragEventData.boardIn = other;
      }
      var displayStyple = other._childHolders[i].elt.getComputedStyleValue('display');
      var di = 0;
      var bbound = other._childHolders[i].elt.getBoundingClientRect();
      if (displayStyple.startsWith('inline')) {
        if (mousePos.x > bbound.left + bbound.width / 2) di++;
      } else {
        if (mousePos.y > bbound.top + bbound.height / 2) di++;
      }
      i += di;
      if (i < other._childHolders.length) {
        other.insertBefore(dragEventData.placeHolderElt, other._childHolders[i].elt);
      } else {
        var bf = other.findChildAfter(other._childHolders[other._childHolders.length - 1].elt);
        if (bf) {
          other.insertBefore(dragEventData.placeHolderElt, bf);
        } else {
          other.appendChild(dragEventData.placeHolderElt);
        }
      }
      dragEventData.boardAt = i;
    }
  }
};
BoardTable.eventHandler.mousemoveDrag = function (event) {
  var dragEventData = this._dragEventData;
  if (dragEventData.inEffectZoneOf == this) {
    this.eventHandler.mousemoveDragInSelf(event);
  } else {
    this.eventHandler.mousemoveDragInOther(event);
  }
};
BoardTable.eventHandler.boarDrag = function (event) {
  var dragEventData = this._dragEventData;
  var mousePos = dragEventData.mousePos;
  var boardPos = mousePos.sub(dragEventData.mouseBoardOffset);
  dragEventData.boardElt.addStyle({
    left: boardPos.x + 'px',
    top: boardPos.y + 'px'
  });
};
BoardTable.eventHandler.dragOnEffectZone = function (event) {
  var dragEventData = this._dragEventData;
  var mousePos = dragEventData.mousePos;
  var friendHolders = dragEventData.friendHolders;
  var bound;
  for (var i = 0; i < friendHolders.length; ++i) {
    bound = _Rectangle["default"].fromClientRect(friendHolders[i].effectZone.getBoundingClientRect());
    if (bound.containsPoint(mousePos)) {
      dragEventData.inEffectZoneOf = friendHolders[i].elt;
      break;
    }
  }
};
BoardTable.eventHandler.mousemoveOverflow = function (event) {
  if (!this._dragEventData) return;
  var dragEventData = this._dragEventData;
  var scrollerX = this._dragEventData.boardIn;
  var overflowStyle;
  while (scrollerX) {
    overflowStyle = window.getComputedStyle(scrollerX)['overflow'];
    if ((overflowStyle === 'auto' || overflowStyle === 'auto hidden' || overflowStyle === 'scroll' || scrollerX.tagName === 'HTML') && scrollerX.clientWidth < scrollerX.scrollWidth) break;
    scrollerX = scrollerX.parentElement;
  }
  var scrollerY = this._dragEventData.boardIn;
  while (scrollerY) {
    overflowStyle = window.getComputedStyle(scrollerY)['overflow'];
    if ((overflowStyle === 'auto' || overflowStyle === 'hidden auto' || overflowStyle === 'scroll' || scrollerY.tagName === 'HTML') && scrollerY.clientHeight < scrollerY.scrollHeight) break;
    scrollerY = scrollerY.parentElement;
  }
  var outBound;
  var bBound;
  var screenSize = _Dom["default"].getScreenSize();
  var vx = 0;
  var vy = 0;
  bBound = this._dragEventData.boardElt.getBoundingClientRect();
  if (scrollerX) {
    if (dragEventData.$scrollerX !== scrollerX) {
      dragEventData.scrollerXValue = scrollerX.scrollLeft;
      dragEventData.$scrollerX = scrollerX;
    }
    outBound = scrollerX.getBoundingClientRect();
    outBound = {
      left: Math.max(outBound.left, 0),
      top: Math.max(outBound.top, 0),
      bottom: Math.min(outBound.bottom, screenSize.height),
      right: Math.min(outBound.right, screenSize.width)
    };
    if (bBound.left < outBound.left) {
      vx = bBound.left - outBound.left;
    } else if (bBound.right > outBound.right) {
      vx = bBound.right - outBound.right;
    }
  } else {
    dragEventData.$scrollerX = null;
  }
  if (scrollerY) {
    if (dragEventData.$scrollerY !== scrollerY) {
      dragEventData.scrollerYValue = scrollerY.scrollTop;
      dragEventData.$scrollerY = scrollerY;
    }
    outBound = scrollerY.getBoundingClientRect();
    outBound = {
      left: Math.max(outBound.left, 0),
      top: Math.max(outBound.top, 0),
      bottom: Math.min(outBound.bottom, screenSize.height),
      right: Math.min(outBound.right, screenSize.width)
    };
    if (bBound.top < outBound.top) {
      vy = bBound.top - outBound.top;
    } else if (bBound.bottom > outBound.bottom) {
      vy = bBound.bottom - outBound.bottom;
    }
  } else {
    dragEventData.$scrollerY = null;
  }
  vx = Math.max(-this.maxScrollSpeed, Math.min(this.maxScrollSpeed, vx * Math.sqrt(Math.abs(vx))));
  vy = Math.max(-this.maxScrollSpeed, Math.min(this.maxScrollSpeed, vy * Math.sqrt(Math.abs(vy))));
  if (vx !== 0 || vy !== 0) {
    var copyEvent = {
      type: event.type,
      preventDefault: function preventDefault() {/* noop */
      },
      target: event.target
    };
    if (event.type === 'touchmove') {
      copyEvent.changedTouches = Array.prototype.map.call(event.changedTouches, function (it) {
        return {
          identifier: it.identifier,
          clientX: it.clientX,
          clientY: it.clientY,
          target: it.target
        };
      });
      copyEvent.touches = Array.prototype.map.call(event.touches, function (it) {
        return {
          identifier: it.identifier,
          clientX: it.clientX,
          clientY: it.clientY,
          target: it.target
        };
      });
    } else {
      copyEvent.clientX = event.clientX;
      copyEvent.clientY = event.clientY;
    }
    var thisBT = this;
    var now = new Date().getTime();
    if (dragEventData.requestAnimationFrameId >= 0) {
      cancelAnimationFrame(dragEventData.requestAnimationFrameId);
    }
    dragEventData.requestAnimationFrameId = requestAnimationFrame(function () {
      dragEventData.requestAnimationFrameId = -1;
      var dt = (new Date().getTime() - now) / 1000;
      if (dragEventData.$scrollerY) {
        dragEventData.scrollerYValue += vy * dt;
        dragEventData.scrollerYValue = Math.max(0, Math.min(dragEventData.$scrollerY.scrollHeight - dragEventData.$scrollerY.clientHeight, dragEventData.scrollerYValue));
        dragEventData.$scrollerY.scrollTop = dragEventData.scrollerYValue;
      }
      if (dragEventData.$scrollerX) {
        dragEventData.scrollerXValue += vx * dt;
        dragEventData.scrollerXValue = Math.max(0, Math.min(dragEventData.$scrollerX.scrollWidth - dragEventData.$scrollerX.clientWidth, dragEventData.scrollerXValue));
        dragEventData.$scrollerX.scrollLeft = dragEventData.scrollerXValue;
      }
      if (thisBT._dragEventData && thisBT._dragEventData.state === "DRAG") {
        thisBT.eventHandler.mousemoveOverflow(copyEvent);
      }
    });
  }
};
BoardTable.eventHandler.mousemove = function (event) {
  var dragEventData = this._dragEventData;
  var isTouch = event.type === 'touchmove' || event.type === 'touchstart'; // call from timeout
  if (dragEventData.isTouch !== isTouch) return;
  var mousePos;
  var pointerIdent;
  var touch = -2;
  if (isTouch) {
    touch = (0, _EventEmitter.findChangedTouchByIdent)(event, dragEventData.pointerIdent);
    if (touch) {
      pointerIdent = touch.identifier;
      mousePos = new _Vec["default"](touch.clientX, touch.clientY);
    }
  } else {
    pointerIdent = -1;
    mousePos = new _Vec["default"](event.clientX, event.clientY);
  }
  if (dragEventData.pointerIdent !== pointerIdent) return;
  dragEventData.mousePos = mousePos;
  event.preventDefault();
  if (dragEventData.isTouch && dragEventData.state === 'DRAG') {
    this.eventHandler.dragOnEffectZone(event); //because touch not have mouseenter event
  }

  if (dragEventData.state === 'PRE_DRAG') {
    this.eventHandler.mousemovePredrag(event);
  }
  if (dragEventData.state === 'DRAG') {
    this.eventHandler.mousemoveDrag(event);
    this.eventHandler.boarDrag(event);
    this.eventHandler.mousemoveOverflow(event);
  }
};
BoardTable.eventHandler.mousefinish = function (event) {
  var dragEventData = this._dragEventData;
  var isTouch = event.type === 'touchend';
  if (dragEventData.isTouch !== isTouch) return;
  var mousePos;
  var pointerIdent;
  var touch = -2;
  if (isTouch) {
    touch = (0, _EventEmitter.findChangedTouchByIdent)(event, dragEventData.pointerIdent);
    if (touch) {
      pointerIdent = touch.identifier;
      mousePos = new _Vec["default"](touch.clientX, touch.clientY);
    }
  } else {
    pointerIdent = -1;
    mousePos = new _Vec["default"](event.clientX, event.clientY);
  }
  if (dragEventData.pointerIdent !== pointerIdent) return;
  dragEventData.mousePos = mousePos;
  var changed;
  if (dragEventData.state == 'DRAG') {
    setTimeout(function () {
      $(document.body).removeClass('as-has-board-table-drag');
    }, 1);
    dragEventData.boardElt.removeClass('as-board-moving').removeStyle('left').removeStyle('top');
    dragEventData.boardElt.addStyle(dragEventData.cardStyle);
    dragEventData.placeHolderElt.remove();
    dragEventData.state = "FINISH";
    if (!dragEventData.isTouch) dragEventData.friendHolders.forEach(function (holder) {
      _Hanger["default"].prototype.off2.call(holder.effectZone, 'mouseenter', holder.enterEvent);
    });
    if (dragEventData.boardIn == this) {
      if (dragEventData.holderIndex != dragEventData.boardAt) {
        if (dragEventData.holderIndex > dragEventData.boardAt) {
          this.insertBefore(dragEventData.boardElt, this._childHolders[dragEventData.boardAt].elt);
        } else if (dragEventData.holderIndex < dragEventData.boardAt) {
          var bf = _Element["default"].prototype.findChildAfter.call(this, this._childHolders[dragEventData.boardAt].elt);
          if (bf) this.insertBefore(dragEventData.boardElt, bf);else {
            this.appendChild(dragEventData.boardElt);
          }
        }
        var holder = this._childHolders.splice(dragEventData.holderIndex, 1)[0];
        this._childHolders.splice(dragEventData.boardAt, 0, holder);
        changed = 'orderchange';
        this.emit('orderchange', {
          type: 'orderchange',
          boardElt: holder.elt,
          action: 'move',
          from: dragEventData.holderIndex,
          to: dragEventData.boardAt,
          target: this
        }, this);
      }
    } else {
      var holder = this._childHolders.splice(dragEventData.holderIndex, 1)[0];
      holder.elt.remove();
      ///remove all event
      var other = dragEventData.boardIn;
      changed = 'itemleave';
      this.emit('itemleave', {
        type: 'itemleave',
        item: holder.elt,
        from: {
          index: dragEventData.holderIndex,
          table: this
        },
        to: {
          index: dragEventData.boardAt,
          table: other
        },
        target: this
      }, this);
      if (other._childHolders.length == 0) {
        other.appendChild(holder.elt);
        other._childHolders.push(holder);
      } else {
        if (dragEventData.boardAt < other._childHolders.length) {
          other.insertBefore(holder.elt, other._childHolders[dragEventData.boardAt].elt);
          other._childHolders.splice(dragEventData.boardAt, 0, holder);
        } else {
          var bf = other.findDomChildAfter(other._childHolders.elt);
          if (bf) {
            other.insertBefore(holder.elt, bf);
          } else {
            other.appendChild(holder.elt);
          }
          other._childHolders.push(holder);
        }
      }
      other.emit('itementer', {
        type: 'itementer',
        item: holder.elt,
        target: other,
        from: {
          index: dragEventData.holderIndex,
          table: this
        },
        to: {
          index: dragEventData.boardAt,
          table: other
        }
      }, other);
    }
    this.emit('dragitemend', {
      type: 'dragitemend',
      target: this,
      changed: changed,
      boardElt: this._dragEventData.boardElt
    }, this);
  }
  var bodyEvents = {};
  if (dragEventData.isTouch) {
    bodyEvents.touchmove = this.eventHandler.mousemove;
    bodyEvents.touchcancel = this.eventHandler.mousefinish;
    bodyEvents.touchend = this.eventHandler.mousefinish;
  } else {
    bodyEvents.mousemove = this.eventHandler.mousemove;
    bodyEvents.mouseup = this.eventHandler.mousefinish;
    bodyEvents.mouseleave = this.eventHandler.mousefinish;
  }
  _Hanger["default"].prototype.off2.call(document.body, bodyEvents);
  this._dragEventData = null;
};
BoardTable.eventHandler.enterFriendEffectZone = function (friendElt, event) {
  this._dragEventData.inEffectZoneOf = friendElt;
};
BoardTable.prototype.getAllBoards = function () {
  return this._childHolders.map(function (holder) {
    return holder.elt;
  });
};
BoardTable.property = {};
BoardTable.property.friends = {
  set: function set(value) {
    value = value || [];
    if (!(value instanceof Array)) value = [value];
    this._friends = value;
  },
  get: function get() {
    return this._friends;
  }
};
_ACore["default"].install(BoardTable);
var _default = BoardTable;
exports["default"] = _default;

/***/ }),

/***/ 34169:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(99607);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function ButtonArray() {
  this._dict = {};
  this._pool = [];
  this._items = [];
  this.$lastActiveBtn = null;
  this._value = undefined;
  this._lastValue = this._value;
}
ButtonArray.tag = 'buttonarray';
ButtonArray.render = function () {
  return _({
    extendEvent: ['change'],
    "class": 'as-button-array'
  });
};
ButtonArray.prototype._newButton = function () {
  var button = _({
    tag: 'button',
    "class": 'as-button-array-item',
    child: {
      text: 'null'
    }
  });
  button.on('click', this.eventHandler.clickItem.bind(this, button));
  return button;
};
ButtonArray.prototype._requestButton = function (items) {
  var button;
  if (this._pool.length > 0) {
    button = this._pool.pop();
  } else {
    button = this._newButton();
  }
  return button;
};
ButtonArray.prototype._assignButton = function (button, data) {
  button._data = data;
  button.childNodes[0].data = data.text;
};
ButtonArray.prototype._releaseButton = function (button) {
  this._pool.push(button);
};
ButtonArray.prototype._getFullFormat = function (item) {
  var res = {};
  if (typeof item == 'string' || typeof item == 'number' || typeof item == 'boolean' || item === null || item === undefined) {
    res.ident = item;
    res.value = item;
    res.text = item + '';
  } else if (item && _typeof(item) == 'object') {
    res.value = item.value;
    res.ident = res.value + '';
    res.text = item.text;
  }
  return res;
};
ButtonArray.property = {};

/**
 * @type {ButtonArray}
 */
ButtonArray.property.items = {
  set: function set(items) {
    items = items || [];
    this._items = items;
    var child;
    while (this.childNodes.length > items.length) {
      child = this.lastChild;
      this._releaseButton(child);
      this.removeChild(child);
    }
    while (this.childNodes.length < items.length) {
      this.addChild(this._requestButton());
    }
    var item;
    for (var i = 0; i < items.length; ++i) {
      item = this._getFullFormat(items[i]);
      this._assignButton(this.childNodes[i], item);
      this._dict[item.ident] = {
        elt: this.childNodes[i],
        data: item
      };
    }
    if (items.length > 0) {
      if (!this._dict[this._value + '']) {
        this._value = this._getFullFormat(items[0]).value;
      }
    }
    this.value = this._value;
  },
  get: function get() {
    return this._items;
  }
};
ButtonArray.property.value = {
  set: function set(value) {
    this._value = value;
    this._lastValue = this._value;
    if (this.$lastActiveBtn) {
      this.$lastActiveBtn.removeClass('as-active');
      this.$lastActiveBtn = null;
    }
    var hodler = this._dict[value + ''];
    if (hodler) {
      hodler.elt.addClass('as-active');
      this.$lastActiveBtn = hodler.elt;
    }
  },
  get: function get() {
    return this._value;
  }
};
ButtonArray.eventHandler = {};
ButtonArray.eventHandler.clickItem = function (item, event) {
  if (this._lastValue != item._data.value) {
    this.value = item._data.value;
    this.emit('change', {
      target: this,
      value: this.value,
      type: 'change'
    }, this);
  }
};
_ACore["default"].install(ButtonArray);
var _default = ButtonArray;
exports["default"] = _default;

/***/ }),

/***/ 33601:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(11839);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _ButtonArray = _interopRequireDefault(__webpack_require__(34169));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var ChevronLeft = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 410.258 410.258" style="enable-background:new 0 0 410.258 410.258;" xml:space="preserve">\n' + '<polygon points="298.052,24 266.052,0 112.206,205.129 266.052,410.258 298.052,386.258 162.206,205.129 "/>\n' + '</svg>';
var ChevronRight = '<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n' + '\t viewBox="0 0 410.258 410.258" style="enable-background:new 0 0 410.258 410.258;" xml:space="preserve">\n' + '<polygon points="144.206,0 112.206,24 248.052,205.129 112.206,386.258 144.206,410.258 298.052,205.129 "/>\n' + '</svg>';

/***
 * @extends AElement
 * @constructor
 */
function ButtonRange() {
  this._dict = {};
  this._pool = [];
  this._items = [];
  this.$lastActiveBtn = null;
  this._value = undefined;
  this._lastValue = this._value;
  this.$scroller = $('.as-button-range-scroller', this).on('wheel', this.eventHandler.wheel);
  this.$prevBtn = $('.as-button-range-left-btn', this).on('click', this.prevValue.bind(this));
  this.$nextBtn = $('.as-button-range-right-btn', this).on('click', this.nextValue.bind(this));
  this._scrollTimeout = -1;
  this._scrollToSelected = this._scrollToSelected.bind(this);
  this.$attachhook = $('attachhook', this).on('error', this.eventHandler.attached);
  this.autoWidth = false;
}
ButtonRange.tag = 'buttonrange';
ButtonRange.render = function () {
  return _({
    extendEvent: ['change'],
    "class": 'as-button-range',
    child: [{
      "class": 'as-button-range-scroller'
    }, {
      "class": 'as-button-range-left-ctn',
      child: {
        tag: 'button',
        "class": 'as-button-range-left-btn',
        child: ChevronLeft
      }
    }, {
      "class": 'as-button-range-right-ctn',
      child: {
        tag: 'button',
        "class": 'as-button-range-right-btn',
        child: ChevronRight
      }
    }, 'attachhook']
  });
};
ButtonRange.prototype._updateUnderlinePosition = function () {
  if (!this.$lastActiveBtn) return;
  var scrollerFirstBound = this.$scroller.firstChild.getBoundingClientRect();
  if (scrollerFirstBound.width === 0) return;
  var activeBound = this.$lastActiveBtn.getBoundingClientRect();
  this.addStyle({
    '--underline-left': activeBound.left - scrollerFirstBound.left + 'px',
    '--underline-width': activeBound.width + 'px'
  });
};
ButtonRange.prototype.updateSize = function () {
  if (this.autoWidth) {
    if (this.$scroller.childNodes.length > 0) {
      var left = this.$scroller.firstChild.getBoundingClientRect().left;
      var right = this.$scroller.lastChild.getBoundingClientRect().right;
      if (left < right) {
        var fontSize = this.getFontSize() || 14;
        this.addStyle('width', (right - left + 2) / fontSize + 2 + 'em');
      }
    }
  }
  this._updateUnderlinePosition();
  this._scrollToSelected();
};
ButtonRange.prototype._newButton = function () {
  var button = _({
    tag: 'button',
    "class": 'as-button-range-item',
    child: {
      text: 'null'
    }
  });
  button.on('click', this.eventHandler.clickItem.bind(this, button));
  return button;
};
ButtonRange.prototype._requestButton = function (items) {
  var button;
  if (this._pool.length > 0) {
    button = this._pool.pop();
  } else {
    button = this._newButton();
  }
  return button;
};
ButtonRange.prototype._assignButton = function (button, data) {
  button._data = data;
  button.childNodes[0].data = data.text;
};
ButtonRange.prototype._releaseButton = function (button) {
  this._pool.push(button);
};
ButtonRange.prototype._requireButton = function (n) {
  var child;
  while (this.$scroller.childNodes.length > n) {
    child = this.$scroller.lastChild;
    this._releaseButton(child);
    this.$scroller.removeChild(child);
  }
  while (this.$scroller.childNodes.length < n) {
    this.$scroller.addChild(this._requestButton());
  }
};
ButtonRange.prototype._assignButtonList = function (items) {
  var item;
  for (var i = 0; i < items.length; ++i) {
    item = this._getFullFormat(items[i]);
    this._assignButton(this.$scroller.childNodes[i], item);
    this._dict[item.ident] = {
      elt: this.$scroller.childNodes[i],
      data: item
    };
  }
};
ButtonRange.prototype._scrollToSelected = function () {
  if (this._scrollTimeout >= 0) return;
  if (!this.$lastActiveBtn) return;
  var scrollerBound = this.$scroller.getBoundingClientRect();
  if (scrollerBound.width === 0) return;
  var activeBound = this.$lastActiveBtn.getBoundingClientRect();
  var dx, speed;
  if (activeBound.left < scrollerBound.left - 1) {
    dx = activeBound.left - scrollerBound.left;
    if (dx < -500) dx = -500;
    speed = Math.sqrt(-dx * 2 + 4);
    this.$scroller.scrollLeft -= speed;
  } else if (activeBound.right - 1 > scrollerBound.right) {
    dx = activeBound.right - scrollerBound.right;
    if (dx > 500) dx = 500;
    speed = Math.sqrt(dx * 2 + 4);
    this.$scroller.scrollLeft += speed;
  } else {
    return;
  }
  var thisBR = this;
  this._scrollTimeout = setTimeout(function () {
    thisBR._scrollTimeout = -1;
    thisBR._scrollToSelected();
  }, 20);
};
ButtonRange.prototype.nextValue = function (userAction) {
  var currentIndex = this._findActiveIndex();
  var nextIndex;
  var nextValue;
  if (currentIndex < 0) {
    nextIndex = 0;
  } else {
    nextIndex = Math.min(this._items.length - 1, currentIndex + 1);
  }
  if (nextIndex >= 0) {
    nextValue = this._getFullFormat(this._items[nextIndex]).value;
    this.value = nextValue;
    if (userAction) this.notifyChange();
  }
};
ButtonRange.prototype.prevValue = function (userAction) {
  var currentIndex = this._findActiveIndex();
  var prevIndex;
  var prevValue;
  if (currentIndex < 0) {
    prevIndex = 0;
  } else {
    prevIndex = Math.max(0, currentIndex - 1);
  }
  if (prevIndex >= 0 && prevIndex < this._items.length && prevIndex != currentIndex) {
    prevValue = this._getFullFormat(this._items[prevIndex]).value;
    this.value = prevValue;
    if (userAction) this.notifyChange();
  }
};
ButtonRange.prototype._findActiveIndex = function () {
  var item;
  var value = this._value;
  for (var i = 0; i < this._items.length; ++i) {
    item = this._items[i];
    if (item === value || item && item.value === value) return i;
  }
  return -1;
};
ButtonRange.prototype._getFullFormat = function (item) {
  var res = {};
  if (typeof item == 'string' || typeof item == 'number' || typeof item == 'boolean' || item === null || item === undefined) {
    res.ident = item + '';
    res.value = item;
    res.text = item + '';
  } else if (item && _typeof(item) == 'object') {
    res.value = item.value;
    res.ident = res.value + '';
    res.text = item.text;
  }
  return res;
};
ButtonRange.prototype.notifyChange = function () {
  this.emit('change', {
    target: this,
    value: this.value,
    type: 'change'
  }, this);
};
ButtonRange.property = {};

/**
 * @type {ButtonRange}
 */
ButtonRange.property.items = {
  set: function set(items) {
    items = items || [];
    this._items = items;
    this._requireButton(items.length);
    this._assignButtonList(items);
    if (items.length > 0) {
      if (!this._dict[this._value + '']) {
        this._value = this._getFullFormat(items[0]).value;
      }
    }
    this.value = this._value;
    this.updateSize();
  },
  get: function get() {
    return this._items;
  }
};
ButtonRange.property.value = {
  set: function set(value) {
    this._value = value;
    this._lastValue = this._value;
    if (this.$lastActiveBtn) {
      this.$lastActiveBtn.removeClass('as-active');
      this.$lastActiveBtn = null;
    }
    var hodler = this._dict[value + ''];
    if (hodler) {
      hodler.elt.addClass('as-active');
      this.$lastActiveBtn = hodler.elt;
    }
    var activeIndex = this._findActiveIndex();
    this.$prevBtn.disabled = activeIndex === 0;
    this.$nextBtn.disabled = activeIndex === this._items.length - 1;
    this._updateUnderlinePosition();
    this._scrollToSelected();
  },
  get: function get() {
    return this._value;
  }
};
ButtonRange.eventHandler = {};
ButtonRange.eventHandler.clickItem = function (item, event) {
  if (this._lastValue != item._data.value) {
    this.value = item._data.value;
    this.notifyChange();
  }
};
ButtonRange.eventHandler.attached = function () {
  if (this.style.width === 'auto') this.autoWidth = true;
  _Dom["default"].addToResizeSystem(this.$attachHook);
  this.updateSize();
};
ButtonRange.eventHandler.wheel = function (event) {
  var prevLeft = this.$scroller.scrollLeft;
  if (event.deltaY < 0) {
    this.$scroller.scrollLeft -= 100;
  } else if (event.deltaY > 0) {
    this.$scroller.scrollLeft += 100;
  }
  if (prevLeft !== this.$scroller.scrollLeft) event.preventDefault();
};
_ACore["default"].install(ButtonRange);
var _default = ButtonRange;
exports["default"] = _default;

/***/ }),

/***/ 97847:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.CMDToolDelegate = CMDToolDelegate;
exports["default"] = void 0;
__webpack_require__(61397);
var _RibbonButton = _interopRequireDefault(__webpack_require__(93856));
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _SolidColorPicker = _interopRequireDefault(__webpack_require__(28380));
var _utils = __webpack_require__(84512);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Dom = __webpack_require__(64821);
var _StaticTabbar = _interopRequireDefault(__webpack_require__(41322));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _EventEmitter = __webpack_require__(46833);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @typedef {Object} CMDTabListNodeDeclaration
 * @property {"tab_list"} type
 * @property {CMDTabNodeDeclaration[]} children
 */

/**
 * @typedef {Object} CMDTabNodeDeclaration
 * @property {"tab"} type
 * @property {string} name
 * @property {CMDGrupX2NodeDeclaration[]|CMDgroup_x1NodeDeclaration[]} children
 */

/**
 * @typedef {Object} CMDGrupX2NodeDeclaration
 * @property {"group_x2"} type
 * @property {CMDGrupX2NodeDeclaration[]|CMDgroup_x1NodeDeclaration[]} children
 */

/**
 * @typedef {Object} CMDgroup_x1NodeDeclaration
 * @property {"group_x1"} type
 * @property {CMDGrupX2NodeDeclaration[]|CMDgroup_x1NodeDeclaration[]} children
 */

/**
 * @typedef {Object} CMDCommandNodeDeclaration
 * @property {"trigger"|"font"|"color"} type
 */

/**
 * @extends Fragment
 * @constructor
 */
function CMDTool() {
  _Fragment["default"].call(this);
  this.$nodes = {};
  _OOP["default"].drillProperty(this, this, '$buttons', '$nodes'); //adapt old version
  this.updateVisibility = this.updateVisibility.bind(this);
}
_OOP["default"].mixClass(CMDTool, _Fragment["default"]);
CMDTool.prototype.onStart = function () {
  this.getView();
};

/**
 *
 * if param is empty, update all buttons
 */
CMDTool.prototype.updateVisibility = function () {
  var _this = this;
  var delegate = this.delegate;
  if (!delegate) return;
  var keys = [];
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
    args[_key] = arguments[_key];
  }
  if (args.length === 0) {
    keys = Object.keys(this.$nodes).filter(function (k) {
      return k !== 'undefined';
    }); //remove apt nodes
  } else {
    keys = args.reduce(function (ac, cr) {
      if (Array.isArray(cr)) ac = ac.concat(cr);else if (typeof cr === "string") ac.push(cr);
      return ac;
    }, []);
  }
  keys.forEach(function (name) {
    if (!_this.$nodes[name]) return;
    var descriptor = delegate.getCmdDescriptor(name);
    if (!descriptor) return;
    _this.updateNode(_this.$nodes[name], descriptor);
  });
};
CMDTool.prototype.onResume = function () {
  this.updateVisibility();
};
CMDTool.prototype.getView = function () {
  if (this.$view) return this.$view;
  this.$view = (0, _ACore._)({
    tag: 'bscroller',
    "class": "as-form-cmd-tool"
  });
  this.refresh();
  return this.$view;
};
CMDTool.prototype.createNode = function (nd, par) {
  var handler;
  if (Array.isArray(nd)) {
    nd = {
      type: 'group_x2',
      children: nd
    };
    handler = this.cmdNodeHandlers[nd.type];
  } else if (typeof nd === "string") {
    nd = Object.assign({
      name: nd,
      type: 'trigger'
    }, this.delegate.getCmdDescriptor(nd));
    if (typeof nd.desc === "function") {
      nd.desc = nd.desc.call(this.delegate);
    }
    handler = this.cmdNodeHandlers[nd.type];
  } else handler = this.cmdNodeHandlers[nd.type];
  var nodeElt = null;
  if (handler) {
    nodeElt = handler.create.call(this, nd, par);
    nodeElt.descriptor = nd;
    nodeElt.parentDescriptor = par;
    this.$nodes[nd.name] = nodeElt;
  } else {
    console.error("Not support node type: ", nd.type, nd);
  }
  return nodeElt;
};
CMDTool.prototype.updateNode = function (nodeElt, nd) {
  if (!nodeElt) return;
  nd = Object.assign({}, nodeElt.descriptor, {
    disabled: false
  }, nd); //default disabled = false
  if (typeof nd.desc === "function") {
    nd.desc = nd.desc.call(this.delegate);
  }
  nodeElt.descriptor = nd;
  var par = nodeElt.parentDescriptor;
  var handler = this.cmdNodeHandlers[nd.type];
  if (handler) {
    if (handler.update) handler.update.call(this, nd, par, nodeElt);
  } else {
    console.error("Not support node type: ", nd.type, nd);
  }
};
CMDTool.prototype.refresh = function () {
  var _this2 = this;
  var delegate = this.delegate;
  if (!delegate) return;
  this.getView();
  this.$view.clearChild();
  this.$nodes = {};
  var groupTree = delegate.getCmdGroupTree();
  var visit = function visit(node) {
    return _this2.createNode(node, null);
  };
  this.$view.addChild(visit(groupTree));
};
CMDTool.prototype.cmdNodeHandlers = {
  tab_list: {
    /**
     * @this {CMDTool}
     * @param nd
     * @param par
     */
    create: function create(nd, par) {
      var _this3 = this;
      var items = nd.children.map(function (ch, idx) {
        return {
          text: ch.name,
          value: idx + ''
        };
      });
      if (!this.$tabBar) {
        this.$tabBar = (0, _ACore._)({
          tag: _StaticTabbar["default"],
          style: {
            display: 'inline-block',
            fontSize: 12 / 0.7 + 'px',
            marginBottom: '5px'
          },
          props: {
            value: '0'
          },
          on: {
            change: function change() {
              var idx = parseInt(_this3.$tabBar.value);
              _this3.$frames.forEach(function (frame, i) {
                frame.addStyle('display', i === idx ? '' : 'none');
              });
              _ResizeSystem["default"].updateUp(_this3.$tabBar);
            }
          }
        });
        this.$tabBarCtn = (0, _ACore._)({
          style: {
            textAlign: 'center',
            backgroundColor: 'rgba(169, 169, 169, 0.15)'
          },
          child: [this.$tabBar]
        });
      }
      this.$tabBar.items = items;
      if (!items[this.$tabBar.value]) this.$tabBar.value = '0';
      if (!this.$tabList) {
        this.$tabList = (0, _ACore._)({});
      }
      this.$tabList.clearChild();
      this.$tabList.addChild(this.$tabBarCtn);
      this.$frames = nd.children.map(function (ch, idx) {
        return _this3.createNode(ch, nd).addStyle('display', idx + '' === _this3.$tabBar.value ? '' : 'none').addStyle('textAlign', 'left');
      });
      this.$tabList.addChild(this.$frames);
      return this.$tabList;
    },
    /**
     * @this {CMDTool}
     * @param nd
     * @param par
     */
    update: function update(nd, par) {}
  },
  tab: {
    /**
     * @this {CMDTool}
     * @param nd
     * @param par
     */
    create: function create(nd, par) {
      var _this4 = this;
      return (0, _ACore._)({
        "class": 'as-cmd-tool-tab',
        attr: {
          'data-name': nd.name
        },
        child: (nd.children || []).map(function (ch) {
          return _this4.createNode(ch, nd);
        })
      });
    },
    /**
     * @this {CMDTool}
     * @param nd
     * @param par
     */
    update: function update(nd, par) {}
  },
  group_x2: {
    /**
     * @this {CMDTool}
     * @param nd
     * @param par
     */
    create: function create(nd, par) {
      var _this5 = this;
      return (0, _ACore._)({
        "class": 'as-cmd-tool-group-x2',
        child: (nd.children || []).map(function (ch) {
          return _this5.createNode(ch, nd);
        })
      });
    },
    /**
     * @this {CMDTool}
     * @param nd
     * @param par
     */
    update: function update(nd, par) {}
  },
  group_x1: {
    /**
     * @this {CMDTool}
     * @param nd
     * @param par
     */
    create: function create(nd, par) {
      return (0, _ACore._)({});
    },
    /**
     * @this {CMDTool}
     * @param nd
     * @param par
     */
    update: function update(nd, par) {}
  },
  trigger: {
    /**
     * @this {CMDTool}
     * @param nd
     * @param par
     */
    create: function create(nd, par) {
      var _this6 = this;
      var extClasses = !par || ['array', 'group_x2'].indexOf(par.type) >= 0 ? ['as-big'] : [];
      var title = nd.desc;
      var btn = (0, _ACore._)({
        tag: _RibbonButton["default"],
        "class": extClasses,
        attr: {
          title: title,
          'data-cmd-name': nd.name
        },
        props: {
          disabled: !!nd.disabled,
          descriptor: nd,
          text: nd.desc,
          icon: nd.icon
        },
        on: {
          click: function click() {
            console.log(btn);
            _this6.execCmd.apply(_this6, [nd.name].concat(btn.descriptor.args || []));
          }
        }
      });
      this.$nodes[nd.name] = btn;
      return btn;
    },
    /**
     * @this {CMDTool}
     * @param nd
     * @param par
     * @param nodeElt
     */
    update: function update(nd, par, nodeElt) {
      nodeElt.disabled = !!nd.disabled;
      nodeElt.text = nd.desc;
      nodeElt.icon = nd.icon;
    }
  },
  toggle_switch: {
    /**
     * @this {CMDTool}
     */
    create: function create(nd, par) {
      var name = nd.name;
      var self = this;
      var title = nd.desc;
      var btn = (0, _ACore._)({
        tag: _RibbonButton["default"],
        "class": ['as-type-toggle-switch', 'as-big'],
        attr: {
          title: title,
          'data-group': nd.group,
          "data-name": name,
          'data-cmd-name': name
        },
        props: {
          text: nd.desc,
          icon: nd.icon,
          disabled: !!nd.disabled,
          descriptor: nd
        },
        on: {
          click: function click() {
            var newChecked = !this.hasClass('as-checked');
            if (newChecked && nd.group) Object.keys(self.$nodes).forEach(function (otherName) {
              var otherBtn = self.$nodes[otherName];
              if (otherName === name) return;
              if (otherBtn.hasClass('as-type-toggle-switch') && otherBtn.descriptor.group === nd.group && otherBtn.hasClass('as-checked')) {
                otherBtn.removeClass('as-checked');
                self.execCmd.apply(self, [otherBtn.attr('data-name'), false].concat(otherBtn.descriptor.args || []));
              }
            });
            if (newChecked) {
              this.addClass('as-checked');
            } else {
              this.removeClass('as-checked');
            }
            self.execCmd.apply(self, [name, newChecked].concat(nd.args || []));
          }
        }
      });
      if (nd.checked) btn.addClass('as-checked');
      return btn;
    },
    /**
     * @this {CMDTool}
     * @param nd
     * @param par
     * @param nodeElt
     */
    update: function update(nd, par, nodeElt) {
      if (nd.checked) nodeElt.addClass('as-checked');else {
        nodeElt.removeClass('as-checked');
      }
      nodeElt.disabled = !!nd.disabled;
      nodeElt.text = nd.desc;
      nodeElt.icon = nd.icon;
    }
  },
  ribbon: {
    create: function create(nd, par) {
      var name = nd.name;
      var self = this;
      var btn = (0, _ACore._)({
        tag: _RibbonButton["default"].tag,
        "class": 'as-big',
        attr: {
          'data-cmd-name': name
        },
        props: {
          icon: nd.icon || nd.items[0].icon,
          items: nd.items,
          descriptor: nd,
          disabled: !!nd.disabled,
          text: nd.desc
        },
        on: {
          select: function select(event) {
            //select a item in menu
            var item = event.item;
            this.icon = item.icon;
            self.execCmd.apply(self, [name].concat(item.args || []).concat(this.descriptor.args || []));
          }
        }
      });
      return btn;
    },
    update: function update(nd, par, nodeElt) {
      nodeElt.items = nd.items;
    }
  },
  color: {
    create: function create(nd, par) {
      var _this7 = this;
      var name = nd.name;
      var btn = (0, _ACore._)({
        tag: _RibbonButton["default"],
        "class": ['as-big', 'as-type-color'],
        style: {
          '--value': nd.value || 'black'
        },
        props: {
          icon: nd.icon,
          descriptor: nd,
          text: nd.desc
        }
      });
      btn.on('click', function () {
        if (btn.hasClass('as-checked')) return;
        btn.addClass('as-checked');
        var onClickOut = function onClickOut(event) {
          if ((0, _EventEmitter.hitElement)(picker, event)) return;
          finish();
        };
        var finish = function finish() {
          btn.removeClass('as-checked');
          picker.remove();
          document.removeEventListener('click', onClickOut);
        };
        setTimeout(function () {
          document.addEventListener('click', onClickOut);
        }, 100);
        var applyValue = function applyValue(value) {
          btn.addStyle('--value', value.toString('hex6'));
          //todo: call cmd
          _this7.execCmd(name, value);
        };
        var picker = (0, _ACore._)({
          tag: _SolidColorPicker["default"],
          style: {
            position: 'fixed',
            left: '0px',
            top: '0px',
            zIndex: (0, _utils.findMaxZIndex)(btn) + 1 + '',
            visibility: 'hidden'
          },
          props: {
            value: nd.value || 'black'
          }
        }).addTo(document.body);
        var pickerBound = _Rectangle["default"].fromClientRect(picker.getBoundingClientRect());
        var btnBound = _Rectangle["default"].fromClientRect(btn.getBoundingClientRect());
        var screenSize = (0, _Dom.getScreenSize)();
        var screenBound = new _Rectangle["default"](0, 0, screenSize.width, screenSize.height);
        var aBounds = [new _Rectangle["default"](btnBound.x, btnBound.y + btnBound.height, pickerBound.width, pickerBound.height), new _Rectangle["default"](btnBound.x + btnBound.width - pickerBound.width, btnBound.y + btnBound.height, pickerBound.width, pickerBound.height), new _Rectangle["default"](btnBound.x, btnBound.y - pickerBound.height, pickerBound.width, pickerBound.height), new _Rectangle["default"](btnBound.x + btnBound.width - pickerBound.width, btnBound.y - pickerBound.height, pickerBound.width, pickerBound.height)];
        var bestSquare = 0;
        var bestBound;
        var square;
        for (var i = 0; i < aBounds.length; ++i) {
          square = aBounds[i].collapsedSquare(screenBound);
          if (square > bestSquare) {
            bestSquare = square;
            bestBound = aBounds[i];
          }
        }
        picker.addStyle({
          left: bestBound.x + 'px',
          top: bestBound.y + 'px',
          visibility: 'visible'
        });
        picker.on('change', function (event) {
          applyValue(picker.value);
        });
        picker.on('submit', function (event) {
          finish();
        });
      });
      return btn;
    },
    update: function update(nd, par, nodeElt) {
      nodeElt.addStyle('--value', nd.value || 'black');
    }
  },
  font: {
    create: function create(nd, par) {
      var btn = (0, _ACore._)({
        tag: _RibbonButton["default"],
        props: {
          icon: nd.icon,
          text: nd.desc
        }
      });
      return btn;
    },
    update: function update(nd, par, nodeElt) {}
  }
};
CMDTool.prototype.execCmd = function () {
  if (this._delegate) this._delegate.execCmd.apply(this._delegate, arguments);
};
Object.defineProperty(CMDTool.prototype, 'delegate', {
  /**
   *
   * @param {CMDToolDelegate} value
   */
  set: function set(value) {
    if (this._delegate) {
      this._delegate.cmdToolPartner = null;
    }
    this._delegate = value;
    if (this._delegate) {
      this._delegate.cmdToolPartner = this;
    }
  },
  get: function get() {
    return this._delegate;
  }
});
var _default = CMDTool;
exports["default"] = _default;
function CMDToolDelegate() {
  /**
   *
   * @type {null|CMDTool}
   */
  this.cmdToolPartner = null;
  /**
   * @type {null|CMDRunner}
   * @name cmdRunner
   * @memberOf CMDToolDelegate#
   */
}

/**
 *
 * @returns {*[]}
 */
CMDToolDelegate.prototype.getCmdGroupTree = function () {
  return [];
};

/**
 *
 * @param name
 * @returns {{type: string, icon: string, desc}} - return default descriptor
 */
CMDToolDelegate.prototype.getCmdDescriptor = function (name) {
  return {
    type: 'trigger',
    icon: 'span.mdi.mdi-command',
    desc: name
  };
};
CMDToolDelegate.prototype.execCmd = function (name) {
  var _this$cmdRunner;
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
    args[_key2 - 1] = arguments[_key2];
  }
  if (this.cmdRunner) return (_this$cmdRunner = this.cmdRunner).invoke.apply(_this$cmdRunner, [name].concat(args));
};
CMDToolDelegate.prototype.refresh = function () {
  if (this.cmdToolPartner) this.cmdToolPartner.refresh();
};
CMDToolDelegate.prototype.updateVisibility = function () {
  var _this$cmdToolPartner;
  if (this.cmdToolPartner) (_this$cmdToolPartner = this.cmdToolPartner).updateVisibility.apply(_this$cmdToolPartner, arguments);
};

/***/ }),

/***/ 84963:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
__webpack_require__(84980);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function CPUViewer() {
  /***
   *
   * @type {HTMLCanvasElement}
   */
  this.$canvas = (0, _ACore.$)('canvas', this);
  this.ctx = this.$canvas.getContext('2d');
  this.offsetTime = 0;
  this.inv = -1;
  this.usage = Array(120).fill(0);
  this.holdStart = 0;
  this.holdTime = 0;
  this.logOffset = 0;
  this.counter = 0;
  this['tick'] = this.tick.bind(this);
}
CPUViewer.tag = 'CPUViewer'.toLowerCase();
CPUViewer.render = function () {
  return (0, _ACore._)({
    "class": 'as-cpu-viewer',
    child: {
      tag: 'canvas',
      attr: {
        width: '120px',
        height: '50px'
      }
    }
  });
};
CPUViewer.prototype.start = function () {
  if (this.inv < 0) {
    this.offsetTime = new Date().getTime();
    setInterval(this.tick, 250);
  }
};
CPUViewer.prototype.stop = function () {
  if (this.inv > 0) {
    clearInterval(this.inv);
    this.inv = -1;
  }
};
CPUViewer.prototype.tick = function () {
  while (this.holdTime > 250) {
    this.holdTime -= 250;
    this.usage.push(100);
  }
  this.usage.push(this.holdTime * 100 / 250);
  while (this.usage.length > 120) {
    this.usage.shift();
  }
  this.ctx.fillStyle = 'black';
  this.ctx.fillRect(0, 0, 120, 50);
  var y;
  this.ctx.fillStyle = 'yellow';
  for (var x = 0; x < this.usage.length; ++x) {
    y = this.usage[x] / 2;
    this.ctx.fillRect(x, 50 - y, 1, y);
  }
  var now = new Date().getTime();
  this.logOffset = now;
  this.holdStart = now;
  this.holdTime = 0;
};
CPUViewer.prototype.hold = function () {
  if (this.counter === 0) {
    this.holdStart = new Date().getTime();
  }
  this.counter++;
};
CPUViewer.prototype.release = function () {
  if (this.counter <= 0) return;
  this.counter--;
  if (this.counter === 0) {
    this.holdTime += new Date().getTime() - this.holdStart;
  }
};

/***
 *
 * @type {CPUViewer}
 */
CPUViewer.instance = null;
CPUViewer.state = 'NOT_INIT';
CPUViewer.start = function () {
  if (!this.instance) {
    this.instance = (0, _ACore._)('cpuviewer');
    this.state = "NOT_ATTACHED";
  }
  if (this.state === "NOT_ATTACHED") {
    this.state = "RUNNING";
    _Dom["default"].documentReady.then(function () {
      document.body.appendChild(this.instance);
    }.bind(this));
  }
  this.instance.start();
  CPUViewer.hold = function () {
    this.instance.hold();
  };
  CPUViewer.release = function () {
    this.instance.release();
  };
};
CPUViewer.stop = function () {
  if (!this.instance) return;
  if (this.state !== "RUNNING") return;
  this.instance.stop();
  this.instance.remove();
  this.state = 'NOT_ATTACHED';
};
CPUViewer.hold = function () {};
CPUViewer.release = function () {};
_ACore["default"].install(CPUViewer);
var _default = CPUViewer;
exports["default"] = _default;
function AttachHookView() {}
_Dom["default"].documentReady.then(function () {
  return;
  if (!window.ABSOL_DEBUG && location.href.indexOf('localhost') < 0) {
    return;
  }
  var elt = (0, _ACore._)({
    "class": 'as-pending-attachhook-count'
  }).addTo(document.body);
  setInterval(function () {
    elt.innerHTML = '' + Object.keys(pendingAttachHooks).length;
  }, 2000);
});

/***/ }),

/***/ 95972:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.OldCalendarInput = OldCalendarInput;
exports["default"] = void 0;
__webpack_require__(350);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _datetime = __webpack_require__(58286);
var _ChromeCalendar = _interopRequireDefault(__webpack_require__(51631));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/**
 * @extends AElement
 * @constructor
 */
function CalendarInput() {
  var thisCI = this;
  this.$input = $('input', this);
  this._value = null;
  this._quickOption = _ChromeCalendar["default"].showWhenClick(this, {
    minLimitDate: this.minLimitDate || this.minDateLimit,
    maxLimitDate: this.maxLimitDate || this.maxDateLimit,
    selectedDates: [new Date()]
  }, 'auto', function (value) {
    thisCI._value = value;
    thisCI.$input.value = thisCI.formatDateString(value);
    thisCI._quickOption.opt.selectedDates = [value]; //change new option
    thisCI.emit('change', {
      target: thisCI,
      value: value
    }, thisCI);
  });
  _OOP["default"].drillProperty(this, this._quickOption.opt, {
    minLimitDate: 'minLimitDate',
    maxLimitDate: 'maxLimitDate',
    minDateLimit: 'minLimitDate',
    maxDateLimit: 'maxLimitDate'
  });
}
CalendarInput.tag = 'CalendarInput'.toLowerCase();
CalendarInput.render = function () {
  return _({
    extendEvent: ['change'],
    "class": 'absol-calendar-input',
    child: 'input[type="text"][readonly="true"][value="dd/mm/yyyy"]'
  });
};
CalendarInput.property = {};
CalendarInput.property.value = {
  set: function set(value) {
    if (value === null || value === undefined) {
      this.$input.value = this.formatDateString(value);
      this._quickOption.opt.selectedDates = [];
      this._value = value;
      this._quickOption.opt.selectedDates = [new Date()];
    } else {
      if (typeof value == 'number') value = new Date(value);
      this._value = value;
      this.$input.value = this.formatDateString(value);
      this._quickOption.opt.selectedDates = [value];
    }
  },
  get: function get() {
    return this._value;
  }
};
CalendarInput.property.disabled = {
  set: function set(value) {
    this.$input.disabled = !!value;
    if (value) {
      this.addClass('absol-disabled');
    } else {
      this.removeClass('absol-disabled');
    }
  },
  get: function get() {
    return this.$input.disabled;
  }
};
CalendarInput.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
CalendarInput.attribute = {
  disabled: {
    set: function set(value) {
      this.$input.attr('disabled', value);
      if (this.$input.disabled) this.addClass('absol-disabled');
    },
    get: function get() {
      return this.$input.attr('disabled');
    },
    remove: function remove() {
      this.$input.attr('disabled', undefined);
      this.removeClass('absol-disabled');
    }
  }
};
CalendarInput.property.dateToString = {
  set: function set(value) {
    this._dateToString = value;
    this.$input.value = this.formatDateString(this.value);
  },
  get: function get() {
    return this._dateToString;
  }
};
CalendarInput.prototype.formatDateString = function (date) {
  if (!date) {
    return {
      'undefined': 'dd/mm/yyyy',
      'function': '--/--/--',
      'object': 'dd/mm/yyyy',
      'string': _typeof(this.dateToString)
    }[_typeof(this.dateToString)] || '--/--/--';
  }
  if (!this.dateToString) {
    return (0, _datetime.formatDateString)(date);
  } else if (typeof this.dateToString == 'string') {
    return (0, _datetime.formatDateString)(date, this.dateToString);
  } else if (typeof this.dateToString == 'function') {
    return this.dateToString(date);
  }
};
_ACore["default"].install(CalendarInput);
function OldCalendarInput() {}
OldCalendarInput.tag = 'calendar-input';
OldCalendarInput.render = function (data) {
  return _({
    tag: 'calendarinput',
    extendEvent: 'changed',
    props: data,
    on: {
      change: function change(ev) {
        this.emit('changed', ev.value);
      }
    }
  });
};
_ACore["default"].install(OldCalendarInput);
var _default = CalendarInput;
exports["default"] = _default;

/***/ }),

/***/ 11946:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(59338);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var $$ = _ACore["default"].$$;

/***
 * @extends AElement
 * @constructor
 */
function CheckBox() {
  this.defineEvent('change');
  /***
   *
   * @type {CheckboxInput}
   */
  this.$input = $('checkboxinput', this).on('change', this.notifyChange.bind(this));
  this.$labels = $$('span', this);
  this.on('click', this.eventHandler.click);
  _OOP["default"].drillProperty(this, this.$input, ['checked']);
  _OOP["default"].drillProperty(this, this.$input, ['minus']);
  /***
   * @type {boolean}
   * @name checked
   * @memberOf CheckBox#
   */

  /***
   * @type {boolean}
   * @name minus
   * @memberOf CheckBox#
   */
}

CheckBox.tag = 'checkbox';
CheckBox.render = function () {
  return _({
    "class": ['absol-checkbox', 'as-no-label'],
    child: [{
      tag: 'span',
      "class": ['absol-checkbox-label', 'as-left'],
      child: {
        text: ''
      }
    }, 'checkboxinput', {
      tag: 'span',
      "class": ['absol-checkbox-label', 'as-right'],
      child: {
        text: ''
      }
    }]
  });
};
CheckBox.prototype.notifyChange = function () {
  this.emit('change', {
    type: 'change',
    checked: this.checked,
    target: this
  }, this);
};
//v, labelText, checked

CheckBox.attribute = {
  checked: {
    set: function set(value) {
      if (value === 'false' || value == null) {
        this.checked = false;
      } else {
        this.checked = true;
      }
    },
    get: function get() {
      return this.checked ? 'true' : 'false';
    },
    remove: function remove() {
      this.checked = false;
    }
  },
  disabled: {
    set: function set(value) {
      this.disabled = !(value === 'false' || value === null);
    },
    get: function get() {
      return this.disabled ? 'true' : 'false';
    },
    remove: function remove() {
      this.disabled = false;
    }
  },
  readonly: {
    set: function set(value) {
      this.readOnly = !(value === 'false' || value === null);
    },
    get: function get() {
      return this.readOnly ? 'true' : 'false';
    }
  }
};
CheckBox.property = {};
CheckBox.property.text = {
  get: function get() {
    return this._text;
  },
  set: function set(value) {
    value = value || '';
    if (value.length === 0) {
      this.addClass('as-no-label');
    } else {
      this.removeClass('as-no-label');
    }
    this._text = value;
    this.$labels[0].firstChild.data = value;
    this.$labels[1].firstChild.data = value;
  }
};
CheckBox.property.disabled = {
  get: function get() {
    return this.$input.disabled;
  },
  set: function set(value) {
    value = !!value;
    this.$input.disabled = value;
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  }
};
CheckBox.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
      this.$input.readOnly = true;
    } else {
      this.addClass('as-read-only');
      this.$input.readOnly = false;
    }
  },
  get: function get() {
    return this.$input.readOnly;
  }
};

/***
 *
 * @type {{}|CheckBox}
 */
CheckBox.eventHandler = {};
CheckBox.eventHandler.click = function (event) {
  if (!_EventEmitter["default"].hitElement(this.$input, event) && !this.readOnly) {
    this.$input.click();
  }
};
_ACore["default"].install(CheckBox);
var _default = CheckBox;
exports["default"] = _default;

/***/ }),

/***/ 8398:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(80963);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var tickIcon = _(['<svg class="as-checkbox-input-check-icon" width="18px" height="18px" version="1.1" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" >', ' <g transform="translate(0 -279)">', '  <path class="bound" d="m3 279.69h12c1.3434 0.0111 2.3298 1.5259 2.3131 2.4775v11.836c0.05005 0.89373-1.1834 2.2964-2.3131 2.3131h-12c-0.82692 0.0166-2.3131-1.1834-2.3131-2.3131v-12.237c0.0022374-1.171 0.3775-2.0759 2.3131-2.0759z" style="stroke-linejoin:round; stroke-width: 1"/>', '  <path class="tick" d="m3.1656 288.66c-0.10159 0.0612-0.11743 0.12506-0.12993 0.18899l3.7473 4.3467c0.066638 0.0459 0.11813 0.0263 0.16832 1e-3 0 0 1.7699-4.2166 4.7251-7.4568 1.4783-1.6208 3.2406-3.3659 3.2406-3.3659 0.0054-0.14125-0.10946-0.15807-0.1754-0.22551 0 0-2.5832 1.6364-4.7524 3.8336-1.8697 1.8939-3.6666 4.4016-3.6666 4.4016z"/>', '  <path class="minus" d="m4 287 h10 v2 h-10z"/>', ' </g>', '</svg>'].join(''));

/***
 * @extends AElement
 * @constructor
 */
function CheckboxInput() {
  this.$input = $('input', this).on('change', this.notifyChange.bind(this));
  this.checked = false;
  this.disabled = false;
  this.readOnly = false;
  this.on('click', this.eventHandler.click);
  this.onchange = null;
}
CheckboxInput.tag = "CheckboxInput".toLowerCase();
CheckboxInput.render = function (data) {
  return _({
    tag: 'label',
    extendEvent: 'change',
    "class": 'as-checkbox-input',
    child: [{
      elt: data && data.$input,
      tag: 'input',
      "class": 'as-checkbox-input-value',
      attr: {
        type: 'checkbox'
      }
    }, tickIcon.cloneNode(true)]
  });
};

/***
 * as normal, change event will be fired when checkbox change by system
 */
CheckboxInput.prototype.notifyChange = function () {
  var event = {
    checked: this.checked
  };
  this.emit('change', event, this);
};
CheckboxInput.prototype._updateCheckedClass = function () {
  if (this.checked) {
    this.addClass('as-checked');
  } else {
    this.removeClass('as-checked');
  }
};
CheckboxInput.property = {};
CheckboxInput.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
    this.$input.disabled = !!value;
  },
  get: function get() {
    return this.$input.disabled;
  }
};
CheckboxInput.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};

/***
 *
 * @type {CheckboxInput}
 */
CheckboxInput.property.checked = {
  set: function set(value) {
    this.$input.checked = !!value;
    this._updateCheckedClass();
  },
  get: function get() {
    return this.$input.checked;
  }
};

/***
 *
 * @type {CheckboxInput}
 */
CheckboxInput.property.minus = {
  set: function set(value) {
    if (value) {
      this.addClass('as-has-minus');
    } else {
      this.removeClass('as-has-minus');
    }
  },
  get: function get() {
    return this.hasClass('as-has-minus');
  }
};
CheckboxInput.attribute = {
  checked: {
    set: function set(value) {
      if (value === 'false' || value === null) {
        this.checked = false;
      } else {
        this.checked = true;
      }
    },
    get: function get() {
      return this.checked ? 'true' : 'false';
    },
    remove: function remove() {
      this.checked = false;
    }
  },
  disabled: {
    set: function set(value) {
      if (value === 'false' || value === null) {
        this.disabled = false;
      } else {
        this.disabled = true;
      }
    },
    get: function get() {
      return this.disabled ? 'true' : 'false';
    },
    remove: function remove() {
      this.disabled = false;
    }
  }
};

/***
 *
 * @type {CheckboxInput}
 */
CheckboxInput.eventHandler = {};
CheckboxInput.eventHandler.click = function (event) {
  if (this.readOnly) {
    event.preventDefault();
  }
  this._updateCheckedClass();
};
_ACore["default"].install(CheckboxInput);
CheckboxInput.autoReplace = function () {
  var placeHolders = Array.prototype.slice.call(document.getElementsByTagName(this.tag));
  var ph;
  var attOfPH;
  var attrs;
  var style;
  var classList;
  var attNode;
  var attrName, attrValue;
  var props;
  for (var i = 0; i < placeHolders.length; ++i) {
    ph = placeHolders[i];
    attOfPH = ph.attributes;
    classList = [];
    style = {};
    attrs = {};
    props = {};
    for (var j = 0; j < attOfPH.length; ++j) {
      attNode = attOfPH[j];
      attrName = attNode.nodeName;
      attrValue = attNode.nodeValue;
      if (attrName == 'style') {
        attrValue.trim().split(';').reduce(function (style, prop) {
          var p = prop.split(':');
          if (p.length == 2) {
            style[p[0].trim()] = p[1].trim();
          }
          return style;
        }, style);
      } else if (attrName == 'class') {
        classList = attrValue.trim().split(/\s+/);
      } else if (attrName == 'onchange') {
        props.onchange = new Function('event', 'sender', attrValue);
      } else {
        attrs[attrName] = attrValue;
      }
    }
    var newElt = _({
      tag: this.tag,
      attr: attrs,
      "class": classList,
      style: style,
      props: props
    });
    $(ph).selfReplace(newElt);
  }
};
CheckboxInput.initAfterLoad = function () {
  _Dom["default"].documentReady.then(function () {
    CheckboxInput.autoReplace();
  });
};
var _default = CheckboxInput;
exports["default"] = _default;

/***/ }),

/***/ 62896:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.CLHolder = CLHolder;
exports.CLHolderRef = CLHolderRef;
exports.CheckListBox = CheckListBox;
exports.keyStringOfItem = exports["default"] = void 0;
exports.makeItem = makeItem;
exports.measureArial14TextWidth = void 0;
exports.releaseItem = releaseItem;
exports.requireItem = requireItem;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _SelectListBox = _interopRequireWildcard(__webpack_require__(47818));
var _CheckListItem = _interopRequireDefault(__webpack_require__(27129));
__webpack_require__(85969);
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
var _utils = __webpack_require__(84512);
var _Dom = __webpack_require__(64821);
var _stringGenerate = __webpack_require__(10713);
var _ListSearchMaster = _interopRequireDefault(__webpack_require__(85604));
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _TextMeasurement = _interopRequireDefault(__webpack_require__(77694));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _DelaySignal = _interopRequireDefault(__webpack_require__(81809));
var _Array = __webpack_require__(40411);
var _stringUtils = __webpack_require__(26243);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var itemPool = [];
function makeItem() {
  return (0, _ACore._)({
    tag: _CheckListItem["default"],
    on: {
      select: function select(event) {
        this.$parent.eventHandler.itemSelect(this, event);
      }
    }
  });
}
function requireItem($parent) {
  var item;
  if (itemPool.length > 0) {
    item = itemPool.pop();
  } else {
    item = makeItem();
  }
  item.$parent = $parent;
  return item;
}
function releaseItem(item) {
  item.$parent = null;
  item.selected = false;
  itemPool.push(item);
}
function fillItemToPage($parent, $page, n) {
  while ($page.childNodes.length > n) {
    releaseItem($page.lastChild);
    $page.removeChild($page.lastChild);
  }
  while ($page.childNodes.length < n) {
    $page.addChild(requireItem($parent));
  }
}
var mTextMeasurement = null;
var measureArial14TextWidth = function measureArial14TextWidth(text) {
  if (!mTextMeasurement) {
    mTextMeasurement = new _TextMeasurement["default"]();
    mTextMeasurement.compute('14px arial');
  }
  return mTextMeasurement.measureTextWidth(text, '14px arial');
};
exports.measureArial14TextWidth = measureArial14TextWidth;
var keyStringOfItem = function keyStringOfItem(item) {
  return (0, _utils.keyStringOf)(item.value) + (0, _stringUtils.stringHashCode)(item.text + '');
};

/***
 * TODO: check all duplicate value when select
 * @extends SelectListBox
 * @constructor
 */
exports.keyStringOfItem = keyStringOfItem;
function CheckListBox() {
  if (this.cancelWaiting) this.cancelWaiting();
  this._items = [];
  this._valueDict = {};
  this.itemHolders = [];
  this._holderDict = {};
  this._estimateWidth = 100;
  this.widthLimit = (0, _SelectListBox.calcWidthLimit)();
  this.addStyle('--as-width-limit', this.widthLimit + 'px');
  this.$scroller = (0, _ACore.$)('.as-select-list-box-scroller', this);
  this.$content = (0, _ACore.$)('.as-select-list-box-content', this);
  this.$pages = (0, _ACore.$$)('.as-select-list-box-page', this);
  this.$searchInput = (0, _ACore.$)('searchtextinput', this).on('stoptyping', this.eventHandler.searchModify);
  this.pagingCtrl = new CLPagingController(this);
  this.searchMaster = new _ListSearchMaster["default"]();
  this._initDomHook();
  this._initFooter();
  this.domSignal.on('viewListAtValue', this.viewListAtValue.bind(this));
  this.domSignal.on('viewListAtItem', this.viewListAtItem.bind(this));
  /***
   * @name selectedAll
   * @type {boolean}
   * @memberOf CheckListBox#
   */
  /***
   * @name selectedItems
   * @type {Array<>}
   * @memberOf CheckListBox#
   */
}

CheckListBox.tag = 'CheckListBox'.toLowerCase();
CheckListBox.render = function () {
  return (0, _ACore._)({
    tag: _Follower["default"].tag,
    extendEvent: ['change', 'cancel', 'close'],
    attr: {
      tabindex: 0
    },
    "class": ['as-select-list-box', 'as-check-list-box'],
    child: [{
      "class": 'as-select-list-box-search-ctn',
      child: 'searchtextinput'
    }, {
      "class": ['as-bscroller', 'as-select-list-box-scroller'],
      child: [{
        "class": 'as-select-list-box-content',
        child: Array(3).fill('.as-select-list-box-page')
      }]
    }, {
      "class": 'as-dropdown-box-footer',
      child: [{
        tag: 'checkbox',
        "class": 'as-select-list-box-check-all',
        props: {
          checked: false,
          text: _LanguageSystem["default"].getText('txt_check_all') || _LanguageSystem["default"].getText('txt_all') || 'Check All'
        }
      }, {
        "class": 'as-dropdown-box-footer-right',
        child: [{
          tag: 'a',
          "class": 'as-select-list-box-cancel-btn',
          attr: {
            'data-ml-key': 'txt_cancel'
          }
        }, {
          tag: 'a',
          "class": 'as-select-list-box-close-btn',
          attr: {
            'data-ml-key': 'txt_close'
          }
        }]
      }]
    }, 'attachhook.as-dom-signal'],
    props: {
      anchor: [1, 6, 2, 5]
    }
  });
};
Object.assign(CheckListBox.prototype, _SelectListBox["default"].prototype);
CheckListBox.property = {};
CheckListBox.eventHandler = {};
CheckListBox.prototype.footerMinWidth = 110;
CheckListBox.prototype.revokeResource = function () {
  this.searchMaster.revokeResource();
};
CheckListBox.prototype._initDomHook = function () {
  var _this = this;
  this.domSignal = new _DelaySignal["default"]();
  this.domSignal.on('viewListAt', this.viewListAt.bind(this));
  this.domSignal.on('viewListAtFirstSelected', this.viewListAtFirstSelected.bind(this));
  this.domSignal.on('viewListAtCurrentScrollTop', this.viewListAtCurrentScrollTop.bind(this));
  this.domSignal.on('updateCheckedAll', function () {
    _this.$checkAll.checked = _this.selectedAll;
  });
};
CheckListBox.prototype._initFooter = function () {
  this.$checkAll = (0, _ACore.$)('.as-select-list-box-check-all', this).on('change', this.eventHandler.checkAllChange);
  this.$cancelBtn = (0, _ACore.$)('.as-select-list-box-cancel-btn', this).on('click', this.eventHandler.clickCancelBtn);
  this.$closeBtn = (0, _ACore.$)('.as-select-list-box-close-btn', this);
  if (this.$closeBtn)
    //mobile ref
    this.$closeBtn.on('click', this.eventHandler.clickCloseBtn);
};
CheckListBox.prototype.viewListAtFirstSelected = _noop["default"];
CheckListBox.prototype.viewListAtValue = function (value) {
  if (this.isDescendantOf(document.body)) {
    this.pagingCtrl.viewListAtValue(value);
  }
};
CheckListBox.prototype.viewListAtItem = function (item) {
  if (this.isDescendantOf(document.body)) {
    this.pagingCtrl.viewListAtItem(item);
  }
};

/**
 * wrong function name
 * @deprecated
 * @param value
 * @returns {*}
 */
CheckListBox.prototype.findItemsByValue = function (value) {
  return this._holderDict[(0, _utils.keyStringOf)(value)];
};
CheckListBox.prototype.findItemHoldersByValue = function (value) {
  return this._holderDict[(0, _utils.keyStringOf)(value)];
};
CheckListBox.prototype.findItemByValue = function (value) {
  var holders = this._holderDict[(0, _utils.keyStringOf)(value)];
  if (holders && holders.length > 0) {
    return holders[0].item;
  } else return null;
};

/**
 *
 * @param {number | Array<number>}idx
 */
CheckListBox.prototype.getItemByIndex = function (idx) {
  var arr = this._items;
  if (!Array.isArray(idx)) {
    idx = [idx];
  }
  for (var i = 0; i < idx.length; ++i) {
    if (!arr) return null;
    if (i + 1 === idx.length) return arr[idx[i]];
    arr = arr[idx[i]].items;
  }
};
CheckListBox.prototype.notifyChange = function (data) {
  this.emit('change', Object.assign({
    target: this,
    type: 'change'
  }, data), this);
};
CheckListBox.prototype.focus = _SelectListBox["default"].prototype.focus;
CheckListBox.property.values = {
  set: function set(values) {
    values = values || [];
    var dict = values.reduce(function (ac, cr) {
      var key = (0, _utils.keyStringOf)(cr);
      ac[key] = cr;
      return ac;
    }, {});
    this._valueDict = dict;
    this.itemHolders.forEach(function visit(holder) {
      holder.selected = holder.valueKey in dict;
      if (holder.children) holder.children.forEach(visit);
    });
    this.pagingCtrl.updateSelected();
    this.domSignal.emit('updateCheckedAll');
  },
  get: function get() {
    var values = this.itemHolders.reduce(function visit(ac, holder) {
      if (holder.selected && !holder.data.noSelect) ac.push(holder.data.value);
      if (holder.children) holder.children.reduce(visit, ac);
      return ac;
    }, []);
    return (0, _Array.arrayUnique)(values);
  }
};
CheckListBox.property.selectedIndexes = {
  set: function set(indexes) {
    if (!Array.isArray(indexes)) indexes = [];
  },
  get: function get() {
    var genVisit = function genVisit(rootValue) {
      return function (ac, holder, i) {
        if (holder.selected && !holder.data.noSelect) {
          if (rootValue) ac.push(rootValue.concat([i]));else ac.push(i);
        }
        if (holder.children) holder.children.reduce(genVisit((rootValue || []).concat([i])), ac);
        return ac;
      };
    };
    return this.itemHolders.reduce(genVisit(), []);
  }
};
CheckListBox.property.selectedItems = {
  get: function get() {
    var _this2 = this;
    return this.selectedIndexes.map(function (idx) {
      return _this2.getItemByIndex(idx);
    }).filter(function (it) {
      return !!it;
    });
  }
};
CheckListBox.prototype.resetSearchState = function () {
  this.$searchInput.value = '';
  this.pagingCtrl.viewArr(this.itemHolders);
};
CheckListBox.property.enableSearch = _SelectListBox["default"].property.enableSearch;
CheckListBox.property.items = {
  set: function set(items) {
    var _this3 = this;
    items = items || [];
    items = (0, _utils.copySelectionItemArray)(items, {
      removeNoView: true,
      removeNewLine: true
    });
    this._items = items;
    this.itemHolders = items.map(function (it) {
      return new CLHolder(_this3, it);
    });
    var res = this.itemHolders.reduce(function visit(ac, cr) {
      var textWidth = 3.5 * 14 + 1.75 * 14 * cr.level + 14 + measureArial14TextWidth(cr.data.text + '') + 7 + 17;
      if (cr.data.icon) textWidth += 32;
      ac.textWidth = Math.max(ac.textWidth, textWidth);
      if (cr.data.desc) {
        ac.descWidth = Math.max(ac.descWidth, measureArial14TextWidth(cr.data.desc + ''));
      }
      ac.dict[cr.valueKey] = ac.dict[cr.valueKey] || [];
      ac.dict[cr.valueKey].push({
        idx: ac.idx++,
        item: cr.data,
        holder: cr
      });
      if (cr.children) cr.children.reduce(visit, ac);
      return ac;
    }, {
      idx: 0,
      dict: {},
      textWidth: 50,
      descWidth: 0
    });
    this._holderDict = res.dict;
    this._estimateWidth = Math.min(this.widthLimit || Infinity, res.textWidth + (res.descWidth ? res.descWidth + 30 : 0));
    this.addStyle('--select-list-estimate-width', this._estimateWidth + 'px');
    this.$scroller.scrollTop = 0;
    this.pagingCtrl.viewArr(this.itemHolders);
    this.searchMaster.transfer(this.itemHolders.map(function (it) {
      return it.getSearchItem();
    }));
    this.domSignal.emit('updateCheckedAll');
  },
  get: function get() {
    return (0, _utils.copySelectionItemArray)(this._items);
  }
};
CheckListBox.property.selectedAll = {
  get: function get() {
    return this.itemHolders.length > 0 && this.itemHolders.every(function visit(holder) {
      var res = holder.selected || holder.data.noSelect;
      if (res && holder.children) {
        res = holder.children.every(visit);
      }
      return res;
    });
  }
};

/***
 * @this CheckListBox
 * @param event
 */
CheckListBox.eventHandler.checkAllChange = function (event) {
  var _this4 = this;
  var checked = this.$checkAll.checked;
  var changed = false;
  var visit = function visit(holder) {
    var canCheck = checked && !holder.data.noSelect;
    if (holder.selected !== canCheck) {
      changed = true;
      holder.selected = canCheck;
    }
    if (canCheck) {
      _this4._valueDict[holder.valueKey] = holder.data.value;
    } else {
      delete _this4._valueDict[holder.valueKey];
    }
    if (holder.children) holder.children.forEach(visit);
  };
  this.itemHolders.forEach(visit);
  this.pagingCtrl.updateSelected();
  if (changed) {
    this.notifyChange({
      originalEvent: event.originalEvent || event.originEvent || event,
      action: checked ? 'check_all' : "uncheck_all"
    }, this);
  }
};

/***
 * @this CheckListBox
 * @param itemElt
 * @param event
 */
CheckListBox.eventHandler.itemSelect = function (itemElt, event) {
  var selected = itemElt.selected;
  var holder = itemElt.clHolder;
  holder.selected = selected;
  if (selected) {
    this._valueDict[holder.valueKey] = holder.data.value;
  } else {
    delete this._valueDict[holder.valueKey];
  }
  this.$checkAll.checked = this.selectedAll;
  this.notifyChange({
    originalEvent: event.originalEvent || event.originEvent || event,
    action: selected ? 'check' : 'uncheck',
    value: holder.data.value,
    itemData: holder.data
  });
  this.domSignal.emit('updateCheckedAll');
};

/***
 * @this CheckListBox
 * @param event
 */
CheckListBox.eventHandler.clickCancelBtn = function (event) {
  this.emit('cancel', {
    type: 'cancel',
    target: this,
    originalEvent: event
  }, this);
};

/***
 * @this CheckListBox
 * @param event
 */
CheckListBox.eventHandler.clickCloseBtn = function (event) {
  this.emit('close', {
    type: 'close',
    target: this,
    originalEvent: event
  }, this);
};

/**
 * @this {CheckListBox}
 */
CheckListBox.eventHandler.searchModify = function () {
  var _this5 = this;
  var text = this.$searchInput.value;
  if (text) {
    this.searchMaster.query({
      text: text
    }).then(function (result) {
      if (text !== _this5.$searchInput.value) return;
      if (!result) return; //why?
      var arr = _this5.itemHolders.filter(function (it) {
        return !!result[it.id];
      });
      arr.sort(function (a, b) {
        return result[b.id][1] - result[a.id][1];
      });
      var searchHolders = arr.map(function (holder) {
        return new CLHolderRef(_this5, holder, null, result);
      });
      _this5.$scroller.scrollTop = 0;
      _this5.pagingCtrl.viewArr(searchHolders);
      _ResizeSystem["default"].update();
    });
  } else {
    this.pagingCtrl.viewArr(this.itemHolders.reduce(function (ac, holder) {
      return holder.toArray(ac);
    }, []));
    _ResizeSystem["default"].update();
  }
};
_ACore["default"].install(CheckListBox);

/**
 * @param boxElt
 * @param data
 * @param parent
 * @constructor
 */
function CLHolder(boxElt, data, parent) {
  var _this6 = this;
  this.id = (0, _stringGenerate.randomIdent)(8);
  this.parent = parent;
  this.level = parent ? parent.level + 1 : 0;
  this.boxElt = boxElt;
  this.data = data;
  (0, _OOP.drillProperty)(this, this, 'item', 'data'); //adapt mobile and desktop
  this.valueKey = (0, _utils.keyStringOf)(data.value);
  this.itemKey = keyStringOfItem(data);
  this.itemElt = null;
  this.children = null;
  this.selected = this.valueKey in boxElt._valueDict;
  var Clazz = this.constructor;
  if (data.items && data.items.length > 0) {
    this.children = data.items.map(function (it) {
      return new Clazz(boxElt, it, _this6);
    });
  }
}
CLHolder.prototype.toArray = function (ac) {
  ac = ac || [];
  ac.push(this);
  if (this.children) this.children.reduce(function (ac, holder) {
    return holder.toArray(ac);
  }, ac);
  return ac;
};
CLHolder.prototype.toDictionary = function (ac) {
  ac = ac || {};
  ac[this.valueKey] = this;
  if (this.children) this.children.reduce(function (ac, holder) {
    return holder.toDictionary(ac);
  }, ac);
  return ac;
};
CLHolder.prototype.attachView = function (itemElt) {
  if (itemElt.clHolder) itemElt.clHolder.detachView();
  if (!this.textLength) this.textLength = (0, _utils.measureText)(this.data.text + '', '14px arial').width;
  if (this.textLength > this.boxElt.widthLimit - (0.7 + 2.5) * 14) {
    itemElt.attr('title', this.data.text);
  }
  itemElt.clHolder = this;
  this.itemElt = itemElt;
  itemElt.data = this.data;
  itemElt.level = this.level;
  itemElt.selected = this.selected;
};
CLHolder.prototype.detachView = function () {
  if (this.itemElt) {
    this.itemElt.attr('title', null);
    this.itemElt.clHolder = null;
    this.itemElt = null;
  }
};
CLHolder.prototype.getSearchItem = function () {
  var res = {
    value: this.id
  };
  res.text = this.data.text + '';
  if (this.data.desc) res.text += '/' + this.data.desc;
  if (this.children) res.items = this.children.map(function (c) {
    return c.getSearchItem();
  });
  return res;
};
function CLHolderRef(boxElt, origin, parent, result) {
  var _this7 = this;
  this.boxElt = boxElt;
  this.origin = origin;
  this.data = origin.data;
  this.parent = parent;
  this.level = origin.level;
  _OOP["default"].drillProperty(this, origin, 'selected');
  var Clazz = this.constructor;
  var arr, children;
  if (origin.children) {
    arr = origin.children.filter(function (it) {
      return !!result[it.id];
    });
    arr.sort(function (a, b) {
      return result[b.id][1] - result[a.id][1];
    });
    children = arr.map(function (holder) {
      return new Clazz(boxElt, holder, _this7, result);
    });
    if (children.length > 0) this.children = children;
  }
}
_OOP["default"].mixClass(CLHolderRef, CLHolder);

/***
 *
 * @param {CheckListBox} boxElt
 * @constructor
 */
function CLPagingController(boxElt) {
  this.boxElt = boxElt;
  this.$pages = boxElt.$pages;
  this.$content = boxElt.$content;
  this.$scroller = boxElt.$scroller.on('scroll', this.ev_scroll.bind(this));
  this.itemPerPage = Math.ceil((0, _Dom.getScreenSize)().height / this.itemHeight * 2);
  this.holderArr = [];
  this.holderDict = {};
}
CLPagingController.prototype.itemHeight = 30;
CLPagingController.prototype.ev_scroll = function (event) {
  var _this8 = this;
  if (this.pageN <= 2) return;
  var top = this.$scroller.scrollTop;
  var pageIdx = Math.min(this.pageN - 1, Math.max(0, Math.floor(top / this.itemHeight / this.itemPerPage)));
  if (pageIdx === this.pageIdx) return;
  if (pageIdx === this.pageIdx - 1) {
    this.pageIdx = pageIdx;
    this.$pages.unshift(this.$pages.pop());
    if (pageIdx > 0) {
      this.$pages[0].removeStyle('display').addStyle('top', (pageIdx - 1) * this.itemPerPage * this.itemHeight + 'px');
      fillItemToPage(this.boxElt, this.$pages[0], this.itemPerPage);
      Array.prototype.forEach.call(this.$pages[0].childNodes, function (elt, i) {
        return _this8.holderArr[(pageIdx - 1) * _this8.itemPerPage + i].attachView(elt);
      });
    } else {
      this.$pages[0].addStyle('display', 'none');
    }
  } else if (pageIdx === this.pageIdx + 1) {
    this.pageIdx = pageIdx;
    this.$pages.push(this.$pages.shift());
    if (pageIdx + 1 < this.pageN) {
      this.$pages[2].removeStyle('display').addStyle('top', (pageIdx + 1) * this.itemPerPage * this.itemHeight + 'px');
      fillItemToPage(this.boxElt, this.$pages[2], Math.min(this.itemPerPage, this.holderArr.length - this.itemPerPage * (pageIdx + 1)));
      Array.prototype.forEach.call(this.$pages[2].childNodes, function (elt, i) {
        return _this8.holderArr[(pageIdx + 1) * _this8.itemPerPage + i].attachView(elt);
      });
    } else {
      this.$pages[2].addStyle('display', 'none');
    }
  } else {
    this.update();
  }
};
CLPagingController.prototype.update = function () {
  var _this9 = this;
  var top = this.$content.scrollTop;
  var pageIdx = Math.floor(top / this.itemHeight / this.itemPerPage);
  this.pageIdx = pageIdx;
  var ii = (pageIdx - 1) * this.itemPerPage;
  var pageElt;
  var itemInPage;
  for (var pi = 0; pi < 3; ++pi) {
    pageElt = this.$pages[pi];
    if (ii < 0 || ii >= this.holderArr.length) {
      ii += this.itemPerPage;
      pageElt.addStyle('display', 'none');
    } else {
      itemInPage = Math.min(this.itemPerPage, this.holderArr.length - ii);
      fillItemToPage(this.boxElt, pageElt, itemInPage);
      pageElt.removeStyle('display').addStyle('top', this.itemHeight * ii + 'px');
      Array.prototype.forEach.call(pageElt.childNodes, function (child, i) {
        _this9.holderArr[ii].attachView(child);
        ii++;
      });
    }
  }
};
CLPagingController.prototype.viewListAtIdx = function (idx) {
  var bound = this.$scroller.getBoundingClientRect();
  if (!bound.height) return;
  var y = idx * this.itemHeight;
  var maxY = this.holderArr.length * this.itemHeight - bound.height;
  this.$scroller.scrollTop = Math.min(maxY, y);
};
CLPagingController.prototype.viewListAtValue = function (value) {
  var idx = this.holderDict[(0, _utils.keyStringOf)(value)];
  if (idx === undefined) return;
  this.viewListAtIdx(idx);
};
CLPagingController.prototype.viewListAtItem = function (item) {
  var idx = this.holderHashDict[keyStringOfItem(item)];
  if (idx === undefined) return;
  this.viewListAtIdx(idx);
};
CLPagingController.prototype.viewArr = function (itemHolders) {
  this.holderArr = itemHolders.reduce(function (ac, holder) {
    return holder.toArray(ac);
  }, []);
  this.holderDict = this.holderArr.reduce(function (ac, cr, idx) {
    if (!(0, _utils.isNaturalNumber)(ac[cr.valueKey])) ac[cr.valueKey] = idx;
    return ac;
  }, {});
  this.holderHashDict = this.holderArr.reduce(function (ac, cr, idx) {
    ac[cr.itemKey] = idx;
    return ac;
  }, {});
  this.pageN = Math.ceil(this.holderArr.length / this.itemPerPage);
  this.$content.addStyle('height', this.holderArr.length * this.itemHeight + 'px');
  this.update();
};
CLPagingController.prototype.updateSelected = function () {
  this.$pages.forEach(function (pageElt) {
    Array.prototype.forEach.call(pageElt.childNodes, function (itemElt) {
      if (itemElt.clHolder) itemElt.selected = itemElt.clHolder.selected;
    });
  });
};

/**********************************************************************************************************************/

/***
 * @extends SelectListBox
 * @constructor
 */
function CheckListBoxV1() {
  this._initDomHook();
  this._initControl();
  this._initScroller();
  this._initFooter();
  this._initProperty();
  this.domSignal.on('viewListAtValue', this.viewListAtValue.bind(this));
}
CheckListBoxV1.tag = 'CheckListBox'.toLowerCase();
CheckListBoxV1.render = function () {
  return (0, _ACore._)({
    tag: _Follower["default"].tag,
    extendEvent: ['change', 'cancel', 'close'],
    attr: {
      tabindex: 0
    },
    "class": ['as-select-list-box', 'as-check-list-box'],
    child: [{
      "class": 'as-select-list-box-search-ctn',
      child: 'searchtextinput'
    }, {
      "class": ['as-bscroller', 'as-select-list-box-scroller'],
      child: [{
        "class": 'as-select-list-box-content',
        child: Array(this.prototype.preLoadN).fill('.as-select-list-box-page')
      }]
    }, {
      "class": 'as-dropdown-box-footer',
      child: [{
        tag: 'checkbox',
        "class": 'as-select-list-box-check-all',
        props: {
          checked: false,
          text: _LanguageSystem["default"].getText('txt_check_all') || _LanguageSystem["default"].getText('txt_all') || 'Check All'
        }
      }, {
        "class": 'as-dropdown-box-footer-right',
        child: [{
          tag: 'a',
          "class": 'as-select-list-box-cancel-btn',
          attr: {
            'data-ml-key': 'txt_cancel'
          }
        }, {
          tag: 'a',
          "class": 'as-select-list-box-close-btn',
          attr: {
            'data-ml-key': 'txt_close'
          }
        }]
      }]
    }, 'attachhook.as-dom-signal'],
    props: {
      anchor: [1, 6, 2, 5]
    }
  });
};
Object.assign(CheckListBoxV1.prototype, _SelectListBox["default"].prototype);
CheckListBoxV1.property = Object.assign({}, _SelectListBox["default"].property);
CheckListBoxV1.eventHandler = Object.assign({}, _SelectListBox["default"].eventHandler);
CheckListBoxV1.prototype.itemHeightMode = [25, 30];
CheckListBoxV1.prototype.itemHeight = 25;
CheckListBoxV1.prototype.footerMinWidth = 110;
CheckListBoxV1.prototype._initFooter = function () {
  this.$checkAll = (0, _ACore.$)('.as-select-list-box-check-all', this).on('change', this.eventHandler.checkAllChange);
  this.$cancelBtn = (0, _ACore.$)('.as-select-list-box-cancel-btn', this).on('click', this.eventHandler.clickCancelBtn);
  this.$closeBtn = (0, _ACore.$)('.as-select-list-box-close-btn', this);
  if (this.$closeBtn)
    //mobile ref
    this.$closeBtn.on('click', this.eventHandler.clickCloseBtn);
};
CheckListBoxV1.prototype._requireItem = function (pageElt, n) {
  var itemElt;
  while (pageElt.childNodes.length > n) {
    itemElt = pageElt.lastChild;
    itemElt.selfRemove();
    releaseItem(itemElt);
  }
  while (pageElt.childNodes.length < n) {
    itemElt = requireItem(this);
    pageElt.addChild(itemElt);
  }
};
CheckListBoxV1.prototype.viewListAtFirstSelected = _noop["default"];
CheckListBoxV1.prototype.viewListAtValue = function (value) {
  if (!this.isDescendantOf(document.body)) {
    this.domSignal.emit('viewListAtValue', value);
    return;
  }
  if (this._displayValue === _SelectListBox.VALUE_HIDDEN) {
    return false;
  }
  var itemHolders = this._displayItemHolderByValue[value + ''];
  if (itemHolders) {
    this.domSignal.once('scrollIntoValue', function () {
      var holder = itemHolders[0];
      this.viewListAt(holder.idx);
      var itemElt = (0, _ACore.$)('.as-check-list-item', this.$listScroller, function (elt) {
        return elt.value === value;
      });
      if (itemElt) {
        var scrollBound = this.$listScroller.getBoundingClientRect();
        var itemBound = itemElt.getBoundingClientRect();
        this.$listScroller.scrollTop += itemBound.top - scrollBound.top;
      }
    }.bind(this));
    this.domSignal.emit('scrollIntoValue');
    return true;
  } else return false;
};
CheckListBoxV1.prototype.focus = _SelectListBox["default"].prototype.focus;
CheckListBoxV1.property.values = {
  set: function set(value) {
    _SelectListBox["default"].property.values.set.apply(this, arguments);
    this.$checkAll.checked = this._values.length === this.items.length;
  },
  get: _SelectListBox["default"].property.values.get
};

/***
 * @this CheckListBoxV1
 * @param event
 */
CheckListBoxV1.eventHandler.checkAllChange = function (event) {
  var checked = this.$checkAll.checked;
  if (checked) {
    this._values = this.items.map(function (cr) {
      return _typeof(cr) === "object" ? cr.value : cr;
    });
    this._valueDict = this._values.reduce(function (ac, value) {
      ac[value + ''] = true;
      return ac;
    }, {});
  } else {
    this._values = [];
    this._valueDict = {};
  }
  this._updateSelectedItem();
  this.emit('change', {
    target: this,
    type: 'change',
    originalEvent: event.originalEvent || event.originEvent || event,
    action: checked ? 'check_all' : "uncheck_all"
  }, this);
};

/***
 * @this CheckListBoxV1
 * @param itemElt
 * @param event
 */
CheckListBoxV1.eventHandler.itemSelect = function (itemElt, event) {
  var selected = itemElt.selected;
  var value = itemElt.value;
  var itemData = itemElt.data;
  var idx;
  if (selected) {
    this._values.push(value);
    this._valueDict[value + ''] = true;
  } else {
    idx = this._values.indexOf(value);
    delete this._valueDict[value + ''];
    if (idx >= 0) {
      this._values.splice(idx, 1);
    } else {
      console.error("Violation data");
    }
  }
  this.emit('change', {
    target: this,
    type: 'change',
    originalEvent: event.originalEvent || event.originEvent || event,
    action: selected ? 'check' : 'uncheck',
    value: value,
    itemData: itemData
  }, this);
};

/***
 * @this CheckListBoxV1
 * @param event
 */
CheckListBoxV1.eventHandler.clickCancelBtn = function (event) {
  this.emit('cancel', {
    type: 'cancel',
    target: this,
    originalEvent: event
  }, this);
};

/***
 * @this CheckListBoxV1
 * @param event
 */
CheckListBoxV1.eventHandler.clickCloseBtn = function (event) {
  this.emit('close', {
    type: 'close',
    target: this,
    originalEvent: event
  }, this);
};
_ACore["default"].install('checklistboxv1', CheckListBoxV1);
var _default = CheckListBoxV1;
exports["default"] = _default;

/***/ }),

/***/ 27129:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.measureCheckListHeight = measureCheckListHeight;
exports.measureCheckListSize = measureCheckListSize;
exports.measureMaxCheckboxTextWidth = measureMaxCheckboxTextWidth;
__webpack_require__(5416);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _CheckboxButton = _interopRequireDefault(__webpack_require__(93475));
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _SelectListItem = _interopRequireDefault(__webpack_require__(57040));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _utils = __webpack_require__(84512);
var _SelectList = __webpack_require__(884);
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function measureMaxCheckboxTextWidth(items) {
  var maxTextWidth = 0;
  var maxText = 0;
  var maxEst = 0;
  var maxLv = 0;
  var est;
  var text;
  var item;
  for (var i = 0; i < items.length; ++i) {
    item = items[i];
    if (item.text) {
      text = item.text;
      est = (0, _utils.estimateWidth14)(text) + 14 * 1.25 * (item.level || 0);
      if (est > maxEst) {
        maxEst = est;
        maxText = text;
        maxLv = item.level || 0;
      }
    }
  }
  if (maxText) maxTextWidth = 18 + 14 * (1.25 + 0.35) * maxLv + (0, _utils.measureText)(maxText, '14px Arial, Helvetica, sans-serif').width + 14; //padding left, right 7px, checkbox 18px
  return maxTextWidth;
}
function measureCheckListHeight(items) {
  var border = 0;
  var n = items.length - 1;
  return items.length * 25 + border;
}
function measureCheckListSize(items) {
  var descWidth = (0, _SelectList.measureMaxDescriptionWidth)(items);
  var textWidth = measureMaxCheckboxTextWidth(items);
  var width = textWidth;
  if (descWidth > 0) {
    width += descWidth + 14;
  }
  var height = measureCheckListHeight(items);
  return {
    width: width,
    height: height,
    descWidth: descWidth,
    textWidth: textWidth
  };
}

/***
 * @extends SelectListItem
 * @constructor
 */
function CheckListItem() {
  this.$text = (0, _ACore.$)('span.absol-selectlist-item-text', this);
  this.$textValue = this.$text.childNodes[0];
  this.$descCtn = (0, _ACore.$)('.absol-selectlist-item-desc-container', this);
  this.$desc = (0, _ACore.$)('span.absol-selectlist-item-desc', this.$descCtn);
  this.$descValue = this.$desc.childNodes[0];
  this.$checkbox = (0, _ACore.$)(_CheckboxButton["default"].tag, this).on('change', this.eventHandler.checkboxChange);
  this.$icon = null;
  this._icon = null;
  this._viewData = new _Attributes["default"](this);
  this._viewData.loadAttributeHandlers(this.viewHandlers);
  _OOP["default"].drillProperty(this, this._viewData, 'extendClasses');
  _OOP["default"].drillProperty(this, this._viewData, 'extendStyle');
  this.level = 0;
  this.selected = false;
  this.on('click', this.eventHandler.clickText);
}
CheckListItem.tag = 'CheckListItem'.toLowerCase();
CheckListItem.render = function () {
  return (0, _ACore._)({
    extendEvent: ['select'],
    "class": ['as-check-list-item', "absol-selectlist-item"],
    child: [{
      tag: _CheckboxButton["default"].tag,
      "class": 'as-check-list-item-checkbox'
    }, {
      tag: 'span',
      "class": 'absol-selectlist-item-text',
      child: {
        text: ''
      }
    }, {
      "class": 'absol-selectlist-item-desc-container',
      child: {
        tag: 'span',
        "class": 'absol-selectlist-item-desc',
        child: {
          text: ''
        }
      }
    }]
  });
};
CheckListItem.property = {
  text: _SelectListItem["default"].property.text,
  value: _SelectListItem["default"].property.value,
  icon: _SelectListItem["default"].property.icon,
  lastInGroup: _SelectListItem["default"].property.lastInGroup
};
CheckListItem.property.data = {
  set: function set(value) {
    this._data = value;
    var viewData = {
      text: '',
      desc: '',
      noSelect: false,
      extendStyle: null,
      extendClasses: null,
      icon: null,
      lastInGroup: false
    };
    if (typeof value === 'string') {
      viewData.text = value;
    } else {
      Object.assign(viewData, value);
    }
    Object.assign(this._viewData, viewData);
  },
  get: function get() {
    return this._data;
  }
};
CheckListItem.property.selected = {
  set: function set(value) {
    this.$checkbox.checked = !!value;
  },
  get: function get() {
    return this.$checkbox.checked;
  }
};
CheckListItem.property.level = {
  set: function set(value) {
    value = value || 0;
    this._level = value;
    this.$checkbox.addStyle('margin-left', value * 1.75 + 'em');
  },
  get: function get() {
    return this._level;
  }
};
CheckListItem.prototype.viewHandlers = {};
CheckListItem.prototype.viewHandlers.text = {
  set: function set(value) {
    this.$textValue.data = value;
  },
  get: function get() {
    return this.$textValue.data;
  }
};
CheckListItem.prototype.viewHandlers.desc = {
  set: function set(value) {
    this.$descValue.data = value;
  },
  get: function get() {
    return this.$descValue.data;
  }
};
CheckListItem.prototype.viewHandlers.extendClasses = {
  set: function set(value, ref) {
    var prevVal = ref.get() || [];
    var i;
    for (i = 0; i < prevVal.length; ++i) {
      this.removeClass(prevVal[i]);
    }
    var newVal = [];
    if (typeof value == 'string') value = value.trim().split(/\s+/);
    value = value || [];
    for (i = 0; i < value.length; ++i) {
      newVal.push(value[i]);
      this.addClass(value[i]);
    }
    return newVal;
  }
};
CheckListItem.prototype.viewHandlers.extendStyle = {
  /***
   *
   * @param value
   * @param {Ref} ref
   */
  set: function set(value, ref) {
    this.removeStyle(ref.get() || {});
    this._extendStyle = Object.assign({}, value || {});
    this.addStyle(this._extendStyle);
  },
  get: function get() {
    return this._extendClasses;
  }
};
CheckListItem.prototype.viewHandlers.noSelect = {
  set: function set(value) {
    if (value) this.addClass('as-no-select');else this.removeClass('as-no-select');
    return value;
  }
};
CheckListItem.prototype.viewHandlers.icon = {
  set: function set(icon) {
    this.icon = icon;
  },
  get: function get() {
    return this.icon;
  }
};
CheckListItem.prototype.viewHandlers.lastInGroup = {
  set: function set(value) {
    this.lastInGroup = value;
  },
  get: function get() {
    return this.lastInGroup;
  }
};
CheckListItem.eventHandler = {};
CheckListItem.eventHandler.clickText = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$checkbox, event)) return;
  this.$checkbox.checked = !this.$checkbox.checked;
  this.emit('select', {
    target: this,
    type: 'select',
    originalEvent: event.originalEvent || event.originEvent || event,
    selected: this.selected
  });
};
CheckListItem.eventHandler.checkboxChange = function (event) {
  this.emit('select', {
    target: this,
    type: 'select',
    originalEvent: event.originalEvent || event.originEvent || event,
    selected: this.selected
  });
};
_ACore["default"].install(CheckListItem);
var _default = CheckListItem;
exports["default"] = _default;

/***/ }),

/***/ 93794:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.CTBItemListController = CTBItemListController;
exports.TreeNodeHolder = TreeNodeHolder;
exports.TreeRootHolder = TreeRootHolder;
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Dom = __webpack_require__(64821);
var _CheckTreeItem = _interopRequireDefault(__webpack_require__(26638));
__webpack_require__(17779);
var _utils = __webpack_require__(84512);
var _search = __webpack_require__(67858);
var _SelectListBox = _interopRequireDefault(__webpack_require__(47818));
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
var _Array = __webpack_require__(40411);
var _CheckListBox = __webpack_require__(62896);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _attribute = __webpack_require__(18144);
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _TextMeasure = _interopRequireDefault(__webpack_require__(60268));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends Follower
 * @constructor
 */
function CheckTreeBox() {
  if (this.cancelWaiting) this.cancelWaiting();
  /**
   *
   * @type {CTBItemListController}
   */
  this.listCtrl = new this.ListControllerClass(this);
  _OOP["default"].drillProperty(this, this.listCtrl, ['viewHolders', '$checkAll', 'estimateSize']);
  this.dropdownCtrl = new CTBDropdownController(this);
  this.actionCtrl = new CTBActionController(this);
  this.searchCtrl = new CTBSearchController(this);
  _OOP["default"].drillProperty(this, this.searchCtrl, ['$searchInput']);
  this._initDomHook();
  this._initProperty();
  if (!this.updatePosition) {
    this.updatePosition = _noop["default"];
  }

  /**
   * @name mobile
   * @type {boolean}
   * @memberof  CheckTreeBox#
   */

  /***
   * @name strictValue
   * @memberof CheckTreeBox#
   * @type {boolean}
   */

  /**
   * @name values
   * @memberof CheckTreeBox#
   * @type {Array}
   */
  /**
   * @name viewValues
   * @memberof CheckTreeBox#
   * @type {Array}
   */
}

CheckTreeBox.tag = 'CheckTreeBox'.toLowerCase();
CheckTreeBox.prototype.preLoadN = 3;
CheckTreeBox.prototype.itemHeight = 28;
CheckTreeBox.prototype.itemInPage = 36;
CheckTreeBox.prototype._initDomHook = function () {};
CheckTreeBox.prototype._initProperty = function () {
  this.scale14 = (0, _ACore.$)(document.body).getFontSize() / 14;
  this.initOpened = 0;
  this.enableSearch = true;
};
CheckTreeBox.prototype.focus = _SelectListBox["default"].prototype.focus;
CheckTreeBox.prototype.addStyle = function (name, value) {
  var ms;
  if (name === 'minWidth' || name === 'min-width') {
    ms = (0, _attribute.parseMeasureValue)(value);
    if (ms.unit === 'px') {
      value = Math.max(240, ms.value) + 'px';
    }
    return _AElement["default"].prototype.addStyle.call(this, name, value);
  }
  return _AElement["default"].prototype.addStyle.apply(this, arguments);
};
CheckTreeBox.render = function () {
  var mobile = arguments[1] && arguments[1].forceMobile || _BrowserDetector["default"].isMobile;
  var footer = {
    "class": 'as-dropdown-box-footer',
    child: [{
      tag: 'checkbox',
      "class": 'as-select-list-box-check-all',
      props: {
        checked: false,
        text: _LanguageSystem["default"].getText('txt_check_all') || _LanguageSystem["default"].getText('txt_all') || 'Check All'
      }
    }, {
      "class": 'as-dropdown-box-footer-right',
      child: [{
        tag: 'a',
        "class": 'as-select-list-box-cancel-btn',
        attr: {
          "data-ml-key": 'txt_cancel'
        }
      }].concat(mobile ? [] : [{
        tag: 'a',
        "class": 'as-select-list-box-close-btn',
        attr: {
          "data-ml-key": 'txt_close'
        }
      }])
    }]
  };
  var content = {
    "class": ['as-check-tree-box-scroller', 'as-bscroller', 'as-select-list-box-scroller'],
    child: {
      "class": ['as-check-tree-box-content', 'as-select-list-box-content'],
      child: Array(this.prototype.preLoadN).fill('.as-select-list-box-page')
    }
  };
  if (mobile) {
    return (0, _ACore._)({
      props: {
        mobile: true
      },
      extendEvent: ['change', 'close', 'toggleitem', 'cancel'],
      "class": ['am-check-tree-box-modal', 'am-modal', 'am-dropdown-box-modal'],
      child: {
        "class": ['am-check-tree-box', 'am-dropdown-box', 'as-dropdown-box-common-style'],
        child: [{
          "class": 'am-dropdown-box-header',
          child: [{
            tag: _Searcher["default"].tag
          }, {
            tag: 'button',
            "class": 'am-dropdown-box-close-btn',
            child: 'span.mdi.mdi-close'
          }]
        }, content, footer]
      }
    });
  }
  return (0, _ACore._)({
    tag: 'follower',
    extendEvent: ['change', 'toggleitem', 'cancel', 'close'],
    "class": ['as-check-tree-box', 'as-select-list-box', 'as-anchor-1'],
    child: [{
      "class": 'as-select-list-box-search-ctn',
      child: 'searchtextinput'
    }, content, footer],
    props: {
      anchor: [1, 6, 2, 5],
      mobile: false
    }
  });
};
CheckTreeBox.prototype.HolderClass = TreeNodeHolder;
CheckTreeBox.prototype.findItemHoldersByValue = function (value) {
  return this.listCtrl.findItemHoldersByValue(value);
};
CheckTreeBox.prototype.findItemByValue = function (value) {
  var holders = this.listCtrl.findItemHoldersByValue(value);
  if (holders && holders.length > 0) {
    return holders[0].item;
  } else return null;
};
CheckTreeBox.prototype.viewListAt = function (offset) {
  this.listCtrl.viewListAt(offset);
};
CheckTreeBox.prototype.noTransition = function () {
  if (this.hasClass('as-no-transition')) return;
  this.addClass('as-no-transition');
  setTimeout(function () {
    this.removeClass('as-no-transition');
  }.bind(this), 100);
};
CheckTreeBox.prototype.resetSearchState = function () {
  this.listCtrl.resetView();
};
CheckTreeBox.prototype.updateContentSize = function () {
  this.listCtrl.updateContentSize();
};
CheckTreeBox.prototype._implicit = function (values) {
  return values || [];
};
CheckTreeBox.property = {};
CheckTreeBox.property.items = {
  /***
   * @this CheckTreeBox
   * @param items
   */
  set: function set(items) {
    items = items || [];
    this._items = items;
    this.listCtrl.setItems(items);
  },
  get: function get() {
    return this._items;
  }
};
CheckTreeBox.property.values = {
  /***
   * @this CheckTreeBox
   * @param values
   */
  set: function set(values) {
    this.listCtrl.setValues(values);
  },
  get: function get() {
    return this.listCtrl.getValues();
  }
};
CheckTreeBox.property.viewValues = {
  get: function get() {
    return this.listCtrl.getViewValues();
  }
};
CheckTreeBox.property.enableSearch = {
  set: function set(value) {
    if (value) this.addClass('as-enable-search');else this.removeClass('as-enable-search');
  },
  get: function get() {
    return this.hasClass('as-enable-search');
  }
};
CheckTreeBox.eventHandler = {};
CheckTreeBox.eventHandler.toggleItem = function (item, event) {
  this.noTransition();
  var nodeHolder = item.nodeHolder;
  if (!nodeHolder) {
    console.error("Load error, item was not assigned TreeNodeHolder!");
  } else nodeHolder.toggle();
};
CheckTreeBox.eventHandler.selectItem = function (item, event) {
  var nodeHolder = item.nodeHolder;
  if (!nodeHolder) {
    console.error("Load error, item was not assigned TreeNodeHolder!");
    return;
  }
  this.noTransition();
  var ref = nodeHolder.findReferenceNode();
  var targetNode = ref || nodeHolder;
  var selected = item.selected;
  if (selected === 'all' && (targetNode.canSelectAll || targetNode.selected === 'none')) {
    targetNode.selectAll();
  } else {
    targetNode.unselectAll();
  }
  if (ref) {
    nodeHolder.getRoot().updateSelectedFromRef();
  }
  this.emit('change', {
    type: 'change',
    target: this
  }, this);
};

/***
 * @this CheckTreeBox
 */
CheckTreeBox.eventHandler.searchModify = function () {};
CheckTreeBox.prototype.updateSelectedInViewIfNeed = function () {
  if (this.rootViewHolder !== this.rootHolder) {
    this.rootViewHolder.updateSelectedFromRef();
  }
};
CheckTreeBox.eventHandler.clickCancelBtn = function (event) {
  this.emit('cancel', {
    type: 'cancel',
    target: this,
    originalEvent: event
  }, this);
};
CheckTreeBox.eventHandler.clickCloseBtn = function (event) {
  this.emit('close', {
    type: 'close',
    target: this,
    originalEvent: event
  }, this);
};
_ACore["default"].install(CheckTreeBox);
var _default = CheckTreeBox;
/***
 *
 * @param {CheckTreeBox} boxElt
 * @param items
 * @constructor
 */
exports["default"] = _default;
function TreeRootHolder(boxElt, items) {
  var _this = this;
  this.boxElt = boxElt;
  this.items = items;
  this.selected = 'none';
  var Clazz = this.SubHolderClass;
  this.child = [];
  this.idx = -1; //root
  this.tailIdx = this.idx;
  if (items && items.length > 0) {
    items.reduce(function (ac, it) {
      var child = new Clazz(boxElt, it, ac.idx + 1, _this);
      ac.idx = child.tailIdx;
      ac.arr.push(child);
      return ac;
    }, {
      idx: this.idx,
      arr: this.child
    });
    this.tailIdx = this.child[this.child.length - 1].tailIdx;
  }
  this.canSelectAll = this.child.every(function (c) {
    return c.canSelectAll;
  });
  this.canSelect = this.child.length === 0 || this.child.some(function (c) {
    return c.canSelect;
  });
}
CheckTreeBox.prototype.RootHolderClass = TreeRootHolder;
TreeRootHolder.prototype.level = -1;
TreeRootHolder.prototype.reset = function () {
  this.child.forEach(function (c) {
    return c.reset();
  });
  this.selected = "none";
};

/***
 *
 * @param {Array=} ac
 */
TreeRootHolder.prototype.toArray = function (ac) {
  ac = ac || [];
  this.child.forEach(function (c) {
    return c.toArray(ac);
  });
  return ac;
};
TreeRootHolder.prototype.updateFromChild = function () {
  var childSelectAll = 0;
  var childSelectChild = 0;
  var isCheckAll = true;
  this.traverse(function (hd) {
    if (hd.selected === 'none' && !hd.item.noSelect) {
      isCheckAll = false;
    }
  });
  if (this.canSelectAll) {
    this.boxElt.$checkAll.checked = isCheckAll;
    this.boxElt.$checkAll.minus = false;
    this.selected = isCheckAll ? 'all' : 'none';
  } else {
    this.boxElt.$checkAll.checked = false;
    this.boxElt.$checkAll.minus = isCheckAll;
    this.selected = isCheckAll ? 'child' : 'none';
  }
};
TreeRootHolder.prototype.updateUp = function () {
  this.updateFromChild();
};

/***
 *
 * @param {Array=} ac
 */
TreeRootHolder.prototype.getValues = function (ac) {
  ac = ac || [];
  this.child.forEach(function (c) {
    return c.getValues(ac);
  });
  return (0, _Array.arrayUnique)(ac);
};
TreeRootHolder.prototype.getViewValues = function (ac) {
  ac = ac || [];
  this.child.forEach(function (c) {
    return c.getViewValues(ac);
  });
  return (0, _Array.arrayUnique)(ac);
};

/***
 *
 * @param {Array} values
 */
TreeRootHolder.prototype.setValues = function (values) {
  this.reset();
  values = values.reduce(function (ac, cr) {
    ac[(0, _utils.keyStringOf)(cr)] = true;
    return ac;
  }, values.slice());
  this.child.forEach(function (c) {
    return c.setValues(values);
  });
};
TreeRootHolder.prototype.calcEstimateSize = function () {
  var res = {
    width: 0,
    height: this.boxElt.itemHeight + (this.tailIdx + 1)
  };
  var holders = this.child;
  var n = holders.length;
  var holder;
  var longestHolder = null;
  var longest = 0;
  var w;
  for (var i = 0; i < n; ++i) {
    holder = holders[i];
    holder.traverse(function (hd) {
      w = hd.calcEstimateWidth();
      if (w > longest) {
        longest = w;
        longestHolder = hd;
      }
    });
  }
  if (longestHolder) {
    res.width = longestHolder.calcWidth() * this.boxElt.scale14;
  }
  return res;
};
TreeRootHolder.prototype.selectAll = function () {
  this.child.forEach(function (c) {
    return c.selectAll();
  });
};
TreeRootHolder.prototype.unselectAll = function () {
  this.child.forEach(function (c) {
    return c.unselectAll();
  });
};
TreeRootHolder.prototype.findReferenceNode = function () {
  if (this.boxElt.listCtrl.rootHolder === this) return null;
  return this.boxElt.listCtrl.rootHolder;
};
TreeRootHolder.prototype.updateSelectedFromRef = function () {
  if (this.boxElt.listCtrl.rootHolder === this) return;
  this.child.forEach(function (c) {
    return c.updateSelectedFromRef();
  });
};
TreeRootHolder.prototype.traverse = function (cb) {
  this.child.forEach(function (c) {
    return c.traverse(cb);
  });
};
TreeRootHolder.prototype.getRoot = function () {
  return this;
};

/***
 *
 * @param {Object<string, TreeNodeHolder>|{}=}ac
 * @returns {Object<string, TreeNodeHolder>|{}}
 */
TreeRootHolder.prototype.depthIndexing = function (ac) {
  ac = ac || {};
  this.child.forEach(function (c) {
    return c.depthIndexing(ac);
  });
  return ac;
};

/***
 *
 * @param {CheckTreeBox} boxElt
 * @param {SelectionItem} item
 * @param {number} idx
 * @param {TreeNodeHolder | TreeRootHolder} parent
 * @constructor
 */
function TreeNodeHolder(boxElt, item, idx, parent) {
  var _this2 = this;
  this.boxElt = boxElt;
  this.item = item;
  this.idx = idx;
  this.tailIdx = idx; //last child index
  this.parent = parent;
  this.status = item.items && item.items.length > 0 ? 'close' : 'none';
  this.selected = 'none';
  this.level = parent ? parent.level + 1 : 0;
  if (this.status === 'close' && this.level < this.boxElt.initOpened) {
    this.status = 'open';
  }
  this._elt = null;
  var Clazz = this.constructor;
  /***
   *
   * @type {this[]}
   */
  this.child = [];
  if (item.items && item.items.length > 0) {
    item.items.reduce(function (ac, it) {
      var child = new Clazz(boxElt, it, ac.idx + 1, _this2);
      ac.idx = child.tailIdx;
      ac.arr.push(child);
      return ac;
    }, {
      idx: this.idx,
      arr: this.child
    });
    this.tailIdx = this.child[this.child.length - 1].tailIdx;
  }
  this.canSelectAll = !this.item.noSelect && this.child.every(function (c) {
    return c.canSelectAll;
  });
  this.canSelect = !this.item.noSelect && (this.child.length === 0 || this.child.some(function (c) {
    return c.canSelect;
  }));
}
TreeRootHolder.prototype.SubHolderClass = TreeNodeHolder;

/***
 *
 * @param {Object<string, TreeNodeHolder>|{}}ac
 * @returns {Object<string, TreeNodeHolder>|{}}
 */
TreeNodeHolder.prototype.depthIndexing = function (ac) {
  ac = ac || {};
  var key = (0, _utils.keyStringOf)(this.item.value);
  if (!ac[key]) ac[key] = [];
  ac[key].push(this);
  // if (ac[key].length === 2) {//allow
  //     console.warn("Duplicate value", ac[key]);
  // }
  this.child.forEach(function (c) {
    return c.depthIndexing(ac);
  });
  return ac;
};
TreeNodeHolder.prototype.findIdxInView = function () {
  var holders = this.boxElt.listCtrl.viewHolders;
  var start = 0;
  var end = holders.length - 1;
  var mid;
  var idx = this.idx;
  var holderIdx;
  while (start < end) {
    mid = start + end >> 1;
    holderIdx = holders[mid].idx;
    if (holderIdx < idx) {
      start = mid + 1;
    } else if (holderIdx > idx) {
      end = mid - 1;
    } else {
      return mid;
    }
  }
  holderIdx = holders[start].idx;
  if (holderIdx === idx) return start;
  return -1;
};
TreeNodeHolder.prototype.getValues = function (ac) {
  ac = ac || [];
  if (this.selected === 'all') {
    ac.push(this.item.value);
  } else if (this.selected === 'child') {
    this.child.forEach(function (c) {
      return c.getValues(ac);
    });
  }
  return ac;
};
TreeNodeHolder.prototype.getViewValues = function (ac) {
  return this.getValues(ac);
};
TreeNodeHolder.prototype.setValues = function (values) {
  if (values[(0, _utils.keyStringOf)(this.item.value)]) {
    this.selectAll(true);
  } else {
    this.child.forEach(function (c) {
      return c.setValues(values);
    });
  }
  this.updateFromChild();
};
TreeNodeHolder.prototype.toggle = function () {
  var idx = this.findIdxInView();
  var status = this.status;
  if (status === 'close') {
    this.itemElt.status = 'open';
    this.status = 'open';
    var arr = this.toArray();
    arr.shift();
    this.boxElt.listCtrl.viewHolders.splice.apply(this.boxElt.listCtrl.viewHolders, [idx + 1, 0].concat(arr));
    this.boxElt.listCtrl.updateContentSize();
    this.boxElt.listCtrl.viewListAt(idx);
    this.boxElt.emit('toggleitem', {
      type: 'toggleitem',
      target: this.boxElt,
      nodeHolder: this,
      status: 'open'
    }, this.boxElt);
  } else if (status === 'open') {
    this.itemElt.status = 'close';
    this.status = 'close';
    var l = 0;
    while (this.boxElt.viewHolders[idx + 1 + l] && this.boxElt.listCtrl.viewHolders[idx + 1 + l].isDescendantOf(this)) {
      ++l;
    }
    this.boxElt.listCtrl.viewHolders.splice(idx + 1, l);
    this.boxElt.listCtrl.updateContentSize();
    this.boxElt.listCtrl.viewListAt(idx);
    this.boxElt.emit('toggleitem', {
      type: 'toggleitem',
      target: this.boxElt,
      nodeHolder: this,
      status: 'close'
    }, this.boxElt);
  }
};

/***
 *
 * @param {boolean=} isDownUpdate
 */
TreeNodeHolder.prototype.selectAll = function (isDownUpdate) {
  if (this.selected === 'all') return;
  if (!this.canSelect) return;
  if (this.canSelectAll) this.selected = 'all';else this.selected = 'child';
  if (this.itemElt) this.itemElt.selected = this.selected;
  this.child.forEach(function (child) {
    child.selectAll(true);
  });
  if (!isDownUpdate) {
    if (this.parent) this.parent.updateUp();
  }
};

/***
 *
 * @param {boolean=} isDownUpdate
 */
TreeNodeHolder.prototype.unselectAll = function (isDownUpdate) {
  if (this.selected === 'none') return;
  this.selected = 'none';
  if (this.itemElt) this.itemElt.selected = this.selected;
  this.child.forEach(function (child) {
    child.unselectAll(true);
  });
  if (!isDownUpdate) {
    if (this.parent) this.parent.updateUp();
  }
};
TreeNodeHolder.prototype.reset = function () {
  if (this.selected !== "empty") this.selected = 'none';
  if (this.itemElt) this.itemElt.selected = this.selected;
  this.child.forEach(function (child) {
    child.reset(true);
  });
};
TreeNodeHolder.prototype.updateFromChild = function () {
  if (this.child.length === 0) return;
  var childSelectAll = 0;
  var childSelectChild = 0;
  for (var i = 0; i < this.child.length; ++i) {
    if (this.child[i].selected === 'all') {
      childSelectAll++;
    } else if (this.child[i].selected === 'child') {
      childSelectChild++;
    }
  }
  if (childSelectAll === this.child.length) {
    this.selected = 'all';
  } else if (childSelectChild + childSelectAll > 0) {
    this.selected = 'child';
  } else {
    this.selected = 'none';
  }
  if (this.itemElt) {
    this.itemElt.selected = this.selected;
  }
};
TreeNodeHolder.prototype.updateUp = function () {
  this.updateFromChild();
  if (this.parent) this.parent.updateUp();
};
TreeNodeHolder.prototype.calcEstimateWidth = function () {
  return this.calcWidth(); //because new version use TextMeasure.measureWidth, better performance
};

TreeNodeHolder.prototype.calcWidth = function () {
  var width = 12; //padding
  width += 43; //cheat for some size with checklistbox
  width += 1.75 * 14 * this.level;
  width += 14.7 + 5; //toggle icon
  width += 16; //checkbox
  if (this.item.icon) width += 21; //icon
  width += 7 + _TextMeasure["default"].measureWidth(this.item.text || '', _TextMeasure["default"].FONT_ARIAL, 14); //margin-text

  if (this.item.desc) width += 6 + _TextMeasure["default"].measureWidth(this.item.desc || '', _TextMeasure["default"].FONT_ARIAL, 11.9);
  return width;
};
TreeNodeHolder.prototype.isDescendantOf = function (parent) {
  var cr = this.parent;
  while (cr) {
    if (parent === cr) return true;
    cr = cr.parent;
  }
  return false;
};

/***
 *
 * @param {TreeNodeHolder[]=} ac
 * @return {TreeNodeHolder[]}
 */
TreeNodeHolder.prototype.toArray = function (ac) {
  ac = ac || [];
  ac.push(this);
  if (this.status === 'open') {
    for (var i = 0; i < this.child.length; ++i) {
      this.child[i].toArray(ac);
    }
  }
  return ac;
};
TreeNodeHolder.prototype.traverse = function (cb) {
  cb(this);
  this.child.forEach(function (c) {
    return c.traverse(cb);
  });
};
Object.defineProperty(TreeNodeHolder.prototype, 'itemElt', {
  set: function set(elt) {
    if (this._elt === elt) return;
    if (this._elt) {
      if (this._elt.nodeHolder === this) {
        this._elt.nodeHolder = null;
      }
    }
    if (elt) {
      if (elt.nodeHolder) {
        elt.nodeHolder.itemElt = null;
      }
      elt.nodeHolder = this;
      this._elt = elt;
      elt.data = this.item;
      elt.level = this.level;
      elt.status = this.status;
      elt.selected = this.selected;
      if (this.item.noSelect || !this.canSelect) {
        elt.noSelect = true;
      } else {
        elt.noSelect = false;
      }
    } else {
      this._elt = null;
    }
  },
  get: function get() {
    return this._elt;
  },
  configurable: true
});
TreeNodeHolder.prototype.findReferenceNode = function () {
  var value = this.item.value;
  var holders = this.boxElt.findItemHoldersByValue(value);
  var holder;
  for (var i = 0; i < holders.length; ++i) {
    holder = holders[i];
    if ((holder.item === this.item.ref || holder.item === this.item) && holder !== this) return holder;
  }
  return null;
};
TreeNodeHolder.prototype.getRoot = function () {
  if (!this.parent) return this;
  return this.parent.getRoot();
};
TreeNodeHolder.prototype.updateSelectedFromRef = function () {
  var ref = this.findReferenceNode();
  if (!ref) return;
  var selected = ref.selected;
  this.selected = selected;
  if (this.itemElt) this.itemElt.selected = selected;
  this.child.forEach(function (c) {
    c.updateSelectedFromRef();
  });
};

/**
 *
 * @param {CheckTreeBox} elt
 * @constructor
 */
function CTBItemListController(elt) {
  this.elt = elt;
  var RootHolderClass = this.elt.RootHolderClass;
  this._items = [];
  this._values = [];
  this.itemHolderByValue = {};
  this.rootHolder = new RootHolderClass(this.elt, []);

  // this.rootHolders = [];

  /***
   *
   * @type {TreeRootHolder}
   */
  this.rootViewHolder = this.rootHolder;
  /***
   *
   * @type {TreeNodeHolder[]}
   */
  this.viewHolders = []; //toArray

  this.$checkAll = (0, _ACore.$)('.as-select-list-box-check-all', this.elt).on('change', this.ev_checkAllChange.bind(this));
  this.$scroller = (0, _ACore.$)('.as-check-tree-box-scroller', elt).on('scroll', this.ev_scroll.bind(this));
  this.itemInPage = Math.max(36, Math.ceil((0, _Dom.getScreenSize)().height / this.itemHeight));
  this.$content = (0, _ACore.$)('.as-check-tree-box-content', elt);
  this.$pages = (0, _ACore.$$)('.as-select-list-box-page', elt);
  this.$pages.forEach(function (p) {
    p.__viewOffset__ = -1;
  });
}
CheckTreeBox.prototype.ListControllerClass = CTBItemListController;
CTBItemListController.prototype.preLoadN = 3;
CTBItemListController.prototype.itemHeight = 28;
CTBItemListController.prototype.itemInPage = 36;
CTBItemListController.prototype.resetView = function () {
  this.elt.$searchInput.value = '';
  this.viewHolders = this.rootHolder.toArray();
  this.rootViewHolder = this.rootHolder;
  this.updateContentSize();
  this.viewListAt(0);
};
CTBItemListController.prototype.setItems = function (items) {
  if (!(items instanceof Array)) items = [];
  (0, _search.prepareSearchForList)(items);
  this._items = items;
  var RootHolderClass = this.elt.RootHolderClass;
  this.rootHolder = new RootHolderClass(this.elt, items);
  this.itemHolderByValue = this.rootHolder.depthIndexing();
  this.estimateSize = this.rootHolder.calcEstimateSize();
  this.elt.addStyle('--select-list-estimate-width', this.estimateSize.width + 'px');
  this.resetView();
  this.rootHolder.setValues(this._values);
};
CTBItemListController.prototype.setValues = function (values) {
  if (values instanceof Array) {
    values = values.slice();
  } else if (values === undefined || values === null) {
    values = [];
  } else values = [values];
  this._values = values;
  this.rootHolder.setValues(values);
};
CTBItemListController.prototype.getValues = function () {
  return this.rootHolder.getValues();
};
CTBItemListController.prototype.getViewValues = function () {
  return this.rootHolder.getViewValues();
};
CTBItemListController.prototype.updateContentSize = function () {
  this.$content.addStyle('height', this.viewHolders.length * this.itemHeight / 14 + 'em');
};
CTBItemListController.prototype.viewListAt = function (offset) {
  offset = offset || 0;
  this.elt.noTransition();
  var midPage = this.$pages.length >> 1;
  var startOffset = Math.max(0, offset - midPage * this.itemInPage);
  var cOffset;
  var itemN = this.viewHolders.length;
  for (var i = 0; i < this.$pages.length; ++i) {
    cOffset = startOffset + i * this.itemInPage;
    if (cOffset < itemN) {
      this.$pages[i].__viewOffset__ = cOffset;
      this.$pages[i].removeStyle('display').addStyle('top', cOffset * this.itemHeight / 14 + 'em');
      this._fillPage(this.$pages[i], Math.min(this.itemInPage, itemN - cOffset));
      this._assignItems(this.$pages[i], cOffset);
    } else {
      this.$pages[i].__viewOffset__ = -1;
      this.$pages[i].addStyle('display', 'none');
    }
  }
};
CTBItemListController.prototype._fillPage = function (pageElt, n) {
  while (pageElt.childNodes.length > n) {
    this._releaseItem(pageElt.lastChild);
    pageElt.removeChild(pageElt.lastChild);
  }
  while (pageElt.childNodes.length < n) {
    pageElt.addChild(this._requestItem());
  }
};
CTBItemListController.prototype._assignItems = function (pageElt, offset) {
  for (var i = 0; i < pageElt.childNodes.length; ++i) {
    this.viewHolders[offset + i].itemElt = pageElt.childNodes[i];
  }
};
CTBItemListController.prototype._requestItem = function () {
  var res = this._pool.pop() || (0, _ACore._)({
    tag: _CheckTreeItem["default"].tag,
    props: {
      menuElt: this
    },
    on: {
      presstoggle: function presstoggle(event) {
        this.menuElt.eventHandler.toggleItem(this, event);
      },
      select: function select(event) {
        this.menuElt.eventHandler.selectItem(this, event);
      }
    }
  });
  res.menuElt = this.elt;
  return res;
};
CTBItemListController.prototype._pool = [];
CTBItemListController.prototype._releaseItem = function (item) {
  if (item.nodeHolder && item.nodeHolder.itemElt === item) {
    item.nodeHolder.itemElt = null;
  }
  this._pool.push(item);
};
CTBItemListController.prototype.findItemHoldersByValue = function (value) {
  return (this.itemHolderByValue[(0, _utils.keyStringOf)(value)] || []).slice();
};
CTBItemListController.prototype.isSelectedAll = function () {
  return this.rootHolder.selected;
};
/*
CTBItemListController.prototype.selectAll = function (selected){
    var preValues = this.getValues();
    switch (selected) {
        case 'all':
            this.rootHolder.unselectAll();
            break;
        case 'child':
            if (this.rootHolder.canSelectAll) {
                this.rootHolder.selectAll();
            }
            else {
                this.rootHolder.unselectAll();
            }
            break;
        case 'none':
            this.rootHolder.selectAll();
            break;
    }
    if (this.rootViewHolder !== this.rootHolder) {
        this.rootViewHolder.updateSelectedFromRef();
    }
    var newValues = this.getValues();
    if (!arrayCompare(preValues, newValues)) {
        this.elt.emit('change', { type: 'change', target: this }, this);
    }
};*/

CTBItemListController.prototype.ev_scroll = function (event) {
  var itemHeight = this.itemHeight * this.elt.getFontSize() / 14;
  var scrollTop = this.$scroller.scrollTop;
  var scrollBottom = scrollTop + this.$scroller.clientHeight;
  var startOffset = this.$pages[0].__viewOffset__;
  var endOffset = this.$pages[this.$pages.length - 1].__viewOffset__;
  if (endOffset === -1) {
    endOffset = this.viewHolders.length;
  } else {
    endOffset += this.$pages[this.$pages.length - 1].childNodes.length;
  }
  var needLoad = 0;
  if (startOffset > 0 && startOffset * itemHeight + 200 > scrollTop) needLoad = -1;
  if (needLoad === 0 && this.viewHolders.length > endOffset && endOffset * itemHeight - 200 < scrollBottom) {
    needLoad = 1;
  }
  var page2Load;
  if (needLoad < 0) {
    page2Load = this.$pages.pop();
    this.$pages.unshift(page2Load);
    page2Load.__viewOffset__ = Math.max(0, startOffset - this.itemInPage);
    this._fillPage(page2Load, startOffset - page2Load.__viewOffset__);
    this._assignItems(page2Load, page2Load.__viewOffset__);
    page2Load.removeStyle('display');
    page2Load.addStyle('top', page2Load.__viewOffset__ * itemHeight + 'px');
  } else if (needLoad > 0) {
    for (var i = 0; i < this.$pages.length; ++i) {
      if (this.$pages[i].__viewOffset__ === -1) {
        page2Load = this.$pages[i];
        break;
      }
    }
    if (!page2Load) {
      page2Load = this.$pages.shift();
      this.$pages.push(page2Load);
    }
    page2Load.__viewOffset__ = endOffset;
    this._fillPage(page2Load, Math.min(this.itemInPage, this.viewHolders.length - endOffset));
    this._assignItems(page2Load, page2Load.__viewOffset__);
    page2Load.removeStyle('display');
    page2Load.addStyle('top', page2Load.__viewOffset__ * itemHeight + 'px');
  }
};
CTBItemListController.prototype.ev_checkAllChange = function (event) {
  var selected = this.rootHolder.selected;
  var preValues = this.getValues();
  switch (selected) {
    case 'all':
      this.rootHolder.unselectAll();
      break;
    case 'child':
      if (this.rootHolder.canSelectAll) {
        this.rootHolder.selectAll();
      } else {
        this.rootHolder.unselectAll();
      }
      break;
    case 'none':
      this.rootHolder.selectAll();
      break;
  }
  if (this.rootViewHolder !== this.rootHolder) {
    this.rootViewHolder.updateSelectedFromRef();
  }
  var newValues = this.getValues();
  if (!(0, _Array.arrayCompare)(preValues, newValues)) {
    this.elt.emit('change', {
      type: 'change',
      target: this
    }, this);
  }
};

/**
 *
 * @param {CheckTreeBox} elt
 * @constructor
 */
function CTBActionController(elt) {
  this.elt = elt;
  this.$cancelBtn = (0, _ACore.$)('.as-select-list-box-cancel-btn', this.elt).on('click', this.ev_clickCancelBtn.bind(this));
  this.$closeBtn = (0, _ACore.$)('.as-select-list-box-close-btn', this.elt) || (0, _ACore.$)('.am-dropdown-box-close-btn', this.elt);
  this.$closeBtn.on('click', this.ev_clickCloseBtn.bind(this));
}
CTBActionController.prototype.ev_clickCancelBtn = function (event) {
  this.elt.emit('cancel', {
    type: 'cancel',
    target: this,
    originalEvent: event
  }, this);
};
CTBActionController.prototype.ev_clickCloseBtn = function (event) {
  this.elt.emit('close', {
    type: 'close',
    target: this,
    originalEvent: event
  }, this);
};
function CTBSearchController(elt) {
  this.elt = elt;
  this.cache = {};
  this.$searchInput = (0, _ACore.$)('searchtextinput', this.elt).on('stoptyping', this.ev_searchModify.bind(this));
}
CTBSearchController.prototype.ev_searchModify = function () {
  var text = this.$searchInput.value.trim();
  if (text.length === 0) {
    this.elt.listCtrl.resetView();
    return;
  }
  var searchData;
  if (this.cache[text]) {
    searchData = this.cache[text];
  } else {
    searchData = {};
    searchData.items = (0, _search.searchTreeListByText)(text, this.elt.listCtrl._items);
    searchData.rootViewHolder = new TreeRootHolder(this.elt, searchData.items);
    searchData.items.forEach(function visit(it) {
      if (it.ref.items && it.ref.items.length > 0 && (!it.items || it.items.length === 0)) {
        it.items = it.ref.items;
        it.doNotInitOpen = true;
      } else if (it.items && it.items.length > 0) {
        it.items.forEach(visit);
      }
    });
  }
  searchData.rootViewHolder.traverse(function (hd) {
    if (hd.status === 'close') {
      if (!hd.item.doNotInitOpen) hd.status = 'open';
    }
  });

  //todo: short command
  this.elt.listCtrl.rootViewHolder = searchData.rootViewHolder;
  this.elt.listCtrl.viewHolders = this.elt.listCtrl.rootViewHolder.toArray();
  this.elt.listCtrl.rootViewHolder.updateSelectedFromRef();
  this.elt.listCtrl.updateContentSize();
  this.elt.listCtrl.viewListAt(0);
  this.elt.dropdownCtrl.updatePosition();
};

/**
 *
 * @param {CheckTreeBox} elt
 * @constructor
 */
function CTBDropdownController(elt) {
  this.elt = elt;
}
CTBDropdownController.prototype.updatePosition = function () {
  if (this.elt.updatePosition) {
    this.elt.updatePosition();
  }
};

/***/ }),

/***/ 26638:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _ExpTree = __webpack_require__(87326);
var _SelectListItem = __webpack_require__(57040);
__webpack_require__(90127);
var _EventEmitter = __webpack_require__(46833);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends ExpNode
 * @constructor
 */
function CheckTreeItem() {
  this._itemData = null;
  this.$name = (0, _ACore.$)('span.absol-exp-node-name', this);
  this.$desc = (0, _ACore.$)('span.absol-exp-node-desc', this);
  this.$iconCtn = (0, _ACore.$)('div.absol-exp-node-ext-icon', this);
  this.$level = (0, _ACore.$)('.absol-exp-node-level', this);
  this.$checkbox = (0, _ACore.$)('checkboxbutton', this).on('change', this.eventHandler.checkboxChange);
  this.$toggleIcon = (0, _ACore.$)('toggler-ico', this);
  this.on('click', this.eventHandler.click);
}
CheckTreeItem.tag = 'CheckTreeItem'.toLowerCase();
CheckTreeItem.render = function () {
  return (0, _ACore._)({
    tag: 'button',
    extendEvent: ['select', 'presstoggle'],
    "class": ['as-check-tree-item', 'absol-exp-node'],
    child: ['.absol-exp-node-level', 'toggler-ico', 'checkboxbutton', 'img.absol-exp-node-ext-icon', 'div.absol-exp-node-ext-icon', 'span.absol-exp-node-name', 'span.absol-exp-node-desc']
  });
};
CheckTreeItem.property = {};
CheckTreeItem.property.icon = _ExpTree.ExpNode.property.icon;
CheckTreeItem.property.text = _ExpTree.ExpNode.property.name;
CheckTreeItem.property.level = _ExpTree.ExpNode.property.level;
CheckTreeItem.property.desc = _ExpTree.ExpNode.property.desc;
CheckTreeItem.property.status = _ExpTree.ExpNode.property.status;
CheckTreeItem.property.data = {
  set: function set(itemData) {
    this._itemData = itemData;
    var text = (0, _SelectListItem.getTextOfListItem)(itemData);
    this.text = text;
    this.attr('title', itemData.value + '');
    var desc = (0, _SelectListItem.getDescriptionOfListItem)(itemData);
    this.desc = desc;
    if (itemData && itemData.icon) {
      this.icon = itemData.icon;
    } else {
      this.icon = null;
    }
    this.noSelect = itemData.noSelect;
  },
  get: function get() {
    return this._itemData;
  }
};
CheckTreeItem.property.selected = {
  set: function set(value) {
    this._selected = value;
    this.$checkbox.disabled = value === 'empty';
    if (value === 'all') {
      this.$checkbox.minus = false;
      this.$checkbox.checked = true;
    } else if (value === 'child') {
      this.$checkbox.checked = false;
      this.$checkbox.minus = true;
    } else if (value === 'empty') {
      this.$checkbox.minus = false;
      this.$checkbox.checked = false;
    } else {
      this.$checkbox.minus = false;
      this.$checkbox.checked = false;
    }
  },
  get: function get() {
    if (this.$checkbox.disabled) return 'empty';
    if (this.$checkbox.checked) return 'all';else if (this.$checkbox.minus) return 'child';
    return 'none';
  }
};
CheckTreeItem.property.noSelect = {
  set: function set(value) {
    if (value) {
      this.addClass('as-no-select');
    } else {
      this.removeClass('as-no-select');
    }
  },
  get: function get() {
    return this.hasClass('as-no-select');
  }
};
CheckTreeItem.eventHandler = {};
CheckTreeItem.eventHandler.checkboxChange = function (event) {
  this.emit('select', {
    type: 'select',
    target: this,
    originalEvent: event.originalEvent || event.originEvent || event
  });
};
CheckTreeItem.eventHandler.click = function (event) {
  var tBound;
  if (this.status === 'open' || this.status === 'close') {
    tBound = this.$toggleIcon.getBoundingClientRect();
    if (event.clientX <= tBound.right || this.noSelect) {
      this.emit('presstoggle', {
        type: 'presstoggle',
        target: this,
        originalEvent: event
      }, this);
    } else if (!(0, _EventEmitter.hitElement)(this.$checkbox, event) && !this.$checkbox.disabled) {
      this.$checkbox.checked = !this.$checkbox.checked;
      this.eventHandler.checkboxChange(event);
    }
  } else {
    if (!(0, _EventEmitter.hitElement)(this.$checkbox, event) && !this.noSelect && !this.$checkbox.disabled) {
      this.$checkbox.checked = !this.$checkbox.checked;
      this.eventHandler.checkboxChange(event);
    }
  }
};
_ACore["default"].install(CheckTreeItem);
var _default = CheckTreeItem;
exports["default"] = _default;

/***/ }),

/***/ 13163:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.TreeLeafOnlyNodeHolder = TreeLeafOnlyNodeHolder;
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _CheckTreeBox = _interopRequireWildcard(__webpack_require__(93794));
var _CheckTreeItem = _interopRequireDefault(__webpack_require__(26638));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
var _utils = __webpack_require__(84512);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var normalizeItem = function normalizeItem(item) {
  var nItem = Object.assign({}, item);
  if (!nItem.isLeaf && nItem.noSelect) {
    delete nItem.noSelect;
  }
  if (nItem.items && nItem.items.map) nItem.items = normalizeItems(nItem.items);
  return nItem;
};
var normalizeItems = function normalizeItems(items) {
  return items.map(function (it) {
    return normalizeItem(it);
  });
};
var verifyItems = function verifyItems(items) {
  var leafDict = {};
  var subTreeDict = {};
  var visit = function visit() {};
  items.forEach(visit);
};

/***
 * Only tree has leaf can be selected
 * @extends CheckTreeBox
 * @constructor
 */
function CheckTreeLeafOnlyBox() {
  _CheckTreeBox["default"].apply(this, arguments);
}
CheckTreeLeafOnlyBox.tag = 'CheckTreeLeafOnlyBox'.toLowerCase();
CheckTreeLeafOnlyBox.render = function () {
  var mobile = arguments[1] && arguments[1].forceMobile || _BrowserDetector["default"].isMobile;
  var footer = {
    "class": 'as-dropdown-box-footer',
    child: [{
      tag: 'checkbox',
      "class": 'as-select-list-box-check-all',
      props: {
        checked: false,
        text: _LanguageSystem["default"].getText('txt_check_all') || _LanguageSystem["default"].getText('txt_all') || 'Check All'
      }
    }, {
      "class": 'as-dropdown-box-footer-right',
      child: [{
        tag: 'a',
        "class": 'as-select-list-box-cancel-btn',
        attr: {
          "data-ml-key": 'txt_cancel'
        }
      }].concat(mobile ? [] : [{
        tag: 'a',
        "class": 'as-select-list-box-close-btn',
        attr: {
          "data-ml-key": 'txt_close'
        }
      }])
    }]
  };
  var content = {
    "class": ['as-check-tree-box-scroller', 'as-bscroller', 'as-select-list-box-scroller'],
    child: {
      "class": ['as-check-tree-box-content', 'as-select-list-box-content'],
      child: Array(this.prototype.preLoadN).fill('.as-select-list-box-page')
    }
  };
  if (mobile) {
    return (0, _ACore._)({
      props: {
        mobile: true
      },
      extendEvent: ['change', 'close', 'toggleitem', 'cancel'],
      "class": ['am-check-tree-box-modal', 'am-modal', 'am-dropdown-box-modal'],
      child: {
        "class": ['am-check-tree-box', 'am-dropdown-box', 'as-dropdown-box-common-style'],
        child: [{
          "class": 'am-dropdown-box-header',
          child: [{
            tag: _Searcher["default"].tag
          }, {
            tag: 'button',
            "class": 'am-dropdown-box-close-btn',
            child: 'span.mdi.mdi-close'
          }]
        }, content, footer]
      }
    });
  }
  return (0, _ACore._)({
    tag: 'follower',
    extendEvent: ['change', 'toggleitem', 'cancel', 'close'],
    "class": ['as-check-tree-leaf-only-box', 'as-check-tree-box', 'as-select-list-box', 'as-anchor-1'],
    child: [{
      "class": 'as-select-list-box-search-ctn',
      child: 'searchtextinput'
    }, content, footer],
    props: {
      anchor: [1, 6, 2, 5]
    }
  });
};
Object.assign(CheckTreeLeafOnlyBox.prototype, _CheckTreeBox["default"].prototype);
CheckTreeLeafOnlyBox.property = Object.assign({}, _CheckTreeBox["default"].property);
CheckTreeLeafOnlyBox.eventHandler = Object.assign({}, _CheckTreeBox["default"].eventHandler);
CheckTreeLeafOnlyBox.prototype._pool = [];
CheckTreeLeafOnlyBox.prototype.findItemByValue = function (value) {
  var holders = this.listCtrl.findItemHoldersByValue(value);
  if (holders && holders.length > 0) {
    return holders[0].item;
  } else {
    return null;
  }
};
CheckTreeLeafOnlyBox.property.items = {
  get: _CheckTreeBox["default"].property.items.get,
  set: function set(items) {
    items = normalizeItems(items || []);
    verifyItems(items);
    _CheckTreeBox["default"].property.items.set.call(this, items);
  }
};
CheckTreeLeafOnlyBox.prototype._requestItem = function () {
  var res = this._pool.pop() || (0, _ACore._)({
    tag: _CheckTreeItem["default"].tag,
    "class": 'as-check-tree-leaf-only-item',
    props: {
      menuElt: this
    },
    on: {
      presstoggle: function presstoggle(event) {
        this.menuElt.eventHandler.toggleItem(this, event);
      },
      select: function select(event) {
        this.menuElt.eventHandler.selectItem(this, event);
      }
    }
  });
  res.menuElt = this;
  return res;
};
CheckTreeLeafOnlyBox.prototype.HolderClass = TreeLeafOnlyNodeHolder;
_ACore["default"].install(CheckTreeLeafOnlyBox);
var _default = CheckTreeLeafOnlyBox;
/***
 * @extends TreeRootHolder
 * @param {CheckTreeLeafOnlyBox} boxElt
 * @param items
 * @constructor
 */
exports["default"] = _default;
function TreeLeafOnlyRootHolder(boxElt, items) {
  _CheckTreeBox.TreeRootHolder.apply(this, arguments);
}
CheckTreeLeafOnlyBox.prototype.RootHolderClass = TreeLeafOnlyRootHolder;
_OOP["default"].mixClass(TreeLeafOnlyRootHolder, _CheckTreeBox.TreeRootHolder);

/***
 * @extends TreeNodeHolder
 * @constructor
 */
function TreeLeafOnlyNodeHolder() {
  _CheckTreeBox.TreeNodeHolder.apply(this, arguments);
  /***
   * @memberOf  TreeLeafOnlyNodeHolder#
   * @type {number}
   */
  this.leafCount = 0;
  if (this.item.isLeaf) {
    this.leafCount = 1;
  } else {
    this.leafCount = this.child.reduce(function (ac, c) {
      return ac + c.leafCount;
    }, 0);
  }
  if (this.child.length > 0) {
    this.item.noSelect = this.child.every(function (c) {
      return c.item.noSelect;
    }); //all child is noSelect=> noSelect
  }

  this.canSelect = this.canSelect && this.leafCount > 0;
  this.canSelectAll = this.canSelect && !this.item.noSelect && this.child.every(function (c) {
    return c.canSelectAll || c.leafCount === 0;
  });
  if (this.leafCount === 0) this.selected = 'empty';
}
_OOP["default"].mixClass(TreeLeafOnlyNodeHolder, _CheckTreeBox.TreeNodeHolder);
TreeLeafOnlyRootHolder.prototype.SubHolderClass = TreeLeafOnlyNodeHolder;
TreeLeafOnlyNodeHolder.prototype.setValues = function (values) {
  if (values[(0, _utils.keyStringOf)(this.item.value)]) {
    this.selectAll(true);
  } else {
    this.child.forEach(function (c) {
      return c.setValues(values);
    });
  }
  this.updateFromChild();
};
TreeLeafOnlyNodeHolder.prototype.getValues = function (ac) {
  ac = ac || [];
  if (this.selected === 'all' && this.item.isLeaf) {
    ac.push(this.item.value);
  } else {
    this.child.forEach(function (c) {
      return c.getValues(ac);
    });
  }
  return ac;
};
TreeLeafOnlyNodeHolder.prototype.getViewValues = function (ac) {
  ac = ac || [];
  if (this.selected === 'all') {
    ac.push(this.item.value);
  } else if (this.selected === 'child') {
    this.child.forEach(function (c) {
      return c.getViewValues(ac);
    });
  }
  return ac;
};

/***
 *
 * @param {boolean=} isDownUpdate
 */
TreeLeafOnlyNodeHolder.prototype.selectAll = function (isDownUpdate) {
  if (this.selected === 'empty') return;
  return _CheckTreeBox.TreeNodeHolder.prototype.selectAll.apply(this, arguments);
};
TreeLeafOnlyNodeHolder.prototype.unselectAll = function (isDownUpdate) {
  if (this.selected === 'empty') return;
  return _CheckTreeBox.TreeNodeHolder.prototype.unselectAll.apply(this, arguments);
};
TreeLeafOnlyNodeHolder.prototype.updateFromChild = function () {
  if (this.child.length === 0) return;
  var count = this.child.reduce(function (ac, cr) {
    ac[cr.selected]++;
    return ac;
  }, {
    all: 0,
    child: 0,
    none: 0,
    empty: 0
  });
  // if (this.boxElt.debug)
  // console.log( this.item, count.empty , count.all, this.child.length);//0, 9, 10

  if (count.empty === this.child.length) {
    this.selected = 'empty';
  } else if (count.empty + count.all === this.child.length) {
    this.selected = 'all';
  } else if (count.all + count.child > 0) {
    this.selected = 'child';
  } else if (this.selected !== "empty") {
    this.selected = 'none';
  }
  if (this.itemElt) {
    this.itemElt.selected = this.selected;
  }
};

/***/ }),

/***/ 39646:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.TreeLeafOnlyNodeHolder = TreeLeafOnlyNodeHolder;
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
var _utils = __webpack_require__(84512);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _CheckTreeBox = _interopRequireWildcard(__webpack_require__(93794));
var _CheckTreeItem = _interopRequireDefault(__webpack_require__(26638));
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var normalizeItem = function normalizeItem(item) {
  var nItem = Object.assign({}, item);
  if (!nItem.isLeaf && nItem.noSelect) {
    delete nItem.noSelect;
  }
  if (nItem.items && nItem.items.map) nItem.items = normalizeItems(nItem.items);
  return nItem;
};
var normalizeItems = function normalizeItems(items) {
  return items.map(function (it) {
    return normalizeItem(it);
  });
};
var verifyItems = function verifyItems(items) {
  var leafDict = {};
  var subTreeDict = {};
  var visit = function visit() {};
  items.forEach(visit);
};

/**
 * @extends AElement
 * @constructor
 */
function CheckUnsafeTreeItem() {
  _CheckTreeItem["default"].apply(this, arguments);
  this.$actionCtn = (0, _ACore.$)('.as-check-unsafe-tree-item-action-ctn', this);
  this.$actionBtns = (0, _ACore.$$)('button', this.$actionCtn);
  this.$actionBtns[0].on('click', this.eventHandler.clickAction.bind(this, 'check_all'));
  this.$actionBtns[1].on('click', this.eventHandler.clickAction.bind(this, 'uncheck_all'));
}
CheckUnsafeTreeItem.tag = 'CheckUnsafeTreeItem'.toLowerCase();
CheckUnsafeTreeItem.render = function () {
  return (0, _ACore._)({
    tag: 'button',
    extendEvent: ['select', 'presstoggle'],
    "class": ['as-check-tree-item', 'as-check-unsafe-tree-item', 'absol-exp-node'],
    child: ['.absol-exp-node-level', 'toggler-ico', 'checkboxbutton', 'img.absol-exp-node-ext-icon', 'div.absol-exp-node-ext-icon', 'span.absol-exp-node-name', 'span.absol-exp-node-desc', {
      "class": 'as-check-unsafe-tree-item-action-ctn',
      child: [{
        tag: 'button',
        "class": 'as-transparent-button',
        child: 'span.mdi.mdi-check-all'
      }, {
        tag: 'button',
        "class": 'as-transparent-button',
        child: 'span.mdi.mdi-close'
      }]
    }]
  });
};
CheckUnsafeTreeItem.eventHandler = Object.assign({}, _CheckTreeItem["default"].eventHandler);
CheckUnsafeTreeItem.property = Object.assign({}, _CheckTreeItem["default"].property);
CheckUnsafeTreeItem.eventHandler.click = function (event) {
  var tBound;
  if (this.status === 'open' || this.status === 'close') {
    tBound = this.$toggleIcon.getBoundingClientRect();
    if ((0, _EventEmitter.hitElement)(this.$actionCtn, event)) {} else if (event.clientX <= tBound.right || this.noSelect) {
      this.emit('presstoggle', {
        type: 'presstoggle',
        target: this,
        originalEvent: event
      }, this);
    } else if (!(0, _EventEmitter.hitElement)(this.$checkbox, event) && !this.$checkbox.disabled) {
      this.$checkbox.checked = !this.$checkbox.checked;
      this.eventHandler.checkboxChange(event);
    }
  } else {
    if (!(0, _EventEmitter.hitElement)(this.$checkbox, event) && !this.noSelect && !this.$checkbox.disabled) {
      this.$checkbox.checked = !this.$checkbox.checked;
      this.eventHandler.checkboxChange(event);
    }
  }
};
CheckUnsafeTreeItem.eventHandler.clickAction = function (action, event) {
  console.log(action);
};

/***
 * Only tree has leaf can be selected
 * @extends CheckTreeBox
 * @constructor
 */
function CheckUnsafeTreeLeafOnlyBox() {
  _CheckTreeBox["default"].apply(this, arguments);
}
CheckUnsafeTreeLeafOnlyBox.tag = 'CheckUnsafeTreeLeafOnlyBox'.toLowerCase();
CheckUnsafeTreeLeafOnlyBox.render = function () {
  var mobile = arguments[1] && arguments[1].forceMobile || _BrowserDetector["default"].isMobile;
  var footer = {
    "class": 'as-dropdown-box-footer',
    child: [{
      tag: 'checkbox',
      "class": 'as-select-list-box-check-all',
      props: {
        checked: false,
        text: _LanguageSystem["default"].getText('txt_check_all') || _LanguageSystem["default"].getText('txt_all') || 'Check All'
      }
    }, {
      "class": 'as-dropdown-box-footer-right',
      child: [{
        tag: 'a',
        "class": 'as-select-list-box-cancel-btn',
        attr: {
          "data-ml-key": 'txt_cancel'
        }
      }].concat(mobile ? [] : [{
        tag: 'a',
        "class": 'as-select-list-box-close-btn',
        attr: {
          "data-ml-key": 'txt_close'
        }
      }])
    }]
  };
  var content = {
    "class": ['as-check-tree-box-scroller', 'as-bscroller', 'as-select-list-box-scroller'],
    child: {
      "class": ['as-check-tree-box-content', 'as-select-list-box-content'],
      child: Array(this.prototype.preLoadN).fill('.as-select-list-box-page')
    }
  };
  if (mobile) {
    return (0, _ACore._)({
      props: {
        mobile: true
      },
      extendEvent: ['change', 'close', 'toggleitem', 'cancel'],
      "class": ['am-check-tree-box-modal', 'am-modal', 'am-dropdown-box-modal'],
      child: {
        "class": ['am-check-tree-box', 'am-dropdown-box', 'as-dropdown-box-common-style'],
        child: [{
          "class": 'am-dropdown-box-header',
          child: [{
            tag: _Searcher["default"].tag
          }, {
            tag: 'button',
            "class": 'am-dropdown-box-close-btn',
            child: 'span.mdi.mdi-close'
          }]
        }, content, footer]
      }
    });
  }
  return (0, _ACore._)({
    tag: 'follower',
    extendEvent: ['change', 'toggleitem', 'cancel', 'close'],
    "class": ['as-check-tree-leaf-only-box', 'as-check-tree-box', 'as-select-list-box', 'as-anchor-1'],
    child: [{
      "class": 'as-select-list-box-search-ctn',
      child: 'searchtextinput'
    }, content, footer],
    props: {
      anchor: [1, 6, 2, 5]
    }
  });
};
Object.assign(CheckUnsafeTreeLeafOnlyBox.prototype, _CheckTreeBox["default"].prototype);
CheckUnsafeTreeLeafOnlyBox.property = Object.assign({}, _CheckTreeBox["default"].property);
CheckUnsafeTreeLeafOnlyBox.eventHandler = Object.assign({}, _CheckTreeBox["default"].eventHandler);
CheckUnsafeTreeLeafOnlyBox.prototype._pool = [];
CheckUnsafeTreeLeafOnlyBox.property.items = {
  get: _CheckTreeBox["default"].property.items.get,
  set: function set(items) {
    items = normalizeItems(items || []);
    verifyItems(items);
    _CheckTreeBox["default"].property.items.set.call(this, items);
  }
};
CheckUnsafeTreeLeafOnlyBox.prototype._requestItem = function () {
  var res = this._pool.pop() || (0, _ACore._)({
    tag: _CheckTreeItem["default"].tag,
    "class": 'as-check-tree-leaf-only-item',
    props: {
      menuElt: this
    },
    on: {
      presstoggle: function presstoggle(event) {
        this.menuElt.eventHandler.toggleItem(this, event);
      },
      select: function select(event) {
        this.menuElt.eventHandler.selectItem(this, event);
      }
    }
  });
  res.menuElt = this;
  return res;
};
CheckUnsafeTreeLeafOnlyBox.prototype.HolderClass = TreeLeafOnlyNodeHolder;
_ACore["default"].install(CheckUnsafeTreeLeafOnlyBox);
var _default = CheckUnsafeTreeLeafOnlyBox;
/**
 *
 * @constructor
 */
exports["default"] = _default;
function CSTBItemListController() {
  _CheckTreeBox.CTBItemListController.apply(this, arguments);
  console.log(this._requestItem);
}
(0, _OOP.mixClass)(CSTBItemListController, _CheckTreeBox.CTBItemListController);
CheckUnsafeTreeLeafOnlyBox.prototype.ListControllerClass = CSTBItemListController;
CSTBItemListController.prototype._pool = [];
CSTBItemListController.prototype._requestItem = function () {
  var res = this._pool.pop() || (0, _ACore._)({
    tag: CheckUnsafeTreeItem,
    // tag: CheckTreeItem,
    props: {
      menuElt: this
    },
    on: {
      presstoggle: function presstoggle(event) {
        this.menuElt.eventHandler.toggleItem(this, event);
      },
      select: function select(event) {
        this.menuElt.eventHandler.selectItem(this, event);
      }
    }
  });
  res.menuElt = this.elt;
  console.log(res);
  return res;
};

/***
 * @extends TreeRootHolder
 * @param {CheckUnsafeTreeLeafOnlyBox} boxElt
 * @param items
 * @constructor
 */
function TreeLeafOnlyRootHolder(boxElt, items) {
  _CheckTreeBox.TreeRootHolder.apply(this, arguments);
}
CheckUnsafeTreeLeafOnlyBox.prototype.RootHolderClass = TreeLeafOnlyRootHolder;
_OOP["default"].mixClass(TreeLeafOnlyRootHolder, _CheckTreeBox.TreeRootHolder);

/***
 * @extends TreeNodeHolder
 * @constructor
 */
function TreeLeafOnlyNodeHolder() {
  _CheckTreeBox.TreeNodeHolder.apply(this, arguments);
  /***
   * @memberOf  TreeLeafOnlyNodeHolder#
   * @type {number}
   */
  this.leafCount = 0;
  if (this.item.isLeaf) {
    this.leafCount = 1;
  } else {
    this.leafCount = this.child.reduce(function (ac, c) {
      return ac + c.leafCount;
    }, 0);
  }
  if (this.child.length > 0) {
    this.item.noSelect = this.child.every(function (c) {
      return c.item.noSelect;
    }); //all child is noSelect=> noSelect
  }

  this.canSelect = this.canSelect && this.leafCount > 0;
  this.canSelectAll = this.canSelect && !this.item.noSelect && this.child.every(function (c) {
    return c.canSelectAll || c.leafCount === 0;
  });
  if (this.leafCount === 0) this.selected = 'empty';
}
_OOP["default"].mixClass(TreeLeafOnlyNodeHolder, _CheckTreeBox.TreeNodeHolder);
TreeLeafOnlyRootHolder.prototype.SubHolderClass = TreeLeafOnlyNodeHolder;
TreeLeafOnlyNodeHolder.prototype.setValues = function (values) {
  if (values[(0, _utils.keyStringOf)(this.item.value)]) {
    this.selectAll(true);
  } else {
    this.child.forEach(function (c) {
      return c.setValues(values);
    });
  }
  this.updateFromChild();
};
TreeLeafOnlyNodeHolder.prototype.getValues = function (ac) {
  ac = ac || [];
  if (this.selected === 'all' && this.item.isLeaf) {
    ac.push(this.item.value);
  } else {
    this.child.forEach(function (c) {
      return c.getValues(ac);
    });
  }
  return ac;
};
TreeLeafOnlyNodeHolder.prototype.getViewValues = function (ac) {
  ac = ac || [];
  if (this.selected === 'all') {
    ac.push(this.item.value);
  } else if (this.selected === 'child') {
    this.child.forEach(function (c) {
      return c.getViewValues(ac);
    });
  }
  return ac;
};

/***
 *
 * @param {boolean=} isDownUpdate
 */
TreeLeafOnlyNodeHolder.prototype.selectAll = function (isDownUpdate) {
  if (this.selected === 'empty') return;
  return _CheckTreeBox.TreeNodeHolder.prototype.selectAll.apply(this, arguments);
};
TreeLeafOnlyNodeHolder.prototype.unselectAll = function (isDownUpdate) {
  if (this.selected === 'empty') return;
  return _CheckTreeBox.TreeNodeHolder.prototype.unselectAll.apply(this, arguments);
};
TreeLeafOnlyNodeHolder.prototype.updateFromChild = function () {
  if (this.child.length === 0) return;
  var count = this.child.reduce(function (ac, cr) {
    ac[cr.selected]++;
    return ac;
  }, {
    all: 0,
    child: 0,
    none: 0,
    empty: 0
  });
  // if (this.boxElt.debug)
  // console.log( this.item, count.empty , count.all, this.child.length);//0, 9, 10

  if (count.empty === this.child.length) {
    this.selected = 'empty';
  } else if (count.empty + count.all === this.child.length) {
    this.selected = 'all';
  } else if (count.all + count.child > 0) {
    this.selected = 'child';
  } else if (this.selected !== "empty") {
    this.selected = 'none';
  }
  if (this.itemElt) {
    this.itemElt.selected = this.selected;
  }
};

/***/ }),

/***/ 93475:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(49409);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_ACore["default"].install('checkboxbutton', _CheckBoxInput["default"]);
var _default = _CheckBoxInput["default"];
exports["default"] = _default;

/***/ }),

/***/ 51631:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(9479);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var datetime = _interopRequireWildcard(__webpack_require__(58286));
var _EventEmitter = _interopRequireWildcard(__webpack_require__(46833));
var _Scroller = __webpack_require__(87780);
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _utils = __webpack_require__(84512);
var _DelaySignal = _interopRequireDefault(__webpack_require__(81809));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var calendarLangMap = {
  'en': {
    monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
    shortMonthNames: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
    dayOfWeekNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
    shortDayOfWeekNames: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
    quarterNames: ['Q1', 'Q2', 'Q3', 'Q4']
  },
  'vi': {
    monthNames: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6', 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
    shortMonthNames: ['Thg 1', 'Thg 2', 'Thg 3', 'Thg 4', 'Thg 5', 'Thg 6', 'Thg 7', 'Thg 8', 'Thg 9', 'Thg 10', 'Thg 11', 'Thg 12'],
    dayOfWeekNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
    shortDayOfWeekNames: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
    quarterNames: ['Q1', 'Q2', 'Q3', 'Q4']
  }
};
var getCalendarSupportedLanguage = function getCalendarSupportedLanguage() {
  var res = null;
  if (window['LanguageModule']) res = window['LanguageModule'].defaultcode;
  if (!res) res = navigator.language || navigator.userLanguage;
  res = res || 'en';
  res = res.toLowerCase();
  if (res === 'vn') res = 'vi';
  if (!calendarLangMap[res]) res = 'en';
  return res;
};

/**
 * get multi language text
 * @param {string} key
 * @returns {*}
 */
var getCMLText = function getCMLText(key) {
  return calendarLangMap[getCalendarSupportedLanguage()][key];
};
var EV_CONTENT_CHANGE = 'ev_content_change';

/**
 * @extends AElement
 * @constructor
 */
function ChromeCalendar() {
  var _this = this;
  var thisCal = this;
  this.dayInWeekTexts = getCMLText('shortDayOfWeekNames');
  this._startDayOfWeek = (0, datetime.getDefaultFirstDayOfWeek)();
  this._level = "day";
  this.$years = $('.absol-chrome-calendar-years', this);
  this.$title = $('.absol-chrome-calendar-title', this);
  this.$titleTime = $('.title-time', this.$title);
  this.$instance = $('.absol-chrome-calendar-instance', this);
  this.$era = $('.absol-chrome-calendar-era', this);
  this.$month = $('.absol-chrome-calendar-month', this);
  this.$dayOfWeek = $('.absol-chrome-calendar-dayofweek', this);
  this._min = new Date(1890, 0, 1);
  this._max = new Date(2090, 0, 1);
  this._selectedDates = [datetime.beginOfDay(new Date())];
  this._viewDate = new Date();
  this.$prevBtn = $('.absol-chrome-calendar-header-buttons > button.prev-btn', this);
  this.$todayBtn = $('.absol-chrome-calendar-header-buttons > button.today-btn', this);
  this.$nextBtn = $('.absol-chrome-calendar-header-buttons > button.next-btn', this);

  /***
   *
   * @type {VScroller}
   */
  this.$yearScroller = $('vscroller.absol-chrome-calendar-years', this);
  this.$yearItems = [];
  $('.absol-chrome-calendar-year', this.$yearScroller, function (e) {
    thisCal.$yearItems.push(e);
  });
  this.$attachHook = _('attachhook').addTo(this);
  this.domSignal = new _DelaySignal["default"]().on(EV_CONTENT_CHANGE, function () {
    switch (_this.level) {
      case 'day':
      case 'week':
        _this.startViewer('month');
        _this.viewer.updateContent();
        break;
      case 'month':
      case 'quarter':
        _this.startViewer('year');
        _this.viewer.updateContent();
        break;
      case 'year':
        _this.startViewer('era');
        break;
      default:
        break;
    }
    _this.viewer.updateContent();
    _this.headerCtrl.updateTitle();
    _this.headerCtrl.updateButtons();
  });
  this.sync = new Promise(function (rs) {
    thisCal.$attachHook.on('attached', rs);
  });
  _OOP["default"].drillProperty(this, this, 'minLimitDate', 'min');
  _OOP["default"].drillProperty(this, this, 'minDateLimit', 'min');
  _OOP["default"].drillProperty(this, this, 'maxLimitDate', 'max');
  _OOP["default"].drillProperty(this, this, 'maxDateLimit', 'max');
  this.headerCtrl = new CCHeaderController(this);
  this.viewers = {
    month: new CCMonthViewer(this),
    year: new CCYearViewer(this),
    era: new CCEraViewer(this)
  };
  /**
   *
   * @type {CCViewerAbstract}
   */
  this.viewer = this.viewers['month'];
  this.viewer.start();

  /**
   * @type {number}
   * @name startDayOfWeek
   * @memberOf ChromeCalendar#
   */

  /**
   * @type {Date[]}
   * @name selectedDates
   * @memberOf ChromeCalendar#
   */

  /**
   * @type {'day'|'week'|'month'|'quarter'|'year'}
   * @name level
   * @memberOf ChromeCalendar#
   */

  /**
   * @type {Date}
   * @name viewDate
   * @memberOf ChromeCalendar#
   */
}

ChromeCalendar.tag = 'ChromeCalendar'.toLowerCase();
ChromeCalendar.render = function () {
  return _({
    "class": ['absol-chrome-calendar'],
    attr: {
      'data-level': 'day',
      tabindex: '1'
    },
    extendEvent: 'pick',
    child: [{
      "class": 'absol-chrome-calendar-header',
      child: [{
        "class": 'absol-chrome-calendar-title',
        child: [{
          tag: 'span',
          "class": 'title-time',
          child: {
            text: 'Septemper, 2019'
          }
        }]
      }, {
        "class": 'absol-chrome-calendar-header-buttons',
        child: [{
          tag: 'button',
          "class": 'prev-btn',
          child: 'span.mdi.mdi-menu-left',
          attr: {
            title: 'Previous Month'
          }
        }, {
          tag: 'button',
          "class": 'today-btn',
          child: 'span.mdi.mdi-circle-medium',
          attr: {
            title: 'Today'
          }
        }, {
          tag: 'button',
          "class": 'next-btn',
          child: 'span.mdi.mdi-menu-right',
          attr: {
            title: 'Next Month'
          }
        }]
      }]
    }, {
      "class": 'absol-chrome-calendar-instance',
      child: [{
        "class": 'absol-chrome-calendar-dayofweek',
        child: getCMLText('shortDayOfWeekNames').map(function (text) {
          return {
            child: {
              text: text
            }
          };
        })
      }, {
        "class": 'absol-chrome-calendar-month'
      }, {
        tag: 'vscroller',
        "class": 'absol-chrome-calendar-years'
      }, {
        "class": "absol-chrome-calendar-era"
      }]
    }]
  });
};

/**
 * @param {Date} date
 * @returns {Boolean}
 */
ChromeCalendar.prototype.isSelectedDate = function (date) {
  for (var i = 0; i < this._selectedDates.length; ++i) {
    if ((0, datetime.compareDate)(date, this._selectedDates[i]) === 0) return true;
  }
  return false;
};
ChromeCalendar.prototype.isSelectedWeek = function (date) {
  var _this2 = this;
  return this._selectedDates.some(function (it) {
    if (date.getFullYear() !== it.getFullYear()) return false;
    var weekIdx = (0, datetime.weekIndexOf)(date, false, _this2.startDayOfWeek);
    var itWeekIdx = (0, datetime.weekIndexOf)(it, false, _this2.startDayOfWeek);
    return weekIdx === itWeekIdx;
  });
};

/**
 * @param {Date} date
 * @returns {Boolean}
 */
ChromeCalendar.prototype.isSelectedMonth = function (date) {
  for (var i = 0; i < this._selectedDates.length; ++i) {
    if ((0, datetime.compareMonth)(date, this._selectedDates[i]) === 0) return true;
  }
  return false;
};

/**
 * @param {Date} date
 * @returns {Boolean}
 */
ChromeCalendar.prototype.isSelectedQuarter = function (date) {
  for (var i = 0; i < this._selectedDates.length; ++i) {
    if ((0, datetime.compareMonth)((0, datetime.beginOfQuarter)(date), (0, datetime.beginOfQuarter)(this._selectedDates[i])) === 0) return true;
  }
  return false;
};

/**
 * @param {Date} date
 * @returns {Boolean}
 */
ChromeCalendar.prototype.isSelectedYear = function (date) {
  for (var i = 0; i < this._selectedDates.length; ++i) {
    if (date.getFullYear() === this._selectedDates[i].getFullYear()) return true;
  }
  return false;
};
ChromeCalendar.prototype.dayCmpLimit = function (date) {
  if ((0, datetime.compareDate)(date, this._min) < 0) return -1;
  if ((0, datetime.compareDate)(date, this._max) > 0) return 1;
  return 0;
};
ChromeCalendar.prototype.monthCmpLimit = function (date) {
  var startOfMonth = (0, datetime.beginOfMonth)(date);
  var endOfMonth = (0, datetime.nextMonth)(date);
  var minMil = Math.max(startOfMonth.getTime(), this._min.getTime());
  var maxMil = Math.min(endOfMonth.getTime(), (0, datetime.nextDate)(this._max).getTime());
  if (minMil < maxMil) return 0;
  return this.dayCmpLimit(date);
};
ChromeCalendar.prototype.yearCmpLimit = function (date) {
  var startOfYear = (0, datetime.beginOfYear)(date);
  var endOfYear = new Date(date.getFullYear() + 1, 0, 1);
  var minMil = Math.max(startOfYear.getTime(), this._min.getTime());
  var maxMil = Math.min(endOfYear.getTime(), (0, datetime.nextDate)(this._max).getTime());
  if (minMil < maxMil) return 0;
  return this.dayCmpLimit(date);
};
ChromeCalendar.prototype.quarterCmpLimit = function (date) {
  var startOfQuarter = (0, datetime.beginOfQuarter)(date);
  var endOfQuarter = new Date(date.getFullYear(), date.getMonth() + 3, 1);
  var minMil = Math.max(startOfQuarter.getTime(), this._min.getTime());
  var maxMil = Math.min(endOfQuarter.getTime(), (0, datetime.nextDate)(this._max).getTime());
  if (minMil < maxMil) return 0;
  return this.dayCmpLimit(date);
};

/**
 *
 * @param {"month"|"year"|"era"} key
 */
ChromeCalendar.prototype.startViewer = function (key) {
  if (!this.viewers[key]) return;
  if (this.viewers[key] === this.viewer) {
    this.viewer.start();
    this.headerCtrl.updateTitle();
  } else {
    this.viewer.stop();
    this.viewer = this.viewers[key];
    this.viewer.start();
    this.headerCtrl.updateTitle();
  }
};
ChromeCalendar.property = {};
ChromeCalendar.property.selectedDates = {
  set: function set(value) {
    value = value || [];
    if (!(value instanceof Array)) value = [value];
    value = value.map(function (d) {
      return (0, datetime.implicitDate)(d);
    }).filter(function (d) {
      return !!d;
    });
    this._selectedDates = value;
    this._viewDate = this._selectedDates[0] || new Date();
    this.domSignal.emit(EV_CONTENT_CHANGE);
  },
  get: function get() {
    var _this3 = this;
    var level = this._level;
    var res = this._selectedDates.map(function (d) {
      var res = d;
      switch (level) {
        case 'day':
          res = (0, datetime.beginOfDay)(d);
          break;
        case 'week':
          res = (0, datetime.beginOfWeek)(d, _this3.startDayOfWeek);
          if (res.getFullYear() < d.getFullYear()) res = (0, datetime.beginOfYear)(d);
          break;
        case 'month':
          res = (0, datetime.beginOfMonth)(d);
          break;
        case 'quarter':
          res = (0, datetime.beginOfQuarter)(d);
          break;
        case 'year':
          res = (0, datetime.beginOfYear)(d);
          break;
      }
      return res;
    });
    res = res.reduce(function (ac, d) {
      var key = (0, _utils.keyStringOf)(d);
      if (ac.has[key]) return ac;
      ac.has[key] = d;
      ac.arr.push(d);
      return ac;
    }, {
      has: {},
      arr: []
    }).arr;
    res.sort(function (a, b) {
      return a.getTime() - b.getTime();
    });
    return res;
  }
};
ChromeCalendar.property.min = {
  set: function set(value) {
    if (!value) value = new Date(1890, 0, 1);
    if (typeof value == 'number') value = new Date(value);
    value = (0, datetime.beginOfDay)(value);
    value = new Date(Math.max(new Date(1890, 0, 1).getTime(), value.getTime()));
    this._min = value;
    this.domSignal.emit(EV_CONTENT_CHANGE);
  },
  get: function get() {
    return this._min;
  }
};

//include maxLimitDate
ChromeCalendar.property.max = {
  set: function set(value) {
    if (!value) value = new Date(2090, 0, 1);
    if (typeof value == 'number') value = new Date(value);
    if (value.getTime() > (0, datetime.beginOfDay)(value).getTime()) value = (0, datetime.nextDate)((0, datetime.beginOfDay)(value));
    value = new Date(Math.min(new Date(2090, 0, 1).getTime(), value.getTime()));
    this._max = value;
    this.domSignal.emit(EV_CONTENT_CHANGE);
  },
  get: function get() {
    return this._max;
  }
};
ChromeCalendar.property.multiSelect = {
  set: function set(value) {
    value = false;
    // throw new Error('Not support yet!')
    var lastValue = this.multiSelect;
    value = !!value;
    if (lastValue !== value) {
      if (value) {
        this.addClass('as-multi-select');
      } else {
        this.removeClass('as-multi-select');
      }
    }
    this.domSignal.emit(EV_CONTENT_CHANGE);
  },
  get: function get() {
    return this.hasClass('as-multi-select');
  }
};
ChromeCalendar.property.level = {
  set: function set(value) {
    value = (value || '') + '';
    value = value.toLowerCase();
    if (['day', 'week', 'quarter', 'month', 'year'].indexOf(value) < 0) value = 'day';
    if (this._level === value) return;
    this.attr('data-level', value);
    this._level = value;
    this.domSignal.emit(EV_CONTENT_CHANGE);
  },
  get: function get() {
    return this._level;
  }
};
ChromeCalendar.prototype.dayInWeekTexts = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
ChromeCalendar.property.startDayOfWeek = {
  set: function set(value) {
    value = Math.max(0, Math.min(Math.floor(value || 0), 6));
    if (this._startDayOfWeek !== value) {
      this._startDayOfWeek = value;
      Array.prototype.forEach.call(this.$dayOfWeek.childNodes, function (e, i) {
        e.firstChild.data = this.dayInWeekTexts[(i + value) % 7];
      }.bind(this));
    }
    this.viewers.month.updateContent();
  },
  get: function get() {
    return this._startDayOfWeek;
  }
};
ChromeCalendar.property.viewDate = {
  set: function set(date) {
    this._viewDate = date;
    this.domSignal.emit(EV_CONTENT_CHANGE);
  },
  get: function get() {
    return this._viewDate;
  }
};
_ACore["default"].install(ChromeCalendar);

/**
 *
 * @param {ChromeCalendar} elt
 * @constructor
 */
function CCViewerAbstract(elt) {
  this.elt = elt;
  this.$instance = elt.$instance;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
}
CCViewerAbstract.prototype.getTitle = function () {
  return '';
};
CCViewerAbstract.prototype.updateContent = function () {};
CCViewerAbstract.prototype.prev = function () {};
CCViewerAbstract.prototype.next = function () {};
CCViewerAbstract.prototype.canPrev = function () {};
CCViewerAbstract.prototype.canNext = function () {};
CCViewerAbstract.prototype.viewToday = function () {};
CCViewerAbstract.prototype.canViewToday = function () {};
CCViewerAbstract.prototype.start = function () {};
CCViewerAbstract.prototype.stop = function () {};
CCViewerAbstract.prototype.onSelectedDatesChange = function () {};

/**
 * @extends CCViewerAbstract
 * @param elt
 * @constructor
 */
function CCMonthViewer(elt) {
  CCViewerAbstract.call(this, elt);
  this.$month = elt.$month;
  this.$dayOfWeek = elt.$dayOfWeek;
  this.$instance = elt.$instance;
  this.$month.on('click', this.ev_click).on('mouseenter', this.ev_mouseEnter);
  // this.startingDate = null;

  this.animationSync = Promise.resolve();
  this.isListening = false;
  this.$hoverRow = null;
}
(0, _OOP.mixClass)(CCMonthViewer, CCViewerAbstract);
CCMonthViewer.prototype.updateContent = function () {
  var viewDate = (0, datetime.beginOfMonth)(this.elt._viewDate);
  var viewMonth = viewDate.getMonth();
  var viewYear = viewDate.getFullYear();
  var bg = (0, datetime.beginOfMonth)(viewDate);
  var startDayOfWeek = this.elt.startDayOfWeek;
  bg = (0, datetime.beginOfWeek)(bg, false, startDayOfWeek);
  var weekIdx;
  var shortDayOfWeekNames = getCMLText('shortDayOfWeekNames');
  Array.prototype.forEach.call(this.$dayOfWeek.childNodes, function (elt, i) {
    elt.firstChild.data = shortDayOfWeekNames[(i + startDayOfWeek) % 7];
  });
  var now = new Date();
  var rowElt, cellElt;
  while (this.$month.childNodes.length < 6) {
    rowElt = _({
      "class": 'absol-chrome-calendar-week-in-month',
      child: Array(7).fill('div')
    });
    this.$month.addChild(rowElt);
  }
  var i, j;
  var isSelectedRow;
  for (i = 0; i < 6; ++i) {
    rowElt = this.$month.childNodes[i];
    isSelectedRow = false;
    weekIdx = bg.getFullYear() < viewDate.getFullYear() ? 0 : (0, datetime.weekIndexOf)(bg, false, startDayOfWeek);
    rowElt.attr('data-week-idx-text', (0, _utils.zeroPadding)(weekIdx + 1, 2) + '');
    // if (this.elt.isSel)
    for (j = 0; j < rowElt.childNodes.length; ++j) {
      cellElt = rowElt.childNodes[j];
      cellElt.attr('data-date', bg.getDate());
      cellElt.attr('data-time', bg.getTime());
      if (bg.getFullYear() !== viewYear) {
        cellElt.addClass('as-not-in-year');
      } else {
        cellElt.removeClass('as-not-in-year');
      }
      if (bg.getMonth() === viewMonth) {
        cellElt.removeClass('absol-chrome-calendar-not-in-month');
      } else {
        cellElt.addClass('absol-chrome-calendar-not-in-month');
      }
      if (this.elt.level === 'day' && this.elt.isSelectedDate(bg)) {
        cellElt.addClass('absol-chrome-calendar-selected');
      } else if (this.elt.level === 'week' && this.elt.isSelectedWeek(bg)) {
        cellElt.addClass('absol-chrome-calendar-selected');
        if (!isSelectedRow && bg.getFullYear() === this.elt._viewDate.getFullYear()) {
          isSelectedRow = true;
        }
      } else {
        cellElt.removeClass('absol-chrome-calendar-selected');
      }
      if ((0, datetime.compareDate)(bg, now) === 0) {
        cellElt.addClass('absol-chrome-calendar-today');
      } else {
        cellElt.removeClass('absol-chrome-calendar-today');
      }
      if (this.elt.dayCmpLimit(bg) === 0) {
        cellElt.removeClass('as-disabled');
      } else {
        cellElt.addClass('as-disabled');
      }
      bg = (0, datetime.nextDate)(bg);
    }
    if (isSelectedRow) {
      rowElt.addClass('as-selected');
    } else {
      rowElt.removeClass('as-selected');
    }
  }
};
CCMonthViewer.prototype.animation = function (delta) {
  var _this4 = this;
  var oldViewDate = (0, datetime.beginOfMonth)(this.elt._viewDate);
  var newViewDate = delta < 0 ? (0, datetime.prevMonth)(oldViewDate) : (0, datetime.nextMonth)(oldViewDate);
  var startDayOfWeek = this.elt.startDayOfWeek;
  var oldBg = (0, datetime.beginOfWeek)(oldViewDate, false, startDayOfWeek);
  var newBg = (0, datetime.beginOfWeek)(newViewDate, false, startDayOfWeek);
  var curDate;
  var additionalRow = Math.round((0, datetime.compareDate)(oldBg, newBg) / 7);
  if (delta > 0) {
    additionalRow = -additionalRow;
  }
  var now = new Date();
  var aniMonth = _({
    "class": ['absol-chrome-calendar-month', 'as-animation']
  });
  if (delta < 0) {
    aniMonth.addStyle('top', -1.2 * (additionalRow - 1) + 'em');
  } else {
    aniMonth.addStyle('top', '1.2em');
  }
  var updateCellClassByViewDate = function updateCellClassByViewDate(viewDate) {
    curDate = delta < 0 ? newBg : oldBg;
    var isSelectedRow;
    for (i = 0; i < aniMonth.childNodes.length; ++i) {
      rowElt = aniMonth.childNodes[i];
      isSelectedRow = false;
      for (j = 0; j < rowElt.childNodes.length; ++j) {
        cellElt = rowElt.childNodes[j];
        if (curDate.getMonth() !== viewDate.getMonth()) {
          cellElt.addClass('absol-chrome-calendar-not-in-month');
        } else {
          cellElt.removeClass('absol-chrome-calendar-not-in-month');
        }
        if (!isSelectedRow && _this4.elt.level === 'week' && curDate.getFullYear() === viewDate.getFullYear() && _this4.elt.isSelectedWeek(curDate)) {
          isSelectedRow = true;
        }
        curDate = (0, datetime.nextDate)(curDate);
      }
      if (isSelectedRow) {
        rowElt.addClass('as-selected');
      } else {
        rowElt.removeClass('as-selected');
      }
    }
  };
  var rowElt, cellElt;
  var i, j;
  curDate = delta < 0 ? newBg : oldBg;
  var weekIdx;
  for (i = 0; i < 6 + additionalRow; ++i) {
    rowElt = _({
      "class": 'absol-chrome-calendar-week-in-month',
      child: Array(7).fill('div')
    });
    aniMonth.addChild(rowElt);
    for (j = 0; j < rowElt.childNodes.length; ++j) {
      cellElt = rowElt.childNodes[j];
      weekIdx = curDate.getFullYear() < newViewDate.getFullYear() ? 0 : (0, datetime.weekIndexOf)(curDate, false, startDayOfWeek);
      rowElt.attr('data-week-idx-text', (0, _utils.zeroPadding)(weekIdx + 1, 2) + '');
      cellElt.attr('data-date', curDate.getDate());
      cellElt.attr('data-time', curDate.getTime());
      if ((0, datetime.compareDate)(curDate, now) === 0) {
        cellElt.addClass('absol-chrome-calendar-today');
      }
      if (this.elt.level === 'day' && this.elt.isSelectedDate(curDate)) {
        cellElt.addClass('absol-chrome-calendar-selected');
      } else if (this.elt.level === 'week' && this.elt.isSelectedWeek(curDate)) {
        cellElt.addClass('absol-chrome-calendar-selected');
      }
      if (this.elt.dayCmpLimit(curDate) === 0) {
        cellElt.removeClass('as-disabled');
      } else {
        cellElt.addClass('as-disabled');
      }
      curDate = (0, datetime.nextDate)(curDate);
    }
  }
  updateCellClassByViewDate(oldViewDate);
  this.$instance.addChild(aniMonth);
  requestAnimationFrame(function () {
    if (delta < 0) {
      aniMonth.addStyle('top', '1.2em');
    } else {
      aniMonth.addStyle('top', -1.2 * (additionalRow - 1) + 'em');
    }
    updateCellClassByViewDate(newViewDate);
    setTimeout(function () {
      aniMonth.remove();
    }, 200);
  });
};
CCMonthViewer.prototype.canPrev = function () {
  return (0, datetime.compareMonth)(this.elt._viewDate, this.elt._min) > 0;
};
CCMonthViewer.prototype.canNext = function () {
  return (0, datetime.compareMonth)(this.elt._viewDate, this.elt._max) < 0;
};
CCMonthViewer.prototype.canViewToday = function () {
  var now = new Date();
  return (0, datetime.compareDate)(now, this.elt._min) >= 0 && (0, datetime.compareDate)(now, this.elt._max) <= 0;
};
CCMonthViewer.prototype.prev = function () {
  this.animation(-1);
  this.elt._viewDate = (0, datetime.prevMonth)(this.elt._viewDate);
  this.updateContent();
  this.elt.headerCtrl.updateTitle();
  this.elt.headerCtrl.updateButtons();
};
CCMonthViewer.prototype.next = function () {
  this.animation(1);
  this.elt._viewDate = (0, datetime.nextMonth)(this.elt._viewDate);
  this.updateContent();
  this.elt.headerCtrl.updateTitle();
  this.elt.headerCtrl.updateButtons();
};
CCMonthViewer.prototype.viewToday = function () {
  this.elt._viewDate = new Date();
  this.updateContent();
  this.elt.headerCtrl.updateTitle();
  this.elt.headerCtrl.updateButtons();
};
CCMonthViewer.prototype.start = function () {
  this.elt.attr('data-view', 'month');
  this.updateContent();
};
CCMonthViewer.prototype.stop = function () {};
CCMonthViewer.prototype.getTitle = function () {
  var viewDate = this.elt._viewDate;
  var res = '' + getCMLText('monthNames')[viewDate.getMonth()];
  res += ', ' + viewDate.getFullYear();
  return res;
};
CCMonthViewer.prototype.ev_click = function (event) {
  var dateBtn = event.target;
  var date;
  while (dateBtn && dateBtn !== this.$month) {
    if (dateBtn.attr && dateBtn.attr('data-time')) {
      date = new Date(parseInt(dateBtn.attr('data-time')));
      date = (0, datetime.beginOfDay)(date);
      this.elt._selectedDates = [date];
      this.onSelectedDatesChange();
      this.elt.emit('pick', {
        type: 'pick',
        value: date,
        isTrusted: event && event.isTrusted,
        originEvent: event,
        selectedDates: this.elt.selectedDates
      }, this.elt);
      if (dateBtn.hasClass('absol-chrome-calendar-not-in-month')) {
        if (parseInt(dateBtn.attr('data-date')) < 15) {
          this.next();
        } else {
          this.prev();
        }
      }
      break;
    }
    dateBtn = dateBtn.parentElement;
  }
};
CCMonthViewer.prototype.ev_mouseEnter = function (event) {
  if (this.isListening) return;
  if (this.elt.level !== 'week') return;
  this.isListening = true;
  if (this.$hoverRow) {
    this.$hoverRow.removeClass('as-hover-in-year').removeClass('as-hover-not-in-year');
    this.$hoverRow = null;
  }
  document.addEventListener('mousemove', this.ev_mouseMove);
};
CCMonthViewer.prototype.ev_mouseMove = function (event) {
  if (!(0, _EventEmitter.hitElement)(this.$month, event)) {
    this.isListening = false;
    document.removeEventListener('mousemove', this.ev_mouseMove);
  }
  var viewDate = this.elt._viewDate;
  var target = event.target;
  var date = null;
  var rowElt;
  if (target.attr) {
    if (target.attr('data-time')) {
      date = new Date(parseInt(target.attr('data-time')));
      date = (0, datetime.beginOfDay)(date);
      rowElt = target.parentElement;
    } else if (target.attr('data-week-idx-text')) {
      rowElt = target;
      date = new Date(parseInt(rowElt.childNodes[0].attr('data-time')));
      if (date.getFullYear() !== viewDate.getFullYear()) {
        date = new Date(viewDate.getFullYear(), 0, 1, 0, 0, 0);
      }
    }
  }
  if (this.$hoverRow && this.$hoverRow !== rowElt) {
    this.$hoverRow.removeClass('as-hover-in-year').removeClass('as-hover-not-in-year');
    this.$hoverRow = null;
  }
  if (!date) return;
  this.$hoverRow = rowElt;
  if (viewDate.getFullYear() !== date.getFullYear()) {
    rowElt.removeClass('as-hover-in-year').addClass('as-hover-not-in-year');
  } else {
    rowElt.removeClass('as-hover-not-in-year').addClass('as-hover-in-year');
  }
};
CCMonthViewer.prototype.onSelectedDatesChange = function () {
  var rowElt, cellElt;
  var i, j;
  var bg;
  var isSelectedRow;
  for (i = 0; i < this.$month.childNodes.length; ++i) {
    rowElt = this.$month.childNodes[i];
    isSelectedRow = false;
    for (j = 0; j < rowElt.childNodes.length; ++j) {
      cellElt = rowElt.childNodes[j];
      bg = new Date(parseInt(cellElt.attr('data-time')));
      if (this.elt.level === 'day' && this.elt.isSelectedDate(bg)) {
        cellElt.addClass('absol-chrome-calendar-selected');
      } else if (this.elt.level === 'week' && this.elt.isSelectedWeek(bg)) {
        cellElt.addClass('absol-chrome-calendar-selected');
        if (!isSelectedRow && bg.getFullYear() === this.elt._viewDate.getFullYear()) {
          isSelectedRow = true;
        }
      } else {
        cellElt.removeClass('absol-chrome-calendar-selected');
      }
    }
    if (isSelectedRow) {
      rowElt.addClass('as-selected');
    } else {
      rowElt.removeClass('as-selected');
    }
  }
};

/**
 * @extends CCViewerAbstract
 * @param {ChromeCalendar}elt
 * @constructor
 */
function CCYearViewer(elt) {
  CCViewerAbstract.call(this, elt);
  this.$years = elt.$years;
  this.$yearScroller = elt.$yearScroller;
  this.$lastOpenYearItem = null;
  this.mouseListening = false;
}
(0, _OOP.mixClass)(CCYearViewer, CCViewerAbstract);
CCYearViewer.prototype.start = function () {
  this.elt.attr('data-view', 'year');
  this.updateContent();
};
CCYearViewer.prototype.updateOpenYear = function () {
  if (this.$lastOpenYearItem) {
    this.$lastOpenYearItem.$months.updateActiveMonth();
  }
};
CCYearViewer.prototype.updateContent = function () {
  var _this5 = this;
  if (!this.$yearsContent) {
    this.$yearsContent = _({
      "class": 'absol-chrome-calendar-years-content',
      child: Array(200).fill(0).map(function (u, i) {
        return {
          "class": 'absol-chrome-calendar-year',
          attr: {
            'data-year': i + 1890
          },
          child: [{
            "class": 'absol-chrome-calendar-year-head',
            child: {
              text: i + 1890 + ''
            }
          }],
          props: {
            __year__: i + 1890
          },
          on: {
            click: function click() {
              _this5.viewYear(i + 1890);
              // thisCal.expandYear(this.__year__);
            },

            mouseenter: _this5.ev_mouseEnter
          }
        };
      })
    });
    this.$years.addChild(this.$yearsContent);
    this.$yearItems = Array.prototype.slice.call(this.$yearsContent.childNodes);
  }
  this.viewYear(this.elt._viewDate.getFullYear());
};
CCYearViewer.prototype.createMonths = function (year) {
  var _this6 = this;
  var now = new Date();
  var shortMonthNames = getCMLText('shortMonthNames');
  var res = _({
    "class": 'absol-chrome-calendar-year-months',
    child: Array(3).fill('').map(function (u, i) {
      return {
        "class": 'absol-chrome-calendar-year-row-months',
        child: Array(4).fill(0).map(function (v, j) {
          var date = new Date(year, i * 4 + j, 1, 0, 0, 0, 0);
          var quarter = Math.floor((i * 4 + j) / 3);
          return {
            "class": ['absol-chrome-calendar-year-month'].concat(year === now.getFullYear() && now.getMonth() === i * 4 + j ? ['absol-chrome-calendar-today'] : []).concat(_this6.elt.isSelectedMonth(date) ? ['absol-chrome-calendar-selected'] : []),
            attr: {
              'data-quarter': quarter + '',
              'data-date': date.getTime() + '',
              'data-month': i * 4 + j + ''
            },
            child: {
              text: shortMonthNames[i * 4 + j]
            },
            on: {
              click: function click() {}
            },
            props: {
              __date__: date,
              __quarter__: quarter
            }
          };
        })
      };
    }),
    on: {
      click: this.ev_clickMonth
    }
  });
  res.$monthList = (0, _ACore.$$)('.absol-chrome-calendar-year-month', res);
  res.updateActiveMonth = function () {
    res.$monthList.forEach(function (e) {
      now = new Date();
      if (datetime.compareMonth(e.__date__, now) === 0) {
        e.addClass('absol-chrome-calendar-today');
      } else {
        e.removeClass('absol-chrome-calendar-today');
      }
      if (_this6.elt.isSelectedMonth(e.__date__)) {
        e.addClass('absol-chrome-calendar-selected');
      } else {
        e.removeClass('absol-chrome-calendar-selected');
      }
      if (_this6.elt.isSelectedQuarter(e.__date__)) {
        e.addClass('as-quarter-selected');
      } else {
        e.removeClass('as-quarter-selected');
      }
      var beginOfMonth = datetime.beginOfMonth(e.__date__);
      var endOfMonth = datetime.prevDate(datetime.nextMonth(e.__date__));
      if (datetime.compareDate(_this6.elt._min, endOfMonth) > 0 || datetime.compareDate(beginOfMonth, _this6.elt._max) > 0) {
        e.addClass('absol-chrome-calendar-date-disabled');
      } else {
        e.removeClass('absol-chrome-calendar-date-disabled');
      }
    });
  };
  return res;
};
CCYearViewer.prototype.viewYear = function (year) {
  var viewDate = this.elt._viewDate;
  if (viewDate.getFullYear() !== year) {
    viewDate = new Date(year, 0, 1, 0, 0, 0, 0);
    this.elt._viewDate = viewDate;
  }

  //todo: update button, title
  var fontSize = this.elt.getFontSize() || 14;
  var lastItemElt = this.$lastOpenYearItem;
  var itemElt = this.$yearItems[year - 1890];
  var lastYear = 100000000;
  if (lastItemElt && lastItemElt.__year__ !== year) {
    lastYear = lastItemElt.__year__;
    lastItemElt.addClass('start-closing');
    setTimeout(function () {
      lastItemElt.removeClass('start-closing').addClass('closing');
    }, 0);
    setTimeout(function () {
      lastItemElt.removeClass('closing');
      lastItemElt.$months.remove();
      lastItemElt.$months = undefined;
    }, 100);
  }
  if (lastItemElt !== itemElt) {
    if (!itemElt.$months) {
      itemElt.$months = this.createMonths(year).addTo(itemElt);
      itemElt.addClass('start-opening');
      setTimeout(function () {
        itemElt.removeClass('start-opening').addClass('opening');
      }, 1);
      setTimeout(function () {
        itemElt.removeClass('opening');
      }, 100);
    }
  }
  var dy = itemElt.getBoundingClientRect().top - this.$yearScroller.getBoundingClientRect().top - fontSize * 0.45;
  if (itemElt.__year__ > lastYear) {
    dy -= 6 * fontSize + 1;
  }
  this.$yearScroller.scrollBy(dy, 100);
  this.$lastOpenYearItem = itemElt;
  itemElt.$months.updateActiveMonth();
  this.elt.headerCtrl.updateTitle();
  this.elt.headerCtrl.updateButtons();
};
CCYearViewer.prototype.stop = function () {};
CCYearViewer.prototype.canNext = function () {
  return this.elt._viewDate.getFullYear() < this.elt._max.getFullYear();
};
CCYearViewer.prototype.canPrev = function () {
  return this.elt._viewDate.getFullYear() > this.elt._min.getFullYear();
};
CCYearViewer.prototype.canViewToday = function () {
  var viewDate = new Date();
  var year = viewDate.getFullYear();
  return year >= this.elt._min.getFullYear() && year <= this.elt._max.getFullYear();
};
CCYearViewer.prototype.prev = function () {
  this.elt._viewDate = new Date(this.elt._viewDate.getFullYear() - 1, 0, 1);
  this.viewYear(this.elt._viewDate.getFullYear());
};
CCYearViewer.prototype.next = function () {
  this.elt._viewDate = new Date(this.elt._viewDate.getFullYear() + 1, 0, 1);
  this.viewYear(this.elt._viewDate.getFullYear());
};
CCYearViewer.prototype.viewToday = function () {
  this.elt._viewDate = new Date();
  this.viewYear(new Date().getFullYear());
};
CCYearViewer.prototype.getTitle = function () {
  var viewDate = this.elt._viewDate;
  return '' + viewDate.getFullYear();
};
CCYearViewer.prototype.onSelectedDatesChange = function () {
  console.log(this.elt.selectedDates);
};
CCYearViewer.prototype.ev_clickMonth = function (event) {
  var monthElt = event.target;
  var date;
  if (monthElt && monthElt.attr) date = monthElt.attr('data-date');
  if (!date) return;
  date = new Date(parseInt(date));
  var level = this.elt.level;
  switch (level) {
    case 'month':
    case 'quarter':
      this.elt._selectedDates = [date];
      this.updateOpenYear();
      this.elt.emit('pick', {
        type: 'pick',
        value: date,
        isTrusted: event && event.isTrusted,
        originEvent: event
      }, this.elt);
      break;
    case 'year':
      break;
    case 'day':
    case 'week':
      this.elt._viewDate = date;
      this.elt.startViewer('month');
      break;
  }
};
CCYearViewer.prototype.ev_mouseEnter = function (event) {
  if (this.mouseListening) return;
  this.mouseListening = true;
  document.addEventListener('mousemove', this.ev_mouseMove);
};
CCYearViewer.prototype.ev_mouseMove = function (event) {
  if (!(0, _EventEmitter.hitElement)(this.$yearsContent, event)) {
    this.mouseListening = false;
    document.removeEventListener('mousemove', this.ev_mouseMove);
    this.$yearsContent.attr('data-hover-quarter', undefined);
    return;
  }
  if (typeof event.target.__quarter__ === "number") {
    if (this.$yearsContent.attr('data-hover-quarter') !== event.target.__quarter__ + '') this.$yearsContent.attr('data-hover-quarter', event.target.__quarter__ + '');
  } else {
    this.$yearsContent.attr('data-hover-quarter', undefined);
  }
};
function CCEraViewer(elt) {
  CCViewerAbstract.call(this, elt);
  this.$era = elt.$era;
  this.$yearScroller = elt.$yearScroller;
  this.$instance = elt.$instance;
  this._lastStartDecade = -1;
  this._decadeScrollTimeout = -1;
  this.scrollIntoDecadeResolve = null;
  this.title = '1980-2089';
  this.$era.on('scroll', this.ev_scroll).on('click', this.ev_click);
}
(0, _OOP.mixClass)(CCEraViewer, CCViewerAbstract);
CCEraViewer.prototype.start = function () {
  this.elt.attr('data-view', 'era');
  this.updateContent();
  this.viewEra(false);
  this.updatePickedYear();
};
CCEraViewer.prototype.canNext = function () {
  var viewDate = this.elt._viewDate;
  var year = viewDate.getFullYear();
  var eraIdx = Math.floor(year / 10);
  var maxEraIdx = Math.floor(this.elt._max.getFullYear() / 10);
  return eraIdx < maxEraIdx;
};
CCEraViewer.prototype.canPrev = function () {
  var viewDate = this.elt._viewDate;
  var year = viewDate.getFullYear();
  var eraIdx = Math.floor(year / 10);
  var minEraIdx = Math.floor(this.elt._min.getFullYear() / 10);
  return eraIdx > minEraIdx;
};
CCEraViewer.prototype.canViewToday = function () {
  var viewDate = this.elt._viewDate;
  var year = viewDate.getFullYear();
  var eraIdx = Math.floor(year / 10);
  var minEraIdx = Math.floor(this.elt._min.getFullYear() / 10);
  var maxEraIdx = Math.floor(this.elt._max.getFullYear() / 10);
  return eraIdx >= minEraIdx && eraIdx <= maxEraIdx;
};
CCEraViewer.prototype.prev = function () {
  this.elt._viewDate = new Date(this.elt._viewDate.getFullYear() - 10, 0, 1);
  this.scrollIntoDecade(Math.floor(this.elt._viewDate.getFullYear() / 10) * 10, true);
};
CCEraViewer.prototype.next = function () {
  this.elt._viewDate = new Date(this.elt._viewDate.getFullYear() + 10, 0, 1);
  this.scrollIntoDecade(Math.floor(this.elt._viewDate.getFullYear() / 10) * 10, true);
};
CCEraViewer.prototype.viewToday = function () {
  this.elt._viewDate = new Date();
  this.scrollIntoDecade(Math.floor(this.elt._viewDate.getFullYear() / 10) * 10, true);
};
CCEraViewer.prototype.updateContent = function () {
  if (this.$era.childNodes.length === 0) {
    var now = new Date();
    var cYear = now.getFullYear();
    var rows = Array(50).fill(0).map(function (u, i) {
      return _({
        "class": 'absol-chrome-calendar-era-row',
        child: Array(4).fill(0).map(function (u1, j) {
          var classList = ['absol-chrome-calendar-era-year'];
          var year = 1890 + i * 4 + j;
          if (cYear === year) {
            classList.push('absol-chrome-calendar-today');
          }
          return {
            "class": classList,
            child: {
              text: year + ''
            },
            props: {
              __year__: year
            }
          };
        })
      });
    });
    this.$era.addChild(rows);
  }
  this.updateDisabledYearInEra();
};
CCEraViewer.prototype.viewEra = function (animation) {
  this.elt.removeClass('view-month').removeClass('view-year').addClass('view-era');
  this.scrollIntoDecade(Math.floor(this.elt._viewDate.getFullYear() / 10) * 10, animation);
};
CCEraViewer.prototype.getTitle = function () {
  return this.title;
};
CCEraViewer.prototype.updatePickedYear = function () {
  var _this7 = this;
  var yearElt;
  while (this.$lastPickYears && this.$lastPickYears.length > 0) {
    yearElt = this.$lastPickYears.pop();
    yearElt.removeClass('absol-chrome-calendar-selected');
  }
  this.$lastPickYears = this.elt._selectedDates.map(function (date) {
    var yearElt = _this7.yearInEra(date.getFullYear());
    yearElt.addClass('absol-chrome-calendar-selected');
    return yearElt;
  });
};
CCEraViewer.prototype.updateDisabledYearInEra = function () {
  var i, j;
  var rowElt, cellElt, date;
  for (i = 0; i < this.$era.childNodes.length; ++i) {
    rowElt = this.$era.childNodes[i];
    for (j = 0; j < rowElt.childNodes.length; ++j) {
      cellElt = rowElt.childNodes[j];
      date = new Date(cellElt.__year__, 0, 1);
      if (this.elt.yearCmpLimit(date) === 0) {
        cellElt.removeClass('absol-chrome-calendar-date-disabled');
      } else {
        cellElt.addClass('absol-chrome-calendar-date-disabled');
      }
    }
  }
};
CCEraViewer.prototype.scrollIntoDecade = function (startYear, animation) {
  var _this8 = this;
  if (!this.elt.isDescendantOf(document.body)) {
    return this;
  }
  return new Promise(function (resolve) {
    var eraBound = _this8.$era.getBoundingClientRect();
    var rowIdx = Math.floor((startYear - 1890) / 4);
    if (_this8._decadeScrollTimeout > 0) {
      clearTimeout(_this8._decadeScrollTimeout);
      _this8._decadeScrollTimeout = -1;
    }
    if (_this8.scrollIntoDecadeResolve) {
      _this8.scrollIntoDecadeResolve();
      _this8.scrollIntoDecadeResolve = null;
    }
    _this8.scrollIntoDecadeResolve = resolve;
    var t0 = new Date().getTime();
    var t1 = t0 + 250;
    var y0 = _this8.$era.scrollTop;
    var y1 = rowIdx * eraBound.height / 4;
    var _tick;
    if (animation) {
      _tick = function tick() {
        var tc = new Date().getTime();
        var yc = Math.min(1, Math.pow((tc - t0) / (t1 - t0), 2)) * (y1 - y0) + y0;
        _this8.$era.scrollTop = yc;
        if (tc < t1) {
          _this8._decadeScrollTimeout = setTimeout(_tick, 1000 / 30);
        } else {
          _this8._decadeScrollTimeout = -1;
          _this8.scrollIntoDecadeResolve = null;
          resolve();
        }
      };
      _this8._decadeScrollTimeout = setTimeout(_tick, 100);
    } else {
      _this8.$era.scrollTop = y1;
    }
  });
};
CCEraViewer.prototype.updateYearInEra = function () {
  var eraBound = this.$era.getBoundingClientRect();
  var startYear = 1890 + 4 * Math.ceil((this.$era.scrollTop - eraBound.height / 16) * 4 / eraBound.height);
  var startDecade = Math.floor(startYear / 10) * 10;
  if (startDecade + 10 - startYear < 8) startDecade += 10;
  if (this._lastStartDecade !== startDecade) {
    if (this._lastStartDecade > 0) {
      this.clearYearInEra(this._lastStartDecade);
    }
    this._lastStartDecade = startDecade;
    this.activeYearInEra(startDecade);
    this.title = startDecade + '-' + (startDecade + 10);
    if (this.elt._level === 'year') {
      //todo
      if (!this._decadeScrollTimeout || this._decadeScrollTimeout < 0) {
        if (this.elt.yearCmpLimit(new Date(startDecade, 0, 1)) === 0) this.elt._viewDate = new Date(startDecade, 0, 1);
      }
    }
    this.elt.headerCtrl.updateTitle();
    this.elt.headerCtrl.updateButtons();
  }
};
CCEraViewer.prototype.clearYearInEra = function (startYear) {
  var cellElt;
  for (var i = 0; i < 10; ++i) {
    cellElt = this.yearInEra(startYear + i);
    if (cellElt) cellElt.removeClass('absol-chrome-calendar-in-decade');
  }
};
CCEraViewer.prototype.yearInEra = function (year) {
  var d = year - 1890;
  var rowIdx = Math.floor(d / 4);
  var colIdx = d % 4;
  return this.$era.childNodes[rowIdx] && this.$era.childNodes[rowIdx].childNodes[colIdx];
};
CCEraViewer.prototype.activeYearInEra = function (startYear) {
  var cellElt;
  for (var i = 0; i < 10; ++i) {
    cellElt = this.yearInEra(startYear + i);
    if (cellElt) cellElt.addClass('absol-chrome-calendar-in-decade');
  }
};
CCEraViewer.prototype.ev_scroll = function (event) {
  this.updateYearInEra();
};
CCEraViewer.prototype.ev_click = function (event) {
  var yearElt = event.target;
  var year = yearElt.__year__;
  if (typeof year !== "number") return;
  var date = new Date(year, 0, 1, 0, 0, 0, 0);
  if (this.elt.level === 'year') {
    this.elt._selectedDates = [date];
    this.updatePickedYear();
    this.scrollIntoDecade(Math.floor(year / 10) * 10, true);
    this.elt.emit('pick', {
      type: 'pick',
      value: date,
      isTrusted: event && event.isTrusted,
      originEvent: event
    });
  } else {
    this.elt._viewDate = date;
    this.elt.startViewer('year');
  }
};

/**
 *
 * @param {ChromeCalendar} elt
 * @constructor
 */
function CCHeaderController(elt) {
  this.elt = elt;
  this.$prevBtn = elt.$prevBtn;
  this.$nextBtn = elt.$nextBtn;
  this.$todayBtn = elt.$todayBtn;
  this.$titleTime = elt.$titleTime;
  this.$title = elt.$title;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.$prevBtn.on('click', this.ev_clickPrev);
  this.$nextBtn.on('click', this.ev_clickNext);
  this.$todayBtn.on('click', this.ev_clickToday);
  this.$title.on('click', this.ev_clickTitle);
}
CCHeaderController.prototype.updateTitle = function () {
  this.$titleTime.innerHTML = this.elt.viewer.getTitle();
};
CCHeaderController.prototype.updateButtons = function () {
  this.$prevBtn.disabled = !this.elt.viewer.canPrev();
  this.$nextBtn.disabled = !this.elt.viewer.canNext();
  this.$todayBtn.disabled = !this.elt.viewer.canViewToday();
};
CCHeaderController.prototype.ev_clickPrev = function () {
  this.elt.viewer.prev();
};
CCHeaderController.prototype.ev_clickNext = function () {
  this.elt.viewer.next();
};
CCHeaderController.prototype.ev_clickToday = function () {
  this.elt.viewer.viewToday();
};
CCHeaderController.prototype.ev_clickTitle = function () {
  var curViewer = this.elt.viewer;
  curViewer.stop();
  if (curViewer === this.elt.viewers.month) {
    this.elt.startViewer('year');
  } else if (curViewer === this.elt.viewers.year) {
    this.elt.startViewer('era');
  }
};

/**
 *
 * @param {AElement|HTMLElement} element
 * @param calendarProps
 * @param anchor
 * @param {function} calendarPickListener
 * @param {boolean=} darkTheme
 * @returns {CCShareDropDownInstance}
 */
ChromeCalendar.showWhenClick = function (element, calendarProps, anchor, calendarPickListener, darkTheme) {
  var opt = {
    props: calendarProps,
    anchor: anchor,
    onPick: calendarPickListener,
    darkTheme: darkTheme,
    triggerElt: element
  };
  return new CCShareDropDownInstance(element, opt);
};
ChromeCalendar.show = function (element, calendarProps, anchor, calendarPickListener, darkTheme) {
  var opt = {
    props: calendarProps,
    anchor: anchor,
    onPick: calendarPickListener,
    darkTheme: darkTheme
  };
  var instance = new CCShareDropDownInstance(element, opt);
  return instance.id;
};
ChromeCalendar.close = function (session) {
  var share = CCShareDropDownInstance.prototype.share;
  var instance = share.instances[session];
  if (instance) {
    instance.close();
    if (!instance.opt.triggerElt) instance.remove();
  }
};
var _default = ChromeCalendar;
/**
 *
 * @param {AElement} elt
 * @param {{props?:object, anchor?: number[], onPick?: function, darkTheme?: boolean, triggerElt?:AElement }} opt
 * @constructor
 */
exports["default"] = _default;
function CCShareDropDownInstance(elt, opt) {
  this.id = Math.random() * 10000000000 >> 0;
  this.elt = elt;
  this.opt = Object.assign({}, opt);
  this.ev_clickOut = this.ev_clickOut.bind(this);
  this.ev_click = this.ev_click.bind(this);
  if (this.opt.triggerElt) {
    this.opt.triggerElt.on('click', this.ev_click);
  }
  this.share.instances[this.id] = this;
}
CCShareDropDownInstance.prototype.share = {
  $follower: null,
  $picker: null,
  session: null,
  onPick: null,
  holder: null,
  instances: {}
};
CCShareDropDownInstance.prototype.prepare = function () {
  var _this9 = this;
  var share = this.share;
  if (share.$follower) return;
  /**
   *
   * @type {Follower|AElement}
   */
  share.$follower = _({
    tag: _Follower["default"]
  });
  share.$follower.cancelWaiting();
  share.$picker = _({
    tag: ChromeCalendar,
    on: {
      pick: function pick(event) {
        if (typeof share.onPick === "function") share.onPick(event.value, event, _this9);
      }
    }
  }).addTo(share.$follower);
  share.session = Math.random() * 10000000000 >> 0;
  share.onPick = null;
};

/**
 *

 */
CCShareDropDownInstance.prototype.show = function () {
  var _this10 = this;
  this.prepare();
  var share = this.share;
  if (share.holder) share.holder.close();
  share.holder = this;
  var props = this.opt.props;
  if (props instanceof Date) props = {
    selectedDates: [props]
  };
  if (props instanceof Array) props = {
    selectedDates: props
  };
  props.maxDateLimit = props.maxDateLimit || null;
  props.minDateLimit = props.minDateLimit || null;
  share.$follower.addTo(document.body);
  Object.assign(share.$picker, props);
  share.$follower.addStyle('visibility', 'hidden');
  if (this.opt.darkTheme) {
    share.$picker.addClass('dark');
  } else {
    share.$picker.removeClass('dark');
  }
  if (this.opt.triggerElt) {
    setTimeout(function () {
      document.addEventListener('click', _this10.ev_clickOut, false);
    }, 30);
  }
  share.$follower.sponsorElement = this.opt.triggerElt || this.elt;
  share.$follower.anchor = this.opt.anchor;
  share.$follower.followTarget = this.elt;
  share.$follower.updatePosition();
  share.onPick = function () {
    var value = share.$picker.selectedDates[0];
    if (value && _this10.opt.onPick) {
      _this10.opt.onPick(value);
      if (_this10.opt.triggerElt) {
        _this10.close();
      }
    }
  };
  setTimeout(function () {
    if (share.holder === _this10) {
      share.$follower.removeStyle('visibility', 'hidden');
    }
  }, 10);
};
CCShareDropDownInstance.prototype.close = function () {
  var share = this.share;
  if (!share.$follower) return;
  if (share.holder !== this) return;
  share.holder = null;
  if (this.opt.triggerElt) {
    document.removeEventListener('click', this.ev_clickOut, false);
  }
  share.onPick = null;
  share.$follower.selfRemove();
};

/**
 *
 * @param {Date} value
 */
CCShareDropDownInstance.prototype.setDateValue = function (value) {
  var share = this.share;
  if (share.holder === this) {
    share.$picker.selectedDates = [value];
  }
};
CCShareDropDownInstance.prototype.cancel = function () {
  this.close();
};
CCShareDropDownInstance.prototype.remove = function () {
  this.close();
  if (this.opt.triggerElt) {
    this.opt.triggerElt.removeEventListener('click', this.ev_click);
  }
  delete this.share.instances[this.id];
};
CCShareDropDownInstance.prototype.ev_clickOut = function (event) {
  if (!(0, _EventEmitter.hitElement)(this.elt, event)) this.close();
};
CCShareDropDownInstance.prototype.ev_click = function (event) {
  this.show();
};

/***/ }),

/***/ 2273:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(27442);
__webpack_require__(33573);
var _datetime = __webpack_require__(58286);
var _utils = __webpack_require__(84512);
var _int = __webpack_require__(65909);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _EventEmitter = __webpack_require__(46833);
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 *
 * @param {number} leftOffset
 */
function calcMinHMTime(leftOffset) {
  var h = Math.floor(leftOffset / _datetime.MILLIS_PER_HOUR);
  var m = Math.floor(leftOffset / _datetime.MILLIS_PER_MINUTE) % 60;
  if (leftOffset % _datetime.MILLIS_PER_MINUTE > 0) {
    if (m === 59) {
      h++;
      m = 0;
    } else {
      m++;
    }
  }
  var offset = h * _datetime.MILLIS_PER_HOUR + m * _datetime.MILLIS_PER_MINUTE;
  return {
    m: m,
    h: h,
    offset: offset
  };
}

/***
 * @extends AElement
 * @constructor
 */
function ChromeTime24Picker() {
  var tText = "24 ".concat(_LanguageSystem["default"].getText('txt_next_day') || 'Next day', ")");
  this.addStyle('--next-day-h24-width', Math.ceil((0, _utils.measureText)(tText, '16px arial').width + 15) + 'px');
  this.$lists = (0, _ACore.$$)('.as-chrome-time-picker-list', this);
  this.$scrollers = (0, _ACore.$$)('.as-chrome-time-picker-scroller', this);
  this.minuteController = new CTPMinuteListController(this);
  this.hourController = new CTPHourListController(this);
  this._dayOffset = 0;
  this._value = 0;

  /**
   * @name dayOffset
   * @type {number}
   * @memberOf ChromeTime24Picker#
   */

  /**
   * @name value
   * @type {number | null}
   * @memberOf ChromeTime24Picker#
   */
}

ChromeTime24Picker.tag = 'ChromeTime24Picker'.toLowerCase();
ChromeTime24Picker.render = function () {
  return (0, _ACore._)({
    extendEvent: 'change',
    "class": ['as-chrome-time-24-picker', 'as-chrome-time-picker'],
    child: [{
      "class": ['as-chrome-time-picker-scroller', 'as-chrome-time-24-picker-hour', 'as-chrome-time-picker-infinity-scroller'],
      child: [{
        tag: 'button',
        "class": 'as-chrome-time-picker-scroller-up',
        child: 'span.mdi.mdi-chevron-up'
      }, {
        tag: 'button',
        "class": 'as-chrome-time-picker-scroller-down',
        child: 'span.mdi.mdi-chevron-down'
      }, {
        "class": ['as-chrome-time-picker-infinity-viewport', 'as-chrome-time-picker-h24', 'as-chrome-time-picker-list'],
        child: Array(25).fill(0).map(function (u, i) {
          return {
            tag: 'button',
            "class": 'as-chrome-time-picker-btn',
            child: [{
              tag: 'span',
              child: {
                text: i + ''
              }
            }, {
              tag: 'span',
              "class": 'as-chrome-time-24-picker-tomorrow-text',
              child: {
                text: " (".concat(_LanguageSystem["default"].getText('txt_next_day') || 'Next day', ")")
              }
            }],
            props: {
              __hour__: i
            }
          };
        })
      }]
    }, {
      "class": ['as-chrome-time-picker-scroller', 'as-chrome-time-picker-infinity-scroller'],
      child: [{
        tag: 'button',
        "class": 'as-chrome-time-picker-scroller-up',
        child: 'span.mdi.mdi-chevron-up'
      }, {
        tag: 'button',
        "class": 'as-chrome-time-picker-scroller-down',
        child: 'span.mdi.mdi-chevron-down'
      }, {
        "class": ['as-chrome-time-picker-infinity-viewport', 'as-chrome-time-picker-m60', 'as-chrome-time-picker-list'],
        child: Array(60).fill(0).map(function (u, i) {
          return {
            tag: 'button',
            "class": 'as-chrome-time-picker-btn',
            child: {
              tag: 'span',
              child: {
                text: i + ''
              }
            },
            props: {
              __min__: i
            }
          };
        })
      }]
    }]
  });
};
ChromeTime24Picker.prototype.updateViewByValue = function () {
  var offset = this.dayOffset;
  var offsetMH = calcMinHMTime(offset);
  var value = this.value;
  this.hourController.hourOffset = offsetMH.h;
  var valueMH;
  if ((0, _utils.isRealNumber)(value)) {
    valueMH = calcMinHMTime(offset + value);
    this.hourController.hour = valueMH.h;
    if (valueMH.h === offsetMH.h) {
      this.minuteController.activeItem(offsetMH.m, Infinity);
    } else if (valueMH.h === offsetMH.h + 24) {
      this.minuteController.activeItem(Infinity, offsetMH.m + 1);
    }
    this.minuteController.minute = valueMH.m;
  } else {
    this.hourController.hour = null;
    this.minuteController.minute = null;
  }
};
ChromeTime24Picker.prototype.scrollIntoSelected = function () {
  this.hourController.scrollIntoSelected(true);
  this.minuteController.scrollIntoSelected(true);
};
ChromeTime24Picker.prototype.flushViewToValue = function () {
  var hour = this.hourController.hour;
  var minute = this.minuteController.minute;
  var endMil, newValue;
  if ((0, _utils.isRealNumber)(hour) && (0, _utils.isRealNumber)(minute)) {
    endMil = hour * _datetime.MILLIS_PER_HOUR + minute * _datetime.MILLIS_PER_MINUTE;
    newValue = endMil - this.dayOffset;
    if (newValue !== this._value) {
      this._value = newValue;
      this.notifyChange();
    }
  }
};
ChromeTime24Picker.prototype.notifyChange = function () {
  this.emit('change', {
    type: 'change'
  }, this);
};
ChromeTime24Picker.property = {};
ChromeTime24Picker.property.dayOffset = {
  /***
   * @this ChromeTime24Picker
   * @param {number|Date} value
   */
  set: function set(value) {
    if (value instanceof Date) {
      value = value.getTime() - (0, _datetime.beginOfDay)(value).getTime();
    }
    if ((0, _utils.isRealNumber)(value)) {
      value = Math.round(value);
      value = value % _datetime.MILLIS_PER_DAY;
      if (value < 0) value += _datetime.MILLIS_PER_DAY;
    } else {
      value = 0;
    }
    this._dayOffset = calcMinHMTime(value).offset; //round to minute
    this.updateViewByValue();
  },
  /**
   * @this ChromeTime24Picker
   * @returns {number|*}
   */
  get: function get() {
    return this._dayOffset;
  }
};
ChromeTime24Picker.property.value = {
  /***
   * @this ChromeTime24Picker
   * @param value
   */
  set: function set(value) {
    if ((0, _utils.isRealNumber)(value)) {
      value = Math.min(_datetime.MILLIS_PER_DAY, Math.max(0, Math.round(value)));
      value = calcMinHMTime(value).offset;
    } else {
      value = null;
    }
    this._value = value;
    this.updateViewByValue();
  },
  /**
   * @this ChromeTime24Picker
   * @returns {number|*}
   */
  get: function get() {
    return this._value;
  }
};
ChromeTime24Picker.property.hour = {
  get: function get() {
    return Math.floor((this.dayOffset + this.value) / _datetime.MILLIS_PER_HOUR);
  }
};
ChromeTime24Picker.property.minute = {
  get: function get() {
    return Math.floor((this.dayOffset + this.value) / _datetime.MILLIS_PER_MINUTE) % 60;
  }
};
_ACore["default"].install(ChromeTime24Picker);
var _default = ChromeTime24Picker;
exports["default"] = _default;
function CTPHourListController(elt) {
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.elt = elt;
  this.hourScroller = new CTPInfinityVerticalScroller(this.elt.$scrollers[0]);
  this.$list = (0, _ACore.$)('.as-chrome-time-picker-h24.as-chrome-time-picker-list', elt);
  this.$items = Array.prototype.slice.call(this.$list.childNodes);
  this.$list.on('click', this.ev_clickList);
  this._offset = 0;
  this.selectedValue = null;
  this.$selectedItem = null;
  this.itemLength = this.$items.length;
  /**
   * @type {number}
   * @name hour - from 0 to 23, 24... is next day
   * @memberOf CTPHourListController
   */
}

Object.defineProperty(CTPHourListController.prototype, 'hourOffset', {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) value = 0;
    value = Math.round(value);
    value = value % 24;
    if (value < 0) value += 24;
    this._offset = value;
    for (var i = 0; i < this.$items.length; ++i) {
      this.$items[i].firstChild.firstChild.data = (i + value) % 24;
      this.$items[i].__hour__ = i + value;
      if (value + i >= 24) {
        this.$items[i].addClass('as-in-tomorrow');
      } else {
        this.$items[i].removeClass('as-in-tomorrow');
      }
    }
    this.updateSelected();
  },
  get: function get() {
    return this._offset;
  }
});
CTPHourListController.prototype.updateSelected = function () {
  if (this.$selectedItem) {
    this.$selectedItem.removeClass('as-selected');
  }
  if ((0, _utils.isRealNumber)(this.selectedValue)) {
    this.$selectedItem = this.$items[this.selectedValue - this._offset];
  } else {
    this.$selectedItem = null;
  }
  if (this.$selectedItem) {
    this.$selectedItem.addClass('as-selected');
  }
};
CTPHourListController.prototype.ev_clickList = function (event) {
  this.hour = this.itemValueOf(event.target);
  this.scrollIntoSelected(false);
  var offsetMH = calcMinHMTime(this.elt.dayOffset);
  if (this.hour === offsetMH.h) {
    this.elt.minuteController.activeItem(offsetMH.m, Infinity);
    if (!(0, _utils.isRealNumber)(this.elt.minuteController.minute) || this.elt.minuteController.minute < offsetMH.m) {
      this.elt.minuteController.minute = offsetMH.m;
      this.elt.minuteController.scrollIntoSelected(true);
    }
  } else if (this.hour === offsetMH.h + 24) {
    this.elt.minuteController.activeItem(Infinity, offsetMH.m + 1);
    if (!(0, _utils.isRealNumber)(this.elt.minuteController.minute) || this.elt.minuteController.minute > offsetMH.m) {
      this.elt.minuteController.minute = offsetMH.m;
      this.elt.minuteController.scrollIntoSelected(true);
    }
  } else {
    if (!(0, _utils.isRealNumber)(this.elt.minuteController.minute)) {
      this.elt.minuteController.minute = 0;
      this.elt.minuteController.scrollIntoSelected(true);
    }
    this.elt.minuteController.activeItem(Infinity, Infinity);
  }
  this.elt.flushViewToValue();
};
CTPHourListController.prototype.scrollIntoSelected = function (onTop) {
  if (this.selectedValue == null) return;
  var curOffset = this.hourScroller.offset;
  var targetOffset = this.selectedValue - this.hourOffset;
  var k,
    minCost = Infinity;
  var cost;
  var t;
  for (k = -2; k <= 2; ++k) {
    t = this.selectedValue - this.hourOffset + k * this.itemLength;
    if (t >= curOffset && t <= curOffset + 3 && !onTop) {
      minCost = 0;
      targetOffset = curOffset;
    } else {
      cost = Math.abs(t - curOffset);
      if (cost < minCost) {
        minCost = cost;
        targetOffset = t;
      }
      cost = Math.abs(t - curOffset - 3);
      if (cost < minCost && !onTop) {
        minCost = cost;
        targetOffset = t - 3;
      }
    }
  }
  this.hourScroller.makeAnimation(targetOffset, 200);
};
CTPHourListController.prototype.itemValueOf = function (itemElt) {
  while (itemElt) {
    if (itemElt.hasClass && itemElt.hasClass('as-chrome-time-picker-btn')) break;
    itemElt = itemElt.parentElement;
  }
  if (!itemElt) return undefined;
  return itemElt.__hour__;
};
Object.defineProperty(CTPHourListController.prototype, 'hour', {
  set: function set(value) {
    if ((0, _utils.isRealNumber)(value)) {
      value = Math.round(value);
    } else {
      value = null;
    }
    this.selectedValue = value;
    this.updateSelected();
  },
  get: function get() {
    return this.selectedValue;
  }
});
function CTPInfinityVerticalScroller(elt) {
  this.elt = elt;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.$upBtn = (0, _ACore.$)('.as-chrome-time-picker-scroller-up', this.elt).on('pointerdown', this.ev_pressUpBtn);
  this.$downBtn = (0, _ACore.$)('.as-chrome-time-picker-scroller-down', this.elt).on('pointerdown', this.ev_pressDownBtn);
  this.$upBtn.addEventListener('contextmenu', function (event) {
    event.preventDefault();
  }, _BrowserDetector["default"].supportPassiveEvent ? {
    passive: false
  } : true);
  this.$downBtn.addEventListener('contextmenu', function (event) {
    event.preventDefault();
  }, _BrowserDetector["default"].supportPassiveEvent ? {
    passive: false
  } : true);
  this.$viewport = (0, _ACore.$)('.as-chrome-time-picker-infinity-viewport', this.elt);
  this.offset = 0;
  this.buttonHeight = 28; //2em
  this.elt.addEventListener('wheel', this.ev_wheel);
  this.$items = (0, _ACore.$$)('.as-chrome-time-picker-btn', this.$viewport);
  this.updateItemPosition();
  this.$viewport.addEventListener('touchstart', this.ev_touchStart, _BrowserDetector["default"].supportPassiveEvent ? {
    passive: false
  } : true);

  /**
   *
   * @type {null|{startTime: number, endTime: number, startValue: number, endValue: number, type: string}}
   */
  this.animation = null;
  this.touchInfo = {};
}
CTPInfinityVerticalScroller.prototype.ev_touchStart = function (event) {
  var evFlag = _BrowserDetector["default"].supportPassiveEvent ? {
    passive: false
  } : true;
  document.addEventListener('touchmove', this.ev_touchMove, evFlag);
  document.addEventListener('touchend', this.ev_touchEnd, evFlag);
  var touch = event.changedTouches[0];
  var now = Date.now();
  this.touchInfo.prevY = touch.clientY;
  this.touchInfo.prevTime = now;
  this.touchInfo.target = touch.target;
  this.touchInfo.identifier = touch.identifier;
  this.touchInfo.state = 0; //init
  this.touchInfo.checkPoints = [{
    time: now,
    y: touch.clientY
  }];
  event.preventDefault();
};
CTPInfinityVerticalScroller.prototype.ev_touchMove = function (event) {
  var touch = (0, _EventEmitter.findChangedTouchByIdent)(event, this.touchInfo.identifier);
  if (!touch) return;
  var dy = touch.clientY - this.touchInfo.prevY;
  var now = Date.now();
  if (this.touchInfo.state === 0) {
    if (Math.abs(dy) > 2) {
      this.touchInfo.state = 1;
    }
  }
  if (this.touchInfo.state === 1) {
    this.makeAnimation(this.offset - dy / this.buttonHeight, 0);
    this.touchInfo.prevY = touch.clientY;
    this.touchInfo.prevTime = now;
    this.touchInfo.checkPoints.push({
      time: now,
      y: touch.clientY
    });
  }
  event.preventDefault();
};

/**
 *
 * @returns {number} - offset/s
 */
CTPInfinityVerticalScroller.prototype.getTouchSped = function () {
  var checkPoints = this.touchInfo.checkPoints;
  if (checkPoints.length < 2) return 0;
  var minTime = 100;
  var lastTime = checkPoints[checkPoints.length - 1].time;
  var dy;
  var dt;
  for (var i = checkPoints.length - 2; i >= 0; --i) {
    dy = checkPoints[i].y - checkPoints[checkPoints.length - 1].y;
    dt = checkPoints[i].time - checkPoints[checkPoints.length - 1].time;
    if (lastTime - checkPoints[i].time > minTime) break;
  }
  if (dy === 0) return 0;
  return dy / this.buttonHeight / (dt / 1000);
};
CTPInfinityVerticalScroller.prototype.ev_touchEnd = function (event) {
  var touch = (0, _EventEmitter.findChangedTouchByIdent)(event, this.touchInfo.identifier);
  if (!touch) return;
  var evFlag = _BrowserDetector["default"].supportPassiveEvent ? {
    passive: false
  } : true;
  document.removeEventListener('touchmove', this.ev_touchMove, evFlag);
  document.removeEventListener('touchend', this.ev_touchEnd, evFlag);
  var speed = 0,
    acc = 10;
  var target;
  if (this.touchInfo.state === 1) {
    speed = this.getTouchSped();
    this.makeAnimation(this.offset - speed * Math.abs(speed) / acc / 2, Math.abs(speed) / acc * 1000, 'pow2');
  } else {
    target = this.touchInfo.target;
    var now = Date.now();
    while (target && target !== this.elt) {
      if (target.isSupportedEvent && target.isSupportedEvent('press')) {
        if (!target.lastPressTime || now - target.lastPressTime > 300) {
          target.emit('press', {
            target: this.touchInfo.target
          });
          target.lastPressTime = now;
        }
      }
      target = target.parentElement;
    }
  }
};
CTPInfinityVerticalScroller.prototype.ev_pressUpBtn = function (event) {
  this.makeAnimation(this.offset - 250, 25e3, 'linear');
  document.addEventListener('pointerup', this.ev_ReleaseUpDownBtn);
  event.preventDefault();
};
CTPInfinityVerticalScroller.prototype.ev_pressDownBtn = function (event) {
  this.makeAnimation(this.offset + 250, 25 * 1000, 'linear');
  document.addEventListener('pointerup', this.ev_ReleaseUpDownBtn);
  event.preventDefault();
};
CTPInfinityVerticalScroller.prototype.ev_ReleaseUpDownBtn = function (event) {
  this.makeAnimation(this.offset, 0);
  event.preventDefault();
};
CTPInfinityVerticalScroller.prototype.updateItemPosition = function () {
  var _this = this;
  while (this.offset < 0) {
    this.offset += this.$items.length;
  }
  while (this.offset >= this.$items.length) {
    this.offset -= this.$items.length;
  }
  var offset = this.offset;
  this.$items.forEach(function (itemElt, i) {
    var k = i - offset;
    if (k < -_this.$items.length / 2) k += _this.$items.length;
    itemElt.addStyle('top', k * 2 + 'em');
  });
};
CTPInfinityVerticalScroller.prototype.ev_wheel = function (event) {
  event.preventDefault();
  var delta = event.deltaY;
  this.makeAnimation(this.offset + delta / this.buttonHeight, 200);
};
CTPInfinityVerticalScroller.prototype.makeAnimation = function (value, inTime, type) {
  if (inTime <= 0) {
    this.offset = value;
    this.updateItemPosition();
    this.animation = null;
    return;
  }
  var isNewAnimation = !this.animation;
  this.animation = {
    startTime: Date.now(),
    endTime: Date.now() + inTime,
    startValue: this.offset,
    endValue: value,
    type: type || 'linear'
  };
  if (isNewAnimation) {
    requestAnimationFrame(this.ev_animationFrame);
  }
};
CTPInfinityVerticalScroller.prototype.ev_animationFrame = function () {
  if (!this.animation) return;
  function easeInOutCubic(t) {
    return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;
  }
  var now = Date.now();
  var t = (0, _int.map)(Math.min(this.animation.endTime, now), this.animation.startTime, this.animation.endTime, 0, 1);
  if (this.animation.type === 'easeIn') {
    t = easeInOutCubic(t / 2);
  } else if (this.animation.type === 'easeOut') {
    t = easeInOutCubic(0.5 + t / 2);
  } else if (this.animation.type === 'pow2') {
    t = Math.sqrt(t);
  }
  this.offset = (0, _int.map)(t, 0, 1, this.animation.startValue, this.animation.endValue);
  this.updateItemPosition();
  if (now >= this.animation.endTime) {
    this.animation = null;
  } else {
    requestAnimationFrame(this.ev_animationFrame);
  }
};

/**
 * @param {ChromeTime24Picker} elt
 * @param elt
 * @constructor
 */
function CTPMinuteListController(elt) {
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.elt = elt;
  this.minuteScroller = new CTPInfinityVerticalScroller(this.elt.$scrollers[1]);
  this.$list = (0, _ACore.$)('.as-chrome-time-picker-m60', this.elt);
  this.$list.defineEvent('press');
  this.$list.addEventListener('click', function (event) {
    var now = Date.now();
    if (!this.lastPressTime || now - this.lastPressTime > 50) {
      this.emit('press', {
        target: event.target
      });
      this.lastPressTime = now;
    }
  }, true);
  this.$list.on('press', this.ev_clickList);
  this.$items = Array.prototype.slice.call(this.$list.childNodes);
  this.selectedValue = null;
  this.itemLength = this.$items.length;
}

/**
 *
 * @param start
 * @param end - end not include
 */
CTPMinuteListController.prototype.activeItem = function (start, end) {
  if (!(0, _utils.isNaturalNumber)(start)) start = 0;
  if (!(0, _utils.isNaturalNumber)(end)) end = this.$list.children.length;
  for (var i = 0; i < this.$list.children.length; ++i) {
    this.$list.children[i].disabled = i < start || i >= end;
  }
};
CTPMinuteListController.prototype.ev_clickList = function (event) {
  var value = this.itemValueOf(event.target);
  if ((0, _utils.isNaturalNumber)(value)) {
    this.minute = value;
    this.scrollIntoSelected(false);
    this.elt.flushViewToValue();
  }
};
CTPMinuteListController.prototype.itemValueOf = function (itemElt) {
  while (itemElt) {
    if (itemElt.hasClass && itemElt.hasClass('as-chrome-time-picker-btn')) break;
    itemElt = itemElt.parentElement;
  }
  if (!itemElt) return undefined;
  return itemElt.__min__;
};
CTPMinuteListController.prototype.scrollIntoSelected = function (onTop) {
  if (this.selectedValue == null) return;
  var curOffset = this.minuteScroller.offset;
  var targetOffset = this.selectedValue;
  var k,
    minCost = Infinity;
  var cost;
  var t;
  for (k = -2; k <= 2; ++k) {
    t = this.selectedValue + k * this.itemLength;
    if (t >= curOffset && t <= curOffset + 3 && !onTop) {
      minCost = 0;
      targetOffset = curOffset;
    } else {
      cost = Math.abs(t - curOffset);
      if (cost < minCost) {
        minCost = cost;
        targetOffset = t;
      }
      cost = Math.abs(t - curOffset - 3);
      if (cost < minCost && !onTop) {
        minCost = cost;
        targetOffset = t - 3;
      }
    }
  }
  this.minuteScroller.makeAnimation(targetOffset, 200);
};
Object.defineProperty(CTPMinuteListController.prototype, 'minute', {
  set: function set(value) {
    if ((0, _utils.isRealNumber)(value)) {
      value = Math.max(0, Math.min(59, Math.round(value)));
    } else {
      value = null;
    }
    if (value !== this.selectedValue) {
      if (this.$items[this.selectedValue]) {
        this.$items[this.selectedValue].removeClass('as-selected');
      }
    }
    this.selectedValue = value;
    if (this.$items[value]) {
      this.$items[value].addClass('as-selected');
    }
  },
  get: function get() {
    return this.selectedValue;
  }
});

/***/ }),

/***/ 11564:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(27442);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _datetime = __webpack_require__(58286);
var _utils = __webpack_require__(84512);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function ChromeTimePicker() {
  this._hour = null;
  this._minute = null;
  _OOP["default"].drillProperty(this, this, 'dayOffset', 'value');
  this.$lists = (0, _ACore.$$)('.as-chrome-time-picker-list', this);
  this.$hourList = this.$lists[0];
  this.$hourList.on('scroll', this.eventHandler.hourScroll).on('click', this.eventHandler.clickHourList);
  this.$hour24List = this.$lists[1];
  this.$hour24List.on('scroll', this.eventHandler.hour24Scroll).on('click', this.eventHandler.clickHour24List);
  this.$minList = this.$lists[2];
  this.$minList.on('scroll', this.eventHandler.minScroll).on('click', this.eventHandler.clickMinList);
  this.$attachhook = (0, _ACore._)('attachhook').addTo(this);
  this.domSignal = new _DomSignal["default"](this.$attachhook).on('request_scroll_into_selected', this._scrollIntoSelected.bind(this));
  this.$amBtn = (0, _ACore.$)('.as-chrome-time-picker-btn[data-value="AM"]', this).on('click', this.eventHandler.clickAM);
  this.$pmBtn = (0, _ACore.$)('.as-chrome-time-picker-btn[data-value="PM"]', this).on('click', this.eventHandler.clickPM);
  this.scrollIntoSelected();
  this.hour = null;
  this.minute = null;
  this.s24 = false;
  (0, _ACore.$$)('.as-chrome-time-picker-scroller', this).forEach(this._makeScroller.bind(this));

  /***
   * @memberOf ChromeTimePicker#
   * @type {number}
   * @name min
   */
}

ChromeTimePicker.tag = 'ChromeTimePicker'.toLowerCase();
ChromeTimePicker.render = function () {
  return (0, _ACore._)({
    "class": 'as-chrome-time-picker',
    extendEvent: ['change'],
    child: [{
      "class": ['as-chrome-time-picker-scroller', 'as-chrome-time-picker-scroller-h12'],
      child: [{
        tag: 'button',
        "class": 'as-chrome-time-picker-scroller-up',
        child: 'span.mdi.mdi-chevron-up'
      }, {
        tag: 'button',
        "class": 'as-chrome-time-picker-scroller-down',
        child: 'span.mdi.mdi-chevron-down'
      }, {
        "class": ['as-chrome-time-picker-viewport', 'as-chrome-time-picker-h12'],
        child: {
          "class": 'as-chrome-time-picker-list',
          child: Array(36).fill(0).map(function (u, i) {
            return {
              tag: 'button',
              "class": 'as-chrome-time-picker-btn',
              child: {
                tag: 'span',
                child: {
                  text: i % 12 + 1 + ''
                }
              },
              props: {
                __hour__: i % 12 + 1
              }
            };
          })
        }
      }]
    }, {
      "class": ['as-chrome-time-picker-scroller', 'as-chrome-time-picker-scroller-h24'],
      child: [{
        tag: 'button',
        "class": 'as-chrome-time-picker-scroller-up',
        child: 'span.mdi.mdi-chevron-up'
      }, {
        tag: 'button',
        "class": 'as-chrome-time-picker-scroller-down',
        child: 'span.mdi.mdi-chevron-down'
      }, {
        "class": ['as-chrome-time-picker-viewport', 'as-chrome-time-picker-h24'],
        child: {
          "class": 'as-chrome-time-picker-list',
          child: Array(24 * 3).fill(0).map(function (u, i) {
            return {
              tag: 'button',
              "class": 'as-chrome-time-picker-btn',
              child: {
                tag: 'span',
                child: {
                  text: i % 24 + ''
                }
              },
              props: {
                __hour__: i % 24
              }
            };
          })
        }
      }]
    }, {
      "class": 'as-chrome-time-picker-scroller',
      child: [{
        tag: 'button',
        "class": 'as-chrome-time-picker-scroller-up',
        child: 'span.mdi.mdi-chevron-up'
      }, {
        tag: 'button',
        "class": 'as-chrome-time-picker-scroller-down',
        child: 'span.mdi.mdi-chevron-down'
      }, {
        "class": 'as-chrome-time-picker-viewport',
        child: {
          "class": 'as-chrome-time-picker-list',
          child: Array(180).fill(0).map(function (u, i) {
            return {
              tag: 'button',
              "class": 'as-chrome-time-picker-btn',
              child: {
                tag: 'span',
                child: {
                  text: i % 60 + ''
                }
              },
              props: {
                __min__: i % 60
              }
            };
          })
        }
      }]
    }, {
      "class": ['as-chrome-time-picker-viewport', 'as-chrome-time-picker-period'],
      child: ['AM', 'PM'].map(function (u) {
        return {
          tag: 'button',
          "class": 'as-chrome-time-picker-btn',
          attr: {
            'data-value': u
          },
          child: {
            tag: 'span',
            child: {
              text: u
            }
          },
          props: {
            __APM__: u
          }
        };
      })
    }]
  });
};
ChromeTimePicker.prototype._makeScroller = function (rootElt) {
  var upBtn = (0, _ACore.$)('.as-chrome-time-picker-scroller-up', rootElt);
  var downBtn = (0, _ACore.$)('.as-chrome-time-picker-scroller-down', rootElt);
  var listElt = (0, _ACore.$)('.as-chrome-time-picker-list', rootElt);
  var delta = 0;
  function tick() {
    if (delta === 0) return;
    listElt.scrollTop -= delta;
    requestAnimationFrame(tick);
  }
  function cancel() {
    delta = 0;
    document.body.removeEventListener('mouseup', cancel);
    document.body.removeEventListener('mouseleave', cancel);
  }
  upBtn.on('mousedown', function () {
    delta = 5;
    document.body.addEventListener('mouseup', cancel);
    document.body.addEventListener('mouseleave', cancel);
    tick();
  });
  downBtn.on('mousedown', function () {
    delta = -5;
    document.body.addEventListener('mouseup', cancel);
    document.body.addEventListener('mouseleave', cancel);
    tick();
  });
};
ChromeTimePicker.prototype.scrollIntoSelected = function () {
  this.domSignal.emit('request_scroll_into_selected');
};
ChromeTimePicker.prototype._scrollIntoSelected = function () {
  var hour = this._hour;
  this.$hour24List.scrollTop = (hour + 24) * 28;
  hour = this._hour % 12;
  if (hour === 0) hour = 12;
  this.$hourList.scrollTop = (hour + 11) * 28;
  this.$minList.scrollTop = (this._minute + 60) * 28;
};
ChromeTimePicker.prototype.notifyChange = function (event) {
  this.emit('change', {
    type: 'change',
    originEvent: event,
    dayOffset: this.dayOffset,
    hour: this.hour,
    minute: this.minute,
    target: this
  }, this);
};
ChromeTimePicker.property = {};
ChromeTimePicker.property.hour = {
  set: function set(value) {
    if ((0, _utils.isRealNumber)(value)) {
      value = Math.min(23, Math.max(0, Math.floor(value) % 24));
    } else {
      value = null;
    }
    var prevVal = this._hour;
    if (prevVal !== null) {
      this.$hour24List.childNodes[prevVal].removeClass('as-selected');
      this.$hour24List.childNodes[prevVal + 24].removeClass('as-selected');
      this.$hour24List.childNodes[prevVal + 48].removeClass('as-selected');
      prevVal = this._hour % 12;
      if (prevVal === 0) prevVal = 12;
      this.$hourList.childNodes[prevVal - 1].removeClass('as-selected');
      this.$hourList.childNodes[prevVal - 1 + 12].removeClass('as-selected');
      this.$hourList.childNodes[prevVal - 1 + 24].removeClass('as-selected');
    }
    this._hour = value;
    prevVal = this._hour;
    if (prevVal !== null) {
      this.$hour24List.childNodes[prevVal].addClass('as-selected');
      this.$hour24List.childNodes[prevVal + 24].addClass('as-selected');
      this.$hour24List.childNodes[prevVal + 48].addClass('as-selected');
      prevVal = this._hour % 12;
      if (prevVal === 0) prevVal = 12;
      this.$hourList.childNodes[prevVal - 1].addClass('as-selected');
      this.$hourList.childNodes[prevVal - 1 + 12].addClass('as-selected');
      this.$hourList.childNodes[prevVal - 1 + 24].addClass('as-selected');
      if (this._hour >= 12) {
        this.$pmBtn.addClass('as-selected');
        this.$amBtn.removeClass('as-selected');
      } else {
        this.$amBtn.addClass('as-selected');
        this.$pmBtn.removeClass('as-selected');
      }
    } else {
      this.$pmBtn.removeClass('as-selected');
      this.$amBtn.removeClass('as-selected');
    }
  },
  get: function get() {
    return this._hour;
  }
};
ChromeTimePicker.property.minute = {
  set: function set(value) {
    if ((0, _utils.isRealNumber)(value)) {
      value = Math.min(59, Math.max(0, Math.floor(value) % 60));
    } else {
      value = null;
    }
    var prevVal = this._minute;
    if (prevVal !== null) {
      this.$minList.childNodes[prevVal].removeClass('as-selected');
      this.$minList.childNodes[prevVal + 60].removeClass('as-selected');
      this.$minList.childNodes[prevVal + 120].removeClass('as-selected');
    }
    this._minute = value;
    prevVal = this._minute;
    if (prevVal !== null) {
      this.$minList.childNodes[prevVal].addClass('as-selected');
      this.$minList.childNodes[prevVal + 60].addClass('as-selected');
      this.$minList.childNodes[prevVal + 120].addClass('as-selected');
    }
  },
  get: function get() {
    return this._minute;
  }
};
ChromeTimePicker.property.value = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value) && !(value instanceof Date)) {
      value = null;
    }
    if (value && value.getTime) {
      value = value.getTime() - (0, _datetime.beginOfDay)(value).getTime();
      if (!(0, _utils.isRealNumber)(value)) value = null;
    } else if ((0, _utils.isRealNumber)(value)) {
      value = Math.min(_datetime.MILLIS_PER_DAY - 1, Math.max(0, value % _datetime.MILLIS_PER_DAY));
    }
    if ((0, _utils.isRealNumber)(value)) {
      this.hour = Math.floor(value / _datetime.MILLIS_PER_HOUR);
      this.minute = Math.floor(value % _datetime.MILLIS_PER_HOUR / _datetime.MILLIS_PER_MINUTE);
    } else {
      this.hour = null;
      this.minute = null;
    }
    this.domSignal.emit('request_scroll_into_selected');
  },
  get: function get() {
    var res = this._hour * _datetime.MILLIS_PER_HOUR + this._minute * _datetime.MILLIS_PER_MINUTE;
    return (0, _utils.isRealNumber)(res) ? res : null;
  }
};
ChromeTimePicker.property.min = {
  set: function set(value) {},
  get: function get() {}
};
ChromeTimePicker.property.s24 = {
  set: function set(value) {
    if (value) {
      this.addClass('as-24h-clock');
    } else {
      this.removeClass('as-24h-clock');
    }
  },
  get: function get() {
    return this.hasClass('as-24h-clock');
  }
};
ChromeTimePicker.eventHandler = {};
ChromeTimePicker.eventHandler.hourScroll = function () {
  var y = this.$hourList.scrollTop;
  var dy = 0;
  if (y < 28 * 12) dy = 28 * 12;else if (y > 28 * 24) {
    dy = -28 * 12;
  }
  if (dy !== 0) {
    this.$hourList.scrollTop += dy;
  }
};
ChromeTimePicker.eventHandler.hour24Scroll = function () {
  var y = this.$hour24List.scrollTop;
  var dy = 0;
  if (y < 28 * 24) dy = 28 * 24;else if (y > 28 * 48) {
    dy = -28 * 24;
  }
  if (dy !== 0) {
    this.$hour24List.scrollTop += dy;
  }
};
ChromeTimePicker.eventHandler.minScroll = function () {
  var y = this.$minList.scrollTop;
  var dy = 0;
  if (y < 28 * 60) dy = 28 * 60;else if (y > 28 * 120) {
    dy = -28 * 60;
  }
  if (dy !== 0) {
    this.$minList.scrollTop += dy;
  }
};
ChromeTimePicker.eventHandler.clickHourList = function (event) {
  var hour;
  if ('__hour__' in event.target) hour = event.target.__hour__;
  if ('__hour__' in event.target.parentElement) hour = event.target.parentElement.__hour__;
  if (hour !== undefined) {
    if (this.hour >= 12) {
      this.hour = hour === 12 ? hour : hour + 12;
    } else {
      this.hour = hour === 12 ? 0 : hour;
    }
    if ((hour - 1 + 12) * 28 < this.$hourList.scrollTop) {
      this.$hourList.scrollTop = (hour - 1 + 12) * 28;
    } else if ((hour - 1 + 13) * 28 > this.$hourList.scrollTop + this.$hourList.clientHeight) {
      this.$hourList.scrollTop = (hour - 1 + 13) * 28 - this.$hourList.clientHeight;
    }
    this.notifyChange(event);
  }
};
ChromeTimePicker.eventHandler.clickHour24List = function (event) {
  var hour;
  if ('__hour__' in event.target) hour = event.target.__hour__;
  if ('__hour__' in event.target.parentElement) hour = event.target.parentElement.__hour__;
  if (hour !== undefined) {
    this.hour = hour;
    if ((hour + 24) * 28 < this.$hourList.scrollTop) {
      this.$hourList.scrollTop = (hour + 24) * 28;
    } else if ((hour + 24) * 28 > this.$hourList.scrollTop + this.$hourList.clientHeight) {
      this.$hourList.scrollTop = (hour + 24) * 28 - this.$hourList.clientHeight;
    }
    this.notifyChange(event);
  }
};
ChromeTimePicker.eventHandler.clickMinList = function (event) {
  var min;
  if ('__min__' in event.target) min = event.target.__min__;
  if ('__min__' in event.target.parentElement) min = event.target.parentElement.__min__;
  if (min !== undefined) {
    this.minute = min;
    if ((min + 60) * 28 < this.$minList.scrollTop) {
      this.$minList.scrollTop = (min + 60) * 28;
    } else if ((min + 61) * 28 > this.$minList.scrollTop + this.$minList.clientHeight) {
      this.$minList.scrollTop = (min + 61) * 28 - this.$minList.clientHeight;
    }
    this.notifyChange(event);
  }
};
ChromeTimePicker.eventHandler.clickPM = function (event) {
  if ((0, _utils.isRealNumber)(this.hour)) {
    if (this.hour < 12) this.hour += 12;
  } else {
    this.hour = 12;
  }
  this.notifyChange(event);
};
ChromeTimePicker.eventHandler.clickAM = function (event) {
  if ((0, _utils.isRealNumber)(this.hour)) {
    if (this.hour >= 12) this.hour -= 12;
  } else {
    this.hour = 0;
  }
  this.notifyChange(event);
};
_ACore["default"].install(ChromeTimePicker);
var _default = ChromeTimePicker;
exports["default"] = _default;

/***/ }),

/***/ 84703:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(86995);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var _g = _Svg["default"].ShareInstance._;
var $g = _Svg["default"].ShareInstance.$;
var Design = {
  circleHeight: 218 - 36,
  borderWidth: 36,
  textBoxHeight: 146,
  textHeight: 48,
  indexHeight: 54,
  textBoxPaddingLeft: 80,
  indexArrowRadius: (172 - 18) / 2,
  indexArrowStrokeWidth: 18,
  indexArrowStartAngle: -Math.PI / 6,
  indexArrowEndAngle: -7 * Math.PI / 12
};
var StyleSheet = {
  '.as-circle-section-label-text': {
    height: Design.textBoxHeight / Design.textHeight + 'em',
    'padding-left': Design.textBoxPaddingLeft / Design.textHeight + 'em',
    'line-height': Design.textBoxHeight / Design.textHeight + 'em'
  },
  '.as-circle-section-label-index': {
    'font-size': Design.indexHeight / Design.textHeight + 'em',
    height: (Design.circleHeight + Design.borderWidth) / Design.indexHeight + 'em',
    'line-height': (Design.circleHeight + Design.borderWidth) / Design.indexHeight + 'em',
    width: (Design.circleHeight + Design.borderWidth) / Design.indexHeight + 'em'
  }
};
_({
  tag: 'style',
  id: 'circle-section-label-style',
  props: {
    innerHTML: Object.keys(StyleSheet).map(function (key) {
      var style = StyleSheet[key];
      return key + ' {\n' + Object.keys(style).map(function (propName) {
        return propName + ': ' + style[propName] + ';';
      }).join('\n') + '}';
    }).join('\n')
  }
}).addTo(document.head);

/**
 * @extends AElement
 * @constructor
 */
function CircleSectionLabel() {
  this._ident = (Math.random() + '').replace(/[^0-9]/g, '_');
  this.$background = $('.as-circle-section-label-background', this);
  this.$index = $('.as-circle-section-label-index', this);
  this.$text = $('.as-circle-section-label-text', this);
  this.$attachhook = _('attachhook').addTo(this).on('error', function () {
    _Dom["default"].addToResizeSystem(this);
    this.requestUpdateSize();
  });
  this.$attachhook.requestUpdateSize = this.redrawBackground.bind(this);
  this.$svg = _g({
    tag: 'svg',
    attr: {
      width: '0',
      height: '0'
    },
    child: [{
      tag: 'defs',
      child: [{
        tag: 'marker',
        id: 'marker_' + this._ident,
        attr: {
          markerWidth: "4",
          markerHeight: "4",
          refX: "0",
          refY: "1",
          orient: "auto",
          markerUnits: "strokeWidth",
          viewBox: "0 0 4 4"
        },
        child: {
          tag: 'path',
          "class": 'as-circle-section-label-arrow-marker-path',
          attr: {
            d: 'M0,0 L0,2 L2,1 z'
          }
        }
      }]
    }, 'rect.as-circle-section-label-text-box', 'circle.as-circle-section-label-index-box', 'path.as-circle-section-label-arrow']
  }).addTo(this.$background);
  this.$indexBox = $g('circle.as-circle-section-label-index-box', this.$svg);
  this.$textBox = $g('rect.as-circle-section-label-text-box', this.$svg);
  // this.$marker = $g('defs marker', this.$svg);
  // this.$markerPath = $g(' path', this.$marker);
  this.$arrow = $g('path.as-circle-section-label-arrow', this.$svg).attr({
    'marker-end': "url(" + '#marker_' + this._ident + ")"
  });
}
;
CircleSectionLabel.prototype.redrawBackground = function () {
  var indexBound = this.$index.getBoundingClientRect();
  var textBound = this.$text.getBoundingClientRect();
  var cHeight = indexBound.height;
  var cWidth = textBound.right - indexBound.left;
  this.$svg.attr({
    height: cHeight + '',
    width: cWidth + '',
    viewBox: [0, 0, cWidth, cHeight].join(' ')
  });
  var borderWidth = cHeight * Design.borderWidth / (Design.circleHeight + Design.borderWidth);
  var radius = cHeight * Design.circleHeight / (Design.circleHeight + Design.borderWidth) / 2;
  var x0 = indexBound.width / 2;
  var y0 = cHeight / 2;
  this.$indexBox.attr({
    r: radius + '',
    cx: x0,
    cy: y0
  }).addStyle({
    strokeWidth: borderWidth + ''
  });
  var textBoxHeight = textBound.height;
  this.$textBox.attr({
    x: x0 / 2,
    y: (cHeight - textBoxHeight) / 2,
    width: cWidth - x0 - 1,
    height: textBoxHeight,
    rx: textBoxHeight / 2,
    ry: textBoxHeight / 2
  });
  var arrowRadius = cHeight * Design.indexArrowRadius / (Design.circleHeight + Design.borderWidth);
  this.$arrow.attr({
    d: ['M', x0 + arrowRadius * Math.cos(Design.indexArrowStartAngle), y0 + arrowRadius * Math.sin(Design.indexArrowStartAngle), 'A', arrowRadius, arrowRadius, 0, 1, 1, x0 + arrowRadius * Math.cos(Design.indexArrowEndAngle), y0 + arrowRadius * Math.sin(Design.indexArrowEndAngle)].join(' ')
  }).addStyle('stroke-width', cHeight * Design.indexArrowStrokeWidth / (Design.circleHeight + Design.borderWidth));
};
CircleSectionLabel.tag = 'CircleSectionLabel'.toLowerCase();
CircleSectionLabel.render = function () {
  return _({
    "class": 'as-circle-section-label',
    child: [{
      "class": 'as-circle-section-label-background'
    }, '.as-circle-section-label-index', '.as-circle-section-label-text']
  });
};
CircleSectionLabel.property = {};
CircleSectionLabel.property.index = {
  set: function set(value) {
    this._index = value;
    this.$index.clearChild().addChild(_({
      text: value + ''
    }));
  },
  get: function get() {
    return this._index;
  }
};
CircleSectionLabel.property.text = {
  set: function set(value) {
    this._text = value;
    this.$text.clearChild().addChild(_({
      text: value + ''
    }));
  },
  get: function get() {
    return this._text;
  }
};
_ACore["default"].install(CircleSectionLabel);
var _default = CircleSectionLabel;
exports["default"] = _default;

/***/ }),

/***/ 48533:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(16959);
var _utils = __webpack_require__(84512);
var _stringGenerate = __webpack_require__(10713);
var _EventEmitter = __webpack_require__(46833);
var _Color = _interopRequireDefault(__webpack_require__(64974));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * note
 * CTCollapsibleNode can only be selected when it has no children and noSelect = false.
 * CTNNode can be selected and can have children.
 */

/**
 * @typedef {Object} CTNItemData
 * @property {string} text
 * @property {any} string
 * @property  [icon]
 * @property [noSelect] - default = false
 */

/**
 * @extends AElement
 * @constructor
 */
function CollapsibleTreeNavigator() {
  /**
   *
   * @type {CTRoot}
   */
  this.root = new CTRoot(this);

  /**
   * @type {{text:string, id:any, actiions:{}[]}[]}
   * @name items
   * @memberOf CollapsibleTreeNavigator#
   */

  /**
   * @type {any}
   * @name value
   * @memberOf CollapsibleTreeNavigator#
   */
}

CollapsibleTreeNavigator.tag = 'CollapsibleTreeNavigator'.toLowerCase();
CollapsibleTreeNavigator.render = function () {
  return (0, _ACore._)({
    "class": 'as-collapsible-tree-navigator',
    extendEvent: ['change', 'action', 'clickitem']
  });
};
CollapsibleTreeNavigator.prototype.nodeOf = function (nodeValue) {
  return this.root.nodeOf(nodeValue);
};
CollapsibleTreeNavigator.prototype.updateNode = function (nodeValue, fieldName, value) {
  var nd = this.nodeOf(nodeValue);
  if (!nd) return;
  nd.rawData[fieldName] = value;
  if (['items', 'text', 'icon', 'value', 'count', 'color'].indexOf(fieldName) >= 0) {
    nd[fieldName] = value;
    this.root.updateSize();
  }
};

/**
 *
 * @param {any=}data
 */
CollapsibleTreeNavigator.prototype.notifyChange = function (data) {
  var nd;
  if (!data) {
    //fallback
    nd = this.root.nodeByValue[(0, _utils.keyStringOf)(this.value)];
    data = nd && nd.data;
  }
  data = data || null;
  var value = this.value;
  if (data) value = data.value;
  this.emit('change', {
    type: 'change',
    value: value,
    data: data
  }, this);
};

/**
 *
 * @param {any=}data
 */
CollapsibleTreeNavigator.prototype.notifyClick = function (data) {
  this.emit('clickitem', {
    type: 'clickitem',
    data: data
  }, this);
};
CollapsibleTreeNavigator.property = {};
CollapsibleTreeNavigator.property.value = {
  set: function set(value) {
    this.root.value = value;
  },
  get: function get() {
    return this.root.value;
  }
};
CollapsibleTreeNavigator.property.items = {
  set: function set(items) {
    this.root.items = items;
  },
  get: function get() {
    return this.root.items;
  }
};
_ACore["default"].install(CollapsibleTreeNavigator);
var _default = CollapsibleTreeNavigator;
/**
 *
 * @param {CollapsibleTreeNavigator} elt
 * @constructor
 */
exports["default"] = _default;
function CTRoot(elt) {
  this.elt = elt;
  /**
   *
   * @type {CTCollapsibleNode[]}
   */
  this.children = [];
  this.nodeByValue = {};
  this.iconCount = 0;
  this.level = 0;
  this.looked = 0;
}
CTRoot.prototype.nodeOf = function (nodeValue) {
  return this.nodeByValue[(0, _utils.keyStringOf)(nodeValue)];
};
CTRoot.prototype.updateSelectedLine = function () {
  if (this.looked) return;
  var selectedNode = this.nodeOf(this.value);
  if (!selectedNode) return;
  var path = [];
  var c = selectedNode;
  while (c && c !== this) {
    path.unshift(c);
    c = c.parent;
  }
  var viewingNode = null;
  while (path.length) {
    c = path.shift();
    viewingNode = c;
    if (c.status !== 'open') {
      break;
    }
  }
  if (!viewingNode) return;
  this.elt.addStyle('--selected-y', viewingNode.offsetY + 'px');
};
CTRoot.prototype.updateSize = function () {
  if (this.looked) return;
  this.elt.addStyle('min-width', Math.ceil(this.minWidth) + 'px');
  if (this.elt.isDescendantOf(document.body)) {
    window.dispatchEvent(new Event('resize'));
  }
};
CTRoot.prototype.clear = function () {
  while (this.children.length > 0) {
    this.children[0].remove();
  }
};
CTRoot.prototype.select = function (value) {
  this.children.forEach(function (c) {
    return c.select(value);
  });
};
Object.defineProperty(CTRoot.prototype, 'offsetHeight', {
  get: function get() {
    return this.children.reduce(function (ac, cr) {
      return ac + cr.offsetHeight;
    }, 0);
  }
});
Object.defineProperty(CTRoot.prototype, 'offsetY', {
  get: function get() {
    return 0;
  }
});
Object.defineProperty(CTRoot.prototype, 'contentHeight', {
  get: function get() {
    return 0;
  }
});
Object.defineProperty(CTRoot.prototype, 'items', {
  set: function set(items) {
    var _this = this;
    this.looked++;
    var prevState = Object.keys(this.nodeByValue).reduce(function (ac, key) {
      ac[key] = _this.nodeByValue[key].status;
      return ac;
    }, {});
    this.clear();
    this.children = items.map(function (item) {
      return new CTCollapsibleNode(this, item);
    }, this);
    this.elt.addChild(this.children.map(function (nd) {
      return nd.domElt;
    }));
    this.select(this.value);
    Object.keys(this.nodeByValue).forEach(function (key) {
      var nd = _this.nodeByValue[key];
      if (prevState[key] === 'open' && nd.status === 'close') {
        nd.status = 'open';
      } else if (prevState === 'close' && nd.status === 'open') {
        nd.status = 'close';
      }
    });
    this.looked--;
    this.updateSize();
    this.updateSelectedLine();
  },
  get: function get() {
    return this.children.map(function (chd) {
      return chd.data;
    });
  }
});
Object.defineProperty(CTRoot.prototype, 'value', {
  set: function set(value) {
    this._value = value;
    this.looked++;
    this.select(value);
    this.looked--;
    this.updateSelectedLine();
  },
  get: function get() {
    return this._value;
  }
});
Object.defineProperty(CTRoot.prototype, 'data', {
  set: function set(data) {
    data = Object.assign({
      items: [],
      value: 0
    }, data);
    this.items = data.items;
    this.value = data.value;
  },
  get: function get() {
    return {
      items: this.items,
      value: this.value
    };
  }
});
Object.defineProperty(CTRoot.prototype, 'minWidth', {
  get: function get() {
    return this.children.reduce(function (ac, cr) {
      return Math.max(ac, cr.minWidth);
    }, 0) + 4;
  }
});

/**
 *
 * @param {CTRoot} parent
 * @param data
 * @constructor
 */
function CTCollapsibleNode(parent, data) {
  this.parent = parent;
  this.nodeByValue = parent.nodeByValue;
  this.root = parent;
  this.level = parent.level + 1;
  this.children = [];
  this.domElt = (0, _ACore._)({
    "class": 'as-ctn-collapse-node',
    style: {
      '--level': this.level + ''
    },
    child: [{
      "class": 'as-ctn-collapse-node-content',
      child: ['toggler-ico', {
        "class": 'as-ctn-icon-ctn'
      }, {
        tag: 'span',
        "class": 'as-ctn-text',
        child: {
          text: ''
        }
      }, {
        tag: 'span',
        "class": 'as-ctn-count',
        style: {
          display: 'none'
        },
        child: {
          text: ''
        }
      }, {
        "class": 'as-ctn-right'
      }]
    }, {
      "class": 'as-ctn-collapse-node-children-ctn'
    }]
  });
  this.$toggler = (0, _ACore.$)('toggler-ico', this.domElt);
  this.$content = (0, _ACore.$)('.as-ctn-collapse-node-content', this.domElt);
  this.$childrenCtn = (0, _ACore.$)('.as-ctn-collapse-node-children-ctn', this.domElt);
  this.$iconCtn = (0, _ACore.$)('.as-ctn-icon-ctn', this.domElt);
  this.$text = (0, _ACore.$)('.as-ctn-text', this.domElt);
  this.$count = (0, _ACore.$)('.as-ctn-count', this.domElt);
  this.$right = (0, _ACore.$)('.as-ctn-right', this.domElt);
  this.data = data;
  this.$content.on('click', this.ev_click.bind(this));
}
CTCollapsibleNode.prototype.remove = function () {
  this.children.slice().forEach(function (child) {
    return child.remove();
  });
  var idx = this.parent.children.indexOf(this);
  var value = this.value;
  if (idx >= 0) {
    delete this.nodeByValue[(0, _utils.keyStringOf)(value)];
    this.parent.children.splice(idx, 1);
    this.domElt.remove();
  }
};
CTCollapsibleNode.prototype.select = function (value) {
  var res = false;
  if (this.data.value === value) {
    this.domElt.addClass('as-selected');
    res = true;
  } else {
    this.domElt.removeClass('as-selected');
  }
  var childRes = this.children.reduce(function (ac, it) {
    return it.select(value) || ac;
  }, false);
  if (childRes && this.status === 'close') {
    this.status = 'open';
  }
  res = res || childRes;
  return res;
};
CTCollapsibleNode.prototype.ev_click = function (event) {
  if (this.$right && (0, _EventEmitter.hitElement)(this.$right, event)) return;
  var rootElt;
  if (this.domElt.hasClass('as-closing')) return;
  var isClickItem = false;
  var noSelect = this.rawData && this.rawData.noSelect;
  var tgBound;
  if (this.status === 'none') {
    isClickItem = !noSelect;
  } else {
    tgBound = this.$toggler.getBoundingClientRect();
    if (noSelect || event.clientX < tgBound.right) {
      if (this.status === 'open') {
        this.status = 'close';
      } else if (this.status === 'close') {
        this.status = 'open';
      }
    } else {
      isClickItem = true;
    }
  }
  if (isClickItem) {
    rootElt = this.root.elt;
    if (rootElt && rootElt.value !== this.value) {
      rootElt.value = this.value;
      rootElt.notifyChange(this.data);
    }
    rootElt.notifyClick(this.data);
  }
};
Object.defineProperty(CTCollapsibleNode.prototype, 'status', {
  set: function set(value) {
    var prev = this.status;
    if (this.children.length > 0) {
      if (value !== 'open') value = 'close';
    } else {
      value = 'none';
    }
    if (prev === value) return;
    this._status = value;
    switch (value) {
      case 'open':
        // this.domElt.addStyle('--children-height', this.childrenHeight + 'px');
        this.domElt.addClass('as-open').removeClass('as-close');
        break;
      case 'close':
        // this.domElt.addStyle('--children-height', this.childrenHeight + 'px');
        this.domElt.addClass('as-close').removeClass('as-open');
        break;
      default:
        this.domElt.removeClass('as-open').removeClass('as-close');
        break;
    }
    this.root.updateSelectedLine();
  },
  get: function get() {
    return this._status || 'none';
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'icon', {
  get: function get() {
    return this._icon || null;
  },
  set: function set(value) {
    this.$iconCtn.clearChild();
    value = value || null;
    this._icon = value;
    if (value) {
      this.$iconCtn.addChild((0, _ACore._)(value));
    }
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'text', {
  get: function get() {
    return this._text;
  },
  set: function set(value) {
    if (typeof value === 'number') value = value + '';
    value = value || '';
    this._text = value;
    this.$text.firstChild.data = value;
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'count', {
  get: function get() {
    return this._count;
  },
  set: function set(value) {
    if (typeof value !== 'number') value = parseInt(value);
    value = Math.round(value);
    if (!(0, _utils.isNaturalNumber)(value)) value = 0;
    this._count = value;
    if (value) {
      this.$count.removeStyle('display');
      this.$count.firstChild.data = value;
    } else {
      this.$count.addStyle('display', 'none');
      this.$count.firstChild.data = '';
    }
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'value', {
  get: function get() {
    return this._value;
  },
  set: function set(value) {
    var prevValue = this._value;
    var key = (0, _utils.keyStringOf)(prevValue);
    if (this.nodeByValue[key] === this) {
      delete this.nodeByValue[key];
    }
    key = (0, _utils.keyStringOf)(value);
    if (this.nodeByValue[key]) {
      value = value + '_' + (0, _stringGenerate.randomIdent)(5);
    }
    this._value = value;
    key = (0, _utils.keyStringOf)(value);
    this.nodeByValue[key] = this;
    this.domElt.attr('data-value', value + '');
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'color', {
  get: function get() {
    return this._color;
  },
  set: function set(value) {
    if (typeof value === 'string') {
      try {
        value = _Color["default"].parse(value);
      } catch (e) {
        value = null;
      }
    } else if (!value || !value.getContrastYIQ) {
      value = null;
    }
    var textColor;
    if (value) {
      textColor = value.getContrastYIQ();
      this.$content.addStyle('color', textColor + '');
      this.$content.addStyle('background-color', value + '');
    } else {
      this.$content.removeStyle('color');
      this.$content.removeStyle('background-color');
    }
    this._color = value + '';
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'items', {
  set: function set(items) {
    var _this2 = this;
    while (this.children.length > 0) {
      this.children[0].remove();
    }
    if (!Array.isArray(items)) items = [];
    this.children = items.map(function (it) {
      return new CTNNode(_this2, it);
    });
    this.$childrenCtn.addChild(this.children.map(function (c) {
      return c.domElt;
    }));
    if (this.children.length) {
      if (this.rawData && this.rawData.initOpened) {
        this.status = 'open';
      } else {
        this.status = 'close';
      }
    } else {
      this.status = 'none';
    }
    this.root.updateSelectedLine();
  },
  get: function get() {
    return this.children.map(function (ch) {
      return ch.data;
    });
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'actions', {
  set: function set(actions) {
    var _this3 = this;
    if (!Array.isArray(actions)) actions = [];
    this._actions = actions;
    this.$right.clearChild();
    actions.forEach(function (action) {
      var btn = (0, _ACore._)({
        tag: 'button',
        "class": ['as-transparent-button'],
        child: action.icon,
        on: {
          click: function click(event) {
            _this3.root.elt.emit('action', {
              action: action,
              data: _this3.rawData,
              type: 'action'
            }, _this3.root.elt);
          }
        }
      });
      if (action.text) btn.attr('title', action.text);
      _this3.$right.addChild(btn);
    });
  },
  get: function get() {
    return this._actions;
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'data', {
  set: function set(data) {
    this.rawData = data || {};
    data = Object.assign({
      text: '',
      value: 0,
      icon: null,
      count: 0
    }, data || {});
    this.value = data.value;
    this.text = data.text;
    this.icon = data.icon;
    this.count = data.count;
    this.items = data.items;
    this.color = data.color;
    this.actions = data.actions;
  },
  get: function get() {
    var res = Object.assign({}, this.rawData, {
      text: this.text,
      value: this.value
    });
    if (this.actions && this.actions.length) {
      res.actions = this.actions;
    }
    if (this.icon) res.icon = this.icon;
    if (this.count) res.count = this.count;
    if (this.color) res.color = this.color;
    return res;
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'contentHeight', {
  get: function get() {
    return 31;
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'childrenHeight', {
  get: function get() {
    return this.children.reduce(function (ac, cr) {
      return ac + cr.offsetHeight;
    }, 0);
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'offsetHeight', {
  get: function get() {
    var res = this.contentHeight;
    if (this.status === 'open') res += this.childrenHeight;
    return res;
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'offsetY', {
  get: function get() {
    var offsetY = this.parent.offsetY + this.parent.contentHeight;
    var sbs = this.parent.children;
    var sb;
    for (var i = 0; i < sbs.length; i++) {
      sb = sbs[i];
      if (sb === this) break;
      offsetY += sb.offsetHeight;
    }
    return offsetY;
  }
});
Object.defineProperty(CTCollapsibleNode.prototype, 'minWidth', {
  get: function get() {
    var res = 50 + 8; //padding
    res += 14; //tg icon
    res += 7; //text margin
    res += Math.ceil((0, _utils.measureText)(this.text, '14px arial').width);
    var countWidth = 0;
    if (this.count) {
      countWidth = (0, _utils.measureText)(this.count + '', '14px arial').width + 10; //padding 5
      countWidth = Math.ceil(countWidth);
      countWidth = Math.max(countWidth, 20); //min-width
      countWidth += 5; //margin
    }

    if (this.icon) res += 21;
    res += countWidth;
    res = this.children.reduce(function (ac, cr) {
      return Math.max(ac, cr.minWidth);
    }, res);
    this.domElt.attr('data-min-width', res + '');
    return res;
  }
});

/**
 *
 * @param {CTNNode|CTCollapsibleNode} parent
 * @param data
 * @constructor
 */
function CTNNode(parent, data) {
  this.parent = parent;
  this.nodeByValue = parent.nodeByValue;
  this.root = parent.root;
  this.level = parent.level + 1;
  this.children = [];
  this.domElt = (0, _ACore._)({
    "class": 'as-ctn-node',
    style: {
      '--level': this.level + ''
    },
    child: [{
      "class": 'as-ctn-node-content',
      child: ['toggler-ico', {
        "class": 'as-ctn-icon-ctn'
      }, {
        tag: 'span',
        "class": 'as-ctn-text',
        child: {
          text: ''
        }
      }, {
        tag: 'span',
        "class": 'as-ctn-count',
        style: {
          display: 'none'
        },
        child: {
          text: ''
        }
      }, '.as-ctn-right']
    }, {
      "class": 'as-ctn-node-children-ctn'
    }]
  });
  this.$content = (0, _ACore.$)('.as-ctn-node-content', this.domElt);
  this.$toggler = (0, _ACore.$)('toggler-ico', this.domElt);
  this.$content.on('click', this.ev_click.bind(this));
  this.$childrenCtn = (0, _ACore.$)('.as-ctn-node-children-ctn', this.domElt);
  this.$iconCtn = (0, _ACore.$)('.as-ctn-icon-ctn', this.domElt);
  this.$text = (0, _ACore.$)('.as-ctn-text', this.domElt);
  this.$count = (0, _ACore.$)('.as-ctn-count', this.domElt);
  this.$right = (0, _ACore.$)('.as-ctn-right', this.domElt);
  this.data = data;
}

//copy
['status', 'offsetHeight', 'childrenHeight', 'offsetY', 'select', 'text', 'count', 'icon', 'value', 'data', 'items', 'actions', 'remove', 'ev_click', 'color'].forEach(function (method) {
  Object.defineProperty(CTNNode.prototype, method, Object.getOwnPropertyDescriptor(CTCollapsibleNode.prototype, method));
});
Object.defineProperty(CTNNode.prototype, 'minWidth', {
  get: function get() {
    var res = this.level * 25 - 20 + 10; //padding
    res += 14; //tg icon
    res += 7; //text margin
    res += Math.ceil((0, _utils.measureText)(this.text, '14px arial').width);
    this.domElt.attr('data-text-width', Math.ceil((0, _utils.measureText)(this.text, '14px arial').width));
    var countWidth = 0;
    if (this.count) {
      countWidth = (0, _utils.measureText)(this.count + '', '14px arial').width + 10; //padding 5
      countWidth = Math.ceil(countWidth);
      countWidth = Math.max(countWidth, 20); //min-width
      countWidth += 5; //margin-left
    }

    res += countWidth;
    this.domElt.attr('data-local-min-width', res + '');
    res = this.children.reduce(function (ac, cr) {
      return Math.max(ac, cr.minWidth);
    }, res);
    this.domElt.attr('data-min-width', res + '');
    return res;
  }
});
Object.defineProperty(CTNNode.prototype, 'contentHeight', {
  get: function get() {
    return 30;
  }
});

/***/ }),

/***/ 8535:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(27346);
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _FontColorButton = _interopRequireDefault(__webpack_require__(14560));
var _utils = __webpack_require__(84512);
var _Dom = __webpack_require__(64821);
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _EventEmitter = _interopRequireWildcard(__webpack_require__(46833));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _table_header_add = _interopRequireDefault(__webpack_require__(15608));
var _RibbonButton = _interopRequireDefault(__webpack_require__(93856));
var _PreInput = _interopRequireDefault(__webpack_require__(76606));
var _Snackbar = _interopRequireDefault(__webpack_require__(96206));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var EV_SELECTED_CELL_CHANGE = 'SELECTED_CELL_CHANGE'.toLowerCase();
var EV_CELL_DATA_CHANGE = 'change';
var EV_UNDO_APPLY = 'EV_UNDO_APPLY'.toLowerCase();

/**
 * loc: [row, col, rowHeight, colHeight]
 * @param {AElement} cell
 * @returns {number[]}
 */
var locOfCell = function locOfCell(cell) {
  return (cell.getAttribute('data-loc') || 'Nan,NaN').split(',').concat([cell.getAttribute('rowspan') || '1', cell.getAttribute('colspan') || '1']).map(function (it) {
    return parseInt(it, 10);
  });
};
var locOfCells = function locOfCells(cells) {
  return cells.reduce(function (ac, cell) {
    var cellLoc = locOfCell(cell);
    if (!ac) return cellLoc;
    return mergeLoc(ac, cellLoc);
  }, null);
};
function mergeLoc(loc1, loc2) {
  var rowLow = Math.min(loc1[0], loc2[0]);
  var colLow = Math.min(loc1[1], loc2[1]);
  var rowHigh = Math.max(loc1[0] + loc1[2] - 1, loc2[0] + loc2[2] - 1);
  var colHigh = Math.max(loc1[1] + loc1[3] - 1, loc2[1] + loc2[3] - 1);
  var res = [rowLow, colLow, rowHigh - rowLow + 1, colHigh - colLow + 1];
  if (arguments[2]) res = mergeLoc(res, arguments[2]);
  return res;
}
;
var locInLoc = function locInLoc(loc, ctn) {
  var mlc = mergeLoc(loc, ctn);
  return locEqual(mlc, ctn);
};
var locEqual = function locEqual(loc1, loc2) {
  return loc1[0] === loc2[0] && loc1[1] === loc2[1] && loc1[2] === loc2[2] && loc1[3] === loc2[3];
};
var locCollapse = function locCollapse(loc1, loc2) {
  if (loc1[0] + loc1[2] <= loc2[0]) return false;
  if (loc2[0] + loc2[2] <= loc1[0]) return false;
  if (loc1[1] + loc1[3] <= loc2[1]) return false;
  if (loc2[1] + loc2[3] <= loc1[1]) return false;
  return true;
};
var varNameOf = function varNameOf(o) {
  var res;
  if (!o) res = undefined;else if (typeof o === "string") res = o;else if (o.attr) res = o.attr('data-name');else if (typeof o.name === "string") res = o.name;
  return res || undefined;
};
var varTitleOf = function varTitleOf(o) {
  var res = undefined;
  if (!o) res = undefined;else if (o.attr) {
    res = o.attr('data-title');
    if (typeof res !== "string") res = undefined;
  } else if (typeof o.title === "string") res = o.title;
  return res;
};
var normalizeVariableData = function normalizeVariableData(data) {
  if (typeof data === "string") {
    data = data.trim();
    if (data.length === 0) return null;
    return {
      name: data,
      title: data
    };
  } else if (_typeof(data) === "object" && data) {
    data = Object.assign({}, data);
    if (typeof data.name !== "string" || data.name.trim().length === 0) return null;
    data.name = data.name.trim();
    if (typeof data.title !== "string" || data.title.trim().length === 0) data.title = data.name;
    return data;
  }
  return null;
};
var normalizeUsedVariable = function normalizeUsedVariable(data) {
  if (typeof data === "string") {
    data = data.trim();
    if (data.length === 0) return null;
    return {
      name: data
    };
  } else if (_typeof(data) === "object" && data) {
    data = Object.assign({}, data);
    if (typeof data.name !== "string" || data.name.trim().length === 0) return null;
    data.name = data.name.trim();
    if ('title' in data && typeof data.title !== "string") delete data.title;
    return data;
  }
  return null;
};
var variableDataOfElt = function variableDataOfElt(elt) {
  if (!elt.attr) return null;
  if (!elt.attr('data-default-title')) return null;
  var res = {};
  res.name = elt.attr('data-name');
  if (typeof res.name !== "string" || !res.name) return null;
  var title = elt.attr && elt.attr('data-title');
  if (typeof title === "string") res.title = title;
  return res;
};
var varEltOfCell = function varEltOfCell(cell) {
  return Array.prototype.filter.call(cell.childNodes, function (c) {
    return !!c.attr('data-default-title');
  });
};
var isChangeParent = function isChangeParent(parentElt, elt, bf) {
  if (parentElt !== elt.parentElement) return true;
  var children = varEltOfCell(parentElt);
  var idx;
  if (bf === 'end') {
    return children[children.length - 1] !== bf;
  } else {
    if (bf === elt) return false;
    idx = children.indexOf(bf);
    return children[idx - 1] !== elt;
  }
};
var hoverXOf = function hoverXOf(cell, bf) {
  var children = varEltOfCell(cell);
  var bound, cBound;
  if (children.length > 0) {
    bound = cell.getBoundingClientRect();
    if (bf === 'end') {
      cBound = children[children.length - 1].getBoundingClientRect();
      return cBound.right + 10 - bound.left;
    } else {
      cBound = bf.getBoundingClientRect();
      return cBound.left - bound.left;
    }
  } else {
    return 20;
  }
};
var defaultTextAlignOfElt = function defaultTextAlignOfElt(elt) {
  if (elt.tagName === 'TD') return 'left';
  return 'center';
};
var textAlignOfElt = function textAlignOfElt(elt) {
  return elt.style.textAlign || defaultTextAlignOfElt(elt);
};
var defaultFontWeightOfElt = function defaultFontWeightOfElt(elt) {
  if (elt.tagName === 'TD') return 'normal';
  return 'bold';
};
var fontWeightOfElt = function fontWeightOfElt(elt) {
  return elt.style.fontWeight || defaultFontWeightOfElt(elt);
};
var fontStyleOfElt = function fontStyleOfElt(elt) {
  return elt.style.fontStyle || 'normal';
};

/**
 * @extends AElement
 * @constructor
 */
function CompactDataGridEditor() {
  var _this = this;
  /**
   *
   * @type {CDContext}
   */
  var context = {
    editor: this,
    table: null,
    formatTool: null,
    varMng: null,
    selectCtrl: null,
    lcEmitter: new _EventEmitter["default"]()
  };
  context.table = new CDTable(context);
  this.$body = (0, _ACore.$)('.as-compact-data-grid-editor-body', this);
  this.$body.addChild(context.table.$table);
  context.undoMng = new CDUndoManager(context);
  context.selectCtrl = new CDSelectController(context);
  context.formatTool = new CDGFormatTool(context);
  context.varMng = new CDGVariableManager(context);

  // OOP.drillProperty(this, context.table, 'header', 'data');
  // OOP.drillProperty(this, context.table, 'data', 'data');
  _OOP["default"].drillProperty(this, context.varMng, 'variables');
  var dataTO = -1;
  Object.defineProperties(this, {
    header: {
      set: function set(value) {
        if (value) {
          context.table.header.data = value;
          context.table.header.hidden = false;
        } else {
          context.table.header.hidden = true;
        }
        clearTimeout(dataTO);
        dataTO = setTimeout(function () {
          context.table.autoFixRowsWidth();
          context.formatTool.updateAvailableCommands();
          context.undoMng.reset().commit();
        });
      },
      get: function get() {
        clearTimeout(dataTO);
        context.table.autoFixRowsWidth();
        if (context.table.header.hidden) return null;
        return context.table.header.data;
      },
      configurable: true
    },
    data: {
      set: function set(value) {
        context.varMng.rejectAllVariables();
        context.table.body.data = value;
        clearTimeout(dataTO);
        dataTO = setTimeout(function () {
          context.table.autoFixRowsWidth();
          context.formatTool.updateAvailableCommands();
          context.undoMng.reset().commit();
        });
      },
      get: function get() {
        clearTimeout(dataTO);
        context.table.autoFixRowsWidth();
        return context.table.body.data;
      },
      configurable: true
    }
  });
  var count = 0;
  context.lcEmitter.on(EV_CELL_DATA_CHANGE, function () {
    context.undoMng.commit();
    context.formatTool.updateAvailableCommands();
    if (window.ABSOL_DEBUG) _Snackbar["default"].show('change ' + ++count);
    _this.emit('change', {
      type: 'change',
      target: _this
    }, _this);
  });
  context.lcEmitter.on(EV_UNDO_APPLY, function () {
    context.formatTool.updateAvailableCommands();
    if (window.ABSOL_DEBUG) _Snackbar["default"].show('change ' + ++count);
    _this.emit('change', {
      type: 'change',
      target: _this
    }, _this);
  });

  /**
   * @name data
   * @memberof CompactDataGridEditor#
   */

  /**
   * @name header
   * @memberof CompactDataGridEditor#
   */
}

/**
 * @typedef CDContext
 * @property {CompactDataGridEditor} editor
 * @property {CDTable} table
 * @property {CDGVariableManager} varMng
 * @property {CDUndoManager} undoMng
 * @property {CDGFormatTool} formatTool
 * @property {CDSelectController} selectCtrl
 * @property {EventEmitter} lcEmitter
 *
 */

CompactDataGridEditor.tag = 'CompactDataGridEditor'.toLowerCase();
CompactDataGridEditor.render = function () {
  return (0, _ACore._)({
    attr: {
      tabindex: 1
    },
    extendEvent: ['change'],
    "class": 'as-compact-data-grid-editor',
    child: ['.as-compact-data-grid-editor-body']
  });
};
CompactDataGridEditor.prototype.revokeResource = function () {
  var data = this.data;
  var header = this.header;
  Object.defineProperties(this, {
    data: {
      value: data,
      configurable: true,
      writable: true
    },
    header: {
      value: header,
      configurable: true,
      writable: true
    }
  });
  (0, _utils.revokeResource)(this.grid);
  (0, _utils.revokeResource)(this.varMng);
  this.grid = undefined;
  this.varMng = undefined;
  while (this.firstChild) {
    (0, _utils.revokeResource)(this.firstChild);
    this.firstChild.remove();
  }
};
CompactDataGridEditor.prototype.init = function (props) {
  props = Object.assign({}, props);
  this.variables = props.variables;
  this.header = props.header;
  this.data = props.data;
  delete props.variables;
  delete props.header;
  delete props.data;
  Object.assign(this, props);
};
_ACore["default"].install(CompactDataGridEditor);
var _default = CompactDataGridEditor;
/**
 *
 * @param  {CDContext} context
 * @constructor
 */
exports["default"] = _default;
function CDGrid(context) {
  this.context = context;
  this.$grid = (0, _ACore._)(this.gridCt);

  // /**
  //  * @type {CompactDataGridEditor}
  //  */
  // this.elt = this.context.elt;
  // this.$body = $('tbody', this.elt);
}

CDGrid.prototype.gridCt = 'tbody';
CDGrid.prototype.rowCt = 'tr';
CDGrid.prototype.cellCt = 'td';
CDGrid.prototype.makeCell = function (data) {
  var attr = {};
  if ((0, _utils.isNaturalNumber)(data.rowSpan) && data.rowSpan > 1) {
    attr.rowspan = data.rowSpan;
  } else if ((0, _utils.isNaturalNumber)(data.rowspan) && data.rowspan > 1) {
    attr.rowspan = data.rowspan;
  }
  if ((0, _utils.isNaturalNumber)(data.colSpan) && data.colSpan > 1) {
    attr.colspan = data.colSpan;
  } else if ((0, _utils.isNaturalNumber)(data.colspan) && data.colspan > 1) {
    attr.colspan = data.colspan;
  }
  return (0, _ACore._)({
    tag: this.cellCt,
    attr: attr,
    "class": 'as-ca-cell',
    style: data.style || {}
    // child:
  });
};

CDGrid.prototype.hasCell = function (cell) {
  return cell.isDescendantOf(this.$grid);
};
CDGrid.prototype.styleOfCell = function (cellElt) {
  var res = {};
  ['textAlign', 'color', 'backgroundColor', 'fontWeight', 'whiteSpace'].forEach(function (key) {
    if (cellElt.style[key]) res[key] = cellElt.style[key];
  });
  if (res.textAlign === defaultTextAlignOfElt(cellElt)) delete res.textAlign;
  if (res.fontWeight === defaultFontWeightOfElt(cellElt)) delete res.fontWeight;
  if (res.whiteSpace !== 'nowrap') delete res.whiteSpace;
  for (var k in res) {
    return res;
  }
  return null;
};
CDGrid.prototype.dataOfCell = function (cellElt) {
  var cellData = {};
  var loc = locOfCell(cellElt);
  if (loc[2] > 1) cellData.rowSpan = loc[2];
  if (loc[3] > 1) cellData.colSpan = loc[3];
  var style = this.styleOfCell(cellElt);
  if (style) cellData.style = style;
  return cellData;
};
CDGrid.prototype.makeRow = function (data) {
  var _this2 = this;
  var cells = data.cells || [];
  return (0, _ACore._)({
    tag: this.rowCt,
    "class": 'as-ca-row',
    child: cells.map(function (it) {
      return _this2.makeCell(it);
    })
  });
};
CDGrid.prototype.updateCellLoc = function () {
  var row, cell;
  var gridElt = this.$grid;
  var height = Array(100).fill(0);
  var jj, loc;
  for (var i = 0; i < gridElt.childNodes.length; ++i) {
    row = gridElt.childNodes[i];
    jj = 0;
    for (var j = 0; j < row.childNodes.length; ++j) {
      cell = row.childNodes[j];
      loc = locOfCell(cell);
      while (height[jj] > i) {
        jj++;
      }
      cell.attr('data-loc', i + ',' + jj);
      for (var k = 0; k < loc[3]; ++k) {
        height[jj + k] = i + loc[2];
      }
      jj += loc[3];
    }
  }
  var nCol = height.indexOf(0);
  gridElt.attr('data-width', nCol);
  return nCol;
};
CDGrid.prototype.calcWidth = function () {
  var row, cell;
  var gridElt = this.$grid;
  var height = Array(100).fill(0);
  var jj, loc;
  for (var i = 0; i < gridElt.childNodes.length; ++i) {
    row = gridElt.childNodes[i];
    jj = 0;
    for (var j = 0; j < row.childNodes.length; ++j) {
      cell = row.childNodes[j];
      loc = locOfCell(cell);
      while (height[jj] > i) {
        jj++;
      }
      for (var k = 0; k < loc[3]; ++k) {
        height[jj + k] = i + loc[2];
      }
      jj += loc[3];
    }
  }
  var nCol = height.indexOf(0);
  gridElt.attr('data-width', nCol);
  return nCol;
};
CDGrid.prototype.getSize = function () {
  return {
    width: parseInt(this.$grid.attr('data-width'), 10),
    height: this.$grid.childNodes.length
  };
};
CDGrid.prototype.fixRowLength = function (rowLength) {
  rowLength = rowLength || 1;
  var row, cell;
  var gridElt = this.$grid;
  var height = Array(100).fill(0);
  var jj, colspan, rowspan;
  for (var i = 0; i < gridElt.childNodes.length; ++i) {
    row = gridElt.childNodes[i];
    jj = 0;
    for (var j = 0; j < row.childNodes.length; ++j) {
      cell = row.childNodes[j];
      colspan = parseInt(cell.attr('colspan'), 10) || 1;
      rowspan = parseInt(cell.attr('rowspan'), 10) || 1;
      while (height[jj] > i) {
        jj++;
      }
      for (var k = 0; k < colspan; ++k) {
        height[jj + k] = i + rowspan;
      }
      jj += colspan;
    }
    for (j = jj; j < rowLength; ++j) {
      row.addChild(this.makeCell({}).attr('data-loc', i + ',' + j));
      height[j] = i + 1;
    }
  }
};
CDGrid.prototype.getCellsFromLoc = function (loc) {
  var row, cell, cellLoc;
  var res = [];
  var gridElt = this.$grid;
  for (var i = 0; i < gridElt.childNodes.length; ++i) {
    row = gridElt.childNodes[i];
    for (var j = 0; j < row.childNodes.length; ++j) {
      cell = row.childNodes[j];
      cellLoc = locOfCell(cell);
      if (locCollapse(cellLoc, loc)) res.push(cell);
    }
  }
  var newLoc = locOfCells(res);
  if (!locEqual(newLoc, loc)) res = this.getCellsFromLoc(newLoc);
  return res;
};
CDGrid.prototype.addRowAt = function (newRowIdx) {
  var height = Array(50).fill(0);
  var row, cell, jj;
  var gridElt = this.$grid;
  var loc;
  if (gridElt.firstChild && gridElt.firstChild.lastChild) loc = locOfCell(gridElt.firstChild.lastChild);else loc = [0, 0, 1, 1];
  var rowLength = loc[1] + loc[3];
  for (var i = 0; i < gridElt.childNodes.length; ++i) {
    if (i === newRowIdx) {
      row = this.makeRow({
        cell: []
      });
      gridElt.addChildBefore(row, gridElt.childNodes[i]);
      jj = 0;
      while (jj < rowLength) {
        while (height[jj] > newRowIdx) {
          jj++;
        }
        row.addChild(this.makeCell({}));
        height[jj] = i + 1;
        jj++;
      }
      ++i;
    }
    row = gridElt.childNodes[i];
    jj = 0;
    for (var j = 0; j < row.childNodes.length; ++j) {
      while (height[jj] > i + 1) {
        jj++;
      }
      cell = row.childNodes[j];
      loc = locOfCell(cell);
      if (i <= newRowIdx && i + loc[2] > newRowIdx) {
        loc[2]++;
        cell.attr('rowspan', loc[2]);
      }
      for (var k = 0; k < loc[3]; ++k) {
        height[jj + k] = i + loc[2];
      }
      jj += loc[3];
    }
  }
  if (newRowIdx === gridElt.childNodes.length) {
    row = this.makeRow({
      cell: []
    });
    gridElt.addChild(row);
    jj = 0;
    while (jj < rowLength) {
      while (height[jj] > newRowIdx) {
        jj++;
      }
      row.addChild(this.makeCell({}));
      jj++;
    }
  }
  this.updateCellLoc();
};
CDGrid.prototype.addColAt = function (newColIdx) {
  var height = Array(50).fill(0);
  var row, cell, jj;
  var gridElt = this.$grid;
  var colspan, rowspan;
  for (var i = 0; i < gridElt.childNodes.length; ++i) {
    row = gridElt.childNodes[i];
    jj = 0;
    for (var j = 0; j < row.childNodes.length; ++j) {
      while (height[jj] > i) {
        jj++;
      }
      cell = row.childNodes[j];
      colspan = parseInt(cell.getAttribute('colspan'), 10) || 1;
      rowspan = parseInt(cell.getAttribute('rowspan'), 10) || 1;
      if (jj === newColIdx) {
        row.addChildBefore(this.makeCell({}), cell);
        height[jj] = i + 1;
        j++;
        jj++;
      } else if (jj <= newColIdx && jj + colspan > newColIdx) {
        colspan++;
        cell.attr('colspan', colspan);
      }
      height[jj] = i + rowspan;
      jj += colspan;
    }
    if (jj === newColIdx) {
      row.addChild(this.makeCell({}));
      height[jj] = i + 1;
    }
  }
  this.updateCellLoc();
};

/**
 *
 * @param rowIdx
 * @param {number=} rowHeight
 */
CDGrid.prototype.removeRowAt = function (rowIdx, rowHeight) {
  if (!(0, _utils.isNaturalNumber)(rowHeight)) rowHeight = 1;
  rowHeight = rowHeight || 1;
  var body = this.$grid;
  var row, cell;
  var loc;
  var rmLoc = [rowIdx, 0, rowHeight, 100];
  var needSplitLocs = [];
  var needSplitCells = [];
  var childSplitCells = [];
  var i, j;
  for (i = 0; i < body.childNodes.length; ++i) {
    row = body.childNodes[i];
    for (j = 0; j < row.childNodes.length; ++j) {
      cell = row.childNodes[j];
      loc = locOfCell(cell);
      if ((loc[2] > 1 || loc[3] > 1) && locCollapse(rmLoc, loc) && !locInLoc(loc, rmLoc)) {
        needSplitLocs.push(loc);
        needSplitCells.push(cell);
        childSplitCells.push(Array.prototype.slice.call(cell.childNodes));
      }
    }
  }
  for (i = 0; i < needSplitCells.length; ++i) {
    this.splitCell(needSplitCells[i]);
    loc = needSplitLocs[i];
    if (loc[0] < rowIdx) {
      if (loc[0] + loc[2] <= rowIdx + rowHeight) {
        loc[2] = rowIdx - loc[0];
      } else {
        loc[2] -= rowHeight;
      }
    } else {
      loc[2] -= rowIdx + rowHeight - loc[0];
    }
  }
  for (i = rowIdx + rowHeight - 1; i >= rowIdx; --i) {
    body.childNodes[i].remove();
  }
  this.updateCellLoc();
  var cells;
  for (i = 0; i < needSplitLocs.length; ++i) {
    loc = needSplitLocs[i];
    cells = this.getCellsFromLoc(loc);
    cells[0].addChild(childSplitCells[i]);
    this.mergeCells(cells);
  }
  this.updateCellLoc();
};

/**
 *
 * @param colIdx
 * @param {number=} colWidth
 */
CDGrid.prototype.removeColAt = function (colIdx, colWidth) {
  if (!(0, _utils.isNaturalNumber)(colWidth)) colWidth = 1;
  colWidth = colWidth || 1;
  var gridElt = this.$grid;
  var row, cell;
  var loc;
  var rmLoc = [0, colIdx, 100, colWidth];
  var needSplitLocs = [];
  var needSplitCells = [];
  var childSplitCells = [];
  var i, j;
  for (i = 0; i < gridElt.childNodes.length; ++i) {
    row = gridElt.childNodes[i];
    for (j = 0; j < row.childNodes.length; ++j) {
      cell = row.childNodes[j];
      loc = locOfCell(cell);
      if ((loc[2] > 1 || loc[3] > 1) && locCollapse(rmLoc, loc) && !locInLoc(loc, rmLoc)) {
        needSplitLocs.push(loc);
        needSplitCells.push(cell);
        childSplitCells.push(Array.prototype.slice.call(cell.childNodes));
      }
    }
  }
  for (i = 0; i < needSplitCells.length; ++i) {
    this.splitCell(needSplitCells[i]);
    loc = needSplitLocs[i];
    if (loc[1] < colIdx) {
      if (loc[1] + loc[3] <= colIdx + colWidth) {
        loc[3] = colIdx - loc[1];
      } else {
        loc[3] -= colWidth;
      }
    } else {
      loc[3] -= colIdx + colWidth - loc[1];
    }
  }
  var cells = this.getCellsFromLoc(rmLoc);
  cells.forEach(function (cell) {
    return cell.remove();
  });
  this.updateCellLoc();
  for (i = 0; i < needSplitLocs.length; ++i) {
    loc = needSplitLocs[i];
    cells = this.getCellsFromLoc(loc);
    cells[0].addChild(childSplitCells[i]);
    this.mergeCells(cells);
  }
  this.updateCellLoc();
};
CDGrid.prototype.mergeCells = function (cells) {
  var loc = locOfCells(cells);
  var cell0 = cells[0];
  cell0.attr({
    rowspan: loc[2],
    colspan: loc[3]
  });
  for (var i = 1; i < cells.length; ++i) {
    cell0.addChild((0, _ACore.$$)('.as-cag-var', cells[i]));
    cells[i].remove();
  }
  this.updateCellLoc();
};
CDGrid.prototype.splitCell = function (originalCell) {
  // var originalLoc = locOfCell(originalCell);
  var height = Array(100).fill(0);
  var loc;
  var gridElt = this.$grid;
  var size = this.getSize();
  loc = [0, 0, size.height, size.width];
  var rowLength = loc[1] + loc[3];
  originalCell.attr('rowspan', undefined);
  originalCell.attr('colspan', undefined);
  var row, cell;
  var jj;
  for (var i = 0; i < gridElt.childNodes.length; ++i) {
    row = gridElt.childNodes[i];
    jj = 0;
    while (height[jj] > i) {
      ++jj;
    }
    for (var j = 0; j < row.childNodes.length; ++j) {
      cell = row.childNodes[j];
      loc = locOfCell(cell);
      while (jj < loc[1]) {
        if (height[jj] <= i) {
          row.addChildBefore(this.makeCell({}), cell);
          height[jj] = i + 1;
          ++j;
        }
        ++jj;
      }
      for (var k = 0; k < loc[3]; ++k) {
        height[jj + k] = i + loc[2];
      }
      jj += loc[3];
      while (height[jj] > i) {
        ++jj;
      }
    }
    while (jj < rowLength) {
      row.addChild(this.makeCell({}));
      height[jj] = i + 1;
      ++jj;
      ++j;
    }
  }
  this.updateCellLoc();
};

/**
 * @typedef CDGData
 * @property {CDGDataRow[]}
 */

/**
 * @typedef CDGDataRow
 * @property {CDGDataCell[]}
 */

/**
 * @typedef CDGDataCell
 * @property {{}} style
 * @property {string} text
 */

Object.defineProperty(CDGrid.prototype, 'data', {
  set: function set(value) {
    var _this3 = this;
    this.$grid.clearChild();
    var rows = value && value.rows || [];
    if (rows.length === 0) rows.push({
      cells: [{}]
    });
    this.$grid.addChild(rows.map(function (it) {
      return _this3.makeRow(it);
    }));
    var nCol = this.updateCellLoc();
    this.fixRowLength(nCol);
  },
  get: function get() {
    var _this4 = this;
    var res = {};
    res.rows = Array.prototype.map.call(this.$grid.childNodes, function (rowElt) {
      var rowData = {};
      rowData.cells = Array.prototype.map.call(rowElt.childNodes, function (cellElt) {
        return _this4.dataOfCell(cellElt);
      });
      return rowData;
    });
    return res;
  },
  configurable: true
});

/**
 * @extends CDGrid
 * @param {CDContext} context
 * @param {CDTable} table
 * @constructor
 */
function CDTableBody(context, table) {
  CDGrid.call(this, context);
  this.table = table;
}
(0, _OOP.mixClass)(CDTableBody, CDGrid);
CDTableBody.prototype.gridCt = 'tbody';
CDTableBody.prototype.makeCell = function (data) {
  var _this5 = this;
  var variables = data.variables || [];
  var attr = {};
  if ((0, _utils.isNaturalNumber)(data.rowSpan) && data.rowSpan > 1) {
    attr.rowspan = data.rowSpan;
  } else if ((0, _utils.isNaturalNumber)(data.rowspan) && data.rowspan > 1) {
    attr.rowspan = data.rowspan;
  }
  if ((0, _utils.isNaturalNumber)(data.colSpan) && data.colSpan > 1) {
    attr.colspan = data.colSpan;
  } else if ((0, _utils.isNaturalNumber)(data.colspan) && data.colspan > 1) {
    attr.colspan = data.colspan;
  }
  return (0, _ACore._)({
    tag: 'td',
    attr: attr,
    "class": 'as-ca-cell',
    style: data.style || {},
    child: variables.map(function (it) {
      it = normalizeUsedVariable(it);
      var name = it.name;
      return _this5.context.varMng.pickVariable(name);
    })
  });
};
CDTableBody.prototype.dataOfCell = function (cellElt) {
  var cellData = CDGrid.prototype.dataOfCell.call(this, cellElt);
  var variables = (0, _ACore.$$)('.as-cag-var', cellElt).map(function (varElt) {
    return variableDataOfElt(varElt);
  }).filter(function (x) {
    return !!x;
  });
  if (variables.length > 0) cellData.variables = variables;
  return cellData;
};

/**
 *
 * @param {CDContext} context
 * @constructor
 */
function CDTable(context) {
  /**
   *
   * @type {CDContext}
   */
  this.context = context;
  this.header = new CDTableHeader(context, this);
  this.body = new CDTableBody(context, this);
  this.$table = (0, _ACore._)({
    tag: 'table',
    "class": 'as-cdg-table',
    child: [this.header.$grid, this.body.$grid]
  });
  this.header.hidden = true; //default
  this.header.data = {
    rows: [{
      cells: [{}]
    }]
  };
}
CDTable.prototype.autoFixRowsWidth = function () {
  var hL = this.header.calcWidth();
  var bL = Math.max(1, this.body.calcWidth());
  if (hL < bL) {
    this.header.fixRowLength(bL);
  } else if (hL > bL) {
    this.body.fixRowLength(bL);
  }
};

/**
 * @extends CDGrid
 *  @param {CDContext} context
 * @param {CDTable} table
 * @constructor
 */
function CDTableHeader(context, table) {
  CDGrid.call(this, context);
  this.table = table;
}
(0, _OOP.mixClass)(CDTableHeader, CDGrid);
CDTableHeader.prototype.gridCt = 'thead';
CDTableHeader.prototype.cellCt = 'th';
CDTableHeader.prototype.makeCell = function (data) {
  var _this6 = this;
  var res = CDGrid.prototype.makeCell.call(this, data);
  var beforeValue;
  var input = (0, _ACore._)({
    tag: _PreInput["default"],
    attr: {
      contenteditable: 'true',
      spellcheck: 'false'
    },
    props: {
      value: (data.text || ' ') + ''
    },
    on: {
      focus: function focus() {
        beforeValue = input.value;
      },
      blur: function blur() {
        if (input.value !== beforeValue) {
          _this6.context.lcEmitter.emit(EV_CELL_DATA_CHANGE);
        }
        beforeValue = undefined;
      }
    }
  });
  res.addChild(input);
  return res;
};
CDTableHeader.prototype.dataOfCell = function (cellElt) {
  var cellData = CDGrid.prototype.dataOfCell.call(this, cellElt);
  cellData.text = cellElt.firstChild.value;
  return cellData;
};
Object.defineProperty(CDTableHeader.prototype, 'hidden', {
  set: function set(value) {
    if (value) {
      this.$grid.addClass('as-hidden');
    } else {
      this.$grid.removeClass('as-hidden');
    }
  },
  get: function get() {
    return this.$grid.hasClass('as-hidden');
  },
  configurable: true
});

/**
 *
 * @param {CDContext} context
 * @constructor
 */
function CDSelectController(context) {
  var _this7 = this;
  this.context = context;
  this.editor = context.editor;
  this.lcEmitter = context.lcEmitter;
  Object.keys(this.constructor.prototype).filter(function (k) {
    return k.startsWith('ev_');
  }).forEach(function (key) {
    return _this7[key] = _this7[key].bind(_this7);
  });
  this.selectedGrid = null;
  this.selectedCells = [];
  (0, _ACore._)({
    tag: 'hanger',
    elt: this.context.table.$table,
    on: {
      draginit: this.ev_dragInit,
      drag: this.ev_drag,
      dragdeinit: this.ev_dragDeinit
    }
  });
}
CDSelectController.prototype.cellOf = function (o) {
  while (o) {
    if (o.hasClass && o.hasClass('as-ca-cell')) return o;
    o = o.parentElement;
  }
  return null;
};

/**
 *
 * @param {Vec2} pos
 */
CDSelectController.prototype.cellOfScreenPos = function (pos) {
  var row, cell, bound;
  var body = this.startingGrid.$grid;
  for (var i = 0; i < body.childNodes.length; ++i) {
    row = body.childNodes[i];
    for (var j = 0; j < row.childNodes.length; ++j) {
      cell = row.childNodes[j];
      bound = _Rectangle["default"].fromClientRect(cell.getBoundingClientRect());
      if (bound.containsPoint(pos)) return cell;
    }
  }
  return null;
};
CDSelectController.prototype.ev_dragInit = function (event) {
  var cell = null;
  if (event.target.hasClass && event.target.hasClass('as-ca-cell')) {
    cell = event.target;
  }
  this.startingCell = cell;
  this.mouseDownCell = this.cellOf(event.target);
  if (this.mouseDownCell) {
    this.startingGrid = this.mouseDownCell.isDescendantOf(this.context.table.header.$grid) ? this.context.table.header : this.context.table.body;
  }
  this.hoveringCells = [];
};
CDSelectController.prototype.ev_drag = function (event) {
  if (!this.startingCell) return;
  var curCell = this.cellOfScreenPos(event.currentPoint);
  if (!curCell) return;
  var startingLoc = locOfCell(this.startingCell);
  var endingLoc = locOfCell(curCell);
  var selectedLoc = mergeLoc(startingLoc, endingLoc);
  this.hoveringCells.forEach(function (cell) {
    cell.removeClass('as-hovering');
  });
  this.hoveringCells = this.startingGrid.getCellsFromLoc(selectedLoc);
  this.hoveringCells.forEach(function (cell) {
    cell.addClass('as-hovering');
  });
};
CDSelectController.prototype.ev_dragDeinit = function (event) {
  this.hoveringCells.forEach(function (cell) {
    cell.removeClass('as-hovering');
  });
  if (this.hoveringCells.length > 0) {
    this.selectCells(this.hoveringCells);
  } else if (this.cellOf(event.target) === this.mouseDownCell) {
    this.selectCells([this.mouseDownCell]);
  }
  this.hoveringCells = null;
  this.hoveringCells = [];
};
CDSelectController.prototype.selectCells = function (cells) {
  this.selectedCells.forEach(function (cell) {
    return cell.removeClass('as-selected');
  });
  this.selectedCells = cells.slice();
  this.selectedCells.forEach(function (cell) {
    return cell.addClass('as-selected');
  });
  var focsVar = (0, _ACore.$)('td.as-selected .as-cag-var.as-focus', this.editor);
  if (!focsVar) {
    focsVar = (0, _ACore.$)('td.as-selected .as-cag-var', this.editor);
    this.context.varMng.focus(focsVar || null);
  }
  var sel, range;
  if (!focsVar) {
    focsVar = (0, _ACore.$)('th.as-selected preinput', this.editor);
    if (focsVar) {
      sel = document.getSelection();
      if (sel.rangeCount) {
        range = sel.getRangeAt(0);
        if (range.startContainer.nodeType !== Node.TEXT_NODE || range.startContainer.parentElement !== focsVar) {
          focsVar.focus();
          focsVar.select(focsVar.value.length);
        }
      } else {
        focsVar.focus();
        focsVar.select(focsVar.value.length);
      }
    }
  }
  this.lcEmitter.emit(EV_SELECTED_CELL_CHANGE);
};

/**
 *
 * @param  context
 * @constructor
 */
function CDGVariableManager(context) {
  var _this8 = this;
  this.context = context;
  this.editor = context.editor;
  this.lcEmitter = context.lcEmitter;
  /**
   *
   * @type {CDGrid}
   */
  this.body = context.table.body;
  this.createView();
  this._variables = [];
  this.variableDict = {};
  this.pickedVariables = {};
  this.availableVariables = {};
  Object.keys(this.constructor.prototype).filter(function (k) {
    return k.startsWith('ev_');
  }).forEach(function (key) {
    return _this8[key] = _this8[key].bind(_this8);
  });
  this.focusVariable = null;
}
CDGVariableManager.prototype.focus = function (varElt) {
  if (this.focusVariable) {
    this.focusVariable.removeClass('as-focus');
  }
  this.focusVariable = varElt;
  if (this.focusVariable) {
    this.focusVariable.addClass('as-focus');
  }
};
CDGVariableManager.revokeResource = function () {
  this.editor = undefined;
  this.grid = undefined;
};
CDGVariableManager.prototype.createView = function () {
  this.$varMng = (0, _ACore._)({
    "class": 'as-cag-var-mng',
    child: []
  });
  this.editor.addChildAfter(this.$varMng, this.context.formatTool.$tool);
};

/**
 *
 * @param {string} name
 * @returns {*}
 */
CDGVariableManager.prototype.makeVariable = function (name) {
  var _this9 = this;
  var info = this.variableDict[name] || {};
  var elt = (0, _ACore._)({
    tag: 'hanger',
    "class": 'as-cag-var',
    attr: {
      'data-name': name
    },
    child: [
      // { tag: 'span', child: { text: name } }
    ],
    props: {
      hangOn: 3
    },
    on: {
      dragstart: this.ev_dragStart,
      dragend: this.ev_dragEnd,
      drag: this.ev_drag,
      click: function click() {
        _this9.focus(elt);
      }
    }
  });
  if (typeof info.title === "string") {
    elt.attr('data-title', info.title);
  }
  if (info) {
    elt.attr('data-default-title', info.title);
  }
  return elt;
};
CDGVariableManager.prototype.pickVariable = function (name) {
  if (this.availableVariables[name]) {
    this.pickedVariables[name] = this.availableVariables[name];
    delete this.availableVariables[name];
  } else if (!this.pickedVariables[name]) {
    this.pickedVariables[name] = this.makeVariable(name);
  }
  return this.pickedVariables[name];
};
CDGVariableManager.prototype.rejectVariable = function (name) {
  if (this.pickedVariables[name]) {
    this.availableVariables[name] = this.pickedVariables[name];
    delete this.pickedVariables[name];
  }
  this.$varMng.addChild(this.availableVariables[name]);
  return this.availableVariables[name];
};
CDGVariableManager.prototype.rejectAllVariables = function () {
  var _this10 = this;
  Object.keys(this.pickedVariables).forEach(function (name) {
    return _this10.rejectVariable(name);
  });
};
CDGVariableManager.prototype.variableElementOf = function (o) {
  var name = varNameOf(o);
  if (name === "string") return this.availableVariables[o] || this.pickedVariables[o];
  if ((0, _Dom.isDomNode)(o)) {
    while (o) {
      if (o.hasClass && o.hasClass('as-cag-var')) {
        return o;
      }
      o = o.parentElement;
    }
  }
  return null;
};
CDGVariableManager.prototype.findVariableLocation = function (rect) {
  var cells = (0, _ACore.$$)('.as-ca-cell', this.body.$grid);
  var best = 0;
  var cellRect;
  var bestCell;
  var square;
  var i;
  for (i = 0; i < cells.length; ++i) {
    cellRect = _Rectangle["default"].fromClientRect(cells[i].getBoundingClientRect());
    square = rect.collapsedSquare(cellRect);
    if (square > best) {
      bestCell = cells[i];
    }
  }
  var res = {
    "in": null
  };
  if (bestCell) {
    res["in"] = bestCell;
  } else {
    res["in"] = null;
  }
  var varEltList, varElt, varBound;
  if (res["in"]) {
    varEltList = (0, _ACore.$$)('.as-cag-var', res["in"]);
    res.bf = 'end';
    for (i = varEltList.length - 1; i >= 0; --i) {
      varElt = varEltList[i];
      if (!varElt.attr('data-default-title')) continue;
      varBound = _Rectangle["default"].fromClientRect(varElt.getBoundingClientRect());
      if (varBound.centerPoint().x > rect.centerPoint().x) {
        res.bf = varElt;
      } else break;
    }
    return res;
  } else {
    return null;
  }
};

/**
 *
 * @param {AElement=} elt
 */
CDGVariableManager.prototype.openEditVariableDialog = function (elt) {
  var _this11 = this;
  elt = elt || this.focusVariable;
  if (!elt) return;
  var flushData = function flushData() {
    var newTile = checkbox.checked ? undefined : titleInput.value;
    var oldTile = elt.attr('data-title');
    if (typeof oldTile !== "string") oldTile = undefined;
    if (newTile !== oldTile) {
      elt.attr('data-title', newTile);
      _this11.lcEmitter.emit(EV_CELL_DATA_CHANGE);
    }
  };
  var finish = function finish() {
    flushData();
    _cancel();
  };
  var _cancel = function cancel() {
    document.removeEventListener('click', clickOut);
    elt = null;
    follower.followTarget = null;
    follower.clearChild();
    follower.remove();
    _ResizeSystem["default"].removeTrash();
    finish = undefined;
    _cancel = undefined;
    clickOut = undefined;
  };
  var clickOut = function clickOut(event) {
    if ((0, _EventEmitter.hitElement)(follower, event)) return;
    _cancel();
  };
  setTimeout(function () {
    document.addEventListener('click', clickOut);
  }, 100);
  var checkboxUpdate = function checkboxUpdate() {
    if (checkbox.checked) {
      titleInput.disabled = true;
      titleInput.savedData = titleInput.value;
      titleInput.value = '';
    } else {
      titleInput.disabled = false;
      titleInput.value = titleInput.value || titleInput.savedData || '';
    }
  };
  var follower = (0, _ACore._)({
    tag: _Follower["default"],
    "class": ['as-dropdown-box-common-style', 'as-cdg-variable-edit-dialog'],
    style: {
      zIndex: (0, _utils.findMaxZIndex)(elt) + 10
    },
    child: [{
      style: {
        fontWeight: 'bold',
        padding: '10px 5px'
      },
      child: {
        text: 'Tiêu đề'
      }
    }, {
      "class": 'as-table-grid',
      child: [{
        "class": 'as-table-grid-row',
        child: [{
          "class": 'as-table-grid-cell',
          child: {
            tag: 'span',
            child: {
              text: 'Mặc định'
            }
          }
        }, {
          "class": 'as-table-grid-cell',
          child: {
            tag: 'checkboxinput',
            props: {
              checked: typeof elt.attr('data-title') !== "string"
            },
            on: {
              change: checkboxUpdate
            }
          }
        }]
      }, {
        "class": 'as-table-grid-row',
        child: [{
          "class": 'as-table-grid-cell',
          child: {
            tag: 'span',
            child: {
              text: 'Giá trị'
            }
          }
        }, {
          "class": 'as-table-grid-cell',
          child: {
            tag: 'input',
            attr: {
              type: 'text'
            },
            props: {
              value: elt.attr('data-title') || ''
            },
            "class": 'as-text-input'
          }
        }]
      }]
    }, {
      style: {
        textAlign: 'center',
        padding: '10px'
      },
      child: [{
        tag: 'flexiconbutton',
        props: {
          text: 'Xác nhận'
        },
        style: {
          marginRight: '20px'
        },
        on: {
          click: finish
        }
      }, {
        tag: 'flexiconbutton',
        props: {
          text: 'Hủy'
        },
        on: {
          click: _cancel
        }
      }]
    }],
    props: {
      followTarget: elt
    }
  }).addTo(document.body);
  var checkbox = (0, _ACore.$)('checkboxinput', follower);
  var titleInput = (0, _ACore.$)('input[type="text"]', follower);
  checkboxUpdate();
};
CDGVariableManager.prototype.ev_dragStart = function (event) {
  var varElt = this.variableElementOf(event.target);
  var eltBound = varElt.getBoundingClientRect();
  var offset = event.currentPoint.sub(new _Vec["default"](eltBound.left, eltBound.top));
  this.draggingElt = varElt;
  this.dragOffset = offset;
  this.clonedElt = (0, _ACore.$)(varElt.cloneNode(true)).addClass('as-clone-var').addStyle({
    position: 'fixed',
    zIndex: (0, _utils.findMaxZIndex)(varElt) + 2,
    left: eltBound.left + 'px',
    top: eltBound.top + 'px'
  }).addTo(document.body);
  varElt.addStyle('opacity', 0.8);
  this.hoverCell = null;
};
CDGVariableManager.prototype.ev_drag = function (event) {
  var newPos = event.currentPoint.sub(this.dragOffset);
  this.clonedElt.addStyle({
    left: newPos.x + 'px',
    top: newPos.y + 'px'
  });
  var pointerRect = new _Rectangle["default"](event.currentPoint.x - 10, event.currentPoint.y - 10, 20, 20);
  this.newLocation = this.findVariableLocation(pointerRect);
  var newLocation = this.newLocation;
  if (newLocation) {
    if (newLocation["in"] !== this.hoverCell) {
      if (this.hoverCell) this.hoverCell.removeClass('as-drag-over');
      this.hoverCell = newLocation["in"];
      this.hoverCell.addClass('as-drag-over');
    }
    if (isChangeParent(newLocation["in"], this.draggingElt, newLocation.bf)) {
      this.hoverCell.addClass('as-bf');
      this.hoverCell.addStyle('--hover-x', hoverXOf(newLocation["in"], newLocation.bf) + 'px');
    } else {
      this.hoverCell.removeClass('as-bf').removeStyle('--hover-x');
    }
  } else {
    if (this.hoverCell) this.hoverCell.removeClass('as-drag-over').removeClass('as-bf').removeStyle('--hover-x');
  }
};
CDGVariableManager.prototype.ev_dragEnd = function () {
  this.draggingElt.removeStyle('opacity');
  this.clonedElt.remove();
  if (this.hoverCell) this.hoverCell.removeClass('as-drag-over');
  var name = this.draggingElt.attr('data-name');
  var newLocation = this.newLocation;
  if (newLocation) {
    if (isChangeParent(newLocation["in"], this.draggingElt, newLocation.bf)) {
      this.draggingElt.selfRemove();
      if (newLocation.bf === 'end') {
        newLocation["in"].addChild(this.draggingElt);
      } else {
        newLocation["in"].addChildBefore(this.draggingElt, newLocation.bf);
      }
      this.pickVariable(name);
      this.context.selectCtrl.selectCells([this.newLocation["in"]]);
      this.context.varMng.focus(this.draggingElt);
      this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
    }
  } else {
    if (this.draggingElt.parentElement !== this.$varMng) {
      this.rejectVariable(name);
      this.$varMng.addChild(this.draggingElt);
      this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
    }
  }
};
CDGVariableManager.prototype.updateVariableInfo = function () {
  var i, elt;
  var varInfo;
  for (i in this.availableVariables) {
    elt = this.availableVariables[i];
    varInfo = this.variableDict[i];
    if (varInfo) elt.attr('data-default-title', varInfo.title);
  }
  for (i in this.pickedVariables) {
    elt = this.pickedVariables[i];
    varInfo = this.variableDict[i];
    if (varInfo) elt.attr('data-default-title', varInfo.title);
  }
  for (i = 0; i < this._variables.length; ++i) {
    varInfo = this._variables[i];
    if (this.pickedVariables[varInfo.name] || this.availableVariables[varInfo.name]) continue;
    this.availableVariables[varInfo.name] = this.makeVariable(varInfo.name);
    this.$varMng.addChild(this.availableVariables[varInfo.name]);
  }
};

/// nếu không c trong danh sách thì tự bỏ ra
Object.defineProperty(CDGVariableManager.prototype, 'variables', {
  set: function set(variables) {
    if (!Array.isArray(variables)) variables = [];
    variables = variables.map(function (v) {
      return normalizeVariableData(v);
    }).filter(function (x) {
      return !!x;
    });
    var t = variables.reduce(function (ac, cr) {
      if (!ac.dict[cr.name]) {
        ac.dict[cr.name] = cr;
        ac.arr.push(cr);
      }
      return ac;
    }, {
      arr: [],
      dict: {}
    });
    this._variables = t.arr;
    this.variableDict = t.dict;
    this.updateVariableInfo();

    //
    // this.availableVariables = {};
    // this.$varMng.clearChild();
  },

  get: function get() {
    return this._variables;
  }
});

/**
 *
 * @param {CDContext} context
 * @constructor
 */
function CDUndoManager(context) {
  this.context = context;
  this.data = [];
  this.idx = -1;
}
CDUndoManager.prototype.revokeResource = function () {
  this.data = [];
  this.idx = -1;
};
CDUndoManager.prototype.reset = function () {
  this.data = [];
  this.idx = -1;
  return this;
};
CDUndoManager.prototype.commit = function () {
  while (this.data.length - 1 > this.idx) {
    this.data.pop();
  }
  var item = {
    header: this.context.table.header.data,
    data: this.context.table.body.data,
    headerHidden: this.context.table.header.hidden
  };
  this.data.push(item);
  this.idx = this.data.length - 1;
  return this;
};
CDUndoManager.prototype._applyTop = function () {
  var item = this.data[this.idx];
  this.context.varMng.rejectAllVariables();
  this.context.table.header.data = item.header;
  this.context.table.header.hidden = item.headerHidden;
  this.context.table.body.data = item.data;
  this.context.lcEmitter.emit(EV_UNDO_APPLY);
};
CDUndoManager.prototype.undo = function () {
  if (!this.canUndo()) return this;
  this.idx--;
  this._applyTop();
  return this;
};
CDUndoManager.prototype.redo = function () {
  if (!this.canRedo()) return this;
  this.idx++;
  this._applyTop();
  return this;
};
CDUndoManager.prototype.canRedo = function () {
  return this.idx + 1 < this.data.length;
};
CDUndoManager.prototype.canUndo = function () {
  return this.idx > 0;
};

/**
 *
 * @param {CDContext} context
 * @constructor
 */
function CDGFormatTool(context) {
  var _this12 = this;
  this.context = context;
  this.table = context.table;
  this.editor = context.editor;
  this.lcEmitter = context.lcEmitter;
  Object.keys(this.constructor.prototype).filter(function (k) {
    return k.startsWith('ev_');
  }).forEach(function (k) {
    return _this12[k] = _this12[k].bind(_this12);
  });
  this.$tool = (0, _ACore._)({
    "class": 'as-table-of-text-input-tool',
    child: [{
      "class": 'as-table-of-text-input-tool-group',
      child: [{
        tag: _RibbonButton["default"],
        attr: {
          "data-command": 'toggle_header'
        },
        props: {
          items: [{
            text: 'Show Header',
            arg: true,
            icon: (0, _ACore._)(_table_header_add["default"]).addClass('as-show-header')
          }, {
            text: 'Hide Header',
            arg: false,
            icon: _table_header_add["default"]
          }],
          icon: (0, _ACore._)(_table_header_add["default"]).addClass('as-show-header')
        }
      }]
    }, {
      "class": 'as-table-of-text-input-tool-group',
      child: [{
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        child: 'span.mdi.mdi-undo',
        attr: {
          'data-command': 'undo',
          title: 'Undo'
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        child: 'span.mdi.mdi-redo',
        attr: {
          'data-command': 'redo',
          title: 'Redo'
        }
      }]
    }, {
      "class": 'as-table-of-text-input-tool-group',
      child: [{
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        child: 'span.mdi.mdi-table-column-plus-before',
        attr: {
          'data-command': 'left',
          title: 'Insert 1 column left'
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        child: 'span.mdi.mdi-table-column-plus-after',
        attr: {
          'data-command': 'right',
          title: 'Insert 1 column right'
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        child: 'span.mdi.mdi-table-row-plus-before',
        attr: {
          'data-command': 'above',
          title: 'Insert 1 row above'
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        child: 'span.mdi.mdi-table-row-plus-after',
        attr: {
          'data-command': 'bellow',
          title: 'Insert 1 row bellow'
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command', 'as-variant-danger'],
        attr: {
          'data-command': 'removeCol',
          title: 'Delete column'
        },
        child: {
          tag: 'span',
          "class": ['mdi', 'mdi-table-column-remove']
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command', 'as-variant-danger'],
        attr: {
          'data-command': 'removeRow',
          title: 'Delete row'
        },
        child: {
          tag: 'span',
          "class": ['mdi', 'mdi-table-row-remove']
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        //can checked
        attr: {
          'data-command': 'merge',
          title: 'Merge Cells'
        },
        child: {
          tag: 'span',
          "class": ['mdi', 'mdi-table-merge-cells']
        }
      }]
    }, {
      "class": 'as-table-of-text-input-tool-group',
      child: [{
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        //can checked
        attr: {
          'data-command': 'textAlignLeft',
          title: 'Format text align left'
        },
        child: {
          tag: 'span',
          "class": ['mdi', 'mdi-format-align-left']
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        //can checked
        attr: {
          'data-command': 'textAlignCenter',
          title: 'Format text align center'
        },
        child: {
          tag: 'span',
          "class": ['mdi', 'mdi-format-align-center']
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        //can checked
        attr: {
          'data-command': 'textAlignRight',
          title: 'Format text align right'
        },
        child: {
          tag: 'span',
          "class": ['mdi', 'mdi-format-align-right']
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        //can checked
        attr: {
          'data-command': 'textFormatBold',
          title: 'Bold'
        },
        child: {
          tag: 'span',
          "class": ['mdi', 'mdi-format-bold']
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        //can checked
        attr: {
          'data-command': 'textFormatItalic',
          title: 'Italic'
        },
        child: {
          tag: 'span',
          "class": ['mdi', 'mdi-format-italic']
        }
      }, {
        tag: 'button',
        "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
        //can checked
        attr: {
          'data-command': 'wrap',
          title: 'Allow text wrap'
        },
        child: {
          tag: 'span',
          "class": ['mdi', 'mdi-wrap']
        }
      }]
    }, {
      tag: 'button',
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
      attr: {
        'data-command': 'edit_variable'
      },
      child: {
        tag: 'span',
        "class": ['mdi', 'mdi-tag-edit-outline']
      }
    }]
  });
  this.editor.addChildAfter(this.$tool, null);
  this.$commandBtns = (0, _ACore.$$)('.as-table-of-text-input-tool >button', this.$tool).concat((0, _ACore.$$)('.as-table-of-text-input-tool-group >button', this.$tool)).reduce(function (ac, btn) {
    var value = btn.attr('data-command');
    if (!value) return ac;
    if (btn.isSupportedEvent('select')) {
      btn.on('select', function (event) {
        _this12.commands[value].exec.call(_this12, event.item.arg);
      });
    } else btn.on('click', function (ev) {
      if (_this12.commands[value].checked) {
        _this12.commands[value].exec.call(_this12, !btn.hasClass('as-checked'));
      } else {
        _this12.commands[value].exec.call(_this12);
      }
    });
    ac[value] = btn;
    return ac;
  }, {});
  this.updateAvailableCommands();
  this.lcEmitter.on(EV_SELECTED_CELL_CHANGE, this.updateAvailableCommands.bind(this));
}
CDGFormatTool.prototype.updateAvailableCommands = function () {
  var _this13 = this;
  Object.values(this.$commandBtns).forEach(function (btn) {
    var name = btn.attr('data-command');
    if (_this13.commands[name] && _this13.commands[name].available) {
      btn.disabled = !_this13.commands[name].available.call(_this13);
    }
    if (_this13.commands[name] && _this13.commands[name].checked) {
      if (_this13.commands[name].checked.call(_this13)) {
        btn.addClass('as-checked');
      } else {
        btn.removeClass('as-checked');
      }
    } else if (_this13.commands[name] && _this13.commands[name].getIcon) {
      btn.icon = _this13.commands[name].getIcon.call(_this13);
    }
  });
};
CDGFormatTool.prototype.addColAt = function (newColIdx) {
  this.table.header.addColAt(newColIdx);
  this.table.body.addColAt(newColIdx);
  this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
};
CDGFormatTool.prototype.addRowAt = function (grid, newRowIdx) {
  //todo: wrong
  grid.addRowAt(newRowIdx);
  this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
};
CDGFormatTool.prototype.removeRowAt = function (grid, rowIdx, rowHeight) {
  grid.removeRowAt(rowIdx, rowHeight);
  this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
};
CDGFormatTool.prototype.removeColAt = function (rowIdx, colWidth) {
  this.table.header.removeColAt(rowIdx, colWidth);
  this.table.body.removeColAt(rowIdx, colWidth);
  this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
};
CDGFormatTool.prototype.mergeCells = function (grid, cells) {
  grid.mergeCells(cells);
  this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
};
CDGFormatTool.prototype.splitCell = function (grid, originalCell) {
  grid.splitCell(originalCell);
  this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
};

/**
 * @this CDGFormatTool
 */
function hasSelectedCell() {
  var selectedCells = this.context.selectCtrl.selectedCells;
  return selectedCells.length > 0;
}
var checkTextAlign = function checkTextAlign(alignVal) {
  return function () {
    var selectedCells = this.context.selectCtrl.selectedCells;
    if (!selectedCells.length) return false;
    for (var i = 0; i < selectedCells.length; ++i) {
      if (textAlignOfElt(selectedCells[i]) !== alignVal) return false;
    }
    return true;
  };
};
CDGFormatTool.prototype.commands = {
  undo: {
    /**
     * @this CDGFormatTool
     */
    available: function available() {
      return this.context.undoMng.canUndo();
    },
    exec: function exec() {
      this.context.undoMng.undo();
    }
  },
  redo: {
    available: function available() {
      return this.context.undoMng.canRedo();
    },
    exec: function exec() {
      this.context.undoMng.redo();
    }
  },
  toggle_header: {
    /**
     * @this CDGFormatTool
     */
    getIcon: function getIcon() {
      if (this.context && this.context.table.header.hidden) {
        return (0, _ACore._)(_table_header_add["default"]);
      } else {
        return (0, _ACore._)(_table_header_add["default"]).addClass('as-show-header');
      }
    },
    /**
     * @this CDGFormatTool
     */
    exec: function exec(arg) {
      if (!this.context.table.header.hidden === !!arg) return;
      this.context.table.header.hidden = !arg;
      this.lcEmitter.emit(EV_SELECTED_CELL_CHANGE);
      this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
    }
  },
  left: {
    available: hasSelectedCell,
    /**
     * @this CDGFormatTool
     */
    exec: function exec() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return;
      var loc = locOfCells(selectedCells);
      var newColIdx = loc[1];
      this.addColAt(newColIdx);
    }
  },
  right: {
    available: hasSelectedCell,
    /**
     * @this CDGFormatTool
     */
    exec: function exec() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return;
      var loc = locOfCells(selectedCells);
      var newColIdx = loc[1] + loc[3];
      this.addColAt(newColIdx);
    }
  },
  above: {
    available: hasSelectedCell,
    /**
     * @this CDGFormatTool
     */
    exec: function exec() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return;
      var loc = locOfCells(selectedCells);
      var newRowIdx = loc[0];
      var grid = this.context.table.body;
      if (this.context.table.header.hasCell(selectedCells[0])) grid = this.context.table.header;
      this.addRowAt(grid, newRowIdx);
    }
  },
  bellow: {
    available: hasSelectedCell,
    /**
     * @this CDGFormatTool
     */
    exec: function exec() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return;
      var loc = locOfCells(selectedCells);
      var newRowIdx = loc[0] + loc[2];
      var grid = this.context.table.body;
      if (this.context.table.header.hasCell(selectedCells[0])) grid = this.context.table.header;
      this.addRowAt(grid, newRowIdx);
    }
  },
  removeRow: {
    available: function available() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      var loc = locOfCells(selectedCells);
      var grid = this.context.table.body;
      if (this.context.table.header.hasCell(selectedCells[0])) grid = this.context.table.header;
      var size = grid.getSize();
      return loc[2] < size.height;
    },
    exec: function exec() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return;
      var loc = locOfCells(selectedCells);
      var grid = this.context.table.body;
      if (this.context.table.header.hasCell(selectedCells[0])) grid = this.context.table.header;
      this.removeRowAt(grid, loc[0], loc[2]);
      this.context.selectCtrl.selectCells([]);
    }
  },
  removeCol: {
    available: function available() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      var loc = locOfCells(selectedCells);
      var grid = this.context.table.body;
      if (this.context.table.header.hasCell(selectedCells[0])) grid = this.context.table.header;
      var size = grid.getSize();
      return loc[3] < size.width;
    },
    exec: function exec() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return;
      var loc = locOfCells(selectedCells);
      // var grid = this.context.table.body;
      // if (this.context.table.header.hasCell(selectedCells[0]))
      //     grid = this.context.table.header;
      this.removeColAt(loc[1], loc[3]);
      this.context.selectCtrl.selectCells([]);
    }
  },
  merge: {
    checked: function checked() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (selectedCells.length !== 1) return false;
      var loc = locOfCells(selectedCells);
      return loc[2] > 1 || loc[3] > 1;
    },
    available: function available() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      var loc = locOfCells(selectedCells);
      return loc[2] > 1 || loc[3] > 1;
    },
    exec: function exec() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      var loc = locOfCells(selectedCells);
      var grid = this.context.table.body;
      if (this.context.table.header.hasCell(selectedCells[0])) grid = this.context.table.header;
      var isMerged = selectedCells.length === 1 && (loc[2] > 1 || loc[3] > 1);
      if (isMerged) this.splitCell(grid, selectedCells[0]);else this.mergeCells(grid, selectedCells);
      selectedCells = grid.getCellsFromLoc(loc);
      this.context.selectCtrl.selectCells(selectedCells);
    }
  },
  edit_variable: {
    /**
     * @this CDGFormatTool
     */
    available: function available() {
      var fv = this.context.varMng && this.context.varMng.focusVariable;
      return !!(fv && fv.isDescendantOf(this.context.editor));
    },
    /**
     * @this CDGFormatTool
     */
    exec: function exec() {
      this.context.varMng.openEditVariableDialog();
    }
  },
  textAlignCenter: {
    checked: checkTextAlign('center'),
    available: hasSelectedCell,
    exec: function exec() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      var changed = false;
      var cell;
      for (var i = 0; i < selectedCells.length; ++i) {
        cell = selectedCells[i];
        if ((cell.style.textAlign || defaultTextAlignOfElt(cell)) !== 'center') {
          cell.style.textAlign = 'center';
          changed = true;
        }
      }
      if (changed) this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
    }
  },
  textAlignRight: {
    checked: checkTextAlign('right'),
    available: hasSelectedCell,
    exec: function exec() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      var changed = false;
      var cell;
      for (var i = 0; i < selectedCells.length; ++i) {
        cell = selectedCells[i];
        if ((cell.style.textAlign || defaultTextAlignOfElt(cell)) !== 'right') {
          cell.style.textAlign = 'right';
          changed = true;
        }
      }
      if (changed) this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
    }
  },
  textAlignLeft: {
    checked: checkTextAlign('left'),
    available: hasSelectedCell,
    exec: function exec() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      var changed = false;
      var cell;
      for (var i = 0; i < selectedCells.length; ++i) {
        cell = selectedCells[i];
        if ((cell.style.textAlign || defaultTextAlignOfElt(cell)) !== 'left') {
          cell.style.textAlign = 'left';
          changed = true;
        }
      }
      if (changed) this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
    }
  },
  wrap: {
    checked: function checked() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      for (var i = 0; i < selectedCells.length; ++i) {
        if (selectedCells[i].style.whiteSpace === 'nowrap') return false;
      }
      return true;
    },
    available: hasSelectedCell,
    exec: function exec(flag) {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      var changed = false;
      var cell;
      for (var i = 0; i < selectedCells.length; ++i) {
        cell = selectedCells[i];
        if (cell.style.whiteSpace === 'nowrap') {
          if (flag) {
            cell.style.whiteSpace = null;
            changed = true;
          }
        } else {
          if (!flag) {
            cell.style.whiteSpace = 'nowrap';
            changed = true;
          }
        }
      }
      if (changed) this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
    }
  },
  textFormatBold: {
    checked: function checked() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      for (var i = 0; i < selectedCells.length; ++i) {
        if (fontWeightOfElt(selectedCells[i]) !== 'bold') return false;
      }
      return true;
    },
    available: hasSelectedCell,
    exec: function exec(flag) {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      var changed = false;
      var cell;
      for (var i = 0; i < selectedCells.length; ++i) {
        cell = selectedCells[i];
        if (fontWeightOfElt(cell) === 'bold') {
          if (!flag) {
            cell.style.fontWeight = 'normal';
            changed = true;
          }
        } else {
          if (flag) {
            cell.style.fontWeight = 'bold';
            changed = true;
          }
        }
      }
      if (changed) this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
    }
  },
  textFormatItalic: {
    checked: function checked() {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      for (var i = 0; i < selectedCells.length; ++i) {
        if (fontStyleOfElt(selectedCells[i]) !== 'italic') return false;
      }
      return true;
    },
    available: hasSelectedCell,
    exec: function exec(flag) {
      var selectedCells = this.context.selectCtrl.selectedCells;
      if (!selectedCells.length) return false;
      var changed = false;
      var cell;
      for (var i = 0; i < selectedCells.length; ++i) {
        cell = selectedCells[i];
        if (fontStyleOfElt(cell) === 'italic') {
          if (!flag) {
            cell.style.fontStyle = 'normal';
            changed = true;
          }
        } else {
          if (flag) {
            cell.style.fontStyle = 'italic';
            changed = true;
          }
        }
      }
      if (changed) this.lcEmitter.emit(EV_CELL_DATA_CHANGE);
    }
  }
};

/***/ }),

/***/ 24733:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ContextCaptor = ContextCaptor;
exports["default"] = void 0;
__webpack_require__(85843);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
__webpack_require__(26155);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _utils = __webpack_require__(84512);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var supportContextEvent = false;
var isMobile = _BrowserDetector["default"].isMobile;

/**
 * @extends AElement
 * @constructor
 */
function ContextCaptor() {
  this.attachedElt = null;
  this.$textarea = $('textarea', this).attr('readonly', 'true').on('contextmenu', this.eventHandler.contextmenu, true);
  this._ss = 0;
  this._isTouch = false;
  /**
   this._target = null;
   * @type {Vec2}
   */
  this._posStart = null;
  /**
   * @type {Vec2}
   */
  this._posCurrent = null;
  this._touchId = -100;
  this._longPressTimeout = -1;
  this._removeTimeout = -1;
  this._fireContextMenuTimeout = -1;
  this.$target = null;
  this._pointerSession = 0;
  this._lastContextSession = 0;
  this.mousedownEvent = null;
  this.sync = Promise.resolve();
}
;
ContextCaptor.prototype.attachTo = function (elt) {
  if (this.attachedElt) {
    this.attachedElt.removeEventListener('mousedown', this.eventHandler.mousedown);
    this.attachedElt.removeEventListener('touchstart', this.eventHandler.mousedown);
    this.attachedElt = null;
  }
  this.attachedElt = elt;
  if (this.attachedElt) {
    this.attachedElt.addEventListener('mousedown', this.eventHandler.mousedown);
    this.attachedElt.addEventListener('touchstart', this.eventHandler.mousedown);
  }
  return this;
};
ContextCaptor.tag = 'ContextCaptor'.toLowerCase();
ContextCaptor.render = function () {
  return _({
    "class": ['absol-context-menu-anchor'],
    extendEvent: 'requestcontextmenu',
    child: ['textarea']
  });
};
ContextCaptor.prototype.showContextMenu = function (x, y, props, onSelectItem) {
  var self = this;
  var anchor = _('.as-context-menu-ctn.absol-context-menu-anchor' + (isMobile ? '.as-anchor-modal' : '')).addTo(document.body);
  var finish = function finish(event) {
    document.removeEventListener('click', finish);
    document.removeEventListener('touchcancel', finish);
    document.removeEventListener('touchend', finish);
    document.removeEventListener('contextmenu', finish);
    anchor.off('click', touchModal);
    self.off('requestcontextmenu', finish);
    setTimeout(function () {
      anchor.selfRemove(); //
    }, 10);
  };
  function touchModal(event) {
    if (event.target.classList && event.target.classList.contains('as-anchor-modal')) {
      finish(event);
    }
  }
  var vmenu = _({
    tag: 'vmenu',
    props: props,
    on: {
      press: onSelectItem || function () {}
    }
  }).addTo(anchor);
  setTimeout(function () {
    if (!isMobile) {
      var screenSize = _Dom["default"].getScreenSize();
      var menuBound = vmenu.getBoundingClientRect();
      if (x + menuBound.width > screenSize.width - 17) {
        x -= menuBound.width;
      }
      if (y + menuBound.height > screenSize.height - 17) {
        y -= menuBound.height;
      }
      anchor.addStyle({
        left: x + 'px',
        top: y + 'px'
      });
    }
    anchor.addClass('absol-active');
    (0, _ACore.$$)('VMenuItem'.toLowerCase(), vmenu).forEach(function (e) {
      if (e.autoFixParentSize) e.autoFixParentSize();
    });
  }, 30);
  setTimeout(function () {
    document.addEventListener('click', finish);
    document.addEventListener('contextmenu', finish);
    self.on('requestcontextmenu', finish);
    anchor.on('click', touchModal);
  }, 10);
};
ContextCaptor.prototype._checkNeedHandle = function (target) {
  var current = target;
  var needHandle = false;
  while (current && !needHandle && !current.classList.contains('as-system-context-menu')) {
    if (current.isSupportedEvent && current.isSupportedEvent('contextmenu')) needHandle = true;
    current = current.parentElement;
  }
  return needHandle;
};
ContextCaptor.prototype._fireContextMenuEvent = function () {
  if (this._lastContextSession >= this._pointerSession) return false; // prevent fire multi-times in a pointer session
  var showed = false;
  this._lastContextSession = this._pointerSession;
  var baseEventData = {
    clientX: this._posCurrent.x,
    clientY: this._posCurrent.y,
    target: this.$target
  };
  this.emit('requestcontextmenu', baseEventData, this);
  var self = this;
  var propagation = true;
  var localEvent = Object.assign({
    clientX: this._posCurrent.x,
    clientY: this._posCurrent.y,
    target: this.$target,
    showContextMenu: function showContextMenu(props, onSelectItem) {
      showed = true;
      self.sync = self.sync.then(function () {
        return new Promise(function (rs) {
          setTimeout(function () {
            self.showContextMenu(self._posCurrent.x, self._posCurrent.y, props, onSelectItem);
            rs();
          }, 30);
        });
      });
    },
    stopPropagation: function stopPropagation() {
      propagation = false;
    }
  }, baseEventData);
  Object.defineProperty(localEvent, 'selectedText', {
    get: function get() {
      return (0, _utils.getSelectionText)();
    }
  });
  var current = this.$target;
  while (current && propagation) {
    if (current.isSupportedEvent && current.isSupportedEvent('contextmenu')) {
      current.emit('contextmenu', localEvent, current, this);
    }
    current = current.parentElement;
  }
  return showed;
};

/**
 * @type {ContextCaptor}
 */
ContextCaptor.eventHandler = {};
ContextCaptor.eventHandler.mousedown = function (event) {
  if (this._touchId != -100) return;
  this._pointerSession++;
  var target;
  var isTouch;
  var touchId;
  var posCurrent;
  var pointer;
  if (event.type == 'touchstart') {
    isTouch = true;
    pointer = event.changedTouches[0];
    touchId = pointer.identifier;
  } else {
    isTouch = false;
    touchId = -1;
    pointer = event;
  }
  target = pointer.target;
  posCurrent = new _Vec["default"](pointer.clientX, pointer.clientY);
  if (isTouch) {
    var dragzone = _BoardTable["default"].prototype._findDragZone(target);
    if (dragzone) return;
    var thisCT = this;
    this._longPressTimeout = setTimeout(function () {
      if (!thisCT._checkNeedHandle(target)) return;
      if (thisCT._removeTimeout > 0) {
        clearTimeout(thisCT._removeTimeout);
        thisCT._removeTimeout = -1;
      }
      thisCT._ss++;
      thisCT.moveTo(thisCT._posCurrent);
      thisCT.active(true);
      thisCT._longPressTimeout = -1;
      if (thisCT._fireContextMenuTimeout >= 0) {
        clearTimeout(thisCT._fireContextMenuTimeout);
      }
      // show if device not support contextmenu event (after 700ms)
      thisCT._fireContextMenuTimeout = setTimeout(function () {
        if (!supportContextEvent) {
          thisCT._fireContextMenuEvent();
        }
      }, 300);
    }, 400);
    this.$target = target;
    this._isTouch = isTouch;
    this._touchId = touchId;
    this._posCurrent = posCurrent;
    this._posStart = posCurrent;
    document.addEventListener('touchmove', thisCT.eventHandler.mousemove);
    document.addEventListener('touchend', thisCT.eventHandler.mousefinish);
    document.addEventListener('touchcancel', thisCT.eventHandler.mousefinish);
  } else {
    if (_EventEmitter["default"].isMouseRight(event) && this._checkNeedHandle(target)) {
      if (this._removeTimeout > 0) {
        clearTimeout(this._removeTimeout);
        this._removeTimeout = -1;
      }
      this.$target = target;
      this._isTouch = isTouch;
      this._posCurrent = posCurrent;
      this._posStart = posCurrent;
      this._touchId = touchId;
      this._ss++;
      this.moveTo(this._posCurrent);
      this.active(true);
      document.addEventListener('mousemove', this.eventHandler.mousemove);
      document.addEventListener('mouseup', this.eventHandler.mousefinish);
      document.addEventListener('mouseleave', this.eventHandler.mousefinish);
    }
  }
};

/**
 * @param {Vec2} pos
 */
ContextCaptor.prototype.moveTo = function (pos) {
  this.addStyle({
    left: pos.x - 80 + 'px',
    top: pos.y - 80 + 'px'
  });
};
ContextCaptor.prototype.active = function (flag) {
  if (flag) this.addClass('absol-active');else this.removeClass('absol-active');
};
ContextCaptor.eventHandler.mousemove = function (event) {
  var isTouch = this._isTouch;
  var touchId;
  var pointer;
  var posCurrent;
  if (isTouch) {
    pointer = event.changedTouches[0];
    touchId = pointer.identifier;
  } else {
    isTouch = false;
    touchId = -1;
    pointer = event;
  }
  if (touchId != this._touchId) return;
  posCurrent = new _Vec["default"](pointer.clientX, pointer.clientY);
  this._posCurrent = posCurrent;
  if (isTouch) {
    if (this._posStart.sub(posCurrent).abs() > 10) this.eventHandler.mousefinish(event);
  }
  this.moveTo(posCurrent);
};
ContextCaptor.eventHandler.mousefinish = function (event) {
  var isTouch = this._isTouch;
  var touchId;
  var pointer;
  if (isTouch) {
    pointer = event.changedTouches[0];
    touchId = pointer.identifier;
  } else {
    isTouch = false;
    touchId = -1;
    pointer = event;
  }
  if (touchId != this._touchId) return;
  if (isTouch) {
    document.removeEventListener('touchmove', this.eventHandler.mousemove);
    document.removeEventListener('touchend', this.eventHandler.mousefinish);
    document.removeEventListener('touchcancel', this.eventHandler.mousefinish);
    if (this._longPressTimeout > 0) {
      clearTimeout(this._longPressTimeout);
      this._longPressTimeout = -1;
    }
  } else {
    document.removeEventListener('mousemove', this.eventHandler.mousemove);
    document.removeEventListener('mouseup', this.eventHandler.mousefinish);
    document.removeEventListener('mouseleave', this.eventHandler.mousefinish);
  }
  this._touchId = -100;
  if (this._fireContextMenuTimeout >= 0) {
    clearTimeout(this._fireContextMenuTimeout);
  }
  var thisCT = this;
  this._removeTimeout = setTimeout(function () {
    thisCT.active(false);
    thisCT._removeTimeout = -1;
  }, 1);
};
ContextCaptor.eventHandler.contextmenu = function (event) {
  supportContextEvent = true;
  event.preventDefault();
  this._fireContextMenuEvent();
};
ContextCaptor.auto = function () {
  if (ContextCaptor.$elt) return;
  ContextCaptor.$elt = _('contextcaptor');
  _Dom["default"].documentReady.then(function () {
    ContextCaptor.$elt.addTo(document.body);
    ContextCaptor.$elt.attachTo(document.body);
  });
};
_ACore["default"].install(ContextCaptor);
var _default = ContextCaptor;
exports["default"] = _default;

/***/ }),

/***/ 76435:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Dom = __webpack_require__(64821);
var _Tooltip = _interopRequireDefault(__webpack_require__(54946));
var _Clipboard = __webpack_require__(89085);
var _Snackbar = _interopRequireDefault(__webpack_require__(96206));
var _MultiLanguageText = _interopRequireDefault(__webpack_require__(8177));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends {AElement}
 * @constructor
 */
function CopyableIconTooltip() {
  this._content = '';
  this.$content = null;
  this._value = '';
  this._icon = 'span.mdi.mdi-information-outline';
  this.$icon = (0, _ACore.$)('.as-cit-icon', this);
  this.tooltip = new TooltipController(this);
}
CopyableIconTooltip.tag = 'CopyableIconTooltip'.toLowerCase();
CopyableIconTooltip.render = function () {
  return (0, _ACore._)({
    tag: 'button',
    "class": 'as-copyable-icon-tooltip',
    child: 'span.mdi.mdi-information-outline.as-cit-icon'
  });
};
CopyableIconTooltip.property = {};
CopyableIconTooltip.property.content = {
  set: function set(value) {
    this._content = value || '';
    if (_typeof(this._content) === "object") {
      this.$content = (0, _ACore._)(this._content);
    } else if (typeof this._content === "string") {
      this.$content = (0, _ACore._)({
        tag: 'span',
        style: {
          'white-space': 'pre-wrap'
        },
        props: {
          innerHTML: this._content
        }
      });
      _MultiLanguageText["default"].replaceAll(this.$content);
    }
  },
  get: function get() {
    return this._content;
  }
};
CopyableIconTooltip.property.icon = {
  set: function set(value) {
    value = value || '';
    this._icon = value;
    this.clearChild();
    this.$icon = null;
    if (value) {
      if ((0, _Dom.isDomNode)(value)) {
        if (value.parentElement) value = value.cloneNode(true);
      } else value = (0, _ACore._)(value);
      this.$icon = (0, _ACore.$)(value).addClass('as-cit-icon');
      this.addChild(this.$icon);
    }
  },
  get: function get() {
    return this._icon;
  }
};
CopyableIconTooltip.property.value = {
  set: function set(value) {
    this._value = value;
  },
  get: function get() {
    return this._value;
  }
};

/***
 *
 * @param {CopyableIconTooltip} elt
 * @constructor
 */
function TooltipController(elt) {
  /***
   *
   * @type {CopyableIconTooltip}
   */
  this.elt = elt;
  this.elt.on('mouseenter', this.ev_mouseEnter.bind(this));
  this.elt.on('mouseleave', this.ev_mouseLeave.bind(this));
  this.elt.on('click', this.ev_click.bind(this));
  this.session = -2;
  this.timeout = -1;
}
TooltipController.prototype.ev_mouseEnter = function () {
  clearTimeout(this.timeout);
  if (this.elt.$content) this.session = _Tooltip["default"].show(this.elt, this.elt.$content, 'auto');
};
TooltipController.prototype.ev_mouseLeave = function () {
  var _this = this;
  this.timeout = setTimeout(function () {
    _Tooltip["default"].close(_this.session);
  }, 500);
};
TooltipController.prototype.ev_click = function () {
  var text;
  if (this.elt._value !== null && this.elt._value !== undefined) {
    text = this.elt._value + '';
  } else if (typeof this.elt._content === "string") {
    text = this.elt._content;
  } else {
    text = this.elt.$content.innerText;
  }
  (0, _Clipboard.copyText)(text);
  _Snackbar["default"].show('Copied: ' + text);
};
var _default = CopyableIconTooltip;
exports["default"] = _default;

/***/ }),

/***/ 99578:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Element = _interopRequireDefault(__webpack_require__(55781));
__webpack_require__(40466);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _int = __webpack_require__(65909);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function CountdownClock() {
  var thisC = this;
  this.$attachhook = _('attachhook').addTo(this).on('attached', function () {
    _ResizeSystem["default"].add(this);
    this.requestUpdateSize();
    if (thisC.autoStart) {
      thisC.start();
    }
  });
  this.$attachhook.requestUpdateSize = this._updateBorder.bind(this);
  this._tick = this._tick.bind(this);
  this.$border = $(".as-countdown-clock-border", this);
  this.$min = $(".as-countdown-clock-min", this);
  this.$sec = $(".as-countdown-clock-sec", this);
  this._prevText = -1;
  this._startTime = new Date().getTime();
  this._totalSecond = 60;
  this._remainSecond = 0;
  this.totalSecond = 60;
  this.remainSecond = 0;
  this._intvId = -1;
}
CountdownClock.tag = 'CountdownClock'.toLowerCase();
CountdownClock.render = function () {
  return _({
    extendEvent: ['finish', 'update'],
    "class": 'as-countdown-clock',
    child: [{
      "class": 'as-countdown-clock-text',
      child: [{
        tag: 'span',
        "class": 'as-countdown-clock-min',
        child: {
          text: 0
        }
      }, {
        text: ':'
      }, {
        tag: 'span',
        "class": 'as-countdown-clock-sec',
        child: {
          text: '60'
        }
      }]
    }, {
      "class": 'as-countdown-clock-border-wrapper',
      child: {
        "class": 'as-countdown-clock-border'
      }
    }]
  });
};
CountdownClock.prototype._makePolygon = function (end) {
  var n = Math.ceil(Math.max(end / 0.2, 2));
  var fan = Array(n).fill(0).map(function (u, i) {
    var angle = -Math.PI / 2 + end * i / n;
    return [(0, _int.numberAutoFixed)(50 + 60 * Math.cos(angle), 5) + '%', (0, _int.numberAutoFixed)(50 + 60 * Math.sin(angle), 5) + '%'].join(' ');
  });
  fan.push('50% 50%');
  return 'polygon(' + fan.join(', ') + ')';
};
CountdownClock.prototype._setBorderValue = function (val) {
  if (val >= 1 || !isFinite(val)) {
    this.$border.removeStyle("clip-path");
    return;
  }
  var bound = this.$border.getBoundingClientRect();
  var angle = val * Math.PI * 2;
  this.$border.addStyle("-webkit-clip-path", this._makePolygon(angle));
  this.$border.addStyle("clip-path", this._makePolygon(angle));
};
CountdownClock.prototype._updateBorder = function () {
  this._setBorderValue(this._remainSecond / Math.max(0.001, this._totalSecond));
};
CountdownClock.prototype._updateText = function () {
  if (this._prevText === this.remainSecond) return;
  var remainSecond = this.remainSecond;
  var min = Math.floor(remainSecond / 60);
  var sec = remainSecond % 60;
  this.$sec.innerHTML = (sec < 10 ? "0" : "") + sec;
  this.$min.innerHTML = min;
};
CountdownClock.prototype._tick = function () {
  var now = new Date().getTime();
  var prevSec = this.remainSecond;
  this.remainSecond = Math.max(0, Math.ceil(this.totalSecond - (now - this._startTime) / 1000));
  if (prevSec !== this.remainSecond) {
    this._updateText();
    this.emit('update', {
      target: this,
      type: 'update'
    }, this);
    if (this.remainSecond === 0) {
      clearInterval(this._intvId);
      this._intvId = -1;
      this.emit('finish', {
        target: this,
        type: 'finish'
      }, this);
    }
  }
};
CountdownClock.prototype.start = function () {
  if (this.remainSecond == 0) this.remainSecond = this.totalSecond;
  this._startTime = new Date().getTime() - (this.totalSecond - this.remainSecond) * 1000;
  this.resume();
};
CountdownClock.prototype.resume = function () {
  if (this._intvId > 0) return;
  this._intvId = setInterval(this._tick, 200);
};
CountdownClock.prototype.pause = function () {
  if (this._intvId > 0) {
    clearInterval(this._intvId);
    this._intvId = -1;
  }
};
CountdownClock.prototype.stop = function () {
  this.pause();
  this.remainSecond = 0;
};
CountdownClock.prototype.reset = function () {
  this.remainSecond = this.totalSecond;
  this._startTime = new Date().getTime();
};
CountdownClock.property = {};
CountdownClock.property.totalSecond = {
  set: function set(value) {
    if (!(value >= 0)) {
      value = 0;
    }
    this._totalSecond = value;
    this._updateBorder();
  },
  get: function get() {
    return this._totalSecond;
  }
};
CountdownClock.property.remainSecond = {
  set: function set(value) {
    if (!(value >= 0)) {
      value = 0;
    }
    this._remainSecond = value;
    this._updateBorder();
    this._updateText();
  },
  get: function get() {
    return this._remainSecond;
  }
};
_ACore["default"].install(CountdownClock);
var _default = CountdownClock;
exports["default"] = _default;

/***/ }),

/***/ 36266:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.remainSecondToText = remainSecondToText;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
__webpack_require__(40466);
__webpack_require__(82261);
var _datetime = __webpack_require__(58286);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var tokenCache = {};
function remainSecondToText(remainSecond, format) {
  var tokens = tokenCache[format];
  if (!tokens) {
    tokens = (format.match(new RegExp(_datetime.DATE_TIME_TOKEN_RGX.source, 'g')) || []).reduce(function (ac, cr) {
      ac[cr] = true;
      return ac;
    }, {});
    tokenCache[format] = tokens;
  }
  var newText;
  var sec, min, hour;
  sec = Math[tokens['ms'] || tokens['mss'] ? 'floor' : 'ceil'](remainSecond);
  min = Math.floor(remainSecond / 60);
  hour = Math.floor(remainSecond / 60 / 60);
  newText = format.replace(new RegExp(_datetime.DATE_TIME_TOKEN_RGX.source, 'g'), function (all) {
    switch (all) {
      case 'D':
        return Math.floor(remainSecond / 60 / 60 / 24) + '';
      case 'HH':
      case 'H':
      case 'hh':
        if (tokens['D']) {
          return (0, _utils.zeroPadding)(hour % 24, all.length);
        } else {
          return (0, _utils.zeroPadding)(hour, all.length);
        }
      case 'mm':
      case 'M':
      case 'MM':
        if (tokens['HH'] || tokens['hh']) {
          return (0, _utils.zeroPadding)(min % 60, all.length);
        } else {
          return (0, _utils.zeroPadding)(min, all.length);
        }
      case 'ss':
      case 'S':
      case 'SS':
        if (tokens['m'] || tokens['mm']) {
          return (0, _utils.zeroPadding)(sec % 60, all.length);
        } else {
          return (0, _utils.zeroPadding)(sec, all.length);
        }
      case 'cs':
        return (0, _utils.zeroPadding)(Math.ceil(remainSecond * 100) % 100, 2);
      case 'ms':
        return (0, _utils.zeroPadding)(Math.ceil(remainSecond * 1000) % 1000, 3);
      default:
        return all;
    }
  });
  return newText;
}

/***
 * @extends AElement
 * @constructor
 */
function CountdownText() {
  this.addClass('as-countdown-text');
  this.defineEvent('update');
  this.defineEvent('finish');
  this.text = '';
  this._format = 'HH:mm';
  this.format = 'HH:mm';
  this.fps = 5;
  this._finishTime = null;
  this.finishTime = null;
  this['_tick'] = this._tick.bind(this);
  setTimeout(this.start.bind(this), 0); //auto start
  /***
   * @type {number}
   * @name remainSecond
   * @memberOf CountdownText#
   */
  /***
   * @type {Date}
   * @name finishTime
   * @memberOf CountdownText#
   */

  /***
   * @type {string}
   * @name format
   * @memberOf CountdownText#
   */
}

CountdownText.tag = 'CountdownText'.toLowerCase();
CountdownText.render = function () {
  return _('span');
};
CountdownText.prototype.buildinFormat = {
  'standard': function standard(remainSecond) {
    if (remainSecond >= 24 * 3600) {
      return remainSecondToText(remainSecond, 'D ngày HH:mm:ss');
    } else {
      return remainSecondToText(remainSecond, 'HH:mm:ss');
    }
  }
};
CountdownText.prototype._tick = function () {
  var remainSecond = this.remainSecond;
  var prevText = this.text;
  var newText;
  var format = this._format;
  if (this.buildinFormat[format]) format = this.buildinFormat[format];
  if (typeof format === "function") {
    newText = format.call(this, remainSecond);
  } else if (typeof format === "string") {
    newText = remainSecondToText(remainSecond, format);
  }
  if (prevText !== newText) {
    this.text = newText;
    this.innerHTML = newText;
    this.emit('update', {
      target: this,
      type: 'update'
    }, this);
  }
  if (remainSecond <= 0) {
    this.stop();
    this.emit('finish', {
      target: this,
      type: 'update'
    }, this);
  }
};
CountdownText.prototype.start = function () {
  this.resume();
};
CountdownText.prototype.resume = function () {
  if (this._intvId > 0) return;
  this._intvId = setInterval(this._tick, 1000 / this.fps);
};
CountdownText.prototype.pause = function () {
  if (this._intvId > 0) {
    clearInterval(this._intvId);
    this._intvId = -1;
  }
};
CountdownText.prototype.stop = function () {
  this.pause();
};
CountdownText.property = {};
CountdownText.property.format = {
  set: function set(value) {
    if (typeof value === "string" || typeof value === 'function') {
      this._format = value || 'HH:mm';
    } else {
      this._format = 'HH:mm';
    }
  },
  get: function get() {
    return this._format;
  }
};
CountdownText.property.remainSecond = {
  set: function set(value) {
    if (!(value >= 0)) {
      value = 0;
    }
    this.finishTime = new Date(new Date().getTime() + value);
  },
  get: function get() {
    if (this.finishTime !== null) {
      return Math.max(0, (this.finishTime.getTime() - new Date().getTime()) / 1000);
    } else return null;
  }
};
CountdownText.property.finishTime = {
  set: function set(value) {
    if (typeof value === "number" || typeof value === 'string') {
      value = new Date(value);
    }
    if (!value || !value.getTime) value = null;
    if (value && value.getTime && isNaN(value.getTime())) value = null;
    this._finishTime = value;
  },
  get: function get() {
    return this._finishTime;
  }
};
CountdownText.property.fps = {
  set: function set(value) {
    this._fps = (0, _utils.isRealNumber)(value) ? value : 200;
    if (this._intvId > 0) {
      clearInterval(this._intvId);
      this._intvId = setInterval(this._tick, 1000 / this._fps);
    }
  },
  get: function get() {
    return this._fps;
  }
};
_ACore["default"].install(CountdownText);
var _default = CountdownText;
exports["default"] = _default;

/***/ }),

/***/ 18123:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ExpTree = _interopRequireDefault(__webpack_require__(87326));
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(87612);
var _EventEmitter = __webpack_require__(46833);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ExpTree
 * @constructor
 */
function DVExpTree() {
  this.injectInput();
}
DVExpTree.tag = 'DVExpTree'.toLowerCase();
DVExpTree.render = function () {
  return (0, _ACore._)({
    tag: _ExpTree["default"].tag,
    extendEvent: ['radiochange', 'indexclick'],
    "class": 'as-dv-exp-tree'
  }, true);
};
DVExpTree.prototype.injectInput = function () {
  this.$radio = (0, _ACore._)({
    tag: 'radiobutton',
    on: {
      change: this.eventHandler.radioChange
    }
  });
  this.$node.insertBefore(this.$radio, this.$node.$extIcon);
  this.$index = (0, _ACore._)({
    tag: 'span',
    "class": 'as-dv-exp-tree-index',
    on: {
      click: this.eventHandler.indexClick
    }
  });
  this.$node.insertBefore(this.$index, this.$node.$desc);
  this.$node.on('click', this.eventHandler.clickInNode);
};
DVExpTree.property = {};
DVExpTree.property.radioName = {
  enumerable: true,
  set: function set(value) {
    if (!value) {
      this.removeClass('as-has-radio');
      this.$radio.name = undefined;
    } else {
      this.addClass('as-has-radio');
      this.$radio.name = value + '';
    }
  },
  get: function get() {
    return this.$radio.name;
  }
};
DVExpTree.property.radioValue = {
  enumerable: true,
  set: function set(value) {
    this.$radio.value = value;
  },
  get: function get() {
    return this.$radio.value;
  }
};
DVExpTree.property.radioChecked = {
  enumerable: true,
  set: function set(value) {
    this.$radio.checked = value;
  },
  get: function get() {
    return this.$radio.checked;
  }
};
DVExpTree.property.hasIndex = {
  enumerable: true,
  set: function set(value) {
    if (value) this.addClass('as-has-index-input');else this.removeClass('as-has-index-input');
  },
  get: function get() {
    return this.hasClass('as-has-index-input');
  }
};
DVExpTree.property.indexValue = {
  enumerable: true,
  set: function set(value) {
    this.$index.innerHTML = value;
  },
  get: function get() {
    return this.$index.innerHTML;
  }
};
DVExpTree.eventHandler = {};
DVExpTree.eventHandler.radioChange = function (event) {
  this.emit('radiochange', Object.assign({}, event, {
    target: this,
    radioElt: this.$radio
  }), this);
};
DVExpTree.eventHandler.indexClick = function (event) {
  this.emit('indexclick', Object.assign({}, event, {
    target: this,
    indexInput: this.$index
  }), this);
};
DVExpTree.eventHandler.clickInNode = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$index, event) || (0, _EventEmitter.hitElement)(this.$radio, event) || (0, _EventEmitter.hitElement)(this.$node.$toggleIcon, event)) return;
  if ((0, _EventEmitter.hitElement)(this.$node, event) && this.radioName) this.$radio.click();
};
_ACore["default"].install(DVExpTree);
var _default = DVExpTree;
exports["default"] = _default;

/***/ }),

/***/ 63863:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _DateInYearPicker = _interopRequireDefault(__webpack_require__(96604));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _EventEmitter = __webpack_require__(46833);
var _utils = __webpack_require__(84512);
var _datetime = __webpack_require__(58286);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function DateInYearInput() {
  this._format = 'dd/MM';
  this._value = null;
  this.$clearBtn = (0, _ACore.$)('.as-time-input-clear-btn', this).on('click', this.clear.bind(this, true));
  this.$input = (0, _ACore.$)('input', this);
  this.on('click', this.eventHandler.click);
}
DateInYearInput.tag = 'DateInYearInput'.toLowerCase();
DateInYearInput.render = function () {
  return (0, _ACore._)({
    extendEvent: ['change'],
    "class": ['as-date-time-input', 'as-date-in-year-input', 'as-empty'],
    child: [{
      tag: 'input',
      "class": 'as-date-time-input-text',
      attr: {
        ondrop: "return false;",
        readOnly: true
      },
      props: {
        value: 'dd/MM'
      }
    }, {
      tag: 'button',
      "class": 'as-time-input-clear-btn',
      child: 'span.mdi.mdi-close-circle'
    }, {
      tag: 'button',
      "class": 'as-date-time-input-icon-btn',
      child: 'span.mdi.mdi-calendar-today'
    }]
  });
};
DateInYearInput.prototype.share = {
  $follower: null,
  $picker: null,
  $input: null
};
DateInYearInput.prototype._preparePicker = function () {
  if (this.share.$picker) return;
  this.share.$picker = (0, _ACore._)({
    tag: _DateInYearPicker["default"].tag,
    "class": 'as-dropdown-box-common-style'
  });
  this.share.$follower = (0, _ACore._)({
    tag: _Follower["default"].tag,
    "class": 'as-date-in-year-follower',
    child: this.share.$picker
  });
};
DateInYearInput.prototype.clear = function (userAction, event) {
  var pValue = this.value;
  this.value = null;
  if (pValue) {
    this.emit('change', {
      type: 'change',
      action: 'clear',
      target: this,
      originalEvent: event
    }, this);
  }
};
DateInYearInput.prototype._attachPicker = function () {
  this._preparePicker();
  if (this.share.$input === this) return;
  if (this.share.$input) this.share.$input._releasePicker();
  this.share.$input = this;
  this.share.$follower.addTo(document.body);
  this.share.$follower.followTarget = this;
  this.share.$follower.sponsorElement = this;
  this.share.$picker.value = this._value;
  this.share.$picker.on('change', this.eventHandler.pickerChange);
  setTimeout(function () {
    document.addEventListener('click', this.eventHandler.clickOut);
  }.bind(this), 0);
};
DateInYearInput.prototype._releasePicker = function () {
  if (this.share.$input !== this) return;
  var cValue = this._value;
  var value = this.share.$picker.value;
  var nValue = this._normalizeValue(value);
  this.share.$input = null;
  this.share.$picker.followTarget = null;
  this.share.$follower.remove();
  this.share.$picker.off('change', this.eventHandler.pickerChange);
  document.removeEventListener('click', this.eventHandler.clickOut);
  var changed = !cValue !== !nValue;
  if (nValue && !changed) {
    changed = cValue.date === nValue.date && cValue.month === nValue.month;
  }
  if (changed) {
    this._value = value;
    this.emit('change', {
      type: 'change',
      value: nValue,
      target: this
    }, this);
  }
};
DateInYearInput.prototype._normalizeValue = function (value) {
  if (!value) return null;
  var m = Math.min(11, Math.max(0, Math.floor(value.month)));
  if (isNaN(m)) return null;
  var dim = (0, _datetime.compareDate)((0, _datetime.nextMonth)(new Date(2000, m, 1)), new Date(2000, m, 1));
  var d = Math.min(dim, Math.max(1, Math.floor(value.date)));
  if (isNaN(d)) return null;
  return {
    date: d,
    month: m
  };
};
DateInYearInput.prototype._updateValueText = function () {
  var value = this._value;
  if (value) {
    this.$input.value = this._format.replace(new RegExp(_datetime.DATE_TIME_TOKEN_RGX.source, 'g'), function (full) {
      switch (full) {
        case 'dd':
        case 'd':
          if ((0, _utils.isRealNumber)(value.date)) {
            return (0, _utils.zeroPadding)(value.date, full.length);
          }
          return full;
        case 'M':
        case 'MM':
          if ((0, _utils.isRealNumber)(value.month)) {
            return (0, _utils.zeroPadding)(value.month + 1, full.length);
          }
          return full;
        default:
          return full;
      }
    });
  } else {
    this.$input.value = this._format;
  }
  if (this.$input.value === this._format) {
    this.addClass('as-empty');
  } else {
    this.removeClass('as-empty');
  }
};
DateInYearInput.property = {};
DateInYearInput.property.value = {
  set: function set(value) {
    value = this._normalizeValue(value);
    this._value = value;
    this._updateValueText();
  },
  get: function get() {
    return this._normalizeValue(this._value);
  }
};
DateInYearInput.property.notNull = {
  set: function set(value) {
    if (value) {
      this.addClass('as-must-not-null');
    } else {
      this.removeClass('as-must-not-null');
    }
  },
  get: function get() {
    return this.hasClass('as-must-not-null');
  }
};
DateInYearInput.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
      this.$input.disabled = true;
    } else {
      this.removeClass('as-disabled');
      this.$input.disabled = false;
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
DateInYearInput.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
      this.$input.readOnly = true;
    } else {
      this.removeClass('as-read-only');
      this.$input.readOnly = false;
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};

/***
 * @memberOf DateInYearInput#
 * @type {{}}
 */
DateInYearInput.eventHandler = {};

/***
 * @this DateInYearInput
 * @param event
 */
DateInYearInput.eventHandler.click = function (event) {
  if (this.readOnly || (0, _EventEmitter.hitElement)(this.$clearBtn, event)) return;
  this._attachPicker();
};

/***
 * @this DateInYearInput
 * @param event
 */
DateInYearInput.eventHandler.clickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.share.$follower, event)) return;
  this._releasePicker();
};
DateInYearInput.eventHandler.pickerChange = function () {
  this._value = this.share.$picker.value;
  this._updateValueText();
};
_ACore["default"].install(DateInYearInput);
var _default = DateInYearInput;
exports["default"] = _default;

/***/ }),

/***/ 96604:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(91439);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _datetime = __webpack_require__(58286);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function DateInYearPicker() {
  this._month = null;
  this._date = null;
  this.$domSignal = (0, _ACore._)('attachhook').addTo(this);
  this.domSignal = new _DomSignal["default"](this.$domSignal);
  this._setupMonth();
  this._setupDate();
}
DateInYearPicker.tag = 'DateInYearPicker'.toLowerCase();
DateInYearPicker.render = function () {
  return (0, _ACore._)({
    extendEvent: ['change'],
    "class": 'as-date-in-year-picker',
    child: [{
      "class": 'as-date-in-year-picker-table',
      child: [{
        "class": 'as-date-in-year-picker-row',
        child: [{
          "class": 'as-date-in-year-picker-cell',
          child: {
            tag: 'span',
            child: {
              text: 'Month'
            }
          }
        }, {
          "class": 'as-date-in-year-picker-cell',
          child: {
            tag: 'span',
            child: {
              text: 'Date'
            }
          }
        }]
      }, {
        "class": 'as-date-in-year-picker-row',
        child: [{
          "class": 'as-date-in-year-picker-cell',
          child: {
            "class": 'as-date-in-year-picker-month-col',
            child: [{
              "class": 'as-date-in-year-picker-month-viewport',
              child: [{
                "class": 'as-date-in-year-picker-month-scroller',
                child: Array(36).fill(null).map(function (u, i) {
                  return {
                    tag: 'button',
                    "class": 'as-date-in-year-picker-month',
                    child: {
                      tag: 'span',
                      child: {
                        text: 1 + i % 12 + ''
                      }
                    },
                    props: {
                      monthL: i % 12
                    }
                  };
                })
              }]
            }, {
              tag: 'button',
              "class": ['as-date-in-year-picker-month-btn', 'as-up'],
              child: 'span.mdi.mdi-chevron-up'
            }, {
              tag: 'button',
              "class": ['as-date-in-year-picker-month-btn', 'as-down'],
              child: 'span.mdi.mdi-chevron-down'
            }]
          }
        }, {
          "class": 'as-date-in-year-picker-cell',
          child: {
            "class": 'as-date-in-year-picker-days',
            child: Array(5).fill(null).map(function (u, i) {
              return {
                "class": 'as-date-in-year-picker-week',
                child: Array(7).fill(null).map(function (u1, j) {
                  return {
                    "class": 'as-date-in-year-picker-day',
                    child: {
                      tag: 'span',
                      child: {
                        text: i * 7 + j + 1 + ''
                      }
                    }
                  };
                })
              };
            })
          }
        }]
      }]
    }]
  });
};
DateInYearPicker.prototype._setupMonth = function () {
  this._monthScrollDy = 0;
  this.$monthScroller = (0, _ACore.$)('.as-date-in-year-picker-month-scroller', this).on('scroll', this.eventHandler.monthScroll).once('wheel', this.eventHandler.monthScroll);
  this.$monthUpBtn = (0, _ACore.$)('.as-date-in-year-picker-month-btn.as-up', this).on('pointerdown', this.eventHandler.monthPressDown);
  this.$monthDownBtn = (0, _ACore.$)('.as-date-in-year-picker-month-btn.as-down', this).on('pointerdown', this.eventHandler.monthPressUp);
  this.$months = (0, _ACore.$$)('.as-date-in-year-picker-month', this);
  for (var i = 0; i < 36; ++i) {
    this.$months[i].on('click', this.eventHandler.clickMonth.bind(this, i % 12));
  }
};
DateInYearPicker.prototype._setupDate = function () {
  this.$days = (0, _ACore.$$)('.as-date-in-year-picker-day', this);
  var i;
  for (i = 31; i < 35; ++i) {
    this.$days[i].addStyle('visibility', 'hidden');
  }
  for (i = 0; i < 31; ++i) {
    this.$days[i].on('click', this.eventHandler.clickDate.bind(this, i + 1));
  }
};
DateInYearPicker.prototype.scrollIntoSelected = function () {
  if (!this.isDescendantOf(document.body)) {
    this.domSignal.emit('scrollIntoSelected');
    return;
  }
  var d = Infinity;
  var dy;
  var y;
  var ly, hy;
  var lineHeight = this.getFontSize() * 2;
  if (this._month !== null) {
    for (var k = 0; k < 3; ++k) {
      y = this._month * lineHeight + lineHeight * 12 * k;
      ly = this.$monthScroller.scrollTop;
      hy = ly + lineHeight * 4 - lineHeight;
      if (ly <= y && hy >= y) {
        dy = 0;
        break;
      }
      if (y < ly && ly - y < d) {
        d = ly - y;
        dy = y - ly;
      }
      if (y > hy && y - hy < d) {
        d = y - hy;
        dy = y - hy;
      }
    }
    this.$monthScroller.scrollTop += dy;
  }
};

/***
 * @memberOf DateInYearPicker#
 * @type {{}}
 */
DateInYearPicker.eventHandler = {};

/***
 * @this DateInYearPicker
 */
DateInYearPicker.eventHandler.monthPressDown = function () {
  document.addEventListener('pointerup', this.eventHandler.monthRelease);
  this._monthScrollDy = -8;
  this.eventHandler.monthTick();
};

/**
 * @this DateInYearPicker
 */
DateInYearPicker.eventHandler.monthPressUp = function () {
  document.addEventListener('pointerup', this.eventHandler.monthRelease);
  this._monthScrollDy = 8;
  this.eventHandler.monthTick();
};

/**
 * @this DateInYearPicker
 */
DateInYearPicker.eventHandler.monthTick = function () {
  if (!this._monthScrollDy) return;
  var d = this._monthScrollDy;
  var fontSize = this.getFontSize();
  if (this.$monthScroller.scrollTop + d < 0) d += fontSize * 2 * 12;
  this.$monthScroller.scrollTop += d;
  setTimeout(this.eventHandler.monthTick, 30);
};
DateInYearPicker.eventHandler.monthRelease = function () {
  document.removeEventListener('pointerup', this.eventHandler.monthRelease);
  this._monthScrollDy = 0;
};

/**
 * @this DateInYearPicker
 */
DateInYearPicker.eventHandler.monthScroll = function () {
  var scrollTop = this.$monthScroller.scrollTop;
  var fontSize = this.getFontSize();
  if (scrollTop < fontSize * 2 * 12) {
    this.$monthScroller.scrollTop += fontSize * 2 * 12;
  } else if (scrollTop > fontSize * 2 * 12 * 2) {
    this.$monthScroller.scrollTop -= fontSize * 2 * 12;
  }
};

/**
 * @this DateInYearPicker
 */
DateInYearPicker.eventHandler.clickMonth = function (month, event) {
  var pDate = this.date;
  if (this.month === month) return;
  this.month = month;
  this.emit('change', {
    type: 'change',
    originalEvent: event,
    target: this
  }, this);
};

/**
 * @this DateInYearPicker
 */
DateInYearPicker.eventHandler.clickDate = function (date, event) {
  if (this.date === date) return;
  this.date = date;
  this.emit('change', {
    type: 'change',
    originalEvent: event,
    target: this
  }, this);
};
DateInYearPicker.property = {};
DateInYearPicker.property.date = {
  set: function set(value) {
    if (typeof value !== 'number') value = null;
    var cM, dim;
    if (this._month === null) {
      dim = 31;
    } else {
      cM = new Date(2000, this._month, 1);
      dim = (0, _datetime.compareDate)((0, _datetime.nextMonth)(cM), cM);
    }
    if (typeof value === "number") value = Math.max(1, Math.min(dim, Math.floor(value)));
    if (isNaN(value)) value = null;
    if (this._date === value) return;
    if (this._date !== null) {
      this.$days[this._date - 1].removeClass('as-selected');
    }
    this._date = value;
    if (this._date !== null) {
      this.$days[this._date - 1].addClass('as-selected');
    }
  },
  get: function get() {
    return this._date;
  }
};
DateInYearPicker.property.month = {
  /***
   * @this DateInYearPicker
   * @param value
   */
  set: function set(value) {
    if (typeof value == 'number') {
      value = Math.max(0, Math.min(11, Math.floor(value)));
    } else value = null;
    if (isNaN(value)) value = null;
    if (this._month === value) return;
    if (this._month !== null) {
      this.$months[this._month].removeClass('as-selected');
      this.$months[this._month + 12].removeClass('as-selected');
      this.$months[this._month + 24].removeClass('as-selected');
    }
    this._month = value;
    var cM, dim;
    if (this._month !== null) {
      this.$months[this._month].addClass('as-selected');
      this.$months[this._month + 12].addClass('as-selected');
      this.$months[this._month + 24].addClass('as-selected');
      this.scrollIntoSelected();
      cM = new Date(2000, this._month, 1);
      dim = (0, _datetime.compareDate)((0, _datetime.nextMonth)(cM), cM);
    } else {
      dim = 31;
    }
    for (var i = 29; i < 31; ++i) {
      if (i < dim) {
        this.$days[i].removeStyle('visibility');
      } else {
        this.$days[i].addStyle('visibility', 'hidden');
      }
    }
    this.date = Math.min(this.date, dim);
  },
  get: function get() {
    return this._month;
  }
};
DateInYearPicker.property.value = {
  set: function set(value) {
    value = value || {
      month: null,
      date: null
    };
    this.month = value.month;
    this.date = value.date;
  },
  get: function get() {
    return {
      month: this.month,
      date: this.date
    };
  }
};
_ACore["default"].install(DateInYearPicker);
var _default = DateInYearPicker;
exports["default"] = _default;

/***/ }),

/***/ 47156:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(56163);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _datetime = __webpack_require__(58286);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _DateTimeInput = _interopRequireDefault(__webpack_require__(37800));
var _utils = __webpack_require__(84512);
var _EventEmitter = __webpack_require__(46833);
var _DelaySignal = _interopRequireDefault(__webpack_require__(81809));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var STATE_NEW = 1;
var STATE_EDITED = 2;
var STATE_NONE = 0;

/***
 *
 * @param {Date} date
 * @param level
 * @returns {Date|null}
 */
var dateByLevel = function dateByLevel(date, level) {
  if (!date) return null;
  switch (level) {
    case 'week':
      return (0, _datetime.beginOfWeek)(date);
    case 'month':
      return (0, _datetime.beginOfMonth)(date);
    case 'quarter':
      return (0, _datetime.beginOfQuarter)(date);
    case 'year':
      return (0, _datetime.beginOfYear)(date);
    case 'date':
    default:
      return (0, _datetime.beginOfDay)(date);
  }
};
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/**
 * @extends AElement
 * @constructor
 */
function DateInput2() {
  this._lastValue = null;
  this._value = null;
  this._format = 'dd/MM/yyyy';
  this.$input = $('input', this);
  this._editingData = {};
  this.startDayOfWeek = (0, _datetime.getDefaultFirstDayOfWeek)();
  this.$text = this.$input;
  this.$text.on('mousedown', this.eventHandler.mouseDownInput).on('mouseup', this.eventHandler.mouseUpInput).on('dblclick', this.eventHandler.dblclickInput).on('keydown', this.eventHandler.keydown).on('blur', this.eventHandler.inputBlur).on('contextmenu', function (event) {
    event.preventDefault();
  });
  this.domSignal = new _DelaySignal["default"]();
  this.domSignal.on('request_auto_select', this._autoSelect.bind(this));
  this._min = new Date(1890, 0, 1, 0, 0, 0, 0);
  this._max = new Date(2090, 0, 1, 0, 0, 0, 0);
  this.$calendarBtn = $('.as-date-input-icon-ctn', this).on('click', this.eventHandler.clickCalendarBtn);
  this.$clearBtn = $('button.as-date-input-clear-btn', this).on('click', this.clear.bind(this));
  this.value = this._value;
  this.format = this._format;
  this.notNull = false;
  _OOP["default"].drillProperty(this, this, 'minLimitDate', 'min');
  _OOP["default"].drillProperty(this, this, 'minDateLimit', 'min');
  _OOP["default"].drillProperty(this, this, 'maxLimitDate', 'max');
  _OOP["default"].drillProperty(this, this, 'maxDateLimit', 'max');
  /**
   * @type {Date}
   * @name min
   * @memberOf DateInput#
   */

  /**
   * @type {Date}
   * @name max
   * @memberOf DateInput#
   */

  /**
   * @type {Date}
   * @name value
   * @memberOf DateInput#
   */

  /**
   * @type {string}
   * @name format
   * @memberOf DateInput#
   */

  /**
   * @deprecated
   * @type {Date}
   * @name minLimitDate
   * @memberOf DateInput#
   */
  /**
   * @deprecated
   * @type {Date}
   * @name maxLimitDate
   * @memberOf DateInput#
   */
}

DateInput2.tag = 'dateinput';
DateInput2.render = function () {
  //only support dd/mm/yyyy
  return _({
    "class": 'as-date-input',
    extendEvent: ['change'],
    child: [{
      tag: 'input',
      "class": 'as-date-input-text',
      props: {
        value: '__/__/____'
      }
    }, {
      tag: 'button',
      "class": 'as-date-input-clear-btn',
      child: 'span.mdi.mdi-close-circle'
    }, {
      tag: 'button',
      "class": 'as-date-input-icon-ctn',
      child: 'span.mdi.mdi-calendar'
    }]
  });
};

/**
 * @param {String} text
 */
DateInput2.prototype._verifyFormat = function (text) {
  var regex = new RegExp(_datetime.DATE_TIME_TOKEN_RGX.source, 'g');
  var tokens = text.match(regex);
  var map = {
    d: ['dd', 'd'],
    M: ['M', 'MM'],
    y: ['yy', 'yyyy'],
    Q: ['Q', 'QQ'],
    w: ['w', 'ww']
  };
  var rules = ['dMy', 'My', 'y', 'wy', 'Qy'].map(function (r) {
    r = r.split('');
    r.sort();
    return r.join('');
  });
  var matched = tokens.reduce(function (ac, cr) {
    Object.keys(map).some(function (key) {
      if (map[key].indexOf(cr) >= 0) {
        ac.push(key);
        return true;
      }
      return false;
    });
    return ac;
  }, []);
  matched.sort();
  matched = matched.join('');
  return rules.indexOf(matched) >= 0;
};
DateInput2.prototype._notifyIfChange = function (event) {
  var oldV = this._explicit(this._lastValue);
  var newV = this._explicit(this._value);
  if (!oldV !== !newV || oldV && newV && (0, _datetime.compareDate)(oldV, newV) !== 0) {
    this._lastValue = this._value;
    this.emit('change', {
      type: 'change',
      target: this,
      value: this._value,
      originEvent: event
    }, this);
  }
};
DateInput2.prototype.notifyChange = function () {
  this._lastValue = this._value;
  this.emit('change', {
    type: 'change',
    target: this,
    value: this._value
  }, this);
};
DateInput2.prototype.focus = function () {
  this.$input.focus();
};
DateInput2.prototype.blur = function () {
  this.$input.blur();
};
DateInput2.prototype.clear = function () {
  this._applyValue(null);
  this._notifyIfChange();
};

/***
 *
 * @param {Date|null} value
 */
DateInput2.prototype._applyValue = function (value) {
  this._value = value;
  this._loadTextFromValue();
};
DateInput2.prototype._loadTextFromValue = function () {
  var value = this.value;
  if (!value) {
    this.$input.value = this.format;
  } else {
    this.$input.value = (0, _datetime.formatDateTime)(this._value, this._format);
  }
  this._updateNullClass();
};
DateInput2.prototype._updateNullClass = function () {
  var value = this._value;
  if (!value) {
    this.addClass('as-value-null');
  } else {
    this.removeClass('as-value-null');
  }
};
DateInput2.prototype.tokenRegex = _DateTimeInput["default"].prototype.tokenRegex;
DateInput2.prototype._autoSelect = _DateTimeInput["default"].prototype._autoSelect;
DateInput2.prototype._tokenAt = _DateTimeInput["default"].prototype._tokenAt;
DateInput2.prototype._editNextToken = _DateTimeInput["default"].prototype._editNextToken;
DateInput2.prototype._editPrevToken = _DateTimeInput["default"].prototype._editPrevToken;
DateInput2.prototype._makeTokenDict = _DateTimeInput["default"].prototype._makeTokenDict;
DateInput2.prototype._correctingInput = function () {
  var tkDict = this._makeTokenDict(this.$text.value);
  var min = this._min;
  var max = this._max;
  var equalMin;
  var equalMax;
  if (tkDict.y && !isNaN(tkDict.y.value)) {
    tkDict.y.value = Math.max(min.getFullYear(), Math.min(max.getFullYear(), tkDict.y.value));
    equalMin = tkDict.y.value === min.getFullYear();
    equalMax = tkDict.y.value === max.getFullYear();
  } else {
    equalMin = false;
    equalMax = false;
  }
  if (tkDict.M && !isNaN(tkDict.M.value)) {
    tkDict.M.value = Math.max(1, Math.min(12, tkDict.M.value));
    if (equalMin) {
      tkDict.M.value = Math.max(min.getMonth() + 1, tkDict.M.value);
      equalMin = tkDict.M.value === min.getMonth() + 1;
    }
    if (equalMax) {
      tkDict.M.value = Math.min(max.getMonth() + 1, tkDict.M.value);
      equalMax = max.getMonth() + 1;
    }
  } else {
    equalMin = false;
    equalMax = false;
  }
  if (tkDict.d && !isNaN(tkDict.d.value)) {
    tkDict.d.value = Math.max(1, Math.min(31, tkDict.d.value));
    if (tkDict.M && !isNaN(tkDict.M.value)) {
      tkDict.d.value = Math.min(tkDict.d.value, (0, _datetime.daysInMonth)(isNaN(tkDict.y.value) ? 2020 : tkDict.y.value, tkDict.M.value - 1));
    }
    if (equalMin) {
      tkDict.d.value = Math.max(min.getDate(), tkDict.d.value);
    }
    if (equalMax) {
      tkDict.d.value = Math.min(max.getDate(), tkDict.d.value);
    }
  }
  if (tkDict.w && !isNaN(tkDict.w.value)) {
    if (tkDict.y && !isNaN(tkDict.y.value)) {
      tkDict.w.value = Math.max(1, Math.min(tkDict.w.value, 1 + (0, _datetime.weekIndexOf)((0, _datetime.prevDate)(new Date(tkDict.y.value + 1, 0, 1)), false, this._startDayOfWeek)));
    }
  }
  this.$text.value = this._applyTokenDict(this._format, tkDict);
};
DateInput2.prototype._correctingCurrentToken = function () {
  var token = this._tokenAt(this.$text.selectionStart);
  if (!token) return;
  var value;
  value = parseInt(token.text);
  var rqMin = {
    d: 1,
    dd: 1,
    M: 1,
    MM: 1,
    y: 1890,
    yyyy: 1890,
    w: 1,
    ww: 1,
    Q: 1,
    QQ: 1
  }[token.ident];
  var rqMax = {
    d: 31,
    dd: 31,
    M: 12,
    MM: 12,
    y: 2089,
    yyyy: 2089,
    w: 54,
    ww: 54,
    Q: 4,
    QQ: 4
  }[token.ident];
  if (rqMin !== undefined) {
    if (!isNaN(value)) {
      if (value < rqMin || value > rqMin) {
        value = Math.max(rqMin, Math.min(rqMax, value));
        token.replace((0, _utils.zeroPadding)(value, token.ident.length), false);
      }
    } else if (this.notNull) {
      if (token.ident.startsWith('y')) {
        value = new Date().getFullYear();
      } else {
        value = rqMin;
      }
      token.replace((0, _utils.zeroPadding)(value, token.ident.length), false);
    } else if (token.text !== token.ident) {
      token.replace(token.ident, false);
    }
  }
};

/***
 *
 * @param {Date|string|null}date
 * @return {Date|null}
 */
DateInput2.prototype._normalizeValue = function (date) {
  var temp;
  if (date === null || date === undefined || date === false) {
    return null;
  }
  if (typeof date === 'string') {
    temp = new Date(date);
    if (isNaN(temp.getTime())) {
      temp = (0, _datetime.parseDateTime)(date, this._format);
    }
    date = temp;
  } else if (typeof date === 'number') {
    date = new Date(date);
  }
  if (date.getTime && date.getHours) {
    if (isNaN(date.getTime())) {
      return null;
    } else {
      return (0, _datetime.beginOfDay)(date);
    }
  } else {
    return null;
  }
};
DateInput2.prototype._loadValueFromInput = function () {
  var tkDict = this._makeTokenDict(this.$text.value);
  var y = tkDict.y ? tkDict.y.value : new Date().getFullYear();
  var m = tkDict.M ? tkDict.M.value - 1 : 0;
  var d = tkDict.d ? tkDict.d.value : 1;
  var date;
  if (tkDict.w && tkDict.y) {
    if ((0, _utils.isRealNumber)(tkDict.w.value) && (0, _utils.isRealNumber)(tkDict.y.value)) date = (0, _datetime.weekInYear)(y, tkDict.w.value - 1);
  } else if (tkDict.Q && tkDict.y) {
    if ((0, _utils.isRealNumber)(tkDict.Q.value) && (0, _utils.isRealNumber)(tkDict.y.value)) date = new Date(y, (tkDict.Q.value - 1) * 3, 1);
  } else {
    date = new Date(y, m, d);
  }
  if (!date || isNaN(date.getTime())) {
    this._value = null;
  } else {
    this._value = date;
  }
  this._updateNullClass();
};
DateInput2.prototype._explicit = function (value) {
  value = value || null;
  if (this.notNull) {
    value = value || new Date();
  } else if (!value) return null;
  var time = value.getTime();
  time = Math.max(this._min.getTime(), time);
  time = Math.min(this._max.getTime(), time);
  return dateByLevel((0, _datetime.beginOfDay)(new Date(time)), this.calendarLevel);
};
DateInput2.prototype._applyTokenDict = function (format, dict, debug) {
  var rgx = new RegExp(this.tokenRegex.source, 'g');
  var tokenMap = this.tokenMap;
  var res = format.replace(rgx, function (full, g1, g2, sourceText) {
    if (g1 && tokenMap[g1]) {
      var ident = tokenMap[g1];
      if (dict[ident] && !isNaN(dict[ident].value)) {
        return (0, _utils.zeroPadding)(dict[ident].value, g1.length);
      } else {
        return full;
      }
    } else return full;
  });
  return res;
};
DateInput2.prototype.focus = function () {
  this.$text.focus();
  this.$text.select();
};
DateInput2.prototype.tokenMap = {
  d: 'd',
  dd: 'd',
  M: 'M',
  MM: 'M',
  y: 'y',
  yyyy: 'y',
  ww: 'w',
  Q: 'Q',
  QQ: 'Q'
};

/**
 * @type {DateInput2}
 */
DateInput2.eventHandler = {};
DateInput2.eventHandler.keydown = function (event) {
  if (this.readOnly) {
    if (!event.ctrlKey || event.key !== 'c') {
      event.preventDefault();
    }
    return;
  }
  var token = this._tokenAt(this.$text.selectionStart);
  var endToken = this._tokenAt(this.$text.selectionEnd);
  if (!token) {
    if (event.key === 'Enter') {
      this._correctingInput();
      this._loadValueFromInput();
      this._notifyIfChange(event);
    }
    return;
  }
  var newTokenText;
  var value;
  if (event.key.startsWith('Arrow') || event.key.match(/^[\-/,\s]$/)) {
    event.preventDefault();
    switch (event.key) {
      case 'ArrowLeft':
        this._editPrevToken();
        break;
      case 'ArrowRight':
      case '-':
      case ',':
      case '/':
      case ' ':
        this._editNextToken();
        break;
      case 'ArrowUp':
      case 'ArrowDown':
        switch (token.ident) {
          case 'dd':
          case 'd':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.d = event.key === 'ArrowUp' ? 1 : 31;
            } else {
              this._editingData.d = 1 + (value + (event.key === 'ArrowUp' ? 0 : 29)) % 31;
            }
            newTokenText = '' + this._editingData.d;
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case 'w':
          case 'ww':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.w = event.key === 'ArrowUp' ? 1 : 54;
            } else {
              this._editingData.w = 1 + (value + (event.key === 'ArrowUp' ? 0 : 52)) % 54;
            }
            newTokenText = (0, _utils.zeroPadding)(this._editingData.w, token.ident.length);
            token.replace(newTokenText, true);
            break;
          case 'Q':
          case 'QQ':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.Q = event.key === 'ArrowUp' ? 1 : 4;
            } else {
              this._editingData.Q = 1 + (value + (event.key === 'ArrowUp' ? 0 : 2)) % 4;
            }
            newTokenText = (0, _utils.zeroPadding)(this._editingData.Q, token.ident.length);
            token.replace(newTokenText, true);
            break;
          case 'MM':
          case 'M':
            value = parseInt(token.text) - 1;
            if (isNaN(value)) {
              this._editingData.M = event.key === 'ArrowUp' ? 0 : 11;
            } else {
              this._editingData.M = (value + (event.key === 'ArrowUp' ? 1 : 11)) % 12;
            }
            newTokenText = '' + (this._editingData.M + 1);
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case 'yyyy':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.y = new Date().getFullYear();
            } else {
              this._editingData.y = Math.max(1890, Math.min(2089, value + (event.key === 'ArrowUp' ? 1 : -1)));
            }
            newTokenText = this._editingData.y + '';
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
        }
    }
  } else if (event.key === "Delete" || event.key === 'Backspace') {
    event.preventDefault();
    if (endToken.idx !== token.idx) {
      if (this.notNull) {
        this.$text.value = (0, _datetime.formatDateTime)(new Date(Math.min(this.max.getTime(), Math.max(this.min.getTime(), new Date().getTime()))), this._format);
      } else {
        this.$text.value = this._format;
      }
      this.$text.select();
    } else {
      if (this.notNull) {
        switch (token.ident) {
          case 'y':
          case 'yyyy':
            token.replace((0, _utils.zeroPadding)(new Date().getFullYear(), token.ident.length), true);
            break;
          case 'w':
          case 'ww':
          case 'Q':
          case 'QQ':
            token.replace((0, _utils.zeroPadding)(1, token.ident.length), true);
            break;
          case 'M':
          case 'MM':
          case 'd':
          case 'dd':
            token.replace((0, _utils.zeroPadding)(1, token.ident.length), true);
            break;
          default:
            token.replace(token.ident, true);
        }
      } else {
        token.replace(token.ident, true);
      }
      if (event.key === "Delete") this._editNextToken();else this._editPrevToken();
    }
  } else if (event.key === "Enter" || event.key === 'Tab') {
    this._correctingInput();
    this._loadValueFromInput();
    this._notifyIfChange(event);
  } else if (event.ctrlKey) {
    switch (event.key) {
      case 'a':
      case 'A':
        break;
      case 'c':
      case 'C':
        break;
      case 'x':
      case 'X':
        this.domSignal.once('clear_value', function () {
          this.$text.value = this._format;
          this.$text.select();
        }.bind(this));
        this.domSignal.emit('clear_value');
        break;
      default:
        event.preventDefault();
    }
  } else if (event.key.match(/^[0-9]$/g)) {
    event.preventDefault();
    var dVal = parseInt(event.key);
    if (this._editingData.state === STATE_NEW) {
      switch (token.ident) {
        case 'dd':
        case 'd':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          this._editingData.d = dVal;
          if (dVal > 3) {
            this._editNextToken();
          }
          break;
        case 'w':
        case 'ww':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          this._editingData.d = dVal;
          if (dVal > 6) {
            this._editNextToken();
          }
          break;
        case 'Q':
        case 'QQ':
          dVal = Math.max(1, Math.min(dVal, 4));
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          this._editingData.Q = dVal;
          this._editNextToken();
          break;
        case 'MM':
        case 'M':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          this._editingData.M = dVal;
          if (dVal > 1) {
            this._editNextToken();
          }
          break;
        case 'yyyy':
        case 'y':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          this._editingData.state_num = 1;
          break;
      }
    } else {
      switch (token.ident) {
        case 'dd':
        case 'd':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(1, Math.min(31, dVal));
          this._editingData.d = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editNextToken();
          break;
        case 'ww':
        case 'w':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(1, Math.min(54, dVal));
          this._editingData.d = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editNextToken();
          break;
        case 'Q':
        case 'QQ':
          dVal = Math.max(1, Math.min(dVal, 4));
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.Q = dVal;
          this._editNextToken();
          break;
        case 'MM':
        case 'M':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(1, Math.min(12, dVal));
          this._editingData.M = dVal - 1;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editNextToken();
          break;
        case 'yyyy':
        case 'y':
          dVal = (parseInt(token.text.replace(/^./, '')) || 0) * 10 + dVal;
          this._editingData.state_num++;
          if (this._editingData.state_num >= 4) {
            // dVal = Math.max(1890, Math.min(2089, dVal));
            token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
            this._editNextToken();
          } else {
            token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          }
          break;
      }
    }
  } else {
    event.preventDefault();
  }
};
DateInput2.eventHandler.mouseUpInput = _DateTimeInput["default"].eventHandler.mouseUpInput;
DateInput2.eventHandler.mouseDownInput = _DateTimeInput["default"].eventHandler.mouseDownInput;
DateInput2.eventHandler.dblclickInput = _DateTimeInput["default"].eventHandler.dblclickInput;
DateInput2.eventHandler.inputBlur = _DateTimeInput["default"].eventHandler.inputBlur;
DateInput2.eventHandler.calendarSelect = function (value) {
  var oldV = this._explicit(this._lastValue);
  this.value = value;
  var newV = this._explicit(this._value);
  if (!oldV !== !newV || oldV && newV && (0, _datetime.compareDate)(oldV, newV) !== 0) {
    this.emit('change', {
      type: 'change',
      target: this,
      value: this._value
    }, this);
  }
};
DateInput2.eventHandler.clickCalendarBtn = function () {
  if (this.readOnly) return;
  this._attachCalendar();
};
DateInput2.eventHandler.clickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.share.$calendar, event)) return;
  this._releaseCalendar();
};
DateInput2.eventHandler.calendarPick = function (event) {
  this._applyValue(event.value);
  this._notifyIfChange(event.originEvent || event);
  this._releaseCalendar();
};
DateInput2.property = {};
DateInput2.property.value = {
  set: function set(value) {
    value = this._normalizeValue(value);
    if (!value && this.notNull) value = (0, _datetime.beginOfDay)(new Date());
    this._value = value;
    this._lastValue = this._explicit(this._value);
    this._loadTextFromValue();
  },
  get: function get() {
    return this._explicit(this._value);
  }
};

/**
 * not support MMM, MMMM, support number only
 * @type {DateInput2}
 */
DateInput2.property.format = {
  set: function set(value) {
    value = value || 'dd/MM/yyyy';
    value = value.replace(new RegExp(_datetime.DATE_TIME_TOKEN_RGX.source, 'g'), function (full) {
      if (full === 'mm' || full === 'MMM' || full === 'MMMM' || full === 'mmm' || full === 'mmmm') return 'MM';
      if (full === 'm') return 'M';
      return full;
    });
    if (!this._verifyFormat(value)) {
      value = 'dd/MM/yyyy';
      console.error("Invalid date format: " + value);
    }
    this._format = value;
    this._formatTokens = this._format.match(new RegExp(_datetime.DATE_TIME_TOKEN_RGX.source, 'g')) || [];
    this.value = this.value; //update

    var testData = new Date(2000, 9, 22, 12, 12, 22, 335);
    testData = (0, _datetime.formatDateTime)(testData, value);
    this.addStyle('--format-width', Math.ceil((0, _utils.measureText)(testData.replace(/[a-z0-9]/g, 'M'), '14px arial').width / 14 * 2) / 2 + 'em');
    this.attr('data-format', value);
  },
  get: function get() {
    return this._format;
  }
};
DateInput2.property.disabled = {
  set: function set(value) {
    value = !!value;
    this.$input.disabled = value;
    if (value) this.addClass('as-disabled');else this.removeClass('as-disabled');
    this.$text.disabled = value;
  },
  get: function get() {
    return this.$input.disabled;
  }
};
DateInput2.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
      this.$input.readOnly = true;
    } else {
      this.removeClass('as-read-only');
      this.$input.readOnly = false;
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
DateInput2.property.text = {
  get: function get() {
    return this.$input.value;
  }
};
DateInput2.property.calendarLevel = {
  /***
   * @memberOf DateInput2
   * @name calendarLevel
   * @type {number}
   */
  get: function get() {
    if (this._formatTokens.indexOf('d') >= 0 || this._formatTokens.indexOf('dd') >= 0) return 'day';
    if (this._formatTokens.indexOf('w') >= 0 || this._formatTokens.indexOf('ww') >= 0) return 'week';
    if (this._formatTokens.indexOf('M') >= 0 || this._formatTokens.indexOf('MM') >= 0) return 'month';
    if (this._formatTokens.indexOf('Q') >= 0 || this._formatTokens.indexOf('QQ') >= 0) return 'quarter';
    return 'year';
  }
};
DateInput2.property.min = {
  set: function set(value) {
    this._min = this._normalizeValue(value) || new Date(1890, 0, 1);
    this._lastValue = this._explicit(this._value);
    this._applyValue(this._lastValue);
  },
  get: function get() {
    return this._min;
  }
};
DateInput2.property.max = {
  set: function set(value) {
    this._max = this._normalizeValue(value) || new Date(2090, 0, 1);
    this._lastValue = this._explicit(this._value);
    this._applyValue(this._lastValue);
  },
  get: function get() {
    var max = this._max;
    var min = this.min;
    if ((0, _datetime.compareDate)(min, max) > 0) return min;
    return max;
  }
};
DateInput2.property.notNull = {
  set: function set(value) {
    if (value) {
      this.addClass('as-must-not-null');
      if (!this.value) this.value = new Date();
    } else {
      this.removeClass('as-must-not-null');
    }
    this.value = this.value; //update
  },

  get: function get() {
    return this.hasClass('as-must-not-null');
  }
};
DateInput2.prototype.share = {
  /***
   * @type {ChromeCalendar}
   */
  $calendar: null,
  /***
   * @type {Follower}
   */
  $follower: null,
  /***
   * @type {DateInput2}
   */
  $holdingInput: null
};
DateInput2.prototype._prepareCalendar = function () {
  if (this.share.$calendar) return;
  this.share.$calendar = _({
    tag: 'chromecalendar',
    "class": ['as-date-input-calendar', 'as-dropdown-box-common-style']
  });
  if (this.share.$calendar.$attachHook) this.share.$calendar.$attachHook.cancelWaiting();
  this.share.$follower = _({
    tag: 'follower',
    "class": 'as-date-input-follower',
    child: this.share.$calendar
  });
  this.share.$follower.cancelWaiting();
};
DateInput2.prototype._attachCalendar = function () {
  var _this = this;
  this._prepareCalendar();
  if (this.share.$holdingInput) this.share.$holdingInput._releaseCalendar();
  this.share.$follower.addTo(document.body);
  this.share.$follower.addStyle('visibility', 'hidden');
  this.share.$holdingInput = this;
  this.share.$follower.followTarget = this;
  this.share.$follower.sponsorElement = this;
  this.share.$calendar.level = this.calendarLevel;
  this.share.$calendar.startDayOfWeek = this.startDayOfWeek || 0;
  this.share.$calendar.min = this._min;
  this.share.$calendar.max = this._max;
  this.share.$calendar.on('pick', this.eventHandler.calendarPick);
  this.share.$calendar.selectedDates = this.value ? [this.value] : [];
  if (this.share.$calendar.$attachHook) this.share.$calendar.$attachHook.emit('attached');
  this.share.$calendar.sync = this.share.$calendar.sync.then(function () {
    _this.share.$calendar.viewDate = _this.value ? _this.value : new Date(Math.max(_this._min.getTime(), Math.min(_this._max.getTime(), new Date().getTime())));
  });
  setTimeout(function () {
    document.body.addEventListener('click', this.eventHandler.clickOut);
    this.share.$follower.removeStyle('visibility');
  }.bind(this), 5);
  this.$calendarBtn.off('click', this.eventHandler.clickCalendarBtn);
};
DateInput2.prototype._releaseCalendar = function () {
  if (this.share.$holdingInput !== this) return;
  this.share.$calendar.off('pick', this.eventHandler.calendarPick);
  this.share.$follower.remove();
  document.body.removeEventListener('click', this.eventHandler.clickOut);
  setTimeout(function () {
    this.$calendarBtn.on('click', this.eventHandler.clickCalendarBtn);
  }.bind(this), 5);
  this.share.$holdingInput = null;
};
_ACore["default"].install(DateInput2);
var _default = DateInput2;
exports["default"] = _default;

/***/ }),

/***/ 45627:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _datetime = __webpack_require__(58286);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _OOP = __webpack_require__(38608);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @extends {AElement}
 * @constructor
 */
function DateNLevelInput() {
  this.$level = (0, _ACore.$)('.as-date-n-level-input-select-level', this);
  /**
   *
   * @type {DateInput}
   */
  this.$date = (0, _ACore.$)('dateinput', this);
  this.ctrl = new DateNLevelInputCtrl(this);
  this._allowLevels = this.defaultAllowLevels.slice();
  (0, _OOP.drillProperty)(this, this.$date, 'min');
  (0, _OOP.drillProperty)(this, this.$date, 'max');
  /**
   * @name level
   * @type {"date"| "week" | "month" | "quarter" | "year"}
   * @memberOf DateNLevelInput#
   * */

  /**
   * @name allowLevels
   * @type {Array<"date"| "week" | "month" | "quarter" | "year">}
   * @memberOf DateNLevelInput#
   * */

  /**
   * @name value
   * @type {Date}
   * @memberOf DateNLevelInput#
   * */

  /**
   * @readonly
   * @name format
   * @type {string}
   * @memberOf DateNLevelInput#
   * */
}

DateNLevelInput.tag = 'DateNLevelInput'.toLowerCase();
DateNLevelInput.prototype.leve2format = {
  date: 'dd/MM/yyyy',
  week: 'Tuần ww, yyyy',
  month: 'MM/yyyy',
  quarter: 'Quý QQ, yyyy',
  year: 'yyyy'
};
DateNLevelInput.prototype.leve2Name = {
  date: 'Ngày',
  week: 'Tuần',
  month: 'Tháng',
  quarter: 'Quý',
  year: 'Năm'
};
DateNLevelInput.prototype.defaultAllowLevels = ['date', 'month', 'year'];
DateNLevelInput.render = function () {
  return (0, _ACore._)({
    "class": 'as-date-n-level-input',
    extendEvent: ['change'],
    child: [{
      tag: 'dateinput',
      props: {
        format: 'dd/MM/yyyy'
      }
    }, {
      tag: 'button',
      "class": ['as-transparent-button', 'as-date-n-level-input-select-level'],
      child: 'span.mdi.mdi-cog'
    }]
  });
};
DateNLevelInput.property = {};
DateNLevelInput.property.allowLevels = {
  set: function set(value) {
    var _this = this;
    if (typeof value === "string") {
      value = value.split(/\s*,\s*/);
    }
    if (!(value instanceof Array)) {
      value = this.defaultAllowLevels.slice();
    }
    value = value.filter(function (x) {
      return !!_this.leve2format[x];
    });
    if (!value || value.length === 0) value = this.defaultAllowLevels.slice();
    var prevLevel = this.level;
    this._allowLevels = value;
    var newLevel = this.level;
    if (prevLevel !== newLevel) {
      this.level = newLevel; //update
    }
  },

  get: function get() {
    return this._allowLevels.slice();
  }
};
DateNLevelInput.property.level = {
  set: function set(value) {
    if (!this.leve2format[value]) value = 'date';
    this.attr('data-level', value);
    this.$date.format = this.leve2format[value];
    this.ctrl.prevVal = this.$date.value;
    this.ctrl.level = value;
  },
  get: function get() {
    var level = this.ctrl.level;
    if (this._allowLevels.indexOf(level) < 0) level = this._allowLevels[0];
    return level;
  }
};
DateNLevelInput.property.format = {
  get: function get() {
    return this.$date.format;
  }
};
DateNLevelInput.property.value = {
  set: function set(value) {
    this.$date.value = value;
    this.ctrl.prevVal = this.$date.value;
  },
  get: function get() {
    return this.$date.value;
  }
};
DateNLevelInput.property.readOnly = {
  set: function set(value) {
    this.$date.readOnly = value;
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.$date.readOnly;
  }
};
DateNLevelInput.property.disabled = {
  set: function set(value) {
    this.$date.disabled = value;
    this.$level.disabled = value;
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.$date.disabled;
  }
};
function DateNLevelInputCtrl(elt) {
  var _this2 = this;
  this.elt = elt;
  this.prevVal = this.elt.value;
  this.elt.$date.on('change', this.ev_dateChange.bind(this));
  this.level = 'date';
  _QuickMenu["default"].toggleWhenClick(this.elt.$level, {
    getMenuProps: function getMenuProps() {
      var props = {};
      props.items = _this2.elt._allowLevels.map(function (name) {
        return {
          text: "".concat(_this2.elt.leve2Name[name], " (").concat(_this2.elt.leve2format[name], ")"),
          level: name,
          icon: name === _this2.level ? 'span.mdi.mdi-check' : null
        };
      });
      return props;
    },
    onSelect: function onSelect(item) {
      if (_this2.level !== item.level) {
        _this2.level = item.level;
        _this2.ev_levelChange();
      }
    }
  });
}
DateNLevelInputCtrl.prototype.ev_dateChange = function (event) {
  this.notifyCanBeChanged();
};
DateNLevelInputCtrl.prototype.ev_levelChange = function (event) {
  var value = this.level;
  this.elt.attr('data-level', value);
  this.elt.$date.format = this.elt.leve2format[value];
  this.elt.$date.value = null;
  this.notifyCanBeChanged();
};
DateNLevelInputCtrl.prototype.notifyCanBeChanged = function (force) {
  var value = this.elt.$date.value;
  if (force || !value !== !this.prevVal || value && (0, _datetime.compareDate)(value, this.prevVal) !== 0) {
    this.elt.emit('change', Object.assign({}, {
      value: value,
      prevValue: this.prevVal,
      target: this.elt
    }), this.elt);
    this.prevVal = value;
  }
};
var _default = DateNLevelInput;
exports["default"] = _default;
_ACore["default"].install(DateNLevelInput);

/***/ }),

/***/ 37800:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(22863);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _utils = __webpack_require__(84512);
var _datetime = __webpack_require__(58286);
var _ChromeTimePicker = _interopRequireDefault(__webpack_require__(11564));
var _ChromeCalendar = _interopRequireDefault(__webpack_require__(51631));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _EventEmitter = __webpack_require__(46833);
var _keyboard = __webpack_require__(95141);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var STATE_NEW = 1;
var STATE_EDITED = 2;
var STATE_NONE = 0;

/***
 * @extends AElement
 * @constructor
 */
function DateTimeInput() {
  this._editingData = {};
  this._value = null;
  this._min = new Date(1890, 0, 1);
  this._max = new Date(new Date(2090, 0, 1).getTime() - 1);
  this._format = 'dd/MM/yyyy HH:mm';
  this.$attachhook = (0, _ACore._)('attachhook').addTo(this);
  this.domSignal = new _DomSignal["default"](this.$attachhook);
  this.domSignal.on('request_auto_select', this._autoSelect.bind(this));
  /***
   *
   * @type {HTMLInputElement | AElement}
   */
  this.$text = (0, _ACore.$)('.as-date-time-input-text', this).on('mousedown', this.eventHandler.mouseDownInput).on('mouseup', this.eventHandler.mouseUpInput).on('dblclick', this.eventHandler.dblclickInput).on('keydown', this.eventHandler.keydown).on('blur', this.eventHandler.inputBlur).on('contextmenu', function (event) {
    event.preventDefault();
  });
  this.$pickerBtn = (0, _ACore.$)('.as-date-time-input-icon-btn', this).on('click', this.eventHandler.clickPickerBtn);
  this.$clearBtn = (0, _ACore.$)('button.as-time-input-clear-btn', this).on('click', this.clear.bind(this));
  this.notNull = false;
  this.min = this._min;
  this.max = this._max;
}
DateTimeInput.tag = 'DateTimeInput'.toLowerCase();

//calendar-clock
DateTimeInput.render = function () {
  return (0, _ACore._)({
    extendEvent: ['change'],
    "class": 'as-date-time-input',
    child: [{
      tag: 'input',
      "class": 'as-date-time-input-text',
      attr: {
        ondrop: "return false;"
      },
      props: {
        value: 'dd/MM/yyyy HH:mm'
      }
    }, {
      tag: 'button',
      "class": 'as-time-input-clear-btn',
      child: 'span.mdi.mdi-close-circle'
    }, {
      tag: 'button',
      "class": 'as-date-time-input-icon-btn',
      child: 'span.mdi.mdi-calendar-clock'
    }]
  });
};
DateTimeInput.prototype.tokenRegex = /([^.\/:\-,\\\s]+)|([.\/:\-,\\]+)/i;

/***
 *
 * @param start
 * @returns {null|{ident: string, length: number, sourceText: string, replace: function(s: string, selecting:boolean):void, text: string, idx: number, elt: (HTMLInputElement|absol.AElement)}}
 */
DateTimeInput.prototype._tokenAt = function (start) {
  var rgx = new RegExp(this.tokenRegex.source, 'g');
  var rgxFormat = new RegExp(this.tokenRegex.source, 'g');
  var s = this.$text.value;
  var format = this._format;
  var tokenMatched = rgx.exec(s);
  var formatToken = rgxFormat.exec(format);
  var tokenMatchedList = [];
  var formatTokenList = [];
  var text, ident;
  var idx;
  while (tokenMatched && formatToken) {
    text = tokenMatched[1];
    ident = formatToken[1];
    if (text && (0, _utils.isDateTimeFormatToken)(ident)) {
      tokenMatchedList.push(tokenMatched);
      formatTokenList.push(formatToken);
    }
    tokenMatched = rgx.exec(s);
    formatToken = rgxFormat.exec(format);
  }
  var bestI = -1;
  var bestD = Infinity;
  var d;
  for (var i = 0; i < tokenMatchedList.length; ++i) {
    tokenMatched = tokenMatchedList[i];
    formatToken = formatTokenList[i];
    text = tokenMatched[1];
    idx = tokenMatched.index;
    d = Math.min(Math.abs(start - idx), Math.abs(start - (idx + text.length)));
    if (d < bestD) {
      bestD = d;
      bestI = i;
    }
  }
  if (bestI >= 0) {
    tokenMatched = tokenMatchedList[bestI];
    formatToken = formatTokenList[bestI];
    text = tokenMatched[1];
    ident = formatToken[1];
    idx = tokenMatched.index;
    return {
      idx: idx,
      text: text,
      length: text.length,
      ident: ident,
      elt: this.$text,
      sourceText: s,
      replace: function replace(newText, selecting) {
        var left = this.sourceText.substr(0, this.idx);
        var right = this.sourceText.substr(this.idx + this.length);
        this.text = newText;
        this.length = newText.length;
        this.sourceText = left + this.text + right;
        this.elt.value = this.sourceText;
        if (selecting) {
          this.elt.setSelectionRange(this.idx, this.idx + this.length);
        }
      }
    };
  }
  return null;
};
DateTimeInput.prototype._autoSelect = function () {
  var token = this._tokenAt(this.$text.selectionStart);
  var tokenEnd = this._tokenAt(this.$text.selectionEnd);
  if (token) {
    if (tokenEnd.idx === token.idx) {
      this.$text.setSelectionRange(token.idx, token.idx + token.length);
      this._editingData.state = STATE_NEW;
    } else {
      this.$text.select();
      this._editingData.state = STATE_NONE;
    }
  }
};
DateTimeInput.prototype._editNextToken = function () {
  var token = this._tokenAt(this.$text.selectionStart);
  if (!token) return false;
  var cIdx = token.idx;
  var l = this.$text.value.length;
  for (var i = token.idx + token.length; i < l; ++i) {
    token = this._tokenAt(i);
    if (token && token.idx !== cIdx) {
      this.$text.setSelectionRange(token.idx, token.idx + token.length);
      this._editingData.state = STATE_NEW;
      break;
    }
  }
};
DateTimeInput.prototype._editPrevToken = function () {
  var token = this._tokenAt(this.$text.selectionStart);
  if (!token) return false;
  var cIdx = token.idx;
  var l = this.$text.value.length;
  for (var i = token.idx - 1; i >= 0; --i) {
    token = this._tokenAt(i);
    if (token && token.idx !== cIdx) {
      this.$text.setSelectionRange(token.idx, token.idx + token.length);
      this._editingData.state = STATE_NEW;
      break;
    }
  }
};
DateTimeInput.prototype.tokenMap = {
  d: 'd',
  dd: 'd',
  M: 'M',
  MM: 'M',
  y: 'y',
  yyyy: 'y',
  hh: 'h',
  h: 'h',
  mm: 'm',
  m: 'm',
  a: 'a',
  HH: 'H',
  H: 'H'
};

/***
 *
 * @param {string} s
 * @returns {{}}
 * @private
 */
DateTimeInput.prototype._makeTokenDict = function (s) {
  var rgx = new RegExp(this.tokenRegex.source, 'g');
  var rgxFormat = new RegExp(this.tokenRegex.source, 'g');
  var format = this._format;
  var tokenMap = this.tokenMap;
  var tokenMatched = rgx.exec(s);
  var formatToken = rgxFormat.exec(format);
  var text, ident;
  var idx;
  var res = {};
  while (tokenMatched && formatToken) {
    text = tokenMatched[1];
    ident = formatToken[1];
    if (text) {
      if (tokenMap[ident]) {
        idx = tokenMatched.index;
        res[tokenMap[ident]] = {
          text: text,
          idx: idx,
          length: text.length,
          sourceText: s,
          value: ident === 'a' ? text : parseInt(text)
        };
      }
    }
    tokenMatched = rgx.exec(s);
    formatToken = rgxFormat.exec(format);
  }
  return res;
};

/***
 *
 * @param {Date} date
 * @private
 */
DateTimeInput.prototype._makeValueDict = function (date) {
  var res = {};
  res.d = {
    value: date.getDate()
  };
  res.y = {
    value: date.getFullYear()
  };
  res.M = {
    value: date.getMonth() + 1
  };
  res.m = {
    value: date.getMinutes()
  };
  res.h = {
    value: date.getHours()
  };
  res.H = {
    value: date.getHours()
  };
  if (res.h.value < 12) {
    if (res.h.value === 0) res.h.value = 12;
    res.a = {
      value: "AM"
    };
  } else {
    if (res.h.value > 12) res.h.value -= 12;
    res.a = {
      value: "PM"
    };
  }
  return res;
};
DateTimeInput.prototype._applyTokenDict = function (format, dict, debug) {
  var rgx = new RegExp(this.tokenRegex.source, 'g');
  var tokenMap = this.tokenMap;
  return format.replace(rgx, function (full, g1, g2, sourceText) {
    if (g1 && tokenMap[g1]) {
      var ident = tokenMap[g1];
      if (ident === 'a') {
        return dict.a && dict.a.value || 'a';
      } else {
        if (dict[ident] && !isNaN(dict[ident].value)) {
          var numberText = dict[ident].value + '';
          while (numberText.length < g1.length) {
            numberText = '0' + numberText;
          }
          return numberText;
        } else {
          return full;
        }
      }
    } else return full;
  });
};
DateTimeInput.prototype._loadValueFromInput = function () {
  var tkDict = this._makeTokenDict(this.$text.value);
  var H = NaN;
  var m = NaN;
  if (tkDict.H && (0, _utils.isRealNumber)(tkDict.H.value)) {
    H = tkDict.H.value;
  } else if (tkDict.h && tkDict.a && tkDict.a.value === 'AM') {
    H = tkDict.h.value % 12;
  } else if (tkDict.h && tkDict.a && tkDict.a.value === 'PM') {
    H = tkDict.h.value + (tkDict.h.value === 12 ? 0 : 12);
  }
  if (!tkDict.h || !tkDict.H) H = 0;
  if (tkDict.m) {
    m = tkDict.m.value;
  } else {
    m = 0;
  }
  var date = new Date(tkDict.y.value, tkDict.M.value - 1, tkDict.d.value, H, m);
  if (isNaN(date.getTime())) {
    this._value = null;
  } else {
    this._value = date;
  }
};
DateTimeInput.prototype.clear = function () {
  var lev = this._lastEmitValue;
  if (this.notNull) {
    this.value = (0, _datetime.formatDateTime)(new Date(Math.max(this.min.getTime(), Math.min(this.max.getTime(), new Date().getTime()))), this.format);
  } else {
    this.value = null;
  }
  this._lastEmitValue = lev;
  this._notifyIfChange();
};
DateTimeInput.prototype._notifyIfChange = function (event) {
  if (!this._lastEmitValue && !this._value) return;
  if (this._lastEmitValue && this._value && this._lastEmitValue.getTime() === this._value.getTime()) return;
  this.emit('change', {
    type: 'change',
    target: this,
    value: this._value,
    originEvent: event
  }, this);
  this._lastEmitValue = this._value;
};
DateTimeInput.prototype._correctingInput = function () {
  var tkDict = this._makeTokenDict(this.$text.value);
  var equalMin = true;
  var equalMax = true;
  if (!isNaN(tkDict.y.value)) {
    tkDict.y.value = Math.max(this._min.getFullYear(), Math.min(this._max.getFullYear(), tkDict.y.value));
    equalMin = tkDict.y.value === this._min.getFullYear();
    equalMax = tkDict.y.value === this._max.getFullYear();
  } else {
    equalMin = false;
    equalMax = false;
  }
  if (!isNaN(tkDict.M.value)) {
    tkDict.M.value = Math.max(1, Math.min(12, tkDict.M.value));
    if (equalMin) {
      tkDict.M.value = Math.max(this._min.getMonth() + 1, tkDict.M.value);
      equalMin = tkDict.M.value === this._min.getMonth() + 1;
    }
    if (equalMax) {
      tkDict.M.value = Math.min(this._max.getMonth() + 1, tkDict.M.value);
      equalMax = this._max.getMonth() + 1;
    }
  } else {
    equalMin = false;
    equalMax = false;
  }
  if (!isNaN(tkDict.d.value)) {
    tkDict.d.value = Math.max(1, Math.min(31, tkDict.d.value));
    if (!isNaN(tkDict.M.value)) {
      tkDict.d.value = Math.min(tkDict.d.value, (0, _datetime.daysInMonth)(isNaN(tkDict.y.value) ? 2020 : tkDict.y.value, tkDict.M.value - 1));
    }
    if (equalMin) {
      tkDict.d.value = Math.max(this._min.getDate(), tkDict.d.value);
      equalMin = tkDict.d.value === this._min.getDate();
    }
    if (equalMax) {
      tkDict.d.value = Math.min(this._max.getDate(), tkDict.d.value);
      equalMax = tkDict.d.value === this._max.getDate();
    }
  } else {
    equalMin = false;
    equalMax = false;
  }
  //todo: min max
  if (tkDict.a && (tkDict.a.value === 'AM' || tkDict.a.value === 'PM')) {
    if (equalMin) {}
  } else {
    equalMin = false;
    equalMax = false;
  }
  this.$text.value = this._applyTokenDict(this._format, tkDict);
  this.attr('data-text', this.$text.value);
};
DateTimeInput.prototype._correctingCurrentToken = function () {
  var token = this._tokenAt(this.$text.selectionStart);
  if (!token) return;
  var value;
  if (token.ident === 'a') {
    if (token.text !== 'a' && token.text !== 'AM' && token.text !== 'PM') {
      token.replace('a', false);
    }
  } else {
    value = parseInt(token.text);
    var rqMin = {
      d: 1,
      dd: 1,
      M: 1,
      MM: 1,
      y: 1890,
      yyyy: 1890,
      h: 1,
      hh: 1,
      HH: 0,
      H: 0,
      m: 0,
      mm: 0
    }[token.ident];
    var rqMax = {
      d: 31,
      dd: 31,
      M: 12,
      MM: 12,
      y: 2089,
      yyyy: 2089,
      h: 12,
      hh: 12,
      HH: 23,
      H: 23,
      m: 59,
      mm: 59
    }[token.ident];
    if (rqMin !== undefined) {
      if (!isNaN(value)) {
        if (value < rqMin || value > rqMin) {
          value = Math.max(rqMin, Math.min(rqMax, value));
          token.replace((0, _utils.zeroPadding)(value, token.ident.length), false);
          this._editingData.d = value;
        }
      } else if (token.text !== token.ident) {
        token.replace(token.ident, false);
      }
    }
  }
};
DateTimeInput.prototype._dateFrom = function (value) {
  var typeV = _typeof(value);
  if (typeV === 'string' || typeV === 'number') {
    value = new Date(value);
  }
  if (!value || !value.getTime) value = null;
  if (value) {
    value = new Date(value.getTime());
    value.setSeconds(0, 0);
  }
  return value || null;
};
DateTimeInput.property = {};
DateTimeInput.property.disabled = {
  set: function set(value) {
    this.$text.disabled = !!value;
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
DateTimeInput.property.notNull = {
  set: function set(value) {
    if (value) {
      this.addClass('as-must-not-null');
      if (!this.value) this.value = new Date();
    } else {
      this.removeClass('as-must-not-null');
    }
    this.value = this.value; //update
  },

  get: function get() {
    return this.hasClass('as-must-not-null');
  }
};
DateTimeInput.property.format = {
  set: function set(value) {
    value = value || 'dd/MM/yyyy HH:mm';
    var dict;
    if (this._value) {
      dict = this._makeValueDict(this._value);
    } else {
      dict = this._makeTokenDict(this.$text.value);
    }
    this._format = value;
    this.$text.value = this._applyTokenDict(value, dict);
    this.attr('data-text', this.$text.value);
  },
  get: function get() {
    return this._format;
  }
};
DateTimeInput.property.value = {
  set: function set(value) {
    this._value = this._dateFrom(value);
    var dict;
    if (this._value) {
      dict = this._makeValueDict(this._value);
    } else {
      dict = this._makeTokenDict(this.$text.value);
    }
    if (value) {
      this.$text.value = this._applyTokenDict(this._format, dict, true);
      this.attr('data-text', this.$text.value);
    } else {
      this.$text.value = this.format;
      this.attr('data-text', this.$text.value);
    }
    this._lastEmitValue = this._value;
  },
  get: function get() {
    return this._value;
  }
};
DateTimeInput.property.min = {
  set: function set(value) {
    this._min = this._dateFrom(value) || new Date(1890, 0, 1);
  },
  get: function get() {
    return this._min;
  }
};
DateTimeInput.property.max = {
  set: function set(value) {
    this._max = this._dateFrom(value) || new Date(new Date(2090, 0, 1).getTime() - 1);
  },
  get: function get() {
    return this._max;
  }
};
DateTimeInput.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
DateTimeInput.property.text = {
  get: function get() {
    return this.$text.value;
  }
};
DateTimeInput.eventHandler = {};
DateTimeInput.eventHandler.mouseUpInput = function () {
  if (!this.readOnly) {
    this.domSignal.emit('request_auto_select');
  }
};
DateTimeInput.eventHandler.mouseDownInput = function () {
  if (!this.readOnly && document.activeElement === this.$text) {
    this._correctingCurrentToken();
  }
};
DateTimeInput.eventHandler.dblclickInput = function (event) {
  event.preventDefault();
};

/***
 *
 * @param {KeyboardEvent} event
 */
DateTimeInput.eventHandler.keydown = function (event) {
  var kbId = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  if (this.readOnly) {
    if (!kbId.match(/^arrow/) && !kbId.match(/^ctrl-[ca]/)) {
      event.preventDefault();
    }
    return;
  }
  var token = this._tokenAt(this.$text.selectionStart);
  var endToken = this._tokenAt(this.$text.selectionEnd);
  if (!token) {
    if (event.key === 'Enter') {
      this._correctingInput();
      this._loadValueFromInput();
      this._notifyIfChange(event);
    }
    return;
  }
  var newTokenText;
  var value;
  if (event.key.startsWith('Arrow') || [' ', ':', '/', '-'].indexOf(event.key) >= 0) {
    event.preventDefault();
    switch (event.key) {
      case 'ArrowLeft':
        this._editPrevToken();
        break;
      case 'ArrowRight':
      case ' ':
      case ':':
      case '/':
      case '-':
        this._editNextToken();
        break;
      case 'ArrowUp':
      case 'ArrowDown':
        switch (token.ident) {
          case 'dd':
          case 'd':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.d = event.key === 'ArrowUp' ? 1 : 31;
            } else {
              this._editingData.d = 1 + (value + (event.key === 'ArrowUp' ? 0 : 29)) % 31;
            }
            newTokenText = '' + this._editingData.d;
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case 'MM':
          case 'M':
            value = parseInt(token.text) - 1;
            if (isNaN(value)) {
              this._editingData.M = event.key === 'ArrowUp' ? 0 : 11;
            } else {
              this._editingData.M = (value + (event.key === 'ArrowUp' ? 1 : 11)) % 12;
            }
            newTokenText = '' + (this._editingData.M + 1);
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case 'yyyy':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.y = new Date().getFullYear();
            } else {
              this._editingData.y = Math.max(1890, Math.min(2089, value + (event.key === 'ArrowUp' ? 1 : -1)));
            }
            newTokenText = this._editingData.y + '';
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case "hh":
          case 'h':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.h = event.key === 'ArrowUp' ? 1 : 12;
            } else {
              this._editingData.h = 1 + (value + (event.key === 'ArrowUp' ? 0 : 10)) % 12;
            }
            newTokenText = this._editingData.h + '';
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case "HH":
          case 'H':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.H = event.key === 'ArrowUp' ? 1 : 12;
            } else {
              this._editingData.H = (value + (event.key === 'ArrowUp' ? 1 : 23)) % 24;
            }
            newTokenText = this._editingData.H + '';
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case "mm":
          case 'm':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.m = event.key === 'ArrowUp' ? 0 : 59;
            } else {
              this._editingData.m = (value + (event.key === 'ArrowUp' ? 1 : 59)) % 60;
            }
            newTokenText = this._editingData.m + '';
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case 'a':
            value = token.text;
            this._editingData.a = value === 'PM' ? "AM" : "PM";
            newTokenText = this._editingData.a;
            token.replace(newTokenText, true);
            break;
        }
        break;
    }
  } else if (event.key === "Delete" || event.key === 'Backspace') {
    event.preventDefault();
    if (endToken.idx !== token.idx) {
      if (this.notNull) {
        this.$text.value = (0, _datetime.formatDateTime)(new Date(Math.max(this.min.getTime(), Math.min(this.max.getTime(), new Date().getTime()))), this.format);
      } else {
        this.$text.value = this._format;
      }
      this.attr('data-text', this.$text.value);
      this.$text.select();
    } else {
      if (this.notNull) {
        switch (token.ident) {
          case 'HH':
          case 'mm':
          case 'H':
          case 'm':
            token.replace((0, _utils.zeroPadding)(0, token.ident.length), true);
            break;
          case 'h':
          case 'hh':
            token.replace('12', true);
            break;
          case 'M':
          case 'MM':
          case 'dd':
          case 'd':
            token.replace((0, _utils.zeroPadding)(1, token.ident.length), true);
            break;
          case 'y':
          case 'yyyy':
            token.replace((0, _utils.zeroPadding)(Math.max(this.min.getFullYear(), Math.min(this.max.getFullYear(), new Date().getFullYear())), token.ident.length), true);
            break;
          case 'a':
            token.replace('AM', true);
            break;
        }
      } else {
        token.replace(token.ident, true);
      }
      if (event.key === "Delete") this._editNextToken();else this._editPrevToken();
    }
  } else if (event.key === "Enter" || event.key === 'Tab') {
    this._correctingInput();
    this._loadValueFromInput();
    this._notifyIfChange(event);
  } else if (event.ctrlKey) {
    switch (event.key) {
      case 'a':
      case 'A':
        break;
      case 'c':
      case 'C':
        break;
      case 'x':
      case 'X':
        this.domSignal.once('clear_value', function () {
          this.$text.value = this._format;
          this.attr('data-text', this.$text.value);
          this.$text.select();
        }.bind(this));
        this.domSignal.emit('clear_value');
        break;
      default:
        event.preventDefault();
    }
  } else if (event.key.match(/^[0-9]$/g)) {
    event.preventDefault();
    var dVal = parseInt(event.key);
    if (this._editingData.state === STATE_NEW) {
      switch (token.ident) {
        case 'dd':
        case 'd':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          this._editingData.d = dVal;
          if (dVal > 3) {
            this._editNextToken();
          }
          break;
        case 'MM':
        case 'M':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          this._editingData.M = dVal;
          if (dVal > 1) {
            this._editNextToken();
          }
          break;
        case 'yyyy':
        case 'y':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          this._editingData.state_num = 1;
          break;
        case 'm':
        case 'mm':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          if (dVal > 5) {
            this._editNextToken();
          }
          break;
        case 'h':
        case 'hh':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          if (dVal > 1) {
            this._editNextToken();
          }
          break;
        case 'HH':
        case 'H':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          if (dVal > 2) {
            this._editNextToken();
          }
          break;
      }
    } else {
      switch (token.ident) {
        case 'dd':
        case 'd':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(1, Math.min(31, dVal));
          this._editingData.d = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editNextToken();
          break;
        case 'MM':
        case 'M':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(1, Math.min(12, dVal));
          this._editingData.M = dVal - 1;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editNextToken();
          break;
        case 'yyyy':
        case 'y':
          dVal = (parseInt(token.text.replace(/^./, '')) || 0) * 10 + dVal;
          this._editingData.state_num++;
          if (this._editingData.state_num >= 4) {
            // dVal = Math.max(1890, Math.min(2089, dVal));
            token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
            this._editNextToken();
          } else {
            token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          }
          break;
        case 'm':
        case 'mm':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(0, Math.min(59, dVal));
          this._editingData.m = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editNextToken();
          break;
        case 'h':
        case 'hh':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(1, Math.min(12, dVal));
          this._editingData.h = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editNextToken();
          break;
        case 'H':
        case 'HH':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(0, Math.min(23, dVal));
          this._editingData.h = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editNextToken();
          break;
      }
    }
  } else if (event.key.match(/^[aApPSCsc]$/) && token.ident === 'a') {
    event.preventDefault();
    if (event.key.match(/^[aAsS]$/)) {
      token.replace('AM', true);
      this._editingData.a = "AM";
    } else {
      token.replace('PM', true);
      this._editingData.a = "PM";
    }
    this._editNextToken();
  } else {
    event.preventDefault();
  }
};
DateTimeInput.eventHandler.inputBlur = function () {
  this._correctingInput();
  this._loadValueFromInput();
  this._notifyIfChange();
};
DateTimeInput.eventHandler.clickPickerBtn = function () {
  this._attachPicker();
};
DateTimeInput.eventHandler.clickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.share.$follower, event)) return;
  this._releasePicker();
};
DateTimeInput.eventHandler.clickCancelBtn = function () {
  this._releasePicker();
};
DateTimeInput.eventHandler.calendarPick = function (event) {
  var value = event.value;
  var tkDict = this._makeTokenDict(this.share.pickedValeText);
  if (tkDict.y) {
    tkDict.y.value = value.getFullYear();
  }
  if (tkDict.M) {
    tkDict.M.value = value.getMonth() + 1;
  }
  if (tkDict.d) {
    tkDict.d.value = value.getDate();
  }
  this.share.pickedValeText = this._applyTokenDict(this._format, tkDict);
  if (this.share.dateOnly) this.eventHandler.clickOKBtn({});
};
DateTimeInput.eventHandler.clickOKBtn = function (event) {
  this.$text.value = this.share.pickedValeText;
  this.attr('data-text', this.$text.value);
  this._correctingInput();
  this._loadValueFromInput();
  this._notifyIfChange(event);
  this._releasePicker();
};
DateTimeInput.eventHandler.timePick = function (event) {
  var hour = event.hour;
  var minute = event.minute;
  var tkDict = this._makeTokenDict(this.share.pickedValeText);
  if (tkDict.h) {
    tkDict.h.value = 1 + (hour + 11) % 12;
    if (tkDict.a) {
      tkDict.a.value = hour >= 12 ? "PM" : 'AM';
    }
  }
  if (tkDict.H) {
    tkDict.H.value = hour;
  }
  if (tkDict.m) {
    tkDict.m.value = minute;
  }
  this.share.pickedValeText = this._applyTokenDict(this._format, tkDict);
};
DateTimeInput.prototype.share = {
  $follower: null,
  $calendar: null,
  $timePicker: null,
  $holdingInput: null
};
DateTimeInput.prototype._preparePicker = function () {
  if (!this.share.$follower) {
    this.share.$timePicker = (0, _ACore._)({
      tag: _ChromeTimePicker["default"].tag,
      "class": 'as-date-time-input-time-picker'
    });
    this.share.$calendar = (0, _ACore._)({
      tag: _ChromeCalendar["default"].tag,
      "class": 'as-date-time-input-date-picker'
    });
    if (this.share.$calendar.$attachHook) {
      this.share.$calendar.$attachHook.cancelWaiting();
    }
    this.share.$cancelBtn = (0, _ACore._)({
      tag: 'a',
      "class": 'as-select-list-box-cancel-btn',
      attr: {
        "data-ml-key": 'txt_cancel'
      }
    });
    this.share.$okBtn = (0, _ACore._)({
      tag: 'a',
      "class": 'as-select-list-box-ok-btn',
      attr: {
        "data-ml-key": 'txt_ok'
      }
    });
    this.share.$follower = (0, _ACore._)({
      tag: _Follower["default"].tag,
      "class": ['as-date-time-input-follower', 'as-dropdown-box-common-style'],
      child: [{
        "class": 'as-date-time-input-picker-ctn',
        child: [this.share.$calendar, this.share.$timePicker]
      }, {
        "class": 'as-dropdown-box-footer',
        child: [{
          "class": 'as-dropdown-box-footer-right',
          child: [this.share.$okBtn, this.share.$cancelBtn]
        }]
      }]
    });
    this.share.$footer = (0, _ACore.$)('.as-dropdown-box-footer', this.share.$follower);
    this.share.$follower.cancelWaiting();
  }
};
DateTimeInput.prototype._attachPicker = function () {
  this._preparePicker();
  if (this.share.$holdingInput) this.share.$holdingInput._releasePicker();
  this.share.pickedValeText = this.$text.value;
  this.share.$holdingInput = this;
  this.share.$follower.addStyle('visibility', 'hidden');
  this.share.$follower.addTo(document.body);
  this.share.$follower.followTarget = this;
  this.share.$follower.sponsorElement = this;
  this.$pickerBtn.off('click', this.eventHandler.clickPickerBtn);
  this.share.$calendar.on('pick', this.eventHandler.calendarPick);
  this.share.$timePicker.on('change', this.eventHandler.timePick);
  this.share.$okBtn.on('click', this.eventHandler.clickOKBtn);
  this.share.$cancelBtn.on('click', this.eventHandler.clickCancelBtn);
  if (this.share.$calendar.$attachHook) {
    this.share.$calendar.$attachHook.emit('attached');
  }
  var tkDict = this._makeTokenDict(this.$text.value);
  this.share.dateOnly = !tkDict.m && !tkDict.H && !tkDict.h;
  if (tkDict.h && !isNaN(tkDict.h.value)) {
    if (tkDict.a && tkDict.a.value === 'PM') {
      this.share.$timePicker.hour = 12 + tkDict.h.value % 12;
    } else {
      this.share.$timePicker.hour = tkDict.h.value % 12;
    }
  } else if (tkDict.H && (0, _utils.isRealNumber)(tkDict.H.value)) {
    this.share.$timePicker.hour = tkDict.H.value;
  } else if (!tkDict.H && !tkDict.h) {
    this.share.$timePicker.hour = 0;
  } else {
    this.share.$timePicker.hour = null;
  }
  this.share.$timePicker.s24 = !!tkDict.H || !tkDict.a;
  if (tkDict.m && !isNaN(tkDict.m.value)) {
    this.share.$timePicker.minute = tkDict.m.value;
  } else if (!tkDict.m) {
    this.share.$timePicker.minute = 0;
  } else {
    this.share.$timePicker.minute = null;
  }
  if (this.share.dateOnly) {
    this.share.$timePicker.addStyle('display', 'none');
    this.share.$footer.addStyle('display', 'none');
  } else {
    this.share.$timePicker.removeStyle('display');
    this.share.$footer.removeStyle('display');
    this.share.$timePicker.scrollIntoSelected();
  }
  var date = null;
  if (tkDict.d && !isNaN(tkDict.d.value) && tkDict.M && !isNaN(tkDict.M.value) && tkDict.y && !isNaN(tkDict.y.value)) {
    date = new Date(tkDict.y.value, tkDict.M.value - 1, tkDict.d.value);
    if (isNaN(date.getTime())) date = null;
  }
  if (date) {
    this.share.$calendar.selectedDates = [date];
    this.share.$calendar.viewDate = date;
  } else {
    this.share.$calendar.selectedDates = [];
    var viewDate = null;
    if (tkDict.y && !isNaN(tkDict.y.value)) {
      if (tkDict.M && !isNaN(tkDict.M.value)) {
        if (tkDict.d && !isNaN(tkDict.d.value)) {
          viewDate = new Date(tkDict.y.value, tkDict.M.value - 1, tkDict.d.value);
        } else {
          viewDate = new Date(tkDict.y.value, tkDict.M.value - 1, 1);
        }
      } else {
        viewDate = new Date(tkDict.y.value, 0, 1);
      }
    } else {
      viewDate = new Date();
    }
    if (viewDate && !isNaN(viewDate.getTime())) {
      this.share.$calendar.viewDate = viewDate;
    } else {
      this.share.$calendar.viewDate = new Date();
    }
  }
  setTimeout(function () {
    this.share.$follower.removeStyle('visibility');
    document.addEventListener('click', this.eventHandler.clickOut);
  }.bind(this), 5);
};
DateTimeInput.prototype._releasePicker = function () {
  if (this.share.$holdingInput !== this) return;
  this.share.$follower.remove();
  this.share.$holdingInput = null;
  this.share.$calendar.off('pick', this.eventHandler.calendarPick);
  this.share.$timePicker.off('change', this.eventHandler.timePick);
  this.share.$okBtn.off('click', this.eventHandler.clickOKBtn);
  this.share.$cancelBtn.off('click', this.eventHandler.clickCancelBtn);
  document.removeEventListener('click', this.eventHandler.clickOut);
  setTimeout(function () {
    this.$pickerBtn.on('click', this.eventHandler.clickPickerBtn);
  }.bind(this));
};
_ACore["default"].install(DateTimeInput);
var _default = DateTimeInput;
exports["default"] = _default;

/***/ }),

/***/ 69382:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var originSetTimeout = setTimeout;
var originClearTimeout = clearTimeout;
var originSetInterval = setInterval;
var originClearInterval = clearInterval;
var pendingTimeout = 0;
var pendingInterval = 0;
var timeoutDict = {};
var intervalDict = {};
function DebugTask() {
  var res = _({
    "class": 'absol-debug-task',
    child: [{
      child: [{
        tag: 'span',
        "class": 'absol-debug-task-name',
        child: {
          text: 'settimeout '
        }
      }, {
        tag: 'span',
        "class": ['absol-debug-task-value', 'settimeout'],
        child: {
          text: '0'
        }
      }]
    }, {
      child: [{
        tag: 'span',
        "class": 'absol-debug-task-name',
        child: {
          text: 'setintervel '
        }
      }, {
        tag: 'span',
        "class": ['absol-debug-task-value', 'setinterval'],
        child: {
          text: '0'
        }
      }]
    }, {
      child: [{
        tag: 'span',
        "class": 'absol-debug-task-name',
        child: {
          text: 'Work '
        }
      }, {
        tag: 'span',
        "class": ['absol-debug-task-value', 'work'],
        child: {
          text: '0%'
        }
      }]
    }]
  });
  res._timeout = 0;
  res._interval = 0;
  res._work = 0;
  res.$setTimeOutValue = $('.absol-debug-task-value.settimeout', res);
  res.$setIntervalValue = $('.absol-debug-task-value.setinterval', res);
  res.$setWorkValue = $('.absol-debug-task-value.work', res);
  return res;
}
DebugTask.property = {};
DebugTask.property.timeout = {
  set: function set(value) {
    this._timeout = value;
    this.$setTimeOutValue.innerHTML = value + '';
  },
  get: function get() {
    return this._timeout;
  }
};
DebugTask.property.interval = {
  set: function set(value) {
    this._interval = value;
    this.$setIntervalValue.innerHTML = value + '';
  },
  get: function get() {
    return this._interval;
  }
};
DebugTask.property.work = {
  set: function set(value) {
    this._work = value;
    value = (value * 100).toFixed(1);
    this.$setWorkValue.innerHTML = value + '%';
  },
  get: function get() {
    return this._work;
  }
};
DebugTask.start = function () {
  if (DebugTask.started) return;
  if (!DebugTask.$view) {
    DebugTask.$view = _('debugtask');
  }
  var times = [];
  originSetInterval(function () {
    var now = performance.now();
    while (times.length > 0 && times[0].end < now - 2000) {
      times.shift();
    }
    if (times.length == 0) DebugTask.$view.work = 0;
  }, 3000);
  __webpack_require__.g.setTimeout = function () {
    var args = Array.prototype.map.call(arguments, function (x) {
      return x;
    });
    var originCallback = arguments[0];
    if (typeof originCallback == 'undefined') return;
    if (typeof originCallback == 'string') {
      originCallback = new Function(originCallback);
    }
    args[0] = function () {
      var ret;
      try {
        var now = performance.now();
        while (times.length > 0 && times[0].end < now - 1000) {
          times.shift();
        }
        ret = originCallback.apply(null, arguments);
        var now1 = performance.now();
        var _long = now1 - now;
        times.push({
          "long": _long,
          start: now,
          end: now1
        });
        var sTime = 0;
        for (var i = 0; i < times.length; ++i) {
          sTime += times[i]["long"];
        }
        DebugTask.$view.work = sTime / Math.max(now1 - times[0].start, 1000);
      } catch (e) {
        console.error(e);
      }
      if (timeoutDict[timeoutId]) {
        pendingTimeout--;
        delete timeoutDict[timeoutId];
        DebugTask.$view.timeout = pendingTimeout;
      }
      return ret;
    };
    var timeoutId = originSetTimeout.apply(__webpack_require__.g, args);
    pendingTimeout++;
    timeoutDict[timeoutId] = true;
    DebugTask.$view.timeout = pendingTimeout;
    return timeoutId;
  };
  __webpack_require__.g.clearTimeout = function (timeoutId) {
    if (timeoutDict[timeoutId]) {
      pendingTimeout--;
      delete timeoutDict[timeoutId];
      DebugTask.$view.timeout = pendingTimeout;
    }
    return originClearTimeout.apply(__webpack_require__.g, arguments);
  };
  __webpack_require__.g.setInterval = function () {
    var args = Array.prototype.map.call(arguments, function (x) {
      return x;
    });
    var originCallback = arguments[0];
    if (typeof originCallback == 'undefined') return;
    if (typeof originCallback == 'string') {
      originCallback = new Function(originCallback);
    }
    args[0] = function () {
      var ret;
      try {
        var now = performance.now();
        while (times.length > 0 && times[0].end < now - 1000) {
          times.shift();
        }
        ret = originCallback.apply(null, arguments);
        var now1 = performance.now();
        var _long2 = now1 - now;
        times.push({
          "long": _long2,
          start: now,
          end: now1
        });
        var sTime = 0;
        for (var i = 0; i < times.length; ++i) {
          sTime += times[i]["long"];
        }
        DebugTask.$view.work = sTime / Math.max(now1 - times[0].start, 1000);
      } catch (e) {
        console.error(e);
      }
      return ret;
    };
    var intervalId = originSetInterval.apply(__webpack_require__.g, args);
    pendingInterval++;
    intervalDict[intervalId] = true;
    DebugTask.$view.interval = pendingInterval;
    return intervalId;
  };
  __webpack_require__.g.clearInterval = function (intervalId) {
    var args = Array.prototype.map.call(arguments, function (x) {
      return x;
    });
    if (intervalDict[intervalId]) {
      pendingInterval--;
      delete intervalDict[intervalId];
      DebugTask.$view.interval = pendingInterval;
    }
    return originClearInterval.apply(__webpack_require__.g, args);
  };
  _Dom["default"].documentReady.then(function () {
    DebugTask.$view.addTo(document.body);
  });
};
_ACore["default"].install('debugtask', DebugTask);
var _default = DebugTask;
exports["default"] = _default;

/***/ }),

/***/ 39891:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function Draggable(element) {
  if (!element) element = _ACore["default"]._('div');else _ACore["default"].$(element);
  element.defineEvent(['predrag', 'drag', 'begindrag', 'enddrag']);
  var body = _ACore["default"].$('body');
  var isMoving = false;
  var firstMove = false;
  var offsetX;
  var offsetY;
  var fontSize;
  var left0em, top0em, left0, top0;
  var finishMoving = function finishMoving(event) {
    if (isMoving) {
      isMoving = false;
      body.off('mousemove', mouseMoveEventHandler);
      event.moveDX = event.clientX - offsetX;
      event.moveDY = event.clientY - offsetY;
      event.moveDXem = event.moveDX / fontSize;
      event.moveDYem = event.moveDY / fontSize;
      event.moveToX = left0 + event.moveDX;
      event.moveToY = top0 + event.moveDY;
      element.emit('enddrag', event);
    }
  };
  var mouseUpEventHandler = function mouseUpEventHandler(event) {
    finishMoving(event);
  };
  var mouseMoveEventHandler = function mouseMoveEventHandler(event) {
    event.preventDefault();
    event.moveDX = event.clientX - offsetX;
    event.moveDY = event.clientY - offsetY;
    event.moveDXem = event.moveDX / fontSize;
    event.moveDYem = event.moveDY / fontSize;
    event.moveToX = left0 + event.moveDX;
    event.moveToY = top0 + event.moveDY;
    event.moveToXem = left0em + event.moveDXem;
    event.moveToYem = top0em + event.moveDYem;
    if (firstMove) {
      firstMove = false;
      element.emit('begindrag', event);
    }
    element.emit('drag', event);
  };
  var mouseOutEventHandler = function mouseOutEventHandler(event) {
    finishMoving(event);
  };
  var mouseDownEventHandler = function mouseDownEventHandler(event) {
    isMoving = true;
    firstMove = true;
    body.on('mousemove', mouseMoveEventHandler);
    body.once('mouseleave', mouseOutEventHandler);
    body.once('mouseup', mouseUpEventHandler);
    fontSize = this.getFontSize();
    offsetX = event.clientX;
    offsetY = event.clientY;
    left0 = parseFloat(element.getComputedStyleValue('left').replace('px', ''));
    top0 = parseFloat(element.getComputedStyleValue('top').replace('px', ''));
    left0em = left0 / fontSize;
    top0em = top0 / fontSize;
    event.x0 = left0;
    event.y0 = top0;
    event.y0em = left0em;
    event.y0em = top0em;
    element.emit('predrag', event);
  };
  element.on('mousedown', mouseDownEventHandler);
  return element;
}
;
var _default = Draggable;
exports["default"] = _default;

/***/ }),

/***/ 9294:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
__webpack_require__(21984);
var _DraggableVStack = _interopRequireDefault(__webpack_require__(73816));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _PositionTracker = _interopRequireDefault(__webpack_require__(97252));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @augments DraggableVStack
 * @augments PositionTracker
 * @constructor
 */
function DraggableHStack() {
  this._dragData = null;
  this.$cloneContainer = _('.absol-draggable-stack-clone-container');
  this.on('predrag', this.eventHandler.predrag).on('dragstart', this.eventHandler.dragstart).on('drag', this.eventHandler.drag).on('dragend', this.eventHandler.dragend);
  _({
    elt: this,
    tag: _PositionTracker["default"]
  }).on('positionchange', this._updateDraggingPosition.bind(this));
}
DraggableHStack.tag = "DraggableHStack".toLowerCase();
DraggableHStack.render = function () {
  return _({
    tag: 'hanger',
    extendEvent: 'change',
    "class": ['absol-draggable-stack', 'absol-draggable-hstack']
  });
};

/***
 *
 * @param {Rectangle} rect
 * @returns {number}
 * @private
 */
DraggableHStack.prototype._findDropIdx = function (rect) {
  if (!this._dragData) return -1;
  var centerX = rect.x + rect.width / 2;
  var currentBound = _Rectangle["default"].fromClientRect(this.getBoundingClientRect());
  var nearestDistance = Math.abs(centerX - currentBound.width); //end of stack
  var cDist;
  var nearestIndex = this._dragData.childBounds.length;
  var childX;
  for (var i = 0; i < this._dragData.childBounds.length; ++i) {
    childX = this._dragData.childBounds[i].x + currentBound.x - this._dragData.bound.x;
    cDist = Math.abs(centerX - childX);
    if (cDist < nearestDistance) {
      nearestDistance = cDist;
      nearestIndex = i;
    }
  }
  return nearestIndex;
};

/***
 *
 * @type {DraggableHStack|{}}
 */
DraggableHStack.eventHandler = {};
DraggableHStack.eventHandler.predrag = _DraggableVStack["default"].eventHandler.predrag;
DraggableHStack.eventHandler.dragstart = function (event) {
  this.addClass('as-has-dragging');
  this.startTrackPosition();
  var mousePos = new _Vec["default"](event.clientX, event.clientY);
  var elt = this._findDirectChild(event.target);
  var childBounds = Array.prototype.map.call(this.childNodes, function (e) {
    return _Rectangle["default"].fromClientRect(e.getBoundingClientRect());
  });
  var eltIdx = Array.prototype.indexOf.call(this.childNodes, elt);
  var eltBound = childBounds[eltIdx];
  var eltMouseOffset = mousePos.sub(new _Vec["default"](eltBound.x, eltBound.y));
  this._dragData = {
    mouseStartPos: mousePos,
    mousePos: mousePos,
    bound: _Rectangle["default"].fromClientRect(this.getBoundingClientRect()),
    childBounds: childBounds,
    elt: elt,
    eltIdx: eltIdx,
    eltBound: eltBound,
    eltMouseOffset: eltMouseOffset
  };
  this.$cloneContainer.addStyle({
    left: eltBound.x + 'px',
    top: eltBound.y + 'px',
    width: eltBound.width + 'px',
    height: eltBound.height + 'px'
  }).clearChild().addChild($(elt.cloneNode(true))).addTo(document.body);
  elt.addClass('as-dragging');
  this._updateDraggingPosition();
};
DraggableHStack.eventHandler.drag = function (event) {
  event.preventDefault();
  this._dragData.mousePos = new _Vec["default"](event.clientX, event.clientY);
  this._updateDraggingPosition();
};
DraggableHStack.eventHandler.dragend = function (event) {
  var thisS = this;
  this.stopTrackPosition();
  this.removeClass('as-has-dragging');
  this._dragData.elt.removeClass('as-dragging');
  if (this._dragData.destIdx == this._dragData.eltIdx || this._dragData.destIdx == this._dragData.eltIdx + 1) {
    this.$cloneContainer.addClass('as-home-going');
    this._updateDraggingPosition();
    setTimeout(function () {
      thisS.$cloneContainer.selfRemove().removeClass('as-home-going');
    }, 100);
  } else {
    if (this._dragData.destIdx === this._dragData.childBounds.length) {
      this._dragData.elt.remove();
      this.addChild(this._dragData.elt);
      this.emit('change', {
        type: 'change',
        elt: this._dragData.elt,
        sourceIndex: this._dragData.eltIdx,
        destIndex: this._dragData.childBounds.length,
        oldIdx: this._dragData.eltIdx,
        newIdx: this._dragData.childBounds.length - 1,
        desc: "Move element to end of stack."
      }, this);
    } else {
      var beforeElt = this.childNodes[this._dragData.destIdx];
      this._dragData.elt.remove();
      this.addChildBefore(this._dragData.elt, beforeElt);
      this.emit('change', {
        type: 'change',
        elt: this._dragData.elt,
        sourceIndex: this._dragData.eltIdx,
        destIndex: this._dragData.destIdx,
        oldIdx: this._dragData.eltIdx,
        newIdx: this._dragData.destIdx > this._dragData.eltIdx ? this._dragData.destIdx - 1 : this._dragData.destIdx,
        desc: "Move element to before  this.childNodes[" + this._dragData.destIdx + "]"
      }, this);
    }
    this.$cloneContainer.selfRemove().removeClass('as-home-going');
  }
  this.removeClass('as-no-change');
};
DraggableHStack.prototype._findDragzone = _DraggableVStack["default"].prototype._findDragzone;
DraggableHStack.prototype._findDirectChild = _DraggableVStack["default"].prototype._findDirectChild;
DraggableHStack.prototype._updateDraggingPosition = function () {
  var bound = this.getBoundingClientRect();
  var x, y;
  if (this.$cloneContainer.hasClass('as-home-going')) {
    x = this._dragData.eltBound.x - this._dragData.bound.x + bound.left;
    y = this._dragData.eltBound.y - this._dragData.bound.y + bound.top;
  } else {
    y = bound.top + (this._dragData.eltBound.y - this._dragData.bound.y);
    var newPos = this._dragData.mousePos.sub(this._dragData.eltMouseOffset);
    x = newPos.x;
  }
  this.$cloneContainer.addStyle({
    left: x + 'px',
    top: y + 'px'
  });
  var cBound = this._dragData.eltBound.clone();
  cBound.x = x;
  cBound.y = y;
  var destIdx = this._findDropIdx(cBound);
  this._dragData.destIdx = destIdx;
  var destX;
  if (destIdx >= this._dragData.childBounds.length) {
    var lastRect = this._dragData.childBounds[this._dragData.childBounds.length - 1];
    destX = lastRect.x + lastRect.width - this._dragData.bound.x;
  } else {
    destX = this._dragData.childBounds[destIdx].x - this._dragData.bound.x;
  }
  this.addStyle('--dest-x', destX + 'px');
  if (destIdx == this._dragData.eltIdx || destIdx == this._dragData.eltIdx + 1) {
    this.addClass('as-no-change');
  } else {
    this.removeClass('as-no-change');
  }
};
_ACore["default"].install(DraggableHStack);
var _default = DraggableHStack;
exports["default"] = _default;

/***/ }),

/***/ 73816:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
__webpack_require__(21984);
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _utils = __webpack_require__(84512);
var _stringGenerate = __webpack_require__(10713);
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _PositionTracker = _interopRequireDefault(__webpack_require__(97252));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @augments Hanger
 * @augments PositionTracker
 * @constructor
 */
function DraggableVStack() {
  _({
    tag: 'PositionTracker'.toLowerCase(),
    elt: this
  });
  this.$cloneContainer = _('.absol-draggable-stack-clone-container');
  this.on('predrag', this.eventHandler.predrag).on('dragstart', this.eventHandler.dragstart).on('drag', this.eventHandler.drag).on('dragend', this.eventHandler.dragend);
  this._state = 0;
  this.friends = [];
  this.$friends = [];
  this._privateDraggableVStackIdent = (0, _stringGenerate.randomIdent)(35);
  this._dragData = null;
  this.on('positionchange', this.eventHandler.scroll);
}
DraggableVStack.tag = 'DraggableVStack'.toLowerCase();
DraggableVStack.render = function () {
  return _({
    tag: 'hanger',
    extendEvent: ['change', 'orderchange', 'itemleave', 'itementer'],
    "class": ['absol-draggable-stack', 'absol-draggable-vstack']
  });
};
DraggableVStack.prototype._updateFriends = function () {
  var dict = {};
  dict[this._privateDraggableVStackIdent] = this;
  this.$friends = this.friends.reduce(function (ac, cr) {
    if (_Dom["default"].isDomNode(cr)) {
      if (cr._privateDraggableVStackIdent) {
        ac.result.push(cr);
        ac.dict[cr._privateDraggableVStackIdent] = cr;
      }
    } else if (typeof cr === 'string') {
      $(cr, false, function (elt) {
        if (elt._privateDraggableVStackIdent) {
          if (!ac.dict[elt._privateDraggableVStackIdent]) {
            ac.result.push(elt);
            ac.dict[elt._privateDraggableVStackIdent] = elt;
          }
        }
      });
    }
    return ac;
  }, {
    dict: dict,
    result: []
  }).result;
};
DraggableVStack.prototype._findIndex = function (clientY) {
  var childBounds = Array.prototype.map.call(this.childNodes, function (elt) {
    return elt.getBoundingClientRect();
  });
  var childTops = childBounds.map(function (b) {
    return b.top;
  });
  childTops.push((childBounds[childBounds.length - 1] || this.getBoundingClientRect()).bottom);
  var nearestIdx = 0;
  var nearestVal = 10000000;
  var val;
  for (var i = 0; i < childTops.length; ++i) {
    val = Math.abs(clientY - childTops[i]);
    if (val < nearestVal) {
      nearestVal = val;
      nearestIdx = i;
    }
  }
  return nearestIdx;
};

/***
 *
 * @type {DraggableVStack|{}}
 */
DraggableVStack.eventHandler = {};
DraggableVStack.eventHandler.predrag = function (event) {
  var dragzone = this._findDragzone(event.target);
  if (!dragzone) {
    event.cancel();
  }
};
DraggableVStack.eventHandler.dragstart = function (event) {
  this.startTrackPosition();
  event.preventDefault();
  this._updateFriends();
  this._state = 1;
  this.addClass('as-state-drag');
  this._dragData = {
    mouseStartPos: new _Vec["default"](event.clientX, event.clientY),
    elt: this._findDirectChild(event.target),
    rootBound: this.getBoundingClientRect(),
    dest: this
  };
  this._dragData.mouseCurrentPos = this._dragData.mouseStartPos;
  this._updateDestChildrenBound();
  this._dragData.idx = Array.prototype.indexOf.call(this.childNodes, this._dragData.elt);
  this._dragData.eltBound = this._dragData.destChildBounds[this._dragData.idx];
  this._dragData.offsetPos = this._dragData.mouseStartPos.sub(new _Vec["default"](this._dragData.eltBound.left, this._dragData.eltBound.top));
  this._dragData.eltRelative = new _Vec["default"](this._dragData.eltBound.left, this._dragData.eltBound.top).sub(new _Vec["default"](this._dragData.rootBound.left, this._dragData.rootBound.top));
  this.$cloneContainer.addTo(document.body);
  this.$cloneContainer.clearChild().addChild($(this._dragData.elt.cloneNode(true)).addStyle({
    boxSizing: 'border-box',
    width: this._dragData.eltBound.width + 'px',
    height: this._dragData.eltBound.height + 'px'
  }));
  this.$cloneContainer.addStyle({
    left: this._dragData.eltBound.left + 'px',
    top: this._dragData.eltBound.top + 'px'
  });
  this._dragData.elt.addClass('dragging');
};
DraggableVStack.eventHandler.drag = function (event) {
  event.preventDefault();
  this._dragData.mouseCurrentPos = new _Vec["default"](event.clientX, event.clientY);
  this._updateHoverDest();
  this._updateDraggingPosition();
  this.eventHandler.dragOverflow(event);
};
DraggableVStack.prototype.getClientY = function () {
  var top = 1000000;
  var bottom = -10000000;
  var child;
  var childBound;
  for (var i = 0; i < this.childNodes.length; ++i) {
    child = this.childNodes[i];
    if (child === this.$cloneContainer) continue;
    if (child.getBoundingClientRect) {
      childBound = child.getBoundingClientRect();
      top = Math.min(top, childBound.top);
      bottom = Math.max(bottom, childBound.bottom);
    }
  }
  return {
    top: top,
    bottom: bottom
  };
};
DraggableVStack.eventHandler.dragOverflow = function (event) {
  var scroller = this;
  while (scroller) {
    var overflowStyle = window.getComputedStyle(scroller)['overflow'];
    if ((overflowStyle === 'auto' || overflowStyle === 'scroll' || scroller.tagName === 'HTML') && scroller.clientHeight < scroller.scrollHeight) break;
    scroller = scroller.parentElement;
  }
  if (!scroller) return;
  var outBound = scroller.getBoundingClientRect();
  var bBound = this.$cloneContainer.getBoundingClientRect();
  var screenSize = _Dom["default"].getScreenSize();
  if (scroller.tagName !== "HTML") {
    outBound = {
      top: Math.max(outBound.top, 0),
      bottom: Math.min(outBound.bottom, screenSize.height)
    };
  } else {
    outBound = {
      top: 0,
      bottom: screenSize.height
    };
  }
  var vy = 0;
  if (bBound.top < outBound.top) {
    vy = bBound.top - outBound.top;
  } else if (bBound.bottom > outBound.bottom) {
    vy = bBound.bottom - outBound.bottom;
  }
  var dt = 1 / 30;
  if (vy !== 0) {
    var copyEvent = {
      type: event.type,
      preventDefault: function preventDefault() {/* noop */
      },
      target: event.target
    };
    copyEvent.clientX = event.clientX;
    copyEvent.clientY = event.clientY;
    var thisBT = this;
    setTimeout(function () {
      if (scroller.scrollHeight > scroller.clientHeight) {
        scroller.scrollTop += (0, _utils.absCeil)(vy * dt);
      }
      if (thisBT._state === 1) {
        thisBT.eventHandler.dragOverflow(copyEvent);
      }
    }, dt * 1000);
  }
};
DraggableVStack.eventHandler.scroll = function (event) {
  this._updateDraggingPosition();
};
DraggableVStack.eventHandler.dragend = function (event) {
  this.stopTrackPosition();
  event.preventDefault();
  this._dragData.dest.removeClass('as-state-drag');
  this.$cloneContainer.remove();
  this._dragData.elt.removeClass('dragging');
  this.removeClass('as-state-no-change');
  this._state = 0;
  var beforeElt;
  if (this._dragData.dest === this) {
    if (this._dragData.idx === this._dragData.destIdx || this._dragData.idx + 1 === this._dragData.destIdx) {
      //todo
    } else {
      if (this._dragData.destIdx === this.childNodes.length) {
        this._dragData.elt.remove();
        this.addChild(this._dragData.elt);
        this.emit('change', {
          type: 'change',
          fromStack: this,
          toStack: this,
          elt: this._dragData.elt,
          sourceIndex: this._dragData.idx,
          destIndex: this.childNodes.length,
          oldIdx: this._dragData.idx,
          newIdx: this.childNodes.length - 1,
          desc: "Move element to end of stack."
        }, this);
        this.emit('orderchange', {
          type: 'orderchange',
          fromStack: this,
          toStack: this,
          elt: this._dragData.elt,
          oldIdx: this._dragData.idx,
          newIdx: this.childNodes.length - 1,
          desc: "Move element to end of stack."
        }, this);
      } else {
        beforeElt = this.childNodes[this._dragData.destIdx];
        this._dragData.elt.remove();
        this.addChildBefore(this._dragData.elt, beforeElt);
        this.emit('change', {
          type: 'change',
          fromStack: this,
          toStack: this,
          elt: this._dragData.elt,
          sourceIndex: this._dragData.idx,
          destIndex: this._dragData.destIdx,
          oldIdx: this._dragData.idx,
          newIdx: this._dragData.destIdx > this._dragData.idx ? this._dragData.destIdx - 1 : this._dragData.destIdx,
          desc: "Move element to before  this.childNodes[" + this._dragData.destIdx + "]"
        }, this);
        this.emit('orderchange', {
          type: 'orderchange',
          fromStack: this,
          toStack: this,
          elt: this._dragData.elt,
          oldIdx: this._dragData.idx,
          newIdx: this._dragData.destIdx > this._dragData.idx ? this._dragData.destIdx - 1 : this._dragData.destIdx,
          desc: "Move element to before  this.childNodes[" + this._dragData.destIdx + "]"
        }, this);
      }
    }
  } else {
    if (this._dragData.destIdx === this._dragData.dest.childNodes.length) {
      this.emit('orderchange', {
        type: 'itemleave',
        fromStack: this,
        toStack: this._dragData.dest,
        oldIdx: this._dragData.idx,
        newIdx: this.childNodes.length - 1,
        desc: "Move element to end of friend stack."
      }, this);
      this._dragData.elt.remove();
      this._dragData.dest.addChild(this._dragData.elt);
      this._dragData.dest.emit('orderchange', {
        type: 'itementer',
        fromStack: this,
        toStack: this._dragData.dest,
        oldIdx: this._dragData.idx,
        newIdx: this.childNodes.length - 1,
        desc: "Move element to end of friend stack."
      }, this._dragData.dest);
      this.emit('change', {
        type: 'change',
        fromStack: this,
        toStack: this._dragData.dest,
        elt: this._dragData.elt,
        sourceIndex: this._dragData.idx,
        destIndex: this.childNodes.length,
        oldIdx: this._dragData.idx,
        newIdx: this.childNodes.length - 1,
        desc: "Move element to end of friend stack."
      });
    } else {
      beforeElt = this._dragData.dest.childNodes[this._dragData.destIdx];
      this._dragData.elt.remove();
      this.emit('itemleave', {
        type: 'itemleave',
        fromStack: this,
        toStack: this._dragData.dest,
        elt: this._dragData.elt,
        oldIdx: this._dragData.idx,
        newIdx: this._dragData.destIdx,
        desc: "Move element to before friend.childNodes[" + this._dragData.destIdx + "]"
      }, this);
      this._dragData.dest.addChildBefore(this._dragData.elt, beforeElt);
      this._dragData.dest.emit('itementer', {
        type: 'itementer',
        fromStack: this,
        toStack: this._dragData.dest,
        elt: this._dragData.elt,
        oldIdx: this._dragData.idx,
        newIdx: this._dragData.destIdx,
        desc: "Move element to before friend.childNodes[" + this._dragData.destIdx + "]"
      }, this._dragData.dest);
      this.emit('change', {
        type: 'change',
        fromStack: this,
        toStack: this._dragData.dest,
        elt: this._dragData.elt,
        sourceIndex: this._dragData.idx,
        destIndex: this._dragData.destIdx,
        oldIdx: this._dragData.idx,
        newIdx: this._dragData.destIdx,
        desc: "Move element to before friend.childNodes[" + this._dragData.destIdx + "]"
      }, this);
    }
  }
};
DraggableVStack.prototype._updateDestChildrenBound = function () {
  var top0 = this._dragData.dest.getBoundingClientRect().top;
  this._dragData.destChildBounds = Array.prototype.map.call(this._dragData.dest.childNodes, function (elt) {
    return elt.getBoundingClientRect();
  });
  this._dragData.destChildTops = this._dragData.destChildBounds.map(function (bound) {
    return bound.top - top0;
  }).concat([(this._dragData.destChildBounds[this._dragData.destChildBounds.length - 1] || this.getBoundingClientRect()).bottom - top0]);
};
DraggableVStack.prototype._updateHoverDest = function () {
  var bound;
  var newDest;
  var friendElt;
  var friendList = this.$friends.concat([this]);
  var top0;
  for (var i = 0; i < friendList.length; ++i) {
    friendElt = friendList[i];
    bound = _Rectangle["default"].fromClientRect(friendElt.getBoundingClientRect());
    if (bound.containsPoint(this._dragData.mouseCurrentPos)) {
      top0 = bound.y;
      newDest = friendElt;
      break;
    }
  }
  if (newDest && this._dragData.dest !== newDest) {
    this._dragData.dest.removeClass('as-state-drag');
    this._dragData.dest = newDest;
    this._dragData.dest.addClass('as-state-drag');
    this._dragData.dest.addStyle('--dest-y', 'unset');
    this._updateDestChildrenBound();
  }
};
DraggableVStack.prototype._updateDraggingPosition = function () {
  var bound = this.getBoundingClientRect();
  var clonePos = this._dragData.mouseCurrentPos.sub(this._dragData.offsetPos);
  this.$cloneContainer.addStyle({
    top: clonePos.y + 'px',
    left: bound.left + 'px'
  });
  this._dragData.destIdx = this._dragData.dest._findIndex(clonePos.y + this._dragData.eltBound.height / 2);
  this._dragData.dest.addStyle('--dest-y', this._dragData.destChildTops[this._dragData.destIdx] + 'px');
  if (this._dragData.dest === this) {
    if (this._dragData.idx === this._dragData.destIdx || this._dragData.idx + 1 === this._dragData.destIdx) {
      this.addClass('as-state-no-change');
    } else {
      this.removeClass('as-state-no-change');
    }
  }
};
DraggableVStack.prototype._autoScrollParentIfNeed = function (delta) {
  //todo: choose which element should be scroll
  if (!(delta > 0)) delta = 10000;
  var bound = this.getBoundingClientRect();
  var cloneBound = this.$cloneContainer.getBoundingClientRect();
  var outBound = _Dom["default"].traceOutBoundingClientRect(this.$cloneContainer);
  if (outBound.bottom >= cloneBound.bottom && outBound.top <= cloneBound.top) return;
  var scrollables = [];
  var current = this;
  while (current) {
    var oy = window.getComputedStyle(current);
    oy = oy['overflow-y'] || oy['overflowY'];
    if (oy == 'auto' || oy == 'scroll') {
      scrollables.push(current);
    }
    current = current.parentElement;
  }
  scrollables.push(document.body.parentElement);
};
DraggableVStack.prototype._findDragzone = function (elt) {
  var result = null;
  while (elt && elt != this) {
    if (elt.classList && elt.classList.contains('drag-zone')) {
      result = elt;
      break;
    }
    elt = elt.parentNode;
  }
  if (result) {
    elt = result;
    while (elt && elt != this) {
      if (elt.classList && elt.classList.contains('absol-draggable-stack')) {
        result = null;
        break;
      }
      elt = elt.parentNode;
    }
  }
  return result;
};
DraggableVStack.prototype._findDirectChild = function (elt) {
  while (elt && elt != this) {
    if (elt.parentNode == this) return elt;
    elt = elt.parentNode;
  }
  return undefined;
};
DraggableVStack.property = {};
DraggableVStack.property.friends = {
  set: function set(value) {
    if (!(value instanceof Array)) value = [value];
    this._friends = value;
  },
  get: function get() {
    return this._friends;
  }
};
_ACore["default"].install(DraggableVStack);
var _default = DraggableVStack;
exports["default"] = _default;

/***/ }),

/***/ 70615:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(1784);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _ExpTree = __webpack_require__(87326);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/**
 * @extends AElement
 * @constructor
 */
function DropPanel() {
  var thisDP = this;
  /***
   *
   * @type {ExpGroup}
   */
  this.$body = $('.absol-drop-panel-body', this);
  this.$head = $('.absol-drop-panel-head', this).on('click', thisDP.eventHandler.clickHead);
  this.$name = $('.absol-drop-panel-name', thisDP);
  _OOP["default"].drillProperty(this, this.$name, 'name', 'innerHTML');
  return thisDP;
}
DropPanel.tag = 'DropPanel'.toLowerCase();
DropPanel.render = function () {
  return _({
    "class": 'absol-drop-panel',
    extendEvent: ['toggle'],
    child: [{
      "class": 'absol-drop-panel-head',
      child: ['toggler-ico', {
        tag: 'span',
        "class": "absol-drop-panel-name"
      }]
    }, {
      tag: 'expgroup',
      "class": ['absol-drop-panel-body', 'absol-bscroller']
    }]
  });
};
DropPanel.eventHandler = {};
DropPanel.eventHandler.clickHead = function (event) {
  if (!this._childOfButton(event.target)) {
    var event = {
      target: this,
      isShowed: this.show,
      preventDefault: function preventDefault() {
        this.prevented = true;
      }
    };
    this.emit('toggle', event, this);
    if (!event.prevented) {
      this.toggle();
    }
  }
};
['findChildBefore', 'findChildAfter', 'removeChild', 'clearChild', 'addChild'].forEach(function (key) {
  DropPanel.prototype[key] = function () {
    this.$body[key].apply(this.$body, arguments);
  };
});
DropPanel.prototype._childOfButton = function (elt) {
  while (elt && elt != this) {
    if (elt.tagName == "BUTTON") {
      return true;
    }
    elt = elt.parentElement;
  }
  return false;
};
DropPanel.prototype.toggle = function () {
  this.show = !this.show;
};
DropPanel.property = {};
DropPanel.property.show = {
  set: function set(value) {
    if (value) {
      var maxHeight = parseFloat(this.getComputedStyleValue('max-height').replace('px', ''));
      var headBound = this.$head.getBoundingClientRect();
      if (maxHeight != 'none' && maxHeight != 'auto') {
        this.$body.addStyle('max-height', maxHeight - headBound.height + 'px');
      }
      this.$body.addStyle('height', this.$body.scrollHeight + 'px');
      setTimeout(function () {
        this.$body.removeStyle('height');
        window.dispatchEvent(new Event('resize'));
      }.bind(this), 200);
      this.addClass('show');
    } else {
      this.$body.addStyle('height', this.$body.scrollHeight + 'px');
      setTimeout(function () {
        this.$body.addStyle('height', '0');
      }.bind(this), 0);
      setTimeout(function () {
        this.$body.removeStyle('height');
        window.dispatchEvent(new Event('resize'));
      }.bind(this), 200);
      this.removeClass('show');
    }
  },
  get: function get() {
    return this.hasClass('show');
  }
};
_ACore["default"].install(DropPanel);
var _default = DropPanel;
exports["default"] = _default;

/***/ }),

/***/ 85628:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(1784);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/**
 * @extends AElement
 * @constructor
 */
function DropPanelStack() {
  var res = this;
  this.$attachHook = _('attachhook').on('error', function () {
    _Dom["default"].addToResizeSystem(this);
    this.updateSize = res.updateSize.bind(res);
  });
  this.sync = new Promise(function (rs) {
    res.$attachHook.once('error', rs);
  });
}
DropPanelStack.tag = 'DropPanelStack'.toLowerCase();
DropPanelStack.render = function () {
  return _({
    "class": 'absol-drop-panel-stack',
    child: ['attachhook']
  });
};
DropPanelStack.prototype.updateSize = function () {};
DropPanelStack.prototype.getFreeHeight = function () {
  var childNodes = this.childNodes;
  var sumHeight = 0;
  var bound = this.getBoundingClientRect();
  var childBound;
  for (var i = 0; i < childNodes.length; ++i) {
    var child = childNodes[i];
    if (child.hasClass && child.hasClass('absol-drop-panel')) {
      childBound = child.getBoundingClientRect();
      sumHeight += childBound.height;
    }
  }
  return bound.height - sumHeight;
};
DropPanelStack.prototype.addChild = function (child) {
  var self = this;
  if (child.hasClass('absol-drop-panel')) {
    //remove last event listener off other parent
    if (child.__drop_panel_toggle_listener__) {
      child.off('toggle', child.__drop_panel_toggle_listener__);
    }
    child.__drop_panel_toggle_listener__ = function (event) {
      event.preventDefault();
      self.sync = self.sync.then(function () {
        if (event.isShowed) {
          setTimeout(function () {
            child.removeStyle('max-height');
          }, 200);
          child.toggle();
        } else {
          var headBound = child.$head.getBoundingClientRect();
          var vailableHeight = self.getFreeHeight();
          if (vailableHeight > 3) {
            child.addStyle('max-height', self.getFreeHeight() + headBound.height + 'px');
            child.toggle();
          }
        }
        return new Promise(function (rs) {
          setTimeout(rs, 200);
        });
      });
    };
    child.on('toggle', child.__drop_panel_toggle_listener__);
    this["super"](child);
  } else {
    throw new Error('Child element must be a DropPanel');
  }
};
_ACore["default"].install('droppanelstack', DropPanelStack);
var _default = DropPanelStack;
exports["default"] = _default;

/***/ }),

/***/ 31790:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(76727);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function DropZone() {
  this.defineEvent(['fileenter', 'fileleave', 'filedrop']);
  this.addClass('as-drop-zone');
  this.on('dragover', this.eventHandler.dragZoneFileOver).on('drop', this.eventHandler.dropZoneFileDrop);
  this._fileOverTimeout = -1;
}
DropZone.tag = 'dropzone';
DropZone.render = function () {
  return _('div');
};
DropZone.eventHandler = {};
DropZone.eventHandler.dragZoneFileOver = function (event) {
  event.preventDefault();
  if (this._fileOverTimeout > 0) {
    clearTimeout(this._fileOverTimeout);
  } else {
    this.addClass('as-drag-over');
    this.emit('fileenter', event, this);
  }
  this._fileOverTimeout = setTimeout(this.eventHandler.dragZoneFileOverEnd, 200);
};

/***
 *
 * @param {DragEvent} event
 */
DropZone.eventHandler.dropZoneFileDrop = function (event) {
  if (this._fileOverTimeout > 0) {
    clearTimeout(this._fileOverTimeout);
    this._fileOverTimeout = -1;
  }
  event.preventDefault();
  this.removeClass('as-drag-over');
  event._files = null;
  if (!event.hasOwnProperty('files')) Object.defineProperty(event, 'files', {
    get: function get() {
      if (this._files) return this._files;
      var files = [];
      var file;
      if (event.dataTransfer.items) {
        for (var i = 0; i < event.dataTransfer.items.length; i++) {
          if (event.dataTransfer.items[i].kind === 'file') {
            file = event.dataTransfer.items[i].getAsFile();
            files.push(file);
          }
        }
      } else {
        // Use DataTransfer interface to access the file(s)
        for (var i = 0; i < event.dataTransfer.files.length; i++) {
          files.push(event.dataTransfer.files[i]);
        }
      }
      this._files = files;
      return this._files;
    }
  });
  this.emit('filedrop', event, this);
};
DropZone.eventHandler.dragZoneFileOverEnd = function () {
  this._fileOverTimeout = -1;
  this.removeClass('as-drag-over');
  this.emit('fileleave', {
    type: 'fileleave'
  }, this);
};
_ACore["default"].install(DropZone);
var _default = DropZone;
exports["default"] = _default;

/***/ }),

/***/ 51098:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
__webpack_require__(14912);
var _search = _interopRequireWildcard(__webpack_require__(67858));
var _utils = __webpack_require__(84512);
var _SelectListBox = _interopRequireDefault(__webpack_require__(47818));
var _DelaySignal = _interopRequireDefault(__webpack_require__(81809));
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends Follower
 * @constructor
 */
function DualSelectBox() {
  this.domSignal = new _DelaySignal["default"]();
  this.domSignal.on('scrollIntoSelected', this.scrollIntoSelected.bind(this));
  this._items = [];
  this._value = [null, null];
  this.holderByValue = {};
  this.$lists = (0, _ACore.$$)('.as-dual-select-box-list', this);
  this.$searcTextInput = (0, _ACore.$)('searchtextinput', this).on('stoptyping', this.eventHandler.searchTextInputModify);
  this.$closeBtn = (0, _ACore.$)('.as-select-list-box-close-btn', this).on('click', this.eventHandler.clickCloseBtn);
  this.cView = new DualSelectView(this, this._items);
  this.searchedView = {
    '*': this.cView
  };
  this.estimateSize = {
    width: 0,
    height: 0
  };
  this._emittedValue = [null, null];

  /***
   * @name strictValue
   * @type {boolean}
   * @memberOf DualSelectBox#
   */
  /***
   * @name enableSearch
   * @type {boolean}
   * @memberOf DualSelectBox#
   */

  /***
   * @name value
   * @type {Array}
   * @memberOf DualSelectBox#
   */

  /***
   * @name items
   * @type {Array}
   * @memberOf DualSelectBox#
   */
}

DualSelectBox.tag = 'DualSelectBox'.toLowerCase();
DualSelectBox.render = function () {
  return (0, _ACore._)({
    tag: _Follower["default"].tag,
    "class": 'as-dual-select-box',
    extendEvent: ['change', 'close'],
    child: [{
      "class": 'as-dual-select-box-search-ctn',
      child: {
        tag: 'searchtextinput'
      }
    }, {
      "class": 'as-dual-select-box-list-ctn',
      child: [{
        "class": ['as-dual-select-box-list', 'absol-selectlist', 'as-bscroller']
      }, {
        "class": 'as-dual-select-box-arrow-ctn',
        child: 'span.mdi.mdi-menu-right'
      }, {
        "class": ['as-dual-select-box-list', 'absol-selectlist', 'as-bscroller']
      }]
    }, {
      "class": 'as-dropdown-box-footer',
      child: [{
        "class": 'as-dropdown-box-footer-right',
        child: [{
          tag: 'a',
          "class": 'as-select-list-box-close-btn',
          child: {
            text: _LanguageSystem["default"].getText('txt_close')
          }
        }]
      }]
    }]
  });
};
DualSelectBox.prototype._implicit = function (value) {
  if (value instanceof Array) {
    if (value.length > 2) value = value.slice(0, 2);else {
      value.push.apply(value, Array(2 - value.length).fill(null));
    }
  } else {
    value = [null, null];
  }
  return value;
};
DualSelectBox.prototype._explicit = function (value) {
  value = value.slice();
  var strictValue = this.strictValue;
  if (!this.holderByValue[value[0]]) {
    if (this._items.length > 0 && strictValue) {
      value[0] = this._items[0].value;
    } else {
      return null;
    }
  }
  if (!this.holderByValue[value[0]].child[value[1]]) {
    if (strictValue && this.holderByValue[value[0]].item.items && this.holderByValue[value[0]].item.items.length > 0) {
      value[1] = this.holderByValue[value[0]].item.items[0].value;
    } else {
      return null;
    }
  }
  if (value[0] === null || value[1] === null) {
    return null;
  }
  return value;
};
DualSelectBox.prototype._notifyIfChange = function (event) {
  var value = this._explicit(this._value);
  if (value === this._emittedValue) return;
  if (!value !== !this._emittedValue || value[0] !== this._emittedValue[0] || value[1] !== this._emittedValue[1]) {
    this.emit('change', {
      type: 'change',
      target: this,
      originalEvent: event
    }, this);
  }
};
DualSelectBox.prototype._makeLeftItem = function (item) {
  var itemElt = (0, _ACore._)({
    "class": 'absol-selectlist-item',
    child: {
      tag: 'span',
      "class": 'absol-selectlist-item-text',
      child: {
        text: item.text
      }
    }
  });
  itemElt.itemData = item;
  itemElt.on('click', this.eventHandler.clickLeftItem.bind(this, itemElt));
  return itemElt;
};
DualSelectBox.prototype.makeRightItem = function (item) {
  var itemElt = (0, _ACore._)({
    "class": 'absol-selectlist-item',
    child: {
      tag: 'span',
      "class": 'absol-selectlist-item-text',
      child: {
        text: item.text
      }
    }
  });
  itemElt.itemData = item;
  itemElt.on('click', this.eventHandler.clickRightItem.bind(this, itemElt));
  return itemElt;
};
DualSelectBox.prototype._calcEstimateSize = function (items) {
  var fontSize = (0, _ACore.$)(document.body).getFontSize();
  var longestItem = null;
  var longestE14 = 0;
  var e14, i, j;
  var item, subItem;
  for (i = 0; i < items.length; ++i) {
    item = items[i];
    e14 = (0, _utils.estimateWidth14)(item.text);
    if (e14 > longestE14) {
      longestItem = item;
      longestE14 = e14;
    }
  }
  var leftTextWidth = longestItem ? (0, _utils.measureText)(longestItem.text, '14px arial').width : 0;
  var maxN = items.length;
  for (i = 0; i < items.length; ++i) {
    item = items[i];
    if (!item.items || item.items.length === 0) continue;
    maxN = Math.max(maxN, item.items.length);
    for (j = 0; j < item.items.length; ++j) {
      subItem = item.items[j];
      e14 = (0, _utils.estimateWidth14)(subItem.text);
      if (e14 > longestE14) {
        longestItem = subItem;
        longestE14 = e14;
      }
    }
  }
  var rightTextWidth = longestItem ? (0, _utils.measureText)(longestItem.text, '14px arial').width : 0;
  return {
    width: (7 + leftTextWidth + 7 + 5 + 7 + 1 + 17 + 1 + 7 + rightTextWidth + 7 + 5 + 7 + 20) * fontSize / 14,
    height: maxN * 20 * fontSize / 14,
    textWidth: (leftTextWidth + rightTextWidth + 12) * fontSize / 14
  };
};
DualSelectBox.prototype.scrollIntoSelected = function () {
  if (!this.isDescendantOf(document.body)) {
    this.domSignal.emit('scrollIntoSelected');
    return;
  }
  if (this.cView && this.cView.$leftSelectedItem && this.cView.$leftSelectedItem.isDescendantOf(this.$lists[0])) {
    this.cView.$leftSelectedItem.scrollIntoView();
  }
  if (this.cView && this.cView.$rightSelectedItem && this.cView.$rightSelectedItem.isDescendantOf(this.$lists[1])) {
    this.cView.$rightSelectedItem.scrollIntoView();
  }
};
DualSelectBox.prototype.focus = _SelectListBox["default"].prototype.focus;
DualSelectBox.property = {};
DualSelectBox.property.items = {
  /***
   * @this DualSelectBox
   * @param items
   */
  set: function set(items) {
    var self = this;
    items = items || [];
    (0, _search.prepareSearchForList)(items);
    this._items = items;
    this.holderByValue = items.reduce(function (ac, cr) {
      ac[cr.value] = {
        item: cr,
        child: (cr.items || []).reduce(function (ac1, cr1) {
          ac1[cr1.value] = {
            item: cr1
          };
          return ac1;
        }, {})
      };
      return ac;
    }, {});
    this.estimateSize = this._calcEstimateSize(items);
    this.addStyle('--dual-list-estimate-width', this.estimateSize.width + 'px');
    this.searchedView = {};
    this.cView = new DualSelectView(this, items);
    this.searchedView['*'] = this.cView;
    this.cView.toView();
  },
  get: function get() {
    return this._items;
  }
};
DualSelectBox.property.enableSearch = {
  set: function set(value) {
    if (value) {
      this.addClass('as-enable-search');
    } else {
      this.removeClass('as-enable-search');
    }
  },
  get: function get() {
    return this.hasClass('as-enable-search');
  }
};
DualSelectBox.property.strictValue = {
  set: function set(value) {
    if (value) {
      this.addClass('as-strict-value');
    } else {
      this.removeClass('as-strict-value');
    }
    if (this.cView) this.cView.updateViewByValue();
  },
  get: function get() {
    return this.hasClass('as-strict-value');
  }
};
DualSelectBox.property.value = {
  /***
   * @this DualSelectBox
   * @param value
   */
  set: function set(value) {
    this._value = this._implicit(value);
    if (this.cView) {
      this.cView.updateViewByValue();
      this.cView.toRightList();
    }
    this.scrollIntoSelected();
  },
  get: function get() {
    return this._explicit(this._value);
  }
};

/***
 * @memberOf DualSelectBox#
 * @type {{}}
 */
DualSelectBox.eventHandler = {};

/***
 * @this DualSelectBox
 * @param itemElt
 * @param event
 */
DualSelectBox.eventHandler.clickLeftItem = function (itemElt, event) {
  var item = itemElt.itemData;
  this._value[0] = item.value;
  this.cView.updateLeftSelectedItem();
  this.cView.updateRightList();
  this.cView.toRightList();
  if (this.cView.$leftItemByValue[item.value] && this.cView.$leftItemByValue[item.value].itemData && this.cView.$leftItemByValue[item.value].itemData.items && this.cView.$leftItemByValue[item.value].itemData.items.length > 0) {
    this._value[1] = this.cView.$leftItemByValue[item.value].itemData.items[0].value;
    this.cView.updateRightSelectedItem();
  }
  if (this.cView.$rightSelectedItem) {
    this.cView.$rightSelectedItem.scrollIntoView();
  }
  this._notifyIfChange(event);
};

/***
 * @this DualSelectBox
 * @param itemElt
 * @param event
 */
DualSelectBox.eventHandler.clickRightItem = function (itemElt, event) {
  var item = itemElt.itemData;
  this._value[1] = item.value;
  this.cView.updateRightSelectedItem();
  this._notifyIfChange(event);
};
DualSelectBox.prototype.searchItemByText = function (text) {
  var items = this._items;
  var queryItem = (0, _search["default"])({
    text: text
  });
  var maxScore = 0;
  var holders = items.map(function (item) {
    var h = {
      item: item,
      itemScore: (0, _search.calcItemMatchScore)(queryItem, item)
    };
    maxScore = Math.max(maxScore, h.itemScore);
    var childMaxScore = 0;
    if (item.items && item.items.length > 0) {
      h.child = item.items.map(function (cItem) {
        var cItemScore = (0, _search.calcItemMatchScore)(queryItem, cItem);
        maxScore = Math.max(maxScore, cItemScore);
        childMaxScore = Math.max(childMaxScore, cItemScore);
        return {
          item: cItem,
          itemScore: cItemScore
        };
      });
      h.childScore = childMaxScore;
    }
    return h;
  });
  holders.sort(function (a, b) {
    return -Math.max(a.itemScore, a.childScore) + Math.max(b.itemScore, b.childScore);
  });
  var midScore = maxScore / 2;
  holders = holders.filter(function (holder) {
    return Math.max(holder.itemScore, holder.childScore) >= midScore;
  });
  return holders.map(function (holder) {
    var oldItem = holder.item;
    var item = {
      text: oldItem.text,
      value: oldItem.value
    };
    var childHolders;
    if (holder.child) {
      childHolders = holder.child.slice();
      childHolders.sort(function (a, b) {
        return -a.itemScore + b.itemScore;
      });
      item.items = childHolders.map(function (cHolder) {
        return cHolder.item;
      });
      item.isSearchItem = true;
    }
    return item;
  });
};
DualSelectBox.prototype.focus = function () {
  if (this.enableSearch) {
    this.$searcTextInput.focus();
  }
};
DualSelectBox.prototype.resetSearchState = function () {
  if (this.$searcTextInput.value.length === 0) return;
  this.$searcTextInput.value = '';
  this.eventHandler.searchTextInputModify();
};

/***
 * @this DualSelectBox
 */
DualSelectBox.eventHandler.searchTextInputModify = function () {
  var query = this.$searcTextInput.value.trim().replace(/\s+/, ' ');
  if (query.length === 0) query = '*';
  var view = this.searchedView[query];
  if (!view) {
    view = new DualSelectView(this, this.searchItemByText(query));
    this.searchedView[query] = view;
  }
  this.cView = view;
  this.cView.updateLeftSelectedItem();
  this.cView.updateRightSelectedItem();
  view.toView();
  this.$lists[0].scrollTop = 0;
  this.$lists[1].scrollTop = 0;
  if (query === '*') this.scrollIntoSelected();
};
DualSelectBox.eventHandler.clickCloseBtn = function (event) {
  this.emit('close', {
    type: 'close',
    target: this,
    originalEvent: event
  }, this);
};
_ACore["default"].install(DualSelectBox);
var _default = DualSelectBox;
/***
 *
 * @param {DualSelectBox} box
 * @param items
 * @constructor
 */
exports["default"] = _default;
function DualSelectView(box, items) {
  var self = this;
  this.box = box;
  this.items = items;
  this.$leftItems = items.map(function (item) {
    return self.box._makeLeftItem(item);
  });
  this.$leftItemByValue = this.$leftItems.reduce(function (ac, cr) {
    ac[cr.itemData.value] = cr;
    return ac;
  }, {});
  this.$rightItems = [];
  this.$rightItemByValue = {};
  this.$leftSelectedItem = null;
  this.$rightSelectedItem = null;
  this.updateViewByValue();
}
DualSelectView.prototype.toView = function () {
  this.box.$lists[0].clearChild();
  this.box.$lists[0].addChild(this.$leftItems);
  this.updateLeftSelectedItem();
  this.toRightList();
};
DualSelectView.prototype.toRightList = function () {
  this.box.$lists[1].clearChild();
  this.box.$lists[1].addChild(this.$rightItems);
  this.updateLeftSelectedItem();
};
DualSelectView.prototype.updateViewByValue = function () {
  this.updateLeftSelectedItem();
  this.updateRightList();
};
DualSelectView.prototype.updateRightList = function () {
  var self = this;
  var leftValue = this.box._value[0];
  var items = this.$leftItemByValue[leftValue] && this.$leftItemByValue[leftValue].itemData.items;
  if (items && items.length > 0) {
    this.$rightItems = items.map(function (item) {
      return self.box.makeRightItem(item);
    });
  } else {
    this.$rightItems = [];
  }
  this.$rightItemByValue = this.$rightItems.reduce(function (ac, cr) {
    ac[cr.itemData.value] = cr;
    return ac;
  }, {});
  this.updateRightSelectedItem();
};
DualSelectView.prototype.updateLeftSelectedItem = function () {
  if (this.$leftSelectedItem) {
    this.$leftSelectedItem.removeClass('as-selected');
  }
  this.$leftSelectedItem = this.$leftItemByValue[this.box._value[0]] || null;
  if (this.$leftSelectedItem) {
    this.$leftSelectedItem.addClass('as-selected');
  }
};
DualSelectView.prototype.updateRightSelectedItem = function () {
  if (this.$rightSelectedItem) {
    this.$rightSelectedItem.removeClass('as-selected');
  }
  this.$rightSelectedItem = this.$rightItemByValue[this.box._value[1]] || null;
  if (this.$rightSelectedItem) {
    this.$rightSelectedItem.addClass('as-selected');
  }
};

/***/ }),

/***/ 34219:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _DualSelectBox = _interopRequireDefault(__webpack_require__(51098));
var _Dom = __webpack_require__(64821);
var _EventEmitter = __webpack_require__(46833);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function DualSelectMenu() {
  this._format = '$0, $1';
  /***
   * @type {DualSelectBox}
   */
  this.$box = (0, _ACore._)({
    tag: _DualSelectBox["default"].tag,
    props: {
      anchor: [1, 6, 2, 5]
    },
    on: {
      preupdateposition: this.eventHandler.preUpdatePosition,
      change: this.eventHandler.boxChange,
      close: this.eventHandler.boxClose
    }
  });
  this.$box.cancelWaiting();
  this.$item = (0, _ACore.$)('.absol-selectlist-item', this);
  this.on('click', this.eventHandler.click);
  _OOP["default"].drillProperty(this, this.$box, 'enableSearch');
  /***
   * @name strictValue
   * @type {boolean}
   * @memberOf DualSelectMenu#
   */

  /***
   * @name readOnly
   * @type {boolean}
   * @memberOf DualSelectMenu#
   */
  /***
   * @name disabled
   * @type {boolean}
   * @memberOf DualSelectMenu#
   */
}

DualSelectMenu.tag = 'DualSelectMenu'.toLowerCase();
DualSelectMenu.render = function () {
  return (0, _ACore._)({
    "class": ['absol-selectmenu', 'as-dual-select-menu'],
    extendEvent: ['change'],
    attr: {
      tabindex: '1'
    },
    child: [{
      "class": 'absol-selectmenu-holder-item',
      child: '.absol-selectlist-item'
    }, {
      tag: 'button',
      "class": 'absol-selectmenu-btn',
      child: ['dropdown-ico']
    }, 'attachhook']
  });
};
DualSelectMenu.prototype._updateViewValue = function () {
  var format = this._format;
  var value = this.$box.value || [null, null];
  var strictValue = this.strictValue;
  var hbv = this.$box.holderByValue;
  var firstToken = '__';
  var secToken = '__';
  var firstHolder = hbv[value[0]];
  var sectHolder;
  if (firstHolder) {
    firstToken = firstHolder.item.text;
    sectHolder = firstHolder.child[value[1]];
    if (sectHolder) secToken = sectHolder.item.text;
  }
  var text = format.replace('$0', firstToken).replace('$1', secToken);
  this.$item.clearChild().addChild((0, _ACore._)({
    tag: 'span',
    "class": ['as-selectlist-item-text', 'absol-selectlist-item-text'],
    child: {
      text: text
    }
  }));
};
DualSelectMenu.property = {};
DualSelectMenu.property.selectedItems = {
  get: function get() {
    var value = this.$box.value || [null, null];
    var hbv = this.$box.holderByValue;
    var firstHolder = hbv[value[0]];
    var sectHolder;
    var res = [null, null];
    if (firstHolder) {
      res[0] = firstHolder.item;
      sectHolder = firstHolder.child[value[1]];
      if (sectHolder) res[1] = sectHolder.item;
    }
    return res;
  }
};
DualSelectMenu.property.isFocus = {
  /***
   * @this DualSelectMenu
   * @param value
   */
  set: function set(value) {
    var self = this;
    value = !!value;
    if (value && (this.disabled || this.readOnly)) return;
    if (this.hasClass('as-focus') === value) return;
    if (value) {
      this._prevValue = (this.$box.value || [null, null]).join('//');
      this.addClass('as-focus');
      this.off('click', this.eventHandler.click);
      this.$box.followTarget = this;
      this.$box.sponsorElement = this;
      this.$box.addTo(document.body);
      this.$box.updatePosition();
      this.$box.scrollIntoSelected();
      setTimeout(function () {
        self.$box.focus();
        document.addEventListener('click', self.eventHandler.clickOut);
      }, 10);
    } else {
      this.removeClass('as-focus');
      this.$box.selfRemove();
      this.$box.resetSearchState();
      document.removeEventListener('click', self.eventHandler.clickOut);
      setTimeout(function () {
        self.on('click', self.eventHandler.click);
      }, 10);
      if ((this.$box.value || [null, null]).join('//') !== this._prevValue) {
        this._updateViewValue();
        this.emit('change', {
          type: 'change',
          target: this
        }, this);
      }
    }
  },
  get: function get() {
    return this.hasClass('as-focus');
  }
};

/****
 * @memberOf DualSelectMenu#
 * @type {{}}
 */
DualSelectMenu.eventHandler = {};
DualSelectMenu.property.items = {
  /***
   * @this DualSelectMenu
   * @param items
   */
  set: function set(items) {
    this.$box.items = items;
    this.addStyle('--dual-list-estimate-text-width', this.$box.estimateSize.textWidth + 'px');
    this._updateViewValue();
  },
  get: function get() {
    return this.$box.items;
  }
};
DualSelectMenu.property.value = {
  set: function set(value) {
    this.$box.value = value;
    this._updateViewValue();
  },
  get: function get() {
    return this.$box.value;
  }
};
DualSelectMenu.property.strictValue = {
  set: function set(value) {
    this.$box.strictValue = value;
    this._updateViewValue();
  },
  get: function get() {
    return this.$box.strictValue;
  }
};
DualSelectMenu.property.format = {
  set: function set(value) {
    this._format = value || '$0, $1';
    this._updateViewValue();
  },
  get: function get() {
    return this._format;
  }
};
DualSelectMenu.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
DualSelectMenu.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};

/**
 * @this DualSelectMenu
 */
DualSelectMenu.eventHandler.click = function () {
  if (this.readOnly) return;
  this.isFocus = true;
};

/**
 * @this DualSelectMenu
 */
DualSelectMenu.eventHandler.clickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$box, event)) return;
  this.isFocus = false;
};

/***
 * @this DualSelectMenu
 */
DualSelectMenu.eventHandler.preUpdatePosition = function () {
  var bound = this.getBoundingClientRect();
  var screenSize = (0, _Dom.getScreenSize)();
  var availableTop = bound.top - 5;
  var availableBot = screenSize.height - 5 - bound.bottom;
  this.$box.addStyle('--max-height', Math.max(availableBot, availableTop) + 'px');
  var outBound = (0, _Dom.traceOutBoundingClientRect)(this);
  if (bound.bottom < outBound.top || bound.top > outBound.bottom || bound.right < outBound.left || bound.left > outBound.right) {
    this.isFocus = false;
  }
};
DualSelectMenu.eventHandler.boxChange = function () {
  this._updateViewValue();
};
DualSelectMenu.eventHandler.boxClose = function () {
  this.isFocus = false;
};
_ACore["default"].install(DualSelectMenu);
var _default = DualSelectMenu;
exports["default"] = _default;

/***/ }),

/***/ 33912:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(93755);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function EditableText() {
  var thisET = this;
  this.$span = $('span', this);
  this.$text = document.createTextNode('');
  this.$span.addChild(this.$text);
  this.$higne = $('.absol-editabe-text-higne', this);
  this.$input = $('input', this);
  _OOP["default"].drillProperty(this, this.$input, ['selectionStart', 'selectionEnd']);
  this.sync = new Promise(function (rs) {
    _('attachhook').addTo(thisET).once('error', rs);
  });
  this.$input.on('keydown', this.eventHandler.inputKeyDown, true);
  this.$input.on('change', this.eventHandler.inputChange);
  this.$input.on('blur', this.eventHandler.inputBlur);
}
;
EditableText.tag = 'EditableText'.toLowerCase();
EditableText.render = function () {
  return _({
    "class": 'absol-editabe-text',
    extendEvent: ['blur', 'focus', 'change', 'modify'],
    child: [{
      "class": 'absol-editabe-text-higne',
      child: '<input type="text">'
    }, 'span']
  });
};
EditableText.prototype.focus = function () {
  this.$input.focus();
};
EditableText.prototype.blur = function () {
  this.$input.blur();
};
EditableText.prototype.select = function () {
  this.$input.select();
};
EditableText.prototype.edit = function (flag, select) {
  this.editing = !!flag;
  this.sync = this.sync.then(function () {
    if (flag) {
      this.focus();
      if (select) this.select();
    } else this.blur();
  }.bind(this));
  return this.sync;
};
EditableText.prototype._update = function () {
  this.sync = this.sync.then(function () {
    return new Promise(function (rs) {
      // setTimeout(function () {
      var bound = this.getBoundingClientRect();
      var higneBound = this.$higne.getBoundingClientRect();
      var fsize = this.getFontSize();
      this.$input.addStyle('width', bound.width + 4 + fsize * 0 + 'px');
      this.$input.addStyle('height', bound.height + 4 + 'px');
      this.$input.addStyle('left', bound.left - higneBound.left - 2 + 'px');
      this.$input.addStyle('top', bound.top - higneBound.top + 'px');
      rs();
    }.bind(this));
  }.bind(this));
};
EditableText.property = {};
EditableText.property.text = {
  set: function set(value) {
    this.$text.textContent = value;
    this.$input.value = value;
  },
  get: function get() {
    return this.$text.textContent;
  }
};
EditableText.property.editing = {
  set: function set(value) {
    if (this._editting === value) return;
    this._editting = !!value;
    if (value) {
      this.$input.value = this.text;
      this._update();
      this.sync = this.sync.then(function () {
        this.addClass('editing');
        this.$input.value = this.text;
        this.$input.addStyle('font', this.$span.getComputedStyleValue('font'));
        this.$input.addStyle('font-style', this.$span.getComputedStyleValue('font-style'));
        this.$input.addStyle('color', this.$span.getComputedStyleValue('color'));
      }.bind(this));
    } else {
      this.removeClass('editing');
    }
  },
  get: function get() {
    return !!this._editting;
  }
};
EditableText.eventHandler = {};
EditableText.eventHandler.inputKeyDown = function (event) {
  requestAnimationFrame(function () {
    this.text = this.$input.value;
    this._update();
    event.text = this.text;
    this.emit('modify', event);
  }.bind(this));
};
EditableText.eventHandler.inputChange = function (event) {
  this.editing = false;
  this.emit('change', event);
};
EditableText.eventHandler.inputBlur = function (event) {
  this.editing = false;
  this.emit('blur', event);
};
_ACore["default"].install(EditableText);
var _default = EditableText;
exports["default"] = _default;

/***/ }),

/***/ 13039:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(3505);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _stringGenerate = __webpack_require__(10713);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _Dom = __webpack_require__(64821);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _attribute = __webpack_require__(18144);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
var _utils = __webpack_require__(84512);
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _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); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _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; }
var execAsync = function execAsync(commands, whileFunc) {
  return commands.reduce(function (ac, act) {
    if (whileFunc && !whileFunc()) return;
    if (ac && ac.then) {
      if (typeof act === "function") {
        return ac.then(act);
      } else {
        return ac.then(function () {
          return act;
        });
      }
    }
    if (typeof act === 'function') return act(ac);else return act;
  }, null);
};
var getMaxRowCount = function getMaxRowCount() {
  var screenSize = (0, _Dom.getScreenSize)();
  return Math.ceil(Math.max(2048, screenSize.height) / 40.0) * 3;
};
var waitAll = function waitAll(variables, thenCb) {
  var hasPromise = variables.findIndex(function (v) {
    return v && typeof v.then === "function";
  });
  if (hasPromise >= 0) return Promise.all(variables).then(thenCb);else return thenCb(variables);
};
var waitValue = function waitValue(value, thenCb) {
  if (value && typeof value.then === "function") {
    return value.then(thenCb);
  } else return thenCb(value);
};

/**
 * @extends AElement
 * @constructor
 */
function EfficientTable() {
  this.layoutCtrl = new ETLayoutController(this);
  this.fixHeaderCtrl = new ETFixHeaderController(this);
  this._adapter = null;
  this.table = null;
  this.extendStyle = this.extendStyle || {};
  this.$attachhook = (0, _ACore._)('attachhook').addTo(this);
  this.$attachhook.requestUpdateSize = this.layoutCtrl.requestUpdateSize.bind(this);
  this.colWidth = new ETColWidthDeclaration(this);
  /**
   * @name adapter
   * @type {ETAdapter}
   * @memberof EfficientTable#
   */
}

EfficientTable.tag = 'EfficientTable'.toLowerCase();
EfficientTable.render = function (data, domDesc) {
  var width = domDesc.style && domDesc.style.width;
  var classList = ['as-efficient-table-wrapper'];
  if (width === 'match_parent') {
    classList.push('as-width-match-parent');
  }
  var id = domDesc.id || domDesc.attr && domDesc.attr.id || 'no-id-' + (0, _stringGenerate.randomIdent)(10);
  return (0, _ACore._)({
    id: id,
    extendEvent: ['colresize'],
    "class": classList,
    props: {
      extendStyle: domDesc.style
    },
    child: [{
      "class": 'as-dynamic-table-fixed-y-ctn'
    }]
  });
};
EfficientTable.prototype.addStyle = function (name, value) {
  if (name === 'width') {
    this.extendStyle[name] = value;
  } else {
    _AElement["default"].prototype.addStyle.apply(this, arguments);
  }
  return this;
};
EfficientTable.prototype.getColWidth = function () {
  var _this$colWidth;
  var table = this.table;
  if (!table) return null;
  if (arguments.length === 0) return this.colWidth["export"]();else return (_this$colWidth = this.colWidth).getProperty.apply(_this$colWidth, arguments);
};
EfficientTable.prototype.setColWidth = function () {
  var _this$colWidth2;
  var table = this.table;
  if (!table) return null;
  if (arguments.length === 0) Object.assign(this.colWidth);else (_this$colWidth2 = this.colWidth).setProperty.apply(_this$colWidth2, arguments);
};

/**
 *
 * @param {string|number|function}arg
 */
EfficientTable.prototype.findRow = function (arg) {
  if (this.table) {
    return this.table.body.findRow(arg);
  }
  return null;
};
EfficientTable.prototype.requestUpdateSize = function () {
  this.layoutCtrl.requestUpdateSize();
};
EfficientTable.prototype.notifyDataSheetChange = function () {
  if (this.adapter) this.adapter.notifyDataSheetChange();
};
EfficientTable.prototype.notifyRowModifiedAt = function (idx) {
  if (this.adapter) this.adapter.notifyRowModifiedAt(idx);
};
EfficientTable.prototype.notifyRowRemoveAt = function (idx) {
  if (this.adapter) this.adapter.notifyRowRemoveAt(idx);
};
EfficientTable.prototype.notifyAddRowAt = function (idx) {
  if (this.adapter) this.adapter.notifyAddRowAt(idx);
};
EfficientTable.prototype.revokeResource = function () {
  this.fixHeaderCtrl.revokeResource();
  //todo: revoke all resource
};

EfficientTable.property = {};
EfficientTable.property.adapter = {
  set: function set(value) {
    this.colWidth.revokeResource();
    this.fixHeaderCtrl.reset();
    this._adapter = new ETAdapter(this, value);
    this.table = new ETTable(this, this._adapter.data);
    this.addChild(this.table.elt);
    this._adapter.notifyDataSheetChange();
    this.colWidth = new ETColWidthDeclaration(this);
  },
  get: function get() {
    return this._adapter;
  }
};
var _default = EfficientTable;
exports["default"] = _default;
_ACore["default"].install(EfficientTable);

// ETAdapter.prototype.

/**
 *
 * @param {EfficientTable} elt
 * @constructor
 */
function ETFixHeaderController(elt) {
  this.elt = elt;
  this.$cloneTable = null;
  this.$cloneHead = null;
}
ETFixHeaderController.prototype.updateSize = function () {};
ETFixHeaderController.prototype.reset = function () {
  if (this.isWrapped) {}
};
ETFixHeaderController.prototype.revokeResource = function () {
  this.revokeResource = _noop["default"];
  this.elt = null;
};

/**
 *
 * @param {EfficientTable} elt
 * @constructor
 */
function ETLayoutController(elt) {
  var _this = this;
  this.elt = elt;
  /***
   *
   * @type {SearchTextInput|null}
   */
  this.$searchInput = null;
  /***
   *
   * @type {AElement}
   */
  this.$table = (0, _ACore.$)('.as-dynamic-table', elt);
  /***
   *
   * @type {AElement}
   */
  this.$thead = (0, _ACore.$)('.as-dynamic-table>thead', this.$table);
  /***
   *
   * @type {AElement}
   */
  this.$tbody = (0, _ACore.$)('.as-dynamic-table>tbody', this.$table);
  this.$filterInputs = [];
  this.$attachhook = (0, _ACore._)('attachhook').addTo(elt);
  this.domSignal = new _DomSignal["default"]((0, _ACore._)('attachhook').addTo(elt));
  //controller
  this.$fixedYCtn = (0, _ACore.$)('.as-dynamic-table-fixed-y-ctn', elt);
  this.extendStyle = {};

  // this.$attachhook.requestUpdateSize = this.fixedContentCtrl.updateSize.bind(this.fixedContentCtrl);
  this.$attachhook.requestUpdateSize = this.requestUpdateSize.bind(this);
  this.$attachhook.on('attached', function () {
    _ResizeSystem["default"].add(_this.$attachhook);
    _this.onAttached();
    _this.onAttached();
    // manager.add(this);
    setTimeout(function () {
      _this.requestUpdateSize();
    }, 10);
  });
  this.ev_scroll = this.ev_scroll.bind(this);
  this.$BindedScrollers = [];
  this.stopScrollTO = -1;
}
ETLayoutController.prototype.onAttached = function () {
  this.bindScroller();
};
ETLayoutController.prototype.requestUpdateSize = function () {
  this.elt.table.body.updateYOffset(true);
  var beforeRect = this.elt.table.body.size;
  this.viewSize();
  this.viewByScroll();
  this.elt.table.body.calcSize();
  var newRect = this.elt.table.body.size;
  if (newRect.width !== beforeRect.width || newRect.height !== beforeRect.height) {
    _ResizeSystem["default"].updateUp(this.elt.parentElement);
  }
};
ETLayoutController.prototype.viewSize = function () {
  this.elt.table.calcSize();
  var size = this.elt.table.size;
  if (size.trueValue) {
    this.elt.addClass('as-true-size');
  }
  this.elt.addStyle('height', size.height + 1 + 'px');
};
ETLayoutController.prototype.bindScroller = function () {
  var p = this.elt.parentElement;
  while (p) {
    p.addEventListener('scroll', this.ev_scroll);
    this.$BindedScrollers.push(p);
    p = p.parentElement;
  }
  document.addEventListener('scroll', this.ev_scroll);
  this.$BindedScrollers.push(document);
};
ETLayoutController.prototype.unBindScroller = function () {
  while (this.$BindedScrollers.length) {
    this.$BindedScrollers.pop().removeEventListener('scroll', this.ev_scroll);
  }
};
ETLayoutController.prototype.viewByScroll = function () {
  var _this2 = this;
  if (!this.elt.table) return;
  if (this.elt.table.size.trueValue) return;
  var bound = this.elt.getBoundingClientRect();
  var outbound = (0, _Dom.traceOutBoundingClientRect)(this.elt); //todo: small than scroller
  var head = this.elt.table.head;
  var hs = 0;
  if (bound.top >= outbound.top) {
    hs = 0;
    this.elt.table.elt.addStyle('top', 0);
    return;
  } else if (bound.bottom < outbound.bottom) {
    hs = 1;
  } else {
    hs = (outbound.top - (bound.top + head.size.height)) / (bound.height - head.size.height - outbound.height);
  }
  var rowLNIdx = this.elt.adapter.length * hs;
  var y = outbound.top + head.size.height + hs * (outbound.height - head.size.height);
  var rowIdx = Math.floor(rowLNIdx);
  if (hs === 1) rowIdx = this.elt.adapter.length - 1;
  var body = this.elt.table.body;
  var currentOffset = body.rowOffset;
  this.elt.table.body.requestVisible(rowIdx);
  this.elt.table.body.waitLoaded(function () {
    if (currentOffset !== body.rowOffset) return;
    _this2.elt.table.body.updateYOffset();
    var row = body.rows[rowIdx - body.rowOffset];
    if (!row) return; //out of date, don't update
    var rowLNY = row.offsetY + row.offsetHeight * hs;
    var dy = y - bound.top - rowLNY - hs; //hs for border 1px
    _this2.elt.table.elt.addStyle('top', dy + 'px');
  });
};
ETLayoutController.prototype.ev_scroll = function () {
  var _this3 = this;
  this.viewByScroll();
  clearTimeout(this.stopScrollTO);
  this.stopScrollTO = setTimeout(function () {
    _this3.viewByScroll();
  }, 100);
};

/**
 *
 * @param elt
 * @param adapterData
 * @constructor
 */
function ETAdapter(elt, adapterData) {
  this.elt = elt;
  this.data = adapterData.data;
  this.raw = adapterData;
  this.asyncSession = Math.random();
  this.sync = null;
}
ETAdapter.prototype.notifyDataSheetChange = function () {
  var _this4 = this;
  var asyncSession = Math.random();
  this.asyncSession = asyncSession;
  var cmdArr = [function () {
    return _this4.getLength();
  }, function () {
    var body = _this4.elt.table.body;
    var head = _this4.elt.table.head;
    body.clear();
    body.drawFrom(0);
    var makeSize = function makeSize() {
      body.waitLoaded(function () {
        body.updateYOffset(true);
        _this4.elt.layoutCtrl.requestUpdateSize();
      });
    };
    if (_this4.elt.isDescendantOf(document.body)) {
      makeSize();
    } else {
      _this4.elt.$attachhook.once('attached', makeSize);
    }
  }];
  execAsync(cmdArr, function () {
    return _this4.asyncSession === asyncSession;
  });
};
ETAdapter.prototype.notifyRowModifiedAt = function (idx) {
  var _this5 = this;
  this.sync = execAsync([this.sync, function () {
    _this5.elt.table.body.modifiedRowAt(idx);
    if (_this5.elt.isDescendantOf(document.body)) {
      _this5.elt.table.body.waitLoaded(function () {
        _this5.elt.layoutCtrl.requestUpdateSize();
      });
    }
  }]);
};
ETAdapter.prototype.notifyRowRemoveAt = function (idx) {
  var _this6 = this;
  this.sync = execAsync([this.sync, function () {
    return _this6.getLength();
  }, function () {
    _this6.elt.table.body.removeRowAt(idx);
    if (_this6.elt.isDescendantOf(document.body)) {
      _this6.elt.table.body.waitLoaded(function () {
        _this6.elt.layoutCtrl.requestUpdateSize();
      });
    }
  }]);
};
ETAdapter.prototype.notifyAddRowAt = function (idx) {
  var _this7 = this;
  this.sync = execAsync([this.sync, function () {
    return _this7.getLength();
  }, function () {
    _this7.elt.table.body.addRowAt(idx);
    if (_this7.elt.isDescendantOf(document.body)) {
      _this7.elt.table.body.waitLoaded(function () {
        _this7.elt.layoutCtrl.viewSize();
      });
    }
  }]);
};
ETAdapter.prototype.getLength = function () {
  var _this8 = this;
  return execAsync([function () {
    var body = _this8.raw.data.body;
    var length;
    if (typeof body.length === "number") {
      length = body.rows.length;
    } else if (body.length && body.length.then) {
      length = body.length;
    } else if (typeof body.getLength === "function") {
      try {
        length = _this8.raw.data.body.getLength(_this8);
      } catch (e) {
        (0, _safeThrow["default"])(e);
      }
    } else if (body.rows) length = body.rows.length;
    return length;
  }, function (l) {
    _this8.length = l;
    return l;
  }]);
};
ETAdapter.prototype.getRowAt = function (idx) {
  var data;
  var body = this.raw.data.body;
  if (typeof body.getRowAt === "function") {
    try {
      data = body.getRowAt(idx, this);
    } catch (e) {
      (0, _safeThrow["default"])(e);
    }
  } else if (body.rows) data = body.rows[idx];
  return data;
};
ETAdapter.prototype.renderHeadCell = function (elt, data, controller) {
  if (data.child) {
    if (data.child.map) {
      elt.addChild(data.child.map(function (it) {
        return (0, _ACore._)(it);
      }));
    } else {
      elt.addChild((0, _ACore._)(data.child));
    }
  }
  if (data.render) {
    data.render.call(null, elt, data, controller);
  }
};
ETAdapter.prototype.renderBodyCell = function (elt, data, idx, controller) {
  var body = this.raw.data.body;
  var template = body.rowTemplate;
  var cellTpl = template.cells[idx];
  if (cellTpl.child) {
    if (cellTpl.child.map) {
      elt.addChild(cellTpl.child.map(function (it) {
        return (0, _ACore._)(it);
      }));
    } else {
      elt.addChild((0, _ACore._)(cellTpl.child));
    }
  }
  if (cellTpl.render) {
    cellTpl.render.call(null, elt, data, controller);
  }
  if (cellTpl.style) elt.addStyle(cellTpl.style);
};
ETAdapter.prototype.getRowLength = function () {
  var body = this.raw.data.body;
  var template = body.rowTemplate;
  return template.cells.length;
};

/**
 *
 * @param {EfficientTable} wrapper
 * @param data
 * @constructor
 */
function ETTable(wrapper, data) {
  this.wrapper = wrapper;
  this.adapter = this.wrapper.adapter;
  this.data = data;
  this.head = new ETHead(this, this.data.head);
  this.body = new ETBody(this, this.data.body);
  this.elt = (0, _ACore._)({
    tag: 'table',
    "class": 'as-dynamic-table',
    child: [this.head.elt, this.body.elt]
  });
  this.handleStyle();
  this.size = new _Rectangle["default"](0, 0, 0, 0);
  this.size.trueValue = false;
}
ETTable.prototype.handleStyle = function () {
  var style = this.wrapper.extendStyle;
  var value;
  if (style.width) {
    value = (0, _attribute.parseMeasureValue)(style.width);
    if (value) {
      if (value.unit === '%') {
        this.wrapper.style.setProperty('width', value);
        this.elt.addStyle('width', '100%');
      }
    }
  }
};
ETTable.prototype.calcSize = function () {
  this.head.calcSize();
  this.body.calcSize();
  this.size = this.head.size.clone();
  this.size.height += this.body.size.height;
  this.size.trueValue = this.body.size.trueValue;
};

/**
 *
 * @param {ETTable} table
 * @param data
 * @constructor
 */
function ETHead(table, data) {
  var _this9 = this;
  this.table = table;
  this.data = data || {};
  if (!this.data.rows) this.data.rows = [];
  this.rows = this.data.rows.map(function (rowData) {
    return new ETHeadRow(_this9, rowData);
  });
  this.elt = (0, _ACore._)({
    tag: 'thead',
    "class": 'as-dt-header',
    child: this.rows.map(function (it) {
      return it.elt;
    })
  });
  this.size = new _Rectangle["default"](0, 0, 0, 0);
}
ETHead.prototype.calcSize = function () {
  var bound = this.elt.getBoundingClientRect();
  this.size = _Rectangle["default"].fromClientRect(bound);
};

/**
 *
 * @param {ETHead} head
 * @param data
 * @constructor
 */
function ETHeadRow(head, data) {
  var _this10 = this;
  this.head = head;
  this.data = data || {};
  if (!this.data.cells) this.data.cells = [];
  this.cells = this.data.cells.map(function (cellData) {
    return new ETHeadCell(_this10, cellData);
  });
  this.elt = (0, _ACore._)({
    tag: 'tr',
    "class": 'as-dt-header-row',
    child: this.cells.map(function (it) {
      return it.elt;
    })
  });
}

// (ETHeadRow)

function ETHeadCell(row, data) {
  this.row = row;
  this.data = data || {};
  this.elt = (0, _ACore._)({
    tag: 'th',
    "class": 'as-dt-header-cell'
  });
  if (data.attr && (0, _utils.isNaturalNumber)(data.attr.colspan)) {
    this.elt.attr('colspan', data.attr.colspan);
  }
  if (data.attr && (0, _utils.isNaturalNumber)(data.attr.rowspan)) {
    this.elt.attr('colspan', data.attr.rowspan);
  }
  if (data.style) this.elt.addStyle(data.style);
  this.row.head.table.adapter.renderHeadCell(this.elt, this.data, this);
}

/**
 *
 * @param {ETTable} table
 * @param data
 * @constructor
 */
function ETBody(table, data) {
  this.data = data;
  this.table = table;
  this.elt = (0, _ACore._)({
    tag: 'tbody',
    "class": 'as-dt-body'
  });
  this.rowOffset = 0;
  this.rows = [];
  /**
   *
   * @type {Rectangle|{trueValue:boolean}}
   */
  this.size = new _Rectangle["default"](0, 0, 0, 0);
  this.size.trueValue = false;
  this.needUpdateYOffset = false;
  this.sync = null;
}
ETBody.prototype.clear = function () {
  this.rowOffset = 0;
  var row;
  while (this.rows.length) {
    row = this.rows.shift();
    this.rowOffset++;
    row.elt.remove();
    row.revokeResource();
  }
  this.needUpdateYOffset = true;
};
ETBody.prototype.removeRowAt = function (idx) {
  var localIdx = idx - this.rowOffset;
  var row = this.rows[localIdx];
  if (!row) return false;
  row.elt.selfRemove();
  this.rows.splice(localIdx, 1);
  row.revokeResource();
  for (var i = 0; i < this.rows.length; ++i) {
    this.rows[i].updateIdx(i + this.rowOffset);
  }
  this.drawFrom(this.rowOffset);
};
ETBody.prototype.modifiedRowAt = function (idx) {
  var localIdx = idx - this.rowOffset;
  var row = this.rows[localIdx];
  if (!row) return false;
  var newRow = new ETBodyRow(this, this.table.wrapper.adapter.getRowAt(idx));
  newRow.updateIdx(idx);
  this.rows[localIdx] = newRow;
  row.elt.selfReplace(newRow.elt);
  this.needUpdateYOffset = true;
};
ETBody.prototype.addRowAt = function (idx) {
  var localIdx = idx - this.rowOffset;
  var row = this.rows[localIdx];
  if (!row) return false;
  var newRow = new ETBodyRow(this, this.table.wrapper.adapter.getRowAt(idx));
  this.rows.splice(localIdx, 0, newRow);
  row.elt.parentElement.addChildBefore(newRow.elt, row.elt);
  for (var i = 0; i < this.rows.length; ++i) {
    this.rows[i].updateIdx(i + this.rowOffset);
  }
  this.needUpdateYOffset = true;
};
ETBody.prototype.requestVisible = function (idx) {
  var maxRow = getMaxRowCount();
  var length = this.table.wrapper.adapter.length;
  var pageIdx;
  var pageN = Math.ceil(Math.max(length / (maxRow / 3)));
  idx = Math.max(0, idx);
  idx = Math.min(length - 1, idx);
  pageIdx = Math.floor(idx / (maxRow / 3));
  pageIdx = Math.min(pageN - 3, pageIdx - 1);
  pageIdx = Math.max(0, pageIdx);
  this.drawFrom(pageIdx * Math.floor(maxRow / 3));
};
ETBody.prototype.drawFrom = function (idx) {
  var adapter = this.table.wrapper.adapter;
  var maxRowCount = getMaxRowCount();
  idx = Math.max(0, idx);
  var endIdx = Math.min(idx + maxRowCount, adapter.length);
  idx = Math.max(0, Math.min(endIdx - 1, idx));
  var row;
  while (this.rowOffset + this.rows.length > idx + maxRowCount && this.rows.length) {
    row = this.rows.pop();
    row.elt.remove();
  }
  while (this.rowOffset < idx && this.rows.length) {
    row = this.rows.shift();
    this.rowOffset++;
    row.elt.remove();
    row.revokeResource();
    this.needUpdateYOffset = true;
  }
  if (this.rows.length === 0) this.rowOffset = Math.min(adapter.length, idx + 1);
  var newRows = [];
  var newRow;
  while (this.rowOffset > idx && this.rowOffset > 0) {
    this.rowOffset--;
    newRow = new ETBodyRow(this, adapter.getRowAt(this.rowOffset));
    newRows.push(newRow);
    newRow.updateIdx(this.rowOffset);
    this.rows.unshift(newRow);
    this.elt.addChildBefore(newRow.elt, this.elt.firstChild);
    this.needUpdateYOffset = true;
  }
  while (this.rowOffset + this.rows.length < endIdx) {
    newRow = new ETBodyRow(this, adapter.getRowAt(this.rowOffset + this.rows.length));
    newRow.updateIdx(this.rowOffset + this.rows.length);
    newRows.push(newRow);
    this.rows.push(newRow);
    this.elt.addChild(newRow.elt);
    this.needUpdateYOffset = true;
  }
};

/**
 *
 * @param {boolean} force
 */
ETBody.prototype.updateYOffset = function (force) {
  if (!this.needUpdateYOffset && !force) return;
  this.needUpdateYOffset = false;
  var tableBound = this.table.elt.getBoundingClientRect();
  this.rows.forEach(function (row) {
    row.calcSize();
    var rowBound = row.size;
    row.offsetY = rowBound.y - tableBound.top;
    row.offsetHeight = rowBound.height;
  });
};
ETBody.prototype.calcSize = function () {
  var adapter = this.table.wrapper.adapter;
  var bound = this.elt.getBoundingClientRect();
  if (this.rows.length === adapter.length) {
    this.size = _Rectangle["default"].fromClientRect(bound);
    this.size.trueValue = true;
  } else {
    this.size = _Rectangle["default"].fromClientRect(bound);
    this.size.height = bound.height / this.rows.length * adapter.length;
    this.size.trueValue = false;
  }
};
ETBody.prototype.waitLoaded = function (cb) {
  waitAll(this.rows.map(function (row) {
    return row.data;
  }), cb);
};
function ETBodyRow(body, data) {
  var _this11 = this;
  this.elt = (0, _ACore._)({
    tag: 'tr',
    "class": 'as-dt-body-row'
  });
  this.offsetY = 0;
  this.data = data;
  this.body = body;
  this.idx = 0;
  this.$idx = undefined;
  waitValue(this.data, function (data) {
    _this11.data = data;
    var adapter = body.table.wrapper.adapter;
    var length = adapter.getRowLength();
    _this11.cells = Array(length).fill(null).map(function (u, i) {
      return new ETBodyCell(_this11, i);
    });
    _this11.elt.addChild(_this11.cells.map(function (cell) {
      return cell.elt;
    }));
    _this11.$idx = (0, _ACore.$)('.as-dt-row-index', _this11.elt) || null;
    if (_this11.$idx) _this11.$idx.attr('data-idx', _this11.idx + 1);
    if (data.on && data.on.click) {
      _this11.elt.on('click', function (event) {
        data.on.click.call(_this11.elt, event, _this11);
      });
    }
    if (adapter.data.body.rowTemplate.on && typeof adapter.data.body.rowTemplate.on.click === "function") {
      _this11.elt.on('click', function (event) {
        adapter.data.body.rowTemplate.on.click.call(_this11.elt, event, _this11);
      });
    }
  });
  this.size = new _Rectangle["default"](0, 0, 0, 0);
  // this.cells = data.cells.map(cell => new ETBodyCell(this, cell));
  /**
   * @name adapter
   * @type {ETAdapter}
   * @memberof ETBodyRow#
   */
}

ETBodyRow.prototype.updateIdx = function (value) {
  this.idx = value;
  if (!this.cells) return;
  if (this.$idx === undefined) this.$idx = (0, _ACore.$)('.as-dt-row-index', this.elt) || null;
  if (this.$idx) this.$idx.attr('data-idx', this.idx + 1);
};
ETBodyRow.prototype.calcSize = function () {
  this.size = _Rectangle["default"].fromClientRect(this.elt.getBoundingClientRect());
};
ETBodyRow.prototype.notifyRemove = function () {
  if (this.adapter) this.adapter.notifyRowRemoveAt(this.idx);
};
ETBodyRow.prototype.notifyModified = function () {
  if (this.adapter) this.adapter.notifyRowModifiedAt(this.idx);
};
ETBodyRow.prototype.revokeResource = function () {
  // return;
  this.revokeResource = _noop["default"];
  (0, _utils.revokeResource)(this.elt);
  delete this.elt;
  this.body = null;
  this.notifyRemove = _noop["default"];
};
Object.defineProperty(ETBodyRow.prototype, 'adapter', {
  /**
   *
   * @returns {ETAdapter}
   */
  get: function get() {
    return this.body && this.body.table.wrapper && this.body.table.wrapper.adapter;
  }
});
function ETBodyCell(row, idx) {
  this.elt = (0, _ACore._)({
    tag: 'td',
    "class": 'as-dt-body-cell'
  });
  this.row = row;
  var adapter = this.row.body.table.wrapper.adapter;
  adapter.renderBodyCell(this.elt, row.data, idx, this);
}

/**
 * @extends Attributes
 * @param {EfficientTable} elt
 * @constructor
 */
function ETColWidthDeclaration(elt) {
  var _this12 = this;
  _Attributes["default"].call(this, this);
  if (!elt.table) return;
  var temp = elt.table.head.rows.reduce(function (ac, row) {
    var l = row.cells.reduce(function (ac1, cell) {
      var colspan = cell.data.attr && (cell.data.attrs.colspan || cell.data.attrs.colSpan);
      colspan = parseInt(colspan + '', 10);
      if (!(0, _utils.isNaturalNumber)(colspan) || !colspan) colspan = 1;
      var id = cell.data.id;
      if (id && typeof id === "string") {
        ac.id2idx[id] = ac1;
      }
      if (colspan === 1) {
        if (!ac.idx2cells[ac1]) ac.idx2cells[ac1] = [];
        ac.idx2cells[ac1].push(cell);
      }
      return ac1 + colspan;
    }, 0);
    ac.length = Math.max(ac.length, l);
    return ac;
  }, {
    length: 0,
    id2idx: {},
    idx2cells: {}
  });
  Array(temp.length).fill(0).forEach(function (u, i) {
    _this12.defineProperty('' + i, {
      set: function set(value) {
        var unit;
        if ((arguments.length <= 1 ? 0 : arguments.length - 1) > 1) unit = arguments.length <= 1 ? undefined : arguments[1];
        var headWith;
        var originValue = this.getProperty('' + i);
        var pOValue = (0, _attribute.parseMeasureValue)(originValue);
        if (!(0, _utils.isRealNumber)(value) || value < 0) {
          value = 'auto';
        } else if (unit === 'px') {
          if (pOValue.unit === '%') {
            headWith = elt.table.head.elt.getBoundingClientRect().width;
            value = value / headWith * 100 + '%';
          } else {
            value = value + 'px';
          }
        } else if (unit === '%') {
          headWith = elt.table.head.elt.getBoundingClientRect().width;
          if (pOValue.unit === 'px') {
            value = value / 188 * headWith;
          } else {
            value = value + '%';
          }
        }
        if (typeof value === "number") value = value + 'px';
        var cells = temp.idx2cells[i] || [];
        cells.forEach(function (cell) {
          if (value === 'auto') {
            if (cell.data.style) {
              delete cell.data.style.width;
              cell.elt.removeStyle('width');
            }
          } else {
            if (!cell.data.style) cell.data.style = {};
            cell.data.style.width = value;
            cell.elt.addStyle('width', value);
          }
        });
      },
      get: function get() {
        var _ref;
        var unit;
        if (arguments.length > 1) unit = arguments.length <= 0 ? undefined : arguments[0];
        var ref = (_ref = arguments.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
        var value = ref.get();
        var cells = temp.idx2cells[i] || [];
        if (cells.length === 0) return 0;
        if (unit === 'px') {
          value = cells[0].elt.getBoundingClientRect().width;
        } else if (unit === '%') {
          value = cells[0].elt.getBoundingClientRect().width / elt.table.head.elt.getBoundingClientRect().width * 100;
        } else {
          value = cells.reduce(function (ac, cell) {
            var pValue;
            if (cell.data.style && cell.data.style.width) {
              pValue = (0, _attribute.parseMeasureValue)(cell.data.style.width);
              if (!pValue || pValue.unit !== 'px') return ac;
              return pValue.value;
            }
            return ac;
          }, 'auto');
        }
        return value;
      }
    });
  });
  Object.keys(temp.id2idx).forEach(function (id) {
    var idx = temp.id2idx[id];
    _this12.defineProperty(id, {
      set: function set() {
        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }
        return this.setProperty.apply(this, [idx].concat(_toConsumableArray(args.slice(1))));
      },
      get: function get() {
        for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
          args[_key2] = arguments[_key2];
        }
        return this.getProperty.apply(this, [idx].concat(_toConsumableArray(args.slice(1))));
      }
    });
  });
}
_OOP["default"].mixClass(ETColWidthDeclaration, _Attributes["default"]);
Object.defineProperty(ETColWidthDeclaration.prototype, 'revokeResource', {
  value: function value() {
    delete this.$node;
    delete this.revokeResource;
  },
  writable: true,
  enumerable: false,
  configurable: true
});

/***/ }),

/***/ 98541:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.EmojiAnimByIdent = void 0;
var EmojiAnims = [["(heart)", "heart.png", "Heart"], ["(cool)", "cool.png", "Cool"], ["(hearteyes)", "hearteyes.png", "Heart eyes"], ["(stareyes)", "stareyes.png", "Star eyes"], ["(like)", "like.png", "Like"], ["(unamused)", "unamused.png", "Unamused"], ["(cwl)", "cwl.png", "Crying with laughter"], ["(xd)", "xd.png", "XD smiley"], [":)", "smile.png", "Smile"], [":(", "sad.png", "Sad"], [":D", "laugh.png", "Laugh"], [":O", "surprised.png", "Surprised"], [";)", "wink.png", "Wink"], [";(", "cry.png", "Crying"], ["(shivering)", "shivering.png", "Cold shivering"], ["(:|", "sweat.png", "Sweating"], [":|", "speechless.png", "Speechless"], [":P", "tongueout.png", "Cheeky"], [":$", "blush.png", "Blushing"], ["(inlove)", "inlove.png", "In love"], ["(kiss)", "kiss.png", "Kiss"], [":^)", "wonder.png", "Wondering"], ["|-)", "sleepy.png", "Sleepy"], ["|-(", "dull.png", "Dull"], ["(yawn)", "yawn.png", "Yawn"], ["(puke)", "puke.png", "Vomiting"], ["(doh)", "doh.png", "Doh!"], ["(angry)", "angry.png", "Angry"], ["(wasntme)", "wasntme.png", "It wasn't me!"], ["(worry)", "worry.png", "Worried"], ["(mm)", "mmm.png", "Mmmmm…"], ["(nerd)", "nerdy.png", "Nerdy"], ["(rainbowsmile)", "rainbowsmile.png", "Rainbow smile"], [":x", "lipssealed.png", "My lips are sealed"], ["(devil)", "devil.png", "Devil"], ["(angel)", "angel.png", "Angel"], ["(envy)", "envy.png", "Envy"], ["(makeup)", "makeup.png", "Make-up"], ["(think)", "think.png", "Thinking"], ["(rofl)", "rofl.png", "Rolling on the floor laughing"], ["(happy)", "happy.png", "Happy"], ["(smirk)", "smirk.png", "Smirking"], ["(nod)", "nod.png", "Nodding"], ["(shake)", "shake.png", "Shake"], ["(waiting)", "waiting.png", "Waiting"], ["(emo)", "emo.png", "Emo"], ["(donttalk)", "donttalktome.png", "Don't talk to me"], ["(idea)", "idea.png", "Idea"], ["(talk)", "talk.png", "Talking"], ["(swear)", "swear.png", "Swearing"], ["]:)", "evilgrin.png", "Evil grin"], ["(headbang)", "headbang.png", "Banging head on wall"], ["(learn)", "learn.png", "Global Learning"], ["(headphones)", "headphones.png", "Listening to headphones"], ["(morningafter)", "hungover.png", "Morning after party"], ["(selfie)", "selfie.png", "Selfie"], ["(shock)", "shock.png", "Spoiler alert"], ["(llsshock)", "llsshock.png", "Spoiler alert"], ["(ttm)", "ttm.png", "Talking too much"], ["(dream)", "dream.png", "Dreaming"], ["(ill)", "ill.png", "Ill"], ["(tired)", "tired.png", "Tired"], ["(party)", "party.png", "Party"], ["(bandit)", "bandit.png", "Bandit"], ["(tauri)", "tauri.png", "Bald man with glasses"], ["(nazar)", "nazar.png", "Blessing"], ["(movember)", "movember.png", "Movember"], ["(mysteryskype)", "mysteryskype.png", "Mystery Skype"], ["(dotdfemale)", "dotdfemale.png", "Day of the dead"], ["(dotdmale)", "dotdmale.png", "Day of the dead"], ["(selfiediwali)", "selfiediwali.png", "Selfie Diwali"], ["(diwaliselfie)", "diwaliselfie.png", "Diwali selfie"], ["(steveaoki)", "steveaoki.png", "Steve Aoki"], ["(aokijump)", "aokijump.png", "Aoki jump"], ["(cakethrow)", "cakethrow.png", "Cake throw"], ["(kolony)", "kolony.png", "Kolony"], ["(joy)", "joy.png", "Joy"], ["(anger)", "anger.png", "Anger"], ["(sadness)", "sadness.png", "Sadness"], ["(disgust)", "disgust.png", "Disgust"], ["(fear)", "fear.png", "Fear"], ["(hestonfacepalm)", "hestonfacepalm.png", "Heston facepalm"], ["(heston)", "heston.png", "Heston Blumenthal"], ["(stormtrooper)", "stormtrooper.png", "Storm trooper"], ["(kyloren)", "kyloren.png", "Kylo Ren"], ["(captainphasma)", "captainphasma.png", "Captain Phasma"], ["(malthe)", "malthe.png", "Smiling man with glasses"], ["(ladyvamp)", "ladyvampire.png", "Lady vampire"], ["(vampire)", "vampire.png", "Vampire"], ["(ghost)", "ghost.png", "Ghost"], ["(skull)", "skull.png", "Skull"], ["(pumpkin)", "pumpkin.png", "Pumpkin"], ["(santa)", "santa.png", "Santa"], ["(xmascwl)", "xmascwl.png", "Xmas crying with laughter"], ["(festiveparty)", "festiveparty.png", "Festive party"], ["(holidayspirit)", "holidayspirit.png", "Holiday spirit"], ["(rudolfsurprise)", "rudolfsurprise.png", "Surprised Rudolf"], ["(rudolfidea)", "rudolfidea.png", "Rudolf idea"], ["(wtf)", "wtf.png", "WTF…"], ["(smoking)", "smoke.png", "Smoking"], ["(drunk)", "drunk.png", "Drunk"], ["(finger)", "finger.png", "Finger"], ["(oliver)", "oliver.png", "Man saying come on"], ["(xmassarcastic)", "xmassarcastic.png", "Xmas sarcastic"], ["(xmascry)", "xmascry.png", "Xmas cry"], ["(wave)", "hi.png", "Hi"], ["(highfive)", "highfive.png", "High five"], ["(clap)", "clap.png", "Clapping"], ["(sarcastic)", "sarcastic.png", "Sarcastic"], ["(chuckle)", "giggle.png", "Giggle"], ["(facepalm)", "facepalm.png", "Facepalm"], ["(rock)", "rock.png", "Rock"], ["(yn)", "fingerscrossed.png", "Fingers crossed"], ["(listening)", "listening.png", "Listening"], ["(wait)", "wait.png", "Wait"], ["(whew)", "whew.png", "Relieved"], ["(tmi)", "tmi.png", "Too much information"], ["(call)", "call.png", "Call"], ["(punch)", "punch.png", "Punch"], ["(talktothehand)", "talktothehand.png", "Talk to the hand"], ["(whistle)", "whistle.png", "Whistle"], ["(slap)", "slap.png", "Slap"], ["(lalala)", "lalala.png", "Lalala"], ["(y)", "yes.png", "Yes"], ["(n)", "no.png", "No"], ["(handshake)", "handshake.png", "Handshake"], ["(fistbump)", "fistbump.png", "Fist bump"], ["(poke)", "poke.png", "Poke"], ["(celebrate)", "handsinair.png", "Hands celebrating"], ["(hearthands)", "hearthands.png", "Heart hands"], ["(victory)", "victory.png", "Victory sign"], ["(noworries)", "noworries.png", "No worries"], ["(ok)", "ok.png", "OK"], ["(pray)", "praying.png", "Praying"], ["(flex)", "muscle.png", "Muscle"], ["(ek)", "naturescall.png", "Nature's call"], ["(woty)", "woty.png", "Woman of the year"], ["(glassceiling)", "glassceiling.png", "Glass ceiling"], ["(deadyes)", "deadyes.png", "Dead yes"], ["(xmasyes)", "xmasyes.png", "Xmas yes"], ["(dropthemic)", "dropthemic.png", "Drop the mic"]];
var _default = EmojiAnims;
exports["default"] = _default;
var EmojiAnimByIdent = EmojiAnims.reduce(function (ac, cr) {
  ac[cr[0]] = cr;
  return ac;
}, {});
exports.EmojiAnimByIdent = EmojiAnimByIdent;

/***/ }),

/***/ 24394:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var EmojiChars = [["Smileys & Emotion", [["face-smiling", [[["U+1F600"], "😀", "grinning face"], [["U+1F603"], "😃", "grinning face with big eyes"], [["U+1F604"], "😄", "grinning face with smiling eyes"], [["U+1F601"], "😁", "beaming face with smiling eyes"], [["U+1F606"], "😆", "grinning squinting face"], [["U+1F605"], "😅", "grinning face with sweat"], [["U+1F923"], "🤣", "rolling on the floor laughing"], [["U+1F602"], "😂", "face with tears of joy"], [["U+1F642"], "🙂", "slightly smiling face"], [["U+1F643"], "🙃", "upside-down face"], [["U+1F609"], "😉", "winking face"], [["U+1F60A"], "😊", "smiling face with smiling eyes"], [["U+1F607"], "😇", "smiling face with halo"]]], ["face-affection", [[["U+1F970"], "🥰", "smiling face with hearts"], [["U+1F60D"], "😍", "smiling face with heart-eyes"], [["U+1F929"], "🤩", "star-struck"], [["U+1F618"], "😘", "face blowing a kiss"], [["U+1F617"], "😗", "kissing face"], [["U+263A"], "☺", "smiling face"], [["U+1F61A"], "😚", "kissing face with closed eyes"], [["U+1F619"], "😙", "kissing face with smiling eyes"], [["U+1F972"], "🥲", "⊛ smiling face with tear"]]], ["face-tongue", [[["U+1F60B"], "😋", "face savoring food"], [["U+1F61B"], "😛", "face with tongue"], [["U+1F61C"], "😜", "winking face with tongue"], [["U+1F92A"], "🤪", "zany face"], [["U+1F61D"], "😝", "squinting face with tongue"], [["U+1F911"], "🤑", "money-mouth face"]]], ["face-hand", [[["U+1F917"], "🤗", "hugging face"], [["U+1F92D"], "🤭", "face with hand over mouth"], [["U+1F92B"], "🤫", "shushing face"], [["U+1F914"], "🤔", "thinking face"]]], ["face-neutral-skeptical", [[["U+1F910"], "🤐", "zipper-mouth face"], [["U+1F928"], "🤨", "face with raised eyebrow"], [["U+1F610"], "😐", "neutral face"], [["U+1F611"], "😑", "expressionless face"], [["U+1F636"], "😶", "face without mouth"], [["U+1F60F"], "😏", "smirking face"], [["U+1F612"], "😒", "unamused face"], [["U+1F644"], "🙄", "face with rolling eyes"], [["U+1F62C"], "😬", "grimacing face"], [["U+1F925"], "🤥", "lying face"]]], ["face-sleepy", [[["U+1F60C"], "😌", "relieved face"], [["U+1F614"], "😔", "pensive face"], [["U+1F62A"], "😪", "sleepy face"], [["U+1F924"], "🤤", "drooling face"], [["U+1F634"], "😴", "sleeping face"]]], ["face-unwell", [[["U+1F637"], "😷", "face with medical mask"], [["U+1F912"], "🤒", "face with thermometer"], [["U+1F915"], "🤕", "face with head-bandage"], [["U+1F922"], "🤢", "nauseated face"], [["U+1F92E"], "🤮", "face vomiting"], [["U+1F927"], "🤧", "sneezing face"], [["U+1F975"], "🥵", "hot face"], [["U+1F976"], "🥶", "cold face"], [["U+1F974"], "🥴", "woozy face"], [["U+1F635"], "😵", "dizzy face"], [["U+1F92F"], "🤯", "exploding head"]]], ["face-hat", [[["U+1F920"], "🤠", "cowboy hat face"], [["U+1F973"], "🥳", "partying face"], [["U+1F978"], "🥸", "⊛ disguised face"]]], ["face-glasses", [[["U+1F60E"], "😎", "smiling face with sunglasses"], [["U+1F913"], "🤓", "nerd face"], [["U+1F9D0"], "🧐", "face with monocle"]]], ["face-concerned", [[["U+1F615"], "😕", "confused face"], [["U+1F61F"], "😟", "worried face"], [["U+1F641"], "🙁", "slightly frowning face"], [["U+2639"], "☹", "frowning face"], [["U+1F62E"], "😮", "face with open mouth"], [["U+1F62F"], "😯", "hushed face"], [["U+1F632"], "😲", "astonished face"], [["U+1F633"], "😳", "flushed face"], [["U+1F97A"], "🥺", "pleading face"], [["U+1F626"], "😦", "frowning face with open mouth"], [["U+1F627"], "😧", "anguished face"], [["U+1F628"], "😨", "fearful face"], [["U+1F630"], "😰", "anxious face with sweat"], [["U+1F625"], "😥", "sad but relieved face"], [["U+1F622"], "😢", "crying face"], [["U+1F62D"], "😭", "loudly crying face"], [["U+1F631"], "😱", "face screaming in fear"], [["U+1F616"], "😖", "confounded face"], [["U+1F623"], "😣", "persevering face"], [["U+1F61E"], "😞", "disappointed face"], [["U+1F613"], "😓", "downcast face with sweat"], [["U+1F629"], "😩", "weary face"], [["U+1F62B"], "😫", "tired face"], [["U+1F971"], "🥱", "yawning face"]]], ["face-negative", [[["U+1F624"], "😤", "face with steam from nose"], [["U+1F621"], "😡", "pouting face"], [["U+1F620"], "😠", "angry face"], [["U+1F92C"], "🤬", "face with symbols on mouth"], [["U+1F608"], "😈", "smiling face with horns"], [["U+1F47F"], "👿", "angry face with horns"], [["U+1F480"], "💀", "skull"], [["U+2620"], "☠", "skull and crossbones"]]], ["face-costume", [[["U+1F4A9"], "💩", "pile of poo"], [["U+1F921"], "🤡", "clown face"], [["U+1F479"], "👹", "ogre"], [["U+1F47A"], "👺", "goblin"], [["U+1F47B"], "👻", "ghost"], [["U+1F47D"], "👽", "alien"], [["U+1F47E"], "👾", "alien monster"], [["U+1F916"], "🤖", "robot"]]], ["cat-face", [[["U+1F63A"], "😺", "grinning cat"], [["U+1F638"], "😸", "grinning cat with smiling eyes"], [["U+1F639"], "😹", "cat with tears of joy"], [["U+1F63B"], "😻", "smiling cat with heart-eyes"], [["U+1F63C"], "😼", "cat with wry smile"], [["U+1F63D"], "😽", "kissing cat"], [["U+1F640"], "🙀", "weary cat"], [["U+1F63F"], "😿", "crying cat"], [["U+1F63E"], "😾", "pouting cat"]]], ["monkey-face", [[["U+1F648"], "🙈", "see-no-evil monkey"], [["U+1F649"], "🙉", "hear-no-evil monkey"], [["U+1F64A"], "🙊", "speak-no-evil monkey"]]], ["emotion", [[["U+1F48B"], "💋", "kiss mark"], [["U+1F48C"], "💌", "love letter"], [["U+1F498"], "💘", "heart with arrow"], [["U+1F49D"], "💝", "heart with ribbon"], [["U+1F496"], "💖", "sparkling heart"], [["U+1F497"], "💗", "growing heart"], [["U+1F493"], "💓", "beating heart"], [["U+1F49E"], "💞", "revolving hearts"], [["U+1F495"], "💕", "two hearts"], [["U+1F49F"], "💟", "heart decoration"], [["U+2763"], "❣", "heart exclamation"], [["U+1F494"], "💔", "broken heart"], [["U+2764"], "❤", "red heart"], [["U+1F9E1"], "🧡", "orange heart"], [["U+1F49B"], "💛", "yellow heart"], [["U+1F49A"], "💚", "green heart"], [["U+1F499"], "💙", "blue heart"], [["U+1F49C"], "💜", "purple heart"], [["U+1F90E"], "🤎", "brown heart"], [["U+1F5A4"], "🖤", "black heart"], [["U+1F90D"], "🤍", "white heart"], [["U+1F4AF"], "💯", "hundred points"], [["U+1F4A2"], "💢", "anger symbol"], [["U+1F4A5"], "💥", "collision"], [["U+1F4AB"], "💫", "dizzy"], [["U+1F4A6"], "💦", "sweat droplets"], [["U+1F4A8"], "💨", "dashing away"], [["U+1F573"], "🕳", "hole"], [["U+1F4A3"], "💣", "bomb"], [["U+1F4AC"], "💬", "speech balloon"], [["U+1F441", "U+FE0F", "U+200D", "U+1F5E8", "U+FE0F"], "👁️‍🗨️", "eye in speech bubble"], [["U+1F5E8"], "🗨", "left speech bubble"], [["U+1F5EF"], "🗯", "right anger bubble"], [["U+1F4AD"], "💭", "thought balloon"], [["U+1F4A4"], "💤", "zzz"]]]]], ["People & Body", [["hand-fingers-open", [[["U+1F44B"], "👋", "waving hand"], [["U+1F91A"], "🤚", "raised back of hand"], [["U+1F590"], "🖐", "hand with fingers splayed"], [["U+270B"], "✋", "raised hand"], [["U+1F596"], "🖖", "vulcan salute"]]], ["hand-fingers-partial", [[["U+1F44C"], "👌", "OK hand"], [["U+1F90C"], "🤌", "⊛ pinched fingers"], [["U+1F90F"], "🤏", "pinching hand"], [["U+270C"], "✌", "victory hand"], [["U+1F91E"], "🤞", "crossed fingers"], [["U+1F91F"], "🤟", "love-you gesture"], [["U+1F918"], "🤘", "sign of the horns"], [["U+1F919"], "🤙", "call me hand"]]], ["hand-single-finger", [[["U+1F448"], "👈", "backhand index pointing left"], [["U+1F449"], "👉", "backhand index pointing right"], [["U+1F446"], "👆", "backhand index pointing up"], [["U+1F595"], "🖕", "middle finger"], [["U+1F447"], "👇", "backhand index pointing down"], [["U+261D"], "☝", "index pointing up"]]], ["hand-fingers-closed", [[["U+1F44D"], "👍", "thumbs up"], [["U+1F44E"], "👎", "thumbs down"], [["U+270A"], "✊", "raised fist"], [["U+1F44A"], "👊", "oncoming fist"], [["U+1F91B"], "🤛", "left-facing fist"], [["U+1F91C"], "🤜", "right-facing fist"]]], ["hands", [[["U+1F44F"], "👏", "clapping hands"], [["U+1F64C"], "🙌", "raising hands"], [["U+1F450"], "👐", "open hands"], [["U+1F932"], "🤲", "palms up together"], [["U+1F91D"], "🤝", "handshake"], [["U+1F64F"], "🙏", "folded hands"]]], ["hand-prop", [[["U+270D"], "✍", "writing hand"], [["U+1F485"], "💅", "nail polish"], [["U+1F933"], "🤳", "selfie"]]], ["body-parts", [[["U+1F4AA"], "💪", "flexed biceps"], [["U+1F9BE"], "🦾", "mechanical arm"], [["U+1F9BF"], "🦿", "mechanical leg"], [["U+1F9B5"], "🦵", "leg"], [["U+1F9B6"], "🦶", "foot"], [["U+1F442"], "👂", "ear"], [["U+1F9BB"], "🦻", "ear with hearing aid"], [["U+1F443"], "👃", "nose"], [["U+1F9E0"], "🧠", "brain"], [["U+1F9B7"], "🦷", "tooth"], [["U+1F9B4"], "🦴", "bone"], [["U+1F440"], "👀", "eyes"], [["U+1F441"], "👁", "eye"], [["U+1F445"], "👅", "tongue"], [["U+1F444"], "👄", "mouth"]]], ["person", [[["U+1F476"], "👶", "baby"], [["U+1F9D2"], "🧒", "child"], [["U+1F466"], "👦", "boy"], [["U+1F467"], "👧", "girl"], [["U+1F9D1"], "🧑", "person"], [["U+1F471"], "👱", "person: blond hair"], [["U+1F468"], "👨", "man"], [["U+1F9D4"], "🧔", "man: beard"], [["U+1F468", "U+200D", "U+1F9B0"], "👨‍🦰", "man: red hair"], [["U+1F468", "U+200D", "U+1F9B1"], "👨‍🦱", "man: curly hair"], [["U+1F468", "U+200D", "U+1F9B3"], "👨‍🦳", "man: white hair"], [["U+1F468", "U+200D", "U+1F9B2"], "👨‍🦲", "man: bald"], [["U+1F469"], "👩", "woman"], [["U+1F469", "U+200D", "U+1F9B0"], "👩‍🦰", "woman: red hair"], [["U+1F9D1", "U+200D", "U+1F9B0"], "🧑‍🦰", "person: red hair"], [["U+1F469", "U+200D", "U+1F9B1"], "👩‍🦱", "woman: curly hair"], [["U+1F9D1", "U+200D", "U+1F9B1"], "🧑‍🦱", "person: curly hair"], [["U+1F469", "U+200D", "U+1F9B3"], "👩‍🦳", "woman: white hair"], [["U+1F9D1", "U+200D", "U+1F9B3"], "🧑‍🦳", "person: white hair"], [["U+1F469", "U+200D", "U+1F9B2"], "👩‍🦲", "woman: bald"], [["U+1F9D1", "U+200D", "U+1F9B2"], "🧑‍🦲", "person: bald"], [["U+1F471", "U+200D", "U+2640", "U+FE0F"], "👱‍♀️", "woman: blond hair"], [["U+1F471", "U+200D", "U+2642", "U+FE0F"], "👱‍♂️", "man: blond hair"], [["U+1F9D3"], "🧓", "older person"], [["U+1F474"], "👴", "old man"], [["U+1F475"], "👵", "old woman"]]], ["person-gesture", [[["U+1F64D"], "🙍", "person frowning"], [["U+1F64D", "U+200D", "U+2642", "U+FE0F"], "🙍‍♂️", "man frowning"], [["U+1F64D", "U+200D", "U+2640", "U+FE0F"], "🙍‍♀️", "woman frowning"], [["U+1F64E"], "🙎", "person pouting"], [["U+1F64E", "U+200D", "U+2642", "U+FE0F"], "🙎‍♂️", "man pouting"], [["U+1F64E", "U+200D", "U+2640", "U+FE0F"], "🙎‍♀️", "woman pouting"], [["U+1F645"], "🙅", "person gesturing NO"], [["U+1F645", "U+200D", "U+2642", "U+FE0F"], "🙅‍♂️", "man gesturing NO"], [["U+1F645", "U+200D", "U+2640", "U+FE0F"], "🙅‍♀️", "woman gesturing NO"], [["U+1F646"], "🙆", "person gesturing OK"], [["U+1F646", "U+200D", "U+2642", "U+FE0F"], "🙆‍♂️", "man gesturing OK"], [["U+1F646", "U+200D", "U+2640", "U+FE0F"], "🙆‍♀️", "woman gesturing OK"], [["U+1F481"], "💁", "person tipping hand"], [["U+1F481", "U+200D", "U+2642", "U+FE0F"], "💁‍♂️", "man tipping hand"], [["U+1F481", "U+200D", "U+2640", "U+FE0F"], "💁‍♀️", "woman tipping hand"], [["U+1F64B"], "🙋", "person raising hand"], [["U+1F64B", "U+200D", "U+2642", "U+FE0F"], "🙋‍♂️", "man raising hand"], [["U+1F64B", "U+200D", "U+2640", "U+FE0F"], "🙋‍♀️", "woman raising hand"], [["U+1F9CF"], "🧏", "deaf person"], [["U+1F9CF", "U+200D", "U+2642", "U+FE0F"], "🧏‍♂️", "deaf man"], [["U+1F9CF", "U+200D", "U+2640", "U+FE0F"], "🧏‍♀️", "deaf woman"], [["U+1F647"], "🙇", "person bowing"], [["U+1F647", "U+200D", "U+2642", "U+FE0F"], "🙇‍♂️", "man bowing"], [["U+1F647", "U+200D", "U+2640", "U+FE0F"], "🙇‍♀️", "woman bowing"], [["U+1F926"], "🤦", "person facepalming"], [["U+1F926", "U+200D", "U+2642", "U+FE0F"], "🤦‍♂️", "man facepalming"], [["U+1F926", "U+200D", "U+2640", "U+FE0F"], "🤦‍♀️", "woman facepalming"], [["U+1F937"], "🤷", "person shrugging"], [["U+1F937", "U+200D", "U+2642", "U+FE0F"], "🤷‍♂️", "man shrugging"], [["U+1F937", "U+200D", "U+2640", "U+FE0F"], "🤷‍♀️", "woman shrugging"]]], ["person-role", [[["U+1F9D1", "U+200D", "U+2695", "U+FE0F"], "🧑‍⚕️", "health worker"], [["U+1F468", "U+200D", "U+2695", "U+FE0F"], "👨‍⚕️", "man health worker"], [["U+1F469", "U+200D", "U+2695", "U+FE0F"], "👩‍⚕️", "woman health worker"], [["U+1F9D1", "U+200D", "U+1F393"], "🧑‍🎓", "student"], [["U+1F468", "U+200D", "U+1F393"], "👨‍🎓", "man student"], [["U+1F469", "U+200D", "U+1F393"], "👩‍🎓", "woman student"], [["U+1F9D1", "U+200D", "U+1F3EB"], "🧑‍🏫", "teacher"], [["U+1F468", "U+200D", "U+1F3EB"], "👨‍🏫", "man teacher"], [["U+1F469", "U+200D", "U+1F3EB"], "👩‍🏫", "woman teacher"], [["U+1F9D1", "U+200D", "U+2696", "U+FE0F"], "🧑‍⚖️", "judge"], [["U+1F468", "U+200D", "U+2696", "U+FE0F"], "👨‍⚖️", "man judge"], [["U+1F469", "U+200D", "U+2696", "U+FE0F"], "👩‍⚖️", "woman judge"], [["U+1F9D1", "U+200D", "U+1F33E"], "🧑‍🌾", "farmer"], [["U+1F468", "U+200D", "U+1F33E"], "👨‍🌾", "man farmer"], [["U+1F469", "U+200D", "U+1F33E"], "👩‍🌾", "woman farmer"], [["U+1F9D1", "U+200D", "U+1F373"], "🧑‍🍳", "cook"], [["U+1F468", "U+200D", "U+1F373"], "👨‍🍳", "man cook"], [["U+1F469", "U+200D", "U+1F373"], "👩‍🍳", "woman cook"], [["U+1F9D1", "U+200D", "U+1F527"], "🧑‍🔧", "mechanic"], [["U+1F468", "U+200D", "U+1F527"], "👨‍🔧", "man mechanic"], [["U+1F469", "U+200D", "U+1F527"], "👩‍🔧", "woman mechanic"], [["U+1F9D1", "U+200D", "U+1F3ED"], "🧑‍🏭", "factory worker"], [["U+1F468", "U+200D", "U+1F3ED"], "👨‍🏭", "man factory worker"], [["U+1F469", "U+200D", "U+1F3ED"], "👩‍🏭", "woman factory worker"], [["U+1F9D1", "U+200D", "U+1F4BC"], "🧑‍💼", "office worker"], [["U+1F468", "U+200D", "U+1F4BC"], "👨‍💼", "man office worker"], [["U+1F469", "U+200D", "U+1F4BC"], "👩‍💼", "woman office worker"], [["U+1F9D1", "U+200D", "U+1F52C"], "🧑‍🔬", "scientist"], [["U+1F468", "U+200D", "U+1F52C"], "👨‍🔬", "man scientist"], [["U+1F469", "U+200D", "U+1F52C"], "👩‍🔬", "woman scientist"], [["U+1F9D1", "U+200D", "U+1F4BB"], "🧑‍💻", "technologist"], [["U+1F468", "U+200D", "U+1F4BB"], "👨‍💻", "man technologist"], [["U+1F469", "U+200D", "U+1F4BB"], "👩‍💻", "woman technologist"], [["U+1F9D1", "U+200D", "U+1F3A4"], "🧑‍🎤", "singer"], [["U+1F468", "U+200D", "U+1F3A4"], "👨‍🎤", "man singer"], [["U+1F469", "U+200D", "U+1F3A4"], "👩‍🎤", "woman singer"], [["U+1F9D1", "U+200D", "U+1F3A8"], "🧑‍🎨", "artist"], [["U+1F468", "U+200D", "U+1F3A8"], "👨‍🎨", "man artist"], [["U+1F469", "U+200D", "U+1F3A8"], "👩‍🎨", "woman artist"], [["U+1F9D1", "U+200D", "U+2708", "U+FE0F"], "🧑‍✈️", "pilot"], [["U+1F468", "U+200D", "U+2708", "U+FE0F"], "👨‍✈️", "man pilot"], [["U+1F469", "U+200D", "U+2708", "U+FE0F"], "👩‍✈️", "woman pilot"], [["U+1F9D1", "U+200D", "U+1F680"], "🧑‍🚀", "astronaut"], [["U+1F468", "U+200D", "U+1F680"], "👨‍🚀", "man astronaut"], [["U+1F469", "U+200D", "U+1F680"], "👩‍🚀", "woman astronaut"], [["U+1F9D1", "U+200D", "U+1F692"], "🧑‍🚒", "firefighter"], [["U+1F468", "U+200D", "U+1F692"], "👨‍🚒", "man firefighter"], [["U+1F469", "U+200D", "U+1F692"], "👩‍🚒", "woman firefighter"], [["U+1F46E"], "👮", "police officer"], [["U+1F46E", "U+200D", "U+2642", "U+FE0F"], "👮‍♂️", "man police officer"], [["U+1F46E", "U+200D", "U+2640", "U+FE0F"], "👮‍♀️", "woman police officer"], [["U+1F575"], "🕵", "detective"], [["U+1F575", "U+FE0F", "U+200D", "U+2642", "U+FE0F"], "🕵️‍♂️", "man detective"], [["U+1F575", "U+FE0F", "U+200D", "U+2640", "U+FE0F"], "🕵️‍♀️", "woman detective"], [["U+1F482"], "💂", "guard"], [["U+1F482", "U+200D", "U+2642", "U+FE0F"], "💂‍♂️", "man guard"], [["U+1F482", "U+200D", "U+2640", "U+FE0F"], "💂‍♀️", "woman guard"], [["U+1F977"], "🥷", "⊛ ninja"], [["U+1F477"], "👷", "construction worker"], [["U+1F477", "U+200D", "U+2642", "U+FE0F"], "👷‍♂️", "man construction worker"], [["U+1F477", "U+200D", "U+2640", "U+FE0F"], "👷‍♀️", "woman construction worker"], [["U+1F934"], "🤴", "prince"], [["U+1F478"], "👸", "princess"], [["U+1F473"], "👳", "person wearing turban"], [["U+1F473", "U+200D", "U+2642", "U+FE0F"], "👳‍♂️", "man wearing turban"], [["U+1F473", "U+200D", "U+2640", "U+FE0F"], "👳‍♀️", "woman wearing turban"], [["U+1F472"], "👲", "person with skullcap"], [["U+1F9D5"], "🧕", "woman with headscarf"], [["U+1F935"], "🤵", "person in tuxedo"], [["U+1F935", "U+200D", "U+2642", "U+FE0F"], "🤵‍♂️", "⊛ man in tuxedo"], [["U+1F935", "U+200D", "U+2640", "U+FE0F"], "🤵‍♀️", "⊛ woman in tuxedo"], [["U+1F470"], "👰", "person with veil"], [["U+1F930"], "🤰", "pregnant woman"], [["U+1F931"], "🤱", "breast-feeding"]]], ["person-fantasy", [[["U+1F47C"], "👼", "baby angel"], [["U+1F385"], "🎅", "Santa Claus"], [["U+1F936"], "🤶", "Mrs. Claus"], [["U+1F9B8"], "🦸", "superhero"], [["U+1F9B8", "U+200D", "U+2642", "U+FE0F"], "🦸‍♂️", "man superhero"], [["U+1F9B8", "U+200D", "U+2640", "U+FE0F"], "🦸‍♀️", "woman superhero"], [["U+1F9B9"], "🦹", "supervillain"], [["U+1F9B9", "U+200D", "U+2642", "U+FE0F"], "🦹‍♂️", "man supervillain"], [["U+1F9B9", "U+200D", "U+2640", "U+FE0F"], "🦹‍♀️", "woman supervillain"], [["U+1F9D9"], "🧙", "mage"], [["U+1F9D9", "U+200D", "U+2642", "U+FE0F"], "🧙‍♂️", "man mage"], [["U+1F9D9", "U+200D", "U+2640", "U+FE0F"], "🧙‍♀️", "woman mage"], [["U+1F9DA"], "🧚", "fairy"], [["U+1F9DA", "U+200D", "U+2642", "U+FE0F"], "🧚‍♂️", "man fairy"], [["U+1F9DA", "U+200D", "U+2640", "U+FE0F"], "🧚‍♀️", "woman fairy"], [["U+1F9DB"], "🧛", "vampire"], [["U+1F9DB", "U+200D", "U+2642", "U+FE0F"], "🧛‍♂️", "man vampire"], [["U+1F9DB", "U+200D", "U+2640", "U+FE0F"], "🧛‍♀️", "woman vampire"], [["U+1F9DC"], "🧜", "merperson"], [["U+1F9DC", "U+200D", "U+2642", "U+FE0F"], "🧜‍♂️", "merman"], [["U+1F9DC", "U+200D", "U+2640", "U+FE0F"], "🧜‍♀️", "mermaid"], [["U+1F9DD"], "🧝", "elf"], [["U+1F9DD", "U+200D", "U+2642", "U+FE0F"], "🧝‍♂️", "man elf"], [["U+1F9DD", "U+200D", "U+2640", "U+FE0F"], "🧝‍♀️", "woman elf"], [["U+1F9DE"], "🧞", "genie"], [["U+1F9DE", "U+200D", "U+2642", "U+FE0F"], "🧞‍♂️", "man genie"], [["U+1F9DE", "U+200D", "U+2640", "U+FE0F"], "🧞‍♀️", "woman genie"], [["U+1F9DF"], "🧟", "zombie"], [["U+1F9DF", "U+200D", "U+2642", "U+FE0F"], "🧟‍♂️", "man zombie"], [["U+1F9DF", "U+200D", "U+2640", "U+FE0F"], "🧟‍♀️", "woman zombie"]]], ["person-activity", [[["U+1F486"], "💆", "person getting massage"], [["U+1F486", "U+200D", "U+2642", "U+FE0F"], "💆‍♂️", "man getting massage"], [["U+1F486", "U+200D", "U+2640", "U+FE0F"], "💆‍♀️", "woman getting massage"], [["U+1F487"], "💇", "person getting haircut"], [["U+1F487", "U+200D", "U+2642", "U+FE0F"], "💇‍♂️", "man getting haircut"], [["U+1F487", "U+200D", "U+2640", "U+FE0F"], "💇‍♀️", "woman getting haircut"], [["U+1F6B6"], "🚶", "person walking"], [["U+1F6B6", "U+200D", "U+2642", "U+FE0F"], "🚶‍♂️", "man walking"], [["U+1F6B6", "U+200D", "U+2640", "U+FE0F"], "🚶‍♀️", "woman walking"], [["U+1F9CD"], "🧍", "person standing"], [["U+1F9CD", "U+200D", "U+2642", "U+FE0F"], "🧍‍♂️", "man standing"], [["U+1F9CD", "U+200D", "U+2640", "U+FE0F"], "🧍‍♀️", "woman standing"], [["U+1F9CE"], "🧎", "person kneeling"], [["U+1F9CE", "U+200D", "U+2642", "U+FE0F"], "🧎‍♂️", "man kneeling"], [["U+1F9CE", "U+200D", "U+2640", "U+FE0F"], "🧎‍♀️", "woman kneeling"], [["U+1F9D1", "U+200D", "U+1F9AF"], "🧑‍🦯", "person with white cane"], [["U+1F468", "U+200D", "U+1F9AF"], "👨‍🦯", "man with white cane"], [["U+1F469", "U+200D", "U+1F9AF"], "👩‍🦯", "woman with white cane"], [["U+1F9D1", "U+200D", "U+1F9BC"], "🧑‍🦼", "person in motorized wheelchair"], [["U+1F468", "U+200D", "U+1F9BC"], "👨‍🦼", "man in motorized wheelchair"], [["U+1F469", "U+200D", "U+1F9BC"], "👩‍🦼", "woman in motorized wheelchair"], [["U+1F9D1", "U+200D", "U+1F9BD"], "🧑‍🦽", "person in manual wheelchair"], [["U+1F468", "U+200D", "U+1F9BD"], "👨‍🦽", "man in manual wheelchair"], [["U+1F469", "U+200D", "U+1F9BD"], "👩‍🦽", "woman in manual wheelchair"], [["U+1F3C3"], "🏃", "person running"], [["U+1F3C3", "U+200D", "U+2642", "U+FE0F"], "🏃‍♂️", "man running"], [["U+1F3C3", "U+200D", "U+2640", "U+FE0F"], "🏃‍♀️", "woman running"], [["U+1F483"], "💃", "woman dancing"], [["U+1F57A"], "🕺", "man dancing"], [["U+1F574"], "🕴", "person in suit levitating"], [["U+1F46F"], "👯", "people with bunny ears"], [["U+1F46F", "U+200D", "U+2642", "U+FE0F"], "👯‍♂️", "men with bunny ears"], [["U+1F46F", "U+200D", "U+2640", "U+FE0F"], "👯‍♀️", "women with bunny ears"], [["U+1F9D6"], "🧖", "person in steamy room"], [["U+1F9D6", "U+200D", "U+2642", "U+FE0F"], "🧖‍♂️", "man in steamy room"], [["U+1F9D6", "U+200D", "U+2640", "U+FE0F"], "🧖‍♀️", "woman in steamy room"], [["U+1F9D7"], "🧗", "person climbing"], [["U+1F9D7", "U+200D", "U+2642", "U+FE0F"], "🧗‍♂️", "man climbing"], [["U+1F9D7", "U+200D", "U+2640", "U+FE0F"], "🧗‍♀️", "woman climbing"]]], ["person-sport", [[["U+1F93A"], "🤺", "person fencing"], [["U+1F3C7"], "🏇", "horse racing"], [["U+26F7"], "⛷", "skier"], [["U+1F3C2"], "🏂", "snowboarder"], [["U+1F3CC"], "🏌", "person golfing"], [["U+1F3CC", "U+FE0F", "U+200D", "U+2642", "U+FE0F"], "🏌️‍♂️", "man golfing"], [["U+1F3CC", "U+FE0F", "U+200D", "U+2640", "U+FE0F"], "🏌️‍♀️", "woman golfing"], [["U+1F3C4"], "🏄", "person surfing"], [["U+1F3C4", "U+200D", "U+2642", "U+FE0F"], "🏄‍♂️", "man surfing"], [["U+1F3C4", "U+200D", "U+2640", "U+FE0F"], "🏄‍♀️", "woman surfing"], [["U+1F6A3"], "🚣", "person rowing boat"], [["U+1F6A3", "U+200D", "U+2642", "U+FE0F"], "🚣‍♂️", "man rowing boat"], [["U+1F6A3", "U+200D", "U+2640", "U+FE0F"], "🚣‍♀️", "woman rowing boat"], [["U+1F3CA"], "🏊", "person swimming"], [["U+1F3CA", "U+200D", "U+2642", "U+FE0F"], "🏊‍♂️", "man swimming"], [["U+1F3CA", "U+200D", "U+2640", "U+FE0F"], "🏊‍♀️", "woman swimming"], [["U+26F9"], "⛹", "person bouncing ball"], [["U+26F9", "U+FE0F", "U+200D", "U+2642", "U+FE0F"], "⛹️‍♂️", "man bouncing ball"], [["U+26F9", "U+FE0F", "U+200D", "U+2640", "U+FE0F"], "⛹️‍♀️", "woman bouncing ball"], [["U+1F3CB"], "🏋", "person lifting weights"], [["U+1F3CB", "U+FE0F", "U+200D", "U+2642", "U+FE0F"], "🏋️‍♂️", "man lifting weights"], [["U+1F3CB", "U+FE0F", "U+200D", "U+2640", "U+FE0F"], "🏋️‍♀️", "woman lifting weights"], [["U+1F6B4"], "🚴", "person biking"], [["U+1F6B4", "U+200D", "U+2642", "U+FE0F"], "🚴‍♂️", "man biking"], [["U+1F6B4", "U+200D", "U+2640", "U+FE0F"], "🚴‍♀️", "woman biking"], [["U+1F6B5"], "🚵", "person mountain biking"], [["U+1F6B5", "U+200D", "U+2642", "U+FE0F"], "🚵‍♂️", "man mountain biking"], [["U+1F6B5", "U+200D", "U+2640", "U+FE0F"], "🚵‍♀️", "woman mountain biking"], [["U+1F938"], "🤸", "person cartwheeling"], [["U+1F938", "U+200D", "U+2642", "U+FE0F"], "🤸‍♂️", "man cartwheeling"], [["U+1F938", "U+200D", "U+2640", "U+FE0F"], "🤸‍♀️", "woman cartwheeling"], [["U+1F93C"], "🤼", "people wrestling"], [["U+1F93C", "U+200D", "U+2642", "U+FE0F"], "🤼‍♂️", "men wrestling"], [["U+1F93C", "U+200D", "U+2640", "U+FE0F"], "🤼‍♀️", "women wrestling"], [["U+1F93D"], "🤽", "person playing water polo"], [["U+1F93D", "U+200D", "U+2642", "U+FE0F"], "🤽‍♂️", "man playing water polo"], [["U+1F93D", "U+200D", "U+2640", "U+FE0F"], "🤽‍♀️", "woman playing water polo"], [["U+1F93E"], "🤾", "person playing handball"], [["U+1F93E", "U+200D", "U+2642", "U+FE0F"], "🤾‍♂️", "man playing handball"], [["U+1F93E", "U+200D", "U+2640", "U+FE0F"], "🤾‍♀️", "woman playing handball"], [["U+1F939"], "🤹", "person juggling"], [["U+1F939", "U+200D", "U+2642", "U+FE0F"], "🤹‍♂️", "man juggling"], [["U+1F939", "U+200D", "U+2640", "U+FE0F"], "🤹‍♀️", "woman juggling"]]], ["person-resting", [[["U+1F9D8"], "🧘", "person in lotus position"], [["U+1F9D8", "U+200D", "U+2642", "U+FE0F"], "🧘‍♂️", "man in lotus position"], [["U+1F9D8", "U+200D", "U+2640", "U+FE0F"], "🧘‍♀️", "woman in lotus position"], [["U+1F6C0"], "🛀", "person taking bath"], [["U+1F6CC"], "🛌", "person in bed"]]], ["family", [[["U+1F9D1", "U+200D", "U+1F91D", "U+200D", "U+1F9D1"], "🧑‍🤝‍🧑", "people holding hands"], [["U+1F46D"], "👭", "women holding hands"], [["U+1F46B"], "👫", "woman and man holding hands"], [["U+1F46C"], "👬", "men holding hands"], [["U+1F48F"], "💏", "kiss"], [["U+1F469", "U+200D", "U+2764", "U+FE0F", "U+200D", "U+1F48B", "U+200D", "U+1F468"], "👩‍❤️‍💋‍👨", "kiss: woman, man"], [["U+1F468", "U+200D", "U+2764", "U+FE0F", "U+200D", "U+1F48B", "U+200D", "U+1F468"], "👨‍❤️‍💋‍👨", "kiss: man, man"], [["U+1F469", "U+200D", "U+2764", "U+FE0F", "U+200D", "U+1F48B", "U+200D", "U+1F469"], "👩‍❤️‍💋‍👩", "kiss: woman, woman"], [["U+1F491"], "💑", "couple with heart"], [["U+1F469", "U+200D", "U+2764", "U+FE0F", "U+200D", "U+1F468"], "👩‍❤️‍👨", "couple with heart: woman, man"], [["U+1F468", "U+200D", "U+2764", "U+FE0F", "U+200D", "U+1F468"], "👨‍❤️‍👨", "couple with heart: man, man"], [["U+1F469", "U+200D", "U+2764", "U+FE0F", "U+200D", "U+1F469"], "👩‍❤️‍👩", "couple with heart: woman, woman"], [["U+1F46A"], "👪", "family"], [["U+1F468", "U+200D", "U+1F469", "U+200D", "U+1F466"], "👨‍👩‍👦", "family: man, woman, boy"], [["U+1F468", "U+200D", "U+1F469", "U+200D", "U+1F467"], "👨‍👩‍👧", "family: man, woman, girl"], [["U+1F468", "U+200D", "U+1F469", "U+200D", "U+1F467", "U+200D", "U+1F466"], "👨‍👩‍👧‍👦", "family: man, woman, girl, boy"], [["U+1F468", "U+200D", "U+1F469", "U+200D", "U+1F466", "U+200D", "U+1F466"], "👨‍👩‍👦‍👦", "family: man, woman, boy, boy"], [["U+1F468", "U+200D", "U+1F469", "U+200D", "U+1F467", "U+200D", "U+1F467"], "👨‍👩‍👧‍👧", "family: man, woman, girl, girl"], [["U+1F468", "U+200D", "U+1F468", "U+200D", "U+1F466"], "👨‍👨‍👦", "family: man, man, boy"], [["U+1F468", "U+200D", "U+1F468", "U+200D", "U+1F467"], "👨‍👨‍👧", "family: man, man, girl"], [["U+1F468", "U+200D", "U+1F468", "U+200D", "U+1F467", "U+200D", "U+1F466"], "👨‍👨‍👧‍👦", "family: man, man, girl, boy"], [["U+1F468", "U+200D", "U+1F468", "U+200D", "U+1F466", "U+200D", "U+1F466"], "👨‍👨‍👦‍👦", "family: man, man, boy, boy"], [["U+1F468", "U+200D", "U+1F468", "U+200D", "U+1F467", "U+200D", "U+1F467"], "👨‍👨‍👧‍👧", "family: man, man, girl, girl"], [["U+1F469", "U+200D", "U+1F469", "U+200D", "U+1F466"], "👩‍👩‍👦", "family: woman, woman, boy"], [["U+1F469", "U+200D", "U+1F469", "U+200D", "U+1F467"], "👩‍👩‍👧", "family: woman, woman, girl"], [["U+1F469", "U+200D", "U+1F469", "U+200D", "U+1F467", "U+200D", "U+1F466"], "👩‍👩‍👧‍👦", "family: woman, woman, girl, boy"], [["U+1F469", "U+200D", "U+1F469", "U+200D", "U+1F466", "U+200D", "U+1F466"], "👩‍👩‍👦‍👦", "family: woman, woman, boy, boy"], [["U+1F469", "U+200D", "U+1F469", "U+200D", "U+1F467", "U+200D", "U+1F467"], "👩‍👩‍👧‍👧", "family: woman, woman, girl, girl"], [["U+1F468", "U+200D", "U+1F466"], "👨‍👦", "family: man, boy"], [["U+1F468", "U+200D", "U+1F466", "U+200D", "U+1F466"], "👨‍👦‍👦", "family: man, boy, boy"], [["U+1F468", "U+200D", "U+1F467"], "👨‍👧", "family: man, girl"], [["U+1F468", "U+200D", "U+1F467", "U+200D", "U+1F466"], "👨‍👧‍👦", "family: man, girl, boy"], [["U+1F468", "U+200D", "U+1F467", "U+200D", "U+1F467"], "👨‍👧‍👧", "family: man, girl, girl"], [["U+1F469", "U+200D", "U+1F466"], "👩‍👦", "family: woman, boy"], [["U+1F469", "U+200D", "U+1F466", "U+200D", "U+1F466"], "👩‍👦‍👦", "family: woman, boy, boy"], [["U+1F469", "U+200D", "U+1F467"], "👩‍👧", "family: woman, girl"], [["U+1F469", "U+200D", "U+1F467", "U+200D", "U+1F466"], "👩‍👧‍👦", "family: woman, girl, boy"], [["U+1F469", "U+200D", "U+1F467", "U+200D", "U+1F467"], "👩‍👧‍👧", "family: woman, girl, girl"]]], ["person-symbol", [[["U+1F5E3"], "🗣", "speaking head"], [["U+1F464"], "👤", "bust in silhouette"], [["U+1F465"], "👥", "busts in silhouette"], [["U+1FAC2"], "🫂", "⊛ people hugging"], [["U+1F463"], "👣", "footprints"]]]]], ["Component", [["hair-style", [[["U+1F9B0"], "🦰", "red hair"], [["U+1F9B1"], "🦱", "curly hair"], [["U+1F9B3"], "🦳", "white hair"], [["U+1F9B2"], "🦲", "bald"]]]]], ["Animals & Nature", [["animal-mammal", [[["U+1F435"], "🐵", "monkey face"], [["U+1F412"], "🐒", "monkey"], [["U+1F98D"], "🦍", "gorilla"], [["U+1F9A7"], "🦧", "orangutan"], [["U+1F436"], "🐶", "dog face"], [["U+1F415"], "🐕", "dog"], [["U+1F9AE"], "🦮", "guide dog"], [["U+1F415", "U+200D", "U+1F9BA"], "🐕‍🦺", "service dog"], [["U+1F429"], "🐩", "poodle"], [["U+1F43A"], "🐺", "wolf"], [["U+1F98A"], "🦊", "fox"], [["U+1F99D"], "🦝", "raccoon"], [["U+1F431"], "🐱", "cat face"], [["U+1F408"], "🐈", "cat"], [["U+1F981"], "🦁", "lion"], [["U+1F42F"], "🐯", "tiger face"], [["U+1F405"], "🐅", "tiger"], [["U+1F406"], "🐆", "leopard"], [["U+1F434"], "🐴", "horse face"], [["U+1F40E"], "🐎", "horse"], [["U+1F984"], "🦄", "unicorn"], [["U+1F993"], "🦓", "zebra"], [["U+1F98C"], "🦌", "deer"], [["U+1F42E"], "🐮", "cow face"], [["U+1F402"], "🐂", "ox"], [["U+1F403"], "🐃", "water buffalo"], [["U+1F404"], "🐄", "cow"], [["U+1F437"], "🐷", "pig face"], [["U+1F416"], "🐖", "pig"], [["U+1F417"], "🐗", "boar"], [["U+1F43D"], "🐽", "pig nose"], [["U+1F40F"], "🐏", "ram"], [["U+1F411"], "🐑", "ewe"], [["U+1F410"], "🐐", "goat"], [["U+1F42A"], "🐪", "camel"], [["U+1F42B"], "🐫", "two-hump camel"], [["U+1F999"], "🦙", "llama"], [["U+1F992"], "🦒", "giraffe"], [["U+1F418"], "🐘", "elephant"], [["U+1F98F"], "🦏", "rhinoceros"], [["U+1F99B"], "🦛", "hippopotamus"], [["U+1F42D"], "🐭", "mouse face"], [["U+1F401"], "🐁", "mouse"], [["U+1F400"], "🐀", "rat"], [["U+1F439"], "🐹", "hamster"], [["U+1F430"], "🐰", "rabbit face"], [["U+1F407"], "🐇", "rabbit"], [["U+1F43F"], "🐿", "chipmunk"], [["U+1F994"], "🦔", "hedgehog"], [["U+1F987"], "🦇", "bat"], [["U+1F43B"], "🐻", "bear"], [["U+1F43B", "U+200D", "U+2744", "U+FE0F"], "🐻‍❄️", "⊛ polar bear"], [["U+1F428"], "🐨", "koala"], [["U+1F43C"], "🐼", "panda"], [["U+1F9A5"], "🦥", "sloth"], [["U+1F9A6"], "🦦", "otter"], [["U+1F9A8"], "🦨", "skunk"], [["U+1F998"], "🦘", "kangaroo"], [["U+1F9A1"], "🦡", "badger"], [["U+1F43E"], "🐾", "paw prints"]]], ["animal-bird", [[["U+1F983"], "🦃", "turkey"], [["U+1F414"], "🐔", "chicken"], [["U+1F413"], "🐓", "rooster"], [["U+1F423"], "🐣", "hatching chick"], [["U+1F424"], "🐤", "baby chick"], [["U+1F425"], "🐥", "front-facing baby chick"], [["U+1F426"], "🐦", "bird"], [["U+1F427"], "🐧", "penguin"], [["U+1F54A"], "🕊", "dove"], [["U+1F985"], "🦅", "eagle"], [["U+1F986"], "🦆", "duck"], [["U+1F9A2"], "🦢", "swan"], [["U+1F989"], "🦉", "owl"], [["U+1FAB6"], "🪶", "⊛ feather"], [["U+1F9A9"], "🦩", "flamingo"], [["U+1F99A"], "🦚", "peacock"], [["U+1F99C"], "🦜", "parrot"]]], ["animal-amphibian", [[["U+1F438"], "🐸", "frog"]]], ["animal-reptile", [[["U+1F40A"], "🐊", "crocodile"], [["U+1F422"], "🐢", "turtle"], [["U+1F98E"], "🦎", "lizard"], [["U+1F40D"], "🐍", "snake"], [["U+1F432"], "🐲", "dragon face"], [["U+1F409"], "🐉", "dragon"], [["U+1F995"], "🦕", "sauropod"], [["U+1F996"], "🦖", "T-Rex"]]], ["animal-marine", [[["U+1F433"], "🐳", "spouting whale"], [["U+1F40B"], "🐋", "whale"], [["U+1F42C"], "🐬", "dolphin"], [["U+1F41F"], "🐟", "fish"], [["U+1F420"], "🐠", "tropical fish"], [["U+1F421"], "🐡", "blowfish"], [["U+1F988"], "🦈", "shark"], [["U+1F419"], "🐙", "octopus"], [["U+1F41A"], "🐚", "spiral shell"]]], ["animal-bug", [[["U+1F40C"], "🐌", "snail"], [["U+1F98B"], "🦋", "butterfly"], [["U+1F41B"], "🐛", "bug"], [["U+1F41C"], "🐜", "ant"], [["U+1F41D"], "🐝", "honeybee"], [["U+1F41E"], "🐞", "lady beetle"], [["U+1F997"], "🦗", "cricket"], [["U+1F577"], "🕷", "spider"], [["U+1F578"], "🕸", "spider web"], [["U+1F982"], "🦂", "scorpion"], [["U+1F99F"], "🦟", "mosquito"], [["U+1F9A0"], "🦠", "microbe"]]], ["plant-flower", [[["U+1F490"], "💐", "bouquet"], [["U+1F338"], "🌸", "cherry blossom"], [["U+1F4AE"], "💮", "white flower"], [["U+1F3F5"], "🏵", "rosette"], [["U+1F339"], "🌹", "rose"], [["U+1F940"], "🥀", "wilted flower"], [["U+1F33A"], "🌺", "hibiscus"], [["U+1F33B"], "🌻", "sunflower"], [["U+1F33C"], "🌼", "blossom"], [["U+1F337"], "🌷", "tulip"]]], ["plant-other", [[["U+1F331"], "🌱", "seedling"], [["U+1FAB4"], "🪴", "⊛ potted plant"], [["U+1F332"], "🌲", "evergreen tree"], [["U+1F333"], "🌳", "deciduous tree"], [["U+1F334"], "🌴", "palm tree"], [["U+1F335"], "🌵", "cactus"], [["U+1F33E"], "🌾", "sheaf of rice"], [["U+1F33F"], "🌿", "herb"], [["U+2618"], "☘", "shamrock"], [["U+1F340"], "🍀", "four leaf clover"], [["U+1F341"], "🍁", "maple leaf"], [["U+1F342"], "🍂", "fallen leaf"], [["U+1F343"], "🍃", "leaf fluttering in wind"]]]]], ["Food & Drink", [["food-fruit", [[["U+1F347"], "🍇", "grapes"], [["U+1F348"], "🍈", "melon"], [["U+1F349"], "🍉", "watermelon"], [["U+1F34A"], "🍊", "tangerine"], [["U+1F34B"], "🍋", "lemon"], [["U+1F34C"], "🍌", "banana"], [["U+1F34D"], "🍍", "pineapple"], [["U+1F96D"], "🥭", "mango"], [["U+1F34E"], "🍎", "red apple"], [["U+1F34F"], "🍏", "green apple"], [["U+1F350"], "🍐", "pear"], [["U+1F351"], "🍑", "peach"], [["U+1F352"], "🍒", "cherries"], [["U+1F353"], "🍓", "strawberry"], [["U+1FAD0"], "🫐", "⊛ blueberries"], [["U+1F95D"], "🥝", "kiwi fruit"], [["U+1F345"], "🍅", "tomato"], [["U+1FAD2"], "🫒", "⊛ olive"], [["U+1F965"], "🥥", "coconut"]]], ["food-vegetable", [[["U+1F951"], "🥑", "avocado"], [["U+1F346"], "🍆", "eggplant"], [["U+1F954"], "🥔", "potato"], [["U+1F955"], "🥕", "carrot"], [["U+1F33D"], "🌽", "ear of corn"], [["U+1F336"], "🌶", "hot pepper"], [["U+1F952"], "🥒", "cucumber"], [["U+1F96C"], "🥬", "leafy green"], [["U+1F966"], "🥦", "broccoli"], [["U+1F9C4"], "🧄", "garlic"], [["U+1F9C5"], "🧅", "onion"], [["U+1F344"], "🍄", "mushroom"], [["U+1F95C"], "🥜", "peanuts"], [["U+1F330"], "🌰", "chestnut"]]], ["food-prepared", [[["U+1F35E"], "🍞", "bread"], [["U+1F950"], "🥐", "croissant"], [["U+1F956"], "🥖", "baguette bread"], [["U+1FAD3"], "🫓", "⊛ flatbread"], [["U+1F968"], "🥨", "pretzel"], [["U+1F96F"], "🥯", "bagel"], [["U+1F95E"], "🥞", "pancakes"], [["U+1F9C7"], "🧇", "waffle"], [["U+1F9C0"], "🧀", "cheese wedge"], [["U+1F356"], "🍖", "meat on bone"], [["U+1F357"], "🍗", "poultry leg"], [["U+1F969"], "🥩", "cut of meat"], [["U+1F953"], "🥓", "bacon"], [["U+1F354"], "🍔", "hamburger"], [["U+1F35F"], "🍟", "french fries"], [["U+1F355"], "🍕", "pizza"], [["U+1F32D"], "🌭", "hot dog"], [["U+1F96A"], "🥪", "sandwich"], [["U+1F32E"], "🌮", "taco"], [["U+1F32F"], "🌯", "burrito"], [["U+1FAD4"], "🫔", "⊛ tamale"], [["U+1F959"], "🥙", "stuffed flatbread"], [["U+1F9C6"], "🧆", "falafel"], [["U+1F95A"], "🥚", "egg"], [["U+1F373"], "🍳", "cooking"], [["U+1F958"], "🥘", "shallow pan of food"], [["U+1F372"], "🍲", "pot of food"], [["U+1FAD5"], "🫕", "⊛ fondue"], [["U+1F963"], "🥣", "bowl with spoon"], [["U+1F957"], "🥗", "green salad"], [["U+1F37F"], "🍿", "popcorn"], [["U+1F9C8"], "🧈", "butter"], [["U+1F9C2"], "🧂", "salt"], [["U+1F96B"], "🥫", "canned food"]]], ["food-asian", [[["U+1F371"], "🍱", "bento box"], [["U+1F358"], "🍘", "rice cracker"], [["U+1F359"], "🍙", "rice ball"], [["U+1F35A"], "🍚", "cooked rice"], [["U+1F35B"], "🍛", "curry rice"], [["U+1F35C"], "🍜", "steaming bowl"], [["U+1F35D"], "🍝", "spaghetti"], [["U+1F360"], "🍠", "roasted sweet potato"], [["U+1F362"], "🍢", "oden"], [["U+1F363"], "🍣", "sushi"], [["U+1F364"], "🍤", "fried shrimp"], [["U+1F365"], "🍥", "fish cake with swirl"], [["U+1F96E"], "🥮", "moon cake"], [["U+1F361"], "🍡", "dango"], [["U+1F95F"], "🥟", "dumpling"], [["U+1F960"], "🥠", "fortune cookie"], [["U+1F961"], "🥡", "takeout box"]]], ["food-marine", [[["U+1F980"], "🦀", "crab"], [["U+1F99E"], "🦞", "lobster"], [["U+1F990"], "🦐", "shrimp"], [["U+1F991"], "🦑", "squid"], [["U+1F9AA"], "🦪", "oyster"]]], ["food-sweet", [[["U+1F366"], "🍦", "soft ice cream"], [["U+1F367"], "🍧", "shaved ice"], [["U+1F368"], "🍨", "ice cream"], [["U+1F369"], "🍩", "doughnut"], [["U+1F36A"], "🍪", "cookie"], [["U+1F382"], "🎂", "birthday cake"], [["U+1F370"], "🍰", "shortcake"], [["U+1F9C1"], "🧁", "cupcake"], [["U+1F967"], "🥧", "pie"], [["U+1F36B"], "🍫", "chocolate bar"], [["U+1F36C"], "🍬", "candy"], [["U+1F36D"], "🍭", "lollipop"], [["U+1F36E"], "🍮", "custard"], [["U+1F36F"], "🍯", "honey pot"]]], ["drink", [[["U+1F37C"], "🍼", "baby bottle"], [["U+1F95B"], "🥛", "glass of milk"], [["U+2615"], "☕", "hot beverage"], [["U+1F375"], "🍵", "teacup without handle"], [["U+1F376"], "🍶", "sake"], [["U+1F37E"], "🍾", "bottle with popping cork"], [["U+1F377"], "🍷", "wine glass"], [["U+1F378"], "🍸", "cocktail glass"], [["U+1F379"], "🍹", "tropical drink"], [["U+1F37A"], "🍺", "beer mug"], [["U+1F37B"], "🍻", "clinking beer mugs"], [["U+1F942"], "🥂", "clinking glasses"], [["U+1F943"], "🥃", "tumbler glass"], [["U+1F964"], "🥤", "cup with straw"], [["U+1F9CB"], "🧋", "⊛ bubble tea"], [["U+1F9C3"], "🧃", "beverage box"], [["U+1F9C9"], "🧉", "mate"], [["U+1F9CA"], "🧊", "ice"]]], ["dishware", [[["U+1F962"], "🥢", "chopsticks"], [["U+1F37D"], "🍽", "fork and knife with plate"], [["U+1F374"], "🍴", "fork and knife"], [["U+1F944"], "🥄", "spoon"], [["U+1F52A"], "🔪", "kitchen knife"], [["U+1F3FA"], "🏺", "amphora"]]]]], ["Travel & Places", [["place-map", [[["U+1F30D"], "🌍", "globe showing Europe-Africa"], [["U+1F30E"], "🌎", "globe showing Americas"], [["U+1F30F"], "🌏", "globe showing Asia-Australia"], [["U+1F310"], "🌐", "globe with meridians"], [["U+1F5FA"], "🗺", "world map"], [["U+1F5FE"], "🗾", "map of Japan"], [["U+1F9ED"], "🧭", "compass"]]], ["place-geographic", [[["U+1F3D4"], "🏔", "snow-capped mountain"], [["U+26F0"], "⛰", "mountain"], [["U+1F30B"], "🌋", "volcano"], [["U+1F5FB"], "🗻", "mount fuji"], [["U+1F3D5"], "🏕", "camping"], [["U+1F3D6"], "🏖", "beach with umbrella"], [["U+1F3DC"], "🏜", "desert"], [["U+1F3DD"], "🏝", "desert island"], [["U+1F3DE"], "🏞", "national park"]]], ["place-building", [[["U+1F3DF"], "🏟", "stadium"], [["U+1F3DB"], "🏛", "classical building"], [["U+1F3D7"], "🏗", "building construction"], [["U+1F9F1"], "🧱", "brick"], [["U+1FAA8"], "🪨", "⊛ rock"], [["U+1FAB5"], "🪵", "⊛ wood"], [["U+1F3D8"], "🏘", "houses"], [["U+1F3DA"], "🏚", "derelict house"], [["U+1F3E0"], "🏠", "house"], [["U+1F3E1"], "🏡", "house with garden"], [["U+1F3E2"], "🏢", "office building"], [["U+1F3E3"], "🏣", "Japanese post office"], [["U+1F3E4"], "🏤", "post office"], [["U+1F3E5"], "🏥", "hospital"], [["U+1F3E6"], "🏦", "bank"], [["U+1F3E8"], "🏨", "hotel"], [["U+1F3E9"], "🏩", "love hotel"], [["U+1F3EA"], "🏪", "convenience store"], [["U+1F3EB"], "🏫", "school"], [["U+1F3EC"], "🏬", "department store"], [["U+1F3ED"], "🏭", "factory"], [["U+1F3EF"], "🏯", "Japanese castle"], [["U+1F3F0"], "🏰", "castle"], [["U+1F492"], "💒", "wedding"], [["U+1F5FC"], "🗼", "Tokyo tower"], [["U+1F5FD"], "🗽", "Statue of Liberty"]]], ["place-religious", [[["U+26EA"], "⛪", "church"], [["U+1F54C"], "🕌", "mosque"], [["U+1F6D5"], "🛕", "hindu temple"], [["U+1F54D"], "🕍", "synagogue"], [["U+26E9"], "⛩", "shinto shrine"], [["U+1F54B"], "🕋", "kaaba"]]], ["place-other", [[["U+26F2"], "⛲", "fountain"], [["U+26FA"], "⛺", "tent"], [["U+1F301"], "🌁", "foggy"], [["U+1F303"], "🌃", "night with stars"], [["U+1F3D9"], "🏙", "cityscape"], [["U+1F304"], "🌄", "sunrise over mountains"], [["U+1F305"], "🌅", "sunrise"], [["U+1F306"], "🌆", "cityscape at dusk"], [["U+1F307"], "🌇", "sunset"], [["U+1F309"], "🌉", "bridge at night"], [["U+2668"], "♨", "hot springs"], [["U+1F3A0"], "🎠", "carousel horse"], [["U+1F3A1"], "🎡", "ferris wheel"], [["U+1F3A2"], "🎢", "roller coaster"], [["U+1F488"], "💈", "barber pole"], [["U+1F3AA"], "🎪", "circus tent"]]], ["transport-ground", [[["U+1F682"], "🚂", "locomotive"], [["U+1F683"], "🚃", "railway car"], [["U+1F684"], "🚄", "high-speed train"], [["U+1F685"], "🚅", "bullet train"], [["U+1F686"], "🚆", "train"], [["U+1F687"], "🚇", "metro"], [["U+1F688"], "🚈", "light rail"], [["U+1F689"], "🚉", "station"], [["U+1F68A"], "🚊", "tram"], [["U+1F69D"], "🚝", "monorail"], [["U+1F69E"], "🚞", "mountain railway"], [["U+1F68B"], "🚋", "tram car"], [["U+1F68C"], "🚌", "bus"], [["U+1F68D"], "🚍", "oncoming bus"], [["U+1F68E"], "🚎", "trolleybus"], [["U+1F690"], "🚐", "minibus"], [["U+1F691"], "🚑", "ambulance"], [["U+1F692"], "🚒", "fire engine"], [["U+1F693"], "🚓", "police car"], [["U+1F694"], "🚔", "oncoming police car"], [["U+1F695"], "🚕", "taxi"], [["U+1F696"], "🚖", "oncoming taxi"], [["U+1F697"], "🚗", "automobile"], [["U+1F698"], "🚘", "oncoming automobile"], [["U+1F699"], "🚙", "sport utility vehicle"], [["U+1F69A"], "🚚", "delivery truck"], [["U+1F69B"], "🚛", "articulated lorry"], [["U+1F69C"], "🚜", "tractor"], [["U+1F3CE"], "🏎", "racing car"], [["U+1F3CD"], "🏍", "motorcycle"], [["U+1F6F5"], "🛵", "motor scooter"], [["U+1F9BD"], "🦽", "manual wheelchair"], [["U+1F9BC"], "🦼", "motorized wheelchair"], [["U+1F6FA"], "🛺", "auto rickshaw"], [["U+1F6B2"], "🚲", "bicycle"], [["U+1F6F4"], "🛴", "kick scooter"], [["U+1F6F9"], "🛹", "skateboard"], [["U+1F6FC"], "🛼", "⊛ roller skate"], [["U+1F68F"], "🚏", "bus stop"], [["U+1F6E3"], "🛣", "motorway"], [["U+1F6E4"], "🛤", "railway track"], [["U+1F6E2"], "🛢", "oil drum"], [["U+26FD"], "⛽", "fuel pump"], [["U+1F6A8"], "🚨", "police car light"], [["U+1F6A5"], "🚥", "horizontal traffic light"], [["U+1F6A6"], "🚦", "vertical traffic light"], [["U+1F6D1"], "🛑", "stop sign"], [["U+1F6A7"], "🚧", "construction"]]], ["transport-water", [[["U+2693"], "⚓", "anchor"], [["U+26F5"], "⛵", "sailboat"], [["U+1F6F6"], "🛶", "canoe"], [["U+1F6A4"], "🚤", "speedboat"], [["U+1F6F3"], "🛳", "passenger ship"], [["U+26F4"], "⛴", "ferry"], [["U+1F6E5"], "🛥", "motor boat"], [["U+1F6A2"], "🚢", "ship"]]], ["transport-air", [[["U+2708"], "✈", "airplane"], [["U+1F6E9"], "🛩", "small airplane"], [["U+1F6EB"], "🛫", "airplane departure"], [["U+1F6EC"], "🛬", "airplane arrival"], [["U+1FA82"], "🪂", "parachute"], [["U+1F4BA"], "💺", "seat"], [["U+1F681"], "🚁", "helicopter"], [["U+1F69F"], "🚟", "suspension railway"], [["U+1F6A0"], "🚠", "mountain cableway"], [["U+1F6A1"], "🚡", "aerial tramway"], [["U+1F6F0"], "🛰", "satellite"], [["U+1F680"], "🚀", "rocket"], [["U+1F6F8"], "🛸", "flying saucer"]]], ["hotel", [[["U+1F6CE"], "🛎", "bellhop bell"], [["U+1F9F3"], "🧳", "luggage"]]], ["time", [[["U+231B"], "⌛", "hourglass done"], [["U+23F3"], "⏳", "hourglass not done"], [["U+231A"], "⌚", "watch"], [["U+23F0"], "⏰", "alarm clock"], [["U+23F1"], "⏱", "stopwatch"], [["U+23F2"], "⏲", "timer clock"], [["U+1F570"], "🕰", "mantelpiece clock"], [["U+1F55B"], "🕛", "twelve o’clock"], [["U+1F567"], "🕧", "twelve-thirty"], [["U+1F550"], "🕐", "one o’clock"], [["U+1F55C"], "🕜", "one-thirty"], [["U+1F551"], "🕑", "two o’clock"], [["U+1F55D"], "🕝", "two-thirty"], [["U+1F552"], "🕒", "three o’clock"], [["U+1F55E"], "🕞", "three-thirty"], [["U+1F553"], "🕓", "four o’clock"], [["U+1F55F"], "🕟", "four-thirty"], [["U+1F554"], "🕔", "five o’clock"], [["U+1F560"], "🕠", "five-thirty"], [["U+1F555"], "🕕", "six o’clock"], [["U+1F561"], "🕡", "six-thirty"], [["U+1F556"], "🕖", "seven o’clock"], [["U+1F562"], "🕢", "seven-thirty"], [["U+1F557"], "🕗", "eight o’clock"], [["U+1F563"], "🕣", "eight-thirty"], [["U+1F558"], "🕘", "nine o’clock"], [["U+1F564"], "🕤", "nine-thirty"], [["U+1F559"], "🕙", "ten o’clock"], [["U+1F565"], "🕥", "ten-thirty"], [["U+1F55A"], "🕚", "eleven o’clock"], [["U+1F566"], "🕦", "eleven-thirty"]]], ["sky & weather", [[["U+1F311"], "🌑", "new moon"], [["U+1F312"], "🌒", "waxing crescent moon"], [["U+1F313"], "🌓", "first quarter moon"], [["U+1F314"], "🌔", "waxing gibbous moon"], [["U+1F315"], "🌕", "full moon"], [["U+1F316"], "🌖", "waning gibbous moon"], [["U+1F317"], "🌗", "last quarter moon"], [["U+1F318"], "🌘", "waning crescent moon"], [["U+1F319"], "🌙", "crescent moon"], [["U+1F31A"], "🌚", "new moon face"], [["U+1F31B"], "🌛", "first quarter moon face"], [["U+1F31C"], "🌜", "last quarter moon face"], [["U+1F321"], "🌡", "thermometer"], [["U+2600"], "☀", "sun"], [["U+1F31D"], "🌝", "full moon face"], [["U+1F31E"], "🌞", "sun with face"], [["U+1FA90"], "🪐", "ringed planet"], [["U+2B50"], "⭐", "star"], [["U+1F31F"], "🌟", "glowing star"], [["U+1F320"], "🌠", "shooting star"], [["U+1F30C"], "🌌", "milky way"], [["U+2601"], "☁", "cloud"], [["U+26C5"], "⛅", "sun behind cloud"], [["U+26C8"], "⛈", "cloud with lightning and rain"], [["U+1F324"], "🌤", "sun behind small cloud"], [["U+1F325"], "🌥", "sun behind large cloud"], [["U+1F326"], "🌦", "sun behind rain cloud"], [["U+1F327"], "🌧", "cloud with rain"], [["U+1F328"], "🌨", "cloud with snow"], [["U+1F329"], "🌩", "cloud with lightning"], [["U+1F32A"], "🌪", "tornado"], [["U+1F32B"], "🌫", "fog"], [["U+1F32C"], "🌬", "wind face"], [["U+1F300"], "🌀", "cyclone"], [["U+1F308"], "🌈", "rainbow"], [["U+1F302"], "🌂", "closed umbrella"], [["U+2602"], "☂", "umbrella"], [["U+2614"], "☔", "umbrella with rain drops"], [["U+26F1"], "⛱", "umbrella on ground"], [["U+26A1"], "⚡", "high voltage"], [["U+2744"], "❄", "snowflake"], [["U+2603"], "☃", "snowman"], [["U+26C4"], "⛄", "snowman without snow"], [["U+2604"], "☄", "comet"], [["U+1F525"], "🔥", "fire"], [["U+1F4A7"], "💧", "droplet"], [["U+1F30A"], "🌊", "water wave"]]]]], ["Activities", [["event", [[["U+1F383"], "🎃", "jack-o-lantern"], [["U+1F384"], "🎄", "Christmas tree"], [["U+1F386"], "🎆", "fireworks"], [["U+1F387"], "🎇", "sparkler"], [["U+1F9E8"], "🧨", "firecracker"], [["U+2728"], "✨", "sparkles"], [["U+1F388"], "🎈", "balloon"], [["U+1F389"], "🎉", "party popper"], [["U+1F38A"], "🎊", "confetti ball"], [["U+1F38B"], "🎋", "tanabata tree"], [["U+1F38D"], "🎍", "pine decoration"], [["U+1F38E"], "🎎", "Japanese dolls"], [["U+1F38F"], "🎏", "carp streamer"], [["U+1F390"], "🎐", "wind chime"], [["U+1F391"], "🎑", "moon viewing ceremony"], [["U+1F9E7"], "🧧", "red envelope"], [["U+1F380"], "🎀", "ribbon"], [["U+1F381"], "🎁", "wrapped gift"], [["U+1F397"], "🎗", "reminder ribbon"], [["U+1F39F"], "🎟", "admission tickets"], [["U+1F3AB"], "🎫", "ticket"]]], ["award-medal", [[["U+1F396"], "🎖", "military medal"], [["U+1F3C6"], "🏆", "trophy"], [["U+1F3C5"], "🏅", "sports medal"], [["U+1F947"], "🥇", "1st place medal"], [["U+1F948"], "🥈", "2nd place medal"], [["U+1F949"], "🥉", "3rd place medal"]]], ["sport", [[["U+26BD"], "⚽", "soccer ball"], [["U+26BE"], "⚾", "baseball"], [["U+1F94E"], "🥎", "softball"], [["U+1F3C0"], "🏀", "basketball"], [["U+1F3D0"], "🏐", "volleyball"], [["U+1F3C8"], "🏈", "american football"], [["U+1F3C9"], "🏉", "rugby football"], [["U+1F3BE"], "🎾", "tennis"], [["U+1F94F"], "🥏", "flying disc"], [["U+1F3B3"], "🎳", "bowling"], [["U+1F3CF"], "🏏", "cricket game"], [["U+1F3D1"], "🏑", "field hockey"], [["U+1F3D2"], "🏒", "ice hockey"], [["U+1F94D"], "🥍", "lacrosse"], [["U+1F3D3"], "🏓", "ping pong"], [["U+1F3F8"], "🏸", "badminton"], [["U+1F94A"], "🥊", "boxing glove"], [["U+1F94B"], "🥋", "martial arts uniform"], [["U+1F945"], "🥅", "goal net"], [["U+26F3"], "⛳", "flag in hole"], [["U+26F8"], "⛸", "ice skate"], [["U+1F3A3"], "🎣", "fishing pole"], [["U+1F93F"], "🤿", "diving mask"], [["U+1F3BD"], "🎽", "running shirt"], [["U+1F3BF"], "🎿", "skis"], [["U+1F6F7"], "🛷", "sled"], [["U+1F94C"], "🥌", "curling stone"]]], ["game", [[["U+1F3AF"], "🎯", "direct hit"], [["U+1FA80"], "🪀", "yo-yo"], [["U+1FA81"], "🪁", "kite"], [["U+1F3B1"], "🎱", "pool 8 ball"], [["U+1F52E"], "🔮", "crystal ball"], [["U+1FA84"], "🪄", "⊛ magic wand"], [["U+1F9FF"], "🧿", "nazar amulet"], [["U+1F3AE"], "🎮", "video game"], [["U+1F579"], "🕹", "joystick"], [["U+1F3B0"], "🎰", "slot machine"], [["U+1F3B2"], "🎲", "game die"], [["U+1F9E9"], "🧩", "puzzle piece"], [["U+1F9F8"], "🧸", "teddy bear"], [["U+1FA85"], "🪅", "⊛ piñata"], [["U+1FA86"], "🪆", "⊛ nesting dolls"], [["U+2660"], "♠", "spade suit"], [["U+2665"], "♥", "heart suit"], [["U+2666"], "♦", "diamond suit"], [["U+2663"], "♣", "club suit"], [["U+265F"], "♟", "chess pawn"], [["U+1F0CF"], "🃏", "joker"], [["U+1F004"], "🀄", "mahjong red dragon"], [["U+1F3B4"], "🎴", "flower playing cards"]]], ["arts & crafts", [[["U+1F3AD"], "🎭", "performing arts"], [["U+1F5BC"], "🖼", "framed picture"], [["U+1F3A8"], "🎨", "artist palette"], [["U+1F9F5"], "🧵", "thread"], [["U+1FAA1"], "🪡", "⊛ sewing needle"], [["U+1F9F6"], "🧶", "yarn"], [["U+1FAA2"], "🪢", "⊛ knot"]]]]], ["Objects", [["clothing", [[["U+1F453"], "👓", "glasses"], [["U+1F576"], "🕶", "sunglasses"], [["U+1F97D"], "🥽", "goggles"], [["U+1F97C"], "🥼", "lab coat"], [["U+1F9BA"], "🦺", "safety vest"], [["U+1F454"], "👔", "necktie"], [["U+1F455"], "👕", "t-shirt"], [["U+1F456"], "👖", "jeans"], [["U+1F9E3"], "🧣", "scarf"], [["U+1F9E4"], "🧤", "gloves"], [["U+1F9E5"], "🧥", "coat"], [["U+1F9E6"], "🧦", "socks"], [["U+1F457"], "👗", "dress"], [["U+1F458"], "👘", "kimono"], [["U+1F97B"], "🥻", "sari"], [["U+1FA71"], "🩱", "one-piece swimsuit"], [["U+1FA72"], "🩲", "briefs"], [["U+1FA73"], "🩳", "shorts"], [["U+1F459"], "👙", "bikini"], [["U+1F45A"], "👚", "woman’s clothes"], [["U+1F45B"], "👛", "purse"], [["U+1F45C"], "👜", "handbag"], [["U+1F45D"], "👝", "clutch bag"], [["U+1F6CD"], "🛍", "shopping bags"], [["U+1F392"], "🎒", "backpack"], [["U+1FA74"], "🩴", "⊛ thong sandal"], [["U+1F45E"], "👞", "man’s shoe"], [["U+1F45F"], "👟", "running shoe"], [["U+1F97E"], "🥾", "hiking boot"], [["U+1F97F"], "🥿", "flat shoe"], [["U+1F460"], "👠", "high-heeled shoe"], [["U+1F461"], "👡", "woman’s sandal"], [["U+1FA70"], "🩰", "ballet shoes"], [["U+1F462"], "👢", "woman’s boot"], [["U+1F451"], "👑", "crown"], [["U+1F452"], "👒", "woman’s hat"], [["U+1F3A9"], "🎩", "top hat"], [["U+1F393"], "🎓", "graduation cap"], [["U+1F9E2"], "🧢", "billed cap"], [["U+1FA96"], "🪖", "⊛ military helmet"], [["U+26D1"], "⛑", "rescue worker’s helmet"], [["U+1F4FF"], "📿", "prayer beads"], [["U+1F484"], "💄", "lipstick"], [["U+1F48D"], "💍", "ring"], [["U+1F48E"], "💎", "gem stone"]]], ["sound", [[["U+1F507"], "🔇", "muted speaker"], [["U+1F508"], "🔈", "speaker low volume"], [["U+1F509"], "🔉", "speaker medium volume"], [["U+1F50A"], "🔊", "speaker high volume"], [["U+1F4E2"], "📢", "loudspeaker"], [["U+1F4E3"], "📣", "megaphone"], [["U+1F4EF"], "📯", "postal horn"], [["U+1F514"], "🔔", "bell"], [["U+1F515"], "🔕", "bell with slash"]]], ["music", [[["U+1F3BC"], "🎼", "musical score"], [["U+1F3B5"], "🎵", "musical note"], [["U+1F3B6"], "🎶", "musical notes"], [["U+1F399"], "🎙", "studio microphone"], [["U+1F39A"], "🎚", "level slider"], [["U+1F39B"], "🎛", "control knobs"], [["U+1F3A4"], "🎤", "microphone"], [["U+1F3A7"], "🎧", "headphone"], [["U+1F4FB"], "📻", "radio"]]], ["musical-instrument", [[["U+1F3B7"], "🎷", "saxophone"], [["U+1FA97"], "🪗", "⊛ accordion"], [["U+1F3B8"], "🎸", "guitar"], [["U+1F3B9"], "🎹", "musical keyboard"], [["U+1F3BA"], "🎺", "trumpet"], [["U+1F3BB"], "🎻", "violin"], [["U+1FA95"], "🪕", "banjo"], [["U+1F941"], "🥁", "drum"], [["U+1FA98"], "🪘", "⊛ long drum"]]], ["phone", [[["U+1F4F1"], "📱", "mobile phone"], [["U+1F4F2"], "📲", "mobile phone with arrow"], [["U+260E"], "☎", "telephone"], [["U+1F4DE"], "📞", "telephone receiver"], [["U+1F4DF"], "📟", "pager"], [["U+1F4E0"], "📠", "fax machine"]]], ["computer", [[["U+1F50B"], "🔋", "battery"], [["U+1F50C"], "🔌", "electric plug"], [["U+1F4BB"], "💻", "laptop"], [["U+1F5A5"], "🖥", "desktop computer"], [["U+1F5A8"], "🖨", "printer"], [["U+2328"], "⌨", "keyboard"], [["U+1F5B1"], "🖱", "computer mouse"], [["U+1F5B2"], "🖲", "trackball"], [["U+1F4BD"], "💽", "computer disk"], [["U+1F4BE"], "💾", "floppy disk"], [["U+1F4BF"], "💿", "optical disk"], [["U+1F4C0"], "📀", "dvd"], [["U+1F9EE"], "🧮", "abacus"]]], ["light & video", [[["U+1F3A5"], "🎥", "movie camera"], [["U+1F39E"], "🎞", "film frames"], [["U+1F4FD"], "📽", "film projector"], [["U+1F3AC"], "🎬", "clapper board"], [["U+1F4FA"], "📺", "television"], [["U+1F4F7"], "📷", "camera"], [["U+1F4F8"], "📸", "camera with flash"], [["U+1F4F9"], "📹", "video camera"], [["U+1F4FC"], "📼", "videocassette"], [["U+1F50D"], "🔍", "magnifying glass tilted left"], [["U+1F50E"], "🔎", "magnifying glass tilted right"], [["U+1F56F"], "🕯", "candle"], [["U+1F4A1"], "💡", "light bulb"], [["U+1F526"], "🔦", "flashlight"], [["U+1F3EE"], "🏮", "red paper lantern"], [["U+1FA94"], "🪔", "diya lamp"]]], ["book-paper", [[["U+1F4D4"], "📔", "notebook with decorative cover"], [["U+1F4D5"], "📕", "closed book"], [["U+1F4D6"], "📖", "open book"], [["U+1F4D7"], "📗", "green book"], [["U+1F4D8"], "📘", "blue book"], [["U+1F4D9"], "📙", "orange book"], [["U+1F4DA"], "📚", "books"], [["U+1F4D3"], "📓", "notebook"], [["U+1F4D2"], "📒", "ledger"], [["U+1F4C3"], "📃", "page with curl"], [["U+1F4DC"], "📜", "scroll"], [["U+1F4C4"], "📄", "page facing up"], [["U+1F4F0"], "📰", "newspaper"], [["U+1F5DE"], "🗞", "rolled-up newspaper"], [["U+1F4D1"], "📑", "bookmark tabs"], [["U+1F516"], "🔖", "bookmark"], [["U+1F3F7"], "🏷", "label"]]], ["money", [[["U+1F4B0"], "💰", "money bag"], [["U+1FA99"], "🪙", "⊛ coin"], [["U+1F4B4"], "💴", "yen banknote"], [["U+1F4B5"], "💵", "dollar banknote"], [["U+1F4B6"], "💶", "euro banknote"], [["U+1F4B7"], "💷", "pound banknote"], [["U+1F4B8"], "💸", "money with wings"], [["U+1F4B3"], "💳", "credit card"], [["U+1F9FE"], "🧾", "receipt"], [["U+1F4B9"], "💹", "chart increasing with yen"]]], ["mail", [[["U+2709"], "✉", "envelope"], [["U+1F4E7"], "📧", "e-mail"], [["U+1F4E8"], "📨", "incoming envelope"], [["U+1F4E9"], "📩", "envelope with arrow"], [["U+1F4E4"], "📤", "outbox tray"], [["U+1F4E5"], "📥", "inbox tray"], [["U+1F4E6"], "📦", "package"], [["U+1F4EB"], "📫", "closed mailbox with raised flag"], [["U+1F4EA"], "📪", "closed mailbox with lowered flag"], [["U+1F4EC"], "📬", "open mailbox with raised flag"], [["U+1F4ED"], "📭", "open mailbox with lowered flag"], [["U+1F4EE"], "📮", "postbox"], [["U+1F5F3"], "🗳", "ballot box with ballot"]]], ["writing", [[["U+270F"], "✏", "pencil"], [["U+2712"], "✒", "black nib"], [["U+1F58B"], "🖋", "fountain pen"], [["U+1F58A"], "🖊", "pen"], [["U+1F58C"], "🖌", "paintbrush"], [["U+1F58D"], "🖍", "crayon"], [["U+1F4DD"], "📝", "memo"]]], ["office", [[["U+1F4BC"], "💼", "briefcase"], [["U+1F4C1"], "📁", "file folder"], [["U+1F4C2"], "📂", "open file folder"], [["U+1F5C2"], "🗂", "card index dividers"], [["U+1F4C5"], "📅", "calendar"], [["U+1F4C6"], "📆", "tear-off calendar"], [["U+1F5D2"], "🗒", "spiral notepad"], [["U+1F5D3"], "🗓", "spiral calendar"], [["U+1F4C7"], "📇", "card index"], [["U+1F4C8"], "📈", "chart increasing"], [["U+1F4C9"], "📉", "chart decreasing"], [["U+1F4CA"], "📊", "bar chart"], [["U+1F4CB"], "📋", "clipboard"], [["U+1F4CC"], "📌", "pushpin"], [["U+1F4CD"], "📍", "round pushpin"], [["U+1F4CE"], "📎", "paperclip"], [["U+1F587"], "🖇", "linked paperclips"], [["U+1F4CF"], "📏", "straight ruler"], [["U+1F4D0"], "📐", "triangular ruler"], [["U+2702"], "✂", "scissors"], [["U+1F5C3"], "🗃", "card file box"], [["U+1F5C4"], "🗄", "file cabinet"], [["U+1F5D1"], "🗑", "wastebasket"]]], ["lock", [[["U+1F512"], "🔒", "locked"], [["U+1F513"], "🔓", "unlocked"], [["U+1F50F"], "🔏", "locked with pen"], [["U+1F510"], "🔐", "locked with key"], [["U+1F511"], "🔑", "key"], [["U+1F5DD"], "🗝", "old key"]]], ["tool", [[["U+1F528"], "🔨", "hammer"], [["U+1FA93"], "🪓", "axe"], [["U+26CF"], "⛏", "pick"], [["U+2692"], "⚒", "hammer and pick"], [["U+1F6E0"], "🛠", "hammer and wrench"], [["U+1F5E1"], "🗡", "dagger"], [["U+2694"], "⚔", "crossed swords"], [["U+1F52B"], "🔫", "pistol"], [["U+1FA83"], "🪃", "⊛ boomerang"], [["U+1F3F9"], "🏹", "bow and arrow"], [["U+1F6E1"], "🛡", "shield"], [["U+1F527"], "🔧", "wrench"], [["U+1FA9B"], "🪛", "⊛ screwdriver"], [["U+1F529"], "🔩", "nut and bolt"], [["U+2699"], "⚙", "gear"], [["U+1F5DC"], "🗜", "clamp"], [["U+2696"], "⚖", "balance scale"], [["U+1F9AF"], "🦯", "white cane"], [["U+1F517"], "🔗", "link"], [["U+26D3"], "⛓", "chains"], [["U+1FA9D"], "🪝", "⊛ hook"], [["U+1F9F0"], "🧰", "toolbox"], [["U+1F9F2"], "🧲", "magnet"], [["U+1FA9C"], "🪜", "⊛ ladder"]]], ["science", [[["U+2697"], "⚗", "alembic"], [["U+1F9EA"], "🧪", "test tube"], [["U+1F9EB"], "🧫", "petri dish"], [["U+1F9EC"], "🧬", "dna"], [["U+1F52C"], "🔬", "microscope"], [["U+1F52D"], "🔭", "telescope"], [["U+1F4E1"], "📡", "satellite antenna"]]], ["medical", [[["U+1F489"], "💉", "syringe"], [["U+1FA78"], "🩸", "drop of blood"], [["U+1F48A"], "💊", "pill"], [["U+1FA79"], "🩹", "adhesive bandage"], [["U+1FA7A"], "🩺", "stethoscope"]]], ["household", [[["U+1F6AA"], "🚪", "door"], [["U+1F6D7"], "🛗", "⊛ elevator"], [["U+1F6CF"], "🛏", "bed"], [["U+1F6CB"], "🛋", "couch and lamp"], [["U+1FA91"], "🪑", "chair"], [["U+1F6BD"], "🚽", "toilet"], [["U+1FAA0"], "🪠", "⊛ plunger"], [["U+1F6BF"], "🚿", "shower"], [["U+1F6C1"], "🛁", "bathtub"], [["U+1FA92"], "🪒", "razor"], [["U+1F9F4"], "🧴", "lotion bottle"], [["U+1F9F7"], "🧷", "safety pin"], [["U+1F9F9"], "🧹", "broom"], [["U+1F9FA"], "🧺", "basket"], [["U+1F9FB"], "🧻", "roll of paper"], [["U+1FAA3"], "🪣", "⊛ bucket"], [["U+1F9FC"], "🧼", "soap"], [["U+1FAA5"], "🪥", "⊛ toothbrush"], [["U+1F9FD"], "🧽", "sponge"], [["U+1F9EF"], "🧯", "fire extinguisher"], [["U+1F6D2"], "🛒", "shopping cart"]]], ["other-object", [[["U+1F6AC"], "🚬", "cigarette"], [["U+26B0"], "⚰", "coffin"], [["U+26B1"], "⚱", "funeral urn"], [["U+1F5FF"], "🗿", "moai"], [["U+1FAA7"], "🪧", "⊛ placard"]]]]], ["Symbols", [["transport-sign", [[["U+1F3E7"], "🏧", "ATM sign"], [["U+1F6AE"], "🚮", "litter in bin sign"], [["U+1F6B0"], "🚰", "potable water"], [["U+267F"], "♿", "wheelchair symbol"], [["U+1F6B9"], "🚹", "men’s room"], [["U+1F6BA"], "🚺", "women’s room"], [["U+1F6BB"], "🚻", "restroom"], [["U+1F6BC"], "🚼", "baby symbol"], [["U+1F6BE"], "🚾", "water closet"], [["U+1F6C2"], "🛂", "passport control"], [["U+1F6C3"], "🛃", "customs"], [["U+1F6C4"], "🛄", "baggage claim"], [["U+1F6C5"], "🛅", "left luggage"]]], ["warning", [[["U+26A0"], "⚠", "warning"], [["U+1F6B8"], "🚸", "children crossing"], [["U+26D4"], "⛔", "no entry"], [["U+1F6AB"], "🚫", "prohibited"], [["U+1F6B3"], "🚳", "no bicycles"], [["U+1F6AD"], "🚭", "no smoking"], [["U+1F6AF"], "🚯", "no littering"], [["U+1F6B1"], "🚱", "non-potable water"], [["U+1F6B7"], "🚷", "no pedestrians"], [["U+1F4F5"], "📵", "no mobile phones"], [["U+1F51E"], "🔞", "no one under eighteen"], [["U+2622"], "☢", "radioactive"], [["U+2623"], "☣", "biohazard"]]], ["arrow", [[["U+2B06"], "⬆", "up arrow"], [["U+2197"], "↗", "up-right arrow"], [["U+27A1"], "➡", "right arrow"], [["U+2198"], "↘", "down-right arrow"], [["U+2B07"], "⬇", "down arrow"], [["U+2199"], "↙", "down-left arrow"], [["U+2B05"], "⬅", "left arrow"], [["U+2196"], "↖", "up-left arrow"], [["U+2195"], "↕", "up-down arrow"], [["U+2194"], "↔", "left-right arrow"], [["U+21A9"], "↩", "right arrow curving left"], [["U+21AA"], "↪", "left arrow curving right"], [["U+2934"], "⤴", "right arrow curving up"], [["U+2935"], "⤵", "right arrow curving down"], [["U+1F503"], "🔃", "clockwise vertical arrows"], [["U+1F504"], "🔄", "counterclockwise arrows button"], [["U+1F519"], "🔙", "BACK arrow"], [["U+1F51A"], "🔚", "END arrow"], [["U+1F51B"], "🔛", "ON! arrow"], [["U+1F51C"], "🔜", "SOON arrow"], [["U+1F51D"], "🔝", "TOP arrow"]]], ["religion", [[["U+1F6D0"], "🛐", "place of worship"], [["U+269B"], "⚛", "atom symbol"], [["U+1F549"], "🕉", "om"], [["U+2721"], "✡", "star of David"], [["U+2638"], "☸", "wheel of dharma"], [["U+262F"], "☯", "yin yang"], [["U+271D"], "✝", "latin cross"], [["U+2626"], "☦", "orthodox cross"], [["U+262A"], "☪", "star and crescent"], [["U+262E"], "☮", "peace symbol"], [["U+1F54E"], "🕎", "menorah"], [["U+1F52F"], "🔯", "dotted six-pointed star"]]], ["zodiac", [[["U+2648"], "♈", "Aries"], [["U+2649"], "♉", "Taurus"], [["U+264A"], "♊", "Gemini"], [["U+264B"], "♋", "Cancer"], [["U+264C"], "♌", "Leo"], [["U+264D"], "♍", "Virgo"], [["U+264E"], "♎", "Libra"], [["U+264F"], "♏", "Scorpio"], [["U+2650"], "♐", "Sagittarius"], [["U+2651"], "♑", "Capricorn"], [["U+2652"], "♒", "Aquarius"], [["U+2653"], "♓", "Pisces"], [["U+26CE"], "⛎", "Ophiuchus"]]], ["av-symbol", [[["U+1F500"], "🔀", "shuffle tracks button"], [["U+1F501"], "🔁", "repeat button"], [["U+1F502"], "🔂", "repeat single button"], [["U+25B6"], "▶", "play button"], [["U+23E9"], "⏩", "fast-forward button"], [["U+23ED"], "⏭", "next track button"], [["U+23EF"], "⏯", "play or pause button"], [["U+25C0"], "◀", "reverse button"], [["U+23EA"], "⏪", "fast reverse button"], [["U+23EE"], "⏮", "last track button"], [["U+1F53C"], "🔼", "upwards button"], [["U+23EB"], "⏫", "fast up button"], [["U+1F53D"], "🔽", "downwards button"], [["U+23EC"], "⏬", "fast down button"], [["U+23F8"], "⏸", "pause button"], [["U+23F9"], "⏹", "stop button"], [["U+23FA"], "⏺", "record button"], [["U+23CF"], "⏏", "eject button"], [["U+1F3A6"], "🎦", "cinema"], [["U+1F505"], "🔅", "dim button"], [["U+1F506"], "🔆", "bright button"], [["U+1F4F6"], "📶", "antenna bars"], [["U+1F4F3"], "📳", "vibration mode"], [["U+1F4F4"], "📴", "mobile phone off"]]], ["gender", [[["U+2640"], "♀", "female sign"], [["U+2642"], "♂", "male sign"], [["U+26A7"], "⚧", "⊛ transgender symbol"]]], ["math", [[["U+2716"], "✖", "multiply"], [["U+2795"], "➕", "plus"], [["U+2796"], "➖", "minus"], [["U+2797"], "➗", "divide"], [["U+267E"], "♾", "infinity"]]], ["punctuation", [[["U+203C"], "‼", "double exclamation mark"], [["U+2049"], "⁉", "exclamation question mark"], [["U+2753"], "❓", "question mark"], [["U+2754"], "❔", "white question mark"], [["U+2755"], "❕", "white exclamation mark"], [["U+2757"], "❗", "exclamation mark"], [["U+3030"], "〰", "wavy dash"]]], ["currency", [[["U+1F4B1"], "💱", "currency exchange"], [["U+1F4B2"], "💲", "heavy dollar sign"]]], ["other-symbol", [[["U+2695"], "⚕", "medical symbol"], [["U+267B"], "♻", "recycling symbol"], [["U+269C"], "⚜", "fleur-de-lis"], [["U+1F531"], "🔱", "trident emblem"], [["U+1F4DB"], "📛", "name badge"], [["U+1F530"], "🔰", "Japanese symbol for beginner"], [["U+2B55"], "⭕", "hollow red circle"], [["U+2705"], "✅", "check mark button"], [["U+2611"], "☑", "check box with check"], [["U+2714"], "✔", "check mark"], [["U+274C"], "❌", "cross mark"], [["U+274E"], "❎", "cross mark button"], [["U+27B0"], "➰", "curly loop"], [["U+27BF"], "➿", "double curly loop"], [["U+303D"], "〽", "part alternation mark"], [["U+2733"], "✳", "eight-spoked asterisk"], [["U+2734"], "✴", "eight-pointed star"], [["U+2747"], "❇", "sparkle"], [["U+00A9"], "©", "copyright"], [["U+00AE"], "®", "registered"], [["U+2122"], "™", "trade mark"]]], ["keycap", [[["U+0023", "U+FE0F", "U+20E3"], "#️⃣", "keycap: #"], [["U+002A", "U+FE0F", "U+20E3"], "*️⃣", "keycap: *"], [["U+0030", "U+FE0F", "U+20E3"], "0️⃣", "keycap: 0"], [["U+0031", "U+FE0F", "U+20E3"], "1️⃣", "keycap: 1"], [["U+0032", "U+FE0F", "U+20E3"], "2️⃣", "keycap: 2"], [["U+0033", "U+FE0F", "U+20E3"], "3️⃣", "keycap: 3"], [["U+0034", "U+FE0F", "U+20E3"], "4️⃣", "keycap: 4"], [["U+0035", "U+FE0F", "U+20E3"], "5️⃣", "keycap: 5"], [["U+0036", "U+FE0F", "U+20E3"], "6️⃣", "keycap: 6"], [["U+0037", "U+FE0F", "U+20E3"], "7️⃣", "keycap: 7"], [["U+0038", "U+FE0F", "U+20E3"], "8️⃣", "keycap: 8"], [["U+0039", "U+FE0F", "U+20E3"], "9️⃣", "keycap: 9"], [["U+1F51F"], "🔟", "keycap: 10"]]], ["alphanum", [[["U+1F520"], "🔠", "input latin uppercase"], [["U+1F521"], "🔡", "input latin lowercase"], [["U+1F522"], "🔢", "input numbers"], [["U+1F523"], "🔣", "input symbols"], [["U+1F524"], "🔤", "input latin letters"], [["U+1F170"], "🅰", "A button (blood type)"], [["U+1F18E"], "🆎", "AB button (blood type)"], [["U+1F171"], "🅱", "B button (blood type)"], [["U+1F191"], "🆑", "CL button"], [["U+1F192"], "🆒", "COOL button"], [["U+1F193"], "🆓", "FREE button"], [["U+2139"], "ℹ", "information"], [["U+1F194"], "🆔", "ID button"], [["U+24C2"], "Ⓜ", "circled M"], [["U+1F195"], "🆕", "NEW button"], [["U+1F196"], "🆖", "NG button"], [["U+1F17E"], "🅾", "O button (blood type)"], [["U+1F197"], "🆗", "OK button"], [["U+1F17F"], "🅿", "P button"], [["U+1F198"], "🆘", "SOS button"], [["U+1F199"], "🆙", "UP! button"], [["U+1F19A"], "🆚", "VS button"], [["U+1F201"], "🈁", "Japanese “here” button"], [["U+1F202"], "🈂", "Japanese “service charge” button"], [["U+1F237"], "🈷", "Japanese “monthly amount” button"], [["U+1F236"], "🈶", "Japanese “not free of charge” button"], [["U+1F22F"], "🈯", "Japanese “reserved” button"], [["U+1F250"], "🉐", "Japanese “bargain” button"], [["U+1F239"], "🈹", "Japanese “discount” button"], [["U+1F21A"], "🈚", "Japanese “free of charge” button"], [["U+1F232"], "🈲", "Japanese “prohibited” button"], [["U+1F251"], "🉑", "Japanese “acceptable” button"], [["U+1F238"], "🈸", "Japanese “application” button"], [["U+1F234"], "🈴", "Japanese “passing grade” button"], [["U+1F233"], "🈳", "Japanese “vacancy” button"], [["U+3297"], "㊗", "Japanese “congratulations” button"], [["U+3299"], "㊙", "Japanese “secret” button"], [["U+1F23A"], "🈺", "Japanese “open for business” button"], [["U+1F235"], "🈵", "Japanese “no vacancy” button"]]], ["geometric", [[["U+1F534"], "🔴", "red circle"], [["U+1F7E0"], "🟠", "orange circle"], [["U+1F7E1"], "🟡", "yellow circle"], [["U+1F7E2"], "🟢", "green circle"], [["U+1F535"], "🔵", "blue circle"], [["U+1F7E3"], "🟣", "purple circle"], [["U+1F7E4"], "🟤", "brown circle"], [["U+26AB"], "⚫", "black circle"], [["U+26AA"], "⚪", "white circle"], [["U+1F7E5"], "🟥", "red square"], [["U+1F7E7"], "🟧", "orange square"], [["U+1F7E8"], "🟨", "yellow square"], [["U+1F7E9"], "🟩", "green square"], [["U+1F7E6"], "🟦", "blue square"], [["U+1F7EA"], "🟪", "purple square"], [["U+1F7EB"], "🟫", "brown square"], [["U+2B1B"], "⬛", "black large square"], [["U+2B1C"], "⬜", "white large square"], [["U+25FC"], "◼", "black medium square"], [["U+25FB"], "◻", "white medium square"], [["U+25FE"], "◾", "black medium-small square"], [["U+25FD"], "◽", "white medium-small square"], [["U+25AA"], "▪", "black small square"], [["U+25AB"], "▫", "white small square"], [["U+1F536"], "🔶", "large orange diamond"], [["U+1F537"], "🔷", "large blue diamond"], [["U+1F538"], "🔸", "small orange diamond"], [["U+1F539"], "🔹", "small blue diamond"], [["U+1F53A"], "🔺", "red triangle pointed up"], [["U+1F53B"], "🔻", "red triangle pointed down"], [["U+1F4A0"], "💠", "diamond with a dot"], [["U+1F518"], "🔘", "radio button"], [["U+1F533"], "🔳", "white square button"], [["U+1F532"], "🔲", "black square button"]]]]], ["Flags", [["flag", [[["U+1F3C1"], "🏁", "chequered flag"], [["U+1F6A9"], "🚩", "triangular flag"], [["U+1F38C"], "🎌", "crossed flags"], [["U+1F3F4"], "🏴", "black flag"], [["U+1F3F3"], "🏳", "white flag"], [["U+1F3F3", "U+FE0F", "U+200D", "U+1F308"], "🏳️‍🌈", "rainbow flag"], [["U+1F3F3", "U+FE0F", "U+200D", "U+26A7", "U+FE0F"], "🏳️‍⚧️", "⊛ transgender flag"], [["U+1F3F4", "U+200D", "U+2620", "U+FE0F"], "🏴‍☠️", "pirate flag"]]], ["country-flag", [[["U+1F1E6", "U+1F1E8"], "🇦🇨", "flag: Ascension Island"], [["U+1F1E6", "U+1F1E9"], "🇦🇩", "flag: Andorra"], [["U+1F1E6", "U+1F1EA"], "🇦🇪", "flag: United Arab Emirates"], [["U+1F1E6", "U+1F1EB"], "🇦🇫", "flag: Afghanistan"], [["U+1F1E6", "U+1F1EC"], "🇦🇬", "flag: Antigua & Barbuda"], [["U+1F1E6", "U+1F1EE"], "🇦🇮", "flag: Anguilla"], [["U+1F1E6", "U+1F1F1"], "🇦🇱", "flag: Albania"], [["U+1F1E6", "U+1F1F2"], "🇦🇲", "flag: Armenia"], [["U+1F1E6", "U+1F1F4"], "🇦🇴", "flag: Angola"], [["U+1F1E6", "U+1F1F6"], "🇦🇶", "flag: Antarctica"], [["U+1F1E6", "U+1F1F7"], "🇦🇷", "flag: Argentina"], [["U+1F1E6", "U+1F1F8"], "🇦🇸", "flag: American Samoa"], [["U+1F1E6", "U+1F1F9"], "🇦🇹", "flag: Austria"], [["U+1F1E6", "U+1F1FA"], "🇦🇺", "flag: Australia"], [["U+1F1E6", "U+1F1FC"], "🇦🇼", "flag: Aruba"], [["U+1F1E6", "U+1F1FD"], "🇦🇽", "flag: Åland Islands"], [["U+1F1E6", "U+1F1FF"], "🇦🇿", "flag: Azerbaijan"], [["U+1F1E7", "U+1F1E6"], "🇧🇦", "flag: Bosnia & Herzegovina"], [["U+1F1E7", "U+1F1E7"], "🇧🇧", "flag: Barbados"], [["U+1F1E7", "U+1F1E9"], "🇧🇩", "flag: Bangladesh"], [["U+1F1E7", "U+1F1EA"], "🇧🇪", "flag: Belgium"], [["U+1F1E7", "U+1F1EB"], "🇧🇫", "flag: Burkina Faso"], [["U+1F1E7", "U+1F1EC"], "🇧🇬", "flag: Bulgaria"], [["U+1F1E7", "U+1F1ED"], "🇧🇭", "flag: Bahrain"], [["U+1F1E7", "U+1F1EE"], "🇧🇮", "flag: Burundi"], [["U+1F1E7", "U+1F1EF"], "🇧🇯", "flag: Benin"], [["U+1F1E7", "U+1F1F1"], "🇧🇱", "flag: St. Barthélemy"], [["U+1F1E7", "U+1F1F2"], "🇧🇲", "flag: Bermuda"], [["U+1F1E7", "U+1F1F3"], "🇧🇳", "flag: Brunei"], [["U+1F1E7", "U+1F1F4"], "🇧🇴", "flag: Bolivia"], [["U+1F1E7", "U+1F1F6"], "🇧🇶", "flag: Caribbean Netherlands"], [["U+1F1E7", "U+1F1F7"], "🇧🇷", "flag: Brazil"], [["U+1F1E7", "U+1F1F8"], "🇧🇸", "flag: Bahamas"], [["U+1F1E7", "U+1F1F9"], "🇧🇹", "flag: Bhutan"], [["U+1F1E7", "U+1F1FB"], "🇧🇻", "flag: Bouvet Island"], [["U+1F1E7", "U+1F1FC"], "🇧🇼", "flag: Botswana"], [["U+1F1E7", "U+1F1FE"], "🇧🇾", "flag: Belarus"], [["U+1F1E7", "U+1F1FF"], "🇧🇿", "flag: Belize"], [["U+1F1E8", "U+1F1E6"], "🇨🇦", "flag: Canada"], [["U+1F1E8", "U+1F1E8"], "🇨🇨", "flag: Cocos (Keeling) Islands"], [["U+1F1E8", "U+1F1E9"], "🇨🇩", "flag: Congo - Kinshasa"], [["U+1F1E8", "U+1F1EB"], "🇨🇫", "flag: Central African Republic"], [["U+1F1E8", "U+1F1EC"], "🇨🇬", "flag: Congo - Brazzaville"], [["U+1F1E8", "U+1F1ED"], "🇨🇭", "flag: Switzerland"], [["U+1F1E8", "U+1F1EE"], "🇨🇮", "flag: Côte d’Ivoire"], [["U+1F1E8", "U+1F1F0"], "🇨🇰", "flag: Cook Islands"], [["U+1F1E8", "U+1F1F1"], "🇨🇱", "flag: Chile"], [["U+1F1E8", "U+1F1F2"], "🇨🇲", "flag: Cameroon"], [["U+1F1E8", "U+1F1F3"], "🇨🇳", "flag: China"], [["U+1F1E8", "U+1F1F4"], "🇨🇴", "flag: Colombia"], [["U+1F1E8", "U+1F1F5"], "🇨🇵", "flag: Clipperton Island"], [["U+1F1E8", "U+1F1F7"], "🇨🇷", "flag: Costa Rica"], [["U+1F1E8", "U+1F1FA"], "🇨🇺", "flag: Cuba"], [["U+1F1E8", "U+1F1FB"], "🇨🇻", "flag: Cape Verde"], [["U+1F1E8", "U+1F1FC"], "🇨🇼", "flag: Curaçao"], [["U+1F1E8", "U+1F1FD"], "🇨🇽", "flag: Christmas Island"], [["U+1F1E8", "U+1F1FE"], "🇨🇾", "flag: Cyprus"], [["U+1F1E8", "U+1F1FF"], "🇨🇿", "flag: Czechia"], [["U+1F1E9", "U+1F1EA"], "🇩🇪", "flag: Germany"], [["U+1F1E9", "U+1F1EC"], "🇩🇬", "flag: Diego Garcia"], [["U+1F1E9", "U+1F1EF"], "🇩🇯", "flag: Djibouti"], [["U+1F1E9", "U+1F1F0"], "🇩🇰", "flag: Denmark"], [["U+1F1E9", "U+1F1F2"], "🇩🇲", "flag: Dominica"], [["U+1F1E9", "U+1F1F4"], "🇩🇴", "flag: Dominican Republic"], [["U+1F1E9", "U+1F1FF"], "🇩🇿", "flag: Algeria"], [["U+1F1EA", "U+1F1E6"], "🇪🇦", "flag: Ceuta & Melilla"], [["U+1F1EA", "U+1F1E8"], "🇪🇨", "flag: Ecuador"], [["U+1F1EA", "U+1F1EA"], "🇪🇪", "flag: Estonia"], [["U+1F1EA", "U+1F1EC"], "🇪🇬", "flag: Egypt"], [["U+1F1EA", "U+1F1ED"], "🇪🇭", "flag: Western Sahara"], [["U+1F1EA", "U+1F1F7"], "🇪🇷", "flag: Eritrea"], [["U+1F1EA", "U+1F1F8"], "🇪🇸", "flag: Spain"], [["U+1F1EA", "U+1F1F9"], "🇪🇹", "flag: Ethiopia"], [["U+1F1EA", "U+1F1FA"], "🇪🇺", "flag: European Union"], [["U+1F1EB", "U+1F1EE"], "🇫🇮", "flag: Finland"], [["U+1F1EB", "U+1F1EF"], "🇫🇯", "flag: Fiji"], [["U+1F1EB", "U+1F1F0"], "🇫🇰", "flag: Falkland Islands"], [["U+1F1EB", "U+1F1F2"], "🇫🇲", "flag: Micronesia"], [["U+1F1EB", "U+1F1F4"], "🇫🇴", "flag: Faroe Islands"], [["U+1F1EB", "U+1F1F7"], "🇫🇷", "flag: France"], [["U+1F1EC", "U+1F1E6"], "🇬🇦", "flag: Gabon"], [["U+1F1EC", "U+1F1E7"], "🇬🇧", "flag: United Kingdom"], [["U+1F1EC", "U+1F1E9"], "🇬🇩", "flag: Grenada"], [["U+1F1EC", "U+1F1EA"], "🇬🇪", "flag: Georgia"], [["U+1F1EC", "U+1F1EB"], "🇬🇫", "flag: French Guiana"], [["U+1F1EC", "U+1F1EC"], "🇬🇬", "flag: Guernsey"], [["U+1F1EC", "U+1F1ED"], "🇬🇭", "flag: Ghana"], [["U+1F1EC", "U+1F1EE"], "🇬🇮", "flag: Gibraltar"], [["U+1F1EC", "U+1F1F1"], "🇬🇱", "flag: Greenland"], [["U+1F1EC", "U+1F1F2"], "🇬🇲", "flag: Gambia"], [["U+1F1EC", "U+1F1F3"], "🇬🇳", "flag: Guinea"], [["U+1F1EC", "U+1F1F5"], "🇬🇵", "flag: Guadeloupe"], [["U+1F1EC", "U+1F1F6"], "🇬🇶", "flag: Equatorial Guinea"], [["U+1F1EC", "U+1F1F7"], "🇬🇷", "flag: Greece"], [["U+1F1EC", "U+1F1F8"], "🇬🇸", "flag: South Georgia & South Sandwich Islands"], [["U+1F1EC", "U+1F1F9"], "🇬🇹", "flag: Guatemala"], [["U+1F1EC", "U+1F1FA"], "🇬🇺", "flag: Guam"], [["U+1F1EC", "U+1F1FC"], "🇬🇼", "flag: Guinea-Bissau"], [["U+1F1EC", "U+1F1FE"], "🇬🇾", "flag: Guyana"], [["U+1F1ED", "U+1F1F0"], "🇭🇰", "flag: Hong Kong SAR China"], [["U+1F1ED", "U+1F1F2"], "🇭🇲", "flag: Heard & McDonald Islands"], [["U+1F1ED", "U+1F1F3"], "🇭🇳", "flag: Honduras"], [["U+1F1ED", "U+1F1F7"], "🇭🇷", "flag: Croatia"], [["U+1F1ED", "U+1F1F9"], "🇭🇹", "flag: Haiti"], [["U+1F1ED", "U+1F1FA"], "🇭🇺", "flag: Hungary"], [["U+1F1EE", "U+1F1E8"], "🇮🇨", "flag: Canary Islands"], [["U+1F1EE", "U+1F1E9"], "🇮🇩", "flag: Indonesia"], [["U+1F1EE", "U+1F1EA"], "🇮🇪", "flag: Ireland"], [["U+1F1EE", "U+1F1F1"], "🇮🇱", "flag: Israel"], [["U+1F1EE", "U+1F1F2"], "🇮🇲", "flag: Isle of Man"], [["U+1F1EE", "U+1F1F3"], "🇮🇳", "flag: India"], [["U+1F1EE", "U+1F1F4"], "🇮🇴", "flag: British Indian Ocean Territory"], [["U+1F1EE", "U+1F1F6"], "🇮🇶", "flag: Iraq"], [["U+1F1EE", "U+1F1F7"], "🇮🇷", "flag: Iran"], [["U+1F1EE", "U+1F1F8"], "🇮🇸", "flag: Iceland"], [["U+1F1EE", "U+1F1F9"], "🇮🇹", "flag: Italy"], [["U+1F1EF", "U+1F1EA"], "🇯🇪", "flag: Jersey"], [["U+1F1EF", "U+1F1F2"], "🇯🇲", "flag: Jamaica"], [["U+1F1EF", "U+1F1F4"], "🇯🇴", "flag: Jordan"], [["U+1F1EF", "U+1F1F5"], "🇯🇵", "flag: Japan"], [["U+1F1F0", "U+1F1EA"], "🇰🇪", "flag: Kenya"], [["U+1F1F0", "U+1F1EC"], "🇰🇬", "flag: Kyrgyzstan"], [["U+1F1F0", "U+1F1ED"], "🇰🇭", "flag: Cambodia"], [["U+1F1F0", "U+1F1EE"], "🇰🇮", "flag: Kiribati"], [["U+1F1F0", "U+1F1F2"], "🇰🇲", "flag: Comoros"], [["U+1F1F0", "U+1F1F3"], "🇰🇳", "flag: St. Kitts & Nevis"], [["U+1F1F0", "U+1F1F5"], "🇰🇵", "flag: North Korea"], [["U+1F1F0", "U+1F1F7"], "🇰🇷", "flag: South Korea"], [["U+1F1F0", "U+1F1FC"], "🇰🇼", "flag: Kuwait"], [["U+1F1F0", "U+1F1FE"], "🇰🇾", "flag: Cayman Islands"], [["U+1F1F0", "U+1F1FF"], "🇰🇿", "flag: Kazakhstan"], [["U+1F1F1", "U+1F1E6"], "🇱🇦", "flag: Laos"], [["U+1F1F1", "U+1F1E7"], "🇱🇧", "flag: Lebanon"], [["U+1F1F1", "U+1F1E8"], "🇱🇨", "flag: St. Lucia"], [["U+1F1F1", "U+1F1EE"], "🇱🇮", "flag: Liechtenstein"], [["U+1F1F1", "U+1F1F0"], "🇱🇰", "flag: Sri Lanka"], [["U+1F1F1", "U+1F1F7"], "🇱🇷", "flag: Liberia"], [["U+1F1F1", "U+1F1F8"], "🇱🇸", "flag: Lesotho"], [["U+1F1F1", "U+1F1F9"], "🇱🇹", "flag: Lithuania"], [["U+1F1F1", "U+1F1FA"], "🇱🇺", "flag: Luxembourg"], [["U+1F1F1", "U+1F1FB"], "🇱🇻", "flag: Latvia"], [["U+1F1F1", "U+1F1FE"], "🇱🇾", "flag: Libya"], [["U+1F1F2", "U+1F1E6"], "🇲🇦", "flag: Morocco"], [["U+1F1F2", "U+1F1E8"], "🇲🇨", "flag: Monaco"], [["U+1F1F2", "U+1F1E9"], "🇲🇩", "flag: Moldova"], [["U+1F1F2", "U+1F1EA"], "🇲🇪", "flag: Montenegro"], [["U+1F1F2", "U+1F1EB"], "🇲🇫", "flag: St. Martin"], [["U+1F1F2", "U+1F1EC"], "🇲🇬", "flag: Madagascar"], [["U+1F1F2", "U+1F1ED"], "🇲🇭", "flag: Marshall Islands"], [["U+1F1F2", "U+1F1F0"], "🇲🇰", "flag: North Macedonia"], [["U+1F1F2", "U+1F1F1"], "🇲🇱", "flag: Mali"], [["U+1F1F2", "U+1F1F2"], "🇲🇲", "flag: Myanmar (Burma)"], [["U+1F1F2", "U+1F1F3"], "🇲🇳", "flag: Mongolia"], [["U+1F1F2", "U+1F1F4"], "🇲🇴", "flag: Macao SAR China"], [["U+1F1F2", "U+1F1F5"], "🇲🇵", "flag: Northern Mariana Islands"], [["U+1F1F2", "U+1F1F6"], "🇲🇶", "flag: Martinique"], [["U+1F1F2", "U+1F1F7"], "🇲🇷", "flag: Mauritania"], [["U+1F1F2", "U+1F1F8"], "🇲🇸", "flag: Montserrat"], [["U+1F1F2", "U+1F1F9"], "🇲🇹", "flag: Malta"], [["U+1F1F2", "U+1F1FA"], "🇲🇺", "flag: Mauritius"], [["U+1F1F2", "U+1F1FB"], "🇲🇻", "flag: Maldives"], [["U+1F1F2", "U+1F1FC"], "🇲🇼", "flag: Malawi"], [["U+1F1F2", "U+1F1FD"], "🇲🇽", "flag: Mexico"], [["U+1F1F2", "U+1F1FE"], "🇲🇾", "flag: Malaysia"], [["U+1F1F2", "U+1F1FF"], "🇲🇿", "flag: Mozambique"], [["U+1F1F3", "U+1F1E6"], "🇳🇦", "flag: Namibia"], [["U+1F1F3", "U+1F1E8"], "🇳🇨", "flag: New Caledonia"], [["U+1F1F3", "U+1F1EA"], "🇳🇪", "flag: Niger"], [["U+1F1F3", "U+1F1EB"], "🇳🇫", "flag: Norfolk Island"], [["U+1F1F3", "U+1F1EC"], "🇳🇬", "flag: Nigeria"], [["U+1F1F3", "U+1F1EE"], "🇳🇮", "flag: Nicaragua"], [["U+1F1F3", "U+1F1F1"], "🇳🇱", "flag: Netherlands"], [["U+1F1F3", "U+1F1F4"], "🇳🇴", "flag: Norway"], [["U+1F1F3", "U+1F1F5"], "🇳🇵", "flag: Nepal"], [["U+1F1F3", "U+1F1F7"], "🇳🇷", "flag: Nauru"], [["U+1F1F3", "U+1F1FA"], "🇳🇺", "flag: Niue"], [["U+1F1F3", "U+1F1FF"], "🇳🇿", "flag: New Zealand"], [["U+1F1F4", "U+1F1F2"], "🇴🇲", "flag: Oman"], [["U+1F1F5", "U+1F1E6"], "🇵🇦", "flag: Panama"], [["U+1F1F5", "U+1F1EA"], "🇵🇪", "flag: Peru"], [["U+1F1F5", "U+1F1EB"], "🇵🇫", "flag: French Polynesia"], [["U+1F1F5", "U+1F1EC"], "🇵🇬", "flag: Papua New Guinea"], [["U+1F1F5", "U+1F1ED"], "🇵🇭", "flag: Philippines"], [["U+1F1F5", "U+1F1F0"], "🇵🇰", "flag: Pakistan"], [["U+1F1F5", "U+1F1F1"], "🇵🇱", "flag: Poland"], [["U+1F1F5", "U+1F1F2"], "🇵🇲", "flag: St. Pierre & Miquelon"], [["U+1F1F5", "U+1F1F3"], "🇵🇳", "flag: Pitcairn Islands"], [["U+1F1F5", "U+1F1F7"], "🇵🇷", "flag: Puerto Rico"], [["U+1F1F5", "U+1F1F8"], "🇵🇸", "flag: Palestinian Territories"], [["U+1F1F5", "U+1F1F9"], "🇵🇹", "flag: Portugal"], [["U+1F1F5", "U+1F1FC"], "🇵🇼", "flag: Palau"], [["U+1F1F5", "U+1F1FE"], "🇵🇾", "flag: Paraguay"], [["U+1F1F6", "U+1F1E6"], "🇶🇦", "flag: Qatar"], [["U+1F1F7", "U+1F1EA"], "🇷🇪", "flag: Réunion"], [["U+1F1F7", "U+1F1F4"], "🇷🇴", "flag: Romania"], [["U+1F1F7", "U+1F1F8"], "🇷🇸", "flag: Serbia"], [["U+1F1F7", "U+1F1FA"], "🇷🇺", "flag: Russia"], [["U+1F1F7", "U+1F1FC"], "🇷🇼", "flag: Rwanda"], [["U+1F1F8", "U+1F1E6"], "🇸🇦", "flag: Saudi Arabia"], [["U+1F1F8", "U+1F1E7"], "🇸🇧", "flag: Solomon Islands"], [["U+1F1F8", "U+1F1E8"], "🇸🇨", "flag: Seychelles"], [["U+1F1F8", "U+1F1E9"], "🇸🇩", "flag: Sudan"], [["U+1F1F8", "U+1F1EA"], "🇸🇪", "flag: Sweden"], [["U+1F1F8", "U+1F1EC"], "🇸🇬", "flag: Singapore"], [["U+1F1F8", "U+1F1ED"], "🇸🇭", "flag: St. Helena"], [["U+1F1F8", "U+1F1EE"], "🇸🇮", "flag: Slovenia"], [["U+1F1F8", "U+1F1EF"], "🇸🇯", "flag: Svalbard & Jan Mayen"], [["U+1F1F8", "U+1F1F0"], "🇸🇰", "flag: Slovakia"], [["U+1F1F8", "U+1F1F1"], "🇸🇱", "flag: Sierra Leone"], [["U+1F1F8", "U+1F1F2"], "🇸🇲", "flag: San Marino"], [["U+1F1F8", "U+1F1F3"], "🇸🇳", "flag: Senegal"], [["U+1F1F8", "U+1F1F4"], "🇸🇴", "flag: Somalia"], [["U+1F1F8", "U+1F1F7"], "🇸🇷", "flag: Suriname"], [["U+1F1F8", "U+1F1F8"], "🇸🇸", "flag: South Sudan"], [["U+1F1F8", "U+1F1F9"], "🇸🇹", "flag: São Tomé & Príncipe"], [["U+1F1F8", "U+1F1FB"], "🇸🇻", "flag: El Salvador"], [["U+1F1F8", "U+1F1FD"], "🇸🇽", "flag: Sint Maarten"], [["U+1F1F8", "U+1F1FE"], "🇸🇾", "flag: Syria"], [["U+1F1F8", "U+1F1FF"], "🇸🇿", "flag: Eswatini"], [["U+1F1F9", "U+1F1E6"], "🇹🇦", "flag: Tristan da Cunha"], [["U+1F1F9", "U+1F1E8"], "🇹🇨", "flag: Turks & Caicos Islands"], [["U+1F1F9", "U+1F1E9"], "🇹🇩", "flag: Chad"], [["U+1F1F9", "U+1F1EB"], "🇹🇫", "flag: French Southern Territories"], [["U+1F1F9", "U+1F1EC"], "🇹🇬", "flag: Togo"], [["U+1F1F9", "U+1F1ED"], "🇹🇭", "flag: Thailand"], [["U+1F1F9", "U+1F1EF"], "🇹🇯", "flag: Tajikistan"], [["U+1F1F9", "U+1F1F0"], "🇹🇰", "flag: Tokelau"], [["U+1F1F9", "U+1F1F1"], "🇹🇱", "flag: Timor-Leste"], [["U+1F1F9", "U+1F1F2"], "🇹🇲", "flag: Turkmenistan"], [["U+1F1F9", "U+1F1F3"], "🇹🇳", "flag: Tunisia"], [["U+1F1F9", "U+1F1F4"], "🇹🇴", "flag: Tonga"], [["U+1F1F9", "U+1F1F7"], "🇹🇷", "flag: Turkey"], [["U+1F1F9", "U+1F1F9"], "🇹🇹", "flag: Trinidad & Tobago"], [["U+1F1F9", "U+1F1FB"], "🇹🇻", "flag: Tuvalu"], [["U+1F1F9", "U+1F1FC"], "🇹🇼", "flag: Taiwan"], [["U+1F1F9", "U+1F1FF"], "🇹🇿", "flag: Tanzania"], [["U+1F1FA", "U+1F1E6"], "🇺🇦", "flag: Ukraine"], [["U+1F1FA", "U+1F1EC"], "🇺🇬", "flag: Uganda"], [["U+1F1FA", "U+1F1F2"], "🇺🇲", "flag: U.S. Outlying Islands"], [["U+1F1FA", "U+1F1F3"], "🇺🇳", "flag: United Nations"], [["U+1F1FA", "U+1F1F8"], "🇺🇸", "flag: United States"], [["U+1F1FA", "U+1F1FE"], "🇺🇾", "flag: Uruguay"], [["U+1F1FA", "U+1F1FF"], "🇺🇿", "flag: Uzbekistan"], [["U+1F1FB", "U+1F1E6"], "🇻🇦", "flag: Vatican City"], [["U+1F1FB", "U+1F1E8"], "🇻🇨", "flag: St. Vincent & Grenadines"], [["U+1F1FB", "U+1F1EA"], "🇻🇪", "flag: Venezuela"], [["U+1F1FB", "U+1F1EC"], "🇻🇬", "flag: British Virgin Islands"], [["U+1F1FB", "U+1F1EE"], "🇻🇮", "flag: U.S. Virgin Islands"], [["U+1F1FB", "U+1F1F3"], "🇻🇳", "flag: Vietnam"], [["U+1F1FB", "U+1F1FA"], "🇻🇺", "flag: Vanuatu"], [["U+1F1FC", "U+1F1EB"], "🇼🇫", "flag: Wallis & Futuna"], [["U+1F1FC", "U+1F1F8"], "🇼🇸", "flag: Samoa"], [["U+1F1FD", "U+1F1F0"], "🇽🇰", "flag: Kosovo"], [["U+1F1FE", "U+1F1EA"], "🇾🇪", "flag: Yemen"], [["U+1F1FE", "U+1F1F9"], "🇾🇹", "flag: Mayotte"], [["U+1F1FF", "U+1F1E6"], "🇿🇦", "flag: South Africa"], [["U+1F1FF", "U+1F1F2"], "🇿🇲", "flag: Zambia"], [["U+1F1FF", "U+1F1FC"], "🇿🇼", "flag: Zimbabwe"]]], ["subdivision-flag", [[["U+1F3F4", "U+E0067", "U+E0062", "U+E0065", "U+E006E", "U+E0067", "U+E007F"], "🏴󠁧󠁢󠁥󠁮󠁧󠁿", "flag: England"], [["U+1F3F4", "U+E0067", "U+E0062", "U+E0073", "U+E0063", "U+E0074", "U+E007F"], "🏴󠁧󠁢󠁳󠁣󠁴󠁿", "flag: Scotland"], [["U+1F3F4", "U+E0067", "U+E0062", "U+E0077", "U+E006C", "U+E0073", "U+E007F"], "🏴󠁧󠁢󠁷󠁬󠁳󠁿", "flag: Wales"]]]]]];
var _default = EmojiChars;
exports["default"] = _default;

/***/ }),

/***/ 7010:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(79047);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _EmojiPickerTooltip = _interopRequireDefault(__webpack_require__(64911));
var _EmojiPicker = _interopRequireDefault(__webpack_require__(24169));
var _Tooltip = _interopRequireWildcard(__webpack_require__(54946));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Dom = __webpack_require__(64821);
var _EmojiUserListTooltip = _interopRequireDefault(__webpack_require__(21854));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var $ = _ACore["default"].$;
var _ = _ACore["default"]._;
var isMobile = _BrowserDetector["default"].isMobile;

/***
 * @extends AElement
 * @constructor
 */
function EmojiCounter() {
  /***
   *
   * @type {Sprite}
   */
  this.$sprite = $('sprite', this);
  this.$num = $('.as-emoji-counter-num', this);
  this.$numText = this.$num.firstChild;
  this._text = '(heart)';
  this.text = this._text;
  this._count = 0;
  this.count = 0;
  this._checkInterval = -1;
  if (isMobile) {
    this.attr('tabindex', '1');
    this.on('focus', this.eventHandler.mouseEnter);
  } else {
    this.on('mouseenter', this.eventHandler.mouseEnter);
  }
  this._tooltipSession = null;
  this._tooltipFinishTimeout = -1;
}
EmojiCounter.tag = 'EmojiCounter'.toLowerCase();
EmojiCounter.render = function () {
  var icon = _EmojiPickerTooltip["default"].emojiDict['(heart)'];
  var url = _EmojiPicker["default"].assetRoot + '/anim/x40/' + icon.imageFileName;
  return _({
    "class": 'as-emoji-counter',
    child: [{
      tag: 'sprite',
      "class": 'as-emoji-counter-sprite',
      props: {
        src: url,
        loop: true,
        fps: 30,
        debug: true
      },
      on: {
        ready: function ready() {
          this.frames = {
            type: 'grid',
            col: 1,
            row: this.texture.naturalHeight / this.texture.naturalWidth
          };
          this.frameIndex = 0;
        }
      }
    }, {
      tag: 'span',
      "class": 'as-emoji-counter-num',
      child: {
        text: '0'
      }
    }]
  });
};
EmojiCounter.property = {};
EmojiCounter.property.text = {
  set: function set(value) {
    var icon = _EmojiPickerTooltip["default"].emojiDict[value];
    if (!icon) return;
    if (this._text === value) return;
    this.$sprite.src = _EmojiPicker["default"].assetRoot + '/anim/x40/' + icon.imageFileName;
    this._text = value;
  },
  get: function get() {
    return this._text;
  }
};
EmojiCounter.property.count = {
  set: function set(value) {
    this.$numText.data = value + '';
    if (value === 1 && this._count != 1) {
      this.$numText.remove();
    } else if (value != 1 && this._count == 1) {
      this.$num.addChild(this.$numText);
    }
    if (value == 0) this.addClass('as-zero');else this.removeClass('as-zero');
    this._count = value;
  },
  get: function get() {
    return this._count;
  }
};
_ACore["default"].install(EmojiCounter);
EmojiCounter.eventHandler = {};
EmojiCounter.eventHandler.loop = function () {
  if (!this.isDescendantOf(document.body)) this.eventHandler.finishHover();
  if (this.getBoundingClientRect().width === 0) this.eventHandler.finishHover();
};
EmojiCounter.eventHandler.mouseEnter = function () {
  if (this._tooltipFinishTimeout > 0) {
    clearTimeout(this._tooltipFinishTimeout);
  }
  if (this._checkInterval > 0) return;
  this.$sprite.play();
  this._checkInterval = setInterval(this.eventHandler.loop, 1000);
  this.on('mouseleave', this.eventHandler.finishHover);
  if (this.users && this.users.length > 0) {
    prepare();
    EmojiCounter._session = Math.random() * 10000000000 >> 0;
    this._tooltipSession = EmojiCounter._session;
    EmojiCounter.$element = this;
    EmojiCounter.$holder.addTo(this);
    EmojiCounter.$tooltip.text = this.text;
    EmojiCounter.$tooltip.users = this.users;
    EmojiCounter.$tooltip.playEmoji();
    (0, _Tooltip.updateTooltipPosition)(EmojiCounter);
  }
};
EmojiCounter.eventHandler.finishHover = function () {
  if (this._tooltipFinishTimeout > 0) {
    clearTimeout(this._tooltipFinishTimeout);
  }
  this._tooltipFinishTimeout = setTimeout(function () {
    this._tooltipFinishTimeout = -1;
    this.$sprite.stop();
    this.off('mouseleave', this.eventHandler.finishHover);
    if (this._checkInterval > 0) {
      clearInterval(this._checkInterval);
      this._checkInterval = -1;
    }
    if (this._tooltipSession === EmojiCounter._session) {
      EmojiCounter._session = Math.random() * 10000000000 >> 0;
      EmojiCounter.$holder.remove();
      EmojiCounter.$tooltip.stopEmoji();
    }
  }.bind(this), 500);
};
function prepare() {
  if (EmojiCounter.$holder) return;
  EmojiCounter.$holder = _('.absol-tooltip-root-holder');
  EmojiCounter.$tooltip = _('EmojiUserListTooltip.top'.toLowerCase()).addTo(EmojiCounter.$holder);
  EmojiCounter._scrollOutListener = undefined;
  EmojiCounter._orientation = 'top';
  EmojiCounter._session = Math.random() * 10000000000 >> 0;
  _EmojiPickerTooltip["default"]._listener = undefined;
  EmojiCounter.$element = null;
  EmojiCounter.$tooltip.$arrow.updateSize = EmojiCounter.updatePosition;
}
EmojiCounter.updatePosition = function () {
  if (!EmojiCounter.$element) return;
  var outBound = _Rectangle["default"].fromClientRect((0, _Dom.traceOutBoundingClientRect)(EmojiCounter.$element));
  var eBound = _Rectangle["default"].fromClientRect(EmojiCounter.$element.getBoundingClientRect());
  if (!outBound.isCollapse(eBound, 0)) {
    _EmojiPickerTooltip["default"]._scrollOutListener && EmojiCounter._scrollOutListener();
  }
  (0, _Tooltip.updateTooltipPosition)(EmojiCounter);
};
EmojiCounter.updatePosition = EmojiCounter.updatePosition.bind(EmojiCounter);
var _default = EmojiCounter;
exports["default"] = _default;

/***/ }),

/***/ 7449:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _EmojiPickerTooltip = _interopRequireDefault(__webpack_require__(64911));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function EmojiCounterList() {
  this._counters = [];
  this.counters = [];
}
EmojiCounterList.tag = 'EmojiCounterList'.toLowerCase();
EmojiCounterList.render = function () {
  return _({
    "class": 'as-emoji-counter-list'
  });
};
EmojiCounterList.iconOrdering = _EmojiPickerTooltip["default"].defaultIcons.reduce(function (ac, cr, idx) {
  ac[cr] = idx + 1;
  return ac;
}, {});
EmojiCounterList.prototype._updateCounters = function () {
  var newCounters = this._counters;
  var newCounterNameArr = Object.keys(newCounters);
  newCounterNameArr.sort(function (a, b) {
    return (EmojiCounterList.iconOrdering[a] || 1000) - (EmojiCounterList.iconOrdering[b] || 1000);
  });
  var counterElements = Array.prototype.filter.call(this.childNodes, function (e) {
    return e.hasClass && e.hasClass('as-emoji-counter');
  });
  var newCounterElements = [];
  var elt, name;
  var oe, on;
  while (counterElements.length > 0 || newCounterNameArr.length > 0) {
    elt = counterElements[0];
    name = newCounterNameArr[0];
    if (elt && name) {
      if (elt.text === name) {
        newCounterElements.push(elt);
        counterElements.shift();
        newCounterNameArr.shift();
      } else {
        oe = EmojiCounterList.iconOrdering[elt.text];
        on = EmojiCounterList.iconOrdering[name];
        if (oe < on) {
          newCounterElements.push(elt);
          counterElements.shift();
        } else {
          newCounterElements.push(name);
          newCounterNameArr.shift();
        }
      }
    } else if (elt) {
      newCounterElements.push(elt);
      counterElements.shift();
    } else {
      newCounterElements.push(name);
      newCounterNameArr.shift();
    }
  }
  var cElt, prevElt;
  while (newCounterElements.length > 0) {
    cElt = newCounterElements.pop();
    if (typeof cElt === "string") {
      cElt = _({
        tag: 'emojicounter',
        props: {
          text: cElt,
          users: newCounters[cElt].users || [],
          count: newCounters[cElt].count
        }
      });
      if (!prevElt) {
        this.addChild(cElt);
      } else {
        this.addChildBefore(cElt, prevElt);
      }
      prevElt = cElt;
    } else {
      if (newCounters[cElt.text]) {
        cElt.count = newCounters[cElt.text].count;
        cElt.users = newCounters[cElt.text].users || [];
        prevElt = cElt;
      } else {
        cElt.remove();
      }
    }
  }
};
EmojiCounterList.property = {};
EmojiCounterList.property.counters = {
  set: function set(counters) {
    this._counters = Object.keys(counters || {}).reduce(function (ac, key) {
      var counter = counters[key];
      if (_typeof(counter) === "object") {
        if (counter.count > 0 && _EmojiPickerTooltip["default"].emojiDict[key]) {
          ac[key] = counter;
        }
      }
      return ac;
    }, {});
    this._updateCounters();
  },
  get: function get() {
    return this._counters;
  }
};
_ACore["default"].install(EmojiCounterList);
var _default = EmojiCounterList;
exports["default"] = _default;

/***/ }),

/***/ 24169:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(28395);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _EmojiAnims = _interopRequireDefault(__webpack_require__(98541));
var _Sprite = _interopRequireDefault(__webpack_require__(29464));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function EmojiPicker() {
  var thisPicker = this;
  this._aliveTimeout = 90;
  this._assetRoot = this.attr('data-asset-root');
  /***
   *
   * @type {Sprite}
   */
  this.$previewAnim = $('sprite.as-emoji-picker-preview-anim', this).on('ready', this.eventHandler.previewAnimReady).on('frame', this.eventHandler.previewAnimFrame);
  this.$previewAnim.loop = true;
  this.$previewAnim.src = this._assetRoot + '/anim/x120/' + _EmojiAnims["default"][0][1];
  this.$previewAnim.fps = 30;
  this.$desc = $('.as-emoji-picker-preview-desc', this);
  this.$shortcut = $('.as-emoji-picker-preview-shortcut', this);
  this.$desc.clearChild().addChild(_({
    text: _EmojiAnims["default"][0][2]
  }));
  this.$shortcut.clearChild().addChild(_({
    text: _EmojiAnims["default"][0][0]
  }));
  this.$list = $('.as-emoji-picker-list', this);
  this.$items = _EmojiAnims["default"].reduce(function (ac, it) {
    var itemElt = _({
      tag: 'img',
      "class": 'as-emoji-picker-item',
      props: {
        src: thisPicker._assetRoot + '/static/x20/' + it[1]
      }
    }).addTo(thisPicker.$list);
    itemElt.on('mouseenter', thisPicker.eventHandler.mouseenterItem.bind(thisPicker, it, itemElt));
    itemElt.on('click', thisPicker.eventHandler.clickItem.bind(thisPicker, it));
    ac[it[0]] = itemElt;
    return ac;
  }, {});
  this.$attachook = _('attachhook').addTo(this).on('error', this.eventHandler.attach);
}
EmojiPicker.assetRoot = function () {
  if (location.hostname.match(/^.*(\.?absol\.cf|absol\.ddns\.net)$/) || location.hostname.match(/^localhost$/)) return 'https://absol.cf/emoji';
  return '/emoji';
}();
EmojiPicker.tag = 'EmojiPicker'.toLowerCase();
EmojiPicker.render = function (data) {
  data = data || {};
  data.assetRoot = data.assetRoot || EmojiPicker.assetRoot;
  return _({
    "class": 'as-emoji-picker',
    extendEvent: 'pick',
    attr: {
      'data-asset-root': data.assetRoot
    },
    child: [{
      "class": 'as-emoji-picker-preview',
      child: [{
        "class": '.as-emoji-picker-preview-anim-ctn',
        child: 'sprite.as-emoji-picker-preview-anim'
      }, '.as-emoji-picker-preview-desc', '.as-emoji-picker-preview-shortcut']
    }, {
      tag: 'bscroller',
      "class": 'as-emoji-picker-list'
    }]
  });
};

/**
 * @type {EmojiPicker}
 */
EmojiPicker.eventHandler = {};
EmojiPicker.eventHandler.attach = function () {
  this._aliveTimeout = 90;
  setTimeout(this.$previewAnim.play.bind(this.$previewAnim), 1);
};
EmojiPicker.eventHandler.previewAnimReady = function () {
  this.$previewAnim.frames = {
    type: 'grid',
    col: 1,
    row: this.$previewAnim.texture.naturalHeight / this.$previewAnim.texture.naturalWidth
  };
  this.$previewAnim.play();
};
EmojiPicker.eventHandler.previewAnimFrame = function () {
  if (this._aliveTimeout == 0) {
    var bound = this.getBoundingClientRect();
    if (bound.width == 0) {
      this.$previewAnim.stop();
    } else {
      this._aliveTimeout = 90;
    }
  }
  this._aliveTimeout--;
};
EmojiPicker.eventHandler.mouseenterItem = function (itemData, itemElt, event) {
  if (this.$lastHoverItem == itemElt) return;
  this.$lastHoverItem = itemElt;
  this.$previewAnim.src = this._assetRoot + '/anim/x120/' + itemData[1];
  this.$desc.clearChild().addChild(_({
    text: itemData[2]
  }));
  this.$shortcut.clearChild().addChild(_({
    text: itemData[0]
  }));
};
EmojiPicker.eventHandler.clickItem = function (itemData, event) {
  this.emit('pick', {
    name: 'pick',
    key: itemData[0],
    target: this
  }, this);
};
_ACore["default"].install(EmojiPicker);
var _default = EmojiPicker;
exports["default"] = _default;

/***/ }),

/***/ 64911:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(51922);
var _Tooltip = __webpack_require__(54946);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _EmojiPicker = _interopRequireDefault(__webpack_require__(24169));
var _EmojiAnims = _interopRequireDefault(__webpack_require__(98541));
var _PositionTracker = _interopRequireDefault(__webpack_require__(97252));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _Dom = __webpack_require__(64821);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _EventEmitter = __webpack_require__(46833);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _PageIndicator = _interopRequireDefault(__webpack_require__(18549));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var isMobile = _BrowserDetector["default"].isMobile;

/***
 * @augments Tooltip
 * @augments AElement
 * @augments Hanger
 * @constructor
 */
function EmojiPickerTooltip() {
  if (isMobile) {
    _({
      tag: _Hanger["default"].tag,
      elt: this,
      on: {
        predrag: this.eventHandler.preDragTT,
        dragstart: this.eventHandler.dragStartTT,
        drag: this.eventHandler.dragTT,
        dragend: this.eventHandler.dragEndTT
      }
    });
  }
  this.$iconList = $('.as-emoji-picker-tooltip-icon-list', this);
  this.$leftBtn = $('.as-emoji-picker-tooltip-left-btn', this).on('click', this.eventHandler.clickLeft);
  this.$scroller = $('.as-emoji-picker-tooltip-scroller', this);
  this.$rightBtn = $('.as-emoji-picker-tooltip-right-btn', this).on('click', this.eventHandler.clickRight);
  this.$removeBtn = $('.as-emoji-picker-tooltip-remove-btn', this).on('click', this.eventHandler.clickRemove);
  this.$pageIndicatior = $('pageindicator', this);
  this._iconButtonCache = {};
  this._icons = [];
  this.icons = EmojiPickerTooltip.defaultIcons;
}
EmojiPickerTooltip.tag = 'EmojiPickerTooltip'.toLowerCase();
EmojiPickerTooltip.defaultIcons = [';(', '(sarcastic)', ':O', '(cwl)', '(heart)', '(y)', '(n)', '(rock)', '(facepalm)', '(xd)', ':$', '(waiting)', '(headbang)', '(ghost)', '(clap)', '(punch)', '(ok)', '(angry)'];
EmojiPickerTooltip.emojiDict = _EmojiAnims["default"].reduce(function (ac, cr) {
  ac[cr[0]] = {
    imageFileName: cr[1],
    text: cr[0],
    desc: cr[2]
  };
  return ac;
}, {});
EmojiPickerTooltip.render = function () {
  return _({
    tag: 'tooltip',
    extendEvent: ['pick'],
    "class": ['as-emoji-picker-tooltip'].concat(isMobile ? ['as-mobile'] : []),
    child: [{
      tag: 'button',
      "class": 'as-emoji-picker-tooltip-left-btn',
      child: 'span.mdi.mdi-chevron-left'
    }, {
      "class": 'as-emoji-picker-tooltip-scroller',
      child: {
        "class": 'as-emoji-picker-tooltip-icon-list'
      }
    }, {
      tag: 'button',
      "class": 'as-emoji-picker-tooltip-right-btn',
      child: 'span.mdi.mdi-chevron-right'
    }, {
      tag: 'button',
      attr: {
        title: 'Remove Emoji'
      },
      "class": 'as-emoji-picker-tooltip-remove-btn',
      child: 'span.mdi.mdi-close'
    }, {
      tag: 'pageindicator',
      "class": 'as-emoji-picker-tooltip-page-indicator',
      props: {
        length: 3,
        idx: 0
      }
    }]
  }, true);
};

/*var */

EmojiPickerTooltip.prototype._makeIconBtn = function (iconText) {
  var icon = EmojiPickerTooltip.emojiDict[iconText];
  var url = _EmojiPicker["default"].assetRoot + '/anim/x40/' + icon.imageFileName;
  var spriteElt = _({
    tag: 'sprite',
    "class": 'as-emoji-picker-tooltip-icon',
    attr: {
      title: icon.desc
    },
    props: {
      src: url,
      loop: true,
      fps: 30,
      debug: true
    },
    on: {
      ready: function ready() {
        this.frames = {
          type: 'grid',
          col: 1,
          row: this.texture.naturalHeight / this.texture.naturalWidth
        };
        this.frameIndex = 0;
      }
    }
  });
  var buttonElt = _({
    tag: 'button',
    "class": 'as-emoji-picker-tooltip-icon-btn',
    child: spriteElt,
    on: {
      click: this.eventHandler.clickIconBtn.bind(null, icon)
    }
  });
  buttonElt.on('mouseenter', function () {
    spriteElt.play();
  }).on('mouseleave', function () {
    spriteElt.stop();
    spriteElt.frameIndex = 0;
  });
  return buttonElt;
};
EmojiPickerTooltip.prototype._updateIconList = function () {
  this.$iconList.clearChild();
  var iconText;
  for (var i = 0; i < this._icons.length; ++i) {
    iconText = this._icons[i];
    this._iconButtonCache[iconText] = this._iconButtonCache[iconText] || this._makeIconBtn(iconText);
    this.$iconList.addChild(this._iconButtonCache[iconText]);
  }
};
EmojiPickerTooltip.property = {};
EmojiPickerTooltip.property.icons = {
  set: function set(icons) {
    this._icons = icons || [];
    this._updateIconList();
    this.viewOffset = 0;
    this.$pageIndicatior.length = Math.ceil(this._icons.length / 6);
  },
  get: function get() {
    return this._icons;
  }
};
EmojiPickerTooltip.property.viewOffset = {
  set: function set(value) {
    this._viewOffset = Math.max(0, Math.min(value, this._icons.length - 6));
    this.$iconList.addStyle('left', -(100 * this._viewOffset / 6) + '%');
    this.$leftBtn.disabled = this._viewOffset === 0;
    this.$rightBtn.disabled = this._viewOffset === this._icons.length - 6;
    this.$pageIndicatior.idx = Math.floor(this._viewOffset / 6);
  },
  get: function get() {
    return this._viewOffset;
  }
};
EmojiPickerTooltip.eventHandler = {};
EmojiPickerTooltip.eventHandler.clickLeft = function () {
  this.viewOffset -= 6;
};
EmojiPickerTooltip.eventHandler.clickRight = function () {
  this.viewOffset += 6;
};
EmojiPickerTooltip.eventHandler.clickIconBtn = function (icon) {
  if (this._preventClick) return;
  this.emit('pick', Object.assign({
    type: 'pick',
    icon: icon,
    target: this
  }, icon), this);
};
EmojiPickerTooltip.eventHandler.clickRemove = function () {
  this.emit('pick', Object.assign({
    type: 'pressremove',
    icon: "REMOVE",
    target: this
  }), this);
};
EmojiPickerTooltip.eventHandler.preDragTT = function (event) {
  var scrollerBound = this.$scroller.getBoundingClientRect();
  var listBound = this.$iconList.getBoundingClientRect();
  this._scrollData = {
    left: listBound.left - scrollerBound.left,
    scrollerWidth: scrollerBound.width,
    newLeft: listBound.left - scrollerBound.left
  };
};
EmojiPickerTooltip.eventHandler.dragStartTT = function () {
  this.addClass('as-scrolling');
  this._preventClick = true;
};
EmojiPickerTooltip.eventHandler.dragTT = function (event) {
  event.preventDefault();
  var dx = event.currentPoint.sub(event.startingPoint).x;
  var newLeft = Math.min(0, Math.max(-this._scrollData.scrollerWidth * 2, this._scrollData.left + dx));
  this._scrollData.newLeft = newLeft;
  this.$iconList.addStyle('left', newLeft + 'px');
};
EmojiPickerTooltip.eventHandler.dragEndTT = function (event) {
  event.preventDefault();
  this.removeClass('as-scrolling');
  var dOffset = (this._scrollData.left - this._scrollData.newLeft) / this._scrollData.scrollerWidth;
  if (dOffset > 0.25) {
    dOffset = 1;
  } else if (dOffset < -0.25) {
    dOffset = -1;
  } else {
    dOffset = 0;
  }
  this.viewOffset += dOffset * 6;
  setTimeout(function () {
    this._preventClick = false;
  }.bind(this), 5);
};
_ACore["default"].install(EmojiPickerTooltip);
EmojiPickerTooltip._session = Math.random() * 10000000000 >> 0;
function prepare() {
  if (EmojiPickerTooltip.$holder) return;
  EmojiPickerTooltip.$holder = _('.absol-tooltip-root-holder');
  EmojiPickerTooltip.$tooltip = _('emojipickertooltip.top').addTo(EmojiPickerTooltip.$holder).on('pick', function (event) {
    EmojiPickerTooltip._listener && EmojiPickerTooltip._listener(event.icon);
  });
  /***
   *
   * @type {PositionTracker|undefined}
   */
  EmojiPickerTooltip.$element = undefined;
  EmojiPickerTooltip.$content = undefined;
  EmojiPickerTooltip._orientation = 'auto';
  EmojiPickerTooltip._session = Math.random() * 10000000000 >> 0;
  EmojiPickerTooltip._listener = undefined;
  EmojiPickerTooltip._scrollOutListener = undefined;
  EmojiPickerTooltip.$tooltip.$arrow.updateSize = EmojiPickerTooltip.updatePosition;
}
EmojiPickerTooltip.updatePosition = function () {
  if (!EmojiPickerTooltip.$element) return;
  var outBound = _Rectangle["default"].fromClientRect((0, _Dom.traceOutBoundingClientRect)(EmojiPickerTooltip.$element));
  var eBound = _Rectangle["default"].fromClientRect(EmojiPickerTooltip.$element.getBoundingClientRect());
  if (!outBound.isCollapse(eBound, 0)) {
    EmojiPickerTooltip._scrollOutListener && EmojiPickerTooltip._scrollOutListener();
  }
  (0, _Tooltip.updateTooltipPosition)(EmojiPickerTooltip);
};
EmojiPickerTooltip.updatePosition = EmojiPickerTooltip.updatePosition.bind(EmojiPickerTooltip);
EmojiPickerTooltip.show = function (element, menuListener, orientation) {
  prepare();
  if (EmojiPickerTooltip.$element) {
    EmojiPickerTooltip.$element.stopTrackPosition();
    EmojiPickerTooltip.$element.off('positionchange', EmojiPickerTooltip.updatePosition);
  }
  if (!element.startTrackPosition) {
    _({
      tag: _PositionTracker["default"].tag,
      elt: element
    });
  }
  element.startTrackPosition();
  EmojiPickerTooltip.$element = element;
  EmojiPickerTooltip.$element.on('positionchange', EmojiPickerTooltip.updatePosition);
  EmojiPickerTooltip._listener = menuListener;
  EmojiPickerTooltip._session = Math.random() * 10000000000 >> 0;
  EmojiPickerTooltip._orientation = orientation || 'auto';
  EmojiPickerTooltip.$holder.addTo(document.body);
  _ResizeSystem["default"].add(EmojiPickerTooltip.$tooltip.$arrow);
  EmojiPickerTooltip.$tooltip.viewOffset = 0;
  EmojiPickerTooltip.$tooltip.addClass('top').removeClass('left').removeClass('right').removeClass('bottom').removeClass('ne').removeClass('nw').removeClass('auto');
  EmojiPickerTooltip.updatePosition();
  return EmojiPickerTooltip._session;
};
EmojiPickerTooltip.close = function (token) {
  if (EmojiPickerTooltip._session !== token) return;
  if (EmojiPickerTooltip.$element) {
    EmojiPickerTooltip.$element.stopTrackPosition();
    EmojiPickerTooltip.$element.off('positionchange', EmojiPickerTooltip.updatePosition);
  }
  EmojiPickerTooltip.$element = undefined;
  EmojiPickerTooltip._listener = undefined;
  EmojiPickerTooltip._session = Math.random() * 10000000000 >> 0;
  EmojiPickerTooltip.$holder.remove();
};
EmojiPickerTooltip.toggleWhenClick = function (trigger, adaptor) {
  var res = {
    trigger: trigger,
    adaptor: adaptor,
    currentSession: undefined
  };
  function clickHandler(event) {
    if (res.currentSession === EmojiPickerTooltip._session) return;
    res.currentSession = EmojiPickerTooltip.show(res.adaptor.getFlowedElement ? res.adaptor.getFlowedElement() : trigger, res.adaptor.onSelect, res.adaptor.orientation || 'auto');
    if (res.adaptor.onOpen) res.adaptor.onOpen();
    var finish = function finish(event) {
      if (event && ((0, _EventEmitter.hitElement)(EmojiPickerTooltip.$tooltip.$leftBtn, event) || (0, _EventEmitter.hitElement)(EmojiPickerTooltip.$tooltip.$rightBtn, event)) || event && event.target && event.target.classList.contains('absol-tooltip-content')) return;
      document.body.removeEventListener('click', finish, false);
      EmojiPickerTooltip.close(res.currentSession);
      if (adaptor.onClose) adaptor.onClose();
      res.currentSession = undefined;
      if (EmojiPickerTooltip._scrollOutListener === EmojiPickerTooltip) EmojiPickerTooltip._scrollOutListener = undefined;
    };
    EmojiPickerTooltip._scrollOutListener = finish;
    setTimeout(function () {
      document.body.addEventListener('click', finish, false);
    }, 10);
  }
  res.remove = function () {
    trigger.removeEventListener('click', clickHandler, false);
    trigger.classList.remove('as-emoji-picker-tooltip-trigger');
  };
  trigger.addEventListener('click', clickHandler, false);
  trigger.classList.add('as-emoji-picker-tooltip-trigger');
  return res;
};
var _default = EmojiPickerTooltip;
exports["default"] = _default;

/***/ }),

/***/ 21854:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(76974);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Tooltip = _interopRequireDefault(__webpack_require__(54946));
var _EmojiPicker = _interopRequireDefault(__webpack_require__(24169));
var _EmojiPickerTooltip = _interopRequireDefault(__webpack_require__(64911));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @augments ToolTip
 * @augments AElement
 * @constructor
 */
function EmojiUserListTooltip() {
  this._text = null;
  this._users = [];
  this.$sprite = _({
    tag: 'sprite',
    "class": 'as-emoji-user-list-tooltip-emoji',
    props: {
      fps: 30,
      loop: true
    },
    on: {
      ready: function ready() {
        this.frames = {
          type: 'grid',
          col: 1,
          row: this.texture.naturalHeight / this.texture.naturalWidth
        };
      }
    }
  });
  this.appendChild(this.$sprite);
  this.text = '(heart)';
  this.user = [];
}
EmojiUserListTooltip.tag = 'EmojiUserListTooltip'.toLowerCase();
EmojiUserListTooltip.render = function () {
  return _({
    tag: 'tooltip',
    "class": 'as-emoji-user-list-tooltip'
  }, true);
};
EmojiUserListTooltip.prototype._updateUsers = function () {
  var thisT = this;
  this.$content.clearChild();
  this._users.forEach(function (user) {
    var elt = _({
      "class": 'as-emoji-user-list-tooltip-user',
      child: [{
        "class": 'as-emoji-user-list-tooltip-avatar',
        style: {
          backgroundImage: 'url(' + user.avatar + ')'
        }
      }, {
        "class": 'as-emoji-user-list-tooltip-name',
        child: {
          text: user.name
        }
      }]
    });
    if (user.onclick) {
      elt.addClass('as-clickable');
      elt.on('click', user.onclick.bind(user));
    }
    thisT.$content.addChild(elt);
  });
};
EmojiUserListTooltip.prototype.playEmoji = function () {
  this.$sprite.afterReady().then(this.$sprite.play.bind(this.$sprite));
};
EmojiUserListTooltip.prototype.stopEmoji = function () {
  this.$sprite.stop();
};
EmojiUserListTooltip.property = {};
EmojiUserListTooltip.property.users = {
  set: function set(users) {
    this._users = users || [];
    this._updateUsers();
  },
  get: function get() {
    return this._users;
  }
};
EmojiUserListTooltip.property.text = {
  set: function set(value) {
    if (value === this._text) return;
    var icon = _EmojiPickerTooltip["default"].emojiDict[value];
    if (!value) return;
    var url = _EmojiPicker["default"].assetRoot + '/anim/x60/' + icon.imageFileName;
    this._text = value;
    this.$sprite.src = url;
  },
  get: function get() {
    return this._text;
  }
};
_ACore["default"].install(EmojiUserListTooltip);
var _default = EmojiUserListTooltip;
exports["default"] = _default;

/***/ }),

/***/ 87326:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ExpGroup = ExpGroup;
exports.ExpNode = ExpNode;
exports.ExpSearcher = ExpSearcher;
exports.ExpTree = ExpTree;
exports["default"] = void 0;
__webpack_require__(68687);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _utils = __webpack_require__(84512);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _EventEmitter = _interopRequireWildcard(__webpack_require__(46833));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _stringGenerate = __webpack_require__(10713);
var _search = _interopRequireWildcard(__webpack_require__(67858));
var _stringUtils = __webpack_require__(26243);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
_ACore["default"].install('toggler-ico', function () {
  var res = _('<svg class="toggler-ico" width="14" height="14" version="1.1" viewBox="0 0 3.7042 3.7042" xmlns="http://www.w3.org/2000/svg" >' + '    <rect style="fill: transparent; stroke: none" x="0" y="0" width="3.7042" height="3.7042"></rect>' + '    <g transform="translate(0 -293.3)" class="toggle-close">' + '        <path d="m0.52917 293.82v2.6458l2.6458-1.3229z" />' + '    </g>' + '    <g transform="translate(0 -293.3)" class="toggle-open">' + '        <path d="m3.175 294.09-2.6458 2.1167h2.6458z"/>' + '    </g>' + '</svg>');
  return res;
});
_ACore["default"].install('remove-ico', function () {
  return _('<svg class="remove-ico" width="24" height="24" viewBox="0 0 24 24">\
                <rect style="fill: transparent; stroke: none" x="0" y="0" width="24" height="24"></rect>\
                <path class="close" d="M3,16.74L7.76,12L3,7.26L7.26,3L12,7.76L16.74,3L21,7.26L16.24,12L21,16.74L16.74,21L12,16.24L7.26,21L3,16.74" />\
                <circle class="modified" cx="12" cy="12" r="10" />\
            </svg>');
});

/***
 * @extends AElement
 * @constructor
 */
function ExpNode() {
  var _this = this;
  var thisEN = this;
  this.$level = $('.absol-exp-node-level', this);
  this.$removeIcon = $('remove-ico', this).on('click', function (event) {
    thisEN.emit('pressremove', {
      target: thisEN,
      type: 'pressremove'
    }, this);
  });
  this.on('keydown', this.eventHandler.buttonKeydown);
  this.$toggleIcon = $('toggler-ico', this);
  this.on('click', function (event) {
    var toggleBound = _this.$toggleIcon.getBoundingClientRect();
    if (toggleBound.width > 0 && event.clientX <= toggleBound.right) {
      _this.emit('presstoggle', (0, _EventEmitter.copyEvent)(event, {
        target: thisEN,
        type: 'pressremove'
      }), _this);
    } else if (!_EventEmitter["default"].hitElement(thisEN.$removeIcon, event)) {
      _this.emit('press', (0, _EventEmitter.copyEvent)(event, {
        target: thisEN,
        type: 'press'
      }), _this);
    }
  });
  this.$iconCtn = $('div.absol-exp-node-ext-icon', this);
  this.$extIcon = $('img.absol-exp-node-ext-icon', this);
  this.$name = $('span.absol-exp-node-name', this);
  this.$desc = $('span.absol-exp-node-desc', this);
  (0, _utils.contenteditableTextOnly)(this.$name, function (text) {
    return text.replace(/[\\\/\|\?\:\<\>\*\r\n]/, '').trim();
  });
  _OOP["default"].drillProperty(thisEN, thisEN.$extIcon, 'extSrc', 'src');
  this._level = 0;
  this.__isExpNode__ = true;
  return thisEN;
}
ExpNode.tag = 'expnode';
ExpNode.render = function () {
  return _({
    tag: 'button',
    extendEvent: ['pressremove', 'press', 'presstoggle'],
    "class": 'absol-exp-node',
    child: ['.absol-exp-node-level', 'remove-ico', 'toggler-ico', 'img.absol-exp-node-ext-icon', 'div.absol-exp-node-ext-icon', 'span.absol-exp-node-name', 'span.absol-exp-node-desc']
  });
};
ExpNode.property = {};
ExpNode.property.icon = {
  set: function set(value) {
    if (this.$iconP) {
      this.$iconP.remove();
      this.$iconP = undefined;
    }
    if (value) {
      var newE;
      if (_Dom["default"].isDomNode(value)) {
        newE = value;
      } else {
        newE = _(value);
      }
      this.$iconP = newE;
      this.$iconCtn.addChild(newE);
      this._icon = value;
    } else {
      this._icon = undefined;
    }
  },
  get: function get() {
    return this._icon;
  }
};
ExpNode.property.level = {
  set: function set(value) {
    value = value || 0;
    if (value !== this.level) {
      this._level = value || 0;
      this.$level.innerHTML = '&nbsp;'.repeat(this._level * 6);
    }
  },
  get: function get() {
    return this._level || 0;
  }
};
ExpNode.property.name = {
  set: function set(value) {
    value = value + '';
    this._name = value;
    this.$name.clearChild();
    if (value && value.length > 0) this.$name.addChild(_({
      text: value
    }));
  },
  get: function get() {
    return this._name || '';
  }
};
ExpNode.property.desc = {
  set: function set(value) {
    this._desc = (value || '') + '';
    this.$desc.clearChild();
    this.$desc.addChild(_({
      text: this._desc
    }));
  },
  get: function get() {
    return this._desc || '';
  }
};
ExpNode.property.status = {
  set: function set(value) {
    this.removeClass('status-open').removeClass('status-close').removeClass('status-modified').removeClass('status-removable');
    if (!value || value == 'none') {
      //todo
    } else if (value == 'close') {
      this.addClass('status-close');
    } else if (value == 'open') {
      this.addClass('status-open');
    } else if (value == 'removable') {
      this.addClass('status-removable');
    } else if (value == 'modified') {
      this.addClass('status-modified');
    } else {
      throw new Error('Invalid status ' + value);
    }
    this._status = value;
  },
  get: function get() {
    return this._status;
  }
};
ExpNode.property.active = {
  set: function set(value) {
    if (value) {
      this.addClass('as-active');
      this.addClass('active');
    } else {
      this.removeClass('as-active');
      this.removeClass('active');
    }
  },
  get: function get() {
    return this.hasClass('as-active');
  }
};
ExpNode.prototype.rename = function (resolveCallback, rejectCallback) {
  var self = this;
  var span = this.$name;
  var lastName = span.innerHTML;
  span.attr('contenteditable', 'true');
  span.focus();
  document.execCommand('selectAll', false, null);
  function keydowEventHandle(event) {
    var key = event.key;
    if (key == 'Enter') {
      event.preventDefault();
      span.blur();
      span.attr('contenteditable', undefined);
    } else if (key == "ESC") {
      event.preventDefault();
      span.innerHTML = lastName;
      span.blur();
      span.attr('contenteditable', undefined);
    }
  }
  function blurEventHandle(event) {
    finish();
    var curentName = span.innerHTML.replace(/[\\\/\|\?\:\<\>\*\r\n]/, '').trim();
    if (curentName == lastName) {
      rejectCallback && rejectCallback();
    } else {
      if (curentName.length == 0) {
        span.innerHTML = lastName;
        rejectCallback && rejectCallback();
      } else {
        var res = resolveCallback && resolveCallback(curentName);
        if (res === false) {
          span.innerHTML = lastName;
        } else if (res && res.then) {
          res.then(function (result) {
            if (result === false) {
              span.innerHTML = lastName;
              //faile
            } else {
              //success
            }
          }, function () {
            //reject value
            span.innerHTML = lastName;
          });
        } else {
          //success
        }
      }
    }
  }
  function finish() {
    span.off('keydown', keydowEventHandle);
    span.off('blur', blurEventHandle);
    $(document.body).once('click', function () {
      setTimeout(function () {
        span.attr('contenteditable', undefined);
      }, 2);
    });
  }
  span.on('keydown', keydowEventHandle);
  span.on('blur', blurEventHandle);
};
ExpNode.prototype.findNodeBefore = function () {
  var tree = this.parentElement;
  var root;
  var prevTree;
  var res = null;
  if (tree.__isExpTree__) {
    root = tree.getRoot();
    root.visitRecursive(function (cTree) {
      if (cTree === tree) {
        res = prevTree;
      }
      prevTree = cTree;
    });
  }
  return res && res.getNode();
};
ExpNode.prototype.findNodeAfter = function () {
  var tree = this.parentElement;
  var root;
  var prevTree;
  var res = null;
  if (tree.__isExpTree__) {
    root = tree.getRoot();
    root.visitRecursive(function (cTree) {
      if (prevTree === tree) {
        res = cTree;
      }
      prevTree = cTree;
    });
  }
  return res && res.getNode();
};
ExpNode.eventHandler = {};

/****
 *
 * @param {KeyboardEvent} event
 */
ExpNode.eventHandler.buttonKeydown = function (event) {
  if (event.target === this) {
    if (!event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey) {
      var destNode;
      var tree = this.parentElement;
      var parentTree = tree && tree.getParent();
      switch (event.key) {
        case 'ArrowLeft':
          if (tree.status === 'open') {
            tree.status = 'close';
            tree.notifyStatusChange();
          } else {
            destNode = parentTree && parentTree.getNode();
          }
          break;
        case 'ArrowRight':
          if (tree.status === 'close') {
            tree.status = 'open';
            tree.notifyStatusChange();
          } else {
            destNode = this.findNodeAfter();
          }
          break;
        case 'ArrowUp':
          destNode = this.findNodeBefore();
          break;
        case 'ArrowDown':
          destNode = this.findNodeAfter();
          break;
        case 'Space':
          this.click();
          break;
      }
      if (destNode) {
        destNode.focus();
        event.preventDefault();
      }
    }
  }
};

/***
 * @extends AElement
 * @constructor
 */
function ExpTree() {
  var thisET = this;
  this.$node = $('expnode', this).on('press', function (event) {
    thisET.emit('press', Object.assign({}, {
      target: thisET,
      node: this,
      type: 'press'
    }, event), this);
  }).on('pressremove', function (event) {
    thisET.emit('pressremove', Object.assign({}, {
      target: thisET,
      node: this,
      type: 'pressremove'
    }, event), this);
  }).on('presstoggle', this.eventHandler.nodePressToggle);
  this.$itemsContainer = $('.absol-exp-items', thisET);
  _OOP["default"].drillProperty(this, this.$node, ['desc', 'name', 'title', 'extSrc', 'active', 'icon']);
  this.__isExpTree__ = true;
  this._level = 0;
}
ExpTree.tag = 'ExpTree'.toLowerCase();
ExpTree.render = function () {
  return _({
    "class": 'absol-exp-tree',
    extendEvent: ['press', 'pressremove', 'statuschange'],
    child: ['expnode', '.absol-exp-items']
  });
};
ExpTree.property = {};
ExpTree.property.level = {
  set: function set(value) {
    value = value || 0;
    if (value != this.level) {
      this.$node.level = value;
      Array.prototype.forEach.call(this.$itemsContainer.childNodes, function (e) {
        e.level = value + 1;
      });
    }
  },
  get: function get() {
    return this.$node.level;
  }
};
ExpTree.property.status = {
  set: function set(value) {
    this.$node.status = value;
    if (value != 'open') {
      this.addClass('hide-children');
    } else {
      this.removeClass('hide-children');
    }
  },
  get: function get() {
    return this.$node.status;
  }
};
['findChildBefore', 'findChildAfter', 'removeChild', 'clearChild'].forEach(function (key) {
  ExpTree.prototype[key] = function () {
    this.$itemsContainer[key].apply(this.$itemsContainer, arguments);
  };
});
ExpTree.prototype.addChild = function (child) {
  if (!child.__isExpTree__) throw new Error('Child node must be a ExpTree');
  child.level = this.level + 1;
  this.$itemsContainer.addChild(child);
};
ExpTree.prototype.addChildBefore = function (child, at) {
  child.level = this.level + 1;
  this.$itemsContainer.addChildBefore(child, at);
};
ExpTree.prototype.addChildAfter = function (child, at) {
  child.level = this.level + 1;
  this.$itemsContainer.addChildAfter(child, at);
};

/****
 *
 * @return {ExpTree}
 */
ExpTree.prototype.getParent = function () {
  var current = this.parentNode;
  while (current) {
    if (current.__isExpTree__) break;
    current = current.parentNode;
  }
  return current;
};

/***
 *
 * @return {ExpTree}
 */
ExpTree.prototype.getRoot = function () {
  var parent = this.getParent();
  if (!parent) return this;
  return parent.getRoot();
};
ExpTree.prototype.getNode = function () {
  return this.$node;
};
ExpTree.prototype.getChildren = function () {
  return Array.apply(null, this.$itemsContainer.childNodes);
};

/***
 *
 * @param {function(tree: ExpTree): void} cb
 */
ExpTree.prototype.visitRecursive = function (cb) {
  cb(this);
  if (this.status === 'open') Array.prototype.forEach.call(this.$itemsContainer.childNodes, function (child) {
    child.visitRecursive(cb);
  });
};
ExpTree.prototype.getPath = function () {
  var path = [];
  var current = this;
  while (current) {
    path.push(current.name);
    current = current.getParent();
  }
  return path.reverse();
};
ExpTree.prototype.accessByPath = function (path) {
  if (path.length == 0) return this;
  var childs = this.getChildren();
  var res;
  for (var i = 0; i < childs.length; ++i) {
    if (childs[i].name == path[0]) {
      res = childs[i].accessByPath(path.slice(1));
      break;
    }
  }
  return res;
};
ExpTree.prototype.toggle = function () {
  switch (this.status) {
    case 'close':
      this.status = 'open';
      break;
    case 'open':
      this.status = 'close';
      break;
  }
};
ExpTree.prototype.notifyStatusChange = function (props) {
  this.emit('statuschange', Object.assign({
    type: 'statuschange',
    target: this
  }, props), this);
};
ExpTree.eventHandler = {};
ExpTree.eventHandler.nodePressToggle = function (event) {
  this.toggle();
  this.notifyStatusChange({
    originEvent: event
  });
};

/***
 * @extends ExpTree
 * @constructor
 */
function ExpGroup() {
  this.addClass('as-exp-group');
  this.__isExpTree__ = true;
  this.name = '';
}
ExpGroup.tag = 'ExpGroup'.toLowerCase();
ExpGroup.render = function () {
  return _('div');
};

/***
 *
 * @param {function(tree: ExpTree): void} cb
 */
ExpGroup.prototype.visitRecursive = function (cb) {
  Array.prototype.forEach.call(this.childNodes, function (child) {
    child.visitRecursive(cb);
  });
};
ExpGroup.prototype.getParent = function () {
  return null;
};
ExpGroup.prototype.getRoot = function () {
  return this;
};
ExpGroup.prototype.getNode = function () {
  return null;
};
_ACore["default"].install(ExpNode);
_ACore["default"].install(ExpTree);
_ACore["default"].install(ExpGroup);
var _default = ExpTree;
/**
 *
 * @param {ExpTree|AElement} elt
 * @param {{inputElt: SearchTextInput}=} opt
 * @constructor
 */
exports["default"] = _default;
function ExpSearcher(elt, opt) {
  this.elt = elt;
  this.cache = {};
  this.prevHash = null;
  this.searching = false;
  this.state = {};
  this.ev_stopTyping = this.ev_stopTyping.bind(this);
  this.inputElt = opt && opt.inputElt;
}
ExpSearcher.prototype.reset = function () {
  var _this2 = this;
  if (!this.searching) return;
  this.cache = {};
  this.searching = false;
  this.elt.removeClass('as-searching');
  var visit = function visit(treeNode) {
    treeNode.removeClass('as-in-search-result').removeStyle('order');
    if (_this2.state[treeNode.id]) {
      if (treeNode.status === 'open' || treeNode.status === 'close' && _this2.state[treeNode.id] !== 'none') {
        treeNode.status = _this2.state[treeNode.id];
      }
    }
    _this2.getChildrenOf(treeNode).forEach(function (c) {
      return visit(c);
    });
  };
  visit(this.elt);
};
ExpSearcher.prototype.backupState = function () {
  var _this3 = this;
  this.state = {};
  var visit = function visit(treeNode) {
    if (!treeNode.id) treeNode.id = (0, _stringGenerate.randomIdent)(5);
    _this3.state[treeNode.id] = treeNode.status;
    _this3.getChildrenOf(treeNode).forEach(function (c) {
      return visit(c);
    });
  };
  visit(this.elt);
};

/**
 *
 * @param {ExpTree|AElement} nd
 * @returns {Array<ExpTree|AElement>}
 */
ExpSearcher.prototype.getChildrenOf = function (nd) {
  if (nd.getChildren) return nd.getChildren();
  return Array.prototype.slice.call(nd.childNodes);
};

/**
 *
 * @param {ExpTree|AElement} nd
 * @returns {ExpTree|AElement}
 */
ExpSearcher.prototype.getParentOf = function (nd) {
  if (nd.getParent) return nd.getParent();
  return nd.parentElement;
};
ExpSearcher.prototype.query = function (text) {
  var _this4 = this;
  text = text || '';
  text = text.trim();
  if (text.length === 0) {
    this.reset();
    return;
  }
  if (!this.searching) {
    this.backupState();
    this.searching = true;
  }
  var newHash = 0;
  var makeItem = function makeItem(treeNode) {
    if (!treeNode.id) treeNode.id = (0, _stringGenerate.randomIdent)(5);
    if (!treeNode.__searchItem__) {
      treeNode.__searchItem__ = {
        text: treeNode.name.replace(/[_-]/g, ' '),
        value: treeNode.id
      };
      (0, _search["default"])(treeNode.__searchItem__);
    }
    var item = treeNode.__searchItem__;
    newHash = (0, _stringUtils.stringHashCode)(newHash + item.text);
    var children = _this4.getChildrenOf(treeNode);
    if (children.length > 0) {
      item.items = children.map(function (c) {
        return makeItem(c);
      });
    } else {
      delete item.items;
    }
    return item;
  };
  var items = [makeItem(this.elt)];
  if (newHash !== this.prevHash) {
    this.prevHash = newHash;
    this.cache = {};
  }
  var searchRes = this.cache[text] || (0, _search.searchTreeListByText)(text, items);
  var dict = searchRes.reduce(function cb(ac, cr, i) {
    ac[cr.value] = i;
    if (cr.items) cr.items.reduce(cb, ac);
    return ac;
  }, {});
  var visit = function visit(treeNode) {
    if (treeNode.id in dict) {
      treeNode.addClass('as-in-search-result').addStyle('order', dict[treeNode.id]);
    } else {
      treeNode.removeClass('as-in-search-result').removeStyle('order');
    }
    _this4.getChildrenOf(treeNode).forEach(function (c) {
      return visit(c);
    });
  };
  visit(this.elt);
  this.elt.addClass('as-searching');
};
ExpSearcher.prototype.ev_stopTyping = function () {
  this.query(this.inputElt.value);
};
ExpSearcher.prototype.destroy = function () {
  this.inputElt = null;
  this.query('');
};
Object.defineProperty(ExpSearcher.prototype, 'inputElt', {
  set: function set(elt) {
    if (this._inputElt) {
      this._inputElt.off('stoptyping', this.ev_stopTyping);
      this._inputElt = null;
    }
    if (elt) {
      this._inputElt = elt;
      elt.on('stoptyping', this.ev_stopTyping);
    }
  },
  get: function get() {
    return this._inputElt;
  }
});

/***/ }),

/***/ 37496:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(37959);
var _DelaySignal = _interopRequireDefault(__webpack_require__(81809));
var _keyboard = __webpack_require__(95141);
var _stringMatching = __webpack_require__(59163);
var _PositionTracker = _interopRequireDefault(__webpack_require__(97252));
var _utils = __webpack_require__(84512);
var _Dom = __webpack_require__(64821);
var _SCGrammar = _interopRequireDefault(__webpack_require__(43480));
var _DPParser = _interopRequireDefault(__webpack_require__(7679));
var _DPParseInstance = __webpack_require__(36093);
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _EventEmitter = __webpack_require__(46833);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _Array = __webpack_require__(40411);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends PositionTracker
 * @constructor
 */
function ExpressionInput() {
  this.domSignal = new _DelaySignal["default"]();
  this.$rangeCtn = (0, _ACore.$)('.as-expression-input-range-ctn', this);
  this.$content = (0, _ACore.$)('.as-expression-input-content', this);
  this.$iconCtn = (0, _ACore.$)('.as-expression-input-icon-ctn', this);
  // this.$forground = $('.as-expression-input-foreground', this);

  /**
   *
   * @type {null|AElement}
   */
  this.$icon = null;
  this.$alertIcon = (0, _ACore.$)('.mdi.mdi-alert-circle', this.$iconCtn);
  this.engine = new EIEngine(this);
  this.userActionCtrl = new EIUserActionController(this);
  // this.selection = new EISelection(this);

  this.autoCompleteCtrl = new EIAutoCompleteController(this);
  this.undoMgn = new EIUndoManager(this);
  this.cmdTool = new EICommandTool(this);
  this._icon = null;

  /****
   * @name value
   * @type {string}
   * @memberOf ExpressionInput#
   */

  /**
   * @type {{variables: string[], functions: string[], sampleJS?:{getFunctions: function(): string[], getVariables: function(): string[]}}}
   * @memberOf ExpressionInput#
   * @name autocomplete
   */
  /**
   * @type {*}
   * @memberOf ExpressionInput#
   * @name icon
   */
}

ExpressionInput.tag = 'ExpressionInput'.toLowerCase();
ExpressionInput.render = function () {
  return (0, _ACore._)({
    tag: _PositionTracker["default"],
    extendEvent: ['stopchange', 'blur', 'focus'],
    "class": ['as-expression-input'],
    child: [{
      "class": 'as-expression-input-icon-ctn',
      child: ['span.mdi.mdi-alert-circle']
    }, {
      "class": 'as-expression-input-content',
      attr: {
        contenteditable: 'true',
        spellcheck: 'false'
      }
    } //,
    // { class: 'as-expression-input-range-ctn' },
    ]
  });
};

ExpressionInput.prototype.requestUpdateSize = function () {
  if (this.cmdTool && this.cmdTool.$ctn && this.cmdTool.$ctn.parentElement) {
    this.cmdTool.$ctn.updatePosition();
  }
};
ExpressionInput.prototype.notifySizeCanBeChanged = function () {
  var bound = this.getBoundingClientRect();
  if (!this._prevSize || this._prevSize.width !== bound.width || this._prevSize.height !== bound.height) {
    _ResizeSystem["default"].updateUp(this, true);
  }
  this._prevSize = {
    width: bound.width,
    height: bound.height
  };
};
ExpressionInput.prototype.revokeResource = function () {
  (0, _utils.revokeResource)(this.engine);
  (0, _utils.revokeResource)(this.autoCompleteCtrl);
  (0, _utils.revokeResource)(this.undoMgn);
  (0, _utils.revokeResource)(this.cmdTool);
  (0, _utils.revokeResource)(this.domSignal);
};
ExpressionInput.prototype.focus = function () {
  this.$content.focus();
  this.engine.setSelectedPosition(this.engine.value.length);
};
ExpressionInput.property = {};
ExpressionInput.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
      this.$content.removeAttribute('contenteditable');
    } else {
      this.removeClass('as-read-only');
      if (!this.hasClass('as-disabled')) {
        this.$content.setAttribute('contenteditable', 'true');
      }
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
ExpressionInput.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
      this.$content.removeAttribute('contenteditable');
    } else {
      this.removeClass('as-disabled');
      if (!this.hasClass('as-read-only')) {
        this.$content.setAttribute('contenteditable', 'true');
      }
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
ExpressionInput.property.value = {
  get: function get() {
    return this.engine.value;
  },
  set: function set(value) {
    this.engine.value = value;
    this.undoMgn.reset();
  }
};
ExpressionInput.property.icon = {
  /**
   * @this ExpressionInput
   * @param value
   */
  set: function set(value) {
    if (this.$icon) this.$icon.remove();
    this.$iconCtn.clearChild();
    var elt;
    if ((0, _Dom.isDomNode)(value)) {
      if (value.parentElt) value = value.cloneNode(true);
      elt = value;
    } else if (value && (typeof value === 'string' || _typeof(value) === 'object')) {
      if (value === 'default') value = 'span.mdi.mdi-equal';
      elt = (0, _ACore._)(value);
    }
    if (elt) {
      this.$iconCtn.addChild(elt);
      this.$icon = elt;
      this.addClass('as-has-icon');
    } else {
      this.$icon = null;
      value = null;
      this.removeClass('as-has-icon');
    }
    this._icon = value;
  },
  get: function get() {
    return this._icon;
  }
};

/***
 * @memberOf ExpressionInput#
 * @type {{}}
 */
ExpressionInput.eventHandler = {};
_ACore["default"].install(ExpressionInput);
var _default = ExpressionInput;
/**
 *
 * @param {ExpressionInput} elt
 * @constructor
 */
exports["default"] = _default;
function EIUserActionController(elt) {
  var _this = this;
  this.elt = elt;
  this.$content = elt.$content;
  this._stopChangeTO = -1;
  /**
   *
   * @type {EIEngine}
   */
  this.engine = elt.engine;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.elt.on('stopchange', function () {
    _this.elt.undoMgn.commit();
    _this.elt.engine.highlightError();
  });
  this.$content.on({
    cut: this.ev_cut,
    blur: this.ev_blur,
    focus: this.ev_focus,
    paste: this.ev_paste,
    keydown: this.ev_keydown
  });
}
EIUserActionController.prototype.delayNotifyStopChange = function () {
  if (this._stopChangeTO > 0) {
    clearTimeout(this._stopChangeTO);
  }
  this._stopChangeTO = setTimeout(function () {
    this._stopChangeTO = -1;
    this.elt.emit('stopchange', {}, this.elt);
  }.bind(this), 200);
};
EIUserActionController.prototype.ev_keydown = function (event) {
  var _this2 = this;
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  if (key.match(/^[a-zA-Z0-9]$/)) {
    this.elt.engine.requestRedrawTokens();
    setTimeout(function () {
      _this2.elt.autoCompleteCtrl.openDropdownIfNeed();
      if (_this2.elt.autoCompleteCtrl.isOpen) {
        _this2.elt.autoCompleteCtrl.updateDropDownContent();
      }
    }, 200);
  } else if (key === 'enter') {
    event.preventDefault();
    if (this.elt.autoCompleteCtrl.isSelecting()) {
      this.elt.autoCompleteCtrl.applySelectingSuggestion();
    } else {
      this.engine.breakLine();
    }
  } else if (key === 'arrowleft' || key === 'arrowright' || key.match(/^[^a-zA-Z0-9]$/)) {
    this.elt.autoCompleteCtrl.closeDropdownIfNeed();
  } else if (key === 'arrowup' || key === 'arrowdown') {
    if (this.elt.autoCompleteCtrl.isSelecting()) {
      event.preventDefault();
      this.elt.autoCompleteCtrl.moveSelectingSuggestion(key === 'arrowup' ? 'up' : 'down');
    }
  } else if (key === 'ctrl-space') {
    this.engine.redrawTokens();
    this.elt.autoCompleteCtrl.openDropdown();
  } else if (key === 'escape') {
    if (this.elt.autoCompleteCtrl.isOpen) {
      this.elt.autoCompleteCtrl.closeDropdown();
      event.preventDefault();
    }
  } else if (key === 'ctrl-z') {
    event.preventDefault();
    this.elt.undoMgn.undo();
  } else if (key === 'ctrl-y') {
    event.preventDefault();
    this.elt.undoMgn.redo();
  } else if (event.ctrlKey && event.key === 'X' || !event.ctrlKey && event.key.length === 1 || event.key === 'Delete' || event.key === 'Backspace') {
    this.elt.engine.requestRedrawTokens();
    setTimeout(function () {
      _this2.elt.autoCompleteCtrl.openDropdownIfNeed();
      if (_this2.elt.autoCompleteCtrl.isOpen) {
        _this2.elt.autoCompleteCtrl.updateDropDownContent();
      }
    }, 200);
  }
  this.delayNotifyStopChange();
  setTimeout(function () {
    _this2.elt.notifySizeCanBeChanged();
  }, 1);
};
EIUserActionController.prototype.ev_paste = function (event) {
  var paste = (event.clipboardData || window.clipboardData).getData('text');
  paste = paste.replace(/[\r\n]+/g, ' ');
  event.preventDefault();
  var pos = this.elt.engine.getSelectPosition();
  if (!pos || !paste) return;
  var value = this.elt.value;
  this.elt.engine.value = value.substring(0, pos.start) + paste + value.substring(pos.end);
  this.elt.engine.setSelectedPosition(pos.start + paste.length);
  this.elt.engine.highlightError();
  this.elt.notifySizeCanBeChanged();
};
EIUserActionController.prototype.ev_cut = function (event) {
  this.elt.domSignal.emit('redrawTokens');
  this.delayNotifyStopChange();
  this.elt.notifySizeCanBeChanged();
};
EIUserActionController.prototype.ev_focus = function (event) {
  this.elt.engine.clearErrorHighlight();
  setTimeout(function () {
    //todo
    this.elt.engine.getSelectPosition();
  }.bind(this), 100);
};
EIUserActionController.prototype.ev_blur = function (event) {
  this.elt.engine.highlightError();
};
EIUserActionController.prototype.ev_dragInit = function (event) {};

/**
 *
 * @param {ExpressionInput} elt
 * @constructor
 */
function EIEngine(elt) {
  this.elt = elt;
  this.lastSelectedPosition = {
    start: 0,
    end: 0,
    direction: 'forward'
  };
  this.$content = elt.$content;
  /**
   *
   * @type {null|Range}
   */
  this.range = null;
  this.elt.domSignal.on('redrawTokens', this.redrawTokens.bind(this));
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this._isListenSelectionChange = false;
  this.$content.on('focus', this.ev_focus);
}
EIEngine.prototype.ev_focus = function () {
  if (!this._isListenSelectionChange) {
    document.addEventListener('selectionchange', this.ev_range);
    this._isListenSelectionChange = true;
  }
};
EIEngine.prototype.ev_range = function () {
  if (!this.elt.isDescendantOf(document.body)) {
    document.removeEventListener('selectionchange', this.ev_range);
    this._isListenSelectionChange = false;
  }
  this.updateRange();
};
EIEngine.prototype.revokeResource = function () {
  if (this._isListenSelectionChange) {
    document.removeEventListener('selectionchange', this.ev_range);
    this._isListenSelectionChange = false;
  }
};
EIEngine.prototype.requestRedrawTokens = function () {
  this.elt.domSignal.emit('redrawTokens');
};
EIEngine.prototype.highlightError = function () {
  var elt = this.elt;
  var contentElt = this.$content;
  var value = elt.value.trim();
  var it = EIParser.parse(value, 'exp');
  var i,
    notSkipCount = 0;
  var tokenErrorIdx = -1;
  if (value && it.error) {
    elt.addClass('as-error');
    elt.attr('title', it.error.message);
    tokenErrorIdx = it.error.tokenIdx;
  } else {
    elt.removeClass('as-error');
  }
  for (i = 0; i < contentElt.childNodes.length; ++i) {
    //todo: fix conflict (run before redraw)
    if (contentElt.childNodes[i].getAttribute && contentElt.childNodes[i].classList.contains('as-token') && contentElt.childNodes[i].getAttribute('data-type') !== 'skip') {
      if (notSkipCount === tokenErrorIdx) {
        contentElt.childNodes[i].classList.add('as-unexpected-token');
      } else {
        contentElt.childNodes[i].classList.remove('as-unexpected-token');
      }
      notSkipCount++;
    }
  }
};
EIEngine.prototype.clearErrorHighlight = function () {
  var contentElt = this.$content;
  for (var i = 0; i < contentElt.length; ++i) {
    if (contentElt.childNodes[i].classList.contains('as-token') && contentElt.childNodes[i].getAttribute('data-type') !== 'skip') {
      contentElt.childNodes[i].classList.remove('as-unexpected-token');
    }
  }
};
EIEngine.prototype.drawTokensContent = function () {
  var selectedPos = this.getSelectPosition();
  var value = this.value;
  var tokens = EIParser.tokenizer.tokenize(value);
  var tokenEltChain = Array.prototype.slice.call(this.$content.childNodes);
  while (tokenEltChain[tokenEltChain.length - 1] && tokenEltChain[tokenEltChain.length - 1].tagName === 'BR') {
    tokenEltChain.pop();
  }
  var leftPassed = 0;
  while (leftPassed < tokenEltChain.length && leftPassed < tokens.length) {
    if (!tokenEltChain[leftPassed].firstChild || !tokenEltChain[leftPassed].classList.contains('as-token') || tokens[leftPassed].content !== tokenEltChain[leftPassed].firstChild.data) break;
    if (!tokenEltChain[leftPassed].token || tokenEltChain[leftPassed].getAttribute('data-type') !== tokens[leftPassed].type) {
      tokenEltChain[leftPassed].setAttribute('data-type', tokens[leftPassed].type);
    }
    leftPassed++;
  }
  var rightPassed = 0;
  while (rightPassed < tokenEltChain.length && rightPassed < tokens.length) {
    if (!tokenEltChain[tokenEltChain.length - 1 - rightPassed].firstChild || !tokenEltChain[tokenEltChain.length - 1 - rightPassed].classList.contains('as-token') || tokens[tokens.length - 1 - rightPassed].content !== tokenEltChain[tokenEltChain.length - 1 - rightPassed].firstChild.data) break;
    if (tokenEltChain[tokenEltChain.length - 1 - rightPassed].getAttribute('data-type') !== tokens[tokens.length - 1 - rightPassed].type) {
      tokenEltChain[tokenEltChain.length - 1 - rightPassed].setAttribute('data-type', tokens[tokens.length - 1 - rightPassed].type);
    }
    rightPassed++;
  }
  var beforeToken;
  if (leftPassed + rightPassed < Math.max(tokenEltChain.length, tokens.length)) {
    beforeToken = tokenEltChain[tokenEltChain.length - rightPassed];
    tokenEltChain.splice(leftPassed, tokenEltChain.length - leftPassed - rightPassed).forEach(function (elt) {
      elt.remove();
    });
    tokens.slice(leftPassed, tokens.length - rightPassed).forEach(function (token) {
      var tokenElt = this.makeTokenElt(token);
      if (beforeToken) {
        this.$content.addChildBefore(tokenElt, beforeToken);
      } else {
        this.$content.addChild(tokenElt);
      }
    }.bind(this));
  }
  if (selectedPos) this.setSelectedPosition(selectedPos);
};
EIEngine.prototype.updateTokenExType = function () {
  /**
   * @type {HTMLElement[]}
   */

  var tokenEltChain = Array.prototype.slice.call(this.$content.childNodes);
  var token, nextToken;
  var i, j;
  for (i = 0; i < tokenEltChain.length; ++i) {
    token = tokenEltChain[i];
    if (this.isTextNode(token)) continue;
    if (token.innerText === "true" || token.innerText === "false") {
      token.setAttribute('data-ex-type', 'boolean');
    } else if (token.getAttribute('data-type') === 'word') {
      j = i + 1;
      nextToken = tokenEltChain[i + 1];
      while (nextToken) {
        if (nextToken.getAttribute('data-type') === 'symbol' && nextToken.innerText === '(') {
          token.setAttribute('data-ex-type', 'function');
          break;
        } else if (nextToken.getAttribute('data-type') === 'skip') {
          nextToken = tokenEltChain[++j];
        } else {
          break;
        }
      }
    } else {
      token.removeAttribute('data-ex-type');
    }
  }
};
EIEngine.prototype.redrawTokens = function () {
  this.drawTokensContent();
  this.updateTokenExType();
  this.elt.notifySizeCanBeChanged();
};

/**
 *
 * @param {{type: string, content: string}} token
 * @returns {*}
 */
EIEngine.prototype.makeTokenElt = function (token) {
  if (token.content === '\n') return (0, _ACore._)('br');
  return (0, _ACore._)({
    tag: 'span',
    "class": ['as-token'],
    attr: {
      'data-type': token.type
    },
    child: {
      text: token.content
    }
  });
};
EIEngine.prototype.insertText = function (text) {
  var lastPos = this.getSelectPosition();
  var value;
  if (this.lastSelectedPosition) {
    value = this.elt.value;
    this.value = value.substring(0, lastPos.start) + text + value.substring(lastPos.end);
    this.lastSelectedPosition = Object.assign({
      direction: 'forward',
      start: lastPos.start + text.length,
      end: lastPos.start + text.length
    });
    if (document.activeElement === this.elt.$content) {
      this.setSelectedPosition(this.lastSelectedPosition);
    }
  } else this.appendText(text);
  this.elt.userActionCtrl.delayNotifyStopChange();
};
EIEngine.prototype.appendText = function (text) {
  var newValue = this.value + text;
  this.value = newValue;
  if (document.activeElement === this.$content) {
    this.setSelectedPosition(newValue.length);
  }
  this.elt.userActionCtrl.delayNotifyStopChange();
};
EIEngine.prototype.isValidRange = function (range) {
  return _AElement["default"].prototype.isDescendantOf.call(range.startContainer, this.$content) && _AElement["default"].prototype.isDescendantOf.call(range.endContainer, this.$content);
};
EIEngine.prototype.updateRange = function () {
  var sel = window.getSelection();
  var range;
  for (var i = 0; i < sel.rangeCount; ++i) {
    range = sel.getRangeAt(i);
    if (this.isValidRange(range)) this.range = range;
  }
};
EIEngine.prototype.isTextNode = function (node) {
  return node.nodeType === Node.TEXT_NODE;
};
EIEngine.prototype.isWordToken = function (node) {
  if (this.isTextNode(node)) return false;
  return node.getAttribute('data-type') === 'word';
};
EIEngine.prototype.isSymbolToken = function (node) {
  if (this.isTextNode(node)) return false;
  return node.getAttribute('data-type') === 'symbol';
};
EIEngine.prototype.isMemberSymbolToken = function (node) {
  return this.isSymbolToken(node) && node.innerText === '->';
};
EIEngine.prototype.isSkipToken = function (node) {
  if (this.isTextNode(node)) return false;
  return node.getAttribute('data-type') === 'skip';
};
EIEngine.prototype.getRange = function () {
  this.updateRange();
  return this.range;
};

/**
 *
 * @param {Range} range
 */
EIEngine.prototype.setRange = function (range) {
  this.range = range;
  var sel = window.getSelection();
  sel.removeAllRanges();
  sel.addRange(range);
};
EIEngine.prototype.childIndexOf = function (node) {
  if (!node.parentElement) return 0;
  return Array.prototype.indexOf.call(node.parentElement.childNodes, node);
};
EIEngine.prototype.lcaOf = function (nd1, nd2) {
  var track1 = [];
  var track2 = [];
  var rootNode = this.elt;
  while (nd1 && nd1 !== rootNode) {
    track1.unshift(nd1);
    nd1 = nd1.parentElement;
  }
  while (nd2 && nd2 !== rootNode) {
    track2.unshift(nd2);
    nd2 = nd2.parentElement;
  }
  var res = null;
  for (var i = 0; i < track1.length && i < track2.length; ++i) {
    if (track1[i] === track2[i]) res = track1[i];else break;
  }
  return res;
};
EIEngine.prototype.trimLeft = function (nd, ofs) {
  if (this.isTextNode(nd)) {
    nd.data = nd.data.substring(ofs);
  } else {
    for (var i = 0; i < ofs; ++i) {
      nd.removeChild(nd.firstChild);
    }
  }
};
EIEngine.prototype.trimRight = function (nd, ofs) {
  if (this.isTextNode(nd)) {
    nd.data = nd.data.substring(0, ofs);
  } else {
    while (nd.childNodes.length > ofs) {
      nd.removeChild(nd.lastChild);
    }
  }
};
EIEngine.prototype.breakTextNode = function (textNode, offset) {
  var parent = (0, _ACore.$)(textNode.parentElement);
  var text = textNode.data;
  var newTextNode = (0, _ACore._)({
    text: text.substring(offset)
  });
  textNode.data = text.substring(0, offset);
  parent.addChildAfter(newTextNode, textNode);
  return newTextNode;
};
EIEngine.prototype.breakElement = function (elt, offset) {
  var parent = (0, _ACore.$)(elt.parentElement);
  var newElt = elt.cloneNode(false);
  var rightChildren = Array.prototype.slice.call(elt.childNodes, offset);
  for (var i = 0; i < rightChildren.length; ++i) {
    newElt.appendChild(rightChildren[i]);
  }
  parent.addChildAfter(newElt, elt);
  return newElt;
};
EIEngine.prototype.breakNode = function (node, offset) {
  if (this.isTextNode(node)) {
    return this.breakTextNode(node, offset);
  } else {
    return this.breakElement(node, offset);
  }
};
EIEngine.prototype.breakLine = function () {
  var range = this.getRange();
  if (!range) return;
  var startCtn = range.startContainer;
  var endCtn = range.endContainer;
  var startOfs = range.startOffset;
  var endOfs = range.endOffset;
  var newNd;
  var lcaNd = this.lcaOf(startCtn, endCtn);
  while (startCtn !== lcaNd) {
    this.trimRight(startCtn, startOfs);
    startOfs = this.childIndexOf(startCtn) + 1;
    startCtn = startCtn.parentElement;
  }
  while (endCtn !== lcaNd) {
    this.trimLeft(endCtn, endOfs);
    endOfs = this.childIndexOf(endCtn);
    endCtn = endCtn.parentElement;
  }
  if (this.isTextNode(startCtn)) {
    newNd = startCtn.parentElement.cloneNode(false);
    newNd.appendChild((0, _ACore._)({
      text: startCtn.data.substring(0, startOfs)
    }));
    startCtn.parentElement.parentElement.insertBefore(newNd, startCtn.parentElement);
    startCtn.data = startCtn.data.substring(endOfs);
    newNd = (0, _ACore._)('br');
    startCtn.parentElement.parentElement.insertBefore(newNd, startCtn.parentElement);
    startCtn = newNd.parentElement;
    startOfs = this.childIndexOf(newNd) + 1;
    endCtn = startCtn;
    endOfs = startOfs;
  } else if (startCtn === this.$content) {
    Array.prototype.slice.call(startCtn.childNodes, startOfs, endOfs - 1).forEach(function (nd) {
      return nd.remove();
    });
    newNd = (0, _ACore._)('br');
    startCtn.insertBefore(newNd, startCtn.childNodes[startOfs]);
    endOfs = startOfs + 1;
    startOfs = endOfs;
  } else {
    endCtn = this.breakElement(startCtn, startOfs);
    endOfs -= startCtn;
    if (endOfs >= 0) {
      newNd = this.breakElement(endCtn, endOfs);
      endCtn.remove();
      endCtn = newNd;
      endOfs = 0;
    }
    newNd = (0, _ACore._)('br');
    endCtn.parentElement.insertBefore(newNd, endCtn);
    startCtn = newNd.parentElement;
    startOfs = this.childIndexOf(newNd) + 1;
    endCtn = startCtn;
    endOfs = startOfs;
  }
  var childNodes = Array.prototype.slice.call(this.$content.childNodes);
  var nd;
  for (var i = 0; i < childNodes.length; ++i) {
    nd = childNodes[i];
    if (nd.tagName === 'BR') continue;
    if (this.stringOf(nd).length === 0) {
      if (_AElement["default"].prototype.isDescendantOf.call(startCtn, nd)) {
        startCtn = this.$content;
        startOfs = this.childIndexOf(nd);
      }
      if (_AElement["default"].prototype.isDescendantOf.call(endCtn, nd)) {
        endCtn = this.$content;
        endOfs = this.childIndexOf(nd);
      }
      nd.remove();
    }
  }
  range = document.createRange();
  range.setStart(startCtn, startOfs);
  range.setEnd(endCtn, endOfs);
  this.setRange(range);
};
EIEngine.prototype.domRange2SelectPosition = function (range) {
  var sel = window.getSelection();
  if (!range) return null;
  var direction = 'forward';
  if (!range) return null;
  var cmpPosition = sel.anchorNode.compareDocumentPosition(sel.focusNode);
  if (cmpPosition === 4) {
    direction = 'forward';
  } else if (cmpPosition === 2) {
    direction = 'backward';
  } else if (!cmpPosition && sel.anchorOffset > sel.focusOffset || cmpPosition === Node.DOCUMENT_POSITION_PRECEDING) {
    direction = 'backward';
  }
  var startOffset = this.getPosition(range.startContainer, range.startOffset);
  var endOffset = this.getPosition(range.endContainer, range.endOffset);
  if (isNaN(startOffset)) return null;
  return {
    start: startOffset,
    end: endOffset,
    direction: direction,
    startCtn: range.startContainer,
    startOffset: range.startOffset,
    endCtn: range.endContainer,
    endOffset: range.endOffset
  };
};
EIEngine.prototype.getSelectPosition = function () {
  var range = this.getRange();
  this.lastSelectedPosition = this.domRange2SelectPosition(range) || this.lastSelectedPosition;
  return this.lastSelectedPosition;
};

/**
 *
 * @param  {null|number|{start: number, end: number}=}pos
 */
EIEngine.prototype.setSelectedPosition = function (pos) {
  var _this3 = this;
  var start;
  var end;
  if (typeof pos === "number") {
    start = pos;
    end = pos;
  } else if (pos === null) {
    return;
  } else {
    start = pos.start;
    end = pos.end;
  }
  var startCtn, startOfs, endCtn, endOfs;
  var text;
  text = '';
  var visit = function visit(nd) {
    var prevText = text;
    var parent = nd.parentElement;
    if (_this3.isTextNode(nd)) {
      text += nd.data;
      if (text.length > start && prevText.length <= start) {
        startCtn = nd;
        startOfs = start - prevText.length;
      }
      if (text.length > end && prevText.length <= end) {
        endCtn = nd;
        endOfs = end - prevText.length;
      }
    } else if (nd.tagName === 'BR' && parent && parent.lastChild !== nd) {
      text += '\n';
      if (text.length > start && prevText.length <= start) {
        startCtn = parent;
        startOfs = _this3.childIndexOf(nd);
      }
      if (text.length > end && prevText.length <= end) {
        endCtn = parent;
        endOfs = _this3.childIndexOf(nd);
      }
    } else {
      for (var i = 0; i < nd.childNodes.length; ++i) {
        visit(nd.childNodes[i]);
      }
    }
  };
  visit(this.$content);
  if (!startCtn) {
    startCtn = this.$content;
    startOfs = this.$content.childNodes.length;
  }
  if (!endCtn) {
    endCtn = startCtn;
    endOfs = startOfs;
  }
  var range = document.createRange();
  range.setStart(startCtn, startOfs);
  range.setEnd(endCtn, endOfs);
  this.setRange(range);
};
EIEngine.prototype.getPosition = function (node, offset) {
  var _this4 = this;
  var text = '';
  var found = false;
  var visit = function visit(nd) {
    var i;
    if (found) return;
    if (nd === node) {
      if (_this4.isTextNode(nd)) {
        text += nd.data.substring(0, offset);
      } else {
        for (i = 0; i < nd.childNodes.length && i < offset; ++i) {
          visit(nd.childNodes[i]);
        }
      }
      found = true;
      return;
    }
    var parent = nd.parentElement;
    if (nd.tagName === 'BR' && parent && parent.lastChild !== nd) {
      text += '\n';
    }
    if (_this4.isTextNode(nd)) {
      text += nd.data;
    } else {
      for (i = 0; i < nd.childNodes.length && !found; ++i) {
        visit(nd.childNodes[i]);
      }
    }
  };
  visit(this.$content);
  return text.length;
};
EIEngine.prototype.stringOf = function (node) {
  var _this5 = this;
  if (!node) return '';
  if (node.nodeType === 3) {
    return node.data;
  }
  var res = '';
  var parent = node.parentElement;
  if ((node.tagName === 'BR' || node.tagName === 'br') && parent && parent.lastChild !== node) {
    return '\n';
  } else if ((node.tagName === 'DIV' || node.tagName === 'div') && parent && parent.firstChild !== node) {
    res += '\n';
  }
  return res + Array.prototype.map.call(node.childNodes, function (cNode, index, arr) {
    return _this5.stringOf(cNode, node);
  }).join('');
};

/**
 *
 * @param offset
 * @returns {AElement}
 */
EIEngine.prototype.tokenAt = function (offset) {
  var l = 0;
  var res = null;
  var nd, i;
  for (i = 0; i < this.$content.childNodes.length; ++i) {
    nd = this.$content.childNodes[i];
    l += this.stringOf(nd).length;
    if (l > offset || i + 1 === this.$content.childNodes.length && l === offset) {
      res = nd;
      break;
    }
  }
  return res;
};

/**
 *
 * @param {AElement}token
 * @returns {AElement}
 */
EIEngine.prototype.findPrefixWordTokenOf = function (token) {
  if (!token) return null;
  if (!this.isWordToken(token) && this.stringOf(token) !== '->') return null;
  var temp = token;
  var prefixStartElt = null;
  var state = this.isWordToken(temp) ? 0 : 1; //0: after is word, 1: symbol
  temp = temp.previousSibling;
  while (temp) {
    if (this.isSkipToken(temp)) {
      temp = temp.previousSibling;
      continue;
    }
    if (state === 0) {
      if (this.stringOf(temp) === '->') {
        state = 1;
      } else break;
    } else {
      if (this.isWordToken(temp)) {
        prefixStartElt = temp;
        state = 0;
      } else break;
    }
    temp = temp.previousSibling;
  }
  return prefixStartElt || null;
};

//
// EIEngine.prototype.selectCurrentMemberExpression = function () {
//     var rage = this.getRange();
//     if (!rage) return;
//     var startCtn = rage.startContainer;
//     var endCtn = rage.endContainer;
//     var startOfs = rage.startOffset;
//     var endOfs = rage.endOffset;
//
// };

Object.defineProperty(EIEngine.prototype, 'value', {
  get: function get() {
    var _this6 = this;
    return Array.prototype.map.call(this.$content.childNodes, function (nd) {
      return _this6.stringOf(nd);
    }).join('');
  },
  set: function set(value) {
    var tokens = EIParser.tokenizer.tokenize(value || '');
    this.$content.clearChild().addChild(tokens.map(function (token) {
      return this.makeTokenElt(token);
    }.bind(this)));
    this.updateTokenExType();
    this.lastSelectedPosition = {
      start: value.length,
      end: value.length,
      direction: 'forward'
    };
  }
});

/**
 *
 * @param {ExpressionInput} elt
 * @constructor
 */
function EIUndoManager(elt) {
  this.elt = elt;
  this.reset();
}

/**
 *
 * @returns {boolean} is changed value and commit success
 */
EIUndoManager.prototype.commit = function () {
  var text = this.elt.value;
  var range = this.elt.engine.getSelectPosition() || {
    start: text.length,
    end: text.length
  };
  var curValue = this.stack[this.idx].value;
  if (curValue === text) return false;
  var newItem = {
    value: text,
    range: {
      start: range.start,
      end: range.end,
      direction: range.direction || 'forward'
    }
  };
  while (this.stack.length > this.idx + 1) {
    this.stack.pop();
  }
  this.idx = this.stack.length;
  this.stack.push(newItem);
  return true;
};
EIUndoManager.prototype.reset = function () {
  var value = this.elt.value;
  this.stack = [{
    value: value,
    range: {
      start: value.length,
      end: value.length,
      direction: "forward"
    }
  }];
  this.idx = 0;
};
EIUndoManager.prototype.undo = function () {
  if (this.idx <= 0) return;
  this.idx--;
  var item = this.stack[this.idx];
  this.elt.engine.value = item.value;
  this.elt.engine.setSelectedPosition(item.range);
};
EIUndoManager.prototype.redo = function () {
  if (this.idx + 1 >= this.stack.length) return;
  this.idx++;
  var item = this.stack[this.idx];
  this.elt.engine.value = item.value;
  this.elt.engine.setSelectedPosition(item.range);
};

/**
 *
 * @param {ExpressionInput} elt
 * @constructor
 */
function EIAutoCompleteController(elt) {
  this.elt = elt;
  this.$content = elt.$content;
  this.$tokenTarget = null;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.rawSuggestionCache = {
    value: null,
    time: 0
  };

  /**
   *
   * @type {EISuggestionList |null}
   */
  this.$suggestionList = null;
  this.query = null;
  this.isOpen = false;
  this.dropIsDown = true;
}
EIAutoCompleteController.prototype.revokeResource = function () {};
EIAutoCompleteController.prototype.openDropdownIfNeed = function () {
  if (this.isOpen) return;
  var query = this.getCurrentSearch();
  if (query && query.value && query.value.trim()) {
    this.openDropdown();
  }
};

/**
 *
 */
EIAutoCompleteController.prototype.openDropdown = function () {
  var _this7 = this;
  if (this.isOpen) {
    this.updateDropDownContent();
    return;
  }
  if (!this.hasSuggestions()) return;
  this.isOpen = true;
  this.dropIsDown = true;
  if (!this.$suggestionList) {
    this.$suggestionList = (0, _ACore._)({
      tag: EISuggestionList,
      style: {
        top: '10px',
        left: '10px',
        position: 'fixed'
      },
      on: {
        select: function select(event) {
          _this7.applySuggestion(event.data);
          _this7.closeDropdown();
        }
      }
    });
  }
  this.$suggestionList.addTo(this.elt);
  var zIndex = (0, _utils.findMaxZIndex)(this.elt) + 1;
  this.$suggestionList.addStyle('z-index', zIndex + '');
  this.$suggestionList.reset();
  this.elt.startTrackPosition();

  // this.$dropDown.addTo(this.elt);

  this.$tokenTarget = null;
  this.updateDropDownContent();
  this.updateDropDownPosition();
  setTimeout(function () {
    document.addEventListener('click', _this7.ev_clickOut);
  }, 200);
};
EIAutoCompleteController.prototype.closeDropdown = function () {
  if (!this.isOpen) return;
  this.isOpen = false;
  this.elt.stopTrackPosition();
  this.$suggestionList.remove();
  document.removeEventListener('click', this.ev_clickOut);
};

/**
 *
 * @returns {null|{prefix: string, value, tokenElt: HTMLElement, prefixStartElt: HTMLElement}}
 */
EIAutoCompleteController.prototype.getCurrentSearch = function () {
  var engine = this.elt.engine;
  var pos = this.elt.engine.getSelectPosition();
  if (!pos) return null; //all
  var tokenElt = this.elt.engine.tokenAt(pos.start);
  if (!tokenElt) return null;
  if (!engine.isWordToken(tokenElt)) {
    tokenElt = tokenElt.previousSibling;
  }
  if (!tokenElt) return null;
  var temp = tokenElt;
  while (temp) {
    if (engine.isSymbolToken(temp)) {
      if (engine.stringOf(temp) === '->') {
        tokenElt = temp;
      } else {
        break;
      }
    } else if (engine.isSkipToken(temp)) {} else if (engine.isWordToken(temp)) {
      tokenElt = temp;
    }
    temp = temp.nextSibling;
  }
  if (!engine.isWordToken(tokenElt) && !engine.isMemberSymbolToken(tokenElt)) return null;
  var res = {
    prefix: '',
    value: '',
    tokenElt: null,
    prefixStartElt: null
  };
  temp = tokenElt;
  var prefixStartElt = engine.findPrefixWordTokenOf(tokenElt);
  res.value = engine.stringOf(tokenElt);
  res.tokenElt = tokenElt;
  if (prefixStartElt) {
    res.prefixStartElt = prefixStartElt;
    temp = prefixStartElt;
    while (temp !== tokenElt) {
      if (engine.isSkipToken(temp)) {
        temp = temp.nextSibling;
        continue;
      }
      res.prefix += engine.stringOf(temp);
      temp = temp.nextSibling;
    }
  }
  return res;
};
EIAutoCompleteController.prototype.getCurrentText = function () {
  var pos = this.elt.engine.getSelectPosition();
  if (!pos) return '';
  var res = {
    value: '',
    tokenElt: null
  };
  var tokenElt = this.elt.engine.tokenAt(pos.start);
  if (!tokenElt || !tokenElt.getAttribute || tokenElt.getAttribute('data-type') !== 'word') {
    res.tokenElt = tokenElt;
    res.value = '';
    tokenElt = null;
  }
  if (!tokenElt && pos && pos.start > 0) {
    tokenElt = this.elt.engine.tokenAt(pos.start - 1);
  }
  if (tokenElt && tokenElt.getAttribute && tokenElt.getAttribute('data-type') === 'word') {
    res.value = tokenElt.innerText;
    res.tokenElt = tokenElt;
  }
  console.log(res);
  return res;
};
EIAutoCompleteController.prototype.updateDropDownContent = function () {
  if (!this.isOpen) return;
  this.query = this.getCurrentSearch();
  this.$suggestionList.data = this.getSuggestionTree(this.query);
  this.$suggestionList.selectMaxScoreItem();
  this.updateDropDownPosition();
};
EIAutoCompleteController.prototype.updateDropDownPosition = function () {
  if (!this.isOpen) return;
  var bound;
  var targetELt = this.query && this.query.tokenElt;
  var range = this.elt.engine.getRange();
  var selected = this.elt.engine.getSelectPosition();
  var dropBound = this.$suggestionList.getBoundingClientRect();
  if (targetELt) {
    bound = targetELt.getBoundingClientRect();
  }
  if (!bound) {
    bound = range.getBoundingClientRect();
    if (!bound.width || !bound.height) bound = null;
  }
  if (!bound && selected) {
    targetELt = this.elt.engine.tokenAt(selected.start);
    if (targetELt) {
      bound = targetELt.getBoundingClientRect();
    }
  }
  if (!bound) {
    bound = this.elt.$content.getBoundingClientRect();
  }
  var screenHeight = (0, _Dom.getScreenSize)().height;
  var aTop = bound.top - 10;
  var aBottom = screenHeight - bound.bottom - 10;
  var contentHeight = this.$suggestionList.scrollHeight;
  if (this.dropIsDown) {
    if (aBottom < contentHeight && aBottom <= aTop) {
      this.dropIsDown = false;
    }
  } else {
    if (aTop < contentHeight && aTop <= aBottom) {
      this.dropIsDown = true;
    }
  }
  var screenSize = (0, _Dom.getScreenSize)();
  this.$suggestionList.addStyle('left', Math.max(0, Math.min(bound.left, screenSize.width - dropBound.width)) + 'px');
  this.$suggestionList.addStyle('max-height', this.dropIsDown ? aBottom + 'px' : aTop + 'px');
  var listBound;
  if (this.dropIsDown) {
    this.$suggestionList.addStyle('top', bound.bottom + 'px');
  } else {
    listBound = this.$suggestionList.getBoundingClientRect();
    this.$suggestionList.addStyle('top', bound.top - listBound.height + 'px');
  }
};
EIAutoCompleteController.prototype.getRawSuggestion = function () {
  var now = Date.now();
  if (now - this.rawSuggestionCache.time < 3000) {
    return this.rawSuggestionCache.value;
  }
  var variables = [];
  var functions = [];
  var temp;
  if (this.elt.autocomplete) {
    temp = this.elt.autocomplete.variables;
    if (typeof temp === "function") temp = temp();
    if (Array.isArray(temp)) {
      temp = temp.filter(function (x) {
        return typeof x === 'string';
      });
      variables = variables.concat(temp);
    }
    temp = this.elt.autocomplete.functions;
    if (typeof temp === "function") temp = temp();
    if (Array.isArray(temp)) {
      temp = temp.filter(function (x) {
        return typeof x === 'string';
      });
      functions = functions.concat(temp);
    }
    if (this.elt.sampleJS && typeof this.elt.sampleJS.getFunctions === "function") {
      temp = this.elt.sampleJS.getFunctions();
      if (Array.isArray(temp)) {
        temp = temp.filter(function (x) {
          return typeof x === 'string';
        });
        functions = functions.concat(temp);
      }
    }
  }
  variables = (0, _Array.arrayUnique)(variables);
  functions = (0, _Array.arrayUnique)(functions);
  this.rawSuggestionCache.value = {
    variables: variables,
    functions: functions
  };
  this.rawSuggestionCache.time = now;
  return this.rawSuggestionCache.value;
};
EIAutoCompleteController.prototype.hasSuggestions = function () {
  var rawSuggestions = this.getRawSuggestion();
  return rawSuggestions.variables.length > 0 || rawSuggestions.functions.length > 0;
};

/**
 *
 * @param {string} text
 * @param {string} prefix
 */
EIAutoCompleteController.prototype.getSuggestionList = function (text, prefix) {
  var res = [];
  prefix = prefix || '';
  text = text || '';
  text = text.toLowerCase();
  var rawSuggestion = this.getRawSuggestion();
  var variables = rawSuggestion.variables;
  var functions = rawSuggestion.functions;
  var i;
  var itemText, score;
  for (i = 0; i < variables.length; ++i) {
    itemText = variables[i];
    score = (0, _stringMatching.phraseMatch)(itemText.toLowerCase(), text);
    res.push({
      text: itemText,
      score: score,
      type: 'variable'
    });
  }
  for (i = 0; i < functions.length; ++i) {
    itemText = functions[i];
    score = (0, _stringMatching.phraseMatch)(itemText.toLowerCase(), text);
    res.push({
      text: itemText,
      score: score,
      type: 'function'
    });
  }
  res.sort(function (a, b) {
    if (a.score === b.score) {
      return a.text > b.text ? 1 : -1;
    }
    return b.score - a.score;
  });
  if (text) res = res.filter(function (x) {
    return x.score > 0;
  });
  return res;
};
EIAutoCompleteController.prototype.computeScore = function (queryWords, itemWords) {
  if (queryWords.length === 0) return 1;
  queryWords = queryWords.map(function (x) {
    return x.toLowerCase();
  });
  itemWords = itemWords.map(function (x) {
    return x.toLowerCase();
  });
  var score = 0;
  var wordScore = 1 / queryWords.length;
  var i, j;
  for (i = 0; i < queryWords.length && i < itemWords.length; ++i) {
    if (queryWords[i] === itemWords[i]) {
      score += wordScore;
    } else {
      score += wordScore * (0, _stringMatching.wordLike)(queryWords[i], itemWords[i]);
    }
  }
  var qDict = queryWords.reduce(function (ac, cr) {
    ac[cr] = true;
    return ac;
  }, {});
  var iDict = itemWords.reduce(function (ac, cr) {
    ac[cr] = true;
    return ac;
  }, {});
  var bestMatch, bestWord, curWordScore;
  queryWords = Object.keys(qDict);
  itemWords = Object.keys(iDict);
  for (i = 0; i < queryWords.length; ++i) {
    bestMatch = 0;
    bestWord = '';
    for (j = 0; j < itemWords.length; ++j) {
      if (queryWords[i] === itemWords[j]) {
        bestMatch = wordScore;
        bestWord = itemWords[j];
        break;
      } else {
        curWordScore = wordScore * (0, _stringMatching.wordLike)(queryWords[i], itemWords[j]);
        if (curWordScore > bestMatch) {
          bestMatch = curWordScore;
          bestWord = itemWords[j];
        }
      }
    }
    if (bestWord) {
      iDict[bestWord] = false;
      score += bestMatch;
    }
  }
  return score;
};
EIAutoCompleteController.prototype.getSuggestionTree = function (query) {
  var splitWords = function splitWords(text) {
    return text.split(/[^a-zA-Z0-9_$]+/).filter(function (x) {
      return x.length > 0;
    });
  };
  var queryWords = query ? splitWords(query.prefix + ' ' + query.value) : [];
  var rawSuggestion = this.getRawSuggestion();
  var variables = rawSuggestion.variables;
  var functions = rawSuggestion.functions;
  var items = [];
  var item;
  var i;
  for (i = 0; i < variables.length; ++i) {
    items.push({
      text: variables[i],
      type: 'variable',
      words: splitWords(variables[i])
    });
  }
  for (i = 0; i < functions.length; ++i) {
    items.push({
      text: functions[i],
      type: 'function',
      words: splitWords(functions[i])
    });
  }
  var min = Infinity,
    max = -Infinity;
  for (i = 0; i < items.length; ++i) {
    item = items[i];
    item.score = this.computeScore(queryWords, item.words);
    if (item.score < min) min = item.score;
    if (item.score > max) max = item.score;
  }
  var idx;
  if (query) {
    for (i = 0; i < items.length; ++i) {
      item = items[i];
      idx = item.text.toLowerCase().indexOf(query.value.toLowerCase());
      if (idx >= 0) item.score = max - idx / 1000;
    }
  }
  items.sort(function (a, b) {
    return b.score - a.score;
  });
  var mid = (max + min) / 2;
  items = items.filter(function (x) {
    return x.score >= mid;
  });
  var trees = [];
  var nodeDict = {
    "*": {
      text: "",
      children: trees
    }
  };
  items.forEach(function (item) {
    var words = item.words;
    var k;
    var key = '';
    var nd;
    var parent = nodeDict['*'];
    for (k = 0; k < words.length; ++k) {
      if (k > 0) key += '->';
      key += words[k];
      nd = nodeDict[key];
      if (!nd) {
        nd = {
          text: words[k],
          children: [],
          key: key,
          score: 0
        };
        nodeDict[key] = nd;
        parent.children.push(nd);
      }
      parent = nd;
    }
    parent.item = item;
    parent.score = item.score;
  });
  return trees;
};
EIAutoCompleteController.prototype.applySuggestion = function (suggestion) {
  var engine = this.elt.engine;
  var query = this.query;
  var key = suggestion.key;
  var words = key.split('->');
  var startToken = query && query.prefixStartElt;
  var endToken = query && query.tokenElt;
  startToken = startToken || endToken;
  var range;
  var rangeStartCtn, rangeStartOffset, rangeEndCtn, rangeEndOffset;
  var i, tokenElt;
  var oldValue, newValue;
  var selected;
  if (startToken && endToken && engine.isWordToken(startToken) && (engine.isWordToken(endToken) || engine.stringOf(endToken) === '->')) {
    for (i = 0; i < words.length; ++i) {
      if (i > 0) {
        tokenElt = engine.makeTokenElt({
          type: 'symbol',
          content: '->'
        });
        this.elt.$content.insertBefore(tokenElt, startToken);
      }
      tokenElt = engine.makeTokenElt({
        type: 'word',
        content: words[i]
      });
      this.elt.$content.insertBefore(tokenElt, startToken);
      if (i + 1 === words.length) {
        rangeStartCtn = this.elt.$content;
        rangeStartOffset = engine.childIndexOf(tokenElt) + 1;
        rangeEndCtn = rangeStartCtn;
        rangeEndOffset = rangeStartOffset;
      }
    }
    while (startToken !== endToken) {
      tokenElt = startToken.nextSibling;
      startToken.remove();
      startToken = tokenElt;
    }
    endToken.remove();
    range = document.createRange();
    range.setStart(rangeStartCtn, rangeStartOffset);
    range.setEnd(rangeEndCtn, rangeEndOffset);
    engine.setRange(range);
  } else {
    oldValue = this.elt.value;
    selected = engine.getSelectPosition();
    newValue = oldValue.substring(0, selected.start) + key + oldValue.substring(selected.end);
    this.elt.engine.value = newValue;
    this.elt.engine.setSelectedPosition(selected.start + key.length);
  }
  engine.updateTokenExType();
};
EIAutoCompleteController.prototype.isSelecting = function () {
  return this.isOpen && this.$suggestionList && this.$suggestionList.$selectedNode && true;
};
EIAutoCompleteController.prototype.applySelectingSuggestion = function () {
  if (this.isSelecting()) {
    this.applySuggestion(this.$suggestionList.$selectedNode.data);
    //todo
    // this.applySuggestion(this.$item[this.selectedIdx].getAttribute('data-suggestion'));
    this.closeDropdown();
  }
};
EIAutoCompleteController.prototype.closeDropdownIfNeed = function () {
  var _this8 = this;
  setTimeout(function () {
    var text = _this8.getCurrentText();
    _this8.$tokenTarget = text && text.tokenElt;
    if (_this8.isOpen) {
      if (!_this8.$tokenTarget || _this8.$tokenTarget.getAttribute('data-type') !== 'word') {
        _this8.closeDropdown();
      }
    }
  }, 5);
};

/**
 *
 * @param {"down"|"up"} direction
 * @returns {boolean}
 */
EIAutoCompleteController.prototype.moveSelectingSuggestion = function (direction) {
  if (direction !== 'down' && direction !== 'up') return false;
  if (!this.hasSuggestions()) return false;
  if (this.isSelecting()) {
    if (direction === 'down') {
      return this.$suggestionList.moveToNextSuggestion();
    } else {
      return this.$suggestionList.moveToPrevSuggestion();
    }
  }
};
EIAutoCompleteController.prototype.ev_positionChange = function (event) {
  if (!this.elt.isDescendantOf(document.body)) {
    this.elt.stopTrackPosition();
    return;
  }
  //todo
};

EIAutoCompleteController.prototype.ev_clickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$suggestionList, event)) return;
  this.closeDropdown();
};

/**
 *
 * @param {ExpressionInput} elt
 * @constructor
 */
function EICommandTool(elt) {
  var _this9 = this;
  this.elt = elt;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.isOpen = false;
  this.$ctn = (0, _ACore._)({
    tag: _Follower["default"],
    "class": 'as-ei-command-tool',
    props: {
      anchor: [6, 1]
    },
    child: [
    // {
    //     tag: 'button',
    //     class: 'as-transparent-button',
    //     child: 'span.mdi.mdi-function-variant',
    //     attr: {
    //         title: 'Insert [Ctrl + I]'
    //     },
    // },
    {
      tag: 'button',
      "class": 'as-transparent-button',
      child: 'span.mdi.mdi-magnify',
      attr: {
        title: 'Hint [Ctrl + Space]'
      },
      on: {
        click: function click() {
          _this9.elt.autoCompleteCtrl.openDropdown();
          _this9.elt.engine.setSelectedPosition(_this9.elt.engine.lastSelectedPosition);
        }
      }
    }]
  });
  this.elt.$content.on('focus', this.ev_focus);
}
EICommandTool.prototype.open = function () {
  if (this.isOpen) return;
  this.elt.emit('focus', {
    type: 'focus',
    originalEvent: event,
    target: this.elt
  }, this.elt);
  if (this.elt.autoCompleteCtrl.getSuggestionList().length === 0) return;
  this.isOpen = true;
  this.$ctn.addTo(this.elt);
  this.$ctn.followTarget = this.elt;
  var zIndex = (0, _utils.findMaxZIndex)(this.elt) + 1;
  this.$ctn.addStyle('z-index', zIndex);
  document.addEventListener('click', this.ev_clickOut);
};
EICommandTool.prototype.close = function () {
  if (!this.isOpen) return;
  this.isOpen = false;
  this.elt.emit('blur', {
    type: 'blur',
    originalEvent: event,
    target: this.elt
  }, this.elt);
  document.removeEventListener('click', this.ev_clickOut);
  this.$ctn.selfRemove();
};
EICommandTool.prototype.ev_focus = function (event) {
  this.open();
};
EICommandTool.prototype.ev_clickOut = function (ev) {
  if ((0, _EventEmitter.hitElement)(this.elt, ev)) return;
  this.close();
};
EICommandTool.prototype.revokeResource = function () {
  this.elt.$content.on('focus', this.ev_focus);
  this.close();
};

/**
 * @extends {AElement}
 * @constructor
 */
function EISuggestionList() {
  /**
   *
   * @type {EISuggestionNode}
   */
  this.$selectedNode = null;
  this._data = [];
  this.$children = [];
}
EISuggestionList.prototype.reset = function () {
  //todo: select first suggestion
};
EISuggestionList.prototype.moveToNextSuggestion = function () {
  if (this.$selectedNode) {
    return this.selectElt(this.$selectedNode.nextSibling || this.childNodes[0]);
  } else {
    return this.selectElt(this.$children[0]);
  }
};
EISuggestionList.prototype.moveToPrevSuggestion = function () {
  if (this.$selectedNode) {
    return this.selectElt(this.$selectedNode.previousSibling || this.lastChild);
  } else {
    return this.selectElt(this.lastChild);
  }
};
EISuggestionList.render = function () {
  return (0, _ACore._)({
    extendEvent: ['select'],
    "class": ['am-select-tree-leaf-box-list', 'as-bscroller', 'as-dropdown-box-common-style', 'as-ei-suggestion-list']
  });
};
EISuggestionList.prototype.selectElt = function (elt) {
  elt = elt || null;
  if (elt === this.$selectedNode) return false;
  if (this.$selectedNode) {
    this.$selectedNode.removeClass('as-selected');
  }
  this.$selectedNode = elt;
  if (elt) {
    elt.addClass('as-selected');
  }
  if (this.isDescendantOf(document.body)) {
    (0, _utils.vScrollIntoView)(elt);
  }
  return true;
};
EISuggestionList.prototype.selectMaxScoreItem = function () {
  var maxPath = [];
  var maxScore = 0;
  var visit = function visit(nd, path) {
    if (nd.data.score > maxScore) {
      maxScore = nd.data.score;
      maxPath = path.concat([nd]);
    }
    path.push(nd);
    nd.$children.forEach(function (child) {
      visit(child, path);
    });
    path.pop();
  };
  this.$children.forEach(function (node) {
    visit(node, []);
  });
  maxPath.forEach(function (node) {
    node.open();
  });
  if (maxPath.length > 0) {
    this.selectElt(maxPath[maxPath.length - 1]);
  }
};
EISuggestionList.property = {};
EISuggestionList.property.data = {
  set: function set(data) {
    data = data || [];
    this._data = data;
    this.clearChild();
    this.$children = data.map(function (it) {
      return (0, _ACore._)({
        tag: EISuggestionNode,
        props: {
          data: it
        }
      });
    });
    var viewElements = [];
    this.$children.forEach(function (child) {
      child.getViewElements(viewElements);
    });
    this.addChild(viewElements);
  },
  get: function get() {
    return this._data;
  }
};
EISuggestionList.property.selectedSuggestions = {
  get: function get() {
    return this.$selectedNode ? this.$selectedNode.data : null;
  }
};

/**
 * @typedef {Object} EISuggestionNodeData
 * @property {string} text
 * @property {string} value
 * @property {string} [desc]
 * @property {string} type
 * @property {boolean} [noSelect]
 * @property {EISuggestionNodeData[]} [children]
 */

/**
 * @extends {AElement}
 * @constructor
 */
function EISuggestionNode() {
  var _this10 = this;
  this.$text = (0, _ACore.$)('.as-eisli-text', this);
  this.$desc = (0, _ACore.$)('.as-eisli-desc', this);
  this.$iconCtn = (0, _ACore.$)('.as-eisli-icon-ctn', this);
  this._level = 0;
  this._data = {
    text: '',
    desc: ''
  };
  this.on('click', function (event) {
    _this10.parentElement.emit('select', {
      type: 'select',
      originalEvent: event,
      target: _this10,
      data: _this10.data
    }, _this10);
  });

  /**
   *
   * @type {EISuggestionNode[]}
   */
  this.$children = [];
  /**
   * @type {"none"|"open"|"close"}
   * @name status
   * @memberOf EISuggestionNode#
   */

  /**
   * @type {EISuggestionNodeData}
   * @name data
   * @memberOf EISuggestionNode#
   */
  /**
   * @type {number}
   * @name level
   * @memberOf EISuggestionNode#
   */
}

EISuggestionNode.render = function () {
  return (0, _ACore._)({
    "class": ['as-ei-suggestion-list-item'],
    child: [{
      "class": 'as-eisli-toggler',
      child: 'toggler-ico'
    }, {
      "class": 'as-eisli-icon-ctn'
    }, {
      "class": 'as-eisli-text',
      child: {
        text: ''
      }
    }, {
      "class": 'as-eisli-desc',
      child: {
        text: ''
      }
    }]
  });
};
EISuggestionNode.prototype.getViewElements = function (ac) {
  ac = ac || [];
  ac.push(this);
  if (this.status === 'open') {
    this.$children.forEach(function (child) {
      child.getViewElements(ac);
    });
  }
  return ac;
};
EISuggestionNode.prototype.close = function () {
  if (!this.hasClass(' as-status-open')) return;
  var viewElements = this.getViewElements();
  this.addClass('as-status-close').removeClass('as-status-open');
  viewElements.shift();
  for (var i = 0; i < viewElements.length; ++i) {
    viewElements[i].remove();
  }
};
EISuggestionNode.prototype.open = function () {
  if (!this.hasClass(' as-status-close')) return;
  this.addClass('as-status-open').removeClass('as-status-close');
  var nextSibling = this.nextSibling;
  var viewElements = this.getViewElements();
  for (var i = 0; i < viewElements.length; ++i) {
    this.insertBefore(viewElements[i], nextSibling);
  }
};
EISuggestionNode.property = {};
EISuggestionNode.property.data = {
  /**
   * @this {EISuggestionNode}
   * @param {EISuggestionNodeData} data
   */
  set: function set(data) {
    var _this11 = this;
    this._data = data || {};
    this.$text.firstChild.data = data.text || '';
    this.$desc.firstChild.data = data.desc || '';
    if (data.noSelect) {
      this.addClass('as-no-select');
    }
    this.$children = (data.children || []).map(function (childData) {
      return (0, _ACore._)({
        tag: EISuggestionNode,
        props: {
          data: childData,
          level: _this11.level + 1
        }
      });
    });
    this.$iconCtn.clearChild();
    if (data.item) {
      switch (data.item.type) {
        case 'variable':
          this.$iconCtn.addChild((0, _ACore._)('span.mdi.mdi-variable'));
          if (data.children && data.children.length > 0) {
            this.status = 'open';
          }
          break;
        case 'function':
          this.$iconCtn.addChild((0, _ACore._)('span.mdi.mdi-function'));
          break;
      }
    } else {
      this.status = 'open';
      this.$iconCtn.addChild((0, _ACore._)('span.mdi.mdi-code-json'));
    }
  },
  get: function get() {
    return this._data;
  }
};
EISuggestionNode.property.level = {
  set: function set(value) {
    this.addStyle('--level', value + '');
    this._level = value;
    this.$children.forEach(function (child) {
      child.level = value + 1;
    });
  },
  get: function get() {
    return this._level;
  }
};
EISuggestionNode.property.status = {
  set: function set(value) {
    if (value === 'open') {
      this.addClass('as-status-open').removeClass('as-status-close');
    } else if (value === 'close') {
      this.addClass('as-status-close').removeClass('as-status-open');
    }
  },
  get: function get() {
    if (this.hasClass('as-status-open')) return 'open';
    if (this.hasClass('as-status-close')) return 'close';
    return 'none';
  }
};

/*********************************
 * EXPRESSION
 */

var rules = [];
var operatorOrder = {
  'NOT': 4,
  '!': 4,
  '*': 5,
  '/': 5,
  'MOD': 5,
  '%': 5,
  '+': 6,
  '-': 6,
  '<': 9,
  '>': 9,
  '<=': 9,
  '>=': 9,
  '==': 9,
  '=': 9,
  '===': 9,
  '!=': 9,
  'AND': 14,
  '&&': 14,
  'OR': 15,
  '||': 15,
  'XOR': 15
};
rules.push({
  target: 'null',
  elements: ['_null'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'NullLiteral'
    };
  }
});
rules.push({
  target: 'ident',
  elements: ['.word'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'Identifier',
      name: parsedNode.children[0].content
    };
  }
});
rules.push({
  target: 'args_list',
  elements: ['exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  },
  toASTChain: function toASTChain(parsedNode) {
    return [(0, _DPParseInstance.parsedNodeToAST)(parsedNode)];
  }
});
rules.push({
  target: 'args_list',
  elements: ['args_list', '_,', 'exp'],
  longestOnly: true,
  ident: 'args_list_rec',
  toASTChain: function toASTChain(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[0]).concat((0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2]));
  }
});
rules.push({
  target: 'function_callee',
  elements: ['ident'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'function_callee',
  elements: ['mem_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'function_call',
  elements: ['function_callee', '_(', 'args_list', '_)'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'CallExpression',
      arguments: parsedNode.children[2].rule.toASTChain(parsedNode.children[2]),
      callee: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])
    };
  }
});
rules.push({
  target: 'function_call',
  elements: ['function_callee', '_(', '_)'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'CallExpression',
      arguments: [],
      callee: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])
    };
  }
});
rules.push({
  target: 'new_expression',
  elements: ['_new', 'function_call'],
  toAST: function toAST(parsedNode) {
    var callAst = (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]);
    return {
      type: 'NewExpression',
      arguments: callAst.arguments,
      callee: callAst.callee
    };
  }
});
rules.push({
  target: 'exp',
  elements: ['new_expression'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'exp',
  elements: ['null'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'exp',
  elements: ['ident'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'number',
  elements: ['.number'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'NumericLiteral',
      value: parseFloat(parsedNode.children[0].content)
    };
  }
});
rules.push({
  target: 'string',
  elements: ['.string'],
  toAST: function toAST(parsedNode) {
    var content = parsedNode.children[0].content;
    if (content[0] === "'") content = '"' + content.substring(1, content.length - 1).replace(/["]/g, '\\"') + '"';
    return {
      type: 'StringLiteral',
      value: JSON.parse(content)
    };
  }
});
rules.push({
  target: 'boolean',
  elements: ['_true'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'BooleanLiteral',
      value: true
    };
  }
});
rules.push({
  target: 'boolean',
  elements: ['_false'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'BooleanLiteral',
      value: false
    };
  }
});
rules.push({
  target: 'exp',
  elements: ['number'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'exp',
  elements: ['string'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'exp',
  elements: ['boolean'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
['+', '-', '*', '/', '%', '&&', '||', 'XOR', "=", '==', '===', '!=', '<', '>', '>=', '<='].forEach(function (op) {
  rules.push({
    target: 'bin_op',
    elements: ['_' + op],
    toAST: function toAST(parsedNode) {
      return {
        type: "BinaryOperator",
        content: op
      };
    }
  });
});
var x = Math.m;
rules.push({
  target: 'exp',
  elements: ['exp', 'bin_op', 'exp'],
  // longestOnly: true,//* error when parse return (...)...
  ident: 'bin_op_rec',
  toASTChain: function toASTChain(parseNode) {
    var res = [];
    if (parseNode.children[0].rule === this) {
      res = res.concat(this.toASTChain(parseNode.children[0]));
    } else {
      res.push((0, _DPParseInstance.parsedNodeToAST)(parseNode.children[0]));
    }
    res.push(parseNode.children[1].children[0]);
    if (parseNode.children[2].rule === this) {
      res = res.concat(this.toASTChain(parseNode.children[2]));
    } else {
      res.push((0, _DPParseInstance.parsedNodeToAST)(parseNode.children[2]));
    }
    return res;
  },
  toAST: function toAST(parsedNode) {
    var chain = this.toASTChain(parsedNode);
    var stack = [];
    var item;
    var newNode;
    while (chain.length > 0) {
      item = chain.shift();
      if (item.content in operatorOrder) {
        while (stack.length >= 3 && operatorOrder[stack[stack.length - 2].content] <= operatorOrder[item.content]) {
          newNode = {
            type: 'BinaryExpression'
          };
          newNode.right = stack.pop();
          newNode.operator = stack.pop();
          newNode.left = stack.pop();
          stack.push(newNode);
        }
      }
      stack.push(item);
    }
    while (stack.length >= 3) {
      newNode = {
        type: 'BinaryExpression'
      };
      newNode.right = stack.pop();
      newNode.operator = stack.pop();
      newNode.left = stack.pop();
      stack.push(newNode);
    }
    return stack.pop();
  }
});
rules.push({
  target: 'exp',
  elements: ['function_call'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'bracket_group',
  elements: ['_(', 'exp', '_)'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]);
  }
});
rules.push({
  target: 'exp',
  elements: ['bracket_group'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});

// rules.push({
//     target: 'exp',
//     elements: ['_(', 'exp', '_)'],
//     toAST: function (parsedNode) {
//         return parsedNodeToAST(parsedNode.children[1]);
//     }
// });

['+', '-', '!'].forEach(function (op) {
  ['number', 'bracket_group', 'ident', 'function_call', 'mem_exp', 'unary_exp'].forEach(function (arg) {
    rules.push({
      target: 'unary_exp',
      elements: ['_' + op, arg],
      toAST: function toAST(parsedNode) {
        return {
          type: 'UnaryExpression',
          argument: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]),
          operator: {
            type: 'UnaryOperator',
            content: op
          }
        };
      }
    });
  });
});
rules.push({
  target: 'exp',
  elements: ['unary_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['ident', '_->', 'ident'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: false,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['ident', '_[', 'exp', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: true,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['new_expression', '_->', 'ident'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: false,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['new_expression', '_[', 'exp', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: true,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['mem_exp', '_->', 'ident'],
  longestOnly: true,
  ident: 'mem_exp_ident_rev',
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: false,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['mem_exp', '_[', 'exp', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: true,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['bracket_group', '_->', 'ident'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: false,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['bracket_group', '_[', 'exp', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: true,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'exp',
  elements: ['mem_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'object_exp',
  elements: ['_{', '_}'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ObjectExpression',
      properties: []
    };
  }
});
rules.push({
  target: 'object_exp',
  elements: ['_{', 'object_property_list', '_}'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ObjectExpression',
      properties: (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[1])
    };
  }
});
rules.push({
  target: 'exp',
  elements: ['object_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'object_property',
  elements: ['ident', '_:', 'exp'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ObjectProperty',
      key: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      value: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'object_property',
  elements: ['string', '_:', 'exp'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ObjectProperty',
      key: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      value: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'object_property_list',
  elements: ['object_property'],
  toASTChain: function toASTChain(parsedNode) {
    return [(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])];
  }
});
rules.push({
  target: 'object_property_list',
  elements: ['object_property_list', '_,', 'object_property'],
  longestOnly: true,
  ident: 'object_property_list_rec',
  toASTChain: function toASTChain(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[0]).concat([(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])]);
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'exp',
  elements: ['array_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'array_exp',
  elements: ['_[', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "ArrayExpression",
      elements: []
    };
  }
});
rules.push({
  target: 'array_exp',
  elements: ['_[', 'array_item_list', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "ArrayExpression",
      elements: (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[1])
    };
  }
});
rules.push({
  target: 'array_item_list',
  elements: ['exp'],
  toASTChain: function toASTChain(parsedNode) {
    return [(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])];
  }
});
rules.push({
  target: 'array_item_list',
  elements: ['array_item_list', '_,', 'exp'],
  longestOnly: true,
  ident: 'array_item_list_rec',
  toASTChain: function toASTChain(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[0]).concat([(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])]);
  }
});

/**********************************************************************************************************************/

var elementRegexes = [['string', /("(?:[^"\\\n]|\\.)*?")|('(?:[^'\\\n]|\\.)*?')/], ['number', /(\d+([.]\d*)?([eE][+-]?\d+)?|[.]\d+([eE][+-]?\d+)?)/], ['word', /[_a-zA-Z][_a-zA-Z0-9]*/], ['skip', /([\s\r\n])|(\/\/[^\n]*)|(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)/], ['dsymbol', /\+\+|--|==|!=|<=|>=|\|\||&&|->/], ['tsymbol', /\.\.\./], ['symbol', /[^\s_a-zA-Z0-9]/]];
var EIGrammar = {
  elementRegexes: elementRegexes,
  operatorOrder: _SCGrammar["default"].operatorOrder,
  rules: rules
};
var EIParser = new _DPParser["default"](EIGrammar);

/***/ }),

/***/ 28794:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(21457);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _DropZone = _interopRequireDefault(__webpack_require__(31790));
var _utils = __webpack_require__(84512);
var _catalog = _interopRequireDefault(__webpack_require__(82398));
var _FileSaver = __webpack_require__(53069);
var _MessageInput = _interopRequireDefault(__webpack_require__(42049));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function FileInputBox() {
  this.$fileSize = (0, _ACore.$)('.as-file-input-box-file-size', this);
  this.$fileName = (0, _ACore.$)('.as-file-input-box-file-name', this);
  this.$bg = (0, _ACore.$)('.as-file-input-box-background', this);
  this.$input = (0, _ACore.$)('input', this).on('change', this.eventHandler.input_fileChange);
  this.$trigger = (0, _ACore._)({
    elt: (0, _ACore.$)('.as-file-input-box-trigger', this),
    tag: _DropZone["default"].tag,
    on: {
      fileenter: this.eventHandler.input_fileEnter,
      fileleave: this.eventHandler.input_fileLeave,
      filedrop: this.eventHandler.input_fileDrop
    }
  });
  this.$downloadBtn = (0, _ACore.$)('.as-file-input-box-download-btn', this).on('click', this.download.bind(this));
  this.$removeBtn = (0, _ACore.$)('.as-file-input-box-remove-btn', this).on('click', this.clearValue.bind(this, true));
  this._value = null;
  this._fileSize = null;
  this._fileName = null;
  this._fileType = null;
  this._valueInfo = null;
  this._thumbnail = null;

  /***
   * default true
   * @name allowUpload
   * @type {boolean}
   * @memberOf FileInputBox#
   */
  this.allowUpload = true;

  /***
   * @name value
   * @type {null|any}
   * @memberOf FileInputBox#
   */
  /***
   * @name thumbnail
   * @type {null|any}
   * @memberOf FileInputBox#
   */
  /***
   * @name fileSize
   * @type {null|number}
   * @memberOf FileInputBox#
   */

  /***
   * @name fileType
   * @type {null|string}
   * @memberOf FileInputBox#
   */
  /***
   * @name fileName
   * @type {null|string}
   * @memberOf FileInputBox#
   */

  /***
   * default: false
   * @name downloadable
   * @type {boolean}
   * @memberOf FileInputBox#
   */
}

FileInputBox.tag = 'FileInputBox'.toLowerCase();
FileInputBox.render = function () {
  return (0, _ACore._)({
    extendEvent: ['change'],
    "class": 'as-file-input-box',
    child: ['.as-file-input-box-background', {
      tag: 'label',
      "class": 'as-file-input-box-trigger',
      child: {
        tag: 'input',
        attr: {
          type: 'file',
          accept: '*',
          title: null
        }
      }
    }, {
      "class": 'as-file-input-box-upload-overlay',
      child: 'span.mdi.mdi-upload'
    }, {
      "class": 'as-file-input-box-info',
      child: [{
        tag: 'span',
        "class": 'as-file-input-box-file-name',
        child: {
          text: ''
        }
      }, 'br', {
        tag: 'span',
        "class": 'as-file-input-box-file-size',
        child: {
          text: ''
        }
      }]
    }, {
      "class": 'as-file-input-box-action-left',
      child: {
        tag: 'button',
        "class": 'as-file-input-box-remove-btn',
        child: 'span.mdi.mdi-close'
      }
    }, {
      "class": 'as-file-input-box-action-right',
      child: {
        tag: 'button',
        "class": 'as-file-input-box-download-btn',
        child: 'span.mdi.mdi-download'
      }
    }, {
      "class": 'as-file-input-box-checked',
      child: 'span.mdi.mdi-check-bold'
    }]
  });
};
FileInputBox.prototype.download = function () {
  var value = this.value;
  if (value) {
    if (value && value.name && value.url) {
      (0, _FileSaver.saveAs)(value.url, value.name);
    } else {
      (0, _FileSaver.saveAs)(value, this.fileName);
    }
  }
};
FileInputBox.prototype.clearValue = function (userAction, event) {
  if (this.value) {
    this.value = null;
    if (userAction) {
      this.emit('change', {
        type: 'change',
        originalEvent: event,
        action: 'clear',
        target: this
      }, this);
    }
  }
};
FileInputBox.prototype._updateThumbnail = function () {
  var previewUrl;
  var thumbnail = this.thumbnail;
  var fileType = this.fileType;
  if (thumbnail) {
    if (typeof thumbnail === "string") {
      previewUrl = thumbnail;
    } else if (thumbnail instanceof Blob || thumbnail instanceof File) {
      thumbnail.url = thumbnail.url || URL.createObjectURL(thumbnail);
      previewUrl = thumbnail.url;
    }
  }
  if (!previewUrl) {
    if (_catalog["default"].indexOf(fileType) >= 0) {
      previewUrl = _MessageInput["default"].iconAssetRoot + '/' + fileType + '.svg';
    } else {
      previewUrl = _MessageInput["default"].iconAssetRoot + '/' + 'blank' + '.svg';
    }
  }
  if (previewUrl) {
    this.$bg.addStyle('backgroundImage', 'url("' + encodeURI(previewUrl) + '")');
  } else {
    this.$bg.removeStyle('backgroundImage');
  }
};
FileInputBox.prototype._updateFileName = function () {
  var fileName = this.fileName;
  if (fileName) {
    this.$fileName.firstChild.data = fileName;
    this.addClass('as-has-file-name');
  } else {
    this.$fileName.firstChild.data = '';
    this.removeClass('as-has-file-name');
  }
};
FileInputBox.prototype._updateFileSize = function () {
  var fileSize = this.fileName;
  if (fileSize === null) {
    this.$fileSize.firstChild.data = '';
    this.removeClass('as-has-file-size');
  } else {
    this.$fileSize.firstChild.data = (0, _utils.fileSize2Text)(fileSize);
    this.addClass('as-has-file-size');
  }
};
FileInputBox.property = {};
FileInputBox.property.value = {
  set: function set(value) {
    value = value || null;
    this._value = value;
    this._valueInfo = (0, _utils.fileInfoOf)(value);
    this._updateThumbnail();
    this._updateFileName();
    this._updateFileSize();
    if (value) {
      this.addClass('as-has-value');
    } else {
      this.removeClass('as-has-value');
    }
  },
  get: function get() {
    return this._value;
  }
};
FileInputBox.property.fileType = {
  set: function set(value) {
    this._fileType = value;
    this._updateThumbnail();
  },
  /***
   * @this FileInputBox
   * @return {*}
   */
  get: function get() {
    return this._fileType || this._valueInfo && this._valueInfo.type || null;
  }
};
FileInputBox.property.fileName = {
  set: function set(value) {
    value = typeof value === 'string' ? value : null;
    this._fileName = value;
    this._updateFileName();
  },
  get: function get() {
    return this._fileName || this._valueInfo && this._valueInfo.name || null;
  }
};
FileInputBox.property.fileSize = {
  set: function set(value) {
    if ((0, _utils.isRealNumber)(value)) value = Math.max(0, value);else value = null;
    this._fileSize = value;
    this._updateFileSize();
  },
  get: function get() {
    if (typeof this._fileSize === "number") return this._fileSize;
    if (this._valueInfo && typeof this._valueInfo.size === "number") return this._valueInfo.size;
    return null;
  }
};
FileInputBox.property.thumbnail = {
  set: function set(value) {
    this._thumbnail = value || null;
    this._updateThumbnail();
  },
  get: function get() {
    return this._thumbnail;
  }
};
FileInputBox.property.allowUpload = {
  set: function set(value) {
    if (value) {
      this.addClass('as-allow-upload');
    } else {
      this.removeClass('as-allow-upload');
    }
  },
  get: function get() {
    return this.hasClass('as-allow-upload');
  }
};
FileInputBox.property.downloadable = {
  set: function set(value) {
    if (value) {
      this.addClass('as-downloadable');
    } else {
      this.removeClass('as-downloadable');
    }
  },
  get: function get() {
    return this.hasClass('as-downloadable');
  }
};
FileInputBox.property.removable = {
  set: function set(value) {
    if (value) {
      this.addClass('as-removable');
    } else {
      this.removeClass('as-removable');
    }
  },
  get: function get() {
    return this.hasClass('as-removable');
  }
};
FileInputBox.property.accept = {
  set: function set(value) {
    if (!value) value = null;
    this.$input.attr('accept', value + '');
  },
  get: function get() {
    return this.$input.attr('accept') || null;
  }
};
FileInputBox.property.checked = {
  set: function set(value) {
    if (value) {
      this.addClass('as-checked');
    } else {
      this.removeClass('as-checked');
    }
  },
  get: function get() {
    return this.hasClass('as-checked');
  }
};
FileInputBox.eventHandler = {};
FileInputBox.eventHandler.input_fileChange = function (event) {
  var files = Array.prototype.slice.call(this.$input.files);
  if (files.length > 0) {
    this.value = files[0];
    this.emit('change', {
      type: 'change',
      originalEvent: event,
      file: files[0],
      action: 'file_dialog',
      target: this
    }, this);
  }
};
FileInputBox.eventHandler.input_fileEnter = function (event) {};
FileInputBox.eventHandler.input_fileLeave = function (event) {};
FileInputBox.eventHandler.input_fileDrop = function (event) {
  var files = Array.prototype.slice.call(event.files);
  var accept = this.accept;
  var file;
  if (files.length > 0) {
    file = files[0];
    if (!(0, _utils.fileAccept)(accept, file.type) && !(0, _utils.fileAccept)(accept, file.name)) file = null;
  }
  if (file) {
    this.value = file;
    this.emit('change', {
      type: 'change',
      originalEvent: event,
      file: file,
      action: 'drop',
      target: this
    }, this);
  }
};
_ACore["default"].install(FileInputBox);
var _default = FileInputBox;
exports["default"] = _default;

/***/ }),

/***/ 13146:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _FileListItem = _interopRequireDefault(__webpack_require__(62355));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _ContextMenu = _interopRequireDefault(__webpack_require__(24733));
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
var _FileSaver = __webpack_require__(53069);
var _DropZone = _interopRequireDefault(__webpack_require__(31790));
var _utils = __webpack_require__(84512);
var _FileInputBox = _interopRequireDefault(__webpack_require__(28794));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends AElement
 * @constructor
 */
function FileListInput() {
  _ContextMenu["default"].auto();
  this.$add = (0, _ACore.$)('.as-file-list-input-add', this);
  this.$attachhook = (0, _ACore.$)('attachhook', this);
  this.$attachhook.requestUpdateSize = this.updateSize.bind(this);
  this.$attachhook.on('attached', function () {
    _ResizeSystem["default"].add(this);
    this.requestUpdateSize();
  });
  this.on('filedrop', this.eventHandler.input_fileDrop);
  this.on('contextmenu', this.eventHandler.itemContext);
  this.$addedFile = (0, _ACore.$)('input', this.$add).on('change', this.eventHandler.clickAdd);
  /***
   *
   * @type {FileInputBox[]}
   */
  this.$fileItems = [];
  this.$activeItem = null;
  this._files = [];
  /***
   * @name files
   * @memberOf FileListInput#
   * @type {*}
   *
   */
  /***
   * @name readOnly
   * @memberOf FileListInput#
   * @type {boolean}
   */
  /***
   * @name disabled
   * @memberOf FileListInput#
   * @type {boolean}
   */

  /***
   * @name multiple
   * @memberOf FileListInput#
   * @type {boolean}
   */
  /***
   * @name droppable
   * @memberOf FileListInput#
   * @type {boolean}
   */
}

FileListInput.tag = 'FileListInput'.toLowerCase();
FileListInput.render = function () {
  return (0, _ACore._)({
    tag: _DropZone["default"].tag,
    "class": ['as-file-list-input', 'as-bscroller', 'as-empty', 'as-droppable'],
    extendEvent: ['change', 'contextmenu', 'check'],
    child: [{
      tag: 'label',
      "class": 'as-file-list-input-add',
      child: [{
        tag: 'input',
        attr: {
          type: 'file',
          accept: '*',
          title: null
        }
      }, {
        "class": 'as-file-list-input-add-icon-ctn',
        child: 'span.mdi.mdi-upload-outline'
      }, 'attachhook']
    }, {
      tag: 'span',
      "class": 'as-file-list-drag-file-text',
      child: {
        text: '(Kéo thả  file vào đây để tải lên)'
      }
    }, {
      "class": 'as-file-list-input-upload-overlay',
      child: 'span.mdi.mdi-upload'
    }]
  });
};
FileListInput.prototype.defaultChecked = false;
FileListInput.prototype.updateSize = function () {
  var bound, px, n;
  var requireWidth = this.getComputedStyleValue('--item-require-width') || '300px';
  if (requireWidth.match(/%$/)) {
    this.addStyle('--item-width', requireWidth);
  } else if (requireWidth.match(/px$/)) {
    bound = this.getBoundingClientRect();
    px = parseFloat(requireWidth.replace('px', ''));
    if (!isNaN(px) && px > 0) {
      n = Math.max(1, Math.floor((bound.width - 10 - 2) / px));
      this.addStyle('--item-width', Math.floor(100 / n) + '%');
    } else {
      this.removeStyle('--item-width');
    }
  } else {
    this.removeStyle('--item-width');
  }
};
FileListInput.prototype._makeFileItem = function (file) {
  var fileElt = (0, _ACore._)({
    tag: _FileListItem["default"].tag,
    props: {
      $parent: this,
      allowUpload: false,
      fileData: file,
      checked: this.defaultChecked
    }
  });
  fileElt.on('mousedown', this.eventHandler.mouseDownItem.bind(this, fileElt));
  fileElt.value = file;
  return fileElt;
};
FileListInput.prototype.add = function (file, idx) {
  if (!(0, _utils.isNaturalNumber)(idx)) idx = Infinity;
  idx = Math.min(this.$fileItems.length, idx);
  var fileElt = this._makeFileItem(file);
  var bf = this.$fileItems[idx];
  if (bf) {
    this.$fileItems.splice(idx, 0, fileElt);
    this._files.splice(idx, 0, file);
    this.addChildBefore(fileElt, bf);
  } else {
    this.$fileItems.push(fileElt);
    this._files.push(file);
    this.addChildBefore(fileElt, this.$add);
  }
  this._updateCountClass();
};
FileListInput.prototype._updateCountClass = function () {
  if (this._files.length > 0) {
    this.removeClass('as-empty');
  } else {
    this.addClass('as-empty');
  }
};
FileListInput.prototype.activeFileItemElt = function (itemElt) {
  if (this.$activeItem !== itemElt) {
    if (this.$activeItem) {
      this.$activeItem.removeClass('as-active');
    }
    this.$activeItem = itemElt;
    if (this.$activeItem) {
      this.$activeItem.addClass('as-active');
    }
  }
};
FileListInput.prototype.downloadFileItemElt = function (fileElt) {
  var fileData = fileElt.fileData;
  var name = fileData.name || fileElt.fileName;
  var file;
  if (fileData instanceof File || fileData instanceof Blob) {
    file = fileData;
  } else if (_typeof(fileData) === 'object') {
    if (fileData.url) file = fileData.url;
  } else if (typeof fileData === "string") {
    file = fileData;
  }
  if (file) {
    (0, _FileSaver.saveAs)(file, name);
  }
};
FileListInput.prototype.deleteFileItemElt = function (fileElt) {
  var fileData = fileElt.fileData;
  var idx = this._files.indexOf(fileData);
  if (idx >= 0) {
    this._files.splice(idx, 1);
  }
  fileElt.remove();
};
FileListInput.prototype._findFileItemElt = function (target) {
  while (target && target !== this) {
    if (target.hasClass && target.hasClass('as-file-list-item')) {
      return target;
    }
    target = target.parentElement;
  }
  return null;
};
FileListInput.prototype.getChildren = function () {
  return this.$fileItems.slice();
};
FileListInput.property = {};
FileListInput.property.files = {
  /***
   * @this FileListInput
   * @param files
   */
  set: function set(files) {
    files = files || [];
    files = files.slice();
    var self = this;
    this.$fileItems.forEach(function (fileElt) {
      fileElt.remove();
    });
    files = files || [];
    this._files = files;
    this.$fileItems = files.map(function (file) {
      var elt = self._makeFileItem(file);
      self.addChildBefore(elt, self.$add);
      return elt;
    });
    this._updateCountClass();
  },
  /***
   * @this FileListInput
   */
  get: function get() {
    return (this._files || []).slice();
  }
};
FileListInput.property.readOnly = {
  set: function set(value) {
    value = !!value;
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
    this.$fileItems.forEach(function (fileElt) {
      fileElt.removable = !value;
    });
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
FileListInput.property.droppable = {
  set: function set(value) {
    value = !!value;
    if (value) {
      this.addClass('as-droppable');
    } else {
      this.removeClass('as-droppable');
    }
    this.$fileItems.forEach(function (fileElt) {
      fileElt.removable = !value;
    });
  },
  get: function get() {
    return this.hasClass('as-droppable');
  }
};
FileListInput.property.multiple = {
  set: function set(value) {
    this.$addedFile.multiple = !!value;
  },
  get: function get() {
    return this.$addedFile.multiple;
  }
};
FileListInput.property.accept = {
  set: function set(value) {
    if (!value) value = null;
    this.$addedFile.attr('accept', value + '');
  },
  get: function get() {
    return this.$addedFile.attr('accept') || null;
  }
};
FileListInput.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
FileListInput.property.showCheck = {
  set: function set(value) {
    if (value) {
      this.addClass('as-show-check');
    } else {
      this.removeClass('as-show-check');
    }
  },
  get: function get() {
    return this.hasClass('as-show-check');
  }
};
_ACore["default"].install(FileListInput);

/***
 * @memberOf  FileListInput#
 * @type {{}}
 */
FileListInput.eventHandler = {};
FileListInput.eventHandler.clickAdd = function (event) {
  var files = Array.prototype.slice.call(this.$addedFile.files);
  this.$addedFile.files = null;
  if (files.length === 0) return;
  for (var i = 0; i < files.length; ++i) {
    this.add(files[i]);
  }
  this.emit('change', {
    files: files,
    type: 'change',
    target: this,
    originalEvent: event,
    action: 'add'
  }, this);
};

/***
 * @this FileListInput
 * @param itemElt
 * @param event
 */
FileListInput.eventHandler.mouseDownItem = function (itemElt, event) {
  this.activeFileItemElt(itemElt);
};
FileListInput.eventHandler.input_fileDrop = function (event) {
  if (this.readOnly || this.disabled) return;
  var self = this;
  var files = Array.prototype.slice.call(event.files);
  if (files.length === 0) return;
  if (!this.multiple) files = files.slice(0, 1);
  var accept = this.accept;
  files = files.filter(function (file) {
    return (0, _utils.fileAccept)(accept, file.type) || (0, _utils.fileAccept)(accept, file.name);
  });
  if (files.length > 0) {
    files.forEach(function (file) {
      self.add(file);
    });
    this.emit('change', {
      type: 'change',
      files: files,
      target: this,
      action: 'drop'
    }, this);
  }
};

/***
 * @this FileListInput
 * @param itemElt
 * @param event
 */
FileListInput.eventHandler.itemContext = function (event) {
  if (this.disabled) return;
  var self = this;
  var itemElt = this._findFileItemElt(event.target);
  var menuItems = [];
  if (itemElt) {
    menuItems.push({
      text: _LanguageSystem["default"].getText('txt_download') || "Download",
      icon: 'span.mdi.mdi-download',
      cmd: 'download'
    });
  }
  if (!this.readOnly) {
    if (itemElt) menuItems.push({
      text: _LanguageSystem["default"].getText('txt_delete') || "Delete",
      icon: 'span.mdi.mdi-delete',
      cmd: 'delete'
    });
    menuItems.push({
      text: _LanguageSystem["default"].getText('txt_delete_all') || "Delete All",
      icon: 'span.mdi.mdi-delete-empty',
      cmd: 'delete_all'
    });
  }
  if (menuItems.length > 0) {
    event.showContextMenu({
      items: menuItems
    }, function (event) {
      var files;
      switch (event.menuItem.cmd) {
        case 'download':
          self.downloadFileItemElt(itemElt);
          break;
        case 'delete':
          self.deleteFileItemElt(itemElt);
          self.emit('change', {
            type: 'change',
            item: itemElt.fileData,
            target: this,
            action: 'delete'
          }, this);
          break;
        case 'delete_all':
          files = self.files;
          self.files = [];
          self.emit('change', {
            type: 'change',
            items: files,
            target: this,
            action: 'delete_all'
          }, this);
          break;
      }
    });
  }
};
var _default = FileListInput;
exports["default"] = _default;

/***/ }),

/***/ 62355:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(97484);
var _catalog = _interopRequireDefault(__webpack_require__(82398));
var _MessageInput = _interopRequireDefault(__webpack_require__(42049));
var _utils = __webpack_require__(84512);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function FileListItem() {
  var _this = this;
  this.$parent = null;
  this.$icon = (0, _ACore.$)('.as-file-list-item-icon', this);
  this.$name = (0, _ACore.$)('.as-file-list-item-name', this);
  this.$quickMenuBtn = (0, _ACore.$)('.as-file-list-item-quick-btn', this);
  this.$check = (0, _ACore.$)('.as-file-list-item-check', this);
  this.value = null;
  this.fileType = null;
  this.fileName = '';
  _OOP["default"].drillProperty(this, this.$check, 'checked');
  this.on('click', this.eventHandler.click);
  _QuickMenu["default"].toggleWhenClick(this.$quickMenuBtn, {
    getMenuProps: function getMenuProps() {
      var list = _this.parentElement;
      if (list.disabled) return;
      var self = _this;
      var itemElt = _this;
      var menuItems = [];
      menuItems.push({
        text: _LanguageSystem["default"].getText('txt_download') || "Download",
        icon: 'span.mdi.mdi-download',
        cmd: 'download'
      });
      if (!list.readOnly) {
        if (itemElt) menuItems.push({
          text: _LanguageSystem["default"].getText('txt_delete') || "Delete",
          icon: 'span.mdi.mdi-delete',
          cmd: 'delete'
        });
        menuItems.push({
          text: _LanguageSystem["default"].getText('txt_delete_all') || "Delete All",
          icon: 'span.mdi.mdi-delete-empty',
          cmd: 'delete_all'
        });
      }
      return {
        items: menuItems
      };
    },
    onSelect: function (menuItem) {
      var itemElt = this;
      var self = this.parentElement;
      var files;
      switch (menuItem.cmd) {
        case 'download':
          self.downloadFileItemElt(itemElt);
          break;
        case 'delete':
          self.deleteFileItemElt(itemElt);
          self.emit('change', {
            type: 'change',
            item: itemElt.fileData,
            target: this,
            action: 'delete'
          }, this);
          break;
        case 'delete_all':
          files = self.files;
          self.files = [];
          self.emit('change', {
            type: 'change',
            items: files,
            target: this,
            action: 'delete_all'
          }, this);
          break;
      }
    }.bind(this)
  });
  this.$check.on('change', function (event) {
    if (this.$parent) {
      this.$parent.emit('check', {
        target: this.$parent,
        elt: this,
        type: 'check'
      }, this.$parent);
    }
  }.bind(this));

  /***
   * @name checked
   * @type {boolean}
   * @memberOf FileListItem#
   */
}

FileListItem.tag = 'FileListItem'.toLowerCase();
FileListItem.render = function () {
  return (0, _ACore._)({
    "class": 'as-file-list-item',
    child: [{
      tag: _CheckBoxInput["default"],
      "class": 'as-file-list-item-check'
    }, {
      tag: 'img',
      "class": 'as-file-list-item-icon',
      props: {
        src: _MessageInput["default"].iconAssetRoot + '/' + 'blank' + '.svg'
      }
    }, {
      "class": 'as-file-list-item-name',
      child: {
        text: '..'
      }
    }, {
      tag: 'button',
      "class": 'as-file-list-item-quick-btn',
      child: 'span.mdi.mdi-dots-vertical'
    }]
  });
};
FileListItem.property = {};
FileListItem.property.fileType = {
  set: function set(value) {
    this._fileType = value;
    if (value) {
      if (_catalog["default"].indexOf(value) >= 0) this.$icon.src = _MessageInput["default"].iconAssetRoot + '/' + value + '.svg';else this.$icon.src = _MessageInput["default"].iconAssetRoot + '/' + 'blank' + '.svg';
    } else {
      this.$icon.src = _MessageInput["default"].iconAssetRoot + '/' + 'blank' + '.svg';
    }
  },
  get: function get() {
    return this._fileType;
  }
};
FileListItem.property.fileName = {
  set: function set(value) {
    this.$name.firstChild.data = value + '';
  },
  get: function get() {
    return this.$name.firstChild.data;
  }
};
FileListItem.property.value = {
  set: function set(value) {
    value = value || null;
    var info = (0, _utils.fileInfoOf)(value);
    var type = info.type || null;
    var size = info.size || null;
    var name = info.name || null;
    this._value = value;
    this.fileSize = size;
    this.fileName = name;
    this.fileType = type;
    if (value) {
      this.addClass('as-has-value');
    } else {
      this.removeClass('as-has-value');
    }
  },
  get: function get() {
    return this._value;
  }
};
FileListItem.eventHandler = {};

/***
 * @this FileListItem
 * @param event
 */
FileListItem.eventHandler.click = function (event) {
  if (!(0, _EventEmitter.isMouseLeft)(event)) return;
  if ((0, _EventEmitter.hitElement)(this.$check, event) || (0, _EventEmitter.hitElement)(this.$quickMenuBtn, event)) return;
  if (this.$parent && this.$parent.showCheck) {
    this.$check.checked = !this.$check.checked;
    this.$check.notifyChange();
  }
};
_ACore["default"].install(FileListItem);
var _default = FileListItem;
exports["default"] = _default;

/***/ }),

/***/ 78266:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(58913);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/**
 * @extends AElement
 * @constructor
 */
function FlexiconButton() {
  this._icon = null;
  this.$content = $('.as-flexicon-button-content', this);
  this.$iconCtn = $('.as-flexicon-button-icon-container', this);
  this.$textCtn = $('.as-flexicon-button-text-container', this);
}
FlexiconButton.tag = 'FlexiconButton'.toLowerCase();
FlexiconButton.render = function () {
  return _({
    tag: 'button',
    "class": 'as-flexicon-button',
    child: {
      "class": 'as-icon-button-table-box',
      child: {
        "class": 'as-flexicon-button-content',
        child: ['.as-flexicon-button-icon-container', '.as-flexicon-button-text-container']
      }
    }
  });
};
FlexiconButton.property = {};
FlexiconButton.property.icon = {
  set: function set(value) {
    value = value || null;
    this._icon = value;
    this.$iconCtn.clearChild();
    if (value !== null) {
      this.$iconCtn.addChild(_(value));
    }
  },
  get: function get() {
    return this._icon;
  }
};
FlexiconButton.property.text = {
  /***
   *
   * @param {string| {mlKey:string}|*} value
   */
  set: function set(value) {
    value = value || null;
    this._text = value;
    this.$textCtn.clearChild();
    this.$textCtn.attr('data-ml-key', undefined);
    if (value === null || value === undefined) {} else if (_typeof(value) === "object") {
      if (value.mlKey) {
        this.$textCtn.attr('data-ml-key', value.mlKey);
      }
    } else {
      this.$textCtn.addChild(_({
        text: value + ''
      }));
    }
  },
  get: function get() {
    return this._text;
  }
};
_ACore["default"].install(FlexiconButton);
var _default = FlexiconButton;
exports["default"] = _default;

/***/ }),

/***/ 23477:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(76177);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function FlexiconInput() {
  this.$input = $('.as-flexicon-input-text-input', this);
  this.$iconCtn = $('.as-flexicon-input-icon-ctn', this);
  this.$unitCtn = $('.as-flexicon-input-unit-ctn', this);
  _OOP["default"].drillProperty(this, this.$input, ['value', 'readonly']);
  this.on('click', function (event) {
    if (event.target != this.$input) this.$input.focus();
  }.bind(this));
}
FlexiconInput.prototype.on = function () {
  return this.$input.on.apply(this.$input, arguments);
};
FlexiconInput.prototype.once = function () {
  return this.$input.once.apply(this.$input, arguments);
};
FlexiconInput.prototype.off = function () {
  return this.$input.off.apply(this.$input, arguments);
};
FlexiconInput.tag = 'FlexiconInput'.toLowerCase();
FlexiconInput.render = function () {
  return _({
    "class": 'as-flexicon-input',
    child: [{
      "class": 'as-flexicon-input-icon-ctn'
    }, {
      tag: 'input',
      "class": 'as-flexicon-input-text-input',
      attr: {
        type: 'text'
      }
    }, {
      "class": 'as-flexicon-input-unit-ctn'
    }]
  });
};
FlexiconInput.property = {};
FlexiconInput.property.icon = {
  set: function set(value) {
    value = value || null;
    this._icon = value;
    this.$iconCtn.clearChild();
    if (value == null) {
      this.removeClass('as-flexicon-input-has-icon');
    } else {
      this.addClass('as-flexicon-input-has-icon');
      this.$iconCtn.addChild(_(value));
    }
  },
  get: function get() {
    return this._icon;
  }
};
FlexiconInput.property.unit = {
  set: function set(value) {
    this._unit = value;
    if (this._unit) {
      this.addClass('as-flexicon-input-has-unit');
      this.$unitCtn.clearChild().addChild(_({
        text: value + ''
      }));
    } else {
      this.removeClass('as-flexicon-input-has-unit');
      this.$unitCtn.clearChild();
    }
  },
  get: function get() {
    return this._unit;
  }
};
FlexiconInput.property.disabled = {
  set: function set(value) {
    value = !!value;
    this.$input.disabled = value;
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.$input.disabled;
  }
};
FlexiconInput.property.readOnly = {
  set: function set(value) {
    value = !!value;
    this.$input.readOnly = value;
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
_ACore["default"].install(FlexiconInput);
var _default = FlexiconInput;
exports["default"] = _default;

/***/ }),

/***/ 48414:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(93138);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _AttachHook = _interopRequireDefault(__webpack_require__(7068));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function Follower() {
  this.$attachhook = _('attachhook', this).addTo(this).on('attached', function () {
    this.requestUpdateSize();
    _Dom["default"].addToResizeSystem(this);
  });
  this.$attachhook.requestUpdateSize = this.updatePosition.bind(this);
  this.$followTarget = undefined;
  this.$scrollTrackElts = [];
  this._scrollTrackEventHandler = undefined;
  this._anchor = Follower.ANCHOR_PRIORITY;
  this.defineEvent(['updateposition', 'preupdateposition']);
  /***
   * @name followTarget
   * @type {AElement}
   * @memberOf Follower#
   */
}

Follower.prototype.cancelWaiting = function () {
  Array.prototype.forEach.call(this.childNodes, function (elt) {
    if (elt.emit && elt.isSupportedEvent('attached') && elt.cancelWaiting()) {
      elt.cancelWaiting();
    }
  });
};
Follower.prototype.revokeResource = function () {
  this.cancelWaiting();
  this.followTarget = null;
};
Follower.tag = 'Follower'.toLowerCase();
Follower.render = function () {
  return _('.absol-follower');
};
Follower.prototype.clearChild = function () {
  var children = Array.prototype.slice.call(this.children);
  var attachhookElt = this.$attachhook;
  children.forEach(function (elt) {
    if (elt !== attachhookElt) elt.remove();
  });
  return this;
};
Follower.prototype.addTo = function (elt) {
  if (elt.addChild) {
    elt.addChild(this);
  } else if (elt.appendChild) {
    elt.appendChild(this);
  }
  if (this.isDescendantOf(document.body)) {
    Array.prototype.forEach.call(this.childNodes, function (elt) {
      if (elt.emit && elt.isSupportedEvent('attached')) {
        elt.resetState();
        elt.emit('attached');
      }
    });
  }
  return this;
};
Follower.prototype.selfRemove = function () {
  Array.prototype.forEach.call(this.childNodes, function (elt) {
    if (elt.emit && elt.isSupportedEvent('attached')) {
      elt.cancelWaiting();
    }
  });
  this.remove();
  return this;
};

//Todo: remove child, find child....

/**
 * X = $target.x + F[anchor_index][0] * $target.width + F[anchor_index][1] * $content.width
 * Y = $target.y + F[anchor_index][2] * $target.height + F[anchor_index][3] * $content.height
 */
Follower.ANCHOR_FACTORS = [[1, 0, 0, 0],
//0
[0, 0, 1, 0],
//1
[1, -1, 1, 0],
//2
[0, -1, 0, 0],
//3
[0, -1, 1, -1],
//4
[1, -1, 0, -1],
//5
[0, 0, 0, -1],
//6
[1, 0, 1, -1],
//7

[1, 0, 0.5, -0.5],
//8
[0.5, -0.5, 1, 0],
//9
[0, -1, 0.5, -0.5],
//10
[0.5, -0.5, 0, -1],
//11

[1, 0, 1, 0],
//12
[0, -1, 1, 0],
//13
[0, -1, 0, -1],
//14
[1, 0, 0, -1] //15
];

Follower.ANCHOR_PRIORITY = [1, 6, 2, 5, 0, 7, 3, 4, 9, 11, 8, 10, 12, 15, 13, 14];
Follower.prototype.updatePosition = function () {
  if (!this.$followTarget) return;
  this.emit('preupdateposition', {
    target: this
  }, this);
  if (!this.$followTarget) return; // target is removed
  var targetBound = this.$followTarget.getBoundingClientRect();
  var screenSize = _Dom["default"].getScreenSize();
  var outRect = new _Rectangle["default"](0, 0, screenSize.width, screenSize.height);
  var bound = this.getBoundingClientRect();
  var x = 0;
  var y = 0;
  var score;
  var anchors = this._lastAnchor === undefined ? this.anchor : [this._lastAnchor].concat(this.anchor);
  var factor;
  var bestX,
    bestY,
    bestScore = -100000;
  var newContentRect;
  var bestAnchor;
  for (var i = 0; i < anchors.length; ++i) {
    factor = Follower.ANCHOR_FACTORS[anchors[i]];
    x = targetBound.left + factor[0] * targetBound.width + factor[1] * bound.width;
    y = targetBound.top + factor[2] * targetBound.height + factor[3] * bound.height;
    newContentRect = new _Rectangle["default"](x, y, bound.width, bound.height);
    score = newContentRect.collapsedSquare(outRect);
    if (score - 10 > bestScore) {
      bestAnchor = anchors[i];
      bestScore = score;
      bestX = x;
      bestY = y;
    }
  }
  if (this._lastAnchor !== bestAnchor) {
    this.removeClass('as-anchor-' + this._lastAnchor);
    this._lastAnchor = bestAnchor;
    this.addClass('as-anchor-' + this._lastAnchor);
  }
  this.addStyle({
    left: bestX + 'px',
    top: bestY + 'px'
  });
  this.emit('updateposition', {
    target: this
  }, this);
};
Follower.prototype.refollow = function () {
  if (!this.$followTarget) return;
  this.updatePosition();
  this.addClass('following');
  if (this._scrollTrackEventHandler) this.unfollow();
  this._scrollTrackEventHandler = this.updatePosition.bind(this);
  this.$scrollTrackElts = [];
  var trackElt = this.$followTarget;
  while (trackElt) {
    if (trackElt.addEventListener) trackElt.addEventListener('scroll', this._scrollTrackEventHandler, false);else trackElt.attachEvent('onscroll', this._scrollTrackEventHandler, false);
    this.$scrollTrackElts.push(trackElt);
    trackElt = trackElt.parentElement;
  }
  if (document.addEventListener) {
    document.addEventListener('scroll', this._scrollTrackEventHandler, false);
  } else {
    document.attachEvent('onscroll', this._scrollTrackEventHandler, false);
  }
  this.$scrollTrackElts.push(document);
};
Follower.prototype.unfollow = function () {
  if (!this._scrollTrackEventHandler) return; // nothing to do
  this.removeClass('following');
  var trackElt;
  for (var i = 0; i < this.$scrollTrackElts.length; ++i) {
    trackElt = this.$scrollTrackElts[i];
    if (trackElt.removeEventListener) trackElt.removeEventListener('scroll', this._scrollTrackEventHandler, false);else trackElt.dettachEvent('onscroll', this._scrollTrackEventHandler, false);
  }
  this.$scrollTrackElts = [];
  this._scrollTrackEventHandler = undefined;
};
Follower.prototype.revokeResource = function () {
  this.$attachhook.cancelWaiting();
  this.followTarget = null;
  while (this.lastChild) {
    (0, _utils.revokeResource)(this.lastChild);
    this.removeChild(this.lastChild);
  }
};
Follower.property = {};
Follower.property.followTarget = {
  set: function set(elt) {
    if (elt === null || elt === undefined || !elt) {
      this.unfollow();
      this.$followTarget = undefined;
      return;
    } else if (typeof elt == 'string') {
      elt = $(elt) || document.getElementById(elt);
    }
    if (_Dom["default"].isDomNode(elt)) {
      this.$followTarget = elt;
      this._lastAnchor = undefined;
      this.refollow();
    } else throw new Error("Invalid element");
  },
  get: function get() {
    return this.$followTarget;
  }
};
Follower.property.anchor = {
  set: function set(value) {
    value = value || Follower.ANCHOR_PRIORITY;
    if (value == 'auto') value = Follower.ANCHOR_PRIORITY;
    if (typeof value == null) value = [value];
    if (!(value instanceof Array)) throw new Error('Invalid anchor ' + value);
    value = value.map(function (x) {
      x = Math.floor(x);
      if (x >= 0 && x < Follower.ANCHOR_FACTORS.length) {
        return x;
      } else throw new Error("Invalid anchor: " + x);
    });
    this._anchor = value;
    this._lastAnchor = undefined;
    this.updatePosition();
  },
  get: function get() {
    return this._anchor;
  }
};
_ACore["default"].install(Follower);
var _default = Follower;
exports["default"] = _default;

/***/ }),

/***/ 49049:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function FollowerToggler() {
  this.defineEvent(['close', 'open', 'preopen']);
  this.on('click', this.eventHandler.click);
  this.addClass('as-follower-trigger');
  this.$follower = null;
  this._opened = false;
}
FollowerToggler.tag = 'FollowerToggler'.toLowerCase();
FollowerToggler.render = function () {
  return _('div');
};
FollowerToggler.prototype.toggle = function () {
  if (this._opened) this.close();else this.open();
};
FollowerToggler.prototype.open = function () {
  if (this._opened) return;
  this._opened = true;
  this.addClass('as-follower-trigger-open');
  if (!this.$follower) return;
  this.emit('preopen', {
    name: 'preopen',
    target: this
  }, this);
  var thisTg = this;
  setTimeout(function () {
    thisTg.$follower.refollow();
    thisTg.$follower.removeClass('absol-follower-hidden');
    document.body.addEventListener('click', thisTg.eventHandler.clickBody);
    thisTg.emit('open', {
      name: 'open',
      target: this
    }, this);
  }, 1);
};
FollowerToggler.prototype.close = function () {
  if (!this._opened) return;
  this._opened = false;
  this.removeClass('as-follower-trigger-open');
  if (!this.$follower) return;
  this.$follower.unfollow();
  this.$follower.addClass('absol-follower-hidden');
  document.body.removeEventListener('click', this.eventHandler.clickBody);
  this.emit('close', {
    name: 'close',
    target: this
  }, this);
};
FollowerToggler.prototype.bindFollower = function (elt) {
  if (this.$follower) {
    this.$follower.followTarget = null;
  }
  if (elt && elt.refollow) {
    if (this._opened) elt.removeClass('absol-follower-hidden');else elt.addClass('absol-follower-hidden');
    elt.followTarget = this;
    elt.sponsorElement = this;
    this.$follower = elt;
  } else {
    throw new Error("Must be a follower!");
  }
};
FollowerToggler.eventHandler = {};
FollowerToggler.eventHandler.clickBody = function (event) {
  if (_EventEmitter["default"].hitElement(this, event) || _EventEmitter["default"].hitElement(this.$follower, event)) return;
  this.close();
};
FollowerToggler.eventHandler.click = function () {
  this.toggle();
};
_ACore["default"].install(FollowerToggler);
var _default = FollowerToggler;
exports["default"] = _default;

/***/ }),

/***/ 81285:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.FontFamilySelectList = FontFamilySelectList;
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(69561);
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _Dom = __webpack_require__(64821);
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _stringFormat = __webpack_require__(22294);
var _stringMatching = __webpack_require__(59163);
var _int = __webpack_require__(65909);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var fonts = ['Arial', 'Verdana', 'Times New Roman', 'Courier New', 'Georgia', 'Palatino', 'Garamond', 'Bookman', 'Comic Sans MS', 'Trebuchet MS', 'Arial Black', 'Impact', "'Open Sans', sans-serif", "'Roboto', sans-serif", "'Big Shoulders Text', cursive", "'Montserrat', sans-serif", "'Oswald', sans-serif", "'Source Sans Pro', sans-serif", "'Roboto Condensed', sans-serif", "'Literata', serif", "'Roboto Mono', monospace", "'Roboto Slab', serif", "'Merriweather', serif", "'Noto Sans', sans-serif", "'Lora', serif", "'Muli', sans-serif", "'Open Sans Condensed', sans-serif", "'Playfair Display', serif", "'Nunito', sans-serif", "'Noto Serif', serif", "'Fira Sans', sans-serif", "'Inconsolata', monospace", "'Dosis', sans-serif", "'Nunito Sans', sans-serif", "'Arimo', sans-serif", "'Quicksand', sans-serif", "'Cabin', sans-serif", "'Josefin Sans', sans-serif", "'Varela Round', sans-serif", "'Anton', sans-serif", "'Lobster', cursive", "'Yanone Kaffeesatz', sans-serif", "'Source Code Pro', monospace", "'Baloo Bhai', cursive", "'Barlow', sans-serif", "'Dancing Script', cursive", "'Pacifico', cursive", "'Exo 2', sans-serif", "'Barlow Semi Condensed', sans-serif", "'EB Garamond', serif", "'Archivo Narrow', sans-serif", "'Asap', sans-serif", "'Comfortaa', cursive", "'Barlow Condensed', sans-serif", "'IBM Plex Sans', sans-serif", "'Maven Pro', sans-serif", "'Play', sans-serif", "'Exo', sans-serif", "'Amatic SC', cursive", "'Kanit', sans-serif", "'Fira Sans Condensed', sans-serif", "'Noto Sans SC', sans-serif", "'Vollkorn', serif", "'Prompt', sans-serif", "'Rokkitt', serif", "'Cuprum', sans-serif", "'Alegreya Sans', sans-serif", "'Francois One', sans-serif", "'Cormorant Garamond', serif", "'Alegreya', serif", "'Alfa Slab One', cursive", "'Noticia Text', serif", "'Saira Extra Condensed', sans-serif", "'Old Standard TT', serif", "'Tinos', serif", "'Fira Sans Extra Condensed', sans-serif", "'IBM Plex Serif', serif", "'Patrick Hand', cursive", "'M PLUS 1p', sans-serif", "'Prata', serif", "'Philosopher', sans-serif", "'Saira Semi Condensed', sans-serif", "'Archivo', sans-serif", "'Big Shoulders Display', cursive", "'Bangers', cursive", "'Playfair Display SC', serif", "'Cabin Condensed', sans-serif", "'Paytone One', sans-serif", "'Montserrat Alternates', sans-serif", "'Taviraj', serif", "'Spectral', serif", "'Lalezar', cursive", "'Asap Condensed', sans-serif", "'M PLUS Rounded 1c', sans-serif", "'Sigmar One', cursive", "'Saira', sans-serif", "'Pridi', serif", "'Mitr', sans-serif", "'Baloo', cursive", "'Cormorant', serif", "'Sarabun', sans-serif", "'Saira Condensed', sans-serif", "'Be Vietnam', sans-serif", "'Yeseva One', cursive", "'Lexend Peta', sans-serif", "'Alegreya Sans SC', sans-serif", "'IBM Plex Mono', monospace", "'Jura', sans-serif", "'Bevan', cursive", "'Lexend Exa', sans-serif", "'Sawarabi Gothic', sans-serif", "'Cousine', monospace", "'Markazi Text', serif", "'VT323', monospace", "'Baloo Bhaina', cursive", "'Space Mono', monospace", "'Encode Sans', sans-serif", "'Encode Sans Semi Expanded', sans-serif", "'Arima Madurai', cursive", "'Lexend Deca', sans-serif", "'Lexend Tera', sans-serif", "'Lexend Giga', sans-serif", "'Lexend Zetta', sans-serif", "'Lexend Mega', sans-serif", "'Arsenal', sans-serif", "'Itim', cursive", "'Noto Serif SC', serif", "'Pangolin', cursive", "'Lemonada', cursive", "'Encode Sans Condensed', sans-serif", "'Bai Jamjuree', sans-serif", "'Alegreya SC', serif", "'Noto Serif TC', serif", "'Judson', serif", "'Livvic', sans-serif", "'Krub', sans-serif", "'Trirong', serif", "'Niramit', sans-serif", "'Bungee Inline', cursive", "'Mali', cursive", "'Pattaya', sans-serif", "'Rosario', sans-serif", "'Bungee', cursive", "'Sriracha', cursive", "'Metrophobic', sans-serif", "'Faustina', serif", "'Darker Grotesque', sans-serif", "'Encode Sans Expanded', sans-serif", "'Chakra Petch', sans-serif", "'IBM Plex Sans Condensed', sans-serif", "'Maitree', serif", "'Baloo Bhaijaan', cursive", "'Cormorant Infant', serif", "'Saira Stencil One', cursive", "'Chonburi', cursive", "'Barriecito', cursive", "'Bahianita', cursive", "'Athiti', sans-serif", "'Sedgwick Ave', cursive", "'Patrick Hand SC', cursive", "'Srisakdi', cursive", "'Cormorant SC', serif", "'Andika', sans-serif", "'Podkova', serif", "'Bungee Shade', cursive", "'Baloo Da', cursive", "'Spectral SC', serif", "'Baloo Thambi', cursive", "'Baloo Chettan', cursive", "'Cormorant Upright', serif", "'Encode Sans Semi Condensed', sans-serif", "'Charm', cursive", "'Baloo Paaji', cursive", "'K2D', sans-serif", "'Farsan', cursive", "'David Libre', serif", "'Coiny', cursive", "'Baloo Tamma', cursive", "'Manuale', serif", "'Thasadith', sans-serif", "'Vollkorn SC', serif", "'Bungee Hairline', cursive", "'Kodchasan', sans-serif", "'Hepta Slab', serif", "'Cormorant Unicase', serif", "'Crimson Pro', serif", "'Grenze', serif", "'Charmonman', cursive", "'Baloo Tammudu', cursive", "'KoHo', sans-serif", "'Major Mono Display', monospace", "'Fahkwang', sans-serif", "'Bungee Outline', cursive", "'Sedgwick Ave Display', cursive"]; //only for test

/**
 * @extends Follower
 * @constructor
 */
function FontFamilySelectList() {
  this.on('preupdateposition', this.eventHandler.ffPreUpdatePosition);
  this.$content = (0, _ACore.$)('.as-font-family-select-list-content', this);
  this.$items = [];
  this.$selectedItem = null;
  this.$itemByValue = {};
  this.$searchInput = (0, _ACore.$)(_Searcher["default"].tag, this);
  this.$searchInput.on('stoptyping', this.eventHandler.searchChange);
  /**
   *
   * @type {string[]}
   * @memberOf FontFamilySelectList#
   */
  this.items = fonts;
  this._searchingHolders = null; //not prepared
}

FontFamilySelectList.tag = 'FontFamilySelectList'.toLowerCase();
FontFamilySelectList.render = function () {
  return (0, _ACore._)({
    tag: _Follower["default"],
    "class": ['as-font-family-select-list', 'as-dropdown-box-common-style'],
    child: [{
      "class": 'as-font-family-select-list-header',
      child: {
        tag: _Searcher["default"]
      }
    }, {
      "class": ['as-bscroller', 'as-font-family-select-list-content']
    }]
  }, true);
};
FontFamilySelectList.property = {};
FontFamilySelectList.property.items = {
  set: function set(items) {
    var _this = this;
    if (!Array.isArray(items)) items = [];
    this._items = items;
    this.$content.clearChild();
    this.$itemByValue = {};
    this._searchingHolders = null;
    this.$items = items.map(function (item) {
      var text = item.replace(/'/g, '');
      text = text.replace(/,.+/, '');
      var itemElt = (0, _ACore._)({
        "class": 'as-font-family-select-item',
        style: {
          fontFamily: item
        },
        attr: {
          'data-value': item
        },
        child: {
          text: text
        },
        on: {
          click: function click() {
            _this.value = item;
            _this.emit('select', {
              value: item
            });
          }
        }
      });
      _this.$itemByValue[item] = itemElt;
      return itemElt;
    });
    this.$content.addChild(this.$items);
  },
  get: function get() {
    return this._items;
  }
};
FontFamilySelectList.property.value = {
  set: function set(value) {
    if (this.$selectedItem) this.$selectedItem.removeClass('as-selected');
    this._value = value;
    this.$selectedItem = this.$itemByValue[value];
    if (this.$selectedItem) this.$selectedItem.addClass('as-selected');
  },
  get: function get() {
    if (this.$itemByValue[this._value]) return this._value;
    return null;
  }
};
FontFamilySelectList.prototype._makeHolder = function (item, value) {
  var res = {
    value: value,
    text: item
  };
  res.text = res.text.trim().toLowerCase();
  res.words = res.text.split(/\s+/).filter(function (w) {
    return !!w;
  });
  res.text = res.words.join(' ');
  res.nacWords = res.words.map(function (w) {
    return (0, _stringFormat.nonAccentVietnamese)(w);
  });
  res.nacText = res.nacWords.join(' ');
  res.nacWordDict = res.nacWords.reduce(function (ac, word) {
    ac[word] = true;
    return ac;
  }, {});
  return res;
};
FontFamilySelectList.prototype._prepareSearchingHolders = function () {
  var _this2 = this;
  if (this._searchingHolders) return;
  this._searchingHolders = this.items.map(function (item, idx) {
    return _this2._makeHolder(item, idx);
  });
};
FontFamilySelectList.prototype._calcMatching = function (queryHolder, itemHolder) {
  var res = {};
  var score = 0;
  if (itemHolder.text.indexOf(queryHolder.text) >= 0 || itemHolder.nacText.indexOf(queryHolder.nacText) >= 0) {
    res.mustIncluded = true;
  }
  score += (0, _stringMatching.wordsMatch)(queryHolder.words, itemHolder.words) / (0, _int.harmonicMean)(queryHolder.words.length, itemHolder.words.length);
  score += (0, _stringMatching.wordsMatch)(queryHolder.nacWords, itemHolder.nacWords) / (0, _int.harmonicMean)(queryHolder.nacWords.length, itemHolder.nacWords.length);
  var dict = Object.keys(itemHolder.nacWordDict);
  Object.keys(queryHolder.nacWordDict).forEach(function (qWord) {
    var bestWordScore = 0;
    var bestWord = '';
    var word;
    for (word in dict) {
      if ((0, _stringMatching.wordLike)(qWord, word) > bestWordScore) {
        bestWordScore = (0, _stringMatching.wordLike)(qWord, word);
        bestWord = word;
      }
    }
    if (bestWordScore > 0) {
      score += bestWordScore / (0, _int.harmonicMean)(qWord.length, bestWord.length);
      delete dict[bestWord];
    }
  });
  res.score = score;
  return res;
};
FontFamilySelectList.eventHandler = {};
FontFamilySelectList.eventHandler.ffPreUpdatePosition = function () {
  if (!this.followTarget) return;
  var bound = this.followTarget.getBoundingClientRect();
  var screenSizes = (0, _Dom.getScreenSize)();
  var availableHeight = screenSizes.height - bound.bottom;
  availableHeight = Math.max(availableHeight, bound.top);
  availableHeight -= 50;
  this.$content.addStyle('max-height', availableHeight + 'px');
};

/**
 * @this FontFamilySelectList
 */
FontFamilySelectList.eventHandler.searchChange = function () {
  var _this3 = this;
  var query = this.$searchInput.value.trim();
  var queryHolder = this._makeHolder(query, -1);
  var resultHolders, midScore, viewItemElements;
  if (query.length > 0) {
    this._prepareSearchingHolders();
    this._searchingHolders.forEach(function (itemHolder) {
      var match = _this3._calcMatching(queryHolder, itemHolder);
      Object.assign(itemHolder, match);
    });
    resultHolders = this._searchingHolders.slice();
    resultHolders.sort(function (a, b) {
      return b.score - a.score;
    });
    midScore = resultHolders[0].score * 0.7;
    resultHolders = resultHolders.filter(function (holder) {
      return holder.score >= midScore || holder.mustIncluded;
    });
    viewItemElements = resultHolders.map(function (holder) {
      return _this3.$items[holder.value];
    });
    this.$content.clearChild().addChild(viewItemElements);
  } else {
    this.$content.clearChild().addChild(this.$items);
  }
  this.updatePosition();
  console.log(query);
};
_ACore["default"].install(FontFamilySelectList);

/**
 * @extends AElement
 * @constructor
 */
function FontInput() {
  var _this4 = this;
  /**
   * @type {FontFamilySelectList}
   */
  this.$selectList = (0, _ACore._)('fontfamilyselectlist');
  this.$selectList.cancelWaiting();
  this.$selectList.sponsorElement = this;
  setTimeout(function () {
    _this4.$selectList.addTo(document.body);
    _this4.$selectList.followTarget = _this4;
  }, 100);
}
FontInput.tag = 'FontInput'.toLowerCase();
FontInput.render = function () {
  return (0, _ACore._)({
    "class": 'as-font-input'
  });
};
FontInput.property = {};
var _default = FontInput;
exports["default"] = _default;
_ACore["default"].install(FontInput);

/***/ }),

/***/ 63012:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(74892);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _stringGenerate = __webpack_require__(10713);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function Frame() {
  this.$parent = null; // FrameView or TabView
  //adapter
  (0, _utils.forwardEvent)(this, 'inactive', 'deactive');
}
Frame.tag = 'frame';
Frame.render = function () {
  return _({
    "class": 'absol-frame',
    attr: {
      id: (0, _stringGenerate.randomIdent)(12)
    },
    extendEvent: ['attached', 'detached', 'active', 'inactive'] // inactive and active event will be send by parent
  });
};

Frame.prototype.notifyAttached = function (parentElt) {
  this.$parent = parentElt;
  this.emit('attached', {
    type: 'attached',
    target: this,
    parentElt: parentElt
  }, this);
};
Frame.prototype.notifyDetached = function () {
  this.emit('detached', {
    type: 'detached',
    target: this,
    parentElt: this.$parent
  }, this);
  this.$parent = undefined;
};
Frame.prototype.selfRemove = function () {
  if (this.$parent) this.$parent.removeChild(this);else this["super"](); // normal remove
};

Frame.prototype.getParent = function () {
  return this.$parent;
};
Frame.prototype.requestActive = function () {
  if (this.$parent) {
    this.$parent.activeFrame(this);
  }
};
_ACore["default"].install(Frame);
var _default = Frame;
exports["default"] = _default;

/***/ }),

/***/ 95002:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(30215);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function FrameView() {
  this.$containers = [];
  //adapt
  (0, _utils.forwardEvent)(this, 'inactiveframe', 'deactiveframe');
  (0, _utils.forwardMethod)(this, 'notifyDeactiveFrame', 'notifyInactiveFrame');
}
FrameView.tag = 'frameview';
FrameView.render = function () {
  return _({
    "class": 'absol-frame-view',
    extendEvent: ['activeframe', 'inactiveframe']
  });
};
FrameView.prototype.addChild = function (elt) {
  if (elt.hasClass && elt.hasClass('absol-frame')) {
    elt.selfRemove();
    var containerElt = _({
      "class": 'absol-frame-view-frame-container',
      child: elt,
      props: {
        __elt__: elt
      }
    });
    this.$containers.push(containerElt);
    this.appendChild(containerElt);
    elt.notifyAttached(this);
  } else {
    throw new Error('Children must be a frame');
  }
};
FrameView.prototype.addLast = function (elt) {
  this.addChild(elt);
  this.activeFrame(elt);
};
FrameView.prototype.removeLast = function () {
  if (this.$containers.length > 0) {
    this.removeChild(this.$containers[this.$containers.length - 1].__elt__);
  }
  if (this.$containers.length > 0) {
    this.activeFrame(this.$containers[this.$containers.length - 1].__elt__);
  }
};
FrameView.prototype.getLength = function () {
  return this.$containers.length;
};
FrameView.prototype.getAllChild = function () {
  return this.$containers.map(function (ctn) {
    return ctn.__elt__;
  });
};
FrameView.prototype.getLast = function () {
  if (this.$containers.length > 0) {
    return this.$containers[this.$containers.length - 1].__elt__;
  }
  return null;
};
FrameView.prototype.addChildBefore = function (elt, at) {
  if (elt.hasClass && elt.hasClass('absol-frame')) {
    elt.selfRemove();
    var index = this.childIndexOf(at);
    if (index < 0) {
      throw new Error('Second param is not a child');
    }
    var index = this.childIndexOf(at);
    var atCtnElt = this.$containers[index];
    var containerElt = _({
      "class": 'absol-frame-view-frame-container',
      child: elt,
      props: {
        __elt__: elt
      }
    });
    this.$containers.splice(index, 0, containerElt);
    this["super"](containerElt, atCtnElt);
    elt.notifyAttached(this);
  } else {
    throw new Error('Children must be a frame');
  }
};
FrameView.prototype.addChildAfter = function (elt, at) {
  if (elt.hasClass && elt.hasClass('absol-frame')) {
    elt.selfRemove();
    var index = this.childIndexOf(at);
    if (index < 0) {
      throw new Error('Second param is not a child');
    }
    var index = this.childIndexOf(at);
    var atCtnElt = this.$containers[index];
    var containerElt = _({
      "class": 'absol-frame-view-frame-container',
      child: elt,
      props: {
        __elt__: elt
      }
    });
    this.$containers.splice(index + 1, 0, containerElt);
    this["super"](containerElt, atCtnElt);
    elt.notifyAttached(this);
  } else {
    throw new Error('Children must be a frame');
  }
};
FrameView.prototype.removeChild = function (elt) {
  var ctnEltIndex = this.childIndexOf(elt);
  if (ctnEltIndex >= 0) {
    var ctnElt = this.$containers[ctnEltIndex];
    this.$containers.splice(ctnEltIndex, 1);
    this["super"](ctnElt);
  } else {
    throw new Error('Removed element is not a child!');
  }
};
FrameView.prototype.childIndexOf = function (elt) {
  for (var i = 0; i < this.$containers.length; ++i) {
    if (this.$containers[i].__elt__ == elt) return i;
  }
  return -1;
};
FrameView.prototype.findChildBefore = function (elt) {
  var eltIndex = this.childIndexOf(elt);
  if (eltIndex < 0) return -1;
  return this.$containers[eltIndex - 1];
};
FrameView.prototype.findChildAfter = function (elt) {
  var eltIndex = this.childIndexOf(elt);
  if (eltIndex < 0) return -1;
  return this.$containers[eltIndex + 1];
};
FrameView.prototype.clearChild = function () {
  while (this.$containers.length > 0) {
    this.removeChild(this.$containers[0].__elt__);
  }
  return this;
};
FrameView.prototype.findChildById = function (id) {
  var elt;
  for (var i = 0; i < this.$containers.length; ++i) {
    elt = this.$containers[i].__elt__;
    if (elt.getAttribute('id') == id) return elt;
  }
  return undefined;
};
FrameView.prototype.getAllChild = function () {
  return this.$containers.map(function (ctnElt) {
    return ctnElt.__elt__;
  });
};
FrameView.prototype.activeFrame = function (frameElt) {
  var ctnElt, elt;
  for (var i = 0; i < this.$containers.length; ++i) {
    ctnElt = this.$containers[i];
    elt = ctnElt.__elt__;
    if (frameElt === elt) {
      if (!ctnElt.hasClass('absol-active')) {
        ctnElt.addClass('absol-active');
        this.notifyActiveFrame(elt);
      }
      // else do nothing
    } else {
      if (ctnElt.hasClass('absol-active')) {
        ctnElt.removeClass('absol-active');
        this.notifyInactiveFrame(elt);
      }
      // else do nonthing
    }
  }

  return this;
};
FrameView.prototype.notifyActiveFrame = function (frameElt, originEvent) {
  frameElt.emit('active', {
    target: frameElt,
    type: 'active',
    originEvent: originEvent
  });
  this.emit('activeframe', {
    type: 'activeframe',
    target: this,
    frameElt: frameElt,
    originEvent: originEvent
  }, this);
};
FrameView.prototype.notifyInactiveFrame = function (frameElt, originEvent) {
  this.emit('inactiveframe', {
    type: 'inactiveframe',
    target: this,
    frameElt: frameElt,
    originEvent: originEvent
  }, this);
};
FrameView.prototype.activeFrameById = function (id) {
  var frameElt = this.findChildById(id);
  if (frameElt) this.activeFrame(frameElt);
  return this;
};
_ACore["default"].install(FrameView);
var _default = FrameView;
exports["default"] = _default;

/***/ }),

/***/ 26058:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(61908);
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _Object = __webpack_require__(84131);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function HRuler() {
  var _this = this;
  this.$attachHook = _('attachhook').on('attached', function () {
    _this.requestUpdateSize = _this.update.bind(_this);
    _ResizeSystem["default"].add(_this.$attachHook);
    _this.requestUpdateSize();
  }).addTo(this);
  this.$attachHook.requestRevokeResource = this.revokeResource.bind(this);
  this.$lines = [];
  this.$numbers = [];
  this._viewingNumberCount = 0;
  this._viewingLineCount = 0;
  this._spacing = 10;
  this._major = 10;
  this.$measureTarget = null;
  this._valueFloat = 'left';

  /**
   * @type {number}
   * @name major
   * @memberof HRuler#
   */
  /**
   * @type {number}
   * @name spacing
   * @memberof HRuler#
   */

  /**
   * @type {boolean}
   * @name inverse
   * @memberof HRuler#
   */
}

HRuler.tag = 'hruler';
HRuler.render = function () {
  return _({
    "class": 'as-hruler'
  });
};
HRuler.prototype.measureElement = function (elt) {
  if (typeof elt == "string") elt = $(elt);
  this.$measureTarget = elt;
  this.update();
};
HRuler.prototype.update = function () {
  var fontSize = this.getFontSize();
  var measureBound;
  var bound = this.getBoundingClientRect();
  if (!bound.width || !bound.height) return;
  var contentBound = {
    left: bound.left + 1,
    right: bound.right - 1,
    top: bound.top + 1,
    bottom: bound.bottom - 1,
    width: bound.width - 2,
    height: bound.height - 2
  };
  if (this.$measureTarget) {
    measureBound = this.$measureTarget.getBoundingClientRect();
  } else {
    measureBound = contentBound;
  }
  var startOffset = (measureBound[this._valueFloat] - contentBound[this._valueFloat]) * (this.inverse ? -1 : 1) % this._spacing;
  if (startOffset < 0) startOffset += this._spacing;
  var lineIndexOffset = Math.round(((contentBound[this._valueFloat] - measureBound[this._valueFloat]) * (this.inverse ? -1 : 1) + startOffset) / this._spacing);
  var lineCount = Math.floor((contentBound.width - startOffset) / this._spacing) + 1;
  lineCount = Math.max(0, lineCount);
  while (this.$lines.length < lineCount) {
    this.$lines.push(_('.as-hruler-line'));
  }
  var i;
  var lineElt;
  for (i = 0; i < lineCount; ++i) {
    lineElt = this.$lines[i];
    if ((i + lineIndexOffset) % this._major === 0) {
      lineElt.addClass('major');
    } else {
      lineElt.removeClass('major');
    }
    lineElt.addStyle(this._valueFloat, startOffset + this._spacing * i - 0.5 + 'px');
  }
  while (this._viewingLineCount < lineCount) {
    this.$lines[this._viewingLineCount++].addTo(this);
  }
  while (this._viewingLineCount > lineCount) {
    this.$lines[--this._viewingLineCount].remove();
  }
  var numberCount = Math.floor((lineCount + lineIndexOffset - 1) / this._major) - Math.ceil(lineIndexOffset / this._major) + 1;
  while (this.$numbers.length < numberCount) {
    this.$numbers.push(_('.as-hruler-major-number'));
  }
  var numberElt;
  var number;
  var majorStartOfset = startOffset;
  if (lineIndexOffset > 0) {
    majorStartOfset += (this._major - lineIndexOffset % this._spacing) * this._spacing;
  } else {
    majorStartOfset += (this._major - (this._spacing + lineIndexOffset % this._spacing)) * this._spacing;
  }
  for (i = 0; i < numberCount; ++i) {
    number = (Math.ceil(lineIndexOffset / this._major) + i) * this._spacing * this._major;
    numberElt = this.$numbers[i];
    if (numberElt.__cacheNumber__ != number) {
      numberElt.__cacheNumber__ = number;
      numberElt.innerHTML = number + '';
    }
    numberElt.addStyle(this._valueFloat, majorStartOfset + this._major * i * this._spacing - 0.7 * 2.5 * fontSize + 'px');
  }
  while (this._viewingNumberCount < numberCount) {
    this.$numbers[this._viewingNumberCount++].addTo(this);
  }
  while (this._viewingNumberCount > numberCount) {
    this.$numbers[--this._viewingNumberCount].remove();
  }
};
HRuler.prototype.revokeResource = function () {
  this.$attachHook.cancelWaiting();
  this.$measureTarget = null;
  (0, _Object.revokeResource)(this.$lines);
  (0, _Object.revokeResource)(this.$numbers);
  this.clearChild();
  this.revokeResource = _noop["default"];
};
HRuler.property = {};
HRuler.property.major = {
  set: function set(value) {
    if (value > 0) {
      this._major = value;
      this.update();
    }
  },
  get: function get() {
    return this._major;
  }
};
HRuler.property.spacing = {
  set: function set(value) {
    if (value > 0) {
      this._spacing = value;
      this.update();
    }
  },
  get: function get() {
    return this._spacing;
  }
};
HRuler.property.inverse = {
  set: function set(value) {
    this._valueFloat = value ? 'right' : 'left';
    this.update();
  },
  get: function get() {
    return this._valueFloat === 'right';
  }
};
_ACore["default"].install(HRuler);
var _default = HRuler;
exports["default"] = _default;

/***/ }),

/***/ 63561:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(6026);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _EventEmitter = __webpack_require__(46833);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/****
 * @extends AElement
 * @constructor
 */
function Hanger() {
  this.addClass('as-hanger');
  this.defineEvent(['predrag', 'dragstart', 'drag', 'dragend', 'draginit', 'dragdeinit']); //predrag is draginit
  this._hangOn = 0;
  this._hangerPointerData = null;
  this.on2({
    mousedown: this.eventHandler.hangerPointerDown,
    touchstart: this.eventHandler.hangerPointerDown
  });
  this._touchEvents = {
    touchend: this.eventHandler.hangerPointerFinish,
    touchcancel: this.eventHandler.hangerPointerFinish,
    touchmove: this.eventHandler.hangerPointerMove
  };
  this._mouseEvents = {
    mouseup: this.eventHandler.hangerPointerFinish,
    mouseleave: this.eventHandler.hangerPointerFinish,
    mousemove: this.eventHandler.hangerPointerMove
  };
}
Hanger.tag = 'hanger';
Hanger.render = function () {
  return _('div');
};
Hanger.prototype.on2 = function () {
  if (arguments.length == 1) {
    for (var name in arguments[0]) {
      Hanger.prototype.on2.call(this, name, arguments[0][name]);
    }
  } else if (arguments.length == 2) {
    this.addEventListener(arguments[0], arguments[1], _BrowserDetector["default"].supportPassiveEvent ? {
      passive: false
    } : true);
  }
};
Hanger.prototype.off2 = function () {
  if (arguments.length == 1) {
    for (var name in arguments[0]) {
      Hanger.prototype.off2.call(this, name, arguments[0][name]);
    }
  } else if (arguments.length == 2) {
    this.removeEventListener(arguments[0], arguments[1], _BrowserDetector["default"].supportPassiveEvent ? {
      passive: false
    } : true);
  }
};
Hanger.property = {};

/**
 * @type {Hanger}
 */
Hanger.property.hangOn = {
  set: function set(value) {
    if (!(value > 0)) value = 0;
    this._hangOn = value;
  },
  get: function get() {
    return this._hangOn;
  }
};

/**
 * @type {Hanger}
 */
Hanger.eventHandler = {};
Hanger.eventHandler.hangerPointerDown = function (event) {
  if (this._hangerPointerData) return;
  var bound = this.getBoundingClientRect();
  var startingPoint;
  var isTouch = event.type === 'touchstart';
  var pointerIdent = -1;
  var target;
  if (isTouch) {
    var touch = event.changedTouches[0];
    target = touch.target;
    pointerIdent = touch.identifier;
    startingPoint = new _Vec["default"](touch.clientX, touch.clientY);
  } else {
    startingPoint = new _Vec["default"](event.clientX, event.clientY);
    target = event.target;
  }
  var offsetVec = startingPoint.sub(new _Vec["default"](bound.left, bound.top));
  this._hangerPointerData = {
    state: 0,
    isTouch: isTouch,
    bound: bound,
    startingPoint: startingPoint,
    offsetVec: offsetVec,
    pointerIdent: pointerIdent,
    target: target
  };
  var preDragEvent = {
    type: 'draginit',
    originEvent: event,
    isTouch: isTouch,
    bound: bound,
    startingPoint: startingPoint,
    currentPoint: startingPoint,
    offsetVec: offsetVec,
    pointerIdent: pointerIdent,
    canceled: false,
    cancel: function cancel() {
      this.canceled = true;
    },
    clientX: startingPoint.x,
    clientY: startingPoint.y,
    target: target,
    preventDefault: function preventDefault() {
      event.preventDefault();
    }
  };
  this.emit('draginit', preDragEvent, this);
  this.emit('predrag', Object.assign(preDragEvent, {
    type: 'predrag'
  }), this);
  if (preDragEvent.canceled) {
    this._hangerPointerData = null;
    return;
  }
  if (isTouch) this.on2.call(document, this._touchEvents);else this.on2.call(document, this._mouseEvents);
};
Hanger.eventHandler.hangerPointerMove = function (event) {
  var _this = this;
  var pointerData = this._hangerPointerData;
  var isTouch = pointerData.isTouch;
  var pointerIdent = -2;
  var currentPoint;
  if (isTouch) {
    var touch = (0, _EventEmitter.findChangedTouchByIdent)(event, pointerData.pointerIdent);
    if (touch) {
      pointerIdent = touch.identifier;
      currentPoint = new _Vec["default"](touch.clientX, touch.clientY);
    }
  } else {
    currentPoint = new _Vec["default"](event.clientX, event.clientY);
    pointerIdent = -1;
  }
  if (pointerIdent != pointerData.pointerIdent) return;
  pointerData.currentPoint = currentPoint;
  if (pointerData.state == 0) {
    var distance = currentPoint.sub(pointerData.startingPoint).abs();
    if (distance >= this._hangOn) {
      var dragStartEvent = {
        type: 'dragstart',
        originEvent: event,
        isTouch: isTouch,
        bound: pointerData.bound,
        startingPoint: pointerData.startingPoint,
        offsetVec: pointerData.offsetVec,
        pointerIdent: pointerIdent,
        currentPoint: currentPoint,
        target: pointerData.target,
        clientX: currentPoint.x,
        clientY: currentPoint.y,
        preventDefault: function preventDefault() {
          event.preventDefault();
        }
      };
      pointerData.trackedScrollers = function () {
        var res = [];
        var c = _this._hangerPointerData.target;
        while (c) {
          c.addEventListener('scroll', _this.eventHandler.trackingScroll);
          res.push(c);
          c = c.parentElement;
        }
        document.addEventListener('scroll', _this.eventHandler.trackingScroll);
        res.push(document);
        return res;
      }();
      pointerData.state = 1;
      this.emit('dragstart', dragStartEvent, this);
    }
  }
  if (pointerData.state === 1) {
    var dragEvent = {
      type: 'drag',
      originEvent: event,
      isTouch: isTouch,
      bound: pointerData.bound,
      startingPoint: pointerData.startingPoint,
      offsetVec: pointerData.offsetVec,
      pointerIdent: pointerIdent,
      currentPoint: currentPoint,
      target: pointerData.target,
      clientX: currentPoint.x,
      clientY: currentPoint.y,
      preventDefault: function preventDefault() {
        event.preventDefault();
      }
    };
    this.emit('drag', dragEvent, this);
  }
};
Hanger.eventHandler.hangerPointerFinish = function (event) {
  var _this2 = this;
  var pointerData = this._hangerPointerData;
  var isTouch = event.type === 'touchend';
  var dragEndEvent;
  if (pointerData.isTouch !== isTouch) return;
  var pointerIdent = -2;
  var currentPoint;
  if (isTouch) {
    var touch = (0, _EventEmitter.findChangedTouchByIdent)(event, pointerData.pointerIdent);
    if (touch) {
      pointerIdent = touch.identifier;
      currentPoint = new _Vec["default"](touch.clientX, touch.clientY);
    }
  } else {
    currentPoint = new _Vec["default"](event.clientX, event.clientY);
    pointerIdent = -1;
  }
  if (pointerIdent !== pointerData.pointerIdent) return;
  if (pointerData.state === 1) {
    pointerData.trackedScrollers.forEach(function (elt) {
      return elt.removeEventListener('scroll', _this2.eventHandler.trackingScroll);
    });
    dragEndEvent = {
      type: 'dragend',
      originEvent: event,
      isTouch: isTouch,
      bound: pointerData.bound,
      startingPoint: pointerData.startingPoint,
      offsetVec: pointerData.offsetVec,
      pointerIdent: pointerIdent,
      currentPoint: currentPoint,
      target: pointerData.target,
      clientX: currentPoint.x,
      clientY: currentPoint.y,
      preventDefault: function preventDefault() {
        event.preventDefault();
      }
    };
    this.emit('dragend', dragEndEvent, this);
  }
  this._hangerPointerData = null;
  if (isTouch) this.off2.call(document, this._touchEvents);else this.off2.call(document, this._mouseEvents);
  this.emit('dragdeinit', {
    type: 'dragdeinit',
    originEvent: event,
    isTouch: isTouch,
    bound: pointerData.bound,
    startingPoint: pointerData.startingPoint,
    offsetVec: pointerData.offsetVec,
    pointerIdent: pointerIdent,
    currentPoint: currentPoint,
    target: pointerData.target,
    clientX: currentPoint.x,
    clientY: currentPoint.y
  });
};
Hanger.eventHandler.trackingScroll = function (event) {
  var pointerData = this._hangerPointerData;
  var currentPoint = pointerData.currentPoint;
  var dragEvent = {
    type: 'drag',
    originEvent: event,
    isTouch: false,
    bound: pointerData.bound,
    startingPoint: pointerData.startingPoint,
    offsetVec: pointerData.offsetVec,
    pointerIdent: pointerData.pointerIdent,
    currentPoint: currentPoint,
    target: pointerData.target,
    clientX: currentPoint.x,
    clientY: currentPoint.y,
    isScrolling: true,
    preventDefault: function preventDefault() {
      // event.preventDefault();
    }
  };
  this.emit('drag', dragEvent, this);
};
_ACore["default"].install(Hanger);
var _default = Hanger;
exports["default"] = _default;

/***/ }),

/***/ 77057:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(68829);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var _g = _Svg["default"].ShareInstance._;
var $g = _Svg["default"].ShareInstance.$;
var Design = {
  hexaHeight: 425,
  textBoxHeight: 286,
  textHeight: 96,
  indexHeight: 110,
  textBoxPaddingLeft: 127,
  borderWidth: 38
};
var StyleSheet = {
  '.as-hexa-section-label-text': {
    height: Design.textBoxHeight / Design.textHeight + 'em',
    'padding-left': Design.textBoxPaddingLeft / Design.textHeight + 'em',
    'line-height': Design.textBoxHeight / Design.textHeight + 'em'
  },
  '.as-hexa-section-label-index': {
    'font-size': Design.indexHeight / Design.textHeight + 'em',
    height: Design.hexaHeight / Design.indexHeight + 'em',
    'line-height': Design.hexaHeight / Design.indexHeight + 'em',
    width: (Design.hexaHeight + Design.borderWidth) / Math.cos(Math.PI / 6) / Design.indexHeight + 'em'
  }
};
_({
  tag: 'style',
  id: 'hexa-section-label-style',
  props: {
    innerHTML: Object.keys(StyleSheet).map(function (key) {
      var style = StyleSheet[key];
      return key + ' {\n' + Object.keys(style).map(function (propName) {
        return propName + ': ' + style[propName] + ';';
      }).join('\n') + '}';
    }).join('\n')
  }
}).addTo(document.head);

/***
 * @extends AElement
 * @constructor
 */
function HexaSectionLabel() {
  this.$background = $('.as-hexa-section-label-background', this);
  this.$index = $('.as-hexa-section-label-index', this);
  this.$text = $('.as-hexa-section-label-text', this);
  this.$attachhook = _('attachhook').addTo(this).on('error', function () {
    _Dom["default"].addToResizeSystem(this);
    this.requestUpdateSize();
  });
  this.$attachhook.requestUpdateSize = this.redrawBackground.bind(this);
  this.$svg = _g({
    tag: 'svg',
    attr: {
      width: '0',
      height: '0'
    },
    child: ['path.as-hexa-section-label-text-box', 'path.as-hexa-section-label-index-box']
  }).addTo(this.$background);
  this.$indexBox = $g('path.as-hexa-section-label-index-box', this.$svg);
  this.$textBox = $g('path.as-hexa-section-label-text-box', this.$svg);
}
HexaSectionLabel.prototype.redrawBackground = function () {
  var indexBound = this.$index.getBoundingClientRect();
  var textBound = this.$text.getBoundingClientRect();
  var cHeight = indexBound.height;
  var cWidth = textBound.right - indexBound.left;
  this.$svg.attr({
    height: cHeight + '',
    width: cWidth + '',
    viewBox: [0, 0, cWidth, cHeight].join(' ')
  });
  var borderWidth = cHeight * Design.borderWidth / Design.hexaHeight;
  var radius = cHeight / Math.cos(Math.PI / 6) / 2 - borderWidth / 2;
  var x0 = indexBound.width / 2;
  var y0 = cHeight / 2;
  this.$indexBox.attr('d', Array(6).fill(0).map(function (u, i) {
    var angle = Math.PI / 3 + i * Math.PI / 3;
    var x = radius * Math.cos(angle) + x0;
    var y = radius * Math.sin(angle) + y0;
    return (i == 0 ? 'M' : 'L') + x + ' ' + y;
  }).join(' ') + 'Z').addStyle({
    strokeWidth: borderWidth + ''
  });
  var skewX = 18 / 45;
  var textBoxHeight = textBound.height;
  this.$textBox.attr('d', [[x0, (cHeight - textBoxHeight) / 2], [cWidth - 1, (cHeight - textBoxHeight) / 2], [cWidth - 1 - textBoxHeight * skewX, (cHeight - textBoxHeight) / 2 + textBoxHeight], [x0, (cHeight - textBoxHeight) / 2 + textBoxHeight]].map(function (point, i) {
    return (i == 0 ? 'M' : 'L') + point.join(' ');
  }).join(' ') + 'Z');
};
HexaSectionLabel.tag = 'HexaSectionLabel'.toLowerCase();
HexaSectionLabel.render = function () {
  return _({
    "class": 'as-hexa-section-label',
    child: [{
      "class": 'as-hexa-section-label-background'
    }, '.as-hexa-section-label-index', '.as-hexa-section-label-text']
  });
};
HexaSectionLabel.property = {};
HexaSectionLabel.property.index = {
  set: function set(value) {
    this._index = value;
    this.$index.clearChild().addChild(_({
      text: value + ''
    }));
  },
  get: function get() {
    return this._index;
  }
};
HexaSectionLabel.property.text = {
  set: function set(value) {
    this._text = value;
    this.$text.clearChild().addChild(_({
      text: value + ''
    }));
  },
  get: function get() {
    return this._text;
  }
};
_ACore["default"].install(HexaSectionLabel);
var _default = HexaSectionLabel;
exports["default"] = _default;

/***/ }),

/***/ 78120:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function IconSprite() {
  this.$attachhook = _('attachhook').addTo(this).on('error', this.eventHandler.attached);
  this.on('frame', this.eventHandler.frame);
  this._checkRootTimeout = 30;
  this.loop = true;
}
IconSprite.tag = 'iconsprite';
IconSprite.render = function () {
  return _('sprite', true);
};

/**
 * @type {IconSprite}
 */
IconSprite.eventHandler = {};
IconSprite.eventHandler.attached = function () {
  var thisAS = this;
  this._checkRootTimeout = 30;
  this.afterReady().then(function () {
    thisAS.width = thisAS.texture.naturalWidth;
    thisAS.height = thisAS.width;
    thisAS.frames = {
      type: 'grid',
      col: 1,
      row: thisAS.texture.naturalHeight / thisAS.texture.naturalWidth
    };
    thisAS.drawFrame(0);
    thisAS.play();
  });
};
IconSprite.eventHandler.frame = function () {
  this._checkRootTimeout--;
  if (this._checkRootTimeout == 0) {
    if (this.isDescendantOf(document.body)) {
      this._checkRootTimeout = 30;
    } else {
      this.stop();
      this.remove();
    }
  }
};
_ACore["default"].install(IconSprite);
var _default = IconSprite;
exports["default"] = _default;

/***/ }),

/***/ 39285:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.CityIcon = CityIcon;
exports.ConfigurationFormOutlineIcon = ConfigurationFormOutlineIcon;
exports.CountryIcon = CountryIcon;
exports.DataTypeConfiguratorOutlineIcon = DataTypeConfiguratorOutlineIcon;
exports.EmojiMutedIcon = EmojiMutedIcon;
exports.FontColorIcon = FontColorIcon;
exports.FunctionManagerIcon = FunctionManagerIcon;
exports.ImportantOutlineIcon = ImportantOutlineIcon;
exports.InputFormOutlineIcon = InputFormOutlineIcon;
exports.InsertColLeftIcon = InsertColLeftIcon;
exports.InsertColRightIcon = InsertColRightIcon;
exports.MdiStoreMarkerOutline = MdiStoreMarkerOutline;
exports.MobileFormEditOutlineIcon = MobileFormEditOutlineIcon;
exports.MobileInputFormOutlineIcon = MobileInputFormOutlineIcon;
exports.MobileOutputFormOutlineIcon = MobileOutputFormOutlineIcon;
exports.OutputFormOutlineIcon = OutputFormOutlineIcon;
exports.ProcedureOutlineIcon = ProcedureOutlineIcon;
exports.ProcessOutlineIcon = ProcessOutlineIcon;
exports.SpinnerIco = SpinnerIco;
exports.TemplateIcon = TemplateIcon;
exports.TimeBasedPayrollReportIcon = TimeBasedPayrollReportIcon;
exports.WindowsFormEditOutlineIcon = WindowsFormEditOutlineIcon;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _spinner = _interopRequireDefault(__webpack_require__(40420));
var _mdi_store_marker_outline = _interopRequireDefault(__webpack_require__(15436));
var _font_color = _interopRequireDefault(__webpack_require__(54371));
var _insert_col_left = _interopRequireDefault(__webpack_require__(39314));
var _insert_col_right = _interopRequireDefault(__webpack_require__(28791));
var _process_outline = _interopRequireDefault(__webpack_require__(42592));
var _procedure_outline = _interopRequireDefault(__webpack_require__(55330));
var _mobile_form_edit_outline = _interopRequireDefault(__webpack_require__(77083));
var _windows_form_edit_outline = _interopRequireDefault(__webpack_require__(85792));
var _input_form_outline = _interopRequireDefault(__webpack_require__(20677));
var _output_form_outline = _interopRequireDefault(__webpack_require__(24722));
var _template = _interopRequireDefault(__webpack_require__(70858));
var _mobile_input_form_outline = _interopRequireDefault(__webpack_require__(55073));
var _mobile_output_form_outline = _interopRequireDefault(__webpack_require__(50296));
var _city = _interopRequireDefault(__webpack_require__(80303));
var _country = _interopRequireDefault(__webpack_require__(76634));
var _configuration_form_outline = _interopRequireDefault(__webpack_require__(42116));
var _function_manager = _interopRequireDefault(__webpack_require__(7870));
var _data_type_configuration_outline = _interopRequireDefault(__webpack_require__(58993));
var _time_based_payroll_report = _interopRequireDefault(__webpack_require__(24453));
var _important_outline = _interopRequireDefault(__webpack_require__(81039));
var _emoji_muted = _interopRequireDefault(__webpack_require__(2497));
__webpack_require__(58934);
var _Color = _interopRequireDefault(__webpack_require__(64974));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function SpinnerIco() {
  return _ACore["default"]._(_spinner["default"]);
}
SpinnerIco.tag = 'SpinnerIco'.toLowerCase();
_ACore["default"].install(SpinnerIco);
function InsertColLeftIcon() {
  return _ACore["default"]._(_insert_col_left["default"]);
}
InsertColLeftIcon.tag = 'InsertColLeftIcon'.toLowerCase();
_ACore["default"].install(InsertColLeftIcon);
function InsertColRightIcon() {
  return _ACore["default"]._(_insert_col_right["default"]);
}
InsertColRightIcon.tag = 'InsertColRightIcon'.toLowerCase();
_ACore["default"].install(InsertColRightIcon);
function MdiStoreMarkerOutline() {
  return _ACore["default"]._(_mdi_store_marker_outline["default"]);
}
MdiStoreMarkerOutline.tag = 'mdi-store-marker-outline';
_ACore["default"].install(MdiStoreMarkerOutline);
function ProcessOutlineIcon() {
  return (0, _ACore._)(_process_outline["default"]);
}
ProcessOutlineIcon.tag = 'ProcessOutlineIcon'.toLowerCase();
_ACore["default"].install(ProcessOutlineIcon);
function ProcedureOutlineIcon() {
  return (0, _ACore._)(_procedure_outline["default"]);
}
ProcedureOutlineIcon.tag = 'ProcedureOutlineIcon'.toLowerCase();
_ACore["default"].install(ProcedureOutlineIcon);
function WindowsFormEditOutlineIcon() {
  return (0, _ACore._)(_windows_form_edit_outline["default"]);
}
WindowsFormEditOutlineIcon.tag = 'WindowsFormEditOutlineIcon'.toLowerCase();
_ACore["default"].install(WindowsFormEditOutlineIcon);
function MobileFormEditOutlineIcon() {
  return (0, _ACore._)(_mobile_form_edit_outline["default"]);
}
MobileFormEditOutlineIcon.tag = 'MobileFormEditOutlineIcon'.toLowerCase();
_ACore["default"].install(MobileFormEditOutlineIcon);
function TemplateIcon() {
  return (0, _ACore._)(_template["default"]);
}
TemplateIcon.tag = 'TemplateIcon'.toLowerCase();
_ACore["default"].install(TemplateIcon);
function InputFormOutlineIcon() {
  return (0, _ACore._)(_input_form_outline["default"]);
}
InputFormOutlineIcon.tag = 'InputFormOutlineIcon'.toLowerCase();
_ACore["default"].install(InputFormOutlineIcon);
function OutputFormOutlineIcon() {
  return (0, _ACore._)(_output_form_outline["default"]);
}
OutputFormOutlineIcon.tag = 'OutputFormOutlineIcon'.toLowerCase();
_ACore["default"].install(OutputFormOutlineIcon);
function MobileInputFormOutlineIcon() {
  return (0, _ACore._)(_mobile_input_form_outline["default"]);
}
MobileInputFormOutlineIcon.tag = 'MobileInputFormOutlineIcon'.toLowerCase();
_ACore["default"].install(MobileInputFormOutlineIcon);
function MobileOutputFormOutlineIcon() {
  return (0, _ACore._)(_mobile_output_form_outline["default"]);
}
function CityIcon() {
  return (0, _ACore._)(_city["default"]);
}
CityIcon.tag = 'CityIcon'.toLowerCase();
_ACore["default"].install(CityIcon);
function CountryIcon() {
  return (0, _ACore._)(_country["default"]);
}
CountryIcon.tag = 'CountryIcon'.toLowerCase();
_ACore["default"].install(CountryIcon);
MobileOutputFormOutlineIcon.tag = 'MobileOutputFormOutlineIcon'.toLowerCase();
_ACore["default"].install(MobileOutputFormOutlineIcon);
function FontColorIcon() {
  this._value = '#000000';
  this.$contract = (0, _ACore.$)('.as-font-color-contract', this);
  this.$value = (0, _ACore.$)('.as-font-color-value', this);
  this.value = 'cyan';
}
FontColorIcon.tag = 'FontColorIcon'.toLowerCase();
FontColorIcon.render = function () {
  return (0, _ACore._)(_font_color["default"]);
};
FontColorIcon.property = {};
FontColorIcon.property.value = {
  set: function set(value) {
    var cValue;
    if (typeof value === "string") {
      try {
        cValue = _Color["default"].parse(value);
        value = cValue.toString('hex6');
      } catch (err) {
        value = "#000000";
        cValue = _Color["default"].parse(value);
      }
    } else if (value instanceof _Color["default"]) {
      cValue = value;
      value = value.toString('hex6');
    } else {
      value = "#000000";
      cValue = _Color["default"].parse(value);
    }
    this._value = value;
    var hColor = cValue.getContrastYIQ();
    this.$contract.addStyle('fill', hColor.toString("hex6"));
    this.$value.addStyle('fill', this._value.toString('hex6'));
  },
  get: function get() {
    return this._value;
  }
};
function ConfigurationFormOutlineIcon() {
  return (0, _ACore._)(_configuration_form_outline["default"]);
}
ConfigurationFormOutlineIcon.tag = 'ConfigurationFormOutlineIcon'.toLowerCase();
_ACore["default"].install(ConfigurationFormOutlineIcon);
function FunctionManagerIcon() {
  return (0, _ACore._)(_function_manager["default"]);
}
FunctionManagerIcon.tag = 'FunctionManagerIcon'.toLowerCase();
_ACore["default"].install(FunctionManagerIcon);
function DataTypeConfiguratorOutlineIcon() {
  return (0, _ACore._)(_data_type_configuration_outline["default"]);
}
DataTypeConfiguratorOutlineIcon.tag = 'DataTypeConfiguratorOutlineIcon'.toLowerCase();
_ACore["default"].install(DataTypeConfiguratorOutlineIcon);
function TimeBasedPayrollReportIcon() {
  return (0, _ACore._)(_time_based_payroll_report["default"]);
}
TimeBasedPayrollReportIcon.tag = 'TimeBasedPayrollReportIcon'.toLowerCase();
_ACore["default"].install(TimeBasedPayrollReportIcon);
function ImportantOutlineIcon() {
  return (0, _ACore._)(_important_outline["default"]).addStyle({
    width: '1em',
    height: '1em'
  });
}
ImportantOutlineIcon.tag = 'ImportantOutlineIcon'.toLowerCase();
_ACore["default"].install(ImportantOutlineIcon);
function EmojiMutedIcon() {
  return (0, _ACore._)(_emoji_muted["default"]);
}
EmojiMutedIcon.tag = 'EmojiMutedIcon'.toLowerCase();
_ACore["default"].install(EmojiMutedIcon);

/***/ }),

/***/ 62501:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Text = __webpack_require__(35844);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @augments HTMLInputElement
 * @augments AElement
 * @constructor
 */
function IdentTextInput() {
  this.history = new ITIHistory(this);
  this.textCtrl = new ITITextController(this);
  // this.on('keydown', this.eventHandler.identTextKeyDown)
  //     .on('paste', this.applyData ? this.eventHandler.identTextPaste : this.eventHandler.identTextPaste1);
}

IdentTextInput.tag = 'IdentTextInput'.toLowerCase();
IdentTextInput.render = function () {
  return (0, _ACore._)('input.as-text-input[type="text"]');
};
IdentTextInput.prototype._filterHistory = function () {
  if (!this.history) return;
  var temp = this.history.filter(function (t) {
    return !t.text.match(/(^[^a-zA-Z_$])|([^a-zA-Z$_0-9]+)/);
  });
  this.history.splice(0, this.history.length);
  this.history.push.apply(this.history, temp);
};
IdentTextInput.prototype._setNewText = function (text, caretPos) {
  this._filterHistory();
  if (typeof caretPos !== "number") caretPos = text.length;
  caretPos = Math.max(0, Math.min(text.length, caretPos >> 0));
  if (this.applyData) {
    this.applyData(text, {
      start: caretPos,
      end: caretPos,
      direction: 'forward'
    });
  } else {
    this.value = text;
    (0, _Text.setCaretPosition)(this, caretPos);
  }
};
IdentTextInput.property = {};
IdentTextInput.property.lowerCaseOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-lower-case-only');
      this.value = this.value.toLowerCase();
    } else {
      this.removeClass('as-lower-case-only');
    }
  },
  get: function get() {
    return this.addClass('as-lower-case-only');
  }
};
_ACore["default"].install(IdentTextInput);
var _default = IdentTextInput;
/**
 *
 * @param {IdentTextInput} elt
 * @constructor
 */
exports["default"] = _default;
function ITIHistory(elt) {
  this.elt = elt;
}

/**
 *
 * @param {IdentTextInput} elt
 * @constructor
 */
function ITITextController(elt) {
  var _this = this;
  this.elt = elt;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) _this[key] = _this[key].bind(_this);
  });
  this.elt.on('keydown', this.ev_keydown);
}
ITITextController.prototype.keyboardRegex = /[a-zA-Z$_0-9]/;
ITITextController.prototype.getSelectionStart = function () {
  var start = 0;
  if (this.elt.selectionStart || this.elt.selectionStart === 0) start = this.elt.selectionStart;
  return start;
};
ITITextController.prototype.getSelectionEnd = function () {
  var end = 0;
  if (this.elt.selectionEnd || this.elt.selectionEnd === 0) end = this.elt.selectionEnd;
  return end;
};
ITITextController.prototype.ev_keydown = function (event) {
  var selectedPositionStart;
  var key = event.key;
  if (key === ' ') {
    event.preventDefault();
  } else if (key === 'Enter') {
    event.preventDefault();
    this.elt.blur();
  } else if (key === "Escape") {
    // this.value = this._prevValue || '';
    this.elt.blur();
  } else if (!event.ctrlKey && !event.altKey && key.length === 1) {
    // if (nonAccentVietnamese(key).match(this.keyboardRegex)) {
    //     selectedPositionStart = this.getSelectionStart();
    //     if (selectedPositionStart === 0 && key.match(/[0-9]/)) {
    //         event.preventDefault();
    //     }
    // }
    // else {
    //     event.preventDefault();
    // }
  }
};

/***/ }),

/***/ 49067:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(19175);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _datetime = __webpack_require__(58286);
var _ContextMenu = _interopRequireDefault(__webpack_require__(24733));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function KVCommentItem() {
  this._time = new Date();
  this._text = '';
  this.$text = (0, _ACore.$)('.kv-comment-item-text', this);
  this.$time = (0, _ACore.$)('.kv-comment-item-time', this);
  this.$avatar = (0, _ACore.$)('.kv-comment-avatar', this);
  this.quickmenu = null;
  this.on('contextmenu', this.eventHandler.kv_contextmenu);
  _ContextMenu["default"].auto();
}
KVCommentItem.tag = 'KVCommentItem'.toLowerCase();
KVCommentItem.render = function () {
  return (0, _ACore._)({
    extendEvent: 'contextmenu',
    "class": "kv-comment-item",
    child: [{
      "class": "kv-comment-avatar-ctn",
      child: {
        "class": 'kv-comment-avatar',
        style: {
          backgroundImage: 'url(https://raw.githubusercontent.com/duthienkt/absol/master/logo.svg?sanitize=true)'
        }
      }
    }, {
      "class": "kv-comment-item-content",
      child: [{
        "class": 'kv-comment-item-text',
        child: {
          text: ''
        }
      }, {
        "class": 'kv-comment-item-time',
        child: {
          text: (0, _datetime.formatDateTime)(new Date(), 'dd/MM/yyyy HH:mm')
        }
      }]
    }, {
      "class": "kv-comment-item-flag-ctn",
      child: ['.kv-comment-item-flag-unread']
    }]
  });
};
KVCommentItem.property = {};
KVCommentItem.property.text = {
  set: function set(value) {
    value = value || '';
    if (typeof value === 'string') this.$text.innerHTML = value;else if (absol.Dom.isDomNode(value)) {
      this.$text.clearChild().addChild(value);
    } else {
      this.$text.clearChild().addChild((0, _ACore._)(value));
    }
    this._text = value;
  },
  get: function get() {
    return this._text;
  }
};
KVCommentItem.property.unread = {
  set: function set(value) {
    if (value) {
      this.addClass('as-unread');
    } else {
      this.removeClass('as-unread');
    }
  },
  get: function get() {
    return this.hasClass('as-unread');
  }
};
KVCommentItem.property.time = {
  set: function set(value) {
    this._time = value;
    var text = '';
    if (typeof value === 'string') text = value;else if (value instanceof Date) {
      text = (0, _datetime.formatDateTime)(value, 'dd/MM/yyyy HH:mm');
    }
    this.$time.firstChild.data = text;
  },
  get: function get() {
    return this._time;
  }
};
KVCommentItem.property.avatar = {
  set: function set(value) {
    value = value || 'https://raw.githubusercontent.com/duthienkt/absol/master/logo.svg?sanitize=true';
    this._avatar = value;
    this.$avatar.addStyle('backgroundImage', 'url(' + value + ')');
  },
  get: function get() {
    return this._avatar;
  }
};

/***
 * @memberOf KVCommentItem#
 * @type {{}}
 */
KVCommentItem.eventHandler = {};

/***
 * @this KVCommentItem
 * @param event
 */
KVCommentItem.eventHandler.kv_contextmenu = function (event) {
  if (this.quickmenu) {
    event.showContextMenu(this.quickmenu.props, function (event) {
      var menuItem = (0, _utils.cleanMenuItemProperty)(event.menuItem);
      if (this.quickmenu.onSelect) {
        this.quickmenu.onSelect.call(this, menuItem);
      }
    }.bind(this));
  }
};
_ACore["default"].install(KVCommentItem);
var _default = KVCommentItem;
exports["default"] = _default;

/***/ }),

/***/ 28848:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(56090);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var _g = _Svg["default"].ShareInstance._;
var $g = _Svg["default"].ShareInstance.$;
var Design = {
  textHeight: 56,
  barHeight: 97,
  barBlockWidth: 79,
  barBlockMargin: 19,
  valueTextHeight: 70,
  valueStrokeWidth: 5,
  valueHeight: 99,
  valueWidth: 52,
  valueTripHeight: 32,
  height: 430,
  barY: 201
};
var SyleSheet = {
  '.as-linear-color-bar': {
    height: Design.height / Design.textHeight + 'em'
  },
  '.as-linear-color-value-text': {
    'font-size': Design.valueTextHeight / Design.textHeight + 'em'
  }
};
(0, _utils.buildCss)(SyleSheet);
function LinearColorBar() {
  this._indent = (Math.random() + '').replace(/[^0-9]/g, '_');
  this._extendValue = 0;
  this._value = 0;
  this._valueText = '';
  this.$valueText = $('.as-linear-color-value-text', this);
  this.$minValueText = $('.as-linear-color-min-value-text', this);
  this.$maxValueText = $('.as-linear-color-max-value-text', this);
  this.$background = $('svg.as-linear-color-background', this);
  this._attached = false;
  var thisBar = this;
  this.$attachhook = _('attachhook').addTo(this).on('error', function () {
    thisBar._attached = true;
    _Dom["default"].addToResizeSystem(this);
    this.requestUpdateSize();
  });
  this.$background.attr({
    height: 0,
    width: 0
  });
  this.$attachhook.requestUpdateSize = this.redraw.bind(this);
  this.$defs = _g('defs').addTo(this.$background);
  this.$gradient = _g('linearGradient#gradient_' + this._indent).attr({
    x1: "0%",
    y1: "0%",
    x2: "100%",
    y2: "0%"
  }).addTo(this.$defs);
  this.$rect = _g('rect.as-linear-color-bar-rect').attr({
    fill: 'url(#gradient_' + this._indent + ')'
  }).addTo(this.$background);
  this.$splitLine = _g('path.as-linear-color-split-line').addTo(this.$background);
  this.$valueArrow = _g('path.as-linear-color-value-arrow').addTo(this.$background);
  this.colorMapping = 'rainbow';
}
LinearColorBar.prototype.redraw = function () {
  var bBound = this.getBoundingClientRect();
  var cWidth = bBound.width;
  var cHeight = bBound.height;
  var maxTextBound = this.$maxValueText.getBoundingClientRect();
  var minTextBound = this.$minValueText.getBoundingClientRect();
  var valueTextBound = this.$valueText.getBoundingClientRect();
  var valueWidth = Design.valueWidth / Design.height * cHeight;
  var minValueX = valueWidth / 1.5;
  this.$minValueText.addStyle('left', Math.max((minValueX - minTextBound.width) / 2, 0) + 'px');
  var maxValueX = (cWidth - Design.valueWidth) / (1 + this._extendValue);
  var extendX = cWidth - valueWidth / 1.5;
  var valueX = minValueX + this._value * (maxValueX - minValueX);
  this.$valueText.addStyle('left', valueX - valueTextBound.width / 2 + 'px');
  this.$maxValueText.addStyle('left', maxValueX - maxTextBound.width / 2 + 'px');
  var barY = Design.barY / Design.height * cHeight;
  var barHeight = Design.barHeight / Design.height * cHeight;
  this.$rect.attr({
    x: '' + minValueX,
    y: '' + barY,
    width: extendX - minValueX + '',
    height: barHeight
  });
  this.$background.attr({
    height: cHeight + '',
    width: cWidth + '',
    viewBox: [0, 0, cWidth, cHeight].join(' ')
  });
  var valueTripHeight = Design.valueTripHeight / Design.height * cHeight;
  var valueHeight = Design.valueHeight / Design.height * cHeight;
  this.$valueArrow.addStyle('stroke-width', Design.valueStrokeWidth / Design.height * cHeight + '').attr('d', [[[valueX, barY], [valueX - valueWidth / 2, barY - valueTripHeight], [valueX - valueWidth / 2, barY - valueHeight], [valueX + valueWidth / 2, barY - valueHeight], [valueX + valueWidth / 2, barY - valueTripHeight]]].map(function (point, i) {
    return (i == 0 ? 'M' : 'L') + point.join(' ');
  }).join(' ') + 'Z');
  var splitDistMin = (Design.barBlockWidth + Design.barBlockMargin) / Design.height * cHeight;
  var splitCounts = [100, 50, 20, 10, 5, 2, 1];
  var splitDist = maxValueX - minValueX;
  var splitCount = 1;
  for (var i = 0; i < splitCounts.length; ++i) {
    splitDist = (maxValueX - minValueX) / splitCounts[i];
    if (splitDist >= splitDistMin) {
      splitCount = splitCounts[i];
      break;
    }
  }
  this.$splitLine.addStyle('stroke-width', Design.barBlockMargin / Design.height * cHeight + '').attr({
    d: Array(splitCount + 1).fill(0).map(function (u, i) {
      return 'M' + (maxValueX - i * splitDist) + ' ' + (barY - 1) + 'v' + (barHeight + 2);
    }).join(' ')
  });
};
LinearColorBar.prototype._updateGradient = function () {
  var barMax = 1 + this._extendValue;
  var gradientElt = this.$gradient.clearChild();
  this._colorMapping.forEach(function (it) {
    _g({
      tag: 'stop',
      attr: {
        offset: (it.value <= 1 ? it.value / barMax * 100 : 100) + '%'
      },
      style: {
        'stop-color': it.color + '',
        'stop-opacity': '1'
      }
    }).addTo(gradientElt);
  });
};
LinearColorBar.prototype.BUILDIN_COLORS_RANGE = {
  'rainbow': [{
    value: 0,
    color: 'red'
  }, {
    value: 1 / 6,
    color: 'orange'
  }, {
    value: 1 / 3,
    color: 'yellow'
  }, {
    value: 1 / 2,
    color: 'green'
  }, {
    value: 2 / 3,
    color: 'blue'
  }, {
    value: 5 / 6,
    color: 'indigo'
  }, {
    value: 1,
    color: 'violet'
  }, {
    value: Infinity,
    color: 'violet'
  }],
  'rainbow-invert': [{
    value: 0,
    color: 'violet'
  }, {
    value: 1 / 6,
    color: 'indigo'
  }, {
    value: 1 / 3,
    color: 'blue'
  }, {
    value: 1 / 2,
    color: 'green'
  }, {
    value: 2 / 3,
    color: 'yellow'
  }, {
    value: 5 / 6,
    color: 'orange'
  }, {
    value: 1,
    color: 'red'
  }, {
    value: Infinity,
    color: 'violet'
  }],
  'performance': [{
    value: 0,
    color: 'red'
  }, {
    value: 0.5,
    color: 'orange'
  }, {
    value: 1,
    color: 'green'
  }, {
    value: Infinity,
    color: 'green'
  }],
  'performance-invert': [{
    value: 0,
    color: 'green'
  }, {
    value: 0.5,
    color: 'orange'
  }, {
    value: 1,
    color: 'red'
  }, {
    value: Infinity,
    color: 'red'
  }]
};
LinearColorBar.tag = 'LinearColorBar'.toLowerCase();
LinearColorBar.render = function () {
  return _({
    "class": 'as-linear-color-bar',
    child: ['svg.as-linear-color-background', '.as-linear-color-value-text', '.as-linear-color-min-value-text', '.as-linear-color-max-value-text']
  });
};
LinearColorBar.property = {};
LinearColorBar.property.valueText = {
  set: function set(value) {
    value = value + '';
    this._valueText = value;
    this.$valueText.clearChild().addChild(_({
      text: value
    }));
  },
  get: function get() {
    return this._valueText;
  }
};
LinearColorBar.property.minValueText = {
  set: function set(value) {
    value = value + '';
    this._minValueText = value;
    this.$minValueText.clearChild().addChild(_({
      text: value
    }));
  },
  get: function get() {
    return this._valueText;
  }
};
LinearColorBar.property.maxValueText = {
  set: function set(value) {
    value = value + '';
    this._maxValueText = value;
    this.$maxValueText.clearChild().addChild(_({
      text: value
    }));
  },
  get: function get() {
    return this._valueText;
  }
};
LinearColorBar.property.value = {
  set: function set(value) {
    this._value = value;
  },
  get: function get() {
    return this._value;
  }
};
LinearColorBar.property.extendValue = {
  set: function set(value) {
    this._extendValue = value;
    this._updateGradient();
  },
  get: function get() {
    return this._extendValue;
  }
};
LinearColorBar.property.colorMapping = {
  set: function set(value) {
    if (typeof value == "string") value = this.BUILDIN_COLORS_RANGE[value];
    this._colorMapping = value.slice();
    this._colorMapping.sort(function (a, b) {
      return a.value - b.value;
    });
    this._updateGradient();
  },
  get: function get() {
    return this._colorMapping;
  }
};
_ACore["default"].install(LinearColorBar);
var _default = LinearColorBar;
exports["default"] = _default;

/***/ }),

/***/ 96026:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _LinearColorBar = _interopRequireDefault(__webpack_require__(28848));
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _printer = __webpack_require__(97397);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends {AElement}
 * @constructor
 */
function LinearColorTinyBar() {
  this._value = 0;
  this._colorMapping = 0;
  this._colorMapping = this.BUILDIN_COLORS_RANGE.rainbow;
  this.$textCtn = (0, _ACore.$)('.as-linear-color-tiny-text', this);
  /***
   *
   * @type {Text}
   */
  this.$text = this.$textCtn.firstChild;
  /***
   * @type {string} valueText
   * @memberOf LinearColorTinyBar#
   * @name valueText
   */

  /***
   * @type {number}  from 0..1..Inf
   * @memberOf LinearColorTinyBar#
   * @name value
   */

  /***
   * @type {Array} - from 0..1..Inf
   * @memberOf LinearColorTinyBar#
   * @name colorMapping#
   */
}

LinearColorTinyBar.tag = 'LinearColorTinyBar'.toLowerCase();
LinearColorTinyBar.render = function () {
  return (0, _ACore._)({
    "class": 'as-linear-color-tiny-bar',
    child: [{
      tag: 'span',
      "class": 'as-linear-color-tiny-text',
      style: {
        display: 'none'
      },
      child: {
        text: ''
      }
    }, '.as-linear-color-tiny-bar-rect']
  });
};
LinearColorTinyBar.prototype.BUILDIN_COLORS_RANGE = _LinearColorBar["default"].prototype.BUILDIN_COLORS_RANGE;
LinearColorTinyBar.prototype._updateColor = function () {
  var value = this._value;
  var colorMapping = this.colorMapping;
  var i = 0;
  while (i < colorMapping.length) {
    if (i + 1 == colorMapping.length || colorMapping[i + 1].value > value) break;
    ++i;
  }
  this.addStyle('--color', colorMapping[i].color + '');
};
LinearColorTinyBar.property = {};
LinearColorTinyBar.property.value = {
  set: function set(value) {
    if (typeof value === "string") value = parseFloat(value);
    if (typeof value !== "number") value = 0;
    if (isNaN(value)) value = 0;
    this._value = Math.max(value, 0);
    this.addStyle('--value', this._value + '');
    this._updateColor();
  },
  get: function get() {
    return this._value;
  }
};
LinearColorTinyBar.property.valueText = {
  set: function set(value) {
    if (typeof value === "string" || typeof value === 'number') {
      this.$text.data = value;
      this.$textCtn.removeStyle('display', 'none');
    } else {
      this.$text.data = '';
      this.$textCtn.addStyle('display', 'none');
    }
  },
  get: function get() {
    return this.$text.data;
  }
};
LinearColorTinyBar.property.colorMapping = {
  set: function set(value) {
    var ok = true;
    if (typeof value === 'string') {
      if (!(value in this.BUILDIN_COLORS_RANGE)) {
        value = 'rainbow';
      }
      value = this.BUILDIN_COLORS_RANGE[value];
    } else if (value instanceof Array) {
      ok = value.length > 1;
      if (!ok) {
        console.warn("colorMapping.length must > 1", value);
      }
    } else {
      console.warn("Invalid colorMapping", value);
    }
    if (!ok) value = this.BUILDIN_COLORS_RANGE.rainbow;
    this._colorMapping = value;
    this._updateColor();
  },
  get: function get() {
    return this._colorMapping;
  }
};
_ACore["default"].install(LinearColorTinyBar);
var _default = LinearColorTinyBar;
exports["default"] = _default;
_printer.ShareSerializer.addHandlerBefore({
  match: function match(elt, scope, stack) {
    return elt.hasClass && elt.hasClass('as-linear-color-tiny-bar-rect');
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var bound = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    bound.x -= printer.O.x;
    bound.y -= printer.O.y;
    printer.rect(bound, {
      fill: elt.getComputedStyleValue('background-color')
    });
  }
}, '*');

/***/ }),

/***/ 79517:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(69577);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Dom = __webpack_require__(64821);
var _TextMeasure = _interopRequireDefault(__webpack_require__(60268));
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _OOP = __webpack_require__(38608);
var _CheckBox = _interopRequireDefault(__webpack_require__(11946));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _utils = __webpack_require__(84512);
var _attribute = __webpack_require__(18144);
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _CMDTool = _interopRequireWildcard(__webpack_require__(97847));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _g = _Svg["default"].ShareInstance._;

/**
 * @typedef ListCompareToolItem
 * @property {string} text
 * @property {string} value
 * @property {string} [icon] - mdi icon or map from tag in form
 */

/**
 * @extends {AElement}
 * @constructor
 */
function ListCompareTool() {
  var _this = this;
  this.$header = (0, _ACore.$)('.as-list-compare-tool-header', this);
  this.$before = (0, _ACore.$)('.as-list-compare-tool-before', this);
  this.$after = (0, _ACore.$)('.as-list-compare-tool-after', this);
  this.beforeCtrl = new LCTListController(this, this.$before);
  this.afterCtrl = new LCTListController(this, this.$after);
  this.$attachhook = (0, _ACore._)('attachhook').addTo(this);
  this.$body = (0, _ACore.$)('.as-list-compare-tool-body', this);
  this.$attachhook.on('attached', function () {
    _ResizeSystem["default"].add(_this.$attachhook);
    _this.$attachhook.requestUpdateSize();
  });
  this.$attachhook.requestUpdateSize = this.requestUpdateSize.bind(this);
  this.$operators = (0, _ACore.$)('.as-list-compare-tool-operators', this);
  this.mapOperatorCtr = new LCTMapOperatorController(this);
  this.headerCtr = new LCTHeaderController(this);
  this.newLineTool = new LCTNewLineTool(this);
  this.removeLineTool = new LCTRemoveLineTool(this);
  this.cmdTool = new _CMDTool["default"]();
  this.cmdDelegate = new LCTCommandDelegate(this);
  this.cmdTool.delegate = this.cmdDelegate;
  this.$header.addChildAfter(this.cmdTool.getView(), null);
  this.layoutCtr = new LCTLayoutController(this);
  (0, _OOP.drillProperty)(this, this.mapOperatorCtr, 'mapOperators');
  (0, _OOP.drillProperty)(this, this.beforeCtrl, 'beforeItems', 'items');
  (0, _OOP.drillProperty)(this, this.afterCtrl, 'afterItems', 'items');

  /**
   * @type {ListCompareToolItem[]}
   * @memberOf ListCompareTool#
   * @name beforeItems
   */

  /**
   * @type {ListCompareToolItem[]}
   * @memberOf ListCompareTool#
   * @name afterItems
   */

  /**
   * @type {mapOperators[]}
   * @memberOf ListCompareTool#
   * @name afterItems
   */
}

ListCompareTool.tag = 'ListCompareTool';
ListCompareTool.render = function () {
  return (0, _ACore._)({
    extendEvent: 'change',
    attr: {
      tabindex: 1
    },
    "class": ['as-list-compare-tool', 'as-width-auto', 'as-height-auto', 'as-max-height-auto'],
    child: [{
      "class": 'as-list-compare-tool-header',
      child: [{
        "class": 'as-list-compare-tool-check-ctn',
        child: [{
          tag: _CheckBox["default"],
          "class": 'as-list-compare-tool-changed-only-checkbox',
          props: {
            text: 'Chỉ hiện phần thay đổi',
            checked: false
          }
        }]
      }]
    }, {
      "class": 'as-list-compare-tool-body',
      child: ['.as-list-compare-tool-before-title', '.as-list-compare-tool-after-title', {
        "class": ['as-list-compare-tool-before', 'as-bscroller']
      }, {
        "class": 'as-list-compare-tool-spacing'
      }, {
        "class": ['as-list-compare-tool-after', 'as-bscroller']
      }, {
        "class": 'as-list-compare-tool-operators',
        child: _g({
          tag: 'svg',
          child: [{
            tag: 'defs',
            child: [{
              tag: 'marker',
              "class": 'as-lct-arrow',
              attr: {
                id: 'arrow',
                markerWidth: '3',
                markerHeight: '8',
                orient: 'auto',
                refX: '4.1',
                refY: '4'
              },
              child: {
                tag: 'path',
                attr: {
                  d: 'M0,0 V8 L4,4 Z'
                },
                style: {
                  fill: 'var(--line-color)'
                }
              }
            }, {
              tag: 'marker',
              "class": 'as-lct-same-value-arrow',
              attr: {
                id: 'same-value-arrow',
                markerWidth: '3',
                markerHeight: '8',
                orient: 'auto',
                refX: '4.1',
                refY: '4'
              },
              child: {
                tag: 'path',
                attr: {
                  d: 'M0,0 V8 L4,4 Z'
                },
                style: {
                  fill: 'var(--line-color)'
                }
              }
            }, {
              tag: 'marker',
              "class": 'as-lct-new-line-arrow',
              attr: {
                id: 'new-line-arrow',
                markerWidth: '3',
                markerHeight: '8',
                orient: 'auto',
                refX: '4.1',
                refY: '4'
              },
              child: {
                tag: 'path',
                attr: {
                  d: 'M0,0 V8 L4,4 Z'
                },
                style: {
                  fill: 'var(--line-color)'
                }
              }
            }]
          }]
        })
      }]
    }]
  });
};
ListCompareTool.property = {};
ListCompareTool.property.unchangeText = {
  set: function set(text) {},
  get: function get() {}
};
ListCompareTool.property.changeText = {
  set: function set(text) {},
  get: function get() {}
};
ListCompareTool.prototype.commands = {
  newLineTool: {
    /**
     * @this {ListCompareTool}
     */
    exec: function exec() {
      var _this2 = this;
      setTimeout(function () {
        _this2.removeLineTool.disable(true);
        _this2.newLineTool.disable(false);
        _this2.cmdDelegate.updateVisibility();
      });
    },
    descriptor: {
      type: 'toggle_switch',
      icon: 'span.mdi.mdi-pencil-plus',
      desc: function desc() {
        return 'Vẽ đường nối';
      }
    }
  },
  removeLineTool: {
    exec: function exec() {
      var _this3 = this;
      setTimeout(function () {
        _this3.newLineTool.disable(true);
        _this3.removeLineTool.disable(false);
        _this3.cmdDelegate.updateVisibility();
      });
    },
    descriptor: {
      type: 'toggle_switch',
      icon: 'span.mdi.mdi-eraser',
      desc: function desc() {
        return 'Xóa đường nối';
      }
    }
  }
};
ListCompareTool.prototype.requestUpdateSize = function () {
  this.layoutCtr.onSizeChange();
  this.mapOperatorCtr.updateStyleValues();
  this.mapOperatorCtr.updatePosition();
};
ListCompareTool.prototype.notifyChange = function () {
  this.emit('change', {
    type: 'change',
    target: this
  }, this);
};
var _default = ListCompareTool;
exports["default"] = _default;
_ACore["default"].install(ListCompareTool);

/**
 * @extends CMDToolDelegate
 * @param {ListCompareTool} elt
 * @constructor
 */
function LCTCommandDelegate(elt) {
  _CMDTool.CMDToolDelegate.call(this);
  this.elt = elt;
}
(0, _OOP.mixClass)(LCTCommandDelegate, _CMDTool.CMDToolDelegate);
LCTCommandDelegate.prototype.getCmdGroupTree = function () {
  return ['newLineTool', 'removeLineTool'];
};
LCTCommandDelegate.prototype.getCmdDescriptor = function (name) {
  if (name === 'undefined') console.trace(1);
  var res = Object.assign(this.elt.commands[name].descriptor);
  if (name === 'newLineTool') {
    res.checked = this.elt.newLineTool.state !== this.elt.newLineTool.ST_DISABLED;
  } else if (name === 'removeLineTool') {
    res.checked = this.elt.removeLineTool.state !== this.elt.newLineTool.ST_DISABLED;
  }
  return res;
};
LCTCommandDelegate.prototype.execCmd = function (name) {
  var cmd = this.elt.commands[name];
  if (!cmd) return;
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }
  cmd.exec.call(this.elt, args);
};
function LCTMapOperatorController(elt) {
  this.elt = elt;
  this.$ctn = (0, _ACore.$)('.as-list-compare-tool-operators', this.elt);
  this.$canvas = (0, _ACore.$)('svg', this.$ctn);
  this._mapOperators = [];
  /**
   *
   * @type {LCTMapLine[]}
   */
  this.mapLines = [];
}
LCTMapOperatorController.prototype.updateStyleValues = function () {
  var bound = this.$ctn.getBoundingClientRect();
  this.$canvas.attr('viewBox', '-0.5 -0.5 ' + bound.width + ' ' + bound.height).attr('width', bound.width).attr('height', bound.height);
};
LCTMapOperatorController.prototype.updatePosition = function () {
  this.mapLines.forEach(function (line) {
    line.updatePosition();
  });
};
LCTMapOperatorController.prototype.updateModifiedItems = function () {
  var _this4 = this;
  var mappedValues = this.mapLines.reduce(function (ac, cr) {
    if (cr.beforeValue === cr.afterValue) return ac;
    ac[(0, _utils.keyStringOf)(cr.beforeValue)] = true;
    ac[(0, _utils.keyStringOf)(cr.afterValue)] = true;
    return ac;
  }, {});
  this.elt.beforeCtrl.$items.forEach(function (it) {
    if (mappedValues[(0, _utils.keyStringOf)(it.value)]) {
      it.addClass('as-mapped');
    } else {
      it.removeClass('as-mapped');
    }
    if (_this4.elt.afterCtrl.hasValue(it.value)) {
      it.removeClass('as-removed');
    } else {
      it.addClass('as-removed');
    }
  });
  this.elt.afterCtrl.$items.forEach(function (it) {
    if (mappedValues[(0, _utils.keyStringOf)(it.value)]) {
      it.addClass('as-mapped');
    } else {
      it.removeClass('as-mapped');
    }
    if (_this4.elt.beforeCtrl.hasValue(it.value)) {
      it.removeClass('as-added');
    } else {
      it.addClass('as-added');
    }
  });
};
LCTMapOperatorController.prototype.addNewMapOp = function (beforeValue, afterValue) {
  if (!this.elt.beforeCtrl.hasValue(beforeValue) || !this.elt.afterCtrl.hasValue(afterValue)) return;
  this.mapLines = this.mapLines.filter(function (it) {
    if (it.beforeValue === beforeValue || it.afterValue === afterValue) {
      it.remove();
      return false;
    }
    return true;
  });
  var line = new LCTMapLine(this.elt, beforeValue, afterValue);
  this.mapLines.push(line);
  this._mapOperators = this.mapLines.filter(function (it) {
    return it.beforeValue !== it.afterValue;
  }).map(function (it) {
    return it.exportData();
  }); //save
  this.updateModifiedItems();
  this.updateStyleValues();
  this.updatePosition();
};
LCTMapOperatorController.prototype.removeLine = function (line) {
  if (line.beforeValue === line.afterValue) return; //view only line
  var idx = this.mapLines.indexOf(line);
  if (idx < 0) return;
  this.mapLines.splice(idx, 1);
  line.remove();
  var changedDict = this.mapLines.reduce(function (ac, it) {
    ac[(0, _utils.keyStringOf)(it.beforeValue)] = true;
    ac[(0, _utils.keyStringOf)(it.afterValue)] = true;
    return ac;
  }, {});
  var u = line.beforeValue;
  var v = line.afterValue;
  if (this.elt.beforeCtrl.hasValue(u) && this.elt.afterCtrl.hasValue(u) && !changedDict[(0, _utils.keyStringOf)(u)]) {
    line = new LCTMapLine(this.elt, u, u);
    this.mapLines.push(line);
  }
  if (this.elt.beforeCtrl.hasValue(v) && this.elt.afterCtrl.hasValue(v) && !changedDict[(0, _utils.keyStringOf)(v)]) {
    line = new LCTMapLine(this.elt, v, v);
    this.mapLines.push(line);
  }
  this._mapOperators = this.mapLines.filter(function (it) {
    return it.beforeValue !== it.afterValue;
  }).map(function (it) {
    return it.exportData();
  }); //save
  this.updateModifiedItems();
  this.updateStyleValues();
  this.updatePosition();
};
LCTMapOperatorController.prototype.redrawMapLines = function () {
  var _this5 = this;
  this.mapLines.forEach(function (it) {
    it.remove();
  });
  this.mapLines = [];
  var beforeItems = this.elt.beforeCtrl.items;
  var changedDict = this._mapOperators.reduce(function (ac, it) {
    ac[(0, _utils.keyStringOf)(it.u)] = true;
    ac[(0, _utils.keyStringOf)(it.v)] = true;
    return ac;
  }, {});
  beforeItems.forEach(function (it) {
    if (changedDict[(0, _utils.keyStringOf)(it.value)]) return;
    if (_this5.elt.afterCtrl.hasValue(it.value)) {
      var line = new LCTMapLine(_this5.elt, it.value, it.value);
      _this5.mapLines.push(line);
    }
  });
  var addedOpts = {};
  this._mapOperators.forEach(function (it) {
    var key = (0, _utils.keyStringOf)(it.u) + '|' + (0, _utils.keyStringOf)(it.v);
    if (addedOpts[key]) return;
    addedOpts[key] = true;
    var line = new LCTMapLine(_this5.elt, it.u, it.v);
    _this5.mapLines.push(line);
  });
};
Object.defineProperty(LCTMapOperatorController.prototype, 'mapOperators', {
  set: function set(operators) {
    if (!Array.isArray(operators)) operators = [];
    this._mapOperators = operators;
    this.redrawMapLines();
    this.updateModifiedItems();
  },
  get: function get() {
    return this.mapLines.filter(function (it) {
      return it.beforeValue !== it.afterValue;
    }).map(function (it) {
      return it.exportData();
    });
  }
});

/**
 *
 * @param {ListCompareTool} elt
 * @constructor
 */
function LCTHeaderController(elt) {
  this.elt = elt;
  this.ev_viewChange = this.ev_viewChange.bind(this);
  this.$changedOnly = (0, _ACore.$)('.as-list-compare-tool-changed-only-checkbox', elt);
  this.$changedOnly.on('change', this.ev_viewChange);
}
LCTHeaderController.prototype.ev_viewChange = function () {
  if (this.$changedOnly.checked) this.elt.addClass('as-view-changed-only');else {
    this.elt.removeClass('as-view-changed-only');
  }
  this.elt.requestUpdateSize();
};

/**
 *
 * @param {ListCompareTool} elt
 * @param {AElement} ctnElt
 * @constructor
 */
function LCTListController(elt, ctnElt) {
  this.elt = elt;
  /**
   *
   * @type {AElement}
   */
  this.$ctn = ctnElt;
  this.$ctn.on('scroll', this.ev_scroll.bind(this));
  /**
   *
   * @type {LCTItem[]}
   */
  this.$items = [];
  this._items = [];
  this.$itemByValue = {};
}
LCTListController.prototype.updateStyleValues = function () {
  var minWidth = this.elt.beforeCtrl.$items.reduce(function (ac, it) {
    return Math.max(ac, it.minWidth);
  }, 0);
  minWidth = this.elt.afterCtrl.$items.reduce(function (ac, it) {
    return Math.max(ac, it.minWidth);
  }, minWidth);
  this.elt.addStyle('--item-min-width', minWidth + 'px');
};
LCTListController.prototype.itemEltOfValue = function (value) {
  return this.$itemByValue[(0, _utils.keyStringOf)(value)] || null;
};
LCTListController.prototype.hasValue = function (value) {
  return !!this.$itemByValue[(0, _utils.keyStringOf)(value)];
};
LCTListController.prototype.ev_scroll = function () {
  this.elt.mapOperatorCtr.updatePosition();
};
Object.defineProperty(LCTListController.prototype, 'items', {
  set: function set(items) {
    items = items || [];
    this._items = items;
    this.$ctn.clearChild();
    this.$items = items.map(function (it) {
      return (0, _ACore._)({
        tag: LCTItem,
        props: {
          text: it.text,
          value: it.value,
          icon: it.icon
        }
      });
    });
    this.$ctn.addChild(this.$items);
    this.$itemByValue = this.$items.reduce(function (ac, it) {
      ac[(0, _utils.keyStringOf)(it.value)] = it;
      return ac;
    }, {});
    this.updateStyleValues();
    this.elt.mapOperatorCtr.updateStyleValues();
    this.elt.mapOperatorCtr.updateModifiedItems();
    this.elt.mapOperatorCtr.redrawMapLines();
  },
  get: function get() {
    return this._items;
  }
});

/**
 *
 * @param {ListCompareTool} elt
 * @constructor
 */
function LCTLayoutController(elt) {
  this.elt = elt;
  this._height = 'auto';
  this._maxHeight = 'auto';
}
LCTLayoutController.prototype.setHeight = function (height) {
  this._height = this.normalizeSizeValue(height);
  this.updateHeightStyle();
};
LCTLayoutController.prototype.setMaxHeight = function (maxHeight) {
  this._maxHeight = this.normalizeSizeValue(maxHeight);
  this.updateHeightStyle();
};
LCTLayoutController.prototype.normalizeSizeValue = function (value) {
  var parsed = (0, _attribute.parseMeasureValue)(value);
  if (parsed) {
    value = parsed.value + parsed.unit;
  } else if (typeof value === "string") {
    if (value.indexOf('calc') < 0 && value.indexOf('var') < 0) {
      value = 'auto';
    }
  } else value = 'auto';
  return value;
};
LCTLayoutController.prototype.updateHeightStyle = function () {
  var height = this._height;
  var maxHeight = this._maxHeight;
  if (height === 'auto') {
    this.elt.style.removeProperty('--height');
    this.elt.addClass('as-height-auto');
  } else {
    this.elt.style.setProperty('--height', height);
    this.elt.removeClass('as-height-auto');
  }
  if (maxHeight === 'auto') {
    this.elt.style.removeProperty('--max-height');
    this.elt.addClass('as-max-height-auto');
  } else {
    this.elt.style.setProperty('--max-height', maxHeight);
    this.elt.removeClass('as-max-height-auto');
  }
};
LCTLayoutController.prototype.onSizeChange = function () {
  var style = getComputedStyle(this.elt);
  var maxHeight = style.getPropertyValue('max-height');
  if (maxHeight && maxHeight.indexOf('px') >= 0) {
    maxHeight = parseFloat(maxHeight.replace('px', ''));
    this.elt.addStyle('--list-max-height', maxHeight - 66 - 22 - 20 + 'px');
  } else {
    this.elt.removeStyle('--list-max-height');
  }
};

/**
 * @param {ListCompareTool} elt
 * @param beforeValue
 * @param afterValue
 * @constructor
 */
function LCTMapLine(elt, beforeValue, afterValue) {
  this.beforeValue = beforeValue;
  this.afterValue = afterValue;
  this.elt = elt;
  this.$line = _g({
    tag: 'path',
    "class": 'as-lct-line',
    attr: {
      'marker-end': "url(#arrow)"
    }
  });
  this.$hitBox = _g({
    tag: 'path',
    "class": 'as-lct-line-hit-box'
  });
  this.$group = _g({
    tag: 'g',
    "class": 'as-lct-line-group',
    child: [this.$line, this.$hitBox]
  });
  this.$group.lctMapLine = this;
  this.elt.mapOperatorCtr.$canvas.addChild(this.$group);
  if (this.beforeValue === this.afterValue) {
    this.$group.addClass('as-same-value');
    this.$line.attr('marker-end', "url(#same-value-arrow)");
  }
}
LCTMapLine.prototype.exportData = function () {
  return {
    u: this.beforeValue,
    v: this.afterValue
  };
};
LCTMapLine.prototype.updatePosition = function () {
  var beforeItemElt = this.elt.beforeCtrl.itemEltOfValue(this.beforeValue);
  var afterItemElt = this.elt.afterCtrl.itemEltOfValue(this.afterValue);
  if (!beforeItemElt || !afterItemElt) {
    this.$line.attr('d', null);
    return;
  }
  var beforeBound = beforeItemElt.getBoundingClientRect();
  if (!beforeBound.width) {
    this.$line.attr('d', null);
    this.$hitBox.attr('d', null);
    return;
  }
  var afterBound = afterItemElt.getBoundingClientRect();
  if (!afterBound.width) {
    this.$hitBox.attr('d', null);
    this.$line.attr('d', null);
    return;
  }
  var canvasBound = this.elt.mapOperatorCtr.$canvas.getBoundingClientRect();
  // if (canvasBound.top > beforeBound.bottom || canvasBound.bottom < beforeBound.top) {
  //     if (canvasBound.top > afterBound.bottom || canvasBound.bottom < afterBound.top) {
  //         this.$hitBox.attr('d', null);
  //         this.$line.attr('d', null);
  //         return;
  //     }
  // }
  var x, y;
  var canvasOffsetPoint = new _Vec["default"](canvasBound.left, canvasBound.top);
  x = beforeBound.right - 5;
  y = beforeBound.top + beforeBound.height / 2 - 1; //1 is border
  var startPoint = new _Vec["default"](x, y).sub(canvasOffsetPoint);
  x = afterBound.left + 5;
  y = afterBound.top + afterBound.height / 2 - 1;
  var endPoint = new _Vec["default"](x, y).sub(canvasOffsetPoint);
  var d = 'M' + startPoint.x + ' ' + startPoint.y + ' L' + endPoint.x + ' ' + endPoint.y;
  this.$line.attr('d', d);
  this.$hitBox.attr('d', d);
};
LCTMapLine.prototype.remove = function () {
  this.$group.remove();
};

/**
 *
 * @param {ListCompareTool} elt
 * @constructor
 */
function LCTNewLineTool(elt) {
  this.elt = elt;
  this.state = this.ST_NONE;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.elt.on('click', this.ev_click);
  this.$beforeItem = null;
  this.$afterItem = null;
  this.$line = _g({
    tag: 'path',
    "class": ['as-lct-line', 'as-new-line'],
    attr: {
      'marker-end': "url(#new-line-arrow)"
    }
  });
  this.elt.mapOperatorCtr.$canvas.addChild(this.$line);
}
LCTNewLineTool.prototype.ST_DISABLED = 'DISABLED';
LCTNewLineTool.prototype.ST_NONE = 'NONE';
LCTNewLineTool.prototype.ST_STARTED = 'STATED';
LCTNewLineTool.prototype.disable = function (flag) {
  if (this.state === this.ST_NONE && flag) {
    this.state = this.ST_DISABLED;
  } else if (this.state === this.ST_DISABLED && !flag) {
    this.state = this.ST_NONE;
  }
};
LCTNewLineTool.prototype.findItemElt = function (elt) {
  while (elt) {
    if (elt.hasClass && elt.hasClass('as-lct-item')) {
      return elt;
    }
    elt = elt.parentElement;
  }
  return null;
};
LCTNewLineTool.prototype.isBeforeItemElt = function (elt) {
  return elt && elt.isDescendantOf(this.elt.beforeCtrl.$ctn);
};
LCTNewLineTool.prototype.ev_click = function (event) {
  var _this6 = this;
  var itemElt;
  if (this.state === this.ST_NONE) {
    itemElt = this.findItemElt(event.target);
    if (itemElt && (itemElt.hasClass('as-removed') || itemElt.hasClass('as-added'))) {
      if (this.isBeforeItemElt(itemElt)) {
        this.$beforeItem = itemElt;
      } else {
        this.$afterItem = itemElt;
      }
      itemElt.addClass('as-active');
      this.state = this.ST_STARTED;
      setTimeout(function () {
        document.addEventListener('click', _this6.ev_clickOut);
      }, 1);
      document.addEventListener('mousemove', this.ev_mouseMove);
    }
  } else if (this.state === this.ST_STARTED) {
    itemElt = this.findItemElt(event.target);
    if (itemElt && (itemElt.hasClass('as-removed') || itemElt.hasClass('as-added'))) {
      if (this.isBeforeItemElt(itemElt)) {
        if (this.$beforeItem) {
          this.$beforeItem.removeClass('as-active');
        }
        if (this.$beforeItem === itemElt) {
          this.$beforeItem = null;
        } else {
          this.$beforeItem = itemElt;
          itemElt.addClass('as-active');
        }
      } else {
        if (this.$afterItem) {
          this.$afterItem.removeClass('as-active');
        }
        if (this.$afterItem === itemElt) {
          this.$afterItem = null;
        } else {
          this.$afterItem = itemElt;
          itemElt.addClass('as-active');
        }
      }
      if (this.$beforeItem && this.$afterItem) {
        this.elt.mapOperatorCtr.addNewMapOp(this.$beforeItem.value, this.$afterItem.value);
        this.$beforeItem.removeClass('as-active');
        this.$afterItem.removeClass('as-active');
        this.state = this.ST_NONE;
        this.elt.notifyChange();
      } else if (!this.$beforeItem && !this.$afterItem) {
        this.state = this.ST_NONE;
      } else {
        this.$line.attr('d', null);
      }
    } else {}
    if (this.state === this.ST_NONE) {
      //finish
      this.$beforeItem = null;
      this.$afterItem = null;
      this.$line.attr('d', null);
      document.removeEventListener('click', this.ev_clickOut);
      document.removeEventListener('mousemove', this.ev_mouseMove);
    }
  }
};
LCTNewLineTool.prototype.ev_mouseMove = function (event) {
  if (this.state !== this.ST_STARTED) return;
  var currentPoint = new _Vec["default"](event.clientX, event.clientY);
  var startPoint;
  var endPoint;
  var canvasBound = this.elt.mapOperatorCtr.$canvas.getBoundingClientRect();
  var canvasOffsetPoint = new _Vec["default"](canvasBound.left, canvasBound.top);
  var itemBound;
  if (this.$beforeItem) {
    itemBound = this.$beforeItem.getBoundingClientRect();
    startPoint = new _Vec["default"](itemBound.right - 5, itemBound.top + itemBound.height / 2 - 1).sub(canvasOffsetPoint);
    endPoint = currentPoint.sub(canvasOffsetPoint);
  } else if (this.$afterItem) {
    itemBound = this.$afterItem.getBoundingClientRect();
    startPoint = currentPoint.sub(canvasOffsetPoint);
    endPoint = new _Vec["default"](itemBound.left + 5, itemBound.top + itemBound.height / 2 - 1).sub(canvasOffsetPoint);
  }
  this.$line.attr('d', 'M' + startPoint.x + ' ' + startPoint.y + ' L' + endPoint.x + ' ' + endPoint.y);
};
LCTNewLineTool.prototype.ev_clickOut = function (event) {
  var itemElt = this.findItemElt(event.target);
  if (itemElt && (itemElt.hasClass('as-removed') || itemElt.hasClass('as-added'))) return;
  if (this.$beforeItem) {
    this.$beforeItem.removeClass('as-active');
  }
  if (this.$afterItem) {
    this.$afterItem.removeClass('as-active');
  }
  this.$beforeItem = null;
  this.$afterItem = null;
  this.$line.attr('d', null);
  this.state = this.ST_NONE;
  document.removeEventListener('click', this.ev_clickOut);
  document.removeEventListener('mousemove', this.ev_mouseMove);
};
LCTNewLineTool.prototype.ev_keydown = function (event) {};
function LCTRemoveLineTool(elt) {
  this.elt = elt;
  this.state = this.ST_DISABLED;
  this.$cursor = null;
  this.ev_mouseMove = this.ev_mouseMove.bind(this);
  this.ev_click = this.ev_click.bind(this);
  this.elt.mapOperatorCtr.$canvas.on('click', this.ev_click);
}
LCTRemoveLineTool.prototype.ST_DISABLED = 'DISABLED';
LCTRemoveLineTool.prototype.ST_NONE = 'NONE';
LCTRemoveLineTool.prototype.disable = function (flag) {
  if (this.state === this.ST_NONE && flag) {
    this.state = this.ST_DISABLED;
    this.elt.removeClass('as-remove-line-tool-active');
    this.$cursor.remove();
  } else if (this.state === this.ST_DISABLED && !flag) {
    this.state = this.ST_NONE;
    this.elt.addClass('as-remove-line-tool-active');
    this.$cursor = (0, _ACore._)({
      "class": 'as-lct-cursor',
      child: 'span.mdi.mdi-eraser'
    }).addTo(this.elt.$body);
    document.addEventListener('mousemove', this.ev_mouseMove);
  }
};
LCTRemoveLineTool.prototype.findMapLine = function (elt) {
  while (elt) {
    if (elt.lctMapLine) {
      return elt.lctMapLine;
    }
    elt = elt.parentElement;
  }
  return null;
};
LCTRemoveLineTool.prototype.ev_click = function (event) {
  if (this.state === this.ST_DISABLED) return;
  var line = this.findMapLine(event.target);
  if (line) {
    this.elt.mapOperatorCtr.removeLine(line);
    this.elt.notifyChange();
  }
};
LCTRemoveLineTool.prototype.ev_mouseMove = function (event) {
  var point = new _Vec["default"](event.clientX, event.clientY);
  var bodyBound = this.elt.$body.getBoundingClientRect();
  if (bodyBound.width === 0) {
    document.removeEventListener('mousemove', this.ev_mouseMove); //element is removed
  }

  point = point.sub(new _Vec["default"](bodyBound.left, bodyBound.top));
  this.$cursor.addStyle({
    left: point.x - 9 + 'px',
    top: point.y - 24 + 'px'
  });
};
LCTRemoveLineTool.prototype.ev_mouseDown = function (event) {};
LCTRemoveLineTool.prototype.ev_mouseUp = function (event) {};

/**
 * @extends {AElement}
 * @constructor
 */
function LCTItem() {
  this.$text = (0, _ACore.$)('.as-lct-item-text', this);
  this.$iconCtn = (0, _ACore.$)('.as-lct-item-icon-ctn', this);
  this._icon = null;

  /**
   * @name icon
   * @memberOf LCTItem#
   */
  /**
   * @type string
   * @name text
   * @memberOf LCTItem#
   */

  /**
   * @type any
   * @name value
   * @memberOf LCTItem#
   */

  /**
   * @type number
   * @name minWidth
   * @memberOf LCTItem#
   */
}

LCTItem.tag = 'LCTItem'.toLowerCase();
LCTItem.render = function () {
  return (0, _ACore._)({
    "class": 'as-lct-item',
    child: [{
      "class": 'as-lct-item-icon-ctn'
    }, {
      "class": 'as-lct-item-text'
    }]
  });
};
LCTItem.property = {};
LCTItem.property.text = {
  set: function set(value) {
    value = value || '';
    value = value + '';
    this.$text.attr('data-text', value);
  },
  get: function get() {
    return this.$text.attr('data-text');
  }
};
LCTItem.property.value = {
  set: function set(value) {
    this._value = value;
    this.attr('data-value', value + '');
  },
  get: function get() {
    return this._value;
  }
};
LCTItem.property.icon = {
  set: function set(value) {
    value = value || '';
    this._icon = value;
    this.$iconCtn.clearChild();
    this.$icon = null;
    if (value) {
      if ((0, _Dom.isDomNode)(value)) {
        if (value.parentElement) value = value.cloneNode(true);
      } else value = (0, _ACore._)(value);
      this.$icon = (0, _ACore.$)(value).addClass('as-lct-icon');
      this.$iconCtn.addChild(this.$icon);
    }
  },
  get: function get() {
    return this._icon;
  }
};
LCTItem.property.minWidth = {
  get: function get() {
    var res = 25 + 10;
    res += _TextMeasure["default"].measureWidth(this.text, _TextMeasure["default"].FONT_ARIAL, 14) + 20;
    return Math.ceil(res);
  }
};

/***/ }),

/***/ 95521:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _stringGenerate = __webpack_require__(10713);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends Modal
 * @constructor
 */
function LoadingCubeModal() {}
LoadingCubeModal.tag = 'LoadingCubeModal'.toLowerCase();
LoadingCubeModal.render = function () {
  return (0, _ACore._)({
    tag: 'modal',
    "class": 'as-loading-cube-modal',
    child: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(241, 242, 243); display: block; shape-rendering: auto;" width="200px" height="200px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">\n' + '<g transform="translate(26.666666666666668,26.666666666666668)">\n' + '  <rect x="-20" y="-20" width="40" height="40" fill="#13a9df">\n' + '    <animateTransform attributeName="transform" type="scale" repeatCount="indefinite" dur="1s" keyTimes="0;1" values="1.1500000000000001;1" begin="-0.3s"></animateTransform>\n' + '  </rect>\n' + '</g>\n' + '<g transform="translate(73.33333333333333,26.666666666666668)">\n' + '  <rect x="-20" y="-20" width="40" height="40" fill="#4be44c">\n' + '    <animateTransform attributeName="transform" type="scale" repeatCount="indefinite" dur="1s" keyTimes="0;1" values="1.1500000000000001;1" begin="-0.2s"></animateTransform>\n' + '  </rect>\n' + '</g>\n' + '<g transform="translate(26.666666666666668,73.33333333333333)">\n' + '  <rect x="-20" y="-20" width="40" height="40" fill="#e2d58b">\n' + '    <animateTransform attributeName="transform" type="scale" repeatCount="indefinite" dur="1s" keyTimes="0;1" values="1.1500000000000001;1" begin="0s"></animateTransform>\n' + '  </rect>\n' + '</g>\n' + '<g transform="translate(73.33333333333333,73.33333333333333)">\n' + '  <rect x="-20" y="-20" width="40" height="40" fill="#e1e7e7">\n' + '    <animateTransform attributeName="transform" type="scale" repeatCount="indefinite" dur="1s" keyTimes="0;1" values="1.1500000000000001;1" begin="-0.1s"></animateTransform>\n' + '  </rect>\n' + '</g>\n' + '</svg>'
  });
};
LoadingCubeModal.share = {
  token: null,
  $elt: null
};

/***
 *
 * @return {String}
 */
LoadingCubeModal.show = function () {
  if (!LoadingCubeModal.share.$elt) LoadingCubeModal.share.$elt = (0, _ACore._)(LoadingCubeModal.tag);
  if (!LoadingCubeModal.share.$elt.isDescendantOf(document.body)) {
    document.body.appendChild(LoadingCubeModal.share.$elt);
  }
  LoadingCubeModal.share.token = (0, _stringGenerate.randomIdent)(9);
  return LoadingCubeModal.share.token;
};

/***
 *
 * @param {String} token
 * @return {Boolean}
 */
LoadingCubeModal.close = function (token) {
  if (LoadingCubeModal.share.$elt && LoadingCubeModal.share.$elt.isDescendantOf(document.body) && (!token || token === LoadingCubeModal.share.token)) {
    this.share.$elt.remove();
    LoadingCubeModal.share.token = null;
    return true;
  }
  return false;
};
_ACore["default"].install(LoadingCubeModal);
var _default = LoadingCubeModal;
exports["default"] = _default;

/***/ }),

/***/ 17096:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _LocationPicker = _interopRequireDefault(__webpack_require__(76693));
__webpack_require__(15472);
var _utils = __webpack_require__(84512);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function LocationInput() {
  this.$text = (0, _ACore.$)('input', this).on('change', this.eventHandler.textChange);
  this.$iconCtn = (0, _ACore.$)('.as-location-input-icon-ctn', this).on('click', this.eventHandler.clickIcon);

  /***
   * @type {{latitude: number, longitude: number}}
   * @name latLng
   * @memberOf LocationInput#
   */

  /***
   * @type {string}
   * @name value
   * @memberOf LocationInput#
   */
  /***
   * @type {boolean}
   * @name readOnly
   * @memberOf LocationInput#
   */
}

LocationInput.tag = 'LocationInput'.toLowerCase();
LocationInput.render = function () {
  return (0, _ACore._)({
    "class": 'as-location-input',
    extendEvent: ['change'],
    child: [{
      tag: 'input',
      attr: {
        type: 'text'
      },
      "class": 'as-location-input-text'
    }, {
      "class": 'as-location-input-icon-ctn',
      child: 'span.mdi.mdi-google-maps'
    }]
  });
};
LocationInput.prototype.share = {
  $modal: null,
  $picker: null,
  $holder: null
};
LocationInput.prototype._preparePicker = function () {
  if (this.share.$picker) return;
  this.share.$picker = (0, _ACore._)({
    tag: _LocationPicker["default"].tag
  });
  this.share.$modal = (0, _ACore._)({
    tag: 'modal',
    "class": 'as-location-input-modal',
    child: {
      "class": 'as-location-input-modal-window',
      child: this.share.$picker
    }
  });
  if (_BrowserDetector["default"].isMobile) {
    this.share.$modal.addClass('as-mobile');
  }
};

/***
 * @this LocationInput
 * @private
 */
LocationInput.prototype._attachPicker = function () {
  if (this.share.$holder) {
    this.share.$holder._releasePicker();
  }
  this._preparePicker();
  this.share.$holder = this;
  this.$iconCtn.off('click', this.eventHandler.clickIcon);
  document.body.appendChild(this.share.$modal);
  this.share.$picker.on('action', this.eventHandler.pickerAction);
  this.share.$picker.$searchInput.value = '';
  this.share.$picker.readOnly = this.readOnly;
  setTimeout(function () {
    document.addEventListener('click', this.eventHandler.clickOut);
  }.bind(this), 100);
  var value = this.latLng;
  if (value) {
    value = new google.maps.LatLng(value.latitude, value.longitude);
  }
  if (value) this.share.$picker.selectLocation(value, true);else this.share.$picker.selectPlace(null);
};
LocationInput.prototype._releasePicker = function () {
  if (this.share.$holder !== this) return;
  this.share.$picker.off('action', this.eventHandler.pickerAction);
  this.$iconCtn.on('click', this.eventHandler.clickIcon);
  document.removeEventListener('click', this.eventHandler.clickOut);
  this.share.$modal.remove();
  this.share.$holder = null;
};

/**
 *
 * @type {{}}
 * @memberOf LocationInput#
 */
LocationInput.eventHandler = {};
LocationInput.eventHandler.pickerAction = function (event) {
  if (!this.readOnly && event.action === 'OK' && this.share.$picker.selectedPlace && this.share.$picker.selectedPlace.geometry && this.share.$picker.selectedPlace.geometry.location) {
    this.$text.value = [this.share.$picker.selectedPlace.geometry.location.lat(), this.share.$picker.selectedPlace.geometry.location.lng()].join(', ');
    this.emit('change', {
      type: 'change',
      originalEvent: event.originalEvent || event,
      target: this
    }, this);
  }
  this._releasePicker();
};

/***
 * @this LocationInput
 */
LocationInput.eventHandler.clickIcon = function () {
  this._attachPicker();
};

/***
 * @this LocationInput
 * @param event
 */
LocationInput.eventHandler.clickOut = function (event) {
  if (event.target === this.share.$modal) this._releasePicker();
};
LocationInput.eventHandler.textChange = function (event) {
  this.emit('change', {
    type: 'change',
    originalEvent: event.originalEvent || event,
    target: this
  }, this);
};
LocationInput.property = {};
LocationInput.property.value = {
  set: function set(value) {
    value = value || null;
    var lat, lng;
    if (typeof value === "string") {
      this.$text.value = value;
      return;
    }
    if (value instanceof Array) {
      lat = value[0];
      lng = value[1];
    } else if (value && _typeof(value) === 'object') {
      if ('latitude' in value && 'longitude' in value) {
        lat = value.latitude;
        lng = value.longitude;
      } else if (value instanceof google.maps.LatLng) {
        lat = value.lat();
        lng = value.lng();
      }
    }
    if ((0, _utils.isRealNumber)(lat) && (0, _utils.isRealNumber)(lng)) {
      this.$text.value = [lat, lng].join(', ');
    } else {
      this.$text.value = '';
    }
  },
  get: function get() {
    var text = this.$text.value;
    return (0, _utils.normalizeLatLngString)(text);
  }
};
LocationInput.property.latLng = {
  get: function get() {
    var text = this.$text.value;
    return (0, _utils.parseDMS)(text) || (0, _utils.parseLatLng)(text);
  }
};
LocationInput.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
    this.$text.readOnly = !!value;
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
LocationInput.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
    this.$text.disabled = !!value;
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
_ACore["default"].install(LocationInput);
var _default = LocationInput;
exports["default"] = _default;

/***/ }),

/***/ 76693:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.createMyLocationMarkerContent = createMyLocationMarkerContent;
exports["default"] = void 0;
exports.getGoogleMapLib = getGoogleMapLib;
exports.getGoogleMarkerLib = getGoogleMarkerLib;
exports.getGooglePlacesLib = getGooglePlacesLib;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _utils = __webpack_require__(84512);
__webpack_require__(15472);
var _AutoCompleteInput = _interopRequireDefault(__webpack_require__(54845));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _stringGenerate = __webpack_require__(10713);
var _XLoader = __webpack_require__(47913);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
///https://developers.google.com/maps/documentation/javascript/examples/geocoding-place-id

var googleMapLibs = null;
function getGoogleMapLib() {
  var jsElt;
  if (!googleMapLibs) {
    if (window.google && window.google.maps) {
      return Promise.resolve(window.google.maps);
    } else {
      jsElt = Array.prototype.find.call(document.head.childNodes, function (elt) {
        if (typeof elt.src === "string" && elt.src.startsWith('https://maps.googleapis.com/maps/api/js')) return jsElt;
      });
      if (jsElt) {
        return new Promise(function (resolve, reject) {
          if (jsElt.readyState) {
            //IE
            jsElt.onreadystatechange = function () {
              if (jsElt.readyState === "loaded" || jsElt.readyState === "complete") {
                jsElt.onreadystatechange = null;
                resolve();
              }
            };
          } else {
            //Others
            var onLoad = function onLoad() {
              resolve();
              jsElt.removeEventListener('load', onLoad);
            };
            jsElt.addEventListener('load', onLoad);
          }
        });
      } else {
        throw new Error("Could not detect Google Map API!");
      }
    }
  }
  return googleMapLibs;
}
var googleMarkerLibSync = null;
function getGoogleMarkerLib() {
  if (!googleMarkerLibSync) googleMarkerLibSync = getGoogleMapLib().then(function () {
    return google.maps.importLibrary("marker");
  }).then(function (mdl) {
    google.maps.marker = mdl;
    return mdl;
  });
  return googleMarkerLibSync;
}
var googlePlacesLibSync;
function getGooglePlacesLib() {
  if (!googlePlacesLibSync) googlePlacesLibSync = getGoogleMapLib().then(function () {
    if (google.maps.places) {} else {
      return google.maps.importLibrary("places").then(function (mdl) {
        google.maps.places = mdl;
        return mdl;
      });
    }
  });
  return googleMarkerLibSync;
}
function createMyLocationMarkerContent() {
  var svgTxt = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n    <circle r=\"10\" cx=\"12\" cy=\"12\"  style=\"stroke: white; stroke-width: 2px; fill: #1da1ff\"></circle>\n</svg>";
  return (0, _ACore._)(svgTxt);
}

/***
 * @extends AElement
 * @constructor
 */
function LocationPicker() {
  getGoogleMarkerLib();
  if (_BrowserDetector["default"].isMobile) {
    this.addClass('as-mobile');
  }
  this.map = new google.maps.Map(this, {
    mapId: (0, _stringGenerate.randomIdent)(),
    //'DEMO_MAP_ID',
    zoom: 8,
    scaleControl: true,
    center: new google.maps.LatLng(21.018755, 105.839729),
    streetViewControl: false,
    fullscreenControl: false,
    mapTypeControl: true,
    mapTypeControlOptions: {
      style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
      position: google.maps.ControlPosition.TOP_RIGHT
    }
  });
  this.map.setOptions({
    draggableCursor: 'default'
  });
  this.map.addListener('click', this.eventHandler.clickMap);
  this.geocoder = new google.maps.Geocoder();
  this.infoWindow = new google.maps.InfoWindow();
  this.$myLocationBtn = (0, _ACore._)({
    tag: 'button',
    "class": 'as-location-picker-control-btn',
    child: 'span.mdi.mdi-crosshairs-gps',
    on: {
      click: this.selectMyLocation.bind(this)
    }
  });
  this.$rightBottomCtn = (0, _ACore._)({
    "class": 'as-location-picker-control-ctn',
    child: [this.$myLocationBtn],
    style: {
      overflow: 'hidden'
    }
  });
  this.$searchInput = (0, _ACore._)({
    tag: _AutoCompleteInput["default"].tag,
    "class": 'as-location-picker-search-input',
    props: {
      adapter: this
    },
    child: {
      "class": 'as-location-picker-search-input-search-icon-ctn',
      child: 'span.mdi.mdi-magnify',
      on: {
        click: this.eventHandler.search
      }
    },
    on: {
      change: this.eventHandler.searchChange
    }
  });
  this.$searchInput.$input.on('keydown', this.eventHandler.searchKeypress);
  this.$topLeftCtn = (0, _ACore._)({
    "class": ['as-location-picker-control-ctn', 'as-top'],
    child: [this.$searchInput]
  });
  this.$okBtn = (0, _ACore._)({
    tag: _FlexiconButton["default"].tag,
    "class": 'primary',
    props: {
      text: 'OK',
      disabled: true
    },
    on: {
      click: this.eventHandler.clickAction.bind(this, 'OK')
    }
  });
  this.$cancelBtn = (0, _ACore._)({
    tag: _FlexiconButton["default"].tag,
    "class": ['as-location-picker-cancel-btn', 'secondary'],
    props: {
      text: 'CANCEL'
    },
    on: {
      click: this.eventHandler.clickAction.bind(this, 'CANCEL')
    }
  });
  this.$bottomLeftCtn = (0, _ACore._)({
    "class": ['as-location-picker-control-ctn', 'as-transparent', 'as-bottom'],
    style: {
      paddingBottom: '5px'
    },
    child: [this.$okBtn, this.$cancelBtn]
  });
  this.map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(this.$rightBottomCtn);
  this.map.controls[google.maps.ControlPosition.TOP_LEFT].push(this.$topLeftCtn);
  this.map.controls[google.maps.ControlPosition.BOTTOM_LEFT].push(this.$bottomLeftCtn);
  this.autoCompleteService = new google.maps.places.AutocompleteService(this.map, {
    fields: ["place_id", "geometry", "name", "formatted_address"]
  });
  this.placeService = new google.maps.places.PlacesService(this.map);
  this.selectedMarker = null;
  this.searchingMarkers = [];
  this.myLocationMarker = null;

  /***
   * @type {LatLng}
   * @name value
   * @memberOf LocationPicker#
   */
  /***
   * @type {boolean}
   * @name readOnly
   * @memberOf LocationPicker#
   */
}

LocationPicker.tag = 'LocationPicker'.toLowerCase();
LocationPicker.render = function () {
  return (0, _ACore._)({
    "class": 'as-location-picker',
    extendEvent: ['action', 'location', 'requestlocation', 'error']
  });
};
LocationPicker.prototype.queryItems = function (query) {
  var _this = this;
  var latLng = (0, _utils.parseDMS)(query) || (0, _utils.parseLatLng)(query);
  if (latLng) {
    return new Promise(function (resolve) {
      _this.geocoder.geocode({
        location: (0, _utils.implicitLatLng)(latLng)
      }, function (results, status) {
        if (status === google.maps.GeocoderStatus.OK) {
          results.forEach(function (it) {
            it.description = it.formatted_address;
          });
          resolve(results); // Returns an array of place predictions
        }

        return resolve([]);
      });
    });
  }
  var request = {
    input: query,
    locationBias: this.map.getBounds()
  };
  return new Promise(function (resolve) {
    _this.autoCompleteService.getPlacePredictions(request, function (results, status) {
      if (status === google.maps.places.PlacesServiceStatus.OK) {
        resolve(results);
      } else resolve([]);
    });
  });
};
LocationPicker.prototype.getItemText = function (item, mInput) {
  return item.description;
};
LocationPicker.prototype.getItemView = function (item, index, _, $, query, reuseItem, refParent, mInput) {
  return _({
    "class": 'as-place-search-auto-complete-item',
    child: [{
      "class": 'as-place-search-auto-complete-item-desc',
      child: {
        text: item.description
      }
    }]
  });
};
LocationPicker.prototype.getBoundsZoomLevel = function (bounds) {
  var mapDim = this.getBoundingClientRect();
  return (0, _utils.getMapZoomLevel)(mapDim, bounds);
};
LocationPicker.prototype.clearSearchingMarkers = function () {
  while (this.searchingMarkers.length > 0) {
    this.searchingMarkers.pop().setMap(null);
  }
};

/**
 *
 * @param place
 * @param {boolean=} panTo
 */
LocationPicker.prototype.selectPlace = function (place, panTo) {
  var _this2 = this;
  if (arguments.length === 1) panTo = true;
  return getGoogleMarkerLib().then(function () {
    _this2.selectedPlace = place || null;
    if (_this2.selectedMarker) {
      _this2.selectedMarker.setMap(null);
    }
    _this2.$okBtn.disabled = !_this2.selectedPlace;
    if (!place) return;
    var latLng = place.geometry && place.geometry.location;
    if (!latLng) return;
    var zoom = panTo && (place.geometry.bounds || place.geometry.viewport) ? _this2.getBoundsZoomLevel(place.geometry.bounds || place.geometry.viewport) : 18;
    if (panTo) {
      _this2.map.setZoom(zoom);
      setTimeout(function () {
        _this2.map.panTo(latLng);
      }, 100);
    }
    _this2.selectedMarker = new google.maps.marker.AdvancedMarkerElement({
      map: _this2.map,
      position: latLng
    });
    _this2.infoWindow.setContent((place.name ? place.name + ' - ' : '') + place.formatted_address);
    _this2.infoWindow.open(_this2.map, _this2.selectedMarker);
  });
};
LocationPicker.prototype.showSearchPlaces = function (places) {
  this.clearSearchingMarkers();
  if (!places || places.length === 0) return;
  if (places.length === 1) {
    this.selectPlace(places[0]);
    return;
  }
  var bounds = places.reduce(function (ac, place) {
    if (place.geometry && place.geometry.location) ac.extend(place.geometry.location);
    return ac;
  }, new google.maps.LatLngBounds());
  var zoom = places.length === 1 ? places[0].geometry.bounds || places[0].geometry.viewport ? this.getBoundsZoomLevel(places[0].geometry.bounds || places[0].geometry.viewport) : 18 : this.getBoundsZoomLevel(bounds);
  var center = places.length === 1 ? places[0].geometry.location : bounds.getCenter();
  this.map.setCenter(center);
  this.map.setZoom(zoom);
  places.reduce(function (ac, place, i) {
    var marker;
    if (place.geometry && place.geometry.location) {
      marker = new google.maps.marker.AdvancedMarkerElement({
        map: this.map,
        position: place.geometry.location
        // icon: 'https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_black.png'
      });

      ac.push(marker);
      marker.addListener('click', this.eventHandler.clickMarker.bind(null, marker, place));
    }
    return ac;
  }.bind(this), this.searchingMarkers);
};

/***
 *
 * @param {string} placeId
 * @param {boolean=} panTo
 */
LocationPicker.prototype.selectPlaceId = function (placeId, panTo) {
  var _this3 = this;
  if (arguments.length === 1) panTo = true;
  return new Promise(function (resolve) {
    _this3.placeService.getDetails({
      placeId: placeId,
      fields: ["name", "formatted_address", "place_id", "geometry"]
    }, function (place, status) {
      if (status === google.maps.places.PlacesServiceStatus.OK && place && place.geometry && place.geometry.location) {
        _this3.selectPlace(place, panTo).then(function () {
          resolve(true);
        });
      } else {
        resolve(false);
      }
    });
  });
};

/***
 *
 * @param latLng
 * @param {boolean=} panTo
 */
LocationPicker.prototype.selectLocation = function (latLng, panTo) {
  var _this4 = this;
  if (arguments.length === 1) panTo = true;
  if (arguments.length === 1) panTo = true;
  return getGoogleMarkerLib().then(function () {
    if (_this4.selectedMarker) {
      _this4.selectedMarker.setMap(null);
    }
    _this4.$okBtn.disabled = !latLng;
    _this4.selectedPlace = null;
    if (!latLng) return;
    _this4.selectedPlace = {
      geometry: {
        location: latLng
      }
    };
    var zoom = 18;
    if (panTo) {
      _this4.map.setZoom(zoom);
      setTimeout(function () {
        _this4.map.panTo(latLng);
      }, 100);
    }
    _this4.selectedMarker = new google.maps.marker.AdvancedMarkerElement({
      map: _this4.map,
      position: latLng
    });
  });

  // this.infoWindow.open(this.map, this.selectedMarker);

  /*
  return this.geocoder
      .geocode({ location: latLng })
      .then(function (response) {
          if (response.results[0]) {
              return this.selectPlaceId(response.results[0].place_id, panTo);
          }
          else {
              return false;
          }
      }.bind(this))
      .catch(function (e) {
          safeThrow(e);
          return false;
      });
     */
};

LocationPicker.prototype.watchMyLocation = function (location, position) {
  var _this5 = this;
  return getGoogleMarkerLib().then(function () {
    if (_this5.myLocationMarker) return;
    _this5.accuracyCircle = new google.maps.Circle({
      strokeColor: "#1988c3",
      strokeOpacity: 0.4,
      strokeWeight: 2,
      fillColor: "#1988c3",
      fillOpacity: 0.2,
      radius: 100,
      map: _this5.map,
      clickable: false
    });
    _this5.accuracyCircle.setEditable(false);
    _this5.myLocationMarker = new google.maps.marker.AdvancedMarkerElement({
      position: location,
      title: "My Location",
      // sName: "My Location",
      map: _this5.map,
      content: createMyLocationMarkerContent()
    });
    if (position && position.coords) {
      _this5.accuracyCircle.setRadius(position.coords.accuracy);
      // Snackbar.show('Accuracy: ' + position.coords.accuracy.toFixed(1) + '(m)');
    }

    var id;
    if (navigator.geolocation.watchPosition && navigator.geolocation.watchPosition) {
      id = navigator.geolocation.watchPosition(function (props) {
        if (!this.isDescendantOf(document.body)) {
          navigator.geolocation.clearWatch(id);
        }
        this.emit('location_now', {
          location: props.coords
        });
        this.myLocationMarker.position = new google.maps.LatLng(props.coords.latitude, props.coords.longitude);
        this.accuracyCircle.setCenter(new google.maps.LatLng(props.coords.latitude, props.coords.longitude));
        this.accuracyCircle.setRadius(props.coords.accuracy);
        // Snackbar.show('Sai số tọa độ: ' + props.coords.accuracy.toFixed(1) + ' mét');
      }.bind(_this5), function () {}, {
        enableHighAccuracy: false,
        timeout: 5000,
        maximumAge: 0
      });
    }
  });
};
LocationPicker.prototype.selectMyLocation = function () {
  var _this6 = this;
  var id = (0, _stringGenerate.randomIdent)();
  this.emit('requestlocation', {
    id: id
  });
  if (navigator.geolocation) {
    var to = setTimeout(function () {
      _this6.emit('error', Object.assign(new Error("GPS không phản hồi!"), {
        id: id
      }));
    }, 10000);
    navigator.geolocation.getCurrentPosition(function (position) {
      clearTimeout(to);
      var location = null;
      if (position && position.coords) {
        _this6.emit('location', {
          location: position.coords,
          id: id
        });
        location = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
      }
      if (location) {
        _this6.watchMyLocation(location, position);
        if (!_this6.readOnly) _this6.selectLocation(location);else {
          _this6.map.setCenter(location);
        }
      }
    }, function (err) {
      clearTimeout(to);
      if (err && err.message.indexOf('denied') >= 0) err = Object.assign(new Error("Yêu cầu lấy tọa độ bị từ chối!"), {
        id: id
      });
      _this6.emit('error', err);
    }, {
      maximumAge: Infinity
    });
  }
};
LocationPicker.property = {};
LocationPicker.property.zoom = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) {
      value = 1;
    }
    this.map.setZoom(value);
  },
  get: function get() {
    return this.map.getZoom();
  }
};
LocationPicker.property.center = {
  set: function set(value) {
    value = value || null;
    var latlng = null;
    if (value instanceof google.maps.LatLng) {
      latlng = value;
    } else if (value && (0, _utils.isRealNumber)(value.latitude) && (0, _utils.isRealNumber)(value.longitude)) {
      latlng = new google.maps.LatLng(value.latitude, value.longitude);
    } else if (value instanceof Array && (0, _utils.isRealNumber)(value[0]) && (0, _utils.isRealNumber)(value[1])) {
      latlng = new google.maps.LatLng(value[0], value[1]);
    }
    latlng = latlng || new google.maps.LatLng(21.018755, 105.839729);
    this.map.setCenter(latlng || new google.maps.LatLng(21.018755, 105.839729));
  },
  get: function get() {
    return this.map.getCenter();
  }
};
LocationPicker.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};

/***
 *
 * @type {{}}
 * @memberOf LocationPicker#
 */
LocationPicker.eventHandler = {};

/***
 * @this LocationPicker
 */
LocationPicker.eventHandler.searchKeypress = function (event) {
  if (event.key === 'Enter') setTimeout(function () {
    if (!this.$searchInput.selectedItem) {
      this.eventHandler.search();
    }
  }.bind(this), 100);
};
LocationPicker.eventHandler.searchChange = function () {
  var item = this.$searchInput.selectedItem;
  if (!item) return;
  this.placeService.getDetails({
    placeId: item.place_id,
    fields: ["name", "formatted_address", "place_id", "geometry"]
  }, function (place, status) {
    if (status === google.maps.places.PlacesServiceStatus.OK && place && place.geometry && place.geometry.location) {
      this.selectPlace(place);
    }
  }.bind(this));
};

/***
 * @this LocationPicker
 */
LocationPicker.eventHandler.search = function () {
  var request = {
    bounds: this.map.getBounds(),
    query: this.$searchInput.value
  };
  if (!request.query) return;
  this.placeService.textSearch(request, function callback(results, status) {
    if (status === google.maps.places.PlacesServiceStatus.OK) {
      this.showSearchPlaces(results);
    }
  }.bind(this));
};
LocationPicker.eventHandler.clickMarker = function (marker, place) {
  if (this.readOnly) return;
  this.selectPlace(place, false);
};
LocationPicker.eventHandler.clickMap = function (event) {
  if (this.readOnly) return;
  if (event.placeId) {
    this.selectPlaceId(event.placeId);
  } else if (event.latLng) {
    this.selectLocation(event.latLng, false);
  }
};
LocationPicker.eventHandler.clickAction = function (action, event) {
  this.emit('action', {
    type: 'action',
    action: action,
    originalEvent: event,
    target: this
  }, this);
};
_ACore["default"].install(LocationPicker);
var _default = LocationPicker;
exports["default"] = _default;

/***/ }),

/***/ 80289:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _utils = __webpack_require__(84512);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _stringGenerate = __webpack_require__(10713);
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _LocationPicker = __webpack_require__(76693);
var _Svg = _interopRequireDefault(__webpack_require__(98315));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var MARKER_RADIUS = 10;
var MARKER_BORDER_COLOR = '#4945C8';
function generateColor(id) {
  id = id + '';
  var rgb = [0, 0, 0];
  var res;
  var white = _Color["default"].parse('white');
  var c = 100;
  while (c--) {
    for (var i = 0; i < id.length; ++i) {
      rgb[i % 3] = (rgb[i % 3] * 31 + id.charCodeAt(i) * 173) % 255;
    }
    res = new _Color["default"]([rgb[0] / 255, rgb[1] / 255, rgb[2] / 255, 1]);
    if (res.getContrastWith(white) > 2 && rgb[0] + rgb[1] + rgb[2] > 50) {
      break;
    }
  }
  return res;
}
function distanceInPixels(zoom, latLng1, latLng2) {
  // Calculate the geographical distance in meters
  var R = 6371000; // Earth's radius in meters
  var lat1 = latLng1.lat() * Math.PI / 180;
  var lat2 = latLng2.lat() * Math.PI / 180;
  var deltaLat = (latLng2.lat() - latLng1.lat()) * Math.PI / 180;
  var deltaLng = (latLng2.lng() - latLng1.lng()) * Math.PI / 180;
  var a = Math.sin(deltaLat / 2) * Math.sin(deltaLat / 2) + Math.cos(lat1) * Math.cos(lat2) * Math.sin(deltaLng / 2) * Math.sin(deltaLng / 2);
  var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
  var distanceInMeters = R * c;

  // Calculate the resolution (meters per pixel)
  var scale = 156543.03392 * Math.cos(lat1) / Math.pow(2, zoom);

  // Convert meters to pixels
  return distanceInMeters / scale;
}

// https://lab.daithangminh.vn/home_co/carddone/markerclusterer.js

var loadMarkerClustererSync = null;
var lastOpenInfo = null;

/***
 *
 * @param {LocationView} viewerElt
 * @param {Object} data
 * @constructor
 */
function LVPolyline(viewerElt, data) {
  this.viewerElt = viewerElt;
  this.map = viewerElt.map;
  this._polylines = [];
  this.id = data.id || (0, _stringGenerate.randomIdent)(12);
  this.polylineData = {
    geodesic: true,
    strokeColor: data.color || generateColor(this.id).toString('hex6'),
    strokeOpacity: 1.0,
    strokeWeight: 2
  };
  this.polylineData.path = data.path.map(function (crd) {
    return (0, _utils.implicitLatLng)(crd);
  });
  this.polylineHL = new google.maps.Polyline(Object.assign({}, this.polylineData, {
    strokeColor: 'white',
    strokeWeight: 5
  }));
  this.polyline = new google.maps.Polyline(this.polylineData);
  this.template = (0, _ACore._)({
    style: {
      position: 'relative'
    },
    child: {
      tag: 'div',
      style: {
        width: "".concat(MARKER_RADIUS * 2, "px"),
        height: "".concat(MARKER_RADIUS * 2, "px"),
        position: 'absolute',
        top: "".concat(-MARKER_RADIUS, "px"),
        left: "".concat(-MARKER_RADIUS, "px"),
        borderRadius: '50%',
        backgroundColor: this.polylineData.strokeColor,
        border: "2px solid ".concat(MARKER_BORDER_COLOR),
        boxSizing: 'border-box'
      }
    }
  });
  this.markers = this.polylineData.path.map(function (crd, i) {
    var anchor = this.template.cloneNode(true);
    var mkr = new google.maps.marker.AdvancedMarkerElement({
      position: crd,
      map: this.map,
      content: anchor
    });
    var infoWindow;
    if (data.path[i] && data.path[i].info) {
      infoWindow = new google.maps.InfoWindow(data.path[i].info);
      anchor.addEventListener('mouseover', function () {
        if (lastOpenInfo === infoWindow) return;
        try {
          if (lastOpenInfo) lastOpenInfo.close();
        } catch (e) {}
        lastOpenInfo = infoWindow;
        infoWindow.open({
          anchor: mkr,
          map: this.map,
          shouldFocus: true
        });
      });
    }
    return mkr;
  }.bind(this));
  this.showRoute = viewerElt.showPolylineRoute;
}
LVPolyline.prototype.remove = function () {
  this.polyline.setMap(null);
  this.polylineHL.setMap(null);
  this.markers.forEach(function (mk) {
    mk.setMap(null);
  });
};
Object.defineProperty(LVPolyline.prototype, 'showRoute', {
  set: function set(value) {
    this._showRoute = !!value;
    if (value) {
      this.polylineHL.setMap(this.map);
      this.polyline.setMap(this.map);
    } else {
      this.polylineHL.setMap(null);
      this.polyline.setMap(null);
    }
  },
  get: function get() {
    return this._showRoute;
  }
});
Object.defineProperty(LVPolyline.prototype, 'color', {
  get: function get() {
    return this.polylineData.strokeColor;
  }
});
Object.defineProperty(LVPolyline.prototype, 'sumDistance', {
  get: function get() {
    var res = 0;
    var path = this.polylineData.path;
    for (var i = 1; i < path.length; ++i) {
      res += (0, _utils.latLngDistance)(path[i - 1], path[i]);
    }
    return res;
  }
});
function LVPoints(viewerElt, data) {
  this.data = data;
  this.refData = [data];
  this.id = data.id || (0, _stringGenerate.randomIdent)(12);
  this.latLng = (0, _utils.implicitLatLng)(data);
  if (!this.latLng) {
    console.error('Invalid data', data);
    return;
  }
  this.map = viewerElt.map;
  this.viewNumber = 0;
}
LVPoints.prototype.numberToHue = function (number) {
  var res = 0;
  var hs = 1;
  for (var i = 0; i < 4 && number > 1; ++i) {
    hs *= 10;
    res += Math.log(Math.min(number, hs)) / Math.log(hs) * 0.25;
    number -= hs;
  }
  res = Math.min(0.8, res);
  return res;
};
LVPoints.prototype.number2Image = function (number) {
  var data = this.data;
  var color = number === 1 ? data.color || generateColor(this.id).toString() : _Color["default"].fromHSL(this.numberToHue(number), 1, 0.5).toString();
  try {
    color = _Color["default"].parse(color);
  } catch (e) {
    color = number === 1 ? generateColor(this.id) : _Color["default"].fromHSL(this.numberToHue(number), 1, 0.4);
  }
  var textColor = color.getContrastYIQ().toString('hex8');
  color = color.toString('hex8');
  var outLineCount;
  var radius;
  if (number <= 1) {
    outLineCount = 0;
    radius = 10;
  } else {
    outLineCount = (number + '').length;
    radius = 5 + outLineCount * 2;
  }
  var canvasSize = 2 * (radius + 5 * outLineCount + 2);
  var res = {
    tag: 'svg',
    style: {
      position: 'absolute',
      top: '50%',
      left: '50%',
      transform: 'translate(-50%, -50%)',
      cursor: 'pointer'
    },
    attr: {
      width: canvasSize + '',
      height: canvasSize + '',
      viewBox: [-canvasSize / 2, -canvasSize / 2, canvasSize, canvasSize].join(' ')
    },
    child: [{
      tag: 'circle',
      attr: {
        cx: 0,
        cy: 0,
        r: radius
      },
      style: {
        fill: color,
        stroke: number === 1 ? 'white' : 'none',
        'stroke-width': number === 1 ? 4 : 0
      }
    }]
  };
  var path, r;
  var j, sAngle, eAngle;
  var angle;
  var delta = 2 * Math.PI / 5;
  for (var i = 0; i < outLineCount; ++i) {
    angle = -Math.PI / 2 - delta / 2;
    r = radius + 3 + i * 5;
    path = '';
    for (j = 0; j < 5; ++j) {
      angle += delta;
      sAngle = angle + 0.1;
      eAngle = angle + delta - 0.1;
      path += ['M', Math.cos(sAngle) * r, Math.sin(sAngle) * r].join(' ') + ' ';
      path += ['A', r, r, 0, 0, 1, Math.cos(eAngle) * r, Math.sin(eAngle) * r].join(' ') + ' ';
    }
    res.child.push({
      tag: 'path',
      style: {
        fill: 'none',
        stroke: color,
        'stroke-width': 4
      },
      attr: {
        d: path,
        opacity: 0.5 - 0.5 * i / outLineCount
      }
    });
  }
  if (number > 1) {
    res.child.push({
      tag: 'text',
      attr: {
        x: 0,
        y: 0,
        'dominant-baseline': 'middle',
        'text-anchor': 'middle',
        fill: textColor,
        'font-size': 10,
        'font-weight': 'bold'
      },
      child: {
        text: number + ''
      }
    });
  }
  return _Svg["default"].ShareInstance._(res);
};

/**
 *
 * @param {number} number - <0: not show>
 */
LVPoints.prototype.view = function (number) {
  var _this = this;
  if (!(0, _utils.isRealNumber)(number)) number = 0;
  number = Math.max(0, Math.floor(number));
  if (this.viewNumber === number) return;
  this.viewNumber = number;
  var data = this.data;
  if (this.marker) {
    this.marker.setMap(null);
    this.marker = null;
    this.content = null;
  }
  if (number <= 0) return;
  this.content = this.number2Image(number);
  this.marker = new google.maps.marker.AdvancedMarkerElement({
    position: this.latLng,
    map: this.map,
    content: this.content
  });
  this.marker.getMap = this.marker.getMap || function () {
    return this.map;
  };
  this.marker.getPosition = function () {
    return _this.latLng;
  };
  this.marker.setMap(this.map);
  if (number === 1) {
    if (this.data.info && !this.infoWindow) {
      this.infoWindow = new google.maps.InfoWindow(this.data.info);
    }
    if (this.infoWindow) {
      this.content.on('mouseover', function () {
        if (lastOpenInfo === _this.infoWindow) return;
        try {
          if (lastOpenInfo) lastOpenInfo.close();
        } catch (e) {}
        lastOpenInfo = _this.infoWindow;
        _this.infoWindow.open({
          anchor: _this.marker,
          map: _this.map,
          shouldFocus: true
        });
      });
    }
  } else if (number > 1) {
    this.content.on('click', function () {
      _this.map.setCenter(_this.latLng);
      _this.map.setZoom(_this.map.getZoom() + 1);
    });
  }
};
LVPoints.prototype.remove = function () {
  if (this.marker) this.marker.setMap(null);
  this.content = null;
  this.marker = null;
  this.infoWindow = null;
};

/**
 *
 * @param {LocationView} lvElt
 * @param {LVPoints[]} points
 * @constructor
 */
function LVCluster(lvElt, points) {
  this.lvElt = lvElt;
  this.points = points;
  /**
   *
   * @type {Object<string, LVPoints>}
   */
  this.pointDict = this.points.reduce(function (ac, cr) {
    ac[cr.id] = cr;
    return ac;
  }, {});
  this.viewingPoints = {};
  this.map = lvElt.map;
  this.zoom = this.map.getZoom();
  this.bounds = this.map.getBounds();
  this.idleTO = -1;
  this.onIdle = this.onIdle.bind(this);
}
LVCluster.prototype.onProcessed = function () {
  if (this.idleTO >= 0) {
    clearTimeout(this.idleTO);
  }
  this.idleTO = setTimeout(this.onIdle, 500);
};
LVCluster.prototype.onIdle = function () {
  var _this2 = this;
  this.idleTO = -1;
  this.bounds = this.map.getBounds();
  this.zoom = this.map.getZoom();
  if (!this.bounds) return;
  var newViewPoints = this.points.reduce(function (ac, point) {
    if (!_this2.bounds.contains(point.latLng)) return ac;
    var rPoint;
    for (var rId in ac) {
      rPoint = _this2.pointDict[rId];
      if (distanceInPixels(_this2.zoom, rPoint.latLng, point.latLng) < 50) {
        ac[rId]++;
        return ac;
      }
    }
    ac[point.id] = 1;
    return ac;
  }, {});
  var id;
  var oldViewPoints = this.viewingPoints;
  for (id in oldViewPoints) {
    if (!newViewPoints[id]) {
      if (this.pointDict[id]) {
        this.pointDict[id].view(0);
      }
    }
  }
  for (id in newViewPoints) {
    if (this.pointDict[id]) {
      this.pointDict[id].view(newViewPoints[id]);
    }
  }
  this.viewingPoints = newViewPoints;
};

/***
 * @extends AElement
 * @constructor
 */
function LocationView() {
  this.map = new google.maps.Map(this, {
    zoom: 8,
    center: new google.maps.LatLng(21.018755, 105.839729),
    scaleControl: true,
    mapId: (0, _stringGenerate.randomIdent)()
  });
  google.maps.event.addListener(this.map, "zoom_changed", this.eventHandler.mapZoomChanged);
  google.maps.event.addListener(this.map, 'bounds_changed', this.eventHandler.mapBoundsChanged);
  this.marker = null;
  this._value = null;
  this.$domSignal = (0, _ACore._)('attachhook').addTo(this);
  this.domSignal = new _DomSignal["default"](this.$domSignal);
  /***
   * @type {LatLng}
   * @name value
   * @memberOf LocationView#
   */
  /****
   *
   * @type {LVPolyline[]}
   */
  this.$polylines = [];
  this._showPolylineRoute = true;

  /****
   *
   * @type {LVPoints[]}
   */
  this.$points = [];
}
LocationView.tag = 'LocationView'.toLowerCase();
LocationView.render = function () {
  return (0, _ACore._)({
    "class": 'as-location-view'
  });
};
LocationView.prototype.getPolylineById = function (id) {
  return this.$polylines.find(function (pll) {
    return pll.id === id;
  }) || null;
};
LocationView.prototype.getPolylines = function () {
  return this.$polylines.slice();
};
LocationView.property = {};
LocationView.property.zoom = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) {
      value = 1;
    }
    this.map.setZoom(value);
  },
  get: function get() {
    return this.map.getZoom();
  }
};
LocationView.property.value = {
  set: function set(value) {
    var _this3 = this;
    value = value || null;
    var latlng = (0, _utils.implicitLatLng)(value);
    latlng = latlng || new google.maps.LatLng(21.018755, 105.839729);
    this.map.setCenter(latlng || new google.maps.LatLng(21.018755, 105.839729));
    this._value = value;
    (0, _LocationPicker.getGoogleMarkerLib)().then(function () {
      if (_this3.marker) {
        _this3.marker.setMap(null);
        _this3.marker = null;
      }
      if (latlng && value) {
        _this3.marker = new google.maps.marker.AdvancedMarkerElement({
          map: _this3.map,
          position: latlng
        });
      }
    });
  },
  get: function get() {
    return this._value;
  }
};
LocationView.property.polylines = {
  set: function set(polylines) {
    var _this4 = this;
    this._polylines = polylines || [];
    this.$polylines.forEach(function (pll) {
      pll.remove();
    });
    (0, _LocationPicker.getGoogleMarkerLib)().then(function () {
      _this4.$polylines = polylines.map(function (pll) {
        return new LVPolyline(this, pll);
      }.bind(_this4));
      var zoom;
      var center;
      var points = _this4.$polylines.reduce(function (ac, $polyline) {
        return ac.concat($polyline.polylineData.path);
      }, []);
      var bounds = points.reduce(function (ac, cr) {
        ac.extend(cr);
        return ac;
      }, new google.maps.LatLngBounds());
      _this4.domSignal.once('update_view', function () {
        if (points.length > 1) {
          zoom = (0, _utils.getMapZoomLevel)(this.getBoundingClientRect(), bounds);
          center = bounds.getCenter();
        } else {
          zoom = 17;
          center = points[0] || new google.maps.LatLng(21.018755, 105.839729);
        }
        zoom = Math.min(zoom, 17);
        this.map.setZoom(zoom);
        this.map.setCenter(center);
      }.bind(_this4), 100);
      _this4.domSignal.emit('update_view');
    });
  },
  get: function get() {
    return this._polylines;
  }
};
LocationView.property.showPolylineRoute = {
  set: function set(value) {
    this._showPolylineRoute = !!value;
    this.$polylines.forEach(function (pll) {
      pll.showRoute = value;
    });
  },
  /**
   * @this LocationView
   * @returns {*|boolean}
   */
  get: function get() {
    return this._showPolylineRoute;
  }
};
LocationView.property.points = {
  /**
   * @this LocationView
   * @param points
   */
  set: function set(points) {
    var _this5 = this;
    this.$points.forEach(function (point) {
      point.remove();
    });
    this._points = points || [];
    (0, _LocationPicker.getGoogleMarkerLib)().then(function () {
      var now = Date.now();
      var rp = _this5._points.reduce(function (ac, pointData) {
        var id = pointData.id;
        var point;
        if (id && ac.dict[id]) {
          ac.dict[id].refData.push(pointData);
        } else {
          point = new LVPoints(this, pointData);
          ac.dict[point.id] = point;
          ac.arr.push(point);
        }
        return ac;
      }.bind(_this5), {
        arr: [],
        dict: {}
      });
      _this5.$points = rp.arr;
      var zoom;
      var center;
      var latLngs = _this5.$points.map(function (p) {
        return p.latLng;
      }, []).filter(function (x) {
        return !!x;
      });
      var bounds = latLngs.reduce(function (ac, cr) {
        ac.extend(cr);
        return ac;
      }, new google.maps.LatLngBounds());
      _this5.pointsCluster = new LVCluster(_this5, _this5.$points);
      console.log('set points', Date.now() - now);
      _this5.domSignal.once('update_view', function () {
        if (points.length > 1) {
          zoom = (0, _utils.getMapZoomLevel)(this.getBoundingClientRect(), bounds);
          center = bounds.getCenter();
        } else {
          zoom = 17;
          center = points[0] || new google.maps.LatLng(21.018755, 105.839729);
        }
        zoom = Math.min(zoom, 17);
        this.map.setZoom(zoom);
        this.map.setCenter(center);
        if (this.pointsCluster) this.pointsCluster.onProcessed();
      }.bind(_this5), 100);
      _this5.domSignal.emit('update_view');
    });
  },
  get: function get() {
    return this._points;
  }
};
LocationView.eventHandler = {};
LocationView.eventHandler.mapZoomChanged = function () {
  if (this.pointsCluster) this.pointsCluster.onProcessed();
  // var now = Date.now();
  // var eltRect = Rectangle.fromClientRect(this.getBoundingClientRect());
  // var bounds = this.map.getBounds();
  // // var mapRect = new Rectangle()
  //
  // console.log('zoom changed', Date.now() - now);
};

LocationView.eventHandler.mapBoundsChanged = function () {
  if (this.pointsCluster) this.pointsCluster.onProcessed();
};
_ACore["default"].install(LocationView);
var _default = LocationView;
exports["default"] = _default;

/***/ }),

/***/ 88525:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _utils = __webpack_require__(84512);
var _search = __webpack_require__(67858);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @extends Follower
 * @constructor
 */
function MDIPicker() {
  var _this = this;
  this.$searchInput = (0, _ACore.$)(_Searcher["default"].tag, this).on('stoptyping', this.eventHandler.searchChange);
  this.cancelWaiting();
  var bodys = (0, _ACore.$$)('.as-mdi-picker-body', this);
  this.$body = bodys[0];
  this.$searchResult = bodys[1];
  this.iconItems = [];
  this.$icons = {};
  (0, _utils.getMaterialDesignIconNames)().then(function (iconNames) {
    if (!iconNames) return;
    var row;
    var iconName;
    for (var i = 0; i < iconNames.length; i++) {
      iconName = iconNames[i];
      if (i % 8 === 0) row = (0, _ACore._)('.as-mdi-picker-row').addTo(_this.$body);
      _this.$icons[iconName] = (0, _ACore._)({
        tag: 'button',
        "class": 'as-transparent-button',
        child: 'span.mdi.mdi-' + iconName,
        attr: {
          'data-icon': iconName,
          title: iconName
        }
      }).addTo(row);
      _this.iconItems.push({
        text: iconName,
        icon: iconName
      });
    }
    _this.updatePosition();
  });
  this.on('click', this.eventHandler.click);
}
MDIPicker.tag = 'MDIPicker'.toLowerCase();
MDIPicker.render = function () {
  return (0, _ACore._)({
    tag: _Follower["default"],
    "class": 'as-mdi-picker',
    extendEvent: 'pick',
    child: [{
      tag: _Searcher["default"]
    }, {
      "class": 'as-mdi-picker-body'
    }, {
      style: {
        display: 'none'
      },
      "class": 'as-mdi-picker-body'
    }]
  });
};
MDIPicker.prototype.focus = function () {
  this.$searchInput.focus();
};
MDIPicker.eventHandler = {};

/**
 * @this MDIPicker
 */
MDIPicker.eventHandler.searchChange = function () {
  var query = this.$searchInput.value;
  query = query.trim().toLowerCase().replace(/\s+/g, ' ');
  var res, row, i;
  var iconName;
  if (query.length > 0) {
    this.$body.addStyle('display', 'none');
    this.$searchResult.clearChild().removeStyle('display');
    res = (0, _search.searchListByText)(query, this.iconItems);
    for (i = 0; i < res.length; i++) {
      iconName = res[i].text;
      if (i % 8 === 0) row = (0, _ACore._)('.as-mdi-picker-row').addTo(this.$searchResult);
      (0, _ACore._)({
        tag: 'button',
        "class": 'as-transparent-button',
        child: 'span.mdi.mdi-' + iconName,
        attr: {
          'data-icon': iconName,
          title: iconName
        }
      }).addTo(row);
    }
  } else {
    this.$searchResult.addStyle('display', 'none');
    this.$body.removeStyle('display');
  }
};
MDIPicker.eventHandler.click = function (event) {
  var t = event.target;
  while (t) {
    if (t === this) break;
    if (t.hasClass && t.hasClass('as-transparent-button')) {
      this.emit('pick', {
        icon: t.attr('data-icon')
      });
    }
    t = t.parentElement;
  }
};
_ACore["default"].install(MDIPicker);
var _default = MDIPicker;
exports["default"] = _default;

/***/ }),

/***/ 29342:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(35778);
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _MKNavigatorItem = _interopRequireDefault(__webpack_require__(7877));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @typedef MKNavigatorItemData
 * @property {string} text
 * @property {string|number} value
 * @property {boolean|number=} checked
 */

/***
 * @extends AElement
 * @constructor
 */
function MKNavigator() {
  var _this = this;
  this._items = [];
  this._value = 0;
  this._hiddenValues = [];
  this.$itemByValue = {};
  this.$header = (0, _ACore.$)('.mk-nav-header', this);
  this.$body = (0, _ACore.$)('.mk-nav-body', this).on('orderchange', this.eventHandler.bodyOrderChange).on('dragitemstart', this.eventHandler.dragItemStart);
  this.$footer = (0, _ACore.$)('.mk-nav-footer', this);
  this.on('press', function (event, sender) {
    _this.emit('clickitem', event, sender);
  });
  /***
   * @type {MKNavigatorItemData[]}
   * @name item
   * @memberOf MKNavigator#
   */

  /***
   * @type {number[]}
   * @name order
   * @memberOf MKNavigator#
   */
}

MKNavigator.tag = 'MKNavigator'.toLowerCase();
MKNavigator.render = function () {
  return (0, _ACore._)({
    "class": 'mk-nav',
    extendEvent: ['orderchange', 'checkedchange', 'press', 'clickitem'],
    child: [{
      "class": 'mk-nav-header'
    }, {
      tag: _BoardTable["default"].tag,
      "class": 'mk-nav-body'
    }, {
      "class": 'mk-nav-footer'
    }]
  });
};
MKNavigator.prototype.updateValue = function () {
  var _this2 = this;
  var value = this._value;
  for (var iValue in this.$itemByValue) {
    if (iValue + '' !== value + '') {
      this.$itemByValue[iValue].removeClass('mk-current');
    }
  }
  var order = this.order;
  if (this.$itemByValue[value]) {
    this.$itemByValue[value].addClass('mk-current');
  } else if (order.length > 0) {
    this.$itemByValue[order[0]].addClass('mk-current');
  }
  var idx = order.filter(function (value) {
    return !_this2.$itemByValue[value].hasClass('as-hidden');
  }).indexOf(value);
  if (idx >= 0) {
    this.addStyle('--mk-nav-line-top', "calc(".concat(2 * idx, "em + ").concat(12 * idx, "px)"));
  } else {
    this.removeStyle('--mk-nav-line-top');
  }
};
MKNavigator.prototype.setTextOfItem = function (value, text) {
  var itemElt = this.$itemByValue[value];
  if (!itemElt) return;
  itemElt.data.text = text;
  itemElt.updateText();
};
MKNavigator.prototype.mkItem = function (data) {
  var self = this;
  return (0, _ACore._)({
    tag: _MKNavigatorItem["default"].tag,
    attr: {
      "data-value": data && data.value
    },
    props: {
      data: data
    },
    on: {
      checkedchange: function checkedchange(event) {
        self.emit('checkedchange', {
          type: 'checkedchange',
          target: this,
          originalEvent: event.originalEvent,
          itemData: data,
          checked: data.checked
        }, self);
      },
      press: function press(event) {
        self.value = data.value;
        self.emit('press', {
          type: 'press',
          itemElt: this,
          itemData: data,
          value: data.value,
          target: this,
          originalEvent: event.originalEvent
        }, self);
      }
    }
  });
};
MKNavigator.prototype._updateHiddenValues = function () {
  var _this3 = this;
  var hiddenDict = this._hiddenValues.reduce(function (ac, x) {
    ac[x] = true;
    return ac;
  }, {});
  Object.keys(this.$itemByValue).forEach(function (value) {
    if (hiddenDict[value]) {
      _this3.$itemByValue[value].addClass('as-hidden');
    } else {
      _this3.$itemByValue[value].removeClass('as-hidden');
    }
  });
};
MKNavigator.property = {};
MKNavigator.property.items = {
  /***
   * @this MKNavigator
   * @param items
   */
  set: function set(items) {
    items = items || [];
    this._items = items;
    this.$itemByValue = {};
    var i = 0;
    var item;
    var itemElt;
    this.$header.clearChild();
    this.$body.clearChild();
    this.$footer.clearChild();
    var draggable = false;
    var maxTextWidth = items.reduce(function (ac, it) {
      var tw = (0, _utils.measureText)(it.text || '').width;
      return Math.max(ac, tw);
    }, 0);
    this.addStyle('--max-text-width', Math.ceil(maxTextWidth) + 'px');
    while (i < items.length) {
      if (items[i].draggable) break;
      item = items[i];
      itemElt = this.mkItem(item);
      this.$itemByValue[item.value] = itemElt;
      this.$header.addChild(itemElt);
      ++i;
    }
    while (i < items.length) {
      if (!items[i].draggable) break;
      draggable = true;
      item = items[i];
      itemElt = this.mkItem(item);
      this.$itemByValue[item.value] = itemElt;
      this.$body.addChild(itemElt);
      ++i;
    }
    while (i < items.length) {
      item = items[i];
      itemElt = this.mkItem(item);
      this.$itemByValue[item.value] = itemElt;
      this.$footer.addChild(itemElt);
      ++i;
    }
    if (draggable) {
      this.addClass('mk-has-draggable');
    } else {
      this.removeClass('mk-has-draggable');
    }
    this._updateHiddenValues();
  },
  get: function get() {
    return this._items;
  }
};
MKNavigator.property.order = {
  get: function get() {
    return (0, _ACore.$$)(_MKNavigatorItem["default"].tag, this).map(function (e) {
      return e.data.value;
    });
  }
};
MKNavigator.property.value = {
  set: function set(value) {
    this._value = value;
    this.updateValue();
  },
  get: function get() {
    if (this.$itemByValue[this._value]) return this._value;
    if (this._items.length > 0) return this._items[0];
    return this._value;
  }
};
MKNavigator.property.hiddenValues = {
  set: function set(values) {
    values = values || [];
    if (!(values instanceof Array)) values = [];
    this._hiddenValues = values;
    this._updateHiddenValues();
    this.updateValue();
  },
  get: function get() {
    return this._hiddenValues;
  }
};

/***
 * @memberOf MKNavigator#
 * @type {{}}
 */
MKNavigator.eventHandler = {};
MKNavigator.eventHandler.bodyOrderChange = function (event) {
  this.updateValue();
  this._items.splice(0, this._items.length);
  (0, _ACore.$$)(_MKNavigatorItem["default"].tag, this).reduce(function (ac, cr) {
    ac.push(cr.data);
    return ac;
  }, this._items);
  this.emit('orderchange', {
    type: 'orderchange',
    target: this
  }, this);
};

/***
 * @memberOf MKNavigator#
 * @type {{}}
 */
MKNavigator.eventHandler.dragItemStart = function (event) {
  var bound = this.getBoundingClientRect();
  this.addStyle('--mk-navigator-bound-left', bound.left + 'px');
};
_ACore["default"].install(MKNavigator);
_ACore["default"].install('mknav', MKNavigator);
var _default = MKNavigator;
exports["default"] = _default;

/***/ }),

/***/ 7877:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(35778);
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _Switch = _interopRequireDefault(__webpack_require__(4587));
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function MKNavigatorItem() {
  this._data = [];
  this.$text = (0, _ACore.$)('.mk-nav-item-text', this);
  this.$switchCtn = (0, _ACore.$)('.mk-nav-item-switch-ctn', this);
  this.$switch = (0, _ACore.$)('switch', this).on('change', this.eventHandler.switchChange);
  this.$dragzone = (0, _ACore.$)('.mk-nav-item-drag-zone', this);
  this.on('click', this.eventHandler.click);
}
MKNavigatorItem.tag = 'MKNavigatorItem'.toLowerCase();
MKNavigatorItem.render = function () {
  return (0, _ACore._)({
    tag: _Board["default"].tag,
    "class": 'mk-nav-item',
    extendEvent: ['checkedchange', 'press'],
    child: [{
      "class": ['mk-nav-item-drag-zone', _BoardTable["default"].DRAG_ZONE_CLASS_NAME],
      child: '<i class="material-icons">drag_indicator</i>'
    }, {
      "class": 'mk-nav-item-text-ctn',
      child: {
        tag: 'span',
        "class": 'mk-nav-item-text',
        child: {
          text: ''
        }
      }
    }, {
      "class": 'mk-nav-item-switch-ctn',
      child: {
        tag: _Switch["default"].tag
      }
    }]
  });
};
MKNavigatorItem.prototype.updateText = function () {
  this.$text.firstChild.data = this._data.text;
};
MKNavigatorItem.prototype.updateChecked = function () {
  if (typeof this._data.checked === "boolean") {
    this.$switchCtn.removeStyle('display');
    this.$switch.checked = this._data.checked;
  } else {
    this.$switchCtn.addStyle('display', 'none');
  }
};
MKNavigatorItem.prototype.updateDraggable = function () {
  if (this._data.draggable) {
    this.$dragzone.removeStyle('display');
  } else {
    this.$dragzone.addStyle('display', 'none');
  }
};
MKNavigatorItem.property = {};
MKNavigatorItem.property.data = {
  /**
   * @this MKNavigatorItem
   * @param data
   */
  set: function set(data) {
    data = data || {};
    this._data = data;
    this.updateText();
    this.updateChecked();
    this.updateDraggable();
  },
  get: function get() {
    return this._data;
  }
};

/***
 * @memberOf MKNavigatorItem#
 * @type {{}}
 */
MKNavigatorItem.eventHandler = {};
MKNavigatorItem.eventHandler.switchChange = function (event) {
  this._data.checked = this.$switch.checked;
  this.emit('checkedchange', {
    type: 'checkedchange'
  }, this);
};
MKNavigatorItem.eventHandler.click = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$switch, event) || (0, _EventEmitter.hitElement)(this.$dragzone, event)) return;
  this.emit('press', {
    type: 'press',
    target: this,
    originalEvent: event
  }, this);
};
_ACore["default"].install(MKNavigatorItem);
var _default = MKNavigatorItem;
exports["default"] = _default;

/***/ }),

/***/ 42870:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(39725);
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _file = __webpack_require__(54134);
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _Text = __webpack_require__(35844);
var _BScroller = _interopRequireDefault(__webpack_require__(1446));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var MediACore = new _Dom["default"]();
MediACore.install(_ACore["default"]);
var _ = MediACore._;
var $ = MediACore.$;
function openFileDialog(props) {
  if (!MediACore.$fileInput) {
    MediACore.$fileInput = _({
      tag: 'input',
      "class": 'vmedia-no-show',
      attr: {
        type: 'file'
      },
      props: {}
    }).addTo(document.body);
  }
  props = props || {};
  if (props.accept) {
    if (props.accept instanceof Array) MediACore.$fileInput.attr('accept', props.accept.join(','));else MediACore.$fileInput.attr('accept', props.accept);
  } else {
    MediACore.$fileInput.attr('accept', null);
  }
  if (props.multiple) {
    MediACore.$fileInput.attr('multiple', 'true');
  } else {
    MediACore.$fileInput.attr('multiple');
  }
  MediACore.$fileInput.value = null;
  MediACore.$fileInput.click();
  return new Promise(function (resolve, reject) {
    var finish = false;
    var body = $('body');
    MediACore.$fileInput.once('change', function () {
      finish = true;
      resolve(Array.prototype.map.call(this.files, function (file) {
        return file;
      }));
    });
    body.once('mousedown', function () {
      if (finish) return;
      resolve();
    });
  });
}
function MediaInput() {
  this.$editor = $('.vmedia-media-input-text-container-editor', this);
  this.$editor.on('paste', this.eventHandler.paste);
  this.$editor.on('keydown', this.eventHandler.keydown, true);
  this.$addImagebtn = $('#add-image-btn', this);
  this.$addImagebtn.on('click', this.eventHandler.clickAddImage);
  this.$addFilebtn = $('#add-file-btn', this);
  this.$addFilebtn.on('click', this.eventHandler.clickAddFile);
  this.$imagePreviewContainer = $('.vmedia-media-input-imagepreview-container', this);
  this.on('dragover', this.eventHandler.dragOver);
  this.on('drop', this.eventHandler.drop);
  this.$sendbtn = $('#send-btn', this);
  this.$sendbtn.on('click', this.eventHandler.send);
  this.$toolLeftCtn = $('.vmedia-media-input-tool-container-left', this);
  this.$pluginContentCtn = $('.vmedia-media-input-plugin-content-container', this);
  this.snapData = [];
  this.snapDataHead = 0;
  this.sync = this.afterAttached();
  this.snapText();
}
MediaInput.tag = 'MediaInput'.toLowerCase();
MediaInput.render = function () {
  return _({
    "class": 'vmedia-media-input',
    extendEvent: ['send', 'update', 'releaseplugin'],
    child: {
      "class": 'vmedia-media-input-text-container',
      child: [{
        "class": 'vmedia-media-input-imagepreview-container',
        child: {
          "class": 'vmedia-media-input-dropover',
          child: 'download-ico'
        }
      }, {
        "class": 'vmedia-media-input-text-container-editor',
        attr: {
          contenteditable: 'true'
        },
        on: {}
      }, {
        "class": 'vmedia-media-input-text-container-buttons',
        attr: {
          title: 'Send'
        }
      }, {
        "class": 'vmedia-media-input-tool-container',
        child: [{
          "class": 'vmedia-media-input-tool-container-left',
          child: [{
            tag: 'button',
            attr: {
              id: 'add-image-btn',
              title: 'Add image'
            },
            child: 'add-image-ico'
          }, {
            tag: 'button',
            attr: {
              id: 'add-file-btn',
              title: 'Add file'
            },
            child: 'add-file-ico'
          }]
        }, {
          "class": 'vmedia-media-input-tool-container-right',
          child: [{
            tag: 'button',
            id: 'send-btn',
            attr: {
              title: 'Send'
            },
            child: 'send-ico'
          }]
        }]
      }, '.vmedia-media-input-plugin-content-container.blur']
    }
  });
};
MediaInput.prototype.addImage = function (url, title, data) {
  _({
    tag: 'imagepreview',
    attr: {
      title: title
    },
    props: {
      data: data,
      imgSrc: url
    },
    on: {
      pressremove: function pressremove() {
        this.selfRemove();
      }
    }
  }).addTo(this.$imagePreviewContainer);
};
MediaInput.prototype.addFile = function (url, ext, title, data) {
  _({
    tag: 'filepreview',
    attr: {
      title: title
    },
    props: {
      fileSrc: url,
      ext: ext,
      data: data
    },
    on: {
      pressremove: function pressremove() {
        this.selfRemove();
      }
    }
  }).addTo(this.$imagePreviewContainer);
};
MediaInput.property = {};
MediaInput.property.text = {
  set: function set(value) {
    this.$editor.clearChild();
    value = value || '';
    var lines = value.split(/\r*\n/);
    if (lines.length < 1) return;
    this.$editor.addChild(document.createTextNode(lines[0]));
    lines.shift();
    lines.forEach(function (line) {
      this.$editor.addChild(_({
        child: document.createTextNode(line)
      }));
    }.bind(this));
    this.snapText();
  },
  get: function get() {
    return this.getTextFromElements(this.$editor);
  }
};
MediaInput.property.files = {
  get: function get() {
    return Array.prototype.filter.call(this.$imagePreviewContainer.childNodes, function (e) {
      return e._azar_extendTags && e._azar_extendTags.filepreview;
    }).map(function (e) {
      return e.data;
    });
  }
};
MediaInput.property.images = {
  get: function get() {
    return Array.prototype.filter.call(this.$imagePreviewContainer.childNodes, function (e) {
      return e._azar_extendTags && e._azar_extendTags.imagepreview;
    }).map(function (e) {
      return e.data;
    });
  }
};

// MediaInput.property

MediaInput.property.plugins = {
  set: function set(value) {
    this.sync = this.sync.then(this._dettachPlugins.bind(this, this._plugins));
    if (value) {
      if (!(value instanceof Array)) value = [value];
      this._plugins = value;
      this.addClass('has-plugin');
    } else {
      //remove plugin
      this.sync.then(this._dettachPlugins.bind(this));
      this._plugins = null;
      this.removeClass('has-plugin');
    }
    this.sync = this.sync.then(this._attachPlugins.bind(this, this._plugins));
  },
  get: function get() {
    return this._plugins || null;
  }
};
MediaInput.prototype.appendText = function (text) {
  var lastBr = null;
  if (this.$editor.childNodes && this.$editor.childNodes.length > 0 && this.$editor.childNodes[this.$editor.childNodes.length - 1].tagName && this.$editor.childNodes[this.$editor.childNodes.length - 1].tagName.toLowerCase() == 'br') {
    lastBr = this.$editor.childNodes[this.$editor.childNodes.length - 1];
  }
  var lines = text.split(/\r?\n/);
  if (lastBr) {
    for (var i = 0; i < lines.length; ++i) {
      if (i > 0) this.$editor.addChild(_('br'));
      var e = _({
        text: lines[i]
      });
      this.$editor.addChild(e);
    }
  } else {
    for (var i = 0; i < lines.length; ++i) {
      if (i > 0) this.$editor.addChildBefore(_('br'), lastBr);
      var e = _({
        text: lines[i]
      });
    }
    this.$editor.addChildBefore(e, lastBr);
  }
  (0, _Text.setSelectionRange)(this.$editor, Infinity);
};
MediaInput.prototype._attachPlugins = function (plugins) {
  if (!plugins) return;
  var self = this;
  plugins.forEach(function (plugin) {
    var oldContent = null;
    var $button = _('button').addTo(self.$toolLeftCtn).on('click', function () {
      if (self._lastActivePlugin == plugin) return;
      self.releasePlugin();
      self._lastActivePlugin = plugin;
      self.$pluginContentCtn.removeClass('blur');
      self.$pluginContentCtn.clearChild();
      if (plugin.getContent) {
        var newContent = plugin.getContent(self, _, $, self.$pluginContentCtn, oldContent);
        oldContent = newContent;
        self.$pluginContentCtn.addChild(newContent);
      }
      var buttonBound = $button.getBoundingClientRect();
      var rootBound = self.$pluginContentCtn.parentNode.getBoundingClientRect();
      self.$pluginContentCtn.addStyle({
        left: buttonBound.left + buttonBound.width / 2 - rootBound.left + 'px',
        bottom: rootBound.bottom - buttonBound.top + 'px'
      });
      if (plugin.onActive) plugin.onActive(self);
      setTimeout(function () {
        var outListener = function outListener(event) {
          if (_EventEmitter["default"].hitElement(self.$pluginContentCtn, event)) {} else if (self._lastActivePlugin == plugin) {
            var prevented = true;
            if (plugin.onBlur) plugin.onBlur({
              preventDefault: function preventDefault() {
                prevented = false;
              }
            });
            if (prevented) {
              self.releasePlugin();
              $(document.body).off('click', outListener);
            }
          } else {
            $(document.body).off('click', outListener);
          }
        };
        $(document.body).on('click', outListener);
        self.once('releaseplugin', function (ev) {
          if (ev.plugin == plugin) {
            $(document.body).off('click', outListener);
          }
        });
      }, 100);
    });
    var btnInners = plugin.getTriggerInner(self, _, $, $button);
    if (!(btnInners instanceof Array)) btnInners = [btnInners];
    btnInners.forEach(function (e) {
      if (typeof e == 'string') {
        e = _({
          text: e
        });
      }
      $button.addChild(e);
    });
    if (plugin.onAttached) plugin.onAttached(self);
  });
  //todo
  return true;
};
MediaInput.prototype.releasePlugin = function () {
  if (this._lastActivePlugin) {
    var plugin = this._lastActivePlugin;
    plugin.onDeactived && plugin.onDeactived(self);
    this.$pluginContentCtn.addClass('blur');
    this.emit('releaseplugin', {
      target: this,
      plugin: plugin
    }, this);
    this._lastActivePlugin = null;
  }
};
MediaInput.prototype._dettachPlugins = function (plugins) {
  if (!plugins) return;
  var self = this;
  plugins.forEach(function (plugin) {
    if (plugin.onAttached) plugin.onAttached(self);
  });
  //todo
  this._lastActivePlugin = null;
  return true;
};
MediaInput.prototype.focus = function () {
  this.$editor.focus();
  (0, _Text.setSelectionRange)(this.$editor, Infinity);
};
MediaInput.prototype.clear = function () {
  Array.prototype.filter.call(this.$imagePreviewContainer.childNodes, function (e) {
    return e._azar_extendTags && e._azar_extendTags.imagepreview;
  }).forEach(function (e) {
    e.selfRemove();
  });
  Array.prototype.filter.call(this.$imagePreviewContainer.childNodes, function (e) {
    return e._azar_extendTags && e._azar_extendTags.filepreview;
  }).forEach(function (e) {
    return e.selfRemove();
  });
  this.$editor.innerHTML = "";
  this.emit('update', {
    target: this
  }, this);
};
MediaInput.prototype.escapeSpace = function (s) {
  return s.replace(/\s/g, '&nbsp');
};
MediaInput.prototype.unescapeSpace = function (s) {
  return s.replace(/&nbsp/g, ' ');
};
MediaInput.prototype.getTextFromElements = function (element) {
  return (0, _Text.getTextIn)(element);
  // var self = this;

  // function visit(e, prevE) {
  //     var ac = '';
  //     var isNewLine = false;
  //     if (prevE && prevE.nodeType != Node.TEXT_NODE) {

  //         if (prevE.tagName && prevE.tagName.toLowerCase() == 'br') {
  //             isNewLine = true;
  //         }
  //         else if (Element.prototype.getComputedStyleValue.call(prevE, 'display') == 'block') {
  //             isNewLine = true;
  //         }
  //     }

  //     if (e.nodeType == Node.TEXT_NODE) {
  //         if (isNewLine) ac += '\n';
  //         ac += e.data;
  //     }
  //     else {
  //         var lastE = undefined;
  //         for (var i = 0; i < e.childNodes.length; ++i) {
  //             ac += visit(e.childNodes[i], i > 0 ? e.childNodes[i - 1] : null);

  //         }
  //     }
  //     return ac;
  // }

  // return visit(element);
};

MediaInput.prototype.getElementsFromText = function (text) {
  var newElements = text.split('\n').map(function (text) {
    return document.createTextNode(text);
  }).reduce(function (ac, cr, i, arr) {
    if (i > 0) ac.push(_('br'));
    ac.push(cr);
    return ac;
  }, []);
  return newElements;
};

// MediaInput.prototype.textOnly = function(e) {
//     if (e.nodeType == Node.TEXT_NODE) return e.textContent;
//     if (!e.tagName) return '';
//     if (e.tagName.toLowerCase() == 'br') return '\n';
//     return ($(e).getComputedStyleValue('display') == 'block' ? '\n' : '') + Array.prototype.map.call(e.childNodes, this.textOnly.bind(this)).join('')
// };

MediaInput.prototype.makeTextOnly = function () {
  var self = this;
  var editor = this.$editor;
  Array.apply(null, this.$editor.childNodes).forEach(function (e) {
    e = $(e);
    if (e.nodeType == Node.TEXT_NODE) return;
    if (e.tagName) {
      var tagName = e.tagName.toLowerCase();
      if (tagName == 'br') return;
      if (tagName.match(/img|script|svg|button|iframe|hr|video|canvas/)) {
        e.selfRemove(e);
      }
      if (tagName.match(/select|input|textarea/)) {
        e.selfReplace(document.createTextNode(e.value));
        return;
      }
      var newElements = self.getElementsFromText(self.getTextFromElements(e));
      var lastElement;
      if (e.getComputedStyleValue('display') == 'block') {
        lastElement = _('br');
      } else {
        lastElement = newElements.pop();
      }
      e.selfReplace(lastElement);
      newElements.forEach(function (nE) {
        editor.addChildBefore(nE, lastElement);
      });
    }
  });
  this.emit('update', {
    target: editor
  }, this);
};
MediaInput.eventHandler = {};
MediaInput.eventHandler.keydown = function (event) {
  if (event.key == "Enter") {
    if (!event.ctrlKey && !event.altKey && !event.shiftKey) {
      event.preventDefault();
      this.eventHandler.send(event);
      this.snapText();
    }
  }
  if (event.ctrlKey && event.key == 'z') {
    event.preventDefault();
    this.undoText();
  }
  if (event.ctrlKey && event.key == 'x') {
    setTimeout(this.snapText.bind(this), 100);
  }
  setTimeout(this.emit.bind(this, 'update', event, this), 1);
};
MediaInput.eventHandler.send = function (event) {
  if (this.images.length == 0 && this.text.trim().length == 0 && this.files.length == 0) {
    return;
  }
  this.emit('send', event, this);
  this.snapText();
};
MediaInput.eventHandler.clickAddImage = function (event) {
  openFileDialog({
    accept: 'image/*',
    multiple: true
  }).then(function (files) {
    if (!files) return;
    files.map(function (file) {
      var url = (window.URL || window.webkitURL).createObjectURL(file);
      this.addImage(url, file.name, {
        file: file,
        name: file.name,
        url: url
      });
      this.emit('update', event, this);
    }.bind(this));
  }.bind(this));
};
MediaInput.eventHandler.clickAddFile = function (event) {
  openFileDialog({
    multiple: true
  }).then(function (files) {
    if (!files) return;
    files.map(function (file) {
      var url = (window.URL || window.webkitURL).createObjectURL(file);
      if (file.type.match(/^image/)) {
        this.addImage(url, file.name, {
          file: file,
          name: file.name,
          url: url
        });
      } else {
        var p = file.name.split('.');
        var ext = p.length > 1 ? p[p.length - 1] : '';
        this.addFile(url, ext.toUpperCase(), file.name, {
          file: file,
          name: file.name,
          url: url
        });
      }
    }.bind(this));
    this.emit('update', event, this);
  }.bind(this));
};
MediaInput.eventHandler.dragOver = function (event) {
  event.preventDefault();
  this._lastDragOver = new Date().getTime();
  var currentDragOver = this._lastDragOver;
  if (!this.dragOver) {
    this.dragOver = true;
    this.addClass('dragover');
    this.emit('update', event, this);
  }
  setTimeout(function () {
    this._waitDragFileOut;
    if (this._lastDragOver == currentDragOver) {
      this.removeClass('dragover');
      this.dragOver = false;
      this.emit('update', event, this);
    }
  }.bind(this), 200);
};
MediaInput.eventHandler.drop = function (event) {
  event.preventDefault();
  if (event.dataTransfer.items) {
    for (var i = 0; i < event.dataTransfer.items.length; i++) {
      if (event.dataTransfer.items[i].kind === 'file') {
        var file = event.dataTransfer.items[i].getAsFile();
        if (!file.type && file.size % 4096 == 0) {
          //todo: folder
        } else {
          this.addSystemFile(file);
          this.emit('update', event, this);
        }
      }
    }
  } else {
    for (var i = 0; i < event.dataTransfer.files.length; i++) {
      var file = event.dataTransfer.files[i];
      if (!file.type && file.size % 4096 == 0) {} else {
        this.addSystemFile(file);
        this.emit('update', event, this);
      }
    }
  }
};
MediaInput.prototype.addSystemFile = function (file) {
  var url = (window.URL || window.webkitURL).createObjectURL(file);
  if (file.type.match(/^image/)) {
    this.addImage(url, file.name, {
      file: file,
      name: file.name,
      url: url
    });
  } else {
    var p = file.name.split('.');
    var ext = p.length > 1 ? p[p.length - 1] : '';
    this.addFile(url, ext.toUpperCase(), file.name, {
      file: file,
      name: file.name,
      url: url
    });
  }
};
MediaInput.eventHandler.paste = function (event) {
  var pasteData = event.clipboardData || window.clipboardData;
  var beforePasteElement = [];
  var self = this;
  function visit(e, ac) {
    ac.push(e);
    if (e.childNodes) {
      for (var i = 0; i < e.childNodes.length; ++i) {
        visit(e.childNodes[i], ac);
      }
    }
  }
  visit(this.$editor, beforePasteElement);
  function relocalCursor() {
    var afterPasteElement = [];
    visit(self.$editor, afterPasteElement);
    var diffElts = afterPasteElement.filter(function (e) {
      return beforePasteElement.indexOf(e) < 0;
    });
    if (diffElts.length > 0) {
      var last = diffElts.pop();
      if (last.nodeType == Node.TEXT_NODE) {
        var range = document.createRange();
        range.selectNodeContents(last);
        range.setStart(last, last.data.length);
        var sel = window.getSelection();
        sel.removeAllRanges();
        sel.addRange(range);
      } else {
        (0, _Text.setSelectionRange)(last, Infinity);
      }
    }
  }

  /**Safari bug */
  if (pasteData && pasteData.items) {
    var items = pasteData.items;
    var isAddImage = false;
    for (var i = 0; i < items.length; i++) {
      if (items[i].type.indexOf('image') !== -1) {
        var blob = items[i].getAsFile();
        var URLObj = window.URL || window.webkitURL;
        var source = URLObj.createObjectURL(blob);
        var file = (0, _file.blobToFile)(blob);
        var buffer = (0, _file.blobToArrayBuffer)(blob).then(function (arrayBuffer) {
          this.addImage(source, 'Clipboard', {
            file: blob,
            name: null,
            url: source,
            blob: blob,
            arrayBuffer: arrayBuffer
          });
          this.emit('update', event, this);
        }.bind(this));
        isAddImage = true;
        this.emit('update', event, this);
      }
    }
    if (isAddImage) event.preventDefault();
    requestAnimationFrame(function () {
      self.makeTextOnly();
      relocalCursor();
    });
  } else {
    requestAnimationFrame(function () {
      var img = $('img', this.$editor, function (img) {
        if (img) {
          img = $(img);
          var source = img.getAttribute('src');
          img.selfRemove();
          _Dom["default"].imageToCanvas(img).then(function (canvas) {
            var dataURI = canvas.toDataURL();
            var blob = (0, _file.dataURItoBlob)(dataURI);
            var file = (0, _file.blobToFile)(blob);
            var buffer = (0, _file.blobToArrayBuffer)(blob).then(function (arrayBuffer) {
              this.addImage(source, 'Clipboard', {
                dataURI: dataURI,
                file: blob,
                name: null,
                url: source,
                blob: blob,
                arrayBuffer: arrayBuffer
              });
              this.emit('update', event, this);
            }.bind(this));
          }.bind(this), function (e) {})["catch"](function (e) {});
        }
      }.bind(this));
      this.makeTextOnly();
      relocalCursor();
    }.bind(this));
  }
};
MediaInput.prototype.undoText = function () {
  if (this.snapDataHead <= 1) return;
  this.snapDataHead--;
  if (this.snapDataHead <= 0) return;
  var newText = this.snapData[this.snapDataHead - 1];
  this.text = newText;
  (0, _Text.setSelectionRange)(this.$editor, Infinity);
};
MediaInput.prototype.redoText = function () {
  if (this.snapData.length <= this.snapDataHead) return;
  this.snapDataHead++;
  var newText = this.snapData[this.snapDataHead - 1];
  var currentText = this.text;
  this.text = newText;
  (0, _Text.setSelectionRange)(this.$editor, Infinity);
};
MediaInput.prototype.snapText = function () {
  while (this.snapData.length > this.snapDataHead && this.snapData.length > 0) {
    this.snapData.pop();
  }
  var oldText = this.snapData[this.snapDataHead - 1];
  var newText = this.text;
  if (newText == oldText) return;
  this.snapData.push(this.text);
  this.snapDataHead++;
};
function ImagePreview() {
  var res = _({
    extendEvent: 'pressremove',
    "class": ['vmedia-media-input-imagepreview', 'vmedia-no-select'],
    child: ['img', 'times-ico']
  });
  res.$img = $('img', res);
  res.$timesIco = $('times-ico', res);
  res.$timesIco.on('click', function (event) {
    res.emit('pressremove', event, res);
  });
  _OOP["default"].drillProperty(res, res.$img, 'imgSrc', 'src');
  return res;
}
;
function FilePreview() {
  var res = _({
    extendEvent: 'pressremove',
    "class": ['vmedia-media-input-filepreview', 'vmedia-no-select'],
    child: ['attachment-ico', 'times-ico']
  });
  res.$img = $('attachment-ico', res);
  _OOP["default"].drillProperty(res, res.$img, 'ext');
  res.$timesIco = $('times-ico', res);
  res.$timesIco.on('click', function (event) {
    res.emit('pressremove', event, res);
  });
  return res;
}
;
MediACore.creator.mediainput = MediaInput;
MediACore.creator.imagepreview = ImagePreview;
MediACore.creator.filepreview = FilePreview;
MediACore.creator['send-ico'] = function () {
  return _(['<svg class="send" width="100" height="100" version="1.1" viewBox="0 0 26.458 26.458">', '    <g transform="translate(0 -270.54)">', '        <path d="m0.64298 272.44 3.1712 9.5402 22.152 1.7742-22.152 1.7482-3.1712 9.4749 25.323-11.223z" />', '    </g>', '</svg>'].join(''));
};
MediACore.creator['add-file-ico'] = function () {
  return _(['<svg class="add-file" width="100" height="100" version="1.1" viewBox="0 0 26.458 26.458" xmlns="http://www.w3.org/2000/svg">', '    <g transform="translate(0 -270.54)">', '        <path d="m4.2431 295.69c-0.74006-0.0759-1.4136-0.33772-2.0047-0.77942-0.19965-0.14919-0.60549-0.55475-0.75233-0.75182-0.45099-0.60524-0.7154-1.2913-0.77699-2.016-0.01275-0.15007-0.01628-2.6111-0.01252-8.7468 0.0049-8.0504 0.0068-8.5472 0.03338-8.6986 0.0883-0.50391 0.22692-0.91024 0.44705-1.3104 0.52794-0.95973 1.452-1.6645 2.5119-1.9158 0.44319-0.10508 0.12729-0.0972 4.1445-0.10308 2.5538-4e-3 3.6864-1e-4 3.7795 0.0121 0.38853 0.0508 0.80777 0.24687 1.2709 0.59434 0.44102 0.33085 0.68272 0.55272 1.7227 1.5813 0.46507 0.45998 1.2812 1.2664 1.8136 1.7921 0.96172 0.94958 1.3847 1.3824 1.696 1.7354 0.61073 0.69257 0.92 1.2063 1.0441 1.7344 0.02613 0.11122 0.02875 0.28598 0.03409 2.2731 0.0047 1.7451 0.0018 2.1574-0.01502 2.178-0.01424 0.0174-0.10685 0.0394-0.2936 0.0699-0.45695 0.0745-1.0078 0.22363-1.4356 0.38862-0.10025 0.0387-0.1888 0.0663-0.19678 0.0613-0.0085-5e-3 -0.01461-0.7983-0.01475-1.9156-2.09e-4 -1.6438-0.0036-1.9208-0.0245-2.0096-0.06972-0.29578-0.28642-0.50043-0.63767-0.60222-0.32942-0.0955-0.31104-0.0947-2.4299-0.10482l-1.9437-9e-3 -0.12495-0.0442c-0.25474-0.0901-0.45899-0.26526-0.5666-0.48578-0.10853-0.22238-0.10356-0.127-0.10407-1.9994-4.63e-4 -1.7153-0.01031-2.1544-0.05446-2.4288-0.06935-0.43095-0.22893-0.69171-0.5027-0.82138l-0.10904-0.0516h-3.1807c-3.4262 0-3.27-4e-3 -3.5482 0.0835-0.68034 0.21325-1.1718 0.754-1.3329 1.4666l-0.0345 0.15261v8.5059c0 8.1045 0.0014 8.5125 0.02871 8.6468 0.08088 0.39719 0.25808 0.72858 0.53956 1.0091 0.28082 0.27984 0.576 0.44186 0.98191 0.53896 0.11389 0.0273 0.36156 0.0293 4.5294 0.0374l4.409 9e-3 0.02019 0.0402c0.0111 0.0221 0.07695 0.15943 0.14632 0.30521s0.17519 0.3518 0.23515 0.45783c0.14341 0.25357 0.43703 0.69284 0.61725 0.92343 0.0793 0.10148 0.14077 0.19003 0.13659 0.19679-0.0073 0.0118-9.9306 0.0132-10.046 1e-3z" />', '        <path transform="matrix(.26458 0 0 .26458 0 270.54)" d="m72.469 65.742v7.4062h-7.4062v7.2852h7.4062v7.2812h7.2793v-7.2812h7.3535v-7.2852h-7.3535v-7.4062zm24.948 11.119a21.371 21.371 0 0 1-21.371 21.371 21.371 21.371 0 0 1-21.371-21.371 21.371 21.371 0 0 1 21.371-21.371 21.371 21.371 0 0 1 21.371 21.371z" style="fill-rule:evenodd;" />', '        <path d="m17.256 283.76 1.921-0.47607-0.04725-4.2884c0-0.50159-0.29516-1.2441-1.0789-2.0168l-4.6989-4.6324c-0.73814-0.72769-1.5947-0.97084-2.1519-0.97084h-7.0235c-2.1533 0.0144-3.4601 2.6226-3.4778 3.4778v17.284c0 2.121 2.2409 3.5346 3.5346 3.5346h10.058l-1.1146-1.9305h-8.6658c-1.1271 0-1.8503-1.1115-1.8503-1.8503v-16.867c0-1.0721 1.1373-1.6977 1.6977-1.6977h6.2175c0.43142 0 0.8103 0.28958 0.8103 1.1742v3.714c0 0.24768 0.36442 0.90967 0.90968 0.90967h3.2537c1.2453 0 1.6905 0.32876 1.6905 1.1613z"  />', '    </g>', '</svg>'].join(''));
};
MediACore.creator['add-image-ico'] = function () {
  return _(['<svg class="add-image" width="100" height="100" version="1.1" viewBox="0 0 26.458 26.458" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="absol/src/HTML5/Elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">', '    <g transform="translate(0 -270.54)">', '        <path d="m24.73 288.69a5.9808 5.9808 0 0 1-5.9808 5.9808 5.9808 5.9808 0 0 1-5.9808-5.9808 5.9808 5.9808 0 0 1 5.9808-5.9808 5.9808 5.9808 0 0 1 5.9808 5.9808zm1.503-0.037a7.5843 7.5843 0 0 1-7.5843 7.5843 7.5843 7.5843 0 0 1-7.5843-7.5843 7.5843 7.5843 0 0 1 7.5843-7.5843 7.5843 7.5843 0 0 1 7.5843 7.5843z" style="fill-rule:evenodd;fill:#414141"/>', '        <path d="m17.869 284.42v3.4127h-3.4081v1.6066h3.4081v3.438h1.6061v-3.438h3.4432v-1.6066h-3.4432v-3.4127z" style="fill-rule:evenodd;fill:#414141"/>', '        <path d="m24.614 281.39v-6.1305c0-1.6957-1.2841-2.6602-2.6602-2.6602h-18.412c-1.4547 0-2.7249 1.0223-2.7249 2.7249v14.986c0 1.2346 0.99768 2.6028 2.586 2.586h6.9542c-0.36184-0.63963-0.51495-1.0286-0.69323-1.6506h-6.4562c-0.29938 0-0.72246-0.40379-0.72246-0.72247v-1.8082l6.0428-6.7569 2.0296 2.0129 0.9605-1.3029-2.9734-3.1488-5.9885 6.7736v-11.426c0-0.24935 0.30766-0.63476 0.63476-0.63476h18.934c0.3592 0 0.84357 0.19284 0.84357 0.84357v5.2285c0.61147 0.22444 1.1564 0.59412 1.6454 1.0858z" style="fill:#414141"/>', '        <circle cx="17.869" cy="277.61" r="1.6891" style="fill-rule:evenodd;fill:#414141"/>', '    </g>', '</svg>'].join(''));
};
MediACore.creator['attachment-ico'] = function () {
  return _(['<svg class="attachment" width="1024" height="1024"  version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" >', '    <path d="M145.6 0C100.8 0 64 35.2 64 80v862.4C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z" fill="#8199AF"/>', '    <path d="M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z" fill="#617F9B"/>', '    <path d="M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z" fill="#fff"/>', '    <path d="m491.77 770.31c17.6-19.2 17.6-48 0-67.2s-48-17.6-65.6 0l-147.2 147.2c-17.6 17.6-17.6 48 0 65.6s48 19.2 65.6 0l91.2-89.6c4.8-4.8 4.8-12.8 0-17.6s-14.4-6.4-19.2 0l-57.6 56c-8 8-19.2 8-27.2 0s-8-20.8 0-28.8l56-56c20.8-20.8 54.4-20.8 75.2 0s20.8 54.4 0 75.2l-89.6 89.6c-33.6 33.6-88 33.6-123.2 0-33.6-33.6-33.6-88 0-121.6l147.2-147.2c33.6-33.6 89.6-33.6 123.2 0s33.6 88 0 121.6l-14.4 14.4c-1.6-14.4-6.4-28.8-16-41.6z" style="fill:#fff"/>', '    <path d="m130.09 23.864h504.75v182.93h-545.65v-140.08c0.34155-16.845 13.608-42.414 40.9-42.847z" style="fill-opacity:.29648;fill-rule:evenodd;fill:#fff"/>', '</svg>'].join(''));
};
MediACore.creator['attachment-ico'].property = {
  ext: {
    set: function set(value) {
      value = value || '';
      if (this.$ext) {
        this.$ext.selfRemove();
      }
      this.$ext = _Svg["default"].ShareInstance._('<text text-anchor="middle" x="321.39" y="170" font-size="145.76" style="fill:white;" >' + value + '</text>').addTo(this);
    },
    get: function get() {
      return this._ext || '';
    }
  }
};
MediACore.creator['times-ico'] = function () {
  return _(['<svg class="times" width="100" height="100" version="1.1" viewBox="0 0 26.458 26.458" xmlns="http://www.w3.org/2000/svg">', '    <g transform="translate(0 -270.54)">', '        <path d="m7.7013 276.49 5.4832 5.4832 5.5494-5.5494 1.7874 1.7874-5.5291 5.5291 5.4957 5.4957-1.754 1.754-5.5124-5.5124-5.5542 5.5542-1.7623-1.7623 5.5375-5.5375-5.5208-5.5208zm17.103 7.3351a11.558 11.558 0 0 1-11.558 11.558 11.558 11.558 0 0 1-11.558-11.558 11.558 11.558 0 0 1 11.558-11.558 11.558 11.558 0 0 1 11.558 11.558z" style="fill-rule:evenodd;"/>', '    </g>'].join(''));
};
MediACore.creator['download-ico'] = function () {
  return _(['<svg class="download" width="100mm" height="100mm" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">', '    <g transform="translate(0,-197)">', '        <path d="m44.888 209.14h13.982c1.1087 0.0459 2.2328 0.74137 2.317 2.3612v23.694h13.622c1.9742-0.18801 3.004 2.6244 1.9175 4.1118l-23.469 23.918c-0.876 0.77477-1.9993 0.77232-2.9362 0l-23.559-24.009c-0.86532-1.0422 0.11658-4.1953 2.3821-4.2047h13.268v-22.939c-0.08167-1.1772 0.78292-2.9507 2.4768-2.9312z" style="fill:#00c3e5"/>', '        <path d="m86.97 276.99a3.5027 3.5696 0 0 1-3.5027 3.5696 3.5027 3.5696 0 0 1-3.5027-3.5696 3.5027 3.5696 0 0 1 3.5027-3.5696 3.5027 3.5696 0 0 1 3.5027 3.5696zm-12.768 0a3.5027 3.5696 0 0 1-3.5027 3.5696 3.5027 3.5696 0 0 1-3.5027-3.5696 3.5027 3.5696 0 0 1 3.5027-3.5696 3.5027 3.5696 0 0 1 3.5027 3.5696zm-60.003-16.135h24.609c9.1206 13.508 17.573 12.942 26.609 0h23.839c2.8529 5e-3 3.5087 2.3205 3.4679 3.8227v18.953c0.04867 1.3083-1.5145 2.9901-2.7505 2.9832h-76.253c-1.049 0.0441-2.6554-1.4851-2.6306-3.1451l-1.56e-4 -18.792c0.0024-1.3549 0.50958-3.7927 3.1091-3.8227z" style="fill-rule:evenodd;fill:#00c3e5"/>', '    </g>', '</svg>'].join(''));
};
MediACore.creator['plus-ico'] = function () {
  return _('<svg class="_7oal" height="24" width="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><polygon points="-6,30 30,30 30,-6 -6,-6 "></polygon><path d="m18,11l-5,0l0,-5c0,-0.552 -0.448,-1 -1,-1c-0.5525,0 -1,0.448 -1,1l0,5l-5,0c-0.5525,0 -1,0.448 -1,1c0,0.552 0.4475,1 1,1l5,0l0,5c0,0.552 0.4475,1 1,1c0.552,0 1,-0.448 1,-1l0,-5l5,0c0.552,0 1,-0.448 1,-1c0,-0.552 -0.448,-1 -1,-1m-6,13c-6.6275,0 -12,-5.3725 -12,-12c0,-6.6275 5.3725,-12 12,-12c6.627,0 12,5.3725 12,12c0,6.6275 -5.373,12 -12,12" ></path></g></svg>');
};
_ACore["default"].install(MediaInput);
var _default = MediaInput;
exports["default"] = _default;

/***/ }),

/***/ 26155:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.Dropdown = Dropdown;
exports.Dropright = Dropright;
exports.HMenu = HMenu;
exports.HMenuItem = HMenuItem;
exports.MenuButton = MenuButton;
exports.VMenu = VMenu;
exports.VMenuItem = VMenuItem;
exports.VMenuLine = VMenuLine;
exports.VRootMenu = VRootMenu;
__webpack_require__(46538);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _BlurTrigger = _interopRequireDefault(__webpack_require__(17471));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function MenuButton() {
  this.$text = $('.absol-vmenu-button-text', this);
  this.$key = $('.absol-vmenu-button-key', this);
  this.$arrow = $('.absol-vmenu-arrow', this);
  this.$iconCtn = $('.absol-vmenu-button-ext-icon-container', this);
  _OOP["default"].drillProperty(this, this.$text, 'text', 'innerHTML');
  _OOP["default"].drillProperty(this, this.$key, 'key', 'innerHTML');
}
MenuButton.tag = 'menubutton';
MenuButton.render = function () {
  return _({
    tag: 'button',
    "class": 'absol-vmenu-button',
    child: [{
      "class": 'absol-vmenu-button-ext-icon-container',
      child: 'img.absol-vmenu-button-icon'
    }, '.absol-vmenu-button-text', '.absol-vmenu-button-key', {
      "class": 'absol-vmenu-arrow-container',
      child: 'span.absol-vmenu-arrow'
    }]
  });
};
MenuButton.property = {};
MenuButton.property.extendClasses = {
  set: function set(value) {
    var self = this;
    this.extendClasses.forEach(function (className) {
      self.removeClass(className);
    });
    this._extendClass = [];
    if (!value) return;
    if (typeof value == 'string') {
      value = value.split(/\s+/).filter(function (c) {
        return c.length > 0;
      });
    }
    if (value instanceof Array) {
      this._extendClass = value;
      this._extendClass.forEach(function (className) {
        self.addClass(className);
      });
    } else {
      throw new Error('Invalid extendClasses');
    }
  },
  get: function get() {
    return this._extendClass || [];
  }
};
MenuButton.property.icon = {
  set: function set(value) {
    this.$iconCtn.clearChild();
    this._icon = value;
    if (value) {
      _(value).addTo(this.$iconCtn);
    }
  },
  get: function get() {
    return this._icon;
  }
};
MenuButton.property.iconSrc = {
  set: function set(value) {
    if (value) this.icon = {
      tag: 'img',
      props: {
        src: value
      }
    };else this.icon = value;
  },
  get: function get() {
    return this.icon && this.icon.props && this.icon.props.src;
  }
};
MenuButton.property.extendStyle = {
  set: function set(value) {
    this.removeStyle(this._extendStyle || {});
    this._extendStyle = value || {};
    this.addStyle(this.extendStyle);
  },
  get: function get() {
    return this._extendStyle || {};
  }
};
_ACore["default"].install(MenuButton);

/***
 *
 * @extends Follower
 * @constructor
 */
function Dropdown() {
  this.$container = $('.absol-dropdown-content', this);
  this.$container.followTarget = this;
  this.$container.sponsorElement = this;
  this.$container.anchor = [1, 2, 6, 5];
}
Dropdown.tag = 'dropdown';
Dropdown.render = function () {
  return _({
    "class": ['absol-drop-hidden', 'absol-dropdown'],
    child: 'follower.absol-dropdown-content.as-bscroller'
  });
};
Dropdown.property = {};
Dropdown.property.show = {
  set: function set(value) {
    if (value) {
      this.removeClass('absol-drop-hidden');
      // ResizeSystem.update();
      if (this.$container.lastChild && this.$container.lastChild.$items) {
        this.$container.lastChild.$items.forEach(function (itemElt) {
          if (itemElt.autoFixParentSize) {
            itemElt.autoFixParentSize();
          }
        });
      }
      var aPst = this.findAvailablePosition();
      if (aPst.crampedHeight) {
        this.removeClass('overlap-top');
        // this.$container.followTarget = null;?
        this.$container.addStyle({
          'max-height': aPst.maxHeight + 'px'
        });
        this.$container.refollow();
        this.$container.updatePosition();
        this.$container.addStyle('top', this.getBoundingClientRect().top + aPst.posTop + 'px');
      } else {
        this.$container.removeStyle('max-height').removeStyle('top');
        this.$container.refollow();
        this.$container.updatePosition();
      }
    } else {
      this.addClass('absol-drop-hidden');
    }
  },
  get: function get() {
    return !this.hasClass('absol-drop-hidden');
  }
};
Dropdown.prototype.findAvailablePosition = function () {
  var outBound = _Dom["default"].traceOutBoundingClientRect(document.body);
  var containerBound = this.$container.getBoundingClientRect();
  var bound = this.getBoundingClientRect();
  var distTop = bound.top - outBound.top;
  var distLeft = bound.left - outBound.left;
  var distRight = -bound.right + outBound.right;
  var distBottom = -bound.bottom + outBound.bottom;
  var result = {};
  if (distLeft >= containerBound.width) result.left = true;
  if (distTop >= containerBound.height) result.top = true;
  if (distRight >= containerBound.width) result.right = true;
  if (distBottom >= containerBound.height) result.bottom = true;
  if (distRight + bound.width >= containerBound.width) result.overlapRight = true;
  if (distLeft + bound.width >= containerBound.width) result.overlapLeft = true;
  if (distBottom + bound.height >= containerBound.height) result.overlapBottom = true;
  if (distTop + bound.height >= containerBound.height) result.overlapTop = true;
  if (!result.overlapTop && !result.overlapBottom) {
    result.crampedHeight = true;
    result.maxHeight = outBound.height - 20;
    result.posTop = distBottom - Math.min(containerBound.height, result.maxHeight) + bound.height - 10;
  }
  return result;
};
Dropdown.prototype.addChild = function (child) {
  if (child instanceof Array) {
    for (var i = 0; i < child.length; ++i) {
      this.addChild(child[i]);
    }
  } else {
    if (!this.$trigger) {
      this["super"](child);
      this.$trigger = child;
    } else {
      this.$container.addChild(child);
    }
  }
};
Dropdown.prototype.clearChild = function () {
  if (this.$trigger) {
    this.$trigger.selfRemove();
    this.$trigger = undefined;
  }
  this.$container.clearChild();
};
Dropdown.prototype.init = function (props) {
  props = props || {};
  Object.assign(this, props);
};
function Dropright() {
  this.$container = $('.absol-dropright-content', this);
  this.$container.followTarget = this;
  this.$container.sponsorElement = this;
  this.$container.anchor = [0, 3, 7, 4];
}
Dropright.tag = 'dropright';
Dropright.render = function () {
  return _({
    "class": ['absol-drop-hidden', 'absol-dropright'],
    child: 'follower.absol-dropright-content.as-bscroller',
    data: {
      $trigger: undefined,
      $content: undefined,
      _isShow: false
    }
  });
};
Object.assign(Dropright.prototype, Dropdown.prototype);

//is the same
Dropright.prototype.addChild = Dropdown.prototype.addChild;
Dropright.prototype.clearChild = Dropdown.prototype.clearChild;
Dropright.property = Object.assign({}, Dropdown.property);
function VMenuLine() {
  return _('<div class="absol-vmenu-line"><div></div></div>');
}
VMenuLine.tag = 'VMenuLine'.toLowerCase();
function VMenuItem() {
  var thisVM = this;
  this.$dropper = $('dropright', this);
  this.$vmenu = $('vmenu', this);
  this.$button = $('menubutton', this);
  this.$text = thisVM.$button.$text;
  this.$key = thisVM.$button.$key;
  this.$arrow = thisVM.$button.$arrow;
  this.$iconCtn = thisVM.$button.$iconCtn;
  _OOP["default"].drillProperty(this, this.$button, ['text', 'extendClasses', 'extendStyle', 'key', 'icon', 'iconSrc']);
  _OOP["default"].drillProperty(this, this.$vmenu, ['activeTab']);
  this.eventHandler = _OOP["default"].bindFunctions(this, VMenuItem.eventHandler);
  this.$vmenu.on('press', this.eventHandler.pressItem, true);
  this.$button.on('click', this.eventHandler.clickButton, true);
  this.$button.on('mouseenter', this.eventHandler.enterButton, true);
  this._textMarginRight = 0;
}
VMenuItem.tag = 'VMenuItem'.toLowerCase();
VMenuItem.render = function () {
  return _({
    tag: 'dropright',
    extendEvent: ['press', 'enter'],
    child: ['menubutton', {
      tag: 'vmenu'
    }]
  });
};
VMenuItem.prototype.init = function (props) {
  Object.assign(this, props || {});
};
VMenuItem.prototype.autoFixParentSize = function () {
  var parentWidth = this.$dropper.getBoundingClientRect().width; // dropper is fixed parent content size
  if (!parentWidth) return;
  var buttonWidth = this.$button.getBoundingClientRect().width;
  var fontSize = this.$text.getFontSize();
  this._textMarginRight = parentWidth - buttonWidth + this._textMarginRight;
  this.$text.addStyle('margin-right', this._textMarginRight / fontSize + 'em');
};
VMenuItem.eventHandler = {};
VMenuItem.eventHandler.enterButton = function (event) {
  event.menuItem = this;
  var newEvent = _EventEmitter["default"].copyEvent(event);
  this.emit('enter', newEvent, this);
};
VMenuItem.eventHandler.pressItem = function (event) {
  var newEvent = _EventEmitter["default"].copyEvent(event, {
    target: this
  });
  this.emit('press', newEvent, this);
};
VMenuItem.eventHandler.clickButton = function (event) {
  event.menuDontHide = this.items && this.items.length > 0;
  event.menuItem = this;
  event.vmenuItem = this;
  var newEvent = _EventEmitter["default"].copyEvent(event, {
    target: this
  });
  this.emit('press', newEvent, this);
};
VMenuItem.property = {};
VMenuItem.property.items = {
  set: function set(items) {
    items = items || [];
    if (items.length > 0) {
      this.$arrow.addClass(['mdi', 'mdi-chevron-right']);
    } else {
      this.$arrow.removeClass(['mdi', 'mdi-chevron-right']);
    }
    this.$vmenu.items = items;
  },
  get: function get() {
    return this.$vmenu.items;
  }
};
VMenuItem.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('absol-menu-item-disabled');
    } else {
      this.removeClass('absol-menu-item-disabled');
    }
  },
  get: function get() {
    return this.hasClass('absol-menu-item-disabled');
  }
};
VMenuItem.property.hidden = {
  set: function set(value) {
    if (value) {
      this.addClass('absol-menu-item-hidden');
    } else {
      this.removeClass('absol-menu-item-hidden');
    }
  },
  get: function get() {
    return this.hasClass('absol-menu-item-hidden');
  }
};

/**
 * @extends AElement
 * @constructor
 */
function VMenu() {}
VMenu.tag = 'vmenu';
VMenu.render = function () {
  return _({
    "class": 'absol-vmenu',
    extendEvent: 'press'
  });
};
VMenu.property = {};
VMenu.property.activeTab = {
  set: function set(tabIndex) {
    this._activeTab = tabIndex;
    if (this.$items) {
      for (var i = 0; i < this.$items.length; ++i) {
        var item = this.$items[i];
        item.show = i == tabIndex && !item.disabled;
        item.activeTab = -1;
        if (i == tabIndex && !item.disabled) {
          item.$button && item.items && item.items.length > 0 && item.$button.addClass('absol-vmenu-button-hover');
        } else {
          item.$button && item.$button.removeClass('absol-vmenu-button-hover');
        }
      }
    }
  },
  get: function get() {
    return this._activeTab;
  }
};
VMenu.property.extendStyle = {
  set: function set(value) {
    this.removeStyle(this._extendStyle || {});
    this._extendStyle = value || {};
    this.addStyle(this.extendStyle);
  },
  get: function get() {
    return this._extendStyle || {};
  }
};
VMenu.property.extendClasses = {
  set: function set(value) {
    var self = this;
    this.extendClasses.forEach(function (className) {
      self.removeClass(className);
    });
    this._extendClass = [];
    if (!value) return;
    if (typeof value == 'string') {
      value = value.split(/\s+/).filter(function (c) {
        return c.length > 0;
      });
    }
    if (value instanceof Array) {
      this._extendClass = value;
      this._extendClass.forEach(function (className) {
        self.addClass(className);
      });
    } else {
      throw new Error('Invalid extendClasses');
    }
  },
  get: function get() {
    return this._extendClass || [];
  }
};
VMenu.eventHandler = {};
VMenu.eventHandler.enterItem = function (event) {
  var tabIndex = event.menuItem._tabIndex;
  this.activeTab = tabIndex;
};
VMenu.eventHandler.pressItem = function (event) {
  this.emit('press', _EventEmitter["default"].copyEvent(event, {
    target: this
  }), this);
};
VMenu.property.items = {
  set: function set(items) {
    this._childFromItems(items || []);
  },
  get: function get() {
    return this.$items;
  }
};
VMenu.prototype.init = function (props) {
  Object.assign(this, props || {});
};
VMenu.prototype._childFromItems = function (items) {
  this.clearChild();
  this.$items = items.map(function (item, index) {
    var itemElt;
    if (typeof item === 'string' && (item.substr(0, 1) === '-' || item.substr(0, 1) === '=')) {
      itemElt = _('vmenuline');
    } else if ((0, _Dom.isDomNode)(item)) {
      itemElt = item;
    } else if (item.child || item["class"] || item.tag || item.style || typeof item === 'string') {
      itemElt = _(item);
    } else {
      itemElt = _({
        tag: 'vmenuitem',
        props: Object.assign({
          _tabIndex: index
        }, item),
        on: {
          enter: {
            callback: this.eventHandler.enterItem,
            cap: true
          },
          press: {
            callback: this.eventHandler.pressItem,
            cap: true
          }
        }
      });
    }
    this.addChild(itemElt);
    return itemElt;
  }.bind(this));
  //todo
};

function HMenuItem() {
  this.blurTrigger = null;
  this.$vmenu = $('vmenu', this);
  this.$dropDown = this;
  this.$button = $('button.absol-hmenu-button', this);
  _OOP["default"].drillProperty(this, this.$button, 'text', 'innerHTML');
  _OOP["default"].drillProperty(this, this.$vmenu, 'items');
  _OOP["default"].drillProperty(this, this.$vmenu, 'activeTab');
  this.$button.on('click', this.eventHandler.clickButton);
  this.$button.on('mouseenter', this.eventHandler.enterButton, true);
  this.$vmenu.on('press', this.eventHandler.pressItem, true);

  //property show not need because dropdown is itself
  return this;
}
HMenuItem.tag = 'HMenuItem'.toLowerCase();
HMenuItem.render = function () {
  return _({
    tag: 'dropdown',
    extendEvent: ['press', 'enter'],
    child: ['button.absol-hmenu-button', 'vmenu']
  });
};
HMenuItem.eventHandler = {};
HMenuItem.eventHandler.clickButton = function (event) {
  event.menuItem = this;
  event.hmenuItem = this;
  this.emit('press', _EventEmitter["default"].copyEvent(event, {
    target: this
  }), this);
};
HMenuItem.eventHandler.enterButton = function (event) {
  event.menuItem = this;
  this.emit('enter', _EventEmitter["default"].copyEvent(event, {
    target: this
  }), this);
};
HMenuItem.eventHandler.pressItem = function (event) {
  this.emit('press', _EventEmitter["default"].copyEvent(event, {
    target: this
  }), this);
};
HMenuItem.property = {};
HMenuItem.property.disabled = VMenuItem.property.disabled;
HMenuItem.property.hidden = VMenuItem.property.hidden;
HMenuItem.prototype.init = function (props) {
  props = props || {};
  Object.assign(this, props);
};

/***
 * @extends AElement
 * @constructor
 */
function HMenu() {}
HMenu.tag = 'hmenu';
HMenu.render = function () {
  return _({
    "class": 'absol-hmenu',
    extendEvent: ['press', 'enter', 'activetab', 'cancel']
  });
};
HMenu.eventHandler = {};
HMenu.eventHandler.pressItem = function (event) {
  /**
   * this.activeTab can be undefined
   * undefine >= 0 => false
   * undefine < 0 => false
   */

  if (event.menuItem.items && event.menuItem.items.length > 0 && !(this.activeTab >= 0)) {
    this.activeTab = event.menuItem._tabIndex;
  } else {
    event.isLeaf = !event.menuItem.items || !event.menuItem.items.length;
    this.emit('press', event, this);
  }
};
HMenu.eventHandler.enterItem = function (event) {
  if (this.activeTab >= 0) {
    this.activeTab = event.menuItem._tabIndex;
  }
};
HMenu.eventHandler.clickSomewhere = function (event) {
  // if (EventEmitter.hitElement(this, event)) return;
  this.activeTab = -1;
  // window.removeEventListener('blur', this.eventHandler.clickSomewhere);
};

HMenu.prototype._childFromItems = function (items) {
  this.clearChild();
  this.$items = items.map(function (item, index) {
    var res = _({
      tag: 'hmenuitem',
      props: Object.assign({
        _tabIndex: index
      }, item),
      on: {
        press: {
          callback: this.eventHandler.pressItem,
          cap: true
        },
        enter: {
          callback: this.eventHandler.enterItem,
          cap: true
        }
      }
    });
    this.addChild(res);
    return res;
  }.bind(this));
};
HMenu.prototype.init = function (props) {
  Object.assign(this, props || {});
};
HMenu.property = {};
HMenu.property.items = {
  set: function set(items) {
    this._childFromItems(items || []);
  },
  get: function get() {
    return this.$items;
  }
};
HMenu.property.activeTab = {
  /***
   * @this HMenu
   * @param tabIndex
   */
  set: function set(tabIndex) {
    var lastValue = this._activeTab;
    this._activeTab = tabIndex;
    for (var i = 0; i < this.$items.length; ++i) {
      var item = this.$items[i];
      item.show = i == tabIndex && !item.disabled;
      item.activeTab = -1;
      if (i == tabIndex && !item.disabled) {
        item.$button && item.items && item.items.length > 0 && item.$button.addClass('absol-hmenu-button-hover');
      } else {
        item.$button && item.$button.removeClass('absol-hmenu-button-hover');
      }
    }
    if (!(lastValue >= 0) && this._activeTab >= 0) {
      if (this.blurTrigger) {
        this.blurTrigger.destroy();
      }
      this.blurTrigger = new _BlurTrigger["default"]([this], "click", this.eventHandler.clickSomewhere, 100, 10);
    } else if (lastValue >= 0 && !(this._activeTab >= 0)) {
      if (this.blurTrigger) {
        this.blurTrigger.destroy();
        this.blurTrigger = null;
      }
    }
    if (lastValue >= 0) {
      if (tabIndex >= 0 && tabIndex != lastValue) {
        this.emit('activetab', {
          type: 'activetab',
          tabIndex: tabIndex,
          target: this
        }, this);
      } else if (!(tabIndex >= 0)) {
        this.emit('cancel', {
          type: 'cancel',
          lastActiveIndex: lastValue,
          target: this
        }, this);
      }
    } else {
      if (tabIndex >= 0) {
        this.emit('activetab', {
          type: 'activetab',
          tabIndex: tabIndex,
          target: this
        }, this);
      }
    }
  },
  get: function get() {
    return this._activeTab;
  }
};

/***
 * @extends AElement
 * @constructor
 */
function VRootMenu() {
  var _this = this;
  this._items = [];
  this.$attachhook = _({
    tag: 'attachhook',
    props: {
      prevWidth: 0,
      requestUpdateSize: function requestUpdateSize() {
        var newWidth = _this.getBoundingClientRect().width;
        if (newWidth === _this.$attachhook.prevWidth) return;
        _this.$attachhook.prevWidth = newWidth;
        Array.prototype.forEach.call(_this.childNodes, function (elt) {
          if (elt.autoFixParentSize) {
            elt.autoFixParentSize();
          }
        });
      }
    },
    on: {
      attached: function attached() {
        _ResizeSystem["default"].add(_this.$attachhook);
        _this.$attachhook.requestUpdateSize();
      }
    }
  }).addTo(this);
  this.items = [];
}
VRootMenu.tag = 'VRootMenu'.toLowerCase();
VRootMenu.render = function () {
  return _({
    "class": ['as-v-root-menu'],
    extendEvent: ['press', 'enter', 'activetab', 'cancel']
  });
};
VRootMenu.prototype._childFromItems = function (items) {
  var _this2 = this;
  var thisM = this;
  while (this.lastChild && this.lastChild !== this.$attachhook) {
    this.lastChild.remove();
  }
  while (this.firstChild && this.firstChild !== this.$attachhook) {
    this.firstChild.remove();
  }
  this.$items = items.map(function (item, i) {
    var itemElt;
    if (typeof item === 'string' && (item.substr(0, 1) === '-' || item.substr(0, 1) === '=')) {
      itemElt = _('vmenuline');
    } else if ((0, _Dom.isDomNode)(item)) {
      itemElt = item;
    } else if (item.child || item["class"] || item.tag || item.style || typeof item === 'string') {
      itemElt = _(item);
    } else {
      itemElt = _({
        tag: 'vmenuitem',
        props: item,
        on: {
          enter: thisM.eventHandler.enterItem,
          press: thisM.eventHandler.pressItem
        }
      });
    }
    itemElt._tabIndex = i;
    thisM.addChild(itemElt);
    return itemElt;
  });
  this.$attachhook.prevWidth = 0;
  this.$attachhook.requestUpdateSize();
  (0, _ACore.$$)('img', this).filter(function (x) {
    return !!x.getAttribute('src') && !x.classList.contains('absol-vmenu-button-icon');
  }).forEach(function (elt) {
    (0, _Dom.waitImageLoaded)(elt).then(function () {
      return _this2.$attachhook.requestUpdateSize();
    });
  });
};
VRootMenu.property = Object.assign({}, HMenu.property);
VRootMenu.eventHandler = Object.assign({}, HMenu.eventHandler);
_ACore["default"].install([HMenu, VMenuItem, VMenu, Dropright, VMenuLine, Dropdown, HMenuItem, VRootMenu]);

/***/ }),

/***/ 11674:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
__webpack_require__(40210);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function MessageDialog() {
  this.$header = (0, _ACore.$)('.as-message-dialog-header', this);
  this.$title = (0, _ACore._)({
    tag: 'span',
    "class": 'as-message-dialog-title',
    child: {
      text: ''
    }
  });
  this.$body = (0, _ACore.$)('.as-message-dialog-body', this);
  this.$footer = (0, _ACore.$)('.as-message-dialog-footer', this);
  this.$actionBtns = [];
}
MessageDialog.tag = 'MessageDialog'.toLowerCase();
MessageDialog.render = function () {
  return (0, _ACore._)({
    extendEvent: ['action'],
    "class": 'as-message-dialog',
    child: [{
      "class": 'as-message-dialog-header'
    }, {
      "class": 'as-message-dialog-body'
    }, {
      "class": 'as-message-dialog-footer'
    }]
  });
};
['addChild', 'removeChild', 'clearChild', 'addChildBefore', 'addChildAfter'].forEach(function (key) {
  MessageDialog.prototype[key] = function () {
    this.$body[key].apply(this.$body, arguments);
    return this;
  };
});
MessageDialog.prototype._makeActionBtn = function (action) {
  var _this = this;
  var button = (0, _ACore._)({
    tag: _FlexiconButton["default"].tag,
    "class": action["class"] || [],
    props: {
      text: action.text || action.name,
      icon: action.icon || null
    },
    on: {
      click: function click(event) {
        _this.emit('action', {
          type: 'action',
          target: _this,
          originalEvent: event,
          action: action
        }, _this);
      }
    }
  });
  if (action.name) button.attr('data-name', action.name);
  return button;
};
MessageDialog.property = {};
MessageDialog.property.dialogActions = {
  /***
   * @this MessageDialog
   * @param actions
   */
  set: function set(actions) {
    var _this2 = this;
    this._actions = actions || [];
    this.$actionBtns.forEach(function (button) {
      return button.remove();
    });
    this.$actionBtns = this._actions.map(function (action) {
      return _this2._makeActionBtn(action);
    });
    this.$footer.addChild(this.$actionBtns);
  },
  get: function get() {
    return this._actions;
  }
};
MessageDialog.property.dialogTitle = {
  set: function set(value) {
    this._dialogTitle = value;
    this.$title.firstChild.data = '';
    this.$title.attr('data-ml-key', undefined);
    if (typeof value === "string") {
      this.$title.firstChild.data = value;
    } else if (value && value.mlKey) {
      this.$title.firstChild.data = '';
      this.$title.attr('data-ml-key', value.mlKey);
    }
    if (value && !this.$title.parentElement) {
      this.$header.addChild(this.$title);
    } else if (!value && this.$title.parentElement) {
      this.$title.remove();
    }
  },
  get: function get() {
    return this._dialogTitle;
  }
};
_ACore["default"].install(MessageDialog);
var _default = MessageDialog;
exports["default"] = _default;

/***/ }),

/***/ 4061:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(70603);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var $ = _ACore["default"].$;
var _ = _ACore["default"]._;
function Modal() {
  this._contentAlign = [];
  this.contentAlign = 'middle center';
  this.$content = $('.as-modal-content', this);
}
Modal.tag = 'modal';
Modal.render = function () {
  return _({
    "class": 'as-modal',
    child: '.as-modal-content'
  });
};
['findChildBefore', 'findChildAfter', 'removeChild', 'clearChild', 'addChild'].forEach(function (key) {
  Modal.prototype[key] = function () {
    this.$content[key].apply(this.$content, arguments);
  };
});
Modal.prototype.getChildren = function () {
  return this.$content.children;
};
Modal.property = {};
Modal.property.show = {
  set: function set(value) {
    if (value) this.removeClass('as-hidden');else this.addClass('as-hidden');
  },
  get: function get() {
    return !this.hasClass('as-hidden');
  }
};
Modal.property.contentAlign = {
  set: function set(value) {
    var thisM = this;
    this._contentAlign.forEach(function (name) {
      thisM.removeClass('as-' + name);
    });
    value = value || '';
    if (typeof value === 'string') {
      this._contentAlign = value.split(/\s+/);
    } else if (value instanceof Array) {
      this._contentAlign = value;
    } else {
      throw new Error("Invalid contentAlign!");
    }
    var thisM = this;
    this._contentAlign.forEach(function (name) {
      thisM.addClass('as-' + name);
    });
  },
  get: function get() {
    return this._contentAlign.join(' ');
  }
};
_ACore["default"].install(Modal);
var _default = Modal;
exports["default"] = _default;

/***/ }),

/***/ 59346:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _MultiSelectMenu = _interopRequireDefault(__webpack_require__(63176));
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _CheckListBox = __webpack_require__(62896);
var _EventEmitter = _interopRequireWildcard(__webpack_require__(46833));
var _Dom = __webpack_require__(64821);
var _utils = __webpack_require__(84512);
var _Array = __webpack_require__(40411);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _attribute = __webpack_require__(18144);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _MultiLanguageCSS = __webpack_require__(89074);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _MCheckListModal = _interopRequireDefault(__webpack_require__(30058));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var hitItem = function hitItem(event) {
  var target = event.target;
  for (var i = 0; i < 5 && target; ++i) {
    if (target.hasClass && target.hasClass('absol-selectbox-item')) return true;
    target = target.parentElement;
  }
  return false;
};
var hitClose = function hitClose(event) {
  var target = event.target;
  if (target.hasClass && target.hasClass('absol-selectbox-item-close')) return true;
  target = target.parentElement;
  return !!(target.hasClass && target.hasClass('absol-selectbox-item-close'));
};

/***
 * @extends AElement
 * @constructor
 */
function MultiCheckMenu() {
  (0, _MultiLanguageCSS.loadLanguageModule)();
  this.addClass('as-multi-check-menu');

  // this.on('click', this.eventHandler.click);
  /***
   * @type {CheckListBox|MCheckListModal}
   */
  this.$selectlistBox = (0, _ACore._)({
    tag: _BrowserDetector["default"].isMobile ? _MCheckListModal["default"] : _CheckListBox.CheckListBox,
    //use new version//TODO: in process
    props: {
      anchor: [1, 6, 2, 5]
    }
  });
  (0, _OOP.drillProperty)(this, this.$selectlistBox, 'debug');
  this.addStyle('--as-width-limit', Math.max(140, this.$selectlistBox.widthLimit || 0) + 'px');
  this.$itemCtn = (0, _ACore.$)('.as-multi-select-menu-item-ctn', this);
  this.$attachhook = (0, _ACore.$)('attachhook', this).on('attached', this.eventHandler.attached);
  this.$attachhook.requestUpdateSize = this.updateSize.bind(this);
  this.boxCtrl = new MSMBoxController(this);
  this.itemsViewCtrl = new MSMItemsViewController(this);
  _OOP["default"].drillProperty(this, this.boxCtrl, 'isFocus');
  _OOP["default"].drillProperty(this, this.$selectlistBox, 'enableSearch');
  _OOP["default"].drillProperty(this, this.itemsViewCtrl, '$items'); //adapt
  this.commitedValues = []; //commit value

  this.$selectlistBox.followTarget = this;
  this.$selectlistBox.sponsorElement = this;
  this.disableClickToFocus = false;
  this.orderly = true; //always true
  this.itemFocusable = false;

  /**
   * @type {boolean}
   * @memberof MultiCheckMenu#
   * @name disabled
   */

  /**
   * @type {boolean}
   * @memberof MultiCheckMenu#
   * @name readOnly
   */

  /**
   * @type {Array<number|null|string|Date>}
   * @memberof MultiCheckMenu#
   * @name values
   */
}

MultiCheckMenu.tag = 'MultiCheckMenu'.toLowerCase();
MultiCheckMenu.render = _MultiSelectMenu["default"].render;
Object.assign(MultiCheckMenu.prototype, _MultiSelectMenu["default"].prototype);
MultiCheckMenu.property = Object.assign({}, _MultiSelectMenu["default"].property);
MultiCheckMenu.eventHandler = Object.assign({}, _MultiSelectMenu["default"].eventHandler);
delete MultiCheckMenu.property.isFocus;
delete MultiCheckMenu.property.orderly;
MultiCheckMenu.prototype.styleHandlers = {};
MultiCheckMenu.prototype.styleHandlers.maxWidth = function (value) {
  var parsedValue = (0, _attribute.parseMeasureValue)(value);
  if (parsedValue.unit === 'px') {
    this.addClass('as-has-max-width');
    this.addStyle('--max-width', value);
  } else {
    this.removeClass('as-has-max-width');
  }
};
MultiCheckMenu.prototype.styleHandlers['max-width'] = MultiCheckMenu.prototype.styleHandlers.maxWidth;
MultiCheckMenu.prototype.styleHandlers.width = function (value) {
  var parsedValue = (0, _attribute.parseMeasureValue)(value);
  if (parsedValue.unit === 'px') {
    this.addClass('as-has-max-width');
    this.addStyle('--max-width', value);
    this.style.width = value;
  } else {
    this.removeClass('as-has-max-width');
  }
};

/**
 * @this MultiCheckMenu
 * @param value
 */
MultiCheckMenu.prototype.styleHandlers.maxHeight = function (value) {
  var psValue = (0, _attribute.parseMeasureValue)(value);
  if (psValue) {
    switch (psValue.unit) {
      case 'px':
        psValue.value = Math.min(psValue.value, 90);
        break;
      case 'em':
      case 'rem':
        psValue.value = Math.min(psValue.value, 90 / 14);
        break;
    }
    this.$itemCtn.addStyle('max-height', psValue.value + psValue.unit);
  } else {
    this.$itemCtn.removeStyle('max-height');
  }
};
MultiCheckMenu.prototype.styleHandlers['max-height'] = MultiCheckMenu.prototype.styleHandlers.maxHeight;
MultiCheckMenu.prototype.styleHandlers.hidden = function (value) {
  if (value === 'hidden') {
    this.style.overflow = 'hidden';
    this.$itemCtn.style.overflow = 'hidden';
  } else {
    this.style.overflow = '';
    this.$itemCtn.style.overflow = '';
  }
};
MultiCheckMenu.prototype.addStyle = function (arg0, arg1) {
  if (typeof arg0 === "string" && this.styleHandlers[arg0]) {
    this.styleHandlers[arg0].apply(this, Array.prototype.slice.call(arguments, 1));
    return this;
  } else {
    return _AElement["default"].prototype.addStyle.apply(this, arguments);
  }
};
MultiCheckMenu.prototype.removeStyle = function (arg0) {
  if (typeof arg0 === "string" && this.styleHandlers[arg0]) {
    this.styleHandlers[arg0].call(this, '');
    return this;
  } else {
    return _AElement["default"].prototype.removeStyle.apply(this, arguments);
  }
};
MultiCheckMenu.prototype._updateOverflow = function () {
  //todo: calc item size before render
  var bound, i;
  var fromIdx = Infinity;
  if (this.getComputedStyleValue('overflow') === 'hidden') {
    bound = this.getBoundingClientRect();
    if (bound.width === 0) return;
    this.$itemCtn.removeClass('as-has-more');
    var hasMore = false;
    var elt;
    for (i = 0; i < this.$itemCtn.childNodes.length; ++i) {
      elt = this.$itemCtn.childNodes[i];
      if (!hasMore) {
        elt.removeStyle('display');
        var cBound = elt.getBoundingClientRect();
        if (cBound.bottom > bound.bottom) {
          hasMore = true;
          fromIdx = i - 1;
          break;
        }
      }
    }
    if (hasMore) {
      this.$itemCtn.addClass('as-has-more');
      for (i = 0; i < this.$itemCtn.childNodes.length; ++i) {
        elt = this.$itemCtn.childNodes[i];
        if (i > 0 && i >= fromIdx) {
          elt.addStyle('display', 'none');
        } else {
          elt.removeStyle('display');
        }
      }
    } else {
      for (i = 0; i < this.$itemCtn.childNodes.length; ++i) {
        elt = this.$itemCtn.childNodes[i];
        elt.removeStyle('display');
      }
    }
  }
};
MultiCheckMenu.property.values = {
  set: function set(values) {
    if (values === undefined || values === null) values = [];else if (!Array.isArray(values)) values = [values];
    this.$selectlistBox.values = values;
    this.commitedValues = this.$selectlistBox.values;
    this.itemsViewCtrl.update();
  },
  get: function get() {
    return this.commitedValues;
  }
};
MultiCheckMenu.property.items = {
  /**
   * @this MultiCheckMenu
   * @param items
   */
  set: function set(items) {
    this.$selectlistBox.items = items;
    this.commitedValues = this.$selectlistBox.values;
    this.addStyle('--list-min-width', Math.max(140, this.$selectlistBox._estimateWidth || 0) + 'px');
    this.itemsViewCtrl.update();
  },
  get: function get() {
    return this.$selectlistBox.items;
  }
};
MultiCheckMenu.property.placeholder = {
  set: function set(value) {
    if (typeof value === "string") value = value.trim();
    if (value) {
      this.$itemCtn.attr('data-placeholder', value + '');
    } else {
      this.$itemCtn.attr('data-placeholder', null);
    }
  },
  get: function get() {
    return this.$itemCtn.attr('data-placeholder') || '';
  }
};
MultiCheckMenu.prototype.updateSize = function () {
  var bound;
  if (this.boxCtrl.isFocus) {
    bound = this.getBoundingClientRect();
    if (!_BrowserDetector["default"].isMobile) this.$selectlistBox.addStyle('min-width', Math.max(bound.width, this.$selectlistBox.getFontSize() * 18.5) + 'px');
    this.$selectlistBox.refollow();
    this.$selectlistBox.updatePosition();
  }
};
MultiCheckMenu.prototype.findItemsByValue = function (value) {
  return this.$selectlistBox.findItemsByValue(value);
};
MultiCheckMenu.prototype.findItemByValue = function (value) {
  return this.$selectlistBox.findItemByValue(value);
};
MultiCheckMenu.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};

/***
 * call after close checklistbox
 * @param event
 */

MultiCheckMenu.eventHandler.selectListBoxPressItem = function (event) {
  console.log('press');
  var prevValues = this.commitedValues;
  var prevDict = prevValues.reduce(function (ac, cr) {
    ac[cr + ''] = cr;
    return ac;
  }, {});
  this.$selectlistBox.updatePosition();
  var curValues = this.$selectlistBox.values;
  var changed = false;
  var curDict = curValues.reduce(function (ac, cr) {
    ac[cr + ''] = cr;
    return ac;
  }, {});
  this.commitedValues = curValues.slice();
  prevValues.forEach(function (value) {
    if (value + '' in curDict) return;
    var holders = this.$selectlistBox.findItemsByValue(value);
    if (!holders || holders.length === 0) return;
    var item = holders[0].item;
    this.emit('remove', Object.assign({}, event, {
      type: 'remove',
      target: this,
      value: item.value,
      data: item,
      itemData: item
    }), this);
    changed = true;
  }.bind(this));
  curValues.forEach(function (value) {
    if (value + '' in prevDict) return;
    var holders = this.$selectlistBox.findItemsByValue(value);
    if (!holders || holders.length === 0) return;
    var item = holders[0].item;
    this.emit('add', Object.assign({}, event, {
      type: 'add',
      target: this,
      value: item.value,
      data: item,
      itemData: item
    }), this);
    changed = true;
  }.bind(this));
  this._updateItems();
  this.isFocus = false;
  if (changed) this.emit('change', Object.assign({}, event, {
    type: 'change',
    action: 'submit',
    target: this,
    values: this.values
  }), this);
};
_ACore["default"].install(MultiCheckMenu);
var _default = MultiCheckMenu;
/**
 *
 * @param {MultiCheckMenu} elt
 * @constructor
 */
exports["default"] = _default;
function MSMItemsViewController(elt) {
  this.elt = elt;
  this.$items = [];
}
MSMItemsViewController.prototype.share = {
  pool: [],
  pressCloseEventHandle: function pressCloseEventHandle(event) {
    var parentElt = this.$parent;
    if (!parentElt) return;
    parentElt.itemsViewCtrl.ev_pressCloseItem(this, event);
  },
  pressHandler: function pressHandler(event) {
    var parentElt = this.$parent;
    if (!parentElt) return;
    parentElt.itemsViewCtrl.ev_pressItem(this, event);
  }
};
MSMItemsViewController.prototype.revokeResource = function () {
  delete this.elt;
};
MSMItemsViewController.prototype.makeItem = function () {
  return (0, _ACore._)({
    tag: 'selectboxitem',
    on: {
      close: this.share.pressCloseEventHandle,
      press: this.share.pressHandler
    }
  });
};
MSMItemsViewController.prototype.releaseItem = function (itemElt) {
  this.share.pool.push(itemElt);
  itemElt.$parent = null;
};
MSMItemsViewController.prototype.requireItem = function () {
  var itemElt;
  if (this.share.pool.length > 0) {
    itemElt = this.share.pool.pop();
  } else {
    itemElt = this.makeItem();
  }
  itemElt.$parent = this.elt;
  return itemElt;
};
MSMItemsViewController.prototype.requireListLength = function (n) {
  if (!(0, _utils.isNaturalNumber)(n)) n = 0;
  var itemElt;
  while (this.$items.length < n) {
    itemElt = this.requireItem();
    this.elt.$itemCtn.addChild(itemElt);
    this.$items.push(itemElt);
  }
  while (this.$items.length > n) {
    itemElt = this.$items.pop();
    this.elt.$itemCtn.removeChild(itemElt);
    this.releaseItem(itemElt);
  }
};
MSMItemsViewController.prototype.assignItems = function (items) {
  for (var i = 0; i < this.$items.length && i < items.length; ++i) {
    this.$items[i].data = items[i];
  }
};
MSMItemsViewController.prototype.viewItems = function (items) {
  var cBound = this.elt.getBoundingClientRect();
  this.requireListLength(items.length);
  this.assignItems(items);
  setTimeout(this.elt._updateOverflow.bind(this.elt), 10);
  setTimeout(this.elt._updateOverflow.bind(this.elt), 100);
  setTimeout(this.elt._updateOverflow.bind(this.elt), 150);
  var nBound = this.elt.getBoundingClientRect();
  if (nBound.width !== cBound.width || nBound.height !== cBound.height) {
    _ResizeSystem["default"].updateUp(this.elt);
  }
};
MSMItemsViewController.prototype.viewItemsByIndexes = function (indexes) {
  var items = [];
  var item;
  for (var i = 0; i < indexes.length; ++i) {
    item = this.elt.$selectlistBox.getItemByIndex(indexes[i]);
    if (item) items.push(item);
  }
  this.viewItems(items);
};
MSMItemsViewController.prototype.viewItemsByValues = function (values) {
  values = values || [];
  var items = [];
  var holders;
  for (var i = 0; i < values.length; ++i) {
    holders = this.elt.$selectlistBox.findItemHoldersByValue(values[i]);
    if (holders) {
      holders = holders.map(function (hd) {
        return hd.item;
      });
      items = items.concat(holders);
    }
  }
  this.viewItems(items);
};
MSMItemsViewController.prototype.update = function () {
  this.viewItemsByValues(this.elt.values);
};
MSMItemsViewController.prototype.ev_pressCloseItem = function (itemElt, event) {
  var values = this.elt.$selectlistBox.values;
  var value = itemElt.value;
  var newValues = values.filter(function (x) {
    return x !== value;
  });
  var data = itemElt.data;
  this.elt.$selectlistBox.values = newValues;
  if (this.elt.boxCtrl.isFocus) {
    this.viewItemsByValues(newValues);
  } else {
    this.elt.commitedValues = this.elt.$selectlistBox.values;
    this.update();
    this.elt.emit('change', {
      type: 'change',
      action: 'remove',
      data: data,
      value: value,
      target: this.elt
    });
  }
};
MSMItemsViewController.prototype.ev_pressItem = function (itemElt, event) {
  if (!this.disableClickToFocus && this.itemFocusable) {
    this.elt.$selectlistBox.viewListAtItem(itemElt.data);
    //todo: focus
  }
};

Object.defineProperty(MSMItemsViewController.prototype, 'disableClickToFocus', {
  set: function set(value) {
    if (value) {
      this.elt.addClass('as-disable-click-to-focus');
    } else {
      this.elt.removeClass('as-disable-click-to-focus');
    }
  },
  get: function get() {
    return this.elt.hasClass('as-disable-click-to-focus');
  }
});
Object.defineProperty(MSMItemsViewController.prototype, 'itemFocusable', {
  set: function set(value) {
    if (value) {
      this.elt.addClass('as-item-focusable');
    } else {
      this.elt.removeClass('as-item-focusable');
    }
    this._updateFocusItem();
  },
  get: function get() {
    return this.elt.hasClass('as-item-focusable');
  }
});
Object.defineProperty(MSMItemsViewController.prototype, 'activeValue', {
  set: function set(value) {
    this._activeValue = value;
    if (this.itemFocusable) {
      this._updateFocusItem();
      //todo
    }
  },

  get: function get() {
    return this._activeValue;
  }
});

/**
 *
 * @param {MultiCheckMenu} elt
 * @constructor
 */
function MSMBoxController(elt) {
  var _this = this;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) _this[key] = _this[key].bind(_this);
  });
  this.elt = elt;
  if (this.elt.$selectlistBox.cancelWaiting) this.elt.$selectlistBox.cancelWaiting();
  this.lockOpen = false;
  this.elt.on('mousedown', this.ev_click);
  this.elt.$selectlistBox.on({
    preupdateposition: this.ev_preUpdateListPosition,
    change: this.ev_listChange,
    cancel: this.ev_listCancel,
    close: this.ev_listClose
  });
}
Object.defineProperty(MSMBoxController.prototype, 'isFocus', {
  /**
   * @this MSMBoxController
   * @returns {*}
   */
  set: function set(value) {
    value = !!value;
    if (value) {
      this.open();
    } else {
      this.close();
    }
  },
  /**
   * @this MSMBoxController
   * @returns {*}
   */
  get: function get() {
    return this.elt.hasClass('as-focus');
  }
});
MSMBoxController.prototype.open = function () {
  var _this2 = this;
  if (this.lockOpen || this.elt.disabled || this.elt.readOnly) return;
  if (this.elt.hasClass('as-focus')) return;
  this.elt.addClass('as-focus');
  this.elt.$selectlistBox.addTo(document.body);
  this.elt.off('mousedown', this.ev_click);
  var bound = this.elt.getBoundingClientRect();
  if (!_BrowserDetector["default"].isMobile)
    // not modal
    this.elt.$selectlistBox.addStyle('min-width', Math.max(bound.width, this.elt.$selectlistBox.getFontSize() * 18.5) + 'px');
  this.elt.$selectlistBox.followTarget = this.elt;
  this.addListennerTO = setTimeout(function () {
    document.addEventListener('mousedown', _this2.ev_mousedownOut);
    if (!_BrowserDetector["default"].isMobile) {
      _this2.elt.$selectlistBox.focus();
      _this2.elt.$selectlistBox.viewListAtFirstSelected();
    }
  }, 50);
};
MSMBoxController.prototype.close = function () {
  if (!this.elt.hasClass('as-focus')) return;
  this.elt.removeClass('as-focus');
  this.elt.$selectlistBox.resetSearchState();
  this.elt.$selectlistBox.selfRemove();
  clearTimeout(this.addListennerTO);
  document.removeEventListener('mousedown', this.ev_mousedownOut);
  this.elt.on('mousedown', this.ev_click);
  var values = this.elt.$selectlistBox.values;
  if (!(0, _Array.arrayCompare)(values, this.elt.commitedValues)) {
    this.elt.commitedValues = values;
    this.elt.emit('change', Object.assign({}, event, {
      type: 'change',
      action: 'submit',
      target: this
    }), this);
  }
};
MSMBoxController.prototype.ev_click = function (event) {
  if (hitClose(event)) return;
  this.open();
};
MSMBoxController.prototype.ev_preUpdateListPosition = function () {
  var bound = this.elt.getBoundingClientRect();
  var screenSize = (0, _Dom.getScreenSize)();
  var availableTop = bound.top - 5;
  var availableBot = screenSize.height - 5 - bound.bottom;
  this.elt.$selectlistBox.addStyle('--max-height', Math.max(availableBot, availableTop) + 'px');
  var outBound = (0, _Dom.traceOutBoundingClientRect)(this.elt);
  if (bound.bottom < outBound.top || bound.top > outBound.bottom || bound.right < outBound.left || bound.left > outBound.right) {
    if (!_BrowserDetector["default"].isMobile) this.close();
  }
};
MSMBoxController.prototype.ev_listChange = function (event) {
  var _this3 = this;
  setTimeout(function () {
    _this3.elt.itemsViewCtrl.viewItems(_this3.elt.$selectlistBox.selectedItems);
  }, 1);
};
MSMBoxController.prototype.ev_listCancel = function () {
  this.elt.$selectlistBox.values = this.elt.commitedValues;
  this.close();
  this.elt.itemsViewCtrl.update();
};
MSMBoxController.prototype.ev_listClose = function (event) {
  var newValues = this.elt.$selectlistBox.values;
  if (!(0, _Array.arrayCompare)(this.elt.commitedValues, newValues)) {
    this.elt.commitedValues = newValues;
    this.elt.emit('change', Object.assign({}, event, {
      type: 'change',
      target: this.elt,
      originalEvent: event.originalEvent || event
    }));
  }
  this.elt.itemsViewCtrl.update();
  this.close();
};
MSMBoxController.prototype.ev_mousedownOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.elt.$selectlistBox, event)) return;
  if (!this.elt.disableClickToFocus && this.elt.itemFocusable && hitItem(event)) return;
  this.lockOpen = true;
  this.close();
  document.addEventListener('mouseup', this.ev_mouseupOut);
};
MSMBoxController.prototype.ev_mouseupOut = function () {
  var _this4 = this;
  setTimeout(function () {
    _this4.lockOpen = false;
  }, 50);
};
_ACore["default"].install(MultiCheckMenu);

/***/ }),

/***/ 77361:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _ExpTree = _interopRequireDefault(__webpack_require__(87326));
__webpack_require__(94817);
var _SelectListBox = _interopRequireDefault(__webpack_require__(47818));
var _search = _interopRequireWildcard(__webpack_require__(67858));
var _utils = __webpack_require__(84512);
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
var _EventEmitter = __webpack_require__(46833);
var _MultiLanguageCSS = __webpack_require__(89074);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function isBranchStatus(status) {
  return status === 'open' || status === 'close';
}
function invertStatus(status) {
  return {
    open: 'close',
    close: 'open'
  }[status] || 'none';
}

/***
 * @extends Follower
 * @constructor
 */
function MultiCheckTreeLeafBox() {
  (0, _MultiLanguageCSS.loadLanguageModule)();
  this._initControl();
  this._searchCache = {};
  this._items = [];
  this._values = [];
  this.strictValue = true;
  this.$items = [];
  this.$itemByValue = {};
  this.$dislayItems = this.$items;
  this.$dislayItemByValue = this.$itemByValue;
  this.$content = (0, _ACore.$)('.as-select-tree-leaf-box-content', this);
  this._savedStatus = {};
  this.estimateSize = {
    width: 0,
    height: 0
  };
}
MultiCheckTreeLeafBox.tag = 'MultiCheckTreeLeafBox'.toLowerCase();
MultiCheckTreeLeafBox.render = function () {
  return (0, _ACore._)({
    tag: _Follower["default"],
    attr: {
      tabindex: 0
    },
    "class": ['as-select-tree-leaf-box', 'as-select-list-box'],
    extendEvent: ['change'],
    child: [{
      "class": 'as-select-list-box-search-ctn',
      child: 'searchtextinput'
    }, {
      "class": ['as-bscroller', 'as-select-list-box-scroller', 'as-select-tree-leaf-box-content'],
      child: []
    }, 'attachhook.as-dom-signal'],
    props: {
      anchor: [1, 6, 2, 5]
    }
  });
};
MultiCheckTreeLeafBox.prototype.focus = _SelectListBox["default"].prototype.focus;
MultiCheckTreeLeafBox.prototype._initControl = function () {
  this.$searchInput = (0, _ACore.$)('searchtextinput', this).on('stoptyping', this.eventHandler.searchModify);
};
MultiCheckTreeLeafBox.prototype.resetSearchState = function () {
  var value = this.$searchInput.value;
  if (value.length > 0) {
    this.$searchInput.value = '';
    if (value.trim().length) {
      this.$content.clearChild();
      this.$content.addChild(this.$items);
      this.$dislayItems = this.$items;
      this.$dislayItemByValue = this.$itemByValue;
      this._updateSelectedItems();
    }
  }
  this.updatePosition();
};
MultiCheckTreeLeafBox.prototype._findFirstLeaf = function () {
  var found = false;
  function visit(item) {
    if (item.isLeaf) {
      found = item;
      return true;
    }
    if (item.items && item.items.length > 0) {
      item.items.some(visit);
    }
    return !!found;
  }
  this._items.some(visit);
  return found;
};
MultiCheckTreeLeafBox.prototype._makeTree = function (item, dict, savedStatus) {
  var self = this;
  var status = 'none';
  var isLeaf = item.isLeaf;
  if (item.items && item.items.length > 0) {
    status = 'close';
  }
  if (isBranchStatus(status) && isBranchStatus(savedStatus[item.value])) {
    status = savedStatus[item.value];
  }
  var treeElt = (0, _ACore._)({
    tag: _ExpTree["default"].tag,
    "class": 'as-select-tree-leaf-item',
    props: {
      name: item.text,
      desc: item.desc,
      icon: item.icon,
      status: status,
      itemData: item
    },
    on: {
      'statuschange': this.updatePosition.bind(this)
    }
  });
  var nodeElt = treeElt.getNode().on({
    press: function press(event) {
      if (isBranchStatus(treeElt.status)) {
        treeElt.status = invertStatus(treeElt.status);
        savedStatus[item.value] = treeElt.status;
        self.updatePosition();
      } else if (isLeaf) {
        if (!(0, _EventEmitter.hitElement)(checkboxElt, event)) {
          var checked = !checkboxElt.checked;
          checkboxElt.checked = checked;
          var idx = self._values.indexOf(item.value);
          var changed = false;
          if (checked && idx < 0) {
            changed = true;
            self._values.push(item.value);
          } else if (!checked && idx >= 0) {
            changed = true;
            self._values.splice(idx, 1);
          }
          if (changed) self.emit('change', {
            item: item,
            target: self,
            itemElt: treeElt,
            originalEvent: event
          }, self);
        }
      }
    }
  });
  var checkboxElt = null;
  if (isLeaf) {
    checkboxElt = (0, _ACore._)({
      tag: _CheckBoxInput["default"].tag,
      on: {
        change: function change(event) {
          var checked = checkboxElt.checked;
          var idx = self._values.indexOf(item.value);
          var changed = false;
          if (checked && idx < 0) {
            changed = true;
            self._values.push(item.value);
          } else if (!checked && idx >= 0) {
            changed = true;
            self._values.splice(idx, 1);
          }
          if (changed) self.emit('change', {
            item: item,
            target: self,
            itemElt: treeElt,
            originalEvent: event
          }, self);
        }
      }
    });
    nodeElt.addChildAfter(checkboxElt, nodeElt.$toggleIcon);
    treeElt.$checkbox = checkboxElt;
  }
  if (dict) {
    if (dict[item.value] && !this.warned) {
      this.warned = true;
      console.warn(this, 'has duplicated value, element will not work correctly!', item);
    }
    dict[item.value] = treeElt;
  }
  if (isLeaf) {
    treeElt.addClass('as-is-leaf');
  }
  if (item.items && item.items.length > 0) {
    item.items.forEach(function (item1) {
      treeElt.addChild(self._makeTree(item1, dict, savedStatus));
    });
  }
  return treeElt;
};
MultiCheckTreeLeafBox.prototype._estimateItemWidth = function (item, level) {
  var width = 12; //padding
  width += 12 * level;
  width += 14.7 + 5; //toggle icon
  if (item.icon) width += 21; //icon
  width += 7 + (0, _utils.estimateWidth14)(item.text) + 5 + 7; //margin-text
  if (item.desc) width += 6 + (0, _utils.estimateWidth14)(item.desc) * 0.85;
  if (item.isLeaf) width += 16;
  return width;
};
MultiCheckTreeLeafBox.prototype.viewToSelected = function () {
  var selectedNode = this.$selectedItem;
  if (!selectedNode) return;
  selectedNode.scrollIntoView();
  var parent = selectedNode.getParent();
  while (parent && parent.getParent) {
    if (parent.status === 'close') {
      parent.getNode().emit('press');
    }
    parent = parent.getParent();
  }
};
MultiCheckTreeLeafBox.prototype._calcEstimateSize = function (items) {
  var self = this;
  var width = 0;
  var height = 0;
  function visit(item, level) {
    var itemWidth = self._estimateItemWidth(item, level);
    width = Math.max(width, itemWidth);
    height += 28;
    if (item.items && item.items.length) {
      item.items.forEach(function (item) {
        visit(item, level + 1);
      });
    }
  }
  items.forEach(function (item) {
    visit(item, 0);
  });
  return {
    width: width,
    height: height
  };
};
MultiCheckTreeLeafBox.prototype._updateSelectedItems = function () {
  var dict = this._values.reduce(function (ac, cr) {
    ac[cr] = true;
    return ac;
  }, {});
  var itemElt;
  for (var val in this.$dislayItemByValue) {
    itemElt = this.$dislayItemByValue[val];
    if (itemElt.$checkbox) {
      itemElt.$checkbox.checked = !!dict[itemElt.itemData.value];
    }
  }
};
MultiCheckTreeLeafBox.prototype.findItemByValue = function (value) {
  var itemElt = this.$itemByValue[value];
  if (!itemElt) return null;
  return itemElt.itemData;
};
MultiCheckTreeLeafBox.property = {};
MultiCheckTreeLeafBox.eventHandler = {};
MultiCheckTreeLeafBox.property.items = {
  /***
   * @this MultiCheckTreeLeafBox
   * @param items
   */
  set: function set(items) {
    var self = this;
    this._savedStatus = {};
    this._searchCache = {};
    items = (0, _utils.copySelectionItemArray)(items || [], {
      removeNoView: true
    });
    this._items = items;
    (0, _search.prepareSearchForList)(items);
    this.$content.clearChild();
    this.$itemByValue = {};
    this.$dislayItemByValue = this.$itemByValue;
    this.$items = items.map(function (item) {
      return self._makeTree(item, self.$itemByValue, self._savedStatus);
    });
    this.$dislayItems = this.$items;
    this.$content.addChild(this.$items);
    this.estimateSize = this._calcEstimateSize(items);
    this.addStyle('--select-list-estimate-width', this.estimateSize.width + 'px');
    this._updateSelectedItems();
    this.updatePosition();
  },
  get: function get() {
    return this._items;
  }
};
MultiCheckTreeLeafBox.property.values = {
  set: function set(values) {
    this._values.splice(0, this._values.length);
    values = values || [];
    var arr = this._values;
    values.reduce(function (ac, cr) {
      if (!ac[cr]) {
        ac[cr] = true;
        arr.push(cr);
      }
      return ac;
    }, {});
    this._updateSelectedItems();
  },
  get: function get() {
    return this._values;
  }
};
MultiCheckTreeLeafBox.property.enableSearch = _SelectListBox["default"].property.enableSearch;
MultiCheckTreeLeafBox.prototype._search = function (query) {
  var self = this;
  var queryItem = (0, _search["default"])({
    text: query
  });
  var minScore = Infinity;
  var maxScore = -Infinity;
  function makeScoreTree(item) {
    var holder = {
      item: item,
      score: (0, _search.calcItemMatchScore)(queryItem, item),
      childrenScore: 0,
      children: []
    };
    minScore = Math.min(minScore, holder.score);
    maxScore = Math.max(maxScore, holder.score);
    var children;
    if (item.items && item.items.length > 0) {
      children = item.items.map(makeScoreTree);
      holder.children = children;
      holder.childrenScore = holder.children.reduce(function (ac, cr) {
        return Math.max(ac, cr.score, cr.childrenScore);
      }, 0);
    }
    return holder;
  }
  var treeScores = this._items.map(makeScoreTree);
  var midScore = (maxScore + minScore) / 2;
  var savedStatus = {};
  function filterTree(scoredTrees, ignore) {
    return scoredTrees.filter(function (holder) {
      return ignore || holder.score >= midScore || holder.childrenScore >= midScore;
    }).map(function makeTree(holder) {
      var item = Object.assign({}, holder.item);
      if (!ignore && holder.children && holder.children.length > 0) {
        if (holder.childrenScore >= midScore) {
          savedStatus[item.value] = 'open';
          item.items = filterTree(holder.children, false);
        } else {
          savedStatus[item.value] = 'close';
          item.items = filterTree(holder.children, true);
        }
      }
      return item;
    });
  }
  var resultItems = filterTree(treeScores, false);
  var dict = {};
  var $items = resultItems.map(function (item) {
    return self._makeTree(item, dict, savedStatus);
  });
  return {
    $items: $items,
    items: resultItems,
    savedStatus: Object.assign({}, savedStatus),
    originSavedStatus: savedStatus,
    dict: dict
  };
};

/***
 * @this MultiCheckTreeLeafBox
 */
MultiCheckTreeLeafBox.eventHandler.searchModify = function () {
  var query = this.$searchInput.value.trim();
  if (query.length === 0) {
    this.$content.clearChild().addChild(this.$items);
    this.$dislayItemByValue = this.$itemByValue;
    this.$dislayItems = this.$items;
    this._updateSelectedItems();
    this.updatePosition();
    return;
  }
  if (!this._searchCache[query]) {
    this._searchCache[query] = this._search(query);
  }
  var searchData = this._searchCache[query];
  searchData.savedStatus = Object.assign(searchData.savedStatus, searchData.originSavedStatus);
  for (var val in searchData.dict) {
    if (isBranchStatus(searchData.dict[val].status)) {
      if (searchData.savedStatus[val]) {
        searchData.dict[val].status = searchData.savedStatus[val];
      }
    }
  }
  this.$content.clearChild().addChild(searchData.$items);
  this.$dislayItemByValue = searchData.dict;
  this.$dislayItems = searchData.$items;
  this._updateSelectedItems();
  this.updatePosition();
};
_ACore["default"].install(MultiCheckTreeLeafBox);
var _default = MultiCheckTreeLeafBox;
exports["default"] = _default;

/***/ }),

/***/ 8306:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _MultiCheckTreeLeafBox = _interopRequireDefault(__webpack_require__(77361));
var _SelectTreeLeafMenu = _interopRequireWildcard(__webpack_require__(66138));
var _SelectBoxItem = _interopRequireDefault(__webpack_require__(27233));
var _MultiSelectMenu = _interopRequireDefault(__webpack_require__(63176));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SelectMenu = _interopRequireDefault(__webpack_require__(41735));
var _MultiLanguageCSS = __webpack_require__(89074);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/****
 * Only leafs have checkbox
 * @extends AElement
 * @constructor
 */
function MultiCheckTreeLeafMenu() {
  (0, _MultiLanguageCSS.loadLanguageModule)();
  this.$selectBox = (0, _ACore._)({
    tag: _MultiCheckTreeLeafBox["default"].tag,
    on: {
      change: this.eventHandler.selectBoxChange,
      preupdateposition: this.eventHandler.preUpdateListPosition
    }
  });
  this.$selectlistBox = this.$selectBox;
  _OOP["default"].drillProperty(this, this.$selectBox, 'enableSearch');
  this.on('mousedown', this.eventHandler.click);
  this.$itemCtn = (0, _ACore.$)('.as-multi-select-menu-item-ctn', this);
  this.boxCtrl = new _SelectTreeLeafMenu.STLBoxController(this);
  _OOP["default"].drillProperty(this, this.boxCtrl, 'isFocus');
}
MultiCheckTreeLeafMenu.tag = 'MultiCheckTreeLeafMenu'.toLowerCase();
MultiCheckTreeLeafMenu.render = function () {
  return (0, _ACore._)({
    "class": ['as-multi-select-menu', 'as-multi-check-tree-leaf-menu'],
    extendEvent: ['change'],
    attr: {
      tabindex: '1'
    },
    child: [{
      attr: {
        'data-ml-key': 'txt_select_value'
      },
      "class": ['as-multi-select-menu-item-ctn', 'as-bscroller']
    }, {
      tag: 'button',
      "class": 'as-multi-select-menu-toggle-btn',
      child: 'dropdown-ico'
    }, 'attachhook']
  });
};
MultiCheckTreeLeafMenu.prototype._updateSelectedItems = function () {
  var values = this.$selectBox.values;
  while (this.$itemCtn.childNodes.length > values.length) {
    this.$itemCtn.removeChild(this.$itemCtn.lastChild);
  }
  while (this.$itemCtn.childNodes.length < values.length) {
    this.$itemCtn.addChild(this._makeItem());
  }
  var item;
  for (var i = 0; i < values.length; ++i) {
    item = this.$selectBox.$itemByValue[values[i]] && this.$selectBox.$itemByValue[values[i]].itemData;
    if (item) {
      this.$itemCtn.childNodes[i].data = item;
      this.$itemCtn.childNodes[i].removeStyle('display', 'none');
    } else {
      this.$itemCtn.childNodes[i].addStyle('display', 'none');
    }
  }
};
MultiCheckTreeLeafMenu.prototype._makeItem = function () {
  var itemElt = (0, _ACore._)({
    tag: _SelectBoxItem["default"].tag
  });
  itemElt.on('close', this.eventHandler.itemPressClose.bind(null, itemElt));
  return itemElt;
};
MultiCheckTreeLeafMenu.prototype.findItemByValue = function (value) {
  return this.$selectBox.findItemByValue(value);
};
MultiCheckTreeLeafMenu.prototype.init = function (props) {
  props = props || {};
  var cProps = Object.assign({}, props);
  if ('items' in props) {
    this.items = props.items;
    delete cProps.items;
  }
  if ('values' in props) {
    this.values = props.values;
    delete cProps.values;
  }
  Object.assign(this, cProps);
};
MultiCheckTreeLeafMenu.property = {};
MultiCheckTreeLeafMenu.property.items = {
  set: function set(items) {
    this.$selectBox.items = items;
    this.addStyle('--select-list-estimate-width', Math.max(145 + 20, this.$selectBox.estimateSize.width) + 'px');
    this._updateSelectedItems();
  },
  get: function get() {
    return this.$selectBox.items;
  }
};
MultiCheckTreeLeafMenu.property.values = {
  set: function set(values) {
    values = values || [];
    this.pendingValues = values;
    this.$selectBox.values = values;
    this._updateSelectedItems();
  },
  get: function get() {
    var _this = this;
    if ('pendingValues' in this) return this.pendingValues;
    return this.$selectBox.values.slice().filter(function (value) {
      return !!_this.$selectBox.$itemByValue[value];
    });
  }
};
MultiCheckTreeLeafMenu.property.disabled = _MultiSelectMenu["default"].property.disabled;
MultiCheckTreeLeafMenu.property.readOnly = _MultiSelectMenu["default"].property.readOnly;
MultiCheckTreeLeafMenu.property.placeholder = {
  set: function set(value) {
    if (value) {
      this.$itemCtn.attr('data-placeholder', value + '');
    } else {
      this.$itemCtn.attr('data-placeholder', null);
    }
  },
  get: function get() {
    return this.$itemCtn.attr('data-placeholder');
  }
};
MultiCheckTreeLeafMenu.eventHandler = {};
MultiCheckTreeLeafMenu.eventHandler.clickOut = _SelectTreeLeafMenu["default"].eventHandler.clickOut;
MultiCheckTreeLeafMenu.eventHandler.preUpdateListPosition = _SelectMenu["default"].eventHandler.preUpdateListPosition;
MultiCheckTreeLeafMenu.eventHandler.click = function (event) {
  if (!this.readOnly && (event.target === this || event.target === this.$itemCtn)) {
    this.isFocus = true;
  }
};
MultiCheckTreeLeafMenu.eventHandler.selectBoxChange = function () {
  delete this.pendingValues;
  this._updateSelectedItems();
  this.emit('change', {
    type: 'change',
    target: this
  }, this);
};
MultiCheckTreeLeafMenu.eventHandler.itemPressClose = function (itemElt, event) {
  delete this.pendingValues;
  var item = itemElt.data;
  this.$selectBox.values = this.$selectBox.values.filter(function (value) {
    return value !== item.value;
  });
  this._updateSelectedItems();
  this.emit('change', {
    type: 'change',
    target: this
  }, this);
};
_ACore["default"].install(MultiCheckTreeLeafMenu);
var _default = MultiCheckTreeLeafMenu;
exports["default"] = _default;

/***/ }),

/***/ 74934:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CheckTreeBox = _interopRequireDefault(__webpack_require__(93794));
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _SelectBoxItem = _interopRequireDefault(__webpack_require__(27233));
var _EventEmitter = __webpack_require__(46833);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _Dom = __webpack_require__(64821);
var _MultiSelectMenu = _interopRequireDefault(__webpack_require__(63176));
var _CheckTreeLeafOnlyBox = _interopRequireDefault(__webpack_require__(13163));
var _utils = __webpack_require__(84512);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _attribute = __webpack_require__(18144);
var _CheckUnsafeTreeLeafOnlyBox = _interopRequireDefault(__webpack_require__(39646));
var _Array = __webpack_require__(40411);
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends AElement
 * @constructor
 */
function MultiCheckTreeMenu() {
  this._items = [];
  this._values = []; //commited value
  this._viewValues = [];
  /***
   * @type {CheckTreeBox|CheckTreeLeafOnlyBox}
   */
  this.$checkTreeBox = (0, _ACore._)({
    tag: this.renderProps.leafOnly ? this.attr('data-version') === '2.0' ? _CheckUnsafeTreeLeafOnlyBox["default"].tag : _CheckTreeLeafOnlyBox["default"].tag : _CheckTreeBox["default"].tag,
    // forceMobile: true,
    on: {
      change: this.eventHandler.boxChange,
      preupdateposition: this.eventHandler.preUpdateListPosition,
      toggleitem: this.eventHandler.boxToggleItem,
      cancel: this.eventHandler.boxCancel,
      close: this.eventHandler.boxClose
    },
    props: {
      initOpened: this.renderProps.initOpened,
      enableSearch: this.renderProps.enableSearch
    }
  });
  this.$itemCtn = (0, _ACore.$)('.as-multi-select-menu-item-ctn', this);
  this.$checkTreeBox.followTarget = this;
  this.$checkTreeBox.sponsorElement = this;
  this.on('mousedown', this.eventHandler.click);
  this.dropdownCtrl = new MCTMDropController(this);
  // this.placeholder = LangSys.getText('txt_select_value') || '-- Select values --';

  /**
   * @name readOnly
   * @type {boolean}
   * @memberOf MultiCheckTreeMenu#
   */

  /**
   * @name disabled
   * @type {boolean}
   * @memberOf MultiCheckTreeMenu#
   */

  /**
   * parent will be selected if all off leaf selected, sub tree can not select if had no leaf
   * @name leafOnly
   * @type {boolean}
   * @memberOf MultiCheckTreeMenu#
   */
  /**
   * parent will be selected if all off leaf selected, sub tree can not select if had no leaf
   * @name initOpened
   * @type {number}
   * @memberOf MultiCheckTreeMenu#
   */

  /***
   * todo: TREE has noSelect
   */
}

MultiCheckTreeMenu.tag = 'MultiCheckTreeMenu'.toLowerCase();
MultiCheckTreeMenu.render = function (data, domDesc) {
  var leafOnly = domDesc.props && domDesc.props.leafOnly;
  var props = domDesc.props || {};
  /**
   * @name renderProps
   * @memberof MultiCheckTreeMenu#
   */
  var res = (0, _ACore._)({
    "class": ['as-multi-select-menu', 'as-multi-check-tree-menu'],
    extendEvent: ['change'],
    attr: {
      tabindex: '1'
    },
    child: [{
      "class": ['as-multi-select-menu-item-ctn', 'as-bscroller'],
      attr: {
        "data-ml-key": 'txt_select_value'
      }
    }, {
      tag: 'button',
      "class": 'as-multi-select-menu-toggle-btn',
      child: 'dropdown-ico'
    }, 'attachhook'],
    props: {
      renderProps: props
    }
  });
  if (props.version === 2) {
    res.attr('data-version', '2');
  }
  if (leafOnly) res.addClass('as-leaf-only');
  if (_BrowserDetector["default"].isMobile) res.addClass('am-multi-select-menu');
  return res;
};
MultiCheckTreeMenu.prototype.tokenPool = [];
MultiCheckTreeMenu.prototype.styleHandlers = {};
MultiCheckTreeMenu.prototype.styleHandlers.maxWidth = function (value) {
  var parsedValue = (0, _attribute.parseMeasureValue)(value);
  if (parsedValue.unit === 'px') {
    this.addClass('as-has-max-width');
    this.addStyle('--max-width', value);
  } else {
    this.removeClass('as-has-max-width');
  }
};
MultiCheckTreeMenu.prototype.styleHandlers['max-width'] = MultiCheckTreeMenu.prototype.styleHandlers.maxWidth;
MultiCheckTreeMenu.prototype.styleHandlers.width = function (value) {
  var parsedValue = (0, _attribute.parseMeasureValue)(value);
  if (parsedValue.unit === 'px') {
    this.addClass('as-has-max-width');
    this.addStyle('--max-width', value);
    this.style.width = value;
  } else {
    this.removeClass('as-has-max-width');
  }
};
MultiCheckTreeMenu.prototype.styleHandlers.overflow = function (value) {
  if (value === 'hidden') {
    this.style.overflow = 'hidden';
  } else {
    this.style.overflow = '';
  }
};
MultiCheckTreeMenu.prototype.addStyle = function (arg0, arg1) {
  if (typeof arg0 === "string" && this.styleHandlers[arg0]) {
    this.styleHandlers[arg0].apply(this, Array.prototype.slice.call(arguments, 1));
    return this;
  } else {
    return _AElement["default"].prototype.addStyle.apply(this, arguments);
  }
};
MultiCheckTreeMenu.prototype.removeStyle = function (arg0) {
  if (typeof arg0 === "string" && this.styleHandlers[arg0]) {
    this.styleHandlers[arg0].call(this, '');
    return this;
  } else {
    return _AElement["default"].prototype.removeStyle.apply(this, arguments);
  }
};
MultiCheckTreeMenu.prototype._requestToken = function () {
  var token = this.tokenPool.pop();
  if (!token) {
    token = (0, _ACore._)({
      tag: _SelectBoxItem["default"].tag,
      props: {
        menu: this
      },
      on: {
        close: function close(event) {
          setTimeout(function () {
            if (this.menu) this.menu.eventHandler.pressCloseToken(this, event);
          }.bind(this), 1);
        }
      }
    });
  }
  return token;
};
MultiCheckTreeMenu.prototype._releaseToken = function (token) {
  token.menu = null;
  this.tokenPool.push(token);
};
MultiCheckTreeMenu.prototype._filToken = function (n) {
  while (this.$itemCtn.childNodes.length > n) {
    this.$itemCtn.removeChild(this.$itemCtn.lastChild);
  }
  while (this.$itemCtn.childNodes.length < n) {
    this.$itemCtn.addChild(this._requestToken());
  }
};
MultiCheckTreeMenu.prototype._assignTokens = function (items) {
  for (var i = 0; i < items.length; ++i) {
    this.$itemCtn.childNodes[i].data = items[i];
  }
};
MultiCheckTreeMenu.prototype.findItemsByValues = function (values) {
  return values.map(function (value) {
    var holders = this.$checkTreeBox.findItemHoldersByValue(value);
    if (holders.length > 0) return holders[0].item;
    return null;
  }.bind(this)).filter(function (it) {
    return !!it;
  });
};
MultiCheckTreeMenu.prototype.findItemByValue = function (value) {
  return this.$checkTreeBox.findItemByValue(value);
};
MultiCheckTreeMenu.prototype.viewValues = function (values) {
  values = values.slice();
  var items = this.findItemsByValues(values);
  this._filToken(items.length);
  this._assignTokens(items);
  this._viewValues = values;
  if (this.isFocus) {
    var bound = this.getBoundingClientRect();
    this.$checkTreeBox.addStyle('min-width', bound.width + 'px');
    _ResizeSystem["default"].update();
  }
  setTimeout(this._updateOverflow.bind(this), 100);
};
MultiCheckTreeMenu.prototype._updateOverflow = function () {
  var bound;
  if (this.getComputedStyleValue('overflow') === 'hidden') {
    bound = this.getBoundingClientRect();
    if (bound.width === 0) return;
    this.$itemCtn.removeClass('as-has-more');
    var hasMore = false;
    var elt;
    for (var i = 0; i < this.$itemCtn.childNodes.length; ++i) {
      elt = this.$itemCtn.childNodes[i];
      if (!hasMore) {
        elt.removeStyle('display');
        var cBound = elt.getBoundingClientRect();
        if (cBound.bottom > bound.bottom) {
          hasMore = true;
        }
      }
      if (hasMore) {
        elt.addStyle('display', 'none');
      }
    }
    if (hasMore) this.$itemCtn.addClass('as-has-more');
  }
};
MultiCheckTreeMenu.prototype.commitView = function () {
  var values = this._values;
  var newValues = this.$checkTreeBox.values.slice();
  if (!(0, _Array.arrayCompare)(values, newValues)) {
    this._values = this.$checkTreeBox.values.slice();
    this.emit('change', {
      type: 'change',
      target: this
    }, this);
  }
};
MultiCheckTreeMenu.prototype.cancelView = function () {
  this.$checkTreeBox.values = this._values.slice();
  this.viewValues(this.$checkTreeBox.viewValues);
};
MultiCheckTreeMenu.prototype.init = function (props) {
  props = props || {};
  var cProps = Object.assign({}, props);
  if ('initOpened' in props) {
    this.initOpened = props.initOpened;
    delete cProps.initOpened;
  }
  if ('leafOnly' in props) {
    this.leafOnly = props.leafOnly;
    delete cProps.leafOnly;
  }
  if ('items' in props) {
    this.items = props.items;
    delete cProps.items;
  }
  if ('values' in props) {
    this.values = props.values;
    delete cProps.values;
  }
  Object.assign(this, cProps);
};
MultiCheckTreeMenu.property = {};
MultiCheckTreeMenu.property.initOpened = {
  set: function set(value) {
    if (value === true) value = 100;
    if ((0, _utils.isNaturalNumber)(value)) {
      this._initOpened = value;
    } else {
      this._initOpened = 0;
    }
    this.$checkTreeBox.initOpened = this._initOpened;
  },
  get: function get() {
    return this._initOpened;
  }
};
MultiCheckTreeMenu.property.isFocus = {
  /***
   * @this MultiCheckTreeMenu
   * @param value
   */
  set: function set(value) {
    this.dropdownCtrl.isFocus = value;
  },
  get: function get() {
    return this.dropdownCtrl.isFocus;
  }
};
MultiCheckTreeMenu.property.items = {
  set: function set(items) {
    this._items = (0, _utils.copySelectionItemArray)(items || [], {
      removeNoView: true
    });
    this.$checkTreeBox.items = this._items;
    this.addStyle('--list-min-width', Math.max(145 + 20, this.$checkTreeBox.estimateSize.width) + 'px');
    this.viewValues(this.$checkTreeBox.viewValues);
    this._values = this.$checkTreeBox.values.slice();
  },
  get: function get() {
    return this.$checkTreeBox.items;
  }
};
MultiCheckTreeMenu.property.values = {
  /***
   * @this MultiCheckTreeMenu
   * @param values
   */
  set: function set(values) {
    if (!(values instanceof Array)) values = [];
    values = (0, _Array.arrayUnique)(values);
    this.$checkTreeBox.values = values;
    this.viewValues(this.$checkTreeBox.viewValues);
    this._values = this.$checkTreeBox.values.slice();
  },
  /***
   * @this MultiCheckTreeMenu
   */
  get: function get() {
    if (this.isFocus) return this._values.slice();
    return this.$checkTreeBox.values.slice();
  }
};
MultiCheckTreeMenu.property.checkedValues = {
  get: function get() {
    return this.$checkTreeBox.viewValues.slice();
  }
};
MultiCheckTreeMenu.property.leafOnly = {
  set: function set(value) {
    if (!!value === this.hasClass('as-leaf-only')) return;
    throw Error("Can not change leafOnly value!");
  },
  get: function get() {
    return this.hasClass('as-leaf-only');
  }
};
MultiCheckTreeMenu.property.placeholder = {
  set: function set(value) {
    if (value) {
      this.$itemCtn.attr('data-placeholder', value + '');
    } else {
      this.$itemCtn.attr('data-placeholder', null);
    }
  },
  get: function get() {
    return this.$itemCtn.attr('data-placeholder');
  }
};
MultiCheckTreeMenu.property.disabled = _MultiSelectMenu["default"].property.disabled;
MultiCheckTreeMenu.property.readOnly = _MultiSelectMenu["default"].property.readOnly;
MultiCheckTreeMenu.eventHandler = {};

/***
 * @this MultiCheckTreeMenu
 * @param event
 */
MultiCheckTreeMenu.eventHandler.clickOut = function (event) {
  if (event.target.hasClass && event.target.hasClass('am-modal') || event.target === this || event.target === this.$itemCtn || !(0, _EventEmitter.hitElement)(this, event) && !(0, _EventEmitter.hitElement)(this.$checkTreeBox, event)) {
    this.isFocus = false;
    this.commitView();
  }
};

/***
 * @this MultiCheckTreeMenu
 * @param event
 */
MultiCheckTreeMenu.eventHandler.boxClose = function (event) {
  this.commitView();
  this.isFocus = false;
};

/***
 * @this MultiCheckTreeMenu
 * @param event
 */
MultiCheckTreeMenu.eventHandler.click = function (event) {
  if (!this.readOnly && (event.target === this || event.target === this.$itemCtn)) {
    this.isFocus = true;
  }
};

/***
 * @this MultiCheckTreeMenu
 * @param event
 */
MultiCheckTreeMenu.eventHandler.boxChange = function (event) {
  this.viewValues(this.$checkTreeBox.viewValues);
  _ResizeSystem["default"].update();
};
MultiCheckTreeMenu.eventHandler.boxCancel = function (event) {
  this.cancelView();
  this.isFocus = false;
};

/***
 * @this MultiCheckTreeMenu
 * @param {SelectBoxItem} tokenElt
 * @param event
 */
MultiCheckTreeMenu.eventHandler.pressCloseToken = function (tokenElt, event) {
  var value = tokenElt.value;
  var holders = this.$checkTreeBox.findItemHoldersByValue(value);
  holders.forEach(function (holder) {
    holder.unselectAll();
  });
  this.$checkTreeBox.updateSelectedInViewIfNeed();
  var newValues = this.$checkTreeBox.viewValues.slice();
  this.viewValues(newValues);
  console.log(this._values, newValues);
  if (!(0, _Array.arrayCompare)(this._values, newValues)) {
    this._values = newValues;
    this.emit('change', {
      type: 'change',
      target: this
    }, this);
  }
};
MultiCheckTreeMenu.eventHandler.preUpdateListPosition = function () {
  var bound = this.getBoundingClientRect();
  var screenSize = (0, _Dom.getScreenSize)();
  var availableTop = bound.top - 5;
  var availableBot = screenSize.height - 5 - bound.bottom - 50;
  this.$checkTreeBox.addStyle('--max-height', Math.max(availableBot, availableTop) + 'px');
  var outBound = (0, _Dom.traceOutBoundingClientRect)(this);
  if (bound.bottom < outBound.top || bound.top > outBound.bottom || bound.right < outBound.left || bound.left > outBound.right) {
    this.isFocus = false;
  }
};
MultiCheckTreeMenu.eventHandler.boxToggleItem = function (event) {
  var bound = this.getBoundingClientRect();
  var screenSize = (0, _Dom.getScreenSize)();
  var availableTop = bound.top - 5;
  var availableBot = screenSize.height - 5 - bound.bottom;
  this.$checkTreeBox.addStyle('--max-height', (this.$checkTreeBox._lastAnchor < 4 ? availableBot : availableTop) + 'px');
  this.$checkTreeBox.updatePosition();
};
MultiCheckTreeMenu.property.enableSearch = {
  set: function set(value) {
    this.$checkTreeBox.enableSearch = !!value;
  },
  get: function get() {
    return this.$checkTreeBox.enableSearch;
  }
};
_ACore["default"].install(MultiCheckTreeMenu);
var _default = MultiCheckTreeMenu;
/**
 * @constructor
 * @param {MultiCheckTreeMenu} elt
 * @constructor
 */
exports["default"] = _default;
function MCTMDropController(elt) {
  this.elt = elt;
}
MCTMDropController.prototype.open = function () {
  var _this = this;
  if (this.elt.readOnly || this.elt.disabled) return;
  if (this.elt.hasClass('as-focus')) return;
  this.elt.addClass('as-focus');
  this.elt.off('mousedown', this.elt.eventHandler.click);
  var bound = this.elt.getBoundingClientRect();
  this.elt.$checkTreeBox.addStyle('min-width', bound.width + 'px'); // Set dropdown width
  this.elt.$checkTreeBox.addTo(document.body); // Attach dropdown to the body
  this.elt.$checkTreeBox.updatePosition(); // Update dropdown position

  if (this.elt._focusTimeout > 0) {
    clearTimeout(this.elt._focusTimeout); // Clear any existing timeout
  }

  // Set a timeout to handle focus and add event listener for clicking outside
  this.elt._focusTimeout = setTimeout(function () {
    document.addEventListener('mousedown', _this.elt.eventHandler.clickOut);
    _this.elt._focusTimeout = -1;
    _this.elt.$checkTreeBox.focus(); // Focus on the dropdown
  }, 5);
};
MCTMDropController.prototype.close = function () {
  var _this2 = this;
  if (!this.elt.hasClass('as-focus')) return;
  this.elt.removeClass('as-focus');
  this.elt.$checkTreeBox.selfRemove(); // Detach dropdown from the body
  this.elt.$checkTreeBox.resetSearchState(); // Reset search state
  document.removeEventListener('mousedown', this.elt.eventHandler.clickOut); // Remove click-out listener

  // Re-enable the click event after a delay
  var waitMouseUp = function waitMouseUp() {
    document.removeEventListener('mouseup', waitMouseUp);
    setTimeout(function () {
      _this2.elt.on('mousedown', _this2.elt.eventHandler.click);
    }, 5);
  };
  setTimeout(waitMouseUp, 100);
};
MCTMDropController.prototype.ev_clickOut = function (event) {};
Object.defineProperty(MCTMDropController.prototype, "isFocus", {
  set: function set(value) {
    if (value) this.open();else this.close();
  },
  get: function get() {
    return this.elt.hasClass('as-focus');
  }
});

/***/ }),

/***/ 89074:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.loadLanguageModule = loadLanguageModule;
var _ACore = __webpack_require__(34093);
var counter = 30;
function makeCss(data) {
  var cssText = Object.keys(data).map(function (key) {
    return ['[data-ml-key=' + JSON.stringify(key) + ']::before {', '    content: ' + JSON.stringify(data[key]) + ';', '}'].join('\n');
  }).join('\n\n');
  (0, _ACore._)({
    tag: 'style',
    attr: {
      type: 'text/css'
    },
    props: {
      innerHTML: cssText
    }
  }).addTo(document.head);
}
var data = {
  txt_ok: 'OK',
  txt_cancel: 'Cancel',
  txt_close: 'Close',
  txt_option: 'Option',
  txt_check_all: 'Check All',
  txt_select_value: '-- Select values --'
};
makeCss(data);
var overrideData = {};
var LanguageModuleLoaded = false;
function loadLanguageModule() {
  if (LanguageModuleLoaded) return;
  var text;
  var newest = false,
    key;
  if (window['LanguageModule'] && window['LanguageModule'].data && window['LanguageModule'].data.length > 0) {
    LanguageModuleLoaded = true;
    for (key in data) {
      text = window['LanguageModule'].text(key);
      if (!text.startsWith('[key:') && text !== data[key]) {
        overrideData[key] = text;
        newest = true;
      }
    }
    if (newest) makeCss(overrideData);
  }
}
function waitLanguage() {
  if (window['LanguageModule'] && window['LanguageModule'].data && window['LanguageModule'].data.length > 0) {
    loadLanguageModule();
  } else {
    if (counter--) setTimeout(waitLanguage, 400 + Math.floor(16000 / counter / counter));
  }
}
waitLanguage();
var _default = {};
exports["default"] = _default;

/***/ }),

/***/ 8177:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function MultiLanguageText() {
  this._v = Array(5).fill(null);
  this._key = null;
  this.$text = document.createTextNode('');
  this.addChild(this.$text);
}
MultiLanguageText.tag = 'mlt';
MultiLanguageText.render = function () {
  return (0, _ACore._)('span');
};
MultiLanguageText.prototype._updateText = function () {
  var text = '';
  if (this._key && window.LanguageModule && window.LanguageModule.text2) {
    text = window.LanguageModule.text2(this._key, this._v);
  }
  text = text.replace(/<br>/g, '\n');
  this.$text.data = text;
};
MultiLanguageText.attribute = Array(5).fill(0).reduce(function (ac, u, i) {
  ac['v' + i] = {
    set: function set(value) {
      this._v[i] = value;
      this._updateText();
    },
    get: function get() {
      return this._v[i];
    },
    remove: function remove() {
      this._v[i] = null;
    }
  };
  return ac;
}, {});
MultiLanguageText.attribute.key = {
  set: function set(value) {
    this._key = value;
    this._updateText();
  },
  get: function get() {
    return this._key;
  },
  remove: function remove() {
    this._key = null;
  }
};
MultiLanguageText.replaceAll = function (root) {
  (0, _ACore.$$)('mlt', root).forEach(function (elt) {
    if (elt.tagName !== 'MLT') return;
    var attr = Array.prototype.reduce.call(elt.attributes, function (ac, at) {
      ac[at.name] = at.value;
      return ac;
    }, {});
    elt.selfReplace((0, _ACore._)({
      tag: MultiLanguageText,
      attr: attr
    }));
  });
};
var _default = MultiLanguageText;
exports["default"] = _default;

/***/ }),

/***/ 63176:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(5033);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _SelectMenu = _interopRequireDefault(__webpack_require__(41735));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _PositionTracker = _interopRequireDefault(__webpack_require__(97252));
__webpack_require__(27233);
var _SelectListBox = __webpack_require__(47818);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _SelectBox = __webpack_require__(28596);
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @augments SelectBox
 * @augments PositionTracker
 * @constructor
 */
function MultiSelectMenu() {
  this.on('click', this.eventHandler.click);
  /***
   *
   * @type {SelectListBox}
   */
  this.$selectlistBox = _({
    tag: 'selectlistbox',
    props: {
      anchor: [1, 6, 2, 5],
      displayValue: _SelectListBox.VALUE_HIDDEN
    },
    on: {
      preupdateposition: this.eventHandler.preUpdateListPosition,
      pressitem: this.eventHandler.selectListBoxPressItem
    }
  });
  this.$itemCtn = $('.as-multi-select-menu-item-ctn', this);
  this.$attachhook = $('attachhook', this).on('attached', this.eventHandler.attached);
  _OOP["default"].drillProperty(this, this.$selectlistBox, 'enableSearch');
  this.$items = [];
  this._values = [];
  this.items = [];
  this.values = [];
  this.$selectlistBox.followTarget = this;
  this.$selectlistBox.sponsorElement = this;
  this.disableClickToFocus = false;
  this.orderly = true;
  this.itemFocusable = false;
  this._activeValue = undefined;
  this.strictValue = true;
}
MultiSelectMenu.tag = 'MultiSelectMenu'.toLowerCase();
MultiSelectMenu.render = function () {
  return _({
    "class": ['as-multi-select-menu'],
    extendEvent: ['change', 'add', 'remove', 'activevaluechange'],
    attr: {
      tabindex: '1'
    },
    child: [{
      attr: {
        'data-ml-key': 'txt_select_value'
      },
      "class": ['as-multi-select-menu-item-ctn', 'as-bscroller']
    }, {
      tag: 'button',
      "class": 'as-multi-select-menu-toggle-btn',
      child: 'dropdown-ico'
    }, 'attachhook']
  });
};
MultiSelectMenu.prototype._requireItem = function (n) {
  var itemElt;
  while (this.$items.length < n) {
    itemElt = (0, _SelectBox.requireItem)(this);
    this.$itemCtn.addChild(itemElt);
    this.$items.push(itemElt);
  }
  while (this.$items.length > n) {
    itemElt = this.$items.pop();
    this.$itemCtn.removeChild(itemElt);
    (0, _SelectBox.releaseItem)(itemElt);
  }
};
MultiSelectMenu.prototype._assignItems = function (items) {
  for (var i = 0; i < this.$items.length && i < items.length; ++i) {
    this.$items[i].data = items[i];
  }
};

/***
 *
 * @param {string[] | number[]} values
 * @private
 */
MultiSelectMenu.prototype._getItemsByValues = function (values) {
  var selectListBoxElt = this.$selectlistBox;
  var itemHolders = values.reduce(function (ac, cr) {
    ac.push.apply(ac, selectListBoxElt.findItemsByValue(cr));
    return ac;
  }, []);
  if (this.orderly) {
    if (typeof this.orderly === 'function') {
      itemHolders.sort(this.orderly);
    } else {
      itemHolders.sort(function (a, b) {
        return a.idx - b.idx;
      });
    }
  }
  return itemHolders.map(function (holder) {
    return holder.item;
  });
};
MultiSelectMenu.prototype._updateItems = function () {
  this.viewItemsByValues(this._values);
};
MultiSelectMenu.prototype.viewItemsByValues = function (values) {
  var cBound = this.getBoundingClientRect();
  var items = this._getItemsByValues(values);
  this._requireItem(items.length);
  this._assignItems(items);
  if (this.itemFocusable) {
    this._updateFocusItem();
  }
  var nBound = this.getBoundingClientRect();
  if (nBound.width != cBound.width || nBound.height != cBound.height) {
    _ResizeSystem["default"].updateUp(this);
  }
};
MultiSelectMenu.property = {};
MultiSelectMenu.property.disabled = _SelectMenu["default"].property.disabled;
MultiSelectMenu.property.hidden = _SelectMenu["default"].property.hidden;
MultiSelectMenu.property.isFocus = _SelectMenu["default"].property.isFocus;
MultiSelectMenu.property.readOnly = _SelectMenu["default"].property.readOnly;
MultiSelectMenu.prototype.init = function (props) {
  props = props || [];
  Object.keys(props).forEach(function (key) {
    if (props[key] === undefined) delete props[key];
  });
  this["super"](props);
};
MultiSelectMenu.prototype._updateFocusItem = function () {
  for (var i = 0; i < this.$items.length; ++i) {
    this.$items[i].active = this.$items[i].value == this._activeValue;
  }
};
MultiSelectMenu.prototype.init = _SelectMenu["default"].prototype.init;
MultiSelectMenu.prototype._implicit = function (values) {
  if (values === null || values === undefined) values = [];
  if (!(values instanceof Array)) {
    values = [values];
  }
  values = values.filter(function (value) {
    var type = _typeof(value);
    return type === 'string' || type === 'number' || type === "boolean" || value === null || value === undefined;
  }).reduce(function (ac, cr) {
    if (!ac.dict[cr]) {
      ac.dict[cr] = true;
      ac.result.push(cr);
    }
    return ac;
  }, {
    result: [],
    dict: {}
  }).result;
  return values;
};
MultiSelectMenu.prototype._explicit = function (values) {
  var selectListBoxElt = this.$selectlistBox;
  var strictValue = this.strictValue;
  values = values.filter(function (value) {
    if (!strictValue) return true;
    var cts = selectListBoxElt.findItemsByValue(value);
    if (cts && cts.length > 0) return true;
    return false;
  });
  return values;
};
MultiSelectMenu.property.items = {
  set: function set(items) {
    items = items || [];
    this.$selectlistBox.items = items;
    this.addStyle('--list-min-width', this.$selectlistBox._estimateWidth + 'px');
    this._updateItems();
  },
  get: function get() {
    return this.$selectlistBox.items;
  }
};
MultiSelectMenu.property.values = {
  set: function set(values) {
    values = this._implicit(values);
    this._values = values;
    this.$selectlistBox.values = values;
    this._updateItems();
  },
  get: function get() {
    return this._explicit(this._values);
  }
};
MultiSelectMenu.property.orderly = {
  set: function set(value) {
    var needUpdate = this._orderly === this._orderly;
    if (typeof value === 'function') {
      this._orderly;
    } else this._orderly = !!value;
    if (needUpdate) {
      this.values = this.values;
    }
  },
  get: function get() {
    return !!this._orderly;
  }
};
MultiSelectMenu.property.disableClickToFocus = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disable-click-to-focus');
    } else {
      this.removeClass('as-disable-click-to-focus');
    }
  },
  get: function get() {
    return this.hasClass('as-disable-click-to-focus');
  }
};
MultiSelectMenu.property.itemFocusable = {
  set: function set(value) {
    if (value) {
      this.addClass('as-item-focusable');
    } else {
      this.removeClass('as-item-focusable');
    }
    this._updateFocusItem();
  },
  get: function get() {
    return this.hasClass('as-item-focusable');
  }
};
MultiSelectMenu.property.activeValue = {
  set: function set(value) {
    this._activeValue = value;
    if (this.itemFocusable) {
      this._updateFocusItem();
      //todo
    }
  },

  get: function get() {
    return this._activeValue;
  }
};
MultiSelectMenu.property.strictValue = {
  set: function set(value) {
    if (value) {
      this.attr('data-strict-value', null);
    } else {
      this.attr('data-strict-value', 'false');
    }
  },
  get: function get() {
    var data = this.attr('data-strict-value');
    return !data || data != 'false' && data !== '0';
  }
};
MultiSelectMenu.eventHandler = Object.assign({}, _SelectMenu["default"].eventHandler);
MultiSelectMenu.eventHandler.attached = function () {
  var maxHeightStyle = this.getComputedStyleValue('max-height') || 'none';
  if (maxHeightStyle.match(/[0-9-]+px/)) {
    this.addStyle('--multi-select-menu-max-height', maxHeightStyle);
    this.addStyle('max-height', 'unset');
  } else if (maxHeightStyle !== 'none') {
    console.warn('Can not adapt max-height:', maxHeightStyle);
  }
};
MultiSelectMenu.eventHandler.click = function (event) {
  if (this.disabled) return;
  if ((event.target === this || event.target === this.$itemCtn) && !this.disableClickToFocus && !this.readOnly) {
    this.isFocus = !this.isFocus;
  }
};
MultiSelectMenu.eventHandler.bodyClick = function (event) {
  if (!_EventEmitter["default"].hitElement(this.$selectlistBox, event) && event.target !== this && event.target !== this.$itemCtn) {
    this.isFocus = false;
  }
};
MultiSelectMenu.eventHandler.selectListBoxPressItem = function (event) {
  var data = event.data;
  var currentValues = this.$selectlistBox.values;
  currentValues.push(data.value);
  this.$selectlistBox.values = currentValues;
  this.$selectlistBox.updatePosition();
  this._values = currentValues.slice();
  this._activeValue = data.value;
  this._updateItems();
  this.isFocus = false;
  this.emit('add', Object.assign({}, event, {
    type: 'add',
    target: this,
    value: data.value,
    data: data,
    itemData: data
  }), this);
  this.emit('change', Object.assign({}, event, {
    type: 'change',
    action: 'add',
    target: this,
    value: data.value,
    data: data,
    values: this.values
  }), this);
};
MultiSelectMenu.eventHandler.pressItem = function (item, event) {
  var value = item.value;
  if (this.itemFocusable) {
    var prevActiveValue = this.activeValue;
    if (value !== prevActiveValue) {
      this.activeValue = value;
      this.emit('activevaluechange', {
        target: this,
        originEvent: event,
        prevActiveValue: prevActiveValue,
        activeValue: value
      }, this);
    }
  }
};
MultiSelectMenu.eventHandler.pressCloseItem = function (item, event) {
  var value = item.value;
  var data = item.data;
  var index;
  index = this._values.indexOf(value);
  if (index >= 0) {
    this._values.splice(index, 1);
    this._updateItems();
    this.$selectlistBox.values = this._values;
    this.emit('remove', Object.assign({}, event, {
      type: 'change',
      target: this,
      data: data,
      value: value,
      itemData: data
    }), this);
    this.emit('change', Object.assign({}, event, {
      type: 'change',
      action: 'remove',
      target: this,
      data: data,
      value: value,
      itemData: data
    }), this);
  }
};
_ACore["default"].install(MultiSelectMenu);
var _default = MultiSelectMenu;
exports["default"] = _default;

/***/ }),

/***/ 8881:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MNPNotificationVirtualDropdown = MNPNotificationVirtualDropdown;
exports.NPDropdownButton = NPDropdownButton;
exports.NPItem = NPItem;
exports.NPList = NPList;
exports.NPSection = NPSection;
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _utils = __webpack_require__(84512);
__webpack_require__(61536);
var _Dom = __webpack_require__(64821);
var _EventEmitter = __webpack_require__(46833);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _QuickMenu = _interopRequireWildcard(__webpack_require__(8277));
var _datetime = __webpack_require__(58286);
var _RelativeTimeText = _interopRequireDefault(__webpack_require__(39124));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _MHeaderBar = _interopRequireDefault(__webpack_require__(23277));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/**
 * @extends AElement
 * @constructor
 */
function NotificationPanel() {}
NotificationPanel.tag = 'NotificationPanel'.toLowerCase();
NotificationPanel.render = function () {
  return (0, _ACore._)({
    "class": 'as-notification-panel'
  });
};
NotificationPanel.prototype.addChild = function () {
  var res = _AElement["default"].prototype.addChild.apply(this, arguments);
  _ResizeSystem["default"].updateUp(this, true);
  return res;
};
NotificationPanel.prototype.closeAllDropdown = function () {
  Array.prototype.forEach.call(this.childNodes, function (c) {
    if (typeof c.close === "function") c.close();
  });
};
_ACore["default"].install(NotificationPanel);
var _default = NotificationPanel;
/**
 /**
 * @extends AElement
 * @constructor
 */
exports["default"] = _default;
function NPDropdownButton() {
  this.$dropdown = (0, _ACore.$)('.as-np-db-dropdown', this);
  this.$iconCtn = (0, _ACore.$)('.as-np-db-icon-ctn', this);
  this.$icon = null;
  this.$count = (0, _ACore.$)('.as-np-db-count', this);
  this._count = 0;
  this.$btn = (0, _ACore.$)('.as-np-db-btn', this);
  this.$btn.on('click', this.eventHandler.click);
  this.$body = (0, _ACore.$)('.as-np-db-dropdown-body', this);
  this.$quickMenuBtn = (0, _ACore.$)('.as-np-db-quick-menu-btn', this);
  this.$quickMenuCtn = (0, _ACore.$)('.as-np-db-dropdown-quick-menu-ctn', this);

  /**
   * @name count
   * @type {number}
   * @memberOf NPDropdownButton#
   */
}

NPDropdownButton.tag = 'NPDropdownButton'.toLowerCase();
NPDropdownButton.render = function () {
  return (0, _ACore._)({
    "class": 'as-np-dropdown-button',
    extendEvent: ['click', 'close', 'open'],
    child: [{
      tag: 'button',
      "class": 'as-np-db-btn',
      child: [{
        "class": 'as-np-db-icon-ctn'
      }, {
        "class": 'as-np-db-count'
      }]
    }, {
      "class": ['as-np-db-dropdown', 'as-dropdown-box-common-style'],
      child: [{
        "class": 'as-np-db-dropdown-quick-menu-ctn',
        style: {
          display: 'none'
        },
        child: [{
          tag: 'button',
          "class": ['as-transparent-button', 'as-np-db-quick-menu-btn'],
          child: 'span.mdi.mdi-dots-horizontal'
        }]
      }, {
        "class": 'as-np-db-dropdown-body'
      }]
    }]
  });
};
['addChild', 'removeChild', 'clearChild'].forEach(function (key) {
  NPDropdownButton.prototype[key] = function () {
    return this.$body[key].apply(this.$body, arguments);
  };
});
NPDropdownButton.prototype.getChildNodes = function () {
  return Array.prototype.slice.call(this.$body.childNodes);
};
NPDropdownButton.prototype.getFirstChild = function () {
  return this.$body.firstChild;
};
NPDropdownButton.prototype.getLastChild = function () {
  return this.$body.lastChild;
};
NPDropdownButton.prototype.addChildBefore = function (child, bf) {
  //adapt method
  if (bf && bf === this.lastChild) bf = this.$body.lastChild;else if (bf && bf === this.firstChild) bf = this.$body.firstChild;
  return this.$body.addChildBefore(child, bf);
};
NPDropdownButton.prototype.addChildAfter = function (child, at) {
  if (at === this.lastChild) at = this.$dropdown.lastChild;else if (at === this.firstChild) at = this.$dropdown.firstChild;
  return this.$body.addChildAfter(child, at);
};
NPDropdownButton.prototype.open = function () {
  var _this = this;
  if (this.hasClass('as-active')) return;
  this.addClass('as-active');
  var bound = this.getBoundingClientRect();
  var screenSize = (0, _Dom.getScreenSize)();
  if (bound.left < screenSize.width / 2) {
    this.$dropdown.addStyle({
      top: bound.bottom + 5 + 'px',
      '--max-height': "calc(90vh - ".concat(bound.bottom + 110, "px)"),
      left: '20px',
      right: 'unset'
    });
  } else {
    this.$dropdown.addStyle({
      top: bound.bottom + 5 + 'px',
      '--max-height': "calc(90vh - ".concat(bound.bottom + 110, "px)"),
      right: '20px',
      left: 'unset'
    });
  }
  this.$dropdown.addStyle('z-index', (0, _utils.findMaxZIndex)(this) + 2);
  setTimeout(function () {
    if (_this.hasClass('as-active')) window.addEventListener('click', _this.eventHandler.clickOut);
  }, 3);
  this.emit('open', {
    type: 'open'
  }, this);
};
NPDropdownButton.prototype.close = function () {
  if (!this.hasClass('as-active')) return;
  this.removeClass('as-active');
  window.removeEventListener('click', this.eventHandler.clickOut);
  this.emit('close', {
    type: 'close'
  }, this);
};
NPDropdownButton.property = {};
NPDropdownButton.property.count = {
  set: function set(value) {
    value = Math.round(value);
    if (!(0, _utils.isNaturalNumber)(value)) value = 0;
    this._count = value;
    if (value > 0) {
      this.$count.attr('data-count', value);
    } else {
      this.$count.attr('data-count', null);
    }
  },
  get: function get() {
    return this._count;
  }
};
NPDropdownButton.property.icon = {
  set: function set(value) {
    if (this.$icon) this.$icon.remove();
    this.$iconCtn.clearChild();
    var elt;
    if ((0, _Dom.isDomNode)(value)) {
      if (value.parentElt) value = value.cloneNode(true);
      elt = value;
    } else if (value && (typeof value === 'string' || _typeof(value) === 'object')) {
      if (value === 'default') value = 'span.mdi.mdi-equal';
      elt = (0, _ACore._)(value);
    }
    if (elt) {
      this.$iconCtn.addChild(elt);
      this.$icon = elt;
      this.addClass('as-has-icon');
    } else {
      this.$icon = null;
      value = null;
      this.removeClass('as-has-icon');
    }
    this._icon = value;
  },
  get: function get() {
    return this._icon;
  }
};
NPDropdownButton.property.quickmenu = {
  set: function set(value) {
    value = value || null;
    if (this.quickmenuInstance) {
      this.quickmenuInstance.remove();
    }
    this._quickmenu = value;
    if (value) {
      this.$quickMenuCtn.removeStyle('display');
      this.$dropdown.addClass('as-has-quick-menu');
      this.quickmenuInstance = new _QuickMenu.QuickMenuInstance(this.$quickMenuBtn, Object.assign({
        triggerEvent: 'click',
        anchor: [2, 5],
        menuCtn: this.$quickMenuCtn
      }, value));
    } else {
      this.$dropdown.removeClass('as-has-quick-menu');
      this.$quickMenuCtn.addStyle('display', 'none');
    }
  },
  get: function get() {
    return this._quickmenu;
  }
};
NPDropdownButton.eventHandler = {};

/**
 * @this NPDropdownButton
 * @param {MouseEvent} event
 */
NPDropdownButton.eventHandler.click = function (event) {
  this.emit('click', {
    type: 'click',
    originalEvent: event
  }, this);
  if (this.hasClass('as-active')) {
    this.close();
  } else {
    this.open();
  }
};

/**
 * @this NPDropdownButton
 * @param {MouseEvent} event
 */
NPDropdownButton.eventHandler.clickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this, event)) return;
  this.close();
};
_ACore["default"].install(NPDropdownButton);

/**
 * @extends AElement
 * @constructor
 */
function NPSection() {
  var _this2 = this;
  this.$body = (0, _ACore.$)('.as-np-section-body', this);
  this.$name = (0, _ACore.$)('.as-np-section-name', this);
  this.$action = (0, _ACore.$)('.as-np-section-action', this);
  this.$action.on('click', function (event) {
    _this2.emit('action', {
      type: 'action',
      originalEvent: event
    }, _this2);
  });
}
NPSection.tag = 'NPSection'.toLowerCase();
NPSection.render = function () {
  return (0, _ACore._)({
    "class": 'as-np-section',
    extendEvent: ['action'],
    child: [{
      "class": 'as-np-section-header',
      child: [{
        "class": 'as-np-section-name',
        attr: {
          'data-name': ''
        }
      }, {
        "class": 'as-np-section-action'
      }]
    }, {
      "class": 'as-np-section-body'
    }]
  });
};
['addChild', 'removeChild', 'findChildAfter', 'findChildBefore'].forEach(function (key) {
  NPSection.prototype[key] = function () {
    return this.$body[key].apply(this.$body, arguments);
  };
});
NPSection.prototype.getChildNodes = function () {
  return Array.prototype.slice.call(this.$body.childNodes);
};
NPSection.prototype.getFirstChild = function () {
  return this.$body.firstChild;
};
NPSection.prototype.getLastChild = function () {
  return this.$body.lastChild;
};
NPSection.prototype.addChildBefore = function (child, bf) {
  if (bf === this.firstChild) bf = this.$body.firstChild;else if (bf === this.lastChild) bf = this.$body.lastChild;
  return this.$body.addChildBefore(child, bf);
};
NPSection.prototype.addChildAfter = function (child, at) {
  if (at === this.firstChild) at = this.$body.firstChild;else if (at === this.lastChild) at = this.$body.lastChild;
  return this.$body.addChildAfter(child, at);
};
NPSection.property = {};
NPSection.property.name = {
  set: function set(value) {
    value = value || '';
    value = value + '';
    this.$name.attr('data-name', value);
  },
  get: function get() {
    return this.attr('data-name');
  }
};
NPSection.property.actionText = {
  set: function set(value) {
    value = value || '';
    value = value + '';
    if (value) this.$action.attr('data-text', value);else {
      this.$action.attr('data-text', null);
    }
  },
  get: function get() {
    return this.attr('data-text');
  }
};

/**
 * @extends AElement
 * @constructor
 */
function NPList() {
  var _this3 = this;
  this.$body = (0, _ACore.$)('.as-np-list-body', this);
  this._moreText = '';
  this.$moreCtn = (0, _ACore.$)('.as-np-list-more-ctn', this);
  this.$moreBtn = (0, _ACore.$)('.as-np-list-more-btn', this.$moreCtn);
  this.$moreBtn.on('click', function (event) {
    _this3.emit('more', {
      type: 'more',
      originalEvent: event,
      target: _this3
    }, _this3);
  });
  /**
   * @name moreText
   * @type {string}
   * @memberOf NPList#
   */
}

NPList.tag = "NPList".toLowerCase();
NPList.render = function () {
  return (0, _ACore._)({
    "class": 'as-np-list',
    extendEvent: ['more'],
    child: [{
      "class": 'as-np-list-body'
    }, {
      "class": 'as-np-list-more-ctn',
      style: {
        display: 'none'
      },
      child: {
        tag: _FlexiconButton["default"],
        "class": 'as-np-list-more-btn'
      }
    }]
  });
};
['addChild', 'removeChild', 'findChildAfter', 'findChildBefore'].forEach(function (key) {
  NPList.prototype[key] = function () {
    return this.$body[key].apply(this.$body, arguments);
  };
});
NPList.prototype.getChildNodes = function () {
  return Array.prototype.slice.call(this.$body.childNodes);
};
NPList.prototype.getFirstChild = function () {
  return this.$body.firstChild;
};
NPList.prototype.getLastChild = function () {
  return this.$body.lastChild;
};
NPList.prototype.addChildBefore = function (child, bf) {
  if (bf === this.firstChild) bf = this.$body.firstChild;else if (bf === this.lastChild) bf = this.$body.lastChild;
  return this.$body.addChildBefore(child, bf);
};
NPList.prototype.addChildAfter = function (child, at) {
  if (at === this.firstChild) at = this.$body.firstChild;else if (at === this.lastChild) at = this.$body.lastChild;
  return this.$body.addChildAfter(child, at);
};
NPList.prototype.scrollToEnd = function () {
  this.scrollTop = this.scrollHeight;
};
NPList.property = {};
NPList.property.moreText = {
  set: function set(value) {
    value = value || '';
    if (value) {
      this.$moreCtn.removeStyle('display');
    } else {
      this.$moreCtn.addStyle('display', 'none');
    }
    this.$moreBtn.text = value;
  },
  get: function get() {
    return this.$moreBtn.text;
  }
};
_ACore["default"].install(NPList);

/**
 * @extends AElement
 * @constructor
 */
function NPItem() {
  var _this4 = this;
  this.$body = (0, _ACore.$)('.as-np-item-body', this);
  this.$body.on('click', function (event) {
    _this4.emit('click', {
      type: 'click',
      originalEvent: event
    }, _this4);
  });
  this.$unreadBtn = (0, _ACore.$)('.as-np-item-unread-btn', this);
  this.$unreadBtn.on('click', function (event) {
    _this4.unread = false;
    _this4.emit('unreadchange', {
      type: 'unreadchange',
      target: _this4
    }, _this4);
  });
  this.$pinBtn = (0, _ACore.$)('.as-np-item-pin-btn', this);
  this.$pinBtn.on('click', function (event) {
    _this4.pin = false;
    _this4.emit('pinchange', {
      type: 'pinchange',
      target: _this4
    }, _this4);
  });
  this.$quickMenuBtn = (0, _ACore.$)('.as-np-item-quick-menu-btn', this);
  this.$quickMenuCtn = (0, _ACore.$)('.as-np-item-quick-menu-ctn', this);
  this._quickmenu = null;
  this.quickmenuInstance = null;
}
NPItem.tag = 'NPItem'.toLowerCase();
['addChild', 'removeChild', 'addChildBefore', 'addChildAfter', 'findChildAfter', 'findChildBefore', 'clearChild'].forEach(function (key) {
  NPItem.prototype[key] = function () {
    return this.$body[key].apply(this.$body, arguments);
  };
});
NPItem.render = function () {
  return (0, _ACore._)({
    "class": 'as-np-item',
    extendEvent: ['click', 'unreadchange', 'pinchange'],
    child: [{
      tag: _RelativeTimeText["default"],
      "class": 'as-np-item-body'
    }, {
      tag: 'button',
      "class": 'as-np-item-unread-btn'
    }, {
      tag: 'button',
      "class": 'as-np-item-pin-btn',
      child: 'span.mdi.mdi-pin'
    }, {
      "class": 'as-np-item-quick-menu-ctn',
      style: {
        display: 'none'
      },
      child: [{
        tag: 'button',
        "class": ['as-np-item-quick-menu-btn'],
        child: 'span.mdi.mdi-dots-horizontal'
      }]
    }]
  });
};
NPItem.property = {};
NPItem.property.time = {
  set: function set(value) {
    value = (0, _datetime.implicitDate)(value);
    this.$body.time = value;
  },
  get: function get() {
    return this.$time.time;
  }
};
NPItem.property.unread = {
  set: function set(value) {
    if (value) {
      this.addClass('as-unread');
    } else {
      this.removeClass('as-unread');
    }
  },
  get: function get() {
    return this.hasClass('as-unread');
  }
};
NPItem.property.pin = {
  set: function set(value) {
    if (value) {
      this.addClass('as-pin');
    } else {
      this.removeClass('as-pin');
    }
  },
  get: function get() {
    return this.hasClass('as-pin');
  }
};
NPItem.property.quickmenu = {
  set: function set(value) {
    value = value || null;
    if (this.quickmenuInstance) {
      this.quickmenuInstance.remove();
    }
    this._quickmenu = value;
    if (value) {
      this.$quickMenuCtn.removeStyle('display');
      this.quickmenuInstance = new _QuickMenu.QuickMenuInstance(this.$quickMenuBtn, Object.assign({
        triggerEvent: 'click',
        anchor: [2, 5],
        menuCtn: this.$quickMenuCtn
      }, value));
    } else {
      this.$quickMenuCtn.addStyle('display', 'none');
    }
  },
  get: function get() {
    return this._quickmenu;
  }
};

/**
 * similar to NPDropdownButton interface
 * @extends AElement
 * @constructor
 */
function MNPNotificationVirtualDropdown() {
  var _this5 = this;
  document.body.appendChild(this);
  this.$body = (0, _ACore.$)('.as-mb-vd-body', this);
  this.$headerBar = (0, _ACore.$)('.as-mb-vd-header-bar', this).on('action', this.eventHandler.action);
  _MHeaderBar["default"].on('clicknotification', function () {
    _this5.open();
  });
}
MNPNotificationVirtualDropdown.tag = 'MNPNotificationVirtualDropdown'.toLowerCase();
MNPNotificationVirtualDropdown.render = function () {
  return (0, _ACore._)({
    extendEvent: ['click', 'close', 'open'],
    "class": ['as-mobile-notification-virtual-dropdown', 'as-hidden'],
    child: [{
      tag: _MHeaderBar["default"],
      "class": 'as-mb-vd-header-bar',
      props: {
        actionIcon: 'span.mdi.mdi-arrow-left'
      }
    }, {
      "class": 'as-mb-vd-body'
    }]
  });
};
MNPNotificationVirtualDropdown.prototype.open = function () {
  this.emit('click', {
    type: 'click'
  }, this);
  if (!this.hasClass('as-hidden')) return;
  this.removeClass('as-hidden');
  this.emit('open', {
    type: 'close'
  }, this);
};
MNPNotificationVirtualDropdown.prototype.close = function () {
  this.emit('click', {
    type: 'click'
  }, this);
  if (this.hasClass('as-hidden')) return;
  this.addClass('as-hidden');
  this.emit('close', {
    type: 'close'
  }, this);
};
MNPNotificationVirtualDropdown.prototype.getChildNodes = function () {
  return Array.prototype.slice.call(this.$body.childNodes);
};
MNPNotificationVirtualDropdown.prototype.getChildren = function () {
  return this.getChildNodes();
};
MNPNotificationVirtualDropdown.prototype.getFirstChild = function () {
  return this.$body.firstChild;
};
MNPNotificationVirtualDropdown.prototype.getLastChild = function () {
  return this.$body.lastChild;
};
MNPNotificationVirtualDropdown.prototype.addChild = function (elt) {
  var _this$$body;
  if (elt.tagName === 'H3' || elt.tagName === 'H4') {
    this.$headerBar.title = elt.innerText;
    elt.addStyle('display', 'none');
  }
  return (_this$$body = this.$body).addChild.apply(_this$$body, arguments);
};
MNPNotificationVirtualDropdown.property = {};
MNPNotificationVirtualDropdown.property.count = {
  set: function set(value) {
    _MHeaderBar["default"].notificationCount = value;
  },
  get: function get() {
    return _MHeaderBar["default"].notificationCount;
  }
};
MNPNotificationVirtualDropdown.property.quickmenu = {
  set: function set(value) {
    this.$headerBar.quickmenu = value;
  },
  get: function get() {
    return this.$headerBar.quickmenu;
  }
};
MNPNotificationVirtualDropdown.eventHandler = {};
MNPNotificationVirtualDropdown.eventHandler.action = function () {
  this.close();
};
_ACore["default"].install(MNPNotificationVirtualDropdown);

/***/ }),

/***/ 94471:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends  AElement
 * @constructor
 */
function NumberSpanInput() {
  this.ev_keydown = this.ev_keydown.bind(this);
  this.on('keydown', this.ev_keydown, true);
  this.readOnly = false;
  this.value = 0;
  this.on('paste', function (event) {
    event.preventDefault();
  });
}
NumberSpanInput.tag = 'NumberSpanInput'.toLowerCase();
NumberSpanInput.render = function () {
  return _({
    tag: 'span',
    child: {
      text: ''
    }
  });
};
NumberSpanInput.prototype.selectAll = function () {
  var sel;
  if (window.getSelection) {
    sel = window.getSelection();
    sel.removeAllRanges();
    var range = document.createRange();
    range.selectNode(this.childNodes[this.childNodes.length - 1]);
    sel.addRange(range);
  } else {
    console.error("TimePicker: Not support!");
  }
};
NumberSpanInput.prototype.selectEnd = function () {
  var sel;
  if (window.getSelection) {
    sel = window.getSelection();
    sel.removeAllRanges();
    this._autoAddZero();
    var length = this.firstChild.data.length;
    var range = document.createRange();
    range.setStart(this.firstChild, length);
    range.setEnd(this.firstChild, length);
    sel.addRange(range);
  } else {
    console.error("TimePicker: Not support!");
  }
};
NumberSpanInput.prototype.selectNone = function () {
  var sel;
  if (document.activeElement === this) {
    sel = window.getSelection();
    sel.removeAllRanges();
  }
};
NumberSpanInput.prototype._autoAddZero = function () {
  if (!this.firstChild) {
    this.addChild(_({
      text: '0'
    }));
  }
};

/***
 *
 * @param {KeyboardEvent} event
 */
NumberSpanInput.prototype.ev_keydown = function (event) {
  if (event.key && event.key.length == 1 && !event.ctrlKey && !event.altKey) {
    if (event.key.match(/[0-9]/)) {} else {
      event.preventDefault();
    }
  } else if (event.key == 'Enter') {
    event.preventDefault();
  }
};
NumberSpanInput.property = {};
NumberSpanInput.property.readOnly = {
  set: function set(value) {
    this.contentEditable = !value;
  },
  get: function get() {
    return this.contentEditable === false || this.contentEditable === 'false';
  }
};

/***
 *
 * @type {NumberSpanInput}
 */
NumberSpanInput.property.value = {
  set: function set(value) {
    this._autoAddZero();
    this.firstChild.data = value + '';
  },
  get: function get() {
    return this.firstChild && this.firstChild.data || '';
  }
};
_ACore["default"].install(NumberSpanInput);
var _default = NumberSpanInput;
exports["default"] = _default;

/***/ }),

/***/ 95878:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(6032);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _Dom = __webpack_require__(64821);
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _stringGenerate = __webpack_require__(10713);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var $$ = _ACore["default"].$$;

/***
 * @extends Hanger
 * @constructor
 */
function OnScreenWidget() {
  this.id = 'unset-id-' + (0, _stringGenerate.randomIdent)();
  this.on({
    dragstart: this.eventHandler.widgetStartDrag,
    drag: this.eventHandler.widgetDrag,
    dragend: this.eventHandler.widgetDragEnd
  });
  this.addEventListener('click', function (event) {
    if (!this._preventClick) this.emit('click', event, this);
  });
  this.$attachhook = _('attachhook').addTo(this);
  this.$attachhook.on('attached', this.eventHandler.attached);
  this.config = null;
}
OnScreenWidget.tag = 'OnScreenWidget'.toLowerCase();
OnScreenWidget.render = function () {
  return _({
    tag: 'hanger',
    extendEvent: 'click',
    "class": ['as-onscreen-widget', 'as-size-loading'],
    props: {
      hangOn: 3
    }
  });
};
OnScreenWidget.prototype.configPrefix = 'on-screen-widget-';
OnScreenWidget.prototype._genConfig = function () {
  this._widgetBound = this.getBoundingClientRect();
  var screenSize = (0, _Dom.getScreenSize)();
  return {
    cx: (this._widgetBound.left + this._widgetBound.width / 2) * 100 / screenSize.width,
    cy: (this._widgetBound.top + this._widgetBound.height / 2) * 100 / screenSize.height
  };
};
OnScreenWidget.prototype._saveConfig = function () {
  var id = this.id || '';
  if (id.startsWith('unset-id-') || !this.config) return;
  localStorage.setItem(this.configPrefix + id, JSON.stringify(this.config));
};
OnScreenWidget.prototype._loadConfig = function () {
  var id = this.id || '';
  if (id.startsWith('unset-id-')) return;
  var config = null;
  try {
    config = JSON.parse(localStorage.getItem(this.configPrefix + id));
    if (_typeof(config) !== "object" || typeof config.cx !== "number" || typeof config.cy !== 'number') {
      config = this.config || this._genConfig();
    }
  } catch (error) {
    config = this.config || this._genConfig();
  }
  var cx = config.cx || 0;
  var cy = config.cy || 0;
  this.addStyle({
    '--cx': cx / 100,
    '--cy': cy / 100
  });
  this.config = config;
};
OnScreenWidget.prototype._updateCSSSize = function () {
  var bound = this.getBoundingClientRect();
  this.addStyle({
    '--client-height': bound.height + 'px',
    '--client-width': bound.width + 'px'
  });
  this.removeClass('as-size-loading');
};

/***
 *
 * @type {OnScreenWidget|{}}
 */
OnScreenWidget.eventHandler = {};
OnScreenWidget.eventHandler.attached = function () {
  var images = $$('img', this);
  var syncs = images.map(function (img) {
    if (img.classList.contains('absol-attachhook')) return Promise.resolve();
    return (0, _Dom.waitImageLoaded)(img, 100);
  });
  var thisW = this;
  Promise.all(syncs).then(function () {
    thisW._updateCSSSize();
    thisW._loadConfig();
  });
};
OnScreenWidget.eventHandler.widgetStartDrag = function (event) {
  this._widgetBound = this.getBoundingClientRect();
  this._preventClick = true;
};
OnScreenWidget.eventHandler.widgetDrag = function (event) {
  event.preventDefault();
  var screenSize = (0, _Dom.getScreenSize)();
  var p0 = new _Vec["default"](this._widgetBound.left, this._widgetBound.top);
  var dv = event.currentPoint.sub(event.startingPoint);
  var p1 = p0.add(dv);
  var cx = (p1.x - 2) * 100 / (screenSize.width - this._widgetBound.width - 4);
  var cy = (p1.y - 2) * 100 / (screenSize.height - this._widgetBound.height - 4);
  cx = Math.max(0, Math.min(100, cx));
  cy = Math.max(0, Math.min(100, cy));
  this.addStyle({
    '--cx': cx / 100,
    '--cy': cy / 100
  });
  if (this.config) {
    this.config.cx = cx;
    this.config.cy = cy;
  }
};
OnScreenWidget.eventHandler.widgetDragEnd = function () {
  var thisWG = this;
  setTimeout(function () {
    thisWG._preventClick = false;
  }, 100);
  this._saveConfig();
};
_ACore["default"].install(OnScreenWidget);
var _default = OnScreenWidget;
exports["default"] = _default;

/***/ }),

/***/ 28217:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(43576);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _WindowBox = _interopRequireDefault(__webpack_require__(24405));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function OnScreenWindow() {
  var self = this;
  this._lastSize = {
    width: 0,
    height: 0
  };

  /***
   *
   * @type {WindowBox}
   */
  this.$windowBox = $(_WindowBox["default"].tag, this);
  _OOP["default"].drillProperty(this, this.$windowBox, 'windowTitle');
  _OOP["default"].drillProperty(this, this.$windowBox, 'windowActions');
  _OOP["default"].drillProperty(this, this.$windowBox, 'windowIcon');
  this.$windowBox.on('action', function (event) {
    self.emit('action', event, self);
  });
  this.$header = _({
    tag: _Hanger["default"].tag,
    elt: this.$windowBox.$header
  });
  this.$header.on('dragstart', this.eventHandler.dragStart.bind(this, this.$header, 'move'));

  //
  this.$bottomResizer = $('.absol-onscreen-window-resizer.absol-onscreen-window-resize-bottom', this);
  this.$bottomResizer.on('dragstart', this.eventHandler.dragStart.bind(this, this.$bottomResizer, 'bottom'));

  //
  this.$rightResizer = $('.absol-onscreen-window-resizer.absol-onscreen-window-resize-right', this);
  this.$rightResizer.on('dragstart', this.eventHandler.dragStart.bind(this, this.$rightResizer, 'right'));

  //
  this.$topResizer = $('.absol-onscreen-window-resizer.absol-onscreen-window-resize-top', this);
  this.$topResizer.on('dragstart', this.eventHandler.dragStart.bind(this, this.$topResizer, 'top'));
  this.$leftResizer = $('.absol-onscreen-window-resizer.absol-onscreen-window-resize-left', this);
  this.$leftResizer.on('dragstart', this.eventHandler.dragStart.bind(this, this.$leftResizer, 'left'));
  this.$bottomRightResizer = $('.absol-onscreen-window-resizer.absol-onscreen-window-resize-bottom-right', this);
  this.$bottomRightResizer.on('dragstart', this.eventHandler.dragStart.bind(this, this.$bottomRightResizer, 'bottomRight'));
  //
  this.$bottomLeftResizer = $('.absol-onscreen-window-resizer.absol-onscreen-window-resize-bottom-left', this);
  this.$bottomLeftResizer.on('dragstart', this.eventHandler.dragStart.bind(this, this.$bottomLeftResizer, 'bottomLeft'));
  //

  this.$topLeftResizer = $('.absol-onscreen-window-resizer.absol-onscreen-window-resize-top-left', this);
  this.$topLeftResizer.on('dragstart', this.eventHandler.dragStart.bind(this, this.$topLeftResizer, 'topLeft'));
  this.$topRightResizer = $('.absol-onscreen-window-resizer.absol-onscreen-window-resize-top-right', this);
  this.$topRightResizer.on('dragstart', this.eventHandler.dragStart.bind(this, this.$topRightResizer, 'topRight'));
  this.$attachhook = _('attachhook').addTo(this);
  this.$attachhook.requestUpdateSize = this.relocation.bind(this);
  this.$attachhook.on('error', function () {
    _Dom["default"].addToResizeSystem(this);
  });
}
OnScreenWindow.tag = 'OnScreenWindow'.toLowerCase();
OnScreenWindow.render = function () {
  return _({
    extendEvent: ['sizechange', 'drag', 'relocation', 'action'],
    "class": 'absol-onscreen-window',
    child: [{
      tag: _WindowBox["default"].tag,
      "class": 'as-window-box'
    }, 'hanger.absol-onscreen-window-resizer.absol-onscreen-window-resize-bottom', 'hanger.absol-onscreen-window-resizer.absol-onscreen-window-resize-top', 'hanger.absol-onscreen-window-resizer.absol-onscreen-window-resize-left', 'hanger.absol-onscreen-window-resizer.absol-onscreen-window-resize-right', 'hanger.absol-onscreen-window-resizer.absol-onscreen-window-resize-bottom-right', 'hanger.absol-onscreen-window-resizer.absol-onscreen-window-resize-bottom-left', 'hanger.absol-onscreen-window-resizer.absol-onscreen-window-resize-top-left', 'hanger.absol-onscreen-window-resizer.absol-onscreen-window-resize-top-right']
  });
};
OnScreenWindow.prototype.maybeSizeChange = function () {
  var bound = this.getBoundingClientRect();
  if (this._lastSize.width !== bound.width || this._lastSize.height !== bound.height) {
    this._lastSize = bound;
    window.dispatchEvent(new Event('resize'));
    this.emit('sizechange', {
      size: bound,
      target: this,
      type: 'sizechange'
    }, this);
  }
};
OnScreenWindow.prototype.moveFators = {
  move: {
    x: 1,
    y: 1,
    /***
     * @this OnScreenWindow
     * @param event
     */
    canMove: function canMove(event) {
      return true;
    },
    cursor: 'move'
  },
  top: {
    y: 1,
    height: -1
  },
  bottom: {
    height: 1,
    cursor: 's-resize'
  },
  bottomRight: {
    height: 1,
    width: 1,
    cursor: 'se-resize'
  },
  bottomLeft: {
    height: 1,
    width: -1,
    x: 1,
    cursor: 'sw-resize'
  },
  topLeft: {
    height: -1,
    width: -1,
    x: 1,
    y: 1,
    cursor: 'nw-resize'
  },
  topRight: {
    height: -1,
    width: 1,
    y: 1,
    cursor: 'ne-resize'
  },
  right: {
    width: 1,
    cursor: 'e-resize'
  },
  left: {
    x: 1,
    width: -1,
    cursor: 'w-resize'
  }
};

/***
 *
 * @type {{}}
 * @memberOf OnScreenWindow#
 */
OnScreenWindow.eventHandler = {};

/***
 * @this OnScreenWindow
 * @param {Hanger} elt
 * @param fN
 * @param event
 */
OnScreenWindow.eventHandler.dragStart = function (elt, fN, event) {
  var factor = this.moveFators[fN];
  if (factor.canMove && !factor.canMove.call(this, event)) return;
  this.movingData = {
    factor: factor,
    screenSize: (0, _Dom.getScreenSize)(),
    modal: _('.absol-onscreen-window-moving-modal').addStyle('cursor', factor.cursor).addTo(document.body),
    elt: elt,
    bound: this.getBoundingClientRect()
  };
  elt.on('drag', this.eventHandler.drag).on('dragend', this.eventHandler.dragEnd);
};

/***
 * @this OnScreenWindow
 * @param event
 */
OnScreenWindow.eventHandler.drag = function (event) {
  var movingData = this.movingData;
  var factor = movingData.factor;
  var bound = movingData.bound;
  var screenSize = movingData.screenSize;
  var dv = event.currentPoint.sub(event.startingPoint);
  var x, y, width, height;
  if (factor.x) {
    x = dv.x * factor.x + bound.left;
    x = Math.min(x, screenSize.width - bound.width);
    x = Math.max(0, x);
    this.addStyle('left', x + 'px');
  }
  if (factor.y) {
    y = dv.y * factor.y + bound.top;
    y = Math.min(y, screenSize.height - bound.height);
    y = Math.max(0, y);
    this.addStyle('top', y + 'px');
  }
  if (factor.width) {
    width = dv.x * factor.width + bound.width;
    this.addStyle('width', width + 'px');
  }
  if (factor.height) {
    height = dv.y * factor.height + bound.height;
    this.addStyle('height', height + 'px');
  }
  this.emit('relocation', {
    type: 'relocation',
    target: this
  }, this);
  this.maybeSizeChange();
};

/***
 * @this OnScreenWindow
 * @param event
 */
OnScreenWindow.eventHandler.dragEnd = function (event) {
  var movingData = this.movingData;
  var elt = movingData.elt;
  elt.off('drag', this.eventHandler.drag).off('dragend', this.eventHandler.dragEnd);
  setTimeout(function () {
    movingData.modal.remove();
  }, 50);
  this.movingData = null;
};
['addChild', 'addChildBefore', 'addChildAfter', 'clearChild', 'findChildBefore', 'findChildAfter'].forEach(function (key) {
  OnScreenWindow.prototype[key] = function () {
    return this.$windowBox[key].apply(this.$windowBox, arguments);
  };
});
OnScreenWindow.property = {};
OnScreenWindow.prototype.relocation = function () {
  var bound = this.getBoundingClientRect();
  var screenSize = _Dom["default"].getScreenSize();
  var isRelocated = false;
  if (bound.bottom >= screenSize.height) {
    this.addStyle('top', Math.max(0, screenSize.height - bound.height) + 'px');
    isRelocated = true;
  }
  if (bound.right >= screenSize.width) {
    this.addStyle('left', Math.max(0, screenSize.width - bound.width) + 'px');
    isRelocated = true;
  }
  if (isRelocated) {
    this.emit('relocation', {
      type: 'relocation',
      target: this
    }, this);
  }
};
_ACore["default"].install(OnScreenWindow);
var _default = OnScreenWindow;
exports["default"] = _default;

/***/ }),

/***/ 18549:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
__webpack_require__(63386);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function PageIndicator() {
  this._idx = -1;
  this.length = 0;
  this.idx = -1;
}
PageIndicator.tag = 'PageIndicator'.toLowerCase();
PageIndicator.render = function () {
  return _({
    "class": 'as-page-indicator',
    child: []
  });
};
PageIndicator.property = {};
PageIndicator.property.length = {
  set: function set(value) {
    value = value || 0;
    value = Math.max(0, value);
    while (this.childNodes.length < value) {
      this.addChild(_('button.as-page-indicator-item'));
    }
    while (this.childNodes.length > value) {
      this.removeChild(this.childNodes[this.childNodes.length - 1]);
    }
    this.idx = this._idx; //update
  },

  get: function get() {
    return this.childNodes.length;
  }
};
PageIndicator.property.idx = {
  set: function set(value) {
    var activeElt = this.childNodes[this._idx];
    if (activeElt) activeElt.removeClass('as-active');
    this._idx = value;
    activeElt = this.childNodes[this._idx];
    if (activeElt) activeElt.addClass('as-active');
  },
  get: function get() {
    return this._idx;
  }
};
_ACore["default"].install(PageIndicator);
var _default = PageIndicator;
exports["default"] = _default;

/***/ }),

/***/ 49826:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(65461);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function PageSelector() {
  this.$pageCount = $('.absol-page-count', this);
  this.$pageInput = $('.absol-page-number-input input', this);
  this.$pageInput.on('keyup', this.eventHandler.pressEnterKey).on('change', this.eventHandler.pressEnterKey);
  this.$prevBtn = $('li.page-previous', this);
  this.$nextBtn = $('li.page-next', this);
  this.$firstBtn = $('li.page-first', this);
  this.$lastBtn = $('li.page-last', this);
  this.$nextBtn.on('click', this.eventHandler.clickNext);
  this.$prevBtn.on('click', this.eventHandler.clickPrev);
  this.$firstBtn.on('click', this.eventHandler.clickFirst);
  this.$lastBtn.on('click', this.eventHandler.clickLast);
  this.$buttonContainer = $('.absol-page-number-buttons', this);
  this._buttons = [];
  this._pageOffset = 1;
  this._selectedIndex = 1;
  this._pageCount = 1;
  this._pageRange = 1;
  this.$pageInput.value = this._selectedIndex;
}
PageSelector.tag = 'PageSelector'.toLowerCase();
PageSelector.render = function () {
  return _({
    "class": ['absol-page-selector'],
    extendEvent: ['change'],
    child: [{
      "class": 'absol-page-number-input',
      child: [{
        tag: 'label',
        child: {
          text: "Page"
        }
      }, {
        tag: 'input',
        attr: {
          type: 'text'
        }
      }, {
        tag: 'span',
        child: {
          text: '/ '
        }
      }, {
        tag: 'span',
        "class": 'absol-page-count',
        child: {
          text: '1'
        }
      }]
    }, {
      tag: 'ul',
      "class": 'absol-page-number-buttons',
      child: [{
        tag: 'li',
        "class": "page-first",
        attr: {
          title: 'First'
        },
        child: 'a.mdi.mdi-chevron-double-left'
      }, {
        tag: 'li',
        attr: {
          title: 'Previous'
        },
        "class": 'page-previous',
        child: 'a.mdi.mdi-chevron-left'
      }, {
        tag: 'li',
        attr: {
          title: 'Next'
        },
        "class": 'page-next',
        child: 'a.mdi.mdi-chevron-right'
      }, {
        tag: 'li',
        attr: {
          title: 'Last'
        },
        "class": 'page-last',
        child: 'a.mdi.mdi-chevron-double-right'
      }]
    }]
  });
};
PageSelector.eventHandler = {};

/**
 *
 * @param {KeyboardEvent} event
 */
PageSelector.eventHandler.pressEnterKey = function (event) {
  if (event.key !== 'Enter' && event.type !== 'change') return;
  var index = parseInt(this.$pageInput.value.trim(), 10);
  if (index < 1 || index > this._pageCount) {
    index = Math.max(1, Math.min(this._pageCount, index));
    this.$pageInput.value = index;
  }
  this.selectPage(index, true);
};
PageSelector.eventHandler.clickLast = function (event) {
  this.selectPage(this._pageCount, true);
};
PageSelector.eventHandler.clickFirst = function (event) {
  this.selectPage(1, true);
};
PageSelector.eventHandler.clickNext = function (event) {
  if (this._selectedIndex == this._pageCount) return;
  this.selectPage(this._selectedIndex + 1, true);
};
PageSelector.eventHandler.clickPrev = function (event) {
  if (this._selectedIndex == 1) return;
  this.selectPage(this._selectedIndex - 1, true);
};
PageSelector.eventHandler.clickIndex = function (index, event) {
  this.selectPage(index + this._pageOffset, true);
};
PageSelector.prototype._createButton = function (index) {
  var button = _({
    tag: 'li',
    "class": 'absol-page-number',
    child: {
      tag: 'a',
      attr: {
        'data-index-text': index + 1
      }
    },
    on: {
      click: PageSelector.eventHandler.clickIndex.bind(this, index)
    }
  });
  this.$buttonContainer.addChildBefore(button, this.$nextBtn);
  return button;
};
PageSelector.prototype.setPageRange = function (pageCount) {
  this._pageRange = pageCount;
  while (this._buttons.length < pageCount) {
    this._buttons.push(this._createButton(this._buttons.length));
  }
  while (this._buttons.length > pageCount) {
    this._buttons.pop().remove();
  }
};
PageSelector.prototype.setStartPage = function (index) {
  this._buttons.forEach(function (e, i) {
    e.firstChild.attr('data-index-text', i + index + '');
  });
  this._pageOffset = index;
};
PageSelector.prototype.selectPage = function (index, userActive) {
  if (index == this._selectedIndex) this.setStartPage(index - parseInt(this._pageRange / 2));
  if (index >= this._pageOffset + this._pageRange) this.setStartPage(index - parseInt(this._pageRange / 2));
  if (index > this._selectedIndex) {
    if (index == this._pageOffset + this._pageRange - 1) this.setStartPage(index - parseInt(this._pageRange / 2));
  }
  if (index < this._selectedIndex) {
    if (index == this._pageOffset) this.setStartPage(index - parseInt(this._pageRange / 2));
  }
  if (index > this._pageCount - parseInt(this._pageRange / 2)) this.setStartPage(this._pageCount - this._pageRange + 1);
  if (index <= parseInt(this._pageRange / 2)) this.setStartPage(1);
  var pageOffset = this._pageOffset;
  this._buttons.forEach(function (e, i) {
    if (i + pageOffset == index) {
      e.addClass('active');
    } else {
      e.removeClass('active');
    }
  });
  if (this._selectedIndex != index) {
    this._selectedIndex = index;
    this.$pageInput.value = index;
    this.emit('change', {
      target: this,
      selectedIndex: index,
      userActive: !!userActive
    }, this);
  }
};
PageSelector.prototype.getSelectedPage = function () {
  return this._selectedIndex;
};
PageSelector.prototype.setPageCount = function (count) {
  this._pageCount = count;
  this.$pageCount.firstChild.data = '' + count;
  this.attr('data-page-count', count);
};
PageSelector.property = {};
PageSelector.property.selectedIndex = {
  set: function set(value) {
    this.selectPage(value, false);
  },
  get: function get() {
    return this._selectedIndex;
  }
};
PageSelector.property.pageCount = {
  set: function set(value) {
    this.setPageCount(value);
  },
  get: function get() {
    return this._pageCount;
  }
};
PageSelector.property.pageOffset = {
  set: function set(value) {
    this.setStartPage(value);
  },
  get: function get() {
    return this._pageOffset;
  }
};
PageSelector.property.pageRange = {
  set: function set(value) {
    this.setPageRange(value);
  },
  get: function get() {
    return this._pageRange;
  }
};
PageSelector.property.simpleMode = {
  set: function set(value) {
    if (value) {
      this.addClass('as-simple-mode');
    } else {
      this.removeClass('as-simple-mode');
    }
  },
  get: function get() {
    return this.hasClass('as-simple-mode');
  }
};
PageSelector.prototype.init = function (props) {
  props = props || {};
  props.pageOffset = props.pageOffset || 1;
  props.pageRange = props.pageRange || 5;
  props.pageCount = props.pageCount || 15;
  props.selectedIndex = typeof props.selectedIndex == "number" ? props.selectedIndex : props.pageOffset;
  if (props.pageCount < props.pageRange) props.pageRange = props.pageCount;
  this.setPageCount(props.pageCount);
  this.setPageRange(props.pageRange);
  this.setStartPage(props.pageOffset);
  this.selectPage(props.selectedIndex);
  props = Object.assign({}, props);
  delete props.pageOffset;
  delete props.pageRange;
  delete props.pageCount;
  delete props.selectedIndex;
  Object.assign(this, props);
};
_ACore["default"].install(PageSelector);
var _default = PageSelector;
exports["default"] = _default;

/***/ }),

/***/ 84943:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(95945);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends AElement
 * @constructor
 */
function PathMenu() {
  this._path = [];
  this.$items = [];
}
PathMenu.tag = 'PathMenu'.toLowerCase();
PathMenu.render = function () {
  return (0, _ACore._)({
    attr: {
      tabindex: '1'
    },
    extendEvent: ['press', 'change'],
    "class": 'as-path-menu'
  });
};
PathMenu.prototype._makeItem = function (data, idx) {
  var self = this;
  var button = (0, _ACore._)({
    "class": ['as-ribbon-split-button', 'as-path-menu-item'],
    child: {
      "class": 'as-ribbon-split-button-content',
      child: [{
        tag: 'button',
        attr: {
          'tabindex': '-1'
        },
        "class": 'as-ribbon-split-button-primary',
        child: {
          tag: 'span',
          "class": 'as-ribbon-split-button-text',
          child: {
            text: (data.name || data.text || '') + ''
          }
        }
      }, {
        tag: 'button',
        attr: {
          'tabindex': '-1'
        },
        "class": 'as-ribbon-split-button-extend',
        child: ['span.mdi.mdi-chevron-right']
      }]
    }
  });
  button.on('mouseenter', function () {
    if (document.activeElement && _AElement["default"].prototype.isDescendantOf.call(document.activeElement, self) && self.hasClass('as-opening-item')) {
      if (button.quickMenu) button.quickMenu.open();
    }
  });
  var extendIconElt = (0, _ACore.$)('.as-ribbon-split-button-extend .mdi', button);
  var primaryBtn = (0, _ACore.$)('.as-ribbon-split-button-primary', button).on('click', function () {
    self.emit('press', {
      target: self,
      pathItem: data,
      index: idx
    }, self);
  });

  //as-ribbon-split-button-icon
  var icon = null;
  if (data.icon) {
    icon = (0, _ACore._)(data.icon);
  } else if (data.iconSrc) {
    icon = (0, _ACore._)({
      tag: 'img',
      props: {
        src: data.iconSrc
      }
    });
  }
  if (icon) {
    if (icon.parentElement) icon = (0, _ACore.$)(icon.cloneNode(true));
    icon.addClass('as-ribbon-split-button-icon');
    primaryBtn.addChildBefore(icon, primaryBtn.firstChild);
  }
  var quickTrigger = (0, _ACore.$)('.as-ribbon-split-button-extend', button);
  if (data.items && data.items.length > 0) {
    button.quickMenu = _QuickMenu["default"].toggleWhenClick(quickTrigger, {
      getMenuProps: function getMenuProps() {
        return {
          items: data.items.map(function (it, menuIndex) {
            if (typeof it === "string") return it;
            if (_typeof(it) === "object") {
              if (it.icon || it.iconSrc || it.name || it.text) {
                return {
                  text: it.name || it.text,
                  menuIndex: menuIndex,
                  icon: it.iconSrc ? {
                    tag: 'img',
                    props: {
                      src: it.iconSrc
                    }
                  } : it.icon || undefined,
                  extendStyle: it.extendStyle || {},
                  extendClass: it.extendClass || []
                };
              }
            }
            return it;
          })
        };
      },
      anchor: [1, 6, 0, 7],
      onOpen: function onOpen() {
        self.addClass('as-opening-item');
        extendIconElt.addClass('mdi-rotate-90');
      },
      onClose: function onClose() {
        self.removeClass('as-opening-item');
        extendIconElt.removeClass('mdi-rotate-90');
      },
      onSelect: function onSelect(item) {
        var dataItem = data.items[item.menuIndex];
        self.emit('change', {
          target: self,
          pathItem: data,
          item: dataItem,
          index: idx
        }, self);
        button.removeClass('as-open');
      }
    });
  } else {
    button.addClass('as-has-no-item');
  }
  return button;
};
PathMenu.property = {};
PathMenu.property.path = {
  set: function set(path) {
    var _this = this;
    this._path = path || [];
    this.$items.forEach(function (elt) {
      return elt.remove();
    });
    this.$items = this._path.map(function (it, i) {
      return _this._makeItem(it, i);
    });
    this.addChild(this.$items);
  },
  get: function get() {
    return this._path;
  }
};
_ACore["default"].install(PathMenu);
var _default = PathMenu;
exports["default"] = _default;

/***/ }),

/***/ 32555:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(95945);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function PathView() {
  this._items = [];
  this.$items = [];
}
PathView.tag = 'PathView'.toLowerCase();
PathView.render = function () {
  return (0, _ACore._)({
    extendEvent: ['press'],
    "class": 'as-path-view'
  });
};
PathView.property = {};
PathView.property.items = {
  set: function set(value) {
    var _this = this;
    this.clearChild();
    this._items = value || [];
    this.$items = this._items.map(function (item, i, array) {
      item = item || {};
      var $item = (0, _ACore._)({
        tag: 'button',
        "class": ['as-path-view-item'],
        child: []
      });
      if (item.icon) {
        $item.addChild((0, _ACore._)(item.icon).addClass('as-path-view-item-icon'));
      }
      if (item.text || item.name) {
        $item.addChild((0, _ACore._)({
          "class": 'as-path-view-item-text',
          child: {
            text: item.text || item.name || ''
          }
        }));
      }
      if (i < array.length - 1) {
        $item.addChild((0, _ACore._)({
          "class": 'as-path-view-item-arrow',
          child: 'span.mdi.mdi-chevron-right'
        }));
      }
      $item.on('click', function (event) {
        _this.emit('press', {
          item: item,
          index: i,
          items: array,
          type: 'click',
          value: item.value,
          originalEvent: event
        });
      });
      _this.$items.push($item);
      return $item;
    });
    this.addChild(this.$items);
  },
  get: function get() {
    return this._items;
  }
};
_ACore["default"].install(PathView);
var _default = PathView;
exports["default"] = _default;

/***/ }),

/***/ 11027:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _utils = __webpack_require__(84512);
__webpack_require__(62390);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @extends AElement
 * @constructor
 */
function PickingList() {
  this._items = [];
  this._values = [];

  /**
   * @type {PLItem[]}
   */
  this.$items = [];

  /**
   * @type {any[]}
   * @name values
   * @memberOf PickingList#
   */

  /**
   * @type {{text:string, value}[]}
   * @name items
   * @memberOf PickingList#
   */
}

PickingList.tag = 'PickingList'.toLowerCase();
PickingList.render = function () {
  return (0, _ACore._)({
    "class": 'as-picking-list',
    extendEvent: 'change',
    child: []
  });
};
PickingList.property = {};
PickingList.property.items = {
  set: function set(items) {
    var _this = this;
    items = items || [];
    this._items = items;
    this.$items.forEach(function (item) {
      item.remove();
    });
    var valuedDict = this._values.reduce(function (ac, cr) {
      ac[(0, _utils.keyStringOf)(cr)] = true;
      return ac;
    }, {});
    this.$items = items.map(function (it) {
      var elt = (0, _ACore._)({
        tag: PLItem,
        props: {
          text: it.text + '',
          value: it.value,
          checked: valuedDict[(0, _utils.keyStringOf)(it.value)]
        },
        on: {
          click: function click() {
            elt.checked = !elt.checked;
            _this.emit('change', {
              target: _this,
              type: 'change'
            }, _this);
          }
        }
      });
      return elt;
    });
    this.addChild(this.$items);
  },
  get: function get() {
    return this._items;
  }
};
PickingList.property.values = {
  set: function set(values) {
    this._values = values || [];
    var valuedDict = this._values.reduce(function (ac, cr) {
      ac[(0, _utils.keyStringOf)(cr)] = true;
      return ac;
    }, {});
    this.$items.forEach(function (item) {
      item.checked = !!valuedDict[(0, _utils.keyStringOf)(item.value)];
    });
  },
  get: function get() {
    return this.$items.reduce(function (ac, itemElt) {
      if (itemElt.checked) {
        ac.push(itemElt.value);
      }
      return ac;
    }, []);
  }
};
PickingList.property.selectedItems = {
  get: function get() {
    var valuedDict = this._values.reduce(function (ac, cr) {
      ac[(0, _utils.keyStringOf)(cr)] = true;
      return ac;
    }, {});
    return (this._items || []).filter(function (it) {
      return valuedDict[(0, _utils.keyStringOf)(it.value)];
    });
  }
};
var _default = PickingList;
exports["default"] = _default;
_ACore["default"].install(PickingList);

/**
 * @extends AElement
 * @constructor
 */
function PLItem() {
  this.$text = (0, _ACore.$)('.as-picking-list-item-text', this);
}
PLItem.tag = 'PLItem'.toLowerCase();
PLItem.render = function () {
  return (0, _ACore._)({
    "class": 'as-picking-list-item',
    child: [{
      "class": 'as-picking-list-item-text',
      child: {
        text: ''
      }
    }, {
      "class": 'as-picking-list-item-checked',
      child: 'span.mdi.mdi-check'
    }]
  });
};
PLItem.property = {};
PLItem.property.text = {
  set: function set(value) {
    this.$text.firstChild.data = value + '';
  },
  get: function get() {
    return this.$text.firstChild.data;
  }
};
PLItem.property.value = {
  set: function set(value) {
    this._value = value;
    this.attr('data-value', (0, _utils.keyStringOf)(value));
  },
  get: function get() {
    return this._value;
  }
};
PLItem.property.checked = {
  set: function set(value) {
    if (value) {
      this.addClass('as-checked');
    } else {
      this.removeClass('as-checked');
    }
  },
  get: function get() {
    return this.hasClass('as-checked');
  }
};

/***/ }),

/***/ 85602:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _AutoCompleteInput = _interopRequireDefault(__webpack_require__(54845));
var _PlaceSearchAutoCompleteAdapter = _interopRequireDefault(__webpack_require__(60335));
__webpack_require__(9656);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AutoCompleteInput
 * @constructor
 */
function PlaceSearchAutoCompleteInput() {
  this.$service = (0, _ACore._)('.as-place-search-auto-complete-input-service');
  this.insertBefore(this.$service, null);
  this.adapter = new _PlaceSearchAutoCompleteAdapter["default"](this);
}
PlaceSearchAutoCompleteInput.tag = 'PlaceSearchAutoCompleteInput'.toLowerCase();
PlaceSearchAutoCompleteInput.render = function () {
  return (0, _ACore._)({
    tag: _AutoCompleteInput["default"].tag
  }, true);
};
_ACore["default"].install(PlaceSearchAutoCompleteInput);
var _default = PlaceSearchAutoCompleteInput;
exports["default"] = _default;

/***/ }),

/***/ 97252:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Element = _interopRequireDefault(__webpack_require__(55781));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends {AElement}
 * @constructor
 */
function PositionTracker() {
  this.defineEvent('positionchange');
  this.$trackScrollParents = [];
  this._scrollTrackEventHandler = this.notifyPositionChange.bind(this);
}
PositionTracker.tag = 'PositionTracker'.toLowerCase();

/***
 *
 * @return {AElement}
 */
PositionTracker.render = function () {
  return (0, _ACore._)('div');
};
PositionTracker.prototype.notifyPositionChange = function (event) {
  this.emit('positionchange', {
    type: 'positionchange',
    originEvent: event
  });
};
PositionTracker.prototype.startTrackPosition = function () {
  if (this.$trackScrollParents.length > 0) this.stopTrackPosition();
  var trackElt = this;
  while (trackElt) {
    if (trackElt.addEventListener) trackElt.addEventListener('scroll', this._scrollTrackEventHandler, false);else trackElt.attachEvent('onscroll', this._scrollTrackEventHandler, false);
    this.$trackScrollParents.push(trackElt);
    trackElt = trackElt.parentElement;
  }
  if (document.addEventListener) {
    document.addEventListener('scroll', this._scrollTrackEventHandler, false);
  } else {
    document.attachEvent('onscroll', this._scrollTrackEventHandler, false);
  }
  this.$trackScrollParents.push(document);
};
PositionTracker.prototype.stopTrackPosition = function () {
  var trackElt;
  for (var i = 0; i < this.$trackScrollParents.length; ++i) {
    trackElt = this.$trackScrollParents[i];
    if (trackElt.removeEventListener) trackElt.removeEventListener('scroll', this._scrollTrackEventHandler, false);else trackElt.dettachEvent('onscroll', this._scrollTrackEventHandler, false);
  }
  this.$trackScrollParents = [];
};
_ACore["default"].install(PositionTracker);
var _default = PositionTracker;
exports["default"] = _default;

/***/ }),

/***/ 76606:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(80441);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _file = __webpack_require__(54134);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _printer = __webpack_require__(97397);
var _PrintSerialHandlers = __webpack_require__(1162);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var textDelay = _BrowserDetector["default"].isSafari ? 100 : 1;

/***
 * @extends AElement
 * @constructor
 */
function PreInput() {
  this.defineEvent(['pasteimg', 'pastetext', 'change']);
  this.on('paste', this.eventHandler.paste);
  this.on('keydown', this.eventHandler.keydown);
  this.history = [];
  this.value = '';
  this.historyIndex = -1;
  this.changePendingEvent = null;
  this.commitChange('', 0);
}
PreInput.tag = 'preinput';
PreInput.render = function () {
  return _({
    tag: 'pre',
    "class": 'as-preinput',
    attr: {
      contenteditable: 'true'
    },
    child: 'br'
  });
};
PreInput.prototype.notifyChange = function (data, originalEvent) {
  this.emit('change', Object.assign({
    type: 'change',
    target: this,
    originalEvent: originalEvent || this.changePendingEvent
  }, data));
  this.changePendingEvent = null;
};
PreInput.prototype.applyData = function (text, offset) {
  var textNode = _({
    text: text
  });
  this.clearChild().addChild(textNode).addChild(_('br'));
  if (document.activeElement === this && this.isDescendantOf(document.body)) {
    if (document.getSelection) {
      var sel = document.getSelection();
      sel.removeAllRanges();
      var range = document.createRange();
      if (typeof offset == 'number') {
        range.setStart(textNode, Math.min(text.length, offset));
      } else {
        range.setStart(textNode, Math.min(text.length, offset.start));
        range.setEnd(textNode, Math.min(text.length, offset.end));
      }
      sel.addRange(range);
      this.scrollIntoRange(range);
    } else {
      console.error("PreInput: Not support!");
    }
  }
};
PreInput.prototype.select = function (offset) {
  if (document.activeElement !== this) this.focus();
  this.applyData(this.value, offset);
};
PreInput.prototype.scrollIntoRange = function (range) {
  var elementBound = range.getBoundingClientRect();
  var viewportBound = this.getBoundingClientRect();
  var dBottom = 0;
  if (range.startContainer && range.startContainer.data && range.startContainer.data.charAt(range.startContainer.data.length - 1) == '\n') dBottom += this.getFontSize() * 1.5;
  var currentScrollTop = this.scrollTop;
  var newScrollTop = currentScrollTop;
  if (elementBound.bottom + dBottom > viewportBound.bottom) {
    newScrollTop = currentScrollTop + (elementBound.bottom + dBottom - viewportBound.bottom);
  }
  if (elementBound.top < viewportBound.top) {
    newScrollTop = currentScrollTop - (viewportBound.top - elementBound.top);
  }
  if (newScrollTop != currentScrollTop) {
    this.scrollTop = newScrollTop;
  }
  var currentScrollLeft = this.scrollLeft;
  var newScrollLeft = currentScrollLeft;
  if (elementBound.right > viewportBound.right) {
    newScrollLeft = currentScrollLeft + (elementBound.right - viewportBound.right);
  }
  if (elementBound.left < viewportBound.left) {
    newScrollLeft = currentScrollLeft - (viewportBound.left - elementBound.left);
  }
  if (newScrollLeft != currentScrollLeft) {
    this.scrollLeft = newScrollLeft;
  }
};
PreInput.prototype.undo = function () {
  if (this.historyIndex <= 0) return;
  this.historyIndex--;
  var record = this.history[this.historyIndex];
  this.applyData(record.text, record.offset);
  this.notifyChange({
    value: record.text,
    action: 'undo',
    record: record
  });
};
PreInput.prototype.redo = function () {
  if (this.historyIndex + 1 >= this.history.length) return;
  this.historyIndex++;
  var record = this.history[this.historyIndex];
  this.applyData(record.text, record.offset);
  this.notifyChange({
    value: record.text,
    action: 'redo',
    record: record
  });
};

/**
 *
 * @param text
 * @param offset
 * @param {Event=} event
 */
PreInput.prototype.commitChange = function (text, offset) {
  while (this.historyIndex < this.history.length - 1) {
    this.history.pop();
  }
  var lastText = this.history.length > 0 ? this.history[this.history.length - 1].text : null;
  if (text === lastText) {
    if (this.history[this.history.length - 1].offset != offset) this.history[this.history.length - 1].offset = offset;
  } else {
    this.historyIndex = this.history.length;
    var record = {
      text: text,
      offset: offset
    };
    this.history.push(record);
    this.notifyChange({
      value: record.text,
      action: 'commit',
      record: record
    });
  }
};

/**
 *
 * @param text
 * @param offset
 * @param {Event=} event
 */
PreInput.prototype.waitToCommit = function (text, offset, event) {
  var thisInput = this;
  if (this._commitTimeout > 0) clearTimeout(this._commitTimeout);
  this._commitTimeout = setTimeout(function () {
    thisInput.commitChange(text, offset);
  }, textDelay);
};
PreInput.prototype.getPosition = function (node, offset) {
  if (!node) return NaN;
  if (node == this) return offset;
  var parent = node.parentElement;
  if (!parent) return NaN;
  var text = '';
  var child;
  var lastBr = false;
  for (var i = 0; i < parent.childNodes.length; ++i) {
    child = parent.childNodes[i];
    if (child == node) break;
    text += this.stringOf(child);
  }
  return this.getPosition(parent, text.length + offset);
};
PreInput.prototype.getSelectPosition = function () {
  if (window.getSelection) {
    var sel = window.getSelection();
    if (sel.getRangeAt && sel.rangeCount) {
      var range = sel.getRangeAt(0);
      var direction = 'forward';
      var cmpPosition = sel.anchorNode.compareDocumentPosition(sel.focusNode);
      if (cmpPosition === 4) {
        direction = 'forward';
      } else if (cmpPosition === 2) {
        direction = 'backward';
      } else if (!cmpPosition && sel.anchorOffset > sel.focusOffset || cmpPosition === Node.DOCUMENT_POSITION_PRECEDING) {
        direction = 'backward';
      }
      var startOffset = this.getPosition(range.startContainer, range.startOffset);
      var endOffset = this.getPosition(range.endContainer, range.endOffset);
      if (isNaN(startOffset)) return null;
      return {
        start: startOffset,
        end: endOffset,
        direction: direction
      };
    }
  } else if (document.selection) {
    console.error('May not support!');
  }
};
PreInput.prototype.stringOf = function (node, parent) {
  if (!node) return '';
  if (node.nodeType === 3) {
    return node.data;
  }
  var res = '';
  if ((node.tagName === 'BR' || node.tagName === 'br') && parent && parent.lastChild !== node) {
    return '\n';
  } else if ((node.tagName === 'DIV' || node.tagName === 'div') && parent && parent.firstChild !== node) {
    res += '\n';
  }
  var thisInput = this;
  return res + Array.prototype.map.call(node.childNodes, function (cNode, index, arr) {
    return thisInput.stringOf(cNode, node);
  }).join('');
};
PreInput.prototype._pasteText = function (text) {
  var sel = window.getSelection();
  var range;
  if (window.getSelection) {
    sel = window.getSelection();
    if (sel.getRangeAt && sel.rangeCount) {
      try {
        range = sel.getRangeAt(0);
        range.deleteContents();
        var textNode = _({
          text: text
        });
        range.insertNode(textNode);
        if (sel.removeRange) {
          sel.removeRange(range);
        } else {
          sel.removeAllRanges();
        }
        range = document.createRange();
        range.setStart(textNode, text.length);
        sel.addRange(range);
        this.scrollIntoRange(range);
        this.commitChange(this.stringOf(this), this.getPosition(textNode, text.length));
      } catch (error) {
        alert(error.message);
      }
    }
  } else if (document.selection && document.selection.createRange) {
    document.selection.createRange().text = text;
    this.commitChange(this.stringOf(this), this.getPosition(textNode, text.length));
    console.error('May not support!');
  }
};

/**
 * @type {PreInput}
 */
PreInput.eventHandler = {};
PreInput.eventHandler.paste = function (event) {
  this.changePendingEvent = event;
  var thisIp = this;
  var clipboardData = event.clipboardData || window.clipboardData;
  /**Safari bug */
  if (clipboardData) {
    if (clipboardData.items) {
      var items = Array.prototype.slice.call(clipboardData.items);
      var imgItems = items.filter(function (item) {
        return item.type.indexOf('image') >= 0;
      });
      var plainTextItems = items.filter(function (item) {
        return item.type.indexOf('text/plain') >= 0;
      });
      if (imgItems.length > 0) {
        var imgFiles = imgItems.map(function (it) {
          return it.getAsFile();
        });
        this.emit('pasteimg', {
          target: this,
          imageFile: imgFiles[0],
          imageFiles: imgFiles,
          orginEvent: event
        }, this);
      } else if (plainTextItems.length > 0) {
        var plainTextItem = plainTextItems[0]; //only one item
        plainTextItem.getAsString(function (text) {
          thisIp._pasteText(text);
        });
      } else {
        window.ABSOL_DEBUG && console.error("Can not handle clipboard data");
      }
      event.preventDefault();
    } else {
      var text = event.clipboardData.getData('text/plain');
      if (text) {
        event.preventDefault();
        this._pasteText(text);
      } else {
        var currentText = this.stringOf(this);
        var currentSelection = this.getSelectPosition();
        setTimeout(function () {
          var images = [];
          $('img', thisIp, function (elt) {
            images.push(elt);
          });
          Promise.all(images.map(function (img) {
            return _Dom["default"].imageToCanvas(img).then(function (canvas) {
              var dataURI = canvas.toDataURL();
              var blob = (0, _file.dataURItoBlob)(dataURI);
              var file = (0, _file.blobToFile)(blob);
              return {
                file: file,
                blob: blob,
                url: dataURI
              };
            }, function (error) {
              console.error(error);
            })["catch"](function (error) {
              console.error(error);
            });
          })).then(function (results) {
            results = results.filter(function (it) {
              return !!it;
            });
            if (results.length > 0) {
              var imgFiles = results.map(function (it) {
                return it.file;
              });
              var urls = results.map(function (it) {
                return it.url;
              });
              thisIp.emit('pasteimg', {
                target: this,
                imageFile: imgFiles[0],
                imageFiles: imgFiles,
                urls: urls,
                url: urls[0],
                orginEvent: event
              }, thisIp);
            }
          });
          thisIp.applyData(currentText, currentSelection);
        }, textDelay);
      }
    }
  } else {
    setTimeout(function () {
      if (window.getSelection) {
        var sel = window.getSelection();
        if (sel.getRangeAt && sel.rangeCount) {
          var range = sel.getRangeAt(0);
          var text = this.stringOf(this);
          var offset = this.getPosition(range.startContainer, range.startOffset);
          this.waitToCommit(text, offset);
        }
      } else if (document.selection) {
        console.error('May not support!');
      }
    }.bind(this), textDelay);
  }
};
PreInput.eventHandler.keydown = function (event) {
  this.changePendingEvent = event;
  if (event.ctrlKey) {
    switch (event.key) {
      case 'z':
        this.undo();
        event.preventDefault();
        break;
      case 'y':
        this.redo();
        event.preventDefault();
        break;
      default:
        break;
    }
  }
  if (!event.ctrlKey && !event.altKey) {
    setTimeout(function () {
      if (window.getSelection) {
        var sel = window.getSelection();
        if (sel.getRangeAt && sel.rangeCount) {
          var range = sel.getRangeAt(0);
          var text = this.stringOf(this);
          var offset = this.getPosition(range.startContainer, range.startOffset);
          this.waitToCommit(text, offset);
        }
      } else if (document.selection) {
        console.error('May not support!');
      }
    }.bind(this), textDelay);
  }
};
PreInput.property = {};
PreInput.property.value = {
  set: function set(value) {
    value = value || '';
    this.applyData(value, value.length);
    this.commitChange(value, value.length);
  },
  get: function get() {
    return this.stringOf(this);
  }
};
PreInput.property.disabled = {
  set: function set(value) {
    value = !!value;
    if (value === this.hasClass('as-disabled')) return;
    if (value) {
      this.addClass('as-disabled');
      this.attr({
        contenteditable: undefined,
        oncut: 'return false',
        onpaste: 'return false',
        onkeydown: 'if(event.metaKey) return true; return false;'
      });
    } else {
      this.removeClass('as-disabled');
      this.attr({
        contenteditable: true,
        oncut: undefined,
        onpaste: undefined,
        onkeydown: undefined
      });
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
PreInput.property.readOnly = {
  set: function set(value) {
    value = !!value;
    if (value === this.hasClass('as-read-only')) return;
    if (value) {
      this.addClass('as-read-only');
      this.attr({
        contenteditable: undefined,
        oncut: 'return false',
        onpaste: 'return false',
        onkeydown: 'if(event.metaKey) return true; return false;'
      });
    } else {
      this.removeClass('as-read-only');
      this.attr({
        contenteditable: true,
        oncut: undefined,
        onpaste: undefined,
        onkeydown: undefined
      });
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
_ACore["default"].install(PreInput);
var _default = PreInput;
/*

ShareSerializer.addHandlerBefore({
    id: 'PreInput',
    match: (elt, scope, stack) => {
        if (elt.nodeType !== Node.ELEMENT_NODE) return false;
        return elt.hasClass('as-preinput') || elt.hasClass('as-tokenize-hyper-input');
    },
    exec: (printer, elt, scope, stack, accept) => {
        var O = printer.O;
        var printAttr = computePrintAttr(elt);
        var rect = printAttr.contentBound;
        rect.x -= O.x;
        rect.y -= O.y;

        printer.text(PreInput.prototype.stringOf(elt), rect, printAttr.style);
        return false;
    }
}, '*');

 */
exports["default"] = _default;

/***/ }),

/***/ 39368:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
__webpack_require__(64214);
var _utils = __webpack_require__(84512);
/***
 * @extends AElement
 * @constructor
 */
function ProcessLBar() {
  this.$stepCtn = (0, _ACore.$)('.as-process-l-bar-step-ctn', this);
  this.$stepName = (0, _ACore.$)('.as-process-l-bar-step-name', this);
  this.$items = [];
  this._items = [];
  this._lHeight = 3;
  this._value = null;
}
ProcessLBar.tag = 'ProcessLBar'.toLowerCase();
ProcessLBar.render = function () {
  return (0, _ACore._)({
    "class": 'as-process-l-bar',
    extendEvent: 'change',
    child: [{
      "class": 'as-process-l-bar-step-ctn'
    }, {
      "class": 'as-process-l-bar-step-name'
    }]
  });
};
ProcessLBar.prototype._updateCol = function () {
  var colN = Math.max(this.$items.length - this._lHeight + 1, 0);
  while (this.$stepCtn.childNodes.length > colN) {
    this.$stepCtn.lastChild.remove();
  }
  while (this.$stepCtn.childNodes.length < colN) {
    this.$stepCtn.addChild((0, _ACore._)('.as-process-l-bar-col'));
  }
  var i;
  for (i = 0; i < colN; ++i) {
    this.$stepCtn.childNodes[i].clearChild().addChild(this.$items[i]);
  }
  for (i = colN; i < this.$items.length; ++i) {
    this.$stepCtn.lastChild.addChild(this.$items[i]);
  }
  this.nameWidth = this._items.reduce(function (ac, cr) {
    return Math.max(ac, (0, _utils.measureText)(cr.name, 'bold 14px Arial, Helvetica, sans-serif').width);
  }, 0);
  if (colN <= 1) {
    this.addClass('as-col-layout');
  } else {
    this.removeClass('as-col-layout');
  }
  if (colN <= 2) {
    this.addStyle('--as-process-l-bar-item-min-width', this.nameWidth + 'px');
  } else {
    this.addStyle('--as-process-l-bar-item-min-width', (this.nameWidth + 10) / (colN - 1) - 10 + 'px');
  }
};
ProcessLBar.prototype._updateValue = function () {
  var value = this._value;
  this.$items.forEach(function (elt) {
    if (elt.itemData.value === value) {
      elt.addClass('as-active');
      this.$stepName.clearChild().addChild((0, _ACore._)({
        tag: 'span',
        child: {
          text: elt.itemData.name
        }
      }));
    } else {
      elt.removeClass('as-active');
    }
  }.bind(this));
};
ProcessLBar.prototype.notifyChange = function (originalEvent) {
  this.emit('change', {
    type: 'change',
    target: this,
    originalEvent: originalEvent || null
  }, this);
};
ProcessLBar.prototype._makeItem = function (item) {
  var self = this;
  var stepElt = (0, _ACore._)({
    "class": 'as-process-l-bar-step',
    attr: {
      title: item.name
    },
    props: {
      itemData: item
    },
    on: {
      click: function click(event) {
        if (self.disabled) return;
        var value = this._value;
        if (item.value === value) return;
        self.value = item.value;
        self.notifyChange(event);
      }
    }
  });
  if (item.color) {
    stepElt.addStyle('--as-process-l-bar-active-color', item.color);
  }
  return stepElt;
};
ProcessLBar.property = {};
ProcessLBar.property.items = {
  set: function set(items) {
    items = items || [];
    this._items = items;
    this.$itemByValue = {};
    this.$items = this._items.map(function (item) {
      return this._makeItem(item);
    }.bind(this));
    this._updateCol();
    this._updateValue();
  },
  get: function get() {
    return this._items;
  }
};
ProcessLBar.property.value = {
  set: function set(value) {
    this._value = value;
    this._updateValue();
  },
  get: function get() {
    return this._value;
  }
};
ProcessLBar.property.lHeight = {
  set: function set(value) {
    this._lHeight = value;
    if (value === 1) {
      this.addClass('as-single-line');
    } else {
      this.removeClass('as-single-line');
    }
    this._updateCol();
  },
  get: function get() {
    return this._lHeight;
  }
};
ProcessLBar.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
var _default = ProcessLBar;
exports["default"] = _default;

/***/ }),

/***/ 49087:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(20487);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function ProgressBar() {
  this._value = 0;
  this._variant = null;
  this.$value = $('.as-progress-bar-value', this);
  this._striped = false;
  this._animated = false;
}
ProgressBar.tag = 'ProgressBar'.toLowerCase();
ProgressBar.render = function () {
  return _({
    "class": 'as-progress-bar',
    child: {
      "class": 'as-progress-bar-value'
    }
  });
};
ProgressBar.property = {};

/**
 * @type {ProgressBar}
 */
ProgressBar.property.variant = {
  set: function set(value) {
    if (this._variant) {
      this.removeClass('as-variant-' + this._variant);
    }
    if (value) {
      this.addClass('as-variant-' + value);
    } else {
      value = null;
    }
    this._variant = value;
  },
  get: function get() {
    return this._variant;
  }
};

/**
 * @type {ProgressBar}
 */
ProgressBar.property.value = {
  set: function set(value) {
    value = Math.max(0, Math.min(1, value || 0));
    this._value = value;
    this.$value.addStyle('width', value * 100 + '%');
  },
  get: function get() {
    return this._value;
  }
};
ProgressBar.property.animated = {
  set: function set(value) {
    value = !!value;
    this._striped = value;
    if (value) {
      this.addClass('as-animated');
    } else {
      this.removeClass('as-animated');
    }
  },
  get: function get() {
    return this._animated;
  }
};
ProgressBar.property.striped = {
  set: function set(value) {
    value = !!value;
    this._striped = value;
    if (value) {
      this.addClass('as-striped');
    } else {
      this.removeClass('as-striped');
    }
  },
  get: function get() {
    return this._striped;
  }
};
_ACore["default"].install(ProgressBar);
var _default = ProgressBar;
exports["default"] = _default;

/***/ }),

/***/ 84743:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(20487);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function ProgressCircle() {
  this._text = 'Loading\n$value';
  this._value = 0;
  this._variant = null;
  this._viewValue = 0;
  this.$pie = $('.as-progress-circle-pie', this);
  this.$inner = $('.as-progress-circle-inner', this);
  this.$end = $('.as-progress-circle-end', this);
  this.$text = $('.as-progress-circle-text', this);
  this._animated = true;
}
ProgressCircle.tag = 'ProgressCircle'.toLowerCase();
ProgressCircle.render = function () {
  return _({
    "class": 'as-progress-circle',
    child: ['.as-progress-circle-start', '.as-progress-circle-pie', '.as-progress-circle-end', {
      "class": 'as-progress-circle-inner',
      child: {
        "class": 'as-progress-circle-text',
        child: {
          text: ''
        }
      }
    }]
    // child: {
    //     class: 'as-progress-bar-value'
    // }
  });
};

ProgressCircle.property = {};
ProgressCircle.prototype._updateValue = function () {
  var _this = this;
  if (Math.abs(this._value - this._viewValue) < 0.05 || !this._animated) this._viewValue = this._value;else {
    if (this._value > this._viewValue) this._viewValue += 0.05;else this._viewValue -= 0.05;
  }
  var value = this._viewValue;
  var angle = Math.PI * (-0.5 + value * 2);
  var cosAngle = Math.cos(angle);
  var sinAngle = Math.sin(angle);
  var pl = 'polygon(50% 0%, 100% 0%, ';
  if (value >= 0.25) pl += '100% 100%, ';
  if (value >= 0.5) pl += '0% 100%, ';
  if (value >= 0.75) pl += '0% 0%, ';
  pl += "".concat(50 + 50 * cosAngle, "% ").concat(50 + 50 * sinAngle, "%");
  pl += ', 50% 50%)';
  this.$pie.addStyle('clipPath', pl);
  this.$end.addStyle({
    left: "calc(".concat(50 + 50 * cosAngle, "% - ").concat((cosAngle + 1) * 0.8 / 2, "em)"),
    top: "calc(".concat(50 + 50 * sinAngle, "% - ").concat((sinAngle + 1) * 0.8 / 2, "em)")
  });
  if (this._value !== this._viewValue) {
    requestAnimationFrame(function () {
      return _this._updateValue();
    });
  }
};
ProgressCircle.prototype._updateText = function () {
  var value = this._value;
  var text = this._text;
  text = text.replace('$value', Math.round(value * 100) + '%');
  this.$text.firstChild.data = text;
};

/**
 * @type {ProgressCircle}
 */
ProgressCircle.property.variant = {
  set: function set(value) {
    if (this._variant) {
      this.removeClass('as-variant-' + this._variant);
    }
    if (value) {
      this.addClass('as-variant-' + value);
    } else {
      value = null;
    }
    this._variant = value;
  },
  get: function get() {
    return this._variant;
  }
};
ProgressCircle.property.value = {
  /**
   * @this ProgressCircle
   * @param value
   */
  set: function set(value) {
    value = Math.max(0, Math.min(1, value || 0));
    this._value = value;
    this._updateValue();
    this._updateText();
  },
  get: function get() {
    return this._value;
  }
};
ProgressCircle.property.text = {
  set: function set(value) {
    value = value || '';
    if (typeof value !== "string") value = '';
    this._text = value;
    this._updateText();
  },
  get: function get() {
    return this._text;
  }
};
ProgressCircle.property.animated = {
  set: function set(value) {
    value = !!value;
    this._animated = value;
    if (value) {
      this.addClass('as-animated');
    } else {
      this.removeClass('as-animated');
    }
  },
  get: function get() {
    return this._animated;
  }
};
_ACore["default"].install(ProgressCircle);
var _default = ProgressCircle;
exports["default"] = _default;

/***/ }),

/***/ 3079:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(97775);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _FollowerToggler = _interopRequireDefault(__webpack_require__(49049));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/****
 * @extends FollowerToggler
 * @constructor
 */
function QuickListButton() {
  this.$shareFollower = QuickListButton.getFollower();
  _({
    tag: 'followertoggler',
    elt: this,
    on: {
      preopen: this.eventHandler.preopen,
      close: this.eventHandler.closeFollower
    }
  });
  this.bindFollower(this.$shareFollower);
  this.$iconCtn.remove();
  this.$content.addChild(this.$iconCtn);
  this._items = this._items;
  this._anchor = [];
  this.$list = null;
  this._listUpdated = true;
  this._opened = false;
  this.anchor = [12, 13, 15, 14]; //todo: add property
}

QuickListButton.getFollower = function () {
  if (!QuickListButton.$follower) QuickListButton.$follower = _('follower.as-quick-list-button-follower');
  QuickListButton.$follower.cancelWaiting();
  return QuickListButton.$follower;
};
QuickListButton.tag = 'QuickListButton'.toLowerCase();
QuickListButton.render = function () {
  return _({
    tag: 'flexiconbutton',
    "class": 'as-quick-list-button',
    extendEvent: 'select',
    props: {
      text: "+ Thêm",
      icon: 'span.mdi.mdi-menu-down'
    }
  });
};
QuickListButton.property = {};
QuickListButton.property.items = {
  set: function set(value) {
    value = value || [];
    this._items = value;
    this._listUpdated = false;
  },
  get: function get() {
    return this._items;
  }
};

/**
 * @type {QuickListButton}
 */
QuickListButton.eventHandler = {};
QuickListButton.eventHandler.preopen = function () {
  this.$shareFollower.addTo(document.body);
  this.$shareFollower.anchor = this.anchor;
  if (this.$list == null) {
    this.$list = _('selectlist.absol-bscroller').on('pressitem', this.eventHandler.pressitem);
  }
  if (!this._listUpdated) {
    this._listUpdated = true;
    this.$list.items = this._items;
  }
  this.$shareFollower.addChild(this.$list);
  this.$shareFollower.on({
    preupdateposition: this.eventHandler.preUpdatePosition
  });
};
QuickListButton.eventHandler.preUpdatePosition = function () {
  var bound = this.getBoundingClientRect();
  var screenSize = _Dom["default"].getScreenSize();
  var maxHeight = Math.max(screenSize.height - bound.bottom, bound.top) - 10;
  this.$list.addStyle('max-height', maxHeight + 'px');
};
QuickListButton.eventHandler.closeFollower = function () {
  this.$shareFollower.off({
    preupdateposition: this.eventHandler.preUpdatePosition
  });
};
QuickListButton.eventHandler.pressitem = function (event) {
  this.close();
  this.emit('select', Object.assign({}, event, {
    type: 'select',
    target: this
  }));
};
_ACore["default"].install(QuickListButton);
var _default = QuickListButton;
exports["default"] = _default;

/***/ }),

/***/ 8277:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.QuickMenuInstance = QuickMenuInstance;
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
__webpack_require__(26155);
var _utils = __webpack_require__(84512);
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _EventEmitter = __webpack_require__(46833);
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var isMobile = _BrowserDetector["default"].isMobile;
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function QuickMenu() {
  //like context menu without right-click
  this._contextMenuSync = Promise.resolve();
}
QuickMenu.tag = 'QuickMenu'.toLowerCase();
QuickMenu.render = function () {
  return _({
    tag: 'vmenu',
    extendEvent: 'requestcontextmenu',
    "class": ['as-quick-menu', 'as-bscroller'],
    style: {
      'overflow-y': 'auto',
      'box-sizing': 'border-box'
    }
  });
};
_ACore["default"].install(QuickMenu);

/***
 *
 * @param {AElement} elt
 * @param opt
 * @constructor
 */
function QuickMenuInstance(elt, opt) {
  this.id = (Math.random() * 10000 >> 0) + '' + new Date().getTime();
  /***
   *
   * @type {"OPEN"|"CLOSE"}
   */
  this.state = 'CLOSE';
  this._willAddClickOut = -1;
  this.elt = elt;
  /**
   *
   * @type {object|{triggerEvent:string, menuProps,getMenuProps, anchor,  onClick, onSelect,onOpen, onClose, menuCtn, getAnchor}}
   */
  this.opt = Object.assign({}, opt);
  for (var key in this) {
    if (key.startsWith('_on')) {
      this[key] = this[key].bind(this);
    }
  }
  this._init();
}
QuickMenuInstance.prototype._init = function () {
  var _this = this;
  this.elt.classList.add('as-quick-menu-trigger');
  if (this.opt.triggerEvent === 'mousedown') $(this.elt).on('contextmenu', function (event) {
    event.preventDefault();
  }).attr('oncontextmenu', "return false;");
  if (this.opt.triggerEvent) {
    this.elt.addEventListener(this.opt.triggerEvent, this._onClick, true);
  } else this.elt.addEventListener('click', this._onClick, true);
  if (!this.elt.revokeResource) {
    this.elt.revokeResource = function () {
      _this.elt.revokeResource = _noop["default"];
      _this.remove();
    };
  }
};
QuickMenuInstance.prototype._deinit = function () {
  if (this.state === "OPEN") this.close();
  this.elt.classList.remove('as-quick-menu-trigger');
  if (this.opt.triggerEvent) {
    this.elt.removeEventListener(this.opt.triggerEvent, this._onClick, true);
  } else {
    this.elt.removeEventListener('click', this._onClick, true);
  }
  this.elt = null;
  this.opt = null;
  for (var key in this) {
    if (key.startsWith('_on')) {
      this[key] = _noop["default"];
    }
  }
};
QuickMenuInstance.prototype.getMenuProps = function () {
  var props;
  if (this.opt.getMenuProps) {
    props = this.opt.getMenuProps();
  } else {
    props = this.opt.menuProps;
  }
  props = props || {};
  return Object.assign({
    extendClasses: [],
    extendStyle: {}
  }, props);
};
QuickMenuInstance.prototype.remove = function () {
  this._deinit();
};
QuickMenuInstance.prototype._onClick = function (event) {
  if (this.opt.triggerEvent === 'mousedown') {
    event.preventDefault();
  }
  var event = (0, _EventEmitter.copyEvent)(event, {
    canceled: false,
    cancel: function cancel() {
      this.canceled = true;
    }
  });
  if (this.opt.onClick) {
    this.opt.onClick.call(this, event);
  }
  if (!event.canceled) this.toggle();
};
QuickMenuInstance.prototype._onClickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.elt, event) || (0, _EventEmitter.hitElement)(QuickMenu.$elt, event)) return;
  this.close();
};
QuickMenuInstance.prototype.onSelect = function (item) {
  item = item.__originalItem__ || item;
  if (item.items && item.items.length > 0) return;
  if (this.opt.onSelect) this.opt.onSelect(item);
  this.close();
};
QuickMenuInstance.prototype.open = function () {
  var _this2 = this;
  if (QuickMenu.runningInstance === this) return;
  if (this.state !== "CLOSE") return;
  if (QuickMenu.runningInstance) QuickMenu.runningInstance.close();
  QuickMenu.runningInstance = this;
  this.state = 'OPEN';
  this.elt.classList.add('as-quick-menu-attached');
  this._willAddClickOut = setTimeout(function () {
    _this2._willAddClickOut = -1;
    document.addEventListener('click', _this2._onClickOut, false);
    followerElt.updatePosition();
    menuElt.addStyle('visibility', 'visible');
  }, isMobile ? 33 : 2);
  var anchor = this.getAnchor();
  var followerElt = QuickMenu.$follower;
  var menuElt = QuickMenu.$elt;
  this.originProps = this.getMenuProps();
  this.copyProps = Object.assign({}, this.originProps);
  if (typeof this.originProps.items === "function") {
    this.copyProps.items = this.originProps.items.call(this);
  } else {
    this.copyProps.items = this.originProps.items || [];
  }
  this.copyProps.items = this.copyProps.items.map(function visit(item) {
    var cpyItem = item;
    if (typeof item === "string") cpyItem = item;else if (item && typeof item.text === "string") {
      cpyItem = Object.assign({
        __originalItem__: item
      }, item);
      if (cpyItem.items && cpyItem.items.map) cpyItem.items = cpyItem.items.map(visit);
    }
    return cpyItem;
  });
  Object.assign(menuElt, this.copyProps);
  followerElt.addClass('absol-active');
  if (anchor === 'modal') {
    followerElt.addClass('as-anchor-modal');
    followerElt.anchor = [];
  } else {
    followerElt.removeClass('as-anchor-modal');
    followerElt.anchor = anchor;
  }
  this._onSizeNeedUpdate();
  QuickMenu.$follower.on('preupdateposition', this._onSizeNeedUpdate);
  followerElt.followTarget = this.elt;
  followerElt.sponsorElement = this.elt;
  menuElt.addStyle('visibility', 'hidden');
  followerElt.addTo(this.opt.menuCtn || document.body);
  followerElt.addClass('absol-active');
  if (this.opt.onOpen) {
    try {
      this.opt.onOpen.call(this);
    } catch (err) {
      (0, _safeThrow["default"])(err);
    }
  }
};
QuickMenuInstance.prototype.close = function () {
  if (QuickMenu.runningInstance !== this) return;
  if (this.state !== "OPEN") return;
  if (this.opt.onClose) {
    try {
      this.opt.onClose.call(this);
    } catch (err) {
      (0, _safeThrow["default"])(err);
    }
  }
  this.state = 'CLOSE';
  this.elt.classList.remove('as-quick-menu-attached');
  QuickMenu.$elt.removeStyle('--available-height');
  var followerElt = QuickMenu.$follower;
  followerElt.addClass('absol-active');
  followerElt.remove();
  QuickMenu.$follower.off('preupdateposition', this._onSizeNeedUpdate);
  if (this._willAddClickOut >= 0) {
    clearTimeout(this._willAddClickOut);
  } else {
    document.removeEventListener('click', this._onClickOut, false);
  }
  QuickMenu.runningInstance = null;
};
QuickMenuInstance.prototype._onSizeNeedUpdate = function () {
  var _this3 = this;
  (0, _ACore.$$)('VMenuItem'.toLowerCase(), QuickMenu.$elt).forEach(function (e) {
    if (e.autoFixParentSize) e.autoFixParentSize();
  });
  var screenSize = (0, _Dom.getScreenSize)();
  var eltBound = this.elt.getBoundingClientRect();
  var outRect = (0, _Dom.traceOutBoundingClientRect)(this.elt);
  var isOut = false;
  if (eltBound.left > outRect.right || eltBound.right < outRect.left || eltBound.top > outRect.bottom || eltBound.bottom < outRect.top) isOut = true;
  if (isOut || !eltBound.width && !eltBound.height) {
    setTimeout(function () {
      _this3.close();
    }, 0);
  }
  var aTop = eltBound.bottom;
  var aBottom = screenSize.height - eltBound.top;
  QuickMenu.$elt.addStyle('--available-height', Math.max(aTop, aBottom) - 10 + 'px');
};
QuickMenuInstance.prototype.toggle = function () {
  if (this.state === "OPEN") {
    this.close();
  } else if (this.state === 'CLOSE') {
    this.open();
  }
};
QuickMenuInstance.prototype.getAnchor = function () {
  var menuAnchors;
  var anchor = this.opt.getAnchor ? this.opt.getAnchor() : this.opt.anchor;
  if (typeof anchor == 'number') {
    menuAnchors = [anchor];
  } else if (anchor instanceof Array) {
    menuAnchors = anchor;
  } else if (anchor === 'modal') {
    menuAnchors = 'modal';
  } else {
    menuAnchors = QuickMenu.PRIORITY_ANCHORS;
  }
  return menuAnchors;
};
QuickMenu.PRIORITY_ANCHORS = [0, 3, 7, 4, 1, 2, 6, 5];
QuickMenu.$elt = _('quickmenu');
/***
 *
 * @type {Follower}
 */
QuickMenu.$follower = _({
  tag: _Follower["default"].tag,
  "class": 'absol-context-menu-anchor',
  child: QuickMenu.$elt,
  on: {
    preupdateposition: function preupdateposition() {
      var bound = this.getBoundingClientRect();
      var outBound = (0, _Dom.traceOutBoundingClientRect)(this);
      if (bound.bottom < outBound.top || bound.top > outBound.bottom || bound.right < outBound.left || bound.left > outBound.right) {
        QuickMenu.close(QuickMenu._session);
      }
    }
  }
});
QuickMenu.$follower.cancelWaiting();

/***
 *
 * @type {null|QuickMenuInstance}
 */
QuickMenu.runningInstance = null;
QuickMenu._session = Math.random() * 10000000000 >> 0;
QuickMenu._menuListener = undefined;
QuickMenu.$elt.on('press', function (event) {
  if (QuickMenu.runningInstance) QuickMenu.runningInstance.onSelect((0, _utils.cleanMenuItemProperty)(event.menuItem));
  if (QuickMenu._menuListener) QuickMenu._menuListener((0, _utils.cleanMenuItemProperty)(event.menuItem));
});
QuickMenu.show = function (element, menuProps, anchor, menuListener, darkTheme) {
  var instance = new QuickMenuInstance(element, {
    menuProps: menuProps,
    anchor: anchor,
    onSelect: menuListener,
    darkTheme: darkTheme
  });
  instance.open();
};
QuickMenu.close = function (session) {
  if (QuickMenu.runningInstance && QuickMenu.runningInstance.id === session) QuickMenu.runningInstance.close();
};
QuickMenu.showWhenClick = function (element, menuProps, anchor, menuListener, darkTheme) {
  return new QuickMenuInstance(element, {
    menuProps: menuProps,
    anchor: anchor,
    onSelect: menuListener,
    darkTheme: darkTheme
  });
};

/**
 * @typedef {Object} QuickMenuAdaptor
 * @property {Function} getFlowedElement default is trigger
 * @property {Function} getMenuProps define menuProps if un-change
 * @property {Function} getAnchor default is 'auto', define anchor if un-change
 * @property {Function} onClose callback
 * @property {Function} onOpen callback
 * @property {Function} onSelect calback
 * @property {Function} isDarkTheme default is false, define darkThem if un-change
 *
 *
 * @typedef {Object} QuickMenuDataHolder
 * @property {Function} remove
 *
 * @param {Element} trigger
 * @param {QuickMenuAdaptor} adaptor
 * @returns {QuickMenuDataHolder}
 */
QuickMenu.toggleWhenClick = function (trigger, adaptor) {
  return new QuickMenuInstance(trigger, adaptor);
};
var _default = QuickMenu;
exports["default"] = _default;

/***/ }),

/***/ 97722:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(83293);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function QuickPath() {
  this._holders = [];
}

/**
 * @type {QuickPath}
 */
QuickPath.eventHandler = {};

/***
 * @this QuickPath
 * @param event
 */
QuickPath.eventHandler.click = function (event) {
  var button = this._fileButton(event.target);
  if (button) this.pressButton(button);
};
QuickPath.tag = 'QuickPath'.toLowerCase();

/**
 * @returns {QuickPath}
 */
QuickPath.render = function () {
  return _({
    "class": 'absol-quick-path',
    extendEvent: ['change', 'press']
  });
};
QuickPath.prototype.updatePath = function () {
  this.clearChild();
  var self = this;
  this._holders = this._path.map(function (data, index) {
    var holder = self._createButton(data, index);
    holder.buttom.addTo(self);
    return holder;
  });
};
QuickPath.prototype._createButton = function (pathItem, index) {
  var buttom = _({
    tag: 'expnode',
    "class": 'absol-quick-path-btn',
    attr: {
      'data-index': '' + index
    }
  });
  buttom.status = 'close';
  buttom.name = pathItem.name;
  if (pathItem.icon) {
    buttom.icon = pathItem.icon;
  }
  if (pathItem.iconSrc) {
    buttom.icon = {
      tag: 'img',
      props: {
        src: pathItem.iconSrc
      }
    };
  }
  var thisQuickpath = this;
  if (pathItem.items) {
    _QuickMenu["default"].toggleWhenClick(buttom, {
      getAnchor: function getAnchor() {
        return [1, 2, 6, 5];
      },
      getMenuProps: function getMenuProps() {
        return {
          extendStyle: {
            fontSize: buttom.getComputedStyleValue('font-size')
          },
          items: pathItem.items.map(function (it, menuIndex) {
            var res = {
              text: it.name,
              menuIndex: menuIndex,
              icon: it.iconSrc ? {
                tag: 'img',
                props: {
                  src: it.iconSrc
                }
              } : it.icon || undefined,
              extendStyle: it.extendStyle || {},
              extendClass: it.extendClass || []
            };
            return res;
          })
        };
      },
      onOpen: function onOpen() {
        buttom.status = 'open';
        thisQuickpath.emit('press', {
          target: thisQuickpath,
          pathItem: pathItem,
          index: index
        }, thisQuickpath);
      },
      onClose: function onClose() {
        buttom.status = 'close';
      },
      onSelect: function onSelect(item) {
        var dataItem = pathItem.items[item.menuIndex];
        thisQuickpath.emit('change', {
          target: thisQuickpath,
          pathItem: pathItem,
          item: dataItem,
          index: index
        }, thisQuickpath);
        thisQuickpath.status = 'close';
      }
    });
  } else {
    buttom.on('click', function () {
      this.emit('press', {
        target: thisQuickpath,
        pathItem: pathItem,
        index: index
      }, thisQuickpath);
    });
  }
  return {
    buttom: buttom
  };
};
QuickPath.prototype.push = function (item) {
  this.path.push(item);
  var holder = this._createButton(item, this.path.length - 1);
  this.addChild(holder, buttom);
  this._holders.push(holder);
};
QuickPath.prototype.clear = function () {
  this.path = [];
  this._holders = [];
};
QuickPath.prototype.pop = function () {
  //todo
  var res = this.path.pop();
  var button = $('button[data-index="' + this.path.length + '"]');
  if (button) button.remove();
  return res;
};
QuickPath.property = {};

/**
 * @typedef PathElement
 * @property {String} name
 * @property {String} icon
 * @property {Array<String>} items
 *
 */

QuickPath.property.path = {
  /**
   * @param {Array<PathElement>} value
   */
  set: function set(value) {
    this._path = value || [];
    this.updatePath();
  },
  get: function get() {
    return this._path || [];
  }
};
QuickPath.property.textPath = {
  get: function get() {
    return this.path.join('/');
  }
};
_ACore["default"].install('quickpath', QuickPath);
var _default = QuickPath;
exports["default"] = _default;

/***/ }),

/***/ 78994:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(88316);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _RadioButton = _interopRequireDefault(__webpack_require__(30348));
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _printer = __webpack_require__(97397);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var $$ = _ACore["default"].$$;
var _svg = _Svg["default"].ShareInstance._;

/***
 * @extends AElement
 * @constructor
 */
function Radio() {
  var thisR = this;
  this.defineEvent('change');
  this.$input = $('input', this).on('change', this.notifyChange.bind(this));
  this.$labels = $$('span', this);
  _OOP["default"].drillProperty(this, this.$input, ['value', 'checked']);
}
Radio.tag = 'radio';
Radio.radioProto = _('<svg class="absol-radio-icon" width="20" height="20" version="1.1" viewBox="0 0 5.2917 5.2917"' + '   xmlns="http://www.w3.org/2000/svg">' + '    <g transform="translate(0 -291.71)">' + '        <circle class="bound" cx="2.6458" cy="294.35" r="2.4626" style="stroke-opacity:.99497;stroke-width:.26458;" />' + '        <circle class="dot" cx="2.6458" cy="294.35"  r= "0.92604" style="fill-rule:evenodd;" />' + '    </g>' + '</svg>');
Radio.render = function () {
  return _({
    tag: 'label',
    "class": 'absol-radio',
    child: [{
      tag: 'input',
      attr: {
        type: 'radio'
      }
    }, {
      tag: 'span',
      "class": 'absol-radio-left-label'
    }, Radio.radioProto.cloneNode(true), {
      tag: 'span',
      "class": 'absol-radio-right-label'
    }]
  });
};
Radio.prototype.notifyChange = function () {
  this.emit('change', {
    type: 'change',
    checked: this.checked,
    target: this
  }, this);
};
Radio.prototype.getAllFriend = function () {
  return Radio.getAllByName(this.name);
};
Radio.attribute = _RadioButton["default"].attribute;
Radio.property = {
  name: {
    set: function set(name) {
      this.$input.setAttribute('name', name);
    },
    get: function get() {
      return this.$input.getAttribute('name');
    }
  },
  text: {
    set: function set(value) {
      value = (value || '').trim();
      this.$labels[0].clearChild();
      this.$labels[1].clearChild();
      if (value) {
        this.$labels[0].addChild(_({
          text: value
        }));
        this.$labels[1].addChild(_({
          text: value
        }));
      }
    },
    get: function get() {
      return this.$labels[0].firstChild.data;
    }
  },
  disabled: {
    set: function set(value) {
      this.$input.disabled = !!value;
      if (value) {
        this.addClass('disabled');
      } else {
        this.removeClass('disabled');
      }
    },
    get: function get() {
      return this.$input.disabled;
    }
  }
};
Radio.getAllByName = function (name) {
  return (Array.apply(null, document.getElementsByTagName('input')) || []).filter(function (elt) {
    return elt.getAttribute('type') == 'radio' && elt.getAttribute('name') == name;
  });
};
Radio.getValueByName = function (name) {
  var inputs = Radio.getAllByName(name);
  var res = null;
  var input;
  for (var i = 0; i < inputs.length; ++i) {
    input = inputs[i];
    if (input.checked) {
      res = input.value;
    }
  }
  return res;
};
_ACore["default"].install(Radio);
var _default = Radio;
exports["default"] = _default;
var radioImageCache = {};
_printer.ShareSerializer.addHandlerBefore({
  match: function match(elt, scope, stack) {
    if ((elt.hasClass('absol-radio-icon') || elt.hasClass('as-checkbox-input-check-icon')) && (elt.parentElement.hasClass('absol-radio') || elt.parentElement.hasClass('absol-radio-button') || elt.parentElement.hasClass('as-checkbox-input'))) {
      return true;
    }
    return false;
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var type = elt.hasClass('absol-radio-icon') ? 'radio' : 'check';
    var fontSize = elt.getFontSize();
    var checked = !!elt.parentElement.__origin__.checked;
    var disabled = !!elt.parentElement.__origin__.disabled;
    var bound = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    if (bound.width === 0) return;
    var rect = bound.clone();
    rect.x -= printer.O.x;
    rect.y -= printer.O.y;
    var key = type + fontSize + checked + disabled;
    var res;
    if (radioImageCache[key]) {
      res = radioImageCache[key];
    } else {
      res = _Svg["default"].svgToCanvas(elt.__origin__)["catch"](function (err) {
        console.error(err);
      });
      radioImageCache[key] = res;
    }
    res.elt = elt;
    printer.image(res, rect);
  },
  id: 'Radio'
}, 'SVG');

/***/ }),

/***/ 30348:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(39429);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function RadioButton() {
  var thisRB = this;
  this.defineEvent('change');
  this.$input = $('input', this).on('change', this.notifyChange.bind(this));
  _OOP["default"].drillProperty(this, this.$input, ['value', 'checked']);
}
RadioButton.tag = 'radiobutton';
RadioButton.radioProto = _('<svg class="absol-radio-icon" width="20" height="20" version="1.1" viewBox="0 0 5.2917 5.2917"' + '   xmlns="http://www.w3.org/2000/svg">' + '    <g transform="translate(0 -291.71)">' + '        <circle class="bound" cx="2.6458" cy="294.35" r="2.4626" style="stroke-opacity:.99497;stroke-width:.26458;" />' + '        <circle class="dot" cx="2.6458" cy="294.35"  r= "0.92604" style="fill-rule:evenodd;" />' + '    </g>' + '</svg>');
RadioButton.render = function () {
  return _({
    tag: 'label',
    "class": 'absol-radio-button',
    child: [{
      tag: 'input',
      attr: {
        type: 'radio'
      }
    }, RadioButton.radioProto.cloneNode(true)]
  });
};
RadioButton.prototype.notifyChange = function () {
  this.emit('change', {
    type: 'change',
    checked: this.checked,
    target: this
  }, this);
};
RadioButton.prototype.getAllFriend = function () {
  return Radio.getAllByName(this.name);
};
RadioButton.attribute = {
  checked: {
    set: function set(value) {
      if (value == 'false' || value == null) {
        this.checked = false;
      } else {
        this.checked = true;
      }
    },
    get: function get() {
      return this.checked ? 'true' : 'false';
    },
    remove: function remove() {
      this.checked = false;
    }
  },
  disabled: {
    set: function set(value) {
      if (value == 'false' || value == null) {
        this.disabled = false;
      } else {
        this.disabled = true;
      }
    },
    get: function get() {
      return this.disabled ? 'true' : 'false';
    },
    remove: function remove() {
      this.disabled = false;
    }
  },
  name: {
    set: function set(value) {
      this.name = value;
    },
    get: function get() {
      return this.name;
    },
    remove: function remove() {
      this.name = null;
    }
  }
};
RadioButton.property = {
  name: {
    set: function set(name) {
      if (name == null) this.$input.removeAttribute('name');else this.$input.setAttribute('name', name);
    },
    get: function get() {
      return this.$input.getAttribute('name');
    }
  },
  disabled: {
    set: function set(value) {
      this.$input.disabled = !!value;
      if (value) {
        this.addClass('disabled');
      } else {
        this.removeClass('disabled');
      }
    },
    get: function get() {
      return this.$input.disabled;
    }
  }
};
RadioButton.getAllByName = function (name) {
  return (document.getElementsByTagName('input') || []).filter(function (elt) {
    return elt.getAttribute('type') == 'radio' && elt.getAttribute('name') == name;
  });
};
RadioButton.getValueByName = function (name) {
  var inputs = RadioButton.getAllByName(name);
  var res = null;
  var input;
  for (var i = 0; i < inputs.length; ++i) {
    input = inputs[i];
    if (input.checked) {
      res = input.value;
    }
  }
  return res;
};
RadioButton.autoReplace = function () {
  var placeHolders = Array.prototype.slice.call(document.getElementsByTagName(this.tag));
  var ph;
  var attOfPH;
  var attrs;
  var style;
  var classList;
  var attNode;
  var attrName, attrValue;
  var props;
  for (var i = 0; i < placeHolders.length; ++i) {
    ph = placeHolders[i];
    attOfPH = ph.attributes;
    classList = [];
    style = {};
    attrs = {};
    props = {};
    for (var j = 0; j < attOfPH.length; ++j) {
      attNode = attOfPH[j];
      attrName = attNode.nodeName;
      attrValue = attNode.nodeValue;
      if (attrName == 'style') {
        attrValue.trim().split(';').reduce(function (style, prop) {
          var p = prop.split(':');
          if (p.length == 2) {
            style[p[0].trim()] = p[1].trim();
          }
          return style;
        }, style);
      } else if (attrName == 'class') {
        classList = attrValue.trim().split(/\s+/);
      } else if (attrName == 'onchange') {
        props.onchange = new Function('event', 'sender', attrValue);
      } else {
        attrs[attrName] = attrValue;
      }
    }
    var newElt = _({
      tag: this.tag,
      attr: attrs,
      "class": classList,
      style: style,
      props: props
    });
    $(ph).selfReplace(newElt);
  }
};
RadioButton.initAfterLoad = function () {
  _Dom["default"].documentReady.then(function () {
    RadioButton.autoReplace();
  });
};
_ACore["default"].install('RadioButton'.toLowerCase(), RadioButton);
var _default = RadioButton;
exports["default"] = _default;

/***/ }),

/***/ 11655:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(62800);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
//new tech, not working version

var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends Element
 * @constructor
 */
function RadioInput() {
  this.$input = $('input', this).on('change', this.notifyChange.bind(this));
  this.checked = false;
  this.disabled = false;
  this.on('click', this.eventHandler.click);
  this.onchange = null;
}
RadioInput.tag = "RadioInput".toLowerCase();
RadioInput.render = function (data) {
  return _({
    tag: 'label',
    extendEvent: 'change',
    "class": 'as-radio-input',
    child: [{
      elt: data && data.$input,
      tag: 'input',
      "class": 'as-radio-input-value',
      attr: {
        type: 'radio'
      }
    }, {
      "class": ['as-radio-input-check-mark']
    }]
  });
};

/***
 * as normal, change event will be fired when radio change by system
 */
RadioInput.prototype.notifyChange = function () {
  var event = {
    checked: this.checked
  };
  this.emit('change', event, this);
};
RadioInput.prototype._updateCheckedClass = function () {
  if (this.checked) {
    this.addClass('as-checked');
  } else {
    this.removeClass('as-checked');
  }
};
RadioInput.property = {};
RadioInput.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
    this.$input.disabled = !!value;
  },
  get: function get() {
    this.$input.disabled;
  }
};

/***
 *
 * @type {RadioInput}
 */
RadioInput.property.checked = {
  set: function set(value) {
    this.$input.checked = !!value;
    this._updateCheckedClass();
  },
  get: function get() {
    return this.$input.checked;
  }
};
RadioInput.attribute = {
  checked: {
    set: function set(value) {
      if (value === 'false' || value === null) {
        this.checked = false;
      } else {
        this.checked = true;
      }
    },
    get: function get() {
      return this.checked ? 'true' : 'false';
    },
    remove: function remove() {
      this.checked = false;
    }
  },
  disabled: {
    set: function set(value) {
      if (value === 'false' || value === null) {
        this.disabled = false;
      } else {
        this.disabled = true;
      }
    },
    get: function get() {
      return this.disabled ? 'true' : 'false';
    },
    remove: function remove() {
      this.disabled = false;
    }
  }
};

/***
 *
 * @type {RadioInput}
 */
RadioInput.eventHandler = {};
RadioInput.eventHandler.click = function () {
  this._updateCheckedClass();
};
_ACore["default"].install(RadioInput);
RadioInput.autoReplace = function () {
  var placeHolders = Array.prototype.slice.call(document.getElementsByTagName(this.tag));
  var ph;
  var attOfPH;
  var attrs;
  var style;
  var classList;
  var attNode;
  var attrName, attrValue;
  var props;
  for (var i = 0; i < placeHolders.length; ++i) {
    ph = placeHolders[i];
    attOfPH = ph.attributes;
    classList = [];
    style = {};
    attrs = {};
    props = {};
    for (var j = 0; j < attOfPH.length; ++j) {
      attNode = attOfPH[j];
      attrName = attNode.nodeName;
      attrValue = attNode.nodeValue;
      if (attrName == 'style') {
        attrValue.trim().split(';').reduce(function (style, prop) {
          var p = prop.split(':');
          if (p.length == 2) {
            style[p[0].trim()] = p[1].trim();
          }
          return style;
        }, style);
      } else if (attrName == 'class') {
        classList = attrValue.trim().split(/\s+/);
      } else if (attrName == 'onchange') {
        props.onchange = new Function('event', 'sender', attrValue);
      } else {
        attrs[attrName] = attrValue;
      }
    }
    var newElt = _({
      tag: this.tag,
      attr: attrs,
      "class": classList,
      style: style,
      props: props
    });
    $(ph).selfReplace(newElt);
  }
};
RadioInput.initAfterLoad = function () {
  _Dom["default"].documentReady.then(function () {
    RadioInput.autoReplace();
  });
};
var _default = RadioInput;
exports["default"] = _default;

/***/ }),

/***/ 39124:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _datetime = __webpack_require__(58286);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @extends AElement
 * @constructor
 */
function RelativeTimeText() {
  if (!this.share.manager) this.share.manager = new RTTManager();
  this.share.manager.add(this);
  this.addClass('as-relative-time-text');
  /**
   *
   * @type {null|Date}
   * @private
   */
  this._time = null;

  /**
   * @name timeText
   * @type {string}
   * @memberOf RelativeTimeText#
   */

  /**
   * @name time
   * @type {Date}
   * @memberOf RelativeTimeText#
   */
}

RelativeTimeText.tag = 'RelativeTimeText'.toLowerCase();
RelativeTimeText.render = function () {
  return (0, _ACore._)({});
};
RelativeTimeText.prototype.updateText = function () {
  if (!this._time) return;
  var now = Date.now();
  var diff = now - this._time.getTime();
  var min = Math.round(diff / 6e4);
  var lang = this.getLanguage();
  var hour = Math.round(min / 60);
  var day = Math.round(hour / 24);
  if (min < 1) {
    this.timeText = lang === 'vi' ? "Vừa xong" : "Just now";
  } else if (min < 60) {
    this.timeText = lang === 'vi' ? min + ' phút' : min + ' minutes';
  } else if (hour < 24) {
    this.timeText = lang === 'vi' ? hour + ' giờ' : hour + ' hours';
  } else {
    this.timeText = lang === 'vi' ? day + ' ngày' : day + ' days';
  }
};
RelativeTimeText.prototype.getLanguage = function () {
  if (window.systemconfig && window.systemconfig.language) {
    return window.systemconfig.language === 'VN' ? 'vi' : 'en';
  } else {
    return navigator.language === 'vi' ? 'vi' : 'en';
  }
};
RelativeTimeText.prototype.share = {
  manager: null
};
RelativeTimeText.property = {};
RelativeTimeText.property.timeText = {
  set: function set(value) {
    if (value instanceof Date) {
      value = value.toLocaleDateString() + ' ' + value.toLocaleTimeString();
    }
    this.attr('data-time-text', value);
  },
  get: function get() {
    return this.attr('data-time-text');
  }
};
RelativeTimeText.property.time = {
  set: function set(value) {
    value = (0, _datetime.implicitDate)(value);
    this._time = value;
    this.updateText();
    if (value) {
      this.attr('title', value.toLocaleDateString() + ' ' + value.toLocaleTimeString());
    } else {
      this.attr('title', null);
    }
  },
  get: function get() {
    return this._time;
  }
};
var _default = RelativeTimeText;
exports["default"] = _default;
_ACore["default"].install(RelativeTimeText);
function RTTManager() {
  /**
   *
   * @type {{elt:RelativeTimeText, time: number}[]}
   */
  this.arr = [];
  this.update = this.update.bind(this);
}
RTTManager.prototype.add = function (element) {
  this.arr.push({
    elt: element,
    time: Date.now()
  });
  if (this.arr.length === 1) {
    setTimeout(this.update, 20000);
  }
};
RTTManager.prototype.update = function () {
  var remainArr = [];
  var now = Date.now();
  var it, ok;
  for (var i = 0; i < this.arr.length; i++) {
    it = this.arr[i];
    ok = now - it.time < 60000;
    if (!ok) {
      if (it.elt.isDescendantOf(document.body)) {
        it.time = now;
        ok = true;
      }
    }
    if (ok) {
      it.elt.updateText();
      remainArr.push(it);
    }
  }
  this.arr = remainArr;
  if (this.arr.length > 0) {
    setTimeout(this.update, 20000);
  }
};

/***/ }),

/***/ 44716:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _XHR = _interopRequireDefault(__webpack_require__(53710));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function RemoteSvg() {}
RemoteSvg.tag = 'RemoteSvg'.toLowerCase();
RemoteSvg.render = function () {
  return _('svg').defineEvent('load');
};
RemoteSvg.property = {
  src: {
    set: function set(value) {
      this._src = value;
      var self = this;
      RemoteSvg.loadIcon(value).then(function (data) {
        self.emit('load', {
          target: self,
          src: value,
          data: data
        }, self);
        self.attr(data.attr);
        self.init(data.props);
      });
    },
    get: function get() {
      return this._name;
    }
  }
};
RemoteSvg.attribute = {
  src: {
    set: function set(value) {},
    get: function get() {},
    remove: function remove() {}
  }
};
RemoteSvg.__cache__ = {};
RemoteSvg.__div_parser__ = document.createElement('div');
RemoteSvg.loadIcon = function (path) {
  if (RemoteSvg.__cache__[path]) {
    return RemoteSvg.__cache__[path];
  } else {
    RemoteSvg.__cache__[path] = _XHR["default"].getRequest(path, 'text').then(function (result) {
      RemoteSvg.__div_parser__.innerHTML = result;
      var svgElt = $('svg', RemoteSvg.__div_parser__);
      var res = {
        attr: {},
        props: {}
      };
      if (svgElt) {
        Array.prototype.forEach.call(svgElt.attributes, function (attribute) {
          res.attr[attribute.name] = attribute.value;
        });
        res.props.innerHTML = svgElt.innerHTML;
      }
      return res;
    }, function () {
      return {};
    });
    return RemoteSvg.__cache__[path];
  }
};
_ACore["default"].install(RemoteSvg);
var _default = RemoteSvg;
exports["default"] = _default;

/***/ }),

/***/ 32615:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(34388);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _EventEmitter = __webpack_require__(46833);
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends Hanger
 * @constructor
 */
function ResizeBox() {
  this.on({
    draginit: this.eventHandler.rbDragInit,
    dragdeinit: this.eventHandler.rbDragDeinit
  });
  this.hangon = 3;
  this._mousedownEventData = undefined;
  this._mousemoveEventData = undefined;
  this._lastClickTime = 0;
}
ResizeBox.tag = 'ResizeBox'.toLowerCase();
ResizeBox.render = function () {
  return _({
    tag: _Hanger["default"].tag,
    "class": 'as-resize-box',
    extendEvent: ['beginmove', 'endmove', 'moving', 'click', 'dblclick'],
    //override click event
    child: {
      "class": 'as-resize-box-body',
      child: ['.as-resize-box-dot.left-top', '.as-resize-box-dot.top', '.as-resize-box-dot.right-top', '.as-resize-box-dot.right', '.as-resize-box-dot.right-bottom', '.as-resize-box-dot.bottom', '.as-resize-box-dot.left-bottom', '.as-resize-box-dot.left']
    }
  });
};
ResizeBox.eventHandler = {};
ResizeBox.eventHandler.rbDragInit = function (event) {
  if ((0, _EventEmitter.isMouseRight)(event.originEvent)) {
    event.cancel();
    return;
  }
  var target = event.target;
  if (!target.attr) return;
  if (!target.hasClass('as-resize-box-dot') && !target.hasClass('as-resize-box-body')) return;
  var optionNames = event.target.attr('class').match(/body|left|top|right|bottom/g);
  if (optionNames.length === 0) return;
  this._mouseOptionNames = optionNames;
  this._mouseOptionDict = this._mouseOptionNames.reduce(function (ac, cr) {
    ac[cr] = true;
    return ac;
  }, {});
  this.on({
    drag: this.eventHandler.rbDrag,
    dragend: this.eventHandler.rbDragEnd,
    dragstart: this.eventHandler.rbDragStart
  });
  this._dragged = false;
};
ResizeBox.eventHandler.rbDragDeinit = function (event) {
  this.off({
    drag: this.eventHandler.rbDrag,
    dragend: this.eventHandler.rbDragEnd,
    dragstart: this.eventHandler.rbDragStart
  });
  var now = new Date().getTime();
  if (!this._dragged) {
    if (now - this._lastClickTime < 400) {
      this.emit('dblclick', Object.assign({}, event, {
        type: 'dblclick'
      }), this);
      this._lastClickTime = 0;
    } else {
      this.emit('click', Object.assign({}, event, {
        type: 'click'
      }), this);
      this._lastClickTime = now;
    }
  }
};
ResizeBox.eventHandler.rbDrag = function (event) {
  if (this._mousedownEventData.option.body && !this.canMove) return;
  this._dragged = true;
  event.preventDefault();
  this._mousemoveEventData = {
    clientX: event.clientX,
    clientY: event.clientY,
    clientX0: this._mousedownEventData.clientX,
    clientY0: this._mousedownEventData.clientY,
    clientDX: event.clientX - this._mousedownEventData.clientX,
    clientDY: event.clientY - this._mousedownEventData.clientY,
    target: this,
    originEvent: event,
    option: this._mousedownEventData.option,
    type: 'moving',
    begin: true
  };
  this.emit('moving', this._mousemoveEventData, this);
};
ResizeBox.eventHandler.rbDragStart = function (event) {
  event.preventDefault();
  this._optionNames = event.target.attr('class').match(/body|left|top|right|bottom/g);
  this._dragged = true;
  $(document.body).addClass('as-resize-box-overiding').addClass(this._optionNames.join('-'));
  var option = this._optionNames.reduce(function (ac, key) {
    ac[key] = true;
    return ac;
  }, {});
  this._mousedownEventData = {
    clientX: event.clientX,
    clientY: event.clientY,
    target: this,
    originEvent: event,
    prevented: false,
    preventDefault: function preventDefault() {
      this.prevented = true;
    },
    option: option,
    begin: false,
    type: 'beginmove'
  };
  this.emit('beginmove', this._mousedownEventData, this);
};
ResizeBox.eventHandler.rbDragEnd = function (event) {
  document.body.classList.remove('as-resize-box-overiding');
  document.body.classList.remove(this._optionNames.join('-'));
  this._mousefinishEventData = {
    clientX: event.clientX,
    clientY: event.clientY,
    clientX0: this._mousedownEventData.clientX,
    clientY0: this._mousedownEventData.clientY,
    clientDX: event.clientX - this._mousedownEventData.clientX,
    clientDY: event.clientY - this._mousedownEventData.clientY,
    target: this,
    originEvent: event,
    option: this._mousedownEventData.option,
    type: 'endmove'
  };
  this.emit('endmove', this._mousefinishEventData, this);
};
ResizeBox.property = {};
ResizeBox.property.canMove = {
  set: function set(value) {
    if (value) {
      this.addClass('as-can-move');
    } else {
      this.removeClass('as-can-move');
    }
  },
  get: function get() {
    return this.hasClass('as-can-move');
  }
};
ResizeBox.property.canResize = {
  set: function set(value) {
    if (value) {
      this.addClass('as-can-resize');
    } else {
      this.removeClass('as-can-resize');
    }
  },
  get: function get() {
    return this.hasClass('as-can-resize');
  }
};
ResizeBox.property.canClick = {
  set: function set(value) {
    if (value) {
      this.addClass('as-can-click');
    } else {
      this.removeClass('as-can-click');
    }
  },
  get: function get() {
    return this.hasClass('as-can-click');
  }
};
_ACore["default"].install(ResizeBox);
var _default = ResizeBox;
exports["default"] = _default;

/***/ }),

/***/ 93856:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(45507);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _RibbonSplitButton = _interopRequireDefault(__webpack_require__(285));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function RibbonButton() {
  this.$icon = null;
  this._icon = null;
  this.$text = $('.as-ribbon-button-text', this);
  this.$textNode = this.$text.firstChild;
  this._menuHolder = null;
}
RibbonButton.tag = 'RibbonButton'.toLowerCase();
RibbonButton.render = function () {
  return _({
    tag: 'button',
    extendEvent: ['select'],
    attr: {
      'tabindex': '0'
    },
    "class": ['as-ribbon-button', 'as-no-dropdown'],
    child: [{
      tag: 'span',
      "class": 'as-ribbon-button-text',
      child: {
        text: ''
      }
    }, 'span.mdi.mdi-chevron-down.as-ribbon-dropdown-icon']
  });
};
RibbonButton.property = Object.assign({}, _RibbonSplitButton["default"].property);
RibbonButton.property.icon = {
  set: function set(icon) {
    icon = icon || null;
    this._icon = icon;
    if (this.$icon) this.removeChild(this.$icon);
    if (icon) {
      this.$icon = _(icon);
      this.addChildBefore(this.$icon, this.$text);
      if (this.$icon.addClass) this.$icon.addClass('as-ribbon-button-icon');
    } else {
      this.$icon = null;
    }
  },
  get: function get() {
    return this._icon;
  }
};
RibbonButton.eventHandler = {};
_ACore["default"].install(RibbonButton);
var _default = RibbonButton;
exports["default"] = _default;

/***/ }),

/***/ 285:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(11391);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _utils = __webpack_require__(84512);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function RibbonSplitButton() {
  this.$icon = null;
  this._icon = null;
  this.$text = $('.as-ribbon-split-button-text', this);
  this.$primaryBtn = $('.as-ribbon-split-button-primary', this).on('click', this.eventHandler.clickPrimaryBtn);
  this.$extendBtn = $('.as-ribbon-split-button-extend', this);
  this.$extendText = $('.as-ribbon-split-button-text', this.$extendBtn); //for big style
  this._menuHolder = null;
}
RibbonSplitButton.tag = 'RibbonSplitButton'.toLowerCase();
RibbonSplitButton.render = function () {
  return _({
    extendEvent: ['press', 'select'],
    attr: {
      'tabindex': '0'
    },
    "class": ['as-ribbon-split-button', 'as-no-dropdown'],
    child: {
      "class": 'as-ribbon-split-button-content',
      child: [{
        tag: 'button',
        attr: {
          'tabindex': '-1'
        },
        "class": 'as-ribbon-split-button-primary',
        child: {
          tag: 'span',
          "class": 'as-ribbon-split-button-text'
        }
      }, {
        tag: 'button',
        attr: {
          'tabindex': '-1'
        },
        "class": 'as-ribbon-split-button-extend',
        child: ['span.as-ribbon-split-button-text', 'span.mdi.mdi-chevron-down.as-ribbon-dropdown-icon']
      }]
    }
  });
};
RibbonSplitButton.property = {};
RibbonSplitButton.property.items = {
  set: function set(items) {
    var thisB = this;
    this._items = items || [];
    if (this._items && this._items.length > 0) {
      if (!this._menuHolder) {
        this.removeClass('as-no-dropdown');
        this._menuHolder = _QuickMenu["default"].toggleWhenClick(this.$extendBtn || this, {
          getMenuProps: function getMenuProps() {
            return {
              extendStyle: {
                'min-width': thisB.getBoundingClientRect().width + 'px'
              },
              items: thisB._items
            };
          },
          getFlowedElement: function getFlowedElement() {
            return thisB;
          },
          anchor: [1, 2, 6, 5],
          onSelect: function onSelect(item) {
            thisB.emit('select', {
              item: (0, _utils.cleanMenuItemProperty)(item),
              type: 'select',
              target: thisB
            });
          }
        });
      }
    } else {
      if (this._menuHolder) {
        this.addClass('as-no-dropdown');
        this._menuHolder.remove();
        this._menuHolder = null;
      }
    }
  },
  get: function get() {
    return this._items;
  }
};
RibbonSplitButton.property.text = {
  set: function set(value) {
    value = value || '';
    this.$text.attr('data-text', value);
    if (this.$extendText) this.$extendText.attr('data-text', value);
  },
  get: function get() {
    return this.$text.attr('data-text') | '';
  }
};
RibbonSplitButton.property.icon = {
  set: function set(icon) {
    icon = icon || null;
    this._icon = icon;
    if (this.$icon) this.$primaryBtn.removeChild(this.$icon);
    if (icon) {
      this.$icon = _(icon);
      this.$primaryBtn.addChildBefore(this.$icon, this.$text);
      if (this.$icon.addClass) this.$icon.addClass('as-ribbon-split-button-icon');
    } else {
      this.$icon = null;
    }
  },
  get: function get() {
    return this._icon;
  }
};
RibbonSplitButton.eventHandler = {};
RibbonSplitButton.eventHandler.clickPrimaryBtn = function () {
  this.emit('press', {
    type: 'press',
    target: this,
    item: (0, _utils.cleanMenuItemProperty)(this)
  });
};
_ACore["default"].install(RibbonSplitButton);
var _default = RibbonSplitButton;
exports["default"] = _default;

/***/ }),

/***/ 61862:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(69083);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function RotatedText() {
  this.$attachHook = (0, _ACore.$)('attachhook', this);
  this.$attachHook.requestUpdateSize = this.eventHandler.positionChange;
  this.$attachHook.on('attached', this.eventHandler.attached);
  this.$anchor = (0, _ACore.$)('.as-rotated-text-anchor', this);
  this.$content = (0, _ACore.$)('.as-rotated-text-content', this);
  this.$contentText = this.$content.firstChild;
  this.$trackElts = [];
  this._angle = 0;
  this.angle = 0;
  this.text = '';
  this._trackInterval = -1;
}
RotatedText.tag = 'RotatedText';
RotatedText.render = function () {
  return (0, _ACore._)({
    tag: 'span',
    "class": 'as-rotated-text',
    child: ['attachhook', {
      "class": 'as-rotated-text-anchor',
      child: {
        tag: 'span',
        "class": 'as-rotated-text-content',
        child: {
          text: ''
        }
      }
    }]
  });
};
RotatedText.prototype._trackPosition = function () {
  this._cancelTrackPosition();
  var parent = this.parentElement;
  while (parent) {
    parent.addEventListener('scroll', this.eventHandler.positionChange);
    this.$trackElts.push(parent);
    parent = parent.parentElement;
  }
  document.addEventListener('scroll', this.eventHandler.positionChange);
  this.$trackElts.push(document);
  this._trackInterval = setInterval(this.eventHandler.intervalCheck, 3000);
};
RotatedText.prototype._cancelTrackPosition = function () {
  if (this._trackInterval >= 0) {
    clearInterval(this._trackInterval);
    this._trackInterval = -1;
  }
  while (this.$trackElts.length > 0) {
    this.$trackElts.pop().removeEventListener('scroll', this.eventHandler.positionChange);
  }
};
RotatedText.property = {};
RotatedText.property.text = {
  get: function get() {
    return this.$contentText.data;
  },
  set: function set(value) {
    value = value || '';
    value = value + '';
    this.$contentText.data = value;
  }
};
RotatedText.property.angle = {
  set: function set(value) {
    value = value || 0;
    var matched;
    if (typeof value === 'number') {
      this._angle = value;
      this.$content.addStyle('transform', 'rotate(' + value + 'deg)');
    } else if (value.match) {
      matched = value.match(/([0-9.+\-e]+)deg/);
      if (matched) {
        value = parseFloat(matched[1]);
        if (isFinite(value)) {
          this._angle = value;
          this.$content.addStyle('transform', 'rotate(' + this._angle + 'deg)');
        }
        return;
      }
      matched = value.match(/([0-9.+\-e]+)rad/);
      if (matched) {
        value = parseFloat(matched[1]);
        if (isFinite(value)) {
          this._angle = value * 180 / Math.PI;
          this.$content.addStyle('transform', 'rotate(' + this._angle + 'deg)');
        }
      }
    }
  },
  get: function get() {
    return this._angle;
  }
};
RotatedText.eventHandler = {};
RotatedText.eventHandler.attached = function () {
  _ResizeSystem["default"].add(this);
  this.eventHandler.positionChange();
  this.$content.addStyle('transform-origin', Math.round(0.3 * this.$content.getFontSize()) + 'px 50%');
  this._trackPosition();
};
RotatedText.eventHandler.detached = function () {
  this._cancelTrackPosition();
};
RotatedText.eventHandler.intervalCheck = function () {
  if (!this.isDescendantOf(document.body)) {
    this.eventHandler.detached();
  }
};
RotatedText.eventHandler.positionChange = function () {
  var bound = this.getBoundingClientRect();
  this.$anchor.addStyle({
    top: Math.round(bound.top) + 'px',
    left: Math.round(bound.left) + 'px'
  });
};
_ACore["default"].install(RotatedText);
var _default = RotatedText;
exports["default"] = _default;

/***/ }),

/***/ 87780:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.HScrollbar = HScrollbar;
exports.HScroller = HScroller;
exports.Scrollbar = Scrollbar;
exports.VScrollbar = VScrollbar;
exports.VScroller = VScroller;
__webpack_require__(29874);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Element = _interopRequireDefault(__webpack_require__(55781));
var _int = __webpack_require__(65909);
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
_ACore["default"].$scrollStyle = function () {
  var element = _('style#vscroller-style');
  element.innerHTML = ['.absol-vscroller-viewport{ margin-right: ' + -17 + 'px;  min-width: calc(100% + ' + 17 + 'px);}', '.absol-hscroller-viewport{ margin-bottom: ' + -17 + 'px;  min-height: calc(100% + ' + 17 + 'px);}'].join('\n');
  document.head.appendChild(element);
  _Dom["default"].getScrollSize().then(function (size) {
    element.innerHTML = ['.absol-vscroller-viewport{ margin-right: ' + -size.width + 'px; min-width: calc(100% + ' + size.width + 'px);}', '.absol-hscroller-viewport{ margin-bottom: ' + -size.height + 'px; min-height: calc(100% + ' + size.height + 'px);}'].join('\n');
  });
  return element;
}();

/***
 * @extends AElement
 * @constructor
 */
function VScroller() {
  var thisVS = this;
  this.$attachHook = $('attachhook', this);
  this.sync = new Promise(function (rs) {
    thisVS.$attachHook.once('error', function () {
      rs();
    });
  });
  this.$attachHook.on('error', function () {
    thisVS.requestUpdateSize();
  });
  this.$vscrollbar = $('vscrollbar', this).on('scroll', this.eventHandler.scrollScrollbar);
  this.$viewport = $('.absol-vscroller-viewport', this).on('scroll', this.eventHandler.scrollViewport);
  _OOP["default"]["extends"](thisVS.$viewport, {
    removeChild: function removeChild() {
      this["super"].apply(this, arguments);
      thisVS.requestUpdateSize();
      return thisVS;
    }
  });
}
VScroller.tag = 'vscroller';
VScroller.render = function () {
  return _({
    "class": 'absol-vscroller',
    child: ['.absol-vscroller-viewport', {
      "class": ['absol-scrollbar-container', 'vertical'],
      child: 'vscrollbar'
    }, 'attachhook']
  });
};
VScroller.prototype.requestUpdateSize = function () {
  // return;
  if (this._isRequestingUpdateSize) return this.sync;
  this._isRequestingUpdateSize = true;
  this.sync = this.sync.then(function () {
    this.$vscrollbar.outerHeight = this.$viewport.clientHeight;
    this.$vscrollbar.innerHeight = this.$viewport.scrollHeight - 2;
    this.$vscrollbar.innerOffset = this.$viewport.scrollTop;
    if (this.$vscrollbar.innerHeight <= this.$vscrollbar.outerHeight) {
      this.$vscrollbar.hidden = true;
      this.addClass('disabled');
    } else {
      this.removeClass('disabled');
      this.$vscrollbar.hidden = false;
    }
    this._isRequestingUpdateSize = false;
  }.bind(this));
  return this.sync;
};
VScroller.prototype.init = function (props) {
  this["super"](props);
  this.requestUpdateSize();
};
VScroller.prototype.addChild = function () {
  var res = this.$viewport.addChild.apply(this.$viewport, arguments);
  this.requestUpdateSize();
  return res;
};
VScroller.prototype.clearChild = function () {
  var res = this.$viewport.clearChild.apply(this.$viewport, arguments);
  this.requestUpdateSize();
  return res;
};
VScroller.prototype.addChildBefore = function () {
  var res = this.$viewport.addChildBefore.apply(this.$viewport, arguments);
  this.requestUpdateSize();
  return res;
};
VScroller.prototype.addChildAfter = function () {
  var res = this.$viewport.addChildAfter.apply(this.$viewport, arguments);
  this.requestUpdateSize();
  return res;
};
VScroller.prototype.findChildAfter = function () {
  return this.$viewport.findChildAfter.apply(this.$viewport, arguments);
};
VScroller.prototype.findChildBefore = function () {
  return this.$viewport.findChildBefore.apply(this.$viewport, arguments);
};
VScroller.prototype.removeChild = function () {
  var res = this.$viewport.removeChild.apply(this.$viewport, arguments);
  this.requestUpdateSize();
  return res;
};
VScroller.prototype.scrollInto = function (element, padding, scrollTime, beforFrame, afterFrame) {
  padding = padding || 0;
  scrollTime = scrollTime || 0;
  var frameCount = Math.ceil(scrollTime / 15 + 1);
  var self = this;
  function onFrame() {
    beforFrame && beforFrame();
    var elementBound = element.getBoundingClientRect();
    var viewportBound = self.$viewport.getBoundingClientRect();
    var currentScrollTop = self.$viewport.scrollTop;
    var newScrollTop = currentScrollTop;
    if (elementBound.bottom + padding > viewportBound.bottom) {
      newScrollTop = currentScrollTop + (elementBound.bottom + padding - viewportBound.bottom) / (Math.log(frameCount) + 1);
    }
    if (elementBound.top - padding < viewportBound.top) {
      newScrollTop = currentScrollTop - (viewportBound.top - (elementBound.top - padding)) / (Math.log(frameCount) + 1);
    }
    if (newScrollTop != currentScrollTop) {
      self.$viewport.scrollTop = newScrollTop;
    }
    afterFrame && afterFrame();
    frameCount--;
    if (frameCount > 0) setTimeout(onFrame, 15);
  }
  if (_Element["default"].prototype.isDescendantOf.call(element, this.$viewport)) {
    onFrame();
  }
};
VScroller.prototype.scrollBy = function (dy, duration) {
  duration = duration || 0;
  var frameCount = Math.ceil(duration / 20);
  var timeOut = duration / frameCount;
  var i = 0;
  var self = this;
  var start = self.$viewport.scrollTop;
  var end = start + dy;
  function onFrame() {
    self.$viewport.scrollTop = Math.max((0, _int.map)(i, 0, frameCount, start, end), 0);
    ++i;
    if (i <= frameCount) {
      setTimeout(onFrame, timeOut);
    } else {
      setTimeout(finish, timeOut);
    }
  }
  function finish() {
    self.$viewport.scrollTop = Math.max(end, 0);
  }
  onFrame();
};
VScroller.eventHandler = {};
VScroller.eventHandler.scrollViewport = function (event) {
  this.$vscrollbar.outerHeight = this.$viewport.clientHeight;
  this.$vscrollbar.innerHeight = this.$viewport.scrollHeight;
  this.$vscrollbar.innerOffset = this.$viewport.scrollTop;
};
VScroller.eventHandler.scrollScrollbar = function (event) {
  this.$viewport.scrollTop = this.$vscrollbar.innerOffset;
};

/***
 * @extends AElement
 * @constructor
 */
function HScroller() {
  var thisHS = this;
  this.$attachHook = $('attachhook', this).on('error', function () {
    this.requestUpdateSize = this.requestUpdateSize || thisHS.requestUpdateSize.bind(thisHS);
    _Dom["default"].addToResizeSystem(this);
  });
  this.sync = new Promise(function (rs, rj) {
    thisHS.$attachHook.once('error', rs);
  });
  this.$hscrollbar = $('hscrollbar', this).on('scroll', this.eventHandler.scrollScrollbar);
  this.$viewport = $('.absol-hscroller-viewport', this).on('scroll', this.eventHandler.scrollViewport);
  _OOP["default"]["extends"](this.$viewport, {
    removeChild: function removeChild() {
      this["super"].apply(this, arguments);
      thisHS.requestUpdateSize();
      return thisHS;
    }
  });
}
HScroller.tag = 'hscroller';
HScroller.render = function () {
  return _({
    "class": 'absol-hscroller',
    child: ['.absol-hscroller-viewport', {
      "class": ['absol-scrollbar-container', 'horizontal'],
      child: 'hscrollbar'
    }, 'attachhook']
  });
};
HScroller.eventHandler = {};
HScroller.eventHandler.scrollViewport = function (event) {
  this.$hscrollbar.outerWidth = this.$viewport.clientWidth;
  this.$hscrollbar.innerWidth = this.$viewport.scrollWidth;
  this.$hscrollbar.innerOffset = this.$viewport.scrollLeft;
};
HScroller.eventHandler.scrollScrollbar = function (event) {
  this.$viewport.scrollLeft = this.$hscrollbar.innerOffset;
};
Object.assign(HScroller.prototype, VScroller.prototype);
HScroller.prototype.requestUpdateSize = function () {
  // return;
  if (this._isRequestingUpdateSize) return this.sync;
  this._isRequestingUpdateSize = true;
  this.sync = this.sync.then(function () {
    this.$hscrollbar.outerWidth = this.$viewport.clientWidth;
    this.$hscrollbar.innerWidth = this.$viewport.scrollWidth;
    this.$hscrollbar.innerOffset = this.$viewport.scrollLeft;
    if (this.$hscrollbar.innerWidth <= this.$hscrollbar.outerWidth) {
      this.$hscrollbar.hidden = true;
      this.addClass('disabled');
    } else {
      this.removeClass('disabled');
      this.$hscrollbar.hidden = false;
    }
    this._isRequestingUpdateSize = false;
  }.bind(this));
  return this.sync;
};
HScroller.prototype.scrollInto = function (element) {
  if (_Element["default"].prototype.isDescendantOf.call(element, this.$viewport)) {
    var elementBound = element.getBoundingClientRect();
    var viewportBound = this.$viewport.getBoundingClientRect();
    var currentScrollLeft = this.$viewport.scrollLeft;
    var newScrollLeft = currentScrollLeft;
    if (elementBound.right > viewportBound.right) {
      newScrollLeft = currentScrollLeft + (elementBound.right - viewportBound.right);
    }
    if (elementBound.left < viewportBound.left) {
      newScrollLeft = currentScrollLeft - (viewportBound.left - elementBound.left);
    }
    if (newScrollLeft != currentScrollLeft) {
      this.$viewport.scrollLeft = newScrollLeft;
    }
  }
};

/***
 * @extends AElement
 * @constructor
 */
function Scrollbar() {
  var thisSB = this;
  this.$button = $('.absol-scrollbar-button', this);
  this.on('inactive', function (event, sender) {
    this.emit('deactive', event, sender);
  });
}
Scrollbar.tag = 'scrollbar';
Scrollbar.render = function () {
  return _({
    tag: _Hanger["default"].tag,
    "class": ['absol-scrollbar'],
    extendEvent: ['scroll', 'active', 'inactive', 'deactive'],
    child: '.absol-scrollbar-button'
  });
};
Scrollbar.property = {};
Scrollbar.property.hidden = {
  set: function set(value) {
    value = !!value;
    if (value !== this._hidden) {
      this._hidden = value;
      if (value) this.addClass('absol-hidden');else this.removeClass('absol-hidden');
    }
  },
  get: function get() {
    return this.hasClass('absol-hidden');
  }
};

/***
 * @extends Scrollbar
 * @constructor
 */
function VScrollbar() {
  this.on('draginit', this.eventHandler.dragInit, true).on('drag', this.eventHandler.drag, true).on('dragend', this.eventHandler.dragEnd, true);
  /***
   * @type {number}
   * @name outerHeight
   * @memberOf VScrollbar#
   */

  /***
   * @type {number}
   * @name innerHeight
   * @memberOf VScrollbar#
   */
  /***
   * @type {number}
   * @name innerHeight
   * @memberOf VScrollbar#
   */
}

VScrollbar.tag = 'vscrollbar';
VScrollbar.render = function () {
  return _({
    tag: 'scrollbar',
    "class": 'absol-vscrollbar'
  }, true);
};
VScrollbar.prototype.updateValue = function () {
  this.$button.addStyle('height', Math.min(this.outerHeight / this.innerHeight, 1) * 100 + '%');
  this.$button.addStyle('top', this.innerOffset / this.innerHeight * 100 + '%');
};
VScrollbar.prototype.updateStatus = function () {
  if (this.innerHeight > this.outerHeight) {
    this.addClass('as-overflow');
  } else {
    this.removeClass('as-overflow');
  }
};
VScrollbar.eventHandler = {};
VScrollbar.eventHandler.dragInit = function (event) {
  event.preventDefault();
  var boundRes = this.getBoundingClientRect();
  var boundButton = this.$button.getBoundingClientRect();
  if (event.target === this.$button) {
    this.innerOffset0 = this.innerOffset;
  } else {
    var newInnerOffset = (0, _int.map)(event.startingPoint.y - boundButton.height / 2 - boundRes.top, 0, boundRes.height, 0, this.innerHeight);
    if (newInnerOffset + this.outerHeight > this.innerHeight) newInnerOffset = this.innerHeight - this.outerHeight;
    if (newInnerOffset < 0) newInnerOffset = 0;
    this.innerOffset = newInnerOffset;
    //todo
    event.innerOffset = newInnerOffset;
    this.innerOffset0 = newInnerOffset;
    this.emit('scroll', event);
  }
  this.addClass('absol-active');
  this.emit('active', {
    type: 'active',
    originEvent: event,
    target: this,
    originalEvent: event.originalEvent || event
  });
};
VScrollbar.eventHandler.drag = function (event) {
  event.preventDefault();
  var dy = event.currentPoint.sub(event.startingPoint).y;
  var newInnerOffset = this.innerOffset0 + dy * (this.innerHeight / this.outerHeight) * (this.outerHeight / this.getBoundingClientRect().height);
  if (newInnerOffset + this.outerHeight > this.innerHeight) newInnerOffset = this.innerHeight - this.outerHeight;
  if (newInnerOffset < 0) newInnerOffset = 0;
  this.innerOffset = newInnerOffset;
  event.innerOffset = newInnerOffset;
  this.emit('scroll', event);
};
VScrollbar.eventHandler.dragEnd = function (event) {
  this.removeClass('absol-active');
  this.emit('inactive', {
    type: 'inactive',
    originEvent: event,
    target: this,
    originalEvent: event.originalEvent || event
  });
};
VScrollbar.property = {
  innerOffset: {
    set: function set(value) {
      value = value || 0;
      if (this._innerOffset != value) {
        this._innerOffset = value;
        this.updateValue();
      }
    },
    get: function get() {
      return this._innerOffset || 0;
    }
  },
  innerHeight: {
    set: function set(value) {
      value = value || 1;
      value = Math.max(value, 1);
      if (this._innerHeight !== value) {
        this._innerHeight = value;
        this.updateValue();
      }
      this.updateStatus();
    },
    get: function get() {
      return this._innerHeight || 1;
    }
  },
  outerHeight: {
    set: function set(value) {
      value = value || 0;
      value = Math.max(value, 0);
      if (this._outerHeight !== value) {
        this._outerHeight = value;
        this.updateValue();
      }
      this.updateStatus();
    },
    get: function get() {
      return this._outerHeight || 0;
    }
  }
};

/***
 * @extends Scrollbar
 * @constructor
 */
function HScrollbar() {
  this.on('draginit', this.eventHandler.dragInit, true).on('drag', this.eventHandler.drag, true).on('dragend', this.eventHandler.dragEnd, true);

  /***
   * @type {number}
   * @name innerOffset
   * @memberOf HScrollbar#
   */
  /***
   * @type {number}
   * @name innerWidth
   * @memberOf HScrollbar#
   */
  /***
   * @type {number}
   * @name outerWidth
   * @memberOf HScrollbar#
   */
}

HScrollbar.tag = 'hscrollbar';
HScrollbar.render = function () {
  return _({
    tag: 'scrollbar',
    "class": 'absol-hscrollbar'
  }, true);
};
HScrollbar.prototype.updateValue = function () {
  this.$button.addStyle('width', Math.min(this.outerWidth / this.innerWidth, 1) * 100 + '%');
  this.$button.addStyle('left', this.innerOffset / this.innerWidth * 100 + '%');
};
HScrollbar.prototype.updateStatus = function () {
  if (this.innerWidth > this.outerWidth) {
    this.addClass('as-overflow');
  } else {
    this.removeClass('as-overflow');
  }
};

/**
 *
 * @type {{[key: string]:function}}
 */
HScrollbar.eventHandler = {};

/**
 * @this HScrollbar
 * @param event
 */
HScrollbar.eventHandler.dragInit = function (event) {
  event.preventDefault();
  var boundRes = this.getBoundingClientRect();
  var boundButton = this.$button.getBoundingClientRect();
  if (event.target === this.$button) {
    this.innerOffset0 = this.innerOffset;
  } else {
    var newInnerOffset = (0, _int.map)(event.startingPoint.x - boundButton.width / 2 - boundRes.left, 0, boundRes.width, 0, this.innerWidth);
    if (newInnerOffset + this.outerWidth > this.innerWidth) newInnerOffset = this.innerWidth - this.outerWidth;
    if (newInnerOffset < 0) newInnerOffset = 0;
    this.innerOffset = newInnerOffset;
    //todo
    event.innerOffset = newInnerOffset;
    this.innerOffset0 = newInnerOffset;
    this.emit('scroll', event);
  }
  var body = $(document.body);
  this.addClass('absol-active');
  this.emit('active', {
    type: 'inactive',
    originEvent: event,
    target: this
  });
};

/**
 * @this HScrollbar
 * @param event
 */
HScrollbar.eventHandler.drag = function (event) {
  event.preventDefault();
  var dy = event.currentPoint.x - event.startingPoint.x;
  var newInnerOffset = this.innerOffset0 + dy * (this.innerWidth / this.outerWidth) * (this.outerWidth / this.getBoundingClientRect().width);
  if (newInnerOffset + this.outerWidth > this.innerWidth) newInnerOffset = this.innerWidth - this.outerWidth;
  if (newInnerOffset < 0) newInnerOffset = 0;
  this.innerOffset = newInnerOffset;
  //todo
  event.innerOffset = newInnerOffset;
  this.emit('scroll', event);
};

/**
 * @this HScrollbar
 * @param event
 */
HScrollbar.eventHandler.dragEnd = function (event) {
  this.removeClass('absol-active');
  this.emit('inactive', {
    type: 'inactive',
    originEvent: event,
    target: this
  });
};
HScrollbar.property = {
  innerOffset: {
    set: function set(value) {
      value = value || 0;
      if (this._innerOffset !== value) {
        this._innerOffset = value;
        this.updateValue();
      }
    },
    get: function get() {
      return this._innerOffset || 0;
    }
  },
  innerWidth: {
    set: function set(value) {
      value = value || 1;
      value = Math.max(value, 1);
      if (this._innerWidth !== value) {
        this._innerWidth = value;
        this.updateValue();
      }
      this.updateStatus();
    },
    get: function get() {
      return this._innerWidth || 1;
    }
  },
  outerWidth: {
    set: function set(value) {
      value = value || 0;
      value = Math.max(value, 0);
      if (this._outerWidth !== value) {
        this._outerWidth = value;
        this.updateValue();
      }
      this.updateStatus();
    },
    get: function get() {
      return this._outerWidth || 0;
    }
  }
};
_ACore["default"].install([VScrollbar, HScrollbar, Scrollbar, VScroller, HScroller]);

/***/ }),

/***/ 47106:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(70880);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _Icons = __webpack_require__(39285);
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
_ACore["default"].creator['find-ico'] = function () {
  var res = _('<svg class="find" width="100mm" height="100mm" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">' + ' <g transform="matrix(-1 0 0 1 99.478 -193.73)">' + '  <path d="m62.128 199.18c-18.859 0-34.148 15.289-34.148 34.148 0 5.4138 1.26 10.533 3.5026 15.081 0.6886 1.3965 1.4698 2.7392 2.3357 4.02-1.9962 2.1685-31.467 31.596-31.404 33.295 0.21757 5.8346 4.9404 8.7289 9.464 7.855 1.3264-0.25627 30.938-30.639 31.774-31.529 1.3906 0.89633 2.8508 1.6948 4.3702 2.3848 4.2995 1.9526 9.0756 3.04 14.105 3.04 18.859 0 34.147-15.288 34.147-34.147 3e-6 -18.859-15.288-34.148-34.147-34.148zm0.49444 8.2454a26.067 26.067 0 0 1 26.068 26.067 26.067 26.067 0 0 1-26.068 26.068 26.067 26.067 0 0 1-26.067-26.068 26.067 26.067 0 0 1 26.067-26.067z"/>' + ' </g>' + '</svg>');
  return res;
};
_ACore["default"].creator['times-circle-ico'] = function () {
  var res = _('<svg class="times" width="100mm" height="100mm" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\
            <g transform="translate(0,-197)">\
                <path d="m49.979 236.2-14.231-14.231-10.696 10.696 14.257 14.257-14.351 14.351 10.737 10.737 14.292-14.292 14.292 14.292 10.761-10.761-14.257-14.257 14.316-14.316-10.725-10.725zm50.021 10.804a50 50 0 0 1-50 50 50 50 0 0 1-50-50 50 50 0 0 1 50-50 50 50 0 0 1 50 50z" />\
            </g>\
        </svg>');
  return res;
};

/**
 * @extends {AElement}
 * @constructor
 */
function SearchTextInput() {
  var thisSTI = this;
  this.defineEvent(['change', 'modify', 'stoptyping']);
  this.eventHandler = _OOP["default"].bindFunctions(this, SearchTextInput.eventHandler);
  this.$button = $('button', this);
  this.$input = $('input', this);
  ['keyup', 'keydown', 'focus', 'blur'].forEach(function (evName) {
    thisSTI.defineEvent(evName);
    thisSTI.$input.on(evName, function (event) {
      thisSTI.emit(evName, event, thisSTI);
    });
  });
  this.$input.on('change', this.eventHandler.inputChange);
  this.$input.on('keyup', this.eventHandler.inputKeyUp);
  this.$button.on('click', function (event) {
    thisSTI.$input.value = '';
    thisSTI.eventHandler.inputKeyUp(event);
    setTimeout(function () {
      thisSTI.focus();
    }, 50);
  });
  /**
   * @type {string}
   * @name value
   * @memberOf SearchTextInput#
   */
}

SearchTextInput.tag = 'SearchTextInput'.toLowerCase();
SearchTextInput.render = function () {
  return _({
    "class": 'absol-search-text-input',
    child: [{
      "class": 'absol-search-text-input-container',
      child: {
        tag: 'input',
        attr: {
          type: 'search',
          placeholder: _LanguageSystem["default"].getText('txt_search') || 'Search...'
        }
      }
    }, {
      "class": 'absol-search-text-button-container',
      child: {
        tag: 'button',
        child: ['find-ico', 'times-circle-ico', {
          tag: _Icons.SpinnerIco.tag,
          style: {
            margin: 0
          }
        }]
      }
    }]
  });
};
SearchTextInput.property = {
  value: {
    set: function set(value) {
      value = value || '';
      this.$input.value = value;
      this._lastTextModified = value;
      if (this.value.length > 0) {
        this.addClass('searching');
      } else {
        this.removeClass('searching');
      }
    },
    get: function get() {
      return this.$input.value;
    }
  },
  placeholder: {
    set: function set(value) {
      this.$input.attr('placeholder', value);
    },
    get: function get() {
      return this.$placeholder.getAttribute('placeholder');
    }
  }
};
SearchTextInput.property.waiting = {
  set: function set(value) {
    value = value || false;
    this._waiting = value;
    if (value) {
      this.addClass('as-waiting');
    } else {
      this.removeClass('as-waiting');
    }
  },
  get: function get() {
    return this._waiting || false;
  }
};
SearchTextInput.prototype.focus = function () {
  this.$input.focus();
};
SearchTextInput.prototype.blur = function () {
  this.$input.blur();
};
SearchTextInput.eventHandler = {};
SearchTextInput.eventHandler.inputChange = function (event) {
  event.value = this.value;
  if (typeof this.onchange == 'function') {
    this.onchange(event, this);
  }
  this.emit('change', event);
};
SearchTextInput.eventHandler.inputKeyUp = function (event) {
  if (this._lastTextModified != this.value) {
    if (this.value.length > 0) {
      this.addClass('searching');
    } else {
      this.removeClass('searching');
    }
    event.value = this.value;
    if (typeof this.onchange == 'function') {
      this.onchange(event, this);
    }
    this.emit('modify', event);
    if (this._updateTimeOut !== undefined) {
      clearTimeout(this._updateTimeOut);
      this._updateTimeOut = undefined;
    }
    this._updateTimeOut = setTimeout(function () {
      this.emit('stoptyping', event);
    }.bind(this), 500);
    this._lastTextModified = this.value;
  }
};
_ACore["default"].creator.searchcrosstextinput = function () {
  var res = _('searchtextinput', true);
  return res;
};
_ACore["default"].creator.searchtextinput = SearchTextInput;
var _default = SearchTextInput;
exports["default"] = _default;

/***/ }),

/***/ 28596:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.releaseItem = releaseItem;
exports.requireItem = requireItem;
__webpack_require__(95370);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _SelectMenu = _interopRequireDefault(__webpack_require__(41735));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _PositionTracker = _interopRequireDefault(__webpack_require__(97252));
var _SelectBoxItem = _interopRequireDefault(__webpack_require__(27233));
var _SelectListBox = __webpack_require__(47818);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function pressCloseEventHandler(event) {
  var parentElt = this.$parent;
  if (!parentElt) return;
  parentElt.eventHandler.pressCloseItem(this, event);
}
function pressHandler(event) {
  var parentElt = this.$parent;
  if (!parentElt) return;
  parentElt.eventHandler.pressItem(this, event);
}

/***
 *
 * @returns {SelectBoxItem}
 */
function makeItem() {
  return _({
    tag: 'selectboxitem',
    on: {
      close: pressCloseEventHandler,
      press: pressHandler
    }
  });
}
var itemPool = [];
function requireItem($parent) {
  var item;
  if (itemPool.length > 0) {
    item = itemPool.pop();
  } else {
    item = makeItem();
  }
  item.$parent = $parent;
  return item;
}
function releaseItem(item) {
  item.$parent = null;
  itemPool.push(item);
}

/***
 * @extends PositionTracker
 * @return {SelectBox}
 * @constructor
 */
function SelectBox() {
  this.on('click', this.eventHandler.click);
  this.$selectlistBox = _({
    tag: 'selectlistbox',
    props: {
      anchor: [1, 6, 2, 5],
      displayValue: _SelectListBox.VALUE_HIDDEN
    },
    on: {
      preupdateposition: this.eventHandler.preUpdateListPosition,
      pressitem: this.eventHandler.selectListBoxPressItem
    }
  });
  _OOP["default"].drillProperty(this, this.$selectlistBox, 'enableSearch');
  this.$items = [];
  this._values = [];
  this.items = [];
  this.values = [];
  this.$selectlistBox.followTarget = this;
  this.$selectlistBox.sponsorElement = this;
  this.disableClickToFocus = false;
  this.orderly = true;
  this.itemFocusable = false;
  this._activeValue = undefined;
  return this;
}
SelectBox.tag = 'selectbox';
SelectBox.render = function () {
  return _({
    tag: 'bscroller',
    "class": ['absol-selectbox', 'absol-bscroller'],
    extendEvent: ['change', 'add', 'remove', 'activevaluechange'],
    attr: {
      tabindex: '1'
    }
  }, true);
};
SelectBox.prototype._requireItem = function (n) {
  var itemElt;
  while (this.$items.length < n) {
    itemElt = requireItem(this);
    this.addChild(itemElt);
    this.$items.push(itemElt);
  }
  while (this.$items.length > n) {
    itemElt = this.$items.pop();
    this.removeChild(itemElt);
    releaseItem(itemElt);
  }
};
SelectBox.prototype._assignItems = function (items) {
  for (var i = 0; i < this.$items.length && i < items.length; ++i) {
    this.$items[i].data = items[i];
  }
};

/***
 *
 * @param {string[] | number[]} values
 * @private
 */
SelectBox.prototype._getItemsByValues = function (values) {
  var selectListBoxElt = this.$selectlistBox;
  var itemHolders = values.reduce(function (ac, cr) {
    ac.push.apply(ac, selectListBoxElt.findItemsByValue(cr));
    return ac;
  }, []);
  if (this.orderly) {
    itemHolders.sort(function (a, b) {
      return a.idx - b.idx;
    });
  }
  return itemHolders.map(function (holder) {
    return holder.item;
  });
};
SelectBox.prototype._updateItems = function () {
  this.viewItemsByValues(this._values);
};
SelectBox.prototype.viewItemsByValues = function (values) {
  var items = this._getItemsByValues(values);
  var cBound = this.getBoundingClientRect();
  this._requireItem(items.length);
  this._assignItems(items);
  if (this.itemFocusable) {
    this._updateFocusItem();
  }
  var nBound = this.getBoundingClientRect();
  if (nBound.width != cBound.width || nBound.height != cBound.height) {
    _ResizeSystem["default"].updateUp(this);
  }
};
SelectBox.property = {};
SelectBox.property.disabled = _SelectMenu["default"].property.disabled;
SelectBox.property.hidden = _SelectMenu["default"].property.hidden;
SelectBox.property.isFocus = _SelectMenu["default"].property.isFocus;
SelectBox.prototype.init = function (props) {
  props = props || [];
  Object.keys(props).forEach(function (key) {
    if (props[key] === undefined) delete props[key];
  });
  this["super"](props);
};
SelectBox.prototype._updateFocusItem = function () {
  for (var i = 0; i < this.$items.length; ++i) {
    this.$items[i].active = this.$items[i].value == this._activeValue;
  }
};
SelectBox.prototype.init = _SelectMenu["default"].prototype.init;
SelectBox.property.items = {
  set: function set(items) {
    items = items || [];
    this.$selectlistBox.items = items;
    this.addStyle('--list-min-width', this.$selectlistBox._estimateWidth + 'px');
    this._updateItems();
  },
  get: function get() {
    return this.$selectlistBox.items;
  }
};
SelectBox.property.values = {
  set: function set(values) {
    values = values || [];
    values = values instanceof Array ? values : [values];
    this._values = values;
    this.$selectlistBox.values = values;
    this._updateItems();
  },
  get: function get() {
    return this._values || [];
  }
};
SelectBox.property.orderly = {
  set: function set(value) {
    var needUpdate = this._orderly === this._orderly;
    if (typeof value === 'function') {
      this._orderly;
    } else this._orderly = !!value;
    if (needUpdate) {
      this.values = this.values;
    }
  },
  get: function get() {
    return !!this._orderly;
  }
};
SelectBox.property.disableClickToFocus = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disable-click-to-focus');
    } else {
      this.removeClass('as-disable-click-to-focus');
    }
  },
  get: function get() {
    return this.hasClass('as-disable-click-to-focus');
  }
};
SelectBox.property.itemFocusable = {
  set: function set(value) {
    if (value) {
      this.addClass('as-item-focusable');
    } else {
      this.removeClass('as-item-focusable');
    }
    this._updateFocusItem();
  },
  get: function get() {
    return this.hasClass('as-item-focusable');
  }
};
SelectBox.property.activeValue = {
  set: function set(value) {
    this._activeValue = value;
    if (this.itemFocusable) {
      this._updateFocusItem();
      //todo
    }
  },

  get: function get() {
    return this._activeValue;
  }
};
SelectBox.eventHandler = Object.assign({}, _SelectMenu["default"].eventHandler);
SelectBox.eventHandler.click = function (event) {
  if (event.target === this && !this.disableClickToFocus) {
    this.isFocus = !this.isFocus;
  }
};
SelectBox.eventHandler.bodyClick = function (event) {
  if (!_EventEmitter["default"].hitElement(this.$selectlistBox, event) && event.target !== this) {
    this.isFocus = false;
  }
};
SelectBox.eventHandler.selectListBoxPressItem = function (event) {
  var data = event.data;
  var currentValues = this.$selectlistBox.values;
  currentValues.push(data.value);
  this.$selectlistBox.values = currentValues;
  this.$selectlistBox.updatePosition();
  this._activeValue = data.value;
  this._updateItems();
  this.isFocus = false;
  this.emit('add', Object.assign({}, event, {
    type: 'add',
    target: this,
    value: data.value,
    data: data,
    itemData: data
  }), this);
  this.emit('change', Object.assign({}, event, {
    type: 'change',
    action: 'add',
    target: this,
    value: data.value,
    data: data,
    values: this.values
  }), this);
};
SelectBox.eventHandler.pressCloseItem = function (item, event) {
  var value = item.value;
  var data = item.data;
  var currentValues = this.$selectlistBox.values;
  var index = currentValues.indexOf(value);
  if (index >= 0) {
    currentValues.splice(index, 1);
  }
  this.$selectlistBox.values = currentValues;
  this.$selectlistBox.updatePosition();
  this._values = currentValues;
  this._updateItems();
  this.emit('remove', Object.assign({}, event, {
    type: 'change',
    target: this,
    data: data,
    value: value,
    itemData: data
  }), this);
  this.emit('change', Object.assign({}, event, {
    type: 'change',
    action: 'remove',
    target: this,
    data: data,
    value: value,
    itemData: data
  }), this);
};
SelectBox.eventHandler.pressItem = function (item, event) {
  var value = item.value;
  if (this.itemFocusable) {
    var prevActiveValue = this.activeValue;
    if (value !== prevActiveValue) {
      this.activeValue = value;
      this.emit('activevaluechange', {
        target: this,
        originEvent: event,
        prevActiveValue: prevActiveValue,
        activeValue: value
      }, this);
    }
  }
};
SelectBox.eventHandler.pressCloseItem = function (item, event) {
  var value = item.value;
  var data = item.data;
  var index;
  index = this._values.indexOf(value);
  if (index >= 0) {
    this._values.splice(index, 1);
    this._updateItems();
    this.$selectlistBox.values = this._values;
    this.emit('remove', Object.assign({}, event, {
      type: 'change',
      target: this,
      data: data,
      value: value,
      itemData: data
    }), this);
    this.emit('change', Object.assign({}, event, {
      type: 'change',
      action: 'remove',
      target: this,
      data: data,
      value: value,
      itemData: data
    }), this);
  }
};
_ACore["default"].install(SelectBox);
var _default = SelectBox;
exports["default"] = _default;

/***/ }),

/***/ 27233:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function SelectBoxItem() {
  this._themeClassName = null;
  this.$text = $('.absol-selectbox-item-text', this);
  this.$close = $('.absol-selectbox-item-close', this);
  this.$close.on('click', this.eventHandler.clickClose);
  this.on('click', this.eventHandler.click);
}
;
SelectBoxItem.tag = 'SelectBoxItem'.toLowerCase();
SelectBoxItem.render = function () {
  return _({
    "class": ['absol-selectbox-item'],
    extendEvent: ['close', 'press'],
    child: ['.absol-selectbox-item-text', {
      "class": 'absol-selectbox-item-close',
      child: '<span class="mdi mdi-close"></span>'
    }]
  });
};
SelectBoxItem.eventHandler = {};
SelectBoxItem.eventHandler.clickClose = function (event) {
  this.emit('close', event);
};
SelectBoxItem.eventHandler.click = function (event) {
  if (!_EventEmitter["default"].hitElement(this.$close, event)) {
    this.emit('press', event, this);
  }
};
SelectBoxItem.property = {};
SelectBoxItem.property.data = {
  set: function set(value) {
    this._data = value;
    this.$text.clearChild();
    this.$text.addChild(_('<span>' + this.text + '</span>'));
    if (value && value.desc) {
      this.attr('title', value.desc);
    } else {
      this.attr('title', undefined);
    }
    if (this._themeClassName) this.removeClass(this._themeClassName);
    this._themeClassName = null;
    if (this.theme) {
      this._themeClassName = 'as-theme-' + this.theme;
      this.addClass(this._themeClassName);
    }
  },
  get: function get() {
    return this._data;
  }
};
SelectBoxItem.property.text = {
  get: function get() {
    if (typeof this._data == 'string') return this._data;else return this._data.text;
  }
};
SelectBoxItem.property.value = {
  get: function get() {
    if (typeof this._data == 'string') return this._data;else return this._data.value;
  }
};
SelectBoxItem.property.theme = {
  get: function get() {
    return this._data.theme || null;
  }
};
SelectBoxItem.property.active = {
  set: function set(value) {
    if (value) {
      this.addClass('as-active');
    } else {
      this.removeClass('as-active');
    }
  },
  get: function get() {
    return this.hasClass('as-active');
  }
};
_ACore["default"].install(SelectBoxItem);
var _default = SelectBoxItem;
exports["default"] = _default;

/***/ }),

/***/ 884:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.makeItem = makeItem;
exports.measureListHeight = measureListHeight;
exports.measureListSize = measureListSize;
exports.measureMaxDescriptionWidth = measureMaxDescriptionWidth;
exports.measureMaxTextWidth = measureMaxTextWidth;
exports.releaseItem = releaseItem;
exports.requireItem = requireItem;
__webpack_require__(21540);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _utils = __webpack_require__(84512);
__webpack_require__(57040);
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var itemPool = [];
function onMousedownItem(event) {
  if (_EventEmitter["default"].isMouseRight(event)) return;
  var thisSL = this.$parent;
  if (thisSL) {
    thisSL.value = this.value;
    thisSL.emit('pressitem', {
      type: 'pressitem',
      target: thisSL,
      itemElt: this,
      value: this.value,
      data: this.data
    });
  }
}
function makeItem() {
  return _({
    tag: 'selectlistitem',
    on: {
      mousedown: onMousedownItem
    }
  });
}
function requireItem($parent) {
  var item;
  if (itemPool.length > 0) {
    item = itemPool.pop();
  } else {
    item = makeItem();
  }
  item.$parent = $parent;
  return item;
}
function releaseItem(item) {
  item.$parent = null;
  item.removeClass('selected');
  itemPool.push(item);
}
;
function measureMaxDescriptionWidth(items) {
  var maxDescWidth = 0;
  var maxText = 0;
  var maxEst = 0;
  var est;
  for (var i = 0; i < items.length; ++i) {
    if (items[i].desc) {
      est = (0, _utils.estimateWidth14)(items[i].desc);
      if (est > maxEst) {
        maxEst = est;
        maxText = items[i].desc;
      }
    }
  }
  if (maxText) maxDescWidth = (0, _utils.measureText)(maxText, 'italic 14px  sans-serif').width;
  return maxDescWidth;
}
;
function measureMaxTextWidth(items) {
  var maxTextWidth = 0;
  var maxText = 0;
  var maxEst = 0;
  var maxLv = 0;
  var est;
  var text;
  var item;
  for (var i = 0; i < items.length; ++i) {
    item = items[i];
    if (item.text) {
      text = item.text;
      est = (0, _utils.estimateWidth14)(text) + 14 * 0.9 * (item.level || 0);
      if (est > maxEst) {
        maxEst = est;
        maxText = text;
        maxLv = item.level || 0;
      }
    }
  }
  if (maxText) maxTextWidth = 14 * 0.9 * maxLv + (0, _utils.measureText)(maxText, '14px Arial, Helvetica, sans-serif').width + 14; //padding left, right 7px
  return maxTextWidth;
}
function measureListHeight(items) {
  var border = 0;
  var n = items.length - 1;
  return items.length * 20 + border;
}
function measureListSize(items) {
  var descWidth = measureMaxDescriptionWidth(items);
  var textWidth = measureMaxTextWidth(items);
  var width = textWidth;
  if (descWidth > 0) {
    width += descWidth + 14;
  }
  var height = measureListHeight(items);
  return {
    width: width,
    height: height,
    descWidth: descWidth,
    textWidth: textWidth
  };
}

/*global absol*/
/***
 * @extends AElement
 * @constructor
 */
function SelectList() {
  var thisSL = this;
  this.defineEvent(['pressitem', 'cancelasync', 'valuevisibilityasync', 'finishasync', 'sizechangeasync']);
  this.$attachhook = _('attachhook').addTo(this);
  this.sync = new Promise(function (rs) {
    thisSL.$attachhook.once('error', rs);
  });
  this.$items = [];
  this.$itemByValue = {}; //quick find element
  this.$selectedItem = undefined;
  this.measuredSize = {
    width: 0,
    height: 0,
    descWidth: 0,
    textWidth: 0
  };
  this._itemSession = 0;
  this._finished = true;
}
;
SelectList.tag = "SelectList".toLowerCase();
SelectList.render = function () {
  return _('.absol-selectlist');
};
SelectList.prototype._updateSelectedItem = function () {
  var newSelectedItemElt = this.$itemByValue[this._selectValue];
  if (newSelectedItemElt != this.$selectedItem) {
    if (this.$selectedItem) {
      this.$selectedItem.removeClass('selected');
    }
    if (newSelectedItemElt) {
      newSelectedItemElt.addClass('selected');
      this.$selectedItem = newSelectedItemElt;
    }
  }
};
SelectList.prototype._requireItems = function (itemCout) {
  var item;
  while (this.$items.length < itemCout) {
    item = requireItem(this);
    this.$items.push(item);
    this.addChild(item);
  }
  while (this.$items.length > itemCout) {
    item = this.$items.pop();
    item.remove();
    releaseItem(item);
  }
};
SelectList.prototype._assignItems = function (from, to) {
  var foundSelected = false;
  var itemElt;
  var item;
  for (var i = from; i < to; ++i) {
    itemElt = this.$items[i];
    item = this._items[i];
    itemElt.data = item;
    itemElt.__index__ = i;
    if (this.$itemByValue[item.value]) {
      console.warn('Value  ' + this.$items[i].value + ' is duplicated!');
    } else {
      this.$itemByValue[item.value] = itemElt;
      if (this._selectValue == item.value) {
        itemElt.addClass('selected');
        this.$selectedItem = itemElt;
        foundSelected = true;
      } else {
        itemElt.removeClass('selected');
      }
    }
  }
  return foundSelected;
};
SelectList.prototype.setItemsAsync = function (items) {
  //start process
  this._finished = false;
  var session = Math.floor(Math.random() * 1000000);
  this._itemSession = session;
  this._items = items || [];
  this.$itemByValue = {};
  this.measuredSize = measureListSize(items);
  this.style.setProperty('--select-list-desc-width', this.measuredSize.descWidth / 14 + 'em'); //addStyle notWork because of convert to cameCase

  var thisSL = this;
  var i = 0;
  var limit = 20;
  function tick() {
    if (thisSL._itemSession != session) {
      thisSL.emit('cancelasync', {
        session: session,
        type: 'cancelasync'
      }, this);
      return;
    }
    if (i >= items.length) {
      thisSL._updateSelectedItem();
      thisSL._finished = false;
      thisSL.emit('finishasync', {
        session: session,
        type: 'finishasync'
      }, this);
      return;
    }
    var n = Math.min(items.length - i, limit);
    var itemCout = i + n;
    thisSL._requireItems(itemCout);
    i = itemCout;
    var foundSelected = thisSL._assignItems(itemCout - n, itemCout);
    if (foundSelected) {
      thisSL.emit('valuevisibilityasync', {
        session: session,
        type: 'valuevisibilityasync',
        itemElt: thisSL.$items[i]
      }, thisSL);
    }
    thisSL.emit('sizechangeasync', {
      session: session,
      type: 'sizechangeasync'
    }, this);
    setTimeout(tick, 2);
  }
  setTimeout(tick, 2);
  return Object.assign({
    session: session
  }, this.measuredSize);
};
SelectList.prototype.setItems = function (items) {
  this._finished = false;
  var session = Math.floor(Math.random() * 1000000);
  this._itemSession = session;
  this._items = items || [];
  this.$itemByValue = {};
  this.measuredSize = measureListSize(items);
  this.style.setProperty('--select-list-desc-width', this.measuredSize.descWidth / 14 + 'em'); //addStyle notWork because of convert to cameCase
  var itemCount = items.length;
  this._requireItems(itemCount);
  this._assignItems(0, itemCount);
  this._finished = true;
  return {
    session: this._itemSession,
    width: this._descWidth + this._textWidth + 14,
    height: this._height
  };
};
SelectList.property = {};

/**
 * @type {SelectList}
 */
SelectList.property.items = {
  set: function set(value) {
    value = value || [];
    this.setItems(value);
  },
  get: function get() {
    return this._items || [];
  }
};
SelectList.property.value = {
  set: function set(value) {
    this._selectValue = value;
    this._updateSelectedItem();
  },
  get: function get() {
    return this._selectValue;
  }
};
SelectList.property.item = {
  get: function get() {
    if (this.$selectedItem) return this.$selectedItem.data;
    return undefined;
  }
};
SelectList.property.selectedIndex = {
  get: function get() {
    throw new Error("selectedIndex getter is deprecated");
  }
};
SelectList.prototype.init = function (props) {
  props = props || {};
  var value = props.value;
  delete props.value;
  this["super"](props);
  if (value !== undefined) this.value = value;
};
SelectList.eventHandler = {};
_ACore["default"].install(SelectList);
var _default = SelectList;
exports["default"] = _default;

/***/ }),

/***/ 47818:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.calcWidthLimit = exports.VALUE_NORMAL = exports.VALUE_HIDDEN = void 0;
__webpack_require__(25929);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _SelectList = __webpack_require__(884);
var _Dom = __webpack_require__(64821);
var _listIndexing = __webpack_require__(72384);
var _utils = __webpack_require__(84512);
var _ListSearchMaster = _interopRequireDefault(__webpack_require__(85604));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _DelaySignal = _interopRequireDefault(__webpack_require__(81809));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var $$ = _ACore["default"].$$;
var VALUE_HIDDEN = -1;
exports.VALUE_HIDDEN = VALUE_HIDDEN;
var VALUE_NORMAL = 1;
exports.VALUE_NORMAL = VALUE_NORMAL;
var calcWidthLimit = function calcWidthLimit() {
  var width = (0, _Dom.getScreenSize)().width;
  if (_BrowserDetector["default"].isMobile) {
    width -= 20;
  } else {
    width = width * 0.9 - 250;
  }
  return Math.min(width, 1280);
};
exports.calcWidthLimit = calcWidthLimit;
var makeSearchItem = function makeSearchItem(it, idx2key) {
  var res = {
    value: idx2key.length
  };
  var valueKey;
  res.text = it.text + '';
  if (it.desc) res.text += it.desc;
  valueKey = (0, _utils.keyStringOf)(it.value);
  it.valueKey = valueKey;
  idx2key.push(valueKey);
  if (it.items && it.items.length > 0 && it.items.map) {
    res.items = it.items.map(function (cIt) {
      return makeSearchItem(cIt, idx2key);
    });
  }
  return res;
};

/***
 * @extends Follower
 * @constructor
 */
function SelectListBox() {
  this._initDomHook();
  this._initControl();
  this._initScroller();
  this._initProperty();

  /***
   * @name strictValue
   * @type {boolean}
   * @memberOf SelectListBox#
   */

  /***
   * @name enableSearch
   * @type {boolean}
   * @memberOf SelectListBox#
   */
}

SelectListBox.tag = 'SelectListBox'.toLowerCase();
SelectListBox.render = function () {
  return _({
    tag: 'follower',
    attr: {
      tabindex: 0
    },
    "class": 'as-select-list-box',
    extendEvent: ['pressitem'],
    child: [{
      "class": 'as-select-list-box-search-ctn',
      child: 'searchtextinput'
    }, {
      "class": ['as-bscroller', 'as-select-list-box-scroller'],
      child: [{
        "class": ['as-select-list-box-content'],
        child: Array(SelectListBox.prototype.preLoadN).fill('.as-select-list-box-page')
      }]
    }, 'attachhook.as-dom-signal'],
    props: {
      anchor: [1, 6, 2, 5]
    }
  });
};
SelectListBox.prototype.toLoadNextY = 200;
SelectListBox.prototype.preLoadN = 3;
SelectListBox.prototype.itemHeightMode = [20, 30];
SelectListBox.prototype.itemHeight = 20;
SelectListBox.prototype.revokeResource = function () {
  if (this.searchMaster) {
    this.searchMaster.destroy();
    this.searchMaster = null;
  }
  /* return
  revokeResource(this._items);
    // var n = items.length;
  this._items = undefined;
  revokeResource(this.idx2key);
  this.idx2key = undefined;
  revokeResource(this.key2idx)
  this.key2idx = undefined;
  revokeResource(this.searchingItems);
  this.searchingItems = undefined;
  revokeResource(this._itemNodeHolderByValue);
  this._itemNodeHolderByValue = undefined;
  // this._filteredItems = [];// not need , only use when search
  revokeResource(this._preDisplayItems);
  this._preDisplayItems = undefined;
  revokeResource(this._displayItems);
  this._displayItems = undefined;
  revokeResource(this._searchCache)
  this._searchCache = undefined;
   */
};

SelectListBox.prototype._initDomHook = function () {
  if (this.$attachhook) this.$attachhook.cancelWaiting();
  this.domSignal = new _DelaySignal["default"]();
  this.domSignal.on('viewListAt', this.viewListAt.bind(this));
  this.domSignal.on('viewListAtFirstSelected', this.viewListAtFirstSelected.bind(this));
  this.domSignal.on('viewListAtCurrentScrollTop', this.viewListAtCurrentScrollTop.bind(this));
  /**
   *
   * @type {ListSearchMaster|null}
   */
  this.searchMaster = null;
  this.widthLimit = calcWidthLimit();
  this.addStyle('--as-width-limit', this.widthLimit + 'px');
};
SelectListBox.prototype._initControl = function () {
  this._currentOffset = 0;
  this._startItemIdx = 0;
  this.$searchInput = $('searchtextinput', this).on('stoptyping', this.eventHandler.searchModify);
};
SelectListBox.prototype._initScroller = function () {
  this.$content = $('.as-select-list-box-content', this);
  this._estimateHeight = 0;
  this._pageOffsets = Array(this.preLoadN + 1).fill(0);
  this.$listPages = $$('.as-select-list-box-page', this);
  this.$listScroller = $('.as-select-list-box-scroller', this).on('scroll', this.eventHandler.scroll);
};
SelectListBox.prototype._initProperty = function () {
  /***
   *   items  =(search, filler)=> filteredItems =(list to list, tree to list)=>  preDisplayItems =(remove hidden item)=> displayItem
   *
   */

  this._items = [];
  this._itemNodeList = []; // use for tree
  this._values = [];
  this._valueDict = {};
  this._itemNodeHolderByValue = {};
  // this._filteredItems = [];// not need , only use when search
  this._preDisplayItems = [];
  this._displayItems = [];
  this._searchCache = {};
  this._displayValue = VALUE_NORMAL;
  this.displayValue = VALUE_NORMAL;
  this.items = [];
};
SelectListBox.prototype._requireItem = function (pageElt, n) {
  var itemElt;
  while (pageElt.childNodes.length > n) {
    itemElt = pageElt.lastChild;
    itemElt.selfRemove();
    (0, _SelectList.releaseItem)(itemElt);
  }
  while (pageElt.childNodes.length < n) {
    itemElt = (0, _SelectList.requireItem)(this);
    pageElt.addChild(itemElt);
  }
};
SelectListBox.prototype._assignItems = function (pageElt, offset) {
  var n = Math.min(this._displayItems.length - offset, pageElt.childNodes.length);
  var itemElt, value;
  var data;
  for (var i = 0; i < n; ++i) {
    itemElt = pageElt.childNodes[i];
    data = this._displayItems[offset + i];
    if (data && data !== true && data.text) {
      if (!data.textLength) data.textLength = (0, _utils.measureText)(data.text + '', '14px arial').width;
      if (data.textLength > this.widthLimit - 5) {
        itemElt.attr('title', data.text);
      } else itemElt.attr('title', null);
    } else {
      itemElt.attr('title', null);
    }
    itemElt.data = data;
    value = itemElt.value + '';
  }
};
SelectListBox.prototype._itemsToNodeList = function (items) {
  return items;
};

/***
 *
 * @param {Array<{value:String|Number}>} items
 * @return {Array<{value:String|Number}>}
 */
SelectListBox.prototype._filterDisplayItems = function (items) {
  if (this._displayValue === VALUE_NORMAL) return items;
  var dict = this._valueDict;
  return items.filter(function (item) {
    return !dict[item.value + ''];
  });
};
SelectListBox.prototype._updateSelectedItem = function () {
  var valueDict = this._valueDict;
  this.$listPages.forEach(function (pageElt) {
    Array.prototype.forEach.call(pageElt.childNodes, function (itemElt) {
      var value = itemElt.value + '';
      if (valueDict[value]) {
        itemElt.selected = true;
      } else {
        itemElt.selected = false;
      }
    });
  });
};

/***
 *
 * @param {number} offset
 */
SelectListBox.prototype.viewListAt = function (offset) {
  var _this = this;
  if (!this.isDescendantOf(document.body)) {
    this.$attachhook.once('attached', function () {
      _this.domSignal.emit('viewListAt', offset);
    });
    return;
  }
  var fontSize = this.$listScroller.getFontSize() || 14;
  offset = Math.max(0, Math.min(offset, this._displayItems.length - 1));
  var screenSize = (0, _Dom.getScreenSize)();
  var maxItem = Math.ceil(Math.max(window.screen.height, screenSize.height) / this.itemHeight);
  this._pageOffsets[0] = Math.max(offset - maxItem, 0);
  for (var i = 1; i <= this.preLoadN; ++i) {
    this._pageOffsets[i] = Math.min(this._pageOffsets[i - 1] + maxItem, this._displayItems.length);
  }
  var sIdx, nItem, pageBound;
  var pageElt;
  for (var pageIndex = 0; pageIndex < this.preLoadN; ++pageIndex) {
    sIdx = this._pageOffsets[pageIndex];
    nItem = this._pageOffsets[pageIndex + 1] - sIdx;
    pageElt = this.$listPages[pageIndex];
    pageElt.addStyle('top', this._pageOffsets[pageIndex] * this.itemHeight / 14 + 'em');
    this._requireItem(pageElt, nItem);
    this._assignItems(pageElt, sIdx);
    pageBound = pageElt.getBoundingClientRect();
  }
  this._updateSelectedItem();
};
SelectListBox.prototype.viewListAtFirstSelected = function () {
  if (!this.isDescendantOf(document.body)) {
    this.domSignal.emit('viewListAtFirstSelected');
    return;
  }
  if (this._displayValue == VALUE_HIDDEN) {
    return false;
  } else if (this._values.length > 0) {
    var value = this._values[0];
    var itemHolders = this._displayItemHolderByValue[value + ''];
    if (itemHolders) {
      this.domSignal.once('scrollIntoSelected', function () {
        var holder = itemHolders[0];
        this.viewListAt(holder.idx);
        var itemElt = $('.as-selected', this.$listScroller);
        if (itemElt) {
          var scrollBound = this.$listScroller.getBoundingClientRect();
          var itemBound = itemElt.getBoundingClientRect();
          this.$listScroller.scrollTop += itemBound.top - scrollBound.top;
        }
      }.bind(this));
      this.domSignal.emit('scrollIntoSelected');
      return true;
    } else return false;
  } else return false;
};
SelectListBox.prototype.viewListAtCurrentScrollTop = function () {
  if (!this.isDescendantOf(document.body)) {
    this.emit('viewListAtCurrentScrollTop');
    return;
  }
  this.viewListAt(Math.floor(this.$listScroller.scrollTop / this.itemHeight));
};
SelectListBox.prototype.searchItemByText = function (text) {
  var _this2 = this;
  text = text.trim().replace(/\s\s+/, ' ');
  if (text.length === 0) return Promise.resolve(this._items);
  this.prepareSearch();
  this._searchCache[text] = this._searchCache[text] || this.searchMaster.query({
    text: text
  }).then(function (searchResult) {
    if (!searchResult) return;
    var scoreOf = function scoreOf(it) {
      var idx = _this2.key2idx[it.valueKey];
      var sc = searchResult[idx];
      if (!sc) return -Infinity;
      return Math.max(sc[0], sc[1]) * 1000000 - idx;
    };
    var makeList = function makeList(originItems) {
      var items = originItems.filter(function (it) {
        var idx = _this2.key2idx[it.valueKey];
        if (searchResult[idx]) return true;
        return false;
      }).map(function (it) {
        var cpItem = Object.assign({}, it);
        if (it.items) cpItem.items = makeList(it.items);
        return cpItem;
      });
      items.sort(function (a, b) {
        return scoreOf(b) - scoreOf(a);
      });
      return items;
    };
    return makeList(_this2._items);
  });
  return this._searchCache[text];
};
SelectListBox.prototype.resetSearchState = function () {
  this.$searchInput.value = '';
  this._preDisplayItems = this._itemsToNodeList(this._items);
  this._updateDisplayItem();
  this.domSignal.emit('viewListAt', 0);
  this.$listScroller.scrollTop = 0;
};
SelectListBox.prototype.notifyPressOut = function () {
  this.emit('pressout', {
    target: this,
    type: 'pressout'
  }, this);
};
SelectListBox.prototype.notifyPressClose = function () {
  this.emit('pressclose', {
    target: this,
    type: 'pressclose'
  }, this);
};
SelectListBox.prototype._findFirstPageIdx = function () {
  for (var i = 0; i < this.preLoadN; ++i) {
    if (this._pageOffsets[i + 1] - this._pageOffsets[i] > 0) {
      return i;
    }
  }
  return -1;
};
SelectListBox.prototype._findLastPageIdx = function () {
  for (var i = this.preLoadN - 1; i >= 0; --i) {
    if (this._pageOffsets[i + 1] - this._pageOffsets[i] > 0) {
      return i;
    }
  }
  return -1;
};
SelectListBox.prototype._updateDisplayItemIndex = function () {
  this._displayItemHolderByValue = (0, _listIndexing.indexingByValue)(this._displayItems, {});
};
SelectListBox.prototype._updateItemNodeIndex = function () {
  this._itemNodeHolderByValue = (0, _listIndexing.depthIndexingByValue)(this._items);
};
SelectListBox.prototype._updateDisplayItem = function () {
  this._displayItems = this._filterDisplayItems(this._preDisplayItems);
  this._updateDisplayItemIndex();
  this.$content.addStyle({
    'height': this._displayItems.length * this.itemHeight / 14 + 'em'
  });
};
SelectListBox.prototype.focus = function () {
  if (this.enableSearch) this.$searchInput.focus();
};
SelectListBox.prototype.footerMinWidth = 0;
SelectListBox.prototype._updateItems = function () {
  this._hasIcon = this._items.some(function hasIcon(it) {
    var res = !!it.icon;
    if (!res && it.items) {
      res = it.items.some(hasIcon);
    }
    return res;
  });
  if (this._hasIcon) {
    this.itemHeight = this.itemHeightMode[1];
  } else {
    this.itemHeight = this.itemHeightMode[0];
  }
  this._preDisplayItems = this._itemsToNodeList(this._items);
  this._searchCache = {};
  var estimateSize = (0, _SelectList.measureListSize)(this._itemNodeList);
  estimateSize.width = Math.min(this.widthLimit || Infinity, estimateSize.width);
  this._estimateSize = estimateSize;
  this._estimateWidth = estimateSize.width;
  this._estimateDescWidth = estimateSize.descWidth;
  if (this._hasIcon) {
    this._estimateWidth += 32;
    this.addClass('as-has-icon');
  } else {
    this.removeClass('as-has-icon');
  }
  this.addStyle('--select-list-estimate-width', Math.max(this.footerMinWidth, this._estimateWidth) / 14 + 'em');
  this.addStyle('--select-list-desc-width', this._estimateDescWidth / 14 + 'em');
  this._updateDisplayItem();
  this.transferSearchDataIfNeed();
};
SelectListBox.prototype.transferSearchDataIfNeed = function () {
  var _this3 = this;
  if (!this.searchMaster) return;
  this.idx2key = [];
  this.searchingItems = this._items.map(function (it) {
    return makeSearchItem(it, _this3.idx2key);
  });
  this.key2idx = this.idx2key.reduce(function (ac, cr, i) {
    ac[cr] = i;
    return ac;
  }, {});
  this.searchMaster.transfer(this.searchingItems);
};
SelectListBox.prototype.prepareSearch = function () {
  if (!this.searchMaster) {
    this.searchMaster = new _ListSearchMaster["default"]();
    this.transferSearchDataIfNeed();
  }
};

/***
 *
 * @param value
 * @returns {{idx: number, item:{text:string, value:number|string}}[]}
 */
SelectListBox.prototype.findDisplayItemsByValue = function (value) {
  return (this._displayItemHolderByValue[value] || []).slice();
};
SelectListBox.prototype._implicit = function (values) {
  if (!(values instanceof Array)) {
    if (values === null || values === undefined) values = [];else values = [values];
  }
  return values.reduce(function (ac, cr) {
    if (!ac.dict[cr]) {
      ac.dict[cr] = true;
      ac.result.push(cr);
    }
    return ac;
  }, {
    result: [],
    dict: {}
  }).result;
};
SelectListBox.prototype._explicit = function (values) {
  if (this.strictValue) {
    return values.filter(function (value) {
      return !!this._itemNodeHolderByValue[value];
    }.bind(this));
  } else {
    return values.slice();
  }
};

/***
 *
 * @param value
 * @returns {{idx: number, item:{text:string, value:number|string}}[]}
 */
SelectListBox.prototype.findItemsByValue = function (value) {
  return (this._itemNodeHolderByValue[value] || []).slice();
};
SelectListBox.prototype.findItemByValue = function (value) {
  var t = this._itemNodeHolderByValue[value];
  if (t && t.length > 0) {
    return t[0].item;
  } else return null;
};
SelectListBox.property = {};

/***
 *
 * @type {SelectListBox|{}}
 */
SelectListBox.property.items = {
  set: function set(items) {
    items = items || [];
    if (!(items instanceof Array)) items = [];
    items = (0, _utils.copySelectionItemArray)(items, {
      removeNoView: true,
      removeNewLine: true
    });
    this._items = items;
    this._itemNodeList = this._itemsToNodeList(this._items);
    this._updateItemNodeIndex();
    this._updateItems();
    this.viewListAt(0);
  },
  get: function get() {
    return this._items;
  }
};
SelectListBox.property.values = {
  set: function set(values) {
    values = this._implicit(values);
    this._values = values;
    this._valueDict = values.reduce(function (ac, cr) {
      ac[cr + ''] = true;
      return ac;
    }, {});
    this._updateDisplayItem();
    this.viewListAtCurrentScrollTop();
    if (this._pageOffsets[this.preLoadN] > this._pageOffsets[0]) this._updateSelectedItem();
  },
  get: function get() {
    return this._explicit(this._values);
  }
};
SelectListBox.property.strictValue = {
  set: function set(value) {
    if (value) {
      this.addClass('as-strict-value');
    } else {
      this.removeClass('as-strict-value');
    }
  },
  get: function get() {
    return this.hasClass('as-strict-value');
  }
};
SelectListBox.property.displayValue = {
  set: function set(value) {
    this._displayValue = value;
    this._displayItems = this._filterDisplayItems(this._preDisplayItems);
    this._updateItemNodeIndex();
    if (value === VALUE_HIDDEN) {
      this.addClass('as-value-hidden');
    } else {
      this.removeClass('as-value-hidden');
    }
  },
  get: function get() {
    return this._displayValue;
  }
};
SelectListBox.property.enableSearch = {
  set: function set(value) {
    if (value) this.addClass('as-enable-search');else this.removeClass('as-enable-search');
  },
  get: function get() {
    return this.hasClass('as-enable-search');
  }
};

/***
 *
 * @type {SelectListBox|{}}
 */
SelectListBox.eventHandler = {};

/*
*
* @param {MouseEvent} event
*/
SelectListBox.eventHandler.click = function (event) {
  if (event.target === this) this.notifyPressOut();
};

/***
 * @this SelectListBox
 */
SelectListBox.eventHandler.searchModify = function () {
  var _this4 = this;
  var text = this.$searchInput.value;
  var searchSession = Math.random() + '';
  this._searchSession = searchSession;
  this.searchItemByText(text).then(function (searchedItems) {
    if (searchSession !== _this4._searchSession) return;
    _this4._preDisplayItems = _this4._itemsToNodeList(searchedItems);
    _this4._displayItems = _this4._filterDisplayItems(_this4._preDisplayItems);
    _this4.$content.addStyle({
      'height': _this4._displayItems.length * _this4.itemHeight / 14 + 'em'
    });
    _this4._updateItemNodeIndex();
    _this4.viewListAt(0);
    _this4.$listScroller.scrollTop = 0;
    _this4.updatePosition();
  });
};
SelectListBox.eventHandler.scroll = function () {
  var itemHeight = this.itemHeight * $(document.body).getFontSize() / 14;
  var scrollerBound = this.$listScroller.getBoundingClientRect();
  var topIdx = this._findFirstPageIdx();
  if (!this.$listPages[topIdx]) return;
  var screenSize = (0, _Dom.getScreenSize)();
  var maxItem = Math.ceil(Math.max(window.screen.height, screenSize.height) / itemHeight);
  var topBound = this.$listPages[topIdx].getBoundingClientRect();
  var botIdx = this._findLastPageIdx();
  if (!this.$listPages[botIdx]) return;
  var botBound;
  botBound = this.$listPages[botIdx].getBoundingClientRect();
  if (topBound.top > scrollerBound.top || topBound.bottom < scrollerBound.bottom) {
    this.viewListAt(Math.floor(this.$listScroller.scrollTop / itemHeight));
    return;
  }
  if (this._pageOffsets[topIdx] > 0) {
    if (topBound.top + this.toLoadNextY > scrollerBound.top) {
      this._pageOffsets.unshift(this._pageOffsets.pop());
      this.$listPages.unshift(this.$listPages.pop());
      this._pageOffsets[topIdx] = Math.max(0, this._pageOffsets[topIdx + 1] - maxItem);
      this._requireItem(this.$listPages[topIdx], this._pageOffsets[topIdx + 1] - this._pageOffsets[topIdx]);
      this._assignItems(this.$listPages[topIdx], this._pageOffsets[topIdx]);
      this._updateSelectedItem();
      this.$listPages[topIdx].addStyle('top', this._pageOffsets[topIdx] * itemHeight + 'px');
    }
  }
  if (this._pageOffsets[botIdx + 1] < this._displayItems.length) {
    if (botBound.bottom - this.toLoadNextY < scrollerBound.bottom) {
      this._pageOffsets.push(this._pageOffsets.shift());
      this.$listPages.push(this.$listPages.shift());
      this._pageOffsets[botIdx + 1] = Math.min(this._displayItems.length, this._pageOffsets[botIdx] + maxItem);
      this.$listPages[botIdx].addStyle('top', this._pageOffsets[botIdx] * itemHeight + 'px');
      this._requireItem(this.$listPages[botIdx], this._pageOffsets[botIdx + 1] - this._pageOffsets[botIdx]);
      this._assignItems(this.$listPages[botIdx], this._pageOffsets[botIdx]);
      this._updateSelectedItem();
    }
  }
};
_ACore["default"].install(SelectListBox);
var _default = SelectListBox;
exports["default"] = _default;

/***/ }),

/***/ 57040:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.getDescriptionOfListItem = getDescriptionOfListItem;
exports.getTextOfListItem = getTextOfListItem;
exports.getValueOfListItem = getValueOfListItem;
__webpack_require__(21540);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _CheckboxButton = _interopRequireDefault(__webpack_require__(93475));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 *
 * @extends AElement
 * @constructor
 */
function SelectListItem() {
  this.$text = $('span.absol-selectlist-item-text', this);
  this.$textValue = this.$text.childNodes[0];
  this.$descCtn = $('.absol-selectlist-item-desc-container', this);
  this.$desc = $('span.absol-selectlist-item-desc', this.$descCtn);
  this.$descValue = this.$desc.childNodes[0];
  this.$icon = null;
  this._extendClasses = [];
  this._extendStyle = {};
  this._data = "";
  this._level = 0;
  this._icon = null;
  _OOP["default"].drillProperty(this, this, 'noSelect', 'disabled');
  /***
   * @type {AbsolConstructDescriptor|null}
   * @name icon
   * @memberOf SelectListItem#
   */
}

SelectListItem.tag = 'SelectListItem'.toLowerCase();
SelectListItem.render = function () {
  return _({
    "class": 'absol-selectlist-item',
    child: [{
      tag: 'span',
      "class": 'absol-selectlist-item-text',
      child: {
        text: ''
      }
    }, {
      "class": 'absol-selectlist-item-desc-container',
      child: {
        tag: 'span',
        "class": 'absol-selectlist-item-desc',
        child: {
          text: ''
        }
      }
    }]
  });
};
SelectListItem.property = {};
SelectListItem.property.extendClasses = {
  set: function set(value) {
    var i;
    for (i = 0; i < this._extendClasses.length; ++i) {
      this.removeClass(this._extendClasses[i]);
    }
    this._extendClasses = [];
    if (typeof value == 'string') value = value.trim().split(/\s+/);
    value = value || [];
    for (i = 0; i < value.length; ++i) {
      this._extendClasses.push(value[i]);
      this.addClass(value[i]);
    }
  },
  get: function get() {
    return this._extendClasses;
  }
};
SelectListItem.property.extendStyle = {
  set: function set(value) {
    this.removeStyle(this._extendStyle);
    this._extendStyle = Object.assign({}, value || {});
    this.addStyle(this._extendStyle);
  },
  get: function get() {
    return this._extendClasses;
  }
};
SelectListItem.property.icon = {
  /***
   * @this SelectListItem
   * @param icon
   */
  set: function set(icon) {
    if (this.$icon) {
      this.$icon.remove();
      this.$icon = null;
    }
    this._icon = icon || null;
    if (this._icon) {
      this.$icon = _(this._icon);
      this.$icon.addClass('as-select-list-icon');
      this.addChildBefore(this.$icon, this.$text);
    }
  },
  get: function get() {
    return this._icon;
  }
};
SelectListItem.property.data = {
  set: function set(value) {
    this._data = value;
    if (typeof value == 'string') {
      this.$textValue.data = value;
      this.$descValue.data = '';
      this.level = 0;
      this.extendClasses = '';
      this.extendStyle = {};
      this.lastInGroup = false;
      this.isLeaf = false;
      this.selected = false;
      this.disabled = false;
      this.icon = null;
    } else {
      this.$textValue.data = value.text || '';
      this.$descValue.data = value.desc || '';
      this.level = value.level || 0;
      this.extendClasses = value.extendClasses;
      this.extendStyle = value.extendStyle;
      this.lastInGroup = !!value.lastInGroup;
      this.isLeaf = !!value.isLeaf;
      this.selected = !!value.selected;
      this.disabled = value.disabled || value.noSelect;
      this.icon = value.icon;
    }
  },
  get: function get() {
    return this._data;
  }
};
SelectListItem.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
SelectListItem.property.value = {
  get: function get() {
    return getValueOfListItem(this._data);
  }
};
SelectListItem.property.text = {
  get: function get() {
    return getTextOfListItem(this._data);
  }
};
SelectListItem.property.desc = {
  get: function get() {
    return getDescriptionOfListItem(this._data);
  }
};
SelectListItem.property.level = {
  set: function set(value) {
    value = value || 0;
    this._level = value;
    this.addStyle('--level', value);
  },
  get: function get() {
    return this._level;
  }
};
SelectListItem.property.lastInGroup = {
  set: function set(value) {
    if (value) {
      this.addClass('as-last-in-group');
    } else {
      this.removeClass('as-last-in-group');
    }
  },
  get: function get() {
    return this.hasClass('as-last-in-group');
  }
};
SelectListItem.property.isLeaf = {
  set: function set(value) {
    if (value) {
      this.addClass('as-is-leaf');
    } else {
      this.removeClass('as-is-leaf');
    }
  },
  get: function get() {
    return this.hasClass('as-is-leaf');
  }
};
SelectListItem.property.selected = {
  set: function set(value) {
    if (value) {
      this.addClass('as-selected');
    } else {
      this.removeClass('as-selected');
    }
  },
  get: function get() {
    return this.hasClass('as-selected');
  }
};
_ACore["default"].install(SelectListItem);
var _default = SelectListItem;
exports["default"] = _default;
function getTextOfListItem(item) {
  if (item) {
    if (item.match) {} else if (item.text && item.text.match) {
      return item.text;
    } else return '';
  } else return '';
}
function getValueOfListItem(item) {
  if (item) {
    if (item.match) {
      return item;
    } else if (_typeof(item) === "object") return item.value;else return item;
  } else return item;
}
function getDescriptionOfListItem(item) {
  return item && _typeof(item) == "object" ? item.desc : undefined;
}

/***/ }),

/***/ 20834:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(80571);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _search = __webpack_require__(67858);
var _SelectList = _interopRequireDefault(__webpack_require__(884));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/*global absol*/
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
_ACore["default"].creator['dropdown-ico'] = function () {
  return _(['<svg class="dropdown" width="100mm" height="100mm" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">', '<g transform="translate(0,-197)">', '<path d="m6.3152 218.09a4.5283 4.5283 0 0 0-3.5673 7.3141l43.361 55.641a4.5283 4.5283 0 0 0 7.1421 7e-3l43.496-55.641a4.5283 4.5283 0 0 0-3.5673-7.3216z" />', '</g>', '</svg>'].join(''));
};
function SelectMenu() {
  var thisSM = this;
  this._items = [];
  this._value = null;
  this._lastValue = null;
  this.$holderItem = $('.absol-selectmenu-holder-item', this);
  this.$anchorCtn = SelectMenu.getAnchorCtn();
  this.$anchor = _('.absol-selectmenu-anchor.absol-disabled').addTo(this.$anchorCtn);
  this.$anchorContentCtn = _('.absol-selectmenu-anchor-content-container').addTo(this.$anchor);
  this.$dropdownBox = _('.absol-selectmenu-dropdown-box').addTo(this.$anchorContentCtn);
  this.$searchTextInput = _('searchtextinput').addStyle('display', 'none').addTo(this.$dropdownBox);
  this.$vscroller = _('bscroller').addTo(this.$dropdownBox);
  this.$selectlist = _('selectlist', this).addTo(this.$vscroller).on('sizechangeasync', this.eventHandler.listSizeChangeAsync).on('valuevisibilityasync', this.eventHandler.listValueVisibility);
  this.$scrollTrackElts = [];
  this.$removableTrackElts = [];
  this._itemsByValue = {};
  this.$searchTextInput.on('stoptyping', this.eventHandler.searchModify);
  this._searchCache = {};
  this.$selectlist.on('pressitem', this.eventHandler.selectlistPressItem, true);
  this.$selectlist.on('pressitem', function () {
    thisSM.isFocus = false;
  }, true);
  this._lastValue = "NOTHING_VALUE";
  this._resourceReady = true;
  this.on('mousedown', this.eventHandler.click, true);
  this.on('blur', this.eventHandler.blur);
  this.selectListBound = {
    height: 0,
    width: 0
  };
  this.$attachhook = $('attachhook', this).on('error', this.eventHandler.attached);
  this.sync = new Promise(function (rs) {
    $('attachhook', this).once('error', function () {
      rs();
    });
  });
  this._selectListScrollSession = null;
  this._itemIdxByValue = null;
  return this;
}
SelectMenu.tag = 'selectmenu-old';
SelectMenu.render = function () {
  return _({
    "class": ['absol-selectmenu'],
    extendEvent: ['change', 'minwidthchange'],
    attr: {
      tabindex: '1'
    },
    child: ['.absol-selectmenu-holder-item', {
      tag: 'button',
      "class": 'absol-selectmenu-btn',
      child: ['dropdown-ico']
    }, 'attachhook']
  });
};
SelectMenu.optimizeResource = true;

// //will remove after SelectMenu completed
SelectMenu.getRenderSpace = function () {
  if (!SelectMenu.getRenderSpace.warned) {
    // console.warn('SelectMenu.getRenderSpace() will be removed in next version');
  }
  SelectMenu.getRenderSpace.warned = true;
  if (!SelectMenu.$renderSpace) {
    SelectMenu.$renderSpace = _('.absol-selectmenu-render-space').addTo(document.body);
  }
  return SelectMenu.$renderSpace;
};
SelectMenu.getAnchorCtn = function () {
  if (!SelectMenu.$anchorCtn) {
    SelectMenu.$anchorCtn = _('.absol-selectmenu-anchor-container').addTo(document.body);
  }
  return SelectMenu.$anchorCtn;
};
SelectMenu.prototype.updateItem = function () {
  this.$holderItem.clearChild();
  if (this._itemsByValue[this.value]) {
    var elt = _({
      tag: 'selectlistitem',
      props: {
        data: this._itemsByValue[this.value]
      }
    }).addTo(this.$holderItem);
    elt.$descCtn.addStyle('width', this.$selectlist._descWidth + 'px');
  }
};
SelectMenu.prototype._dictByValue = function (items) {
  var dict = {};
  var item;
  for (var i = 0; i < items.length; ++i) {
    item = items[i];
    dict[item.value + ''] = item;
  }
  return dict;
};
SelectMenu.prototype.init = function (props) {
  props = props || {};
  Object.keys(props).forEach(function (key) {
    if (props[key] === undefined) delete props[key];
  });
  if (!('value' in props)) {
    if (props.items && props.items.length > 0) props.value = typeof props.items[0] == 'string' ? props.items[0] : props.items[0].value;
  }
  var value = props.value;
  delete props.value;
  this["super"](props);
  this.value = value;
};
SelectMenu.property = {};
SelectMenu.property.items = {
  set: function set(value) {
    this._searchCache = {};
    this._itemIdxByValue = null;
    /**
     * verity data
     */
    if (value) {
      value.forEach(function (it) {
        if (it && it.text) {
          it.text = it.text + '';
        }
      });
    }
    this._items = value;
    this._itemsByValue = this._dictByValue(value);
    if (!this._itemsByValue[this.value] && value.length > 0) {
      this.value = value[0].value;
    } else this.updateItem();
    this.$dropdownBox.removeStyle('min-width');
    this.selectListBound = this.$selectlist.setItemsAsync(value || []);
    this.style.setProperty('--select-list-desc-width', this.$selectlist.measuredSize.descWidth + 'px');
    this._resourceReady = true;
    this.addStyle('min-width', this.selectListBound.width + 2 + 23 + 'px');
    this.emit('minwidthchange', {
      target: this,
      value: this.selectListBound.width + 2 + 23,
      type: 'minwidthchange'
    }, this);
  },
  get: function get() {
    return this._items || [];
  }
};
SelectMenu.property.value = {
  set: function set(value) {
    this.$selectlist.value = value;
    this._lastValue = value;
    this.updateItem();
  },
  get: function get() {
    return this.$selectlist.value;
  }
};
SelectMenu.property.enableSearch = {
  set: function set(value) {
    this._enableSearch = !!value;
    if (value) {
      this.$searchTextInput.removeStyle('display');
    } else {
      this.$searchTextInput.addStyle('display', 'none');
    }
  },
  get: function get() {
    return !!this._enableSearch;
  }
};
SelectMenu.prototype.updateDropdownPostion = function (updateAnchor) {
  if (!this.isFocus) {
    this.$anchorContentCtn.removeStyle('left').removeStyle('top');
    this.$dropdownBox.removeStyle('min-width');
    return;
  }
  var bound = this.getBoundingClientRect();
  if (!updateAnchor) {
    var outBound = _Dom["default"].traceOutBoundingClientRect(this);
    if (!this.isFocus || bound.top > outBound.bottom || bound.bottom < outBound.top) {
      this.isFocus = false;
      return;
    }
    var anchorOutBound = _Dom["default"].traceOutBoundingClientRect(this.$anchor);
    var searchBound = this.$searchTextInput.getBoundingClientRect();
    var availableTop = bound.top - anchorOutBound.top - (this.enableSearch ? searchBound.height + 8 : 0) - 20;
    var availableBottom = anchorOutBound.bottom - bound.bottom - (this.enableSearch ? searchBound.height + 8 : 0) - 20;
    if (this.forceDown || availableBottom >= this.selectListBound.height || availableBottom > availableTop) {
      this.isDropdowUp = false;
      if (this.$dropdownBox.firstChild != this.$searchTextInput) {
        this.$searchTextInput.selfRemove();
        this.$dropdownBox.addChildBefore(this.$searchTextInput, this.$vscroller);
      }
      this.$vscroller.addStyle('max-height', availableBottom + 'px');
    } else {
      this.isDropdowUp = true;
      if (this.$dropdownBox.lastChild !== this.$searchTextInput) {
        this.$searchTextInput.selfRemove();
        this.$dropdownBox.addChild(this.$searchTextInput);
      }
      this.$vscroller.addStyle('max-height', availableTop + 'px');
    }
    this.$dropdownBox.addStyle('min-width', bound.width + 'px');
  }
  var anchorBound = this.$anchor.getBoundingClientRect();
  if (this.isDropdowUp) {
    this.$anchorContentCtn.addStyle({
      left: bound.left - anchorBound.left + 'px',
      top: bound.top - anchorBound.top - this.$dropdownBox.clientHeight - 1 + 'px'
    });
  } else {
    this.$anchorContentCtn.addStyle({
      left: bound.left - anchorBound.left + 'px',
      top: bound.bottom - anchorBound.top + 'px'
    });
  }
};
SelectMenu.prototype.scrollToSelectedItem = function () {
  var self = this;
  setTimeout(function () {
    if (self.$selectlist.$selectedItem) {
      var fistChildBound = self.$selectlist.childNodes[1].getBoundingClientRect();
      var lastChildBound = self.$selectlist.lastChild.getBoundingClientRect();
      var listBound = {
        top: fistChildBound.top,
        height: lastChildBound.bottom - fistChildBound.top,
        bottom: lastChildBound.bottom
      };
      var itemBound = self.$selectlist.$selectedItem.getBoundingClientRect();
      if (self.isDropdowUp) {
        var scrollBound = self.$vscroller.getBoundingClientRect();
        self.$vscroller.scrollTop = Math.max(itemBound.bottom - scrollBound.height - listBound.top, 0);
      } else {
        self.$vscroller.scrollTop = itemBound.top - listBound.top;
      }
    }
  }.bind(this), 3);
};
SelectMenu.prototype.startTrackScroll = function () {
  var trackElt = this.parentElement;
  while (trackElt) {
    if (trackElt.addEventListener) {
      trackElt.addEventListener('scroll', this.eventHandler.scrollParent, false);
    } else {
      trackElt.attachEvent('onscroll', this.eventHandler.scrollParent, false);
    }
    this.$scrollTrackElts.push(trackElt);
    trackElt = trackElt.parentElement;
  }
  if (document.addEventListener) {
    document.addEventListener('scroll', this.eventHandler.scrollParent, false);
    document.addEventListener('wheel', this.eventHandler.wheelDocument, true);
  } else {
    document.attachEvent('onscroll', this.eventHandler.scrollParent, false);
  }
  this.$scrollTrackElts.push(document);
};
SelectMenu.prototype.stopTrackScroll = function () {
  var trackElt;
  for (var i = 0; i < this.$scrollTrackElts.length; ++i) {
    trackElt = this.$scrollTrackElts[i];
    if (trackElt.removeEventListener) {
      trackElt.removeEventListener('scroll', this.eventHandler.scrollParent, false);
    } else {
      trackElt.dettachEvent('onscroll', this.eventHandler.scrollParent, false);
    }
  }
  this.$scrollTrackElts = [];
};
SelectMenu.prototype.startListenRemovable = function () {
  var removableElt = this.parentElement;
  while (removableElt) {
    if (removableElt.isSupportedEvent && removableElt.isSupportedEvent('remove')) {
      removableElt.on('remove', this.eventHandler.removeParent);
    }
    removableElt = removableElt.parentElement;
  }
};
SelectMenu.prototype.stopListenRemovable = function () {
  var removableElt;
  while (this.$removableTrackElts.length > 0) {
    removableElt = this.$removableTrackElts.pop();
    removableElt.off('remove', this.eventHandler.removeParent);
  }
};
SelectMenu.prototype._releaseResource = function () {
  this.$selectlist.items = [];
};
SelectMenu.prototype._requestResource = function () {
  this.$selectlist.items = this._items || [];
};
SelectMenu.property.isFocus = {
  set: function set(value) {
    if (value && (this.disabled || this.readOnly)) return;
    var self = this;
    value = !!value;
    if (value == this.isFocus) return;
    this._isFocus = value;
    if (value) {
      this.startTrackScroll();
      this.selectListScrollToken = null; //force scroll
      var isAttached = false;
      setTimeout(function () {
        if (isAttached) return;
        $('body').on('mousedown', self.eventHandler.bodyClick);
        isAttached = true;
      }, 1000);
      $('body').once('click', function () {
        setTimeout(function () {
          if (isAttached) return;
          $('body').on('mousedown', self.eventHandler.bodyClick);
          isAttached = true;
        }, 10);
      });
      if (this.enableSearch) {
        setTimeout(function () {
          self.$searchTextInput.focus();
        }, 50);
      }
      this.updateDropdownPostion();
      this.scrollToSelectedItem();
      this.$anchor.removeClass('absol-disabled');
    } else {
      this.$anchor.addClass('absol-disabled');
      this.stopTrackScroll();
      $('body').off('mousedown', this.eventHandler.bodyClick);
      setTimeout(function () {
        if (self.$searchTextInput.value != 0) {
          self.$searchTextInput.value = '';
          self.$selectlist.items = self.items;
          self._resourceReady = true;
          self.$selectlist.removeClass('as-searching');
        }
      }, 100);
      this.updateItem();
    }
  },
  get: function get() {
    return !!this._isFocus;
  }
};
SelectMenu.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('disabled');
    } else {
      this.removeClass('disabled');
    }
  },
  get: function get() {
    return this.hasClass('disabled');
  }
};
SelectMenu.property.hidden = {
  set: function set(value) {
    if (value) {
      this.addClass('hidden');
    } else {
      this.removeClass('hidden');
    }
  },
  get: function get() {
    return this.addClass('hidden');
  }
};
SelectMenu.property.selectedIndex = {
  get: function get() {
    if (!this._itemIdxByValue) {
      this._itemIdxByValue = {};
      for (var i = 0; i < this._items.length; ++i) {
        this._itemIdxByValue[this._items[i].value] = i;
      }
    }
    var idx = this._itemIdxByValue[this._value];
    return idx >= 0 ? idx : -1;
  }
};

/**
 * @type {SelectMenu}
 */
SelectMenu.eventHandler = {};
SelectMenu.eventHandler.attached = function () {
  if (this._updateInterval) return;
  if (!this.$anchor.parentNode) this.$anchor.addTo(this.$anchorCtn);
  this.$attachhook.updateSize = this.$attachhook.updateSize || this.updateDropdownPostion.bind(this);
  _Dom["default"].addToResizeSystem(this.$attachhook);
  this.stopListenRemovable();
  this.startListenRemovable();
  if (!this._resourceReady) {
    this._requestResource();
    this._resourceReady = true;
  }
  this._updateInterval = setInterval(function () {
    if (!this.isDescendantOf(document.body)) {
      clearInterval(this._updateInterval);
      this._updateInterval = undefined;
      this.$anchor.selfRemove();
      this.stopTrackScroll();
      this.stopListenRemovable();
      this.eventHandler.removeParent();
    }
  }.bind(this), 10000);
};
SelectMenu.eventHandler.scrollParent = function (event) {
  var self = this;
  if (this._scrollFrameout > 0) {
    this._scrollFrameout = 10;
    return;
  }
  this._scrollFrameout = this._scrollFrameout || 10;
  function update() {
    self.updateDropdownPostion(false);
    self.scrollToSelectedItem();
    self._scrollFrameout--;
    if (self._scrollFrameout > 0) requestAnimationFrame(update);
  }
  update();
};
SelectMenu.eventHandler.removeParent = function (event) {
  this._releaseResource();
  this._resourceReady = false;
};
SelectMenu.eventHandler.click = function (event) {
  if (_EventEmitter["default"].isMouseRight(event)) return;
  this.isFocus = !this.isFocus;
};
SelectMenu.eventHandler.bodyClick = function (event) {
  if (!_EventEmitter["default"].hitElement(this, event) && !_EventEmitter["default"].hitElement(this.$anchor, event)) {
    setTimeout(function () {
      this.isFocus = false;
    }.bind(this), 5);
  }
};
SelectMenu.eventHandler.selectlistPressItem = function (event) {
  this.updateItem();
  if (this._lastValue != this.value) {
    event.lastValue = this._lastValue;
    event.value = this.value;
    setTimeout(function () {
      this.emit('change', event, this);
    }.bind(this), 1);
    this._lastValue = this.value;
  }
};
SelectMenu.eventHandler.searchModify = function (event) {
  var filterText = this.$searchTextInput.value.replace(/((\&nbsp)|(\s))+/g, ' ').trim();
  if (filterText.length == 0) {
    this._resourceReady = true;
    this.$selectlist.items = this.items;
    this.scrollToSelectedItem();
    this.$selectlist.removeClass('as-searching');
  } else {
    this.$selectlist.addClass('as-searching');
    var view = [];
    if (!this._searchCache[filterText]) {
      if (this._items.length > 0 && !this._items[0].__nvnText__) {
        (0, _search.prepareSearchForList)(this._items);
      }
      view = (0, _search.searchListByText)(filterText, this._items);
      this._searchCache[filterText] = view;
    } else {
      view = this._searchCache[filterText];
    }
    this.$selectlist.items = view;
    this._resourceReady = true;
    this.$vscroller.scrollTop = 0;
  }
  this.selectListBound = this.$selectlist.getBoundingClientRect();
  this.updateDropdownPostion(true);
};
SelectMenu.eventHandler.listSizeChangeAsync = function () {
  this.updateDropdownPostion();
};
SelectMenu.eventHandler.listValueVisibility = function (event) {
  if (!this.isFocus) return;
  if (this._selectListScrollSession == event.session) return;
  this._selectListScrollSession = event.session;
  this.scrollToSelectedItem();
};
_ACore["default"].install(SelectMenu);
var _default = SelectMenu;
exports["default"] = _default;

/***/ }),

/***/ 41735:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(80571);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _utils = __webpack_require__(84512);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
_ACore["default"].creator['dropdown-ico'] = function () {
  return (0, _ACore._)(['<svg class="dropdown" width="100mm" height="100mm" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">', '<g transform="translate(0,-197)">', '<path d="m6.3152 218.09a4.5283 4.5283 0 0 0-3.5673 7.3141l43.361 55.641a4.5283 4.5283 0 0 0 7.1421 7e-3l43.496-55.641a4.5283 4.5283 0 0 0-3.5673-7.3216z" />', '</g>', '</svg>'].join(''));
};

/***
 * @extends AElement
 * @constructor
 */
function SelectMenu() {
  this._value = null;
  this._lastValue = null;
  this.$holderItem = (0, _ACore.$)('.absol-selectmenu-holder-item', this);
  this.$viewItem = (0, _ACore.$)('.absol-selectmenu-holder-item selectlistitem', this);
  /***
   *
   * @type {SelectListBox}
   */
  this.$selectlistBox = (0, _ACore._)({
    tag: 'selectlistbox',
    props: {
      anchor: [1, 6, 2, 5],
      strictValue: true
    },
    on: {
      preupdateposition: this.eventHandler.preUpdateListPosition
    }
  });
  if (this.$selectlistBox.cancelWaiting) this.$selectlistBox.cancelWaiting();
  this.widthLimit = this.$selectlistBox.widthLimit;
  this.addStyle('--as-width-limit', this.$selectlistBox.widthLimit + 'px');
  var firstCheckView = false;
  var this1 = this;
  var checkView = function checkView() {
    if (this1.isDescendantOf && this1.isDescendantOf(document.body)) {
      setTimeout(checkView, 5000);
      firstCheckView = true;
    } else if (firstCheckView) {
      setTimeout(checkView, 1000);
    } else {
      if (this1.$selectlistBox.searchMaster) this1.$selectlistBox.searchMaster.destroy();
    }
  };
  setTimeout(checkView, 3000);
  this.$selectlistBox.on('pressitem', this.eventHandler.selectListBoxPressItem);
  this.$selectlistBox.followTarget = this;
  this.$selectlistBox.sponsorElement = this;
  _OOP["default"].drillProperty(this, this.$selectlistBox, 'enableSearch');
  _OOP["default"].drillProperty(this, this, 'selectedvalue', 'value');
  this.strictValue = true;
  this._lastValue = "NOTHING_VALUE";
  this._isFocus = false;
  this.isFocus = false;
  this.on('mousedown', this.eventHandler.click, true);
  /***
   * @name items
   * @type {[]}
   * @memberOf SelectMenu#
   */
}

SelectMenu.tag = 'selectmenu';
SelectMenu.render = function () {
  return (0, _ACore._)({
    "class": ['absol-selectmenu', 'as-select-menu'],
    extendEvent: ['change'],
    attr: {
      tabindex: '1'
    },
    child: [{
      "class": 'absol-selectmenu-holder-item',
      child: 'selectlistitem'
    }, {
      tag: 'button',
      "class": 'absol-selectmenu-btn',
      child: ['dropdown-ico']
    }]
  });
};
SelectMenu.prototype.addStyle = function (arg0, arg1) {
  if (arg0 === 'textAlign' || arg0 === 'text-align') {
    if (arg1 === 'center') {
      this.addClass('as-text-align-center');
      this.$selectlistBox.addClass('as-text-align-center');
    } else {
      this.removeClass('as-text-align-center');
      this.$selectlistBox.removeClass('as-text-align-center');
    }
  } else {
    return _AElement["default"].prototype.addStyle.apply(this, arguments);
  }
};
SelectMenu.prototype.init = function (props) {
  props = props || {};
  Object.keys(props).forEach(function (key) {
    if (props[key] === undefined) delete props[key];
  });
  if ('selectedvalue' in props) {
    props.value = props.selectedvalue;
  }
  if (!('value' in props)) {
    if (props.items && props.items.length > 0) props.value = typeof props.items[0] == 'string' ? props.items[0] : props.items[0].value;
  }
  var value = props.value;
  delete props.value;
  this["super"](props);
  this.value = value;
};
SelectMenu.prototype.revokeResource = function () {
  // return;
  // this.$selectlistBox.revokeResource();
};
SelectMenu.prototype.selfRemove = function () {
  var _this = this;
  setTimeout(function () {
    if (!_this.parentElement) _this.revokeResource();
  }, 100);
  this.remove();
};
SelectMenu.prototype.updateItem = function () {
  var value = this._explicit(this._value);
  var selectedItems = this.$selectlistBox.findDisplayItemsByValue(value);
  var data;
  if (selectedItems.length >= 1) {
    data = selectedItems[0].item;
    this.$viewItem.data = data;
    if (data.text && (0, _utils.measureText)(data.text + '', '14px arial').width - 30 > this.widthLimit) {
      this.$viewItem.attr('title', data.text);
    } else this.$viewItem.attr('title', null);
  } else {
    this.$viewItem.data = {
      text: '',
      value: null
    };
    this.$viewItem.attr('title', null);
  }
};
SelectMenu.prototype.findItemsByValue = function (value) {
  return this.$selectlistBox.findItemsByValue(value);
};
SelectMenu.prototype.findItemByValue = function (value) {
  return this.$selectlistBox.findItemByValue(value);
};
SelectMenu.prototype._explicit = function (value) {
  var items = this.$selectlistBox.findItemsByValue(value);
  if (items.length > 0 || !this.strictValue || this.items.length === 0) {
    return value;
  } else {
    return this.items[0].value;
  }
};
SelectMenu.property = {};
SelectMenu.property.items = {
  set: function set(items) {
    items = items || [];
    this.$selectlistBox.items = items;
    this.addStyle('--select-list-estimate-width', this.$selectlistBox._estimateWidth / 14 + 'em');
    this.addStyle('--select-list-desc-width', this.$selectlistBox._estimateDescWidth / 14 + 'em');
    this.updateItem();
  },
  get: function get() {
    return this.$selectlistBox.items;
  }
};
SelectMenu.property.value = {
  set: function set(value) {
    this.$selectlistBox.values = [value];
    this._lastValue = value;
    this._value = value;
    this.updateItem();
  },
  get: function get() {
    return this._explicit(this._value);
  }
};

/***
 *
 * @type {SelectMenu|{}}
 */
SelectMenu.property.isFocus = {
  set: function set(value) {
    if (value && (this.disabled || this.readOnly)) return;
    var thisSM = this;
    if (!this.items || this.items.length === 0) value = false; //prevent focus
    if (this._isFocus === value) return;
    this._isFocus = !!value;
    if (this._isFocus) {
      this.$selectlistBox.addTo(document.body);
      // this.$selectlistBox.domSignal.$attachhook.emit('attached');
      var bound = this.getBoundingClientRect();
      this.$selectlistBox.addStyle('min-width', bound.width + 'px');
      this.$selectlistBox.refollow();
      this.$selectlistBox.updatePosition();
      setTimeout(function () {
        if (!_BrowserDetector["default"].isMobile) thisSM.$selectlistBox.focus();
        document.addEventListener('click', thisSM.eventHandler.bodyClick);
      }, 100);
      this.$selectlistBox.viewListAtFirstSelected();
    } else {
      document.removeEventListener('click', thisSM.eventHandler.bodyClick);
      this.$selectlistBox.selfRemove();
      this.$selectlistBox.unfollow();
      this.$selectlistBox.resetSearchState();
    }
  },
  get: function get() {
    return this._isFocus;
  }
};
SelectMenu.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
SelectMenu.property.hidden = {
  set: function set(value) {
    if (value) {
      this.addClass('as-hidden');
    } else {
      this.removeClass('as-hidden');
    }
  },
  get: function get() {
    return this.addClass('as-hidden');
  }
};
SelectMenu.property.selectedIndex = {
  get: function get() {
    var selectedItems = this.$selectlistBox.findItemsByValue(this._value);
    if (selectedItems.length > 0) {
      return selectedItems[0].idx;
    }
    return -1;
  }
};
SelectMenu.property.strictValue = {
  set: function set(value) {
    if (value) {
      this.attr('data-strict-value', null);
    } else {
      this.attr('data-strict-value', 'false');
    }
    this.updateItem();
  },
  get: function get() {
    return !this.attr('data-strict-value') || this.attr('data-strict-value') !== 'false' && this.attr('data-strict-value') !== '0';
  }
};
SelectMenu.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};

/**
 * @type {SelectMenu|{}}
 */
SelectMenu.eventHandler = {};
SelectMenu.eventHandler.click = function (event) {
  if (this.readOnly) return;
  if (_EventEmitter["default"].isMouseRight(event)) return;
  if (_EventEmitter["default"].hitElement(this.$selectlistBox, event)) return;
  this.isFocus = !this.isFocus;
};
SelectMenu.eventHandler.bodyClick = function (event) {
  if (!_EventEmitter["default"].hitElement(this, event) && !_EventEmitter["default"].hitElement(this.$selectlistBox, event)) {
    setTimeout(function () {
      this.isFocus = false;
    }.bind(this), 5);
  }
};
SelectMenu.eventHandler.selectListBoxPressItem = function (event) {
  this._value = event.data.value;
  this.$selectlistBox.values = [this._value];
  this.updateItem();
  if (this._lastValue !== this.value) {
    event.lastValue = this._lastValue;
    event.value = this.value;
    setTimeout(function () {
      this.emit('change', event, this);
    }.bind(this), 1);
    this._lastValue = this.value;
  }
  setTimeout(function () {
    this.isFocus = false;
  }.bind(this), 50);
};
SelectMenu.eventHandler.preUpdateListPosition = function () {
  var bound = this.getBoundingClientRect();
  var screenSize = (0, _Dom.getScreenSize)();
  var availableTop = bound.top - 5;
  var availableBot = screenSize.height - 5 - bound.bottom;
  this.$selectlistBox.addStyle('--max-height', Math.max(availableBot, availableTop) + 'px');
  var outBound = (0, _Dom.traceOutBoundingClientRect)(this);
  if (bound.bottom < outBound.top || bound.top > outBound.bottom || bound.right < outBound.left || bound.left > outBound.right) {
    if (!_BrowserDetector["default"].isMobile) this.isFocus = false;
  }
};
_ACore["default"].install(SelectMenu);
var _default = SelectMenu;
exports["default"] = _default;

/***/ }),

/***/ 68302:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _RibbonButton = _interopRequireDefault(__webpack_require__(93856));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var addSelectedClass = function addSelectedClass(item) {
  if (!item) return;
  if (Array.isArray(item.extendClasses)) {
    item.extendClasses.push('as-ribbon-selected');
  } else {
    item.extendClasses = [item.extendClasses, 'as-ribbon-selected'].filter(function (x) {
      return !!x;
    });
  }
};
var removeSelectedClass = function removeSelectedClass(item) {
  if (!item) return;
  if (Array.isArray(item.extendClasses)) {
    item.extendClasses = item.extendClasses.filter(function (it) {
      return it !== 'as-ribbon-selected';
    });
  }
};

/**
 * @extends {RibbonButton}
 * @constructor
 */
function SelectRibbonMenu() {
  var _this = this;
  _RibbonButton["default"].apply(this, arguments);
  this.addClass('as-select-ribbon-menu');
  this._itemDict = {};
  this._value = null;
  this.defineEvent('change');
  this.on('select', function (ev) {
    var value = ev.item.value;
    if (_this.value !== value) {
      _this.value = value;
      _this.emit('change', {
        target: _this,
        type: 'change'
      }, _this);
    }
  });
}
SelectRibbonMenu.tag = 'SelectRibbonMenu'.toLowerCase();
SelectRibbonMenu.render = _RibbonButton["default"].render;
SelectRibbonMenu.property = Object.assign({}, _RibbonButton["default"].property);
SelectRibbonMenu.property.items = {
  set: function set(items) {
    var _this2 = this;
    removeSelectedClass(this.selectedItem);
    items = items || [];
    _RibbonButton["default"].property.items.set.call(this, items);
    this._itemDict = {};
    var visit = function visit(it) {
      var key = (0, _utils.keyStringOf)(it.value);
      _this2._itemDict[key] = it;
    };
    items.forEach(function (it) {
      return visit(it);
    });
    var selectedItem = this.selectedItem;
    addSelectedClass(selectedItem);
    selectedItem = Object.assign({
      text: '',
      icon: null
    }, selectedItem);
    this.text = selectedItem.text;
    this.icon = selectedItem.icon;
  },
  get: _RibbonButton["default"].property.items.get
};
SelectRibbonMenu.property.value = {
  set: function set(value) {
    var selectedItem = this.selectedItem;
    console.log('clear', selectedItem);
    removeSelectedClass(selectedItem);
    this._value = value;
    selectedItem = this.selectedItem;
    addSelectedClass(selectedItem);
    selectedItem = Object.assign({
      text: '',
      icon: null
    }, selectedItem);
    this.text = selectedItem.text;
    this.icon = selectedItem.icon;
  },
  get: function get() {
    if (!this._items || !this._items.length || this._itemDict[(0, _utils.keyStringOf)(this._value)]) return this._value;
    return this._items[0].value;
  }
};
SelectRibbonMenu.property.selectedItem = {
  get: function get() {
    if (this._itemDict[(0, _utils.keyStringOf)(this._value)]) return this._itemDict[(0, _utils.keyStringOf)(this._value)];
    if (this._items && this._items.length) return this._items[0];
    return null;
  }
};
var _default = SelectRibbonMenu;
exports["default"] = _default;

/***/ }),

/***/ 7073:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(14920);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _stringMatching = __webpack_require__(59163);
var _stringFormat = __webpack_require__(22294);
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
__webpack_require__(1446);
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var privateDom = new _Dom["default"]().install(_ACore["default"]);
var $ = privateDom.$;
var _ = privateDom._;
function SelectTable() {
  var thisST = this;
  this.$attachhook = _('attachhook').addTo(this);
  this.sync = new Promise(function (rs) {
    thisST.$attachhook.on('error', rs);
  });
  this.$buttonsContainer = $('.absol-select-table-buttons-container', this);
  this.$searchContainer = $('.absol-select-table-searchtextinput-container', this);
  this.$nonselectedItemsContainer = $('.absol-select-table-nonselected-items-container', this);
  this.$selectedItemsContainer = $('.absol-select-table-selected-items-container', this);
  this.$nonselectedSearchItemsContainer = $('.absol-select-table-nonselected-search-items-container', this);
  this.$selectedSearchItemsContainer = $('.absol-select-table-selected-search-items-container', this);
  this.$removeAllBtn = $('button.remove-all', this).on('click', this.eventHandler.removeAllBtnClick);
  this.$addAllBtn = $('button.add-all', this).on('click', this.eventHandler.addAllBtnClick);
  this.$vscrollerSelected = $('bscroller#selected', this);
  this.$vscrollerNonselected = $('bscroller#nonselected', this);
  this.$body = $('.absol-select-table-body', this);
  this.$header = $('.absol-select-table-header', this);
  /***
   *
   * @type {SearchTextInput}
   */
  this.$searchTextInput = $('searchtextinput', this).on('stoptyping', this.eventHandler.searchTextInputModify);
  this.$addAllBtn.updateSize = function () {
    thisST.updateScroller && thisST.updateScroller();
  };
  _Dom["default"].addToResizeSystem(this.$addAllBtn);
  return this;
}
SelectTable.tag = 'SelectTable'.toLowerCase();
SelectTable.render = function () {
  return _({
    "class": 'absol-select-table',
    extendEvent: ['change', 'addall', 'removeall', 'add', 'remove'],
    child: [{
      "class": 'absol-select-table-header',
      child: [{
        "class": 'absol-select-table-searchtextinput-container',
        child: 'searchtextinput'
      }, {
        "class": 'absol-select-table-buttons-container',
        child: [{
          tag: 'button',
          "class": 'add-all',
          props: {
            innerHTML: 'Add All'
          }
        }, {
          tag: 'button',
          "class": 'remove-all',
          props: {
            innerHTML: 'Remove All'
          }
        }]
      }]
    }, {
      "class": 'absol-select-table-body',
      child: [{
        tag: 'bscroller',
        attr: {
          id: 'nonselected'
        },
        "class": ['absol-select-table-items-scroller'],
        child: {
          child: ['.absol-select-table-nonselected-items-container', '.absol-select-table-nonselected-search-items-container']
        }
      }, {
        tag: 'bscroller',
        attr: {
          id: 'selected'
        },
        "class": ['absol-select-table-items-scroller'],
        child: {
          child: ['.absol-select-table-selected-items-container', '.absol-select-table-selected-search-items-container']
        }
      }]
    }]
  });
};
SelectTable.prototype.updateButtonsContainerSize = function () {
  var rootBound = this.$buttonsContainer.getBoundingClientRect();
  var containBound = this.$buttonsContainer.getBoundingRecursiveRect();
  var fontSize = this.getFontSize();
  this.$buttonsContainer.addStyle('width', (containBound.width + 1) / fontSize + 'em');
  this.$searchContainer.addStyle('right', (containBound.width + 5) / fontSize + 'em');
};
SelectTable.prototype.addAll = function () {
  Array.apply(null, this.$nonselectedItemsContainer.childNodes).forEach(function (e) {
    e.addTo(this.$selectedItemsContainer);
  }.bind(this));
  this.requestSort();
};
SelectTable.prototype.removeAll = function () {
  Array.apply(null, this.$selectedItemsContainer.childNodes).forEach(function (e) {
    e.addTo(this.$nonselectedItemsContainer);
  }.bind(this));
  this.requestSort();
};
SelectTable.prototype.updateScroller = function () {
  var update = function () {
    if (this.style.height) {
      var height = parseFloat(this.getComputedStyleValue('height').replace('px', ''));
      var headerHeight = parseFloat(this.$header.getComputedStyleValue('height').replace('px', ''));
      var bodyMargin = parseFloat(this.$body.getComputedStyleValue('margin-top').replace('px', ''));
      var borderWidth = 1;
      var availableHeight = height - headerHeight - bodyMargin * 2 - borderWidth * 2;
      this.$vscrollerNonselected.addStyle('max-height', availableHeight + 'px');
      this.$vscrollerSelected.addStyle('max-height', availableHeight + 'px');
    }
  }.bind(this);
  setTimeout(update, 1);
};
SelectTable.prototype.getAllItemElement = function () {
  var selectedItemElements = Array.apply(null, this.$selectedItemsContainer.childNodes);
  var nonselectedItemElements = Array.apply(null, this.$nonselectedItemsContainer.childNodes);
  return selectedItemElements.concat(nonselectedItemElements);
};
SelectTable.prototype.init = function (props) {
  this["super"](props);
  this.sync = this.sync.then(this.updateButtonsContainerSize.bind(this));
};
SelectTable.eventHandler = {};
SelectTable.eventHandler.addAllBtnClick = function (event) {
  this.addAll();
  if (this.searching) {
    this.eventHandler.searchTextInputModify(event);
  }
  this.emit('addall', _EventEmitter["default"].copyEvent(event, {}), this);
  this.updateScroller();
};
SelectTable.eventHandler.removeAllBtnClick = function (event) {
  this.removeAll();
  if (this.searching) {
    this.eventHandler.searchTextInputModify(event);
  }
  this.emit('removeall', _EventEmitter["default"].copyEvent(event, {}), this);
  this.updateScroller();
};
SelectTable.prototype._filter = function (items, filterText) {
  var result = [];
  if (filterText.length == 1) {
    result = items.map(function (item) {
      var res = {
        item: item,
        text: typeof item === 'string' ? item : item.text
      };
      return res;
    }).map(function (it) {
      it.score = 0;
      var text = it.text.replace(/((\&nbsp)|(\s))+/g, ' ').trim();
      it.score += text.toLowerCase().indexOf(filterText.toLowerCase()) >= 0 ? 100 : 0;
      text = (0, _stringFormat.nonAccentVietnamese)(text);
      it.score += text.toLowerCase().indexOf(filterText.toLowerCase()) >= 0 ? 100 : 0;
      return it;
    });
    result.sort(function (a, b) {
      if (b.score - a.score == 0) {
        if ((0, _stringFormat.nonAccentVietnamese)(b.text) > (0, _stringFormat.nonAccentVietnamese)(a.text)) return -1;
        return 1;
      }
      return b.score - a.score;
    });
    result = result.filter(function (x) {
      return x.score > 0;
    });
  } else {
    var its = items.map(function (item) {
      var res = {
        item: item,
        text: typeof item === 'string' ? item : item.text
      };
      var text = res.text.replace(/((\&nbsp)|(\s))+/g, ' ').trim();
      res.score = ((0, _stringMatching.phraseMatch)(text, filterText) + (0, _stringMatching.phraseMatch)((0, _stringFormat.nonAccentVietnamese)(text), (0, _stringFormat.nonAccentVietnamese)(filterText))) / 2;
      if ((0, _stringFormat.nonAccentVietnamese)(text).replace(/s/g, '').toLowerCase().indexOf((0, _stringFormat.nonAccentVietnamese)(filterText).toLowerCase().replace(/s/g, '')) > -1) res.score = 100;
      return res;
    });
    if (its.length == 0) return;
    its.sort(function (a, b) {
      if (b.score - a.score == 0) {
        if ((0, _stringFormat.nonAccentVietnamese)(b.text) > (0, _stringFormat.nonAccentVietnamese)(a.text)) return -1;
        return 1;
      }
      return b.score - a.score;
    });
    var result = its.filter(function (x) {
      return x.score > 0.5;
    });
    if (result.length == 0) {
      var bestScore = its[0].score;
      result = its.filter(function (it) {
        return it.score + 0.001 >= bestScore;
      });
    }
    if (result[0].score == 0) result = [];
  }
  result = result.map(function (e) {
    return e.item;
  });
  return result;
};
SelectTable.prototype._stringcmp = function (s0, s1) {
  if (s0 == s1) return 0;
  if (s0 > s1) return 1;
  return -1;
};
SelectTable.prototype._getString = function (item) {
  if (typeof item == "string") return item;
  return item.text;
};
SelectTable.prototype._equalArr = function (a, b) {
  if (a.length != b.length) return false;
  for (var i = 0; i < a.length; ++i) {
    if (a[i] != b[i] && a[i].text != b[i].text && a[i].value != b[i].value) return false;
  }
  return true;
};
SelectTable.prototype._applySort = function (items, sortFlag) {
  var res = items.slice();
  if (sortFlag == 1 || sortFlag === true) {
    res.sort(function (a, b) {
      return this._stringcmp(this._getString(a), this._getString(b));
    }.bind(this));
  } else if (sortFlag == -1) {
    res.sort(function (a, b) {
      return -this._stringcmp(this._getString(a), this._getString(b));
    }.bind(this));
  } else if (typeof sortFlag == 'function') {
    res.sort(function (a, b) {
      return sortFlag(a, b);
    }.bind(this));
  }
  return res;
};
SelectTable.prototype.requestSort = function () {
  if (!this.sorted || this.sorted == 0) return;
  var selectedItems = this.selectedItems;
  var selectedItemsNew = this._applySort(selectedItems, this.sorted);
  if (!this._equalArr(selectedItems, selectedItemsNew)) {
    this.selectedItems = selectedItemsNew;
  }
  var nonselectedItems = this.nonselectedItems;
  var nonselectedItemsNew = this._applySort(nonselectedItems, this.sorted);
  if (!this._equalArr(nonselectedItems, nonselectedItemsNew)) {
    this.nonselectedItems = nonselectedItemsNew;
  }
};
SelectTable.eventHandler.searchTextInputModify = function (event) {
  var filterText = this.$searchTextInput.value.trim();
  if (filterText.length > 0) {
    var selectedItems = this.selectedItems;
    var nonselectedItems = this.nonselectedItems;
    this.selectedSearchItems = selectedItems;
    this.nonselectedSearchItems = this._filter(nonselectedItems, filterText);
    this.selectedSearchItems = this._filter(selectedItems, filterText);
  } else {}
  this.searching = filterText.length > 0;
};
SelectTable.property = {};
SelectTable.property.disableMoveAll = {
  set: function set(value) {
    if (value) this.addClass('disable-move-all');else this.removeClass('disable-move-all');
  },
  get: function get() {
    return this.hasClass('disable-move-all');
  }
};
SelectTable.property.removeAllText = {
  set: function set(text) {
    this._removeAllText = text;
    //todo: update remove all text
    if (!text) this.$removeAllBtn.addStyle('display', 'none');else {
      this.$removeAllBtn.removeStyle('display');
      this.$removeAllBtn.innerHTML = this.removeAllText;
      this.updateButtonsContainerSize();
    }
  },
  get: function get() {
    return this._removeAllText || 'Remove All';
  }
};
SelectTable.property.addAllText = {
  set: function set(text) {
    this._addAllText = text;
    if (!text) this.$addAllBtn.addStyle('display', 'none');else {
      this.$addAllBtn.removeStyle('display');
      this.$addAllBtn.innerHTML = this.removeAllText;
      this.updateButtonsContainerSize();
    }
  },
  get: function get() {
    return this._addAllText || 'Add All';
  }
};
SelectTable.property.searching = {
  set: function set(value) {
    if (value) {
      this.addClass('searching');
    } else {
      this.removeClass('searching');
    }
    this.updateScroller();
  },
  get: function get() {
    return this.hasClass('searching');
  }
};
SelectTable.property.sorted = {
  set: function set(value) {
    this._sort = value;
    this.requestSort();
  },
  get: function get() {
    return this._sort;
  }
};
SelectTable.property.selectedItems = {
  set: function set(items) {
    this.$selectedItemsContainer.clearChild();
    var $nonselectedItemsContainer = this.$nonselectedItemsContainer;
    var $selectedItemsContainer = this.$selectedItemsContainer;
    var self = this;
    if (items instanceof Array) {
      items.map(function (item) {
        return _({
          tag: 'item',
          props: {
            data: item
          },
          on: {
            requestmove: function requestmove(event) {
              if (this.parentElement == $selectedItemsContainer) {
                this.addTo($nonselectedItemsContainer);
                self.emit('remove', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), self);
              } else {
                this.addTo($selectedItemsContainer);
                self.emit('add', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), self);
              }
              self.updateScroller();
              self.requestSort();
            }
          }
        }).addTo(this.$selectedItemsContainer);
      }.bind(this));
    } else {
      // error
    }
    this.updateScroller();
    this.requestSort();
  },
  get: function get() {
    return Array.prototype.map.call(this.$selectedItemsContainer.childNodes, function (e) {
      return e.data;
    });
  }
};
SelectTable.property.nonselectedItems = {
  set: function set(items) {
    this.$nonselectedItemsContainer.clearChild();
    var $nonselectedItemsContainer = this.$nonselectedItemsContainer;
    var $selectedItemsContainer = this.$selectedItemsContainer;
    var self = this;
    if (items instanceof Array) {
      items.map(function (item) {
        return _({
          tag: 'item',
          props: {
            data: item
          },
          on: {
            requestmove: function requestmove(event) {
              if (this.parentElement == $selectedItemsContainer) {
                this.addTo($nonselectedItemsContainer);
                self.emit('remove', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), self);
              } else {
                this.addTo($selectedItemsContainer);
                self.emit('add', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), self);
              }
              self.updateScroller();
              self.requestSort();
            }
          }
        }).addTo(this.$nonselectedItemsContainer);
      }.bind(this));
    } else {
      // error
    }
    this.updateScroller();
    this.requestSort();
  },
  get: function get() {
    return Array.prototype.map.call(this.$nonselectedItemsContainer.childNodes, function (e) {
      return e.data;
    });
  }
};
SelectTable.property.selectedSearchItems = {
  set: function set(items) {
    this.$selectedSearchItemsContainer.clearChild();
    var $nonselectedSearchItemsContainer = this.$nonselectedSearchItemsContainer;
    var $selectedSearchItemsContainer = this.$selectedSearchItemsContainer;
    var table = this;
    if (items instanceof Array) {
      items.map(function (item) {
        return _({
          tag: 'item',
          props: {
            data: item
          },
          on: {
            requestmove: function requestmove(event) {
              if (this.parentElement == $selectedSearchItemsContainer) {
                this.addTo($nonselectedSearchItemsContainer);
                table.getAllItemElement().filter(function (itemElement) {
                  if (itemElement.data == this.data) {
                    itemElement.addTo(table.$nonselectedItemsContainer);
                    return true;
                  }
                  return false;
                }.bind(this));
                table.emit('remove', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), table);
              } else {
                this.addTo($selectedSearchItemsContainer);
                table.getAllItemElement().filter(function (itemElement) {
                  if (itemElement.data == this.data) {
                    itemElement.addTo(table.$selectedItemsContainer);
                    return true;
                  }
                  return false;
                }.bind(this));
                table.emit('add', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), table);
              }
              table.updateScroller();
              table.requestSort();
            }
          }
        }).addTo(this.$selectedSearchItemsContainer);
      }.bind(this));
    } else {
      // error
    }
    this.updateScroller();
  },
  get: function get() {
    return Array.prototype.map.call(this.$selectedSearchItemsContainer.childNodes, function (e) {
      return e.data;
    });
  }
};
SelectTable.property.nonselectedSearchItems = {
  set: function set(items) {
    this.$nonselectedSearchItemsContainer.clearChild();
    var $nonselectedSearchItemsContainer = this.$nonselectedSearchItemsContainer;
    var $selectedSearchItemsContainer = this.$selectedSearchItemsContainer;
    var table = this;
    if (items instanceof Array) {
      items.map(function (item) {
        return _({
          tag: 'item',
          props: {
            data: item
          },
          on: {
            requestmove: function requestmove(event) {
              if (this.parentElement == $selectedSearchItemsContainer) {
                this.addTo($nonselectedSearchItemsContainer);
                table.getAllItemElement().filter(function (itemElement) {
                  if (itemElement.data == this.data) {
                    itemElement.addTo(table.$nonselectedItemsContainer);
                    return true;
                  }
                  return false;
                }.bind(this));
                table.emit('remove', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), table);
              } else {
                this.addTo($selectedSearchItemsContainer);
                table.getAllItemElement().filter(function (itemElement) {
                  if (itemElement.data == this.data) {
                    itemElement.addTo(table.$selectedItemsContainer);
                    return true;
                  }
                  return false;
                }.bind(this));
                table.emit('add', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), table);
              }
              table.updateScroller();
              table.requestSort();
            }
          }
        }).addTo(this.$nonselectedSearchItemsContainer);
      }.bind(this));
    } else {
      // error
    }
    this.updateScroller();
  },
  get: function get() {
    return Array.prototype.map.call(this.$nonselectedSearchItemsContainer.childNodes, function (e) {
      return e.data;
    });
  }
};

/*
namespace of selecttable
*/
function Item() {
  var res = _({
    extendEvent: ['requestmove'],
    "class": 'absol-select-table-item',
    child: ['span.absol-select-table-item-text', {
      "class": 'absol-select-table-item-right-container',
      child: {
        "class": 'absol-select-table-item-right-container-table',
        child: {
          "class": 'absol-select-table-item-right-container-cell',
          child: ['addicon', 'subicon']
        }
      }
    }]
  });
  res.$text = $('span', res);
  res.eventHandler = _OOP["default"].bindFunctions(res, Item.eventHandler);
  res.$rightBtn = $('.absol-select-table-item-right-container', res);
  res.on('dblclick', res.eventHandler.dblclick);
  res.$rightBtn.on('click', res.eventHandler.rightBtClick);
  return res;
}
;
Item.eventHandler = {};
Item.eventHandler.dblclick = function (event) {
  event.preventDefault();
  if (!_EventEmitter["default"].hitElement(this.$rightBtn, event)) this.emit('requestmove', event, this);
};
Item.eventHandler.rightBtClick = function (event) {
  this.emit('requestmove', event, this);
};
Item.property = {};
Item.property.data = {
  set: function set(value) {
    this._data = value;
    if (value) {
      var text;
      if (typeof value == "string") {
        text = value;
      } else {
        text = value.text;
      }
      this.$text.innerHTML = text;
    }
  },
  get: function get() {
    return this._data;
  }
};
Item.property.text = {
  get: function get() {
    return this._data ? typeof this._data == 'string' ? this._data : this._data.text : '';
  }
};

/**
 *
 * <svg width="100mm" height="100mm" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
 <g transform="translate(0,-197)">
 <path d="m39.873 198.21v38.668h-38.668v20.252h38.668v38.668h20.253v-38.668h38.668v-20.252h-38.668v-38.668z" style="fill-rule:evenodd;fill:#5fbbc2;stroke-linejoin:round;stroke-width:2.4109;stroke:#002eea"/>
 </g>
 </svg>
 */

function AddIcon() {
  return _Svg["default"].ShareInstance.buildSvg('<svg class="add-icon" width="100mm" height="100mm" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">' + '<g transform="translate(0,-197)">' + '<path d="m39.873 198.21v38.668h-38.668v20.252h38.668v38.668h20.253v-38.668h38.668v-20.252h-38.668v-38.668z" style="fill-rule:evenodd;stroke-linejoin:round;stroke-width:2.4109;" />' + '</g>' + '</svg>');
}
;
function SubIcon() {
  return _Svg["default"].ShareInstance.buildSvg('<svg class="sub-icon" width="100mm" height="100mm" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">' + ' <g transform="translate(0,-197)">' + '  <path d="m98.795 236.87v20.253h-97.589v-20.253z" style="fill-rule:evenodd;stroke-linejoin:round;stroke-width:2.411;"/>' + ' </g>' + '</svg>');
}
;
privateDom.install({
  subicon: SubIcon,
  addicon: AddIcon,
  item: Item
});
SelectTable.privateDom = privateDom;
_ACore["default"].install(SelectTable);
var _default = SelectTable;
exports["default"] = _default;

/***/ }),

/***/ 49520:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(14920);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _stringMatching = __webpack_require__(59163);
var _stringFormat = __webpack_require__(22294);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SelectTable = _interopRequireDefault(__webpack_require__(7073));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var privateDom = new _Dom["default"]().install(_ACore["default"]).install(_SelectTable["default"].privateDom);
var $ = privateDom.$;
var _ = privateDom._;
function SelectTable2() {
  var thisST = this;
  this.$attachhook = _('attachhook').addTo(this);
  this.sync = new Promise(function (rs) {
    thisST.$attachhook.on('error', rs);
  });
  this.$buttonsContainer = $('.absol-select-table-buttons-container', this);
  this.$searchContainer = $('.absol-select-table-searchtextinput-container', this);
  this.$nonselectedItemsContainer = $('.absol-select-table-nonselected-items-container', this);
  this.$selectedItemsContainer = $('.absol-select-table-selected-items-container', this);
  this.$nonselectedSearchItemsContainer = $('.absol-select-table-nonselected-search-items-container', this);
  this.$selectedSearchItemsContainer = $('.absol-select-table-selected-search-items-container', this);
  this.$removeAllBtn = $('button.remove-all', this).on('click', this.eventHandler.removeAllBtnClick);
  this.$addAllBtn = $('button.add-all', this).on('click', this.eventHandler.addAllBtnClick);
  this.$vscrollerSelected = $('vscroller#selected', this);
  this.$vscrollerNonselected = $('vscroller#nonselected', this);
  this.$body = $('.absol-select-table-body', this);
  this.$searchTextInput = $('searchtextinput', this).on('stoptyping', this.eventHandler.searchTextInputModify);
}
;
SelectTable2.tag = 'SelectTable2'.toLowerCase();
SelectTable2.render = function () {
  return _({
    "class": ['absol-select-table', 'exclude'],
    extendEvent: ['change', 'addall', 'removeall', 'add', 'remove'],
    child: [{
      "class": 'absol-select-table-header',
      child: [{
        "class": 'absol-select-table-searchtextinput-container',
        child: 'searchtextinput'
      }, {
        "class": 'absol-select-table-buttons-container',
        child: [{
          tag: 'button',
          "class": 'add-all',
          props: {
            innerHTML: 'Add All'
          }
        }, {
          tag: 'button',
          "class": 'remove-all',
          props: {
            innerHTML: 'Remove All'
          }
        }]
      }]
    }, {
      "class": 'absol-select-table-body',
      child: [{
        tag: 'vscroller',
        attr: {
          id: 'nonselected'
        },
        "class": 'absol-select-table-items-scroller',
        child: {
          child: ['.absol-select-table-nonselected-items-container', '.absol-select-table-nonselected-search-items-container']
        }
      }, {
        tag: 'vscroller',
        attr: {
          id: 'selected'
        },
        "class": 'absol-select-table-items-scroller',
        child: {
          child: ['.absol-select-table-selected-items-container', '.absol-select-table-selected-search-items-container']
        }
      }]
    }]
  });
};
SelectTable2.prototype.updateButtonsContainerSize = function () {
  var rootBound = this.$buttonsContainer.getBoundingClientRect();
  var containBound = this.$buttonsContainer.getBoundingRecursiveRect();
  var fontSize = this.getFontSize();
  this.$buttonsContainer.addStyle('width', (containBound.width + 1) / fontSize + 'em');
  this.$searchContainer.addStyle('right', (containBound.width + 5) / fontSize + 'em');
};
SelectTable2.prototype.addAll = function () {
  Array.apply(null, this.$nonselectedItemsContainer.childNodes).forEach(function (e) {
    e.addTo(this.$selectedItemsContainer);
  }.bind(this));
  this.requestSort();
};
SelectTable2.prototype.removeAll = function () {
  Array.apply(null, this.$selectedItemsContainer.childNodes).forEach(function (e) {
    e.addTo(this.$nonselectedItemsContainer);
  }.bind(this));
  this.requestSort();
};
SelectTable2.prototype.updateScroller = function () {
  var update = function () {
    if (this.style.height) {
      var bodyMargin = parseFloat(this.$body.getComputedStyleValue('margin-top').replace('px', '') || 0.14285714285 * 14 + '');
      var bound = this.getBoundingClientRect();
      var bodyBound = this.$body.getBoundingClientRect();
      var bodyRBound = this.$body.getBoundingRecursiveRect();
      var availableHeight = bound.bottom - bodyMargin - bodyBound.top;
      var isOverflowHeight = availableHeight < bodyRBound.height;
      if (isOverflowHeight) {
        this.$vscrollerNonselected.addStyle('max-height', availableHeight + 'px');
        this.$vscrollerSelected.addStyle('max-height', availableHeight + 'px');
        this.$vscrollerSelected.addClass('limited-height');
        this.$vscrollerNonselected.addClass('limited-height');
      } else {
        this.$vscrollerNonselected.removeStyle('max-height');
        this.$vscrollerSelected.removeStyle('max-height');
        this.$vscrollerSelected.removeClass('limited-height');
        this.$vscrollerSelected.removeClass('limited-height');
        this.$vscrollerNonselected.removeClass('limited-height');
      }
    }
    requestAnimationFrame(this.$vscrollerNonselected.requestUpdateSize.bind(this.$vscrollerNonselected));
    requestAnimationFrame(this.$vscrollerSelected.requestUpdateSize.bind(this.$vscrollerSelected));
  }.bind(this);
  setTimeout(update, 1);
};
SelectTable2.prototype.getAllItemElement = function () {
  var selectedItemElements = Array.apply(null, this.$selectedItemsContainer.childNodes);
  var nonselectedItemElements = Array.apply(null, this.$nonselectedItemsContainer.childNodes);
  return selectedItemElements.concat(nonselectedItemElements);
};
SelectTable2.prototype.init = function (props) {
  this["super"](props);
  this.sync = this.sync.then(this.updateButtonsContainerSize.bind(this));
};
SelectTable2.eventHandler = {};
SelectTable2.eventHandler.addAllBtnClick = function (event) {
  this.addAll();
  if (this.searching) {
    this.eventHandler.searchTextInputModify(event);
  }
  this.emit('addall', _EventEmitter["default"].copyEvent(event, {}), this);
  this.updateScroller();
};
SelectTable2.eventHandler.removeAllBtnClick = function (event) {
  this.removeAll();
  if (this.searching) {
    this.eventHandler.searchTextInputModify(event);
  }
  this.emit('removeall', _EventEmitter["default"].copyEvent(event, {}), this);
  this.updateScroller();
};
SelectTable2.prototype._filter = function (items, filterText) {
  var result = [];
  if (filterText.length == 1) {
    result = items.map(function (item) {
      var res = {
        item: item,
        text: typeof item === 'string' ? item : item.text
      };
      return res;
    }).map(function (it) {
      it.score = 0;
      var text = it.text.replace(/((\&nbsp)|(\s))+/g, ' ').trim();
      it.score += text.toLowerCase().indexOf(filterText.toLowerCase()) >= 0 ? 100 : 0;
      text = (0, _stringFormat.nonAccentVietnamese)(text);
      it.score += text.toLowerCase().indexOf(filterText.toLowerCase()) >= 0 ? 100 : 0;
      return it;
    });
    result.sort(function (a, b) {
      if (b.score - a.score == 0) {
        if ((0, _stringFormat.nonAccentVietnamese)(b.text) > (0, _stringFormat.nonAccentVietnamese)(a.text)) return -1;
        return 1;
      }
      return b.score - a.score;
    });
    result = result.filter(function (x) {
      return x.score > 0;
    });
  } else {
    var its = items.map(function (item) {
      var res = {
        item: item,
        text: typeof item === 'string' ? item : item.text
      };
      var text = res.text.replace(/((\&nbsp)|(\s))+/g, ' ').trim();
      res.score = ((0, _stringMatching.phraseMatch)(text, filterText) + (0, _stringMatching.phraseMatch)((0, _stringFormat.nonAccentVietnamese)(text), (0, _stringFormat.nonAccentVietnamese)(filterText))) / 2;
      if ((0, _stringFormat.nonAccentVietnamese)(text).replace(/s/g, '').toLowerCase().indexOf((0, _stringFormat.nonAccentVietnamese)(filterText).toLowerCase().replace(/s/g, '')) > -1) res.score = 100;
      return res;
    });
    if (its.length == 0) return;
    its.sort(function (a, b) {
      if (b.score - a.score == 0) {
        if ((0, _stringFormat.nonAccentVietnamese)(b.text) > (0, _stringFormat.nonAccentVietnamese)(a.text)) return -1;
        return 1;
      }
      return b.score - a.score;
    });
    var result = its.filter(function (x) {
      return x.score > 0.5;
    });
    if (result.length == 0) {
      var bestScore = its[0].score;
      result = its.filter(function (it) {
        return it.score + 0.001 >= bestScore;
      });
    }
    if (result[0].score == 0) result = [];
  }
  result = result.map(function (e) {
    return e.item;
  });
  return result;
};
SelectTable2.prototype._stringcmp = function (s0, s1) {
  if (s0 == s1) return 0;
  if (s0 > s1) return 1;
  return -1;
};
SelectTable2.prototype._getString = function (item) {
  if (typeof item == "string") return item;
  return item.text;
};
SelectTable2.prototype._equalArr = function (a, b) {
  if (a.length != b.length) return false;
  for (var i = 0; i < a.length; ++i) {
    if (a[i] != b[i]) return false;
  }
  return true;
};
SelectTable2.prototype._applySort = function (items, sortFlag) {
  var res = items.slice();
  if (sortFlag == 1 || sortFlag === true) {
    res.sort(function (a, b) {
      return this._stringcmp(this._getString(a), this._getString(b));
    }.bind(this));
  } else if (sortFlag == -1) {
    res.sort(function (a, b) {
      return -this._stringcmp(this._getString(a), this._getString(b));
    }.bind(this));
  } else if (typeof sortFlag == 'function') {
    res.sort(function (a, b) {
      return sortFlag(a, b);
    }.bind(this));
  }
  return res;
};
SelectTable2.prototype.requestSort = function () {
  if (!this.sorted || this.sorted == 0) return;
  var selectedItems = this.selectedItems;
  var selectedItemsNew = this._applySort(selectedItems, this.sorted);
  if (!this._equalArr(selectedItems, selectedItemsNew)) {
    this.selectedItems = selectedItemsNew;
  }
  var nonselectedItems = this.nonselectedItems;
  var nonselectedItemsNew = this._applySort(nonselectedItems, this.sorted);
  if (!this._equalArr(nonselectedItems, nonselectedItemsNew)) {
    this.nonselectedItems = nonselectedItemsNew;
  }
};
SelectTable2.eventHandler.searchTextInputModify = function (event) {
  var filterText = this.$searchTextInput.value.trim();
  if (filterText.length > 0) {
    var selectedItems = this.selectedItems;
    var nonselectedItems = this.nonselectedItems;
    this.selectedSearchItems = selectedItems;
    this.nonselectedSearchItems = this._filter(nonselectedItems, filterText);
    this.selectedSearchItems = this._filter(selectedItems, filterText);
  } else {}
  this.searching = filterText.length > 0;
};
SelectTable2.property = {};
SelectTable2.property.disableMoveAll = {
  set: function set(value) {
    if (value) this.addClass('disable-move-all');else this.removeClass('disable-move-all');
  },
  get: function get() {
    return this.hasClass('disable-move-all');
  }
};
SelectTable2.property.removeAllText = {
  set: function set(text) {
    this._removeAllText = text;
    //todo: update remove all text
    if (!text) this.$removeAllBtn.addStyle('display', 'none');else {
      this.$removeAllBtn.removeStyle('display');
      this.$removeAllBtn.innerHTML = this.removeAllText;
      this.updateButtonsContainerSize();
    }
  },
  get: function get() {
    return this._removeAllText || 'Remove All';
  }
};
SelectTable2.property.addAllText = {
  set: function set(text) {
    this._addAllText = text;
    if (!text) this.$addAllBtn.addStyle('display', 'none');else {
      this.$addAllBtn.removeStyle('display');
      this.$addAllBtn.innerHTML = this.removeAllText;
      this.updateButtonsContainerSize();
    }
  },
  get: function get() {
    return this._addAllText || 'Add All';
  }
};
SelectTable2.property.searching = {
  set: function set(value) {
    if (value) {
      this.addClass('searching');
    } else {
      this.removeClass('searching');
    }
    this.updateScroller();
  },
  get: function get() {
    return this.hasClass('searching');
  }
};
SelectTable2.property.sorted = {
  set: function set(value) {
    this._sort = value;
    this.requestSort();
  },
  get: function get() {
    return this._sort;
  }
};
SelectTable2.property.selectedItems = {
  set: function set(items) {
    this.$selectedItemsContainer.clearChild();
    var $nonselectedItemsContainer = this.$nonselectedItemsContainer;
    var $selectedItemsContainer = this.$selectedItemsContainer;
    var self = this;
    if (items instanceof Array) {
      items.map(function (item) {
        return _({
          tag: 'item',
          props: {
            data: item
          },
          on: {
            requestmove: function requestmove(event) {
              if (this.parentElement == $selectedItemsContainer) {
                this.addTo($nonselectedItemsContainer);
                self.emit('remove', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), self);
              } else {
                this.addTo($selectedItemsContainer);
                self.emit('add', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), self);
              }
              self.updateScroller();
              self.requestSort();
            }
          }
        }).addTo(this.$selectedItemsContainer);
      }.bind(this));
    } else {
      // error
    }
    this.updateScroller();
    this.requestSort();
  },
  get: function get() {
    return Array.prototype.map.call(this.$selectedItemsContainer.childNodes, function (e) {
      return e.data;
    });
  }
};
SelectTable2.property.nonselectedItems = {
  set: function set(items) {
    this.$nonselectedItemsContainer.clearChild();
    var $nonselectedItemsContainer = this.$nonselectedItemsContainer;
    var $selectedItemsContainer = this.$selectedItemsContainer;
    var self = this;
    if (items instanceof Array) {
      items.map(function (item) {
        return _({
          tag: 'item',
          props: {
            data: item
          },
          on: {
            requestmove: function requestmove(event) {
              if (this.parentElement == $selectedItemsContainer) {
                this.addTo($nonselectedItemsContainer);
                self.emit('remove', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), self);
              } else {
                this.addTo($selectedItemsContainer);
                self.emit('add', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), self);
              }
              self.updateScroller();
              self.requestSort();
            }
          }
        }).addTo(this.$nonselectedItemsContainer);
      }.bind(this));
    } else {
      // error
    }
    this.updateScroller();
    this.requestSort();
  },
  get: function get() {
    return Array.prototype.map.call(this.$nonselectedItemsContainer.childNodes, function (e) {
      return e.data;
    });
  }
};
SelectTable2.property.selectedSearchItems = {
  set: function set(items) {
    this.$selectedSearchItemsContainer.clearChild();
    var $nonselectedSearchItemsContainer = this.$nonselectedSearchItemsContainer;
    var $selectedSearchItemsContainer = this.$selectedSearchItemsContainer;
    var table = this;
    if (items instanceof Array) {
      items.map(function (item) {
        return _({
          tag: 'item',
          props: {
            data: item
          },
          on: {
            requestmove: function requestmove(event) {
              if (this.parentElement == $selectedSearchItemsContainer) {
                this.addTo($nonselectedSearchItemsContainer);
                table.getAllItemElement().filter(function (itemElement) {
                  if (itemElement.data == this.data) {
                    itemElement.addTo(table.$nonselectedItemsContainer);
                    return true;
                  }
                  return false;
                }.bind(this));
                table.emit('remove', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), table);
              } else {
                this.addTo($selectedSearchItemsContainer);
                table.getAllItemElement().filter(function (itemElement) {
                  if (itemElement.data == this.data) {
                    itemElement.addTo(table.$selectedItemsContainer);
                    return true;
                  }
                  return false;
                }.bind(this));
                table.emit('add', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), table);
              }
              table.updateScroller();
              table.requestSort();
            }
          }
        }).addTo(this.$selectedSearchItemsContainer);
      }.bind(this));
    } else {
      // error
    }
    this.updateScroller();
  },
  get: function get() {
    return Array.prototype.map.call(this.$selectedSearchItemsContainer.childNodes, function (e) {
      return e.data;
    });
  }
};
SelectTable2.property.nonselectedSearchItems = {
  set: function set(items) {
    this.$nonselectedSearchItemsContainer.clearChild();
    var $nonselectedSearchItemsContainer = this.$nonselectedSearchItemsContainer;
    var $selectedSearchItemsContainer = this.$selectedSearchItemsContainer;
    var table = this;
    if (items instanceof Array) {
      items.map(function (item) {
        return _({
          tag: 'item',
          props: {
            data: item
          },
          on: {
            requestmove: function requestmove(event) {
              if (this.parentElement == $selectedSearchItemsContainer) {
                this.addTo($nonselectedSearchItemsContainer);
                table.getAllItemElement().filter(function (itemElement) {
                  if (itemElement.data == this.data) {
                    itemElement.addTo(table.$nonselectedItemsContainer);
                    return true;
                  }
                  return false;
                }.bind(this));
                table.emit('remove', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), table);
              } else {
                this.addTo($selectedSearchItemsContainer);
                table.getAllItemElement().filter(function (itemElement) {
                  if (itemElement.data == this.data) {
                    itemElement.addTo(table.$selectedItemsContainer);
                    return true;
                  }
                  return false;
                }.bind(this));
                table.emit('add', _EventEmitter["default"].copyEvent(event, {
                  item: item
                }), table);
              }
              table.updateScroller();
              table.requestSort();
            }
          }
        }).addTo(this.$nonselectedSearchItemsContainer);
      }.bind(this));
    } else {
      // error
    }
    this.updateScroller();
  },
  get: function get() {
    return Array.prototype.map.call(this.$nonselectedSearchItemsContainer.childNodes, function (e) {
      return e.data;
    });
  }
};

/*
namespace of selecttable
*/
function Item() {
  var res = _({
    extendEvent: ['requestmove', 'clickadd', 'clickremove', 'clickexclude'],
    "class": 'absol-select-table-item',
    child: ['span.absol-select-table-item-text', {
      "class": 'absol-select-table-item-right-container',
      child: {
        "class": 'absol-select-table-item-right-container-table',
        child: {
          "class": 'absol-select-table-item-right-container-row',
          child: [{
            attr: {
              title: 'Add'
            },
            "class": ['absol-select-table-item-right-container-cell', 'add'],
            child: 'addicon'
          }, {
            attr: {
              title: 'Remove'
            },
            "class": ['absol-select-table-item-right-container-cell', 'remove'],
            child: 'subicon'
          }, {
            attr: {
              title: 'Exclude'
            },
            "class": ['absol-select-table-item-right-container-cell', 'exclude'],
            child: 'excludeico'
          }]
        }
      }
    }]
  });
  res.$text = $('span', res);
  res.eventHandler = _OOP["default"].bindFunctions(res, Item.eventHandler);
  res.$rightBtn = $('.absol-select-table-item-right-container', res);
  res.on('dblclick', res.eventHandler.dblclick);
  res.$addBtn = $('.absol-select-table-item-right-container-cell.add', res).on('click', res.eventHandler.addBtClick);
  res.$removeBtn = $('.absol-select-table-item-right-container-cell.remove', res).on('click', res.eventHandler.removeBtClick);
  res.$excludeBtn = $('.absol-select-table-item-right-container-cell.exclude', res).on('click', res.eventHandler.excludeBtClick);
  return res;
}
;
Item.eventHandler = {};
Item.eventHandler.dblclick = function (event) {
  event.preventDefault();
  if (!_EventEmitter["default"].hitElement(this.$rightBtn, event)) this.emit('requestmove', event, this);
};
Item.eventHandler.rightBtClick = function (event) {
  this.emit('requestmove', event, this);
};
Item.eventHandler.removeBtClick = function (event) {
  this.emit('clickremove', event, this);
};
Item.eventHandler.addBtClick = function (event) {
  this.emit('clickadd', event, this);
};
Item.eventHandler.excludeBtClick = function (event) {
  this.emit('clickexclude', event, this);
};
Item.property = {};
Item.property.data = {
  set: function set(value) {
    this._data = value;
    if (value) {
      var text;
      if (typeof value == "string") {
        text = value;
      } else {
        text = value.text;
      }
      this.$text.innerHTML = text;
    }
  },
  get: function get() {
    return this._data;
  }
};
Item.property.text = {
  get: function get() {
    return this._data ? typeof this._data == 'string' ? this._data : this._data.text : '';
  }
};
function ExcludeIco() {
  return _('<svg class="exclude-icon" width="24" height="24" viewBox="0 0 24 24">\
            <path  d="M8.27,3L3,8.27V15.73L8.27,21H15.73C17.5,19.24 21,15.73 21,15.73V8.27L15.73,3M9.1,5H14.9L19,9.1V14.9L14.9,19H9.1L5,14.9V9.1M11,15H13V17H11V15M11,7H13V13H11V7" />\
        </svg>');
}
privateDom.install({
  item: Item,
  excludeico: ExcludeIco
});

// not completed yet

_ACore["default"].install('selecttable2', SelectTable2);
var _default = SelectTable2;
exports["default"] = _default;

/***/ }),

/***/ 63443:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SelectListBox = _interopRequireDefault(__webpack_require__(47818));
var _treeListToList = _interopRequireDefault(__webpack_require__(22248));
var _ACore = _interopRequireDefault(__webpack_require__(34093));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var $$ = _ACore["default"].$$;

/***
 * @extends SelectListBox
 * @constructor
 */
function SelectTreeBox() {
  _SelectListBox["default"].call(this);
}
SelectTreeBox.tag = 'SelectTreeBox'.toLowerCase();
SelectTreeBox.render = function () {
  return _SelectListBox["default"].render().addClass('as-select-tree-box');
};
Object.assign(SelectTreeBox.prototype, _SelectListBox["default"].prototype);
SelectTreeBox.property = Object.assign({}, _SelectListBox["default"].property);
SelectTreeBox.eventHandler = Object.assign({}, _SelectListBox["default"].eventHandler);
SelectTreeBox.prototype._itemsToNodeList = function (items) {
  return (0, _treeListToList["default"])(items);
};
_ACore["default"].install(SelectTreeBox);
var _default = SelectTreeBox;
exports["default"] = _default;

/***/ }),

/***/ 79442:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _ExpTree = _interopRequireDefault(__webpack_require__(87326));
__webpack_require__(94817);
var _SelectListBox = _interopRequireDefault(__webpack_require__(47818));
var _search = _interopRequireWildcard(__webpack_require__(67858));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function isBranchStatus(status) {
  return status === 'open' || status === 'close';
}
function invertStatus(status) {
  return {
    open: 'close',
    close: 'open'
  }[status] || 'none';
}

/***
 * @extends Follower
 * @constructor
 */
function SelectTreeLeafBox() {
  this._initControl();
  this._searchCache = {};
  this._value = null;
  this._items = [];
  this.strictValue = true;
  this.$items = [];
  this.$itemByValue = {};
  this.$selectedItem = null;
  this.$dislayItems = this.$items;
  this.$dislayItemByValue = this.$itemByValue;
  this.$content = (0, _ACore.$)('.as-select-tree-leaf-box-content', this);
  this._savedStatus = {};
  this.estimateSize = {
    width: 0,
    height: 0
  };
  if (this.cancelWaiting) this.cancelWaiting();

  /**
   * @name items
   * @memberof MSelectTreeLeafBox#
   * @type {Array}
   */

  /**
   * @name value
   * @memberof MSelectTreeLeafBox#
   */

  /**
   * @name strictMode
   * @type {boolean}
   * @memberof MSelectTreeLeafBox#
   */

  /**
   * @name selectedItem
   * @memberof MSelectTreeLeafBox#
   */
}

SelectTreeLeafBox.tag = 'SelectTreeLeafBox'.toLowerCase();
SelectTreeLeafBox.render = function () {
  return (0, _ACore._)({
    tag: _Follower["default"],
    attr: {
      tabindex: 0
    },
    "class": ['as-select-tree-leaf-box', 'as-select-list-box'],
    extendEvent: ['pressitem'],
    child: [{
      "class": 'as-select-list-box-search-ctn',
      child: 'searchtextinput'
    }, {
      "class": ['as-bscroller', 'as-select-list-box-scroller', 'as-select-tree-leaf-box-content'],
      child: []
    }, 'attachhook.as-dom-signal'],
    props: {
      anchor: [1, 6, 2, 5]
    }
  });
};
SelectTreeLeafBox.prototype._initControl = function () {
  this.$searchInput = (0, _ACore.$)('searchtextinput', this).on('stoptyping', this.eventHandler.searchModify);
};
SelectTreeLeafBox.prototype.resetSearchState = function () {
  var value = this.$searchInput.value;
  if (value.length > 0) {
    this.$searchInput.value = '';
    if (value.trim().length) {
      this.$content.clearChild();
      this.$content.addChild(this.$items);
      this.$dislayItems = this.$items;
      this.$dislayItemByValue = this.$itemByValue;
      this._updateSelectedItem();
    }
  }
};
SelectTreeLeafBox.prototype._findFirstLeaf = function () {
  var found = false;
  function visit(item) {
    if (item.isLeaf) {
      found = item;
      return true;
    }
    if (item.items && item.items.length > 0) {
      item.items.some(visit);
    }
    return !!found;
  }
  this._items.some(visit);
  return found;
};
SelectTreeLeafBox.prototype._makeTree = function (item, dict, savedStatus) {
  var self = this;
  var status = 'none';
  var isLeaf = item.isLeaf;
  if (item.items && item.items.length > 0) {
    status = 'close';
  }
  if (isBranchStatus(status) && isBranchStatus(savedStatus[(0, _utils.keyStringOf)(item.value)])) {
    status = savedStatus[(0, _utils.keyStringOf)(item.value)];
  }
  var nodeElt = (0, _ACore._)({
    tag: _ExpTree["default"].tag,
    "class": 'as-select-tree-leaf-item',
    props: {
      name: item.text,
      desc: item.desc,
      icon: item.icon,
      status: status,
      itemData: item
    },
    on: {
      'statuschange': this.updatePosition.bind(this)
    }
  });
  if (item.noSelect) {
    nodeElt.addClass('as-no-select');
  }
  nodeElt.getNode().on({
    press: function press(event) {
      if (isBranchStatus(nodeElt.status)) {
        nodeElt.status = invertStatus(nodeElt.status);
        savedStatus[(0, _utils.keyStringOf)(item.value)] = nodeElt.status;
        self.updatePosition();
      } else if (isLeaf && !item.noSelect) {
        self.emit('pressitem', {
          item: item,
          target: self,
          itemElt: nodeElt,
          originalEvent: event
        }, self);
      }
    }
  });
  if (dict) {
    if (dict[(0, _utils.keyStringOf)(item.value)] && !this.warned) {
      this.warned = true;
      console.warn(this, 'has duplicated value, element will not work correctly!', item);
    }
    dict[(0, _utils.keyStringOf)(item.value)] = nodeElt;
  }
  if (item.isLeaf) {
    nodeElt.addClass('as-is-leaf');
  }
  if (item.items && item.items.length > 0) {
    item.items.forEach(function (item1) {
      nodeElt.addChild(self._makeTree(item1, dict, savedStatus));
    });
  }
  return nodeElt;
};
SelectTreeLeafBox.prototype._estimateItemWidth = function (item, level) {
  var width = 12; //padding
  width += 12 * level;
  width += 14.7 + 5; //toggle icon
  if (item.icon) width += 21; //icon
  width += 7 + (0, _utils.estimateWidth14)(item.text) + 5 + 7; //margin-text
  if (item.desc) width += 6 + (0, _utils.estimateWidth14)(item.desc) * 0.85;
  return width;
};
SelectTreeLeafBox.prototype.viewToSelected = function () {
  var selectedNode = this.$selectedItem;
  if (!selectedNode) return;
  selectedNode.scrollIntoView();
  var parent = selectedNode.getParent();
  while (parent && parent.getParent) {
    if (parent.status === 'close') {
      parent.getNode().emit('press');
    }
    parent = parent.getParent();
  }
};
SelectTreeLeafBox.prototype.viewToValue = function (value) {
  var viewNode = this.$itemByValue[(0, _utils.keyStringOf)(value)];
  if (!viewNode) return;
  viewNode.scrollIntoView();
  while (viewNode && viewNode.getParent) {
    if (viewNode.status === 'close') {
      viewNode.getNode().emit('press');
    }
    viewNode = viewNode.getParent();
  }
};
SelectTreeLeafBox.prototype._calcEstimateSize = function (items) {
  var self = this;
  var width = 0;
  var height = 0;
  function visit(item, level) {
    var itemWidth = self._estimateItemWidth(item, level);
    width = Math.max(width, itemWidth);
    height += 28;
    if (item.items && item.items.length) {
      item.items.forEach(function (item) {
        visit(item, level + 1);
      });
    }
  }
  items.forEach(function (item) {
    visit(item, 0);
  });
  return {
    width: width,
    height: height
  };
};
SelectTreeLeafBox.prototype._updateSelectedItem = function () {
  if (this.$selectedItem) {
    this.$selectedItem.removeClass('as-selected');
    this.$selectedItem = null;
  }
  this.$selectedItem = this.$dislayItemByValue[(0, _utils.keyStringOf)(this.value)];
  if (this.$selectedItem) {
    this.$selectedItem.addClass('as-selected');
  }
};
SelectTreeLeafBox.prototype.findItemByValue = function (value) {
  var holder = this.$itemByValue[(0, _utils.keyStringOf)(value)];
  if (holder) return holder.itemData;
  return null;
};
SelectTreeLeafBox.prototype.focus = _SelectListBox["default"].prototype.focus;
SelectTreeLeafBox.property = {};
SelectTreeLeafBox.eventHandler = {};
SelectTreeLeafBox.property.items = {
  /***
   * @this SelectTreeLeafBox
   * @param items
   */
  set: function set(items) {
    var self = this;
    this._savedStatus = {};
    this._searchCache = {};
    items = items || [];
    this._items = items;
    (0, _search.prepareSearchForList)(items);
    this.$content.clearChild();
    this.$itemByValue = {};
    this.$dislayItemByValue = this.$itemByValue;
    this.$items = items.map(function (item) {
      return self._makeTree(item, self.$itemByValue, self._savedStatus);
    });
    this.$dislayItems = this.$items;
    this.$content.addChild(this.$items);
    this.estimateSize = this._calcEstimateSize(items);
    this.addStyle('--select-list-estimate-width', this.estimateSize.width + 'px');
    this._updateSelectedItem();
    self.updatePosition();
  },
  get: function get() {
    return this._items;
  }
};
SelectTreeLeafBox.property.value = {
  set: function set(value) {
    this._value = value;
    this._updateSelectedItem();
  },
  get: function get() {
    var firstLeaf;
    if (!this.strictValue || this.$itemByValue[(0, _utils.keyStringOf)(this._value)]) {
      return this._value;
    } else {
      firstLeaf = this._findFirstLeaf();
      if (firstLeaf) return firstLeaf.value;else return this._value;
    }
  }
};
SelectTreeLeafBox.property.selectedItem = {
  get: function get() {
    var key = (0, _utils.keyStringOf)(this._value);
    var firstLeaf;
    if (this.$itemByValue[key]) {
      return this.$itemByValue[key].itemData;
    } else if (!this.strictValue) {
      return null;
    } else {
      firstLeaf = this._findFirstLeaf();
      if (firstLeaf) return firstLeaf;else return null;
    }
  }
};
SelectTreeLeafBox.property.enableSearch = _SelectListBox["default"].property.enableSearch;
SelectTreeLeafBox.prototype._search = function (query) {
  var self = this;
  var queryItem = (0, _search["default"])({
    text: query
  });
  var minScore = Infinity;
  var maxScore = -Infinity;
  function makeScoreTree(item) {
    var holder = {
      item: item,
      score: (0, _search.calcItemMatchScore)(queryItem, item),
      childrenScore: 0,
      children: []
    };
    minScore = Math.min(minScore, holder.score);
    maxScore = Math.max(maxScore, holder.score);
    var children;
    if (item.items && item.items.length > 0) {
      children = item.items.map(makeScoreTree);
      holder.children = children;
      holder.childrenScore = holder.children.reduce(function (ac, cr) {
        return Math.max(ac, cr.score, cr.childrenScore);
      }, 0);
    }
    return holder;
  }
  var treeScores = this._items.map(makeScoreTree);
  var midScore = (maxScore + minScore) / 2;
  var savedStatus = {};
  function filterTree(scoredTrees, ignore) {
    return scoredTrees.filter(function (holder) {
      return ignore || holder.score >= midScore || holder.childrenScore >= midScore;
    }).map(function makeTree(holder) {
      var item = Object.assign({}, holder.item);
      if (!ignore && holder.children && holder.children.length > 0) {
        if (holder.childrenScore >= midScore) {
          savedStatus[(0, _utils.keyStringOf)(item.value)] = 'open';
          item.items = filterTree(holder.children, false);
        } else {
          savedStatus[(0, _utils.keyStringOf)(item.value)] = 'close';
          item.items = filterTree(holder.children, true);
        }
      }
      return item;
    });
  }
  var resultItems = filterTree(treeScores, false);
  var dict = {};
  var $items = resultItems.map(function (item) {
    return self._makeTree(item, dict, savedStatus);
  });
  return {
    $items: $items,
    items: resultItems,
    savedStatus: Object.assign({}, savedStatus),
    originSavedStatus: savedStatus,
    dict: dict
  };
};

/***
 * @this SelectTreeLeafBox
 */
SelectTreeLeafBox.eventHandler.searchModify = function () {
  var query = this.$searchInput.value.trim();
  if (query.length === 0) {
    this.$content.clearChild().addChild(this.$items);
    this.$dislayItemByValue = this.$itemByValue;
    this.$dislayItems = this.$items;
    this._updateSelectedItem();
    this.updatePosition();
    return;
  }
  if (!this._searchCache[query]) {
    this._searchCache[query] = this._search(query);
  }
  var searchData = this._searchCache[query];
  searchData.savedStatus = Object.assign(searchData.savedStatus, searchData.originSavedStatus);
  console.log(searchData);
  for (var val in searchData.dict) {
    if (isBranchStatus(searchData.dict[val].status)) {
      if (searchData.savedStatus[val]) {
        searchData.dict[val].status = searchData.savedStatus[val];
      }
    }
  }
  this.$content.clearChild().addChild(searchData.$items);
  this.$dislayItemByValue = searchData.dict;
  this.$dislayItems = searchData.$items;
  this._updateSelectedItem();
  this.updatePosition();
};
_ACore["default"].install(SelectTreeLeafBox);
var _default = SelectTreeLeafBox;
exports["default"] = _default;

/***/ }),

/***/ 66138:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.STLBoxController = STLBoxController;
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _SelectTreeLeafBox = _interopRequireDefault(__webpack_require__(79442));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _EventEmitter = __webpack_require__(46833);
var _Dom = __webpack_require__(64821);
var _SelectMenu = _interopRequireDefault(__webpack_require__(41735));
var _utils = __webpack_require__(84512);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _MSelectTreeLeafBox = _interopRequireDefault(__webpack_require__(73484));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function SelectTreeLeafMenu() {
  var _this = this;
  this.$selectBox = (0, _ACore._)({
    tag: this.mobile ? _MSelectTreeLeafBox["default"] : _SelectTreeLeafBox["default"].tag,
    on: {
      pressitem: this.eventHandler.pressItem,
      preupdateposition: this.eventHandler.preUpdateListPosition,
      close: function close() {
        _this.isFocus = false;
      }
    }
  });
  this.$selectBox.sponsorElement = this;
  _OOP["default"].drillProperty(this, this.$selectBox, ['enableSearch', 'selectedItem']);
  this.$holderItem = (0, _ACore.$)('selectlistitem', this);
  // this.on('click', this.eventHandler.click.bind(this));
  this.boxCtrl = new STLBoxController(this);
  _OOP["default"].drillProperty(this, this.boxCtrl, 'isFocus');

  /**
   * @name items
   * @type {Array}
   * @memberof SelectTreeLeafMenu#
   */

  /**
   * @name value
   * @memberof SelectTreeLeafMenu#
   */

  /**
   * @name mobile
   * @type {boolean}
   * @memberof SelectTreeLeafMenu#
   */
  /**
   * @name disabled
   * @type {boolean}
   * @memberof SelectTreeLeafMenu#
   */
  /**
   * @name readOnly
   * @type {boolean}
   * @memberof SelectTreeLeafMenu#
   */
  /**
   * @name openValue
   * @memberof SelectTreeLeafMenu#
   * */
  /**
   * @name nullValue
   * @memberof SelectTreeLeafMenu#
   * */
}

SelectTreeLeafMenu.tag = 'SelectTreeLeafMenu'.toLowerCase();
SelectTreeLeafMenu.render = function () {
  var mobile = _BrowserDetector["default"].isMobile;
  return (0, _ACore._)({
    "class": ['absol-selectmenu', 'as-select-menu', 'as-select-tree-leaf-menu', 'as-strict-value'],
    extendEvent: ['change'],
    props: {
      mobile: mobile
    },
    attr: {
      tabindex: '1'
    },
    child: [{
      "class": 'absol-selectmenu-holder-item',
      child: 'selectlistitem'
    }, {
      tag: 'button',
      "class": 'absol-selectmenu-btn',
      child: ['dropdown-ico']
    }]
  });
};
SelectTreeLeafMenu.prototype.findItemByValue = function (value) {
  return this.$selectBox.findItemByValue(value);
};
SelectTreeLeafMenu.prototype.init = function (props) {
  props = props || {};
  Object.keys(props).forEach(function (key) {
    if (props[key] === undefined) delete props[key];
  });
  if (props.strictValue) {
    this.strictValue = props.strictValue;
    delete props.strictValue;
  }
  var hasValue = ('value' in props);
  var value = props.value;
  delete props.value;
  this["super"](props);
  if (hasValue) this.value = value;
};
SelectTreeLeafMenu.property = {};
SelectTreeLeafMenu.property.items = {
  set: function set(items) {
    items = (0, _utils.copySelectionItemArray)(items || [], {
      removeNoView: true
    });
    this.$selectBox.items = items;
    if (!this.mobile) this.addStyle('--select-list-estimate-width', this.$selectBox.estimateSize.width + 'px');
    var selectedItem = this.$selectBox.selectedItem;
    if (selectedItem) {
      this.$holderItem.data = selectedItem;
      if (this.mobile) {
        this.addStyle('--select-list-estimate-width', this.$selectBox._estimateItemWidth(selectedItem, 0) + 'px');
      }
    } else {
      this.$holderItem.data = {
        text: ''
      };
    }
  },
  get: function get() {
    return this.$selectBox.items;
  }
};
SelectTreeLeafMenu.property.value = {
  set: function set(value) {
    this.$selectBox.value = value;
    var selectedItem = this.$selectBox.selectedItem;
    if (selectedItem) {
      this.$holderItem.data = selectedItem;
      if (this.mobile) {
        this.addStyle('--select-list-estimate-width', this.$selectBox._estimateItemWidth(selectedItem, 0) + 'px');
      }
    } else {
      this.$holderItem.data = {
        text: ''
      };
    }
  },
  get: function get() {
    return this.$selectBox.value;
  }
};
SelectTreeLeafMenu.property.strictValue = {
  set: function set(value) {
    this.$selectBox.strictValue = !!value;
    if (value) this.addClass('as-strict-value');else this.removeClass('as-strict-value');
  },
  get: function get() {
    return this.hasClass('as-strict-value');
  }
};
SelectTreeLeafMenu.property.disabled = _SelectMenu["default"].property.disabled;
SelectTreeLeafMenu.eventHandler = {};
SelectTreeLeafMenu.eventHandler.clickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$selectBox, event)) return;
  this.isFocus = false;
};
SelectTreeLeafMenu.eventHandler.click = function (event) {
  if (!this.disabled) this.isFocus = true;
};
SelectTreeLeafMenu.eventHandler.pressItem = function (event) {
  this.$selectBox.value = event.item.value;
  this.$holderItem.data = event.item;
  var prevValue = this._value;
  this._value = event.item.value;
  this.isFocus = false;
  if (prevValue !== this._value) {
    this.emit('change', {
      item: event,
      type: 'change',
      target: this,
      originalEvent: event.originalEvent || event.originalEvent || event
    }, this);
  }
};
SelectTreeLeafMenu.eventHandler.preUpdateListPosition = function () {
  var bound = this.getBoundingClientRect();
  var screenSize = (0, _Dom.getScreenSize)();
  var availableTop = bound.top - 5;
  var availableBot = screenSize.height - 5 - bound.bottom;
  this.$selectBox.addStyle('--max-height', Math.max(availableBot, availableTop) + 'px');
  var outBound = (0, _Dom.traceOutBoundingClientRect)(this);
  if (bound.bottom < outBound.top || bound.top > outBound.bottom || bound.right < outBound.left || bound.left > outBound.right) {
    this.isFocus = false;
  }
};
_ACore["default"].install(SelectTreeLeafMenu);
var _default = SelectTreeLeafMenu;
/**
 *
 * @param {SelectTreeLeafMenu} elt
 * @constructor
 */
exports["default"] = _default;
function STLBoxController(elt) {
  this.elt = elt;
  this.ev_click = this.ev_click.bind(this);
  this.ev_clickOut = this.ev_clickOut.bind(this);
  this.elt.on('click', this.ev_click);
}
Object.defineProperty(STLBoxController.prototype, 'isFocus', {
  set: function set(value) {
    var _this2 = this;
    value = !!value;
    if (this.elt.hasClass('as-focus') === value) return;
    if (value && (this.elt.disabled || this.elt.readOnly)) return;
    var bound;
    if (value) {
      this.elt.$selectBox.addTo(document.body);
      this.elt.addClass('as-focus');
      this.elt.$selectBox.addStyle('visible', 'hidden');
      this.elt.off('click', this.ev_click);
      if (this.elt.mobile) {} else {
        bound = this.elt.getBoundingClientRect();
        this.elt.$selectBox.addStyle('min-width', bound.width + 'px');
        this.elt.$selectBox.followTarget = this.elt;
        this.elt.$selectBox.updatePosition();
      }
      setTimeout(function () {
        document.addEventListener('mousedown', this.ev_clickOut);
        this.elt.$selectBox.removeStyle('visibility');
        this.elt.$selectBox.focus();
      }.bind(this), 5);
      if (this.elt.$selectBox.viewToValue && (0, _utils.keyStringOf)(this.elt.nullValue) === (0, _utils.keyStringOf)(this.elt.$selectBox.value)) {
        this.elt.$selectBox.viewToValue(this.elt.openValue);
      } else this.elt.$selectBox.viewToSelected();
    } else {
      this.elt.removeClass('as-focus');
      this.elt.$selectBox.remove();
      document.removeEventListener('mousedown', this.ev_clickOut);
      if (this.elt.mobile) {} else {
        this.elt.$selectBox.followTarget = null;
      }
      setTimeout(function () {
        _this2.elt.on('click', _this2.ev_click);
      }, 100);
      this.elt.$selectBox.resetSearchState();
    }
  },
  get: function get() {
    return this.elt.hasClass('as-focus');
  }
});
STLBoxController.prototype.ev_click = function (event) {
  if (!this.elt.disabled && !this.elt.readOnly) this.isFocus = true;
};
STLBoxController.prototype.ev_clickOut = function (event) {
  if (!(0, _EventEmitter.hitElement)(this.elt.$selectBox, event) || event.target.attr && event.target.attr('class') && event.target.attr('class').indexOf('modal') >= 0) {
    this.isFocus = false;
  }
};

/***/ }),

/***/ 75823:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(65997);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SelectMenu = _interopRequireDefault(__webpack_require__(41735));
var _SelectTreeBox = _interopRequireDefault(__webpack_require__(63443));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends SelectMenu
 * @constructor
 */
function SelectTreeMenu() {
  this._items = [];
  this._value = null;
  this._lastValue = null;
  this.$holderItem = $('.absol-selectmenu-holder-item', this);
  this.$viewItem = $('.absol-selectmenu-holder-item selectlistitem', this);
  /***
   *
   * @type {SelectTreeBox}
   */
  this.$selectlistBox = _({
    tag: 'selecttreebox',
    props: {
      anchor: [1, 6, 2, 5]
    },
    on: {
      preupdateposition: this.eventHandler.preUpdateListPosition
    }
  });
  this.$selectlistBox.on('pressitem', this.eventHandler.selectListBoxPressItem);
  this.$selectlistBox.followTarget = this;
  this.$selectlistBox.sponsorElement = this;
  _OOP["default"].drillProperty(this, this.$selectlistBox, 'enableSearch');
  this._lastValue = "NOTHING_VALUE";
  this._isFocus = false;
  this.isFocus = false;
  this.on('mousedown', this.eventHandler.click, true);
}
SelectTreeMenu.tag = 'SelectTreeMenu'.toLowerCase();
SelectTreeMenu.render = function () {
  return _SelectMenu["default"].render().addClass('as-select-tree-menu');
};
SelectTreeMenu.eventHandler = Object.assign({}, _SelectMenu["default"].eventHandler);
SelectTreeMenu.property = Object.assign({}, _SelectMenu["default"].property);
Object.assign(SelectTreeMenu.prototype, _SelectMenu["default"].prototype);
_ACore["default"].install(SelectTreeMenu);
var _default = SelectTreeMenu;
exports["default"] = _default;

/***/ }),

/***/ 52404:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(25289);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var warned = false;

/***
 * @extends TabFrame
 * @constructor
 */
function SinglePage() {
  var thisSP = this;
  this._updateIntv = -1;
  this._tick = function () {
    if (this.isDescendantOf(document.body)) {
      if (this.$header) {
        var headerHeight = this.$header.getBoundingClientRect().height;
        if (this._prevHeaderHeight !== headerHeight) {
          _ResizeSystem["default"].update();
        }
      }
    } else {
      clearInterval(this._updateIntv);
      this._updateIntv = -1;
    }
  }.bind(this);
  this.$attachhook = $('attachhook', this).on('attached', function () {
    this.updateSize();
    setTimeout(this.updateSize, 20);
    _Dom["default"].addToResizeSystem(this);
    if (thisSP._updateIntv < 0) {
      thisSP._updateIntv = setInterval(thisSP._tick, 200);
    }
  });
  this.$attachhook.updateSize = this.updateSize.bind(this);
  this.$header = null;
  this.$footer = null;
  this.$viewport = $('.absol-single-page-scroller-viewport', this);
  this.$scroller = $('.absol-single-page-scroller', this);
}
SinglePage.tag = 'SinglePage'.toLowerCase();
SinglePage.render = function () {
  return _({
    tag: 'tabframe',
    extendEvent: ['sizechange'],
    "class": 'absol-single-page',
    child: [{
      "class": 'absol-single-page-scroller',
      child: {
        "class": 'absol-single-page-scroller-viewport'
      }
    }, 'attachhook']
  });
};
SinglePage.prototype.updateSize = function () {
  if (!this.isDescendantOf(document.body)) return;
  var paddingTop = parseFloat(this.getComputedStyleValue('padding-top').replace('px', '')) || 0;
  if (this.$header) {
    var headerBound = this.$header.getBoundingClientRect();
    this._prevHeaderHeight = headerBound.height;
  }
  if (this.$footer) {
    var footerBound = this.$footer.getBoundingClientRect();
    this.$viewport.addStyle('padding-bottom', footerBound.height + 'px');
  }
  this.addStyle('--single-page-scroller-height', this.$scroller.clientHeight + 'px');
  if (this.isSupportedEvent('sizechange')) this.emit('sizechange', {
    type: 'sizechange',
    target: this
  }, this);
};
SinglePage.prototype.isHeader = function (elt) {
  return elt && elt.classList && elt.classList.contains('absol-single-page-header');
};
SinglePage.prototype.updateLayoutStyle = function () {
  if (this.$header) {
    this.addClass('as-has-header');
  } else {
    this.removeClass('as-has-header');
  }
};
SinglePage.prototype.addChild = function (elt) {
  if (this.isHeader(elt)) {
    if (this.$header) {
      this.$header.remove();
    }
    if (this.firstChild) {
      this.addChildBefore(elt, this.firstChild);
    } else {
      this.appendChild(elt);
    }
    this.$header = $(elt);
    this.updateLayoutStyle();
    this.updateSize();
  } else if (elt.classList.contains('absol-single-page-footer')) {
    this.$viewport.addChild(elt);
    this.$footer = $(elt);
    this.updateLayoutStyle();
    this.updateSize();
  } else {
    this.$viewport.addChild(elt);
  }
};
SinglePage.prototype.removeChild = function (elt) {
  if (elt == this.$footer) {
    this.$viewport.removeChild(elt);
    this.$footer = undefined;
    this.updateSize();
  } else if (elt == this.$header) {
    this["super"](elt);
    this.$header = undefined;
    this.updateSize();
  } else {
    this.$viewport.removeChild(elt);
  }
};
_ACore["default"].install(SinglePage);
var _default = SinglePage;
exports["default"] = _default;

/***/ }),

/***/ 96206:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(77058);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _Dom = __webpack_require__(64821);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var t = document.createElement;

/***
 * @extends AElement
 * @constructor
 */
function SnackBar() {
  // OOP.drillProperty(this, this.firstChild, 'message', 'data');
  /***
   *
   * @type {*}
   */
  this._message = null;
  this.message = null;
}
SnackBar.tag = 'SnackBar'.toLowerCase();
SnackBar.render = function () {
  return _({
    "class": 'as-snackbar'
  });
};
SnackBar.property = {};
SnackBar.property.message = {
  set: function set(value) {
    this._message = value;
    if (value instanceof Array) {
      this.clearChild();
      this.addChild(value.map(function (item) {
        return _(item);
      }));
    } else if (typeof value === 'string') {
      this.innerHTML = value;
    } else if ((0, _Dom.isDomNode)(value)) {
      this.clearChild().addChild(value);
    } else if (value && _typeof(value) === 'object' && (value.text || value.props || value.tag || value.attr || value.style || value.child || value.child && value.child instanceof Array)) {
      this.clearChild().addChild(_(value));
    } else {
      this.clearChild();
      this._message = null;
    }
  },
  get: function get() {
    return this._message;
  }
};
_ACore["default"].install(SnackBar);
SnackBar.$instance = _('snackbar');
SnackBar._removeTimeout = -1;
SnackBar.show = function (message) {
  if (SnackBar._removeTimeout > 0) {
    clearTimeout(SnackBar._removeTimeout);
  }
  if (!SnackBar.$instance.parentElement) document.body.appendChild(SnackBar.$instance);
  SnackBar.$instance.removeClass('as-hiding');
  SnackBar._removeTimeout = setTimeout(function () {
    SnackBar.$instance.addClass('as-show');
    SnackBar.$instance.message = message;
    SnackBar._removeTimeout = setTimeout(function () {
      SnackBar.$instance.removeClass('as-show').addClass('as-hiding');
      SnackBar._removeTimeout = setTimeout(function () {
        SnackBar.$instance.remove();
        SnackBar._removeTimeout = -1;
        SnackBar.$instance.removeClass('as-hiding');
      }, 500);
    }, 3000);
  }, 1);
};
var _default = SnackBar;
exports["default"] = _default;

/***/ }),

/***/ 96229:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(27439);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _utils = __webpack_require__(84512);
var _Text = __webpack_require__(35844);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function SpanInput() {
  this.defineEvent(['change']);
  this._inputType = 0;
  this._lastValue = null;
  this.on('paste', this.eventHandler.paste).on('keyup', this.eventHandler.keyup).on('keydown', this.eventHandler.keydown).on('blur', this.eventHandler.blur);
}
SpanInput.prototype.notifyValueChange = function (event) {
  var cValue = this.value;
  if (this._lastValue != cValue && (this._inputType != 1 || !isNaN(this._lastValue) || !isNaN(cValue))) {
    this._lastValue = cValue;
    this.emit('change', {
      type: 'change',
      value: cValue,
      originEvent: event
    }, this);
  }
};
SpanInput.eventHandler = {};
SpanInput.eventHandler.keyup = function (event) {
  if (this._inputType == 0) {
    this.notifyValueChange(event);
  } else if (this._inputType == 1) {
    this.eventHandler.numberKeyup(event);
  }
};
SpanInput.eventHandler.keydown = function (event) {
  if (this._inputType == 0) {} else if (this._inputType == 1) {
    this.eventHandler.numberKeydown(event);
  }
};
SpanInput.eventHandler.numberBlur = function (value) {
  this.notifyValueChange(event);
};
SpanInput.eventHandler.textBlur = function (event) {
  this.notifyValueChange(event);
};
SpanInput.eventHandler.blur = function (event) {
  if (this._inputType == 0) {
    this.eventHandler.textBlur(event);
  } else if (this._inputType == 1) {
    this.eventHandler.numberKeydown(event);
  }
};
SpanInput.eventHandler.numberKeyup = function (event) {
  this.notifyValueChange();
};
SpanInput.eventHandler.numberKeydown = function (event) {
  var key = event.key;
  if (key == 'Enter') {
    event.preventDefault();
    this.blur();
    this.notifyValueChange();
    return;
  }
  if (key && key.length == 1 && !event.ctrlKey && !event.altKey) {
    if (key.match(/[0-9.\-\+]/)) {
      if (key == '.' && this.text.indexOf('.') >= 0) event.preventDefault();
      if ((key == '+' || key == '-') && (this.text.indexOf('+') >= 0 || this.text.indexOf('-') >= 0 || getCaretPosition(this) > 0)) event.preventDefault();
    } else event.preventDefault();
  }
};
SpanInput.eventHandler.paste = function (event) {
  event.preventDefault();
  if (event.clipboardData && event.clipboardData.getData) {
    var text = event.clipboardData.getData("text/plain");
    if (this._inputType == 1) text = text.replace(/[^0-9.\-+]/g, '');
    document.execCommand("insertHTML", false, text);
    if (this._inputType == 1) {
      if (isNaN(this.value)) {
        this.value = NaN;
      }
    }
  } else if (window.clipboardData && window.clipboardData.getData) {
    var text = window.clipboardData.getData("Text");
    if (this._inputType == 1) text = text.replace(/[^0-9.\-+]/g, '');
    (0, _utils.insertTextAtCursor)(text);
    if (this._inputType == 1) {
      if (isNaN(this.value)) {
        this.value = NaN;
      }
    }
  }
};
SpanInput.property = {};
SpanInput.property.value = {
  set: function set(value) {
    if (this._inputType == 1 && isNaN(value)) value = null;
    this.clearChild();
    if (value !== null) this.addChild(_({
      text: value + ''
    }));
  },
  get: function get() {
    if (this._inputType == 1) {
      return parseFloat(this.text);
    } else {
      return this.text;
    }
  }
};
SpanInput.property.type = {
  set: function set(value) {
    var index = ['text', 'number'].indexOf(value);
    if (index < 0) index = 0;
    this._inputType = index;
    if (index == 1) {
      this.addClass('absol-span-input-empty-minus');
    } else {
      this.removeClass('absol-span-input-empty-minus');
    }
  },
  get: function get() {
    return ['text', 'number'][this._inputType];
  }
};
SpanInput.property.text = {
  get: function get() {
    return (0, _Text.getTextIn)(this);
  }
};
SpanInput.tag = 'spaninput';
SpanInput.render = function () {
  return _('span.absol-span-input[contenteditable="true"]');
};
_ACore["default"].install(SpanInput);
var _default = SpanInput;
exports["default"] = _default;

/***/ }),

/***/ 29464:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.STOP = exports.STATE_TO_STRING = exports.START = exports.RUNNING = exports.READY = exports.PAUSE = exports.NOT_READY = exports.ERROR = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var NOT_READY = 0;
exports.NOT_READY = NOT_READY;
var READY = 1;
exports.READY = READY;
var START = 2;
exports.START = START;
var RUNNING = 3;
exports.RUNNING = RUNNING;
var PAUSE = 4;
exports.PAUSE = PAUSE;
var STOP = 5;
exports.STOP = STOP;
var ERROR = 6;
exports.ERROR = ERROR;
var STATE_TO_STRING = ['NOT_READY', 'READY', 'START', 'RUNNING', 'PAUSE', 'STOP', 'ERROR'];

/**
 * @augments AElement
 * @augments HTMLCanvasElement
 * @constructor
 */
exports.STATE_TO_STRING = STATE_TO_STRING;
function Sprite() {
  this.loadTextureTimeout = 5000;
  this._textureLoaded = false;
  this._state = NOT_READY;
  this.defineEvent(['ready', 'srcerror', 'play', 'resume', 'pause', 'stop', 'reset', 'end', 'frame']);
  this._length = 60;
  this._lastDrawFrame = -1;
  this._frameIndex = 0;
  this._timeout = -1;
  this.ctx = this.getContext('2d');
  this._fps = 10;
  this._lastDrawMilis = 0;
  this._overTime = 0;
  this.draw = this.draw.bind(this);
  this.texture = null;
  this._frames = {
    type: 'grid',
    col: 1,
    row: 1
  };
  this._loop = false;
}
Sprite.cache = {};
Sprite.prototype.draw = function () {
  //todo
  var now = new Date().getTime();
  var dt = this._overTime + now - this._lastDrawMilis;
  var di = Math.floor(dt / 1000 * this._fps);
  var frameIndex = this._frameIndex + di;
  if (this._loop) {
    frameIndex = frameIndex % this._length;
  } else {
    frameIndex = Math.min(this._length - 1, frameIndex);
  }
  if (!isNaN(this._frameIndex) && frameIndex != this._frameIndex) {
    this.drawFrame(this._frameIndex);
  }
  this._overTime = dt - di * 1000 / this._fps;
  var nextTime = now + 1000 / this._fps - this._overTime - new Date().getTime();
  this._lastDrawMilis = now;
  this._frameIndex = frameIndex;
  this._timeout = -1;
  if (this._loop || frameIndex + 1 < this._length) {
    if (this._state == RUNNING) this._timeout = setTimeout(this.draw, nextTime);
  } else this.stop();
};
Sprite.prototype.drawFrame = function (index) {
  if (this._lastDrawFrame == index) return;
  this._lastDrawFrame = index;
  this.ctx.clearRect(0, 0, this.width, this.height);
  if (this._frames.type == 'grid') {
    var imgWidth = this.texture.naturalWidth;
    var imgHeight = this.texture.naturalHeight;
    var sHeight = imgHeight / this._frames.row;
    var sWidth = imgWidth / this._frames.col;
    var sx = index % this._frames.col * sWidth;
    var sy = Math.floor(index / this._frames.col) * sHeight;
    this.ctx.drawImage(this.texture, sx, sy, sWidth, sHeight, 0, 0, this.width, this.height);
  } else {}
  this.emit('frame', {
    name: 'frame',
    target: this,
    frameIndex: index
  }, this);
};
Sprite.prototype.stop = function () {
  this.pause();
  if (this._state != PAUSE) return this;
  this._state = STOP;
  this.emit('stop', {
    name: 'stop',
    target: this
  }, this);
  return this;
};
Sprite.prototype.pause = function () {
  if (this._state != RUNNING) return this;
  this._state = PAUSE;
  if (this._timeout > 0) {
    clearTimeout(this._timeout);
    this._timeout = -1;
  }
  var now = new Date().getTime();
  this._overTime += now - this._lastDrawMilis;
  this.emit('pause', {
    name: 'pause',
    target: this
  }, this);
};
Sprite.prototype.resume = function () {
  if (this._state != START && this._state != PAUSE) return this;
  if (this._state == RUNNING) return this;
  this._state = RUNNING;
  var now = new Date().getTime();
  this._lastDrawMilis = now;
  this.draw();
  this.emit('resume', {
    name: 'pause',
    target: this
  }, this);
};
Sprite.prototype.reset = function () {
  this._frameIndex = 0;
  this._overTime = 0;
};
Sprite.prototype.play = function () {
  if (this._state == ERROR) return this;
  if (this._state == RUNNING) return this;
  if (this._state == READY || this._state == STOP) {
    this.reset();
  }
  this._state = START;
  this.emit('play', {
    name: 'start',
    target: this
  }, this);
  this.resume();
  return this;
};
Sprite.prototype.afterReady = function () {
  var thisSprite = this;
  if (this._state != NOT_READY && this._state != ERROR) return Promise.resolve();else return new Promise(function (rs, rj) {
    thisSprite.once('ready', rs);
    thisSprite.once('srcerror', rj);
  });
};
Sprite.tag = 'sprite';
Sprite.render = function () {
  return _('canvas.as-sprite');
};
Sprite.property = {};
Sprite.property.frames = {
  set: function set(value) {
    this.stop();
    this._lastDrawFrame = -1;
    if (value && value.type == 'grid') {
      this._length = value.col * value.row;
    }
    this._frames = value;
    if (this._textureLoaded && this._frames && this._state == NOT_READY) {
      //todo: verify frame
      this._state = READY;
      this.emit('ready', {
        target: this,
        name: 'ready'
      }, this);
    }
  },
  get: function get() {
    return this._frames;
  }
};
Sprite.property.frameIndex = {
  set: function set(value) {
    value = value || 0;
    if (value < 0) value = this._length - 1;
    if (this._loop) {
      this._frameIndex = value % this._length;
      this._overTime = 0;
    } else {
      this._frameIndex = Math.max(this._length - 1, value);
      this._overTime = 0;
    }
    this.drawFrame(this._frameIndex);
  },
  get: function get() {
    return this._frameIndex;
  }
};
Sprite.property.src = {
  set: function set(value) {
    this.stop();
    this._lastDrawFrame = -1; //did not draw any thing 
    value = value || [];
    var lastSrc = this._src;
    this._src = value || null;
    if (lastSrc == this._src) return;
    if (!value) this.texture = null;else {
      var cImage;
      if (!Sprite.cache[this._src]) {
        cImage = new Image();
        Sprite.cache[this._src] = cImage;
        cImage.src = this._src;
      } else {
        cImage = Sprite.cache[this._src];
      }
      this.texture = cImage;
      this._state = NOT_READY;
      var thisSprite = this;
      this._textureLoaded = false;
      _Dom["default"].waitImageLoaded(this.texture, this.loadTextureTimeout).then(function (rs) {
        if (thisSprite.texture == cImage) {
          thisSprite._textureLoaded = true;
          if (thisSprite._frames) {
            thisSprite._lastDrawFrame = -1;
            thisSprite._state = READY;
            thisSprite.emit('ready', {
              target: thisSprite,
              name: 'ready'
            }, thisSprite);
          }
        }
      }, function () {
        if (thisSprite.texture == cImage) {
          thisSprite._state = ERROR;
          thisSprite.emit('srcerror', {
            target: thisSprite,
            name: 'srcerror'
          }, thisSprite);
        }
      });
    }
  },
  get: function get() {
    return this._src;
  }
};
Sprite.property.state = {
  get: function get() {
    return STATE_TO_STRING[this._state];
  }
};
Sprite.property.length = {
  get: function get() {
    return this._length;
  }
};
Sprite.property.fps = {
  set: function set(value) {
    value = Math.max(value || 0, 0);
    this._fps = value;
    if (this._state == RUNNING) {
      clearTimeout(this._timeout);
      this._timeout = -1;
      var now = new Date().getTime();
      this._overTime += now - this._lastDrawMilis;
      this._overTime = Math.min(1000 / this._fps, this._overTime);
      this.draw();
    }
  },
  get: function get() {
    return this._fps;
  }
};
Sprite.property.loop = {
  set: function set(value) {
    value = !!value;
    this._loop = value;
  },
  get: function get() {
    return this._loop;
  }
};
_ACore["default"].install(Sprite);
var _default = Sprite;
exports["default"] = _default;

/***/ }),

/***/ 41322:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(14378);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _stringGenerate = __webpack_require__(10713);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var $ = _ACore["default"].$;
var _ = _ACore["default"]._;
function StaticTabbar() {
  var thisST = this;
  this.$activeBox = $('.absol-static-tabbar-active-box', this);
  this.$hline = $('.absol-static-tabbar-hline', this);
  this.$buttons = [];
  this._btDict = {};
  this._activedButton = undefined;
  this.sync = new Promise(function (resolve) {
    _('attachhook').on('error', function () {
      this.remove();
      resolve();
    }).addTo(thisST);
  });
  return this;
}
StaticTabbar.tag = 'StaticTabbar'.toLowerCase();
StaticTabbar.render = function () {
  return _({
    "class": 'absol-static-tabbar',
    extendEvent: 'change',
    child: [{
      "class": 'absol-static-tabbar-active-box',
      child: '.absol-static-tabbar-hline'
    }]
  });
};
StaticTabbar.prototype.fireChange = function (data) {
  this.emit('change', {
    target: this,
    data: data,
    value: this.value
  }, self);
};
StaticTabbar.property = {};
StaticTabbar.property.items = {
  set: function set(value) {
    this.$buttons.forEach(function (e) {
      e.remove();
    });
    this._items = value;
    var self = this;
    this.$buttons = this.items.map(function (tab) {
      var ident = tab.value || (0, _stringGenerate.randomIdent)();
      var button = _({
        tag: 'button',
        "class": 'absol-static-tabbar-button',
        id: 'tab-' + ident,
        child: {
          tag: 'span',
          child: {
            text: tab.text
          }
        },
        on: {
          click: function click(event) {
            if (self.value != tab.value) {
              self.value = ident;
              self.fireChange(tab);
            }
          }
        }
      }).addTo(self);
      self._btDict[ident] = button;
      return button;
    });
    if (this.value !== undefined) {
      this.sync.then(this.activeTab.bind(this, this.value));
    }
  },
  get: function get() {
    return this._items || [];
  }
};
StaticTabbar.property.value = {
  set: function set(value) {
    this._value = value;
    if (this.$buttons.length > 0) {
      this.sync.then(this.activeTab.bind(this, value));
    }
  },
  get: function get() {
    return this._value;
  }
};
StaticTabbar.prototype.activeTab = function (ident) {
  if (this._activedButton) this._activedButton.removeClass('active');
  var button = this._btDict[ident];
  this._activedButton = button;
  if (button) {
    button.addClass('active');
    var bound = this.getBoundingClientRect();
    var buttonBound = button.getBoundingClientRect();
    var dx = buttonBound.left - bound.left;
    var fontSize = this.getFontSize();
    this.$activeBox.addStyle({
      left: dx / fontSize + 'em',
      width: buttonBound.width / fontSize + 'em'
    });
  } else {
    this.$activeBox.addStyle({
      left: '0',
      width: '0'
    });
  }
};
_ACore["default"].install('statictabbar', StaticTabbar);
var _default = StaticTabbar;
exports["default"] = _default;

/***/ }),

/***/ 4587:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(78434);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function Switch() {
  var thisS = this;
  this.$input = $('input', this);
  this.$input.on('click', function (event) {
    thisS.emit('change', event, thisS);
  });
  _OOP["default"].drillProperty(this, this.$input, 'checked');
  _OOP["default"].drillProperty(this, this.$input, 'isOn', 'checked');
  this.on('click', function (event) {
    if (this.readOnly) event.preventDefault();
  }, true);
}
Switch.tag = 'switch';
Switch.render = function () {
  return _({
    tag: 'label',
    "class": 'absol-switch',
    extendEvent: 'change',
    child: ['input[type="checkbox"]', 'span.absol-switch-slider']
  });
};
Switch.attribute = {
  checked: {
    set: function set(value) {
      if (value == 'false' || value == null) {
        this.checked = false;
      } else {
        this.checked = true;
      }
    },
    get: function get() {
      return this.checked ? 'true' : 'false';
    },
    remove: function remove() {
      this.checked = false;
    }
  },
  disabled: {
    set: function set(value) {
      if (value == 'false' || value == null) {
        this.disabled = false;
      } else {
        this.disabled = true;
      }
    },
    get: function get() {
      return this.disabled ? 'true' : 'false';
    },
    remove: function remove() {
      this.disabled = false;
    }
  }
};
Switch.property = {
  disabled: {
    set: function set(value) {
      this.$input.disabled = !!value;
      if (value) {
        this.addClass('disabled');
      } else {
        this.removeClass('disabled');
      }
    },
    get: function get() {
      return this.$input.disabled;
    }
  },
  readOnly: _CheckBoxInput["default"].property.readOnly
};
_ACore["default"].install('switch', Switch);
var _default = Switch;
exports["default"] = _default;

/***/ }),

/***/ 64836:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(61812);
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _utils = __webpack_require__(84512);
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function TOCItem() {
  this.$iconP = null;
  this.$iconCtn = (0, _ACore.$)('.as-toc-item-ext-icon-ctn', this);
  this._status = 'none';
  this.$name = (0, _ACore.$)('.as-toc-item-name', this);
  this.$nameInput = (0, _ACore.$)('.as-toc-item-name-input', this).on('keydown', this.eventHandler.keyDownNameInput).on('paste', this.eventHandler.keyDownNameInput);
  this.$toggleCtn = (0, _ACore.$)('.as-toc-item-toggle-ico-ctn', this);
  this._level = 0;
  this.$checkbox = (0, _ACore.$)(_CheckBoxInput["default"].tag, this).on('change', this.eventHandler.checkedChange);
  this.$checkbox.disabled = true;
  this.$checkbox.addStyle('display', 'none');
  this.$checkIco = (0, _ACore.$)('.as-toc-item-check-ctn .mdi-check', this).addStyle('display', 'none').addStyle('font-size', '18px');
  this.$quickMenuBtn = (0, _ACore.$)('.as-toc-item-quick-menu-ctn button', this).on('click', this.eventHandler.clickQuickMenuBtn);
  this.on('click', this.eventHandler.click);
  this._lastClickTime = 0;
  /***
   * @name hasQuickMenu
   * @type {boolean}
   * @memberOf TOCItem#
   */ /***
      * @name name
      * @type {string}
      * @memberOf TOCItem#
      */

  /***
   * @name status
   * @type {"none"|"open"|"close"}
   * @memberOf TOCItem#
   */

  /***
   * @name level
   * @type {number}
   * @memberOf TOCItem#
   */
  /***
   * @name checked
   * @type {boolean}
   * @memberOf TOCItem#
   */
  /***
   * @name nodeData
   * @type {{}}
   * @memberOf TOCItem#
   */
}

TOCItem.tag = 'TOCItem'.toLowerCase();
TOCItem.render = function () {
  return (0, _ACore._)({
    "class": ['as-toc-item', 'as-has-quick-menu'],
    extendEvent: ['presstoggle', 'checkedchange', 'pressquickmenu', 'press', 'renamefinish'],
    child: [{
      "class": 'as-toc-item-toggle-ico-ctn',
      child: 'toggler-ico'
    }, '.as-toc-item-ext-icon-ctn', {
      "class": 'as-toc-item-name-ctn',
      child: [{
        tag: 'span',
        "class": 'as-toc-item-name',
        child: {
          text: 'đây là cái tên'
        }
      }, {
        tag: 'input',
        "class": 'as-toc-item-name-input',
        attr: {
          type: 'text'
        }
      }]
    }, {
      "class": 'as-toc-item-check-ctn',
      child: [{
        tag: _CheckBoxInput["default"].tag
      }, 'span.mdi.mdi-check']
    }, {
      "class": 'as-toc-item-quick-menu-ctn',
      child: {
        tag: 'button',
        child: 'span.mdi.mdi-dots-vertical'
      }
    }]
  });
};
TOCItem.property = {};
TOCItem.property.icon = {
  set: function set(value) {
    if (this.$iconP) {
      this.$iconP.remove();
      this.$iconP = undefined;
    }
    if (value) {
      var newE;
      if (!_Dom["default"].isDomNode(value)) {
        newE = (0, _ACore._)(value);
      }
      this.$iconP = newE;
      this.$iconCtn.addChild(newE);
      this._icon = value;
    } else {
      this._icon = undefined;
    }
  },
  get: function get() {
    return this._icon;
  }
};
TOCItem.property.status = {
  set: function set(value) {
    if (['none', 'open', 'close'].indexOf(value) < 0) value = 'none';
    this.removeClass('as-status-' + this._status);
    this._status = value;
    this.addClass('as-status-' + value);
  },
  get: function get() {
    return this._status;
  }
};
TOCItem.property.name = {
  set: function set(value) {
    this.$name.firstChild.data = value || '';
  },
  get: function get() {
    return this.$name.firstChild.data;
  }
};
TOCItem.property.level = {
  set: function set(value) {
    this._level = value;
    this.addStyle('--level', value + '');
  },
  get: function get() {
    return this._level;
  }
};
TOCItem.property.checked = {
  set: function set(value) {
    this.$checkbox.checked = value;
    if (value) {
      this.$checkIco.removeStyle('display');
    } else {
      this.$checkIco.addStyle('display', 'none');
    }
  },
  get: function get() {
    return this.$checkbox.checked;
  }
};
TOCItem.property.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
TOCItem.property.hasQuickMenu = {
  set: function set(value) {
    if (value) {
      this.addClass('as-has-quick-menu');
    } else {
      this.removeClass('as-has-quick-menu');
    }
  },
  get: function get() {
    return this.hasClass('as-has-quick-menu');
  }
};
TOCItem.property.extendClasses = {
  set: function set(value) {
    var _this = this;
    value = value || [];
    if (typeof value === 'string') value = value.trim().split(/\s/).filter(function (x) {
      return !!x;
    });
    if (this._extendClasses) {
      this._extendClasses.forEach(function (c) {
        return _this.removeClass(c);
      });
    }
    this._extendClasses = value;
    this._extendClasses.forEach(function (c) {
      return _this.addClass(c);
    });
  },
  get: function get() {
    return this._extendClasses || [];
  }
};
TOCItem.prototype.rename = function () {
  this.addClass('as-renaming');
  var name = this.name;
  var textWidth = (0, _utils.measureText)(name, '14px Arial, Helvetica, sans-serif').width;
  this.$nameInput.addStyle('width', textWidth + 2 + 'px');
  this.$nameInput.value = name;
  this.$nameInput.focus();
  this.$nameInput.select();
  this.$nameInput.once('blur', function (event) {
    var event1;
    if (this.$nameInput.value !== name) {
      event1 = (0, _EventEmitter.copyEvent)(event, {
        originalEvent: event,
        type: 'renamefinish',
        newName: this.$nameInput.value,
        __promise__: Promise.resolve(true),
        waitFor: function waitFor(promise) {
          if (promise && promise.then) {
            this.__promise__ = promise;
          } else {
            this.__promise__ = Promise.resolve(promise);
          }
        }
      });
      this.emit('renamefinish', event1, this);
      event1.__promise__.then(function (result) {
        if (result === true) {
          this.name = event1.newName;
        } else if (typeof result === 'string') {
          this.name = result;
        }
      }.bind(this));
    }
    this.removeClass('as-renaming');
  }.bind(this));
};

/***
 * @memberOf TOCItem#
 * @type {{}}
 */
TOCItem.eventHandler = {};
TOCItem.eventHandler.keyDownNameInput = function (event) {
  var extendText = '';
  if (event.type === 'paste') {
    extendText = (event.clipboardData || window.clipboardData).getData('text') || '';
  } else if (event.key.length === 1 && !(event.ctrl && event.key === 'C')) {
    extendText = event.key;
  } else if (event.key === 'Enter') {
    this.$nameInput.blur();
  }
  if (extendText.length > 0) {
    this.$nameInput.addStyle('width', (0, _utils.measureText)(this.$nameInput.value + extendText, '14px Arial, Helvetica, sans-serif').width + 2 + 'px');
  }
  setTimeout(function () {
    var name = this.$nameInput.value;
    this.$nameInput.addStyle('width', (0, _utils.measureText)(name, '14px Arial, Helvetica, sans-serif').width + 2 + 'px');
  }.bind(this), 0);
};
TOCItem.eventHandler.checkedChange = function (event) {
  this.emit('checkedchange', {
    type: 'checkedchange',
    target: this,
    originalEvent: event
  }, this);
};
TOCItem.eventHandler.clickQuickMenuBtn = function (event) {
  this.emit('pressquickmenu', {
    type: 'pressquickmenu',
    originalEvent: event
  }, this);
};
TOCItem.eventHandler.click = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$checkbox, event) || (0, _EventEmitter.hitElement)(this.$quickMenuBtn, event)) return;
  var now = Date.now();
  if ((0, _EventEmitter.hitElement)(this.$toggleCtn, event)) {
    this.emit('presstoggle', {
      originalEvent: event,
      type: 'presstoggle'
    }, this);
  } else {
    if (now - this._lastClickTime > 500) {
      this.emit('press', {
        type: 'press',
        originalEvent: event
      }, this);
    } else if (this.status === "close" || this.status === 'open') {
      this.emit('presstoggle', {
        originalEvent: event,
        type: 'presstoggle'
      }, this);
    }
    this._lastClickTime = now;
  }
};
_ACore["default"].install(TOCItem);
var _default = TOCItem;
exports["default"] = _default;

/***/ }),

/***/ 89860:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _TOCItem = _interopRequireDefault(__webpack_require__(64836));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _BlurTrigger = _interopRequireDefault(__webpack_require__(17471));
var _search = _interopRequireWildcard(__webpack_require__(67858));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _utils = __webpack_require__(84512);
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function TOCList() {
  this.$searchInput = null;
  this.$body = (0, _ACore.$)('.as-toc-list-body', this);
  this.$searching = (0, _ACore.$)('.as-toc-list-searching', this);
  this.rootController = new TOCVirtualRootController(this, [], this.$body);
  this.searchCache = {};
  this.savedState = {
    active: [],
    status: {}
  };
  /***
   * @name nodes
   * @type {{}[]}
   * @memberOf TOCList#
   */
}

TOCList.tag = 'TOCList'.toLowerCase();
TOCList.render = function () {
  return (0, _ACore._)({
    extendEvent: ['pressnode', 'checkednodechange', 'pressnodequickmmenu', 'statechange'],
    "class": 'as-toc-list',
    child: ['.as-toc-list-body', '.as-toc-list-searching']
  });
};
TOCList.prototype.applySavedState = function () {
  var savedStatus = this.savedState.status;
  function visitArr(arr) {
    arr.forEach(function (ct) {
      var status = savedStatus[ct.ident];
      if (status) {
        ct.status = status;
      }
      savedStatus[ct.ident] = ct.status;
      visitArr(ct.children);
    });
  }
  visitArr(this.rootController.children);
  if (this.savedState.active) {
    this.savedState.active.forEach(function (ident) {
      var activeCt = this.findControllerByIdent(ident);
      if (activeCt) activeCt.active();
    }.bind(this));
  }
};
TOCList.prototype.resetSavedState = function () {
  this.savedState = {
    active: null,
    status: {}
  };
};
TOCList.prototype.saveState = function () {
  var oldState = this.savedState;
  var savedState = {
    active: [],
    status: {}
  };
  var changed = false;
  function visitArr(arr) {
    arr.forEach(function (ct) {
      savedState.status[ct.ident] = ct.status;
      changed = changed || savedState.status[ct.ident] !== oldState.status[ct.ident];
      if (ct.nodeElt.hasClass('as-active')) {
        savedState.active.push(ct.ident);
      }
      visitArr(ct.children);
    });
  }
  var oldActive = (oldState.active || []).slice();
  oldActive.sort();
  var newActive = (savedState.active || []).slice();
  newActive.sort();
  changed = changed || oldActive.join('/') !== newActive.join('/');
  visitArr(this.rootController.children);
  this.savedState = savedState;
  if (changed) this.notifySavedStateChange();
};
TOCList.prototype.notifySavedStateChange = function () {
  this.emit('statechange', {
    target: this,
    type: 'statechange'
  }, this);
};
TOCList.prototype.loadSavedState = function (savedState) {
  savedState = savedState || {};
  if (typeof savedState.active === 'string') savedState.active = [savedState.active];
  this.savedState = {
    active: savedState.active || [],
    status: savedState.status || {}
  };
  this.applySavedState();
};

/***
 * @param {number=} n
 */
TOCList.prototype.openAllNodeRecursive = function (n) {
  this.rootController.openRecursive(n);
  this.saveState();
};
TOCList.prototype.closeAllNodeRecursive = function () {
  this.rootController.closeRecursive();
  this.saveState();
};
TOCList.prototype.deactivateAllNode = function () {
  this.rootController.deactivateRecursive();
};

/***
 *
 * @param ident
 * @returns {TOCNodeController|null}
 */
TOCList.prototype.activeNode = function (ident) {
  var nodeCt = this.findControllerByIdent(ident);
  var parent;
  if (nodeCt) {
    nodeCt.active();
    parent = nodeCt.parent;
    while (parent) {
      if (parent.open && parent.status === 'close') parent.open();
      parent = parent.parent;
    }
    setTimeout(function () {
      (0, _utils.vScrollIntoView)(nodeCt.nodeElt);
    }, 100);
  }
  return nodeCt;
};
TOCList.prototype.getActivatedNodes = function () {
  var res = [];
  this.rootController.traverse(function (node) {
    if (node.activated) {
      res.push(node);
    }
  });
  return res;
};

/***
 *
 * @param {string} ident
 * @param {TOCNodeController|TOCVirtualRootController=} rootController
 * @returns {TOCNodeController}
 */
TOCList.prototype.findControllerByIdent = function (ident, rootController) {
  var res = null;
  rootController = rootController || this.rootController;
  function visitArr(arr) {
    arr.some(function (ct) {
      if (ct.ident + '' === ident + '') {
        res = ct;
        return true;
      }
      visitArr(ct.children);
    });
  }
  visitArr(rootController.children);
  return res;
};
TOCList.prototype.makeNodeController = function (nodeData) {
  return new TOCNodeController(this, nodeData, null);
};

/**
 *
 * @param query
 * @private
 * @returns {TOCVirtualRootController}
 */
TOCList.prototype._calcSearch = function (query) {
  var searchRootController = this.searchCache[query];
  if (searchRootController) return searchRootController;
  var itemTree = this.searchCache.__itemTree__;
  if (!itemTree) {
    itemTree = this.nodes.map(function visit(node) {
      var item = (0, _search["default"])({
        text: node.name,
        value: Object.assign({}, node)
      });
      if (node.children && node.children.length > 0) {
        item.items = node.children.map(visit);
      }
      return item;
    });
    this.searchCache.__itemTree__ = itemTree;
  }
  var resultItemTree = (0, _search.searchTreeListByText)(query, itemTree);
  var resultNodes = resultItemTree.map(function visit2(item) {
    var node = Object.assign({}, item.value);
    delete node.children;
    if (item.items && item.items.length > 0) {
      node.children = item.items.map(visit2);
    }
    return node;
  });
  this.searchCache[query] = new TOCVirtualRootController(this, resultNodes);
  return this.searchCache[query];
};
TOCList.prototype.search = function (query) {
  query = query || '';
  query = query.trim().replace('\s(\s+)', ' ');
  var searchRoot = this._calcSearch(query);
  var activeNodeCt;
  if (query.length === 0) {
    this.removeClass('as-searching');
    this.$searching.clearChild();
  } else {
    this.addClass('as-searching');
    this.$searching.clearChild();
    searchRoot.openRecursive();
    activeNodeCt = this.findControllerByIdent(this.savedState.active, searchRoot);
    if (activeNodeCt) activeNodeCt.active();
    searchRoot.view = this.$searching;
  }
};
TOCList.property = {};
TOCList.property.nodes = {
  /***
   * @this TOCList
   * @param nodes
   */
  set: function set(nodes) {
    this.searchCache = {};
    nodes = nodes || [];
    this.rootController = new TOCVirtualRootController(this, nodes);
    this.rootController.view = this.$body;
    this.applySavedState();
  },
  get: function get() {
    return this.rootController.nodes;
  }
};
TOCList.property.searchInput = {
  /***
   * @this TOCList
   */
  set: function set(elt) {
    if (this.$searchInput) {
      this.$searchInput.off('stoptyping', this.eventHandler.searchTextInputModify);
    }
    this.$searchInput = elt;
    if (this.$searchInput) {
      this.$searchInput.on('stoptyping', this.eventHandler.searchTextInputModify);
    }
  },
  /***
   * @this TOCList
   */
  get: function get() {
    return this.$searchInput;
  }
};

/***
 * @memberOf TOCList#
 * @type {{}}
 */
TOCList.eventHandler = {};
TOCList.eventHandler.pressNode = function (nodeController, event) {
  var newEvent = (0, _EventEmitter.copyEvent)(event.originalEvent || event, {
    type: 'pressnode',
    target: this,
    originalEvent: event.originalEvent || event,
    controller: nodeController,
    nodeData: nodeController.nodeElt.nodeData,
    nodeElt: nodeController.nodeElt
  });
  this.emit('pressnode', newEvent, this);
};
TOCList.eventHandler.checkedNodeChange = function (nodeController, event) {
  var newEvent = {
    type: 'checkednodechange',
    target: this,
    originalEvent: event.originalEvent || event,
    controller: nodeController,
    nodeData: nodeController.nodeElt.nodeData,
    nodeElt: nodeController.nodeElt
  };
  this.emit('checkednodechange', newEvent, this);
};
TOCList.eventHandler.pressNodeQuickMenu = function (nodeController, event) {
  var newEvent = {
    type: 'pressnodequickmmenu',
    target: this,
    originalEvent: event.originalEvent || event,
    controller: nodeController,
    nodeData: nodeController.nodeElt.nodeData,
    nodeElt: nodeController.nodeElt
  };
  newEvent.showMenu = function (menuProps, onSelect) {
    var token = _QuickMenu["default"].show(nodeController.nodeElt.$quickMenuBtn, menuProps, [3, 4], onSelect, false);
    var blurTrigger = new _BlurTrigger["default"]([], 'click', function () {
      _QuickMenu["default"].close(token);
    }, 10, 30);
  };
  this.emit('pressnodequickmmenu', newEvent, this);
};

/***
 * @this TOCList
 */
TOCList.eventHandler.searchTextInputModify = function () {
  this.search(this.$searchInput.value);
};
_ACore["default"].install(TOCList);

/***
 *
 * @param {TOCList} listElt
 * @param {{}[]} nodes
 * @constructor
 */
function TOCVirtualRootController(listElt, nodes) {
  Object.defineProperties(this, {
    root: {
      value: this
    }
  });
  this.listElt = listElt;
  this.level = -1;
  this.nodes = nodes;
  /***
   *
   * @type {TOCNodeController[]}
   */
  this.children = nodes.map(function (nodeData) {
    return new TOCNodeController(listElt, nodeData, this);
  }.bind(this));
  this._view = null;
  /****
   * @type {AElement}
   * @name view
   * @memberOf TOCVirtualRootController#
   */
}

TOCVirtualRootController.prototype.deactivateRecursive = function () {
  this.children.forEach(function (ct) {});
};
TOCVirtualRootController.prototype.openRecursive = function (n) {
  this.children.forEach(function (ct) {
    ct.openRecursive(n);
  });
};
TOCVirtualRootController.prototype.closeRecursive = function () {
  this.children.forEach(function (ct) {
    ct.closeRecursive();
  });
};
TOCVirtualRootController.prototype.getViewElements = function () {
  var ac = [];
  this.children.forEach(function (ct) {
    ct.getViewElements(ac);
  });
  return ac;
};
TOCVirtualRootController.prototype.indexOfChild = function (child) {
  for (var i = 0; i < this.children.length; ++i) {
    if (child === this.children[i] || this.children[i].ident === child) return i;
  }
  return -1;
};

/***
 *
 * @param {TOCNodeController} controller
 * @param {TOCNodeController} at
 * @returns {TOCVirtualRootController}
 */
TOCVirtualRootController.prototype.addChildBefore = function (controller, at) {
  var atIdx;
  if (at) {
    atIdx = this.indexOfChild(at);
    if (atIdx >= 0) {
      if (controller.parent) controller.remove();
      this.children.splice(atIdx, 0, controller);
      controller.__parent__ = this;
      if (at.nodeElt.parentElement) {
        (0, _utils.addElementsBefore)(at.nodeElt.parentElement, controller.getViewElements(), at.nodeElt);
      }
      this.updateStatus();
    } else {
      throw new Error("The node before which the new node is to be inserted is not a child of this node.");
    }
  } else {
    if (controller.parent) controller.remove();
    this.children.push(controller);
    if (this.view) this.addChild(controller.getViewElements());
    this.updateStatus();
  }
  controller.setLevelRecursive(this.level + 1);
  return this;
};
TOCVirtualRootController.prototype.addChild = function (controller) {
  this.addChildBefore(controller, null);
  return this;
};

/***
 *
 * @param {TOCNodeController} controller
 * @param at
 */
TOCVirtualRootController.prototype.addChildAfter = function (controller, at) {
  var atIdx;
  var lastElement;
  if (at) {
    atIdx = this.indexOfChild(at);
    if (atIdx === this.children.length) {
      if (controller.parent) controller.remove();
      controller.__parent__ = this;
      this.children.push(controller);
      if (this.view) this.view.addChild(controller.getViewElements());
    } else if (atIdx >= 0) {
      if (controller.parent) controller.remove();
      controller.__parent__ = this;
      this.children.splice(atIdx, 0, controller);
      if (at.nodeElt.parentElement) {
        lastElement = at.getViewElements().pop();
        (0, _utils.addElementAfter)(at.nodeElt.parentElement, controller.getViewElements(), lastElement);
      }
    } else {
      throw new Error("The node before which the new node is to be inserted is not a child of this node.");
    }
  } else {
    if (controller.parent) controller.remove();
    controller.__parent__ = this;
    this.children.unshift(controller);
    (0, _utils.addElementAfter)(this.view, controller.getViewElements(), this.view.firstChild);
  }
  return this;
};
TOCVirtualRootController.prototype.updateStatus = _noop["default"];

/***
 * @param {TOCNodeController} child
 * @returns {TOCVirtualRootController|TOCNodeController}
 */
TOCVirtualRootController.prototype.removeChild = function (child) {
  var idx = this.children.indexOf(child);
  if (idx >= 0) {
    this.children.splice(idx, 1);
    child.getViewElements().forEach(function (elt) {
      elt.remove();
    });
    this.updateStatus();
  }
  return this;
};

/***
 *
 * @param {function(nodeCt:TOCNodeController):(void|boolean)} callback return true to stop
 */
TOCVirtualRootController.prototype.traverse = function (callback) {
  this.children.some(function visit(ct) {
    return callback(ct) || ct.children.some(visit);
  });
};
Object.defineProperties(TOCVirtualRootController.prototype, {
  firstChild: {
    get: function get() {
      return this.children[0] || null;
    }
  },
  lastChild: {
    get: function get() {
      return this.children[this.children.length - 1] || null;
    }
  },
  view: {
    /***
     * @this TOCVirtualRootController
     * @param view
     */
    set: function set(view) {
      view = view || null;
      if (view === this._view) return;
      if (this._view) {
        this._view.clearChild();
        this._view.rootController = null;
        this._view = null;
      }
      if (view) {
        if (view.rootController) {
          view.rootController.view = null;
        }
        view.rootController = this;
        this._view = view;
        this._view.addChild(this.getViewElements());
      }
    },
    get: function get() {
      return this._view;
    }
  }
});

/***
 *
 * @param {TOCList} listElt
 * @param {{}} nodeData
 * @param {TOCNodeController|TOCVirtualRootController} parent
 * @constructor
 */
function TOCNodeController(listElt, nodeData, parent) {
  Object.defineProperties(this, {
    listElt: {
      value: listElt
    },
    __parent__: {
      value: parent,
      enumerable: false,
      writable: true
    }
  });
  this.level = parent ? parent.level + 1 : 0;
  /***
   * @type {TOCItem}
   */
  this.nodeElt = (0, _ACore._)({
    tag: _TOCItem["default"].tag,
    props: {
      nodeData: nodeData,
      checked: !!nodeData.checked,
      name: nodeData.name,
      icon: nodeData.icon,
      level: this.level,
      controller: this,
      status: 'none',
      extendClasses: nodeData.extendClasses
    },
    on: {
      presstoggle: this.toggle.bind(this),
      press: this.ev_press.bind(this),
      checkedchange: this.ev_checkedChange.bind(this),
      pressquickmenu: this.ev_pressQuickMenu.bind(this)
    }
  });
  if (nodeData.hasQuickMenu === false) this.nodeElt.hasQuickMenu = false;
  this.nodeElt.on('presstoggle', this.listElt.saveState.bind(this.listElt));
  /***
   * @name children
   * @type {TOCNodeController[]}
   * @memberOf TOCNodeController#
   */
  if (nodeData.children && nodeData.children.length > 0) {
    this.nodeElt.status = 'close';
    this.children = nodeData.children.map(function (c) {
      return new TOCNodeController(listElt, c, this);
    }.bind(this));
  } else {
    this.children = [];
  }
}
TOCNodeController.prototype.indexOfChild = TOCVirtualRootController.prototype.indexOfChild;
TOCNodeController.prototype.traverse = TOCVirtualRootController.prototype.traverse;
TOCNodeController.prototype.updateStatus = function () {
  if (this.children.length === 0 && this.nodeElt.status !== 'none') {
    this.nodeElt.status = 'none';
  } else if (this.children.length > 0 && this.nodeElt.status === 'none') {
    this.nodeElt.status = 'close';
  }
};
TOCNodeController.prototype.deactivateRecursive = function () {
  this.nodeElt.removeClass('as-active');
  this.children.forEach(function (ct) {
    ct.deactivateRecursive();
  });
};
TOCNodeController.prototype.removeChild = TOCVirtualRootController.prototype.removeChild;
TOCNodeController.prototype.remove = function () {
  this.parent.removeChild(this);
};

/***
 *
 * @param {TOCNodeController} controller
 * @param {TOCNodeController} at
 * @returns {TOCNodeController}
 */
TOCNodeController.prototype.addChildBefore = function (controller, at) {
  var atIdx;
  if (at) {
    atIdx = this.indexOfChild(at);
    if (atIdx >= 0) {
      if (controller.parent) controller.remove();
      this.children.splice(atIdx, 0, controller);
      controller.__parent__ = this;
      if (this.status === 'open') {
        (0, _utils.addElementsBefore)(this.nodeElt.parentElement, controller.getViewElements(), at.nodeElt);
      }
      controller.setLevelRecursive(this.level + 1);
      this.updateStatus();
    } else {
      throw new Error("The node before which the new node is to be inserted is not a child of this node.");
    }
  } else {
    if (controller.parent) controller.remove();
    this.children.push(controller);
    this.updateStatus();
    if (this.status === "open") {
      (0, _utils.addElementsBefore)(this.nodeElt.parentElement, controller.getViewElements(), at.nodeElt);
    }
  }
  return this;
};
TOCNodeController.prototype.addChild = TOCVirtualRootController.prototype.addChild;
TOCNodeController.prototype.addChildAfter = function (controller, at) {
  throw new Error("Not implement!");
};
TOCNodeController.prototype.toggle = function () {
  if (this.status === 'close') this.open();else if (this.status === 'open') this.close();
};
TOCNodeController.prototype.open = function () {
  if (this.status !== 'close') return;
  this.nodeElt.status = 'open';
  var pE = this.nodeElt.parentElement;
  if (!pE) return;
  var veArr = this.getViewElements();
  veArr.shift();
  var at = pE.findChildAfter(this.nodeElt);
  if (at) {
    while (veArr.length > 0) {
      pE.addChildBefore(veArr.shift(), at);
    }
  } else {
    pE.addChild(veArr);
  }
};
TOCNodeController.prototype.close = function () {
  if (this.status !== 'open') return;
  var veArr = this.getViewElements();
  veArr.shift();
  while (veArr.length > 0) {
    veArr.pop().remove();
  }
  this.nodeElt.status = 'close';
};
TOCNodeController.prototype.getViewElements = function (ac) {
  if (ac === undefined) ac = [];
  ac.push(this.nodeElt);
  if (this.status === 'open' && this.children.length > 0) {
    this.children.forEach(function (ct) {
      ct.getViewElements(ac);
    });
  }
  return ac;
};
TOCNodeController.prototype.setLevelRecursive = function (value) {
  this.level = value;
  this.nodeElt.level = value;
  this.children.forEach(function (ct) {
    ct.setLevelRecursive(value + 1);
  });
};

/**
 *
 * @param {number=} level
 */
TOCNodeController.prototype.openRecursive = function (level) {
  if (typeof level === "number" && this.level >= level) return;
  if (this.status === 'close') {
    this.open();
  }
  this.children.forEach(function (ct) {
    ct.openRecursive(level);
  });
};
TOCNodeController.prototype.ev_press = function (event) {
  this.listElt.eventHandler.pressNode(this, event);
};
TOCNodeController.prototype.ev_checkedChange = function (event) {
  this.nodeElt.nodeData.checked = this.nodeElt.checked;
  this.listElt.eventHandler.checkedNodeChange(this, event);
};
TOCNodeController.prototype.ev_pressQuickMenu = function (event) {
  this.listElt.eventHandler.pressNodeQuickMenu(this, event);
};
TOCNodeController.prototype.ev_renameFinish = function (event) {};
TOCNodeController.prototype.closeRecursive = function () {
  if (this.status === 'open') {
    this.close();
  }
  this.children.forEach(function (ct) {
    ct.closeRecursive();
  });
};
TOCNodeController.prototype.rename = function () {};

/***
 *
 * @param {boolean=true} isActive default: true
 * @param {boolean=false} append default: false
 */
TOCNodeController.prototype.active = function (isActive, append) {
  var self = this;
  if (arguments.length === 0) isActive = true;
  append = !!append;
  var idx = this.listElt.savedState.active ? this.listElt.savedState.active.indexOf(this.ident) : -1;
  if (isActive) {
    this.root.traverse(function (ct) {
      if (ct === self) {
        ct.nodeElt.addClass('as-active');
      } else if (!append) ct.nodeElt.removeClass('as-active');
    });
    if (idx < 0) {
      this.listElt.savedState.active = this.listElt.savedState.active || [];
      if (append) {
        this.listElt.savedState.active.push(this.ident);
      } else {
        this.listElt.savedState.active = [this.ident];
      }
      this.listElt.notifySavedStateChange();
    }
  } else {
    if (idx >= 0) {
      if (append) {
        this.listElt.savedState.active.splice(idx, 1);
        this.nodeElt.removeClass('as-active');
      } else {
        this.listElt.savedState.active = [];
        this.root.traverse(function (ct) {
          ct.nodeElt.removeClass('as-active');
        });
      }
    }
  }
};
Object.defineProperties(TOCNodeController.prototype, {
  /***
   * @memberOf TOCNodeController#
   * @name status
   * @type {"open"|"close"|"none"}
   */
  status: {
    get: function get() {
      return this.nodeElt.status;
    },
    set: function set(value) {
      if (value === 'open' && this.nodeElt.status === 'close') this.open();else if (value === 'close' && this.nodeElt.status === 'open') this.close();
    }
  },
  root: {
    get: function get() {
      return this.parent ? this.parent.root : this;
    }
  },
  checked: {
    get: function get() {
      return !!this.nodeElt.nodeData.checked;
    },
    set: function set(value) {
      this.nodeElt.checked = !!value;
      this.nodeElt.nodeData.checked = !!value;
    }
  },
  name: {
    set: function set(value) {
      value = value || '';
      this.nodeElt.name = value;
      this.nodeElt.nodeData.name = value;
    },
    get: function get() {
      return this.nodeElt.nodeData.name;
    }
  },
  ident: {
    get: function get() {
      return this.nodeElt.nodeData.ident;
    },
    set: function set(value) {
      this.nodeElt.nodeData.ident = value;
    }
  },
  nodeData: {
    get: function get() {
      return this.nodeElt.nodeData;
    },
    set: function set(value) {
      this.nodeElt.nodeData = value;
    }
  },
  parent: {
    get: function get() {
      return this.__parent__;
    }
  },
  firstChild: {
    get: function get() {
      return this.children[0] || null;
    }
  },
  lastChild: {
    get: function get() {
      return this.children[this.children.length - 1] || null;
    }
  },
  activated: {
    get: function get() {
      return this.nodeElt.hasClass('as-active');
    }
  }
});
var _default = TOCList;
exports["default"] = _default;

/***/ }),

/***/ 52911:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(35255);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _TabButton = _interopRequireDefault(__webpack_require__(5602));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends HScroller
 * @constructor
 */
function TabBar() {
  this.$parent = null;
  this.$addBtn = _({
    tag: 'button',
    "class": 'as-tab-bar-add-btn',
    child: 'span.mdi.mdi-plus',
    on: {
      click: function () {
        if (this.$parent) {
          this.$parent.emit('pressaddtab', {
            type: 'pressaddtab',
            target: this.$parent
          }, this.$parent);
        }
      }.bind(this)
    }
  });
  this.addChild(this.$addBtn);
  this.defineEvent(['active', 'close']);
  this.on('wheel', function (event) {
    var lastLeft = this.$viewport.scrollLeft;
    if (event.deltaY > 1) {
      this.$viewport.scrollLeft += 50;
    } else if (event.deltaY < -1) {
      this.$viewport.scrollLeft -= 50;
    }
    if (lastLeft != this.$viewport.scrollLeft) event.preventDefault();
  });
  this._tabs = [];
}
TabBar.tag = 'tabbar';
TabBar.render = function () {
  return _('hscroller.absol-tabbar');
};
TabBar.prototype.getAllTabButtons = function () {
  var buttons = [];
  $('tabbutton', this, function (e) {
    buttons.push(e);
  });
  return buttons;
};

/***
 *
 * @param {string} ident
 * @return {TabButton}
 */
TabBar.prototype.getButtonByIdent = function (ident) {
  return $('tabbutton#tabbuton-' + ident, this);
};
TabBar.property = {};
TabBar.property.tabs = {
  set: function set(value) {
    this.clearChild();
    this._tabs = [];
    (value || []).forEach(this.addTab.bind(this));
  },
  get: function get() {
    //each hold item data
    return this._tabs || [];
  }
};

/***
 *
 * @param {{text}}
 * @return {tabbar}
 */
TabBar.prototype.addTab = function (value) {
  var self = this;
  var props = {};
  if (typeof value == "string") {
    props.name = value;
  } else {
    if (value.name) {
      props.name = value.name;
    } else {
      throw new Error('Tab must has name attribute');
    }
    if (value.desc) props.desc = value.desc;
    if (value.tabIcon) {
      props.icon = value.tabIcon;
    }
    if (value.preventClosing) {
      props.preventClosing = value.preventClosing;
    }
  }
  var tabButton = _({
    tag: 'tabbutton',
    props: props,
    on: {
      active: function active(event, sender) {
        var prevented = false;
        self.emit('active', {
          target: this,
          value: value,
          preventDefault: function preventDefault() {
            prevented = true;
          }
        }, self);
        if (!prevented) {
          self.getAllTabButtons().forEach(function (e) {
            e.active = false;
          });
          this.active = true;
        }
      },
      close: function close(event, sender) {
        var prevented = false;
        self.emit('close', {
          target: this,
          value: value,
          preventDefault: function preventDefault() {
            prevented = true;
          }
        }, self);
        if (!prevented) {
          //todo:active other
          this.remove();
        }
      }
    }
  });
  this.addChildBefore(tabButton, this.$addBtn);
  if (value.id) tabButton.attr('id', 'tabbuton-' + value.id);
  this._tabs.push(tabButton);
  this.requestUpdateSize();
  return tabButton;
};
TabBar.prototype.removeTab = function (id) {
  this._tabs = this._tabs.filter(function (value) {
    return value == id;
  });
  $('#tabbuton-' + id, this).remove();
  this.requestUpdateSize();
};
TabBar.prototype.activeTab = function (id) {
  var self = this;
  var activedbtn = $('.absol-tabbar-button-active', this);
  if (activedbtn && activedbtn.attr('id') != id) {
    activedbtn.active = false;
  }
  var mButton = $('#tabbuton-' + id, this);
  if (mButton) {
    mButton.active = true;
    setTimeout(function () {
      self.scrollInto(mButton);
    }, 30);
  }
};
TabBar.prototype.setModified = function (ident, flag) {
  var bt = this.getButtonByIdent(ident);
  if (bt) {
    bt.modified = flag;
  }
};
_ACore["default"].install(TabBar);
var _default = TabBar;
exports["default"] = _default;

/***/ }),

/***/ 5602:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(35255);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _stringGenerate = __webpack_require__(10713);
var _Dom = _interopRequireDefault(__webpack_require__(64821));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function TabButton() {
  var thisTB = this;
  this._icon = null;
  this.$extIconCtn = $('.as-tab-bar-button-ext-icon-ctn', this);
  this.$close = $('.absol-tabbar-button-close', this);
  this.$iconCtn = $('.absol-tabbar-button-icon-container', this).on('click', function (event) {
    event.tabButtonEventName = 'delete';
    thisTB.emit('close', event);
  });
  this.$modifiedFlag = $('.absol-tabbar-button-modified-flag', this).on('click', function (event) {
    event.tabButtonEventName = 'delete';
    thisTB.emit('close', event);
  });
  this.$textView = $('.absol-tabbar-button-text', this);
  this.on({
    click: function click(event) {
      if (event.tabButtonEventName) return;
      event.tabButtonEventName = 'active';
      thisTB.emit('active', event);
    }
  });
}
TabButton.tag = 'TabButton'.toLowerCase();
TabButton.render = function () {
  return _({
    tag: 'button',
    "class": 'absol-tabbar-button',
    extendEvent: ['close', 'active'],
    id: (0, _stringGenerate.randomIdent)(20),
    child: [{
      "class": 'as-tab-bar-button-ext-icon-ctn'
    }, {
      "class": 'absol-tabbar-button-text'
    }, {
      "class": 'absol-tabbar-button-icon-container',
      child: [{
        tag: 'span',
        "class": ['absol-tabbar-button-close', 'mdi-close', 'mdi'],
        attr: {
          title: 'Close'
        }
      }, {
        tag: 'span',
        "class": ['absol-tabbar-button-close-circle', 'mdi-close-circle', 'mdi'],
        attr: {
          title: 'Close'
        }
      }, {
        tag: 'span',
        "class": ['absol-tabbar-button-modified-flag', 'mdi', 'mdi-checkbox-blank-circle']
      }]
    }]
  });
};
TabButton.property = {};
TabButton.property.active = {
  set: function set(value) {
    this._active = value;
    if (value) this.addClass('absol-tabbar-button-active');else this.removeClass('absol-tabbar-button-active');
  },
  get: function get() {
    return this._active;
  }
};
TabButton.property.name = {
  set: function set(value) {
    this._name = value || '';
    this.$textView.innerHTML = this._name;
  },
  get: function get() {
    return this._name;
  }
};
TabButton.property.desc = {
  set: function set(value) {
    this.attr('title', value);
  },
  get: function get() {
    return this.attr('title');
  }
};
TabButton.property.icon = {
  set: function set(value) {
    value = value || null;
    this._icon = value;
    this.$extIconCtn.clearChild();
    if (this._icon) {
      this.$extIconCtn.addChild(_(value));
    }
  },
  get: function get() {
    return this._icon;
  }
};
TabButton.property.modified = {
  set: function set(value) {
    if (value) {
      this.addClass('absol-tabbar-button-modified');
    } else {
      this.removeClass('absol-tabbar-button-modified');
    }
  },
  get: function get() {
    return this.hasClass('absol-tabbar-button-modified');
  }
};
TabButton.property.preventClosing = {
  set: function set(value) {
    if (value) {
      this.addClass('as-prevent-closing');
    } else {
      this.removeClass('as-prevent-closing');
    }
  },
  get: function get() {
    return this.hasClass('as-prevent-closing');
  }
};
_ACore["default"].install(TabButton);
var _default = TabButton;
exports["default"] = _default;

/***/ }),

/***/ 13089:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var $ = _ACore["default"].$;
var _ = _ACore["default"]._;

/**
 * @extends {AElement}
 * @constructor
 */
function TabFrame() {
  this.on('remove', this._onRemove);
}
TabFrame.tag = 'tabframe';
TabFrame.render = function () {
  return _({
    tag: 'frame',
    "class": 'absol-tab-frame',
    extendEvent: ['requestremove', 'remove']
  }, true);
};
TabFrame.property = {};
TabFrame.property.name = {
  set: function set(value) {
    if (typeof name == "undefined") {
      this._name = undefined;
    } else {
      this._name = value + '';
    }
    if (this.$parent) {
      if (this.$parent.notifyUpdateName) this.$parent.notifyUpdateName(this);
    }
  },
  get: function get() {
    return this._name;
  }
};
TabFrame.property.modified = {
  set: function set(value) {
    this._modified = !!value;
    if (this.$parent) {
      if (this.$parent.notifyUpdateModified) this.$parent.notifyUpdateModified(this);
    }
  },
  get: function get() {
    return !!this._modified;
  }
};
TabFrame.property.desc = {
  set: function set(value) {
    if (typeof value == "undefined") {
      this._desc = undefined;
    } else {
      this._desc = value + '';
    }
    if (this.$parent) {
      if (this.$parent.notifyUpdateDesc) this.$parent.notifyUpdateDesc(this);
    }
  },
  get: function get() {
    return this._desc;
  }
};
TabFrame.property.preventClosing = {
  set: function set(value) {
    if (value) {
      this.addClass('as-prevent-closing');
    } else {
      this.removeClass('as-prevent-closing');
    }
    if (this.$parent && this.$parent.notifyUpdatePreventClosing) {
      this.$parent.notifyUpdatePreventClosing(this);
    }
  },
  get: function get() {
    return this.hasClass('as-prevent-closing');
  }
};
TabFrame.attribute = {};
TabFrame.attribute.name = {
  set: function set(value) {
    this.name = value;
  },
  get: function get() {
    return this.name;
  },
  remove: function remove() {
    this.name = undefined;
  }
};
TabFrame.attribute.desc = {
  set: function set(value) {
    this.desc = value;
  },
  get: function get() {
    return this.desc;
  },
  remove: function remove() {
    this.desc = undefined;
  }
};
TabFrame.attribute.modified = {
  set: function set(value) {
    this.modified = value == 'true' || value == '1' || value === true;
  },
  get: function get() {
    return this.modified ? 'true' : undefined;
  },
  remove: function remove() {
    this.desc = false;
  }
};
TabFrame.prototype.requestRemove = function () {
  if (this.$parent && this.$parent.removeTab) {
    this.$parent.removeTab(this.id, false);
  } else {
    this.selfRemove();
  }
};
TabFrame.prototype._onRemove = function () {
  /* bug auto revoke
  setTimeout(() => {
      if (!this.isDescendantOf(document.body)) {
          this.revokeResource();
      }
  }, 100);
  */
};
TabFrame.prototype.revokeResource = function () {
  this.off('remove', this._onRemove);
  while (this.lastChild && false) {
    if (location.href.indexOf('localhost') >= 0 || location.href.indexOf('lab.') >= 0)
      //for testing
      (0, _utils.revokeResource)(this.lastChild);
    this.lastChild.remove();
  }
};
_ACore["default"].install(TabFrame);
var _default = TabFrame;
exports["default"] = _default;

/***/ }),

/***/ 3475:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(35255);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _TabBar = _interopRequireDefault(__webpack_require__(52911));
var _utils = __webpack_require__(84512);
var _TextMeasure = _interopRequireDefault(__webpack_require__(60268));
var _NotificationPanel = _interopRequireDefault(__webpack_require__(8881));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/**
 * @extends AElement
 * @constructor
 */
function TabView() {
  var thisTV = this;
  /***
   *
   * @type {TabBar}
   */
  this.$tabbar = $('tabbar', this);
  this.$tabbar.$parent = this;
  this.$tabbar.on({
    close: TabView.eventHandler.closeTab.bind(thisTV),
    active: TabView.eventHandler.activeTab.bind(thisTV)
  });
  this._title = '';
  this._frameHolders = [];
  this._history = [];
  (0, _utils.forwardEvent)(this, 'inactivetab', 'deactivetab');
  this.rightCtnPlugin = new TabviewRightCtnPlugin(this);
  (0, _OOP.drillProperty)(this, this.rightCtnPlugin, ['tvTitle', 'notificationPanel']);
}
TabView.tag = 'TabView'.toLowerCase();
TabView.render = function () {
  return _({
    "class": 'absol-tabview',
    extendEvent: ['activetab', 'inactivetab', 'removetab', 'requestremovetab', 'pressaddtab'],
    child: ['tabbar']
  });
};
TabView.eventHandler = {};
TabView.eventHandler.closeTab = function (event) {
  event.preventDefault();
  var id = event.value.id;
  this.removeTab(id, true);
};
TabView.eventHandler.activeTab = function (event) {
  event.preventDefault();
  var id = event.value.id;
  this.activeTab(id, true);
};
TabView.prototype.activeTab = function (id, userActive) {
  var self = this;
  var resPromise = [];
  var needDeactivatedHolder = [];
  var needActiveHolder = [];
  this._frameHolders.forEach(function (holder) {
    if (holder.containerElt.hasClass('absol-tabview-container-hidden')) {
      if (holder.id + '' === id + '') {
        needActiveHolder.push(holder);
      }
    } else {
      if (holder.id + '' !== id + '') {
        needDeactivatedHolder.push(holder);
      }
    }
  });
  needDeactivatedHolder.forEach(function (holder) {
    holder.containerElt.addClass('absol-tabview-container-hidden');
    holder.tabFrame.emit('inactive', {
      type: 'inactive',
      target: holder.tabFrame,
      id: holder.id,
      userActive: !!userActive,
      tabButton: holder.tabButton,
      holder: holder
    }, holder.tabFrame);
  });
  needActiveHolder.forEach(function (holder) {
    self._history.push(holder.id);
    holder.containerElt.removeClass('absol-tabview-container-hidden');
    self.$tabbar.activeTab(holder.id);
    holder.tabFrame.emit('active', {
      type: 'active',
      target: holder.tabFrame,
      id: holder.id,
      userActive: !!userActive,
      tabButton: holder.tabButton,
      holder: holder
    }, holder.tabFrame);
    self.emit('activetab', {
      type: 'activetab',
      target: self,
      id: holder.id,
      userActive: !!userActive,
      tabButton: holder.tabButton,
      holder: holder,
      from: needDeactivatedHolder[0] && needDeactivatedHolder[0].tabFrame || null,
      to: holder.tabFrame
    }, self);
  });
};
TabView.prototype.removeTab = function (id, userActive) {
  var self = this;
  var resPromise = [];
  this._frameHolders.forEach(function (holder) {
    if (holder.id + '' === id + '') {
      var eventData = {
        type: 'requestremove',
        id: id,
        userActive: !!userActive,
        target: holder.tabFrame,
        tabFrame: holder.tabFrame,
        tabButton: holder.tabButton,
        holder: holder,
        __promise__: Promise.resolve(),
        waitFor: function waitFor(promise) {
          this.__promise__ = promise;
        }
      };
      holder.tabFrame.emit('requestremove', eventData, holder.tabFrame);
      eventData.type = 'requestremovetab';
      eventData.target = self;
      self.emit('requestremovetab', eventData, self);
      resPromise.push(eventData.__promise__.then(function () {
        //if ok
        var eventData2 = {
          type: 'inactive',
          target: holder.tabFrame,
          id: holder.id,
          userActive: !!userActive,
          tabButton: holder.tabButton,
          holder: holder
        };
        if (!holder.containerElt.hasClass('absol-tabview-container-hidden')) holder.tabFrame.emit('inactive', eventData2, holder.tabFrame);
        eventData2.type = 'inactivetab';
        eventData2.target = self;
        if (!holder.containerElt.hasClass('absol-tabview-container-hidden')) self.emit('inactivetab', eventData2, self);
        self._frameHolders = self._frameHolders.filter(function (x) {
          return x.id + '' !== id + '';
        });
        holder.tabFrame.notifyDetached();
        self.$tabbar.removeTab(holder.id);
        holder.containerElt.remove();
        eventData2.type = 'remove';
        eventData2.target = holder.tabFrame;
        holder.tabFrame.emit('remove', eventData2, holder.tabFrame);
        eventData2.type = 'removetab';
        eventData2.target = self;
        self.emit('removetab', eventData2, self);
        self.activeLastTab();
      }, function () {
        //if reject
      }));
    }
  });
  return Promise.all(resPromise);
};
TabView.prototype.notifyUpdateDesc = function (elt) {
  var holder = this.findHolder(elt);
  if (holder) {
    holder.tabButton.desc = elt.desc;
  }
};
TabView.prototype.notifyUpdateName = function (elt) {
  var holder = this.findHolder(elt);
  if (holder) {
    holder.tabButton.name = elt.name;
  }
};
TabView.prototype.notifyUpdateModified = function (elt) {
  var holder = this.findHolder(elt);
  if (holder) {
    holder.tabButton.modified = elt.modified;
  }
};
TabView.prototype.notifyUpdatePreventClosing = function (elt) {
  var holder = this.findHolder(elt);
  if (holder) {
    holder.tabButton.preventClosing = elt.preventClosing;
  }
};
TabView.prototype.findHolder = function (elt) {
  for (var i = 0; i < this._frameHolders.length; ++i) {
    var holder = this._frameHolders[i];
    if (holder.tabFrame === elt) {
      return holder;
    }
  }
};
TabView.prototype.addChild = function () {
  var self = this;
  Array.prototype.forEach.call(arguments, function (elt) {
    if (!elt.notifyAttached || !elt.notifyDetached) {
      throw new Error('element is not a tabframe');
    }
    var containerElt = _('.absol-tabview-container.absol-tabview-container-hidden');
    self.appendChild(containerElt); //origin function
    elt.selfRemove();
    var id = elt.attr('id');
    var desc = elt.attr('desc') || undefined;
    var name = elt.attr('name') || 'NoName';
    var tabIcon = elt.tabIcon;
    var modified = elt.modified;
    var preventClosing = elt.preventClosing;
    var tabButton = self.$tabbar.addTab({
      name: name,
      id: id,
      desc: desc,
      modified: modified,
      tabIcon: tabIcon,
      preventClosing: preventClosing
    });
    containerElt.addChild(elt);
    elt.notifyAttached(self);
    var holder = {};
    _OOP["default"].drillProperty(holder, elt, 'id');
    _OOP["default"].drillProperty(holder, elt, 'desc');
    _OOP["default"].drillProperty(holder, elt, 'name');
    _OOP["default"].drillProperty(holder, elt, 'preventClosing');
    Object.defineProperties(holder, {
      tabButton: {
        value: tabButton,
        writable: false
      },
      tabFrame: {
        value: elt,
        writable: false
      },
      containerElt: {
        value: containerElt,
        writable: false
      }
    });
    self._frameHolders.push(holder);
    self.activeTab(id);
  });
};
TabView.prototype.activeLastTab = function () {
  var dict = this._frameHolders.reduce(function (ac, holder) {
    ac[holder.id] = true;
    return ac;
  }, {});
  while (this._history.length > 0) {
    var id = this._history[this._history.length - 1];
    if (dict[id]) {
      this.activeTab(id);
      break;
    } else {
      this._history.pop();
    }
  }
};
TabView.prototype.getChildAt = function (index) {
  return this._frameHolders[index].tabFrame;
};
TabView.prototype.getAllChild = function () {
  return this._frameHolders.map(function (holder) {
    return holder.tabFrame;
  });
};
TabView.prototype.getActiveTabHolder = function () {
  var holder = null;
  for (var i = 0; i < this._frameHolders.length; ++i) {
    holder = this._frameHolders[i];
    if (!holder.containerElt.hasClass('absol-tabview-container-hidden')) {
      return holder;
    }
  }
  return null;
};
TabView.prototype.getActiveTab = function () {
  var holder = this.getActiveTabHolder();
  return holder && holder.tabFrame;
};
TabView.prototype.getActiveTabId = function () {
  var holder = this.getActiveTabHolder();
  return holder && holder.id;
};
TabView.prototype.getTabById = function (id) {
  var holder = this.getTabHolderById(id);
  return holder && holder.tabFrame;
};
TabView.prototype.getTabHolderById = function (id) {
  var holder = null;
  for (var i = 0; i < this._frameHolders.length; ++i) {
    holder = this._frameHolders[i];
    if (holder.id === id) {
      return holder;
    }
  }
  return null;
};
TabView.prototype.activeFrame = function (elt) {
  if (typeof elt == "string") {
    return this.activeTab(elt);
  } else if (elt && elt.attr) {
    return this.activeTab(elt.attr('id'));
  } else {
    throw new Error("Invalid param, must be id or elt!");
  }
};
TabView.property = {};
TabView.property.historyOfTab = {
  get: function get() {
    return this._history.slice();
  }
};
_ACore["default"].install('tabview', TabView);
var _default = TabView;
/**
 *
 * @param {TabView} elt
 * @constructor
 */
exports["default"] = _default;
function TabviewRightCtnPlugin(elt) {
  this.elt = elt;
  this.$rightCtn = null;
  this.$title = null;
  this.$notificationPanel = null;
  this._title = '';
}
TabviewRightCtnPlugin.prototype.initCtn = function () {
  if (this.$rightCtn) return;
  this.$rightCtn = _({
    "class": 'as-tabview-right-ctn'
  });
  this.$rightCtn.requestUpdateSize = this.updateSize.bind(this);
  this.elt.insertBefore(this.$rightCtn, this.elt.$tabbar.nextSibling);
};
TabviewRightCtnPlugin.prototype.updateSize = function () {
  var width = 0;
  if (this.$title) {
    width += _TextMeasure["default"].measureWidth(this._title, 'Arial', 14) + 20;
  }
  if (this.$notificationPanel) {
    width += 20;
    width += this.$notificationPanel.childNodes.length * 40;
    if (this.$notificationPanel.childNodes.length > 0) width += (this.$notificationPanel.childNodes.length - 1) * 10;
  }
  this.elt.$tabbar.addStyle('right', width + 'px');
};
Object.defineProperty(TabviewRightCtnPlugin.prototype, 'tvTitle', {
  set: function set(value) {
    this.initCtn();
    this._title = value + '';
    if (!this.$title) {
      this.$title = _({
        "class": 'as-tabview-title',
        child: {
          text: ''
        }
      });
      this.$rightCtn.addChild(this.$title);
    }
    this.$title.firstChild.data = value;
    this.updateSize();
  },
  get: function get() {
    return this._title;
  }
});
Object.defineProperty(TabviewRightCtnPlugin.prototype, 'notificationPanel', {
  get: function get() {
    this.initCtn();
    if (!this.$notificationPanel) {
      this.$notificationPanel = _({
        tag: _NotificationPanel["default"]
      });
      this.$rightCtn.addChildBefore(this.$notificationPanel, this.$title);
      this.updateSize();
    }
    return this.$notificationPanel;
  }
});

/***/ }),

/***/ 98432:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _PreInput = _interopRequireDefault(__webpack_require__(76606));
__webpack_require__(97823);
var _FontColorButton = _interopRequireDefault(__webpack_require__(14560));
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _EventEmitter = __webpack_require__(46833);
var _utils = __webpack_require__(84512);
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _Icons = __webpack_require__(39285);
var _keyboard = __webpack_require__(95141);
var _Snackbar = _interopRequireDefault(__webpack_require__(96206));
var _Dom = __webpack_require__(64821);
var _Text = __webpack_require__(35844);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @typedef TEIDataRow
 * @property {TEIDataCell[]} cells
 */

/**
 * @typedef TEIData
 * @property {TEIDataRow[]} rows
 */

/**
 * @typedef TEIDataCell
 * @property {{color?:string, fontSize?: number, fontWeight?: ("bool"|"normal")}} [style]
 * @property {string} value
 */

/**
 * @extends AElement
 * @constructor
 */
function TableOfTextInput() {
  /**
   *
   * @type {TEITable}
   */
  this.teiTable = new TEITable(this);
  /**
   * @name data
   * @type {TEICell[]}
   */

  _OOP["default"].drillProperty(this, this.teiTable, ['minCol', 'maxCol', 'data', 'excelRichTextRows']);
}

/**
 *
 * @param name
 * @param value
 * @returns  {this}
 */
TableOfTextInput.prototype.addStyle = function (name, value) {
  if (name === 'display') {
    if (typeof value === "string" && value.indexOf('inline')) {
      this.addClass('as-inline');
    } else {
      this.removeClass('as-inline');
    }
    return this;
  } else return _AElement["default"].prototype.addStyle.apply(this, arguments);
};
TableOfTextInput.tag = 'TableOfTextInput'.toLowerCase();
TableOfTextInput.render = function () {
  return (0, _ACore._)({
    "class": 'as-table-of-text-input-wrapper',
    child: [{
      "class": 'as-table-of-text-input-content-ctn',
      child: {
        tag: 'table',
        extendEvent: ['change'],
        "class": 'as-table-of-text-input',
        child: [{
          tag: 'tbody',
          child: []
        }]
      }
    }]
  });
};
var _default = TableOfTextInput;
exports["default"] = _default;
_ACore["default"].install(TableOfTextInput);

/**
 *
 * @param {TableOfTextInput} wrapper
 * @constructor
 */
function TEITable(wrapper) {
  this._minCol = 3;
  this._maxCol = 3;
  this._minRow = 1;
  this._maxRow = 9;
  this.wrapper = wrapper;
  this.elt = (0, _ACore.$)('table', wrapper);
  this.$body = (0, _ACore.$)('tbody', this.elt);

  /**
   *
   * @type {TEIRow[]}
   */
  this.rows = [];
  this.formatTool = new TEIFormatTool(this);
}
TEITable.prototype.defaultData = {
  rows: [{
    cells: [{
      value: ''
    }, {
      value: ''
    }, {
      value: ''
    }]
  }]
};
TEITable.prototype.notifyChange = function (data) {
  this.elt.emit('change', Object.assign({
    type: 'change',
    target: this
  }, data), this.elt);
};
TEITable.prototype.calcCellPos = function () {
  var n = this.rows[0].cells.reduce(function (ac, cell) {
    return ac + cell.colspan;
  }, 0);
  var m = this.rows.length;
  var heights = Array(n).fill(0);
  var row, i, j, k;
  var cell, colspan, rowspan, colIdx;
  for (i = 0; i < m; ++i) {
    row = this.rows[i];
    colIdx = 0;
    for (j = 0; j < row.cells.length; ++j) {
      cell = row.cells[j];
      while (heights[colIdx] > i) {
        colIdx++;
      }
      colspan = cell.colspan;
      rowspan = cell.rowspan;
      cell.td.attr('data-col-idx', colIdx);
      for (k = 0; k < colspan; ++k) {
        heights[colIdx] = i + rowspan;
      }
    }
  }
};
Object.defineProperties(TEITable.prototype, {
  minCol: {
    /**
     * @this TableOfTextInput
     * @param value
     */
    set: function set(value) {
      if (!(0, _utils.isNaturalNumber)(value)) value = 1;
      value = Math.max(1, Math.floor(value));
      this._minCol = value;
    },
    get: function get() {
      return this._minCol;
    }
  },
  maxCol: {
    /**
     * @this TableOfTextInput
     * @param value
     */
    set: function set(value) {
      if (!(0, _utils.isNaturalNumber)(value)) value = 20;
      value = Math.min(20, Math.max(1, Math.floor(value)));
      this._maxCol = value;
    },
    get: function get() {
      return Math.max(this._minCol, this._maxCol);
    }
  },
  minRow: {
    /**
     * @this TableOfTextInput
     * @param value
     */
    set: function set(value) {
      if (!(0, _utils.isNaturalNumber)(value)) value = 1;
      value = Math.max(1, Math.floor(value));
      this._minRow = value;
    },
    get: function get() {
      return this._minRow;
    }
  },
  maxRow: {
    /**
     * @this TableOfTextInput
     * @param value
     */
    set: function set(value) {
      if (!(0, _utils.isNaturalNumber)(value)) value = 20;
      value = Math.min(20, Math.max(1, Math.floor(value)));
      this._maxRow = value;
    },
    get: function get() {
      return Math.max(this._minRow, this._maxRow);
    }
  },
  data: {
    set: function set(value) {
      var _this = this;
      if (typeof value === "string") {
        value = {
          rows: [{
            cells: [{
              value: value
            }]
          }]
        };
      }
      value = (0, _generator.copyJSVariable)(value || this.defaultData);
      if (!(value.rows instanceof Array)) value.rows = (0, _generator.copyJSVariable)(this.defaultData.rows);
      value.rows.forEach(function (row) {
        if (!(row.cells instanceof Array)) {
          row.cells = [];
        }
        if (row.cells.length === 0) {
          row.cells.push({
            value: ''
          });
        }
      });
      this.rows.forEach(function (row) {
        return row.tr.remove();
      });
      this.rows = value.rows.map(function (rowData) {
        return new TEIRow(_this, rowData);
      });
      this.$body.addChild(this.rows.map(function (row) {
        return row.tr;
      }));
      this.calcCellPos();
    },
    get: function get() {
      return {
        rows: this.rows.map(function (row) {
          return row.data;
        })
      };
    }
  },
  excelRichTextRows: {
    get: function get() {
      var cBound = this.elt.getBoundingClientRect();
      var placeHolderElt;
      var renderSpace;
      if (!cBound.width || !cBound.height) {
        if (this.parentElement) {
          placeHolderElt = (0, _ACore._)({
            style: {
              display: 'none'
            }
          });
          this.selfReplace(placeHolderElt);
        }
        renderSpace = (0, _ACore._)({
          style: {
            position: 'fixed',
            zIndex: -1000,
            visibility: 'hidden',
            opacity: 0
          }
        }).addTo(document.body);
      }
      var textNodes = (0, _Text.getTextNodesIn)(this.elt).filter(function (t) {
        return !!t.data;
      });
      var lineHeight = 25.662879943847656;
      cBound = this.elt.getBoundingClientRect();
      var y0 = cBound.top + 4 + 3.2348480224609375;
      var textInfos = textNodes.reduce(function (ac, txt) {
        var cell = cellOf(txt);
        var style = cell.style["export"]();
        var bounds = (0, _utils.getTextNodeBounds)(txt);
        bounds.forEach(function (bound) {
          var excelData = {
            text: bound.text.replace(/\n+$/, '')
          };
          if (excelData.text.trim().length === 0) return;
          excelData.font = {
            'name': 'Calibri'
          };
          if (style.color) {
            excelData.font.color = {
              argb: 'ff' + _Color["default"].parse(style.color).toString('hex6').substring(1).toLowerCase()
            };
          }
          if (style.fontWeight === 'bold') {
            excelData.font.bold = true;
          }
          if (style.fontStyle === 'italic') {
            excelData.font.italic = true;
          }
          if (style.fontSize) {
            excelData.font.size = style.fontSize;
          }
          ac.push({
            rowIdx: Math.round((bound.rect.y - y0) / lineHeight),
            bound: bound.rect,
            text: excelData.text,
            excelData: excelData
          });
        });
        return ac;
      }, []);
      textInfos.sort(function (a, b) {
        if (a.rowIdx === b.rowIdx) {
          return a.bound.x - b.bound.x;
        } else {
          return a.bound.y - b.bound.y;
        }
      });
      var richTextRows = textInfos.reduce(function (ac, cr, i) {
        var rowIdx = cr.rowIdx;
        while (ac.richTextRows.length <= rowIdx) {
          ac.x = ac.x0;
          ac.richTextRows.push([]);
        }
        var marginTextL = Math.floor((cr.bound.x - ac.x) / 3.314239501953125);
        if (marginTextL > 0) {
          ac.richTextRows[ac.richTextRows.length - 1].push({
            text: ' '.repeat(marginTextL),
            font: {
              'name': 'Calibri'
            }
          });
        }
        ac.richTextRows[ac.richTextRows.length - 1].push(cr.excelData);
        ac.x = cr.bound.x + cr.bound.width;
        ac.y = cr.bound.y;
        return ac;
      }, {
        richTextRows: [],
        x: cBound.left + 5,
        x0: cBound.left + 5
      }).richTextRows;
      if (placeHolderElt) {
        placeHolderElt.selfReplace(this);
      }
      if (renderSpace) renderSpace.remove();
      return richTextRows;
    }
  }
});

/**
 *
 * @param {TEITable} table
 * @param  data
 * @constructor
 */
function TEIRow(table, data) {
  data = data || {};
  if (!(data.cells instanceof Array)) data.cells = [];
  this.table = table;
  this.tr = (0, _ACore._)('tr');
  /**
   *
   * @type {TEICell[]}
   */
  this.cells = [];
  this.data = data;
}
Object.defineProperty(TEIRow.prototype, 'data', {
  set: function set(data) {
    var _this2 = this;
    this.cells = data.cells.map(function (cellData) {
      return new TEICell(_this2, cellData);
    });
    this.tr.clearChild().addChild(this.cells.map(function (cell) {
      return cell.td;
    }));
  },
  get: function get() {
    return {
      cells: this.cells.map(function (cell) {
        return cell.data;
      })
    };
  }
});
var cellOf = function cellOf(node) {
  while (node) {
    if (node.teiCell) return node.teiCell;
    node = node.parentElement;
  }
  return null;
};

/**
 *
 * @param {TEIRow} row
 * @param {TEIDataCell} data
 * @constructor
 */
function TEICell(row, data) {
  var _this3 = this;
  this.row = row;
  this.table = row.table;
  this.td = (0, _ACore._)({
    tag: 'td',
    "class": 'as-table-of-text-input-cell',
    on: {
      click: function click(event) {
        if (event.target === _this3.td) _this3.focus();
      }
    },
    child: {
      tag: _PreInput["default"],
      attr: {
        spellcheck: 'false'
      },
      props: {
        teiCell: this
      },
      on: {
        focus: function focus() {
          _this3.table.formatTool.onFocus(_this3);
        },
        blur: function blur() {
          _this3.table.formatTool.onBlur(_this3);
        },
        change: function change(event) {
          if (event.originalEvent) _this3.table.elt.emit('change', {
            type: 'change',
            target: _this3.table,
            cell: _this3
          }, _this3.table.elt);
        }
      }
    }
  });
  this.$input = (0, _ACore.$)('preinput', this.td);
  this.data = data;
  this.style = new _Attributes["default"](this);
  Object.assign(this.style, data.style);
  this.style.loadAttributeHandlers(this.styleHandlers);
}
TEICell.prototype.focus = function () {
  this.$input.focus();
  var textNode = (0, _Text.getTextNodesIn)(this.$input).pop();
  if (!textNode) return;
  var range = document.createRange();
  range.setStart(textNode, textNode.data.length);
  range.setEnd(textNode, textNode.data.length);
  var sel = getSelection();
  sel.removeAllRanges();
  sel.addRange(range);
};
TEICell.prototype.remove = function () {
  this.td.remove();
  var idx = this.table.cells.indexOf(this);
  if (idx >= 0) this.table.cells.splice(idx, 1);
};
TEICell.prototype.styleHandlers = {
  fontWeight: {
    set: function set(value) {
      if (value === 'bold') {
        this.td.addClass('as-bold');
      } else {
        this.td.removeClass('as-bold');
      }
    },
    get: function get() {
      if (this.td.hasClass('as-bold')) return 'bold';
      return 'normal';
    },
    "export": function _export() {
      if (this.td.hasClass('as-bold')) return 'bold';
      return undefined;
    }
  },
  fontStyle: {
    set: function set(value) {
      if (value === 'italic') {
        this.td.addClass('as-italic');
      } else {
        this.td.removeClass('as-italic');
      }
    },
    get: function get() {
      if (this.td.hasClass('as-italic')) return 'italic';
      return 'normal';
    },
    "export": function _export() {
      if (this.td.hasClass('as-italic')) return 'italic';
      return undefined;
    }
  },
  fontSize: {
    set: function set(value) {
      if (typeof value === "string") value = parseInt(value.replace(/[^0-9.]/g, ''), 10);
      if (!(0, _utils.isRealNumber)(value)) value = 11;
      value = Math.abs(value);
      value = value || 11;
      this.td.addStyle('font-size', value + 'pt');
      return value;
    },
    get: function get(ref) {
      var value = ref.get();
      return value || 11;
    },
    "export": function _export(ref) {
      var value = ref.get();
      if (value === 11) value = undefined;
      return value || undefined;
    }
  },
  color: {
    set: function set(value) {
      try {
        var cValue = _Color["default"].parse(value);
        value = cValue.toString('hex6');
      } catch (err) {
        value = '#000000';
      }
      this.td.addStyle('color', value);
      return value;
    },
    get: function get(ref) {
      return ref.get() || '#000000';
    },
    "export": function _export(ref) {
      var value = ref.get();
      if (value === '#000000') value = undefined;
      return value || undefined;
    }
  },
  textAlign: {
    set: function set(value) {
      if (!['left', 'right', 'center'].includes(value)) value = 'left';
      this.td.addStyle('text-align', value);
      return value;
    },
    get: function get(ref) {
      var value = ref.get();
      return value || 'left';
    },
    "export": function _export(ref) {
      var value = ref.get();
      if (value === 'left') value = undefined;
      return value;
    }
  }
};
Object.defineProperty(TEICell.prototype, "data", {
  set: function set(value) {
    value = value || {};
    if (typeof value === "string") value = {
      value: value
    };
    if (typeof value.value === "string") {
      this.$input.value = value.value;
    } else {
      this.$input.value = "";
    }
  },
  get: function get() {
    var res = {};
    res.value = this.$input.value;
    res.style = this.style["export"]();
    Object.keys(res.style).forEach(function (key) {
      if (res.style[key] === undefined) delete res.style[key];
    });
    return res;
  }
});
Object.defineProperties(TEICell.prototype, {
  colspan: {
    set: function set(value) {},
    get: function get() {
      var value = this.td.attr('colspan') || '1';
      value = parseInt(value);
      if ((0, _utils.isNaturalNumber)(value)) return value;
      return 1;
    }
  },
  rowspan: {
    set: function set(value) {},
    get: function get() {
      var value = this.td.attr('rowspan') || '1';
      value = parseInt(value);
      if ((0, _utils.isNaturalNumber)(value)) return value;
      return 1;
    }
  },
  colpos: {
    get: function get() {}
  },
  rowpos: {
    get: function get() {}
  }
});
function TEIFormatTool(table) {
  var _this4 = this;
  Object.keys(TEIFormatTool.prototype).filter(function (k) {
    return k.startsWith('ev_');
  }).forEach(function (k) {
    return _this4[k] = _this4[k].bind(_this4);
  });
  this.table = table;
  this.table.elt.on('keydown', this.ev_keydown);
  this.$tool = (0, _ACore._)({
    "class": 'as-table-of-text-input-tool',
    child: [{
      tag: 'numberinput',
      "class": 'as-table-of-text-input-tool-font-size',
      props: {
        value: 14
      },
      attr: {
        title: 'Ctrl+< | Ctrl+>'
      }
    }, {
      tag: 'button',
      attr: {
        title: 'Ctrl+B'
      },
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-bold' /*, 'as-checked'*/],
      child: 'span.mdi.mdi-format-bold'
    }, {
      tag: 'button',
      attr: {
        title: 'Ctrl+I'
      },
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-italic'],
      child: 'span.mdi.mdi-format-italic'
    }, {
      tag: _FontColorButton["default"]
    }, {
      tag: 'button',
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-text-align'],
      child: 'span.mdi.mdi-format-align-left',
      attr: {
        'data-align': 'left',
        title: 'Ctrl+L'
      }
    }, {
      tag: 'button',
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-text-align'],
      child: 'span.mdi.mdi-format-align-center',
      attr: {
        'data-align': 'center',
        title: 'Ctrl+E'
      }
    }, {
      tag: 'button',
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-text-align'],
      child: 'span.mdi.mdi-format-align-right',
      attr: {
        'data-align': 'right',
        title: 'Ctrl+R'
      }
    }, {
      tag: 'button',
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
      child: 'span.mdi.mdi-table-column-plus-before',
      attr: {
        'data-command': 'left'
      }
    }, {
      tag: 'button',
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
      child: 'span.mdi.mdi-table-column-plus-after',
      attr: {
        'data-command': 'right'
      }
    }, {
      tag: 'button',
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
      child: 'span.mdi.mdi-table-row-plus-before',
      attr: {
        'data-command': 'above'
      }
    }, {
      tag: 'button',
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-command'],
      child: 'span.mdi.mdi-table-row-plus-after',
      attr: {
        'data-command': 'bellow'
      }
    }, {
      tag: 'button',
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-command', 'as-variant-danger'],
      attr: {
        'data-command': 'removeCol'
      },
      child: {
        tag: 'span',
        "class": ['mdi', 'mdi-table-column-remove']
      }
    }, {
      tag: 'button',
      "class": ['as-transparent-button', 'as-table-of-text-input-tool-command', 'as-variant-danger'],
      attr: {
        'data-command': 'removeRow'
      },
      child: {
        tag: 'span',
        "class": ['mdi', 'mdi-table-row-remove']
      }
    }]
  });
  this.table.wrapper.addChildBefore(this.$tool, this.table.wrapper.firstChild);
  this.$fontSize = (0, _ACore.$)('.as-table-of-text-input-tool-font-size', this.$tool).on('change', this.ev_fontSizeChange);
  this.$bold = (0, _ACore.$)('.as-table-of-text-input-tool-bold', this.$tool).on('click', this.ev_clickBold);
  this.$italic = (0, _ACore.$)('.as-table-of-text-input-tool-italic', this.$tool).on('click', this.ev_clickItalic);
  this.$fontColor = (0, _ACore.$)(_FontColorButton["default"].tag, this.$tool).on('submit', this.ev_fontColorSubmit);
  this.$alignBtns = (0, _ACore.$$)('.as-table-of-text-input-tool-text-align', this.$tool).reduce(function (ac, btn) {
    var value = btn.attr('data-align');
    btn.on('click', function (ev) {
      _this4.ev_clickAlign(value, ev);
    });
    ac[value] = btn;
    return ac;
  }, {});
  this.$commandBtns = (0, _ACore.$$)('.as-table-of-text-input-tool-command', this.$tool).reduce(function (ac, btn) {
    var value = btn.attr('data-command');
    btn.on('click', function (ev) {
      _this4.commands[value].exec.call(_this4);
      // this.ev_clickInsert(value, ev);
    });

    ac[value] = btn;
    return ac;
  }, {});
  // this.$removeBtn = $('.as-table-of-text-input-tool-remove-col', this.$tool)
  //     .on('click', this.ev_clickRemove);

  this.focusCell = null;
  this.table.elt.on('change', function () {
    return _this4.updateAvailableCommands();
  });
}
TEIFormatTool.prototype.commands = {
  left: {
    /**
     * @this TEIFormatTool
     */
    available: function available() {
      return this.focusCell.row.cells.length < this.table.maxCol;
    },
    /**
     * @this TEIFormatTool
     */
    exec: function exec() {
      var idx = this.focusCell.row.cells.indexOf(this.focusCell);
      this.table.rows.forEach(function (row) {
        var newCell = new TEICell(row, {
          value: ''
        });
        row.tr.addChildBefore(newCell.td, row.cells[idx].td);
        row.cells.splice(idx, 0, newCell);
      });
      this.table.elt.emit('change', {
        type: 'change',
        target: this.table
      }, this.table.elt);
    }
  },
  right: {
    /**
     * @this TEIFormatTool
     */
    exec: function exec() {
      var idx = this.focusCell.row.cells.indexOf(this.focusCell);
      this.table.rows.forEach(function (row) {
        var newCell = new TEICell(row, {
          value: ''
        });
        row.tr.addChildAfter(newCell.td, row.cells[idx].td);
        row.cells.splice(idx + 1, 0, newCell);
      });
      this.table.elt.emit('change', {
        type: 'change',
        target: this.table
      }, this.table.elt);
    }
  },
  above: {
    /**
     * @this TEIFormatTool
     */
    available: function available() {
      return this.table.rows.length < this.table.maxRow;
    },
    /**
     * @this TEIFormatTool
     */
    exec: function exec() {
      if (!this.focusCell) return;
      var colN = this.table.rows[0].cells.length;
      var focusRow = this.focusCell.row;
      var idx = this.table.rows.indexOf(focusRow);
      var newRow = new TEIRow(this.table, {
        cells: Array(colN).fill().map(function () {
          return {
            value: ''
          };
        })
      });
      this.table.rows.splice(idx, 0, newRow);
      this.table.$body.addChildBefore(newRow.tr, focusRow.tr);
      this.table.notifyChange({
        newRow: newRow
      });
    }
  },
  bellow: {
    /**
     * @this TEIFormatTool
     */
    exec: function exec() {
      if (!this.focusCell) return;
      var colN = this.table.rows[0].cells.length;
      var focusRow = this.focusCell.row;
      var idx = this.table.rows.indexOf(focusRow);
      var newRow = new TEIRow(this.table, {
        cells: Array(colN).fill().map(function () {
          return {
            value: ''
          };
        })
      });
      this.table.rows.splice(idx + 1, 0, newRow);
      this.table.$body.addChildAfter(newRow.tr, focusRow.tr);
      this.table.notifyChange({
        newRow: newRow
      });
    }
  },
  removeCol: {
    /**
     * @this TEIFormatTool
     */
    available: function available() {
      return this.table.minCol < this.focusCell.row.cells.length;
    },
    /**
     * @this TEIFormatTool
     */
    exec: function exec() {
      if (!this.focusCell) return;
      var focusRow = this.focusCell.row;
      var idx = focusRow.cells.indexOf(this.focusCell);
      this.table.rows.forEach(function (row) {
        var cell = row.cells[idx];
        cell.td.remove();
        row.cells.splice(idx, 1);
      });
      this.table.elt.emit('change', {
        type: 'change',
        target: this.table
      }, this.table.elt);
      var cellNext = focusRow.cells[idx - 1] || focusRow.cells[idx];
      if (cellNext) cellNext.focus();
    }
  },
  removeRow: {
    /**
     * @this TEIFormatTool
     */
    available: function available() {
      return this.table.minRow < this.table.rows.length;
    },
    /**
     * @this TEIFormatTool
     */
    exec: function exec() {
      if (!this.focusCell) return;
      var focusRow = this.focusCell.row;
      var idx = this.table.rows.indexOf(focusRow);
      var colIdx = focusRow.cells.indexOf(this.focusCell);
      focusRow.tr.remove();
      this.table.rows.splice(idx, 1);
      this.table.elt.emit('change', {
        type: 'change',
        target: this.table
      }, this.table.elt);
      var nextRow = this.table.rows[idx] || this.table.rows[idx - 1];
      var nexCell;
      if (nextRow) {
        nexCell = nextRow.cells[colIdx];
        if (nexCell) nexCell.focus();
      }
    }
  }
};
TEIFormatTool.prototype.commands.right.available = TEIFormatTool.prototype.commands.left.available;
TEIFormatTool.prototype.commands.bellow.available = TEIFormatTool.prototype.commands.above.available;
TEIFormatTool.prototype.onFocus = function (cell) {
  var _this5 = this;
  if (this.focusCell !== cell && this.focusCell) {
    this.focusCell.td.removeClass('as-focus');
  }
  if (!this.focusCell) {
    setTimeout(function () {
      document.addEventListener('click', _this5.ev_clickOut);
    }, 30);
  }
  this.focusCell = cell;
  this.focusCell.td.addClass('as-focus');
  this.$fontSize.value = this.focusCell.style.fontSize;
  if (this.focusCell.style.fontWeight === 'bold') this.$bold.addClass('as-checked');else this.$bold.removeClass('as-checked');
  if (this.focusCell.style.fontStyle === 'italic') this.$italic.addClass('as-checked');else this.$italic.removeClass('as-checked');
  this.$fontColor.value = this.focusCell.style.color;
  var textAlign = this.focusCell.style.textAlign;
  for (var align in this.$alignBtns) {
    if (align === textAlign) {
      this.$alignBtns[align].addClass('as-checked');
    } else {
      this.$alignBtns[align].removeClass('as-checked');
    }
  }
  this.updateAvailableCommands();
};
TEIFormatTool.prototype.updateAvailableCommands = function () {
  var _this6 = this;
  Object.keys(this.$commandBtns).forEach(function (key) {
    var available = _this6.focusCell && _this6.commands[key].available.call(_this6);
    _this6.$commandBtns[key].disabled = !available;
  });
};
TEIFormatTool.prototype.onBlur = function (cell) {};
TEIFormatTool.prototype.ev_clickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.table.wrapper, event)) return;
  if (this.focusCell) {
    this.focusCell.td.removeClass('as-focus');
    this.focusCell = null;
  }
  document.removeEventListener('click', this.ev_clickOut);
};
TEIFormatTool.prototype.ev_fontSizeChange = function () {
  if (!this.focusCell) return;
  var prevValue = this.focusCell.style.fontSize;
  var newValue = this.$fontSize.value;
  if (newValue !== prevValue) {
    this.focusCell.style.fontSize = newValue;
    this.table.elt.emit('change', {
      type: 'change',
      target: this.table,
      cell: this
    }, this);
  }
};
TEIFormatTool.prototype.ev_clickBold = function () {
  if (this.$bold.hasClass('as-checked')) {
    this.$bold.removeClass('as-checked');
    this.focusCell.style.fontWeight = 'normal';
  } else {
    this.$bold.addClass('as-checked');
    this.focusCell.style.fontWeight = 'bold';
  }
  this.table.elt.emit('change', {
    type: 'change',
    target: this.table,
    cell: this
  }, this);
};
TEIFormatTool.prototype.ev_clickItalic = function () {
  if (!this.focusCell) return;
  if (this.$italic.hasClass('as-checked')) {
    this.$italic.removeClass('as-checked');
    this.focusCell.style.fontStyle = 'normal';
  } else {
    this.$italic.addClass('as-checked');
    this.focusCell.style.fontStyle = 'italic';
  }
  this.table.elt.emit('change', {
    type: 'change',
    target: this.table,
    cell: this
  }, this);
};
TEIFormatTool.prototype.ev_fontColorSubmit = function () {
  if (!this.focusCell) return;
  var prevColor = this.focusCell.style.color;
  var newColor = this.$fontColor.value;
  if (prevColor !== newColor) {
    this.focusCell.style.color = newColor;
    this.table.elt.emit('change', {
      type: 'change',
      target: this.table,
      cell: this
    }, this);
  }
};
TEIFormatTool.prototype.ev_clickAlign = function (newValue, event) {
  if (!this.focusCell) return;
  var prevValue = this.focusCell.style.textAlign;
  if (prevValue !== newValue) {
    this.$alignBtns[prevValue].removeClass('as-checked');
    this.$alignBtns[newValue].addClass('as-checked');
    this.focusCell.style.textAlign = newValue;
    this.table.elt.emit('change', {
      type: 'change',
      target: this.table,
      cell: this
    }, this);
  }
};
TEIFormatTool.prototype.ev_clickInsert = function (at, event) {
  if (!this.focusCell) return;
  var idx = this.table.cells.indexOf(this.focusCell);
  var bfIdx = at === 'left' ? idx : idx + 1;
  var newCell = new TEICell(this.table, {
    value: ''
  });
  if (bfIdx >= this.table.cells.length) {
    this.table.$row.addChild(newCell.td);
    this.table.cells.push(newCell);
  } else {
    this.table.$row.addChildBefore(newCell.td, this.table.cells[bfIdx].td);
    this.table.cells.splice(bfIdx, 0, newCell);
  }
  this.table.elt.emit('change', {
    type: 'change',
    target: this.table,
    cell: this
  }, this);
};
TEIFormatTool.prototype.ev_clickRemove = function () {
  if (!this.focusCell) return;
  this.focusCell.remove();
  this.table.elt.emit('change', {
    type: 'change',
    target: this.table,
    cell: this.focusCell
  }, this.table);
  this.focusCell = null;
};
TEIFormatTool.prototype.ev_keydown = function (event) {
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  switch (key) {
    case 'ctrl-b':
      this.ev_clickBold(event);
      event.preventDefault();
      break;
    case 'ctrl-i':
      this.ev_clickItalic();
      event.preventDefault();
      break;
    case 'ctrl-l':
      this.ev_clickAlign('left', event);
      event.preventDefault();
      break;
    case 'ctrl-e':
      this.ev_clickAlign('center', event);
      event.preventDefault();
      break;
    case 'ctrl-r':
      this.ev_clickAlign('right', event);
      event.preventDefault();
      break;
  }
};

/***/ }),

/***/ 98775:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(57818);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _utils = __webpack_require__(84512);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function TableVScroller() {
  var _this = this;
  var thisTS = this;
  this.$attachHook = $('attachhook', this);
  this.$attachHook.updateSize = function () {
    _this.updateStyle();
    _this.updateSize();
  };
  this.sync = new Promise(function (rs) {
    thisTS.$attachHook.on('attached', rs);
  });
  this.$viewport = $('.absol-table-vscroller-viewport', this);
  this.$attachHook.on('attached', function () {
    _Dom["default"].addToResizeSystem(thisTS.$attachHook);
    this.updateSize();
  });
  this.$topTable = $('.absol-table-vscroller-head', this);
  this.$headLine = $('.absol-table-vscroller-head-line', this);
  this.swappedContentPairs = [];
}
TableVScroller.tag = 'TableVScroller'.toLowerCase();
TableVScroller.render = function () {
  return _({
    "class": 'absol-table-vscroller',
    child: ['.absol-table-vscroller-viewport', 'table.absol-table-vscroller-head', '.absol-table-vscroller-head-line', 'attachhook']
  });
};
TableVScroller.prototype.clearChild = function () {
  this.$viewport.clearChild();
  this.$topTable.clearChild();
};
TableVScroller.prototype.addChild = function (elt) {
  if (this.$viewport.childNodes.length == 0) {
    this.$table = elt.$table || $('table', elt);
    if (this.$table) {
      this.$viewport.addChild(elt);
      this.update();
    } else {
      throw new Error('Element must be a table!');
    }
  } else {
    throw new Error("Only 1 table accepted!");
  }
};
TableVScroller.prototype._trackBackgroundColor = function (element) {
  var current = this.$thead;
  var res;
  while (current && !res && res != 'rgba(0, 0, 0, 0)') {
    res = window.getComputedStyle(element).getPropertyValue('background-color');
    current = current.parentNode;
  }
  if (res == 'rgba(0, 0, 0, 0)') return 'white';
  return res;
};
TableVScroller.prototype.updateStyle = function () {
  if (!this.$thead) return;
  var clazz = this.$table.attr('class');
  if (clazz) {
    clazz = clazz.trim().split(/\s+/);
    for (var i = 0; i < clazz.length; ++i) {
      this.$topTable.addClass(clazz[i]);
    }
  }
  var bgColor = this._trackBackgroundColor(this.$thead);
  this.$topTable.addStyle('background-color', bgColor);
};
TableVScroller.prototype.updateSize = function () {
  if (!this.$thead) return;
  var theadBound = this.$thead.getBoundingClientRect();
  var tableBound = this.$table.getBoundingClientRect();
  this.$topTable.addStyle({
    width: tableBound.width + 'px',
    height: theadBound.height + 'px'
  });
  this.$headLine.addStyle({
    top: theadBound.height + 'px',
    maxWidth: tableBound.width + 'px'
  });
  if (this.$viewport.clientHeight < this.$viewport.scrollHeight) {
    this.addClass('scroll-v');
  } else {
    this.removeClass('scroll-v');
  }
  var realNodes = this.$tr.childNodes;
  var topNodes = this.$topTr.childNodes;
  var widthStyle;
  var displayStyle;
  for (var i = 0; i < realNodes.length; ++i) {
    if (!realNodes[i].tagName) continue;
    widthStyle = $(realNodes[i]).getComputedStyleValue('width');
    displayStyle = realNodes[i].getComputedStyleValue('display');
    if (!widthStyle) {
      widthStyle = realNodes[i].getBoundingClientRect().width;
      if (!widthStyle) {
        displayStyle = 'none';
      }
      widthStyle += 'px';
    }
    // console.trace(getAncestorElementOf(realNodes[i]), widthStyle, displayStyle)
    $(topNodes[i]).attr('style', realNodes[i].attr('style')).addStyle('width', widthStyle).addStyle('display', displayStyle);
  }
  this.$topTable.removeStyle('display');
};
TableVScroller.prototype.updateContent = function () {
  var _this2 = this;
  this.swappedContentPairs.forEach(function (originElt, copyElt) {
    _this2.swappedContentPairs.push([originElt, copyElt]);
  });
  this.swappedContentPairs = [];
  var elt = this.$table;
  this.$thead = $('thead', elt);
  this.$tr = $('tr', this.$thead);
  this.$topThead = (0, _Dom.depthClone)(this.$thead, function (originElt, copyElt) {
    if (originElt.tagName === 'TH') {
      (0, _utils.swapChildrenInElt)(originElt, copyElt);
      _this2.swappedContentPairs.push([originElt, copyElt]);
    }
  });
  this.$topTr = $('tr', this.$topThead);
  this.$topTable.clearChild().addChild(this.$topThead).addStyle('display', 'none');
};
TableVScroller.prototype.update = function () {
  if (!this.$table) return;
  this.updateContent();
  this.updateStyle();
  this.updateSize();
};
_ACore["default"].install(TableVScroller);
var _default = TableVScroller;
exports["default"] = _default;

/***/ }),

/***/ 52072:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(99218);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _SelectMenu = _interopRequireDefault(__webpack_require__(20834));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 *
 *  @augments HTMLTextAreaElement
 *  @augments AElement
 *
 * @constructor
 */
function TextArea2() {
  this.on('keydown', this.eventHandler.keydown);
  this.on('paste', this.eventHandler.paste);
  this.on('cut', this.eventHandler.paste);
}
TextArea2.tag = 'TextArea2'.toLowerCase();
TextArea2.render = function () {
  return _('textarea.absol-textarea2');
};
TextArea2.getRenderPre = function () {
  if (!TextArea2.$preSpace) {
    TextArea2.$preSpace = _('textarea').addStyle({
      'overflow': 'hidden',
      'height': '12px',
      'resize': 'none'
    }).addTo(_SelectMenu["default"].getRenderSpace());
  }
  return TextArea2.$preSpace;
};
TextArea2.prototype.updateSize = function () {
  var heightStyle = this._measureHeight(this.value);
  this.addStyle('--content-height', heightStyle);
};
TextArea2.eventHandler = {};
TextArea2.eventHandler.keydown = function (event) {
  if (event.altKey || event.ctrlKey) return;
  var key = event.key || String.fromCharCode(event.which || event.keyCode);
  var selectPost = this.getInputSelection();
  var leftText = this.value.substring(0, selectPost.start);
  var rightText = this.value.substring(selectPost.end);
  var middText = '';
  if (key == 'Enter') {
    middText = '\n';
  } else if (key == 'Backspace') {
    if (leftText.length > 0) {
      leftText = leftText.substring(0, leftText.length - 1);
    }
  } else if (key == 'Delete') {
    if (selectPost.start < selectPost.end) {
      middText = '';
    } else if (rightText.length > 0) {
      rightText = rightText.substring(1);
    }
  } else if (key.length == 1) {
    //char
    middText = key;
  } else {
    return;
  }
  var newText = leftText + middText + rightText;
  var heightStyle = this._measureHeight(newText);
  this.addStyle('--content-height', heightStyle);
};
TextArea2.eventHandler.paste = function (event) {
  // var text  = 
  var cl = event.clipboardData || window.clipboardData;
  var middText = cl.getData('Text') || '';
  var selectPost = this.getInputSelection();
  var leftText = this.value.substring(0, selectPost.start);
  var rightText = this.value.substring(selectPost.end);
  var newText = leftText + middText + rightText;
  var heightSyle = this._measureHeight(newText);
  this.addStyle('--content-height', heightSyle);
};
TextArea2.eventHandler.cut = function (event) {
  // var text  = 
  var cl = event.clipboardData || window.clipboardData;
  var selectPost = this.getInputSelection();
  var leftText = this.value.substring(0, selectPost.start);
  var rightText = this.value.substring(selectPost.end);
  var newText = leftText + rightText;
  var heightSyle = this._measureHeight(newText);
  this.addStyle('--content-height', heightSyle);
};
TextArea2.prototype._measureHeight = function (text) {
  var pre = TextArea2.getRenderPre();
  pre.addStyle('padding-left', this.getComputedStyleValue('padding-left'));
  pre.addStyle('padding-right', this.getComputedStyleValue('padding-right'));
  pre.addStyle('padding-top', this.getComputedStyleValue('padding-top'));
  pre.addStyle('padding-bottom', this.getComputedStyleValue('padding-bottom'));
  pre.addStyle('width', this.getComputedStyleValue('width'));
  pre.addStyle('height', this.getFontSize() + 'px');
  pre.addStyle('boder', this.getComputedStyleValue('boder'));
  pre.addStyle('font-size', this.getComputedStyleValue('font-size'));
  pre.addStyle('font-family', this.getComputedStyleValue('font-family'));
  pre.value = text;
  var result = pre.scrollHeight + 'px';
  return result;
};

/**
 * Return an object with the selection range or cursor position (if both have the same value)
 * @param {DOMElement} el A dom element of a textarea or input text.
 * @return {Object} reference Object with 2 properties (start and end) with the identifier of the location of the cursor and selected text.
 **/
TextArea2.prototype.getInputSelection = function () {
  var start = 0,
    end = 0,
    normalizedValue,
    range,
    textInputRange,
    len,
    endRange;
  if (typeof this.selectionStart == "number" && typeof this.selectionEnd == "number") {
    start = this.selectionStart;
    end = this.selectionEnd;
  } else {
    range = document.selection.createRange();
    if (range && range.parentElement() == this) {
      len = this.value.length;
      normalizedValue = this.value.replace(/\r\n/g, "\n");

      // Create a working TextRange that lives only in the input
      textInputRange = this.createTextRange();
      textInputRange.moveToBookmark(range.getBookmark());

      // Check if the start and end of the selection are at the very end
      // of the input, since moveStart/moveEnd doesn't return what we want
      // in those cases
      endRange = this.createTextRange();
      endRange.collapse(false);
      if (textInputRange.compareEndPoints("StartToEnd", endRange) > -1) {
        start = end = len;
      } else {
        start = -textInputRange.moveStart("character", -len);
        start += normalizedValue.slice(0, start).split("\n").length - 1;
        if (textInputRange.compareEndPoints("EndToEnd", endRange) > -1) {
          end = len;
        } else {
          end = -textInputRange.moveEnd("character", -len);
          end += normalizedValue.slice(0, end).split("\n").length - 1;
        }
      }
    }
  }
  return {
    start: start,
    end: end
  };
};
_ACore["default"].install(TextArea2);
var _default = TextArea2;
exports["default"] = _default;

/***/ }),

/***/ 39775:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(13367);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function TextClipboard() {
  this.$textarea = _('<textarea class="absol-text-clipboard" wrap="off" autocorrect="off"' + ' autocapitalize="off" spellcheck="false"></textarea>').addTo(this);
}
TextClipboard.tag = 'TextClipboard'.toLowerCase();
TextClipboard.render = function () {
  return _({
    style: {
      positon: 'fixed',
      opacity: 0,
      width: '1px',
      height: '1px',
      top: 0,
      left: 0
    }
  });
};
TextClipboard.prototype.copy = function (text) {
  this.$textarea.value = text;
  this.$textarea.select();
  document.execCommand('copy');
};
TextClipboard.prototype.paste = function () {
  this.$textarea.select();
  document.execCommand('paste');
};
_ACore["default"].install(TextClipboard);
var _default = TextClipboard;
exports["default"] = _default;

/***/ }),

/***/ 60268:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TextMeasureData = _interopRequireDefault(__webpack_require__(62738));
var _Dom = __webpack_require__(64821);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * best module
 * @constructor
 */
function TextMeasure() {
  this.$canvas = null;
  this.data = {};
  this._loadComputedData();
  // if the font is not in data, create it and copy console log to TextMeasureData.js
  // this._makeFontSize('Times New Roman');
  // this._makeFontSize('Arial');
}

TextMeasure.prototype.FONT_ARIAL = 'Arial';
TextMeasure.prototype.FONT_TIMES_NEW_ROMAN = 'Times New Roman';
TextMeasure.prototype.exportCode = function () {
  var _this = this;
  var obj = 'self.absol.TextMeasure';
  var code = ['if (!self.absol) self.absol = {};', obj + ' = {};', obj + '.data = ' + JSON.stringify(this.data) + ';'];
  Object.keys(this.constructor.prototype).forEach(function (key) {
    var val = _this[key];
    if (typeof val === "function") {
      code.push(obj + '.' + key + ' = ' + val + ';\n');
    } else if (!(0, _Dom.isDomNode)(val)) {
      //todo
    }
  });
  return code.join('\n');
};
TextMeasure.prototype._loadComputedData = function () {
  var thisO = this;
  this.data.chars = _TextMeasureData["default"].chars;
  this.data.fonts = Object.keys(_TextMeasureData["default"].fonts).reduce(function (ac, fontName) {
    var font = _TextMeasureData["default"].fonts[fontName];
    ac[fontName] = {
      width: thisO._valueDict2KeyDict(font.width),
      spacing: thisO._valueDict2KeyDict(font.spacing, 2),
      fontBoundingBoxAscent: font.fontBoundingBoxAscent,
      fontBoundingBoxDescent: font.fontBoundingBoxDescent
    };
    return ac;
  }, {});
};
TextMeasure.prototype._valueDict2KeyDict = function (dict, keyLength) {
  var thisO = this;
  return Object.keys(dict).reduce(function (ac, valueText) {
    var keys = thisO._splitKey(dict[valueText], keyLength || 1);
    var value = parseFloat(valueText);
    keys.reduce(function (ac1, key) {
      ac1[key] = value;
      return ac1;
    }, ac);
    return ac;
  }, {});
};
TextMeasure.prototype._keyDic2ValueDict = function (keyDict) {
  return Object.keys(keyDict).reduce(function (ac, cr) {
    var vKey = keyDict[cr].toString();
    ac[vKey] = ac[vKey] || '';
    ac[vKey] += cr;
    return ac;
  }, {});
};

/***
 *
 * @param s
 * @param l
 * @returns {string[]}
 * @private
 */
TextMeasure.prototype._splitKey = function (s, l) {
  var cArr = s.split('');
  if (!l || l < 2) return cArr;
  return cArr.reduce(function (ac, cr) {
    ac.last += cr;
    if (ac.last.length >= l) {
      ac.arr.push(ac.last);
      ac.last = '';
    }
    return ac;
  }, {
    arr: [],
    last: ''
  }).arr;
};
TextMeasure.prototype._array2keyDict = function (arrKey, arrVal) {
  return arrKey.reduce(function (ac, cr, i) {
    ac[cr] = arrVal[i];
    return ac;
  }, {});
};
TextMeasure.prototype._makeFontSize = function (fontName) {
  var thisO = this;
  var charList = _TextMeasureData["default"].chars;
  var fontMt = this.measureTextByCanvas("demo-abgH", '20px ' + fontName);
  var cWidthArr = charList.map(function (c) {
    return thisO.measureTextByCanvas(c).width;
  });
  var width = this._array2keyDict(charList, cWidthArr);
  var spacing = charList.reduce(function (ac, c1, i1) {
    return charList.reduce(function (ac1, c2, i2) {
      var d = thisO.measureTextByCanvas(c1 + c2).width - cWidthArr[i1] - cWidthArr[i2];
      if (d !== 0) ac1[c1 + c2] = d;
      return ac1;
    }, ac);
  }, {});
  _TextMeasureData["default"][fontName] = {
    width: thisO._keyDic2ValueDict(width),
    spacing: thisO._keyDic2ValueDict(spacing),
    fontBoundingBoxAscent: fontMt.fontBoundingBoxAscent,
    fontBoundingBoxDescent: fontMt.fontBoundingBoxDescent
  };
  this.data.fonts[fontName] = {
    width: width,
    spacing: spacing,
    fontBoundingBoxAscent: fontMt.fontBoundingBoxAscent,
    fontBoundingBoxDescent: fontMt.fontBoundingBoxDescent
  };

  // copy from console and paste it to TextMeasureData
  // console.log(fontName+":"+JSON.stringify(this.data.fonts[fontName]));
};

/***
 *
 * @param {string} text
 * @param {string} fontName
 * @param {number} fontSize
 * @return {number}
 */
TextMeasure.prototype.measureWidth = function (text, fontName, fontSize) {
  var width = this.data.fonts[fontName].width;
  var spacing = this.data.fonts[fontName].spacing;
  var res = 0;
  var prevC = text[0];
  var c = text[0];
  res += width[c] || 0;
  for (var i = 1; i < text.length; ++i) {
    c = text[i];
    res += spacing[prevC + c] || 0;
    res += width[c] || 0;
    prevC = c;
  }
  return res * fontSize / 20;
};
TextMeasure.prototype.wrapText = function (text, fontName, fontSize, maxWidth) {
  var width = this.data.fonts[fontName].width;
  var spacing = this.data.fonts[fontName].spacing;
  var lines = [];
  var currentLine = '';
  var currentWidth = 0;
  var prevC = null;
  var c, charWidth, charSpacing;
  for (var i = 0; i < text.length; i++) {
    c = text[i];
    charWidth = (width[c] !== undefined ? width[c] : width['a']) * fontSize / 20;
    charSpacing = prevC ? (spacing[prevC + c] || 0) * fontSize / 20 : 0;
    if (currentWidth + charWidth + charSpacing > maxWidth) {
      // Find the last space in the current line
      var lastSpaceIndex = currentLine.lastIndexOf(' ');
      if (lastSpaceIndex !== -1) {
        // Break at the last space
        lines.push(currentLine.slice(0, lastSpaceIndex).trim());
        currentLine = currentLine.slice(lastSpaceIndex + 1) + c;
        currentWidth = this.measureWidth(currentLine, fontName, fontSize);
      } else {
        // No spaces, break the word
        lines.push(currentLine.trim());
        currentLine = c;
        currentWidth = charWidth;
      }
    } else {
      currentLine += c;
      currentWidth += charWidth + charSpacing;
    }
    prevC = c;
  }
  if (currentLine.trim()) {
    lines.push(currentLine.trim());
  }
  return lines;
};

/***
 *
 * @param {string}text
 * @param {string=} font - without font-size, default is 20px
 * @returns {TextMetrics}
 */
TextMeasure.prototype.measureTextByCanvas = function (text, font) {
  if (!document || !document.createElement) throw new Error("Not support renderer!");
  var canvas = this.$canvas || (this.$canvas = document.createElement("canvas"));
  var context = canvas.getContext("2d");
  if (font) context.font = font;
  var metrics = context.measureText(text);
  return metrics;
};
var instance = new TextMeasure();
var _default = instance;
exports["default"] = _default;

/***/ }),

/***/ 62738:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _default = {
  chars: (" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~©´ÀÁÂÊÍÒÔÙÚ" + "ÝàáâãèéêìíðòóôõùúýĂăĐđĩũƠơƯưɐɔɕɗəɛɡɣɲʃʒʝʰˆː˘̪̀̃͡τφχẠạẢảẤấẦầẩẫẬậắằẳặẸẹẻẽếỀềểễỆệỉịọỏỐốồổỗỘộỚớỜờởỡỢợụỦủỨứỪừửữựỳỷỹ" + "–‘“”…♥♪【】🤣️�").split(''),
  fonts: {
    "Times New Roman": {
      "width": {
        "0": "̪̀̃͡️",
        "5": " ,.",
        "10": "0123456789#$*_bdghknopquvxyðòóôõùúýđũɗɡɣɲọỏốồổỗộụủỳỷỹ–♪",
        "20": "…【】",
        "6.66015625": "!()-I[]`fr´Íʃˆ˘‘",
        "8.1640625": "\"",
        "16.66015625": "%",
        "15.556640625": "&m",
        "3.603515625": "'",
        "11.279296875": "+<=>",
        "5.556640625": "/:;\\ijltìíĩʝːỉị",
        "8.876953125": "?acezàáâãèéêăɐɔɕəʒχạảấầẩẫậắằẳặẹẻẽếềểễệ“”",
        "18.41796875": "@",
        "14.443359375": "ADGHKNOQUVXYwÀÁÂÒÔÙÚÝĂĐƠẠẢẤẦẬỐỘỚỜỢỦ",
        "13.33984375": "BCR",
        "12.216796875": "ELTZÊẸỀỆ",
        "11.123046875": "FPS",
        "7.783203125": "Js",
        "17.783203125": "M",
        "18.876953125": "W",
        "9.384765625": "^",
        "9.599609375": "{}",
        "4.00390625": "|",
        "10.8203125": "~",
        "15.1953125": "©",
        "10.576171875": "ơớờởỡợ",
        "15.517578125": "ƯỨỪ",
        "10.83984375": "ưứừửữự",
        "8.3984375": "ɛ",
        "6.42578125": "ʰ",
        "8.037109375": "τ",
        "11.54296875": "φ",
        "11.875": "♥",
        "19.423828125": "🤣�"
      },
      "spacing": {
        "-0.7421875": "11W:W;",
        "-2.216796875": "ATP,P.VaVeVyWAY-YAYqYu",
        "-2.578125": "AVV,V.VAVoY,Y.",
        "-1.6015625": "AWF,F.RVTAWaWeWo",
        "-1.8359375": "AYAwAyLTLVPAT-V-W,W.Y:Y;Yp",
        "-1.484375": "AvFALWT,T.V:V;‘‘",
        "-2.001953125": "LYYaYeYoYv",
        "-1.103515625": "LyRWRYT;W-Yir.",
        "-1.201171875": "RTViVrVuWy",
        "-0.80078125": "RyWiWrWur,",
        "-0.99609375": "T:",
        "-0.361328125": "TOffrg",
        "-1.396484375": "TaTcTeToTsTwTy",
        "-0.703125": "TiTrTu",
        "-0.400390625": "r-",
        "-1.298828125": "v,v.w,w.y,y.",
        "-0.439453125": "χφ",
        "-4.443359375": "【̀【̃【̪【͡】̀】̃】̪】͡",
        "-11.38671875": "🤣"
      },
      "fontBoundingBoxAscent": 18,
      "fontBoundingBoxDescent": 4
    },
    "Arial": {
      "width": {
        "0": "̪̀̃͡️",
        "10": "Jcksvxyzýɔɕỳỷỹ♪",
        "20": "…【】",
        "11.123046875": "0123456789#$?L_abdeghnopquàáâãèéêðòóôõùúăđũɐɗəɡɲạảấầẩẫậắằẳặẹẻẽếềểễệọỏốồổỗộụủ–",
        "5.556640625": " !,./:;I[\\]ftÍìíĩː",
        "7.099609375": "\"",
        "17.783203125": "%",
        "13.33984375": "&ABEKPSVXYÀÁÂÊÝĂẠẢẤẦẬẸỀỆ",
        "3.818359375": "'",
        "6.66015625": "()-`r´ˆ˘“”",
        "7.783203125": "*",
        "11.6796875": "+<=>~",
        "20.302734375": "@",
        "14.443359375": "CDHNRUwÙÚĐỦ",
        "12.216796875": "FTZ",
        "15.556640625": "GOQÒÔỐỘ",
        "16.66015625": "Mm",
        "18.876953125": "W",
        "9.384765625": "^",
        "4.443359375": "ijlʃỉị‘",
        "6.6796875": "{}",
        "5.1953125": "|",
        "14.736328125": "©",
        "17.1484375": "ƠỚỜỢ",
        "13.115234375": "ơớờởỡợ",
        "17.080078125": "ƯỨỪ",
        "13.388671875": "ưứừửữự",
        "9.169921875": "ɛ",
        "10.01953125": "ɣ",
        "10.8984375": "ʒ",
        "7.94921875": "ʝ",
        "7.666015625": "ʰ",
        "7.900390625": "τ",
        "12.96875": "φ",
        "10.498046875": "χ",
        "11.875": "♥",
        "19.423828125": "🤣�"
      },
      "spacing": {
        "-1.484375": "11ATAVAYLTLVLWLYPATAVAVaYAYaYpv,v.y,y.",
        "-0.7421875": "AWLyTiTrTuV:V;VrVuVyWAWaYi",
        "-0.361328125": "AvAwAyRTRVRWRYTOViW-W:W;WeWoWrWuff‘‘",
        "-2.216796875": "F,F.T,T.T:T;TaTcTeToTs",
        "-1.103515625": "FAT-TwTyV-VeVoW,W.Y:YuYvr,r.w,w.",
        "-2.578125": "P,P.Y,Y.",
        "-1.8359375": "V,V.Y-YeYoYq",
        "-0.17578125": "Wy",
        "-1.298828125": "Y;",
        "1.11328125": "ìĩ",
        "-0.283203125": "τφφτ",
        "-0.537109375": "φχχφ",
        "-5": "【̀【̃【̪【͡】̀】̃】̪】͡",
        "-11.38671875": "🤣"
      },
      "fontBoundingBoxAscent": 18,
      "fontBoundingBoxDescent": 4
    }
  }
};
exports["default"] = _default;

/***/ }),

/***/ 46255:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _ChromeTime24Picker = _interopRequireDefault(__webpack_require__(2273));
var _datetime = __webpack_require__(58286);
var _EventEmitter = __webpack_require__(46833);
var _utils = __webpack_require__(84512);
var _TimeInput = _interopRequireDefault(__webpack_require__(17019));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _DelaySignal = _interopRequireDefault(__webpack_require__(81809));
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
var _MultiLanguageCSS = __webpack_require__(89074);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @extends AElement
 * @constructor
 */
function Time24Input() {
  var t = _LanguageSystem["default"].getText('txt_next_day');
  if (t) {
    t = '(' + t + ')';
    this.nextDateText = t;
  }
  this.domSignal = new _DelaySignal["default"]();
  this.$clockBtn = (0, _ACore.$)('.as-time-input-icon-btn', this);
  this.$text = (0, _ACore.$)('.as-time-input-text', this);
  this.$clearBtn = (0, _ACore.$)('button.as-time-input-clear-btn', this).on('click', this.clear.bind(this));
  this._hour = 0;
  this._minute = 0;
  this._nd = false;
  this._dayOffset = 0;
  this._format = 'HH:mm ND';
  this._firedValue = 'NOT_FIRED';
  this.textCtrl = new T24ITextController(this);
  this.notNull = true;
  this.dropdownCtn = new T24DropdownController(this);
  setTimeout(function () {}, 1000);

  /**
   * @type {string}
   * @name format
   * @memberof Time24Input#
   */

  /**
   * @type {number|null}
   * @name hour
   * @memberof Time24Input#
   */

  /**
   * @type {number|null}
   * @name minute
   * @memberof Time24Input#
   */

  /**
   * @type {number} always is a number, set dayOffset, keep value
   * @name dayOffset
   * @memberof Time24Input#
   */

  /**
   * computed from other
   * @type {number|null}
   * @name value
   * @memberof Time24Input#
   */

  /**
   * @type {boolean}
   * @name nd
   * @memberof Time24Input#
   */
}

Time24Input.tag = 'Time24Input'.toLowerCase();
Time24Input.prototype.nextDateText = '(Next day)';
Time24Input.render = function () {
  return (0, _ACore._)({
    "class": ['ac-time-input', 'as-time-24-input'],
    extendEvent: ['change'],
    child: [{
      tag: 'input',
      "class": 'as-time-input-text',
      attr: {
        type: 'text',
        spellcheck: "false"
      }
    }, {
      tag: 'button',
      "class": 'as-time-input-clear-btn',
      child: 'span.mdi.mdi-close-circle'
    }, {
      tag: 'button',
      "class": 'as-time-input-icon-btn',
      child: 'span.mdi.mdi-clock-outline'
    }]
  });
};
Time24Input.prototype._notifyChange = function (event) {
  this._firedValue = this.value;
  this.emit('change', {
    type: 'change',
    originalEvent: event && (event.originalEvent || event.originEvent) || event
  }, this);
};
Time24Input.prototype.notifyIfChange = function () {
  if (this._firedValue !== this.value) {
    this._notifyChange();
  }
};
Time24Input.prototype.clear = function (event) {
  if (this.value !== null && !this.notNull) {
    this.value = null;
    this._notifyChange(event);
  }
};
Time24Input.prototype.share = {
  $picker: null,
  /***
   * @type Time24Input
   */
  $holdingInput: null,
  $follower: null,
  $closeBtn: null
};
Time24Input.property = {};
Time24Input.property.hour = {
  set: function set(value) {
    if ((0, _utils.isRealNumber)(value)) {
      value = Math.round(value);
      if (value < 0) {
        value = Math.ceil(-value / 24) * 24 + value;
      }
      value = value % 24;
    } else {
      value = null;
    }
    this._hour = value;
    this.textCtrl.updateTextFromValue();
  },
  get: function get() {
    return this._hour;
  }
};
Time24Input.property.minute = {
  set: function set(value) {
    if ((0, _utils.isRealNumber)(value)) {
      value = Math.round(value);
      if (value < 0) {
        value = Math.ceil(-value / 60) * 60 + value;
      }
      value = value % 60;
    } else {
      value = null;
    }
    this._minute = value;
    this.textCtrl.updateTextFromValue();
  },
  get: function get() {
    return this._minute;
  }
};
Time24Input.property.nd = {
  set: function set(value) {
    this._nd = !!value;
    this.textCtrl.updateTextFromValue();
  },
  get: function get() {
    var value = this._nd;
    var hour = this.hour;
    var minute = this.minute;
    var dayOffset = this.dayOffset;
    var mh;
    if ((0, _utils.isRealNumber)(dayOffset)) {
      if ((0, _utils.isNaturalNumber)(hour)) {
        mh = (0, _utils.millisToClock)(dayOffset);
        if (hour < mh.hour) {
          value = true;
        } else if (hour === mh.hour) {
          if ((0, _utils.isRealNumber)(minute) && minute < mh.minute) {
            value = true;
          }
        }
      }
    }
    return value;
  }
};
Time24Input.property.dayOffset = {
  set: function set(dayOffset) {
    var value = this.value;
    this._dayOffset = (0, _utils.isRealNumber)(dayOffset) ? (0, _utils.normalizeMinuteOfMillis)(dayOffset) : 0;
    this.value = value;
  },
  get: function get() {
    if (this.notNull) {
      return this._dayOffset || 0;
    } else {
      return this._dayOffset;
    }
  }
};
Time24Input.property.value = {
  set: function set(value) {
    value = (0, _utils.isRealNumber)(value) ? (0, _utils.normalizeMinuteOfMillis)(Math.min(Math.max(value, 0), _datetime.MILLIS_PER_DAY)) : null;
    var clockTime;
    if (value !== null) {
      clockTime = (0, _utils.millisToClock)(value + this.dayOffset);
      this._hour = clockTime.hour;
      this._minute = clockTime.minute;
      if (value === _datetime.MILLIS_PER_DAY) this._nd = true;
    } else {
      this._hour = null;
      this._minute = null;
    }
    this.textCtrl.updateTextFromValue();
    this._firedValue = this.value;
  },
  get: function get() {
    if (!(0, _utils.isRealNumber)(this._hour) || !(0, _utils.isRealNumber)(this._minute)) return null;
    var mil = (0, _utils.clockToMillis)(this._hour, this._minute);
    if (mil < this.dayOffset || mil === this.dayOffset && this._nd) mil += _datetime.MILLIS_PER_DAY;
    mil -= this.dayOffset;
    return mil;
  }
};
Time24Input.property.displayTime = {
  get: function get() {
    var value = this.value;
    if ((0, _utils.isRealNumber)(value)) {
      return value + this.dayOffset;
    } else {
      return null;
    }
  }
};
Time24Input.property.notNull = {
  set: function set(value) {
    if (value) {
      if (this.value === null) {
        this.value = 0;
      }
      this.addClass('as-must-not-null');
    } else {
      this.removeClass('as-must-not-null');
    }
    this._firedValue = this.value;
  },
  get: function get() {
    return this.hasClass('as-must-not-null');
  }
};
Time24Input.property.disabled = {
  set: function set(value) {
    value = !!value;
    this._disabled = value;
    if (value) this.addClass('as-disabled');else this.removeClass('as-disabled');
    this.$text.disabled = value;
  },
  get: function get() {
    return this._disabled;
  }
};
Time24Input.property.readOnly = _TimeInput["default"].property.readOnly;
Time24Input.property.format = {
  set: function set(value) {
    this._format = value || 'HH:mm';
    if (this._format.indexOf('ND') < 0) {
      this._format = this._format.trimEnd() + ' ND';
    }
    this.textCtrl.updateTextFromValue();
  },
  get: function get() {
    return this._format;
  }
};
Time24Input.eventHandler = {};
Time24Input.eventHandler.pickerChange = function (event) {
  if (this.dayOffset === null) this.dayOffset = 0;
};
Time24Input.eventHandler.clickClockBtn = function () {
  this._attachPicker();
};
_ACore["default"].install(Time24Input);
var _default = Time24Input;
/**
 *
 * @param {Time24Input} elt
 * @constructor
 */
exports["default"] = _default;
function T24DropdownController(elt) {
  this.elt = elt;
  this.$clockBtn = elt.$clockBtn.on('click', this.ev_clickClockBtn.bind(this));
  this.disabledButtton = false;
  this.ev_clickOut = this.ev_clickOut.bind(this);
}
T24DropdownController.prototype.share = {
  $picker: null,
  $holdingInput: null,
  /**
   * @type {Follower|null}
   */
  $follower: null,
  /**
   * @type {T24DropdownController|null}
   */
  holder: null
};
T24DropdownController.prototype.prepare = function () {
  var share = this.share;
  if (share.$picker) return;
  (0, _MultiLanguageCSS.loadLanguageModule)();
  share.$picker = (0, _ACore._)({
    tag: _ChromeTime24Picker["default"].tag,
    on: {
      change: function change(event) {
        if (share.holder) {
          share.holder.onPickerChange(event);
        }
      }
    }
  });
  share.$picker.nextDateText = this.elt.nextDateText;
  /**
   * @type {Follower}
   */
  share.$follower = (0, _ACore._)({
    tag: 'follower',
    "class": ['as-chrome-time-24-picker-follower', 'as-dropdown-box-common-style'],
    child: [this.share.$picker, {
      "class": 'as-dropdown-box-footer',
      child: [{
        "class": 'as-dropdown-box-footer-right',
        child: ['<a data-ml-key="txt_close" class="as-select-list-box-close-btn"></a>']
      }]
    }]
  });
  share.$follower.cancelWaiting();
  this.share.$closeBtn = (0, _ACore.$)('.as-select-list-box-close-btn', this.share.$follower);
};
T24DropdownController.prototype.attach = function () {
  var _this = this;
  this.prepare();
  var share = this.share;
  if (share.holder) {
    share.holder.release();
  }
  share.holder = this;
  this.disabledButtton = true;
  share.$follower.addTo(document.body);
  share.$follower.followTarget = this.elt;
  share.$follower.addStyle('visibility', 'hidden');
  var hour = this.elt.hour;
  var min = this.elt.minute;
  var dayOffset = this.elt.dayOffset;
  share.$picker.dayOffset = dayOffset;
  var offsetClock = (0, _utils.millisToClock)(dayOffset);
  var value = 0;
  if ((0, _utils.isRealNumber)(hour)) {
    if (!(0, _utils.isRealNumber)(min)) {
      if (hour === offsetClock.hour) {
        min = offsetClock.hour;
      } else {
        min = 0;
      }
    }
    value = (0, _utils.clockToMillis)(hour, min) - dayOffset;
    if (value < 0) value += _datetime.MILLIS_PER_DAY;
  } else if ((0, _utils.isRealNumber)(min)) {
    if (min >= offsetClock.minute) {
      hour = offsetClock.hour;
    } else {
      hour = (offsetClock.hour + 1) % 24;
    }
    value = (0, _utils.clockToMillis)(hour, min) - dayOffset;
    if (value < 0) value += _datetime.MILLIS_PER_DAY;
  }
  if (value === 0 && this.elt.nd) value = _datetime.MILLIS_PER_DAY;
  share.$picker.value = value;
  setTimeout(function () {
    document.addEventListener('click', _this.ev_clickOut);
    share.$follower.removeStyle('visibility');
    share.$picker.scrollIntoSelected();
  }, 10);
};
T24DropdownController.prototype.release = function () {
  var _this2 = this;
  var share = this.share;
  if (share.holder !== this) return;
  share.$follower.remove();
  share.$follower.followTarget = null;
  share.holder = null;
  setTimeout(function () {
    _this2.disabledButtton = false;
    document.removeEventListener('click', _this2.ev_clickOut);
  }, 100);
};
T24DropdownController.prototype.onPickerChange = function (event) {
  this.elt.value = this.share.$picker.value;
  this.elt._notifyChange(event);
  _ResizeSystem["default"].requestUpdateSignal();
};
T24DropdownController.prototype.ev_clickClockBtn = function () {
  if (this.disabledButtton) return;
  this.attach();
};
T24DropdownController.prototype.ev_clickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.share.$follower, event) && !(0, _EventEmitter.hitElement)(this.share.$closeBtn, event)) return;
  this.release();
};
var STATE_NEW = 1;
var STATE_EDITED = 2;
var STATE_NONE = 0;

/**
 *
 * @param {Time24Input} elt
 * @constructor
 */
function T24ITextController(elt) {
  var _this3 = this;
  this.elt = elt;
  this.domSignal = elt.domSignal;
  this.$text = this.elt.$text;
  this.$text.on('keydown', this.ev_keydown.bind(this)).on('pointerup', this.autoSelect.bind(this)).on('blur', function () {
    _this3.loadValueFromInput();
    _this3.elt.notifyIfChange();
  });
  this.editingData = {};
}
T24ITextController.prototype.tokenRegex = /(\([^)]*\))|([^.\/:\-,\\\u0020\u0009\u000D\u200B]+)|([.\/:\-,\\]+)/i;
var CHAR_NBSP = "\xA0";
T24ITextController.prototype.tokenMap = {
  h: 'h',
  H: 'H',
  HH: 'H',
  hh: 'h',
  m: 'm',
  mm: 'm',
  a: 'a',
  ND: 'ND'
};
T24ITextController.prototype.makeTokenDict = function (s) {
  var rgx = new RegExp(this.tokenRegex.source, 'g');
  var rgxFormat = new RegExp(this.tokenRegex.source, 'g');
  var format = this.elt.format + ' ND';
  var tokenMap = this.tokenMap;
  var tokenMatched = rgx.exec(s);
  var formatToken = rgxFormat.exec(format);
  var text, ident;
  var idx;
  var res = {};
  while (tokenMatched && formatToken) {
    ident = formatToken[2];
    if (tokenMap[ident]) {
      text = tokenMatched[0];
      idx = tokenMatched.index;
      res[tokenMap[ident]] = {
        text: text,
        idx: idx,
        length: text.length,
        sourceText: s,
        value: ident === 'a' || ident === 'ND' ? text : parseInt(text)
      };
      if (ident === 'ND') {
        res[tokenMap[ident]].value = res[tokenMap[ident]].value !== CHAR_NBSP;
      }
    }
    tokenMatched = rgx.exec(s);
    formatToken = rgxFormat.exec(format);
  }
  Object.defineProperty(res, 'minute', {
    enumerable: false,
    get: function get() {
      var token = this['m'] || this['mm'];
      if (token) {
        return token.value;
      } else return null;
    }
  });
  Object.defineProperty(res, 'hour24', {
    enumerable: false,
    get: function get() {
      var token = this['H'];
      if (token && (0, _utils.isNaturalNumber)(token.value)) {
        return token.value;
      }
      token = this['h'];
      var tokenA = this['A'];
      if (token && (0, _utils.isNaturalNumber)(token.value)) {
        if (tokenA.value === 'PM') {
          return 12 + token.value % 12;
        } else return token.value % 12;
      }
      return null;
    }
  });
  return res;
};
T24ITextController.prototype.formatText = function (h, m, nd) {
  var _this4 = this;
  var text = this.elt.format;
  text = text.replace(new RegExp(this.tokenRegex.source, 'g'), function (all) {
    switch (all) {
      case 'm':
      case 'mm':
        return (0, _utils.isRealNumber)(m) ? (0, _utils.zeroPadding)(m, all.length) : all;
      case 'hh':
      case 'h':
        return (0, _utils.isRealNumber)(h) ? (0, _utils.zeroPadding)(h % 12 ? h : 12, all.length) : all;
      case 'HH':
      case 'H':
        return (0, _utils.isRealNumber)(h) ? (0, _utils.zeroPadding)(h, all.length) : all;
      case 'a':
        return (0, _utils.isRealNumber)(h) ? h > 12 ? 'PM' : 'AM' : 'all';
      case 'ND':
        return nd ? _this4.elt.nextDateText : CHAR_NBSP;
      default:
        return all;
    }
  });
  return text;
};
T24ITextController.prototype.updateTextFromValue = function () {
  var value = this.elt.value;
  var hour = this.elt.hour;
  var minute = this.elt.minute;
  var nd = this.elt.nd;
  var text = this.formatText(hour, minute, nd);
  if ((0, _utils.isRealNumber)(value)) {
    this.elt.removeClass('as-value-null');
  } else {
    this.elt.addClass('as-value-null');
  }
  this.$text.value = text;
};
T24ITextController.prototype.loadValueFromInput = function () {
  var tkDick = this.makeTokenDict(this.$text.value);
  var hour = NaN;
  var minute = NaN;
  var nd = false;
  if (tkDick.H) {
    hour = Math.min(23, Math.max(0, tkDick.H.value));
  } else if (tkDick.h) {
    hour = Math.min(12, Math.max(1, tkDick.h.value));
    if (tkDick.a && tkDick.a.value === 'PM') {
      hour += 12;
    }
  }
  if (tkDick.m) {
    minute = Math.min(59, Math.max(0, tkDick.m.value));
  }
  if (tkDick.nd) {
    nd = tkDick.nd.value;
  }
  this.elt._hour = hour;
  this.elt._minute = minute;
  this.elt._nd = nd;
};
T24ITextController.prototype.autoSelect = function () {
  var token = this.tokenAt(this.$text.selectionStart);
  var tokenEnd = this.tokenAt(this.$text.selectionEnd);
  if (token) {
    if (tokenEnd.idx === token.idx) {
      token.select();
      this.editingData.state = STATE_NEW;
    } else {
      this.$text.select();
      this.editingData.state = STATE_NONE;
    }
  }
};
T24ITextController.prototype.editPrevToken = function () {
  var token = this.tokenAt(this.$text.selectionStart);
  if (!token) return false;
  var cIdx = token.idx;
  for (var i = token.idx - 1; i >= 0; --i) {
    token = this.tokenAt(i);
    if (token && token.idx !== cIdx) {
      token.select();
      this.editingData.state = STATE_NEW;
      break;
    }
  }
};
T24ITextController.prototype.editNextToken = function () {
  var token = this.tokenAt(this.$text.selectionStart);
  if (!token) return false;
  var cIdx = token.idx;
  var l = this.$text.value.length;
  for (var i = token.idx + token.length; i < l; ++i) {
    token = this.tokenAt(i);
    if (token && token.idx !== cIdx) {
      token.select();
      this.editingData.state = STATE_NEW;
      break;
    }
  }
};
T24ITextController.prototype.tokenAt = function (start) {
  var tokenizedText = new TITokenizedText(this.$text.value, this.elt.format);
  var nearestDistance = Infinity;
  var nearestIdx = -1;
  var n = Math.min(tokenizedText.textTokens.length, tokenizedText.formatTokens.length);
  var i, textToken, formatToken;
  var distance;
  for (i = 0; i < n; ++i) {
    formatToken = tokenizedText.formatTokens[i];
    if (!(0, _utils.isDateTimeFormatToken)(formatToken.content)) continue;
    textToken = tokenizedText.textTokens[i];
    if (start >= textToken.idx && start < textToken.idx + textToken.length) {
      nearestIdx = i;
      nearestDistance = 0;
      break;
    }
    if (start < textToken.idx) {
      distance = textToken.idx - start;
      if (distance < nearestDistance) {
        nearestDistance = distance;
        nearestIdx = i;
      }
    }
    if (start >= textToken.idx + textToken.length) {
      distance = start - textToken.idx - textToken.length;
      if (distance < nearestDistance) {
        nearestDistance = distance;
        nearestIdx = i;
      }
    }
  }
  if (nearestIdx < 0) return null;
  formatToken = tokenizedText.formatTokens[nearestIdx];
  textToken = tokenizedText.textTokens[nearestIdx];
  var self = this;
  return {
    idx: textToken.idx,
    text: textToken.content,
    length: textToken.length,
    ident: formatToken.content,
    input: this.$text,
    sourceText: tokenizedText.text,
    // isAvailable: function () {
    //     return this.sourceText === this.input.value;
    // },
    select: function select() {
      this.input.setSelectionRange(this.idx, this.idx + this.length);
    },
    replace: function replace(newText, selecting) {
      tokenizedText.setTokenText(this.ident, newText);
      var hour = tokenizedText.getTokenText('HH') || tokenizedText.getTokenText('H');
      var minute = tokenizedText.getTokenText('mm') || tokenizedText.getTokenText('m');
      var nd = tokenizedText.getTokenText('ND') !== CHAR_NBSP;
      var newND = self.isNextDate(parseInt(hour, 10), parseInt(minute, 10), nd);
      if (newND !== nd) {
        tokenizedText.setTokenText('ND', newND ? self.elt.nextDateText : CHAR_NBSP);
      }
      this.input.value = tokenizedText.getText(true);
      this.length = newText.length;
      if (selecting) {
        this.select();
      }
    }
  };
};

/**
 *
 * @param h
 * @param m
 * @param nd - referent result if can not detect
 * @returns {boolean}
 */
T24ITextController.prototype.isNextDate = function (h, m, nd) {
  var dayOffset = this.elt.dayOffset;
  if (!(0, _utils.isNaturalNumber)(dayOffset)) return !!nd;
  var oH = Math.floor(dayOffset / 36e5);
  var oM = Math.floor(dayOffset / 6e4) % 60;
  if (!(0, _utils.isNaturalNumber)(h)) return !!nd;
  if (h < oH) return true;
  if (!(0, _utils.isNaturalNumber)(m)) return !!nd;
  if (h === oH) {
    if (m < oM) return true;
    if (m === oM) return !!nd;
    return false;
  }
};
T24ITextController.prototype.correctingInput = function () {
  //nothing todo now
};
T24ITextController.prototype.ev_keydown = function (event) {
  var token = this.tokenAt(this.$text.selectionStart);
  var endToken = this.tokenAt(this.$text.selectionEnd);
  // var tokenDict = this.makeTokenDict(this.$text.value);
  var format = this.elt.format;
  if (!token) {
    if (event.key === 'Enter') {
      this.correctingInput();
      this.loadValueFromInput();
      this.elt.notifyIfChange(event);
    }
    return;
  }
  var newTokenText;
  var value;
  if (event.key.startsWith('Arrow')) {
    event.preventDefault();
    switch (event.key) {
      case 'ArrowLeft':
        this.editPrevToken();
        break;
      case 'ArrowRight':
        this.editNextToken();
        break;
      case 'ArrowUp':
      case 'ArrowDown':
        switch (token.ident) {
          case "H":
          case "HH":
            value = parseInt(token.text);
            if (isNaN(value)) {
              this.editingData.H = event.key === 'ArrowUp' ? 0 : 23;
            } else {
              this.editingData.H = (value + (event.key === 'ArrowUp' ? 1 : 23)) % 24;
            }
            newTokenText = (0, _utils.zeroPadding)(this.editingData.H, token.ident.length);
            token.replace(newTokenText, true);
            break;
          case "hh":
          case 'h':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this.editingData.h = event.key === 'ArrowUp' ? 1 : 12;
            } else {
              this.editingData.h = 1 + (value + (event.key === 'ArrowUp' ? 0 : 10)) % 12;
            }
            newTokenText = this.editingData.h + '';
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case "mm":
          case 'm':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this.editingData.m = event.key === 'ArrowUp' ? 0 : 59;
            } else {
              this.editingData.m = (value + (event.key === 'ArrowUp' ? 1 : 59)) % 60;
            }
            newTokenText = this.editingData.m + '';
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case 'a':
            value = token.text;
            this.editingData.a = value === 'PM' ? "AM" : "PM";
            newTokenText = this.editingData.a;
            token.replace(newTokenText, true);
            break;
          case 'ND':
            value = token.text !== CHAR_NBSP;
            this.editingData.nd = !value;
            newTokenText = this.editingData.nd ? this.elt.nextDateText : CHAR_NBSP;
            token.replace(newTokenText, true);
            break;
        }
        break;
    }
  } else if (event.key === "Delete" || event.key === 'Backspace') {
    event.preventDefault();
    if (endToken.idx !== token.idx) {
      if (this.elt.notNull) {
        this.$text.value = (0, _datetime.formatDateTime)((0, _datetime.beginOfDay)(new Date()), format).replace('ND', CHAR_NBSP);
      } else {
        this.$text.value = format.replace('ND', CHAR_NBSP);
      }
      this.$text.select();
    } else {
      if (this.elt.notNull) {
        if (token.ident === 'ND') {
          token.replace(CHAR_NBSP, true);
        } else token.replace(token.ident === 'a' ? 'AM' : (0, _utils.zeroPadding)(token.ident === 'hh' || token.ident === 'h' ? 12 : 0, token.ident.length), true);
      } else {
        token.replace(token.ident, true);
      }
      if (event.key === "Delete") this.editNextToken();else this.editPrevToken();
    }
  } else if (event.key === "Enter" || event.key === 'Tab') {
    this.correctingInput();
    this.loadValueFromInput();
    this.elt.notifyIfChange(event);
  } else if (event.ctrlKey) {
    switch (event.key) {
      case 'a':
      case 'A':
        break;
      case 'c':
      case 'C':
        break;
      case 'x':
      case 'X':
        this.domSignal.once('clear_value', function () {
          this.$text.value = format;
          this.$text.select();
        }.bind(this));
        this.domSignal.emit('clear_value');
        break;
      default:
        event.preventDefault();
    }
  } else if (event.key.match(/^[0-9]$/g)) {
    event.preventDefault();
    var dVal = parseInt(event.key);
    if (this.editingData.state === STATE_NEW) {
      switch (token.ident) {
        case 'm':
        case 'mm':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this.editingData.state = STATE_EDITED;
          if (dVal > 5) {
            this.editNextToken();
          }
          break;
        case 'h':
        case 'hh':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this.editingData.state = STATE_EDITED;
          if (dVal > 1) {
            this.editNextToken();
          }
          break;
        case 'H':
        case 'HH':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this.editingData.state = STATE_EDITED;
          if (dVal > 2) {
            this.editNextToken();
          }
          break;
        case 'ND':
          value = token.text !== CHAR_NBSP;
          this.editingData.nd = !value;
          newTokenText = this.editingData.nd ? this.elt.nextDateText : CHAR_NBSP;
          token.replace(newTokenText, true);
          break;
      }
    } else {
      switch (token.ident) {
        case 'm':
        case 'mm':
          dVal = (parseInt(token.text.split('').pop(), 10) || 0) * 10 + dVal;
          dVal = Math.max(0, Math.min(59, dVal));
          this.editingData.m = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this.editNextToken();
          break;
        case 'h':
        case 'hh':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(1, Math.min(12, dVal));
          this.editingData.h = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this.editNextToken();
          break;
        case 'H':
        case 'HH':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(0, Math.min(23, dVal));
          this.editingData.H = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this.editNextToken();
          break;
      }
    }
  } else if (event.key.match(/^[aApPSCsc]$/) && token.ident === 'a') {
    event.preventDefault();
    if (event.key.match(/^[aAsS]$/)) {
      token.replace('AM', true);
      this.editingData.a = "AM";
    } else {
      token.replace('PM', true);
      this.editingData.a = "PM";
    }
    this.editNextToken();
  } else if (token.ident === 'ND') {
    event.preventDefault();
    value = token.text !== CHAR_NBSP;
    this.editingData.nd = !value;
    newTokenText = this.editingData.nd ? this.elt.nextDateText : CHAR_NBSP;
    token.replace(newTokenText, true);
  } else {
    event.preventDefault();
  }
};
function TITokenizedText(text, format) {
  this.text = text;
  this.format = format;
  /**
   *
   * @type {{content: string, idx: number, length: number}[]}
   */
  this.formatTokens = this.makeTokens(format);
  /**
   *
   * @type {{content: string, idx: number, length: number}[]}
   */
  this.textTokens = this.makeTokens(text);
}
TITokenizedText.prototype.tokenRegex = /(\([^)]*\))|([^.\/:\-,\\\u0020\u0009\u000D\u200B]+)|([.\/:\-,\\]+)/i;
// var CHAR_NBSP = '\u00A0';

TITokenizedText.prototype.spaceRegex = /[\u0020\u0009\u000D\u200B]+/;
TITokenizedText.prototype.tokenMap = {
  h: 'h',
  H: 'H',
  HH: 'H',
  hh: 'h',
  m: 'm',
  mm: 'm',
  a: 'a',
  ND: 'ND'
};

/**
 *
 * @param {string} text
 * @returns {{content: string, idx: number, length: number}[]}
 */
TITokenizedText.prototype.makeTokens = function (text) {
  var rgx = new RegExp(this.tokenRegex.source, 'g');
  var matched = rgx.exec(text);
  var res = [];
  while (matched) {
    res.push({
      content: matched[0],
      idx: matched.index,
      length: matched[0].length
    });
    matched = rgx.exec(text);
  }
  return res;
};
TITokenizedText.prototype.setTokenText = function (tkName, content) {
  tkName = this.tokenMap[tkName] || tkName;
  var di = 0;
  var formatToken;
  var textToken;
  var found = false;
  for (var i = 0; i < this.formatTokens.length; ++i) {
    formatToken = this.formatTokens[i];
    textToken = this.textTokens[i];
    if (!textToken) {
      textToken = {
        content: formatToken.content,
        idx: formatToken.idx,
        length: formatToken.length
      };
      this.textTokens.push(textToken);
      di = this.text.length - textToken.idx;
      this.text += textToken.content;
    }
    if (di !== 0) {
      textToken.idx += di;
    }
    if ((this.tokenMap[formatToken.content] || formatToken.content) === tkName) {
      found = true;
      this.text = this.text.substring(0, textToken.idx + di) + content + this.text.substring(textToken.idx + di + textToken.length);
      di += content.length - textToken.length;
      textToken.length = content.length;
      textToken.content = content;
    }
  }
  return this;
};
TITokenizedText.prototype.getTokenText = function (tkName) {
  var res = null;
  tkName = this.tokenMap[tkName] || tkName;
  for (var i = 0; i < this.formatTokens.length; ++i) {
    if ((this.tokenMap[this.formatTokens[i].content] || this.formatTokens[i].content) === tkName) {
      res = this.textTokens[i].content;
      break;
    }
  }
  return res;
};
TITokenizedText.prototype.getToken = function (tkName) {
  var res = null;
  tkName = this.tokenMap[tkName] || tkName;
  for (var i = 0; i < this.formatTokens.length; ++i) {
    if ((this.tokenMap[this.formatTokens[i].content] || this.formatTokens[i].content) === tkName) {
      res = Object.assign({}, this.textTokens[i]);
      break;
    }
  }
  return res;
};
TITokenizedText.prototype.getText = function (extractByFormat) {
  var res = this.text;
  if (extractByFormat) {
    if (this.formatTokens.length < this.textTokens.length) {
      res = res.substring(0, this.textTokens[this.formatTokens.length - 1].idx + this.textTokens[this.formatTokens.length - 1].length);
    } else if (this.formatTokens.length > this.textTokens.length) {
      res += this.format.substring(this.textTokens[this.textTokens.length - 1].idx + this.textTokens[this.textTokens.length - 1].length);
    }
  }
  return res;
};

/***/ }),

/***/ 17019:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(22870);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _datetime = __webpack_require__(58286);
var _ChromeTimePicker = _interopRequireDefault(__webpack_require__(11564));
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _DateTimeInput = _interopRequireDefault(__webpack_require__(37800));
var _utils = __webpack_require__(84512);
var _EventEmitter = __webpack_require__(46833);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var STATE_NEW = 1;
var STATE_EDITED = 2;
var STATE_NONE = 0;
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends {AElement}
 * @constructor
 */
function TimeInput() {
  this._editingData = {};
  this._isOpenPicker = false;
  this._lastEmitValue = null;
  this._min = 0;
  this._hour = null;
  this._minute = null;
  this._format = 'HH:mm';
  this.$clockBtn = $('.as-time-input-icon-btn', this).on('click', this.eventHandler.clickClockBtn);
  this.$text = $('input', this).on('mousedown', this.eventHandler.mouseDownInput).on('mouseup', this.eventHandler.mouseUpInput).on('dblclick', this.eventHandler.dblclickInput).on('keydown', this.eventHandler.keydown).on('blur', this.eventHandler.inputBlur).on('contextmenu', function (event) {
    event.preventDefault();
  });
  this.$clearBtn = $('button.as-time-input-clear-btn', this).on('click', this.clear.bind(this));
  this.$domSignal = _('attachhook').addTo(this);
  this.domSignal = new _DomSignal["default"](this.$domSignal);
  this.domSignal.on('request_auto_select', this._autoSelect.bind(this));
  _OOP["default"].drillProperty(this, this, 'dayOffset', 'value');
  this.dayOffset = null;
  this.hour = null;
  this.minute = null;
  this.disabled = false;
  this.notNull = true;
  /***
   * @memberOf TimeInput#
   * @name min
   * @type {number}
   */

  /***
   * @memberOf TimeInput#
   * @name s24
   * @type {boolean}
   * @readonly
   */
}

TimeInput.tag = 'timeinput';
TimeInput.render = function () {
  return _({
    "class": 'ac-time-input',
    extendEvent: ['change'],
    child: [{
      tag: 'input',
      "class": 'as-time-input-text',
      attr: {
        type: 'text'
      }
    }, {
      tag: 'button',
      "class": 'as-time-input-clear-btn',
      child: 'span.mdi.mdi-close-circle'
    }, {
      tag: 'button',
      "class": 'as-time-input-icon-btn',
      child: 'span.mdi.mdi-clock-outline'
    }]
  });
};
TimeInput.prototype._autoSelect = _DateTimeInput["default"].prototype._autoSelect;
TimeInput.prototype.tokenMap = {
  h: 'h',
  H: 'H',
  HH: 'H',
  hh: 'h',
  m: 'm',
  mm: 'm',
  a: 'a'
};
TimeInput.prototype.tokenRegex = _DateTimeInput["default"].prototype.tokenRegex;
TimeInput.prototype._tokenAt = _DateTimeInput["default"].prototype._tokenAt;
TimeInput.prototype._editNextToken = _DateTimeInput["default"].prototype._editNextToken;
TimeInput.prototype._editPrevToken = _DateTimeInput["default"].prototype._editPrevToken;
TimeInput.prototype._makeTokenDict = _DateTimeInput["default"].prototype._makeTokenDict;
TimeInput.prototype._makeValueDict = function (hour, minute) {
  var res = {};
  if (typeof hour == 'number' && hour >= 0 && hour < 24) {
    res.h = {
      value: 1 + (hour - 1) % 12
    };
    res.H = {
      value: hour
    };
    res.a = {
      value: hour >= 12 ? 'PM' : 'AM'
    };
  } else {
    res.h = {
      value: NaN
    };
    res.H = {
      value: NaN
    };
    res.a = {
      value: 'a'
    };
  }
  if (typeof minute === "number" && minute >= 0 && minute < 60) {
    res.m = {
      value: minute
    };
  } else {
    res.m = {
      value: NaN
    };
  }
  return res;
};
TimeInput.prototype._applyValue = function (hour, minute) {
  this._hour = hour;
  this._minute = minute;
  this.$text.value = this._applyTokenDict(this._format, this._makeValueDict(hour, minute));
  this._updateNullClass();
};
TimeInput.prototype._updateNullClass = function () {
  if (this._hour == null && this._minute == null) {
    this.addClass('as-value-null');
  } else {
    this.removeClass('as-value-null');
  }
};
TimeInput.prototype._applyTokenDict = function (format, dict) {
  var rgx = new RegExp(this.tokenRegex.source, 'g');
  var tokenMap = this.tokenMap;
  return format.replace(rgx, function (full, g1, g2, sourceText) {
    if (g1 && g1 === 'a') {
      return dict[g1].value;
    } else if (g1 && tokenMap[g1]) {
      var ident = tokenMap[g1];
      if (dict[ident] && !isNaN(dict[ident].value)) {
        return (0, _utils.zeroPadding)(dict[ident].value, g1.length);
      } else {
        return full;
      }
    } else return full;
  });
};
TimeInput.prototype._correctingInput = function () {
  var tkDict = this._makeTokenDict(this.$text.value);

  // TODO: check min, max,
};

TimeInput.prototype._correctingCurrentToken = function () {
  var token = this._tokenAt(this.$text.selectionStart);
  if (!token) return;
  var value;
  if (token.ident === 'a') {
    if (token.text !== 'a' && token.text !== 'AM' && token.text !== 'PM') {
      token.replace('a', false);
    }
  } else {
    value = parseInt(token.text);
    var rqMin = {
      h: 1,
      hh: 1,
      m: 0,
      mm: 0,
      H: 0,
      HH: 0
    }[token.ident];
    var rqMax = {
      H: 23,
      HH: 23,
      h: 12,
      hh: 12,
      m: 59,
      mm: 59
    }[token.ident];
    if (rqMin !== undefined) {
      if (!isNaN(value)) {
        if (value < rqMin || value > rqMin) {
          value = Math.max(rqMin, Math.min(rqMax, value));
          token.replace((0, _utils.zeroPadding)(value, token.ident.length), false);
          this._editingData[this.tokenMap[token.ident]] = value;
        }
      } else if (token.text !== token.ident) {
        token.replace(token.ident, false);
      }
    }
  }
};
TimeInput.prototype._loadValueFromInput = function () {
  var tkDick = this._makeTokenDict(this.$text.value);
  var hour = NaN;
  var minute = NaN;
  if (tkDick.H) {
    hour = Math.min(23, Math.max(0, tkDick.H.value));
  } else if (tkDick.h) {
    hour = Math.min(12, Math.max(1, tkDick.h.value));
    if (tkDick.a && tkDick.a.value === 'PM') {
      hour += 12;
    }
  }
  if (tkDick.m) {
    minute = Math.min(59, Math.max(0, tkDick.m.value));
  }
  this._hour = isNaN(hour) ? null : hour;
  this._minute = isNaN(minute) ? null : minute;
  this._updateNullClass();
};
TimeInput.prototype.clear = function (event) {
  this._applyValue(null, null);
  this._notifyIfChange(event);
};
TimeInput.prototype._notifyIfChange = function (event) {
  if (this._lastEmitValue === this.dayOffset) return;
  this.emit('change', {
    type: 'change',
    target: this,
    dayOffset: this.dayOffset,
    hour: this.hour,
    minute: this.minute,
    originEvent: event
  }, this);
  this._lastEmitValue = this.dayOffset;
};
TimeInput.property = {};
TimeInput.property.hour = {
  set: function set(value) {
    if (typeof value == "number") {
      value = value % 24 || 0;
    } else {
      value = null;
    }
    this._applyValue(value, this._minute);
    this._lastEmitValue = this.dayOffset;
  },
  get: function get() {
    return this._hour;
  }
};
TimeInput.property.minute = {
  set: function set(value) {
    if (typeof value == "number") {
      value = value % 60 || 0;
    } else {
      value = null;
    }
    this._applyValue(this._hour, value);
    this._lastEmitValue = this.dayOffset;
  },
  get: function get() {
    return this._minute;
  }
};
TimeInput.property.value = {
  set: function set(value) {
    if (typeof value == "number" || value && value.getTime) {
      value = value || 0;
      if (value.getTime) value = value.getTime() - (0, _datetime.beginOfDay)(value).getTime();else {
        value = value % _datetime.MILLIS_PER_DAY;
      }
      this.hour = Math.floor(value / _datetime.MILLIS_PER_HOUR);
      this.minute = Math.floor(value % _datetime.MILLIS_PER_HOUR / _datetime.MILLIS_PER_MINUTE);
    } else {
      this.hour = null;
      this.minute = null;
    }
  },
  get: function get() {
    if (this._hour === null || this._minute === null) return null;
    return this._hour * _datetime.MILLIS_PER_HOUR + this._minute * _datetime.MILLIS_PER_MINUTE;
  }
};
TimeInput.property.disabled = {
  set: function set(value) {
    value = !!value;
    this._disabled = value;
    if (value) this.addClass('as-disabled');else this.removeClass('as-disabled');
    this.$text.disabled = value;
  },
  get: function get() {
    return this._disabled;
  }
};
TimeInput.property.format = {
  enumerable: true,
  configurable: true,
  set: function set(value) {
    if (typeof value !== "string") value = "HH:mm";
    value = value || 'HH:mm';
    this._format = value;
    this.dayOffset = this['dayOffset'];
  },
  get: function get() {
    return this._format;
  }
};
TimeInput.property.s24 = {
  get: function get() {
    var t = this.format.match(new RegExp(this.tokenRegex.source, 'g'));
    return !t || t.indexOf('a') < 0;
  }
};
TimeInput.property.notNull = {
  set: function set(value) {
    if (value) {
      if (this.dayOffset === null) {
        this.dayOffset = 0;
      }
      this.addClass('as-must-not-null');
    } else {
      this.removeClass('as-must-not-null');
    }
  },
  get: function get() {
    return this.hasClass('as-must-not-null');
  }
};
TimeInput.property.readOnly = {
  set: function set(value) {
    value = !!value;
    if (value) this.addClass('as-read-only');else this.removeClass('as-read-only');
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
TimeInput.property.min = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) value = 0;
    value = Math.floor(value);
    value = Math.max(0, Math.min(_datetime.MILLIS_PER_DAY, value));
    this._min = value;
  },
  get: function get() {
    return this._min;
  }
};
TimeInput.eventHandler = {};
TimeInput.eventHandler.clickClockBtn = function () {
  this._attachPicker(this);
};
TimeInput.eventHandler.mouseUpInput = _DateTimeInput["default"].eventHandler.mouseUpInput;
TimeInput.eventHandler.mouseDownInput = _DateTimeInput["default"].eventHandler.mouseDownInput;
TimeInput.eventHandler.dblclickInput = _DateTimeInput["default"].eventHandler.dblclickInput;
TimeInput.eventHandler.inputBlur = _DateTimeInput["default"].eventHandler.inputBlur;
TimeInput.eventHandler.clickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.share.$picker, event) && !(0, _EventEmitter.hitElement)(this.share.$closeBtn, event)) return;
  this._releasePicker();
};
TimeInput.eventHandler.pickerChange = function (event) {
  this._applyValue(event.hour, event.minute);
  this._notifyIfChange(event);
  _ResizeSystem["default"].requestUpdateSignal();
};

/***
 *
 * @param {KeyboardEvent} event
 */
TimeInput.eventHandler.keydown = function (event) {
  var token = this._tokenAt(this.$text.selectionStart);
  var endToken = this._tokenAt(this.$text.selectionEnd);
  if (!token) {
    if (event.key === 'Enter') {
      this._correctingInput();
      this._loadValueFromInput();
      this._notifyIfChange(event);
    }
    return;
  }
  var newTokenText;
  var value;
  if (event.key.startsWith('Arrow')) {
    event.preventDefault();
    switch (event.key) {
      case 'ArrowLeft':
        this._editPrevToken();
        break;
      case 'ArrowRight':
        this._editNextToken();
        break;
      case 'ArrowUp':
      case 'ArrowDown':
        switch (token.ident) {
          case "H":
          case "HH":
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.H = event.key === 'ArrowUp' ? 0 : 23;
            } else {
              this._editingData.H = (value + (event.key === 'ArrowUp' ? 1 : 23)) % 24;
            }
            newTokenText = (0, _utils.zeroPadding)(this._editingData.H, token.ident.length);
            token.replace(newTokenText, true);
            break;
          case "hh":
          case 'h':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.h = event.key === 'ArrowUp' ? 1 : 12;
            } else {
              this._editingData.h = 1 + (value + (event.key === 'ArrowUp' ? 0 : 10)) % 12;
            }
            newTokenText = this._editingData.h + '';
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case "mm":
          case 'm':
            value = parseInt(token.text);
            if (isNaN(value)) {
              this._editingData.m = event.key === 'ArrowUp' ? 0 : 59;
            } else {
              this._editingData.m = (value + (event.key === 'ArrowUp' ? 1 : 59)) % 60;
            }
            newTokenText = this._editingData.m + '';
            while (newTokenText.length < token.ident.length) {
              newTokenText = '0' + newTokenText;
            }
            token.replace(newTokenText, true);
            break;
          case 'a':
            value = token.text;
            this._editingData.a = value === 'PM' ? "AM" : "PM";
            newTokenText = this._editingData.a;
            token.replace(newTokenText, true);
            break;
        }
        break;
    }
  } else if (event.key === "Delete" || event.key === 'Backspace') {
    event.preventDefault();
    if (endToken.idx !== token.idx) {
      if (this.notNull) {
        this.$text.value = (0, _datetime.formatDateTime)((0, _datetime.beginOfDay)(new Date()), this.format);
      } else {
        this.$text.value = this._format;
      }
      this.$text.select();
    } else {
      if (this.notNull) {
        token.replace(token.ident === 'a' ? 'AM' : (0, _utils.zeroPadding)(token.ident === 'hh' || token.ident === 'h' ? 12 : 0, token.ident.length), true);
      } else {
        token.replace(token.ident, true);
      }
      if (event.key === "Delete") this._editNextToken();else this._editPrevToken();
    }
  } else if (event.key === "Enter" || event.key === 'Tab') {
    this._correctingInput();
    this._loadValueFromInput();
    this._notifyIfChange(event);
  } else if (event.ctrlKey) {
    switch (event.key) {
      case 'a':
      case 'A':
        break;
      case 'c':
      case 'C':
        break;
      case 'x':
      case 'X':
        this.domSignal.once('clear_value', function () {
          this.$text.value = this._format;
          this.$text.select();
        }.bind(this));
        this.domSignal.emit('clear_value');
        break;
      default:
        event.preventDefault();
    }
  } else if (event.key.match(/^[0-9]$/g)) {
    event.preventDefault();
    var dVal = parseInt(event.key);
    if (this._editingData.state === STATE_NEW) {
      switch (token.ident) {
        case 'm':
        case 'mm':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          if (dVal > 5) {
            this._editNextToken();
          }
          break;
        case 'h':
        case 'hh':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          if (dVal > 1) {
            this._editNextToken();
          }
          break;
        case 'H':
        case 'HH':
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editingData.state = STATE_EDITED;
          if (dVal > 2) {
            this._editNextToken();
          }
          break;
      }
    } else {
      switch (token.ident) {
        case 'm':
        case 'mm':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(0, Math.min(59, dVal));
          this._editingData.m = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editNextToken();
          break;
        case 'h':
        case 'hh':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(1, Math.min(12, dVal));
          this._editingData.h = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editNextToken();
          break;
        case 'H':
        case 'HH':
          dVal = (parseInt(token.text.split('').pop()) || 0) * 10 + dVal;
          dVal = Math.max(0, Math.min(23, dVal));
          this._editingData.H = dVal;
          token.replace((0, _utils.zeroPadding)(dVal, token.ident.length), true);
          this._editNextToken();
          break;
      }
    }
  } else if (event.key.match(/^[aApPSCsc]$/) && token.ident === 'a') {
    event.preventDefault();
    if (event.key.match(/^[aAsS]$/)) {
      token.replace('AM', true);
      this._editingData.a = "AM";
    } else {
      token.replace('PM', true);
      this._editingData.a = "PM";
    }
    this._editNextToken();
  } else {
    event.preventDefault();
  }
};
TimeInput.prototype.share = {
  $picker: null,
  $holdingInput: null,
  $follower: null,
  $closeBtn: null
};
TimeInput.prototype._preparePicker = function () {
  if (this.share.$picker) return;
  this.share.$picker = _({
    tag: _ChromeTimePicker["default"].tag,
    "class": ['as-time-input-picker']
  });
  this.share.$follower = _({
    tag: 'follower',
    "class": ['as-time-input-follower', 'as-dropdown-box-common-style'],
    child: [this.share.$picker, {
      "class": 'as-dropdown-box-footer',
      child: [{
        "class": 'as-dropdown-box-footer-right',
        child: ['<a data-ml-key="txt_close" class="as-select-list-box-close-btn"></a>']
      }]
    }]
  });
};
TimeInput.prototype._attachPicker = function () {
  this._preparePicker();
  if (this.share.$holdingInput) this.share.$holdingInput._releasePicker();
  this.share.$holdingInput = this;
  this.share.$follower.addTo(document.body);
  this.share.$follower.followTarget = this;
  this.share.$follower.sponsorElement = this;
  this.share.$follower.addStyle('visibility', 'hidden');
  this.share.$picker.hour = this.hour || 0;
  this.share.$picker.minute = this.minute || 0;
  this.share.$picker.s24 = this.s24;
  this.share.$picker.min = this.min;
  this.share.$picker.domSignal.emit('request_scroll_into_selected');
  this.$clockBtn.off('click', this.eventHandler.clickClockBtn);
  this.share.$picker.on('change', this.eventHandler.pickerChange);
  setTimeout(function () {
    document.addEventListener('click', this.eventHandler.clickOut);
    this.share.$follower.removeStyle('visibility');
  }.bind(this), 5);
};
TimeInput.prototype._releasePicker = function () {
  if (this.share.$holdingInput !== this) return;
  // this.share.$calendar.off('pick', this.eventHandler.calendarPick);
  this.share.$follower.remove();
  document.removeEventListener('click', this.eventHandler.clickOut);
  this.share.$picker.off('change', this.eventHandler.pickerChange);
  setTimeout(function () {
    this.$clockBtn.on('click', this.eventHandler.clickClockBtn);
  }.bind(this), 5);
  this.share.$holdingInput = null;
};
_ACore["default"].install(TimeInput);
var _default = TimeInput;
exports["default"] = _default;

/***/ }),

/***/ 24271:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isTouchDevice = exports["default"] = void 0;
__webpack_require__(22053);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _datetime = __webpack_require__(58286);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _NumberSpanInput = _interopRequireDefault(__webpack_require__(94471));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
//todo: add this to absol
var isTouchDevice = _BrowserDetector["default"].hasTouch && !_BrowserDetector["default"].os.type.match(/windows|X11|Ubuntu|Linux/);
//todo: re select text after click
exports.isTouchDevice = isTouchDevice;
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var $g = _Svg["default"].ShareInstance.$;
var _g = _Svg["default"].ShareInstance._;
function TimePicker() {
  this._hour = 0;
  this._minute = 0;
  this._lastDayOffset = 0;
  this._state = 'none';
  this._mode = 'CLOCK';
  this._latBound = {
    width: 0,
    height: 0
  };
  var thisPicker = this;
  if (isTouchDevice) this.addClass('ac-time-picker-touch');
  this.$attachook = _('attachhook').addTo(this).on('error', function () {
    _Dom["default"].addToResizeSystem(this);
    this.requestUpdateSize();
    thisPicker.addStyle('font-size', thisPicker.getComputedStyleValue('font-size'));
  });
  this.$attachook.requestUpdateSize = this.updateSize.bind(this);
  /***
   *
   * @type {NumberSpanInput}
   */
  this.$hour = $('.ac-time-picker-hour', this).on({
    focus: this.eventHandler.focusHour,
    keydown: this.eventHandler.keydownHour,
    blur: this.eventHandler.blurHour
  });
  /***
   *
   * @type {NumberSpanInput}
   */
  this.$minute = $('.ac-time-picker-minute', this).on({
    keydown: this.eventHandler.keydownMinute,
    focus: this.eventHandler.focusMinute,
    blur: this.eventHandler.blurMinute
  });
  this.$hourInput = $('.ac-time-picker-hour-input', this).on({
    click: this.eventHandler.clickHourInput,
    keydown: this.eventHandler.keydownHourInput,
    blur: this.eventHandler.blurHourInput
  });
  this.$minuteInput = $('.ac-time-picker-minute-input', this).on({
    click: this.eventHandler.clickMinuteInput,
    keydown: this.eventHandler.keydownMinuteInput,
    blur: this.eventHandler.blurMinuteInput
  });

  //only support if is none touch device
  if (isTouchDevice) {
    this.$hour.readOnly = true;
    this.$hour.on('click', this._editHourState.bind(this));
    this.$minute.readOnly = true;
    this.$minute.on('click', this._editMinuteState.bind(this));
  }
  this.$clock = $g('.ac-time-picker-clock', this).on(isTouchDevice ? 'touchstart' : 'mousedown', this.eventHandler.mousedownClock);
  this._clockWidth = 400;
  this._clockHeight = 400;
  this._clockRadius = 150;
  this._clockRadiusInner = 100;
  this.$clockContent = $g('.ac-time-picker-clock-content', this);
  this.$clockHourCtn = $g('.ac-time-picker-clock-hour-ctn', this);
  this.$clockMinuteCtn = $g('.ac-time-picker-clock-minute-ctn', this);
  this.$hourNumbers = Array(24).fill(0).map(function (u, i) {
    var h = i;
    if (h == 0) h = 12;else if (h == 12) h = '00';
    return _g({
      tag: 'text',
      attr: {
        'text-anchor': 'middle'
      },
      "class": 'ac-time-picker-clock-hour-' + (i < 12 ? 'am' : 'pm'),
      child: {
        text: h + ''
      }
    }).addTo(thisPicker.$clockHourCtn);
  });
  this.$minuteNumbers = Array(12).fill(0).map(function (u, i) {
    return _g({
      tag: 'text',
      attr: {
        'text-anchor': 'middle'
      },
      "class": 'ac-time-picker-clock-minute',
      child: {
        text: i * 5 + ''
      }
    }).addTo(thisPicker.$clockMinuteCtn);
  });
  this.$selectCtn = $g('.ac-time-picker-clock-select-ctn', this);
  this.$clockCenter = _g({
    tag: 'circle',
    "class": 'ac-time-picker-clock-center',
    attr: {
      cx: "0",
      cy: '0'
    }
  }).addTo(this.$selectCtn);
  this.$clockSelectLine = _g({
    tag: 'path',
    "class": 'ac-time-picker-clock-select-line'
  }).addTo(this.$selectCtn);
  this.$clockSelectCicle = _g({
    tag: 'circle',
    "class": 'ac-time-picker-clock-select-circle',
    attr: {
      cx: 0,
      cy: 0
    }
  }).addTo(this.$selectCtn);
  this.$clockSelectCenter = _g({
    tag: 'circle',
    "class": 'ac-time-picker-clock-select-center'
  }).addTo(this.$selectCtn);
  this.$finishBtn = $('.ac-time-picker-finish-btn', this).on('click', this.finishSelect.bind(this));
  this.$cancelBtn = $('.ac-time-picker-cancel-btn', this).on('click', this.cancelSelect.bind(this));
  this.$keyboardBtn = $('.ac-time-picker-keyboard-btn', this).on('click', this.timeMode.bind(this));
  this.$clockBtn = $('.ac-time-picker-clock-btn', this).on('click', this.clockMode.bind(this));
}
;
TimePicker.prototype.updateSize = function () {
  // var 
  this._fontSize = this.getFontSize();
  var cBound = this.$clock.getBoundingClientRect();
  this._clockWidth = cBound.width;
  this._clockHeight = cBound.height;
  this.$clock.attr({
    width: this._clockWidth,
    height: this._clockHeight,
    viewBox: '0 0 ' + this._clockWidth + ' ' + this._clockHeight
  });
  this.$clockContent.attr('transform', 'translate(' + this._clockWidth / 2 + ',' + this._clockHeight / 2 + ')');
  var clockRadius = this._clockWidth / 2 - this._fontSize;
  var clockRadiusInner = clockRadius - this._fontSize * 1.5;
  this._clockRadius = clockRadius;
  this._clockRadiusInner = clockRadiusInner;
  this.$clockCenter.attr('r', this._fontSize / 5);
  this.$clockSelectCicle.attr({
    r: this._fontSize * 0.7,
    cx: clockRadius
  });
  this.$clockSelectCenter.attr({
    r: this._fontSize / 10,
    cx: clockRadius
  });
  this.$hourNumbers.forEach(function (elt, i) {
    var angle = Math.PI * (i - 3) / 6;
    var r = i < 12 ? clockRadius : clockRadiusInner;
    var box = elt.getBBox();
    var x = r * Math.cos(angle);
    var y = r * Math.sin(angle) + box.height / 2;
    elt.attr({
      x: x,
      y: y
    });
  });
  this.$minuteNumbers.forEach(function (elt, i) {
    var angle = Math.PI * (i - 3) / 6;
    var box = elt.getBBox();
    var x = clockRadius * Math.cos(angle);
    var y = clockRadius * Math.sin(angle) + box.height / 3;
    elt.attr({
      x: x,
      y: y
    });
  });
  this.updateSelectPosition();
  this.notifySizeChange();
};
TimePicker.prototype.updateSelectPosition = function () {
  var angle, radius;
  if (this._state == "EDIT_MINUTE") {
    angle = Math.PI * (this._minute - 15) / 30;
    radius = this._clockRadius;
  } else if (this._state == "EDIT_HOUR") {
    angle = Math.PI * (this._hour - 3) / 6;
    if (this._hour > 0 && this._hour <= 12) {
      radius = this._clockRadius;
    } else {
      radius = this._clockRadiusInner;
    }
  } else {
    return;
  }
  this._drawSelect(radius, angle);
};
TimePicker.prototype.editHour = function () {
  this.clockMode();
  if (this.$hour.readOnly) {
    this._editHourState();
  } else {
    this.$hour.focus();
  }
};
TimePicker.prototype._drawSelect = function (radius, angle) {
  var x = radius * Math.cos(angle);
  var y = radius * Math.sin(angle);
  this.$clockSelectCicle.attr({
    cx: x,
    cy: y
  });
  this.$clockSelectCenter.attr({
    cx: x,
    cy: y
  });
  this.$clockSelectLine.attr('d', 'M0,0L' + x + ',' + y);
};
TimePicker.prototype.notifyChange = function (force) {
  if (this._lastDayOffset != this.dayOffset || force) {
    this.emit('change', {
      target: this,
      hour: this.hour,
      minute: this.minute,
      dayOffset: this.dayOffset,
      name: 'change'
    }, this);
    this._lastDayOffset = this.dayOffset;
  }
};
TimePicker.prototype.notifySizeChange = function () {
  var bound = this.getBoundingClientRect();
  if (this._latBound.width != bound.width || this._latBound.height != bound.height) {
    this._latBound.width = bound.width;
    this._latBound.height = bound.height;
    this.emit('sizechange', {
      name: 'sizechange',
      bound: bound,
      target: this
    }, this);
  }
};
TimePicker.tag = 'TimePicker';
TimePicker.render = function () {
  return _({
    extendEvent: ['change', 'finish', 'cancel', 'sizechange'],
    "class": ['ac-time-picker', 'ac-time-picker-clock-mode'],
    //clock mode is default
    child: [{
      "class": 'ac-time-picker-set-clock',
      child: [{
        "class": 'ac-time-picker-set-clock-header',
        child: [{
          tag: 'numberspaninput',
          "class": 'ac-time-picker-hour',
          props: {
            value: 0,
            zeroInt: 2
          }
        }, {
          tag: 'span',
          text: ':'
        }, {
          tag: 'numberspaninput',
          "class": 'ac-time-picker-minute',
          props: {
            value: 0,
            zeroInt: 2
          }
        }]
      }, _g({
        tag: 'svg',
        "class": 'ac-time-picker-clock',
        child: [{
          "class": 'ac-time-picker-clock-content',
          child: ['.ac-time-picker-clock-select-ctn', '.ac-time-picker-clock-hour-ctn', '.ac-time-picker-clock-minute-ctn']
        }]
      })]
    }, {
      "class": 'ac-time-picker-set-time',
      child: [{
        "class": 'ac-time-picker-set-time-header',
        child: {
          text: 'Set time'
        }
      }, {
        "class": 'ac-time-picker-set-time-label',
        child: {
          text: 'Type in time'
        }
      }, {
        "class": 'ac-time-picker-set-time-input-group',
        child: [{
          "class": 'ac-time-picker-set-time-input-hm',
          child: [{
            tag: 'input',
            "class": 'ac-time-picker-hour-input',
            attr: {
              type: 'number',
              placeHolder: '00',
              tabindex: '2'
            }
          }, {
            tag: 'span',
            child: {
              text: ':'
            }
          }, {
            tag: 'input',
            "class": 'ac-time-picker-minute-input',
            attr: {
              type: 'number',
              placeHolder: '00',
              tabindex: '3'
            }
          }]
        }, {
          "class": 'ac-time-picker-set-time-input-label-hm',
          child: [{
            tag: 'span',
            child: {
              text: 'hour'
            }
          }, {
            tag: 'span',
            style: {
              visibility: 'hidden'
            },
            child: {
              text: ':'
            }
          }, {
            tag: 'span',
            child: {
              text: 'minute'
            }
          }]
        }]
      }]
    }, {
      "class": 'ac-time-picker-footer',
      child: [{
        tag: 'button',
        "class": 'ac-time-picker-keyboard-btn',
        child: 'span.mdi.mdi-keyboard-outline'
      }, {
        tag: 'button',
        "class": 'ac-time-picker-clock-btn',
        child: 'span.mdi.mdi-clock-outline'
      }, {
        "class": 'ac-time-picker-footer-right',
        child: [{
          tag: 'button',
          "class": 'ac-time-picker-cancel-btn',
          attr: {
            tabindex: '4'
          },
          child: {
            text: 'CANCEL'
          }
        }, {
          tag: 'button',
          attr: {
            tabindex: '4'
          },
          "class": 'ac-time-picker-finish-btn',
          child: {
            text: 'OK'
          }
        }]
      }]
    }]
  });
};
TimePicker.prototype.clockMode = function () {
  if (this._mode == "CLOCK") return;
  this._mode = 'CLOCK';
  this.removeClass('ac-time-picker-time-mode').addClass('ac-time-picker-clock-mode');
  this.$hour.value = this._hour < 10 ? '0' + this._hour : this._hour;
  this.$minute.value = this._minute < 10 ? '0' + this._minute : this._minute;
  this._editHourState();
  this.updateSize();
  this._showSelectHour(this._hour);
};
TimePicker.prototype.timeMode = function () {
  if (this._mode == "TIME") return;
  this._mode = 'TIME';
  this.addClass('ac-time-picker-time-mode').removeClass('ac-time-picker-clock-mode');
  this.$hourInput.value = this._hour < 10 ? '0' + this._hour : this._hour;
  this.$minuteInput.value = this._minute < 10 ? '0' + this._minute : this._minute;
  this.editHourInput();
  this.updateSize();
};
TimePicker.prototype._editHourState = function () {
  this._state = "EDIT_HOUR";
  this._preHour = this._hour;
  this.removeClass('ac-time-picker-edit-minute').addClass('ac-time-picker-edit-hour').removeClass('ac-time-picker-edit-hour-input').removeClass('ac-time-picker-edit-minute-input');
  this.updateSize();
};
TimePicker.prototype._editMinuteState = function () {
  this._state = "EDIT_MINUTE";
  this._preMinute = this._minute;
  this.addClass('ac-time-picker-edit-minute').removeClass('ac-time-picker-edit-hour').removeClass('ac-time-picker-edit-hour-input').removeClass('ac-time-picker-edit-minute-input');
  this.updateSize();
};
TimePicker.prototype.editHourInput = function () {
  var thisPicker = this;
  this._state = "EDIT_HOUR_INPUT";
  this._preHour = this._hour;
  this.removeClass('ac-time-picker-edit-minute').removeClass('ac-time-picker-edit-hour').addClass('ac-time-picker-edit-hour-input').removeClass('ac-time-picker-edit-minute-input');
  this.updateSize();
  setTimeout(function () {
    thisPicker.$hourInput.focus();
    thisPicker.$hourInput.select();
  }, 10);
};
TimePicker.prototype.editMinuteInput = function () {
  var thisPicker = this;
  this._state = "EDIT_MINUTE_INPUT";
  this._preMinute = this._minute;
  this.removeClass('ac-time-picker-edit-minute').removeClass('ac-time-picker-edit-hour').removeClass('ac-time-picker-edit-hour-input').addClass('ac-time-picker-edit-minute-input');
  this.updateSize();
  setTimeout(function () {
    thisPicker.$minuteInput.focus();
    thisPicker.$minuteInput.select();
  }, 1);
};
TimePicker.prototype.finishSelect = function () {
  this.emit('finish', {
    target: this,
    hour: this.hour,
    minute: this.minute,
    dayOffset: this.dayOffset,
    name: 'finish'
  }, this);
};
TimePicker.prototype.cancelSelect = function () {
  this.emit('cancel', {
    target: this,
    name: 'cancel'
  }, this);
};
TimePicker.eventHandler = {};
TimePicker.eventHandler.focusHour = function () {
  this._editHourState();
  this.$hour.selectAll();
};
TimePicker.eventHandler.blurHour = function () {
  var newText = this.$hour.value;
  var hour = parseFloat(newText) || 0;
  if (hour < 0 || hour >= 24) hour = this._preHour;
  this.$hour.value = hour < 10 ? '0' + hour : hour;
  this._hour = hour;
  this._showSelectHour(hour);
  this.notifyChange();
};
TimePicker.eventHandler.focusMinute = function () {
  this._editMinuteState();
  this.$minute.selectAll();
};
TimePicker.eventHandler.blurMinute = function () {
  var newText = this.$minute.innerHTML;
  var minute = parseFloat(newText) || 0;
  if (minute < 0 || minute >= 60) minute = this._preMinute;
  this.$minute.value = minute < 10 ? '0' + minute : minute;
  this._minute = minute;
  this._showSelectByMinuteText();
  this.notifyChange();
};
TimePicker.eventHandler.clickHourInput = function () {
  if (this._state != 'EDIT_HOUR') this.editHourInput();else {
    this.$hourInput.focus();
    this.$hourInput.select();
  }
};
TimePicker.eventHandler.clickMinuteInput = function () {
  if (this._state != 'EDIT_MINUTE_INPUT') this.editMinuteInput();else {
    this.$minuteInput.focus();
    this.$minuteInput.select();
  }
};
TimePicker.eventHandler.blurHourInput = function () {
  var hour = parseFloat(this.$hourInput.value) || 0;
  if (hour < 0 || hour >= 24) hour = this._preHour;
  this.hour = hour;
};
TimePicker.eventHandler.blurMinuteInput = function () {
  var minute = parseFloat(this.$minuteInput.value) || 0;
  if (minute < 0 || minute >= 60) minute = this._preMinute;
  this.minute = minute;
};
TimePicker.property = {};
TimePicker.property.hour = {
  set: function set(value) {
    value = value % 24 || 0;
    this._hour = value;
    var text = (value < 10 ? '0' : '') + value + '';
    this.$hour.clearChild().addChild(_({
      text: text
    }));
    this.$hourInput.value = text;
    this.updateSelectPosition();
  },
  get: function get() {
    return this._hour;
  }
};
TimePicker.property.minute = {
  set: function set(value) {
    value = value % 60 || 0;
    this._minute = value;
    var text = (value < 10 ? '0' : '') + value + '';
    this.$minute.value = text;
    this.$minuteInput.value = text;
    this.updateSelectPosition();
  },
  get: function get() {
    return this._minute;
  }
};
TimePicker.property.dayOffset = {
  set: function set(value) {
    value = value || 0;
    if (value.getTime) value = value.getTime() - (0, _datetime.beginOfDay)(value).getTime();else {
      value = value % _datetime.MILLIS_PER_DAY;
    }
    this.hour = Math.floor(value / _datetime.MILLIS_PER_HOUR);
    this.minute = Math.floor(value % _datetime.MILLIS_PER_HOUR / _datetime.MILLIS_PER_MINUTE);
  },
  get: function get() {
    return this._hour * _datetime.MILLIS_PER_HOUR + this._minute * _datetime.MILLIS_PER_MINUTE;
  }
};
TimePicker.prototype._showSelectHour = function (hour) {
  var radius;
  var angle = Math.PI * (hour - 3) / 6;
  if (hour < 24 && hour > 12 || hour == 0) {
    radius = this._clockRadiusInner;
  } else if (hour <= 12) {
    radius = this._clockRadius;
  } else {
    return;
  }
  this._drawSelect(radius, angle);
};
TimePicker.prototype._showSelectByHourText = function () {
  var hour = parseFloat(this.$hour.innerHTML) || 0;
  if (hour < 0 || hour >= 24) return;
  this._showSelectHour(hour);
};
TimePicker.prototype._showSelectMinute = function (minute) {
  var angle = Math.PI * (minute - 15) / 30;
  this._drawSelect(this._clockRadius, angle);
};
TimePicker.prototype._showSelectByMinuteText = function () {
  var minute = parseFloat(this.$minute.innerHTML) || 0;
  if (minute < 0 || minute >= 60) return;
  this._showSelectMinute(minute);
};

/***
 *
 * @param {KeyboardEvent} event
 */
TimePicker.eventHandler.keydownHour = function (event) {
  var thisPicker = this;
  if (event.key == 'Enter' || event.key == 'Tab') {
    event.preventDefault();
    this.$hour.blur();
    this._editMinuteState();
    setTimeout(function () {
      thisPicker.$minute.focus();
      thisPicker.$minute.selectAll();
    }, 30);
  } else {
    setTimeout(function () {
      var newText = thisPicker.$hour.value;
      var hour = parseFloat(newText) || 0;
      if (hour < 0 || hour >= 24) hour = thisPicker._preHour;else {
        thisPicker._hour = hour;
        thisPicker._showSelectHour(hour);
      }
    }, 30);
  }
};
TimePicker.eventHandler.keydownMinute = function (event) {
  var thisPicker = this;
  if (event.key == 'Enter') {
    this.$minute.blur();
    event.preventDefault();
    setTimeout(this.finishSelect.bind(this), 30);
  } else if (event.key == 'Tab') {
    this.$minute.selectNone();
    this.$finishBtn.focus();
    event.preventDefault();
  } else {
    setTimeout(function () {
      var newText = thisPicker.$minute.value;
      var minute = parseFloat(newText) || 0;
      if (minute < 0 || minute >= 60) minute = thisPicker._preMinute;else {
        thisPicker._minute = minute;
        thisPicker._showSelectMinute(minute);
      }
    }, 30);
  }
};
TimePicker.eventHandler.keydownHourInput = function (event) {
  var thisPicker = this;
  if (isTouchDevice && event.key == "Unidentified" || event.key && event.key.length == 1 && !event.ctrlKey && !event.altKey) {
    if (event.key.match(/[0-9]/)) {
      setTimeout(this.notifyChange.bind(this), 2);
    } else {
      event.preventDefault();
    }
  } else if (event.key == 'Enter') {
    event.preventDefault();
    this.$hourInput.blur();
    this.editMinuteInput();
  } else if (!event.key && !event.key.toLowerCase().match(/arrow|back/)) {
    var cText = this.$hourInput.value;
    setTimeout(function () {
      var newText = thisPicker.$hourInput.value;
      if (cText != newText) {
        var hour = parseFloat(newText) || 0;
        if (hour < 0 || hour >= 24) hour = thisPicker._preHour;
        thisPicker.hour = hour;
        thisPicker.$hourInput.blur();
        thisPicker.editMinuteInput();
        thisPicker.notifyChange();
      }
    }, 1);
  }
};
TimePicker.eventHandler.keydownMinuteInput = function (event) {
  var thisPicker = this;
  if (isTouchDevice && event.key == "Unidentified" || event.key.length == 1 && !event.ctrlKey && !event.altKey) {
    if (isTouchDevice && event.key == "Unidentified" || event.key.match(/[0-9]/)) {
      setTimeout(this.notifyChange.bind(this), 2);
    } else {
      event.preventDefault();
    }
  } else if (event.key == 'Enter') {
    this.$minute.blur();
    this.eventHandler.blurMinuteInput();
    event.preventDefault();
    setTimeout(this.finishSelect.bind(this), 100);
  } else if (event.key == "Backspace") {} else if (event.key != 'Enter') {
    var cText = this.$minuteInput.value;
    setTimeout(function () {
      var newText = thisPicker.$minuteInput.value;
      if (cText != newText) {
        var minute = parseFloat(newText) || 0;
        if (minute < 0 || minute >= 60) minute = thisPicker._preMinute;
        thisPicker.minute = minute;
        thisPicker.$minuteInput.focus();
        thisPicker.$minuteInput.select();
        thisPicker.notifyChange();
      }
    }, 1);
  }
};
TimePicker.eventHandler.dragOnClock = function (event) {
  event = event.changedTouches && event.changedTouches[0] || event;
  var cBound = this.$clock.getBoundingClientRect();
  var cx = (cBound.left + cBound.right) / 2;
  var cy = (cBound.top + cBound.bottom) / 2;
  var x = event.clientX - cx;
  var y = event.clientY - cy;
  var angle = Math.atan2(y, x);
  var radius = Math.sqrt(x * x + y * y);
  var index;
  if (this._state == "EDIT_HOUR") {
    angle += Math.PI * 2;
    index = Math.round(angle / (Math.PI / 6));
    var hour = (index + (12 + 3)) % 12;
    if (radius < (this._clockRadiusInner + this._clockRadius) / 2) {
      if (hour != 0) hour += 12;
    } else {
      if (hour == 0) hour = 12;
    }
    this._hour = hour;
    this._showSelectHour(hour);
    this.$hour.value = hour < 10 ? '0' + hour : hour;
    this.$hour.selectEnd();
  } else if (this._state == "EDIT_MINUTE") {
    radius = this._clockRadius;
    angle += Math.PI * 2;
    index = Math.round(angle / (Math.PI / 30));
    angle = index * (Math.PI / 30);
    var minute = (index + (60 + 15)) % 60;
    this._minute = minute;
    this.$minute.value = minute < 10 ? '0' + minute : minute;
    this._showSelectMinute(minute);
    this.$minute.selectEnd();
    this.notifyChange();
  } else {
    return;
  }
};
TimePicker.eventHandler.mousedownClock = function (event) {
  event.preventDefault();
  this.eventHandler.dragOnClock(event);
  document.body.addEventListener(isTouchDevice ? 'touchmove' : 'mousemove', this.eventHandler.mousemoveClock);
  document.body.addEventListener(isTouchDevice ? 'touchend' : 'mouseup', this.eventHandler.mousefinishClock);
  if (!isTouchDevice) document.body.addEventListener('mouseleave', this.eventHandler.mousefinishClock);
};
TimePicker.eventHandler.mousemoveClock = function (event) {
  event.preventDefault();
  this.eventHandler.dragOnClock(event);
};
TimePicker.eventHandler.mousefinishClock = function () {
  document.body.removeEventListener('mousemove', this.eventHandler.mousemoveClock);
  document.body.removeEventListener('mouseup', this.eventHandler.mousefinishClock);
  document.body.removeEventListener('mouseleave', this.eventHandler.mousefinishClock);
  if (this._state == 'EDIT_HOUR') {
    if (this.$minute.readOnly) {
      this._editMinuteState();
    } else {
      this.$minute.focus();
    }
  } else if (this._state == 'EDIT_MINUTE') {
    this.$minute.selectAll(); // refocus
  }
};

_ACore["default"].install('timepicker', TimePicker);
var _default = TimePicker;
exports["default"] = _default;

/***/ }),

/***/ 66499:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _TimeInput = _interopRequireDefault(__webpack_require__(17019));
var _Time24Input = _interopRequireDefault(__webpack_require__(46255));
__webpack_require__(11554);
var _utils = __webpack_require__(84512);
var _datetime = __webpack_require__(58286);
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends AElement
 * @constructor
 */
function TimeRange24Input() {
  var t = _LanguageSystem["default"].getText('txt_next_day');
  if (t) {
    t = '(' + t + ')';
    this.nextDateText = t;
  }

  /***
   *
   * @type {TimeInput}
   */
  this.$offset = (0, _ACore.$)(_TimeInput["default"].tag, this);
  this.$offset.on('change', this.eventHandler.offsetChange);
  /***
   *
   * @type {Time24Input}
   */
  this.$duration = (0, _ACore.$)(_Time24Input["default"].tag, this);
  this.$duration.on('change', this.eventHandler.durationChange);
  /***
   * @type {number}
   * @name dayOffset
   * @memberOf TimeRange24Input#
   */
  /***
   * @type {number}
   * @name duration
   * @memberOf TimeRange24Input#
   */
  /***
   * @type {string}
   * @name format
   * @memberOf TimeRange24Input#
   */
}

TimeRange24Input.tag = 'TimeRange24Input'.toLowerCase();
TimeRange24Input.render = function () {
  return (0, _ACore._)({
    extendEvent: ['change'],
    "class": 'as-time-range-24-input',
    child: [{
      tag: _TimeInput["default"].tag,
      props: {
        format: 'HH:mm'
      }
    }, _Time24Input["default"].tag]
  });
};
TimeRange24Input.prototype.nextDateText = '(Next day)';
TimeRange24Input.prototype.init = function (props) {
  props = props || {};
  var cpProps = Object.assign(props);
  if ('notNull' in props) {
    this.notNull = props.notNull;
    delete cpProps.notNull;
  }
  if ('dayOffset' in props) {
    this.dayOffset = props.dayOffset;
    delete cpProps.dayOffset;
  }
  Object.assign(this, cpProps);
};
TimeRange24Input.prototype._updateTextData = function () {
  var dayOffset = this.dayOffset;
  var duration = this.duration;
  var format = this.format;
  var bD = (0, _datetime.beginOfDay)(new Date()).getTime();
  var startD = new Date(bD + dayOffset);
  var text = (0, _datetime.formatDateTime)(startD, format || 'HH:mm');
  var endD = new Date(bD + dayOffset + duration);
  text += ' - ' + (0, _datetime.formatDateTime)(endD, format || 'HH:mm');
  if ((0, _datetime.compareDate)(endD, startD) > 0) {
    text += ' ' + this.nextDateText;
  }
  this.attr('data-text', text);
};
TimeRange24Input.property = {};
TimeRange24Input.property.notNull = {
  /***
   * @this TimeRange24Input
   * @param value
   */
  set: function set(value) {
    value = !!value;
    this.$offset.notNull = value;
    this.$duration.notNull = value;
    this._updateTextData();
  },
  get: function get() {
    return this.$offset.notNull;
  }
};
TimeRange24Input.property.disabled = {
  set: function set(value) {
    value = !!value;
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
    this.$offset.disabled = value;
    this.$duration.disabled = value;
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
TimeRange24Input.property.dayOffset = {
  set: function set(value) {
    var notNull = this.notNull;
    if ((0, _utils.isRealNumber)(value)) {
      value = (0, _utils.normalizeMinuteOfMillis)(value);
    } else {
      value = notNull ? 0 : null;
    }
    this.$offset.dayOffset = value;
    this.$duration.dayOffset = value;
    this._updateTextData();
  },
  get: function get() {
    return this.$offset.dayOffset;
  }
};
TimeRange24Input.property.duration = {
  /***
   * @this TimeRange24Input
   * @param value
   */
  set: function set(value) {
    var notNull = this.notNull;
    if ((0, _utils.isRealNumber)(value)) {
      value = Math.floor(Math.min(_datetime.MILLIS_PER_DAY, Math.max(0, value)));
      value = Math.floor(value / _datetime.MILLIS_PER_MINUTE) * _datetime.MILLIS_PER_MINUTE;
    } else {
      value = notNull ? 0 : null;
    }
    this.$duration.value = value;
    this._updateTextData();
  },
  get: function get() {
    return this.$duration.value;
  }
};
TimeRange24Input.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
      this.$offset.readOnly = true;
      this.$duration.readOnly = true;
    } else {
      this.removeClass('as-read-only');
      this.$offset.readOnly = false;
      this.$duration.readOnly = false;
    }
  },
  get: function get() {
    return this.containsClass('as-read-only');
  }
};
TimeRange24Input.property.value = {
  set: function set(value) {
    var rangeValue = null;
    if ((0, _utils.isRealNumber)(value)) rangeValue = {
      dayOffset: value,
      duration: 0
    };else if (!value) {} else if (_typeof(rangeValue) === "object") {
      if ((0, _utils.isRealNumber)(value.dayOffset)) {
        rangeValue = {
          dayOffset: value.dayOffset,
          duration: 0
        };
      } else {
        rangeValue = {
          dayOffset: 0,
          duration: 0
        };
      }
      if ((0, _utils.isRealNumber)(value.duration)) {
        rangeValue.duration = value.duration;
      }
    }
    if (rangeValue) {
      this.dayOffset = rangeValue.dayOffset;
      this.duration = rangeValue.duration;
    } else {
      this.dayOffset = null;
      this.duration = null;
    }
    return rangeValue;
  },
  get: function get() {
    if (!(0, _utils.isRealNumber)(this.dayOffset) && !(0, _utils.isRealNumber)(this.duration)) return null;
    return {
      dayOffset: this.dayOffset || 0,
      duration: this.duration || 0
    };
  }
};
TimeRange24Input.eventHandler = {};
TimeRange24Input.eventHandler.offsetChange = function (event) {
  var prevOffset = this.$duration.dayOffset;
  var preDuration = this.$duration.value;
  var prevEnd = prevOffset + preDuration;
  var newEnd;
  var newStart = this.$offset.dayOffset;
  if ((0, _utils.isRealNumber)(newStart)) {
    if ((0, _utils.isRealNumber)(prevEnd)) {
      newEnd = Math.max(newStart, Math.min(newStart + _datetime.MILLIS_PER_DAY - _datetime.MILLIS_PER_MINUTE, prevEnd));
    } else {
      newEnd = newStart;
    }
    this.$duration.dayOffset = newStart;
    this.$duration.value = newEnd - newStart;
  } else {
    this.$duration.dayOffset = 0;
    this.$duration.value = (0, _utils.isRealNumber)(prevEnd) ? Math.min(prevEnd, _datetime.MILLIS_PER_DAY - _datetime.MILLIS_PER_MINUTE) : null;
  }
  this._updateTextData();
  this.emit('change', {
    type: 'change',
    property: 'dayOffset',
    originalEvent: event.originalEvent || event.originEvent || event
  });
};
TimeRange24Input.eventHandler.durationChange = function (event) {
  if (!(0, _utils.isRealNumber)(this.$offset.dayOffset)) {
    this.$offset.dayOffset = this.$duration.dayOffset;
  }
  this._updateTextData();
  this.emit('change', {
    type: 'change',
    property: 'duration',
    originalEvent: event.originalEvent || event.originEvent || event
  });
};
_ACore["default"].install(TimeRange24Input);
var _default = TimeRange24Input;
exports["default"] = _default;

/***/ }),

/***/ 21348:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(78093);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _datetime = __webpack_require__(58286);
var _TimeInput = _interopRequireDefault(__webpack_require__(17019));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _utils = __webpack_require__(84512);
var _Dom = __webpack_require__(64821);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function TimeSelectInput() {
  /***
   *
   * @type {SelectListBox}
   */
  this.$selectlistBox = _({
    tag: 'selectlistbox',
    props: {
      anchor: [1, 6, 2, 5]
    },
    on: {
      preupdateposition: this.eventHandler.preUpdateListPosition
    }
  });
  this.$text = $('.as-time-select-input-text', this).on('change', this.eventHandler.textChange).on('keyup', this.eventHandler.textKeyUp).on('keydown', this.eventHandler.textKeyDown);
  this.$toggleBtn = $('absol-selectmenu-btn', this);
  this.$selectlistBox.on('pressitem', this.eventHandler.selectListBoxPressItem);
  this.$selectlistBox.followTarget = this;
  this.$selectlistBox.sponsorElement = this;
  this._makeTimeList(0, _datetime.MILLIS_PER_DAY, _datetime.MILLIS_PER_MINUTE * 15);
  this._hour = 0;
  this._minute = 0;
  this._lastDayOffset = 0;
  this.dayOffset = 0;
  this.on('click', this.eventHandler.click);
}
TimeSelectInput.tag = 'TimeSelectInput'.toLowerCase();
TimeSelectInput.render = function () {
  return _({
    "class": 'as-time-select-input',
    extendEvent: 'change',
    attr: {
      tabindex: 0
    },
    child: [{
      tag: 'input',
      "class": 'as-time-select-input-text',
      attr: {
        type: 'text'
      }
    }, {
      tag: 'button',
      "class": 'absol-selectmenu-btn',
      child: ['dropdown-ico']
    }]
  });
};
TimeSelectInput.prototype._makeTimeList = function (start, end, step) {
  var items = [];
  for (var t = 0; t < end; t += step) {
    items.push({
      text: this._mil2Text(t),
      value: t
    });
  }
  this.$selectlistBox.items = items;
  this.addStyle('--list-min-width', this.$selectlistBox._estimateWidth / 14 + 'em');
};
TimeSelectInput.prototype.textRegx = /^((1[0-2])|[1-9]):([0-5][0-9]) (AM|PM)$/;
TimeSelectInput.prototype._mil2Text = function (mil) {
  if (mil < 0) {
    mil = mil + Math.ceil(-mil / _datetime.MILLIS_PER_DAY) * _datetime.MILLIS_PER_DAY;
  }
  var min = Math.floor(mil / _datetime.MILLIS_PER_MINUTE);
  var hour = Math.floor(min / 60) % 24;
  min = min % 60;
  return (hour % 12 == 0 ? 12 : hour % 12) + ':' + (min < 10 ? '0' : '') + min + ' ' + (hour < 12 ? 'AM' : 'PM');
};

/***
 *
 * @param {string} s
 * @private
 */
TimeSelectInput.prototype._text2mil = function (s) {
  s = s.toLowerCase();
  var nums = s.match(/[0-9]+/g) || [0, 0];
  while (nums.length < 2) {
    nums.push(0);
  }
  var h = (0, _utils.positiveIntMod)(parseInt(nums[0]), 24);
  var m = (0, _utils.positiveIntMod)(parseInt(nums[1]), 60);
  var pm = s.indexOf('pm') > 0 || h > 12;
  if (pm) {
    if (h < 12) h += 12;
  } else {
    if (h == 12) h = 0;
  }
  return h * _datetime.MILLIS_PER_HOUR + m * _datetime.MILLIS_PER_MINUTE;
};
TimeSelectInput.prototype.isActive = function () {
  return document.activeElement == this || _AElement["default"].prototype.isDescendantOf.call(document.activeElement, this) || _AElement["default"].prototype.isDescendantOf.call(document.activeElement, this.$selectlistBox);
};
TimeSelectInput.prototype._updateValueText = function () {
  this.$text.value = this._mil2Text(this.dayOffset);
};
TimeSelectInput.prototype.notifyCanBeChange = function () {
  var dayOffset = this.dayOffset;
  if (this._lastDayOffset !== dayOffset) {
    this.emit('change', {
      type: 'change',
      lastDayOffset: this._lastDayOffset,
      dayOffset: dayOffset,
      target: this
    }, this);
    this._lastDayOffset = dayOffset;
  }
};
TimeSelectInput.property = {};
TimeSelectInput.property.isFocus = {
  get: function get() {
    return this.hasClass('as-focus');
  },
  set: function set(value) {
    value = !!value;
    if (value && (this.disabled || this.readOnly)) return;
    if (this.isFocus == value) return;
    if (value) {
      this.addClass('as-focus');
    } else {
      this.removeClass('as-focus');
    }
    var thisI = this;
    if (value) {
      this.$selectlistBox.addTo(document.body);
      var bound = this.getBoundingClientRect();
      this.$selectlistBox.addStyle('min-width', bound.width + 'px');
      this.$selectlistBox.refollow();
      this.$selectlistBox.updatePosition();
      setTimeout(function () {
        if (thisI.enableSearch) {
          thisI.$selectlistBox.$searchInput.focus();
        }
        $(document.body).on('click', thisI.eventHandler.bodyClick);
      }, 1);
      this.$selectlistBox.viewListAtFirstSelected();
    } else {
      $(document.body).off('click', thisI.eventHandler.bodyClick);
      this.$selectlistBox.selfRemove();
      this.$selectlistBox.unfollow();
      this.$selectlistBox.resetSearchState();
    }
  }
};
TimeSelectInput.property.hour = {
  set: function set(value) {
    this._hour = (0, _utils.positiveIntMod)(value, 24);
    this._lastDayOffset = this.dayOffset;
    this._updateValueText();
  },
  get: function get() {
    return this._hour;
  }
};
TimeSelectInput.property.minute = {
  set: function set(value) {
    this._minute = (0, _utils.positiveIntMod)(value, 60);
    this._lastDayOffset = this.dayOffset;
    this._updateValueText();
  },
  get: function get() {
    return this._minute;
  }
};
TimeSelectInput.property.dayOffset = _TimeInput["default"].property.dayOffset;
TimeSelectInput.property.disabled = {
  set: function set(value) {
    this.$text.disabled = !!value;
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};

/***
 *
 * @type {{}|TimeSelectInput}
 */
TimeSelectInput.eventHandler = {};
TimeSelectInput.eventHandler.selectListBoxPressItem = function (event) {
  var lastValue = this._lastDayOffset;
  var value = event.value;
  var text = this._mil2Text(value);
  this.dayOffset = value;
  this.$selectlistBox.values = [value];
  this.focus();
  setTimeout(function () {
    this.isFocus = false;
  }.bind(this), 100);
  this._lastDayOffset = lastValue; // restore last value after set dayOffset
  this.notifyCanBeChange();
};
TimeSelectInput.eventHandler.preUpdateListPosition = function () {
  var bound = this.getBoundingClientRect();
  var screenSize = (0, _Dom.getScreenSize)();
  var availableTop = bound.top - 5;
  var availableBot = screenSize.height - 5 - bound.bottom;
  this.$selectlistBox.addStyle('--max-height', Math.max(availableBot, availableTop) + 'px');
  var outBound = (0, _Dom.traceOutBoundingClientRect)(this);
  if (bound.bottom < outBound.top || bound.top > outBound.bottom || bound.right < outBound.left || bound.left > outBound.right) {
    this.isFocus = false;
  }
};
TimeSelectInput.eventHandler.textChange = function () {
  setTimeout(function () {
    if (!this.textRegx.test(this.$text.value)) {
      this.$text.value = this._mil2Text(this.dayOffset);
    }
  }.bind(this), 10);
};

/***
 *
 * @param {KeyboardEvent} event
 */
TimeSelectInput.eventHandler.textKeyDown = function (event) {
  if (event.key == 'Enter') {
    this.isFocus = false;
    this.$text.blur();
    this.notifyCanBeChange();
  }
};
TimeSelectInput.eventHandler.textKeyUp = function (event) {
  var s = this.$text.value;
  var mil = this._text2mil(s);
  this._hour = Math.floor(mil / _datetime.MILLIS_PER_HOUR);
  this._minute = Math.floor(mil / _datetime.MILLIS_PER_MINUTE) % 60;
  this.$selectlistBox.values = [mil];
  this.$selectlistBox.viewListAtFirstSelected();
};
TimeSelectInput.eventHandler.click = function (event) {
  if (!_EventEmitter["default"].hitElement(this.$text, event)) {
    this.isFocus = !this.isFocus;
    setTimeout(function () {
      if (this.isFocus && this.$text != document.activeElement) {
        this.$text.select();
      }
    }.bind(this), 1);
  } else {
    if (!this.isFocus) this.isFocus = true;
  }
};
TimeSelectInput.eventHandler.bodyClick = function (event) {
  if (_EventEmitter["default"].hitElement(this, event) || _EventEmitter["default"].hitElement(this.$selectlistBox, event)) return;
  this.isFocus = false;
};
_ACore["default"].install(TimeSelectInput);
var _default = TimeSelectInput;
exports["default"] = _default;

/***/ }),

/***/ 68105:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(15172);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _VariantColors = _interopRequireDefault(__webpack_require__(97428));
var _utils = __webpack_require__(84512);
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _EventEmitter = __webpack_require__(46833);
var _datetime = __webpack_require__(58286);
var _RelativeTimeText = _interopRequireDefault(__webpack_require__(39124));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var $ = _ACore["default"].$;
var _ = _ACore["default"]._;
var toastBg = {
  success: "#a4f3b6",
  info: "#67d5e7"
};
var toastTextColor = {
  success: '#454040',
  info: '#48433b'
};
(0, _utils.buildCss)(_VariantColors["default"].keys.reduce(function (ac, cr) {
  var color = _Color["default"].parse(toastBg[cr] || _VariantColors["default"].base[cr]);
  var textColor = color.getContrastYIQ();
  var headerColor = toastTextColor[cr] || _VariantColors["default"].mediumContract[cr] || color.getHightContrastColor();
  ac['.as-toast.as-variant-' + cr + ' .as-toast-variant-color'] = {
    'background-color': color.toString('hex6')
  };
  ac['.as-toast.as-variant-background.as-variant-' + cr] = {
    'background-color': color.toString('hex6'),
    color: textColor.toString('hex6')
  };
  ac['.as-toast.as-variant-background.as-variant-' + cr + ' .as-toast-header'] = {
    color: headerColor.toString('hex6')
  };
  return ac;
}, {}));

/***
 * @extends {AElement}
 * @constructor
 */
function Toast() {
  var _this = this;
  this._state = 0;
  this.$closeBtn = $('.as-toast-close-btn', this).on('click', this.disappear.bind(this));
  this.$title = $('.as-toast-title', this);
  this.$timeText = $('.as-toast-time-text', this);
  this.$body = $('.toast-body', this);
  this.$attachhook = $('attachhook', this).on('attached', this.appear.bind(this));
  _OOP["default"].drillProperty(this, this.$title.firstChild, 'htitle', 'data');
  this._message = null;
  this.$message = null;
  this.disappearTimeout = 0;
  this.htitle = 'Toast.htitle';
  this.message = null;
  this.variant = null;
  this.addEventListener('click', function (event) {
    if ((0, _EventEmitter.hitElement)(_this.$closeBtn, event)) return;
    _this.emit('click', event, _this);
  });
  _({
    tag: _RelativeTimeText["default"],
    elt: this.$timeText
  });
  (0, _OOP.drillProperty)(this, this.$timeText, ['timeText', 'time']);
}
Toast.tag = 'toast';
['addChild', 'removeChild', 'clearChild', 'addChildBefore', 'addChildAfter'].forEach(function (key) {
  Toast.prototype[key] = function () {
    this.$body[key].apply(this.$body, arguments);
  };
});
Toast.render = function () {
  return _({
    extendEvent: ['appeared', 'disappeared', 'click'],
    "class": ['as-toast', 'as-not-appeared'],
    child: [{
      "class": 'as-toast-header',
      child: ['.as-toast-variant-color', {
        tag: 'strong',
        "class": 'as-toast-title',
        child: {
          text: "Absol Js"
        }
      }, {
        tag: 'smal',
        "class": 'as-toast-time-text'
      }, {
        tag: 'button',
        "class": 'as-toast-close-btn',
        child: 'span.mdi.mdi-close'
        // child: { tag: 'span', child: { text: '×' } }
      }]
    }, {
      "class": 'toast-body'
    }, 'attachhook']
  });
};
Toast.prototype.disappear = function () {
  if (this._state !== 2) return;
  this._state = 3;
  this.addClass('as-disappearing');
  setTimeout(function () {
    this.removeClass('as-disappeared').removeClass('as-disappearing').addClass('as-not-appeared');
    this.remove();
    this.emit('disappeared', {
      target: this,
      type: 'disappeared'
    }, this);
  }.bind(this), 500);
};
Toast.prototype.appear = function () {
  if (this._state !== 0) return;
  this._state = 1;
  this.addClass('as-appearing');
  setTimeout(function () {
    this.removeClass('as-not-appeared').addClass('as-appeared').removeClass('as-appearing');
    this._state = 2;
    this.emit('appeared', {
      target: this,
      type: 'appeared'
    }, this);
    if (this.disappearTimeout > 0 && this.disappearTimeout < Infinity) {
      setTimeout(this.disappear.bind(this), this.disappearTimeout);
    }
  }.bind(this), 100);
};
Toast.property = {};
Toast.property.variant = {
  set: function set(value) {
    if (this._variant && this._variant !== value) {
      this.removeClass('as-variant-' + this._variant);
    }
    if (_VariantColors["default"].has(value) || ['sticky-note'].indexOf(value) >= 0) {
      this._variant = value;
      this.addClass('as-variant-' + this._variant);
    }
  },
  get: function get() {
    return this._variant;
  }
};
Toast.property.message = {
  set: function set(value) {
    if (typeof value !== "string" || value.length === 0) {
      value = null;
    }
    if (value) {
      if (!this.$message) {
        this.$message = _({
          "class": 'as-toast-message',
          child: {
            text: ''
          }
        });
      }
      if (!this.$message.parentElement) this.$body.addChild(this.$message);
      this.$message.firstChild.data = value;
    } else {
      if (this.$message && this.$message.parentElement) {
        this.$message.remove();
      }
    }
    this._message = value;
  },
  get: function get() {
    return this._message;
  }
};
Toast.$toastList = _('.as-toast-list.as-se.as-bscroller');
Toast.$toastList4Pos = {
  se: Toast.$toastList,
  sw: _('.as-toast-list.as-sw.as-bscroller'),
  nw: _('.as-toast-list.as-nw.as-bscroller'),
  ne: _('.as-toast-list.as-ne.as-bscroller'),
  sc: _('.as-toast-list.as-sc.as-bscroller')
};
_Dom["default"].documentReady.then(function () {
  Toast.$toastList.addTo(document.body);
  Toast.$toastList4Pos.sw.addTo(document.body);
  Toast.$toastList4Pos.nw.addTo(document.body);
  Toast.$toastList4Pos.ne.addTo(document.body);
  Toast.$toastList4Pos.sc.addTo(document.body);
});

/***
 *
 * @param {AbsolConstructDescriptor|{}} aObject,
 * @param {"se"|"sw"|"ne"|"nw"|"sc" } [pos="se"]
 * @return {AElementNS|AElement|Text}
 */
Toast.make = function (aObject, pos) {
  if (!Toast.$toastList4Pos[pos]) pos = "se";
  aObject = aObject || {};
  if (_typeof(aObject) !== "object") throw new Error("param must be AbsolConstructDescriptor object!");
  if ((0, _Dom.isDomNode)(aObject)) {} else {
    aObject.tag = aObject.tag || 'toast';
  }
  var toastElt = _(aObject);
  var toastListElt = Toast.$toastList4Pos[pos] || Toast.$toastList;
  toastListElt.addChild(toastElt);
  return toastElt;
};
_ACore["default"].install(Toast);
var _default = Toast;
exports["default"] = _default;

/***/ }),

/***/ 89951:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _SelectBoxItem = _interopRequireDefault(__webpack_require__(27233));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
__webpack_require__(12194);
var _utils = __webpack_require__(84512);
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Text = __webpack_require__(35844);
var _Dom = __webpack_require__(64821);
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function TokenField() {
  this.on('click', this.eventHandler.click);
  this.$input = (0, _ACore.$)('input', this).on('keydown', this.eventHandler.inputKeyDown).on('focus', this.eventHandler.inputInteract).on('click', this.eventHandler.inputInteract).on('keydown', this.eventHandler.inputInteract);
  this.$attachhook = (0, _ACore.$)('attachhook', this).on('attached', function () {
    _ResizeSystem["default"].add(this);
    this.requestUpdateSize();
  });
  this.$attachhook.requestUpdateSize = this.updateSize.bind(this);

  /***
   *
   * @type {SelectListBox}
   */
  this.$selectlistBox = (0, _ACore._)({
    tag: 'selectlistbox',
    props: {
      anchor: [1, 6, 2, 5]
    },
    on: {
      preupdateposition: this.eventHandler.preUpdateListPosition
    }
  });
  this.$selectlistBox.on('pressitem', this.eventHandler.selectListBoxPressItem);
  this.$selectlistBox.sponsorElement = this;
  this.autocomplete = null;
  this.separator = ' ';
  this.placeHolder = '';
}
TokenField.tag = 'TokenField'.toLowerCase();
TokenField.render = function () {
  return (0, _ACore._)({
    "class": 'as-token-field',
    extendEvent: ['change'],
    child: [{
      tag: 'input',
      "class": 'as-token-field-input-text',
      attr: {
        type: 'text',
        tabindex: '1'
      }
    }, 'attachhook']
  });
};
TokenField.prototype._makeItem = function (text) {
  var itemElt = (0, _ACore._)({
    tag: _SelectBoxItem["default"].tag,
    "class": 'as-token-field-item',
    attr: {
      tabindex: 1
    },
    props: {
      data: {
        text: text,
        value: text
      }
    }
  });
  itemElt.on({
    keydown: this.eventHandler.itemKeyDown.bind(this, itemElt),
    close: this.eventHandler.itemClose.bind(this, itemElt),
    focus: this.eventHandler.itemFocus.bind(this, itemElt)
  });
  return itemElt;
};
TokenField.prototype._appendItem = function (itemElt) {
  this.addChildBefore(itemElt, this.$input);
};
TokenField.prototype._updateInputWidth = function () {
  var lastItem = this.findChildBefore(this.$input);
  if (lastItem) {
    var lastItemBound = lastItem.getBoundingClientRect();
    var bound = this.getBoundingClientRect();
    var aRight = bound.right - 4 - lastItemBound.right;
    if (aRight > 60) {
      this.$input.addStyle('width', aRight + 'px');
    } else {
      this.$input.addStyle('width', '100%');
    }
  } else {
    this.$input.addStyle('width', '100%');
  }
};
TokenField.prototype._isSeparatorKey = function (key) {
  if (key === 'Enter') return true;
  if (this.separator === ' ') return key === ' ';
  if (this.separator === '\n') return key === 'Enter';
  if (this.separator === '\t') return key === 'Tab';
  return key === this.separator;
};
TokenField.prototype.updateSize = function () {
  this._updateInputWidth();
};
TokenField.prototype._notifyChange = function (data) {
  this.emit('change', Object.assign({
    type: 'change',
    target: this
  }, data), this);
};
TokenField.prototype._searchInList = function () {
  if (this._searchTimeout > 0) {
    clearTimeout(this._searchTimeout);
  }
  this._searchTimeout = setTimeout(function () {
    var text = this.$input.value;
    if (this.$selectlistBox.isDescendantOf(document.body)) {
      this.$selectlistBox.$searchInput.value = text;
      this.$selectlistBox.eventHandler.searchModify();
      if (this.$selectlistBox._displayItems.length === 0) {
        this.$selectlistBox.addStyle('visibility', 'hidden');
      } else {
        this.$selectlistBox.removeStyle('visibility');
      }
    }
  }.bind(this), 100);
};
TokenField.eventHandler = {};
TokenField.property = {};
TokenField.property.separator = {
  set: function set(value) {
    if (typeof value !== "string") value = ' ';
    this._separator = value;
  },
  get: function get() {
    return this._separator;
  }
};
TokenField.property.placeHolder = {
  set: function set(value) {
    this.$input.attr('placeholder', value || '');
  },
  get: function get() {
    return this.$input.attr('placeholder');
  }
};
TokenField.property.items = {
  set: function set(items) {
    items = items || [];
    while (this.firstChild && this.firstChild && this.firstChild.hasClass('as-token-field-item')) {
      this.firstChild.remove();
    }
    for (var i = 0; i < items.length; ++i) {
      this._appendItem(this._makeItem(items[i]));
    }
  },
  get: function get() {
    return Array.prototype.slice.call(this.childNodes).filter(function (elt) {
      return elt.hasClass && elt.hasClass('as-token-field-item');
    }).map(function (elt) {
      return elt.data.value;
    });
  }
};
TokenField.property.autocomplete = {
  set: function set(value) {
    this._autocomplete = value || null;
    if (this._autocomplete) {
      this.$selectlistBox.items = this._autocomplete.map(function (it) {
        return {
          value: it + '',
          text: it + ''
        };
      });
    } else {
      this.$selectlistBox.items = [];
    }
  },
  get: function get() {
    return this._autocomplete;
  }
};
TokenField.eventHandler.inputKeyDown = function (event) {
  if (this._isSeparatorKey(event.key)) {
    var text = this.$input.value;
    if (text.length > 0) {
      this.$input.value = '';
      var newItem = this._makeItem(text);
      this._appendItem(newItem);
      this.updateSize();
      this._notifyChange({
        action: 'add',
        item: text,
        itemElt: newItem
      });
      this.eventHandler.inputOut();
    }
    event.preventDefault();
  } else if (event.key.startsWith('Arrow') || event.key === 'Backspace') {
    if (this.$input.selectionStart === 0 && this.$input.selectionEnd === 0) {
      if (event.key === 'ArrowLeft' || event.key === 'Backspace') {
        event.preventDefault();
        var prevChild = this.findChildBefore(this.$input);
        if (prevChild) prevChild.focus();
      } else if (event.key === 'ArrowUp') {
        var item, itemBound;
        var inputBound = this.$input.getBoundingClientRect();
        var anchorPos = new _Vec["default"](inputBound.left + 5, inputBound.top + inputBound.height / 2);
        var minDis = Infinity;
        var dis;
        var aboveItem;
        for (var i = 0; i < this.childNodes.length; ++i) {
          item = this.childNodes[i];
          if (item.hasClass && item.hasClass('as-token-field-item')) {
            itemBound = item.getBoundingClientRect();
            if (itemBound.bottom < inputBound.top) {
              dis = new _Vec["default"](itemBound.left + itemBound.width / 2, itemBound.top + itemBound.height / 2).sub(anchorPos).abs();
              if (dis < minDis) {
                minDis = dis;
                aboveItem = item;
              }
            }
          }
        }
        if (aboveItem) {
          aboveItem.focus();
          event.preventDefault();
        }
      }
    } else {
      this._searchInList();
    }
  } else {
    this._searchInList();
  }
};
TokenField.eventHandler.inputInteract = function (event) {
  var lt = this._lastInteractTime;
  this._lastInteractTime = new Date().getTime();
  if (lt && this._lastInteractTime - lt < 100) {
    return;
  }
  if (this.$selectlistBox.isDescendantOf(document.body)) return;
  this.$selectlistBox.addTo(document.body);
  this.$selectlistBox.followTarget = this;
  this._searchInList();
  var bound = this.getBoundingClientRect();
  this.$selectlistBox.addStyle('min-width', bound.width + 'px');
  this.$selectlistBox.refollow();
  this.$selectlistBox.updatePosition();
  setTimeout(document.addEventListener.bind(document, 'click', this.eventHandler.inputOut), 100);
};
TokenField.eventHandler.inputOut = function (event) {
  if (event && ((0, _EventEmitter.hitElement)(this.$selectlistBox, event) || (0, _EventEmitter.hitElement)(this.$input, event))) return;
  document.removeEventListener('click', this.eventHandler.inputOut);
  this.$selectlistBox.selfRemove();
  this.$selectlistBox.followTarget = null;
  this._lastInteractTime = new Date().getTime();
};
TokenField.eventHandler.itemKeyDown = function (itemElt, event) {
  var nextElt;
  if (event.key === 'Delete' || event.key === 'Backspace') {
    if (event.key === 'Delete') {
      nextElt = this.findChildAfter(itemElt);
    } else {
      nextElt = this.findChildBefore(itemElt) || this.$input;
    }
    itemElt.remove();
    this._notifyChange({
      item: itemElt.data.value,
      action: 'remove',
      itemElt: itemElt
    });
    if (nextElt === this.$input) {
      this.$input.focus();
      (0, _Text.setCaretPosition)(this.$input, 0);
    } else {
      nextElt.focus();
    }
  } else if (event.key === 'ArrowLeft') {
    nextElt = this.findChildBefore(itemElt);
    if (nextElt) nextElt.focus();
  } else if (event.key === 'ArrowRight') {
    nextElt = this.findChildAfter(itemElt);
    if (nextElt === this.$input) {
      this.$input.focus();
      (0, _Text.setCaretPosition)(this.$input, 0);
    } else {
      nextElt.focus();
    }
  } else if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
    var currentItemBound = itemElt.getBoundingClientRect();
    var center = new _Vec["default"](currentItemBound.left + currentItemBound.width / 2, currentItemBound.top + currentItemBound.height / 2);
    var childElt, itemBound, dis;
    var minDis = Infinity;
    var i;
    if (event.key === 'ArrowUp') {
      for (i = 0; i < this.childNodes.length; ++i) {
        childElt = this.childNodes[i];
        if (childElt.hasClass && childElt.hasClass('as-token-field-item') || childElt === this.$input) {
          itemBound = childElt.getBoundingClientRect();
          if (itemBound.bottom < currentItemBound.top) {
            dis = new _Vec["default"](itemBound.left + itemBound.width / 2, itemBound.top + itemBound.height / 2).sub(center).abs();
            if (dis < minDis) {
              minDis = dis;
              nextElt = childElt;
            }
          }
        }
      }
    } else {
      for (i = 0; i < this.childNodes.length; ++i) {
        childElt = this.childNodes[i];
        if (childElt.hasClass && childElt.hasClass('as-token-field-item') || childElt === this.$input) {
          itemBound = childElt.getBoundingClientRect();
          if (itemBound.top > currentItemBound.bottom) {
            dis = new _Vec["default"](itemBound.left + itemBound.width / 2, itemBound.top + itemBound.height / 2).sub(center).abs();
            if (dis < minDis) {
              minDis = dis;
              nextElt = childElt;
            }
          }
        }
      }
    }
    if (nextElt) {
      nextElt.focus();
    }
  }
};
TokenField.eventHandler.itemFocus = function (itemElt) {
  this.eventHandler.inputOut();
};
TokenField.eventHandler.itemClose = function (itemElt) {
  itemElt.remove();
  this._notifyChange({
    action: 'remove',
    item: itemElt.data.value,
    itemElt: itemElt
  });
  this.$input.focus();
};
TokenField.eventHandler.click = function (event) {
  if (event.target === this) this.$input.focus();
};
TokenField.eventHandler.preUpdateListPosition = function () {
  var bound = this.getBoundingClientRect();
  var screenSize = (0, _Dom.getScreenSize)();
  var availableTop = bound.top - 5;
  var availableBot = screenSize.height - 5 - bound.bottom;
  this.$selectlistBox.addStyle('--max-height', Math.max(availableBot, availableTop) + 'px');
  var outBound = (0, _Dom.traceOutBoundingClientRect)(this);
  if (bound.bottom < outBound.top || bound.top > outBound.bottom || bound.right < outBound.left || bound.left > outBound.right) {
    // this.isFocus = false;
    //
  }
};
TokenField.eventHandler.selectListBoxPressItem = function (event) {
  var _this = this;
  var text = event.data.value;
  var newItem = this._makeItem(text);
  this._appendItem(newItem);
  this.updateSize();
  this._notifyChange({
    action: 'add',
    item: text,
    itemElt: newItem
  });
  this.eventHandler.inputOut();
  this.$input.value = '';
  setTimeout(function () {
    _this.$input.focus();
  }, 30);
};
_ACore["default"].install(TokenField);
var _default = TokenField;
exports["default"] = _default;

/***/ }),

/***/ 54946:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.updateTooltipPosition = updateTooltipPosition;
__webpack_require__(59613);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends AElement
 * @constructor
 */
function ToolTip() {
  this.$content = $('.absol-tooltip-content', this);
  this.$arrow = $('.absol-tooltip-arrow', this);
}
ToolTip.tag = 'ToolTip'.toLowerCase();
ToolTip.render = function () {
  return _({
    "class": 'absol-tooltip',
    child: [{
      "class": 'absol-tooltip-content'
    }, '.absol-tooltip-arrow']
  });
};
['addChild', 'addChildBefore', 'addChildAfter', 'clearChild'].forEach(function (key) {
  ToolTip.prototype[key] = function () {
    return this.$content[key].apply(this.$content, arguments);
  };
});
_ACore["default"].install(ToolTip);
function updateTooltipPosition(toolTipClass) {
  var element = toolTipClass.$element;
  if (!element) return;
  var orientation = toolTipClass._orientation;
  var tBound = toolTipClass.$tooltip.$content.getBoundingClientRect();
  var ebound = element.getBoundingClientRect();
  var screenSize = (0, _Dom.getScreenSize)();
  var sMargin = Math.round(Math.min(5, screenSize.width / 100, screenSize.height));
  screenSize.width = Math.min(screenSize.width, document.body.getBoundingClientRect().width);
  var fontSize = toolTipClass.$tooltip.getFontSize();
  var dx = 0;
  var dy = 0;
  var arrowPos = null;
  var aHCenter = ebound.left + ebound.width / 2 > tBound.width / 2 && screenSize.width - ebound.left - ebound.width / 2 > tBound.width / 2;
  var aVCenter = ebound.top + ebound.height / 2 > tBound.height / 2 && screenSize.height - ebound.top - ebound.height / 2 > tBound.height / 2;
  var aTop = tBound.height < ebound.top - sMargin;
  var aBottom = tBound.height < screenSize.height - sMargin - ebound.bottom;
  var aRight = tBound.width < screenSize.width - sMargin - ebound.right;
  var aLeft = tBound.width < ebound.left - sMargin;
  var aHLeft = ebound.left + ebound.width / 2 - tBound.width / 2 < sMargin && ebound.left + ebound.width / 2 >= sMargin + fontSize / 2;
  var aHRight = ebound.left + ebound.width / 2 + tBound.width / 2 > screenSize.width - sMargin && ebound.left + ebound.width / 2 < screenSize.width - sMargin - fontSize / 2;
  var aVTop = ebound.top + ebound.width / 2 - tBound.height / 2 < sMargin && ebound.top + ebound.height / 2 >= sMargin + fontSize / 2;
  var aVBottom = ebound.top + ebound.width / 2 + tBound.height / 2 <= screenSize.height - sMargin && ebound.top + ebound.height / 2 > screenSize.height - sMargin - fontSize / 2;
  if (orientation === 'auto' && aHCenter) {
    if (aTop) {
      orientation = 'top';
    } else if (aBottom) {
      orientation = 'bottom';
    }
  }
  if (orientation === 'auto' && aVCenter) {
    if (aRight) {
      orientation = 'right';
    } else if (aLeft) {
      orientation = 'left';
    }
  }
  if ((orientation === 'auto' || orientation === 'top' || orientation === 'bottom') && aHLeft) {
    if (aTop || orientation === 'auto') orientation = "top";else if (aBottom || orientation === 'auto') orientation = 'bottom';
    if (aTop || aBottom) {
      dx += tBound.width / 2 - (ebound.left + ebound.width / 2) + sMargin;
      arrowPos = tBound.width / 2 - dx + 'px';
    }
  }
  if ((orientation === 'auto' || orientation === 'top' || orientation === 'bottom') && aHRight) {
    if (aTop || orientation === 'auto') orientation = "top";else if (aBottom || orientation === 'auto') orientation = 'bottom';
    if (aTop || aBottom) {
      dx -= tBound.width / 2 - (screenSize.width - (ebound.left + ebound.width / 2)) + sMargin;
      arrowPos = tBound.width / 2 - dx + 'px';
    }
  }
  if ((orientation === 'auto' || orientation === 'left' || orientation === 'right') && aVTop) {
    if (aLeft || orientation === 'auto') orientation = "left";else if (aRight || orientation === 'auto') {
      orientation = 'right';
    }
    if (aLeft || aRight) {
      dy += tBound.height / 2 - (ebound.top + ebound.height / 2) + sMargin;
      arrowPos = tBound.height / 2 - dy + 'px';
    }
  }
  if ((orientation === 'auto' || orientation === 'left' || orientation === 'right') && aVBottom) {
    if (aLeft || orientation === 'auto') orientation = "left";else if (aRight || orientation === 'auto') {
      orientation = 'right';
    }
    if (aLeft || aRight) {
      dy -= tBound.height / 2 - (screenSize.height - (ebound.top + ebound.height / 2)) + sMargin;
      arrowPos = tBound.height / 2 - dx + 'px';
    }
  }
  if (orientation === 'auto') {
    if (aRight) {
      if (aTop) {
        orientation = 'ne';
      } else if (aBottom) {
        orientation = 'se';
      }
    } else if (aLeft) {
      if (aTop) {
        orientation = 'nw';
      } else if (aBottom) {
        orientation = 'sw';
      }
    }
  }
  if (orientation === 'auto') orientation = "error";
  toolTipClass.$tooltip.removeClass('top').removeClass('left').removeClass('right').removeClass('bottom').removeClass('ne').removeClass('nw').removeClass('se').removeClass('sw').addClass(orientation);
  tBound = toolTipClass.$tooltip.getBoundingClientRect();
  if (orientation == 'top') {
    dy += ebound.top - tBound.height;
    dx += ebound.left + ebound.width / 2 - tBound.width / 2;
  } else if (orientation == 'left') {
    dy += ebound.top + ebound.height / 2 - tBound.height / 2;
    dx += ebound.left - tBound.width;
  } else if (orientation == 'right') {
    dy += ebound.top + ebound.height / 2 - tBound.height / 2;
    dx += ebound.right;
  } else if (orientation == 'bottom') {
    dy += ebound.bottom;
    dx += ebound.left + ebound.width / 2 - tBound.width / 2;
  } else if (orientation === 'ne') {
    dy += ebound.top - tBound.height;
    dx += ebound.right;
  } else if (orientation === 'nw') {
    dy += ebound.top - tBound.height;
    dx += ebound.left - tBound.width;
  } else if (orientation === 'se') {
    dy += ebound.bottom;
    dx += ebound.right;
  } else if (orientation === 'sw') {
    dy += ebound.bottom;
    dx += ebound.left - tBound.width;
  } else {
    throw new Error("Invalid orientation, orientation: ['left', 'right', 'top', 'bottom', 'auto', 'nw', 'ne', 'sw', 'se']");
  }
  if (arrowPos) {
    toolTipClass.$tooltip.addStyle('--tool-tip-arrow-pos', arrowPos);
  } else {
    toolTipClass.$tooltip.removeStyle('--tool-tip-arrow-pos');
  }
  toolTipClass.$holder.addStyle({
    top: dy + 'px',
    left: dx + 'px'
  });
}
ToolTip.$holder = _('.absol-tooltip-root-holder');
ToolTip.$tooltip = _('tooltip.top').addTo(ToolTip.$holder);
ToolTip.$element = undefined;
ToolTip.$content = undefined;
ToolTip._orientation = 'top';
ToolTip._session = Math.random() * 10000000000 >> 0;
ToolTip.updatePosition = function () {
  if (!ToolTip.$element) return;
  updateTooltipPosition(ToolTip);
};
ToolTip.$tooltip.$arrow.updateSize = ToolTip.updatePosition.bind(ToolTip);
ToolTip.show = function (element, content, orientation) {
  orientation = orientation || 'auto';
  if (typeof content == 'string') {
    content = _({
      tag: 'span',
      style: {
        'white-space': 'nowrap'
      },
      props: {
        innerHTML: content
      }
    });
  }
  $('', content, function (elt) {
    if (elt.tagName == "IMG" && elt.src) {
      _Dom["default"].waitImageLoaded(elt).then(ToolTip.updatePosition.bind(ToolTip));
    } else if (elt.sync) {
      elt.sync.then(ToolTip.updatePosition.bind(ToolTip));
    }
  });
  var currentSession = Math.random() * 10000000000 >> 0;
  ToolTip.$holder.addTo(document.body);
  _Dom["default"].addToResizeSystem(ToolTip.$tooltip.$arrow);
  ToolTip.$element = element;
  ToolTip._session = currentSession;
  ToolTip.$content = content;
  ToolTip._orientation = orientation;
  ToolTip.$tooltip.clearChild().addChild(content);
  ToolTip.$holder.removeStyle('visibility');
  ToolTip.$tooltip.removeClass('top').removeClass('left').removeClass('right').removeClass('bottom').removeClass('ne').removeClass('nw').removeClass('auto');
  ToolTip.$tooltip.addClass(orientation);
  ToolTip.updatePosition();
  return currentSession;
};
ToolTip.close = function (session) {
  if (session === true || session === this._session) {
    ToolTip.$holder.addStyle('visibility', 'hidden');
    ToolTip.$tooltip.clearChild();
    ToolTip.$holder.addStyle({
      top: false,
      left: false
    });
  }
};
ToolTip.closeTooltip = ToolTip.close;
ToolTip.showWhenClick = function (element, content, orientation) {
  var mSession = undefined;
  element.addEventListener('click', function () {
    if (mSession !== undefined) return;
    mSession = ToolTip.show(element, content, orientation);
    var finish = function finish(event) {
      if (!_EventEmitter["default"].hitElement(content, event)) {
        $(document.body).off('click', finish);
        ToolTip.closeTooltip(mSession);
        mSession = undefined;
      }
    };
    setTimeout(function () {
      $(document.body).on('click', finish);
    }, 100);
  });
};
var _default = ToolTip;
exports["default"] = _default;

/***/ }),

/***/ 98912:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(5092);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _int = __webpack_require__(65909);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @extends Hanger
 * @constructor
 */
function TrackBar() {
  this.$bar = $('.absol-trackbar', this);
  this.$button = $('.absol-trackbar-button', this);
  this.$line = $('.absol-trackbar-line', this);
  this.on('predrag', this.eventHandler.predrag).on('drag', this.eventHandler.drag);
  this.leftValue = 0;
  this.rightValue = 1;
  this._dragValue = 0;
}
TrackBar.tag = 'trackbar';
TrackBar.render = function () {
  return _({
    tag: 'hanger',
    extendEvent: 'change',
    "class": 'absol-trackbar',
    child: [{
      "class": 'absol-trackbar-line',
      child: '.absol-trackbar-button'
    }, 'attachhook']
  });
};
TrackBar.prototype._updateValue = function () {
  var left = (0, _int.map)(this.value, this.leftValue, this.rightValue, 0, 100);
  this.$button.addStyle('left', left + '%');
};
TrackBar.eventHandler = {};
TrackBar.eventHandler.predrag = function (event) {
  if (event.target === this || this.readOnly) {
    event.cancel();
  } else {
    event.preventDefault();
    var lineBound = this.$line.getBoundingClientRect();
    var newValue = this.leftValue + (this.rightValue - this.leftValue) * (event.clientX - lineBound.left) / lineBound.width;
    newValue = Math.max(this.leftValue, Math.min(this.rightValue, newValue));
    if (newValue !== this.value) {
      this.value = newValue;
      event.trackbarValue = this.value;
      this._dragValue = this.value;
      this.emit('change', event);
    }
  }
};
TrackBar.eventHandler.drag = function (event) {
  var lineWidth = this.$line.getBoundingClientRect().width;
  var d = event.currentPoint.sub(event.startingPoint);
  var delta = d.x / lineWidth * (this.rightValue - this.leftValue);
  var newValue = Math.max(this.leftValue, Math.min(this.rightValue, this._dragValue + delta));
  if (newValue != this.value) {
    this.value = newValue;
    event.trackbarValue = this.value;
    this.emit('change', event);
  }
};
TrackBar.property = {};
TrackBar.property.value = {
  set: function set(value) {
    value = parseFloat(value + '');
    if (isNaN(value)) value = 0;
    this._value = value;
    this._updateValue();
  },
  get: function get() {
    return Math.max(this.leftValue, Math.min(this.rightValue, this._value));
  }
};
TrackBar.property.leftValue = {
  set: function set(value) {
    value = parseFloat(value + '');
    if (isNaN(value)) value = 0;
    this._leftValue = value;
    this._updateValue();
  },
  get: function get() {
    return this._leftValue || 0;
  }
};
TrackBar.property.rightValue = {
  set: function set(value) {
    value = parseFloat(value + '');
    if (isNaN(value)) value = 1;
    this._rightValue = value;
    this._updateValue();
  },
  get: function get() {
    return this._rightValue || 1;
  }
};
TrackBar.property.disabled = {
  get: function get() {
    return this.hasClass('as-disabled');
  },
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  }
};
TrackBar.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
_ACore["default"].install(TrackBar);
var _default = TrackBar;
exports["default"] = _default;

/***/ }),

/***/ 49748:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(74231);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 *
 * @extends {AElement}
 * @constructor
 */
function TrackBarInput() {
  var thisTI = this;
  this.$trackbar = $('trackbar', this);
  this.$input = $('flexiconinput', this);
  absol.OOP.drillProperty(this, this.$input, ['unit', 'icon']);
  this.$trackbar.on('change', function () {
    thisTI.$input.value = thisTI.value + '';
    thisTI.emit('change', thisTI.value);
  });
  this.$input.on('keyup', this.eventHandler.inputChange);
  this.inputTextWidth = 2;
  this.valueFixed = undefined;
  return this;
}
TrackBarInput.tag = 'TrackBarInput'.toLowerCase();
TrackBarInput.render = function () {
  return _({
    "class": 'absol-trackbar-input',
    extendEvent: 'change',
    child: ['trackbar', 'flexiconinput']
  });
};
TrackBarInput.prototype.init = function (props) {
  props = props || {};
  props.leftValue = props.leftValue || 0;
  props.value = props.value || props.leftValue;
  Object.assign(this, props);
  this.value = props.value;
};
TrackBarInput.prototype._calInputTextWidth = function () {
  var l = Math.max(this.leftValue.toFixed(this.valueFixed || 0).length, this.rightValue.toFixed(this.valueFixed || 0).length, 2);
  if (this.valueFixed > 0) {
    l -= 0.8;
  }
  this.inputTextWidth = l;
};
TrackBarInput.prototype.addStyle = function (arg0, arg1) {
  if (arg0 === 'textAlign' || arg0 === 'text-align') {
    this.$input.addStyle('text-align', arg1);
    return this;
  } else {
    _AElement["default"].prototype.addStyle.apply(this, arguments);
    return this;
  }
};

// absol.OOP.drillProperty(this, this.$trackbar, ['leftValue', 'rightValue']);

TrackBarInput.property = {};
TrackBarInput.property.leftValue = {
  set: function set(value) {
    this.$trackbar.leftValue = value;
    this._calInputTextWidth();
  },
  get: function get() {
    return this.$trackbar.leftValue;
  }
};
TrackBarInput.property.rightValue = {
  set: function set(value) {
    this.$trackbar.rightValue = value;
    this._calInputTextWidth();
  },
  get: function get() {
    return this.$trackbar.rightValue;
  }
};
TrackBarInput.property.value = {
  set: function set(value) {
    this.$trackbar.value = value || 0;
    this.$input.value = this.value + '';
  },
  get: function get() {
    return parseFloat((this.valueFixed === undefined ? this.$trackbar.value : this.$trackbar.value.toFixed(this.valueFixed)) + '');
  }
};
TrackBarInput.property.valueFixed = {
  set: function set(value) {
    if (value === undefined || value === null) value = undefined;
    this._valueFixed = value;
    this.$input.value = this.value + '';
    this._calInputTextWidth();
  },
  get: function get() {
    return this._valueFixed;
  }
};
TrackBarInput.property.inputTextWidth = {
  set: function set(value) {
    if (typeof value == 'number') {
      this._inputTextWidth = value;
      this.addStyle('--input-width', 3 + (value - 2) * 0.42 + 0.3 + 'em');
    } else {
      this._inputTextWidth = value;
      this.addStyle('--input-width', value);
    }
  },
  get: function get() {
    return this._inputTextWidth;
  }
};
TrackBarInput.property.disabled = {
  get: function get() {
    return this.hasClass('as-disabled');
  },
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
    this.$input.disabled = !!value;
    this.$trackbar.disabled = !!value;
  }
};
TrackBarInput.property.readOnly = {
  set: function set(value) {
    value = !!value;
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
    this.$input.readOnly = value;
    this.$trackbar.readOnly = value;
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
TrackBarInput.eventHandler = {};
TrackBarInput.eventHandler.inputChange = function (event) {
  var newValue = parseFloat(this.$input.value);
  if (!isNaN(newValue)) {
    newValue = Math.max(this.leftValue, Math.min(this.rightValue, newValue));
    this.$trackbar.value = newValue;
    this.emit('change', this.value);
  }
};
var _default = TrackBarInput;
exports["default"] = _default;

/***/ }),

/***/ 512:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(56817);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _generator = __webpack_require__(18528);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _utils = __webpack_require__(84512);
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function autoThemeVariable(viewElt) {
  var cp = getComputedStyle(document.body);
  var color = cp.getPropertyValue('--menu-background-color') || cp.getPropertyValue('--variant-color-primary') || 'blue';
  color = _Color["default"].parse(color.trim());
  var hsla = color.toHSLA();
  hsla[2] = (hsla[2] + 1) / 2;
  hsla[1] = (hsla[1] + 0.2) / 2;
  var nColor = _Color["default"].fromHSLA(hsla[0], hsla[1], hsla[2], hsla[3]);
  viewElt.addStyle('--vert-node-background-color', nColor.toString('rgba'));
  nColor = nColor.getContrastYIQ();
  viewElt.addStyle('--vert-node-text-color', nColor.toString('rgba'));
  hsla[0] += 0.1;
  if (hsla[0] > 1) hsla[0] -= 1;
  nColor = _Color["default"].fromHSLA(hsla[0], hsla[1], hsla[2], hsla[3]);
  viewElt.addStyle('--horz-node-background-color', nColor.toString('rgba'));
  nColor = nColor.getContrastYIQ();
  viewElt.addStyle('--horz-node-text-color', nColor.toString('rgba'));
  hsla[0] -= 0.2;
  if (hsla[0] < 0) hsla[0] += 1;
  nColor = _Color["default"].fromHSLA(hsla[0], hsla[1], hsla[2], hsla[3]);
  viewElt.addStyle('--root-background-color', nColor.toString('rgba'));
  nColor = nColor.getContrastYIQ();
  viewElt.addStyle('--root-text-color', nColor.toString('rgba'));
}

/***
 * @extends AElement
 * @constructor
 */
function TreeChart() {
  // autoThemeVariable(this);
  this.$domSignal = (0, _ACore._)('attachhook').addTo(this);
  this.domSignal = new _DomSignal["default"](this.$domSignal);
  this.domSignal.on('formatSize', this._formatSize.bind(this));
  this.domSignal.on('fixWidth', this._fixWidth.bind(this));
  this.$root = null;
  this._maxHorizonLevel = 2;
  /***
   * @name data
   * @type {any}
   * @memberOf TreeChart#
   */
  /***
   * @name maxHorizonLevel
   * @type {number}
   * @memberOf TreeChart#
   */
}

TreeChart.tag = 'TreeChart';
TreeChart.render = function () {
  return (0, _ACore._)({
    "class": 'as-tree-chart'
  });
};
TreeChart.prototype._updateContent = function () {
  var _this = this;
  if (this.$root) {
    this.$root.remove();
    this.$root = null;
  }
  var data = this.data;
  if (!data) return;
  var makeTree = function makeTree(nodeData, level) {
    var textChildren = [];
    if (nodeData.icon) {
      textChildren.push((0, _ACore._)(nodeData.icon).addClass('as-tree-chart-icon'));
    }
    textChildren.push({
      tag: 'span',
      "class": 'as-tree-chart-text',
      child: {
        text: nodeData.text || nodeData.name
      }
    });
    var elt = (0, _ACore._)({
      "class": 'as-tree-chart-node',
      attr: {
        "data-level": level + ''
      },
      child: [{
        "class": 'as-tree-chart-content-ctn',
        child: {
          "class": 'as-tree-chart-content',
          child: textChildren
        }
      }, {
        "class": 'as-tree-chart-child-ctn'
      }]
    });
    elt.$content = (0, _ACore.$)('.as-tree-chart-content', elt);
    elt.$childCtn = (0, _ACore.$)('.as-tree-chart-child-ctn', elt);
    var fillColor, textColor;
    if (typeof nodeData.fill === "string") {
      fillColor = _Color["default"].parse(nodeData.fill);
    } else if (nodeData.fill instanceof _Color["default"]) {
      fillColor = nodeData.fill;
    }
    if (fillColor) {
      textColor = fillColor.getContrastYIQ();
      elt.$content.addStyle({
        color: textColor.toString('hex8'),
        backgroundColor: fillColor.toString('hex8')
      });
    }
    if (level === _this.maxHorizonLevel) elt.addClass('as-horizontal');
    if (nodeData.isLeaf) elt.addClass('as-is-leaf');
    if (nodeData.items && nodeData.items.length > 0) {
      elt.addClass('as-has-children');
      /***
       * @type {AElement[]}
       */
      elt.$children = nodeData.items.map(function (it) {
        return makeTree(it, level + 1);
      });
      elt.$childCtn.addChild(elt.$children);
    }
    return elt;
  };
  this.$root = makeTree(data, 0).addTo(this);
  this.domSignal.emit('formatSize');
};
TreeChart.prototype._formatSize = function () {
  if (!this.$root) return;
  var cBound = this.getBoundingClientRect();
  var maxHorizonLevel = this.maxHorizonLevel;
  var visit = function visit(elt, level) {
    if (!elt.$children) return;
    var sArr, maxS;
    if (level < maxHorizonLevel) {
      sArr = elt.$children.map(function (e) {
        return e.$content.getBoundingClientRect().height;
      });
      maxS = Math.max.apply(Math, sArr);
      elt.$children.forEach(function (elt, i) {
        if (sArr[i] < maxS) {
          elt.$content.addStyle('height', maxS + 'px');
        }
      });
    } else {
      sArr = elt.$children.map(function (e) {
        return e.$content.getBoundingClientRect().width;
      });
      maxS = Math.max.apply(Math, sArr);
      elt.$children.forEach(function (elt, i) {
        if (sArr[i] < maxS) {
          elt.$content.addStyle('width', maxS + 'px');
        }
      });
    }
    elt.$children.forEach(function (c) {
      return visit(c, level + 1);
    });
  };
  visit(this.$root, 0);
  var newBound = this.getBoundingClientRect();
  if (cBound.width !== newBound.width || cBound.height !== newBound.height) {
    _ResizeSystem["default"].update();
  }
  this.domSignal.emit('fixWidth');
};
TreeChart.prototype._fixWidth = function () {
  if (!this.$root) return;
  var cBound = this.getBoundingClientRect();
  var maxHorizonLevel = this.maxHorizonLevel;
  var visit = function visit(elt) {
    if (!elt.$children) return;
    elt.$children.forEach(function (c) {
      return visit(c);
    });
    var bound, cBound;
    bound = elt.$childCtn.getBoundingClientRect();
    cBound = elt.$childCtn.getBoundingRecursiveRect(100);
    if (cBound.width > bound.width) {
      elt.$childCtn.addStyle('width', cBound.width + 'px');
    }
  };
  visit(this.$root);
  var newBound = this.getBoundingClientRect();
  if (cBound.width !== newBound.width || cBound.height !== newBound.height) {
    _ResizeSystem["default"].update();
  }
};
TreeChart.property = {};
TreeChart.property.data = {
  set: function set(data) {
    data = (0, _generator.copyJSVariable)(data || null);
    this._data = data;
    this._updateContent();
  },
  get: function get() {
    return this._data;
  }
};
TreeChart.property.maxHorizonLevel = {
  set: function set(value) {
    if (!(0, _utils.isNaturalNumber)(value)) value = 2; //default
    this._maxHorizonLevel = value;
    this._updateContent();
  },
  get: function get() {
    return this._maxHorizonLevel;
  }
};
_ACore["default"].install(TreeChart);
var _default = TreeChart;
exports["default"] = _default;

/***/ }),

/***/ 14927:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(24266);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _TreeListItem = _interopRequireDefault(__webpack_require__(72229));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function TreeList() {}
TreeList.tag = 'treelist';
TreeList.render = function () {
  return _({
    "class": 'absol-tree-list',
    extendEvent: 'press'
  });
};
TreeList.prototype.realignDescription = function (extMarginLeft) {
  extMarginLeft = extMarginLeft || 0;
  var maxWidth = 0;
  var ctns = [];
  $('.absol-tree-list-item-desc-container', this, function (elt) {
    ctns.push(elt);
    var bound = elt.getBoundingClientRect();
    maxWidth = Math.max(maxWidth, bound.width);
  });
  var fontSize = this.getFontSize();
  var cntWidth = maxWidth / fontSize + 'em';
  var extMarginRight = maxWidth / fontSize + extMarginLeft + 'em';
  ctns.forEach(function (e) {
    e.addStyle('width', cntWidth);
  });
  $('span.absol-tree-list-item-text', this, function (elt) {
    elt.addStyle('margin-right', extMarginRight);
  });
  return this;
};
TreeList.prototype.clearItems = function () {
  this._items = [];
  this.clearChild();
};
TreeList.prototype.getAllItem = function () {
  return this._items || [];
};
TreeList.prototype.getAllItemElement = function () {
  return Array.apply(null, this.childNodes);
};
TreeList.prototype.addItem = function (item) {
  var self = this;
  var props = {
    level: this.level,
    data: item
  };
  if (typeof item == 'string') {
    props.text = item;
  } else {
    props.text = item.text;
    if (item.items) {
      props.items = item.items;
    }
    if (item.desc) {
      props.desc = item.desc;
    }
    if (item.extendClasses) {
      props.extendClasses = item.extendClasses;
    }
    if (item.extendStyle) {
      props.extendStyle = item.extendStyle;
    }
  }
  var elt = _({
    tag: 'treelistitem',
    props: props,
    on: {
      press: function press(event) {
        self.emit('press', event, this);
      }
    }
  });
  this.addChild(elt);
  this._items.push(item);
  return this;
};
TreeList.property = {};
TreeList.property.items = {
  set: function set(value) {
    this.clearItems();
    (value || []).forEach(this.addItem.bind(this));
  },
  get: function get() {
    return this.getAllItem();
  }
};
TreeList.property.level = {
  set: function set(value) {
    value = value || 0;
    if (this.level == value) return;
    this._level = value;
    this.getAllItemElement().forEach(function (e) {
      e.level = value;
    });
  },
  get: function get() {
    return this._level || 0;
  }
};
_ACore["default"].install(TreeList);
var _default = TreeList;
exports["default"] = _default;

/***/ }),

/***/ 72229:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(24266);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function TreeListItem() {
  var thisTI = this;
  this.$list = $('treelist', this).on('press', function (event, sender) {
    thisTI.emit('press', event, this);
  });
  this.$parent = $('.absol-tree-list-item-parent', this).on('mousedown', this.eventHandler.clickParent);
  this.$text = $('span.absol-tree-list-item-text', this);
  this.$desc = $('span.absol-tree-list-item-desc', this);
  this.$descCtn = $('.absol-tree-list-item-desc-container', this);
  this.$list.level = 1;
  _OOP["default"].drillProperty(this, this.$list, 'items');
}
TreeListItem.tag = 'TreeListItem'.toLowerCase();
TreeListItem.render = function () {
  return _({
    extendEvent: ['press', 'clickparent'],
    "class": 'absol-tree-list-item',
    child: [{
      "class": 'absol-tree-list-item-parent',
      child: ['span.absol-tree-list-item-text', {
        "class": 'absol-tree-list-item-desc-container',
        child: 'span.absol-tree-list-item-desc'
      }]
    }, 'treelist']
  });
};
TreeListItem.eventHandler = {};
TreeListItem.eventHandler.clickParent = function (event) {
  event.preventDefault();
  var prevented = false;
  var self = this;
  this.emit('press', {
    target: self,
    preventDefault: function preventDefault() {
      prevented = true;
    },
    isPrevented: function isPrevented() {
      return prevented;
    },
    data: this.data
  }, this);
  if (!prevented) {
    var top = self.getTopLevelElt();
    $('treelistitem', top, function (e) {
      if (e != self) e.active = false;
    });
    self.active = true;
  }
};
TreeListItem.prototype.getTopLevelElt = function () {
  var current = this;
  while (current) {
    var parent = current.parentNode;
    if (!parent || !parent.classList.contains('absol-tree-list') && !parent.classList.contains('absol-tree-list-item')) break;
    current = current.parentNode;
  }
  return current;
};
TreeListItem.property = {
  text: {
    set: function set(value) {
      value = value + '';
      this.$text.innerHTML = value;
    },
    get: function get() {
      return this.$text.innerHTML;
    }
  },
  desc: {
    set: function set(value) {
      value = value + '';
      this.$desc.innerHTML = value;
    },
    get: function get() {
      return this.$desc.innerHTML;
    }
  },
  level: {
    set: function set(value) {
      value = value || 0;
      if (value == this.level) return;
      this._level = value;
      this.$parent.addStyle('padding-left', this._level * 0.4 * 3 + 'em');
      this.$list.level = value + 1;
    },
    get: function get() {
      return this._level || 0;
    }
  },
  active: {
    set: function set(value) {
      if (value) {
        this.addClass('active');
      } else {
        this.removeClass('active');
      }
    },
    get: function get() {
      return this.hasClass('active');
    }
  },
  data: {
    set: function set(value) {
      this._data = value;
    },
    get: function get() {
      return this._data;
    }
  },
  value: {
    get: function get() {
      var data = this.data;
      if (typeof data == 'string') return data;
      if (typeof data.value == "undefined") {
        return data.text;
      } else {
        return data.value;
      }
    }
  }
};
TreeListItem.property.extendClasses = {
  set: function set(value) {
    var self = this;
    this.extendClasses.forEach(function (className) {
      self.$parent.removeClass(className);
    });
    this._extendClass = [];
    if (!value) return;
    if (typeof value == 'string') {
      value = value.split(/\s+/).filter(function (c) {
        return c.length > 0;
      });
    }
    if (value instanceof Array) {
      this._extendClass = value;
      this._extendClass.forEach(function (className) {
        self.$parent.addClass(className);
      });
    } else {
      throw new Error('Invalid extendClasses');
    }
  },
  get: function get() {
    return this._extendClass || [];
  }
};
TreeListItem.property.extendStyle = {
  set: function set(value) {
    this.$parent.removeStyle(this._extendStyle || {});
    this._extendStyle = value || {};
    this.$parent.addStyle(this.extendStyle);
  },
  get: function get() {
    return this._extendStyle || {};
  }
};
_ACore["default"].install(TreeListItem);
var _default = TreeListItem;
exports["default"] = _default;

/***/ }),

/***/ 46523:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(90081);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _utils = __webpack_require__(84512);
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/**
 * @extends AElement
 * @constructor
 */
function VRuler() {
  var self = this;
  this.$attachHook = _('attachhook').on('error', function () {
    this.updateSize = self.update.bind(self);
    _Dom["default"].addToResizeSystem(this);
    this.updateSize();
  }).addTo(this);
  this.$lines = [];
  this.$numbers = [];
  this.$measureTarget = undefined;
  this._viewingNumberCount = 0;
  this._viewingLineCount = 0;
  this._spacing = 10;
  this._major = 10;
  this._valueFloat = 'top';

  /**
   * @type {number}
   * @name major
   * @memberof VRuler#
   */
  /**
   * @type {number}
   * @name spacing
   * @memberof VRuler#
   */

  /**
   * @type {boolean}
   * @name inverse
   * @memberof VRuler#
   */
}

VRuler.tag = 'vruler';
VRuler.render = function () {
  return _({
    "class": 'as-vruler'
  });
};
VRuler.prototype.revokeResource = function () {
  this.$measureTarget = null;
  this.$attachHook.cancelWaiting();
  (0, _utils.revokeResource)(this.$lines);
  (0, _utils.revokeResource)(this.$numbers);
  this.clearChild();
  this.revokeResource = _noop["default"];
};
VRuler.prototype.measureElement = function (elt) {
  if (typeof elt == "string") elt = $(elt);
  this.$measureTarget = elt;
  this.update();
};
VRuler.prototype.update = function () {
  var fontSize = this.getFontSize() || 14;
  var measureBound;
  var bound = this.getBoundingClientRect();
  if (!bound.width || !bound.height) return;
  var contentBound = {
    left: bound.left + 1,
    right: bound.right - 1,
    top: bound.top + 1,
    bottom: bound.bottom - 1,
    width: bound.width - 2,
    height: bound.height - 2
  };
  if (this.$measureTarget) {
    measureBound = this.$measureTarget.getBoundingClientRect();
  } else {
    measureBound = contentBound;
  }
  var startOffset = (measureBound[this._valueFloat] - contentBound[this._valueFloat]) * (this.inverse ? -1 : 1) % this._spacing;
  if (startOffset < 0) startOffset += this._spacing;
  var lineIndexOffset = Math.round(((contentBound[this._valueFloat] - measureBound[this._valueFloat]) * (this.inverse ? -1 : 1) + startOffset) / this._spacing);
  var lineCount = Math.floor((contentBound.height - startOffset) / this._spacing) + 1;
  while (this.$lines.length < lineCount) {
    this.$lines.push(_('.as-vruler-line'));
  }
  var i;
  var lineElt;
  for (i = 0; i < lineCount; ++i) {
    lineElt = this.$lines[i];
    if ((i + lineIndexOffset) % this._major == 0) {
      lineElt.addClass('major');
    } else {
      lineElt.removeClass('major');
    }
    lineElt.addStyle(this._valueFloat, startOffset + this._spacing * i - 0.5 + 'px');
  }
  try {
    while (this._viewingLineCount < lineCount) {
      this.$lines[this._viewingLineCount++].addTo(this);
    }
    while (this._viewingLineCount > lineCount) {
      this.$lines[--this._viewingLineCount].remove();
    }
  } catch (e) {}
  var numberCount = Math.floor((lineCount + lineIndexOffset - 1) / this._major) - Math.ceil(lineIndexOffset / this._major) + 1;
  while (this.$numbers.length < numberCount) {
    this.$numbers.push(_('.as-vruler-major-number'));
  }
  var numberElt;
  var number;
  var majorStartOfset = startOffset;
  if (lineIndexOffset > 0) {
    majorStartOfset += (this._major - lineIndexOffset % this._spacing) * this._spacing;
  } else {
    majorStartOfset += (this._major - (this._spacing + lineIndexOffset % this._spacing)) * this._spacing;
  }
  for (i = 0; i < numberCount; ++i) {
    number = (Math.ceil(lineIndexOffset / this._major) + i) * this._spacing * this._major;
    numberElt = this.$numbers[i];
    if (numberElt.__cacheNumber__ != number) {
      numberElt.__cacheNumber__ = number;
      numberElt.innerHTML = number + '';
    }
    numberElt.addStyle(this._valueFloat, majorStartOfset + this._major * i * this._spacing - 0.7 * 0.5 * fontSize + 'px');
  }
  while (this._viewingNumberCount < numberCount) {
    this.$numbers[this._viewingNumberCount++].addTo(this);
  }
  try {
    while (this._viewingNumberCount > numberCount) {
      this.$numbers[--this._viewingNumberCount].remove();
    }
  } catch (e) {}
};
VRuler.property = {};
VRuler.property.major = {
  set: function set(value) {
    if (value > 0) {
      this._major = value;
      this.update();
    }
  },
  get: function get() {
    return this._major;
  }
};
VRuler.property.spacing = {
  set: function set(value) {
    if (value > 0) {
      this._spacing = value;
      this.update();
    }
  },
  get: function get() {
    return this._spacing;
  }
};
VRuler.property.inverse = {
  set: function set(value) {
    this._valueFloat = value ? 'bottom' : 'top';
    this.update();
  },
  get: function get() {
    return this._valueFloat === 'bottom';
  }
};
_ACore["default"].install(VRuler);
var _default = VRuler;
exports["default"] = _default;

/***/ }),

/***/ 97428:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(3972);
var _Dom = _interopRequireDefault(__webpack_require__(64821));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function VariantColor() {
  this.keys = ['primary', 'secondary', 'success', 'info', 'warning', 'error', 'danger', 'light', 'dark', 'link', 'note'];
  this.base = {
    primary: "#007bff",
    secondary: "#6c757d",
    success: "#28a745",
    info: "#17a2b8",
    warning: "#ffc107",
    error: "#ff4052",
    danger: "#dc3545",
    light: "#f8f9fa",
    dark: "#343a40",
    link: "#007bff",
    note: '#ffff88'
  };
  this.mediumContract = {
    primary: '#e2edd5',
    secondary: '#fca75b',
    success: '#fce8e8',
    info: '#fcf5e8',
    warning: '#5e5a75',
    error: '#e0dfce',
    danger: "#e5e8d5",
    light: '#7a5b3c',
    dark: "#bf7d3b",
    link: "#dde8c9",
    note: '#1e1ec8'
  };
  _Dom["default"].documentReady.then(this.loadFromCss.bind(this));
}
VariantColor.prototype.has = function (name) {
  return this.keys.indexOf(name) >= 0;
};
VariantColor.prototype.loadFromCss = function () {
  this.base = this.keys.reduce(function (ac, name) {
    var style = window.getComputedStyle(document.body);
    ac[name] = style.getPropertyValue('--variant-color-' + name);
    return ac;
  }, {});
  this.mediumContract = this.keys.reduce(function (ac, name) {
    var style = window.getComputedStyle(document.body);
    ac[name] = style.getPropertyValue('--variant-medium-contract-color-' + name);
    return ac;
  }, {});
};
var _default = new VariantColor();
exports["default"] = _default;

/***/ }),

/***/ 8960:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(70431);
var _utils = __webpack_require__(84512);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function VerticalTimeline() {
  this._current = 0;
  this._items = [];
  this.$items = [];
  this.current = 0;
}
VerticalTimeline.tag = 'VerticalTimeline'.toLowerCase();
VerticalTimeline.render = function () {
  return (0, _ACore._)({
    "class": 'as-vertical-timeline',
    child: []
  });
};
VerticalTimeline.prototype._makeItem = function (item, i) {
  var iconElt = (0, _ACore._)('span.mdi.mdi-circle');
  return (0, _ACore._)({
    "class": 'as-vertical-timeline-item',
    props: {
      $icon: iconElt
    },
    child: [{
      "class": 'as-vertical-timeline-icon-ctn',
      child: iconElt
    }, {
      "class": 'as-vertical-timeline-tile',
      child: {
        tag: 'span',
        child: {
          text: item.text
        }
      }
    }]
  });
};
VerticalTimeline.property = {};
VerticalTimeline.property.items = {
  /***
   * @this VerticalTimeline
   * @param items
   */
  set: function set(items) {
    items = items || [];
    this._items = items;
    this.clearChild();
    this.$items = items.map(function (item, i) {
      return this._makeItem(item, i);
    }.bind(this));
    this.addChild(this.$items);
    this.current = this._current; //update
  },

  get: function get() {}
};
VerticalTimeline.property.current = {
  set: function set(value) {
    value = (0, _utils.isRealNumber)(value) ? value >> 0 : -1;
    this._current = value;
    var itemElt;
    for (var i = 0; i < this.$items.length; ++i) {
      itemElt = this.$items[i]; //.$icon.removeClass('');
      if (i < value) {
        itemElt.$icon.removeClass('mdi-numeric-' + (i + 1) + '-circle').removeClass('mdi-circle').addClass('mdi-check-circle');
        itemElt.removeClass('as-inactive').removeClass('as-active');
      } else if (i === value) {
        itemElt.$icon.addClass('mdi-numeric-' + (i + 1) + '-circle').removeClass('mdi-circle').removeClass('mdi-check-circle');
        itemElt.removeClass('as-inactive').addClass('as-active');
      } else {
        itemElt.addClass('as-inactive').removeClass('as-active');
        itemElt.$icon.removeClass('mdi-numeric-' + (i + 1) + '-circle').addClass('mdi-circle').removeClass('mdi-check-circle');
      }
    }
  },
  get: function get() {
    return Math.max(-1, Math.min(this._current, this._items.length));
  }
};
_ACore["default"].install(VerticalTimeline);
var _default = VerticalTimeline;
exports["default"] = _default;

/***/ }),

/***/ 73606:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.VerticalTreeDiagramNode = VerticalTreeDiagramNode;
exports["default"] = void 0;
__webpack_require__(3378);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function VerticalTreeDiagramNode() {
  this.$childCtn = (0, _ACore.$)('.as-vertical-tree-diagram-child-ctn', this);
  this.$name = (0, _ACore.$)('.as-vertical-tree-diagram-node-name', this);
  _OOP["default"].drillProperty(this, this.$name.firstChild, 'name', 'data');
  this.name = "UndefinedNodeName";
}
VerticalTreeDiagramNode.tag = 'VerticalTreeDiagramNode'.toLowerCase();
VerticalTreeDiagramNode.render = function () {
  return (0, _ACore._)({
    "class": 'as-vertical-tree-diagram-node',
    child: [{
      "class": 'as-vertical-tree-diagram-node-name-ctn',
      child: {
        "class": 'as-vertical-tree-diagram-node-name',
        child: {
          text: ""
        }
      }
    }, {
      "class": 'as-vertical-tree-diagram-child-ctn'
    }]
  });
};
['addChild', 'removeChild', 'clearChild', 'addChildBefore', 'addChildAfter', 'findChildBefore', 'findChildAfter'].forEach(function (name) {
  VerticalTreeDiagramNode.prototype[name] = function () {
    this.$childCtn[name].apply(this.$childCtn, arguments);
    if (this.$childCtn.childNodes.length > 0) {
      this.addClass('as-has-child');
      if (this.$childCtn.childNodes.length === 1) {
        this.addClass('as-has-1-child');
      } else {
        this.removeClass('as-has-1-child');
      }
    } else {
      this.removeClass('as-has-child');
      this.removeClass('as-has-1-child');
    }
  };
});
function VerticalTreeDiagram(data) {
  this.data = data || {};
}
VerticalTreeDiagram.tag = 'VerticalTreeDiagram'.toLowerCase();
VerticalTreeDiagram.render = function () {
  return (0, _ACore._)(VerticalTreeDiagramNode.tag, true);
};
VerticalTreeDiagram.property = {};
VerticalTreeDiagram.property.data = {
  set: function set(data) {
    data = data || {};
    this._data = data;
    function makeNode(nodeData) {
      return (0, _ACore._)({
        tag: VerticalTreeDiagramNode.tag,
        props: {
          name: nodeData.name
        },
        child: nodeData.child && nodeData.child.length > 0 && nodeData.child.map(makeNode) || []
      });
    }
    this.name = data.name + '';
    this.clearChild();
    if (data.child) this.addChild(data.child.map(makeNode));
  },
  get: function get() {
    return this._data;
  }
};
_ACore["default"].install(VerticalTreeDiagramNode);
_ACore["default"].install(VerticalTreeDiagram);
var _default = VerticalTreeDiagram;
exports["default"] = _default;

/***/ }),

/***/ 13675:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(65756);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Draggable = _interopRequireDefault(__webpack_require__(39891));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
//can replace with other module
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
function WidthHeightResizer() {
  var res = _({
    extendEvent: 'sizechange',
    "class": 'absol-width-height-resizer',
    child: ['.absol-width-height-resizer-content', '.absol-width-height-resizer-anchor-bot-right', '.absol-width-height-resizer-anchor-bot-left', '.absol-width-height-resizer-anchor-top-right', '.absol-width-height-resizer-anchor-top-left']
  });
  res.eventHandler = _OOP["default"].bindFunctions(res, WidthHeightResizer.eventHandler);
  res.$anchorBotRight = $('.absol-width-height-resizer-anchor-bot-right', res);
  res.$anchorTopRight = $('.absol-width-height-resizer-anchor-top-right', res);
  res.$anchorBotLeft = $('.absol-width-height-resizer-anchor-bot-left', res);
  res.$anchorTopLeft = $('.absol-width-height-resizer-anchor-top-left', res);
  res.$content = $('.absol-width-height-resizer-content', res);
  (0, _Draggable["default"])(res.$anchorBotRight).on('drag', res.eventHandler.dragBotRight).on('predrag', res.eventHandler.preDrag);
  (0, _Draggable["default"])(res.$anchorTopRight).on('drag', res.eventHandler.dragTopRight).on('predrag', res.eventHandler.preDrag);
  (0, _Draggable["default"])(res.$anchorBotLeft).on('drag', res.eventHandler.dragBotLeft).on('predrag', res.eventHandler.preDrag);
  (0, _Draggable["default"])(res.$anchorTopLeft).on('drag', res.eventHandler.dragTopLeft).on('predrag', res.eventHandler.preDrag);
  return res;
}
['addChild', 'addChildBefore', 'addChildAfter', 'clearChild'].forEach(function (key) {
  WidthHeightResizer.prototype[key] = function () {
    return this.$content[key].apply(this.$content, arguments);
  };
});
WidthHeightResizer.tag = 'WidthHeightResizer'.toLowerCase();
WidthHeightResizer.eventHandler = {};
WidthHeightResizer.eventHandler.preDrag = function (event) {
  this._whrWidth = parseFloat(this.getComputedStyleValue('width').replace('px', ''));
  this._whrHeight = parseFloat(this.getComputedStyleValue('height').replace('px', ''));
};
WidthHeightResizer.eventHandler.dragBotRight = function (event) {
  var newEvent = {
    target: this,
    data: {}
  };
  if (event.moveDX != 0) {
    this.addStyle('width', this._whrWidth + event.moveDX + 'px');
    newEvent.data.changeWidth = true;
  }
  if (event.moveDY != 0) {
    this.addStyle('height', this._whrHeight + event.moveDY + 'px');
    newEvent.data.changeHeight = true;
  }
  newEvent.data.height = this.getComputedStyleValue('height');
  newEvent.data.width = this.getComputedStyleValue('width');
  this.emit('sizechange', newEvent);
};
WidthHeightResizer.eventHandler.dragTopRight = function (event) {
  var newEvent = {
    target: this,
    data: {}
  };
  if (event.moveDX != 0) {
    this.addStyle('width', this._whrWidth + event.moveDX + 'px');
    newEvent.data.changeWidth = true;
  }
  if (event.moveDY != 0) {
    this.addStyle('height', this._whrHeight - event.moveDY + 'px');
    newEvent.data.changeHeight = true;
  }
  newEvent.data.height = this.getComputedStyleValue('height');
  newEvent.data.width = this.getComputedStyleValue('width');
  this.emit('sizechange', newEvent);
};
WidthHeightResizer.eventHandler.dragBotLeft = function (event) {
  var newEvent = {
    target: this,
    data: {}
  };
  if (event.moveDX != 0) {
    this.addStyle('width', this._whrWidth - event.moveDX + 'px');
    newEvent.data.changeWidth = true;
  }
  if (event.moveDY != 0) {
    this.addStyle('height', this._whrHeight + event.moveDY + 'px');
    newEvent.data.changeHeight = true;
  }
  newEvent.data.height = this.getComputedStyleValue('height');
  newEvent.data.width = this.getComputedStyleValue('width');
  this.emit('sizechange', newEvent);
};
WidthHeightResizer.eventHandler.dragTopLeft = function (event) {
  var newEvent = {
    target: this,
    data: {}
  };
  if (event.moveDX != 0) {
    this.addStyle('width', this._whrWidth - event.moveDX + 'px');
    newEvent.data.changeWidth = true;
  }
  if (event.moveDY != 0) {
    this.addStyle('height', this._whrHeight - event.moveDY + 'px');
    newEvent.data.changeHeight = true;
  }
  newEvent.data.height = this.getComputedStyleValue('height');
  newEvent.data.width = this.getComputedStyleValue('width');
  this.emit('sizechange', newEvent);
};
_ACore["default"].creator.widthheightresizer = WidthHeightResizer;
var _default = WidthHeightResizer;
exports["default"] = _default;

/***/ }),

/***/ 24405:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @typedef WindowBoxAction
 * @property icon
 * @property name
 *
 */

/***
 * @extends AElement
 * @constructor
 */
function WindowBox() {
  this.$header = (0, _ACore.$)('.as-window-box-header', this);
  /***
   *
   * @type {WindowBoxAction[]}
   * @private
   */
  this._windowActions = [];
  this.$windowActionButtonCtn = (0, _ACore.$)('.as-window-box-header-button-ctn', this);
  this._windowIcon = null;
  this.$windowIconCtn = (0, _ACore.$)('.as-window-box-header-icon-ctn', this);

  /**
   *
   * @type {Text}
   */
  this.$windowTitleText = (0, _ACore.$)('.as-window-box-header-title', this).firstChild;
  this.$body = (0, _ACore.$)('.as-window-box-body', this);

  /***
   * @type {WindowBoxAction[]}
   * @name windowActions
   */
}

WindowBox.tag = 'WindowBox'.toLowerCase();
WindowBox.render = function () {
  return (0, _ACore._)({
    "class": 'as-window-box',
    extendEvent: ['action'],
    child: [{
      "class": 'as-window-box-header',
      child: [{
        "class": 'as-window-box-header-icon-ctn'
      }, {
        "class": 'as-window-box-header-title',
        child: {
          text: ''
        }
      }, {
        "class": "as-window-box-header-button-ctn"
      }]
    }, {
      "class": 'as-window-box-body'
    }]
  });
};
['addChild', 'addChildBefore', 'addChildAfter', 'clearChild', 'findChildBefore', 'findChildAfter'].forEach(function (key) {
  WindowBox.prototype[key] = function () {
    return this.$body[key].apply(this.$body, arguments);
  };
});
WindowBox.property = {};
WindowBox.property.windowTitle = {
  set: function set(value) {
    this.$windowTitleText.data = (value || '') + '';
  },
  get: function get() {
    return this.$windowTitleText.data;
  },
  enumerable: true
};
WindowBox.property.windowIcon = {
  /***
   * @this WindowBox
   * @param value
   */
  set: function set(value) {
    value = value || null;
    this.$windowIconCtn.clearChild();
    if (value) {
      this.$windowIconCtn.addChild((0, _ACore._)(value));
    }
    this._windowIcon = value;
  },
  get: function get() {
    return this._windowIcon;
  },
  enumerable: true
};
WindowBox.property.windowActions = {
  set: function set(actions) {
    var self = this;
    this._windowActions = actions || [];
    this.$windowActionButtonCtn.clearChild();
    var buttons = this._windowActions.map(function (action) {
      return (0, _ACore._)({
        tag: 'button',
        "class": action["class"] || [],
        child: action.icon,
        on: {
          click: function click(event) {
            var eventData = {
              type: 'action',
              target: self,
              action: action,
              originalEvent: event
            };
            _OOP["default"].drillProperty(eventData, eventData, 'actionData', 'action');
            self.emit('action', eventData, self);
          }
        }
      });
    });
    this.$windowActionButtonCtn.addChild(buttons);
  },
  get: function get() {
    return this._windowActions;
  }
};
_ACore["default"].install(WindowBox);
var _default = WindowBox;
exports["default"] = _default;

/***/ }),

/***/ 57318:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(40210);
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends MessageDialog
 * @constructor
 */
function YesNoQuestionDialog() {
  this.dialogActions = [{
    "class": 'secondary',
    text: 'No',
    name: 'no'
  }, {
    "class": 'primary',
    text: 'Yes',
    name: 'yes'
  }];
  this.$yesBtn = this.$actionBtns[1];
  this.$noBtn = this.$actionBtns[0];
  this.$message = (0, _ACore.$)('.as-message-dialog-message', this);
  /*{
          class: 'as-message-dialog-footer',
          child: [
              {
                  tag: FlexiconButton.tag,
                  class: ['as-message-dialog-no-btn', 'secondary'],
                  props: {
                      text: 'No'
                  }
              },
              {
                  tag: FlexiconButton.tag,
                  class: ['as-message-dialog-yes-btn', 'primary'],
                  props: {
                      text: 'Yes'
                  }
              }
          ]
      }*/
}

YesNoQuestionDialog.tag = 'YesNoQuestionDialog'.toLowerCase();
YesNoQuestionDialog.render = function () {
  return (0, _ACore._)({
    tag: _MessageDialog["default"].tag,
    child: [{
      tag: 'span',
      "class": 'as-message-dialog-message',
      child: {
        text: ''
      }
    }]
  });
};
YesNoQuestionDialog.eventHandler = {};
YesNoQuestionDialog.property = {};
YesNoQuestionDialog.property.message = {
  set: function set(value) {
    value = (value || '') + '';
    this.$message.firstChild.data = value;
  },
  get: function get() {
    return this.$message.firstChild.data;
  }
};
YesNoQuestionDialog.property.textYes = {
  set: function set(value) {
    value = (value || 'Yes') + '';
    this.$yesBtn.text = value;
    this.dialogActions[1].text = value;
  },
  get: function get() {
    return this.$yesBtn.text;
  }
};
YesNoQuestionDialog.property.textNo = {
  set: function set(value) {
    value = (value || 'No') + '';
    this.$noBtn.text = value;
    this.dialogActions[0].text = value;
  },
  get: function get() {
    return this.$noBtn.text;
  }
};
_ACore["default"].install(YesNoQuestionDialog);
var _default = YesNoQuestionDialog;
exports["default"] = _default;

/***/ }),

/***/ 60335:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 *
 * @param {PlaceSearchAutoCompleteInput} inputElt
 * @constructor
 */
function PlaceSearchAutoCompleteAdapter(inputElt) {
  this.inputElt = inputElt;
  this.service = new google.maps.places.AutocompleteService(this.inputElt.$service);
}
PlaceSearchAutoCompleteAdapter.prototype.queryItems = function (query, mInput) {
  var request = {
    input: query
  };
  return new Promise(function (resolve) {
    this.service.getPlacePredictions(request, function (results, status) {
      if (status === google.maps.places.PlacesServiceStatus.OK) {
        resolve(results);
      } else resolve([]);
    });
  }.bind(this));
};
PlaceSearchAutoCompleteAdapter.prototype.getItemText = function (item, mInput) {
  return item.description;
};
PlaceSearchAutoCompleteAdapter.prototype.getItemView = function (item, index, _, $, query, reuseItem, refParent, mInput) {
  return _({
    "class": 'as-place-search-auto-complete-item',
    child: [{
      "class": 'as-place-search-auto-complete-item-desc',
      child: {
        text: item.description
      }
    }]
  });
};
var _default = PlaceSearchAutoCompleteAdapter;
exports["default"] = _default;

/***/ }),

/***/ 10035:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * @typedef {Object} SearchObjectArrayAdapter
 * @property {function} getItemText
 * 
 * 
 * 
 * @param {Array<Object>} arr 
 * @param {SearchArrayAdapterOption} options
 */
function SearchObjectArrayAdapter(objects, options) {
  if (!this.queryItems) return new SearchObjectArrayAdapter(texts, options);
  this.objects = objects;
  this.options = options;
}
SearchObjectArrayAdapter.prototype.queryItems = function (query, mInput) {
  var query = query.toLocaleLowerCase();
  return this.objects.map(function (object) {
    var text = this.getItemText(object);
    var start = text.toLocaleLowerCase().indexOf(query);
    if (start >= 0) {
      var hightlightedText = text.substr(0, start) + '<strong style="color:red">' + text.substr(start, query.length) + '</strong>' + text.substr(start + query.length);
      return Object.assign(object, {
        __hightlightedText__: hightlightedText
      });
    } else return null;
  }.bind(this)).filter(function (it) {
    return it !== null;
  });
};
SearchObjectArrayAdapter.prototype.onAttached = function (parent) {
  this.parent = parent;
  parent.getSelectedObject = function () {
    if (this._selectedIndex >= 0) {
      return this.$poolItems[this._selectedIndex]._holderItem;
    } else {
      return null;
    }
  };
};
SearchObjectArrayAdapter.prototype.getItemText = function (item, mInput) {
  if (this.options && this.options.getItemText) return this.options.getItemText.call(this, item, mInput);else if (typeof item.text == 'string') {
    return item.text;
  } else return item.toString();
};
SearchObjectArrayAdapter.prototype.getItemView = function (item, index, _, $, query, reuseItem, refParent, mInput) {
  if (reuseItem) {
    reuseItem.childNodes[0].innerHTML = item.__hightlightedText__;
    return reuseItem;
  } else return _({
    tag: 'div',
    child: {
      tag: 'span',
      props: {
        innerHTML: item.__hightlightedText__
      }
    }
  });
};
var _default = SearchObjectArrayAdapter;
exports["default"] = _default;

/***/ }),

/***/ 27521:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * @typedef {Object} SearchArrayAdapterOption
 * @property {function} searchFuntion
 * 
 * 
 * 
 * @param {Array<String>} arr 
 * @param {SearchArrayAdapterOption} options not implement yet
 */
function SearchStringArrayAdapter(texts, options) {
  if (!this.queryItems) return new SearchStringArrayAdapter(texts, options);
  this.texts = texts;
}
SearchStringArrayAdapter.prototype.queryItems = function (query, mInput) {
  var query = query.toLocaleLowerCase();
  return this.texts.map(function (text) {
    var start = text.toLocaleLowerCase().indexOf(query);
    if (start >= 0) {
      var hightlightedText = text.substr(0, start) + '<strong style="color:red">' + text.substr(start, query.length) + '</strong>' + text.substr(start + query.length);
      return {
        text: text,
        hightlightedText: hightlightedText
      };
    } else return null;
  }).filter(function (it) {
    return it !== null;
  });
};
SearchStringArrayAdapter.onAttached = function (parent) {
  this.parent = parent;
};
SearchStringArrayAdapter.prototype.getItemText = function (item, mInput) {
  return item.text;
};
SearchStringArrayAdapter.prototype.getItemView = function (item, index, _, $, query, reuseItem, refParent, mInput) {
  if (reuseItem) {
    reuseItem.childNodes[0].innerHTML = item.hightlightedText;
    return reuseItem;
  } else return _({
    tag: 'div',
    child: {
      tag: 'span',
      "class": 'absol-autocomplete-input-item-text',
      props: {
        innerHTML: item.hightlightedText
      }
    }
  });
};
var _default = SearchStringArrayAdapter;
exports["default"] = _default;

/***/ }),

/***/ 48819:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.CTBModeNormal = CTBModeNormal;
exports.CTBModeSearch = CTBModeSearch;
var _utils = __webpack_require__(84512);
/***
 *
 * @param {MCheckTreeBox} elt
 * @param {[]} items
 * @constructor
 */
function CTBModeNormal(elt, items) {
  var _this = this;
  this.level = -1;
  this.selected = 'none';
  this.elt = elt;
  this.$list = this.elt.$list;
  /***
   *
   * @type {MCTBItemHolder[]}
   */
  this.children = items.map(function (item) {
    return new _this.elt.classes.ItemHolder(elt, _this, item);
  });
  this.hasLeaf = this.children.some(function (holder) {
    return holder.hasLeaf;
  });
  this.hasNoSelect = this.children.some(function (holder) {
    return holder.hasNoSelect;
  });
  this.hasDesc = this.children.some(function (holder) {
    return holder.hasDesc;
  });
  this.hasIcon = this.children.some(function (holder) {
    return holder.hasIcon;
  });
  if (this.hasLeaf) {
    this.elt.addClass('as-has-leaf');
  } else {
    this.elt.removeClass('as-has-leaf');
  }
  if (this.hasNoSelect) {
    this.elt.addClass('as-has-no-select');
    this.elt.$chekAll.disabled = true;
  } else {
    this.elt.removeClass('as-has-no-select');
    this.elt.$chekAll.disabled = false;
  }
  this.dict = this.children.reduce(function visit(ac, child) {
    var key = (0, _utils.keyStringOf)(child.data.value);
    if (ac[key]) {
      console.error('Duplicate value:', ac[key].data, child.data);
    }
    ac[key] = child;
    if (child.children) {
      child.children.reduce(visit, ac);
    }
    return ac;
  }, {});
}
CTBModeNormal.prototype.onStart = function () {
  this.$list.clearChild();
  var rootHolders = this.children;
  var viewElements = [];
  rootHolders.forEach(function (holder) {
    holder.getViewElements(viewElements);
  }, []);
  this.$list.addChild(viewElements);
};
CTBModeNormal.prototype.onStop = function () {};
CTBModeNormal.prototype.updateUp = function () {
  var selected = {
    child: 0,
    all: 0,
    none: 0 /*dont: 0*/
  };
  var childN = this.children.length;
  this.children.reduce(function (ac, child) {
    ac[child.selected]++;
    return ac;
  }, selected);
  if (childN === selected.all) {
    this.selected = 'all';
  } else if (childN === selected.none) {
    this.selected = "none";
  } else {
    this.selected = 'child';
  }
  this.elt.$chekAll.checked = this.selected === 'all';
};
CTBModeNormal.prototype.select = function (flag) {
  this.children.forEach(function (child) {
    return child.select(flag, true);
  });
  this.updateUp();
};
CTBModeNormal.prototype.getHolderByValue = function (value) {
  return this.dict[(0, _utils.keyStringOf)(value)] || null;
};
CTBModeNormal.prototype.setValues = function (values) {
  var _this2 = this;
  this.children.forEach(function (node) {
    return node.select(false);
  });
  values.forEach(function (value) {
    var holder = _this2.getHolderByValue(value);
    if (holder) holder.select(true);
  });
};
CTBModeNormal.prototype.getValues = function () {
  var values = [];
  var leafOnly = this.elt.leafOnly;
  this.children.forEach(function visit(node) {
    if (node.selected === 'all' && !node.hasNoSelect) {
      if (leafOnly) {
        if (node.data.isLeaf) {
          values.push(node.data.value);
        } else if (node.data.items) {
          node.data.items.forEach(function visitLeaf(item) {
            if (item.isLeaf) {
              values.push(item.value);
            } else if (item.items) {
              item.items.forEach(visitLeaf);
            }
          });
        }
      } else {
        values.push(node.data.value);
      }
    } else if (node.children) {
      node.children.forEach(visit);
    }
  });
  return values;
};
CTBModeNormal.prototype.getViewValues = function () {
  var values = [];
  this.children.forEach(function visit(node) {
    if (node.selected === 'all' && !node.hasNoSelect) {
      values.push(node.data.value);
    } else if (node.children) {
      node.children.forEach(visit);
    }
  });
  return values;
};

/***
 *
 * @param {MCheckTreeBox} elt
 * @param {[]} items
 * @constructor
 */
function CTBModeSearch(elt, items) {
  var _this3 = this;
  this.level = -1;
  this.selected = 'none';
  this.elt = elt;
  this.$list = this.elt.$list;
  this.children = items.map(function (item) {
    return new _this3.elt.classes.ItemHolder(elt, _this3, item);
  });
}
CTBModeSearch.prototype.onStart = function () {
  CTBModeNormal.prototype.onStart.call(this);
  this.updateSelectedFromRef();
};
CTBModeSearch.prototype.onStop = function () {};
CTBModeSearch.prototype.updateSelectedFromRef = function () {
  var normalMode = this.elt.modes.normal;
  this.children.forEach(function visit(holder) {
    holder.selected = holder.ref.selected;
    if (holder._elt) {
      holder._elt.selected = holder.selected;
    }
    if (holder.children) holder.children.forEach(visit);
  });
};

/***/ }),

/***/ 17489:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var CTBPropHandlers = {};
CTBPropHandlers.items = {
  /***
   * @this MCheckTreeBox
   * @param items
   */
  set: function set(items) {
    this.itemListCtrl.setItems(items);
    var values = this.pendingValues || this.values;
    this.modes.normal.setValues(values);
    if (this.mode !== this.modes.normal) {
      this.mode.updateSelectedFromRef();
    }
  },
  get: function get() {
    return this.itemListCtrl.getItems();
  }
};
CTBPropHandlers.values = {
  /***
   * @this CheckTreeBox|MCheckTreeBox
   * @param values
   */
  set: function set(values) {
    this.pendingValues = values || [];
    this.modes.normal.setValues(values);
    if (this.mode !== this.modes.normal) {
      this.mode.updateSelectedFromRef();
    }
  },
  get: function get() {
    return this.modes.normal.getValues();
  }
};
CTBPropHandlers.viewValues = {
  get: function get() {
    return this.modes.normal.getViewValues();
  }
};
CTBPropHandlers.enableSearch = {
  /***
   * @this CheckTreeBox|MCheckTreeBox
   * @param value
   */
  set: function set(value) {
    if (value) {
      this.$box.addClass('as-enable-search');
    } else {
      this.$box.removeClass('as-enable-search');
    }
  },
  get: function get() {
    return this.$box.hasClass('as-enable-search');
  }
};
CTBPropHandlers.leafOnly = {
  /***
   * @this CheckTreeBox|MCheckTreeBox
   * @param value
   */
  set: function set(value) {
    if (value) {
      this.$box.addClass('as-leaf-only');
    } else {
      this.$box.removeClass('as-leaf-only');
    }
    var values = this.pendingValues || this.values;
    this.modes.normal.setValues(values);
  },
  get: function get() {
    return this.$box.hasClass('as-leaf-only');
  }
};
var _default = CTBPropHandlers;
/***
 *
 * @type {boolean}
 * @name enableSearch
 * @memberOf MCheckTreeBox#
 */
exports["default"] = _default;

/***/ }),

/***/ 51972:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _utils = __webpack_require__(84512);
var CTIPropHandlers = {};
CTIPropHandlers.data = {
  /***
   * @this MCheckTreeItem|CheckTreeItem
   * @param data
   */
  set: function set(data) {
    this._data = data;
    this._updateData();
  },
  get: function get() {
    return this._data;
  }
};
CTIPropHandlers.text = {
  get: function get() {
    if (!this._data) return '';
    if (this._data.charAt) return this._data;
    var text = this._data.text;
    if (text === undefined || text === null) return '';
    return this._data.text + '';
  }
};
CTIPropHandlers.value = {
  get: function get() {
    if (!this._data) return null;
    if (this._data.charAt) return this._data;
    return this._data.value;
  }
};
CTIPropHandlers.desc = {
  get: function get() {
    if (!this._data) return '';
    var desc = this._data.desc;
    if (desc === undefined || desc === null) return '';
    return desc + '';
  }
};
CTIPropHandlers.level = {
  set: function set(value) {
    if (!(0, _utils.isNaturalNumber)(value)) value = 0;
    this._level = value;
    this.addStyle('--level', value + '');
  },
  get: function get() {
    return this._level;
  }
};
CTIPropHandlers.status = {
  set: function set(value) {
    value = value === 'open' || value === 'close' ? value : 'none';
    this._status = value;
    this.removeClass('as-status-open').removeClass('as-status-close');
    if (value !== "none") {
      this.addClass('as-status-' + value);
    }
  },
  get: function get() {
    return this._status || 'none';
  }
};
CTIPropHandlers.selected = {
  set: function set(value) {
    if (value === 'all') {
      this.$checkbox.checked = true;
      this.$checkbox.removeClass('as-has-minus');
    } else if (value === 'child') {
      this.$checkbox.checked = false;
      this.$checkbox.addClass('as-has-minus');
    } else {
      this.$checkbox.checked = false;
      this.$checkbox.removeClass('as-has-minus');
    }
  },
  get: function get() {
    if (this.$checkbox.checked) {
      return 'all';
    } else {
      if (this.$checkbox.hasClass('as-has-minus')) {
        return 'child';
      } else {
        return 'none';
      }
    }
  }
};
CTIPropHandlers.hasLeaf = {
  set: function set(value) {
    if (value) {
      this.addClass('as-has-leaf');
    } else {
      this.removeClass('as-has-leaf');
    }
  },
  get: function get() {
    return this.hasClass('as-has-leaf');
  }
};
CTIPropHandlers.noSelect = {
  set: function set(value) {
    if (value) {
      this.addClass('as-no-select');
    } else {
      this.removeClass('as-no-select');
    }
    this.$checkbox.disabled = !!value;
  },
  get: function get() {
    return this.hasClass('as-no-select');
  }
};
var _default = CTIPropHandlers;
exports["default"] = _default;

/***/ }),

/***/ 82822:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MCTBItemHolder = MCTBItemHolder;
exports.MCheckTreeItem = MCheckTreeItem;
exports["default"] = void 0;
__webpack_require__(26795);
var _ACore = __webpack_require__(34093);
var _CTBPropHandlers = _interopRequireDefault(__webpack_require__(17489));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _CTBModes = __webpack_require__(48819);
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
var _EventEmitter = __webpack_require__(46833);
var _utils = __webpack_require__(84512);
var _CTIPropHandlers = _interopRequireDefault(__webpack_require__(51972));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ListDictionary = _interopRequireDefault(__webpack_require__(50218));
var _search = _interopRequireWildcard(__webpack_require__(67858));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * not optimize
 * @param {MCheckTreeBox} elt
 * @constructor
 */
function MCTBItemListController(elt) {
  this.elt = elt;
  this.items = [];
  _ListDictionary["default"].call(this, this.items, {
    depth: true
  });
}
_OOP["default"].mixClass(MCTBItemListController, _ListDictionary["default"]);
MCTBItemListController.prototype.setItems = function (items) {
  items = items || [];
  if (!items.forEach || !items.map) items = [];
  this.items = (0, _utils.copySelectionItemArray)(items, {
    removeNoView: true
  });
  this.arr = this.items;
  this.update();
};
MCTBItemListController.prototype.update = function () {
  _ListDictionary["default"].prototype.update.call(this);
  var mode = new this.elt.classes.ModeNormal(this.elt, this.items);
  this.elt.modes.normal = mode;
  if (mode.hasDesc) {
    this.elt.$list.addClass('as-has-desc');
  } else {
    this.elt.$list.removeClass('as-has-desc');
  }
  if (mode.hasIcon) {
    this.elt.$list.addClass('as-has-icon');
  } else {
    this.elt.$list.removeClass('as-has-icon');
  }
  this.elt.mode = mode;
  mode.onStart();
  this._searchItems = (0, _search.prepareSearchForList)((0, _utils.copySelectionItemArray)(this.items));
  this._searchCache = {};
};
MCTBItemListController.prototype.getItems = function () {
  return (0, _utils.copySelectionItemArray)(this.items || []);
};
MCTBItemListController.prototype.makeSearch = function (query) {
  if (this._searchCache[query]) return this._searchCache[query].resetAndGet();
  var searchItem = (0, _search["default"])({
    text: query
  });
  var minScore = Infinity;
  var maxScore = -Infinity;
  var scoredHolders = this._searchItems.map(function visit(item) {
    var holder = {
      item: item,
      score: (0, _search.calcItemMatchScore)(searchItem, item),
      childMaxScore: -Infinity
    };
    minScore = Math.min(minScore, holder.score);
    maxScore = Math.max(maxScore, holder.score);
    if (item.items && item.items.length > 0) {
      holder.children = item.items.map(visit);
      holder.childMaxScore = holder.children.reduce(function (ac, cr) {
        return Math.max(ac, cr.score, cr.childMaxScore);
      }, 0);
    }
    return holder;
  });
  var threshHold = maxScore - (maxScore - minScore) / 3;
  var result = scoredHolders.reduce(function filterVisit(ac, cr) {
    var subItems;
    if (Math.max(cr.score, cr.childMaxScore) >= threshHold) {
      ac.items.push(cr.item);
      if (cr.children && cr.childMaxScore >= cr.score) {
        ac.status[(0, _utils.keyStringOf)(cr.item.value)] = 'open';
        subItems = cr.children.reduce(filterVisit, {
          items: [],
          status: ac.status
        }).items;
        cr.item.items = subItems;
      } else {
        if (cr.children && cr.children.length > 0) {
          ac.status[(0, _utils.keyStringOf)(cr.item.value)] = 'open';
        }
      }
    }
    return ac;
  }, {
    items: [],
    status: {}
  });
  var normalMode = this.elt.modes.normal;
  result.mode = new this.elt.classes.ModeSearch(this.elt, result.items);
  result.resetAndGet = function () {
    this.mode.children && this.mode.children.forEach(function resetVisit(holder) {
      var key = (0, _utils.keyStringOf)(holder.data.value);
      holder.ref = normalMode.getHolderByValue(holder.data.value);
      if (holder.status === 'open' && result.status[key] !== 'open') {
        holder.status = 'close';
        if (holder._elt) {
          holder._elt.status = 'close';
        }
      } else if (holder.status === 'close' && result.status[key] === 'open') {
        holder.status = 'open';
        if (holder._elt) {
          holder._elt.status = 'open';
        }
      }
      if (holder.children) holder.children.forEach(resetVisit);
    });
    return this.mode;
  };
  this._searchCache[query] = result;
  return result.resetAndGet();
};

/***
 * @extends AElement
 * @constructor
 */
function MCheckTreeItem() {
  this._data = null;
  this._status = 'none';
  this.$text = (0, _ACore.$)('.am-check-tree-item-text', this).firstChild;
  this.$desc = (0, _ACore.$)('.am-check-tree-item-desc', this).firstChild;
  this.$iconCtn = (0, _ACore.$)('.am-check-tree-item-icon-ctn', this);
  this.$checkbox = (0, _ACore.$)('checkboxinput', this).on('change', this.eventHandler.checkboxChange);
  this.addEventListener('click', this.eventHandler.click);
}
MCheckTreeItem.tag = 'MCheckTreeItem'.toLowerCase();
MCheckTreeItem.render = function () {
  return (0, _ACore._)({
    extendEvent: ['checkedchange', 'click', 'statuschange'],
    "class": ['am-check-tree-item', 'am-dropdown-box-item'],
    child: [{
      "class": 'am-check-tree-item-toggle-ctn',
      child: 'toggler-ico'
    }, {
      "class": 'am-check-tree-item-icon-ctn'
    }, {
      "class": 'am-check-tree-item-checkbox-ctn',
      child: 'checkboxinput'
    }, {
      "class": 'am-check-tree-item-text',
      child: {
        text: ''
      }
    }, {
      "class": 'am-check-tree-item-desc',
      child: {
        text: ''
      }
    }]
  });
};
MCheckTreeItem.prototype._updateData = function () {
  this.$text.data = this.text;
  this.$desc.data = this.desc;
  this.$iconCtn.clearChild();
  this.$icon = null;
  this.attr('data-key', (0, _utils.keyStringOf)(this.value));
  if (this._data && this._data.icon) {
    this.$icon = (0, _ACore._)(this._data.icon);
    if (this.$icon.parentElement) {
      this.$icon = this.$icon.cloneNode(true);
    }
    this.$iconCtn.addChild(this.$icon);
    this.addClass('as-has-icon');
  } else {
    this.removeClass('as-has-icon');
  }
  if (this._data && this._data.isLeaf) {
    this.addClass('as-is-leaf');
  } else {
    this.removeClass('as-is-leaf');
  }
};
MCheckTreeItem.eventHandler = {};
MCheckTreeItem.eventHandler.click = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$checkbox, event)) return;
  var checkboxBound = this.$checkbox.getBoundingClientRect();
  var canCheck = this.$checkbox.getComputedStyleValue('pointer-events') !== 'none' && !this.$checkbox.disabled && checkboxBound.width > 0;
  if (this.status === 'none' && canCheck) {
    this.$checkbox.checked = !this.$checkbox.checked;
    this.$checkbox.notifyChange();
  } else if (this.status !== 'none') {
    if (!checkboxBound.width) {
      checkboxBound = this.$iconCtn.getBoundingClientRect();
    }
    if (!checkboxBound.width) {
      checkboxBound = {
        left: this.getBoundingClientRect().left + parseFloat(this.$text.parentElement.getComputedStyleValue('padding-left').replace('px'))
      };
    }
    if (event.clientX < checkboxBound.left || !canCheck) {
      this.status = this.status === 'open' ? 'close' : 'open';
      this.emit('statuschange', {
        type: 'statuschange',
        target: this
      }, this);
    } else if (canCheck) {
      this.$checkbox.checked = !this.$checkbox.checked;
      this.$checkbox.notifyChange();
    }
  }
};
MCheckTreeItem.eventHandler.checkboxChange = function () {
  this.emit('checkedchange', {
    type: 'checkedchange'
  }, this);
};
MCheckTreeItem.property = _CTIPropHandlers["default"];

/***
 * @name data
 * @memberOf MCheckTreeItem#
 */

/***
 * @name text
 * @type {string}
 * @memberOf MCheckTreeItem#
 */

/***
 * @name desc
 * @type {string}
 * @memberOf MCheckTreeItem#
 */

/***
 * @name value
 * @memberOf MCheckTreeItem#
 */

/***
 * @extends AElement
 * @constructor
 */
function MCheckTreeBox() {
  this.$box = (0, _ACore.$)('.am-check-tree-box', this);
  this.$body = (0, _ACore.$)('.am-check-tree-box-body', this);
  this.$list = (0, _ACore.$)('.am-check-tree-box-list', this);
  this.$chekAll = (0, _ACore.$)('.as-select-list-box-check-all', this).on('change', function () {
    this.modes.normal.select(this.$chekAll.checked);
    if (this.mode.updateSelectedFromRef) this.mode.updateSelectedFromRef();
    this.notifyChange();
  }.bind(this));
  this.$searchInput = (0, _ACore.$)(_Searcher["default"].tag, this).on('stoptyping', this.eventHandler.searchTextInputModify);
  this.$cancelBtn = (0, _ACore.$)('.as-select-list-box-cancel-btn', this).on('click', function () {
    this.emit('cancel', {
      type: 'cancel',
      target: this
    }, this);
  }.bind(this));
  this.$closeBtn = (0, _ACore.$)('.as-select-list-box-close-btn', this);
  this.$boxCloseBtn = (0, _ACore.$)('.am-dropdown-box-close-btn', this);
  this.on('click', function (event) {
    if (event.target === this || (0, _EventEmitter.hitElement)(this.$closeBtn, event) || (0, _EventEmitter.hitElement)(this.$boxCloseBtn, event)) {
      this.emit('close', {
        type: 'close',
        target: this
      }, this);
    }
  }.bind(this));
  this.pendingValues = null;
  this.modes = {
    normal: new this.classes.ModeNormal(this, [])
  };
  /***
   *
   * @type {CTBModeNormal | CTBModeSearch}
   */
  this.mode = this.modes.normal;
  this.itemListCtrl = new this.classes.ListController(this);
}
MCheckTreeBox.prototype.classes = {
  ListController: MCTBItemListController,
  ModeSearch: _CTBModes.CTBModeSearch,
  ModeNormal: _CTBModes.CTBModeNormal,
  ItemHolder: MCTBItemHolder,
  ItemElement: MCheckTreeItem
};
MCheckTreeBox.tag = 'MCheckTreeBox'.toLowerCase();
MCheckTreeBox.render = function () {
  return (0, _ACore._)({
    extendEvent: ['change', 'close', 'cancel'],
    "class": ['am-modal', 'am-dropdown-box-modal'],
    child: {
      "class": ['am-check-tree-box', 'am-dropdown-box', 'as-dropdown-box-common-style'],
      child: [{
        "class": 'am-dropdown-box-header',
        child: [{
          tag: _Searcher["default"].tag
        }, {
          tag: 'button',
          "class": 'am-dropdown-box-close-btn',
          child: 'span.mdi.mdi-close'
        }]
      }, {
        "class": ['am-dropdown-box-body', 'am-check-tree-box-body'],
        child: {
          "class": 'am-check-tree-box-list'
        }
      }, {
        "class": 'as-dropdown-box-footer',
        child: [{
          tag: 'checkbox',
          "class": 'as-select-list-box-check-all',
          props: {
            checked: false,
            text: _LanguageSystem["default"].getText('txt_check_all') || _LanguageSystem["default"].getText('txt_all') || 'Check All'
          }
        }, {
          "class": 'as-dropdown-box-footer-right',
          child: [{
            tag: 'a',
            "class": 'as-select-list-box-cancel-btn',
            attr: {
              "data-ml-key": 'txt_cancel'
            }
          }, {
            tag: 'a',
            "class": 'as-select-list-box-close-btn',
            attr: {
              "data-ml-key": 'txt_close'
            }
          }]
        }]
      }]
    }
  });
};
MCheckTreeBox.prototype.getHolderByValue = function (value) {
  return this.modes.normal.getHolderByValue(value);
};
MCheckTreeBox.prototype.select = function (value, flag) {
  var holder = this.modes.normal.getHolderByValue(value);
  if (holder) {
    holder.select(flag);
    if (this.mode !== this.modes.normal) {
      this.mode.updateSelectedFromRef();
    }
    return true;
  }
  return false;
};
MCheckTreeBox.prototype.getItemByValue = function (value) {
  var holder = this.modes.normal.getHolderByValue(value);
  if (holder) return holder.data;
  return null;
};
MCheckTreeBox.prototype.focus = function () {
  if (this.enableSearch) {
    this.$searchInput.focus();
  }
};
MCheckTreeBox.prototype.resetSearchState = function () {
  this.$searchInput.value = '';
  this.eventHandler.searchTextInputModify();
};
MCheckTreeBox.prototype.notifyChange = function () {
  this.pendingValues = null;
  this.emit('change', {
    type: 'change',
    target: this
  }, this);
};

/***
 * @name eventHandler
 * @type {{}}
 * @memberOf MCheckTreeBox#
 */
MCheckTreeBox.eventHandler = {};
MCheckTreeBox.eventHandler.searchTextInputModify = function () {
  var query = this.$searchInput.value.trim().replace(/\s+/g, ' ');
  if (query.length > 0) {
    if (this.mode === this.modes.normal) {
      this.mode.onStop();
    }
    this.mode.search = this.itemListCtrl.makeSearch(query);
    this.mode = this.mode.search;
    this.mode.onStart();
  } else {
    if (this.mode !== this.modes.normal) {
      this.mode.onStop();
      this.mode = this.modes.normal;
      this.mode.onStart();
    }
  }
};
MCheckTreeBox.property = _CTBPropHandlers["default"];
var _default = MCheckTreeBox;
/*********************************** ADAPT OLD VERSION ***************************************************************/
exports["default"] = _default;
MCheckTreeBox.prototype.findItemHoldersByValue = function (value) {
  var holder = this.getHolderByValue(value);
  if (holder) {
    return [holder];
  } else {
    return [];
  }
};

/***
 *
 * @param {MCheckTreeBox} boxElt
 * @param {MCTBItemHolder|CTBModeNormal|CTBModeSearch}parent
 * @param data
 * @constructor
 */
function MCTBItemHolder(boxElt, parent, data) {
  var _this = this;
  this.ref = null;
  this.boxElt = boxElt;
  this.$list = this.boxElt.$list;
  this.data = data;
  this.parent = parent;
  this.level = parent ? parent.level + 1 : 0;
  this._elt = null;
  this.children = null;
  this.hasIcon = !!data.icon;
  this.hasDesc = !!data.desc;
  this.status = 'none';
  this.selected = 'none';
  this.hasLeaf = data.isLeaf;
  this.noSelect = data.noSelect;
  this.hasNoSelect = this.noSelect;
  if (data.items && data.items.map && data.items.length > 0) {
    this.children = data.items.map(function (it) {
      return new MCTBItemHolder(boxElt, _this, it);
    });
    this.hasIcon = this.hasIcon || this.children.some(function (child) {
      return child.hasIcon;
    });
    this.hasDesc = this.hasDesc || this.children.some(function (child) {
      return child.hasDesc;
    });
    this.hasLeaf = this.hasLeaf || this.children.some(function (child) {
      return child.hasLeaf;
    });
    this.hasNoSelect = this.hasNoSelect || this.children.some(function (child) {
      return child.hasNoSelect;
    });
    this.status = 'close';
  }
}
MCTBItemHolder.prototype.getViewElements = function (ac) {
  ac = ac || [];
  ac.push(this.elt);
  if (this.status === 'open' && this.children) {
    this.children.forEach(function (child) {
      return child.getViewElements(ac);
    });
  }
  return ac;
};
Object.defineProperty(MCTBItemHolder.prototype, 'elt', {
  get: function get() {
    if (!this._elt) {
      this._elt = (0, _ACore._)({
        tag: this.boxElt.classes.ItemElement,
        props: {
          data: this.data,
          level: this.level,
          status: this.status,
          selected: this.selected,
          hasLeaf: this.hasLeaf,
          noSelect: this.hasNoSelect
        },
        on: {
          checkedchange: this.ev_checkedChange.bind(this),
          statuschange: this.ev_statusChange.bind(this)
        }
      });
    }
    return this._elt;
  }
});
MCTBItemHolder.prototype.ev_checkedChange = function () {
  var selected = this._elt.selected;
  if (this.ref) {
    if (selected === 'all') {
      this.ref.select(true);
    } else {
      this.ref.select(false);
    }
    this.getRoot().updateSelectedFromRef();
  } else {
    if (selected === 'all') {
      this.select(true);
    } else {
      this.select(false);
    }
  }
  this.boxElt.notifyChange();
};
MCTBItemHolder.prototype.ev_statusChange = function () {
  if (this._elt.status === this.status) return;
  var viewElements;
  if (this.status === 'open') {
    viewElements = this.getViewElements();
    viewElements.shift();
    viewElements.forEach(function (elt) {
      elt.remove();
    });
    this.status = this._elt.status;
  } else if (this.status === 'close') {
    this.status = this._elt.status;
    viewElements = this.getViewElements();
    viewElements.shift();
    (0, _utils.addElementAfter)(this.$list, viewElements, this._elt);
  }
};
MCTBItemHolder.prototype.updateUp = function () {
  var selected = {
    child: 0,
    all: 0,
    none: 0 /*dont: 0*/
  };
  var childN = this.children.length;
  this.children.reduce(function (ac, child) {
    ac[child.selected]++;
    return ac;
  }, selected);
  if (childN === selected.all) {
    this.selected = 'all';
  } else if (childN === selected.none) {
    this.selected = "none";
  } else {
    this.selected = 'child';
  }
  if (this._elt) {
    this._elt.selected = this.selected;
  }
  if (this.parent) this.parent.updateUp();
};
MCTBItemHolder.prototype.select = function (flag, isDownUpdate) {
  var leafOnly = this.boxElt.leafOnly;
  if (flag && leafOnly && !this.hasLeaf) return;
  var selected = {
    child: 0,
    all: 0,
    none: 0,
    exclude: 0 /*dont: 0*/
  };
  var childN = 0;
  if (this.children && this.children.length > 0) {
    childN = this.children.length;
    this.children.reduce(function (ac, child) {
      child.select(flag, true);
      if (leafOnly && !child.hasLeaf) {
        ac.exclude++;
      } else {
        ac[child.selected]++;
      }
      return ac;
    }, selected);
    if (leafOnly) {
      if (this.hasLeaf) {
        if (childN === selected.all + selected.exclude) {
          this.selected = 'all';
        } else if (selected.all + selected.child > 0) {
          this.selected = 'child';
        } else {
          this.selected = 'none';
        }
      } else {
        this.selected = "none";
      }
    } else {
      if (childN === selected.all) {
        this.selected = 'all';
      } else if (childN === selected.none) {
        this.selected = "none";
      } else {
        this.selected = 'child';
      }
    }
  } else {
    if (flag && (!leafOnly || this.hasLeaf)) {
      this.selected = 'all';
    } else {
      this.selected = 'none';
    }
  }
  if (this._elt) {
    this._elt.selected = this.selected;
  }
  if (!isDownUpdate && this.parent) {
    this.parent.updateUp();
  }
};
MCTBItemHolder.prototype.getRoot = function () {
  var c = this;
  while (c.parent) {
    c = c.parent;
  }
  return c;
};

/*********************************** ADAPT OLD VERSION ***************************************************************/

Object.defineProperty(MCTBItemHolder.prototype, 'item', {
  get: function get() {
    return this.data;
  }
});

/***/ }),

/***/ 7787:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.CTLBModeNormal = CTLBModeNormal;
var _CTBModes = __webpack_require__(48819);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends CTBModeNormal
 * @param {MCheckTreeBox} elt
 * @param {[]} items
 * @constructor
 */
function CTLBModeNormal(elt, items) {
  _CTBModes.CTBModeNormal.apply(this, arguments);
}
_OOP["default"].mixClass(CTLBModeNormal, _CTBModes.CTBModeNormal);
CTLBModeNormal.prototype.getViewValues = function () {
  var values = [];
  this.children.forEach(function visit(node) {
    if (node.selected === 'all' && node.data.isLeaf) {
      values.push(node.data.value);
    } else if (node.children) {
      node.children.forEach(visit);
    }
  });
  return values;
};

/***/ }),

/***/ 32130:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CTBPropHandlers = _interopRequireDefault(__webpack_require__(17489));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var CTLBPropHandlers = Object.keys(_CTBPropHandlers["default"]).reduce(function (ac, key) {
  ac[key] = Object.assign({}, _CTBPropHandlers["default"][key]);
  return ac;
}, {});
CTLBPropHandlers.leafOnly = {
  enumerable: true,
  value: true
};
var _default = CTLBPropHandlers;
/***
 *
 * @type {boolean}
 * @name enableSearch
 * @memberOf MCheckTreeBox#
 */
exports["default"] = _default;

/***/ }),

/***/ 4636:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CTIPropHandlers = _interopRequireDefault(__webpack_require__(51972));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var CTLIPropHandlers = Object.keys(_CTIPropHandlers["default"]).reduce(function (ac, key) {
  ac[key] = Object.assign({}, _CTIPropHandlers["default"][key]);
  return ac;
}, {});
var _default = CTLIPropHandlers;
exports["default"] = _default;

/***/ }),

/***/ 4363:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _CTLIPropHandlers = _interopRequireDefault(__webpack_require__(4636));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _MCheckTreeBox = __webpack_require__(82822);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends AElement
 * @constructor
 */
function CheckTreeLeafItem() {
  this._data = null;
  this._status = 'none';
  this.$text = (0, _ACore.$)('.am-check-tree-item-text', this).firstChild;
  this.$desc = (0, _ACore.$)('.am-check-tree-item-desc', this).firstChild;
  this.$iconCtn = (0, _ACore.$)('.am-check-tree-item-icon-ctn', this);
  this.$checkbox = (0, _ACore.$)('checkboxinput', this).on('change', this.eventHandler.checkboxChange);
  this.addEventListener('click', this.eventHandler.click);
}
_OOP["default"].mixClass(CheckTreeLeafItem, _MCheckTreeBox.MCheckTreeItem);
CheckTreeLeafItem.tag = 'CheckTreeLeafItem'.toLowerCase();
CheckTreeLeafItem.render = function () {
  return (0, _ACore._)({
    extendEvent: ['checkedchange', 'click', 'statuschange'],
    "class": ['am-check-tree-leaf-item', 'am-check-tree-item', 'am-dropdown-box-item'],
    child: [{
      "class": 'am-check-tree-item-toggle-ctn',
      child: 'toggler-ico'
    }, {
      "class": 'am-check-tree-item-icon-ctn'
    }, {
      "class": 'am-check-tree-item-checkbox-ctn',
      child: 'checkboxinput'
    }, {
      "class": 'am-check-tree-item-text',
      child: {
        text: ''
      }
    }, {
      "class": 'am-check-tree-item-desc',
      child: {
        text: ''
      }
    }]
  });
};
CheckTreeLeafItem.eventHandler = Object.assign({}, _MCheckTreeBox.MCheckTreeItem.eventHandler);
CheckTreeLeafItem.property = _CTLIPropHandlers["default"];

/***
 * @name data
 * @memberOf CheckTreeLeafItem#
 */

/***.
 * @name text
 * @type {string}
 * @memberOf CheckTreeLeafItem#
 */

/***
 * @name desc
 * @type {string}
 * @memberOf CheckTreeLeafItem#
 */

/***
 * @name value
 * @memberOf CheckTreeLeafItem#
 */
var _default = CheckTreeLeafItem;
exports["default"] = _default;

/***/ }),

/***/ 88718:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _MCheckTreeBox = _interopRequireDefault(__webpack_require__(82822));
var _CTLBPropHandlers = _interopRequireDefault(__webpack_require__(32130));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _CheckTreeLeafItem = _interopRequireDefault(__webpack_require__(4363));
var _CTLBModes = __webpack_require__(7787);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends MCheckTreeBox
 * @constructor
 */
function MCheckTreeLeafBox() {
  _MCheckTreeBox["default"].apply(this, arguments);
  this.$box.addClass('as-check-tree-leaf-box');
}
_OOP["default"].mixClass(MCheckTreeLeafBox, _MCheckTreeBox["default"]);
MCheckTreeLeafBox.tag = 'MCheckTreeLeafBox'.toLowerCase();
MCheckTreeLeafBox.prototype.classes = Object.assign({}, _MCheckTreeBox["default"].prototype.classes, {
  ItemElement: _CheckTreeLeafItem["default"],
  ModeNormal: _CTLBModes.CTLBModeNormal
});
MCheckTreeLeafBox.render = function () {
  return _MCheckTreeBox["default"].render();
};
MCheckTreeLeafBox.property = _CTLBPropHandlers["default"];
MCheckTreeLeafBox.prototype.findItemByValue = function (value) {
  return this.itemListCtrl.getItemByValue(value);
};
MCheckTreeLeafBox.eventHandler = Object.assign({}, _MCheckTreeBox["default"].eventHandler);
_ACore["default"].install(MCheckTreeLeafBox);
var _default = MCheckTreeLeafBox;
exports["default"] = _default;

/***/ }),

/***/ 43501:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _CKPlaceholder = _interopRequireDefault(__webpack_require__(24471));
var _Array = __webpack_require__(40411);
var _plugins = __webpack_require__(69117);
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _file = __webpack_require__(54134);
var _stringGenerate = __webpack_require__(10713);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends CKPlaceholder
 * @constructor
 */
function CKInlineShortText() {
  _CKPlaceholder["default"].call(this);
  this.once('editorcreated', this.eventHandler.afterEditorCreated).on('paste', this.eventHandler.paste, true).once('editorready', this.eventHandler.afterEditorReady);
}
_OOP["default"].mixClass(CKInlineShortText, _CKPlaceholder["default"]);
CKInlineShortText.tag = 'CKInlineShortText'.toLowerCase();
CKInlineShortText.property = Object.assign({}, _CKPlaceholder["default"].property);
CKInlineShortText.eventHandler = Object.assign({}, _CKPlaceholder["default"].eventHandler);
CKInlineShortText.render = function () {
  return (0, _ACore._)({
    "class": 'as-ck-inline-short-text',
    extendEvent: ['editorcreated', 'editorready', 'change', 'command'],
    id: (0, _stringGenerate.randomIdent)(8),
    attr: {
      contenteditable: 'true'
    }
  });
};
CKInlineShortText.prototype.mode = 'inline';
CKInlineShortText.prototype._makeInitConfig = function () {
  var config = {
    toolbar: [{
      name: 'extension',
      items: (0, _Array.arrayRemoveNone)(this._extensions.map(function (eName) {
        if (_plugins.CKExtensionDict[eName] && _plugins.CKExtensionDict[eName].command) {
          return _plugins.CKExtensionDict[eName].command;
        }
      }))
    }],
    keystrokes: [[13 /* Enter */, 'blur'], [CKEDITOR.SHIFT + 13 /* Shift + Enter */, 'blur']]
  };
  return config;
};
CKInlineShortText.property.extensions = Object.assign({}, _CKPlaceholder["default"].property.extensions, {
  set: function set(value) {
    value = value || [];
    value.push('simple_text');
    value = (0, _Array.arrayUnique)(value);
    _CKPlaceholder["default"].property.extensions.set.call(this, value);
    this._config = this._makeInitConfig();
  }
});
CKInlineShortText.prototype._hookScroll = function () {
  this.$scrollers = [];
  var c = this.parentElement;
  while (c) {
    this.$scrollers.push(c);
    c = c.parentElement;
  }
  this.$scrollers.push(document);
  this.$scrollers.forEach(function (elt) {
    elt.addEventListener('scroll', this.eventHandler.scroll);
  }.bind(this));
};
CKInlineShortText.prototype._unhookScroll = function () {
  this.$scrollers.forEach(function (elt) {
    elt.removeEventListener('scroll', this.eventHandler.scroll);
  }.bind(this));
};
CKInlineShortText.eventHandler.afterEditorCreated = function () {
  this.editor.on('paste', function (evt) {
    evt.cancel();
  });
};
CKInlineShortText.eventHandler.afterEditorReady = function () {
  this.$toolbarElt = this.$toolbarElt || (0, _ACore.$)('#cke_' + this.attr('id'));
  this['removeToolbar'] = this.removeToolbar;
  this._hookScroll();
  setTimeout(this.eventHandler.tick, 5000);
};
CKInlineShortText.eventHandler.paste = function (event) {
  var self = this;
  var clipboardData = event.clipboardData || window.clipboardData;
  /**Safari bug */
  event.preventDefault();
  if (clipboardData) {
    if (clipboardData.items) {
      var items = Array.prototype.slice.call(clipboardData.items);
      var plainTextItems = items.filter(function (item) {
        return item.type.indexOf('text/plain') >= 0;
      });
      if (plainTextItems.length > 0) {
        var plainTextItem = plainTextItems[0]; //only one item
        plainTextItem.getAsString(function (text) {
          self.editor.insertHtml(self._implicit(text));
        });
      }
    } else {
      var text = event.clipboardData.getData('text/plain');
      if (text) {
        self.editor.insertHtml(self._implicit(text));
      }
    }
  }
};
CKInlineShortText.eventHandler.tick = function () {
  if (!this.isDescendantOf(document.body)) {
    this._unhookScroll();
    return;
  }
  setTimeout(this.eventHandler.tick, 5000);
};

/***
 * @this CKInlineShortText
 */
CKInlineShortText.eventHandler.scroll = function () {
  // If we don't have any active instance of CKEDITOR - return
  if (!CKEDITOR.currentInstance) {
    return;
  }
  if (CKEDITOR.currentInstance.element.$ !== this) return;
  // Save the elements we need to work with
  if (!this.isDescendantOf(document.body)) {
    this._unhookScroll();
    return;
  }
  this.$toolbarElt = this.$toolbarElt || (0, _ACore.$)('#cke_' + this.attr('id'));
  var toolbarElt = this.$toolbarElt;
  if (!toolbarElt) return;
  var bound = this.getBoundingClientRect();
  var toolBound = toolbarElt.getBoundingClientRect();
  var outbound = (0, _Dom.traceOutBoundingClientRect)(this);
  var left = Math.max(0, bound.left);
  var top = bound.top - toolBound.height;
  if (outbound.top > bound.bottom || outbound.bottom < bound.top) {
    top = -1000;
  } else if (bound.top < toolBound.height) {
    top = bound.bottom;
  }
  toolbarElt.addStyle({
    top: top + 'px',
    left: left + 'px'
  });
};
CKInlineShortText.property.removeToolbar = {
  set: function set(value) {
    this._removeToolbar = !!value;
    if (this.$toolbarElt) {
      if (this._removeToolbar) {
        this.$toolbarElt.addClass('as-hidden');
      } else {
        this.$toolbarElt.removeClass('as-hidden');
      }
    }
  },
  get: function get() {
    return this._removeToolbar;
  }
};
_ACore["default"].install(CKInlineShortText);
var _default = CKInlineShortText;
exports["default"] = _default;

/***/ }),

/***/ 24471:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(49538);
var _plugins = __webpack_require__(69117);
var _CKStickyToolbarController = _interopRequireDefault(__webpack_require__(88214));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
_Dom["default"].documentReady.then(function () {
  setTimeout(_plugins.ckInit, 100);
});

/***
 * @extends AElement
 * @constructor
 */
function CKPlaceholder() {
  var _this = this;
  (0, _plugins.ckInit)();
  this.$attachhook = (0, _ACore._)('attachhook').addTo(this);
  this.$attachhook.once('attached', this.eventHandler.attached);
  this._pendingData = '';
  this.isReady = false;
  this.editor = null;
  this._extensions = [];
  this._config = this._makeInitConfig();
  this.afterReady = new Promise(function (rs) {
    _this.on('editorready', rs);
  });
  this.stickyToolbarCtrl = null;
  /***
   * @type {{}}
   * @name config
   * @memberOf CKPlaceholder#
   */
  /***
   * @type {string[]}
   * @name extensions
   * @memberOf CKPlaceholder#
   */
  /***
   *
   * @type {boolean}
   */
  this.stickyToolbar = true;
}
CKPlaceholder.tag = 'CKPlaceholder'.toLowerCase();
CKPlaceholder.render = function () {
  return (0, _ACore._)({
    extendEvent: ['editorcreated', 'editorready', 'change', 'command', 'focus'],
    "class": 'as-ck-placeholder'
  });
};
CKPlaceholder.prototype.mode = 'replace';

/**
 *
 * @param {string}data
 * @private
 * @returns {string}
 */
CKPlaceholder.prototype._implicit = function (data) {
  if (typeof data !== "string") data = '';
  var self = this;
  return this._extensions.reverse().reduce(function (ac, cr) {
    var extension = _plugins.CKExtensionDict[cr];
    if (extension.implicit) {
      ac = extension.implicit(ac, self);
    }
    return ac;
  }, data);
};

/**
 *
 * @param {string}data
 * @private
 * @returns {string}
 */
CKPlaceholder.prototype._explicit = function (data) {
  var self = this;
  return this._extensions.reduce(function (ac, cr) {
    var extension = _plugins.CKExtensionDict[cr];
    if (extension && extension.explicit) {
      ac = extension.explicit(ac, self);
    }
    return ac;
  }, data);
};

/***
 * @returns {{}}
 * @protected
 */
CKPlaceholder.prototype._makeInitConfig = function () {
  return {};
};
CKPlaceholder.prototype.selectNext = function () {
  var editor = this.editor;
  if (!editor) return;
  var ranges = editor.getSelection().getRanges();
  // var startIndex = editor.element.getHtml().indexOf(findString);
  // if (startIndex != -1)  {
  //     ranges[0].setStart(element.getFirst(), startIndex);
  //     ranges[0].setEnd(element.getFirst(), startIndex + findString.length);
  //     sel.selectRanges([ranges[0]]);
  // }
};

/***
 * @memberOf CKPlaceholder#
 * @type {{}}
 */
CKPlaceholder.eventHandler = {};

/***
 * @this CKPlaceholder
 */
CKPlaceholder.eventHandler.attached = function () {
  this.$attachhook.remove();
  var config = this.config;
  var width = this.style.width;
  if (width.endsWith('px')) config.width = width;
  var height = this.style.height;
  if (height.endsWith('px')) config.height = height;
  config = (0, _plugins.ckMakeDefaultConfig)(this.config, this.extensions, this);
  this.editor = this.mode === 'replace' ? CKEDITOR.replace(this, config) : CKEDITOR.inline(this, config);
  this.editor.placeHolderElt = this;
  this.editor.on('instanceReady', this.eventHandler.instanceReady);
  this.editor.on('change', this.eventHandler.change);
  if (this.mode === 'replace') {
    this.editor.on('focus', function (event) {
      this.emit('focus', {
        target: this,
        type: 'focus',
        originalEvent: event
      });
    }.bind(this));
  }
  this._extensions.forEach(function (name) {
    var e = _plugins.CKExtensionDict[name];
    if (e && e.extendMethods) {
      Object.assign(this, e.extendMethods);
    }
  }.bind(this));
  this.emit('editorcreated', {
    type: 'editorcreated',
    target: this,
    editor: this.editor
  }, this);
};
CKPlaceholder.eventHandler.instanceReady = function () {
  var width = this.style.width;
  if (width.endsWith('px')) width = parseFloat(width.replace('px'));
  var height = this.style.height;
  if (height.endsWith('px')) height = parseFloat(height.replace('px'));
  if ((0, _utils.isRealNumber)(width) && (0, _utils.isRealNumber)(height)) {
    this.editor.resize(width, height);
  }
  this.isReady = true;
  if (this._pendingData && this._pendingData.length > 0) {
    this.editor.setData(this._implicit(this._pendingData));
    this._pendingData = null;
  }
  this.emit('editorready', {
    type: 'editorready',
    target: this,
    editor: this.editor
  }, this);
};
CKPlaceholder.eventHandler.change = function () {
  this.emit('change', {
    type: 'change',
    target: this,
    editor: this.editor
  }, this);
};
CKPlaceholder.property = {};
CKPlaceholder.property.data = {
  /***
   * @this CKPlaceholder
   * @param data
   */
  set: function set(data) {
    if (typeof data !== "string") data = '';
    if (this.isReady) {
      this.editor.setData(this._implicit(data));
    } else {
      this._pendingData = data;
    }
  },
  /***
   * @this CKPlaceholder
   * @returns {string}
   */
  get: function get() {
    if (this.isReady) return this._explicit(this.editor.getData());
    return this._pendingData;
  }
};
CKPlaceholder.property.rawData = {
  get: function get() {
    if (this.editor) this.editor.getData();else return this._implicit(this._pendingData);
  }
};
CKPlaceholder.property.config = {
  set: function set(value) {
    if (this.editor) {
      throw new Error("Can not set config after the CKEditor created");
    }
    this._config = Object.assign(this._makeInitConfig(), value);
  },
  get: function get() {
    return this._config;
  }
};
CKPlaceholder.property.extensions = {
  set: function set(value) {
    if (this.editor) {
      throw new Error("Can not set extensions after the CKEditor created");
    }
    value = value || [];
    if (typeof value === "string") value = [value];
    if (!(value instanceof Array)) value = [];
    this._extensions = value.filter(function (c) {
      return typeof c === "string" && c.length > 0 && _plugins.CKExtensionDict[c];
    });
    this._extensions = value;
  },
  get: function get() {
    return this._extensions;
  }
};
CKPlaceholder.property.stickyToolbar = {
  set: function set(value) {
    var _this2 = this;
    if (value) {
      this.addClass('as-has-sticky-toolbar');
    } else {
      return this.removeClass('as-has-sticky-toolbar');
    }
    this.afterReady.then(function () {
      if (_this2.mode !== 'replace') return;
      if (_this2.stickyToolbar) {
        if (!_this2.stickyToolbarCtrl) {
          _this2.stickyToolbarCtrl = new _CKStickyToolbarController["default"](_this2);
        }
        _this2.stickyToolbarCtrl.start();
      } else {
        _this2.editor.container.$.classList.remove('as-has-sticky-toolbar');
        if (_this2.stickyToolbarCtrl) _this2.stickyToolbarCtrl.stop();
      }
    });
  },
  get: function get() {
    return this.hasClass('as-has-sticky-toolbar');
  }
};
_ACore["default"].install(CKPlaceholder);
var _default = CKPlaceholder;
exports["default"] = _default;

/***/ }),

/***/ 88214:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _Dom = __webpack_require__(64821);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function CKStickyToolbarController(holderElt) {
  this.editor = holderElt.editor;
  this.$elt = this.editor.container.$;
  this.activated = false;
  this['onScroll'] = this.onScroll.bind(this);
  this.trackedScroller = [];
}
CKStickyToolbarController.prototype.start = function () {
  if (this.activated) return;
  var c = this.$elt.parentElement;
  while (c) {
    c.addEventListener('scroll', this.onScroll);
    c = c.parentElement;
  }
};
CKStickyToolbarController.prototype.stop = function () {
  if (!this.activated) return;
  while (this.trackedScroller.length > 0) {
    this.trackedScroller.pop().removeEventListener('scroll', this.onScroll);
  }
};
CKStickyToolbarController.prototype.onScroll = function (event) {
  if (!_AElement["default"].prototype.isDescendantOf.call(this.$elt, document.body)) {
    this.stop();
    return;
  }
  this.$toolbar = this.$toolbar || (0, _ACore.$)('.cke_top', this.$elt);
  if (!this.$toolbar) return;
  var oBound = (0, _Dom.traceOutBoundingClientRect)(this.$elt.parentElement);
  var bound = this.$elt.getBoundingClientRect();
  var tBound = this.$toolbar.getBoundingClientRect();
  if (bound.top < oBound.top && oBound.top + tBound.height + 30 < bound.bottom) {
    this.$toolbar.addStyle('transform', 'translate(0, ' + (oBound.top - bound.top) + 'px)');
  } else {
    this.$toolbar.removeStyle('transform');
  }
};
var _default = CKStickyToolbarController;
exports["default"] = _default;

/***/ }),

/***/ 95637:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var name = 'dynamic_link';
var command = 'insert_dynamic_link';
function init(editor) {
  editor.widgets.add(name, {
    button: 'Create Dynamic Link',
    template: '<a class="as-ck-widget-dynamic-link" data-link-id="1234" href="https://absol.cf">absol.cf</a>',
    allowedContent: 'a(!as-ck-widget-dynamic-link)',
    requiredContent: 'a(as-ck-widget-dynamic-link)',
    upcast: function upcast(element) {
      return element.name === 'a' && element.hasClass('as-ck-widget-dynamic-link');
    }
  });
  editor.ui.addButton(command, {
    label: 'Insert Dynamic Link',
    command: command
  });
  editor.addCommand(command, {
    exec: function exec(editor) {
      if (editor.placeHolderElt) {
        editor.placeHolderElt.emit('command', {
          command: command,
          target: editor,
          type: 'command'
        });
      }
    }
  });
}
var parserDiv = (0, _ACore._)('div');
function explicit(data, placeHolderElt) {
  parserDiv.innerHTML = data;
  (0, _ACore.$$)('.as-ck-widget-dynamic-link', parserDiv).forEach(function (elt) {});
  return parserDiv.innerHTML;
}
function implicit(data, placeHolderElt) {
  parserDiv.innerHTML = data;
  (0, _ACore.$$)('.as-ck-widget-dynamic-link', parserDiv).forEach(function (elt) {
    var id = elt.getAttribute('data-link-id');
    var info = placeHolderElt.dynamicLinks && placeHolderElt.dynamicLinks[id];
    if (info) {
      elt.setAttribute('href', info.href);
      elt.innerHTML = info.text || info.href;
    }
  });
  return parserDiv.innerHTML;
}
var _default = {
  name: name,
  command: command,
  implicit: implicit,
  explicit: explicit,
  plugin: {
    requires: 'widget',
    init: init
  },
  extendMethods: {
    /***
     * @this CKPlaceholder
     * @memberOf CKPlaceholder#
     * @param {string} id
     * @param {string=} href
     * @param {string=} text
     *
     */
    insertDynamicLink: function insertDynamicLink(id, href, text) {
      var info = this.dynamicLinks && this.dynamicLinks[id] || {
        href: '.',
        text: 'undefined'
      };
      if (!href) {
        href = info.href;
      }
      if (!text) {
        text = info.text;
      }
      this.editor.insertHtml('<a class="as-ck-widget-dynamic-link" data-link-id="' + id + '" href="' + href + '">' + text + '</a>');
    },
    getSelectedDynamicLink: function getSelectedDynamicLink() {
      var sel = this.editor.getSelection();
      if (!sel) return null;
      var elt = sel.getSelectedElement();
      if (!elt) return null;
      if (!elt.hasClass('cke_widget_wrapper_as-ck-widget-dynamic-link')) return null;
      return elt.$.firstChild && elt.$.firstChild.getAttribute('data-link-id') || null;
    }
  }
};
/***
 * @name dynamicLinks
 * @type {{}}
 * @memberOf CKPlaceholder#
 */
exports["default"] = _default;

/***/ }),

/***/ 23194:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _TemplateString = _interopRequireDefault(__webpack_require__(73021));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var name = 'expression';
var command = 'insert_expression';
function init(editor) {
  editor.widgets.add(name, {
    button: 'Create Expression',
    template: '<span class="as-ck-widget-expression">&#0123;&#0123; expression &#0125;&#0125;</span>',
    allowedContent: 'span(!as-ck-widget-expression)',
    requiredContent: 'span(as-ck-widget-expression)',
    upcast: function upcast(element) {
      return element.name === 'span' && element.hasClass('as-ck-widget-expression');
    }
  });
  editor.ui.addButton(command, {
    label: 'Insert expression',
    command: command
  });
  editor.addCommand(command, {
    exec: function exec(editor) {
      if (editor.placeHolderElt) {
        editor.placeHolderElt.emit('command', {
          command: command,
          target: editor,
          type: 'command'
        });
      }
    }
  });
}
var parserDiv = (0, _ACore._)('div');
function explicit(data, placeHolderElt) {
  parserDiv.innerHTML = data;
  (0, _ACore.$$)('.as-ck-widget-expression', parserDiv).forEach(function (elt) {
    var text = elt.innerHTML;
    text.replace(/&#0123;/g, '{').replace(/&#0125;/g, '}');
    elt.parentElement.replaceChild((0, _ACore._)({
      text: text
    }), elt);
  });
  return parserDiv.innerHTML;
}
function implicit(data, placeHolderElt) {
  var template = _TemplateString["default"].parse(data);
  return template.parts.slice().map(function (part) {
    if (part.type === 1) {
      return '<span class="as-ck-widget-expression">&#0123;&#0123; ' + part.data.trim() + ' &#0125;&#0125;</span>';
    } else return part.data;
  }).join('');
}
var _default = {
  name: name,
  command: command,
  implicit: implicit,
  explicit: explicit,
  plugin: {
    requires: 'widget',
    init: init
  },
  extendMethods: {
    /***
     * @this CKPlaceholder
     * @memberOf CKPlaceholder#
     * @param expression
     *
     */
    insertExpression: function insertExpression(expression) {
      this.editor.insertHtml('<span class="as-ck-widget-expression">&#0123;&#0123; ' + expression.trim() + ' &#0125;&#0125;</span>');
    },
    getSelectedExpression: function getSelectedExpression() {
      var sel = this.editor.getSelection();
      if (!sel) return null;
      var elt = sel.getSelectedElement();
      if (!elt) return null;
      if (!elt.hasClass('cke_widget_wrapper_as-ck-widget-expression')) return null;
      var exp = elt.getText();
      exp = exp.replace(/&#0123;|&#0125;|\{|\}/g, '').trim();
      return exp;
    }
  }
};
exports["default"] = _default;

/***/ }),

/***/ 69534:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var name = 'image_mgn';
var command = 'image_mgn_dialog';
function init(editor) {
  editor.ui.addButton(command, {
    label: 'Insert Image',
    command: command
  });
  editor.addCommand(command, {
    exec: function exec(editor) {
      if (window.contentModule && window.contentModule.chooseFile) {
        window.contentModule.chooseFile({
          type: "image_file"
        }).then(function (result) {
          if (result instanceof Array) result = result[0];
          if (result) {
            editor.insertHtml('<img alt="' + (result.title || result.name) + '" src="' + result.url + '"  style="max-width: 100%; border-width: 1px; border-style: solid;"/>');
          }
        }.bind(this));
      }
    }
  });
}
function explicit(data, placeHolderElt) {
  return data;
}
var tokenRgx = /("([^\\"]|(\\.))*")|([a-zA-Z_$A-Z]([a-zA-Z_$A-Z0-9]*))/g;
function implicit(data, placeHolderElt) {
  return data;
}
var _default = {
  name: name,
  command: command,
  // implicit: implicit,
  // explicit: explicit,
  plugin: {
    init: init
  }
};
/***
 * @name variables
 * @type {{}}
 * @memberOf CKPlaceholder#
 */
exports["default"] = _default;

/***/ }),

/***/ 92295:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _utils = __webpack_require__(84512);
var _MDIPicker = _interopRequireDefault(__webpack_require__(88525));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var name = 'mdi';
var command = 'mdi_dialog';
function init(editor) {
  editor.widgets.add(name, {
    button: 'Change MDI icon',
    template: '<span class="mdi"></span>',
    allowedContent: 'span(!as-ck-widget-mdi)',
    requiredContent: 'span(as-ck-widget-mdi)',
    upcast: function upcast(element) {
      return element.name === 'div' && element.hasClass('mdi');
    }
  });
  editor.ui.addButton(command, {
    label: 'Insert MDI',
    command: command
  });
  editor.addCommand(command, {
    exec: function exec(editor) {
      var btn = (0, _ACore.$)('.cke_button.cke_button__mdi_dialog', editor.container.$);
      if (!btn) return; //unknown error
      var zIndex = (0, _utils.findMaxZIndex)(btn) + 2e3;
      var picker = (0, _ACore._)({
        tag: _MDIPicker["default"],
        style: {
          zIndex: zIndex
        },
        attr: {
          tabindex: 1
        },
        on: {
          pick: function pick(event) {
            picker.followTarget = null;
            picker.selfRemove();
            editor.insertHtml("<span class=\"as-ck-widget-mdi mdi mdi-".concat(event.icon, "\">&nbsp;</span>"));
          }
        }
      }).addTo(document.body);
      picker.followTarget = btn;
      setTimeout(function () {
        picker.focus();
      }, 100);
      picker.on('blur', function () {
        setTimeout(function () {
          if (!document.activeElement || !_AElement["default"].prototype.isDescendantOf.call(document.activeElement, picker)) {
            picker.followTarget = null;
            picker.selfRemove();
          }
        }, 200);
      }, true);
    }
  });
}
var _default = {
  init: init,
  name: name,
  command: command,
  plugin: {
    init: init
  }
};
exports["default"] = _default;

/***/ }),

/***/ 80023:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var name = 'simple_text';
var parserDiv = (0, _ACore._)('div');
function explicit(data, placeHolderElt) {
  parserDiv.innerHTML = data.replace(/&nbsp;/g, ' ');
  return parserDiv.innerText;
}
function implicit(data, placeHolderElt) {
  return data
  //.replace(/</g, '&lt;').replace(/</g, '&gt;').replace(/"/g, '&quot;').replace(/&/g, '&amp;')
  .replace(/[\r\n]/g, '');
}
var _default = {
  name: name,
  implicit: implicit,
  explicit: explicit
};
exports["default"] = _default;

/***/ }),

/***/ 73888:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _TemplateString = _interopRequireDefault(__webpack_require__(73021));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var name = 'variable';
var command = 'insert_variable';
function init(editor) {
  editor.widgets.add(name, {
    button: 'Create Variable',
    template: '<span class="as-ck-widget-variable" title="variable">variable</span>',
    allowedContent: 'span(!as-ck-widget-variable)',
    requiredContent: 'span(as-ck-widget-variable)',
    upcast: function upcast(element) {
      return element.name === 'span' && element.hasClass('as-ck-widget-variable');
    }
  });
  editor.ui.addButton(command, {
    label: 'Insert Variable',
    command: command
  });
  editor.addCommand(command, {
    exec: function exec(editor) {
      if (editor.placeHolderElt) {
        editor.placeHolderElt.emit('command', {
          command: command,
          target: editor,
          type: 'command'
        });
      }
    }
  });
}
var parserDiv = (0, _ACore._)('div');
function explicit(data, placeHolderElt) {
  parserDiv.innerHTML = data;
  (0, _ACore.$$)('.as-ck-widget-variable', parserDiv).forEach(function (elt) {
    var text = elt.innerHTML;
    elt.parentElement.replaceChild((0, _ACore._)({
      text: text
    }), elt);
  });
  return parserDiv.innerHTML;
}
var tokenRgx = /("([^\\"]|(\\.))*")|([a-zA-Z_$A-Z]([a-zA-Z_$A-Z0-9]*))/g;
function implicit(data, placeHolderElt) {
  data = (data || '') + '';
  data = data.replace(tokenRgx, function (full, isString, u1, u2, isIdent) {
    if (isIdent && placeHolderElt.variables && placeHolderElt.variables[isIdent]) {
      return placeHolderElt.makeVariableHtml(isIdent);
    } else return full;
  });
  return data;
}
var _default = {
  name: name,
  command: command,
  implicit: implicit,
  explicit: explicit,
  plugin: {
    requires: 'widget',
    init: init
  },
  extendMethods: {
    makeVariableHtml: function makeVariableHtml(variable, text) {
      variable = variable.trim();
      if (this.variables && this.variables[variable]) {
        text = this.variables[variable].text;
      }
      text = text || variable;
      return '<span class="as-ck-widget-variable"  title="' + text + '">' + variable.trim() + '</span>';
    },
    /***
     * @this CKPlaceholder
     * @memberOf CKPlaceholder#
     * @param variable
     *
     */
    insertVariable: function insertVariable(variable, text) {
      this.editor.insertHtml(this.makeVariableHtml(variable, text));
    },
    getSelectedVariable: function getSelectedVariable() {
      var sel = this.editor.getSelection();
      if (!sel) return null;
      var elt = sel.getSelectedElement();
      if (!elt) return null;
      if (!elt.hasClass('cke_widget_wrapper_as-ck-widget-variable')) return null;
      var exp = elt.getText();
      exp = exp.trim();
      return exp;
    }
  }
};
/***
 * @name variables
 * @type {{}}
 * @memberOf CKPlaceholder#
 */
exports["default"] = _default;

/***/ }),

/***/ 88829:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _VideoUrlDialog = __webpack_require__(12772);
var _ACore = __webpack_require__(34093);
var _base = __webpack_require__(6954);
var name = 'video';
var command = 'insert_video';
function getInfoFromCKImage(elt) {
  var initInfo = null;
  if (elt.getAttribute('data-node-type') === 'video') {
    initInfo = JSON.parse((0, _base.base64DecodeUnicode)(elt.getAttribute('data-info')));
    initInfo.embedUrl = elt.getAttribute('data-embed-url');
    initInfo.image = elt.getAttribute('src');
    initInfo.image = elt.getAttribute('src');
  }
  return initInfo;
}
function init(editor) {
  editor.ui.addButton(command, {
    label: 'Insert Video',
    command: command
  });
  editor.on('doubleclick', function (event) {
    var info;
    if (event.data && event.data.element) {
      info = getInfoFromCKImage(event.data.element);
      if (info) {
        event.cancel();
        editor.execCommand(command);
      }
    }
  });
  editor.addCommand(command, {
    exec: function exec(editor) {
      var initInfo;
      var sel = editor.getSelection();
      var elt;
      if (sel) {
        elt = sel.getSelectedElement();
      }
      if (elt) {
        initInfo = getInfoFromCKImage(elt);
      }
      (0, _VideoUrlDialog.openVideUrlDialog)(initInfo).then(function (result) {
        var savedInfo = Object.assign({}, result);
        delete savedInfo.image;
        delete savedInfo.embedUrl;
        if (result) {
          var html = "<img src=\"".concat(result.image, "\" data-type=\"").concat(result.type, "\"                         onload=\"window.ckeditorVideoInit && window.ckeditorVideoInit(this)\"                         data-embed-url=\"").concat(result.embedUrl, "\"                         width=\"").concat(result.displayWidth, "px\"  height=\"").concat(result.displayHeight, "px\"                          data-node-type=\"video\"                           data-info=\"").concat((0, _base.base64EncodeUnicode)(JSON.stringify(savedInfo)), "\"\n                          \n                         >");
          editor.insertHtml(html);
        }
      });
    }
  });
}
window.ckeditorVideoInit = function (elt) {
  (0, _ACore.$)(elt);
  if (!elt.isDescendantOf(document.body)) return;
  var newElt;
  var type = elt.attr('data-type');
  if (type.startsWith('video/')) {
    newElt = (0, _ACore._)({
      tag: 'video',
      attr: {
        crossorigin: "anonymous",
        crossOrigin: "anonymous",
        preload: 'auto',
        src: elt.attr('data-embed-url'),
        width: elt.attr('width'),
        height: elt.attr('height'),
        controls: true
      }
    });
  } else {
    newElt = (0, _ACore._)({
      tag: 'iframe',
      attr: {
        src: elt.attr('data-embed-url'),
        width: elt.attr('width'),
        height: elt.attr('height')
      }
    });
  }
  elt.selfReplace(newElt);
};
var _default = {
  name: name,
  command: command,
  plugin: {
    init: init
  },
  extendMethods: {}
};
/***
 * @name variables
 * @type {{}}
 * @memberOf CKPlaceholder#
 */
exports["default"] = _default;

/***/ }),

/***/ 69117:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.CKStylesSetDefault = exports.CKExtensions = exports.CKExtensionDict = void 0;
exports.ckAddDefaultStyleSet = ckAddDefaultStyleSet;
exports.ckInit = ckInit;
exports.ckMakeDefaultConfig = ckMakeDefaultConfig;
var _ckcontentstyleCss = _interopRequireDefault(__webpack_require__(37828));
var _file = __webpack_require__(54134);
var _ACore = __webpack_require__(34093);
var _Array = __webpack_require__(40411);
var _ExpressionExtension = _interopRequireDefault(__webpack_require__(23194));
var _SimpleTextExtension = _interopRequireDefault(__webpack_require__(80023));
var _VariableExtension = _interopRequireDefault(__webpack_require__(73888));
var _DynamicLinkExtension = _interopRequireDefault(__webpack_require__(95637));
var _ImageFileExtension = _interopRequireDefault(__webpack_require__(69534));
var _VideoExtension = _interopRequireDefault(__webpack_require__(88829));
var _MDIExtension = _interopRequireDefault(__webpack_require__(92295));
var _DynamicCSS = _interopRequireDefault(__webpack_require__(30401));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var ckContentStyleUrl;
var ckPluginInitialized = false;
var CKExtensions = [_ExpressionExtension["default"], _SimpleTextExtension["default"], _VariableExtension["default"], _DynamicLinkExtension["default"], _ImageFileExtension["default"], _VideoExtension["default"], _MDIExtension["default"]];
exports.CKExtensions = CKExtensions;
var CKExtensionDict = CKExtensions.reduce(function (ac, cr) {
  ac[cr.name] = cr;
  return ac;
}, {});
exports.CKExtensionDict = CKExtensionDict;
var CKStylesSetDefault = [{
  name: 'Notice',
  element: 'p',
  attributes: {
    "class": 'as-ck-alert as-variant-notice'
  }
}, {
  name: 'Warning',
  element: 'p',
  attributes: {
    "class": 'as-ck-alert as-variant-warning'
  }
}, {
  name: 'Tip',
  element: 'p',
  attributes: {
    "class": 'as-ck-alert as-variant-info'
  }
}, {
  name: 'Success',
  element: 'p',
  attributes: {
    "class": 'as-ck-alert as-variant-success'
  }
}];
exports.CKStylesSetDefault = CKStylesSetDefault;
function ckInit() {
  if (!window.CKEDITOR) return;
  if (ckPluginInitialized) return;
  var styleCode = _ckcontentstyleCss["default"].replace(/\$basePath/g, CKEDITOR.basePath);
  ckContentStyleUrl = URL.createObjectURL((0, _file.stringToBlob)(styleCode, 'css'));
  ckPluginInitialized = true;
  document.head.appendChild((0, _ACore._)('<link rel="stylesheet" href="' + ckContentStyleUrl + '">'));
  if (!CKEDITOR.stylesSet.get('as_styles_set_default')) {
    CKEDITOR.stylesSet.add('as_styles_set_default', CKStylesSetDefault);
  }
  CKExtensions.forEach(function (e) {
    if (e.plugin) {
      CKEDITOR.plugins.add(e.name, e.plugin);
    }
  });
}
function ckMakeDefaultConfig(config, extensions, holderElt) {
  ckInit();
  var userImageFileDialog = !!(window.contentModule && window.contentModule.chooseFile);

  /*
  * if (!this.attributes.directUpload && window.contentModule && window.contentModule.chooseFile) {
      window.contentModule.chooseFile({ type: "image_file" }).then(function (result) {
          if (result) {
              this.attributes.value = result;
          }
      }.bind(this));
  }
  * */
  config = config || {};
  //disable special chars encode
  config.entities = false;
  config.stylesSet = ['as_styles_set_default'].concat((0, _Array.arrayUnique)((config.stylesSet || '').trim().split(/\s*,\s*/))).filter(function (c) {
    return !!c;
  }).join(',');
  if (extensions) extensions.push('video');
  if (extensions) extensions.push('mdi');
  if (extensions && extensions.indexOf(_VariableExtension["default"].name) >= 0) {
    config.title = false;
  }
  if (config.toolbar === 'SIMPLE') {
    config.toolbar = [{
      name: 'basicstyles',
      items: ['Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'NumberedList', 'BulletedList', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', userImageFileDialog ? 'image_mgn_dialog' : 'Image']
    },
    // { name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize'] },
    {
      name: "extensions",
      items: extensions.map(function (eName) {
        if (CKExtensionDict[eName] && CKExtensionDict[eName].command) {
          return CKExtensionDict[eName].command;
        }
      }).filter(function (u) {
        return !!u;
      })
    }, {
      name: 'tools',
      items: ['Maximize']
    }];
  } else if (config.toolbar === 'BASIC') {
    config.toolbar = [{
      name: 'basicstyles',
      items: ['Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'NumberedList', 'BulletedList', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', userImageFileDialog ? 'image_mgn_dialog' : 'Image']
    }, {
      name: 'styles',
      items: ['Format', 'Font', 'FontSize']
    }, {
      name: "paragraph",
      items: ['Paragraph']
    }, {
      name: "extensions",
      items: extensions.map(function (eName) {
        if (CKExtensionDict[eName] && CKExtensionDict[eName].command) {
          return CKExtensionDict[eName].command;
        }
      }).filter(function (u) {
        return !!u;
      })
    }, {
      name: 'tools',
      items: ['Maximize']
    }];
  } else if (!config.toolbar || config.toolbar === "ADVANCED") {
    config.toolbar = [{
      name: 'basicstyles',
      items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript']
    }, {
      name: 'colors',
      items: ['TextColor', 'BGColor']
    }, {
      name: "format",
      items: ['CopyFormatting', 'RemoveFormat']
    }, {
      name: 'paragraph',
      items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']
    }, {
      name: 'styles',
      items: ['Styles', 'Format', 'Font', 'FontSize']
    }, {
      name: 'links',
      items: ['Link', 'Unlink', 'Anchor']
    }, {
      name: 'insert',
      items: [userImageFileDialog ? 'image_mgn_dialog' : 'Image', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe']
    }, {
      name: 'tools',
      items: ['Maximize', 'ShowBlocks']
    }, {
      name: 'editing',
      items: ['Find', 'Replace']
    }, {
      name: "extensions",
      items: extensions.map(function (eName) {
        if (CKExtensionDict[eName] && CKExtensionDict[eName].command) {
          return CKExtensionDict[eName].command;
        }
      }).filter(function (u) {
        return !!u;
      })
    }, {
      name: 'document',
      items: ['Source']
    }];
    console.log(config.toolbar);
  }
  config.toolbar = config.toolbar.filter(function (i) {
    return i.items && i.items.length > 0;
  });
  config.toolbar = [config.toolbar.reduce(function (ac, cr) {
    // if (ac.items.length > 0)
    //     ac.items.push('-');
    var items = cr.items.filter(function (it) {
      return it !== '-';
    });
    ac.items.push.apply(ac.items, items);
    return ac;
  }, {
    name: 'nogroup',
    items: []
  })];
  if (!config.height) {
    config.height = '500px';
  }
  var contentsCss = [ckContentStyleUrl];
  if (typeof config.contentsCss === "string") {
    contentsCss.push(config.contentsCss);
  } else if (config.contentsCss instanceof Array) {
    contentsCss.push.apply(contentsCss, config.contentsCss);
  }
  var has = contentsCss.some(function (url) {
    return url.indexOf('materialdesignicons') >= 0;
  });
  if (!has) {
    contentsCss.push('https://absol.cf/vendor/materialdesignicons/materialdesignicons.css');
  }
  has = contentsCss.some(function (url) {
    return url.indexOf('family=Material+Icons') >= 0;
  });
  if (!has) {
    contentsCss.push('https://fonts.googleapis.com/icon?family=Material+Icons');
  }
  has = contentsCss.some(function (url) {
    return url.indexOf(CKEDITOR.basePath + 'contents.css') >= 0;
  });
  if (!has) {
    contentsCss.push(CKEDITOR.basePath + 'contents.css?time=' + Math.random());
  }
  config.contentsCss = contentsCss;
  var extraPlugins = ['image_mgn'];
  if (holderElt.stickyToolbar && !config.height) {
    extraPlugins.push('autogrow');
    config.autoGrow_minHeight = 400;
  }
  if (typeof config.extraPlugins === 'string') {
    extraPlugins.push.apply(extraPlugins, config.extraPlugins.trim().split(/\s*,\s*/));
  } else if (extraPlugins instanceof Array) {
    extraPlugins.push.apply(extraPlugins, config.extraPlugins);
  }
  extraPlugins = extraPlugins.filter(function (c) {
    return typeof c === 'string' && !!c;
  });
  CKExtensions.forEach(function (e) {
    if (extensions.indexOf(e.name) >= 0 && e.plugin) extraPlugins.push(e.name);
  });
  extraPlugins = (0, _Array.arrayUnique)(extraPlugins);
  config.extraPlugins = extraPlugins.join(',');
  config.allowedContent = true; //false: you must add button ui => bug

  Object.assign(config, {
    //style

    // htmlEncodeOutput: false,
    // entities: false,
    // basicEntities: false,
    // // config.cloudServices_uploadUrl: 'DDFFE2739B83A73DDF16AB641ECA2',
    // // config.cloudServices_tokenUrl: 'https://lab.daithangminh.vn/hr_system_settings/php/uploadMedia.php',
    // extraPlugins: 'LinkDB, Note',
    // filebrowserBrowseUrl: 'js/ckfinder/ckfinder.html',
    // filebrowserImageBrowseUrl: 'js/ckfinder/ckfinder.html?type=Images',
    // filebrowserFlashBrowseUrl: 'js/ckfinder/ckfinder.html?type=Flash',
    // filebrowserUploadUrl: 'js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
    // filebrowserImageUploadUrl: 'js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
    // filebrowserFlashUploadUrl: 'js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
  });
  return config;
}
function ckAddDefaultStyleSet(ckEditor) {}

/***/ }),

/***/ 66859:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(41693);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function ColorPicker() {
  var res = (0, _ACore._)(['<div class="absol-color-picker">', '    <div class="absol-color-picker-color">', '        <div class="absol-color-picker-sat">', '            <div class="absol-color-picker-val">', '                <div class="absol-color-dragger"></div>', '            </div>', '        </div>', '    </div>', '    <div class="absol-color-picker-hue-range">', '        <div class="absol-color-picker-hue">', '            <div class="absol-color-dragger"></div>', '        </div>', '    </div>', '    <div class="absol-color-picker-alpha-range">', '        <div class="absol-color-picker-alpha">', '            <div class="absol-color-dragger"></div>', '        </div>', '    </div>', '    <div class="absol-color-picker-input">', " <div class=\"absol-color-picker-text-container\">\n            <span class=\"f-mode\">hsba(</span>\n            <span class=\"absol-editabe-text num0\">0</span><span class=\"separator0\">deg, </span>\n            <span class=\"absol-editabe-text num1\">0</span><span class=\"separator1\">%, </span>\n            <span class=\"absol-editabe-text num2\">0</span><span class=\"separator2\">%, </span>\n            <span class=\"absol-editabe-text num3\">0</span><span>)</span>\n        </div>", '    </div>', '    <button class="absol-color-picker-mode">HSB</button>', '</div>'].join(''));
  res.$fMode = (0, _ACore.$)('.f-mode', res);
  res.$sep0 = (0, _ACore.$)('.separator0', res);
  res.$sep1 = (0, _ACore.$)('.separator1', res);
  res.$sep2 = (0, _ACore.$)('.separator2', res);
  res.$num0 = (0, _ACore._)('editabletext.num0');
  res.$num1 = (0, _ACore._)('editabletext.num1');
  res.$num2 = (0, _ACore._)('editabletext.num2');
  res.$num3 = (0, _ACore._)('editabletext.num3');
  ColorPicker.defaultNumberInputHandle(res.$num0);
  ColorPicker.defaultNumberInputHandle(res.$num1);
  ColorPicker.defaultNumberInputHandle(res.$num2);
  ColorPicker.defaultNumberInputHandle(res.$num3);
  res._num0LimitOption = ColorPicker.numberInputHandleLimit(res.$num0, 0, 360);
  res._num1LimitOption = ColorPicker.numberInputHandleLimit(res.$num1, 0, 100, 0);
  res._num2LimitOption = ColorPicker.numberInputHandleLimit(res.$num2, 0, 100, 0);
  res._num3LimitOption = ColorPicker.numberInputHandleLimit(res.$num3, 0, 1, 3);
  (0, _ACore.$)(".absol-editabe-text.num0", res).selfReplace(res.$num0);
  (0, _ACore.$)(".absol-editabe-text.num1", res).selfReplace(res.$num1);
  (0, _ACore.$)(".absol-editabe-text.num2", res).selfReplace(res.$num2);
  (0, _ACore.$)(".absol-editabe-text.num3", res).selfReplace(res.$num3);
  res.$num0.text = '0';
  res.$num1.text = '0';
  res.$num2.text = '0';
  res.$num3.text = '0';
  res.switchMode = {
    RGBA: 'HSBA',
    HSBA: 'HSLA',
    HSLA: 'RGBA',
    RGB: 'HSB',
    HSB: 'HSL',
    HSL: 'RGB'
  };
  res.toggleAlpha = {
    RGBA: 'RGB',
    HSBA: 'HSB',
    HSLA: 'HSL',
    RGB: 'RGBA',
    HSB: 'HSBA',
    HSL: 'HSLA'
  };
  res.defineEvent(['change']);
  res._saturation = 0;
  res._brightness = 0;
  res._hue = 0;
  res._alpha = 1;
  res.$color = (0, _ACore.$)('.absol-color-picker-color', res);
  res.$colorVal = (0, _ACore.$)('.absol-color-picker-val', res);
  res.$draggerVal = (0, _ACore.$)('.absol-color-dragger', res.$colorVal);
  res.eventHandler = _OOP["default"].bindFunctions(res, ColorPicker.eventHandler);
  res.$colorVal.on('pointerdown', res.eventHandler.colorPointerDown, true);
  res.$hue = (0, _ACore.$)('.absol-color-picker-hue', res);
  res.$draggerHue = (0, _ACore.$)('.absol-color-dragger', res.$hue);
  res.$hue.on('pointerdown', res.eventHandler.huePointerDown);
  res.$alpha = (0, _ACore.$)('.absol-color-picker-alpha', res);
  res.$alpha.on('pointerdown', res.eventHandler.alphaPointerDown);
  res.$draggerAlpha = (0, _ACore.$)('.absol-color-dragger', res.$alpha);
  res.$textContainer = (0, _ACore.$)('.absol-color-picker-text-container', res);
  res.$mode = (0, _ACore.$)('.absol-color-picker-mode', res);
  res.$mode.on('click', res.eventHandler.modeClick);
  //todo

  res.$num0.on('blur', res.eventHandler.inputBlur);
  res.$num1.on('blur', res.eventHandler.inputBlur);
  res.$num2.on('blur', res.eventHandler.inputBlur);
  res.$num3.on('blur', res.eventHandler.inputBlur);
  return res;
}
ColorPicker.defaultNumberInputHandle = function (element) {
  element.on('keydown', function (event) {
    if (!event.key.match(/^[0-9\.]$/) && event.key.length == 1) {
      event.preventDefault();
    }
    if (event.key == 'Tab') {
      event.preventDefault();
    }
    if (event.key == 'Enter') {
      this.edit(false);
    }
    if (event.key == '.' && this.text.indexOf('.') >= 0) {
      event.preventDefault();
    }
    if (this.text.length >= 6 && event.key.length == 1) event.preventDefault();
  }).on('click', function (event) {
    element.edit(true, true);
  }).on('keydown', function (event) {
    if (event.key == 'Tab') {
      var parent = element.parentNode;
      var firstFriend;
      var found = false;
      var nextFriend = (0, _ACore.$)('editabletext', parent, function (elt) {
        if (elt.getComputedStyleValue('display') == "none") return;
        if (!firstFriend) {
          firstFriend = elt;
        }
        if (elt == element) {
          found = true;
        } else if (found) {
          return true;
        }
      });
      nextFriend = nextFriend || firstFriend;
      if (nextFriend) {
        nextFriend.edit(true, true);
      }
    }
  });
};
ColorPicker.numberInputHandleLimit = function (element, min, max, fixed) {
  var option = {
    min: min,
    max: max,
    fixed: fixed || 0,
    enable: true
  };
  element.on('blur', function (event) {
    if (!option.enable) return;
    var number = parseFloat(element.text);
    if (isNaN(number)) {
      number = min;
    }
    if (option.fixed == 0) {
      number = Math.round(number);
    }
    number = Math.max(min, Math.min(option.max, number));
    element.text = number.toFixed(option.fixed) + '';
  });
  return option;
};
ColorPicker.property = {};
ColorPicker.property.withAlpha = {
  set: function set(value) {
    if (value) {
      this.addClass('with-alpha');
    } else {
      this.removeClass('with-alpha');
    }
  },
  get: function get() {
    return this.containClass('with-alpha');
  }
};
ColorPicker.property.saturation = {
  set: function set(value) {
    value = value || 0;
    value = Math.max(0, Math.min(1, value));
    this._saturation = value;
    this.$draggerVal.addStyle('left', value * 100 + '%');
    this._update();
  },
  get: function get() {
    return this._saturation;
  }
};
ColorPicker.property.brightness = {
  set: function set(value) {
    value = value || 0;
    value = Math.max(0, Math.min(1, value));
    this._brightness = value;
    this.$draggerVal.addStyle('bottom', value * 100 + '%');
    this._update();
  },
  get: function get() {
    return this._brightness;
  }
};
ColorPicker.property.mode = {
  set: function set(value) {
    value = (value + '').toUpperCase();
    if (value.indexOf('A') >= 0) {
      this.addClass('with-alpha');
    } else {
      this.removeClass('with-alpha');
      this.alpha = 1;
    }
    if (value.match(/^H/)) {
      this._num0LimitOption.max = 360;
      this._num1LimitOption.max = 100;
      this._num2LimitOption.max = 100;
    } else if (value.match(/^RGB/)) {
      this._num0LimitOption.max = 255;
      this._num1LimitOption.max = 255;
      this._num2LimitOption.max = 255;
    }
    if (value.match(/^(HSB|HSL|RGB|RGBA|HSBA|HSLA)$/)) {
      this.$mode.innerHTML = value;
      this._updateColorText();
    }
  },
  get: function get() {
    return this.$mode.innerHTML;
  }
};
ColorPicker.property.hue = {
  set: function set(value) {
    value = value || 0;
    value = Math.max(0, Math.min(1, value));
    this._hue = value;
    this.$draggerHue.addStyle('top', value * 100 + '%');
    this._update();
  },
  get: function get() {
    return this._hue;
  }
};
ColorPicker.property.alpha = {
  set: function set(value) {
    value = value || 0;
    value = Math.max(0, Math.min(1, value));
    this._alpha = value;
    this.$draggerAlpha.addStyle('top', (1 - value) * 100 + '%');
    this._update();
  },
  get: function get() {
    return this._alpha;
  }
};
ColorPicker.property.value = {
  set: function set(value) {
    if (typeof value == 'string') {
      value = _Color["default"].parse(value);
    }
    if (!value || !value.toHSBA) throw new Error('Invalid color type');
    var hsba = value.toHSBA();
    this.hue = hsba[0];
    this.saturation = hsba[1];
    this.brightness = hsba[2];
    this.alpha = hsba[3];
  },
  get: function get() {
    return _Color["default"].fromHSBA(this.hue, this.saturation, this.brightness, this.alpha);
  }
};
ColorPicker.property.RGBA = {
  set: function set(value) {
    var hsba = _Color["default"].rgbaToHSBA(value || [0, 0, 0, 0]);
    this.hue = hsba[0];
    this.saturation = hsba[1];
    this.brightness = hsba[2];
    this.alpha = hsba[3];
  },
  get: function get() {
    var rgba = _Color["default"].hsbaToRGBA([this.hue, this.saturation, this.brightness, this.alpha]);
    return rgba;
  }
};
ColorPicker.prototype._getSVOfEvent = function (event) {
  var valBound = this.$colorVal.getBoundingClientRect();
  var dx = event.clientX - valBound.left;
  var dy = event.clientY - valBound.top;
  var s = Math.max(0, Math.min(1, dx / valBound.width));
  var b = Math.max(0, Math.min(1, 1 - dy / valBound.height));
  return {
    s: s,
    b: b
  };
};
ColorPicker.prototype._getHOfEvent = function (event) {
  var hueBound = this.$hue.getBoundingClientRect();
  var h = event.clientY - hueBound.top;
  h = h / hueBound.height;
  h = Math.max(0, Math.min(1, h));
  return h;
};
ColorPicker.prototype._getAOfEvent = function (event) {
  var alphaBound = this.$alpha.getBoundingClientRect();
  var a = alphaBound.bottom - event.clientY;
  a = a / alphaBound.height;
  a = Math.max(0, Math.min(1, a));
  return a;
};
ColorPicker.prototype._getTextColorCode = function () {
  var h = this.hue + 0.5;
  if (h > 1) h -= 1;
  var s = this.saturation > 0.5 ? 0 : 1;
  var b = this.brightness > 0.5 ? 0 : 1;
  var rgba = _Color["default"].hsbaToRGBA([h, s, b, 1]);
  return 'rgba(' + rgba.map(function (x, i) {
    return i < 3 ? x * 255 : x;
  }).join(',') + ')';
};
ColorPicker.prototype.init = function (props) {
  this.RGBA = [1, 1, 1, 1];
  this["super"](props);
};
ColorPicker.prototype._update = function () {
  //update vs
  var rgba = _Color["default"].hsbaToRGBA([this.hue, 1, 1, 1]);
  this.$color.addStyle('background', 'rgba(' + rgba.map(function (x, i) {
    return i < 3 ? x * 255 : x;
  }).join(',') + ')');
  rgba = _Color["default"].hsbaToRGBA([this.hue, this.saturation, this.brightness, this.alpha]);
  this.$textContainer.addStyle('background', 'rgba(' + rgba.map(function (x, i) {
    return i < 3 ? x * 255 : x;
  }).join(',') + ')');
  this.$textContainer.addStyle('color', this._getTextColorCode());
  this._updateColorText();
};
ColorPicker.prototype._updateColorText = function () {
  var hsba = [this.hue, this.saturation, this.brightness, this.alpha];
  var mode = this.mode;
  this.$fMode.innerHTML = mode.toLocaleLowerCase() + '(';
  if (mode.match(/^H/)) {
    this.$sep0.innerHTML = 'deg, ';
    this.$sep1.innerHTML = '%, ';
    if (mode.match(/A$/)) {
      this.$sep2.innerHTML = "%, ";
      this.$num3.removeStyle('display');
    } else {
      this.$sep2.innerHTML = "%";
      this.$num3.addStyle('display', 'none');
    }
  } else {
    this.$sep0.innerHTML = ', ';
    this.$sep1.innerHTML = ', ';
    if (mode.match(/A$/)) {
      this.$sep2.innerHTML = ", ";
      this.$num3.removeStyle('display');
    } else {
      this.$num3.addStyle('display', 'none');
      this.$sep2.innerHTML = "";
    }
  }
  if (mode.match(/HSB/)) {
    this.$num0.text = '' + Math.round(hsba[0] * 360);
    this.$num1.text = '' + Math.round(hsba[1] * 100);
    this.$num2.text = '' + Math.round(hsba[2] * 100);
    this.$num3.text = hsba[3].toFixed(3);
  } else {
    var cBytes = _Color["default"]['hsbaTo' + (mode.match(/A$/) ? mode : mode + 'A')](hsba);
    if (mode.match(/^H/)) {
      this.$num0.text = '' + Math.round(cBytes[0] * 360);
      this.$num1.text = '' + Math.round(cBytes[1] * 100);
      this.$num2.text = '' + Math.round(cBytes[2] * 100);
      this.$num3.text = hsba[3].toFixed(3);
    } else {
      this.$num0.text = '' + Math.round(cBytes[0] * 255);
      this.$num1.text = '' + Math.round(cBytes[1] * 255);
      this.$num2.text = '' + Math.round(cBytes[2] * 255);
      this.$num3.text = hsba[3].toFixed(3);
    }
    // var tempMode = mode.indexOf('A') < 0 ? mode + 'A' : mode;
    // var tempColor = Color['hsbaTo' + tempMode](hsba);
    // this.$textContainer.value = Color[mode.toLocaleLowerCase() + 'ToText'](tempColor);
  }
};

ColorPicker.eventHandler = {};
ColorPicker.eventHandler.colorPointerDown = function (event) {
  var newSV = this._getSVOfEvent(event);
  this.saturation = newSV.s;
  this.brightness = newSV.b;
  absol.$(document.body).on('pointermove', this.eventHandler.colorPointerMove).on('pointerup', this.eventHandler.colorPointerFinish).on('pointerleave', this.eventHandler.colorPointerFinish);
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.colorPointerFinish = function (event) {
  absol.$(document.body).off('pointermove', this.eventHandler.colorPointerMove).off('pointerup', this.eventHandler.colorPointerFinish).off('pointerleave', this.eventHandler.colorPointerFinish);
};
ColorPicker.eventHandler.colorPointerMove = function (event) {
  var newSV = this._getSVOfEvent(event);
  this.saturation = newSV.s;
  this.brightness = newSV.b;
  event.preventDefault();
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.huePointerDown = function (event) {
  var newH = this._getHOfEvent(event);
  this.hue = newH;
  event.preventDefault();
  absol.$(document.body).on('pointermove', this.eventHandler.huePointerMove).on('pointerup', this.eventHandler.huePointerFinish).on('pointerleave', this.eventHandler.huePointerFinish);
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.huePointerFinish = function (event) {
  absol.$(document.body).off('pointermove', this.eventHandler.huePointerMove).off('pointerup', this.eventHandler.huePointerFinish).off('pointerleave', this.eventHandler.huePointerFinish);
  event.preventDefault();
};
ColorPicker.eventHandler.huePointerMove = function (event) {
  var newH = this._getHOfEvent(event);
  this.hue = newH;
  event.preventDefault();
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.alphaPointerDown = function (event) {
  var newA = this._getAOfEvent(event);
  this.alpha = newA;
  absol.$(document.body).on('pointermove', this.eventHandler.alphaPointerMove).on('pointerup', this.eventHandler.alphaPointerFinish).on('pointerleave', this.eventHandler.alphaPointerFinish);
  event.preventDefault();
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.alphaPointerFinish = function (event) {
  absol.$(document.body).off('pointermove', this.eventHandler.alphaPointerMove).off('pointerup', this.eventHandler.alphaPointerFinish).off('pointerleave', this.eventHandler.alphaPointerFinish);
  event.preventDefault();
};
ColorPicker.eventHandler.alphaPointerMove = function (event) {
  var newA = this._getAOfEvent(event);
  this.alpha = newA;
  event.preventDefault();
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.modeClick = function (event) {
  this.mode = this.switchMode[this.mode];
  event.preventDefault();
};
ColorPicker.eventHandler.inputBlur = function () {
  var mode = this.mode;
  var alpha = 1;
  if (mode.match(/A$/)) {
    alpha = parseFloat(this.$num3.text);
  }
  var bytes;
  if (mode.match(/^H/)) {
    bytes = [parseFloat(this.$num0.text) / 360, parseFloat(this.$num1.text) / 100, parseFloat(this.$num2.text) / 100, alpha];
  } else if (mode.match(/^RGB/)) {
    bytes = [parseFloat(this.$num0.text) / 255, parseFloat(this.$num1.text) / 255, parseFloat(this.$num2.text) / 255, alpha];
  }
  var hsba = mode.match(/^HSB/) ? bytes : _Color["default"][(mode.match(/A$/) ? mode.toLocaleLowerCase() : mode.toLocaleLowerCase() + 'a') + 'ToHSBA'](bytes);
  this.hue = hsba[0];
  this.saturation = hsba[1];
  this.brightness = hsba[2];
  this.alpha = hsba[3];
};
_ACore["default"].install('ColorPicker'.toLowerCase(), ColorPicker);
var _default = ColorPicker;
exports["default"] = _default;

/***/ }),

/***/ 21212:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(66859);
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _SolidColorPicker = _interopRequireDefault(__webpack_require__(28380));
var _SwatchesTable = __webpack_require__(83225);
var _DynamicCSS = _interopRequireDefault(__webpack_require__(30401));
var _base = __webpack_require__(6954);
var _red_cross = _interopRequireDefault(__webpack_require__(8161));
var _Color = _interopRequireDefault(__webpack_require__(64974));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var isMobile = _BrowserDetector["default"].isMobile;

/***
 * @extends AElement
 * @constructor
 */
function ColorPickerButton() {
  if (!ColorPickerButton.css) {
    ColorPickerButton.css = new _DynamicCSS["default"]().setProperty('.as-color-cell.as-color-picker-button-inner.as-null .as-color-cell-value', 'background-image', "url(\"data:image/svg+xml;base64,".concat((0, _base.base64EncodeUnicode)(_red_cross["default"].replace(/\$width/g, '33').replace(/\$height/g, '18')), "\")")).commit();
  }
  this.mode = 'OBJECT';
  this.$innerValue = (0, _ACore.$)('.as-color-picker-button-inner', this);
  this.prepare();
  this.on('click', this.eventHandler.click);
  /***
   * @name value
   * @type {string|Color}
   * @memberOf ColorPickerButton#
   */
  /***
   * @name hasOpacity
   * @type {boolean}
   * @memberOf ColorPickerButton#
   */

  /***
   * @name nullable
   * @type {boolean}
   * @memberOf ColorPickerButton#
   */

  /***
   * @name readOnly
   * @type {boolean}
   * @memberOf ColorPickerButton#
   */
}

ColorPickerButton.tag = 'ColorPickerButton'.toLowerCase();
ColorPickerButton.prototype.supportedModes = ['OBJECT', 'RGBA', 'RGB', 'HEX8', 'HEX6', 'HEX4', 'HEX3'];
ColorPickerButton.prototype.hasOpacityModes = ['OBJECT', 'RGBA', 'HEX8', 'HEX4'];
ColorPickerButton.eventHandler = {};
ColorPickerButton.eventHandler.click = function (event) {
  this.togglePicker();
};
ColorPickerButton.eventHandler.changeColor = function (event) {
  this._value = event.value;
  this.$innerValue.value = event.value;
  this.emit('change', event, this);
};
ColorPickerButton.eventHandler.clickBody = function (event) {
  if (_EventEmitter["default"].hitElement(this, event) || _EventEmitter["default"].hitElement(this.$ColorPicker, event)) return;
  this.closePicker();
};
ColorPickerButton.eventHandler.submit = function (event) {
  this.closePicker();
};
ColorPickerButton.prototype.togglePicker = function () {
  if (this.hasClass('as-color-picker-selecting')) {
    this.closePicker();
  } else {
    this.openPicker();
  }
};
ColorPickerButton.prototype.openPicker = function () {
  if (this.readOnly) return;
  if (this.hasClass('as-color-picker-selecting')) return;
  if (ColorPickerButton.lastOpen) {
    ColorPickerButton.lastOpen.closePicker();
  }
  ColorPickerButton.lastOpen = this;
  var thisBt = this;
  this.addClass('as-color-picker-selecting');
  this.$ColorPicker.on('change', this.eventHandler.changeColor).on('submit', this.eventHandler.submit);
  this.$ColorPicker.reloadSetting();
  this.$follower.addStyle('visibility', 'hidden');
  this.$follower.addTo(document.body);
  if (ColorPickerButton.$ColorPicker.$attachhook) {
    //prevent stuck setTimeOut
    ColorPickerButton.$ColorPicker.$attachhook.emit('attached');
  }
  this.$follower.followTarget = this;
  this.$follower.sponsorElement = this;
  setTimeout(function () {
    document.addEventListener('click', this.eventHandler.clickBody);
  }.bind(this), 100);
  this._lastValue = this.value;
  this.$ColorPicker.nullable = this.nullable;
  this.$ColorPicker.hasOpacity = this.hasOpacity;
  ColorPickerButton.$ColorPicker.value = this.value;
  setTimeout(function () {
    thisBt.$follower.removeStyle('visibility');
  }, 1);
  //10p
};

ColorPickerButton.prototype.closePicker = function () {
  if (!this.hasClass('as-color-picker-selecting')) return;
  this.removeClass('as-color-picker-selecting');
  if (ColorPickerButton.lastOpen === this) {
    ColorPickerButton.lastOpen = null;
    this.$follower.selfRemove();
  }
  this.$ColorPicker.off('change', this.eventHandler.changeColor).off('submit', this.eventHandler.submit);
  document.removeEventListener('click', this.eventHandler.clickBody);
  if (this.value !== this._lastValue) {
    this.emit('stopchange', {
      target: this,
      value: this.value
    }, this);
  }
};
ColorPickerButton.prototype.prepare = function () {
  if (!ColorPickerButton.$ColorPicker) {
    if (isMobile) {
      ColorPickerButton.$follower = (0, _ACore._)('modal').on('click', function (event) {
        if (event.tagert === this) {
          if (ColorPickerButton.lastOpen) ColorPickerButton.lastOpen.closePicker();
        }
      });
    } else {
      ColorPickerButton.$follower = (0, _ACore._)('follower.as-color-picker-button-follower');
      ColorPickerButton.$follower.cancelWaiting();
    }
    ColorPickerButton.$ColorPicker = (0, _ACore._)({
      tag: 'solidcolorpicker'
    }).addTo(ColorPickerButton.$follower);
    if (ColorPickerButton.$ColorPicker.$attachhook) {
      //prevent stuck setTimeOut
      ColorPickerButton.$ColorPicker.$attachhook.cancelWaiting();
    }
    ColorPickerButton.lastOpen = null;
  }
  this.$follower = ColorPickerButton.$follower;
  this.$ColorPicker = ColorPickerButton.$ColorPicker;
};
ColorPickerButton.render = function () {
  return (0, _ACore._)({
    tag: 'button',
    extendEvent: ['change', 'stopchange'],
    "class": 'as-color-picker-button',
    child: [{
      tag: _SwatchesTable.ColorCell,
      "class": "as-color-picker-button-inner"
    }]
  });
};
ColorPickerButton.property = {};
ColorPickerButton.property.value = {
  set: function set(value) {
    this._value = value;
    this.$innerValue.value = value || null;
  },
  get: function get() {
    var nullable = this.nullable;
    var value = this._value;
    if (!this._value && nullable) return value; //null, ""
    if (!this._value && !nullable) {
      value = new _Color["default"]([0, 0, 0, 1]);
    }
    if (this.mode.match(/HEX4|HEX6|HEX8|RGB|RGBA/) && value && value.toHex3) {
      value = this._value.toString(this.mode);
    }
    return value;
  }
};
ColorPickerButton.property.mode = {
  set: function set(value) {
    value = value || 'OBJECT';
    value = value.toUpperCase();
    if (this.supportedModes.indexOf(value) < 0) value = 'OBJECT';
    this.attr('data-mode', value);
    this._mode = value;
  },
  get: function get() {
    return this._mode;
  }
};
ColorPickerButton.property.hasOpacity = {
  get: function get() {
    return this.hasOpacityModes.indexOf(this._mode) >= 0;
  }
};
ColorPickerButton.property.nullable = {
  set: function set(value) {
    if (value) {
      this.addClass('as-nullable');
    } else {
      this.removeClass('as-null-nullable');
    }
  },
  get: function get() {
    return this.hasClass('as-nullable');
  }
};
ColorPickerButton.property.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-readonly');
    } else {
      this.removeClass('as-readonly');
    }
  },
  get: function get() {
    return this.hasClass('as-readonly');
  }
};
_ACore["default"].install(ColorPickerButton);
var _default = ColorPickerButton;
exports["default"] = _default;

/***/ }),

/***/ 14560:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(285);
var _ACore = __webpack_require__(34093);
var _Icons = __webpack_require__(39285);
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _EventEmitter = __webpack_require__(46833);
var _utils = __webpack_require__(84512);
var _SolidColorPicker = _interopRequireDefault(__webpack_require__(28380));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends AElement
 * @constructor
 */
function FontColorButton() {
  var _this = this;
  this.$value = (0, _ACore.$)('.as-font-color-button-value', this);
  this.$primary = (0, _ACore.$)('.as-ribbon-split-button-primary', this).on('click', function () {
    _this.emit('submit', {
      type: 'submit',
      target: _this
    }, _this);
  });
  this.$extend = (0, _ACore.$)('.as-ribbon-split-button-extend', this);
  new FCBPickerController(this);

  /**
   * @type {string}
   * @name value
   * @memberof FontColorButton#
   */
}

FontColorButton.tag = 'FontColorButton'.toLowerCase();
FontColorButton.render = function () {
  return (0, _ACore._)({
    extendEvent: ['submit', 'change'],
    attr: {
      'tabindex': '0'
    },
    "class": ['as-ribbon-split-button'],
    child: {
      "class": 'as-ribbon-split-button-content',
      child: [{
        tag: 'button',
        attr: {
          'tabindex': '-1'
        },
        "class": 'as-ribbon-split-button-primary',
        child: {
          tag: _Icons.FontColorIcon,
          "class": 'as-font-color-button-value',
          style: {
            width: '18px',
            height: '18px'
          }
        }
      }, {
        tag: 'button',
        attr: {
          'tabindex': '-1'
        },
        "class": 'as-ribbon-split-button-extend',
        child: ['span.as-ribbon-split-button-text', 'span.mdi.mdi-chevron-down']
      }]
    }
  });
};
FontColorButton.property = {};
FontColorButton.property.value = {
  set: function set(value) {
    this.$value.value = value;
  },
  get: function get() {
    return this.$value.value;
  }
};
var _default = FontColorButton;
/**
 *
 * @param {FontColorButton} elt
 * @constructor
 */
exports["default"] = _default;
function FCBPickerController(elt) {
  this.elt = elt;
  this['ev_clickExtend'] = this['ev_clickExtend'].bind(this);
  this['ev_clickOut'] = this['ev_clickOut'].bind(this);
  this['ev_submit'] = this['ev_submit'].bind(this);
  this['ev_change'] = this['ev_change'].bind(this);
  this.elt.$extend.on('click', this.ev_clickExtend);
}
FCBPickerController.prototype.ev_clickExtend = function () {
  this.openPicker();
};
FCBPickerController.prototype.ev_clickOut = function (event) {
  if ((0, _EventEmitter.hitElement)(this.share.$picker, event)) return;
  this.closePicker();
};
FCBPickerController.prototype.ev_submit = function () {
  var prevValue = this.elt.value;
  this.elt.value = this.share.$picker.value;
  this.closePicker();
  if (prevValue !== this.elt.value) {
    this.elt.emit('change', {
      type: 'change',
      target: this.elt
    }, this.elt);
  }
  this.elt.emit('submit', {
    type: 'submit',
    target: this.elt
  }, this.elt);
};
FCBPickerController.prototype.ev_change = function () {
  var prevValue = this.elt.value;
  this.elt.value = this.share.$picker.value;
  if (prevValue !== this.elt.value) {
    this.elt.emit('change', {
      type: 'change',
      target: this.elt
    }, this.elt);
  }
};
FCBPickerController.prototype.share = {
  $picker: null,
  $follower: null,
  holder: null
};
FCBPickerController.prototype.prepare = function () {
  if (this.share.$follower) return;
  this.share.$picker = (0, _ACore._)({
    tag: _SolidColorPicker["default"],
    props: {
      hasOpacity: false
    }
  });
  this.share.$follower = (0, _ACore._)({
    tag: _Follower["default"],
    child: this.share.$picker,
    props: {
      anchor: [2, 1, 6, 5, 9, 11]
    }
  });
};
FCBPickerController.prototype.openPicker = function () {
  var _this2 = this;
  this.prepare();
  if (this.share.holder) this.share.holder.closePicker();
  this.share.holder = this;
  this.share.$follower.addStyle('visibility', 'hidden');
  this.share.$follower.addTo(document.body);
  this.share.$follower.followTarget = this.elt.$extend;
  this.share.$follower.sponsorElement = this.elt.$extend;
  this.share.$follower.addStyle('z-index', (0, _utils.findMaxZIndex)(this.elt.$extend) + 70);
  this.share.$follower.removeStyle('visibility');
  this.elt.$extend.off('click', this.ev_clickExtend);
  this.share.$picker.on('submit', this.ev_submit);
  this.share.$picker.on('change', this.ev_change);
  this.share.$picker.value = this.elt.value;
  setTimeout(function () {
    document.addEventListener('click', _this2.ev_clickOut);
  }, 5);
};
FCBPickerController.prototype.closePicker = function () {
  var _this3 = this;
  if (this.share.holder !== this) return;
  this.share.holder = null;
  document.removeEventListener('click', this.ev_clickOut);
  this.share.$picker.off('submit', this.ev_submit);
  this.share.$picker.off('change', this.ev_change);
  setTimeout(function () {
    _this3.elt.$extend.on('click', _this3.ev_clickExtend);
  }, 5);
  this.share.$follower.followTarget = null;
  this.share.$follower.remove();
};

/***/ }),

/***/ 78061:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.generatorColorScheme = exports["default"] = exports.DEFAULT_CHART_COLOR_SCHEMES = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _ACore = __webpack_require__(34093);
var _utils = __webpack_require__(84512);
var _EventEmitter = __webpack_require__(46833);
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _int = __webpack_require__(65909);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var DEFAULT_CHART_COLOR_SCHEMES = [['#f0f0f0', '#d9d9d9', '#bdbdbd', '#969696', '#737373', '#525252'],
//gray scale
['#a50026', '#f46d43', '#fee08b', '#d9ef8b', '#66bd63', '#006837'], ['#7fc97f', '#beaed4', '#fdc086', '#ffff99', '#386cb0', '#f0027f'], ['#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02'], ['#a6cee3', '#b2df8a', '#fb9a99', '#fdbf6f', '#cab2d6', '#ffff99'], ['#b3e2cd', '#fdcdac', '#cbd5e8', '#f4cae4', '#e6f5c9', '#fff2ae'], ['#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00', '#ffff33'], ['#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f'], ['#fff7bc', '#fee391', '#fec44f', '#fe9929', '#ec7014', '#cc4c02'], ['#efedf5', '#dadaeb', '#bcbddc', '#9e9ac8', '#807dba', '#6a51a3'], ['#deebf7', '#c6dbef', '#9ecae1', '#6baed6', '#4292c6', '#2171b5'], ['#e5f5e0', '#c7e9c0', '#a1d99b', '#74c476', '#41ab5d', '#238b45'], ['#7f3b08', '#e08214', '#fee0b6', '#d8daeb', '#8073ac', '#2d004b'], ['#543005', '#bf812d', '#f6e8c3', '#c7eae5', '#35978f', '#003c30'], ['#40004b', '#9970ab', '#e7d4e8', '#d9f0d3', '#5aae61', '#00441b'], ['#f7fcb9', '#d9f0a3', '#addd8e', '#78c679', '#41ab5d', '#238443'], ['#e5f5f9', '#ccece6', '#99d8c9', '#66c2a4', '#41ae76', '#238b45'], ['#ece7f2', '#d0d1e6', '#a6bddb', '#74a9cf', '#3690c0', '#0570b0'], ['#fde0dd', '#fcc5c0', '#fa9fb5', '#f768a1', '#dd3497', '#ae017e'], ['#ffffcc', '#ffeda0', '#fed976', '#feb24c', '#fd8d3c', '#fc4e2a']];
exports.DEFAULT_CHART_COLOR_SCHEMES = DEFAULT_CHART_COLOR_SCHEMES;
var DEFAULT_CHART_COLOR_SCHEMES_OBJS = DEFAULT_CHART_COLOR_SCHEMES.map(function (scm) {
  return scm.map(function (c) {
    return _Color["default"].parse(c);
  });
});
_Color["default"].DEFAULT_CHART_COLOR_SCHEMES = DEFAULT_CHART_COLOR_SCHEMES;
var ColorSchemeGenerators = {};
var scaleArray = function scaleArray(arr, newN) {
  return Array(newN).fill(0).map(function (u, i) {
    var k = i * (arr.length - 1) / (newN - 1);
    var l = Math.floor(k);
    var h = Math.ceil(k);
    if (l === h) return arr[l];
    return (0, _int.map)(k, l, h, arr[l], arr[h]);
  });
};
var generatorColorScheme = function generatorColorScheme(id, n) {
  var hsl6 = DEFAULT_CHART_COLOR_SCHEMES_OBJS[id].map(function (c) {
    return c.toHSLA();
  });
  var h6 = hsl6.map(function (c) {
    return c[0];
  });
  var s6 = hsl6.map(function (c) {
    return c[1];
  });
  var l, h, s;
  if (id >= 1 && id <= 7 || id === 12 || id === 13) {
    if (n > 6) {
      s = s6.concat(Array(n - 6).fill(0).map(function (u, i) {
        return 0.6 + 3 * i * 0.3 % 0.35;
      }));
    }
  }
  if (id === 1) {
    h6[0] -= 1;
  } else if (id === 2) {
    if (n > 6) {
      s = s6.concat(Array(n - 6).fill(0).map(function (u, i) {
        return 0.5 + 3 * i * 0.3 % 0.45;
      }));
    }
  } else if (id === 18 && n !== 6) {
    h6[0] = 1;
    h6[1] = 1;
  }
  s = s || scaleArray(s6, n);
  l = l || scaleArray(hsl6.map(function (c) {
    return c[2];
  }), n);
  h = h || scaleArray(h6, n).map(function (h) {
    return h < 0 ? h + 1 : h;
  });
  return Array(n).fill(0).map(function (u, i) {
    return _Color["default"].fromHSL(h[i], s[i], l[i]);
  });
};

// DEFAULT_CHART_COLOR_SCHEMES = Array(20).fill(0).map((u, id) => colorSchemeGenerator(id, 20).map(c => c.toString('hex6')))
// console.log(DEFAULT_CHART_COLOR_SCHEMES)

/**
 * @extends AElement
 * @constructor
 */
exports.generatorColorScheme = generatorColorScheme;
function SelectColorSchemeMenu() {
  this.dropdown = new SCSMDropdown(this);
  this.comboboxCtrl = new SCSMComboBoxController(this);
  _OOP["default"].drillProperty(this, this.dropdown, ['value', 'items', 'selectedItem']);
  this.dropdown.items = DEFAULT_CHART_COLOR_SCHEMES.map(function (it, i) {
    return {
      colors: it,
      value: i
    };
  });
}
SelectColorSchemeMenu.tag = 'SelectColorSchemeMenu'.toLowerCase();
SelectColorSchemeMenu.render = function () {
  return (0, _ACore._)({
    "class": ['as-select-color-scheme-menu', 'absol-selectmenu'],
    extendEvent: ['change'],
    child: ['.as-select-color-scheme-menu-selected-item', {
      tag: 'button',
      "class": 'absol-selectmenu-btn',
      child: ['dropdown-ico']
    }]
  });
};
var _default = SelectColorSchemeMenu;
/**
 *
 * @param {SelectColorSchemeMenu} elt
 * @constructor
 */
exports["default"] = _default;
function SCSMDropdown(elt) {
  this.elt = elt;
  this._items = [];
  this.itemDict = {};
  this.$itemDict = {};
  this.$follower = (0, _ACore._)({
    tag: _Follower["default"],
    "class": ['as-select-color-scheme-menu-dropdown', 'as-dropdown-box-common-style'],
    child: {}
  });
  this.$follower.cancelWaiting();
}
SCSMDropdown.prototype.updateItems = function () {
  var _this = this;
  var items = this._items;
  var maxColorLength = items.reduce(function (ac, cr) {
    return Math.max(ac, cr.colors.length);
  }, 0);
  var itRow = Math.max(1, Math.floor(Math.sqrt(maxColorLength)));
  while (itRow > 1 && maxColorLength % itRow) {
    itRow--;
  }
  var itCol = maxColorLength / itRow;
  var gridRow = Math.max(1, Math.ceil(Math.sqrt(items.length)));
  while (gridRow < items.length && items.length % gridRow) {
    gridRow++;
  }
  var gridCol = Math.ceil(items.length / gridRow);
  this.$follower.clearChild();
  this.$selected = null;
  this.$itemDict = {};
  items.forEach(function (item, i) {
    if (i % gridCol === 0) {
      _this.$follower.addChild((0, _ACore._)('.as-scsm-item-list-row'));
    }
    var itemElt = (0, _ACore._)({
      "class": ['as-scsm-item']
    });
    var wrapper = (0, _ACore._)({
      "class": 'as-scsm-item-wrapper',
      child: itemElt,
      on: {
        click: function click(event) {
          var cValue = _this.value;
          if (cValue !== item.value) {
            _this.value = item.value;
            _this.elt.emit('change', {
              type: 'change',
              target: _this.elt
            }, _this.elt);
          }
        }
      }
    });
    _this.$itemDict[(0, _utils.keyStringOf)(item.value)] = itemElt;
    _this.$follower.lastChild.addChild(wrapper);
    item.colors.forEach(function (color, j) {
      if (j % itCol === 0) {
        itemElt.addChild((0, _ACore._)('.as-scsm-item-row'));
      }
      itemElt.lastChild.addChild((0, _ACore._)({
        "class": 'as-scsm-item-cell',
        style: {
          backgroundColor: color
        }
      }));
    });
  });
};
SCSMDropdown.prototype.updateSelected = function () {
  var value = this.value;
  if (this.$selected) this.$selected.removeClass('as-selected');
  this.$selected = this.$itemDict[(0, _utils.keyStringOf)(value)];
  if (this.$selected) this.$selected.addClass('as-selected');
  this.elt.comboboxCtrl.update();
};
Object.defineProperty(SCSMDropdown.prototype, 'items', {
  set: function set(items) {
    if (!(items instanceof Array)) items = [];
    this._items = items;
    this.itemDict = items.reduce(function (ac, cr) {
      ac[(0, _utils.keyStringOf)(cr.value)] = cr;
      return ac;
    }, {});
    this.updateItems();
    this.updateSelected();
  },
  get: function get() {
    return this._items;
  }
});
Object.defineProperty(SCSMDropdown.prototype, 'value', {
  set: function set(value) {
    this._value = value;
    this.updateSelected();
  },
  get: function get() {
    if (this.itemDict[(0, _utils.keyStringOf)(this._value)] || this._items.length === 0) return this._value;
    return this._items[0].value;
  }
});
Object.defineProperty(SCSMDropdown.prototype, 'selectedItem', {
  get: function get() {
    return this.itemDict[(0, _utils.keyStringOf)(this.value)];
  }
});

/**
 *
 * @param {SelectColorSchemeMenu} elt
 * @constructor
 */
function SCSMComboBoxController(elt) {
  this.elt = elt;
  this.$selected = (0, _ACore.$)('.as-select-color-scheme-menu-selected-item', this.elt);
  this.ev_click = this.ev_click.bind(this);
  this.ev_clickOut = this.ev_clickOut.bind(this);
  this.elt.on('click', this.ev_click);
}
SCSMComboBoxController.prototype.ev_click = function (event) {
  this.isFocus = true;
};
SCSMComboBoxController.prototype.ev_clickOut = function (event) {
  this.isFocus = false;
};
SCSMComboBoxController.prototype.update = function () {
  var selectedItem = this.elt.dropdown.selectedItem;
  this.$selected.clearChild();
  if (!selectedItem) return;
  this.$selected.addChild(selectedItem.colors.map(function (color) {
    return (0, _ACore._)({
      "class": 'as-scsm-item-cell',
      style: {
        backgroundColor: color
      }
    });
  }));
};
Object.defineProperty(SCSMComboBoxController.prototype, 'isFocus', {
  set: function set(value) {
    var _this2 = this;
    if (!!value === this.elt.hasClass('as-focus')) return;
    if (value) {
      this.elt.addClass('as-focus');
    } else {
      this.elt.removeClass('as-focus');
    }
    if (value) {
      this.elt.off('click', this.ev_click);
      setTimeout(function () {
        document.addEventListener('click', _this2.ev_clickOut);
      }, 10);
      this.elt.dropdown.$follower.addTo(document.body);
      this.elt.dropdown.$follower.followTarget = this.elt;
    } else {
      this.elt.on('click', this.ev_click);
      document.removeEventListener('click', this.ev_clickOut);
      this.elt.dropdown.$follower.selfRemove();
      this.elt.dropdown.$follower.followTarget = null;
    }
  },
  get: function get() {
    return this.elt.hasClass('as-focus');
  }
});

/***/ }),

/***/ 28380:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SwatchesTable = __webpack_require__(83225);
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
__webpack_require__(46270);
var _SpectrumColor = _interopRequireDefault(__webpack_require__(55817));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _DynamicCSS = _interopRequireDefault(__webpack_require__(30401));
var _base = __webpack_require__(6954);
var _red_cross = _interopRequireDefault(__webpack_require__(8161));
var _utils = __webpack_require__(84512);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends AElement
 * @constructor
 */
function SolidColorPicker() {
  if (!SolidColorPicker.css) {
    SolidColorPicker.css = new _DynamicCSS["default"]().setProperty('.as-color-cell.as-solid-color-picker-selected.as-null .as-color-cell-value', 'background-image', "url(\"data:image/svg+xml;base64,".concat((0, _base.base64EncodeUnicode)(_red_cross["default"].replace(/\$width/g, '58').replace(/\$height/g, '22')), "\")")).commit();
  }
  this.swatchMode = new SCPSWatchMode(this);
  this.pickerMode = new SCPPickerMode(this);
  this.modes = [this.swatchMode, this.pickerMode];
  this.modeCtrl = new SCPSWatchModeController(this);
  _OOP["default"].drillProperty(this, this.modeCtrl, 'mode');
  this.footerCtrl = new SCPFooterController(this);
  this.$opacity = this.footerCtrl.$opacity;
  this.$hex = this.footerCtrl.$hex;
  this.$selected = this.footerCtrl.$selected;
  this.historyCtrl = new SCPHistoryController(this);
  this.$swatchesName = this.modeCtrl.$swatchesName;
  this.on('keydown', this.eventHandler.keydown);
  this._lastEmitHex8 = '';
  this.rawValue = new _Color["default"]([1, 0, 0, 1]);
  this._swatchesNames = ['Material Design', 'Moqups Classic', 'Bootstrap', 'iOS'];
  this._swatchesShortName = ['material', 'moqups', 'bootstrap', 'ios'];
  this._swatchesIcons = ['span.mdi.mdi-palette', 'span.mdi.mdi-material-design', 'span.mdi.mdi-bootstrap', 'span.mdi.mdi-apple-ios'];
  this._swatchesData = [_SwatchesTable.MaterialSwatches, _SwatchesTable.MoqupsClassicSwathes, _SwatchesTable.BootstrapSwatches, _SwatchesTable.iOsSwatches];

  /**
   * @type {import('absol-acomp/js/BScroller').default}
   */
  this.$swatchesTableCtn = this.swatchMode.$swatchesTableCtn;
  this.$selectedDot = (0, _ACore._)('.as-solid-color-picker-selected-dot'); //share

  /**
   * @type {import('./SwatchesTable').default}
   */
  this.$swatchesTable = this.swatchMode.$swatchesTable;
  this.$recentSwatchesTable = this.historyCtrl.$recentSwatchesTable;
  this.$attachhook = (0, _ACore._)('attachhook').on('attached', this.eventHandler.attached).addTo(this);
  this.$spectrum = this.pickerMode.$spectrum;
  this.$spectrumDot = this.pickerMode.$spectrumDot;
  this.$alpha = this.pickerMode.$alpha;
  this.$submitBtn = (0, _ACore.$)('.as-solid-color-picker-submit-btn', this).on('click', this.notifySubmit.bind(this));

  /**
   * @name hasOpacity
   * @type {boolean}
   * @memberof SolidColorPicker#
   */

  /**
   * @name nullable
   * @type {boolean}
   * @memberof SolidColorPicker#
   */

  /**
   * @name value
   * @type {Color|null}
   * @memberof SolidColorPicker#
   */

  /**
   * @name hex8Value
   * @type {string}
   * @memberof SolidColorPicker#
   */
}

SolidColorPicker.tag = 'SolidColorPicker'.toLowerCase();
SolidColorPicker.render = function () {
  return (0, _ACore._)({
    attr: {
      tabindex: '1'
    },
    extendEvent: ['change', 'sizechange', 'submit'],
    "class": ['as-solid-color-picker', 'as-has-opacity'],
    child: [{
      "class": 'as-solid-color-picker-header',
      child: [{
        "class": 'as-solid-color-picker-mode-ctn',
        child: {
          tag: 'buttonarray',
          "class": 'as-solid-color-picker-mode',
          props: {
            items: [{
              text: 'SWATCHES',
              value: 'swatches'
            }, {
              text: 'PICKER',
              value: 'picker'
            }]
          }
        }
      }]
    }, {
      "class": 'as-solid-color-picker-body',
      child: [{
        "class": ['as-solid-color-picker-swatches-select-ctn'],
        child: [{
          tag: 'span',
          child: {
            text: 'Color Scheme: '
          }
        }, {
          "class": 'as-solid-color-picker-swatches-name',
          tag: 'a',
          child: {
            text: 'Material Design'
          }
        }, 'span.mdi.mdi-menu-down']
      }, {
        tag: 'bscroller',
        "class": ['as-solid-color-picker-swatches-ctn'],
        child: {
          tag: 'swatchestable',
          props: {
            data: _SwatchesTable.MaterialSwatches
          }
        }
      }, {
        tag: _SpectrumColor["default"],
        "class": 'as-solid-color-picker-spectrum',
        child: '.as-solid-color-picker-spectrum-dot'
      }, {
        "class": 'as-solid-color-picker-hue',
        child: '.as-solid-color-picker-hue-dot'
      }, {
        "class": 'as-solid-color-picker-alpha',
        child: ['.as-solid-color-picker-alpha-color', '.as-solid-color-picker-alpha-dot']
      }, {
        tag: 'swatchestable',
        "class": 'as-solid-color-picker-near'
      }, {
        "class": 'as-solid-color-picker-none-ctn',
        child: [{
          tag: _SwatchesTable.ColorCell,
          "class": 'as-solid-color-picker-none-cell',
          props: {
            value: null
          }
        }, {
          child: {
            text: 'None'
          }
        }]
      }, {
        "class": 'as-solid-color-picker-recent-title',
        child: {
          text: 'RECENT COLOR'
        }
      }, {
        "class": ['as-solid-color-picker-recent-swatches-ctn'],
        child: {
          tag: 'swatchestable',
          props: {
            data: _SwatchesTable.MoqupsClassicSwathes.slice(0, 2)
          }
        }
      }]
    }, {
      "class": 'as-solid-color-picker-footer',
      child: [{
        tag: _SwatchesTable.ColorCell,
        "class": 'as-solid-color-picker-selected'
      }, {
        tag: 'flexiconinput',
        "class": 'as-solid-color-picker-color-hex',
        props: {
          value: 'ffffff',
          icon: '<svg viewBox="0 0 64 64" id="mq-icon-hex"><path d="M60 24v-6H46V4h-6v14H24V4h-6v14H4v6h14v16H4v6h14v14h6V46h16v14h6V46h14v-6H46V24h14zM40 40H24V24h16v16z"></path></svg>'
        }
      }, {
        tag: 'flexiconinput',
        "class": 'as-solid-color-picker-color-opacity',
        props: {
          icon: 'span.mdi.mdi-opacity',
          unit: '%',
          value: 100
        }
      }, {
        tag: 'flexiconbutton',
        "class": 'as-solid-color-picker-submit-btn',
        props: {
          icon: 'span.mdi.mdi-check-bold'
        }
      }]
    }]
  });
};
SolidColorPicker._settingKey = "absol_solid_color_setting";

//only Hex6
SolidColorPicker.setting = {
  recentColors: ['#ffffff', '#00ffff', '#0000ff', '#ffffff', '#000000']
};
SolidColorPicker._loadSetting = function () {
  var setting = localStorage.getItem(SolidColorPicker._settingKey);
  try {
    setting = JSON.parse(setting);
  } catch (e) {
    setting = {};
  }
  if (setting) {
    Object.assign(SolidColorPicker.setting, setting);
  }
};
SolidColorPicker._loadSetting();
SolidColorPicker._writeSetting = function () {
  localStorage.setItem(SolidColorPicker._settingKey, JSON.stringify(SolidColorPicker.setting));
  SolidColorPicker.updateInstancesSetting();
};
SolidColorPicker.pushInstances = function (elt) {
  var instances = SolidColorPicker.$instances;
  var aliveInstance = [];
  var instance;
  var found = false;
  while (instances.length > 0) {
    instance = instances.pop();
    if (instance.isDescendantOf(document.body)) {
      aliveInstance.push(instance);
    }
    if (instance === elt) found = true;
  }
  while (aliveInstance.length > 0) {
    instances.push(aliveInstance.pop());
  }
  if (!found) {
    instances.push(elt);
  }
};
SolidColorPicker.updateInstancesSetting = function () {
  var instances = SolidColorPicker.$instances;
  var aliveInstance = [];
  var instance;
  while (instances.length > 0) {
    instance = instances.pop();
    if (instance.isDescendantOf(document.body)) {
      aliveInstance.push(instance);
    }
  }
  while (aliveInstance.length > 0) {
    instance = aliveInstance.pop();
    instances.push(instance);
    instance.reloadSetting();
  }
};
SolidColorPicker.$instances = [];
SolidColorPicker.css = null;

/**
 * @param {Color} color
 */
SolidColorPicker.pushColorHistory = function (color) {
  if (!color) return;
  var hex6Color = color.toString('hex6');
  var recentColors = SolidColorPicker.setting.recentColors;
  var index = recentColors.indexOf(hex6Color);
  if (index >= 0) {
    recentColors.splice(index, 1);
  }
  recentColors.unshift(hex6Color);
  while (recentColors.length > 24) {
    recentColors.pop();
  }
  setTimeout(SolidColorPicker._writeSetting.bind(SolidColorPicker), 1);
};
SolidColorPicker.prototype.reloadSetting = function () {
  var recentColors = SolidColorPicker.setting.recentColors.slice();
  var swatches = [];
  while (recentColors.length > 0) {
    swatches.push(recentColors.splice(0, 12));
  }
  this.$recentSwatchesTable.data = swatches;
  this.swatchMode.viewValue();
};
SolidColorPicker.prototype.notifyCanBeChanged = function () {
  var cHex8 = this.hex8Value;
  if (cHex8 !== this._lastEmitHex8) {
    this._lastEmitHex8 = cHex8;
    this.notifyChange();
  }
};
SolidColorPicker.prototype.notifyChange = function () {
  this.emit('change', {
    target: this,
    value: this.value,
    type: 'change'
  }, this);
};
SolidColorPicker.prototype.notifySizeCanBeChanged = function () {
  var bound = this.getBoundingClientRect();
  if (!this._lastSize || this._lastSize.width !== bound.width || this._lastSize.height !== bound.height) {
    this._lastSize = {
      width: bound.width,
      height: bound.height
    };
    this.notifySizeChange();
  }
};
SolidColorPicker.prototype.notifySizeChange = function () {
  this.emit('sizechange', {
    target: this,
    size: this._lastSize,
    type: 'sizechange'
  }, this);
};
SolidColorPicker.prototype.notifySubmit = function () {
  SolidColorPicker.pushColorHistory(this.rawValue);
  this.emit('submit', {
    target: this,
    value: this.rawValue,
    type: 'submit'
  }, this);
};
SolidColorPicker.property = {};

/**
 * @type {SolidColorPicker}
 */
SolidColorPicker.property.value = {
  /**
   *
   * @param {Color} value
   */
  set: function set(value) {
    value = value || null;
    if (value && !value.toHex8) {
      //is
      try {
        value = _Color["default"].parse(value + '');
      } catch (e) {
        value = new _Color["default"]([0, 0, 0, 0]);
      }
    }
    this.rawValue = value;
    this._lastEmitHex8 = this.hex8Value;
    this.footerCtrl.viewValue();
    this.pickerMode.viewValue();
    this.swatchMode.viewValue();
  },
  get: function get() {
    var nullable = this.nullable;
    var hasOpacity = this.hasOpacity;
    var value = this.rawValue || null; //
    if (!nullable && !value) value = new _Color["default"]([0, 0, 0, 0]);
    if (!hasOpacity && value) value.rgba[3] = 1;
    return value;
  }
};
SolidColorPicker.property.hex8Value = {
  get: function get() {
    var value = this.value;
    if (value) return value.toHex8();
    return 'null';
  }
};

/**
 * @type {SolidColorPicker}
 */
SolidColorPicker.property.swatches = {
  set: function set(value) {
    var index = this._swatchesShortName.indexOf(value);
    index = Math.max(index, 0);
    value = this._swatchesShortName[index];
    if (this._swatches != value) {
      this._swatches = value;
      this.$swatchesTable.data = this._swatchesData[index];
      this.$swatchesName.childNodes[0].data = this._swatchesNames[index];
    }
    this.swatchMode.viewValue();
  },
  get: function get() {
    return this._swatches;
  }
};
SolidColorPicker.property.nullable = {
  set: function set(value) {
    if (value) {
      this.addClass('as-nullable');
    } else {
      this.removeClass('as-nullable');
    }
    this.footerCtrl.viewValue();
    this.pickerMode.viewValue();
    this.swatchMode.viewValue();
  },
  get: function get() {
    return this.hasClass('as-nullable');
  }
};
SolidColorPicker.property.hasOpacity = {
  /**
   * @this SolidColorPicker#
   * @param value
   */
  set: function set(value) {
    if (value) {
      this.addClass('as-has-opacity');
    } else {
      this.removeClass('as-has-opacity');
    }
    this.footerCtrl.viewValue();
    this.swatchMode.viewValue();
    this.pickerMode.viewValue();
  },
  get: function get() {
    return this.hasClass('as-has-opacity');
  }
};

/**
 * @type {SolidColorPicker}
 */
SolidColorPicker.eventHandler = {};
SolidColorPicker.eventHandler.attached = function () {
  SolidColorPicker.pushInstances(this);
  this.reloadSetting();
};
SolidColorPicker.eventHandler.keydown = function (event) {
  if (event.key === 'Enter') {
    event.preventDefault();
    event.target.blur();
    this.notifySubmit();
  }
};
_ACore["default"].install('solidcolorpicker', SolidColorPicker);

/**
 *
 * @param {SolidColorPicker} elt
 *
 * @constructor
 */
function SCPHistoryController(elt) {
  this.elt = elt;
  this.$recentSwatchesTable = (0, _ACore.$)('.as-solid-color-picker-recent-swatches-ctn swatchestable', this.elt).on('presscell', this.elt.swatchMode.ev_pressCell.bind(this));
}

/**
 *
 * @param {SolidColorPicker} elt
 * @constructor
 */
function SCPSWatchModeController(elt) {
  var _this = this;
  this.elt = elt;
  this.$swatchesName = (0, _ACore.$)('.as-solid-color-picker-swatches-name', this.elt);
  _QuickMenu["default"].toggleWhenClick(this.$swatchesName, {
    anchor: [1, 6],
    getMenuProps: function getMenuProps() {
      return {
        extendClasses: 'as-solid-color-picker-swatches-name-menu',
        extendStyle: {
          'font-size': _this.elt.getComputedStyleValue('font-size')
        },
        items: _this.elt._swatchesNames.map(function (name, i) {
          return {
            text: name,
            value: _this.elt._swatchesShortName[i],
            icon: _this.elt._swatchesIcons[i]
          };
        })
      };
    },
    onSelect: function onSelect(item) {
      _this.elt.swatches = item.value;
    }
  });
  this.$mode = (0, _ACore.$)('.as-solid-color-picker-mode', this.elt).on('change', this.updateMode.bind(this));
  this.viewingMode = null;
  this.updateMode();
}
SCPSWatchModeController.prototype.updateMode = function () {
  var value = this.$mode.value;
  if (value === this.viewingMode) return;
  this.elt.removeClass('as-solid-color-picker-mode-' + this.viewingMode);
  this.viewingMode = value + '';
  this.elt.addClass('as-solid-color-picker-mode-' + this.viewingMode);
  this.$mode.value = this.viewingMode;
  this.elt.notifySizeCanBeChanged();
};
Object.defineProperty(SCPSWatchModeController.prototype, 'mode', {
  set: function set(value) {
    this.$mode.value = value;
    this.updateMode();
  },
  get: function get() {
    return this.$mode.value;
  }
});

/**
 *
 * @param {SolidColorPicker} elt
 * @constructor
 */
function SCPSWatchMode(elt) {
  this.elt = elt;
  /**
   *
   * @type {BScroller}
   */
  this.$swatchesTableCtn = (0, _ACore.$)('.as-solid-color-picker-swatches-ctn', this.elt);

  /**
   * @type {SwatchesTable}
   */
  this.$swatchesTable = (0, _ACore.$)('.as-solid-color-picker-swatches-ctn swatchestable', this.elt).on('presscell', this.ev_pressCell.bind(this));
  this.$noneCtn = (0, _ACore.$)('.as-solid-color-picker-none-ctn', this.elt).on('click', this.ev_clickNone.bind(this));
}
SCPPickerMode.prototype.name = "swatches";
SCPPickerMode.prototype.displayName = "SWATCHES";
SCPSWatchMode.prototype.ev_pressCell = function (event) {
  try {
    var value = _Color["default"].parse(event.value + '');
    var hC = value.getContrastYIQ();
    hC.rgba[3] = 0.7;
    value.rgba[3] = this.elt.footerCtrl.opacity;
    this.elt.rawValue = value;
    this.elt.footerCtrl.viewValue();
    this.elt.$selectedDot.addStyle('box-shadow', "inset 0px 0px 0.3em 0.125em ".concat(hC.toString('rgba')));
    event.cellElt.addChild(this.elt.$selectedDot);
    this.$noneCtn.removeClass('as-selected');
    this.elt.pickerMode.viewValue();

    //
  } catch (e) {
    // this.$selectedDot.removeStyle('box-shadow');
    // this.$hex.value = 'ffffff';
  }
  this.elt.notifyCanBeChanged();
};
SCPSWatchMode.prototype.ev_clickNone = function (event) {
  this.elt.rawValue = null;
  this.viewValue();
  this.elt.footerCtrl.viewValue();
  this.elt.swatchMode.viewValue();
  this.elt.pickerMode.viewValue();
  this.elt.notifyCanBeChanged();
};
SCPSWatchMode.prototype.viewValue = function () {
  this.elt.$selectedDot.remove();
  var cell, hC;
  /**
   *
   * @type {Color|null}
   */
  var value = this.elt.value;
  if (!value) this.$noneCtn.addClass('as-selected');else this.$noneCtn.removeClass('as-selected');
  if (this.elt.modeCtrl.mode === 'swatches' && value) {
    cell = this.$swatchesTable.getCell(value.toString('hex6'));
    if (cell) this.$swatchesTableCtn.scrollInto(cell);
  }
  if (!cell && value) {
    cell = this.elt.$recentSwatchesTable.getCell(value.toString('hex6'));
  }
  if (cell) {
    hC = value.getContrastYIQ();
    hC.rgba[3] = 0.7;
    this.elt.$selectedDot.addStyle('box-shadow', "inset 0px 0px 0.3em 0.125em ".concat(hC.toString('rgba')));
    cell.addChild(this.elt.$selectedDot);
  }
};

/**
 *
 * @param {SolidColorPicker} elt
 * @constructor
 */
function SCPPickerMode(elt) {
  this.elt = elt;
  this.$spectrum = (0, _ACore._)({
    tag: 'hanger',
    elt: (0, _ACore.$)('.as-solid-color-picker-spectrum', this.elt)
  }).on('predrag', this.ev_spectrumDrag.bind(this)).on('drag', this.ev_spectrumDrag.bind(this));
  this.$hueDot = (0, _ACore.$)('.as-solid-color-picker-hue-dot', this.elt);
  this.$spectrumDot = (0, _ACore.$)('.as-solid-color-picker-spectrum-dot', this.elt);
  this.$alpha = (0, _ACore._)({
    tag: 'hanger',
    elt: (0, _ACore.$)('.as-solid-color-picker-alpha', this.elt)
  }).on('predrag', this.ev_alphaDrag.bind(this)).on('drag', this.ev_alphaDrag.bind(this));
  this.$alphaDot = (0, _ACore.$)('.as-solid-color-picker-alpha-dot', this.elt);
  this.$hue = (0, _ACore._)({
    tag: 'hanger',
    elt: (0, _ACore.$)('.as-solid-color-picker-hue', this.elt)
  }).on('predrag', this.ev_hueDrag.bind(this)).on('drag', this.ev_hueDrag.bind(this));
  this.$near = (0, _ACore.$)('.as-solid-color-picker-near', this.elt).on('presscell', this.ev_nearPressCell.bind(this));
  this._hue = 0;
  this._sat = 1;
  this._brightness = 1;
}
SCPPickerMode.prototype.name = 'picker';
SCPPickerMode.prototype.displayName = 'PICKER';
SCPPickerMode.prototype.viewValue = function () {
  var value = this.elt.value || new _Color["default"]([0, 0, 0, 1]);
  var hsba = _Color["default"].rgbaToHSBA(value.rgba);
  this._setHue(hsba[0] * 360);
  this._setSatBrightness(hsba[1] * 100, hsba[2] * 100);
  this._updateOpacity();
  this._updateNear();
};
SCPPickerMode.prototype._updateSpectrumDot = function () {
  var value = this.elt.value || new _Color["default"]([0, 0, 0, 1]);
  var dotColor = value.getContrastYIQ();
  dotColor.rgba[3] = 0.7;
  this.$spectrumDot.addStyle({
    bottom: 'calc(' + this._brightness + '% - 0.5em)',
    left: 'calc(' + this._sat + '% - 0.5em)',
    'box-shadow': 'inset 0px 0px 0.3em 0.125em ' + dotColor.toString()
  });
};
SCPPickerMode.prototype._updateNear = function () {
  var value = this.elt.value || new _Color["default"]([0, 0, 0, 1]);
  var hsba = _Color["default"].rgbaToHSBA(value.rgba);
  var sat = hsba[1];
  var hue = hsba[0];
  var brightness = hsba[2];
  var whiterColors = Array(7).fill(null).map(function (u, i) {
    return _Color["default"].fromHSB(hue, sat * (7 - i) / 8, brightness);
  });
  var darkerColors = Array(7).fill(null).map(function (u, i) {
    return _Color["default"].fromHSB(hue, sat, brightness * (7 - i) / 8);
  });
  var hueNearColors = [-5, -3, -2, 1, 2, 3, 5].map(function (u) {
    var nHue = hue + u / 40;
    if (nHue > 1) nHue -= 1;else if (nHue < 0) nHue += 1;
    return _Color["default"].fromHSB(nHue, sat, brightness);
  });
  this.$near.data = [whiterColors, darkerColors, hueNearColors];
};
SCPPickerMode.prototype._setHue = function (hue) {
  this._hue = hue;
  var spectrumColor = _Color["default"].fromHSB(hue / 360, 1, 1);
  var hueDotColor = spectrumColor.getContrastYIQ();
  hueDotColor.rgba[3] = 0.7;
  this.$hueDot.addStyle({
    'box-shadow': 'inset 0px 0px 0.3em 0.125em ' + hueDotColor.toString(),
    left: 'calc(' + hue / 3.6 + '% - 0.5em)'
  });
  this.$spectrum.addStyle('background-color', spectrumColor.toString());
  this._updateSpectrumDot();
};
SCPPickerMode.prototype._setSatBrightness = function (sat, brightness) {
  this._sat = sat;
  this._brightness = brightness;
  this._updateSpectrumDot();
};
SCPPickerMode.prototype._updateOpacity = function () {
  this.$alphaDot.addStyle('left', 'calc(' + this.elt.footerCtrl.opacity * 100 + '% - 0.5em)');
};
SCPPickerMode.prototype.ev_spectrumDrag = function (event) {
  event.preventDefault();
  var sBound = this.$spectrum.getBoundingClientRect();
  var brightness = (sBound.bottom - event.clientY) * 100 / sBound.height;
  brightness = Math.max(0, Math.min(100, Math.round(brightness)));
  var sat = (event.clientX - sBound.left) * 100 / sBound.width;
  sat = Math.max(0, Math.min(100, Math.round(sat)));
  this.elt.rawValue = _Color["default"].fromHSBA(this._hue / 360, sat / 100, brightness / 100, this.elt.footerCtrl.opacity);
  this._setSatBrightness(sat, brightness);
  this._updateNear();
  this.elt.footerCtrl.viewValue();
  this.elt.swatchMode.viewValue();
  this.elt.notifyCanBeChanged();
};
SCPPickerMode.prototype.ev_alphaDrag = function (event) {
  event.preventDefault();
  var aBound = this.$alpha.getBoundingClientRect();
  var opacity = (event.clientX - aBound.left) * 100 / aBound.width;
  opacity = Math.max(0, Math.min(100, Math.round(opacity)));
  var color = this.elt.value || new _Color["default"]([0, 0, 0, 0]);
  color.rgba[3] = opacity / 100;
  this.elt.rawValue = color;
  this.elt.footerCtrl.viewValue();
  this._updateOpacity();
  // this._setOpacityPercent(opacity);
  this.elt.notifyCanBeChanged();
};
SCPPickerMode.prototype.ev_hueDrag = function (event) {
  event.preventDefault();
  var hBound = this.$hue.getBoundingClientRect();
  var hue = (event.clientX - hBound.left) * 360 / hBound.width;
  hue = Math.max(0, Math.min(360, Math.round(hue)));
  this.elt.rawValue = _Color["default"].fromHSBA(hue / 360, this._sat / 100, this._brightness / 100, this.elt.footerCtrl.opacity);
  this._setHue(hue);
  this.elt.footerCtrl.viewValue();
  this.elt.swatchMode.viewValue();
  this._updateNear();
  this.elt.notifyCanBeChanged();
};
SCPPickerMode.prototype.ev_nearPressCell = function (event) {
  var value = event.value.clone();
  value.rgba[3] = this.elt.footerCtrl.opacity;
  this.elt.rawValue = value;
  this.viewValue();
  this.elt.footerCtrl.viewValue();
  this.elt.pickerMode.viewValue();
};

/**
 *
 * @param {SolidColorPicker} elt
 * @constructor
 */
function SCPFooterController(elt) {
  this.elt = elt;
  this.$selected = (0, _ACore.$)('.as-solid-color-picker-selected', this.elt);
  this.$opacity = (0, _ACore.$)('.as-solid-color-picker-color-opacity', this.elt).on('change', this.ev_opacityChange.bind(this)).on('keyup', this.ev_opacityKeyUp.bind(this));
  this.$hex = (0, _ACore.$)('.as-solid-color-picker-color-hex', this.elt).on('keyup', this.ev_hexKeyUp.bind(this)).on('change', this.ev_hexChange.bind(this));
}
SCPFooterController.prototype.ev_opacityChange = function (event) {
  var color = this.elt.value;
  var opacityTxt = color ? Math.round(color.rgba[3] * 100) : '100';
  if (color && this.$opacity.value !== opacityTxt) {
    this.$opacity.value = opacityTxt;
  }
};
SCPFooterController.prototype.ev_opacityKeyUp = function (event) {
  var opacity = parseFloat(this.$opacity.value);
  if (!isNaN(opacity)) {
    opacity = Math.round(Math.max(0, Math.min(opacity, 100)));
    var color = this.elt.value || new _Color["default"](0, 0, 0, 1);
    color.rgba[3] = opacity / 100;
    this.elt.rawValue = color;
    this.elt.pickerMode.viewValue();
    this.$selected.value = color;
    this.elt.notifyCanBeChanged();
  }
};
SCPFooterController.prototype.ev_hexKeyUp = function (event) {
  // var prevValue = this.elt.value;
  var value;
  var nullable = this.elt.nullable;
  var hex = this.$hex.value.trim();
  try {
    if (nullable && hex.length === 0) {
      value = null;
    } else {
      value = _Color["default"].parse('#' + hex);
    }
  } catch (e) {
    // console.error(e);
  }
  if (!value && !nullable) return;
  if (value) value.rgba[3] = this.opacity;
  this.elt.rawValue = value;
  this.$selected.value = value;
  this.elt.pickerMode.viewValue();
  this.elt.swatchMode.viewValue();
  this.elt.notifyCanBeChanged();
};
SCPFooterController.prototype.ev_hexChange = function (event) {
  var value = this.elt.value;
  if (value) this.$hex.value = value.toHex6();
};
SCPFooterController.prototype.viewValue = function () {
  var value = this.elt.value;
  var hasOpacity = this.elt.hasOpacity;
  this.$selected.value = value;
  this.$hex.value = value ? value.toHex6() : '';
  if (hasOpacity && value) {
    this.$opacity.value = Math.round(value.rgba[3] * 100) + '';
  } else this.$opacity.value = '100';
};
Object.defineProperty(SCPFooterController.prototype, 'opacity', {
  get: function get() {
    if (!this.elt.hasOpacity) return 1;
    var opFromText = parseFloat(this.$opacity.value) / 100;
    if ((0, _utils.isRealNumber)(opFromText)) {
      opFromText = Math.max(0, Math.min(opFromText, 1));
      return opFromText;
    }
    var value = this.elt.value;
    if (!value) return 1;
    return value.rgba[3];
  }
});
var _default = SolidColorPicker;
exports["default"] = _default;

/***/ }),

/***/ 55817:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(95345);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function SpectrumColor() {}
SpectrumColor.tag = 'SpectrumColor'.toLowerCase();
SpectrumColor.render = function () {
  return (0, _ACore._)({
    "class": 'as-spectrum-color',
    child: {
      "class": 'as-spectrum-color-sat',
      child: '.as-spectrum-color-val'
    }
  });
};
_ACore["default"].install('spectrumcolor', SpectrumColor);
var _default = SpectrumColor;
exports["default"] = _default;

/***/ }),

/***/ 83225:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.BootstrapSwatches = void 0;
exports.ColorCell = ColorCell;
exports.iOsSwatches = exports["default"] = exports.MoqupsClassicSwathes = exports.MaterialSwatches = void 0;
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(60401);
var _DynamicCSS = _interopRequireDefault(__webpack_require__(30401));
var _base = __webpack_require__(6954);
var _red_cross = _interopRequireDefault(__webpack_require__(8161));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/**
 * @extends AElement
 * @constructor
 */
function ColorCell() {
  this.$value = this.firstChild;
  if (!ColorCell.css) {
    ColorCell.css = new _DynamicCSS["default"]().setProperty('.as-color-cell.as-null .as-color-cell-value', 'background-image', "url(\"data:image/svg+xml;base64,".concat((0, _base.base64EncodeUnicode)(_red_cross["default"].replace(/\$width/g, '24').replace(/\$height/g, '24')), "\")")).commit();
  }
}
ColorCell.tag = 'ColorCell'.toString();
ColorCell.render = function () {
  return (0, _ACore._)({
    "class": 'as-color-cell',
    child: ['.as-color-cell-value']
  });
};
ColorCell.property = {};
ColorCell.property.value = {
  set: function set(value) {
    if (value === null || value === undefined) {
      this.addClass('as-null');
    } else if (value) {
      this.removeClass('as-null');
      this.$value.addStyle('background-color', value + '');
    }
    this._value = value;
  },
  get: function get() {
    return this._value;
  }
};
function SwatchesTable() {
  this._data = [];
  this._poolCells = [];
  this._poolRows = [];
  this._dict = {};
}
SwatchesTable.tag = 'SwatchesTable'.toLowerCase();
SwatchesTable.render = function () {
  return (0, _ACore._)({
    extendEvent: 'presscell',
    "class": 'as-swatches-table'
  });
};
SwatchesTable.prototype.getCell = function () {
  if (arguments.length === 1) {
    var key = arguments[0];
    if (key.toHex8) {
      key = key.toHex8();
    } else if (typeof key == 'string') {
      key = _Color["default"].parse(key);
      if (key) key = key.toHex8();
    }
    key = key + '';
    return this._dict[key];
  } else if (arguments.length === 2) {
    return this.childNodes[arguments[0]] && this.childNodes[arguments[0]].childNodes[arguments[1]];
  }
};
SwatchesTable.eventHandler = {};
SwatchesTable.eventHandler.clickCell = function (cell, event) {
  this.emit('presscell', {
    target: this,
    cellElt: cell,
    value: cell.__swatchescell_value,
    rowIdx: cell.__swatchescell_row_idx,
    colIdx: cell.__swatchescell_col_idx
  });
};
SwatchesTable.property = {};
SwatchesTable.property.data = {
  set: function set(value) {
    this._dict = {};
    value = value || [[null]];
    if (typeof value == 'string') {
      value = {
        classic: MoqupsClassicSwathes,
        material: MaterialSwatches,
        bootstrap: BootstrapSwatches,
        ios: iOsSwatches,
        moqupsclassic: MoqupsClassicSwathes
      }[value] || [[null]];
    }
    this._data = value;
    var child;
    while (this.childNodes.length > value.length) {
      child = this.firstChild;
      this._poolRows.push(child);
      this.removeChild(child);
    }
    while (this.childNodes.length < value.length) {
      if (this._poolRows.length > 0) child = this._poolRows.pop();else child = (0, _ACore._)('.as-swatches-table-row');
      this.addChild(child);
    }
    var rowElt;
    var row;
    for (var i = 0; i < value.length; ++i) {
      rowElt = this.childNodes[i];
      row = value[i];
      while (rowElt.childNodes.length > row.length) {
        child = rowElt.firstChild;
        this._poolCells.push(child);
        rowElt.removeChild(child);
      }
      while (rowElt.childNodes.length < row.length) {
        if (this._poolCells.length > 0) child = this._poolCells.pop();else {
          child = (0, _ACore._)({
            tag: ColorCell,
            "class": 'as-swatches-table-cell'
          });
          child.on('click', this.eventHandler.clickCell.bind(this, child));
        }
        rowElt.addChild(child);
      }
      for (var j = 0; j < row.length; ++j) {
        rowElt.childNodes[j].__swatchescell_row_idx = i;
        rowElt.childNodes[j].__swatchescell_col_idx = j;
        if (!row[j]) {
          rowElt.childNodes[j].attr('title', null);
          // rowElt.childNodes[j].firstChild.removeStyle('background-color');
          rowElt.childNodes[j].__swatchescell_value = row[j];
          this._dict['null'] = rowElt.childNodes[j];
        } else if (row[j].toHex8) {
          rowElt.childNodes[j].value = row[j];
          rowElt.childNodes[j].attr('title', null);
          rowElt.childNodes[j].__swatchescell_value = row[j];
          this._dict[row[j].toHex8()] = rowElt.childNodes[j];
        } else if (_typeof(row[j]) == 'object') {
          if (row[j].value) {
            rowElt.childNodes[j].value = row[j].value;
            // rowElt.childNodes[j].firstChild.addStyle('background-color', row[j].value);
            rowElt.childNodes[j].__swatchescell_value = row[j].value;
            this._dict[_Color["default"].parse(row[j].value + '').toHex8()] = rowElt.childNodes[j];
          } else {
            rowElt.childNodes[j].firstChild.removeStyle('background-color');
            this._dict[_Color["default"].parse('transparent').toHex8()] = rowElt.childNodes[j];
          }
          rowElt.childNodes[j].attr('title', row[j].name || null);
        } else if (typeof row[j] == 'string') {
          rowElt.childNodes[j].value = row[j];
          rowElt.childNodes[j].attr('title', null);
          rowElt.childNodes[j].__swatchescell_value = row[j];
          this._dict[_Color["default"].parse(row[j]).toHex8()] = rowElt.childNodes[j];
        }
      }
    }
  },
  get: function get() {
    return this._data;
  }
};
var MoqupsClassicSwathes = [[{
  "name": "White",
  "value": "#ffffff"
}, {
  "name": "± Wild Sand",
  "value": "#f7f6f6"
}, {
  "name": "± Gallery",
  "value": "#ebebeb"
}, {
  "name": "± Alto",
  "value": "#d6d6d6"
}, {
  "name": "Silver",
  "value": "#c0c0c0"
}, {
  "name": "± Silver Chalice",
  "value": "#aaaaaa"
}, {
  "name": "± Gray",
  "value": "#929292"
}, {
  "name": "Boulder",
  "value": "#7a7a7a"
}, {
  "name": "± Scorpion",
  "value": "#606060"
}, {
  "name": "± Tundora",
  "value": "#444444"
}, {
  "name": "± Mine Shaft",
  "value": "#232323"
}, {
  "name": "Black",
  "value": "#000000"
}], [{
  "name": "± Prussian Blue",
  "value": "#003748"
}, {
  "name": "± Green Vogue",
  "value": "#021f54"
}, {
  "name": "± Black Rock",
  "value": "#120639"
}, {
  "name": "± Violet",
  "value": "#2f073b"
}, {
  "name": "± Bulgarian Rose",
  "value": "#3d051b"
}, {
  "name": "± Lonestar",
  "value": "#5e0202"
}, {
  "name": "± Brown Bramble",
  "value": "#5b1a04"
}, {
  "name": "± Cioccolato",
  "value": "#58330a"
}, {
  "name": "± Bronze Olive",
  "value": "#553d0d"
}, {
  "name": "± Himalaya",
  "value": "#656119"
}, {
  "name": "± West Coast",
  "value": "#4e5516"
}, {
  "name": "± Seaweed",
  "value": "#243e16"
}], [{
  "name": "± Astronaut Blue",
  "value": "#004e63"
}, {
  "name": "± Catalina Blue",
  "value": "#033076"
}, {
  "name": "± Violet",
  "value": "#1c0c4f"
}, {
  "name": "± Jagger",
  "value": "#460e56"
}, {
  "name": "± Maroon Oak",
  "value": "#570e28"
}, {
  "name": "± Dark Burgundy",
  "value": "#840705"
}, {
  "name": "± Kenyan Copper",
  "value": "#7d2709"
}, {
  "name": "± Raw Umber",
  "value": "#7b4812"
}, {
  "name": "± Raw Umber",
  "value": "#785616"
}, {
  "name": "± Wasabi",
  "value": "#8c8525"
}, {
  "name": "± Fern Frond",
  "value": "#6e7623"
}, {
  "name": "± Woodland",
  "value": "#355723"
}], [{
  "name": "± Blue Lagoon",
  "value": "#006e8c"
}, {
  "name": "± Cobalt",
  "value": "#0844a4"
}, {
  "name": "± Persian Indigo",
  "value": "#2e1572"
}, {
  "name": "± Honey Flower",
  "value": "#631878"
}, {
  "name": "± Claret",
  "value": "#7a163c"
}, {
  "name": "± Milano Red",
  "value": "#b70f0a"
}, {
  "name": "± Rust",
  "value": "#af3a11"
}, {
  "name": "± Desert",
  "value": "#aa671d"
}, {
  "name": "± Reef Gold",
  "value": "#a77a23"
}, {
  "name": "± Earls Green",
  "value": "#c3bb38"
}, {
  "name": "± Sushi",
  "value": "#99a534"
}, {
  "name": "± Fern Green",
  "value": "#4c7a34"
}], [{
  "name": "± Bondi Blue",
  "value": "#008db1"
}, {
  "name": "± Denim",
  "value": "#0c59cf"
}, {
  "name": "± Daisy Bush",
  "value": "#3b1d8f"
}, {
  "name": "± Seance",
  "value": "#7e2199"
}, {
  "name": "± Disco",
  "value": "#9c1f4d"
}, {
  "name": "± Crimson",
  "value": "#e61610"
}, {
  "name": "± Orange Roughy",
  "value": "#dc4c18"
}, {
  "name": "± Brandy Punch",
  "value": "#d68227"
}, {
  "name": "± Hokey Pokey",
  "value": "#d39c2f"
}, {
  "name": "± Starship",
  "value": "#f4eb49"
}, {
  "name": "± Turmeric",
  "value": "#c1d045"
}, {
  "name": "± Apple",
  "value": "#629c44"
}], [{
  "name": "± Cerulean",
  "value": "#00a4d3"
}, {
  "name": "± Blue Ribbon",
  "value": "#1464f6"
}, {
  "name": "± Daisy Bush",
  "value": "#5125ad"
}, {
  "name": "± Purple Heart",
  "value": "#9c29b7"
}, {
  "name": "± Maroon Flush",
  "value": "#bb285c"
}, {
  "name": "± Red Orange",
  "value": "#ff3823"
}, {
  "name": "± Orange",
  "value": "#ff6624"
}, {
  "name": "± Sunshade",
  "value": "#ffa834"
}, {
  "name": "± Bright Sun",
  "value": "#fec63d"
}, {
  "name": "± Laser Lemon",
  "value": "#fefb64"
}, {
  "name": "± Confetti",
  "value": "#d7eb5a"
}, {
  "name": "± Mantis",
  "value": "#72bb53"
}], [{
  "name": "± Bright Turquoise",
  "value": "#00c8f8"
}, {
  "name": "± Dodger Blue",
  "value": "#3d8af7"
}, {
  "name": "± Purple Heart",
  "value": "#6334e3"
}, {
  "name": "± Electric Violet",
  "value": "#c238eb"
}, {
  "name": "± Cerise Red",
  "value": "#e93578"
}, {
  "name": "± Persimmon",
  "value": "#ff5d55"
}, {
  "name": "± Coral",
  "value": "#ff8351"
}, {
  "name": "± Texas Rose",
  "value": "#ffb253"
}, {
  "name": "± Golden Tainoi",
  "value": "#ffc957"
}, {
  "name": "± Dolly",
  "value": "#fef67f"
}, {
  "name": "± Manz",
  "value": "#e2ee79"
}, {
  "name": "± Feijoa",
  "value": "#92d36e"
}], [{
  "name": "± Malibu",
  "value": "#4dd7fa"
}, {
  "name": "± Malibu",
  "value": "#75a9f9"
}, {
  "name": "± Cornflower Blue",
  "value": "#8b51f5"
}, {
  "name": "± Heliotrope",
  "value": "#d757f6"
}, {
  "name": "± Froly",
  "value": "#f06e9c"
}, {
  "name": "± Vivid Tangerine",
  "value": "#ff8a84"
}, {
  "name": "± Hit Pink",
  "value": "#ffa382"
}, {
  "name": "± Macaroni and Cheese",
  "value": "#ffc581"
}, {
  "name": "± Grandis",
  "value": "#ffd783"
}, {
  "name": "± Picasso",
  "value": "#fef8a0"
}, {
  "name": "± Khaki",
  "value": "#e9f29b"
}, {
  "name": "± Feijoa",
  "value": "#aedd94"
}], [{
  "name": "± Anakiwa",
  "value": "#91e4fb"
}, {
  "name": "± Sail",
  "value": "#a8c6fa"
}, {
  "name": "± Perfume",
  "value": "#b38df7"
}, {
  "name": "± Heliotrope",
  "value": "#e692f8"
}, {
  "name": "± Illusion",
  "value": "#f6a2bf"
}, {
  "name": "± Sundown",
  "value": "#ffb4b0"
}, {
  "name": "± Wax Flower",
  "value": "#ffc3ae"
}, {
  "name": "± Caramel",
  "value": "#ffd8ad"
}, {
  "name": "± Navajo White",
  "value": "#ffe3ae"
}, {
  "name": "± Pale Prim",
  "value": "#fefac0"
}, {
  "name": "± Corn Field",
  "value": "#f1f6be"
}, {
  "name": "± Tea Green",
  "value": "#cbe8ba"
}], [{
  "name": "± French Pass",
  "value": "#c9f1fd"
}, {
  "name": "± Hawkes Blue",
  "value": "#d4e3fc"
}, {
  "name": "± Perfume",
  "value": "#dacafb"
}, {
  "name": "± Perfume",
  "value": "#f2c9fb"
}, {
  "name": "± Chantilly",
  "value": "#fad2e0"
}, {
  "name": "± Cosmos",
  "value": "#ffdad8"
}, {
  "name": "± Peach Schnapps",
  "value": "#ffe2d8"
}, {
  "name": "± Derby",
  "value": "#ffecd7"
}, {
  "name": "± Pink Lady",
  "value": "#fff1d7"
}, {
  "name": "± Off Yellow",
  "value": "#fefce0"
}, {
  "name": "± Citrine White",
  "value": "#f7fade"
}, {
  "name": "± Zanah",
  "value": "#dfedd6"
}]];
exports.MoqupsClassicSwathes = MoqupsClassicSwathes;
var MaterialSwatches = [[{
  "name": "Red 50",
  "value": "#ffebee"
}, {
  "name": "Red 100",
  "value": "#ffcdd2"
}, {
  "name": "Red 200",
  "value": "#ef9a9a"
}, {
  "name": "Red 300",
  "value": "#e57373"
}, {
  "name": "Red 400",
  "value": "#ef5350"
}, {
  "name": "Red 500",
  "value": "#f44336"
}, {
  "name": "Red 600",
  "value": "#e53935"
}, {
  "name": "Red 700",
  "value": "#d32f2f"
}, {
  "name": "Red 800",
  "value": "#c62828"
}, {
  "name": "Red 900",
  "value": "#b71c1c"
}], [{
  "name": "Pink 50",
  "value": "#fce4ec"
}, {
  "name": "Pink 100",
  "value": "#f8bbd0"
}, {
  "name": "Pink 200",
  "value": "#f48fb1"
}, {
  "name": "Pink 300",
  "value": "#f06292"
}, {
  "name": "Pink 400",
  "value": "#ec407a"
}, {
  "name": "Pink 500",
  "value": "#e91e63"
}, {
  "name": "Pink 600",
  "value": "#d81b60"
}, {
  "name": "Pink 700",
  "value": "#c2185b"
}, {
  "name": "Pink 800",
  "value": "#ad1457"
}, {
  "name": "Pink 900",
  "value": "#880e4f"
}], [{
  "name": "Purple 50",
  "value": "#f3e5f5"
}, {
  "name": "Purple 100",
  "value": "#e1bee7"
}, {
  "name": "Purple 200",
  "value": "#ce93d8"
}, {
  "name": "Purple 300",
  "value": "#ba68c8"
}, {
  "name": "Purple 400",
  "value": "#ab47bc"
}, {
  "name": "Purple 500",
  "value": "#9c27b0"
}, {
  "name": "Purple 600",
  "value": "#8e24aa"
}, {
  "name": "Purple 700",
  "value": "#7b1fa2"
}, {
  "name": "Purple 800",
  "value": "#6a1b9a"
}, {
  "name": "Purple 900",
  "value": "#4a148c"
}], [{
  "name": "Deep Purple 50",
  "value": "#ede7f6"
}, {
  "name": "Deep Purple 100",
  "value": "#d1c4e9"
}, {
  "name": "Deep Purple 200",
  "value": "#b39ddb"
}, {
  "name": "Deep Purple 300",
  "value": "#9575cd"
}, {
  "name": "Deep Purple 400",
  "value": "#7e57c2"
}, {
  "name": "Deep Purple 500",
  "value": "#673ab7"
}, {
  "name": "Deep Purple 600",
  "value": "#5e35b1"
}, {
  "name": "Deep Purple 700",
  "value": "#512da8"
}, {
  "name": "Deep Purple 800",
  "value": "#4527a0"
}, {
  "name": "Deep Purple 900",
  "value": "#311b92"
}], [{
  "name": "Indigo 50",
  "value": "#e8eaf6"
}, {
  "name": "Indigo 100",
  "value": "#c5cae9"
}, {
  "name": "Indigo 200",
  "value": "#9fa8da"
}, {
  "name": "Indigo 300",
  "value": "#7986cb"
}, {
  "name": "Indigo 400",
  "value": "#5c6bc0"
}, {
  "name": "Indigo 500",
  "value": "#3f51b5"
}, {
  "name": "Indigo 600",
  "value": "#3949ab"
}, {
  "name": "Indigo 700",
  "value": "#303f9f"
}, {
  "name": "Indigo 800",
  "value": "#283593"
}, {
  "name": "Indigo 900",
  "value": "#1a237e"
}], [{
  "name": "Blue 50",
  "value": "#e3f2fd"
}, {
  "name": "Blue 100",
  "value": "#bbdefb"
}, {
  "name": "Blue 200",
  "value": "#90caf9"
}, {
  "name": "Blue 300",
  "value": "#64b5f6"
}, {
  "name": "Blue 400",
  "value": "#42a5f5"
}, {
  "name": "Blue 500",
  "value": "#2196f3"
}, {
  "name": "Blue 600",
  "value": "#1e88e5"
}, {
  "name": "Blue 700",
  "value": "#1976d2"
}, {
  "name": "Blue 800",
  "value": "#1565c0"
}, {
  "name": "Blue 900",
  "value": "#0d47a1"
}], [{
  "name": "Light Blue 50",
  "value": "#e1f5fe"
}, {
  "name": "Light Blue 100",
  "value": "#b3e5fc"
}, {
  "name": "Light Blue 200",
  "value": "#81d4fa"
}, {
  "name": "Light Blue 300",
  "value": "#4fc3f7"
}, {
  "name": "Light Blue 400",
  "value": "#29b6f6"
}, {
  "name": "Light Blue 500",
  "value": "#03a9f4"
}, {
  "name": "Light Blue 600",
  "value": "#039be5"
}, {
  "name": "Light Blue 700",
  "value": "#0288d1"
}, {
  "name": "Light Blue 800",
  "value": "#0277bd"
}, {
  "name": "Light Blue 900",
  "value": "#01579b"
}], [{
  "name": "Cyan 50",
  "value": "#e0f7fa"
}, {
  "name": "Cyan 100",
  "value": "#b2ebf2"
}, {
  "name": "Cyan 200",
  "value": "#80deea"
}, {
  "name": "Cyan 300",
  "value": "#4dd0e1"
}, {
  "name": "Cyan 400",
  "value": "#26c6da"
}, {
  "name": "Cyan 500",
  "value": "#00bcd4"
}, {
  "name": "Cyan 600",
  "value": "#00acc1"
}, {
  "name": "Cyan 700",
  "value": "#0097a7"
}, {
  "name": "Cyan 800",
  "value": "#00838f"
}, {
  "name": "Cyan 900",
  "value": "#006064"
}], [{
  "name": "Teal 50",
  "value": "#e0f2f1"
}, {
  "name": "Teal 100",
  "value": "#b2dfdb"
}, {
  "name": "Teal 200",
  "value": "#80cbc4"
}, {
  "name": "Teal 300",
  "value": "#4db6ac"
}, {
  "name": "Teal 400",
  "value": "#26a69a"
}, {
  "name": "Teal 500",
  "value": "#009688"
}, {
  "name": "Teal 600",
  "value": "#00897b"
}, {
  "name": "Teal 700",
  "value": "#00796b"
}, {
  "name": "Teal 800",
  "value": "#00695c"
}, {
  "name": "Teal 900",
  "value": "#004d40"
}], [{
  "name": "Green 50",
  "value": "#e8f5e9"
}, {
  "name": "Green 100",
  "value": "#c8e6c9"
}, {
  "name": "Green 200",
  "value": "#a5d6a7"
}, {
  "name": "Green 300",
  "value": "#81c784"
}, {
  "name": "Green 400",
  "value": "#66bb6a"
}, {
  "name": "Green 500",
  "value": "#4caf50"
}, {
  "name": "Green 600",
  "value": "#43a047"
}, {
  "name": "Green 700",
  "value": "#388e3c"
}, {
  "name": "Green 800",
  "value": "#2e7d32"
}, {
  "name": "Green 900",
  "value": "#1b5e20"
}], [{
  "name": "Light Green 50",
  "value": "#f1f8e9"
}, {
  "name": "Light Green 100",
  "value": "#dcedc8"
}, {
  "name": "Light Green 200",
  "value": "#c5e1a5"
}, {
  "name": "Light Green 300",
  "value": "#aed581"
}, {
  "name": "Light Green 400",
  "value": "#9ccc65"
}, {
  "name": "Light Green 500",
  "value": "#8bc34a"
}, {
  "name": "Light Green 600",
  "value": "#7cb342"
}, {
  "name": "Light Green 700",
  "value": "#689f38"
}, {
  "name": "Light Green 800",
  "value": "#558b2f"
}, {
  "name": "Light Green 900",
  "value": "#33691e"
}], [{
  "name": "Lime 50",
  "value": "#f9fbe7"
}, {
  "name": "Lime 100",
  "value": "#f0f4c3"
}, {
  "name": "Lime 200",
  "value": "#e6ee9c"
}, {
  "name": "Lime 300",
  "value": "#dce775"
}, {
  "name": "Lime 400",
  "value": "#d4e157"
}, {
  "name": "Lime 500",
  "value": "#cddc39"
}, {
  "name": "Lime 600",
  "value": "#c0ca33"
}, {
  "name": "Lime 700",
  "value": "#afb42b"
}, {
  "name": "Lime 800",
  "value": "#9e9d24"
}, {
  "name": "Lime 900",
  "value": "#827717"
}], [{
  "name": "Yellow 50",
  "value": "#fffde7"
}, {
  "name": "Yellow 100",
  "value": "#fff9c4"
}, {
  "name": "Yellow 200",
  "value": "#fff59d"
}, {
  "name": "Yellow 300",
  "value": "#fff176"
}, {
  "name": "Yellow 400",
  "value": "#ffee58"
}, {
  "name": "Yellow 500",
  "value": "#ffeb3b"
}, {
  "name": "Yellow 600",
  "value": "#fdd835"
}, {
  "name": "Yellow 700",
  "value": "#fbc02d"
}, {
  "name": "Yellow 800",
  "value": "#f9a825"
}, {
  "name": "Yellow 900",
  "value": "#f57f17"
}], [{
  "name": "Amber 50",
  "value": "#fff8e1"
}, {
  "name": "Amber 100",
  "value": "#ffecb3"
}, {
  "name": "Amber 200",
  "value": "#ffe082"
}, {
  "name": "Amber 300",
  "value": "#ffd54f"
}, {
  "name": "Amber 400",
  "value": "#ffca28"
}, {
  "name": "Amber 500",
  "value": "#ffc107"
}, {
  "name": "Amber 600",
  "value": "#ffb300"
}, {
  "name": "Amber 700",
  "value": "#ffa000"
}, {
  "name": "Amber 800",
  "value": "#ff8f00"
}, {
  "name": "Amber 900",
  "value": "#ff6f00"
}], [{
  "name": "Orange 50",
  "value": "#fff3e0"
}, {
  "name": "Orange 100",
  "value": "#ffe0b2"
}, {
  "name": "Orange 200",
  "value": "#ffcc80"
}, {
  "name": "Orange 300",
  "value": "#ffb74d"
}, {
  "name": "Orange 400",
  "value": "#ffa726"
}, {
  "name": "Orange 500",
  "value": "#ff9800"
}, {
  "name": "Orange 600",
  "value": "#fb8c00"
}, {
  "name": "Orange 700",
  "value": "#f57c00"
}, {
  "name": "Orange 800",
  "value": "#ef6c00"
}, {
  "name": "Orange 900",
  "value": "#e65100"
}], [{
  "name": "Deep Orange 50",
  "value": "#fbe9e7"
}, {
  "name": "Deep Orange 100",
  "value": "#ffccbc"
}, {
  "name": "Deep Orange 200",
  "value": "#ffab91"
}, {
  "name": "Deep Orange 300",
  "value": "#ff8a65"
}, {
  "name": "Deep Orange 400",
  "value": "#ff7043"
}, {
  "name": "Deep Orange 500",
  "value": "#ff5722"
}, {
  "name": "Deep Orange 600",
  "value": "#f4511e"
}, {
  "name": "Deep Orange 700",
  "value": "#e64a19"
}, {
  "name": "Deep Orange 800",
  "value": "#d84315"
}, {
  "name": "Deep Orange 900",
  "value": "#bf360c"
}], [{
  "name": "Brown 50",
  "value": "#efebe9"
}, {
  "name": "Brown 100",
  "value": "#d7ccc8"
}, {
  "name": "Brown 200",
  "value": "#bcaaa4"
}, {
  "name": "Brown 300",
  "value": "#a1887f"
}, {
  "name": "Brown 400",
  "value": "#8d6e63"
}, {
  "name": "Brown 500",
  "value": "#795548"
}, {
  "name": "Brown 600",
  "value": "#6d4c41"
}, {
  "name": "Brown 700",
  "value": "#5d4037"
}, {
  "name": "Brown 800",
  "value": "#4e342e"
}, {
  "name": "Brown 900",
  "value": "#3e2723"
}], [{
  "name": "Grey 50",
  "value": "#fafafa"
}, {
  "name": "Grey 100",
  "value": "#f5f5f5"
}, {
  "name": "Grey 200",
  "value": "#eeeeee"
}, {
  "name": "Grey 300",
  "value": "#e0e0e0"
}, {
  "name": "Grey 400",
  "value": "#bdbdbd"
}, {
  "name": "Grey 500",
  "value": "#9e9e9e"
}, {
  "name": "Grey 600",
  "value": "#757575"
}, {
  "name": "Grey 700",
  "value": "#616161"
}, {
  "name": "Grey 800",
  "value": "#424242"
}, {
  "name": "Grey 900",
  "value": "#212121"
}], [{
  "name": "Blue Grey 50",
  "value": "#eceff1"
}, {
  "name": "Blue Grey 100",
  "value": "#cfd8dc"
}, {
  "name": "Blue Grey 200",
  "value": "#b0bec5"
}, {
  "name": "Blue Grey 300",
  "value": "#90a4ae"
}, {
  "name": "Blue Grey 400",
  "value": "#78909c"
}, {
  "name": "Blue Grey 500",
  "value": "#607d8b"
}, {
  "name": "Blue Grey 600",
  "value": "#546e7a"
}, {
  "name": "Blue Grey 700",
  "value": "#455a64"
}, {
  "name": "Blue Grey 800",
  "value": "#37474f"
}, {
  "name": "Blue Grey 900",
  "value": "#263238"
}], [{
  "name": "White",
  "value": "#ffffff"
}, {
  "name": "Black",
  "value": "#000000"
}]];
exports.MaterialSwatches = MaterialSwatches;
var BootstrapSwatches = [[{
  "name": "Gray Light",
  "value": "#777777"
}, {
  "name": "Base",
  "value": "#000000"
}, {
  "name": "Highlight Blue",
  "value": "#0055cc"
}, {
  "name": "Dark Blue",
  "value": "#005580"
}, {
  "name": "Success Text Green",
  "value": "#468847"
}, {
  "name": "Orange",
  "value": "#f89406"
}, {
  "name": "Red",
  "value": "#9d261d"
}, {
  "name": "Purple",
  "value": "#7a43b6"
}], [{
  "name": "Border Gray",
  "value": "#cccccc"
}, {
  "name": "Gray Darker",
  "value": "#222222"
}, {
  "name": "Primary Blue",
  "value": "#337ab7"
}, {
  "name": "Info Blue",
  "value": "#2f96b4"
}, {
  "name": "Green",
  "value": "#46a546"
}, {
  "name": "Light Orange",
  "value": "#fbb450"
}, {
  "name": "Danger Button Red",
  "value": "#bd362f"
}, {
  "name": "Pink",
  "value": "#c3325f"
}], [{
  "name": "Gray Lighter",
  "value": "#eeeeee"
}, {
  "name": "Gray Dark",
  "value": "#333333"
}, {
  "name": "Link Blue",
  "value": "#0088cc"
}, {
  "name": "Info Light Blue",
  "value": "#5bc0de"
}, {
  "name": "Success Button Green",
  "value": "#62c462"
}, {
  "name": "Yellow",
  "value": "#ffc40d"
}, {
  "name": "Error Text Red",
  "value": "#b94a48"
}, {
  "name": "Danger Highlight Red",
  "value": "#ee5f5b"
}], [{
  "name": "White",
  "value": "#ffffff"
}, {
  "name": "Gray",
  "value": "#555555"
}, {
  "name": "Accent Blue",
  "value": "#049cdb"
}, {
  "name": "Info Lighter Blue",
  "value": "#d9edf7"
}, {
  "name": "Success Background Green",
  "value": "#dff0d8"
}, {
  "name": "Warning Background Brown",
  "value": "#f3edd2"
}, {
  "name": "Warning Text Brown",
  "value": "#c09853"
}, {
  "name": "Danger Background Red",
  "value": "#f2dede"
}]];
exports.BootstrapSwatches = BootstrapSwatches;
var iOsSwatches = [[{
  "name": "Red",
  "value": "#ff3b30"
}, {
  "name": "Orange",
  "value": "#ff9500"
}, {
  "name": "Yellow",
  "value": "#ffcc00"
}, {
  "name": "Green",
  "value": "#4cd964"
}, {
  "name": "Teal Blue",
  "value": "#5ac8fa"
}, {
  "name": "Blue",
  "value": "#007aff"
}, {
  "name": "Purple",
  "value": "#5856d6"
}, {
  "name": "Pink",
  "value": "#ff2d55"
}], [{
  "name": "White",
  "value": "#ffffff"
}, {
  "name": "Custom Gray",
  "value": "#efeff4"
}, {
  "name": "Light Gray",
  "value": "#e5e5ea"
}, {
  "name": "Light Gray 2",
  "value": "#d1d1d6"
}, {
  "name": "Mid Gray",
  "value": "#c7c7cc"
}, {
  "name": "Gray",
  "value": "#8e8e93"
}, {
  "name": "Black",
  "value": "#000000"
}]];
exports.iOsSwatches = iOsSwatches;
_ACore["default"].install('swatchestable', SwatchesTable);
var _default = SwatchesTable;
exports["default"] = _default;

/***/ }),

/***/ 4337:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.publicCreators = exports["default"] = void 0;
var _AutoCompleteInput = _interopRequireDefault(__webpack_require__(54845));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BScroller = _interopRequireDefault(__webpack_require__(1446));
var _ButtonArray = _interopRequireDefault(__webpack_require__(34169));
var _CalendarInput = _interopRequireWildcard(__webpack_require__(95972));
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
var _CheckBox = _interopRequireDefault(__webpack_require__(11946));
var _ChromeCalendar = _interopRequireDefault(__webpack_require__(51631));
var _CircleSectionLabel = _interopRequireDefault(__webpack_require__(84703));
var _Scroller = __webpack_require__(87780);
var _ContextMenu = _interopRequireDefault(__webpack_require__(24733));
var _Menu = __webpack_require__(26155);
var _DateInput = _interopRequireDefault(__webpack_require__(47156));
var _DraggableHStack = _interopRequireDefault(__webpack_require__(9294));
var _DraggableVStack = _interopRequireDefault(__webpack_require__(73816));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _DropPanel = _interopRequireDefault(__webpack_require__(70615));
var _DropPanelStack = _interopRequireDefault(__webpack_require__(85628));
var _EditableText = _interopRequireDefault(__webpack_require__(33912));
var _EmojiPicker = _interopRequireDefault(__webpack_require__(24169));
var _Sprite = _interopRequireDefault(__webpack_require__(29464));
var _ExpTree = _interopRequireWildcard(__webpack_require__(87326));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _FlexiconInput = _interopRequireDefault(__webpack_require__(23477));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _Frame = _interopRequireDefault(__webpack_require__(63012));
var _FrameView = _interopRequireDefault(__webpack_require__(95002));
var _TabFrame = _interopRequireDefault(__webpack_require__(13089));
var _TabView = _interopRequireDefault(__webpack_require__(3475));
var _SinglePage = _interopRequireDefault(__webpack_require__(52404));
var _HexaSectionLabel = _interopRequireDefault(__webpack_require__(77057));
var _VRuler = _interopRequireDefault(__webpack_require__(46523));
var _HRuler = _interopRequireDefault(__webpack_require__(26058));
var _IconSprite = _interopRequireDefault(__webpack_require__(78120));
var _LinearColorBar = _interopRequireDefault(__webpack_require__(28848));
var _MediaInput = _interopRequireDefault(__webpack_require__(42870));
var _MessageInput = _interopRequireWildcard(__webpack_require__(42049));
var _NumberInput = _interopRequireDefault(__webpack_require__(51394));
var _NumberSpanInput = _interopRequireDefault(__webpack_require__(94471));
var _OnsScreenWindow = _interopRequireDefault(__webpack_require__(28217));
var _PageSelector = _interopRequireDefault(__webpack_require__(49826));
var _PreInput = _interopRequireDefault(__webpack_require__(76606));
var _ProgressBar = _interopRequireDefault(__webpack_require__(49087));
var _QuickListButton = _interopRequireDefault(__webpack_require__(3079));
var _FollowerToggler = _interopRequireDefault(__webpack_require__(49049));
var _SelectList = _interopRequireDefault(__webpack_require__(884));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _QuickPath = _interopRequireDefault(__webpack_require__(97722));
var _RadioButton = _interopRequireDefault(__webpack_require__(30348));
var _Radio = _interopRequireDefault(__webpack_require__(78994));
var _RemoteSvg = _interopRequireDefault(__webpack_require__(44716));
var _ResizeBox = _interopRequireDefault(__webpack_require__(32615));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _SelectBox = _interopRequireDefault(__webpack_require__(28596));
var _SelectBoxItem = _interopRequireDefault(__webpack_require__(27233));
var _SelectTable = _interopRequireDefault(__webpack_require__(7073));
var _SelectTable2 = _interopRequireDefault(__webpack_require__(49520));
var _SpanInput = _interopRequireDefault(__webpack_require__(96229));
var _StaticTabbar = _interopRequireDefault(__webpack_require__(41322));
var _Switch = _interopRequireDefault(__webpack_require__(4587));
var _CheckboxButton = _interopRequireDefault(__webpack_require__(93475));
var _TableScroller = _interopRequireDefault(__webpack_require__(151));
var _TableVScroller = _interopRequireDefault(__webpack_require__(98775));
var _TextArea = _interopRequireDefault(__webpack_require__(52072));
var _TextClipboard = _interopRequireDefault(__webpack_require__(39775));
var _TimeInput = _interopRequireDefault(__webpack_require__(17019));
var _TimePicker = _interopRequireDefault(__webpack_require__(24271));
var _Tooltip = _interopRequireDefault(__webpack_require__(54946));
var _TreeList = _interopRequireDefault(__webpack_require__(14927));
var _TreeListItem = _interopRequireDefault(__webpack_require__(72229));
var _SelectTreeMenu = _interopRequireDefault(__webpack_require__(75823));
var _WidthHeightSizer = _interopRequireDefault(__webpack_require__(13675));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _TrackBar = _interopRequireDefault(__webpack_require__(98912));
var _TrackBarInput = _interopRequireDefault(__webpack_require__(49748));
var _SelectMenu = _interopRequireDefault(__webpack_require__(41735));
var _ButtonRange = _interopRequireDefault(__webpack_require__(33601));
var _DropZone = _interopRequireDefault(__webpack_require__(31790));
var _RadioInput = _interopRequireDefault(__webpack_require__(11655));
var _OnScreenWidget = _interopRequireDefault(__webpack_require__(95878));
var _SelectListBox = _interopRequireDefault(__webpack_require__(47818));
var _SelectTreeBox = _interopRequireDefault(__webpack_require__(63443));
var _RibbonSplitButton = _interopRequireDefault(__webpack_require__(285));
var _RibbonButton = _interopRequireDefault(__webpack_require__(93856));
var _TimeSelectInput = _interopRequireDefault(__webpack_require__(21348));
var _Snackbar = _interopRequireDefault(__webpack_require__(96206));
var _MultiSelectMenu = _interopRequireDefault(__webpack_require__(63176));
var _CountdownClock = _interopRequireDefault(__webpack_require__(99578));
var _Toast = _interopRequireDefault(__webpack_require__(68105));
var _Icons = __webpack_require__(39285);
var _EmojiPickerTooltip = _interopRequireDefault(__webpack_require__(64911));
var _PageIndicator = _interopRequireDefault(__webpack_require__(18549));
var _EmojiCounter = _interopRequireDefault(__webpack_require__(7010));
var _EmojiCounterList = _interopRequireDefault(__webpack_require__(7449));
var _RotatedText = _interopRequireDefault(__webpack_require__(61862));
var _VerticalTreeDiagram = _interopRequireWildcard(__webpack_require__(73606));
var _TokenField = _interopRequireDefault(__webpack_require__(89951));
var _DateTimeInput = _interopRequireDefault(__webpack_require__(37800));
var _ChromeTimePicker = _interopRequireDefault(__webpack_require__(11564));
var _DVExpTree = _interopRequireDefault(__webpack_require__(18123));
var _CheckListItem = _interopRequireDefault(__webpack_require__(27129));
var _CheckListBox = __webpack_require__(62896);
var _MultiCheckMenu = _interopRequireDefault(__webpack_require__(59346));
var _ChromeTime24Picker = _interopRequireDefault(__webpack_require__(2273));
var _Time24Input = _interopRequireDefault(__webpack_require__(46255));
var _TimeRange24Input = _interopRequireDefault(__webpack_require__(66499));
var _CheckTreeItem = _interopRequireDefault(__webpack_require__(26638));
var _CheckTreeBox = _interopRequireDefault(__webpack_require__(93794));
var _MultiCheckTreeMenu = _interopRequireDefault(__webpack_require__(74934));
var _FileInputBox = _interopRequireDefault(__webpack_require__(28794));
var _CountdownText = _interopRequireDefault(__webpack_require__(36266));
var _YesNoQuestionDialog = _interopRequireDefault(__webpack_require__(57318));
var _LoadingCubeModal = _interopRequireDefault(__webpack_require__(95521));
var _SelectTreeLeafBox = _interopRequireDefault(__webpack_require__(79442));
var _SelectTreeLeafMenu = _interopRequireDefault(__webpack_require__(66138));
var _MultiCheckTreeLeafBox = _interopRequireDefault(__webpack_require__(77361));
var _MultiCheckTreeLeafMenu = _interopRequireDefault(__webpack_require__(8306));
var _FileListInput = _interopRequireDefault(__webpack_require__(13146));
var _DateInYearPicker = _interopRequireDefault(__webpack_require__(96604));
var _DateInYearInput = _interopRequireDefault(__webpack_require__(63863));
var _CheckTreeLeafOnlyBox = _interopRequireDefault(__webpack_require__(13163));
var _FileListItem = _interopRequireDefault(__webpack_require__(62355));
var _DualSelectBox = _interopRequireDefault(__webpack_require__(51098));
var _DualSelectMenu = _interopRequireDefault(__webpack_require__(34219));
var _TOCItem = _interopRequireDefault(__webpack_require__(64836));
var _TOCList = _interopRequireDefault(__webpack_require__(89860));
var _CKPlaceholder = _interopRequireDefault(__webpack_require__(24471));
var _CKInlineShortText = _interopRequireDefault(__webpack_require__(43501));
var _VerticalTimeline = _interopRequireDefault(__webpack_require__(8960));
var _LocationView = _interopRequireDefault(__webpack_require__(80289));
var _PlaceSearchAutoCompleteInput = _interopRequireDefault(__webpack_require__(85602));
var _LocationPicker = _interopRequireDefault(__webpack_require__(76693));
var _LocationInput = _interopRequireDefault(__webpack_require__(17096));
var _MKNavigator = _interopRequireDefault(__webpack_require__(29342));
var _ProcessLBar = _interopRequireDefault(__webpack_require__(39368));
var _KVCommentItem = _interopRequireDefault(__webpack_require__(49067));
var _DynamicTable = _interopRequireDefault(__webpack_require__(76688));
var _WindowBox = _interopRequireDefault(__webpack_require__(24405));
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _ObjectMergeTool = _interopRequireDefault(__webpack_require__(10641));
var _TokenizeHyperInput = _interopRequireDefault(__webpack_require__(85070));
var _SelectListBox2 = _interopRequireDefault(__webpack_require__(34174));
var _PathMenu = _interopRequireDefault(__webpack_require__(84943));
var _MultiCheckTreeLeafMenu2 = _interopRequireDefault(__webpack_require__(7498));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _MCheckTreeLeafBox = _interopRequireDefault(__webpack_require__(88718));
var _MSelectTreeLeafBox = _interopRequireDefault(__webpack_require__(73484));
var _SelectTreeLeafMenu2 = _interopRequireDefault(__webpack_require__(86258));
var _MDualSelectBox = _interopRequireDefault(__webpack_require__(72710));
var _DualSelectMenu2 = _interopRequireDefault(__webpack_require__(21606));
var _TreeTable = _interopRequireDefault(__webpack_require__(29950));
var _LinearColorTinyBar = _interopRequireDefault(__webpack_require__(96026));
var _Finder = _interopRequireDefault(__webpack_require__(14591));
var _TreeChart = _interopRequireDefault(__webpack_require__(512));
var _CopyableIconTooltip = _interopRequireDefault(__webpack_require__(76435));
var _DateNLevelInput = _interopRequireDefault(__webpack_require__(45627));
var _TableOfTextInput = _interopRequireDefault(__webpack_require__(98432));
var _MSelectMenu = _interopRequireDefault(__webpack_require__(70448));
var _MSelectTreeMenu = _interopRequireDefault(__webpack_require__(3770));
var _MHeaderBar = _interopRequireDefault(__webpack_require__(23277));
var _MExplore = __webpack_require__(82988);
var _SolidColorPicker = _interopRequireDefault(__webpack_require__(28380));
var _SwatchesTable = __webpack_require__(83225);
var _ColorPickerButton = _interopRequireDefault(__webpack_require__(21212));
var _SelectColorSchemeMenu = _interopRequireDefault(__webpack_require__(78061));
var _ProgressCircle = _interopRequireDefault(__webpack_require__(84743));
var _ExpressionInput = _interopRequireDefault(__webpack_require__(37496));
var _IdentTextInput = _interopRequireDefault(__webpack_require__(62501));
var _EfficientTable = _interopRequireDefault(__webpack_require__(13039));
var _CompactDataGridEditor = _interopRequireDefault(__webpack_require__(8535));
var _SelectRibbonMenu = _interopRequireDefault(__webpack_require__(68302));
var _PathView = _interopRequireDefault(__webpack_require__(32555));
var _FontInput = _interopRequireWildcard(__webpack_require__(81285));
var _CollapsibleTreeNavigator = _interopRequireDefault(__webpack_require__(48533));
var _NotificationPanel = _interopRequireWildcard(__webpack_require__(8881));
var _PickingList = _interopRequireDefault(__webpack_require__(11027));
var _ListCompareTool = _interopRequireDefault(__webpack_require__(79517));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var publicCreators = [_Icons.MdiStoreMarkerOutline, _AutoCompleteInput["default"], _BoardTable["default"], _Board["default"], _BScroller["default"], _ButtonArray["default"], _ButtonRange["default"], _CalendarInput["default"], _CalendarInput.OldCalendarInput, _CheckBoxInput["default"], _CheckBox["default"], _CheckboxButton["default"], _CheckListItem["default"], _CheckListBox.CheckListBox, _CheckTreeLeafOnlyBox["default"], _ChromeCalendar["default"], _ChromeTimePicker["default"], _ChromeTime24Picker["default"], _CircleSectionLabel["default"], _CountdownClock["default"], _CountdownText["default"], _CollapsibleTreeNavigator["default"], _DateInYearPicker["default"], _DateInYearInput["default"], _DateTimeInput["default"], _DropZone["default"], _ExpressionInput["default"], _IdentTextInput["default"], _EmojiPickerTooltip["default"], _FileInputBox["default"], _FileListItem["default"], _FileListInput["default"], _Finder["default"], _FontInput.FontFamilySelectList, _FontInput["default"], _Scroller.Scrollbar, _Scroller.VScrollbar, _Scroller.HScrollbar, _Scroller.VScroller, _Scroller.HScroller, _ContextMenu["default"], _Menu.HMenu, _Menu.VMenuItem, _Menu.VMenu, _Menu.Dropright, _Menu.VMenuLine, _Menu.Dropdown, _Menu.HMenuItem, _Menu.VMenu, _Menu.VRootMenu, _Menu.MenuButton, _DateInput["default"], _DateNLevelInput["default"], _Hanger["default"], _DraggableHStack["default"], _DraggableVStack["default"], _DropPanel["default"], _DropPanelStack["default"], _EditableText["default"], _EmojiPicker["default"], _EmojiCounter["default"], _EmojiCounterList["default"], _Sprite["default"], _ExpTree.ExpNode, _ExpTree["default"], _ExpTree.ExpGroup, _DVExpTree["default"], _FlexiconButton["default"], _FlexiconInput["default"], _Follower["default"], _FollowerToggler["default"], _Frame["default"], _FrameView["default"], _TabFrame["default"], _TabView["default"], _SinglePage["default"], _HexaSectionLabel["default"], _VRuler["default"], _HRuler["default"], _IconSprite["default"], _LinearColorBar["default"], _LinearColorTinyBar["default"], _MediaInput["default"], _MessageInput["default"], _MessageInput.MessageQuote, _Modal["default"], _LoadingCubeModal["default"], _NumberInput["default"], _NumberSpanInput["default"], _OnsScreenWindow["default"], _OnScreenWidget["default"], _PageIndicator["default"], _PageSelector["default"], _PreInput["default"], _ProgressBar["default"], _ProgressCircle["default"], _QuickListButton["default"], _QuickMenu["default"], _QuickPath["default"], _PathMenu["default"], _PathView["default"], _Radio["default"], _RadioButton["default"], _RadioInput["default"], _RibbonSplitButton["default"], _RibbonButton["default"], _SelectRibbonMenu["default"], _RotatedText["default"], _SelectList["default"], _RemoteSvg["default"], _ResizeBox["default"], _Searcher["default"], _SelectListBox["default"], _SelectTreeBox["default"], _SelectMenu["default"], _SelectBox["default"], _MultiSelectMenu["default"], _MultiCheckTreeLeafBox["default"], _BrowserDetector["default"].isMobile ? _MultiCheckTreeLeafMenu2["default"] : _MultiCheckTreeLeafMenu["default"], _SelectBoxItem["default"], _DualSelectBox["default"], _BrowserDetector["default"].isMobile ? _DualSelectMenu2["default"] : _DualSelectMenu["default"], _SelectTable["default"], _SelectTable2["default"], _SelectTreeMenu["default"], _SelectTreeLeafBox["default"], /*BrowserDetector.isMobile ? SelectTreeLeafMenuV2 :*/_SelectTreeLeafMenu["default"], _SpanInput["default"], _Snackbar["default"], _StaticTabbar["default"], _Switch["default"], _TableScroller["default"], _TableVScroller["default"], _TreeTable["default"], _TextArea["default"], _TextClipboard["default"], _TimeInput["default"], _Time24Input["default"], _TimeRange24Input["default"], _TimeSelectInput["default"], _TimePicker["default"], _DateTimeInput["default"], _Tooltip["default"], _CopyableIconTooltip["default"], _Toast["default"], _TreeList["default"], _TreeListItem["default"], _TokenField["default"], _WidthHeightSizer["default"], _TrackBar["default"], _TrackBarInput["default"], _Icons.SpinnerIco, _Icons.ProcessOutlineIcon, _Icons.ProcedureOutlineIcon, _Icons.ImportantOutlineIcon, _Icons.EmojiMutedIcon, _VerticalTreeDiagram.VerticalTreeDiagramNode, _VerticalTreeDiagram["default"], _MultiCheckMenu["default"], _CheckTreeItem["default"], _CheckTreeBox["default"], _MultiCheckTreeMenu["default"], _MessageDialog["default"], _YesNoQuestionDialog["default"], _TOCItem["default"], _TOCList["default"], _CKPlaceholder["default"], _CKInlineShortText["default"], _VerticalTimeline["default"], _WindowBox["default"], _LocationView["default"], _LocationPicker["default"], _LocationInput["default"], _PlaceSearchAutoCompleteInput["default"], _MKNavigator["default"], _ProcessLBar["default"], _KVCommentItem["default"], _DynamicTable["default"], _EfficientTable["default"], _ObjectMergeTool["default"], _TokenizeHyperInput["default"], _SelectListBox2["default"],
// MCheckTreeBox,
_MCheckTreeLeafBox["default"], _MSelectTreeLeafBox["default"], _MDualSelectBox["default"], _PickingList["default"], _TreeChart["default"], _TableOfTextInput["default"], _CompactDataGridEditor["default"], _MHeaderBar["default"], _MExplore.MExploreSectionBreak, _MExplore.MExploreItemBlock, _MExplore.MExploreGroup, _MExplore.MSpringboardMenu, _SolidColorPicker["default"], _ColorPickerButton["default"], _SwatchesTable.ColorCell, _SelectColorSchemeMenu["default"], _NotificationPanel.MNPNotificationVirtualDropdown, _NotificationPanel.NPDropdownButton, _NotificationPanel["default"], _NotificationPanel.NPSection, _NotificationPanel.NPItem, _NotificationPanel.NPList, _ListCompareTool["default"]];

/***
 *
 * @param {Dom} core
 */
exports.publicCreators = publicCreators;
function install(core) {
  core.install(publicCreators);
  core.install('checkboxbutton', _CheckBoxInput["default"]);
  core.install('selectbox', _MultiSelectMenu["default"]);
  if (_BrowserDetector["default"].isMobile) {
    core.install('selectmenu', _MSelectMenu["default"]);
    core.install('mselectmenu', _MSelectMenu["default"]);
    // core.install('selecttreemenu', MSelectTreeMenu)
  }
  // core.install('mselectmenu', SelectMenu2);
  core.install('mselecttreemenu', _SelectTreeMenu["default"]);
  core.install('MSelectTreeLeafMenu'.toLowerCase(), _SelectTreeLeafMenu["default"]);
  core.install('MMultiCheckTreeMenu'.toLowerCase(), _MultiCheckTreeMenu["default"]);
  core.install('MMultiCheckTreeLeafMenu'.toLowerCase(), _MultiCheckTreeLeafMenu["default"]);
  core.install('mknav', _MKNavigator["default"]);
}
var _default = install;
exports["default"] = _default;

/***/ }),

/***/ 45069:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.DSBModeNormal = DSBModeNormal;
exports.DSBModeSearch = DSBModeSearch;
var _ACore = __webpack_require__(34093);
var _utils = __webpack_require__(84512);
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function DSBModeNormal(elt, items) {
  var _this = this;
  this.items = items;
  this.value = [undefined, undefined];
  this.elt = elt;
  this.$lists = this.elt.$lists;
  this.$leftItems = items.map(function (item) {
    return _this._makeLeftItem(item);
  });
  this.$leftItemDict = this.$leftItems.reduce(function (ac, cr) {
    ac[(0, _utils.keyStringOf)(cr.itemData.value)] = cr;
    return ac;
  }, {});
  this.$rightItemDict = {};
  this.$rightItems = [];
  this.rightListDict = {};
  if (items.length > 0) {
    this.viewRight(items[0].value);
  }
  this.$selectedLeft = null;
  this.$selectedRight = null;
}
DSBModeNormal.prototype._makeLeftItem = function (item) {
  var self = this;
  var itemElt = (0, _ACore._)({
    "class": 'absol-selectlist-item',
    attr: {
      'data-key': (0, _utils.keyStringOf)(item.value)
    },
    child: {
      tag: 'span',
      "class": 'absol-selectlist-item-text',
      child: {
        text: item.text
      }
    },
    on: {
      click: function click() {
        self.selectLeft(item.value);
        self.viewToSelected();
        self.elt.notifyChange();
      }
    }
  });
  itemElt.itemData = item;
  return itemElt;
};
DSBModeNormal.prototype._makeRightItem = function (leftItem, item) {
  var self = this;
  var itemElt = (0, _ACore._)({
    "class": 'absol-selectlist-item',
    attr: {
      'data-key': (0, _utils.keyStringOf)(item.value)
    },
    child: {
      tag: 'span',
      "class": 'absol-selectlist-item-text',
      child: {
        text: item.text
      }
    },
    on: {
      click: function click() {
        self.selectLeft(leftItem.value);
        self.selectRight(item.value);
        self.elt.notifyChange();
      }
    }
  });
  itemElt.itemData = item;
  return itemElt;
};
DSBModeNormal.prototype.selectLeft = function (leftValue) {
  var itemElt = this.$leftItemDict[(0, _utils.keyStringOf)(leftValue)];
  if (!itemElt) return false;
  if (this.$selectedLeft === itemElt) return true;
  if (this.$selectedLeft) {
    this.$selectedLeft.removeClass('as-selected');
    this.$selectedLeft = null;
  }
  itemElt.addClass('as-selected');
  this.$selectedLeft = itemElt;
  this.value[0] = leftValue;
  this.viewRight(leftValue);
  var ok = this.selectRight(this.value[1]);
  var sItems;
  if (!ok) {
    sItems = itemElt.itemData.items;
    if (sItems && sItems.length > 0) this.selectRight(sItems[0].value);
  }
  return true;
};
DSBModeNormal.prototype.viewRight = function (leftValue) {
  var _this2 = this;
  var key = (0, _utils.keyStringOf)(leftValue);
  var holder = this.rightListDict[key];
  var items;
  var leftItem;
  if (!holder) {
    leftItem = this.$leftItemDict[key] && this.$leftItemDict[key].itemData;
    items = leftItem && leftItem.items;
    if (items) {
      holder = {};
      holder.list = items.map(function (sItem) {
        return _this2._makeRightItem(leftItem, sItem);
      });
      holder.dict = holder.list.reduce(function (ac, cr) {
        ac[(0, _utils.keyStringOf)(cr.itemData.value)] = cr;
        return ac;
      }, {});
      this.rightListDict[key] = holder;
    }
  }
  if (holder) {
    if (this.$rightItems !== holder.list) {
      this.$rightItems = holder.list;
      this.$rightItemDict = holder.dict;
      this.$lists[1].clearChild().addChild(this.$rightItems);
    }
  } else {
    this.$lists[1].clearChild();
    this.$rightItems = null;
    this.$rightItemDict = {};
  }
};
DSBModeNormal.prototype.selectRight = function (value) {
  var itemElt = this.$rightItemDict[(0, _utils.keyStringOf)(value)];
  if (!itemElt) return false;
  if (this.$selectedRight === itemElt) return true;
  if (this.$selectedRight) {
    this.$selectedRight.removeClass('as-selected');
    this.$selectedRight = null;
  }
  itemElt.addClass('as-selected');
  this.$selectedRight = itemElt;
  this.value[1] = value;
  return true;
};
DSBModeNormal.prototype.onStart = function () {
  this.$lists[0].clearChild().addChild(this.$leftItems);
  this.$lists[1].clearChild().addChild(this.$rightItems);
  this.viewToSelected();
};
DSBModeNormal.prototype.onStop = _noop["default"];
DSBModeNormal.prototype.setValue = function (value, strictValue) {
  if (!(value instanceof Array)) {
    value = [undefined, undefined];
  }
  while (value.length < 2) {
    value.push(undefined);
  }
  while (value.length > 2) {
    value.pop();
  }
  var leftOK = this.selectLeft(value[0]);
  if (!leftOK && strictValue) {
    if (this.items.length > 0) {
      leftOK = this.selectLeft(this.items[0].value);
    }
  }
  if (leftOK) this.viewRight(this.value[0]);
  var rightOK = this.selectRight(value[1]);
  if (!rightOK && strictValue) {
    if (this.$selectedLeft && this.$selectedLeft.itemData.items && this.$selectedLeft.itemData.items.length > 0) {
      rightOK = this.selectRight(this.$selectedLeft.itemData.items[0].value);
    }
  }
  this.viewToSelected();
};
DSBModeNormal.prototype.getValue = function (strictValue) {
  var value = this.value.slice();
  if (!strictValue) return value;
  if (!this.$leftItemDict[(0, _utils.keyStringOf)(value[0])]) {
    value[0] = this.items[0] && this.items[0].value;
  }
  var rightHolder = this.rightListDict[(0, _utils.keyStringOf)(value[0])];
  if (rightHolder) {
    if (!rightHolder.dict[(0, _utils.keyStringOf)(value[1])]) {
      if (rightHolder.list.length > 0) {
        value[1] = rightHolder.list[0].itemData.value;
      }
    }
  }
  return value;
};
DSBModeNormal.prototype.getSelectedItem = function () {
  var value = this.value.slice();
  var item = [null, null];
  if (this.$leftItemDict[(0, _utils.keyStringOf)(value[0])]) {
    item[0] = this.$leftItemDict[(0, _utils.keyStringOf)(value[0])].itemData;
  }
  var rightHolder = this.rightListDict[(0, _utils.keyStringOf)(value[0])];
  if (rightHolder) {
    if (rightHolder.dict[(0, _utils.keyStringOf)(value[1])]) {
      item[1] = rightHolder.dict[(0, _utils.keyStringOf)(value[1])].itemData;
    }
  }
  return item;
};
DSBModeNormal.prototype.viewToSelected = function () {
  var _this3 = this;
  setTimeout(function () {
    if (_this3.$selectedLeft) {
      (0, _utils.vScrollIntoView)(_this3.$selectedLeft);
    }
    if (_this3.$selectedRight) {
      (0, _utils.vScrollIntoView)(_this3.$selectedRight);
    }
  }, 50);
};

/***
 * @extends DSBModeNormal
 * @param elt
 * @param items
 * @constructor
 */
function DSBModeSearch(elt, items) {
  DSBModeNormal.apply(this, arguments);
}
_OOP["default"].mixClass(DSBModeSearch, DSBModeNormal);
delete DSBModeSearch.prototype.getValue;
delete DSBModeSearch.prototype.setValue;
DSBModeSearch.prototype.onStart = function () {
  DSBModeNormal.prototype.onStart.call(this);
  this.$lists[0].scrollTop = 0;
  this.$lists[1].scrollTop = 0;
  if (this.$selectedLeft) {
    this.$selectedLeft.removeClass('as-selected');
    this.$selectedLeft = null;
  }
  if (this.$selectedRight) {
    this.$selectedRight.removeClass('as-selected');
    this.$selectedRight = null;
  }
};
DSBModeSearch.prototype.updateSelectedFromRef = function () {
  var normalMode = this.elt.modes.normal;
  if (normalMode.$selectedLeft) {
    this.selectLeft(normalMode.$selectedLeft.itemData.value, true);
  }
  if (normalMode.$selectedRight) {
    this.selectRight(normalMode.$selectedRight.itemData.value, true);
  }
};
DSBModeSearch.prototype.selectLeft = function (leftValue, viewOnly) {
  if (!viewOnly) this.elt.modes.normal.selectLeft(leftValue);
  var itemElt = this.$leftItemDict[(0, _utils.keyStringOf)(leftValue)];
  if (this.$selectedLeft === itemElt) return true;
  if (this.$selectedLeft) {
    this.$selectedLeft.removeClass('as-selected');
    this.$selectedLeft = null;
  }
  if (!itemElt) return false;
  itemElt.addClass('as-selected');
  this.$selectedLeft = itemElt;
  this.viewRight(leftValue);
  var sItems = itemElt.itemData.items;
  if (sItems && sItems.length > 0 && !viewOnly) this.selectRight(sItems[0].value);
  return true;
};
DSBModeSearch.prototype.selectRight = function (value, viewOnly) {
  if (!viewOnly) this.elt.modes.normal.selectRight(value);
  var itemElt = this.$rightItemDict[(0, _utils.keyStringOf)(value)];
  if (this.$selectedRight === itemElt) return true;
  if (this.$selectedRight) {
    this.$selectedRight.removeClass('as-selected');
    this.$selectedRight = null;
  }
  if (!itemElt) return false;
  itemElt.addClass('as-selected');
  this.$selectedRight = itemElt;
  return true;
};

/***/ }),

/***/ 53364:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var DSBPropHandlers = {};
DSBPropHandlers.items = {
  set: function set(items) {
    this.itemListCtrl.setItems(items);
    if ('savedValue' in this) {
      this.modes.normal.setValue(this.savedValue, this.strictValue);
    }
  },
  get: function get() {
    return this.itemListCtrl.getItems();
  }
};
DSBPropHandlers.value = {
  set: function set(value) {
    this.savedValue = value;
    this.modes.normal.setValue(value, this.strictValue);
  },
  get: function get() {
    return this.modes.normal.getValue(this.strictValue);
  }
};
DSBPropHandlers.selectedItem = {
  get: function get() {
    return this.modes.normal.getSelectedItem();
  }
};
DSBPropHandlers.strictValue = {
  set: function set(value) {
    if (value) {
      this.$box.addClass('as-strict-value');
    } else {
      this.$box.removeClass('as-strict-value');
    }
  },
  get: function get() {
    return this.$box.hasClass('as-strict-value');
  }
};
DSBPropHandlers.enableSearch = {
  set: function set(value) {
    if (value) {
      this.$box.addClass('as-enable-search');
    } else {
      this.$box.removeClass('as-enable-search');
    }
  },
  get: function get() {
    return this.$box.hasClass('as-enable-search');
  }
};
var _default = DSBPropHandlers;
exports["default"] = _default;

/***/ }),

/***/ 95746:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _utils = __webpack_require__(84512);
var _search = _interopRequireWildcard(__webpack_require__(67858));
var _DSBModes = __webpack_require__(45069);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function MDSBItemListController(elt) {
  this.elt = elt;
  this.items = [];
  this._searchItems = [];
  this._searchCache = {};
}
MDSBItemListController.prototype.setItems = function (items) {
  this.items = (0, _utils.copySelectionItemArray)(items);
  this._searchItems = (0, _search.prepareSearchForList)((0, _utils.copySelectionItemArray)(this.items));
  this._searchCache = {};
  var mode = new _DSBModes.DSBModeNormal(this.elt, this.items);
  this.elt.modes.normal = mode;
  this.elt.mode = mode;
  mode.onStart();
};
MDSBItemListController.prototype.getItems = function () {
  return (0, _utils.copySelectionItemArray)(this.items);
};
MDSBItemListController.prototype.makeSearch = function (query) {
  if (this._searchCache[query]) return this._searchCache[query].resetAndGet();
  var items = this._searchItems;
  var queryItem = (0, _search["default"])({
    text: query
  });
  var maxScore = 0;
  var holders = items.map(function (item) {
    var h = {
      item: item,
      itemScore: (0, _search.calcItemMatchScore)(queryItem, item)
    };
    maxScore = Math.max(maxScore, h.itemScore);
    var childMaxScore = 0;
    if (item.items && item.items.length > 0) {
      h.child = item.items.map(function (cItem) {
        var cItemScore = (0, _search.calcItemMatchScore)(queryItem, cItem);
        maxScore = Math.max(maxScore, cItemScore);
        childMaxScore = Math.max(childMaxScore, cItemScore);
        return {
          item: cItem,
          itemScore: cItemScore
        };
      });
      h.childScore = childMaxScore;
    }
    return h;
  });
  holders.sort(function (a, b) {
    return -Math.max(a.itemScore, a.childScore) + Math.max(b.itemScore, b.childScore);
  });
  var midScore = maxScore / 2;
  holders = holders.filter(function (holder) {
    return Math.max(holder.itemScore, holder.childScore) >= midScore;
  });
  var searchingResultItems = holders.map(function (holder) {
    var oldItem = holder.item;
    var item = {
      text: oldItem.text,
      value: oldItem.value
    };
    var childHolders;
    if (holder.child) {
      childHolders = holder.child.slice();
      childHolders.sort(function (a, b) {
        return -a.itemScore + b.itemScore;
      });
      item.items = childHolders.map(function (cHolder) {
        return cHolder.item;
      });
      item.isSearchItem = true;
    }
    return item;
  });
  var mode = new _DSBModes.DSBModeSearch(this.elt, searchingResultItems);
  this._searchCache[query] = {
    mode: mode,
    resetAndGet: function resetAndGet() {
      return this.mode;
    }
  };
  return mode;
};
var _default = MDSBItemListController;
exports["default"] = _default;

/***/ }),

/***/ 72710:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _ACore = __webpack_require__(34093);
var _DSBPropHandlers = _interopRequireDefault(__webpack_require__(53364));
var _MDSBItemListController = _interopRequireDefault(__webpack_require__(95746));
var _DSBModes = __webpack_require__(45069);
__webpack_require__(86692);
var _utils = __webpack_require__(84512);
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends {AElement}
 * @constructor
 */
function MDualSelectBox() {
  this.$box = (0, _ACore.$)('.am-dropdown-box', this);
  this.$lists = (0, _ACore.$$)('.as-dual-select-box-list', this);
  this.itemListCtrl = new _MDSBItemListController["default"](this);
  this.$searchInput = (0, _ACore.$)(_Searcher["default"].tag, this).on('stoptyping', this.eventHandler.searchModify);
  this.$closeBtn = (0, _ACore.$)('.am-dropdown-box-close-btn', this);
  this.modes = {
    normal: new _DSBModes.DSBModeNormal(this, [])
  };
  this.mode = this.modes.normal;
  this.strictValue = true;
  this.on('click', this.eventHandler.click);
}
MDualSelectBox.tag = 'MDualSelectBox'.toLowerCase();
MDualSelectBox.render = function () {
  return (0, _ACore._)({
    extendEvent: ['change', 'close'],
    "class": ['am-modal', 'am-dropdown-box-modal'],
    child: {
      "class": ['am-dual-select-box', 'am-dropdown-box', 'as-dropdown-box-common-style'],
      child: [{
        "class": 'am-dropdown-box-header',
        child: [{
          tag: _Searcher["default"].tag
        }, {
          tag: 'button',
          "class": 'am-dropdown-box-close-btn',
          child: 'span.mdi.mdi-close'
        }]
      }, {
        "class": ['am-dropdown-box-body', 'am-check-tree-box-body', 'as-dual-select-box-list-ctn'],
        child: [{
          "class": ['as-dual-select-box-list', 'absol-selectlist']
        }, {
          "class": 'as-dual-select-box-arrow-ctn',
          child: 'span.mdi.mdi-menu-right'
        }, {
          "class": ['as-dual-select-box-list', 'absol-selectlist']
        }]
      }]
    }
  });
};
MDualSelectBox.prototype.viewToSelected = function () {
  this.modes.normal.viewToSelected();
};
MDualSelectBox.prototype.notifyChange = function () {
  var newValue = this.value;
  if ((0, _utils.keyStringOf)(newValue) !== (0, _utils.keyStringOf)(this['savedValue'])) {
    this.savedValue = newValue;
    this.emit('change', {
      type: 'change',
      target: this
    }, this);
  }
};
MDualSelectBox.prototype.resetSearchState = function () {
  this.$searchInput.value = '';
  this.eventHandler.searchModify();
};
MDualSelectBox.property = _DSBPropHandlers["default"];
MDualSelectBox.eventHandler = {};
MDualSelectBox.eventHandler.searchModify = function () {
  var query = this.$searchInput.value.trim().replace(/\s+/g, ' ');
  if (query.length > 0) {
    if (this.mode === this.modes.normal) {
      this.mode.onStop();
      this.$box.addClass('as-searching');
    }
    this.mode.search = this.itemListCtrl.makeSearch(query);
    this.mode = this.mode.search;
    this.mode.onStart();
  } else {
    if (this.mode !== this.modes.normal) {
      this.mode.onStop();
      this.mode = this.modes.normal;
      this.mode.onStart();
      this.$box.removeClass('as-searching');
    }
  }
};
MDualSelectBox.eventHandler.click = function (event) {
  if (event.target === this || (0, _EventEmitter.hitElement)(this.$closeBtn, event)) {
    this.emit('close', {
      type: 'close',
      target: this,
      originalEvent: event
    }, this);
  }
};
var _default = MDualSelectBox;
exports["default"] = _default;

/***/ }),

/***/ 96601:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _utils = __webpack_require__(84512);
var _VarScope = _interopRequireDefault(__webpack_require__(61607));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var DSMPropsHandlers = {};
DSMPropsHandlers.isFocus = {
  set: function set(value) {
    if (this.disabled || this.readOnly) value = false;
    value = !!value;
    if (value === this.hasClass('as-focus')) return;
    if (value) {
      this.savedValue = this.$box.value;
      this.addClass('as-focus');
      this.boxCtrl.onFocus();
    } else {
      this.removeClass('as-focus');
      this.boxCtrl.onBlur();
      this.updateText();
      if ((0, _utils.keyStringOf)(this.savedValue) !== (0, _utils.keyStringOf)(this.$box.value)) {
        delete this.savedValue;
        this.notifyChange();
      }
    }
  },
  get: function get() {
    return this.hasClass('as-focus');
  }
};
DSMPropsHandlers.items = {
  set: function set(items) {
    this.$box.items = items;
    if ('pendingValue' in this) {
      this.$box.value = this.pendingValue;
    }
    this.updateText();
  },
  get: function get() {
    return this.$box.items;
  }
};
DSMPropsHandlers.value = {
  set: function set(value) {
    this.pendingValue = value;
    this.$box.value = value;
    this.updateText();
  },
  get: function get() {
    if (!this.strictValue && 'pendingValue' in this) {
      return this.pendingValue;
    }
    var value = this.$box.value;
    var selectedItem = this.$box.selectedItem;
    if (!selectedItem || !selectedItem[0] || !selectedItem[1]) return null;
    return value;
  }
};
DSMPropsHandlers.format = {
  set: function set(value) {
    this.attr('data-format', value);
    this.updateText();
  },
  get: function get() {
    return this.attr('data-format') || '$0, $1';
  }
};
DSMPropsHandlers.strictValue = {
  set: function set(value) {
    this.$box.strictValue = value;
    if (value) {
      this.addClass('as-strict-value');
    } else {
      this.removeClass('as-strict-value');
    }
  },
  get: function get() {
    return this.$box.strictValue;
  }
};
DSMPropsHandlers.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
DSMPropsHandlers.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
var _default = DSMPropsHandlers;
exports["default"] = _default;

/***/ }),

/***/ 21606:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _MDualSelectBox = _interopRequireDefault(__webpack_require__(72710));
var _MDSMBoxController = _interopRequireDefault(__webpack_require__(49224));
var _DSMPropsHandlers = _interopRequireDefault(__webpack_require__(96601));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function DualSelectMenu() {
  this.$box = (0, _ACore._)({
    tag: _MDualSelectBox["default"]
  });
  this.$item = (0, _ACore.$)('.absol-selectlist-item', this);
  _OOP["default"].drillProperty(this, this.$box, 'enableSearch');
  this.boxCtrl = new _MDSMBoxController["default"](this);
  this.strictValue = true;
}
DualSelectMenu.tag = 'DualSelectMenu'.toLowerCase();
DualSelectMenu.render = function () {
  return (0, _ACore._)({
    "class": ['am-dual-select-menu', 'absol-selectmenu', 'as-dual-select-menu'],
    extendEvent: ['change'],
    attr: {
      tabindex: '1'
    },
    child: [{
      "class": 'absol-selectmenu-holder-item',
      child: '.absol-selectlist-item'
    }, {
      tag: 'button',
      "class": 'absol-selectmenu-btn',
      child: ['dropdown-ico']
    }, 'attachhook']
  });
};
DualSelectMenu.prototype.notifyChange = function () {
  // console.log('change')
  delete this['pendingValue'];
  this.emit('change', {
    type: 'change',
    target: this
  }, this);
};
DualSelectMenu.prototype.updateText = function () {
  var selectedItem = this.$box.selectedItem;
  var format = this.format;
  var firstToken = '__';
  var secToken = '__';
  if (selectedItem[0]) {
    firstToken = selectedItem[0].text + '';
  }
  if (selectedItem[1]) {
    secToken = selectedItem[1].text + '';
  }
  var text = format.replace('$0', firstToken).replace('$1', secToken);
  this.$item.clearChild().addChild((0, _ACore._)({
    tag: 'span',
    "class": 'absol-selectlist-item-text',
    child: {
      text: text
    }
  }));
};
DualSelectMenu.property = _DSMPropsHandlers["default"];
DualSelectMenu.eventHandler = {};
var _default = DualSelectMenu;
exports["default"] = _default;

/***/ }),

/***/ 49224:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function MDSMBoxController(elt) {
  this.elt = elt;
  this.$box = elt.$box;
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.elt.on('click', this.ev_click);
  this.$box.on('close', this.ev_close);
}
MDSMBoxController.prototype.ev_click = function () {
  this.elt.isFocus = true;
};
MDSMBoxController.prototype.ev_close = function () {
  this.elt.isFocus = false;
};
MDSMBoxController.prototype.onFocus = function () {
  this.$box.addTo(document.body);
  this.$box.viewToSelected();
  this.elt.off('click', this.ev_click);
};
MDSMBoxController.prototype.onBlur = function () {
  var _this = this;
  this.$box.remove();
  setTimeout(function () {
    _this.elt.on('click', _this.ev_click);
  }, 50);
};
var _default = MDSMBoxController;
exports["default"] = _default;

/***/ }),

/***/ 71098:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _DTBodyRow = _interopRequireDefault(__webpack_require__(7674));
var _utils = __webpack_require__(84512);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _Thread = _interopRequireDefault(__webpack_require__(44067));
var _DTSearchFactor = _interopRequireDefault(__webpack_require__(87060));
var _stringGenerate = __webpack_require__(10713);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _ACore = __webpack_require__(34093);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Dom = __webpack_require__(64821);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {DTBody} body
 * @constructor
 */
function SearchingMaster(body) {
  this.body = body;
  this.mode = body.modes.searching;
  this.waitingCtrl = body.table.wrapper.waitingCtl;
  this.initWorker();
  this.id = (0, _stringGenerate.randomIdent)(10);
  this.transferSession = Math.random() + '';
  this.transferred = 0;
  this.isTranferring = false;
  this.share.instances[this.id] = this;
  this.itemVersion = 0;
  this.outputCache = {};
  this.lastTaskIdx = 0;
}
SearchingMaster.prototype.destroy = function () {
  this.share.thread.invoke('destroySlave', this.id);
  this.share.instances[this.id] = null;
  this.transferSession = "DIE";
  delete this.share.instances[this.id];
  this.outputCache = {};
  this.body = null;
};
SearchingMaster.prototype.transferFrom = function (offset) {
  if (this.transferSession === "DIE") {
    return;
  }
  this.outputCache = {};
  if (offset < this.transferred) {
    this.transferred = offset;
    this.itemVersion++;
  }
  if (this.isTranferring) return;
  var waitingCtrl = this.waitingCtrl;
  var wTkn = waitingCtrl.begin();
  var self = this;
  var transferSession = Math.random() + '';
  self.transferSession = transferSession;
  self.isTranferring = true;
  setTimeout(function tick() {
    if (self.transferSession !== transferSession) {
      waitingCtrl.end(wTkn);
      return;
    }
    var i = self.transferred;
    var rows = self.body.rows;
    var n = self.body.rows.length;
    if (i >= n) {
      if (n === 0) {
        self.share.thread.invoke('transferSearchItems', self.id, n, 0, 0, [], self.itemVersion);
      }
      self.isTranferring = false;
      self.onFinishTransfer();
      waitingCtrl.end(wTkn);
      return;
    }
    self.share.benchmark = self.share.benchmark || _BrowserDetector["default"].calcBenchmark();
    var k = self.share.benchmark >> 2;
    var items = [];
    var item;
    var start = i;
    while (i < n && k--) {
      item = {
        text: rows[i].innerText,
        value: i,
        keys: rows[i].filterKeys
      };
      items.push(item);
      ++i;
    }
    var sync = self.share.thread.invoke('transferSearchItems', self.id, n, start, i, items, self.itemVersion);
    self.transferred = i;
    Promise.all([sync, new Promise(function (rs) {
      setTimeout(rs, 5);
    })]).then(tick);
  }, 5);
};
SearchingMaster.prototype.onFinishTransfer = function () {
  // console.log('finish');
};
SearchingMaster.prototype.sendTask = function (query) {
  if (this.transferSession === "DIE") {
    return;
  }
  this.lastTaskIdx++;
  var taskData = {
    idx: this.lastTaskIdx,
    query: query,
    hash: (0, _utils.calcDTQueryHash)(query)
  };
  if (this.outputCache[taskData.hash]) {
    setTimeout(this.onResult.bind(this, this.outputCache[taskData.hash], true), 5);
  } else {
    this.share.thread.invoke('transferTask', this.id, taskData);
  }
  return taskData;
};
SearchingMaster.prototype.onResult = function (response, dontCache) {
  if (this.itemVersion !== response.itemVersion) return;
  if (!dontCache) {
    this.outputCache[response.hash] = response;
  }
  this.body.modes.searching.onResult(response);
};
SearchingMaster.prototype.share = {
  thread: null,
  benchmark: 0,
  instances: {}
};
SearchingMaster.prototype.initWorker = function () {
  if (!this.share.thread) {
    this.share.thread = new _Thread["default"]({
      methods: {
        calcBenchmark: _BrowserDetector["default"].calcBenchmark
      },
      extendCode: _DTSearchFactor["default"].exportCode()
    });
    this.share.thread.on('alert', function (mess) {
      alert(mess);
    });
    this.share.thread.on('searchEnd', function (id, response) {
      this.share.instances[id] && this.share.instances[id].onResult(response);
    }.bind(this));
    setTimeout(function () {
      this.share.benchmark = this.share.benchmark || _BrowserDetector["default"].calcBenchmark();
    }.bind(this));
  }
};

/***
 *
 * @param {DTBody}  body
 * @constructor
 */
function BaseMode(body) {
  this.body = body;
  this.offset = 0;
  this.rowOffset = -1000;
  this.boundCache = null;
  this.viewedRows = null;
}
BaseMode.prototype.name = 'base';
NormalMode.prototype.revoke = function () {
  this.body = null;
};
BaseMode.prototype.resetViewParam = function () {
  this.offset = 0;
  this.rowOffset = -1000;
  this.boundCache = null;
  this.viewedRows = null;
};
BaseMode.prototype.getBoundOfRows = function () {
  if (this.boundCache) return this.boundCache;
  if (!this.body.table.wrapper.isDescendantOf(document.body)) return null;
  var bodyBound = this.body.elt.getBoundingClientRect();
  var elt = this.body.elt;
  var childNodes = elt.childNodes;
  this.boundCache = Array.prototype.map.call(childNodes, function (elt) {
    var eBound = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    eBound.y -= bodyBound.top;
    return eBound;
  });
  this.boundCache.body = _Rectangle["default"].fromClientRect(bodyBound);
  this.boundCache.header = _Rectangle["default"].fromClientRect(this.body.table.header.elt.getBoundingClientRect());
  return this.boundCache;
};
BaseMode.prototype.updateRowsIfNeed = function () {
  throw Error("Not implement!");
};
BaseMode.prototype.render = function () {
  var _this = this;
  this.updateRowsIfNeed();
  var bounds = this.getBoundOfRows();
  if (!bounds) {
    setTimeout(function () {
      if (_this.body.elt.isDescendantOf(document.body)) {
        _this.render();
      }
    }, 5);
    return;
  }
  var dy = 0,
    rowIdx;
  if (bounds.length > 0) {
    rowIdx = Math.floor(this.offset - this.rowOffset);
    //todo: fix bounds[rowIdx] undefined
    if (!bounds[rowIdx]) return;
    dy = bounds[rowIdx].y + (this.offset - this.rowOffset - rowIdx) * bounds[rowIdx].height;
  }
  var availableHeight;
  if (bounds.length > 0) {
    availableHeight = this.body.table.wrapper.$viewport.getBoundingClientRect().height - bounds.header.height;
    if (bounds[bounds.length - 1].y + bounds[bounds.length - 1].height - dy < availableHeight - 1) {
      dy = -availableHeight + bounds[bounds.length - 1].y + bounds[bounds.length - 1].height + 1; //1: last border
    }
  }

  dy = Math.max(0, dy);

  //small padding top
  var hs = this.body.table.wrapper.$vscrollbar.innerOffset / (this.body.table.wrapper.$vscrollbar.innerHeight - this.body.table.wrapper.$vscrollbar.outerHeight || 1);
  dy += hs * 100;
  this.body.table.wrapper.$space.addStyle('top', -dy + 'px');
  this.body.table.wrapper.$fixedXCtn.addStyle('top', -dy + 'px');
};

/***
 * @extends BaseMode
 * @param {DTBody} body
 * @constructor
 */
function SearchingMode(body) {
  BaseMode.call(this, body);
  this.status = 'STANDBY';
  this.waitingToken = 'none';
  this.waitingCtrl = body.table.wrapper.waitingCtl;
  this.taskHash = 0;
  this.renderingHash = -1;
  this.resultItems = [];
  this.viewedRows = [];
}
_OOP["default"].mixClass(SearchingMode, BaseMode);
SearchingMode.prototype.name = 'search';
SearchingMode.prototype.revoke = function () {
  this.resultItems = [];
  this.viewedRows = [];
};
SearchingMode.prototype.start = function () {
  this.status = "RUNNING";
  this.searchingCache = {};
  this.body.table.wrapper.addClass('as-searching');
  this.renderingHash = -1;
};
SearchingMode.prototype.end = function () {
  this.body.table.wrapper.removeClass('as-searching');
  this.searchingItems = null;
  this.status = "STOP";
  this.waitingCtrl.end(this.waitingToken);
  if (this.body.master) this.body.master.sendTask(null);
};
SearchingMode.prototype.updateRowsIfNeed = function () {
  var _this2 = this;
  var screenSize = (0, _Dom.getScreenSize)();
  var rowPerPage = Math.ceil(Math.ceil(screenSize.height / 40) / 25) * 25;
  if (this.body.table.wrapper.hasClass('as-adapt-infinity-grow')) rowPerPage = 1e7;
  var newRowOffset = Math.floor(this.offset / rowPerPage) * rowPerPage;
  if (this.resultItems.length - newRowOffset < rowPerPage) {
    newRowOffset = Math.max(0, newRowOffset - rowPerPage);
  }
  if (newRowOffset === this.rowOffset) return;
  this.rowOffset = newRowOffset;
  var start = this.rowOffset;
  var end = Math.min(start + rowPerPage * 2, this.resultItems.length);
  var elt = this.body.elt;
  var fixedXElt = this.body.fixedXElt;
  var rows = this.body.rows;
  var nRows = [];
  for (var i = start; i < end; ++i) {
    nRows.push(rows[this.resultItems[i]]);
  }
  var nChildren = nRows.map(function (r) {
    return r.elt;
  });
  var nFixedXChildren = nRows.map(function (r) {
    return r.fixedXElt;
  });
  (0, _utils.replaceChildrenInElt)(elt, nChildren);
  (0, _utils.replaceChildrenInElt)(fixedXElt, nFixedXChildren);
  this.boundCache = null;
  var bounds = this.getBoundOfRows();
  if (bounds) {
    for (var i = 0; i < nRows.length; ++i) {
      nRows[i].updateCopyEltSize();
    }
    this.body.table.wrapper.layoutCtrl.onResize();
    this.body.table.updateCopyEltSize();
  }
  var updateFx = function updateFx() {
    if (counter > 20) return;
    if (_this2.body.elt.isDescendantOf(document.body)) {
      var bounds = _this2.getBoundOfRows();
      if (bounds) {
        for (var i = 0; i < nRows.length; ++i) {
          nRows[i].updateCopyEltSize();
        }
        _this2.body.table.wrapper.layoutCtrl.onResize();
        _this2.body.table.updateCopyEltSize();
      }
      counter += 3;
      setTimeout(updateFx, counter++ * 5);
    } else {
      setTimeout(updateFx, counter++ * 5);
    }
  };
  var counter = 1;
  if (!bounds) {
    setTimeout(updateFx, 1);
  }
};
SearchingMode.prototype.onRowSplice = function (idx) {
  this.rowOffset = -1000;
  this.render();
};
SearchingMode.prototype.onRowRemoved = function (idx, n) {
  n = n || 1;
  this.resultItems = this.resultItems.reduce(function (ac, cr) {
    if (cr >= idx + n) {
      ac.push(cr - n);
    } else if (cr < idx) {
      ac.push(cr);
    }
    return ac;
  }, []);
};
SearchingMode.prototype.onRowAdded = function (idx, n) {
  n = n || 1;
  this.resultItems = this.resultItems.reduce(function (ac, cr) {
    if (cr >= idx) {
      ac.push(cr + n);
    } else {
      ac.push(cr);
    }
    return ac;
  }, []);
};
SearchingMode.prototype.viewIntoRow = function (row) {
  console.log(row);
};
SearchingMode.prototype.query = function (query) {
  this.waitingCtrl.end(this.waitingToken);
  this.waitingToken = this.waitingCtrl.begin();
  if (!this.body.master) {
    this.body.master = new SearchingMaster(this.body);
    this.body.master.transferFrom(0);
  }
  var taskHolder = this.body.master.sendTask(query);
  this.taskHash = taskHolder.hash;
};
SearchingMode.prototype.onResult = function (response) {
  var _this3 = this;
  if (this.status !== 'RUNNING' || response.hash !== this.taskHash) return;
  this.waitingCtrl.end(this.waitingToken);
  if (this.renderingHash !== response.hash) {
    this.renderingHash = response.hash;
    this.offset = 0;
    this.rowOffset = -1000;
  }
  this.resultItems = response.result;
  this.viewedRows = this.resultItems.map(function (rIdx) {
    return _this3.body.rows[rIdx];
  });
  this.render();
};
SearchingMode.prototype.share = {
  thread: null
};

/***
 * @extends BaseMode
 * @param {DTBody} body
 * @constructor
 */
function NormalMode(body) {
  BaseMode.call(this, body);
}
_OOP["default"].mixClass(NormalMode, BaseMode);
NormalMode.prototype.name = 'normal';
NormalMode.prototype.start = function () {
  this.resetViewParam();
  this.viewedRows = this.body.rows;
  this.render();
};
NormalMode.prototype.end = function () {};
NormalMode.prototype.updateRowsIfNeed = function () {
  var _this4 = this;
  var screenSize = (0, _Dom.getScreenSize)();
  var rowPerPage = Math.ceil(Math.ceil(screenSize.height / 40 + 1) / 100) * 100;
  if (this.body.table.wrapper.hasClass('as-adapt-infinity-grow')) rowPerPage = 1e7;
  var newRowOffset = Math.floor(this.offset / rowPerPage) * rowPerPage;
  var data = this.body.data;
  if (data.rows.length - newRowOffset < rowPerPage) {
    newRowOffset = Math.max(0, newRowOffset - rowPerPage);
  }
  if (newRowOffset === this.rowOffset) return;
  this.rowOffset = newRowOffset;
  var start = this.rowOffset;
  var elt = this.body.elt;
  var fixedXElt = this.body.fixedXElt;
  var end = Math.min(start + rowPerPage * 2, data.rows.length);
  var rows = this.body.rows;
  elt.clearChild();
  fixedXElt.clearChild();
  for (var i = start; i < end; ++i) {
    elt.addChild(rows[i].elt);
    fixedXElt.addChild(rows[i].fixedXElt);
  }
  this.boundCache = null;
  var bounds = this.getBoundOfRows();
  if (bounds) {
    for (var i = start; i < end; ++i) {
      rows[i].updateCopyEltSize();
    }
    this.body.table.wrapper.layoutCtrl.onResize();
    this.body.table.updateCopyEltSize();
  }
  var counter = 1;
  var fx = function fx() {
    if (counter > 20) return;
    if (_this4.body.elt.isDescendantOf(document.body)) {
      var bounds = _this4.getBoundOfRows();
      if (bounds) {
        for (var i = start; i < end; ++i) {
          rows[i].updateCopyEltSize();
        }
        _this4.body.table.wrapper.layoutCtrl.onResize();
        _this4.body.table.updateCopyEltSize();
      }
      counter += 3;
      setTimeout(fx, counter * 5);
    } else {
      setTimeout(fx, counter++ * 5);
    }
  };
  if (!bounds) {
    setTimeout(fx, 1);
  }
  this.body.table.wrapper.rowDragCtrl.ev_rowRenderChange();
  _ResizeSystem["default"].requestUpdateUpSignal(this.body.elt);
};
NormalMode.prototype.onRowSplice = function (idx) {
  this.rowOffset = -1;
  this.render();
};
NormalMode.prototype.viewIntoRow = function (o) {
  var idx = this.viewedRows.findIndex(function (row) {
    if (o === row._elt) return true;
    if (o === row) return true;
    if (o === row.data) return true;
    if (o === row.id || row.data.id === o) return true;
    return false;
  });
  if (idx <= 0) return;
  var scrollbar = this.body.table.wrapper.$vscrollbar;
  scrollbar.innerOffset = Math.max(0, Math.min(idx - scrollbar.outerHeight / 3, scrollbar.innerHeight - scrollbar.outerHeight));
  scrollbar.emit('scroll');
};

/***
 *
 * @param {DTTable} table
 * @param data
 * @constructor
 */
function DTBody(table, data) {
  var _this5 = this;
  this.table = table;
  this.data = data;
  this._elt = null;
  this._fixedXElt = null;

  /**
   * @type {DTBodyRow[]}
   */
  this.rows = this.data.rows.map(function (rowData, i) {
    var row = new _DTBodyRow["default"](_this5, rowData);
    row.idx = i;
    return row;
  });
  this.modes = {
    normal: new NormalMode(this),
    searching: new SearchingMode(this)
  };
  //
  //
  this.curentMode = this.modes.normal;
  this.curentMode.start();
  this.curentMode.render();
  this.master = null;
  //
  // this.master = new SearchingMaster(this);
  // this.master.transferFrom(0);
  /***
   * @name offset
   * @type {number}
   * @memberOf DTBody#
   */
}

DTBody.prototype.revokeResource = function () {
  if (this.master) {
    this.master.destroy();
    this.master = null;
  }
  while (this.rows.length) {
    this.rows.pop().revoke();
  }
  this.modes.normal.revoke();
  this.modes.searching.revoke();
  this.rows = [];
  this.data = null;
};
DTBody.prototype.requireRows = function (start, end) {
  if (typeof start !== "number") start = 0;
  if (typeof end !== "number") end = Infinity;
  end = Math.min(end, this.data.rows.length);
  return this.rows.slice(start, end);
};
DTBody.prototype.reindexRows = function (start, end) {
  if (typeof start !== "number") start = 0;
  if (typeof end !== "number") end = Infinity;
  end = Math.min(end, this.data.rows.length);
  for (var i = start; i < end; ++i) {
    if (this.rows[i]) this.rows[i].idx = i;
  }
};
DTBody.prototype.onRowSplice = function (idx) {
  this.curentMode.onRowSplice(idx);
  if (this.master) this.master.transferFrom(idx);
  _ResizeSystem["default"].requestUpdateSignal();
};
DTBody.prototype.rowIndexOf = function (o) {
  var n = this.rows.length;
  for (var i = 0; i < n; ++i) {
    if (o === this.rows[i]._elt) return i;
    if (o === this.rows[i]) return i;
    if (o === this.data.rows[i]) return i;
    if (o === this.data.rows[i].id) return i;
  }
  return -1;
};
DTBody.prototype.addRowBefore = function (rowData, bf) {
  var idx;
  if (bf === null || bf === undefined) {
    return this.addRow(rowData);
  } else {
    idx = this.rowIndexOf(bf);
    if (idx < 0) throw new Error("$bf not is a row in table");
    return this.addRow(rowData, idx);
  }
};
DTBody.prototype.addRowAfter = function (rowData, at) {
  var idx;
  if (at === null || at === undefined) {
    return this.addRow(rowData, 0);
  } else {
    idx = this.rowIndexOf(at);
    if (idx < 0) throw new Error("$bf not is a row in table");
    return this.addRow(rowData, idx + 1);
  }
};
DTBody.prototype.addRow = function (rowData, idx) {
  if (!(0, _utils.isNaturalNumber)(idx) || idx >= this.rows.length) {
    idx = this.rows.length;
  }
  var row;
  if (idx >= this.rows.length) {
    idx = this.rows.length;
    this.data.rows.push(rowData);
    row = new _DTBodyRow["default"](this, rowData);
    row.idx = idx;
    this.rows.push(row);
    if (this.curentMode.onRowAdded) this.curentMode.onRowAdded(idx, 1);
    this.onRowSplice(this.rows.length - 1);
  } else {
    row = new _DTBodyRow["default"](this, rowData);
    row.idx = idx;
    this.rows.splice(idx, 0, row);
    this.data.rows.splice(idx, 0, rowData);
    this.reindexRows(idx + 1);
    this.onRowSplice(idx);
  }
  return row;
};
DTBody.prototype.addRows = function (rowsData, idx) {
  if (!(0, _utils.isNaturalNumber)(idx) || idx >= this.rows.length) {
    idx = this.rows.length;
  }
  var res = [];
  var row, i, rowData;
  if (idx >= this.rows.length) {
    idx = this.rows.length;
    for (i = 0; i < rowsData.length; ++i) {
      rowData = rowsData[i];
      row = new _DTBodyRow["default"](this, rowData);
      row.idx = i + idx;
      this.data.rows.push(rowData);
      res.push(row);
      this.rows.push(row);
    }
  } else {
    for (i = 0; i < rowsData.length; ++i) {
      rowData = rowsData[i];
      row = new _DTBodyRow["default"](this, rowData);
      row.idx = i + idx;
      res.push(row);
      this.data.rows.splice(idx + i, 0, rowData);
      this.rows.splice(idx + i, 0, row);
    }
    this.reindexRows(idx + rowsData.length);
  }
  if (this.curentMode.onRowAdded) this.curentMode.onRowAdded(idx, rowsData.length);
  this.onRowSplice(idx);
  return res;
};
DTBody.prototype.removeRow = function (row) {
  var idx = this.rowIndexOf(row);
  if (idx < 0) return;
  this.rows.splice(idx, 1);
  this.data.rows.splice(idx, 1);
  this.reindexRows(idx);
  if (this.curentMode.onRowRemoved) this.curentMode.onRowRemoved(idx);
  this.onRowSplice(idx);
};
DTBody.prototype.moveRowAt = function (idx, newIdx) {
  var row = this.rows.splice(idx, 1)[0];
  var rowData = this.data.rows.splice(idx, 1)[0];
  this.rows.splice(newIdx, 0, row);
  this.data.rows.splice(newIdx, 0, rowData);
  this.reindexRows(Math.min(idx, newIdx));
  this.onRowSplice(Math.min(idx, newIdx));
};
DTBody.prototype.clearRows = function () {
  var n = this.rows.length;
  this.rows.splice(0);
  this.data.rows.splice(0);
  if (this.curentMode.onRowRemoved) this.curentMode.onRowRemoved(0, n);
  this.onRowSplice(0);
};
DTBody.prototype.rowAt = function (idx) {
  if (this.rows[idx]) return this.rows[idx];
  var rowData = this.data.rows[idx];
  if (rowData) {
    this.rows[idx] = new _DTBodyRow["default"](this, rowData);
    this.rows[idx].idx = idx;
  } else return null;
};
DTBody.prototype.rowOf = function (o) {
  var idx = this.rowIndexOf(o);
  return this.rowAt(idx);
};
DTBody.prototype.viewIntoRow = function (row) {
  return this.curentMode.viewIntoRow(row);
};
DTBody.prototype.startSearchingIfNeed = function () {
  if (this.curentMode !== this.modes.searching) {
    this.curentMode.end();
    this.curentMode = this.modes.searching;
    this.curentMode.start();
  }
};
DTBody.prototype.stopSearchIfNeed = function () {
  if (this.curentMode === this.modes.searching) {
    this.curentMode.end();
    this.curentMode = this.modes.normal;
    this.curentMode.start();
  }
};
DTBody.prototype.query = function (query) {
  var now = new Date().getTime();
  if (query) {
    this.startSearchingIfNeed();
  } else if (!query) {
    this.stopSearchIfNeed();
    this.curentMode.render();
  }
  if (this.curentMode.query && query) {
    this.curentMode.query(query);
  }
};
DTBody.prototype.updateCopyEltSize = function () {
  this.rows.forEach(function (row) {
    return row.updateCopyEltSize();
  });
};
Object.defineProperties(DTBody.prototype, {
  offset: {
    set: function set(value) {
      this._offset = value;
      this.curentMode.offset = value;
      this.curentMode.render();
    },
    get: function get() {
      return this._offset;
    }
  },
  searching: {
    get: function get() {
      return this.elt.hasClass('as-searching');
    }
  }
});
Object.defineProperty(DTBody.prototype, 'elt', {
  get: function get() {
    var _this6 = this;
    if (this._elt) return this._elt;
    this._elt = (0, _ACore._)({
      tag: 'tbody',
      "class": 'as-dt-body'
    });
    if (this.data.on) {
      Object.keys(this.data.on).forEach(function (key) {
        var cb = _this6.data.on[key];
        if (typeof cb !== "function") return;
        _this6._elt.on(key, function (event) {
          cb.call(_this6._elt, event, _this6);
        });
      });
    }
    return this._elt;
  }
});
Object.defineProperty(DTBody.prototype, 'fixedXElt', {
  get: function get() {
    if (this._fixedXElt) return this._fixedXElt;
    this._fixedXElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      "class": 'as-fixed-x'
    });
    return this._fixedXElt;
  }
});
Object.defineProperty(DTBody.prototype, 'adapter', {
  get: function get() {
    return this.table.adapter;
  }
});
var _default = DTBody;
exports["default"] = _default;

/***/ }),

/***/ 47817:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _utils = __webpack_require__(84512);
var _datetime = __webpack_require__(58286);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 *
 * @param {DTBodyRow} row
 * @param data
 * @constructor
 */
function DTBodyCell(row, data) {
  this.row = row;
  this._elt = null;
  this._copyElt = null;
  this._idx = null;
  if (data.attr) {
    Object.keys(data.attr).forEach(function (key) {
      var key2 = key.toLowerCase();
      if (key2 !== key) data.attr[key2] = data.attr[key];
    });
  }
  this.data = data;
}
DTBodyCell.prototype.revoke = function () {
  this.row = null;
  if (this._elt) this._elt.holder = null;
  this._elt = null;
  this._copyElt = null;
  this._idx = null;
  this.data = null;
};
Object.defineProperty(DTBodyCell.prototype, 'elt', {
  get: function get() {
    var _this = this;
    if (this._elt) return this._elt;
    this._elt = (0, _ACore._)({
      tag: 'td',
      "class": 'as-dt-body-cell'
    });
    this._elt.holder = this;
    var addChild = this._elt.addChild;
    this._elt.addChild = function () {
      addChild.apply(this, arguments);
      _ResizeSystem["default"].requestUpdateUpSignal(this);
      return this;
    };
    if (this.data.attr) this._elt.attr(this.data.attr);
    if (typeof this.data["class"] === "string") (0, _utils.addElementClassName)(this._elt, this.data["class"]);
    if (this.data.style) this._elt.addStyle(this.data.style);
    if (this.data.on) {
      Object.keys(this.data.on).forEach(function (key) {
        var cb = _this.data.on[key];
        if (typeof cb !== "function") return;
        _this._elt.on(key, function (event) {
          cb.call(_this._elt, event, _this);
        });
      });
    }
    if (this._idx !== null) this._elt.attr('data-col-idx', this._idx + '');
    this.row.body.table.adapter.renderBodyCell(this.elt, this.data, this);
    (0, _utils.listenDomContentChange)(this._elt, function (event) {
      _this.requestUpdateContent();
    });
    return this._elt;
  }
});
Object.defineProperty(DTBodyCell.prototype, 'copyElt', {
  get: function get() {
    if (this._copyElt) return this._copyElt;
    this._copyElt = (0, _ACore.$)(this.elt.cloneNode(true)).addClass('as-copy-elt');
    return this._copyElt;
  }
});
DTBodyCell.prototype.requestUpdateContent = function () {
  if (this._copyElt) {
    this._copyElt.clearChild();
    this._copyElt.addChild(Array.prototype.map.call(this._elt.childNodes, function (c) {
      return c.cloneNode(true);
    }));
  }
  _ResizeSystem["default"].updateUp(this._elt, true);
  _ResizeSystem["default"].requestUpdateUpSignal(this._elt, true);
};
Object.defineProperty(DTBodyCell.prototype, 'innerText', {
  get: function get() {
    var text = this.data.innerText;
    if (text === undefined || text === null) text = '';else if (!text) {
      text = text + '';
    } else if (text.substring) {} else if (typeof text === "number") {
      text = text + '';
    } else if (_typeof(text) === "object") {
      if (text instanceof Date) {
        return (0, _datetime.formatDateTime)(text, 'dd/MM/yyyy HH:mm');
      } else {
        return (0, _utils.jsStringOf)(text);
      }
    } else if (typeof text === "function") {
      text = text.call(this.data, this);
    }
    return text;
    if (this.data.innerText) return this.data.innerText;
    if (this.data.getInnerText) return this.data.getInnerText();
    // if ('innerText' in this.data)
    return this.data.innerText || '';
    var res = [];
    function visit(node) {
      if (node.nodeType === 3 && node.data) {
        res.push(node.data);
      } else if (node.childNodes && node.childNodes.length > 0) {
        Array.prototype.forEach.call(node.childNodes, visit);
      }
    }
    visit(this.elt);
    return res.join(' ');
  }
});
Object.defineProperty(DTBodyCell.prototype, 'idx', {
  set: function set(value) {
    this._idx = value;
    if (this._elt) this._elt.attr('data-col-idx', value + '');
  },
  get: function get() {
    return this._idx;
  }
});
Object.defineProperty(DTBodyCell.prototype, 'colspan', {
  get: function get() {
    var value = this.data.attr && this.data.attr.colspan;
    if (typeof value === "string") value = parseInt(value);
    if (typeof value === "number") return value;else return 1;
  }
});
var _default = DTBodyCell;
exports["default"] = _default;

/***/ }),

/***/ 7674:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _DTBodyCell = _interopRequireDefault(__webpack_require__(47817));
var _stringGenerate = __webpack_require__(10713);
var _utils = __webpack_require__(84512);
var _stringFormat = __webpack_require__(22294);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {DTBody} body
 * @param data
 * @constructor
 */
function DTBodyRow(body, data) {
  var _this = this;
  this.body = body;
  this.data = data;
  this.data.cells = this.data.cells || [];
  this._elt = null;
  this._fixedXElt = null;
  this.filterKeys = Object.assign({}, this.data.keys);
  this.data.cells.reduce(function (ac, cr, i) {
    if (typeof cr.keySort === "string") {
      ac['[' + i + ']'] = (0, _stringFormat.nonAccentVietnamese)(cr.keySort).toLowerCase();
    } else if (typeof cr.keySort === "number") {
      ac['[' + i + ']'] = cr.keySort;
    } else if (typeof cr.innerText === "string") {
      ac['[' + i + ']'] = (0, _stringFormat.nonAccentVietnamese)(cr.innerText).toLowerCase();
    }
    return ac;
  }, this.filterKeys);
  if ('id' in data) {
    this.id = data.id;
  } else {
    this.id = (0, _stringGenerate.randomIdent)(8);
  }
  this._idx = null;
  /***
   * @type {DTBodyCell[]}
   */
  this.cells = this.data.cells.map(function (cellData) {
    return new _DTBodyCell["default"](_this, cellData);
  });
  this.cells.reduce(function (ac, cell) {
    cell.idx = ac;
    return ac + cell.colspan;
  }, 0);
}
DTBodyRow.prototype.revoke = function () {
  while (this.cells.length) {
    this.cells.pop().revoke();
  }
  this.cells = null;
  this.data = null;
  this.body = null;
  if (this._elt) this._elt.dtBodyRow = null;
  this._elt = null;
  this.$id = null;
  this.draggable = null;
};
DTBodyRow.prototype.revokeResource = function () {};
DTBodyRow.prototype.remove = function () {
  this.body.removeRow(this);
};
DTBodyRow.prototype.viewInto = function () {
  return this.body.viewIntoRow(this);
};
DTBodyRow.prototype.updateCopyEltSize = function () {
  if (!this._fixedXElt) return;
  if (!this._elt.parentElement) return;
  if (this._fixedXElt.childNodes.length === 0) return; //has no fixed column
  var bound = this._elt.getBoundingClientRect();
  this._fixedXElt.addStyle('height', bound.height + 'px');
};
DTBodyRow.prototype.updateData = function (data) {
  var _this2 = this;
  var rowIdx = this.body.rowIndexOf(this.data);
  this.body.data.rows[rowIdx] = data;
  this.data = data;
  if ('id' in data) {
    this.id = data.id;
  } else {
    this.id = (0, _stringGenerate.randomIdent)(8);
  }
  this.cells = this.data.cells.map(function (cellData) {
    return new _DTBodyCell["default"](_this2, cellData);
  });
  this.cells.reduce(function (ac, cell) {
    cell.idx = ac;
    return ac + cell.colspan;
  }, 0);
  if (this._elt) {
    this._elt.attr('data-id', this.id + '');
    this._elt.clearChild().addChild(this.cells.map(function (cell) {
      return cell.elt;
    }));
    this.$idx = (0, _ACore.$)('.as-dt-row-index', this._elt);
    this.draggable = !!(0, _ACore.$)('.as-drag-zone', this._elt);
    if (this.$idx) this.$idx.attr('data-idx', this._idx + 1 + '');
  }
  this.body.onRowSplice(rowIdx);
};
Object.defineProperty(DTBodyRow.prototype, 'elt', {
  get: function get() {
    var _this3 = this;
    if (this._elt) return this._elt;
    var fixedCol = this.adapter.fixedCol || 0;
    var child = this.cells.filter(function (c) {
      return c.idx < fixedCol;
    }).map(function (c) {
      return c.copyElt;
    });
    var child1 = this.cells.filter(function (c) {
      return c.idx >= fixedCol;
    }).map(function (c) {
      return c.elt;
    });
    this._elt = (0, _ACore._)({
      tag: 'tr',
      "class": 'as-dt-body-row',
      props: {
        dtBodyRow: this
      },
      child: child.concat(child1)
    });
    this._elt.attr('data-id', this.id + '');
    if (this.data["class"]) {
      (0, _utils.addElementClassName)(this._elt, this.data["class"]);
    }
    if (this.data.attr) {
      this._elt.attr(this.data.attr);
    }
    if (this.data.style) {
      this._elt.addStyle(this.data.style);
    }
    if (this.data.on) {
      Object.keys(this.data.on).forEach(function (key) {
        var cb = _this3.data.on[key];
        if (typeof cb !== "function") return;
        _this3._elt.on(key, function (event) {
          cb.call(_this3._elt, event, _this3);
        });
      });
    }
    this.$idx = this.cells.reduce(function (ac, c) {
      return ac || (0, _ACore.$)('.as-dt-row-index', c.elt);
    }, null);
    this.draggable = !!(0, _ACore.$)('.as-drag-zone', this._elt);
    if (this.$idx) this.$idx.attr('data-idx', this._idx + 1 + '');
    var originAddStyle = this._elt.addStyle;
    var originRemoveStyle = this._elt.removeStyle;
    var originAddClass = this._elt.addClass;
    var originRemoveClass = this._elt.removeClass;
    var isOverrideStyle = function isOverrideStyle(x) {
      return ['background-color', 'backgroundColor', 'color'].includes(x);
    };
    var thisCTL = this;
    this._elt.addStyle = function (key, value) {
      originAddStyle.apply(this, arguments);
      if (thisCTL._fixedXElt && isOverrideStyle(key)) {
        thisCTL._fixedXElt.addStyle(key, value);
      }
      return this;
    };
    this._elt.removeStyle = function (key) {
      originRemoveStyle.apply(this, arguments);
      if (thisCTL._fixedXElt && isOverrideStyle(key)) {
        thisCTL._fixedXElt.removeStyle(key);
      }
      return this;
    };
    this._elt.addClass = function () {
      originAddClass.apply(this, arguments);
      if (thisCTL._fixedXElt) {
        thisCTL._fixedXElt.addClass.apply(thisCTL._fixedXElt, arguments);
      }
      return this;
    };
    this._elt.removeClass = function () {
      originRemoveClass.apply(this, arguments);
      if (thisCTL._fixedXElt) {
        thisCTL._fixedXElt.removeClass.apply(thisCTL._fixedXElt, arguments);
      }
      return this;
    };
    return this._elt;
  }
});
Object.defineProperty(DTBodyRow.prototype, 'fixedXElt', {
  get: function get() {
    if (this._fixedXElt) return this._fixedXElt;
    var fixedCol = this.adapter.fixedCol || 0;
    this._fixedXElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      "class": 'as-dt-fixed-x',
      child: this.cells.slice(0, fixedCol).map(function (cell) {
        return cell.elt;
      })
    });
    return this._fixedXElt;
  }
});
Object.defineProperty(DTBodyRow.prototype, 'innerText', {
  get: function get() {
    if (this.data.innerText) return this.data.innerText;
    if (this.data.getInnerText) return this.data.getInnerText();
    if ('innerText' in this.data) return this.data.innerText || '';
    return this.cells.map(function (cell) {
      return cell.innerText.trim();
    }).filter(function (text) {
      return !!text;
    }).join(' / ');
  }
});
Object.defineProperty(DTBodyRow.prototype, 'idx', {
  set: function set(value) {
    if (this.$idx) this.$idx.attr('data-idx', value + 1 + '');
    this._idx = value;
  },
  get: function get() {
    return this._idx;
  }
});
Object.defineProperty(DTBodyRow.prototype, 'adapter', {
  get: function get() {
    return this.body.adapter;
  }
});
var _default = DTBodyRow;
exports["default"] = _default;

/***/ }),

/***/ 38064:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _DTTable = _interopRequireDefault(__webpack_require__(98933));
var _ACore = __webpack_require__(34093);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @typedef DTDataRow
 * @property
 */

/***
 * @typedef DTDataBody
 * @property {DTDataRow[]} row
 */

/***
 * @typedef DTDataHead
 * @property {DTDataHRow[]} row
 */

/***
 * @typedef DTDataTable
 * @property head
 * @property body
 * @property {number} rowsPerPage
 * @property {number} fixedCol
 */

/***
 *
 * @param {DynamicTable} tableElt
 * @param {DTDataAdapter} opt
 * @constructor
 */
function DTDataAdapter(tableElt, opt) {
  this.tableElt = tableElt;
  /***
   *
   * @type {null|DTDataTable}
   */
  this.data = null;
  this.rowsPerPage = 20;
  this.fixedCol = 0;
  Object.assign(this, opt);
  if (this.fixedCol === 0) {
    this.tableElt.removeClass('as-has-fixed-col');
  } else {
    this.tableElt.addClass('as-has-fixed-col');
  }
}
DTDataAdapter.prototype.revoke = function () {
  this.tableElt = null;
  this.data = null;
};
DTDataAdapter.prototype.render = function () {
  if (this.tableElt.table) this.tableElt.table.revokeResource();
  this.tableElt.table = new _DTTable["default"](this.tableElt, this.data);
};
DTDataAdapter.prototype.renderHeadCell = function (elt, data, controller) {
  if (data.child) {
    if (data.child.map) {
      elt.addChild(data.child.map(function (it) {
        return (0, _ACore._)(it);
      }));
    } else {
      elt.addChild((0, _ACore._)(data.child));
    }
  }
  if (data.render) {
    data.render.call(null, elt, data, controller);
  }
};
DTDataAdapter.prototype.renderBodyCell = function (elt, data, controller) {
  if (data.child) {
    if (data.child.map) {
      elt.addChild(data.child.map(function (it) {
        return (0, _ACore._)(it);
      }));
    } else {
      elt.addChild((0, _ACore._)(data.child));
    }
  }
  if (data.render) {
    data.render.call(null, elt, data, controller);
  }
  if (data.style) {
    elt.addStyle(data.style);
  }
};
var _default = DTDataAdapter;
exports["default"] = _default;

/***/ }),

/***/ 63005:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _DTHeadRow = _interopRequireDefault(__webpack_require__(67471));
var _ACore = __webpack_require__(34093);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {DTTable} table
 * @param {} data
 * @constructor
 */
function DTHead(table, data) {
  var _this = this;
  if (!data) data = {};
  if (!data.rows) data.rows = [];
  this.table = table;
  this._elt = null;
  this._copyElt = null;
  this._fixedXYElt = null;
  this._fixedXElt = null;
  this.data = data;
  this.rows = this.data.rows.map(function (rowData) {
    return new _DTHeadRow["default"](_this, rowData);
  });
  this.makeCellIdx();
}
DTHead.prototype.makeCellIdx = function () {
  var height = Array(200).fill(0);
  var i, j, k, row, cells, colIdx, cell, colspan, rowspan;
  for (i = 0; i < this.rows.length; ++i) {
    row = this.rows[i];
    cells = row.cells;
    colIdx = 0;
    for (j = 0; j < cells.length; ++j) {
      while (height[colIdx] > i) {
        ++colIdx;
      }
      cell = cells[j];
      cell.idx = colIdx;
      colspan = cell.colspan;
      rowspan = cell.rowspan;
      if (rowspan === this.rows.length) {
        cell.elt.addClass('as-matched-head-height');
      }
      for (k = 0; k < colspan; ++k) {
        height[colIdx] = i + rowspan;
        ++colIdx;
      }
    }
  }
};
DTHead.prototype.lockWidth = function () {
  this.rows.forEach(function (r) {
    return r.lockWidth();
  });
};
DTHead.prototype.updateCopyEltSize = function () {
  if (!this._copyElt) return;
  this.rows.forEach(function (r) {
    return r.updateCopyEltSize();
  });
};
Object.defineProperty(DTHead.prototype, 'elt', {
  get: function get() {
    if (this._elt) return this._elt;
    this._elt = (0, _ACore._)({
      tag: 'thead',
      "class": 'as-dt-header',
      child: this.rows.map(function (r) {
        return r.elt;
      })
    });
    if (this.data.style) this._elt.addStyle(this.data.style);
    return this._elt;
  }
});
Object.defineProperty(DTHead.prototype, 'copyElt', {
  get: function get() {
    if (this._copyElt) return this._copyElt;
    this._copyElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      child: this.rows.map(function (r) {
        return r.copyElt;
      })
    });
    return this._copyElt;
  }
});
Object.defineProperty(DTHead.prototype, 'fixedXYElt', {
  get: function get() {
    if (this._fixedXYElt) return this._fixedXYElt;
    this._fixedXYElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      "class": 'as-dt-fixed-xy',
      child: this.rows.map(function (r) {
        return r.fixedXYElt;
      })
    });
    return this._fixedXYElt;
  }
});
Object.defineProperty(DTHead.prototype, 'fixedXElt', {
  get: function get() {
    if (this._fixedXElt) return this._fixedXElt;
    this._fixedXElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      "class": 'as-dt-fixed-x',
      child: this.rows.map(function (r) {
        return r.fixedXElt;
      })
    });
    return this._fixedXElt;
  }
});
Object.defineProperty(DTHead.prototype, 'adapter', {
  get: function get() {
    return this.table.wrapper.adapter;
  }
});
var _default = DTHead;
exports["default"] = _default;

/***/ }),

/***/ 43489:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _utils = __webpack_require__(84512);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var implicitSortKeyArr = function implicitSortKeyArr(key) {
  var res;
  if (typeof key === 'string') {
    res = key.split(/[\s,;]+/);
  } else if (key instanceof Array) {
    res = key.slice();
  } else res = [];
  res = res.filter(function (k) {
    return !!k;
  }).map(function (k) {
    return k + '';
  });
  return res;
};

/***
 *
 * @param {DTHeadRow} row
 * @param data
 * @constructor
 */
function DTHeadCell(row, data) {
  this.row = row;
  this._elt = null;
  this._copyElt = null;
  this._copyElt1 = null;
  this._copyElt2 = null;
  if (data.attr) {
    Object.keys(data.attr).forEach(function (key) {
      var key2 = key.toLowerCase();
      if (key2 !== key) data.attr[key2] = data.attr[key];
    });
  }
  this.data = data;
  this._idx = null;
}
DTHeadCell.prototype.makeAutoSortAttribute = function () {
  var rows = this.row.head.table.data && this.row.head.table.data.body && this.row.head.table.data.body.rows;
  if (!rows || !rows.length) return;
  if (this.elt.attr('data-sort-key')) return;
  var idx = this.idx;
  var canSort = rows.every(function (row) {
    return row.cells[idx] && typeof row.cells[idx].innerText === 'string';
  });
  if (canSort) {
    this.elt.attr('data-sort-key', '[' + idx + ']');
    this.data.sortKey = '[' + idx + ']';
    this._elt.attr('data-sort-order', 'none');
    // this._elt.attr('title', 'Sort');
  }
};

Object.defineProperty(DTHeadCell.prototype, 'idx', {
  set: function set(value) {
    this._idx = value;
    this.elt.attr('data-col-idx', value + '');
    this.makeAutoSortAttribute();
  },
  get: function get() {
    return this._idx;
  }
});
DTHeadCell.prototype.nextSortState = function (event) {
  var _this = this;
  if (!this.elt.attr('data-sort-key')) return;
  var c = this.elt.attr('data-sort-order') || 'none';
  var n = {
    none: 'ascending',
    ascending: 'descending',
    descending: 'none'
  }[c] || 'none';
  var sortKeyArr = implicitSortKeyArr(this.data.sortKey || c);
  var sortBtn = this.$sortBtn;
  var followerElt, menuElt, items;
  if (sortKeyArr.length === 1) {
    (0, _ACore.$$)('th', this.row.elt).forEach(function (elt) {
      if (elt === _this.elt) return;
      if (elt.attr('data-sort-key')) {
        elt.attr('data-sort-order', 'none');
      }
    });
    this.elt.attr('data-sort-order', n);
    this.row.head.table.wrapper.requestQuery();
  } else {
    items = [{
      text: 'Không sắp xếp',
      value: {
        key: sortKeyArr.join(';'),
        order: 'none'
      },
      icon: 'span.mdi.mdi-sort-variant-off'
    }];
    if (c === 'none') {
      items[0].extendStyle = {
        color: '#007bff'
      };
    }
    sortKeyArr.forEach(function (key) {
      items.push('-------');
      var text = _this.data.sortMenu && _this.data.sortMenu[key] && _this.data.sortMenu[key][0];
      text = text || "Tăng theo " + key;
      var item = {
        icon: 'span.mdi.mdi-sort-ascending',
        text: text,
        value: {
          key: key,
          order: 'ascending'
        }
      };
      if (key === _this.elt.attr('data-sort-key') && c === 'ascending') {
        item.extendStyle = {
          color: '#007bff'
        };
      }
      items.push(item);
      text = _this.data.sortMenu && _this.data.sortMenu[key] && _this.data.sortMenu[key][1];
      text = text || "Tăng theo " + key;
      item = {
        icon: 'span.mdi.mdi-sort-descending',
        text: text,
        value: {
          key: key,
          order: 'descending'
        }
      };
      if (key === _this.elt.attr('data-sort-key') && c === 'descending') {
        item.extendStyle = {
          color: '#007bff'
        };
      }
      items.push(item);
    });
    menuElt = (0, _ACore._)({
      tag: 'vmenu',
      props: {
        items: items
      },
      on: {
        press: function press(event) {
          var value = event.menuItem.value;
          (0, _ACore.$$)('th', _this.row.elt).forEach(function (elt) {
            if (elt === _this.elt) return;
            if (elt.attr('data-sort-key')) {
              elt.attr('data-sort-order', 'none');
            }
          });
          _this.elt.attr('data-sort-order', value.order);
          _this.elt.attr('data-sort-key', value.key);
          _this.row.head.table.wrapper.requestQuery();
          finish();
        }
      }
    });
    followerElt = (0, _ACore._)({
      tag: _Follower["default"],
      "class": 'absol-context-menu-anchor',
      style: {
        zIndex: (0, _utils.findMaxZIndex)(sortBtn) + 22
      },
      child: [menuElt],
      props: {
        followTarget: sortBtn
      }
    }).addTo(document.body);
    var finish = function finish() {
      document.removeEventListener('click', finish);
      followerElt.remove();
    };
    setTimeout(function () {
      followerElt.addStyle('visibility', 'visible').addStyle('opacity', 1);
    }, 5);
  }
};
DTHeadCell.prototype.updateCopyContent = function () {
  var _this2 = this;
  var makeCopyChildren = function makeCopyChildren() {
    return Array.prototype.map.call(_this2._elt.childNodes, function (elt) {
      return elt.cloneNode(true);
    });
  };
  if (this._copyElt1) {
    this._copyElt1.clearChild().addChild(makeCopyChildren());
  }
  if (this._copyElt2) {
    this._copyElt2.clearChild().addChild(makeCopyChildren());
  }
  if (this._copyElt) {
    this._copyElt.clearChild().addChild(makeCopyChildren());
  }
  _ResizeSystem["default"].updateUp(this._elt);
  _ResizeSystem["default"].requestUpdateUpSignal(this._elt);
};
DTHeadCell.prototype.requestUpdateContent = function () {
  if (this.ucTO > 0) return;
  // this.ucTO = setTimeout(() => {
  this.ucTO = -1;
  this.updateCopyContent();
  // }, 20)
};

DTHeadCell.prototype.updateCopyEltSize = function () {
  if (!this._copyElt && !this._copyElt1 && !this._copyElt2) return;
  // copyElt is in space
  var bound = this._copyElt.getBoundingClientRect();
  var matchHeight = this._elt.hasClass('as-matched-head-height');
  this._elt.addStyle('width', bound.width + 'px');
  if (matchHeight) this._elt.addStyle('min-width', bound.width + 'px');
  if (this._copyElt1) {
    this._copyElt1.addStyle('width', bound.width + 'px');
    if (matchHeight) this._copyElt1.addStyle('min-width', bound.width + 'px');
  }
  if (this._copyElt2) {
    this._copyElt2.addStyle('width', bound.width + 'px');
    if (matchHeight) this._copyElt2.addStyle('min-width', bound.width + 'px');
  }
};
Object.defineProperty(DTHeadCell.prototype, 'elt', {
  get: function get() {
    var _this3 = this;
    if (this._elt) return this._elt;
    var eventAdded = false;
    var onPointerDown = function onPointerDown(event) {
      if (event.target.hasClass && event.target.hasClass('as-dt-header-cell-resizer')) return;
      if (!eventAdded) {
        document.addEventListener('pointerup', onPointerUp);
        eventAdded = true;
      }
    };
    var onPointerUp = function onPointerUp() {
      document.removeEventListener('pointerup', onPointerUp);
      eventAdded = false;
      _this3.nextSortState();
    };
    this._elt = (0, _ACore._)({
      tag: 'th',
      "class": 'as-dt-header-cell'
    }).on('pointerdown', onPointerDown);
    if (this.data.attr) {
      this._elt.attr(this.data.attr);
    }
    if (this.data.style) {
      this._elt.addStyle(this.data.style);
    }
    if (this.data.id !== null && this.data.id !== undefined) {
      this._elt.attr('data-col-id', this.data.id + '');
    }
    this.row.head.table.adapter.renderHeadCell(this._elt, this.data, this);
    var sortKeyArr = implicitSortKeyArr(this.data.sortKey);
    if (sortKeyArr.length > 0) {
      this._elt.attr('data-sort-key', sortKeyArr.join(';'));
      this._elt.attr('data-sort-order', 'none');
      // this._elt.attr('title', 'Sort');
    }

    this.$sortBtn = (0, _ACore._)({
      tag: 'span',
      "class": 'as-dt-sort-btn',
      child: [{
        tag: 'span',
        "class": ['mdi', 'mdi-menu-up']
        // child: { text: '🡑' }
      }, {
        tag: 'span',
        "class": ['mdi', 'mdi-menu-down']
      }]
    });
    this.$resizer = (0, _ACore._)({
      "class": 'as-dt-header-cell-resizer'
    });
    this._elt.addChild(this.$sortBtn);
    this._elt.addChild(this.$resizer);
    var ctrl = this;
    // setTimeout(() => {
    //     var addChild = this._elt.addChild;
    //     var clearChild = this._elt.clearChild;
    //     this._elt.addChild = function () {
    //         ctrl.requestUpdateContent();
    //         addChild.apply(this, arguments);
    //     };
    //     this._elt.clearChild = function () {
    //         ctrl.requestUpdateContent();
    //         clearChild.apply(this, arguments);
    //     };
    // }, 10);
    // listenDomContentChange(this._elt, (event) => {
    //     this.requestUpdateContent();
    // });
    setTimeout(function () {
      (0, _utils.listenDomContentChange)(_this3._elt, function (event) {
        _this3.requestUpdateContent();
      });
    }, 10);
    return this._elt;
  }
});
Object.defineProperty(DTHeadCell.prototype, 'copyElt', {
  get: function get() {
    if (this._copyElt) return this._copyElt;
    this._copyElt = (0, _ACore.$)(this.elt.cloneNode(true)).addClass('as-copy-elt');
    if (this.data.style && this.data.style.width) {
      var self = this;
      setTimeout(function wait() {
        if (self._copyElt.isDescendantOf(document.body)) {
          self._copyElt.addStyle('width', self._copyElt.getBoundingClientRect().width + 'px');
        } else {
          setTimeout(wait, 10);
        }
      }, 10);
    }
    return this._copyElt;
  }
});
Object.defineProperty(DTHeadCell.prototype, 'copyElt1', {
  get: function get() {
    if (this._copyElt1) return this._copyElt1;
    this._copyElt1 = (0, _ACore.$)(this.elt.cloneNode(true)).addClass('as-copy-elt-1');
    return this._copyElt1;
  }
});
Object.defineProperty(DTHeadCell.prototype, 'copyElt2', {
  get: function get() {
    if (this._copyElt2) return this._copyElt2;
    this._copyElt2 = (0, _ACore.$)(this.elt.cloneNode(true)).addClass('as-copy-elt-2');
    return this._copyElt2;
  }
});
Object.defineProperty(DTHeadCell.prototype, 'colspan', {
  get: function get() {
    var value = this.data.attr && this.data.attr.colspan;
    if (typeof value === "string") value = parseInt(value);
    if (typeof value === "number") return value;else return 1;
  }
});
Object.defineProperty(DTHeadCell.prototype, 'rowspan', {
  get: function get() {
    var value = this.data.attr && this.data.attr.rowspan;
    if (typeof value === "string") value = parseInt(value);
    if (typeof value === "number") return value;else return 1;
  }
});
var _default = DTHeadCell;
exports["default"] = _default;

/***/ }),

/***/ 67471:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _DTHeadCell = _interopRequireDefault(__webpack_require__(43489));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/****
 * table layer: copyElt
 * fixY layer : copyElt1 -  elt
 * fixXY layer: elt
 *
 */

/***
 *
 * @param {DTHead} head
 * @param data
 * @constructor
 */
function DTHeadRow(head, data) {
  var _this = this;
  this.head = head;
  this.data = data;
  this.cells = this.data.cells.map(function (cellData) {
    return new _DTHeadCell["default"](_this, cellData);
  });
  this._elt = null;
  this._copyElt = null;
  this._fixedXYElt = null;
  this._fixedXElt = null;
}
DTHeadRow.prototype.updateCopyEltSize = function () {
  if (!this._fixedXElt) return;
  var bound = this._copyElt.getBoundingClientRect();
  if (this._fixedXElt) this._fixedXElt.addStyle('height', bound.height + 'px');
  if (this._fixedXYElt) this._fixedXYElt.addStyle('height', bound.height + 'px');
  this._elt.addStyle('height', bound.height + 'px');
  this.cells.forEach(function (c) {
    return c.updateCopyEltSize();
  });
};
Object.defineProperty(DTHeadRow.prototype, 'elt', {
  get: function get() {
    if (this._elt) return this._elt;
    var fixedCol = this.adapter.fixedCol || 0;
    var child = this.cells.filter(function (c) {
      return c.idx < fixedCol;
    }).map(function (c) {
      return c.copyElt1;
    });
    var child1 = this.cells.filter(function (c) {
      return c.idx >= fixedCol;
    }).map(function (c) {
      return c.elt;
    });
    this._elt = (0, _ACore._)({
      tag: 'tr',
      "class": 'as-dt-head-row',
      child: child.concat(child1)
    });
    if (this.data.attr) {
      this.elt.attr(this.data.attr);
    }
    if (this.data.style) {
      this.elt.addStyle(this.data.style);
    }
    return this._elt;
  }
});
Object.defineProperty(DTHeadRow.prototype, 'fixedXYElt', {
  get: function get() {
    if (this._fixedXYElt) return this._fixedXYElt;
    var fixedCol = this.adapter.fixedCol || 0;
    this._fixedXYElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      "class": 'as-dt-fixed-xy',
      child: this.cells.filter(function (c) {
        return c.idx < fixedCol;
      }).map(function (c) {
        return c.elt;
      })
    });
    return this._fixedXYElt;
  }
});
Object.defineProperty(DTHeadRow.prototype, 'fixedXElt', {
  get: function get() {
    if (this._fixedXElt) return this._fixedXElt;
    var fixedCol = this.adapter.fixedCol || 0;
    this._fixedXElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      "class": 'as-dt-fixed-x',
      child: this.cells.filter(function (c) {
        return c.idx < fixedCol;
      }).map(function (c) {
        return c.copyElt2;
      })
    });
    return this._fixedXElt;
  }
});
Object.defineProperty(DTHeadRow.prototype, 'copyElt', {
  get: function get() {
    if (this._copyElt) return this.copyElt;
    var adapter = this.adapter;
    this._copyElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      child: this.cells.map(function (c) {
        return c.copyElt;
      })
    });
    return this._copyElt;
  }
});
Object.defineProperty(DTHeadRow.prototype, 'adapter', {
  get: function get() {
    return this.head.adapter;
  }
});
var _default = DTHeadRow;
exports["default"] = _default;

/***/ }),

/***/ 87060:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function DTSearchFactor(global) {
  /***
   * @typedef SelectionItem2
   * @property {String} text
   * @property {String} desc
   * @property {String} __text__
   * @property {String} __nvnText__
   * @property {Array<String>} __words__
   * @property {Array<String>} __nvnWords__
   * @property {object} __wordDict__
   * @property {object} __nvnWordDict__
   * @module SelectionItem2
   */

  function nonAccentVietnamese(s) {
    return s.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g, "a").replace(/À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ/g, "A").replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g, "e").replace(/È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ/g, "E").replace(/ì|í|ị|ỉ|ĩ/g, "i").replace(/Ì|Í|Ị|Ỉ|Ĩ/g, "I").replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g, "o").replace(/Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ/g, "O").replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g, "u").replace(/Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ/g, "U").replace(/ỳ|ý|ỵ|ỷ|ỹ/g, "y").replace(/Ỳ|Ý|Ỵ|Ỷ|Ỹ/g, "Y").replace(/đ/g, "d").replace(/Đ/g, "D").replace(/\u0300|\u0301|\u0303|\u0309|\u0323/g, "").replace(/\u02C6|\u0306|\u031B/g, "");
  }
  function harmonicMean(a, b) {
    return 2 / (1 / a + 1 / b);
  }
  function wordLike(a, b) {
    var m = a.length;
    var n = b.length;
    function map(i, j) {
      return i * (n + 1) + j;
    }
    var Q = Array((m + 1) * (n + 1)).fill(0);
    for (var i = 0; i < m; ++i) {
      for (var j = 0; j < n; ++j) {
        if (a.charAt(i) == b.charAt(j)) {
          if (Q[map(i + 1, j + 1)]) {
            if (Q[map(i + 1, j + 1)] < Q[map(i, j)] + 1) Q[map(i + 1, j + 1)] = Q[map(i, j)] + 1;
          } else Q[map(i + 1, j + 1)] = Q[map(i, j)] + 1;
        } else Q[map(i + 1, j + 1)] = Math.max(Q[map(i + 1, j)], Q[map(i, j + 1)]);
      }
    }
    return Q[map(m, n)] / harmonicMean(m, n);
  }
  function wordsMatch(sq1, sq2, matchWordPow) {
    matchWordPow = matchWordPow === undefined ? 1 : matchWordPow;
    var m = sq1.length;
    var n = sq2.length;
    function map(i, j) {
      return i * (n + 1) + j;
    }
    var Q = Array((m + 1) * (n + 1)).fill(0);
    var e = 0.0;
    for (var i = 0; i < m; ++i) {
      for (var j = 0; j < n; ++j) {
        e = Math.pow(wordLike(sq1[i], sq2[j]), matchWordPow);
        if (Q[map(i + 1, j + 1)]) {
          if (Q[map(i + 1, j + 1)] < Q[map(i, j)] + e) Q[map(i + 1, j + 1)] = Q[map(i, j)] + e;
        } else Q[map(i + 1, j + 1)] = Q[map(i, j)] + e;
        e = Math.max(Q[map(i + 1, j)], Q[map(i, j + 1)]);
        if (e > Q[map(i + 1, j + 1)]) Q[map(i + 1, j + 1)] = e;
      }
    }
    return Q[map(m, n)];
  }
  var EXTRA_MATCH_SCORE = 9;
  var NVN_EXTRA_MATCH_SCORE = 8;
  var EQUAL_MATCH_SCORE = 10;
  var WORD_MATCH_SCORE = 3;
  var HAS_WORD_SCORE = 30;
  var HAS_NVN_WORD_SCORE = 29;

  /***
   *
   * @param {SelectionItem} item
   * @returns {*}
   */
  function prepareSearchForItem(item) {
    if (!item.text || !item.text.charAt) item.text = item.text + '';
    var splitter = /([_\s\b\-()\[\]"']|&#8239;|&nbsp;|&#xA0;")+/g;
    var text = item.text.replace(splitter, ' ');
    var __words__ = text.split(/\s+/).filter(function (w) {
      return !!w;
    }).map(function (w) {
      return w.toLowerCase();
    });
    var __text__ = __words__.join(' ');
    var __wordDict__ = __words__.reduce(function (ac, cr, i) {
      ac[cr] = ac[cr] || i + 1;
      return ac;
    }, {});
    var __nvnText__ = nonAccentVietnamese(__text__);
    var __nvnWords__ = __words__.map(function (w) {
      return nonAccentVietnamese(w);
    });
    var __nvnWordDict__ = __nvnWords__.reduce(function (ac, cr, i) {
      ac[cr] = ac[cr] || i + 1;
      return ac;
    }, {});
    Object.defineProperties(item, {
      __text__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __text__
      },
      __words__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __words__
      },
      __wordDict__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __wordDict__
      },
      __textNoneCase__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __text__
      },
      __wordsNoneCase__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __words__
      },
      __nvnText__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __nvnText__
      },
      __nvnWords__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __nvnWords__
      },
      __nvnWordDict__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __nvnWordDict__
      },
      __nvnTextNoneCase__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __nvnText__
      },
      __nvnWordsNoneCase__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __nvnWords__
      }
    });
    return item;
  }
  function isItemMustIncluded(queryItem, item) {
    if (!queryItem) return true;
    if (item.__nvnText__.indexOf(queryItem.__nvnText__) >= 0) {
      return true;
    }
    var dict1 = queryItem.__nvnWordDict__;
    var dict2 = item.__nvnWordDict__;
    for (var i in dict1) {
      for (var j in dict2) {
        if (j.indexOf(i) < 0) return false;
      }
    }
    return true;
  }
  function calcItemMatchScore(queryItem, item) {
    var score = 0;
    if (!item.__text__) return 0;
    function calcByWordDict(queryWords, wordDict) {
      var hwScore = 0;
      var i;
      wordDict = Object.assign({}, wordDict);
      var bestWordMatched,
        bestWordMatchScore = 0;
      var word, wordScore;
      for (i = 0; i < queryWords.length; ++i) {
        bestWordMatchScore = 0;
        bestWordMatched = null;
        for (word in wordDict) {
          wordScore = wordLike(word, queryWords[i]) - 1e-3 * wordDict[word];
          if (wordScore > bestWordMatchScore) {
            bestWordMatched = word;
            bestWordMatchScore = wordScore;
          }
        }
        if (bestWordMatchScore > 0) {
          hwScore += bestWordMatchScore * WORD_MATCH_SCORE;
          delete wordDict[bestWordMatched];
        }
      }
      return hwScore;
    }
    score += calcByWordDict(queryItem.__words__, item.__wordDict__);
    score += calcByWordDict(queryItem.__nvnWords__, item.__nvnWordDict__);
    if (item.__text__ === queryItem.__text__) {
      score += EQUAL_MATCH_SCORE;
    }
    var extraIndex = item.__text__.indexOf(queryItem.__text__);
    if (extraIndex >= 0) {
      score += EXTRA_MATCH_SCORE;
    }
    extraIndex = item.__nvnText__.indexOf(queryItem.__nvnText__);
    if (extraIndex >= 0) {
      score += EXTRA_MATCH_SCORE;
    }
    score += Math.max(wordsMatch(queryItem.__words__, item.__words__), wordsMatch(queryItem.__nvnWords__, item.__nvnWords__)) / Math.max(queryItem.__words__.length + 1, 1);
    return score;
  }
  function scoreCmp(a, b) {
    if (b.score === a.score) {
      if (b.item.__nvnText__ > a.item.__nvnText__) return -1;
      return 1;
    }
    return b.score - a.score;
  }
  function keyStringOf(o) {
    var type = _typeof(o);
    var keys;
    if (o && type === "object") {
      if (o.getTime) {
        return 'd(' + o.getTime() + ')';
      } else if (o.length && o.map) {
        return 'a(' + o.map(function (val) {
          return keyStringOf(val);
        }).join(',') + ')';
      } else {
        keys = Object.keys(o);
        keys.sort();
        return 'o(' + keys.map(function (key) {
          return key + ':' + keyStringOf(o[key]);
        }).join(',') + ')';
      }
    } else {
      return type[0] + '(' + o + ')';
    }
  }
  function matchFilter(item, filter) {
    if (!filter) return true;
    var keys = item.keys;
    if (!keys) return false;
    for (var i in filter) {
      if (!keyCmp(keys[i], filter[i])) return false;
    }
    return true;
  }
  function toComparable(x) {
    if (!x) return x;
    var type = _typeof(x);
    if (type === 'string') return x;
    if (type === "number") return x;
    if (type === "boolean") return x;
    if (type.getTime) return type.getTime();
    return x;
  }
  function keyCmp(itemKey, filterKey) {
    if (itemKey === filterKey) return true;
    if (!itemKey !== !filterKey) return false;
    if (!itemKey || !filterKey) return false;
    var filterKeyString = keyStringOf(filterKey);
    function withFilter(x) {
      var xString = keyStringOf(x);
      var res = xString === filterKeyString;
      if (!res && _typeof(filterKey) === "object") {
        if (filterKey.some) {
          res = filterKey.some(function (y) {
            return keyStringOf(y) === x;
          });
        } else if ('min' in filterKey || 'max' in filterKey) {
          res = true;
          if ('min' in filterKey) {
            res = res && toComparable(x) >= toComparable(filterKey.min);
          }
          if ('max' in filterKey) {
            res = res && toComparable(x) <= toComparable(filterKey.max);
          }
        }
      }
      return res;
    }
    if (itemKey.some) {
      return itemKey.some(withFilter);
    } else return withFilter(itemKey);
  }
  var benchmark = global.calcBenchmark();

  /******************************************************************************************************************/

  var slaves = {};
  function SearchingSlave(id) {
    this.id = id;
    this.items = [];
    this.itemVersion = -1;
    this.tranferFinished = true;
    this.pendingTask = null;
    this.taskSession = Math.random() + '';
    this.scoredHolders = [];
    this.searchingSession = Math.random() + '';
  }
  SearchingSlave.prototype.onReceiveItems = function (n, start, end, items, version) {
    if (this.scoredHolders.length > start) {
      this.scoredHolders.splice(start);
    }
    var cItems = this.items;
    if (cItems.length < n) {
      // sessionItems
      cItems.push(null);
    }
    if (cItems.length > n) {
      cItems.splice(n);
    }
    this.itemVersion = version;
    for (var i = start; i < end; ++i) {
      cItems[i] = items[i - start];
    }
    if (end === n) {
      this.tranferFinished = true;
      this.doTask();
    } else {
      this.tranferFinished = false;
    }
  };
  SearchingSlave.prototype.doTask = function () {
    if (!this.pendingTask) return;
    if (this.searchingSession === this.taskSession) return;
    var self = this;
    this.searchingSession = this.taskSession;
    var session = this.searchingSession;
    var items = this.items;
    var its = this.scoredHolders;
    var taskData = this.pendingTask;
    var itemVersion = this.itemVersion;
    var queryText = taskData.query.text;
    var filter = taskData.query.filter;
    var sort = taskData.query.sort;
    var queryTextItem = null;
    if (queryText) queryTextItem = prepareSearchForItem({
      text: queryText
    });
    var sortCmp = function sortCmp(a, b) {
      var aKeys = a.item.keys;
      var bKeys = b.item.keys;
      var key;
      var av, bv;
      var d = 0;
      if (aKeys && !bKeys) {
        d = 1;
      } else if (!aKeys && bKeys) {
        d = -1;
      } else if (aKeys && bKeys) {
        for (var i = 0; i < sort.length; ++i) {
          key = sort[i].key;
          d = aKeys[key] - bKeys[key];
          if (isNaN(d)) {
            if (aKeys[key] < bKeys[key]) {
              d = -1;
            } else if (aKeys[key] === bKeys[key]) {
              d = 0;
            } else {
              d = 1;
            }
          }
          if (sort[i].order === 'descending') d = -d;
          if (d !== 0) break;
        }
      }
      if (d === 0) {
        d = a.i - b.i;
      }
      return d;
    };
    function likeSort(items) {
      var minValue = Infinity;
      var maxValue = -Infinity;
      var i;
      var n = items.length;
      var item;
      for (i = 0; i < n; ++i) {
        item = items[i];
        if (item.score < minValue) minValue = item.score;
        if (item.score > maxValue) maxValue = item.score;
      }
      var segments = [[], [], [], [], [], [], [], []];
      var threshold = maxValue - (maxValue - minValue) / 4;
      if (maxValue < 3) threshold = maxValue - (maxValue - minValue) / 8;
      var d = (maxValue - threshold) / (segments.length - 1);
      var v;
      var k;
      for (i = 0; i < n; ++i) {
        item = items[i];
        v = item.score;
        if (item.mustIncluded) v = Math.max(threshold + 0.1, v);
        if (v < threshold || v < 0.8) continue;
        if (v >= maxValue) segments[segments.length - 1].push(item);else {
          k = (v - threshold) / d >> 0;
          segments[k].push(item);
        }
      }
      var res = [];
      var segment;
      while (segments.length > 0) {
        segment = segments.pop();
        if (segment.length > 0) {
          if (sort) {
            segment.sort(sortCmp);
          } else {
            if (segment.length + res.length < 1000) segment.sort(scoreCmp);
          }
          res = res.concat(segment);
        }
      }
      return res;
    }
    function sortScore() {
      var result = its;
      if (filter) {
        result = result.filter(function (x) {
          return !!x;
        });
      }

      // var now = new Date().getTime();

      if (queryTextItem) {
        result = likeSort(result);
      } else if (sort) {
        result.sort(sortCmp);
      }

      // console.log("SortTime:", new Date().getTime() - now)
      result = result.map(function (it) {
        return it.i;
      });
      self.searchingSession = 'done';
      global.emit('searchEnd', self.id, Object({
        hash: taskData.hash,
        idx: taskData.idx,
        result: result,
        itemVersion: self.itemVersion
      }));
    }
    function tick() {
      if (self.taskSession !== session) return;
      if (self.itemVersion !== itemVersion) {
        return;
      }
      if (its.length >= items.length) {
        sortScore();
        return;
      }
      var k = benchmark * 5;
      if (!queryTextItem) k *= 30;
      var i = its.length;
      var n = items.length;
      while (k-- && i < n) {
        if (!filter || matchFilter(items[i], filter)) {
          if (!items[i].prepare && queryTextItem) {
            items[i].prepare = true;
            prepareSearchForItem(items[i]);
          }
          its.push({
            i: i,
            item: items[i],
            score: queryTextItem ? calcItemMatchScore(queryTextItem, items[i]) : 0,
            mustIncluded: isItemMustIncluded(queryTextItem, items[i])
          });
        } else {
          its.push(null);
        }
        ++i;
      }
      setTimeout(tick, 5);
    }
    tick();
  };
  SearchingSlave.prototype.receiveTask = function (taskData) {
    this.pendingTask = taskData && taskData.query && taskData;
    this.taskSession = taskData && taskData.idx;
    this.scoredHolders = [];
    if (this.tranferFinished && this.pendingTask) this.doTask();
  };
  SearchingSlave.prototype.destroy = function () {
    this.items = null;
    delete slaves[this.id];
  };
  global.destroySlave = function (id) {
    slaves[id] && slaves[id].destroy();
  };

  /******************************************************************************************************************/
  var data = {};
  global.transferTask = function (id, taskData) {
    slaves[id] = slaves[id] || new SearchingSlave(id);
    slaves[id] && slaves[id].receiveTask(taskData);
  };
  global.transferSearchItems = function (id, n, start, end, items, version) {
    slaves[id] = slaves[id] || new SearchingSlave(id);
    slaves[id].onReceiveItems(n, start, end, items, version);
  };
  global.search = function (session, query) {
    var holder = data[session];
    if (!holder) return false;
    var searchingSession = Math.random() + '';
    holder.searchingSession = searchingSession;
    var now = new Date().getTime();
    var items = data[session] && data[session].items;
    var its = Array(items.length);
    var queryItem = prepareSearchForItem({
      text: query
    });
    var resolve;
    var sync = new Promise(function (rs) {
      resolve = rs;
    });
    function calcValue() {
      var i = 0;
      var n = items.length;
      function tick() {
        if (searchingSession !== holder.searchingSession) {
          resolve(false);
          return;
        }
        var c = benchmark * 5;
        while (c-- && i < n) {
          its[i] = {
            i: i,
            item: items[i],
            score: calcItemMatchScore(queryItem, items[i])
          };
          ++i;
        }
        if (i < n) {
          setTimeout(tick, 3);
        } else {
          setTimeout(sortScore, 3);
        }
      }
      tick();
    }
    function sortScore() {
      if (searchingSession !== holder.searchingSession) {
        resolve(false);
        return;
      }
      now = new Date().getTime();
      var result = likeSort(its).map(function (it) {
        return it.i;
      });
      resolve(result);
    }
    setTimeout(calcValue, 3);
    return sync;
  };
}
var _default = DTSearchFactor;
exports["default"] = _default;
DTSearchFactor.exportCode = function () {
  var res = DTSearchFactor + '' + '\n\nDTSearchFactor(this)';
  return res;
};

/***/ }),

/***/ 98933:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _DTHead = _interopRequireDefault(__webpack_require__(63005));
var _DTBody = _interopRequireDefault(__webpack_require__(71098));
var _ACore = __webpack_require__(34093);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {DynamicTable} elt
 * @param {} data
 * @constructor
 */

function DTTable(wrapper, data) {
  this.wrapper = wrapper;
  this._elt = null;
  this._fixedXElt = null;
  this._fixedXYElt = null;
  this._fixedYElt = null;
  /***
   *
   * @type {DTDataTable|null|*|string}
   */
  this.adapter = this.wrapper._adapter;
  this.data = data;
  this.header = new _DTHead["default"](this, this.data.head);
  this.body = new _DTBody["default"](this, this.data.body);
}
DTTable.prototype.updateCopyEltSize = function () {
  if (!this._fixedYElt) return;
  var bound = this._elt.getBoundingClientRect();
  this._fixedYElt.parentElement.addStyle('width', bound.width + 'px');
  this.header.updateCopyEltSize();
  this.body.updateCopyEltSize();
};
DTTable.prototype.revokeResource = function () {
  this.wrapper = null;
  this._elt = null;
  this.adapter = null;
  this.data = null;
  this.body.revokeResource();
};
Object.defineProperty(DTTable.prototype, 'elt', {
  get: function get() {
    if (this._elt) return this._elt;
    this._elt = (0, _ACore._)({
      tag: 'table',
      "class": 'as-dynamic-table',
      child: [this.header.copyElt, this.body.elt]
    });
    return this._elt;
  }
});
Object.defineProperty(DTTable.prototype, 'fixedXElt', {
  get: function get() {
    if (this._fixedXElt) return this._fixedXElt;
    this._fixedXElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      "class": 'as-fixed-x',
      child: [this.header.fixedXElt, this.body.fixedXElt]
    });
    return this._fixedXElt;
  }
});
Object.defineProperty(DTTable.prototype, 'fixedYElt', {
  get: function get() {
    if (this._fixedYElt) return this._fixedYElt;
    this._fixedYElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      "class": 'as-dt-fixed-y',
      child: [this.header.elt]
    });
    return this._fixedYElt;
  }
});
Object.defineProperty(DTTable.prototype, 'fixedXYElt', {
  get: function get() {
    if (this._fixedXYElt) return this._fixedXYElt;
    this._fixedXYElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      "class": 'as-dt-fixed-y',
      child: [this.header.fixedXYElt]
    });
    return this._fixedXYElt;
  }
});
var _default = DTTable;
exports["default"] = _default;

/***/ }),

/***/ 23242:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 *
 * @param {DynamicTable} tableElt
 * @constructor
 */
function DTWaitingViewController(tableElt) {
  this.tableElt = tableElt;
  this.tokens = {};
  this.traceToken = {};
  this.timeoutIdx = -1;
}
DTWaitingViewController.prototype.begin = function () {
  var token = Math.random() + '';
  if (this.tableElt.$searchInput) this.tableElt.$searchInput.waiting = true;
  this.tokens[token] = true;
  this.traceToken[token] = new Error(token);
  if (this.timeoutIdx > 0) {
    clearTimeout(this.timeoutIdx);
    this.timeoutIdx = -1;
  }
  return token;
};
DTWaitingViewController.prototype.end = function (token) {
  delete this.tokens[token];
  delete this.traceToken[token];
  if (this.timeoutIdx > 0) {
    clearTimeout(this.timeoutIdx);
  }
  this.timeoutIdx = setTimeout(function () {
    this.timeoutIdx = -1;
    for (var i in this.tokens) {
      return;
    }
    if (this.tableElt.$searchInput) this.tableElt.$searchInput.waiting = false;
  }.bind(this), 100);
};
var _default = DTWaitingViewController;
exports["default"] = _default;

/***/ }),

/***/ 76688:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _DTDataAdapter = _interopRequireDefault(__webpack_require__(38064));
__webpack_require__(3505);
var _DTWaitingViewController = _interopRequireDefault(__webpack_require__(23242));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _utils = __webpack_require__(84512);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _Dom = __webpack_require__(64821);
var _Scroller = __webpack_require__(87780);
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _DTTable = _interopRequireDefault(__webpack_require__(98933));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _DynamicCSS = _interopRequireDefault(__webpack_require__(30401));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _stringGenerate = __webpack_require__(10713);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _attribute = __webpack_require__(18144);
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _stringFormat = __webpack_require__(22294);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _loadStyleSheet = function loadStyleSheet() {
  var dynamicStyleSheet = {};
  var key = Array(20).fill(0).map(function (u, i) {
    return ['.as-dynamic-table-wrapper.as-hide-col-' + i + ' td[data-col-idx="' + i + '"]', '.as-dynamic-table-wrapper.as-hide-col-' + i + ' th[data-col-idx="' + i + '"]'].join(', ');
  }).join(',\n');
  dynamicStyleSheet[key] = {
    display: 'none'
  };
  (0, _utils.buildCss)(dynamicStyleSheet);
  _loadStyleSheet = _noop["default"];
};
function DynamicTableManager() {
  this.tables = [];
  this.storageChanged = false;
}
DynamicTableManager.prototype.STORE_KEY = 'DynamicTableSetting';
DynamicTableManager.prototype.VER = 2;
DynamicTableManager.prototype.initIfNeed = function () {
  if (this.css) return;
  this.css = new _DynamicCSS["default"]();
  this.css.elt.setAttribute('id', "dynamic_mng");
  this.tables = [];
  try {
    var json = localStorage.getItem(this.STORE_KEY);
    if (json) {
      this.data = JSON.parse(json);
      if (!this.data || this.data.ver !== this.VER) this.data = null;
    }
  } catch (er) {}
  this.data = this.data || {
    ver: this.VER,
    colWidth: {}
  };
  this.initCss();
};
DynamicTableManager.prototype.initCss = function () {
  var _this = this;
  Object.keys(this.data.colWidth).forEach(function (tableId) {
    Object.keys(_this.data.colWidth[tableId]).forEach(function (colId) {
      var value = _this.data.colWidth[tableId][colId];
      _this.css.setProperty("#".concat(tableId, " th[data-col-id=\"").concat(colId, "\"]"), 'width', value + 'px');
    });
  });
  this.css.commit();
};
DynamicTableManager.prototype.add = function (table) {
  this.tables.push(table);
};
DynamicTableManager.prototype.removeTrash = function () {
  this.tables = this.tables.filter(function (table) {
    return table.isDescendantOf(document.body);
  });
};
DynamicTableManager.prototype.commitColWidth = function (sender, tableId, colId, value, storage) {
  this.setColWidth(tableId, colId, value, storage);
  this.removeTrash();
  this.commit();
  this.tables.forEach(function (table) {
    if (table.id === table && table !== sender) {
      table.requestUpdateSize();
    }
  });
};
DynamicTableManager.prototype.hasColSize = function (tableId, colId) {
  return this.data.colWidth[tableId] && this.data.colWidth[tableId][colId];
};
DynamicTableManager.prototype.setColWidth = function (tableId, colId, value, storage) {
  if (storage) {
    this.data.colWidth[tableId] = this.data.colWidth[tableId] || {};
    this.data.colWidth[tableId][colId] = value;
    this.storageChanged = true;
  }
  this.css.setProperty("#".concat(tableId, " th[data-col-id=\"").concat(colId, "\"]:not([colspan])"), 'width', value + 'px');
};
DynamicTableManager.prototype.commit = function () {
  if (this.storageChanged) {
    localStorage.setItem(this.STORE_KEY, JSON.stringify(this.data));
    this.storageChanged = false;
  }
  this.css.commit();
};
var manager = new DynamicTableManager();
var pendingTables = {};

/***
 * @extends AElement
 * @constructor
 */
function DynamicTable() {
  var _this2 = this;
  this._pendingId = (0, _stringGenerate.randomIdent)(4);
  pendingTables[this._pendingId] = this;
  manager.initIfNeed();
  _loadStyleSheet();
  this.css = new _DynamicCSS["default"]();
  this._hiddenColumns = [];
  /***
   *
   * @type {SearchTextInput|null}
   */
  this.$searchInput = null;
  /***
   *
   * @type {AElement}
   */
  this.$table = (0, _ACore.$)('.as-dynamic-table', this);
  /***
   *
   * @type {AElement}
   */
  this.$thead = (0, _ACore.$)('.as-dynamic-table>thead', this.$table);
  /***
   *
   * @type {AElement}
   */
  this.$tbody = (0, _ACore.$)('.as-dynamic-table>tbody', this.$table);
  this.$filterInputs = [];
  this.$attachhook = (0, _ACore._)('attachhook').addTo(this);
  this.$domSignal = (0, _ACore._)('attachhook').addTo(this);
  this.domSignal = new _DomSignal["default"](this.$domSignal);
  //controller
  this.table = null;
  this.$space = (0, _ACore.$)('.as-dynamic-table-space', this);
  this.$fixedYCtn = (0, _ACore.$)('.as-dynamic-table-fixed-y-ctn', this);
  this.$fixedXCtn = (0, _ACore.$)('.as-dynamic-table-fixed-x-ctn', this);
  this.$fixedXYCtn = (0, _ACore.$)('.as-dynamic-table-fixed-xy-ctn', this);
  this.$viewport = (0, _ACore.$)('.as-dynamic-table-viewport', this);
  this.$hscrollbar = (0, _ACore.$)('.as-dynamic-table-hb', this);
  this.$vscrollbar = (0, _ACore.$)('.as-dynamic-table-vb', this);
  this.$pageSelector = new VirtualPageSelector(this);
  this.extendStyle = Object.assign(new _Attributes["default"](this), this.extendStyle);
  this.extendStyle.loadAttributeHandlers(this.styleHandlers);

  // this.$attachhook.requestUpdateSize = this.fixedContentCtrl.updateSize.bind(this.fixedContentCtrl);
  this.$attachhook.requestUpdateSize = this.requestUpdateSize.bind(this);
  var trashTO = -1;
  this.readySync = new Promise(function (rs) {
    _this2.onReady = rs;
  });
  this.$attachhook.once('attached', function () {
    delete pendingTables[_this2._pendingId];
    // setTimeout(()=>{
    //     Object.values(pendingTables).forEach(table=>{
    //         if (!table.isDescendantOf(document.body))
    //         table.revokeResource();
    //     });
    // }, 5000);
    _ResizeSystem["default"].add(_this2.$attachhook);
    _this2.layoutCtrl.onAttached();
    _this2.colSizeCtrl.onAttached();
    manager.add(_this2);
    setTimeout(function () {
      _this2.requestUpdateSize();
      if (_this2.onReady) {
        _this2.onReady();
        _this2.onReady = null;
      }
    }, 10);
    clearTimeout(trashTO);
    var checkAlive = function checkAlive() {
      if (_this2.isDescendantOf(document.body)) {
        setTimeout(checkAlive, 2000);
      } else {
        _this2.revokeResource();
      }
    };
    setTimeout(checkAlive, 500);
  });

  /***
   *
   * @type {{data: DTDataTable}||null}
   */
  this.adapter = null;
  this.waitingCtl = new _DTWaitingViewController["default"](this);
  this.layoutCtrl = new LayoutController(this);
  this.pointerCtrl = new PointerController(this);
  this.colSizeCtrl = new ColSizeController(this);
  this.rowDragCtrl = new RowDragController(this);
}
DynamicTable.tag = 'DynamicTable'.toLowerCase();
DynamicTable.render = function (data, domDesc) {
  var width = domDesc.style && domDesc.style.width;
  var classList = ['as-dynamic-table-wrapper'];
  if (width === 'match_parent' || width === '100%') {
    classList.push('as-width-match-parent');
  }
  return (0, _ACore._)({
    id: 'no-id-' + (0, _stringGenerate.randomIdent)(10),
    extendEvent: ['orderchange', 'colresize'],
    "class": classList,
    child: [{
      tag: _Hanger["default"].tag,
      "class": 'as-dynamic-table-viewport',
      child: [{
        "class": 'as-dynamic-table-space'
      }, {
        "class": 'as-dynamic-table-fixed-y-ctn'
      }, {
        "class": 'as-dynamic-table-fixed-x-ctn'
      }, {
        "class": 'as-dynamic-table-fixed-xy-ctn'
      }]
    }, {
      tag: _Scroller.VScrollbar,
      "class": 'as-dynamic-table-vb'
    }, {
      tag: _Scroller.HScrollbar,
      "class": 'as-dynamic-table-hb'
    }]
  });
};
DynamicTable.prototype.extendStyle = {}; //init value

DynamicTable.prototype.extendStyle.tableLayout = 'fixed';
DynamicTable.prototype.extendStyle.width = 'auto';
DynamicTable.prototype.extendStyle.minWidth = 'unset';
DynamicTable.prototype.styleHandlers = {};
DynamicTable.prototype.styleHandlers.minWidth = {
  set: function set(value) {
    var parsedValue = (0, _attribute.parseMeasureValue)(value);
    if (!parsedValue) value = 'unset';else if (parsedValue.value === 'match_parent') value = '100%';else if (parsedValue.unit === 'px') value = parsedValue.value + parsedValue.unit;
    if (parsedValue && parsedValue.unit) {
      this.style.minWidth = value;
      this.addClass('as-has-min-width');
    } else {
      this.removeClass('as-has-min-width');
    }
    return value;
  }
};
DynamicTable.prototype.styleHandlers.width = {
  set: function set(value) {
    var parsedValue = (0, _attribute.parseMeasureValue)(value);
    if (!parsedValue) value = 'auto';else if (parsedValue.value === 'match_parent') value = '100%';else if (parsedValue.unit === 'px') value = parsedValue.value + parsedValue.unit;
    if (parsedValue && parsedValue.unit) {
      this.style.width = value;
      this.removeClass('as-width-auto');
    } else {
      this.addClass('as-width-auto');
    }
    return value;
  }
};
DynamicTable.prototype.styleHandlers.height = {
  set: function set(value) {
    //todo: handle expression
    var parsedValue;
    if (value && value.indexOf && value.indexOf('--') > 0) {
      this.style.height = value;
    } else {
      parsedValue = (0, _attribute.computeMeasureExpression)(value, {
        elt: this,
        parentSize: 0
      });
      if (!parsedValue) value = 'auto';else if (parsedValue.value === 'match_parent') value = '100%';else if (parsedValue.unit === 'px') value = parsedValue.value + parsedValue.unit;
      if (parsedValue && parsedValue.unit) {
        this.style.height = value;
        this.removeClass('as-auto-height');
      } else {
        this.addClass('as-auto-height');
      }
    }
    return value;
  }
};

//
// DynamicTable.prototype.width = function (value) {
//     this.extendStyle.minWidth = value;
// };
//

DynamicTable.prototype.styleHandlers.tableLayout = {
  /***
   * @this {DynamicTable}
   * @param value
   */
  set: function set(value) {
    if (value === 'fixed') {
      this.addClass('as-table-layout-fixed');
    } else {
      this.removeClass('as-table-layout-fixed');
      value = 'auto';
    }
    return value;
  }
};
DynamicTable.prototype.addStyle = function (arg0, arg1) {
  if (typeof arg0 === "string" && arg0 in this.extendStyle) {
    if (arg0.indexOf('-') > 0) arg0 = (0, _stringFormat.kebabCaseToCamelCase)(arg0); //not --
    this.extendStyle[arg0] = arg1;
  } else {
    _AElement["default"].prototype.addStyle.apply(this, arguments);
  }
  return this;
};
DynamicTable.prototype.requestUpdateSize = function () {
  this.layoutCtrl.onResize();
};
DynamicTable.prototype.revokeResource = function () {
  this.$attachhook.cancelWaiting();
  delete pendingTables[this._pendingId];
  this.css.stop();
  this.css = null;
  this.revokeResource = _noop["default"];
  return;
  var row, cell, keys, key;
  var rows = this._adapterData && this._adapterData.data && this._adapterData.data.body && this._adapterData.data.body.rows;
  // if (rows) {
  //     while (rows.length) {
  //         row = rows.pop();
  //         while (row.cells.length) {
  //             cell = row.cells.pop();
  //             keys = Object.keys(cell);
  //             while (keys.length){
  //                 key = keys.pop();
  //                 cell[key] = null;
  //                 delete cell[key];
  //             }
  //         }
  //     }
  // }
  // revokeResource(rows);

  if (this.table) {
    this.table.revokeResource();
    this.table = null;
  }
  if (this._adapter) {
    this._adapter.revoke();
    this._adapter = null;
  }
  this.attachSearchInput(null);
  this.filterInputs = [];
  this.waitingCtl = null;
  this.layoutCtrl = null;
  this.pointerCtrl = null;
  this.colSizeCtrl = null;
  this.rowDragCtrl = null;
  manager.removeTrash();
  _ResizeSystem["default"].removeTrash();
};
DynamicTable.prototype.getSavedState = function () {
  var res = {};
  res.scrollTop = this.$vscrollbar.innerOffset;
  res.scrollLeft = this.$hscrollbar.innerOffset;
  return res;
};
DynamicTable.prototype.setSavedState = function (state) {
  var _this3 = this;
  this.readySync.then(function () {
    state = state || {};
    _this3.$vscrollbar.innerOffset = state.scrollTop || 0;
    _this3.$hscrollbar.innerOffset = state.scrollLeft || 0;
    _this3.$hscrollbar.emit('scroll');
    _this3.$vscrollbar.emit('scroll');
  });
};
DynamicTable.prototype.addRowBefore = function (rowData, bf) {
  return this.table.body.addRowBefore(rowData, bf);
};
DynamicTable.prototype.addRowAfter = function (rowData, at) {
  return this.table.body.addRowAfter(rowData, at);
};
DynamicTable.prototype.replaceRow = function (rowData, rp) {
  var row = this.rowOf(rp);
  if (row) {
    row.updateData(rowData);
  }
  _ResizeSystem["default"].requestUpdateSignal();
};
DynamicTable.prototype.addRow = function (rowData, idx) {
  return this.table.body.addRow(rowData, idx);
};
DynamicTable.prototype.addRows = function (rowsData, idx) {
  return this.table.body.addRows(rowsData, idx);
};
DynamicTable.prototype.removeRow = function (row) {
  return this.table.body.removeRow(row);
};
DynamicTable.prototype.rowAt = function (idx) {
  return this.table.body.rowAt(idx);
};
DynamicTable.prototype.rowOf = function (o) {
  return this.table.body.rowOf(o);
};
DynamicTable.prototype.rowIndexOf = function (o) {
  return this.table.body.rowIndexOf(o);
};
DynamicTable.prototype.getRows = function () {
  return this.table.body.rows.slice();
};
DynamicTable.prototype.requireRows = function (start, end) {
  return this.table.body.requireRows(start, end);
};
DynamicTable.prototype.clearRows = function () {
  return this.table.body.clearRows();
};
DynamicTable.prototype.viewIntoRow = function (row) {
  var _this4 = this;
  var counter = 300;
  var wait = function wait() {
    counter--;
    if (_this4.isDescendantOf(document.body)) {
      if (_this4.hasClass('as-adapt-infinity-grow') || !_this4.hasClass('as-overflow-y')) {
        row = _this4.rowOf(row);
        if (row) {
          (0, _utils.vScrollIntoView)(row.elt);
        }
      } else {
        _this4.table.body.viewIntoRow(row); //TODO: CHECK MORE
      }
    } else if (counter > 0) {
      setTimeout(wait, 30);
    }
  };
  setTimeout(wait, 130);
};
DynamicTable.prototype.attachSearchInput = function (inputElt) {
  if (this.$searchInput) {
    this.$searchInput.off('stoptyping', this.eventHandler.searchModify);
    this.$searchInput.off('keyup', this.eventHandler.searchKeyUp);
  }
  this.$searchInput = inputElt;
  if (this.$searchInput) {
    if (this.$searchInput.$table) {
      this.$searchInput.off('stoptyping', this.$searchInput.$table.eventHandler.searchModify);
      this.$searchInput.off('keyup', this.$searchInput.$table.eventHandler.searchKeyUp);
    }
    this.$searchInput.$table = this;
    this.$searchInput.on('stoptyping', this.eventHandler.searchModify);
    this.$searchInput.on('keyup', this.eventHandler.searchKeyUp);
  }
};
DynamicTable.prototype.filter = function (filter) {
  var query = {};
  var queryText = this.$searchInput && this.$searchInput.value || '';
  queryText = queryText.trim().replace(/\s\s+/g, ' ');
  var i;
  if (filter) {
    for (i in filter) {
      query.filter = filter;
      break;
    }
  }
  if (queryText && queryText.length > 0) query.text = queryText;
  for (i in query) {
    this.query(query);
    return;
  }
  this.query(null);
};
DynamicTable.prototype.makeQuery = function () {
  var query = {};
  var textQuery = this.$searchInput && this.$searchInput.value.trim().replace(/\s\s+/, ' ');
  if (textQuery && textQuery.length > 0) query.text = textQuery;
  var i;
  var filter = this.$filterInputs.reduce(function (ac, elt) {
    if (elt.exportFilter) {
      elt.exportFilter(ac);
    } else if (elt.name) {
      ac[elt.name] = elt.value;
    }
    return ac;
  }, {});
  var sort = (0, _ACore.$$)('th', this.table.header.elt).reduce(function (ac, cr) {
    var key = cr.attr('data-sort-key');
    var order = cr.attr('data-sort-order');
    if (key && order && order !== 'none') {
      ac.push({
        key: key,
        order: order
      });
    }
    return ac;
  }, []);
  for (i in filter) {
    query.filter = filter;
    break;
  }
  if (sort.length > 0) {
    query.sort = sort;
  }
  for (i in query) {
    return query;
  }
  return null;
};
DynamicTable.prototype.requestQuery = function () {
  var query = this.makeQuery();
  this.query(query);
};
DynamicTable.prototype.query = function (query) {
  this.table.body.query(query);
};
DynamicTable.prototype.addFilter = function (inputElt) {
  if (inputElt.$dynamicTable) {
    inputElt.$dynamicTable.removeFilter(inputElt);
  }
  inputElt.$dynamicTable = this;
  inputElt.on('change', this.eventHandler.searchModify);
  this.$filterInputs.push(inputElt);
};
DynamicTable.prototype.removeFilter = function (inputElt) {
  if (inputElt.$dynamicTable !== this) return;
  inputElt.$dynamicTable = null;
  inputElt.off('change', this.eventHandler.searchModify);
  var idx = this.$filterInputs.indexOf(inputElt);
  if (idx >= 0) this.$filterInputs.splice(idx, 1);
};
DynamicTable.prototype.notifyRowChange = function (row) {
  var idx = this.table.body.rowIndexOf(row);
  if (idx >= 0) this.table.body.onRowSplice(idx);
};
DynamicTable.prototype.notifyRowsChange = _noop["default"];
DynamicTable.property = {};
DynamicTable.property.adapter = {
  /***
   * @this DynamicTable
   * @param data
   */
  set: function set(data) {
    var _this5 = this;
    if (!data) return;
    this._adapterData = data;
    this._adapter = new _DTDataAdapter["default"](this, data);
    this.layoutCtrl.onAdapter();
    this.table = new _DTTable["default"](this, this._adapterData.data);
    this.$space.clearChild().addChild(this.table.elt);
    this.$fixedYCtn.clearChild().addChild(this.table.fixedYElt);
    this.$fixedXCtn.clearChild().addChild(this.table.fixedXElt);
    this.$fixedXYCtn.clearChild().addChild(this.table.fixedXYElt);
    if (this.extendStyle) this.addStyle(this.extendStyle);
    setTimeout(function () {
      _this5.requestUpdateSize();
    }, 10);
    setTimeout(function () {
      _this5.requestUpdateSize();
    }, 30);
    setTimeout(function () {
      _this5.requestUpdateSize();
    }, 100);
  },
  get: function get() {
    return this._adapterData;
  }
};
DynamicTable.property.filterInputs = {
  set: function set(inputs) {
    var _this6 = this;
    inputs = inputs || [];
    this.$filterInputs.slice().forEach(function (input) {
      _this6.removeFilter(input);
    });
    inputs.forEach(function (input) {
      return _this6.addFilter(input);
    });
  },
  get: function get() {
    return this.$filterInputs;
  }
};
DynamicTable.property.hiddenColumns = {
  set: function set(value) {
    value = value || [];
    this._hiddenColumns.forEach(function (idxV) {
      this.removeClass('as-hide-col-' + idxV);
    }.bind(this));
    this._hiddenColumns = value;
    this._hiddenColumns.forEach(function (idxV) {
      this.addClass('as-hide-col-' + idxV);
    }.bind(this));
    var c = this.parentElement;
    while (c) {
      if (c.hasClass && c.hasClass('absol-table-vscroller') && c.update) {
        c.update();
        break;
      }
      c = c.parentElement;
    }
    _ResizeSystem["default"].update();
    _ResizeSystem["default"].requestUpdateSignal();
  },
  get: function get() {
    return this._hiddenColumns;
  }
};

/***
 * @memberOf {DynamicTable#}
 * @type {{}}
 */
DynamicTable.eventHandler = {};

/***
 * @this DynamicTable#
 * @param event
 */
DynamicTable.eventHandler.searchModify = function (event) {
  this.requestQuery();
};

/***
 * @this DynamicTable#
 * @param event
 */
DynamicTable.eventHandler.searchKeyUp = function (event) {
  setTimeout(function () {
    var query = this.$searchInput.value;
    query = query.trim().replace(/\s+/, ' ');
    if (query.length) this.table.body.startSearchingIfNeed();
  }.bind(this), 30);
};
DynamicTable.prototype.getColWidth = function () {
  return this.colSizeCtrl.getColWidth();
};
DynamicTable.prototype.setColWidth = function (colId, value) {
  return this.colSizeCtrl.setColWidth(colId, value);
};
_ACore["default"].install(DynamicTable);
var _default = DynamicTable;
/***
 *
 * @param {DynamicTable} elt
 * @constructor
 */
exports["default"] = _default;
function LayoutController(elt) {
  var _this7 = this;
  /***
   *
   * @type {DynamicTable}
   */
  this.elt = elt;
  this.maxRows = Math.ceil(Math.max((0, _Dom.getScreenSize)().height / 40, 1080 / 40));
  this.offset = _Vec["default"].ZERO;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) _this7[key] = _this7[key].bind(_this7);
  });
  this.elt.$hscrollbar.on('scroll', this.ev_hScrollbarScroll);
  this.elt.$vscrollbar.on('scroll', this.ev_vScrollbarScroll);
  this.elt.$viewport.on('scroll', this.ev_viewportScroll);
  this.elt.on('wheel', this.ev_wheel);
  this.scrollingDir = _Vec["default"].ZERO;
  this.scrollingStartOffset = _Vec["default"].ZERO;
}

/***
 *
 * @param {WheelEvent} event
 */
LayoutController.prototype.ev_wheel = function (event) {
  var vScroller = (0, _utils.findVScrollContainer)(event.target);
  if (vScroller && vScroller.hasClass && vScroller.hasClass('as-bscroller')) return;
  var isOverflowY = this.elt.hasClass('as-overflow-y');
  var isOverflowX = this.elt.hasClass('as-overflow-x');
  var dy = event.deltaY;
  var prevOffset;
  if (isOverflowY && (!event.shiftKey || !isOverflowX)) {
    prevOffset = this.elt.$vscrollbar.innerOffset;
    if (dy > 0) {
      this.elt.$vscrollbar.innerOffset = Math.max(Math.min(prevOffset + 100 / 40, this.elt.$vscrollbar.innerHeight - this.elt.$vscrollbar.outerHeight), 0);
      if (prevOffset !== this.elt.$vscrollbar.innerOffset) {
        event.preventDefault();
        this.elt.$vscrollbar.emit('scroll');
      }
    } else if (dy < 0) {
      this.elt.$vscrollbar.innerOffset = Math.max(Math.min(prevOffset - 100 / 40, this.elt.$vscrollbar.innerHeight - this.elt.$vscrollbar.outerHeight), 0);
      if (prevOffset !== this.elt.$vscrollbar.innerOffset) {
        event.preventDefault();
        this.elt.$vscrollbar.emit('scroll');
      }
    }
  } else if (isOverflowX && (event.shiftKey || !isOverflowY)) {
    prevOffset = this.elt.$hscrollbar.innerOffset;
    if (dy > 0) {
      this.elt.$hscrollbar.innerOffset = Math.max(Math.min(prevOffset + 100, this.elt.$hscrollbar.innerWidth - this.elt.$hscrollbar.outerWidth), 0);
      if (prevOffset !== this.elt.$hscrollbar.innerOffset) {
        event.preventDefault();
        this.elt.$hscrollbar.emit('scroll');
      }
    } else if (dy < 0) {
      this.elt.$hscrollbar.innerOffset = Math.max(Math.min(prevOffset - 100, this.elt.$hscrollbar.innerWidth - this.elt.$hscrollbar.outerWidth), 0);
      if (prevOffset !== this.elt.$hscrollbar.innerOffset) {
        event.preventDefault();
        this.elt.$hscrollbar.emit('scroll');
      }
    }
  }
};
LayoutController.prototype.onAdapter = function () {
  var adapter = this.elt.adapter;
  if (this.elt.style.height === 'auto') {
    this.elt.removeStyle('height');
    this.elt.addClass('as-adapt-infinity-grow');
  }
  if (adapter.fixedCol > 0) {
    this.elt.addClass('as-has-fixed-col');
  } else {
    this.elt.removeClass('as-has-fixed-col');
  }
  if (adapter.rowsPerPage === Infinity) {
    this.elt.addClass('as-adapt-infinity-grow');
  }
  if (!adapter.data.head || !adapter.data.head.rows || !adapter.data.head.rows[0] || !adapter.data.head.rows[0].cells || !adapter.data.head.rows[0].cells[0]) {
    this.elt.addClass('as-headless');
  } else {
    this.elt.removeClass('as-headless');
  }
};
LayoutController.prototype.handleMinWidth = function () {
  var minWidth = this.elt.extendStyle.minWidth || this.elt.table.elt.getComputedStyleValue('min-width');
  var mv = (0, _attribute.parseMeasureValue)(minWidth);
  if (!mv) return;
  if (mv.unit !== 'px') return;
  if (!this.elt.table.elt.firstChild || !this.elt.table.elt.firstChild.firstChild) return;
  var bound = this.elt.table.elt.firstChild.firstChild.getBoundingClientRect();
  if (bound.width >= mv.value) return;
  //copyElt
  var cells = this.elt.table.header.rows[0].cells;
  var freeCells = cells.filter(function (cell) {
    return !cell.data.style || !cell.data.style.width;
  });
  if (freeCells.length === 0) return;
  var cellWidths = freeCells.map(function (cell) {
    return cell.copyElt.getBoundingClientRect().width;
  });
  var sumWidth = cellWidths.reduce(function (ac, w) {
    return ac + w;
  }, 0);
  var needGrowUp = mv.value - bound.width;
  freeCells.forEach(function (cell, i) {
    var width = cellWidths[i];
    var newWidth = width + width / sumWidth * needGrowUp;
    var paddingLeft = cell.copyElt.getComputedStyleValue('padding-left') || '0px';
    var paddingRight = cell.copyElt.getComputedStyleValue('padding-right') || '0px';
    paddingLeft = parseFloat(paddingLeft.replace('px', ''));
    paddingRight = parseFloat(paddingRight.replace('px', ''));
    cell.copyElt.addStyle('width', newWidth + 'px');
    cell.copyElt.addStyle('--as-force-min-width', newWidth - paddingLeft - paddingRight - 1 + 'px');
    cell.elt.addClass('as-col-width-auto');
    cell.copyElt.addClass('as-col-width-auto');
    cell.elt.addStyle('--as-force-min-width', newWidth - paddingLeft - paddingRight - 1 + 'px');
    if (cell._copyElt1) {
      cell._copyElt1.addStyle('--as-force-min-width', newWidth - paddingLeft - paddingRight - 1 + 'px');
      cell._copyElt1.addClass('as-col-width-auto');
    }
    if (cell._copyElt2) {
      cell._copyElt2.addClass('as-col-width-auto');
      cell._copyElt2.addStyle('--as-force-min-width', newWidth - paddingLeft - paddingRight - 1 + 'px');
    }
  });
};
LayoutController.prototype.handleDisplay = function () {
  if (!this.elt.hasClass('as-width-match-parent')) {
    return;
  }
  var tableWidth = this.elt.table.elt.getBoundingClientRect().width;
  var viewportWidth = this.elt.$viewport.getBoundingClientRect().width;
  if (tableWidth < viewportWidth - 17 && !this.elt.hasClass('as-table-layout-fixed')) {
    this.elt.table.elt.addStyle('width', viewportWidth - 17 + 'px');
  }
  if (!this.elt.hasClass('as-table-layout-fixed')) {
    this.elt.table.elt.addStyle('min-width', viewportWidth - 17 + 'px');
  }
};
LayoutController.prototype.onAttached = function () {
  var _this8 = this;
  _ResizeSystem["default"].updateUp(this.elt.parentElement);
  this.update();
  if (this.elt.table) {
    this.handleDisplay();
    this.handleMinWidth();
    this.elt.table.updateCopyEltSize();
    this.updateOverflowStatus();
    this.elt.$vscrollbar.once('scroll', function () {
      // return;
      setTimeout(function () {
        if (_this8.elt.table.body.rows.length === 0) return;
        var tableId = _this8.elt.id;
        var rows = _this8.elt.table.header.rows;
        if (!rows || rows.length === 0) return;
        var changed = false;
        var colDict = {};
        rows.forEach(function (row) {
          var cells = row.cells;
          if (!cells) return;
          cells.forEach(function (cell) {
            var colId = cell.data.id;
            var bound;
            if (cell.colspan > 1) return;
            if (!colId && !colDict[cell.idx]) {
              //local style
              bound = cell.copyElt.getBoundingClientRect();
              if (bound.width > 0) {
                _this8.elt.css.setProperty("#".concat(_this8.elt.id, " th[data-col-idx=\"").concat(cell.idx, "\"]:not(colspan)"), 'width', bound.width + 'px').commit();
              }
              return;
            }
            if (!manager.hasColSize(tableId, colId)) {
              bound = cell.copyElt.getBoundingClientRect();
              if (bound.width) {
                manager.setColWidth(tableId, colId, bound.width);
                changed = true;
              }
            }
          });
        });
        if (changed) manager.commit();
      }, 100);
    });
  }
};
LayoutController.prototype.update = function () {
  var _this9 = this;
  var stWidth = this.elt.extendStyle.width;
  var psWidth = (0, _attribute.parseMeasureValue)(this.elt.extendStyle.width);
  var stHeight = this.elt.extendStyle.height;
  var psHeight = (0, _attribute.computeMeasureExpression)(stHeight, {
    elt: this,
    parentSize: this.elt.parentElement ? this.elt.parentElement.getBoundingClientRect().height : 0
  });
  var cpStyle = getComputedStyle(this.elt);
  var psMaxHeight = (0, _attribute.parseMeasureValue)(cpStyle.getPropertyValue('max-height'));
  var psMinWidth = (0, _attribute.parseMeasureValue)(cpStyle.getPropertyValue('min-width'));
  var parentElt = this.elt.parentElement;
  var parentCpStyle;
  var parentBound;
  var screenSize;
  var singleView = function () {
    var ctn = _this9.elt.parentElement && _this9.elt.parentElement.parentElement;
    if (!ctn) return false;
    if (!ctn.hasClass || !ctn.hasClass('absol-single-page-scroller-viewport')) return false;
    if (ctn.lastChild === ctn.firstChild && ctn.firstChild === _this9.elt) return singleView;
  }();
  var singleViewBound;
  var getMaxBoundHeight = function getMaxBoundHeight() {
    var mxH = Infinity;
    if (_this9.elt.hasClass('as-adapt-infinity-grow')) return Infinity;
    if (!psHeight) {} else if (psHeight.unit === 'px') {
      mxH = psHeight.value;
    } else if (psHeight.unit === '%' && parentElt) {
      parentBound = parentBound || parentElt.getBoundingClientRect();
      mxH = parentBound.height * psHeight.value / 100;
    } else if (psHeight.unit === 'vh') {
      screenSize = screenSize || (0, _Dom.getScreenSize)();
      mxH = screenSize.height * psHeight.value / 100;
    }
    if (psMaxHeight && psMaxHeight.unit === 'px') {
      mxH = Math.min(mxH, psMaxHeight.value);
    }
    return mxH;
  };
  var getMinInnerWidth = function getMinInnerWidth() {
    var mnWidth = 0;
    var paddingLeft, paddingRight;
    if (!psWidth) {} else if (psWidth.unit === 'px') {
      mnWidth = psWidth.value;
    } else if (psWidth.unit === '%' && parentElt) {
      parentBound = parentBound || parentElt.getBoundingClientRect();
      parentCpStyle = parentCpStyle || getComputedStyle(parentElt);
      paddingLeft = parseFloat((parentCpStyle.getPropertyValue('padding-left') || '0px').replace('px', ''));
      paddingRight = parseFloat((parentCpStyle.getPropertyValue('padding-right') || '0px').replace('px', ''));
      mnWidth = (parentBound.width - paddingLeft - paddingRight) * psWidth.value / 100;
    } else if (psWidth.unit === 'vw') {
      screenSize = screenSize || (0, _Dom.getScreenSize)();
      mnWidth = screenSize.width * psWidth.value / 100;
    }
    if (psMinWidth && psMinWidth.unit === 'px') {
      mnWidth = Math.max(mnWidth, psMinWidth.value);
    }
    return mnWidth;
  };
  var bound, tbBound;
  var maxHeight;
  if (!this.elt.table) return;
  if (stWidth === 'auto') {
    //table max-width is 100% of parentWidth
    this.elt.table.elt.addStyle('min-width', Math.max(getMinInnerWidth() - 17, 0) + 'px');
  } else if (psWidth.unit === 'px' || psWidth.unit === 'vw' || psWidth.unit === '%') {
    this.elt.table.elt.addStyle('min-width', getMinInnerWidth() - 17 + 'px');
    bound = this.elt.getBoundingClientRect();
    if (bound.width > 0 && !this.elt.table.body.offset) {
      //if overflowY this.elt.table.body.offset >0
      tbBound = this.elt.table.elt.getBoundingClientRect();
      // if (singleView) {
      //     // singleViewBound =
      // }
      // if (this.elt.parentElement && this.elt.parentElement.)
      maxHeight = getMaxBoundHeight();
      if (!maxHeight || maxHeight.value >= tbBound) {
        this.elt.table.elt.addStyle('min-width', getMinInnerWidth() + 'px');
        //isOverflowY = false;
      } else {
        //isOverflowY = true;
      }
    }
  }
};
LayoutController.prototype.onResize = function () {
  this.update();
  this.updateOverflowStatus();
  this.updateScrollbarStatus();
  if (this.elt.table) {
    this.elt.table.updateCopyEltSize();
    this.updateLines();
  }
};
LayoutController.prototype.updateOverflowStatus = function () {
  var contentBound = this.elt.table ? this.elt.table.elt.getBoundingClientRect() : {
    width: 0,
    height: 0
  };
  var bound = this.elt.getBoundingClientRect();
  var cpStyle = getComputedStyle(this.elt);
  var psMaxHeight = (0, _attribute.parseMeasureValue)(cpStyle.getPropertyValue('max-height'));
  if (bound.width < contentBound.width) {
    this.elt.addClass('as-overflow-x');
  } else {
    this.elt.removeClass('as-overflow-x');
    this.elt.$space.removeStyle('left');
  }
  if (this.elt.hasClass('as-adapt-infinity-grow')) {
    this.elt.removeClass('as-overflow-y');
    this.elt.$space.removeStyle('top');
  } else if (bound.height < contentBound.height || psMaxHeight && psMaxHeight.unit === 'px' && bound.width < contentBound.width + 17 && psMaxHeight.value < contentBound.height + 18) {
    this.elt.addClass('as-overflow-y');
  } else {
    this.elt.removeClass('as-overflow-y');
    this.elt.$space.removeStyle('top');
  }
  this.elt.addStyle('--dt-content-height', contentBound.height + 'px');
  this.elt.addStyle('--dt-content-width', contentBound.width + 'px');
};
LayoutController.prototype.updateScrollbarStatus = function () {
  //todo: not overflow y
  if (!this.elt.table) return;
  var childNodes = this.elt.table.body.elt.childNodes;
  var vBound = this.elt.$viewport.getBoundingClientRect();
  var headBound = this.elt.table.header.elt.getBoundingClientRect();
  var availableHeight = vBound.height - headBound.height;
  var rBound;
  var outer = 0;
  var sHeight = 1; //border of last row
  for (var i = 0; i < childNodes.length; ++i) {
    rBound = childNodes[childNodes.length - 1 - i].getBoundingClientRect();
    sHeight += rBound.height;
    if (sHeight >= availableHeight) {
      outer = i + (1 - (sHeight - availableHeight) / rBound.height);
      break;
    }
  }
  this.elt.$vscrollbar.outerHeight = outer;
  this.elt.$vscrollbar.innerHeight = this.elt.table.body.curentMode.viewedRows.length;
  this.elt.$vscrollbar.innerOffset = this.elt.table.body.curentMode.offset;
  var viewportBound = this.elt.$viewport.getBoundingClientRect();
  var tableBound = this.elt.table.elt.getBoundingClientRect();
  this.elt.$hscrollbar.innerWidth = tableBound.width;
  this.elt.$hscrollbar.outerWidth = viewportBound.width;
  if (this.elt.$hscrollbar.innerOffset + this.elt.$hscrollbar.outerWidth > this.elt.$hscrollbar.innerWidth) {
    this.elt.$hscrollbar.innerOffset = Math.max(0, this.elt.$hscrollbar.innerWidth - this.elt.$hscrollbar.outerWidth);
    this.elt.$hscrollbar.emit('scroll');
  }
  if (tableBound.width < viewportBound.width) {
    this.elt.$vscrollbar.addStyle('right', viewportBound.width - tableBound.width + 'px');
  } else {
    this.elt.$vscrollbar.removeStyle('right');
  }

  // this.$vscrollbar
};

LayoutController.prototype.updateLines = function () {
  var fixXBound, headerBound;
  if (this.elt.hasClass('as-overflow-x') && this.elt.hasClass('as-has-fixed-col')) {
    fixXBound = this.elt.$fixedXCtn.getBoundingClientRect();
    this.elt.addStyle('--dt-fixed-x-width', fixXBound.width + 'px');
  }
  if (this.elt.hasClass('as-overflow-y')) {
    headerBound = this.elt.$fixedYCtn.firstChild.getBoundingClientRect();
    this.elt.addStyle('--dt-header-height', headerBound.height + 'px');
  }
};
LayoutController.prototype.ev_hScrollbarScroll = function (event) {
  this.elt.$space.addStyle('left', -this.elt.$hscrollbar.innerOffset + 'px');
  this.elt.$fixedYCtn.addStyle('left', -this.elt.$hscrollbar.innerOffset + 'px');
  this.elt.$viewport.emit('scroll');
};
LayoutController.prototype.ev_vScrollbarScroll = function () {
  if (!this.elt.table || !this.elt.table.body) return;
  this.elt.table.body.offset = this.elt.$vscrollbar.innerOffset;
  this.elt.$viewport.emit('scroll');
};
LayoutController.prototype.ev_dragStart = function (event) {
  var isOverflowY = this.elt.hasClass('as-overflow-y');
  var isOverflowX = this.elt.hasClass('as-overflow-x');
  var dir = event.currentPoint.sub(event.startingPoint);
  if (isOverflowY && Math.abs(dir.y) > Math.abs(dir.x)) {
    this.scrollingDir = new _Vec["default"](0, 1);
    event.preventDefault();
  } else if (isOverflowX && Math.abs(dir.y) < Math.abs(dir.x)) {
    this.scrollingDir = new _Vec["default"](1, 0);
    event.preventDefault();
  } else {
    this.scrollingDir = _Vec["default"].ZERO;
  }
  this.scrollingStartOffset = new _Vec["default"](this.elt.$hscrollbar.innerOffset, this.elt.$vscrollbar.innerOffset);
};
LayoutController.prototype.ev_drag = function (event) {
  var changed = false;
  var dir = event.currentPoint.sub(event.startingPoint);
  var newOffset = new _Vec["default"](0, 0);
  if (this.scrollingDir.x !== 0) {
    newOffset.x = Math.max(0, Math.min(this.elt.$hscrollbar.innerWidth - this.elt.$hscrollbar.outerWidth, this.scrollingStartOffset.x - dir.x));
    if (this.elt.$hscrollbar.innerOffset !== newOffset.x) {
      changed = true;
      this.elt.$hscrollbar.innerOffset = newOffset.x;
      this.elt.$hscrollbar.emit('scroll');
    }
  } else if (this.scrollingDir.y !== 0) {
    newOffset.y = Math.max(0, Math.min(this.elt.$vscrollbar.innerHeight - this.elt.$vscrollbar.outerHeight, this.scrollingStartOffset.y - dir.y / 40));
    if (this.elt.$vscrollbar.innerOffset !== newOffset.y) {
      changed = true;
      this.elt.$vscrollbar.innerOffset = newOffset.y;
      this.elt.$vscrollbar.emit('scroll');
    }
  }
  if (changed) event.preventDefault();
};
LayoutController.prototype.ev_dragEnd = function (event) {};
LayoutController.prototype.ev_viewportScroll = function (event) {
  if (this.elt.$viewport.scrollLeft !== 0) {
    this.elt.$hscrollbar.innerOffset += this.elt.$viewport.scrollLeft;
    this.elt.$viewport.scrollLeft = 0;
    this.elt.$hscrollbar.emit('scroll');
  }
  if (this.elt.$viewport.scrollTop !== 0) {
    this.elt.$vscrollbar.innerOffset += this.elt.$viewport.scrollTop / 30; //todo: better solution
    this.elt.$viewport.scrollTop = 0;
    this.elt.$vscrollbar.emit('scroll');
  }
};

/***
 *
 * @param {DynamicTable} elt
 * @constructor
 */
function PointerController(elt) {
  var _this10 = this;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) _this10[key] = _this10[key].bind(_this10);
  });
  /***
   *
   * @type {DynamicTable}
   */
  this.elt = elt;
  this.elt.$viewport.hangon = 5;
  this.elt.$viewport.on('draginit', this.ev_dragInit);
  this.elt.$viewport.on('dragstart', this.ev_dragStart);
  this.elt.$viewport.on('drag', this.ev_drag);
  this.elt.$viewport.on('dragend', this.ev_dragEnd);
  this.destHandler = null;
}
PointerController.prototype.isInDragZone = function (elt) {
  while (elt && elt !== this.elt) {
    if (elt.classList.contains('as-drag-zone')) return true;
    elt = elt.parentElement;
  }
  return false;
};
PointerController.prototype.isInInput = function (elt) {
  while (elt) {
    if (elt.tagName === 'INPUT') return true;
    if (elt.tagName === 'TD') return false;
    var clazz = elt.getAttribute('class') || '';
    if (clazz.indexOf('input') >= 0) return true;
    if (clazz.indexOf('input') >= 0) return true;
    if (clazz.indexOf('menu') >= 0) return true;
    elt = elt.parentElement;
  }
  return false;
};
PointerController.prototype.isInColResizer = function (elt) {
  return !!(elt.hasClass && elt.hasClass('as-dt-header-cell-resizer'));
};
PointerController.prototype.ev_dragInit = function (event) {
  if (this.isInDragZone(event.target)) {
    event.preventDefault();
    this.destHandler = this.elt.rowDragCtrl;
  }
  if (this.isInColResizer(event.target)) {
    event.preventDefault();
    this.destHandler = this.elt.colSizeCtrl;
  } else if (this.isInInput(event.target)) {
    event.cancel();
    return;
  } else if (event.isTouch) {
    // event.preventDefault();//todo: check
  }
};
PointerController.prototype.ev_dragStart = function (event) {
  var dir = event.currentPoint.sub(event.startingPoint).normalized();
  var ox = new _Vec["default"](1, 0);
  var oy = new _Vec["default"](0, 1);
  if (this.destHandler) {
    event.preventDefault && event.preventDefault();
    this.destHandler.ev_dragStart(event);
  } else if (event.isTouch && (Math.abs(dir.dot(ox)) < 0.3 || Math.abs(dir.dot(oy)) < 0.3)) {
    event.preventDefault && event.preventDefault();
    this.destHandler = this.elt.layoutCtrl;
    this.destHandler.ev_dragStart(event);
  } else {
    this.destHandler = null;
  }
};
PointerController.prototype.ev_drag = function (event) {
  if (this.destHandler) {
    event.preventDefault && event.preventDefault();
    this.destHandler.ev_drag(event);
  }
};
PointerController.prototype.ev_dragEnd = function (event) {
  if (this.destHandler) {
    event.preventDefault && event.preventDefault();
    this.destHandler.ev_dragEnd(event);
  }
  this.destHandler = null;
};
PointerController.prototype.ev_dragDeinit = function (event) {};

/***
 *
 * @param {DynamicTable} elt
 * @constructor
 */
function ColSizeController(elt) {
  this.elt = elt;
  this.colId = null; //number: col index, string: ident
  this.startingBound = null;
  this.cellElt = null;
  this.cell = null;
}
ColSizeController.prototype.onAttached = function () {};
ColSizeController.prototype.onAdapter = function () {};
ColSizeController.prototype.ev_dragStart = function (event) {
  var _this11 = this;
  if (!this.elt.isDescendantOf(document.body)) return;
  this.dragOK = true;
  this.colId = event.target.parentElement.attr('data-col-id') || parseInt(event.target.parentElement.attr('data-col-idx'));
  this.cell = this.elt.table.header.rows[0].cells.find(function (cell) {
    return cell.data.id === _this11.colId || cell.idx === _this11.colId;
  });
  if (!this.cell) {
    this.dragOK = false;
    return;
  }
  this.cellElt = this.cell.copyElt;
  this.startingBound = _Rectangle["default"].fromClientRect(this.cellElt.getBoundingClientRect());
};
ColSizeController.prototype.ev_drag = function (event) {
  if (!this.dragOK) return;
  if (!this.elt.isDescendantOf(document.body)) return;
  var newWidth = this.startingBound.width + event.currentPoint.sub(event.startingPoint).x;
  this.cellElt.addStyle('width', newWidth + 'px');
  this.elt.table.updateCopyEltSize();

  //todo: split code
  var viewportBound = this.elt.$viewport.getBoundingClientRect();
  var tableBound = this.elt.table.elt.getBoundingClientRect();
  if (tableBound.width < viewportBound.width) {
    this.elt.$vscrollbar.addStyle('right', viewportBound.width - tableBound.width + 'px');
  } else {
    this.elt.$vscrollbar.removeStyle('right');
  }
  this.elt.addStyle('--dt-content-height', tableBound.height + 'px');
  this.elt.addStyle('--dt-content-width', tableBound.width + 'px');
};
ColSizeController.prototype.ev_dragEnd = function (event) {
  var _this12 = this;
  if (!this.dragOK) return;
  if (!this.cell) return;
  if (!this.elt.isDescendantOf(document.body)) return;
  if (typeof this.colId === "string") {
    if (this.cell.colspan === 1) manager.commitColWidth(this.elt, this.elt.id, this.cell.data.id, this.cellElt.getBoundingClientRect().width, true);
    this.notifyColResize(event);
  } else {
    if (this.cell.colspan === 1) this.elt.css.setProperty("#".concat(this.elt.id, " th[data-col-idx=\"").concat(this.colId, "\"]:not([colspan])"), 'width', this.cellElt.getBoundingClientRect().width + 'px').commit();
  }
  this.elt.requestUpdateSize();
  setTimeout(function () {
    if (!_this12.cellElt.isDescendantOf(document.body)) return;
    _this12.cellElt.removeStyle('width');
    _this12.elt.requestUpdateSize();
  }, 150);
};
ColSizeController.prototype.getColWidth = function () {
  var res = {};
  this.elt.table.header.rows[0].cells.forEach(function (cell) {
    var id = cell.data.id;
    if (typeof id === "string" || typeof id === "number") id = '' + id;
    if (!id) return;
    Object.defineProperty(res, id, {
      enumerable: true,
      get: function get() {
        return cell.copyElt.getBoundingClientRect().width;
      }
    });
  });
  return res;
};
ColSizeController.prototype.setColWidth = function (colId, value) {
  var cell = this.elt.table.header.rows[0].cells.find(function (cell) {
    return cell.data.id === colId || cell.idx === colId;
  });
  cell.copyElt.removeStyle('width');
  if (typeof colId === "string") {
    if (cell.colspan !== 1) manager.commitColWidth(this.elt, this.elt.id, colId, value, true);
  } else {
    this.elt.css.setProperty("#".concat(this.elt.id, " th[data-col-idx=\"").concat(colId, "\"]:not([colspan])"), 'width', value + 'px').commit();
  }
  this.elt.requestUpdateSize();
};
ColSizeController.prototype.notifyColResize = function (originalEvent) {
  var _this13 = this;
  var event = {
    type: 'colresize',
    target: this,
    colId: this.colId,
    width: this.cellElt.getBoundingClientRect().width,
    originalEvent: originalEvent.originalEvent || event
  };
  var colWidth;
  Object.defineProperty(event, 'colWidth', {
    get: function get() {
      if (colWidth) return colWidth;
      colWidth = _this13.getColWidth();
      return colWidth;
    }
  });
  this.elt.emit('colresize', event, this);
};

/**
 * new version
 * @param {DynamicTable} elt
 * @constructor
 */
function RowDragController(elt) {
  this.elt = elt;
  this._isDragging = false;
  this.prevDragedRow = null;
}
RowDragController.prototype._findRow = function (cElt) {
  while (cElt && cElt !== this.elt) {
    if (cElt.dtBodyRow) {
      return cElt.dtBodyRow;
    }
    cElt = cElt.parentElement;
  }
  return null;
};
RowDragController.prototype._getZIndex = function () {
  var e = this.elt.$fixedXYCtn;
  return (0, _utils.findMaxZIndex)(e);
};
RowDragController.prototype._updateClass = function () {
  var _this14 = this;
  this.row.body.rows.forEach(function (row, i) {
    if (!row._elt) return;
    if (_this14.newIdx < _this14.rowIdx) {
      if (i < _this14.newIdx || i >= _this14.rowIdx) {
        row._elt.addStyle('transform', "translate(0, 0)");
      } else if (i < _this14.rowIdx) {
        row._elt.addStyle('transform', "translate(0, ".concat(_this14.rowRect.height, "px)"));
      }
    } else if (_this14.newIdx > _this14.rowIdx) {
      if (i <= _this14.rowIdx || i > _this14.newIdx) {
        row._elt.addStyle('transform', "translate(0, 0)");
        row._elt._transformY = _this14.rowRect.height;
      } else if (i <= _this14.newIdx) {
        row._elt.addStyle('transform', "translate(0, ".concat(-_this14.rowRect.height, "px)"));
        row._elt._transformY = -_this14.rowRect.height;
      }
    } else {
      row._elt.addStyle('transform', "translate(0, 0)");
      row._elt._transformY = 0;
    }
  });
};
RowDragController.prototype._computeRowBound = function () {
  this.firstBoundIdx = this.elt.rowIndexOf(this.row.body.elt.firstChild);
  this.bounds = Array.prototype.map.call(this.row.body.elt.childNodes, function (elt, i) {
    var rect = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    rect.y -= elt._transformY || 0;
    return rect;
  });
};
RowDragController.prototype._computeNewIdx = function () {
  var firstBound = _Rectangle["default"].fromClientRect(this.row.body.elt.firstChild.getBoundingClientRect());
  var delta = firstBound.A().sub(this.bounds[0].A());
  var cBound = _Rectangle["default"].fromClientRect(this.ctn.getBoundingClientRect());
  var y0 = this.bounds[0].y + delta.y;
  var nearest = Infinity;
  this.newIdx = this.firstBoundIdx;
  var cur;
  var S = [];
  S['-1'] = 0;
  var i, y;
  for (i = 0; i < this.bounds.length; ++i) {
    S.push(S[i - 1] + this.bounds[i].height);
  }
  for (i = 0; i < this.bounds.length; ++i) {
    cur = this.firstBoundIdx + i;
    if (cur <= this.rowIdx) {
      y = y0 + S[i - 1];
    } else {
      y = y0 + S[i] - cBound.height;
    }
    if (nearest > Math.abs(cBound.y - y) + 0.1 && this.row.body.rows[cur].draggable) {
      nearest = Math.abs(cBound.y - y);
      this.newIdx = cur;
    }
  }
};
RowDragController.prototype.ev_dragStart = function (event) {
  if (this.elt.table.body.curentMode.name !== 'normal') return;
  if (this.prevDragRow) {
    this.prevDragRow.elt.removeClass('as-dragged');
    this.prevDragRow = null;
  }
  this.elt.addClass('as-row-dragging');
  this.row = this._findRow(event.target);
  this.body = this.row.body;
  this.rowIdx = this.elt.rowIndexOf(this.row);
  this.newIdx = this.rowIdx;
  this.clonedTable = this._cloneTableRow(this.row);
  this.ctn = (0, _ACore._)({
    "class": 'as-dt-body-row-cloned-ctn',
    style: {
      zIndex: this._getZIndex() + 20,
      cursor: 'move',
      opacity: 0.9
    },
    child: (0, _ACore.$)(this._cloneTableRow(this.row)).removeStyle('transform')
  }).addTo(document.body);
  this.row.elt.addClass('as-dragging');
  this.rowRect = _Rectangle["default"].fromClientRect(this.row.elt.getBoundingClientRect());
  this.elt.addStyle('--dt-dragging-row-height', this.rowRect.height);
  this.viewportRect = _Rectangle["default"].fromClientRect(this.elt.$viewport.getBoundingClientRect());
  this.headerRect = _Rectangle["default"].fromClientRect(this.elt.$fixedYCtn.getBoundingClientRect());
  this.pointeroffset = event.startingPoint.sub(this.rowRect.A());
  this.ctn.addStyle({
    top: this.rowRect.y + 'px',
    left: this.rowRect.x + 'px'
  });
  this._computeRowBound();
  this._computeNewIdx();
  this._updateClass();
  this._isDragging = true;
};
RowDragController.prototype.ev_rowRenderChange = function () {
  if (!this._isDragging) return;
  this._computeRowBound();
  this._computeNewIdx();
  this._computeNewIdx();
  this._updateClass();
};

/**
 *
 * @param {DTBodyRow}row
 * @private
 */
RowDragController.prototype._cloneTableRow = function (row) {
  var tableElt = (0, _ACore.$)(row.body.table.elt.cloneNode(false)).addStyle({
    tableLayout: 'fixed',
    width: row.body.table.elt.getBoundingClientRect().width + 'px'
  });
  var tBodyElt = (0, _ACore.$)(row.body.elt.cloneNode(false));
  tableElt.addChild(tBodyElt);
  var rowElt = (0, _ACore.$)(this.row.elt.cloneNode(false)).addStyle({
    height: this.row.elt.getBoundingClientRect().height + 'px',
    backgroundColor: '#FFF9C4' //this.row.elt.getComputedStyleValue('background-color')
  });

  tBodyElt.addChild(rowElt);
  this.row.cells.forEach(function (cell) {
    var width = cell.elt.getBoundingClientRect().width;
    (0, _ACore.$)(cell.elt.cloneNode(true)).addStyle({
      width: width + 'px'
    }).addTo(rowElt);
  });
  return tableElt;
};
RowDragController.prototype.ev_drag = function (event) {
  var _this15 = this;
  var newY = event.currentPoint.sub(this.pointeroffset).y;
  this.ctn.addStyle('top', newY + 'px');
  clearTimeout(this._dragOutTO);
  var ctnBound = _Rectangle["default"].fromClientRect(this.ctn.getBoundingClientRect());
  var onDragOutPositive = function onDragOutPositive() {
    var dy = ctnBound.D().y - _this15.viewportRect.D().y;
    dy /= 1000 / 60 / 4 * _this15.rowRect.height;
    dy = Math.min(dy, _this15.elt.$vscrollbar.innerHeight - _this15.elt.$vscrollbar.outerHeight - _this15.elt.$vscrollbar.innerOffset);
    if (dy > 0.5) {
      //dy may be very small
      _this15.elt.$vscrollbar.innerOffset += dy;
      _this15.elt.$vscrollbar.emit('scroll');
    }
    _this15._computeNewIdx();
    _this15._updateClass();
    clearTimeout(_this15._dragOutTO);
    _this15._dragOutTO = setTimeout(onDragOutPositive, 33);
  };
  var onDragOutNegative = function onDragOutNegative() {
    var dy = ctnBound.y - _this15.headerRect.D().y;
    dy /= 1000 / 60 / 4 * _this15.rowRect.height;
    dy = Math.max(dy, -_this15.elt.$vscrollbar.innerOffset);
    if (dy < -0.5) {
      //dy may be very small
      _this15.elt.$vscrollbar.innerOffset += dy;
      _this15.elt.$vscrollbar.emit('scroll');
    }
    _this15._computeNewIdx();
    _this15._updateClass();
    clearTimeout(_this15._dragOutTO);
    _this15._dragOutTO = setTimeout(onDragOutNegative, 33);
  };
  if (this.viewportRect.D().y < ctnBound.D().y) {
    this._dragOutTO = setTimeout(onDragOutPositive, 1000 / 60);
  } else if (this.headerRect.D().y > ctnBound.y) {
    this._dragOutTO = setTimeout(onDragOutNegative, 100 / 60);
  } else {
    this._computeNewIdx();
    this._updateClass();
  }
};
RowDragController.prototype.ev_dragEnd = function (event) {
  var _this16 = this;
  this.elt.addClass('as-row-dragging');
  this.elt.removeClass('as-row-dragging');
  this.elt.removeStyle('--dragging-row-height');
  this.row.elt.removeClass('as-dragging');
  this._isDragging = false;
  clearTimeout(this._dragOutTO);
  this.ctn.remove();
  this.row.body.rows.forEach(function (row) {
    if (row._elt) {
      row._elt.removeStyle('transform');
      row._elt._transformY = 0;
    }
  });
  if (this.newIdx !== this.rowIdx) {
    this.row.body.moveRowAt(this.rowIdx, this.newIdx);
    var eventData = {
      type: 'orderchange',
      target: this.row,
      from: this.rowIdx,
      to: this.newIdx,
      originalEvent: event,
      row: this.row,
      data: this.row.data
    };
    if (this.row.data.on && this.row.data.on.orderchange) {
      this.row.data.on.orderchange.call(this.row, eventData, this.row);
    }
    this.elt.emit('orderchange', eventData, this.body.table.wrapper);
    if (this.prevDragRow) {
      this.prevDragRow.elt.removeClass('as-dragged');
    }
    this.prevDragRow = this.row;
    this.prevDragRow.elt.addClass('as-dragged');
    setTimeout(function () {
      document.addEventListener('click', _this16.ev_clickOutDraggedRow);
    }, 400);
  }
};
RowDragController.prototype.ev_clickOutDraggedRow = function (event) {
  var finished = false;
  if (!this.prevDragRow) {
    finished = true;
  } else if (event.target && _AElement["default"].prototype.isDescendantOf.call(event.target, this.prevDragRow.elt)) {
    finished = false;
  } else if (event.target && event.target.classList && (event.target.classList.contains('absol-scrollbar-button') || event.target.classList.contains('absol-scrollbar'))) {
    finished = false;
  } else {
    finished = true;
  }
  if (!finished) {
    if (this.prevDragRow) {
      this.prevDragRow.elt.removeClass('as-dragged');
      this.prevDragRow = null;
    }
    document.removeEventListener('click', this.ev_clickOutDraggedRow);
  }
};
function VirtualPageSelector(elt) {
  this.elt = elt;
}
VirtualPageSelector.prototype.getSelectedPage = function () {
  return this.elt.$vscrollbar.innerOffset / 25;
};
VirtualPageSelector.prototype.selectPage = function (value) {
  this.elt.$vscrollbar.innerOffset = value * 25;
  this.elt.$vscrollbar.emit('scroll');
};

/***/ }),

/***/ 34571:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _utils = __webpack_require__(84512);
var _catalog = _interopRequireDefault(__webpack_require__(82398));
var _MessageInput = _interopRequireDefault(__webpack_require__(42049));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var thumbnailCache = {};
var dbSync;
var getDb = function getDb() {
  dbSync = dbSync || new Promise(function (resolve) {
    var request = window.indexedDB.open('FileThumbnailDB', 1);
    request.onupgradeneeded = function (event) {
      var db = event.target.result;
      db.createObjectStore("files", {});
    };
    request.onsuccess = function (event) {
      var db = event.target.result;
      var request1;
      if (localStorage.getItem('FileThumbnail_clear_cache') === '1') {
        localStorage.removeItem('FileThumbnail_clear_cache');
        request1 = db.transaction('files', 'readwrite').objectStore('files').clear();
        request1.onsuccess = function () {
          resolve(db);
        };
        request1.onerror = function () {
          resolve(null);
        };
      } else resolve(db);
    };
    request.onerror = function () {
      resolve(null);
    };
  });
  return dbSync;
};
var dbGetItem = function dbGetItem(key) {
  return getDb().then(function (db) {
    if (!db) return null;
    var request = db.transaction('files').objectStore('files').get(key);
    return new Promise(function (resolve) {
      request.onsuccess = function (event) {
        var data = event.target.result;
        resolve(data);
      };
      request.onerror = function () {
        resolve(null);
      };
    });
  });
};
var dbSetItem = function dbSetItem(key, value) {
  return getDb().then(function (db) {
    if (!db) return null;
    var objectStore = db.transaction('files', 'readwrite').objectStore('files');
    var request = objectStore.put(value, key);
    return new Promise(function (resolve) {
      request.onsuccess = function (event) {
        var data = event.target.result;
        resolve(data);
      };
      request.onerror = function () {
        resolve(null);
      };
    });
  });
};
document.addEventListener('keydown', function (event) {
  if (event.ctrlKey && event.key === 'F5') {
    localStorage.setItem('FileThumbnail_clear_cache', '1');
  }
});
var url2small = function url2small(url) {
  return new Promise(function (resolve) {
    var image = new Image();
    image.crossOrigin = 'anonymous';
    image.crossorigin = 'anonymous';
    image.src = url;
    image.onload = function () {
      var now = new Date();
      if (image.naturalWidth <= 200 && image.naturalHeight < 200) {
        resolve(url);
        return;
      }
      var scale = Math.min(200 / image.naturalWidth, 200 / image.naturalHeight);
      var width = Math.round(image.naturalWidth * scale);
      var height = Math.round(image.naturalHeight * scale);
      var canvas = document.createElement('canvas');
      canvas.width = width;
      canvas.height = height;
      var ctx = canvas.getContext('2d');
      for (var i = 0; i < 20; ++i) {
        for (var j = 0; j < 20; ++j) {
          ctx.fillStyle = (i ^ j) & 1 ? '#BBBBBB' : '#FFFFFF';
          ctx.fillRect(i * 10, j * 10, 10, 10);
        }
      }
      ctx.drawImage(image, 0, 0, width, height);
      resolve(canvas.toDataURL('image/jpeg', 0.5));
    };
  });
};
var getThumbnailUrl = function getThumbnailUrl(url) {
  if (!thumbnailCache[url]) {
    thumbnailCache[url] = dbGetItem(url).then(function (result) {
      if (!result) {
        result = url2small(url).then(function (canvasResult) {
          if (canvasResult) dbSetItem(url, canvasResult);
          return canvasResult;
        });
      }
      return result;
    });
  }
  return thumbnailCache[url];
};
function FileThumbnail() {
  this._value = null;
  this.$fileName = (0, _ACore.$)('.as-file-thumbnail-file-name', this);
  this.$bg = (0, _ACore.$)('.as-file-thumbnail-background', this);
  /***
   * @type {string}
   * @name fileName
   * @memberOf FileThumbnail#
   */
  /***
   * @type {string|null}
   * @name fileType
   * @memberOf FileThumbnail#
   */
  /***
   * @type {string|null}
   * @name thumbnail
   * @memberOf FileThumbnail#
   */
  /***
   * @type {boolean}
   * @name isDirectory
   * @memberOf FileThumbnail#
   */
}

FileThumbnail.tag = 'FileThumbnail'.toLowerCase();
FileThumbnail.render = function () {
  return (0, _ACore._)({
    "class": 'as-file-thumbnail',
    child: [{
      "class": 'as-file-thumbnail-background'
    }, {
      "class": 'as-file-thumbnail-file-name',
      child: []
    }, {
      "class": 'as-file-thumbnail-check',
      child: 'span.mdi.mdi-check-bold'
    }]
  });
};
FileThumbnail.prototype._updateFileName = function () {
  var fileName = this.fileName;
  if (!fileName) {
    return;
  }
  var parts;
  var matched;
  matched = fileName.match(/([^_+\-.]+)|([_+\-.]+)/g);
  parts = matched || [];
  if (parts.length > 2 && parts[parts.length - 2] === '.') {
    parts[parts.length - 2] += parts[parts.length - 1];
    parts.pop();
  }
  parts = parts.map(function (txt) {
    return (0, _ACore._)({
      tag: 'span',
      child: {
        text: txt
      }
    });
  });
  this.$fileName.clearChild().addChild(parts);
};
FileThumbnail.prototype._updateThumbnail = function () {
  var _this = this;
  var previewUrl;
  var thumbnail = this.thumbnail;
  var fileType = this.isDirectory ? 'folder' : this.fileType;
  if (thumbnail) {
    if (typeof thumbnail === "string") {
      this._previewUrl = thumbnail;
      getThumbnailUrl(thumbnail).then(function (smallerUrl) {
        if (thumbnail !== _this._previewUrl) return;
        _this.$bg.addStyle('backgroundImage', 'url("' + smallerUrl + '")');
      });
    } else if (thumbnail instanceof Blob || thumbnail instanceof File) {
      thumbnail.url = thumbnail.url || URL.createObjectURL(thumbnail);
      this._previewUrl = thumbnail.url;
    }
  }
  if (_catalog["default"].indexOf(fileType) >= 0) {
    previewUrl = _MessageInput["default"].iconAssetRoot + '/' + fileType + '.svg';
  } else {
    previewUrl = _MessageInput["default"].iconAssetRoot + '/' + 'blank' + '.svg';
  }
  if (previewUrl) {
    this.$bg.addStyle('backgroundImage', 'url("' + encodeURI(previewUrl) + '")');
  } else {
    this.$bg.removeStyle('backgroundImage');
  }
};
FileThumbnail.property = {};
FileThumbnail.property.value = {
  set: function set(value) {
    value = value || null;
    this._value = value;
    this._valueInfo = (0, _utils.fileInfoOf)(value);
    this._updateFileName();
    this._updateThumbnail();
  },
  get: function get() {
    return this._value;
  }
};
FileThumbnail.property.fileName = {
  set: function set(value) {
    this._fileName = value;
    this._updateFileName();
  },
  get: function get() {
    return this._fileName || this._valueInfo && this._valueInfo.name || null;
  }
};
FileThumbnail.property.fileType = {
  set: function set(value) {
    this._fileType = value;
    this._updateThumbnail();
  },
  /***
   * @this FileInputBox
   * @return {*}
   */
  get: function get() {
    if (this.isDirectory) return null;
    return this._fileType || this._valueInfo && this._valueInfo.type || null;
  }
};
FileThumbnail.property.checked = {
  set: function set(value) {
    if (value) {
      this.addClass('as-checked');
    } else {
      this.removeClass('as-checked');
    }
  },
  get: function get() {
    return this.hasClass('as-checked');
  }
};
FileThumbnail.property.thumbnail = {
  set: function set(value) {
    this._thumbnail = value || null;
    this._updateThumbnail();
  },
  get: function get() {
    return this._thumbnail;
  }
};
FileThumbnail.property.isDirectory = {
  set: function set(value) {
    if (value) {
      this.addClass('as-is-directory');
    } else {
      this.removeClass('as-is-directory');
    }
  },
  get: function get() {
    return this.hasClass('as-is-directory');
  }
};
_ACore["default"].install(FileThumbnail);
var _default = FileThumbnail;
exports["default"] = _default;

/***/ }),

/***/ 14591:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.FinderCommands = void 0;
exports.FinderFileSystem = FinderFileSystem;
exports["default"] = void 0;
__webpack_require__(92209);
__webpack_require__(82287);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ExpTree = __webpack_require__(87326);
var _MessageInput = _interopRequireDefault(__webpack_require__(42049));
var _ext2MineType = _interopRequireDefault(__webpack_require__(13578));
var _utils = __webpack_require__(84512);
var _random = __webpack_require__(88917);
var _TaskManager = _interopRequireDefault(__webpack_require__(95619));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _WindowBox = _interopRequireDefault(__webpack_require__(24405));
var _FileSaver = __webpack_require__(53069);
var _DropZone = _interopRequireDefault(__webpack_require__(31790));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _EventEmitter = _interopRequireWildcard(__webpack_require__(46833));
var _ContextMenu = _interopRequireDefault(__webpack_require__(24733));
var _TextArea = _interopRequireDefault(__webpack_require__(52072));
var _FileThumbnail = _interopRequireDefault(__webpack_require__(34571));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _stringFormat = __webpack_require__(22294);
var _stringGenerate = __webpack_require__(10713);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _RibbonButton = _interopRequireDefault(__webpack_require__(93856));
var _Dom = __webpack_require__(64821);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var isMobile = _BrowserDetector["default"].isMobile;

/***
 * @extends AElement
 * @constructor
 */
function Finder() {
  var _this = this;
  if (isMobile) this.addClass('as-mobile');
  // if (BrowserDetector.isMobile) alert("Chưa hỗ trợ điện thoại!");

  this.$attachhook = (0, _ACore._)('attachhook').addTo(this);
  this.$attachhook.requestUpdateSize = function () {
    _this.layoutCtn.update();
    _this.navCtrl.notifyVisibleContentItems();
  };
  this.$attachhook.once('attached', function () {
    _ResizeSystem["default"].add(_this.$attachhook);
    _this.layoutCtn.update();
    _this.navCtrl.onStart();
    _this.navCtrl.notifyVisibleContentItems();
    _ContextMenu["default"].auto();
  });
  this.domSignal = new _DomSignal["default"]((0, _ACore._)('attachhook').addTo(this));
  this.$header = (0, _ACore.$)('.as-finder-header', this);
  this.$nomalActionCtn = (0, _ACore.$)('.as-finder-normal-action-button-ctn', this);
  this.$tinyActionCtn = (0, _ACore.$)('.as-finder-tiny-action-button-ctn', this);
  this.$contentHeader = (0, _ACore.$)('.as-finder-content-header', this);
  this.$navCtn = (0, _ACore.$)('.as-finder-nav-ctn', this);
  this.$nav = (0, _ACore.$)(_ExpTree.ExpGroup.tag, this.$navCtn);
  this.$searchCtn = (0, _ACore.$)('.as-finder-search-ctn', this);
  this.$contentCtn = (0, _ACore.$)('.as-finder-content-ctn', this);
  this.$content = (0, _ACore.$)('.as-finder-content', this);
  this.$body = (0, _ACore.$)('.as-finder-body', this);
  this.$commandButtons = (0, _ACore.$$)('.as-finder-nav-header button', this).concat((0, _ACore.$$)('.as-finder-content-header button', this)).concat((0, _ACore.$$)('.as-finder-search-footer button', this)).concat((0, _ACore.$$)('.as-finder-search-header button', this)).reduce(function (ac, cr) {
    var name = cr.attr('name');
    ac[name] = cr;
    if (cr.items) {
      //ribbon button
      cr.on('select', function (event) {
        _this.execCommand(name, event.item.value, event.item);
      });
    } else {
      cr.on('click', function () {
        _this.execCommand(name);
      });
    }
    return ac;
  }, {});
  this.$searchTypeSelect = (0, _ACore.$)('.as-finder-search-type-select', this);
  this.$searchText = (0, _ACore.$)('.as-finder-search-text', this);
  this.fileSystem = new AbsolFileSystem();
  this.layoutCtn = new LayoutController(this);
  this.navCtrl = new NavigatorController(this);
  this.selectCtrl = isMobile ? new MobileSelectController(this) : new SelectController(this);
  this.uploadCtrl = new UploadController(this);
  this.commandCtrl = new CommandController(this);
  this.folderDialog = new FolderDialog(this);
  this.searchCtrl = new SearchController(this);

  /***
   * @type {string}
   * @name displayPath
   * @memberOf Finder#
   */
  /***
   * @type {string}
   * @name path
   * @memberOf Finder#
   */
  /***
   * @type {string}
   * @name rootPath
   * @memberOf Finder#
   */

  /***
   * @type {string}
   * @name accept
   * @memberOf Finder#
   */
}

Finder.tag = 'Finder'.toLowerCase();
Finder.render = function () {
  return (0, _ACore._)({
    "class": 'as-finder',
    extendEvent: ['selectedchange', 'dblclickfile'],
    attr: {
      'data-selected-file-count': '0',
      'data-selected-folder-count': '0'
    },
    child: [{
      "class": 'as-finder-header',
      child: [{
        "class": 'as-finder-normal-action-button-ctn'
        /* child: Finder.prototype.actions.map(act => ({
             tag: FlexiconButton.tag,
             attr: { name: act.name },
             props: {
                 text: act.text,
                 // icon: act.icon
             }
         }))*/
      }, {
        "class": 'as-finder-tiny-action-button-ctn'
        /*child: Finder.prototype.actions.map(act => ({
            tag: 'button',
            attr: { name: act.name, title: act.text },
            child: act.icon
        }))*/
      }]
    }, {
      "class": ['as-finder-nav-ctn'],
      child: [{
        "class": 'as-finder-nav-header',
        child: [{
          "class": 'as-finder-nav-header-left',
          child: [{
            tag: 'button',
            "class": 'as-transparent-button',
            attr: {
              title: "Close Navigator",
              name: 'nav_toggle'
            },
            child: 'span.mdi.mdi-menu-open'
          }]
        }, {
          "class": 'as-finder-nav-header-right',
          child: [{
            tag: 'button',
            "class": 'as-transparent-button',
            attr: {
              title: "Search",
              name: 'switch_to_search'
            },
            child: 'span.mdi.mdi-magnify'
          }, {
            tag: 'button',
            "class": 'as-transparent-button',
            attr: {
              title: "Expand All",
              name: 'nav_expand_all'
            },
            child: 'span.mdi.mdi-arrow-expand-vertical'
          }, {
            tag: 'button',
            "class": 'as-transparent-button',
            attr: {
              title: "Collapse All",
              name: 'nav_collapse_all'
            },
            child: 'span.mdi.mdi-arrow-collapse-vertical'
          }, {
            tag: 'button',
            "class": 'as-transparent-button',
            attr: {
              title: "Reload",
              name: 'reload'
            },
            child: 'span.mdi.mdi-reload'
          }]
        }]
      }, {
        tag: _ExpTree.ExpGroup.tag,
        "class": 'as-bscroller'
      }]
    }, {
      "class": 'as-finder-search-ctn',
      child: [{
        "class": 'as-finder-search-header',
        child: [{
          tag: 'button',
          "class": 'as-transparent-button',
          attr: {
            title: "Close Navigator",
            name: 'nav_toggle'
          },
          child: 'span.mdi.mdi-menu-open'
        }]
      }, {
        "class": 'as-finder-search-body',
        child: [{
          tag: _Searcher["default"].tag,
          "class": 'as-finder-search-text'
        }, {
          "class": 'as-finder-search-field',
          child: [{
            child: {
              text: 'Kiểu'
            }
          }, {
            child: {
              tag: 'selectmenu',
              "class": 'as-finder-search-type-select',
              props: {
                items: [{
                  text: 'Tất cả',
                  value: 'all',
                  icon: 'span.mdi.mdi-asterisk'
                }, {
                  text: 'Hình ảnh',
                  value: 'image',
                  icon: 'span.mdi.mdi-image-outline'
                }, {
                  text: 'Tài liệu',
                  value: 'document',
                  icon: 'span.mdi.mdi-file-document'
                }]
              }
            }
          }]
        }, {
          "class": 'as-finder-search-footer',
          child: [{
            tag: _FlexiconButton["default"].tag,
            attr: {
              name: 'start_search'
            },
            props: {
              text: 'OK'
            }
          }, {
            tag: _FlexiconButton["default"].tag,
            attr: {
              name: 'cancel_search'
            },
            props: {
              text: 'Hủy'
            }
          }]
        }]
      }]
    }, {
      tag: _DropZone["default"].tag,
      attr: {
        'data-view-as': 'list'
      },
      "class": ['as-finder-body'],
      child: [{
        "class": 'as-finder-content-header',
        child: [{
          "class": 'as-finder-content-header-left',
          child: [{
            tag: 'button',
            attr: {
              title: 'Open Navigator',
              name: 'nav_toggle'
            },
            "class": 'as-transparent-button',
            child: ['span.mdi.mdi-menu']
          }, {
            tag: _RibbonButton["default"],
            attr: {
              title: 'View As',
              name: 'content_view_as'
            },
            "class": 'as-transparent-button',
            props: {
              text: 'List',
              icon: 'span.mdi.mdi-format-list-bulleted-square',
              items: [{
                icon: 'span.mdi.mdi-format-list-bulleted-square',
                text: 'List',
                value: 'list'
              }, {
                text: 'Medium Icons',
                icon: 'span.mdi.mdi-grid',
                value: 'content'
              }, {
                text: 'Lage Icons',
                icon: 'span.mdi.mdi-image-outline',
                value: 'lage_icons'
              }]
            }
            // child: ['span.mdi.mdi-format-list-bulleted-square']
          }]
        }, {
          "class": 'as-finder-content-header-right'
        }]
      }, {
        tag: _Hanger["default"].tag,
        "class": 'as-finder-content-ctn',
        props: {
          hangOn: 5
        },
        child: {
          "class": ['as-finder-content']
        }
      }, {
        "class": 'as-finder-upload-overlay',
        child: [{
          "class": 'as-finder-upload-overlay-icon-ctn',
          child: 'span.mdi.mdi-cloud-upload-outline'
        }, {
          child: {
            text: 'Thả file vào đây để tải lên'
          }
        }]
      }]
    }]
  });
};
Finder.property = {};
Finder.property.fileSystem = {
  set: function set(fs) {
    this._fileSystem = fs;
  },
  get: function get() {
    return this._fileSystem;
  }
};
Finder.property.path = {
  set: function set(path) {
    this.navCtrl.path = path;
  },
  get: function get() {
    return this.navCtrl.path;
  }
};
Finder.property.displayPath = {
  // set: function (path) {
  //     this.navCtrl.path = path;
  // },
  get: function get() {
    return this.navCtrl.displayPath;
  }
};
Finder.property.rootPath = {
  set: function set(path) {
    this.navCtrl.rootPath = path;
  },
  get: function get() {
    return this.navCtrl.rootPath;
  }
};
Finder.property.selectedFiles = {
  get: function get() {
    return this.selectCtrl.$selectedItems.filter(function (elt) {
      return elt.stat && !elt.stat.isDirectory;
    }).map(function (elt) {
      return elt.stat;
    });
  }
};
Finder.prototype.execCommand = function (name) {
  return this.commandCtrl.execCommand.apply(this.commandCtrl, arguments);
};
Finder.prototype.addCommand = function (name, descriptor) {
  this.commandCtrl.addCommand(name, descriptor);
};
Finder.prototype.addButton = function (name, bf) {
  this.commandCtrl.addButton(name, bf);
};

/****
 *
 * @param {string} name
 * @param {string=} bf
 */
Finder.prototype.addFolderMenuItem = function (name, bf) {
  this.commandCtrl.addFolderMenuItem(name, bf);
};
Finder.prototype.findZIndex = function () {
  var c = this;
  var res = 0;
  var zIndex;
  while (c) {
    zIndex = parseInt(getComputedStyle(c).getPropertyValue('z-index'));
    if (!isNaN(zIndex)) res = Math.max(zIndex, res);
    c = c.parentElement;
  }
  return res;
};
_ACore["default"].install(Finder);
var _default = Finder;
exports["default"] = _default;
var FinderCommands = {};
exports.FinderCommands = FinderCommands;
Finder.prototype.commands = FinderCommands;
FinderCommands.upload = {
  text: 'Tải lên',
  icon: 'span.mdi.mdi-upload-outline',
  match: function match(fileElt) {
    return !fileElt && this.searchCtrl.state !== 'RUNNING' && this.dirStat && this.dirStat.writable;
  },
  /***
   * @this Finder
   */
  exec: function exec() {
    var _this2 = this;
    (0, _utils.openFileDialog)({
      multiple: true
    }).then(function (files) {
      if (files && files.length > 0) {
        _this2.uploadCtrl.upload(files);
      }
    });
  }
};
FinderCommands.upload_to_folder = {
  text: 'Tải lên',
  icon: 'span.mdi.mdi-upload-outline',
  match: function match(treElt) {
    return treElt && treElt.stat && treElt.stat.writable;
  },
  /***
   * @this Finder
   */
  exec: function exec() {
    var _this3 = this;
    //todo: selected folder
    (0, _utils.openFileDialog)({
      multiple: true
    }).then(function (files) {
      if (files && files.length > 0) {
        _this3.uploadCtrl.upload(files);
      }
    });
  }
};
FinderCommands["delete"] = {
  icon: 'span.mdi.mdi-delete-outline',
  text: 'Xóa',
  /***
   * @this Finder
   */
  match: function match(fileElt) {
    return fileElt && this.selectCtrl.$selectedItems.length > 0 && this.selectCtrl.$selectedItems.every(function (elt) {
      return elt.stat && !elt.stat.isDirectory && elt.stat.writable;
    });
  },
  /***
   * @this Finder
   */
  exec: function exec() {
    var _this4 = this;
    var paths = this.selectCtrl.$selectedItems.map(function (elt) {
      return elt.stat.path;
    });
    var names = this.selectCtrl.$selectedItems.map(function (elt) {
      return elt.fileName;
    });
    if (names.length === 0) return;
    var contentElt = (0, _ACore._)({
      style: {
        maxHeight: '50vh',
        overflow: 'auto'
      },
      child: {
        style: {
          display: 'table'
        },
        child: names.map(function (name) {
          return {
            style: {
              display: 'table-row'
            },
            child: [{
              style: {
                display: 'table-cell',
                padding: '5px 20px 5px 10px'
              },
              child: {
                style: {
                  'min-width': '30em'
                },
                child: {
                  text: name
                }
              }
            }, {
              style: {
                display: 'table-cell',
                padding: '5px 10px'
              },
              child: {
                "class": 'as-finder-task-check',
                style: {
                  'min-width': '3em',
                  textAlign: 'right'
                },
                child: 'span'
              }
            }]
          };
        })
      }
    });
    var modal = (0, _ACore._)({
      tag: _Modal["default"].tag,
      style: {
        zIndex: this.findZIndex() + 9000
      },
      child: {
        tag: _MessageDialog["default"].tag,
        props: {
          dialogTitle: 'Xóa file',
          dialogActions: [{
            name: "ok",
            text: "OK"
          }, {
            name: 'cancel',
            text: 'Hủy'
          }]
        },
        child: [{
          child: {
            tag: 'span',
            child: {
              text: "Xác nhận xóa những file dưới đây: "
            }
          }
        }, contentElt],
        on: {
          action: function action(event, sender) {
            var promises;
            var errors = [];
            if (event.action.name === 'ok') {
              sender.$actionBtns[0].disabled = true;
              sender.$actionBtns[0].text = "Đang tiến hành xóa..";
              sender.$actionBtns[1].disabled = true;
              promises = paths.map(function (path, i) {
                return _this4.fileSystem.unlink(path).then(function () {
                  (0, _ACore.$)('.as-finder-task-check', contentElt.firstChild.childNodes[i]).addChild((0, _ACore._)('span.mdi.mdi-check'));
                })["catch"](function (err) {
                  errors.push(err);
                  (0, _ACore.$)('.as-finder-task-check', contentElt.firstChild.childNodes[i]).addChild((0, _ACore._)('span.mdi.mdi-alert-decagram-outline')).addChild((0, _ACore._)({
                    tag: 'span',
                    "class": '.as-finder-task-error-message',
                    child: {
                      text: err.message
                    }
                  }));
                });
              });
              Promise.all(promises).then(function () {
                var commands = {};
                if (errors.length > 0) {
                  errors.forEach(function (err) {
                    if (err.command) {
                      commands[err.command] = true;
                    }
                  });
                  if (commands.reload) _this4.execCommand('reload');
                  sender.$actionBtns[1].disabled = false;
                  sender.$actionBtns[0].text = "Hoàn thành";
                } else {
                  _this4.navCtrl.reload(_this4.path, true).then(function () {
                    return modal.remove();
                  });
                }
              });
            } else {
              modal.remove();
            }
          }
        }
      }
    }).addTo(document.body);
  }
};
FinderCommands.view = {
  icon: 'span.mdi.mdi-eye-outline',
  text: 'Xem',
  match: function match(fileElt) {
    return !!fileElt;
  },
  /***
   * @this Finder
   */
  exec: function exec() {
    var elt = this.selectCtrl.$selectedItems[0];
    if (!elt) return;
    if (elt.stat.isDirectory) {
      this.navCtrl.viewDir(elt.stat.path);
      return;
    }
    var url = elt.stat.url;
    if (!url) return;
    var type = elt.fileType;
    if (type === 'xlsx' || type === 'docx' || type === 'xls' || type === 'doc' || type === 'ppt' || type === 'pptx') {
      url = 'https://view.officeapps.live.com/op/embed.aspx?src=' + encodeURIComponent(url);
    } else {
      url = encodeURI(url);
    }
    var mineType = _ext2MineType["default"][type] || 'none';
    var content;
    if (mineType.startsWith('video')) {
      content = (0, _ACore._)({
        tag: 'video',
        style: {
          maxWidth: 'calc(90vw - 20px)',
          maxHeight: 'calc(90vh - 80px)',
          width: '900px',
          height: 'auto'
        },
        attr: {
          autoplay: 'true',
          controls: 'true'
        },
        props: {
          src: url
        }
      });
    } else if (mineType.startsWith('audio')) {
      content = (0, _ACore._)({
        tag: 'audio',
        style: {
          margin: '5px'
        },
        attr: {
          autoplay: 'true',
          controls: 'true'
        },
        props: {
          src: url
        }
      });
    } else if (mineType.startsWith('image')) {
      content = (0, _ACore._)({
        tag: 'img',
        style: {
          maxWidth: 'calc(90vw - 20px)',
          maxHeight: 'calc(90vh - 80px)',
          width: 'auto',
          height: 'auto'
        },
        attr: {},
        props: {
          src: url
        }
      });
    } else {
      content = (0, _ACore._)({
        tag: 'iframe',
        style: {
          maxWidth: 'calc(90vw - 20px)',
          maxHeight: 'calc(90vh - 80px)',
          width: '900px',
          height: '600px'
        },
        props: {
          src: url,
          onload: function onload() {
            // console.log(this.contentWindow.document.body.offsetHeight, this.contentWindow.document.body.offsetWidth)
          }
        }
      });
    }
    var modal = (0, _ACore._)({
      tag: _Modal["default"].tag,
      style: {
        zIndex: this.findZIndex() + 9000
      },
      child: {
        tag: _WindowBox["default"].tag,
        child: content,
        props: {
          windowTitle: elt.stat.displayName || elt.stat.name,
          windowActions: [{
            name: 'close',
            icon: 'span.mdi.mdi-close'
          }]
        },
        on: {
          action: function action() {
            modal.remove();
          }
        }
      }
    }).addTo(document.body);
  }
};
FinderCommands.download = {
  icon: 'span.mdi.mdi-download-outline',
  text: 'Tải về',
  match: function match(elt) {
    return elt && this.selectCtrl.$selectedItems.length > 0 && this.selectCtrl.$selectedItems.every(function (elt) {
      return elt.stat && !elt.stat.isDirectory;
    });
  },
  /***
   * @this Finder
   */
  exec: function exec() {
    var taskMng = new _TaskManager["default"]({
      limit: 4
    });
    this.selectCtrl.$selectedItems.forEach(function (elt) {
      if (elt.isDirectory) return;
      var url = elt.stat.url;
      if (!url) return;
      taskMng.requestTask(function (onFinish, bundle) {
        (0, _FileSaver.saveAs)(bundle.url, bundle.name);
        setTimeout(onFinish, 100);
      }, {
        url: url,
        name: elt.fileName
      });
    });
  }
};
FinderCommands.rename = {
  icon: 'span.mdi.mdi-rename',
  text: 'Đổi tên',
  /***
   * @this Finder
   */
  match: function match(elt) {
    return elt && this.selectCtrl.$selectedItems.length === 1 && elt.stat && !elt.stat.isDirectory && elt.stat.writable; //todo: rename folder
  },

  /***
   * @this Finder
   */
  exec: function exec() {
    var _this5 = this;
    var elt = this.selectCtrl.$selectedItems[0];
    if (!elt) return;
    var path = elt.stat.path;
    var value = elt.fileName;
    var input = (0, _ACore._)({
      tag: _TextArea["default"].tag,
      style: {
        outline: 'none',
        position: 'absolute',
        zIndex: 100,
        left: 0,
        bottom: 0,
        width: '100%'
      },
      props: {
        value: elt.fileName
      },
      on: {
        blur: function blur() {
          var newValue = input.value.replace(/<>:\\\/\|\?\*\^/g, '').trim();
          input.remove();
          if (!value) return;
          if (value === newValue) return;
          _this5.fileSystem.rename(path, newValue).then(function (newStat) {
            elt.stat = newStat;
            elt.value = newStat.url;
            elt.fileName = newStat.displayName || newStat.name;
          });
        }
      }
    });
    elt.addChild(input);
    input.on('keydown', function (event) {
      if (event.key.match(/<>:\\\/\|\?\*\^/)) {
        event.preventDefault();
        setTimeout(function () {
          return input.updateSize();
        }, 30);
      } else if (event.key === 'Enter') {
        input.blur();
      } else if (event.key === 'Escape') {
        input.value = value;
        input.updateSize();
        input.blur();
      }
    }, true);
    input.updateSize();
    input.focus();
    var ext = value.match(/\.[a-zA-Z0-9]+$/);
    if (ext) {
      ext = ext[0];
    } else {
      ext = '';
    }
    input.setSelectionRange(0, value.length - ext.length);
  }
};
FinderCommands.copy = {
  icon: 'span.mdi.mdi-content-copy',
  text: 'Sao chép',
  exec: function exec() {}
};
FinderCommands.move = {
  text: 'Di chuyển',
  icon: 'span.mdi.mdi-file-move-outline',
  match: function match(fileElt) {
    if (arguments.length === 0) {
      return this.selectCtrl.$selectedItems.every(function (elt) {
        return elt.stat.writable;
      });
    }
    return fileElt && fileElt.stat && fileElt.stat.writable;
  },
  /***
   * @this Finder
   */
  exec: function exec() {
    var _this6 = this;
    var itemElements = this.selectCtrl.$selectedItems.slice();
    var paths = itemElements.map(function (elt) {
      return elt.stat.path;
    });
    var names = itemElements.map(function (elt) {
      return elt.fileName;
    });
    if (names.length === 0) return;
    var currentFolderPath = this.path;
    this.folderDialog.open(currentFolderPath, false, function (newFolderPath, stat) {
      return newFolderPath !== currentFolderPath && stat.writable;
    }, 'Di chuyển file').then(function (newFolderPath) {
      if (!newFolderPath) return;
      if (newFolderPath === currentFolderPath) return;
      var contentElt = (0, _ACore._)({
        style: {
          maxHeight: '50vh',
          overflow: 'auto'
        },
        child: {
          style: {
            display: 'table'
          },
          child: names.map(function (name) {
            return {
              style: {
                display: 'table-row'
              },
              child: [{
                style: {
                  display: 'table-cell',
                  padding: '5px 20px 5px 10px'
                },
                child: {
                  style: {
                    'min-width': '30em'
                  },
                  child: {
                    text: name
                  }
                }
              }, {
                style: {
                  display: 'table-cell',
                  padding: '5px 10px'
                },
                child: {
                  "class": 'as-finder-task-check',
                  style: {
                    'min-width': '3em',
                    textAlign: 'right'
                  },
                  child: 'span'
                }
              }]
            };
          })
        }
      });
      var modal = (0, _ACore._)({
        tag: _Modal["default"].tag,
        style: {
          zIndex: _this6.findZIndex() + 9000
        },
        child: {
          tag: _MessageDialog["default"].tag,
          props: {
            dialogTitle: 'Di chuyển file',
            dialogActions: [{
              name: 'close',
              text: 'Đóng'
            }]
          },
          child: [{
            child: {
              tag: 'span',
              child: {
                text: "Danh sách đang di chuyển: "
              }
            }
          }, contentElt],
          on: {
            action: function action(event, sender) {
              modal.remove();
            }
          }
        }
      }).addTo(document.body);
      var errors = [];
      var promises = paths.map(function (path, i) {
        var newPath = newFolderPath + '/' + path.split('/').pop();
        return _this6.fileSystem.move(path, newPath).then(function () {
          (0, _ACore.$)('.as-finder-task-check', contentElt.firstChild.childNodes[i]).addChild((0, _ACore._)('span.mdi.mdi-check'));
        })["catch"](function (err) {
          errors.push(err);
          (0, _ACore.$)('.as-finder-task-check', contentElt.firstChild.childNodes[i]).addChild((0, _ACore._)('span.mdi.mdi-alert-decagram-outline')).addChild((0, _ACore._)({
            tag: 'span',
            "class": '.as-finder-task-error-message',
            child: {
              text: err.message
            }
          }));
        });
      });
      Promise.all(promises).then(function () {
        var commands = {};
        if (errors.length > 0) {
          errors.forEach(function (err) {
            if (err.command) {
              commands[err.command] = true;
            }
          });
          if (commands.reload) _this6.execCommand('reload');
        } else {
          _this6.navCtrl.reload(_this6.path, true).then(function () {
            return modal.remove();
          });
        }
      });
    });
  }
};
FinderCommands.move_dir = {
  text: 'Di chuyển',
  icon: 'span.mdi.mdi-folder-arrow-right-outline',
  match: function match(expElt) {
    return expElt && expElt.stat && expElt.stat.writable && !expElt.stat.isVirtual;
  },
  /***
   * @this Finder
   */
  exec: function exec(expElt) {
    var _this7 = this;
    var path = expElt.stat.path;
    var currentFolderPath = path.split('/');
    var name = currentFolderPath.pop();
    currentFolderPath = currentFolderPath.join('/');
    this.folderDialog.open(currentFolderPath, true, function (newPath) {
      return !newPath.startsWith(path);
    }, 'Di chuyển thư mục').then(function (newFolderPath) {
      if (!newFolderPath) return;
      return _this7.fileSystem.move(path, newFolderPath + '/' + name).then(function () {
        _this7.path = newFolderPath + '/' + name;
        _this7.navCtrl.reload(_this7.rootPath).then(function () {
          _this7.navCtrl.viewDir(_this7.path);
        });
      });
    });
  }
};
FinderCommands.rmdir = {
  text: 'Xóa',
  icon: 'span.mdi.mdi-delete-outline',
  /***
   * @this Finder
   * @param elt
   */
  match: function match(elt) {
    if (elt.stat && elt.stat.isVirtual) return false;
    if (elt) return elt.stat && elt.stat.writable;
    return false;
  },
  exec: function exec(elt) {}
};
FinderCommands.select_all = {
  text: 'Chọn tất cả',
  icon: 'span.mdi.mdi-select-all',
  match: function match(fileElt) {
    return !fileElt;
  },
  /***
   * @this Finder
   */
  exec: function exec() {
    this.selectCtrl.selectAll();
  }
};
FinderCommands.nav_expand_all = {
  /***
   * @this Finder
   */
  exec: function exec() {
    this.navCtrl.expandAll();
  }
};
FinderCommands.nav_collapse_all = {
  /***
   * @this Finder
   */
  exec: function exec() {
    this.navCtrl.collapseAll();
  }
};
FinderCommands.reload = {
  /***
   * @this Finder
   */
  exec: function exec() {
    var _this8 = this;
    this.fileSystem.clearCache();
    this.navCtrl.reload().then(function () {
      _this8.navCtrl.viewDir(_this8.path);
    });
  }
};
FinderCommands.content_view_as = {
  /***
   * @this Finder
   */
  exec: function exec(value, item) {
    this.$commandButtons['content_view_as'].text = item.text;
    this.$commandButtons['content_view_as'].icon = item.icon;
    this.$body.attr('data-view-as', value);
  }
};
FinderCommands.switch_to_search = {
  /***
   * @this Finder
   */
  exec: function exec() {
    this.searchCtrl.start();
  }
};
FinderCommands.cancel_search = {
  /***
   * @this Finder
   */
  exec: function exec() {
    this.searchCtrl.stop();
    this.navCtrl.viewDir(this.path);
  }
};
FinderCommands.start_search = {
  /***
   * @this Finder
   */
  exec: function exec() {
    this.searchCtrl.search();
  }
};
FinderCommands.nav_toggle = {
  icon: 'span.mdi.mdi-menu',
  exec: function exec() {
    if (this.hasClass('as-nav-open')) {
      this.removeClass('as-nav-open');
    } else {
      this.addClass('as-nav-open');
    }
  }
};

/***
 *
 * @param {Finder} elt
 * @constructor
 */
function LayoutController(elt) {
  this.elt = elt;
  this.actionButtonWidth = 0;
  this.elt.domSignal.on('requestUpdateActionButtonSize', this.updateActionButtonSize.bind(this));
  this.elt.on('click', this.ev_click.bind(this));
}
LayoutController.prototype.requestUpdateActionButtonSize = function () {
  this.elt.domSignal.emit('requestUpdateActionButtonSize');
};
LayoutController.prototype.updateActionButtonSize = function () {
  var font = this.elt.$nomalActionCtn.getComputedStyleValue('font');
  var fontSize = this.elt.$nomalActionCtn.getFontSize();
  this.actionButtonWidth = Array.prototype.reduce.call(this.elt.$nomalActionCtn.childNodes, function (ac, cr) {
    return ac + Math.max(110, 0.715 * fontSize * 2 + (0, _utils.measureText)(cr.text, font).width) + 10;
  }, 60);
  this.update();
};
LayoutController.prototype.update = function () {
  var bound = this.elt.getBoundingClientRect();
  if (bound.width < 500) {
    if (!this.elt.hasClass('as-mini-layout')) this.elt.addClass('as-mini-layout');
  } else {
    if (this.elt.hasClass('as-mini-layout')) {
      this.elt.removeClass('as-mini-layout');
      this.elt.removeClass('as-nav-open');
    }
  }
  if (this.elt.hasClass('as-action-button-minimized')) {
    if (this.actionButtonWidth <= bound.width) {
      this.elt.removeClass('as-action-button-minimized');
    }
  } else {
    if (this.actionButtonWidth > bound.width) {
      this.elt.addClass('as-action-button-minimized');
    }
  }
  var bodyBound = this.elt.$body.getBoundingClientRect();
  var col = Math.floor(bodyBound.width / 300) || 1;
  this.elt.$body.addStyle('--col', col + '');
};
LayoutController.prototype.ev_click = function (event) {
  if (event.target === this.elt) {
    this.elt.removeClass('as-nav-open');
  }
};

/***
 *
 * @param {Finder} elt
 * @constructor
 */

function CommandController(elt) {
  var _this9 = this;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) {
      _this9[key] = _this9[key].bind(_this9);
    }
  });
  this.elt = elt;
  this.$normalActionCtn = this.elt.$nomalActionCtn;
  this.$tinyActionCtn = this.elt.$tinyActionCtn;
  this.commands = Object.assign({}, this.elt.commands);
  this.buttonNames = ['upload', 'view', 'download', 'move', 'rename', 'delete'];
  this.folderMenuItemNames = ['upload_to_folder', 'move_dir'];
  this.contentMenuItemNames = ['view', 'download', 'upload', 'select_all', 'move', 'delete', 'rename'];
  this.$navCtn = this.elt.$navCtn;
  this.$navCtn.defineEvent('contextmenu').on('contextmenu', this.ev_navContextMenu);
  this.$contentCtn = this.elt.$contentCtn;
  this.$contentCtn.defineEvent('contextmenu').on('contextmenu', this.ev_contentContextMenu);
  this.updateButtons();
}
CommandController.prototype.updateButtons = function () {
  var _this10 = this;
  this.$normalActionCtn.clearChild();
  var buttons = this.buttonNames.map(function (name) {
    var desc = _this10.commands[name] || {};
    return (0, _ACore._)({
      tag: _FlexiconButton["default"].tag,
      attr: {
        name: name
      },
      props: {
        text: desc.text || name
      },
      on: {
        click: function click() {
          _this10.execCommand(name);
        }
      }
    });
  });
  this.$normalActionCtn.addChild(buttons);
  buttons = this.buttonNames.map(function (name) {
    var desc = _this10.commands[name] || {};
    return (0, _ACore._)({
      tag: 'button',
      "class": 'as-transparent-button',
      attr: {
        name: name
      },
      child: desc.icon,
      on: {
        click: function click() {
          _this10.execCommand(name);
        }
      }
    });
  });
  this.$tinyActionCtn.addChild(buttons);
  this.elt.layoutCtn.requestUpdateActionButtonSize();
};
CommandController.prototype.execCommand = function (name) {
  var args = Array.prototype.slice.call(arguments, 1);
  var desc = this.commands[name];
  if (desc && typeof desc.exec === 'function') {
    return desc.exec.apply(this.elt, args);
  }
  return null;
};
CommandController.prototype.addCommand = function (name, desc) {
  this.commands[name] = Object.assign({}, this.commands[name], desc);
};

/****
 *
 * @param {string} name
 * @param {string=} bf
 */
CommandController.prototype.addButton = function (name, bf) {
  var _this11 = this;
  var idx = this.buttonNames.indexOf(bf);
  var bfElt, smallBfElt;
  if (idx >= 0) {
    this.buttonNames.splice(idx, 0, name);
    bfElt = (0, _ACore.$)("button[name=\"".concat(name, "\"]"), this.$normalActionCtn);
    smallBfElt = (0, _ACore.$)("button[name=\"".concat(name, "\"]"), this.$tinyActionCtn);
  } else {
    this.buttonNames.push(name);
  }
  var desc = this.commands[name] || {};
  this.$normalActionCtn.addChildBefore((0, _ACore._)({
    tag: _FlexiconButton["default"].tag,
    attr: {
      name: name
    },
    props: {
      text: desc.text || name
    },
    on: {
      click: function click() {
        _this11.execCommand(name);
      }
    }
  }), bfElt);
  this.$tinyActionCtn.addChild((0, _ACore._)({
    tag: 'button',
    "class": 'as-transparent-button',
    attr: {
      name: name
    },
    child: desc.icon,
    on: {
      click: function click() {
        _this11.execCommand(name);
      }
    }
  }), smallBfElt);
  this.elt.layoutCtn.requestUpdateActionButtonSize();
};

/****
 *
 * @param {string} name
 * @param {string=} bf
 */
CommandController.prototype.addFolderMenuItem = function (name, bf) {
  idx = this.folderMenuItemNames.indexOf(name);
  if (idx >= 0) return;
  var idx = this.folderMenuItemNames.indexOf(bf);
  if (idx >= 0) this.folderMenuItemNames.splice(idx, 0, name);else this.folderMenuItemNames.push(name);
};

/****
 *
 * @param {string} name
 * @param {string=} bf
 */
CommandController.prototype.addContentMenuItem = function (name, bf) {
  idx = this.folderMenuItemNames.indexOf(name);
  if (idx >= 0) return; //todo
  var idx = this.folderMenuItemNames.indexOf(bf);
  if (idx >= 0) this.folderMenuItemNames.splice(idx, 0, name);else this.folderMenuItemNames.push(name);
};
CommandController.prototype.ev_navContextMenu = function (event) {
  var _this12 = this;
  var expTree;
  var c = event.target;
  while (c && !expTree) {
    if (c.stat) expTree = c;
    c = c.parentElement;
  }
  if (expTree) this.elt.navCtrl.viewDir(expTree.stat.path, [this.elt.rootPath].concat(expTree.getPath()).join('/'));
  var items = this.folderMenuItemNames.map(function (name) {
    var desc = _this12.commands[name];
    if (!desc) return null;
    if (typeof desc.match === "function") {
      if (!desc.match.call(_this12.elt, expTree)) return null;
    }
    return {
      text: desc.text,
      icon: desc.icon,
      cmd: name
    };
  }).filter(function (x) {
    return !!x;
  });
  if (items.length > 0) {
    event.showContextMenu({
      items: items
    }, function (event) {
      var cmd = event.menuItem.cmd;
      _this12.execCommand(cmd, expTree);
    });
  }
};
CommandController.prototype.ev_contentContextMenu = function (event) {
  var _this13 = this;
  var fileElt;
  var c = event.target;
  while (c && !fileElt) {
    if (c.stat) fileElt = c;
    c = c.parentElement;
  }
  var selectedElements = this.elt.selectCtrl.$selectedItems;
  if (fileElt && selectedElements.indexOf(fileElt) < 0) {
    this.elt.selectCtrl.deselectAll();
    this.elt.selectCtrl.select(fileElt);
  }
  // if (expTree) this.elt.navCtrl.viewDir(expTree.stat.path, [this.elt.rootPath].concat(expTree.getPath()).join('/'));
  var items = this.contentMenuItemNames.map(function (name) {
    var desc = _this13.commands[name];
    if (!desc) return null;
    if (typeof desc.match === "function") {
      if (!desc.match.call(_this13.elt, fileElt)) return null;
    }
    return {
      text: desc.text,
      icon: desc.icon,
      cmd: name
    };
  }).filter(function (x) {
    return !!x;
  });
  if (items.length > 0) {
    event.showContextMenu({
      items: items
    }, function (event) {
      var cmd = event.menuItem.cmd;
      _this13.execCommand(cmd, fileElt);
    });
  }
};

/***
 * for desktop
 * @param {Finder} elt
 * @constructor
 */
function SelectController(elt) {
  var _this14 = this;
  this.elt = elt;
  this.$selectedItems = []; // first element is focus
  this.$content = this.elt.$content;
  this.$contentCtn = this.elt.$contentCtn;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) {
      _this14[key] = _this14[key].bind(_this14);
    }
  });
  this._setupSelectTool();
}

/***
 *
 * @protected
 */
SelectController.prototype._setupSelectTool = function () {
  this._draged = false;
  this._dragOffset = new _Vec["default"](0, 0);
  this.$selectArea = (0, _ACore._)('.as-finder-select-area');
  this.$contentCtn.on('draginit', this.ev_dragInit).on('dragdeinit', this.ev_dragDeinit).on('dragstart', this.ev_dragStart).on('drag', this.ev_drag).on('dragend', this.ev_dragEnd);
};
SelectController.prototype.deselectAll = function () {
  while (this.$selectedItems.length > 0) {
    this.$selectedItems.pop().checked = false;
  }
  this._updateCount();
  this.elt.emit('selectedchange');
};
SelectController.prototype.select = function (elt) {
  //todo: more option
  this.deselectAll();
  this.$selectedItems.push(elt);
  elt.checked = true;
  this._updateCount();
  this.elt.emit('selectedchange');
};
SelectController.prototype.selectAll = function () {
  //todo: more option
  this.deselectAll();
  var fileElements = Array.prototype.slice.call(this.$content.childNodes);
  this.$selectedItems.push.apply(this.$selectedItems, fileElements);
  fileElements.forEach(function (elt) {
    elt.checked = true;
  });
  this._updateCount();
  this.elt.emit('selectedchange');
};
SelectController.prototype.ev_dragInit = function (event) {
  if (event.target.tagName === 'INPUT' || event.target.tagName === 'TEXTAREA') {
    event.cancel();
    return;
  }
  // event.preventDefault();
  this._draged = false;
};
SelectController.prototype.ev_dragDeinit = function (event) {
  if (!this._draged) this.ev_click(event);
};
SelectController.prototype.ev_dragStart = function (event) {
  this._draged = true;
  this.elt.addClass('as-dragging');
  this.$selectArea.addStyle('z-index', this.elt.findZIndex() + 100 + '').addTo(document.body);
  var bound = _Rectangle["default"].fromClientRect(this.$content.getBoundingClientRect());
  this._dragOffset = event.currentPoint.sub(bound.A());
  var pos = bound.A().add(this._dragOffset);
  this.$selectArea.addStyle({
    left: pos.x + 'px',
    top: pos.y + 'px'
  });
};
SelectController.prototype.ev_drag = function (event) {
  this._draged = true;
  var bound = _Rectangle["default"].fromClientRect(this.$content.getBoundingClientRect());
  var A = bound.A().add(this._dragOffset);
  var C = event.currentPoint;
  var sRect = _Rectangle["default"].boundingPoints([A, C]);
  this.$selectArea.addStyle({
    left: sRect.x + 'px',
    top: sRect.y + 'px',
    width: sRect.width + 'px',
    height: sRect.height + 'px'
  });
};
SelectController.prototype.ev_dragEnd = function () {
  var _this15 = this;
  while (this.$selectedItems.length > 0) {
    this.$selectedItems.pop().checked = false;
  }
  var selectBound = _Rectangle["default"].fromClientRect(this.$selectArea.getBoundingClientRect());
  Array.prototype.forEach.call(this.$content.childNodes, function (elt) {
    var bound = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    if (selectBound.isCollapse(bound, 0)) {
      _this15.$selectedItems.push(elt);
      elt.checked = true;
    }
  });
  this._draged = true;
  this.$selectArea.remove();
  this.elt.removeClass('as-dragging');
  this._updateCount();
  this.elt.layoutCtn.update();
  this.elt.emit('selectedchange');
};
SelectController.prototype._updateCount = function () {
  var folderCount = this.$selectedItems.filter(function (elt) {
    return elt.stat.isDirectory;
  }).length;
  this.elt.attr('data-selected-file-count', this.$selectedItems.length - folderCount + '');
  this.elt.attr('data-selected-folder-count', folderCount + '');
};
SelectController.prototype.ev_click = function (event) {
  event = event.originalEvent || event.originEvent || event;
  var c = event.target;
  var itemElt;
  while (c && !itemElt) {
    if (c.hasClass && c.hasClass('as-file-thumbnail')) {
      itemElt = c;
      break;
    }
    c = c.parentElement;
  }
  var focusIdx;
  var currentIdx;
  if (this.$selectedItems.length === 0 && itemElt) {
    this.$selectedItems.push(itemElt);
    itemElt.checked = true;
  } else if ((0, _EventEmitter.isMouseRight)(event)) {} else if (!event.ctrlKey && !event.shiftKey) {
    while (this.$selectedItems.length > 0) {
      this.$selectedItems.pop().checked = false;
    }
    if (itemElt) {
      this.$selectedItems.push(itemElt);
      itemElt.checked = true;
    }
  } else if (event.shiftKey) {
    if (itemElt) {
      focusIdx = Array.prototype.indexOf.call(this.$content.childNodes, this.$selectedItems[0]);
      currentIdx = Array.prototype.indexOf.call(this.$content.childNodes, itemElt);
      while (this.$selectedItems.length > 1) {
        this.$selectedItems.pop().checked = false;
      }
      while (currentIdx !== focusIdx) {
        itemElt = this.$content.childNodes[currentIdx];
        this.$selectedItems.push(itemElt);
        itemElt.checked = true;
        if (currentIdx < focusIdx) currentIdx++;else currentIdx--;
      }
    }
  } else if (event.ctrlKey) {
    if (itemElt) {
      currentIdx = this.$selectedItems.indexOf(itemElt);
      if (currentIdx >= 0) {
        this.$selectedItems.splice(currentIdx, 1);
        itemElt.checked = false;
      } else {
        this.$selectedItems.unshift(itemElt);
        itemElt.checked = true;
      }
    }
  }
  this._updateCount();
  this.elt.layoutCtn.update();
  this.elt.emit('selectedchange');
};

/***
 * @extends SelectController
 * @param elt
 * @constructor
 */
function MobileSelectController(elt) {
  SelectController.apply(this, arguments);
}
_OOP["default"].mixClass(MobileSelectController, SelectController);
MobileSelectController.prototype._setupSelectTool = function () {
  this.$content.on('click', this.ev_click);
};

/***
 *
 * @param {Finder} elt
 * @constructor
 */
function UploadController(elt) {
  var _this16 = this;
  /***
   *
   * @type {Finder}
   */
  this.elt = elt;
  this.$body = this.elt.$body;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) {
      _this16[key] = _this16[key].bind(_this16);
    }
  });
  this.$body.on({
    fileenter: this.ev_fileEnter,
    filedrop: this.ev_fileDrop
  });
}
UploadController.prototype.upload = function (files) {
  var _this17 = this;
  var screenSize = (0, _Dom.getScreenSize)();
  var contentElt = (0, _ACore._)({
    style: {
      maxHeight: '50vh',
      overflow: 'auto'
    },
    child: {
      style: {
        display: 'table'
      },
      child: files.map(function (file) {
        return {
          style: {
            display: 'table-row'
          },
          child: [{
            style: {
              display: 'table-cell',
              padding: '5px 20px 5px 10px'
            },
            child: {
              style: {
                'width': Math.min(screenSize.width - 180, 800) / 14 + 'em',
                textOverflow: 'ellipsis',
                overflow: 'hidden'
              },
              child: {
                text: file.name
              }
            }
          }, {
            style: {
              display: 'table-cell',
              padding: '5px 10px'
            },
            child: {
              "class": 'as-upload-percent',
              style: {
                'min-width': '3em',
                textAlign: 'right',
                color: 'rgb(30,237,219)'
              },
              child: {
                text: ''
              }
            }
          }]
        };
      })
    }
  });
  var modal = (0, _ACore._)({
    tag: _Modal["default"].tag,
    style: {
      zIndex: this.elt.findZIndex() + 9000
    },
    child: {
      tag: _MessageDialog["default"].tag,
      props: {
        dialogTitle: 'Tải lên'
      },
      child: contentElt
    }
  }).addTo(document.body);

  //because file system in keeview not allow writing multiple file at the same time
  var syncs = files.reduce(function (sync, file, i) {
    var percentText = (0, _ACore.$)('.as-upload-percent', contentElt.firstChild.childNodes[i]);
    return sync.then(function () {
      return _this17.elt.fileSystem.writeFile(_this17.elt.path + '/' + file.name, file, function (done) {
        var textBound = percentText.getBoundingClientRect();
        var ctnBound = contentElt.getBoundingClientRect();
        if (textBound.bottom > ctnBound.bottom) {
          contentElt.scrollTop += textBound.bottom - ctnBound.bottom;
        }
        percentText.firstChild.data = Math.round(done * 100) + '%';
      });
    });
  }, Promise.resolve());
  syncs.then(function () {
    _this17.elt.navCtrl.reload(_this17.elt.path, true).then(function () {
      return modal.remove();
    });
  });
};
UploadController.prototype.ev_fileEnter = function (event) {
  var files = Array.prototype.slice.call(event.dataTransfer.files);
  if (files.length === 0) return;
};
UploadController.prototype.ev_fileDrop = function (event) {
  if (this.elt.searchCtrl.state === "RUNNING") return;
  var files = event.files;
  if (files.length > 0) this.upload(files);
};

/***
 * @extends EventEmitter
 * @param {Finder} elt
 * @constructor
 */
function FolderDialog(elt) {
  _EventEmitter["default"].call(this);
  this.elt = elt;
}
_OOP["default"].mixClass(FolderDialog, _EventEmitter["default"]);
FolderDialog.prototype._init = function () {
  if (this.$modal) return;
  this.$modal = (0, _ACore._)({
    tag: 'modal',
    "class": 'as-finder-folder-dialog-modal',
    child: {
      tag: _MessageDialog["default"].tag,
      props: {
        dialogTitle: 'Duyệt thư mục',
        dialogActions: [{
          name: 'ok',
          text: 'OK'
        }, {
          name: 'cancel',
          text: 'Hủy'
        }]
      },
      child: [{
        "class": 'as-finder-folder-dialog-content',
        child: [{
          "class": 'as-finder-folder-dialog-selected-ctn',
          child: [{
            tag: 'span',
            child: {
              text: 'Đã chọn thư mục: '
            }
          }, {
            tag: 'span',
            child: {
              text: ' ... '
            }
          }]
        }, {
          "class": 'as-finder-folder-dialog-tree-ctn',
          child: [{
            tag: _ExpTree.ExpGroup.tag
          }, {
            tag: _ExpTree.ExpTree.tag,
            "class": 'as-finder-folder-dialog-tree-root',
            props: {
              name: 'root',
              icon: 'span.mdi.mdi-harddisk'
            }
          }]
        }]
      }]
    }
  });
  this.$dialog = (0, _ACore.$)(_MessageDialog["default"].tag, this.$modal);
  this.$treeCtn = (0, _ACore.$)('.as-finder-folder-dialog-tree-ctn', this.$modal);
  this.$rootTree = (0, _ACore.$)('.as-finder-folder-dialog-tree-root', this.$modal);
  this.$content = (0, _ACore.$)('.as-finder-folder-dialog-content', this.$modal);
  this.$expGroup = (0, _ACore.$)(_ExpTree.ExpGroup.tag, this.$content);
  this.$selectedCtn = (0, _ACore.$)('.as-finder-folder-dialog-selected-ctn', this.$content);
  this.$selectedPath = this.$selectedCtn.childNodes[1];
  this.$activeNode = null;
};
FolderDialog.prototype.open = function (initPath, showRoot, checkFunc, title) {
  var _this18 = this;
  var cPath = initPath;
  this._init();
  var fileSystem = this.elt.fileSystem;
  var zIndex = this.elt.findZIndex() + 9000;
  this.$modal.addStyle('z-index', zIndex + '');
  this.$modal.addTo(document.body);
  if (this.$activeNode) {
    this.$activeNode.active = false;
    this.$activeNode = null;
  }
  this.$dialog.$actionBtns[0].disabled = true;
  this.$dialog.dialogTitle = title || 'Duyệt';
  var makeTree = function makeTree(path, ctnElt, level) {
    level = level || 0;
    return fileSystem.readDir(path).then(function (dirs) {
      return Promise.all(dirs.map(function (dir) {
        return fileSystem.stat(path + '/' + dir);
      }));
    }).then(function (stats) {
      return stats.filter(function (stat) {
        return stat.isDirectory;
      });
    }).then(function (stats) {
      var syncs = [];
      ctnElt.clearChild();
      var children = stats.map(function (stat) {
        var nodePath = path + '/' + stat.name;
        var node = (0, _ACore._)({
          tag: _ExpTree.ExpTree.tag,
          props: {
            stat: stat,
            name: stat.displayName || stat.name,
            icon: {
              tag: 'img',
              props: {
                src: _MessageInput["default"].iconAssetRoot + '/folder.svg'
              }
            },
            path: nodePath
          },
          on: {
            statuschage: function statuschage() {},
            press: function press() {
              if (_this18.$activeNode) _this18.$activeNode.active = false;
              _this18.$activeNode = node;
              _this18.$activeNode.active = true;
              _this18.$selectedPath.firstChild.data = node.getPath().join('/');
              cPath = nodePath;
              if (checkFunc && !checkFunc(cPath, stat)) {
                _this18.$dialog.$actionBtns[0].disabled = true;
              } else {
                _this18.$dialog.$actionBtns[0].disabled = false;
              }
            }
          }
        });
        if (nodePath === cPath) {
          node.active = true;
          _this18.$activeNode = node;
        }
        if (checkFunc && !checkFunc(nodePath, stat)) {
          node.getNode().addStyle('opacity', 0.3 + '');
        }
        node.getNode().on({
          dblclick: function dblclick() {
            if (node.status === 'close') {
              node.status = 'open';
            } else if (node.status === 'open') {
              node.status = 'close';
            }
          }
        });
        if (stat.name !== 'node_modules') syncs.push(makeTree(nodePath, node, level + 1));
        return node;
      });
      children.forEach(function (c) {
        ctnElt.addChild(c);
      });
      if (children.length) {
        ctnElt.status = level > 1 ? 'close' : 'open';
      } else {
        ctnElt.status = 'none';
      }
      return Promise.all(syncs);
    });
  };
  var onRootPress;
  if (showRoot) {
    this.$expGroup.addStyle('display', 'none');
    this.$rootTree.removeStyle('display');
    if (cPath === this.elt.rootPath) {
      this.$activeNode = this.$rootTree;
      this.$activeNode.active = true;
    }
    onRootPress = function onRootPress() {
      var node = _this18.$rootTree;
      var nodePath = _this18.elt.rootPath;
      if (_this18.$activeNode) _this18.$activeNode.active = false;
      _this18.$activeNode = node;
      _this18.$activeNode.active = true;
      _this18.$selectedPath.firstChild.data = node.getPath().join('/');
      cPath = nodePath;
      if (cPath === initPath || checkFunc && !checkFunc(cPath, {
        writable: true
      })) {
        _this18.$dialog.$actionBtns[0].disabled = true;
      } else {
        _this18.$dialog.$actionBtns[0].disabled = false;
      }
    };
    this.$rootTree.on('press', onRootPress);
  } else {
    this.$expGroup.removeStyle('display');
    this.$rootTree.addStyle('display', 'none');
  }
  makeTree(this.elt.rootPath, showRoot ? this.$rootTree : this.$expGroup).then(function () {
    var p;
    if (_this18.$activeNode) {
      _this18.$selectedPath.firstChild.data = _this18.$activeNode.getPath().join('/');
      p = _this18.$activeNode.getParent();
      while (p) {
        if (p.status === 'close') {
          p.status = 'open';
        }
        p = p.getParent && p.getParent();
      }
      setTimeout(function () {
        (0, _utils.vScrollIntoView)(_this18.$activeNode.firstChild);
      }, 10);
    }
  });
  return new Promise(function (resolve) {
    var finish = function finish(event) {
      _this18.$dialog.off('action', finish);
      _this18.$modal.remove();
      if (event.action.name === 'cancel') resolve(null);else resolve(cPath);
      if (onRootPress) {
        _this18.$rootTree.off('press', onRootPress);
      }
    };
    _this18.$dialog.on('action', finish);
  });
};
var isMatchAccept = function isMatchAccept(accept, statInfo) {
  if (accept && _typeof(accept) === "object" && accept.accept) accept = accept.accept;
  if (typeof accept !== "string") return true;
  if (!accept) return true;
  if (statInfo.isDirectory) return true;
  var fileInfo = (0, _utils.fileInfoOf)(statInfo);
  if (accept.startsWith('image')) {
    return fileInfo.mimeType && fileInfo.mimeType.startsWith('image');
  }
  return true; // not handle other case
};

/***
 *
 * @param {Finder} elt
 * @constructor
 */
function NavigatorController(elt) {
  var _this19 = this;
  this.elt = elt;
  this.path = '';
  this.rootPath = '';
  this._states = {};
  this._notifiedVisibleIdx = 0;
  this.$navCtn = this.elt.$navCtn;
  this.$nav = this.elt.$nav;
  this.$contentCtn = this.elt.$contentCtn;
  this.$content = this.elt.$content;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) {
      _this19[key] = _this19[key].bind(_this19);
    }
  });
  this.$contentCtn.on('scroll', this.ev_contentScroll);
}
NavigatorController.prototype.onStart = function () {
  /**
   *
   * @type {AbsolFileSystem}
   */
  this.fileSystem = this.elt.fileSystem;
  this.$treeByPath = {};
  this.$treeByPath[this.rootPath || '..'] = this.$nav;
  this.reload(this.rootPath, true);
};
NavigatorController.prototype.reload = function (fromPath, autoOpen) {
  var _this20 = this;
  var opened = !autoOpen;
  var makeTree = function makeTree(path, ctnElt) {
    if (!opened && ctnElt.path) {
      _this20.viewDir(ctnElt.path, [_this20.elt.rootPath].concat(ctnElt.getPath()).join('/'));
      opened = true;
    }
    return _this20.fileSystem.readDir(path).then(function (dirs) {
      return Promise.all(dirs.map(function (dir) {
        return _this20.fileSystem.stat(path + '/' + dir);
      }));
    }).then(function (stats) {
      return stats.filter(function (stat) {
        return stat.isDirectory;
      });
    }).then(function (stats) {
      var syncs = [];
      ctnElt.clearChild();
      var children = stats.map(function (stat) {
        var nodePath = path + '/' + stat.name;
        var node = (0, _ACore._)({
          tag: _ExpTree.ExpTree.tag,
          props: {
            stat: stat,
            name: stat.displayName || stat.name,
            icon: {
              tag: 'img',
              props: {
                src: _MessageInput["default"].iconAssetRoot + '/folder.svg'
              }
            },
            path: nodePath
          },
          on: {
            statuschage: function statuschage() {
              _this20._states[path + '/' + stat.name] = node.status;
            },
            press: function press() {
              if (_this20.path !== nodePath) _this20.viewDir(nodePath, [_this20.elt.rootPath].concat(node.getPath()).join('/'));
            }
          }
        });
        node.getNode().on({
          dblclick: function dblclick() {
            if (node.status === 'close') {
              node.status = 'open';
            } else if (node.status === 'open') {
              node.status = 'close';
            }
            _this20._states[nodePath] = node.status;
          }
        });
        _this20.$treeByPath[nodePath] = node;
        if (stat.name !== 'node_modules') syncs.push(makeTree(nodePath, node));
        if (!opened) {
          _this20.viewDir(nodePath, [_this20.elt.rootPath].concat(node.getPath()).join('/'));
          opened = true;
        }
        return node;
      });
      children.forEach(function (c) {
        ctnElt.addChild(c);
      });
      if (children.length) {
        if (_this20._states[ctnElt.path] === 'close' || _this20._states[ctnElt.path] === 'open') {
          ctnElt.status = _this20._states[ctnElt.path];
        } else {
          ctnElt.status = 'close';
        }
      } else {
        ctnElt.status = 'none';
      }
      return Promise.all(syncs);
    });
  };
  if (this.$treeByPath[fromPath || '..']) return makeTree(fromPath, this.$treeByPath[fromPath || '..']);
  return Promise.resolve();
};
NavigatorController.prototype.viewDir = function (path) {
  var _this21 = this;
  this.elt.selectCtrl.deselectAll();
  if (this.$treeByPath[this.path]) {
    this.$treeByPath[this.path].active = false;
    this.$treeByPath[this.path].active = false;
  }
  this.path = path;
  this.$treeByPath[this.path].active = true;
  var c = this.$treeByPath[this.path].getParent();
  while (c) {
    if (c.status === 'close') c.status = 'open';
    c = c.getParent && c.getParent();
  }
  (0, _utils.vScrollIntoView)(this.$treeByPath[this.path].firstChild);
  this.fileSystem.stat(path).then(function (stat) {
    _this21.elt.dirStat = stat;
    if (_this21.path !== path) return;
    if (stat.writable) _this21.elt.addClass('as-writable-folder');else _this21.elt.removeClass('as-writable-folder');
    if (stat.isVirtual) {
      _this21.elt.addClass('as-virtual-folder');
    } else {
      _this21.elt.removeClass('as-virtual-folder');
    }
  });
  this.fileSystem.readDir(path).then(function (dirs) {
    return Promise.all(dirs.map(function (dir) {
      return _this21.fileSystem.stat(path + '/' + dir);
    }));
  }).then(function (stats) {
    if (_this21.path !== path) return;
    stats.sort(function (a, b) {
      var aName, bName;
      if (a.isDirectory === b.isDirectory) {
        aName = a.displayName || a.name;
        bName = b.displayName || b.name;
        if (aName < bName) return -1;
        return 1;
      } else {
        if (a.isDirectory) return -1;
        return 1;
      }
    });
    stats = stats.filter(function (x) {
      return isMatchAccept(_this21.elt.accept, x);
    });
    _this21.viewContent(stats);
  });
};
NavigatorController.prototype.viewContent = function (stats) {
  var _this22 = this;
  this.clearContent();
  stats.forEach(function (stat) {
    _this22.pushContentItem(stat);
  });
  this.notifyVisibleContentItems();
};
NavigatorController.prototype.clearContent = function () {
  this._notifiedVisibleIdx = 0;
  this.$content.clearChild();
};
NavigatorController.prototype.pushContentItem = function (stat) {
  var _this23 = this;
  var elt = (0, _ACore._)({
    tag: _FileThumbnail["default"].tag,
    extendEvent: ['visible'],
    attr: {
      title: stat.displayName || stat.name
    },
    props: {
      isDirectory: stat.isDirectory,
      value: stat.url,
      fileName: stat.displayName || stat.name,
      stat: stat
    },
    on: {
      visible: function visible() {
        var mineType = _ext2MineType["default"][elt.fileType];
        if (mineType && mineType.startsWith('image/')) {
          elt.thumbnail = stat.url;
        }
      },
      dblclick: function dblclick() {
        var prevented = false;
        var event;
        if (!stat.isDirectory) {
          event = {
            fileElt: elt,
            stat: stat,
            preventDefault: function preventDefault() {
              prevented = true;
            }
          };
          _this23.elt.emit('dblclickfile', event);
        }
        if (!prevented) _this23.elt.execCommand('view');
      }
    }
  });
  this.$content.addChild(elt);
};
NavigatorController.prototype.notifyVisibleContentItems = function () {
  var elt;
  var bound = this.$contentCtn.getBoundingClientRect();
  var eBound;
  while (this._notifiedVisibleIdx < this.$content.childNodes.length) {
    elt = this.$content.childNodes[this._notifiedVisibleIdx];
    eBound = elt.getBoundingClientRect();
    if (eBound.top < bound.bottom) {
      elt.emit('visible');
    } else {
      break;
    }
    this._notifiedVisibleIdx++;
  }
};
NavigatorController.prototype.expandAll = function () {
  var _this24 = this;
  var visit = function visit(nodeElt) {
    if (nodeElt.status === 'close') {
      nodeElt.status = 'open';
      _this24._states[nodeElt.path] = 'open';
    }
    if (nodeElt.status === 'open') {
      nodeElt.getChildren().forEach(visit);
    }
  };
  Array.prototype.forEach.call(this.$nav.childNodes, visit);
};
NavigatorController.prototype.collapseAll = function () {
  var _this25 = this;
  var visit = function visit(nodeElt) {
    if (nodeElt.status === 'open') {
      nodeElt.status = 'close';
      _this25._states[nodeElt.path] = 'close';
    }
    if (nodeElt.status === 'close') {
      nodeElt.getChildren().forEach(visit);
    }
  };
  Array.prototype.forEach.call(this.$nav.childNodes, visit);
};
NavigatorController.prototype.ev_contentScroll = function (event) {
  this.notifyVisibleContentItems();
};
var fileTextQuery2Regex = function fileTextQuery2Regex(text) {
  var code = (0, _stringFormat.nonAccentVietnamese)(text.toLowerCase()).replace(/[.,+^$()\[\]{}|\\]/g, function (x) {
    return '\\' + x;
  }).replace(/\*+/g, '(.*)').replace(/\?/g, '.');
  return new RegExp(code, 'i');
};

/***
 * @extends Context
 * @param {Finder} elt
 * @constructor
 */
function SearchController(elt) {
  var _this26 = this;
  _Context["default"].apply(this);
  this.elt = elt;
  this.$searchText = this.elt.$searchText.on('keydown', function (event) {
    if (event.key === 'Enter') {
      _this26.$searchText.blur();
      _this26.search();
    }
  });
}
_OOP["default"].mixClass(SearchController, _Context["default"]);
SearchController.prototype.onStart = function () {
  // console.log('start')
  this.elt.addClass('as-searching');
  this.$searchText.value = '';
  this.$searchText.focus();
};
SearchController.prototype.onStop = function () {
  this.elt.removeClass('as-searching');
  this.session = (0, _stringGenerate.randomIdent)(10);
  this.$searchText.waiting = false;
};
SearchController.prototype.search = function () {
  var _this27 = this;
  var session = (0, _stringGenerate.randomIdent)(10);
  this.session = session;
  this.elt.navCtrl.clearContent();
  this.$searchText.waiting = true;
  var fileSystem = this.elt.fileSystem;
  var rootPath = this.elt.rootPath;
  var result = [];
  var type = this.elt.$searchTypeSelect.value;
  var text = this.$searchText.value.trim();
  var regex = fileTextQuery2Regex(text);
  var isMatched = function isMatched(stat) {
    var fileInfo = (0, _utils.fileInfoOf)(stat.displayName || stat.name);
    var mineType = fileInfo.mimeType || '';
    var fileType = fileInfo.type || '';
    fileType = fileType.toLowerCase();
    if (mineType && type !== 'all') {
      if (type === 'image' && !mineType.startsWith('image') && type !== 'svg') {
        return false;
      } else if (type === 'document' && ['doc', 'docx', 'pdf', 'xlsx'].indexOf(fileType) < 0 && !mineType.startsWith('text')) {
        return false;
      }
    }
    if (text.length === 0) return true;
    if (stat.displayName && stat.displayName.match(regex)) return true;
    if (stat.name && (0, _stringFormat.nonAccentVietnamese)(stat.name.toLowerCase()).match(regex)) return true;
    return false;
  };
  var handleStat = function handleStat(stat) {
    if (session !== _this27.session) return;
    if (stat.isDirectory) return new Promise(function (rs) {
      setTimeout(function () {
        rs(visitDir(stat.path));
      }, 5);
    });
    if (isMatched(stat)) {
      _this27.elt.navCtrl.pushContentItem(stat);
      _this27.elt.navCtrl.notifyVisibleContentItems();
    }
  };
  var handleDirResult = function handleDirResult(dir, names) {
    var syncs = names.map(function (name) {
      return fileSystem.stat(dir + '/' + name).then(function (stat) {
        if (session !== _this27.session) return;
        if (stat) return handleStat(stat);
      });
    });
    return Promise.all(syncs);
  };
  var visitDir = function visitDir(path) {
    return fileSystem.readDir(path).then(function (names) {
      return handleDirResult(path, names);
    });
  };
  visitDir(rootPath).then(function () {
    if (session !== _this27.session) return;
    _this27.$searchText.waiting = false;
  });
};

/***
 *
 * @constructor
 */
function FinderFileSystem() {}
FinderFileSystem.prototype.supporteDisplayName = false;
FinderFileSystem.prototype.readDir = function (path) {};
FinderFileSystem.prototype.unlink = function (path) {
  console.log(path);
};
FinderFileSystem.prototype.stat = function (path) {};
FinderFileSystem.prototype.rmdir = function (path) {};
FinderFileSystem.prototype.mkdir = function (path) {};
FinderFileSystem.prototype.writeFile = function (file, data) {};
FinderFileSystem.prototype.copy = function () {};
FinderFileSystem.prototype.rename = function (path, name) {};
FinderFileSystem.prototype.move = function (oldPath, newPath) {};
FinderFileSystem.prototype.clearCache = function () {};

/***
 * @extends FinderFileSystem
 * @constructor
 */
function AbsolFileSystem() {
  FinderFileSystem.apply(this, arguments);
  this.sync = Promise.resolve();
  this.cache = {
    readDir: {},
    stats: {}
  };
  this.taskMng = new _TaskManager["default"]({
    limit: 4
  });
}
_OOP["default"].mixClass(AbsolFileSystem, FinderFileSystem);
AbsolFileSystem.prototype.API_PREFIX = location.href.indexOf('localhost') >= 0 ? 'https://absol.cf' : '';
AbsolFileSystem.prototype.clearCache = function () {
  this.cache = {
    readDir: {},
    stats: {}
  };
};
AbsolFileSystem.prototype.readDir = function (path) {
  var _this28 = this;
  this.sync = this.sync.then(function () {
    if (_this28.cache.readDir[path || '..']) return _this28.cache.readDir[path || '..'];
    return fetch(_this28.API_PREFIX + '/filesystem/ls.php', {
      method: 'POST',
      cache: "no-cache",
      headers: {
        "Content-Type": "application/json"
      },
      body: JSON.stringify({
        path: path
      })
    }).then(function (res) {
      return res.json();
    }).then(function (res) {
      res = res.filter(function (c) {
        return c.path.startsWith('/html');
      });
      res.forEach(function (c) {
        c.name = c.path.split('/').pop();
        c.url = c.path.replace('/html', _this28.API_PREFIX || location.origin);
      });
      _this28.cache.readDir[path || '..'] = res.map(function (c) {
        return c.name;
      });
      res.forEach(function (c) {
        _this28.cache.stats[c.path] = c;
      });
    }).then(function () {
      return _this28.cache.readDir[path || '..'];
    });
  });
  return this.sync;
};
AbsolFileSystem.prototype.stat = function (path) {
  var _this29 = this;
  return this.sync.then(function () {
    path = path || '';
    if (_this29.cache.stats[path || '..']) return _this29.cache.stats[path || '..'];
    var dir = path.split('/');
    dir.pop();
    dir = dir.join('/');
    return _this29.readDir(dir).then(function () {
      return _this29.cache.stats[path || '..'];
    });
  });
};

/***
 *
 * @param file
 * @param {File|Blob}data
 * @param {function(done: number):void=}onProcess
 */
AbsolFileSystem.prototype.writeFile = function (file, data, onProcess) {
  var _this30 = this;
  if (file.toLowerCase().endsWith('.php')) file += '.txt';
  var folderPath = file.split('/');
  folderPath.pop();
  folderPath = folderPath.join('/');
  delete this.cache.readDir[folderPath];
  var prefix = ['file', new Date().getTime(), (0, _random.randomArbitrary)(0, 1000000) >> 0].join('_');
  var parts = [];
  var chuck_limit = 2 << 20;
  var partName;
  var fileSize = data.size;
  var fileStartOffset = 0;
  var fileEndOffset = 0;
  var idx = 0;
  var syncs = [];
  var syncDone = 0;
  var bundle;
  var began = false;
  var handle = function handle(bundle) {
    return new Promise(function (rs) {
      _this30.taskMng.requestTask(function (finishTask, bundle) {
        if (typeof onProcess === "function" && !began) {
          began = true;
          onProcess(syncDone / (syncs.length || 1));
        }
        var form = new FormData();
        form.append('action', 'upload_part');
        form.append('fileUpload', bundle.file, bundle.name);
        fetch(_this30.API_PREFIX + '/filesystem/writefile.php', {
          method: 'POST',
          body: form
        }).then(function (res) {
          return res.text();
        }).then(function (text) {
          if (text !== 'OK') throw new Error(text);
          syncDone++;
          if (typeof onProcess === "function") {
            onProcess(syncDone / (syncs.length || 1));
          }
          rs(location.origin);
          finishTask();
        });
      }, bundle);
    });
  };
  while (fileStartOffset < fileSize) {
    fileEndOffset = Math.min(fileStartOffset + chuck_limit, fileSize);
    partName = prefix + '.p' + idx;
    parts.push(partName);
    bundle = {
      file: data.slice(fileStartOffset, fileEndOffset),
      idx: idx,
      name: partName
    };
    idx++;
    fileStartOffset = fileEndOffset;
    syncs.push(handle(bundle));
  }
  return Promise.all(syncs).then(function () {
    var form = new FormData();
    form.append('action', 'join_parts');
    form.append('parts', parts.join(';'));
    form.append('path', file);
    fetch(_this30.API_PREFIX + '/filesystem/writefile.php', {
      method: 'POST',
      body: form
    }).then(function (res) {
      return res.text();
    }).then(function (text) {
      if (text !== 'OK') throw new Error(text);
    });
  });
};
AbsolFileSystem.prototype.unlink = function (path) {
  var folderPath = path.split('/');
  folderPath.pop();
  folderPath = folderPath.join('/');
  delete this.cache.readDir[folderPath];
  var form = new FormData();
  form.append('action', 'delete_files');
  form.append('paths', path);
  return fetch(this.API_PREFIX + '/filesystem/writefile.php', {
    method: 'POST',
    body: form
  }).then(function (res) {
    return res.text();
  }).then(function (text) {
    if (text !== 'OK') throw new Error(text);
  });
};
AbsolFileSystem.prototype.rename = function (path, name) {
  var _this31 = this;
  var folderPath = path.split('/');
  folderPath.pop();
  folderPath = folderPath.join('/');
  var form = new FormData();
  form.append('action', 'rename');
  form.append('path', path);
  form.append('new_name', name);
  return fetch(this.API_PREFIX + '/filesystem/writefile.php', {
    method: 'POST',
    body: form
  }).then(function (res) {
    return res.text();
  }).then(function (text) {
    if (text !== 'OK') throw new Error(text);
    var newPath = folderPath + '/' + name;
    delete _this31.cache.readDir[folderPath];
    delete _this31.cache.stats[path];
    return {
      url: newPath.replace('/html', _this31.API_PREFIX || location.origin),
      path: newPath,
      name: name
    };
  });
};
AbsolFileSystem.prototype.move = function (oldPath, newPath) {
  var _this32 = this;
  var oldFolderPath = oldPath.split('/');
  oldFolderPath.pop();
  oldFolderPath = oldFolderPath.join('/');
  var newFolderPath = newPath.split('/');
  newFolderPath.pop();
  newFolderPath = newFolderPath.join('/');
  var form = new FormData();
  form.append('action', 'move');
  form.append('old_path', oldPath);
  form.append('new_path', newPath);
  return fetch(this.API_PREFIX + '/filesystem/writefile.php', {
    method: 'POST',
    body: form
  }).then(function (res) {
    return res.text();
  }).then(function (text) {
    if (text !== 'OK') throw new Error(text);
    delete _this32.cache.readDir[oldFolderPath];
    delete _this32.cache.readDir[newFolderPath];
    delete _this32.cache.stats[oldPath];
  });
};

/***/ }),

/***/ 52409:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
__webpack_require__(95043);
var _Dom = __webpack_require__(64821);
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function implicitNode(data) {
  if (!data) return (0, _ACore._)('div');
  if (data instanceof Array) {
    return data.map(implicitNode);
  } else if ((0, _Dom.isDomNode)(data)) {
    return data;
  } else if (typeof data === "string") {
    return (0, _ACore._)({
      tag: 'span',
      child: {
        text: data
      }
    });
  } else if (_typeof(data) === "object") {
    return (0, _ACore._)(data);
  } else return (0, _ACore._)('div');
}

/***
 *
 * @constructor
 */
function OWModalManager() {}
OWModalManager.prototype.getView = function () {
  if (!this.$view) this.createView();
  return this.$view;
};
OWModalManager.prototype.createView = function () {
  this.$view = (0, _ACore._)('.kv-ow-modal-manager');
};
OWModalManager.prototype.createModal = function (opt, caller) {
  console.trace(1);
  opt = opt || {};
  var modal = (0, _ACore._)({
    "class": 'kv-ow-modal',
    child: {
      "class": 'kv-ow-modal-window',
      child: [{
        "class": 'kv-ow-modal-header',
        child: [{
          "class": 'kv-ow-modal-title',
          child: {
            text: 'Tiêu đề'
          }
        }]
      }, {
        "class": 'kv-ow-modal-body',
        child: Array(3).fill({
          tag: 'span',
          child: {
            text: 'Bạn có chắc muốn thoát khỏi nhóm? Đây là nội dung hơi bị dài luôn nè'
          }
        })
      }, {
        "class": 'kv-ow-modal-footer'
      }]
    }
  });
  modal.$body = (0, _ACore.$)('.kv-ow-modal-body', modal);
  modal.$title = (0, _ACore.$)('.kv-ow-modal-title', modal);
  modal.$footer = (0, _ACore.$)('.kv-ow-modal-footer', modal);
  if (modal.$title) {
    if (typeof opt.title === "string") {
      modal.$title.clearChild().addChild((0, _ACore._)({
        text: opt.title
      }));
    } else {
      modal.$title.clearChild().addChild(implicitNode(opt.title));
    }
  } else {
    modal.$title.addStyle('display', 'none');
  }
  modal.$body.clearChild();
  if (opt.content || opt.contentbody) {
    modal.$body.addChild(implicitNode(opt.content || opt.contentbody));
  }
  modal.$footer.clearChild();
  if (opt.buttons || opt.buttonlist) {
    modal.$footer.addChild((opt.buttons || opt.buttonlist).map(function (bt) {
      var props = Object.assign({}, bt);
      delete props.onclick;
      var onclick = bt.onclick;
      return (0, _ACore._)({
        tag: _FlexiconButton["default"].tag,
        props: props,
        on: {
          click: function click(event) {
            if (typeof onclick === "function") {
              onclick.call(this, event, modal, caller);
            }
          }
        }
      });
    }));
  }
  return modal;
};
OWModalManager.prototype.showModal = function (opt, caller) {
  var modal = this.createModal(opt, caller);
  var minZIndex = Array.prototype.reduce.call(this.getView(), function (ac, cr) {
    return Math.max(ac, parseFloat(cr.style.zIndex) || 0);
  }, 0);
  modal.addStyle('zIndex', minZIndex + 1 + '');
  this.$view.addChild(modal);
  return modal;
};
var _default = OWModalManager;
exports["default"] = _default;

/***/ }),

/***/ 73759:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _stringGenerate = __webpack_require__(10713);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends Fragment
 * @param {{}} host
 * @constructor
 */
function OverviewPage(host) {
  _Fragment["default"].call(this);
  this.host = host;
  this.id = (0, _stringGenerate.randomIdent)(5);
  this._counter = 0;
}
_OOP["default"].mixClass(OverviewPage, _Fragment["default"]);
OverviewPage.prototype.tabIcon = 'span.mdi.mdi-cube-outline';
OverviewPage.prototype.name = 'Overview Page';
OverviewPage.prototype.createView = function () {
  return (0, _ACore._)({
    child: {
      tag: 'span',
      child: {
        text: 'OverviewPage'
      }
    }
  });
};
OverviewPage.prototype.showModal = function (opt) {
  if (this.parent && this.parent.showModal) return this.parent.showModal(opt, this);
};
Object.defineProperty(OverviewPage.prototype, 'counter', {
  set: function set(value) {
    /***
     *
     * @type {OverviewWidget}
     */
    var parent = this.parent;
    if (!(0, _utils.isRealNumber)(value)) value = 0;
    value = Math.max(0, value >> 0);
    this._counter = value;
    parent.updateCounter();
  },
  get: function get() {
    return this._counter;
  }
});
var _default = OverviewPage;
exports["default"] = _default;

/***/ }),

/***/ 82609:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _ACore = __webpack_require__(34093);
__webpack_require__(26477);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TabView = _interopRequireDefault(__webpack_require__(3475));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _utils = __webpack_require__(84512);
var _Dom = __webpack_require__(64821);
var _OnScreenWidget = _interopRequireDefault(__webpack_require__(95878));
var _EventEmitter = __webpack_require__(46833);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _OWModalManager = _interopRequireDefault(__webpack_require__(52409));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends Fragment
 * @param {{}} host
 * @param {Fragment[]} children
 * @constructor
 */
function OverviewWidget(host, children) {
  _Fragment["default"].call(this);
  this.setting = {
    viewPos: {
      x: 0,
      y: 0
    },
    minimize: true
  };
  this.host = host;
  this.children = children || [];
  this.childrenById = this.children.reduce(function (ac, child) {
    ac[child.id] = child;
    return ac;
  }, {});
  this._position = new _Vec["default"](0, 0);
  this.setContext("OVERVIEW_WIDGET", this);
  this.children.forEach(function (fg) {
    fg.attach(this);
  }.bind(this));
  this.modalMng = new _OWModalManager["default"]();
}
_OOP["default"].mixClass(OverviewWidget, _Fragment["default"]);
OverviewWidget.prototype.createView = function () {
  this.$title = (0, _ACore._)({
    tag: 'span',
    "class": 'kv-overview-widget-title',
    child: {
      text: '...'
    }
  });
  this.$tabs = this.children.map(function (fg) {
    return (0, _ACore._)({
      tag: 'tabframe',
      "class": 'kv-overview-widget-page',
      child: fg.getView(),
      props: {
        name: '&nbsp;'.repeat(5),
        //||fg.name,
        tabIcon: fg.tabIcon,
        id: fg.id
      }
    });
  });
  this.$view = (0, _ACore._)({
    "class": 'kv-overview-widget',
    style: {
      '--x': '0px',
      '--y': '0px',
      visibility: 'hidden'
    },
    child: [{
      tag: _Hanger["default"].tag,
      "class": 'kv-overview-widget-header',
      child: [this.$title, {
        "class": 'kv-overview-widget-header-window-action',
        child: [{
          tag: 'button',
          child: 'span.mdi.mdi-window-minimize',
          on: {
            click: this.minimize.bind(this)
          }
        }]
      }],
      on: {
        predrag: this.ev_headerPredrag.bind(this),
        dragstart: this.ev_headerDragStart.bind(this),
        drag: this.ev_headerDrag.bind(this),
        dragend: this.ev_headerDragEnd.bind(this)
      }
    }, {
      "class": 'kv-overview-widget-body',
      child: {
        tag: _TabView["default"].tag,
        "class": ['kv-overview-widget-tab-view', 'xp-tiny'],
        child: this.$tabs,
        on: {
          activetab: this.ev_activeTab.bind(this)
        }
      }
    }, this.modalMng.getView()]
  });
  this._updateViewPosition();
  this.$bubble = (0, _ACore._)({
    tag: _OnScreenWidget["default"].tag,
    "class": 'kv-overview-widget-bubble',
    id: 'overview_widget_bubble',
    style: {
      // visibility: 'hidden'
      '--cx': '0.02',
      '--cy': '0.96'
    },
    child: ['<svg class="kv-overview-widget-bubble-background"  viewBox="0 0 24 24">\n' + '    <path fill="currentColor" d="M3 11H11V3H3M5 5H9V9H5M13 21H21V13H13M15 15H19V19H15M3 21H11V13H3M5 15H9V19H5M13 3V11H21V3M19 9H15V5H19Z" />\n' + '</svg>', {
      "class": 'kv-overview-widget-bubble-badge',
      child: {
        tag: 'span',
        child: {
          text: '0'
        }
      }
    }],
    on: {
      click: this.toggle.bind(this)
    }
  });
  this.$tabview = (0, _ACore.$)('.kv-overview-widget-tab-view', this.$view);
  this.$action = (0, _ACore.$)('.kv-overview-widget-header-window-action', this.$view);
  this.$bubbleBadge = (0, _ACore.$)('.kv-overview-widget-bubble-badge', this.$bubble);
  this.$badgeText = (0, _ACore.$)('span', this.$bubbleBadge);
  this.$badgeText.requestUpdateSize = this._updateViewPosition.bind(this);
  var self = this;
  this.$tabs.forEach(function (tabElt) {
    tabElt.on('active', function () {
      self.childrenById[this.id].start();
    });
    tabElt.on('deactive', function () {
      self.childrenById[this.id].pause();
    });
  });
  this.updateCounter();
};
OverviewWidget.prototype.saveSetting = function () {
  localStorage.setItem('overview_widget_setting', JSON.stringify(this.setting));
};
OverviewWidget.prototype.loadSetting = function () {
  var setting = {};
  try {
    var settingJson = localStorage.getItem('overview_widget_setting');
    if (settingJson) setting = JSON.parse(settingJson);
  } catch (err) {}
  Object.assign(this.setting, setting);
  this._position = new _Vec["default"](this.setting.viewPos.x, this.setting.viewPos.y);
  this._updateViewPosition();
};
OverviewWidget.prototype.updateCounter = function (from) {
  var id;
  var tabElt;
  var counter;
  if (from) {
    id = from.id;
    tabElt = this.$tabview.getTabById(id);
    counter = from.counter;
    if (counter) tabElt.name = '(' + counter + ')';else tabElt.name = '&nbsp;'.repeat(5);
  } else {
    this.$tabs.forEach(function (tabElt) {
      id = tabElt.id;
      var frg = this.childrenById[id];
      var counter = frg.counter;
      if (counter) tabElt.name = '(' + counter + ')';else tabElt.name = '&nbsp;'.repeat(5);
    }.bind(this));
  }
  var sumCounter = this.children.reduce(function (ac, cr) {
    return ac + cr.counter;
  }, 0);
  this.$badgeText.firstChild.data = sumCounter + '';
  if (sumCounter > 0) {
    this.$bubbleBadge.removeStyle('visibility');
  } else {
    this.$bubbleBadge.addStyle('visibility', 'hidden');
  }
};
OverviewWidget.prototype.onStart = function () {
  this.getView();
  this.loadSetting();
  this.$view.addTo(document.body);
  this.$bubble.addTo(document.body);
  _ResizeSystem["default"].add(this.$badgeText);
  this._updateViewPosition();
  if (this.setting.minimize) {
    this.$bubble.removeStyle('visibility');
  } else {
    this.$view.removeStyle('visibility');
  }
  this.children.forEach(function (fg) {
    fg.start(true);
  });
  var activeTabId = this.$tabview.getActiveTabId();
  this.childrenById[activeTabId].start();
};
OverviewWidget.prototype.onStop = function () {
  this.getView().remove();
};
OverviewWidget.prototype.ev_activeTab = function (event) {
  var frag = this.childrenById[event.id];
  this.$title.firstChild.data = frag.name + '';
};
OverviewWidget.prototype.ev_headerPredrag = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$action, event)) {
    event.cancel();
  }
};
OverviewWidget.prototype.ev_headerDragStart = function (event) {
  var bound = this.$view.getBoundingClientRect();
  this._dragData = {
    bound: bound,
    p0: new _Vec["default"](bound.left, bound.top),
    modal: (0, _ACore._)({
      style: {
        position: 'fixed',
        zIndex: '1000000000',
        left: 0,
        right: 0,
        top: 0,
        bottom: 0,
        background: 'transparent'
      }
    }).addTo(document.body)
  };
};
OverviewWidget.prototype.ev_headerDrag = function (event) {
  var d = event.currentPoint.sub(event.startingPoint);
  this._position = this._dragData.p0.add(d);
  this._updateViewPosition();
};
OverviewWidget.prototype.ev_headerDragEnd = function (event) {
  this._dragData.modal.remove();
  this.setting.viewPos.x = this._position.x;
  this.setting.viewPos.y = this._position.y;
  this.saveSetting();
};
OverviewWidget.prototype._updateViewPosition = function () {
  if (!this.$view) return;
  var screenSize = (0, _Dom.getScreenSize)();
  var bound = this.$view.getBoundingClientRect();
  var x = Math.max(0, Math.min(this._position.x, screenSize.width - bound.width));
  var y = Math.max(0, Math.min(this._position.y, screenSize.height - bound.height));
  this.$view.addStyle({
    '--x': x + 'px',
    '--y': y + 'px'
  });
};
OverviewWidget.prototype.showModal = function (opt) {
  return this.modalMng.showModal(opt, this);
};
Object.defineProperty(OverviewWidget.prototype, 'position', {
  set: function set(value) {
    if (!value) value = new _Vec["default"](0, 0);
    if (value instanceof Array) {
      if ((0, _utils.isRealNumber)(value[0] && (0, _utils.isRealNumber)(value[1]))) {
        value = new _Vec["default"](value[0], value[1]);
      } else {
        value = new _Vec["default"](0, 0);
      }
    } else if (!(value instanceof _Vec["default"])) {
      if ((0, _utils.isRealNumber)(value.x && (0, _utils.isRealNumber)(value.y))) {
        value = new _Vec["default"](value[0], value[1]);
      } else {
        value = new _Vec["default"](0, 0);
      }
    }
    this._position = value;
    this._updateViewPosition();
  },
  get: function get() {
    return this._position;
  }
});
OverviewWidget.prototype.minimize = function () {
  this.$view.addStyle('visibility', 'hidden');
  // this.$bubble.removeStyle('visibility');
  this.setting.minimize = true;
  this.saveSetting();
  var activeTabId = this.$tabview.getActiveTabId();
  this.childrenById[activeTabId].pause();
};
OverviewWidget.prototype.maximize = function () {
  // this.$bubble.addStyle('visibility', 'hidden');
  this.$view.removeStyle('visibility');
  this.setting.minimize = false;
  this.saveSetting();
  var activeTabId = this.$tabview.getActiveTabId();
  this.childrenById[activeTabId].start();
};
OverviewWidget.prototype.toggle = function () {
  if (this.setting.minimize) {
    this.maximize();
  } else {
    this.minimize();
  }
};
var _default = OverviewWidget;
exports["default"] = _default;

/***/ }),

/***/ 50218:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _utils = __webpack_require__(84512);
/***
 *
 * @param {SelectionItem[]} arr
 * @constructor
 */

function ItemDictionary(arr, opt) {
  this.opt = Object.assign({
    depth: true
  }, opt || {});
  this.arr = arr;
  this.dict = {};
  this.dupKeys = [];
  this.update();
}
ItemDictionary.prototype.update = function () {
  this.dict = {};
  var dict = this.dict;
  var depth = this.opt.depth;
  var dupKeyDict = {};
  function scan(arr) {
    var item;
    var key;
    for (var i = 0; i < arr.length; ++i) {
      item = arr[i];
      key = (0, _utils.keyStringOf)(item.value);
      if (dict[key]) {
        dict[key].dupItems = dict[key].dupItems || [];
        dict[key].dupItems.push(item);
        dupKeyDict[key] = 1;
      } else {
        dict[key] = {
          idx: i,
          item: item
        };
      }
      if (depth && item.items && item.items.length > 0) {
        scan(item.items);
      }
    }
  }
  scan(this.arr);
  this.dupKeys = Object.keys(dupKeyDict);
};

/***
 *
 * @param {String | Number} value
 * @returns {SelectionItem | null}
 */
ItemDictionary.prototype.getItemByValue = function (value) {
  var iDict = this.dict[(0, _utils.keyStringOf)(value)];
  if (iDict) return iDict.item;
  return null;
};

/***
 *
 * @param {String | Number} value
 * @returns {Array<SelectionItem> }
 */
ItemDictionary.prototype.getAllItemByValue = function (value) {
  var key = (0, _utils.keyStringOf)(value);
  var iDict = this.dict[key];
  if (iDict) return [iDict.item].concat(iDict.dupItems[key] || []);
  return [];
};
ItemDictionary.prototype.getDuplicateKeys = function () {
  return this.dupKeys;
};
var _default = ItemDictionary;
exports["default"] = _default;

/***/ }),

/***/ 89194:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = ListSearchFactor;
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function ListSearchFactor(global) {
  /***
   * @typedef SelectionItem2
   * @property {String} text
   * @property {String} desc
   * @property {String} __text__
   * @property {String} __nvnText__
   * @property {Array<String>} __words__
   * @property {Array<String>} __nvnWords__
   * @property {object} __wordDict__
   * @property {object} __nvnWordDict__
   * @module SelectionItem2
   */

  function revokeResource(o) {
    if (!o) return;
    var oc, ocs;
    var keys, key;
    if (Array.isArray(o)) {
      while (o.length) {
        oc = o.pop();
        try {
          revokeResource(oc);
        } catch (err) {}
      }
    } else if (o.removeResource) {
      o.removeResource();
    } else if (_typeof(o) === "object") {
      keys = [];
      ocs = [];
      for (key in o) {
        keys.push(key);
      }
      while (keys.length) {
        key = keys.pop();
        ocs.push(o[keys]);
        try {
          delete o[key];
        } catch (err) {}
      }
      while (ocs.length) {
        try {
          revokeResource(ocs.pop());
        } catch (err) {}
      }
    }
    ocs = undefined;
    oc = undefined;
    keys = undefined;
    key = undefined;
    o = undefined;
  }
  function nonAccentVietnamese(s) {
    return s.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g, "a").replace(/À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ/g, "A").replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g, "e").replace(/È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ/g, "E").replace(/ì|í|ị|ỉ|ĩ/g, "i").replace(/Ì|Í|Ị|Ỉ|Ĩ/g, "I").replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g, "o").replace(/Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ/g, "O").replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g, "u").replace(/Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ/g, "U").replace(/ỳ|ý|ỵ|ỷ|ỹ/g, "y").replace(/Ỳ|Ý|Ỵ|Ỷ|Ỹ/g, "Y").replace(/đ/g, "d").replace(/Đ/g, "D").replace(/\u0300|\u0301|\u0303|\u0309|\u0323/g, "").replace(/\u02C6|\u0306|\u031B/g, "");
  }
  function harmonicMean(a, b) {
    return 2 / (1 / a + 1 / b);
  }
  function wordLike(a, b) {
    var m = a.length;
    var n = b.length;
    function map(i, j) {
      return i * (n + 1) + j;
    }
    var Q = Array((m + 1) * (n + 1)).fill(0);
    for (var i = 0; i < m; ++i) {
      for (var j = 0; j < n; ++j) {
        if (a.charAt(i) == b.charAt(j)) {
          if (Q[map(i + 1, j + 1)]) {
            if (Q[map(i + 1, j + 1)] < Q[map(i, j)] + 1) Q[map(i + 1, j + 1)] = Q[map(i, j)] + 1;
          } else Q[map(i + 1, j + 1)] = Q[map(i, j)] + 1;
        } else Q[map(i + 1, j + 1)] = Math.max(Q[map(i + 1, j)], Q[map(i, j + 1)]);
      }
    }
    return Q[map(m, n)] / harmonicMean(m, n);
  }
  function wordsMatch(sq1, sq2, matchWordPow) {
    matchWordPow = matchWordPow === undefined ? 1 : matchWordPow;
    var m = sq1.length;
    var n = sq2.length;
    function map(i, j) {
      return i * (n + 1) + j;
    }
    var Q = Array((m + 1) * (n + 1)).fill(0);
    var e = 0.0;
    for (var i = 0; i < m; ++i) {
      for (var j = 0; j < n; ++j) {
        e = Math.pow(wordLike(sq1[i], sq2[j]), matchWordPow);
        if (Q[map(i + 1, j + 1)]) {
          if (Q[map(i + 1, j + 1)] < Q[map(i, j)] + e) Q[map(i + 1, j + 1)] = Q[map(i, j)] + e;
        } else Q[map(i + 1, j + 1)] = Q[map(i, j)] + e;
        e = Math.max(Q[map(i + 1, j)], Q[map(i, j + 1)]);
        if (e > Q[map(i + 1, j + 1)]) Q[map(i + 1, j + 1)] = e;
      }
    }
    return Q[map(m, n)];
  }
  var EXTRA_MATCH_SCORE = 9;
  var NVN_EXTRA_MATCH_SCORE = 8;
  var EQUAL_MATCH_SCORE = 10;
  var WORD_MATCH_SCORE = 3;
  var HAS_WORD_SCORE = 30;
  var HAS_NVN_WORD_SCORE = 29;

  /***
   *
   * @param {SelectionItem2} item
   * @returns {*}
   */
  function prepareSearchForItem(item) {
    if (!item.text || !item.text.charAt) item.text = item.text + '';
    var splitter = /([_\s\b\-()\[\]"']|&#8239;|&nbsp;|&#xA0;")+/g;
    var text = item.text.replace(splitter, ' ');
    var __words__ = text.split(/\s+/).filter(function (w) {
      return !!w;
    }).map(function (w) {
      return w.toLowerCase();
    });
    var __text__ = __words__.join(' ');
    var __wordDict__ = __words__.reduce(function (ac, cr, i) {
      ac[cr] = ac[cr] || i + 1;
      return ac;
    }, {});
    var __nvnText__ = nonAccentVietnamese(__text__);
    var __nvnWords__ = __words__.map(function (w) {
      return nonAccentVietnamese(w);
    });
    var __nvnWordDict__ = __nvnWords__.reduce(function (ac, cr, i) {
      ac[cr] = ac[cr] || i + 1;
      return ac;
    }, {});
    Object.defineProperties(item, {
      __text__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __text__
      },
      __words__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __words__
      },
      __wordDict__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __wordDict__
      },
      __textNoneCase__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __text__
      },
      __wordsNoneCase__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __words__
      },
      __nvnText__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __nvnText__
      },
      __nvnWords__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __nvnWords__
      },
      __nvnWordDict__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __nvnWordDict__
      },
      __nvnTextNoneCase__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __nvnText__
      },
      __nvnWordsNoneCase__: {
        configurable: true,
        enumerable: false,
        writable: true,
        value: __nvnWords__
      }
    });
    return item;
  }
  function isItemMustIncluded(queryItem, item) {
    if (!queryItem) return true;
    if (item.__nvnText__.indexOf(queryItem.__nvnText__) >= 0) {
      return true;
    }
    var dict1 = queryItem.__nvnWordDict__;
    var dict2 = item.__nvnWordDict__;
    for (var i in dict1) {
      for (var j in dict2) {
        if (j.indexOf(i) < 0) return false;
      }
    }
    return true;
  }
  function calcItemMatchScore(queryItem, item) {
    var score = 0;
    if (!item.__text__) return 0;
    function calcByWordDict(queryWords, wordDict) {
      var hwScore = 0;
      var i;
      wordDict = Object.assign({}, wordDict);
      var bestWordMatched,
        bestWordMatchScore = 0;
      var word, wordScore;
      for (i = 0; i < queryWords.length; ++i) {
        bestWordMatchScore = 0;
        bestWordMatched = null;
        for (word in wordDict) {
          wordScore = wordLike(word, queryWords[i]) - 1e-3 * wordDict[word];
          if (wordScore > bestWordMatchScore) {
            bestWordMatched = word;
            bestWordMatchScore = wordScore;
          }
        }
        if (bestWordMatchScore > 0) {
          hwScore += bestWordMatchScore * WORD_MATCH_SCORE;
          delete wordDict[bestWordMatched];
        }
      }
      return hwScore;
    }
    score += calcByWordDict(queryItem.__words__, item.__wordDict__);
    score += calcByWordDict(queryItem.__nvnWords__, item.__nvnWordDict__);
    if (item.__text__ === queryItem.__text__) {
      score += EQUAL_MATCH_SCORE;
    }
    var extraIndex = item.__text__.indexOf(queryItem.__text__);
    if (extraIndex >= 0) {
      score += EXTRA_MATCH_SCORE;
    }
    extraIndex = item.__nvnText__.indexOf(queryItem.__nvnText__);
    if (extraIndex >= 0) {
      score += EXTRA_MATCH_SCORE;
    }
    score += Math.max(wordsMatch(queryItem.__words__, item.__words__), wordsMatch(queryItem.__nvnWords__, item.__nvnWords__)) / Math.max(queryItem.__words__.length + 1, 1);
    return score;
  }
  function scoreCmp(a, b) {
    if (b.score === a.score) {
      if (b.item.__nvnText__ > a.item.__nvnText__) return -1;
      return 1;
    }
    return b.score - a.score;
  }
  function keyStringOf(o) {
    var type = _typeof(o);
    var keys;
    if (o && type === "object") {
      if (o.getTime) {
        return 'd(' + o.getTime() + ')';
      } else if (o.length && o.map) {
        return 'a(' + o.map(function (val) {
          return keyStringOf(val);
        }).join(',') + ')';
      } else {
        keys = Object.keys(o);
        keys.sort();
        return 'o(' + keys.map(function (key) {
          return key + ':' + keyStringOf(o[key]);
        }).join(',') + ')';
      }
    } else {
      return type[0] + '(' + o + ')';
    }
  }
  function matchFilter(item, filter) {
    if (!filter) return true;
    var keys = item.keys;
    if (!keys) return false;
    for (var i in filter) {
      if (!keyCmp(keys[i], filter[i])) return false;
    }
    return true;
  }
  function toComparable(x) {
    if (!x) return x;
    var type = _typeof(x);
    if (type === 'string') return x;
    if (type === "number") return x;
    if (type === "boolean") return x;
    if (type.getTime) return type.getTime();
    return x;
  }
  function keyCmp(itemKey, filterKey) {
    if (itemKey === filterKey) return true;
    if (!itemKey !== !filterKey) return false;
    if (!itemKey || !filterKey) return false;
    var filterKeyString = keyStringOf(filterKey);
    function withFilter(x) {
      var xString = keyStringOf(x);
      var res = xString === filterKeyString;
      if (!res && _typeof(filterKey) === "object") {
        if (filterKey.some) {
          res = filterKey.some(function (y) {
            return keyStringOf(y) === x;
          });
        } else if ('min' in filterKey || 'max' in filterKey) {
          res = true;
          if ('min' in filterKey) {
            res = res && toComparable(x) >= toComparable(filterKey.min);
          }
          if ('max' in filterKey) {
            res = res && toComparable(x) <= toComparable(filterKey.max);
          }
        }
      }
      return res;
    }
    if (itemKey.some) {
      return itemKey.some(withFilter);
    } else return withFilter(itemKey);
  }
  function Slave() {
    this.items = [];
  }
  Slave.prototype.revokeResource = function () {
    revokeResource(this.items);
    this.items = undefined;
  };
  Slave.prototype.processItems = function (items) {
    this.items = items;
    this.items.forEach(function visit(item) {
      prepareSearchForItem(item);
      if (item.items) item.items.forEach(visit);
    });
  };
  Slave.prototype.callQuery = function (query) {
    prepareSearchForItem(query);
    var minScore = Infinity;
    var maxScore = -Infinity;
    var scoreHolders = this.items.map(function visit(item) {
      var res = {};
      res.score = calcItemMatchScore(query, item);
      res.mustIncluded = isItemMustIncluded(query, item);
      res.value = item.value;
      res.maxChildScore = -Infinity;
      if (item.items) {
        res.child = item.items.map(visit);
        res.maxChildScore = res.child.reduce(function (ac, cr) {
          return Math.max(ac, cr.maxChildScore, cr.score);
        }, res.maxChildScore);
      }
      minScore = Math.min(minScore, res.score);
      maxScore = Math.max(maxScore, res.score);
      return res;
    });
    var threshold = maxScore - (maxScore - minScore) / 4;
    if (maxScore < 3) threshold = maxScore - (maxScore - minScore) / 8;
    var resDict = scoreHolders.reduce(function rValue(ac, cr) {
      if (Math.max(cr.maxChildScore, cr.score) >= threshold || cr.mustIncluded) ac[cr.value] = [cr.score, cr.maxChildScore];
      if (cr.child) cr.child.reduce(rValue, ac);
      return ac;
    }, {});
    return resDict;
  };
  var slaves = {};
  global.transferSearchItems = function (id, items) {
    if (!slaves[id]) slaves[id] = new Slave();
    slaves[id].processItems(items);
  };
  global.callQuery = function (id, query) {
    if (slaves[id]) return slaves[id].callQuery(query);
    return null;
  };
  global.destroySlave = function (id) {
    revokeResource(slaves);
    delete slaves[id];
  };
}

/***/ }),

/***/ 85604:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _stringGenerate = __webpack_require__(10713);
var _Thread = _interopRequireDefault(__webpack_require__(44067));
var _ListSearchFactor = _interopRequireDefault(__webpack_require__(89194));
var _utils = __webpack_require__(84512);
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function ListSearchMaster() {
  this.prepare();
  this.id = (0, _stringGenerate.randomIdent)(8);
  this.cache = {};
  this.share.instances.push(this.id);
}
ListSearchMaster.prototype.share = {
  worker: null,
  instances: []
};
ListSearchMaster.prototype.prepare = function () {
  if (this.share.worker) return;
  this.share.worker = new _Thread["default"]({
    methods: {
      init: _ListSearchFactor["default"]
    },
    extendCode: 'init(this)'
  });
};
ListSearchMaster.prototype.transfer = function (items) {
  this.prepare();
  this.cache = {};
  return this.share.worker.invoke('transferSearchItems', this.id, items);
};
ListSearchMaster.prototype.query = function (query) {
  var key = (0, _utils.calcDTQueryHash)(query);
  if (!this.cache[key]) {
    this.cache[key] = this.share.worker.invoke('callQuery', this.id, query);
  }
  return this.cache[key];
};
ListSearchMaster.prototype.destroy = function () {
  // return;
  this.cache = {};
  this.share.worker.invoke('destroySlave', this.id);
  var idx = this.share.instances.indexOf(this.id);
  this.destroy = _noop["default"];
  if (idx >= 0) {
    this.share.instances.splice(idx, 1);
  }
};
ListSearchMaster.prototype.revokeResource = function () {};
var _default = ListSearchMaster;
exports["default"] = _default;

/***/ }),

/***/ 72384:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.depthIndexingByValue = depthIndexingByValue;
exports.indexingByValue = indexingByValue;
function depthIndexingByValue(items, context) {
  context = context || {
    idx: 0,
    dict: {}
  };
  return items.reduce(function (ac, cr, idx) {
    var value = typeof cr === "string" ? cr : cr.value + '';
    ac[value] = ac[value] || [];
    ac[value].push({
      idx: context.idx++,
      item: cr
    });
    if (cr && cr.items && cr.items.length > 0) {
      depthIndexingByValue(cr.items, context);
    }
    return ac;
  }, context.dict);
}
function indexingByValue(items, dict) {
  return items.reduce(function (ac, cr, idx) {
    var value = typeof cr === "string" ? cr : cr.value + '';
    ac[value] = ac[value] || [];
    ac[value].push({
      idx: idx,
      item: cr
    });
    return ac;
  }, dict || {});
}

/***/ }),

/***/ 67858:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.calcItemMatchScore = calcItemMatchScore;
exports["default"] = prepareSearchForItem;
exports.prepareSearchForList = prepareSearchForList;
exports.searchCheckListByText = searchCheckListByText;
exports.searchListByText = searchListByText;
exports.searchTreeListByText = searchTreeListByText;
var _stringFormat = __webpack_require__(22294);
var _stringMatching = __webpack_require__(59163);
var UNCASE_MATCH_SCORE = 4;
var UVN_MATCH_SCORE = 3;
var EXTRA_MATCH_SCORE = 9;
var NVN_EXTRA_MATCH_SCORE = 8;
var EQUAL_MATCH_SCORE = 10;
var WORD_MATCH_SCORE = 3;
var HAS_WORD_SCORE = 30;
var HAS_NVN_WORD_SCORE = 29;

/***
 *
 * @param {SelectionItem} item
 * @returns {*}
 */
function prepareSearchForItem(item) {
  if (!item.text || !item.text.charAt) item.text = item.text + '';
  var splitter = /([_\s\b\-()\[\]"']|&#8239;|&nbsp;|&#xA0;")+/g;
  var text = item.text.replace(splitter, ' ');
  var __words__ = text.split(/\s+/).filter(function (w) {
    return !!w;
  }).map(function (w) {
    return w.toLowerCase();
  });
  var __text__ = __words__.join(' ');
  var __wordDict__ = __words__.reduce(function (ac, cr, i) {
    ac[cr] = ac[cr] || i + 1;
    return ac;
  }, {});
  var __nvnText__ = (0, _stringFormat.nonAccentVietnamese)(__text__);
  var __nvnWords__ = __words__.map(function (w) {
    return (0, _stringFormat.nonAccentVietnamese)(w);
  });
  var __nvnWordDict__ = __nvnWords__.reduce(function (ac, cr, i) {
    ac[cr] = ac[cr] || i + 1;
    return ac;
  }, {});
  Object.defineProperties(item, {
    __text__: {
      configurable: true,
      enumerable: false,
      writable: true,
      value: __text__
    },
    __words__: {
      configurable: true,
      enumerable: false,
      writable: true,
      value: __words__
    },
    __wordDict__: {
      configurable: true,
      enumerable: false,
      writable: true,
      value: __wordDict__
    },
    __textNoneCase__: {
      configurable: true,
      enumerable: false,
      writable: true,
      value: __text__
    },
    __wordsNoneCase__: {
      configurable: true,
      enumerable: false,
      writable: true,
      value: __words__
    },
    __nvnText__: {
      configurable: true,
      enumerable: false,
      writable: true,
      value: __nvnText__
    },
    __nvnWords__: {
      configurable: true,
      enumerable: false,
      writable: true,
      value: __nvnWords__
    },
    __nvnWordDict__: {
      configurable: true,
      enumerable: false,
      writable: true,
      value: __nvnWordDict__
    },
    __nvnTextNoneCase__: {
      configurable: true,
      enumerable: false,
      writable: true,
      value: __nvnText__
    },
    __nvnWordsNoneCase__: {
      configurable: true,
      enumerable: false,
      writable: true,
      value: __nvnWords__
    }
  });
  return item;
}
function prepareSearchForList(items) {
  var item;
  for (var i = 0; i < items.length; ++i) {
    if (typeof items[i] == 'string') {
      items[i] = {
        text: items[i],
        value: items[i]
      };
    }
    item = items[i];
    prepareSearchForItem(item);
    if (item.items) prepareSearchForList(item.items);
  }
  return items;
}
function calcItemMatchScore(queryItem, item) {
  var score = 0;
  if (!item.__text__) return 0;
  function calcByWordDict(queryWords, wordDict) {
    var hwScore = 0;
    var i;
    wordDict = Object.assign({}, wordDict);
    var bestWordMatched,
      bestWordMatchScore = 0;
    var word, wordScore;
    for (i = 0; i < queryWords.length; ++i) {
      bestWordMatchScore = 0;
      bestWordMatched = null;
      for (word in wordDict) {
        wordScore = (0, _stringMatching.wordLike)(word, queryWords[i]) - 1e-3 * wordDict[word];
        if (wordScore > bestWordMatchScore) {
          bestWordMatched = word;
          bestWordMatchScore = wordScore;
        }
      }
      if (bestWordMatchScore > 0) {
        hwScore += bestWordMatchScore * WORD_MATCH_SCORE;
        delete wordDict[bestWordMatched];
      }
    }
    return hwScore;
  }
  score += calcByWordDict(queryItem.__words__, item.__wordDict__);
  score += calcByWordDict(queryItem.__nvnWords__, item.__nvnWordDict__);
  if (item.__text__ === queryItem.__text__) {
    score += EQUAL_MATCH_SCORE;
  }
  var extraIndex = item.__text__.indexOf(queryItem.__text__);
  if (extraIndex >= 0) {
    score += EXTRA_MATCH_SCORE;
  }
  extraIndex = item.__nvnText__.indexOf(queryItem.__nvnText__);
  if (extraIndex >= 0) {
    score += EXTRA_MATCH_SCORE;
  }
  score += Math.max((0, _stringMatching.wordsMatch)(queryItem.__words__, item.__words__), (0, _stringMatching.wordsMatch)(queryItem.__nvnWords__, item.__nvnWords__)) / Math.max(queryItem.__words__.length + 1, 1);
  return score;
}
function isItemMustIncluded(queryItem, item) {
  if (!queryItem) return true;
  if (item.__nvnText__.indexOf(queryItem.__nvnText__) >= 0) {
    return true;
  }
  var dict1 = queryItem.__nvnWordDict__;
  var dict2 = item.__nvnWordDict__;
  for (var i in dict1) {
    for (var j in dict2) {
      if (j.indexOf(i) < 0) return false;
    }
  }
  return true;
}

/***
 *
 * @param  {String} query
 * @param {Array<SelectionItem>} items
 */
function searchListByText(query, items) {
  query = (query || '').trim();
  if (query.length === 0 || items.length === 0) return items;
  var queryItem = prepareSearchForItem({
    text: query
  });
  var its = items.map(function (item) {
    if (!item.__text__) prepareSearchForItem(item);
    return {
      item: item,
      score: calcItemMatchScore(queryItem, item),
      mustIncluded: isItemMustIncluded(queryItem, item)
    };
  });
  its.sort(function (a, b) {
    if (b.score - a.score == 0) {
      if (b.item.__nvnText__ > a.item.__nvnText__) return -1;
      return 1;
    }
    return b.score - a.score;
  });
  var midValue = (its[0].score + its[its.length - 1].score) / 2;
  if (midValue === 0) midValue += 0.1;
  if (midValue < 1) midValue = 1;
  return its.filter(function (it) {
    return it.score >= midValue || it.mustIncluded;
  }).map(function (it) {
    return it.item;
  });
}

/***
 *
 * @param  {String} query
 * @param {Array<SelectionItem>} items
 */
function searchTreeListByText(query, items) {
  query = (query || '').trim();
  if (query.length == 0 || items.length == 0) return items;
  var queryItem = prepareSearchForItem({
    text: query
  });
  var gmaxScore = 0;
  var gminScore = 1000;
  function makeScoreRecursive(item) {
    var score = calcItemMatchScore(queryItem, item);
    var mustIncluded = isItemMustIncluded(queryItem, item);
    gmaxScore = Math.max(score, gmaxScore);
    gminScore = Math.min(score, gminScore);
    var children = (item.items || []).map(function (item) {
      return makeScoreRecursive(item);
    });
    mustIncluded = mustIncluded || children.some(function (c) {
      return c.mustIncluded;
    });
    var maxScore = children.reduce(function (ac, cr) {
      return Math.max(ac, cr.maxScore);
    }, score);
    return {
      score: score,
      maxScore: maxScore,
      item: item,
      children: children,
      mustIncluded: mustIncluded
    };
  }
  function sortcmp(a, b) {
    return b.maxScore - a.maxScore;
  }
  function filterItems(nodes, medScore) {
    nodes.sort(sortcmp);
    return nodes.filter(function (node) {
      return node.maxScore >= medScore || node.mustIncluded;
    }).map(function (node) {
      var res;
      if (typeof node.item == 'string') {
        res = node.item;
      } else {
        res = Object.assign({}, node.item);
        res.ref = node.item;
        if (node.children && node.children.length > 0) {
          res.items = filterItems(node.children, medScore);
          if (res.items.length == 0) delete res.items;
        }
      }
      return res;
    });
  }
  var scoredItems = items.map(makeScoreRecursive);
  var medianScore = (gminScore + gmaxScore) / 2;
  items = filterItems(scoredItems, medianScore);
  return items;
}

/***
 * checked is bestValue
 * @param  {String} query
 * @param {Array<SelectionItem|{checked:boolean, text: string}>} items
 */
function searchCheckListByText(query, items) {
  var res = items.filter(function (it) {
    return it.checked;
  });
  var nItems = items.filter(function (it) {
    return !it.checked;
  });
  prepareSearchForList(items);
  nItems = searchListByText(query, nItems);
  return res.concat(nItems);
}

/***/ }),

/***/ 22248:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = treeListToList;
/***
 *
 * @param {Array<SelectionItem>} items
 * @returns {Array<SelectionItem>}
 */
function treeListToList(items) {
  var arr = [];
  function visit(level, node) {
    Object.defineProperty(node, 'level', {
      configurable: true,
      writable: true,
      value: level
    });
    arr.push(node);
    if (Array.isArray(node.items) && node.items.length > 0) node.items.forEach(visit.bind(null, level + 1));
  }
  if (items && items.forEach) items.forEach(visit.bind(null, 0));
  return arr;
}

/***/ }),

/***/ 49401:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = materializeIconTrigger;
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function materializeIconTrigger() {
  _Dom["default"].documentReady.then(function () {
    var linkMaterial = _ACore["default"].$('link', document.head, function (elt) {
      if (elt.href && elt.href.indexOf('Material+Icons')) return true;
    });
    if (!linkMaterial) return;
    var checkInv = -1;
    function onLoaded() {
      if (checkInv > 0) {
        clearTimeout(checkInv);
        checkInv = -1;
      }
      linkMaterial.off('loaded', onLoaded).off('load', onLoaded).off('error', onLoaded);
      i.remove();
      requestAnimationFrame(function () {
        _ResizeSystem["default"].update();
        if (document.cookie.indexOf('absol_debug') >= 0) {
          console.info('Resize after MaterialIcons load');
        }
      });
    }
    linkMaterial.on('loaded', onLoaded).on('load', onLoaded).on('error', onLoaded);
    var i = _ACore["default"]._({
      tag: 'i',
      "class": "material-icons",
      style: {
        fontSize: '14px',
        position: 'fixed',
        top: '0',
        left: '0',
        zIndex: '-1000',
        visibility: 'hidden'
      },
      child: {
        text: 'account_balance_wallet'
      }
    }).addTo(document.body);
    var iBox = i.getBoundingClientRect();
    if (iBox.width < iBox.height * 3) {
      onLoaded();
      return;
    }
    var intervalCount = 50;
    checkInv = setInterval(function () {
      intervalCount--;
      if (intervalCount < 0) {
        onLoaded();
      }
      iBox = i.getBoundingClientRect();
      if (iBox.width < iBox.height * 3) {
        onLoaded();
      }
    }, 200);
  });
}

/***/ }),

/***/ 57244:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _MessageInputPlugin = _interopRequireDefault(__webpack_require__(22232));
var _ACore = __webpack_require__(34093);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/****
 * @extends MessageInputPlugin
 * @constructor
 */
function MIEmojiPlugin(inputElt) {
  _MessageInputPlugin["default"].call(this, inputElt, {
    id: 'emoji_picker',
    icon: 'span.mdi.mdi-emoticon-happy-outline'
  });
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
}
_OOP["default"].mixClass(MIEmojiPlugin, _MessageInputPlugin["default"]);
MIEmojiPlugin.prototype.createContent = function () {
  return (0, _ACore._)('emojipicker') //.addTo(this.$emojiPickerCtn)
  .on('pick', this.ev_PickEmoji);
};
MIEmojiPlugin.prototype.ev_PickEmoji = function (event) {
  var text = this.inputElt.$preInput.value;
  var selected = this._lastInputSelectPosion;
  var newText = text.substr(0, selected.start) + event.key + text.substr(selected.end);
  var newOffset = selected.start + event.key.length;
  this._lastInputSelectPosion = {
    start: newOffset,
    end: newOffset
  };
  this.inputElt.$preInput.focus();
  this.inputElt.$preInput.applyData(newText, newOffset);
  this.inputElt.$preInput.commitChange(newText, newOffset);
  this.inputElt.notifySizeChange();
  this.inputElt.$preInput.focus();
};
MIEmojiPlugin.prototype.onOpen = function () {
  var value = this.inputElt.$preInput.value;
  this._lastInputSelectPosion = this.inputElt.$preInput.getSelectPosition() || {
    start: value.length,
    end: value.length
  };
  this.inputElt.$preInput.focus();
};
var _default = MIEmojiPlugin;
exports["default"] = _default;

/***/ }),

/***/ 42049:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MODE_NEW = exports.MODE_EDIT = void 0;
exports.MessageQuote = MessageQuote;
exports["default"] = void 0;
exports.parseMessage = parseMessage;
exports.prepareIcon = prepareIcon;
__webpack_require__(44647);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _utils = __webpack_require__(84512);
var _EmojiAnims = __webpack_require__(98541);
var _EmojiPicker = _interopRequireDefault(__webpack_require__(24169));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _stringGenerate = __webpack_require__(10713);
var _CMDRunner = _interopRequireDefault(__webpack_require__(34470));
var _keyboard = __webpack_require__(95141);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _tiutils = __webpack_require__(94614);
var _MessageInputPlugin = _interopRequireDefault(__webpack_require__(22232));
var _MIEmojiPlugin = _interopRequireDefault(__webpack_require__(57244));
var _catalog = _interopRequireDefault(__webpack_require__(82398));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;
var $$ = _ACore["default"].$$;

/***
 *
 * @typedef {{text:string, desc: string, img?:string, file?:string}|string} MessageInputQuote
 */

var MODE_NEW = 0;
exports.MODE_NEW = MODE_NEW;
var MODE_EDIT = 1;
exports.MODE_EDIT = MODE_EDIT;
var isMobile = _BrowserDetector["default"].isMobile;

/***
 * @extends AElement
 * @constructor
 */
function MessageInput() {
  this._cmdRunner = new _CMDRunner["default"](this);
  this._keyMaps = {};
  this._plugins = [];
  this._mode = MODE_NEW; //edit
  this._editingText = "";
  prepareIcon();
  /**
   * @type {import('../PreInput').default}
   */
  this.$preInput = $('.as-message-input-pre', this);
  this.$preInput.on('change', this.eventHandler.preInputChange).on('keyup', this.eventHandler.preInputKeyUp).on('keydown', this.eventHandler.preInputKeyDown).on('pasteimg', this.eventHandler.preInputPasteImg).on('focus', this.eventHandler.preInputFocus).on('blur', this.eventHandler.preInputBlur);
  // //every can make size change
  this._imageFiles = [];
  this._files = [];
  this._latBound = {};
  this.$quote = $('messagequote.as-message-input-quote', this).on('pressremove', this.eventHandler.clickQuoteRemoveBtn);
  this.$left = $('.as-message-input-left', this);
  this.$right = $('.as-message-input-right', this);
  this.$attachmentCtn = $('.as-message-input-attachment-ctn', this);
  this.$fileBtn = $('.as-message-input-plugin-file', this).on('click', this.openFileDialog.bind(this));
  this.$attachmentAddBtn = $('.as-message-input-attachment-add-btn', this).on('click', this.openFileDialog.bind(this));
  this.$sendBtn = $('.as-message-input-plugin-send', this).on('click', this.notifySend.bind(this));
  this.$cancelBtn = $('.as-message-input-plugin-cancel', this).on('click', this.notifyCancel.bind(this));
  this.$attachhook = _('attachhook').addTo(this).on('attached', this.notifySizeChange.bind(this)).on('attached', this._updateSize.bind(this));
  this.on('drop', this.eventHandler.drop).on('dragover', this.eventHandler.dragover);
  _OOP["default"].drillProperty(this, this.$preInput, 'tagList');
  this.autoSend = false;
  /***
   *
   * @type {MessageInputQuote|null}
   */
  this.quote = null;
  this.addPlugin(new _MIEmojiPlugin["default"](this));
}
MessageInput.MODE_EDIT = MODE_EDIT;
MessageInput.MODE_NEW = MODE_NEW;
MessageInput.iconAssetRoot = function () {
  if (location.hostname.match(/^.*(\.?absol\.cf|absol\.ddns\.net)$/) || location.hostname === 'localhost') return 'https://absol.cf/exticons/vivid';
  return '/vivid_exticons';
}();
MessageInput.tag = 'MessageInput'.toLowerCase();
MessageInput.render = function (data) {
  data = data || {};
  data.iconAssetRoot = data.iconAssetRoot || MessageInput.iconAssetRoot;
  return _({
    attr: {
      'data-icon-asset-root': MessageInput.iconAssetRoot
    },
    "class": ['as-message-input'].concat(data.v2 ? ['as-v2'] : []),
    extendEvent: ['sendtext', 'sendimage', 'sendfile', 'sendquote', 'cancel', 'change', 'sizechange', 'send', 'useraddfile'],
    child: [{
      "class": 'as-message-input-right',
      child: [{
        tag: 'button',
        "class": ['as-message-input-plugin-btn', 'as-message-input-plugin-file'],
        child: 'span.mdi.mdi-attachment.mdi-rotate-90'
      }, {
        tag: 'button',
        "class": ['as-message-input-plugin-btn', 'as-message-input-plugin-send'],
        child: 'span.mdi.mdi-send'
      }, {
        tag: 'button',
        "class": ['as-message-input-plugin-btn', 'as-message-input-plugin-cancel'],
        child: 'span.mdi.mdi-close'
      }]
    }, {
      "class": 'as-message-input-pre-ctn',
      child: ['messagequote.as-message-input-quote.as-removable.as-shorten-text', {
        "class": 'as-message-input-left'
      }, {
        "class": ['as-message-input-attachment-ctn', 'as-bscroller'],
        child: [{
          tag: 'button',
          "class": 'as-message-input-attachment-add-btn',
          child: ['span.mdi.mdi-arrow-down-bold.as-message-input-attachment-add-btn-drop', {
            tag: 'span',
            "class": 'as-message-input-attachment-add-btn-plus',
            child: {
              text: "+"
            }
          }]
        }]
      }, (data.v2 ? 'tokenizehyperinput' : 'preinput') + '.as-message-input-pre.absol-bscroller']
    }]
  });
};
MessageInput.prototype.notifyChange = function () {
  this.emit('change', {
    name: 'change',
    target: this
  }, this);
  if (this.autoSend) {
    if (this.files.length > 0 || this.images.length > 0) this.notifySend();
  }
};
MessageInput.prototype.notifySend = function () {
  var eventData = {
    imageRemovePrevented: false,
    fileRemovePrevented: false,
    textRemovePrevented: false,
    quoteRemovePrevented: false,
    target: this,
    files: this.files,
    images: this.images,
    text: this.text
  };
  if (eventData.files.length > 0) {
    this.emit('sendfile', Object.assign(eventData, {
      type: 'sendfile',
      preventDefault: function preventDefault() {
        this.fileRemovePrevented = true;
      }
    }), this);
  }
  if (eventData.images.length > 0) {
    this.emit('sendimage', Object.assign(eventData, {
      type: 'sendimage',
      preventDefault: function preventDefault() {
        this.imageRemovePrevented = true;
      }
    }), this);
  }
  if (typeof this.quote === "string" || this.quote) {
    this.emit('sendquote', Object.assign(eventData, {
      type: 'sendquote',
      preventDefault: function preventDefault() {
        this.quoteRemovePrevented = true;
      }
    }), this);
  }
  if (this.files.length > 0 || eventData.images.length > 0 || eventData.text || typeof this.quote === "string" || this.quote) {
    if (eventData.text) this.$preInput.focus();
    this.emit('send', Object.assign(eventData, {
      type: 'send',
      preventDefault: function preventDefault() {
        this.imageRemovePrevented = true;
        this.fileRemovePrevented = true;
        this.imageRemovePrevented = true;
        this.quoteRemovePrevented = true;
      }
    }), this);
  }
  if (!eventData.fileRemovePrevented) this.files = [];
  if (!eventData.imageRemovePrevented) this.images = [];
  if (!eventData.textRemovePrevented) this.text = '';
  if (!eventData.quoteRemovePrevented) this.quote = null;
};
MessageInput.prototype.notifyCancel = function () {
  this.emit('cancel', {
    type: 'cancel',
    name: 'send',
    target: this,
    clearAllContent: this.clearAllContent.bind(this)
  }, this);
};
MessageInput.prototype.clearAllContent = function () {
  this.text = '';
  this.quote = null;
  this.files = [];
  this.images = [];
};
MessageInput.prototype.focus = function () {
  var value = this.$preInput.value;
  var range = this.$preInput.getSelectPosition() || {
    start: value.length,
    end: value.length
  };
  this.$preInput.focus();
  this.$preInput.applyData(value, range);
};
MessageInput.prototype.blur = function () {
  this.$preInput.blur();
};
MessageInput.prototype._updateAttachmentClass = function () {
  if (this._imageFiles.length + this._files.length) {
    this.addClass("as-has-attachment");
  } else {
    this.removeClass("as-has-attachment");
  }
  this._updateSize();
};
MessageInput.prototype._updateSize = function () {
  var fs = this.getFontSize() || 14;
  this.addStyle('--right-width', this.$right.getBoundingClientRect().width / fs + 'em');
};
MessageInput.prototype.addImageFiles = function (imageFiles, urls) {
  var thisMi = this;
  Array.prototype.forEach.call(imageFiles, function (file, index) {
    thisMi._imageFiles.push(file);
    var src;
    if (urls) {
      src = urls[index];
    }
    if (!src) {
      src = URL.createObjectURL(file);
    }
    var itemElt = _({
      "class": ['as-message-input-attach-preview', 'as-image'],
      attr: {
        title: file.name
      },
      child: [{
        "class": 'as-message-input-attach-preview-image',
        style: {
          backgroundImage: 'url(' + src + ')'
        }
      }, {
        tag: 'button',
        "class": 'as-message-input-attach-preview-close-btn',
        child: 'span.mdi.mdi-close',
        attr: {
          title: 'remove'
        },
        on: {
          click: function click() {
            thisMi._imageFiles = thisMi._imageFiles.filter(function (it) {
              return it !== file;
            });
            itemElt.remove();
            thisMi._updateAttachmentClass();
            thisMi.notifySizeChange();
            thisMi.notifyChange();
          }
        }
      }, {
        "class": 'as-message-input-attach-preview-info',
        child: [{
          "class": 'as-message-input-attach-preview-name',
          child: {
            text: file.name
          }
        }, {
          "class": 'as-message-input-attach-preview-size',
          child: {
            text: (0, _utils.fileSize2Text)(file.size)
          }
        }]
      }]
    }).addTo(thisMi.$attachmentCtn);
    thisMi.$attachmentCtn.addChildBefore(itemElt, thisMi.$attachmentAddBtn);
  });
  this._updateAttachmentClass();
  this.notifySizeChange();
};
MessageInput.prototype.addFiles = function (files) {
  var thisMi = this;
  Array.prototype.forEach.call(files, function (file, index) {
    thisMi._files.push(file);
    MessageInput.iconSupportAsync.then(function (ExtensionIcons) {
      var src;
      var ext = file.name.split('.').pop().toLowerCase();
      if (ExtensionIcons.indexOf(ext) > 0) {
        src = MessageInput.iconAssetRoot + '/' + ext + '.svg';
      } else {
        src = MessageInput.iconAssetRoot + '/' + 'default' + '.svg';
      }
      var itemElt = _({
        "class": ['as-message-input-attach-preview', 'as-file'],
        attr: {
          title: file.name
        },
        child: [{
          tag: 'img',
          "class": 'as-message-input-attach-preview-file',
          props: {
            src: src
          }
        }, {
          tag: 'button',
          "class": 'as-message-input-attach-preview-close-btn',
          child: 'span.mdi.mdi-close',
          attr: {
            title: 'remove'
          },
          on: {
            click: function click() {
              thisMi._files = thisMi._files.filter(function (it) {
                return it !== file;
              });
              itemElt.remove();
              thisMi._updateAttachmentClass();
              thisMi.notifySizeChange();
              thisMi.notifyChange();
            }
          }
        }, {
          "class": 'as-message-input-attach-preview-info',
          child: [{
            "class": 'as-message-input-attach-preview-name',
            child: {
              text: file.name
            }
          }, {
            "class": 'as-message-input-attach-preview-size',
            child: {
              text: (0, _utils.fileSize2Text)(file.size)
            }
          }]
        }]
      });
      thisMi.$attachmentCtn.addChildBefore(itemElt, thisMi.$attachmentAddBtn);
    });
  });
  this._updateAttachmentClass();
  thisMi.notifySizeChange();
};
MessageInput.prototype.closeEmoji = function () {
  if (!this.hasClass('as-message-input-show-emoji')) return;
  this.removeClass('as-message-input-show-emoji');
  this.removeChild(this.$emojiPickerCtn);
  $(document.body).off('mousedown', this.eventHandler.mousedownOutEmoji);
};
MessageInput.prototype.notifyAddFiles = function (files) {
  var event = {
    resolvedAsync: Promise.resolve(files),
    files: files,
    resolve: function resolve(result) {
      if (!result) {
        this.resolvedAsync = Promise.resolve(undefined);
      } else if (result.then) {
        this.resolvedAsync = result;
      } else {
        this.resolvedAsync = Promise.resolve(result);
      }
    }
  };
  this.emit('useraddfile', event);
  return event.resolvedAsync;
};
MessageInput.prototype.openFileDialog = function () {
  var thisMi = this;
  (0, _utils.openFileDialog)({
    multiple: true
  }).then(function (files) {
    if (!thisMi.autoSend) thisMi.$preInput.focus();
    thisMi.notifyAddFiles(files).then(function (files) {
      if (files && files.length > 0) thisMi.handleAddingFileByType(files);
    });
  });
};
MessageInput.prototype.handleAddingFileByType = function (files) {
  if (files.length > 0) {
    var imageFiles = [];
    var otherFiles = [];
    var file;
    for (var i = 0; i < files.length; ++i) {
      file = files[i];
      if (!!file.type && file.type.match && file.type.match(/^image\//)) {
        imageFiles.push(file);
      } else {
        otherFiles.push(file);
      }
    }
    this.addImageFiles(imageFiles);
    this.addFiles(otherFiles);
    this.notifyChange();
  }
};
MessageInput.prototype.notifySizeChange = function () {
  var bound = this.getBoundingClientRect();
  if (this._latBound.width != bound.width || this._latBound.height != bound.height) {
    this._latBound.width = bound.width;
    this._latBound.height = bound.height;
    this.emit('sizechange', {
      name: 'sizechange',
      bound: bound,
      target: this
    }, this);
  }
};
MessageInput.prototype.addPlugin = function (option) {
  var plugin;
  if (option.isMessagePlugin) {
    plugin = option;
  } else {
    plugin = new this.PluginConstructor(this, option);
  }
  plugin.idx = this._plugins.length + 1;
  this._plugins.push(plugin);
  this._plugins.sort(function (a, b) {
    var av = typeof a.opt.order === "number" ? a.opt.order : a.idx * 1000;
    var bv = typeof b.opt.order === "number" ? b.opt.order : b.idx * 1000;
    return av - bv;
  });
  var plugins = this._plugins.slice();
  plugins.forEach(function (pl) {
    return pl.getTriggerButton().remove();
  });
  this.$left.addChild(plugins.shift().getTriggerButton());
  while (plugins.length > 0) {
    this.$right.addChildBefore(plugins.shift().getTriggerButton(), this.$right.firstChild);
  }
  return plugin;
};

/***
 *
 * @param {{name?:string, exec:function(_this:MessageInput):void, keyBiding?:string}} option
 */
MessageInput.prototype.addCommand = function (option) {
  option.name = option.name || (0, _stringGenerate.randomIdent)(20);
  this._cmdRunner.add(option.name, option.exec);
  if (option.keyBiding && option.keyBiding.trim) {
    var keyBindingIdent = (0, _keyboard.normalizeKeyBindingIdent)(option.keyBiding);
    this._keyMaps[keyBindingIdent] = option.name;
  }
};
MessageInput.prototype.exeCmd = function (name) {
  var args = Array.prototype.slice.call(arguments);
  args[0] = this;
  args.unshift(name);
  this._cmdRunner.invoke.apply(this._cmdRunner, args);
};
MessageInput.prototype._updateQuote = function () {
  this.$quote.data = this._quote;
  if (this._quote) this.addClass('as-has-quote');else this.removeClass('as-has-quote');
  this._updateSize();
  this.notifySizeChange();
};

/**
 * @type {MessageInput}
 */
MessageInput.eventHandler = {};
MessageInput.eventHandler.preInputChange = function (event) {
  var text = this.$preInput.value;
  if (text.length > 0) {
    this.addClass('as-has-text');
  } else {
    this.removeClass('as-has-text');
  }
  if (text === this._editingText) {
    this.removeClass('as-text-changed');
  } else {
    this.addClass('as-text-changed');
  }
  this._updateSize();
  this.notifySizeChange();
  this.notifyChange();
};
MessageInput.eventHandler.preInputKeyDown = function (event) {
  if (!(event.shiftKey || event.ctrlKey || event.altKey) && event.key === 'Enter') {
    this.notifySend();
    event.preventDefault();
  } else if ((event.shiftKey || event.ctrlKey || event.altKey) && event.key === 'Enter') {
    event.preventDefault();
    var text = this.$preInput.value;
    var selectedPos = this.$preInput.getSelectPosition();
    var newText = text.substr(0, selectedPos.start) + '\n' + text.substr(selectedPos.end);
    this.$preInput.applyData(newText, selectedPos.start + 1);
    this.notifySizeChange();
    this.$preInput.commitChange(newText, selectedPos.start + 1);
  } else if (event.key === "Escape" && this._mode === MODE_EDIT) {
    this.notifyCancel();
    event.preventDefault();
  }
  var keyBindingIdent = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  if (this._keyMaps[keyBindingIdent]) {
    event.preventDefault();
    this.exeCmd(this._keyMaps[keyBindingIdent]);
  }
  setTimeout(this.notifySizeChange.bind(this), 1);
};
MessageInput.eventHandler.preInputKeyUp = function (event) {
  var value = this.$preInput.value;
  this._lastInputSelectPosion = this.$preInput.getSelectPosition() || {
    start: value.length,
    end: value.length
  };
  this.notifySizeChange();
};
MessageInput.eventHandler.preInputPasteImg = function (event) {
  if (this._mode == 'edit') return;
  var files = Array.prototype.slice.call(event.imageFiles);
  var urls = event.urls && Array.prototype.slice.call(event.urls);
  this.notifyAddFiles(files).then(function (newFiles) {
    if (!newFiles || newFiles.length === 0) return;
    var newUrls = urls && newFiles.map(function (file) {
      return urls[files.indexOf(file)];
    });
    this.addImageFiles(newFiles, newUrls);
    this.notifyChange();
  }.bind(this));
};
MessageInput.eventHandler.preInputFocus = function () {
  this.addClass('as-focus');
};
MessageInput.eventHandler.preInputBlur = function () {
  this.removeClass('as-focus');
};
MessageInput.eventHandler.clickEmojiBtn = function () {
  this.toggleEmoji();
};
MessageInput.eventHandler.mousedownOutEmoji = function (event) {
  if (_EventEmitter["default"].hitElement(this.$emojiPicker, event) || _EventEmitter["default"].hitElement(this.$emojiBtn, event)) return;
  this.closeEmoji();
};
MessageInput.eventHandler.pickEmoji = function (event) {
  var text = this.$preInput.value;
  var newText = text.substr(0, this._lastInputSelectPosion.start) + event.key + text.substr(this._lastInputSelectPosion.end);
  var selected = this._lastInputSelectPosion;
  var newOffset = selected.start + event.key.length;
  this._lastInputSelectPosion = {
    start: newOffset,
    end: newOffset
  };
  this.$preInput.focus();
  this.$preInput.applyData(newText, newOffset);
  this.$preInput.commitChange(newText, newOffset);
  this.notifySizeChange();
  this.$preInput.focus(); //older firefox version will be lost focus
  // this.notifyChange();//not need
};

MessageInput.eventHandler.dragover = function (event) {
  event.preventDefault();
  this.addClass('as-drag-hover');
  this.notifySizeChange();
  if (this._hoverTimeout > 0) clearTimeout(this._hoverTimeout);
  var thisMi = this;
  this._hoverTimeout = setTimeout(function () {
    thisMi._hoverTimeout = -1;
    thisMi.removeClass('as-drag-hover');
    thisMi.notifySizeChange();
  }, 200);
  //todo:
  this._updateSize();
};
MessageInput.eventHandler.drop = function (event) {
  event.preventDefault();
  var files = [];
  var file;
  if (event.dataTransfer.items) {
    for (var i = 0; i < event.dataTransfer.items.length; i++) {
      if (event.dataTransfer.items[i].kind === 'file') {
        file = event.dataTransfer.items[i].getAsFile();
        if (!file.type && file.size % 4096 == 0) {
          //todo: folder
        } else {
          files.push(file);
        }
      }
    }
  } else {
    for (var i = 0; i < event.dataTransfer.files.length; i++) {
      file = event.dataTransfer.files[i];
      if (!file.type && file.size % 4096 == 0) {} else {
        files.push(file);
      }
    }
  }
  this.notifyAddFiles(files).then(function (files) {
    this.handleAddingFileByType(files);
  }.bind(this));
};
MessageInput.eventHandler.clickQuoteRemoveBtn = function () {
  this.quote = null;
  this.notifyChange();
};
MessageInput.property = {};
MessageInput.property.files = {
  set: function set(value) {
    $$('.as-file', this.$attachmentCtn).forEach(function (elt) {
      elt.remove();
    });
    value = value || [];
    this._files = [];
    this.addFiles(value);
  },
  get: function get() {
    return this._files;
  }
};
MessageInput.property.images = {
  set: function set(value) {
    $$('.as-image', this.$attachmentCtn).forEach(function (elt) {
      elt.remove();
    });
    value = value || [];
    this._imageFiles = [];
    this.addImageFiles(value);
  },
  get: function get() {
    return this._imageFiles;
  }
};
MessageInput.property.text = {
  set: function set(text) {
    this.$preInput.value = '' + text;
    if (text.length > 0) {
      this.addClass('as-has-text');
    } else {
      this.removeClass('as-has-text');
    }
    if (this._mode === MODE_EDIT) {
      this._editingText = text;
    }
    this.removeClass('as-text-changed');
    this._updateSize();
  },
  get: function get() {
    return this.$preInput.value;
  }
};

/**
 * @type {MessageInput}
 */
MessageInput.property.mode = {
  set: function set(value) {
    value = value || MODE_NEW;
    if (value === MODE_EDIT || value.toLowerCase && value.toLowerCase() === 'edit') {
      this.addClass('as-mode-edit');
      value = MODE_EDIT;
      this._editingText = this.$preInput.value;
    } else {
      value = MODE_NEW;
      this._editingText = '';
      this.removeClass('as-mode-edit');
    }
    this.removeClass('as-text-changed');
    this._mode = value;
    this._updateSize();
  },
  get: function get() {
    return this._mode === MODE_EDIT ? 'edit' : 'new';
  }
};
MessageInput.property.autoSend = {
  set: function set(value) {
    if (value) {
      this.addClass('as-auto-send');
    } else {
      this.removeClass('as-auto-send');
    }
  },
  get: function get() {
    return this.hasClass('as-auto-send');
  }
};
MessageInput.property.quote = {
  set: function set(quote) {
    this._quote = quote;
    this._updateQuote();
  },
  get: function get() {
    return this._quote;
  }
};
MessageInput.property.tagMap = {
  set: function set(value) {
    this.$preInput.tagMap = value || {};
    this.$quote.tagMap = value || {};
  },
  get: function get() {
    return this.$preInput.tagMap;
  }
};
_ACore["default"].install(MessageInput);
var _default = MessageInput;
exports["default"] = _default;
var urlRex = /^(firefox|opera|chrome|https|http|wss|ws):\/\/[^\s]+$/;

/***
 *
 * @param {string}text
 * @param {{emojiAssetRoot?:string, staticSize?:number, animSize?:number, tagMap?:{}, lengthLimit?:number, inline?:boolean}=} data
 * @returns {Array}
 */
function parseMessage(text, data) {
  data = data || {};
  data.emojiAssetRoot = data.emojiAssetRoot || _EmojiPicker["default"].assetRoot;
  data.staticSize = data.staticSize || 20;
  data.animSize = data.animSize || 60;
  var tagMap = data.tagMap || {};
  var tokens = (0, _tiutils.tokenizeMessageText)(text).reduce(function (ac, token) {
    if (token.type !== 'TEXT') {
      ac.push(token);
      return ac;
    }
    var urls = token.value.match(/(firefox|opera|chrome|https|http|wss|ws):\/\/[^\s]+/g);
    var splitter = Math.random() + '';
    var normals = token.value.replace(/(firefox|opera|chrome|https|http|wss|ws):\/\/[^\s]+/, splitter).split(splitter);
    for (var i = 0; i < normals.length; ++i) {
      if (i > 0) {
        ac.push({
          type: 'URL',
          value: urls[i - 1]
        });
      }
      ac.push({
        type: 'TEXT',
        value: normals[i]
      });
    }
    return ac;
  }, []);
  if (data.lengthLimit > 0) {
    tokens = tokens.reduce(function (ac, token) {
      if (ac.l >= data.lengthLimit) {
        return ac;
      }
      switch (token.type) {
        case 'TAG':
          ac.l += ('@' + (tagMap[token.value] ? tagMap[token.value] : '[id:' + token.value + ']')).length;
          break;
        case 'EMOJI':
          ac.l += 1;
          break;
        case 'NEW_LINE':
          ac.l += 1;
          break;
        default:
          ac.l += token.value.length;
      }
      if (ac.l > data.lengthLimit) {
        if (token.type === 'TEXT') {
          token.value = token.value.substring(0, Math.max(0, token.value.length - (ac.l - data.lengthLimit) - 3)) + '...';
          ac.tokens.push(token);
        }
      } else {
        ac.tokens.push(token);
      }
      return ac;
    }, {
      l: 0,
      tokens: []
    }).tokens;
  }
  var res = tokens.reduce(function (ac, token) {
    switch (token.type) {
      case 'TAG':
        ac.push({
          tag: 'span',
          "class": 'as-tag-token',
          child: {
            text: '@' + (tagMap[token.value] ? tagMap[token.value] : '[id:' + token.value + ']')
          }
        });
        break;
      case 'EMOJI':
        ac.push({
          tag: 'span',
          "class": 'as-emoji-text',
          child: {
            text: token.value
          }
        });
        ac.push({
          tag: 'img',
          "class": 'as-emoji',
          props: {
            src: data.emojiAssetRoot + '/static/x' + data.staticSize + '/' + _EmojiAnims.EmojiAnimByIdent[token.value][1]
          }
        });
        break;
      case 'NEW_LINE':
        ac.push({
          tag: 'br'
        });
        break;
      case 'URL':
        ac.push({
          tag: 'a',
          "class": 'as-protocal-' + token.value.split(':').shift(),
          child: {
            text: token.value
          },
          props: {
            href: token.value,
            target: '_blank'
          }
        });
        break;
      case 'TEXT':
      default:
        ac.push({
          tag: 'span',
          child: {
            text: token.value
          }
        });
        break;
    }
    return ac;
  }, []);
  if (!data.inline && res.length === 2 && res[1]["class"] === 'as-emoji') {
    res[1].tag = 'iconsprite';
    res[1].props.fps = 30;
    res[1].props.src = res[1].props.src.replace('/static/x' + data.staticSize, '/anim/x' + data.animSize);
  }
  return res;
}
MessageInput.parseMessage = parseMessage;
function prepareIcon() {
  if (!MessageInput.iconSupportAsync) {
    MessageInput.iconSupportAsync = Promise.resolve(_catalog["default"]);
  }
  return MessageInput.iconSupportAsync;
}
function MessageQuote() {
  prepareIcon();
  this._tagMap = {};
  /***
   *
   * @type {null|MessageInputQuote}
   * @private
   */
  this._data = null;
  this.$img = $('.as-message-quote-img', this);
  this.$text = $('.as-message-quote-text', this);
  this.$desc = $('.as-message-quote-desc', this);
  this.$removeBtn = $('.as-message-quote-remove-btn', this).on('click', this.eventHandler.clickRemoveBtn);
  Object.defineProperty(this, '$text', {
    set: function set() {
      console.trace();
    },
    get: function get() {
      return $('.as-message-quote-text', this);
    }
  });
}
MessageQuote.tag = 'MessageQuote'.toLowerCase();
MessageQuote.render = function () {
  return _({
    extendEvent: 'pressremove',
    "class": 'as-message-quote-box',
    child: [{
      "class": 'as-message-quote-img'
    }, {
      "class": 'as-message-quote-sym',
      child: 'span.mdi.mdi-format-quote-open-outline'
    }, {
      "class": 'as-message-quote-content',
      child: [{
        "class": 'as-message-quote-text',
        child: {
          text: ''
        }
      }, {
        "class": 'as-message-quote-desc',
        child: {
          text: ''
        }
      }]
    }, {
      tag: 'button',
      "class": 'as-message-quote-remove-btn',
      child: 'span.mdi.mdi-close'
    }]
  });
};
MessageQuote.property = {};
MessageQuote.eventHandler = {};
MessageQuote.property.removable = {
  set: function set(val) {
    if (val) {
      this.addClass('as-removable');
    } else {
      this.removeClass('as-removable');
    }
  },
  get: function get() {
    return this.hasClass('as-removable');
  }
};
MessageQuote.property.shortenText = {
  set: function set(val) {
    if (val) {
      this.addClass('as-shorten-text');
    } else {
      this.removeClass('as-shorten-text');
    }
  },
  get: function get() {
    return this.hasClass('as-shorten-text');
  }
};
MessageQuote.property.data = {
  set: function set(quote) {
    this._data = quote;
    var text, desc;
    var file, img;
    if (typeof quote === "string") {
      text = quote;
      desc = '';
    } else if (quote && _typeof(quote) === "object") {
      text = quote.text;
      desc = quote.desc;
      file = quote.file;
      img = quote.img;
    }
    if (text === undefined) {
      this.$text.clearChild();
      this.$desc.firstChild.data = '';
      this.removeClass('as-has-file');
      this.removeClass('as-has-img');
    } else {
      if (file) {
        file = file.toLowerCase().split('.').pop();
        MessageInput.iconSupportAsync.then(function (iconSupport) {
          if (iconSupport.indexOf(file) < 0) file = 'default';
          this.$img.addStyle('background-image', 'url(' + MessageInput.iconAssetRoot + '/' + file + '.svg)');
        }.bind(this));
        this.addClass('as-has-file');
      } else this.removeClass('as-has-file');
      if (img) {
        this.$img.addStyle('background-image', 'url(' + img + ')');
        this.addClass('as-has-img');
      } else this.removeClass('as-has-img');
      if (this.shortenText) text = text.split(/\r?\n/).shift();
      var parsedText = parseMessage(text, {
        tagMap: this.tagMap
      });
      var textEltChain = parsedText.map(function (c) {
        return _(c);
      });
      this.$text.clearChild().addChild(textEltChain);
      this.$desc.firstChild.data = desc;
    }
  },
  get: function get() {
    return this._data;
  }
};
MessageQuote.property.tagMap = {
  set: function set(value) {
    this._tagMap = value || {};
    this.data = this['data'];
  },
  get: function get() {
    return this._tagMap;
  }
};
MessageQuote.eventHandler.clickRemoveBtn = function () {
  this.emit('pressremove', {
    target: this,
    type: 'pressclose'
  }, this);
};
_ACore["default"].install(MessageQuote);
MessageInput.prototype.PluginConstructor = _MessageInputPlugin["default"];

/***/ }),

/***/ 22232:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _stringGenerate = __webpack_require__(10713);
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _ACore = __webpack_require__(34093);
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @typedef MessageInputPluginOption
 * @property {string} [id]
 * @property {string|Object|AElement} icon
 * @property {function(_thisAdapter: MessageInputPlugin, _:Dom._, Dom.$):AElement} createContent
 * @property {function(_thisAdapter:MessageInputPlugin):void} onPressTrigger
 * @property {"left"|"right"} popupAlign
 * @property {boolean=} alwaysVisible
 */

/***
 *
 * @param {MessageInput} inputElt
 * @param {MessageInputPluginOption} opt
 * @constructor
 */
function MessageInputPlugin(inputElt, opt) {
  this.opt = opt || {};
  this.inputElt = inputElt;
  this.icon = opt.icon;
  this.id = opt.id || (0, _stringGenerate.randomIdent)(16);
  this.alwaysVisible = !!opt.alwaysVisible;
  this.$icon = null;
  this.$triggerBtn = null;
  this.$content = null;
  this.$popup = null;
  if (opt.createContent) this.createContent = opt.createContent;
  if (opt.onPressTrigger) this.onPressTrigger = opt.onPressTrigger;
  this.autoClose = true;
  if ('autoClose' in opt) {
    this.autoClose = !!opt.autoClose;
  }
  this.popupAlign = opt.popupAlign || 'left';
  this.ev_pressTrigger = this.ev_pressTrigger.bind(this);
  this.ev_pressOut = this.ev_pressOut.bind(this);
}
MessageInputPlugin.prototype.isMessagePlugin = true;
MessageInputPlugin.prototype.ev_pressTrigger = function (event) {
  var value = this.inputElt.$preInput.value;
  this._lastInputSelectPosion = this.inputElt.$preInput.getSelectPosition() || {
    start: value.length,
    end: value.length
  };
  if (this.onPressTrigger) {
    this.onPressTrigger(this);
  } else {
    if (this.isPopupOpened()) {
      this.closePopup();
    } else {
      this.openPopup();
    }
  }
};
MessageInputPlugin.prototype.insertText = function (itext) {
  if (!this._lastInputSelectPosion) {
    throw new Error('Invalid call');
  }
  var text = this.inputElt.$preInput.value;
  var newText = text.substr(0, this._lastInputSelectPosion.start) + itext + text.substr(this._lastInputSelectPosion.end);
  var selected = this._lastInputSelectPosion;
  var newOffset = selected.start + itext.length;
  this.inputElt.$preInput.focus();
  this.inputElt.$preInput.applyData(newText, newOffset);
  this.inputElt.$preInput.commitChange(newText, newOffset);
  this.inputElt.notifySizeChange();
  this.inputElt.$preInput.focus();
};
MessageInputPlugin.prototype.appendText = function (itext) {
  if (!this._lastInputSelectPosion) {
    throw new Error('Invalid call');
  }
  var text = this.inputElt.$preInput.value;
  var newText = text + itext;
  var newOffset = newText.length;
  this.inputElt.$preInput.focus();
  this.inputElt.$preInput.applyData(newText, newOffset);
  this.inputElt.$preInput.commitChange(newText, newOffset);
  this.inputElt.notifySizeChange();
  this.inputElt.$preInput.focus();
};
MessageInputPlugin.prototype.replaceText = function (itext) {
  if (!this._lastInputSelectPosion) {
    throw new Error('Invalid call');
  }
  var newText = itext;
  var newOffset = newText.length;
  this.inputElt.$preInput.focus();
  this.inputElt.$preInput.applyData(newText, newOffset);
  this.inputElt.$preInput.commitChange(newText, newOffset);
  this.inputElt.notifySizeChange();
  this.inputElt.$preInput.focus();
};
MessageInputPlugin.prototype.ev_pressOut = function (event) {
  if (_EventEmitter["default"].hitElement(this.getTriggerButton(), event)) return;
  if (_EventEmitter["default"].hitElement(this.getPopup(), event)) return;
  if (!this.autoClose) return;
  this.closePopup();
};
MessageInputPlugin.prototype.getIconElt = function () {
  if (!this.$icon) this.$icon = (0, _ACore._)(this.icon);
  return this.$icon;
};
MessageInputPlugin.prototype.getTriggerButton = function () {
  if (!this.$triggerBtn) {
    this.$triggerBtn = (0, _ACore._)({
      tag: 'button',
      "class": ['as-message-input-plugin-btn', 'as-message-input-plugin-' + this.id],
      child: this.getIconElt(),
      on: {
        click: this.ev_pressTrigger
      }
    });
    if (this.alwaysVisible) {
      this.$triggerBtn.addClass('as-always-visible');
    }
  }
  return this.$triggerBtn;
};
MessageInputPlugin.prototype.createContent = function (_thisAdapter, _, $) {
  return _({
    tag: 'div'
  });
};

/***
 *
 * @type {null|function(_thisAdapter:MessageInputPlugin):void}
 */
MessageInputPlugin.prototype.onPressTrigger = null;
MessageInputPlugin.prototype.getContent = function () {
  if (!this.$content) this.$content = this.createContent(this.inputElt, _ACore._, _ACore.$);
  return this.$content;
};
MessageInputPlugin.prototype.getPopup = function () {
  if (!this.$popup) {
    this.$popup = (0, _ACore._)({
      "class": ['as-message-input-external-tools-popup', 'as-align-' + this.popupAlign],
      child: this.getContent()
    });
  }
  return this.$popup;
};
MessageInputPlugin.prototype.openPopup = function () {
  if (this.isPopupOpened()) return;
  this.inputElt.appendChild(this.getPopup());
  document.body.addEventListener('click', this.ev_pressOut);
  this.onOpen();
  if (this.opt.onOpen) {
    this.opt.onOpen.call(this, this.inputElt, _ACore._, _ACore.$);
  }
};
MessageInputPlugin.prototype.closePopup = function () {
  if (!this.isPopupOpened()) return;
  if (this.opt.onClose) {
    this.opt.onClose.call(this, this.inputElt, _ACore._, _ACore.$);
  }
  this.onClose();
  this.getPopup().remove();
  document.body.removeEventListener('click', this.ev_pressOut);
};
MessageInputPlugin.prototype.isPopupOpened = function () {
  return !!this.getPopup().parentElement;
};
MessageInputPlugin.prototype.onOpen = _noop["default"];
MessageInputPlugin.prototype.onClose = _noop["default"];
Object.defineProperty(MessageInputPlugin.prototype, 'contentElt', {
  get: function get() {
    return this.getContent();
  }
});
var _default = MessageInputPlugin;
exports["default"] = _default;

/***/ }),

/***/ 5478:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(82287);
var _ACore = __webpack_require__(34093);
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function MActivity(bundle) {
  _Fragment["default"].call(this);
  this.caller = null;
  this.arguments = null;
  this.result = null;
}
_OOP["default"].mixClass(MActivity, _Fragment["default"]);
MActivity.prototype.createView = function () {
  this.$view = (0, _ACore._)({
    "class": 'am-activity'
  });
};

//
//
// MActivity.prototype.finish = function () {
//     if (!this.session) {
//         throw new Error("Activity is not started!");
//     }
//     this.stop();
//     if (this.onFinished) this.onFinished();
//     if (this.caller) {
//         this.caller.activityReturn(this.session, this, this.result);
//         this.caller= null;
//         this.result = null;
//         this.arguments = null;
//         this.session = null;
//     }
// };

//
// /**
//  * @param {MActivity} activity
//  * @param {*} bundle
//  */
// MActivity.prototype.startActivity = function (session, activity, args) {
//     activity.stop();//stop before call new
//     this.pause();
//     activity.caller = this;
//     activity.arguments = args;
//     activity.result = null;
//     activity.session = session;
//     activity.attach(this);
//     activity.viewToApp();
//     activity.start();
// };
//
// MActivity.prototype.activityReturn = function (session, act, result) {
//     if (this.onActivityReturn) {
//         this.onActivityReturn(session, act, result);
//     }
//
//     this.viewToApp();
//     this.resume();
// };
var _default = MActivity;
exports["default"] = _default;

/***/ }),

/***/ 32878:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
__webpack_require__(82287);
var _ACore = __webpack_require__(34093);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends Fragment
 * @constructor
 */
function MApplication() {
  _Fragment["default"].call(this);
  this.stack = [];
  this.pendingLoop = [];
  this.loopRunning = false;
}
_OOP["default"].mixClass(MApplication, _Fragment["default"]);
MApplication.prototype.createView = function () {
  this.$view = (0, _ACore._)({
    "class": ['am-application', 'am-stack']
  });
};
MApplication.prototype.postHandler = function (handler) {
  this.pendingLoop.push(handler);
  if (this.loopRunning) return;
  while (this.pendingLoop.length > 0) {
    this.pendingLoop.shift()();
  }
};
MApplication.prototype.startActivity = function (clazz, bundle) {
  var _this = this;
  var handle = function handle() {
    var curAct = _this.stack[_this.stack.length - 1];
    if (curAct) {
      curAct.pause();
    }
    var newAct = new clazz(bundle);
    var view = newAct.getView();
    _this.$view.addChild(view);
    _this.stack.push(newAct);
    newAct.attach(_this);
    newAct.onCreated();
    if (_this.state === "PAUSE") {
      newAct.start(true);
    } else if (_this.state === 'RUNNING') {
      if (curAct) curAct.pause();
      newAct.start();
    }
  };
  this.postHandler(handle);
};
MApplication.prototype.replaceActivity = function (clazz, bundle) {
  var curAct = this.stack[this.stack.length - 1];
  if (curAct) this.finishActivity(curAct, true);
  this.startActivity(clazz, bundle);
};

/**
 *
 * @param act
 * @param {boolean=} replace
 */
MApplication.prototype.finishActivity = function (act, replace) {
  var _this2 = this;
  this.postHandler(function () {
    var curAct = _this2.stack[_this2.stack.length - 1];
    if (curAct) {
      if (curAct !== act) throw new Error("Activity stack error!");
      curAct.detach();
      curAct.getView().remove();
      _this2.stack.pop();
      curAct.destroy();
      curAct = _this2.stack[_this2.stack.length - 1];
      if (curAct && _this2.state === 'RUNNING' && !replace) {
        curAct.resume();
      }
    }
  });
};
MApplication.prototype.onStart = function () {
  for (var i = 0; i < this.stack.length; ++i) {
    this.stack[i].start(true);
  }
};
MApplication.prototype.onResume = function () {
  var curAct = this.stack[this.stack.length - 1];
  if (curAct) {
    curAct.resume(true);
  }
};
MApplication.prototype.onPause = function () {
  var curAct = this.stack[this.stack.length - 1];
  if (curAct) {
    curAct.pause();
  }
};
MApplication.prototype.onStop = function () {
  for (var i = this.stack.length - 1; i >= 0; --i) {
    this.stack[i].stop();
  }
};
MApplication.prototype.onDestroy = function () {
  while (this.stack.length) {
    this.stack.pop().destroy();
  }
};
var _default = MApplication;
exports["default"] = _default;

/***/ }),

/***/ 82988:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MExploreGroup = MExploreGroup;
exports.MExploreItemBlock = MExploreItemBlock;
exports.MExploreItemList = MExploreItemList;
exports.MExploreSectionBreak = MExploreSectionBreak;
exports.MSpringboardMenu = MSpringboardMenu;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(82287);
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _keyboard = __webpack_require__(95141);
var _stringFormat = __webpack_require__(22294);
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _stringMatching = __webpack_require__(59163);
var _int = __webpack_require__(65909);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var makeTextToNode = function makeTextToNode(data, pElt) {
  var node;
  if (typeof data === "string") {
    node = (0, _ACore._)({
      text: data
    });
  } else if (data instanceof Array) {
    data.forEach(function (it) {
      return makeTextToNode(it, pElt);
    });
  }
  if (node) pElt.addChild(node);
};
var makeIconToNode = function makeIconToNode(data, pElt) {
  var node;
  if (data) node = (0, _ACore._)(data);
  pElt.clearChild();
  if (node) pElt.addChild(node);
};
function MExploreSectionBreak() {
  this._name = '';
  this.$name = (0, _ACore.$)('.am-explore-section-break-name', this);
}
MExploreSectionBreak.tag = 'MExploreSectionBreak'.toLowerCase();
MExploreSectionBreak.render = function () {
  return (0, _ACore._)({
    "class": 'am-explore-section-break',
    child: [{
      "class": 'am-explore-section-break-name'
    }, '.am-explore-section-break-line']
  });
};
MExploreSectionBreak.property = {};
MExploreSectionBreak.property.name = {
  set: function set(value) {
    if (value === null || value === undefined) value = '';
    this._name = value;
    this.$name.clearChild();
    makeTextToNode(value, this.$name);
  },
  get: function get() {
    return this._name;
  }
};
function MExploreItemBlock() {
  this.$name = (0, _ACore.$)('.am-explore-item-block-name', this);
  this._name = '';
  this._icon = null;
  this.$icon = (0, _ACore.$)('.am-explore-item-block-icon', this);
  this.$name = (0, _ACore.$)('.am-explore-item-block-name', this);

  /**
   * @name name
   * @type {string}
   * @memberof MExploreItemBlock#
   */

  /**
   * @name icon
   * @memberof MExploreItemBlock#
   */
}

MExploreItemBlock.tag = 'MExploreItemBlock'.toLowerCase();
MExploreItemBlock.render = function () {
  return (0, _ACore._)({
    attr: {
      tabindex: '1'
    },
    "class": 'am-explore-item-block',
    child: [{
      "class": 'am-explore-item-block-icon'
    }, {
      "class": 'am-explore-item-block-name'
    }]
  });
};
MExploreItemBlock.property = {};
MExploreItemBlock.property.icon = {
  set: function set(value) {
    value = value || null;
    this._icon = value;
    makeIconToNode(value, this.$icon);
  },
  get: function get() {
    return this._icon;
  }
};
MExploreItemBlock.property.name = {
  set: function set(value) {
    if (value === null || value === undefined) value = '';
    makeTextToNode(value, this.$name);
    this._name = value;
  },
  get: function get() {
    return this._name;
  }
};
MExploreItemBlock.property.hidden = {
  set: function set(value) {
    if (value) {
      this.addClass('as-hidden');
    } else {
      this.removeClass('as-hidden');
    }
  },
  get: function get() {
    return this.hasClass('as-hidden');
  }
};
function MExploreItemList() {}
MExploreItemList.tag = 'MExploreItemList'.toLowerCase();
MExploreItemList.render = function () {};

/**
 * @extends AElement
 * @constructor
 */
function MExploreGroup() {
  this.$br = (0, _ACore.$)(MExploreSectionBreak.tag, this);
  this._items = [];
  this.$items = [];
  this.$itemCtn = (0, _ACore.$)('.am-explore-group-item-ctn', this);
  /**
   * @name name
   * @type {string}
   * @memberof MExploreGroup#
    /**
   * @name items
   * @type {[]}
   * @memberof MExploreGroup#
   */
}

MExploreGroup.tag = 'MExploreGroup'.toLowerCase();
MExploreGroup.render = function () {
  return (0, _ACore._)({
    "class": 'am-explore-group',
    extendEvent: ['press'],
    child: [{
      tag: MExploreSectionBreak
    }, {
      "class": 'am-explore-group-item-ctn'
    }]
  });
};
MExploreGroup.property = {};
MExploreGroup.property.name = {
  set: function set(value) {
    value = value || '';
    this.$br.name = value;
    if (value) {
      this.$br.removeStyle('display');
    } else {
      this.$br.addStyle('display', 'none');
    }
  },
  get: function get() {
    return this.$br.name;
  }
};
MExploreGroup.property.items = {
  /**
   * @this MExploreGroup
   * @param items
   */
  set: function set(items) {
    var _this = this;
    if (!items || !items.slice || !items.map) items = [];
    items = items.slice();
    this._items = items;
    while (this.$items.length) {
      this.$items.pop().selfRemove();
    }
    this.$items = items.map(function (it) {
      var elt = (0, _ACore._)({
        tag: MExploreItemBlock,
        props: {
          data: it,
          name: it.name,
          icon: it.icon,
          hidden: !!it.hidden
        },
        on: {
          click: function click(event) {
            _this.emit('press', {
              type: 'press',
              target: elt,
              itemData: it,
              originalEvent: event,
              itemElt: elt
            }, _this);
          }
        }
      });
      if (window.ABSOL_DEBUG) {
        elt.attr('title', 'score: ' + it.score);
      }
      return elt;
    });
    this.$itemCtn.addChild(this.$items);
  },
  get: function get() {
    return this._items;
  }
};
MExploreGroup.property.hidden = {
  set: function set(value) {
    if (value) {
      this.addClass('as-hidden');
    } else {
      this.removeClass('as-hidden');
    }
  },
  get: function get() {
    return this.hasClass('as-hidden');
  }
};

/**
 * @extends AElement
 * @constructor
 */
function MSpringboardMenu() {
  var _this2 = this;
  if (_BrowserDetector["default"].isMobile) {
    this.addClass('as-mobile');
  }
  this.keyboardCtrl = new MSMKeyboardController(this);
  this.$groups = [];
  this.$attachHook = (0, _ACore._)('attachhook').addTo(this);
  this.$attachHook.on('attached', function () {
    _ResizeSystem["default"].add(_this2);
    _this2.updateSize();
    _this2.keyboardCtrl.lowPriorityFocus();
  });
  this.$attachHook.requestUpdateSize = this.updateSize.bind(this);
  this.searchingPlugin = new MSMSearchingPlugin(this);
  /**
   * @name searching
   * @type {{input: SearchTextInput, items: []}}
   * @memberof MSpringboardMenu#
   */
}

MSpringboardMenu.tag = 'MSpringboardMenu'.toLowerCase();
MSpringboardMenu.render = function () {
  return (0, _ACore._)({
    attr: {
      tabindex: '1'
    },
    "class": 'am-springboard-menu',
    extendEvent: ['press']
  });
};
MSpringboardMenu.prototype.updateSize = function () {
  if (!this.isDescendantOf(document.body)) return;
  if (this.$groups.length === 0) return;
  var maxChildLength = 0;
  var longestGroupElt = this.$groups[0];
  var groupElt;
  for (var i = 0; i < this.$groups.length; ++i) {
    groupElt = this.$groups[i];
    if (groupElt.$items.length > maxChildLength) {
      longestGroupElt = groupElt;
      maxChildLength = groupElt.$items.length;
    }
  }
  var style = getComputedStyle(groupElt.$itemCtn);
  var width = parseFloat(style.width.replace('px', ''));
  if (width < 10) return;
  var paddingLeft = parseFloat(style.paddingLeft.replace('px', ''));
  var paddingRight = parseFloat(style.paddingRight.replace('px', ''));
  var rowLength = Math.max(1, Math.floor((width - paddingLeft - paddingRight) / 150));
  var itemWidth = Math.floor((width - paddingLeft - paddingRight) / rowLength) - 1;
  this.addStyle('--item-width', itemWidth + 'px');
};
MSpringboardMenu.property = {};
MSpringboardMenu.property.groups = {
  /**
   * @this MSpringboardMenu
   * @param groups
   */
  set: function set(groups) {
    var _this3 = this;
    if (!(groups instanceof Array)) groups = [];
    this.$groups.forEach(function (elt) {
      return elt.selfRemove();
    });
    this.$groups = groups.map(function (group) {
      var hidden = group.hidden || !group.items || group.items.length === 0 || group.items.every(function (it) {
        return it.hidden;
      });
      var elt = (0, _ACore._)({
        tag: MExploreGroup,
        props: {
          data: group,
          name: group.name,
          items: group.items || [],
          hidden: hidden
        },
        on: {
          press: function press(event) {
            _this3.emit('press', Object.assign({
              groupElt: elt,
              groupData: group
            }, event), _this3);
          }
        }
      });
      return elt;
    });
    this.addChild(this.$groups);
    this.updateSize();
  },
  get: function get() {
    return this.$groups.map(function (gr) {
      return gr.data;
    });
  }
};
_ACore["default"].install(MSpringboardMenu);

/**
 *
 * @param {MSpringboardMenu}  elt
 * @constructor
 */
function MSMKeyboardController(elt) {
  this.elt = elt;
  if (!_BrowserDetector["default"].isMobile) this.elt.on('keydown', this.ev_keydown.bind(this));
  this.itemsMatrix = [];
}
MSMKeyboardController.prototype.canLowPriorityFocus = function () {
  var elt = document.activeElement;
  if (!elt || elt === document.body || elt === this.elt) {
    return true;
  }
  if (elt.hasClass && elt.hasClass('am-explore-item-block') && elt.isDescendantOf(this.elt)) return false;
  var style;
  while (elt && elt !== document.body && elt !== this.elt) {
    style = getComputedStyle(elt);
    if (style.display === 'none' || style.visibility === 'hidden' || style.opacity === '0') {
      return true;
    }
    elt = elt.parentElement;
  }
  return false;
};
MSMKeyboardController.prototype.lowPriorityFocus = function () {
  if (!this.canLowPriorityFocus()) return;
  this.elt.focus();
  // var firstItem = null;
  // for (var i = 0; i < this.elt.$groups.length; ++i) {
  //     var group = this.elt.$groups[i];
  //     if (group.$items.length > 0) {
  //         firstItem = group.$items[0];
  //         break;
  //     }
  // }
  // if (firstItem) {
  //     firstItem.focus();
  // }
};

MSMKeyboardController.prototype.calcItemsMatrix = function () {
  var arr = [];
  var group;
  var item;
  for (var i = 0; i < this.elt.$groups.length; ++i) {
    group = this.elt.$groups[i];
    for (var j = 0; j < group.$items.length; ++j) {
      item = group.$items[j];
      if (item.hidden) continue;
      arr.push(item);
    }
  }
  arr = arr.map(function (item) {
    var rect = item.getBoundingClientRect();
    return {
      item: item,
      ii: Math.round(rect.top / 30),
      jj: Math.round(rect.left / 30)
    };
  });
  var rows = arr.reduce(function (ac, it) {
    ac[it.ii] = ac[it.ii] || [];
    ac[it.ii].push(it);
    return ac;
  }, {});
  rows = Object.values(rows);
  rows.sort(function (a, b) {
    return a[0].ii - b[0].ii;
  });
  rows.forEach(function (row) {
    row.sort(function (a, b) {
      return a.jj - b.jj;
    });
  });
  this.itemsMatrix = rows.map(function (row) {
    return row.map(function (it) {
      return it.item;
    });
  });
  return rows;
};
MSMKeyboardController.prototype.findItemsStartsWith = function (prefix) {
  prefix = prefix.toLowerCase();
  var res = [];
  var group;
  var item;
  for (var i = 0; i < this.elt.$groups.length; ++i) {
    group = this.elt.$groups[i];
    for (var j = 0; j < group.$items.length; ++j) {
      item = group.$items[j];
      if (item.hidden) continue;
      if ((0, _stringFormat.nonAccentVietnamese)(item.name.toLowerCase()).startsWith(prefix)) {
        res.push(item);
      }
    }
  }
  return res;
};

/**
 *
 * @param  elt
 */
MSMKeyboardController.prototype.positionOf = function (elt) {
  if (!elt) return null;
  if (elt.hidden) return null;
  var row;
  var item;
  for (var i = 0; i < this.itemsMatrix.length; ++i) {
    row = this.itemsMatrix[i];
    for (var j = 0; j < row.length; ++j) {
      item = row[j];
      if (item === elt) {
        return [i, j];
      }
    }
  }
  return null;
};
MSMKeyboardController.prototype.ev_keydown = function (event) {
  if (event.target.tagName === 'INPUT' || event.target.tagName === 'TEXTAREA') return;
  var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
  var focusElt = document.activeElement;
  if (!focusElt || !focusElt.hasClass) focusElt = null;
  if (focusElt && !focusElt.hasClass('am-explore-item-block')) focusElt = null;
  if (focusElt && focusElt.hidden) focusElt = null;
  if (focusElt && !focusElt.isDescendantOf(this.elt)) focusElt = null;
  var focusIdx;
  var itemEltArr;
  var itemPos;
  if (key.length === 1) {
    itemEltArr = this.findItemsStartsWith(key);
    focusIdx = itemEltArr.indexOf(focusElt);
    if (itemEltArr.length > 0) {
      itemEltArr[(focusIdx + 1) % itemEltArr.length].focus();
    }
  } else if (['arrowdown', 'arrowup', 'arrowleft', 'arrowright'].indexOf(key) >= 0) {
    event.preventDefault();
    this.calcItemsMatrix();
    itemPos = this.positionOf(focusElt);
    switch (key) {
      case 'arrowdown':
        itemPos = itemPos || [-1, 0];
        if (itemPos[0] < this.itemsMatrix.length - 1) {
          itemPos[0]++;
          itemPos[1] = Math.min(itemPos[1], this.itemsMatrix[itemPos[0]].length - 1);
        }
        break;
      case 'arrowup':
        itemPos = itemPos || [1, 0];
        if (itemPos[0] > 0) {
          itemPos[0]--;
          itemPos[1] = Math.min(itemPos[1], this.itemsMatrix[itemPos[0]].length - 1);
        }
        break;
      case 'arrowleft':
        itemPos = itemPos || [0, 1];
        if (itemPos[1] > 0) {
          itemPos[1]--;
        } else if (itemPos[0] > 0) {
          itemPos[0]--;
          itemPos[1] = this.itemsMatrix[itemPos[0]].length - 1;
        }
        break;
      case 'arrowright':
        itemPos = itemPos || [0, -1];
        if (itemPos[1] < this.itemsMatrix[itemPos[0]].length - 1) {
          itemPos[1]++;
        } else if (itemPos[0] < this.itemsMatrix.length - 1) {
          itemPos[0]++;
          itemPos[1] = 0;
        }
        break;
    }
    focusElt = this.itemsMatrix[itemPos[0]] && this.itemsMatrix[itemPos[0]][itemPos[1]];
    if (focusElt) focusElt.focus();
  } else if (key === 'enter') {
    event.preventDefault();
    if (focusElt) focusElt.click();
  }
};

/**
 * @extends Context
 * @param {MSpringboardMenu} elt
 * @constructor
 */
function MSMSearchingPlugin(elt) {
  _Context["default"].call(this);
  this.elt = elt;
  this._data = null;
  _OOP["default"].drillProperty(this.elt, this, 'searching', 'data');
  this.ev_inputStopTyping = this.ev_inputStopTyping.bind(this);
  /**
   * @type {SearchTextInput|null}
   */
  this.$input = null;
  this.itemHolders = [];
  this.$seachGroups = [];
}
(0, _OOP.mixClass)(MSMSearchingPlugin, _Context["default"]);
MSMSearchingPlugin.prototype.onStart = function () {
  this.$input = this._data && this._data.input;
  if (!this.$input) {
    this.$input = (0, _ACore._)({
      tag: _Searcher["default"]
    });
    this.elt.addChildBefore(this.$input, this.elt.firstChild);
  }
  this.$input.on('stoptyping', this.ev_inputStopTyping);
  this.calcItemHoldersFromItems();
};
MSMSearchingPlugin.prototype.calcItemHoldersFromItems = function () {
  var _this4 = this;
  // var holders = [];
  var count = 0;
  var virtualGroups = [];
  var visit = function visit(item, parent) {
    if (item.hidden) return;
    count++;
    var holder = _this4.makeHolder(item);
    holder.path = parent.path.concat([parent.item.name]);
    holder.count = count;
    if (holder.type === 'group') {
      virtualGroups.push(holder);
    } else {
      parent.children = parent.children || [];
      parent.children.push(holder);
    }
    if (item.items && item.items.length > 0) {
      if (holder.type !== 'group') {
        holder = Object.assign({}, holder, {
          type: 'group',
          children: []
        });
        virtualGroups.push(holder);
      }
      item.items.forEach(function (child) {
        return visit(child, holder);
      });
    }
  };
  var rootHolder = Object.assign({}, this.makeHolder({
    name: 'root'
  }), {
    children: [],
    path: [],
    type: 'group'
  });
  virtualGroups.push(rootHolder);
  this._data.items.forEach(function (item) {
    return visit(item, rootHolder);
  });
  virtualGroups = virtualGroups.filter(function (it) {
    return it.children && it.children.length > 0;
  });
  this.itemHolders = virtualGroups;
};
MSMSearchingPlugin.prototype.onResume = function () {
  this.elt.addClass('as-searching');
  //view search
};

MSMSearchingPlugin.prototype.onPause = function () {
  this.elt.removeClass('as-searching');
  //view origin
};

MSMSearchingPlugin.prototype.onStop = function () {
  this.$input.on('stopchange', this.ev_inputStopTyping);
  if (this.$input.isDescendantOf(this.elt)) {
    this.$input.remove();
  }

  //turn off event
};

MSMSearchingPlugin.prototype.makeHolder = function (item) {
  var spliter = /[\s,-\.+?\_]+/;
  var notEmp = function notEmp(e) {
    return e.length > 0;
  };
  var res = {
    item: item,
    text: item.name || item.searchName || '',
    hidden: !!item.hidden,
    type: item.type
  };
  if (item.hidden) return res;
  res.text = res.text.toLowerCase();
  res.words = res.text.split(spliter).filter(notEmp);
  res.text = res.words.join(' ');
  res.nacWords = res.words.map(function (txt) {
    return (0, _stringFormat.nonAccentVietnamese)(txt);
  });
  res.nacText = res.nacWords.join(' ');
  res.wordDict = res.words.reduce(function (ac, cr) {
    ac[cr] = true;
    return ac;
  }, {});
  res.nacWordDict = res.nacWords.reduce(function (ac, cr) {
    ac[cr] = true;
    return ac;
  }, {});
  return res;
};
MSMSearchingPlugin.prototype.calcScore = function (queryHolder, itemHolder) {
  var score = 0;
  var mustIncluded = false;
  if (itemHolder.nacText.indexOf(queryHolder.nacText) >= 0) mustIncluded = true;
  if (itemHolder.text.indexOf(queryHolder.text) >= 0) mustIncluded = true;
  score += (0, _stringMatching.wordsMatch)(queryHolder.words, itemHolder.words) / ((0, _int.harmonicMean)(queryHolder.words.length, itemHolder.words.length) || 1);
  score += (0, _stringMatching.wordsMatch)(queryHolder.nacWords, itemHolder.nacWords) / ((0, _int.harmonicMean)(queryHolder.nacWords.length, itemHolder.nacWords.length) || 1);
  var dict = Object.keys(itemHolder.nacWordDict);
  Object.keys(queryHolder.nacWordDict).forEach(function (qWord) {
    var bestWordScore = 0;
    var bestWord = '';
    var word;
    for (word in dict) {
      if ((0, _stringMatching.wordLike)(qWord, word) > bestWordScore) {
        bestWordScore = (0, _stringMatching.wordLike)(qWord, word);
        bestWord = word;
      }
    }
    if (bestWordScore > 0) {
      score += bestWordScore / ((0, _int.harmonicMean)(qWord.length, bestWord.length) || 1);
      delete dict[bestWord];
    }
  });
  return {
    score: score,
    mustIncluded: mustIncluded
  };
};
MSMSearchingPlugin.prototype.ev_inputStopTyping = function () {
  var query = this.$input.value;
  this.query(query);
};
MSMSearchingPlugin.prototype.query = function (query) {
  var _this5 = this;
  query = query || '';
  query = query.trim();
  if (query && query.length > 0 && this.state !== 'RUNNING') {
    this.start();
  } else if (!query || query.length === 0) {
    this.pause();
    return;
  }
  var scoreList = [];
  var queryHolder = this.makeHolder({
    name: query
  }, -1);
  var visit2calcScore = function visit2calcScore(holder) {
    var res = Object.assign({
      item: holder.item,
      type: holder.type,
      path: holder.path
    }, _this5.calcScore(queryHolder, holder));
    scoreList.push(res.score);
    if (holder.children) {
      res.children = holder.children.map(visit2calcScore);
      res.childrenScore = res.children.reduce(function (ac, cr) {
        return Math.max(ac, cr.score, cr.childrenScore || 0);
      }, 0);
      res.treeScore = Math.max(res.score, res.childrenScore || 0);
    }
    return res;
  };
  var itemsHolders = this.itemHolders.map(visit2calcScore);
  scoreList.push(0);
  scoreList.sort(function (a, b) {
    return b - a;
  });
  var maxScore = scoreList[0] || 0;
  var midScore;
  if (maxScore < 1) {
    midScore = Math.max(maxScore - 0.2, 0.1);
    midScore = Math.max(midScore, scoreList[Math.floor(scoreList.length * 0.2 * maxScore)] - 0.01);
  } else {
    midScore = maxScore * 0.6;
    midScore = Math.max(midScore, scoreList[Math.floor(scoreList.length * 0.3)] - 0.1);
  }
  var visit2filter = function visit2filter(holder) {
    var score = holder.score;
    var childrenScore = holder.childrenScore || 0;
    if (holder.mustIncluded) return true;
    if (score >= midScore && childrenScore <= score) return true;
    if (holder.children) {
      holder.children = holder.children.filter(visit2filter);
      return holder.children.length > 0;
    }
    return false;
  };
  itemsHolders = itemsHolders.filter(visit2filter);
  itemsHolders.forEach(function (holder) {
    if (holder.children) holder.children.sort(function (a, b) {
      return b.treeScore - a.treeScore;
    });
  });
  itemsHolders.sort(function (a, b) {
    return b.treeScore - a.treeScore;
  });
  this.$seachGroups.forEach(function (elt) {
    return elt.remove();
  });
  this.$seachGroups = itemsHolders.map(function (holder) {
    var elt = (0, _ACore._)({
      tag: MExploreGroup,
      "class": 'as-search-result',
      props: {},
      on: {
        press: function press(event) {
          _this5.elt.emit('press', Object.assign({
            groupElt: elt,
            groupData: holder.item
          }, event), _this5.elt);
        }
      }
    });
    if (window.ABSOL_DEBUG) {
      elt.attr('title', 'score: ' + holder.score + ', childrenScore: ' + holder.childrenScore);
    }
    if (holder.item.name === 'root') {
      elt.name = '/';
    } else {
      elt.name = holder.path.slice(1).concat(holder.item.name).join(' / ');
    }
    if (holder.children) {
      elt.items = holder.children.map(function (child) {
        return Object.assign({
          score: child.score
        }, child.item);
      });
    }
    return elt;
  });
  this.elt.addChild(this.$seachGroups);
};
Object.defineProperty(MSMSearchingPlugin.prototype, 'data', {
  get: function get() {
    return this._data;
  },
  set: function set(value) {
    this.stop();
    value = value || null;
    if (value && !value.items) value = null;
    if (value && !value.items.length) value = null;
    this._data = value;
    if (value) this.start(true);
  }
});

/***/ }),

/***/ 23277:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(82287);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _utils = __webpack_require__(84512);
var _DynamicCSS = _interopRequireDefault(__webpack_require__(30401));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @exatends AElement
 * @constructor
 */
function MHeaderBar() {
  var _this = this;
  this._title = null;
  this._titleDesc = null;
  this._actionIcon = null;
  this._commands = [];
  this._quickmenuHolder = null;
  this._quickmenu = null;
  this.$right = (0, _ACore.$)('.am-header-bar-right', this);
  this.$leftBtn = null;
  this.$titleCtn = null;
  this.$title = null;
  this.$titleDesc = null;
  this.$notificationActionBtn = (0, _ACore.$)(".as-header-bar-notification-action", this).on('click', function (event) {
    MHeaderBar.emit('clicknotification', {
      type: 'clicknotification',
      target: _this
    }, _this);
  });
  this.$commands = [];
}
MHeaderBar.tag = 'MHeaderBar'.toLowerCase();
MHeaderBar.render = function () {
  return (0, _ACore._)({
    extendEvent: ['action', 'command'],
    "class": 'am-header-bar',
    child: [{
      "class": 'am-header-bar-right',
      child: [{
        tag: 'button',
        "class": ['am-header-bar-command', 'as-header-bar-notification-action'],
        child: ['span.mdi.mdi-bell', '.as-header-bar-notification-action-count']
      }]
    }]
  });
};
MHeaderBar.prototype.notifyAction = function () {
  this.emit('action', {
    type: 'action',
    target: this
  }, this);
};
MHeaderBar.prototype.notifyCommand = function (commandItem) {
  this.emit('command', {
    type: 'command',
    target: this,
    commandName: commandItem.name,
    commandItem: commandItem
  }, this);
};
MHeaderBar.prototype.showTitle = function (flag) {
  if (!this.$titleCtn && flag) {
    this.$titleCtn = (0, _ACore._)({
      "class": 'am-header-bar-title-ctn',
      child: [{
        "class": 'am-header-bar-no-size-wrapper',
        child: {
          "class": 'am-header-bar-title-wrapper',
          child: [{
            "class": 'am-header-bar-title'
          }, {
            "class": 'am-header-bar-title-desc'
          }]
        }
      }]
    });
    this.$title = (0, _ACore.$)('.am-header-bar-title', this.$titleCtn);
    this.$titleDesc = (0, _ACore.$)('.am-header-bar-title-desc', this.$titleCtn);
  }
  if (flag) {
    this.insertBefore(this.$titleCtn, this.$right);
  } else {
    if (this.$titleCtn) this.$titleCtn.remove();
  }
};
MHeaderBar.prototype.showActionBtn = function (flag) {
  if (!this.$leftBtn && flag) {
    this.$leftBtn = (0, _ACore._)({
      tag: 'button',
      "class": 'am-header-bar-left-btn',
      child: 'span.mdi.mdi-chevron-left',
      on: {
        click: this.notifyAction.bind(this)
      }
    });
  }
  if (flag) {
    this.insertBefore(this.$leftBtn, this.firstChild);
  } else {
    if (this.$leftBtn) this.$leftBtn.remove();
  }
};
MHeaderBar.prototype.showQuickMenu = function (flag) {
  if (!this.$quickmenuBtn && flag) {
    this.$quickmenuBtn = (0, _ACore._)({
      tag: 'button',
      "class": ['am-header-bar-action', 'am-header-bar-quickmenu-btn'],
      child: {
        "class": 'am-header-bar-quickmenu-btn-circle',
        child: ['span.mdi.mdi-dots-horizontal-circle-outline', 'span.mdi.mdi-dots-horizontal-circle']
      }
    });
  }
  if (flag) {
    this.$right.addChildBefore(this.$quickmenuBtn, this.$notificationActionBtn);
  } else {
    if (this.$quickmenuBtn) this.$quickmenuBtn.remove();
  }
};
MHeaderBar.prototype._makeCommandBtn = function (item) {
  return (0, _ACore._)({
    tag: 'button',
    "class": 'am-header-bar-command',
    child: item.icon || [],
    on: {
      click: this.notifyCommand.bind(this, item)
    }
  });
};
MHeaderBar.property = {};

/**
 * @type {MHeaderBar}
 */
MHeaderBar.property.quickmenu = {
  set: function set(value) {
    if (this._quickmenuHolder) {
      this._quickmenuHolder.remove();
      this._quickmenu = null;
    }
    if (value) {
      this.showQuickMenu(true);
      var button = this.$quickmenuBtn;
      var onClose = value.onClose;
      var onOpen = value.onOpen;
      value.onOpen = function () {
        button.addClass('am-status-active');
        onOpen && onOpen.apply(this, arguments);
      };
      value.onClose = function () {
        button.removeClass('am-status-active');
        onClose && onClose.apply(this, arguments);
      };
      if (!value.getAnchor) {
        value.getAnchor = function () {
          return [2];
        };
      }
      if (!value.getMenuProps && value.props) {
        value.getMenuProps = function () {
          var res = Object.assign({}, value.props);
          if (typeof res.items === "function") {
            res.items = res.items();
          }
          return res;
        };
      }
      this._quickmenuHolder = _QuickMenu["default"].toggleWhenClick(this.$quickmenuBtn, value);
    } else {
      this.showQuickMenu(false);
      value = null;
    }
    this._quickmenu = value;
  },
  get: function get() {
    return this._quickmenu;
  }
};

/**
 * @type {MHeaderBar}
 */
MHeaderBar.property.title = {
  set: function set(value) {
    if (value) {
      this.showTitle(true);
      if (typeof value === 'string') {
        this.$title.innerHTML = value;
      } else {
        this.$title.clearChild().addChild((0, _ACore._)(value));
      }
    } else {
      this.showTitle(false);
      value = null;
    }
    this._title = value;
  },
  get: function get() {
    return this._title;
  }
};

/**
 * @type {MHeaderBar}
 */
MHeaderBar.property.titleDesc = {
  set: function set(value) {
    if (value) {
      value = value + '';
      this.showTitle(true);
      this.$titleDesc.clearChild().addChild((0, _ACore._)({
        text: value
      }));
    } else {
      this.showTitle(false);
      if (this.$titleDesc) this.$titleDesc.clearChild();
      value = null;
    }
    this._titleDesc = value;
  },
  get: function get() {
    return this._titleDesc;
  }
};

/**
 * @type {MHeaderBar}
 */
MHeaderBar.property.actionIcon = {
  set: function set(value) {
    if (value) {
      this.showActionBtn(true);
      this.$leftBtn.clearChild().addChild((0, _ACore._)(value));
    } else {
      this.showActionBtn(false);
      value = null;
    }
    this._actionIcon = value;
  },
  get: function get() {
    return this._actionIcon;
  }
};

/**
 * @type {MHeaderBar}
 */
MHeaderBar.property.commands = {
  set: function set(value) {
    this.$commands.forEach(function (e) {
      e.selftRemove();
    });
    this.$commands = [];
    var commandBtn;
    var i;
    if (value) {
      var firstChild = this.$right.firstChild;
      if (firstChild) {
        for (i = 0; i < value.length; ++i) {
          commandBtn = this._makeCommandBtn(value[i]);
          this.$right.addChildBefore(commandBtn, firstChild);
        }
      } else {
        for (i = 0; i < value.length; ++i) {
          commandBtn = this._makeCommandBtn(value[i]);
          this.$right.addChild(commandBtn);
        }
      }
    } else {
      this._commands = [];
    }
    this._commands = value;
  },
  get: function get() {
    return this._commands;
  }
};
_ACore["default"].install(MHeaderBar);
var _default = MHeaderBar;
exports["default"] = _default;
var notyEmitter = new _EventEmitter["default"]();
MHeaderBar.on = notyEmitter.on.bind(notyEmitter);
MHeaderBar.once = notyEmitter.once.bind(notyEmitter);
MHeaderBar.off = notyEmitter.off.bind(notyEmitter);
MHeaderBar.emit = notyEmitter.emit.bind(notyEmitter);
var notificationCount = 0;
/**
 *
 * @type {null|DynamicCSS}
 */
var ncCSS = null;
function updateNotificationCountText() {
  if (!ncCSS) ncCSS = new _DynamicCSS["default"]();
  console.log("notificationCount", notificationCount);
  ncCSS.setRule("button .as-header-bar-notification-action-count::before", {
    display: notificationCount > 0 ? 'block' : 'none',
    content: "\"".concat(notificationCount > 9 ? "+9" : notificationCount, "\"")
  }).commit();
}
Object.defineProperty(MHeaderBar, 'notificationCount', {
  set: function set(value) {
    value = Math.round(value);
    if (!(0, _utils.isNaturalNumber)(value)) value = 0;
    notificationCount = value;
    updateNotificationCountText();
  },
  get: function get() {
    return notificationCount;
  }
});

/***/ }),

/***/ 30058:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.makeItem = makeItem;
exports.measureListSize = measureListSize;
exports.releaseItem = releaseItem;
exports.requireItem = requireItem;
var _SelectList = __webpack_require__(884);
var _MChecklistItem = _interopRequireDefault(__webpack_require__(52242));
var _CheckListBox = __webpack_require__(62896);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _MListModal = _interopRequireDefault(__webpack_require__(11032));
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _utils = __webpack_require__(84512);
var _DelaySignal = _interopRequireDefault(__webpack_require__(81809));
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _TextMeasure = _interopRequireDefault(__webpack_require__(60268));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _MSelectTreeMenu = __webpack_require__(3770);
var _stringGenerate = __webpack_require__(10713);
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _search = __webpack_require__(67858);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function measureListSize(items) {
  var descWidth = (0, _SelectList.measureMaxDescriptionWidth)(items);
  var textWidth = (0, _SelectList.measureMaxTextWidth)(items);
  var width = descWidth + 20 + textWidth + 12 + 15 + 18; //padding, margin
  return {
    width: width,
    descWidth: descWidth,
    textWidth: textWidth
  };
}
var itemPool = [];
function onClickItem(event) {
  var thisSL = this.$parent;
  if (thisSL) {
    thisSL.eventHandler.selectItem(this, event);
  }
}

/**
 * @returns {MSelectListItem}
 */
function makeItem() {
  return (0, _ACore._)({
    tag: _MChecklistItem["default"],
    on: {
      select: onClickItem
    }
  });
}
function requireItem($parent) {
  var item;
  if (itemPool.length > 0) {
    item = itemPool.pop();
  } else {
    item = makeItem();
  }
  item.$parent = $parent;
  return item;
}
function releaseItem(item) {
  item.$parent = null;
  item.attr('class', 'am-selectlist-item');
  item.selected = false;
  itemPool.push(item);
}

/***
 * @extends MListModal
 * @constructor
 */
function MCheckListModal() {
  this.itemHolderByValue = {};
  this.itemHolders = [];
  this.domSignal = new _DelaySignal["default"]();
  this.$checkAll = (0, _ACore.$)('.as-select-list-box-check-all', this);
  this.$attachhook = (0, _ACore._)('attachhook').addTo(this);
  this.$box = (0, _ACore.$)('.am-list-popup-box', this);
  this.$scroller = (0, _ACore.$)('.am-check-list-scroller', this);
  this.pagingCtrl = new MCLPagingController(this);
  this.actionCtrl = new MCLActionController(this);
  this.searchCtrl = new MCLSearchController(this);
  this.screenSize = (0, _Dom.getScreenSize)();
  this.widthLimit = this.screenSize.width - 20;
  this._values = [];
  this._valueDict = {};
  this.layoutCtrl = new MCLLayoutController(this);
  /**
   * @type {boolean}
   * @name selectedAll
   * @memberOf MCheckListModal#
   * @readonly
   */

  /**
   * @type {[]}
   * @name values
   * @memberOf MCheckListModal#
   */

  /**
   * @type {[]}
   * @name items
   * @memberOf MCheckListModal#
   */
}

MCheckListModal.tag = 'MChecklistModal'.toLowerCase();
Object.assign(MCheckListModal.prototype, _MListModal["default"].prototype);
MCheckListModal.property = Object.assign({}, _MListModal["default"].property);
MCheckListModal.eventHandler = Object.assign({}, _MListModal["default"].eventHandler);
delete MCheckListModal.property.orderly;
MCheckListModal.render = function () {
  return (0, _ACore._)({
    extendEvent: ['change', 'close', 'cancel'],
    "class": ['am-list-modal', 'am-check-list-modal'],
    child: [{
      "class": ['am-list-popup-box'],
      child: [{
        "class": 'am-list-popup-header',
        child: [{
          tag: 'searchtextinput'
        }, {
          tag: 'button',
          "class": 'am-list-popup-close-btn',
          child: 'span.mdi.mdi-close'
        }]
      }, {
        "class": 'am-check-list-scroller',
        child: {
          "class": 'am-list-popup-content'
        }
      }, {
        "class": 'as-dropdown-box-footer',
        child: [{
          tag: 'checkbox',
          "class": 'as-select-list-box-check-all',
          props: {
            checked: false,
            text: 'Check All'
          }
        }, {
          "class": 'as-dropdown-box-footer-right',
          child: {
            tag: 'a',
            "class": 'as-select-list-box-cancel-btn',
            child: {
              text: 'Cancel'
            }
          }
        }]
      }]
    }]
  });
};
MCheckListModal.prototype.addTo = function (parent) {
  _AElement["default"].prototype.addTo.apply(this, arguments);
  this.pagingCtrl.viewListAt(0);
};

/**
 * wrong function name
 * @deprecated
 * @param value
 * @returns {*|null}
 */
MCheckListModal.prototype.findItemsByValue = function (value) {
  var holder = this.itemHolderByValue[(0, _utils.keyStringOf)(value)];
  if (holder) return holder.data;
  return null;
};
MCheckListModal.prototype.findItemByValue = function (value) {
  var holder = this.itemHolderByValue[(0, _utils.keyStringOf)(value)];
  if (holder) return holder.data;
  return null;
};
MCheckListModal.prototype.refollow = _noop["default"];
MCheckListModal.prototype.updatePosition = _noop["default"];
MCheckListModal.prototype.resetSearchState = function () {
  this.searchCtrl.resetSearchState();
};

/**
 *
 * @param value
 * @returns {null|[*]}
 */
MCheckListModal.prototype.findItemHoldersByValue = function (value) {
  var holder = this.itemHolderByValue[(0, _utils.keyStringOf)(value)];
  if (holder) return [holder];
  return null;
};
MCheckListModal.prototype.viewListAtValue = function (value) {
  this.pagingCtrl.viewListAtValue(value);
};
MCheckListModal.prototype.viewListAtFirstSelected = function () {
  var value = this.values[0];
  var holder = this.itemHolderByValue[(0, _utils.keyStringOf)(value)];
  if (!holder) return;
  var idx = holder.idx;
  this.pagingCtrl.viewListAt(idx);
};
MCheckListModal.property.values = {
  set: function set(values) {
    var _this = this;
    values = values || [];
    if (!Array.isArray(values)) {
      values = [];
    }
    this._values = values.slice();
    this._valueDict = this._values.reduce(function (ac, cr) {
      ac[(0, _utils.keyStringOf)(cr)] = cr;
      return ac;
    }, {});
    this.itemHolders.forEach(function (holder) {
      holder.selected = holder.valueKey in _this._valueDict;
      holder.updateView();
    });
    this.$checkAll.checked = this.selectedAll;
  },
  get: function get() {
    var _this2 = this;
    var valueHolders = this._values.map(function (value) {
      var holder = _this2.itemHolderByValue[(0, _utils.keyStringOf)(value)];
      return holder ? {
        value: value,
        idx: holder.idx
      } : null;
    }).filter(function (x) {
      return !!x;
    });
    valueHolders.sort(function (a, b) {
      return a.idx - b.idx;
    });
    return valueHolders.map(function (x) {
      return x.value;
    });
  }
};
MCheckListModal.property.items = {
  /**
   * @this {MCheckListModal}
   * @param items
   */
  set: function set(items) {
    var _this3 = this;
    items = items || [];
    if (!Array.isArray(items)) items = [];
    items = (0, _utils.copySelectionItemArray)(items, {
      removeNoView: true,
      removeNewLine: true
    });
    this._items = items;
    this.itemHolders = this._items.map(function (it) {
      return new MCLHolder(_this3, it, null);
    });
    this.itemHolderByValue = this.itemHolders.reduce(function (ac, cr) {
      return cr.toDictionary(ac);
    }, {});
    //update idx
    var idx = 0;
    var visit = function visit(nd) {
      nd.idx = idx++;
      if (nd.children && nd.children.length) {
        nd.children.forEach(visit);
      }
    };
    this.itemHolders.forEach(visit);
    this.layoutCtrl.calcSize();
    this.pagingCtrl.viewArr(this.itemHolders);
    this.$checkAll.checked = this.selectedAll;
  },
  get: function get() {
    return this._items;
  }
};
MCheckListModal.property.selectedItems = {
  get: function get() {
    var _this4 = this;
    var holders = this._values.map(function (value) {
      return _this4.itemHolderByValue[(0, _utils.keyStringOf)(value)];
    }).filter(function (x) {
      return !!x;
    });
    holders.sort(function (a, b) {
      return a.idx - b.idx;
    });
    return holders.map(function (it) {
      return it.data;
    });
  }
};
MCheckListModal.property.selectedAll = {
  get: function get() {
    return this.itemHolders.length > 0 && this.itemHolders.every(function visit(holder) {
      var res = holder.selected || holder.data.noSelect;
      if (res && holder.children) {
        res = holder.children.every(visit);
      }
      return res;
    });
  }
};

/**
 * @this {MCheckListModal}
 * @param itemElt
 * @param event
 */
MCheckListModal.eventHandler.selectItem = function (itemElt, event) {
  var selected = itemElt.selected;
  var data = itemElt.data;
  var value = itemElt.value;
  var key = (0, _utils.keyStringOf)(value);
  var holder = this.itemHolderByValue[key];
  if (holder) {
    holder.selected = selected;
  }
  var idx;
  if (selected) {
    this._valueDict[key] = true;
    this._values.push(value);
    this.$checkAll.checked = this.selectedAll;
  } else {
    delete this._valueDict[key];
    idx = this._values.indexOf(value);
    if (idx >= 0) this._values.splice(idx, 1);
    this.$checkAll.checked = false;
  }
  this.emit('change', {
    type: 'change',
    target: this,
    itemElt: this,
    value: value,
    data: data,
    itemData: data,
    action: selected ? "check" : "uncheck",
    originalEvent: event.originalEvent || event.originEvent || event
  });
};
MCheckListModal.eventHandler.checkAllChange = _CheckListBox.CheckListBox.eventHandler.checkAllChange;
MCheckListModal.eventHandler.clickCancelBtn = _CheckListBox.CheckListBox.eventHandler.clickCancelBtn;
_ACore["default"].install(MCheckListModal);
var _default = MCheckListModal;
/**
 *
 * @param {MCheckListModal} boxElt
 * @constructor
 */
exports["default"] = _default;
function MCLLayoutController(boxElt) {
  this.boxElt = boxElt;
}
MCLLayoutController.prototype.calcSize = function () {
  var holders = this.boxElt.itemHolders;
  var screenSize = this.boxElt.screenSize;
  var maxAvailableWidth = Math.max(0, screenSize.width - 20);
  var col1maxWidth = 0;
  var col2maxWidth = 0;
  var visit = function visit(nd) {
    if (nd.computedSize.col1maxWidth > col1maxWidth) {
      col1maxWidth = nd.computedSize.col1maxWidth;
    }
    if (nd.computedSize.col2maxWidth > col2maxWidth) {
      col2maxWidth = nd.computedSize.col2maxWidth;
    }
    if (nd.children && nd.children.length) {
      nd.children.forEach(visit);
    }
  };
  holders.forEach(visit);
  var col1Width = col1maxWidth;
  var col2Width = col2maxWidth;
  if (col1maxWidth + col2maxWidth > maxAvailableWidth) {
    col1Width = col1maxWidth / (col1maxWidth + col2maxWidth || 1) * maxAvailableWidth;
    col2Width = Math.max(maxAvailableWidth - col1Width, 0);
  }
  var visit2 = function visit2(nd) {
    nd.applyViewWidth(col1Width, col2Width);
    if (nd.children && nd.children.length) {
      nd.children.forEach(visit2);
    }
  };
  holders.forEach(visit2);
  this.boxElt.addStyle('--col1-width', col1Width + 'px');
  this.boxElt.addStyle('--col2-width', col2Width + 'px');
};

/**
 * @extends CLHolder
 * @param {MCheckListModal} boxElt
 * @param data
 * @param parent
 * @constructor
 */
function MCLHolder(boxElt, data, parent) {
  var _this5 = this;
  this.idx = 0;
  this.id = (0, _stringGenerate.randomIdent)(8);
  this.parent = parent;
  this.level = parent ? parent.level + 1 : 0;
  this.boxElt = boxElt;
  this.data = data;
  (0, _OOP.drillProperty)(this, this, 'item', 'data'); //adapt mobile and desktop
  this.valueKey = (0, _utils.keyStringOf)(data.value);
  this.itemKey = (0, _CheckListBox.keyStringOfItem)(data);
  this.itemElt = null;
  this.children = null;
  this.selected = this.valueKey in boxElt._valueDict;
  var Clazz = this.constructor;
  if (data.items && data.items.length > 0) {
    this.children = data.items.map(function (it) {
      return new Clazz(boxElt, it, _this5);
    });
  }
  this.computedSize = {
    textWidth: 0,
    descWidth: 0,
    width: 0,
    height: 0,
    col1maxWidth: 0,
    col2maxWidth: 0,
    col1Width: 0,
    col2width: 0,
    availableTextWidth: 0,
    availableDescWidth: 0,
    levelWidth: 0
  };
  this.calcInitSize();
  this.wrappedText = [this.data.text];
  this.wrappedDesc = [this.data.desc];
}
(0, _OOP.mixClass)(MCLHolder, _CheckListBox.CLHolder);
MCLHolder.prototype.calcInitSize = function () {
  this.computedSize.textWidth = Math.ceil(_TextMeasure["default"].measureWidth(this.data.text + '', _TextMeasure["default"].FONT_ARIAL, 14));
  this.computedSize.levelWidth = this.level * 12;
  //- 30px  - 21px - 10px
  this.computedSize.col1maxWidth = this.computedSize.textWidth + 30 + this.computedSize.levelWidth + 21 + 10; //todo
  if (this.data.desc) {
    this.computedSize.descWidth = Math.ceil(_TextMeasure["default"].measureWidth((this.data.desc || '') + '', _TextMeasure["default"].FONT_ARIAL, 14));
    this.computedSize.col2maxWidth = this.computedSize.descWidth + 20;
  } else {
    this.computedSize.descWidth = 0;
  }
};
MCLHolder.prototype.applyViewWidth = function (col1Width, col2Width) {
  this.computedSize.col1Width = col1Width;
  this.computedSize.col2Width = col2Width;
  this.computedSize.availableTextWidth = col1Width - 30 - this.computedSize.levelWidth - 21 - 10;
  if (col1Width < this.computedSize.col1maxWidth) {
    //must wrap
    this.wrappedText = _TextMeasure["default"].wrapText(this.data.text + '', _TextMeasure["default"].FONT_ARIAL, 14, this.computedSize.availableTextWidth);
  } else {
    this.wrappedText = [this.data.text];
  }
  if (col2Width && col2Width < this.computedSize.col2maxWidth && this.data.desc) {
    //must wrap
    this.computedSize.availableDescWidth = col2Width - 20;
    this.wrappedDesc = _TextMeasure["default"].wrapText((this.data.desc || '') + '', _TextMeasure["default"].FONT_ARIAL, 14, this.computedSize.availableDescWidth);
  } else {
    this.wrappedDesc = [(this.data.desc || '') + ''];
  }
  this.computedSize.height = 10 + Math.max(this.wrappedText.length, this.wrappedDesc.length, 1) * 20;
  this.computedSize.width = Math.ceil(this.boxElt.screenSize.width - 20);
};
MCLHolder.prototype.toArray = function (ac) {
  ac = ac || [];
  ac.push(this);
  if (this.children) this.children.reduce(function (ac, holder) {
    return holder.toArray(ac);
  }, ac);
  return ac;
};
MCLHolder.prototype.toDictionary = function (ac) {
  ac = ac || {};
  ac[this.valueKey] = this;
  if (this.children) this.children.reduce(function (ac, holder) {
    return holder.toDictionary(ac);
  }, ac);
  return ac;
};
MCLHolder.prototype.detachView = function () {
  if (this.itemElt) {
    this.itemElt.attr('title', null);
    this.itemElt.clHolder = null;
    this.itemElt = null;
  }
};
MCLHolder.prototype.getSearchItem = function () {
  var res = {
    value: this.id
  };
  res.text = this.data.text + '';
  if (this.data.desc) res.text += '/' + this.data.desc;
  if (this.children) res.items = this.children.map(function (c) {
    return c.getSearchItem();
  });
  return res;
};
MCLHolder.prototype.attachView = function (itemElt) {
  if (this.itemElt === itemElt) return;
  if (itemElt.clHolder) itemElt.clHolder.detachView();
  itemElt.clHolder = this;
  this.itemElt = itemElt;
  itemElt.data = this.data;
  itemElt.level = this.level;
  itemElt.selected = this.selected;
  itemElt.$text.firstChild.data = this.wrappedText.join('\n');
  itemElt.$desc.firstChild.data = this.wrappedDesc && this.wrappedDesc.length ? this.wrappedDesc.join('\n') : '';
  itemElt.addStyle('height', this.computedSize.height + 'px');
};
MCLHolder.prototype.updateView = function () {
  if (this.itemElt) {
    this.itemElt.selected = this.selected;
  }
};

/**
 * @extends MCLHolder
 * @param  {MCheckListModal} boxElt
 * @param origin
 * @param parent
 * @param result
 * @constructor
 */
function MCLHolderRef(boxElt, origin, parent, result) {
  var _this6 = this;
  this.boxElt = boxElt;
  this.origin = origin;
  this.data = origin.data;
  this.parent = parent;
  this.level = origin.level;
  this.wrappedText = origin.wrappedText;
  this.wrappedDesc = origin.wrappedDesc;
  _OOP["default"].drillProperty(this, origin, 'selected');
  var Clazz = this.constructor;
  var arr, children;
  if (origin.children) {
    arr = origin.children.filter(function (it) {
      return !!result[it.id];
    });
    arr.sort(function (a, b) {
      return result[a.id] - result[b.id];
    });
    children = arr.map(function (holder) {
      return new Clazz(boxElt, holder, _this6, result);
    });
    if (children.length > 0) this.children = children;
  }
  this.computedSize = origin.computedSize;
}
(0, _OOP.mixClass)(MCLHolderRef, MCLHolder);

/**
 *
 * @param {MCheckListModal} boxElt
 * @constructor
 */
function MCLPagingController(boxElt) {
  this.boxElt = boxElt;
  this.$listScroller = (0, _ACore.$)('.am-check-list-scroller', this.boxElt).on('scroll', this.ev_scroll.bind(this));
  this.$listPages = [];
  this.$content = (0, _ACore.$)('.am-list-popup-content', this.boxElt);
  this.holderArr = [];
  this.offsetTopOfHolders = []; //y of each item
}

MCLPagingController.prototype.preLoadN = 3;
MCLPagingController.prototype.itemPerPage = 100;
MCLPagingController.prototype._requireItem = function (pageElt, n) {
  var itemElt;
  while (pageElt.childNodes.length > n) {
    itemElt = pageElt.lastChild;
    itemElt.selfRemove();
    releaseItem(itemElt);
  }
  while (pageElt.childNodes.length < n) {
    itemElt = requireItem(this.boxElt);
    pageElt.addChild(itemElt);
  }
};
MCLPagingController.prototype.viewArr = function (itemHolders) {
  this.holderArr = itemHolders.reduce(function (ac, holder) {
    return holder.toArray(ac);
  }, []);
  var pageN = Math.ceil(this.holderArr.length / this.itemPerPage);
  while (this.$listPages.length > pageN) {
    this.$listPages.pop().remove();
  }
  var pageElt;
  while (this.$listPages.length < pageN) {
    pageElt = (0, _ACore._)({
      "class": 'am-check-list-page',
      child: []
    }).addTo(this.$content);
    this.$listPages.push(pageElt);
  }
  var itemIdx = 0;
  var k;
  var pageHeights = Array(pageN).fill(0);
  var pageIdx;
  this.offsetTopOfHolders = [0];
  for (pageIdx = 0; pageIdx < pageN; ++pageIdx) {
    pageElt = this.$listPages[pageIdx];
    pageElt.clearChild();
    for (k = 0; k < this.itemPerPage && itemIdx < this.holderArr.length; ++k, ++itemIdx) {
      pageHeights[pageIdx] += this.holderArr[itemIdx].computedSize.height;
      this.offsetTopOfHolders[itemIdx + 1] = this.offsetTopOfHolders[itemIdx] + this.holderArr[itemIdx].computedSize.height;
    }
  }
  for (pageIdx = 0; pageIdx < pageN; ++pageIdx) {
    pageElt = this.$listPages[pageIdx];
    pageElt.addStyle('height', pageHeights[pageIdx] + 'px');
  }
  this.$listScroller.scrollTop = 0;
  this.update();
};
MCLPagingController.prototype.update = function () {
  var now = Date.now();
  //by scrollTop
  var offset = this.$listScroller.scrollTop;
  var low = 0;
  var high = this.offsetTopOfHolders.length - 1;
  var mid;
  while (low < high) {
    mid = Math.floor((low + high) / 2);
    if (this.offsetTopOfHolders[mid] < offset) {
      low = mid + 1;
    } else {
      high = mid;
    }
  }
  var itemPerPage = this.itemPerPage;
  var startPageIdx = Math.max(0, Math.floor(low / this.itemPerPage - 1));
  var endPageIdx = Math.min(this.$listPages.length, startPageIdx + this.preLoadN);
  var pageIdx;
  var pageLength;
  var itemStartIdx, itemEndIdx;
  var itemIdx;
  for (pageIdx = 0; pageIdx < startPageIdx; pageIdx++) {
    this._requireItem(this.$listPages[pageIdx], 0);
  }
  for (pageIdx = endPageIdx; pageIdx < this.$listPages.length; pageIdx++) {
    this._requireItem(this.$listPages[pageIdx], 0);
  }
  for (pageIdx = startPageIdx; pageIdx < endPageIdx; pageIdx++) {
    itemStartIdx = pageIdx * itemPerPage;
    itemEndIdx = Math.min(itemStartIdx + itemPerPage, this.holderArr.length);
    pageLength = itemEndIdx - itemStartIdx;
    this._requireItem(this.$listPages[pageIdx], pageLength);
    for (itemIdx = itemStartIdx; itemIdx < itemEndIdx; itemIdx++) {
      this.holderArr[itemIdx].attachView(this.$listPages[pageIdx].childNodes[itemIdx - itemStartIdx]);
    }
  }
};
MCLPagingController.prototype.viewListAtValue = function (value) {
  var holder = this.boxElt.itemHolderByValue[(0, _utils.keyStringOf)(value)];
  if (!holder) return;
  var idx = holder.idx;
  this.$listScroller.scrollTop = this.offsetTopOfHolders[idx] || 0;
  this.update();
};
MCLPagingController.prototype.viewListAt = function (offset) {
  this.$listScroller.scrollTop = this.offsetTopOfHolders[offset] || 0;
  this.update();
};
MCLPagingController.prototype.ev_scroll = function () {
  this.update();
};
function MCLSearchController(boxElt) {
  this.boxElt = boxElt;
  this.$searchInput = (0, _ACore.$)('searchtextinput', boxElt).on('stoptyping', this.ev_searchModify.bind(this));
  this.cache = {};
  this.searchItems = null;
  this.holderDict = null;
  this.session = Math.floor(Math.random() * 1000000);
}
MCLSearchController.prototype.reset = function () {
  this.cache = {};
  this.searchItems = null;
  this.holderDict = null; //by id
  this.session = Math.floor(Math.random() * 1000000);
};
MCLSearchController.prototype.prepareSearchingHolders = function () {
  if (this.searchItems) return;
  this.searchItems = this.boxElt.itemHolders.map(function (it) {
    return it.getSearchItem();
  });
  (0, _search.prepareSearchForList)(this.searchItems);
  var holderDict = {};
  var visit = function visit(nd) {
    var id = nd.id;
    holderDict[id] = nd;
    if (nd.children && nd.children.length) {
      nd.children.forEach(visit);
    }
  };
  this.boxElt.itemHolders.forEach(visit);
  this.holderDict = holderDict;
};
MCLSearchController.prototype.resetSearchState = function () {
  this.$searchInput.value = '';
  this.session = Math.floor(Math.random() * 1000000);
  this.ev_searchModify();
};

/**
 *
 * @param query
 * @returns {null|{}} return dictionary of id
 */
MCLSearchController.prototype.query = function (query) {
  //todo: async or split task
  this.prepareSearchingHolders();
  var result = this.cache[query];
  var lcList;
  var _visit, idx;
  if (!result) {
    lcList = (0, _search.searchTreeListByText)(query, this.searchItems);
    result = {};
    idx = 0;
    _visit = function visit(it) {
      result[it.value] = ++idx;
      if (it.items && it.items.length) {
        it.items.forEach(_visit);
      }
    };
    lcList.forEach(_visit);
    this.cache[query] = result;
  }
  this.ev_queryComplete(result);
  return result;
};
MCLSearchController.prototype.ev_queryComplete = function (result) {
  var _this7 = this;
  var arr = this.boxElt.itemHolders.filter(function (it) {
    return !!result[it.id];
  });
  arr.sort(function (a, b) {
    return result[a.id] - result[b.id];
  });
  var searchHolders = arr.map(function (holder) {
    return new MCLHolderRef(_this7.boxElt, holder, null, result);
  });
  this.boxElt.pagingCtrl.viewArr(searchHolders);
};
MCLSearchController.prototype.ev_searchModify = function () {
  var query = this.$searchInput.value;
  query = query.trim();
  if (query.length === 0) {
    this.boxElt.pagingCtrl.viewArr(this.boxElt.itemHolders);
    return;
  }
  this.query(query);
};

/**
 *
 * @param {MCheckListModal} boxElt
 * @constructor
 */
function MCLActionController(boxElt) {
  this.boxElt = boxElt;
  this.$checkAll = this.boxElt.$checkAll;
  this.$cancelBtn = (0, _ACore.$)('.as-select-list-box-cancel-btn', boxElt);
  this.$closeBtn = (0, _ACore.$)('.am-list-popup-close-btn', boxElt);
  this.$checkAll.on('change', this.ev_checkedChange.bind(this));
  this.boxElt.on('click', this.ev_clickModal.bind(this));
  this.$closeBtn.on('click', this.ev_clickClose.bind(this));
  this.$cancelBtn.on('click', this.ev_clickCancel.bind(this));
}
MCLActionController.prototype.ev_checkedChange = function () {
  var values = this.boxElt._values;
  var dict = this.boxElt._valueDict;
  while (values.length > 0) {
    values.pop();
  }
  Object.keys(dict).forEach(function (key) {
    delete dict[key];
  });
  var checked = this.$checkAll.checked;
  var visit = function visit(nd) {
    if (!nd.data.noSelect) nd.selected = checked;
    if (checked && !dict[nd.valueKey]) {
      dict[nd.valueKey] = true;
      values.push(nd.data.value);
    }
    if (nd.children && nd.children.length) {
      nd.children.forEach(visit);
    }
  };
  this.boxElt.itemHolders.forEach(visit);
  this.boxElt.pagingCtrl.holderArr.forEach(function (hd) {
    return hd.updateView();
  });
  this.boxElt.emit('change', {
    type: 'change'
  }, this);
};
MCLActionController.prototype.ev_clickCancel = function () {
  this.boxElt.emit('cancel', {
    type: 'cancel'
  }, this);
};
MCLActionController.prototype.ev_clickClose = function () {
  this.boxElt.emit('close', {
    type: 'close'
  }, this);
};
MCLActionController.prototype.ev_clickModal = function (event) {
  if (event.target === this.boxElt) {
    this.boxElt.emit('close', {
      type: 'close'
    }, this);
  }
};

/***/ }),

/***/ 52242:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _CheckboxButton = _interopRequireDefault(__webpack_require__(93475));
var _CheckListItem = _interopRequireDefault(__webpack_require__(27129));
var _MSelectListItem = _interopRequireDefault(__webpack_require__(82799));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/****
 * @extends MSelectListItem
 * @constructor
 */
function MChecklistItem() {
  this.$checkbox = (0, _ACore.$)('.am-selectlist-item-check-ctn > ' + _CheckboxButton["default"].tag, this).on('change', this.eventHandler.checkboxChange);
  _MSelectListItem["default"].call(this);
  this.on('click', this.eventHandler.clickText);
}
MChecklistItem.tag = 'MChecklistItem'.toLowerCase();
MChecklistItem.property = Object.assign({}, _MSelectListItem["default"].property);
MChecklistItem.render = function () {
  return (0, _ACore._)({
    extendEvent: ['change', 'select'],
    "class": 'am-selectlist-item',
    child: [{
      "class": 'am-selectlist-item-check-ctn',
      child: {
        tag: _CheckboxButton["default"].tag
      }
    }, {
      "class": 'am-selectlist-item-text-ctn',
      child: {
        tag: 'span',
        "class": 'am-selectlist-item-text',
        child: {
          text: ''
        }
      }
    }, {
      "class": 'am-selectlist-item-desc-ctn',
      child: {
        tag: 'span',
        "class": 'am-selectlist-item-desc',
        child: {
          text: ''
        }
      }
    }]
  });
};
MChecklistItem.eventHandler = {};
MChecklistItem.eventHandler.clickText = _CheckListItem["default"].eventHandler.clickText;
MChecklistItem.eventHandler.checkboxChange = _CheckListItem["default"].eventHandler.checkboxChange;
MChecklistItem.property.selected = _CheckListItem["default"].property.selected;
_ACore["default"].install(MChecklistItem);
var _default = MChecklistItem;
exports["default"] = _default;

/***/ }),

/***/ 59573:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _MCTMPropHandlers = _interopRequireDefault(__webpack_require__(91254));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var MCTLMPropHandler = Object.assign({}, _MCTMPropHandlers["default"]);
MCTLMPropHandler.leafOnly = {
  value: true,
  enumerable: true
};
var _default = MCTLMPropHandler;
exports["default"] = _default;

/***/ }),

/***/ 7498:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _MCTLMPropHandler = _interopRequireDefault(__webpack_require__(59573));
var _MultiCheckTreeMenu = _interopRequireDefault(__webpack_require__(27269));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _MCheckTreeLeafBox = _interopRequireDefault(__webpack_require__(88718));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/**
 * @extends MultiCheckTreeMenu
 * @constructor
 */
function MultiCheckTreeLeafMenu() {
  _MultiCheckTreeMenu["default"].apply(this, arguments);
}
_OOP["default"].mixClass(MultiCheckTreeLeafMenu, _MultiCheckTreeMenu["default"]);
MultiCheckTreeLeafMenu.tag = 'MultiCheckTreeLeafMenu'.toLowerCase();
MultiCheckTreeLeafMenu.prototype.classes = {
  Box: _MCheckTreeLeafBox["default"]
};
MultiCheckTreeLeafMenu.render = function () {
  return _MultiCheckTreeMenu["default"].render().addClass('as-multi-check-tree-leaf-menu');
};
MultiCheckTreeLeafMenu.prototype.findItemsByValue = function (value) {
  return this.$box.findItemByValue(value);
};
MultiCheckTreeLeafMenu.property = _MCTLMPropHandler["default"];
_ACore["default"].install(MultiCheckTreeLeafMenu);
var _default = MultiCheckTreeLeafMenu;
exports["default"] = _default;

/***/ }),

/***/ 91254:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _datetime = __webpack_require__(58286);
var _Array = __webpack_require__(40411);
var MCTMPropHandlers = {};
MCTMPropHandlers.readOnly = {
  set: function set(value) {
    if (value) {
      this.addClass('as-read-only');
    } else {
      this.removeClass('as-read-only');
    }
  },
  get: function get() {
    return this.hasClass('as-read-only');
  }
};
MCTMPropHandlers.disabled = {
  set: function set(value) {
    if (value) {
      this.addClass('as-disabled');
    } else {
      this.removeClass('as-disabled');
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
MCTMPropHandlers.items = {
  set: function set(items) {
    this.$box.items = items;
    this.tokenCtrl.updateFromViewValues();
  },
  get: function get() {
    return this.$box.items;
  }
};
MCTMPropHandlers.values = {
  set: function set(values) {
    this.$box.values = values || [];
    this.tokenCtrl.updateFromViewValues();
  },
  get: function get() {
    if (this.isFocus) {
      return this.savedValues;
    } else {
      return this.$box.values;
    }
  }
};
MCTMPropHandlers.leafOnly = {
  set: function set(value) {
    if (!!value === this.hasClass('as-leaf-only')) return;
    if (value) {
      this.addClass('as-leaf-only');
      this.$box.leafOnly = true;
    } else {
      this.removeClass('as-leaf-only');
      this.$box.leafOnly = false;
    }
    this.tokenCtrl.updateFromViewValues();
  },
  get: function get() {
    return this.hasClass('as-leaf-only');
  }
};
MCTMPropHandlers.isFocus = {
  /***
   * @this MultiCheckTreeMenu
   * @param value
   */
  set: function set(value) {
    if (value && (this.disabled || this.readOnly)) return;
    if (!!value === this.hasClass('as-focus')) return;
    if (value) {
      this.savedValues = this.$box.values;
      this.addClass('as-focus');
      this.boxCtrl.onFocus();
    } else {
      this.removeClass('as-focus');
      this.boxCtrl.onBlur();
      var newValues = this.values;
      if (!(0, _Array.arrayCompare)(this.savedValues, newValues)) {
        this.notifyChange();
      } else {
        this.tokenCtrl.updateFromViewValues();
      }
      this.savedValues = this.values;
    }
  },
  get: function get() {
    return this.hasClass('as-focus');
  }
};
MCTMPropHandlers.enableSearch = {
  set: function set(value) {
    this.$box.enableSearch = value;
  },
  get: function get() {
    return this.$box.enableSearch;
  }
};
var _default = MCTMPropHandlers;
/**************************** ADAPT OLD VERSION **********************************************************************/
exports["default"] = _default;
MCTMPropHandlers.$checkTreeBox = {
  get: function get() {
    return this.$box;
  }
};

/***/ }),

/***/ 59614:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SelectBoxItem = _interopRequireDefault(__webpack_require__(27233));
var _ACore = __webpack_require__(34093);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/****
 *
 * @param {MultiCheckTreeMenu} elt
 * @constructor
 */
function MCTMTokenController(elt) {
  this.elt = elt;
  this.$box = elt.$box;
  this.$itemCtn = elt.$itemCtn;
}
MCTMTokenController.prototype.updateFromViewValues = function () {
  var values = this.$box.viewValues;
  this.requireItems(values.length);
  var holder;
  for (var i = 0; i < values.length; ++i) {
    holder = this.$box.getHolderByValue(values[i]);
    this.$itemCtn.childNodes[i].data = holder.data;
  }
};
MCTMTokenController.prototype.requireItems = function (count) {
  while (this.$itemCtn.childNodes.length < count) {
    this.$itemCtn.addChild(this.makeToken());
  }
  while (this.$itemCtn.childNodes.length > count) {
    this.$itemCtn.lastChild.remove();
  }
};
MCTMTokenController.prototype.removeValue = function (targetValue) {
  this.$box.select(targetValue, false);
  this.updateFromViewValues();
  if (!this.elt.isFocus) {
    this.elt.notifyChange();
  }
};
MCTMTokenController.prototype.makeToken = function () {
  var ctrl = this;
  return (0, _ACore._)({
    tag: _SelectBoxItem["default"],
    on: {
      close: function close() {
        ctrl.removeValue(this.value);
      }
    }
  });
};
var _default = MCTMTokenController;
exports["default"] = _default;

/***/ }),

/***/ 86901:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 *
 * @param elt
 * @constructor
 */
function MMCTMBoxController(elt) {
  this.elt = elt;
  this.$box = elt.$box;
  for (var key in this) {
    if (key.startsWith('ev_')) this[key] = this[key].bind(this);
  }
  this.elt.on('click', this.ev_click);
  this.$box.on('close', this.ev_close);
  this.$box.on('cancel', this.ev_cancel);
  this.$box.on('change', this.ev_boxValuesChange);
}
MMCTMBoxController.prototype.onFocus = function () {
  this.$box.addTo(document.body);
  this.elt.off('click', this.ev_click);
};
MMCTMBoxController.prototype.onBlur = function () {
  var _this = this;
  this.$box.remove();
  setTimeout(function () {
    _this.elt.on('click', _this.ev_click);
  }, 50);
};
MMCTMBoxController.prototype.ev_click = function (event) {
  if (!this.elt.disabled && !this.elt.readOnly && (event.target === this.elt || event.target === this.elt.$itemCtn)) {
    this.elt.isFocus = true;
  }
};
MMCTMBoxController.prototype.ev_close = function (event) {
  this.elt.isFocus = false;
};
MMCTMBoxController.prototype.ev_cancel = function (event) {
  this.$box.values = this.elt.savedValues;
  this.elt.isFocus = false;
};
MMCTMBoxController.prototype.ev_boxValuesChange = function () {
  this.elt.tokenCtrl.updateFromViewValues();
};
var _default = MMCTMBoxController;
exports["default"] = _default;

/***/ }),

/***/ 27269:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _MCTMPropHandlers = _interopRequireDefault(__webpack_require__(91254));
var _MMCTMBoxController = _interopRequireDefault(__webpack_require__(86901));
var _MCheckTreeBox = _interopRequireDefault(__webpack_require__(82822));
var _MCTMTokenController = _interopRequireDefault(__webpack_require__(59614));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function MultiCheckTreeMenu() {
  this.$box = (0, _ACore._)({
    tag: this.classes.Box
  });
  this.$itemCtn = (0, _ACore.$)('.as-multi-select-menu-item-ctn', this);
  this.boxCtrl = new _MMCTMBoxController["default"](this);
  this.tokenCtrl = new _MCTMTokenController["default"](this); //mobile only
}

MultiCheckTreeMenu.tag = 'MultiCheckTreeMenu'.toLowerCase();
MultiCheckTreeMenu.prototype.classes = {
  Box: _MCheckTreeBox["default"]
};
MultiCheckTreeMenu.render = function () {
  return (0, _ACore._)({
    "class": ['as-multi-select-menu', 'as-multi-check-tree-menu'],
    extendEvent: ['change'],
    attr: {
      tabindex: '1'
    },
    child: [{
      "class": ['as-multi-select-menu-item-ctn', 'as-bscroller']
    }, {
      tag: 'button',
      "class": 'as-multi-select-menu-toggle-btn',
      child: 'dropdown-ico'
    }, 'attachhook']
  });
};
MultiCheckTreeMenu.prototype.notifyChange = function () {
  this.emit('change', {
    type: 'change',
    target: this
  }, this);
};
MultiCheckTreeMenu.property = _MCTMPropHandlers["default"];
_ACore["default"].install(MultiCheckTreeMenu);
var _default = MultiCheckTreeMenu;
exports["default"] = _default;

/***/ }),

/***/ 45626:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _keyboard = __webpack_require__(95141);
var _Text = __webpack_require__(35844);
var _utils = __webpack_require__(84512);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {NumberInput} elt
 * @constructor
 */
function NITextController(elt) {
  var _this = this;
  this.elt = elt;
  /***
   *
   * @type {HTMLInputElement|AElement}
   */
  this.$input = this.elt.$input;
  Object.keys(NITextController.prototype).forEach(function (key) {
    if (key.startsWith('on')) _this[key] = _this[key].bind(_this);
  });
  this.elt.$input.on('keydown', this.onKeyDown).on('paste', this.onKeyDown).on('blur', this.onBlur);
}
NITextController.prototype.estimateWidthBy = function (text) {
  if (this.elt.hasClass('as-pressing')) return;
  var bound = this.elt.getBoundingClientRect();
  var width = (0, _Text.measureText)(text, this.$input.getComputedStyleValue('font')).width;
  this.elt.addStyle('--text-width', width + 'px');
  var newBound = this.elt.getBoundingClientRect();
  if (newBound.width !== bound.width) _ResizeSystem["default"].requestUpdateUpSignal(this.elt, true);
};
NITextController.prototype.flushTextToValue = function () {
  var thousandsSeparator = this.elt.thousandsSeparator || '';
  var decimalSeparator = this.elt.decimalSeparator;
  var text = this.$input.value;
  var floatText = text.split(thousandsSeparator).join('').split(decimalSeparator).join('.');
  this.elt._value = parseFloat(floatText);
  if (!(0, _utils.isRealNumber)(this.elt._value)) this.elt._value = null;
  this.elt._value = this.elt.value; //normalize value
};

NITextController.prototype.flushValueToText = function () {
  var formatter;
  var opt = Object.assign({}, this.elt._format);
  var value = this.elt.value;
  var text, parts;
  if (value === null) {
    text = '';
  } else if (opt.locales === 'none') {
    if (opt.maximumFractionDigits === 20) {
      text = value + '';
    } else if (opt.maximumFractionDigits === opt.minimumIntegerDigits) {
      text = value.toFixed(opt.maximumFractionDigits);
    } else {
      text = value + '';
      parts = text.split('.');
      parts[1] = parts[1] || '';
      if (parts[1].length < opt.minimumIntegerDigits) {
        text = value.toFixed(opt.minimumIntegerDigits);
      }
    }
  } else {
    formatter = new Intl.NumberFormat(this.elt._format.locales, opt);
    text = formatter.format(value);
  }
  this.$input.value = text;
  this.estimateWidthBy(text);
};
NITextController.prototype.reformat = function () {
  var thousandsSeparator = this.elt.thousandsSeparator || '';
  var decimalSeparator = this.elt.decimalSeparator;
  var caretPos = this.$input.selectionEnd;
  var value = this.$input.value;
  var parts = value.split(decimalSeparator);
  var caretWTSPos = value.substring(0, caretPos).split(thousandsSeparator).join('').length;
  parts[0] = parts[0].split('').filter(function (x) {
    return x.match(/[0-9\-]/);
  }).reduce(function (ac, c, i, arr) {
    ac += c;
    if (i + 1 < arr.length && (arr.length - i) % 3 === 1 && arr[i] !== '-') {
      ac += thousandsSeparator;
    }
    return ac;
  }, '');
  if (parts[1]) parts[1] = parts[1].split('').filter(function (x) {
    return x.match(/[0-9]/);
  }).join('');
  var newValue = parts.join(decimalSeparator);
  var newCaretPos = 0;
  var counter = 0;
  for (newCaretPos = 0; newCaretPos < newValue.length && counter < caretWTSPos; ++newCaretPos) {
    if (newValue[newCaretPos].match(/[0-9\-]/) || newValue[newCaretPos] === decimalSeparator) {
      counter++;
    }
  }
  this.$input.value = newValue;
  this.$input.setSelectionRange(newCaretPos, newCaretPos);
  this.estimateWidthBy(newValue);
};
NITextController.prototype.onBlur = function () {
  this.flushValueToText();
  this.elt.notifyChanged({
    by: 'blur'
  });
};

/***
 * @param {KeyboardEvent|ClipboardEvent|{}} event
 * @param {boolean=} event
 */
NITextController.prototype.onKeyDown = function (event, dontInsert) {
  var _this2 = this;
  var key = event.type === 'keydown' ? (0, _keyboard.keyboardEventToKeyBindingIdent)(event) : '';
  if (key.length === 1 && !key.match(/[0-9.,\-]/) || key.match(/^shift-.$/)) {
    event.preventDefault();
    return;
  }
  var thousandsSeparator = this.elt.thousandsSeparator;
  var decimalSeparator = this.elt.decimalSeparator;
  var value = this.$input.value;
  var sStart = this.$input.selectionStart;
  var sEnd = this.$input.selectionEnd;
  var sDir = this.$input.selectionDirection;
  var onKeys = {};
  onKeys.unidentified = function () {
    var oldText = _this2.$input.value;
    setTimeout(function () {
      var newText = _this2.$input.value;
      if (oldText === newText) return;
      var key = newText[sStart];
      if (!key) return; //todo
      var fakeEvent = {
        type: 'keydown',
        preventDefault: _noop["default"],
        key: key
      };
      if (key.match(/^[0-9.]$/)) {
        _this2.onKeyDown(fakeEvent, true);
      } else {
        _this2.$input.value = oldText;
        _this2.$input.setSelectionRange(sStart, sStart);
        _this2.onKeyDown(fakeEvent);
      }
    }, 10);
  };
  onKeys.process = function () {
    setTimeout(function () {
      _this2.flushTextToValue();
    }, 10);
  };
  onKeys.paste = function () {
    var clipboardData = event.clipboardData || window.clipboardData;
    var pastedData = clipboardData.getData('Text');
    var hasSeparator = value.indexOf(decimalSeparator) >= 0;
    pastedData = pastedData.split('').filter(function (c) {
      if (c.match(/[0-9]/)) return true;
      if (!hasSeparator && c === hasSeparator) {
        hasSeparator = true;
        return true;
      }
    }).join('');
    if (_this2.elt.readOnly) return;
    if (!dontInsert) {
      _this2.$input.value = value.substring(0, sStart) + pastedData + value.substring(sEnd);
      _this2.$input.setSelectionRange(sStart + pastedData.length, sStart + pastedData.length);
    }
    _this2.reformat();
    _this2.flushTextToValue();
  };
  onKeys.arrowleft = function () {
    if (sStart === sEnd) {
      if (value[sStart - 2] === thousandsSeparator) {
        _this2.$input.setSelectionRange(sStart - 2, sStart - 2);
      } else if (sStart > 0) {
        _this2.$input.setSelectionRange(sStart - 1, sStart - 1);
      }
    } else {
      _this2.$input.setSelectionRange(sStart, sStart);
    }
  };
  onKeys['shift-arrowleft'] = function () {
    var newSStart;
    var newSEnd;
    if (sDir === 'backward') {
      newSStart = sEnd;
      newSEnd = sStart - 1;
    } else {
      newSStart = sStart;
      newSEnd = sEnd - 1;
    }
    if (value[newSEnd - 1] === thousandsSeparator) newSEnd--;
    newSEnd = Math.max(0, newSEnd);
    if (newSStart <= newSEnd) {
      _this2.$input.setSelectionRange(newSStart, newSEnd, "forward");
    } else {
      _this2.$input.setSelectionRange(newSEnd, newSStart, "backward");
    }
  };
  onKeys.arrowright = function () {
    if (sStart === sEnd) {
      if (value[sStart] === thousandsSeparator) {
        _this2.$input.setSelectionRange(sStart + 2, sStart + 2);
      } else if (sStart < value.length) {
        _this2.$input.setSelectionRange(sStart + 1, sStart + 1);
      }
    } else {
      _this2.$input.setSelectionRange(sStart, sStart);
    }
  };
  onKeys['shift-arrowright'] = function () {
    var newSStart;
    var newSEnd;
    if (sDir === 'backward') {
      newSStart = sEnd;
      newSEnd = sStart + 1;
    } else {
      newSStart = sStart;
      newSEnd = sEnd + 1;
    }
    if (value[newSEnd - 1] === thousandsSeparator) newSEnd++;
    newSEnd = Math.min(value.length, newSEnd);
    if (newSStart <= newSEnd) {
      _this2.$input.setSelectionRange(newSStart, newSEnd, "forward");
    } else {
      _this2.$input.setSelectionRange(newSEnd, newSStart, "backward");
    }
  };
  onKeys.number = function () {
    if (_this2.elt.readOnly) return;
    if (!dontInsert) {
      _this2.$input.value = value.substring(0, sStart) + key + value.substring(sEnd);
      _this2.$input.setSelectionRange(sStart + 1, sStart + 1);
    }
    _this2.reformat();
    _this2.flushTextToValue();
  };
  onKeys['-'] = function () {
    if (_this2.elt.readOnly) return;
    if (value.indexOf('-') >= 0 || sStart > 0) return;
    _this2.$input.value = '-' + value.substring(sEnd);
    _this2.$input.setSelectionRange(1, 1);
    _this2.reformat();
    _this2.flushTextToValue();
  };
  onKeys.backspace = function () {
    if (_this2.elt.readOnly) return;
    var delStart, delEnd;
    if (sStart === sEnd) {
      if (sStart > 0) {
        delStart = sStart - 1;
        delEnd = sStart;
      }
    } else {
      delStart = sStart;
      delEnd = sEnd;
    }
    if (delStart === undefined || delEnd === undefined) return;
    _this2.$input.value = value.substring(0, delStart) + value.substring(delEnd);
    _this2.$input.setSelectionRange(delStart, delStart);
    _this2.reformat();
    _this2.flushTextToValue();
  };
  onKeys.enter = function () {
    if (_this2.elt.readOnly) return;
    _this2.flushValueToText();
    _this2.$input.setSelectionRange(_this2.$input.value.length, _this2.$input.value.length);
    _this2.elt.notifyChanged({
      by: 'enter'
    });
  };
  onKeys["delete"] = function () {
    if (_this2.elt.readOnly) return;
    var delStart, delEnd;
    if (sStart === sEnd) {
      if (sStart < value.length) {
        delStart = sStart;
        delEnd = sStart + 1;
        if (value[delStart] === thousandsSeparator) delEnd++;
      }
    } else {
      delStart = sStart;
      delEnd = sEnd;
    }
    if ((0, _utils.isNaturalNumber)(delStart) && (0, _utils.isNaturalNumber)(delEnd)) {
      _this2.$input.value = value.substring(0, delStart) + value.substring(delEnd);
      _this2.$input.setSelectionRange(delStart, delStart);
      _this2.reformat();
      _this2.flushTextToValue();
    }
  };
  onKeys.decimalSeparator = function () {
    if (_this2.elt.readOnly) return;
    var idx = value.indexOf(decimalSeparator);
    if (idx >= 0) {
      if (idx < sStart) {
        _this2.$input.value = value.substring(0, sStart).replace(decimalSeparator, '') + decimalSeparator + value.substring(sEnd);
        _this2.$input.setSelectionRange(sStart, sStart);
      } else if (idx < sEnd) {
        _this2.$input.value = value.substring(0, sStart) + decimalSeparator + value.substring(sEnd);
        _this2.$input.setSelectionRange(sStart + 1, sStart + 1);
      } else {
        _this2.$input.value = value.substring(0, sStart) + decimalSeparator + value.substring(sEnd).replace(decimalSeparator, '');
        _this2.$input.setSelectionRange(sStart + 1, sStart + 1);
      }
    } else {
      _this2.$input.value = value.substring(0, sStart) + decimalSeparator + value.substring(sEnd);
      _this2.$input.setSelectionRange(sStart + 1, sStart + 1);
    }
    _this2.reformat();
    _this2.flushTextToValue();
  };
  if (key === 'arrowup') {
    if (sStart === 0 && sEnd === 0) {
      this.elt.nextStep();
      event.preventDefault();
      this.$input.setSelectionRange(0, 0);
    }
  } else if (key === 'arrowdown') {
    if (sStart === value.length && sEnd === value.length) {
      this.elt.prevStep();
      event.preventDefault();
      this.$input.setSelectionRange(this.$input.value.length, this.$input.value.length);
    }
  } else if (key === 'ctrl-x') {
    onKeys["delete"]();
  } else if (onKeys[event.type]) {
    event.preventDefault();
    onKeys[event.type]();
  } else if (onKeys[key]) {
    event.preventDefault();
    onKeys[key]();
  } else if (key.match(/^[0-9.]$/)) {
    event.preventDefault();
    onKeys.number();
  } else if (key === decimalSeparator) {
    event.preventDefault();
    onKeys.decimalSeparator();
  }
};
var _default = NITextController;
exports["default"] = _default;

/***/ }),

/***/ 51394:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(63081);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _utils = __webpack_require__(84512);
var _NITextController = _interopRequireDefault(__webpack_require__(45626));
var _int = __webpack_require__(65909);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _ACore["default"]._;
var $ = _ACore["default"].$;

/***
 * @typedef NumberInputFormat
 * @property {string} locales
 * @property {string|null} decimalSeparator
 * @property {string|null} thousandSeparator
 */

/***
 * @extends AElement
 * @constructor
 */
function NumberInput() {
  var _this = this;
  /***
   *
   * @type {HTMLInputElement|AElement}
   */
  this.$input = $('input', this);

  // .on('keyup', this.eventHandler.keyup)
  // .on('paste', this.eventHandler.paste)
  // .on('change', this.eventHandler.change);
  this.$input.value = '0';
  this._prevValue = 0; //to know whenever the value changed
  this._value = 0;
  this._max = Infinity;
  this._min = -Infinity;
  this._step = 1;
  this._format = this._makeDefaultFormat();
  this.$upBtn = $('.absol-number-input-button-up-container button', this).on('mousedown', this.eventHandler.mouseDownBtn.bind(this, 1));
  this.$downBtn = $('.absol-number-input-button-down-container button', this).on('mousedown', this.eventHandler.mouseDownBtn.bind(this, -1));
  this.textCtrl = new _NITextController["default"](this);
  this.$domSignal = _('attachhook').addTo(this);
  this.$domSignal.once('attached', function () {
    _this.textCtrl.estimateWidthBy(_this.$input.value);
  });
  this.dragCtrl = new NIDragController(this);

  /****
   * @name min
   * @type {number}
   * @memberOf NumberInput#
   */

  /****
   * @name max
   * @type {number}
   * @memberOf NumberInput#
   */

  /****
   * @name value
   * @type {number}
   * @memberOf NumberInput#
   */

  /****
   * @name format
   * @type {NumberInputFormat}
   * @memberOf NumberInput#
   */

  /****
   * @name thousandsSeparator
   * @type {string|null}
   * @memberOf NumberInput#
   */

  /****
   * @name decimalSeparator
   * @type {string|null}
   * @memberOf NumberInput#
   */

  /****
   * @name readOnly
   * @type {boolean}
   * @memberOf NumberInput#
   */

  /****
   * @name disabled
   * @type {boolean}
   * @memberOf NumberInput#
   */

  /****
   * @name notNull
   * @type {boolean}
   * @memberOf NumberInput#
   */

  /****
   * @name stepper
   * @type {boolean}
   * @memberOf NumberInput#
   */

  /**
   * @type {number}
   * @name step
   * @memberOf NumberInput#
   */

  /**
   * @type {boolean}
   * @name valueDraggable
   * @memberOf NumberInput#
   */
  this.valueDraggable = false;
  /***
   *
   * @type {number|null}
   * @name rawValue
   */
}

NumberInput.tag = 'NumberInput'.toLowerCase();
NumberInput.render = function () {
  return _({
    "class": ['absol-number-input', 'as-must-not-null'],
    extendEvent: ['change'],
    child: [{
      "class": 'absol-number-input-text-container',
      child: 'input[type="text"]'
    }, {
      "class": 'absol-number-input-button-up-container',
      child: {
        tag: 'button',
        child: 'span.mdi.mdi-menu-up'
      }
    }, {
      "class": 'absol-number-input-button-down-container',
      child: {
        tag: 'button',
        child: 'span.mdi.mdi-menu-down'
      }
    }]
  });
};
NumberInput.prototype.addStyle = function (arg0, arg1) {
  if (arg0 === 'textAlign' || arg0 === 'text-align') {
    this.$input.addStyle(arg0, arg1);
    return this;
  } else {
    return _AElement["default"].prototype.addStyle.apply(this, arguments);
  }
};
NumberInput.prototype._makeDefaultFormat = function () {
  var res = {
    locales: 'vi-VN',
    maximumFractionDigits: 20,
    minimumFractionDigits: 0,
    pow10: null //only apply if maximumFractionDigits === 0
  };

  if (window['systemconfig'] && window['systemconfig']['numberFormatLocales']) {
    res.locales = window['systemconfig']['numberFormatLocales'];
  }
  return res;
};

/*****17 number********/
NumberInput.prototype.nextStep = function () {
  var ofs = 0;
  if ((0, _utils.isRealNumber)(this.min)) {
    ofs = this.min;
  }
  var step = this.step;
  var idx = (0, _utils.nearFloor)((this.value - ofs) / step, 0.01);
  this._value = Math.min(step * (idx + 1) + ofs, this.max);
  this._value = (0, _int.numberAutoFixed)(this._value, (step + '').length);
  this.textCtrl.flushValueToText();
};
NumberInput.prototype.prevStep = function () {
  var ofs = 0;
  if ((0, _utils.isRealNumber)(this.min)) {
    ofs = this.min;
  }
  var step = this.step;
  var idx = (0, _utils.nearFloor)((this.value - ofs) / step, 0.01);
  this._value = Math.max(step * (idx - 1) + ofs, this.min);
  this._value = (0, _int.numberAutoFixed)(this._value, (step + '').length);
  this.textCtrl.flushValueToText();
};
NumberInput.eventHandler = {};
NumberInput.eventHandler.mouseDownBtn = function (dir, event) {
  var _this2 = this;
  if (_EventEmitter["default"].isMouseRight(event)) return;
  var self = this;
  var pressing = true;
  var timeout = -1;
  var i = 0;
  this.addClass('as-pressing');
  var tick = function tick() {
    if (pressing) {
      if (i === 0 || i >= 4) {
        if (dir > 0) _this2.nextStep();else _this2.prevStep();
        if (i === 0) {
          _this2.notifyChanged({
            by: 'press_button'
          });
        } else {
          _this2.notifyChanged({
            by: 'long_press_button'
          });
        }
      }
      ++i;
      self.__pressingUpTimeout__ = setTimeout(tick, 100);
    }
  };
  var finish = function finish(event) {
    pressing = false;
    _this2.removeClass('as-pressing');
    if (timeout >= 0) {
      clearTimeout(timeout);
      timeout = -1;
    }
    document.removeEventListener('mouseup', finish);
    document.removeEventListener('mouseleave', finish);
    if (event.type === 'mouseup') {
      _this2.$input.focus();
    }
    _this2.notifyChanged({
      originEvent: event,
      by: 'press_button'
    });
    _this2.textCtrl.estimateWidthBy(_this2.$input.value);
  };
  document.addEventListener('mouseup', finish);
  document.addEventListener('mouseleave', finish);
  tick();
};
NumberInput.prototype.focus = function () {
  this.$input.focus();
};
NumberInput.prototype.notifyChanged = function (option) {
  option = option || {};
  var value = this.value;
  if (this._prevValue !== value) {
    this.emit('change', Object.assign({
      target: this,
      value: value,
      previousValue: this._prevValue
    }, option || {}), this);
    this._prevValue = value;
    // this._prevBy = option.by;
  }
};

NumberInput.property = {};
NumberInput.property.rawValue = {
  get: function get() {
    return this._prevValue;
  }
};
NumberInput.property.value = {
  set: function set(value) {
    if (typeof value === "string") value = parseFloat(value);
    if (typeof value != 'number' || isNaN(value)) value = null;
    this._value = value;
    this._prevValue = this.value;
    this.textCtrl.flushValueToText();
  },
  get: function get() {
    var value = this._value;
    if (value === null) {
      if (this.notNull) {
        value = 0;
      } else {
        return null;
      }
    }
    if (this._format.maximumFractionDigits === 0) {
      if ((0, _utils.isNaturalNumber)(this._format.pow10)) {
        value = Math.round(value / Math.pow(10, this._format.pow10)) * Math.pow(10, this._format.pow10);
      } else {
        value = Math.round(value);
      }
    } else if (this._format.maximumFractionDigits < 20) value = (0, _int.numberAutoFixed)(value, this._format.maximumFractionDigits);
    value = Math.min(this.max, Math.max(value, this.min));
    return value;
  }
};
NumberInput.property.step = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) value = 1;
    if (value === 0) value = 1;
    value = Math.abs(value);
    this._step = value;
  },
  get: function get() {
    if (this._format.maximumFractionDigits === 0 && (0, _utils.isNaturalNumber)(this._format.pow10)) {
      return Math.max(this._step, Math.pow(10, this._format.pow10));
    }
    return this._step;
  }
};
NumberInput.property.max = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) {
      value = Infinity;
    }
    this._max = value;
    this._prevValue = this.value;
    this.textCtrl.flushValueToText();
  },
  get: function get() {
    return Math.max(this._max, this._min);
  }
};
NumberInput.property.min = {
  set: function set(value) {
    if (!(0, _utils.isRealNumber)(value)) {
      value = -Infinity;
    }
    this._min = value;
    this._prevValue = this.value;
    this.textCtrl.flushValueToText();
  },
  get: function get() {
    return Math.min(this._min, this._max);
  }
};
NumberInput.prototype.locales2Format = {
  'vi-VN': {
    decimalSeparator: ',',
    thousandsSeparator: '.'
  },
  'en-US': {
    decimalSeparator: '.',
    thousandsSeparator: ','
  },
  'none': {
    decimalSeparator: '.',
    thousandsSeparator: ''
  }
};
NumberInput.property.decimalSeparator = {
  get: function get() {
    var lF = this.locales2Format[this._format.locales];
    if (lF) return lF.decimalSeparator;
    return '.';
  },
  set: function set() {}
};
NumberInput.property.thousandsSeparator = {
  get: function get() {
    var lF = this.locales2Format[this._format.locales];
    if (lF) return lF.thousandsSeparator;
    return null;
  },
  set: function set() {}
};
NumberInput.property.disabled = {
  set: function set(value) {
    this.$input.disabled = !!value;
    this.$upBtn.disabled = !!value;
    this.$downBtn.disabled = !!value;
    if (value) this.addClass('absol-disabled');else this.removeClass('absol-disabled');
  },
  get: function get() {
    return this.$input.disabled;
  }
};
NumberInput.property.readOnly = {
  set: function set(value) {
    this.$input.readOnly = !!value;
    if (value) this.addClass('as-read-only');else this.removeClass('as-read-only');
  },
  get: function get() {
    return this.$input.readOnly;
  }
};
NumberInput.property.format = {
  /***
   * @this NumberInput
   * @param value
   * @this NumberInput
   */
  set: function set(value) {
    if (value in this.locales2Format) {
      this._format = {
        locales: value,
        maximumFractionDigits: this._format.maximumFractionDigits,
        minimumFractionDigits: this._format.minimumFractionDigits
      };
    } else if (!value) {
      this._format = this._makeDefaultFormat();
    } else {
      this._format = Object.assign(this._makeDefaultFormat(), value);
    }
    // console.log(this._format)
    this._prevValue = this.value;
    this.textCtrl.flushValueToText();
  },
  get: function get() {
    return this._format;
  }
};
NumberInput.property.floatFixed = {
  set: function set(value) {
    if ((0, _utils.isRealNumber)(value)) {
      value = Math.round(value);
      if (value >= 0) {
        value = Math.min(value, 20);
        this._format.maximumFractionDigits = value;
        this._format.minimumFractionDigits = value;
        delete this._format.pow10;
      } else {
        this._format.maximumFractionDigits = 0;
        this._format.minimumFractionDigits = 0;
        this._format.pow10 = -value;
      }
    } else {
      this._format.maximumFractionDigits = 20;
      delete this._format.minimumFractionDigits;
      delete this._format.pow10;
    }
    this._prevValue = this.value;
    this.textCtrl.flushValueToText();
  },
  get: function get() {
    if (this._format.maximumFractionDigits === 20) return null;
    if (this._format.maximumFractionDigits === 0 && this._format.pow10 > 0) return -this._format.pow10;
    return this._format.maximumFractionDigits;
  }
};
NumberInput.property.notNull = {
  set: function set(value) {
    if (value) {
      this.addClass('as-must-not-null');
    } else {
      this.removeClass('as-must-not-null');
    }
    this._prevValue = this.value;
    this.textCtrl.flushValueToText();
  },
  get: function get() {
    return this.hasClass('as-must-not-null');
  }
};
NumberInput.property.stepper = {
  set: function set(value) {
    if (value) {
      this.addClass('as-has-stepper');
    } else {
      this.removeClass('as-has-stepper');
    }
  },
  get: function get() {
    return this.hasClass('as-has-stepper');
  }
};
_ACore["default"].install('NumberInput'.toLowerCase(), NumberInput);
var _default = NumberInput;
/**
 *
 * @param {NumberInput} elt
 * @constructor
 */
exports["default"] = _default;
function NIDragController(elt) {
  var _this3 = this;
  this.elt = elt;
  _({
    elt: elt,
    tag: _Hanger["default"]
  });
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) {
      _this3[key] = _this3[key].bind(_this3);
    }
  });
  this.elt.on({
    dragstart: this.ev_dragStart,
    drag: this.ev_drag,
    dragend: this.ev_dragEnd,
    draginit: this.ev_dragInit
  });
  this.state = 0;
  this.prevDistance = 0;
  this.$mouseLine = null;
}
NIDragController.prototype.ev_dragInit = function (event) {
  if (!this.elt.valueDraggable || _EventEmitter["default"].isMouseRight(event.originEvent)) {
    event.cancel();
  }
};
NIDragController.prototype.ev_dragStart = function (event) {
  if (this.elt.valueDraggable === false) return;
};
NIDragController.prototype.ev_drag = function (event) {
  if (this.calcDistance(event) > 0 && !this.isSelecting() && this.state === 0) {
    this.state = 1;
    document.body.classList.add('as-number-input-force-dragging');
    this.$mouseLine = _({
      tag: 'div',
      "class": 'as-number-input-mouse-line',
      style: {
        zIndex: (0, _utils.findMaxZIndex)(this.elt) + 1
      }
    }).addTo(document.body);
  }
  if (this.state !== 1) return;
  var distance = this.calcDistance(event);
  var delta = distance - this.prevDistance;
  if (delta >= 1) {
    this.prevDistance = distance;
    this.elt.nextStep();
  } else if (delta <= -1) {
    this.prevDistance = distance;
    this.elt.prevStep();
  }
  var deltaVector = event.currentPoint.sub(event.startingPoint);
  var length = deltaVector.abs();
  var angle = deltaVector.direction();
  this.$mouseLine.addStyle({
    left: event.startingPoint.x + 'px',
    top: event.startingPoint.y + 'px',
    width: length + 'px',
    transform: 'rotate(' + angle + 'rad)',
    transformOrigin: '0 0'
  });
};
NIDragController.prototype.ev_dragEnd = function (event) {
  this.elt.removeClass('as-dragging');
  document.body.classList.remove('as-number-input-force-dragging');
  if (this.$mouseLine) {
    this.$mouseLine.remove();
    this.$mouseLine = null;
  }
  this.state = 0;
  this.elt.emit('change', {
    by: 'drag'
  });
};
NIDragController.prototype.isSelecting = function () {
  return this.elt.$input.selectionStart !== this.elt.$input.selectionEnd;
};
NIDragController.prototype.calcDistance = function (event) {
  var bound = _Rectangle["default"].fromClientRect(this.elt.getBoundingClientRect());
  var mouse = new _Vec["default"](event.clientX, event.clientY);
  bound.x -= 10;
  bound.y -= 10;
  bound.height += 20;
  bound.width += 20;
  if (bound.containsPoint(mouse)) return 0;
  var res = Infinity;
  if (mouse.x > bound.x && mouse.x < bound.x + bound.width) {
    res = Math.min(res, Math.abs(mouse.y - bound.y), Math.abs(mouse.y - bound.y - bound.height));
  } else if (mouse.y > bound.y && mouse.y < bound.y + bound.height) {
    res = Math.min(res, Math.abs(mouse.x - bound.x), Math.abs(mouse.x - bound.x - bound.width));
  } else {
    res = Math.min(res, mouse.sub(bound.A()).abs(), mouse.sub(bound.B()).abs(), mouse.sub(bound.C()).abs(), mouse.sub(bound.D()).abs());
  }
  return res;
};

/***/ }),

/***/ 10641:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(5519);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
__webpack_require__(20117);
__webpack_require__(39699);
__webpack_require__(25174);
__webpack_require__(67627);
__webpack_require__(31714);
__webpack_require__(9159);
__webpack_require__(2553);
__webpack_require__(137);
__webpack_require__(23717);
__webpack_require__(16680);
__webpack_require__(53699);
__webpack_require__(83471);
__webpack_require__(99897);
__webpack_require__(41274);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function ObjectMergeTool() {
  this._descriptors = null;
  this._objects = null;
  this.root = null;
  this.$body = (0, _ACore.$)('.as-omt-body', this).on('mouseover', this.eventHandler.mouseOverNode);
  this.hoveringNode = null;
  /**
   * @type {Object[]}
   * @memberOf ObjectMergeTool#
   * @name objects
   */
  /**
   * @type {Object}
   * @memberOf ObjectMergeTool#
   * @name descriptors
   */
}

ObjectMergeTool.tag = 'ObjectMergeTool'.toLowerCase();
ObjectMergeTool.render = function () {
  return (0, _ACore._)({
    "class": 'as-omt',
    extendEvent: ['change'],
    child: [{
      "class": 'as-omt-body'
    }]
  });
};
ObjectMergeTool.prototype._tryFlushData = function () {
  if (this.root && this.objects && this.objects.length > 0) {
    this.root.assign(this.objects[0]);
  }
};
ObjectMergeTool.prototype._findNode = function (targetElt) {
  while (targetElt && targetElt !== this) {
    if (targetElt.omtNode) return targetElt.omtNode;
    targetElt = targetElt.parentElement;
  }
  return null;
};
ObjectMergeTool.prototype.notifyChange = function () {
  this.emit('change', {
    type: 'change',
    target: this
  }, this);
};
ObjectMergeTool.property = {};
ObjectMergeTool.property.descriptor = {
  set: function set(value) {
    this._descriptor = value || {};
    this.$body.clearChild();
    this.root = _OMTBaseType["default"].make(this, null, this._descriptor);
    this.$body.addChild(this.root.elt);
    this._tryFlushData();
  },
  get: function get() {
    return this._descriptor;
  }
};
ObjectMergeTool.property.objects = {
  set: function set(value) {
    this._objects = value || [];
    this._tryFlushData();
  },
  get: function get() {
    return this._objects;
  }
};
ObjectMergeTool.property.data = {
  get: function get() {
    if (this.root) {
      return this.root["export"]();
    }
    if (this._objects && this.objects.length > 0) return this._objects[0];
    return null;
  }
};

/***
 * @type {{}}
 * @memberOf ObjectMergeTool#
 */
ObjectMergeTool.eventHandler = {};

/***
 * @this ObjectMergeTool
 * @param {MouseEvent} event
 */
ObjectMergeTool.eventHandler.mouseOverNode = function (event) {
  var node = this._findNode(event.target);
  if (this.hoveringNode === node) return;
  if (this.hoveringNode) {
    this.hoveringNode.elt.removeClass('as-hover');
  }
  this.hoveringNode = node;
  if (this.hoveringNode) {
    this.hoveringNode.elt.addClass('as-hover');
  }
};
_ACore["default"].install(ObjectMergeTool);
var _default = ObjectMergeTool;
exports["default"] = _default;

/***/ }),

/***/ 9745:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _ACore = __webpack_require__(34093);
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _MultiCheckTreeMenu = _interopRequireDefault(__webpack_require__(74934));
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
var _Array = __webpack_require__(40411);
var _RadioButton = _interopRequireDefault(__webpack_require__(30348));
var _OMTSelectOptionsDialog = _interopRequireDefault(__webpack_require__(33503));
var _stringGenerate = __webpack_require__(10713);
var _CheckboxButton = _interopRequireDefault(__webpack_require__(93475));
var _stringUtils = __webpack_require__(26243);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function hashArrayOf(node) {
  var res = (node.children || []).map(function (child) {
    return child.getHash();
  });
  res.sort(function (a, b) {
    return a - b;
  });
  return (0, _Array.arrayUnique)(res);
}

/***
 * @extends Fragment
 * @param {OMTArray} node
 * @constructor
 */
function OMTArrayMergeDialog(node) {
  _Fragment["default"].call(this);
  this.node = node;
  this.calc();
  this.getView();
  this.start();
}
_OOP["default"].mixClass(OMTArrayMergeDialog, _Fragment["default"]);
OMTArrayMergeDialog.prototype.calc = function () {
  this.options = this.node.getSelectOptions();
  this.curHash = hashArrayOf(this.node);
  this.selectedNodes = {};
};
OMTArrayMergeDialog.prototype.onStart = function () {
  this.$modal.addTo(document.body);
};
OMTArrayMergeDialog.prototype.onStop = function () {
  this.$modal.remove();
};
OMTArrayMergeDialog.prototype.assignResult = function () {
  var dict = {};
  var itemArr = [];
  var hashArr = [];
  var node;
  for (var key in this.selectedNodes) {
    node = this.selectedNodes[key];
    if (node.children) {
      node.children.forEach(function (cr) {
        var hash = cr.getHash();
        if (dict[hash]) return;
        dict[hash] = true;
        itemArr.push(cr["export"]());
        hashArr.push(hash);
      });
    }
  }
  if (this.curHash === hashArr && (0, _Array.arrayUnique)(this.curHash.concat(hashArr)).length === this.curHash.length) return;
  this.node.assign(itemArr);
  this.node.updateRaw();
  this.node.notifyChange();
};
OMTArrayMergeDialog.prototype._makeOptionRow = function (opt, i, dict) {
  var self = this;
  var descriptor = Object.assign({}, this.node.descriptor);
  var clazz = this.node.constructor;
  var node = new clazz(this.node.tool, this.node.parent, descriptor);
  node.assign(opt);
  var nodeHash = (0, _stringUtils.stringHashCode)(hashArrayOf(node).join(','));
  if (dict[nodeHash]) return null;
  dict[nodeHash] = node;
  var checked = (0, _Array.arrayUnique)(this.curHash.concat(hashArrayOf(node))).length === this.curHash.length;
  if (checked) this.selectedNodes[nodeHash] = node;
  var radio = (0, _ACore._)({
    tag: _CheckBoxInput["default"].tag,
    style: {
      marginRight: '10px'
    },
    props: {
      checked: checked
    },
    on: {
      change: function change() {
        if (radio.checked) {
          self.selectedNodes[nodeHash] = node;
        } else {
          delete self.selectedNodes[nodeHash];
        }
        self.$view.$actionBtns[1].disabled = Object.keys(self.selectedNodes).length === 0;
      }
    }
  });
  return (0, _ACore._)({
    "class": 'as-omt-option-row',
    child: [radio, node.elt]
  });
};
OMTArrayMergeDialog.prototype.createView = function () {
  var _this = this;
  var self = this;
  /***
   * @type MessageDialog
   */
  this.$view = (0, _ACore._)({
    tag: _MessageDialog["default"].tag,
    "class": 'as-omt-dialog',
    props: {
      dialogTitle: {
        mlKey: 'txt_option'
      },
      dialogActions: [{
        text: 'OK',
        name: 'ok'
      }, {
        text: 'Cancel',
        name: 'cancel'
      }]
    },
    on: {
      action: function action(event) {
        self.stop();
        var action = event.action;
        if (action.name === 'cancel') return;
        if (action.name === 'ok') {
          self.assignResult();
        }
      }
    }
  });
  var dict = {};
  var rows = this.options.map(function (opt, i) {
    return _this._makeOptionRow(opt, i, dict);
  }).filter(function (x) {
    return !!x;
  });
  this.$view.addChild(rows);
  this.$modal = (0, _ACore._)({
    tag: _Modal["default"].tag,
    style: {
      zIndex: 1000000
    },
    child: this.$view
  });
};
var _default = OMTArrayMergeDialog;
exports["default"] = _default;

/***/ }),

/***/ 66722:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _ACore = __webpack_require__(34093);
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _MultiCheckTreeMenu = _interopRequireDefault(__webpack_require__(74934));
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
var _Array = __webpack_require__(40411);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends Fragment
 * @param {OMTEnumSet} node
 * @constructor
 */
function OMTEnumSetMergeDialog(node) {
  _Fragment["default"].call(this);
  this.node = node;
  this.calc();
  this.getView();
  this.start();
}
_OOP["default"].mixClass(OMTEnumSetMergeDialog, _Fragment["default"]);
OMTEnumSetMergeDialog.prototype.calc = function () {
  this.currentValues = this.node["export"]();
  this.descriptor = this.node.descriptor;
  this.selectOptions = this.node.getSelectOptions();
  this.selected = {};
};
OMTEnumSetMergeDialog.prototype.onStart = function () {
  this.$modal.addTo(document.body);
};
OMTEnumSetMergeDialog.prototype.onStop = function () {
  this.$modal.remove();
};
OMTEnumSetMergeDialog.prototype.assignResult = function () {
  var selectedValues = this._getCurrent();
  if (selectedValues.length > 0) {
    this.node.assign((0, _Array.arrayUnique)(this.currentValues.concat(selectedValues)));
    this.node.notifyChange();
  }
};
OMTEnumSetMergeDialog.prototype._getCurrent = function () {
  var _this = this;
  var selectedValues = this.selectOptions.reduce(function (ac, cr, i) {
    if (_this.selected[i]) ac = ac.concat(cr);
    return ac;
  }, []);
  selectedValues = (0, _Array.arrayUnique)(selectedValues);
  return selectedValues;
};
OMTEnumSetMergeDialog.prototype._makeOptionRow = function (opt, i) {
  var self = this;
  var checked = (0, _Array.arrayUnique)(this.currentValues.concat(opt)).length === (0, _Array.arrayUnique)(this.currentValues).length;
  this.selected[i] = checked;
  var checkbox = (0, _ACore._)({
    tag: _CheckBoxInput["default"].tag,
    style: {
      marginRight: '10px'
    },
    props: {
      checked: checked
    },
    on: {
      change: function change() {
        self.selected[i] = checkbox.checked;
        var currentValues = self._getCurrent();
        self.previewNode.assign(currentValues);
        self.$view.$actionBtns[1].disabled = currentValues.length === 0;
      }
    }
  });
  var mSelect = (0, _ACore._)({
    tag: _MultiCheckTreeMenu["default"].tag,
    "class": 'as-border-none',
    props: {
      pendingValues: opt,
      readOnly: true
    }
  });
  return (0, _ACore._)({
    "class": 'as-omt-option-row',
    child: [checkbox, mSelect]
  });
};
OMTEnumSetMergeDialog.prototype.createView = function () {
  var _this2 = this;
  var self = this;
  this.$optionRows = this.selectOptions.map(function (opt, i) {
    return _this2._makeOptionRow(opt, i);
  });
  this.previewNode = new this.node.constructor(this.node.tool, this.node.parent, this.node.descriptor);
  this.previewNode.assign(this.currentValues);
  this.$view = (0, _ACore._)({
    tag: _MessageDialog["default"].tag,
    "class": ['as-omt-dialog'],
    props: {
      dialogTitle: 'Merge',
      dialogActions: [{
        text: 'OK',
        name: 'ok'
      }, {
        text: 'Cancel',
        name: 'cancel'
      }]
    },
    on: {
      action: function action(event) {
        self.stop();
        if (event.action.name === 'ok') {
          self.assignResult();
        }
      }
    },
    child: [this.previewNode, {
      child: [{
        "class": 'as-omt-field-name',
        child: {
          text: 'Merge From'
        }
      }].concat(this.$optionRows)
    }]
  });
  Promise.resolve(this.descriptor.items).then(function (items) {
    (0, _ACore.$$)(_MultiCheckTreeMenu["default"].tag, _this2.$view).forEach(function (elt) {
      elt.items = items;
      elt.values = elt.pendingValues;
    });
  });
  this.$modal = (0, _ACore._)({
    tag: _Modal["default"].tag,
    style: {
      zIndex: 1000000
    },
    child: this.$view
  });
};
var _default = OMTEnumSetMergeDialog;
exports["default"] = _default;

/***/ }),

/***/ 33503:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _ACore = __webpack_require__(34093);
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _stringGenerate = __webpack_require__(10713);
var _RadioButton = _interopRequireDefault(__webpack_require__(30348));
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends Fragment
 * @param {OMTBaseType} node
 * @constructor
 */
function OMTSelectOptionsDialog(node) {
  _Fragment["default"].call(this);
  this.node = node;
  this.calc();
  this.getView();
  this.start();
}
_OOP["default"].mixClass(OMTSelectOptionsDialog, _Fragment["default"]);
OMTSelectOptionsDialog.prototype.calc = function () {
  this.options = this.node.getSelectOptions();
  this.curHash = this.node.getHash();
  this.selectedHash = this.curHash;
  this.selectedOption = null;
  this.ident = (0, _stringGenerate.randomIdent)(5);
};
OMTSelectOptionsDialog.prototype.onStart = function () {
  this.$modal.addTo(document.body);
};
OMTSelectOptionsDialog.prototype.onStop = function () {
  this.$modal.remove();
};
OMTSelectOptionsDialog.prototype.assignResult = function () {
  if (this.curHash !== this.selectedHash) {
    this.node.assign(this.selectedOption);
    this.node.updateRaw();
    this.node.notifyChange();
  }
};
OMTSelectOptionsDialog.prototype._makeOptionRow = function (opt, i, dict) {
  var descriptor = Object.assign({}, this.node.descriptor);
  if (i < 0) {
    descriptor.desc = '(current-mixed)';
  }
  var clazz = this.node.constructor;
  var node = new clazz(this.node.tool, this.node.parent, descriptor);
  node.assign(opt);
  var nodeHash = node.getHash();
  if (dict[nodeHash]) return null;
  dict[nodeHash] = node;
  var self = this;
  var radio = (0, _ACore._)({
    tag: _RadioButton["default"].tag,
    style: {
      marginRight: '10px'
    },
    props: {
      name: this.ident,
      checked: nodeHash === this.curHash
    },
    on: {
      change: function change() {
        if (radio.checked) {
          self.selectedHash = nodeHash;
          self.selectedOption = opt;
        }
      }
    }
  });
  return (0, _ACore._)({
    "class": 'as-omt-option-row',
    child: [radio, node.elt]
  });
};
OMTSelectOptionsDialog.prototype.createView = function () {
  var _this = this;
  var self = this;
  this.$view = (0, _ACore._)({
    tag: _MessageDialog["default"].tag,
    "class": 'as-omt-dialog',
    props: {
      dialogTitle: {
        mlKey: 'txt_option'
      },
      dialogActions: [{
        text: {
          mlKey: 'txt_ok'
        },
        name: 'ok'
      }, {
        text: {
          mlKey: 'txt_cancel'
        },
        name: 'cancel'
      }]
    },
    on: {
      action: function action(event) {
        self.stop();
        var action = event.action;
        if (action.name === 'cancel') return;
        if (action.name === 'ok') {
          self.assignResult();
        }
      }
    }
  });
  var dict = {};
  var rows = this.options.map(function (opt, i) {
    return _this._makeOptionRow(opt, i, dict);
  }).filter(function (x) {
    return !!x;
  });
  if (!dict[this.curHash]) {
    rows.unshift(this._makeOptionRow(this.node["export"](), -1, dict));
  }
  this.$view.addChild(rows);
  this.$modal = (0, _ACore._)({
    tag: _Modal["default"].tag,
    style: {
      zIndex: 1000000
    },
    child: this.$view
  });
};
var _default = OMTSelectOptionsDialog;
exports["default"] = _default;

/***/ }),

/***/ 99897:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
var _DateTimeInput = _interopRequireDefault(__webpack_require__(37800));
var _DateInput = _interopRequireDefault(__webpack_require__(47156));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTDate() {
  _OMTBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(OMTDate, _OMTBaseType["default"]);
_OMTBaseType["default"].classes.date = OMTDate;
OMTDate.prototype.type = 'date';
OMTDate.prototype.render = function () {
  _OMTBaseType["default"].prototype.render.call(this);
  this.$value = (0, _ACore._)({
    tag: _DateInput["default"].tag,
    "class": 'as-border-none',
    props: {
      readOnly: true
    }
  });
  if (this.descriptor.format) this.$value.format = this.descriptor.format;
  this.$body.addChild(this.$value);
};
OMTDate.prototype.assign = function (o) {
  this.value = o;
  this.$value.value = o;
};
OMTDate.prototype.getRaw = function () {
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      tag: 'span',
      child: {
        text: this.$value.text
      }
    }]
  };
};
var _default = OMTDate;
exports["default"] = _default;

/***/ }),

/***/ 83471:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
var _DateTimeInput = _interopRequireDefault(__webpack_require__(37800));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTDateTime() {
  _OMTBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(OMTDateTime, _OMTBaseType["default"]);
_OMTBaseType["default"].classes.datetime = OMTDateTime;
OMTDateTime.prototype.type = 'datetime';
OMTDateTime.prototype.render = function () {
  _OMTBaseType["default"].prototype.render.call(this);
  this.$value = (0, _ACore._)({
    tag: _DateTimeInput["default"].tag,
    "class": 'as-border-none',
    props: {
      readOnly: true
    }
  });
  if (this.descriptor.format) this.$value.format = this.descriptor.format;
  this.$body.addChild(this.$value);
};
OMTDateTime.prototype.assign = function (o) {
  this.value = o;
  this.$value.value = o;
};
OMTDateTime.prototype.getRaw = function () {
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      tag: 'span',
      child: {
        text: this.$value.text
      }
    }]
  };
};
var _default = OMTDateTime;
exports["default"] = _default;

/***/ }),

/***/ 31714:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _OMTArrayMergeDialog = _interopRequireDefault(__webpack_require__(9745));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTArray() {
  _OMTBaseType["default"].apply(this, arguments);
  this.value = null;
}
_OOP["default"].mixClass(OMTArray, _OMTBaseType["default"]);
_OMTBaseType["default"].classes.array = OMTArray;
OMTArray.prototype.commands = OMTArray.prototype.commands.concat([{
  name: 'merge',
  icon: 'span.mdi.mdi-set-merge',
  title: 'Merge'
}]);
OMTArray.prototype.execCmd = function (commandName) {
  _OMTBaseType["default"].prototype.execCmd.call(this, commandName);
  if (commandName === 'merge') {
    new _OMTArrayMergeDialog["default"](this);
  }
};
OMTArray.prototype.assign = function (o) {
  var _this = this;
  this.$body.clearChild();
  this.children = (o || []).map(function (it, i) {
    var desc = Object.assign({
      name: i,
      displayName: i + 1 + ''
    }, _this.descriptor.of);
    if (!desc.displayName) desc.displayName = i + 1 + '';
    var res = _OMTBaseType["default"].make(_this.tool, _this.parent, desc);
    res.assign(it);
    return res;
  });
  this.$body.addChild(this.children.map(function (c) {
    return c.elt;
  }));
};
OMTArray.prototype["export"] = function () {
  return this.children.map(function (c) {
    return c["export"]();
  });
};
OMTArray.prototype.getRaw = function () {
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      style: {
        paddingLeft: '25px'
      },
      child: this.children.map(function (child) {
        return child.getRaw();
      })
    }]
  };
};
var _default = OMTArray;
exports["default"] = _default;

/***/ }),

/***/ 73989:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _generator = __webpack_require__(18528);
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
var _stringGenerate = __webpack_require__(10713);
var _RadioInput = _interopRequireDefault(__webpack_require__(11655));
var _stringUtils = __webpack_require__(26243);
var _RadioButton = _interopRequireDefault(__webpack_require__(30348));
var _OMTSelectOptionsDialog = _interopRequireDefault(__webpack_require__(33503));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @constructor
 */
function OMTBaseType(tool, parent, descriptor) {
  this.tool = tool;
  this.parent = parent;
  this.level = parent ? parent.level + 1 : 0;
  this.descriptor = descriptor;
  this.render();
  this.elt.omtNode = this;
}
OMTBaseType.prototype.type = 'base';
OMTBaseType.prototype.commands = [{
  name: 'select_other',
  icon: 'span.mdi.mdi-menu-down',
  title: 'Select'
}];
OMTBaseType.prototype.render = function () {
  var _this = this;
  var self = this;
  var displayName = 'ROOT';
  if (this.descriptor.displayName !== undefined) displayName = this.descriptor.displayName + '';else if (this.descriptor.name !== undefined) displayName = this.descriptor.name + '';
  if (this.descriptor.desc) displayName += this.descriptor.desc;
  this.elt = (0, _ACore._)({
    "class": ['as-omt-field', 'as-type-' + this.type],
    style: {
      '--level': this.level
    },
    child: [{
      "class": 'as-omt-field-header',
      child: [{
        "class": 'as-omt-field-name',
        child: {
          text: displayName
        }
      }]
    }, {
      "class": 'as-omt-field-body'
    }, {
      "class": 'as-omt-field-raw-ctn'
    }, {
      "class": 'as-omt-field-command-ctn',
      child: this.commands.map(function (command) {
        return {
          tag: _FlexiconButton["default"].tag,
          attr: {
            'data-command': command.name
          },
          props: {
            icon: command.icon,
            title: command.title
          },
          on: {
            click: _this.execCmd.bind(_this, command.name, command)
          }
        };
      })
    }],
    on: {
      dblclick: function (event) {
        var target = event.target;
        while (target) {
          if (target === this) break;
          if (target.tagName === 'BUTTON') return;
          target = target.parentElement;
        }
        this.execCmd('select_other');
      }.bind(this)
    }
  });
  this.$commandCtn = (0, _ACore.$)('.as-omt-field-command-ctn', this.elt);
  this.$rawCtn = (0, _ACore.$)('.as-omt-field-raw-ctn', this.elt);
  this.$viewModeBtn = (0, _ACore._)({
    tag: _FlexiconButton["default"].tag,
    attr: {
      'data-command': 'view_mode'
    },
    props: {
      icon: 'span.mdi.mdi.mdi-code-braces',
      //code-braces
      title: 'View Raw'
    },
    on: {
      click: function click() {
        if (self.elt.hasClass('as-mode-raw')) {
          self.elt.removeClass('as-mode-raw');
          this.icon = 'span.mdi.mdi-code-braces';
          this.title = 'View Raw';
        } else {
          self.elt.addClass('as-mode-raw');
          this.icon = 'span.mdi.mdi-view-dashboard-edit-outline';
          this.title = 'View Guide';
          self.updateRaw();
        }
      }
    }
  });
  this.$commandCtn.addChild(this.$viewModeBtn);
  this.$body = (0, _ACore.$)('.as-omt-field-body', this.elt);
};
OMTBaseType.prototype.updateRaw = function () {
  var rawElt = (0, _ACore._)(this.getRaw());
  this.$rawCtn.clearChild().addChild(rawElt);
};
OMTBaseType.prototype.notifyChange = function () {
  this.descriptor.onchange && this.descriptor.onchange.call(this, {
    type: 'change',
    target: this,
    descriptor: this.descriptor
  }, this);
  this.tool.notifyChange();
};
OMTBaseType.prototype.getRaw = function () {
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      tag: 'code',
      child: {
        text: (0, _generator.generateJSVariable)(this["export"]())
      }
    }]
  };
};
OMTBaseType.prototype.assign = function (o) {
  this.value = o;
  this.$body.clearChild().addChild((0, _ACore._)({
    tag: 'code',
    child: {
      text: (0, _generator.generateJSVariable)(o)
    }
  }));
};
OMTBaseType.prototype.getHash = function () {
  return (0, _stringUtils.stringHashCode)((0, _generator.generateJSVariable)(this["export"]()));
};
OMTBaseType.prototype["export"] = function () {
  return this.value;
};
OMTBaseType.prototype.execCmd = function (commandName, command) {
  if (commandName === 'select_other') {
    this.userSelect();
  }
};
OMTBaseType.prototype.getSelectOptions = function () {
  if (!this.parent) return this.tool.objects;
  var parentOptions = this.parent.getSelectOptions().filter(function (x) {
    return !!x;
  });
  var name = this.descriptor.name;
  return parentOptions.map(function (ot) {
    return ot[name];
  }).filter(function (ot) {
    return ot !== undefined;
  });
};
OMTBaseType.prototype.userSelect = function () {
  new _OMTSelectOptionsDialog["default"](this);
};
OMTBaseType.classes = {};

/***
 *
 * @param tool
 * @param parent
 * @param descriptor
 * @returns {OMTBaseType}
 */
OMTBaseType.make = function (tool, parent, descriptor) {
  var clazz = OMTBaseType.classes[descriptor.type] || OMTBaseType;
  return new clazz(tool, parent, descriptor);
};
var _default = OMTBaseType;
exports["default"] = _default;

/***/ }),

/***/ 16680:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _OMTFile = _interopRequireDefault(__webpack_require__(2553));
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _CheckBoxInput = _interopRequireDefault(__webpack_require__(8398));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTBool() {
  _OMTBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(OMTBool, _OMTBaseType["default"]);
_OMTBaseType["default"].classes.bool = OMTBool;
OMTBool.prototype.type = 'bool';
OMTBool.prototype.render = function () {
  _OMTBaseType["default"].prototype.render.call(this);
  this.$value = (0, _ACore._)({
    tag: _CheckBoxInput["default"],
    props: {
      readOnly: true
    }
  });
  this.$body.addChild(this.$value);
};
OMTBool.prototype.assign = function (o) {
  this.value = o;
  this.$value.checked = !!o;
};
var _default = OMTBool;
exports["default"] = _default;

/***/ }),

/***/ 23717:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _OMTFile = _interopRequireDefault(__webpack_require__(2553));
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _stringUtils = __webpack_require__(26243);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTColor() {
  _OMTBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(OMTColor, _OMTBaseType["default"]);
_OMTBaseType["default"].classes.color = OMTColor;
OMTColor.prototype.type = 'color';
OMTColor.prototype.render = function () {
  _OMTBaseType["default"].prototype.render.call(this);
  this.$value = (0, _ACore._)({
    "class": "as-omt-field-color-value-bg",
    child: '.as-omt-field-color-value'
  });
  this.$body.addChild(this.$value);
};
OMTColor.prototype.assign = function (o) {
  this.value = o;
  var color = 'transparent';
  try {
    if (o instanceof _Color["default"]) {
      color = o.toString("hex8");
    } else if (typeof o === "string") {
      color = _Color["default"].parse(o).toString("hex8");
    }
  } catch (err) {}
  this.color = color;
  this.$value.addStyle('--omt-color-value', color);
};
OMTColor.prototype.getHash = function () {
  return (0, _stringUtils.stringHashCode)(this.color + '');
};
OMTColor.prototype.getRaw = function () {
  var color = _Color["default"].parse(this.color);
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      tag: 'span',
      style: {
        color: color.toString('hex6')
      },
      child: {
        text: this.color
      }
    }]
  };
};
var _default = OMTColor;
exports["default"] = _default;

/***/ }),

/***/ 67627:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _SelectTreeMenu = _interopRequireDefault(__webpack_require__(75823));
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTEnum() {
  _OMTBaseType["default"].apply(this, arguments);
  this.value = null;
}
_OOP["default"].mixClass(OMTEnum, _OMTBaseType["default"]);
_OMTBaseType["default"].classes["enum"] = OMTEnum;
OMTEnum.prototype.render = function () {
  var _this = this;
  _OMTBaseType["default"].prototype.render.call(this);
  this.$value = (0, _ACore._)({
    tag: _SelectTreeMenu["default"].tag,
    "class": 'as-border-none',
    style: {
      height: '18px'
    },
    props: {
      readOnly: true
    }
  });
  this.$body.addChild(this.$value);
  if (this.descriptor.items && this.descriptor.items.then) {
    this.descriptor.items.then(function (items) {
      _this.$value.items = items;
    });
  } else {
    this.$value.items = this.descriptor.items;
  }
};
OMTEnum.prototype.assign = function (o) {
  this.value = o;
  this.$value.value = o;
};
OMTEnum.prototype.getRaw = function () {
  var text = '';
  var holders = this.$value.findItemsByValue(this["export"]());
  if (holders && holders.length > 0) {
    text = holders[0].item.text;
    if (holders[0].item.desc) text += ' - ' + holders[0].item.desc;
  }
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      tag: 'span',
      child: {
        text: text
      }
    }]
  };
};
var _default = OMTEnum;
exports["default"] = _default;

/***/ }),

/***/ 41274:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _SelectTreeMenu = _interopRequireDefault(__webpack_require__(75823));
var _DualSelectMenu = _interopRequireDefault(__webpack_require__(34219));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTEnumOfPair() {
  _OMTBaseType["default"].apply(this, arguments);
  this.value = null;
}
_OOP["default"].mixClass(OMTEnumOfPair, _OMTBaseType["default"]);
_OMTBaseType["default"].classes['enum<pair>'] = OMTEnumOfPair;
OMTEnumOfPair.prototype.type = 'enum<pair>';
OMTEnumOfPair.prototype.render = function () {
  var _this = this;
  _OMTBaseType["default"].prototype.render.call(this);
  this.$value = (0, _ACore._)({
    tag: _DualSelectMenu["default"].tag,
    "class": 'as-border-none',
    style: {
      height: '18px'
    },
    props: {
      readOnly: true
    }
  });
  this.$body.addChild(this.$value);
  if (this.descriptor.items && this.descriptor.items.then) {
    this.descriptor.items.then(function (items) {
      _this.$value.items = items;
    });
  } else {
    this.$value.items = this.descriptor.items;
  }
};
OMTEnumOfPair.prototype.assign = function (o) {
  this.value = o;
  this.$value.value = o;
};
OMTEnumOfPair.prototype.getRaw = function () {
  var text = this.$value.$item && this.$value.$item.innerText;
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      tag: 'span',
      child: {
        text: text
      }
    }]
  };
};
var _default = OMTEnumOfPair;
exports["default"] = _default;

/***/ }),

/***/ 9159:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _OMTArray = _interopRequireDefault(__webpack_require__(31714));
var _OMTEnumSetMergeDialog = _interopRequireDefault(__webpack_require__(66722));
var _MultiCheckMenu = _interopRequireDefault(__webpack_require__(59346));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTEnumSet() {
  _OMTBaseType["default"].apply(this, arguments);
  this.value = null;
  this._flatTreeItems();
}
_OOP["default"].mixClass(OMTEnumSet, _OMTBaseType["default"]);
_OMTBaseType["default"].classes['{enum}'] = OMTEnumSet;
OMTEnumSet.prototype.commands = _OMTArray["default"].prototype.commands.slice();
OMTEnumSet.prototype._flatTreeItems = function () {
  if (!this.descriptor.flat) {
    this.descriptor.flat = true;
    this.descriptor.items = this.descriptor.items.reduce(function visit(ac, cr) {
      var item = Object.assign({}, cr);
      ac.push(item);
      if (item.items && item.items.length > 0) {
        item.items.reduce(visit, ac);
      }
      delete item.items;
      return ac;
    }, []);
  }
};
OMTEnumSet.prototype.render = function () {
  _OMTBaseType["default"].prototype.render.call(this);
  this.$value = (0, _ACore._)({
    tag: _MultiCheckMenu["default"].tag,
    "class": 'as-border-none',
    style: {
      height: '18px'
    },
    props: {
      readOnly: true,
      strictValue: false
    }
  });
  this.$body.addChild(this.$value);
  this.$value.items = this.descriptor.items;
  this.$value.values = this.value;
};
OMTEnumSet.prototype.assign = function (o) {
  this.value = o;
  this.$value.values = o;
};
OMTEnumSet.prototype.execCmd = function (commandName) {
  _OMTBaseType["default"].prototype.execCmd.call(this, commandName);
  if (commandName === 'merge') {
    this.userMerge();
  }
};
OMTEnumSet.prototype.userMerge = function () {
  //as-omt-option-row

  new _OMTEnumSetMergeDialog["default"](this);
};
OMTEnumSet.prototype.getRaw = function () {
  var _this = this;
  var textItems = this["export"]().map(function (value) {
    var text = '';
    var holders = _this.$value.findItemsByValue(value);
    if (holders && holders.length > 0) {
      text = holders[0].item.text;
      if (holders[0].item.desc) text += ' - ' + holders[0].item.desc;
    }
    return text;
  });
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      style: {
        paddingLeft: '25px'
      },
      child: textItems.map(function (text) {
        return {
          tag: 'li',
          child: {
            text: text
          }
        };
      })
    }]
  };
};
var _default = OMTEnumSet;
exports["default"] = _default;

/***/ }),

/***/ 2553:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _FileListItem = _interopRequireDefault(__webpack_require__(62355));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTFile() {
  _OMTBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(OMTFile, _OMTBaseType["default"]);
_OMTBaseType["default"].classes.file = OMTFile;
_OMTBaseType["default"].prototype.type = 'file';
OMTFile.prototype.render = function () {
  _OMTBaseType["default"].prototype.render.call(this);
  this.$value = (0, _ACore._)({
    tag: _FileListItem["default"].tag,
    "class": 'as-omt-field-value'
  });
  this.$body.addChild(this.$value);
};
OMTFile.prototype.assign = function (o) {
  this.value = o;
  if (o) {
    this.$value.value = o;
    this.$value.removeStyle('display');
  } else {
    this.$value.addStyle('display', 'none');
  }
};
OMTFile.prototype.getRaw = function () {
  var info = (0, _utils.fileInfoOf)(this.value);
  var href = info.url;
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      tag: 'a',
      props: {
        href: href,
        target: '_blank'
      },
      child: {
        text: info.name
      }
    }]
  };
};
var _default = OMTFile;
exports["default"] = _default;

/***/ }),

/***/ 137:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _FileListInput = _interopRequireDefault(__webpack_require__(13146));
var _OMTArray = _interopRequireDefault(__webpack_require__(31714));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTFileArray() {
  _OMTBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(OMTFileArray, _OMTBaseType["default"]);
_OMTBaseType["default"].classes['file[]'] = OMTFileArray;
OMTFileArray.prototype.type = 'file[]';
OMTFileArray.prototype.commands = _OMTArray["default"].prototype.commands.slice();
OMTFileArray.prototype.render = function () {
  _OMTBaseType["default"].prototype.render.call(this);
  this.$value = (0, _ACore._)({
    tag: _FileListInput["default"].tag,
    "class": ['as-omt-field-value', 'as-border-none'],
    props: {
      readOnly: true
    }
  });
  this.$body.addChild(this.$value);
};
OMTFileArray.prototype.assign = function (o) {
  this.value = o;
  if (o instanceof Array) {
    this.$value.files = o;
    this.$value.removeStyle('display');
  } else {
    this.$value.addStyle('display', 'none');
  }
};
OMTFileArray.prototype.getHash = function () {
  return (0, _utils.calcDTQueryHash)(this.value);
};
OMTFileArray.prototype.getRaw = function () {
  var infoArr = (this.value || []).map(function (it) {
    return (0, _utils.fileInfoOf)(it);
  });
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      style: {
        paddingLeft: '25px'
      },
      child: infoArr.map(function (info) {
        return {
          tag: 'a',
          props: info.url ? {
            href: info.url,
            target: '_blank'
          } : {},
          child: {
            text: info.name
          }
        };
      })
    }]
  };
};
var _default = OMTFileArray;
exports["default"] = _default;

/***/ }),

/***/ 53699:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTHtml() {
  _OMTBaseType["default"].apply(this, arguments);
  this.value = null;
}
_OOP["default"].mixClass(OMTHtml, _OMTBaseType["default"]);
_OMTBaseType["default"].classes.html = OMTHtml;
OMTHtml.prototype.type = 'html';
OMTHtml.prototype.assign = function (o) {
  this.value = o;
  this.$body.clearChild();
  this.$value = (0, _ACore._)({
    tag: 'div',
    props: {
      innerHTML: o
    }
  });
  this.$body.addChild(this.$value);
};
OMTHtml.prototype.getRaw = function () {
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      tag: 'span',
      child: {
        text: this["export"]()
      }
    }]
  };
};
var _default = OMTHtml;
exports["default"] = _default;

/***/ }),

/***/ 25174:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _OMTFile = _interopRequireDefault(__webpack_require__(2553));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTImage() {
  _OMTBaseType["default"].apply(this, arguments);
}
_OOP["default"].mixClass(OMTImage, _OMTBaseType["default"]);
_OMTBaseType["default"].classes.image = OMTImage;
_OMTBaseType["default"].prototype.type = 'image';
OMTImage.prototype.assign = function (o) {
  var _this = this;
  this.value = o;
  var title = '';
  this.$body.clearChild();
  var handle = function handle(val) {
    if (!val) return;
    if (val && val.then) {
      val.then(handle);
      return;
    }
    if (val && val.url) {
      handle(val.url);
      return;
    }
    if (val instanceof File || val instanceof Blob) {
      val.url = val.url || URL.createObjectURL(val);
      if (!title && val.filename) title = val.filename;
      handle(val);
      return;
    }
    if (!title) title = val.split('/').pop().split('?').shift();
    _this.$value = (0, _ACore._)({
      tag: 'img',
      "class": 'as-omt-field-value',
      props: {
        src: val,
        title: title
      }
    });
    _this.$body.addChild(_this.$value);
  };
  handle(o);
};
OMTImage.prototype.getRaw = _OMTFile["default"].prototype.getRaw;
var _default = OMTImage;
exports["default"] = _default;

/***/ }),

/***/ 39699:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTString() {
  _OMTBaseType["default"].apply(this, arguments);
  this.value = null;
}
_OOP["default"].mixClass(OMTString, _OMTBaseType["default"]);
_OMTBaseType["default"].classes.string = OMTString;
OMTString.prototype.assign = function (o) {
  this.value = o;
  this.$body.clearChild();
  this.$value = (0, _ACore._)({
    tag: 'span',
    child: {
      text: (o || '') + ''
    }
  });
  this.$body.addChild(this.$value);
};
OMTString.prototype.getRaw = function () {
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      tag: 'span',
      child: {
        text: this["export"]()
      }
    }]
  };
};
var _default = OMTString;
exports["default"] = _default;

/***/ }),

/***/ 20117:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OMTBaseType = _interopRequireDefault(__webpack_require__(73989));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ACore = __webpack_require__(34093);
var _stringUtils = __webpack_require__(26243);
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends OMTBaseType
 * @constructor
 */
function OMTStruct() {
  var _this = this;
  _OMTBaseType["default"].apply(this, arguments);
  this.children = (this.descriptor.fields || []).map(function (field) {
    return _OMTBaseType["default"].make(_this.tool, _this, field);
  });
  this.$body.addChild(this.children.map(function (child) {
    return child.elt;
  }));
  this.data = null;
}
_OOP["default"].mixClass(OMTStruct, _OMTBaseType["default"]);
OMTStruct.prototype.type = 'struct';
OMTStruct.prototype.assign = function (o) {
  if (o !== null && _typeof(o) === "object") {
    this.elt.removeClass('as-null');
    this.children.forEach(function (child) {
      var name = child.descriptor.name;
      child.assign(o[name]);
    });
  } else {
    this.elt.addClass('as-null');
  }
};
OMTStruct.prototype["export"] = function () {
  return this.children.reduce(function (ac, cr) {
    ac[cr.descriptor.name] = cr["export"]();
    return ac;
  }, {});
};
OMTStruct.prototype.getHash = function () {
  var hash = this.children.map(function (c) {
    return c.getHash();
  }).join('_');
  return (0, _stringUtils.stringHashCode)(hash);
};
OMTStruct.prototype.getRaw = function () {
  return {
    child: [{
      tag: 'span',
      "class": 'as-omt-field-name',
      child: {
        text: (this.descriptor.displayName || this.descriptor.name || "ROOT") + ': '
      }
    }, {
      style: {
        paddingLeft: '25px'
      },
      child: this.children.map(function (child) {
        return child.getRaw();
      })
    }]
  };
};
_OMTBaseType["default"].classes.struct = OMTStruct;
var _default = OMTStruct;
exports["default"] = _default;

/***/ }),

/***/ 1130:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.silentDownloadAsPdf = silentDownloadAsPdf;
var _printer = __webpack_require__(97397);
var _FileSaver = __webpack_require__(53069);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Toast = _interopRequireDefault(__webpack_require__(68105));
var _pdf = __webpack_require__(38522);
var _ProgressBar = _interopRequireDefault(__webpack_require__(49087));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function silentDownloadAsPdf(adapter) {
  if (!adapter) throw new Error("Invalid print data");
  adapter.parallel = adapter.parallel || 8;
  adapter.delay = adapter.delay || 0;
  adapter.chuckLength = 100;
  adapter.fileName = adapter.fileName || 'exports.pdf';
  if (adapter.paddingEven !== false) {
    adapter.paddingEven = true;
  }
  if (!adapter.fileName.toLowerCase().endsWith('.pdf')) adapter.fileName += '.pdf';
  var hiddenDiv = (0, _ACore._)({
    style: {
      overflow: 'scroll',
      visibility: 'hidden',
      opacity: 0,
      pointerEvents: 'none',
      position: 'fixed',
      zIndex: -1000
    }
  }).addTo(document.body);
  var progressBar = (0, _ACore._)({
    tag: _ProgressBar["default"],
    style: {
      margin: '5px'
    }
  });
  var message = (0, _ACore._)({
    tag: 'span',
    style: {
      margin: '5px'
    },
    child: {
      text: 'Render'
    }
  });
  /***
   *
   * @type {Toast}
   */
  var toast = _Toast["default"].make({
    props: {
      htitle: "Export DPF"
    },
    child: [{
      tag: 'div',
      style: {
        margin: '5px'
      },
      child: {
        tag: 'strong',
        child: {
          text: adapter.fileName
        }
      }
    }, message, progressBar]
  });
  return new Promise(function (resolve) {
    var docs = adapter.docs.slice();
    var docsN = docs.length;
    var serializer = _printer.ShareSerializer;
    var chucks = [];
    var chuckRemain;
    var printer;
    var finish = function finish() {
      message.firstChild.data = "Create PDF";
      (0, _pdf.mergePdfs)(chucks, function (pData) {
        progressBar.value = 0.9 + (pData.loaded + pData.merged) / (pData.all || 1) / 10;
      }).then(function (mergedPdf) {
        mergedPdf.save().then(function (file) {
          (0, _FileSaver.saveAs)(new Blob([file]), adapter.fileName);
          progressBar.value = 1;
          message.firstChild.data = "Complete";
          setTimeout(function () {
            toast.disappear();
          }, 5000);
        });
      });
    };
    var nextChuck = function nextChuck() {
      chuckRemain = Math.min(adapter.chuckLength, docs.length);
      printer = new _printer.PaperPrinter(Object.assign({
        lastPagePaddingEven: docs.length <= chuckRemain
      }, adapter));
      process();
    };
    var finishChuck = function finishChuck() {
      chucks.push(printer.pdfDoc.output('arraybuffer'));
      if (docs.length > 0) {
        nextChuck();
      } else {
        finish();
      }
    };
    var process = function process() {
      message.firstChild.data = 'Render (' + (docsN - docs.length) + '/' + docsN + ')';
      var pg0 = 0.9 * (1 - docs.length / (docsN || 1));
      progressBar.value = pg0;
      if (chuckRemain === 0) {
        finishChuck();
        return;
      }
      var cDocs = docs.splice(0, Math.min(adapter.parallel, chuckRemain));
      chuckRemain -= cDocs.length;
      var localSync = cDocs.map(function (doc) {
        var ctn = (0, _ACore._)({
          style: {
            width: '2048px'
          }
        }).addTo(hiddenDiv);
        var renderSync = doc.render(ctn, doc);
        if (renderSync && renderSync.then) {
          renderSync = renderSync.then(function () {
            return Object.assign({}, doc, {
              elt: ctn.firstChild
            });
          });
        } else {
          renderSync = Promise.resolve(Object.assign({}, doc, {
            elt: ctn.firstChild
          }));
        }
        return renderSync.then(function (doc) {
          var delaySync = [];
          delaySync.push(new Promise(function (resolve) {
            setTimeout(resolve, adapter.delay);
          }));
          var elt = doc.elt;
          if (elt.fmComponent) {
            if (!doc.opt) doc.opt = {};
            if (!doc.opt.margin) {
              doc.opt.margin = {
                top: elt.fmComponent.style.paddingTop || 57,
                left: elt.fmComponent.style.paddingLeft || 57,
                bottom: elt.fmComponent.style.paddingBottom || 57,
                right: elt.fmComponent.style.paddingRight || 57
              };
            }
            delaySync.push(elt.fmComponent.fragment.afterEntryCompleted());
          }
          return Promise.all(delaySync).then(function () {
            return doc;
          });
        });
      });
      Promise.all(localSync).then(function (docList) {
        return serializer.serialize(docList, printer, function (pData) {
          if (!pData.pdf) return;
          var ng1 = pg0 + pData.pdf.done / (pData.pdf.all || 1) * cDocs.length / (docsN || 1) * 0.9;
          if (ng1 - progressBar.value > 0.05) {
            progressBar.value = ng1;
          }
        });
      }).then(function () {
        return printer.flush();
      }).then(function () {
        return process();
      });
    };
    nextChuck();
  });
}

/***/ }),

/***/ 11032:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MListModalV2 = MListModalV2;
exports["default"] = exports.VALUE_NORMAL = exports.VALUE_HIDDEN = void 0;
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _MSelectList = __webpack_require__(14899);
var _SelectListBox = _interopRequireDefault(__webpack_require__(47818));
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _ListSearchMaster = _interopRequireDefault(__webpack_require__(85604));
var _utils = __webpack_require__(84512);
var _DelaySignal = _interopRequireDefault(__webpack_require__(81809));
var _TextMeasure = _interopRequireDefault(__webpack_require__(60268));
var _OOP = __webpack_require__(38608);
var _search = __webpack_require__(67858);
var _stringGenerate = __webpack_require__(10713);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var VALUE_HIDDEN = -1;
exports.VALUE_HIDDEN = VALUE_HIDDEN;
var VALUE_NORMAL = 1;

/***
 * @extends AElement
 * @constructor
 */
exports.VALUE_NORMAL = VALUE_NORMAL;
function MListModal() {
  this._initDomHook();
  this._initControl();
  this._initScroller();
  this._initProperty();
}
MListModal.tag = "MListModal".toLowerCase();
MListModal.render = function () {
  return (0, _ACore._)({
    extendEvent: ['pressitem', 'pressclose', 'pressout'],
    "class": 'am-list-modal',
    child: [{
      "class": ['am-list-popup-box'],
      child: [{
        "class": 'am-list-popup-header',
        child: [{
          tag: 'searchtextinput'
        }, {
          tag: 'button',
          "class": 'am-list-popup-close-btn',
          child: 'span.mdi.mdi-close'
        }]
      }, {
        "class": 'am-list-popup-list-scroller',
        child: {
          "class": 'am-list-popup-content',
          child: Array(MListModal.prototype.preLoadN).fill('.am-list-popup-list-page.am-selectlist')
        }
      }]
    }]
  });
};
MListModal.prototype.toLoadNextY = 200;
MListModal.prototype.preLoadN = 5;
MListModal.prototype._initDomHook = function () {
  this.estimateSize = {
    width: 0
  };
  this.$attachhook = (0, _ACore._)('attachhook').addTo(this);
  this.$attachhook._isAttached = false;
  this.$attachhook.requestUpdateSize = this.updateSize.bind(this);
  this.$attachhook.on('attached', function () {
    _Dom["default"].addToResizeSystem(this);
    this.requestUpdateSize();
    this._isAttached = true;
  });
  this.domSignal = new _DelaySignal["default"]();
  this.domSignal.on('viewListAt', this.viewListAt.bind(this));
  this.domSignal.on('viewListAtFirstSelected', this.viewListAtFirstSelected.bind(this));
  this.searchMaster = new _ListSearchMaster["default"]();
};
MListModal.prototype.cancelWaiting = function () {
  this.$attachhook.cancelWaiting();
};
MListModal.prototype._initControl = function () {
  this._currentOffset = 0;
  this._startItemIdx = 0;
  this.$closeBtn = (0, _ACore.$)('.am-list-popup-close-btn', this).on('click', this.notifyPressClose.bind(this));
  this.on('click', this.eventHandler.click);
  this.$box = (0, _ACore.$)('.am-list-popup-box', this);
  this.$searchInput = (0, _ACore.$)('searchtextinput', this).on('stoptyping', this.eventHandler.searchModify);
};
MListModal.prototype._initScroller = function () {
  this._estimateHeight = 0;
  this._pageOffsets = Array(this.preLoadN + 1).fill(0);
  this._pageYs = Array(this.preLoadN + 1).fill(0);
  this.$listScroller = (0, _ACore.$)('.am-list-popup-list-scroller', this).on('scroll', this.eventHandler.scroll);
  this.$content = (0, _ACore.$)('.am-list-popup-content', this);
  this.$listPages = (0, _ACore.$$)('.am-list-popup-list-page', this);
};
MListModal.prototype._initProperty = function () {
  this._items = [];
  this._values = [];
  this._valueDict = {};
  this._itemsByValue = {};
  this._preDisplayItems = [];
  this._displayItems = [];
  this._searchCache = {};
  this._displayValue = VALUE_NORMAL;
  this.displayValue = VALUE_NORMAL;
  this.items = [];
};
MListModal.prototype.findItemsByValue = function (value) {
  //keep
  return this._itemsByValue[(0, _utils.keyStringOf)(value)];
};
MListModal.prototype.updateSize = function () {
  var bound = this.getBoundingClientRect();
  var boxBound = this.$box.getBoundingClientRect();
  var listScrollerBound = this.$listScroller.getBoundingClientRect();
  this.$listScroller.addStyle('max-height', 'calc(' + (bound.height - listScrollerBound.top + boxBound.top) + 'px - var(--modal-margin-bottom) - var(--modal-margin-top))');
};
MListModal.prototype._requireItem = function (pageElt, n) {
  var itemElt;
  while (pageElt.childNodes.length > n) {
    itemElt = pageElt.lastChild;
    itemElt.selfRemove();
    (0, _MSelectList.releaseItem)(itemElt);
  }
  while (pageElt.childNodes.length < n) {
    itemElt = (0, _MSelectList.requireItem)(this);
    pageElt.addChild(itemElt);
  }
};
MListModal.prototype._listToDisplay = function (items) {
  //keep
  return items;
};

/***
 *
 * @param {Array<{value:String|Number}>} items
 * @return {Array<{value:String|Number}>}
 */
MListModal.prototype._filterValue = function (items) {
  if (this._displayValue === VALUE_NORMAL) return items;
  var dict = this._valueDict;
  return items.filter(function (item) {
    return !dict[item.value + ''];
  });
};
MListModal.prototype._assignItems = function (pageElt, offset) {
  var n = Math.min(this._displayItems.length - offset, pageElt.childNodes.length);
  var itemElt, value;
  for (var i = 0; i < n; ++i) {
    itemElt = pageElt.childNodes[i];
    itemElt.data = this._displayItems[offset + i];
    value = itemElt.value + '';
  }
};
MListModal.prototype._alignPage = function () {
  var pageElt;
  var pageBound;
  for (var i = 0; i < this.$listPages.length; ++i) {
    pageElt = this.$listPages[i];
    pageBound = pageElt.getBoundingClientRect();
    if (i > 0) this.$listPages[i].addStyle('top', this._pageYs[i] + 'px');
    this._pageYs[i + 1] = this._pageYs[i] + pageBound.height;
  }
  this.$content.addStyle('height', this._pageYs[this.preLoadN] + 'px');
};
MListModal.prototype._updateSelectedItem = function () {
  var valueDict = this._valueDict;
  this.$listPages.forEach(function (pageElt) {
    Array.prototype.forEach.call(pageElt.childNodes, function (itemElt) {
      var value = itemElt.value + '';
      if (valueDict[value]) {
        itemElt.selected = true;
      } else {
        itemElt.selected = false;
      }
    });
  });
  if (this._displayValue === VALUE_HIDDEN) this._alignPage();
};
MListModal.prototype.viewListAt = function (offset) {
  if (!this.isDescendantOf(document.body)) {
    this.domSignal.emit('viewListAt', offset);
    return;
  }
  var fontSize = this.$listScroller.getFontSize() || 14;
  offset = Math.max(0, Math.min(offset, this._displayItems.length - 1));
  var screenSize = _Dom["default"].getScreenSize();
  var maxItem = Math.ceil(screenSize.height / (fontSize * 2.25));
  var contentBound = this.$content.getBoundingClientRect();
  this._pageOffsets[0] = Math.max(offset - maxItem, 0);
  for (var i = 1; i <= this.preLoadN; ++i) {
    this._pageOffsets[i] = Math.min(this._pageOffsets[i - 1] + maxItem, this._displayItems.length);
  }
  var sIdx, nItem, pageBound;
  var pageElt;
  for (var pageIndex = 0; pageIndex < this.preLoadN; ++pageIndex) {
    sIdx = this._pageOffsets[pageIndex];
    nItem = this._pageOffsets[pageIndex + 1] - sIdx;
    pageElt = this.$listPages[pageIndex];
    if (pageIndex === 0) {
      this._pageYs[pageIndex] = sIdx / this._displayItems.length * contentBound.height;
    }
    pageElt.addStyle('top', this._pageYs[pageIndex] + 'px');
    this._requireItem(pageElt, nItem);
    this._assignItems(pageElt, sIdx);
    pageBound = pageElt.getBoundingClientRect();
    this._pageYs[pageIndex + 1] = this._pageYs[pageIndex] + pageBound.height;
  }
  if (this._pageOffsets[this.preLoadN] === this._displayItems.length) {
    this.$content.addStyle('height', this._pageYs[this.preLoadN] + 'px');
  } else {
    this.$content.addStyle('height', this._estimateHeight + 'px');
  }
  this._updateSelectedItem();
};
MListModal.prototype.viewListAtFirstSelected = function () {
  if (!this.isDescendantOf(document.body)) {
    this.domSignal.emit('viewListAtFirstSelected');
    return;
  }
  if (this._displayValue == VALUE_HIDDEN) {
    return false;
  } else if (this._values.length > 0) {
    var value = this._values[0];
    var itemHolders = this._itemHolderByValue[value + ''];
    if (itemHolders) {
      this.domSignal.once('scrollIntoSelected', function () {
        var holder = itemHolders[0];
        this.viewListAt(holder.idx);
        var itemElt = (0, _ACore.$)('.as-selected', this.$listScroller);
        if (itemElt) {
          var scrollBound = this.$listScroller.getBoundingClientRect();
          var itemBound = itemElt.getBoundingClientRect();
          this.$listScroller.scrollTop += itemBound.top - scrollBound.top;
        }
      }.bind(this));
      this.domSignal.emit('scrollIntoSelected');
      return true;
    } else return false;
  } else return false;
};
MListModal.prototype.searchItemByText = _SelectListBox["default"].prototype.searchItemByText;
MListModal.prototype.prepareSearch = _SelectListBox["default"].prototype.prepareSearch;
MListModal.prototype.resetSearchState = function () {
  this.$searchInput.value = '';
  this._preDisplayItems = this._listToDisplay(this._items);
  this._displayItems = this._filterValue(this._preDisplayItems);
  this._updateItemIndex();
  this.domSignal.emit('viewListAt', 0);
  this.$listScroller.scrollTop = 0;
};
MListModal.prototype.notifyPressOut = function () {
  this.emit('pressout', {
    target: this,
    type: 'pressout'
  }, this);
};
MListModal.prototype.notifyPressClose = function () {
  this.emit('pressclose', {
    target: this,
    type: 'pressclose'
  }, this);
};
MListModal.prototype._findFirstPageIdx = function () {
  for (var i = 0; i < this.preLoadN; ++i) {
    if (this._pageOffsets[i + 1] - this._pageOffsets[i] > 0) {
      return i;
    }
  }
  return -1;
};
MListModal.prototype._findLastPageIdx = function () {
  for (var i = this.preLoadN - 1; i >= 0; --i) {
    if (this._pageOffsets[i + 1] - this._pageOffsets[i] > 0) {
      return i;
    }
  }
  return -1;
};
MListModal.prototype._updateItemIndex = function () {
  this._itemHolderByValue = this._displayItems.reduce(function (ac, cr, idx) {
    var value = typeof cr === "string" ? cr : cr.value + '';
    ac[value] = ac[value] || [];
    ac[value].push({
      idx: idx,
      item: cr
    });
    return ac;
  }, {});
};
MListModal.property = {};

/***
 *
 * @type {MListModal}
 */
MListModal.property.items = {
  get: function get() {
    return this._items;
  },
  set: function set(items) {
    var _this = this;
    items = items || [];
    if (!Array.isArray(items)) items = []; //no
    items = (0, _utils.copySelectionItemArray)(items);
    this._items = items;
    this._preDisplayItems = this._listToDisplay(this._items);
    this._displayItems = this._filterValue(this._preDisplayItems);
    this._itemsByValue = items.reduce(function reducer(ac, cr) {
      var key = (0, _utils.keyStringOf)(cr.value);
      if (!ac[key]) ac[key] = [];else console.error("Duplicate value", cr);
      ac[key].push(cr);
      if (cr.items && cr.items.reduce) cr.items.reduce(reducer, ac);
      return ac;
    }, {});
    this._updateItemIndex();

    /*****************/
    this.idx2key = [];
    var makeSearchItem = function makeSearchItem(it) {
      var res = {
        value: _this.idx2key.length
      };
      var valueKey;
      res.text = it.text + '';
      if (it.desc) res.text += it.desc;
      valueKey = (0, _utils.keyStringOf)(it.value);
      it.keyValue = valueKey;
      _this.idx2key.push(valueKey);
      if (it.items && it.items.length > 0 && it.items.map) {
        res.items = it.items.map(makeSearchItem);
      }
      return res;
    };
    this.searchingItems = this._items.map(makeSearchItem);
    this.key2idx = this.idx2key.reduce(function (ac, cr, i) {
      ac[cr] = i;
      return ac;
    }, {});
    this.searchMaster.transfer(this.searchingItems);
    /*****************/

    this._searchCache = {};
    var estimateSize = (0, _MSelectList.measureListSize)(this._preDisplayItems);
    if (estimateSize.descWidth > 0) {
      this.$listScroller.addStyle('--desc-width', 100 * (estimateSize.descWidth + 15) / estimateSize.width + '%');
    } else {
      this.$listScroller.removeStyle('--desc-width');
    }
    var estimateHeight = this._displayItems.length * 30 * Math.ceil(estimateSize.width * 1.2 / Math.min(_Dom["default"].getScreenSize().width - 80, 500));
    this._estimateHeight = estimateHeight;
    this.$content.addStyle('height', estimateHeight + 'px');
    this.estimateSize = estimateSize;
    this.domSignal.emit('viewListAt', 0);
  }
};
MListModal.property.values = {
  set: function set(values) {
    values = values || [];
    values = values.slice();
    this._values = values;
    this._valueDict = values.reduce(function (ac, cr) {
      ac[cr + ''] = true;
      ac[(0, _utils.keyStringOf)(cr)] = cr;
      return ac;
    }, {});
    this._displayItems = this._filterValue(this._preDisplayItems);
    this._updateItemIndex();
    //todo
    if (this._pageOffsets[this.preLoadN] > this._pageOffsets[0]) this._updateSelectedItem();
  },
  get: function get() {
    return this._values;
  }
};
MListModal.property.displayValue = {
  set: function set(value) {
    this._displayValue = value;
    this._displayItems = this._filterValue(this._preDisplayItems);
    this._updateItemIndex();
    if (value === VALUE_HIDDEN) {
      this.addClass('am-value-hidden');
    } else {
      this.removeClass('am-value-hidden');
    }
  },
  get: function get() {
    return this._displayValue;
  }
};
MListModal.property.enableSearch = {
  set: function set(value) {
    if (value) this.$box.addClass('am-enable-search');
  },
  get: function get() {
    return this.$box.removeClass('am-enable-search');
  }
};

/***
 *
 * @type {MListModal}
 */
MListModal.eventHandler = {};

/***
 *
 * @param {MouseEvent} event
 */
MListModal.eventHandler.click = function (event) {
  if (event.target === this) this.notifyPressOut();
};
MListModal.eventHandler.searchModify = function () {
  var _this2 = this;
  var text = this.$searchInput.value;
  var searchSession = Math.random() + '';
  this._seachSession = searchSession;
  this.searchItemByText(text).then(function (searchedItems) {
    if (_this2._seachSession !== searchSession) return;
    _this2._preDisplayItems = _this2._listToDisplay(searchedItems);
    _this2._displayItems = _this2._filterValue(_this2._preDisplayItems);
    _this2._updateItemIndex();
    _this2.viewListAt(0);
    _this2.$listScroller.scrollTop = 0;
  });
};
MListModal.eventHandler.scroll = function () {
  var scrollerBound = this.$listScroller.getBoundingClientRect();
  var topIdx = this._findFirstPageIdx();
  var fontSize = this.$listScroller.getFontSize() || 14;
  var screenSize = _Dom["default"].getScreenSize();
  var maxItem = Math.ceil(screenSize.height / (fontSize * 2.25));
  var pageBound;
  var topBound = this.$listPages[topIdx].getBoundingClientRect();
  if (this._pageOffsets[topIdx] > 0) {
    if (topBound.top + this.toLoadNextY > scrollerBound.top) {
      this._pageOffsets.unshift(this._pageOffsets.pop());
      this._pageYs.unshift(this._pageYs.pop());
      this.$listPages.unshift(this.$listPages.pop());
      this._pageOffsets[topIdx] = Math.max(0, this._pageOffsets[topIdx + 1] - maxItem);
      this._requireItem(this.$listPages[topIdx], this._pageOffsets[topIdx + 1] - this._pageOffsets[topIdx]);
      this._assignItems(this.$listPages[topIdx], this._pageOffsets[topIdx]);
      pageBound = this.$listPages[topIdx].getBoundingClientRect();
      this._pageYs[topIdx] = this._pageYs[topIdx + 1] - pageBound.height;
      this.$listPages[topIdx].addStyle('top', this._pageYs[topIdx] + 'px');
      this._updateSelectedItem();
      if (this._pageOffsets[topIdx] === 0) {
        this.$listPages[0].addStyle('top', '0');
        this._pageYs[0] = 0;
        this._alignPage();
        this.$listScroller.scrollTop = 0;
      }
    }
  } else {
    if (topBound.top > scrollerBound.top) {
      this.$listScroller.scrollTop += topBound.top - scrollerBound.top;
    }
  }
  var botIdx = this._findLastPageIdx();
  var botBound;
  botBound = this.$listPages[botIdx].getBoundingClientRect();
  if (this._pageOffsets[botIdx + 1] < this._displayItems.length) {
    if (botBound.bottom - this.toLoadNextY < scrollerBound.bottom) {
      this._pageOffsets.push(this._pageOffsets.shift());
      this._pageYs.push(this._pageYs.shift());
      this.$listPages.push(this.$listPages.shift());
      this._pageOffsets[botIdx + 1] = Math.min(this._displayItems.length, this._pageOffsets[botIdx] + maxItem);
      this.$listPages[botIdx].addStyle('top', this._pageYs[botIdx] + 'px');
      this._requireItem(this.$listPages[botIdx], this._pageOffsets[botIdx + 1] - this._pageOffsets[botIdx]);
      this._assignItems(this.$listPages[botIdx], this._pageOffsets[botIdx]);
      pageBound = this.$listPages[botIdx].getBoundingClientRect();
      this._pageYs[botIdx + 1] = this._pageYs[botIdx] + pageBound.height;
      this._updateSelectedItem();
      if (this._pageOffsets[botIdx + 1] < this._displayItems.length) {
        this.$content.addStyle('height', this._estimateHeight + 'px');
      } else {
        this.$content.addStyle('height', this._pageYs[botIdx + 1] + 'px');
      }
    }
  }
};
var _default = MListModal;
exports["default"] = _default;
_ACore["default"].install('mlistmodal', MListModal);
_Dom["default"].ShareInstance.install('mlistmodal', MListModal);

/**
 * @extends AElement
 * @constructor
 */
function MListModalV2() {
  this.estimateSize = {
    textWidth: 0,
    descWidth: 0
  };
  this.itemHolders = [];
  this.itemHolderByValue = {};
  this.screenSize = (0, _Dom.getScreenSize)();
  this.pagingCtrl = new MLMPagingController(this);
  this.layoutCtrl = new MLMLayoutController(this);
  this.on('pressitem', this.eventHandler.selectItem);
  this._value = undefined;
  this.selectedHolder = null;
  this.searchCtrl = new MLMSearchController(this);
  this.$closeBtn = (0, _ACore.$)('.am-list-popup-close-btn', this);
  this.on('click', this.eventHandler.click);
  this.$closeBtn.on('click', this.eventHandler.clickCloseBtn);
  /**
   * @type {any}
   * @name value
   * @memberof MListModalV2#
   */

  /**
   * @type {Array}
   * @name items
   * @memberof MListModalV2#
   */

  /**
   * @type {boolean}
   * @name enableSearch
   * @memberof MListModalV2#
   */

  /**
   * @type {boolean}
   * @name strictValue
   * @memberof MListModalV2#
   */

  /**
   * @type {number}
   * @name selectedIndex
   * @memberof MListModalV2#
   */
}

MListModalV2.tag = 'MListModalV2'.toLowerCase();
MListModalV2.render = function () {
  return (0, _ACore._)({
    extendEvent: ['pressitem', 'pressclose', 'pressout'],
    "class": 'am-list-modal-v2',
    child: [{
      "class": ['am-list-popup-box'],
      child: [{
        "class": 'am-list-popup-header',
        child: [{
          tag: 'searchtextinput'
        }, {
          tag: 'button',
          "class": 'am-list-popup-close-btn',
          child: 'span.mdi.mdi-close'
        }]
      }, {
        "class": 'am-list-popup-list-scroller',
        child: {
          "class": 'am-list-popup-content',
          child: Array(MListModal.prototype.preLoadN).fill('.am-list-popup-list-page.am-selectlist')
        }
      }]
    }]
  });
};
MListModalV2.prototype.resetSearchState = function () {
  this.searchCtrl.resetSearchState();
};
MListModalV2.prototype.cancelWaiting = function () {};
MListModalV2.prototype.findItemsByValue = function (value) {
  var holder = this.itemHolderByValue[(0, _utils.keyStringOf)(value)];
  if (!holder) return null;
  return [holder.data];
};
MListModalV2.prototype.findItemByValue = function (value) {
  var holder = this.itemHolderByValue[(0, _utils.keyStringOf)(value)];
  if (!holder) return null;
  return holder.data;
};
MListModalV2.prototype.viewListAt = function (idx) {
  var offset = this.pagingCtrl.offsetTopOfHolders[idx];
  offset = offset || 0;
  this.pagingCtrl.$listScroller.scrollTop = offset;
  this.pagingCtrl.update();
};
MListModalV2.prototype.viewListAtFirstSelected = function () {
  var selectedIndex = this.selectedIndex;
  this.viewListAt(selectedIndex);
};
MListModalV2.prototype.updateSelectedItem = function () {
  if (this.selectedHolder) {
    this.selectedHolder.selected = false;
    this.selectedHolder.updateView();
  }
  var value = this.value; //computed value
  this.selectedHolder = this.itemHolderByValue[(0, _utils.keyStringOf)(value)];
  if (this.selectedHolder) {
    this.selectedHolder.selected = true;
    this.selectedHolder.updateView();
  }
};
MListModalV2.property = {};
MListModalV2.property.items = {
  set: function set(items) {
    var _this3 = this;
    this.itemHolders.forEach(function (holder) {
      holder.detachView();
    });
    this.selectedHolder = null;
    if (!Array.isArray(items)) items = [];
    this.itemHolders = items.map(function (it) {
      return new MLMHolder(_this3, it);
    });
    this.itemHolders.forEach(function (holder, i) {
      holder.idx = i;
    });
    this.itemHolderByValue = this.itemHolders.reduce(function reducer(ac, cr) {
      ac[cr.keyValue] = cr;
      return ac;
    }, {});
    this.updateSelectedItem();
    this.layoutCtrl.calcSize();
    this.pagingCtrl.viewArr(this.itemHolders);
  },
  get: function get() {
    return this.itemHolders.map(function (it) {
      return it.data;
    });
  }
};
MListModalV2.property.enableSearch = {
  /***
   * @this SelectListBox
   * @param {boolean} value
   */
  set: function set(value) {
    if (value) this.addClass('as-enable-search');else this.removeClass('as-enable-search');
  },
  /***
   * @this SelectListBox
   */
  get: function get() {
    return this.hasClass('as-enable-search');
  }
};
MListModalV2.property.values = {
  set: function set(values) {
    values = values || [];
    this.value = values[0];
  },
  get: function get() {
    return [this.value];
  }
};
MListModalV2.property.value = {
  set: function set(value) {
    this._value = value;
    this.updateSelectedItem();
  },
  /**
   * @this MListModalV2
   * @returns {*}
   */
  get: function get() {
    var value = this._value;
    var holder;
    if (this.strictValue) {
      holder = this.itemHolderByValue[(0, _utils.keyStringOf)(value)];
      if (holder) return value;
      if (this.itemHolders.length > 0) {
        return this.itemHolders[0].data.value;
      } else {
        return value;
      }
    } else return value;
  }
};
MListModalV2.property.strictValue = {
  set: function set(value) {
    if (value) {
      this.addClass('as-strict-value');
    } else {
      this.removeClass('as-strict-value');
    }
  },
  get: function get() {
    return this.hasClass('as-strict-value');
  }
};
MListModalV2.property.selectedItem = {
  get: function get() {
    var value = this._value;
    var holder;
    holder = this.itemHolderByValue[(0, _utils.keyStringOf)(value)] || null;
    if (this.strictValue) {
      if (!holder && this.itemHolders.length > 0) holder = this.itemHolders[0];
    }
    if (holder) return holder.data;
    return null;
  }
};
MListModalV2.property.selectedIndex = {
  get: function get() {
    var value = this._value;
    var holder;
    holder = this.itemHolderByValue[(0, _utils.keyStringOf)(value)] || null;
    if (this.strictValue) {
      if (!holder && this.itemHolders.length > 0) holder = this.itemHolders[0];
    }
    if (holder) return holder.idx;
    return 0;
  }
};
MListModalV2.eventHandler = {};
MListModalV2.eventHandler.selectItem = function (event) {
  var value = event.value;
  var holder = this.itemHolderByValue[(0, _utils.keyStringOf)(value)];
  if (this.selectedHolder !== holder && this.selectedHolder) {
    this.selectedHolder.selected = false;
    this.selectedHolder.updateView();
  }
  if (holder) {
    holder.selected = true;
    holder.updateView();
  }
};
MListModalV2.eventHandler.click = function (event) {
  if (event.target === this) {
    this.emit('pressclose', {
      target: this,
      type: 'pressclose'
    }, this);
  }
};
MListModalV2.eventHandler.clickCloseBtn = function (event) {
  this.emit('pressclose', {
    target: this,
    type: 'pressclose'
  }, this);
};

/**
 *
 * @param {MListModalV2} boxElt
 * @constructor
 */
function MLMLayoutController(boxElt) {
  this.boxElt = boxElt;
}
MLMLayoutController.prototype.calcSize = function () {
  var holders = this.boxElt.itemHolders;
  var screenSize = this.boxElt.screenSize;
  var maxAvailableWidth = Math.max(0, screenSize.width - 20);
  var col1maxWidth = 0;
  var col2maxWidth = 0;
  var visit = function visit(nd) {
    if (nd.computedSize.col1maxWidth > col1maxWidth) {
      col1maxWidth = nd.computedSize.col1maxWidth;
    }
    if (nd.computedSize.col2maxWidth > col2maxWidth) {
      col2maxWidth = nd.computedSize.col2maxWidth;
    }
  };
  holders.forEach(visit);
  var col1Width = col1maxWidth;
  var col2Width = col2maxWidth;
  if (col1maxWidth + col2maxWidth > maxAvailableWidth) {
    col1Width = col1maxWidth / (col1maxWidth + col2maxWidth || 1) * maxAvailableWidth;
    col2Width = Math.max(maxAvailableWidth - col1Width, 0);
  }
  var visit2 = function visit2(nd) {
    nd.applyViewWidth(col1Width, col2Width);
    if (nd.children && nd.children.length) {
      nd.children.forEach(visit2);
    }
  };
  holders.forEach(visit2);
  this.boxElt.estimateSize.textWidth = col1maxWidth - 30;
  this.boxElt.estimateSize.descWidth = Math.max(0, col2maxWidth - 20);
  this.boxElt.addStyle('--col1-width', col1Width + 'px');
  this.boxElt.addStyle('--col2-width', col2Width + 'px');
};

/**
 *
 * @param {MListModalV2} boxElt
 * @constructor
 */
function MLMPagingController(boxElt) {
  this.boxElt = boxElt;
  this.$content = (0, _ACore.$)('.am-list-popup-content', this.boxElt);
  this.$listScroller = (0, _ACore.$)('.am-list-popup-list-scroller', this.boxElt);
  this.holderArr = [];
  this.$listPages = [];
  this.$listScroller.on('scroll', this.ev_scroll.bind(this));
}
MLMPagingController.prototype.itemPerPage = 100;
MLMPagingController.prototype.preloadN = 5;
MLMPagingController.prototype.fillPage = function (pageElt, n) {
  var itemElt;
  while (pageElt.childNodes.length > n) {
    itemElt = pageElt.lastChild;
    itemElt.selfRemove();
    (0, _MSelectList.releaseItem)(itemElt);
  }
  while (pageElt.childNodes.length < n) {
    itemElt = (0, _MSelectList.requireItem)(this.boxElt);
    pageElt.addChild(itemElt);
  }
};
MLMPagingController.prototype.viewArr = function (itemHolders) {
  this.holderArr = itemHolders;
  var pageN = Math.ceil(this.holderArr.length / this.itemPerPage);
  while (this.$listPages.length > pageN) {
    this.$listPages.pop().remove();
  }
  var pageElt;
  while (this.$listPages.length < pageN) {
    pageElt = (0, _ACore._)({
      "class": 'am-check-list-page',
      child: []
    }).addTo(this.$content);
    this.$listPages.push(pageElt);
  }
  // console.log('viewArr', holderArr.length);
  var itemIdx = 0;
  var k;
  var pageHeights = Array(pageN).fill(0);
  var pageIdx;
  this.offsetTopOfHolders = [0];
  for (pageIdx = 0; pageIdx < pageN; ++pageIdx) {
    pageElt = this.$listPages[pageIdx];
    pageElt.clearChild();
    for (k = 0; k < this.itemPerPage && itemIdx < this.holderArr.length; ++k, ++itemIdx) {
      pageHeights[pageIdx] += this.holderArr[itemIdx].computedSize.height;
      this.offsetTopOfHolders[itemIdx + 1] = this.offsetTopOfHolders[itemIdx] + this.holderArr[itemIdx].computedSize.height;
    }
  }
  for (pageIdx = 0; pageIdx < pageN; ++pageIdx) {
    pageElt = this.$listPages[pageIdx];
    pageElt.addStyle('height', pageHeights[pageIdx] + 'px');
  }
  this.$listScroller.scrollTop = 0;
  this.update();
};
MLMPagingController.prototype.update = function () {
  //by scrollTop
  var offset = this.$listScroller.scrollTop;
  var low = 0;
  var high = this.offsetTopOfHolders.length - 1;
  var mid;
  while (low < high) {
    mid = Math.floor((low + high) / 2);
    if (this.offsetTopOfHolders[mid] < offset) {
      low = mid + 1;
    } else {
      high = mid;
    }
  }
  var itemPerPage = this.itemPerPage;
  var startPageIdx = Math.max(0, Math.floor(low / this.itemPerPage - 1));
  var endPageIdx = Math.min(this.$listPages.length, startPageIdx + this.preloadN);
  var pageIdx;
  var pageLength;
  var itemStartIdx, itemEndIdx;
  var itemIdx;
  for (pageIdx = 0; pageIdx < startPageIdx; pageIdx++) {
    this.fillPage(this.$listPages[pageIdx], 0);
  }
  for (pageIdx = endPageIdx; pageIdx < this.$listPages.length; pageIdx++) {
    this.fillPage(this.$listPages[pageIdx], 0);
  }
  for (pageIdx = startPageIdx; pageIdx < endPageIdx; pageIdx++) {
    itemStartIdx = pageIdx * itemPerPage;
    itemEndIdx = Math.min(itemStartIdx + itemPerPage, this.holderArr.length);
    pageLength = itemEndIdx - itemStartIdx;
    this.fillPage(this.$listPages[pageIdx], pageLength);
    for (itemIdx = itemStartIdx; itemIdx < itemEndIdx; itemIdx++) {
      this.holderArr[itemIdx].attachView(this.$listPages[pageIdx].childNodes[itemIdx - itemStartIdx]);
    }
  }
};
MLMPagingController.prototype.ev_scroll = function () {
  this.update();
};

/**
 *
 * @param {MListModalV2} boxElt
 * @param data
 * @constructor
 */
function MLMHolder(boxElt, data) {
  this.boxElt = boxElt;
  this.id = (0, _stringGenerate.randomIdent)(6);
  this.idx = 0;
  this.data = data;
  this.selected = false;
  (0, _OOP.drillProperty)(this, this, 'item', 'data'); //adapt old
  this.value = data.value;
  this.wrappedText = [this.data.text];
  this.wrappedDesc = [this.data.desc];
  this.keyValue = (0, _utils.keyStringOf)(data.value);
  this.itemElt = null;
  this.computedSize = {
    width: 0,
    height: 30,
    col1maxWidth: 0,
    col2maxWidth: 0
  };
  this.calcInitSize();
}
MLMHolder.prototype.getSearchItem = function () {
  var res = {
    value: this.id
  };
  res.text = this.data.text + '';
  if (this.data.desc) res.text += " " + this.data.desc;
  return res;
};
MLMHolder.prototype.calcInitSize = function () {
  this.computedSize.textWidth = Math.ceil(_TextMeasure["default"].measureWidth(this.data.text + '', _TextMeasure["default"].FONT_ARIAL, 14));
  //- 30px  - 21px - 10px
  this.computedSize.col1maxWidth = this.computedSize.textWidth + 30;
  if (this.data.desc) {
    this.computedSize.descWidth = Math.ceil(_TextMeasure["default"].measureWidth((this.data.desc || '') + '', _TextMeasure["default"].FONT_ARIAL, 14));
    this.computedSize.col2maxWidth = this.computedSize.descWidth + 20;
  } else {
    this.computedSize.descWidth = 0;
  }
};
MLMHolder.prototype.applyViewWidth = function (col1Width, col2Width) {
  this.computedSize.availableTextWidth = col1Width - 30;
  this.computedSize.availableDescWidth = col2Width - 20;
  if (this.computedSize.availableTextWidth < this.computedSize.textWidth) {
    this.wrappedText = _TextMeasure["default"].wrapText(this.data.text + '', _TextMeasure["default"].FONT_ARIAL, 14, this.computedSize.availableTextWidth);
  } else {
    this.wrappedText = [this.data.text + ''];
  }
  if (this.data.desc && this.computedSize.availableDescWidth < this.computedSize.descWidth) {
    this.wrappedDesc = _TextMeasure["default"].wrapText((this.data.desc || '') + '', _TextMeasure["default"].FONT_ARIAL, 14, this.computedSize.availableDescWidth);
  } else {
    this.wrappedDesc = [(this.data.desc || '') + ''];
  }
  this.computedSize.height = Math.max(this.wrappedText.length, this.wrappedDesc.length) * 20 + 10;
};
MLMHolder.prototype.attachView = function (itemElt) {
  if (this.itemElt === itemElt) {
    this.updateView();
    return;
  }
  if (itemElt.mlmHolder) {
    itemElt.mlmHolder.detachView();
  }
  this.itemElt = itemElt;
  this.itemElt.mlmHolder = this;
  this.itemElt.data = this.data;
  this.itemElt.selected = this.data.selected;
  this.itemElt.addStyle('height', this.computedSize.height + 'px');
  this.itemElt.$text.firstChild.data = this.wrappedText.join('\n');
  this.itemElt.$desc.firstChild.data = this.wrappedDesc.join('\n');
};
MLMHolder.prototype.detachView = function () {
  if (this.itemElt) {
    this.itemElt.mlmHolder = null;
    this.itemElt = null;
  }
};
MLMHolder.prototype.updateView = function () {
  if (this.itemElt) {
    this.itemElt.selected = this.selected;
  }
};

/**
 *
 * @param {MListModalV2} boxElt
 * @constructor
 */
function MLMSearchController(boxElt) {
  this.boxElt = boxElt;
  this.$searchInput = (0, _ACore.$)('searchtextinput', this.boxElt).on('stoptyping', this.ev_searchModify.bind(this));
  this.cache = {};
  this.searchItems = null;
  this.holderDict = {};
}
MLMSearchController.prototype.reset = function () {
  this.cache = {};
  this.searchItems = null;
  this.holderDict = {};
};
MLMSearchController.prototype.prepareSearchingHolders = function () {
  var _this4 = this;
  if (this.searchItems) return;
  this.searchItems = [];
  this.holderDict = {};
  var visit = function visit(holder) {
    var it = holder.getSearchItem();
    _this4.holderDict[it.value] = holder;
    _this4.searchItems.push(it);
  };
  this.boxElt.itemHolders.forEach(visit);
  (0, _search.prepareSearchForList)(this.searchItems);
};
MLMSearchController.prototype.resetSearchState = function () {
  this.$searchInput.value = '';
  this.ev_searchModify();
};

/**
 *
 * @param query
 * @returns {string[]} array of id
 */
MLMSearchController.prototype.query = function (query) {
  this.prepareSearchingHolders();
  var result = this.cache[query];
  var lcList;
  var visit;
  if (!result) {
    lcList = (0, _search.searchListByText)(query, this.searchItems);
    result = [];
    visit = function visit(it) {
      result.push(it.value);
    };
    lcList.forEach(visit);
    this.cache[query] = result;
  }
  return result;
};
MLMSearchController.prototype.ev_searchModify = function () {
  var query = this.$searchInput.value;
  query = query.trim();
  if (query.length === 0) {
    this.boxElt.pagingCtrl.viewArr(this.boxElt.itemHolders);
    return;
  }
  var result = this.query(query);
  var arr = [];
  for (var i = 0; i < result.length; ++i) {
    arr.push(this.holderDict[result[i]]);
  }
  this.boxElt.pagingCtrl.viewArr(arr);
};

/***/ }),

/***/ 14899:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.makeItem = makeItem;
exports.measureListSize = measureListSize;
exports.releaseItem = releaseItem;
exports.requireItem = requireItem;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _MSelectListItem = _interopRequireDefault(__webpack_require__(82799));
var _SelectList = _interopRequireWildcard(__webpack_require__(884));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function measureListSize(items) {
  var descWidth = (0, _SelectList.measureMaxDescriptionWidth)(items);
  var textWidth = (0, _SelectList.measureMaxTextWidth)(items);
  var width = descWidth + 20 + textWidth + 12 + 15; //padding, margin
  return {
    width: width,
    descWidth: descWidth,
    textWidth: textWidth
  };
}
var itemPool = [];
function onClickItem(event) {
  var thisSL = this.$parent;
  if (thisSL) {
    thisSL.value = this.value;
    thisSL.emit('pressitem', {
      type: 'pressitem',
      target: thisSL,
      itemElt: this,
      value: this.value,
      data: this.data
    });
  }
}

/**
 * @returns {MSelectListItem}
 */
function makeItem() {
  return (0, _ACore._)({
    tag: _MSelectListItem["default"],
    on: {
      click: onClickItem
    }
  });
}
function requireItem($parent) {
  var item;
  if (itemPool.length > 0) {
    item = itemPool.pop();
  } else {
    item = makeItem();
  }
  item.$parent = $parent;
  return item;
}
function releaseItem(item) {
  item.$parent = null;
  item.attr('class', 'am-selectlist-item');
  item.selected = false;
  itemPool.push(item);
}

/*global absol*/
/***
 * @extends AElement
 * @constructor
 */
function MSelectList() {
  var res = this;
  this.defineEvent(['pressitem', 'cancelasync', 'valuevisibilityasync', 'finishasync', 'sizechangeasync']);
  this.$attachhook = (0, _ACore._)('attachhook').addTo(this);
  this.sync = new Promise(function (rs) {
    res.$attachhook.once('error', rs);
  });
  this.$items = [];
  this.$itemByValue = {}; //quick find element
  this.$selectedItem = undefined;
  this._itemSession = 0;
  this._finished = true;
  this._resourceReady = true;
}
;
MSelectList.tag = "MSelectList".toLowerCase();
MSelectList.render = function () {
  return (0, _ACore._)('.am-selectlist');
};

//todo: update this feature to SelectList
/***
 *
 * @param value
 * @return {MSelectListItem|null}
 */
MSelectList.prototype.getItemElementByValue = function (value) {
  return this.$itemByValue[value + ''] || null;
};
MSelectList.prototype._updateSelectedItem = function () {
  var newSelectedItemElt = this.$itemByValue[this._selectValue + ''];
  if (newSelectedItemElt !== this.$selectedItem) {
    if (this.$selectedItem) {
      this.$selectedItem.removeClass('selected');
    }
    if (newSelectedItemElt) {
      newSelectedItemElt.addClass('selected');
      this.$selectedItem = newSelectedItemElt;
    }
  }
};
MSelectList.prototype._requireItems = function (itemCout) {
  var item;
  while (this.$items.length < itemCout) {
    item = requireItem(this);
    this.$items.push(item);
    this.addChild(item);
  }
  while (this.$items.length > itemCout) {
    item = this.$items.pop();
    item.remove();
    releaseItem(item);
  }
};
MSelectList.prototype._assignItems = function (from, to) {
  var foundSelected = false;
  var itemElt;
  var item;
  for (var i = from; i < to; ++i) {
    itemElt = this.$items[i];
    item = this._items[i];
    itemElt.data = item;
    itemElt.__index__ = i;
    if (this.$itemByValue[item.value + '']) {
      console.warn('Value  ' + this.$items[i].value + ' is duplicated!');
    } else {
      this.$itemByValue[item.value + ''] = itemElt;
      if (this._selectValue == item.value) {
        itemElt.selected = true;
        this.$selectedItem = itemElt;
        foundSelected = true;
      } else {
        itemElt.selected = false;
      }
    }
  }
  return foundSelected;
};
MSelectList.prototype.setItemsAsync = function (items) {
  //start process
  this._finished = false;
  var session = Math.floor(Math.random() * 1000000);
  this._itemSession = session;
  this._items = items || [];
  this.$itemByValue = {};
  this.measuredSize = measureListSize(items);
  var thisSL = this;
  var i = 0;
  var limit = 20;
  function tick() {
    if (thisSL._itemSession != session) {
      thisSL.emit('cancelasync', {
        session: session,
        type: 'cancelasync'
      }, this);
      return;
    }
    if (i >= items.length) {
      thisSL._updateSelectedItem();
      thisSL._finished = false;
      thisSL.emit('finishasync', {
        session: session,
        type: 'finishasync'
      }, this);
      return;
    }
    var n = Math.min(items.length - i, limit);
    var itemCout = i + n;
    thisSL._requireItems(itemCout);
    i = itemCout;
    var foundSelected = thisSL._assignItems(itemCout - n, itemCout);
    if (foundSelected) {
      thisSL.emit('valuevisibilityasync', {
        session: session,
        type: 'valuevisibilityasync',
        itemElt: thisSL.$items[i]
      }, thisSL);
    }
    thisSL.emit('sizechangeasync', {
      session: session,
      type: 'sizechangeasync'
    }, this);
    setTimeout(tick, 2);
  }
  setTimeout(tick, 2);
  return Object.assign({
    session: session
  }, this.measuredSize);
};
MSelectList.prototype.setItems = function (items) {
  this._finished = false;
  var session = Math.floor(Math.random() * 1000000);
  this._itemSession = session;
  this._items = items || [];
  this.$itemByValue = {};
  this.measuredSize = measureListSize(items);
  var itemCount = items.length;
  this._requireItems(itemCount);
  this._assignItems(0, itemCount);
  this._finished = true;
  return Object.assign({
    session: this._itemSession
  }, this.measuredSize);
};
MSelectList.property = Object.assign({}, _SelectList["default"].property);
MSelectList.prototype.init = _SelectList["default"].prototype.init;
MSelectList.eventHandler = {};
var _default = MSelectList;
exports["default"] = _default;

/***/ }),

/***/ 82799:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SelectListItem = _interopRequireDefault(__webpack_require__(57040));
var _ACore = __webpack_require__(34093);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @extends {AElement}
 * @constructor
 */
function MSelectListItem() {
  this.$textCtn = (0, _ACore.$)('.am-selectlist-item-text-ctn', this);
  this.$text = (0, _ACore.$)('span.am-selectlist-item-text', this);
  this.$textValue = this.$text.childNodes[0];
  this.$descCtn = (0, _ACore.$)('.am-selectlist-item-desc-ctn', this);
  this.$desc = (0, _ACore.$)('span.am-selectlist-item-desc', this.$descCtn);
  this.$descValue = this.$desc.childNodes[0];
  this._extendClasses = [];
  this._extendStyle = {};
  this._data = "";
  this._level = 0;
}
MSelectListItem.tag = 'MSelectListItem'.toLowerCase();
MSelectListItem.render = function () {
  return (0, _ACore._)({
    "class": 'am-selectlist-item',
    child: [{
      "class": 'am-selectlist-item-text-ctn',
      child: {
        tag: 'span',
        "class": 'am-selectlist-item-text',
        child: {
          text: ''
        }
      }
    }, {
      "class": 'am-selectlist-item-desc-ctn',
      child: {
        tag: 'span',
        "class": 'am-selectlist-item-desc',
        child: {
          text: ''
        }
      }
    }]
  });
};
MSelectListItem.property = Object.assign({}, _SelectListItem["default"].property);
MSelectListItem.property.icon = {
  set: function set(icon) {
    if (this.$icon) {
      this.$icon.remove();
      this.$icon = null;
    }
    this._icon = icon || null;
    if (this._icon) {
      this.$icon = (0, _ACore._)(this._icon).addClass('am-selectlist-item-icon');
      this.$textCtn.addChildAfter(this.$icon, null);
    }
  },
  get: function get() {
    return this._icon;
  }
};
var _default = MSelectListItem;
exports["default"] = _default;

/***/ }),

/***/ 2925:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SelectListItem = _interopRequireDefault(__webpack_require__(57040));
var _ACore = __webpack_require__(34093);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function SLBItemHolder(parent, data) {
  this.data = data;
  this.parent = parent;
  this._elt = null;
}
Object.defineProperty(SLBItemHolder.prototype, 'elt', {
  get: function get() {
    if (!this._elt) {
      this._elt = (0, _ACore._)({
        tag: _SelectListItem["default"].tag,
        props: {
          data: this.data
        }
      });
    }
    return this._elt;
  }
});
var _default = SLBItemHolder;
exports["default"] = _default;

/***/ }),

/***/ 16997:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _ListDictionary = _interopRequireDefault(__webpack_require__(50218));
var _utils = __webpack_require__(84512);
var _SLBModes = __webpack_require__(15867);
var _search = __webpack_require__(67858);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ListDictionary
 * @param {SelectListBox} elt
 * @constructor
 */
function SLBItemListController(elt) {
  this.elt = elt;
  this.items = [];
  this.elt.$scroller.on('scroll', this.updateListView.bind(this));
}
_OOP["default"].mixClass(SLBItemListController, _ListDictionary["default"]);
SLBItemListController.itemHeight = 20;
SLBItemListController.preLoadN = 3;
SLBItemListController.prototype.toLoadNextY = 200;
SLBItemListController.prototype.getItems = function () {
  return (0, _utils.copySelectionItemArray)(this.items);
};
SLBItemListController.prototype.setItems = function (items) {
  this.items = (0, _utils.copySelectionItemArray)(items || []);
  var mode = new _SLBModes.SLBModeNormal(this.elt, this.items);
  this.elt.modes.normal = mode;
  this.elt.mode = mode;
  mode.onStart();
};
SLBItemListController.prototype.updateListView = function () {
  this.elt.mode.updateListView();
};
var _default = SLBItemListController;
exports["default"] = _default;

/***/ }),

/***/ 15867:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.SLBModeNormal = SLBModeNormal;
exports.SLBModeSearch = SLBModeSearch;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SLBItemHolder = _interopRequireDefault(__webpack_require__(2925));
var _ACore = __webpack_require__(34093);
var _Dom = __webpack_require__(64821);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function SLBModeNormal(elt, items) {
  var _this = this;
  this.elt = elt;
  this.$scroller = this.elt.$scroller;
  this.$content = this.elt.$content;
  this.items = items;
  this.children = items.map(function (item) {
    return new _SLBItemHolder["default"](_this, item);
  });
  this.children.forEach(function (child, i) {
    child.idx = i;
    // child.elt;
  });

  this.$pages = [];
}
SLBModeNormal.prototype._getPageElt = function (idx) {
  if (this.$pages[idx]) return this.$pages[idx];
  while (this.$pages.length <= idx) {
    this.$pages.push(undefined);
  }
  var children = this.children.slice(idx * 50, idx * 50 + 50);
  var pageElt = (0, _ACore._)({
    "class": 'as-select-list-box-page',
    style: {
      top: 20 * idx * 50 + 'px'
    },
    child: children.map(function (child) {
      return child.elt;
    })
  });
  this.$pages[idx] = pageElt;
  return pageElt;
};
SLBModeNormal.prototype._getPageCount = function () {
  return Math.ceil(this.items.length / 50);
};
SLBModeNormal.prototype.onStart = function () {
  this.elt.$content.addStyle('height', this.items.length * 20 + 'px');
  // var n = this._getPageCount();
  // for (var i =0; i < n; ++i){
  //     this.$content.addChild(this._getPageElt(i));
  // }
  this.updateListView();
};
SLBModeNormal.prototype.onStop = function () {};
SLBModeNormal.prototype.updateListView = function () {
  var _this2 = this;
  var maxHeight = Math.max(4096, (0, _Dom.getScreenSize)().height);
  var startIdx = Math.floor(this.$scroller.scrollTop / 1000) - 1;
  var endIdx = startIdx + Math.ceil(maxHeight / 1000) + 1;
  startIdx = Math.max(0, startIdx);
  endIdx = Math.min(this._getPageCount(), endIdx);
  var needViewPages = Array(endIdx - startIdx).fill(null).map(function (u, i) {
    return _this2._getPageElt(startIdx + i);
  });
  Array.prototype.forEach.call(this.$content.childNodes, function (elt) {
    if (needViewPages.indexOf(elt) < 0) {
      elt.remove();
    }
  });
  needViewPages.forEach(function (elt) {
    if (!elt.parentElement) {
      _this2.$content.addChild(elt);
    }
  });
};
function SLBModeSearch(elt, items) {
  this.items = items;
}
_OOP["default"].mixClass(SLBModeSearch, SLBModeNormal);
// SLBModeSearch.prototype.onStart

/***/ }),

/***/ 34174:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _SelectListBoxPropHandlers = _interopRequireDefault(__webpack_require__(97923));
var _SLBItemListController = _interopRequireDefault(__webpack_require__(16997));
var _SLBModes = __webpack_require__(15867);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function SelectListBox() {
  this.$box = this;
  this.$content = $('.as-select-list-box-content', this);
  this.$scroller = $('.as-select-list-box-scroller', this);
  this.itemListCtrl = new _SLBItemListController["default"](this);
  this.modes = {
    normal: new _SLBModes.SLBModeNormal(this, []),
    search: null
  };
  this.mode = this.modes.normal;
}
SelectListBox.tag = 'selectlistbox_v2'.toLowerCase();
SelectListBox.render = function () {
  return (0, _ACore._)({
    tag: 'follower',
    attr: {
      tabindex: 0
    },
    "class": 'as-select-list-box',
    extendEvent: ['pressitem'],
    child: [{
      "class": 'as-select-list-box-search-ctn',
      child: 'searchtextinput'
    }, {
      "class": ['as-bscroller', 'as-select-list-box-scroller'],
      child: [{
        "class": ['as-select-list-box-content'],
        child: Array(SelectListBox.prototype.preLoadN).fill('.as-select-list-box-page')
      }]
    }, 'attachhook.as-dom-signal'],
    props: {
      anchor: [1, 6, 2, 5]
    }
  });
};
SelectListBox.property = _SelectListBoxPropHandlers["default"];
_ACore["default"].install('selectlistbox_v2', SelectListBox);
var _default = SelectListBox;
exports["default"] = _default;

/***/ }),

/***/ 97923:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var SelectListBoxPropHandlers = {};
SelectListBoxPropHandlers.enableSearch = {
  /***
   * @this SelectListBox
   * @param {boolean} value
   */
  set: function set(value) {
    if (value) this.addClass('as-enable-search');else this.removeClass('as-enable-search');
  },
  /***
   * @this SelectListBox
   */
  get: function get() {
    return this.hasClass('as-enable-search');
  }
};
SelectListBoxPropHandlers.items = {
  /***
   * @this SelectListBox
   * @param {{}} items
   */
  set: function set(items) {
    this.itemListCtrl.setItems(items);
  },
  get: function get() {
    return this.itemListCtrl.getItems();
  }
};
var _default = SelectListBoxPropHandlers;
exports["default"] = _default;

/***/ }),

/***/ 70448:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SelectMenu = _interopRequireDefault(__webpack_require__(20834));
var _MListModal = __webpack_require__(11032);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
__webpack_require__(80571);
var _MSelectListItem = _interopRequireDefault(__webpack_require__(82799));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends AElement
 * @constructor
 */
function MSelectMenu() {
  var _this = this;
  this._value = undefined;
  this._isFocus = false;
  this._itemsByValue = {};
  this.$holderItem = (0, _ACore.$)('.am-selectmenu-holder-item', this);

  /***
   * @type {MListModalV2}
   */
  this.$selectlist = (0, _ACore._)({
    tag: _MListModal.MListModalV2
  });
  this.$selectlist.cancelWaiting();
  var checkView = function checkView() {
    if (_this.isDescendantOf(document.body)) {
      setTimeout(checkView, 10000);
    } else {
      if (_this.$selectlist.searchMaster) _this.$selectlist.searchMaster.destroy();
    }
  };
  setTimeout(checkView, 30000);
  this.$selectlist.on('pressitem', this.eventHandler.pressItem, true).on('pressout', this.eventHandler.pressOut).on('pressclose', this.eventHandler.pressOut);
  this.on('click', this.eventHandler.click, true);
  this.$attachhook = (0, _ACore.$)('attachhook', this).on('error', this.eventHandler.attached);
  /**
   * @name value
   * @memberof MSelectMenu#
   */
  /**
   * @name items
   * @memberof MSelectMenu#
   */
}

MSelectMenu.tag = 'mselectmenu';
MSelectMenu.render = function () {
  return (0, _ACore._)({
    "class": ['absol-selectmenu', 'am-selectmenu', 'as-strict-value'],
    extendEvent: ['change', 'minwidthchange'],
    attr: {
      tabindex: '1'
    },
    child: ['.am-selectmenu-holder-item', {
      tag: 'button',
      "class": 'absol-selectmenu-btn',
      child: ['dropdown-ico']
    }, 'attachhook']
  });
};
MSelectMenu.prototype.findItemsByValue = function (value) {
  return this.$selectlist.findItemsByValue(value);
};
MSelectMenu.prototype.findItemByValue = function (value) {
  return this.$selectlist.findItemByValue(value);
};
MSelectMenu.prototype.updateItem = function () {
  this.$holderItem.clearChild();
  var selected = this.findItemsByValue(this.value);
  if (selected) {
    var elt = (0, _ACore._)({
      tag: _MSelectListItem["default"],
      props: {
        data: selected[0]
      }
    }).addTo(this.$holderItem);
  }
};
MSelectMenu.prototype.notifyChange = function (data) {
  this.emit('change', Object.assign({}, data, {
    type: 'change',
    target: this
  }), this);
};
MSelectMenu.prototype._dictByValue = _SelectMenu["default"].prototype._dictByValue;
MSelectMenu.prototype.getRecommendWith = function () {
  var res = 12 + this.$selectlist.estimateSize.textWidth + 30;
  if (this.$selectlist.estimateSize.descWidth) res += this.$selectlist.estimateSize.descWidth + 20;
  return res;
};
MSelectMenu.prototype.init = _SelectMenu["default"].prototype.init;
MSelectMenu.property = {};
MSelectMenu.property.items = {
  set: function set(value) {
    this._itemIdxByValue = null;
    /**
     * verity data
     */
    if (value) {
      value.forEach(function (it) {
        if (it && it.text) {
          it.text = it.text + '';
        }
      });
    }
    this._items = value;
    this._itemsByValue = this._dictByValue(value);
    this.$selectlist.items = value;
    if (!this._itemsByValue[this.value] && value.length > 0 && false) {} else this.updateItem();
    if (this.style.width === 'auto' || !this.style.width) {
      this.addStyle('--recommend-width', this.getRecommendWith() / 14 + 'em');
    }
  },
  get: function get() {
    return this._items || [];
  }
};
MSelectMenu.property.value = {
  set: function set(value) {
    this._value = value;
    this.$selectlist.values = [value];
    this.updateItem();
  },
  get: function get() {
    if (!this.strictValue) return this._value;
    var selected = this.findItemsByValue(this._value);
    if (selected) {
      return selected[0].value;
    } else {
      if (this._items && this._items.length > 0) {
        return this._items[0].value;
      }
    }
    return this._value;
  }
};
MSelectMenu.property.strictValue = {
  set: function set(value) {
    if (value) {
      this.addClass('as-strict-value');
    } else {
      this.removeClass('as-strict-value');
    }
  },
  get: function get() {
    return this.hasClass('as-strict-value');
  }
};
MSelectMenu.property.enableSearch = {
  set: function set(value) {
    this.$selectlist.enableSearch = !!value;
  },
  get: function get() {
    return this.$selectlist.enableSearch;
  }
};
MSelectMenu.property.isFocus = {
  set: function set(value) {
    var thisSM = this;
    value = !!value;
    if (value === this._isFocus) return;
    if (this.readOnly || this.disabled) return;
    this._isFocus = value;
    if (value) {
      this.$selectlist.addTo(document.body);
      if (this.$selectlist.$attachhook) {
        this.$selectlist.$attachhook.emit('attached');
      }
      thisSM.$selectlist.viewListAt(0);
      thisSM.$selectlist.viewListAtFirstSelected();
    } else {
      this.$selectlist.selfRemove();
      setTimeout(function () {
        thisSM.$selectlist.resetSearchState();
      }, 100);
    }
  },
  get: function get() {
    return this._isFocus;
  }
};
MSelectMenu.property.selectedIndex = _SelectMenu["default"].property.selectedIndex;
MSelectMenu.property.disabled = _SelectMenu["default"].property.disabled;
MSelectMenu.property.hidden = _SelectMenu["default"].property.hidden;

/**
 * @type {MSelectMenu}
 */
MSelectMenu.eventHandler = {};
MSelectMenu.eventHandler.attached = function () {
  if (this.style.width === 'auto' || !this.style.width) {
    this.addStyle('--recommend-width', this.getRecommendWith() / 14 + 'em');
  }
};
MSelectMenu.eventHandler.click = function (event) {
  this.isFocus = !this.isFocus;
};
MSelectMenu.eventHandler.pressOut = function (event) {
  this.isFocus = false;
};
MSelectMenu.eventHandler.pressItem = function (event) {
  var newValue = event.value;
  if (newValue !== this._value) {
    var lastValue = this._value;
    this._value = newValue;
    this.$selectlist.values = [newValue];
    this.updateItem();
    var changeEvent = Object.assign({}, event, {
      lastValue: lastValue
    });
    setTimeout(function () {
      this.notifyChange(changeEvent);
    }.bind(this), 1);
  }
  setTimeout(function () {
    this.isFocus = false;
  }.bind(this), 100);
};
_ACore["default"].install(MSelectMenu);
var _default = MSelectMenu;
exports["default"] = _default;

/***/ }),

/***/ 94289:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _SelectTreeLeafItem = _interopRequireDefault(__webpack_require__(95237));
var _MCheckTreeBox = __webpack_require__(82822);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function MSTBItemHolder(boxElt, parent, data) {
  var _this = this;
  this.ref = null;
  this.$list = boxElt.$list;
  this.level = parent.level + 1;
  this.status = 'none';
  this.boxElt = boxElt;
  this.parent = parent;
  this.data = data;
  this._elt = null;
  this.hasDesc = !!data.desc;
  this.hasIcon = !!data.icon;
  this.selected = false;
  if (data.items && data.items.length > 0) {
    this.children = data.items.map(function (item) {
      return new MSTBItemHolder(boxElt, _this, item);
    });
    this.hasDesc = this.hasDesc || this.children.some(function (child) {
      return child.hasDesc;
    });
    this.hasIcon = this.hasIcon || this.children.some(function (child) {
      return child.hasIcon;
    });
    this.status = 'close';
  }
}
MSTBItemHolder.prototype.ev_statusChange = _MCheckTreeBox.MCTBItemHolder.prototype.ev_statusChange;
MSTBItemHolder.prototype.getViewElements = _MCheckTreeBox.MCTBItemHolder.prototype.getViewElements;
MSTBItemHolder.prototype.select = function (flag) {
  this.selected = flag;
  if (this._elt) {
    this._elt.selected = flag;
  }
};
MSTBItemHolder.prototype.ev_click = function (event) {
  if (this.ref) {
    this.ref.ev_click(event);
  } else {
    this.boxElt.modes.normal.setValue(this.data.value);
    if (this.boxElt.mode !== this.boxElt.modes.normal) {
      this.boxElt.mode.updateSelectedFromRef();
    }
    this.boxElt.notifyPressItem({
      item: this.data
    });
  }
};
Object.defineProperty(MSTBItemHolder.prototype, 'elt', {
  get: function get() {
    if (!this._elt) {
      this._elt = (0, _ACore._)({
        tag: _SelectTreeLeafItem["default"],
        props: {
          data: this.data,
          level: this.level,
          status: this.status,
          selected: this.selected
        },
        on: {
          statuschange: this.ev_statusChange.bind(this),
          click: this.ev_click.bind(this)
        }
      });
    }
    return this._elt;
  }
});
var _default = MSTBItemHolder;
exports["default"] = _default;

/***/ }),

/***/ 24063:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _utils = __webpack_require__(84512);
var _STLBModes = __webpack_require__(28810);
var _search = _interopRequireWildcard(__webpack_require__(67858));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function MSTLBItemListController(elt) {
  this.elt = elt;
  this.items = [];
  this._searchCache = {};
}
MSTLBItemListController.prototype.setItems = function (items) {
  if (!items || !items.forEach || !items.map) items = [];
  this.items = (0, _utils.copySelectionItemArray)(items, {
    removeNoView: true
  });
  this.update();
};
MSTLBItemListController.prototype.update = function () {
  var mode = new _STLBModes.STLBModeNormal(this.elt, this.items);
  this.elt.modes.normal = mode;
  this.elt.mode = mode;
  if (mode.hasDesc) {
    this.elt.$list.addClass('as-has-desc');
  } else {
    this.elt.$list.removeClass('as-has-list');
  }
  if (mode.hasIcon) {
    this.elt.$list.addClass('as-has-icon');
  } else {
    this.elt.$list.removeClass('as-has-icon');
  }
  this.elt.mode = mode;
  mode.onStart();
  this._searchItems = (0, _search.prepareSearchForList)((0, _utils.copySelectionItemArray)(this.items));
  this._searchCache = {};
};
MSTLBItemListController.prototype.getItems = function () {
  return (0, _utils.copySelectionItemArray)(this.items);
};
MSTLBItemListController.prototype.makeSearch = function (query) {
  if (this._searchCache[query]) return this._searchCache[query].resetAndGet();
  var searchItem = (0, _search["default"])({
    text: query
  });
  var minScore = Infinity;
  var maxScore = -Infinity;
  var scoredHolders = this._searchItems.map(function visit(item) {
    var holder = {
      item: item,
      score: (0, _search.calcItemMatchScore)(searchItem, item),
      childMaxScore: -Infinity
    };
    minScore = Math.min(minScore, holder.score);
    maxScore = Math.max(maxScore, holder.score);
    if (item.items && item.items.length > 0) {
      holder.children = item.items.map(visit);
      holder.childMaxScore = holder.children.reduce(function (ac, cr) {
        return Math.max(ac, cr.score, cr.childMaxScore);
      }, 0);
    }
    return holder;
  });
  var threshHold = maxScore - (maxScore - minScore) / 3;
  var result = scoredHolders.reduce(function filterVisit(ac, cr) {
    var subItems;
    if (Math.max(cr.score, cr.childMaxScore) >= threshHold) {
      ac.items.push(cr.item);
      if (cr.children && cr.childMaxScore >= cr.score) {
        ac.status[(0, _utils.keyStringOf)(cr.item.value)] = 'open';
        subItems = cr.children.reduce(filterVisit, {
          items: [],
          status: ac.status
        }).items;
        cr.item.items = subItems;
      } else {
        if (cr.children && cr.children.length > 0) {
          ac.status[(0, _utils.keyStringOf)(cr.item.value)] = 'open';
        }
      }
    }
    return ac;
  }, {
    items: [],
    status: {}
  });
  var normalMode = this.elt.modes.normal;
  result.mode = new _STLBModes.STLBModeSearch(this.elt, result.items);
  result.resetAndGet = function () {
    this.mode.children && this.mode.children.forEach(function resetVisit(holder) {
      var key = (0, _utils.keyStringOf)(holder.data.value);
      holder.ref = normalMode.getHolderByValue(holder.data.value);
      if (holder.status === 'open' && result.status[key] !== 'open') {
        holder.status = 'close';
        if (holder._elt) {
          holder._elt.status = 'close';
        }
      } else if (holder.status === 'close' && result.status[key] === 'open') {
        holder.status = 'open';
        if (holder._elt) {
          holder._elt.status = 'open';
        }
      }
      if (holder.children) holder.children.forEach(resetVisit);
    });
    return this.mode;
  };
  this._searchCache[query] = result;
  return result.resetAndGet();
};
var _default = MSTLBItemListController;
exports["default"] = _default;

/***/ }),

/***/ 73484:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
__webpack_require__(97535);
var _MSTLBItemListController = _interopRequireDefault(__webpack_require__(24063));
var _STLBModes = __webpack_require__(28810);
var _STLBPropsHandlers = _interopRequireDefault(__webpack_require__(52256));
var _MCheckTreeBox = _interopRequireDefault(__webpack_require__(82822));
var _EventEmitter = __webpack_require__(46833);
var _SelectTreeLeafBox = _interopRequireDefault(__webpack_require__(79442));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/****
 * @extends AElement
 * @constructor
 */
function MSelectTreeLeafBox() {
  this.estimateSize = {
    width: 0,
    height: 0
  };
  this.$box = (0, _ACore.$)('.am-dropdown-box', this);
  this.$list = (0, _ACore.$)('.am-select-tree-leaf-box-list', this);
  this.itemListCtrl = new _MSTLBItemListController["default"](this);
  this.$searchInput = (0, _ACore.$)(_Searcher["default"].tag, this).on('stoptyping', this.eventHandler.searchTextInputModify);
  this.$boxCloseBtn = (0, _ACore.$)('.am-dropdown-box-close-btn', this);
  this.on('click', function (event) {
    if (event.target === this || (0, _EventEmitter.hitElement)(this.$boxCloseBtn, event)) {
      this.emit('close', {
        type: 'close',
        target: this
      }, this);
    }
  }.bind(this));
  this.modes = {
    normal: new _STLBModes.STLBModeNormal(this, []),
    search: null
  };
  this.mode = this.modes.normal;
  this.strictValue = true;

  /**
   * @name items
   * @memberof MSelectTreeLeafBox#
   * @type {Array}
   */

  /**
   * @name value
   * @memberof MSelectTreeLeafBox#
   */

  /**
   * @name strictMode
   * @type {boolean}
   * @memberof MSelectTreeLeafBox#
   */

  /**
   * @name selectedItem
   * @memberof MSelectTreeLeafBox#
   */
}

MSelectTreeLeafBox.tag = 'MSelectTreeLeafBox'.toString();
MSelectTreeLeafBox.render = function () {
  return (0, _ACore._)({
    extendEvent: ['pressitem', 'close'],
    "class": ['am-modal', 'am-dropdown-box-modal'],
    child: {
      "class": ['am-select-tree-leaf-box', 'am-dropdown-box', 'as-dropdown-box-common-style'],
      child: [{
        "class": 'am-dropdown-box-header',
        child: [{
          tag: _Searcher["default"].tag
        }, {
          tag: 'button',
          "class": 'am-dropdown-box-close-btn',
          child: 'span.mdi.mdi-close'
        }]
      }, {
        "class": ['am-dropdown-box-body', 'am-select-tree-leaf-box-body'],
        child: {
          "class": 'am-select-tree-leaf-box-list'
        }
      }]
    }
  });
};
MSelectTreeLeafBox.prototype._calcEstimateSize = _SelectTreeLeafBox["default"].prototype._calcEstimateSize;
MSelectTreeLeafBox.prototype._estimateItemWidth = function (item, level) {
  var width = 12; //padding
  width += 12 * level;
  width += 14.7 + 5; //toggle icon
  // if (item.icon) width += 21;//icon
  width += 7 + (0, _utils.estimateWidth14)(item.text) + 5 + 7; //margin-text
  if (item.desc) width += 6 + (0, _utils.estimateWidth14)(item.desc) * 0.85;
  return width;
};
MSelectTreeLeafBox.prototype._findFirstLeaf = _SelectTreeLeafBox["default"].prototype._findFirstLeaf;
MSelectTreeLeafBox.prototype.viewToSelected = function () {
  this.modes.normal.viewToSelected();
};
MSelectTreeLeafBox.prototype.notifyPressItem = function (eventData) {
  delete this.pendingValue;
  this.emit('pressitem', Object.assign({
    type: 'pressitem',
    target: this
  }, eventData), this);
};
MSelectTreeLeafBox.prototype.getItemByValue = function (value) {
  return this.modes.normal.getItemByValue(value);
};
MSelectTreeLeafBox.prototype.findItemByValue = function (value) {
  return this.modes.normal.getItemByValue(value);
};
MSelectTreeLeafBox.prototype.resetSearchState = _MCheckTreeBox["default"].prototype.resetSearchState;
MSelectTreeLeafBox.property = _STLBPropsHandlers["default"];
MSelectTreeLeafBox.property.items = {
  set: function set(items) {
    var curValue;
    var selected = true;
    if ('pendingValue' in this) {
      curValue = this.pendingValue;
    } else {
      try {
        curValue = this.modes.normal.getValue(this.strictValue);
      } catch (err) {
        selected = false;
      }
    }
    this.estimateSize = this._calcEstimateSize(items);
    this._items = items; //todo: check usage
    this.itemListCtrl.setItems(items);
    if (selected || this.strictValue) this.modes.normal.setValue(curValue, this.strictValue);
    if (this.mode !== this.modes.normal) {
      this.mode.updateSelectedFromRef();
    }
  },
  get: function get() {
    return this.itemListCtrl.getItems();
  }
};
MSelectTreeLeafBox.property.value = {
  /***
   * @this MSelectTreeLeafBox
   * @param value
   */
  set: function set(value) {
    this.pendingValue = value;
    this._value = value;
    this.modes.normal.setValue(this.pendingValue, this.strictValue);
  },
  get: function get() {
    if ('pendingValue' in this) {
      return this.pendingValue;
    } else {
      try {
        return this.modes.normal.getValue(this.strictValue);
      } catch (err) {
        return undefined;
      }
    }
  }
};
MSelectTreeLeafBox.property.selectedItem = {
  get: function get() {
    return this.modes.normal.getItemByValue(this.value);
  }
};
MSelectTreeLeafBox.property.strictValue = {
  set: function set(value) {
    if (value) {
      this.$box.addClass('as-strict-value');
    } else {
      this.$box.removeClass('as-strict-value');
    }
    this.modes.normal.setValue(this.pendingValue, this.strictValue);
    if (this.mode !== this.modes.normal) {
      this.mode.updateSelectedFromRef();
    }
  },
  get: function get() {
    return this.$box.hasClass('as-strict-value');
  }
};
MSelectTreeLeafBox.eventHandler = {};
MSelectTreeLeafBox.eventHandler.searchTextInputModify = _MCheckTreeBox["default"].eventHandler.searchTextInputModify;
_ACore["default"].install(MSelectTreeLeafBox);
var _default = MSelectTreeLeafBox;
exports["default"] = _default;

/***/ }),

/***/ 28810:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.STLBModeNormal = STLBModeNormal;
exports.STLBModeSearch = STLBModeSearch;
var _MSTBItemHolder = _interopRequireDefault(__webpack_require__(94289));
var _utils = __webpack_require__(84512);
var _CTBModes = __webpack_require__(48819);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function STLBModeNormal(elt, items) {
  var _this = this;
  this.level = -1;
  this.elt = elt;
  this.$list = elt.$list;
  this.children = items.map(function (item) {
    return new _MSTBItemHolder["default"](elt, _this, item);
  });
  this.hasDesc = this.hasDesc || this.children.some(function (child) {
    return child.hasDesc;
  });
  this.hasIcon = this.hasIcon || this.children.some(function (child) {
    return child.hasIcon;
  });
  this.dict = this.children.reduce(function visit(ac, child) {
    var key = (0, _utils.keyStringOf)(child.data.value);
    if (ac[key]) {
      console.error('Duplicate value:', ac[key].data, child.data);
    }
    ac[key] = child;
    if (child.children) {
      child.children.reduce(visit, ac);
    }
    return ac;
  }, {});
  this.selectedHolder = null;
}
STLBModeNormal.prototype.getHolderByValue = _CTBModes.CTBModeNormal.prototype.getHolderByValue;
STLBModeNormal.prototype.getItemByValue = function (value) {
  var holder = this.getHolderByValue(value);
  if (holder) return holder.data;
  return null;
};
STLBModeNormal.prototype.getFirstLeafHolder = function () {
  var res = null;
  if (this.children) {
    this.children.some(function visit(node) {
      if (node.data.isLeaf) {
        res = node;
        return true;
      }
      if (node.children) {
        return node.children.some(visit);
      }
      return false;
    });
  }
  return res;
};
STLBModeNormal.prototype.onStart = function () {
  this.$list.clearChild();
  var rootHolders = this.children;
  var viewElements = [];
  rootHolders.forEach(function (holder) {
    holder.getViewElements(viewElements);
  }, []);
  this.$list.addChild(viewElements);
};
STLBModeNormal.prototype.setValue = function (value, strict) {
  var holder = this.selectedHolder;
  if (holder) {
    holder.select(false);
  }
  holder = this.getHolderByValue(value);
  if (holder && !holder.data.isLeaf) holder = null;
  if (!holder && strict) {
    holder = this.getFirstLeafHolder();
  }
  if (holder && holder.data.isLeaf) {
    holder.select(true);
  }
  this.selectedHolder = holder;
};
STLBModeNormal.prototype.getValue = function (strict) {
  var holder = this.selectedHolder;
  if (strict && !holder) holder = this.getFirstLeafHolder();
  if (holder) {
    return holder.data.value;
  } else {
    throw new Error('Not selected!');
  }
};
STLBModeNormal.prototype.viewToSelected = function () {
  var _this2 = this;
  if (!this.selectedHolder) return;
  var visitUp = function visitUp(node) {
    var parent = node.parent;
    if (parent !== _this2) {
      visitUp(parent);
    }
    if (node.status === 'close') {
      node.elt.status = 'open';
      node.ev_statusChange();
    }
  };
  visitUp(this.selectedHolder);
  (0, _utils.vScrollIntoView)(this.selectedHolder.elt);
};
STLBModeNormal.prototype.onStop = function () {};
function STLBModeSearch(elt, items) {
  var _this3 = this;
  this.level = -1;
  this.elt = elt;
  this.$list = this.elt.$list;
  this.children = items.map(function (item) {
    return new _MSTBItemHolder["default"](elt, _this3, item);
  });
  this.dict = this.children.reduce(function visit(ac, child) {
    var key = (0, _utils.keyStringOf)(child.data.value);
    if (ac[key]) {
      console.error('Duplicate value:', ac[key].data, child.data);
    }
    ac[key] = child;
    if (child.children) {
      child.children.reduce(visit, ac);
    }
    return ac;
  }, {});
  this.selectedHolder = null;
}
STLBModeSearch.prototype.updateSelectedFromRef = function () {
  if (this.selectedHolder) this.selectedHolder.select(false);
  this.selectedHolder = null;
  var value = this.elt.value;
  var holder = this.dict[(0, _utils.keyStringOf)(value)];
  if (holder) {
    holder.select(true);
    this.selectedHolder = holder;
  }
};
STLBModeSearch.prototype.onStart = function () {
  STLBModeNormal.prototype.onStart.call(this);
  this.updateSelectedFromRef();
};
STLBModeSearch.prototype.onStop = function () {};

/***/ }),

/***/ 52256:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var STLBPropsHandlers = {};
STLBPropsHandlers.enableSearch = {
  set: function set(value) {
    if (value) {
      this.$box.addClass('as-enable-search');
    } else {
      this.$box.removeClass('as-enable-search');
    }
  },
  get: function get() {
    return this.$box.hasClass('as-enable-search');
  }
};
var _default = STLBPropsHandlers;
exports["default"] = _default;

/***/ }),

/***/ 92068:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CTIPropHandlers = _interopRequireDefault(__webpack_require__(51972));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var STLIPropHandlers = {};
STLIPropHandlers.data = {
  set: function set(data) {
    this._data = data;
    this._updateData();
  },
  get: function get() {
    return this._data;
  }
};
STLIPropHandlers.text = {
  get: function get() {
    var data = this._data;
    if (data === undefined || data === null) return '';
    if (typeof data === 'string') return data;
    if (data && data.text) return data.text + '';
    return data + '';
  }
};
STLIPropHandlers.value = {
  get: function get() {
    var data = this._data;
    if (data === undefined || data === null) return data;
    if (data && 'value' in data) return data.value;
    return data;
  }
};
STLIPropHandlers.level = _CTIPropHandlers["default"].level;
STLIPropHandlers.status = _CTIPropHandlers["default"].status;
STLIPropHandlers.selected = {
  set: function set(value) {
    if (value) {
      this.addClass('as-selected');
    } else {
      this.removeClass('as-selected');
    }
  },
  get: function get() {
    return this.hasClass('as-selected');
  }
};

/****
 * @name text
 * @type {string}
 * @memberOf SelectTreeLeafItem#
 */

/****
 * @name value
 * @type {string|number}
 * @memberOf SelectTreeLeafItem#
 */

/****
 * @name data
 * @type {*}
 * @memberOf SelectTreeLeafItem#
 */

/****
 * @name selected
 * @type {boolean}
 * @memberOf SelectTreeLeafItem#
 */
var _default = STLIPropHandlers;
exports["default"] = _default;

/***/ }),

/***/ 95237:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _STLIPropHandlers = _interopRequireDefault(__webpack_require__(92068));
var _utils = __webpack_require__(84512);
__webpack_require__(97535);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends AElement
 * @constructor
 */
function SelectTreeLeafItem() {
  this.$text = (0, _ACore.$)('.am-select-tree-leaf-item-text', this);
  this.$desc = (0, _ACore.$)('.am-select-tree-leaf-item-desc', this);
  this.$iconCtn = (0, _ACore.$)('.am-select-tree-leaf-item-icon-ctn', this);
  this.addEventListener('click', this.eventHandler.click);
}
SelectTreeLeafItem.tag = 'SelectTreeLeafItem'.toLowerCase();
SelectTreeLeafItem.render = function () {
  return (0, _ACore._)({
    extendEvent: ['click', 'statuschange'],
    "class": ['am-select-tree-leaf-item', 'am-dropdown-box-item'],
    child: [{
      "class": 'am-select-tree-leaf-item-toggle-ctn',
      child: 'toggler-ico'
    }, {
      "class": 'am-select-tree-leaf-item-icon-ctn'
    }, {
      "class": 'am-select-tree-leaf-item-text',
      child: {
        text: ''
      }
    }, {
      "class": 'am-select-tree-leaf-item-desc',
      child: {
        text: ''
      }
    }]
  });
};
SelectTreeLeafItem.prototype._updateData = function () {
  this.$text.firstChild.data = this.text;
  this.attr('data-key', (0, _utils.keyStringOf)(this.value));
  this.$iconCtn.clearChild();
  var icon = this.data && this.data.icon;
  if (icon) {
    icon = (0, _ACore._)(icon);
    if (icon.parentElement) icon = (0, _ACore.$)(icon.cloneNode(true));
    this.$iconCtn.addChild(icon);
    this.addClass('as-has-icon');
  } else {
    this.removeClass('as-has-icon');
  }
  if (this.data && this.data.isLeaf) {
    this.addClass('as-is-leaf');
  } else {
    this.removeClass('as-is-leaf');
  }
};
SelectTreeLeafItem.property = _STLIPropHandlers["default"];
SelectTreeLeafItem.eventHandler = {};
SelectTreeLeafItem.eventHandler.click = function (event) {
  if (this._data && this._data.isLeaf) {
    this.emit('click', {
      type: 'click',
      target: this,
      originalEvent: event
    }, this);
  } else {
    if (this.status !== 'none') {
      this.status = this.status === 'open' ? 'close' : 'open';
      this.emit('statuschange', {
        type: 'statuschange',
        target: this,
        originalEvent: event
      }, this);
    }
  }
};
var _default = SelectTreeLeafItem;
exports["default"] = _default;

/***/ }),

/***/ 86258:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SelectTreeLeafMenu = _interopRequireDefault(__webpack_require__(66138));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = _SelectTreeLeafMenu["default"];
exports["default"] = _default;

/***/ }),

/***/ 3770:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MTreeModal = MTreeModal;
exports["default"] = void 0;
__webpack_require__(65997);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _MSelectMenu = _interopRequireDefault(__webpack_require__(70448));
var _treeListToList = _interopRequireDefault(__webpack_require__(22248));
var _MListModal = _interopRequireDefault(__webpack_require__(11032));
var _SelectListBox = __webpack_require__(47818);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends MListModal
 * @constructor
 */
function MTreeModal() {
  _MListModal["default"].call(this);
}
MTreeModal.tag = 'MTreeModal'.toLowerCase();
MTreeModal.render = function () {
  return _MListModal["default"].render().addClass('am-tree-modal');
};
Object.assign(MTreeModal.prototype, _MListModal["default"].prototype);
MTreeModal.prototype._listToDisplay = function (items) {
  return (0, _treeListToList["default"])(items);
};
MTreeModal.property = Object.assign({}, _MListModal["default"].property);
MTreeModal.eventHandler = Object.assign({}, _MListModal["default"].eventHandler);

/**
 * @extends {AElement}
 * @constructor
 */
function MSelectTreeMenu() {
  this._isFocus = false;
  this._itemsByValue = {};
  this.$holderItem = (0, _ACore.$)('.am-selectmenu-holder-item', this);

  /***
   * @type {MTreeModal}
   */
  this.$selectlist = (0, _ACore._)({
    tag: MTreeModal
  });
  this.$selectlist.cancelWaiting();
  this.$selectlist.on('pressitem', this.eventHandler.pressItem, true).on('pressout', this.eventHandler.pressOut).on('pressclose', this.eventHandler.pressOut);
  this.on('click', this.eventHandler.click, true);
  this.$attachhook = (0, _ACore.$)('attachhook', this).on('error', this.eventHandler.attached);
  this.addStyle('--as-width-limit', (0, _SelectListBox.calcWidthLimit)() + 'px');
}
MSelectTreeMenu.tag = 'MSelectTreeMenu'.toLowerCase();
MSelectTreeMenu.render = function () {
  return _MSelectMenu["default"].render().addClass('am-select-tree-menu');
};
Object.assign(MSelectTreeMenu.prototype, _MSelectMenu["default"].prototype);
MSelectTreeMenu.property = Object.assign({}, _MSelectMenu["default"].property);
MSelectTreeMenu.eventHandler = Object.assign({}, _MSelectMenu["default"].eventHandler);
MSelectTreeMenu.prototype._dictByValue = function (items) {
  return items.reduce(function visitor(ac, cr) {
    if (cr.items && cr.items.reduce) {
      cr.items.reduce(visitor, ac);
    }
    var value = cr.value + '';
    ac[value] = cr;
    return ac;
  }, {});
};
_ACore["default"].install(MSelectTreeMenu);
var _default = MSelectTreeMenu;
exports["default"] = _default;

/***/ }),

/***/ 39473:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _ACore = __webpack_require__(34093);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {TableScroller} elt
 * @constructor
 */

function TSLMoveTool(elt) {
  var _this = this;
  this.elt = elt;
  this.$table = null;
  Object.keys(TSLMoveTool.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) {
      _this[key] = _this[key].bind(_this);
    }
  });
  this.init();
}
TSLMoveTool.prototype.init = function () {
  this.elt = (0, _ACore._)({
    tag: _Hanger["default"],
    elt: this.elt,
    on: {
      predrag: this.ev_preDrag,
      dragstart: this.ev_dragStart,
      drag: this.ev_drag,
      dragend: this.ev_dragEnd
    }
  });
};
TSLMoveTool.prototype.onAttachTable = function () {};
TSLMoveTool.prototype.ev_preDrag = function (event) {
  var e = event.target;
  var isOK = false;
  while (e && e.tagName !== 'TABLE') {
    if (e.classList && e.classList.contains('as-drag-zone')) {
      isOK = true;
      break;
    }
    e = e.parentElement;
  }
  if (isOK) {
    event.preventDefault();
  } else {
    event.cancel();
  }
};
TSLMoveTool.prototype._findRowIdx = function (y) {
  var newY = _Rectangle["default"].fromClientRect(this.elt.$originTableBody.getBoundingClientRect()).y;
  var oldY = this.dragData.bodyBound.y;
  var dy = newY - oldY;
  var yArr = this.dragData.rowBounds.map(function (rect) {
    return rect.y + dy + rect.height / 2;
  });
  if (this.dragData.rowBounds.length === 0) yArr.push(0);
  var low = 0;
  var high = yArr.length - 1;
  var mid0, mid1;
  while (low < high) {
    mid0 = low + high >> 1;
    mid1 = mid0 + 1;
    if (Math.abs(y - yArr[mid0]) < Math.abs(y - yArr[mid1])) {
      high = mid0;
    } else {
      low = mid1;
    }
  }
  return low;
};
TSLMoveTool.prototype.ev_dragStart = function (event) {
  var t = this.findRow(event.target);
  if (!t) return;
  this.elt.addClass('as-dragging');
  this.dragData = Object.assign({}, t);
  this.dragData.copy.addClass('as-dragging');
  this.dragData.original.addClass('as-dragging');
  var rowBound = _Rectangle["default"].fromClientRect(this.dragData.original.getBoundingClientRect());
  var bodyBound = _Rectangle["default"].fromClientRect(this.elt.$originTableBody.getBoundingClientRect());
  this.dragData.mouseOffset = event.currentPoint.sub(rowBound.A());
  this.dragData.rowIdx = Array.prototype.indexOf.call(this.elt.$originTableBody.childNodes, this.dragData.original);
  this.dragData.newRowIdx = this.dragData.rowIdx;
  this.dragData.rowBound = rowBound;
  this.dragData.bodyBound = bodyBound;
  this.dragData.rowOffset = rowBound.A().sub(bodyBound.A());
  this.dragData.rowBounds = Array.prototype.map.call(this.elt.$originTableBody.childNodes, function (elt) {
    return _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
  });
};
TSLMoveTool.prototype.ev_drag = function (event) {
  var _this2 = this;
  if (!this.dragData) return;
  var bodyBound = _Rectangle["default"].fromClientRect(this.elt.$originTableBody.getBoundingClientRect());
  var rowA = bodyBound.A().add(this.dragData.rowOffset);
  var rowTransformed = event.currentPoint.sub(this.dragData.mouseOffset);
  var transform = rowTransformed.sub(rowA);
  var originalRow = this.dragData.original;
  originalRow.addStyle('transform', "translate(0, ".concat(transform.y, "px )"));
  this.dragData.copy.addStyle('transform', "translate(0, ".concat(transform.y, "px )"));
  this.dragData.hiddenCells = Array.prototype.filter.call(this.dragData.original.childNodes, function (e) {
    return e.tagName === 'TD';
  }).slice(0, this.elt.fixedCol);
  this.dragData.hiddenCells.forEach(function (e) {
    return (0, _ACore.$)(e).addClass('as-transparent-fix');
  });
  var newIdx = this._findRowIdx(rowTransformed.y + this.dragData.rowBound.height / 2);
  this.dragData.newRowIdx = newIdx;
  var rows = this.elt.$originTableBody.childNodes;
  var curIdx = this.dragData.rowIdx;
  // var copyRows = this.elt.$f
  var rowBound = this.dragData.rowBound;
  rows.forEach(function (elt, i) {
    if (elt === originalRow) return;
    var copyElt = _this2.elt.leftCopyRows[elt.getAttribute('data-id')];
    var dy = 0;
    if (i >= Math.min(newIdx, curIdx) && i <= Math.max(newIdx, curIdx)) {
      if (i > curIdx && i <= newIdx) {
        dy = -rowBound.height;
      } else if (i >= newIdx && i < curIdx) {
        dy = rowBound.height;
      }
    }
    elt.addStyle('transform', "translate(0, ".concat(dy, "px)"));
    copyElt.addStyle('transform', "translate(0, ".concat(dy, "px)"));
  });
};
TSLMoveTool.prototype.ev_dragEnd = function (event) {
  var _this3 = this;
  this.dragData.original.removeStyle('transform');
  this.dragData.copy.removeStyle('transform');
  this.dragData.copy.removeClass('as-dragging');
  this.dragData.original.removeClass('as-dragging');
  this.elt.removeClass('as-dragging');
  this.elt.removeClass('as-has-new-pos');
  this.dragData.hiddenCells.forEach(function (e) {
    return e.removeClass('as-transparent-fix');
  });
  var rows = this.elt.$originTableBody.childNodes;
  rows.forEach(function (elt) {
    var copyElt = _this3.elt.leftCopyRows[elt.getAttribute('data-id')];
    elt.addStyle('transform', 'translate(0, 0)');
    copyElt.addStyle('transform', 'translate(0, 0)');
  });
  var at, copyAt;
  if (this.dragData.newRowIdx !== this.dragData.rowIdx) {
    at = rows[this.dragData.newRowIdx];
    copyAt = this.elt.leftCopyRows[at.attr('data-id')];
    if (this.dragData.rowIdx < this.dragData.newRowIdx) {
      (0, _ACore.$)(at.parentElement).addChildAfter(this.dragData.original, at);
      (0, _ACore.$)(copyAt.parentElement).addChildAfter(this.dragData.copy, copyAt);
    } else {
      (0, _ACore.$)(at.parentElement).addChildBefore(this.dragData.original, at);
      (0, _ACore.$)(copyAt.parentElement).addChildBefore(this.dragData.copy, copyAt);
    }
    this.elt.reindexRows();
    this.elt.emit('orderchange', {
      target: this.elt,
      from: this.dragData.rowIdx,
      to: this.dragData.newRowIdx
    }, this.elt);
  }
};
TSLMoveTool.prototype.findRow = function (fromElt) {
  var e = fromElt;
  var rowElt;
  while (e) {
    if (e.tagName === 'TR') {
      rowElt = e;
      break;
    }
    e = e.parentElement;
  }
  if (!rowElt) return null;
  var id = rowElt.getAttribute('data-id');
  return {
    original: (0, _ACore.$)(this.elt.originalRows[id]),
    copy: (0, _ACore.$)(this.elt.leftCopyRows[id])
  };
};
var _default = TSLMoveTool;
exports["default"] = _default;

/***/ }),

/***/ 151:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(52977);
var _ACore = _interopRequireDefault(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _TSLMoveTool = _interopRequireDefault(__webpack_require__(39473));
var _stringGenerate = __webpack_require__(10713);
var _utils = __webpack_require__(84512);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var $ = _ACore["default"].$;
var _ = _ACore["default"]._;
var sliceCellArray = function sliceCellArray(cells, start, end) {
  if (typeof start !== "number") start = 0;
  if (typeof end !== "number") end = Infinity;
  var res = [];
  cells = cells.slice();
  var cell, colSpan;
  var n = 0;
  while (cells.length > 0) {
    cell = cells.shift();
    colSpan = parseInt(cell.getAttribute('colspan') || '1') || 1;
    n += colSpan;
    if (n > start && n <= end) res.push(cell);
  }
  return res;
};

/***
 * @extends {AElement}
 * @constructor
 */
function TableScroller() {
  this.$originCtn = $('.as-table-scroller-origin-table-ctn', this);
  this.$originTable = undefined;
  this.$originContent = undefined;
  this.$fixedYHeaderScroller = $('.as-table-scroller-fixed-y-header-scroller', this);
  this.$fixedYHeader = $('.as-table-scroller-fixed-y-header', this);
  this.$fixedXYHeader = $('.as-table-scroller-fixed-xy-header', this);
  this.$fixXCol = $('.as-table-scroller-fixed-x-col', this);
  this.$attachHook = $('attachhook', this);
  this.$attachHook.requestUpdateSize = this.updateContentSize.bind(this);
  this.requestUpdateSize = this.updateContentSize.bind(this);
  this.$attachHook.on('attached', function () {
    _Dom["default"].addToResizeSystem(this);
  });
  this.$domSignal = _('attachhook');
  this.appendChild(this.$domSignal);
  this.domSignal = new _DomSignal["default"](this.$domSignal);
  this.domSignal.on('requestUpdateContent', this.updateContent.bind(this));
  this.$vscrollbar = $('.absol-table-scroller-vscrollbar-container vscrollbar', this);
  this.$hscrollbar = $('.absol-table-scroller-hscrollbar-container hscrollbar', this);
  this.$vscroller = $('.as-table-scroller-vertical-scroller', this);
  this.$hscroller = $('.as-table-scroller-horizontal-scroller', this);
  this.$leftLine = $('.absol-table-scroller-left-line', this).addStyle('display', 'none');
  this.$headLine = $('.absol-table-scroller-head-line', this);
  this.scrollCtr = new ScrollController(this);
  this.moveTool = new _TSLMoveTool["default"](this);
  this._swappedPairs = [];
  this.originalRows = {};
  this.leftCopyRows = {};

  /***
   * @name fixedCol
   * @type {number}
   * @memberOf TableScroller#
   */
}

TableScroller.tag = 'TableScroller'.toLowerCase();
TableScroller.render = function () {
  return _({
    "class": 'absol-table-scroller',
    extendEvent: ['orderchange', 'preupdatesize', 'sizeupdated'],
    child: [{
      "class": 'absol-table-scroller-content',
      child: [{
        "class": 'as-table-scroller-vertical-scroller',
        child: [{
          "class": 'as-table-scroller-horizontal-scroller-viewport',
          child: [{
            "class": 'as-table-scroller-fixed-x-col-ctn',
            child: {
              tag: 'table',
              "class": 'as-table-scroller-fixed-x-col'
            }
          }, {
            "class": 'as-table-scroller-horizontal-scroller',
            child: [{
              "class": 'as-table-scroller-origin-table-ctn'
            }]
          }]
        }]
      }, {
        "class": 'as-table-scroller-fixed-y-header-ctn',
        child: {
          "class": 'as-table-scroller-fixed-y-header-scroller',
          child: {
            tag: 'table',
            "class": 'as-table-scroller-fixed-y-header'
          }
        }
      }, {
        "class": 'as-table-scroller-fixed-xy-header-ctn',
        child: {
          tag: 'table',
          "class": 'as-table-scroller-fixed-xy-header'
        }
      }, '.absol-table-scroller-viewport', '.absol-table-scroller-fixed-viewport',
      //place holder
      {
        "class": 'absol-table-scroller-header-hscroller',
        child: '.absol-table-scroller-header-hscroller-viewport'
      }, {
        "class": 'absol-table-scroller-left-vscroller',
        child: '.absol-table-scroller-left-vscroller-viewport'
      }, '.absol-table-scroller-head-line', '.absol-table-scroller-left-line']
    }, {
      "class": 'absol-table-scroller-vscrollbar-container',
      child: {
        tag: 'vscrollbar'
      }
    }, {
      "class": 'absol-table-scroller-hscrollbar-container',
      child: {
        tag: 'hscrollbar'
      }
    }, 'attachhook']
  });
};
TableScroller.scrollSize = 17; //default 

_Dom["default"].getScrollSize().then(function (size) {
  TableScroller.scrollSize = size.width; //default scroller
  TableScroller.$style = _('style[id="table-scroller-css"]').addTo(document.head);
  TableScroller.$style.innerHTML = ['body .absol-table-scroller {', '    --scrollbar-width: ' + (size.width + 0) + 'px', '}'].join('\n');
  _Dom["default"].updateResizeSystem();
  setTimeout(_Dom["default"].updateResizeSystem.bind(_Dom["default"]), 30); // css load delay
});

TableScroller.eventHandler = {};
TableScroller.prototype.clearChild = function () {
  this.$fixXCol.clearChild();
  this.$fixedYHeader.clearChild();
  this.$fixedXYHeader.clearChild();
  if (this.$originTable) this.$originTable.remove();
  this.$originTable = null;
  return this;
};
TableScroller.prototype.addChild = function (elt) {
  if (this.$originTable) {
    throw new Error('Only one table is accepted!');
  }
  this.$originContent = elt;
  this.$originTable = $('table', this.$originContent);
  this.$originCtn.addChild(this.$originTable);
  this.requestUpdateContent();
};
TableScroller.prototype._revertWrapped = function () {
  var pair;
  while (this._swappedPairs.length > 0) {
    pair = this._swappedPairs.pop();
    (0, _utils.swapChildrenInElt)(pair[0], pair[1]);
  }
};
TableScroller.prototype._makeDataIdent = function () {
  var _this = this;
  this.originalRows = {};
  Array.prototype.slice.call(this.$originTableBody.childNodes).forEach(function (elt, i) {
    var id;
    if (elt.tagName === 'TR') {
      id = elt.getAttribute('data-id') || (0, _stringGenerate.randomIdent)(12) + '_' + i;
      elt.setAttribute('data-id', id);
      _this.originalRows[id] = $(elt);
    } else {
      elt.remove();
    }
  });
};
TableScroller.prototype._updateFixedYHeader = function () {
  var _this2 = this;
  var head = $(this.$originTableThead.cloneNode(false));
  var headRows = Array.prototype.filter.call(this.$originTableThead.childNodes, function (elt) {
    return elt.tagName === 'TR';
  }).map(function (tr) {
    var copyTr = $(tr.cloneNode(false));
    copyTr.$origin = tr;
    var cells = Array.prototype.filter.call(tr.childNodes, function (elt) {
      return elt.tagName === 'TH' || elt.tagName === 'TD';
    }).map(function (td) {
      return $(Object.assign(td.cloneNode(true), {
        $origin: td
      }));
    });
    copyTr.addChild(cells);
    sliceCellArray(cells, _this2.fixedCol).forEach(function (elt) {
      (0, _utils.swapChildrenInElt)(elt, elt.$origin);
      _this2._swappedPairs.push([elt, elt.$origin]);
    });
    return copyTr;
  });
  head.addChild(headRows);
  this.$fixedYHeader.clearChild().addChild(head);
  this.$fixedYHeader.attr('class', this.$originTable.attr('class')).addClass('as-table-scroller-fixed-y-header');
};
TableScroller.prototype._updateFixedYHeaderSize = function () {
  var bound = this.$originTable.getBoundingClientRect();
  // this.$fixedYHeader.addStyle('width', bound.width + 'px');
  if (this.$fixedYHeader.firstChild && this.$fixedYHeader.firstChild.firstChild) Array.prototype.forEach.call(this.$fixedYHeader.firstChild.firstChild.childNodes, function (elt) {
    var bound = elt.$origin.getBoundingClientRect();
    elt.addStyle('width', bound.width + 'px');
    if (bound.width + bound.height === 0) {
      elt.addStyle('display', 'none');
    } else {
      elt.removeStyle('display');
    }
  });
  this.$headLine.addStyle('top', this.$fixedYHeader.getBoundingClientRect().height - 1 + 'px').addStyle('max-width', bound.width + 'px');
};
TableScroller.prototype._updateFixedXCol = function () {
  var _this3 = this;
  this.$fixXCol.clearChild();
  var head = $(this.$originTableThead.cloneNode(false));
  var headRows = Array.prototype.filter.call(this.$originTableThead.childNodes, function (elt) {
    return elt.tagName === 'TR';
  }).map(function (tr) {
    var copyTr = $(tr.cloneNode(false));
    copyTr.$origin = tr;
    var cells = Array.prototype.filter.call(tr.childNodes, function (elt) {
      return elt.tagName === 'TH' || elt.tagName === 'TD';
    });
    cells = sliceCellArray(cells, 0, _this3.fixedCol).map(function (td) {
      return $(Object.assign(td.cloneNode(true), {
        $origin: td
      }));
    });
    copyTr.addChild(cells);
    return copyTr;
  });
  head.addChild(headRows);
  var body = $(this.$originTableBody.cloneNode());
  var rows = Array.prototype.filter.call(this.$originTableBody.childNodes, function (elt) {
    return elt.tagName === 'TR';
  }).map(function (tr) {
    var copyTr = $(tr.cloneNode(false));
    copyTr.$origin = tr;
    var id = copyTr.attr('data-id');
    _this3.leftCopyRows[id] = copyTr;
    var cells = Array.prototype.filter.call(tr.childNodes, function (elt) {
      return elt.tagName === 'TH' || elt.tagName === 'TD';
    });
    cells = sliceCellArray(cells, 0, _this3.fixedCol).map(function (td) {
      return $(Object.assign(td.cloneNode(true), {
        $origin: td
      }));
    });
    cells.forEach(function (elt) {
      (0, _utils.swapChildrenInElt)(elt, elt.$origin);
      _this3._swappedPairs.push([elt, elt.$origin]);
    });
    copyTr.addChild(cells);
    return copyTr;
  });
  body.addChild(rows);
  this.$fixXCol.addChild(head).addChild(body);
  this.$fixXCol.attr('class', this.$originTable.attr('class')).addClass('as-table-scroller-fixed-x-col');
};
TableScroller.prototype._updateFixedXColSize = function () {
  if (this.fixedCol === 0) return;
  var bound = this.$originTable.getBoundingClientRect();
  // this.$fixXCol.addStyle('height', bound.height + 'px');

  Array.prototype.forEach.call(this.$fixXCol.firstChild.childNodes, function (elt) {
    elt.addStyle('height', elt.$origin.getBoundingClientRect().height + 'px');
  });
  Array.prototype.forEach.call(this.$fixXCol.firstChild.firstChild.childNodes, function (elt) {
    elt.addStyle('width', elt.$origin.getBoundingClientRect().width + 'px');
  });
  Array.prototype.forEach.call(this.$fixXCol.lastChild.childNodes, function (elt) {
    elt.addStyle('height', elt.$origin.getBoundingClientRect().height + 'px');
  });
};
TableScroller.prototype._updateFixedXYHeader = function () {
  var _this4 = this;
  var head = $(this.$originTableThead.cloneNode(false));
  var headRows = Array.prototype.filter.call(this.$originTableThead.childNodes, function (elt) {
    return elt.tagName === 'TR';
  }).map(function (tr) {
    var copyTr = _('tr');
    copyTr.$origin = tr;
    var cells = Array.prototype.filter.call(tr.childNodes, function (elt) {
      return elt.tagName === 'TH' || elt.tagName === 'TD';
    });
    cells = sliceCellArray(cells, 0, _this4.fixedCol).map(function (td) {
      return $(Object.assign(td.cloneNode(true), {
        $origin: td
      }));
    });
    copyTr.addChild(cells);
    cells.forEach(function (cell) {
      (0, _utils.swapChildrenInElt)(cell, cell.$origin);
      _this4._swappedPairs.push([cell, cell.$origin]);
    });
    return copyTr;
  });
  head.addChild(headRows);
  this.$fixedXYHeader.clearChild().addChild(head);
  this.$fixedXYHeader.attr('class', this.$originTable.attr('class')).addClass('as-table-scroller-fixed-xy-header');
};
TableScroller.prototype._updateFixedXYHeaderSize = function () {
  if (this.$fixedXYHeader.firstChild) Array.prototype.forEach.call(this.$fixedXYHeader.firstChild.childNodes, function (elt) {
    elt.addStyle('height', elt.$origin.getBoundingClientRect().height + 'px');
  });
  if (this.$fixedXYHeader.firstChild && this.$fixedXYHeader.firstChild.firstChild) Array.prototype.forEach.call(this.$fixedXYHeader.firstChild.firstChild.childNodes, function (elt) {
    elt.addStyle('width', elt.$origin.getBoundingClientRect().width + 'px');
  });
  this.$leftLine.addStyle('left', this.$fixedXYHeader.getBoundingClientRect().width - 1 + 'px');
};
TableScroller.prototype.updateContent = function () {
  var _this5 = this;
  if (!this.$originTable) return;
  this._revertWrapped();
  this.$originTableThead = $('thead', this.$originTable);
  this.$originTableBody = $('tbody', this.$originTable);
  this._makeDataIdent();
  this._updateFixedYHeader();
  this._updateFixedXCol();
  this._updateFixedXYHeader();
  this.reindexRows();
  this.updateContentSize();
  requestAnimationFrame(function () {
    _this5.updateContentSize();
  });
};
TableScroller.prototype._updateScrollStatus = function () {
  var bound = this.getBoundingClientRect();
  var tableBound = this.$originTable.getBoundingClientRect();
  if (bound.width < tableBound.width) {
    this.addClass('as-scroll-horizontal');
    this.$vscrollbar.outerHeight = bound.height - 17;
  } else {
    this.$vscrollbar.outerHeight = bound.height;
    this.removeClass('as-scroll-horizontal');
  }
  if (bound.height < tableBound.height) {
    this.addClass('as-scroll-vertical');
    this.$hscrollbar.outerWidth = bound.width - 17;
  } else {
    this.$hscrollbar.outerWidth = bound.width;
    this.removeClass('as-scroll-vertical');
  }
  var paddingBottom = this.getComputedStyleValue('--tvs-scroll-padding-bottom');
  paddingBottom = parseFloat((paddingBottom || '0px').replace('px', ''));
  this.$vscrollbar.innerHeight = tableBound.height + paddingBottom;
  this.$hscrollbar.innerWidth = tableBound.width;
};
TableScroller.prototype.updateContentSize = function () {
  if (!this.$originTable) return;
  this._updateScrollStatus();
  this._updateFixedYHeaderSize();
  this._updateFixedXColSize();
  this._updateFixedXYHeaderSize();
};
TableScroller.prototype.reindexRows = function () {
  if (!this.$originTableBody) return;
  Array.prototype.filter.call(this.$originTableBody.childNodes, function (elt) {
    return elt.tagName === 'TR';
  }).forEach(function (elt, i) {
    if (elt.$idx === null) return;
    elt.$idx = elt.$idx || $('.as-table-scroller-row-index', elt) || null;
    if (elt.$idx) elt.$idx.attr('data-idx', i + 1);
  });
  Array.prototype.forEach.call(this.$fixXCol.lastChild.childNodes, function (elt, i) {
    if (elt.$idx === null) return;
    elt.$idx = elt.$idx || $('.as-table-scroller-row-index', elt) || null;
    if (elt.$idx) elt.$idx.attr('data-idx', i + 1);
  });
};
TableScroller.prototype.removeRow = function (row) {
  if ($(row).isDescendantOf(this)) {
    row.remove();
    this.requestUpdateContent();
  }
  return this;
};
TableScroller.prototype.addRowBefore = function (row, bf) {
  if (!this.$originTableBody) return this;
  this.$originTableBody.addChildBefore(row, bf);
  this.requestUpdateContent();
  return this;
};
TableScroller.prototype.addRowAfter = function (row, at) {
  if (!this.$originTableBody) return this;
  this.$originTableBody.addChildAfter(row, at);
  this.requestUpdateContent();
  return this;
};
TableScroller.prototype.requestUpdateContent = function () {
  this.domSignal.emit('requestUpdateContent');
};
TableScroller.property = {};
TableScroller.property.fixedCol = {
  set: function set(value) {
    value = value || 0;
    this._fixedCol = value;
    if (value === 0) this.$leftLine.addStyle('display', 'none');else this.$leftLine.removeStyle('display');
    this.requestUpdateContent();

    // this.$domSignal.emit('requestUpdateContent');
  },

  get: function get() {
    return this._fixedCol || 0;
  }
};
_ACore["default"].install(TableScroller);
var _default = TableScroller;
/***
 *
 * @param {TableScroller} elt
 * @constructor
 */
exports["default"] = _default;
function ScrollController(elt) {
  var _this6 = this;
  this.elt = elt;
  Object.keys(this.constructor.prototype).filter(function (k) {
    return k.startsWith('ev_');
  }).forEach(function (k) {
    return _this6[k] = _this6[k].bind(_this6);
  });
  this.vscrollTarget = null;
  this.hscrollTarget = null;
  this.elt.$vscroller.on('scroll', this.ev_vScrollerScroll);
  this.elt.$vscrollbar.on('scroll', this.ev_vScrollbarScroll);
  this.elt.$hscroller.on('scroll', this.ev_hScrollerScroll);
  this.elt.$hscrollbar.on('scroll', this.ev_hScrollbarScroll);
  this.elt.$fixedYHeaderScroller.on('scroll', this.ev_fixedYHeaderScroll);
}
ScrollController.prototype.ev_vScrollerScroll = function (event) {
  var now = new Date().getTime();
  if (this.vscrollTarget && now - this.vscrollTarget.time < 100 && this.vscrollTarget.elt !== this.elt.$vscroller) return;
  this.elt.$vscrollbar.innerOffset = this.elt.$vscroller.scrollTop;
  this.vscrollTarget = {
    time: now,
    elt: this.elt.$vscroller
  };
};
ScrollController.prototype.ev_vScrollbarScroll = function (event) {
  var now = new Date().getTime();
  if (this.vscrollTarget && now - this.vscrollTarget.time < 100 && this.vscrollTarget.elt !== this.elt.$vscrollbar) return;
  this.elt.$vscroller.scrollTop = this.elt.$vscrollbar.innerOffset;
  this.vscrollTarget = {
    time: now,
    elt: this.elt.$vscrollbar
  };
};
ScrollController.prototype.ev_hScrollerScroll = function (event) {
  var now = new Date().getTime();
  if (this.hscrollTarget && now - this.hscrollTarget.time < 100 && this.hscrollTarget.elt !== this.elt.$hscroller) return;
  this.elt.$hscrollbar.innerOffset = this.elt.$hscroller.scrollLeft;
  this.elt.$fixedYHeaderScroller.scrollLeft = this.elt.$hscroller.scrollLeft;
  this.hscrollTarget = {
    time: now,
    elt: this.elt.$hscroller
  };
};
ScrollController.prototype.ev_fixedYHeaderScroll = function (event) {
  var now = new Date().getTime();
  if (this.hscrollTarget && now - this.hscrollTarget.time < 100 && this.hscrollTarget.elt !== this.elt.$fixedYHeaderScroller) return;
  this.elt.$hscrollbar.innerOffset = this.elt.$fixedYHeaderScroller.scrollLeft;
  this.elt.$hscroller.scrollLeft = this.elt.$fixedYHeaderScroller.scrollLeft;
  this.hscrollTarget = {
    time: now,
    elt: this.elt.$fixedYHeaderScroller
  };
};
ScrollController.prototype.ev_hScrollbarScroll = function (event) {
  var now = new Date().getTime();
  if (this.hscrollTarget && now - this.hscrollTarget.time < 100 && this.hscrollTarget.elt !== this.elt.$hscrollbar) return;
  this.elt.$hscroller.scrollLeft = this.elt.$hscrollbar.innerOffset >> 0;
  this.vscrollTarget = {
    time: now,
    elt: this.elt.$hscrollbar
  };
};

/***/ }),

/***/ 77921:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 * @param {TokenizeInput} elt
 * @constructor
 */
function TIHistory(elt) {
  this.elt = elt;
  this.stack = [];
  this.topIdx = -1;
}
TIHistory.prototype.commit = function (text, offset) {
  while (this.topIdx < this.stack.length - 1) {
    this.stack.pop();
  }
  var lastText = this.stack.length > 0 ? this.stack[this.stack.length - 1].text : null;
  if (text === lastText) {
    if (this.stack[this.stack.length - 1].offset !== offset) this.stack[this.stack.length - 1].offset = offset;
  } else {
    this.topIdx = this.stack.length;
    var record = {
      text: text,
      offset: offset
    };
    this.stack.push(record);
    this.elt.emit('change', {
      target: this,
      value: record.text,
      action: 'commit',
      record: record,
      type: 'change'
    }, this);
  }
};
TIHistory.prototype.undo = function () {
  if (this.topIdx <= 0) return;
  this.topIdx--;
  var record = this.stack[this.topIdx];
  this.elt.applyData(record.text, record.offset);
  this.elt.emit('change', {
    target: this,
    value: record.text,
    action: 'undo',
    record: record,
    type: 'change'
  }, this);
};
TIHistory.prototype.redo = function () {
  if (this.topIdx + 1 >= this.stack.length) return;
  this.topIdx++;
  var record = this.stack[this.topIdx];
  this.elt.applyData(record.text, record.offset);
  this.elt.emit('change', {
    target: this,
    value: record.text,
    action: 'redo',
    record: record,
    type: 'change'
  }, this);
};
var _default = TIHistory;
exports["default"] = _default;

/***/ }),

/***/ 97170:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _tiutils = __webpack_require__(94614);
var _utils = __webpack_require__(84512);
/****
 *
 * @param {TokenizeInput} elt
 * @constructor
 */
function TISelectionController(elt) {
  this.elt = elt;
  this.prevRange = null;
}
TISelectionController.prototype.onSelect = function () {
  var _this = this;
  var key = this.elt.prevKey && new Date().getTime() - this.elt.prevKey.time < 100 ? this.elt.prevKey.value : '';
  var sel = document.getSelection();
  var range = sel.getRangeAt(0);
  var direction = (0, _utils.getSelectionRangeDirection)(range);
  var newRange;
  var handleEmojiToken = function handleEmojiToken() {
    var startCtn = range.startContainer;
    var startOffset = range.startOffset;
    var startToken;
    var endCtn = range.endContainer;
    var endOffset = range.endOffset;
    var endToken;
    var changed = 0;
    var textData;
    var nextTextNode;
    var prevTextNode;
    var displayText;
    var newText;
    if ((0, _tiutils.isTokenText)(startCtn)) {
      startToken = startCtn.parentElement;
      displayText = startToken.getAttribute('data-display');
      textData = startCtn.data;
      if (range.collapsed) {
        if (textData.length < displayText.length) {
          prevTextNode = _this.getPrevTextNode(startCtn);
          if (!(0, _tiutils.isText)(prevTextNode)) {
            prevTextNode = document.createTextNode('');
            startToken.parentElement.insertBefore(prevTextNode, startToken);
          }
          startToken.remove();
          startCtn = prevTextNode;
          startOffset = prevTextNode.data.length;
          changed = 1;
        } else if (textData === displayText && startOffset < displayText.length && startOffset > 0) {
          if (key === 'arrowright' || !key) {
            startOffset = displayText.length;
            changed = 1;
          } else if (key === 'arrowleft') {
            startOffset = 0;
            changed = 1;
          } else if (key === 'mouseup') {
            startOffset = 0;
            endOffset = displayText.length;
            changed = 2;
          }
        } else if (textData.length > displayText.length) {
          if (startOffset === textData.length) {
            nextTextNode = startToken.nextSibling;
            if (!(0, _tiutils.isText)(nextTextNode)) {
              newText = document.createTextNode('');
              nextTextNode.parentElement.insertBefore(newText, nextTextNode);
              nextTextNode = newText;
            }
            nextTextNode.data = textData.substring(displayText.length) + nextTextNode.data;
            startCtn.data = displayText;
            startCtn = nextTextNode;
            startOffset = textData.length - displayText.length;
            changed = 1;
          } else {
            prevTextNode = startToken.previousSibling;
            if (!(0, _tiutils.isText)(prevTextNode)) {
              newText = document.createTextNode('');
              startToken.parentElement.insertBefore(newText, startToken);
              prevTextNode = newText;
            }
            prevTextNode.data += textData.substring(0, textData.length - displayText.length);
            startCtn.data = displayText;
            startCtn = prevTextNode;
            startOffset = startCtn.data.length;
          }
        }
      } else {
        if (startOffset > 0 && startOffset < displayText.length) {
          startOffset = 0;
          changed = 2;
        }
      }
    }
    if ((0, _tiutils.isTokenText)(endCtn)) {
      endToken = endCtn.parentElement;
      displayText = endToken.getAttribute('data-display');
      if (!range.collapsed) {
        if (endOffset < displayText.length) {
          endOffset = displayText.length;
          changed = 2;
        }
      }
    }
    if (changed > 0) {
      newRange = document.createRange();
      newRange.setStart(startCtn, startOffset);
      if (changed > 1) {
        newRange.setEnd(endCtn, endOffset);
      } else {
        //for saving
        endOffset = startOffset;
        endCtn = startCtn;
      }
      (0, _utils.setSelectionRange)(newRange, direction === 'backward');
    }
    var nextToken, nextText;
    if ((0, _tiutils.isToken)(endCtn.nextSibling)) {
      nextToken = endCtn.nextSibling;
      displayText = nextToken.getAttribute('data-display');
      nextText = (0, _tiutils.getFirstTextNode)(nextToken);
      if (!nextText || nextText.data !== displayText) nextToken.remove();
    }
    _this.prevRange = {
      startOffset: startOffset,
      startContainer: startCtn,
      endOffset: endOffset,
      endContainer: endCtn
    };
  };
  handleEmojiToken();
};
TISelectionController.prototype.getNextTextNode = function (current) {
  return (0, _tiutils.findNextTextNode)(this.elt, current);
};
TISelectionController.prototype.getPrevTextNode = function (current) {
  return (0, _tiutils.findPrevTextNode)(this.elt, current);
};
TISelectionController.prototype.setRangeByOffset = function (offset) {
  var start, end, direction;
  if (typeof offset === "number") {
    start = offset;
    end = offset;
    direction = 'forward';
  } else {
    start = offset.start;
    end = offset.end;
    direction = offset.direction || 'forward';
  }
  var startCtn = null;
  var startOffset = 0;
  var endCtn = null;
  var endOffset = 0;
  var st = '';
  var nodes = Array.prototype.slice.call(this.elt.childNodes);
  if ((0, _tiutils.isNewLine)(nodes[nodes.length - 1])) nodes.pop();
  var node;
  for (var i = 0; i < nodes.length; ++i) {
    node = nodes[i];
    if ((0, _tiutils.isText)(node)) {
      st += node.data;
      if (!startCtn && st.length >= start) {
        startCtn = node;
        startOffset = node.data.length - (st.length - start);
      }
      if (!endCtn && st.length >= end) {
        endCtn = node;
        endOffset = node.data.length - (st.length - end);
      }
    } else if ((0, _tiutils.isToken)(node)) {
      st += node.getAttribute('data-text');
      if (!startCtn && st.length >= start) {
        startCtn = (0, _tiutils.getFirstTextNode)(node);
        startOffset = startCtn.data.length;
      }
      if (!endCtn && st.length >= end) {
        endCtn = (0, _tiutils.getFirstTextNode)(node);
        endOffset = endCtn.data.length;
      }
    } else if ((0, _tiutils.isNewLine)(node)) {
      st += '\n';
      if (!startCtn && st >= start) {
        startCtn = this.elt;
        startOffset = i + 1;
      }
      if (!endCtn && st.length >= end) {
        endCtn = this.elt;
        endOffset = i + 1;
      }
    }
  }
  if (!startCtn) {
    if (nodes.length > 0) {
      node = nodes[nodes.length - 1];
      if ((0, _tiutils.isNewLine)(node)) {
        startCtn = this.elt;
        startOffset = nodes.length;
      } else if ((0, _tiutils.isText)(node)) {
        startCtn = node;
        startOffset = node.length;
      } else {
        startCtn = (0, _tiutils.getLastTextNode)(node);
        startOffset = node.length;
      }
    } else {
      startCtn = this.elt;
      startOffset = 0;
    }
  }
  if (!endCtn) {
    endCtn = startCtn;
    endOffset = startOffset;
  }
  this.prevRange = {
    startContainer: startCtn,
    startOffset: startOffset,
    endContainer: endCtn,
    endOffset: endOffset
  };
  var range = document.createRange();
  range.setStart(startCtn, startOffset);
  range.setEnd(endCtn, endOffset);
  (0, _utils.setSelectionRange)(range, direction === 'backward');
};
TISelectionController.prototype.getOffset = function (range) {
  range = range || this.elt.selectionCtrl.prevRange;
  if (!range) return null;
  var nodes = Array.prototype.slice.call(this.elt.childNodes);
  if ((0, _tiutils.isNewLine)(nodes[nodes.length - 1])) nodes.pop();
  var startCtn = range.startContainer;
  var startOffset = range.startOffset;
  var endCtn = range.endContainer;
  var endOffset = range.endOffset;
  if (startCtn === this.elt) {
    startCtn = this.elt.childNodes[startOffset - 1];
    startOffset = 1;
  } else if ((0, _tiutils.isTokenText)(startCtn)) {
    startCtn = startCtn.parentElement;
    if (startOffset > 0) startOffset = startCtn.getAttribute('data-text').length;
  }
  if (endCtn === this.elt) {
    endCtn = this.elt.childNodes[endOffset];
    endOffset = 1;
  } else if ((0, _tiutils.isTokenText)(endCtn)) {
    endCtn = endCtn.parentElement;
    if (endOffset > 0) endOffset = endCtn.getAttribute('data-text').length;
  }
  var start = undefined;
  var end = undefined;
  var direction = (0, _utils.getSelectionRangeDirection)(range);
  var st = '';
  var node;
  for (var i = 0; i < nodes.length; ++i) {
    node = nodes[i];
    if ((0, _tiutils.isText)(node)) {
      if (start === undefined && node === startCtn) {
        start = st.length + startOffset;
      }
      if (end === undefined && node === endCtn) {
        end = st.length + endOffset;
      }
      st += node.data;
    } else if ((0, _tiutils.isToken)(node)) {
      if (start === undefined && node === startCtn) {
        start = st.length + startOffset;
      }
      if (end === undefined && node === endCtn) {
        end = st.length + endOffset;
      }
      st += node.getAttribute('data-text');
    } else if ((0, _tiutils.isNewLine)(node)) {
      st += '\n';
      if (start === undefined && node === startCtn) {
        start = st.length;
      }
      if (end === undefined && node === endCtn) {
        end = st.length;
      }
    }
  }
  if (start === undefined) start = 0;
  if (end === undefined) {
    end = start;
  }
  return {
    start: start,
    end: end,
    direction: direction
  };
};
var _default = TISelectionController;
exports["default"] = _default;

/***/ }),

/***/ 46867:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.EMPTY_2_SPACES = void 0;
var _EmojiAnims = __webpack_require__(98541);
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _EmojiPicker = _interopRequireDefault(__webpack_require__(24169));
var _utils = __webpack_require__(84512);
var _tiutils = __webpack_require__(94614);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var EMPTY_2_SPACES = String.fromCharCode(0x2003);
exports.EMPTY_2_SPACES = EMPTY_2_SPACES;
var emojiCSSLoaded = false;
function loadEmojiCSS() {
  if (emojiCSSLoaded) return;
  emojiCSSLoaded = true;
  _Dom["default"].documentReady.then(function () {
    var styleSheet = {};
    for (var name in _EmojiAnims.EmojiAnimByIdent) {
      styleSheet['.as-emoji-token[data-text="' + name + '"]'] = {
        'background-image': 'url(' + _EmojiPicker["default"].assetRoot + '/static/x20/' + _EmojiAnims.EmojiAnimByIdent[name][1] + ')'
      };
    }
    (0, _utils.buildCss)(styleSheet);
  });
}

/***
 *
 * @param {TokenizeHyperInput} elt
 * @constructor
 */
function TITextController(elt) {
  loadEmojiCSS();
  this.elt = elt;
}
TITextController.prototype.setText = function (text) {
  this.elt.clearChild();
  this.elt.addChild((0, _tiutils.text2ContentElements)(text, {
    tagMap: this.elt.tagMap
  }));
  this.elt.addChild(this.elt.$br);
};
TITextController.prototype.getText = function () {
  var nodes = Array.prototype.slice.call(this.elt.childNodes);
  if ((0, _tiutils.isNewLine)(nodes[nodes.length - 1])) {
    nodes.pop();
  }
  return nodes.map(function (node) {
    if ((0, _tiutils.isText)(node)) {
      return node.data;
    } else if ((0, _tiutils.isToken)(node)) {
      return node.getAttribute('data-text') || '';
    } else if ((0, _tiutils.isNewLine)(node)) return '\n';
  }).join('');
};

/***
 *
 * @param {Range=} range default: previous selected range
 */
TITextController.prototype.getTextByRange = function (range) {
  range = range || this.elt.selectionCtrl.prevRange;
  if (!range) return this.getText();
  var nodes = Array.prototype.slice.call(this.elt.childNodes);
  if ((0, _tiutils.isNewLine)(nodes[nodes.length - 1])) nodes.pop();
  var startCtn = range.startContainer;
  var startOffset = range.startOffset;
  var endCtn = range.endContainer;
  var endOffset = range.endOffset;
  if (startCtn === this.elt) {
    startCtn = this.elt.childNodes[startOffset - 1];
    startOffset = 0;
  } else if ((0, _tiutils.isTokenText)(startCtn)) {
    startCtn = startCtn.parentElement;
  }
  if (endCtn === this.elt) {
    endCtn = this.elt.childNodes[endOffset];
    endOffset = 0;
  } else if ((0, _tiutils.isTokenText)(endCtn)) {
    endCtn = endCtn.parentElement;
  }
  if (startCtn === endCtn) {
    if ((0, _tiutils.isToken)(startCtn)) {
      return startCtn.getAttribute('data-text');
    } else if ((0, _tiutils.isText)(startCtn)) {
      return startCtn.data.substring(startOffset, endOffset);
    }
    return '';
  }
  var res = '';
  var node;
  var started = false;
  for (var i = 0; i < nodes.length; ++i) {
    node = nodes[i];
    if (started) {
      if (endCtn === node) {
        if ((0, _tiutils.isToken)(endCtn)) {
          res += node.getAttribute('data-text');
        } else if ((0, _tiutils.isText)(node)) {
          res += node.data.substring(0, endOffset);
        }
        break;
      } else {
        if ((0, _tiutils.isToken)(node)) {
          res += node.getAttribute('data-text');
        } else if ((0, _tiutils.isText)(node)) {
          res += node.data;
        } else if ((0, _tiutils.isNewLine)(node)) {
          res += '\n';
        }
      }
    } else {
      if (startCtn === node) {
        started = true;
        if ((0, _tiutils.isText)(node)) {
          res += node.data.substring(startOffset);
        } else if ((0, _tiutils.isToken)(node)) {
          if (startOffset === 0) {
            res += node.getAttribute('data-text');
          }
        }
      }
    }
  }
  return res;
};
TITextController.prototype.applyData = function (text, offset) {
  this.setText(text);
  this.elt.selectionCtrl.setRangeByOffset(offset);
};
TITextController.prototype.insertText = function (text) {
  var range = document.getSelection().getRangeAt(0);
  range.deleteContents();
  this.elt.selectionCtrl.onSelect();
  range = document.getSelection().getRangeAt(0);
  var eltChain = (0, _tiutils.text2ContentElements)(text, {
    tagMap: this.elt.tagMap
  });
  var startCtn = range.startContainer;
  var at;
  if ((0, _tiutils.isTokenText)(startCtn)) {
    at = startCtn.parentElement;
  } else if (startCtn === this.elt) {
    at = this.elt.childNodes[range.startOffset - 1];
  }
  var newNode;
  while (eltChain.length > 0) {
    newNode = eltChain.shift();
    if (!at) {
      this.elt.addChildBefore(newNode, this.elt.firstChild);
      at = newNode;
    } else if ((0, _tiutils.isText)(at) && (0, _tiutils.isText)(newNode)) {
      at.data += newNode.data;
    } else {
      this.elt.addChildAfter(newNode, at);
      at = newNode;
    }
  }
};
var _default = TITextController;
exports["default"] = _default;

/***/ }),

/***/ 85070:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(67362);
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _file = __webpack_require__(54134);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _TIHistory = _interopRequireDefault(__webpack_require__(77921));
var _TITextController = _interopRequireDefault(__webpack_require__(46867));
var _TISelectionController = _interopRequireDefault(__webpack_require__(97170));
var _keyboard = __webpack_require__(95141);
var _utils = __webpack_require__(84512);
var _tiutils = __webpack_require__(94614);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var textDelay = _BrowserDetector["default"].isSafari ? 100 : 1;

/***
 * @extends AElement
 * @constructor
 */
function TokenizeHyperInput() {
  this._tagMap = {};
  this.$br = (0, _ACore.$)('br', this);
  this.historyCtrl = new _TIHistory["default"](this);
  this.textCtrl = new _TITextController["default"](this);
  this.selectionCtrl = new _TISelectionController["default"](this);
  this.prevKey = null;
  this.defineEvent(['pasteimg', 'pastefile', 'pastetext', 'change']);
  this.on('paste', this.eventHandler.paste);
  this.on('keydown', this.eventHandler.keydown);
  this.on('mouseup', this.eventHandler.mouseup);
  this.value = '';
  this.historyCtrl.commit('', 0);
  /***
   * @type {{}}
   * @name tagMap
   *@memberOf TokenizeHyperInput#
   *
   */
}

TokenizeHyperInput.tag = 'TokenizeHyperInput'.toLowerCase();
TokenizeHyperInput.render = function () {
  return (0, _ACore._)({
    tag: 'pre',
    "class": 'as-tokenize-hyper-input',
    attr: {
      contenteditable: 'true',
      spellcheck: "false"
    },
    child: 'br'
  });
};
TokenizeHyperInput.prototype.applyData = function (text, offset) {
  this.textCtrl.applyData(text, offset);
};
TokenizeHyperInput.prototype.select = function (offset) {
  if (document.activeElement !== this) this.focus();
  this.applyData(this.value, offset);
};
TokenizeHyperInput.prototype.scrollIntoRange = function (range) {
  var elementBound = range.getBoundingClientRect();
  var viewportBound = this.getBoundingClientRect();
  var dBottom = 0;
  if (range.startContainer && range.startContainer.data && range.startContainer.data.charAt(range.startContainer.data.length - 1) == '\n') dBottom += this.getFontSize() * 1.5;
  var currentScrollTop = this.scrollTop;
  var newScrollTop = currentScrollTop;
  if (elementBound.bottom + dBottom > viewportBound.bottom) {
    newScrollTop = currentScrollTop + (elementBound.bottom + dBottom - viewportBound.bottom);
  }
  if (elementBound.top < viewportBound.top) {
    newScrollTop = currentScrollTop - (viewportBound.top - elementBound.top);
  }
  if (newScrollTop != currentScrollTop) {
    this.scrollTop = newScrollTop;
  }
  var currentScrollLeft = this.scrollLeft;
  var newScrollLeft = currentScrollLeft;
  if (elementBound.right > viewportBound.right) {
    newScrollLeft = currentScrollLeft + (elementBound.right - viewportBound.right);
  }
  if (elementBound.left < viewportBound.left) {
    newScrollLeft = currentScrollLeft - (viewportBound.left - elementBound.left);
  }
  if (newScrollLeft != currentScrollLeft) {
    this.scrollLeft = newScrollLeft;
  }
};
TokenizeHyperInput.prototype.undo = function () {
  this.historyCtrl.undo();
};
TokenizeHyperInput.prototype.redo = function () {
  this.historyCtrl.redo();
};
TokenizeHyperInput.prototype.commitChange = function (text, offset) {
  this.historyCtrl.commit(text, offset);
  this.emit('change', {}, this);
};
TokenizeHyperInput.prototype.waitToCommit = function (text, offset) {
  var thisInput = this;
  if (this._commitTimeout > 0) clearTimeout(this._commitTimeout);
  this._commitTimeout = setTimeout(function () {
    thisInput.commitChange(text, offset);
  }, textDelay);
};
TokenizeHyperInput.prototype.getPosition = function (node, offset) {
  if (!node) return NaN;
  if (node === this) return offset;
  var parent = node.parentElement;
  if (!parent) return NaN;
  var text = '';
  var child;
  var lastBr = false;
  for (var i = 0; i < parent.childNodes.length; ++i) {
    child = parent.childNodes[i];
    if (child == node) break;
    text += this.stringOf(child);
  }
  return this.getPosition(parent, text.length + offset);
};
TokenizeHyperInput.prototype.getSelectPosition = function () {
  return this.selectionCtrl.getOffset();
};

/**
 * @type {TokenizeHyperInput}
 */
TokenizeHyperInput.eventHandler = {};
TokenizeHyperInput.eventHandler.paste = function (event) {
  var _this = this;
  var clipboardData = event.clipboardData || window.clipboardData;
  if (!clipboardData) {
    alert('Input not support browser without clipboard API!');
    return;
  }
  if (clipboardData.items) {
    var items = Array.prototype.slice.call(clipboardData.items);
    var imgItems = items.filter(function (item) {
      return item.type.indexOf('image') >= 0;
    });
    var fileItems = items.filter(function (item) {
      return item.type !== 'text/plain' && item.type.indexOf('image') < 0;
    });
    var plainTextItems = items.filter(function (item) {
      return item.type.indexOf('text/plain') >= 0;
    });
    if (imgItems.length > 0) {
      var imgFiles = imgItems.map(function (it) {
        return it.getAsFile();
      });
      this.emit('pasteimg', {
        target: this,
        imageFile: imgFiles[0],
        imageFiles: imgFiles,
        originalEvent: event
      }, this);
    }
    if (fileItems.length > 0) {
      var files = fileItems.map(function (item) {
        return item.getAsFile();
      });
      this.emit('pastefile', {
        target: this,
        file: files[0],
        files: files,
        originalEvent: event
      }, this);
    }
    if (plainTextItems.length > 0) {
      var plainTextItem = plainTextItems[0]; //only one item
      plainTextItem.getAsString(function (text) {
        _this.textCtrl.insertText(text);
      });
    }
    event.preventDefault();
  } else {
    var text = event.clipboardData.getData('text/plain');
    if (text) {
      event.preventDefault();
      this.textCtrl.insertText(text);
    }
  }
  this.waitToCommit();
};
TokenizeHyperInput.eventHandler.keydown = function (event) {
  var _this2 = this;
  this.prevKey = {
    time: new Date().getTime(),
    value: (0, _keyboard.keyboardEventToKeyBindingIdent)(event)
  };
  setTimeout(function () {
    _this2.selectionCtrl.onSelect();
    _this2.waitToCommit();
  }, textDelay);
};

/***
 * @this TokenizeHyperInput
 * @param event
 */
TokenizeHyperInput.eventHandler.mouseup = function (event) {
  this.prevKey = {
    time: new Date().getTime(),
    value: 'mouseup'
  };
  this.selectionCtrl.onSelect();
};
TokenizeHyperInput.property = {};
TokenizeHyperInput.property.value = {
  set: function set(value) {
    value = value || '';
    this.textCtrl.setText(value);
    // this.applyData(value, value.length);
    this.commitChange(value, value.length);
  },
  get: function get() {
    return this.textCtrl.getText();
  }
};
TokenizeHyperInput.property.disabled = {
  set: function set(value) {
    value = !!value;
    if (value === this.hasClass('as-disabled')) return;
    if (value) {
      this.addClass('as-disabled');
      this.attr({
        contenteditable: undefined,
        oncut: 'return false',
        onpaste: 'return false',
        onkeydown: 'if(event.metaKey) return true; return false;'
      });
    } else {
      this.removeClass('as-disabled');
      this.attr({
        contenteditable: true,
        oncut: undefined,
        onpaste: undefined,
        onkeydown: undefined
      });
    }
  },
  get: function get() {
    return this.hasClass('as-disabled');
  }
};
TokenizeHyperInput.property.tagList = {
  get: function get() {
    return (0, _utils.getTagListInTextMessage)(this.value);
  }
};
TokenizeHyperInput.property.tagMap = {
  set: function set(o) {
    var _this3 = this;
    o = o || {};
    this._tagMap = o;
    Array.prototype.forEach.call(this.childNodes, function (child) {
      var id, text;
      if (child.classList && child.classList.contains('as-tag-token')) {
        id = child.getAttribute('data-text') || '';
        id = id.substring(5, id.length - 1);
        text = _this3._tagMap[id];
        if (text) {
          child.getAttribute('data-display', '@' + text);
          child.firstChild.data = '@' + text;
        }
      }
    });
  },
  get: function get() {
    return this._tagMap;
  }
};
_ACore["default"].install(TokenizeHyperInput);
var _default = TokenizeHyperInput;
exports["default"] = _default;

/***/ }),

/***/ 94614:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.findNextTextNode = findNextTextNode;
exports.findPrevTextNode = findPrevTextNode;
exports.isTokenText = exports.isToken = exports.isText = exports.isNewLine = exports.getLastTextNode = exports.getFirstTextNode = void 0;
exports.text2ContentElements = text2ContentElements;
exports.tokenizeMessageText = tokenizeMessageText;
var _EmojiAnims = __webpack_require__(98541);
var _ACore = __webpack_require__(34093);
var _TITextController = __webpack_require__(46867);
function tokenizeMessageText(text) {
  var emojis = _EmojiAnims.EmojiAnimByIdent;
  var splitter = Object.keys(_EmojiAnims.EmojiAnimByIdent).concat(['\n']);
  var tagTokens = text.match(/@\[id:\d+]/g) || [];
  var otherTokens = text.split(/@\[id:\d+]/g);
  var tokens = otherTokens.reduce(function (ac, cr, i) {
    ac.push(cr);
    if (i < tagTokens.length) ac.push(tagTokens[i]);
    return ac;
  }, []);
  tokens = splitter.reduce(function (chain, splitter) {
    return chain.reduce(function (ac, token) {
      var subChain = token.split(splitter);
      for (var i = 0; i < subChain.length; ++i) {
        if (subChain[i]) {
          ac.push(subChain[i]);
        }
        if (i + 1 < subChain.length) {
          ac.push(splitter);
        }
      }
      return ac;
    }, []);
  }, tokens);
  tokens = tokens.map(function (text) {
    var tagId;
    if (text === '\n') {
      return {
        type: 'NEW_LINE'
      };
    } else if (emojis[text]) {
      return {
        type: 'EMOJI',
        value: text
      };
    } else if (text.match(/^@\[id:\d+]$/)) {
      tagId = text.substring(5, text.length - 1);
      return {
        type: "TAG",
        value: tagId
      };
    } else return {
      type: 'TEXT',
      value: text
    };
  });
  return tokens;
}
var isText = function isText(node) {
  return node && node.nodeType === Node.TEXT_NODE;
};
exports.isText = isText;
var isNewLine = function isNewLine(node) {
  return node && node.tagName === 'BR';
};

/***
 *
 * @param {Text|AElement}node
 * @returns {null|*}
 */
exports.isNewLine = isNewLine;
var getFirstTextNode = function getFirstTextNode(node) {
  if (node.nodeType === Node.TEXT_NODE || node.tagName === 'BR') return node;
  var nodes = node.childNodes;
  var res = null;
  for (var i = 0; i < nodes.length && !res; ++i) {
    res = res || getFirstTextNode(nodes[i]);
  }
  return res;
};
exports.getFirstTextNode = getFirstTextNode;
var getLastTextNode = function getLastTextNode(node) {
  if (node.nodeType === Node.TEXT_NODE || node.tagName === 'BR') return node;
  var nodes = node.childNodes;
  var res = null;
  for (var i = nodes.length - 1; i > 0 && !res; --i) {
    res = res || getLastTextNode(node);
  }
  return res;
};
exports.getLastTextNode = getLastTextNode;
var isTokenText = function isTokenText(node) {
  if (node.nodeType !== Node.TEXT_NODE) return false;
  return isToken(node.parentElement);
};
exports.isTokenText = isTokenText;
var isToken = function isToken(node) {
  return node && node.classList && (node.classList.contains('as-emoji-token') || node.classList.contains('as-tag-token'));
};
exports.isToken = isToken;
function findNextTextNode(root, current) {
  var nextTextNode = function nextTextNode(node) {
    var res = null;
    var next = node.nextSibling;
    while (next && !res) {
      res = getFirstTextNode(next);
      next = next.nextSibling;
    }
    if (!res && node.parentElement !== root) {
      res = nextTextNode(node.parentElement);
    }
    return res;
  };
  return nextTextNode(current);
}
function findPrevTextNode(root, current) {
  var prevTextNode = function prevTextNode(node) {
    var res = null;
    var prev = node.previousSibling;
    while (prev && !res) {
      res = getLastTextNode(prev);
      prev = prev.previousSibling;
    }
    if (!res && node.parentElement !== root) {
      res = prevTextNode(node.parentElement);
    }
    return res;
  };
  return prevTextNode(current);
}
function text2ContentElements(text, opt) {
  return tokenizeMessageText(text).map(function (token) {
    var textOfTag;
    switch (token.type) {
      case 'NEW_LINE':
        return (0, _ACore._)('br');
      case 'EMOJI':
        return (0, _ACore._)({
          tag: 'span',
          "class": 'as-emoji-token',
          attr: {
            'data-display': _TITextController.EMPTY_2_SPACES,
            'data-text': token.value
          },
          child: {
            text: _TITextController.EMPTY_2_SPACES
          }
        });
      case 'TAG':
        textOfTag = opt.tagMap && opt.tagMap[token.value];
        return (0, _ACore._)({
          tag: 'span',
          "class": 'as-tag-token',
          attr: {
            'data-text': '@[id:' + token.value + ']',
            'data-display': textOfTag ? '@' + textOfTag : '@[id:' + token.value + ']'
          },
          child: {
            text: textOfTag ? '@' + textOfTag : '@[id:' + token.value + ']'
          }
        });
      case 'TEXT':
      default:
        return (0, _ACore._)({
          text: token.value
        });
    }
  });
}

/***/ }),

/***/ 17471:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = __webpack_require__(46833);
var STATE_INIT = 0;
var STATE_ATTACHED = 1;
var STATE_RELEASED = 2;
var STATE_FIRED = 3;
var STATE_DESTROYED = 4;

/***
 *
 * @param {AElement[]|AElement} eltList
 * @param {"click"|"mousedown"} eventType
 * @param {function} callback
 * @param {number=} initAfter
 * @param {number=} fireDelay
 * @param {*[]=} args
 * @constructor
 */
function BlurTrigger(eltList, eventType, callback, initAfter, fireDelay, args) {
  this.args = args || [];
  this.callback = callback;
  this.eltTargets = eltList || [];
  this.initAfter = initAfter || 0;
  this.fireDelay = fireDelay || 0;
  this.state = STATE_INIT;
  this.eventType = eventType;
  this['ev_mouse'] = this.ev_mouse.bind(this);
  this['ev_blur'] = this.ev_blur.bind(this);
  if (this.initAfter > 0) {
    setTimeout(this._attach.bind(this));
  } else this._attach();
}
BlurTrigger.prototype._attach = function () {
  if (this.state !== STATE_INIT) return;
  document.addEventListener(this.eventType, this.ev_mouse);
  window.addEventListener('blur', this.ev_blur);
  this.state = STATE_ATTACHED;
};
BlurTrigger.prototype._fire = function () {
  if (this.state !== STATE_RELEASED) return;
  this.callback.apply(this, this.args);
  this.state = STATE_FIRED;
};
BlurTrigger.prototype._release = function () {
  if (this.state !== STATE_ATTACHED) return;
  document.removeEventListener(this.eventType, this.ev_mouse);
  window.removeEventListener('blur', this.ev_blur);
  this.state = STATE_RELEASED;
};
BlurTrigger.prototype.destroy = function () {
  if (this.state === 4) return;
  if (this.state === STATE_ATTACHED) this._release();
  this.state = STATE_DESTROYED;
};
BlurTrigger.prototype._prepareFire = function () {
  if (this.fireDelay > 0) {
    setTimeout(this._fire.bind(this), this.fireDelay);
  } else {
    this._fire();
  }
};
BlurTrigger.prototype.ev_mouse = function (event) {
  var hit = false;
  if (this.eltTargets instanceof Array) {
    hit = this.eltTargets.some(function (elt) {
      return (0, _EventEmitter.hitElement)(elt, event);
    });
  } else if (typeof hit === "function") {
    hit = this.eltTargets.call(this, event.target);
  }
  if (!hit) {
    this._release();
    this._prepareFire();
  }
};
BlurTrigger.prototype.ev_blur = function () {
  setTimeout(function () {
    if (this.state !== STATE_ATTACHED) return;
    var tagName = document.activeElement && document.activeElement.tagName || '';
    tagName = tagName.toLowerCase();
    if (tagName === 'iframe') {
      this._release();
      this._prepareFire();
    }
  }.bind(this), 0);
};
var _default = BlurTrigger;
exports["default"] = _default;

/***/ }),

/***/ 77694:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * @deprecated use TextMeasure instead
 * @param opts
 * @constructor
 */
function TextMeasurement(opts) {
  opts = opts || {};
  this.chars = opts.chars || (" !\"$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "[\\]^_abcdefghijklmnopqrstuvwxyz{|}" + "¥©ÀÁÂÃÈÉÊÌÍÒÓÔÕÙÚÝàáâãèéêìíñòóôõùúýĂăĐđĨĩŨũƠơƯưẠ̌̀́̃̉Р" + "ийксуẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặẸẹẺẻẼẽẾếỀềỂểỄễỆệỈỉỊị" + "ỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợỤụỦủỨứỪừỬửỮữỰựỲỳỴỵỶỷỸỹ–’“”…₫€?").split('');
  this.computed = Object.assign({}, opts.computed || {});
}
TextMeasurement.prototype.compute = function (font) {
  if (this.computed[font]) return true;
  if (!('document' in window)) return false;
  if (!this.canvas) {
    this.canvas = document.createElement('canvas');
    this.ctx = this.canvas.getContext('2d');
  }
  var ctx = this.ctx;
  ctx.font = font;
  var data = {};
  var charBoxes = {};
  data.charBoxes = charBoxes;
  var c, d, i, j;
  var metrics;
  var n = this.chars.length;
  var chars = this.chars;
  for (i = 0; i < n; ++i) {
    c = chars[i];
    metrics = ctx.measureText(c);
    charBoxes[c] = metrics.width;
  }
  var spacing = {};
  data.spacing = spacing;
  var pair;
  for (i = 0; i < n; ++i) {
    c = chars[i];
    for (j = 0; j < n; ++j) {
      d = chars[j];
      pair = c + d;
      metrics = ctx.measureText(pair);
      spacing[pair] = metrics.width - charBoxes[c] - charBoxes[d];
    }
  }
  this.computed[font] = data;
  return true;
};

/***
 *
 * @param {string} text
 * @param {string=} font
 * @return {number}
 */
TextMeasurement.prototype.measureTextWidth = function (text, font) {
  var l = text.length;
  if (l === 0) return 0;
  var width = 0;
  var data = this.computed[font];
  var charBoxes = data.charBoxes;
  var spacing = data.spacing;
  var c, pc;
  pc = text[0];
  width += charBoxes[pc] || charBoxes['0'];
  for (var i = 1; i < l; ++i) {
    c = text[i];
    width += spacing[pc + c];
    width += charBoxes[c] || charBoxes['0'];
    pc = c;
  }
  return width;
};
var _default = TextMeasurement;
exports["default"] = _default;

/***/ }),

/***/ 15190:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TTRow = _interopRequireWildcard(__webpack_require__(66511));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 *
 * @param {TTTable}table
 * @param {TTDBody} data
 * @constructor
 */
function TTBody(table, data) {
  var _this = this;
  this.table = table;
  this.data = data;
  this.elt = this.table.elt.$body;
  /***
   *
   * @type {TTRow[]}
   */
  this.rows = (this.data.rows || []).map(function (rowData) {
    return new _TTRow["default"](_this, rowData, null);
  });
  this.clonedRows = null;
  this.renderRows();
}
TTBody.prototype.applyQueryResult = function (queryResult) {
  this.clearClonedRows();
  if (queryResult) {
    this.table.elt.addClass('as-searching');
    this.clonedRows = this.rows.filter(function (row) {
      return queryResult[row.id];
    }).map(function (row, i) {
      return new _TTRow.TTClonedRow(row, queryResult, i);
    });
    this.clonedRows.sort(function (a, b) {
      var sa = a.score[1];
      var sb = b.score[1];
      if (sa !== sb) return sb - sa;
      return a.idx - b.idx;
    });
    this.renderRows(this.clonedRows);
    this.table.elt.notifySizeChange();
  } else {
    this.table.elt.removeClass('as-searching');
    this.renderRows();
  }
};
TTBody.prototype.clearClonedRows = function () {
  if (this.clonedRows) this.clonedRows.forEach(function (row) {
    return row.detach();
  });
  this.clonedRows = null;
};

/***
 *
 */
TTBody.prototype.renderRows = function (rows) {
  rows = rows || this.rows;
  this.elt.clearChild().addChild(rows.reduce(function (ac, row) {
    row.getRowElements(ac);
    return ac;
  }, []));
};

/***
 *
 * @param data
 */
TTBody.prototype.rowOf = function (data) {
  if (data instanceof _TTRow["default"]) {
    data = data.data;
  }
  var result = null;
  var queue = this.rows.slice();
  var cr;
  while (queue.length > 0 && !result) {
    cr = queue.shift();
    if (cr.data === data || cr.data.id === data || data.id && cr.data.id === data.id) {
      result = cr;
    } else {
      queue.push.apply(queue, cr.subRows);
    }
  }
  return result;
};

/***
 *
 * @param {TTDRow} rowData
 */
TTBody.prototype.addRow = function (rowData) {
  var _this2 = this;
  var row = new _TTRow["default"](this, rowData, null);
  this.data.rows.push(rowData);
  this.rows.push(row);
  var elements = row.getRowElements();
  elements.forEach(function (elt) {
    return _this2.elt.addChild(elt);
  });
  _ResizeSystem["default"].requestUpdateSignal();
};
var _default = TTBody;
exports["default"] = _default;

/***/ }),

/***/ 50487:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _DTBodyCell = _interopRequireDefault(__webpack_require__(47817));
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {TTRow} row
 * @param {TTDCell} data
 * @constructor
 */
function TTCell(row, data) {
  this.row = row;
  this.data = data;
}
Object.defineProperty(TTCell.prototype, 'elt', {
  get: function get() {
    var _this = this;
    if (!this._elt) {
      this._elt = (0, _ACore._)({
        tag: 'td',
        "class": 'as-tree-table-cell',
        props: {
          ttCell: this
        },
        on: {
          click: function click(event) {
            if (_this.data && _this.data.on && _this.data.on.click) {
              _this.data.on.click.call(_this._elt, event, _this);
            }
          }
        }
      });
      if (typeof this.data["class"] === "string") {
        (0, _utils.addElementClassName)(this._elt, this.data["class"]);
      }
      if (this.data.attr) this._elt.attr(this.data.attr);
      if (this.data["class"]) this._elt.addClass(this.data["class"]);
      if (this.data.style) this._elt.addStyle(this.data.style);
      this.row.body.table.elt.mAdapter.renderBodyCell(this.elt, this.data, this);
    }
    return this._elt;
  }
});
Object.defineProperty(TTCell.prototype, 'innerText', Object.getOwnPropertyDescriptor(_DTBodyCell["default"].prototype, 'innerText'));
var _default = TTCell;
exports["default"] = _default;

/***/ }),

/***/ 59868:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _TTTable = _interopRequireDefault(__webpack_require__(26033));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {TreeTable} tableElt
 * @param opt
 * @constructor
 */
function TTDataAdapter(tableElt, opt) {
  this.tableElt = tableElt;
  this.data = null;
  Object.assign(this, opt || {});
}
TTDataAdapter.prototype.render = function () {
  if (this.tableElt.table) {}
  this.tableElt.table = new _TTTable["default"](this.tableElt, this.data);
};

/***
 *
 * @param {AElement} elt
 * @param {TTDHeadCell} data
 * @param {TTHeadCell} controller
 */
TTDataAdapter.prototype.renderHeadCell = function (elt, data, controller) {
  if (data.child) {
    if (data.child.map) {
      elt.addChild(data.child.map(function (it) {
        return (0, _ACore._)(it);
      }));
    } else {
      elt.addChild((0, _ACore._)(data.child));
    }
  }
  if (data.render) {
    data.render.call(null, elt, data, controller);
  }
  if (data.style) {
    elt.addStyle(data.style);
  }
};

/***
 *
 * @param {AElement} elt
 * @param {TTDCell} data
 * @param {TTCell} controller
 */
TTDataAdapter.prototype.renderBodyCell = function (elt, data, controller) {
  if (data.child) {
    if (data.child.map) {
      elt.addChild(data.child.map(function (it) {
        return (0, _ACore._)(it);
      }));
    } else {
      elt.addChild((0, _ACore._)(data.child));
    }
  }
  if (data.render) {
    data.render.call(null, elt, data, controller);
  }
  if (data.style) {
    elt.addStyle(data.style);
  }
  if (data["class"]) {
    elt.addClass(data["class"]);
  }
  if (data.attr) {
    elt.attr(data.attr);
  }
};
var _default = TTDataAdapter;
exports["default"] = _default;

/***/ }),

/***/ 18743:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TTHeadRow = _interopRequireDefault(__webpack_require__(16955));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {TTTable} table
 * @param {TTDHead} data
 * @constructor
 */
function TTHead(table, data) {
  var _this = this;
  this.data = data;
  this.table = table;
  this.elt = this.table.elt.$head;
  this.rows = (this.data.rows || []).map(function (rowData) {
    return new _TTHeadRow["default"](_this, rowData);
  });
  this.elt.clearChild().addChild(this.rows.map(function (r) {
    return r.elt;
  }));
}
var _default = TTHead;
exports["default"] = _default;

/***/ }),

/***/ 25105:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
/***
 *
 * @param {TTHeadRow} row
 * @param {TTDHeadCell} data
 * @constructor
 */
function TTHeadCell(row, data) {
  this.row = row;
  this.data = data;
  this.elt = (0, _ACore._)({
    tag: 'th',
    "class": 'as-tree-table-head-cell'
  });
  if (data.attr) this.elt.attr(data.attr);
  if (data.style) this.elt.addStyle(data.style);
  this.row.head.table.elt.mAdapter.renderHeadCell(this.elt, this.data, this);
}
TTHeadCell.prototype.render = function () {};
var _default = TTHeadCell;
exports["default"] = _default;

/***/ }),

/***/ 16955:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _TTHeadCell = _interopRequireDefault(__webpack_require__(25105));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @param {TTHead} head
 * @param {TTDHeadRow} data
 * @constructor
 */
function TTHeadRow(head, data) {
  var _this = this;
  this.head = head;
  this.data = data;
  this.cells = this.data.cells.map(function (cellData) {
    return new _TTHeadCell["default"](_this, cellData);
  });
  this.elt = (0, _ACore._)({
    tag: 'tr',
    "class": 'as-tree-table-head-row'
  });
  this.elt.addChild(this.cells.map(function (cell, i) {
    return cell.elt.attr('data-col-idx', '' + i);
  }));
}
var _default = TTHeadRow;
exports["default"] = _default;

/***/ }),

/***/ 56190:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _ListSearchMaster = _interopRequireDefault(__webpack_require__(85604));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {TreeTable} elt
 * @constructor
 */
function TTQueryController(elt) {
  this.searchMaster = new _ListSearchMaster["default"]();
  this.elt = elt;
  this.$filterInputs = [];
  this.$searchInput = null;
  this['request'] = this['request'].bind(this);
  this._waitDestroy();
  this._rtsiIdx = -1;
}
TTQueryController.prototype._waitDestroy = function () {
  var _this = this;
  setTimeout(function () {
    if (_this.elt.isDescendantOf(document.body)) {
      _this._waitDestroy();
    } else {
      _this.searchMaster.destroy();
    }
  }, 10000);
};
TTQueryController.prototype.attachFilterInput = function (input) {
  if (this.$filterInputs.indexOf(input) >= 0) return;
  if (input.detachTreeTable) input.detachTreeTable();
  input.$treeTable = this;
  if ((0, _ACore.$)(input).isSupportedEvent('stoptyping')) {
    input.on('stoptyping', this.request);
  } else {
    input.on('change', this.request);
  }
  input.detachTreeTable = this.detachFilterInput.bind(this, input);
  this.$filterInputs.push(input);
};
TTQueryController.prototype.detachFilterInput = function (input) {
  var idx = this.$filterInputs.indexOf(input);
  if (idx < 0) return;
  this.$filterInputs.splice(idx, 1);
  input.off(this.$searchInput.isSupportedEvent('stoptyping') ? 'stoptyping' : 'change', this.request);
  input.detachTreeTable = null;
};
TTQueryController.prototype.attachSearchInput = function (input) {
  if (this.$searchInput === input) return;
  if (input.detachTreeTable) input.detachTreeTable();
  this.$searchInput = input;
  if ((0, _ACore.$)(input).isSupportedEvent('stoptyping')) {
    input.on('stoptyping', this.request);
  } else {
    input.on('change', this.request);
  }
  input.detachTreeTable = this.detachSearchInput.bind(this, input);
};
TTQueryController.prototype.detachSearchInput = function (input) {
  input = input || this.$searchInput;
  if (input !== this.$searchInput) return;
  input.off(this.$searchInput.isSupportedEvent('stoptyping') ? 'stoptyping' : 'change', this.request);
  input.detachTreeTable = null;
  this.$searchInput = null;
};
TTQueryController.prototype.makeQuery = function () {
  var res = {};
  if (this.$searchInput && this.$searchInput.value.trim().length > 0) {
    res.text = this.$searchInput.value.trim();
  }
  for (var key in res) {
    return res;
  }
  return null;
};
TTQueryController.prototype.request = function () {
  var _this2 = this;
  var query = this.makeQuery();
  if (query) this.searchMaster.query(query).then(function (searchResult) {
    _this2.elt.table.body.applyQueryResult(searchResult);
  });else this.elt.table.body.applyQueryResult(null);
};
TTQueryController.prototype.getSearchItems = function () {
  var getSearchItemOf = function getSearchItemOf(row) {
    var res = {};
    res.text = row.innerText;
    res.value = row.id;
    if (row.subRows && row.subRows.length > 0) {
      res.items = row.subRows.map(getSearchItemOf);
    }
    return res;
  };
  return this.elt.table.body.rows.map(getSearchItemOf);
};
TTQueryController.prototype.transferSearchItems = function () {
  this.searchMaster.transfer(this.getSearchItems());
};
TTQueryController.prototype.requestTransferSearchItems = function () {
  var _this3 = this;
  if (this._rtsiIdx > 0) return;
  this._rtsiIdx = setTimeout(function () {
    _this3._rtsiIdx = -1;
    _this3.transferSearchItems();
  }, 0);
};
var _default = TTQueryController;
exports["default"] = _default;

/***/ }),

/***/ 66511:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.TTClonedRow = TTClonedRow;
exports["default"] = void 0;
var _ACore = __webpack_require__(34093);
var _TTCell = _interopRequireDefault(__webpack_require__(50487));
var _DTBodyRow = _interopRequireDefault(__webpack_require__(7674));
var _utils = __webpack_require__(84512);
var _stringGenerate = __webpack_require__(10713);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {TTBody} body
 * @param {TTDRow}data
 * @param parentRow
 * @constructor
 */
function TTRow(body, data, parentRow) {
  var _this = this;
  this.id = (0, _stringGenerate.randomIdent)(8);
  this.level = parentRow ? parentRow.level + 1 : 0;
  this.body = body;
  this.data = data;
  this.parentRow = parentRow;
  this.clonedRow = null;
  this.cells = (this.data.cells || []).map(function (cellData) {
    return new _TTCell["default"](_this, cellData);
  });
  this.subRows = (this.data.subRows || []).map(function (rowData) {
    return new TTRow(body, rowData, _this);
  });
  if (!(0, _utils.isNone)(data.id) && data.subRows && data.subRows.length > 0 && data.id in this.body.table.elt.savedState) {
    this.isOpened = !!this.body.table.elt.savedState[data.id];
  } else if (typeof data.initOpened === 'boolean') {
    this.isOpened = data.initOpened;
  } else if (typeof body.table.data.initOpened === "boolean") {
    this.isOpened = body.table.data.initOpened;
  } else if (typeof body.table.elt.initOpen === 'boolean') {
    this.isOpened = body.table.elt.initOpen;
  }
}
TTRow.prototype.isOpened = false;

/***
 *
 * @param {Array<AElement>=} ac
 */
TTRow.prototype.getRowElements = function (ac) {
  ac = ac || [];
  ac.push(this.elt);
  if (this.isOpened) {
    this.subRows.forEach(function (row) {
      return row.getRowElements(ac);
    });
  }
  return ac;
};
TTRow.prototype.toggle = function () {
  if (this.isOpened) this.close();else this.open();
};
TTRow.prototype.open = function () {
  if (this.isOpened) return;
  if (this.subRows.length === 0) return;
  this.isOpened = true;
  if (!(0, _utils.isNone)(this.data.id) && this.cells)
    //real node
    this.body.table.elt.savedState[this.data.id] = this.isOpened;
  this.elt.addClass('as-is-opened');
  var rowElements = this.getRowElements();
  rowElements.shift();
  var bodyElt = this.body.elt;
  var bf = this.body.elt.findChildAfter(this.elt);
  if (bf) {
    rowElements.forEach(function (elt) {
      return bodyElt.addChildBefore(elt, bf);
    });
  } else {
    bodyElt.addChild(rowElements);
  }
  this.updateSizeUp();
};
TTRow.prototype.close = function () {
  if (!this.isOpened) return;
  var rowElements = this.getRowElements();
  rowElements.shift();
  rowElements.forEach(function (elt) {
    return elt.remove();
  });
  this.isOpened = false;
  if (!(0, _utils.isNone)(this.data.id) && this.cells) this.body.table.elt.savedState[this.data.id] = this.isOpened;
  this._elt.removeClass('as-is-opened');
  this.updateSizeUp();
};
TTRow.prototype.updateSizeUp = function () {
  this.body.table.elt.notifySizeChange();
};
TTRow.prototype.remove = function () {
  var _this2 = this;
  var idx = -1;
  var rowElements;
  var removeRow = function removeRow(idx, rows, dataRows) {
    rows.splice(idx, 1);
    dataRows.splice(idx, 1);
    if (_this2.clonedRow) _this2.clonedRow.remove();
    if (_this2.elt.parentElement) {
      rowElements = _this2.clonedRow ? _this2.clonedRow.getRowElements() : _this2.getRowElements();
      rowElements.forEach(function (elt) {
        return elt.selfRemove();
      });
      _ResizeSystem["default"].requestUpdateSignal();
    }
    _this2.body.table.elt.queryCtrl.requestTransferSearchItems();
  };
  if (this.parentRow) {
    idx = this.parentRow.subRows.indexOf(this);
    if (idx >= 0) {
      removeRow(idx, this.parentRow.subRows, this.parentRow.data.subRows);
      if (this.parentRow.subRows.length === 0) this.parentRow.elt.removeClass('as-has-sub-row');
    }
  } else {
    idx = this.body.rows.indexOf(this);
    if (idx >= 0) {
      removeRow(idx, this.body.rows, this.body.data.rows);
    }
  }
};

/***
 * @param {TTDRow} rowData
 */
TTRow.prototype.addSubRow = function (rowData) {
  var _this3 = this;
  var row = new TTRow(this.body, rowData, this);
  var clonedRow;
  if (this.clonedRow) clonedRow = new TTClonedRow(row, null, this.subRows.length); //idx is not important
  var rowElements;
  var bf;
  if (this.elt.parentElement && this.isOpened) {
    rowElements = this.clonedRow ? this.clonedRow.getRowElements() : this.getRowElements();
    bf = this.body.elt.findChildAfter(rowElements[rowElements.length - 1]);
    rowElements = clonedRow ? clonedRow.getRowElements() : row.getRowElements();
    if (bf) {
      rowElements.forEach(function (elt) {
        return _this3.body.elt.addChildBefore(elt, bf);
      });
    } else {
      rowElements.forEach(function (elt) {
        return _this3.body.elt.addChild(elt);
      });
    }
    _ResizeSystem["default"].requestUpdateSignal();
  }
  this.subRows.push(row);
  if (this.data.subRows) {
    this.data.subRows.push(rowData);
  } else {
    this.data.subRows = [rowData];
  }
  if (this.clonedRow) this.clonedRow.addSubRow(clonedRow);
  if (this._elt) this.elt.addClass('as-has-sub-row');
  this.body.table.elt.queryCtrl.requestTransferSearchItems();
};

/***
 *
 @param {TTDRow} newRowData
 */
TTRow.prototype.replace = function (newRowData) {
  var _this4 = this;
  var idx = -1;
  var rowElements;
  var bf;
  var newRow;
  var newClonedRow;
  var needView;
  var makeReplaceRow = function makeReplaceRow(idx, rows, dataRows) {
    newRow = new TTRow(_this4.body, newRowData, _this4.parentRow);
    rows.splice(idx, 1, newRow);
    dataRows.splice(idx, 1, newRowData);
    if (_this4.clonedRow) {
      newClonedRow = new TTClonedRow(newRow, null, idx);
      _this4.clonedRow.replace(newClonedRow);
    }
    if (_this4.elt.parentElement) {
      rowElements = _this4.clonedRow ? _this4.clonedRow.getRowElements() : _this4.getRowElements();
      bf = _this4.body.elt.findChildAfter(rowElements[rowElements.length - 1]);
      rowElements.forEach(function (elt) {
        return elt.selfRemove();
      });
      rowElements = newClonedRow ? newClonedRow.getRowElements() : newRow.getRowElements();
      if (bf) {
        rowElements.forEach(function (elt) {
          return _this4.body.elt.addChildBefore(elt, bf);
        });
      } else {
        rowElements.forEach(function (elt) {
          return _this4.body.elt.addChild(elt);
        });
      }
      _ResizeSystem["default"].requestUpdateSignal();
    }
    _this4.body.table.elt.queryCtrl.requestTransferSearchItems();
  };
  if (this.parentRow) {
    idx = this.parentRow.subRows.indexOf(this);
    if (idx >= 0) {
      makeReplaceRow(idx, this.parentRow.subRows, this.parentRow.data.subRows);
    }
  } else {
    idx = this.body.rows.indexOf(this);
    if (idx >= 0) {
      makeReplaceRow(idx, this.body.rows, this.body.data.rows);
    }
  }
};

/***
 *
 @param {TTDRow} newRowData
 */
TTRow.prototype.addRowBefore = function (newRowData) {
  var _this5 = this;
  var idx = -1;
  var makeNewRowBefore = function makeNewRowBefore(idx, rows, dataRows) {
    var row, clonedRow;
    var rowElements;
    row = new TTRow(_this5.body, newRowData, _this5.parentRow);
    if (_this5.clonedRow) {
      clonedRow = new TTClonedRow(row, null, idx);
    }
    if (_this5.elt.parentElement) {
      rowElements = clonedRow ? clonedRow.getRowElements() : row.getRowElements();
      rowElements.forEach(function (elt) {
        return _this5.body.elt.addChildBefore(elt, _this5.elt);
      });
      _ResizeSystem["default"].requestUpdateSignal();
    }
    rows.splice(idx, 0, row);
    dataRows.splice(idx, 0, newRowData);
    if (_this5.clonedRow) {
      _this5.clonedRow.addRowBefore(clonedRow);
    }
    _this5.body.table.elt.queryCtrl.requestTransferSearchItems();
  };
  if (this.parentRow) {
    idx = this.parentRow.subRows.indexOf(this);
    if (idx >= 0) {
      makeNewRowBefore(idx, this.parentRow.subRows, this.parentRow.data.subRows);
    }
  } else {
    idx = this.body.rows.indexOf(this);
    if (idx >= 0) {
      makeNewRowBefore(idx, this.body.rows, this.body.data.rows);
    }
  }
};
/***
 *
 @param {TTDRow} newRowData
 */
TTRow.prototype.addRowAfter = function (newRowData) {
  var _this6 = this;
  var idx = -1;
  var rowElements;
  var bf;
  var makeNewRowAfter = function makeNewRowAfter(idx, rows, dataRows) {
    var row = new TTRow(_this6.body, newRowData, _this6.parentRow);
    var clonedRow;
    if (_this6.clonedRow) clonedRow = new TTClonedRow(row, null, idx);
    if (_this6.elt.parentElement) {
      rowElements = _this6.clonedRow ? _this6.clonedRow.getRowElements() : _this6.getRowElements();
      bf = _this6.body.elt.findChildAfter(rowElements[rowElements.length - 1]);
      rowElements = clonedRow ? clonedRow.getRowElements() : row.getRowElements();
      if (bf) {
        rowElements.forEach(function (elt) {
          return _this6.body.elt.addChildBefore(elt, bf);
        });
      } else {
        rowElements.forEach(function (elt) {
          return _this6.body.elt.addChild(elt);
        });
      }
      _ResizeSystem["default"].requestUpdateSignal();
    }
    rows.splice(idx + 1, 0, row);
    dataRows.splice(idx + 1, 0, newRowData);
    if (_this6.clonedRow) _this6.clonedRow.addRowBefore(clonedRow);
    _this6.body.table.elt.queryCtrl.requestTransferSearchItems();
  };
  if (this.parentRow) {
    idx = this.parentRow.subRows.indexOf(this);
    if (idx >= 0) {
      makeNewRowAfter(idx, this.parentRow.subRows, this.parentRow.data.subRows);
    }
  } else {
    idx = this.body.rows.indexOf(this);
    if (idx >= 0) {
      makeNewRowAfter(idx, this.body.rows, this.body.data.rows);
    }
  }
};
Object.defineProperty(TTRow.prototype, 'elt', {
  get: function get() {
    var _this7 = this;
    if (!this._elt) {
      this._elt = (0, _ACore._)({
        tag: 'tr',
        "class": 'as-tree-table-row',
        attr: {
          'data-level': this.level + ''
        },
        props: {
          ttRow: this
        }
      });
      if (this.data.id) this._elt.attr('data-id', this.data.id);
      if (this.isOpened) this._elt.addClass('as-is-opened');
      if (this.subRows.length > 0) this._elt.addClass('as-has-sub-row');
      this._elt.addChild(this.cells.map(function (cell, i) {
        return cell.elt.attr('data-col-idx', i + '');
      }));
      if (this.data.on && typeof this.data.on.click === "function") {
        this._elt.on('click', function (event) {
          _this7.data.on.click.call(_this7._elt, event, _this7);
        });
      }
      this.$toggle = (0, _ACore.$)('.as-tree-table-toggle', this._elt);
      if (this.$toggle) {
        this.$toggleCell = this.$toggle.parentElement;
        this.$toggleCell.addClass('as-has-toggle');
        this.$toggle = (0, _ACore._)({
          elt: this.$toggle,
          child: 'toggler-ico',
          on: {
            click: function click() {
              if (_this7.clonedRow) {
                _this7.clonedRow.toggle();
              } else {
                _this7.toggle();
              }
            }
          }
        });
      }
    }
    return this._elt;
  }
});
Object.defineProperty(TTRow.prototype, 'innerText', Object.getOwnPropertyDescriptor(_DTBodyRow["default"].prototype, 'innerText'));
var _default = TTRow;
/***
 *
 * @param {TTRow} origin
 * @param queryResult
 * @param idx
 * @constructor
 */
exports["default"] = _default;
function TTClonedRow(origin, queryResult, idx) {
  this.body = origin.body;
  this.idx = idx;
  this.id = origin.id;
  this._elt = origin.elt;
  this.elt = origin.elt;
  this.data = origin.data;
  this.origin = origin;
  this.score = queryResult && queryResult[this.id];
  if (!queryResult) this.score = 1e6;
  this.isOpened = this.score && this.score[0] <= this.score[1];
  this.attach();
  if (this.isOpened) {
    this.subRows = this.origin.subRows.filter(function (row) {
      return queryResult[row.id];
    }).map(function (row, i) {
      return new TTClonedRow(row, queryResult, i);
    });
    this.subRows.sort(function (a, b) {
      var sa = a.score[1];
      var sb = b.score[1];
      if (sa !== sb) return sb - sa;
      return a.idx - b.idx;
    });
  } else {
    this.subRows = this.origin.subRows.map(function (row, i) {
      return new TTClonedRow(row, queryResult, i);
    });
  }
}
['toggle', 'open', 'close', 'getRowElements', 'updateSizeUp'].forEach(function (key) {
  TTClonedRow.prototype[key] = TTRow.prototype[key];
});
TTClonedRow.prototype.remove = function () {
  var parentRow = this.origin.parentRow && this.origin.parentRow.clonedRow;
  var idx;
  if (parentRow) {
    idx = parentRow.subRows.indexOf(this);
    if (idx >= 0) {
      parentRow.subRows.splice(idx, 1);
    }
  } else {
    idx = this.origin.body.clonedRows.indexOf(this);
    if (idx >= 0) {
      this.origin.body.clonedRows.splice(idx, 1);
    }
  }
};
TTClonedRow.prototype.replace = function (newClonedRow) {
  var parentRow = this.origin.parentRow && this.origin.parentRow.clonedRow;
  var idx;
  if (parentRow) {
    idx = parentRow.subRows.indexOf(this);
    if (idx >= 0) {
      parentRow.subRows.splice(idx, 1, newClonedRow);
    }
  } else {
    idx = this.origin.body.clonedRows.indexOf(this);
    if (idx >= 0) {
      this.origin.body.clonedRows.splice(idx, 1, newClonedRow);
    }
  }
};
TTClonedRow.prototype.addRowBefore = function (newClonedRow) {
  var parentRow = this.origin.parentRow && this.origin.parentRow.clonedRow;
  var idx;
  if (parentRow) {
    idx = parentRow.subRows.indexOf(this);
    if (idx >= 0) {
      parentRow.subRows.splice(idx, 0, newClonedRow);
    }
  } else {
    idx = this.origin.body.clonedRows.indexOf(this);
    if (idx >= 0) {
      this.origin.body.clonedRows.splice(idx, 0, newClonedRow);
    }
  }
};
TTClonedRow.prototype.addRowAfter = function (newClonedRow) {
  var parentRow = this.origin.parentRow && this.origin.parentRow.clonedRow;
  var idx;
  if (parentRow) {
    idx = parentRow.subRows.indexOf(this);
    if (idx >= 0) {
      parentRow.subRows.splice(idx + 1, 0, newClonedRow);
    }
  } else {
    idx = this.origin.body.clonedRows.indexOf(this);
    if (idx >= 0) {
      this.origin.body.clonedRows.splice(idx + 1, 0, newClonedRow);
    }
  }
};
TTClonedRow.prototype.addSubRow = function (newClonedRow) {
  this.subRows.push(newClonedRow);
};
TTClonedRow.prototype.attach = function () {
  if (this.isOpened) {
    this.origin.elt.addClass('as-is-opened');
  } else {
    this.origin.elt.removeClass('as-is-opened');
  }
  this.origin.clonedRow = this;
};
TTClonedRow.prototype.detach = function () {
  if (this.origin.isOpened) {
    this.origin.elt.addClass('as-is-opened');
  } else {
    this.origin.elt.removeClass('as-is-opened');
  }
  this.origin.clonedRow = null;
  this.subRows.forEach(function (row) {
    return row.detach();
  });
};

/***/ }),

/***/ 26033:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TTHead = _interopRequireDefault(__webpack_require__(18743));
var _TTBody = _interopRequireDefault(__webpack_require__(15190));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {TreeTable} elt
 * @param data
 * @constructor
 */
function TTTable(elt, data) {
  this.data = data;
  this.elt = elt;
  this.head = new _TTHead["default"](this, this.data.head);
  this.body = new _TTBody["default"](this, this.data.body);
}
var _default = TTTable;
exports["default"] = _default;

/***/ }),

/***/ 29950:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.ttStructAdapter2TTDAdapter = ttStructAdapter2TTDAdapter;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _TTDataAdapter = _interopRequireDefault(__webpack_require__(59868));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _DynamicCSS = _interopRequireDefault(__webpack_require__(30401));
__webpack_require__(38322);
var _TTQueryController = _interopRequireDefault(__webpack_require__(56190));
var _datetime = __webpack_require__(58286);
var _LinearColorTinyBar = _interopRequireDefault(__webpack_require__(96026));
var _utils = __webpack_require__(84512);
var _attribute = __webpack_require__(18144);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _printer = __webpack_require__(97397);
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @typedef {Object} TTDHeadCell
 * @property {AbsolConstructDescriptor|Array<AbsolConstructDescriptor>|AElement} [child]
 * @property {function(elt:AElement, data:TTDHeadCell, controller:TTCell): void} render
 * @property {CSSStyleDeclaration} style
 */

/***
 * @typedef {Object} TTDHeadRow
 * @property {Array<TTDHeadCell>} cells
 * @property {Array<TTDHeadRow>} subRows
 */

/***
 * @typedef {Object} TTDHead
 * @property {Array<TTDHeadRow>} rows
 */

/***
 * @typedef {Object} TTDCell
 * @property {AbsolConstructDescriptor|Array<AbsolConstructDescriptor>|AElement} [child]
 * @property {function(elt:AElement, data:TTDCell, controller:TTCell): void} render
 * @property {CSSStyleDeclaration} [style]
 * @property {string|Array<string>} class
 * @property {Object} attr
 */

/***
 * @typedef {Object} TTDRow
 * @property {Array<TTDCell>} cells
 * @property {Array<TTDRow>} subRows
 * @property {string} [id]
 *
 */

/***
 * @typedef {Object} TTDHead
 * @property {Array<TTDHeadRow>} rows
 */

/***
 * @typedef {Object} TTDBody
 * @property {Array<TTDRow>} rows
 */

/***
 * @typedef {Object} TTData
 * @property {TTDHead} head
 * @property {TTDBody} body
 * @property {boolean} [initOpened]
 */

/***
 * @typedef {Object} TTDAdapter
 * @property {TTData} data
 */

var _loadCss = function loadCss() {
  var dynamicCss = new _DynamicCSS["default"]();
  dynamicCss.setRules(Array(20).fill(null).reduce(function (ac, cr, i) {
    ac[".as-tree-table-row[data-level=\"".concat(i, "\"] .as-tree-table-toggle::before")] = {
      width: 2 * i + 'em'
    };
    ac[['.as-tree-table.as-hide-col-' + i + ' td[data-col-idx="' + i + '"]', '.as-tree-table.as-hide-col-' + i + ' th[data-col-idx="' + i + '"]'].join(',')] = {
      display: 'none'
    };
    ac[".as-tree-table-row[data-level=\"".concat(i, "\"] .as-tree-table-cell.as-has-toggle")] = {
      'padding-left': "calc(5px + ".concat(2 * i + 1.5, "em)")
    };
    ac[".as-printer-content .as-tree-table-row[data-level=\"".concat(i, "\"] .as-tree-table-cell.as-has-toggle")] = {
      'padding-left': "calc(5px + ".concat(2 * i, "em)")
    };
    return ac;
  }, {})).commit();
  _loadCss = _noop["default"];
};

/***
 * @extends AElement
 * @constructor
 */
function TreeTable() {
  _loadCss();
  this._hiddenColumns = [];
  this.$head = (0, _ACore.$)('thead', this);
  this.$body = (0, _ACore.$)('tbody', this);
  this.savedState = {};
  /**
   *
   * @type {null|TTTable}
   */
  this.table = null;
  /***
   *
   * @type {null|TTDataAdapter}
   */

  this.mAdapter = null;
  this.queryCtrl = new _TTQueryController["default"](this);
  this.rowMoveTool = new TTRowMoveTool(this);
  /***
   * @name adapter
   * @type TTDAdapter
   * @memberOf TreeTable#
   */
  /***
   * @name searchInput
   * @type SearchTextInput
   * @memberOf TreeTable#
   */
}

TreeTable.tag = 'TreeTable'.toLowerCase();
TreeTable.render = function () {
  return (0, _ACore._)({
    extendEvent: ['orderchange'],
    tag: 'table',
    "class": 'as-tree-table',
    child: [{
      tag: 'thead',
      "class": 'as-tree-table-head'
    }, {
      tag: 'tbody'
    }]
  });
};
TreeTable.prototype.removeRow = function (rowData) {
  if (!this.table) return;
  var row = this.table.body.rowOf(rowData);
  if (row) row.remove();
};
TreeTable.prototype.replaceRow = function (rowData, oldRowData) {
  if (!this.table) return;
  var row = this.table.body.rowOf(oldRowData);
  if (row) row.replace(rowData);
};
TreeTable.prototype.getRows = function () {
  return this.table.body.rows.slice();
};

/***
 *
 * @param rowData
 * @param {any|null} parentRow
 */
TreeTable.prototype.addRowIn = function (rowData, parentRow) {
  if (!this.table) return;
  var row;
  if (parentRow) {
    row = this.table.body.rowOf(parentRow);
    if (row) row.addSubRow(rowData);else {
      console.error('Can not find row', parentRow);
    }
  } else {
    this.table.body.addRow(rowData);
  }
};
TreeTable.prototype.addRow = function (rowData) {
  if (!this.table) return;
  this.table.body.addRow(rowData);
};
TreeTable.prototype.addRows = function (rowDataArr) {
  var _this = this;
  if (!this.table) return;
  rowDataArr.forEach(function (rowData) {
    _this.table.body.addRow(rowData);
  });
};

/***
 *
 * @param rowData
 * @param {any|null} bfRow
 */
TreeTable.prototype.addRowBefore = function (rowData, bfRow) {
  if (!this.table) return;
  var row;
  if (bfRow) {
    row = this.table.body.rowOf(bfRow);
    if (row) row.addRowBefore(rowData);else {
      console.error('Can not find row', bfRow);
    }
  } else {
    this.table.body.addRow(rowData);
  }
};

/***
 *
 * @param rowData
 * @param {any|null} atRow
 */
TreeTable.prototype.addRowAfter = function (rowData, atRow) {
  if (!this.table) return;
  var row;
  if (atRow) {
    row = this.table.body.rowOf(atRow);
    if (row) row.addRowAfter(rowData);else {
      console.error('Can not find row', atRow);
    }
  } else {
    if (this.table.body.rows.length === 0) {
      this.table.body.addRow(rowData);
    } else {
      this.table.body.rows[0].addRowBefore(rowData);
    }
  }
};
TreeTable.prototype.rowOf = function (rowData) {
  return this.table.body.rowOf(rowData);
};
TreeTable.prototype.viewIntoRow = function (row) {
  var _this2 = this;
  var counter = 300;
  var wait = function wait() {
    counter--;
    if (_this2.isDescendantOf(document.body)) {
      row = _this2.rowOf(row);
      if (row) {
        (0, _utils.vScrollIntoView)(row.elt);
      }
    } else if (counter > 0) {
      setTimeout(wait, 30);
    }
  };
  setTimeout(wait, 10);
};
TreeTable.prototype.notifySizeChange = function () {
  var c = this.parentElement;
  while (c) {
    if (typeof c.updateSize === 'function') c.updateSize();else if (typeof c.requestUpdateSize === 'function') c.requestUpdateSize();
    c = c.parentElement;
  }
};
TreeTable.prototype.attachSearchInput = function (input) {
  this.searchInput = input;
};
TreeTable.property = {};
TreeTable.property.adapter = {
  set: function set(adapter) {
    if (adapter.type === 'struct') {
      adapter = ttStructAdapter2TTDAdapter(adapter);
    }
    this._adapterData = adapter;
    if (adapter && adapter.data) {
      adapter.data.initOpened = adapter.data.initOpened || adapter.initOpened; //adapt param
    }

    this.mAdapter = new _TTDataAdapter["default"](this, adapter);
    this.mAdapter.render();
    this.queryCtrl.transferSearchItems();
    var c = this.parentElement;
    while (c) {
      if (c.hasClass && c.hasClass('absol-table-vscroller') && c.update) {
        c.update();
        break;
      }
      c = c.parentElement;
    }
    _ResizeSystem["default"].requestUpdateSignal();
    var td = (0, _ACore.$)('td', this);
    if (td) {
      var attachhook = (0, _ACore._)('attachhook').once('attached', function () {
        attachhook.remove();
        _ResizeSystem["default"].requestUpdateSignal();
      }).addTo(td);
    }
  },
  get: function get() {
    return this._adapterData;
  }
};
TreeTable.property.filterInputs = {
  set: function set(inputs) {},
  get: function get() {}
};
TreeTable.property.searchInput = {
  set: function set(input) {
    if (input) this.queryCtrl.attachSearchInput(input);else this.queryCtrl.detachSearchInput();
  },
  get: function get() {
    return this.queryCtrl.$searchInput;
  }
};
TreeTable.property.hiddenColumns = {
  set: function set(value) {
    value = value || [];
    this._hiddenColumns.forEach(function (idxV) {
      this.removeClass('as-hide-col-' + idxV);
    }.bind(this));
    this._hiddenColumns = value;
    this._hiddenColumns.forEach(function (idxV) {
      this.addClass('as-hide-col-' + idxV);
    }.bind(this));
    var c = this.parentElement;
    while (c) {
      if (c.hasClass && (c.hasClass('absol-table-vscroller') || c.hasClass('absol-table-scroller')) && (c.update || c.updateContent)) {
        (c.update || c.updateContent).call(c);
        break;
      }
      c = c.parentElement;
    }
    if (this.isDescendantOf(document.body)) _ResizeSystem["default"].update();
  },
  get: function get() {
    return this._hiddenColumns;
  }
};
_ACore["default"].install(TreeTable);
var _default = TreeTable;
/**
 *
 * @param {TreeTable} elt
 * @constructor
 */
exports["default"] = _default;
function TTRowMoveTool(elt) {
  this.elt = elt;
  this.dragListenners = {
    dragstart: this.ev_dragStart.bind(this),
    drag: this.ev_drag.bind(this),
    dragend: this.ev_dragEnd.bind(this),
    dragdeinit: this.ev_dragDeinit.bind(this)
  };
  this.$body = (0, _ACore._)({
    tag: _Hanger["default"],
    elt: this.elt.$body,
    props: {
      hangOn: 3
    }
  }).on('draginit', this.ev_dragInit.bind(this));
  /**
   *
   * @type {null|TTRow}
   */
  this.inParent = null;
  /**
   *
   * @type {null|TTRow}
   */
  this.row = null;
  this.siblingRows = [];
  this.siblingBounds = [];
}
TTRowMoveTool.prototype._getZIndex = function () {
  var res = 0;
  var c = this.elt;
  while (c) {
    res = Math.max(res, parseInt(getComputedStyle(c).getPropertyValue('z-index'), 10) || 0);
    c = c.parentElement;
  }
  return res;
};
TTRowMoveTool.prototype.ev_dragInit = function (event) {
  var row = this._findRow(event.target, true);
  if (!row) return;
  if (this.elt.table.body.clonedRows) return; // searching
  this.inParent = row.parentRow;
  this.row = row;
  this.$body.on(this.dragListenners);
  event.preventDefault();
};
TTRowMoveTool.prototype.ev_dragDeinit = function () {
  this.$body.off(this.dragListenners);
};
TTRowMoveTool.prototype.ev_dragStart = function (event) {
  var _this3 = this;
  event.preventDefault();
  var row = this.row;
  var originTableElt = this.elt.table.elt;
  var originBody = originTableElt.lastChild;
  var tableBound = originTableElt.getBoundingClientRect();
  var zIndex = this._getZIndex();
  this.$clonedTable = (0, _ACore.$)(originTableElt.cloneNode(false)).addClass('as-dt-body-row-cloned-ctn'); //reuse class
  this.$clonedTable.addStyle({
    tableLayout: 'fixed',
    width: tableBound.width + 'px',
    zIndex: zIndex + 200
  }).addTo(document.body);
  this.$modal = this.$modal || (0, _ACore._)({
    tag: _Modal["default"],
    style: {
      zIndex: zIndex + 201,
      userSelect: 'none'
    }
  });
  this.$modal.addTo(document.body);
  this.$clonedBody = (0, _ACore.$)(originBody.cloneNode());
  this.$clonedTable.addChild(this.$clonedBody);
  var originRowElt = row.elt;
  this.$clonedRow = (0, _ACore.$)(originRowElt.cloneNode(true)).addStyle({
    backgroundColor: originRowElt.getComputedStyleValue('background-color')
  });
  this.$clonedBody.addChild(this.$clonedRow);
  var rowBound = originRowElt.getBoundingClientRect();
  this.$clonedTable.addStyle({
    top: rowBound.top + 'px',
    left: rowBound.left + 'px'
  });
  this.$newPostLine = this.$newPostLine || (0, _ACore._)('.as-dt-insert-line');
  this.$newPostLine.addStyle({
    left: rowBound.left + 'px',
    width: rowBound.width + 'px'
  });
  this.$newPostLine.addTo(document.body);
  this.rowBond = _Rectangle["default"].fromClientRect(rowBound);
  this.mouseOffset = event.currentPoint.sub(this.rowBond.A());
  Array.prototype.forEach.call(this.$clonedRow.childNodes, function (td, i) {
    var originTd = originRowElt.childNodes[i];
    var bound = originTd.getBoundingClientRect();
    (0, _ACore.$)(td).addStyle({
      'width': bound.width + 'px',
      boxSizing: 'border-box'
    });
  });
  this.siblingRows = this.inParent ? this.inParent.subRows.slice() : this.elt.table.body.rows.slice();
  this.firstSiblingRow = this.inParent ? this.inParent.subRows[0] : this.elt.table.body.rows[0];
  this.siblingBounds = (this.inParent ? this.inParent.subRows : this.elt.table.body.rows).map(function (row) {
    return _this3._boundOfRow(row);
  });
  this.idx = this.siblingRows.indexOf(this.row);
  this.newIdx = this.idx;
  this.$scroller = (0, _utils.findVScrollContainer)(this.elt);
  if (this.$scroller === document.body.parentElement) this.$scroller = null;
  this.overflowCheckITV = setInterval(function () {
    if (!_this3.$scroller) return;
    var scrollerBound = _this3.$scroller.getBoundingClientRect();
    var cloneBound = _this3.$clonedTable.getBoundingClientRect();
    if (cloneBound.height >= scrollerBound.height) return;
    var newScrollTop = _this3.$scroller.scrollTop;
    if (cloneBound.top < scrollerBound.top) {
      newScrollTop = newScrollTop - Math.min(100, (scrollerBound.top - cloneBound.top) / 6);
    } else if (cloneBound.bottom > scrollerBound.bottom) {
      newScrollTop = newScrollTop - Math.min(100, (scrollerBound.bottom - cloneBound.bottom) / 6);
      newScrollTop = Math.min(_this3.$scroller.scrollHeight - _this3.$scroller.clientHeight, newScrollTop);
    }
    newScrollTop = Math.max(0, newScrollTop);
    if (newScrollTop !== _this3.$scroller.scrollTop) {
      _this3.$scroller.scrollTop = newScrollTop;
    }
  }, 33);
};
TTRowMoveTool.prototype._boundOfRow = function (row) {
  var rowElements = row.getRowElements();
  var bound = _Rectangle["default"].fromClientRect(rowElements[0].getBoundingClientRect());
  if (rowElements.length > 1) {
    bound = bound.merge(_Rectangle["default"].fromClientRect(rowElements[rowElements.length - 1].getBoundingClientRect()));
  }
  return bound;
};
TTRowMoveTool.prototype.ev_drag = function (event) {
  event.preventDefault();
  var newPos = event.currentPoint.sub(this.mouseOffset);
  this.$clonedTable.addStyle('top', newPos.y + 'px');
  var firstSiblingRowBound = _Rectangle["default"].fromClientRect(this.firstSiblingRow.elt.getBoundingClientRect());
  var viewDelta = firstSiblingRowBound.A().sub(this.siblingBounds[0].A()).y;
  var y = newPos.y + this.rowBond.height / 2 - viewDelta;
  var beforeIdx = this.siblingBounds.length;
  var rBound;
  for (var i = 0; i < this.siblingBounds.length; ++i) {
    rBound = this.siblingBounds[i];
    if (rBound.centerPoint().y > y) {
      beforeIdx = i;
      break;
    }
  }
  if (beforeIdx === this.idx + 1 || beforeIdx === this.idx) {
    this.$newPostLine.addStyle('display', 'none');
    this.newIdx = this.idx;
  } else {
    this.$newPostLine.removeStyle('display');
    if (beforeIdx < this.siblingBounds.length) {
      this.$newPostLine.addStyle('top', this.siblingBounds[beforeIdx].y + viewDelta + 'px');
      if (beforeIdx < this.idx) {
        this.newIdx = beforeIdx;
      } else {
        this.newIdx = beforeIdx - 1;
      }
    } else {
      this.newIdx = this.siblingBounds.length - 1;
      this.$newPostLine.addStyle('top', this.siblingBounds[this.siblingBounds.length - 1].C().y + viewDelta + 'px');
    }
  }
};
TTRowMoveTool.prototype.ev_dragEnd = function (event) {
  clearInterval(this.overflowCheckITV);
  this.$modal.remove();
  this.$newPostLine.remove();
  this.$clonedTable.remove();
  if (this.newIdx !== this.idx) {
    if (this.inParent) {
      this.inParent.subRows.splice(this.idx, 1);
      this.inParent.subRows.splice(this.newIdx, 0, this.row);
      this.inParent.data.subRows.splice(this.idx, 1);
      this.inParent.data.subRows.splice(this.newIdx, 0, this.row.data);
    } else {
      this.elt.table.body.rows.splice(this.idx, 1);
      this.elt.table.body.rows.splice(this.newIdx, 0, this.row);
      this.elt.table.body.data.rows.splice(this.idx, 1);
      this.elt.table.body.data.rows.splice(this.newIdx, 0, this.row.data);
    }
    this.elt.table.body.renderRows();
    this.elt.emit('orderchange', {
      type: 'orderchange',
      target: this.row,
      inParent: this.inParent || this.elt.table.body,
      inParentData: this.inParent ? this.inParent.data : this.elt.table.body.data,
      from: this.idx,
      to: this.newIdx,
      originalEvent: event,
      row: this.row,
      data: this.row.data,
      devMessage: this.inParent ? 'order change in array event.inParent.subRows' : 'order change in array event.inParent.rows'
    });
  }
};
TTRowMoveTool.prototype._findRow = function (elt, inDraZone) {
  var hitDragZone = false;
  while (elt) {
    if (elt.classList.contains('as-drag-zone')) hitDragZone = true;
    if (elt.ttRow) {
      if (hitDragZone || !inDraZone) return elt.ttRow;
      return null;
    }
    elt = elt.parentElement;
  }
  return null;
};

/***
 *
 * @param adapterData
 * @returns {TTDAdapter}
 */
function ttStructAdapter2TTDAdapter(adapterData) {
  var toString = {
    'Date': function Date(x) {
      return x ? (0, _datetime.formatDateTime)(x, 'dd/MM/yyyy') : '';
    },
    'DateTime': function DateTime(x) {
      return x ? (0, _datetime.formatDateTime)(x, 'dd/MM/yyyy HH:mm') : '';
    },
    text: function text(x) {
      return (x || '') + '';
    }
  };
  var getItemDict = function getItemDict(desc) {
    var dict = desc.__dict__;
    if (!dict) {
      Object.defineProperty(desc, '__dict__', {
        enumerable: false,
        writable: true,
        configurable: true,
        value: (desc.items || []).reduce(function makeDict(ac, cr) {
          var key = (0, _utils.keyStringOf)(cr.value);
          ac[key] = cr;
          if (cr.items && cr.items.reduce) {
            cr.items.reduce(makeDict, ac);
          }
          return ac;
        }, {})
      });
      dict = desc.__dict__;
    }
    return dict;
  };
  var handlers = {
    'Date': function Date(x) {
      return [{
        tag: 'span',
        child: {
          text: x ? (0, _datetime.formatDateTime)(x, 'dd/MM/yyyy') : ''
        }
      }];
    },
    'DateTime': function DateTime(x) {
      return [{
        tag: 'span',
        child: {
          text: x ? (0, _datetime.formatDateTime)(x, 'dd/MM/yyyy HH:mm') : ''
        }
      }];
    },
    text: function text(x) {
      return [{
        tag: 'span',
        child: {
          text: (x || '') + ''
        }
      }];
    },
    performance: function performance(x, desc) {
      return [{
        tag: _LinearColorTinyBar["default"].tag,
        props: {
          colorMapping: desc.colorMapping || 'performance',
          value: x,
          extend: typeof desc.extend === "number" && desc.extend > 0 ? desc.extend : 0.5,
          valueText: typeof x === 'number' ? (x * 100).toFixed(2) + '%' : x + ''
        }
      }];
    },
    "enum": function _enum(x, desc) {
      var dict = getItemDict(desc);
      var item = dict[(0, _utils.keyStringOf)(x)];
      if (item) return [{
        tag: 'span',
        child: {
          text: item.text
        }
      }];else return [{
        tag: 'span',
        child: {
          text: ''
        }
      }];
    },
    '{enum}': function _enum(x, desc) {
      var dict = getItemDict(desc);
      if (!(x instanceof Array)) return [{
        tag: 'span',
        child: {
          text: ''
        }
      }];
      var items = x.map(function (it) {
        return dict[(0, _utils.keyStringOf)(it)];
      }).filter(function (it) {
        return !!it;
      });
      var text = items.map(function (it) {
        return it.text;
      }).join(', ');
      return [{
        tag: 'span',
        child: {
          text: text
        }
      }];
    }
  };
  /**
   *
   * @type {TTDAdapter}
   */
  var res = {
    data: {
      initOpened: true,
      head: {
        rows: [{
          cells: adapterData.propertyNames.map(function (name) {
            var cellData = {
              child: {
                text: name
              }
            };
            var descriptor = adapterData.propertyDescriptors[name];
            if (descriptor && descriptor.text) cellData.child.text = descriptor.text;
            return cellData;
          })
        }]
      },
      body: {
        rows: adapterData.records.map(function visit(it) {
          var row = {};
          row.cells = adapterData.propertyNames.map(function (name) {
            var descriptor = adapterData.propertyDescriptors[name];
            var type = descriptor && descriptor.type || 'text';
            var value = it[name];
            var f = toString[type] || toString.text;
            var text = f(value);
            var handler = handlers[type] || handlers.text;
            var cell = {
              innerText: text,
              attr: {
                'data-type': type
              },
              child: handler(value, descriptor)
            };
            if (name === adapterData.treeBy) {
              cell.child.unshift('.as-tree-table-toggle');
            }
            return cell;
          });
          if (it.__children__) {
            row.subRows = it.__children__.map(visit);
          }
          return row;
        })
      }
    }
  };
  return res;
}
_printer.ShareSerializer.addHandlerBefore({
  id: 'TreeTableCellBorder',
  match: function match(elt, scope, stack) {
    if (!elt.hasClass) return false;
    if (!elt.hasClass('as-tree-table-head-cell') && !elt.hasClass('as-tree-table-cell')) return false;
    var style = getComputedStyle(elt);
    var borderColor = style.getPropertyValue('border-color');
    var borderStyle = style.getPropertyValue('border-style');
    var borderWidth = style.getPropertyValue('border-width');
    var borderRadius = style.getPropertyValue('border-radius');
    if (borderStyle === 'none' || borderWidth === '0px') return false;
    scope.declare('borderStyle', {
      width: parseFloat(borderWidth.replace('px', '')),
      radius: (0, _attribute.parseMeasureValue)(borderRadius),
      color: borderColor
    });
    return true;
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var borderStyle = scope.get('borderStyle');
    var bound = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    var rect = bound.clone();
    var strokeWidth = borderStyle.width;
    rect.x -= printer.O.x;
    rect.y -= printer.O.y;
    var radius = borderStyle.radius;
    var rounded;
    if (radius) {
      switch (radius.unit) {
        case '%':
          rounded = [radius.value * rect.width / 100, radius.value * rect.height / 100];
          break;
        case 'px':
          rounded = radius.value;
          break;
      }
    }
    printer.rect(rect, {
      stroke: borderStyle.color,
      rounded: rounded,
      strokeWidth: strokeWidth
    });
    return true;
  }
}, 'Border');

/***/ }),

/***/ 84512:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.absCeil = absCeil;
exports.addElementAfter = addElementAfter;
exports.addElementClassName = addElementClassName;
exports.addElementsBefore = addElementsBefore;
exports.buildCss = buildCss;
exports.calcDTQueryHash = calcDTQueryHash;
exports.charWidth = void 0;
exports.checkedValues2RootTreeValues = checkedValues2RootTreeValues;
exports.cleanMenuItemProperty = cleanMenuItemProperty;
exports.clockToMillis = void 0;
exports.contenteditableTextOnly = contenteditableTextOnly;
exports.copySelectionItemArray = copySelectionItemArray;
exports.estimateWidth14 = estimateWidth14;
exports.fileAccept = fileAccept;
exports.fileInfoOf = fileInfoOf;
exports.fileSize2Text = fileSize2Text;
exports.findMaxZIndex = findMaxZIndex;
exports.findVScrollContainer = findVScrollContainer;
exports.formatLocalFloat = formatLocalFloat;
exports.forwardEvent = forwardEvent;
exports.forwardMethod = forwardMethod;
exports.getAncestorElementOf = getAncestorElementOf;
exports.getCaretPosition = getCaretPosition;
exports.getMapZoomLevel = getMapZoomLevel;
exports.getMaterialDesignIconNames = getMaterialDesignIconNames;
exports.getSelectionRangeDirection = getSelectionRangeDirection;
exports.getSelectionText = getSelectionText;
exports.getTagListInTextMessage = getTagListInTextMessage;
exports.getTextNodeBounds = getTextNodeBounds;
exports.implicitLatLng = implicitLatLng;
exports.insertTextAtCursor = insertTextAtCursor;
exports.isDateTimeFormatToken = isDateTimeFormatToken;
exports.isInteger = isInteger;
exports.isNaturalNumber = isNaturalNumber;
exports.isNone = isNone;
exports.isRealNumber = isRealNumber;
exports.isScrolledToBottom = isScrolledToBottom;
exports.isURLAddress = isURLAddress;
exports.jsStringOf = jsStringOf;
exports.keyStringOf = keyStringOf;
exports.latLngDistance = latLngDistance;
exports.listenDomContentChange = listenDomContentChange;
exports.measureText = measureText;
exports.millisToClock = void 0;
exports.nearFloor = nearFloor;
exports.normalizeLatLngString = normalizeLatLngString;
exports.normalizeMinuteOfMillis = void 0;
exports.openFileDialog = openFileDialog;
exports.openYesNoQuestionDialog = openYesNoQuestionDialog;
exports.parseDMS = parseDMS;
exports.parseLatLng = parseLatLng;
exports.parseLocalFloat = parseLocalFloat;
exports.positiveIntMod = positiveIntMod;
exports.preventNotNumberInput = preventNotNumberInput;
exports.replaceChildrenInElt = replaceChildrenInElt;
exports.replaceFileInObject = replaceFileInObject;
exports.replaceInObject = replaceInObject;
Object.defineProperty(exports, "revokeResource", ({
  enumerable: true,
  get: function get() {
    return _Object.revokeResource;
  }
}));
exports.rootTreeValues2CheckedValues = rootTreeValues2CheckedValues;
exports.setSelectionRange = setSelectionRange;
exports.swapChildrenInElt = swapChildrenInElt;
exports.swapElt = swapElt;
exports.vScrollIntoView = vScrollIntoView;
exports.wrapText = wrapText;
exports.wrapWord = wrapWord;
exports.zeroPadding = zeroPadding;
var _ACore = _interopRequireWildcard(__webpack_require__(34093));
var _stringUtils = __webpack_require__(26243);
var _YesNoQuestionDialog = _interopRequireDefault(__webpack_require__(57318));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _ext2MineType = _interopRequireDefault(__webpack_require__(13578));
var _TextMeasurement = _interopRequireDefault(__webpack_require__(77694));
var _datetime = __webpack_require__(58286);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _Object = __webpack_require__(84131);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _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); }
function _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; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function getSelectionRangeDirection(range) {
  var sel = document.getSelection();
  var direction = 'forward';
  var cmpPosition = sel.anchorNode.compareDocumentPosition(sel.focusNode);
  if (cmpPosition === 4) {
    direction = 'forward';
  } else if (cmpPosition === 2) {
    direction = 'backward';
  } else if (!cmpPosition && sel.anchorOffset > sel.focusOffset || cmpPosition === Node.DOCUMENT_POSITION_PRECEDING) {
    direction = 'backward';
  }
  return direction;
}

/***
 *
 * @param {Range} range
 * @param {boolean=} backward
 */
function setSelectionRange(range, backward) {
  var sel = document.getSelection();
  if (backward) {
    if (typeof sel.extend != "undefined") {
      var endRange = range.cloneRange();
      endRange.collapse(false);
      sel.removeAllRanges();
      sel.addRange(endRange);
      sel.extend(range.startContainer, range.startOffset);
    }
  } else {
    sel.removeAllRanges();
    sel.addRange(range);
  }
}
function insertTextAtCursor(text) {
  var sel, range;
  if (window.getSelection) {
    sel = window.getSelection();
    if (sel.getRangeAt && sel.rangeCount) {
      range = sel.getRangeAt(0);
      range.deleteContents();
      range.insertNode(document.createTextNode(text));
    }
  } else if (document.selection && document.selection.createRange) {
    document.selection.createRange().text = text;
  }
}
function contenteditableTextOnly(element, processText) {
  if (element.__contenteditableTextOnly__) return;
  element.__contenteditableTextOnly__ = true;
  element.addEventListener("paste", function (e) {
    e.preventDefault();
    if (e.clipboardData && e.clipboardData.getData) {
      var text = e.clipboardData.getData("text/plain");
      if (processText) text = processText(text);
      document.execCommand("insertHTML", false, text);
    } else if (window.clipboardData && window.clipboardData.getData) {
      var text = window.clipboardData.getData("Text");
      if (processText) text = processText(text);
      insertTextAtCursor(text);
    }
  });
}
function getSelectionText() {
  var text = "";
  var activeEl = document.activeElement;
  var activeElTagName = activeEl ? activeEl.tagName.toLowerCase() : null;
  if (activeElTagName == "textarea" || activeElTagName == "input" && /^(?:text|search|password|tel|url)$/i.test(activeEl.type) && typeof activeEl.selectionStart == "number") {
    text = activeEl.value.slice(activeEl.selectionStart, activeEl.selectionEnd);
  } else if (window.getSelection) {
    text = window.getSelection().toString();
  }
  return text;
}

/***
 *
 * @param num
 * @param maxVal
 * @return {number}
 */
function positiveIntMod(num, maxVal) {
  if (maxVal <= 0) return 0;
  if (num >= 0 && num < maxVal) {
    return Math.floor(num);
  } else if (num === Infinity) {
    if (maxVal === Infinity) return Infinity;else return 0;
  } else if (num < 0) {
    return (num + Math.ceil(-num / maxVal) * maxVal) % maxVal;
  } else if (num >= maxVal) {
    return Math.floor(num) % maxVal;
  } else return 0;
}
function nearFloor(x, epsilon) {
  var y = Math.floor(x);
  if (x - y + epsilon >= 1) y++;
  return y;
}
function measureText(text, font) {
  // re-use canvas object for better performance
  var canvas = measureText.canvas || (measureText.canvas = document.createElement("canvas"));
  var context = canvas.getContext("2d");
  if (font) context.font = font;
  var metrics = context.measureText(text);
  return metrics;
}
function getCaretPosition(oField) {
  var iCaretPos = 0;
  if (document.selection) {
    oField.focus();
    var oSel = document.selection.createRange();
    oSel.moveStart('character', -oField.value.length);
    iCaretPos = oSel.text.length;
  } else if (oField.selectionStart || oField.selectionStart == '0') iCaretPos = oField.selectionDirection == 'backward' ? oField.selectionStart : oField.selectionEnd;
  return iCaretPos;
}

/**
 *
 * @param {AElement} elt
 */
function preventNotNumberInput(elt) {
  elt.addEventListener('keyup', function () {
    var lastValue = elt.tagName === "DIV" || elt.tagName === "SPAN" ? elt.innerHTML : elt.attributes.value;
    var cValue = parseFloat(this.value);
    if (this.value != lastValue) {
      elt.attributes.value = cValue;
      elt.emit('change', cValue, elt);
    }
  });
  elt.addEventListener("paste", function (e) {
    e.preventDefault();
    var text = "";
    if (e.clipboardData && e.clipboardData.getData) {
      text = e.clipboardData.getData("text/plain");
    } else if (window.clipboardData && window.clipboardData.getData) {
      text = window.clipboardData.getData("Text");
    }
    var matched = text.match(/[+-]?([0-9]*[.])?[0-9]+/);
    if (matched) {
      this.value = matched[0];
    }
  });
  elt.addEventListener('keydown', function (event) {
    var key = event.key;
    if (key && key.length == 1 && !event.ctrlKey && !event.altKey) {
      if (key.match(/[0-9.\-\+]/)) {
        if (key == '.' && this.value.indexOf('.') >= 0) event.preventDefault();
        if ((key == '+' || key == '-') && (this.value.indexOf('+') >= 0 || this.value.indexOf('-') >= 0 || getCaretPosition(this) > 0)) event.preventDefault();
      } else event.preventDefault();
    }
  });
}
function buildCss(StyleSheet) {
  return (0, _ACore._)({
    tag: 'style',
    props: {
      innerHTML: Object.keys(StyleSheet).map(function (key) {
        var style = StyleSheet[key];
        return key + ' {\n' + Object.keys(style).map(function (propName) {
          return propName + ': ' + style[propName] + ';';
        }).join('\n') + '}';
      }).join('\n')
    }
  }).addTo(document.head);
}
function forwardEvent(elt, fromName, toName) {
  elt.defineEvent(toName);
  elt.on(fromName, function (event) {
    event = Object.assign({}, event);
    event.type = toName;
    this.emit.apply(this, [toName, event].concat(Array.prototype.slice.call(arguments, 1)));
  });
}
function forwardMethod(elt, fromName, toName) {
  elt[fromName] = function () {
    this[toName].apply(this, arguments);
  };
}

/***
 *
 * @param {"camera"|"microphone"|"camcorder"|{accept:("image/*"|"audio/*"|"video/*"|undefined), capture:boolean|undefined, multiple:boolean|undefined}|{}=} props
 * @param {boolean=}unSafe
 *  @return {Promise<File[]>}
 */
function openFileDialog(props, unSafe) {
  return new Promise(function (resolve) {
    var input = _ACore["default"]._({
      tag: 'input',
      style: {
        display: 'none'
      },
      attr: {
        type: 'file'
      }
    }).addTo(document.body);
    props = props || {};
    if (props === 'camera') {
      props = {
        accept: 'image/*',
        capture: 'camera'
      };
    } else if (props === 'microphone') {
      props = {
        accept: 'audio/*',
        capture: "microphone"
      };
    } else if (props === 'camcorder') {
      props = {
        accept: 'video/*',
        capture: 'camcorder'
      };
    }
    if (props.accept) {
      if (props.accept instanceof Array) input.attr('accept', props.accept.join(','));else input.attr('accept', props.accept);
    } else {
      input.attr('accept', null);
    }
    if (props.capture) {
      input.attr('capture', props.capture);
    }
    if (props.multiple) {
      input.attr('multiple', 'true');
    } else {
      input.attr('multiple');
    }
    input.value = null;
    function focusHandler() {
      setTimeout(function () {
        window.removeEventListener('focus', focusHandler);
        if (unSafe) {
          input.off('change', changeHandler);
          input.remove();
          resolve([]);
        }
      }, 1000);
    }
    function changeHandler() {
      input.off('change', changeHandler);
      window.removeEventListener('focus', focusHandler);
      var files = Array.prototype.slice.call(input.files);
      resolve(files);
      input.remove();
    }
    input.on('change', changeHandler);
    input.click();
    setTimeout(function () {
      window.addEventListener('focus', focusHandler);
    }, 10);
  });
}
function openYesNoQuestionDialog(title, message) {
  return new Promise(function (resolve) {
    if (window.ModalElement && window.ModalElement.question) {
      window.ModalElement.question({
        title: title,
        message: message,
        onclick: function onclick(sel) {
          if (sel === 0) {
            resolve(true);
          } else {
            resolve(false);
          }
        }
      });
    } else {
      var modal = (0, _ACore._)({
        tag: _Modal["default"].tag,
        child: {
          tag: _YesNoQuestionDialog["default"].tag,
          props: {
            textYes: 'Có',
            textNo: 'Không',
            message: message,
            dialogTitle: title
          },
          on: {
            action: function action(event) {
              modal.remove();
              resolve(event.action.name === 'yes');
            }
          }
        }
      }).addTo(document.body);
    }
  });
}
var charWidth = {
  "A": 9.337890625,
  "Á": 9.337890625,
  "À": 9.337890625,
  "Ả": 9.337890625,
  "Ã": 9.337890625,
  "Ạ": 9.337890625,
  "a": 7.7861328125,
  "á": 7.7861328125,
  "à": 7.7861328125,
  "ả": 7.7861328125,
  "ã": 7.7861328125,
  "ạ": 7.7861328125,
  "Ă": 9.337890625,
  "Ắ": 9.337890625,
  "Ằ": 9.337890625,
  "Ẳ": 9.337890625,
  "Ẵ": 9.337890625,
  "Ặ": 9.337890625,
  "ă": 7.7861328125,
  "ắ": 7.7861328125,
  "ằ": 7.7861328125,
  "ẳ": 7.7861328125,
  "ẵ": 7.7861328125,
  "ặ": 7.7861328125,
  "Â": 9.337890625,
  "Ấ": 9.337890625,
  "Ầ": 9.337890625,
  "Ẩ": 9.337890625,
  "Ẫ": 9.337890625,
  "Ậ": 9.337890625,
  "â": 7.7861328125,
  "ấ": 7.7861328125,
  "ầ": 7.7861328125,
  "ẩ": 7.7861328125,
  "ẫ": 7.7861328125,
  "ậ": 7.7861328125,
  "B": 9.337890625,
  "b": 7.7861328125,
  "C": 10.1103515625,
  "c": 7,
  "D": 10.1103515625,
  "d": 7.7861328125,
  "Đ": 10.1103515625,
  "đ": 7.7861328125,
  "E": 9.337890625,
  "É": 9.337890625,
  "È": 9.337890625,
  "Ẻ": 9.337890625,
  "Ẽ": 9.337890625,
  "Ẹ": 9.337890625,
  "e": 7.7861328125,
  "é": 7.7861328125,
  "è": 7.7861328125,
  "ẻ": 7.7861328125,
  "ẽ": 7.7861328125,
  "ẹ": 7.7861328125,
  "Ê": 9.337890625,
  "Ế": 9.337890625,
  "Ề": 9.337890625,
  "Ể": 9.337890625,
  "Ễ": 9.337890625,
  "Ệ": 9.337890625,
  "ê": 7.7861328125,
  "ế": 7.7861328125,
  "ề": 7.7861328125,
  "ể": 7.7861328125,
  "ễ": 7.7861328125,
  "ệ": 7.7861328125,
  "G": 10.8896484375,
  "g": 7.7861328125,
  "H": 10.1103515625,
  "h": 7.7861328125,
  "I": 3.8896484375,
  "Í": 3.8896484375,
  "Ì": 3.8896484375,
  "Ỉ": 3.8896484375,
  "Ĩ": 3.8896484375,
  "Ị": 3.8896484375,
  "i": 3.1103515625,
  "í": 3.1103515625,
  "ì": 3.1103515625,
  "ỉ": 3.1103515625,
  "ĩ": 3.1103515625,
  "ị": 3.1103515625,
  "K": 9.337890625,
  "k": 7,
  "L": 7.7861328125,
  "l": 3.1103515625,
  "M": 11.662109375,
  "m": 11.662109375,
  "N": 10.1103515625,
  "n": 7.7861328125,
  "O": 10.8896484375,
  "Ó": 10.8896484375,
  "Ò": 10.8896484375,
  "Ỏ": 10.8896484375,
  "Õ": 10.8896484375,
  "Ọ": 10.8896484375,
  "o": 7.7861328125,
  "ó": 7.7861328125,
  "ò": 7.7861328125,
  "ỏ": 7.7861328125,
  "õ": 7.7861328125,
  "ọ": 7.7861328125,
  "Ô": 10.8896484375,
  "Ố": 10.8896484375,
  "Ồ": 10.8896484375,
  "Ổ": 10.8896484375,
  "Ỗ": 10.8896484375,
  "Ộ": 10.8896484375,
  "ô": 7.7861328125,
  "ố": 7.7861328125,
  "ồ": 7.7861328125,
  "ổ": 7.7861328125,
  "ỗ": 7.7861328125,
  "ộ": 7.7861328125,
  "Ơ": 12.00390625,
  "Ớ": 12.00390625,
  "Ờ": 12.00390625,
  "Ở": 12.00390625,
  "Ỡ": 12.00390625,
  "Ợ": 12.00390625,
  "ơ": 9.1806640625,
  "ớ": 9.1806640625,
  "ờ": 9.1806640625,
  "ở": 9.1806640625,
  "ỡ": 9.1806640625,
  "ợ": 9.1806640625,
  "P": 9.337890625,
  "p": 7.7861328125,
  "Q": 10.8896484375,
  "q": 7.7861328125,
  "R": 10.1103515625,
  "r": 4.662109375,
  "S": 9.337890625,
  "s": 7,
  "T": 8.5517578125,
  "t": 3.8896484375,
  "U": 10.1103515625,
  "Ú": 10.1103515625,
  "Ù": 10.1103515625,
  "Ủ": 10.1103515625,
  "Ũ": 10.1103515625,
  "Ụ": 10.1103515625,
  "u": 7.7861328125,
  "ú": 7.7861328125,
  "ù": 7.7861328125,
  "ủ": 7.7861328125,
  "ũ": 7.7861328125,
  "ụ": 7.7861328125,
  "Ư": 11.9560546875,
  "Ứ": 11.9560546875,
  "Ừ": 11.9560546875,
  "Ử": 11.9560546875,
  "Ữ": 11.9560546875,
  "Ự": 11.9560546875,
  "ư": 9.3720703125,
  "ứ": 9.3720703125,
  "ừ": 9.3720703125,
  "ử": 9.3720703125,
  "ữ": 9.3720703125,
  "ự": 9.3720703125,
  "V": 9.337890625,
  "v": 7,
  "X": 9.337890625,
  "x": 7,
  "Y": 9.337890625,
  "Ý": 9.337890625,
  "Ỳ": 9.337890625,
  "Ỷ": 9.337890625,
  "Ỹ": 9.337890625,
  "Ỵ": 9.337890625,
  "y": 7,
  "ý": 7,
  "ỳ": 7,
  "ỷ": 7,
  "ỹ": 7,
  "ỵ": 7,
  " ": 3.8896484375
};
exports.charWidth = charWidth;
function estimateWidth14(text) {
  // return absol.text.measureText(text, '14px arial').width
  var l = 0;
  for (var j = 0; j < text.length; ++j) {
    l += charWidth[text.charAt(j)] || 9.337890625;
  }
  return l;
}

/**
 *TODO: import from absol-acomp
 * @param {Text} text
 * @param {number=} startOffset
 * @param {number=} endOffset
 * @returns {*[]}
 */
function getTextNodeBounds(text, startOffset, endOffset) {
  if (!text || text.nodeType !== Node.TEXT_NODE || !text.parentElement) return null;
  var style = getComputedStyle(text.parentElement);
  var fontSize = parseFloat(style.getPropertyValue('font-size').replace('px', ''));
  var lineHeight = style.getPropertyValue('line-height');
  if (lineHeight === 'normal') lineHeight = 1.2;else lineHeight = parseFloat(lineHeight.replace('px', '')) / fontSize;
  var txt = text.data;
  var y = -Infinity;
  var c;
  var range;
  var parts = [];
  var cPart;
  var j;
  var delta = lineHeight * fontSize / 3;
  var rect;
  var i = 0;
  if (isNaturalNumber(startOffset)) i = Math.max(startOffset, i);
  if (isNaturalNumber(endOffset)) endOffset = Math.min(txt.length, endOffset);else endOffset = txt.length;
  while (i < endOffset) {
    c = txt[i];
    j = i + 1;
    range = document.createRange();
    range.setStart(text, i);
    range.setEnd(text, j);
    rect = _Rectangle["default"].fromClientRect(range.getBoundingClientRect());
    if (Math.abs(rect.y - y) < delta) {
      cPart.end = j;
      cPart.rect = cPart.rect.merge(rect);
    } else {
      cPart = {
        start: i,
        end: j,
        rect: rect
      };
      y = rect.y;
      parts.push(cPart);
    }
    i = j;
  }
  parts.forEach(function (part) {
    rect = part.rect;
    part.text = txt.substring(part.start, part.end);
  });
  return parts;
}

/***
 *
 * @param {number} v
 * @returns {number}
 */
function absCeil(v) {
  var a = Math.ceil(Math.abs(v));
  return v < 0 ? -a : a;
}

/***
 *
 * @param {number} x
 * @param {number} l
 * @returns {String}
 */
function zeroPadding(x, l) {
  var res = Math.abs(x) + '';
  while (res.length < l) {
    res = '0' + res;
  }
  if (x < 0) res = '-' + res;
  return res;
}
var propertyFilter = ["$trigger", "$content", "_isShow", "defineEvent", "isSupportedEvent", "emit", "fire", "eventEmittorOnWithTime", "on", "once", "off", "init", "eventHandler", "super", "defineAttribute", "defineAttributes", "attr", "addStyle", "removeStyle", "addChild", "addTo", "selfRemove", "selfReplace", "clearChild", "containsClass", "addClass", "removeClass", "getComputedStyleValue", "getFontSize", "findChildAfter", "findChildBefore", "addChildBefore", "addChildAfter", "getBoundingRecursiveRect", "isDescendantOf", "getCSSRules", "afterAttached", "afterDisplayed", "_azar_extendEvents", "__azar_force", "_azar_extendAttributes", "_azar_extendTags", "findAvailablePosition", "$container", "autoFixParentSize", "sync", "$dropper", "$vmenu", "$button", "$text", "$key", "$arrow", "$iconCtn", "_textMarginRight", "_tabIndex", '$icon', '_icon', '$textNode', '$primaryBtn', '$extendBtn', '_menuHolder', '_items', 'hasClass'].reduce(function (ac, cr) {
  ac[cr] = true;
  return ac;
}, {});

/**
 * This is a solution for menu, before a better one.
 * @param obj
 * @returns {{}}
 */
function cleanMenuItemProperty(obj) {
  var res = {};
  var keys = Object.keys(obj);
  var key;
  for (var i = 0; i < keys.length; ++i) {
    key = keys[i];
    if (!propertyFilter[key]) {
      res[key] = obj[key];
    }
  }
  res.text = obj.text;
  if (obj.icon) {
    res.icon = obj.icon;
  }
  if (obj.items) {
    res.items = obj.items;
  }
  return res;
}
function getTagListInTextMessage(text) {
  var rg = /@\[id:(\d+)]/g;
  var matched = rg.exec(text);
  var dict = {};
  var v;
  var res = [];
  while (matched) {
    v = parseInt(matched[1]);
    if (isNaN(v)) v = matched[1];
    if (!dict[v]) {
      dict[v] = true;
      res.push(v);
    }
    matched = rg.exec(text);
  }
  return res;
}

/***
 *
 * @param {AElement} e1
 * @param {AElement} e2
 */
function swapElt(e1, e2) {
  var temp = (0, _ACore._)('div');
  e1.parentElement.replaceChild(temp, e1);
  e2.parentElement.replaceChild(e1, e2);
  temp.parentElement.replaceChild(e2, temp);
}
function swapChildrenInElt(e1, e2) {
  var c1 = Array.prototype.slice.call(e1.childNodes);
  var c2 = Array.prototype.slice.call(e2.childNodes);
  (0, _ACore.$)(e1).clearChild();
  (0, _ACore.$)(e2).clearChild();
  while (c2.length > 0) {
    e1.appendChild(c2.shift());
  }
  while (c1.length > 0) {
    e2.appendChild(c1.shift());
  }
}
function replaceChildrenInElt(elt, childNodes) {
  var nChildren = childNodes.slice();
  var cChildren = Array.prototype.slice.call(elt.childNodes);
  var cC, nC;
  while (cChildren.length > 0 && nChildren.length > 0) {
    cC = cChildren[0];
    nC = nChildren[0];
    if (cC === nC) {
      cChildren.shift();
      nChildren.shift();
    } else {
      break;
    }
  }
  cChildren.forEach(function (elt) {
    elt.remove();
  });
  elt.addChild(nChildren);
}
function findVScrollContainer(elt) {
  if (!elt) return null;
  var parent = elt.parentElement;
  var overflowStyle;
  while (parent) {
    overflowStyle = window.getComputedStyle(parent)['overflow'];
    if ((overflowStyle === 'auto scroll' || overflowStyle === 'auto' || overflowStyle === 'hidden auto' || overflowStyle === 'scroll' || parent.tagName === 'HTML') && parent.clientHeight < parent.scrollHeight) {
      break;
    }
    parent = parent.parentElement;
  }
  if (!parent || parent === document || parent.tagName === "HTML" || parent.tagName === "html") {
    parent = document.body.parentElement;
  }
  return parent;
}

/**
 *
 * @param {HTMLElement} elt
 */
function vScrollIntoView(elt) {
  var parent = findVScrollContainer(elt);
  var eBound = elt.getBoundingClientRect();
  var viewportBound = parent.getBoundingClientRect();
  var currentScrollTop = parent.scrollTop;
  var newScrollTop = currentScrollTop;
  if (eBound.bottom > viewportBound.bottom) {
    newScrollTop = currentScrollTop + (eBound.bottom - viewportBound.bottom);
  }
  if (eBound.top < viewportBound.top) {
    newScrollTop = currentScrollTop - (viewportBound.top - eBound.top);
  }
  if (newScrollTop !== currentScrollTop) {
    parent.scrollTop = newScrollTop;
  }
}
function fileSize2Text(s) {
  if (typeof s !== "number" || isNaN(s)) return '';
  var units = ['B', 'KB', 'MB', 'GB', 'TB'];
  var b = 1;
  for (var i = 0; i < units.length; ++i) {
    if (s <= b * 1024) {
      return Math.floor(s / b * 100) / 100 + units[i];
    }
    b *= 1024;
  }
  return Math.floor(s / b * 10) / 100 + 'PB';
}
function isDateTimeFormatToken(text) {
  //ND: like (Next day)
  return ['d', 'dd', 'M', 'MM', 'y', 'yyyy', 'h', 'hh', 'H', 'HH', 'm', 'mm', 'a', 'w', 'ww', 'Q', 'QQ', 'ND'].indexOf(text) >= 0;
}
var normalizeMinuteOfMillis = function normalizeMinuteOfMillis(mil) {
  mil = mil >> 0;
  mil = Math.floor(mil / 6e4) * 6e4;
  if (mil === _datetime.MILLIS_PER_DAY) return mil;
  mil = mil % _datetime.MILLIS_PER_DAY;
  if (mil < 0) mil += _datetime.MILLIS_PER_DAY;
  return mil;
};

/**
 *
 * @param {number} mil
 * @returns {{hour: number, minute: number, isNextDate: boolean}}
 */
exports.normalizeMinuteOfMillis = normalizeMinuteOfMillis;
var millisToClock = function millisToClock(mil) {
  var res = {};
  res.minute = Math.floor(mil / 6e4) % 60;
  var hour = Math.floor(mil / 36e5);
  if (hour >= 24) {
    res.hour = hour % 24;
    res.isNextDate = true;
  } else {
    res.hour = hour;
  }
  return res;
};
exports.millisToClock = millisToClock;
var clockToMillis = function clockToMillis(hour, minute) {
  var res = hour * _datetime.MILLIS_PER_HOUR + minute * _datetime.MILLIS_PER_MINUTE;
  if (isNaturalNumber(res)) return res;
  return null;
};
exports.clockToMillis = clockToMillis;
function isRealNumber(value) {
  return isFinite(value) && typeof value === "number";
}
function isNaturalNumber(value) {
  return isInteger(value) && value >= 0;
}
function isInteger(value) {
  return isFinite(value) && typeof value === "number" && Math.floor(value) === value;
}

/****
 *
 * @param {string} text
 * @param {{locales?:string}|string =} opt
 */
function parseLocalFloat(text, opt) {
  if (typeof opt === "string") opt = {
    locales: opt
  };
  var locales = opt && opt.locales || window.systemconfig && window.systemconfig.numberFormatLocales;
  var sample = locales ? new Intl.NumberFormat(locales).format(123456.78) : 123456.78.toLocaleString();
  // decimal-separator, thousand-separator.
  var thousandSeparator = sample.match(/3(.?)4/)[1] || '';
  var decimalSeparator = sample.match(/6(.?)7/)[1];
  text = text.replace(new RegExp('[' + thousandSeparator + ']', 'g'), '').replace(new RegExp('[' + decimalSeparator + ']', 'g'), '.');
  return parseFloat(text);
}
function formatLocalFloat(value, opt) {
  if (typeof opt === "string") opt = {
    locales: opt
  };
  var formatOpt = Object.assign({}, opt);
  delete formatOpt.locales;
  var locales = opt && opt.locales || window.systemconfig && window.systemconfig.numberFormatLocales;
  var sample;
  var thousandSeparator;
  var decimalSeparator;
  if (!locales) {
    sample = 123456.78.toLocaleString();
    thousandSeparator = sample.match(/3(.?)4/)[1] || '';
    decimalSeparator = sample.match(/6(.?)7/)[1];
    if (decimalSeparator === '.') locales = 'en-US';else if (decimalSeparator === ',') {
      locales = 'vi-VN';
    }
  }
  return new Intl.NumberFormat(locales, formatOpt).format(value);
}

/***
 *
 * @param {String} text
 * @returns {Boolean}
 */
function isURLAddress(text) {
  if (typeof text != "string") return false;
  return text.startsWith('.') || text.startsWith('http://') || text.startsWith('https://') || text.startsWith('/');
}

/***
 *
 * @param {string | null} pattern
 * @param {string} typeString
 * @returns {boolean}
 */
function fileAccept(pattern, typeString) {
  if (!pattern) return true;
  var parts = pattern.split(',').map(function (x) {
    return x.trim().toLowerCase();
  });
  var ext = typeString.split('.').pop().toLowerCase();
  var mineType = typeString.split('/').shift().toLowerCase();
  return parts.some(function (part) {
    if (part === '*') return true;
    if (part === 'audio/*') {
      return mineType === 'audio' || ['.3gp', '.aa', '.aac', '.aax', '.act', '.aiff', '.alac', '.amr', '.ape', '.au', '.awb', '.dss', '.flac', '.gsm', '.m4a', '.m4b', '.m4p', '.mp3', '.mpc', '.ogg, .oga, .mogg', '.opus', '.ra', '.rm', '.raw', '.rf64', '.sln', '.tta', '.voc', '.vox', '.wav', '.wma', '.wv', '.webm', '.8svx', '.cda'].indexOf(ext) >= 0;
    } else if (part === 'video/*') {
      return mineType === 'video' || ['.webm', '.mkv', '.flv', '.flv', '.vob', '.drc', '.gif', '.gifv', '.mng', '.avi', '.wmv', '.yuv', '.rm', '.rmvb', '.viv', '.asf', '.amv', '.m4v', '.svi', '.3gp', '.3g2', '.mxf', '.roq', '.nsv'].indexOf(ext) >= 0;
    } else if (part === 'image/*') {
      return mineType === 'video' || ["ase", "art", "bmp", "blp", "cd5", "cit", "cpt", "cr2", "cut", "dds", "dib", "djvu", "egt", "exif", "gif", "gpl", "grf", "icns", "ico", "iff", "jng", "jpeg", "jpg", "jfif", "jp2", "jps", "lbm", "max", "miff", "mng", "msp", "nef", "nitf", "ota", "pbm", "pc1", "pc2", "pc3", "pcf", "pcx", "pdn", "pgm", "PI1", "PI2", "PI3", "pict", "pct", "pnm", "pns", "ppm", "psb", "psd", "pdd", "psp", "px", "pxm", "pxr", "qfx", "raw", "rle", "sct", "sgi", "rgb", "int", "bw", "tga", "tiff", "tif", "vtf", "xbm", "xcf", "xpm", "3dv", "amf", "ai", "awg", "cgm", "cdr", "cmx", "dxf", "e2d", "egt", "eps", "fs", "gbr", "odg", "svg", "stl", "vrml", "x3d", "sxd", "v2d", "vnd", "wmf", "emf", "art", "xar", "png", "webp", "jxr", "hdp", "wdp", "cur", "ecw", "iff", "lbm", "liff", "nrrd", "pam", "pcx", "pgf", "sgi", "rgb", "rgba", "bw", "int", "inta", "sid", "ras", "sun", "tga", "heic", "heif"].indexOf(ext) >= 0;
    } else if (part.startsWith('.')) {
      return '.' + ext === part;
    } else {
      return part === ext || part === mineType;
    }
  });
}

/***
 *
 * @param {File|Blob|string|{url:string}} fi
 */
function fileInfoOf(fi) {
  var res = {};
  var handle = function handle(o) {
    var parts;
    if (typeof o === "string") {
      res.name = res.name || (o.split('/').pop() || '').replace(/%([\dA-Fa-f][\dA-Fa-f])/g, function (all, g1) {
        var n = parseInt(g1, 16);
        if (typeof n === "number") {
          return String.fromCharCode(n);
        }
        return all;
      }).replace(/\?.+$/, '');
      if (!res.url && isURLAddress(o)) res.url = o;
      parts = res.name.split('.');
      if (!res.type && parts.length > 1) {
        res.type = parts.pop();
      } else if (typeof res.url === 'string') {
        parts = res.url.split('.');
        res.type = parts.pop();
      }
      if (res.type === 'upload') res.type = parts.pop();
    } else if (_typeof(o) === "object" && o) {
      if (o instanceof Blob) {
        res.mimeType = o.type;
      }
      if (!res.name && typeof o.name === "string") {
        res.name = o.name;
      }
      if (!res.size && typeof o.size === "number") {
        res.size = o.size;
      }
      if (typeof o.url === "string") {
        res.url = o.url;
        handle(o.url);
      }
    }
  };
  handle(fi);
  if (res.name) {
    res.name = res.name.replace(/\.upload$/, '');
  }
  if (!res.type && res.name) {
    res.type = res.name.toLowerCase().split('.').slice(1).pop();
  }
  if (!res.mimeType && res.type) {
    res.mimeType = _ext2MineType["default"][res.type];
  }
  for (var k in res) {
    if (res[k] === undefined) delete res[k];
  }
  return res;
}
function addElementsBefore(inElement, elements, at) {
  for (var i = 0; i < elements.length; ++i) {
    (inElement.addChildBefore || inElement.insertBefore).call(inElement, elements[i], at);
  }
}
function addElementAfter(inElement, elements, at) {
  var atIdx;
  var before;
  var i;
  if (at) {
    atIdx = Array.prototype.indexOf.call(inElement.childNodes, at);
    if (at && atIdx < 0) throw new Error("The node before which the new node is to be inserted is not a child of this node.");
    before = inElement.childNodes[atIdx + 1];
    if (before) {
      for (i = 0; i < elements.length; ++i) {
        (inElement.addChildBefore || inElement.insertBefore).call(inElement, elements[i], before);
      }
    } else {
      for (i = 0; i < elements.length; ++i) {
        (inElement.addChild || inElement.appendChild).call(inElement, elements[i]);
      }
    }
  } else {
    before = inElement.firstChild;
    for (i = 0; i < elements.length; ++i) {
      (inElement.addChildBefore || inElement.insertBefore).call(inElement, elements[i], before);
    }
  }
}
function addElementClassName(elt, className) {
  if (typeof className === "string") {
    className = className.trim().split(/\s+/);
  }
  if (className instanceof Array) {
    className.forEach(function (cls) {
      return elt.classList.add(cls);
    });
  }
}
function findMaxZIndex(elt) {
  var e = elt;
  var style;
  var res = 0;
  while (e && e !== document.body) {
    style = getComputedStyle(e);
    res = Math.max(parseFloat(style.getPropertyValue('z-index')) || 0);
    e = e.parentElement;
  }
  return res;
}
function getAncestorElementOf(elt) {
  while (elt.parentElement) {
    elt = elt.parentElement;
  }
  return elt;
}
function checkedValues2RootTreeValues(items, values) {
  var keyOf = function keyOf(x) {
    return _typeof(x) + x;
  };
  var dict = values.reduce(function (ac, cr) {
    ac[keyOf(cr)] = true;
    return ac;
  }, {});
  var checkScan = function checkScan(item) {
    if (dict[keyOf(item.value)]) return true;
    if (item.items && item.items.length > 0) {
      item.items.forEach(function (sItem) {
        return checkScan(sItem);
      });
      dict[keyOf(item.value)] = item.items.every(function (sItem) {
        return dict[keyOf(sItem.value)];
      });
    }
    return dict[keyOf(item.value)];
  };
  var res = [];
  var scan = function scan(item) {
    if (dict[keyOf(item.value)]) {
      res.push(item.value);
    } else if (item.items && item.items.length > 0) {
      item.items.forEach(function (sItem) {
        return scan(sItem);
      });
    }
  };
  items.forEach(function (sItem) {
    return scan(sItem);
  });
  return res;
}
function rootTreeValues2CheckedValues(items, values) {
  var keyOf = function keyOf(x) {
    return _typeof(x) + x;
  };
  var dict = values.reduce(function (ac, cr) {
    ac[keyOf(cr)] = true;
    return ac;
  }, {});
  var res = [];
  var visit = function visit(item, checked) {
    if (checked) res.push(item.value);
    if (item.items && item.items.length > 0) {
      item.items.forEach(function (cr) {
        return visit(cr, checked || dict[keyOf(cr.value)]);
      });
    }
  };
  items.forEach(function (cr) {
    return visit(cr, dict[keyOf(cr.value)]);
  });
  return res;
}

/***
 *
 * @param {SelectionItem[]} items
 * @param {{removeNoView?: boolean, removeNewLine?:boolean}=} opt
 * @returns {SelectionItem[]}
 */
function copySelectionItemArray(items, opt) {
  opt = opt || {};
  if (opt.removeNoView) {
    items = items.filter(function (item) {
      return !item.noView;
    });
  }
  if (opt.removeNewLine) {
    items.forEach(function (it) {
      if (it.text && it.text.indexOf && it.text.indexOf('\n') >= 0) {
        it.text = it.text.replace(/[\r\n]/g, '');
      }
    });
  }
  return items.map(function (item) {
    var newItem;
    if (_typeof(item) === "object" && 'text' in item) {
      newItem = Object.assign({}, item);
    } else {
      newItem = {
        text: item + '',
        value: item
      };
    }
    if (item.items) {
      newItem.items = copySelectionItemArray(item.items, opt);
    }
    return newItem;
  });
}
function compareSelectionItemArray(a, b) {
  if (a === b) return true;
  var aEmpty = !a || !a.length;
  var bEmpty = !b || !b.length;
  if (!aEmpty && aEmpty === bEmpty) return true;
  if (aEmpty !== bEmpty) return false;
  if (a.length !== b.length) return false;
  var n = a.length;
  var ait, bit;
  for (var i = 0; i < n; ++i) {
    ait = a[i];
    bit = b[i];
    if (ait === bit) continue;
    if (ait.text !== bit.text) return false;
    if (ait.text !== bit.text) return false;
    if (!compareSelectionItemArray(ait.items, bit.items)) return false;
  }
  return true;
}

/***
 *
 * @param {AElement|HTMLElement} element
 * @param {number} padding
 */
function isScrolledToBottom(element, padding) {
  if (!isRealNumber(padding)) padding = 0;
  return element.scrollHeight - element.scrollTop - padding <= element.clientHeight;
}

/**
 * parse a DMS string into latitude and longitude from google maps
 * @param {string} input
 * @returns {{latitude: number, longitude: number}|null}
 */
function parseDMS(input) {
  input = input.trim();
  var regex = /([+-]?\d+)°(\d+)'([\d.]+)"([NS])\s*,?\s*([+-]?\d+)°(\d+)'([\d.]+)"([EW])/;
  var match = input.match(regex);
  if (!match) {
    return null;
  }
  var _match = _slicedToArray(match, 9),
    latDeg = _match[1],
    latMin = _match[2],
    latSec = _match[3],
    latDir = _match[4],
    lngDeg = _match[5],
    lngMin = _match[6],
    lngSec = _match[7],
    lngDir = _match[8];

  // Convert DMS to decimal
  var lat = (parseInt(latDeg) + parseInt(latMin) / 60 + parseFloat(latSec) / 3600) * (latDir === "N" ? 1 : -1);
  var lng = (parseInt(lngDeg) + parseInt(lngMin) / 60 + parseFloat(lngSec) / 3600) * (lngDir === "E" ? 1 : -1);
  return {
    latitude: lat,
    longitude: lng
  };
}
function parseLatLng(value) {
  value = value.trim();
  value = value.replace(/(^\(\s*)|(\s*\)*)/g, '');
  var nums = value.split(/\s*,\s*/);
  if (nums.length !== 2) return null;
  nums = nums.map(function (t) {
    return parseFloat(t);
  });
  if (isRealNumber(nums[0]) && isRealNumber(nums[1])) {
    return {
      latitude: nums[0],
      longitude: nums[1]
    };
  }
  return null;
}
function normalizeLatLngString(text) {
  var latLgn = parseDMS(text) || parseLatLng(text);
  var lat, lng;
  if (latLgn) {
    lat = latLgn.latitude;
    lng = latLgn.longitude;
    lat = Math.max(-90, Math.min(90, lat));
    if (lng < 180 && lng > 180) lng = (lng + 180 + 360 * Math.ceil(Math.abs(lng) / 360 + 2)) % 360 - 180;
    return [lat, lng].join(', ');
  } else return '';
}
function implicitLatLng(value) {
  var latlng = null;
  var nums;
  if (typeof value === "string") {
    latlng = parseDMS(value);
    if (latlng) {
      latlng = new google.maps.LatLng(latlng.latitude, latlng.longitude);
    } else {
      latlng = parseLatLng(value);
      if (latlng) {}
      nums = value.split(/\s*,\s*/).map(function (t) {
        return parseFloat(t);
      });
      if (isRealNumber(nums[0]) && isRealNumber(nums[1])) {
        latlng = new google.maps.LatLng(nums[0], nums[1]);
      }
    }
  } else if (value instanceof google.maps.LatLng) {
    latlng = value;
  } else if (value && isRealNumber(value.latitude) && isRealNumber(value.longitude)) {
    latlng = new google.maps.LatLng(value.latitude, value.longitude);
  } else if (value && isRealNumber(value.lat) && isRealNumber(value.lng)) {
    latlng = new google.maps.LatLng(value.lat, value.lng);
  } else if (value instanceof Array && isRealNumber(value[0]) && isRealNumber(value[1])) {
    latlng = new google.maps.LatLng(value[0], value[1]);
  }
  return latlng;
}
function getMapZoomLevel(mapDim, bounds) {
  var WORLD_DIM = {
    height: 256,
    width: 256
  };
  var ZOOM_MAX = 21;
  function latRad(lat) {
    var sin = Math.sin(lat * Math.PI / 180);
    var radX2 = Math.log((1 + sin) / (1 - sin)) / 2;
    return Math.max(Math.min(radX2, Math.PI), -Math.PI) / 2;
  }
  function zoom(mapPx, worldPx, fraction) {
    return Math.floor(Math.log(mapPx / worldPx / fraction) / Math.LN2);
  }
  if (!bounds) return 17;
  if (!mapDim) return 17;
  var ne = bounds.getNorthEast();
  var sw = bounds.getSouthWest();
  if (!ne || !ne.lat) return 17;
  if (!sw || !sw.lat) return 17;
  var latFraction = (latRad(ne.lat()) - latRad(sw.lat())) / Math.PI;
  var lngDiff = ne.lng() - sw.lng();
  var lngFraction = (lngDiff < 0 ? lngDiff + 360 : lngDiff) / 360;
  var latZoom = zoom(mapDim.height, WORLD_DIM.height, latFraction);
  var lngZoom = zoom(mapDim.width, WORLD_DIM.width, lngFraction);
  return Math.min(latZoom, lngZoom, ZOOM_MAX);
}

/***
 *
 * @param p0
 * @param p1
 * @returns {number}
 */
function latLngDistance(p0, p1) {
  var lat0 = p0.lat();
  var lat1 = p1.lat();
  var lng0 = p0.lng();
  var lng1 = p1.lng();
  var toRad = function toRad(value) {
    return value * Math.PI / 180;
  };
  var R = 6371;
  var dLat = toRad(lat1 - lat0);
  var dLng = toRad(lng1 - lng0);
  lat0 = toRad(lat0);
  lat1 = toRad(lat1);
  var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.sin(dLng / 2) * Math.sin(dLng / 2) * Math.cos(lat0) * Math.cos(lat1);
  var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
  var d = R * c;
  return d;
}
function keyStringOf(o) {
  var type = _typeof(o);
  var keys;
  if (o && type === "object") {
    if (typeof o.getTime === "function") {
      return 'd(' + o.getTime() + ')';
    } else if (typeof o.map === "function") {
      return 'a(' + o.map(function (val) {
        return keyStringOf(val);
      }).join(',') + ')';
    } else {
      keys = Object.keys(o);
      keys.sort();
      return 'o(' + keys.map(function (key) {
        return key + ':' + keyStringOf(o[key]);
      }).join(',') + ')';
    }
  } else {
    return type[0] + '(' + o + ')';
  }
}
function jsStringOf(x) {
  if (x === null) return 'null';
  if (x === undefined) return 'undefined';
  var type = _typeof(x);
  if (type === 'string' || type === 'number') return JSON.stringify(x);
  if (x instanceof Date) return 'new Date(' + x.getTime() + ')';
  var keys;
  keys = Object.keys(x);
  keys.sort();
  return '{' + keys.map(function (key) {
    return JSON.stringify(key) + ':' + jsStringOf(x[key]);
  }).join(',') + '}';
}
function calcDTQueryHash(o) {
  var s = jsStringOf(o);
  return (0, _stringUtils.stringHashCode)(s);
}
function replaceInObject(o, replacer, test) {
  return new Promise(function (rs) {
    var sync = [];
    function visit(so) {
      Object.keys(so).forEach(function (key) {
        var newValue;
        if (test(so[key])) {
          newValue = replacer(so[key], key, so);
          if (newValue && newValue.then) {
            sync.push(newValue);
            newValue.then(function (newValue) {
              return so[key] = newValue;
            });
          } else {
            so[key] = newValue;
          }
        } else if (_typeof(so[key]) === "object" && so[key]) {
          visit(so[key]);
        }
      });
    }
    visit(o);
    Promise.all(sync).then(function () {
      rs(o);
    });
  });
}
function replaceFileInObject(o, replacer) {
  return replaceInObject(o, replacer, function (value, key, object) {
    return value instanceof File || value instanceof Blob;
  });
}
function isNone(x) {
  return x === null || x === undefined;
}
var measureTool = new _TextMeasurement["default"]();
function wrapWord(text, width, font) {
  font = font || '14px arial';
  measureTool.compute(font);
  var res = [];
  var i = 1;
  var prevText = '';
  var curText;
  while (text.length > 0) {
    if (i > text.length && text) {
      res.push(text);
      break;
    }
    curText = text.substring(0, i);
    if (measureTool.measureTextWidth(curText, font) <= width || !prevText) {
      prevText = curText;
    } else {
      text = text.substring(prevText.length).trimStart();
      res.push(prevText);
      prevText = '';
      i = 1;
      continue;
    }
    ++i;
  }
  return res;
}
function wrapText(text, width, font) {
  font = font || '14px arial';
  measureTool.compute(font);
  var res = [];
  var i = 1;
  var prevText = '';
  var prevWidth = 0;
  var curText, curWidth;
  while (text.length > 0) {
    if (i > text.length && text) {
      prevText = text;
      prevWidth = measureTool.measureTextWidth(prevText, font);
      if (prevWidth <= width) {
        res.push(prevText);
      } else {
        res.push.apply(res, wrapWord(prevText, width, font));
      }
      break;
    }
    if (!text[i - 1].match(/[\s\n]/) && (!text[i] || text[i].match(/[\s\n]/))) {
      curText = text.substring(0, i);
      curWidth = measureTool.measureTextWidth(curText, font);
      if (curWidth <= width || !prevText) {
        prevText = curText;
        prevWidth = curWidth;
      } else {
        if (prevWidth <= width) {
          res.push(prevText);
        } else {
          prevText = wrapWord(prevText, width, font).shift();
          res.push(prevText);
        }
        text = text.substring(prevText.length).trimStart();
        prevText = '';
        i = 1;
        continue;
      }
    }
    ++i;
  }
  return res;
}
var listenMethodNames = ['appendChild', 'insertBefore', 'addStyle', 'removeStyle', 'removeChild', 'remove'];
var originalMethodNames = listenMethodNames.map(function (x) {
  return 'original_' + x;
});
function listenDomContentChange(elt, callback) {
  function emit(name, event) {
    if (!callback) return;
    if (name === 'change') {
      if (typeof callback === "function") callback(event);else if (callback.change) {
        callback.change(event);
      }
    } else if (typeof callback[name] === "function") callback[name](event);
  }
  var overrideMethods = listenMethodNames.map(function (name, i) {
    if (i < 2) {
      return function (child) {
        var res = this[originalMethodNames[i]].apply(this, arguments);
        addHook(child);
        emit('change', {
          target: this,
          method: name,
          args: Array.prototype.slice.call(arguments)
        });
        return res;
      };
    } else if (i < 4) {
      return function () {
        var res = this[originalMethodNames[i]].apply(this, arguments);
        if (arguments[0] === 'display') emit('change', {
          target: this,
          method: name,
          args: Array.prototype.slice.call(arguments)
        });
        return res;
      };
    } else if (i < 5) {
      return function (child) {
        var res = this[originalMethodNames[i]].apply(this, arguments);
        removeHook(child);
        emit('change', {
          target: this,
          method: name,
          args: Array.prototype.slice.call(arguments)
        });
        return res;
      };
    } else {
      return function () {
        var res = this[originalMethodNames[i]].apply(this, arguments);
        removeHook(this);
        emit('change', {
          target: this,
          method: name,
          args: Array.prototype.slice.call(arguments)
        });
        return res;
      };
    }
  });
  /**
   *
   * @param {HTMLElement|AElement|Node} child
   */
  var addHook = function addHook(child) {
    if (!child) return;
    if (child.nodeType !== Node.ELEMENT_NODE) return;
    if (child.domHooked) return;
    child.domHooked = true;
    var i;
    var ln;
    for (i = 0; i < listenMethodNames.length; ++i) {
      ln = listenMethodNames[i];
      if (!_AElement["default"].prototype[ln] || _AElement["default"].prototype[ln] === child[ln]) {
        child[originalMethodNames[i]] = child[ln];
        child[ln] = overrideMethods[i];
      }
    }
    if (callback && callback.scrollIntoView) {
      child.scrollIntoView1 = child.scrollIntoView;
      child.scrollIntoView = function () {
        emit('scrollIntoView', {
          target: this,
          method: name,
          args: Array.prototype.slice.call(arguments)
        });
      };
    }
    if (!child._azar_extendTags || Object.keys(child._azar_extendTags).length === 0) {
      for (i = 0; i < child.childNodes.length; ++i) {
        addHook(child.childNodes[i]);
      }
    }
  };
  var removeHook = function removeHook(child) {
    if (!child) return;
    if (child.nodeType !== Node.ELEMENT_NODE) return;
    if (!child.domHooked) return;
    delete child.domHooked;
    var i;
    for (i = 0; i < listenMethodNames.length; ++i) {
      if (child[originalMethodNames[i]]) {
        child[listenMethodNames[i]] = child[originalMethodNames[i]];
        delete child[originalMethodNames[i]];
      }
    }
    if (child.scrollIntoView1) {
      child.scrollIntoView = child.scrollIntoView1;
      delete child.scrollIntoView1;
    }
    for (i = 0; i < child.childNodes.length; ++i) {
      removeHook(child.childNodes[i]);
    }
  };
  addHook(elt);
}
var mdiLoadSync;
function getMaterialDesignIconNames() {
  if (mdiLoadSync) return mdiLoadSync;
  mdiLoadSync = fetch('https://absol.cf/vendor/materialdesignicons/materialdesignicons.css').then(function (res) {
    return res.text();
  }).then(function (text) {
    var regex = /\.mdi-([^:]+)::before/g;
    var iconNames = [];
    var iconNameMatch;
    do {
      iconNameMatch = regex.exec(text);
      if (iconNameMatch) iconNames.push(iconNameMatch[1]);
    } while (iconNameMatch);
    return iconNames;
  })["catch"](function (err) {
    mdiLoadSync = null;
  });
  return mdiLoadSync;
}

/***/ }),

/***/ 12772:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.openVideUrlDialog = openVideUrlDialog;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _ACore = __webpack_require__(34093);
var _MessageDialog = _interopRequireDefault(__webpack_require__(11674));
__webpack_require__(1132);
var _videoUtils = _interopRequireWildcard(__webpack_require__(42217));
var _utils = __webpack_require__(84512);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends Fragment
 * @constructor
 */
function VideoUrlDialog() {
  var _this = this;
  _Fragment["default"].call(this);
  this.task = null;
  this.pendingResult = null;
  Object.keys(VideoUrlDialog.prototype).filter(function (key) {
    return key.startsWith('ev_');
  }).forEach(function (key) {
    _this[key] = _this[key].bind(_this);
  });
}
_OOP["default"].mixClass(VideoUrlDialog, _Fragment["default"]);
VideoUrlDialog.prototype.cache = {};
VideoUrlDialog.prototype.createView = function () {
  var _this2 = this;
  this.$view = (0, _ACore._)({
    tag: _Modal["default"].tag,
    "class": 'as-video-url-dialog-modal',
    child: {
      tag: _MessageDialog["default"].tag,
      "class": 'as-video-url-dialog',
      props: {
        dialogTitle: 'Video',
        dialogActions: [{
          text: 'OK',
          name: 'ok'
        }, {
          text: 'Cancel',
          name: 'cancel'
        }]
      },
      child: [{
        "class": 'as-video-url-dialog-row',
        child: [{
          tag: 'label',
          child: {
            text: 'URL*'
          }
        }, {
          tag: 'input',
          attr: {
            type: 'text'
          },
          "class": ['as-video-url-dialog-url', 'as-text-input']
        }]
      }, {
        "class": 'as-video-url-dialog-row',
        child: [{
          tag: 'label',
          child: {
            text: 'Video Info'
          }
        }, {
          tag: 'span',
          "class": ['as-video-url-dialog-video-info']
        }]
      }, {
        "class": 'as-video-url-dialog-row',
        child: [{
          tag: 'label',
          child: {
            text: 'Display Size'
          }
        }, {
          tag: 'input',
          "class": ['as-text-input', 'as-video-url-dialog-width'],
          attr: {
            type: 'number',
            min: '4'
          }
        }, {
          tag: 'span',
          child: {
            text: ' x '
          }
        }, {
          tag: 'input',
          "class": ['as-text-input', 'as-video-url-dialog-height'],
          attr: {
            type: 'number',
            min: '3'
          }
        }, {
          tag: 'checkbox',
          style: {
            marginLeft: '1em'
          },
          props: {
            text: 'keep ratio'
          }
        }]
      }, {
        "class": 'as-video-url-dialog-row',
        child: [{
          tag: 'label',
          child: {
            text: 'Preview'
          }
        }, {
          tag: 'img',
          "class": 'as-video-url-dialog-video-image'
        }]
      }]
    }
  });
  var keyTimeout = -1;
  this.$urlInput = (0, _ACore.$)('.as-video-url-dialog-url', this.$view).on('paste', function (event) {
    setTimeout(_this2.ev_urlChange.bind(_this2, event), 100);
  }).on('change', this.ev_urlChange).on('keyup', function (event) {
    if (keyTimeout > 0) {
      clearTimeout(keyTimeout);
    }
    keyTimeout = setTimeout(function () {
      keyTimeout = -1;
      _this2.ev_urlChange(event);
    }, 300);
  });
  this.$dialog = (0, _ACore.$)('.as-video-url-dialog', this.$view).on('action', this.ev_action);
  this.$info = (0, _ACore.$)('.as-video-url-dialog-video-info', this.$view);
  this.$image = (0, _ACore.$)('.as-video-url-dialog-video-image', this.$view);
  this.$width = (0, _ACore.$)('.as-video-url-dialog-width', this.$view).on('change', this.ev_widthChange);
  this.$height = (0, _ACore.$)('.as-video-url-dialog-height', this.$view).on('change', this.ev_heightChange);
  this.$ratio = (0, _ACore.$)('checkbox', this.$view).on('change', this.ev_widthChange);
  this.$actionBtns = (0, _ACore.$$)('.as-message-dialog-footer button', this.$view);
  this.$okBtn = this.$actionBtns[0];
};
VideoUrlDialog.prototype.onStart = function () {
  if (this.$view) {
    this.$urlInput.value = '';
    this.$width.value = '';
    this.$height.value = '';
    this.$info.innerHTML = '';
    this.$image.attr('src', undefined);
    this.$okBtn.disabled = true;
  }
  this._prevUrl = null;
};
VideoUrlDialog.prototype.onResume = function () {
  document.body.appendChild(this.getView());
  /*var testcase = [
      'https://www.facebook.com/watch?v=794088524953444',
      'https://www.youtube.com/watch?v=_YzngEllRgM&list=RDGMEMQ1dJ7wXfLlqCjwV0xfSNbAVMX8mhF6HgzVA&index=14',
      'https://vimeo.com/735513454',
      'https://www.dailymotion.com/video/x8d2trt',
      'https://www.youtube.com/embed/AoN__ZtGenc',
      'https://www.youtube.com',
      'https://absol.cf/share/10h.mp4(1).mp4',
      'https://absol.cf/share',
      'https://www.facebook.com/watch?v=386823333524397'
  ]
  this.$urlInput.value = testcase[0];
  this.ev_urlChange();*/
};

VideoUrlDialog.prototype.onPause = function () {
  this.getView().remove();
};
VideoUrlDialog.prototype.resolveCurrentTask = function (result) {
  if (this.task) {
    this.task.resolve(result || this.pendingResult);
    this.task = null;
  }
};
VideoUrlDialog.prototype.cancelCurrentTask = function () {
  if (this.task) {
    this.task.cancel();
    this.task = null;
  }
};
VideoUrlDialog.prototype.assignTask = function (task) {
  this.cancelCurrentTask();
  this._prevUrl = null;
  this.task = task;
  if (task.initInfo) this.onInfo(task.initInfo);
};
VideoUrlDialog.prototype.onInfo = function (info) {
  this.getView();
  this._prevUrl = info.url;
  if (info.error) {
    this.pendingResult = null;
    this.$image.attr('src', undefined);
    this.$info.innerHTML = '<span style="color:#ff2c2c">Can not load video!</span>';
    return;
  }
  this.pendingResult = info;
  if (info.image) this.$image.attr('src', info.image);else {
    this.$image.attr('src', undefined);
  }
  var infoText = [];
  if ((0, _utils.isRealNumber)(info.width) && (0, _utils.isRealNumber)(info.height)) {
    infoText.push([info.width, ' x ', info.height].join(''));
  }
  if ('displayWidth' in info) {
    this.$width.value = info.displayWidth;
    this.$height.value = info.displayHeight;
    this.$urlInput.value = info.url;
  } else if ((0, _utils.isRealNumber)(info.width) && (0, _utils.isRealNumber)(info.height)) {
    infoText.push([info.width, ' x ', info.height].join(''));
    this.$width.value = info.width;
    this.$height.value = info.height;
    this.$ratio.checked = true;
  } else {
    this.$width.value = 560;
    this.$height.value = 315;
  }
  if ('keepRatio' in info) {
    this.$ratio.checked = true;
  }
  if (info.type.startsWith('video/')) {
    infoText.push(info.type.substring(6).toUpperCase());
  }
  if (info.title) {
    infoText.push('<strong>' + info.title + '</strong>');
  }
  this.$info.innerHTML = infoText.join(', ');
  this.$okBtn.disabled = false;
};

/***
 * @param event
 */
VideoUrlDialog.prototype.ev_urlChange = function (event) {
  var _this3 = this;
  var newUrl = this.$urlInput.value;
  if (this._prevUrl === newUrl) return;
  this.$okBtn.disabled = true;
  this._prevUrl = newUrl;
  var info = (0, _videoUtils.parseVideoUrl)(newUrl);
  var sync;
  if (info.videoId === 'INVALID_URL') {
    info.error = 'INVALID_URL';
    sync = Promise.resolve();
  } else if (info.hostType !== '*') {
    info.type = 'text/html';
    sync = (0, _videoUtils["default"])(info.originalUrl, info.hostType === 'facebook').then(function (result) {
      if (newUrl !== _this3._prevUrl) return;
      Object.assign(info, result);
      if (!(0, _utils.isNaturalNumber)(result.width)) {
        info.error = "INVALID_VIDEO";
      }
    });
  } else {
    sync = (0, _videoUtils.getVideoFileHeader)(info.url).then(function (result) {
      if (newUrl !== _this3._prevUrl) return;
      Object.assign(info, result);
      if (result.error) {
        _this3.$info.innerHTML = '<span style="color:#ff2c2c">Can not load video!</span>';
      }
    }).then(function () {
      if (newUrl !== _this3._prevUrl) return;
      if (info.error) return;
      if (info.type.startsWith('video/')) return (0, _videoUtils.getVideoPreview)(info.url).then(function (result1) {
        if (newUrl !== _this3._prevUrl) return;
        Object.assign(info, result1);
      }, function (error1) {
        info.error = "CAN_NOT_LOAD";
      });
    });
  }
  sync.then(function () {
    if (newUrl !== _this3._prevUrl) return;
    _this3.onInfo(info);
  });
};

/***
 * @param event
 */
VideoUrlDialog.prototype.ev_action = function (event) {
  var _this4 = this;
  setTimeout(function () {
    var action = event.action;
    if (action.name === 'cancel') {
      _this4.cancelCurrentTask();
    }
    var width = parseInt(_this4.$width.value);
    var height = parseInt(_this4.$height.value);
    var result = Object.assign({}, _this4.pendingResult);
    if (!isNaN(width) && !isNaN(height)) {
      result.displayWidth = width;
      result.displayHeight = height;
    } else {
      result.displayWidth = 560;
      result.displayHeight = 315;
    }
    result.keepRatio = _this4.$ratio.checked;
    if (action.name === 'ok') {
      _this4.resolveCurrentTask(result);
    }
    _this4.stop();
  }, 100);
};
VideoUrlDialog.prototype.ev_widthChange = function () {
  if (!this.$ratio.checked || !this.pendingResult || !(0, _utils.isRealNumber)(this.pendingResult.width) || !(0, _utils.isRealNumber)(this.pendingResult.height)) return;
  var ratio = this.pendingResult.width / this.pendingResult.height;
  var width = parseFloat(this.$width.value);
  this.$height.value = Math.round(width / ratio);
};
VideoUrlDialog.prototype.ev_heightChange = function () {
  if (!this.$ratio.checked || !this.pendingResult || !(0, _utils.isRealNumber)(this.pendingResult.width) || !(0, _utils.isRealNumber)(this.pendingResult.height)) return;
  var ratio = this.pendingResult.width / this.pendingResult.height;
  var height = parseFloat(this.$height.value);
  this.$width.value = Math.round(height * ratio);
};

/***
 * @type {VideoUrlDialog}
 */
var shareInstance;
function openVideUrlDialog(initInfo) {
  shareInstance = shareInstance || new VideoUrlDialog();
  return new Promise(function (rs) {
    var task = {
      resolved: false,
      canceled: false,
      resolve: function resolve(info) {
        if (this.resolved) return;
        this.resolved = true;
        rs(info);
      },
      cancel: function cancel() {
        if (this.resolved || this.canceled) return;
        if (shareInstance.task !== this) return;
        this.canceled = true;
        rs(null);
      },
      initInfo: initInfo
    };
    shareInstance.start();
    shareInstance.assignTask(task);
  });
}
var _default = VideoUrlDialog;
exports["default"] = _default;

/***/ }),

/***/ 42217:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = getEmbedVideoInfo;
exports.getVideoFileHeader = getVideoFileHeader;
exports.getVideoPreview = getVideoPreview;
exports.parseVideoUrl = parseVideoUrl;
var _ACore = __webpack_require__(34093);
var _FileSaver = __webpack_require__(53069);
var videoUrlRules = [['youtube', /^https:\/\/www.youtube.com\//, /[^a-zAZ]v=([^&]+)/, function (o) {
  return 'https://www.youtube.com/embed/' + o.videoId;
}], ['youtube', /^https:\/\/www.youtube.com\/embed\//, /^https:\/\/www.youtube.com\/embed\/([^&\/]+)/, function (o) {
  return o.url;
}, function (o) {
  return 'https://www.youtube.com/watch?v=' + o.videoId;
}], ['vimeo', /^https:\/\/vimeo.com\//, /vimeo.com\/([0-9A-Za-z_]+)/, function (o) {
  return 'https://player.vimeo.com/video/' + o.videoId;
}], ['dailymotion', /^https:\/\/www.dailymotion.com\/video\//, /dailymotion\.com\/video\/([0-9A-Za-z_]+)/, function (o) {
  return 'https://www.dailymotion.com/embed/video/' + o.videoId;
}], ['facebook', /^https:\/\/www.facebook.com\/watch/, /[^a-zAZ]v=([^&]+)/, function (o) {
  return 'https://www.facebook.com/plugins/video.php?height=315&width=560&show_text=false&t=0&href=' + encodeURIComponent(o.url);
}, function (o) {
  return o.embedUrl;
}], /* INVAID VIDEO ID   */
['youtube', /^https:\/\/www.youtube.com(\/|$)/, 'INVALID_URL'], ['vimeo', /^https:\/\/vimeo.com(\/|$)/, /vimeo.com\/([0-9A-Za-z_]+)/, 'INVALID_URL'], ['dailymotion', /^https:\/\/www.dailymotion.com(\/|$)/, null], ['facebook', /^https:\/\/www.facebook.com/, 'INVALID_URL'], /********************/
['*', /./, /\/([^\/]+)$/, function (o) {
  return o.url;
}]];
function parseVideoUrl(url) {
  url = (url || "").trim();
  var res = {
    url: url
  };
  videoUrlRules.some(function (rule) {
    var matched = url.match(rule[1]);
    if (!matched) return false;
    res.hostType = rule[0];
    if (rule[2] instanceof RegExp) {
      matched = url.match(rule[2]);
      if (!matched) return false;
      res.videoId = matched[1];
    } else if (rule[2] === 'INVALID_URL') {
      res.videoId = "INVALID_URL";
    }
    if (res.videoId !== 'INVALID_URL') {
      res.embedUrl = rule[3](res);
    }
    if (typeof rule[4] === "function") {
      res.originalUrl = rule[4](res);
    } else {
      res.originalUrl = res.url;
    }
    return true;
  });
  return res;
}
var embedVideoSizeCache = {};
var metaRules = [['width', 'og:video:width', /content\s*=\s*"([0-9]+)/, 'number'], ['height', 'og:video:height', /content\s*=\s*"([0-9]+)/, 'number'], ['title', 'og:title', /content\s*=\s*"([^"]+)/, function (s) {
  return s.replace(/\s*-\s*Video Dailymotion$/, '');
}], ['image', 'og:image', /content\s*=\s*"([^"]+)/], ['width', /^video\s/, /width\s*=\s*"([0-9]+)/, 'number', true], ['height', /^video\s/, /height\s*=\s*"([0-9]+)/, 'number', true], ['image', /^img/, /src\s*=\s*"([^"]+)/, function (x) {
  return x.replace(/&amp;/g, '&');
}], ['title', "a href=\"https://www.facebook.com/watch", />([^<]+)/]];
function getEmbedVideoInfo(url, fullPage) {
  // fullPage = false;
  var xUrl = fullPage ? 'https://absol.cf/getpage.php?url=' : 'https://absol.cf/getpagemeta.php?url=';
  embedVideoSizeCache[url] = embedVideoSizeCache[url] || fetch(xUrl + encodeURIComponent(url)).then(function (res) {
    return res.text();
  }).then(function (metaText) {
    if (metaText === 'DOWNLOAD_ERROR') return {
      error: metaText
    };
    var lines = metaText.replace(/\n|(>\s*<)/g, '__spliter__').split('__spliter__');
    var res = {};
    lines.forEach(function (line) {
      metaRules.some(function (rule) {
        var key = rule[0];
        if (key in res) return false;
        var matched;
        if (rule[1] instanceof RegExp) {
          matched = line.match(rule[1]);
          if (!matched) return false;
        } else if (typeof rule[1] === "string") {
          if (line.indexOf(rule[1]) < 0) return false;
        }
        matched = line.match(rule[2]);
        if (!matched) return false;
        var value = matched[1];
        if (rule[3] === 'number') {
          value = parseFloat(value);
          if (isNaN(value)) return false;
        } else if (typeof rule[3] === "function") {
          value = rule[3](value);
        }
        res[key] = value;
        if (rule[4]) return false;
        return true;
      });
    });
    return res;
  });
  return embedVideoSizeCache[url];
}
var videoFileHeaderInfoCache = {};
function getVideoFileHeader(url) {
  videoFileHeaderInfoCache[url] = videoFileHeaderInfoCache[url] || new Promise(function (resolve) {
    var xhr = new XMLHttpRequest();
    xhr.open('HEAD', url, true);
    xhr.onreadystatechange = function () {
      if (this.readyState === 4) {
        if (this.status === 200) {
          var res = {
            type: xhr.getResponseHeader('Content-Type')
          };
          var title;
          var header = xhr.getAllResponseHeaders();
          if (header && (header.indexOf('inline') !== -1 || header.indexOf('attachment') !== -1)) {
            var filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/;
            var matches = filenameRegex.exec(header);
            if (matches != null && matches[1]) {
              title = matches[1].replace(/['"]/g, '');
            }
          } else {
            title = url.split('/').filter(function (x) {
              return !!x;
            }).pop() || '';
            title = title.split('?').shift();
            title = decodeURIComponent(title);
          }
          if (title) res.title = title;
          resolve(res);
        } else {
          resolve({
            error: "STATUS_" + this.status
          });
        }
      }
    };
    xhr.send();
  });
  return videoFileHeaderInfoCache[url];
}
function getVideoPreview(url) {
  return new Promise(function (resolve, reject) {
    var renderDiv = (0, _ACore._)({
      style: {
        position: 'fixed',
        left: 0,
        top: 0,
        overflow: 'hidden',
        'z-index': -1000,
        pointerEvents: 'none',
        visibility: 'hidden'
      }
    }).addTo(document.body);
    var videoElt = (0, _ACore._)({
      tag: 'video',
      attr: {
        crossorigin: "anonymous",
        crossOrigin: "anonymous",
        preload: 'metadata',
        src: url
      },
      on: {
        loadeddata: function loadeddata() {
          clearTimeout(timeout);
          var scale = Math.min(200, videoElt.videoWidth, videoElt.videoHeight) / videoElt.videoWidth;
          var cWidth = Math.ceil(videoElt.videoWidth * scale);
          var cHeight = Math.ceil(videoElt.videoHeight * scale);
          var canvas = (0, _ACore._)({
            tag: 'canvas',
            attr: {
              width: cWidth + 'px',
              height: cHeight + 'px'
            }
          }).addTo(renderDiv);
          var ctx = canvas.getContext('2d');
          ctx.drawImage(videoElt, 0, 0, cWidth, cHeight);
          var image = canvas.toDataURL('image/jpeg', 0.1);
          renderDiv.remove();
          resolve({
            width: videoElt.videoWidth,
            height: videoElt.videoHeight,
            image: image
          });
        },
        error: function error() {
          clearTimeout(timeout);
          renderDiv.remove();
          reject();
        }
      }
    });
    renderDiv.addChild(videoElt);
    videoElt.currentTime = 0.1;
    var timeout = setTimeout(function () {
      renderDiv.remove();
      reject();
    }, 5000);
  });
}

/***/ }),

/***/ 61076:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FBrace = _interopRequireDefault(__webpack_require__(5741));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _BCore = _interopRequireDefault(__webpack_require__(17774));
var _stringGenerate = __webpack_require__(10713);
__webpack_require__(80609);
__webpack_require__(63161);
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _Trapezium = _interopRequireDefault(__webpack_require__(7622));
var _IFrameBridge = _interopRequireDefault(__webpack_require__(52281));
var _diffworkerJs = _interopRequireDefault(__webpack_require__(77053));
var _Thread = _interopRequireDefault(__webpack_require__(44067));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var Range = _FBrace["default"] && _FBrace["default"].acequire('ace/range').Range;
var $ = _BCore["default"].$;
var _ = _BCore["default"]._;

/**
 * @typedef {Object} BraceDiffOption
 * @property {String} element selector query | HTML element
 * @property {BraceDiffOptionLeft} left
 * @property {BraceDiffOptionLeft} right
 * @property {IFrameBridge} diffWorker
 *  
 * 
 *  
 * @param {BraceDiffOption} props 
 */

function BraceDiff(props) {
  if (!(this instanceof BraceDiff)) return new BraceDiff(props);
  _EventEmitter["default"].call(this);
  this.ready = false;
  this.props = props;
  this.props.left = this.props.left || {};
  this.props.right = this.props.right || {};
  this.editorLeft = null;
  this.editorRight = null;
  this.$element = null;
  this.diffThread = new _Thread["default"]({});
  this.diffWorker = props.diffWorker;
  if (!this.diffWorker) {
    var workerUrl = (URL || webkitURL).createObjectURL(new Blob([_diffworkerJs["default"]], {
      type: 'application/javascript'
    }));
    this.diffWorker = new _IFrameBridge["default"](new Worker(workerUrl));
  }
  this.lastFocusEditor = null;
  this._changeTimeOut = false;
  this._attachedTo(props.element);
}
Object.defineProperties(BraceDiff.prototype, Object.getOwnPropertyDescriptors(_EventEmitter["default"].prototype));
BraceDiff.prototype.constructor = BraceDiff;
BraceDiff.prototype._attachedTo = function (elt) {
  if (typeof elt == 'string') {
    elt = $(elt);
    if (elt) {
      this.edit(elt);
    } else {
      throw new Error('Can not find ' + elt);
    }
  } else if (_Dom["default"].isDomNode(elt)) {
    $(elt);
    this.edit(elt);
  } else throw new Error('Invalid element');
};

/**
 * @param {Element} element
 */
BraceDiff.prototype.edit = function (element) {
  this.$element = element.addClass('brace-diff');
  this.$element.updateSize = function () {
    this.updateForegroundSize();
    this.updateGap(this);
  }.bind(this);
  _Dom["default"].addToResizeSystem(this.$element);
  this.$leftPreCtn = _('.brace-diff-left-container').addTo(this.$element);
  this.$rightPreCtn = _('.brace-diff-right-container').addTo(this.$element);
  this.$middleToolCtn = _('.brace-diff-middle-tool-container').addTo(this.$element);
  this.$middleTool = _('.brace-diff-middle-tool').addTo(this.$middleToolCtn);
  this._leftPreId = (0, _stringGenerate.randomIdent)(20);
  this._rightPreId = (0, _stringGenerate.randomIdent)(20);
  this.$leftPre = _('pre.brace-diff-left#' + this._leftPreId).addTo(this.$leftPreCtn);
  this.$rightPre = _('pre.brace-diff-left#' + this._rightPreId).addTo(this.$rightPreCtn);
  this.editorLeft = _FBrace["default"].edit(this.$leftPre);
  this.editorRight = _FBrace["default"].edit(this.$rightPre);
  this.$foreGround = _('.brace-diff-foreground').addTo(this.$element);
  this.$canvas = _('svg').addTo(this.$foreGround);
  this.$poolGap = [];
  this.$activeGaps = [];
  this.$poolLeftArrowBtn = [];
  this.$poolRightArrowBtn = [];
  this.$activePickLeftBtn = [];
  this.$activePickRightBtn = [];
  this.updateForegroundSize();
  this._setupEditors();
  this.ready = true;
  this.emit('ready', {
    target: this
  }, this);
  return this;
};
BraceDiff.prototype._setupEditors = function () {
  var self = this;
  this.editorLeft.setOptions(Object.assign({}, this.props.option, this.props.left.option));
  this.editorRight.setOptions(Object.assign({}, this.props.option, this.props.right.option));
  this.editorLeft.$blockScrolling = Infinity;
  this.editorRight.$blockScrolling = Infinity;
  this.editorLeft.on('change', this.handleChange.bind(this));
  this.editorRight.on('change', this.handleChange.bind(this));
  if (this.props.left.value) {
    this.editorLeft.setValue(this.props.left.value, true);
  }
  if (this.props.right.value) {
    this.editorRight.setValue(this.props.right.value, true);
  }
  this.editorLeft.getSession().on('changeScrollTop', function (scroll) {
    self.updateGap();
  });
  this.editorRight.getSession().on('changeScrollTop', function (scroll) {
    self.updateGap();
  });
  this.editorLeft.on('focus', function (data) {
    self.lastFocusEditor = self.editorLeft;
  });
  this.editorRight.on('focus', function (data) {
    self.lastFocusEditor = self.editorRight;
  });
  if (this.props.right.focus) this.editorRight.focus();else this.editorLeft.focus();
};
BraceDiff.prototype.updateForegroundSize = function () {
  var bound = this.$foreGround.getBoundingClientRect();
  this.$canvas.attr({
    width: bound.width + 'px',
    height: bound.height + 'px'
  });
};

/**
 * @param {Trapeziume} trapeziume
 */
BraceDiff.prototype.pickLeft = function (trapeziume) {
  if (!this.diffData) return;
  //todo
  var newTextLines = this.diffData.lLines.slice(trapeziume.left.start, trapeziume.left.end);
  if (newTextLines.length == 0) {
    var removeRange;
    if (trapeziume.right.end >= this.diffData.rLines.length) {
      //remove to end
      removeRange = new Range(trapeziume.right.start - 1, Number.MAX_VALUE, trapeziume.right.end, 0);
    } else {
      removeRange = new Range(trapeziume.right.start, 0, trapeziume.right.end, 0);
    }
    this.editorRight.getSession().remove(removeRange);
  } else {
    var newText = newTextLines.join('\n');
    var replaceRange = new Range(trapeziume.right.start, 0, trapeziume.right.end - 1, Number.MAX_VALUE);
    if (trapeziume.right.start >= this.diffData.rLines.length) {
      newText = '\n' + newText; //newLine
    } else if (newText.length == 0 && trapeziume.right.start == trapeziume.right.end) {
      replaceRange = new Range(trapeziume.right.start, 0, trapeziume.right.end, 0);
      newText = '\n';
    }
    this.editorRight.getSession().replace(replaceRange, newText);
  }
};

/**
 * @param {Trapeziume} trapeziume
 */
BraceDiff.prototype.pickRight = function (trapeziume) {
  if (!this.diffData) return;
  //todo
  var newTextLines = this.diffData.rLines.slice(trapeziume.right.start, trapeziume.right.end);
  if (newTextLines.length == 0) {
    var removeRange;
    if (trapeziume.left.end >= this.diffData.lLines.length) {
      //remove to end
      removeRange = new Range(trapeziume.left.start - 1, Number.MAX_VALUE, trapeziume.left.end, 0);
    } else {
      removeRange = new Range(trapeziume.left.start, 0, trapeziume.left.end, 0);
    }
    this.editorLeft.getSession().remove(removeRange);
  } else {
    var replaceRange = new Range(trapeziume.left.start, 0, trapeziume.left.end - 1, Number.MAX_VALUE);
    var newText = newTextLines.join('\n');
    if (trapeziume.left.start >= this.diffData.lLines.length) {
      newText = '\n' + newText; //newLine
    } else if (newText.length == 0 && trapeziume.left.start == trapeziume.left.end) {
      replaceRange = new Range(trapeziume.left.start, 0, trapeziume.left.end, 0);
      newText = '\n';
    }
    this.editorLeft.getSession().replace(replaceRange, newText);
  }
};
BraceDiff.prototype.updateDiffLine = function (diffData) {
  this.diffData = diffData;
  this.iniGap();
  this.updateGap();
};
BraceDiff.prototype.getCurrentTrapeziume = function () {
  if (!this.diffData) return;
  var cursorLeftPos = this.editorLeft.getCursorPosition();
  var cursorRightPos = this.editorRight.getCursorPosition();
  var trapeziumes = this.diffData.trapeziumes;
  var trapeziume = null;
  // if (this.lastFocusEditor == this.editorRight) {
  //     for (var i = 0; i < trapeziumes.length; ++i) {
  //         if (trapeziume.right.start >= ){

  //         }
  //     }
  // }
  // else {

  // }

  return trapeziume;
};
BraceDiff.prototype._createLeftArrowBtn = function () {
  return _({
    tag: 'button',
    "class": ['brace-diff-arrow', 'pick-right'],
    child: 'md-arraw-left-bold'
  });
};
BraceDiff.prototype._createRightArrowBtn = function () {
  return _({
    tag: 'button',
    "class": ['brace-diff-arrow', 'pick-left'],
    child: 'md-arraw-right-bold'
  });
};
BraceDiff.prototype.iniGap = function () {
  if (!this.diffData) return;
  var diffData = this.diffData;
  var self = this;
  this.$activeGaps.forEach(function (elt) {
    elt.remove();
    self.$poolGap.push(elt);
  });
  this.$activePickLeftBtn.forEach(function (elt) {
    elt.remove();
    self.$poolLeftArrowBtn.push(elt);
  });
  this.$activePickRightBtn.forEach(function (elt) {
    elt.remove();
    self.$poolRightArrowBtn.push(elt);
  });
  this.$activeGaps = [];
  this.$activePickLeftBtn = [];
  this.$activePickRightBtn = [];
  diffData.trapeziumes.forEach(function (trp, i, trapeziumes) {
    if (trp.color == -1) {
      var $gap;
      if (self.$poolGap.length > 0) {
        $gap = self.$poolGap.pop();
      } else {
        $gap = _('shape.brace-diff-gap');
      }
      $gap.addTo(self.$canvas);
      self.$activeGaps.push($gap);
      trp.$gap = $gap;

      //left
      var $pickLeftBtn;
      var $pickRightBtn;
      if (self.$poolLeftArrowBtn.length > 0) {
        $pickLeftBtn = self.$poolLeftArrowBtn.pop();
      } else {
        $pickLeftBtn = self._createRightArrowBtn();
      }
      $pickLeftBtn.addTo(self.$middleTool);
      self.$activePickLeftBtn.push($pickLeftBtn);
      trp.$pickLeftBtn = $pickLeftBtn;
      $pickLeftBtn.onclick = function () {
        self.pickLeft(trp);
        $gap.remove();
        $pickLeftBtn.remove();
        $pickRightBtn.remove();
      };

      //right
      if (self.$poolRightArrowBtn.length > 0) {
        $pickRightBtn = self.$poolRightArrowBtn.pop();
      } else {
        $pickRightBtn = self._createLeftArrowBtn();
      }
      $pickRightBtn.addTo(self.$middleTool);
      self.$activePickRightBtn.push($pickRightBtn);
      trp.$pickRightBtn = $pickRightBtn;
      $pickRightBtn.onclick = function () {
        self.pickRight(trp);
        $gap.remove();
        $pickLeftBtn.remove();
        $pickRightBtn.remove();
      };
    }
  });
};
BraceDiff.prototype.updateGap = function () {
  //donothing
  if (!this.diffData) return;
  var diffData = this.diffData;
  var self = this;
  var leftScrollTop = self.editorLeft.renderer.scrollTop;
  var rightScrollTop = self.editorRight.renderer.scrollTop;
  var lineHeight = this.editorLeft.renderer.lineHeight;
  var bound = this.$foreGround.getBoundingClientRect();
  var diffWidth = bound.width;
  var editorWidth = this.$leftPre.getBoundingClientRect().width;
  var editorDist = diffWidth - 2 * editorWidth;
  diffData.trapeziumes.forEach(function (trp) {
    if (trp.$gap) {
      trp.$gap.begin().moveTo(0, -leftScrollTop + trp.left.start * lineHeight).lineTo(editorWidth, -leftScrollTop + trp.left.start * lineHeight).curveTo(diffWidth - editorWidth, -rightScrollTop + trp.right.start * lineHeight, editorWidth + editorDist / 2, -leftScrollTop + trp.left.start * lineHeight, diffWidth - editorWidth - editorDist / 2, -rightScrollTop + trp.right.start * lineHeight).lineTo(diffWidth, -rightScrollTop + trp.right.start * lineHeight).lineTo(diffWidth, -rightScrollTop + trp.right.end * lineHeight).lineTo(diffWidth - editorWidth, -rightScrollTop + trp.right.end * lineHeight).curveTo(editorWidth, -leftScrollTop + trp.left.end * lineHeight, diffWidth - editorWidth - editorDist / 2, -rightScrollTop + trp.right.end * lineHeight, editorWidth + editorDist / 2, -leftScrollTop + trp.left.end * lineHeight).lineTo(0, -leftScrollTop + trp.left.end * lineHeight).closePath().end();
      trp.$pickLeftBtn.addStyle('top', (-leftScrollTop + trp.left.start * lineHeight + (-leftScrollTop + trp.left.end * lineHeight)) / 2 - 7 + 'px');
      trp.$pickRightBtn.addStyle('top', (-rightScrollTop + trp.right.start * lineHeight + (-rightScrollTop + trp.right.end * lineHeight)) / 2 - 7 + 'px');
    }
  });
};
BraceDiff.prototype.handleChange = function () {
  if (this._changeTimeOut) {
    clearTimeout(this._changeTimeOut);
  }
  var self = this;
  this._changeTimeOut = setTimeout(function () {
    var currentSession = Math.random();
    self._workSession = currentSession;
    if (self._inWorking) return;
    self._inWorking = true;
    self._changeTimeOut = false;
    var leftData = self.editorLeft.getValue();
    var rightData = self.editorRight.getValue();
    console.log(leftData, rightData);
    self.diffWorker.invoke('diffByLine', leftData, rightData).then(function (result) {
      console.log('result');
      self.updateDiffLine(result);
      self._inWorking = false;
      if (currentSession != self._workSession) self.handleChange();
    });
  }, 5);
};
BraceDiff.prototype.getEditors = function () {
  return [this.editorLeft, this.editorRight];
};
BraceDiff.prototype.destroy = function () {
  this.editorLeft.destroy();
  this.editorRight.destroy();
  this.destroyed = true;
};
var _default = BraceDiff;
exports["default"] = _default;

/***/ }),

/***/ 5741:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(61215);
var _FBraceEditor = _interopRequireDefault(__webpack_require__(96344));
var _FEditSession = _interopRequireDefault(__webpack_require__(85284));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var ace = window.ace || {
  acequire: function acequire() {
    return {
      desc: 'ace is not loaded yet!'
    };
  }
};
if (ace.EditSession) Object.defineProperties(ace.EditSession.prototype, Object.getOwnPropertyDescriptors(_FEditSession["default"].prototype));
var _default = ace;
exports["default"] = _default;

/***/ }),

/***/ 96344:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BCore = _interopRequireDefault(__webpack_require__(17774));
var _Dom = __webpack_require__(64821);
var _goto = __webpack_require__(60555);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var ace = window.ace || {};
var aceEdit = ace && ace.edit;
ace.edit = function () {
  return newExtendedEditor({
    element: arguments[0]
  });
};
function newExtendedEditor(props) {
  var element = props.element;
  if (typeof element === "string") {
    element = _BCore["default"].$(element) || _BCore["default"].$('#' + element);
  }
  if (!element || !(0, _Dom.isDomNode)(element)) {
    throw new Error("Could not file element in options!");
  }
  var editor = aceEdit.apply(ace, [element]);
  Object.defineProperties(editor, Object.getOwnPropertyDescriptors(FBraceEditor.prototype));
  FBraceEditor.call(editor, props);
  dispatchEvent(new Event('resize'));
  return editor;
}
function FBraceEditor(props) {
  //do not new this class
  if (!this || !this.isFBraceEditor) return newExtendedEditor(props);
  this.setOptions(Object.assign({
    enableBasicAutocompletion: true,
    enableSnippets: true,
    enableLiveAutocompletion: false
  }, props.option));
  this.commands.addCommand(_goto.GoToCommand);
  this.container.addEventListener('keydown', function (event) {
    if (event.key === 'Alt') event.preventDefault();
  });
}
FBraceEditor.prototype.isFBraceEditor = true;
FBraceEditor.prototype.$onLineCountChange = function () {
  // console.log(this);
};
FBraceEditor.prototype.getLineCount = function () {
  var session = this.getSession();
  return session.$rowLengthCache.length;
};
var _default = FBraceEditor;
exports["default"] = _default;

/***/ }),

/***/ 85284:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function FEditSession() {}
FEditSession.prototype.gutterRenderer = {
  getWidth: function getWidth(session, lastLineNumber, config) {
    return session.getLineCount().toString().length * config.characterWidth;
  },
  getText: function getText(session, row) {
    return row + 1;
  }
};
FEditSession.prototype.getLineCount = function () {
  return this.$rowLengthCache.length;
};
var _default = FEditSession;
exports["default"] = _default;

/***/ }),

/***/ 60555:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.GoToCommand = void 0;
var _BCore = __webpack_require__(17774);
var _OnsScreenWindow = _interopRequireDefault(__webpack_require__(28217));
var _WindowBox = _interopRequireDefault(__webpack_require__(24405));
var _FlexiconButton = _interopRequireDefault(__webpack_require__(78266));
var _keyboard = __webpack_require__(95141);
__webpack_require__(47515);
var _Dom = __webpack_require__(64821);
var _Modal = _interopRequireDefault(__webpack_require__(4061));
var _EventEmitter = __webpack_require__(46833);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function openGoToDialog(editor) {
  var zIndex = 0;
  var maxZIndex = 0;
  var container = editor.container;
  var c = container;
  var screenSize = (0, _Dom.getScreenSize)();
  while (c) {
    zIndex = parseFloat(getComputedStyle(c).zIndex);
    if (!isNaN(zIndex)) maxZIndex = Math.max(maxZIndex, zIndex);
    c = c.parentElement;
  }
  var editorBound = container.getBoundingClientRect();
  var cursor = editor.getCursorPosition();
  var modal = (0, _BCore._)({
    tag: _Modal["default"],
    style: {
      zIndex: maxZIndex + 1000
    },
    child: {
      tag: _OnsScreenWindow["default"],
      style: {
        width: 'auto',
        height: 'auto',
        minWidth: '228px',
        minHeight: '102px',
        zIndex: maxZIndex + 1005,
        top: Math.max(0, Math.min(screenSize.height - 50, editorBound.top + editorBound.height / 2 - 50)) + 'px',
        left: Math.max(0, Math.min(screenSize.width - 276, editorBound.left + editorBound.width / 2 - 276 / 2)) + 'px'
      }
    }
  });

  /***
   *
   * @type {WindowBox}
   */
  var windowBox = (0, _BCore._)({
    elt: (0, _BCore.$)(_WindowBox["default"].tag, modal),
    "class": 'ace_window_box',
    style: {
      fontSize: '14px'
    },
    child: [{
      style: {
        padding: '5px',
        whiteSpace: 'nowrap'
      },
      child: ['<span>Line[:Column] </span>', {
        tag: 'input',
        "class": 'as-text-input',
        attr: {
          type: 'text'
        },
        style: {
          width: '180px'
        },
        props: {
          value: [cursor.row + 1, cursor.column + 1].join(':')
        }
      }]
    }, {
      style: {
        padding: '5px',
        whiteSpace: 'nowrap',
        textAlign: 'center'
      },
      child: [{
        tag: _FlexiconButton["default"],
        "class": 'primary',
        style: {
          minWidth: '80px',
          marginRight: '20px'
        },
        props: {
          text: 'OK'
        }
      }, {
        tag: _FlexiconButton["default"],
        style: {
          minWidth: '80px'
        },
        props: {
          text: 'CANCEL'
        }
      }]
    }],
    props: {
      windowActions: [{
        icon: '<span class="material-icons close">close</span>',
        name: 'close'
      }]
    },
    on: {
      action: function action(event) {
        if (event.actionData.name === 'close') {
          cancel();
        }
      }
    }
  });
  var finish = function finish() {
    modal.selfRemove();
  };
  var cancel = function cancel() {
    finish();
    editor.focus();
  };
  var ok = function ok() {
    var textParts = numInput.value.split(':').map(function (t) {
      return t.trim();
    });
    var pos = null;
    var r, c;
    if (textParts.length === 1 || textParts.length === 2) {
      r = parseInt(textParts[0]);
      if (textParts.length === 2) {
        c = parseInt(textParts[1]);
      } else {
        c = 1;
      }
      if (!isNaN(r) && !isNaN(c)) {
        pos = [Math.max(r, 1), Math.max(c, 1)];
      }
    }
    if (pos) {
      finish();
      editor.gotoLine(pos[0], pos[1] - 1);
      editor.focus();
    } else {
      numInput.focus();
      numInput.select();
    }
  };
  windowBox.windowTitle = "Go To Line:Column";
  modal.addTo(document.body);
  var numInput = (0, _BCore.$)('.as-text-input', windowBox);
  var $buttons = (0, _BCore.$$)(_FlexiconButton["default"].tag, windowBox);
  $buttons[0].on('click', ok);
  $buttons[1].on('click', cancel);
  modal.on('mouseup', function (event) {
    if ((0, _EventEmitter.hitElement)(numInput, event) || (0, _EventEmitter.hitElement)($buttons[0], event) || (0, _EventEmitter.hitElement)($buttons[1], event)) return;
    setTimeout(function () {
      if (modal.parentElement) {
        numInput.focus();
        numInput.select();
      }
    }, 50);
  });
  [numInput].concat($buttons).forEach(function (ctrElt, i, arr) {
    ctrElt.on('keydown', function (event) {
      var nextElt;
      var key = (0, _keyboard.keyboardEventToKeyBindingIdent)(event);
      if (key === 'tab') {
        event.preventDefault();
        nextElt = arr[(i + 1) % arr.length];
        if (nextElt.$input) {
          nextElt.$input.focus();
          nextElt.$input.select();
        } else {
          nextElt.focus();
        }
      } else if (key === 'enter') {
        setTimeout(ok, 100);
      } else if (key === 'escape') {
        cancel();
      }
    });
  });
  setTimeout(function () {
    numInput.focus();
    numInput.select();
  }, 100);
}
var GoToCommand = {
  name: "goto",
  exec: openGoToDialog,
  bindKey: {
    win: "Ctrl-G",
    mac: 'Command-G'
  }
};
exports.GoToCommand = GoToCommand;

/***/ }),

/***/ 17774:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports._ = exports.$$ = exports.$ = void 0;
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _Shape = _interopRequireDefault(__webpack_require__(86282));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var BCore = new _Dom["default"]();
BCore.install(_Shape["default"]);
var _ = BCore._;
exports._ = _;
var $ = BCore.$;
exports.$ = $;
var $$ = BCore.$$;
exports.$$ = $$;
var _default = BCore;
exports["default"] = _default;

/***/ }),

/***/ 63161:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MdArrawLeftBold = MdArrawLeftBold;
exports.MdArrawRighttBold = MdArrawRighttBold;
var _BCore = _interopRequireDefault(__webpack_require__(17774));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _BCore["default"]._;
function MdArrawLeftBold() {
  return _("<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n        <path d=\"M20,9V15H12V19.84L4.16,12L12,4.16V9H20Z\" />\n    </svg>");
}
_BCore["default"].install('md-arraw-left-bold', MdArrawLeftBold);
function MdArrawRighttBold() {
  return _("<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n        <path d=\"M4,15V9H12V4.16L19.84,12L12,19.84V15H4Z\" />\n    </svg>");
}
_BCore["default"].install('md-arraw-right-bold', MdArrawRighttBold);

/***/ }),

/***/ 16092:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var _ = _interopRequireDefault(__webpack_require__(90834));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
__webpack_require__.g.AbsolBrace = _["default"];

/***/ }),

/***/ 90834:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FBrace = _interopRequireDefault(__webpack_require__(5741));
var _BCore = _interopRequireDefault(__webpack_require__(17774));
var _BraceDiff = _interopRequireDefault(__webpack_require__(61076));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var AbsolBrace = {
  core: _BCore["default"],
  ace: _FBrace["default"],
  BraceDiff: _BraceDiff["default"]
};
var _default = AbsolBrace;
exports["default"] = _default;

/***/ }),

/***/ 15050:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _install = _interopRequireDefault(__webpack_require__(4337));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var CPCore = new _Dom["default"]();
(0, _install["default"])(CPCore);
var _default = CPCore;
exports["default"] = _default;

/***/ }),

/***/ 80553:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CPCore = _interopRequireDefault(__webpack_require__(15050));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Color = _interopRequireDefault(__webpack_require__(64974));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _CPCore["default"]._;
var $ = _CPCore["default"].$;
function ColorPicker() {
  var res = _(['<div class="absol-color-picker">', '    <div class="absol-color-picker-color">', '        <div class="absol-color-picker-sat">', '            <div class="absol-color-picker-val">', '                <div class="absol-color-dragger"></div>', '            </div>', '        </div>', '    </div>', '    <div class="absol-color-picker-hue-range">', '        <div class="absol-color-picker-hue">', '            <div class="absol-color-dragger"></div>', '        </div>', '    </div>', '    <div class="absol-color-picker-alpha-range">', '        <div class="absol-color-picker-alpha">', '            <div class="absol-color-dragger"></div>', '        </div>', '    </div>', '    <div class="absol-color-picker-input">', " <div class=\"absol-color-picker-text-container\">\n            <span class=\"f-mode\">hsba(</span>\n            <span class=\"absol-editabe-text num0\">0</span><span class=\"separator0\">deg, </span>\n            <span class=\"absol-editabe-text num1\">0</span><span class=\"separator1\">%, </span>\n            <span class=\"absol-editabe-text num2\">0</span><span class=\"separator2\">%, </span>\n            <span class=\"absol-editabe-text num3\">0</span><span>)</span>\n        </div>", '    </div>', '    <button class="absol-color-picker-mode">HSB</button>', '</div>'].join(''));
  res.$fMode = $('.f-mode', res);
  res.$sep0 = $('.separator0', res);
  res.$sep1 = $('.separator1', res);
  res.$sep2 = $('.separator2', res);
  res.$num0 = _('editabletext.num0');
  res.$num1 = _('editabletext.num1');
  res.$num2 = _('editabletext.num2');
  res.$num3 = _('editabletext.num3');
  ColorPicker.defaultNumberInputHandle(res.$num0);
  ColorPicker.defaultNumberInputHandle(res.$num1);
  ColorPicker.defaultNumberInputHandle(res.$num2);
  ColorPicker.defaultNumberInputHandle(res.$num3);
  res._num0LimitOption = ColorPicker.numberInputHandleLimit(res.$num0, 0, 360);
  res._num1LimitOption = ColorPicker.numberInputHandleLimit(res.$num1, 0, 100, 0);
  res._num2LimitOption = ColorPicker.numberInputHandleLimit(res.$num2, 0, 100, 0);
  res._num3LimitOption = ColorPicker.numberInputHandleLimit(res.$num3, 0, 1, 3);
  $(".absol-editabe-text.num0", res).selfReplace(res.$num0);
  $(".absol-editabe-text.num1", res).selfReplace(res.$num1);
  $(".absol-editabe-text.num2", res).selfReplace(res.$num2);
  $(".absol-editabe-text.num3", res).selfReplace(res.$num3);
  res.$num0.text = '0';
  res.$num1.text = '0';
  res.$num2.text = '0';
  res.$num3.text = '0';
  res.switchMode = {
    RGBA: 'HSBA',
    HSBA: 'HSLA',
    HSLA: 'RGBA',
    RGB: 'HSB',
    HSB: 'HSL',
    HSL: 'RGB'
  };
  res.toggleAlpha = {
    RGBA: 'RGB',
    HSBA: 'HSB',
    HSLA: 'HSL',
    RGB: 'RGBA',
    HSB: 'HSBA',
    HSL: 'HSLA'
  };
  res.defineEvent(['change']);
  res._saturation = 0;
  res._brightness = 0;
  res._hue = 0;
  res._alpha = 1;
  res.$color = $('.absol-color-picker-color', res);
  res.$colorVal = $('.absol-color-picker-val', res);
  res.$draggerVal = $('.absol-color-dragger', res.$colorVal);
  res.eventHandler = _OOP["default"].bindFunctions(res, ColorPicker.eventHandler);
  res.$colorVal.on('pointerdown', res.eventHandler.colorPointerDown, true);
  res.$hue = $('.absol-color-picker-hue', res);
  res.$draggerHue = $('.absol-color-dragger', res.$hue);
  res.$hue.on('pointerdown', res.eventHandler.huePointerDown);
  res.$alpha = $('.absol-color-picker-alpha', res);
  res.$alpha.on('pointerdown', res.eventHandler.alphaPointerDown);
  res.$draggerAlpha = $('.absol-color-dragger', res.$alpha);
  res.$textContainer = $('.absol-color-picker-text-container', res);
  res.$mode = $('.absol-color-picker-mode', res);
  res.$mode.on('click', res.eventHandler.modeClick);
  //todo

  res.$num0.on('blur', res.eventHandler.inputBlur);
  res.$num1.on('blur', res.eventHandler.inputBlur);
  res.$num2.on('blur', res.eventHandler.inputBlur);
  res.$num3.on('blur', res.eventHandler.inputBlur);
  return res;
}
ColorPicker.defaultNumberInputHandle = function (element) {
  element.on('keydown', function (event) {
    if (!event.key.match(/^[0-9\.]$/) && event.key.length == 1) {
      event.preventDefault();
    }
    if (event.key == 'Tab') {
      event.preventDefault();
    }
    if (event.key == 'Enter') {
      this.edit(false);
    }
    if (event.key == '.' && this.text.indexOf('.') >= 0) {
      event.preventDefault();
    }
    if (this.text.length >= 6 && event.key.length == 1) event.preventDefault();
  }).on('click', function (event) {
    element.edit(true, true);
  }).on('keydown', function (event) {
    if (event.key == 'Tab') {
      var parent = element.parentNode;
      var firstFriend;
      var found = false;
      var nextFriend = $('editabletext', parent, function (elt) {
        if (elt.getComputedStyleValue('display') == "none") return;
        if (!firstFriend) {
          firstFriend = elt;
        }
        if (elt == element) {
          found = true;
        } else if (found) {
          return true;
        }
      });
      nextFriend = nextFriend || firstFriend;
      if (nextFriend) {
        nextFriend.edit(true, true);
      }
    }
  });
};
ColorPicker.numberInputHandleLimit = function (element, min, max, fixed) {
  var option = {
    min: min,
    max: max,
    fixed: fixed || 0,
    enable: true
  };
  element.on('blur', function (event) {
    if (!option.enable) return;
    var number = parseFloat(element.text);
    if (isNaN(number)) {
      number = min;
    }
    if (option.fixed == 0) {
      number = Math.round(number);
    }
    number = Math.max(min, Math.min(option.max, number));
    element.text = number.toFixed(option.fixed) + '';
  });
  return option;
};
ColorPicker.property = {};
ColorPicker.property.withAlpha = {
  set: function set(value) {
    if (value) {
      this.addClass('with-alpha');
    } else {
      this.removeClass('with-alpha');
    }
  },
  get: function get() {
    return this.containClass('with-alpha');
  }
};
ColorPicker.property.saturation = {
  set: function set(value) {
    value = value || 0;
    value = Math.max(0, Math.min(1, value));
    this._saturation = value;
    this.$draggerVal.addStyle('left', value * 100 + '%');
    this._update();
  },
  get: function get() {
    return this._saturation;
  }
};
ColorPicker.property.brightness = {
  set: function set(value) {
    value = value || 0;
    value = Math.max(0, Math.min(1, value));
    this._brightness = value;
    this.$draggerVal.addStyle('bottom', value * 100 + '%');
    this._update();
  },
  get: function get() {
    return this._brightness;
  }
};
ColorPicker.property.mode = {
  set: function set(value) {
    value = (value + '').toUpperCase();
    if (value.indexOf('A') >= 0) {
      this.addClass('with-alpha');
    } else {
      this.removeClass('with-alpha');
      this.alpha = 1;
    }
    if (value.match(/^H/)) {
      this._num0LimitOption.max = 360;
      this._num1LimitOption.max = 100;
      this._num2LimitOption.max = 100;
    } else if (value.match(/^RGB/)) {
      this._num0LimitOption.max = 255;
      this._num1LimitOption.max = 255;
      this._num2LimitOption.max = 255;
    }
    if (value.match(/^(HSB|HSL|RGB|RGBA|HSBA|HSLA)$/)) {
      this.$mode.innerHTML = value;
      this._updateColorText();
    }
  },
  get: function get() {
    return this.$mode.innerHTML;
  }
};
ColorPicker.property.hue = {
  set: function set(value) {
    value = value || 0;
    value = Math.max(0, Math.min(1, value));
    this._hue = value;
    this.$draggerHue.addStyle('top', value * 100 + '%');
    this._update();
  },
  get: function get() {
    return this._hue;
  }
};
ColorPicker.property.alpha = {
  set: function set(value) {
    value = value || 0;
    value = Math.max(0, Math.min(1, value));
    this._alpha = value;
    this.$draggerAlpha.addStyle('top', (1 - value) * 100 + '%');
    this._update();
  },
  get: function get() {
    return this._alpha;
  }
};
ColorPicker.property.value = {
  set: function set(value) {
    if (typeof value == 'string') {
      value = _Color["default"].parse(value);
    }
    if (!value || !value.toHSBA) throw new Error('Invalid color type');
    var hsba = value.toHSBA();
    this.hue = hsba[0];
    this.saturation = hsba[1];
    this.brightness = hsba[2];
    this.alpha = hsba[3];
  },
  get: function get() {
    return _Color["default"].fromHSBA(this.hue, this.saturation, this.brightness, this.alpha);
  }
};
ColorPicker.property.RGBA = {
  set: function set(value) {
    var hsba = _Color["default"].rgbaToHSBA(value || [0, 0, 0, 0]);
    this.hue = hsba[0];
    this.saturation = hsba[1];
    this.brightness = hsba[2];
    this.alpha = hsba[3];
  },
  get: function get() {
    var rgba = _Color["default"].hsbaToRGBA([this.hue, this.saturation, this.brightness, this.alpha]);
    return rgba;
  }
};
ColorPicker.prototype._getSVOfEvent = function (event) {
  var valBound = this.$colorVal.getBoundingClientRect();
  var dx = event.clientX - valBound.left;
  var dy = event.clientY - valBound.top;
  var s = Math.max(0, Math.min(1, dx / valBound.width));
  var b = Math.max(0, Math.min(1, 1 - dy / valBound.height));
  return {
    s: s,
    b: b
  };
};
ColorPicker.prototype._getHOfEvent = function (event) {
  var hueBound = this.$hue.getBoundingClientRect();
  var h = event.clientY - hueBound.top;
  h = h / hueBound.height;
  h = Math.max(0, Math.min(1, h));
  return h;
};
ColorPicker.prototype._getAOfEvent = function (event) {
  var alphaBound = this.$alpha.getBoundingClientRect();
  var a = alphaBound.bottom - event.clientY;
  a = a / alphaBound.height;
  a = Math.max(0, Math.min(1, a));
  return a;
};
ColorPicker.prototype._getTextColorCode = function () {
  var h = this.hue + 0.5;
  if (h > 1) h -= 1;
  var s = this.saturation > 0.5 ? 0 : 1;
  var b = this.brightness > 0.5 ? 0 : 1;
  var rgba = _Color["default"].hsbaToRGBA([h, s, b, 1]);
  return 'rgba(' + rgba.map(function (x, i) {
    return i < 3 ? x * 255 : x;
  }).join(',') + ')';
};
ColorPicker.prototype.init = function (props) {
  this.RGBA = [1, 1, 1, 1];
  this["super"](props);
};
ColorPicker.prototype._update = function () {
  //update vs
  var rgba = _Color["default"].hsbaToRGBA([this.hue, 1, 1, 1]);
  this.$color.addStyle('background', 'rgba(' + rgba.map(function (x, i) {
    return i < 3 ? x * 255 : x;
  }).join(',') + ')');
  rgba = _Color["default"].hsbaToRGBA([this.hue, this.saturation, this.brightness, this.alpha]);
  this.$textContainer.addStyle('background', 'rgba(' + rgba.map(function (x, i) {
    return i < 3 ? x * 255 : x;
  }).join(',') + ')');
  this.$textContainer.addStyle('color', this._getTextColorCode());
  this._updateColorText();
};
ColorPicker.prototype._updateColorText = function () {
  var hsba = [this.hue, this.saturation, this.brightness, this.alpha];
  var mode = this.mode;
  this.$fMode.innerHTML = mode.toLocaleLowerCase() + '(';
  if (mode.match(/^H/)) {
    this.$sep0.innerHTML = 'deg, ';
    this.$sep1.innerHTML = '%, ';
    if (mode.match(/A$/)) {
      this.$sep2.innerHTML = "%, ";
      this.$num3.removeStyle('display');
    } else {
      this.$sep2.innerHTML = "%";
      this.$num3.addStyle('display', 'none');
    }
  } else {
    this.$sep0.innerHTML = ', ';
    this.$sep1.innerHTML = ', ';
    if (mode.match(/A$/)) {
      this.$sep2.innerHTML = ", ";
      this.$num3.removeStyle('display');
    } else {
      this.$num3.addStyle('display', 'none');
      this.$sep2.innerHTML = "";
    }
  }
  if (mode.match(/HSB/)) {
    this.$num0.text = '' + Math.round(hsba[0] * 360);
    this.$num1.text = '' + Math.round(hsba[1] * 100);
    this.$num2.text = '' + Math.round(hsba[2] * 100);
    this.$num3.text = hsba[3].toFixed(3);
  } else {
    var cBytes = _Color["default"]['hsbaTo' + (mode.match(/A$/) ? mode : mode + 'A')](hsba);
    if (mode.match(/^H/)) {
      this.$num0.text = '' + Math.round(cBytes[0] * 360);
      this.$num1.text = '' + Math.round(cBytes[1] * 100);
      this.$num2.text = '' + Math.round(cBytes[2] * 100);
      this.$num3.text = hsba[3].toFixed(3);
    } else {
      this.$num0.text = '' + Math.round(cBytes[0] * 255);
      this.$num1.text = '' + Math.round(cBytes[1] * 255);
      this.$num2.text = '' + Math.round(cBytes[2] * 255);
      this.$num3.text = hsba[3].toFixed(3);
    }
    // var tempMode = mode.indexOf('A') < 0 ? mode + 'A' : mode;
    // var tempColor = Color['hsbaTo' + tempMode](hsba);
    // this.$textContainer.value = Color[mode.toLocaleLowerCase() + 'ToText'](tempColor);
  }
};

ColorPicker.eventHandler = {};
ColorPicker.eventHandler.colorPointerDown = function (event) {
  var newSV = this._getSVOfEvent(event);
  this.saturation = newSV.s;
  this.brightness = newSV.b;
  absol.$(document.body).on('pointermove', this.eventHandler.colorPointerMove).on('pointerup', this.eventHandler.colorPointerFinish).on('pointerleave', this.eventHandler.colorPointerFinish);
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.colorPointerFinish = function (event) {
  absol.$(document.body).off('pointermove', this.eventHandler.colorPointerMove).off('pointerup', this.eventHandler.colorPointerFinish).off('pointerleave', this.eventHandler.colorPointerFinish);
};
ColorPicker.eventHandler.colorPointerMove = function (event) {
  var newSV = this._getSVOfEvent(event);
  this.saturation = newSV.s;
  this.brightness = newSV.b;
  event.preventDefault();
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.huePointerDown = function (event) {
  var newH = this._getHOfEvent(event);
  this.hue = newH;
  event.preventDefault();
  absol.$(document.body).on('pointermove', this.eventHandler.huePointerMove).on('pointerup', this.eventHandler.huePointerFinish).on('pointerleave', this.eventHandler.huePointerFinish);
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.huePointerFinish = function (event) {
  absol.$(document.body).off('pointermove', this.eventHandler.huePointerMove).off('pointerup', this.eventHandler.huePointerFinish).off('pointerleave', this.eventHandler.huePointerFinish);
  event.preventDefault();
};
ColorPicker.eventHandler.huePointerMove = function (event) {
  var newH = this._getHOfEvent(event);
  this.hue = newH;
  event.preventDefault();
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.alphaPointerDown = function (event) {
  var newA = this._getAOfEvent(event);
  this.alpha = newA;
  absol.$(document.body).on('pointermove', this.eventHandler.alphaPointerMove).on('pointerup', this.eventHandler.alphaPointerFinish).on('pointerleave', this.eventHandler.alphaPointerFinish);
  event.preventDefault();
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.alphaPointerFinish = function (event) {
  absol.$(document.body).off('pointermove', this.eventHandler.alphaPointerMove).off('pointerup', this.eventHandler.alphaPointerFinish).off('pointerleave', this.eventHandler.alphaPointerFinish);
  event.preventDefault();
};
ColorPicker.eventHandler.alphaPointerMove = function (event) {
  var newA = this._getAOfEvent(event);
  this.alpha = newA;
  event.preventDefault();
  this.emit('change', {
    target: this,
    originEvent: event,
    value: this.value
  });
};
ColorPicker.eventHandler.modeClick = function (event) {
  this.mode = this.switchMode[this.mode];
  event.preventDefault();
};
ColorPicker.eventHandler.inputBlur = function () {
  var mode = this.mode;
  var alpha = 1;
  if (mode.match(/A$/)) {
    alpha = parseFloat(this.$num3.text);
  }
  var bytes;
  if (mode.match(/^H/)) {
    bytes = [parseFloat(this.$num0.text) / 360, parseFloat(this.$num1.text) / 100, parseFloat(this.$num2.text) / 100, alpha];
  } else if (mode.match(/^RGB/)) {
    bytes = [parseFloat(this.$num0.text) / 255, parseFloat(this.$num1.text) / 255, parseFloat(this.$num2.text) / 255, alpha];
  }
  var hsba = mode.match(/^HSB/) ? bytes : _Color["default"][(mode.match(/A$/) ? mode.toLocaleLowerCase() : mode.toLocaleLowerCase() + 'a') + 'ToHSBA'](bytes);
  this.hue = hsba[0];
  this.saturation = hsba[1];
  this.brightness = hsba[2];
  this.alpha = hsba[3];
};
_CPCore["default"].creator.colorpicker = ColorPicker;
var _default = ColorPicker;
exports["default"] = _default;

/***/ }),

/***/ 34443:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(80553);
var _CPCore = _interopRequireDefault(__webpack_require__(15050));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _CPCore["default"]._;
var $ = _CPCore["default"].$;
var isMobile = _BrowserDetector["default"].isMobile;

/***
 * @extends AElement
 * @constructor
 */
function ColorPickerButton() {
  this.mode = 'OBJECT';
  this.$innerValue = $('.as-color-picker-button-inner-value', this);
  this.prepare();
  this.on('click', this.eventHandler.click);
  /***
   * @name value
   * @type {string|Color}
   * @memberOf ColorPickerButton#
   */
  /***
   * @name hasOpacity
   * @type {boolean}
   * @memberOf ColorPickerButton#
   */
}

ColorPickerButton.tag = 'ColorPickerButton'.toLowerCase();
ColorPickerButton.prototype._isClickMenu = function (event) {
  var c = event.target;
  while (c) {
    if (c.classList.contains('as-solid-color-picker-swatches-name-menu')) return true;
    c = c.parentElement;
  }
  return false;
};
ColorPickerButton.prototype.supportedModes = ['OBJECT', 'RGBA', 'RGB', 'HEX8', 'HEX6', 'HEX4', 'HEX3'];
ColorPickerButton.prototype.hasOpacityModes = ['OBJECT', 'RGBA', 'HEX8', 'HEX4'];
ColorPickerButton.eventHandler = {};
ColorPickerButton.eventHandler.click = function (event) {
  this.togglePicker();
};
ColorPickerButton.eventHandler.changeColor = function (event) {
  this.$innerValue.addStyle("background-color", event.value.toString());
  this._value = event.value;
  this.emit('change', event, this);
};
ColorPickerButton.eventHandler.clickBody = function (event) {
  if (_EventEmitter["default"].hitElement(this, event) || _EventEmitter["default"].hitElement(this.$ColorPicker, event) || this._isClickMenu(event)) return;
  this.closePicker();
};
ColorPickerButton.eventHandler.submit = function (event) {
  this.closePicker();
};
ColorPickerButton.prototype.togglePicker = function () {
  if (this.containsClass('as-color-picker-selecting')) {
    this.closePicker();
  } else {
    this.openPicker();
  }
};
ColorPickerButton.prototype.openPicker = function () {
  if (this.containsClass('as-color-picker-selecting')) return;
  if (ColorPickerButton.lastOpen) {
    ColorPickerButton.lastOpen.closePicker();
  }
  ColorPickerButton.lastOpen = this;
  var thisBt = this;
  this.addClass('as-color-picker-selecting');
  this.$ColorPicker.on('change', this.eventHandler.changeColor).on('submit', this.eventHandler.submit);
  this.$ColorPicker.reloadSetting();
  this.$follower.addStyle('visibility', 'hidden');
  this.$follower.addTo(document.body);
  this.$follower.followTarget = this;
  setTimeout(function () {
    document.addEventListener('click', this.eventHandler.clickBody);
  }.bind(this), 100);
  this._lastValue = this.value;
  this.$ColorPicker.hasOpacity = this.hasOpacity;
  ColorPickerButton.$ColorPicker.value = this.value;
  setTimeout(function () {
    thisBt.$follower.removeStyle('visibility');
  }, 1);
  //10p
};

ColorPickerButton.prototype.closePicker = function () {
  if (!this.containsClass('as-color-picker-selecting')) return;
  this.removeClass('as-color-picker-selecting');
  if (ColorPickerButton.lastOpen === this) {
    ColorPickerButton.lastOpen = null;
    this.$follower.remove();
  }
  this.$ColorPicker.off('change', this.eventHandler.changeColor).off('submit', this.eventHandler.submit);
  document.removeEventListener('click', this.eventHandler.clickBody);
  if (this.value !== this._lastValue) {
    this.emit('stopchange', {
      target: this,
      value: this.value
    }, this);
  }
};
ColorPickerButton.prototype.prepare = function () {
  if (!ColorPickerButton.$ColorPicker) {
    if (isMobile) {
      ColorPickerButton.$follower = _('modal').on('click', function (event) {
        if (event.tagert === this) {
          if (ColorPickerButton.lastOpen) ColorPickerButton.lastOpen.closePicker();
        }
      });
    } else {
      ColorPickerButton.$follower = _('follower.as-color-picker-button-follower');
    }
    ColorPickerButton.$ColorPicker = _({
      tag: 'solidcolorpicker'
    }).addTo(ColorPickerButton.$follower);
    ColorPickerButton.lastOpen = null;
  }
  this.$follower = ColorPickerButton.$follower;
  this.$ColorPicker = ColorPickerButton.$ColorPicker;
};
ColorPickerButton.render = function () {
  return _({
    tag: 'button',
    extendEvent: ['change', 'stopchange'],
    "class": 'as-color-picker-button',
    child: [{
      tag: "div",
      "class": "as-color-picker-button-inner",
      child: '.as-color-picker-button-inner-value'
    }]
  });
};
ColorPickerButton.property = {};
ColorPickerButton.property.value = {
  set: function set(value) {
    this._value = value;
    if (this._value) {
      this.$innerValue.addStyle("background-color", value);
    } else {
      this.$innerValue.addStyle("background-color", 'transparent');
    }
  },
  get: function get() {
    if (!this._value) return this._value;
    if (this.mode.match(/HEX4|HEX6|HEX8|RGB|RGBA/)) return this._value.toString(this.mode);
    return this._value;
  }
};
ColorPickerButton.property.mode = {
  set: function set(value) {
    value = value || 'OBJECT';
    value = value.toUpperCase();
    if (this.supportedModes.indexOf(value) < 0) value = 'OBJECT';
    this._mode = value;
  },
  get: function get() {
    return this._mode;
  }
};
ColorPickerButton.property.hasOpacity = {
  get: function get() {
    return this.hasOpacityModes.indexOf(this._mode) >= 0;
  }
};
_CPCore["default"].install('colorpickerbutton', ColorPickerButton);
var _default = ColorPickerButton;
exports["default"] = _default;

/***/ }),

/***/ 19315:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CPCore = _interopRequireDefault(__webpack_require__(15050));
var _SwatchesTable = __webpack_require__(97440);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _Color = _interopRequireDefault(__webpack_require__(64974));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _CPCore["default"]._;
var $ = _CPCore["default"].$;
function SolidColorPicker() {
  this.on('keydown', this.eventHandler.keydown);
  this.$swatchesName = $('.as-solid-color-picker-swatches-name', this);
  var thisSP = this;
  this._lastEmitHex8 = '';
  this._rgb = 'ff0000';
  this._opatictyPercent = 100;
  this._value = new _Color["default"]([1, 0, 0, 1]);
  this._hue = 0;
  this._sat = 1;
  this._brightness = 1;
  this._swatchesNames = ['Material Design', 'Moqups Classic', 'Bootstrap', 'iOS'];
  this._swatchesShortName = ['material', 'moqups', 'bootstrap', 'ios'];
  this._swatchesIcons = ['span.mdi.mdi-palette', 'span.mdi.mdi-material-design', 'span.mdi.mdi-bootstrap', 'span.mdi.mdi-apple-ios'];
  this._swatchesData = [_SwatchesTable.MaterialSwatches, _SwatchesTable.MoqupsClassicSwathes, _SwatchesTable.BootstrapSwatches, _SwatchesTable.iOsSwatches];
  this._mode = 'swatches';
  this.$mode = $('.as-solid-color-picker-mode', this).on('change', this.eventHandler.modeChange);

  /**
   * @type {import('absol-acomp/js/BScroller').default}
   */
  this.$swatchesTableCtn = $('.as-solid-color-picker-swatches-ctn', this);

  /**
   * @type {import('./SwatchesTable').default}
   */
  this.$swatchesTable = $('.as-solid-color-picker-swatches-ctn swatchestable', this).on('presscell', this.eventHandler.swatchesPressCell);
  this.$recentSwatchesTable = $('.as-solid-color-picker-recent-swatches-ctn swatchestable', this).on('presscell', this.eventHandler.swatchesPressCell);
  this.$selectedDot = _('.as-solid-color-picker-selected-dot');
  _QuickMenu["default"].toggleWhenClick(this.$swatchesName, {
    anchor: [1, 6],
    getMenuProps: function getMenuProps() {
      return {
        extendClasses: 'as-solid-color-picker-swatches-name-menu',
        extendStyle: {
          'font-size': thisSP.getComputedStyleValue('font-size')
        },
        items: thisSP._swatchesNames.map(function (name, i) {
          return {
            text: name,
            value: thisSP._swatchesShortName[i],
            icon: thisSP._swatchesIcons[i]
          };
        })
      };
    },
    onSelect: function onSelect(item) {
      thisSP.swatches = item.value;
    }
  });
  this.$attachhook = _('attachhook').on('error', this.eventHandler.attached);
  this.$hex = $('.as-solid-color-picker-color-hex', this).on('keyup', this.eventHandler.hexKeyup).on('change', this.eventHandler.hexChange);
  this.$opacity = $('.as-solid-color-picker-color-opacity', this).on('change', this.eventHandler.opacityChange).on('keyup', this.eventHandler.opacityKeyUp);
  this.$selected = $('.as-solid-color-picker-selected', this);
  this.$spectrum = _({
    tag: 'hanger',
    elt: $('.as-solid-color-picker-spectrum', this)
  }).on('predrag', this.eventHandler.spectrumDrag).on('drag', this.eventHandler.spectrumDrag);
  this.$spectrumDot = $('.as-solid-color-picker-spectrum-dot', this);
  this.$alpha = _({
    tag: 'hanger',
    elt: $('.as-solid-color-picker-alpha', this)
  }).on('predrag', this.eventHandler.alphaDrag).on('drag', this.eventHandler.alphaDrag);
  this.$alphaDot = $('.as-solid-color-picker-alpha-dot', this);
  this.$hue = _({
    tag: 'hanger',
    elt: $('.as-solid-color-picker-hue', this)
  }).on('predrag', this.eventHandler.hueDrag).on('drag', this.eventHandler.hueDrag);
  this.$hueDot = $('.as-solid-color-picker-hue-dot', this);
  this.$near = $('.as-solid-color-picker-near', this).on('presscell', this.eventHandler.nearPressCell);
  this.$submitBtn = $('.as-solid-color-picker-submit-btn', this).on('click', this.notifySubmit.bind(this));
  this._updateNear();
}
SolidColorPicker.tag = 'SolidColorPicker'.toLowerCase();
SolidColorPicker.render = function () {
  return _({
    attr: {
      tabindex: '1'
    },
    extendEvent: ['change', 'sizechange', 'submit'],
    "class": ['as-solid-color-picker', 'as-solid-color-picker-mode-swatches', 'as-has-opacity'],
    child: [{
      "class": 'as-solid-color-picker-header',
      child: [{
        "class": 'as-solid-color-picker-mode-ctn',
        child: {
          tag: 'buttonarray',
          "class": 'as-solid-color-picker-mode',
          props: {
            items: [{
              text: 'SWATCHES',
              value: 'swatches'
            }, {
              text: 'PICKER',
              value: 'picker'
            }]
          }
        }
      }]
    }, {
      "class": 'as-solid-color-picker-body',
      child: [{
        "class": ['as-solid-color-picker-swatches-select-ctn'],
        child: [{
          tag: 'span',
          child: {
            text: 'Color Scheme: '
          }
        }, {
          "class": 'as-solid-color-picker-swatches-name',
          tag: 'a',
          child: {
            text: 'Material Design'
          }
        }, 'span.mdi.mdi-menu-down']
      }, {
        tag: 'bscroller',
        "class": ['as-solid-color-picker-swatches-ctn'],
        child: {
          tag: 'swatchestable',
          props: {
            data: _SwatchesTable.MaterialSwatches
          }
        }
      }, {
        tag: 'spectrumcolor',
        "class": 'as-solid-color-picker-spectrum',
        child: '.as-solid-color-picker-spectrum-dot'
      }, {
        "class": 'as-solid-color-picker-hue',
        child: '.as-solid-color-picker-hue-dot'
      }, {
        "class": 'as-solid-color-picker-alpha',
        child: ['.as-solid-color-picker-alpha-color', '.as-solid-color-picker-alpha-dot']
      }, {
        tag: 'swatchestable',
        "class": 'as-solid-color-picker-near'
      }, {
        "class": 'as-solid-color-picker-recent-title',
        child: {
          text: 'RECENT COLOR'
        }
      }, {
        "class": ['as-solid-color-picker-recent-swatches-ctn'],
        child: {
          tag: 'swatchestable',
          props: {
            data: _SwatchesTable.MoqupsClassicSwathes.slice(0, 2)
          }
        }
      }]
    }, {
      "class": 'as-solid-color-picker-footer',
      child: [{
        "class": 'as-solid-color-picker-selected-ctn',
        child: {
          "class": 'as-solid-color-picker-selected',
          style: {
            'background-color': '#ffffffff'
          }
        }
      }, {
        tag: 'flexiconinput',
        "class": 'as-solid-color-picker-color-hex',
        props: {
          value: 'ffffff',
          icon: '<svg viewBox="0 0 64 64" id="mq-icon-hex"><path d="M60 24v-6H46V4h-6v14H24V4h-6v14H4v6h14v16H4v6h14v14h6V46h16v14h6V46h14v-6H46V24h14zM40 40H24V24h16v16z"></path></svg>'
        }
      }, {
        tag: 'flexiconinput',
        "class": 'as-solid-color-picker-color-opacity',
        props: {
          icon: 'span.mdi.mdi-opacity',
          unit: '%',
          value: 100
        }
      }, {
        tag: 'flexiconbutton',
        "class": 'as-solid-color-picker-submit-btn',
        props: {
          icon: 'span.mdi.mdi-check-bold'
        }
      }]
    }]
  });
};
SolidColorPicker._settingKey = "absol_solid_color_setting";

//only Hex6
SolidColorPicker.setting = {
  recentColors: ['#ffffff', '#00ffff', '#0000ff', '#ffffff', '#000000']
};
SolidColorPicker._loadSetting = function () {
  var setting = localStorage.getItem(SolidColorPicker._settingKey);
  try {
    setting = JSON.parse(setting);
  } catch (e) {
    setting = {};
  }
  if (setting) {
    Object.assign(SolidColorPicker.setting, setting);
  }
};
SolidColorPicker._loadSetting();
SolidColorPicker._writeSetting = function () {
  localStorage.setItem(SolidColorPicker._settingKey, JSON.stringify(SolidColorPicker.setting));
  SolidColorPicker.updateInstancesSetting();
};
SolidColorPicker.pushInstances = function (elt) {
  var instances = SolidColorPicker.$instances;
  var aliveInstance = [];
  var instance;
  var found = false;
  while (instances.length > 0) {
    instance = instances.pop();
    if (instance.isDescendantOf(document.body)) {
      aliveInstance.push(instance);
    }
    ;
    if (instance == elt) found = true;
  }
  while (aliveInstance.length > 0) {
    instances.push(aliveInstance.pop());
  }
  if (!found) {
    instances.push(elt);
  }
};
SolidColorPicker.updateInstancesSetting = function () {
  var instances = SolidColorPicker.$instances;
  var aliveInstance = [];
  var instance;
  while (instances.length > 0) {
    instance = instances.pop();
    if (instance.isDescendantOf(document.body)) {
      aliveInstance.push(instance);
    }
    ;
  }
  while (aliveInstance.length > 0) {
    instance = aliveInstance.pop();
    instances.push(instance);
    instance.reloadSetting();
  }
};
SolidColorPicker.$instances = [];

/**
 * @param {Color} color
 */
SolidColorPicker.pushColorHistory = function (color) {
  var hex6Color = color.toString('hex6');
  var recentColors = SolidColorPicker.setting.recentColors;
  var index = recentColors.indexOf(hex6Color);
  if (index >= 0) {
    recentColors.splice(index, 1);
  }
  recentColors.unshift(hex6Color);
  while (recentColors.length > 24) {
    recentColors.pop();
  }
  setTimeout(SolidColorPicker._writeSetting.bind(SolidColorPicker), 1);
};
SolidColorPicker.prototype.reloadSetting = function () {
  var recentColors = SolidColorPicker.setting.recentColors.slice();
  var swatches = [];
  while (recentColors.length > 0) {
    swatches.push(recentColors.splice(0, 12));
  }
  this.$recentSwatchesTable.data = swatches;
  this._autoAdDotToCell();
};
SolidColorPicker.prototype._addDotToCell = function (cell, cellColor) {
  var shadowColor = cellColor.getContrastYIQ();
  shadowColor.rgba[3] = 0.7;
  this.$selectedDot.addStyle('box-shadow', 'inset 0px 0px 0.3em 0.125em ' + shadowColor.toString());
  cell.addChild(this.$selectedDot);
};
SolidColorPicker.prototype._autoAdDotToCell = function () {
  this.$selectedDot.remove();
  var cell;
  if (this._mode == 'swatches') {
    cell = this.$swatchesTable.getCell('#' + this._rgb);
  }
  if (cell) {
    this._addDotToCell(cell, this._value);
    this.$swatchesTableCtn.scrollInto(cell);
  } else {
    cell = this.$recentSwatchesTable.getCell('#' + this._rgb);
    if (cell) {
      this._addDotToCell(cell, this._value);
      this.$swatchesTableCtn.scrollInto(cell);
    }
  }
};

/**
 * Need to call first
 * @param {Color} color
 */
SolidColorPicker.prototype._setValue = function (color) {
  this._value = color;
  this.$selected.addStyle('background-color', color.toString());
  this._updateNear();
};
SolidColorPicker.prototype._setRGB = function (rgb) {
  this._rgb = rgb;
  this.$hex.value = this._rgb;
  this.$selectedDot.remove();
  this._autoAdDotToCell();
};
SolidColorPicker.prototype._setOpacityPercent = function (opacity) {
  this._opatictyPercent = opacity;
  this.$opacity.value = opacity;
  this._updateOpacityPercent();
};
SolidColorPicker.prototype._updateOpacityPercent = function () {
  this.$alphaDot.addStyle('left', 'calc(' + this._opatictyPercent + '% - 0.5em)');
};
SolidColorPicker.prototype._setHue = function (hue) {
  this._hue = hue;
  var spectrumColor = _Color["default"].fromHSB(hue / 360, 1, 1);
  var hueDotColor = spectrumColor.getContrastYIQ();
  hueDotColor.rgba[3] = 0.7;
  this.$hueDot.addStyle({
    'box-shadow': 'inset 0px 0px 0.3em 0.125em ' + hueDotColor.toString(),
    left: 'calc(' + hue / 3.6 + '% - 0.5em)'
  });
  this.$spectrum.addStyle('background-color', spectrumColor.toString());
  this._updateSpectrumDot();
};
SolidColorPicker.prototype._setSatBrightness = function (sat, brightness) {
  this._sat = sat;
  this._brightness = brightness;
  this._updateSpectrumDot();
};
SolidColorPicker.prototype._updateSpectrumDot = function () {
  var dotColor = this._value.getContrastYIQ();
  dotColor.rgba[3] = 0.7;
  this.$spectrumDot.addStyle({
    bottom: 'calc(' + this._brightness + '% - 0.5em)',
    left: 'calc(' + this._sat + '% - 0.5em)',
    'box-shadow': 'inset 0px 0px 0.3em 0.125em ' + dotColor.toString()
  });
};
SolidColorPicker.prototype._updateNear = function () {
  var hsba = _Color["default"].rgbaToHSBA(this._value.rgba);
  var sat = hsba[1];
  var hue = hsba[0];
  var brightness = hsba[2];
  var whiterColors = Array(7).fill(null).map(function (u, i) {
    return _Color["default"].fromHSB(hue, sat * (7 - i) / 8, brightness);
  });
  var darkerColors = Array(7).fill(null).map(function (u, i) {
    return _Color["default"].fromHSB(hue, sat, brightness * (7 - i) / 8);
  });
  var hueNearColors = [-5, -3, -2, 1, 2, 3, 5].map(function (u) {
    var nHue = hue + u / 40;
    if (nHue > 1) nHue -= 1;else if (nHue < 0) nHue += 1;
    return _Color["default"].fromHSB(nHue, sat, brightness);
  });
  this.$near.data = [whiterColors, darkerColors, hueNearColors];
};
SolidColorPicker.prototype.notifyCanBeChanged = function () {
  var cHex8 = this._value.toHex8();
  if (cHex8 != this._lastEmitHex8) {
    this._lastEmitHex8 = cHex8;
    this.notifyChange();
  }
};
SolidColorPicker.prototype.notifyChange = function () {
  this.emit('change', {
    target: this,
    value: this.value,
    type: 'change'
  }, this);
};
SolidColorPicker.prototype.notifySizeCanBeChanged = function () {
  var bound = this.getBoundingClientRect();
  if (!this._lastSize || this._lastSize.width != bound.width || this._lastSize.height != bound.height) {
    this._lastSize = {
      width: bound.width,
      height: bound.height
    };
    this.notifySizeChange();
  }
};
SolidColorPicker.prototype.notifySizeChange = function () {
  this.emit('sizechange', {
    target: this,
    size: this._lastSize,
    type: 'sizechange'
  }, this);
};
SolidColorPicker.prototype.notifySubmit = function () {
  SolidColorPicker.pushColorHistory(this._value);
  this.emit('submit', {
    target: this,
    value: this._value,
    type: 'submit'
  }, this);
};
SolidColorPicker.property = {};

/**
 * @type {SolidColorPicker}
 */
SolidColorPicker.property.value = {
  /**
   *
   * @param {Color} value
   */
  set: function set(value) {
    value = value || 'transparent';
    if (!value.toHex8) {
      try {
        value = _Color["default"].parse(value + '');
      } catch (e) {
        value = new _Color["default"]([0, 0, 0, 0]);
      }
    }
    this._lastEmitHex8 = value.toHex8();
    this._setValue(value);
    this._setRGB(value.toHex6());
    this._setOpacityPercent(Math.round(value.rgba[3] * 100));
    var hsba = _Color["default"].rgbaToHSBA(value.rgba);
    this._setHue(hsba[0] * 360);
    this._setSatBrightness(hsba[1] * 100, hsba[2] * 100);
    this._updateNear();
  },
  get: function get() {
    return this._value;
  }
};

/**
 * @type {SolidColorPicker}
 */
SolidColorPicker.property.swatches = {
  set: function set(value) {
    var index = this._swatchesShortName.indexOf(value);
    index = Math.max(index, 0);
    value = this._swatchesShortName[index];
    if (this._swatches != value) {
      this._swatches = value;
      this.$swatchesTable.data = this._swatchesData[index];
      this.$swatchesName.childNodes[0].data = this._swatchesNames[index];
    }
    this._autoAdDotToCell();
  },
  get: function get() {
    return this._swatches;
  }
};
SolidColorPicker.property.mode = {
  set: function set(value) {
    if (value === this._mode) return;
    this.removeClass('as-solid-color-picker-mode-' + this._mode);
    this._mode = value + '';
    this.addClass('as-solid-color-picker-mode-' + this._mode);
    this.$mode.value = this._mode;
    this.notifySizeCanBeChanged();
  },
  get: function get() {
    return this._mode;
  }
};
SolidColorPicker.property.hasOpacity = {
  set: function set(value) {
    if (value) {
      this.addClass('as-has-opacity');
    } else {
      this.removeClass('as-has-opacity');
    }
  },
  get: function get() {
    return this.hasClass('as-has-opacity');
  }
};

/**
 * @type {SolidColorPicker}
 */
SolidColorPicker.eventHandler = {};
SolidColorPicker.eventHandler.attached = function () {
  SolidColorPicker.pushInstances(this);
  this.reloadSetting();
};
SolidColorPicker.eventHandler.modeChange = function () {
  var value = this.$mode.value;
  if (value == this._mode) return;
  this.removeClass('as-solid-color-picker-mode-' + this._mode);
  this._mode = value + '';
  this.addClass('as-solid-color-picker-mode-' + this._mode);
  this.$mode.value = this._mode;
  this.notifySizeCanBeChanged();
};
SolidColorPicker.eventHandler.swatchesPressCell = function (event) {
  try {
    var value = _Color["default"].parse(event.value + '');
    value.rgba[3] = this._opatictyPercent / 100;
    this._setValue(value);
    this._addDotToCell(event.cellElt, value);
    this._rgb = value.toHex6();
    this.$hex.value = this._rgb;
    var hsba = _Color["default"].rgbaToHSBA(value.rgba);
    this._setHue(hsba[0] * 360);
    this._setSatBrightness(hsba[1] * 100, hsba[2] * 100);
  } catch (e) {
    this.$selectedDot.removeStyle('box-shadow');
    this.$hex.value = 'ffffff';
  }
  this.notifyCanBeChanged();
};
SolidColorPicker.eventHandler.nearPressCell = function (event) {
  try {
    var value = _Color["default"].parse(event.value + '');
    value.rgba[3] = this._opatictyPercent / 100;
    this._setValue(value);
    this._setRGB(value.toHex6());
    var hsba = _Color["default"].rgbaToHSBA(value.rgba);
    this._setHue(hsba[0] * 360);
    this._setSatBrightness(hsba[1] * 100, hsba[2] * 100);
  } catch (e) {
    this.$selectedDot.removeStyle('box-shadow');
    this.$hex.value = 'ffffff';
  }
  this.notifyCanBeChanged();
};
SolidColorPicker.eventHandler.hexKeyup = function () {
  try {
    var value = _Color["default"].parse('#' + this.$hex.value.trim());
    if (value.rgba[3] == 1) {
      value.rgba[3] = this._opatictyPercent / 100;
      this._setValue(value);
      this._rgb = value.toHex6();
      this._autoAdDotToCell();
      var hsba = _Color["default"].rgbaToHSBA(value.rgba);
      this._setHue(hsba[0] * 360);
      this._setSatBrightness(hsba[1] * 100, hsba[2] * 100);
      this.notifyCanBeChanged();
    }
  } catch (e) {}
};
SolidColorPicker.eventHandler.hexChange = function () {
  if (this.$hex.value != this._rgb) this.$hex.value = this._rgb;
};
SolidColorPicker.eventHandler.opacityKeyUp = function () {
  var opacity = parseFloat(this.$opacity.value);
  if (!isNaN(opacity)) {
    opacity = Math.round(Math.max(0, Math.min(opacity, 100)));
    this._opatictyPercent = opacity;
    var color = _Color["default"].parse('#' + this._rgb);
    color.rgba[3] = opacity / 100;
    this._setValue(color);
    this._updateOpacityPercent();
    this.notifyCanBeChanged();
  }
};
SolidColorPicker.eventHandler.opacityChange = function () {
  var opacity = this._opatictyPercent;
  if (this.$opacity.value != opacity) {
    this.$opacity.value = opacity + '';
  }
};
SolidColorPicker.eventHandler.alphaDrag = function (event) {
  var aBound = this.$alpha.getBoundingClientRect();
  var opacity = (event.clientX - aBound.left) * 100 / aBound.width;
  opacity = Math.max(0, Math.min(100, Math.round(opacity)));
  var color = _Color["default"].parse('#' + this._rgb);
  color.rgba[3] = opacity / 100;
  this._setValue(color);
  this._setOpacityPercent(opacity);
  this.notifyCanBeChanged();
};
SolidColorPicker.eventHandler.hueDrag = function (event) {
  var hBound = this.$hue.getBoundingClientRect();
  var hue = (event.clientX - hBound.left) * 360 / hBound.width;
  hue = Math.max(0, Math.min(360, Math.round(hue)));
  var value = _Color["default"].fromHSBA(hue / 360, this._sat / 100, this._brightness / 100, this._opatictyPercent / 100);
  this._setValue(value);
  this._setHue(hue);
  this._setRGB(value.toHex6());
  this.notifyCanBeChanged();
};
SolidColorPicker.eventHandler.spectrumDrag = function (event) {
  var sBound = this.$spectrum.getBoundingClientRect();
  var brightness = (sBound.bottom - event.clientY) * 100 / sBound.height;
  brightness = Math.max(0, Math.min(100, Math.round(brightness)));
  var sat = (event.clientX - sBound.left) * 100 / sBound.width;
  sat = Math.max(0, Math.min(100, Math.round(sat)));
  var value = _Color["default"].fromHSBA(this._hue / 360, sat / 100, brightness / 100, this._opatictyPercent / 100);
  this._setValue(value);
  this._setSatBrightness(sat, brightness);
  this._setRGB(value.toHex6());
  this.notifyCanBeChanged();
};
SolidColorPicker.eventHandler.keydown = function (event) {
  if (event.key == 'Enter') {
    event.preventDefault();
    event.target.blur();
    this.notifySubmit();
  }
};
_CPCore["default"].install('solidcolorpicker', SolidColorPicker);
var _default = SolidColorPicker;
exports["default"] = _default;

/***/ }),

/***/ 45284:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CPCore = _interopRequireDefault(__webpack_require__(15050));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _CPCore["default"]._;
var $ = _CPCore["default"].$;
function SpectrumColor() {}
SpectrumColor.tag = 'SpectrumColor'.toLowerCase();
SpectrumColor.render = function () {
  return _({
    "class": 'as-spectrum-color',
    child: {
      "class": 'as-spectrum-color-sat',
      child: '.as-spectrum-color-val'
    }
  });
};
_CPCore["default"].install('spectrumcolor', SpectrumColor);
var _default = SpectrumColor;
exports["default"] = _default;

/***/ }),

/***/ 97440:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.iOsSwatches = exports["default"] = exports.MoqupsClassicSwathes = exports.MaterialSwatches = exports.BootstrapSwatches = void 0;
var _CPCore = _interopRequireDefault(__webpack_require__(15050));
var _Color = _interopRequireDefault(__webpack_require__(64974));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _CPCore["default"]._;
var $ = _CPCore["default"].$;
function SwatchesTable() {
  this._data = [];
  this._poolCells = [];
  this._poolRows = [];
  this._dict = {};
}
SwatchesTable.tag = 'SwatchesTable'.toLowerCase();
SwatchesTable.render = function () {
  return _({
    extendEvent: 'presscell',
    "class": 'as-swatches-table'
  });
};
SwatchesTable.prototype.getCell = function () {
  if (arguments.length == 1) {
    var key = arguments[0];
    if (key.toHex8) {
      key = key.toHex8();
    } else if (typeof key == 'string') {
      key = _Color["default"].parse(key);
      if (key) key = key.toHex8();
    }
    key = key + '';
    return this._dict[key];
  } else if (arguments.length == 2) {
    return this.childNodes[arguments[0]] && this.childNodes[arguments[0]].childNodes[arguments[1]];
  }
};
SwatchesTable.eventHandler = {};
SwatchesTable.eventHandler.clickCell = function (cell, event) {
  this.emit('presscell', {
    target: this,
    cellElt: cell,
    value: cell.__swatchescell_value,
    rowIdx: cell.__swatchescell_row_idx,
    colIdx: cell.__swatchescell_col_idx
  });
};
SwatchesTable.property = {};
SwatchesTable.property.data = {
  set: function set(value) {
    this._dict = {};
    value = value || [[null]];
    if (typeof value == 'string') {
      value = {
        classic: MoqupsClassicSwathes,
        material: MaterialSwatches,
        bootstrap: BootstrapSwatches,
        ios: iOsSwatches,
        moqupsclassic: MoqupsClassicSwathes
      }[value] || [[null]];
    }
    this._data = value;
    var child;
    while (this.childNodes.length > value.length) {
      child = this.firstChild;
      this._poolRows.push(child);
      this.removeChild(child);
    }
    while (this.childNodes.length < value.length) {
      if (this._poolRows.length > 0) child = this._poolRows.pop();else child = _('.as-swatches-table-row');
      this.addChild(child);
    }
    var rowElt;
    var row;
    for (var i = 0; i < value.length; ++i) {
      rowElt = this.childNodes[i];
      row = value[i];
      while (rowElt.childNodes.length > row.length) {
        child = rowElt.firstChild;
        this._poolCells.push(child);
        rowElt.removeChild(child);
      }
      while (rowElt.childNodes.length < row.length) {
        if (this._poolCells.length > 0) child = this._poolCells.pop();else {
          child = _({
            "class": 'as-swatches-table-cell',
            child: '.as-swatches-table-cell-color'
          });
          child.on('click', this.eventHandler.clickCell.bind(this, child));
        }
        rowElt.addChild(child);
      }
      for (var j = 0; j < row.length; ++j) {
        rowElt.childNodes[j].__swatchescell_row_idx = i;
        rowElt.childNodes[j].__swatchescell_col_idx = j;
        if (!row[j]) {
          rowElt.childNodes[j].attr('title', null);
          rowElt.childNodes[j].firstChild.removeStyle('background-color');
          rowElt.childNodes[j].__swatchescell_value = row[j];
          this._dict['null'] = rowElt.childNodes[j];
        } else if (row[j].toHex8) {
          rowElt.childNodes[j].firstChild.addStyle('background-color', row[j].toString());
          rowElt.childNodes[j].attr('title', null);
          rowElt.childNodes[j].__swatchescell_value = row[j];
          this._dict[row[j].toHex8()] = rowElt.childNodes[j];
        } else if (_typeof(row[j]) == 'object') {
          if (row[j].value) {
            rowElt.childNodes[j].firstChild.addStyle('background-color', row[j].value);
            rowElt.childNodes[j].__swatchescell_value = row[j].value;
            this._dict[_Color["default"].parse(row[j].value + '').toHex8()] = rowElt.childNodes[j];
          } else {
            rowElt.childNodes[j].firstChild.removeStyle('background-color');
            this._dict[_Color["default"].parse('transparent').toHex8()] = rowElt.childNodes[j];
          }
          rowElt.childNodes[j].attr('title', row[j].name || null);
        } else if (typeof row[j] == 'string') {
          rowElt.childNodes[j].firstChild.addStyle('background-color', row[j]);
          rowElt.childNodes[j].attr('title', null);
          rowElt.childNodes[j].__swatchescell_value = row[j];
          this._dict[_Color["default"].parse(row[j]).toHex8()] = rowElt.childNodes[j];
        }
      }
    }
  },
  get: function get() {
    return this._data;
  }
};
var MoqupsClassicSwathes = [[{
  "name": "White",
  "value": "#ffffff"
}, {
  "name": "± Wild Sand",
  "value": "#f7f6f6"
}, {
  "name": "± Gallery",
  "value": "#ebebeb"
}, {
  "name": "± Alto",
  "value": "#d6d6d6"
}, {
  "name": "Silver",
  "value": "#c0c0c0"
}, {
  "name": "± Silver Chalice",
  "value": "#aaaaaa"
}, {
  "name": "± Gray",
  "value": "#929292"
}, {
  "name": "Boulder",
  "value": "#7a7a7a"
}, {
  "name": "± Scorpion",
  "value": "#606060"
}, {
  "name": "± Tundora",
  "value": "#444444"
}, {
  "name": "± Mine Shaft",
  "value": "#232323"
}, {
  "name": "Black",
  "value": "#000000"
}], [{
  "name": "± Prussian Blue",
  "value": "#003748"
}, {
  "name": "± Green Vogue",
  "value": "#021f54"
}, {
  "name": "± Black Rock",
  "value": "#120639"
}, {
  "name": "± Violet",
  "value": "#2f073b"
}, {
  "name": "± Bulgarian Rose",
  "value": "#3d051b"
}, {
  "name": "± Lonestar",
  "value": "#5e0202"
}, {
  "name": "± Brown Bramble",
  "value": "#5b1a04"
}, {
  "name": "± Cioccolato",
  "value": "#58330a"
}, {
  "name": "± Bronze Olive",
  "value": "#553d0d"
}, {
  "name": "± Himalaya",
  "value": "#656119"
}, {
  "name": "± West Coast",
  "value": "#4e5516"
}, {
  "name": "± Seaweed",
  "value": "#243e16"
}], [{
  "name": "± Astronaut Blue",
  "value": "#004e63"
}, {
  "name": "± Catalina Blue",
  "value": "#033076"
}, {
  "name": "± Violet",
  "value": "#1c0c4f"
}, {
  "name": "± Jagger",
  "value": "#460e56"
}, {
  "name": "± Maroon Oak",
  "value": "#570e28"
}, {
  "name": "± Dark Burgundy",
  "value": "#840705"
}, {
  "name": "± Kenyan Copper",
  "value": "#7d2709"
}, {
  "name": "± Raw Umber",
  "value": "#7b4812"
}, {
  "name": "± Raw Umber",
  "value": "#785616"
}, {
  "name": "± Wasabi",
  "value": "#8c8525"
}, {
  "name": "± Fern Frond",
  "value": "#6e7623"
}, {
  "name": "± Woodland",
  "value": "#355723"
}], [{
  "name": "± Blue Lagoon",
  "value": "#006e8c"
}, {
  "name": "± Cobalt",
  "value": "#0844a4"
}, {
  "name": "± Persian Indigo",
  "value": "#2e1572"
}, {
  "name": "± Honey Flower",
  "value": "#631878"
}, {
  "name": "± Claret",
  "value": "#7a163c"
}, {
  "name": "± Milano Red",
  "value": "#b70f0a"
}, {
  "name": "± Rust",
  "value": "#af3a11"
}, {
  "name": "± Desert",
  "value": "#aa671d"
}, {
  "name": "± Reef Gold",
  "value": "#a77a23"
}, {
  "name": "± Earls Green",
  "value": "#c3bb38"
}, {
  "name": "± Sushi",
  "value": "#99a534"
}, {
  "name": "± Fern Green",
  "value": "#4c7a34"
}], [{
  "name": "± Bondi Blue",
  "value": "#008db1"
}, {
  "name": "± Denim",
  "value": "#0c59cf"
}, {
  "name": "± Daisy Bush",
  "value": "#3b1d8f"
}, {
  "name": "± Seance",
  "value": "#7e2199"
}, {
  "name": "± Disco",
  "value": "#9c1f4d"
}, {
  "name": "± Crimson",
  "value": "#e61610"
}, {
  "name": "± Orange Roughy",
  "value": "#dc4c18"
}, {
  "name": "± Brandy Punch",
  "value": "#d68227"
}, {
  "name": "± Hokey Pokey",
  "value": "#d39c2f"
}, {
  "name": "± Starship",
  "value": "#f4eb49"
}, {
  "name": "± Turmeric",
  "value": "#c1d045"
}, {
  "name": "± Apple",
  "value": "#629c44"
}], [{
  "name": "± Cerulean",
  "value": "#00a4d3"
}, {
  "name": "± Blue Ribbon",
  "value": "#1464f6"
}, {
  "name": "± Daisy Bush",
  "value": "#5125ad"
}, {
  "name": "± Purple Heart",
  "value": "#9c29b7"
}, {
  "name": "± Maroon Flush",
  "value": "#bb285c"
}, {
  "name": "± Red Orange",
  "value": "#ff3823"
}, {
  "name": "± Orange",
  "value": "#ff6624"
}, {
  "name": "± Sunshade",
  "value": "#ffa834"
}, {
  "name": "± Bright Sun",
  "value": "#fec63d"
}, {
  "name": "± Laser Lemon",
  "value": "#fefb64"
}, {
  "name": "± Confetti",
  "value": "#d7eb5a"
}, {
  "name": "± Mantis",
  "value": "#72bb53"
}], [{
  "name": "± Bright Turquoise",
  "value": "#00c8f8"
}, {
  "name": "± Dodger Blue",
  "value": "#3d8af7"
}, {
  "name": "± Purple Heart",
  "value": "#6334e3"
}, {
  "name": "± Electric Violet",
  "value": "#c238eb"
}, {
  "name": "± Cerise Red",
  "value": "#e93578"
}, {
  "name": "± Persimmon",
  "value": "#ff5d55"
}, {
  "name": "± Coral",
  "value": "#ff8351"
}, {
  "name": "± Texas Rose",
  "value": "#ffb253"
}, {
  "name": "± Golden Tainoi",
  "value": "#ffc957"
}, {
  "name": "± Dolly",
  "value": "#fef67f"
}, {
  "name": "± Manz",
  "value": "#e2ee79"
}, {
  "name": "± Feijoa",
  "value": "#92d36e"
}], [{
  "name": "± Malibu",
  "value": "#4dd7fa"
}, {
  "name": "± Malibu",
  "value": "#75a9f9"
}, {
  "name": "± Cornflower Blue",
  "value": "#8b51f5"
}, {
  "name": "± Heliotrope",
  "value": "#d757f6"
}, {
  "name": "± Froly",
  "value": "#f06e9c"
}, {
  "name": "± Vivid Tangerine",
  "value": "#ff8a84"
}, {
  "name": "± Hit Pink",
  "value": "#ffa382"
}, {
  "name": "± Macaroni and Cheese",
  "value": "#ffc581"
}, {
  "name": "± Grandis",
  "value": "#ffd783"
}, {
  "name": "± Picasso",
  "value": "#fef8a0"
}, {
  "name": "± Khaki",
  "value": "#e9f29b"
}, {
  "name": "± Feijoa",
  "value": "#aedd94"
}], [{
  "name": "± Anakiwa",
  "value": "#91e4fb"
}, {
  "name": "± Sail",
  "value": "#a8c6fa"
}, {
  "name": "± Perfume",
  "value": "#b38df7"
}, {
  "name": "± Heliotrope",
  "value": "#e692f8"
}, {
  "name": "± Illusion",
  "value": "#f6a2bf"
}, {
  "name": "± Sundown",
  "value": "#ffb4b0"
}, {
  "name": "± Wax Flower",
  "value": "#ffc3ae"
}, {
  "name": "± Caramel",
  "value": "#ffd8ad"
}, {
  "name": "± Navajo White",
  "value": "#ffe3ae"
}, {
  "name": "± Pale Prim",
  "value": "#fefac0"
}, {
  "name": "± Corn Field",
  "value": "#f1f6be"
}, {
  "name": "± Tea Green",
  "value": "#cbe8ba"
}], [{
  "name": "± French Pass",
  "value": "#c9f1fd"
}, {
  "name": "± Hawkes Blue",
  "value": "#d4e3fc"
}, {
  "name": "± Perfume",
  "value": "#dacafb"
}, {
  "name": "± Perfume",
  "value": "#f2c9fb"
}, {
  "name": "± Chantilly",
  "value": "#fad2e0"
}, {
  "name": "± Cosmos",
  "value": "#ffdad8"
}, {
  "name": "± Peach Schnapps",
  "value": "#ffe2d8"
}, {
  "name": "± Derby",
  "value": "#ffecd7"
}, {
  "name": "± Pink Lady",
  "value": "#fff1d7"
}, {
  "name": "± Off Yellow",
  "value": "#fefce0"
}, {
  "name": "± Citrine White",
  "value": "#f7fade"
}, {
  "name": "± Zanah",
  "value": "#dfedd6"
}]];
exports.MoqupsClassicSwathes = MoqupsClassicSwathes;
var MaterialSwatches = [[{
  "name": "Red 50",
  "value": "#ffebee"
}, {
  "name": "Red 100",
  "value": "#ffcdd2"
}, {
  "name": "Red 200",
  "value": "#ef9a9a"
}, {
  "name": "Red 300",
  "value": "#e57373"
}, {
  "name": "Red 400",
  "value": "#ef5350"
}, {
  "name": "Red 500",
  "value": "#f44336"
}, {
  "name": "Red 600",
  "value": "#e53935"
}, {
  "name": "Red 700",
  "value": "#d32f2f"
}, {
  "name": "Red 800",
  "value": "#c62828"
}, {
  "name": "Red 900",
  "value": "#b71c1c"
}], [{
  "name": "Pink 50",
  "value": "#fce4ec"
}, {
  "name": "Pink 100",
  "value": "#f8bbd0"
}, {
  "name": "Pink 200",
  "value": "#f48fb1"
}, {
  "name": "Pink 300",
  "value": "#f06292"
}, {
  "name": "Pink 400",
  "value": "#ec407a"
}, {
  "name": "Pink 500",
  "value": "#e91e63"
}, {
  "name": "Pink 600",
  "value": "#d81b60"
}, {
  "name": "Pink 700",
  "value": "#c2185b"
}, {
  "name": "Pink 800",
  "value": "#ad1457"
}, {
  "name": "Pink 900",
  "value": "#880e4f"
}], [{
  "name": "Purple 50",
  "value": "#f3e5f5"
}, {
  "name": "Purple 100",
  "value": "#e1bee7"
}, {
  "name": "Purple 200",
  "value": "#ce93d8"
}, {
  "name": "Purple 300",
  "value": "#ba68c8"
}, {
  "name": "Purple 400",
  "value": "#ab47bc"
}, {
  "name": "Purple 500",
  "value": "#9c27b0"
}, {
  "name": "Purple 600",
  "value": "#8e24aa"
}, {
  "name": "Purple 700",
  "value": "#7b1fa2"
}, {
  "name": "Purple 800",
  "value": "#6a1b9a"
}, {
  "name": "Purple 900",
  "value": "#4a148c"
}], [{
  "name": "Deep Purple 50",
  "value": "#ede7f6"
}, {
  "name": "Deep Purple 100",
  "value": "#d1c4e9"
}, {
  "name": "Deep Purple 200",
  "value": "#b39ddb"
}, {
  "name": "Deep Purple 300",
  "value": "#9575cd"
}, {
  "name": "Deep Purple 400",
  "value": "#7e57c2"
}, {
  "name": "Deep Purple 500",
  "value": "#673ab7"
}, {
  "name": "Deep Purple 600",
  "value": "#5e35b1"
}, {
  "name": "Deep Purple 700",
  "value": "#512da8"
}, {
  "name": "Deep Purple 800",
  "value": "#4527a0"
}, {
  "name": "Deep Purple 900",
  "value": "#311b92"
}], [{
  "name": "Indigo 50",
  "value": "#e8eaf6"
}, {
  "name": "Indigo 100",
  "value": "#c5cae9"
}, {
  "name": "Indigo 200",
  "value": "#9fa8da"
}, {
  "name": "Indigo 300",
  "value": "#7986cb"
}, {
  "name": "Indigo 400",
  "value": "#5c6bc0"
}, {
  "name": "Indigo 500",
  "value": "#3f51b5"
}, {
  "name": "Indigo 600",
  "value": "#3949ab"
}, {
  "name": "Indigo 700",
  "value": "#303f9f"
}, {
  "name": "Indigo 800",
  "value": "#283593"
}, {
  "name": "Indigo 900",
  "value": "#1a237e"
}], [{
  "name": "Blue 50",
  "value": "#e3f2fd"
}, {
  "name": "Blue 100",
  "value": "#bbdefb"
}, {
  "name": "Blue 200",
  "value": "#90caf9"
}, {
  "name": "Blue 300",
  "value": "#64b5f6"
}, {
  "name": "Blue 400",
  "value": "#42a5f5"
}, {
  "name": "Blue 500",
  "value": "#2196f3"
}, {
  "name": "Blue 600",
  "value": "#1e88e5"
}, {
  "name": "Blue 700",
  "value": "#1976d2"
}, {
  "name": "Blue 800",
  "value": "#1565c0"
}, {
  "name": "Blue 900",
  "value": "#0d47a1"
}], [{
  "name": "Light Blue 50",
  "value": "#e1f5fe"
}, {
  "name": "Light Blue 100",
  "value": "#b3e5fc"
}, {
  "name": "Light Blue 200",
  "value": "#81d4fa"
}, {
  "name": "Light Blue 300",
  "value": "#4fc3f7"
}, {
  "name": "Light Blue 400",
  "value": "#29b6f6"
}, {
  "name": "Light Blue 500",
  "value": "#03a9f4"
}, {
  "name": "Light Blue 600",
  "value": "#039be5"
}, {
  "name": "Light Blue 700",
  "value": "#0288d1"
}, {
  "name": "Light Blue 800",
  "value": "#0277bd"
}, {
  "name": "Light Blue 900",
  "value": "#01579b"
}], [{
  "name": "Cyan 50",
  "value": "#e0f7fa"
}, {
  "name": "Cyan 100",
  "value": "#b2ebf2"
}, {
  "name": "Cyan 200",
  "value": "#80deea"
}, {
  "name": "Cyan 300",
  "value": "#4dd0e1"
}, {
  "name": "Cyan 400",
  "value": "#26c6da"
}, {
  "name": "Cyan 500",
  "value": "#00bcd4"
}, {
  "name": "Cyan 600",
  "value": "#00acc1"
}, {
  "name": "Cyan 700",
  "value": "#0097a7"
}, {
  "name": "Cyan 800",
  "value": "#00838f"
}, {
  "name": "Cyan 900",
  "value": "#006064"
}], [{
  "name": "Teal 50",
  "value": "#e0f2f1"
}, {
  "name": "Teal 100",
  "value": "#b2dfdb"
}, {
  "name": "Teal 200",
  "value": "#80cbc4"
}, {
  "name": "Teal 300",
  "value": "#4db6ac"
}, {
  "name": "Teal 400",
  "value": "#26a69a"
}, {
  "name": "Teal 500",
  "value": "#009688"
}, {
  "name": "Teal 600",
  "value": "#00897b"
}, {
  "name": "Teal 700",
  "value": "#00796b"
}, {
  "name": "Teal 800",
  "value": "#00695c"
}, {
  "name": "Teal 900",
  "value": "#004d40"
}], [{
  "name": "Green 50",
  "value": "#e8f5e9"
}, {
  "name": "Green 100",
  "value": "#c8e6c9"
}, {
  "name": "Green 200",
  "value": "#a5d6a7"
}, {
  "name": "Green 300",
  "value": "#81c784"
}, {
  "name": "Green 400",
  "value": "#66bb6a"
}, {
  "name": "Green 500",
  "value": "#4caf50"
}, {
  "name": "Green 600",
  "value": "#43a047"
}, {
  "name": "Green 700",
  "value": "#388e3c"
}, {
  "name": "Green 800",
  "value": "#2e7d32"
}, {
  "name": "Green 900",
  "value": "#1b5e20"
}], [{
  "name": "Light Green 50",
  "value": "#f1f8e9"
}, {
  "name": "Light Green 100",
  "value": "#dcedc8"
}, {
  "name": "Light Green 200",
  "value": "#c5e1a5"
}, {
  "name": "Light Green 300",
  "value": "#aed581"
}, {
  "name": "Light Green 400",
  "value": "#9ccc65"
}, {
  "name": "Light Green 500",
  "value": "#8bc34a"
}, {
  "name": "Light Green 600",
  "value": "#7cb342"
}, {
  "name": "Light Green 700",
  "value": "#689f38"
}, {
  "name": "Light Green 800",
  "value": "#558b2f"
}, {
  "name": "Light Green 900",
  "value": "#33691e"
}], [{
  "name": "Lime 50",
  "value": "#f9fbe7"
}, {
  "name": "Lime 100",
  "value": "#f0f4c3"
}, {
  "name": "Lime 200",
  "value": "#e6ee9c"
}, {
  "name": "Lime 300",
  "value": "#dce775"
}, {
  "name": "Lime 400",
  "value": "#d4e157"
}, {
  "name": "Lime 500",
  "value": "#cddc39"
}, {
  "name": "Lime 600",
  "value": "#c0ca33"
}, {
  "name": "Lime 700",
  "value": "#afb42b"
}, {
  "name": "Lime 800",
  "value": "#9e9d24"
}, {
  "name": "Lime 900",
  "value": "#827717"
}], [{
  "name": "Yellow 50",
  "value": "#fffde7"
}, {
  "name": "Yellow 100",
  "value": "#fff9c4"
}, {
  "name": "Yellow 200",
  "value": "#fff59d"
}, {
  "name": "Yellow 300",
  "value": "#fff176"
}, {
  "name": "Yellow 400",
  "value": "#ffee58"
}, {
  "name": "Yellow 500",
  "value": "#ffeb3b"
}, {
  "name": "Yellow 600",
  "value": "#fdd835"
}, {
  "name": "Yellow 700",
  "value": "#fbc02d"
}, {
  "name": "Yellow 800",
  "value": "#f9a825"
}, {
  "name": "Yellow 900",
  "value": "#f57f17"
}], [{
  "name": "Amber 50",
  "value": "#fff8e1"
}, {
  "name": "Amber 100",
  "value": "#ffecb3"
}, {
  "name": "Amber 200",
  "value": "#ffe082"
}, {
  "name": "Amber 300",
  "value": "#ffd54f"
}, {
  "name": "Amber 400",
  "value": "#ffca28"
}, {
  "name": "Amber 500",
  "value": "#ffc107"
}, {
  "name": "Amber 600",
  "value": "#ffb300"
}, {
  "name": "Amber 700",
  "value": "#ffa000"
}, {
  "name": "Amber 800",
  "value": "#ff8f00"
}, {
  "name": "Amber 900",
  "value": "#ff6f00"
}], [{
  "name": "Orange 50",
  "value": "#fff3e0"
}, {
  "name": "Orange 100",
  "value": "#ffe0b2"
}, {
  "name": "Orange 200",
  "value": "#ffcc80"
}, {
  "name": "Orange 300",
  "value": "#ffb74d"
}, {
  "name": "Orange 400",
  "value": "#ffa726"
}, {
  "name": "Orange 500",
  "value": "#ff9800"
}, {
  "name": "Orange 600",
  "value": "#fb8c00"
}, {
  "name": "Orange 700",
  "value": "#f57c00"
}, {
  "name": "Orange 800",
  "value": "#ef6c00"
}, {
  "name": "Orange 900",
  "value": "#e65100"
}], [{
  "name": "Deep Orange 50",
  "value": "#fbe9e7"
}, {
  "name": "Deep Orange 100",
  "value": "#ffccbc"
}, {
  "name": "Deep Orange 200",
  "value": "#ffab91"
}, {
  "name": "Deep Orange 300",
  "value": "#ff8a65"
}, {
  "name": "Deep Orange 400",
  "value": "#ff7043"
}, {
  "name": "Deep Orange 500",
  "value": "#ff5722"
}, {
  "name": "Deep Orange 600",
  "value": "#f4511e"
}, {
  "name": "Deep Orange 700",
  "value": "#e64a19"
}, {
  "name": "Deep Orange 800",
  "value": "#d84315"
}, {
  "name": "Deep Orange 900",
  "value": "#bf360c"
}], [{
  "name": "Brown 50",
  "value": "#efebe9"
}, {
  "name": "Brown 100",
  "value": "#d7ccc8"
}, {
  "name": "Brown 200",
  "value": "#bcaaa4"
}, {
  "name": "Brown 300",
  "value": "#a1887f"
}, {
  "name": "Brown 400",
  "value": "#8d6e63"
}, {
  "name": "Brown 500",
  "value": "#795548"
}, {
  "name": "Brown 600",
  "value": "#6d4c41"
}, {
  "name": "Brown 700",
  "value": "#5d4037"
}, {
  "name": "Brown 800",
  "value": "#4e342e"
}, {
  "name": "Brown 900",
  "value": "#3e2723"
}], [{
  "name": "Grey 50",
  "value": "#fafafa"
}, {
  "name": "Grey 100",
  "value": "#f5f5f5"
}, {
  "name": "Grey 200",
  "value": "#eeeeee"
}, {
  "name": "Grey 300",
  "value": "#e0e0e0"
}, {
  "name": "Grey 400",
  "value": "#bdbdbd"
}, {
  "name": "Grey 500",
  "value": "#9e9e9e"
}, {
  "name": "Grey 600",
  "value": "#757575"
}, {
  "name": "Grey 700",
  "value": "#616161"
}, {
  "name": "Grey 800",
  "value": "#424242"
}, {
  "name": "Grey 900",
  "value": "#212121"
}], [{
  "name": "Blue Grey 50",
  "value": "#eceff1"
}, {
  "name": "Blue Grey 100",
  "value": "#cfd8dc"
}, {
  "name": "Blue Grey 200",
  "value": "#b0bec5"
}, {
  "name": "Blue Grey 300",
  "value": "#90a4ae"
}, {
  "name": "Blue Grey 400",
  "value": "#78909c"
}, {
  "name": "Blue Grey 500",
  "value": "#607d8b"
}, {
  "name": "Blue Grey 600",
  "value": "#546e7a"
}, {
  "name": "Blue Grey 700",
  "value": "#455a64"
}, {
  "name": "Blue Grey 800",
  "value": "#37474f"
}, {
  "name": "Blue Grey 900",
  "value": "#263238"
}], [{
  "name": "Black",
  "value": "#000000"
}, {
  "name": "White",
  "value": "#ffffff"
}]];
exports.MaterialSwatches = MaterialSwatches;
var BootstrapSwatches = [[{
  "name": "Gray Light",
  "value": "#777777"
}, {
  "name": "Base",
  "value": "#000000"
}, {
  "name": "Highlight Blue",
  "value": "#0055cc"
}, {
  "name": "Dark Blue",
  "value": "#005580"
}, {
  "name": "Success Text Green",
  "value": "#468847"
}, {
  "name": "Orange",
  "value": "#f89406"
}, {
  "name": "Red",
  "value": "#9d261d"
}, {
  "name": "Purple",
  "value": "#7a43b6"
}], [{
  "name": "Border Gray",
  "value": "#cccccc"
}, {
  "name": "Gray Darker",
  "value": "#222222"
}, {
  "name": "Primary Blue",
  "value": "#337ab7"
}, {
  "name": "Info Blue",
  "value": "#2f96b4"
}, {
  "name": "Green",
  "value": "#46a546"
}, {
  "name": "Light Orange",
  "value": "#fbb450"
}, {
  "name": "Danger Button Red",
  "value": "#bd362f"
}, {
  "name": "Pink",
  "value": "#c3325f"
}], [{
  "name": "Gray Lighter",
  "value": "#eeeeee"
}, {
  "name": "Gray Dark",
  "value": "#333333"
}, {
  "name": "Link Blue",
  "value": "#0088cc"
}, {
  "name": "Info Light Blue",
  "value": "#5bc0de"
}, {
  "name": "Success Button Green",
  "value": "#62c462"
}, {
  "name": "Yellow",
  "value": "#ffc40d"
}, {
  "name": "Error Text Red",
  "value": "#b94a48"
}, {
  "name": "Danger Highlight Red",
  "value": "#ee5f5b"
}], [{
  "name": "White",
  "value": "#ffffff"
}, {
  "name": "Gray",
  "value": "#555555"
}, {
  "name": "Accent Blue",
  "value": "#049cdb"
}, {
  "name": "Info Lighter Blue",
  "value": "#d9edf7"
}, {
  "name": "Success Background Green",
  "value": "#dff0d8"
}, {
  "name": "Warning Background Brown",
  "value": "#f3edd2"
}, {
  "name": "Warning Text Brown",
  "value": "#c09853"
}, {
  "name": "Danger Background Red",
  "value": "#f2dede"
}]];
exports.BootstrapSwatches = BootstrapSwatches;
var iOsSwatches = [[{
  "name": "Red",
  "value": "#ff3b30"
}, {
  "name": "Orange",
  "value": "#ff9500"
}, {
  "name": "Yellow",
  "value": "#ffcc00"
}, {
  "name": "Green",
  "value": "#4cd964"
}, {
  "name": "Teal Blue",
  "value": "#5ac8fa"
}, {
  "name": "Blue",
  "value": "#007aff"
}, {
  "name": "Purple",
  "value": "#5856d6"
}, {
  "name": "Pink",
  "value": "#ff2d55"
}], [{
  "name": "White",
  "value": "#ffffff"
}, {
  "name": "Custom Gray",
  "value": "#efeff4"
}, {
  "name": "Light Gray",
  "value": "#e5e5ea"
}, {
  "name": "Light Gray 2",
  "value": "#d1d1d6"
}, {
  "name": "Mid Gray",
  "value": "#c7c7cc"
}, {
  "name": "Gray",
  "value": "#8e8e93"
}, {
  "name": "Black",
  "value": "#000000"
}]];
exports.iOsSwatches = iOsSwatches;
_CPCore["default"].install('swatchestable', SwatchesTable);
var _default = SwatchesTable;
exports["default"] = _default;

/***/ }),

/***/ 30947:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


__webpack_require__(46790);
__webpack_require__(65554);
__webpack_require__(3600);
var _ColorPicker = _interopRequireDefault(__webpack_require__(80553));
var _ColorPickerButton = _interopRequireDefault(__webpack_require__(34443));
var _SwatchesTable = _interopRequireDefault(__webpack_require__(97440));
var _SpectrumColor = _interopRequireDefault(__webpack_require__(45284));
var _SolidColorPicker = _interopRequireDefault(__webpack_require__(19315));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
window.absol.coreDom.install({
  colorpicker: _ColorPicker["default"],
  colorpickerbutton: _ColorPickerButton["default"],
  solidcolorpicker: _SolidColorPicker["default"]
});

/***/ }),

/***/ 3600:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CPCore = _interopRequireDefault(__webpack_require__(15050));
__webpack_require__(11523);
__webpack_require__(34443);
var _Color = _interopRequireDefault(__webpack_require__(64974));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var ColorPicker = {
  core: _CPCore["default"],
  _: _CPCore["default"]._,
  $: _CPCore["default"].$,
  creator: _CPCore["default"].creator,
  Color: _Color["default"]
};
var _default = ColorPicker;
exports["default"] = _default;

/***/ }),

/***/ 11523:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


__webpack_require__(70829);
__webpack_require__(31721);
__webpack_require__(83370);
__webpack_require__(501);
__webpack_require__(53934);

/***/ }),

/***/ 5936:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * 
 * @param {Number} start 
 * @param {Number} end 
 */
function Segment(start, end) {
  if (!(this instanceof Segment)) return new Segment(start, end);
  if (!(start <= end)) throw new Error("Invalid range [" + start + ', ' + end + ']');
  this.start = start;
  this.end = end;
}

/**
 * @param {Segment} other
 * @returns {Boolean}
 */
Segment.prototype.isOverlap = function (other) {
  if (this.start > other.end) return false;
  if (this.end < other.start) return false;
  return true;
};

/**
 * @returns {Number}
 */
Segment.prototype.length = function () {
  return this.end - this.start;
};

/**
 * @param {Segment} other
 * @returns {Segment}
 */
Segment.prototype.merge = function (other) {
  return new Segment(Math.min(this.start, other.start), Math.max(this.end, other.end));
};

/**
 * @param {Segment} other
 * @returns {Segment}
 */

Segment.prototype.betweenSegment = function (other) {
  if (this.start >= other.end) return new Segment(other.end, this.start);
  if (this.end <= other.start) return new Segment(this.end, other.start);
  return null;
};

/**
 * @returns {Segment}
 */
Segment.prototype.clone = function () {
  return new Segment(this.start, this.end);
};
var _default = Segment;
exports["default"] = _default;

/***/ }),

/***/ 7622:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Segment = _interopRequireDefault(__webpack_require__(5936));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * 
 * @param {Segment} left 
 * @param {Segment} right 
 */
function Trapezium(left, right, color) {
  if (!(this instanceof Trapezium)) return new Trapezium(left, right, color);
  this.left = left;
  this.right = right;
  this.color = color;
}

/**
 *  @param {Trapezium} other
 * @returns {Trapezium} 
 */
Trapezium.prototype.merge = function (other) {
  return new Trapezium(this.left.merge(other.left), this.right.merge(other.right), this.color);
};

/**
 *  @param {Trapezium} other
 * @returns {Boolean} 
 */
Trapezium.prototype.isOverlap = function (other) {
  return this.right.isOverlap(other.right) && this.left.isOverlap(other.left);
};

/**
 * @returns {Number}
 */
Trapezium.prototype.square = function () {
  return (this.right.length() + this.left.length()) / 2;
};
Trapezium.prototype.clone - function () {
  return new Trapezium(this.left.clone(), this.right.clone(), this.color);
};
var _default = Trapezium;
exports["default"] = _default;

/***/ }),

/***/ 33274:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports._ = exports.$ = void 0;
var _AComp = _interopRequireDefault(__webpack_require__(2515));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var Core = new _Dom["default"]();
Core.install(_AComp["default"].core);
var _ = Core._;
exports._ = _;
var $ = Core.$;
exports.$ = $;
var _default = Core;
exports["default"] = _default;

/***/ }),

/***/ 66189:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(28737);
var _Core = _interopRequireDefault(__webpack_require__(33274));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;

/***
 * extends {AElement}
 * @constructor
 */
function MBlinkModal() {
  this.$attachhook = _('attachhook');
  this.$attachhook.requestUpdateSize = this.updateSize.bind(this);
  this.$attachhook.addTo(this).on('error', function () {
    _Dom["default"].addToResizeSystem(this);
    this.requestUpdateSize();
  });
  this._show = false;
  this.show = false;
}
MBlinkModal.tag = 'MBlinkModal'.toLowerCase();
MBlinkModal.render = function () {
  return _({
    "class": 'am-blink-modal'
  });
};
MBlinkModal.prototype.clearChild = function () {
  var child = Array.prototype.slice(this.childNodes);
};
MBlinkModal.prototype.updateSize = function () {
  this.removeClass('am-animation');
  var bound = this.getBoundingClientRect();
  this.addStyle('--hide-top', -(bound.height + 2) + 'px');
  this.addClass('am-animation');
};
MBlinkModal.property = {};
MBlinkModal.property.show = {
  set: function set(value) {
    this._show = !!value;
    if (this._show) {
      this.addClass('am-show');
    } else {
      this.removeClass('am-show');
    }
  },
  get: function get() {
    return this._show;
  }
};
MBlinkModal.newInstance = function (instanceData) {
  instanceData = instanceData || {};
  instanceData.duration = instanceData.duration || 2000;
  var modal = _(Object.assign({
    tag: 'mblinkmodal'
  }, instanceData || {}));
  var state = 0; //not attach

  function waitToRemove() {
    setTimeout(function () {
      if (state !== 3) return;
      state = 4;
      modal.selfRemove();
    }, 300);
  }
  function waitToShow() {
    setTimeout(function () {
      if (state !== 1) return;
      state = 2;
      modal.show = true;
      waitToClose(instanceData.duration);
    }, 1);
  }
  function waitToClose(mil) {
    if (state === 2) {
      setTimeout(function () {
        if (state !== 2) return;
        state = 3;
        modal.show = false;
        waitToRemove();
      }, mil);
    }
  }
  modal.addTo(document.body);
  modal.$attachhook.once('attached', function () {
    state = 1; //attached
    waitToShow();
  });
  return {
    modal: modal,
    close: waitToClose.bind(null, 100)
  };
};
_Core["default"].install(MBlinkModal);
var _default = MBlinkModal;
exports["default"] = _default;

/***/ }),

/***/ 42499:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(62314);
var _Core = _interopRequireDefault(__webpack_require__(33274));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _stringGenerate = __webpack_require__(10713);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;
function MBottomTabbar() {
  this._items = [];
  this.$row = $('.am-bottom-tabbar-content-row', this);
  this.$itemDict = {};
  this.$line = $('.am-bottom-tabbar-line', this);
  this.$attachhook = _('attachhook').addTo(this);
  this.$attachhook.requestUpdateSize = this.updateSize.bind(this);
  this.$attachhook.on('error', function () {
    _Dom["default"].addToResizeSystem(this);
  });
  this.$activeItem = null;
  this.$subActiveItem = null;
}
MBottomTabbar.tag = 'MBottomTabbar'.toLowerCase();
MBottomTabbar.render = function () {
  return _({
    "class": 'am-bottom-tabbar',
    extendEvent: 'change',
    child: ['.am-bottom-tabbar-line', {
      "class": 'am-bottom-tabbar-content',
      child: '.am-bottom-tabbar-content-row'
    }]
  });
};
MBottomTabbar.prototype.getItemEltByValue = function (value) {
  return this.$itemDict[value];
};
MBottomTabbar.prototype.modifyItem = function (itemValue, propertyName, newValue) {
  if (this.$itemDict[itemValue]) this.$itemDict[itemValue].data[propertyName] = newValue;
};
MBottomTabbar.prototype.getItem = function (itemValue) {
  if (this.$itemDict[itemValue]) return this.$itemDict[itemValue].data;
  return null;
};
MBottomTabbar.prototype.updateSize = function () {
  this.updateLinePosition();
};
MBottomTabbar.prototype.notifyChange = function () {
  this.emit('change', {
    target: this,
    value: this._value
  }, this);
};
MBottomTabbar.prototype.updateLinePosition = function () {
  if (this.$activeItem) {
    var bound = this.getBoundingClientRect();
    var iBound = this.$activeItem.getBoundingClientRect();
    this.$line.addStyle({
      width: iBound.width + 'px',
      left: iBound.left - bound.left + 'px'
    });
  } else {
    this.$line.addStyle('width', '0');
  }
};
MBottomTabbar.prototype._makeSubItem = function (data, parentElt) {
  var self = this;
  var itemElt = _({
    "class": 'am-bottom-tabbar-item',
    child: [data.icon, '.am-bottom-tabbar-item-counter'],
    props: {
      parentItemElt: parentElt
    }
  });
  itemElt.attr('tabindex', 1);
  this.$itemDict[data.value] = itemElt;
  var counterElt = $('.am-bottom-tabbar-item-counter', itemElt);
  var counter = data.counter;
  if (!data.__bindCounter__) {
    Object.defineProperties(data, {
      __dataBinding__: {
        value: true,
        writable: false,
        enumerable: false
      },
      counter: {
        set: function set(value) {
          counter = value;
          if (value >= 0) {
            if (value > 9) {
              counterElt.innerHTML = '9+';
            } else if (value > 0) {
              counterElt.innerHTML = value;
            } else {
              counterElt.innerHTML = '';
            }
          } else {
            if (value) counterElt.innerHTML = value + "";else counterElt.innerHTML = '';
          }
          if (parentElt.$subItems && parentElt.data) {
            parentElt.data.counter = parentElt.data.items.reduce(function (ac, cr) {
              return ac + (cr.counter || 0);
            }, 0);
          }
        },
        get: function get() {
          return counter;
        }
      }
    });
  }
  data.counter = counter;
  itemElt.data = data;
  function onPress() {
    if (self._value !== data.value) {
      parentElt.lastSubValue = data.value;
      self.value = data.value;
      self.notifyChange();
    }
  }
  itemElt.on('touchstart', onPress, true);
  itemElt.on('pointerdown', onPress, true);
  return itemElt;
};
MBottomTabbar.prototype._makeItem = function (data) {
  var self = this;
  var itemElt = _({
    "class": 'am-bottom-tabbar-item',
    child: [data.icon, '.am-bottom-tabbar-item-counter']
  });
  itemElt.attr('tabindex', 1);
  if (!('value' in data)) data.value = (0, _stringGenerate.randomIdent)();
  this.$itemDict[data.value] = itemElt;
  var subItemCtn;
  var counterElt = $('.am-bottom-tabbar-item-counter', itemElt);
  var counter = data.counter;
  if (data.items && data.items.length > 0) {
    var onPress = function onPress(event) {
      isTouch = event.type === 'touchstart';
      lastTimeFocus = new Date().getTime();
      subItemCtn.addClass('am-prepare-appear');
      // self.addChildAfter(subItemCtn, null);
      document.body.appendChild(subItemCtn);
      setTimeout(function () {
        subItemCtn.removeClass('am-prepare-appear').addClass('am-appear');
      }, 3);
      itemElt.off('touchstart', onPress).off('mousedown', onPress);
      setTimeout(function () {
        itemElt.on('touchstart', onRepress)
        // .on('mousedown', onRepress)
        .on('blur', onRepress);
      }, 100);
    };
    var onRepress = function onRepress(event) {
      if (isTouch && event.type === 'mousedown') return;
      subItemCtn.removeClass('am-appear').addClass('am-prepare-disappear');
      setTimeout(function () {
        subItemCtn.removeClass('am-prepare-disappear').remove();
      }, 205);
      itemElt.off('touchstart', onRepress)
      // .off('mousedown', onRepress)
      .off('blur', onRepress);
      setTimeout(function () {
        itemElt.on('touchstart', onPress);
        // .on('mousedown', onPress);
      }, 100);
    };
    itemElt.lastSubValue = data.items[0].value;
    itemElt.$subItems = data.items.map(function (sItem) {
      return this._makeSubItem(sItem, itemElt);
    }.bind(this));
    counter = data.items.reduce(function (ac, cr) {
      return ac + (cr.counter || 0);
    }, 0);
    subItemCtn = _({
      "class": 'am-bottom-tabbar-sub-item-ctn',
      child: {
        "class": 'am-bottom-tabbar-sub-item-box',
        child: itemElt.$subItems
      }
    });
    var lastTimeFocus = 0;
    var isTouch;
    itemElt.on('touchstart', onPress);
    // .on('mousedown', onPress);
  }

  if (!data.__bindCounter__) {
    Object.defineProperties(data, {
      __dataBinding__: {
        value: true,
        writable: false,
        enumerable: false
      },
      counter: {
        set: function set(value) {
          counter = value;
          if (value >= 0) {
            if (value > 9) {
              counterElt.innerHTML = '9+';
            } else if (value > 0) {
              counterElt.innerHTML = value;
            } else {
              counterElt.innerHTML = '';
            }
          } else {
            if (value) counterElt.innerHTML = value + "";else counterElt.innerHTML = '';
          }
        },
        get: function get() {
          return counter;
        }
      }
    });
  }
  data.counter = counter;
  itemElt.data = data;
  itemElt.on('click', function () {
    if (data.items && data.items.length > 0) {
      if (self.$itemDict[self._value] && self.$itemDict[self._value].parentItemElt !== itemElt) {
        self.value = itemElt.lastSubValue;
        self.notifyChange();
      }
    } else if (self._value !== data.value) {
      self.value = data.value;
      self.notifyChange();
    }
  });
  return itemElt;
};
MBottomTabbar.property = {};

/**
 * @type {MBottomTabbar}
 */
MBottomTabbar.property.items = {
  set: function set(items) {
    items = items || [];
    this._items = items;
    this.$row.clearChild();
    this.$itemDict = {};
    this.$activeItem = null;
    this.$itemDict = {};
    for (var i = 0; i < items.length; ++i) {
      this._makeItem(items[i]).addTo(this.$row);
    }
    if (items && items.length > 0) {
      if (this.$itemDict[this._value]) {
        this.value = this._value;
      } else {
        this.value = items[0].value;
      }
    }
  },
  get: function get() {
    return this._items;
  }
};

/**
 * @type {MBottomTabbar}
 */
MBottomTabbar.property.value = {
  set: function set(value) {
    this._value = value;
    if (this.$activeItem) {
      this.$activeItem.removeClass('am-active');
      this.$activeItem = null;
    }
    if (this.$subActiveItem) {
      this.$subActiveItem.removeClass('am-active');
      this.$subActiveItem = null;
    }
    this.$activeItem = this.$itemDict[value];
    if (this.$activeItem && this.$activeItem.parentItemElt) {
      this.$subActiveItem = this.$activeItem;
      this.$activeItem = this.$activeItem.parentItemElt;
    }
    if (this.$activeItem) {
      this.$activeItem.addClass('am-active');
    }
    if (this.$subActiveItem) {
      this.$subActiveItem.addClass('am-active');
    }
    this.updateLinePosition();
  },
  get: function get() {
    return this._value;
  }
};
_Core["default"].install(MBottomTabbar);
var _default = MBottomTabbar;
exports["default"] = _default;

/***/ }),

/***/ 34759:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Board = _interopRequireDefault(__webpack_require__(67711));
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _Core = _interopRequireWildcard(__webpack_require__(33274));
__webpack_require__(43937);
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _Hanger = _interopRequireDefault(__webpack_require__(63561));
var _EventEmitter = __webpack_require__(46833);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends AElement
 * @constructor
 */
function MCabinetItem() {
  this._content = null;
  this.$content = (0, _Core.$)('.am-cabinet-item-content', this);
  this.$body = (0, _Core.$)('.am-cabinet-item-body', this).on('predrag', this.eventHandler.bodyPredrag).on('touchstart', this.eventHandler.bodyMouseDown).on('touchend', this.eventHandler.bodyMouseUp).on('dragstart', this.eventHandler.bodyDragStart).on('dragend', this.eventHandler.bodyDragEnd).on('drag', this.eventHandler.bodyDrag);
  this.$quickmenuBtn = (0, _Core.$)('.am-cabinet-item-quick-menu-btn', this);
  this.$right = (0, _Core.$)('.am-cabinet-item-right-action-ctn', this);
  this.$drag = (0, _Core.$)('.am-cabinet-item-drag', this).on('touchstart', function () {
    if (MCabinetItem.$openingItem) {
      MCabinetItem.$openingItem.resetView();
      MCabinetItem.$openingItem = null;
    }
  });
  this.$searchInput = null;
  this._quickmenu = null;
  this.commandViewState = 0;
  this._makeQuickMenu();
}
MCabinetItem.tag = 'MCabinetItem'.toLowerCase();
MCabinetItem.render = function () {
  return (0, _Core._)({
    tag: _Board["default"].tag,
    extendEvent: ['click', 'action'],
    "class": 'am-cabinet-item',
    child: [{
      tag: _Hanger["default"].tag,
      "class": ['am-cabinet-item-body'],
      props: {
        hangOn: 10
      },
      child: [{
        "class": ['am-cabinet-item-drag', _BoardTable["default"].DRAG_ZONE_CLASS_NAME],
        child: '<i class="material-icons drag-icon-button">drag_indicator</i>'
      }, {
        "class": ['am-cabinet-item-content']
      }, {
        "class": 'am-cabinet-item-quick-menu-ctn',
        child: {
          tag: 'button',
          "class": 'am-cabinet-item-quick-menu-btn',
          child: '<i class="material-icons">more_horiz</i>'
        }
      }]
    }, {
      "class": 'am-cabinet-item-right-action-ctn'
    }]
  });
};
['addChild', 'removeChild', 'addChildBefore', 'addChildAfter', 'clearChild', 'findChildBefore', 'findChildAfter'].forEach(function (name) {
  MCabinetItem.prototype[name] = function () {
    this.$content[name].apply(this.$content, arguments);
  };
});
MCabinetItem.prototype._makeQuickMenu = function () {
  var self = this;
  this.quickmenuHolder = _QuickMenu["default"].toggleWhenClick(this.$quickmenuBtn, {
    getAnchor: function getAnchor() {
      return [3, 4, 13, 14];
    },
    getMenuProps: function getMenuProps() {
      return self._quickmenu && self._quickmenu.props;
    },
    onOpen: function onOpen() {
      self.resetView();
    },
    onClose: function onClose() {},
    onSelect: function onSelect(item) {
      if (self._quickmenu.onSelect) {
        self._quickmenu.onSelect.call(this, item);
      }
    }
  });
};
MCabinetItem.prototype._makeActionBtn = function (data) {
  var btn = (0, _Core._)({
    tag: 'button',
    "class": 'am-cabinet-item-action',
    on: {
      click: function (event) {
        this.resetView();
        this.emit('action', {
          type: 'action',
          originalEvent: event,
          action: data
        }, this);
      }.bind(this)
    }
  });
  if (data.text) {
    btn.addChild((0, _Core._)({
      text: data.text
    }));
  } else if (data.icon) {
    btn.addChild((0, _Core._)(data.icon));
  }
  return btn;
};
MCabinetItem.prototype.getChildren = function () {
  return this.$body.childNodes;
};
MCabinetItem.prototype.resetView = function () {
  this.$body.addStyle('left', 0 + 'px');
  this.commandViewState = 0;
  this.$quickmenuBtn.removeStyle('opacity').removeStyle('pointer-events');
};
MCabinetItem.prototype.getSearchingText = function () {
  var parts = [];
  function visit(node) {
    if (node.nodeType === 3) {
      parts.push(node.data);
    } else if (node.nodeType === 1) {
      if (node.tagName === 'BUTTON') return;
      if (node.tagName === 'INPUT') {
        parts.push(node.value);
      }
      Array.prototype.forEach.call(node.childNodes, visit);
    }
  }
  visit(this.$content);
  parts = parts.filter(function (p) {
    return !!p;
  });
  return parts.join(' ');
};
MCabinetItem.prototype.selfRemove = function () {
  var parent = this.parentElement;
  if (!parent) return;
  if (parent.hasClass('am-cabinet-list-searching-items-ctn')) {
    parent = parent.parentElement;
  }
  parent.removeChild(this);
};
MCabinetItem.property = {};
MCabinetItem.property.quickmenu = {
  set: function set(value) {
    this._quickmenu = value;
    if (value) {
      this.addClass('am-has-quick-menu');
    } else {
      this.removeClass('am-has-quick-menu');
    }
  },
  get: function get() {
    return this._quickmenu;
  }
};
MCabinetItem.property.rightActions = {
  set: function set(value) {
    value = value || [];
    this._rightActions = value;
    this.$right.clearChild().addChild(value.map(function (data) {
      return this._makeActionBtn(data);
    }.bind(this)));
  },
  get: function get() {
    return this._rightActions;
  }
};
MCabinetItem.property.draggable = {
  set: function set(value) {
    if (this.parentElement && this.parentElement.classList.contains('as-board-table')) {
      console.warn("Don't set draggable after MCabinetItem attached!");
    }
    if (value) {
      this.addClass('as-board');
    } else {
      this.removeClass('as-board');
    }
  },
  get: function get() {
    return this.hasClass('as-board');
  }
};
MCabinetItem.property.content = {
  set: function set(value) {
    value = value || null;
    this._content = value;
    this.$content.clearChild();
    if (!value) return;
    if (value instanceof Array) {
      this.$content.addChild(value.map(function (c) {
        return (0, _Core._)(c);
      }));
    } else {
      this.$content.addChild((0, _Core._)(value));
    }
  },
  get: function get() {
    return this._content;
  }
};

/***
 * @memberOf MCabinetItem#
 * @type {{}}
 */
MCabinetItem.eventHandler = {};

/**
 * @this MCabinetItem
 * @param event
 */
MCabinetItem.eventHandler.bodyMouseUp = function (event) {
  if (this._waitClick) {
    this.emit('click', event, this);
  }
};

/**
 * @this MCabinetItem
 * @param event
 */
MCabinetItem.eventHandler.bodyMouseDown = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$quickmenuBtn, event)) return;
  this._waitClick = true;
};

/**
 * @this MCabinetItem
 * @param event
 */
MCabinetItem.eventHandler.bodyPredrag = function (event) {
  if ((0, _EventEmitter.hitElement)(this.$drag, event)) {
    event.cancel();
  }
};

/**
 * @this MCabinetItem
 * @param event
 */
MCabinetItem.eventHandler.bodyDragStart = function (event) {
  _QuickMenu["default"].close(true);
  this._bodyDraging = false;
  this._rightWidth = this.$right.getBoundingClientRect().width;
  this._waitClick = false;
  if (this._rightWidth === 0) return;
  var d = event.currentPoint.sub(event.startingPoint);
  if (Math.abs(d.x) <= Math.abs(d.y)) return;
  if (this.commandViewState === 0) {
    if (d.x < 0) {
      if (MCabinetItem.$openingItem) {
        MCabinetItem.$openingItem.resetView();
      }
      MCabinetItem.$openingItem = this;
      this._bodyDraging = true;
      this._x0 = 0;
      this.commandViewState = -1;
      this.$body.addStyle('left', d.x + 'px');
    }
  } else if (this.commandViewState === -1) {
    if (d.x > 0) {
      this._bodyDraging = true;
      this.commandViewState = 0;
      this._x0 = -this._rightWidth;
      this.$body.addStyle('left', this._rightWidth - d.x + 'px');
    }
  }
  setTimeout(function () {
    this.addClass('as-dragging');
  }.bind(this), 5);
};

/**
 * @this MCabinetItem
 * @param event
 */
MCabinetItem.eventHandler.bodyDrag = function (event) {
  if (!this._bodyDraging) return;
  var d = event.currentPoint.sub(event.startingPoint);
  var x = this._x0 + d.x;
  this.$body.addStyle('left', x + 'px');
  if (-x > this._rightWidth) {
    this.$right.addStyle('width', -x + 'px');
  }
  this.$quickmenuBtn.addStyle('opacity', 1 - Math.max(0, Math.min(1, -x / this._rightWidth)) + '');
};

/**
 * @this MCabinetItem
 * @param event
 */
MCabinetItem.eventHandler.bodyDragEnd = function (event) {
  if (!this._bodyDraging) return;
  this._bodyDraging = false;
  this.removeClass('as-dragging');
  if (this.commandViewState === 0) {
    this.$right.addStyle('width', this._rightWidth + 'px');
    this.$body.addStyle('left', 0 + 'px');
    if (MCabinetItem.$openingItem === this) MCabinetItem.$openingItem = null;
    this.$quickmenuBtn.removeStyle('opacity').removeStyle('pointer-events');
  } else {
    this.$right.addStyle('width', this._rightWidth + 'px');
    this.$body.addStyle('left', -this._rightWidth + 'px');
    this.$quickmenuBtn.addStyle('opacity', 0 + '').addStyle('pointer-events', 'none');
  }
  setTimeout(function () {
    this.$right.removeStyle('width');
  }.bind(this), 110);
};
_Core["default"].install(MCabinetItem);
var _default = MCabinetItem;
exports["default"] = _default;

/***/ }),

/***/ 81227:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _BoardTable = _interopRequireDefault(__webpack_require__(76372));
var _Core = _interopRequireWildcard(__webpack_require__(33274));
var _search = _interopRequireWildcard(__webpack_require__(67858));
var _MCabinetItem = _interopRequireDefault(__webpack_require__(34759));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends BoardTable
 * @constructor
 */
function MCabinetList() {
  this.on('dragitemstart', this.eventHandler.dragItemStart);
  /***
   * @type {boolean}
   * @name searching
   * @memberOf MCabinetList#
   */
}

MCabinetList.tag = 'MCabinetList'.toLowerCase();
MCabinetList.render = function () {
  return (0, _Core._)({
    tag: _BoardTable["default"].tag,
    extendEvent: ['searchstart', 'searchend'],
    "class": 'am-cabinet-list'
  });
};

/****
 * @memberOf MCabinetList#
 * @type {{}}
 */
MCabinetList.eventHandler = {};
MCabinetList.eventHandler.dragItemStart = function () {
  var bound = this.getBoundingClientRect();
  this.addStyle('--am-cabinet-list-bound-left', bound.left + 'px');
};
MCabinetList.prototype.getChildren = function () {
  if (this.searching) return this.$items;
  return Array.prototype.slice.call(this.childNodes);
};
MCabinetList.prototype.clearChild = function () {
  if (this.searching) {
    this.$items = [];
    this._cache = {};
    this._searchingItems = [];
    this.eventHandler.searchModify(null);
    return this;
  } else {
    while (this.firstChild) {
      this.firstChild.remove();
    }
    this._childHolders = [];
    return this;
  }
};
MCabinetList.prototype.removeChild = function (elt) {
  var idx;
  if (this.searching) {
    idx = this.$items.indexOf(elt);
    if (idx < 0) return this;
    this.$items.splice(idx, 1);
    this._searchingItems.splice(idx, 1);
    this._cache = {};
    elt.remove();
    this.eventHandler.searchModify(null);
  } else {
    _BoardTable["default"].prototype.removeChild.call(this, elt);
  }
  return this;
};
MCabinetList.prototype.addChild = function (elt) {
  if (elt instanceof Array) {
    elt.forEach(function (it) {
      this.addChild(it);
    }.bind(this));
    return this;
  }
  if (this.searching) {
    this.$items.push(elt);
    this._searchingItems.push((0, _search["default"])({
      text: elt.getSearchingText(),
      value: elt
    }));
    this.eventHandler.searchModify(null);
  } else {
    _BoardTable["default"].prototype.addChild.call(this, elt);
  }
};
MCabinetList.prototype.addChildBefore = function (elt, bf) {
  elt.selfRemove();
  var idx;
  if (this.searching) {
    if (!bf) {
      this.$items.push(elt);
      this._searchingItems.push((0, _search["default"])({
        text: elt.getSearchingText(),
        value: elt
      }));
    } else {
      idx = this.$items.indexOf(bf);
      if (idx >= 0) {
        this.$items.splice(idx, 0, elt);
        this._searchingItems.splice(idx, 0, (0, _search["default"])({
          text: elt.getSearchingText(),
          value: elt
        }));
      } else {
        throw new Error("Failed to execute 'addChildAfter' on 'Node': The node before which the new node is to be inserted is not a child of this node.");
      }
    }
    this.eventHandler.searchModify(null);
  } else {
    _BoardTable["default"].prototype.addChildBefore.call(this, elt, bf);
  }
};
MCabinetList.prototype.addChildAfter = function (elt, at) {
  elt.selfRemove();
  var idx;
  if (this.searching) {
    if (!at) {
      this.$items.unshift(elt);
      this._searchingItems.unshift((0, _search["default"])({
        text: elt.getSearchingText(),
        value: elt
      }));
    } else {
      idx = this.$items.indexOf(at);
      if (idx >= 0) {
        this.$items.splice(idx + 1, 0, elt);
        this._searchingItems.splice(idx + 1, 0, (0, _search["default"])({
          text: elt.getSearchingText(),
          value: elt
        }));
      } else {
        throw new Error("Failed to execute 'addChildAfter' on 'Node': The node before which the new node is to be inserted is not a child of this node.");
      }
    }
    this.eventHandler.searchModify(null);
  } else {
    _BoardTable["default"].prototype.addChildBefore.call(this, elt, at);
  }
};
MCabinetList.prototype.findChildBefore = function (elt) {
  if (this.searching) {
    return this.$items[this.$items.indexOf(elt) - 1] || null;
  } else {
    return _BoardTable["default"].prototype.findChildBefore.call(this, elt);
  }
};
MCabinetList.prototype.findChildAfter = function (elt) {
  if (this.searching) {
    return this.$items[this.$items.indexOf(elt) + 1] || null;
  } else {
    return _BoardTable["default"].prototype.findChildBefore.call(this, elt);
  }
};
MCabinetList.property = {};
MCabinetList.property.draggable = {
  set: function set(value) {
    if (value) {
      this.addClass('am-draggable');
    } else {
      this.removeClass('am-draggable');
    }
  },
  get: function get() {
    return this.hasClass('am-draggable');
  }
};

/***
 * @this MCabinetList
 * @param searchInputElt
 */
MCabinetList.prototype.attachSearchInput = function (searchInputElt) {
  if (this.$searchInput) {
    this.$searchInput.off('stoptyping', this.eventHandler.searchModify);
  }
  this.$searchInput = searchInputElt;
  if (this.$searchInput) {
    if (this.$searchInput.$list) {
      this.$searchInput.off('stoptyping', this.$searchInput.$list.eventHandler.searchModify);
    }
    this.$searchInput.$list = this;
    this.$searchInput.on('stoptyping', this.eventHandler.searchModify);
  }
};

/***
 * @this MCabinetList
 * @param event
 */
MCabinetList.eventHandler.searchModify = function (event) {
  if (_MCabinetItem["default"].$openingItem) {
    _MCabinetItem["default"].$openingItem.resetView();
    _MCabinetItem["default"].$openingItem = null;
  }
  var query = this.$searchInput.value;
  query = query.trim();
  if (query.length === 0 && this.hasClass('am-searching')) {
    this.$searchingItemsCtn.remove();

    //pure add
    this._childHolders = [];
    this.$items.forEach(function (e) {
      this.appendChild(e);
      if (e.draggable) {
        this._childHolders.push({
          elt: e
        });
      }
    }.bind(this));
    this.removeClass('am-searching');
    this.emit('searchend', {
      type: 'searchend',
      target: this
    }, this);
  } else if (!this.hasClass('am-searching') && query.length > 0) {
    this.$searchingItemsCtn = this.$searchingItemsCtn || (0, _Core._)('.am-cabinet-list-searching-items-ctn');
    this.cache = {};
    this._searchingItems = Array.prototype.map.call(this.childNodes, function (elt) {
      return (0, _search["default"])({
        text: elt.getSearchingText(),
        value: elt
      });
    });
    this.$items = Array.prototype.slice.call(this.childNodes);
    this.addClass('am-searching');
    //dom clear
    this.innerHTML = '';
    this._childHolders = [];
    this.appendChild(this.$searchingItemsCtn);
    this.emit('searchstart', {
      type: 'searchstart',
      target: this
    }, this);
  }
  if (query.length === 0) return;
  var resultItems = this.cache[query] || (0, _search.searchListByText)(query, this._searchingItems);
  var resultEltList = resultItems.map(function (it) {
    return it.value;
  });
  this.$searchingItemsCtn.clearChild().addChild(resultEltList);
};
MCabinetList.prototype.addInputSearch = MCabinetList.prototype.attachSearchInput;
MCabinetList.prototype.addSearchBox = MCabinetList.prototype.attachSearchInput;
MCabinetList.property.searching = {
  get: function get() {
    return this.hasClass('am-searching');
  }
};
_Core["default"].install(MCabinetList);
var _default = MCabinetList;
exports["default"] = _default;

/***/ }),

/***/ 62303:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Core = _interopRequireWildcard(__webpack_require__(33274));
var _MCabinetTreeNode = _interopRequireDefault(__webpack_require__(60164));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _search = _interopRequireDefault(__webpack_require__(67858));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function MCabinetTree() {
  this.$node = (0, _Core.$)(_MCabinetTreeNode["default"].tag, this).on('toggle', this.eventHandler.toggle).on('click', this.eventHandler.click);
  this.$children = (0, _Core.$)('.am-cabinet-tree-children', this);
  _OOP["default"].drillProperty(this, this.$node, ['content', 'quickmenu']);

  /***
   * @type {number}
   * @name level
   * @memberOf MCabinetTree#
   */
}

MCabinetTree.tag = 'MCabinetTree'.toLowerCase();
MCabinetTree.render = function () {
  return (0, _Core._)({
    extendEvent: ['click'],
    "class": 'am-cabinet-tree',
    child: [{
      tag: _MCabinetTreeNode["default"].tag
    }, {
      "class": 'am-cabinet-tree-children'
    }]
  });
};
MCabinetTree.prototype._updateChildClass = function () {
  if (this.$children.childNodes.length > 0) {
    this.addClass('am-has-children');
  } else {
    this.removeClass('am-has-children');
  }
};
MCabinetTree.prototype.addChild = function (child) {
  if (child && child.forEach) {
    child.forEach(function (c) {
      this.addChild(c);
    }.bind(this));
    return this;
  }
  this.$children.addChild(child);
  child.level = this.level + 1;
  this._updateChildClass();
};
MCabinetTree.prototype.getSearchingItem = function () {
  var text = this.$node.getSearchingText();
  var value = this;
  var items = Array.prototype.map.call(this.$children.childNodes, function (subTree) {
    return subTree.getSearchingItem();
  });
  var res = {
    text: text,
    value: value
  };
  if (items.length > 0) res.items = items;
  return (0, _search["default"])(res);
};
MCabinetTree.property = {};
MCabinetTree.property.level = {
  set: function set(value) {
    this.$node.level = value;
    Array.prototype.forEach.call(this.$children.childNodes, function (treeElt) {
      treeElt.level = value + 1;
    });
  },
  get: function get() {
    return this.$node.level;
  }
};
MCabinetTree.property.opened = {
  set: function set(value) {
    if (value) {
      this.addClass('am-opened');
    } else {
      this.removeClass('am-opened');
    }
  },
  get: function get() {
    return this.hasClass('am-opened');
  }
};

/***
 * @memberOf MCabinetTree#
 * @type {{}}
 */
MCabinetTree.eventHandler = {};
MCabinetTree.eventHandler.toggle = function (event) {
  this.opened = !this.opened;
};
MCabinetTree.eventHandler.click = function (event) {
  this.emit('click', event, this);
};
_Core["default"].install(MCabinetTree);
var _default = MCabinetTree;
exports["default"] = _default;

/***/ }),

/***/ 7983:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Core = _interopRequireWildcard(__webpack_require__(33274));
var _MCabinetList = _interopRequireDefault(__webpack_require__(81227));
var _Searcher = _interopRequireDefault(__webpack_require__(47106));
var _search = __webpack_require__(67858);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function MCabinetTreeList() {
  /***
   *
   * @type {null|SearchTextInput}
   */
  this.$searchInput = null;
  this._searchCache = {};
}
MCabinetTreeList.tag = 'MCabinetTreeList'.toLowerCase();
MCabinetTreeList.render = function () {
  return (0, _Core._)({
    "class": 'am-cabinet-tree-list',
    child: []
  });
};
MCabinetTreeList.prototype.attachSearchInput = _MCabinetList["default"].prototype.attachSearchInput;
MCabinetTreeList.prototype.addInputSearch = MCabinetTreeList.prototype.attachSearchInput;
MCabinetTreeList.prototype.addSearchBox = MCabinetTreeList.prototype.attachSearchInput;

/***
 * @type {{}}
 * @memberOf MCabinetTreeList#
 */
MCabinetTreeList.eventHandler = {};
MCabinetTreeList.eventHandler.searchModify = function (event) {
  var query = this.$searchInput.value;
  query = query.trim();
  if (this.$orderingNodes) {
    this.$orderingNodes.forEach(function (nodeElt) {
      nodeElt.removeClass('am-in-search-result').removeStyle('order');
    });
    if (this.$orderingNodes[0]) {
      this.$orderingNodes[0].removeClass('am-first-result');
    }
  }
  this.$orderingNodes = null;
  if (this.hasClass('am-searching') && query.length === 0) {
    this.removeClass('am-searching');
    return;
  } else if (!this.hasClass('am-searching') && query.length > 0) {
    this._searchCache = {};
    this.addClass('am-searching');
  }
  this._searchCache[' all '] = this._searchCache[' all '] || Array.prototype.map.call(this.childNodes, function (tree) {
    return tree.getSearchingItem();
  });
  this._searchCache[query] = this._searchCache[query] || (0, _search.searchTreeListByText)(query, this._searchCache[' all ']);
  var orderingNodes = [];
  this._searchCache[query].forEach(function visit(item, i) {
    item.value.addClass('am-in-search-result').addStyle('order', i);
    orderingNodes.push(item.value);
    if (item.items && item.items.length > 0) item.items.forEach(visit);
  });
  if (orderingNodes[0]) {
    orderingNodes[0].addClass('am-first-result');
  }
  this.$orderingNodes = orderingNodes;
};
_Core["default"].install(MCabinetTreeList);
var _default = MCabinetTreeList;
exports["default"] = _default;

/***/ }),

/***/ 60164:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Core = _interopRequireWildcard(__webpack_require__(33274));
__webpack_require__(43937);
__webpack_require__(56685);
var _MCabinetItem = _interopRequireDefault(__webpack_require__(34759));
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElement
 * @constructor
 */
function MCabinetTreeNode() {
  this._level = 0;
  this.$content = (0, _Core.$)('.am-cabinet-tree-node-content', this);
  this.$body = (0, _Core.$)('.am-cabinet-tree-node-body', this);
  this.$toggleCtn = (0, _Core.$)('.am-cabinet-tree-node-toggle-ctn', this);
  this.addEventListener('click', this.eventHandler.click);
  this.$quickmenuBtn = (0, _Core.$)('.am-cabinet-item-quick-menu-btn', this);
  this._makeQuickMenu();
  /***
   * @type {number}
   * @name level
   * @memberOf MCabinetTreeNode#
   */
}

MCabinetTreeNode.tag = 'MCabinetTreeNode'.toLowerCase();
MCabinetTreeNode.render = function () {
  return (0, _Core._)({
    extendEvent: ['click', 'toggle'],
    "class": 'am-cabinet-tree-node',
    child: [{
      "class": 'am-cabinet-tree-node-body',
      child: [{
        "class": 'am-cabinet-tree-node-toggle-ctn',
        child: ['span.mdi.mdi-chevron-right']
      }, {
        "class": 'am-cabinet-tree-node-content'
      }, {
        "class": 'am-cabinet-tree-node-quick-menu-ctn',
        child: {
          tag: 'button',
          "class": 'am-cabinet-item-quick-menu-btn',
          child: '<i class="material-icons">more_horiz</i>'
        }
      }]
    }]
  });
};
MCabinetTreeNode.prototype._makeQuickMenu = _MCabinetItem["default"].prototype._makeQuickMenu;
MCabinetTreeNode.prototype.getSearchingText = _MCabinetItem["default"].prototype.getSearchingText;
MCabinetTreeNode.prototype.resetView = _noop["default"];
MCabinetTreeNode.property = {};
MCabinetTreeNode.property.content = _MCabinetItem["default"].property.content;
MCabinetTreeNode.property.quickmenu = _MCabinetItem["default"].property.quickmenu;
MCabinetTreeNode.property.level = {
  set: function set(value) {
    this._level = value;
    this.$body.addStyle('--level-padding', value * 1.5 + 'em');
  },
  get: function get() {
    return this._level;
  }
};

/***
 * @memberOf MCabinetTreeNode#
 * @type {{}}
 */
MCabinetTreeNode.eventHandler = {};

/***
 * @this MCabinetTreeNode
 * @param event
 */
MCabinetTreeNode.eventHandler.click = function (event) {
  var c = event.target;
  while (c) {
    if (c === this) break;
    if (c === this.$toggleCtn) {
      this.emit('toggle', {
        type: 'toggle',
        target: this,
        originalEvent: event
      }, this);
      this.opened = !this.opened;
      return;
    }
    if (c.tagName === 'INPUT') return;
    if (c.tagName === 'BUTTON') return;
    if (typeof c.checked === "boolean") return;
    if (typeof c.value !== 'undefined') return;
    if (c.isInput) return;
    c = c.parentElement;
  }
  this.emit('click', {
    type: 'click',
    target: this,
    originalEvent: event
  }, this);
};
_Core["default"].install(MCabinetTreeNode);
var _default = MCabinetTreeNode;
exports["default"] = _default;

/***/ }),

/***/ 72067:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Core = _interopRequireWildcard(__webpack_require__(33274));
var _MSelectListItem = _interopRequireDefault(__webpack_require__(63516));
var _CheckboxButton = _interopRequireDefault(__webpack_require__(93475));
__webpack_require__(45053);
var _CheckListItem = _interopRequireDefault(__webpack_require__(27129));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/****
 * @extends MSelectListItem
 * @constructor
 */
function MChecklistItem() {
  this.$checkbox = (0, _Core.$)('.am-selectlist-item-check-ctn > ' + _CheckboxButton["default"].tag, this).on('change', this.eventHandler.checkboxChange);
  _MSelectListItem["default"].call(this);
  this.on('click', this.eventHandler.clickText);
}
MChecklistItem.tag = 'MChecklistItem'.toLowerCase();
MChecklistItem.property = Object.assign({}, _MSelectListItem["default"].property);
MChecklistItem.render = function () {
  return (0, _Core._)({
    extendEvent: ['change', 'select'],
    "class": 'am-selectlist-item',
    child: [{
      "class": 'am-selectlist-item-check-ctn',
      child: {
        tag: _CheckboxButton["default"].tag
      }
    }, {
      "class": 'am-selectlist-item-text-ctn',
      child: {
        tag: 'span',
        "class": 'am-selectlist-item-text',
        child: {
          text: ''
        }
      }
    }, {
      "class": 'am-selectlist-item-desc-ctn',
      child: {
        tag: 'span',
        "class": 'am-selectlist-item-desc',
        child: {
          text: ''
        }
      }
    }]
  });
};
MChecklistItem.eventHandler = {};
MChecklistItem.eventHandler.clickText = _CheckListItem["default"].eventHandler.clickText;
MChecklistItem.eventHandler.checkboxChange = _CheckListItem["default"].eventHandler.checkboxChange;
MChecklistItem.property.selected = _CheckListItem["default"].property.selected;
_Core["default"].install(MChecklistItem);
var _default = MChecklistItem;
exports["default"] = _default;

/***/ }),

/***/ 84267:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.makeItem = makeItem;
exports.measureListSize = measureListSize;
exports.releaseItem = releaseItem;
exports.requireItem = requireItem;
var _MListModal = _interopRequireDefault(__webpack_require__(57305));
var _Core = _interopRequireWildcard(__webpack_require__(33274));
var _SelectList = __webpack_require__(884);
var _MChecklistItem = _interopRequireDefault(__webpack_require__(72067));
var _CheckListBox = _interopRequireDefault(__webpack_require__(62896));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function measureListSize(items) {
  var descWidth = (0, _SelectList.measureMaxDescriptionWidth)(items);
  var textWidth = (0, _SelectList.measureMaxTextWidth)(items);
  var width = descWidth + 20 + textWidth + 12 + 15 + 18; //padding, margin
  return {
    width: width,
    descWidth: descWidth,
    textWidth: textWidth
  };
}
var itemPool = [];
function onClickItem(event) {
  var thisSL = this.$parent;
  if (thisSL) {
    thisSL.eventHandler.selectItem(this, event);
  }
}

/**
 * @returns {MSelectListItem}
 */
function makeItem() {
  return (0, _Core._)({
    tag: _MChecklistItem["default"],
    on: {
      select: onClickItem
    }
  });
}
function requireItem($parent) {
  var item;
  if (itemPool.length > 0) {
    item = itemPool.pop();
  } else {
    item = makeItem();
  }
  item.$parent = $parent;
  return item;
}
function releaseItem(item) {
  item.$parent = null;
  item.attr('class', 'am-selectlist-item');
  item.selected = false;
  itemPool.push(item);
}

/***
 * @extends MListModal
 * @constructor
 */
function MChecklistModal() {
  this._initFooter();
  _MListModal["default"].call(this);
}
MChecklistModal.tag = 'MChecklistModal'.toLowerCase();
Object.assign(MChecklistModal.prototype, _MListModal["default"].prototype);
MChecklistModal.property = Object.assign({}, _MListModal["default"].property);
MChecklistModal.eventHandler = Object.assign({}, _MListModal["default"].eventHandler);
MChecklistModal.render = function () {
  return (0, _Core._)({
    extendEvent: ['change', 'pressclose', 'pressout', 'cancel'],
    "class": 'am-list-modal',
    child: [{
      "class": ['am-list-popup-box'],
      child: [{
        "class": 'am-list-popup-header',
        child: [{
          tag: 'searchtextinput'
        }, {
          tag: 'button',
          "class": 'am-list-popup-close-btn',
          child: 'span.mdi.mdi-close'
        }]
      }, {
        "class": 'am-list-popup-list-scroller',
        child: {
          "class": 'am-list-popup-content',
          child: Array(this.prototype.preLoadN).fill('.am-list-popup-list-page.am-selectlist.am-check-list')
        }
      }, {
        "class": 'as-dropdown-box-footer',
        child: [{
          tag: 'checkbox',
          "class": 'as-select-list-box-check-all',
          props: {
            checked: false,
            text: 'Check All'
          }
        }, {
          "class": 'as-dropdown-box-footer-right',
          child: {
            tag: 'a',
            "class": 'as-select-list-box-cancel-btn',
            child: {
              text: 'Cancel'
            }
          }
        }]
      }]
    }]
  });
};
MChecklistModal.prototype._requireItem = function (pageElt, n) {
  var itemElt;
  while (pageElt.childNodes.length > n) {
    itemElt = pageElt.lastChild;
    itemElt.selfRemove();
    releaseItem(itemElt);
  }
  while (pageElt.childNodes.length < n) {
    itemElt = requireItem(this);
    pageElt.addChild(itemElt);
  }
};
MChecklistModal.prototype._initFooter = _CheckListBox["default"].prototype._initFooter;
MChecklistModal.property.values = {
  set: function set(value) {
    _MListModal["default"].property.values.set.apply(this, arguments);
    console.log(this._values.length, this.items.length);
    this.$checkAll.checked = this._values.length === this.items.length;
  },
  get: _CheckListBox["default"].property.values.get
};
MChecklistModal.property.items = {
  set: function set(value) {
    _MListModal["default"].property.items.set.apply(this, arguments);
    this.$checkAll.checked = this._values.length === this._items.length;
  },
  get: _CheckListBox["default"].property.items.get
};
MChecklistModal.eventHandler.selectItem = function (itemElt, event) {
  var selected = itemElt.selected;
  var data = itemElt.data;
  var value = itemElt.value;
  var idx;
  if (selected) {
    this._valueDict[value + ''] = true;
    this._values.push(value);
  } else {
    delete this._valueDict[value + ''];
    idx = this._values.indexOf(value);
    if (idx >= 0) this._values.splice(idx, 1);
    this.$checkAll.checked = false;
  }
  this.emit('change', {
    type: 'change',
    target: this,
    itemElt: this,
    value: value,
    data: data,
    itemData: data,
    action: selected ? "check" : "uncheck",
    originalEvent: event.originalEvent || event.originEvent || event
  });
};
MChecklistModal.eventHandler.checkAllChange = _CheckListBox["default"].eventHandler.checkAllChange;
MChecklistModal.eventHandler.clickCancelBtn = _CheckListBox["default"].eventHandler.clickCancelBtn;
_Core["default"].install(MChecklistModal);
var _default = MChecklistModal;
exports["default"] = _default;

/***/ }),

/***/ 73114:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(29778);
var _Core = _interopRequireDefault(__webpack_require__(33274));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _ = _Core["default"]._;
var $ = _Core["default"].$;
function MConversation() {
  this._name = '';
  this._shortContent = '';
  this._time = '';
  this._avatarSrc = null;
  this.$name = $('.am-conversation-name', this);
  this.$shortContent = $('.am-conversation-short-content', this);
  this.$time = $('span.am-conversation-time', this);
  this.$counter = $('.am-conversation-counter', this);
  this.$avatar = $('.am-conversation-avatar', this);
  _OOP["default"].drillProperty(this, this.$counter, 'counter', 'innerHTML');
  _OOP["default"].drillProperty(this, this.$avatar, 'avatarSrc', 'src');
  _OOP["default"].drillProperty(this, this.$avatar, 'onlineStatus', 'status');
}
MConversation.tag = 'MConversation'.toLowerCase();
MConversation.render = function () {
  return _({
    "class": 'am-conversation',
    child: [{
      "class": 'am-conversation-avatar-ctn',
      child: 'mcircleavatar.am-conversation-avatar'
    }, {
      "class": 'am-conversation-body',
      child: ['.am-conversation-name', '.am-conversation-short-content']
    }, {
      "class": 'am-conversation-time-ctn',
      child: 'span.am-conversation-time'
    }, {
      "class": 'am-conversation-counter'
    }, '.am-conversation-bottom-line']
  });
};
MConversation.property = {};

/**
 * @type {MConversation}
 */
MConversation.property.name = {
  set: function set(value) {
    value = value || '';
    this.$name.clearChild();
    if (value) {
      this.$name.addChild(_({
        text: value
      }));
    }
    this._name = value;
  },
  get: function get() {
    return this._name;
  }
};

/**
 * @type {MConversation}
 */
MConversation.property.time = {
  set: function set(value) {
    value = value || '';
    this.$time.clearChild().addChild(_({
      text: value
    }));
    this._time = value;
  },
  get: function get() {
    return this._time;
  }
};

/**
 * @type {MConversation}
 */
MConversation.property.shortContent = {
  set: function set(value) {
    if (_typeof(value) == 'object') {
      this.$shortContent.clearChild().addChild(_(value));
    } else {
      this.$shortContent.innerHTML = value + '';
    }
    this._shortContent = value;
  },
  get: function get() {
    return this._shortContent;
  }
};

/**
 * @type {MConversation}
 */
MConversation.property.unread = {
  set: function set(value) {
    if (value) {
      this.addClass('am-status-unread');
    } else {
      this.removeClass('am-status-unread');
    }
  },
  get: function get() {
    return this.containsClass('am-status-unread');
  }
};
_Core["default"].install(MConversation);
var _default = MConversation;
exports["default"] = _default;

/***/ }),

/***/ 67819:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(86099);
var _Core = _interopRequireDefault(__webpack_require__(33274));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;

/***
 *  @extends AElement
 * @constructor
 */
function MHSnapScroller() {
  this.addClass('am-h-snap-scroller');
  //still fail on iOS, disable all
  // this.on('touchstart', this.eventHandler.touchstart);
  // this.on('touchend', this.eventHandler.touchend);
  // this.on('scroll', this.eventHandler.scroll);
  this._scroll = {
    speed: 0,
    lastEventTime: 0,
    homeGoing: false,
    release: true,
    homeX: 0,
    x: 0,
    scrollEnded: true
  };
}
MHSnapScroller.tag = 'MHSnapScroller'.toLowerCase();
MHSnapScroller.render = function () {
  return _({});
};
MHSnapScroller.prototype._findHomeX = function () {
  var bound = this.getBoundingClientRect();
  var centerX = (bound.left + bound.right) / 2;
  var eBounds = Array.prototype.map.call(this.childNodes, function (elt) {
    return elt.getBoundingClientRect();
  }).filter(function (bound) {
    return bound.width > 0;
  });
  var scrollLeft = this.scrollLeft;
  var nearestX = Infinity;
  var nextX = Infinity;
  var childCenterX;
  for (var i = 0; i < eBounds.length; ++i) {
    childCenterX = (eBounds[i].left + eBounds[i].right) / 2;
    if (Math.abs(childCenterX - centerX) < Math.abs(nearestX - centerX)) {
      nearestX = childCenterX;
    }
    if (childCenterX - centerX >= 0 == this._scroll.speed >= 0) {
      if (Math.abs(childCenterX - centerX) < Math.abs(nextX - centerX)) {
        nextX = childCenterX;
      }
    }
  }
  if (nearestX - centerX >= 0 != this._scroll.speed >= 0 && nextX != Infinity) {
    nearestX = nextX;
  }
  return Math.max(0, Math.min(this.scrollWidth - this.clientWidth, scrollLeft + (nearestX - centerX)));
};
MHSnapScroller.prototype.startHomeGoing = function () {
  if (this._scroll.homeGoing || !this._scroll.release || !this._scroll.scrollEnded) return;
  var homeX = this._findHomeX();
  this._scroll.homeX = homeX;
  this._scroll.homeGoing = true;
  if (this._scroll.speed < 50 && this._scroll.speed >= 0) {
    this._scroll.speed = 50;
  } else if (this._scroll.speed > -50 && this._scroll.speed < 0) {
    this._scroll.speed = -50;
  }
  this.eventHandler.homeGoingTick();
};
MHSnapScroller.prototype.stopHomeGoing = function () {
  if (!this._scroll.homeGoing) return;
  this._scroll.homeGoing = false;
};

/***
 *
 * @type {{}|MHSnapScroller}
 */
MHSnapScroller.eventHandler = {};
MHSnapScroller.eventHandler.homeGoingTick = function (toFinish) {
  if (!this._scroll.homeGoing) return;
  if (toFinish === true) {
    this.stopHomeGoing();
    return;
  }
  var last = this._scroll.lastEventTime;
  var now = new Date().getTime();
  var dt = (now - last) / 1000;
  var dx = dt * this._scroll.speed;
  var limitDx = this._scroll.homeX - this._scroll.x;
  var needContinue = false;
  if (Math.abs(dx) >= Math.abs(limitDx) || dx * limitDx <= 0) {
    this._scroll.x = this._scroll.homeX;
  } else {
    this._scroll.x += dx;
    needContinue = true;
  }
  this.scrollLeft = this._scroll.x;
  if (needContinue) requestAnimationFrame(this.eventHandler.homeGoingTick);else requestAnimationFrame(this.eventHandler.homeGoingTick.bind(this, true));
};
MHSnapScroller.eventHandler.stopScroll = function () {
  this._scroll.scrollEnded = true;
  this.startHomeGoing();
};

/***
 *
 * @param {TouchEvent} event
 */
MHSnapScroller.eventHandler.touchstart = function (event) {
  this.stopHomeGoing();
  this._scroll.release = false;
};

/***
 *
 * @param {TouchEvent} event
 */
MHSnapScroller.eventHandler.touchend = function (event) {
  if (event.touches.length === 0) {
    this._scroll.release = true;
    this.startHomeGoing();
  }
};
MHSnapScroller.eventHandler.scroll = function () {
  if (this._scroll.homeGoing) return;
  var last = this._scroll.lastEventTime;
  this._scroll.scrollEnded = false;
  var now = new Date().getTime();
  if (now - last > 100) {
    this._scroll.speed = 0;
    this._scroll.lastEventTime = now;
    this._scroll.x = this.scrollLeft;
  } else if (now > last) {
    this._scroll.speed = (this.scrollLeft - this._scroll.x) * 1000 / (now - last);
    this._scroll.lastEventTime = now;
    this._scroll.x = this.scrollLeft;
  }
  if (this._scroll.stopTimeout > 0) {
    clearTimeout(this._scroll.stopTimeout);
  }
  this._scroll.stopTimeout = setTimeout(this.eventHandler.stopScroll, 30);
};
var _default = MHSnapScroller;
exports["default"] = _default;

/***/ }),

/***/ 72162:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(51231);
var _Core = _interopRequireDefault(__webpack_require__(33274));
var _QuickMenu = _interopRequireDefault(__webpack_require__(8277));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;
function MHeaderBar() {
  this._title = null;
  this._titleDesc = null;
  this._actionIcon = null;
  this._commands = [];
  this._quickmenuHolder = null;
  this._quickmenu = null;
  this.$right = $('.am-header-bar-right', this);
  this.$leftBtn = null;
  this.$titleCtn = null;
  this.$title = null;
  this.$titleDesc = null;
  this.$commands = [];
}
MHeaderBar.tag = 'MHeaderBar'.toLowerCase();
MHeaderBar.render = function () {
  return _({
    extendEvent: ['action', 'command'],
    "class": 'am-header-bar',
    child: [{
      "class": 'am-header-bar-right'
    }]
  });
};
MHeaderBar.prototype.notifyAction = function () {
  this.emit('action', {
    type: 'action',
    target: this
  }, this);
};
MHeaderBar.prototype.notifyCommand = function (commandItem) {
  this.emit('command', {
    type: 'command',
    target: this,
    commandName: commandItem.name,
    commandItem: commandItem
  }, this);
};
MHeaderBar.prototype.showTitle = function (flag) {
  if (!this.$titleCtn && flag) {
    this.$titleCtn = _({
      "class": 'am-header-bar-title-ctn',
      child: [{
        "class": 'am-header-bar-no-size-wrapper',
        child: {
          "class": 'am-header-bar-title-wrapper',
          child: [{
            "class": 'am-header-bar-title'
          }, {
            "class": 'am-header-bar-title-desc'
          }]
        }
      }]
    });
    this.$title = $('.am-header-bar-title', this.$titleCtn);
    this.$titleDesc = $('.am-header-bar-title-desc', this.$titleCtn);
  }
  if (flag) {
    this.insertBefore(this.$titleCtn, this.$right);
  } else {
    if (this.$titleCtn) this.$titleCtn.remove();
  }
};
MHeaderBar.prototype.showActionBtn = function (flag) {
  if (!this.$leftBtn && flag) {
    this.$leftBtn = _({
      tag: 'button',
      "class": 'am-header-bar-left-btn',
      child: 'span.mdi.mdi-chevron-left',
      on: {
        click: this.notifyAction.bind(this)
      }
    });
  }
  if (flag) {
    this.insertBefore(this.$leftBtn, this.firstChild);
  } else {
    if (this.$leftBtn) this.$leftBtn.remove();
  }
};
MHeaderBar.prototype.showQuickMenu = function (flag) {
  if (!this.$quickmenuBtn && flag) {
    this.$quickmenuBtn = _({
      tag: 'button',
      "class": ['am-header-bar-action', 'am-header-bar-quickmenu-btn'],
      child: {
        "class": 'am-header-bar-quickmenu-btn-circle',
        child: ['span.mdi.mdi-dots-horizontal-circle-outline', 'span.mdi.mdi-dots-horizontal-circle']
      }
    });
  }
  if (flag) {
    this.$right.addChild(this.$quickmenuBtn);
  } else {
    if (this.$quickmenuBtn) this.$quickmenuBtn.remove();
  }
};
MHeaderBar.prototype._makeCommandBtn = function (item) {
  return _({
    tag: 'button',
    "class": 'am-header-bar-command',
    child: item.icon || [],
    on: {
      click: this.notifyCommand.bind(this, item)
    }
  });
};
MHeaderBar.property = {};

/**
 * @type {MHeaderBar}
 */
MHeaderBar.property.quickmenu = {
  set: function set(value) {
    if (this._quickmenuHolder) {
      this._quickmenuHolder.remove();
      this._quickmenu = null;
    }
    if (value) {
      this.showQuickMenu(true);
      var button = this.$quickmenuBtn;
      var onClose = value.onClose;
      var onOpen = value.onOpen;
      value.onOpen = function () {
        button.addClass('am-status-active');
        onOpen && onOpen.apply(this, arguments);
      };
      value.onClose = function () {
        button.removeClass('am-status-active');
        onClose && onClose.apply(this, arguments);
      };
      if (!value.getAnchor) {
        value.getAnchor = function () {
          return [2];
        };
      }
      if (!value.getMenuProps && value.props) {
        value.getMenuProps = function () {
          var res = Object.assign({}, value.props);
          if (typeof res.items === "function") {
            res.items = res.items();
          }
          return res;
        };
      }
      this._quickmenuHolder = _QuickMenu["default"].toggleWhenClick(this.$quickmenuBtn, value);
    } else {
      this.showQuickMenu(false);
      value = null;
    }
    this._quickmenu = value;
  },
  get: function get() {
    return this._quickmenu;
  }
};

/**
 * @type {MHeaderBar}
 */
MHeaderBar.property.title = {
  set: function set(value) {
    if (value) {
      this.showTitle(true);
      if (typeof value === 'string') {
        this.$title.innerHTML = value;
      } else {
        this.$title.clearChild().addChild(_(value));
      }
    } else {
      this.showTitle(false);
      value = null;
    }
    this._title = value;
  },
  get: function get() {
    return this._title;
  }
};

/**
 * @type {MHeaderBar}
 */
MHeaderBar.property.titleDesc = {
  set: function set(value) {
    if (value) {
      value = value + '';
      this.showTitle(true);
      this.$titleDesc.clearChild().addChild(_({
        text: value
      }));
    } else {
      this.showTitle(false);
      if (this.$titleDesc) this.$titleDesc.clearChild();
      value = null;
    }
    this._titleDesc = value;
  },
  get: function get() {
    return this._titleDesc;
  }
};

/**
 * @type {MHeaderBar}
 */
MHeaderBar.property.actionIcon = {
  set: function set(value) {
    if (value) {
      this.showActionBtn(true);
      this.$leftBtn.clearChild().addChild(_(value));
    } else {
      this.showActionBtn(false);
      value = null;
    }
    this._actionIcon = value;
  },
  get: function get() {
    return this._actionIcon;
  }
};

/**
 * @type {MHeaderBar}
 */
MHeaderBar.property.commands = {
  set: function set(value) {
    this.$commands.forEach(function (e) {
      e.selftRemove();
    });
    this.$commands = [];
    var commandBtn;
    if (value) {
      var firstChild = this.$right.firstChild;
      if (firstChild) {
        for (var i = 0; i < value.length; ++i) {
          commandBtn = this._makeCommandBtn(value[i]);
          this.$right.addChildBefore(commandBtn, firstChild);
        }
      } else {
        for (var i = 0; i < value.length; ++i) {
          commandBtn = this._makeCommandBtn(value[i]);
          this.$right.addChild(commandBtn);
        }
      }
    } else {
      this._commands = [];
    }
    this._commands = value;
  },
  get: function get() {
    return this._commands;
  }
};
_Core["default"].install(MHeaderBar);
var _default = MHeaderBar;
exports["default"] = _default;

/***/ }),

/***/ 75943:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(85300);
var _Core = _interopRequireDefault(__webpack_require__(33274));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;
function MLeftNavigator() {
  this.on('dragstart', this.eventHandler.modalDragStart).on('drag', this.eventHandler.modalDrag).on('dragend', this.eventHandler.modalDragEnd);
  this.$content = $('.am-navigator-content', this);
  this.$modal = $('.am-navigator-modal', this);
  this._contentWidth = 0;
  this._speedTimeout = -1;
  this._dragSpeed = 0;
  this._preDragTime = 0;
  this._state = -1;
  this._preventDrag = false;
}
MLeftNavigator.tag = 'MLeftNavigator'.toLowerCase();
MLeftNavigator.render = function () {
  return _({
    tag: 'hanger',
    "class": 'am-navigator',
    child: ['.am-navigator-modal', '.am-navigator-content'],
    props: {
      hangOn: 9
    }
  });
};
['addChild', 'addChildBefore', 'addChildAfter', 'clearChild', 'findChildBefore', 'findChildAfter', 'removeChild'].forEach(function (key) {
  MLeftNavigator.prototype[key] = function () {
    return this.$content[key].apply(this.$content, arguments);
  };
});
MLeftNavigator.prototype.getChildNodes = function () {
  return this.$modal.childNodes;
};
MLeftNavigator.prototype.open = function (v0) {
  if (this._state == 1) return;
  v0 = v0 || 1000;
  v0 = Math.max(400, Math.min(4000, v0));
  var ctBound = this.$content.getBoundingClientRect();
  var dx = -ctBound.left;
  var dt = Math.sqrt(2 * dx / v0) / 2;
  this.$content.addStyle('transition', 'right ease-out ' + dt + 's');
  this.$modal.addStyle('transition', 'opacity ease-out ' + dt + 's');
  this.$content.addStyle('right', 'calc(100% - ' + ctBound.width + 'px)');
  this.$modal.addStyle('opacity', '0.5');
  this.addClass('am-open');
  var thisnm = this;
  this._state = -1;
  thisnm.$modal.on('click', thisnm.eventHandler.clickModal);
  setTimeout(function () {
    thisnm._state = 1;
    thisnm.$content.removeStyle('transition');
    thisnm.$modal.removeStyle('transition');
  }, dt * 1000 + 1);
};
MLeftNavigator.prototype.close = function (v0) {
  if (this._state == -1) return;
  this.$modal.off('click', this.eventHandler.clickModal);
  v0 = v0 || 0;
  v0 = v0 || 1000;
  v0 = Math.max(400, Math.min(4000, v0));
  var ctBound = this.$content.getBoundingClientRect();
  var dx = ctBound.right;
  var dt = Math.sqrt(2 * dx / v0) / 2;
  this.$content.addStyle('transition', 'right ease-out ' + dt + 's');
  this.$modal.addStyle('transition', 'opacity ease-out ' + dt + 's');
  this.$content.addStyle('right', '100%');
  setTimeout(this.$modal.addStyle.bind(this.$modal, 'opacity', '0.001'), 4);
  // this.$modal.addStyle('opacity', '0.001');

  var thisnm = this;
  this._state = 0;
  setTimeout(function () {
    thisnm._state = -1;
    thisnm.$content.removeStyle('transition');
    thisnm.$modal.removeStyle('transition');
    thisnm.removeClass('am-open');
  }, dt * 1000 + 1);
};

/** 
 * @type {MLeftNavigator}
 */
MLeftNavigator.eventHandler = {};
MLeftNavigator.eventHandler.modalDragStart = function (event) {
  this.$modal.off('click', this.eventHandler.clickModal);
  this._contentWidth = this.$content.getBoundingClientRect().width;
  this._prevState = this._state;
  this._preDragTime = new Date().getTime();
  this._preMoveDistance = 0;
  this._dragSpeed = 0;
  this._preX = event.clientX;
  var moveVec = event.currentPoint.sub(event.startingPoint);
  if (Math.abs(moveVec.x) > Math.abs(moveVec.y)) {
    this.addClass('am-dragging');
    event.preventDefault();
    this._preventDrag = false;
  } else {
    this._preventDrag = true;
  }
};
MLeftNavigator.eventHandler.modalDrag = function (event) {
  if (this._preventDrag) return;
  var thisnm = this;
  var now = new Date().getTime();
  if (now - this._preDragTime > 10) {
    var dt = now - this._preDragTime;
    this._dragSpeed = (event.clientX - this._preX) * 1000 / dt;
    this._preDragTime = now;
    this._preX = event.clientX;
  }
  if (this._speedTimeout > 0) {
    this._speedTimeout = -1;
  }
  this._speedTimeout = setTimeout(function () {
    thisnm._dragSpeed = 0;
  }, 200);
  var moveVec = event.currentPoint.sub(event.startingPoint);
  var dx;
  if (this._state != 0) {
    event.preventDefault();
    if (this._state == -1) {
      dx = Math.max(0, Math.min(moveVec.x, this._contentWidth));
    } else if (this._state == 1) {
      dx = Math.max(0, Math.min(this._contentWidth + moveVec.x, this._contentWidth));
    }
    this.$content.addStyle({
      right: 'calc(100% - ' + dx + 'px)'
    });
    this.$modal.addStyle('opacity', dx / this._contentWidth / 2 + '');
  }

  // this.$modal.addStyle('opacity', dx / this._contentWidth / 2 +'')
};

MLeftNavigator.eventHandler.clickModal = function (event) {
  if (event.target == this.$modal) this.close();
};

/**
 * throwing_speed 400px/s
 * 
 */
MLeftNavigator.eventHandler.modalDragEnd = function () {
  if (this._preventDrag) {
    this._preventDrag = false;
  } else {
    this.removeClass('am-dragging');
    this._state = 0; //animating state
    var ctBound = this.$content.getBoundingClientRect();
    if (this._dragSpeed > -200 || ctBound.right > ctBound.width / 2 && this._dragSpeed >= 0) {
      this.open(this._dragSpeed);
    } else if (this._dragSpeed < -200 || ctBound.right < ctBound.width / 2 && this._dragSpeed <= 0) {
      this.close(-this._dragSpeed);
    } else {
      if (this._prevState == 1) this.open();else if (this._prevState == -1) this.close();
    }
  }
};
_Core["default"].install(MLeftNavigator);
var _default = MLeftNavigator;
exports["default"] = _default;

/***/ }),

/***/ 57305:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var _exportNames = {};
Object.defineProperty(exports, "default", ({
  enumerable: true,
  get: function get() {
    return _MListModal["default"];
  }
}));
var _MListModal = _interopRequireWildcard(__webpack_require__(11032));
Object.keys(_MListModal).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _MListModal[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function get() {
      return _MListModal[key];
    }
  });
});
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

/***/ }),

/***/ 82566:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(64194);
var _Core = _interopRequireDefault(__webpack_require__(33274));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _MMatMenuItem = _interopRequireDefault(__webpack_require__(10399));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;
function MMatMenu() {}
MMatMenu.tag = 'MMatMenu'.toLowerCase();
MMatMenu.render = function () {
  return _({
    extendEvent: ['press'],
    "class": 'am-mat-menu'
  });
};
MMatMenu.prototype.notifyPress = function (args) {
  this.emit('press', Object.assign({
    target: this,
    type: 'press'
  }, args || {}), this);
};
MMatMenu.property = {};
MMatMenu.property.items = {
  set: function set(items) {
    items = items || [];
    this.clearChild();
    var item;
    var itemElt;
    for (var i = 0; i < items.length; ++i) {
      item = items[i];
      itemElt = _({
        tag: 'mmatmenuitem',
        props: Object.assign({}, item),
        on: {
          press: this.eventHandler.itemPress
        }
      });
      this.addChild(itemElt);
    }
  },
  get: function get() {
    return Array.map.call(this.childNodes, function (elt) {
      return {
        text: elt.text,
        items: elt.items,
        icon: elt.icon
      };
    });
  }
};

/***
 * @type {MMatMenuItem}
 */
MMatMenu.eventHandler = {};
MMatMenu.eventHandler.itemPress = function (event) {
  this.notifyPress(event);
};
_Core["default"].install(MMatMenu);
var _default = MMatMenu;
exports["default"] = _default;

/***/ }),

/***/ 3702:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(64194);
var _Core = _interopRequireDefault(__webpack_require__(33274));
var _MMdiRect = _interopRequireDefault(__webpack_require__(29001));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;
function MMatMenuButton() {
  this.$toggleIcon = $('.am-mat-menu-button-toggle-icon-ctn span.mdi.mdi-chevron-right', this);
  this.$icon = null;
  this.$iconCtn = $('.am-mat-menu-button-icon-ctn', this);
  this.$text = $('.am-mat-menu-button-text', this);
  this.icon = {
    tag: 'mmdirect',
    props: {
      iconName: "home"
    }
  };
  this._status = 'none';
  this._level = 0;
  this.$level = $('.am-mat-menu-button-level', this);
}
MMatMenuButton.tag = 'MMatMenuButton'.toLowerCase();
MMatMenuButton.render = function () {
  return _({
    tag: 'button',
    "class": 'am-mat-menu-button',
    child: [{
      "class": 'am-mat-menu-button-level'
    }, {
      "class": 'am-mat-menu-button-icon-ctn'
    }, {
      tag: 'span',
      "class": 'am-mat-menu-button-text',
      child: {
        text: 'Trang chủ'
      }
    }, {
      "class": 'am-mat-menu-button-toggle-icon-ctn',
      child: 'span.mdi.mdi-chevron-right'
    }]
  });
};
MMatMenuButton.property = {};

/**
 * @type {MMatMenuButton}
*/
MMatMenuButton.property.level = {
  set: function set(value) {
    value = Math.max(0, value || 0);
    this.$level.innerHTML = '&nbsp;'.repeat(value * 4);
    this.attr('data-level', value);
  },
  get: function get() {
    return this._level;
  }
};

/**
 * @type {MMatMenuButton}
*/
MMatMenuButton.property.status = {
  set: function set(value) {
    this.removeClass('am-status-open').removeClass('am-status-close');
    if (value == 'open') {
      this.$toggleIcon.addClass('mdi-rotate-90');
      this.addClass('am-status-open');
    } else if (value == 'close') {
      this.$toggleIcon.removeClass('mdi-rotate-90');
      this.addClass('am-status-close');
    } else {
      value = 'none';
    }
    this._status = value;
  },
  get: function get() {
    return this._status;
  }
};

/**
 * @type {MMatMenuButton}
*/
MMatMenuButton.property.icon = {
  set: function set(value) {
    value = value || null;
    if (this.$icon) {
      this.$icon.remove();
    }
    if (value) {
      this.$icon = _(value).addTo(this.$iconCtn);
    }
  },
  get: function get() {
    return this._icon;
  }
};

/**
 * @type {MMatMenuButton}
*/
MMatMenuButton.property.text = {
  set: function set(value) {
    this.$text.firstChild.data = value;
  },
  get: function get() {
    return this.$text.firstChild.data;
  }
};
_Core["default"].install(MMatMenuButton);
var _default = MMatMenuButton;
exports["default"] = _default;

/***/ }),

/***/ 10399:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(64194);
var _Core = _interopRequireDefault(__webpack_require__(33274));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;
function MMatMenuItem() {
  this.$node = $('mmatmenubutton', this).on('click', this.eventHandler.clickNode);
  _OOP["default"].drillProperty(this, this.$node, ['icon', 'text']);
  /**
   * @type {import('./MMatMenu').default}
   */
  this.$matmenu = $('mmatmenu', this).on('press', this.eventHandler.itemPress);
  this.$dropdown = $('.am-mat-menu-dropdown', this);
}
MMatMenuItem.tag = 'MMatMenuItem'.toLowerCase();
MMatMenuItem.render = function () {
  return _({
    extendEvent: ['press'],
    "class": 'am-mat-menu-item',
    child: [{
      tag: 'mmatmenubutton'
    }, {
      "class": 'am-mat-menu-dropdown',
      child: {
        tag: 'mmatmenu'
      }
    }]
  });
};
MMatMenuItem.prototype.getNode = function () {
  return this.$node;
};
MMatMenuItem.prototype.openChild = function () {
  this.$node.status = 'open';
  this.addClass('am-status-open');
  var menuBound = this.$matmenu.getBoundingClientRect();
  this.$dropdown.addStyle('max-height', menuBound.height + 2 + 'px');
};
MMatMenuItem.prototype.closeChild = function () {
  this.$node.status = 'close';
  this.removeClass('am-status-open');
  this.$dropdown.removeStyle('max-height');
};
MMatMenuItem.prototype.toggleChild = function () {
  if (this.$node.status == 'open') {
    this.closeChild();
  } else if (this.$node.status == 'close') {
    this.openChild();
  }
};
MMatMenuItem.prototype.notifyPress = function (args) {
  this.emit('press', Object.assign({
    target: this,
    type: 'press',
    item: this,
    menuItem: this
  }, args || {}), this);
};
MMatMenuItem.property = {};
MMatMenuItem.property.items = {
  set: function set(items) {
    items = items || [];
    if (items.length > 0) this.$node.status = 'close';else this.$node.status = 'none';
    this.$matmenu.items = items;
    this.level = this.level; // update
  },

  get: function get() {
    return this.$matmenu.items;
  }
};
MMatMenuItem.property.level = {
  set: function set(value) {
    this.$node.level = value;
    value = this.$node.level;
    for (var i = 0; i < this.$matmenu.childNodes.length; ++i) {
      this.$matmenu.childNodes[i].level = value + 1;
    }
  },
  get: function get() {
    return this.$node.level;
  }
};

/**
 * @type {MMatMenuItem}
 */
MMatMenuItem.eventHandler = {};
MMatMenuItem.eventHandler.clickNode = function (event) {
  if (this.$node.status == 'none') {
    //todo
    this.notifyPress();
  } else {
    this.toggleChild();
  }
};
MMatMenuItem.eventHandler.itemPress = function (event) {
  this.notifyPress(event);
};
_Core["default"].install(MMatMenuItem);
var _default = MMatMenuItem;
exports["default"] = _default;

/***/ }),

/***/ 29001:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(6913);
var _Core = _interopRequireDefault(__webpack_require__(33274));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;
function MMdiRect() {
  this.$icon = $('.am-mdi-rect-icon', this);
  this._iconName = undefined;
}
MMdiRect.tag = 'MMdiRect'.toLowerCase();
MMdiRect.render = function () {
  return _({
    "class": 'am-mdi-rect',
    child: 'span.mdi.am-mdi-rect-icon'
  });
};
MMdiRect.property = {};

/**
 * @type {MMdiRect}
 */
MMdiRect.property.iconName = {
  set: function set(value) {
    value = value || null;
    if (this._iconName) this.$icon.removeClass('mdi-' + this._iconName);
    this._iconName = value;
    if (this._iconName) this.$icon.addClass('mdi-' + this._iconName);
  },
  get: function get() {
    return this._iconName;
  }
};
MMdiRect.attribute = {};
MMdiRect.attribute.iconName = {
  set: function set(value) {
    this.iconName = value;
  },
  get: function get() {
    return this.iconName;
  },
  remove: function remove() {
    this.iconName = undefined;
  }
};
_Core["default"].install(MMdiRect);
var _default = MMdiRect;
exports["default"] = _default;

/***/ }),

/***/ 21558:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(37907);
var _Core = _interopRequireDefault(__webpack_require__(33274));
var _utils = __webpack_require__(84512);
var _MMessageTool = _interopRequireDefault(__webpack_require__(14230));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;

/***
 * @extends MessageInput
 * @constructor
 */
function MMessageInput() {
  this.autoSend = true;
  this.$left = _('.am-message-input-left').addTo(this);
  this.$moreBtn = _({
    tag: 'button',
    "class": ['as-message-input-plugin-btn', 'am-message-input-plugin-more'],
    child: 'span.mdi.mdi-plus'
  }).addTo(this.$left).on('click', this.eventHandler.clickMore);
  this.$cameraBtn = _({
    tag: 'button',
    "class": ['as-message-input-plugin-btn', 'am-message-input-plugin-camera'],
    child: 'span.mdi.mdi-camera-outline'
  }).on('click', this.eventHandler.clickCameraBtn);
  this.$right = $('.as-message-input-right', this);
  this.$right.addChildBefore(this.$cameraBtn, this.$fileBtn);
}
MMessageInput.tag = 'mmessageinput';
MMessageInput.render = function (data) {
  return _('messageinput.am-message-input', true);
};

/***
 *
 * @type {{}|MMessageInput}
 */
MMessageInput.eventHandler = {};
MMessageInput.eventHandler.clickCameraBtn = function (event) {
  var thisMi = this;
  (0, _utils.openFileDialog)('camera').then(function (files) {
    if (files.length > 0) {
      this.notifyAddFiles(files).then(function (files) {
        this.handleAddingFileByType(files);
      }.bind(this));
    }
  }.bind(this));
};
MMessageInput.eventHandler.clickMore = function () {
  _MMessageTool["default"].open().then(function (result) {
    if (result.type === 'file' || result.type == 'image') {
      this.notifyAddFiles(result.files).then(function (files) {
        this.handleAddingFileByType(files);
      }.bind(this));
    }
  }.bind(this), function () {});
};
_Core["default"].install(MMessageInput);
var _default = MMessageInput;
exports["default"] = _default;

/***/ }),

/***/ 14230:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Core = _interopRequireDefault(__webpack_require__(33274));
__webpack_require__(57223);
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _utils = __webpack_require__(84512);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _stringGenerate = __webpack_require__(10713);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;
var supportContactPicker = 'contacts' in navigator && 'ContactsManager' in window && false; //disable until done

/***
 * @extends AElement
 * @constructor
 */
function MMessageTool() {
  this.$contactPicker = $('.am-message-tool-contact-picker', this);
  if (!supportContactPicker) {
    this.$contactPicker.remove();
    // this.$contactPicker.addStyle('display', 'none');
  }

  this.$image = $('.am-message-tool-image', this).on('click', this.openImages.bind(this));
  this.$video = $('.am-message-tool-video', this).on('click', this.openVideos.bind(this));
  this.$file = $('.am-message-tool-file', this).on('click', this.openFiles.bind(this));
  this.$closeBtn = $('.am-message-tool-header-close-btn', this).on('click', this.notifyClose.bind(this));
}
MMessageTool.tag = 'MMessageTool'.toLowerCase();
function makePlugin(data) {
  return {
    "class": ['am-message-tool-plugin'].concat(data["class"] ? [data["class"]] : []),
    child: [{
      "class": 'am-message-tool-plugin-icon-ctn',
      child: data.icon
    }, {
      "class": 'am-message-tool-plugin-content',
      child: [{
        "class": 'am-message-tool-plugin-name',
        child: {
          text: data.name
        }
      }, {
        "class": 'am-message-tool-plugin-desc',
        child: {
          text: data.desc
        }
      }]
    }]
  };
}
MMessageTool.render = function () {
  return _({
    "class": 'am-message-tool',
    extendEvent: ['pressclose', 'resolve'],
    child: [{
      "class": 'am-message-tool-box',
      child: [{
        "class": 'am-message-tool-header',
        child: [{
          "class": 'am-message-tool-header-close-btn-ctn',
          child: {
            tag: 'button',
            "class": 'am-message-tool-header-close-btn',
            child: 'span.mdi.mdi-close'
          }
        }, {
          "class": 'am-message-tool-title',
          child: {
            text: this.prototype.titleText
          }
        }]
      }, {
        "class": 'am-message-tool-body',
        child: [makePlugin({
          "class": 'am-message-tool-image',
          name: "Ảnh",
          desc: "Chia sẻ ảnh",
          icon: 'span.mdi.mdi-file-image-outline'
        }), makePlugin({
          "class": 'am-message-tool-video',
          name: "Video",
          desc: "Chia sẻ video",
          icon: 'span.mdi.mdi-file-video-outline'
        }), makePlugin({
          "class": 'am-message-tool-file',
          name: "Tệp",
          desc: "Chia sẻ tệp",
          icon: 'span.mdi.mdi-file-outline'
        }), makePlugin({
          "class": 'am-message-tool-contact-picker',
          name: "Liên hệ",
          desc: "Chia sẻ liên hệ từ danh bạ",
          icon: 'span.mdi.mdi-account-box-outline'
        })]
      }]
    }]
  });
};
MMessageTool.prototype.titleText = "Nội dung và công cụ";
MMessageTool.prototype.openImages = function () {
  var thisMT = this;
  return (0, _utils.openFileDialog)({
    multiple: true,
    accept: "image/*"
  }).then(function (files) {
    if (files && files.length > 0) {
      thisMT.notifyResolve({
        type: 'image',
        files: files
      });
    } else {
      thisMT.notifyClose();
    }
  });
};
MMessageTool.prototype.openVideos = function () {
  var thisMT = this;
  (0, _utils.openFileDialog)({
    multiple: true,
    accept: "video/*"
  }).then(function (files) {
    console.log('resolve', files);
    if (files && files.length > 0) {
      thisMT.notifyResolve({
        type: 'video',
        files: files
      });
    } else {
      thisMT.notifyClose();
    }
  });
};
MMessageTool.prototype.openFiles = function () {
  var thisMT = this;
  return (0, _utils.openFileDialog)({
    multiple: true
  }).then(function (files) {
    if (files && files.length > 0) {
      thisMT.notifyResolve({
        type: 'file',
        files: files
      });
    } else {
      thisMT.notifyClose();
    }
  });
};
MMessageTool.prototype.notifyClose = function () {
  this.emit('pressclose', {
    type: 'pressclose',
    target: this
  }, this);
};
MMessageTool.prototype.notifyResolve = function (value) {
  this.emit('resolve', {
    type: 'resolve',
    target: this,
    value: value
  }, this);
};
_Core["default"].install(MMessageTool);
MMessageTool.$share = _('mmessagetool');
MMessageTool.resolveCB = null;
MMessageTool.rejectCB = null;
MMessageTool.currentSession = null;
MMessageTool._closeTimeout = -1;
MMessageTool.open = function () {
  if (MMessageTool._closeTimeout >= 0) {
    clearTimeout(MMessageTool._closeTimeout);
    MMessageTool._closeTimeout = -1;
  }
  if (typeof MMessageTool.resolveCB == "function") {
    MMessageTool.rejectCB();
    MMessageTool.resolveCB = null;
    MMessageTool.rejectCB = null;
  }

  // MMessageTool.$share
  MMessageTool.$share.addStyle('visibility', 'hidden');
  MMessageTool.$share.addClass('am-hiding');
  setTimeout(function () {
    MMessageTool.$share.removeStyle('visibility');
    MMessageTool.$share.removeClass('am-hiding');
  }, 1);
  MMessageTool.$share.addTo(document.body);
  var ss = (0, _stringGenerate.randomIdent)(20);
  return new Promise(function (rs, rj) {
    MMessageTool.currentSession = ss;
    MMessageTool.resolveCB = rs;
    MMessageTool.rejectCB = rj;
    function finish() {
      MMessageTool.$share.off('pressclose', pressClose);
      MMessageTool.$share.off('resolve', resolve);
      if (MMessageTool.currentSession !== ss) return;
      MMessageTool.resolveCB = null;
      MMessageTool.resolveCB = null;
      MMessageTool.rejectCB = null;
      MMessageTool.$share.addClass('am-hiding');
      MMessageTool._closeTimeout = setTimeout(function () {
        MMessageTool.$share.remove();
      }, 250);
      if (arguments.length === 0) {
        rj();
      } else {
        rs(arguments[0]);
      }
    }
    function pressClose() {
      finish();
    }
    function resolve(event) {
      finish(event.value);
    }
    MMessageTool.$share.on('pressclose', pressClose);
    MMessageTool.$share.on('resolve', resolve);
  });
};
var _default = MMessageTool;
exports["default"] = _default;

/***/ }),

/***/ 87523:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.makeItem = makeItem;
exports.releaseBoxItem = releaseBoxItem;
exports.requireBoxItem = requireBoxItem;
__webpack_require__(64952);
var _MSelectMenu = _interopRequireDefault(__webpack_require__(53984));
var _Core = _interopRequireWildcard(__webpack_require__(33274));
__webpack_require__(33190);
var _MSelectBox = _interopRequireDefault(__webpack_require__(28281));
var _SelectListItem = __webpack_require__(57040);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var boxItemPool = [];
function closeBoxItem(event) {
  var thisSB = this.$parent;
  if (!thisSB) return;
  var itemValue = this.value;
  var index = thisSB.values.indexOf(itemValue);
  if (index >= 0) {
    thisSB.values = thisSB.values.slice(0, index).concat(thisSB.values.slice(index + 1));
    thisSB.emit('remove', {
      type: 'remove',
      values: thisSB.values,
      target: thisSB,
      itemElt: this,
      value: this.value,
      itemData: this.data
    }, thisSB);
    thisSB.emit('change', {
      type: 'change',
      values: thisSB.values,
      target: thisSB
    }, thisSB);
  }
}

/**
 * @returns {MSelectListItem}
 */
function makeItem() {
  return (0, _Core._)({
    tag: 'selectboxitem',
    on: {
      close: closeBoxItem
    }
  });
}
function requireBoxItem($parent) {
  var item;
  if (boxItemPool.length > 0) {
    item = boxItemPool.pop();
  } else {
    item = makeItem();
  }
  item.$parent = $parent;
  return item;
}
function releaseBoxItem(item) {
  item.$parent = null;
  boxItemPool.push(item);
}

/***
 * @extends AElement
 * @constructor
 */
function MMultiCheckMenu() {
  this._isFocus = false;
  this._values = [];
  this._orderly = false;
  this._itemsByValue = {};
  this.$boxItems = [];
  this.$selectlist = (0, _Core._)({
    tag: 'mchecklistmodal',
    on: {
      change: this.eventHandler.modalChange,
      pressout: this.eventHandler.modalSubmit,
      pressclose: this.eventHandler.modalSubmit,
      cancel: this.eventHandler.modalCancel
    }
  });
  this.on('click', this.eventHandler.click);
  this.$attachhook = (0, _Core.$)('attachhook', this).on('error', this.eventHandler.attached);
  this._tempValues = []; //20p
  this.orderly = false;
  this.items = [];
  this.values = [];
}
MMultiCheckMenu.tag = 'MMultiCheckMenu'.toLowerCase();
Object.assign(MMultiCheckMenu.prototype, _MSelectBox["default"].prototype);
MMultiCheckMenu.property = Object.assign({}, _MSelectBox["default"].property);
MMultiCheckMenu.eventHandler = Object.assign({}, _MSelectBox["default"].eventHandler);
MMultiCheckMenu.render = function () {
  return (0, _Core._)({
    tag: 'bscroller',
    "class": ['absol-selectbox', 'absol-bscroller', 'am-select-box', 'am-multi-check-menu'],
    extendEvent: ['change', 'add', 'remove', 'minwidthchange'],
    attr: {
      tabindex: '1'
    },
    child: 'attachhook'
  }, true);
};
MMultiCheckMenu.property.isFocus = {
  set: function set(value) {
    if (!this._isFocus && value) {
      this._tempValues = this._values.slice();
      this.$selectlist.values = this._tempValues;
    }
    _MSelectBox["default"].property.isFocus.set.call(this, value);
  },
  get: _MSelectBox["default"].property.isFocus.get
};
MMultiCheckMenu.eventHandler.modalChange = function (event) {
  var value, idx;
  switch (event.action) {
    case "check":
      value = event.value;
      idx = this._tempValues.indexOf(value);
      if (idx < 0) {
        this._tempValues.push(value);
        this._sortValuesIfNeed(this._tempValues);
      }
      break;
    case "uncheck":
      value = event.value;
      idx = this._tempValues.indexOf(value);
      if (idx >= 0) {
        this._tempValues.splice(idx, 1);
      }
      break;
    case "check_all":
      this._tempValues = this._items.map(function (item) {
        return (0, _SelectListItem.getValueOfListItem)(item);
      });
      break;
    case "uncheck_all":
      this._tempValues.splice(0, this._tempValues.length);
      break;
  }
  this.viewItemsByValues(this._tempValues);
};
MMultiCheckMenu.eventHandler.modalSubmit = function (event) {
  var curDict = this._values.reduce(function (ac, cr) {
    ac[cr + ''] = true;
    return ac;
  }, {});
  var newDict = this._tempValues.reduce(function (ac, cr) {
    ac[cr + ''] = true;
    return ac;
  }, {});
  var removedValues = this._values.filter(function (val) {
    return !newDict[val + ''];
  });
  var addedValues = this._tempValues.filter(function (val) {
    return !curDict[val + ''];
  });
  this._values = this._tempValues.slice();
  this._sortValuesIfNeed(this._values);
  this.$selectlist.remove();
  if (removedValues.length > 0) {
    removedValues.forEach(function (value) {
      var item = this._itemsByValue[value + ''];
      this.emit('remove', {
        type: 'remove',
        itemData: item,
        value: value
      }, this);
    }.bind(this));
  }
  if (addedValues.length > 0) {
    addedValues.forEach(function (value) {
      var item = this._itemsByValue[value + ''];
      this.emit('remove', {
        type: 'add',
        itemData: item,
        value: value
      }, this);
    }.bind(this));
  }
  if (removedValues.length > 0 || addedValues.length > 0) {
    this.emit('change', {
      type: 'change',
      values: this.values,
      target: this
    }, this);
  }
  this.isFocus = false;
};
MMultiCheckMenu.eventHandler.modalCancel = function (event) {
  this.viewItemsByValues(this._values);
  this.isFocus = false;
};
_Core["default"].install('MSelectBox'.toLowerCase(), MMultiCheckMenu);
_Core["default"].install(MMultiCheckMenu);
var _default = MMultiCheckMenu;
exports["default"] = _default;

/***/ }),

/***/ 84029:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(45090);
var _Core = _interopRequireDefault(__webpack_require__(33274));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;
function MNavigatorMenu() {
  this.$header = $('.am-navigator-menu-body', this);
  this.$body = $('.am-navigator-menu-body', this);
  var data = [{
    items: [{
      text: 'Trang chủ',
      icon: 'span.mdi.mdi-home'
    }]
  }, {
    gname: 'Danh mục',
    items: [{
      text: 'Kiểu dữ liệu',
      icon: 'span.mdi.mdi-alpha-t-box-outline'
    }, {
      text: 'Bảng',
      icon: 'span.mdi.mdi-file-table-outline'
    }, {
      text: 'Trạng thái',
      icon: 'span.mdi.mdi-check'
    }, {
      text: 'Nhóm đối tượng',
      icon: 'span.mdi.mdi-google-circles-communities'
    }, {
      text: 'Đối tượng',
      icon: 'span.mdi.mdi-cube-outline'
    }, {
      text: 'Chat',
      icon: 'span.mdi.mdi-chat-outline'
    }, {
      text: 'Quốc gia',
      icon: 'span.mdi.mdi-earth'
    }, {
      text: 'Công ty',
      icon: 'span.mdi.mdi-warehouse'
    }, {
      text: 'Liên hệ',
      icon: 'span.mdi.mdi-contact-mail'
    }, {
      text: 'Loại',
      icon: 'span.mdi.mdi-grain'
    }]
  }, {
    gname: 'Báo cáo',
    items: [{
      text: 'Báo cáo của tôi',
      icon: 'span.mdi.mdi-note-text'
    }, {
      text: 'Báo cáo công khai',
      icon: 'span.mdi.mdi-note-text-outline'
    }]
  }, {
    gname: 'Hệ thống',
    items: [{
      text: 'Người dùng',
      icon: 'span.mdi.mdi-account-outline'
    }, {
      text: 'Hồ sơ cá nhân',
      icon: 'span.mdi.mdi-file-account'
    }, {
      text: 'Đăng xuất',
      icon: 'span.mdi.mdi-logout'
    }]
  }];
  var thismn = this;
  data.forEach(function (gr) {
    thismn.$body.addChild(thismn._makeGroup(gr.gname, gr.items));
  });
}
MNavigatorMenu.tag = 'MNavigatorMenu'.toLowerCase();
MNavigatorMenu.render = function () {
  return _({
    tag: 'mleftnavigator',
    "class": 'am-navigator-menu',
    child: [{
      "class": 'am-navigator-menu-header',
      child: [{
        "class": 'am-navigator-menu-avatar-ctn',
        child: '.am-navigator-menu-avatar'
      }, {
        "class": 'am-navigator-menu-full-name',
        child: {
          text: 'Phạm Quốc Du Thiên'
        }
      }, {
        "class": 'am-navigator-menu-email',
        child: {
          text: 'blueskythien2010@live.com'
        }
      }]
    }, {
      "class": 'am-navigator-menu-body',
      child: []
    }]
  }, true);
};
/**
 *
                    {
                        class: 'am-navigator-menu-group',
                        child: [

                            {
                                class: 'am-navigator-menu-item',
                                child: [
                                    {
                                        class: 'am-navigator-menu-item-icon-ctn',
                                        child: 'span.mdi.mdi-home'
                                    },
                                    {
                                        tag: 'span',
                                        class: 'am-navigator-menu-item-text',
                                        child: { text: 'Trang chủ' }
                                    }
                                ]

                            }
                        ]
                    },
                    {
                        class: 'am-navigator-menu-group',
                        child: [
                            {
                                class: 'am-navigator-menu-group-name',
                                child: { text: 'Danh mục' }
                            },
                            {
                                class: 'am-navigator-menu-item',
                                child: [
                                    {
                                        class: 'am-navigator-menu-item-icon-ctn',
                                        child: 'span.mdi.mdi-alpha-t-box-outline'
                                    },
                                    {
                                        tag: 'span',
                                        class: 'am-navigator-menu-item-text',
                                        child: { text: 'Kiểu dữ liệu' }
                                    }
                                ]

                            }
                        ]
                    }
 */

MNavigatorMenu.prototype._makeItem = function (icon, text) {
  return _({
    "class": 'am-navigator-menu-item',
    child: [{
      "class": 'am-navigator-menu-item-icon-ctn',
      child: icon ? icon : []
    }, {
      tag: 'span',
      "class": 'am-navigator-menu-item-text',
      child: {
        text: text
      }
    }]
  });
};
MNavigatorMenu.prototype._makeGroup = function (groupName, items) {
  var aobj = {
    "class": 'am-navigator-menu-group',
    child: []
  }; //absol object
  if (groupName) {
    aobj.child.push({
      "class": 'am-navigator-menu-group-name',
      child: {
        text: groupName + ''
      }
    });
  }
  ;
  var thismn = this;
  aobj.child = aobj.child.concat(items.map(function (item) {
    return thismn._makeItem(item.icon, item.text);
  }));
  return _(aobj);
};
MNavigatorMenu.property = {};

/**
 * @type {MNavigatorMenu}
 */
MNavigatorMenu.property.headerBackgroundSrc = {
  set: function set() {},
  get: function get() {}
};

/**
 * @type {MNavigatorMenu}
 */
MNavigatorMenu.property.avatarSrc = {
  set: function set() {},
  get: function get() {}
};
_Core["default"].install(MNavigatorMenu);
var _default = MNavigatorMenu;
exports["default"] = _default;

/***/ }),

/***/ 28281:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.makeItem = makeItem;
exports.releaseBoxItem = releaseBoxItem;
exports.requireBoxItem = requireBoxItem;
__webpack_require__(64952);
var _MSelectMenu = _interopRequireDefault(__webpack_require__(53984));
var _Core = _interopRequireDefault(__webpack_require__(33274));
var _MListModal = _interopRequireWildcard(__webpack_require__(57305));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/*global absol*/
var _ = _Core["default"]._;
var $ = _Core["default"].$;
var boxItemPool = [];
function closeBoxItem(event) {
  var thisSB = this.$parent;
  if (!thisSB) return;
  var itemValue = this.value;
  var index = thisSB.values.indexOf(itemValue);
  if (index >= 0) {
    thisSB.values = thisSB.values.slice(0, index).concat(thisSB.values.slice(index + 1));
    thisSB.emit('remove', {
      type: 'remove',
      values: thisSB.values,
      target: thisSB,
      itemElt: this,
      value: this.value,
      itemData: this.data
    }, thisSB);
    thisSB.emit('change', {
      type: 'change',
      values: thisSB.values,
      target: thisSB
    }, thisSB);
  }
}

/**
 * @returns {MSelectListItem}
 */
function makeItem() {
  return _({
    tag: 'selectboxitem',
    on: {
      close: closeBoxItem
    }
  });
}
function requireBoxItem($parent) {
  var item;
  if (boxItemPool.length > 0) {
    item = boxItemPool.pop();
  } else {
    item = makeItem();
  }
  item.$parent = $parent;
  return item;
}
function releaseBoxItem(item) {
  item.$parent = null;
  boxItemPool.push(item);
}

/***
 * @extends Element
 * @constructor
 */
function MSelectBox() {
  this._isFocus = false;
  this._values = [];
  this._orderly = false;
  this._itemsByValue = {};
  this.$boxItems = [];
  this.$selectlist = _('mlistmodal');
  this.$selectlist.displayValue = _MListModal.VALUE_HIDDEN;
  this.$selectlist.on('pressitem', this.eventHandler.pressItem, true).on('pressout', this.eventHandler.pressOut).on('pressclose', this.eventHandler.pressOut);
  this.on('click', this.eventHandler.click);
  this.$attachhook = $('attachhook', this).on('error', this.eventHandler.attached);
  this._values = [];
  this.orderly = false;
  this.items = [];
  this.values = [];
}
MSelectBox.tag = 'MSelectBox'.toLowerCase();
MSelectBox.render = function () {
  return _({
    tag: 'bscroller',
    "class": ['absol-selectbox', 'absol-bscroller', 'am-select-box'],
    extendEvent: ['change', 'add', 'remove', 'minwidthchange'],
    attr: {
      tabindex: '1'
    },
    child: 'attachhook'
  }, true);
};
MSelectBox.prototype.getRecommendWith = function () {
  return this.$selectlist.estimateSize.textWidth + 60;
};
MSelectBox.prototype._dictByValue = _MSelectMenu["default"].prototype._dictByValue;
MSelectBox.property = {};
MSelectBox.property.disabled = _MSelectMenu["default"].property.disabled;
MSelectBox.property.hidden = _MSelectMenu["default"].property.hidden;
MSelectBox.property.enableSearch = _MSelectMenu["default"].property.enableSearch;
MSelectBox.prototype.init = function (props) {
  props = props || [];
  Object.keys(props).forEach(function (key) {
    if (props[key] === undefined) delete props[key];
  });
  this["super"](props);
};
MSelectBox.prototype._requireBoxItems = function (n) {
  var boxItemElt;
  while (this.$boxItems.length < n) {
    boxItemElt = requireBoxItem(this);
    this.$boxItems.push(boxItemElt);
    this.addChild(boxItemElt);
  }
  while (this.$boxItems.length > n) {
    boxItemElt = this.$boxItems.pop();
    boxItemElt.selfRemove();
    releaseBoxItem(boxItemElt);
  }
};
MSelectBox.prototype._sortValuesIfNeed = function (values) {
  if (this._orderly) {
    var thisMB = this;
    values.sort(function (a, b) {
      var aItem = thisMB._itemsByValue[a];
      var bItem = thisMB._itemsByValue[b];
      if (!aItem) return 1;
      if (!bItem) return -1;
      return aItem.__index__ - bItem.__index__;
    });
  }
};
MSelectBox.prototype._assignBoxItems = function (values) {
  var n = values.length;
  var item;
  var value;
  for (var i = 0; i < n; ++i) {
    value = values[i];
    item = this._itemsByValue[value];
    this.$boxItems[i].data = item || {
      text: 'error'
    };
  }
};
MSelectBox.prototype._updateValues = function () {
  this.viewItemsByValues(this._values);
};
MSelectBox.prototype.viewItemsByValues = function (values) {
  this._requireBoxItems(values.length);
  this._assignBoxItems(values);
};
MSelectBox.prototype.querySelectedItems = function () {
  return Array.prototype.map.call(this.$holderItem.childNodes, function (e) {
    return e.data;
  });
};
MSelectBox.property.isFocus = _MSelectMenu["default"].property.isFocus;

/***
 *
 * @type {MSelectBox}
 */
MSelectBox.property.items = {
  set: function set(items) {
    items = items || [];
    items.forEach(function (item, i) {
      item.__index__ = i;
    });
    this._items = items;
    this._itemsByValue = this._dictByValue(items);
    this.$selectlist.items = items;
    this.addStyle('--item-min-width', this.$selectlist.estimateSize.textWidth + 60 + 'px');
    this._sortValuesIfNeed(this._values);
    this._updateValues();
  },
  get: function get() {
    return this._items;
  }
};
MSelectBox.property.values = {
  set: function set(values) {
    values = values || [];
    values = values instanceof Array ? values : [values];
    values = values.slice();
    this._values = values;
    this.$selectlist.values = values;
    this._sortValuesIfNeed(this._values);
    this._updateValues();
  },
  get: function get() {
    return this._values || [];
  }
};
MSelectBox.property.orderly = {
  set: function set(value) {
    this._orderly = !!value;
    this._sortValuesIfNeed(this._values);
    this._updateValues();
  },
  get: function get() {
    return !!this._orderly;
  }
};

/***
 *
 * @type {MSelectBox}
 */
MSelectBox.eventHandler = {};
MSelectBox.eventHandler.pressOut = _MSelectMenu["default"].eventHandler.pressOut;
MSelectBox.eventHandler.attached = _MSelectMenu["default"].eventHandler.attached;
MSelectBox.eventHandler.click = function (event) {
  if (event.target == this) {
    this.isFocus = !this.isFocus;
  }
};
MSelectBox.eventHandler.pressItem = function (event) {
  this.values.push(event.value);
  this._sortValuesIfNeed(this._values);
  this._updateValues();
  this.$selectlist.values = this.values;
  this.emit('add', {
    type: 'add',
    itemData: event.itemElt.data,
    value: event.value,
    values: this.values
  }, this);
  this.emit('change', {
    type: 'change',
    values: this.values,
    target: this
  }, this);
  this.isFocus = false;
};
_Core["default"].install('MSelectBox'.toLowerCase(), MSelectBox);
var _default = MSelectBox;
exports["default"] = _default;

/***/ }),

/***/ 53953:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.makeItem = makeItem;
exports.measureListSize = measureListSize;
exports.releaseItem = releaseItem;
exports.requireItem = requireItem;
var _SelectList = __webpack_require__(884);
var _MSelectList = _interopRequireDefault(__webpack_require__(14899));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function measureListSize(items) {
  var descWidth = (0, _SelectList.measureMaxDescriptionWidth)(items);
  var textWidth = (0, _SelectList.measureMaxTextWidth)(items);
  var width = descWidth + 20 + textWidth + 12 + 15; //padding, margin
  return {
    width: width,
    descWidth: descWidth,
    textWidth: textWidth
  };
}
var itemPool = [];
function onClickItem(event) {
  var thisSL = this.$parent;
  if (thisSL) {
    thisSL.value = this.value;
    thisSL.emit('pressitem', {
      type: 'pressitem',
      target: thisSL,
      itemElt: this,
      value: this.value,
      data: this.data
    });
  }
}

/**
 * @returns {MSelectListItem}
 */
function makeItem() {
  return _({
    tag: 'mselectlistitem',
    on: {
      click: onClickItem
    }
  });
}
function requireItem($parent) {
  var item;
  if (itemPool.length > 0) {
    item = itemPool.pop();
  } else {
    item = makeItem();
  }
  item.$parent = $parent;
  return item;
}
function releaseItem(item) {
  item.$parent = null;
  item.attr('class', 'am-selectlist-item');
  item.selected = false;
  itemPool.push(item);
}
var _default = _MSelectList["default"];
exports["default"] = _default;

/***/ }),

/***/ 63516:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _MSelectListItem = _interopRequireDefault(__webpack_require__(82799));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = _MSelectListItem["default"];
exports["default"] = _default;

/***/ }),

/***/ 53984:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _MSelectMenu = _interopRequireDefault(__webpack_require__(70448));
var _Core = _interopRequireDefault(__webpack_require__(33274));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_Core["default"].install(_MSelectMenu["default"]);
var _default = _MSelectMenu["default"];
exports["default"] = _default;

/***/ }),

/***/ 97840:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
var _exportNames = {};
Object.defineProperty(exports, "default", ({
  enumerable: true,
  get: function get() {
    return _MSelectTreeMenu["default"];
  }
}));
var _Core = _interopRequireDefault(__webpack_require__(33274));
var _MSelectTreeMenu = _interopRequireWildcard(__webpack_require__(3770));
Object.keys(_MSelectTreeMenu).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _MSelectTreeMenu[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function get() {
      return _MSelectTreeMenu[key];
    }
  });
});
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_Core["default"].install(_MSelectTreeMenu["default"]);

/***/ }),

/***/ 77640:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(82986);
var _Core = _interopRequireDefault(__webpack_require__(33274));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;
function MTinyProfileBlock() {
  this._avatarSrc = '';
  this.$name = $('.am-tiny-profile-block-name', this);
  this.$desc = $('.am-tiny-profile-block-desc', this);
  this.$avatar = $('.am-tiny-profile-block-avatar', this);
}
MTinyProfileBlock.tag = 'MTinyProfileBlock'.toLowerCase();
MTinyProfileBlock.render = function () {
  return _({
    "class": 'am-tiny-profile-block',
    extendEvent: 'change',
    child: [{
      "class": 'am-tiny-profile-block-avatar'
    }, {
      "class": 'am-tiny-profile-block-text-ctn',
      child: [{
        "class": 'am-tiny-profile-block-name',
        child: {
          text: 'Pham Quoc Du Thien'
        }
      }, {
        "class": 'am-tiny-profile-block-desc',
        child: {
          text: 'View your profile'
        }
      }]
    }]
  });
};
MTinyProfileBlock.property = {};

/**
 * @type {MTinyProfileBlock}
 */
MTinyProfileBlock.property.desc = {
  set: function set(value) {
    this.$desc.firstChild.data = value + '';
  },
  get: function get() {
    return this.$desc.firstChild.data;
  }
};

/**
 * @type {MTinyProfileBlock}
 */
MTinyProfileBlock.property.name = {
  set: function set(value) {
    this.$name.firstChild.data = value + '';
  },
  get: function get() {
    return this.$name.firstChild.data;
  }
};

/**
 * @type {MTinyProfileBlock}
 */
MTinyProfileBlock.property.avatarSrc = {
  set: function set(value) {
    value = value + '';
    this._avatarSrc = value;
    this.$avatar.addStyle('background-image', 'url(' + value + ')');
  },
  get: function get() {
    return this._avatarSrc;
  }
};
_Core["default"].install(MTinyProfileBlock);
var _default = MTinyProfileBlock;
exports["default"] = _default;

/***/ }),

/***/ 13762:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _MSelectTreeMenu = __webpack_require__(3770);
var _default = _MSelectTreeMenu.MTreeModal;
exports["default"] = _default;

/***/ }),

/***/ 40234:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = install;
var _MLeftNavigator = _interopRequireDefault(__webpack_require__(75943));
var _MNavigatorMenu = _interopRequireDefault(__webpack_require__(84029));
var _MBottomTabbar = _interopRequireDefault(__webpack_require__(42499));
var _MTinyProfileBlock = _interopRequireDefault(__webpack_require__(77640));
var _MMatMenuButton = _interopRequireDefault(__webpack_require__(3702));
var _MMatMenuItem = _interopRequireDefault(__webpack_require__(10399));
var _MMatMenu = _interopRequireDefault(__webpack_require__(82566));
var _MHeaderBar = _interopRequireDefault(__webpack_require__(72162));
var _MConversation = _interopRequireDefault(__webpack_require__(73114));
var _MMessageInput = _interopRequireDefault(__webpack_require__(21558));
var _MSelectListItem = _interopRequireDefault(__webpack_require__(63516));
var _MSelectList = _interopRequireDefault(__webpack_require__(53953));
var _MSelectMenu = _interopRequireDefault(__webpack_require__(53984));
var _MSelectTreeMenu = _interopRequireDefault(__webpack_require__(97840));
var _MSelectBox = _interopRequireDefault(__webpack_require__(28281));
var _MBlinkModal = _interopRequireDefault(__webpack_require__(66189));
var _MListModal = _interopRequireDefault(__webpack_require__(57305));
var _MTreeModal = _interopRequireDefault(__webpack_require__(13762));
var _MHSnapScroller = _interopRequireDefault(__webpack_require__(67819));
var _MChecklistModal = _interopRequireDefault(__webpack_require__(84267));
var _MChecklistItem = _interopRequireDefault(__webpack_require__(72067));
var _MMultiCheckMenu = _interopRequireDefault(__webpack_require__(87523));
var _MCabinetList = _interopRequireDefault(__webpack_require__(81227));
var _MCabinetItem = _interopRequireDefault(__webpack_require__(34759));
var _MCabinetTreeList = _interopRequireDefault(__webpack_require__(7983));
var _MCabinetTree = _interopRequireDefault(__webpack_require__(62303));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function install(core) {
  core.install([_MMessageInput["default"], _MNavigatorMenu["default"], _MBottomTabbar["default"], _MLeftNavigator["default"], _MTinyProfileBlock["default"], _MMatMenuButton["default"], _MMatMenuItem["default"], _MMatMenu["default"], _MHeaderBar["default"], _MConversation["default"], _MSelectListItem["default"], _MSelectList["default"], _MSelectMenu["default"], _MSelectTreeMenu["default"], _MSelectBox["default"], _MBlinkModal["default"], _MListModal["default"], _MTreeModal["default"], _MHSnapScroller["default"], _MChecklistItem["default"], _MChecklistModal["default"], _MMultiCheckMenu["default"], _MCabinetItem["default"], _MCabinetList["default"], _MCabinetTreeList["default"], _MCabinetTree["default"]]);
}

/***/ }),

/***/ 93713:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(97084);
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _absolAcomp = _interopRequireDefault(__webpack_require__(2515));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var _ = _absolAcomp["default"]._;
var $ = _absolAcomp["default"].$;

/**
 * @typedef {Object}PSPhotoItem
 * @property {String} title
 * @property {String} src
 * @property {String} previewSrc
 * @property {Number} naturalWidth
 * @property {Number} naturalHeight
 * @property {Image} $image
 * @property {Promise} sync
 * @property {Number} scale
 * 
 */

function PhotoSwipeFrag() {
  _Fragment["default"].call(this);

  /**
   * @type {PhotoSwipeFragItem}
   */
  this.currentPhotoItem = null;
  /**
   * @type {Array<PhotoSwipeFragItem>}
   */
  this.photoItems = [];
  this.sync = Promise.resolve();
  this.mode = -1;
  this.snap = -1;
  // this.ev_pan_mousefinish = this.ev_pan_mousefinish.bind(this);
  // this.ev_pan_mousemove = this.ev_pan_mousemove.bind(this);
  // this._mouseData = null;
}

Object.defineProperties(PhotoSwipeFrag.prototype, Object.getOwnPropertyDescriptors(_Fragment["default"].prototype));
PhotoSwipeFrag.prototype.constructor = PhotoSwipeFrag;
PhotoSwipeFrag.prototype.SNAP_FIX_SIZE = 'SNAP_FIX_SIZE';
PhotoSwipeFrag.prototype.SNAP_ORIGIN_SIZE = 'SNAP_ORIGIN_SIZE';
PhotoSwipeFrag.prototype.MODE_PAN = 3;
PhotoSwipeFrag.prototype.MODE_ZOOM_IN = 4;
PhotoSwipeFrag.prototype.MODE_ZOOM_OUT = 5;
PhotoSwipeFrag.prototype.topbarBtnNames = ['download', 'fixsize', 'originsize', 'pan_tool', 'zoom_in', 'zoom_out'];
PhotoSwipeFrag.prototype.topbarDescriptors = {
  download: {
    cmd: 'download',
    title: 'Tải về',
    mticon: 'file_download'
  },
  fixsize: {
    mticon: 'fullscreen',
    title: 'Vừa màn hình',
    cmd: 'showFixSize'
  },
  originsize: {
    mticon: 'fullscreen_exit',
    title: 'Kích thước dốc',
    cmd: 'showOriginSize'
  },
  pan_tool: {
    mticon: 'pan_tool',
    title: 'Di chuyển',
    cmd: 'panTool'
  },
  zoom_in: {
    mticon: 'zoom_in',
    title: 'Phóng to',
    cmd: 'zoomInTool'
  },
  zoom_out: {
    mticon: 'zoom_out',
    title: 'Thu nhỏ',
    cmd: 'zoomOutTool'
  }
};
PhotoSwipeFrag.prototype.getView = function () {
  var self = this;
  if (this.$view) return this.$view;
  this.$view = _({
    "class": 'ptswpf',
    child: [{
      tag: 'button',
      "class": ['ptswpf-to-prev-image'],
      child: {
        tag: 'i',
        child: {
          text: 'keyboard_arrow_left'
        },
        "class": 'material-icons'
      },
      on: {
        click: this.prev.bind(this)
      }
    }, {
      tag: 'button',
      "class": ['ptswpf-to-next-image'],
      child: {
        tag: 'i',
        child: {
          text: 'keyboard_arrow_right'
        },
        "class": 'material-icons'
      },
      on: {
        click: this.next.bind(this)
      }
    }, {
      "class": 'ptswpf-top-bar',
      child: this.topbarBtnNames.map(function (name) {
        return {
          tag: 'button',
          "class": 'ptswpf-action-' + name,
          props: {
            title: self.topbarDescriptors[name].title
          },
          on: {
            click: self[self.topbarDescriptors[name].cmd || 'noop'].bind(self)
          },
          child: {
            tag: 'i',
            child: {
              text: self.topbarDescriptors[name].mticon
            },
            "class": 'material-icons'
          }
        };
      })
    }, '<a class="ptswpf-download-trigger" href="#" download target="_blank"></a>'
    // {
    //     class: 'ptswpf-image-ctn',
    //     child: {
    //         tag: 'img',
    //         class: 'ptswpf-image'
    //     },
    // }
    ]
  });

  this.$attachhook = _('attachhook').addTo(this.$view).on('error', function () {
    _Dom["default"].addToResizeSystem(this);
    this.requestUpdateSize();
  });
  this.$attachhook.requestUpdateSize = this.updateSize.bind(this);
  this.$downloadTrigger = $('.ptswpf-download-trigger', this.$view);
  // this.$view.on('mousedown', this.ev_mousedown);
  if (this.mode == -1) this.panTool();
  return this.$view;
};

/**
 * @param {PSPhotoItem} item
 */
PhotoSwipeFrag.prototype.push = function (item) {
  if (typeof item == 'string') {
    item = {
      src: item
    };
  }
  var newItem = new PhotoSwipeFragItem(this, item);
  this.photoItems.push(newItem);
  if (!this.currentPhotoItem) this.setCurrentItem(newItem);
  if (this.photoItems.length > 1) {
    this.$view.addClass('ptswpf-multi-image');
  }
};

/**
 * @param {String} src
 * @returns {PSPhotoItem}
 */
PhotoSwipeFrag.prototype.findItem = function (src) {
  for (var i = 0; i < this.photoItems.length; ++i) {
    if (this.photoItems[i].src == src) return this.photoItems[i];
  }
  return null;
};
PhotoSwipeFrag.prototype.noop = function () {};

/**
 * @param {PhotoSwipeFragItem} item
 */
PhotoSwipeFrag.prototype.setCurrentItem = function (item) {
  if (typeof item == 'string') {
    item = {
      src: item
    };
  }
  if (this.currentPhotoItem == item) return;
  if (this.currentPhotoItem) {
    this.currentPhotoItem.beginAnimateTimeout();
    this.currentPhotoItem.moveToLeft();
  }
  /**
   * @type {}
   */
  item = this.findItem(item.src) || new PhotoSwipeFragItem(this, item);
  item.load().then(item.autoSize.bind(item));
  this.currentPhotoItem = item;
  item.mode = this.mode;
};
PhotoSwipeFrag.prototype.showFixSize = function () {
  if (this.currentPhotoItem) {
    this.currentPhotoItem.beginAnimateTimeout();
    this.currentPhotoItem.fixSize();
  }
};
PhotoSwipeFrag.prototype.showOriginSize = function () {
  if (this.currentPhotoItem) {
    this.currentPhotoItem.beginAnimateTimeout();
    this.currentPhotoItem.originSize();
  }
};
PhotoSwipeFrag.prototype.download = function () {
  if (this.currentPhotoItem) {
    this.$downloadTrigger.href = this.currentPhotoItem.src;
    this.$downloadTrigger.click();
  }
};
PhotoSwipeFrag.prototype.updateSize = function () {
  var item = this.currentPhotoItem;
  if (!item) return;
};
PhotoSwipeFrag.prototype.panTool = function () {
  this.$view.addClass('ptswpf-mode-pan').removeClass('ptswpf-mode-zoom-in').removeClass('ptswpf-mode-zoom-out');
  this.mode = this.MODE_PAN;
  if (this.currentPhotoItem) this.currentPhotoItem.panTool();
};
PhotoSwipeFrag.prototype.zoomInTool = function () {
  this.$view.removeClass('ptswpf-mode-pan').addClass('ptswpf-mode-zoom-in').removeClass('ptswpf-mode-zoom-out');
  this.mode = this.MODE_ZOOM_IN;
  this.currentPhotoItem.zoomInTool();
};
PhotoSwipeFrag.prototype.zoomOutTool = function () {
  this.$view.removeClass('ptswpf-mode-pan').addClass('ptswpf-mode-zoom-out').removeClass('ptswpf-mode-zoom-in');
  this.mode = this.MODE_ZOOM_OUT;
  this.currentPhotoItem.zoomOutTool();
};
PhotoSwipeFrag.prototype.next = function () {
  var currentItem = this.currentPhotoItem;
  var currentItemIndex = this.photoItems.indexOf(currentItem);
  var nextItemIndex = (currentItemIndex + 1) % this.photoItems.length;
  var nextItem = this.photoItems[nextItemIndex];
  if (nextItem == currentItem) return;
  currentItem.beginAnimateTimeout();
  currentItem.autoSize();
  currentItem.moveToLeft();
  nextItem.load();
  nextItem.$image.addStyle('opacity', '0');
  nextItem.moveToRight();
  nextItem.beginAnimateTimeout();
  nextItem.moveToCenter();
  nextItem.sync.then(function () {
    nextItem.beginAnimateTimeout();
    nextItem.autoSize();
    nextItem.$image.removeStyle('opacity');
  });
  this.currentPhotoItem = nextItem;
};
PhotoSwipeFrag.prototype.prev = function () {
  var currentItem = this.currentPhotoItem;
  var currentItemIndex = this.photoItems.indexOf(currentItem);
  var prevItemIndex = (currentItemIndex + this.photoItems.length - 1) % this.photoItems.length;
  var prevItem = this.photoItems[prevItemIndex];
  if (prevItem == currentItem) return;
  currentItem.beginAnimateTimeout();
  currentItem.autoSize();
  currentItem.moveToRight();
  prevItem.load();
  prevItem.$image.addStyle('opacity', '0');
  prevItem.moveToLeft();
  prevItem.beginAnimateTimeout();
  prevItem.moveToCenter();
  prevItem.sync.then(function () {
    prevItem.beginAnimateTimeout();
    prevItem.autoSize();
    prevItem.$image.removeStyle('opacity');
  });
  this.currentPhotoItem = prevItem;
};
var loadingUrl = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHN0eWxlPSJtYXJnaW46IGF1dG87ICBkaXNwbGF5OiBibG9jazsgc2hhcGUtcmVuZGVyaW5nOiBhdXRvOyIgd2lkdGg9IjIwMHB4IiBoZWlnaHQ9IjIwMHB4IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUwIDUwKSI+ICA8ZyB0cmFuc2Zvcm09InNjYWxlKDAuNykiPiAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNTAgLTUwKSI+ICAgICAgPGcgdHJhbnNmb3JtPSJyb3RhdGUoMTI3LjU2MiA1MCA1MCkiPiAgICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIiBkdXI9IjAuNzU3NTc1NzU3NTc1NzU3NnMiPjwvYW5pbWF0ZVRyYW5zZm9ybT4gICAgICAgIDxwYXRoIGZpbGwtb3BhY2l0eT0iMC44IiBmaWxsPSIjZTE1YjY0IiBkPSJNNTAgNTBMNTAgMEE1MCA1MCAwIDAgMSAxMDAgNTBaIj48L3BhdGg+ICAgICAgPC9nPiAgICAgIDxnIHRyYW5zZm9ybT0icm90YXRlKDk1LjY2ODQgNTAgNTApIj4gICAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0icm90YXRlIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgdmFsdWVzPSIwIDUwIDUwOzM2MCA1MCA1MCIga2V5VGltZXM9IjA7MSIgZHVyPSIxLjAxMDEwMTAxMDEwMTAxMDJzIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICAgICAgICA8cGF0aCBmaWxsLW9wYWNpdHk9IjAuOCIgZmlsbD0iI2Y0N2U2MCIgZD0iTTUwIDUwTDUwIDBBNTAgNTAgMCAwIDEgMTAwIDUwWiIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgNTAgNTApIj48L3BhdGg+ICAgICAgPC9nPiAgICAgIDxnIHRyYW5zZm9ybT0icm90YXRlKDYzLjc3OTcgNTAgNTApIj4gICAgICAgIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0icm90YXRlIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgdmFsdWVzPSIwIDUwIDUwOzM2MCA1MCA1MCIga2V5VGltZXM9IjA7MSIgZHVyPSIxLjUxNTE1MTUxNTE1MTUxNTFzIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICAgICAgICA8cGF0aCBmaWxsLW9wYWNpdHk9IjAuOCIgZmlsbD0iI2Y4YjI2YSIgZD0iTTUwIDUwTDUwIDBBNTAgNTAgMCAwIDEgMTAwIDUwWiIgdHJhbnNmb3JtPSJyb3RhdGUoMTgwIDUwIDUwKSI+PC9wYXRoPiAgICAgIDwvZz4gICAgICA8ZyB0cmFuc2Zvcm09InJvdGF0ZSgzMS44ODk1IDUwIDUwKSI+ICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InJvdGF0ZSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIHZhbHVlcz0iMCA1MCA1MDszNjAgNTAgNTAiIGtleVRpbWVzPSIwOzEiIGR1cj0iMy4wMzAzMDMwMzAzMDMwMzAzcyI+PC9hbmltYXRlVHJhbnNmb3JtPiAgICAgICAgPHBhdGggZmlsbC1vcGFjaXR5PSIwLjgiIGZpbGw9IiNhYmJkODEiIGQ9Ik01MCA1MEw1MCAwQTUwIDUwIDAgMCAxIDEwMCA1MFoiIHRyYW5zZm9ybT0icm90YXRlKDI3MCA1MCA1MCkiPjwvcGF0aD4gICAgICA8L2c+ICAgIDwvZz4gIDwvZz48L2c+PCEtLSBbbGRpb10gZ2VuZXJhdGVkIGJ5IGh0dHBzOi8vbG9hZGluZy5pby8gLS0+PC9zdmc+";

/**
 * 
 * @param {PhotoSwipeFrag} parent
 * @param {*} props 
 */
function PhotoSwipeFragItem(parent, props) {
  /**
   * @type {PhotoSwipeFrag}
   */
  this.parent = parent;
  /**
   * @type {String}
   */
  this.src = props.src;
  /**
   * @type {HTMLImageElement}
   */
  this.$image = null;

  /**
   * @type {HTMLElement}
   */
  this.$frame = null;
  this._animateTimeout = -1;
  this.naturalWidth = 1;
  this.naturalHeight = 1;
  /**
   * @type {String}
   */
  this.title = '';
  this.viewPosition = 0;
  this.sync = Promise.resolve();
  this.ev_updateSize = this.ev_updateSize.bind(this);
  this.ev_mousedown = this.ev_mousedown.bind(this);
  this.ev_pan_mousedown = this.ev_pan_mousedown.bind(this);
  this.ev_pan_mousemove = this.ev_pan_mousemove.bind(this);
  this.ev_pan_mousefinish = this.ev_pan_mousefinish.bind(this);
}
;
PhotoSwipeFragItem.prototype.ev_updateSize = function () {
  if (this.snap == this.SNAP_FIX_SIZE) {
    this.fixSize();
  }
};
PhotoSwipeFragItem.prototype.load = function () {
  var self = this;
  if (!this.$frame) {
    this.$frame = _('.ptswpf-frame').addTo(this.parent.$view).on(_BrowserDetector["default"].isMobile ? 'pointerdown' : 'mousedown', this.ev_mousedown);
    this.$loadingImage = _('img.ptswpf-frame-loading-img').addTo(this.$frame);
    this.$loadingImage.src = loadingUrl;
    this.$attachhook = _('attachhook').addTo(this.$frame).on('error', function () {
      _Dom["default"].addToResizeSystem(this);
    });
    this.$attachhook.updateSize = this.ev_updateSize;
    this.$image = _('img.ptswpf-image').addTo(this.$frame);
    this.$image.src = this.src;
    this.$image.draggable = false;
    this.sync = _Dom["default"].waitImageLoaded(this.$image).then(function () {
      self.naturalHeight = self.$image.naturalHeight;
      self.naturalWidth = self.$image.naturalWidth;
      self.$loadingImage.remove();
    });
  }
  return this.sync;
};
PhotoSwipeFragItem.prototype.beginAnimateTimeout = function (duration) {
  if (duration === undefined) duration = 300;
  var self = this;
  if (this._animateTimeout > 0) {
    clearTimeout(this._animateTimeout);
    this._animateTimeout = -1;
  }
  this.$frame.addClass('ptswpf-move-animation');
  this._animateTimeout = setTimeout(function () {
    self.$frame.removeClass('ptswpf-move-animation');
    self._animateTimeout = -1;
  }, duration);
};
PhotoSwipeFragItem.prototype.getScaleToFix = function (width, height) {
  return Math.min(width / this.naturalWidth, height / this.naturalHeight);
};
PhotoSwipeFragItem.prototype.scale = function (s) {
  var nWidth = this.naturalWidth * this.scale;
  var nHeight = this.naturalHeight * this.scale;
  var frameBound = this.$frame.getBoundingClientRect();
  var nLeft = frameBound.width / 2 + dx - nWidth * ox;
  var nTop = frameBound.height / 2 + dy - nHeight * oy;
  var maxTop, minTop, maxLeft, minLeft;
  if (nHeight > frameBound.height) {
    maxTop = 0;
    minTop = frameBound.height - nHeight;
  } else {
    minTop = frameBound.height / 2 - nHeight / 2;
    maxTop = minTop;
  }
  if (nWidth > frameBound.width) {
    maxLeft = 0;
    minLeft = frameBound.width - nWidth;
  } else {
    minLeft = frameBound.width / 2 - nWidth / 2;
    maxLeft = minLeft;
  }
  nLeft = Math.min(Math.max(nLeft, minLeft), maxLeft);
  nTop = Math.min(Math.max(nTop, minTop), maxTop);
  if (hs < 1 && nWidth < this.naturalWidth && Math.max(nWidth, nHeight) < 10) return;
  this.$image.addStyle({
    width: nWidth + 'px',
    height: nHeight + 'px',
    left: 'calc(' + (nLeft - frameBound.width / 2) + 'px + 50%)',
    top: 'calc(' + (nTop - frameBound.height / 2) + 'px + 50%)'
  });
};
PhotoSwipeFragItem.prototype.SNAP_FIX_SIZE = 'SNAP_FIX_SIZE';
PhotoSwipeFragItem.prototype.SNAP_ORIGIN_SIZE = 'SNAP_ORIGIN_SIZE';
PhotoSwipeFragItem.prototype.MODE_PAN = 3;
PhotoSwipeFragItem.prototype.MODE_ZOOM_IN = 4;
PhotoSwipeFragItem.prototype.MODE_ZOOM_OUT = 5;
PhotoSwipeFragItem.prototype.originSize = function () {
  this.snap = this.SNAP_ORIGIN_SIZE;
  /**
   * @type {PSPhotoItem}
   */
  var imageBound = this.$image.getBoundingClientRect();
  this.$image.addStyle('left', 'calc(50% - ' + this.naturalWidth / 2 + 'px)');
  this.$image.addStyle('top', 'calc(50% - ' + this.naturalHeight / 2 + 'px)');
  this.$image.addStyle({
    width: this.naturalWidth + 'px',
    height: this.naturalHeight + 'px'
  });
  this.scale = 1;
};
PhotoSwipeFragItem.prototype.fixSize = function () {
  this.snap = this.SNAP_FIX_SIZE;
  /**
   * @type {PSPhotoItem}
   */
  var frameSize = this.$frame.getBoundingClientRect();
  var newWidth;
  var newHeight;
  if (frameSize.width / frameSize.height > this.naturalWidth / this.naturalHeight) {
    newHeight = frameSize.height;
    newWidth = newHeight * this.naturalWidth / this.naturalHeight;
  } else {
    newWidth = frameSize.width;
    newHeight = newWidth * this.naturalHeight / this.naturalWidth;
  }
  this.$image.addStyle('left', 'calc(50% - ' + newWidth / 2 + 'px)');
  this.$image.addStyle('top', 'calc(50% - ' + newHeight / 2 + 'px)');
  this.$image.addStyle({
    width: newWidth + 'px',
    height: newHeight + 'px'
  });
  this.scale = newWidth / this.naturalWidth;
};
PhotoSwipeFragItem.prototype.autoSize = function () {
  var frameSize = this.$frame.getBoundingClientRect();
  if (this.naturalHeight > frameSize.height || this.naturalWidth > frameSize.width) {
    this.fixSize();
  } else {
    this.originSize();
  }
};
PhotoSwipeFragItem.prototype.moveToLeft = function () {
  this.$frame.removeClass('ptswpf-frame-right').addClass('ptswpf-frame-left');
  this.viewPosition = -1;
};
PhotoSwipeFragItem.prototype.moveToRight = function () {
  this.$frame.removeClass('ptswpf-frame-left').addClass('ptswpf-frame-right');
  this.viewPosition = 1;
};
PhotoSwipeFragItem.prototype.moveToCenter = function () {
  this.$frame.removeClass('ptswpf-frame-left').removeClass('ptswpf-frame-right');
  this.viewPosition = 0;
};
PhotoSwipeFragItem.prototype.panTool = function () {
  this.mode = this.MODE_PAN;
};
PhotoSwipeFragItem.prototype.zoomInTool = function () {
  this.mode = this.MODE_ZOOM_IN;
};
PhotoSwipeFragItem.prototype.zoomOutTool = function () {
  this.mode = this.MODE_ZOOM_OUT;
};
PhotoSwipeFragItem.prototype.zoom = function (hs, ev) {
  var imgBound = this.$image.getBoundingClientRect();
  var frameSize = this.$frame.getBoundingClientRect();
  var ox = 0.5,
    oy = 0.5,
    dx = 0,
    dy = 0;
  if (event) {
    ox = (event.clientX - imgBound.left) / (imgBound.right - imgBound.left);
    oy = (event.clientY - imgBound.top) / (imgBound.bottom - imgBound.top);
    dx = event.clientX - (frameSize.left + frameSize.right) / 2;
    dy = event.clientY - (frameSize.top + frameSize.bottom) / 2;
  }
  if (hs == this.SNAP_FIX_SIZE) {
    this.scale = Math.min(frameSize.width / this.naturalWidth, frameSize.height / this.naturalHeight);
  } else if (hs == this.SNAP_ORIGIN_SIZE) {
    this.scale = 1;
  } else {
    this.scale *= hs;
  }
  var viewImg = this.$image;
  var nWidth = this.naturalWidth * this.scale;
  var nHeight = this.naturalHeight * this.scale;
  var nLeft = frameSize.width / 2 + dx - nWidth * ox;
  var nTop = frameSize.height / 2 + dy - nHeight * oy;
  var maxTop, minTop, maxLeft, minLeft;
  if (nHeight > frameSize.height) {
    maxTop = 0;
    minTop = frameSize.height - nHeight;
  } else {
    minTop = frameSize.height / 2 - nHeight / 2;
    maxTop = minTop;
  }
  if (nWidth > frameSize.width) {
    maxLeft = 0;
    minLeft = frameSize.width - nWidth;
  } else {
    minLeft = frameSize.width / 2 - nWidth / 2;
    maxLeft = minLeft;
  }
  nLeft = Math.min(Math.max(nLeft, minLeft), maxLeft);
  nTop = Math.min(Math.max(nTop, minTop), maxTop);
  if (hs < 1 && nWidth < this.naturalWidth && Math.max(nWidth, nHeight) < 10) return;

  // setTimeout(function () {
  this.$image.addStyle({
    width: nWidth + 'px',
    height: nHeight + 'px',
    left: 'calc(' + (nLeft - frameSize.width / 2) + 'px + 50%)',
    top: 'calc(' + (nTop - frameSize.height / 2) + 'px + 50%)'
  });
};
PhotoSwipeFragItem.prototype.ev_mousedown = function (event) {
  var _this$_mouseData;
  var bound = this.$frame.getBoundingClientRect();
  var imgBound = this.$image.getBoundingClientRect();
  this._mouseData = (_this$_mouseData = {
    bound: bound,
    imgBound: imgBound
  }, _defineProperty(_this$_mouseData, "imgBound", imgBound), _defineProperty(_this$_mouseData, "clientX", event.clientX), _defineProperty(_this$_mouseData, "clientY", event.clientY), _defineProperty(_this$_mouseData, "offsetX", event.clientX - bound.left), _defineProperty(_this$_mouseData, "offsetY", event.clientY - bound.top), _defineProperty(_this$_mouseData, "imgOffsetX", event.clientX - imgBound.left), _defineProperty(_this$_mouseData, "imgOffsetY", event.clientY - imgBound.top), _defineProperty(_this$_mouseData, "imgOffsetXR", (event.clientX - imgBound.left) / imgBound.width), _this$_mouseData);
  if (event.target.classList.contains('ptswpf-image')) {
    if (this.mode == this.MODE_PAN) {
      this.ev_pan_mousedown(event);
    } else if (this.mode == this.MODE_ZOOM_IN) {
      this.ev_zoomin_mousedown(event);
    } else if (this.mode == this.MODE_ZOOM_OUT) {
      this.ev_zoomout_mousedown(event);
    }
  }
};
PhotoSwipeFragItem.prototype.ev_pan_mousemove = function (event) {
  console.log(event.type);
  event.preventDefault();
  this.snap = -1;
  var bound = this.$frame.getBoundingClientRect();
  var newOffsetX = event.clientX - bound.left;
  var newOffsetY = event.clientY - bound.top;
  var dx = newOffsetX - this._mouseData.offsetX;
  var dy = newOffsetY - this._mouseData.offsetY;
  this.$image.addStyle({
    left: 'calc(' + (-this._mouseData.bound.width / 2 + this._mouseData.imgBound.left - this._mouseData.bound.left + dx) + 'px + 50%)',
    top: 'calc(' + (-this._mouseData.bound.height / 2 + this._mouseData.imgBound.top - this._mouseData.bound.top + dy) + 'px + 50%)'
  });
};
PhotoSwipeFragItem.prototype.ev_pan_mousefinish = function (event) {
  $(document.body).off(_BrowserDetector["default"].isMobile ? 'pointermove' : 'mousemove', this.ev_pan_mousemove).off(_BrowserDetector["default"].isMobile ? 'pointerleave' : 'mouseleave', this.ev_pan_mousefinish).off(_BrowserDetector["default"].isMobile ? 'pointerup' : 'mouseup', this.ev_pan_mousefinish);
  var newStyle = {};
  var imgBound = this.$image.getBoundingClientRect();
  var bound = this.$frame.getBoundingClientRect();
  if (bound.width > imgBound.width) {
    newStyle.left = 'calc(50% - ' + imgBound.width / 2 + 'px)';
  } else if (imgBound.left > bound.left) {
    newStyle.left = 'calc(50% - ' + bound.width / 2 + 'px)';
  } else if (imgBound.right < bound.right) {
    newStyle.left = 'calc(' + (bound.width / 2 - imgBound.width) + 'px + 50%)';
  }
  if (bound.height > imgBound.height) {
    newStyle.top = 'calc(50% - ' + imgBound.height / 2 + 'px)';
  } else if (imgBound.top > bound.top) {
    newStyle.top = 'calc(50% - ' + bound.height / 2 + 'px)';
  } else if (imgBound.bottom < bound.bottom) {
    newStyle.top = 'calc(' + (bound.height / 2 - imgBound.height) + 'px + 50%)';
  }
  if (newStyle.left || newStyle.top) {
    this.beginAnimateTimeout();
    this.$image.addStyle(newStyle);
  }
};
PhotoSwipeFragItem.prototype.ev_pan_mousedown = function (event) {
  $(document.body).on(_BrowserDetector["default"].isMobile ? 'pointermove' : 'mousemove', this.ev_pan_mousemove).on(_BrowserDetector["default"].isMobile ? 'pointerleave' : 'mouseleave', this.ev_pan_mousefinish).on(_BrowserDetector["default"].isMobile ? 'pointerup' : 'mouseup', this.ev_pan_mousefinish);
};
PhotoSwipeFragItem.prototype.ev_zoomin_mousedown = function (event) {
  this.beginAnimateTimeout();
  this.zoom(1.3, event);
};
PhotoSwipeFragItem.prototype.ev_zoomout_mousedown = function (event) {
  this.beginAnimateTimeout();
  this.zoom(1 / 1.3, event);
};
var _default = PhotoSwipeFrag;
exports["default"] = _default;

/***/ }),

/***/ 74328:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports._ = exports.$ = void 0;
var _absolAcomp = _interopRequireDefault(__webpack_require__(2515));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var SCore = new _Dom["default"]();
SCore.install(_absolAcomp["default"].core);
var _default = SCore;
exports["default"] = _default;
var _ = SCore._;
exports._ = _;
var $ = SCore.$;
exports.$ = $;

/***/ }),

/***/ 51686:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ASHField = ASHField;
exports.ASHTConfirmEvent = ASHTConfirmEvent;
exports.ASHTEditor = ASHTEditor;
exports.ASHTRow = ASHTRow;
exports.ASHTTable = ASHTTable;
exports.ASHTWaitValueEvent = ASHTWaitValueEvent;
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _generator = __webpack_require__(18528);
var _SCore = __webpack_require__(74328);
var _utils = __webpack_require__(84512);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _stringGenerate = __webpack_require__(10713);
var _util = __webpack_require__(92174);
var _stringUtils = __webpack_require__(26243);
var _SCScope = _interopRequireDefault(__webpack_require__(55830));
var _CCBlock = _interopRequireDefault(__webpack_require__(99125));
var _CBFunction = _interopRequireDefault(__webpack_require__(45632));
var _CCLine = _interopRequireDefault(__webpack_require__(83141));
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/**
 * @augments Fragment
 * @augments EventEmitter
 * @constructor
 */
function ASHTEditor(opt) {
  var _this = this;
  _EventEmitter["default"].call(this);
  _Fragment["default"].call(this);
  this.opt = new _Attributes["default"](this);
  Object.assign(this.opt, (0, _generator.copyJSVariable)(this.defaultOpt), opt);
  this.tableData = null;
  this.varialbeScope = new _SCScope["default"]();
  this.setContext('variableScope', this.varialbeScope);
  if (opt.context) {
    Object.keys(opt.context).forEach(function (key) {
      _this.varialbeScope.declareConst(key, opt.context[key]);
    });
  }
}
_OOP["default"].mixClass(ASHTEditor, _Fragment["default"], _EventEmitter["default"]);
ASHTEditor.prototype.defaultOpt = {
  autoStart: true
};
ASHTEditor.prototype.setData = function () {
  throw new Error("Not Implement!");
};
ASHTEditor.prototype.getData = function () {
  throw new Error("Not Implement!");
};
ASHTEditor.prototype.getRecords = function () {
  throw new Error("Not Implement!");
};
ASHTEditor.prototype.focusIncompleteCell = function () {
  throw new Error("Not Implement!");
};
ASHTEditor.prototype.insertRow = function (atIdx, record) {
  throw new Error("Not Implement!");
};
ASHTEditor.prototype.removeRow = function (atIdx) {
  throw new Error("Not Implement!");
};
Object.defineProperty(ASHTEditor.prototype, 'fragment', {
  get: function get() {
    return this.opt.fragment;
  },
  set: function set(value) {
    this.opt.fragment = value;
  }
});

/**
 *
 * @param row
 * @param pName
 * @constructor
 */
function ASHField(row, pName) {
  var _this2 = this;
  _CCBlock["default"].call(this);
  this.elt = (0, _SCore._)('td');
  this.row = row;
  this.pName = pName;
  this.isExtraField = false; //if true, this field is in record.extrainfo
  this.pId = null; //column id, use in block/line
  this.sync = this.renewDescriptor();
  if (this.sync) {
    this.sync = this.sync.then(function () {
      _this2.attachView();
      _this2.loadDescriptor();
      _this2.loadValue();
    });
  } else {
    this.attachView();
    this.loadDescriptor();
    this.loadValue();
  }
}
(0, _OOP.mixClass)(ASHField, _CCBlock["default"]);
ASHField.prototype.getVariablesContext = function () {
  return this.table.getVariablesContext();
};
ASHField.prototype.renewDescriptor = function () {
  var _this3 = this;
  var self = this;
  var originDescriptor = this.row.table.propertyDescriptors && this.row.table.propertyDescriptors[this.pName];
  var descriptor = {
    type: 'text'
  };
  if (originDescriptor && originDescriptor.pId) {
    this.pId = originDescriptor.pId;
  }
  if (originDescriptor.isExtraField) this.isExtraField = true;
  Object.keys(originDescriptor).forEach(function (key) {
    var assigned = false;
    var newValue = null;
    Object.defineProperty(descriptor, key, {
      enumerable: true,
      configurable: true,
      set: function set(value) {
        newValue = value;
        assigned = true;
      },
      get: function get() {
        if (assigned) return newValue;
        return _this3.row.table.propertyDescriptors && _this3.row.table.propertyDescriptors[_this3.pName] && _this3.row.table.propertyDescriptors[_this3.pName][key];
      }
    });
  });
  var fx = originDescriptor && originDescriptor.__fx__;
  var syncs = [];
  if (fx) {
    Object.keys(fx).reduce(function (ac, key) {
      if (key === 'onchange') {
        ac.onchange = originDescriptor.__fx__.onchange;
      } else if (key === 'switch') {
        Object.assign(descriptor, fx[key].getCase(self.record));
      } else {
        ac[key] = fx[key].invoke(self, self.record, self.getVariablesContext());
        if (ac[key] && ac[key].then) {
          ac[key] = ac[key].then(function (result) {
            ac[key] = result;
          });
          syncs.push(ac[key]);
        }
      }
      return ac;
    }, descriptor);
  }
  this.descriptor = descriptor;
  if ('calc' in descriptor) {
    this.elt.addClass('asht-calc');
  } else {
    this.elt.removeClass('asht-calc');
  }
  if (syncs.length > 0) return Promise.all(syncs).then(function () {
    if ('calc' in descriptor) {
      _this3.record[_this3.pName] = _this3.value;
    }
  });else {
    if ('calc' in descriptor) {
      this.record[this.pName] = this.value;
    }
  }
};
ASHField.prototype.implicit = function (value) {
  return value;
};
ASHField.prototype.isEmpty = function () {
  return this.isNoneValue(this.value);
};
ASHField.prototype.isNoneValue = function (value) {
  var descriptor = this.descriptor;
  return value === null || value === undefined || typeof value === "number" && !(0, _utils.isRealNumber)(value) || value === "" || value === descriptor.emptyValue;
};
ASHField.prototype.makeDefaultValue = function () {
  var descriptor = this.descriptor;
  if ('calc' in descriptor) return;
  if ('defaultValue' in descriptor && (this.value === undefined || this.value === null)) {
    this.value = descriptor.defaultValue;
  }
};
ASHField.prototype.attachView = function () {
  this.$text = (0, _SCore._)({
    text: '?[' + JSON.stringify(this.value) + ']'
  });
  this.elt.addChild(this.$text);
};
ASHField.prototype.execOnChange = function () {
  var self = this;
  var record = Object.assign({}, this.record);
  var extrainfo = record.extrainfo;
  if (extrainfo && extrainfo === 'object') {
    delete record.extrainfo;
    Object.assign(record, extrainfo);
  }
  var newRecord = Object.assign({}, record);
  var sync;
  if (this.descriptor.onchange) {
    sync = this.descriptor.onchange.invoke(this, newRecord, this.getVariablesContext());
  }
  function update() {
    var needUpdateSize = (0, _utils.keyStringOf)(newRecord, record);
    if (needUpdateSize) {
      Object.keys(newRecord).forEach(function (key) {
        if ((0, _utils.keyStringOf)(record[key]) !== (0, _utils.keyStringOf)(newRecord[key])) {
          if (self.row.propertyByName[key]) self.row.propertyByName[key].value = newRecord[key];
        }
      });
      _ResizeSystem["default"].update();
    }
  }
  if (sync && sync.then) {
    sync.then(update);
  } else update();
};
ASHField.prototype.notifyChange = function () {
  this.pinFire('value');
  this.row.notifyPropertyChange(this.pName);
};
ASHField.prototype.reload = function () {
  var sync = this.renewDescriptor();
  var update = function () {
    this.loadDescriptor();
    if ('calc' in this.descriptor) {
      var value = this.implicit(this.descriptor.calc);
      if (!this.isEqual(value, this.record[this.pName])) {
        this.execOnChange();
        this.notifyChange();
      }
    }
    this.loadValue();
  }.bind(this);
  if (sync) {
    sync.then(update);
  } else {
    update();
  }
  return sync;
};
ASHField.prototype.isEqual = function (a, b) {
  if (this.isNoneValue(a) && this.isNoneValue(b)) return true;
  return (0, _utils.keyStringOf)(a) === (0, _utils.keyStringOf)(b);
};
ASHField.prototype.loadDescriptor = _noop["default"];
ASHField.prototype.loadValue = _noop["default"];

/**
 * @name record
 * @memberOf ASHField
 * @type Object
 */
Object.defineProperty(ASHField.prototype, 'record', {
  get: function get() {
    return this.row.record;
  }
});

/**
 * @name table
 * @memberOf ASHField
 * @type TableData
 */
Object.defineProperty(ASHField.prototype, 'table', {
  get: function get() {
    return this.row.table;
  }
});

/***
 * @name fragment
 * @memberOf ASHField
 * @type FmFragment|null
 */
Object.defineProperty(ASHField.prototype, 'fragment', {
  get: function get() {
    return this.row.table.fragment;
  }
});

/***
 * @name value
 * @memberOf ASHField
 * @type any
 */
Object.defineProperty(ASHField.prototype, 'value', {
  get: function get() {
    if ('calc' in this.descriptor) {
      return this.descriptor.calc;
    }
    var record = this.row.record;
    if (this.isExtraField) {
      if (record.extrainfo && _typeof(record.extrainfo) === 'object') {
        return record.extrainfo[this.pName];
      } else return undefined;
    }
    return record[this.pName];
  },
  set: function set(value) {
    value = this.implicit(value);
    if (this.isNoneValue(value)) value = undefined;
    var record = this.row.record;
    var objCtn = record;
    var prevValue;
    if (this.isExtraField) {
      if (!record.extrainfo || _typeof(record.extrainfo) !== 'object') {
        record.extrainfo = {};
      }
      objCtn = record.extrainfo;
    }
    prevValue = objCtn[this.pName];
    if (!this.isEqual(value, prevValue)) {
      if (value === undefined) delete objCtn[this.pName];else objCtn[this.pName] = value;
      this.loadValue();
      this.execOnChange();
      this.notifyChange();
    }
  }
});
ASHField.prototype.pinHandlers.value = {
  get: function get() {
    return this.value;
  },
  receives: function receives(value) {
    this.value = value;
  }
};

/**
 * @augments EventEmitter
 * @augments Context
 * @param table
 * @param record
 * @constructor
 */
function ASHTRow(table, record) {
  _EventEmitter["default"].call(this);
  _Context["default"].apply(this);
  this.attach(table);
  this.table = table;
  this.id = (0, _stringGenerate.randomIdent)(24);
  this.busy = false;
  this.table.domSignal.on(this.id + '_property_change', this.ev_propertyChange.bind(this));
  this.render();

  /***
   *
   * @type {ASHField[]}
   */
  this.properties = [];
  this.propertyByName = {};
  this.changedPNames = [];
  this.record = record;
  this.lines = [];
  this.blocks = [];
  this.makeCircuit();
}
_OOP["default"].mixClass(ASHTRow, _EventEmitter["default"], _Context["default"]);
ASHTRow.prototype.render = function () {
  throw new Error("Not implement!");
};
ASHTRow.prototype.loadFields = function () {
  throw new Error("Not implement!");
};
ASHTRow.prototype.remove = function () {
  this.table.removeRow(this);
};
ASHTRow.prototype.makeCircuit = function () {
  var _this4 = this;
  var linesSource = this.table && this.table.formSource && this.table.formSource.lines;
  var blocksSource = this.table && this.table.formSource && this.table.formSource.blocks;
  if (blocksSource) {
    this.blocks = blocksSource.map(function (bs) {
      bs = Object.assign({}, bs);
      if (bs.tag !== "Function") return null; //only support Function now
      var block = new _CBFunction["default"]();
      block.attach(_this4);
      delete bs.tag;
      Object.assign(block.attributes, bs);
      return block;
    }).filter(function (x) {
      return !!x;
    });
  }
  var blockDict = this.blocks.reduce(function (ac, cr) {
    if (cr.attributes.name) ac[cr.attributes.name] = cr;
    ac[cr.id] = cr;
    return ac;
  }, {});
  blockDict = this.properties.reduce(function (ac, cr) {
    ac[cr.pName] = cr;
    if (cr.pId) ac[cr.pId] = cr;
    return ac;
  }, blockDict);
  if (linesSource) {
    this.lines = linesSource.map(function (ls) {
      var u = blockDict[ls.u];
      var v = blockDict[ls.v];
      if (!u || !v) return null;
      return new _CCLine["default"](u, ls.uPin, v, ls.vPin);
    }).filter(function (x) {
      return !!x;
    });
  }
};
ASHTRow.prototype.notifyPropertyChange = function (pName) {
  if (this.changedPNames.indexOf(pName) < 0) {
    this.changedPNames.push(pName);
    this.table.domSignal.emit(this.id + '_property_change');
    this.emit('property_change', {
      target: this,
      record: this.record,
      pName: pName
    }, this);
  }
};
ASHTRow.prototype.getIncompleteCells = function () {
  return this.properties.filter(function (cell) {
    return !!(cell.descriptor && (cell.descriptor.required || cell.descriptor.require) && cell.isEmpty());
  });
};
ASHTRow.prototype.makeDefaultValues = function () {
  this.properties.forEach(function (p) {
    return p.makeDefaultValue();
  });
};
ASHTRow.prototype.ev_propertyChange = function () {
  var changedPNames = this.changedPNames.splice(0, this.changedPNames.length);
  var self = this;
  var needUpdatePNames = this.propertyNames.filter(function (name) {
    if (changedPNames.indexOf(name) >= 0) return true;
    var dp = self.table.propertyDescriptors[name].__dependencies__;
    return changedPNames.some(function (cN) {
      return !!dp[cN];
    });
  });
  var sync = needUpdatePNames.map(function (name) {
    return self.propertyByName[name].reload();
  }).filter(function (p) {
    return !!p && p.then;
  });
  if (sync.length > 0) {
    Promise.all(sync).then(_ResizeSystem["default"].update.bind(_ResizeSystem["default"]));
  } else {
    _ResizeSystem["default"].update();
  }
};
ASHTRow.prototype.getHash = function () {
  return (0, _stringUtils.stringHashCode)(JSON.stringify(this.record));
};
Object.defineProperty(ASHTRow.prototype, 'record', {
  set: function set(value) {
    this.busy = true;
    this.rawRecord = value;
    this.loadFields();
    this.busy = false;
  },
  get: function get() {
    return this.rawRecord;
  }
});
Object.defineProperty(ASHTRow.prototype, 'fragment', {
  get: function get() {
    return this.table.fragment;
  }
});
Object.defineProperty(ASHTRow.prototype, 'propertyNames', {
  get: function get() {
    return this.table.propertyNames;
  }
});
Object.defineProperty(ASHTRow.prototype, 'propertyDescriptors', {
  get: function get() {
    return this.table.propertyDescriptors;
  }
});

//for name mapping
Object.defineProperty(ASHTRow.prototype, 'cells', {
  get: function get() {
    return this.properties;
  }
});

/**
 * @augments Context
 * @augments EventEmitter
 * @param editor
 * @param opt
 * @constructor
 */
function ASHTTable(editor, opt) {
  _Context["default"].apply(this, arguments);
  _EventEmitter["default"].call(this);
  this.editor = editor;
  this.opt = opt || {};
  this.formSource = null;
  this.propertyNames = [];
  this.propertyDescriptors = {};
  this.attach(editor);
}
_OOP["default"].mixClass(ASHTTable, _Context["default"], _EventEmitter["default"]);
ASHTTable.prototype.form2Desc = {
  TextInput: 'text',
  DateInput: 'date'
};
ASHTTable.prototype.form2Desc.ComboBox = function (nd, descriptor) {
  descriptor.type = 'ComboBox';
  descriptor.items = nd.items;
};
ASHTTable.prototype.form2Desc.TreeComboBox = function (nd, descriptor) {
  descriptor.type = 'TreeComboBox';
  descriptor.items = nd.items;
};
ASHTTable.prototype.form2Desc.TreeLeafComboBox = function (nd, descriptor) {
  descriptor.type = 'TreeLeafComboBox';
  descriptor.items = nd.items;
};

/**
 * from form to datasheet data
 */
ASHTTable.prototype.computeFormSource = function () {
  var _this5 = this;
  if (!this.formSource) return;
  var propertyNames = [];
  var propertyDescriptors = {};
  var labels = {}; //by id
  var visit = function visit(nd) {
    var name;
    var displayName;
    var descriptor;
    if (nd.children && nd.children.length > 0) {
      nd.children.forEach(visit);
      return;
    }
    if (nd.tag === 'Container') return;
    if (nd.tag === 'Label') {
      if (nd.id) labels[nd.id] = nd;
    } else {
      if (!nd.name) return; // not a property
      descriptor = {};
      propertyDescriptors[nd.name] = descriptor;
      propertyNames.push(nd.name);
      descriptor.text = labels[nd.id + '_label'] && labels[nd.id + '_label'].value || nd.name;
      descriptor.pId = nd.id;
      if (nd.readOnly) descriptor.readOnly = true;
      if (nd.outputMode) descriptor.readOnly = true;
      if (nd.isExtraField) descriptor.isExtraField = true;
      if ("value" in nd) {
        descriptor.defaultValue = nd.value;
      }
      var cvt = _this5.form2Desc[nd.tag] || (_TDBase["default"].typeClasses[nd.tag] ? nd.tag : null);
      if (typeof cvt === "string") {
        descriptor.type = cvt;
      } else if (typeof cvt === "function") {
        cvt(nd, descriptor);
      } else {
        descriptor.type = 'text';
      }
    }
  };
  visit(this.formSource.layout);
  this.propertyNames = propertyNames;
  this.propertyDescriptors = propertyDescriptors;
};
ASHTTable.prototype.computeHeader = function () {
  var propertyNames = this.propertyNames;
  var propertyDescriptors = this.propertyDescriptors;
  (0, _util.computeSheetDescriptor)(propertyNames, propertyDescriptors);
};
ASHTTable.prototype["import"] = function (data) {
  this.formSource = data.formSource;
  this.propertyNames = data.propertyNames;
  this.propertyDescriptors = data.propertyDescriptors;
  this.computeFormSource();
  this.computeHeader();
};
ASHTTable.prototype["export"] = function () {
  return {
    propertyNames: this.propertyNames,
    propertyDescriptors: this.propertyDescriptors,
    records: this.getRecords()
  };
};
ASHTTable.prototype.getLength = function () {
  throw new Error("Not Implement!");
};
ASHTTable.prototype.getRecords = function () {
  throw new Error("Not Implement!");
};
ASHTTable.prototype.addRowAt = function (idx, record) {
  throw new Error("Not Implement!");
};
ASHTTable.prototype.removeRowAt = function (idx) {};
ASHTTable.prototype.removeRow = function (row) {
  var idx = this.rowIndexOf(row);
  if (idx >= 0) {
    this.removeRowAt(idx);
  }
};
ASHTTable.prototype.rowIndexOf = function (row) {
  throw new Error("Not Implement!");
};
ASHTTable.prototype.rowAt = function (idx) {
  throw new Error("Not Implement!");
};
ASHTTable.prototype.getHash = function () {
  throw new Error("Not Implement!");
};
ASHTTable.prototype.getVariablesContext = function () {
  //variableScope
  var context = {};
  var variableScope;
  if (this.fragment) {
    /**
     * @type {SCScope}
     */
    variableScope = this.fragment.getContext('variableScope');
    if (variableScope) {
      variableScope = variableScope.makeFlattenedScope();
      Object.keys(variableScope.data).forEach(function (key) {
        context[key] = variableScope.data[key];
      });
    }
  }
  variableScope = this.getContext('variableScope');
  if (variableScope) {
    variableScope = variableScope.makeFlattenedScope();
    Object.keys(variableScope.data).forEach(function (key) {
      context[key] = variableScope.get(key);
    });
  }
  return context;
};

/**
 *
 * @param {{type:("cmd_remove_row" | "cmd_insert_row"), rowIdx: number, cmd: string}|{}}opt
 * @constructor
 */
function ASHTConfirmEvent(opt) {
  this.accepted = true;
  Object.assign(this, opt);
}

/**
 *
 * @param {boolean | Promise<boolean>} isAccepted
 */
ASHTConfirmEvent.prototype.accept = function (isAccepted) {
  this.accepted = isAccepted;
};

/**
 *
 * @param {function} callback
 */
ASHTConfirmEvent.prototype.afterThen = function (callback) {
  if (this.accepted && this.accepted.then) {
    this.accepted.then(callback);
  } else {
    callback(this.accepted);
  }
};

/**
 *
 * @param opt
 * @constructor
 */
function ASHTWaitValueEvent(opt) {
  this.result = null;
  Object.assign(this, opt);
}
ASHTWaitValueEvent.prototype.resolve = function (value) {
  this.result = value;
};

/**
 *
 * @param {function} callback
 */
ASHTWaitValueEvent.prototype.afterThen = function (callback) {
  if (this.result && this.result.then) {
    this.result.then(callback);
  } else {
    callback(this.result);
  }
};

/***/ }),

/***/ 490:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SCore = __webpack_require__(74328);
__webpack_require__(21546);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _util = __webpack_require__(92174);
var _Abstractions = __webpack_require__(51686);
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _TableData = _interopRequireDefault(__webpack_require__(21507));
var _TDDate = _interopRequireDefault(__webpack_require__(71701));
var _TDText = _interopRequireDefault(__webpack_require__(81822));
var _TDNumber = _interopRequireDefault(__webpack_require__(90123));
var _TDBoolean = _interopRequireDefault(__webpack_require__(24839));
var _TDEEnum = _interopRequireDefault(__webpack_require__(23270));
var _TDEEnumSet = _interopRequireDefault(__webpack_require__(64638));
var _TDDateNLevel = _interopRequireDefault(__webpack_require__(57088));
var _TDEnum = _interopRequireDefault(__webpack_require__(6213));
var _TDEnumSet = _interopRequireDefault(__webpack_require__(6713));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends Fragment
 * @param opt
 * @constructor
 */
function FormArrayEditor(opt) {
  _Abstractions.ASHTEditor.call(this, opt);
  this.$domSignal = (0, _SCore._)('attachhook');
  this.domSignal = new _DomSignal["default"](this.$domSignal);
}
_OOP["default"].mixClass(FormArrayEditor, _Abstractions.ASHTEditor);
FormArrayEditor.prototype.setData = function (data) {
  var _this = this;
  data = (0, _util.duplicateData)(data);
  this.$body.clearChild();
  this.tableData = new FATable(this, this.opt);
  this.tableData["import"](data);
  this.tableData.records.forEach(function (rc) {
    _this.$body.addChild(rc.domRows);
    _this.$body.addChild((0, _SCore._)({
      "class": 'asht-form-array-break',
      tag: 'tr',
      child: {
        tag: "td",
        attr: {
          colspan: 2
        }
      }
    }));
  });
  //

  _ResizeSystem["default"].updateUp(this.$view, true);
};
FormArrayEditor.prototype.getData = function () {};
FormArrayEditor.prototype.createView = function () {
  this.$view = (0, _SCore._)({
    elt: this.opt.elt,
    "class": 'asht-form-array-editor',
    child: [this.$domSignal, {
      tag: 'table',
      "class": 'asht-form-array',
      child: [{
        tag: 'tbody',
        child: []
      }]
    }]
  });
  this.$body = (0, _SCore.$)('tbody', this.$view);
  this.$view.fae = this;
};
var _default = FormArrayEditor;
exports["default"] = _default;
function FATable(editor, opt) {
  _Abstractions.ASHTTable.call(this, editor, opt);
  _OOP["default"].drillProperty(this, this.editor, 'domSignal');
}
_OOP["default"].mixClass(FATable, _Abstractions.ASHTTable);
FATable.prototype["import"] = function (data) {
  var _this2 = this;
  _Abstractions.ASHTTable.prototype["import"].apply(this, arguments);
  this.records = data.records.map(function (rc) {
    return new FARow(_this2, rc);
  });
};

/**
 * @extends ASHTRow
 * @param table
 * @param record
 * @constructor
 */
function FARow(table, record) {
  _Abstractions.ASHTRow.call(this, table, record);
}
_OOP["default"].mixClass(FARow, _Abstractions.ASHTRow);
FARow.prototype.render = function () {};
FARow.prototype.loadFields = function () {
  var _this3 = this;
  var propertyNames = this.propertyNames;
  var propertyDescriptors = this.propertyDescriptors;
  this.fields = this.table.propertyNames.map(function (pName) {
    var descriptor = propertyDescriptors[pName] || {
      type: 'notSupport'
    };
    var clazz = FAField.typeClasses[descriptor.type] || FAField;
    return new clazz(_this3, pName);
  });
  this.domRows = this.fields.map(function (field) {
    return field.rowElt;
  });
};

/**
 * @extends ASHField
 * @param row
 * @param pName
 * @constructor
 */
function FAField(row, pName) {
  _Abstractions.ASHField.apply(this, arguments);
  var descriptor = this.row.table.propertyDescriptors[pName];
  this.rowElt = (0, _SCore._)({
    tag: 'tr',
    child: [{
      tag: 'td',
      child: {
        text: descriptor.text || pName
      }
    }, this.elt]
  });
}
_OOP["default"].mixClass(FAField, _Abstractions.ASHField);
FAField.typeClasses = {
  notSupport: FAField
};

/**
 * @extends FAField
 * @param row
 * @param pName
 * @constructor
 */
function FADate(row, pName) {
  FAField.call(this, row, pName);
}
_OOP["default"].mixClass(FADate, FAField, _TDDate["default"]);
FAField.typeClasses.date = FADate;
FAField.typeClasses.Date = FADate;

/**
 * @extends FAField
 * @param row
 * @param pName
 * @constructor
 */
function FADateNLevel(row, pName) {
  FAField.call(this, row, pName);
}
_OOP["default"].mixClass(FADateNLevel, FAField, _TDDateNLevel["default"]);
FAField.typeClasses.datenlevel = FADateNLevel;
FAField.typeClasses.DateNLevel = FADateNLevel;

/**
 * @extends FAField
 * @param row
 * @param pName
 * @constructor
 */
function FAText(row, pName) {
  FAField.call(this, row, pName);
}
_OOP["default"].mixClass(FAText, FAField, _TDText["default"]);
FAField.typeClasses.text = FAText;
FAField.typeClasses.string = FAText;

/**
 * @extends FAField
 * @param row
 * @param pName
 * @constructor
 */
function FANumber(row, pName) {
  FAField.call(this, row, pName);
}
_OOP["default"].mixClass(FANumber, FAField, _TDNumber["default"]);
FAField.typeClasses.number = FANumber;

/**
 * @extends FAField
 * @param row
 * @param pName
 * @constructor
 */
function FABoolean(row, pName) {
  FAField.call(this, row, pName);
}
_OOP["default"].mixClass(FABoolean, FAField, _TDBoolean["default"]);
FAField.typeClasses.bool = FABoolean;
FAField.typeClasses["boolean"] = FABoolean;

/**
 * @extends FAField
 * @param row
 * @param pName
 * @constructor
 */
function FAEnum(row, pName) {
  FAField.call(this, row, pName);
}
_OOP["default"].mixClass(FAEnum, FAField, _TDEnum["default"]);
FAField.typeClasses["enum"] = FAEnum;
FAField.typeClasses.Emum = FAEnum;

/**
 * @extends FAField
 * @param row
 * @param pName
 * @constructor
 */
function FAEnumSet(row, pName) {
  FAField.call(this, row, pName);
}
_OOP["default"].mixClass(FAEnumSet, FAField, _TDEnumSet["default"]);
FAField.typeClasses.EnumSet = FAEnumSet;
FAField.typeClasses['{enum}'] = FAEnumSet;

/***/ }),

/***/ 73074:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var languageTexts = {
  vi: {
    cut: 'Cắt',
    copy: 'Sao chép',
    'delete': 'Xóa hàng',
    paste: 'Dán',
    addRowBefore: 'Thêm hàng trước',
    addRowAfter: 'Thêm hàng sau'
  },
  en: {
    cut: 'Cut',
    copy: 'Copy',
    'delete': 'Delete Row',
    paste: 'Paste',
    addRowBefore: 'Add Row Before',
    addRowAfter: 'Add Row After'
  }
};
var getCode = function getCode() {
  var code;
  if (window.LanguageModule) code = window.LanguageModule.code;
  if (!code) code = navigator.language;
  if (!code) code = 'en';
  code = code.toLowerCase();
  if (['vi', 'vn'].indexOf(code) >= 0) code = 'vi';
  return code;
};
var mlTextOf = function mlTextOf(key) {
  var code = getCode();
  var text = languageTexts[code] && languageTexts[code][key];
  if (text) return text;
  return languageTexts.en[key];
};
var TECommandDescriptors = {
  cut: {
    type: 'trigger',
    icon: 'span.mdi.mdi-content-cut',
    desc: 'Cut',
    bindKey: {
      win: 'Ctrl-X',
      mac: 'TODO?'
    }
  },
  copy: {
    type: 'trigger',
    icon: 'span.mdi.mdi-content-copy',
    desc: 'Copy',
    bindKey: {
      win: 'Ctrl-C',
      mac: 'TODO?'
    }
  },
  "delete": {
    type: 'trigger',
    icon: 'span.mdi.mdi-table-row-remove',
    desc: mlTextOf('delete'),
    bindKey: {
      win: 'Delete',
      mac: 'TODO?'
    }
  },
  paste: {
    type: 'ribbon',
    desc: 'Paste',
    icon: 'span.mdi.mdi-content-paste',
    items: [{
      text: 'Paste In',
      icon: 'span.mdi.mdi-content-paste'
    }, {
      text: 'Paste Before',
      icon: 'span.mdi.mdi-content-paste',
      args: ['BEFORE']
    }, {
      text: 'Paste After',
      icon: 'span.mdi.mdi-content-paste',
      args: ['AFTER']
    }]
  },
  addRowBefore: {
    type: 'trigger',
    icon: "span.mdi.mdi-table-row-plus-before",
    desc: mlTextOf('addRowBefore')
  },
  addRowAfter: {
    type: 'trigger',
    icon: "span.mdi.mdi-table-row-plus-after",
    desc: mlTextOf('addRowAfter')
  },
  "export": {
    type: 'trigger',
    icon: 'span.mdi.mdi-file-export',
    desc: 'Xuất file',
    bindKey: {
      win: 'Ctrl-E',
      mac: 'TODO?'
    }
  }
};
var _default = TECommandDescriptors;
exports["default"] = _default;

/***/ }),

/***/ 79470:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(21225);
var _SCore = __webpack_require__(74328);
var _TableData = _interopRequireDefault(__webpack_require__(21507));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
__webpack_require__(20619);
__webpack_require__(90419);
__webpack_require__(20445);
var _TDEDateTime = _interopRequireDefault(__webpack_require__(65478));
__webpack_require__(23270);
__webpack_require__(64638);
__webpack_require__(9815);
__webpack_require__(46946);
__webpack_require__(46071);
__webpack_require__(4270);
__webpack_require__(61267);
__webpack_require__(24409);
__webpack_require__(43610);
__webpack_require__(46581);
__webpack_require__(29885);
var _ContextMenu = _interopRequireDefault(__webpack_require__(24733));
var _OOP = _interopRequireWildcard(__webpack_require__(38608));
var _EventEmitter = _interopRequireWildcard(__webpack_require__(46833));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _Toast = _interopRequireDefault(__webpack_require__(68105));
var _TDRecord = _interopRequireDefault(__webpack_require__(11090));
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _dialogs = __webpack_require__(43076);
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _Clipboard = __webpack_require__(89085);
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _util = __webpack_require__(92174);
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
var _utils = __webpack_require__(84512);
var _Abstractions = __webpack_require__(51686);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _stringFormat = __webpack_require__(22294);
var _attribute = __webpack_require__(18144);
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _Scroller = __webpack_require__(87780);
var _CMDTool = _interopRequireWildcard(__webpack_require__(97847));
var _Follower = _interopRequireDefault(__webpack_require__(48414));
var _TECommandDescriptors = _interopRequireDefault(__webpack_require__(73074));
var _generator = __webpack_require__(18528);
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function getScrollSize() {
  var parent = (0, _SCore._)({
    style: {
      'z-index': '-100',
      opacity: '0',
      width: '100px',
      height: '100px',
      overflow: 'scroll',
      top: '0',
      left: '0',
      'box-sizing': 'content-box',
      position: 'fixed'
    }
  }).addTo(document.body);
  var child = (0, _SCore._)({
    style: {
      width: '100%',
      height: '100%'
    }
  }).addTo(parent);
  var parentBound = parent.getBoundingClientRect();
  var childBound = child.getBoundingClientRect();
  return {
    width: parentBound.width - childBound.width,
    height: parentBound.height - childBound.height
  };
}
var EV_CONTENT_CHANGE = 'contentchange';

/***
 * @typedef TableEditorOpt
 *
 */

/***
 * @extends EventEmitter
 * @constructor
 */
function TableEditor(opt) {
  var _this = this;
  _Abstractions.ASHTEditor.call(this, opt);
  this.lcEmitter = new _EventEmitter["default"]();
  this.autoStateMng = new StateAutoManager(this);
  this.layoutCtrl = new LayoutController(this);
  this.selectTool = new SelectTool(this);
  this.editTool = new EditTool(this);
  this.cmdTool = new _CMDTool["default"](this);
  this.cmdToolDelegate = new TECMDToolDelegate(this);
  this.cmdTool.delegate = this.cmdToolDelegate;
  this.commandCtrl = new CommandController(this);
  this.fixedYCtrl = new TEFixedYController(this);
  this.fixedXCtrl = new TEFixedXController(this);
  this.fixedXYCtrl = new TEFixedXYController(this);
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
  this.lcEmitter.on(EV_CONTENT_CHANGE, function () {
    _this.fixedXYCtrl.updateContent();
    _this.fixedYCtrl.updateContent();
    _this.fixedXCtrl.updateContent();
    _ResizeSystem["default"].updateUp(_this.$view, true);
    _this.cmdToolDelegate.updateVisibility();
  });
}
_OOP["default"].mixClass(TableEditor, _Abstractions.ASHTEditor);
TableEditor.prototype.opt = {};
TableEditor.prototype.createView = function () {
  var _this2 = this;
  _ContextMenu["default"].auto();
  this.$view = (0, _SCore._)({
    elt: this.opt.elt,
    extendEvent: 'contextmenu',
    attr: {
      tabindex: '1'
    },
    "class": ['asht-table-editor'],
    child: ['attachhook', {
      "class": 'asht-table-editor-header',
      child: this.cmdTool.getView()
    }, {
      "class": 'asht-table-editor-body',
      child: [{
        "class": 'asht-table-editor-main-viewport',
        child: [{
          "class": 'asht-table-editor-main-scroller',
          child: 'table.asht-table-data'
        }, {
          "class": 'asht-table-editor-fixed-y-viewport',
          child: {
            "class": 'asht-table-editor-fixed-y-scroller',
            child: {
              "class": 'asht-table-editor-fixed-y-size-wrapper',
              child: {
                tag: 'table',
                "class": 'asht-table-editor-fixed-y'
              }
            }
          }
        }, {
          "class": 'asht-table-editor-fixed-x-viewport',
          child: {
            "class": 'asht-table-editor-fixed-x-scroller',
            child: {
              tag: 'table',
              "class": 'asht-table-editor-fixed-x'
            }
          }
        }, {
          "class": 'asht-table-editor-fixed-xy-viewport',
          child: {
            tag: 'table',
            "class": 'asht-table-editor-fixed-xy',
            child: {
              tag: 'thead',
              child: {
                tag: 'tr',
                child: 'td'
              }
            }
          }
        }, {
          "class": 'asht-table-editor-foreground',
          child: ['.asht-table-editor-selected-box']
        }, '.asht-table-editor-editing-box']
      }, {
        tag: 'vscrollbar',
        "class": 'asht-table-editor-v-scrollbar',
        child: {}
      }, {
        tag: _Scroller.HScrollbar,
        "class": 'asht-table-editor-h-scrollbar'
      }]
    }]
  });
  this.$attachook = (0, _SCore.$)('attachhook', this.$view);
  this.$attachook.requestUpdateSize = this.ev_resize;
  this.$attachook.on('attached', function () {
    _ResizeSystem["default"].add(_this2.$attachook);
    _this2.ev_resize();
  });
  this.$view.requestUpdateSize = this.ev_resize;
  this.$domSignal = (0, _SCore._)('attachhook').addTo(this.$view);
  this.domSignal = new _DomSignal["default"](this.$domSignal);
  this.$body = (0, _SCore.$)('.asht-table-editor-body', this.$view);
  this.$body = (0, _SCore.$)('.asht-table-editor-body', this.$view);
  this.$mainViewport = (0, _SCore.$)('.asht-table-editor-main-viewport', this.$view);
  this.$mainScroller = (0, _SCore.$)('.asht-table-editor-main-scroller', this.$view);
  this.$tableData = (0, _SCore.$)('table.asht-table-data', this.$view);
  this.$hscrollbar = (0, _SCore.$)('.asht-table-editor-h-scrollbar', this.$view);
  this.$vscrollbar = (0, _SCore.$)('.asht-table-editor-v-scrollbar', this.$view);
  this.$fixedYScroller = (0, _SCore.$)('.asht-table-editor-fixed-y-scroller', this.$view);
  this.$fixedXScroller = (0, _SCore.$)('.asht-table-editor-fixed-x-scroller', this.$view);
  this.$foreground = (0, _SCore.$)('.asht-table-editor-foreground', this.$view);
  this.$editingbox = (0, _SCore.$)('.asht-table-editor-editing-box', this.$view).addStyle('display', 'none');
  this.$selectedbox = (0, _SCore.$)('.asht-table-editor-selected-box', this.$foreground).addStyle('display', 'none');
  this.$header = (0, _SCore.$)('.asht-table-editor-header', this.$view);
  this.$headRow = (0, _SCore.$)('tr', this.$header);
  this.opt.loadAttributeHandlers(this.optHandlers);
  this.$view.tableEditor = this;
  var scrollSize = getScrollSize();
  this.$view.addStyle('--sys-scrollbar-width', scrollSize.width + 'px');
  this.$view.addStyle('--sys-scrollbar-height', scrollSize.height + 'px');
  this.autoStateMng.onViewCreated();
  this.layoutCtrl.onViewCreated();
  this.fixedYCtrl.onViewCreated();
  this.fixedXCtrl.onViewCreated();
  this.fixedXYCtrl.onViewCreated();
  this.selectTool.onViewCreated();
  this.editTool.onViewCreated();
  this.commandCtrl.onViewCreated();
  return this.$view;
};
TableEditor.prototype.isDescendantElt = function (elt) {
  while (elt) {
    if (elt === this.$view) return true;
    elt = elt.sponsorElement || elt.parentElement;
  }
  return false;
};
TableEditor.prototype.setData = function (data) {
  data = (0, _util.duplicateData)(data);
  if (this.$tableData) this.$tableData.remove();
  var tableData = new _TableData["default"](this, {
    elt: this.$tableData
  });
  this.$mainScroller.addChild(this.$tableData);
  tableData["import"](data);
  this.tableData = tableData;
  this.layoutCtrl.onData();
  //? this.domSignal.emit('request_load_foreground_content');
  tableData.on('new_row_property_change', this.ev_newRowPropertyChange);
};
TableEditor.prototype.getHash = function () {
  if (this.tableData) return this.tableData.getHash();
  return 0;
};
TableEditor.prototype.getData = function () {
  return this.tableData && this.tableData["export"]();
};
TableEditor.prototype.getRecords = function () {
  return this.tableData && this.tableData.records;
};
TableEditor.prototype.onStart = function () {
  // console.log('start')
};
TableEditor.prototype.onStop = function () {
  // console.log('stop')
};
TableEditor.prototype.ev_resize = function (event) {
  this.layoutCtrl.onResize();
  this.editTool.updateEditingBoxPosition();
  this.selectTool.updateSelectedPosition();
};
var t = 10;
TableEditor.prototype.ev_newRowPropertyChange = function (event) {
  this.tableData.flushNewRow({});
  this.fixedXCtrl.updateContent();
  (0, _utils.vScrollIntoView)(this.tableData.newRow.elt);
};
TableEditor.prototype.editCellDelay = function (row, col) {
  this.editTool.editCellDelay(row, col);
};
TableEditor.prototype.editCell = function (row, col) {
  this.editTool.editCell(row, col);
};
TableEditor.prototype.selectRow = function (row) {
  this.selectTool.selectRow(row);
};
TableEditor.prototype.selectCol = function (col) {
  this.selectTool.selectCol(col);
};
TableEditor.prototype.selectAll = function () {
  this.selectTool.selectAll();
};
TableEditor.prototype.focusIncompleteCell = function () {
  this.editTool.focusIncompleteCell();
};
TableEditor.prototype.insertRow = function (atIdx, record) {
  var tableData = this.tableData;
  tableData.addRowAt(atIdx, record);
  this.lcEmitter.emit(EV_CONTENT_CHANGE);
};
TableEditor.prototype.removeRow = function (atIdx) {
  var tableData = this.tableData;
  tableData.removeRowAt(atIdx);
  this.lcEmitter.emit(EV_CONTENT_CHANGE);
};
TableEditor.prototype.showError = function (title, message) {
  var toast = _Toast["default"].make({
    props: {
      htitle: title,
      message: message,
      variant: 'error'
    }
  });
  setTimeout(toast.disappear.bind(toast), 2000);
};
TableEditor.prototype.optHandlers = {};
TableEditor.prototype.optHandlers.readOnly = {
  set: function set(value) {
    if (value) {
      this.$view.addClass('asht-read-only');
    } else {
      this.$view.removeClass('asht-read-only');
    }
    // ResizeSystem.update();
  },

  get: function get() {
    return this.$view.hasClass('asht-read-only');
  },
  descriptor: {
    type: 'bool'
  }
};
TableEditor.prototype.optHandlers.headless = {
  set: function set(value) {
    if (value) {
      this.$view.addClass('asht-headless');
    } else {
      this.$view.removeClass('asht-headless');
    }
    // ResizeSystem.update();
  },

  get: function get() {
    return this.$view.hasClass('asht-headless');
  }
};
TableEditor.prototype.optHandlers.extendCommands = {
  /**
   * @this TableEditor
   * @param value
   * @param ref
   * @returns {string[]}
   */
  set: function set(value, ref) {
    value = value || [];
    if (typeof value === 'string') {
      value = value.trim().split(/[\s,.]+/);
    } else if (Array.isArray(value)) {
      value = value.filter(function (item) {
        return typeof item === 'string' && item.trim().length > 0;
      });
    }
    ref.set(value);
    this.cmdToolDelegate.refresh();
    return value;
  },
  get: function get(ref) {
    var value = ref.get();
    if (!value) return [];
    return value;
  }
};
Object.defineProperty(TableEditor.prototype, 'records', {
  get: function get() {
    return this.tableData && this.tableData.records;
  }
});
var _default = TableEditor;
/***
 *
 * @param {TableEditor} editor
 * @constructor
 */
exports["default"] = _default;
function StateAutoManager(editor) {
  this.editor = editor;
}
StateAutoManager.prototype.onViewCreated = function () {
  var _this3 = this;
  this.editor.domSignal.once('autostart', function () {
    if (_this3.editor.opt.autoStart && _this3.editor.state === 'STANDBY' || _this3.editor.state === 'CREATE') {
      _this3.editor.start();
    }
  });
  this.editor.domSignal.emit('autostart');
};

/***
 *
 * @param {TableEditor} editor
 * @constructor
 */
function SelectTool(editor) {
  var _this4 = this;
  this.editor = editor;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) _this4[key] = _this4[key].bind(_this4);
  });
  this.hoverRow = null;
  this.selectedData = null;
}
SelectTool.prototype.onViewCreated = function () {
  // this.editor.$editingLayer.on('mousedown', this.ev_editLayerMouseDown);
  // this.editor.$rootCell.on('mousedown', this.ev_rootCellMouseDown);
  // this.editor.$headRow.on('mousedown', this.ev_headerMouseDown);
  // this.editor.$indexCol.on('mousedown', this.ev_indexColMouseDown);
};
SelectTool.prototype.selectRow = function (row) {
  if (row) {
    this.selectedData = {
      type: 'row',
      row: row
    };
    this.editor.$selectedbox.removeStyle('display');
    this.updateSelectedPosition();
  } else {
    // this.$selectrow
    this.selectedData = null;
    this.editor.$selectedbox.addStyle('display', 'none');
  }
};
SelectTool.prototype.selectCol = function (col) {
  if (col) {
    this.selectedData = {
      type: 'col',
      col: col
    };
    this.editor.$selectedbox.removeStyle('display');
    this.updateSelectedPosition();
  } else {
    this.selectedData = null;
    this.editor.$selectedbox.addStyle('display', 'none');
  }
};
SelectTool.prototype.updateSelectedPosition = function () {
  if (!this.selectedData) return;
  var tBound;
  var fBound = this.editor.$foreground.getBoundingClientRect();
  if (this.selectedData.row) {
    var row = this.selectedData.row;
    var rBound = row.elt.getBoundingClientRect();
    this.editor.$selectedbox.addStyle({
      left: rBound.left - fBound.left - 1 + 'px',
      // boder-width = 2px
      top: rBound.top - fBound.top - 1 + 'px',
      'min-width': rBound.width + 2 + 'px',
      'min-height': rBound.height + 2 + 'px'
    });
  } else if (this.selectedData.col) {
    var col = this.selectedData.col;
    var cBound = col.elt.getBoundingClientRect();
    tBound = col.elt.parentElement.parentElement.parentElement.getBoundingClientRect();
    this.editor.$selectedbox.addStyle({
      left: cBound.left - fBound.left - 1 + 'px',
      // boder-width = 2px
      top: tBound.top - fBound.top - 1 + 'px',
      'min-width': cBound.width + 2 + 'px',
      'min-height': tBound.height + 2 + 'px'
    });
  } else if (this.selectedData.type === 'all') {
    tBound = this.editor.tableData.$view.getBoundingClientRect();
    this.editor.$selectedbox.addStyle({
      left: tBound.left - fBound.left - 1 + 'px',
      // boder-width = 2px
      top: tBound.top - fBound.top - 1 + 'px',
      'min-width': tBound.width + 2 + 'px',
      'min-height': tBound.height + 2 + 'px'
    });
  }
};
SelectTool.prototype.selectAll = function () {
  this.selectedData = {
    type: 'all'
  };
  this.editor.$selectedbox.removeStyle('display');
  this.updateSelectedPosition();
};
SelectTool.prototype.ev_rootCellMouseDown = function (ev) {
  if (this.editor.opt.readOnly) return;
  this.selectAll();
  var row = this.editor.tableData.findRowByIndex(0);
  var col = this.editor.tableData.findColByIndex(0);
  if (row && col) {
    this.editor.editCellDelay(row, col);
  }
};
SelectTool.prototype.ev_indexColMouseDown = function (ev) {
  var y = ev.clientY;
  this.hoverRow = this.editor.tableData.findRowByClientY(y);
  if (this.hoverRow) {
    this.selectRow(this.hoverRow);
    this.editor.editCellDelay(this.hoverRow, this.editor.tableData.headCells[0]);
  }
};
SelectTool.prototype.ev_headerMouseDown = function (ev) {
  // if (this.opt.readOnly) return;
  var x = ev.clientX;
  var col = this.editor.tableData.findColByClientX(x);
  var row;
  if (col) {
    this.editor.selectCol(col);
    row = this.editor.tableData.findRowByIndex(0);
    if (row) {
      this.editor.editCellDelay(row, col);
    }
  }
};

/***
 *
 * @param {TableEditor} editor
 * @constructor
 */
function EditTool(editor) {
  var _this5 = this;
  this.editor = editor;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) _this5[key] = _this5[key].bind(_this5);
  });
}
EditTool.prototype.onViewCreated = function () {};
EditTool.prototype.editCell = function (row, col) {
  if (this.currentCellEditor) {
    this.currentCellEditor.off('finish', this.ev_cellEditorFinish);
    this.currentCellEditor.destroy();
    this.currentCellEditor = null;
    // if (document.activeElement && AElement.prototype.isDescendantOf.call(document.activeElement, this.$editingbox)){
    //     // document.activeElement.blur();
    // }
    this.editor.$editingbox.clearChild();
  }
  if (row && col) {
    var cell = row.cells[col.index];
    var EditorClass = _TDEBase["default"].typeClasses[cell.descriptor.type];
    if (EditorClass) {
      this.currentCellEditor = new EditorClass(this.editor, row.cells[col.index]);
      this.editor.$editingbox.removeStyle('display');
      this.currentCellEditor.start();
    } else {
      this.currentCellEditor = null;
      this.editor.showError('Data Error', 'Not support ' + cell.descriptor.type);
      this.editor.$editingbox.addStyle('display', 'none');
    }
    this.updateEditingBoxPosition();
    this.editor.layoutCtrl.scrollIntoRow(row);
    this.editor.layoutCtrl.scrollIntoCol(col);
    if (this.currentCellEditor) {
      this.currentCellEditor.on('finish', this.ev_cellEditorFinish);
    }
  } else {
    this.editor.$editingbox.addStyle('display', 'none');
  }
  this.editor.cmdToolDelegate.updateVisibility();
};
EditTool.prototype.editCellDelay = function (row, col) {
  var _this6 = this;
  setTimeout(function () {
    _this6.editCell(row, col);
  }, 100);
};
EditTool.prototype.updateEditingBoxPosition = function () {
  if (!this.currentCellEditor) return;
  var cellEditor = this.currentCellEditor;
  var elt = cellEditor.cell.elt;
  var eLBound = this.editor.$body.getBoundingClientRect();
  var eBound = elt.getBoundingClientRect();
  var left = eBound.left - eLBound.left;
  var width = eBound.width;
  this.editor.$editingbox.addStyle({
    left: left - 0.5 + 'px',
    top: eBound.top - eLBound.top - 0.5 + 'px',
    '--cell-width': width - 1 + 'px',
    //border
    '--cell-height': eBound.height - 1 + 'px'
  });
};
EditTool.prototype.focusIncompleteCell = function () {
  if (!this.editor.tableData) return false;
  var incompleteCell = this.editor.tableData.findFirsIncompleteCell();
  if (!incompleteCell) return false;
  var col = this.editor.tableData.findColByName(incompleteCell.pName);
  this.editCellDelay(incompleteCell.row, col);
  return true;
};
EditTool.prototype.ev_cellEditorFinish = function (event) {
  if (this.currentCellEditor === event.target) {
    this.editCellDelay(null);
  }
};

/***
 *
 * @param {TableEditor} editor
 * @constructor
 */
function LayoutController(editor) {
  var _this7 = this;
  this.editor = editor;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) _this7[key] = _this7[key].bind(_this7);
  });
  this.extendStyle = Object.assign(new _Attributes["default"](this), this.extendStyle);
}
LayoutController.prototype.extendStyle = {
  width: 'auto',
  height: 'auto'
};
LayoutController.prototype.styleHandlers = {};
LayoutController.prototype.styleHandlers.width = {
  /**
   * @this LayoutController
   * @param value
   */
  set: function set(value) {
    if (typeof value === 'number') value += 'px';else if (typeof value !== "string") value = 'auto';
    var psValue;
    if (value === 'auto') {
      this.editor.$view.style.width = null;
      this.editor.$view.addClass('as-width-auto');
    } else if (value.indexOf('calc(') >= 0) {
      this.editor.$view.style.width = value;
      this.editor.$view.removeClass('as-width-auto');
    } else {
      psValue = (0, _attribute.parseMeasureValue)(value);
      if (psValue) {
        if (['px', 'vw', 'vh', 'em', 'rem', 'pt'].indexOf(psValue.unit) >= 0) {
          this.editor.$view.style.width = value;
          this.editor.$view.removeClass('as-width-auto');
        } else {
          this.editor.$view.style.width = null;
          this.editor.$view.addClass('as-width-auto');
        }
      } else {
        this.editor.$view.style.width = null;
        this.editor.$view.addClass('as-width-auto');
      }
    }
    return value;
  }
};
LayoutController.prototype.styleHandlers.height = {
  /**
   * @this LayoutController
   * @param value
   */
  set: function set(value) {
    if (typeof value === 'number') value += 'px';else if (typeof value !== "string") value = 'auto';
    var psValue;
    if (value === 'auto') {
      this.editor.$view.style.height = null;
      this.editor.$view.addClass('as-height-auto');
    } else if (value.indexOf('calc(')) {
      this.editor.$view.style.height = value;
      this.editor.$view.removeClass('as-height-auto');
    } else {
      psValue = (0, _attribute.parseMeasureValue)(value);
      if (psValue) {
        if (['px', 'vw', 'vh', 'em', 'rem', 'pt'].indexOf(psValue.unit) < 0) {
          this.editor.$view.style.height = null;
          this.editor.$view.addClass('as-height-auto');
        } else {
          this.editor.$view.style.height = value;
          this.editor.$view.removeClass('as-height-auto');
        }
      } else {
        this.editor.$view.style.height = null;
        this.editor.$view.addClass('as-height-auto');
      }
    }
    return value;
  }
};
LayoutController.prototype.addStyle = function () {
  var arg0 = arguments[0];
  var arg1 = arguments[1];
  var key;
  if (arguments.length === 1) {
    if (_typeof(arg0) === "object") {
      for (key in arg0) {
        this.addStyle(key, arg0[key]);
      }
    }
  } else if (arguments.length === 2) {
    if (arg0 === '--as-width') arg0 = 'width';
    if (arg0 === '--as-height') arg0 = 'height';
    if (typeof arg0 === 'string') {
      if (arg0.startsWith('--')) {
        this.editor.$view.style.setProperty(arg0, arg1);
      } else {
        if (arg0.indexOf('-') >= 0) {
          arg0 = (0, _stringFormat.kebabCaseToCamelCase)(arg0);
        }
        if (this.styleHandlers[arg0]) {
          this.extendStyle[arg0] = arguments[1];
        } else {
          this.editor.$view.style[arg0] = arg1;
        }
      }
    }
  }
  return this.editor.$view;
};
LayoutController.prototype.removeStyle = function () {
  var arg0 = arguments[0];
  if (arguments.length === 1) {
    if (arg0 === '--as-width') arg0 = 'width';
    if (arg0 === '--as-height') arg0 = 'height';
    if (arg0.startsWith('--')) {
      this.editor.$view.style.removeProperty(arg0);
    } else {
      if (arg0.indexOf('-') >= 0) {
        arg0 = (0, _stringFormat.kebabCaseToCamelCase)(arg0);
      }
      if (this.styleHandlers[arg0]) this.extendStyle[arg0] = null;else this.editor.$view.style[arg0] = null;
    }
  } else {
    for (var i = 0; i < arguments.length; ++i) {
      this.removeStyle(arguments[i]);
    }
  }
  return this.editor.$view;
};
LayoutController.prototype.onViewCreated = function () {
  this.editor.$view.extendStyle = this.extendStyle;
  this.extendStyle.loadAttributeHandlers(this.styleHandlers);
  this.editor.$view.addStyle = this.addStyle.bind(this);
  this.editor.$view.removeStyle = this.removeStyle.bind(this);
  this.editor.$hscrollbar.on('scroll', this.ev_scroll.bind(this, 'hscrollbar'));
  this.editor.$vscrollbar.on('scroll', this.ev_scroll.bind(this, 'vscrollbar'));
  this.editor.$mainScroller.on('scroll', this.ev_scroll.bind(this, 'main'));
  this.editor.$fixedXScroller.on('scroll', this.ev_scroll.bind(this, 'fixedXScroller'));
  this.editor.$fixedYScroller.on('scroll', this.ev_scroll.bind(this, 'fixedYScroller'));

  // this.editor.$fixedYHeaderScroller.on('scroll', this.ev_scroll.bind(this, 'fixedYScroller'));
  //
};

LayoutController.prototype.updateOverflowStatus = function () {
  var tableBound = this.editor.$tableData.getBoundingClientRect();
  this.editor.$view.style.setProperty('--content-width', tableBound.width + 'px');
  this.editor.$view.style.setProperty('--content-height', tableBound.height + 'px');
};
LayoutController.prototype.updateScrollerStatus = function () {
  var _this8 = this;
  var viewElt = this.editor.$view;
  var tableElt = this.editor.$tableData;
  var tableBound = tableElt.getBoundingClientRect();
  var cpStyle = getComputedStyle(this.editor.$view);
  var viewBound = viewElt.getBoundingClientRect();
  var minOutWidth = 1960;
  var parentElt = viewElt.parentElement;
  var parentBound, temp, curBound, curStyle, curElt;
  curElt = parentElt;
  parentBound = new _Rectangle["default"](0, 0, 0, 0);
  while (curElt && curElt !== document.body && curElt !== document.documentElement) {
    curBound = _Rectangle["default"].fromClientRect(curElt.getBoundingClientRect());
    curStyle = getComputedStyle(curElt);
    temp = (0, _attribute.parseMeasureValue)(curStyle.paddingLeft || '0');
    if ((0, _utils.isRealNumber)(temp.value)) curBound.width -= temp.value;
    temp = (0, _attribute.parseMeasureValue)(curStyle.paddingRight || '0');
    if ((0, _utils.isRealNumber)(temp.value)) curBound.width -= temp.value;
    temp = (0, _attribute.parseMeasureValue)(curStyle.paddingTop || '0');
    if ((0, _utils.isRealNumber)(temp.value)) curBound.height -= temp.value;
    temp = (0, _attribute.parseMeasureValue)(curStyle.paddingTop || '0');
    if ((0, _utils.isRealNumber)(temp.value)) curBound.height -= temp.value;
    if (curBound.width < minOutWidth) {
      minOutWidth = curBound.width;
      parentBound = curBound;
    }
    curElt = curElt.parentElement;
  }
  var screenViewSize = (0, _Dom.getScreenSize)();
  var getAvailableWidth = function getAvailableWidth() {
    var res = Infinity;
    var width = _this8.extendStyle.width || 'auto';
    var psWidth = (0, _attribute.parseMeasureValue)(width);
    if (width !== "auto" && (width.indexOf('calc') >= 0 || psWidth)) {
      res = (0, _attribute.computeMeasureExpression)(width, {
        parentSize: parentBound.width,
        screenViewSize: (0, _Dom.getScreenSize)(),
        style: cpStyle
      });
      if (res.unit === 'px') {
        res = res.value;
      } else if (res.unit === 'vw') {
        res = res.value * screenViewSize.width / 100;
      } else {
        //todo
        res = screenViewSize.width; //todo
      }
    }

    if (parentBound.width) {
      res = Math.min(res, parentBound.width);
    }
    var maxWidth = cpStyle.maxWidth;
    var psMaxWidth = (0, _attribute.parseMeasureValue)(maxWidth);
    if (psMaxWidth && psMaxWidth.unit === 'px') {
      res = Math.min(res, psMaxWidth.value);
    }
    return Math.floor(res);
  };
  var getAvailableHeight = function getAvailableHeight() {
    var res = Infinity;
    var height = _this8.extendStyle.height || 'auto';
    var psHeight = (0, _attribute.parseMeasureValue)(height);
    if (height !== 'auto' && (height.indexOf('calc') >= 0 || psHeight)) {
      res = (0, _attribute.computeMeasureExpression)(height, {
        parentSize: parentBound.height,
        screenViewSize: (0, _Dom.getScreenSize)(),
        style: cpStyle
      });
      if (res.unit === 'px') {
        res = res.value;
      } else {
        //todo
        res = Infinity;
      }
    }
    var maxHeight = cpStyle.maxHeight;
    var psMaxHeight = (0, _attribute.parseMeasureValue)(maxHeight);
    if (psMaxHeight && psMaxHeight.unit === 'px') {
      res = Math.min(res, psMaxHeight.value);
    }
    return Math.floor(res);
  };
  var availableWidth = getAvailableWidth();
  var availableHeight = getAvailableHeight();
  if ((0, _utils.isRealNumber)(availableWidth)) {
    viewElt.addStyle('--available-width', availableWidth + 'px');
  } else {
    viewElt.removeStyle('--available-width');
  }
  if ((0, _utils.isRealNumber)(availableHeight)) {
    viewElt.addStyle('--available-height', availableHeight + 'px');
  } else {
    viewElt.removeStyle('--available-height');
  }
  if (tableBound.width > availableWidth - 17 || tableBound.width > viewBound.width) {
    this.editor.$view.addClass('asht-overflow-x');
  } else {
    this.editor.$view.removeClass('asht-overflow-x');
  }
  if (tableBound.height > availableHeight - 17 || tableBound.height > viewBound.height) {
    this.editor.$view.addClass('asht-overflow-y');
  } else {
    this.editor.$view.removeClass('asht-overflow-y');
  }
  tableBound = tableElt.getBoundingClientRect();
  viewElt.style.setProperty('--content-width', tableBound.width + 'px');
  viewElt.style.setProperty('--content-height', tableBound.height + 'px');
  setTimeout(function () {
    var viewportBound = _this8.editor.$mainViewport.getBoundingClientRect();
    tableBound = tableElt.getBoundingClientRect();
    tableBound = tableElt.getBoundingClientRect();
    viewElt.style.setProperty('--content-width', tableBound.width + 'px');
    viewElt.style.setProperty('--content-height', tableBound.height + 'px');
    _this8.editor.$hscrollbar.innerWidth = tableBound.width;
    _this8.editor.$vscrollbar.innerHeight = tableBound.height;
    _this8.editor.$hscrollbar.outerWidth = viewportBound.width;
    _this8.editor.$vscrollbar.outerHeight = viewportBound.height;
    if (_this8.editor.$hscrollbar.innerWidth > _this8.editor.$hscrollbar.outerWidth) {
      _this8.editor.$hscrollbar.removeStyle('display');
    } else {
      _this8.editor.$hscrollbar.addStyle('display', 'none');
    }
    if (_this8.editor.$vscrollbar.innerHeight > _this8.editor.$vscrollbar.outerHeight) {
      _this8.editor.$vscrollbar.removeStyle('display');
    } else {
      _this8.editor.$vscrollbar.addStyle('display', 'none');
    }
  }, 1);
};
LayoutController.prototype.updateFixedYHeader = function () {
  this.editor.fixedYCtrl.updateContent();
};
LayoutController.prototype.updateFixedYHeaderSize = function () {
  this.editor.fixedYCtrl.updateSize();
};
LayoutController.prototype.fullUpdateFixedXCol = function () {
  console.log("fullUpdateFixedXCol");
};
LayoutController.prototype.updateStyleConfig = function () {
  //disable row height config
  // if (this.editor.tableData.config && this.editor.tableData.config.rowHeight) {
  //     this.editor.$view.addStyle('--row-height', this.editor.tableData.config.rowHeight + 'px');
  // }
  // else {
  //     this.editor.$view.removeStyle('--row-height');
  // }
};
LayoutController.prototype.onResize = function () {
  var _this9 = this;
  if (!this.editor.tableData) return;
  this.updateScrollerStatus();
  this.editor.fixedYCtrl.updateSize();
  this.editor.fixedXCtrl.updateSize();
  this.editor.fixedXYCtrl.updateSize();
  this.editor.selectTool.updateSelectedPosition();
  setTimeout(function () {
    _this9.editor.fixedYCtrl.updateSize();
    _this9.editor.fixedXCtrl.updateSize();
    _this9.editor.fixedXYCtrl.updateSize();
    _this9.editor.selectTool.updateSelectedPosition();
  }, 10);
};
LayoutController.prototype.onData = function () {
  this.updateStyleConfig();
  this.editor.fixedYCtrl.updateContent();
  this.editor.fixedXCtrl.updateContent();
  this.editor.fixedXYCtrl.updateContent();
};
LayoutController.prototype.scrollIntoRow = function (row) {
  var rowBound = row.elt.getBoundingClientRect();
  var bound = this.editor.$view.getBoundingClientRect();
  var headBound = this.editor.fixedYCtrl.$fixedYTable.getBoundingClientRect();
  if (rowBound.top < headBound.bottom) {
    this.editor.$mainScroller.scrollTop -= headBound.bottom - rowBound.top;
  } else if (rowBound.bottom > bound.bottom) {
    this.editor.$mainScroller.scrollTop += rowBound.bottom - bound.bottom;
  }
};
LayoutController.prototype.scrollIntoCol = function (col) {
  var colBound = col.elt.getBoundingClientRect();
  var bound = this.editor.$view.getBoundingClientRect();
  var iBound = this.editor.fixedXCtrl.$fixXTable.getBoundingClientRect();
  if (colBound.left < iBound.right) {
    this.editor.$mainScroller.scrollLeft -= iBound.right - colBound.left;
  } else if (colBound.right > bound.right) {
    this.editor.$mainScroller.scrollLeft += colBound.right - bound.right;
  }
};
LayoutController.prototype.ev_scroll = function (tag, event) {
  var now = new Date().getTime();
  if (this._scrollTarget && this._scrollTarget.tag !== tag && now - this._scrollTarget.time < 100) return;
  this._scrollTarget = {
    tag: tag,
    time: now
  };
  var scrollLeft, scrollTop;
  if (tag === 'main') {
    scrollLeft = this.editor.$mainScroller.scrollLeft;
    if (scrollLeft < 0) {
      this.editor.$mainScroller.scrollLeft = 0;
      scrollLeft = 0;
    } else if (scrollLeft > this.editor.$hscrollbar.innerWidth - this.editor.$hscrollbar.outerWidth) {
      scrollLeft = this.editor.$hscrollbar.innerWidth - this.editor.$hscrollbar.outerWidth;
      this.editor.$mainScroller.scrollLeft = scrollLeft;
    }
    this.editor.$hscrollbar.innerOffset = scrollLeft;
    this.editor.$fixedYScroller.scrollLeft = scrollLeft;
    scrollTop = this.editor.$mainScroller.scrollTop;
    if (scrollTop < 0) {
      this.editor.$mainScroller.scrollTop = 0;
      scrollTop = 0;
    } else if (scrollTop > this.editor.$vscrollbar.innerHeight - this.editor.$vscrollbar.outerHeight) {
      scrollTop = this.editor.$vscrollbar.innerHeight - this.editor.$vscrollbar.outerHeight;
      this.editor.$mainScroller.scrollTop = scrollTop;
    }
    this.editor.$vscrollbar.innerOffset = scrollTop;
    this.editor.$fixedXScroller.scrollTop = scrollTop;
    //todo
  } else if (tag === 'hscrollbar') {
    scrollLeft = this.editor.$hscrollbar.innerOffset;
    this.editor.$mainScroller.scrollLeft = scrollLeft;
    this.editor.$fixedYScroller.scrollLeft = scrollLeft;
    // this.editor.$fixedYHeaderScroller.scrollLeft = scrollLeft;
  } else if (tag === 'vscrollbar') {
    scrollTop = this.editor.$vscrollbar.innerOffset;
    this.editor.$mainScroller.scrollTop = scrollTop;
    //todo
  } else if (tag === 'fixedYScroller') {
    scrollLeft = this.editor.$fixedYScroller.scrollLeft;
    if (scrollLeft < 0) {
      scrollLeft = 0;
      this.editor.$fixedYScroller.scrollLeft = 0;
    } else if (scrollLeft > this.editor.$hscrollbar.innerWidth - this.editor.$hscrollbar.outerWidth) {
      scrollLeft = this.editor.$hscrollbar.innerWidth - this.editor.$hscrollbar.outerWidth;
      this.editor.$fixedYScroller.scrollLeft = scrollLeft;
    }
    this.editor.$hscrollbar.innerOffset = scrollLeft;
    this.editor.$mainScroller.scrollLeft = scrollLeft;
  } else if (tag === 'fixedXScroller') {
    scrollTop = this.editor.$fixedXScroller.scrollTop;
    if (scrollTop < 0) {
      this.editor.$fixedXScroller.scrollTop = 0;
      scrollTop = 0;
    } else if (scrollTop > this.editor.$vscrollbar.innerHeight - this.editor.$vscrollbar.outerHeight) {
      scrollTop = this.editor.$vscrollbar.innerHeight - this.editor.$vscrollbar.outerHeight;
      this.editor.$fixedXScroller.scrollTop = scrollTop;
    }
    this.editor.$vscrollbar.innerOffset = scrollTop;
    this.editor.$mainScroller.scrollTop = scrollTop;
  }
  this.editor.editTool.updateEditingBoxPosition();
  this.editor.selectTool.updateSelectedPosition();
};

/**
 * @param {TableEditor} editor
 * @param editor
 * @constructor
 */
function TEFixedYController(editor) {
  this.editor = editor;
}
TEFixedYController.prototype.onViewCreated = function () {
  this.$fixedYTable = (0, _SCore.$)('.asht-table-editor-fixed-y', this.editor.$view);
};
TEFixedYController.prototype.updateContent = function () {
  var head = (0, _SCore.$)(this.editor.tableData.$thead.cloneNode(false));
  head.$origin = this.editor.tableData.$thead;
  var headRows = Array.prototype.filter.call(this.editor.tableData.$thead.childNodes, function (elt) {
    return elt.tagName === 'TR';
  }).map(function (tr) {
    var copyTr = (0, _SCore.$)(tr.cloneNode(false));
    copyTr.$origin = tr;
    var cells = Array.prototype.filter.call(tr.childNodes, function (elt) {
      return elt.tagName === 'TH' || elt.tagName === 'TD';
    }).map(function (td) {
      return (0, _SCore.$)(Object.assign(td.cloneNode(true), {
        $origin: td
      }));
    });
    copyTr.addChild(cells);
    return copyTr;
  });
  head.addChild(headRows);
  this.$fixedYTable.clearChild().addChild(head);
  this.$fixedYTable.attr('class', this.editor.tableData.$view.attr('class')).addClass('asht-table-editor-fixed-y');
};
TEFixedYController.prototype.updateSize = function () {
  var cells = this.$fixedYTable.firstChild && Array.prototype.slice.call(this.$fixedYTable.firstChild.firstChild.childNodes);
  var headBound = this.editor.tableData.$thead.getBoundingClientRect();
  cells.forEach(function (elt, i) {
    if (i > 0) elt.addStyle('width', elt.$origin.getBoundingClientRect().width + 'px');
  });
  this.editor.$view.addStyle('--head-height', headBound.height + 'px');
};

/**
 * @param {TableEditor} editor
 * @param editor
 * @constructor
 */
function TEFixedXController(editor) {
  this.editor = editor;
}
TEFixedXController.prototype.onViewCreated = function () {
  this.$fixXTable = (0, _SCore.$)('.asht-table-editor-fixed-x', this.editor.$view);
};
TEFixedXController.prototype.updateFullContent = function () {
  var head, body;
  this.$fixXTable.clearChild();
  this.$fixXTable.$origin = this.editor.tableData.$view;
  head = (0, _SCore.$)(this.editor.tableData.$thead.cloneNode(false));
  head.$origin = this.editor.tableData.$thead;
  var headRows = Array.prototype.filter.call(this.editor.tableData.$thead.childNodes, function (elt) {
    return elt.tagName === 'TR';
  }).map(function (tr) {
    var copyTr = (0, _SCore.$)(tr.cloneNode(false));
    copyTr.$origin = tr;
    var cells = Array.prototype.filter.call(tr.childNodes, function (elt) {
      return elt.tagName === 'TH' || elt.tagName === 'TD';
    });
    cells = cells.slice(0, 1).map(function (td) {
      return (0, _SCore.$)(Object.assign(td.cloneNode(true), {
        $origin: td
      }));
    });
    copyTr.addChild(cells);
    return copyTr;
  });
  head.addChild(headRows);
  body = (0, _SCore.$)(this.editor.tableData.$tbody.cloneNode());
  body.$origin = this.editor.tableData.$tbody;
  var rows = Array.prototype.filter.call(this.editor.tableData.$tbody.childNodes, function (elt) {
    return elt.tagName === 'TR';
  }).map(function (tr) {
    var copyTr = (0, _SCore.$)(tr.cloneNode(false));
    copyTr.$origin = tr;
    var cells = Array.prototype.filter.call(tr.childNodes, function (elt) {
      return elt.tagName === 'TH' || elt.tagName === 'TD';
    });
    cells = cells.slice(0, 1).map(function (td) {
      return (0, _SCore.$)(Object.assign(td.cloneNode(true), {
        $origin: td
      }));
    });
    // cells.forEach(elt => {
    //     swapChildrenInElt(elt, elt.$origin);
    //     this._swappedPairs.push([elt, elt.$origin]);
    // });
    copyTr.addChild(cells);
    return copyTr;
  });
  body.addChild(rows);
  this.$fixXTable.addChild(head).addChild(body);
  this.$fixXTable.attr('class', this.editor.tableData.$view.attr('class')).addClass('as-table-scroller-fixed-x');
};
TEFixedXController.prototype.updateChangedContent = function () {
  var body = this.$fixXTable.lastChild;
  var rows = Array.prototype.slice.call(this.editor.tableData.$tbody.childNodes);
  var i = 0;
  while (i < body.childNodes.length) {
    if (body.childNodes[i].$origin !== rows[i]) break;
    i++;
  }
  i = Math.max(0, Math.min(body.childNodes.length - 1, i));
  while (body.childNodes.length > i) {
    body.lastChild.remove();
  }
  rows = rows.slice(i).map(function (tr) {
    var copyTr = (0, _SCore.$)(tr.cloneNode(false));
    copyTr.$origin = tr;
    var cells = Array.prototype.filter.call(tr.childNodes, function (elt) {
      return elt.tagName === 'TH' || elt.tagName === 'TD';
    });
    cells = cells.slice(0, 1).map(function (td) {
      return (0, _SCore.$)(Object.assign(td.cloneNode(true), {
        $origin: td
      }));
    });
    // cells.forEach(elt => {
    //     swapChildrenInElt(elt, elt.$origin);
    //     this._swappedPairs.push([elt, elt.$origin]);
    // });
    copyTr.addChild(cells);
    return copyTr;
  });
  body.addChild(rows);
};
TEFixedXController.prototype.updateContent = function () {
  if (this.$fixXTable.$origin !== this.editor.tableData.$view) {
    this.updateFullContent();
  } else {
    this.updateChangedContent();
  }
};
TEFixedXController.prototype.updateSize = function () {
  // var bound = this.editor.tableData.$view.getBoundingClientRect();
  //todo: index col width set by record length
  // this.$fixXCol.addStyle('height', bound.height + 'px');
  if (!this.editor.tableData) return;
  var firstCell = this.editor.tableData.$view.firstChild.firstChild.firstChild;
  var colSize = firstCell.getBoundingClientRect();
  var colWidth = colSize.width;
  var rowLength = this.editor.tableData.bodyRow.length;
  this.editor.$view.addStyle('--index-col-width', (0, _util.calcIndexColumnWidth)(rowLength) + 'px');
  Array.prototype.forEach.call(this.$fixXTable.firstChild.childNodes, function (elt) {
    elt.addStyle('height', elt.$origin.getBoundingClientRect().height + 'px');
    // elt.addStyle('width', colWidth + 'px');
  });

  Array.prototype.forEach.call(this.$fixXTable.lastChild.childNodes, function (elt) {
    elt.addStyle('height', elt.$origin.getBoundingClientRect().height + 'px');
    // elt.addStyle('width', colWidth + 'px');
  });
};

/**
 * @param {TableEditor} editor
 * @param editor
 * @constructor
 */
function TEFixedXYController(editor) {
  this.editor = editor;
}
TEFixedXYController.prototype.onViewCreated = function () {
  this.$fixedXYTable = (0, _SCore.$)('.asht-table-editor-fixed-xy', this.editor.$view);
  this.$fixedXYTable.addClass('asht-table-data');
};
TEFixedXYController.prototype.updateContent = function () {};
TEFixedXYController.prototype.updateSize = function () {};

/***
 *
 * @param {TableEditor} editor
 * @constructor
 */
function CommandController(editor) {
  var _this10 = this;
  this.editor = editor;
  this.isFocus = false;
  Object.keys(this.constructor.prototype).forEach(function (key) {
    if (key.startsWith('ev_')) _this10[key] = _this10[key].bind(_this10);
  });
}
CommandController.prototype.onViewCreated = function () {
  _ContextMenu["default"].auto();
  this.editor.$view.on('click', this.ev_click);
  this.editor.$view.on('contextmenu', this.ev_contextMenu);
  this.editor.$view.on('focus', this.ev_domFocus, true);
  this.editor.$view.on('blur', this.ev_domBlur, true);
  // this.editor.$indexCol.on('contextmenu', this.ev_indexColContextMenu);
};

CommandController.prototype.ev_click = function (event) {
  if (this.editor.tableData && (0, _EventEmitter.hitElement)(this.editor.tableData.$view, event)) {
    this.ev_clickTable(event);
  } else if ((0, _EventEmitter.hitElement)(this.editor.fixedXCtrl.$fixXTable.lastChild, event)) {
    this.ev_clickIndexCol(event);
  }
};
CommandController.prototype.ev_contextMenu = function (event) {
  if (this.editor.opt.readOnly) return;
  if ((0, _EventEmitter.hitElement)(this.editor.tableData.$view, event)) {} else if ((0, _EventEmitter.hitElement)(this.editor.fixedXCtrl.$fixXTable.lastChild, event)) {
    this.ev_indexColContextMenu(event);
  } else if ((0, _EventEmitter.hitElement)(this.editor.fixedXYCtrl.$fixedXYTable, event)) {
    this.ev_rootCellContextMenu(event);
  }
};
CommandController.prototype.ev_clickTable = function (event) {
  var c = event.target;
  var cellElt;
  while (c) {
    if (c.hasClass && c.hasClass('asht-table-cell')) {
      cellElt = c;
      this.ev_clickCell(cellElt, event);
      return;
    }
    c = c.parentElement;
  }
};
CommandController.prototype.ev_clickCell = function (cellElt, event) {
  if (this.editor.opt.readOnly) return;
  var colIdx = Array.prototype.indexOf.call(cellElt.parentElement.childNodes, cellElt) - 1;
  var col = this.editor.tableData.findColByIndex(colIdx);
  var rowIdx = Array.prototype.indexOf.call(cellElt.parentElement.parentElement.childNodes, cellElt.parentElement);
  var row = this.editor.tableData.findRowByIndex(rowIdx);
  if (!row && rowIdx >= 0) row = this.editor.tableData.newRow;
  this.editor.editTool.editCellDelay(row, col);
};
CommandController.prototype.ev_clickIndexCol = function (ev) {
  if (this.editor.opt.readOnly) return;
  var c = ev.target;
  while (c) {
    if (c.tagName === 'TR') break;
    c = c.parentElement;
  }
  if (!c) return;
  var rowIdx = Array.prototype.indexOf.call(c.parentElement.childNodes, c);
  var row = this.editor.tableData.findRowByIndex(rowIdx) || this.editor.tableData.newRow;
  this.editor.selectRow(row);
  var firstCol = this.editor.tableData.findColByIndex(0);
  this.editor.editTool.editCellDelay(row, firstCol);
};
CommandController.prototype.ev_indexColContextMenu = function (ev) {
  var thisTE = this.editor;
  var c = ev.target;
  while (c) {
    if (c.tagName === 'TR') break;
    c = c.parentElement;
  }
  if (!c) return;
  var rowIdx = Array.prototype.indexOf.call(c.parentElement.childNodes, c);
  var row = this.editor.tableData.findRowByIndex(rowIdx) || this.editor.tableData.newRow;
  this.editor.selectRow(row);
  var items = [];
  if (row.idx === "*") {} else {
    items.push({
      cmd: 'insert_before',
      text: 'Insert Before',
      icon: 'span.mdi.mdi-table-row-plus-before'
    }, {
      cmd: 'insert_after',
      text: 'Insert After',
      icon: 'span.mdi.mdi-table-row-plus-after'
    }, {
      cmd: 'remove',
      text: 'Delete',
      icon: 'span.mdi.mdi-table-row-remove'
    });
  }
  // if (items.length > 0 && items[items.length - 1] !== '===') {
  //     items.push("===");
  // }
  // if (row.idx !== "*") {
  //     items.push({
  //         cmd: 'copy',
  //         text: "Copy",
  //         icon: "span.mdi.mdi-content-copy"
  //     });
  // }
  // items.push({
  //     cmd: 'paste',
  //     text: "Paste",
  //     icon: 'span.mdi.mdi-content-paste'
  // });
  // items.push('===', {
  //     cmd: 'row_height',
  //     text: 'Row Height',
  //     icon: 'span.mdi.mdi-table-row-height'
  // });

  ev.showContextMenu({
    extendStyle: {
      fontSize: '14px'
    },
    items: items
  }, function (ev1) {
    var cmd = ev1.menuItem.cmd;
    var eventOpt = {
      cmd: cmd
    };
    var ev2;
    switch (cmd) {
      case 'row_height':
        (0, _dialogs.selectRowHeight)({
          value: thisTE.tableData.config.rowHeight,
          standard: 21
        }).then(function (result) {
          thisTE.tableData.config.rowHeight = result;
          thisTE.layoutCtrl.updateStyleConfig();
          _ResizeSystem["default"].updateDown(thisTE.$attachook);
        }, function (err) {
          if (err) console.error(err);
        });
        break;
      case 'remove':
        eventOpt.type = 'cmd_remove_row';
        eventOpt.rowIdx = row.idx;
        eventOpt.accepted = true;
        ev2 = new _Abstractions.ASHTConfirmEvent(eventOpt);
        thisTE.emit(eventOpt.type, ev2, thisTE);
        ev2.afterThen(function (isAccept) {
          if (isAccept) thisTE.removeRow(eventOpt.rowIdx);
        });
        break;
      case 'insert_before':
      case 'insert_after':
        eventOpt.type = 'cmd_insert_row';
        eventOpt.rowIdx = row.idx + (cmd === 'insert_after' ? 1 : 0);
        ev2 = new _Abstractions.ASHTWaitValueEvent(eventOpt);
        thisTE.emit(eventOpt.type, ev2, thisTE);
        ev2.afterThen(function (result) {
          if (result) {
            thisTE.insertRow(eventOpt.rowIdx, result);
          } else if (result === null) {
            thisTE.insertRow(eventOpt.rowIdx, {});
          }
        });
        break;
      case "copy":
        (0, _Clipboard.copyText)(JSON.stringify(row.record));
        break;
      case "paste":
        (0, _Clipboard.pasteText)().then(function (result) {
          try {
            var obj = (0, _util.duplicateData)(JSON.parse(result));
            thisTE.tableData.propertyNames.forEach(function (cr) {
              row.propertyByName[cr].value = obj[cr];
            }, {});
            if (thisTE.editTool.currentCellEditor) {
              thisTE.editTool.currentCellEditor.reload();
            }
            _ResizeSystem["default"].update();
          } catch (e) {
            (0, _safeThrow["default"])(e);
          }
        });
        break;
    }
  });
};
CommandController.prototype.ev_rootCellContextMenu = function (ev) {
  var thisTE = this.editor;
  ev.showContextMenu({
    items: [{
      cmd: 'insert_first',
      text: 'Insert First',
      icon: 'span.mdi.mdi-table-row-plus-before'
    }, {
      cmd: 'append_last',
      text: 'Append Last',
      icon: 'span.mdi.mdi-table-row-plus-after'
    }]
  }, function (ev1) {
    var cmd = ev1.menuItem.cmd;
    var eventOpt = {
      cmd: cmd
    };
    eventOpt.type = 'cmd_insert_row';
    eventOpt.rowIdx = cmd === 'insert_first' ? 0 : thisTE.tableData.getLength();
    eventOpt.result = {};
    eventOpt.resolve = function (result) {
      this.result = result;
    };
    thisTE.emit(eventOpt.type, eventOpt, thisTE);
    if (eventOpt.result) {
      if (eventOpt.result.then) {
        eventOpt.result.then(function (result) {
          if (result) {
            thisTE.insertRow(eventOpt.rowIdx, result);
            if (cmd === 'append_last') {
              thisTE.$body.scrollTop = thisTE.$body.scrollHeight - thisTE.$body.clientHeight;
            }
          }
        });
      } else {
        thisTE.insertRow(eventOpt.rowIdx, eventOpt.result);
        thisTE.$mainScroller.scrollTop = thisTE.$mainScroller.scrollHeight - thisTE.$mainScroller.clientHeight;
      }
    }
  });
};
CommandController.prototype.ev_focus = function (event) {};
CommandController.prototype.ev_blur = function (event) {};
CommandController.prototype.ev_domFocus = function (event) {
  if (this.isFocus) return;
  this.isFocus = true;
  this.ev_focus(event);
};

/**
 *
 * @param elt
 * @returns {boolean}
 */
CommandController.prototype.isDescendant = function (elt) {
  return this.editor.isDescendantElt(elt);
};
CommandController.prototype.ev_domBlur = function (event) {
  var _this11 = this;
  setTimeout(function () {
    if (_this11.isFocus && !_this11.isDescendant(document.activeElement)) {
      _this11.isFocus = false;
      _this11.ev_blur(event);
    }
  }, 200);
};

/**
 * @extends CMDToolDelegate
 * @param {TableEditor} editor
 * @constructor
 */
function TECMDToolDelegate(editor) {
  _CMDTool.CMDToolDelegate.call(this, editor);
  this.editor = editor;
}
(0, _OOP.mixClass)(TECMDToolDelegate, _CMDTool.CMDToolDelegate);
TECMDToolDelegate.prototype.getCmdGroupTree = function () {
  var res = {
    type: 'group_x2',
    children: ['addRowBefore', 'addRowAfter', 'delete' //,
    // 'copy', 'paste'
    ]
  };

  var extendCommands = this.editor.opt.extendCommands;
  var extGroups;
  if (extendCommands && extendCommands.length > 0) {
    res = {
      type: 'group_x2',
      children: [res, {
        type: 'group_x2',
        children: extendCommands
      }]
    };
  }
  return res;
};
TECMDToolDelegate.prototype.getCmdDescriptor = function (name) {
  if (TECommands[name] && TECommands[name].descriptor) return Object.assign({}, _TECommandDescriptors["default"][name], TECommands[name].descriptor.call(this.editor));
  return _TECommandDescriptors["default"][name]; //default
};

TECMDToolDelegate.prototype.execCmd = function (name) {
  var _TECommands$name$exec,
    _this12 = this;
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }
  if (TECommands[name] && TECommands[name].exec) (_TECommands$name$exec = TECommands[name].exec).call.apply(_TECommands$name$exec, [this.editor].concat(args));
  setTimeout(function () {
    if (!_this12.editor.isDescendantElt(document.activeElement)) _this12.editor.$view.focus();
  }, 4);
};
var TECommands = {};

// TECommands.copy = {
//     descriptor: function () {
//         var res = Object.assign({}, TECommandDescriptors.copy);
//
//         return res;
//     },
//     /**
//      * @this TableEditor
//      */
//     exec: function () {
//         var selectedData = this.selectTool.selectedData;
//         if (!selectedData) return;
//         if (selectedData.type !== 'row' || selectedData.type !== 'cell') return;
//         console.log(selectedData)
//         console.log(this.selectTool.selectedData)
//     },
//
// }

TECommands.addRowBefore = {
  descriptor: function descriptor() {
    var res = {};
    if (this.opt.readOnly) res.disabled = true;
    return res;
  },
  /**
   * @this TableEditor
   */
  exec: function exec() {
    var _this13 = this;
    var row = this.editTool.currentCellEditor && this.editTool.currentCellEditor.cell.row;
    var eventOpt = {
      cmd: 'insert_before',
      type: 'cmd_insert_row'
    };
    eventOpt.rowIdx = 0;
    if (row) {
      if (row.idx === "*") {
        eventOpt.rowIdx = row.table.bodyRow.length;
      } else {
        eventOpt.rowIdx = row.idx;
      }
    }
    var event = new _Abstractions.ASHTWaitValueEvent(eventOpt);
    this.emit(eventOpt.type, event, this);
    event.afterThen(function (result) {
      if (result) {
        _this13.insertRow(eventOpt.rowIdx, result);
      } else if (result === null) {
        _this13.insertRow(eventOpt.rowIdx, {});
      }
    });
  }
};
TECommands.addRowAfter = {
  descriptor: function descriptor() {
    var res = {};
    if (this.opt.readOnly) res.disabled = true;
    return res;
  },
  /**
   * @this TableEditor
   */
  exec: function exec() {
    var _this14 = this;
    var row = this.editTool.currentCellEditor && this.editTool.currentCellEditor.cell.row;
    var eventOpt = {
      cmd: 'insert_before',
      type: 'cmd_insert_row'
    };
    eventOpt.rowIdx = row.table.bodyRow.length;
    if (row) {
      if ((0, _utils.isNaturalNumber)(row.idx)) {
        eventOpt.rowIdx = row.idx + 1;
      }
    }
    var event = new _Abstractions.ASHTWaitValueEvent(eventOpt);
    this.emit(eventOpt.type, event, this);
    event.afterThen(function (result) {
      if (result) {
        _this14.insertRow(eventOpt.rowIdx, result);
      } else if (result === null) {
        _this14.insertRow(eventOpt.rowIdx, {});
      }
    });
  }
};
TECommands["delete"] = {
  descriptor: function descriptor() {
    var res = {};
    if (this.opt.readOnly) res.disabled = true;
    return res;
  },
  /**
   * @this TableEditor
   */
  exec: function exec() {
    var _this15 = this;
    var row = this.editTool.currentCellEditor && this.editTool.currentCellEditor.cell.row;
    var eventOpt = {
      cmd: 'insert_before',
      type: 'cmd_insert_row'
    };
    eventOpt.type = 'cmd_remove_row';
    eventOpt.rowIdx = row.idx;
    eventOpt.accepted = true;
    var ev2 = new _Abstractions.ASHTConfirmEvent(eventOpt);
    this.emit(eventOpt.type, ev2, this);
    ev2.afterThen(function (isAccept) {
      if (isAccept) _this15.removeRow(eventOpt.rowIdx);
    });
  }
};
TECommands.copy = {
  descriptor: function descriptor() {
    var res = {};
    var row = this.editTool.currentCellEditor && this.editTool.currentCellEditor.cell.row;
    res.disabled = !row || !(0, _utils.isNaturalNumber)(row.idx);
    return res;
  },
  exec: function exec() {
    var row = this.editTool.currentCellEditor && this.editTool.currentCellEditor.cell.row;
    var canCopy = row && (0, _utils.isNaturalNumber)(row.idx);
    if (!canCopy) return;
    var data = row.record;
    (0, _util.setDataSheetClipboard)(data);
  }
};
TECommands.paste = {
  descriptor: function descriptor() {
    var res = {};
    var data;
    if (this.opt.readOnly) {
      res.disabled = true;
    } else {
      data = (0, _util.getDataSheetClipboard)();
      console.log(data);
    }
    return res;
  },
  exec: function exec() {
    // var row = this.editTool.currentCellEditor && this.editTool.currentCellEditor.cell.row;
    // var canPaste = !row || !isNaturalNumber(row.idx);
    // if (!canPaste) return;
  }
};
TECommands["export"] = {
  /**
   * @this TableEditor
   */
  exec: function exec() {
    this.emit('extend_command', {
      type: 'extend_command',
      command: 'export',
      target: this
    }, this);
  }
};

/***/ }),

/***/ 43076:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.selectRowHeight = selectRowHeight;
var _SCore = __webpack_require__(74328);
var _Dom = _interopRequireDefault(__webpack_require__(64821));
__webpack_require__(8528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function selectRowHeight(opt) {
  var okBtn = (0, _SCore._)({
    tag: 'button',
    style: {
      display: 'block',
      width: '80px'
    },
    child: {
      text: "OK"
    }
  });
  var cancelBtn = (0, _SCore._)({
    tag: 'button',
    style: {
      display: 'block',
      width: '80px',
      marginTop: '5px'
    },
    child: {
      text: "Cancel"
    }
  });
  var valueInput = (0, _SCore._)({
    tag: 'input',
    attr: {
      type: 'number',
      step: '0.5',
      min: '0',
      value: opt.value + ''
    },
    style: {
      marginLeft: '5px',
      width: '50px'
    }
  });
  var standardCBx = (0, _SCore._)('checkboxbutton').on('change', function (event) {
    if (this.checked) {
      valueInput.value = opt.standard;
    }
  });
  var windowElt = (0, _SCore._)({
    tag: 'onscreenwindow',
    "class": ['asht-window', 'asht-select-row-width-window'],
    style: {
      top: '30vh',
      left: '30vw',
      width: '250px',
      height: '85px',
      zIndex: 1e9
    },
    props: {
      windowTitle: 'Row Height',
      windowIcon: 'span.mdi.mdi-table-row-height'
    },
    child: {
      "class": 'asht-select-row-width-window-content',
      style: {
        whiteSpace: 'nowrap'
      },
      child: [{
        style: {
          verticalAlign: 'top',
          display: 'inline-block'
        },
        child: [{
          child: [{
            tag: 'span',
            child: {
              text: "Row Height:"
            }
          }, valueInput]
        }, {
          child: [standardCBx, {
            tag: 'span',
            style: {
              marginLeft: '5px'
            },
            child: {
              text: 'Standard Height'
            }
          }]
        }]
      }, {
        style: {
          verticalAlign: 'top',
          display: 'inline-block',
          marginLeft: '10px'
        },
        child: [okBtn, cancelBtn]
      }]
    }
  });
  var blinkTO = -1;
  var modal = (0, _SCore._)({
    "class": 'asht-modal',
    style: {
      zIndex: 1e9
    },
    child: windowElt,
    on: {
      mousedown: function mousedown() {
        if (blinkTO >= 0) clearTimeout(blinkTO);
        windowElt.removeClass('as-blink');
      },
      click: function click(event) {
        if (event.target === this) {
          windowElt.addClass('as-blink');
          blinkTO = setTimeout(function () {
            blinkTO = -1;
            windowElt.removeClass('as-blink');
          }, 1000);
        }
      }
    }
  });
  modal.addTo(document.body);
  return new Promise(function (resolve, reject) {
    okBtn.once('click', function () {
      modal.remove();
      resolve(parseFloat(valueInput.value));
    });
    cancelBtn.once('click', function () {
      modal.remove();
      reject();
    });
  });
}

/***/ }),

/***/ 63504:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SCore = __webpack_require__(74328);
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var STATE_STANDBY = 0;
var STATE_RUNNING = 1;
var STATE_STOP = 2;
var STATE_DESTROYED = 3;

/***
 * @extends EventEmitter
 * @param {TableEditor} tableEditor
 * @param {TDBase} cell
 * @constructor
 */
function TDEBase(tableEditor, cell) {
  _EventEmitter["default"].call(this);
  this.state = STATE_STANDBY;
  this.tableEditor = tableEditor;
  this.cell = cell;
  this.col = cell.table.findColByName(cell.pName);
  this.$editingbox = tableEditor.$editingbox;
  this._bindEvent();
  this.$input = null;
  this.prepareInput();
  this.reload();
}
_OOP["default"].mixClass(TDEBase, _EventEmitter["default"]);
TDEBase.prototype.onStart = _noop["default"];
TDEBase.prototype.onStop = _noop["default"];
TDEBase.prototype.onDestroy = _noop["default"];
TDEBase.prototype.start = function () {
  if (this.state === STATE_STANDBY) {
    this.state = STATE_RUNNING;
    this.onStart();
  } else if (this.state === STATE_DESTROYED) {
    console.error(this, "Editor destroyed!");
  }
};
TDEBase.prototype.stop = function () {
  if (this.state === STATE_RUNNING) {
    this.state = STATE_STOP;
    this.onStop();
  }
};
TDEBase.prototype.destroy = function () {
  if (this.state === STATE_RUNNING) {
    this.stop();
  }
  if (this.state !== STATE_DESTROYED) {
    this.onDestroy();
    this.state = STATE_DESTROYED;
  }
};

/***
 *
 * @protected
 */
TDEBase.prototype.prepareInput = function () {};
TDEBase.prototype.reload = function () {};
TDEBase.prototype.startEditing = function () {
  this.state = "EDITING";
};

/**
 *
 * @protected
 */
TDEBase.prototype._bindEvent = function () {
  for (var fName in this) {
    if (typeof this[fName] === "function" && fName.startsWith('ev_')) {
      this[fName] = this[fName].bind(this);
    }
  }
};
TDEBase.prototype.editCellAbove = function () {
  var rowIdx = this.cell.row.idx;
  var prevRow = this.cell.table.findRowByIndex(rowIdx - 1);
  if (prevRow) {
    this.tableEditor.editCell(prevRow, this.col);
  }
};
TDEBase.prototype.editCellBellow = function () {
  var rowIdx = this.cell.row.idx;
  var nextRow = this.cell.table.findRowByIndex(rowIdx + 1);
  if (nextRow) {
    this.finish();
    this.tableEditor.editCell(nextRow, this.col);
  }
};
TDEBase.prototype.editCellLeft = function () {
  var colIdx = this.cell.table.findIndexOfCol(this.col);
  var prevCol = this.cell.table.findColByIndex(colIdx - 1);
  if (prevCol) {
    this.finish();
    this.tableEditor.editCell(this.row, prevCol);
  }
};
TDEBase.prototype.editCellRight = function () {
  var colIdx = this.cell.table.findIndexOfCol(this.col);
  var nextCol = this.cell.table.findColByIndex(colIdx + 1);
  if (nextCol) {
    this.finish();
    this.tableEditor.editCell(this.row, nextCol);
  }
};
TDEBase.prototype.editCellNext = function () {
  var colIdx = this.cell.table.findIndexOfCol(this.col);
  var nextCol = this.cell.table.findColByIndex(colIdx + 1);
  if (nextCol) {
    this.finish();
    this.tableEditor.editCell(this.row, nextCol);
  } else {
    var rowIdx = this.cell.row.idx;
    var nextRow = this.cell.table.findRowByIndex(rowIdx + 1);
    var firstCol = this.cell.table.findColByIndex(0);
    if (nextRow && firstCol) {
      this.finish();
      this.tableEditor.editCell(nextRow, firstCol);
    }
  }
};
TDEBase.prototype.finish = function () {
  if (this.state !== "FINISHED") {
    this.state = "FINISHED";
    this.emit('finish', {
      type: 'finish',
      target: this
    });
  }
};
TDEBase.prototype.flushValue = function (value) {
  var prev = this.cell.value;
  if (value !== prev) {
    this.cell.value = value;
    this.tableEditor.emit('change', {
      target: this.tableEditor,
      cell: this.cell,
      cellEditor: this
    }, this.tableEditor);
    if (!this.tableEditor.commandCtrl.isDescendant(document.activeElement)) {
      this.tableEditor.$view.focus();
    }
  }
};
Object.defineProperty(TDEBase.prototype, 'row', {
  get: function get() {
    return this.cell.row;
  }
});
TDEBase.typeClasses = {};
var _default = TDEBase;
exports["default"] = _default;

/***/ }),

/***/ 9815:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _SCore = __webpack_require__(74328);
var _TDEText = _interopRequireDefault(__webpack_require__(20619));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEBase
 * @param {TableEditor} tableEditor
 * @param {TSCell} cell
 * @constructor
 */
function TDEBoolean(tableEditor, cell) {
  _TDEBase["default"].call(this, tableEditor, cell);
}
_OOP["default"].mixClass(TDEBoolean, _TDEBase["default"]);
TDEBoolean.prototype.prepareInput = function () {
  var descriptor = this.cell.descriptor;
  this.$checkbox = (0, _SCore._)({
    tag: 'checkboxbutton',
    props: {
      checked: !!this.cell.value
    },
    on: {
      change: this.ev_checkboxChange
    }
  });
  /***
   * @type {Button ||AElement}
   */
  this.$input = (0, _SCore._)({
    attr: {
      tabindex: '1'
    },
    "class": ['asht-cell-editor-input', 'asht-boolean-cell-editor-input'],
    child: this.$checkbox
  });
  this.$editingbox.clearChild().addChild(this.$input);
};
TDEBoolean.prototype.reload = function () {
  this.$checkbox.disabled = !!this.cell.descriptor.readOnly || 'calc' in this.cell.descriptor;
  this.$checkbox.checked = this.cell.value;
};
TDEBoolean.prototype.ev_checkboxChange = function (event) {
  this.flushValue(this.$checkbox.checked);
};
_TDEBase["default"].typeClasses.bool = TDEBoolean;
_TDEBase["default"].typeClasses["boolean"] = TDEBoolean;
var _default = TDEBoolean;
exports["default"] = _default;

/***/ }),

/***/ 20445:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _SCore = __webpack_require__(74328);
var _TDEText = _interopRequireDefault(__webpack_require__(20619));
var _datetime = __webpack_require__(58286);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEBase
 * @param {TableEditor} tableEditor
 * @param {TDBase} cell
 * @constructor
 */
function TDEDate(tableEditor, cell) {
  _TDEBase["default"].call(this, tableEditor, cell);
}
_OOP["default"].mixClass(TDEDate, _TDEBase["default"]);
TDEDate.prototype.prepareInput = function () {
  this.$input = (0, _SCore._)({
    tag: 'dateinput',
    "class": 'asht-date-cell-editor-input',
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
TDEDate.prototype.reload = function () {
  var value = this.cell.value;
  var descriptor = this.cell.descriptor;
  var dateValue = this.cell.implicit(value);
  if (typeof value === "string") {
    dateValue = new Date(value);
    if (isNaN(dateValue.getTime())) {
      dateValue = (0, _datetime.parseDateString)(value, descriptor.format || 'dd/mm/yyyy');
    }
    if (isNaN(dateValue.getTime())) {
      dateValue = null;
    }
  }
  this.$input.format = descriptor.format || "dd/mm/yyyy";
  this.$input.value = dateValue;
  this.$input.min = descriptor.min || new Date(1890, 0, 1);
  this.$input.max = descriptor.max || new Date(2090, 0, 1);
  this.$input.disabled = descriptor.readOnly || 'calc' in descriptor;
};
TDEDate.prototype._loadCellStyle = function () {
  var cellElt = this.cell.elt;
  this._cellStyle = {
    'font-size': cellElt.getComputedStyleValue('font-size'),
    'font-family': cellElt.getComputedStyleValue('font-family'),
    'font-style': cellElt.getComputedStyleValue('font-style')
  };
};
TDEDate.prototype.ev_inputChange = function () {
  this.flushValue(this.$input.value);
  if (document.activeElement && _AElement["default"].prototype.isDescendantOf.call(document.activeElement, this.tableEditor.$view)) {
    this.$input.$input.focus();
    this.$input.$input.select();
  }
};
TDEDate.prototype.ev_focus = _TDEText["default"].prototype.ev_focus;
_TDEBase["default"].typeClasses.date = TDEDate;
_TDEBase["default"].typeClasses.Date = TDEDate;
var _default = TDEDate;
exports["default"] = _default;

/***/ }),

/***/ 46581:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _SCore = __webpack_require__(74328);
var _TDEDate = _interopRequireDefault(__webpack_require__(20445));
var _datetime = __webpack_require__(58286);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _DateInYearInput = _interopRequireDefault(__webpack_require__(63863));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEDate
 * @constructor
 */
function TDEDateInYear() {
  _TDEDate["default"].apply(this, arguments);
}
_OOP["default"].mixClass(TDEDateInYear, _TDEDate["default"]);
TDEDateInYear.prototype.prepareInput = function () {
  this.$input = (0, _SCore._)({
    tag: _DateInYearInput["default"],
    "class": ["asht-cell-editor-input", 'asht-date-in-year-cell-editor-input'],
    props: {
      format: 'dd/MM'
    },
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
TDEDateInYear.prototype.reload = function () {
  var value = this.cell.value;
  var descriptor = this.cell.descriptor;
  var dIYYValue;
  if (typeof value === "string") {
    dIYYValue = new Date(value);
    if (isNaN(dIYYValue.getTime())) {
      try {
        dIYYValue = (0, _datetime.parseDateTime)(value + '/2000', (descriptor.format || 'dd/MM') + '/yyyy');
      } catch (e) {
        dIYYValue = null;
      }
    }
  }
  if (value instanceof Date) {
    dIYYValue = {
      date: value.getDate(),
      month: value.getMonth()
    };
  }
  this.$input.value = dIYYValue;
  this.$input.disabled = descriptor.readOnly || 'calc' in descriptor;
};
TDEDateInYear.prototype.ev_inputChange = function () {
  this.flushValue(this.$input.value);
  var inputElt;
  if (document.activeElement && _AElement["default"].prototype.isDescendantOf.call(document.activeElement, this.tableEditor.$view)) {
    inputElt = (0, _SCore.$)('input', this.$input);
    if (inputElt) {
      inputElt.focus();
      inputElt.select();
    }
  }
};
_TDEBase["default"].typeClasses.DateInYearInput = TDEDateInYear;
_TDEBase["default"].typeClasses.DateInYear = TDEDateInYear;
var _default = TDEDateInYear;
exports["default"] = _default;

/***/ }),

/***/ 43610:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _SCore = __webpack_require__(74328);
var _TDEText = _interopRequireDefault(__webpack_require__(20619));
var _DateNLevelInput = _interopRequireDefault(__webpack_require__(45627));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEBase
 * @param {TableEditor} tableEditor
 * @param {TDBase} cell
 * @constructor
 */
function TDEDateNLevel(tableEditor, cell) {
  _TDEBase["default"].call(this, tableEditor, cell);
}
_OOP["default"].mixClass(TDEDateNLevel, _TDEBase["default"]);
TDEDateNLevel.prototype.prepareInput = function () {
  this.$input = (0, _SCore._)({
    tag: _DateNLevelInput["default"],
    "class": 'asht-date-n-level-cell-editor-input',
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
TDEDateNLevel.prototype.reload = function () {
  var descriptor = this.cell.descriptor;
  var value = this.cell.implicit(this.cell.value);
  if (value) {
    this.$input.level = value.level;
    this.$input.value = value.value;
  } else {
    this.$input.value = null;
    this.$input.level = 'date';
  }
  this.$input.min = descriptor.min || new Date(1890, 0, 1);
  this.$input.max = descriptor.max || new Date(2090, 0, 1);
  this.$input.disabled = descriptor.readOnly || 'calc' in descriptor;
};
TDEDateNLevel.prototype._loadCellStyle = function () {
  var cellElt = this.cell.elt;
  this._cellStyle = {
    'font-size': cellElt.getComputedStyleValue('font-size'),
    'font-family': cellElt.getComputedStyleValue('font-family'),
    'font-style': cellElt.getComputedStyleValue('font-style')
  };
};
TDEDateNLevel.prototype.ev_inputChange = function () {
  var dateValue = this.$input.value;
  var value;
  if (!dateValue) value = undefined;else value = {
    value: dateValue,
    level: this.$input.level
  };
  this.flushValue(value);
  // if (document.activeElement && AElement.prototype.isDescendantOf.call(document.activeElement, this.tableEditor.$view)) {
  //     this.$input.$input.focus();
  //     this.$input.$input.select();
  // }
};

TDEDateNLevel.prototype.ev_focus = _TDEText["default"].prototype.ev_focus;
_TDEBase["default"].typeClasses.DateNLevel = TDEDateNLevel;
_TDEBase["default"].typeClasses.datenlevel = TDEDateNLevel;
var _default = TDEDateNLevel;
exports["default"] = _default;

/***/ }),

/***/ 65478:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _SCore = __webpack_require__(74328);
var _TDEDate = _interopRequireDefault(__webpack_require__(20445));
var _datetime = __webpack_require__(58286);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEDate
 * @constructor
 */
function TDEDateTime() {
  _TDEDate["default"].apply(this, arguments);
}
_OOP["default"].mixClass(TDEDateTime, _TDEDate["default"]);
TDEDateTime.prototype.prepareInput = function () {
  this.$input = (0, _SCore._)({
    tag: 'datetimeinput',
    "class": ["asht-cell-editor-input", 'asht-date-time-cell-editor-input'],
    props: {
      format: 'dd/MM/yyyy HH:mm'
    },
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
TDEDateTime.prototype.reload = function () {
  var value = this.cell.value;
  var descriptor = this.cell.descriptor;
  var dateValue;
  if (typeof value === "string") {
    dateValue = new Date(value);
    if (isNaN(dateValue.getTime())) {
      try {
        dateValue = (0, _datetime.parseDateTime)(value, descriptor.format || 'dd/MM/yyyy HH:mm');
      } catch (e) {
        dateValue = null;
      }
    }
  } else if (value instanceof Date) {
    dateValue = value;
  }
  this.$input.value = dateValue;
  this.$input.disabled = descriptor.readOnly;
  this.$input.min = descriptor.min || new Date(1890, 0, 1);
  this.$input.max = descriptor.max || new Date(2090, 0, 1);
  this.$input.disabled = descriptor.readOnly || 'calc' in descriptor;
};
TDEDateTime.prototype.ev_inputChange = function () {
  this.flushValue(this.$input.value);
  var inputElt;
  if (document.activeElement && _AElement["default"].prototype.isDescendantOf.call(document.activeElement, this.tableEditor.$view)) {
    inputElt = (0, _SCore.$)('input', this.$input);
    if (inputElt) {
      inputElt.focus();
      inputElt.select();
    }
  }
};
_TDEBase["default"].typeClasses.datetime = TDEDateTime;
_TDEBase["default"].typeClasses.DateTime = TDEDateTime;
var _default = TDEDateTime;
exports["default"] = _default;

/***/ }),

/***/ 23270:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _SCore = __webpack_require__(74328);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _util = __webpack_require__(92174);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEBase
 * @param {TableEditor} tableEditor
 * @param {TSCell} cell
 * @constructor
 */
function TDEEnum(tableEditor, cell) {
  _TDEBase["default"].call(this, tableEditor, cell);
}
_OOP["default"].mixClass(TDEEnum, _TDEBase["default"]);
TDEEnum.prototype.prepareInput = function () {
  this.$input = (0, _SCore._)({
    tag: 'selectmenu',
    attr: {
      'data-strict-value': 'true'
    },
    "class": 'asht-cell-editor-input',
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
TDEEnum.prototype.reload = function () {
  var prevValue = this.cell.value;
  var descriptor = this.cell.descriptor;
  this.$input.items = descriptor.items;
  this.$input.value = this.cell.value;
  this.$input.disabled = descriptor.readOnly;
  this.$input.enableSearch = descriptor.enableSearch || descriptor.searchable;
  if (prevValue !== null && prevValue !== undefined && this.$input.items && this.$input.items.length > 0 && (0, _util.isDifferent)(prevValue, this.$input.value)) {
    setTimeout(function () {
      if ((0, _util.isDifferent)(prevValue, this.$input.value)) {
        this.ev_inputChange();
      }
    }.bind(this), 0);
  }
};
TDEEnum.prototype._loadCellStyle = function () {
  var cellElt = this.cell.elt;
  this._cellStyle = {
    'font-size': cellElt.getComputedStyleValue('font-size'),
    'font-family': cellElt.getComputedStyleValue('font-family'),
    'font-style': cellElt.getComputedStyleValue('font-style')
  };
};
TDEEnum.prototype.ev_inputChange = function () {
  this.flushValue(this.$input.value);
  _ResizeSystem["default"].update();
};
_TDEBase["default"].typeClasses["enum"] = TDEEnum;
_TDEBase["default"].typeClasses.ComboBox = TDEEnum;
var _default = TDEEnum;
exports["default"] = _default;

/***/ }),

/***/ 64638:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _SCore = __webpack_require__(74328);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEBase
 * @constructor
 */
function TDEEnumSet() {
  _TDEBase["default"].apply(this, arguments);
}
_OOP["default"].mixClass(TDEEnumSet, _TDEBase["default"]);
TDEEnumSet.prototype.prepareInput = function () {
  var descriptor = this.cell.descriptor;
  this.$input = (0, _SCore._)({
    tag: 'multiselectmenu',
    "class": 'asht-enum-set-cell-editor-input',
    props: {
      items: descriptor.items,
      values: this.cell.value
    },
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
};
TDEEnumSet.prototype.reload = function () {
  var descriptor = this.cell.descriptor;
  this.$input.items = descriptor.items;
  this.$input.values = this.cell.value;
  this.$input.disabled = descriptor.readOnly || 'calc' in descriptor;
  this.$input.enableSearch = descriptor.enableSearch || descriptor.searchable;
};
TDEEnumSet.prototype.ev_inputChange = function () {
  this.flushValue(this.$input.values.slice());
  _ResizeSystem["default"].update();
};
_TDEBase["default"].typeClasses['{enum}'] = TDEEnumSet;
_TDEBase["default"].typeClasses.EnumSet = TDEEnumSet;
var _default = TDEEnumSet;
exports["default"] = _default;

/***/ }),

/***/ 90419:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _TDEText = _interopRequireDefault(__webpack_require__(20619));
var _SCore = __webpack_require__(74328);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _NumberInput = _interopRequireDefault(__webpack_require__(51394));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEText
 * @param {TableEditor} tableEditor
 * @param {TDEBase} cell
 * @constructor
 */
function TDENumber(tableEditor, cell) {
  _TDEText["default"].call(this, tableEditor, cell);
}
_OOP["default"].mixClass(TDENumber, _TDEText["default"]);
TDENumber.prototype.prepareInput = function () {
  /***
   * @type {PreInput}
   */
  this.$input = (0, _SCore._)({
    tag: _NumberInput["default"],
    "class": 'asht-cell-editor-input',
    props: {
      notNull: false
    },
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
TDENumber.prototype._loadCellStyle = function () {
  var cellElt = this.cell.elt;
  this._cellStyle = {
    'font-size': cellElt.getComputedStyleValue('font-size'),
    'font-family': cellElt.getComputedStyleValue('font-family'),
    'font-style': cellElt.getComputedStyleValue('font-style'),
    'line-height': cellElt.getComputedStyleValue('line-height'),
    'padding-left': cellElt.getComputedStyleValue('padding-left'),
    'padding-right': cellElt.getComputedStyleValue('padding-right'),
    'padding-top': cellElt.getComputedStyleValue('padding-top'),
    'padding-bottom': cellElt.getComputedStyleValue('padding-bottom'),
    'text-align': cellElt.getComputedStyleValue('text-align')
  };
};
TDENumber.prototype.reload = function () {
  var descriptor = this.cell.descriptor;
  if (descriptor.step) this.$input.step = descriptor.step;
  var min = -Infinity;
  var max = Infinity;
  if (!isNaN(descriptor.min) && isFinite(descriptor.min)) {
    min = descriptor.min;
  }
  if (!isNaN(descriptor.max) && isFinite(descriptor.max)) {
    max = descriptor.max;
  }
  var value = this.cell.value;
  if (typeof value !== "number" || isNaN(value)) value = '';
  this.$input.value = value;
  this.$input.min = min;
  this.$input.max = max;
  this.$input.disabled = descriptor.readOnly || 'calc' in descriptor;
};
TDENumber.prototype.onStart = function () {
  setTimeout(function () {
    this.$input.$input.focus();
    var value = this.cell.value;
    if (typeof value !== "number" || isNaN(value)) value = '';
    this.$input.value = value;
  }.bind(this), 5);
};
TDENumber.prototype.ev_keydown = function (event) {
  // var value = this.$input.value;
  if (event.key === "Enter" || event.key === "Tab") {
    // var text = this.$input.value;
    // var min = -Infinity;
    // var max = Infinity;
    // var descriptor = this.cell.descriptor;
    // if (!isNaN(descriptor.min) && isFinite(descriptor.min)) {
    //     min = descriptor.min;
    // }
    // if (!isNaN(descriptor.max) && isFinite(descriptor.max)) {
    //     max = descriptor.max;
    // }
    // var value = parseFloat(text);
    // console.log(text, value)
    //
    // if (!isNaN(value)) {
    //     value = Math.max(min, Math.min(max, value));
    //     this.flushValue(value);
    // }
    //
    // this.tableEditor.updateFixedTableEltPosition();
    // event.preventDefault();
    // this.editCellNext();
  }
};
TDENumber.prototype.ev_inputChange = function () {
  var value = this.$input.value;
  var min = -Infinity;
  var max = Infinity;
  var descriptor = this.cell.descriptor;
  if (!isNaN(descriptor.min) && isFinite(descriptor.min)) {
    min = descriptor.min;
  }
  if (!isNaN(descriptor.max) && isFinite(descriptor.max)) {
    max = descriptor.max;
  }
  if (!isNaN(value)) {
    value = Math.max(min, Math.min(max, value));
    this.flushValue(value);
  }
  _ResizeSystem["default"].update();
};
_TDEBase["default"].typeClasses.number = TDENumber;
_TDEBase["default"].typeClasses.Number = TDENumber;
_TDEBase["default"].typeClasses.NumberInput = TDENumber;
_TDEBase["default"].typeClasses.UniqueNumber = TDENumber;
_TDEBase["default"].typeClasses.unique_number = TDENumber;
_TDEBase["default"].typeClasses['unique<number>'] = TDENumber;
var _default = TDENumber;
exports["default"] = _default;

/***/ }),

/***/ 20619:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _PreInput = _interopRequireDefault(__webpack_require__(76606));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _SCore = __webpack_require__(74328);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEBase
 * @param {TableEditor} tableEditor
 * @param {TDEBase} cell
 * @constructor
 */
function TDEText(tableEditor, cell) {
  _TDEBase["default"].call(this, tableEditor, cell);
}
_OOP["default"].mixClass(TDEText, _TDEBase["default"]);
TDEText.prototype.prepareInput = function () {
  /***
   * @type {PreInput}
   */
  this.$input = (0, _SCore._)({
    tag: _PreInput["default"].tag,
    "class": 'asht-cell-editor-input',
    on: {
      change: this.ev_inputChange,
      keydown: this.ev_keydown
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
TDEText.prototype._loadCellStyle = function () {
  var cellElt = this.cell.elt;
  this._cellStyle = {
    'font-size': cellElt.getComputedStyleValue('font-size'),
    'font-family': cellElt.getComputedStyleValue('font-family'),
    'font-style': cellElt.getComputedStyleValue('font-style'),
    'line-height': cellElt.getComputedStyleValue('line-height'),
    'padding-left': cellElt.getComputedStyleValue('padding-left'),
    'padding-right': cellElt.getComputedStyleValue('padding-right'),
    'padding-top': cellElt.getComputedStyleValue('padding-top'),
    'padding-bottom': cellElt.getComputedStyleValue('padding-bottom'),
    'text-align': cellElt.getComputedStyleValue('text-align')
  };
};
TDEText.prototype.onStart = function () {
  // console.log('start');
};
TDEText.prototype.reload = function () {
  var descriptor = this.cell.descriptor;
  this.$input.value = this.cell.value;
  this.$input.disabled = descriptor.readOnly || 'calc' in descriptor;
};
TDEText.prototype.onStart = function () {
  setTimeout(function () {
    this.$input.focus();
    var text = this.$input.value;
    this.$input.applyData(text, {
      start: text.length,
      end: text.length
    });
  }.bind(this), 5);
};

/***
 *
 * @param {KeyboardEvent} event
 */
TDEText.prototype.ev_keydown = function (event) {
  if (event.key === "Enter" || event.key === "Tab") {
    var text = this.$input.value;
    if ((event.altKey || event.shiftKey) && event.key === "Enter") {
      var pos = this.$input.getSelectPosition();
      var newText = text.substr(0, pos.start) + '\n' + text.substr(pos.end);
      this.$input.applyData(newText, pos.start + 1);
      this.$input.waitToCommit(newText, pos.start + 1);
    } else {
      this.flushValue(text);
      this.tableEditor.layoutCtrl.updateFixedYHeaderSize();
      this.editCellNext();
    }
    event.preventDefault();
  }
};
TDEText.prototype.ev_inputChange = function () {
  this.flushValue(this.$input.value);
  _ResizeSystem["default"].update();
};
_TDEBase["default"].typeClasses.string = TDEText;
_TDEBase["default"].typeClasses.text = TDEText;
_TDEBase["default"].typeClasses.unique_string = TDEText;
_TDEBase["default"].typeClasses.UniqueString = TDEText;
_TDEBase["default"].typeClasses['unique<string>'] = TDEText;
var _default = TDEText;
exports["default"] = _default;

/***/ }),

/***/ 4270:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _Dom = __webpack_require__(64821);
var _SelectMenu = _interopRequireDefault(__webpack_require__(41735));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _SCore = __webpack_require__(74328);
var _TDEText = _interopRequireDefault(__webpack_require__(20619));
var _datetime = __webpack_require__(58286);
var _TDEDate = _interopRequireDefault(__webpack_require__(20445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEBase
 * @param {TableEditor} tableEditor
 * @param {TDBase} cell
 * @constructor
 */
function TDETime(tableEditor, cell) {
  _TDEBase["default"].call(this, tableEditor, cell);
}
_OOP["default"].mixClass(TDETime, _TDEBase["default"]);
TDETime.prototype.prepareInput = function () {
  this.$input = (0, _SCore._)({
    tag: 'timeinput',
    "class": 'asht-date-cell-editor-input',
    props: {
      format: 'hh:mm a'
    },
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
TDETime.prototype.reload = function () {
  var value = this.cell.value;
  var descriptor = this.cell.descriptor;
  var timeValue = this.cell.implicit(value);
  if (typeof timeValue !== "number") timeValue = 0;
  this.$input.dayOffset = timeValue;
  this.$input.disabled = descriptor.readOnly || 'calc' in descriptor;
};
TDETime.prototype._loadCellStyle = function () {
  var cellElt = this.cell.elt;
  this._cellStyle = {
    'font-size': cellElt.getComputedStyleValue('font-size'),
    'font-family': cellElt.getComputedStyleValue('font-family'),
    'font-style': cellElt.getComputedStyleValue('font-style')
  };
};

/***
 *
 * @param {KeyboardEvent} event
 */
TDETime.prototype.ev_firstKey = function (event) {
  if (event.key === "Delete") {
    this.cell.value = "";
  } else if (event.key === 'Enter' || event.key === 'F2') {
    this.$input.value = this.cell.value;
    this.startEditing();
    event.preventDefault();
  } else if (event.key === 'Tab') {
    this.editCellNext();
    event.preventDefault();
  } else if (event.key.length === 1 || event.key === "Backspace") {
    this.startEditing();
  } else if (event.key.startsWith('Arrow')) {
    event.preventDefault();
    switch (event.key) {
      case "ArrowLeft":
        this.editCellLeft();
        break;
      case "ArrowRight":
        this.editCellRight();
        break;
      case "ArrowUp":
        this.editCellAbove();
        break;
      case "ArrowDown":
        this.editCellBellow();
        break;
    }
  }
};

// TODO: handle enter key, blur

TDETime.prototype.ev_blur = function (event) {
  this.$editingbox.removeClass('as-status-focus');
  if (this._waitBlurTimeout >= 0) clearTimeout(this._waitBlurTimeout);
  this._waitBlurTimeout = setTimeout(function () {
    this._waitBlurTimeout = -1;
    if (!document.activeElement || this.$input.$text !== document.activeElement && !_AElement["default"].prototype.isDescendantOf.call(document.activeElement, this.$input)) {
      //blur before finished
    }
  }.bind(this), 100);
};
TDETime.prototype.ev_inputChange = function () {
  this.flushValue(this.$input.dayOffset);
  this.$input.$text.focus();
  this.$input.$text.select();
};
TDETime.prototype.ev_focus = _TDEText["default"].prototype.ev_focus;
_TDEBase["default"].typeClasses.time = TDETime;
_TDEBase["default"].typeClasses.time = TDETime;
var _default = TDETime;
exports["default"] = _default;

/***/ }),

/***/ 61267:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _SCore = __webpack_require__(74328);
var _TDEDate = _interopRequireDefault(__webpack_require__(20445));
var _datetime = __webpack_require__(58286);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _TimeRange24Input = _interopRequireDefault(__webpack_require__(66499));
var _TDTimeRange = _interopRequireDefault(__webpack_require__(66827));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEDate
 * @constructor
 */
function TDETimeRange24() {
  _TDEDate["default"].apply(this, arguments);
}
_OOP["default"].mixClass(TDETimeRange24, _TDEDate["default"]);
TDETimeRange24.prototype.prepareInput = function () {
  this.$input = (0, _SCore._)({
    tag: _TimeRange24Input["default"].tag,
    "class": ["asht-cell-editor-input", 'asht-time-range-24-cell-editor-input'],
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
TDETimeRange24.prototype.reload = function () {
  var value = this.cell.value;
  var descriptor = this.cell.descriptor;
  var timeRangeValue = _TDTimeRange["default"].prototype.implicit.call(this, value);
  if (timeRangeValue) {
    this.$input.dayOffset = timeRangeValue.dayOffset;
    this.$input.duration = timeRangeValue.duration;
  } else {
    this.$input.dayOffset = 0;
    this.$input.duration = 0;
  }
  this.$input.disabled = descriptor.readOnly || descriptor.disabled || 'calc' in descriptor;
  this.$input.notNull = descriptor.required;
};
TDETimeRange24.prototype.ev_inputChange = function () {
  this.flushValue(this.$input.value);
  var input;
  if (document.activeElement && _AElement["default"].prototype.isDescendantOf.call(document.activeElement, this.tableEditor.$view)) {
    input = (0, _SCore.$)('input', this.$input);
    if (input) {
      input.focus();
      input.select();
    }
  }
};
_TDEBase["default"].typeClasses.TimeRange24 = TDETimeRange24;
_TDEBase["default"].typeClasses.timerange24 = TDETimeRange24;
_TDEBase["default"].typeClasses.time_period = TDETimeRange24;
var _default = TDETimeRange24;
exports["default"] = _default;

/***/ }),

/***/ 46946:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _SCore = __webpack_require__(74328);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _util = __webpack_require__(92174);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEBase
 * @param {TableEditor} tableEditor
 * @param {TDBase} cell
 * @constructor
 */
function TDETreeEnum(tableEditor, cell) {
  _TDEBase["default"].call(this, tableEditor, cell);
}
_OOP["default"].mixClass(TDETreeEnum, _TDEBase["default"]);
TDETreeEnum.prototype.prepareInput = function () {
  this.$input = (0, _SCore._)({
    tag: 'selecttreemenu',
    "class": 'asht-cell-editor-input',
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
TDETreeEnum.prototype.reload = function () {
  var preValue = this.cell.value;
  var descriptor = this.cell.descriptor;
  this.$input.items = descriptor.items;
  this.$input.value = this.cell.value;
  this.$input.enableSearch = descriptor.enableSearch || descriptor.searchable;
  this.$input.disabled = descriptor.readOnly || 'calc' in descriptor;
  if (preValue !== null && preValue !== undefined && (0, _util.isDifferent)(preValue, this.$input.value)) {
    setTimeout(function () {
      if ((0, _util.isDifferent)(preValue, this.$input.value)) {
        this.ev_inputChange();
      }
    }.bind(this), 0);
  }
};
TDETreeEnum.prototype._loadCellStyle = function () {
  var cellElt = this.cell.elt;
  this._cellStyle = {
    'font-size': cellElt.getComputedStyleValue('font-size'),
    'font-family': cellElt.getComputedStyleValue('font-family'),
    'font-style': cellElt.getComputedStyleValue('font-style')
  };
};
TDETreeEnum.prototype.ev_inputChange = function () {
  this.flushValue(this.$input.value);
  _ResizeSystem["default"].update();
};
_TDEBase["default"].typeClasses.treeenum = TDETreeEnum;
_TDEBase["default"].typeClasses.TreeEnum = TDETreeEnum;
_TDEBase["default"].typeClasses.TreeComboBox = TDETreeEnum;
var _default = TDETreeEnum;
exports["default"] = _default;

/***/ }),

/***/ 46071:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _SCore = __webpack_require__(74328);
var _TDETreeEnum = _interopRequireDefault(__webpack_require__(46946));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDTreeEnum
 * @param {TableEditor} tableEditor
 * @param {TDBase} cell
 * @constructor
 */
function TDETreeLeafEnum(tableEditor, cell) {
  _TDETreeEnum["default"].apply(this, arguments);
}
_OOP["default"].mixClass(TDETreeLeafEnum, _TDETreeEnum["default"]);
TDETreeLeafEnum.prototype.prepareInput = function () {
  this.$input = (0, _SCore._)({
    tag: 'selecttreeleafmenu',
    "class": 'asht-cell-editor-input',
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
_TDEBase["default"].typeClasses.treeleafenum = TDETreeLeafEnum;
_TDEBase["default"].typeClasses.TreeLeafEnum = TDETreeLeafEnum;
var _default = TDETreeLeafEnum;
exports["default"] = _default;

/***/ }),

/***/ 24409:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDEBase = _interopRequireDefault(__webpack_require__(63504));
var _SCore = __webpack_require__(74328);
var _TDEText = _interopRequireDefault(__webpack_require__(20619));
var _datetime = __webpack_require__(58286);
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _util = __webpack_require__(92174);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDEBase
 * @param {TableEditor} tableEditor
 * @param {TDBase} cell
 * @constructor
 */
function TDEWeek(tableEditor, cell) {
  _TDEBase["default"].call(this, tableEditor, cell);
}
_OOP["default"].mixClass(TDEWeek, _TDEBase["default"]);
TDEWeek.prototype.prepareInput = function () {
  this.$input = (0, _SCore._)({
    tag: 'dateinput',
    "class": 'asht-date-cell-editor-input',
    on: {
      change: this.ev_inputChange
    }
  });
  this.$editingbox.clearChild().addChild(this.$input);
  this._loadCellStyle();
  this.$input.addStyle(this._cellStyle);
};
TDEWeek.prototype.reload = function () {
  var value = this.cell.value;
  var descriptor = this.cell.descriptor;
  var dateValue = this.cell.implicit(value);
  if (typeof value === "string") {
    dateValue = new Date(value);
    if (isNaN(dateValue.getTime())) {
      dateValue = (0, _datetime.parseDateString)(value, descriptor.format || (0, _util.getDefaultWeekFormat)());
    }
    if (isNaN(dateValue.getTime())) {
      dateValue = null;
    }
  }
  this.$input.format = descriptor.format || (0, _util.getDefaultWeekFormat)();
  this.$input.value = dateValue;
  this.$input.min = descriptor.min || new Date(1890, 0, 1);
  this.$input.max = descriptor.max || new Date(2090, 0, 1);
  this.$input.disabled = descriptor.readOnly || 'calc' in descriptor;
};
TDEWeek.prototype._loadCellStyle = function () {
  var cellElt = this.cell.elt;
  this._cellStyle = {
    'font-size': cellElt.getComputedStyleValue('font-size'),
    'font-family': cellElt.getComputedStyleValue('font-family'),
    'font-style': cellElt.getComputedStyleValue('font-style')
  };
};
TDEWeek.prototype.ev_inputChange = function () {
  this.flushValue(this.$input.value);
  if (document.activeElement && _AElement["default"].prototype.isDescendantOf.call(document.activeElement, this.tableEditor.$view)) {
    this.$input.$input.focus();
    this.$input.$input.select();
  }
};
TDEWeek.prototype.ev_focus = _TDEText["default"].prototype.ev_focus;
_TDEBase["default"].typeClasses.week = TDEWeek;
_TDEBase["default"].typeClasses.Week = TDEWeek;
var _default = TDEWeek;
exports["default"] = _default;

/***/ }),

/***/ 45632:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _stringGenerate = __webpack_require__(10713);
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
var _CCBlock = _interopRequireDefault(__webpack_require__(99125));
var _OOP = __webpack_require__(38608);
var _SCScope = _interopRequireDefault(__webpack_require__(55830));
var _Context = _interopRequireDefault(__webpack_require__(16311));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @augments Context
 * @extends CCBlock
 * @constructor
 */
function CBFunction() {
  _CCBlock["default"].call(this);
  _Context["default"].call(this);
  this.id = this.id || (0, _stringGenerate.randomIdent)(8);
  /**
   *
   * @type {Attributes & {args:[], body:string, lang:string}}
   */
  this.attributes = Object.assign(new _Attributes["default"](this), this.attributes);
  this.attributes.loadAttributeHandlers(this.attributeHandlers);
  this.pinHandlers = Object.assign({}, CBFunction.prototype.pinHandlers);
  this.receivedArgValues = {};
  this.result = null;
  this.mutex = null;
}
(0, _OOP.mixClass)(CBFunction, _CCBlock["default"], _Context["default"]);
CBFunction.prototype.tag = "Function";
CBFunction.prototype.menuIcon = 'span.mdi.mdi-function';
CBFunction.prototype.attributes = {};
/**
 *
 * @type {*[]}
 * @name args
 * @memberOf CBFunction.prototype.attributes
 */
CBFunction.prototype.attributes.args = [];
CBFunction.prototype.attributes.body = "";
CBFunction.prototype.attributes.lang = "js";
CBFunction.prototype.attributeHandlers = {};
CBFunction.prototype.buildFunction = function () {
  var self = this;
  this.pinHandlers = this.attributes.args.reduce(function (ac, cr) {
    ac[cr] = {
      receives: function receives(value) {
        if (value && value.then) {
          value.then(function () {
            self.receivedArgValues[cr] = value;
            self.exec();
          });
        } else {
          self.receivedArgValues[cr] = value;
          self.exec();
        }
      }
    };
    return ac;
  }, {});
  Object.assign(this.pinHandlers, CBFunction.prototype.pinHandlers);
};
CBFunction.prototype.exec = function () {
  var _this = this;
  var sync;
  var i;
  var args = this.attributes.args || [];
  for (i = 0; i < args.length; i++) {
    if (!(args[i] in this.receivedArgValues))
      //not enough params
      return;
  }
  var factor = '';
  var code = this.attributes.body || '';
  var localScope = new _SCScope["default"](this.getContext('variableScope')).makeFlattenedScope();
  for (i = 0; i < args.length; i++) {
    localScope.declareVar(args[i], this.receivedArgValues[args[i]]);
  }
  factor += "/** auto generate params **/";
  factor += Object.keys(localScope.data).map(function (key) {
    return "var ".concat(key, " = localScope.get(\"").concat(key, "\");");
  }).join('\n') + "\n\n";
  factor += "return function ".concat(this.attributes.name || 'noname', "(){\n").concat(code, "\n};");
  var func = new Function('localScope', factor)(localScope);
  var result = func.call(this);
  if (result && result.then) {
    sync = result.then(function (res) {
      _this.result = res;
      _this.pinFire('result');
    });
  } else {
    this.result = result;
    this.pinFire('result');
  }
  if (this.mutex && sync) {
    this.mutex = Promise.all([this.mutex, sync]);
  }
};
CBFunction.prototype.onStart = function () {
  this.exec();
};
CBFunction.prototype.pinHandlers = {};
CBFunction.prototype.attributeHandlers.id = {
  set: function set(value) {
    this.id = value;
  },
  get: function get() {
    return this.id;
  },
  "export": function _export() {
    return this.id;
  }
};
CBFunction.prototype.attributeHandlers.args = {
  set: function set(value, ref) {
    ref.set(value);
    this.buildFunction();
    return value;
  }
};
CBFunction.prototype.attributeHandlers.body = {
  // set: function (value) {
  //
  // },
  // get: function (value) {
  //
  // }
};
CBFunction.prototype.pinHandlers.exec = {
  receives: function receives() {
    this.exec();
  }
};
CBFunction.prototype.pinHandlers.result = {
  get: function get() {
    return this.result;
  }
};
var _default = CBFunction;
exports["default"] = _default;

/***/ }),

/***/ 91550:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.CHOOSE = CHOOSE;
exports.CTAN = exports.COS = void 0;
exports.DATE = DATE;
exports.DATEDIF = DATEDIF;
exports.DAY = DAY;
exports.DAYS = DAYS;
exports.IF = IF;
exports.MATCH = MATCH;
exports.MAX = MAX;
exports.MIN = MIN;
exports.MONTH = MONTH;
exports.NOW = NOW;
exports.SIN = void 0;
exports.SUM = SUM;
exports.TAN = void 0;
exports.TODAY = TODAY;
exports.YEAR = YEAR;
var _datetime = __webpack_require__(58286);
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function DATE(year, month, day) {
  var tYear = _typeof(year);
  var tMonth = _typeof(month);
  var tDay = _typeof(day);
  if (tYear !== "number" && tMonth !== 'number' && tDay !== "number") return undefined;
  if (tYear !== 'number') tYear = new Date().getFullYear();
  if (typeof month !== 'number') month = 1;
  if (typeof day !== 'number') day = 1;
  month = Math.max(1, Math.min(12, month << 0));
  var dim = (0, _datetime.daysInMonth)(year, month - 1);
  day = Math.max(1, Math.min(dim, day << 0));
  return new Date(year, month - 1, day);
}
function YEAR(date) {
  if (typeof date === "number" || typeof date === "string") date = new Date(date);
  if (date && date.getFullYear) return date.getFullYear();
  return undefined;
}
function MONTH(date) {
  if (typeof date === "number" || typeof date === "string") date = new Date(date);
  if (date && date.getMonth) return date.getMonth() + 1;
  return undefined;
}
function DAY(date) {
  if (typeof date === "number" || typeof date === "string") date = new Date(date);
  if (date && date.getDate) return date.getDate();
  return undefined;
}
function DAYS(end_date, start_date) {
  //todo
}
function TODAY() {
  return (0, _datetime.beginOfDay)(new Date());
}
function NOW() {
  return new Date();
}
function DATEDIF(d1, d2, df) {
  if (!d1 || !d2) {
    return undefined;
  }
  if (typeof d1 === "number" || typeof d1 === "string") d1 = new Date(d1);
  if (typeof d2 === "number" || typeof d2 === "string") d2 = new Date(d2);
  if (!d1.getFullYear || isNaN(d1.getFullYear())) return undefined;
  if (!d2.getFullYear || isNaN(d2.getFullYear())) return undefined;
  df = df || 'D';
  switch (df) {
    case 'D':
      return (0, _datetime.compareDate)(d2, d1);
    case 'M':
      return (0, _datetime.compareMonth)(d2, d1);
    case 'Y':
      return d2.getFullYear() - d1.getFullYear();
    default:
      return undefined;
  }
}
function MAX(args) {
  var res;
  if (arguments.length === 0) {
    res = undefined;
  } else if (arguments.length === 1) {
    if (typeof args === "number") {
      res = args;
    } else if (args instanceof Array) {
      res = args.reduce(function (ac, x) {
        return Math.max(ac, x);
      }, -Infinity);
      res = res === -Infinity ? undefined : res;
    }
  }
  return res;
}
function MIN(args) {
  var res;
  if (arguments.length === 0) {
    res = undefined;
  } else if (arguments.length === 1) {
    if (typeof args === "number") {
      res = args;
    } else if (args instanceof Array) {
      res = args.reduce(function (ac, x) {
        return Math.min(ac, x);
      }, Infinity);
      res = res === Infinity ? undefined : res;
    }
  }
  return res;
}
var SIN = Math.sin.bind(Math);
exports.SIN = SIN;
var COS = Math.cos.bind(Math);
exports.COS = COS;
var TAN = Math.tan.bind(Math);
exports.TAN = TAN;
var CTAN = function CTAN(x) {
  return 1 / TAN(x);
};
exports.CTAN = CTAN;
function SUM(args) {
  var res;
  if (arguments.length === 0) {
    res = 0;
  } else if (arguments.length === 1) {
    if (typeof args === "number") {
      res = args;
    } else if (args instanceof Array) {
      res = args.reduce(function (ac, x) {
        return ac + x;
      }, 0);
    }
  } else {
    res = Array.prototype.reduce.call(arguments, function (ac, x) {
      return SUM(x);
    }, 0);
  }
  if (isNaN(res)) res = undefined;
  return res;
}
function IF(condition, ifTrue, ifFalse) {
  return condition ? ifTrue : ifFalse;
}
function MATCH(lookup_value, lookup_array, match_type) {
  if (!(lookup_array instanceof Array)) return undefined;
  //todo
}

function CHOOSE(index_num, args) {
  if (arguments.length < 2) return undefined;
  if (arguments.length === 2) {
    if (args instanceof Array) {
      return args[index_num - 1];
    } else return arguments[index_num];
  }
  return arguments[index_num];
}

/***/ }),

/***/ 80470:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var ExcelFx = _interopRequireWildcard(__webpack_require__(91550));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function TSFunction(propertyNames, body) {
  this.propertyNames = propertyNames;
  this.body = body;
  this.dependents = [];
  this.ast = null;
  this._compile();
  this.mutex = null;
}
TSFunction.prototype.localConstants = {};
Object.assign(TSFunction.prototype.localConstants, ExcelFx);
TSFunction.prototype._isAsync = function (jsCode) {
  if (!window.babel) return false;
  var scriptCode = 'async function fx(){\n' + jsCode + '\n}';
  var result = false;
  var ast = babel.parseSync(scriptCode, {});
  babel.traverse(ast, {
    AwaitExpression: function AwaitExpression() {
      result = true;
    }
  });
  return result;
};
TSFunction.prototype._makeConstCode = function (localConstants, context) {
  localConstants = Object.assign({}, localConstants || {}, context || {});
  return Object.keys(localConstants).map(function (key) {
    return 'const ' + key + ' = localConstants[' + JSON.stringify(key) + '];';
  }).join('\n') + '\n';
};
TSFunction.prototype._compile = function () {
  var types = babel && babel.types;
  var scriptCode;
  if (this.body.startsWith('=')) {
    scriptCode = 'RET' + this.body;
  } else scriptCode = this.body;
  if (!window.babel) return;
  var variableDict = this.propertyNames.reduce(function (ac, cr) {
    ac[cr] = true;
    return ac;
  }, {});
  try {
    var isAsync = this._isAsync(scriptCode);
    scriptCode = (isAsync ? 'async ' : '') + 'function fx(RC){\n' + 'var RET;\n' + scriptCode + '\nreturn RET;' + '\n}';
    this.ast = babel.parseSync(scriptCode, {});
    var variables = {};
    babel.traverse(this.ast, {
      Program: function Program(path) {},
      Identifier: function Identifier(path) {
        var node = path.node;
        var name = node.name;
        if (path.container.type === "MemberExpression" && path.container.object !== node) return;
        var newNode;
        if (variableDict[name]) {
          variables[name] = true;
          newNode = types.memberExpression(types.identifier('RC'), types.identifier(name));
          newNode.ignore = true;
          path.replaceWith(newNode);
        }
      },
      MemberExpression: function MemberExpression(path) {
        if (path.node.ignore) path.skip();
      }
    });
    this.dependents = Object.keys(variables);
    this.jsCode = 'module.exports = ' + babel.generate(this.ast).code;
    var options = {
      presets: [babel.presetEnv]
    };
    this.transformedCode = babel.transform(this.jsCode, options).code;
  } catch (err) {
    (0, _safeThrow["default"])(err);
  }
};
TSFunction.prototype._makeFunction = function (context) {
  try {
    var mdl = {};
    var localConstants = Object.assign({}, this.localConstants || {}, context || {});
    new Function('module', 'regeneratorRuntime', 'localConstants', this._makeConstCode(localConstants, context) + this.transformedCode)(mdl, babel.regeneratorRuntime, localConstants);
    return mdl.exports;
  } catch (e) {
    (0, _safeThrow["default"])(e);
  }
};
TSFunction.prototype.invoke = function (_this, record, context) {
  try {
    var func = this._makeFunction(context);
    return func.call(_this, record);
  } catch (err) {
    // console.error(err);
    if (window["ABSOL_DEBUG"]) (0, _safeThrow["default"])(err);
    return undefined;
  }
};
var _default = TSFunction;
exports["default"] = _default;

/***/ }),

/***/ 76506:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function TSSwitch(cases) {
  this.cases = cases;
  this.defaultCase = this._findDefaultCase(cases);
  this.dependents = Object.keys(this.cases.reduce(function (ac, cr) {
    if (_typeof(cr["case"]) === 'object') {
      Object.assign(ac, cr);
    }
    return ac;
  }, {}));
}
TSSwitch.prototype._findDefaultCase = function (cases) {
  for (var i = 0; i < cases.length; ++i) {
    if (this.cases[i]["case"] === 'DEFAULT') return this.cases[i];
  }
  return null;
};
TSSwitch.prototype.getCase = function (caseObj) {
  var cCase;
  var cases = this.cases;
  for (var i = 0; i < cases.length; ++i) {
    cCase = cases[i];
    if (this._test(cCase, caseObj)) return cCase;
  }
  return this.defaultCase;
};
TSSwitch.prototype._test = function (caseRq, case2Test) {
  if (case2Test === 'DEFAULT') return false;
  return Object.keys(caseRq).every(function (key) {
    return caseRq[key] === case2Test[key];
  });
};
var _default = TSSwitch;
exports["default"] = _default;

/***/ }),

/***/ 92174:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.calcIndexColumnWidth = calcIndexColumnWidth;
exports.computeSheetDescriptor = computeSheetDescriptor;
exports.duplicateData = duplicateData;
exports.getDataSheetClipboard = getDataSheetClipboard;
exports.getDefaultWeekFormat = getDefaultWeekFormat;
exports.isDifferent = isDifferent;
exports.isNone = isNone;
exports.setDataSheetClipboard = setDataSheetClipboard;
var _generator = __webpack_require__(18528);
var _TSSwitch = _interopRequireDefault(__webpack_require__(76506));
var _TSFunction = _interopRequireDefault(__webpack_require__(80470));
var _CheckListBox = __webpack_require__(62896);
var _TextMeasure = _interopRequireDefault(__webpack_require__(60268));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function isNone(o) {
  return o === null || o === undefined;
}
function isDifferent(a, b) {
  return a !== b && (!isNone(a) || !isNone(b));
}
function duplicateData(o) {
  return (0, _generator.replaceDateStringJSVariable)(o);
}
function getDefaultWeekFormat() {
  var lang = 'VN';
  if (window['systemconfig'] && window['systemconfig']['language']) lang = window['systemconfig']['language'];
  if (lang.toUpperCase().match(/VN|VI/)) return 'Tuần ww, yyyy';
  if (lang.toUpperCase().match(/EN|US/)) return 'Week ww, yyyy';
  return 'Week ww, yyyy';
}
function computeSheetDescriptor(propertyNames, propertyDescriptors) {
  var computeFxDescriptor = function computeFxDescriptor(descriptor) {
    Object.defineProperty(descriptor, '__fx__', {
      configurable: true,
      enumerable: false,
      value: {}
    });
    Object.keys(descriptor).reduce(function (ac, key) {
      var val = descriptor[key];
      if (typeof val === 'string') {
        if (val.startsWith('=')) {
          descriptor.__fx__[key] = new _TSFunction["default"](propertyNames, val);
        } else if (val.startsWith('{{') && val.endsWith('}}')) {
          descriptor.__fx__[key] = new _TSFunction["default"](propertyNames, val.substring(2, val.length - 2));
        } else if (key === 'onchange') {
          descriptor.__fx__[key] = new _TSFunction["default"](propertyNames, val);
        }
      } else if (key === 'switch') {
        descriptor.__fx__['switch'] = new _TSSwitch["default"](descriptor['switch']);
      }
      return ac;
    }, descriptor.__fx__);
  };
  var computeDependenciesDescriptor = function computeDependenciesDescriptor(descriptor) {
    var dependencies = {};
    var fx = descriptor.__fx__;
    Object.keys(fx).reduce(function (ac, key) {
      if (fx[key].dependents) {
        fx[key].dependents.reduce(function (ac1, pName) {
          ac1[pName] = true;
          return ac1;
        }, ac);
      }
      // ac[];
      return ac;
    }, dependencies);
    delete dependencies[name];
    Object.defineProperty(descriptor, '__dependencies__', {
      configurable: true,
      enumerable: false,
      value: dependencies
    });
  };
  var descriptor;
  propertyNames.forEach(function (name) {
    descriptor = propertyDescriptors[name];
    if (!descriptor) return;
    computeFxDescriptor(descriptor);
    computeDependenciesDescriptor(descriptor);
  });
}
var icWidthCache = Array(10).fill(0);
function calcIndexColumnWidth(nRow) {
  var l = (nRow + '').length;
  l = Math.max(1, l);
  if (icWidthCache[l]) return icWidthCache[l];
  var res = _TextMeasure["default"].measureWidth('0'.repeat(l), 'Arial', 14) + 2 + 0.7 * 14;
  res = Math.ceil(res);
  icWidthCache[l] = res;
  return res;
}
function setDataSheetClipboard(data) {
  var text = (0, _generator.generateJSVariable)(data);
  localStorage.setItem("data_sheet_clipboard", text);
}
function getDataSheetClipboard() {
  var text = localStorage.getItem("data_sheet_clipboard");
  if (!text) return null;
  try {
    return new Function('return ' + text)();
  } catch (error) {
    return null;
  }
}

/***/ }),

/***/ 11090:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.TDRecord = TDRecord;
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
__webpack_require__(81822);
__webpack_require__(90123);
__webpack_require__(24839);
__webpack_require__(6213);
__webpack_require__(90837);
__webpack_require__(99448);
__webpack_require__(45033);
__webpack_require__(6713);
__webpack_require__(71701);
__webpack_require__(32055);
__webpack_require__(80805);
__webpack_require__(79309);
__webpack_require__(84122);
__webpack_require__(66827);
__webpack_require__(57433);
__webpack_require__(57088);
__webpack_require__(73223);
var _SCore = __webpack_require__(74328);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _Abstractions = __webpack_require__(51686);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {TableData} table
 * @param {Object} record
 * @param {number} idx
 * @constructor
 */

/***
 * @extends ASHTRow
 * @param {TableData} table
 * @param {Object} record
 * @param {number|"*"} idx
 * @constructor
 */
function TDRecord(table, record, idx) {
  _Abstractions.ASHTRow.call(this, table, record);
  this.idx = idx;
}
_OOP["default"].mixClass(TDRecord, _Abstractions.ASHTRow);
TDRecord.prototype.render = function () {
  this.elt = (0, _SCore._)('tr');
  this.$idx = (0, _SCore._)('td');
  this.elt.addChild(this.$idx);
};
TDRecord.prototype.loadFields = function () {
  this.loadCells();
};
Object.defineProperty(TDRecord.prototype, 'idx', {
  set: function set(value) {
    this._idx = value;
    if (value === "*") {
      this.$idx.clearChild().addChild((0, _SCore._)({
        text: '*'
      }));
      this.elt.addClass('asht-new-row');
    } else {
      this.$idx.clearChild().addChild((0, _SCore._)({
        text: value + 1 + ''
      }));
      this.elt.removeClass('asht-new-row');
    }
  },
  get: function get() {
    return this._idx;
  }
});
TDRecord.prototype.loadCells = function () {
  var tdRow = this;
  var propertyNames = this.propertyNames;
  var propertyDescriptors = this.propertyDescriptors;
  this.properties.forEach(function (cell) {
    cell.elt.remove();
  });
  this.propertyByName = {};
  this.properties = propertyNames.map(function (pName) {
    var descriptor = propertyDescriptors[pName] || {
      type: 'notSupport'
    };
    var td = new (_TDBase["default"].typeClasses[descriptor.type] || _TDBase["default"].typeClasses.notSupport)(tdRow, pName);
    tdRow.propertyByName[pName] = td;
    return td;
  });
  var cellEltList = this.properties.map(function (cell) {
    return cell.elt;
  });
  this.elt.addChild(cellEltList);
};
var _default = TDRecord;
exports["default"] = _default;

/***/ }),

/***/ 21507:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SCore = __webpack_require__(74328);
var _TDRecord = _interopRequireDefault(__webpack_require__(11090));
var _Attributes = _interopRequireDefault(__webpack_require__(36447));
__webpack_require__(86054);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _DomSignal = _interopRequireDefault(__webpack_require__(47341));
var _Abstractions = __webpack_require__(51686);
var _utils = __webpack_require__(84512);
var _stringUtils = __webpack_require__(26243);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * /**
 * @extends ASHTTable
 * @param {TableEditor} editor
 * @param {object=} opt
 * @constructor
 */
function TableData(editor, opt) {
  _Abstractions.ASHTTable.apply(this, arguments);
  this.bodyRow = [];
  this.headCells = [];
  this.newRow = null;
  /***
   *
   * @type {Attributes}
   */
  this.config = new _Attributes["default"](this);
  this.config.loadAttributeHandlers(this.configHandlers);
  for (var key in this) {
    if (key.startsWith('ev_')) {
      this[key] = this[key].bind(this);
    }
  }
}
_OOP["default"].mixClass(TableData, _Abstractions.ASHTTable);
TableData.prototype.defaultConfig = {
  rowHeight: 30
};
TableData.prototype.configHandlers = {};
TableData.prototype.configHandlers.rowHeight = {
  set: function set(value) {
    value = 30;
    this.getView();
    if (!(value > 0 && value < 1024)) {
      value = this.defaultConfig.rowHeight;
    }
    this.$view.addStyle('--row-height', value + 'px');
    return value;
  },
  "export": function _export(ref) {
    if (ref.get() === 21) return undefined;
    return ref.get() || undefined;
  }
};
TableData.prototype["export"] = function () {
  var res = {
    propertyNames: this.propertyNames,
    propertyDescriptors: this.propertyDescriptors,
    records: this.getRecords()
  };
  var config = this.config["export"]();
  if (Object.keys(config).length > 0) {
    res.config = config;
  }
  return res;
};
TableData.prototype["import"] = function (data) {
  var _this = this;
  this.formSource = data.formSource;
  this.propertyDescriptors = data.propertyDescriptors;
  this.propertyNames = data.propertyNames;
  Object.assign(this.config, this.defaultConfig, data.config || {});
  this.computeFormSource();
  this.computeHeader();
  this.bodyRow = (data.records || []).map(function (record, idx) {
    return new _TDRecord["default"](_this, record, idx);
  });
  this.reload();
  this.emitResizeEvent();
};
TableData.prototype.getHash = function () {
  return this.bodyRow.reduce(function (ac, row) {
    return (0, _stringUtils.stringHashCode)(row.getHash() + ',' + ac);
  });
};
TableData.prototype.onStart = function () {
  // console.log(this, 'start');
};
TableData.prototype.onResume = function () {
  // console.log(this, 'resume');
};
TableData.prototype.onPause = function () {
  // console.log(this, 'pause');
};
TableData.prototype.onStop = function () {
  // console.log(this, 'stop');
};
TableData.prototype.reload = function () {
  this.loadHeader();
  this.loadBody();
};
TableData.prototype.loadHeader = function () {
  var thisTable = this;
  this.$headRow.clearChild();
  this.$headRow.addChild(this.$rootCell);
  this.colIndexOfProperty = this.propertyNames.reduce(function (ac, name, i) {
    ac[name] = i + 1;
    return ac;
  }, {});
  this.headCells = this.propertyNames.map(function (name, i) {
    var cell = (0, _SCore._)({
      tag: 'td',
      attr: {
        'data-col-idx': i,
        'data-prop-name': name
      },
      child: {
        tag: 'span',
        child: {
          text: thisTable.propertyDescriptors && thisTable.propertyDescriptors[name] && thisTable.propertyDescriptors[name].text || name
        }
      }
    });
    thisTable.$headRow.addChild(cell);
    return {
      elt: cell,
      index: i,
      name: name,
      descriptor: thisTable.propertyDescriptors && thisTable.propertyDescriptors[name] || {
        type: 'text'
      }
    };
  });
};
TableData.prototype.loadBody = function () {
  var thisTable = this;
  this.$tbody.clearChild();
  var rowEltList = this.bodyRow.map(function (row) {
    return row.elt;
  });
  this.$tbody.addChild(rowEltList);
  this.newRow = new _TDRecord["default"](this, {}, '*');
  this.newRow.once('property_change', this.ev_newRowPropertyChange);
  this.$tbody.addChild(this.newRow.elt);
};
TableData.prototype.getView = function () {
  if (this.$view) return this.$view;
  var viewConstructor = {
    "class": 'asht-table-data',
    child: [{
      tag: 'thead',
      child: 'tr'
    }, {
      tag: 'tbody',
      child: [{}]
    }]
  };
  if (this.opt.elt) {
    viewConstructor.elt = this.opt.elt;
  } else {
    viewConstructor.tag = 'table';
  }
  this.$view = (0, _SCore._)(viewConstructor);
  this.$thead = (0, _SCore.$)('thead', this.$view);
  this.$headRow = (0, _SCore.$)('tr', this.$thead);
  this.$tbody = (0, _SCore.$)('tbody', this.$view);
  this.$rootCell = (0, _SCore._)('td.asht-table-data-root-cell');
  this.$domSignal = (0, _SCore._)('attachhook').addTo(this.$rootCell);
  this.domSignal = new _DomSignal["default"](this.$domSignal).on('requestEmitResizeEvent', function () {
    window.dispatchEvent(new Event('resize'));
  });
  return this.$view;
};
TableData.prototype.emitResizeEvent = function () {
  window.dispatchEvent(new Event('resize'));
  this.domSignal.emit('requestEmitResizeEvent');
};

/***
 *
 * @param {Object=} newRecord
 */
TableData.prototype.flushNewRow = function (newRecord) {
  this.newRow.idx = this.bodyRow.length;
  this.bodyRow.push(this.newRow);
  this.newRow.makeDefaultValues();
  this.newRow = new _TDRecord["default"](this, newRecord || {}, "*");
  this.newRow.once('property_change', this.ev_newRowPropertyChange);
  this.$tbody.addChild(this.newRow.elt);
  this.emitResizeEvent();
};

/**
 * @param {Number} y
 */
TableData.prototype.findRowByClientY = function (y) {
  var length = this.bodyRow.length + 1;
  var start = 0;
  var mid;
  var row;
  var rowY;
  var position;
  while (length > 0) {
    mid = start + (length >> 1);
    row = this.bodyRow[mid] || this.newRow;
    position = row.elt.getBoundingClientRect();
    rowY = position.top;
    if (y < rowY) {
      length = mid - start;
    } else if (y > rowY + position.height) {
      length = start + length - mid - 1;
      start = mid + 1;
    } else {
      return row;
    }
  }
  return null;
};
TableData.prototype.findFirsIncompleteCell = function () {
  var cells;
  for (var i = 0; i < this.bodyRow.length; ++i) {
    cells = this.bodyRow[i].getIncompleteCells();
    if (cells.length > 0) {
      return cells[0];
    }
  }
};

/**
 * @param {Number} x
 */
TableData.prototype.findColByClientX = function (x) {
  var length = this.headCells.length;
  var start = 0;
  var mid;
  var cell;
  var rowX;
  var position;
  while (length > 0) {
    mid = start + (length >> 1);
    cell = this.headCells[mid];
    position = cell.elt.getBoundingClientRect();
    rowX = position.left;
    if (x < rowX) {
      length = mid - start;
    } else if (x > rowX + position.width) {
      length = start + length - mid - 1;
      start = mid + 1;
    } else {
      return cell;
    }
  }
  return null;
};
TableData.prototype.findColByIndex = function (index) {
  return this.headCells[index] || null;
};
TableData.prototype.findColByName = function (name) {
  return this.headCells[this.propertyNames.indexOf(name)] || null;
};
TableData.prototype.findRowByIndex = function (index) {
  if (index === '*') return this.newRow;
  return this.bodyRow[index] || null;
};
TableData.prototype.rowAt = function (index) {
  return this.bodyRow[index];
};
TableData.prototype.removeRowAt = function (idx) {
  var row = this.bodyRow[idx];
  if (!row) return;
  this.bodyRow.splice(idx, 1);
  this.$tbody.removeChild(row.elt);
  for (var i = idx; i < this.bodyRow.length; ++i) {
    this.bodyRow[i].idx = i;
  }
  this.emitResizeEvent();
};
TableData.prototype.addRowAt = function (idx, record) {
  if (idx < 0) idx = 0;
  if (idx > this.bodyRow.length || !(0, _utils.isNaturalNumber)(idx)) idx = this.bodyRow.length;
  var atElt = this.$tbody.childNodes[idx];
  var newRow = new _TDRecord["default"](this, record, idx);
  this.bodyRow.splice(idx, 0, newRow);
  this.$tbody.addChildBefore(newRow.elt, atElt);
  for (var i = idx + 1; i < this.bodyRow.length; ++i) {
    this.bodyRow[i].idx = i;
  }
};
TableData.prototype.getLength = function () {
  return this.bodyRow.length;
};
TableData.prototype.getRecords = function () {
  return this.bodyRow.map(function (r) {
    return r.record;
  });
};
TableData.prototype.findIndexOfCol = function (col) {
  return this.headCells.indexOf(col);
};
TableData.prototype.ev_newRowPropertyChange = function (event) {
  this.emit('new_row_property_change', Object.assign({}, event, {
    type: 'new_row_property_change',
    target: this,
    tdRecord: event.target
  }), this);
};
Object.defineProperty(TableData.prototype, 'fragment', {
  get: function get() {
    return this.editor && this.editor.fragment || this.opt.fragment || null;
  }
});
var _default = TableData;
exports["default"] = _default;

/***/ }),

/***/ 45033:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SCore = __webpack_require__(74328);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDBase
 * @constructor
 */
function TDArrayOfText() {
  _TDBase["default"].apply(this, arguments);
}
_OOP["default"].mixClass(TDArrayOfText, _TDBase["default"]);
TDArrayOfText.prototype.attachView = function () {
  this.elt.clearChild();
  this.$text = (0, _SCore._)({
    tag: 'span',
    child: {
      text: ''
    }
  });
  this.elt.addChild(this.$text);
};
TDArrayOfText.prototype.reload = function () {
  var value = this.value;
  if (this.isNoneValue(value)) value = [];
  this.$text.firstChild.data = value.join(', ');
};
TDArrayOfText.prototype.implicit = function (value) {
  if (value === undefined || value === null) return null;
  if (!Array.isArray(value)) return null;
  return value.every(function (it) {
    return it + '';
  });
};
_TDBase["default"].typeClasses.ArrayOfText = TDArrayOfText;
_TDBase["default"].typeClasses['text[]'] = TDArrayOfText;
var _default = TDArrayOfText;
exports["default"] = _default;

/***/ }),

/***/ 90555:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Abstractions = __webpack_require__(51686);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends ASHField
 * @param {TDRecord} row
 * @param {string} pName
 * @constructor
 */
function TDBase(row, pName) {
  _Abstractions.ASHField.apply(this, arguments);
  this.elt.addClass('asht-table-cell');
}
_OOP["default"].mixClass(TDBase, _Abstractions.ASHField);
TDBase.typeClasses = {
  notSupport: TDBase
};
var _default = TDBase;
exports["default"] = _default;

/***/ }),

/***/ 24839:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SCore = __webpack_require__(74328);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDBase
 * @constructor
 */
function TDBoolean() {
  _TDBase["default"].apply(this, arguments);
  this.elt.addClass('asht-type-boolean');
}
_OOP["default"].mixClass(TDBoolean, _TDBase["default"]);
TDBoolean.prototype.implicit = function (value) {
  if (value === undefined || value === null) return undefined;
  if (['false', '0', 'no'].indexOf(value) >= 0) return false;
  return !!value;
};
TDBoolean.prototype.attachView = function () {
  this.elt.clearChild();
  this.$check = (0, _SCore._)('span.mdi.mdi-check');
  this.elt.addChild(this.$check);
};
TDBoolean.prototype.loadValue = function () {
  var value = this.implicit(this.value);
  if (value) this.$check.removeStyle('display');else this.$check.addStyle('display', 'none');
};
TDBoolean.prototype.isNoneValue = function (value) {
  return typeof value !== 'boolean';
};
_TDBase["default"].typeClasses.bool = TDBoolean;
_TDBase["default"].typeClasses["boolean"] = TDBoolean;
_TDBase["default"].typeClasses.CheckBox = TDBoolean;
var _default = TDBoolean;
exports["default"] = _default;

/***/ }),

/***/ 71701:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _datetime = __webpack_require__(58286);
var _SCore = __webpack_require__(74328);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends TDBase
 * @constructor
 */
function TDDate() {
  _TDBase["default"].apply(this, arguments);
  this.elt.addClass('asht-type-date');
}
_OOP["default"].mixClass(TDDate, _TDBase["default"]);
TDDate.prototype.attachView = function () {
  this.elt.clearChild();
  this.$date = (0, _SCore._)({
    tag: 'span',
    child: {
      text: ''
    }
  });
  this.elt.addChild(this.$date);
};
TDDate.prototype.implicit = function (value) {
  var vType = _typeof(value);
  var dateValue = (0, _datetime.implicitDate)(value);
  if (dateValue && isNaN(dateValue.getTime())) dateValue = null;
  return dateValue;
};
TDDate.prototype.loadValue = function () {
  var value = this.value;
  var text = '';
  var dateValue = this.implicit(value);
  if (value) {
    if (!dateValue) {
      text = "?[" + JSON.stringify(value) + ']';
    } else if (dateValue) {
      text = (0, _datetime.formatDateTime)(dateValue, (this.descriptor.format || "dd/MM/yyyy").replace(/m/g, 'M'));
    }
  } else {
    text = '';
  }
  this.$date.firstChild.data = text;
};
TDDate.prototype.isEmpty = function () {
  var value = this.implicit(this.value);
  return this.isNoneValue(value);
};
TDDate.prototype.isNoneValue = function (value) {
  return _TDBase["default"].prototype.isNoneValue.call(this, value) || !(value instanceof Date);
};
Object.defineProperty(TDDate.prototype, 'dateValue', {
  get: function get() {
    var value = this.value;
    var vType = _typeof(value);
    var dateValue = (0, _datetime.implicitDate)(value);
    if (dateValue && dateValue.getTime() > 0) return dateValue;
    return undefined;
  }
});
_TDBase["default"].typeClasses.date = TDDate;
_TDBase["default"].typeClasses.Date = TDDate;
_TDBase["default"].typeClasses.DateInput = TDDate;
var _default = TDDate;
exports["default"] = _default;

/***/ }),

/***/ 73223:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = __webpack_require__(38608);
var _SCore = __webpack_require__(74328);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/**
 * @extends TDBase
 * @constructor
 */
function TDDateInYear() {
  _TDBase["default"].apply(this, arguments);
}
(0, _OOP.mixClass)(TDDateInYear, _TDBase["default"]);
TDDateInYear.prototype.attachView = function () {
  this.elt.clearChild();
  this.$text = (0, _SCore._)({
    tag: 'span',
    child: {
      text: ''
    }
  });
  this.elt.addChild(this.$text);
};
TDDateInYear.prototype.isNoneValue = function (value) {
  if (!value) return true;
  if (_typeof(value) !== 'object') return true;
  if (typeof value.month !== 'number') return true;
  if (typeof value.date !== 'number') return true;
  return false;
};
TDDateInYear.prototype.reload = function () {
  var value = this.value;
  if (this.isNoneValue(value)) value = null;
  var text = '';
  if (value) {
    text = (0, _utils.zeroPadding)(value.date, 2) + '/' + (0, _utils.zeroPadding)(value.month + 1, 2); //todo: format
  }

  this.$text.firstChild.data = text;
};
var _default = TDDateInYear;
exports["default"] = _default;
_TDBase["default"].typeClasses.DateInYear = TDDateInYear;
_TDBase["default"].typeClasses.DateInYearInput = TDDateInYear;

/***/ }),

/***/ 57088:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _datetime = __webpack_require__(58286);
var _SCore = __webpack_require__(74328);
var _DateNLevelInput = _interopRequireDefault(__webpack_require__(45627));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends TDBase
 * @constructor
 */
function TDDateNLevel() {
  _TDBase["default"].apply(this, arguments);
  this.elt.addClass('asht-type-date');
}
_OOP["default"].mixClass(TDDateNLevel, _TDBase["default"]);
TDDateNLevel.prototype.leve2format = _DateNLevelInput["default"].prototype.leve2format;
TDDateNLevel.prototype.attachView = function () {
  this.elt.clearChild();
  this.$date = (0, _SCore._)({
    tag: 'span',
    child: {
      text: ''
    }
  });
  this.elt.addChild(this.$date);
};
TDDateNLevel.prototype.implicit = function (value) {
  if (value instanceof Date) value = {
    value: value
  };
  if (!value) return null;
  var dateValue = (0, _datetime.implicitDate)(value.value);
  if (dateValue && isNaN(dateValue.getTime())) dateValue = null;
  if (dateValue === null) return null;
  value.value = dateValue;
  value.level = value.level || 'date';
  return value;
};
TDDateNLevel.prototype.loadValue = function () {
  var value = this.value;
  var text = '';
  value = this.implicit(value);
  if (value) {
    text = (0, _datetime.formatDateTime)(value.value, this.leve2format[value.level]);
  }
  this.$date.firstChild.data = text;
};
TDDateNLevel.prototype.isEmpty = function () {
  var value = this.implicit(this.value);
  return this.isNoneValue(value);
};
TDDateNLevel.prototype.isNoneValue = function (value) {
  return _TDBase["default"].prototype.isNoneValue.call(this, value) || !(value.value instanceof Date);
};
Object.defineProperty(TDDateNLevel.prototype, 'dateValue', {
  get: function get() {
    var value = this.value;
    var vType = _typeof(value);
    var dateValue = (0, _datetime.implicitDate)(value);
    if (dateValue && dateValue.getTime() > 0) return dateValue;
    return undefined;
  }
});
_TDBase["default"].typeClasses.datenlevel = TDDateNLevel;
_TDBase["default"].typeClasses.DateNLevel = TDDateNLevel;
_TDBase["default"].typeClasses.DateNLevelInput = TDDateNLevel;
var _default = TDDateNLevel;
exports["default"] = _default;

/***/ }),

/***/ 32055:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _datetime = __webpack_require__(58286);
var _SCore = __webpack_require__(74328);
var _TDDate = _interopRequireDefault(__webpack_require__(71701));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends TDBase
 * @constructor
 */
function TDDateTime() {
  _TDBase["default"].apply(this, arguments);
  this.elt.addClass('asht-type-date-time');
}
_OOP["default"].mixClass(TDDateTime, _TDBase["default"]);
TDDateTime.prototype.attachView = function () {
  this.elt.clearChild();
  this.$date = (0, _SCore._)({
    tag: 'span',
    child: {
      text: ''
    }
  });
  this.elt.addChild(this.$date);
};
TDDateTime.prototype.implicit = _TDDate["default"].prototype.implicit;
TDDateTime.prototype.isEmpty = _TDDate["default"].prototype.isEmpty;
TDDateTime.prototype.isNoneValue = _TDDate["default"].prototype.isNoneValue;
TDDateTime.prototype.loadValue = function () {
  var value = this.value;
  var text = '';
  var dateValue = this.implicit(value);
  if (value) {
    if (!dateValue) {
      text = "?[" + JSON.stringify(value) + ']';
    } else if (dateValue) {
      text = (0, _datetime.formatDateTime)(dateValue, this.descriptor.format || 'dd/MM/yyyy hh:mm a');
    }
  } else {
    text = '';
  }
  this.$date.firstChild.data = text;
};
TDDateTime.prototype._dateFromString = function (dateString) {
  var format = this.descriptor.format || _datetime.LOCAL_DATE_FORMAT + 'hh:mm a';
  try {
    return (0, _datetime.parseDateTime)(dateString, format);
  } catch (e) {
    return new Date(dateString);
  }
};
Object.defineProperty(TDDateTime.prototype, 'dateValue', {
  get: function get() {
    var value = this.value;
    var vType = _typeof(value);
    var dateValue;
    if (vType === 'string') {
      dateValue = this._dateFromString(value);
    } else if (vType === 'number') {
      dateValue = new Date(value);
    }
    if (dateValue && dateValue.getTime() > 0) return dateValue;
    return undefined;
  }
});
_TDBase["default"].typeClasses.datetime = TDDateTime;
_TDBase["default"].typeClasses.DateTime = TDDateTime;
_TDBase["default"].typeClasses.DateTimeInput = TDDateTime;
var _default = TDDateTime;
exports["default"] = _default;

/***/ }),

/***/ 6213:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SCore = __webpack_require__(74328);
var _SelectList = __webpack_require__(884);
var _util = __webpack_require__(92174);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDBase
 * @constructor
 */
function TDEnum() {
  _TDBase["default"].apply(this, arguments);
  this.elt.addClass('asht-type-enum');
}
_OOP["default"].mixClass(TDEnum, _TDBase["default"]);
TDEnum.prototype.attachView = function () {
  this.elt.clearChild();
  this.$text = (0, _SCore._)({
    tag: 'span',
    child: {
      text: ''
    }
  });
  this.elt.addChild(this.$text);
};
TDEnum.prototype.loadDescriptor = function () {
  var descriptor = this.descriptor;
  descriptor.items = descriptor.items || [];
  if (!descriptor.items.__val2Item__) {
    Object.defineProperty(descriptor.items, '__val2Item__', {
      configurable: true,
      enumerable: false,
      value: descriptor.items.reduce(function (ac, item) {
        ac[item.value] = item;
        return ac;
      }, {})
    });
    var listSize = (0, _SelectList.measureListSize)(descriptor.items);
    Object.defineProperty(descriptor.items, '__width14__', {
      configurable: true,
      enumerable: false,
      value: listSize.width
    });
  }
  this.elt.addStyle('min-width', (descriptor.items.__width14__ + 50) / 14 + 'em');
  var value = this.record[this.pName];
  this.record[this.pName] = this.implicit(value);
  if ((0, _util.isDifferent)(value, this.record[this.pName])) {
    setTimeout(function () {
      if ((0, _util.isDifferent)(value, this.record[this.pName])) {
        this.notifyChange();
      }
    }.bind(this), 0);
  }
  _ResizeSystem["default"].updateUp(this.elt);
};
TDEnum.prototype.implicit = function (value) {
  if (this.row.busy) return value;
  var descriptor = this.descriptor;
  descriptor.items = descriptor.items || [];
  if (value !== null && value !== undefined && !descriptor.items.__val2Item__[value]) {
    return descriptor.items.length > 0 ? descriptor.items[0].value : null;
  } else if (descriptor.items.__val2Item__[value]) return value;
  return null;
};
TDEnum.prototype.loadValue = function () {
  var descriptor = this.descriptor;
  var value = this.value;
  if (value !== null && value !== undefined && descriptor.items.__val2Item__[value] && !this.isNoneValue(value)) {
    this.$text.firstChild.data = descriptor.items.__val2Item__[value].text;
  } else {
    this.$text.firstChild.data = '';
  }
};
_TDBase["default"].typeClasses["enum"] = TDEnum;
_TDBase["default"].typeClasses.ComboBox = TDEnum;
var _default = TDEnum;
exports["default"] = _default;

/***/ }),

/***/ 6713:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SCore = __webpack_require__(74328);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDBase
 * @constructor
 */
function TDEnumSet() {
  _TDBase["default"].apply(this, arguments);
}
_OOP["default"].mixClass(TDEnumSet, _TDBase["default"]);
TDEnumSet.prototype.attachView = function () {
  this.elt.clearChild();
  this.$text = (0, _SCore._)({
    tag: 'span',
    child: {
      text: ''
    }
  });
  this.elt.addChild(this.$text);
};
TDEnumSet.prototype.loadDescriptor = function () {
  var descriptor = this.descriptor;
  descriptor.items = descriptor.items || [];
  if (!descriptor.items.__val2Item__) {
    Object.defineProperty(descriptor.items, '__val2Item__', {
      configurable: true,
      enumerable: false,
      value: (descriptor.items || []).reduce(function (ac, item) {
        ac[item.value] = item;
        return ac;
      }, {})
    });
  }
  this.record[this.pName] = this.implicit(this.record[this.pName]);
};
TDEnumSet.prototype.implicit = function (value) {
  if (typeof value === 'string') {
    value = value.split(/\s*,\s*/);
  }
  if (!(value instanceof Array)) {
    value = [];
  }
  var descriptor = this.descriptor;
  var items = descriptor.items;
  value = value.filter(function (value) {
    return items.__val2Item__ === undefined || items.__val2Item__[value];
  });
  return value;
};
TDEnumSet.prototype.isNoneValue = function (value) {
  return _TDBase["default"].prototype.isNoneValue.call(this, value) || value.length === 0;
};
TDEnumSet.prototype.loadValue = function () {
  var descriptor = this.descriptor;
  var value = this.implicit(this.value || []);
  var text = value.map(function (iVal) {
    var item = descriptor.items.__val2Item__[iVal];
    if (item) return item.text;
    return '?[' + JSON.stringify(iVal) + ']';
  }).join(', ');
  this.$text.firstChild.data = text;
};
_TDBase["default"].typeClasses.EnumSet = TDEnumSet;
_TDBase["default"].typeClasses['{enum}'] = TDEnumSet;
_TDBase["default"].typeClasses.MultiSelectComboBox = TDEnumSet;
var _default = TDEnumSet;
exports["default"] = _default;

/***/ }),

/***/ 90123:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SCore = __webpack_require__(74328);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDBase
 * @constructor
 */
function TDNumber() {
  _TDBase["default"].apply(this, arguments);
  this.elt.addClass('asht-type-number');
}
_OOP["default"].mixClass(TDNumber, _TDBase["default"]);
TDNumber.prototype.attachView = function () {
  this.elt.clearChild();
  this.$number = (0, _SCore._)({
    tag: 'span',
    child: {
      text: ''
    }
  });
  this.elt.addChild(this.$number);
};
TDNumber.prototype.loadValue = function () {
  var value = this.implicit(this.value);
  var text = value === null || value === undefined ? '' : value + '';
  var copyFormat, locales;
  var format = this.descriptor.format || {};
  if (!this.descriptor.formater) {
    copyFormat = Object.assign({
      locales: 'vi-VN',
      maximumFractionDigits: 20,
      minimumFractionDigits: 0
    }, format);
    locales = copyFormat.locales;
    delete copyFormat.locales;
    if (!locales) {
      if (copyFormat.currency === 'VND') locales = 'vi-VN';
    }
    this.descriptor.formater = new Intl.NumberFormat(locales, copyFormat);
  }
  if (typeof value === "number" && this.descriptor.formater) text = this.descriptor.formater.format(value);
  this.$number.firstChild.data = text;
};
TDNumber.prototype.implicit = function (value) {
  if (typeof value === 'string') value = parseFloat(value);
  if (typeof value !== 'number') value = undefined;
  if (isNaN(value)) value = undefined;
  return value;
};
TDNumber.prototype.isNoneValue = function (value) {
  return _TDBase["default"].prototype.isNoneValue.call(this, value) || !(0, _utils.isRealNumber)(value);
};
_TDBase["default"].typeClasses.number = TDNumber;
_TDBase["default"].typeClasses.NumberInput = TDNumber;
var _default = TDNumber;
exports["default"] = _default;

/***/ }),

/***/ 81822:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SCore = __webpack_require__(74328);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends TDBase
 * @constructor
 */
function TDText() {
  _TDBase["default"].apply(this, arguments);
  this.elt.addClass('asht-type-text');
  //Apr04-2025; Yen required to default value must be empty string
  if (this.row.record[this.pName] === undefined || this.row.record[this.pName] === null) {
    this.row.record[this.pName] = '';
  }
}
_OOP["default"].mixClass(TDText, _TDBase["default"]);
TDText.prototype.implicit = function (value) {
  if (value === undefined || value === null) return null;
  if (_typeof(value) === "object") return JSON.stringify(value);
  if (typeof value === "number") return value.toString();
  if (typeof value !== "string") return '';
  return value + '';
};
TDText.prototype.loadValue = function () {
  this.elt.clearChild();
  var value = this.implicit(this.value) || '';
  this.$lines = value.split(/\r?\n/).reduce(function (ac, line) {
    line = line.replace(/\s\s/g, " \xA0");
    ac.push((0, _SCore._)({
      tag: 'span',
      child: {
        text: line
      }
    }));
    ac.push((0, _SCore._)('br'));
    return ac;
  }, []);
  this.elt.addChild(this.$lines);
  if (this.$lines.length > 1) {
    this.elt.removeClass('as-multi-line');
  } else {
    this.elt.addClass('as-multi-line');
  }
};
_TDBase["default"].typeClasses.text = TDText;
_TDBase["default"].typeClasses.TextInput = TDText;
var _default = TDText;
exports["default"] = _default;

/***/ }),

/***/ 84122:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _datetime = __webpack_require__(58286);
var _SCore = __webpack_require__(74328);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDBase
 * @constructor
 */
function TDTime() {
  _TDBase["default"].apply(this, arguments);
  this.elt.addClass('asht-type-time');
}
_OOP["default"].mixClass(TDTime, _TDBase["default"]);
TDTime.prototype.attachView = function () {
  this.$text = (0, _SCore._)({
    tag: 'span',
    child: {
      text: ''
    }
  });
  this.elt.addChild(this.$text);
};
TDTime.prototype.loadValue = function () {
  var value = this.implicit(this.value);
  if (typeof value === "number") {
    this.$text.firstChild.data = (0, _datetime.formatDateTime)(new Date((0, _datetime.beginOfDay)(new Date()).getTime() + value), 'hh:mm a');
  } else {
    this.$text.firstChild.data = '';
  }
};
TDTime.prototype.implicit = function (value) {
  if (typeof value === "string") {
    value = new Date(value);
  }
  if (value instanceof Date) {
    value = value.getTime() - (0, _datetime.beginOfDay)(value).getTime();
  }
  if (typeof value === "number") {
    value = Math.floor(value) % _datetime.MILLIS_PER_DAY;
    if (value < 0) value += _datetime.MILLIS_PER_DAY;
  }
  if (isNaN(value)) value = null;
  return value;
};
_TDBase["default"].typeClasses.time = TDTime;
var _default = TDTime;
exports["default"] = _default;

/***/ }),

/***/ 66827:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _datetime = __webpack_require__(58286);
var _SCore = __webpack_require__(74328);
var _utils = __webpack_require__(84512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends TDBase
 * @constructor
 */
function TDTimeRange24() {
  _TDBase["default"].apply(this, arguments);
  this.elt.addClass('asht-type-time-range-24');
}
_OOP["default"].mixClass(TDTimeRange24, _TDBase["default"]);
TDTimeRange24.prototype.attachView = function () {
  this.elt.clearChild();
  this.$date = (0, _SCore._)({
    tag: 'span',
    child: {
      text: ''
    }
  });
  this.elt.addChild(this.$date);
};
TDTimeRange24.prototype.implicit = function (value) {
  var rangeValue = null;
  if ((0, _utils.isNaturalNumber)(value)) rangeValue = {
    dayOffset: value,
    duration: 0
  };else if (!value) {} else if (_typeof(rangeValue) === "object") {
    if ((0, _utils.isNaturalNumber)(value.dayOffset)) {
      rangeValue = {
        dayOffset: value.dayOffset,
        duration: 0
      };
    } else {
      rangeValue = {
        dayOffset: 0,
        duration: 0
      };
    }
    if ((0, _utils.isNaturalNumber)(value.duration)) {
      rangeValue.duration = value.duration;
    }
  }
  return rangeValue;
};
TDTimeRange24.prototype.loadValue = function () {
  var value = this.implicit(this.value);
  var text;
  var date = (0, _datetime.beginOfDay)(new Date());
  if (!value) text = '';else {
    text = (0, _datetime.formatDateTime)(new Date(date.getTime() + value.dayOffset), 'HH:mm') + ' - ' + (0, _datetime.formatDateTime)(new Date(date.getTime() + value.dayOffset + value.duration), 'HH:mm');
  }
  this.$date.firstChild.data = text;
};
TDTimeRange24.prototype.isEmpty = function () {
  return this.isNoneValue(this.implicit(this.value));
};
_TDBase["default"].typeClasses.timerange24 = TDTimeRange24;
_TDBase["default"].typeClasses.TimeRange24 = TDTimeRange24;
_TDBase["default"].typeClasses.time_period = TDTimeRange24;
var _default = TDTimeRange24;
exports["default"] = _default;

/***/ }),

/***/ 90837:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SCore = __webpack_require__(74328);
var _SelectList = __webpack_require__(884);
var _treeListToList = _interopRequireDefault(__webpack_require__(22248));
var _TDEnum = _interopRequireDefault(__webpack_require__(6213));
var _util = __webpack_require__(92174);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDBase
 * @constructor
 */
function TDTreeEnum() {
  _TDBase["default"].apply(this, arguments);
  this.elt.addClass('asht-type-tree-enum');
}
_OOP["default"].mixClass(TDTreeEnum, _TDBase["default"]);
TDTreeEnum.prototype.attachView = function () {
  this.elt.clearChild();
  this.$text = (0, _SCore._)({
    tag: 'span',
    child: {
      text: ''
    }
  });
  this.elt.addChild(this.$text);
};
TDTreeEnum.prototype.loadDescriptor = function () {
  var descriptor = this.descriptor;
  if (!descriptor.items) descriptor.items = [];
  if (!descriptor.items.__val2Item__) {
    Object.defineProperty(descriptor.items, '__val2Item__', {
      configurable: true,
      enumerable: false,
      value: descriptor.items.reduce(function visitor(ac, item) {
        ac[item.value] = item;
        if (item.items && item.items.length > 0) item.items.reduce(visitor, ac);
        return ac;
      }, {})
    });
    var listSize = (0, _SelectList.measureListSize)((0, _treeListToList["default"])(descriptor.items || []));
    Object.defineProperty(descriptor.items, '__width14__', {
      configurable: true,
      enumerable: false,
      value: listSize.width
    });
  }
  this.elt.addStyle('min-width', (descriptor.items.__width14__ + 50) / 14 + 'em');
  var value = this.record[this.pName];
  this.record[this.pName] = this.implicit(value);
  if ((0, _util.isDifferent)(value, this.record[this.pName])) {
    setTimeout(function () {
      if ((0, _util.isDifferent)(value, this.record[this.pName])) {
        this.notifyChange();
      }
    }.bind(this), 0);
  }
  _ResizeSystem["default"].updateUp(this.elt, true);
};
TDTreeEnum.prototype.implicit = _TDEnum["default"].prototype.implicit;
TDTreeEnum.prototype.isEmpty = _TDEnum["default"].prototype.isEmpty;
TDTreeEnum.prototype.isNoneValue = _TDEnum["default"].prototype.isNoneValue;
TDTreeEnum.prototype.loadValue = function () {
  var descriptor = this.descriptor;
  var value = this.value;
  if (value !== null && value !== undefined && descriptor.items.__val2Item__[value]) {
    this.$text.firstChild.data = descriptor.items.__val2Item__[value].text;
  } else {
    this.$text.firstChild.data = '';
  }
};
_TDBase["default"].typeClasses.treeenum = TDTreeEnum;
_TDBase["default"].typeClasses.TreeEnum = TDTreeEnum;
_TDBase["default"].typeClasses.TreeComboBox = TDTreeEnum;
var _default = TDTreeEnum;
exports["default"] = _default;

/***/ }),

/***/ 99448:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _SCore = __webpack_require__(74328);
var _SelectList = __webpack_require__(884);
var _treeListToList = _interopRequireDefault(__webpack_require__(22248));
var _TDEnum = _interopRequireDefault(__webpack_require__(6213));
var _util = __webpack_require__(92174);
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _TDTreeEnum = _interopRequireDefault(__webpack_require__(90837));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDTreeEnum
 * @constructor
 */
function TDTreeLeafEnum() {
  _TDTreeEnum["default"].apply(this, arguments);
  this.elt.addClass('asht-type-tree-leaf-enum');
}
_OOP["default"].mixClass(TDTreeLeafEnum, _TDTreeEnum["default"]);
_TDBase["default"].typeClasses.treeleafenum = TDTreeLeafEnum;
_TDBase["default"].typeClasses.TreeLeafEnum = TDTreeLeafEnum;
var _default = TDTreeLeafEnum;
exports["default"] = _default;

/***/ }),

/***/ 79309:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDNumber = _interopRequireDefault(__webpack_require__(90123));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDNumber
 * @constructor
 */
function TDUniqueNumber() {
  _TDNumber["default"].apply(this, arguments);
  this.elt.addClass('asht-unique');
}
_OOP["default"].mixClass(TDUniqueNumber, _TDNumber["default"]);
TDUniqueNumber.prototype.loadValue = function () {
  var value = this.implicit(this.value);
  value = value === null || value === undefined ? '' : value + '';
  this.$number.firstChild.data = value;
  var isDuplicated = false;
  var records = this.table.records;
  var record;
  if (typeof value === "number") {
    for (var i = 0; i < records.length && !isDuplicated; ++i) {
      record = records[i];
      if (value === record[this.pName]) isDuplicated = true;
    }
  }
  if (isDuplicated) {
    this.elt.addClass('asht-duplicated');
  } else {
    this.elt.removeClass('asht-duplicated');
  }
};
_TDBase["default"].typeClasses.UniqueNumber = TDUniqueNumber;
_TDBase["default"].typeClasses.unique_number = TDUniqueNumber;
_TDBase["default"].typeClasses['unique<number>'] = TDUniqueNumber;
var _default = TDUniqueNumber;
exports["default"] = _default;

/***/ }),

/***/ 80805:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _TDNumber = _interopRequireDefault(__webpack_require__(90123));
var _SCore = __webpack_require__(74328);
var _TDText = _interopRequireDefault(__webpack_require__(81822));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @extends TDNumber
 * @constructor
 */
function TDUniqueString() {
  _TDText["default"].apply(this, arguments);
  this.elt.addClass('asht-unique');
}
_OOP["default"].mixClass(TDUniqueString, _TDText["default"]);
TDUniqueString.prototype.implicit = function (value) {
  if (value === undefined || value === null) return null;
  if (_typeof(value) === "object") return JSON.stringify(value);
  if (typeof value !== "string") return '';
  return (value + '').replace(/[\s\r\n]/, '');
};
TDUniqueString.prototype.loadValue = function () {
  this.elt.clearChild();
  var value = this.implicit(this.value) || '';
  this.$lines = [(0, _SCore._)({
    tag: 'span',
    child: {
      text: value
    }
  })];
  this.elt.addChild(this.$lines);
  var isDuplicated = false;
  var records = this.table.records;
  var record;
  if (typeof value === "string") {
    for (var i = 0; i < records.length && !isDuplicated; ++i) {
      record = records[i];
      if (this.record !== record) if (value === record[this.pName]) isDuplicated = true;
    }
  }
  if (isDuplicated) {
    this.elt.addClass('asht-duplicated');
  } else {
    this.elt.removeClass('asht-duplicated');
  }
};
_TDBase["default"].typeClasses.UniqueString = TDUniqueString;
_TDBase["default"].typeClasses.unique_string = TDUniqueString;
_TDBase["default"].typeClasses['unique<string>'] = TDUniqueString;
var _default = TDUniqueString;
exports["default"] = _default;

/***/ }),

/***/ 57433:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TDBase = _interopRequireDefault(__webpack_require__(90555));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _datetime = __webpack_require__(58286);
var _TDDate = _interopRequireDefault(__webpack_require__(71701));
var _util = __webpack_require__(92174);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends TDDate
 * @constructor
 */
function TDWeek() {
  _TDDate["default"].apply(this, arguments);
  this.elt.addClass('asht-type-week');
}
_OOP["default"].mixClass(TDWeek, _TDDate["default"]);
TDWeek.prototype.implicit = function (value) {
  var dateValue = (0, _datetime.implicitDate)(value);
  if (dateValue && isNaN(dateValue.getTime())) dateValue = null;
  if (dateValue) dateValue = (0, _datetime.beginOfWeek)(dateValue);
  return dateValue;
};
TDWeek.prototype.loadValue = function () {
  var value = this.value;
  var text = '';
  var dateValue = this.implicit(value);
  if (value) {
    if (!dateValue) {
      text = "?[" + JSON.stringify(value) + ']';
    } else if (dateValue) {
      text = (0, _datetime.formatDateTime)(dateValue, (this.descriptor.format || (0, _util.getDefaultWeekFormat)()).replace(/m/g, 'M'));
    }
  } else {
    text = '';
  }
  this.$date.firstChild.data = text;
};
TDWeek.prototype.isEmpty = function () {
  var value = this.implicit(this.value);
  return !(value instanceof Date);
};
_TDBase["default"].typeClasses.week = TDWeek;
_TDBase["default"].typeClasses.Week = TDWeek;
var _default = TDWeek;
exports["default"] = _default;

/***/ }),

/***/ 54897:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var _ = _interopRequireDefault(__webpack_require__(11357));
var _absol = _interopRequireDefault(__webpack_require__(30018));
var _install = _interopRequireDefault(__webpack_require__(79435));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
window.absol = window.absol || _absol["default"];
(0, _install["default"])(_absol["default"].coreSvg);
(0, _install["default"])(_absol["default"].coreDom);
_absol["default"].ASvg = _["default"];
window.ASvg = _["default"];

/***/ }),

/***/ 11357:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Core = _interopRequireDefault(__webpack_require__(75013));
var _install = _interopRequireDefault(__webpack_require__(79435));
var _Turtle = _interopRequireDefault(__webpack_require__(90942));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var ASvg = {
  core: _Core["default"],
  _: _Core["default"]._,
  $: _Core["default"].$,
  Turtle: _Turtle["default"],
  install: _install["default"]
};
var _default = ASvg;
exports["default"] = _default;

/***/ }),

/***/ 29589:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 *
 * @param {SvgCanvas} $svg
 * @constructor
 */
function CCanvasBox($svg) {
  this.$svg = $svg;
  this._width = 0;
  this._height = 0;
  this.width = 0;
  this.height = 0;
}

/***
 *
 * @param {number} width
 * @param {number} height
 */
CCanvasBox.prototype.setSize = function (width, height) {
  this.$svg.attr('width', width + '');
  this.$svg.attr('height', height + '');
  this.$svg.attr('viewBox', [-0.5, -0.5, width, height].join(' '));
  this._width = width;
  this._height = height;
};
Object.defineProperty(CCanvasBox.prototype, 'width', {
  /***
   *
   * @param {Number} width
   */
  set: function set(width) {
    this.setSize(width, this._height);
  },
  /***
   *
   * @return {number}
   */
  get: function get() {
    return this._width;
  }
});
Object.defineProperty(CCanvasBox.prototype, 'height', {
  /***
   *
   * @param {Number} height
   */
  set: function set(height) {
    this.setSize(this._width, height);
  },
  /***
   *
   * @return {number}
   */
  get: function get() {
    return this._height;
  }
});
Object.defineProperty(CCanvasBox.prototype, 'size', {
  /***
   *
   * @param {{width: number, height:number}} size
   */
  set: function set(size) {
    this.setSize(size.width, size.height);
  },
  /***
   *
   * @return {{width: number, height: number}}
   */
  get: function get() {
    return {
      width: this._width,
      height: this._height
    };
  }
});
var _default = CCanvasBox;
exports["default"] = _default;

/***/ }),

/***/ 98822:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 *
 * @param {GContainer} $g
 * @constructor
 */
function CContainerBox($g) {
  this.$g = $g;
  this._width = 0;
  this._height = 0;
  this._x = 0;
  this._y = 0;
  this.width = 0;
  this.height = 0;
  this.x = 0;
  this.y = 0;
}

/***
 *
 * @param {number} width
 * @param {number} height
 * @returns {CContainerBox}
 */
CContainerBox.prototype.setSize = function (width, height) {
  this._width = width;
  this._height = height;
  return this;
};

/***
 *
 * @param {number} x
 * @param {number} y
 * @returns {CContainerBox}
 */
CContainerBox.prototype.setPosition = function (x, y) {
  if (x === 0 && y === 0) {} else {
    this.$g.attr('transform', 'translate(' + x + ',' + y + ')');
  }
  this._x = x;
  this._y = y;
};
Object.defineProperty(CContainerBox.prototype, 'width', {
  /***
   *
   * @param {number} width
   */
  set: function set(width) {
    this.setSize(width, this._height);
  },
  /***
   *
   * @return {number}
   */
  get: function get() {
    return this._width;
  }
});
Object.defineProperty(CContainerBox.prototype, 'height', {
  /***
   *
   * @param {number} height
   */
  set: function set(height) {
    this.setSize(this._width, height);
  },
  /***
   *
   * @return {number}
   */
  get: function get() {
    return this._height;
  }
});
Object.defineProperty(CContainerBox.prototype, 'size', {
  /***
   *
   * @param {{width: number, height:number}} size
   */
  set: function set(size) {
    this.setSize(size.width, size.height);
  },
  /***
   *
   * @return {{width: number, height: number}}
   */
  get: function get() {
    return {
      width: this._width,
      height: this._height
    };
  }
});
Object.defineProperty(CContainerBox.prototype, 'x', {
  /***
   *
   * @param {number} x
   */
  set: function set(x) {
    this.setPosition(x, this._y);
  },
  /***
   *
   * @return {number}
   */
  get: function get() {
    return this._x;
  }
});
Object.defineProperty(CContainerBox.prototype, 'y', {
  /***
   *
   * @param {number} y
   */
  set: function set(y) {
    this.setPosition(this._x, y);
  },
  /***
   *
   * @return {number}
   */
  get: function get() {
    return this._y;
  }
});
Object.defineProperty(CContainerBox.prototype, 'position', {
  /***
   *
   * @param {{x: number, y:number}} position
   */
  set: function set(position) {
    this.setPosition(position.x, position.y);
  },
  /***
   *
   * @return {{x: number, y:number}}
   */
  get: function get() {
    return {
      x: this._x,
      y: this._y
    };
  }
});
var _default = CContainerBox;
exports["default"] = _default;

/***/ }),

/***/ 47796:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {SvgViewBox}  $svg
 * @constructor
 */
function CViewBox($svg) {
  this.$svg = $svg;
  this.clientRect = {
    width: 0,
    height: 0
  };
  this.viewBox = {
    x: 0,
    y: 0,
    width: 0,
    height: 0
  };
  this._zoom = 1;
  this._origin = new _Vec["default"](0, 0);
}

/***
 *
 * @param {Vec2} v
 * @return Vec2
 */
CViewBox.prototype.screen2view = function (v) {
  return v.div(this._zoom).sub(this._origin);
};

/***
 *
 * @param {Vec2} v
 * @return Vec2
 */
CViewBox.prototype.view2screen = function (v) {
  return v.add(this._origin).mult(this._zoom);
};
CViewBox.prototype.updateClientRect = function () {
  var bound = this.$svg.getBoundingClientRect();
  this.clientRect.width = bound.width;
  this.clientRect.height = bound.height;
  this.updateViewBox();
};
CViewBox.prototype.updateViewBox = function () {
  var o = this._origin;
  var cRect = this.clientRect;
  var zoom = this._zoom;
  var viewBox = this.viewBox;
  viewBox.x = -o.x / this.zoom;
  viewBox.y = -o.y / zoom;
  viewBox.width = cRect.width / zoom;
  viewBox.height = cRect.height / zoom;
  this.$svg.attr('viewBox', [viewBox.x, viewBox.y, viewBox.width, viewBox.height].join(' '));
};
Object.defineProperty(CViewBox.prototype, 'zoom', {
  set: function set(val) {
    this._zoom = val;
    this.updateViewBox();
  },
  get: function get() {
    return this._zoom;
  }
});
Object.defineProperty(CViewBox.prototype, 'origin', {
  set: function set(val) {
    this._origin = val;
    this.updateViewBox();
  },
  get: function get() {
    return this._origin;
  }
});
var _default = CViewBox;
exports["default"] = _default;

/***/ }),

/***/ 90942:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @typedef TurtleCommand
 * @property {String} cmd
 * @property {String} action
 * @property {Number[]} args
 * @property {Vec2} dest
 * @property {Vec2} tangent
 */

/***
 *
 * @constructor
 */
function Turtle() {
  /**
   * @type {Array<TurtleCommand>}
   */
  this._commands = [];
  /**
   * @type {Vec2}
   */
  this._pos = new _Vec["default"](0, 0);
  /**
   * @type {Vec2}
   */
  this._startPos = this._pos;
  /**
   * @type {Vec2}
   */
  this._tangent = new _Vec["default"](0, 0);
}

/**
 * @param {Number} dx
 * @param {Number} dy
 * @returns {this}
 */
Turtle.prototype.moveBy = function (dx, dy) {
  this._tangent = new _Vec["default"](dx, dy);
  this._pos = this._pos.add(this._tangent);
  this._startPos = this._pos;
  this._commands.push({
    cmd: 'm',
    action: 'moveBy',
    args: [dx, dy],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} x
 * @param {Number} y
 * @returns {this}
 */
Turtle.prototype.moveTo = function (x, y) {
  this._tangent = this._pos;
  this._pos = new _Vec["default"](x, y);
  this._tangent = this._pos.sub(this._tangent);
  this._startPos = this._pos;
  this._commands.push({
    cmd: 'M',
    action: 'moveTo',
    args: [x, y],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};
Turtle.prototype.moveForward = function (length) {
  var dV = this._tangent.normalized().mult(length);
  this._pos = this._pos.add(dV);
  this._startPos = this._pos;
  this._commands.push({
    cmd: 'm',
    action: 'moveTo',
    args: [dV.x, dV.y],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};
Turtle.prototype.lineForward = function (length) {
  var dV = this._tangent.normalized().mult(length);
  this._pos = this._pos.add(dV);
  this._startPos = this._pos;
  this._commands.push({
    cmd: 'l',
    action: 'moveTo',
    args: [dV.x, dV.y],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/***
 *
 * @param {Number} angle - degree
 *  @returns {this}
 */
Turtle.prototype.rotateDirTo = function (angle) {
  this._tangent = _Vec["default"].fromDirection(angle * Math.PI / 180);
  return this;
};

/***
 *
 * @param {Number} dAngle
 * @returns {this}
 */
Turtle.prototype.rotateDirBy = function (dAngle) {
  this._tangent = this._tangent.rotate(dAngle * Math.PI / 180);
  return this;
};

/**
 * @param {Number} dx
 * @param {Number} dy
 * @returns {this}
 */
Turtle.prototype.lineBy = function (dx, dy) {
  this._tangent = new _Vec["default"](x, y);
  this._pos = this._pos.add(this._tangent);
  this._commands.push({
    cmd: 'l',
    action: 'lineBy',
    args: [dx, dy],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} x
 * @param {Number} y
 * @returns {this}
 */
Turtle.prototype.lineTo = function (x, y) {
  this._tangent = this._pos;
  this._pos = new _Vec["default"](x, y);
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 'L',
    action: 'lineTo',
    args: [x, y],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} dx
 * @param {Number} dy
 * @returns {this}
 */
Turtle.prototype.lineBy = function (dx, dy) {
  this._tangent = new _Vec["default"](dx, dy);
  this._pos = this._pos.add(this._tangent);
  this._commands.push({
    cmd: 'l',
    action: 'lineBy',
    args: [dx, dy],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} x
 * @returns {this}
 */
Turtle.prototype.hLineTo = function (x) {
  this._tangent = this._pos;
  this._pos = new _Vec["default"](x, this._pos.y);
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 'H',
    action: 'hLineTo',
    args: [x],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} x
 * @returns {this}
 */
Turtle.prototype.hLineBy = function (x) {
  this._tangent = new _Vec["default"](x, 0);
  this._pos = this._pos.add(this._tangent);
  this._commands.push({
    cmd: 'h',
    action: 'hLineBy',
    args: [x],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} y
 * @returns {this}
 */
Turtle.prototype.vLineTo = function (y) {
  this._tangent = this._pos;
  this._pos = new _Vec["default"](this._pos.x, y);
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 'V',
    action: 'vLineTo',
    args: [y],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} y
 * @returns {this}
 */
Turtle.prototype.vLineBy = function (y) {
  this._tangent = new _Vec["default"](0, y);
  this._pos = this._pos.add(this._tangent);
  this._commands.push({
    cmd: 'v',
    action: 'vLineBy',
    args: [y],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} c1x
 * @param {Number} c1y
 * @param {Number} c2x
 * @param {Number} c2y
 * @param {Number} x
 * @param {Number} y
 * @returns {this}
 */
Turtle.prototype.cubicBezierTo = function (c1x, c1y, c2x, c2y, x, y) {
  this._tangent = new _Vec["default"](c2x, c2y);
  this._pos = new _Vec["default"](x, y);
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 'C',
    action: 'cubicBezierTo',
    args: [c1x, c1y, c2x, c2y, x, y],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} c1dx
 * @param {Number} c1dy
 * @param {Number} c2dx
 * @param {Number} c2dy
 * @param {Number} dx
 * @param {Number} dy
 * @returns {this}
 */
Turtle.prototype.cubicBezierBy = function (c1dx, c1dy, c2dx, c2dy, dx, dy) {
  this._tangent = this._pos.add(new _Vec["default"](c2dx, c2dy));
  this._pos = this._pos.add(new _Vec["default"](dx, dy));
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 'c',
    action: 'cubicBezierBy',
    args: [c1dx, c1dy, c2dx, c2dy, dx, dy],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} c2x
 * @param {Number} c2y
 * @param {Number} x
 * @param {Number} y
 * @returns {this}
 */
Turtle.prototype.smoothCubicBezierTo = function (c2x, c2y, x, y) {
  this._tangent = new _Vec["default"](c2x, c2y);
  this._pos = new _Vec["default"](x, y);
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 'S',
    action: 'smoothCubicBezierTo',
    args: [c2x, c2y, x, y],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} c2dx
 * @param {Number} c2dy
 * @param {Number} dx
 * @param {Number} dy
 * @returns {this}
 */
Turtle.prototype.smoothCubicBezierBy = function (c2dx, c2dy, dx, dy) {
  this._tangent = this._pos.add(new _Vec["default"](c2dx, c2dy));
  this._pos = this._pos.add(new _Vec["default"](dx, dy));
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 's',
    action: 'smoothCubicBezierBy',
    args: [c2dx, c2dy, dx, dy],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} cx
 * @param {Number} cy
 * @param {Number} x
 * @param {Number} y
 * @returns {this}
 */
Turtle.prototype.quadraticBezierTo = function (cx, cy, x, y) {
  this._tangent = new _Vec["default"](cx, cy);
  this._pos = new _Vec["default"](x, y);
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 'Q',
    action: 'quadraticBezierTo',
    args: [cx, cy, x, y],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} cdx
 * @param {Number} cdy
 * @param {Number} cdx
 * @param {Number} cdy
 * @param {Number} dx
 * @param {Number} dy
 * @returns {this}
 */
Turtle.prototype.quadraticBezierBy = function (cdx, cdy, dx, dy) {
  this._tangent = this._pos.add(new _Vec["default"](cdx, cdy));
  this._pos = this._pos.add(new _Vec["default"](dx, dy));
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 'q',
    action: 'quadraticBezierBy',
    args: [cdx, cdy, dx, dy],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} cx
 * @param {Number} cy
 * @param {Number} x
 * @param {Number} y
 * @returns {this}
 */
Turtle.prototype.smoothQuadraticBezierTo = function (cx, cy, x, y) {
  this._tangent = new _Vec["default"](cx, cy);
  this._pos = new _Vec["default"](x, y);
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 'T',
    action: 'smoothQuadraticBezierTo',
    args: [cx, cy, x, y],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @param {Number} cdx
 * @param {Number} cdy
 * @param {Number} dx
 * @param {Number} dy
 * @returns {this}
 */
Turtle.prototype.smoothQuadraticBezierBy = function (cdx, cdy, dx, dy) {
  this._tangent = this._pos.add(new Vec(cdx, cdy));
  this._pos = this._pos.add(new _Vec["default"](dx, dy));
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 't',
    action: 'smoothQuadraticBezierBy',
    args: [cdx, cdy, dx, dy],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/***
 *
 * @param {Number} rx
 * @param {Number} ry
 * @param {Number} angle
 * @param {Number} large
 * @param {Number} sweep
 * @param {Number} x
 * @param {Number} y
 * @returns {this}
 */
Turtle.prototype.arcTo = function (rx, ry, angle, large, sweep, x, y) {
  this._tangent = this._pos;
  this._pos = new _Vec["default"](x, y);
  var AB = this._pos.sub(this._tangent);

  //in ellipse
  var AB_inE = AB.rotate(-angle / 180 * Math.PI);
  //in circle
  var AB_inC = new _Vec["default"](AB_inE.x / rx, AB_inE.y / ry);
  var AH_inC;
  var HO_length_inC;
  var AH_length_inC;
  var HO_inC;
  var BO_inC;
  var tangent_inC;
  var tangent_inE;
  AH_inC = AB_inC.div(2);
  AH_length_inC = AH_inC.abs();
  HO_length_inC = Math.sqrt(1 - AH_length_inC * AH_length_inC);
  if (!sweep != !large) {
    HO_inC = AB_inC.rotate90().normalized().mult(HO_length_inC);
    BO_inC = AH_inC.inv().add(HO_inC);
    tangent_inC = BO_inC.rotate90().inv();
  } else {
    HO_inC = AB_inC.rotate90().inv().normalized().mult(HO_length_inC); //ok
    BO_inC = AH_inC.inv().add(HO_inC);
    tangent_inC = BO_inC.rotate90();
  }
  if (large) tangent_inC = tangent_inC.inv();
  tangent_inE = new _Vec["default"](tangent_inC.x * rx, tangent_inC.y * ry);
  this._tangent = tangent_inE.rotate(angle / 180 * Math.PI);
  this._commands.push({
    cmd: 'A',
    action: 'lineTo',
    args: [rx, ry, angle, large, sweep, x, y],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/***
 *
 * @param {Number} rx
 * @param {Number} ry
 * @param {Number} angle
 * @param {Number} large
 * @param {Number} sweep
 * @param {Number} dx
 * @param {Number} dy
 * @returns {this}
 */
Turtle.prototype.arcBy = function (rx, ry, angle, large, sweep, dx, dy) {
  //todo: wrong_tangent
  this._tangent = new _Vec["default"](dx, dy);
  this._pos = this._pos.add(this._tangent);
  this._commands.push({
    cmd: 'a',
    action: 'arcBy',
    args: [rx, ry, angle, large, sweep, dx, dy],
    dest: this._pos,
    tangent: this._tangent
  });
  return this;
};

/**
 * @returns {this}
 */
Turtle.prototype.closePath = function () {
  this._tangent = this._pos;
  this._pos = this._startPos;
  this._tangent = this._pos.sub(this._tangent);
  this._commands.push({
    cmd: 'z',
    action: 'closePath',
    args: [],
    dest: this._pos
  });
  return this;
};

/**
 * @param {Number} dx
 * @param {Number} dy
 * @returns {this}
 */
Turtle.prototype.translate = function (dx, dy) {
  var command;
  var deltaVec = new _Vec["default"](dx, dy);
  for (var i = 0; i < this._commands.length; ++i) {
    command = this._commands[i];
    command.dest = command.dest.add(deltaVec);
    switch (command.cmd) {
      case 'M':
      case 'L':
        command.args[0] = command.dest.x;
        command.args[1] = command.dest.y;
        break;
      case 'H':
        command.args[0] = command.dest.x;
        break;
      case 'V':
        command.args[0] = command.dest.y;
        break;
      case 'C':
        command.args[0] += dx;
        command.args[1] += dy;
        command.args[2] += dx;
        command.args[3] += dy;
        command.args[4] = command.dest.x;
        command.args[5] = command.dest.y;
        break;
      case 'Q':
        command.args[0] += dx;
        command.args[1] += dy;
        command.args[3] = command.dest.x;
        command.args[4] = command.dest.y;
        break;
      case 'A':
        command.args[5] = command.dest.x;
        command.args[6] = command.dest.y;
        break;
    }
  }
  return this;
};

/**
 * @returns {String}
 */
Turtle.prototype.getPath = function () {
  return this._commands.map(function (command) {
    return command.cmd + ' ' + command.args.join(',');
  }).join(' ');
};

/***
 *
 * @returns {this}
 */
Turtle.prototype.reset = function () {
  this._commands = [];
  this._pos = new _Vec["default"](0, 0);
  this._startPos = this._pos;
  this._tangent = new _Vec["default"](0, 0);
  return this;
};
Turtle.prototype.clone = function () {
  var res = new Turtle();
  res._commands.push.apply(res._commands, this._commands);
  res._pos = this._pos.copy();
  res._startPos = this._startPos.copy();
  res._tangent = this._tangent.copy();
  return res;
};
var _default = Turtle;
exports["default"] = _default;

/***/ }),

/***/ 75013:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports._ = exports.$$ = exports.$ = void 0;
var _Svg = _interopRequireDefault(__webpack_require__(98315));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var Core = new _Svg["default"]();
var _ = Core._;
exports._ = _;
var $ = Core.$;
exports.$ = $;
var $$ = Core.$$;
exports.$$ = $$;
var _default = Core;
exports["default"] = _default;

/***/ }),

/***/ 46896:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Core = _interopRequireDefault(__webpack_require__(75013));
var _CContainerBox = _interopRequireDefault(__webpack_require__(98822));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;

/***
 * @extends {AElementNS}
 * @constructor
 */
function GContainer() {
  this.box = new _CContainerBox["default"](this);
}
GContainer.tag = 'gcontainer';
GContainer.render = function () {
  return _('g');
};
_Core["default"].install(GContainer);
var _default = GContainer;
exports["default"] = _default;

/***/ }),

/***/ 51508:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Core = _interopRequireWildcard(__webpack_require__(75013));
var _Turtle = _interopRequireDefault(__webpack_require__(90942));
__webpack_require__(38271);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends AElementNS
 * @constructor
 */
function GViewBoxGrid() {
  /***
   *
   * @type {null| SvgViewBox}
   */
  this.$svg = null;
  /**
   *
   * @type {AElementNS}
   */
  this.$primary = this.childNodes[0];
  /**
   *
   * @type {AElementNS}
   */
  this.$secondary = this.childNodes[1];
}
GViewBoxGrid.tag = 'GViewBoxGrid'.toLowerCase();
GViewBoxGrid.render = function () {
  return (0, _Core._)({
    tag: 'g',
    "class": 'ag-view-box-grid',
    child: ['path.ag-view-box-grid-primary', 'path.ag-view-box-grid-secondary']
  });
};
GViewBoxGrid.prototype.update = function () {
  if (!this.$svg) return;
  var viewBox = this.$svg.box.viewBox;
  var clientRect = this.$svg.box.clientRect;
  var zoom = this.$svg.box.zoom;
  var primary = new _Turtle["default"]();
  var secondary = new _Turtle["default"]();
  var x0 = Math.floor((viewBox.x - viewBox.width) / 100) * 100;
  var y0 = Math.floor((viewBox.y - viewBox.height) / 100) * 100;
  var xM = Math.ceil((viewBox.x + viewBox.width * 2) / 100) * 100;
  var yM = Math.ceil((viewBox.y + viewBox.height * 2) / 100) * 100;
  var dy = yM - y0;
  var dx = xM - x0;
  var x = x0,
    y = y0;
  var i = 0;
  while (x < xM) {
    if (i % 8 === 0) {
      primary.moveTo(x, y0).vLineBy(dy);
    } else {
      secondary.moveTo(x, y0).vLineBy(dy);
    }
    x += 12.5;
    ++i;
  }
  i = 0;
  while (y < yM) {
    if (i % 8 === 0) {
      primary.moveTo(x0, y).hLineBy(dx);
    } else {
      secondary.moveTo(x0, y).hLineBy(dx);
    }
    y += 12.5;
  }
  this.addStyle('--zoom-rev', 1 / zoom + '');
  this.$primary.attr('d', primary.getPath());
  this.$secondary.attr('d', secondary.getPath());
};
_Core["default"].install(GViewBoxGrid);
var _default = GViewBoxGrid;
exports["default"] = _default;

/***/ }),

/***/ 86282:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Core = _interopRequireDefault(__webpack_require__(75013));
var _AElementNS = _interopRequireDefault(__webpack_require__(75658));
var _Turtle = _interopRequireDefault(__webpack_require__(90942));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;

/***
 * @extends {AElementNS}
 * @constructor
 */
function Shape() {
  this._turtle = new _Turtle["default"]();
}
Shape.tag = 'shape';
Shape.render = function () {
  return _('path');
};

/***
 *
 * @return {Shape}
 */
Shape.prototype.begin = function () {
  this._turtle.reset();
  return this;
};

/***
 *
 * @return {Shape}
 */
Shape.prototype.end = function () {
  this.attr('d', this._turtle.getPath());
  return this;
};

/***
 *
 * @param {Number} angle - degree
 *  @returns {Shape}
 */
Shape.prototype.rotateDirTo = function (angle) {
  this._turtle.rotateDirTo(angle);
  return this;
};

/***
 *
 * @param {Number} dAngle
 * @returns {Shape}
 */
Shape.prototype.rotateDirBy = function (dAngle) {
  this._turtle.rotateDirBy(dAngle);
  return this;
};

/***
 *
 * @param {Number} x
 * @param {Number} y
 * @return {Shape}
 */
Shape.prototype.moveTo = function (x, y) {
  this._turtle.moveTo(x, y);
  return this;
};

/***
 *
 * @param {Number} dx
 * @param {Number} dy
 * @return {Shape}
 */
Shape.prototype.moveBy = function (dx, dy) {
  this._turtle.moveBy(dx, dy);
  return this;
};

/***
 *
 * @return {Shape}
 */
Shape.prototype.closePath = function () {
  this._turtle.closePath();
  return this;
};

/***
 *
 * @param {Number} x
 * @param {Number} y
 * @return {Shape}
 */
Shape.prototype.lineTo = function (x, y) {
  this._turtle.lineTo(x, y);
  return this;
};

/***
 *
 * @param {Number} dx
 * @param {Number} dy
 * @return {Shape}
 */
Shape.prototype.lineBy = function (dx, dy) {
  this._turtle.lineBy(dx, dy);
  return this;
};

/***
 *
 * @param {Number} x
 * @return {Shape}
 */
Shape.prototype.hLineTo = function (x) {
  this._turtle.hLineTo(x);
  return this;
};

/***
 *
 * @param {Number} dx
 * @return {Shape}
 */
Shape.prototype.hLineBy = function (dx) {
  this._turtle.hLineBy(x);
  return this;
};

/***
 *
 * @param {Number} y
 * @return {Shape}
 */
Shape.prototype.vLineTo = function (y) {
  this._turtle.vLineTo(y);
  return this;
};

/***
 *
 * @param {Number} dy
 * @return {Shape}
 */
Shape.prototype.vLineBy = function (dy) {
  this._turtle.vLineBy(dy);
  return this;
};

/**
 * @param {Number} c1x
 * @param {Number} c1y
 * @param {Number} c2x
 * @param {Number} c2y
 * @param {Number} x
 * @param {Number} y
 * @returns {Shape}
 */
Shape.prototype.cubicBezierTo = function (c1x, c1y, c2x, c2y, x, y) {
  this._turtle.cubicBezierTo(c1x, c1y, c2x, c2y, x, y);
  return this;
};

/**
 * @param {Number} c1dx
 * @param {Number} c1dy
 * @param {Number} c2dx
 * @param {Number} c2dy
 * @param {Number} dx
 * @param {Number} dy
 * @returns {Shape}
 */
Shape.prototype.cubicBezierBy = function (c1dx, c1dy, c2dx, c2dy, dx, dy) {
  this._turtle.cubicBezierBy(c1dx, c1dy, c2dx, c2dy, dx, dy);
  return this;
};

/**
 * @param {Number} c2x
 * @param {Number} c2y
 * @param {Number} x
 * @param {Number} y
 * @returns {Shape}
 */
Shape.prototype.smoothCubicBezierTo = function (c2x, c2y, x, y) {
  this._turtle.smoothCubicBezierTo(c2x, c2y, x, y);
  return this;
};

/**
 * @param {Number} c2dx
 * @param {Number} c2dy
 * @param {Number} dx
 * @param {Number} dy
 * @returns {Shape}
 */
Shape.prototype.smoothCubicBezierBy = function (c2dx, c2dy, dx, dy) {
  this._turtle.smoothCubicBezierBy(c2dx, c2dy, dx, dy);
  return this;
};

/**
 * @param {Number} cx
 * @param {Number} cy
 * @param {Number} x
 * @param {Number} y
 * @returns {Shape}
 */
Shape.prototype.quadraticBezierTo = function (cx, cy, x, y) {
  this._turtle.quadraticBezierTo(cx, cy, x, y);
  return this;
};

/**
 * @param {Number} cdx
 * @param {Number} cdy
 * @param {Number} cdx
 * @param {Number} cdy
 * @param {Number} dx
 * @param {Number} dy
 * @returns {Shape}
 */
Shape.prototype.quadraticBezierBy = function (cdx, cdy, dx, dy) {
  this._turtle.quadraticBezierBy(cdx, cdy, dx, dy);
  return this;
};

/**
 * @param {Number} cx
 * @param {Number} cy
 * @param {Number} x
 * @param {Number} y
 * @returns {Shape}
 */
Shape.prototype.smoothQuadraticBezierTo = function (cx, cy, x, y) {
  this._turtle.smoothQuadraticBezierTo(cx, cy, x, y);
  return this;
};

/**
 * @param {Number} cdx
 * @param {Number} cdy
 * @param {Number} dx
 * @param {Number} dy
 * @returns {Shape}
 */
Shape.prototype.smoothQuadraticBezierBy = function (cdx, cdy, dx, dy) {
  this._turtle.smoothQuadraticBezierBy(cdx, cdy, dx, dy);
  return this;
};

/***
 *
 * @param {Number} x
 * @param {Number} y
 * @param {Number} rx
 * @param {Number} ry
 * @param {Number} lf
 * @param {Number} sf
 * @param {Number} xRotate
 * @return {Shape}
 */
Shape.prototype.arcTo = function (x, y, rx, ry, lf, sf, xRotate) {
  ry = ry || rx;
  lf = lf || 0;
  sf = sf || 0;
  xRotate = xRotate || 0;
  this._turtle.arcTo(rx, ry, xRotate, lf, sf, x, y);
  return this;
};

/***
 *
 * @param {Number} dx
 * @param {Number} yd
 * @param {Number} rx
 * @param {Number} ry
 * @param {Number} lf
 * @param {Number} sf
 * @param {Number} xRotate
 * @return {Shape}
 */
Shape.prototype.arcBy = function (dx, yd, rx, ry, lf, sf, xRotate) {
  ry = ry || rx;
  lf = lf || 0;
  sf = sf || 0;
  xRotate = xRotate || 0;
  this._turtle.arcBy(rx, ry, xRotate, lf, sf, dx, yd);
  return this;
};

/***
 *
 * @param {Number} x
 * @param {Number} y
 * @param {Number} x0
 * @param {Number} y0
 * @param {Number} x1
 * @param {Number} y1
 * @return {Shape}
 */
Shape.prototype.curveTo = function (x, y, x0, y0, x1, y1) {
  this._turtle.cubicBezierTo(x0, y0, x1, y1, x, y);
  return this;
};
_Core["default"].install(Shape);
var _default = Shape;
exports["default"] = _default;

/***/ }),

/***/ 48479:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Core = _interopRequireDefault(__webpack_require__(75013));
var _AElementNS = _interopRequireDefault(__webpack_require__(75658));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _CCanvasBox = _interopRequireDefault(__webpack_require__(29589));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Core["default"]._;
var $ = _Core["default"].$;

/***
 * @extends AElementNS
 * @constructor
 */
function SvgCanvas() {
  var thisSC = this;
  this.box = new _CCanvasBox["default"](this);
  this.$attachhook = $('sattachhook', this).on('attached', this.eventHandler.svgAttached);
  this.$attachhook.requestUpdateSize = function () {
    thisSC.updateSize();
  };
}
SvgCanvas.tag = 'svgcanvas';
SvgCanvas.render = function () {
  return _({
    tag: 'svg',
    "class": 'ag-canvas',
    child: 'sattachhook'
  });
};
SvgCanvas.prototype.clearChild = function () {
  while (this.lastChild && this.lastChild !== this.$attachhook) {
    this.removeChild(this.firstChild);
  }
  return this;
};
SvgCanvas.prototype._updateCanvasSize = function () {
  var bound = this.getBoundingClientRect();
  var width = bound.width;
  var height = bound.height;
  this.box.setSize(width, height);
};
SvgCanvas.prototype.updateSize = function () {
  this._updateCanvasSize();
};

/***
 * @type {SvgCanvas}
 */
SvgCanvas.eventHandler = {};
SvgCanvas.eventHandler.svgAttached = function () {
  _ResizeSystem["default"].add(this.$attachhook);
  this.updateSize();
};
_Core["default"].install(SvgCanvas);
var _default = SvgCanvas;
exports["default"] = _default;

/***/ }),

/***/ 51235:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Core = _interopRequireWildcard(__webpack_require__(75013));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _CViewBox = _interopRequireDefault(__webpack_require__(47796));
__webpack_require__(38271);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @augments AElementNS
 * @augments SVGElement
 * @constructor
 */
function SvgViewBox() {
  this.box = new _CViewBox["default"](this);
  this.$attachhook = (0, _Core.$)('sattachhook', this).on('attached', this.eventHandler.svgAttached);
  this.$attachhook.requestUpdateSize = this.eventHandler.requestUpdateSize;
}
SvgViewBox.tag = 'SvgViewBox'.toLowerCase();
SvgViewBox.render = function () {
  return (0, _Core._)({
    tag: 'svg',
    "class": 'ag-view-box',
    child: ['sattachhook']
  });
};
SvgViewBox.eventHandler = {};

/***
 * @this SvgViewBox
 */
SvgViewBox.eventHandler.requestUpdateSize = function () {
  this.box.updateClientRect();
};

/***
 * @this SvgViewBox
 */
SvgViewBox.eventHandler.svgAttached = function () {
  this.box.updateClientRect();
  _ResizeSystem["default"].add(this.$attachhook);
};
_Core["default"].install(SvgViewBox);
var _default = SvgViewBox;
exports["default"] = _default;

/***/ }),

/***/ 79435:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.Creators = void 0;
exports["default"] = install;
var _Shape = _interopRequireDefault(__webpack_require__(86282));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _SvgCanvas = _interopRequireDefault(__webpack_require__(48479));
var _GContainer = _interopRequireDefault(__webpack_require__(46896));
var _SvgViewBox = _interopRequireDefault(__webpack_require__(51235));
var _GViewBoxGrid = _interopRequireDefault(__webpack_require__(51508));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var Creators = [_Shape["default"], _SvgCanvas["default"], _GContainer["default"], _SvgViewBox["default"], _GViewBoxGrid["default"]];

/***
 *
 * @param {Dom | Svg} core
 */
exports.Creators = Creators;
function install(core) {
  core.install(Creators);
}
;

/***/ }),

/***/ 14594:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Context = _interopRequireDefault(__webpack_require__(16311));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
//NOTE: !impotant : don't make setter, getter for activity, just code like JAVA
/** 
 * @class
 */
function Activity() {
  _Context["default"].call(this);
}
Object.defineProperties(Activity.prototype, Object.getOwnPropertyDescriptors(_Context["default"].prototype));
Activity.prototype.constructor = Activity;
Activity.prototype.startActivity = function (activity) {
  if (this.parent) {
    this.parent.startActivity(activity);
  } else {}
};
Activity.prototype.finish = function () {
  if (this.parent) {
    this.parent.stopActivity(this);
  } else {}
};
var _default = Activity;
exports["default"] = _default;

/***/ }),

/***/ 62480:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ContextManager = _interopRequireDefault(__webpack_require__(88062));
var _Context = _interopRequireDefault(__webpack_require__(16311));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @class
 */
function Application() {
  _Context["default"].call(this);
  this.activityStack = [];
  /** @type {Activity} */
  this.currentActivity = null;
}
Object.defineProperties(Application.prototype, Object.getOwnPropertyDescriptors(_Context["default"].prototype));
Application.prototype.constructor = Application;

/**
 * @param {Activity} activity
 */
Application.prototype.startActivity = function (activity) {
  if (this.currentActivity != null) {
    this.currentActivity.pause();
    this.activityStack.push(this.currentActivity);
  }
  this.currentActivity = activity;
  this.appendChild(activity);
  activity.attach(this);
  this.setContentView(activity.getView(), true);
  activity.start();
};

/**
 * @param {Activity} activity
 */
Application.prototype.stopActivity = function (activity) {
  if (this.currentActivity == activity) {
    if (this.activityStack.length == 0) {
      //todo
    } else {
      activity.detach();
      this.removeChild(this.currentActivity);
      this.currentActivity = this.activityStack.pop();
      this.setContentView(this.currentActivity.getView());
      this.currentActivity.resume();
    }
  } else {
    console.error("NOT ON TOP ACTIVITY");
  }
};

/**
 * @param {HTMLElement} view
 */
Application.prototype.setContentView = function (view, overlay) {
  throw new Error("Not Implement!");
};
Application.prototype.backToTopActivity = function () {
  while (this.activityStack.length > 0) {
    this.currentActivity.stop();
    this.currentActivity = this.activityStack.pop();
  }
  this.setContentView(this.currentActivity.getView());
  this.currentActivity.resume();
};
var _default = Application;
exports["default"] = _default;

/***/ }),

/***/ 36447:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Ref = _interopRequireDefault(__webpack_require__(90060));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @typedef {{defined?:function,revoked?:function,get?:function, set?: function, descriptor?: Object|function, export?: function}} AttributeHandler
 */

/***
 *
 * @param {Object} node
 * @constructor
 */
function Attributes(node) {
  Object.defineProperty(this, '$$node', {
    enumerable: false,
    configurable: true,
    writable: false,
    value: node
  });
  Object.defineProperty(this, '_definedProperties', {
    enumerable: false,
    writable: false,
    value: {}
  });
  Object.defineProperty(this, '_definedComputedHandlers', {
    enumerable: false,
    writable: false,
    value: {}
  });
}
Object.defineProperty(Attributes.prototype, 'loadAttributeHandlers', {
  enumerable: false,
  configurable: true,
  writable: false,
  value: function value(newHandlers) {
    var self = this;
    var definedHandlers = this._definedProperties;
    var definedComputedHandlers = this._definedComputedHandlers;
    Object.keys(this._definedProperties).forEach(function (key) {
      if (!newHandlers[key]) {
        delete definedHandlers[key];
        delete definedComputedHandlers[key];
        delete self[key];
      }
    });
    Object.keys(newHandlers).forEach(function (key) {
      if (definedHandlers[key] !== newHandlers[key]) {
        self.defineProperty(key, newHandlers[key]);
      }
    });
  }
});
Object.defineProperty(Attributes.prototype, 'unloadAttributeHandlers', {
  enumerable: false,
  configurable: true,
  writable: false,
  value: function value(oldHandlers) {
    var self = this;
    Object.keys(oldHandlers).forEach(function (key) {
      self.revokeProperty(key, oldHandlers[key]);
    });
  }
});
Object.defineProperty(Attributes.prototype, 'revokeProperty', {
  enumerable: false,
  configurable: true,
  writable: false,
  value: function value(name, handler) {
    if (!this._definedProperties[name]) return;
    if (handler && this._definedProperties[name] !== handler) return; //verify
    if (handler.revoked) {
      handler.revoked.call(this, this._definedComputedHandlers[name].ref);
    }
    var value = this[name];
    delete this[name];
    this[name] = value;
    delete this._definedProperties[name];
  }
});
Object.defineProperty(Attributes.prototype, 'defineProperty', {
  enumerable: false,
  configurable: true,
  writable: false,
  value: function value(name, handler) {
    var self = this;
    this._definedProperties[name] = handler;
    var hadValue = !!(name in this);
    var privateValueRef = new _Ref["default"](this[name]);
    var objectDescriptor = {
      enumerable: true,
      configurable: true,
      set: function set(value) {
        if (handler.set) privateValueRef.set(handler.set.apply(self.$$node, Array.prototype.slice.call(arguments).concat([privateValueRef])));else privateValueRef.set(value);
      },
      get: function get() {
        if (handler.get) return handler.get.apply(self.$$node, Array.prototype.slice.call(arguments).concat([privateValueRef]));else return privateValueRef.get();
      }
    };
    Object.defineProperty(this, name, objectDescriptor);
    this._definedComputedHandlers[name] = objectDescriptor;
    objectDescriptor.ref = privateValueRef;
    if (handler.defined) {
      handler.defined.call(this, privateValueRef);
    }
    if (hadValue) this[name] = privateValueRef.get();
  }
});
Object.defineProperty(Attributes.prototype, 'getProperty', {
  enumerable: false,
  configurable: true,
  writable: false,
  value: function value(name) {
    var args = Array.prototype.slice.call(arguments, 1);
    var handler = this._definedComputedHandlers[name];
    if (handler) {
      return handler.get.apply(this, args);
    } else return this[name];
  }
});
Object.defineProperty(Attributes.prototype, 'setProperty', {
  enumerable: false,
  configurable: true,
  writable: false,
  value: function value(name, _value) {
    var args = Array.prototype.slice.call(arguments, 1);
    var handler = this._definedComputedHandlers[name];
    if (handler) {
      return handler.set.apply(this, args);
    } else this[name] = _value;
  }
});
Object.defineProperty(Attributes.prototype, 'export', {
  enumerable: false,
  configurable: true,
  value: function value() {
    var self = this;
    return Object.keys(this).reduce(function (ac, key) {
      var value;
      var handler = self._definedProperties[key];
      var computedHandler = self._definedComputedHandlers[key];
      var exporter = handler && handler["export"];
      if (exporter) {
        value = exporter.call(self.$$node, computedHandler.ref);
      } else {
        value = self[key];
      }
      if (value !== undefined) ac[key] = value;
      return ac;
    }, {});
  }
});
Object.defineProperty(Attributes.prototype, 'getPropertyDescriptor', {
  enumerable: false,
  configurable: true,
  writable: false,
  value: function value(name) {
    var handler = this._definedProperties[name];
    if (handler && typeof handler.descriptor === 'function') return handler.descriptor.call(this.$$node);
    var value = this[name];
    return handler && handler.descriptor || {
      type: _typeof(value)
    };
  }
});
var _default = Attributes;
exports["default"] = _default;

/***/ }),

/***/ 34470:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function CMDRunner(_this, commands) {
  this._this = _this;
  this.commands = {};
  this.assign(commands);
}
CMDRunner.prototype.has = function (cmdName) {
  return !!this.commands[cmdName];
};
CMDRunner.prototype.add = function (cmdName, handler) {
  this.commands[cmdName] = handler;
  return this;
};
CMDRunner.prototype.remove = function (cmdName) {
  delete this.commands[cmdName];
  return this;
};
CMDRunner.prototype.assign = function (obj) {
  for (var cmdName in obj) {
    if (typeof obj[cmdName] == 'function') {
      this.add(cmdName, obj[cmdName]);
    }
  }
};
CMDRunner.prototype.invoke = function () {
  if (this.commands[arguments[0]]) {
    var args = Array.prototype.slice.call(arguments, 1);
    return this.commands[arguments[0]].apply(this._this, args);
  } else {
    throw new Error('No command: ' + arguments[0]);
  }
};
var _default = CMDRunner;
exports["default"] = _default;

/***/ }),

/***/ 31010:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 *
 * @param {T} value
 * @param {*=} type
 * @constructor
 * @template T
 */
function Const(value, type) {
  this.value = value;
  this.type = type;
}
Const.prototype.toString = function () {
  return this.value + '';
};

/***
 *
 * @return {T}
 */
Const.prototype.valueOf = function () {
  return this.value;
};

/**
 *
 * @return {T}
 */
Const.prototype.get = function () {
  return this.value;
};
var _default = Const;
exports["default"] = _default;

/***/ }),

/***/ 16311:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function Context() {
  /****
   *
   * @type {"CREATE"|"PAUSE"|"RUNNING"|"STANDBY"|"DIE"|"STOP"}
   */
  this.state = "CREATE";
  /**
   * @type {Context}
   */
  this.parent = null;
  /***
   *
   * @type {null|ContextManager}
   */
  this.ctxMng = null;
}

/**
 * @returns {*}
 */
Context.prototype.getContext = function (key) {
  var ctx = this;
  var res;
  while (ctx && !res) {
    if (ctx.ctxMng) {
      res = ctx.ctxMng.get(key);
    }
    ctx = ctx.parent;
  }
  return res;
};

/**
 * @param {string} key
 * @param {*} value
 * @returns {*}
 */
Context.prototype.setContext = function (key, value) {
  return this.getContextManager().set(key, value);
};

/**
 * @returns {ContextManager}
 */
Context.prototype.getContextManager = function () {
  var ctx = this;
  var res;
  while (ctx && !res) {
    if (ctx.ctxMng) {
      res = ctx.ctxMng;
    }
    ctx = ctx.parent;
  }
  return res;
};

/**
 * @param {Context} parent
 */
Context.prototype.attach = function (parent) {
  //stop before attach to new context
  this.stop();
  /**
   * @type {Application}
   */
  this.parent = parent;
  this.onAttached && this.onAttached();
};
Context.prototype.detach = function () {
  this.stop();
  this.onDetached && this.onDetached();
  this.parent = null;
};
Context.prototype.pause = function () {
  if (this.state.match(/RUNNING|PAUSE/)) {
    if (this.state === "RUNNING") {
      this.state = "PAUSE";
      this.onPause && this.onPause();
    }
  } else {
    // console.warn(this, "NOT RUNNING");
  }
};
Context.prototype.resume = function () {
  if (!this.state.match(/STANDBY|PAUSE|RUNNING/)) {
    // console.warn(this, 'NOT READY!', this.state);
    return;
  }
  if (this.state === "RUNNING") return;
  this.state = "RUNNING";
  this.onResume && this.onResume();
};

/***
 * @param {boolean=} standBy start but waiting for resume()
 */
Context.prototype.start = function (standBy) {
  if (this.state.match(/DIE/)) {
    // console.warn(this, 'DIED!');
    return;
  }
  if (this.state.match(/RUNNING/)) return;
  if (this.state.match(/STOP|CREATE/)) {
    this.state = "STANDBY";
    this.onStart && this.onStart();
  }
  if (!standBy && this.state.match(/STANDBY|PAUSE/)) {
    this.resume();
  }
};
Context.prototype.stop = function () {
  if (this.state.match(/STOP|DIE|CREATE/)) return;
  if (this.state.match(/RUNNING/)) this.pause();
  this.state = "STOP";
  this.onStop && this.onStop();
};
Context.prototype.destroy = function () {
  if (this.state.match(/DIE/)) return;
  if (this.state.match(/RUNNING|PAUSE/)) this.stop();
  this.state = "DIE";
  this.onDestroy && this.onDestroy();
};
Context.prototype.onDestroy = _noop["default"];
Context.prototype.onStop = _noop["default"];
Context.prototype.onStart = _noop["default"];
Context.prototype.onResume = _noop["default"];
Context.prototype.onPause = _noop["default"];
Context.prototype.onDetached = _noop["default"];
Context.prototype.onAttached = _noop["default"];
var _default = Context;
exports["default"] = _default;

/***/ }),

/***/ 88062:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function ContextManager() {
  this.__contextData__ = {};
}

/**
 * @param {String} key
 * @returns {*}
 */
ContextManager.prototype.get = function (key) {
  return this.__contextData__[key];
};

/**
 * @param {String} key
 * @param {*} value
 * @returns {Context}
 */
ContextManager.prototype.set = function (key, value) {
  this.__contextData__[key] = value;
  return this;
};
ContextManager.prototype.assign = function (obj) {
  Object.assign(this.__contextData__, obj);
  return this;
};
ContextManager.prototype.remove = function (key) {
  delete this.__contextData__[key];
  return this;
};
ContextManager.prototype.contains = function (key) {
  return key in this.__contextData__;
};
var _default = ContextManager;
exports["default"] = _default;

/***/ }),

/***/ 5925:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _ContextManager = _interopRequireDefault(__webpack_require__(88062));
var _GrandContext = _interopRequireDefault(__webpack_require__(84179));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends GrandContext
 * @constructor
 */
function Fragment() {
  _GrandContext["default"].call(this);
}
_OOP["default"].mixClass(Fragment, _GrandContext["default"]);
Fragment.prototype.createView = function () {
  throw new Error("Not implement!");
};
Fragment.prototype.getView = function () {
  if (this.$view) return this.$view;
  this.$view = this.createView() || this.$view;
  if (!this.$view) throw new Error("this.$view must be not null!");
  if (this.onCreated) this.onCreated();
  return this.$view;
};
Fragment.prototype.onCreated = _noop["default"];
Fragment.prototype.revokeResource = function () {
  this.destroy();
};
var _default = Fragment;
exports["default"] = _default;

/***/ }),

/***/ 84179:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _ContextManager = _interopRequireDefault(__webpack_require__(88062));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends Context
 * @constructor
 */
function GrandContext() {
  _Context["default"].call(this);
  this.ctxMng = new _ContextManager["default"]();
}
_OOP["default"].mixClass(GrandContext, _Context["default"]);
var _default = GrandContext;
exports["default"] = _default;

/***/ }),

/***/ 51249:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @augments EventEmitter
 * @extends Array
 * @constructor
 */
function ObservableArray(array) {
  _EventEmitter["default"].call(this);
  Object.defineProperty(this, '_array', {
    configurable: false,
    enumerable: false,
    value: array
  });
  this._makeArrIndex(0, array.length);
}
Object.defineProperty(ObservableArray.prototype, 'unshift', {
  enumerable: false,
  value: function value() {
    var newItems = Array.prototype.slice.call(arguments);
    var cN = this._array.length;
    this._makeArrIndex(cN, this._array.length + newItems.length);
    this._array.unshift.apply(this._array, newItems);
    this.emit("additem", {
      target: this,
      items: newItems,
      type: 'additem',
      offset: 0,
      action: 'unshift'
    }, this);
  }
});
Object.defineProperty(ObservableArray.prototype, 'shift', {
  enumerable: false,
  value: function value() {
    var res = undefined;
    if (this._array.length > 0) {
      res = this._array.shift();
      this._removeIndex(this._array.length);
      this.emit("removeitem", {
        target: this,
        type: 'additem',
        offset: 0,
        action: 'shift',
        items: [res],
        item: res
      }, this);
    }
    return res;
  }
});
Object.defineProperty(ObservableArray.prototype, 'push', {
  enumerable: false,
  value: function value() {
    var newItems = Array.prototype.slice.call(arguments);
    var cN = this._array.length;
    this._makeArrIndex(this._array.length, this._array.length + newItems.length);
    this._array.push.apply(this._array, newItems);
    this.emit("additem", {
      target: this,
      items: newItems,
      type: 'additem',
      offset: cN,
      action: 'push'
    }, this);
  }
});
Object.defineProperty(ObservableArray.prototype, 'pop', {
  enumerable: false,
  value: function value() {
    var res = undefined;
    if (this._array.length > 0) {
      res = this._array.pop();
      this._removeIndex(this._array.length);
      this.emit("removeitem", {
        target: this,
        type: 'additem',
        offset: this._array.length,
        action: 'shift',
        items: [res],
        item: res
      }, this);
    }
    return res;
  }
});
Object.defineProperty(ObservableArray.prototype, 'replace', {
  enumerable: false,
  value: function value(offset, items) {
    for (var i = 0; i < items.length && offset < this._array.length; ++i, ++offset) {
      this._array[offset] = items[i];
    }
  }
});
Object.defineProperty(ObservableArray.prototype, 'toJSON', {
  enumerable: false,
  value: function value() {
    return this._array;
  }
});
Object.defineProperty(ObservableArray.prototype, 'valueOf', {
  enumerable: false,
  value: function value() {
    return this._array;
  }
});
Object.defineProperty(ObservableArray.prototype, '_makeArrIndex', {
  enumerable: false,
  value: function value(cN, nN) {
    var i;
    if (nN > cN) {
      for (i = cN; i < nN; ++i) {
        this._defineIndex(i);
      }
    } else {
      for (i = cN - 1; i >= nN; --i) {
        this._removeIndex(i);
      }
    }
  }
});

/***
 *
 * @param {number} idx
 * @private
 */
Object.defineProperty(ObservableArray.prototype, '_defineIndex', {
  enumerable: false,
  value: function value(idx) {
    if (!(idx in this)) {
      Object.defineProperty(this, idx, {
        set: function set(value) {
          var oldValue = this._array[idx];
          this._array[idx] = value;
          this.emit('setitem', {
            type: 'setitem',
            target: this,
            oldValue: oldValue,
            vale: value,
            offset: idx
          }, this);
        },
        get: function get() {
          return this._array[idx];
        },
        configurable: true,
        enumerable: true
      });
    }
  }
});
Object.defineProperty(ObservableArray.prototype, '_removeIndex', {
  enumerable: false,
  value: function value(idx) {
    delete this[idx];
  }
});
Object.defineProperty(ObservableArray.prototype, 'splice', {
  enumerable: false,
  value: function value(index, howMany) {
    var res = [];
    var newItems = Array.prototype.slice.call(arguments, 2);
    index = index == null ? 0 : index < 0 ? this._array.length + index : index;
    howMany = howMany == null ? this._array.length - index : howMany > 0 ? howMany : 0;
    if (howMany > 0) {
      this._makeArrIndex(this._array.length, this._array.length - howMany);
      res = this._array.splice(index, howMany);
      if (newItems.length > 0) {
        if (res.length > 0) {
          this.emit('replaceitem', {
            type: 'replaceitem',
            offset: index,
            oldItems: res,
            newItems: newItems,
            target: this,
            action: 'splice'
          }, this);
        } else {
          this.emit('additem', {
            type: 'additem',
            offset: index,
            items: newItems,
            target: this
          }, this);
        }
      } else {
        if (res.length > 0) {
          this.emit('removeitem', {
            target: this,
            type: 'additem',
            offset: 0,
            action: 'splice',
            items: res
          }, this);
        }
      }
    }
    return res;
  }
});
Object.defineProperty(ObservableArray.prototype, 'length', {
  set: function set(value) {
    var n = Number(value);
    var length = this._array.length;
    if (n % 1 === 0 && n >= 0) {
      if (n < length) {
        this.splice(n);
      } else if (n > length) {
        this.push.apply(this, new Array(n - length));
      }
    } else {
      throw new RangeError("Invalid array length");
    }
    this._array.length = n;
  },
  get: function get() {
    return this._array.length;
  }
});
Object.getOwnPropertyNames(Array.prototype).forEach(function (name) {
  if (!(name in ObservableArray.prototype)) {
    Object.defineProperty(ObservableArray.prototype, name, {
      configurable: false,
      enumerable: false,
      writable: false,
      value: Array.prototype[name]
    });
  }
});
Object.getOwnPropertyNames(_EventEmitter["default"].prototype).forEach(function (name) {
  if (!(name in ObservableArray.prototype)) {
    Object.defineProperty(ObservableArray.prototype, name, {
      configurable: false,
      enumerable: false,
      writable: false,
      value: _EventEmitter["default"].prototype[name]
    });
  }
});
var _default = ObservableArray;
exports["default"] = _default;

/***/ }),

/***/ 65257:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends EventEmitter
 * @param {Object} o
 * @constructor
 */
function ObservableStruct(o) {
  _EventEmitter["default"].call(this);
  Object.defineProperty(this, '__o__', {
    configurable: false,
    enumerable: false,
    value: o
  });
  for (var key in o) {
    this.defineProperty(key);
  }
}
Object.defineProperty(ObservableStruct.prototype, 'defineProperty', {
  configurable: false,
  enumerable: false,
  writable: false,
  /***
   *
   * @param {string} name
   * @param {*=} value
   */
  value: function value(name, _value) {
    if (!(name in this)) {
      Object.defineProperty(this, name, {
        set: function set(value) {
          var oldValue = this.__o__[name];
          this.__o__[name] = value;
          this.emit('setproperty', {
            type: 'setproperty',
            target: this,
            oldValue: oldValue,
            vale: value,
            name: name
          }, this);
        },
        get: function get() {
          return this.__o__[name];
        },
        configurable: true,
        enumerable: true
      });
    }
  }
});
Object.getOwnPropertyNames(_EventEmitter["default"].prototype).forEach(function (name) {
  if (!(name in ObservableStruct.prototype)) {
    Object.defineProperty(ObservableStruct.prototype, name, {
      configurable: false,
      enumerable: false,
      writable: false,
      value: _EventEmitter["default"].prototype[name]
    });
  }
});
var _default = ObservableStruct;
exports["default"] = _default;

/***/ }),

/***/ 20298:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function PluginManager() {
  this.runnerChains = {};
}
PluginManager.prototype.push = function (key, runner) {
  this.runnerChains[key] = this.runnerChains[key] || [];
  this.runnerChains[key].push(runner);
};
PluginManager.prototype.pop = function (key) {
  this.runnerChains[key] = this.runnerChains[key] || [];
  return this.runnerChains[key].pop();
};
PluginManager.prototype.remove = function (key, runner) {
  var runnerChain = this.runnerChains[key];
  if (runnerChain) {
    var index = runnerChain.indexOf(runner);
    if (index >= 0) {
      runnerChain.splice(index, 1);
      return true;
    }
  }
  return false;
};
PluginManager.prototype.contains = function (key, runner) {
  var runnerChain = this.runnerChains[key];
  if (runnerChain) {
    var index = runnerChain.indexOf(runner);
    if (index >= 0) return true;
  }
  return false;
};
PluginManager.prototype.exec = function (_this, key) {
  var args = Array.prototype.slice.call(arguments, 2);
  var runnerChain = this.runnerChains[key];
  if (runnerChain) for (var i = 0; i < runnerChain.length; ++i) {
    runnerChain[i].apply(_this, args);
  }
};
var _default = PluginManager;
exports["default"] = _default;

/***/ }),

/***/ 90060:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 *
 * @param {T} value
 * @param {*=} type
 * @constructor
 * @template T
 */
function Ref(value, type) {
  this.type = type;
  this.value = value;
}
Ref.prototype.toString = function () {
  return this.value + '';
};

/***
 *
 * @return {T}
 */
Ref.prototype.valueOf = function () {
  return this.value;
};

/***
 *
 * @param {T}value
 */
Ref.prototype.set = function (value) {
  this.value = value;
};

/**
 *
 * @return {T}
 */
Ref.prototype.get = function () {
  return this.value;
};
var _default = Ref;
exports["default"] = _default;

/***/ }),

/***/ 23376:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/**
 *
 * @param {{storageKey: string}} opt
 * @constructor
 */
function ShareConfiguration(opt) {
  this.opt = Object.assign({
    storageKey: "AS_SHARE_CONFIGURATION"
  }, opt);
  Object.defineProperty(this, 'data', {
    value: {},
    enumerable: true,
    writable: false
  });
  Object.defineProperty(this, '__listener__', {
    value: {},
    enumerable: false,
    writable: false
  });
  this.to = -1;
  this._load();
}
ShareConfiguration.prototype.version = 1;
ShareConfiguration.prototype._load = function () {
  var js = localStorage.getItem(this.opt.storageKey);
  if (!js) return;
  try {
    var obj = new Function('return ' + js)();
    if (obj && obj.version === this.version) {
      Object.assign(this.data, obj.data || {});
    }
  } catch (e) {}
};

/***
 *
 * @param {string} key
 * @param {*|undefined} value
 * @returns this
 */
ShareConfiguration.prototype.set = function (key, value) {
  var prev = this.data[key];
  if (value === undefined) {
    delete this.data[key];
  } else {
    this.data[key] = value;
  }
  if (value !== prev) {
    this.emit(key, value, this);
  }
  return this;
};

/***
 *@returns this
 */
ShareConfiguration.prototype.save = function () {
  clearTimeout(this.to);
  var obj = {
    data: this.data,
    version: this.version
  };
  var js = (0, _generator.generateJSVariable)(obj);
  localStorage.setItem(this.opt.storageKey, js);
};

/***
 *@returns this
 */
ShareConfiguration.prototype.saveDelay = function () {
  var _this = this;
  clearTimeout(this.to);
  this.to = setTimeout(function () {
    return _this.save();
  }, 100);
};
ShareConfiguration.prototype.emit = function (key) {
  var args = Array.prototype.slice.call(arguments, 1);
  var self = this;
  if (this.__listener__[key]) {
    this.__listener__[key].slice().forEach(function (f) {
      try {
        f.apply(self, args);
      } catch (err) {
        (0, _safeThrow["default"])(err);
      }
    });
  }
  return this;
};

/***
 *
 * @param {string|Object} key
 * @param {function=}listener
 * @return {ShareConfiguration}
 */
ShareConfiguration.prototype.on = function (key, listener) {
  if (typeof key === "string") {
    if (!this.__listener__[key]) this.__listener__[key] = [];
    if (this.__listener__[key].indexOf(listener) < 0) {
      this.__listener__[key].push(listener);
    }
  } else if (_typeof(key) === "object") {
    for (var key1 in key) {
      this.on(key1, key[key1]);
    }
  }
  return this;
};

/***
 *
 * @param {string|Object} key
 * @param {function=}listener
 * @return {ShareConfiguration}
 */
ShareConfiguration.prototype.off = function (key, listener) {
  if (typeof key === "string" && this.__listener__[key]) {
    var idx = this.__listener__[key].indexOf(listener);
    if (idx >= 0) {
      this.__listener__[key].splice(idx, 1);
    }
  } else if (_typeof(key) === "object") {
    for (var key1 in key) {
      this.off(key1, key[key1]);
    }
  }
  return this;
};

/***
 *
 * @param {string} key
 * @param {*=} defaultValue
 * @return {*}
 */
ShareConfiguration.prototype.get = function (key, defaultValue) {
  var value = this.data[key];
  if (value === undefined) return defaultValue;
  return value;
};
ShareConfiguration.prototype.contains = function (key) {
  return this.data[key] !== undefined;
};
ShareConfiguration.instance = new ShareConfiguration();
var _default = ShareConfiguration;
exports["default"] = _default;

/***/ }),

/***/ 95619:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _stringGenerate = __webpack_require__(10713);
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {TaskManager} manager
 * @param {function(finishTask: function, bundle: any): (void|Promise)=} func
 * @param {any=} bundle
 * @constructor
 */
function Task(manager, func, bundle) {
  this.manager = manager;
  this.id = (0, _stringGenerate.randomIdent)(12);
  this.func = func;
  this.bundle = bundle;
  this.state = 0;
}
Task.prototype.begin = function () {
  if (this.state !== 0) return;
  this.state = 1;
  var sync;
  if (this.func) {
    try {
      sync = this.func(this.end.bind(this), this.bundle);
    } catch (error) {
      console.error(error);
    }
  }
  if (sync && sync.then) sync["catch"](function (error) {
    return console.error(error);
  }).then(this.end.bind(this));
};
Task.prototype.end = function () {
  if (this.state !== 1) return;
  this.state = 2;
  this.manager.onFinishTask(this);
};
function TaskManager(opt) {
  _EventEmitter["default"].call(this);
  opt = opt || {};
  this.limit = typeof opt.limit === "number" && opt.limit >= 1 ? opt.limit : Infinity;
  this.pendingTasks = [];
  this.runningTasks = [];
}
_OOP["default"].mixClass(TaskManager, _EventEmitter["default"]);

/***
 *
 * @param {function(finishTask: function, bundle: any): (void|Promise)} func
 * @param {any} bundle
 */
TaskManager.prototype.requestTask = function (func, bundle) {
  var task = new Task(this, func, bundle);
  if (this.runningTasks.length < this.limit) {
    this.runningTasks.push(task);
    this.emit('task_begin', {
      type: 'task_begin',
      task: task
    }, this);
    task.begin();
  } else {
    this.pendingTasks.push(task);
  }
};
TaskManager.prototype.onFinishTask = function (task) {
  var idx = this.runningTasks.indexOf(task);
  if (idx < 0) return;
  this.runningTasks.splice(idx, 1);
  this.emit('task_end', {
    type: 'task_end',
    task: task
  }, this);
  while (this.pendingTasks.length > 0 && this.runningTasks.length < this.limit) {
    task = this.pendingTasks.shift();
    this.runningTasks.push(task);
    this.emit('task_begin', {
      type: 'task_begin',
      task: task
    }, this);
    task.begin();
  }
};
TaskManager.prototype.newTask = function () {
  var task = new Task(this, null, null);
  this.runningTasks.push(task);
  this.emit('task_begin', {
    type: 'task_begin',
    task: task
  }, this);
  task.begin();
  return task;
};
var _default = TaskManager;
exports["default"] = _default;

/***/ }),

/***/ 61607:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function VarScope(parent) {
  this.parent = parent;
  this.data = {};
}
VarScope.prototype.revoke = function (name) {
  delete this.data[name];
  return this;
};
VarScope.prototype.isDeclared = function (name) {
  return name in this.data;
};

/***
 *
 * @param name
 * @param initValue
 * @param {boolean=} force
 * @return {VarScope}
 */
VarScope.prototype.declare = function (name, initValue, force) {
  if (name in this.data && !force) throw new Error(name + ' is already delared in this scope!');
  this.data[name] = initValue;
  return this;
};
VarScope.prototype.get = function (name) {
  var scope = this.findScope(name);
  if (!scope) throw new Error(name + ' is not declared!');
  return scope.data[name];
};
VarScope.prototype.set = function (name, value) {
  var scope = this.findScope(name);
  if (!scope) throw new Error(name + ' is not declared!');
  scope.data[name] = value;
};
VarScope.prototype.findScope = function (name) {
  var currentScope = this;
  while (currentScope) {
    if (name in currentScope.data) break;
    currentScope = currentScope.parent;
  }
  return currentScope;
};
var _default = VarScope;
exports["default"] = _default;

/***/ }),

/***/ 99125:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _stringGenerate = __webpack_require__(10713);
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {{id?:string}=} opt
 * @constructor
 */
function CCBlock(opt) {
  opt = opt || {};
  this.id = opt.id || (0, _stringGenerate.randomIdent)(16);
  Object.defineProperty(this, '__cc_listener__', {
    enumerable: false,
    configurable: true,
    writable: false,
    value: {}
  });
  Object.defineProperty(this, '__cc_line_list_by_id__', {
    enumerable: false,
    configurable: true,
    writable: false,
    value: {}
  });
}

/***
 *
 * @param {string} pinName
 * @param {function} listener
 * @return {CCBlock}
 */
CCBlock.prototype.pinOn = function (pinName, listener) {
  var cbList;
  if (this.__cc_listener__[pinName]) {
    cbList = this.__cc_listener__[pinName];
  } else {
    cbList = [];
    this.__cc_listener__[pinName] = cbList;
  }
  if (cbList.indexOf(listener) < 0) {
    cbList.push(listener);
  } else {
    console.warn("Duplicate pin listener!");
  }
  return this;
};
CCBlock.prototype.pinOff = function (pinName, listener) {
  if (!this.__cc_listener__[pinName]) return this;
  var cbList = this.__cc_listener__[pinName];
  var cbIdx = cbList.indexOf(listener);
  if (cbIdx >= 0) {
    cbList.splice(cbIdx);
  }
  return this;
};
CCBlock.prototype.pinFire = function (pinName) {
  if (!this.__cc_listener__[pinName]) return;
  var cbList = this.__cc_listener__[pinName].slice();
  if (cbList.length === 0) return; //avoid call pinGetValue
  var args = Array.prototype.slice.call(arguments, 1);
  if (args.length === 0 && this.pinHandlers[pinName] && this.pinHandlers[pinName].get && cbList.length > 0) args.push(this.pinGetValue(pinName));
  for (var i = 0; i < cbList.length; ++i) {
    try {
      cbList[i].apply(this, args);
    } catch (e) {
      (0, _safeThrow["default"])(e);
    }
  }
};
CCBlock.prototype.pinFireAll = function () {
  var pinNames = Object.keys(this.pinHandlers);
  var pinName;
  for (var i = 0; i < pinNames.length; ++i) {
    pinName = pinNames[i];
    if (this.pinHandlers[pinName] && this.pinHandlers[pinName].get) this.pinFire(pinName);
  }
};
CCBlock.prototype.pinReceives = function (pinName) {
  var args = Array.prototype.slice.call(arguments, 1);
  if (this.pinHandlers[pinName] && this.pinHandlers[pinName].receives) {
    this.pinHandlers[pinName].receives.apply(this, args);
  }
};
CCBlock.prototype.pinGetValue = function (pinName) {
  var args = Array.prototype.slice.call(arguments, 1);
  if (this.pinHandlers[pinName] && this.pinHandlers[pinName].get) {
    return this.pinHandlers[pinName].get.apply(this, args);
  }
  return undefined;
};
CCBlock.prototype.pinGetDescriptor = function (pinName) {
  var args = Array.prototype.slice.call(arguments, 1);
  var descriptor = this.pinHandlers[pinName] && this.pinHandlers[pinName].descriptor;
  if (descriptor) {
    if (typeof descriptor === "function") return this.pinHandlers[pinName].get.apply(this, args);
    return descriptor;
  }
  return undefined;
};
Object.defineProperty(CCBlock.prototype, 'pinLines', {
  get: function get() {
    var lineList = this.__cc_line_list_by_id__;
    return Object.keys(lineList).map(function (id) {
      return lineList[id];
    });
  }
});
CCBlock.prototype.pinHandlers = {};
var _default = CCBlock;
exports["default"] = _default;

/***/ }),

/***/ 83141:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _stringGenerate = __webpack_require__(10713);
/***
 *
 * @param {CCBlock} u
 * @param {string} uPinName
 * @param {CCBlock} v
 * @param {string} vPinName
 * @param {boolean=} twoWay
 * @param {{id?:string}=} opt
 * @constructor
 */
function CCLine(u, uPinName, v, vPinName, twoWay, opt) {
  opt = opt || {};
  twoWay = !!twoWay;
  Object.defineProperty(this, 'id', {
    enumerable: true,
    writable: false,
    value: opt.id || (0, _stringGenerate.randomIdent)(32)
  });
  Object.defineProperty(this, 'u', {
    enumerable: true,
    writable: false,
    value: u
  });
  Object.defineProperty(this, 'v', {
    enumerable: true,
    writable: false,
    value: v
  });
  Object.defineProperty(this, 'uPinName', {
    enumerable: true,
    writable: false,
    value: uPinName
  });
  Object.defineProperty(this, 'vPinName', {
    enumerable: true,
    writable: false,
    value: vPinName
  });
  Object.defineProperty(this, 'twoWay', {
    enumerable: true,
    writable: false,
    value: twoWay
  });
  this.vToU = this.vToU.bind(this);
  this.uToV = this.uToV.bind(this);
  this.u.pinOn(this.uPinName, this.uToV);
  if (this.twoWay) this.v.pinOn(this.vPinName, this.vToU);
  this.u.__cc_line_list_by_id__[this.id] = this;
  this.v.__cc_line_list_by_id__[this.id] = this;
}
CCLine.prototype.remove = function () {
  this.u.pinOff(this.uPinName, this.uToV);
  if (this.twoWay) this.v.pinOff(this.vPinName, this.vToU);
  delete this.u.__cc_line_list_by_id__[this.id];
  delete this.v.__cc_line_list_by_id__[this.id];
};
CCLine.prototype.uToV = function () {
  var args = [this.vPinName].concat(Array.prototype.slice.call(arguments));
  this.v.pinReceives.apply(this.v, args);
};
CCLine.prototype.vToU = function () {
  var args = [this.uPinName].concat(Array.prototype.slice.call(arguments));
  this.u.pinReceives.apply(this.u, args);
};
var _default = CCLine;
exports["default"] = _default;

/***/ }),

/***/ 47375:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _FlagManager = _interopRequireDefault(__webpack_require__(64805));
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
_FlagManager["default"].add('ABSOL_DEBUG', false);
function ALogger() {
  _FlagManager["default"].on('change', this._updateProto.bind(this));
  this._updateProto();
}
ALogger.prototype._updateProto = function () {
  ['log', 'table', 'table', 'error', 'warn'].forEach(function (name) {
    var cFunction = window['ABSOL_DEBUG'] ? console[name] && console[name].bind(console) : _noop["default"];
    this[name] = cFunction || _noop["default"];
  }.bind(this));
};
ALogger.prototype.log = _noop["default"];
ALogger.prototype.table = _noop["default"];
ALogger.prototype.error = _noop["default"];
ALogger.prototype.warn = _noop["default"];
(window || __webpack_require__.g).ALogger = new ALogger();
var _default = ALogger;
exports["default"] = _default;

/***/ }),

/***/ 64805:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @extends EventEmitter
 * @constructor
 */
function FlagManager() {
  _EventEmitter["default"].call(this);
  this.flag = {};
  this.readSetting();
}
_OOP["default"].mixClass(FlagManager, _EventEmitter["default"]);
FlagManager.prototype.STORE_KEY = "ABSOL_FLAG";
FlagManager.prototype.readSetting = function () {
  var flagText = localStorage.getItem(this.STORE_KEY) || '{}';
  var newFlag = {};
  try {
    newFlag = JSON.parse(flagText);
  } catch (err) {}
  this.applyFlag(newFlag);
};
FlagManager.prototype.applyFlag = function (newFlag, save) {
  var changed = [];
  Object.keys(Object.assign({}, this.flag, newFlag)).forEach(function (key) {
    if (key in window) {
      if (key in newFlag) {
        if (window[key] !== newFlag[key]) {
          window[key] = newFlag[key];
          changed.push(key);
        }
      } else {
        changed.push(key);
        delete window[key];
      }
    } else {
      if (key in newFlag) {
        if (window[key] !== newFlag[key]) {
          window[key] = newFlag[key];
          changed.push(key);
        }
      }
    }
  });
  this.flag = newFlag;
  if (save) this.saveSetting();
  if (changed.length > 0) {
    this.emit('change', {
      type: 'change',
      target: this,
      keys: changed
    });
  }
};
FlagManager.prototype.saveSetting = function () {
  localStorage.setItem(this.STORE_KEY, JSON.stringify(this.flag));
};

/***
 *
 * @param {string} key
 * @param {boolean=} value
 */
FlagManager.prototype.add = function (key, value) {
  if (!key || typeof key != 'string') return;
  if (key in this.flag) return;
  if (typeof value != "boolean") {
    value = !!window[key];
  }
  this.flag[key] = value;
  window[key] = value;
  this.saveSetting();
  this.emit('change', {
    type: 'change',
    target: this,
    keys: [key]
  });
};
FlagManager.prototype.set = function (key, value) {
  if (!key || typeof key != 'string') return;
  if (typeof value != "boolean") {
    value = !!window[key];
  }
  var changed = false;
  this.flag[key] = value;
  if (window[key] !== value) {
    changed = true;
  }
  this.saveSetting();
  if (changed) {
    this.emit('change', {
      type: 'change',
      target: this,
      keys: [key]
    });
  }
};
FlagManager.prototype.remove = function (key) {
  if (key in this.flag) {
    delete window[key];
    delete this.flag[key];
    this.emit('change', {
      type: 'change',
      target: this,
      keys: [key]
    });
  }
};
var _default = new FlagManager();
exports["default"] = _default;

/***/ }),

/***/ 54707:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MQTTExecMaster = MQTTExecMaster;
exports.MQTTExecSlave = MQTTExecSlave;
var _generator = __webpack_require__(18528);
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function MQTTExecSlave(id) {
  var _this = this;
  this.id = id || 'dev';
  this.client = window.MQTT.connect('wss://absol.cf:9884/');
  this.client.on('connect', function () {
    _this.client.subscribe(_this.id + '_exec_cmd', function (err) {
      if (!err) {
        console.log('Subscribed to topic ' + _this.id + '_exec_cmd');
      } else {
        console.error('Subscribe error:', err);
      }
    });
  });
  this.client.on('message', function (topic, message) {
    if (topic === _this.id + '_exec_cmd') {
      _this.handleCommand(message);
    }
  });
}
MQTTExecSlave.prototype.handleCommand = function (message) {
  var _this2 = this;
  var data = new Function('return ' + message.toString())();
  var id = data.id;
  var cmd = data.cmd;
  var args = data.args || [];
  try {
    console.log('Executing', cmd, args);
    var res = this[cmd].apply(this, args);
  } catch (e) {
    this.client.publish(this.id + '_exec_cmd_result', (0, _generator.generateJSVariable)({
      id: id,
      error: e.message || e.toString()
    }));
    (0, _safeThrow["default"])(e);
    return;
  }
  if (res && res.then) {
    res.then(function (result) {
      console.log('Recieved', result);
      _this2.client.publish(_this2.id + '_exec_cmd_result', (0, _generator.generateJSVariable)({
        id: id,
        result: result
      }));
    })["catch"](function (err) {
      (0, _safeThrow["default"])(err);
      _this2.client.publish(_this2.id + '_exec_cmd_result', (0, _generator.generateJSVariable)({
        id: id,
        error: err && err.message || err.toString() || "undefined_error"
      }));
    });
  } else {
    console.log('Recieved', res);
    this.client.publish(this.id + '_exec_cmd_result', (0, _generator.generateJSVariable)({
      id: id,
      result: res
    }));
  }
};
function MQTTExecMaster(id) {
  var _this3 = this;
  this.id = id || 'dev';
  this.sync = new Promise(function (resolve, reject) {
    _this3.client = window.MQTT.connect('wss://absol.cf:9884/');
    _this3.client.on('connect', function () {
      _this3.client.subscribe(_this3.id + '_exec_cmd_result', function (err) {
        if (!err) {
          console.log('Subscribed to topic ' + _this3.id + '_exec_cmd_result');
          resolve();
        } else {
          console.error('Subscribe error:', err);
        }
      });
    });
    _this3.client.on('message', function (topic, message) {
      if (topic === _this3.id + '_exec_cmd_result') {
        _this3.handleResult(message);
      }
    });
  });
  this.promises = {};
}
MQTTExecMaster.prototype.invoke = function (cmd) {
  var _this4 = this;
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    args[_key - 1] = arguments[_key];
  }
  return this.sync.then(function () {
    return new Promise(function (rs, rj) {
      var id = Math.random().toString(36).substring(2, 15);
      _this4.promises[id] = {
        resolve: rs,
        reject: rj
      };
      _this4.client.publish(_this4.id + '_exec_cmd', (0, _generator.generateJSVariable)({
        cmd: cmd,
        args: args,
        id: id
      }));
    });
  });
};
MQTTExecMaster.prototype.handleResult = function (message) {
  var data = new Function('return ' + message.toString())();
  var id = data.id;
  var promise = this.promises[id];
  if (!promise) return;
  delete this.promises[id];
  if (data.error) {
    promise.reject(data.error);
  } else {
    promise.resolve(data.result);
  }
};

/***/ }),

/***/ 5025:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = noop;
function noop() {}
;

/***/ }),

/***/ 628:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = safeThrow;
function safeThrow(error) {
  var func = function func() {
    if (error.stack) {
      try {
        error.message += '\n' + error.stack;
      } catch (e) {
        //can not modify message
      }
    }
    throw error;
  };
  if (window.Thread && window.Thread.setTimeout) {
    window.Thread.setTimeout({
      func: func,
      time: 1,
      type: 'background',
      args: [],
      stack: error.stack || ""
    });
  } else {
    setTimeout(func, 1);
  }
}

/***/ }),

/***/ 64974:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TemplateString = _interopRequireDefault(__webpack_require__(73021));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function Color(rgba) {
  this.rgba = rgba.slice();
}

/***
 *
 * @returns {string}
 */
Color.prototype.toHex6 = function () {
  return this.rgba.slice(0, 3).map(function (b) {
    b = b * 255 >> 0;
    return (b < 16 ? '0' : '') + b.toString(16);
  }).join('');
};

/***
 *
 * @returns {string}
 */
Color.prototype.toHex8 = function () {
  return this.rgba.map(function (b) {
    b = b * 255 >> 0;
    return (b < 16 ? '0' : '') + b.toString(16);
  }).join('');
};

/***
 *
 * @returns {string}
 */
Color.prototype.toHex3 = function () {
  return this.rgba.slice(0, 3).map(function (b) {
    b = b * 255 / 17 >> 0;
    return b.toString(16);
  }).join('');
};

/***
 *
 * @returns {string}
 */
Color.prototype.toHex4 = function () {
  return this.rgba.map(function (b) {
    b = b * 255 / 17 >> 0;
    return b.toString(16);
  }).join('');
};

/***
 *
 * @returns {number[]}
 */
Color.prototype.toHSLA = function () {
  return Color.rgbaToHSLA(this.rgba);
};

/***
 *
 * @returns {number[]}
 */
Color.prototype.toHSBA = function () {
  return Color.rgbaToHSBA(this.rgba);
};

/***
 *
 * @returns {number[]}
 */
Color.prototype.toHWBA = function () {
  return Color.rgbaToHWBA(this.rgba);
};

/***
 *
 * @returns {number[]}
 */
Color.prototype.toCMYK = function () {
  return Color.rgbToCMYK(this.rgba);
};

/***
 *
 * @returns {Color}
 */
Color.prototype.getHighContrastColor = function () {
  var hsba = this.toHSBA();
  var h, s, b;
  h = hsba[0] > 0.5 ? hsba[0] - 0.5 : hsba[0] + 0.5;
  s = hsba[1] > 0.5 ? hsba[1] - 0.5 : hsba[1] + 0.5;
  b = hsba[2] > 0.5 ? hsba[2] - 0.5 : hsba[2] + 0.5;
  return Color.fromHSB(h, s, b);
};
Color.prototype.getHightContrastColor = Color.prototype.getHighContrastColor;
Color.prototype.getLuminance = function () {
  var a = this.rgba.slice(0, 3).map(function (v) {
    return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);
  });
  return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;
};

/***
 *
 * @param {Color} other
 * @returns {number}
 */
Color.prototype.getContrastWith = function (other) {
  var lum1 = this.getLuminance();
  var lum2 = other.getLuminance();
  var brightest = Math.max(lum1, lum2);
  var darkest = Math.min(lum1, lum2);
  return (brightest + 0.05) / (darkest + 0.05);
};

/***
 *
 * @returns {Color}
 */
Color.prototype.getContrastYIQ = function () {
  var r = this.rgba[0] * 255;
  var g = this.rgba[1] * 255;
  var b = this.rgba[2] * 255;
  var yiq = (r * 299 + g * 587 + b * 114) / 1000;
  return yiq >= 128 ? new Color([0, 0, 0, 1]) : new Color([1, 1, 1, 1]);
};

/**
 *
 * @returns {Color}
 */
Color.prototype.clone = function () {
  return new Color(this.rgba.slice());
};

/**
 *
 *  ['rgba', 'rgba', 'rgba({{x[0]*255>>0}}, {{x[1]*255>>0}}, {{x[2]*255>>0}}, {{x[3]}})'],
 *     ['rgb', 'rgba', 'rgb({{x[0]*255>>0}}, {{x[1]*255>>0}}, {{x[2]*255>>0}})'],
 *     ['hsl', 'toHSLA()', 'hsl({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%)'],
 *     ['hsla', 'toHSLA()', 'hsla({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%, {{x[3]}})'],
 *     ['hsb', 'toHSBA()', 'hsb({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%)'],
 *     ['hsba', 'toHSBA()', 'hsba({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%, {{x[3]}})'],
 *     ['hex3', 'toHex3()', '#{{x}}'],
 *     ['hex4', 'toHex4()', '#{{x}}'],
 *     ['hex6', 'toHex6()', '#{{x}}'],
 *     ['hex6', 'toHex8()', '#{{x}}'],
 *     ['hwb', 'toHWBA()', 'hwb({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%)'],
 *     ['hwba', 'toHWBA()', 'hwba({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%, {{x[3]}})']
 *     ['cmyk', 'toCMYK()', 'hwba({{x[0] * 100%}}, {{x[1] * 100}}%, {{x[2] * 100}}%)']
 */
/****
 *
 * @param {"rgba"|"rgb"|"hsl"|"hsla"|"hsb"|"hsba"|"hex3"|"hex4"|"hex6"|"hex6"|hex8|"hwb"|"hwba"} mode
 * @returns {string}
 */
Color.prototype.toString = function (mode) {
  mode = mode || 'rgba';
  mode = mode.toLocaleLowerCase();
  return Color.templates[mode](this);
};

/***
 *
 * @param notStandard
 * @param {number[]} hsbWeight
 * @returns {Color}
 */
Color.prototype.nearestNamedColor = function (notStandard, hsbWeight) {
  hsbWeight = hsbWeight || [5, 3, 1];
  var hsba = this.toHSBA();
  var bestMatch = null;
  var dist = 1000;
  Object.keys(Color.namedColors).concat(notStandard ? Object.keys(Color.nonStandarNamedColors) : []).forEach(function (name) {
    var c = Color.parse(Color.namedColors[name] || Color.nonStandarNamedColors[name]);
    var cHSBA = c.toHSBA();
    var cDist = Math.abs(hsba[0] - cHSBA[0]) * hsbWeight[0] + Math.abs(hsba[1] - cHSBA[1]) * hsbWeight[1] + Math.abs(hsba[2] - cHSBA[2]) * hsbWeight[2];
    if (cDist < dist) {
      dist = cDist;
      bestMatch = name;
    }
  });
  return bestMatch;
};
Color.templates = [['rgba', 'rgba', 'rgba({{x[0]*255>>0}}, {{x[1]*255>>0}}, {{x[2]*255>>0}}, {{x[3]}})'], ['rgb', 'rgba', 'rgb({{x[0]*255>>0}}, {{x[1]*255>>0}}, {{x[2]*255>>0}})'], ['hsl', 'toHSLA()', 'hsl({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%)'], ['hsla', 'toHSLA()', 'hsla({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%, {{x[3]}})'], ['hsb', 'toHSBA()', 'hsb({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%)'], ['hsba', 'toHSBA()', 'hsba({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%, {{x[3]}})'], ['hex3', 'toHex3()', '#{{x}}'], ['hex4', 'toHex4()', '#{{x}}'], ['hex6', 'toHex6()', '#{{x}}'], ['hex8', 'toHex8()', '#{{x}}'], ['hwb', 'toHWBA()', 'hwb({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%)'], ['hwba', 'toHWBA()', 'hwba({{x[0] * 360}}, {{x[1] * 100}}%, {{x[2] * 100}}%, {{x[3]}})'], ['cmyk', 'toCMYK()', 'cmyk({{x[0] * 100}}%, {{x[1] * 100}}%, {{x[2] * 100}}%)']].reduce(function (ac, cr) {
  ac[cr[0]] = new Function('color', ['var x = color.' + cr[1] + ';', 'return ' + _TemplateString["default"].parse(cr[2]).toJSCode() + ';'].join('\n'));
  return ac;
}, {});
Color.regexes = {
  whiteSpace: /\s*/,
  // Match zero or more whitespace characters.
  integer: /(\d{1,3})/,
  // Match integers: 79, 255, etc.
  decimal: /((?:\d+(?:\.\d+)?)|(?:\.\d+))/,
  // Match 129.6, 79, .9, etc.
  percent: /((?:\d+(?:\.\d+)?)|(?:\.\d+))%/,
  // Match 12.9%, 79%, .9%, etc.
  hex3: /^#([a-f0-9])([a-f0-9])([a-f0-9])$/i,
  // Match colors in format #XXXX, e.g. #5123.
  hex4: /^#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])$/i,
  // Match colors in format #XXXXXX, e.g. #b4d455.
  hex6: /^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,
  // Match colors in format #XXXXXXXX, e.g. #b4d45535.
  hex8: /^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i
};
Color.regexes.percent = new RegExp(Color.regexes.decimal.source + '%');
Color.regexes.rgb = new RegExp(['^rgb\\(', Color.regexes.integer.source, ',', Color.regexes.integer.source, ',', Color.regexes.integer.source, '\\)$'].join(Color.regexes.whiteSpace.source), 'i');
Color.regexes.rgbPercent = new RegExp(['^rgb\\(', Color.regexes.percent.source, ',', Color.regexes.percent.source, ',', Color.regexes.percent.source, '\\)$'].join(Color.regexes.whiteSpace.source), 'i');

// Match colors in format rgb(R, G, B, A), e.g. rgb(255, 0, 128, 0.25).
Color.regexes.rgba = new RegExp(['^rgba\\(', Color.regexes.integer.source, ',', Color.regexes.integer.source, ',', Color.regexes.integer.source, ',', Color.regexes.decimal.source, '\\)$'].join(Color.regexes.whiteSpace.source), 'i');

// Match colors in format rgb(R%, G%, B%, A), e.g. rgb(100%, 0%, 28.9%, 0.5).
Color.regexes.rgbaPercent = new RegExp(['^rgba\\(', Color.regexes.percent.source, ',', Color.regexes.percent.source, ',', Color.regexes.percent.source, ',', Color.regexes.decimal.source, '\\)$'].join(Color.regexes.whiteSpace.source), 'i');
// Match colors in format hsla(H, S%, L%), e.g. hsl(100, 40%, 28.9%).
Color.regexes.hsl = new RegExp(['^hsl\\(', Color.regexes.integer.source, '[deg]*', ',', Color.regexes.percent.source, ',', Color.regexes.percent.source, '\\)$'].join(Color.regexes.whiteSpace.source), 'i');

// Match colors in format hsla(H, S%, L%, A), e.g. hsla(100, 40%, 28.9%, 0.5).
Color.regexes.hsla = new RegExp(['^hsla\\(', Color.regexes.integer.source, '[deg]*', ',', Color.regexes.percent.source, ',', Color.regexes.percent.source, ',', Color.regexes.decimal.source, '\\)$'].join(Color.regexes.whiteSpace.source), 'i');

// Match colors in format hsb(H, S%, B%), e.g. hsb(100, 40%, 28.9%).
Color.regexes.hsb = new RegExp(['^hsb\\(', Color.regexes.integer.source, '[deg]*', ',', Color.regexes.percent.source, ',', Color.regexes.percent.source, '\\)$'].join(Color.regexes.whiteSpace.source), 'i');

// Match colors in format hsba(H, S%, B%, A), e.g. hsba(100, 40%, 28.9%, 0.5).
Color.regexes.hsba = new RegExp(['^hsba\\(', Color.regexes.integer.source, '[deg]*', ',', Color.regexes.percent.source, ',', Color.regexes.percent.source, ',', Color.regexes.decimal.source, '\\)$'].join(Color.regexes.whiteSpace.source), 'i');
Color.regexes.hwb = new RegExp(['^hwb\\(', Color.regexes.integer.source, '[deg]*', ',', Color.regexes.percent.source, ',', Color.regexes.percent.source, '\\)$'].join(Color.regexes.whiteSpace.source), 'i');

// Match colors in format hsba(H, S%, B%, A), e.g. hsba(100, 40%, 28.9%, 0.5).
Color.regexes.hwba = new RegExp(['^hwba\\(', Color.regexes.integer.source, '[deg]*', ',', Color.regexes.percent.source, ',', Color.regexes.percent.source, ',', Color.regexes.decimal.source, '\\)$'].join(Color.regexes.whiteSpace.source), 'i');
Color.regexes.cmyk = new RegExp(['^cmyk\\(', Color.regexes.percent.source, ',', Color.regexes.percent.source, ',', Color.regexes.percent.source, ',', Color.regexes.percent.source, '\\)$'].join(Color.regexes.whiteSpace.source), 'i');

/***
 *
 * @param {number} code
 * @param {32|24|16|8} bits
 * @returns {Color}
 */
Color.fromInt = function (code, bits) {
  var r, g, b, a;
  if (bits == 32) {
    b = (code & 0xff) / 255;
    g = ((code & 0xff00) >> 8) / 255;
    r = ((code & 0xff0000) >> 16) / 255;
    a = (code >> 24) / 255;
  } else if (bits == 24) {
    b = (code & 0xff) / 255;
    g = ((code & 0xff00) >> 8) / 255;
    r = ((code & 0xff0000) >> 16) / 255;
    a = 1;
  } else if (bits == 16) {
    b = (code & 0x1f) / 0x1f;
    g = ((code & 0x7e0) >> 5) / 0x3f;
    b = (code >> 10) / 0x1f;
    a = 1;
  } else if (bits == 8) {
    //gray-scale
    b = (code & 0x3) / 0x3;
    g = ((code & 0x1c) >> 2) / 0x7;
    b = (code >> 5) / 0x7;
    a = 1;
  }
  return new Color([r, g, b, a]);
};

/**
 *
 * @param {number} r
 * @param {number} g
 * @param {number} b
 * @returns {Color}
 */
Color.fromRGB = function (r, g, b) {
  return new Color([r, g, b, 1]);
};

/**
 *
 * @param {number} r
 * @param {number} g
 * @param {number} b
 * @param {number} a
 * @returns {Color}
 */
Color.fromRGBA = function (r, g, b, a) {
  return new Color([r, g, b, a]);
};

/***
 *
 * @param {number} h
 * @param {number} s
 * @param {number} l
 * @returns {Color}
 */
Color.fromHSL = function (h, s, l) {
  var rgba = this.hslaToRGBA([h, s, l, 1]);
  return new Color(rgba);
};

/***
 *
 * @param {number} h
 * @param {number} s
 * @param {number} l
 * @param {number} a
 * @returns {Color}
 */
Color.fromHSLA = function (h, s, l, a) {
  var rgba = this.hslaToRGBA([h, s, l, a]);
  return new Color(rgba);
};

/***
 *
 * @param {number} h
 * @param {number} s
 * @param {number} b
 * @returns {Color}
 */
Color.fromHSB = function (h, s, b) {
  var rgba = this.hsbaToRGBA([h, s, b, 1]);
  return new Color(rgba);
};

/***
 *
 * @param {number} h
 * @param {number} s
 * @param {number} b
 * @param {number} a
 * @returns {Color}
 */
Color.fromHSBA = function (h, s, b, a) {
  var rgba = this.hsbaToRGBA([h, s, b, a]);
  return new Color(rgba);
};

/***
 *
 * @param {number} h
 * @param {number} s
 * @param {number} b
 * @returns {Color}
 */
Color.fromHWB = function (h, s, b) {
  var rgba = this.hwbaToRGBA([h, s, b, 1]);
  return new Color(rgba);
};

/***
 *
 * @param {number} h
 * @param {number} s
 * @param {number} b
 * @param {number} a
 * @returns {Color}
 */
Color.fromHWBA = function (h, s, b, a) {
  var rgba = this.hwbaToRGBA([h, s, b, a]);
  return new Color(rgba);
};
Color.fromCMYK = function (c, m, y, k) {
  var rgba = this.cmykToRGB([c, m, y, k]).concat([0]);
  return new Color(rgba);
};

/**
 * @param {String} text
 * @returns {Color}
 */
Color.parse = function (text) {
  if (this.namedColors[text]) text = this.namedColors[text];
  if (this.nonStandarNamedColors[text]) text = this.nonStandarNamedColors[text];
  if (this.regexes.hex8.test(text)) {
    return this.fromRGBA.apply(this, this.regexes.hex8.exec(text).slice(1).map(function (v) {
      return parseInt(v, 16) / 255;
    }));
  } else if (this.regexes.hex6.test(text)) {
    return this.fromRGB.apply(this, this.regexes.hex6.exec(text).slice(1).map(function (v) {
      return parseInt(v, 16) / 255;
    }));
  } else if (this.regexes.hex4.test(text)) {
    return this.fromRGBA.apply(this, this.regexes.hex4.exec(text).slice(1).map(function (v) {
      return parseInt(v + v, 16) / 255;
    }));
  } else if (this.regexes.hex3.test(text)) {
    return this.fromRGB.apply(this, this.regexes.hex3.exec(text).slice(1).map(function (v) {
      return parseInt(v + v, 16) / 255;
    }));
  } else if (this.regexes.rgba.test(text)) {
    return this.fromRGBA.apply(this, this.regexes.rgba.exec(text).slice(1).map(function (v, i) {
      return i < 3 ? parseFloat(v) / 255 : parseFloat(v);
    }));
  } else if (this.regexes.rgb.test(text)) {
    return this.fromRGB.apply(this, this.regexes.rgb.exec(text).slice(1).map(function (v, i) {
      return parseFloat(v) / 255;
    }));
  } else if (this.regexes.rgbPercent.test(text)) {
    return this.fromRGB.apply(this, this.regexes.rgbPercent.exec(text).slice(1).map(function (v, i) {
      return parseFloat(v) / 100;
    }));
  } else if (this.regexes.rgbaPercent.test(text)) {
    return this.fromRGBA.apply(this, this.regexes.rgbaPercent.exec(text).slice(1).map(function (v, i) {
      return parseFloat(v) / (i < 3 ? 100 : 1);
    }));
  } else if (this.regexes.hsl.test(text)) {
    return this.fromHSL.apply(this, this.regexes.hsl.exec(text).slice(1).map(function (v, i) {
      return parseFloat(v) / (i == 0 ? 360 : 100);
    }));
  } else if (this.regexes.hsla.test(text)) {
    return this.fromHSLA.apply(this, this.regexes.hsla.exec(text).slice(1).map(function (v, i) {
      return parseFloat(v) / (i == 0 ? 360 : i < 3 ? 100 : 1);
    }));
  } else if (this.regexes.hsb.test(text)) {
    return this.fromHSB.apply(this, this.regexes.hsb.exec(text).slice(1).map(function (v, i) {
      return parseFloat(v) / (i == 0 ? 360 : 100);
    }));
  } else if (this.regexes.hsba.test(text)) {
    return this.fromHSBA.apply(this, this.regexes.hsba.exec(text).slice(1).map(function (v, i) {
      return parseFloat(v) / (i == 0 ? 360 : i < 3 ? 100 : 1);
    }));
  } else if (this.regexes.hwb.test(text)) {
    return this.fromHWB.apply(this, this.regexes.hwb.exec(text).slice(1).map(function (v, i) {
      return parseFloat(v) / (i == 0 ? 360 : 100);
    }));
  } else if (this.regexes.hwba.test(text)) {
    return this.fromHWBA.apply(this, this.regexes.hwba.exec(text).slice(1).map(function (v, i) {
      return parseFloat(v) / (i == 0 ? 360 : i < 3 ? 100 : 1);
    }));
  } else if (this.regexes.cmyk.test(text)) {
    return this.fromCMYK.apply(this, this.regexes.cmyk.exec(text).slice(1).map(function (v, i) {
      return parseFloat(v) / 100;
    }));
  } else {
    throw new Error("Fail to parse " + text);
  }
};

/***
 * @typedef {"aliceblue"|"antiquewhite"|"aqua"|"aquamarine"|"azure"|"beige"|"bisque"|"black"|"blanchedalmond"|"blue"|"blueviolet"|"brown"|"burlywood"|"cadetblue"|"chartreuse"|"chocolate"|"coral"|"cornflowerblue"|"cornsilk"|"crimson"|"cyan"|"darkblue"|"darkcyan"|"darkgoldenrod"|"darkgray"|"darkgreen"|"darkgrey"|"darkkhaki"|"darkmagenta"|"darkolivegreen"|"darkorange"|"darkorchid"|"darkred"|"darksalmon"|"darkseagreen"|"darkslateblue"|"darkslategray"|"darkslategrey"|"darkturquoise"|"darkviolet"|"deeppink"|"deepskyblue"|"dimgray"|"dimgrey"|"dodgerblue"|"firebrick"|"floralwhite"|"forestgreen"|"fuchsia"|"gainsboro"|"ghostwhite"|"gold"|"goldenrod"|"gray"|"green"|"greenyellow"|"grey"|"honeydew"|"hotpink"|"indianred"|"indigo"|"ivory"|"khaki"|"lavender"|"lavenderblush"|"lawngreen"|"lemonchiffon"|"lightblue"|"lightcoral"|"lightcyan"|"lightgoldenrodyellow"|"lightgray"|"lightgreen"|"lightgrey"|"lightpink"|"lightsalmon"|"lightseagreen"|"lightskyblue"|"lightslategray"|"lightslategrey"|"lightsteelblue"|"lightyellow"|"lime"|"limegreen"|"linen"|"magenta"|"maroon"|"mediumaquamarine"|"mediumblue"|"mediumorchid"|"mediumpurple"|"mediumseagreen"|"mediumslateblue"|"mediumspringgreen"|"mediumturquoise"|"mediumvioletred"|"midnightblue"|"mintcream"|"mistyrose"|"moccasin"|"navajowhite"|"navy"|"oldlace"|"olive"|"olivedrab"|"orange"|"orangered"|"orchid"|"palegoldenrod"|"palegreen"|"paleturquoise"|"palevioletred"|"papayawhip"|"peachpuff"|"peru"|"pink"|"plum"|"powderblue"|"purple"|"red"|"rosybrown"|"royalblue"|"saddlebrown"|"salmon"|"sandybrown"|"seagreen"|"seashell"|"sienna"|"silver"|"skyblue"|"slateblue"|"slategray"|"slategrey"|"snow"|"springgreen"|"steelblue"|"tan"|"teal"|"thistle"|"tomato"|"turquoise"|"violet"|"wheat"|"white"|"whitesmoke"|"yellow"|"yellowgreen"|"transparent"} NamedColor
 */

Color.namedColors = {
  aliceblue: '#f0f8ff',
  antiquewhite: '#faebd7',
  aqua: '#00ffff',
  aquamarine: '#7fffd4',
  azure: '#f0ffff',
  beige: '#f5f5dc',
  bisque: '#ffe4c4',
  black: '#000000',
  blanchedalmond: '#ffebcd',
  blue: '#0000ff',
  blueviolet: '#8a2be2',
  brown: '#a52a2a',
  burlywood: '#deb887',
  cadetblue: '#5f9ea0',
  chartreuse: '#7fff00',
  chocolate: '#d2691e',
  coral: '#ff7f50',
  cornflowerblue: '#6495ed',
  cornsilk: '#fff8dc',
  crimson: '#dc143c',
  cyan: '#00ffff',
  darkblue: '#00008b',
  darkcyan: '#008b8b',
  darkgoldenrod: '#b8860b',
  darkgray: '#a9a9a9',
  darkgreen: '#006400',
  darkgrey: '#a9a9a9',
  darkkhaki: '#bdb76b',
  darkmagenta: '#8b008b',
  darkolivegreen: '#556b2f',
  darkorange: '#ff8c00',
  darkorchid: '#9932cc',
  darkred: '#8b0000',
  darksalmon: '#e9967a',
  darkseagreen: '#8fbc8f',
  darkslateblue: '#483d8b',
  darkslategray: '#2f4f4f',
  darkslategrey: '#2f4f4f',
  darkturquoise: '#00ced1',
  darkviolet: '#9400d3',
  deeppink: '#ff1493',
  deepskyblue: '#00bfff',
  dimgray: '#696969',
  dimgrey: '#696969',
  dodgerblue: '#1e90ff',
  firebrick: '#b22222',
  floralwhite: '#fffaf0',
  forestgreen: '#228b22',
  fuchsia: '#ff00ff',
  gainsboro: '#dcdcdc',
  ghostwhite: '#f8f8ff',
  gold: '#ffd700',
  goldenrod: '#daa520',
  gray: '#808080',
  green: '#008000',
  greenyellow: '#adff2f',
  grey: '#808080',
  honeydew: '#f0fff0',
  hotpink: '#ff69b4',
  indianred: '#cd5c5c',
  indigo: '#4b0082',
  ivory: '#fffff0',
  khaki: '#f0e68c',
  lavender: '#e6e6fa',
  lavenderblush: '#fff0f5',
  lawngreen: '#7cfc00',
  lemonchiffon: '#fffacd',
  lightblue: '#add8e6',
  lightcoral: '#f08080',
  lightcyan: '#e0ffff',
  lightgoldenrodyellow: '#fafad2',
  lightgray: '#d3d3d3',
  lightgreen: '#90ee90',
  lightgrey: '#d3d3d3',
  lightpink: '#ffb6c1',
  lightsalmon: '#ffa07a',
  lightseagreen: '#20b2aa',
  lightskyblue: '#87cefa',
  lightslategray: '#778899',
  lightslategrey: '#778899',
  lightsteelblue: '#b0c4de',
  lightyellow: '#ffffe0',
  lime: '#00ff00',
  limegreen: '#32cd32',
  linen: '#faf0e6',
  magenta: '#ff00ff',
  maroon: '#800000',
  mediumaquamarine: '#66cdaa',
  mediumblue: '#0000cd',
  mediumorchid: '#ba55d3',
  mediumpurple: '#9370db',
  mediumseagreen: '#3cb371',
  mediumslateblue: '#7b68ee',
  mediumspringgreen: '#00fa9a',
  mediumturquoise: '#48d1cc',
  mediumvioletred: '#c71585',
  midnightblue: '#191970',
  mintcream: '#f5fffa',
  mistyrose: '#ffe4e1',
  moccasin: '#ffe4b5',
  navajowhite: '#ffdead',
  navy: '#000080',
  oldlace: '#fdf5e6',
  olive: '#808000',
  olivedrab: '#6b8e23',
  orange: '#ffa500',
  orangered: '#ff4500',
  orchid: '#da70d6',
  palegoldenrod: '#eee8aa',
  palegreen: '#98fb98',
  paleturquoise: '#afeeee',
  palevioletred: '#db7093',
  papayawhip: '#ffefd5',
  peachpuff: '#ffdab9',
  peru: '#cd853f',
  pink: '#ffc0cb',
  plum: '#dda0dd',
  powderblue: '#b0e0e6',
  purple: '#800080',
  red: '#ff0000',
  rosybrown: '#bc8f8f',
  royalblue: '#4169e1',
  saddlebrown: '#8b4513',
  salmon: '#fa8072',
  sandybrown: '#f4a460',
  seagreen: '#2e8b57',
  seashell: '#fff5ee',
  sienna: '#a0522d',
  silver: '#c0c0c0',
  skyblue: '#87ceeb',
  slateblue: '#6a5acd',
  slategray: '#708090',
  slategrey: '#708090',
  snow: '#fffafa',
  springgreen: '#00ff7f',
  steelblue: '#4682b4',
  tan: '#d2b48c',
  teal: '#008080',
  thistle: '#d8bfd8',
  tomato: '#ff6347',
  turquoise: '#40e0d0',
  violet: '#ee82ee',
  wheat: '#f5deb3',
  white: '#ffffff',
  whitesmoke: '#f5f5f5',
  yellow: '#ffff00',
  yellowgreen: '#9acd32',
  transparent: '#00000000'
};
Color.nonStandarNamedColors = {
  night: '#0C090A',
  gunmetal: '#2C3539',
  midnight: '#2B1B17',
  charcoal: '#34282C',
  oil: '#3B3131',
  blackcat: '#413839',
  iridium: '#3D3C3A',
  blackeel: '#463E3F',
  blackcow: '#4C4646',
  graywolf: '#504A4B',
  vampiregray: '#565051',
  graydolphin: '#5C5858',
  carbongray: '#625D5D',
  ashgray: '#666362',
  cloudygray: '#6D6968',
  smokeygray: '#726E6D',
  granite: '#837E7C',
  battleshipgray: '#848482',
  graycloud: '#B6B6B4',
  graygoose: '#D1D0CE',
  platinum: '#E5E4E2',
  metallicsilver: '#BCC6CC',
  bluegray: '#98AFC7',
  raven: '#657383',
  jetgray: '#616D7E',
  mistblue: '#646D7E',
  marbleblue: '#566D7E',
  shipcove: '#737CA1',
  mariner: '#4863A0',
  bluejay: '#2B547E',
  biscay: '#2B3856',
  navyblue: '#000080',
  bluewhale: '#342D7E',
  lapisblue: '#15317E',
  denimdarkblue: '#151B8D',
  earthblue: '#0000A0',
  cobaltblue: '#0020C2',
  blueberryblue: '#0041C2',
  sapphireblue: '#2554C7',
  blueeyes: '#1569C7',
  blueorchid: '#1F45FC',
  bluelotus: '#6960EC',
  lightslateblue: '#736AFF',
  windowsblue: '#357EC7',
  glacialblueice: '#368BC1',
  silkblue: '#488AC7',
  blueivy: '#3090C7',
  bluekoi: '#659EC7',
  columbiablue: '#87AFC7',
  babyblue: '#95B9C7',
  oceanblue: '#2B65EC',
  blueribbon: '#306EFF',
  bluedress: '#157DEC',
  butterflyblue: '#38ACEC',
  iceberg: '#56A5EC',
  crystalblue: '#5CB3FF',
  denimblue: '#79BAEC',
  dayskyblue: '#82CAFF',
  jeansblue: '#A0CFEC',
  blueangel: '#B7CEEC',
  pastelblue: '#B4CFEC',
  seablue: '#C2DFFF',
  coralblue: '#AFDCEC',
  robineggblue: '#BDEDFF',
  palebluelily: '#CFECEC',
  water: '#EBF4FA',
  lightslate: '#CCFFFF',
  lightaquamarine: '#93FFE8',
  electricblue: '#9AFEFF',
  cyanoraqua: '#00FFFF',
  tronblue: '#7DFDFE',
  bluezircon: '#57FEFF',
  bluelagoon: '#8EEBEC',
  celeste: '#50EBEC',
  bluediamond: '#4EE2EC',
  tiffanyblue: '#81D8D0',
  cyanopaque: '#92C7C7',
  bluehosta: '#77BFC7',
  northernlightsblue: '#78C7C7',
  jellyfish: '#46C7C7',
  bluegreen: '#7BCCB5',
  macawbluegreen: '#43BFC7',
  seaturtlegreen: '#438D80',
  greenishblue: '#307D7E',
  grayishturquoise: '#5E7D7E',
  beetlegreen: '#4C787E',
  camouflagegreen: '#78866B',
  sagegreen: '#848b79',
  hazelgreen: '#617C58',
  venomgreen: '#728C00',
  ferngreen: '#667C26',
  darkforestgreen: '#254117',
  mediumforestgreen: '#347235',
  seaweedgreen: '#437C17',
  pinegreen: '#387C44',
  junglegreen: '#347C2C',
  shamrockgreen: '#347C17',
  greenonion: '#6AA121',
  clovergreen: '#3EA055',
  greensnake: '#6CBB3C',
  aliengreen: '#6CC417',
  greenapple: '#4CC417',
  kellygreen: '#4CC552',
  zombiegreen: '#54C571',
  froggreen: '#99C68E',
  greenpeas: '#89C35C',
  dollarbillgreen: '#85BB65',
  iguanagreen: '#9CB071',
  avocadogreen: '#B2C248',
  pistachiogreen: '#9DC209',
  saladgreen: '#A1C935',
  hummingbirdgreen: '#7FE817',
  nebulagreen: '#59E817',
  stoplightgogreen: '#57E964',
  algaegreen: '#64E986',
  jadegreen: '#5EFB6E',
  emeraldgreen: '#5FFB17',
  dragongreen: '#6AFB92',
  mintgreen: '#98FF98',
  greenthumb: '#B5EAAA',
  lightjade: '#C3FDB8',
  teagreen: '#CCFB5D',
  slimegreen: '#BCE954',
  harvestgold: '#EDE275',
  sunyellow: '#FFE87C',
  cornyellow: '#FFF380',
  parchment: '#FFFFC2',
  cream: '#FFFFCC',
  blonde: '#FBF6D9',
  champagne: '#F7E7CE',
  vanilla: '#F3E5AB',
  tanbrown: '#ECE5B6',
  peach: '#FFE5B4',
  mustard: '#FFDB58',
  rubberduckyyellow: '#FFD801',
  brightgold: '#FDD017',
  goldenbrown: '#EAC117',
  macaroniandcheese: '#F2BB66',
  saffron: '#FBB917',
  beer: '#FBB117',
  cantaloupe: '#FFA62F',
  beeyellow: '#E9AB17',
  brownsugar: '#E2A76F',
  deeppeach: '#FFCBA4',
  gingerbrown: '#C9BE62',
  schoolbusyellow: '#E8A317',
  fallleafbrown: '#C8B560',
  orangegold: '#D4A017',
  sand: '#C2B280',
  cookiebrown: '#C7A317',
  caramel: '#C68E17',
  brass: '#B5A642',
  camelbrown: '#C19A6B',
  bronze: '#CD7F32',
  tigerorange: '#C88141',
  cinnamon: '#C58917',
  bulletshell: '#AF9B60',
  copper: '#B87333',
  wood: '#966F33',
  oakbrown: '#806517',
  armybrown: '#827B60',
  sandstone: '#786D5F',
  mocha: '#493D26',
  taupe: '#483C32',
  coffee: '#6F4E37',
  brownbear: '#835C3B',
  reddirt: '#7F5217',
  sepia: '#7F462C',
  orangesalmon: '#C47451',
  rust: '#C36241',
  redfox: '#C35817',
  sedona: '#CC6600',
  papayaorange: '#E56717',
  halloweenorange: '#E66C2C',
  pumpkinorange: '#F87217',
  constructionconeorange: '#F87431',
  sunriseorange: '#E67451',
  mangoorange: '#FF8040',
  basketballorange: '#F88158',
  tangerine: '#E78A61',
  beanred: '#F75D59',
  valentinered: '#E55451',
  shockingorange: '#E55B3C',
  scarlet: '#FF2400',
  rubyred: '#F62217',
  ferrarired: '#F70D1A',
  fireenginered: '#F62817',
  lavared: '#E42217',
  lovered: '#E41B17',
  grapefruit: '#DC381F',
  chestnutred: '#C34A2C',
  cherryred: '#C24641',
  mahogany: '#C04000',
  chillipepper: '#C11B17',
  cranberry: '#9F000F',
  redwine: '#990012',
  burgundy: '#8C001A',
  chestnut: '#954535',
  bloodred: '#7E3517',
  sangria: '#7E3817',
  plumpie: '#7D0541',
  velvetmaroon: '#7E354D',
  plumvelvet: '#7D0552',
  rosyfinch: '#7F4E52',
  puce: '#7F5A58',
  dullpurple: '#7F525D',
  khakirose: '#C5908E',
  pinkbow: '#C48189',
  lipstickpink: '#C48793',
  rose: '#E8ADAA',
  rosegold: '#ECC5C0',
  desertsand: '#EDC9AF',
  pigpink: '#FDD7E4',
  cottoncandy: '#FCDFFF',
  pinkbubblegum: '#FFDFDD',
  flamingopink: '#F9A7B0',
  pinkrose: '#E7A1B0',
  pinkdaisy: '#E799A3',
  cadillacpink: '#E38AAE',
  carnationpink: '#F778A1',
  blushred: '#E56E94',
  watermelonpink: '#FC6C85',
  violetred: '#F6358A',
  pinkcupcake: '#E45E9D',
  pinklemonade: '#E4287C',
  neonpink: '#F535AA',
  dimorphothecamagenta: '#E3319D',
  brightneonpink: '#F433FF',
  tulippink: '#C25A7C',
  roguepink: '#C12869',
  burntpink: '#C12267',
  bashfulpink: '#C25283',
  darkcarnationpink: '#C12283',
  violapurple: '#7E587E',
  purpleiris: '#571B7E',
  plumpurple: '#583759',
  purplemonster: '#461B7E',
  purplehaze: '#4E387E',
  eggplant: '#614051',
  grape: '#5E5A80',
  purplejam: '#6A287E',
  purpleflower: '#A74AC7',
  purpleamethyst: '#6C2DC7',
  purplesagebush: '#7A5DC7',
  lovelypurple: '#7F38EC',
  aztechpurple: '#893BFF',
  jasminepurple: '#A23BEC',
  purpledaffodil: '#B041FF',
  tyrianpurple: '#C45AEC',
  crocuspurple: '#9172EC',
  purplemimosa: '#9E7BFF',
  heliotropepurple: '#D462FF',
  purpledragon: '#C38EC7',
  lilac: '#C8A2C8',
  blushpink: '#E6A9EC',
  mauve: '#E0B0FF',
  wisteriapurple: '#C6AEC7',
  blossompink: '#F9B7FF',
  periwinkle: '#E9CFEC',
  lavenderpinocchio: '#EBDDE2',
  lavenderblue: '#E3E4FA',
  pearl: '#FDEEF4',
  milkwhite: '#FEFCFF'
};

/********************** COLOR CONVERTER *******************/

Color.rgbToHex = function (rgb) {
  return '#' + rgb.slice(0, 3).map(function (c) {
    var res = (c * 255 >> 0).toString(16);
    if (res < 10) res = '0' + res;
    return res.toUpperCase();
  }).join('');
};
Color.rgbaToHex = function (rgb) {
  return '#' + rgb.map(function (c) {
    var res = (c * 255 >> 0).toString(16);
    if (res < 10) res = '0' + res;
    return res.toUpperCase();
  }).join('');
};
Color.hsbaToText = function (hsba) {
  return 'hsba(' + (hsba[0] * 360 >> 0) + 'deg, ' + (hsba[1] * 100 >> 0) + '%, ' + (hsba[2] * 100 >> 0) + '%, ' + hsba[3].toFixed(3) + ')';
};
Color.hslaToText = function (hsla) {
  return 'hsla(' + (hsla[0] * 360 >> 0) + 'deg, ' + (hsla[1] * 100 >> 0) + '%, ' + (hsla[2] * 100 >> 0) + '%, ' + hsla[3].toFixed(3) + ')';
};
Color.rgbaToText = function (rgba) {
  return 'rgba(' + (rgba[0] * 255 >> 0) + ', ' + (rgba[1] * 255 >> 0) + ', ' + (rgba[2] * 255 >> 0) + ', ' + rgba[3].toFixed(3) + ')';
};
Color.hsbToText = function (hsba) {
  return 'hsb(' + (hsba[0] * 360 >> 0) + 'deg, ' + (hsba[1] * 100 >> 0) + '%, ' + (hsba[2] * 100 >> 0) + '%)';
};
Color.hslToText = function (hsl) {
  return 'hsl(' + (hsl[0] * 360 >> 0) + 'deg, ' + (hsl[1] * 100 >> 0) + '%, ' + (hsl[2] * 100 >> 0) + '%)';
};
Color.rgbToText = function (rgba) {
  return 'rgb(' + (rgba[0] * 255 >> 0) + ', ' + (rgba[1] * 255 >> 0) + ', ' + (rgba[2] * 255 >> 0) + ')';
};
Color.cmykToText = function (cmyk) {
  return 'cmyk(' + cmyk.map(function (x) {
    return x * 100 + '%';
  }).join(', ') + ')';
};
Color.hsbaToHSLA = function (hsba) {
  var hue = hsba[0];
  var sat = hsba[1];
  var val = hsba[2];

  // Calculate lightness.
  var li = (2 - sat) * val / 2;

  // Convert saturation.
  if (li !== 0) {
    if (li === 1) {
      sat = 0;
    } else if (li < 0.5) {
      sat = sat / (2 - sat);
    } else {
      sat = sat * val / (2 - li * 2);
    }
  }

  // Hue and alpha stay the same.
  return [hue, sat, li, hsba[3]];
};
Color.hsbaToRGBA = function (hsba) {
  var hue = hsba[0] * 6; // We will split hue into 6 sectors.
  var sat = hsba[1];
  var val = hsba[2];
  var RGBA = [];
  if (sat === 0) {
    RGBA = [val, val, val, hsba[3]]; // Return early if grayscale.
  } else {
    var sector = Math.floor(hue);
    var tint1 = val * (1 - sat);
    var tint2 = val * (1 - sat * (hue - sector));
    var tint3 = val * (1 - sat * (1 + sector - hue));
    var red, green, blue;
    if (sector === 1) {
      // Yellow to green.
      red = tint2;
      green = val;
      blue = tint1;
    } else if (sector === 2) {
      // Green to cyan.
      red = tint1;
      green = val;
      blue = tint3;
    } else if (sector === 3) {
      // Cyan to blue.
      red = tint1;
      green = tint2;
      blue = val;
    } else if (sector === 4) {
      // Blue to magenta.
      red = tint3;
      green = tint1;
      blue = val;
    } else if (sector === 5) {
      // Magenta to red.
      red = val;
      green = tint1;
      blue = tint2;
    } else {
      // Red to yellow (sector could be 0 or 6).
      red = val;
      green = tint3;
      blue = tint1;
    }
    RGBA = [red, green, blue, hsba[3]];
  }
  return RGBA;
};
Color.hslaToHSBA = function (hsla) {
  var hue = hsla[0];
  var sat = hsla[1];
  var li = hsla[2];

  // Calculate brightness.
  var val;
  if (li < 0.5) {
    val = (1 + sat) * li;
  } else {
    val = li + sat - li * sat;
  }

  // Convert saturation.
  sat = 2 * (val - li) / val;

  // Hue and alpha stay the same.
  return [hue, sat, val, hsla[3]];
};
Color.hslaToRGBA = function (hsla) {
  var hue = hsla[0] * 6; // We will split hue into 6 sectors.
  var sat = hsla[1];
  var li = hsla[2];
  var RGBA = [];
  if (sat === 0) {
    RGBA = [li, li, li, hsla[3]]; // Return early if grayscale.
  } else {
    // Calculate brightness.
    var val;
    if (li < 0.5) {
      val = (1 + sat) * li;
    } else {
      val = li + sat - li * sat;
    }

    // Define zest.
    var zest = 2 * li - val;

    // Implement projection (project onto green by default).
    var hzvToRGB = function hzvToRGB(hue, zest, val) {
      if (hue < 0) {
        // Hue must wrap to allow projection onto red and blue.
        hue += 6;
      } else if (hue >= 6) {
        hue -= 6;
      }
      if (hue < 1) {
        // Red to yellow (increasing green).
        return zest + (val - zest) * hue;
      } else if (hue < 3) {
        // Yellow to cyan (greatest green).
        return val;
      } else if (hue < 4) {
        // Cyan to blue (decreasing green).
        return zest + (val - zest) * (4 - hue);
      } else {
        // Blue to red (least green).
        return zest;
      }
    };

    // Perform projections, offsetting hue as necessary.
    RGBA = [hzvToRGB(hue + 2, zest, val), hzvToRGB(hue, zest, val), hzvToRGB(hue - 2, zest, val), hsla[3]];
  }
  return RGBA;
};
Color.rgbaToHSBA = function (rgba) {
  var red = rgba[0];
  var green = rgba[1];
  var blue = rgba[2];
  var val = Math.max(red, green, blue);
  var chroma = val - Math.min(red, green, blue);
  var hue, sat;
  if (chroma === 0) {
    // Return early if grayscale.
    hue = 0;
    sat = 0;
  } else {
    sat = chroma / val;
    if (red === val) {
      // Magenta to yellow.
      hue = (green - blue) / chroma;
    } else if (green === val) {
      // Yellow to cyan.
      hue = 2 + (blue - red) / chroma;
    } else if (blue === val) {
      // Cyan to magenta.
      hue = 4 + (red - green) / chroma;
    }
    if (hue < 0) {
      // Confine hue to the interval [0, 1).
      hue += 6;
    } else if (hue >= 6) {
      hue -= 6;
    }
  }
  return [hue / 6, sat, val, rgba[3]];
};
Color.rgbaToHSLA = function (rgba) {
  var red = rgba[0];
  var green = rgba[1];
  var blue = rgba[2];
  var val = Math.max(red, green, blue);
  var min = Math.min(red, green, blue);
  var li = val + min; // We will halve this later.
  var chroma = val - min;
  var hue, sat;
  if (chroma === 0) {
    // Return early if grayscale.
    hue = 0;
    sat = 0;
  } else {
    if (li < 1) {
      sat = chroma / li;
    } else {
      sat = chroma / (2 - li);
    }
    if (red === val) {
      // Magenta to yellow.
      hue = (green - blue) / chroma;
    } else if (green === val) {
      // Yellow to cyan.
      hue = 2 + (blue - red) / chroma;
    } else if (blue === val) {
      // Cyan to magenta.
      hue = 4 + (red - green) / chroma;
    }
    if (hue < 0) {
      // Confine hue to the interval [0, 1).
      hue += 6;
    } else if (hue >= 6) {
      hue -= 6;
    }
  }
  return [hue / 6, sat, li / 2, rgba[3]];
};
Color.hwbaToHSBA = function (hwba) {
  return [hwba[0], 1 - hwba[1] / (1 - hwba[2]), 1 - hwba[2], hwba[3]];
};
Color.hsbaToHWBA = function (hsla) {
  return [hsla[0], (1 - hsla[1]) * hsla[2], 1 - hsla[2], hsla[3]];
};
Color.rgbaToHWBA = function (rgba) {
  return this.hsbaToHWBA(this.rgbaToHSBA(rgba));
};
Color.hwbaToRGBA = function (hwba) {
  return this.hsbaToRGBA(this.hwbaToHSBA(hwba));
};
Color.cmykToRGB = function (cmyk) {
  var c = cmyk[0];
  var m = cmyk[1];
  var y = cmyk[2];
  var k = cmyk[3];
  c = c * (1 - k) + k;
  m = m * (1 - k) + k;
  y = y * (1 - k) + k;
  var r = 1 - c;
  var g = 1 - m;
  var b = 1 - y;
  return [r, g, b];
};
Color.rgbToCMYK = function (rgb) {
  var r = rgb[0];
  var g = rgb[1];
  var b = rgb[2];
  var c = 1 - r;
  var m = 1 - g;
  var y = 1 - b;
  var k = Math.min(c, Math.min(m, y));
  c = (c - k) / (1 - k);
  m = (m - k) / (1 - k);
  y = (y - k) / (1 - k);
  c = isNaN(c) ? 0 : c;
  m = isNaN(m) ? 0 : m;
  y = isNaN(y) ? 0 : y;
  k = isNaN(k) ? 0 : k;
  return [c, m, y, k];
};
var _default = Color;
exports["default"] = _default;

/***/ }),

/***/ 28485:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function QR8bitByte(data) {
  this.mode = QRMode.MODE_8BIT_BYTE;
  this.data = data;
  this.parsedData = [];

  // Added to support UTF-8 Characters
  for (var i = 0, l = this.data.length; i < l; i++) {
    var byteArray = [];
    var code = this.data.charCodeAt(i);
    if (code > 0x10000) {
      byteArray[0] = 0xF0 | (code & 0x1C0000) >>> 18;
      byteArray[1] = 0x80 | (code & 0x3F000) >>> 12;
      byteArray[2] = 0x80 | (code & 0xFC0) >>> 6;
      byteArray[3] = 0x80 | code & 0x3F;
    } else if (code > 0x800) {
      byteArray[0] = 0xE0 | (code & 0xF000) >>> 12;
      byteArray[1] = 0x80 | (code & 0xFC0) >>> 6;
      byteArray[2] = 0x80 | code & 0x3F;
    } else if (code > 0x80) {
      byteArray[0] = 0xC0 | (code & 0x7C0) >>> 6;
      byteArray[1] = 0x80 | code & 0x3F;
    } else {
      byteArray[0] = code;
    }
    this.parsedData.push(byteArray);
  }
  this.parsedData = Array.prototype.concat.apply([], this.parsedData);
  if (this.parsedData.length !== this.data.length) {
    this.parsedData.unshift(191);
    this.parsedData.unshift(187);
    this.parsedData.unshift(239);
  }
}
QR8bitByte.prototype.getLength = function () {
  return this.parsedData.length;
};
QR8bitByte.prototype.write = function (buffer) {
  for (var i = 0, l = this.parsedData.length; i < l; i++) {
    buffer.put(this.parsedData[i], 8);
  }
};
function QRCodeModel(typeNumber, errorCorrectLevel) {
  this.typeNumber = typeNumber;
  this.errorCorrectLevel = errorCorrectLevel;
  this.modules = null;
  this.moduleCount = 0;
  this.dataCache = null;
  this.dataList = [];
}
QRCodeModel.prototype.addData = function (data) {
  var newData = new QR8bitByte(data);
  this.dataList.push(newData);
  this.dataCache = null;
};
QRCodeModel.prototype.isDark = function (row, col) {
  if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {
    throw new Error(row + "," + col);
  }
  return this.modules[row][col];
};
QRCodeModel.prototype.getModuleCount = function () {
  return this.moduleCount;
};
QRCodeModel.prototype.make = function () {
  this.makeImpl(false, this.getBestMaskPattern());
};
QRCodeModel.prototype.makeImpl = function (test, maskPattern) {
  this.moduleCount = this.typeNumber * 4 + 17;
  this.modules = new Array(this.moduleCount);
  for (var row = 0; row < this.moduleCount; row++) {
    this.modules[row] = new Array(this.moduleCount);
    for (var col = 0; col < this.moduleCount; col++) {
      this.modules[row][col] = null;
    }
  }
  this.setupPositionProbePattern(0, 0);
  this.setupPositionProbePattern(this.moduleCount - 7, 0);
  this.setupPositionProbePattern(0, this.moduleCount - 7);
  this.setupPositionAdjustPattern();
  this.setupTimingPattern();
  this.setupTypeInfo(test, maskPattern);
  if (this.typeNumber >= 7) {
    this.setupTypeNumber(test);
  }
  if (this.dataCache == null) {
    this.dataCache = QRCodeModel.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);
  }
  this.mapData(this.dataCache, maskPattern);
};
QRCodeModel.prototype.setupPositionProbePattern = function (row, col) {
  for (var r = -1; r <= 7; r++) {
    if (row + r <= -1 || this.moduleCount <= row + r) continue;
    for (var c = -1; c <= 7; c++) {
      if (col + c <= -1 || this.moduleCount <= col + c) continue;
      if (0 <= r && r <= 6 && (c == 0 || c == 6) || 0 <= c && c <= 6 && (r == 0 || r == 6) || 2 <= r && r <= 4 && 2 <= c && c <= 4) {
        this.modules[row + r][col + c] = true;
      } else {
        this.modules[row + r][col + c] = false;
      }
    }
  }
};
QRCodeModel.prototype.getBestMaskPattern = function () {
  var minLostPoint = 0;
  var pattern = 0;
  for (var i = 0; i < 8; i++) {
    this.makeImpl(true, i);
    var lostPoint = QRUtil.getLostPoint(this);
    if (i == 0 || minLostPoint > lostPoint) {
      minLostPoint = lostPoint;
      pattern = i;
    }
  }
  return pattern;
};
QRCodeModel.prototype.setupTimingPattern = function () {
  for (var r = 8; r < this.moduleCount - 8; r++) {
    if (this.modules[r][6] != null) {
      continue;
    }
    this.modules[r][6] = r % 2 == 0;
  }
  for (var c = 8; c < this.moduleCount - 8; c++) {
    if (this.modules[6][c] != null) {
      continue;
    }
    this.modules[6][c] = c % 2 == 0;
  }
};
QRCodeModel.prototype.setupPositionAdjustPattern = function () {
  var pos = QRUtil.getPatternPosition(this.typeNumber);
  for (var i = 0; i < pos.length; i++) {
    for (var j = 0; j < pos.length; j++) {
      var row = pos[i];
      var col = pos[j];
      if (this.modules[row][col] != null) {
        continue;
      }
      for (var r = -2; r <= 2; r++) {
        for (var c = -2; c <= 2; c++) {
          if (r == -2 || r == 2 || c == -2 || c == 2 || r == 0 && c == 0) {
            this.modules[row + r][col + c] = true;
          } else {
            this.modules[row + r][col + c] = false;
          }
        }
      }
    }
  }
};
QRCodeModel.prototype.setupTypeNumber = function (test) {
  var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
  for (var i = 0; i < 18; i++) {
    var mod = !test && (bits >> i & 1) == 1;
    this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
  }
  for (var i = 0; i < 18; i++) {
    var mod = !test && (bits >> i & 1) == 1;
    this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
  }
};
QRCodeModel.prototype.setupTypeInfo = function (test, maskPattern) {
  var data = this.errorCorrectLevel << 3 | maskPattern;
  var bits = QRUtil.getBCHTypeInfo(data);
  for (var i = 0; i < 15; i++) {
    var mod = !test && (bits >> i & 1) == 1;
    if (i < 6) {
      this.modules[i][8] = mod;
    } else if (i < 8) {
      this.modules[i + 1][8] = mod;
    } else {
      this.modules[this.moduleCount - 15 + i][8] = mod;
    }
  }
  for (var i = 0; i < 15; i++) {
    var mod = !test && (bits >> i & 1) == 1;
    if (i < 8) {
      this.modules[8][this.moduleCount - i - 1] = mod;
    } else if (i < 9) {
      this.modules[8][15 - i - 1 + 1] = mod;
    } else {
      this.modules[8][15 - i - 1] = mod;
    }
  }
  this.modules[this.moduleCount - 8][8] = !test;
};
QRCodeModel.prototype.mapData = function (data, maskPattern) {
  var inc = -1;
  var row = this.moduleCount - 1;
  var bitIndex = 7;
  var byteIndex = 0;
  for (var col = this.moduleCount - 1; col > 0; col -= 2) {
    if (col == 6) col--;
    while (true) {
      for (var c = 0; c < 2; c++) {
        if (this.modules[row][col - c] == null) {
          var dark = false;
          if (byteIndex < data.length) {
            dark = (data[byteIndex] >>> bitIndex & 1) == 1;
          }
          var mask = QRUtil.getMask(maskPattern, row, col - c);
          if (mask) {
            dark = !dark;
          }
          this.modules[row][col - c] = dark;
          bitIndex--;
          if (bitIndex == -1) {
            byteIndex++;
            bitIndex = 7;
          }
        }
      }
      row += inc;
      if (row < 0 || this.moduleCount <= row) {
        row -= inc;
        inc = -inc;
        break;
      }
    }
  }
};
QRCodeModel.PAD0 = 0xEC;
QRCodeModel.PAD1 = 0x11;
QRCodeModel.createData = function (typeNumber, errorCorrectLevel, dataList) {
  var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);
  var buffer = new QRBitBuffer();
  for (var i = 0; i < dataList.length; i++) {
    var data = dataList[i];
    buffer.put(data.mode, 4);
    buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
    data.write(buffer);
  }
  var totalDataCount = 0;
  for (var i = 0; i < rsBlocks.length; i++) {
    totalDataCount += rsBlocks[i].dataCount;
  }
  if (buffer.getLengthInBits() > totalDataCount * 8) {
    throw new Error("code length overflow. (" + buffer.getLengthInBits() + ">" + totalDataCount * 8 + ")");
  }
  if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
    buffer.put(0, 4);
  }
  while (buffer.getLengthInBits() % 8 != 0) {
    buffer.putBit(false);
  }
  while (true) {
    if (buffer.getLengthInBits() >= totalDataCount * 8) {
      break;
    }
    buffer.put(QRCodeModel.PAD0, 8);
    if (buffer.getLengthInBits() >= totalDataCount * 8) {
      break;
    }
    buffer.put(QRCodeModel.PAD1, 8);
  }
  return QRCodeModel.createBytes(buffer, rsBlocks);
};
QRCodeModel.createBytes = function (buffer, rsBlocks) {
  var offset = 0;
  var maxDcCount = 0;
  var maxEcCount = 0;
  var dcdata = new Array(rsBlocks.length);
  var ecdata = new Array(rsBlocks.length);
  for (var r = 0; r < rsBlocks.length; r++) {
    var dcCount = rsBlocks[r].dataCount;
    var ecCount = rsBlocks[r].totalCount - dcCount;
    maxDcCount = Math.max(maxDcCount, dcCount);
    maxEcCount = Math.max(maxEcCount, ecCount);
    dcdata[r] = new Array(dcCount);
    for (var i = 0; i < dcdata[r].length; i++) {
      dcdata[r][i] = 0xff & buffer.buffer[i + offset];
    }
    offset += dcCount;
    var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
    var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
    var modPoly = rawPoly.mod(rsPoly);
    ecdata[r] = new Array(rsPoly.getLength() - 1);
    for (var i = 0; i < ecdata[r].length; i++) {
      var modIndex = i + modPoly.getLength() - ecdata[r].length;
      ecdata[r][i] = modIndex >= 0 ? modPoly.get(modIndex) : 0;
    }
  }
  var totalCodeCount = 0;
  for (var i = 0; i < rsBlocks.length; i++) {
    totalCodeCount += rsBlocks[i].totalCount;
  }
  var data = new Array(totalCodeCount);
  var index = 0;
  for (var i = 0; i < maxDcCount; i++) {
    for (var r = 0; r < rsBlocks.length; r++) {
      if (i < dcdata[r].length) {
        data[index++] = dcdata[r][i];
      }
    }
  }
  for (var i = 0; i < maxEcCount; i++) {
    for (var r = 0; r < rsBlocks.length; r++) {
      if (i < ecdata[r].length) {
        data[index++] = ecdata[r][i];
      }
    }
  }
  return data;
};
var QRMode = {
  MODE_NUMBER: 1 << 0,
  MODE_ALPHA_NUM: 1 << 1,
  MODE_8BIT_BYTE: 1 << 2,
  MODE_KANJI: 1 << 3
};
var QRErrorCorrectLevel = {
  L: 1,
  M: 0,
  Q: 3,
  H: 2
};
var QRMaskPattern = {
  PATTERN000: 0,
  PATTERN001: 1,
  PATTERN010: 2,
  PATTERN011: 3,
  PATTERN100: 4,
  PATTERN101: 5,
  PATTERN110: 6,
  PATTERN111: 7
};
var QRUtil = {
  PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]],
  G15: 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0,
  G18: 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0,
  G15_MASK: 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1,
  getBCHTypeInfo: function getBCHTypeInfo(data) {
    var d = data << 10;
    while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
      d ^= QRUtil.G15 << QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15);
    }
    return (data << 10 | d) ^ QRUtil.G15_MASK;
  },
  getBCHTypeNumber: function getBCHTypeNumber(data) {
    var d = data << 12;
    while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
      d ^= QRUtil.G18 << QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18);
    }
    return data << 12 | d;
  },
  getBCHDigit: function getBCHDigit(data) {
    var digit = 0;
    while (data != 0) {
      digit++;
      data >>>= 1;
    }
    return digit;
  },
  getPatternPosition: function getPatternPosition(typeNumber) {
    return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
  },
  getMask: function getMask(maskPattern, i, j) {
    switch (maskPattern) {
      case QRMaskPattern.PATTERN000:
        return (i + j) % 2 === 0;
      case QRMaskPattern.PATTERN001:
        return i % 2 === 0;
      case QRMaskPattern.PATTERN010:
        return j % 3 === 0;
      case QRMaskPattern.PATTERN011:
        return (i + j) % 3 === 0;
      case QRMaskPattern.PATTERN100:
        return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0;
      case QRMaskPattern.PATTERN101:
        return i * j % 2 + i * j % 3 === 0;
      case QRMaskPattern.PATTERN110:
        return (i * j % 2 + i * j % 3) % 2 === 0;
      case QRMaskPattern.PATTERN111:
        return (i * j % 3 + (i + j) % 2) % 2 === 0;
      default:
        throw new Error("bad maskPattern:" + maskPattern);
    }
  },
  getErrorCorrectPolynomial: function getErrorCorrectPolynomial(errorCorrectLength) {
    var a = new QRPolynomial([1], 0);
    for (var i = 0; i < errorCorrectLength; i++) {
      a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
    }
    return a;
  },
  getLengthInBits: function getLengthInBits(mode, type) {
    if (1 <= type && type < 10) {
      switch (mode) {
        case QRMode.MODE_NUMBER:
          return 10;
        case QRMode.MODE_ALPHA_NUM:
          return 9;
        case QRMode.MODE_8BIT_BYTE:
          return 8;
        case QRMode.MODE_KANJI:
          return 8;
        default:
          throw new Error("mode:" + mode);
      }
    } else if (type < 27) {
      switch (mode) {
        case QRMode.MODE_NUMBER:
          return 12;
        case QRMode.MODE_ALPHA_NUM:
          return 11;
        case QRMode.MODE_8BIT_BYTE:
          return 16;
        case QRMode.MODE_KANJI:
          return 10;
        default:
          throw new Error("mode:" + mode);
      }
    } else if (type < 41) {
      switch (mode) {
        case QRMode.MODE_NUMBER:
          return 14;
        case QRMode.MODE_ALPHA_NUM:
          return 13;
        case QRMode.MODE_8BIT_BYTE:
          return 16;
        case QRMode.MODE_KANJI:
          return 12;
        default:
          throw new Error("mode:" + mode);
      }
    } else {
      throw new Error("type:" + type);
    }
  },
  getLostPoint: function getLostPoint(qrCode) {
    var moduleCount = qrCode.getModuleCount();
    var lostPoint = 0;
    for (var row = 0; row < moduleCount; row++) {
      for (var col = 0; col < moduleCount; col++) {
        var sameCount = 0;
        var dark = qrCode.isDark(row, col);
        for (var r = -1; r <= 1; r++) {
          if (row + r < 0 || moduleCount <= row + r) {
            continue;
          }
          for (var c = -1; c <= 1; c++) {
            if (col + c < 0 || moduleCount <= col + c) {
              continue;
            }
            if (r == 0 && c == 0) {
              continue;
            }
            if (dark == qrCode.isDark(row + r, col + c)) {
              sameCount++;
            }
          }
        }
        if (sameCount > 5) {
          lostPoint += 3 + sameCount - 5;
        }
      }
    }
    for (var row = 0; row < moduleCount - 1; row++) {
      for (var col = 0; col < moduleCount - 1; col++) {
        var count = 0;
        if (qrCode.isDark(row, col)) count++;
        if (qrCode.isDark(row + 1, col)) count++;
        if (qrCode.isDark(row, col + 1)) count++;
        if (qrCode.isDark(row + 1, col + 1)) count++;
        if (count == 0 || count == 4) {
          lostPoint += 3;
        }
      }
    }
    for (var row = 0; row < moduleCount; row++) {
      for (var col = 0; col < moduleCount - 6; col++) {
        if (qrCode.isDark(row, col) && !qrCode.isDark(row, col + 1) && qrCode.isDark(row, col + 2) && qrCode.isDark(row, col + 3) && qrCode.isDark(row, col + 4) && !qrCode.isDark(row, col + 5) && qrCode.isDark(row, col + 6)) {
          lostPoint += 40;
        }
      }
    }
    for (var col = 0; col < moduleCount; col++) {
      for (var row = 0; row < moduleCount - 6; row++) {
        if (qrCode.isDark(row, col) && !qrCode.isDark(row + 1, col) && qrCode.isDark(row + 2, col) && qrCode.isDark(row + 3, col) && qrCode.isDark(row + 4, col) && !qrCode.isDark(row + 5, col) && qrCode.isDark(row + 6, col)) {
          lostPoint += 40;
        }
      }
    }
    var darkCount = 0;
    for (var col = 0; col < moduleCount; col++) {
      for (var row = 0; row < moduleCount; row++) {
        if (qrCode.isDark(row, col)) {
          darkCount++;
        }
      }
    }
    var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
    lostPoint += ratio * 10;
    return lostPoint;
  }
};
var QRMath = {
  glog: function glog(n) {
    if (n < 1) {
      throw new Error("glog(" + n + ")");
    }
    return QRMath.LOG_TABLE[n];
  },
  gexp: function gexp(n) {
    while (n < 0) {
      n += 255;
    }
    while (n >= 256) {
      n -= 255;
    }
    return QRMath.EXP_TABLE[n];
  },
  LOG_TABLE: new Array(256)
};
QRMath.EXP_TABLE = function () {
  var arr = Array(256);
  var i;
  for (i = 0; i < 8; ++i) {
    arr[i] = 1 << i;
  }
  for (i = 8; i < 256; ++i) {
    arr[i] = arr[i - 4] ^ arr[i - 5] ^ arr[i - 6] ^ arr[i - 8];
  }
  return arr;
}();
QRMath.LOG_TABLE = function () {
  var arr = Array(256).fill(0);
  for (var i = 0; i < 255; i++) {
    arr[QRMath.EXP_TABLE[i]] = i;
  }
  return arr;
}();
function QRPolynomial(num, shift) {
  if (num.length == undefined) {
    throw new Error(num.length + "/" + shift);
  }
  var offset = 0;
  while (offset < num.length && num[offset] == 0) {
    offset++;
  }
  this.num = new Array(num.length - offset + shift);
  for (var i = 0; i < num.length - offset; i++) {
    this.num[i] = num[i + offset];
  }
}
QRPolynomial.prototype.get = function (index) {
  return this.num[index];
};
QRPolynomial.prototype.getLength = function () {
  return this.num.length;
};
QRPolynomial.prototype.multiply = function (e) {
  var num = new Array(this.getLength() + e.getLength() - 1);
  for (var i = 0; i < this.getLength(); i++) {
    for (var j = 0; j < e.getLength(); j++) {
      num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
    }
  }
  return new QRPolynomial(num, 0);
};
QRPolynomial.prototype.mod = function (e) {
  if (this.getLength() - e.getLength() < 0) {
    return this;
  }
  var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e.get(0));
  var num = new Array(this.getLength());
  for (var i = 0; i < this.getLength(); i++) {
    num[i] = this.get(i);
  }
  for (var i = 0; i < e.getLength(); i++) {
    num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
  }
  return new QRPolynomial(num, 0).mod(e);
};
function QRRSBlock(totalCount, dataCount) {
  this.totalCount = totalCount;
  this.dataCount = dataCount;
}
QRRSBlock.RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]];
QRRSBlock.getRSBlocks = function (typeNumber, errorCorrectLevel) {
  var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);
  if (rsBlock == undefined) {
    throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel);
  }
  var length = rsBlock.length / 3;
  var list = [];
  for (var i = 0; i < length; i++) {
    var count = rsBlock[i * 3 + 0];
    var totalCount = rsBlock[i * 3 + 1];
    var dataCount = rsBlock[i * 3 + 2];
    for (var j = 0; j < count; j++) {
      list.push(new QRRSBlock(totalCount, dataCount));
    }
  }
  return list;
};
QRRSBlock.getRsBlockTable = function (typeNumber, errorCorrectLevel) {
  switch (errorCorrectLevel) {
    case QRErrorCorrectLevel.L:
      return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
    case QRErrorCorrectLevel.M:
      return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
    case QRErrorCorrectLevel.Q:
      return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
    case QRErrorCorrectLevel.H:
      return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
    default:
      return undefined;
  }
};
function QRBitBuffer() {
  this.buffer = [];
  this.length = 0;
}
QRBitBuffer.prototype.get = function (index) {
  var bufIndex = Math.floor(index / 8);
  return (this.buffer[bufIndex] >>> 7 - index % 8 & 1) === 1;
};
QRBitBuffer.prototype.put = function (num, length) {
  for (var i = 0; i < length; i++) {
    this.putBit((num >>> length - i - 1 & 1) === 1);
  }
};
QRBitBuffer.prototype.getLengthInBits = function () {
  return this.length;
};
QRBitBuffer.prototype.putBit = function (bit) {
  var bufIndex = Math.floor(this.length / 8);
  if (this.buffer.length <= bufIndex) {
    this.buffer.push(0);
  }
  if (bit) {
    this.buffer[bufIndex] |= 0x80 >>> this.length % 8;
  }
  this.length++;
};
var QRCodeLimitLength = [[17, 14, 11, 7], [32, 26, 20, 14], [53, 42, 32, 24], [78, 62, 46, 34], [106, 84, 60, 44], [134, 106, 74, 58], [154, 122, 86, 64], [192, 152, 108, 84], [230, 180, 130, 98], [271, 213, 151, 119], [321, 251, 177, 137], [367, 287, 203, 155], [425, 331, 241, 177], [458, 362, 258, 194], [520, 412, 292, 220], [586, 450, 322, 250], [644, 504, 364, 280], [718, 560, 394, 310], [792, 624, 442, 338], [858, 666, 482, 382], [929, 711, 509, 403], [1003, 779, 565, 439], [1091, 857, 611, 461], [1171, 911, 661, 511], [1273, 997, 715, 535], [1367, 1059, 751, 593], [1465, 1125, 805, 625], [1528, 1190, 868, 658], [1628, 1264, 908, 698], [1732, 1370, 982, 742], [1840, 1452, 1030, 790], [1952, 1538, 1112, 842], [2068, 1628, 1168, 898], [2188, 1722, 1228, 958], [2303, 1809, 1283, 983], [2431, 1911, 1351, 1051], [2563, 1989, 1423, 1093], [2699, 2099, 1499, 1139], [2809, 2213, 1579, 1219], [2953, 2331, 1663, 1273]];

/**
 * Get the type by string length
 *
 * @private
 * @param {String} sText
 * @param {Number} nCorrectLevel
 * @return {Number} type
 */
function _getTypeNumber(sText, nCorrectLevel) {
  var nType = 1;
  var length = _getUTF8Length(sText);
  for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {
    var nLimit = 0;
    switch (nCorrectLevel) {
      case QRErrorCorrectLevel.L:
        nLimit = QRCodeLimitLength[i][0];
        break;
      case QRErrorCorrectLevel.M:
        nLimit = QRCodeLimitLength[i][1];
        break;
      case QRErrorCorrectLevel.Q:
        nLimit = QRCodeLimitLength[i][2];
        break;
      case QRErrorCorrectLevel.H:
        nLimit = QRCodeLimitLength[i][3];
        break;
    }
    if (length <= nLimit) {
      break;
    } else {
      nType++;
    }
  }
  if (nType > QRCodeLimitLength.length) {
    throw new Error("Too long data");
  }
  return nType;
}
function _getUTF8Length(sText) {
  var replacedText = encodeURI(sText).toString().replace(/\%[0-9a-fA-F]{2}/g, 'a');
  return replacedText.length + (replacedText.length != sText ? 3 : 0);
}
function QRCode(opt) {
  this.opt = {
    width: 255,
    height: 255,
    typeNumber: 4,
    correctLevel: QRErrorCorrectLevel.H
  };
  if (typeof opt === 'string') {
    this.opt.text = opt;
  } else Object.assign(this.opt, opt);
  if (this.opt.text) {
    this.makeCode(this.opt.text);
  }
}

/**
 * Make the QRCode
 *
 * @param {String} sText link data
 */
QRCode.prototype.makeCode = function (sText) {
  this._oQRCode = new QRCodeModel(_getTypeNumber(sText, this.opt.correctLevel), this.opt.correctLevel);
  this._oQRCode.addData(sText);
  this._oQRCode.make();
};
QRCode.prototype.getBitmap = function () {
  var _this = this;
  var n = this._oQRCode.getModuleCount();
  return Array(n).fill(null).map(function (u, i) {
    return Array(n).fill(null).map(function (u, j) {
      return _this._oQRCode.isDark(i, j);
    });
  });
};

/**
 * @name QRCode.CorrectLevel
 */
QRCode.CorrectLevel = QRErrorCorrectLevel;
var _default = QRCode;
exports["default"] = _default;

/***/ }),

/***/ 6954:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.UnicodeBase64Converter = void 0;
exports.base64DecodeUnicode = base64DecodeUnicode;
exports.base64EncodeUnicode = base64EncodeUnicode;
function base64EncodeUnicode(str) {
  return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function toSolidBytes(match, p1) {
    return String.fromCharCode('0x' + p1);
  }));
}
;
function base64DecodeUnicode(str) {
  return decodeURIComponent(atob(str).split('').map(function (c) {
    return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  }).join(''));
}
var UnicodeBase64Converter = {
  encode: base64EncodeUnicode,
  decode: base64DecodeUnicode
};
exports.UnicodeBase64Converter = UnicodeBase64Converter;

/***/ }),

/***/ 13578:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var ext2MineType = {
  "323": "text/h323",
  "*": "application/octet-stream",
  "3g2": "video/3gpp2",
  "3gp": "video/3gpp",
  "7z": "application/x-7z-compressed",
  aac: "audio/aac",
  abw: "application/x-abiword",
  acx: "application/internet-property-stream",
  ai: "application/postscript",
  aif: "audio/x-aiff",
  aifc: "audio/x-aiff",
  aiff: "audio/x-aiff",
  arc: "application/x-freearc",
  asf: "video/x-ms-asf",
  asr: "video/x-ms-asf",
  asx: "video/x-ms-asf",
  au: "audio/basic",
  avi: "video/x-msvideo",
  axs: "application/olescript",
  azw: "application/vnd.amazon.ebook",
  bas: "text/plain",
  bcpio: "application/x-bcpio",
  bin: "application/octet-stream",
  bmp: "image/bmp",
  bz: "application/x-bzip",
  bz2: "application/x-bzip2",
  c: "text/plain",
  cat: "application/vnd.ms-pkiseccat",
  cda: "application/x-cdf",
  cdf: "application/x-netcdf",
  cer: "application/x-x509-ca-cert",
  "class": "application/octet-stream",
  clp: "application/x-msclip",
  cmx: "image/x-cmx",
  cod: "image/cis-cod",
  cpio: "application/x-cpio",
  crd: "application/x-mscardfile",
  crl: "application/pkix-crl",
  crt: "application/x-x509-ca-cert",
  csh: "application/x-csh",
  css: "text/css",
  csv: "text/csv",
  dcr: "application/x-director",
  der: "application/x-x509-ca-cert",
  dir: "application/x-director",
  dll: "application/x-msdownload",
  dms: "application/octet-stream",
  doc: "application/msword",
  docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
  dot: "application/msword",
  dvi: "application/x-dvi",
  dxr: "application/x-director",
  eot: "application/vnd.ms-fontobject",
  eps: "application/postscript",
  epub: "application/epub+zip",
  etx: "text/x-setext",
  evy: "application/envoy",
  exe: "application/octet-stream",
  fif: "application/fractals",
  flr: "x-world/x-vrml",
  gif: "image/gif",
  gtar: "application/x-gtar",
  gz: "application/gzip",
  h: "text/plain",
  hdf: "application/x-hdf",
  hlp: "application/winhlp",
  hqx: "application/mac-binhex40",
  hta: "application/hta",
  htc: "text/x-component",
  htm: "text/html",
  html: "text/html",
  htt: "text/webviewhtml",
  ico: "image/vnd.microsoft.icon",
  ics: "text/calendar",
  ief: "image/ief",
  iii: "application/x-iphone",
  ins: "application/x-internet-signup",
  isp: "application/x-internet-signup",
  jar: "application/java-archive",
  jfif: "image/pipeg",
  jpe: "image/jpeg",
  jpeg: "image/jpeg",
  jpg: "image/jpeg",
  js: "text/javascript",
  json: "application/json",
  jsonld: "application/ld+json",
  latex: "application/x-latex",
  lha: "application/octet-stream",
  lsf: "video/x-la-asf",
  lsx: "video/x-la-asf",
  lzh: "application/octet-stream",
  m13: "application/x-msmediaview",
  m14: "application/x-msmediaview",
  m3u: "audio/x-mpegurl",
  man: "application/x-troff-man",
  mdb: "application/x-msaccess",
  me: "application/x-troff-me",
  mht: "message/rfc822",
  mhtml: "message/rfc822",
  mid: "audio/midi",
  midi: "audio/midi",
  mjs: "text/javascript",
  mny: "application/x-msmoney",
  mov: "video/quicktime",
  movie: "video/x-sgi-movie",
  mp2: "video/mpeg",
  mp3: "audio/mpeg",
  mp4: "video/mp4",
  mpa: "video/mpeg",
  mpe: "video/mpeg",
  mpeg: "video/mpeg",
  mpg: "video/mpeg",
  mpkg: "application/vnd.apple.installer+xml",
  mpp: "application/vnd.ms-project",
  mpv2: "video/mpeg",
  ms: "application/x-troff-ms",
  msg: "application/vnd.ms-outlook",
  mvb: "application/x-msmediaview",
  nc: "application/x-netcdf",
  nws: "message/rfc822",
  oda: "application/oda",
  odp: "application/vnd.oasis.opendocument.presentation",
  ods: "application/vnd.oasis.opendocument.spreadsheet",
  odt: "application/vnd.oasis.opendocument.text",
  oga: "audio/ogg",
  ogv: "video/ogg",
  ogx: "application/ogg",
  opus: "audio/opus",
  otf: "font/otf",
  p10: "application/pkcs10",
  p12: "application/x-pkcs12",
  p7b: "application/x-pkcs7-certificates",
  p7c: "application/x-pkcs7-mime",
  p7m: "application/x-pkcs7-mime",
  p7r: "application/x-pkcs7-certreqresp",
  p7s: "application/x-pkcs7-signature",
  pbm: "image/x-portable-bitmap",
  pdf: "application/pdf",
  pfx: "application/x-pkcs12",
  pgm: "image/x-portable-graymap",
  php: "application/x-httpd-php",
  pko: "application/ynd.ms-pkipko",
  pma: "application/x-perfmon",
  pmc: "application/x-perfmon",
  pml: "application/x-perfmon",
  pmr: "application/x-perfmon",
  pmw: "application/x-perfmon",
  png: "image/png",
  pnm: "image/x-portable-anymap",
  pot: "application/vnd.ms-powerpoint",
  ppm: "image/x-portable-pixmap",
  pps: "application/vnd.ms-powerpoint",
  ppt: "application/vnd.ms-powerpoint",
  pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
  prf: "application/pics-rules",
  ps: "application/postscript",
  pub: "application/x-mspublisher",
  qt: "video/quicktime",
  ra: "audio/x-pn-realaudio",
  ram: "audio/x-pn-realaudio",
  rar: "application/vnd.rar",
  ras: "image/x-cmu-raster",
  rgb: "image/x-rgb",
  rmi: "audio/mid",
  roff: "application/x-troff",
  rtf: "application/rtf",
  rtx: "text/richtext",
  scd: "application/x-msschedule",
  sct: "text/scriptlet",
  setpay: "application/set-payment-initiation",
  setreg: "application/set-registration-initiation",
  sh: "application/x-sh",
  shar: "application/x-shar",
  sit: "application/x-stuffit",
  snd: "audio/basic",
  spc: "application/x-pkcs7-certificates",
  spl: "application/futuresplash",
  src: "application/x-wais-source",
  sst: "application/vnd.ms-pkicertstore",
  stl: "application/vnd.ms-pkistl",
  stm: "text/html",
  sv4cpio: "application/x-sv4cpio",
  sv4crc: "application/x-sv4crc",
  svg: "image/svg+xml",
  swf: "application/x-shockwave-flash",
  t: "application/x-troff",
  tar: "application/x-tar",
  tcl: "application/x-tcl",
  tex: "application/x-tex",
  texi: "application/x-texinfo",
  texinfo: "application/x-texinfo",
  tgz: "application/x-compressed",
  tif: "image/tiff",
  tiff: "image/tiff",
  tr: "application/x-troff",
  trm: "application/x-msterminal",
  ts: "video/mp2t",
  tsv: "text/tab-separated-values",
  ttf: "font/ttf",
  txt: "text/plain",
  uls: "text/iuls",
  ustar: "application/x-ustar",
  vcf: "text/x-vcard",
  vrml: "x-world/x-vrml",
  vsd: "application/vnd.visio",
  wav: "audio/wav",
  wcm: "application/vnd.ms-works",
  wdb: "application/vnd.ms-works",
  weba: "audio/webm",
  webm: "video/webm",
  webp: "image/webp",
  wks: "application/vnd.ms-works",
  wmf: "application/x-msmetafile",
  woff: "font/woff",
  woff2: "font/woff2",
  wps: "application/vnd.ms-works",
  wri: "application/x-mswrite",
  wrl: "x-world/x-vrml",
  wrz: "x-world/x-vrml",
  xaf: "x-world/x-vrml",
  xbm: "image/x-xbitmap",
  xhtml: "application/xhtml+xml",
  xla: "application/vnd.ms-excel",
  xlc: "application/vnd.ms-excel",
  xlm: "application/vnd.ms-excel",
  xls: "application/vnd.ms-excel",
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
  xlt: "application/vnd.ms-excel",
  xlw: "application/vnd.ms-excel",
  xml: "application/xml",
  xof: "x-world/x-vrml",
  xpm: "image/x-xpixmap",
  xul: "application/vnd.mozilla.xul+xml",
  xwd: "image/x-xwindowdump",
  z: "application/x-compress",
  zip: "application/zip"
};
var _default = ext2MineType;
exports["default"] = _default;

/***/ }),

/***/ 54134:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.blobToArrayBuffer = blobToArrayBuffer;
exports.blobToFile = blobToFile;
exports.dataURItoBlob = dataURItoBlob;
exports.stringToBlob = stringToBlob;
var _ext2MineType = _interopRequireDefault(__webpack_require__(13578));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function blobToFile(theBlob, fileName) {
  return new File([theBlob], fileName);
}
function dataURItoBlob(dataURI) {
  var byteString = atob(dataURI.split(',')[1]);
  var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
  var ab = new ArrayBuffer(byteString.length);
  var ia = new Uint8Array(ab);
  for (var i = 0; i < byteString.length; i++) {
    ia[i] = byteString.charCodeAt(i);
  }
  var blob = new Blob([ab], {
    type: mimeString
  });
  return blob;
}
function blobToArrayBuffer(blob) {
  var fileReader = new FileReader();
  return new Promise(function (rs) {
    fileReader.onload = function (event) {
      var arrayBuffer = event.target.result;
      rs(arrayBuffer);
    };
    fileReader.readAsArrayBuffer(blob);
  });
}
function stringToBlob(text, type) {
  type = type || 'text/plain';
  var mineTye = type.split('/').length === 2 ? type : _ext2MineType["default"][type] || 'text/plain';
  return new Blob([text], {
    type: mineTye
  });
}

/***/ }),

/***/ 30416:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _base = __webpack_require__(6954);
function CookieStore(converter) {
  this.converter = converter || _base.UnicodeBase64Converter;
}
CookieStore.prototype.isEnabled = function () {
  var cookieEnabled = !!navigator.cookieEnabled;

  //if not IE4+ nor NS6+
  if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) {
    document.cookie = "testcookie_enabled";
    cookieEnabled = document.cookie.indexOf("testcookie_enabled") != -1;
  }
  return cookieEnabled;
};
CookieStore.prototype.secure = function () {
  document.cookie = "secure";
};
CookieStore.prototype.get = function (key) {
  var bkey = this.converter.encode(key).replace(/=/g, '_');
  var pairs = document.cookie.split(';').map(function (text) {
    return text.split('=');
  }).filter(function (pair) {
    return pair[0].trim() == bkey;
  });
  if (pairs.length > 0) {
    if (pairs[0].length > 1) {
      var bvalue = pairs[0][1];
      return this.converter.decode(bvalue.replace(/_/g, '=').trim());
    } else {
      return true;
    }
  } else return undefined;
};
CookieStore.prototype.set = function (key, value) {
  var bkey = this.converter.encode(key);
  var bvalue = this.converter.encode(value);
  document.cookie = bkey.replace(/=/g, '_') + "=" + bvalue.replace(/=/g, '_');
};
var _default = new CookieStore();
exports["default"] = _default;

/***/ }),

/***/ 19540:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = parseCookieString;
/***
 *
 * @param {string} text
 * @return {{}}
 */
function parseCookieString(text) {
  return text.split(/\s*;\s*/).reduce(function (ac, item) {
    var tokens = item.split('=');
    var name = (tokens.shift() || '').trim();
    if (!name) return ac;
    var value = (tokens.shift() || '').trim();
    if (!value) value = true;
    ac[name] = value;
    return ac;
  }, {});
}

/***/ }),

/***/ 40411:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.arrayCompare = arrayCompare;
exports.arrayIntersection = arrayIntersection;
exports.arrayIsSubset = arrayIsSubset;
exports.arrayLexicographicalCompare = arrayLexicographicalCompare;
exports.arrayRemoveNone = arrayRemoveNone;
exports.arrayShuffle = arrayShuffle;
exports.arrayUnique = arrayUnique;
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 *
 * @param {(string|number|boolean|null)[]} arr
 * @returns {(string|number|boolean|null)[]}
 */
function arrayUnique(arr) {
  var dict = {};
  return arr.reduce(function (ac, cr) {
    var key = _typeof(cr) + '//' + cr;
    if (key in dict) return ac;
    ac.push(cr);
    dict[key] = true;
    return ac;
  }, []);
}

/***
 *
 * @param {[]}arr
 * @return {[]}
 */
function arrayRemoveNone(arr) {
  return arr.filter(function (c) {
    return c !== null && c !== undefined;
  });
}
function arrayIntersection(a1, a2) {
  var dict1 = a1.reduce(function (ac, cr) {
    ac[_typeof(cr) + cr] = true;
    return ac;
  }, {});
  var dict2 = a2.reduce(function (ac, cr) {
    ac[_typeof(cr) + cr] = true;
    return ac;
  }, {});
  var dictAdded = {};
  var res = [];
  var i, k, x;
  for (i = 0; i < a1.length; ++i) {
    x = a1[i];
    k = _typeof(x) + x;
    if (dict1[k] && dict2[k] && !dictAdded[k]) {
      res.push(x);
      dictAdded[k] = true;
    }
  }
  for (i = 0; i < a2.length; ++i) {
    x = a2[i];
    k = _typeof(x) + x;
    if (dict1[k] && dict2[k] && !dictAdded[k]) {
      res.push(x);
      dictAdded[k] = true;
    }
  }
  return res;
}
function arrayIsSubset(childArr, parentArr) {
  if (!(childArr instanceof Array) || !(parentArr instanceof Array)) return false;
  var dict2 = parentArr.reduce(function (ac, cr) {
    ac[_typeof(cr) + cr] = true;
    return ac;
  }, {});
  var res = true;
  var n = childArr.length;
  var k;
  for (var i = 0; i < n; ++i) {
    k = _typeof(childArr[i]) + childArr[i];
    if (!dict2[k]) {
      res = false;
      break;
    }
  }
  return res;
}

/***
 *
 * @param {[]}a1
 * @param {[]}a2
 * @param {boolean=} order
 * @returns {boolean}
 */
function arrayCompare(a1, a2, order) {
  if (a1 === a2) return true;
  if (!a1 || !a2) return false;
  if (a1.length !== a2.length) return false;
  if (!a1.sort || !a2.sort) return false;
  if (!order) {
    a1.sort();
    a2.sort();
  }
  var n = a1.length;
  for (var i = 0; i < n; ++i) {
    if (a1[i] !== a2[i]) return false;
  }
  return true;
}

/**
 *
 * @param {number[]} a1
 * @param {number[]} a2
 * @returns {number}
 */
function arrayLexicographicalCompare(a1, a2) {
  var minLength = Math.min(a1.length, a2.length);
  for (var i = 0; i < minLength; i++) {
    if (a1[i] < a2[i]) {
      return -1; // array1 nhỏ hơn array2
    } else if (a1[i] > a2[i]) {
      return 1; // array1 lớn hơn array2
    }
  }

  if (a1.length < a2.length) {
    return -1;
  } else if (a1.length > a2.length) {
    return 1;
  } else {
    return 0;
  }
}

/***
 *
 * @param {Array} arr
 */
function arrayShuffle(arr) {
  var temp;
  var j;
  for (var i = 0; i < arr.length; ++i) {
    j = Math.floor(Math.random() * arr.length);
    if (i !== j) {
      temp = arr[i];
      arr[i] = arr[j];
      arr[j] = temp;
    }
  }
}

/***/ }),

/***/ 92568:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.defaultCmp = defaultCmp;
exports.heapDown = heapDown;
exports.heapPop = heapPop;
exports.heapPush = heapPush;
exports.heapUp = heapUp;
exports.heapify = heapify;
function defaultCmp(x, y) {
  if (x < y) {
    return -1;
  }
  if (x > y) {
    return 1;
  }
  return 0;
}
;

/**
 * 
 * @param {Array} arr 
 * @param {Number} pos 
 * @param {Function} cmp 
 */
function heapDown(arr, pos, cmp) {
  if (!cmp) cmp = defaultCmp;
  var item = arr[pos];
  var endPos = arr.length;
  var childPos = pos << 1 | 1;
  var childRightPos;
  while (childPos < endPos) {
    childRightPos = childPos + 1;
    if (childPos + 1 < endPos && cmp(arr[childPos], arr[childRightPos]) > 0) {
      childPos = childRightPos;
    }
    if (cmp(arr[childPos], item) < 0) {
      arr[pos] = arr[childPos];
      arr[childPos] = item;
      pos = childPos;
      childPos = pos << 1 | 1;
    } else break;
  }
}

/**
 * 
 * @param {Array} arr 
 * @param {Number} pos 
 * @param {Function} cmp 
 */
function heapUp(arr, pos, cmp) {
  if (!cmp) cmp = defaultCmp;
  var item = arr[pos];
  var parPos;
  while (pos > 0) {
    parPos = pos - 1 >> 1;
    if (cmp(arr[parPos], item) > 0) {
      arr[pos] = arr[parPos];
      arr[parPos] = item;
      pos = parPos;
    } else break;
  }
}

/**
 *
 * @param {Array} arr
 * @param {Function} cmp
 */
function heapify(arr, cmp) {
  if (!cmp) cmp = defaultCmp;
  var endPos = arr.length;
  for (var i = 0; i < endPos; ++i) {
    heapUp(arr, i, cmp);
  }
}

/**
 * 
 * @param {Array} arr 
 * @param {Function} cmp 
 */
function heapPop(arr, cmp) {
  if (!cmp) cmp = defaultCmp;
  var item = arr[0];
  var lastItem = arr.pop();
  if (arr.length > 0) {
    arr[0] = lastItem;
    heapDown(arr, 0, cmp);
  }
  return item;
}

/**
 * 
 * @param {Array} arr 
 * @param {*} item
 * @param {Function} cmp 
 */
function heapPush(arr, item, cmp) {
  if (!cmp) cmp = defaultCmp;
  arr.push(item);
  heapUp(arr, arr.length - 1, cmp);
}
function Heap(cmd) {
  this.cmp = cmd || defaultCmp;
  this.arr = [];
}

/**
 * @param {Array} arr
 * @param {Function} cmp
 * @returns {Heap}
 */
Heap.fromArray = function (arr, cmp) {
  var heap = new Heap(cmp);
  heapify(arr);
  heap.arr = arr;
  return heap;
};
Heap.prototype.push = function (x) {
  heapPush(this.arr, x, this.cmp);
  return this;
};
Heap.prototype.pop = function () {
  return heapPop(this.arr, this.cmp);
};
Heap.prototype.peek = function () {
  return this.arr[0];
};
Heap.prototype.contains = function (x) {
  return this.arr.indexOf(x) !== -1;
};
Heap.prototype.clear = function () {
  this.arr.splice(0, this.arr.length);
  return this;
};
Heap.prototype.empty = function () {
  return this.arr.length === 0;
};
Heap.prototype.size = function () {
  return this.arr.length;
};
Heap.prototype.clone = function () {
  var heap;
  heap = new Heap(this.cmp);
  heap.arr = this.arr.slice(0);
  return heap;
};
Heap.prototype.toArray = function () {
  return this.arr.slice(0);
};
Heap.prototype.toSortedArray = function () {
  var res = [];
  var heap = this.clone();
  while (!heap.empty()) {
    res.push(heap.pop());
  }
  return res;
};
Heap.prototype.insert = Heap.prototype.push;
Heap.prototype.top = Heap.prototype.peek;
Heap.prototype.front = Heap.prototype.peek;
Heap.prototype.has = Heap.prototype.contains;
Heap.prototype.copy = Heap.prototype.clone;
var _default = Heap;
exports["default"] = _default;

/***/ }),

/***/ 84131:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.observePropertyChanges = observePropertyChanges;
exports.revokeResource = revokeResource;
exports.unobservePropertyChanges = unobservePropertyChanges;
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function revokeResource(o) {
  if (!o) return;
  var oc, ocs;
  var keys, key;
  if (Array.isArray(o)) {
    while (o.length) {
      oc = o.pop();
      try {
        revokeResource(oc);
      } catch (err) {}
    }
  } else if (o.revokeResource) {
    o.revokeResource();
  } else if (o.nodeType === 1 || o.nodeType === 3) {
    if (o.revokeResource) o.revokeResource();else {
      while (o.lastChild) {
        oc = o.lastChild;
        revokeResource(oc);
        // if (oc.selfRemove) {
        //     oc.selfRemove();
        // }
        // else {
        oc.remove();
        // }
      }
    }
  } else if (_typeof(o) === "object") {
    keys = [];
    ocs = [];
    for (key in o) {
      keys.push(key);
    }
    while (keys.length) {
      key = keys.pop();
      ocs.push(o[keys]);
      try {
        delete o[key];
      } catch (err) {}
    }
    while (ocs.length) {
      try {
        revokeResource(ocs.pop());
      } catch (err) {}
    }
  }
  ocs = undefined;
  oc = undefined;
  keys = undefined;
  key = undefined;
  o = undefined;
}

/**
 *
 * @param obj
 * @param {string|Array<string>} keys
 * @param {function} callback
 */
function observePropertyChanges(obj, keys, callback) {
  var value;
  if (Array.isArray(keys)) {
    keys.forEach(function (key) {
      observePropertyChanges(obj, key, callback);
    });
  } else {
    value = obj[keys];
    Object.defineProperty(obj, keys, {
      get: function get() {
        return value;
      },
      set: function set(newValue) {
        value = newValue;
        callback(keys, newValue);
      },
      configurable: true,
      enumerable: true
    });
  }
}

/**
 *
 * @param obj
 * @param {string|Array<string>} keys
 */
function unobservePropertyChanges(obj, keys) {
  var value;
  if (Array.isArray(keys)) {
    keys.forEach(function (key) {
      unobservePropertyChanges(obj, key);
    });
  } else {
    value = obj[keys];
    delete obj[keys];
    obj[keys] = value;
  }
}

/***/ }),

/***/ 69638:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.calcBenchmark = calcBenchmark;
exports["default"] = void 0;
var _BrowserRules = _interopRequireDefault(__webpack_require__(30885));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @param  rulesheet
 * @param {string=} userAgent
 */
function BrowserDetector(rulesheet, userAgent) {
  this.au = userAgent || (__webpack_require__.g.navigator ? navigator.userAgent || '' : '');
  this.rulesheet = rulesheet;
  this.os = this.detectByRules(this.rulesheet.os);
  this.device = this.detectByRules(this.rulesheet.device);
  this.engine = this.detectByRules(this.rulesheet.engine);
  this.browser = this.detectByRules(this.rulesheet.browser);
  this.isFirefox = this.au.toLowerCase().indexOf('firefox') > -1;
  this.isCococ = this.au.toLowerCase().indexOf('coc_coc_browser') >= 1;
  this.isSafari = this.browser.type === 'safari' || !this.isCococ && this.au.toLowerCase().indexOf('safari') > -1 && this.au.toLowerCase().indexOf('win') < 0 && this.au.toLowerCase().indexOf('android') < 0;
  // this.isSafari = /constructor/i.test(window.HTMLElement) || window.safari;
  var isMobile = this.au.indexOf('KFFOWI') > -1 || this.au.toLowerCase().indexOf('mobile') > -1 || this.device.type === 'iphone' || this.device.type === 'ipad' || this.device.type === 'android';
  Object.defineProperty(this, 'isMobile', {
    get: function get() {
      return isMobile || window.isMobile || !!window['mobileHost'];
    },
    set: function set(v) {
      //do nothing
    }
  });
  this.isMacOSWebView = /Macintosh/.test(this.au) && /AppWebkit/.test(this.au) && !/Safari/.test(this.au);
  this.isChromeIOS = /CriOS\/[\d]+/.test(this.au);
  this.hasTouch = 'ontouchstart' in __webpack_require__.g || __webpack_require__.g.DocumentTouch && document instanceof __webpack_require__.g.DocumentTouch || __webpack_require__.g.navigator && (navigator.maxTouchPoints > 0 || __webpack_require__.g.navigator.msMaxTouchPoints > 0);
  this.isTouchDevice = this.isMobile && this.hasTouch;
  this.supportPassiveEvent = function () {
    var supportsPassiveOption = false;
    try {
      var opts = Object.defineProperty({}, 'passive', {
        get: function get() {
          supportsPassiveOption = true;
        }
      });
      __webpack_require__.g.addEventListener('test', null, opts);
      __webpack_require__.g.removeEventListener('test', null, opts);
    } catch (e) {}
    return supportsPassiveOption;
  }();
  this.supportGridLayout = __webpack_require__.g.document && typeof document.createElement('div').style.grid === 'string';
  Object.defineProperty(this, 'zoom', {
    get: function get() {
      return this.getZoom();
    },
    enumerable: true,
    configurable: false
  });
}
BrowserDetector.prototype.detectByRules = function (rules) {
  var result = {};
  for (var i = 0; i < rules.length; ++i) {
    var rule = rules[i];
    var type = rule[0];
    var rgx = rule[1];
    if (typeof rgx == 'function') {
      rgx = rgx(this.au.toLowerCase());
    }
    if (Object.prototype.toString.call(rgx).indexOf('RegExp') >= 0) {
      var matched = this.au.toLowerCase().match(rgx);
      if (matched) {
        result.type = type;
        if (matched[1]) {
          result.version = matched[1].replace(/_/g, '.');
        }
        break;
      }
    } else if (typeof rgx == 'string') {
      if (this.au.toLowerCase().indexOf(rgx) >= 0) {
        result.type = type;
      }
    }
  }
  result.type = result.type || 'unknow';
  result.version = result.version || '0';
  return result;
};
BrowserDetector.prototype.getZoom = function () {
  //todo: wrong on chrome
  var type;
  if ('chrome' in __webpack_require__.g) {
    type = "chrome";
  } else if (this.isSafari) {
    type = 'safari';
  } else if ('orientation' in __webpack_require__.g && 'webkitRequestAnimationFrame' in __webpack_require__.g) {
    type = 'webkitMobile';
  } else if ('webkitRequestAnimationFrame' in __webpack_require__.g) {
    type = 'webkit';
  }
  switch (type) {
    case 'chrome':
      return Math.round(__webpack_require__.g.outerWidth / __webpack_require__.g.innerWidth * 100) / 100;
    case 'safari':
      return Math.round(document.documentElement.clientWidth / __webpack_require__.g.innerWidth * 100) / 100;
    case 'webkitMobile':
      return (Math.abs(__webpack_require__.g.orientation) == 90 ? screen.height : screen.width) / __webpack_require__.g.innerWidth;
    case 'webkit':
      return function () {
        var important = function important(str) {
          return str.replace(/;/g, " !important;");
        };
        var div = document.createElement('div');
        div.innerHTML = "1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>0";
        div.setAttribute('style', important('font: 100px/1em sans-serif; -webkit-text-size-adjust: none; text-size-adjust: none; height: auto; width: 1em; padding: 0; overflow: visible;'));
        var container = document.createElement('div');
        container.setAttribute('style', important('width:0; height:0; overflow:hidden; visibility:hidden; position: absolute;'));
        container.appendChild(div);
        document.body.appendChild(container);
        var zoom = 1000 / div.clientHeight;
        zoom = Math.round(zoom * 100) / 100;
        document.body.removeChild(container);
        return zoom;
      }();
    default:
      return 1;
  }
  return 1;
};
function calcBenchmark() {
  var now = new Date().getTime();
  var i = 0;
  while (now === new Date().getTime()) {}
  now++;
  while (now === new Date().getTime()) {
    ++i;
  }
  return i;
}
BrowserDetector.prototype.calcBenchmark = calcBenchmark;
var _default = new BrowserDetector(_BrowserRules["default"]);
exports["default"] = _default;

/***/ }),

/***/ 30885:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var external = __webpack_require__.g.external;
var re_msie = /\b(?:msie |ie |trident\/[0-9].*rv[ :])([0-9.]+)/;
var re_blackberry_10 = /\bbb10\b.+?\bversion\/([\d.]+)/;
var re_blackberry_6_7 = /\bblackberry\b.+\bversion\/([\d.]+)/;
var re_blackberry_4_5 = /\bblackberry\d+\/([\d.]+)/;
var NA_VERSION = "-1";
var DEVICES = [["nokia", function (ua) {
  //  nokia/-1
  if (ua.indexOf("nokia ") !== -1) {
    return /\bnokia ([0-9]+)?/;
  } else {
    return /\bnokia([a-z0-9]+)?/;
  }
}],
//Android WP
["samsung", function (ua) {
  if (ua.indexOf("samsung") !== -1) {
    return /\bsamsung(?:[ \-](?:sgh|gt|sm))?-([a-z0-9]+)/;
  } else {
    return /\b(?:sgh|sch|gt|sm)-([a-z0-9]+)/;
  }
}], ["wp", function (ua) {
  return ua.indexOf("windows phone ") !== -1 || ua.indexOf("xblwp") !== -1 || ua.indexOf("zunewp") !== -1 || ua.indexOf("windows ce") !== -1;
}], ["pc", "windows"], ["ipad", "ipad"],
// ipod iphone
["ipod", "ipod"], ["iphone", /\biphone\b|\biph(\d)/], ["mac", "macintosh"], ["mi", /\bmi[ \-]?([a-z0-9 ]+(?= build|\)))/], ["hongmi", /\bhm[ \-]?([a-z0-9]+)/], ["aliyun", /\baliyunos\b(?:[\-](\d+))?/], ["meizu", function (ua) {
  return ua.indexOf("meizu") >= 0 ? /\bmeizu[\/ ]([a-z0-9]+)\b/ : /\bm([0-9cx]{1,4})\b/;
}], ["nexus", /\bnexus ([0-9s.]+)/], ["huawei", function (ua) {
  var re_mediapad = /\bmediapad (.+?)(?= build\/huaweimediapad\b)/;
  if (ua.indexOf("huawei-huawei") !== -1) {
    return /\bhuawei\-huawei\-([a-z0-9\-]+)/;
  } else if (re_mediapad.test(ua)) {
    return re_mediapad;
  } else {
    return /\bhuawei[ _\-]?([a-z0-9]+)/;
  }
}], ["lenovo", function (ua) {
  if (ua.indexOf("lenovo-lenovo") !== -1) {
    return /\blenovo\-lenovo[ \-]([a-z0-9]+)/;
  } else {
    return /\blenovo[ \-]?([a-z0-9]+)/;
  }
}], ["zte", function (ua) {
  if (/\bzte\-[tu]/.test(ua)) {
    return /\bzte-[tu][ _\-]?([a-su-z0-9\+]+)/;
  } else {
    return /\bzte[ _\-]?([a-su-z0-9\+]+)/;
  }
}], ["vivo", /\bvivo(?: ([a-z0-9]+))?/], ["htc", function (ua) {
  if (/\bhtc[a-z0-9 _\-]+(?= build\b)/.test(ua)) {
    return /\bhtc[ _\-]?([a-z0-9 ]+(?= build))/;
  } else {
    return /\bhtc[ _\-]?([a-z0-9 ]+)/;
  }
}], ["oppo", /\boppo[_ ]([a-z0-9]+)/], ["konka", /\bkonka[_\-]([a-z0-9]+)/], ["sonyericsson", /\bmt([a-z0-9]+)/], ["coolpad", /\bcoolpad[_ ]?([a-z0-9]+)/], ["lg", /\blg[\-]([a-z0-9]+)/], ["android", /\bandroid\b|\badr\b/], ["blackberry", function (ua) {
  if (ua.indexOf("blackberry") >= 0) {
    return /\bblackberry\s?(\d+)/;
  }
  return "bb10";
}]];
var OS = [["wp", function (ua) {
  if (ua.indexOf("windows phone ") !== -1) {
    return /\bwindows phone (?:os )?([0-9.]+)/;
  } else if (ua.indexOf("xblwp") !== -1) {
    return /\bxblwp([0-9.]+)/;
  } else if (ua.indexOf("zunewp") !== -1) {
    return /\bzunewp([0-9.]+)/;
  }
  return "windows phone";
}], ["windows", /\bwindows nt ([0-9.]+)/], ["macosx", /\bmac os x ([0-9._]+)/], ["ios", function (ua) {
  if (/\bcpu(?: iphone)? os /.test(ua)) {
    return /\bcpu(?: iphone)? os ([0-9._]+)/;
  } else if (ua.indexOf("iph os ") !== -1) {
    return /\biph os ([0-9_]+)/;
  } else {
    return /\bios\b/;
  }
}], ["yunos", /\baliyunos ([0-9.]+)/], ["android", function (ua) {
  if (ua.indexOf("android") >= 0) {
    return /\bandroid[ \/-]?([0-9.x]+)?/;
  } else if (ua.indexOf("adr") >= 0) {
    if (ua.indexOf("mqqbrowser") >= 0) {
      return /\badr[ ]\(linux; u; ([0-9.]+)?/;
    } else {
      return /\badr(?:[ ]([0-9.]+))?/;
    }
  }
  return "android";
  //return /\b(?:android|\badr)(?:[\/\- ](?:\(linux; u; )?)?([0-9.x]+)?/;
}], ["chromeos", /\bcros i686 ([0-9.]+)/], ["linux", "linux"], ["linux", /\blinux\s(?:[xi][0-9_]+;)\srv:([0-9.]+)/],
//Linux x86_64; rv:34.0
["windowsce", /\bwindows ce(?: ([0-9.]+))?/], ["cros", /\bcros armv7l ([0-9.]+)/],
//CrOS armv7l 7077.134.0
["symbian", /\bsymbian(?:os)?\/([0-9.]+)/], ["blackberry", function (ua) {
  var m = ua.match(re_blackberry_10) || ua.match(re_blackberry_6_7) || ua.match(re_blackberry_4_5);
  return m ? {
    version: m[1]
  } : "blackberry";
}], ['ie', /\rv\:\/([0-9.]+)/]];
var ENGINE = [["edgehtml", /edge\/([0-9.]+)/], ["trident", re_msie], ["blink", function () {
  return "chrome" in __webpack_require__.g && "CSS" in __webpack_require__.g && /\bapplewebkit[\/]?([0-9.+]+)/;
}], ["webkit", /\bapplewebkit[\/]?([0-9.+]+)/], ["gecko", function (ua) {
  var match = ua.match(/\brv:([\d\w.]+).*\bgecko\/(\d+)/);
  if (match) {
    return {
      version: match[1] + "." + match[2]
    };
  }
}], ["presto", /\bpresto\/([0-9.]+)/], ["androidwebkit", /\bandroidwebkit\/([0-9.]+)/], ["coolpadwebkit", /\bcoolpadwebkit\/([0-9.]+)/], ["u2", /\bu2\/([0-9.]+)/], ["u3", /\bu3\/([0-9.]+)/]];
var BROWSER = [['coccoc', /coc_coc_browser\/([0-9.]+)/],
// Microsoft Edge Browser, Default browser in Windows 10.
["edge", /edge\/([0-9.]+)/], ["chrome-edge", /chrome.+edg\/([0-9.]+)/],
// Sogou.
["sogou", function (ua) {
  if (ua.indexOf("sogoumobilebrowser") >= 0) {
    return /sogoumobilebrowser\/([0-9.]+)/;
  } else if (ua.indexOf("sogoumse") >= 0) {
    return true;
  }
  return / se ([0-9.x]+)/;
}],
// Maxthon
["maxthon", function () {
  try {
    if (external && (external.mxVersion || external.max_version)) {
      return {
        version: external.mxVersion || external.max_version
      };
    }
  } catch (ex) {/* */}
  return /\b(?:maxthon|mxbrowser)(?:[ \/]([0-9.]+))?/;
}], ["micromessenger", /\bmicromessenger\/([\d.]+)/], ["qq", /\bm?qqbrowser\/([0-9.]+)/], ["green", "greenbrowser"], ["tt", /\btencenttraveler ([0-9.]+)/], ["liebao", function (ua) {
  if (ua.indexOf("liebaofast") >= 0) {
    return /\bliebaofast\/([0-9.]+)/;
  }
  if (ua.indexOf("lbbrowser") === -1) {
    return false;
  }
  var version;
  try {
    if (external && external.LiebaoGetVersion) {
      version = external.LiebaoGetVersion();
    }
  } catch (ex) {/* */}
  return {
    version: version || NA_VERSION
  };
}], ["tao", /\btaobrowser\/([0-9.]+)/], ["coolnovo", /\bcoolnovo\/([0-9.]+)/], ["saayaa", "saayaa"], ["baidu", /\b(?:ba?idubrowser|baiduhd)[ \/]([0-9.x]+)/], ["ie", re_msie], ["mi", /\bmiuibrowser\/([0-9.]+)/], ["opera", function (ua) {
  var re_opera_old = /\bopera.+version\/([0-9.ab]+)/;
  var re_opera_new = /\bopr\/([0-9.]+)/;
  return re_opera_old.test(ua) ? re_opera_old : re_opera_new;
}], ["oupeng", /\boupeng\/([0-9.]+)/], ["yandex", /yabrowser\/([0-9.]+)/], ["ali-ap", function (ua) {
  if (ua.indexOf("aliapp") > 0) {
    return /\baliapp\(ap\/([0-9.]+)\)/;
  } else {
    return /\balipayclient\/([0-9.]+)\b/;
  }
}], ["ali-ap-pd", /\baliapp\(ap-pd\/([0-9.]+)\)/], ["ali-am", /\baliapp\(am\/([0-9.]+)\)/], ["ali-tb", /\baliapp\(tb\/([0-9.]+)\)/], ["ali-tb-pd", /\baliapp\(tb-pd\/([0-9.]+)\)/], ["ali-tm", /\baliapp\(tm\/([0-9.]+)\)/], ["ali-tm-pd", /\baliapp\(tm-pd\/([0-9.]+)\)/], ["uc", function (ua) {
  if (ua.indexOf("ucbrowser/") >= 0) {
    return /\bucbrowser\/([0-9.]+)/;
  } else if (ua.indexOf("ubrowser/") >= 0) {
    return /\bubrowser\/([0-9.]+)/;
  } else if (/\buc\/[0-9]/.test(ua)) {
    return /\buc\/([0-9.]+)/;
  } else if (ua.indexOf("ucweb") >= 0) {
    // `ucweb/2.0` is compony info.
    // `UCWEB8.7.2.214/145/800` is browser info.
    return /\bucweb([0-9.]+)?/;
  } else {
    return /\b(?:ucbrowser|uc)\b/;
  }
}], ["baiduboxapp", function (ua) {
  var back = 0;
  var a;
  if (/ baiduboxapp\//i.test(ua)) {
    a = /([\d+.]+)_(?:diordna|enohpi)_/.exec(ua);
    if (a) {
      a = a[1].split(".");
      back = a.reverse().join(".");
    } else if (a = /baiduboxapp\/([\d+.]+)/.exec(ua)) {
      back = a[1];
    }
    return {
      version: back
    };
  }
  return false;
}], ["oppobrowser", /\boppobrowser\/([0-9.]+)/], ["edge-android", / (?:edga)\/([0-9.]+)/], ["chrome", / (?:chrome|crios|crmo)\/([0-9.]+)/],
// Android safari 
["android", function (ua) {
  if (ua.indexOf("android") === -1) {
    return;
  }
  return /\bversion\/([0-9.]+(?: beta)?)/;
}], ["blackberry", function (ua) {
  var m = ua.match(re_blackberry_10) || ua.match(re_blackberry_6_7) || ua.match(re_blackberry_4_5);
  return m ? {
    version: m[1]
  } : "blackberry";
}], ["safari", /\bversion\/([0-9.]+(?: beta)?)(?: mobile(?:\/[a-z0-9]+)?)? safari\//],
//  Safari, WebView
["webview", /\bcpu(?: iphone)? os (?:[0-9._]+).+\bapplewebkit\/([0-9.]+)\b/], ["webview", /os x (?:[0-9._]+).+\bapplewebkit\/([0-9.]+)\b/], ["firefox", /\bfirefox\/([0-9.ab]+)/], ["nokia", /\bnokiabrowser\/([0-9.]+)/]];
module.exports = {
  device: DEVICES,
  os: OS,
  browser: BROWSER,
  engine: ENGINE,
  re_msie: re_msie
};

/***/ }),

/***/ 63445:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @augments Node
 * @augments ChildNode
 * @augments ParentNode
 * @augments Element
 * @augments HTMLElement
 * @augments EventEmitter
 * @augments ElementCSSInlineStyle
 * @constructor
 */
function AElement() {
  _EventEmitter["default"].call(this);
  this._azar_extendAttributes = this._azar_extendAttributes || {};
  this._azar_extendTags = {};
  this.eventHandler = {};
}
_OOP["default"].mixClass(AElement, _EventEmitter["default"]);
AElement.prototype.init = function (props) {
  Object.assign(this, props || {});
};
AElement.prototype.eventHandler = {};

/***
 * run super-class method
 */
AElement.prototype["super"] = function () {/* nope */
};

/**
 * @typedef {Object} AttributeDefiner
 * @property {Function} set
 * @property {Function} get
 * @property {Function} remove
 *
 * @param {String} key
 * @param {AttributeDefiner} def
 */
AElement.prototype.defineAttribute = function (key, def) {
  this._azar_extendAttributes[key] = def;
};
AElement.prototype.defineAttributes = function (defs) {
  for (var key in defs) {
    this.defineAttribute(key, defs[key]);
  }
};
AElement.prototype.attr = function () {
  if (arguments.length === 1) {
    if (typeof arguments[0] == 'string') {
      if (this._azar_extendAttributes[arguments[0]]) {
        return this._azar_extendAttributes[arguments[0]].get.call(this);
      } else return this.getAttribute(arguments[0]);
    } else {
      for (var key in arguments[0]) {
        this.attr(key, arguments[0][key]);
      }
    }
  } else {
    if (arguments.length == 2) {
      if (arguments[1] === null || arguments[1] === undefined) {
        if (this._azar_extendAttributes[arguments[0]]) {
          this._azar_extendAttributes[arguments[0]].remove.call(this, arguments[1]);
        } else this.removeAttribute(arguments[0]);
      } else {
        if (this._azar_extendAttributes[arguments[0]]) {
          this._azar_extendAttributes[arguments[0]].set.call(this, arguments[1]);
        } else {
          this.setAttribute(arguments[0], arguments[1]);
        }
      }
    }
  }
  return this;
};

/***
 * add style
 * @param {CSSStyleDeclaration|string|{}} arg0
 * @param {string} arg1
 * @returns {this}
 */
/**
 * add style
 * @param {CSSStyleDeclaration|string|{}} arg0
 * @param {string|[]=} arg1
 * @returns {this}
 */
AElement.prototype.addStyle = function (arg0, arg1) {
  if (typeof arg0 == 'string') {
    if (arg0.indexOf('-') >= 0) {
      if (arg1 && arg1.forEach) {
        this.style.setProperty.apply(this.style, [arg0].concat(arg1));
      } else {
        this.style.setProperty(arg0, arg1);
      }
    } else {
      this.style[arg0] = arg1;
    }
  } else {
    for (var key in arg0) {
      this.addStyle(key, arg0[key]);
    }
  }
  return this;
};

/***
 *
 * @param {string|string[]|CSSStyleDeclaration} arg0
 * @returns {this}
 */
AElement.prototype.removeStyle = function (arg0) {
  var key;
  if (arg0.charAt) {
    if (arg0.indexOf('-') >= 0) {
      this.style.removeProperty(arg0);
    } else {
      this.style[arg0] = null;
      delete this.style[arg0];
    }
  } else {
    if (arg0.map && arg0.forEach) {
      for (var i = 0; i < arg0.length; ++i) {
        this.removeStyle(arg0[i]);
      }
    } else {
      for (key in arg0) {
        this.removeStyle(key);
      }
    }
  }
  return this;
};
AElement.prototype.addChild = function (child) {
  if (child.indexOf && child.map && child.forEach) {
    for (var i = 0; i < child.length; ++i) {
      this.appendChild(child[i]);
    }
  } else this.appendChild(child);
  return this;
};
AElement.prototype.addTo = function (parent) {
  if (parent && parent.appendChild) {
    if (parent.addChild) parent.addChild(this);else parent.appendChild(this);
  } else throw Error("Can not append to " + parent + "!");
  return this;
};
AElement.prototype.selfRemove = function () {
  if (this.parentElement) this.parentElement.removeChild(this);
  return this;
};
AElement.prototype.selfReplace = function (newNode) {
  if (this.parentElement) this.parentElement.replaceChild(newNode, this);
  return this;
};
AElement.prototype.clearChild = function () {
  while (this.lastChild) {
    this.removeChild(this.lastChild);
  }
  return this;
};

/**
 *
 * @param {string|Array} className
 * @returns {Boolean}
 */
AElement.prototype.hasClass = function (className) {
  return this.classList.contains(className);
};

/**
 *
 * @param {string|Array} className
 * @returns {this}
 */
AElement.prototype.addClass = function (className) {
  if (className && className.forEach && className.map) {
    for (var i = 0; i < className.length; ++i) {
      this.classList.add(className[i]);
    }
  } else this.classList.add(className);
  return this;
};

/**
 *
 * @param {string|Array} className
 * @returns {this}
 */
AElement.prototype.removeClass = function (className) {
  if (className && className.forEach && className.map) {
    for (var i = 0; i < className.length; ++i) {
      this.classList.remove(className[i]);
    }
  } else this.classList.remove(className);
  return this;
};
AElement.prototype.getComputedStyleValue = function (key) {
  return window.getComputedStyle(this).getPropertyValue(key);
};
AElement.prototype.getFontSize = function () {
  return parseFloat(this.getComputedStyleValue('font-size').replace('px', ''));
};
AElement.prototype.findChildAfter = function (obj) {
  var r = 0;
  for (var i = 0; i < this.childNodes.length; ++i) {
    if (obj == this.childNodes[i]) {
      r = i + 1;
      break;
    }
  }
  if (this.childNodes[r]) return this.childNodes[r];
  return undefined;
};
AElement.prototype.findChildBefore = function (obj) {
  var r = 0;
  for (var i = 0; i < this.childNodes.length; ++i) {
    if (obj == this.childNodes[i]) {
      r = i - 1;
      break;
    }
  }
  if (this.childNodes[r]) return this.childNodes[r];
  return undefined;
};
AElement.prototype.addChildBefore = function (newItem, bf) {
  this.insertBefore(newItem, bf);
  return this;
};
AElement.prototype.addChildAfter = function (newItem, at) {
  var atIdx;
  if (at) {
    atIdx = Array.prototype.indexOf.call(this.childNodes, at);
    if (atIdx >= 0) {
      this.insertBefore(newItem, this.childNodes[atIdx + 1]);
    } else {
      throw new Error("Failed to execute 'addChildAfter' on 'Node': The node before which the new node is to be inserted is not a child of this node.");
    }
  } else {
    this.insertBefore(newItem, this.firstChild);
  }
  return this;
};

/**
 * @returns {DOMRect}
 */
AElement.prototype.getBoundingRecursiveRect = function (depth) {
  if (depth === undefined) depth = 10000;
  var current, next;
  var oo = 1000000;
  var ac = {
    left: oo,
    right: -oo,
    top: oo,
    bottom: -oo,
    width: 0,
    height: 0
  };
  var stacks = [{
    e: this,
    d: 0
  }];
  while (stacks.length > 0) {
    current = stacks.pop();
    if (current.e.getBoundingClientRect) {
      var cRect = current.e.getBoundingClientRect();
      if (!cRect || !(cRect.width || cRect.height || cRect.left || cRect.right)) continue;
      ac.left = Math.min(ac.left, cRect.left);
      ac.top = Math.min(ac.top, cRect.top);
      ac.bottom = Math.max(ac.bottom, cRect.bottom);
      ac.right = Math.max(ac.right, cRect.right);
      ac.height = ac.bottom - ac.top;
      ac.width = ac.right - ac.left;
      var childNodes = current.e.childNodes;
      if (childNodes && childNodes.length > 0 && current.d < depth) {
        for (var i = 0; i < childNodes.length; ++i) {
          next = {
            e: childNodes[i],
            d: current.d + 1
          };
          stacks.push(next);
        }
      }
    }
  }
  return ac;
};

/***
 *
 * @param parent
 * @returns {boolean}
 */
AElement.prototype.isDescendantOf = function (parent) {
  if (!parent || !parent.childNodes || !parent.childNodes.length) return false;
  var child = this;
  while (child) {
    if (child === parent) return true;
    child = child.parentNode;
  }
  return false;
};

/*************************** **********************/
AElement.prototype.getCSSRules = function () {
  var sheets = document.styleSheets;
  var ret = [];
  this.matches = this.matches || this.webkitMatchesSelector || this.mozMatchesSelector || this.msMatchesSelector || this.oMatchesSelector;
  for (var i in sheets) {
    if (sheets[i].href) continue; //because can not access, you must clone link node instead
    var rules = sheets[i].rules || sheets[i].cssRules;
    for (var r in rules) {
      if (this.matches(rules[r].selectorText)) {
        ret.push(rules[r]);
      }
    }
  }
  return ret;
};

/***
 * @returns {Promise}
 */

/***
 * WARNING: this function may be unsafe
 */
AElement.prototype.afterDisplayed = function (requestTimesOut) {
  if (!requestTimesOut) requestTimesOut = 24 * 3600 * 33;
  // var tracer = new Error();
  var current = this;
  return new Promise(function (resolve, reject) {
    function trace() {
      if (requestTimesOut < 0) {
        // reject(tracer);
        // if (absol.BUILD && absol.BUILD.version == "DEBUG")
        //     console.warn("Element not displayed", trace);
      } else {
        requestTimesOut--;
        var bound = current.getBoundingClientRect();
        if (bound.width > 0 || bound.height > 0) {
          resolve();
        } else {
          setTimeout(trace, 33);
          return;
        }
      }
    }
    trace();
  });
};
!function () {
  var origin = AElement.prototype.on;
  if (_BrowserDetector["default"].isSafari && !_BrowserDetector["default"].isMobile && false) {}
  if (_BrowserDetector["default"].isFirefox && false) {}
}();
AElement.eventProperties = ["altKey", "bubbles", "button", "buttons", "cancelBubble", "cancelable", "clientX", "clientY", "composed", "ctrlKey", "currentTarget", "defaultPrevented", "deltaMode", "deltaX", "deltaY", "deltaZ", "detail", "eventPhase", "explicitOriginalTarget", "isTrusted", "layerX", "layerY", "metaKey", "movementX", "movementY", "mozInputSource", "mozPressure", "offsetX", "offsetY", "originalTarget", "pageX", "pageY", "rangeOffset", "rangeParent", "region", "relatedTarget", "returnValue", "screenX", "screenY", "shiftKey", "srcElement", "target", "timeStamp", "type", "deltaMode", "deltaX", "deltaY", "deltaZ"];
var _default = AElement;
exports["default"] = _default;

/***/ }),

/***/ 75658:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @augments AElement
 * @augments SVGGraphicsElement
 * @constructor
 */
function AElementNS() {
  _AElement["default"].call(this);
}
_AElement["default"].prototype.afterAttached = function () {
  if (this.isDescendantOf(document.body)) return Promise.resolve();
  var attachHookElt = this.$attachhook || this.querySelector('.absol-attachhook');
  if (!attachHookElt) {
    var constructor;
    if (this.tagName.toLowerCase() === 'svg' || this.getBBox) {
      attachHookElt = document.createElementNS('http://www.w3.org/2000/svg', 'image');
      attachHookElt.setAttributeNS(null, 'href', '');
      constructor = AElementNS;
    } else {
      attachHookElt = document.createElement('img');
      attachHookElt.src = '';
      constructor = AElementNS;
    }
    attachHookElt.classList.add('absol-attachhook');
    Object.assign(attachHookElt, constructor.prototype);
    constructor.call(attachHookElt);
    attachHookElt.defineEvent('attached');
    this.$attachhook = attachHookElt;
    this.$attachhook.on('error', function (event) {
      if (this.isDescendantOf(document.body)) this.emit('attached', event, this);
    });
    this.appendChild(attachHookElt);
  }
  return new Promise(function (rs) {
    attachHookElt.once('attached', rs);
  });
};
_OOP["default"].mixClass(AElementNS, _AElement["default"]);
AElementNS.prototype.attr = function () {
  if (arguments.length == 1) {
    if (typeof arguments[0] == 'string') {
      if (this._azar_extendAttributes[arguments[0]]) {
        return this._azar_extendAttributes[arguments[0]].get.call(this);
      } else return this.getAttributeNS(null, arguments[0]);
    } else {
      for (var key in arguments[0]) {
        this.attr(key, arguments[0][key]);
      }
    }
  } else {
    if (arguments.length == 2) {
      if (arguments[1] === null || arguments[1] === undefined) {
        if (this._azar_extendAttributes[arguments[0]]) {
          this._azar_extendAttributes[arguments[0]].remove.call(this, arguments[1]);
        } else this.removeAttributeNS(null, arguments[0]);
      } else {
        if (this._azar_extendAttributes[arguments[0]]) {
          this._azar_extendAttributes[arguments[0]].set.call(this, arguments[1]);
        } else {
          this.setAttributeNS(null, arguments[0], arguments[1]);
        }
      }
    }
  }
  return this;
};
var _default = AElementNS;
exports["default"] = _default;

/***/ }),

/***/ 7068:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.AttachHook = AttachHook;
exports["default"] = void 0;
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
window.pendingAttachHooks = {};
var pendingId = 0;

/***
 * @extends AElement
 * @constructor
 */
function AttachHook() {
  this._attached = false;
  this._canceled = false;
  this._pendingId = ++pendingId;
  this._eventAdded = false;
  this.counter = 0;
  this.delayTime = 0;
}
AttachHook.prototype._addAttachedEvent = function () {
  if (this._eventAdded) return;
  this.addEventListener('error', function (event) {
    if (!this._attached && this.isDescendantOf(document.body)) {
      this._attached = true;
      if (this.waitTimeout > 0) clearTimeout(this.waitTimeout);
      delete pendingAttachHooks[this._pendingId];
      if (this._canceled) return;
      this.emit('attached', event, this);
    }
  });
  this._eventAdded = true;
  if (!this._canceled) {
    pendingAttachHooks[this._pendingId] = this;
    this.waitAttaching();
  }
};
AttachHook.prototype.eventEmittorOnWithTime = function (isOnce, arg0, arg1, arg2) {
  if (arg0 === 'attached') {
    this._addAttachedEvent();
    return _AElement["default"].prototype.eventEmittorOnWithTime.apply(this, arguments);
  } else {
    return _AElement["default"].prototype.eventEmittorOnWithTime.apply(this, arguments);
  }
};
/*
AttachHook.prototype.on = function () {
    if (arguments[0] === 'attached') {
        this._addAttachedEvent();
        AElement.prototype.on.apply(this, arguments);
    }
    else {
        AElement.prototype.on.apply(this, arguments);
    }
    return this;
};


AttachHook.prototype.once = function () {
    if (arguments[0] === 'attached') {
        this._addAttachedEvent();
        AElement.prototype.once.apply(this, arguments);
    }
    else {
        AElement.prototype.once.apply(this, arguments);
    }
    return this;
};*/

AttachHook.render = function (data, option, domInstance) {
  var attributes = {};
  var tag;
  if (domInstance.defaultTag === 'div') {
    attributes.src = '';
    tag = 'img';
  } else {
    tag = 'image';
    attributes.href = '';
  }
  return domInstance._({
    tag: tag,
    "class": 'absol-attachhook',
    extendEvent: ['attached'],
    style: {
      display: 'none'
    },
    attr: attributes,
    props: {
      domInstance: domInstance
    }
  });
};
AttachHook.prototype.waitAttaching = function () {
  if (this._canceled) return;
  var self = this;
  // if (BrowserDetector.browser.type.startsWith('chrome') && parseInt((BrowserDetector.browser.version || '').split('.').shift()) >= 113) {
  if (this.waitTimeout > 0) clearTimeout(this.waitTimeout);
  this.waitTimeout = setTimeout(function wait() {
    self.waitTimeout = -1;
    self.counter++;
    if (self.counter === 1) self.delayTime = 10;else if (self.counter === 5) self.delayTime = 30;else if (self.counter === 50) self.delayTime = 60;else if (self.counter === 100) self.delayTime = 100;else if (self.counter === 500) self.delayTime = 1000;
    if (!self._attached && self.isDescendantOf(document.body)) {
      self._attached = true;
      delete pendingAttachHooks[self._pendingId];
      if (self._canceled) return;
      self.emit('attached', {
        target: this
      }, self);
    } else if (!self._attached && !self._canceled) {
      self.waitTimeout = setTimeout(wait, self.delayTime);
    }
  }, this.delayTime);
  // }
};

AttachHook.prototype.cancelWaiting = function () {
  if (this.waitTimeout > 0) clearTimeout(this.waitTimeout);
  this._canceled = true;
  delete pendingAttachHooks[this._pendingId];
};
AttachHook.prototype.resetState = function () {
  if (this.waitTimeout > 0) clearTimeout(this.waitTimeout);
  this._attached = false;
  this._canceled = false;
  this.counter = 0;
  this.delayTime = 1;
  if (this.tagName.toLowerCase() === 'img') {
    this.attr('src', '');
  } else {
    this.attr('href', '');
  }
  pendingAttachHooks[this._pendingId] = this;
  this.waitAttaching();
};
AttachHook.property = {
  attached: {
    get: function get() {
      return !!this._attached;
    }
  },
  canceled: {
    get: function get() {
      return !!this._canceled;
    }
  }
};
var _default = AttachHook;
exports["default"] = _default;

/***/ }),

/***/ 89085:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.copyImage = copyImage;
exports.copyText = copyText;
exports.pasteText = pasteText;
function copyImage(src) {
  var ranges, sel;
  if (window.getSelection) {
    sel = window.getSelection();
    //backup
    ranges = [];
    for (var i = 0; i < sel.rangeCount; ++i) {
      ranges.push(sel.getRangeAt(i));
    }

    //copy
    var contentdiv = document.createElement('div');
    var image = document.createElement('img');
    contentdiv.appendChild(image);
    image.src = src;
    contentdiv.contentEditable = true;
    // contentdiv.style.display = 'none';
    document.body.appendChild(contentdiv);
    var range = document.createRange();
    range.selectNodeContents(image);
    sel.removeAllRanges();
    sel.addRange(range);
    document.execCommand('copy');
    // contentdiv.remove();

    //recover
    sel.removeAllRanges();
    for (var i = 0; i < sel.rangeCount; ++i) {
      sel.addRange(ranges[i]);
    }
  } else {
    console.error("Not support copy!");
    //not support IE
  }
}

function fallbackCopyTextToClipboard(text) {
  return new Promise(function (resolve, reject) {
    var textArea = document.createElement("textarea");
    textArea.value = text;

    // Avoid scrolling to bottom
    textArea.style.top = "0";
    textArea.style.left = "0";
    textArea.style.position = "fixed";
    document.body.appendChild(textArea);
    textArea.focus();
    textArea.select();
    try {
      var successful = document.execCommand('copy');
      if (successful) {
        resolve();
      } else {
        reject();
      }
    } catch (err) {
      reject(err);
    }
    document.body.removeChild(textArea);
  });
}
function copyText(text) {
  if (!navigator.clipboard) {
    return fallbackCopyTextToClipboard(text);
  }
  return navigator.clipboard.writeText(text);
}
function fallbackReadTextFromClipboard() {
  return new Promise(function (resolve, reject) {
    var textArea = document.createElement("textarea");

    // Avoid scrolling to bottom
    textArea.style.top = "0";
    textArea.style.left = "0";
    textArea.style.position = "fixed";
    document.body.appendChild(textArea);
    textArea.focus();
    try {
      var successful = document.execCommand('paste');
      if (successful) {
        resolve(textArea.value);
      } else {
        reject();
      }
    } catch (err) {
      reject(err);
    }
    document.body.removeChild(textArea);
  });
}
function pasteText() {
  if (navigator.clipboard) {
    return navigator.clipboard.readText();
  } else {
    return fallbackReadTextFromClipboard();
  }
}

/***/ }),

/***/ 81809:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _OOP = __webpack_require__(38608);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @extends EventEmitter
 * @constructor
 */
function DelaySignal() {
  _EventEmitter["default"].call(this);
  this.signals = {};
  this.to = this.NO_WAIT;
  this.execSignal = this.execSignal.bind(this);
}
(0, _OOP.mixClass)(DelaySignal, _EventEmitter["default"]);
DelaySignal.NO_WAIT = -1;
DelaySignal.prototype.NO_WAIT = DelaySignal.NO_WAIT;
DelaySignal.prototype.delay = 4;
DelaySignal.prototype.execSignal = function () {
  this.to = this.NO_WAIT;
  var signals = this.signals;
  this.signals = {};
  for (var name in signals) {
    this.fire.apply(this, [name].concat(signals[name]));
  }
};
DelaySignal.prototype.emit = function (name) {
  this.signals[name] = Array.prototype.slice.call(arguments, 1);
  if (this.to === this.NO_WAIT) {
    if (window.Thread && window.Thread.setTimeout) {
      this.to = window.Thread.setTimeout({
        func: this.execSignal,
        time: this.delay,
        type: 'background',
        args: []
      });
    } else {
      this.to = setTimeout(this.execSignal, this.delay);
    }
  }
  return this;
};
DelaySignal.prototype.revokeResource = function () {
  if (this.to !== this.NO_WAIT) {
    clearTimeout(this.to);
  }
  delete this.signals;
  delete this.execSignal;
};
var _default = DelaySignal;
exports["default"] = _default;

/***/ }),

/***/ 64821:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.FeatureClass = void 0;
exports.activeFullScreen = activeFullScreen;
exports.copyStyleRule = copyStyleRule;
exports["default"] = exports.deactiveFullScreen = void 0;
exports.depthClone = depthClone;
exports.depthCloneWithStyle = depthCloneWithStyle;
exports.fontFaceIsLoaded = fontFaceIsLoaded;
exports.getConstructDescriptor = getConstructDescriptor;
exports.getScreenSize = getScreenSize;
exports.getScrollSize = getScrollSize;
exports.getSystemFontSize = getSystemFontSize;
exports.getTextNodeBound = getTextNodeBound;
exports.imageToCanvas = imageToCanvas;
exports.inactiveFullScreen = inactiveFullScreen;
exports.isDomNode = isDomNode;
exports.isFullScreen = isFullScreen;
exports.isVisibilityOnScreen = isVisibilityOnScreen;
exports.traceOutBoundingClientRect = traceOutBoundingClientRect;
exports.waitIFrameLoaded = waitIFrameLoaded;
exports.waitImageLoaded = waitImageLoaded;
var _JSPath = _interopRequireDefault(__webpack_require__(67807));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _getFunctionName = _interopRequireDefault(__webpack_require__(13721));
var _ElementNS = _interopRequireDefault(__webpack_require__(75914));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _attribute = __webpack_require__(18144);
var _AttachHook = _interopRequireDefault(__webpack_require__(7068));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @typedef {{"accept-charset":string, "http-equiv": string, accept : string, accesskey : string, action : string, align : string, allow : string, alt : string, async : string, autocapitalize : string, autocomplete : string, autofocus : string, autoplay : string, background : string, bgcolor : string, border : string, buffered : string, capture : string, challenge : string, charset : string, checked : string, cite : string, class : string, code : string, codebase : string, color : string, cols : string, colspan : string, content : string, contenteditable : string, contextmenu : string, controls : string, coords : string, crossorigin : string, csp : string, data : string, "data-*" : string, datetime : string, decoding : string, default : string, defer : string, dir : string, dirname : string, disabled : string, download : string, draggable : string, dropzone : string, enctype : string, enterkeyhint : string, for : string,     form : string, formaction : string, formenctype : string, formmethod : string, formnovalidate : string, formtarget : string, headers : string, height : string, hidden : string, high : string, href : string, hreflang : string, icon : string, id : string, importance : string, integrity : string, intrinsicsize : string, inputmode : string, ismap : string, itemprop : string, keytype : string, kind : string, label : string, lang : string, language : string, loading : string, list : string, loop : string, low : string, manifest : string, max : string, maxlength : string, minlength : string, media : string, method : string, min : string, multiple : string, muted : string, name : string, novalidate : string, open : string, optimum : string, pattern : string, ping : string, placeholder : string, poster : string, preload : string, radiogroup : string, readonly : string, referrerpolicy : string, rel : string, required : string, reversed : string, rows : string, rowspan : string, sandbox : string, scope : string, scoped : string, selected : string, shape : string, size : string, sizes : string, slot : string, span : string, spellcheck : string, src : string, srcdoc : string, srclang : string, srcset : string, start : string, step : string, style : string, summary : string, tabindex : string, target : string, title : string, translate : string, type : string, usemap : string, value : string, width : string, wrap : string, }} AElementAttributeDescriptor
 */

/**
 * @typedef {{"arabic-form":string,"baseline-shift": string, "accent-height": string,  "alignment-baseline": string,  "cap-height": string,  "clip-path": string,  "clip-rule": string,  "color-dinterpolation": string,  "color-interpolation-filters": string,  "color-profile": string,  "color-rendering": string,  "dominant-baseline": string,  "enable-background": string,  "fill-opacity": string,  "fill-rule": string,  "flood-color": string,  "flood-opacity": string,  "font-family": string,  "font-size": string,  "font-size-adjust": string,  "font-stretch": string,  "font-style": string,  "font-variant": string,  "font-weight": string,  "glyph-name": string,  "glyph-orientation-horizontal": string,  "glyph-orientation-vertical": string,  "horiz-adv-x": string,  "horiz-origin-x": string,  "image-rendering": string,  "letter-spacing": string,  "lighting-color": string,  "marker-end": string,  "marker-mid": string,  "marker-start": string,  "overline-position": string,  "overline-thickness": string,  "panose-1": string,  "paint-order": string,  "pointer-events": string,  "rendering-intent": string,  "shape-rendering": string,  "stop-color": string,  "stop-opacity": string,  "strikethrough-position": string,  "strikethrough-thickness": string,  "stroke-dasharray": string,  "stroke-dashoffset": string,  "stroke-linecap": string,  "stroke-linejoin": string,  "stroke-miterlimit": string,  "stroke-opacity": string,  "stroke-width": string,  "text-anchor": string,  "text-decoration": string,  "text-rendering": string,  "transform-origin": string,  "underline-position": string,  "underline-thickness": string,  "unicode-bidi": string,  "unicode-range": string,  "units-per-em": string,  "v-alphabetic": string,  "v-hanging": string,  "v-ideographic": string,  "v-mathematical": string,  "vector-effect": string,  "vert-adv-y": string,  "vert-origin-x": string,  "vert-origin-y": string,  "word-spacing": string,  "writing-mode": string,  "x-height": string,  "xlink:actuate": string,  "xlink:arcrole": string,  "xlink:href": string,  "xlink:role": string,  "xlink:show": string,  "xlink:title": string,  "xlink:type": string,  "xml:base": string,  "xml:lang": string,  "xml:space": string, accumulate:string, additive:string, allowReorder:string, alphabetic:string, amplitude:string, ascent:string, attributeName:string, attributeType:string, autoReverse:string, azimuth:string, baseFrequency:string, baseProfile:string, bbox:string, begin:string, bias:string, by:string, calcMode:string, class:string, clip:string, clipPathUnits:string, color:string, contentScriptType:string, contentStyleType:string, cursor:string, cx:string, cy:string, d:string, decelerate:string, descent:string, diffuseConstant:string, direction:string, display:string, divisor:string, dur:string, dx:string, dy:string, edgeMode:string, elevation:string, end:string, exponent:string, externalResourcesRequired:string, fill:NamedColor|Color|string, filter:string, filterRes:string, filterUnits:string, format:string, from:string, fr:string, fx:string, fy:string, g1:string, g2:string, glyphRef:string, gradientTransform:string, gradientUnits:string, hanging:string, height:string, href:string, hreflang:string, id:string, ideographic:string, in:string, in2:string, intercept:string, k:string, k1:string, k2:string, k3:string, k4:string, kernelMatrix:string, kernelUnitLength:string, kerning:string, keyPoints:string, keySplines:string, keyTimes:string, lang:string, lengthAdjust:string, limitingConeAngle:string, local:string, markerHeight:string, markerUnits:string, markerWidth:string, mask:string, maskContentUnits:string, maskUnits:string, mathematical:string, max:string, media:string, method:string, min:string, mode:string, name:string, numOctaves:string, offset:string, opacity:string, operator:string, order:string, orient:string, orientation:string, origin:string, overflow:string, path:string, pathLength:string, patternContentUnits:string, patternTransform:string, patternUnits:string, ping:string, points:string, pointsAtX:string, pointsAtY:string, pointsAtZ:string, preserveAlpha:string, preserveAspectRatio:string, primitiveUnits:string, r:string, radius:string, referrerPolicy:string, refX:string, refY:string, rel:string, repeatCount:string, repeatDur:string, requiredExtensions:string, requiredFeatures:string, restart:string, result:string, rotate:string, rx:string, ry:string, scale:string, seed:string, slope:string, spacing:string, specularConstant:string, specularExponent:string, speed:string, spreadMethod:string, startOffset:string, stdDeviation:string, stemh:string, stemv:string, stitchTiles:string, string:string, stroke:string, style:string, surfaceScale:string, systemLanguage:string, tabindex:string, tableValues:string, target:string, targetX:string, targetY:string, textLength:string, to:string, transform:string, type:string, u1:string, u2:string, unicode:string, values:string, version:string, viewBox:string, viewTarget:string, visibility:string, width:string, widths:string, x:string, x1:string, x2:string, xChannelSelector:string, y:string, y1:string, y2:string, yChannelSelector:string, z:string, zoomAndPan:string, }}  AElementNSAttributeDescriptor
 */

/***
 * @typedef {{abort:function(event:(UiEvent|Event)):void,afterprint:function(event:Event):void,animationend:function(event:AnimationEvent):void,animationiteration:function(event:AnimationEvent):void,animationstart:function(event:AnimationEvent):void,beforeprint:function(event:Event):void,beforeunload:function(event:(UiEvent|Event)):void,blur:function(event:FocusEvent):void,canplay:function(event:Event):void,canplaythrough:function(event:Event):void,change:function(event:Event):void,click:function(event:MouseEvent):void,contextmenu:function(event:MouseEvent):void,copy:function(event:ClipboardEvent):void,cut:function(event:ClipboardEvent):void,dblclick:function(event:MouseEvent):void,drag:function(event:DragEvent):void,dragend:function(event:DragEvent):void,dragenter:function(event:DragEvent):void,dragleave:function(event:DragEvent):void,dragover:function(event:DragEvent):void,dragstart:function(event:DragEvent):void,drop:function(event:DragEvent):void,durationchange:function(event:Event):void,ended:function(event:Event):void,error:function(event:(ProgressEvent|UiEvent|Event)):void,focus:function(event:FocusEvent):void,focusin:function(event:FocusEvent):void,focusout:function(event:FocusEvent):void,fullscreenchange:function(event:Event):void,fullscreenerror:function(event:Event):void,hashchange:function(event:HashChangeEvent):void,input:function(event:(InputEvent|Event)):void,invalid:function(event:Event):void,keydown:function(event:KeyboardEvent):void,keypress:function(event:KeyboardEvent):void,keyup:function(event:KeyboardEvent):void,load:function(event:(UiEvent|Event)):void,loadeddata:function(event:Event):void,loadedmetadata:function(event:Event):void,loadstart:function(event:ProgressEvent):void,message:function(event:Event):void,mousedown:function(event:MouseEvent):void,mouseenter:function(event:MouseEvent):void,mouseleave:function(event:MouseEvent):void,mousemove:function(event:MouseEvent):void,mouseover:function(event:MouseEvent):void,mouseout:function(event:MouseEvent):void,mouseup:function(event:MouseEvent):void,mousewheel:function(event:WheelEvent):void,offline:function(event:Event):void,online:function(event:Event):void,open:function(event:Event):void,pagehide:function(event:PageTransitionEvent):void,pageshow:function(event:PageTransitionEvent):void,paste:function(event:ClipboardEvent):void,pause:function(event:Event):void,play:function(event:Event):void,playing:function(event:Event):void,popstate:function(event:PopStateEvent):void,progress:function(event:Event):void,ratechange:function(event:Event):void,resize:function(event:(UiEvent|Event)):void,reset:function(event:Event):void,scroll:function(event:(UiEvent|Event)):void,search:function(event:Event):void,seeked:function(event:Event):void,seeking:function(event:Event):void,select:function(event:(UiEvent|Event)):void,show:function(event:Event):void,stalled:function(event:Event):void,storage:function(event:StorageEvent):void,submit:function(event:Event):void,suspend:function(event:Event):void,timeupdate:function(event:Event):void,toggle:function(event:Event):void,touchcancel:function(event:TouchEvent):void,touchend:function(event:TouchEvent):void,touchmove:function(event:TouchEvent):void,touchstart:function(event:TouchEvent):void,transitionend:function(event:TransitionEvent):void,unload:function(event:(UiEvent|Event)):void,volumechange:function(event:Event):void,waiting:function(event:Event):void,wheel:function(event:WheelEvent):void}} AElementEventDescriptor
 */

/***
 * @typedef AbsolConstructDescriptor
 * @property {string | function |null} tag
 * @property {CSSStyleDeclaration} style
 * @property {Array | string} extendEvent
 * @property {Array | string} class
 * @property {Object} data
 * @property {AElementAttributeDescriptor|AElementNSAttributeDescriptor} attr
 * @property {string|AElement | AElementNS | AbsolConstructDescriptor | string[] |AElement[] | AElementNS[] | AbsolConstructDescriptor[]} child
 * @property {string} text to create a TextNode, not Element
 * @property {AElement} elt
 * @property {AElementEventDescriptor|{}} on
 * @property {Object} props
 *
 */

var svgCreator = function svgCreator() {
  var temp = document.createElement('div');
  temp.innerHTML = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>';
  var element = temp.childNodes[0];
  var prototypes = Object.getOwnPropertyDescriptors(_AElement["default"].prototype);
  Object.defineProperties(element, prototypes);
  _AElement["default"].call(element);
  return element;
};

/***
 *
 * @param {*=} option
 * @constructor
 */
function Dom(option) {
  option = option || {};
  this.creator = option.creator || {};
  Object.defineProperties(this.creator, {
    svg: {
      set: function set() {
        //do nothing
      },
      get: function get() {
        return svgCreator;
      }
    },
    attachhook: {
      set: function set() {
        //do nothing
      },
      get: function get() {
        return _AttachHook["default"];
      }
    }
  });
  this['$ '.trim()] = this.$.bind(this);
  this['_ '.trim()] = this._.bind(this);
  this['$' + '$'] = this.$$.bind(this);
  this.buildDom = this._;
}
Dom.prototype.defaultTag = 'div';
Dom.prototype.fromCode = function (code) {
  code = code.trim().replace(/>\s+</gm, '><');
  var temTag = 'div';
  if (code.startsWith('<td') || code.startsWith('<th') && !code.startsWith('<thead')) temTag = 'tr';else if (code.startsWith('<tr')) temTag = 'tbody';else if (code.startsWith('<thead') || code.startsWith('<tbody')) temTag = 'table';
  var tempDiv = document.createElement(temTag);
  tempDiv.innerHTML = code;
  var element = tempDiv.childNodes[0];
  var prototypes = Object.getOwnPropertyDescriptors(_AElement["default"].prototype);
  Object.defineProperties(element, prototypes);
  _AElement["default"].call(element);
  return element;
};

/**
 * DFS
 * @param {string | AElement} query
 * @param {AElement} root
 * @param {function} onFound - return true to stop find
 * @returns {AElement | AElementNS}
 */

Dom.prototype.$ = function (query, root, onFound) {
  var res;
  if (Dom.isDomNode(query)) res = query;else res = this.select(query, root, onFound);
  if (res) this.attach(res);
  return res;
};

/***
 *
 * @type {function(string, AElement, Function): AElement}
 */
Dom.prototype.selectAttacth = Dom.prototype.$;

/**
 * DFS
 * @param {string} query
 * @param {AElement} root
 * @param {function} onFound - return true to stop find
 */
Dom.prototype.select = function (query, root, onFound) {
  root = root || document.documentElement;
  var matcher = _JSPath["default"].compileJSPath(query);
  return matcher.findFirst(root, onFound);
};
var FeatureClass = {
  AElementNS: {
    constructor: _ElementNS["default"],
    prototypeKeys: Object.keys(_ElementNS["default"].prototype)
  },
  AElement: {
    constructor: _AElement["default"],
    prototypeKeys: Object.keys(_AElement["default"].prototype)
  }
};
/**
 *
 * @param {AElement | AElementNS } element
 */
exports.FeatureClass = FeatureClass;
Dom.prototype.attach = function (element) {
  if (element.attr) return;
  var feature = element.getBBox && element.tagName !== 'svg' ? FeatureClass.AElementNS : FeatureClass.AElement;
  var elementConstructor = feature.constructor;
  var proto = elementConstructor.prototype;
  var prototypeKeys = feature.prototypeKeys;
  var n = prototypeKeys.length;
  var key;
  for (var i = 0; i < n; ++i) {
    key = prototypeKeys[i];
    element[key] = proto[key];
  }
  Object.assign(element, elementConstructor.prototype);
  elementConstructor.call(element);
};
Dom.prototype.makeNewElement = function (tagName) {
  return document.createElement(tagName);
};
Dom.prototype.makeNewTextNode = function (data) {
  return document.createTextNode(data);
};

/**
 *
 * @param {AbsolConstructDescriptor | string | {} } option
 * @param {boolean=} isInherited
 * @returns {AElementNS| AElement | Text}
 */
Dom.prototype._ = function (option, isInherited) {
  var res;
  var creator;
  if (Dom.isDomNode(option)) {
    res = option;
    option = {};
    /** fix reinit component */
    isInherited = true;
  } else {
    if (option.charAt) {
      option = option.trim();
      if (option[0] === '<') {
        res = this.fromCode(option);
        option = {};
      } else {
        var queryObj = _JSPath["default"].parseQuery(option);
        option = {};
        option.tag = queryObj.tagName || this.defaultTag;
        if (queryObj.classList && queryObj.classList.length > 0) option["class"] = queryObj.classList;
        if (queryObj.id) option.id = queryObj.id;
        if (queryObj.attributes) option.attr = queryObj.attributes;
      }
    }
  }
  if (option.text || option.text === '') {
    //is textNode
    return this.makeNewTextNode(option.text);
  }
  option.tag = option.tag || this.defaultTag;
  creator = option.tag.prototype ? option.tag : this.creator[option.tag];
  if (option.tag.prototype) option.tag = option.tag.tag;
  if (option.elt) {
    res = this._(option.elt);
  } else {
    if (!res) {
      if (creator) {
        if (creator.render) {
          res = creator.render(option.data, option, this);
        } else {
          res = creator(option.data, option, this);
        }
      } else {
        res = this.makeNewElement(option.tag);
        Object.assign(res, option.data);
      }
    }
  }
  this.attach(res);
  if (creator) {
    res._azar_extendTags = res._azar_extendTags || {};
    res._azar_extendTags[option.tag] = creator;
    creator.property && Object.defineProperties(res, creator.property);
    creator.prototype && _OOP["default"]["extends"](res, creator.prototype);
    creator.attribute && res.defineAttributes(creator.attribute);
    if (creator.render) {
      if (creator.eventHandler) {
        res.eventHandler = res.eventHandler || {};
        var eventHandler = _OOP["default"].bindFunctions(res, creator.eventHandler || creator.prototype.eventHandler);
        for (var eventHandlerKey in eventHandler) {
          if (res.eventHandler[eventHandlerKey]) {
            throw new Error("Same name of eventHandler[" + eventHandlerKey + "]");
          } else {
            res.eventHandler[eventHandlerKey] = eventHandler[eventHandlerKey];
          }
        }
      }
      creator.call(res);
    }
  }
  option.extendEvent && res.defineEvent(option.extendEvent);
  option.attr && res.attr(option.attr);
  option.on && res.on(option.on);
  option.once && res.once(option.once);
  option["class"] && res.addClass(option["class"]);
  option.style && res.addStyle(option.style);
  option.id && res.attr('id', option.id);
  if (!isInherited) res.init(option.props);
  var children = option.child;
  if (children) {
    if (!children.forEach || !children.map) {
      children = [children];
    }
    for (var i = 0; i < children.length; ++i) {
      res.addChild(this._(children[i], false));
    }
  }
  return res;
};

/***
 *
 * @type {function(Object, boolean): AElement}
 */
Dom.prototype.create = Dom.prototype._;

/***
 *
 * @param query
 * @param root
 * @returns {Array<AElement|AElementNS>}
 */
Dom.prototype.$$ = function (query, root) {
  var thisD = this;
  var res = [];
  this.selectAttacth(query, root, function (elt) {
    thisD.attach(elt);
    res.push(elt);
  });
  return res;
};
Dom.prototype.install = function (arg0, arg1) {
  var _this = this;
  if (arguments.length === 1) {
    if (arg0.creator && arg0.create && arg0.select) {
      // is a dom core
      var creator = arg0.creator;
      Object.keys(creator).forEach(function (key) {
        if (key.startsWith('_') || key.startsWith('$')) return;
        var func = creator[key];
        if (typeof func == 'function') if (_this.creator[key] !== func) _this.creator[key] = func;
      });
    } else if (typeof arg0 == 'function') {
      var name = arg0.tag || (0, _getFunctionName["default"])(arg0) || arg0.name;
      if (name) {
        this.creator[name.toLowerCase()] = arg0;
      } else {
        console.error('No ident name of creator function', arg0);
      }
    } else if (arg0 instanceof Array) {
      arg0.forEach(function (func) {
        var name = func.tag || (0, _getFunctionName["default"])(func) || func.name;
        if (name) {
          _this.creator[name.toLowerCase()] = func;
        }
      });
    } else if (_typeof(arg0) == 'object') {
      Object.keys(arg0).forEach(function (key) {
        if (key.startsWith('_') || key.startsWith('$')) return;
        var func = arg0[key];
        if (typeof func == 'function') if (_this.creator[key] !== func) _this.creator[key] = func;
      });
    } else {
      console.error('Unknown data', arg0);
    }
  } else if (arguments.length === 2) {
    if (arg0 instanceof Array) {
      if (arg1.creator) arg1 = arg1.creator;
      arg0.forEach(function (key) {
        var func = arg1[key];
        if (typeof func == 'function') if (_this.creator[key] !== func) _this.creator[key] = func;
      });
    } else if (arg0 instanceof RegExp) {
      if (arg1.creator) arg1 = arg1.creator;
      Object.keys(arg1).forEach(function (key) {
        if (key.match(arg0)) {
          var func = arg1[key];
          if (typeof func == 'function') if (_this.creator[key] !== func) _this.creator[key] = func;
        }
      });
    } else if (typeof arg0 == 'string' && arg0.length > 0) {
      if (typeof arg1 == 'function') {
        this.creator[arg0] = arg1;
      } else {
        console.error('arg1 is not a function');
      }
    }
  } else {
    console.error('Invalid param');
  }
  return this;
};

/***
 *
 * @param {String | null} tagName
 */
Dom.prototype.require = function (tagName) {
  return this.creator[tagName] || null;
};

/**
 *
 * @param {*} o
 * @returns {Boolean}
 */
function isDomNode(o) {
  return (typeof Node === "undefined" ? "undefined" : _typeof(Node)) === "object" ? o instanceof Node : o && _typeof(o) === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string";
}
Dom.isDomNode = isDomNode;

/**
 * @param {AElement|Node|HTMLElement} element
 */
function activeFullScreen(element) {
  if (element.requestFullscreen) {
    element.requestFullscreen();
  } else if (element.mozRequestFullScreen) {
    element.mozRequestFullScreen();
  } else if (element.webkitRequestFullscreen) {
    element.webkitRequestFullscreen(_AElement["default"].ALLOW_KEYBOARD_INPUT);
  } else if (element.msRequestFullscreen) {
    element.msRequestFullscreen();
  }
}
Dom.activeFullScreen = activeFullScreen;
function inactiveFullScreen() {
  if (document.exitFullscreen) {
    document.exitFullscreen();
  } else if (document.mozCancelFullScreen) {
    document.mozCancelFullScreen();
  } else if (document.webkitExitFullscreen) {
    document.webkitExitFullscreen();
  } else if (document.msExitFullscreen) {
    document.msExitFullscreen();
  }
}
Dom.inactiveFullScreen = inactiveFullScreen;

//adapt
var deactiveFullScreen = inactiveFullScreen;
exports.deactiveFullScreen = deactiveFullScreen;
Dom.deactiveFullScreen = deactiveFullScreen;
function isFullScreen() {
  var fullScreenElement = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;
  return !!fullScreenElement;
}
Dom.isFullScreen = isFullScreen;

/**
 * @param {AElement|Node|HTMLElement} current
 * @returns {ClientRect}
 */
function traceOutBoundingClientRect(current) {
  var screenSize = Dom.getScreenSize();
  var left = 0;
  var right = screenSize.width;
  var top = 0;
  var bottom = screenSize.height;
  var ox, oy, fixed;
  var bound;
  while (current) {
    fixed = _AElement["default"].prototype.getComputedStyleValue.call(current, 'position') == "fixed";
    ox = _AElement["default"].prototype.getComputedStyleValue.call(current, 'overflow-x') !== "visible";
    oy = _AElement["default"].prototype.getComputedStyleValue.call(current, 'overflow-y') !== "visible";
    var isHtml = current.tagName.toLowerCase() === 'html';
    if (ox || oy || isHtml || fixed) {
      if (isHtml) {
        bound = Object.assign({
          left: 0,
          top: 0
        }, getScreenSize());
        bound.bottom = bound.height;
        bound.right = bound.width;
      } else {
        bound = current.getBoundingClientRect();
      }
      if (ox || isHtml || fixed) {
        left = Math.max(left, bound.left);
        right = Math.min(right, bound.right);
      }
      if (oy || isHtml || fixed) {
        top = Math.max(top, bound.top);
        bottom = Math.min(bottom, bound.bottom);
      }
    }
    if (isHtml || fixed) break;
    current = current.parentElement;
  }
  return {
    left: left,
    right: right,
    top: top,
    bottom: bottom,
    width: right - left,
    height: bottom - top
  };
}
Dom.traceOutBoundingClientRect = traceOutBoundingClientRect;

/***
 *
 * @param {string} fontFace
 * @param {number} timeout
 * @returns {Promise<boolean>}
 */
function fontFaceIsLoaded(fontFace, timeout) {
  timeout = timeout || 0;
  var element = this.ShareInstance._({
    tag: 'span',
    style: {
      visibility: 'hidden',
      position: 'fixed',
      top: '-9999px',
      left: '-9999px',
      'font-size': '256px'
    },
    props: {
      innerHTML: "Test string long long long"
    }
  });
  element.addTo(document.body);
  return element.afterAttached().then(function () {
    var lastOffsetWidth = element.getBoundingClientRect().width;
    element.addStyle('font-family', fontFace);
    return new Promise(function (resolve, reject) {
      function check(remainTime) {
        if (remainTime < 0) {
          resolve(false);
          element.selfRemove();
        } else requestAnimationFrame(function () {
          var currentOffsetWidth = element.getBoundingClientRect().width;
          if (currentOffsetWidth != lastOffsetWidth) {
            resolve(true);
            element.selfRemove();
          } else check(remainTime - 10);
        });
      }
      check(timeout);
    });
  });
}
Dom.fontFaceIsLoaded = fontFaceIsLoaded;

/***
 *
 * @returns {{width: number, WIDTH: number, HEIGHT: number, height: number}}
 */
function getScreenSize() {
  var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
  var height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
  return {
    WIDTH: width,
    HEIGHT: height,
    width: width,
    height: height
  };
}
Dom.getScreenSize = getScreenSize;

/***
 *
 * @param {HTMLImageElement} img
 * @param {number=} timeout
 * @returns {Promise<void>}
 */
function waitImageLoaded(img, timeout) {
  var isLoaded = true;
  if (!img.complete) {
    isLoaded = false;
  }
  if (img.naturalWidth === 0) {
    isLoaded = false;
  }
  if (isLoaded) return Promise.resolve();
  if (!img.src) return Promise.resolve();
  return new Promise(function (rs) {
    if (img.addEventListener) {
      img.addEventListener('load', rs, false);
      img.addEventListener('error', rs, false);
    } else {
      img.attachEvent('onload', rs, false);
    }
    setTimeout(rs, timeout || 5000);
  });
  // No other way of checking: assume it’s ok.
}

Dom.waitImageLoaded = waitImageLoaded;

/***
 *
 * @param {HTMLIFrameElement| Worker} iframe
 * @returns {Promise}
 */
function waitIFrameLoaded(iframe) {
  return new Promise(function (rs, rj) {
    if (document.all) {
      iframe.onreadystatechange = function () {
        if (iframe.readyState === "complete" || iframe.readyState === "loaded") rs();
      };
    } else {
      iframe.onload = rs;
    }
    setTimeout(rs, 5000);
  });
}
Dom.waitIFrameLoaded = waitIFrameLoaded;

/***
 *
 * @param {Image} element
 * @returns {Promise<HTMLCanvasElement>}
 */
function imageToCanvas(element) {
  if (typeof element == 'string') {
    element = Dom.ShareInstance.$(element);
  }
  if (element.tagName.toLowerCase() === 'img') {
    var preRender = Dom.ShareInstance._('div');
    preRender.addStyle({
      position: 'fixed',
      top: '0',
      left: '0',
      zIndex: '-10000',
      opacity: '0'
    }).addTo(document.body);
    var canvas = document.createElement("canvas");
    preRender.addChild(canvas);
    return Dom.waitImageLoaded(element).then(function () {
      canvas.width = element.width;
      canvas.height = element.height;
      var context = canvas.getContext("2d");
      context.drawImage(element, 0, 0);
      preRender.selfRemove();
      return canvas;
    });
  } else {
    throw new Error("AElement must be image");
  }
}
Dom.imageToCanvas = imageToCanvas;
Dom.ShareInstance = new Dom();
Dom.scrollWidthPromise;
Dom.documentReady = new Promise(function (resolve) {
  if (document.body) {
    resolve();
  } else {
    window.addEventListener("load", resolve);
  }
});
function getScrollSize() {
  if (!Dom.scrollWidthPromise) Dom.scrollWidthPromise = new Promise(function (resolve) {
    function prerender() {
      var parent = Dom.ShareInstance._({
        style: {
          'z-index': '-100',
          opacity: '0',
          width: '100px',
          height: '100px',
          overflow: 'scroll',
          top: '0',
          left: '0',
          'box-sizing': 'content-box',
          position: 'fixed'
        }
      }).addTo(document.body);
      var child = Dom.ShareInstance._({
        style: {
          width: '100%',
          height: '100%'
        }
      }).addTo(parent);
      requestAnimationFrame(function () {
        var parentBound = parent.getBoundingClientRect();
        var childBound = child.getBoundingClientRect();
        resolve({
          width: parentBound.width - childBound.width,
          height: parentBound.height - childBound.height
        });
        parent.selfRemove();
      });
    }
    Dom.documentReady.then(prerender);
  });
  return Dom.scrollWidthPromise;
}
Dom.getScrollSize = getScrollSize;

/***
 *
 * @param {(AElement|AElementNS|Node)} originElt
 * @param {function(originElt: (AElement|AElementNS|Node), originElt: (AElement|AElementNS|Node)):void } afterCloneCb
 * @return {AElement|AElementNS|Node}
 */
function depthClone(originElt, afterCloneCb) {
  /***
   *
   * @type {AElement|AElementNS|Node}
   */
  var newElt = originElt.cloneNode(); //no deep
  if (originElt.childNodes) {
    /***
     *
     * @type {(AElement|AElementNS)[]}
     */
    var children = Array.prototype.map.call(originElt.childNodes, function (child) {
      return depthClone(child, afterCloneCb);
    });
    for (var i = 0; i < children.length; ++i) {
      newElt.appendChild(children[i]);
    }
  }
  return afterCloneCb && afterCloneCb(originElt, newElt) || newElt;
}

/***
 *
 * @param originElt
 * @param afterCloneCb
 * @returns {AElement|HTMLElement|Node}
 */
function depthCloneWithStyle(originElt, afterCloneCb) {
  return depthClone(originElt, function (originElt, newElt) {
    if (!originElt.getAttribute && !originElt.getAttributeNS) return;
    copyStyleRule(originElt, newElt);
    afterCloneCb && afterCloneCb(originElt, newElt);
  });
}
Dom.depthClone = depthClone;
Dom.depthCloneWithStyle = depthCloneWithStyle;

/***
 *
 * @param  {AElement|HTMLElement|Node}sourceElt
 * @param  {AElement|HTMLElement|Node} destElt
 * @returns  {AElement|HTMLElement|Node}
 */
function copyStyleRule(sourceElt, destElt) {
  if (!sourceElt.getAttribute && !sourceElt.getAttributeNS) return destElt; //is text node
  if (!destElt.getAttribute && !destElt.getAttributeNS) return destElt; //is text node, nothing to copy
  var cssRules = _AElement["default"].prototype.getCSSRules.call(sourceElt);
  var cssKey = cssRules.reduce(function (ac, rule) {
    for (var i = 0; i < rule.style.length; ++i) {
      ac[rule.style[i]] = true;
    }
    return ac;
  }, {});
  for (var key in cssKey) {
    destElt.style[key] = _AElement["default"].prototype.getComputedStyleValue.call(sourceElt, key);
  }
  return destElt;
}
Dom.copyStyleRule = copyStyleRule;

/**
 *
 */
function getSystemFontSize() {
  if (window.mobileHost && window.mobileHost.systemFont) {
    return window.mobileHost.systemFont.pointSize;
  }
  var _ = Dom.ShareInstance._;
  var initSpan = Dom.ShareInstance._({
    tag: 'span',
    style: {
      font: 'inherit'
    }
  });
  var appleSpan = Dom.ShareInstance._({
    tag: 'span',
    style: {
      font: '-apple-system-body'
    }
  }).addTo(document.body);
  var renderer = _({
    style: {
      font: 'initial',
      position: 'fixed',
      top: 0,
      left: 0,
      visibility: 'hidden',
      opacity: 0,
      zIndex: -100
    },
    child: [initSpan && appleSpan]
  }).addTo(document.body);
  var appleSize = appleSpan.getFontSize();
  var initSize = initSpan.getFontSize();
  var defaultSize = appleSize !== initSize ? appleSize : initSize;
  renderer.remove();
  return Math.round(defaultSize * 14 / 16);
}
function getTextNodeBound(textNode) {
  if (document.createRange) {
    var range = document.createRange();
    range.selectNodeContents(textNode);
    if (range.getBoundingClientRect) {
      return range.getBoundingClientRect();
    }
  }
  return null;
}
Dom.getTextNodeBound = getTextNodeBound;

/***
 * get absol construct descriptor for HTML element only
 * @param {AElement | Text} elt
 * @returns {AbsolConstructDescriptor}
 */
function getConstructDescriptor(elt) {
  var obj = {};
  obj.tag = elt.tagName.toLowerCase();
  var classAttr = elt.getAttribute('class');
  var classList;
  if (classAttr) classList = (0, _attribute.parseClassAttr)(classAttr);
  if (classList && classList.length > 0) obj["class"] = classList;
  var styleAttr = elt.getAttribute('style');
  var style;
  if (styleAttr) style = (0, _attribute.parseStyleAttr)(styleAttr);
  var attributes = elt.attributes;
  var attNode;
  var attrName;
  var attrValue;
  var attr = {};
  var on = {};
  var props = {};
  var eventMatch, eventName;
  var propMatch, propName;
  for (var i = 0; i < attributes.length; ++i) {
    attNode = attributes[i];
    attrName = attNode.nodeName;
    attrValue = attNode.nodeValue;
    if (attrName == 'style' || attrName == 'class') continue;
    eventMatch = attrName.match(/^on(.+)/);
    if (eventMatch) {
      eventName = eventMatch[1];
      on[eventName] = new Function('event', 'sender', attrValue);
      continue;
    }
    propMatch = attrName.match(/^prop-(.+)/);
    if (propMatch) {
      propName = propMatch[1];
      props[propName] = attrValue;
      continue;
    }
    attr[attrName] = attrValue;
  }
  var key;
  for (key in style) {
    //style is not empty
    obj.style = style;
    break;
  }
  for (key in attr) {
    obj.attr = attr;
    break;
  }
  for (key in on) {
    obj.on = on;
    break;
  }
  for (key in props) {
    obj.props = props;
    break;
  }
  return obj;
}
Dom.getConstructDescriptor = getConstructDescriptor;
Dom.addToResizeSystem = function (element) {
  _ResizeSystem["default"].add(element);
};
Dom.updateResizeSystem = function () {
  _ResizeSystem["default"].update();
};
Dom.updateSizeUp = function (fromElt) {
  _ResizeSystem["default"].updateUp(fromElt);
};
var _default = Dom;
/**
 *
 * @param elt
 */
exports["default"] = _default;
function isVisibilityOnScreen(elt) {
  if (!elt) return false;
  if (!_AElement["default"].prototype.isDescendantOf.call(elt, document.body)) {
    return false;
  }
  var current = elt;
  var comStyle;
  while (current) {
    if (current === document.body) break;
    comStyle = window.getComputedStyle(current, null);
    if (comStyle.getPropertyValue('display') === 'none') return false;
    if (comStyle.getPropertyValue('visisbility') === 'hidden') return false;
    if (comStyle.getPropertyValue('opacity') === '0') return false;
    current = current.parentElement;
  }
  var bound = elt.getBoundingClientRect();
  var outBound = traceOutBoundingClientRect(elt);
  if (bound.top > outBound.bottom) return false;
  if (bound.bottom < outBound.top) return false;
  if (bound.left > outBound.right) return false;
  if (bound.right < outBound.left) return false;
  return true;
}
Dom.isVisibilityOnScreen = isVisibilityOnScreen;

/***/ }),

/***/ 47341:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.clearDomImmediate = clearDomImmediate;
exports["default"] = void 0;
exports.setDomImmediate = setDomImmediate;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _AttachHook = _interopRequireDefault(__webpack_require__(7068));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @extends EventEmitter
 * @param {AElement=} attachHookElt
 * @constructor
 */
function DomSignal(attachHookElt) {
  _EventEmitter["default"].call(this);
  this.signals = {};
  this.ev_attached = this.ev_attached.bind(this);
  this.$attachhook = attachHookElt || this.createBuildInAttachHook();
  this.$attachhookParent = attachHookElt && attachHookElt.parentElement || null;
  this.$attachhook.on('attached', this.ev_attached);
  this.$attachhook.ofDS = this;
  this.isPending = false;
}
_OOP["default"].mixClass(DomSignal, _EventEmitter["default"]);
DomSignal.prototype.createBuildInAttachHook = function () {
  var elt = document.createElement('img');
  Object.defineProperties(elt, Object.getOwnPropertyDescriptors(_AElement["default"].prototype));
  Object.defineProperties(elt, Object.getOwnPropertyDescriptors(_AttachHook["default"].prototype));
  Object.defineProperties(elt, _AttachHook["default"].property);
  _AElement["default"].call(elt);
  elt.setAttribute('src', '');
  elt.defineEvent('attached');
  elt.addStyle('display', 'none');
  _AttachHook["default"].call(elt);
  elt.cancelWaiting();
  return elt;
};
DomSignal.prototype.execSignal = function () {
  var signals = this.signals;
  this.signals = {};
  this.isPending = false;
  for (var name in signals) {
    this.fire.apply(this, [name].concat(signals[name]));
  }
};
DomSignal.prototype.emit = function (name) {
  if (this.$attachhook && (this.$attachhook.canceled || this.$attachhook.attached) && !this.isPending) {
    this.$attachhook.remove();
    this.$attachhook.resetState();
  }
  this.signals[name] = Array.prototype.slice.call(arguments, 1);
  this.isPending = true;
  if (!this.$attachhookParent) {
    this.$attachhookParent = document.body;
  }
  if (!this.$attachhook.parentElement) {
    this.$attachhook.resetState();
    this.$attachhookParent.appendChild(this.$attachhook);
  }
};
DomSignal.prototype.ev_attached = function () {
  this.execSignal();
};
var _default = DomSignal;
exports["default"] = _default;
var currentAT = null;
var callbackList = {};
var id = 0;
function setDomImmediate(callback) {
  var cid = ++id;
  callbackList[cid] = {
    exec: callback,
    args: Array.prototype.slice.call(arguments, 1)
  };
  if (!currentAT) {
    currentAT = document.createElement('img');
    currentAT.setAttribute('src', '');
    currentAT.addEventListener('error', function () {
      currentAT.remove();
      currentAT = null;
      Object.keys(callbackList).map(function (key) {
        var cb = callbackList[key];
        delete callbackList[key];
        if (cb) {
          try {
            cb.exec.call(null, cb.args);
          } catch (error) {
            (0, _safeThrow["default"])(error);
          }
        }
      });
    });
  }
  return cid;
}
function clearDomImmediate(id) {
  delete callbackList[id];
}

/***/ }),

/***/ 30401:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function DynamicCSS() {
  this.elt = document.createElement('style');
  this.data = {};
  this.state = 'STANDBY';
  this.start();
}

/**
 *
 * @returns {this}
 */
DynamicCSS.prototype.commit = function () {
  var _this = this;
  this.elt.innerHTML = Object.keys(this.data).map(function (ruleQuery) {
    var rule = _this.data[ruleQuery];
    return [ruleQuery + ' {', '    ' + Object.keys(rule).map(function (name) {
      return name + ': ' + rule[name] + ';';
    }).join('\n'), '}'].join('\n');
  }).join('\n\n');
  return this;
};
DynamicCSS.prototype.start = function () {
  if (this.state !== 'STANDBY' && this.state !== 'STOP') return;
  this.state = 'RUNNING';
  document.head.appendChild(this.elt);
  return this;
};
DynamicCSS.prototype.stop = function () {
  if (this.state !== 'RUNNING') return;
  this.elt.remove();
  return this;
};
DynamicCSS.prototype.destroy = function () {
  this.stop();
  if (this.state !== 'STOP') return;
  this.elt = null;
  return this;
};

/***
 *
 * @param {string} ruleQuery
 * @param {string} name
 * @param {string} value
 * @returns {this}
 */
DynamicCSS.prototype.setProperty = function (ruleQuery, name, value) {
  this.data[ruleQuery] = this.data[ruleQuery] || {};
  this.data[ruleQuery][name] = value;
  return this;
};

/**
 *
 * @param ruleQuery
 * @param name
 * @returns {*|undefined}
 */
DynamicCSS.prototype.getProperty = function (ruleQuery, name) {
  var rule = this.data[ruleQuery];
  return rule ? rule[name] : undefined;
};

/***
 *
 * @param ruleQuery
 * @param property
 * @returns {DynamicCSS}
 */
DynamicCSS.prototype.removeProperty = function (ruleQuery, property) {
  var rule = this.data[ruleQuery];
  if (rule) delete rule[property];
  return this;
};

/***
 *
 * @param ruleQuery
 * @param {object} properties
 * @returns {this}
 */
DynamicCSS.prototype.setRule = function (ruleQuery, properties) {
  this.data[ruleQuery] = Object.assign({}, properties);
  return this;
};

/***
 *
 * @param ruleQuery
 * @param {object} properties
 * @returns {this}
 */
DynamicCSS.prototype.modifyRule = function (ruleQuery, properties) {
  this.data[ruleQuery] = Object.assign(this.data[ruleQuery] || {}, properties);
  return this;
};

/***
 *
 * @param {string} ruleQuery
 * @returns {object}
 */
DynamicCSS.prototype.getRule = function (ruleQuery) {
  return this.data[ruleQuery];
};

/**
 *
 * @param {string} ruleQuery
 * @returns {this}
 */
DynamicCSS.prototype.removeRule = function (ruleQuery) {
  delete this.data[ruleQuery];
  return this;
};

/***
 *
 * @param {object} rules
 * @returns {this}
 */
DynamicCSS.prototype.setRules = function (rules) {
  var _this2 = this;
  Object.keys(rules).forEach(function (key) {
    return _this2.setRule(key, rules[key]);
  });
  return this;
};
DynamicCSS.prototype.getRules = function () {
  return this.data;
};
DynamicCSS.prototype.modifyRules = function (rules) {
  var _this3 = this;
  Object.keys(rules).forEach(function (key) {
    return _this3.modifyRule(key, rules[key]);
  });
  return this;
};
var _default = DynamicCSS;
exports["default"] = _default;

/***/ }),

/***/ 55781:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _AElement = _interopRequireDefault(__webpack_require__(63445));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = _AElement["default"];
exports["default"] = _default;

/***/ }),

/***/ 75914:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _AElementNS = _interopRequireDefault(__webpack_require__(75658));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = _AElementNS["default"];
exports["default"] = _default;

/***/ }),

/***/ 46833:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.copyEvent = copyEvent;
exports.copyTouch = copyTouch;
exports.eventProperties = exports["default"] = void 0;
exports.findChangedTouchByIdent = findChangedTouchByIdent;
exports.findTouchByIdent = findTouchByIdent;
exports.hitElement = hitElement;
exports.isMouseLeft = isMouseLeft;
exports.isMouseMiddle = isMouseMiddle;
exports.isMouseRight = isMouseRight;
exports.touchProperties = void 0;
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function EventEmitter() {
  if (!this._azar_extendEvents) {
    Object.defineProperty(this, '_azar_extendEvents', {
      enumerable: false,
      value: this._azar_extendEvents || {
        supported: {},
        prioritize: {},
        nonprioritize: {}
      }
    });
    Object.defineProperty(this, '__azar_force', {
      value: !((typeof Node === "undefined" ? "undefined" : _typeof(Node)) === "object" ? this instanceof Node : this && _typeof(this) === "object" && typeof this.nodeType === "number" && typeof this.nodeName === "string"),
      enumerable: false
    });
  }
}
EventEmitter.prototype.defineEvent = function (name) {
  if (name instanceof Array) {
    for (var i = 0; i < name.length; ++i) {
      this._azar_extendEvents.supported[name[i]] = true;
    }
  } else this._azar_extendEvents.supported[name] = true;
  return this;
};
EventEmitter.prototype.isSupportedEvent = function (name) {
  return this.__azar_force || !!this._azar_extendEvents.supported[name];
};
EventEmitter.prototype.emit = function (eventName, data) {
  this.fire.apply(this, arguments);
};
EventEmitter.prototype.fire = function (eventName, data) {
  var others = Array.prototype.slice.call(arguments, 1);
  var listenerList;
  var i;
  var startTime, endTime;
  if (this.isSupportedEvent(eventName)) {
    if (this._azar_extendEvents.prioritize[eventName]) {
      listenerList = this._azar_extendEvents.prioritize[eventName].slice();
      for (i = 0; i < listenerList.length; ++i) {
        try {
          startTime = Date.now();
          listenerList[i].wrappedCallback.apply(this, others);
          endTime = Date.now();
          if (endTime - startTime > 200) {
            console.log('slow function call (' + (endTime - startTime) + ')', listenerList[i]);
          }
        } catch (e) {
          (0, _safeThrow["default"])(e);
        }
      }
    }
    if (this._azar_extendEvents.nonprioritize[eventName]) {
      listenerList = this._azar_extendEvents.nonprioritize[eventName].slice();
      for (i = 0; i < listenerList.length; ++i) {
        try {
          startTime = Date.now();
          listenerList[i].wrappedCallback.apply(this, others);
          endTime = Date.now();
          if (endTime - startTime > 200) {
            console.log('slow function call (' + (endTime - startTime) + ')', listenerList[i]);
          }
        } catch (e) {
          (0, _safeThrow["default"])(e);
        }
      }
    }
  } else {
    if (this.dispatchEvent) {
      var event = new Event(eventName);
      data && Object.assign(event, data);
      this.dispatchEvent(event);
    } else throw new Error("Not support event " + eventName);
  }
  return this;
};
EventEmitter.prototype.eventEmittorOnWithTime = function (isOnce, arg0, arg1, arg2) {
  if (_typeof(arg0) == 'object') {
    for (var key in arg0) {
      this.eventEmittorOnWithTime(isOnce, key, arg0[key]);
    }
    return this;
  } else {
    if (_typeof(arg1) == 'object') {
      return this.eventEmittorOnWithTime(isOnce, arg0, arg1.callback, arg1.cap);
    } else {
      var eventArr = this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] || [];
      var eventIndex = -1;
      for (var i = 0; i < eventArr.length; ++i) {
        if (eventArr[i].wrappedCallback == arg1) {
          eventIndex = i;
          break;
        }
      }
      if (eventIndex < 0) {
        var event = {
          isOnce: isOnce,
          eventName: arg0,
          callback: arg1,
          cap: !!arg2
        };
        //wrappedCallback will be call
        if (isOnce) {
          event.wrappedCallback = function () {
            this.off(event.eventName, event.wrappedCallback, event.cap);
            event.callback.apply(this, arguments);
          };
        } else {
          event.wrappedCallback = event.callback;
        }
        if (!this.isSupportedEvent(arg0)) {
          if (this.addEventListener) {
            this.addEventListener(arg0, event.wrappedCallback, !!arg2);
          } else {
            this.attachEvent('on' + arg0, arg1, !!arg2);
          }
        }
        eventArr.push(event);
        this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] = eventArr;
      } else {
        console.warn("dupplicate event");
      }
    }
    return this;
  }
};
EventEmitter.prototype.on = function (arg0, arg1, arg2) {
  this.eventEmittorOnWithTime(false, arg0, arg1, arg2);
  return this;
};
EventEmitter.prototype.once = function (arg0, arg1, arg2) {
  this.eventEmittorOnWithTime(true, arg0, arg1, arg2);
  return this;
};
EventEmitter.prototype.off = function (arg0, arg1, arg2) {
  if (_typeof(arg0) == 'object') {
    for (var key in arg0) {
      this.off(key, arg0[key]);
    }
    return this;
  } else {
    if (_typeof(arg1) == 'object') {
      return this.off(arg0, arg1.callback, arg1.cap);
    } else {
      var eventArr = this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] || [];
      var newEventArray = [];
      for (var i = 0; i < eventArr.length; ++i) {
        var event = eventArr[i];
        if (event.wrappedCallback == arg1) {
          //Dont add to newEventArray
          if (this.isSupportedEvent(arg0)) {} else {
            if (this.removeEventListener) {
              this.removeEventListener(event.eventName, event.wrappedCallback, !!event.cap);
            } else {
              this.detachEvent('on' + event.eventName, event.wrappedCallback, !!event.cap);
            }
          }
        } else {
          newEventArray.push(event);
        }
      }
      this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] = newEventArray;
      return this;
    }
  }
};
var eventProperties = ["altKey", "bubbles", "button", "buttons", "cancelBubble", "cancelable", "clientX", "clientY", "composed", "ctrlKey", "currentTarget", "defaultPrevented", "deltaMode", "deltaX", "deltaY", "deltaZ", "detail", "eventPhase", "explicitOriginalTarget", "isTrusted", "layerX", "layerY", "metaKey", "movementX", "movementY", "mozInputSource", "mozPressure", "offsetX", "offsetY", "originalTarget", "pageX", "pageY", "rangeOffset", "rangeParent", "region", "relatedTarget", "returnValue", "screenX", "screenY", "shiftKey", "srcElement", "target", "timeStamp", "type", "deltaMode", "deltaX", "deltaY", "deltaZ", 'preventDefault'];
exports.eventProperties = eventProperties;
var touchProperties = ['clientX', 'clientY', 'force', 'identifier', 'pageX', 'pageY', 'rotationAngle', 'screenX', 'screenY', 'target'];
exports.touchProperties = touchProperties;
function isMouseRight(event) {
  var isRightMB = false;
  if ("which" in event)
    // Gecko (Firefox), WebKit (Safari/Chrome) & Opera
    isRightMB = event.which === 3;else if ("button" in event)
    // IE, Opera
    isRightMB = event.button == 2;
  return isRightMB;
}
function isMouseLeft(event) {
  var isLeftMB = false;
  if ("which" in event)
    // Gecko (Firefox), WebKit (Safari/Chrome) & Opera
    isLeftMB = event.which === 1;else if ("button" in event)
    // IE, Opera
    isLeftMB = event.button === 0;
  return isLeftMB;
}
function isMouseMiddle(event) {
  var isMiddleMB = false;
  if ("which" in event)
    // Gecko (Firefox), WebKit (Safari/Chrome) & Opera
    isMiddleMB = event.which === 2;else if ("button" in event)
    // IE, Opera
    isMiddleMB = event.button === 1;
  return isMiddleMB;
}

/**
 *
 * @type AElement
 * @name sponsorElement
 * @memberof AElement#
 */
/**
 *
 * @param {AElement} element
 * @param {Event |{target: AElement}} event
 * @returns {boolean}
 */
function hitElement(element, event) {
  var current = event.target;
  while (current) {
    if (current === element) return true;
    if (current.sponsorElement && current.sponsorElement !== current.parentElement) {
      // sponsorElement like trigger of quick-menu
      if (hitElement(element, {
        target: current.sponsorElement
      })) return true;
    }
    current = current.parentElement;
  }
  return false;
}
function copyEvent(event, props) {
  var result = {};
  var key, value;
  //copy native property
  for (var i = 0; i < eventProperties.length; ++i) {
    key = eventProperties[i];
    value = event[key];
    if (value !== undefined) {
      if (typeof value == "function") {
        result[key] = event[key].bind(event);
      } else {
        result[key] = event[key];
      }
    }
  }
  Object.assign(result, event);
  if (props) Object.assign(result, props);
  if (event.changedTouches) {
    result.changedTouches = Array.prototype.map.call(event.changedTouches, function (touch) {
      return copyTouch(touch);
    });
  }
  if (event.touches) {
    result.touches = Array.prototype.map.call(event.touches, function (touch) {
      return copyTouch(touch);
    });
  }
  return result;
}
function copyTouch(touch, props) {
  var result = {};
  var key, value;
  //copy native property
  for (var i = 0; i < touchProperties.length; ++i) {
    key = touchProperties[i];
    value = touch[key];
    if (value !== undefined) {
      if (typeof value == "function") {
        result[key] = touch[key].bind(touch);
      } else {
        result[key] = touch[key];
      }
    }
  }
  Object.assign(result, touch);
  if (props) Object.assign(result, props);
  return result;
}

/***
 *
 * @param {TouchEvent} event
 * @return {Touch | null}
 */
function findChangedTouchByIdent(event, identifier) {
  if (event.changedTouches) {
    for (var i = 0; i < event.changedTouches.length; ++i) {
      if (event.changedTouches[i].identifier === identifier) {
        return event.changedTouches[i];
      }
    }
  }
  return null;
}

/***
 *
 * @param event
 * @param identifier
 * @return {Touch|null}
 */
function findTouchByIdent(event, identifier) {
  if (event.touches) {
    for (var i = 0; i < event.touches.length; ++i) {
      if (event.touches[i].identifier === identifier) {
        return event.touches[i];
      }
    }
  }
  return null;
}
EventEmitter.isMouseRight = isMouseRight;
EventEmitter.isMouseLeft = isMouseLeft;
EventEmitter.hitElement = hitElement;
EventEmitter.copyEvent = copyEvent;
EventEmitter.eventProperties = eventProperties;
var _default = EventEmitter;
exports["default"] = _default;

/***/ }),

/***/ 67807:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function JSPath(props) {
  this.path = props.path;
}

/**
 *
 * @param {Element} element
 * @returns {Boolean}
 */
JSPath.prototype.match = function (element, query) {
  if (query.id) {
    if (!element.getAttribute || element.getAttribute('id') != query.id) return false;
  }
  if (query.tagName) {
    var matchTag = false;
    if (element._azar_extendTags && element._azar_extendTags[query.tagName]) matchTag = true;
    matchTag = matchTag || (element.tagName || '').toUpperCase() == query.tagName.toUpperCase();
    if (!matchTag) return false;
  }
  if (query.classList) for (var i = 0; i < query.classList.length; ++i) {
    if (!element.classList || !element.classList.contains(query.classList[i])) return false;
  }
  if (query.attributes) {
    for (var key in query.attributes) {
      var value;
      if (element.attr) {
        value = element.attr(key);
        if (value != query.attributes[key]) return false;
      } else if (element.getAttribute) {
        value = element.getAttribute(key);
        if (value != query.attributes[key]) return false;
      }
    }
  }
  return true;
};

/**
 * Warning : still fail in some testcase
 */
JSPath.prototype.findFirst = function (root, onFound) {
  var queue = [{
    e: root,
    i: 0
  }];
  var current;
  while (queue.length > 0) {
    current = queue.shift();
    var isMathed = false;
    var currentElt = current.e;
    var currentI = current.i;
    if (this.match(currentElt, this.path[currentI])) {
      if (this.path[currentI].childCombinate) {
        var trackI = currentI;
        var trackElement = currentElt;
        var isTrackMatch = true;
        while (isTrackMatch && trackI > 0 && this.path[trackI].childCombinate) {
          if (!trackElement.parentNode || !this.match(trackElement.parentNode, this.path[trackI - 1])) {
            isTrackMatch = false;
          } else {
            trackElement = trackElement.parentNode;
            trackI--;
          }
        }
        if (isTrackMatch) isMathed = true;
      } else {
        isMathed = true;
      }
    }
    if (isMathed && currentI + 1 == this.path.length) {
      if (!onFound || onFound && onFound(currentElt)) return currentElt;
    }
    if (currentElt.childNodes) {
      var l = currentElt.childNodes.length;
      for (var i = 0; i < l; ++i) {
        if (currentElt.childNodes[i].tagName) queue.push({
          e: currentElt.childNodes[i],
          i: currentI + (isMathed && currentI + 1 < this.path.length ? 1 : 0)
        });
      }
    }
  }
  return undefined;
};
JSPath.prototype.findAll = function (root, onFound) {
  var res = [];
  var queue = [{
    e: root,
    i: 0
  }];
  var current;
  while (queue.length > 0) {
    current = queue.shift();
    var isMathed = false;
    var currentElt = current.e;
    var currentI = current.i;
    if (this.match(currentElt, this.path[currentI])) {
      if (this.path[currentI].childCombinate) {
        var trackI = currentI;
        var trackElement = currentElt;
        var isTrackMatch = true;
        while (isTrackMatch && trackI > 0 && this.path[trackI].childCombinate) {
          if (!trackElement.parentNode || !this.match(trackElement.parentNode, this.path[trackI - 1])) {
            isTrackMatch = false;
          } else {
            trackElement = trackElement.parentNode;
            trackI--;
          }
        }
        if (isTrackMatch) isMathed = true;
      } else {
        isMathed = true;
      }
    }
    if (isMathed && currentI + 1 == this.path.length) {
      if (!onFound || onFound && onFound(currentElt)) res.push(currentElt);
    }
    if (currentElt.childNodes) {
      var l = currentElt.childNodes.length;
      for (var i = 0; i < l; ++i) {
        if (currentElt.childNodes[i].tagName) queue.push({
          e: currentElt.childNodes[i],
          i: currentI + (isMathed && currentI + 1 < this.path.length ? 1 : 0)
        });
      }
    }
  }
  return res;
};
var identRegex = /[a-zA-Z0-9\-_]+/;
var stringRegex = /"(([^"\\]*|(\\.))*)"/;
var classRegex = new RegExp('\\.' + identRegex.source);
var idRegex = new RegExp('#' + identRegex.source);
var booleanRegex = /true|false/;
var valueRegex = new RegExp(stringRegex.source + '|' + booleanRegex.source);
var attributeRegex = new RegExp('\\[\\s*(' + identRegex.source + ')\\s*(=\\s*(' + valueRegex.source + '))\\]');
var queryRegex = new RegExp(['(', identRegex.source, '|', attributeRegex.source, '|', classRegex.source, '|', idRegex.source, ')+'].join(''));
JSPath.__tagRegex = new RegExp(queryRegex.source + '|\\>', 'g');
JSPath.__tagNameRegex = new RegExp('^' + identRegex.source, 'i');
JSPath.__classRegex = new RegExp(classRegex.source, 'g');
JSPath.__idRegex = new RegExp(idRegex.source, 'i');
JSPath.__attrRegex = new RegExp(attributeRegex.source, 'g');
JSPath.parseQuery = function (s) {
  var tag = {};
  s = s.replace(JSPath.__attrRegex, function (full, name, assign, jsonTextValue) {
    tag.attributes = tag.attributes || {};
    if (assign) {
      tag.attributes[name] = JSON.parse(jsonTextValue);
    } else tag.attributes[name] = true;
    return '';
  });
  var classList = s.match(this.__classRegex);
  var idList = s.match(this.__idRegex);
  var tagList = s.match(this.__tagNameRegex);
  if (idList && idList.length > 0) {
    tag.id = idList[0].substring(1);
  }
  if (tagList && tagList.length > 0) {
    tag.tagName = tagList[0].trim();
  }
  if (classList && classList.length > 0) {
    tag.classList = classList.map(function (s) {
      return s.substring(1);
    });
  }
  return tag;
};

/**
 * @param {String} text
 * @returns {JSPath}
 */
JSPath.compileJSPath = function (text) {
  var tagTexts = text.match(this.__tagRegex) || [''];
  var path = [];
  var childCombinate = false;
  for (var i = 0; i < tagTexts.length; ++i) {
    var s = tagTexts[i];
    if (s == '>') {
      childCombinate = true;
    } else {
      var tag = this.parseQuery(s);
      tag.childCombinate = childCombinate;
      path.push(tag);
      childCombinate = false;
    }
  }
  return new JSPath({
    path: path
  });
};
var _default = JSPath;
exports["default"] = _default;

/***/ }),

/***/ 19677:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.LangSys = void 0;
exports.elementLanguageChangeHandler = elementLanguageChangeHandler;
exports.textNodeLanguageChangeHandler = textNodeLanguageChangeHandler;
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @typedef LanguageSystemExtension
 * @property {function(key: string, code?: string): (string | null)} getText
 */

/****
 *
 * @constructor
 */
function LanguageSystem() {
  this.data = {};
  this.code = navigator.language || navigator.userLanguage;
  /***
   *
   * @type {LanguageSystemExtension[]}
   * @private
   */
  this._extensions = [];
}
LanguageSystem.prototype.notifyLanguageChange = function () {
  var sizeChange = false;
  function visit(elt) {
    if (elt.onlanguagechange) {
      try {
        elt.onlanguagechange();
        sizeChange = true;
      } catch (err) {
        (0, _safeThrow["default"])(err);
      }
      if (elt.childNodes && elt.childNodes.length > 0) {
        Array.prototype.forEach.call(elt.childNodes, visit);
      }
    }
  }
  visit(document.body);
  if (sizeChange) _ResizeSystem["default"].update();
};

/***
 *
 * @param {ChildNode | Text | HTMLElement | Element} node
 */
LanguageSystem.prototype.bind = function (node, key) {
  if (node.nodeType === 1) {
    this.bindTextNode(node, key);
  } else if (node.nodeType === 3) {
    this.bindElement(node, key);
  }
};

/***
 *
 * @param {Text | {__as_language_key: string}} node
 * @param {string} key
 */
LanguageSystem.prototype.bindTextNode = function (node, key) {
  node.__as_language_key = key;
  node.onlanguagechange = textNodeLanguageChangeHandler;
};

/***
 *
 * @param {ChildNode | HTMLElement | Element | {__as_language_key: string}} node
 * @param {string} key
 */
LanguageSystem.prototype.bindElement = function (node, key) {
  node.__as_language_key = key;
  node.onlanguagechange = elementLanguageChangeHandler;
};

/***
 *
 * @param {string} key
 * @param {string} [code]
 */
LanguageSystem.prototype.getText = function (key, code) {
  var code = code || this.code;
  var res;
  var ex;
  for (var i = this._extensions.length - 1; i >= 0; --i) {
    ex = this._extensions[i];
    res = ex.getText && ex.getText.apply(ex, arguments);
    if (res) break;
  }
  if (!res) {
    res = this.data[code] && this.data[code][key];
  }
  return res || null;
};

/***
 *
 * @param {LanguageSystemExtension} ex
 */
LanguageSystem.prototype.addExtension = function (ex) {
  this._extensions.push(ex);
};
var LangSys = new LanguageSystem();
exports.LangSys = LangSys;
LangSys.getText = function () {
  if (window.LanguageModule && window.LanguageModule.text) {
    LangSys.addExtension({
      getText: function getText() {
        var text = window.LanguageModule.text.apply(window.LanguageModule, arguments);
        if (text && text.startsWith('[key:') && text.charAt(text.length - 1) === ']') return null;
        return text || null;
      }
    });
    LangSys.getText = LanguageSystem.prototype.getText;
    return this.getText.apply(this, arguments);
  }
  return LanguageSystem.prototype.getText.apply(this, arguments);
};
function textNodeLanguageChangeHandler() {
  if (this.__as_language_key) {
    var newText = LangSys.getText(this.__as_language_key);
    if (newText && newText.trim) {
      this.data = newText;
    }
  }
}
function elementLanguageChangeHandler() {
  if (this.__as_language_key) {
    var newText = LangSys.getText(this.__as_language_key);
    if (newText && newText.trim) {
      var textNode;
      for (var i = 0; i < this.childNodes.length; ++i) {
        if (this.childNodes[i].nodeType === 1) {
          textNode = this.childNodes[i];
          break;
        }
      }
      if (!textNode) {
        textNode = document.createTextNode('');
      }
      textNode.data = newText;
    }
  }
}
var _default = LangSys;
exports["default"] = _default;

/***/ }),

/***/ 38608:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.bindFunctions = bindFunctions;
exports["default"] = void 0;
exports.drillProperty = drillProperty;
exports.inheritCreator = inheritCreator;
exports.mixClass = mixClass;
exports.overrideMethod = overrideMethod;
/**
 * @param {Object} object
 * @param {String} key
 * @param {Function} method
 */
function overrideMethod(object, key, method) {
  if (object[key] === undefined) object[key] = method;else {
    var _superMethod = object[key];
    object[key] = function (_superMethod, method) {
      return function () {
        var _super = this["super"];
        this["super"] = _superMethod;
        var result = method.apply(this, arguments);
        this["super"] = _super;
        return result;
      };
    }(_superMethod, method);
  }
}
function extendsObject(object, prototype) {
  // do not use setter, getter
  for (var key in prototype) {
    if (key !== 'constructor' && key !== '__proto__') {
      if (typeof prototype[key] == 'function') {
        overrideMethod(object, key, prototype[key]);
      } else if (prototype[key] !== undefined && prototype[key] !== null) {
        object[key] = prototype[key]; //just copy
      }
    }
  }
}

;
function quickInheritObject(child, parent) {
  // do not use setter, getter

  Object.keys(parent).forEach(function (key) {
    if (key !== 'constructor' && typeof parent[key] == 'function') {
      var superMethod = parent[key];
      var currentMethod = child[key];
      if (!currentMethod) child[key] = superMethod;else {
        child[key] = function () {
          var _super = this["super"];
          this["super"] = superMethod;
          var result = currentMethod.apply(this, arguments);
          this["super"] = _super;
          return result;
        };
      }
    }
  });
}
;
function drillProperty(topObject, botObject, keyTop, keyBot) {
  if (typeof keyTop == 'string') {
    keyBot = keyBot || keyTop;
    Object.defineProperty(topObject, keyTop, {
      set: function set(value) {
        botObject[keyBot] = value;
      },
      get: function get() {
        return botObject[keyBot];
      },
      configurable: true
    });
  } else {
    if (keyTop instanceof Array) {
      for (var i = 0; i < keyTop.length; ++i) {
        drillProperty(topObject, botObject, keyTop[i], keyTop[i]);
      }
    } else {
      for (var key in keyTop) {
        drillProperty(topObject, botObject, key, keyTop[key]);
      }
    }
  }
}
;
function bindFunctions(_this, handlers) {
  var res = {};
  for (var key in handlers) {
    res[key] = handlers[key].bind(_this);
  }
  return res;
}
;
function inheritCreator(parent, child) {
  var i;
  if (child.property) {
    if (parent.property) {
      for (i in parent.property) {
        if (!child.property[i]) child.property[i] = parent.property[i];
      }
    }
  }
  for (i in parent.prototype) {
    if (!child.prototype[i]) {
      child.prototype[i] = parent.prototype[i];
    } else {
      child.prototype[i] = function (superFunction, childFunction) {
        return function () {
          var _super = this["super"];
          this["super"] = superFunction;
          var result = childFunction.apply(this, arguments);
          this["super"] = _super;
          return result;
        };
      }(parent.prototype[i], child.prototype[i]);
    }
  }
}
;

/***
 *
 * @param {Function} constructor
 */
function mixClass(constructor) {
  var descriptors = {};
  for (var i = 1; i < arguments.length; ++i) {
    Object.assign(descriptors, Object.getOwnPropertyDescriptors(arguments[i].prototype));
  }
  delete descriptors.constructor;
  Object.defineProperties(constructor.prototype, descriptors);
}
var OOP = {
  overrideMethod: overrideMethod,
  "extends": extendsObject,
  inherit: quickInheritObject,
  mixClass: mixClass,
  inheritCreator: inheritCreator,
  drillProperty: drillProperty,
  bindFunctions: bindFunctions
};
var _default = OOP;
exports["default"] = _default;

/***/ }),

/***/ 62826:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _AElementNS = _interopRequireDefault(__webpack_require__(75658));
var _DelaySignal = _interopRequireDefault(__webpack_require__(81809));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @name requestUpdateSize
 * @type {function}
 * @memberof AElement#
 */

/**
 * @name updateSize
 * @type {function}
 * @memberof AElement#
 */

/**
 * @name onresize
 * @type {function}
 * @memberof AElement#
 */

/**
 * @name requestRevokeResource
 * @type {function}
 * @memberof AElement#
 */

/**
 *
 * @constructor
 */
function ResizeSystem() {
  var _this = this;
  this.elts = [];
  this.cache = [];
  this.cacheOf = null;
  this.lastResizeTime = 0;
  this.pendingElts = {};
  window.addEventListener('resize', this.update.bind(this));
  this['goDown' + 'AndCache'] = this.goDownAndCache.bind(this);
  this['notify' + 'ToElt'] = this.notifyToElt.bind(this);
  var setup = function setup() {
    _this.domSignal = new _DelaySignal["default"]();
    _this.domSignal.on('request_update_signal', _this.update.bind(_this));
    _this.domSignal.on('request_update_pending_signal', _this.updatePending.bind(_this));
    window.removeEventListener("load", setup);
  };
  if (document.body) {
    setup();
  } else {
    window.addEventListener("load", setup);
  }
}

/***
 *
 * @param {AElement | AElementNS} elt
 */
ResizeSystem.prototype.goDownAndCache = function (elt) {
  if (this.notifyToElt(elt)) this.cache.push(elt);
  if (elt.childNodes) {
    Array.prototype.forEach.call(elt.childNodes, this.goDownAndCache);
  }
};
ResizeSystem.prototype.notifyToElt = function (elt) {
  try {
    if (typeof elt.requestUpdateSize == 'function') {
      elt.requestUpdateSize();
      return true;
    } else if (typeof elt.updateSize == 'function') {
      elt.updateSize();
      return true;
    } else if (typeof elt.onresize == 'function') {
      elt.onresize();
      return true;
    }
  } catch (err) {
    console.error(err);
  }
};
ResizeSystem.prototype.update = function () {
  var now = Date.now();
  if (now - 100 > this.lastResizeTime) {
    this.removeTrash();
    this.cache = undefined;
  }
  this.lastResizeTime = now;
  if (this.cacheOf !== null) {
    this.cache = undefined;
    this.cacheOf = null;
  }
  if (this.cache === undefined) {
    this.cache = [];
    this.elts.forEach(this.goDownAndCache);
  } else {
    this.cache.forEach(this.notifyToElt);
  }
};
ResizeSystem.prototype.requestUpdateSignal = function () {
  if (!this.domSignal) return;
  this.domSignal.emit('request_update_signal');
};
ResizeSystem.prototype.removeTrash = function () {
  var oldArr = this.elts;
  var newArr = [];
  var elt;
  var n = oldArr.length;
  for (var i = 0; i < n; ++i) {
    elt = oldArr[i];
    if (_AElement["default"].prototype.isDescendantOf.call(elt, document.body)) {
      newArr.push(elt);
    } else if (typeof elt.requestRevokeResource === "function") {
      elt.requestRevokeResource();
    }
  }
  this.elts = newArr;
};

/***
 *
 * @param  {AElement| AElementNS | Node} fromElt
 * @param  {boolean=} toRoot
 * @returns {boolean}
 */
ResizeSystem.prototype.updateUp = function (fromElt, toRoot) {
  var found = false;
  while (fromElt && (!found || toRoot)) {
    found = this.notifyToElt(fromElt);
    fromElt = fromElt.parentElement;
  }
  return found;
};
ResizeSystem.prototype.updatePending = function () {
  var o = this.pendingElts;
  this.pendingElts = {};
  for (var key in o) {
    this.notifyToElt(o[key]);
  }
};

/***
 *
 * @param  {AElement| AElementNS | Node} fromElt
 * @param  {boolean=} toRoot
 * @returns {boolean}
 */
ResizeSystem.prototype.requestUpdateUpSignal = function (fromElt, toRoot) {
  if (!this.domSignal) return;
  var elts = [];
  var found = false;
  while (fromElt && (!found || toRoot)) {
    if (typeof fromElt.requestUpdateSize == 'function' || typeof fromElt.updateSize == 'function' || typeof fromElt.onresize == 'function') {
      elts.push(fromElt);
      found = true;
    }
    fromElt = fromElt.parentElement;
  }
  var pendingElts = this.pendingElts;
  elts.forEach(function (elt) {
    if (!elt.__resize_ident__) elt.__resize_ident__ = Date.now() + '_' + Math.random();
    if (!pendingElts[elt.__resize_ident__]) pendingElts[elt.__resize_ident__] = elt;
  });
  this.domSignal.emit('request_update_pending_signal');
  return found;
};

/***
 *
 * @param  {AElement| AElementNS | Node} fromElt
 * @returns {boolean}
 */
ResizeSystem.prototype.updateDown = function (fromElt) {
  var now = Date.now();
  if (now - 100 > this.lastResizeTime) {
    this.cache = undefined;
  }
  this.lastResizeTime = now;
  if (this.cacheOf !== fromElt) {
    this.cache = undefined;
    this.cacheOf = fromElt;
  }
  if (this.cache === undefined) {
    this.cache = [];
    this.goDownAndCache(fromElt);
  } else {
    this.cache.forEach(this.notifyToElt);
  }
};

/***
 *
 * @param {AElement| AElementNS | Node} elt
 * @return {boolean}
 */
ResizeSystem.prototype.add = function (elt) {
  for (var i = 0; i < this.elts.length; ++i) {
    if (_AElement["default"].prototype.isDescendantOf.call(elt, this.elts[i])) {
      return false;
    }
  }
  this.elts = this.elts.filter(function (e) {
    return !_AElement["default"].prototype.isDescendantOf.call(e, elt);
  });
  this.removeTrash();
  this.cache = undefined;
  this.elts.push(elt);
  return true;
};
var _default = new ResizeSystem();
exports["default"] = _default;

/***/ }),

/***/ 98315:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.svgToExportedString = svgToExportedString;
exports.svgToRasterImageUrl = svgToRasterImageUrl;
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _ElementNS = _interopRequireDefault(__webpack_require__(75914));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _AttachHook = _interopRequireDefault(__webpack_require__(7068));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
/***
 * @extends Dom
 * @param option
 * @constructor
 */
function Svg(option) {
  _Dom["default"].call(this, option);
  this.svgNS = "http://www.w3.org/2000/svg";
  Object.defineProperties(this.creator, {
    sattachhook: {
      set: function set() {
        //do nothing
      },
      get: function get() {
        return _AttachHook["default"];
      }
    }
  });
  delete this.buidDom;
  this.buildSvg = this.create.bind(this);
}
_OOP["default"].mixClass(Svg, _Dom["default"]);
Svg.prototype.defaultTag = 'g';
Svg.prototype.fromCode = function (code) {
  code = code.trim();
  var receptacle = document.createElement('div');
  var element;
  var prototypes;
  if (code.startsWith('<svg')) {
    receptacle.innerHTML = code;
    element = receptacle.childNodes[0];
    prototypes = Object.getOwnPropertyDescriptors(_AElement["default"].prototype);
    Object.defineProperties(element, prototypes);
    _AElement["default"].call(element);
  } else {
    var svgfragment = '<svg  version="1.1" xmlns="http://www.w3.org/2000/svg">' + code + '</svg>';
    receptacle.innerHTML = '' + svgfragment;
    element = receptacle.childNodes[0].childNodes[0];
    prototypes = Object.getOwnPropertyDescriptors(_ElementNS["default"].prototype);
    Object.defineProperties(element, prototypes);
    _ElementNS["default"].call(element);
  }
  return element;
};
Svg.prototype.makeNewElement = function (tagName) {
  return document.createElementNS(this.svgNS, tagName);
};
Svg.ShareInstance = new Svg();
Svg.svgToCanvas = function (element) {
  if (typeof element == 'string') {
    element = _Dom["default"].ShareInstance.$(element);
  }
  if (element && element.tagName == 'svg') {
    var depthClone = function depthClone(originElt) {
      var newElt = originElt.cloneNode(); //no deep
      if (!originElt.getAttributeNS) return newElt; //is text node
      var style = getComputedStyle(originElt);
      var key, value;
      for (var i = 0; i < style.length; ++i) {
        key = style[i];
        value = style.getPropertyValue(key);
        if (value && value.length > 0 && value !== 'auto') {
          newElt.style.setProperty(key, value);
        }
      }
      var children = Array.prototype.map.call(originElt.childNodes, depthClone);
      for (var i = 0; i < children.length; ++i) {
        newElt.appendChild(children[i]);
      }
      return newElt;
    };
    var cloneElement = depthClone(element);
    var renderSpace = _Dom["default"].ShareInstance._({
      style: {
        // opacity:0,
        zIndex: -1000,
        position: 'fixed',
        top: 0,
        bottom: 0
      }
    }).addTo(document.body);
    renderSpace.addChild(cloneElement);
    var svgCode = renderSpace.innerHTML;
    renderSpace.clearChild();
    var mBlob = new Blob([svgCode], {
      type: "image/svg+xml;charset=utf-8"
    });
    var src = (URL || webkitURL).createObjectURL(mBlob);
    var image = _Dom["default"].ShareInstance._('img');
    image.attr('src', src).addTo(renderSpace);
    var canvas = document.createElement("canvas");
    renderSpace.addChild(canvas);
    return _Dom["default"].waitImageLoaded(image).then(function () {
      canvas.width = image.width;
      canvas.height = image.height;
      var context = canvas.getContext("2d");
      context.drawImage(image, 0, 0);
      renderSpace.selfRemove();
      return canvas;
    });
  } else {
    throw new Error('Element must be svg');
  }
};
function svgToRasterImageUrl(element) {
  return Svg.svgToCanvas(element).then(function (canvas) {
    return canvas.toDataURL();
  });
}
Svg.svgToRasterImageUrl = svgToRasterImageUrl;

/**
 *
 * @param {string|AElement}element
 * @param {"print"|null=} option
 * @returns {string}
 */
function svgToExportedString(element, option) {
  if (typeof element == 'string') {
    element = _Dom["default"].ShareInstance.$(element);
  }
  if (element && element.tagName === 'svg') {
    var depthClone = function depthClone(originElt) {
      var newElt = originElt.cloneNode(); //no deep
      if (!originElt.getAttributeNS) return newElt; //is text node
      var cssRules = _AElement["default"].prototype.getCSSRules.call(originElt);
      var cssKey = cssRules.reduce(function (ac, rule) {
        for (var i = 0; i < rule.style.length; ++i) {
          ac[rule.style[i]] = true;
        }
        return ac;
      }, {});
      for (var key in cssKey) {
        newElt.style[key] = _AElement["default"].prototype.getComputedStyleValue.call(originElt, key);
      }
      var children = Array.prototype.map.call(originElt.childNodes, depthClone);
      for (var i = 0; i < children.length; ++i) {
        newElt.appendChild(children[i]);
      }
      return newElt;
    };
    var cloneElement = depthClone(element);
    var renderSpace = _Dom["default"].ShareInstance._({
      style: {
        // opacity:0,
        zIndex: -1000,
        position: 'fixed',
        top: 0,
        bottom: 0
      }
    }).addTo(document.body);
    renderSpace.addChild(cloneElement);
    var svgCode = renderSpace.innerHTML;
    renderSpace.selfRemove();
    return svgCode;
  } else {
    throw new Error('Element must be svg');
  }
}
;
Svg.svgToExportedString = svgToExportedString;

/**
 *
 * @param element
 * @param {"print"|null=}option
 * @returns {string}
 */
function svgToSvgUrl(element, option) {
  var svg = svgToExportedString(element, option);
  svg = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n' + svg;
  var blob = new Blob([svg], {
    type: 'image/svg+xml'
  });
  var url = URL.createObjectURL(blob);
  return url;
}
Svg.svgToSvgUrl = svgToSvgUrl;

/***
 *
 * @param {AElement|String | {computeStyle?: boolean, elt: AElement, keepBackgroundColor?:boolean,convertSVG?:boolean}} option
 * @return {Promise<unknown>}
 */
_Dom["default"].printElement = function (option) {
  var _ = _Dom["default"].ShareInstance._;
  var $ = _Dom["default"].ShareInstance.$;
  option = option || {};
  if (typeof option == 'string') {
    option = {
      elt: _Dom["default"].ShareInstance.$(option)
    };
  } else if (typeof option.elt == 'string') {
    option.elt = $(option.elt);
  } else if (_Dom["default"].isDomNode(option)) {
    option = {
      elt: option
    };
  }
  option = Object.assign({
    keepBackgroundColor: true,
    convertSVG: false,
    computeStyle: false
  }, option);
  if (_Dom["default"].isDomNode(option.elt)) {
    var afterCloneCb = function afterCloneCb(originElt, newElt) {
      if (!newElt.tagName) return;
      var tagName = newElt.tagName.toLowerCase();
      if (newElt.getBBox && tagName !== 'svg') return;
      var url, img;
      var needCopyStyle = option.computeStyle;
      var needKeepBackgroundColor = option.keepBackgroundColor;
      var printViewBox;
      if (tagName === 'canvas' || tagName === 'svg' && option.convertSVG) {
        if (tagName === "canvas") {
          url = originElt.toDataURL();
        } else {
          url = svgToSvgUrl(originElt, 'print'); //todo: option
        }

        img = _({
          tag: 'img',
          props: {
            src: url
          }
        });
        $(newElt).selfReplace(img);
        newElt = img;
        needCopyStyle = true;
      } else if (tagName === 'svg' && originElt.getAttribute('data-print-view-box')) {
        printViewBox = originElt.getAttribute('data-print-view-box').split(' ').map(function (v) {
          return parseFloat(v);
        });
        newElt.setAttribute('viewBox', printViewBox.join(' '));
        newElt.setAttribute('width', printViewBox[2]);
        newElt.setAttribute('height', printViewBox[3]);
        newElt.style.setProperty('width', printViewBox[2] + 'px');
        newElt.style.setProperty('height', printViewBox[3] + 'px');
      } else if (tagName === 'script') {
        newElt.remove();
      } else if (tagName === 'img') {
        newElt.setAttribute('src', originElt.src);
      } else if (tagName === 'input') {
        if (originElt.getAttribute('type') === 'radio' || originElt.getAttribute('type') === 'checkbox') {
          if (originElt.checked) {
            newElt.setAttribute('checked', true);
          }
        } else if (originElt.getAttribute('type') === 'text' || !originElt.getAttribute('type') || originElt.getAttribute('type') === 'number') {
          newElt.setAttribute('value', originElt.value);
        }
      }
      if (needCopyStyle) {
        (0, _Dom.copyStyleRule)(originElt, newElt);
      }
      if (needKeepBackgroundColor) {
        try {
          var bgColor = _AElement["default"].prototype.getComputedStyleValue.call(originElt, 'background-color');
          if (bgColor) {
            bgColor = _Color["default"].parse(bgColor);
            if (bgColor.rgba[3] > 0) {
              newElt.style.setProperty('background-color', bgColor.toString('hex8'), 'important');
            }
          }
        } catch (e) {}
      }
      return newElt;
    };
    var newElt = (0, _Dom.depthClone)(option.elt, afterCloneCb);
    var renderSpace = _({
      style: {
        position: 'fixed',
        top: '0',
        left: '0',
        right: '0',
        bottom: '0',
        overflow: 'auto',
        zIndex: '10',
        opacity: '0',
        visibility: 'hidden'
      }
    });
    $('link', document.head, function (elt) {
      var temp = elt.cloneNode(false);
      //copy absolute url
      temp.setAttribute('href', elt.href);
      renderSpace.addChild(temp);
    });
    if (!option.computeStyle) {
      $('style', document.head, function (elt) {
        if (elt == _Dom["default"].$printStyle) return;
        renderSpace.addChild(elt.cloneNode(true));
      });
    }
    renderSpace.addChild(newElt);
    var eltCode = renderSpace.innerHTML;
    renderSpace.clearChild();
    option.title = option.title || ($('title', document.head) || {
      innerHTML: 'absol.js'
    }).innerHTML;
    var htmlCode = ['<ht' + 'ml>', ' <h' + 'ead><title>' + option.title + '</title><meta charset="UTF-8">', '<style>', option.overideStyle ? 'html, body{width:initial !important; height:initial !important; overflow: initial !important; overflow-x: initial !important;overflow-y: initial !important;  }' : '', '@media print {',
    //still not work
    '    body{', '      -webkit-print-color-adjust: exact;', '       color-adjust: exact;', '    } ', '    div, tr, td, table{', '    }', '  }', 'div, table, tr, td{', '    page-break-inside: initial;', '    page-break-before: avoid;', '    page-break-after: avoid;', '}', option.extendCss || '', '</style>', '</he' + 'ad>', '<bod' + 'y>', eltCode, '<scr' + 'ipt>' + (option.extendScript || '') + '</scri' + 'pt>',
    //browser parse  script tag fail
    '<scr' + 'ipt>setTimeout(function(){ window.print();},1000);</scri' + 'pt>',
    //browser parse  script tag fail
    '</bod' + 'y>', '</ht' + 'ml>'].join('\n');
    var blob = new Blob([htmlCode], {
      type: 'text/html; charset=UTF-8'
    });
    renderSpace.addTo(document.body);
    var iframe = _('iframe').attr('src', URL.createObjectURL(blob)).addStyle({
      width: '100%',
      height: '100%'
    }).addTo(renderSpace);
    return new Promise(function (rs, rj) {
      function waitLoad() {
        if (iframe.contentWindow && iframe.contentWindow.document && iframe.contentWindow.document.body) {
          if (typeof option.onLoad == 'function') option.onLoad();
          iframe.contentWindow.focus();
          setTimeout(function () {
            function waitFocusBack() {
              if (!document.hasFocus || document.hasFocus()) {
                renderSpace.remove();
                if (typeof option.onFinish == 'function') option.onFinish();
                rs();
              } else {
                setTimeout(waitFocusBack, 300);
              }
            }
            waitFocusBack();
          }, 4000);
        } else setTimeout(waitLoad, 1000);
      }
      waitLoad();
    });
  } else {
    throw new Error('Invalid param!');
  }
};
var _default = Svg;
exports["default"] = _default;

/***/ }),

/***/ 35844:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.getCaretPosition = getCaretPosition;
exports.getTextIn = getTextIn;
exports.getTextNodesIn = getTextNodesIn;
exports.measureText = measureText;
exports.setCaretPosition = setCaretPosition;
exports.setSelectionRange = setSelectionRange;
exports.setSelectionRangeEnd = setSelectionRangeEnd;
exports.setSelectionRangeStart = setSelectionRangeStart;
exports.textToNodes = textToNodes;
var _Dom = _interopRequireDefault(__webpack_require__(64821));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function getTextNodesIn(node) {
  var textNodes = [];
  if (node.nodeType == 3) {
    textNodes.push(node);
  } else {
    var children = node.childNodes;
    for (var i = 0, len = children.length; i < len; ++i) {
      textNodes.push.apply(textNodes, getTextNodesIn(children[i]));
    }
  }
  return textNodes;
}

/**
 * 
 * @param {Element} el 
 * @param {Range} range 
 * @param {Number} start 
 * @returns {Number} -1: ok,  ret >= 0(is length of text) : need move to next element
 * 
 */
function setSelectionRangeStart(el, range, start) {
  if (start > 0) {
    if (el.nodeType == Node.TEXT_NODE) {
      var text = el.data;
      if (start <= text.length) {
        range.setStart(el, start);
        return -1;
      } else return text.length;
    }
    if (el.tagName.toLowerCase() == 'br') {
      return 0;
    } else {
      var delta = 0;
      var i = 0;
      var textLength = 0;
      var newLine = false;
      while (delta >= 0 && i < el.childNodes.length) {
        var childElt = el.childNodes[i];
        if (newLine) {
          newLine = false;
          ++textLength;
        }
        delta = setSelectionRangeStart(childElt, range, start - textLength);
        if (delta >= 0) textLength += delta;
        if (childElt.nodeType != Node.TEXT_NODE && (window.getComputedStyle(childElt).display == 'block' || childElt.tagName.toLowerCase() == 'br')) {
          newLine = true;
        }
        ++i;
      }
      if (delta >= 0) return textLength;
      return -1;
    }
  } else {
    range.setStart(el, 0);
    return -1;
  }
}

/**
 * 
 * @param {Element} el 
 * @param {Range} range 
 * @param {Number} end 
 * @returns {Number} -1: ok,  ret >= 0(is length of text) : need move to next element
 * 
 */
function setSelectionRangeEnd(el, range, end) {
  if (end > 0) {
    if (el.nodeType == Node.TEXT_NODE) {
      var text = el.data;
      if (end <= text.length) {
        range.setEnd(el, end);
        return -1;
      } else return text.length;
    }
    if (el.tagName.toLowerCase() == 'br') {
      return 0;
    } else {
      var delta = 0;
      var i = 0;
      var textLength = 0;
      var newLine = false;
      while (delta >= 0 && i < el.childNodes.length) {
        var childElt = el.childNodes[i];
        if (newLine) {
          newLine = false;
          ++textLength;
        }
        delta = setSelectionRangeEnd(childElt, range, end - textLength);
        if (delta >= 0) textLength += delta;
        if (childElt.nodeType != Node.TEXT_NODE && (window.getComputedStyle(childElt).display == 'block' || childElt.tagName.toLowerCase() == 'br')) {
          newLine = true;
        }
        ++i;
      }
      if (delta >= 0) return textLength;
      return -1;
    }
  } else {
    range.setEnd(el, 0);
    return -1;
  }
}
function setSelectionRange(el, start, end) {
  if (document.createRange && window.getSelection) {
    var range = document.createRange();
    range.selectNodeContents(el);
    var delta;
    if (start >= 0) {
      delta = setSelectionRangeStart(el, range, start);
      if (delta >= 0) range.setStart(el, el.childNodes.length);
    } else {
      start = 0;
      range.setStart(el, 0);
    }
    if (end >= start) {
      delta = setSelectionRangeEnd(el, range, end);
      if (delta >= 0) range.setEnd(el, el.childNodes.length);
    }
    var sel = window.getSelection();
    sel.removeAllRanges();
    sel.addRange(range);
  } else if (document.selection && document.body.createTextRange) {
    var textRange = document.body.createTextRange();
    textRange.moveToElementText(el);
    textRange.collapse(true);
    textRange.moveEnd("character", end);
    textRange.moveStart("character", start);
    textRange.select();
  }
}
function getTextIn(e) {
  if (e.nodeType == Node.TEXT_NODE) {
    return e.data;
  }
  if (e.tagName && e.tagName.toLowerCase() == 'br') return '';
  var texts = [];
  var newLine = false;
  for (var i = 0; i < e.childNodes.length; ++i) {
    if (newLine) {
      newLine = false;
      texts.push('\n');
    }
    var childElt = e.childNodes[i];
    texts.push(getTextIn(childElt));
    if (childElt.nodeType != Node.TEXT_NODE && (window.getComputedStyle(childElt).display == 'block' || childElt.tagName.toLowerCase() == 'br')) {
      newLine = true;
    }
  }
  return texts.join('');
}
function textToNodes(text) {
  var lines = text.split(/\r?\n/);
  return lines.map(function (text) {
    if (text.length == 0) {
      return _Dom["default"].ShareInstance._({
        child: {
          tag: 'br'
        }
      });
    } else {
      return _Dom["default"].ShareInstance._({
        child: {
          text: text
        }
      });
    }
  });
}

/*
** Returns the caret (cursor) position of the specified text field (oField).
** Return value range is 0-oField.value.length.
*/
function getCaretPosition(oField) {
  // Initialize
  var iCaretPos = 0;

  // IE Support
  if (document.selection) {
    // Set focus on the element
    oField.focus();

    // To get cursor position, get empty selection range
    var oSel = document.selection.createRange();

    // Move selection start to 0 position
    oSel.moveStart('character', -oField.value.length);

    // The caret position is selection length
    iCaretPos = oSel.text.length;
  }

  // Firefox support
  else if (oField.selectionStart || oField.selectionStart == '0') iCaretPos = oField.selectionDirection == 'backward' ? oField.selectionStart : oField.selectionEnd;

  // Return results
  return iCaretPos;
}
function setCaretPosition(oField, caretPos) {
  if (oField.createTextRange) {
    var range = oField.createTextRange();
    range.move('character', caretPos);
    range.select();
  } else {
    if (oField.selectionStart) {
      oField.focus();
      oField.setSelectionRange(caretPos, caretPos);
    } else oField.focus();
  }
}
function measureText(text, font) {
  // re-use canvas object for better performance
  var canvas = measureText.canvas || (measureText.canvas = document.createElement("canvas"));
  var context = canvas.getContext("2d");
  if (font) context.font = font;
  var metrics = context.measureText(text);
  return metrics;
}

/***/ }),

/***/ 95141:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.isAltKey = isAltKey;
exports.isCtrlKey = isCtrlKey;
exports.isFnKey = isFnKey;
exports.isMetaKey = isMetaKey;
exports.isShiftKey = isShiftKey;
exports.isSpaceKey = isSpaceKey;
exports.keyboardEventToKeyBindingIdent = keyboardEventToKeyBindingIdent;
exports.normalizeKeyBindingIdent = normalizeKeyBindingIdent;
function isFnKey(name) {
  return name.match(/^[fF]([2-9]|(1([0-2]?)))$/);
}
function isSpaceKey(name) {
  return name === ' ' || name.match(/^[sS]pace$/);
}
function isCtrlKey(name) {
  return name.match(/(^([cC]ontrol)|ctrl)$/);
}
function isAltKey(name) {
  return name.match(/^[aA]lt$/);
}
function isShiftKey(name) {
  return name.match(/^[sS]hift$/);
}
function isMetaKey(name) {
  return name.toLowerCase().match(/^(command|windows|meta)$/);
}

/***
 *
 * @param {string} text
 * @return {string}
 */
function normalizeKeyBindingIdent(text) {
  var keys = text.trim().toLowerCase().split(/[-+\s_.]+/).filter(function (w) {
    return w.length > 0;
  });
  var values = {
    meta: 1,
    ctrl: 2,
    alt: 3,
    shift: 4
  };
  keys.sort(function (a, b) {
    var va, vb;
    va = values[a] || 100;
    vb = values[b] || 100;
    return va - vb;
  });
  return keys.join('-');
}

/***
 *
 * @param {KeyboardEvent} event
 * @return {string}
 */
function keyboardEventToKeyBindingIdent(event) {
  var keys = [];
  var keyName = event.key || String.fromCharCode(event.which || event.keyCode);
  if (event.metaKey) {
    keys.push('meta');
  }
  if (event.ctrlKey) keys.push('ctrl');
  if (event.altKey) keys.push('alt');
  if (event.shiftKey) keys.push('shift');
  if (isSpaceKey(keyName)) {
    keys.push('space');
  } else if (isFnKey(keyName)) {
    keys.push(keyName.toLowerCase());
  } else if (!isMetaKey(keyName) && !isAltKey(keyName) && !isCtrlKey(keyName) && !isShiftKey(keyName)) keys.push(keyName.toLowerCase());
  return keys.join('-');
}

/***/ }),

/***/ 21973:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _TemplateString = _interopRequireDefault(__webpack_require__(73021));
var _document = _interopRequireDefault(__webpack_require__(15099));
var _mht_document = _interopRequireDefault(__webpack_require__(31551));
var _mht_part = _interopRequireDefault(__webpack_require__(61337));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _default = {
  document: new Function('pageSetting', 'return ' + _TemplateString["default"].parse(_document["default"]).toJSCode()),
  mht_document: new Function('htmlSource', 'contentParts', 'return ' + _TemplateString["default"].parse(_mht_document["default"]).toJSCode()),
  mht_part: new Function('contentType', 'contentEncoding', 'contentLocation', 'encodedContent', 'return ' + _TemplateString["default"].parse(_mht_part["default"]).toJSCode())
};
exports["default"] = _default;

/***/ }),

/***/ 6733:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";
/* provided dependency */ var Buffer = __webpack_require__(80365)["lW"];


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _DocxTpl = _interopRequireDefault(__webpack_require__(21973));
var _content_types = _interopRequireDefault(__webpack_require__(93959));
var _rels = _interopRequireDefault(__webpack_require__(53372));
var _documentXml = _interopRequireDefault(__webpack_require__(7423));
var _Dom = _interopRequireDefault(__webpack_require__(64821));
var _Svg = _interopRequireDefault(__webpack_require__(98315));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var JSZip = window.JSZip;
function JSDocx(props) {
  if (props.blob) this.blob = props.blob;
  if (props.blob) this.buffer = props.buffer;
}
JSDocx.prototype.saveAs = function (fileName) {
  var src;
  if (this.blob) {
    src = (URL || webkitURL).createObjectURL(this.blob);
  } else if (this.buffer) {
    src = "data:application/octet-stream," + encodeURIComponent(this.buffer);
  }
  var element = document.createElement('a');
  element.setAttribute('href', src);
  element.setAttribute('download', fileName);
  element.style.display = 'none';
  document.body.appendChild(element);
  element.click();
  document.body.removeChild(element);
};
JSDocx._prepareImageParts = function (htmlSource) {
  var imageContentParts = [];
  var inlinedSrcPattern = /\"data:(\w+\/\w+);(\w+),(\S+)\"/g;
  var inlinedReplacer = function inlinedReplacer(match, contentType, contentEncoding, encodedContent) {
    var index = imageContentParts.length;
    var extension = contentType.split('/')[1];
    var contentLocation = "file:///C:/fake/image" + index + "." + extension;
    // mht_part: new Function('contentType', 'contentEncoding', 'contentLocation', 'encodedContent', 'return ' + TemplateString.parse(mht_pathTpl).toJSCode())
    imageContentParts.push(_DocxTpl["default"].mht_part(contentType, contentEncoding, contentLocation, encodedContent));
    return "\"" + contentLocation + "\"";
  };
  if (typeof htmlSource === 'string') {
    if (!/<img/g.test(htmlSource)) {
      return {
        htmlSource: htmlSource,
        imageContentParts: imageContentParts
      };
    }
    htmlSource = htmlSource.replace(inlinedSrcPattern, inlinedReplacer);
    return {
      htmlSource: htmlSource,
      imageContentParts: imageContentParts
    };
  } else {
    throw new Error("Not a valid source provided!");
  }
};
JSDocx._getMHTdocument = function (htmlSource) {
  var imageContentParts, _ref;
  _ref = this._prepareImageParts(htmlSource), htmlSource = _ref.htmlSource, imageContentParts = _ref.imageContentParts;
  htmlSource = htmlSource.replace(/\=/g, '=3D');
  return _DocxTpl["default"].mht_document(htmlSource, imageContentParts.join('\n'));
};

/**
 * @param {JSZip} zip
 */
JSDocx._generateDocument = function (zip) {
  return zip.generateAsync({
    type: 'arraybuffer'
  }).then(function (buffer) {
    var props = {};
    if (__webpack_require__.g.Blob) props.blob = new Blob([buffer], {
      type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
    });else if (__webpack_require__.g.Buffer) props.buffer = new Buffer(new Uint8Array(buffer));else throw new Error("Neither Blob nor Buffer are accessible in this environment. " + "Consider adding Blob.js shim");
    return new JSDocx(props);
  });
};
JSDocx._renderDocumentFile = function (pageSetting) {
  return _DocxTpl["default"].document(pageSetting);
};
JSDocx._createPageSetting = function (documentOptions) {
  documentOptions = documentOptions || {};
  var pageSetting = {
    margins: {
      top: 1440,
      right: 1440,
      bottom: 1440,
      left: 1440,
      header: 720,
      footer: 720,
      gutter: 0
    }
  };
  if (documentOptions.orientation == 'landscape') {
    Object.assign(pageSetting, {
      height: 12240,
      width: 15840,
      orient: 'landscape'
    });
  } else {
    Object.assign(pageSetting, {
      width: 12240,
      height: 15840,
      orient: 'portrait'
    });
  }
  if (documentOptions.margins) {
    Object.assign(pageSetting, documentOptions.margins);
  }
  return pageSetting;
};
JSDocx._addFiles = function (zip, htmlSource, pageSetting) {
  zip.file('[Content_Types].xml', _content_types["default"]);
  zip.folder('_rels').file('.rels', _rels["default"]);
  zip.folder('word').file('document.xml', _DocxTpl["default"].document(pageSetting));
  zip.folder('word').file('document.xml', JSDocx._renderDocumentFile(pageSetting)).file('afchunk.mht', JSDocx._getMHTdocument(htmlSource)).folder('_rels').file('document.xml.rels', _documentXml["default"]);
  return zip;
};
JSDocx.fromHTMLCode = function (html, options) {
  var zip = new JSZip();
  JSDocx._addFiles(zip, html, JSDocx._createPageSetting(options));
  return JSDocx._generateDocument(zip);
};
JSDocx.fromHTMLElement = function (element, options, getOuter, isWorkingElement) {
  if (typeof element == 'string') {
    element = _Dom["default"].ShareInstance.$(element);
  }
  if (!element) throw new Error('@param element must be HTMLElement');
  var preRender;
  if (!isWorkingElement) {
    preRender = _Dom["default"].ShareInstance._('div');
    preRender.addStyle({
      position: 'fixed',
      top: '0',
      left: '0',
      zIndex: '-10000',
      opacity: '0'
    }).addTo(document.body);
    Array.prototype.forEach.call(element.childNodes, function (e) {
      if (e.tagName != 'script') preRender.addChild(e.cloneNode(true));
    });
  } else {
    preRender = element;
  }
  _Dom["default"].ShareInstance.$('script', preRender, function (e) {
    e.parentElement.removeChild(e);
    return false;
  });
  var imageTask = [];
  _Dom["default"].ShareInstance.$('img', preRender, function (e) {
    if (e.src && !e.src.match(/data:/)) {
      var task = _Dom["default"].imageToCanvas(e).then(function (canvas) {
        var newSrc = canvas.toDataURL();
        e.src = newSrc;
      });
      imageTask.push(task);
    }
    return false;
  });
  _Dom["default"].ShareInstance.$('svg', preRender, function (e) {
    var task = _Svg["default"].svgToCanvas(e).then(function (canvas) {
      var newSrc = canvas.toDataURL();
      var image = _Dom["default"].ShareInstance._('img');
      image.src = newSrc;
      _Dom["default"].ShareInstance.$(e).selfReplace(image);
    });
    imageTask.push(task);
    return false;
  });
  return Promise.all(imageTask).then(function () {
    var code;
    if (getOuter) {
      code = preRender.outerHTML;
      if (!code) {
        var temp = document.createElement('div');
        temp.addChild(preRender);
        code = temp.innerHTML;
      }
    } else {
      code = preRender.innerHTML;
    }
    return JSDocx.fromHTMLCode(code, options);
  });
};
var _default = JSDocx;
exports["default"] = _default;

/***/ }),

/***/ 73021:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function TemplateString(props) {
  this.parts = props.parts;
}
TemplateString.prototype.toJSCode = function () {
  return this.parts.map(function (e) {
    if (e.type == TemplateString.TYPE_EXPRESSION) {
      return '(' + e.data + ')';
    } else {
      return JSON.stringify(e.data);
    }
  }).join('+');
};
TemplateString.__partRegex = /(\{\{(([^\}]|(\}[^\}]))*)\}\})|(([^\{]|(\{[^\{]))+)/g;

/**
 *  @param  {String} text 
 */
TemplateString.__matchExpression = function (text) {
  if (text[0] == '{' && text[1] == '{' && text[text.length - 1] == '}' && text[text.length - 2] == '}') {
    return [text, text.substr(2, text.length - 4).trim()];
  } else {
    return false;
  }
};
TemplateString.TYPE_STRING = 0;
TemplateString.TYPE_EXPRESSION = 1;
TemplateString.parse = function (text) {
  text = text + '';
  var matchedParts = text.match(this.__partRegex);
  if (matchedParts) {
    var parts = matchedParts.map(function (e) {
      var matchedExp = this.__matchExpression(e);
      if (matchedExp) {
        return {
          type: this.TYPE_EXPRESSION,
          data: matchedExp[1]
        };
      } else {
        return {
          type: this.TYPE_STRING,
          data: e
        };
      }
    }.bind(this));
    return new TemplateString({
      parts: parts
    });
  } else {
    return new TemplateString({
      parts: []
    });
  }
};
var _default = TemplateString;
exports["default"] = _default;

/***/ }),

/***/ 1401:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _XML = _interopRequireDefault(__webpack_require__(83383));
var _XMLConstant = _interopRequireDefault(__webpack_require__(69865));
var _TemplateString = _interopRequireDefault(__webpack_require__(73021));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function TemplateXML(props) {
  this.xml = props.xml;
}
TemplateXML.prototype._xmlNodeToJSCode = function (node) {
  var body = [];
  if (node.nodeType == _XMLConstant["default"].TYPE_ELEMENT) {
    body.push('tag:' + JSON.stringify(node.tagName));
    var attributeKeys = Object.keys(node.attributes).filter(function (x) {
      return x != 'class' && x != 'style' && !x.startsWith('az-');
    });
    if (attributeKeys && attributeKeys.length > 0) {
      body.push('attr: {' + attributeKeys.map(function (key) {
        return JSON.stringify(key) + ': ' + _TemplateString["default"].parse(node.attributes[key]).toJSCode();
      }).join(', ') + '}');
    }
    if (node.attributes['az-props']) {
      body.push('props: ' + _TemplateString["default"].parse(node.attributes['az-props']).toJSCode());
    }
    if (node.attributes['az-data']) {
      body.push('data: ' + _TemplateString["default"].parse(node.attributes['az-data']).toJSCode());
    }
    if (node.attributes.style) {
      var styleSheet = node.attributes.style.split(';').map(function (s) {
        var t = s.split(':').map(function (text) {
          return text.trim();
        });
        if (t.length == 2) {
          return JSON.stringify(t[0]) + ': ' + JSON.stringify(t[1]);
        } else return false;
      }).filter(function (e) {
        return !!e;
      });
      if (styleSheet.length > 0) {
        body.push('style:{' + styleSheet.join(',') + '}');
      }
    }
    if (node.attributes["class"]) {
      var classList = node.attributes["class"].trim().split(/\s+/);
      if (classList.length > 0) body.push('class:' + JSON.stringify(classList));
    }
    if (node.childNodes && node.childNodes.length > 0) {
      var childList = '[' + node.childNodes.filter(function (e) {
        return e.nodeType == _XMLConstant["default"].TYPE_ELEMENT || e.nodeType == _XMLConstant["default"].TYPE_TEXT;
      }).map(function (e) {
        return this._xmlNodeToJSCode(e);
      }.bind(this)).filter(function (e) {
        return !!e;
      }).join(', ') + ']';
      if (childList && childList.length > 0) body.push('child: ' + childList);
    }
  } else if (node.nodeType == _XMLConstant["default"].TYPE_TEXT) {
    body.push('text: ' + _TemplateString["default"].parse(node.data).toJSCode());
  } else return undefined;
  var res = '{' + body.join(', ') + '}';
  return res;
};
TemplateXML.prototype.toJSCode = function () {
  var res = this._xmlNodeToJSCode(this.xml);
  return res;
};

/**
 * 
 * @param  {...any} args 
 * @returns {Function}
 */
TemplateXML.compileToFunction = function () {
  var innerCode = 'return ' + this.parse(arguments[arguments.length - 1]).toJSCode() + ';';
  var fParam = Array.prototype.slice.call(arguments, 0, arguments.length - 1);
  fParam.push(innerCode);
  return Function.apply(null, fParam);
};
TemplateXML.parse = function (text) {
  var xml = _XML["default"].parse(text);
  if (xml) {
    return new TemplateXML({
      xml: xml
    });
  } else return undefined;
};
var _default = TemplateXML;
exports["default"] = _default;

/***/ }),

/***/ 18528:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.copyJSVariable = copyJSVariable;
exports.generateJSVariable = generateJSVariable;
exports.isJSVariableEqual = isJSVariableEqual;
exports.replaceDateStringJSVariable = replaceDateStringJSVariable;
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/**
 *
 * @param obj
 * @param {string=}indent
 * @param {object=}opt
 * @returns {string}
 */
function generateJSVariable(obj, indent, opt) {
  indent = indent || '';
  var childIndent = indent + '    ';
  if (obj === null) {
    return 'null';
  } else if (obj instanceof Date) {
    return 'new Date(' + obj.getTime() + ')';
  } else if (obj instanceof Array) {
    if (obj.length === 0) return '[]';
    return '[\n' + obj.map(function (it) {
      return childIndent + generateJSVariable(it, childIndent, opt);
    }).join(',\n') + '\n' + indent + ']';
  } else if (obj instanceof Error) {
    return generateJSVariable({
      message: obj.message,
      stack: obj.stack
    });
  } else if (_typeof(obj) === 'object') {
    var keys = Object.keys(obj);
    if (keys.length === 0) return '{}';
    return '{\n' + keys.map(function (key) {
      var value = obj[key];
      if (!key.match(/^[a-zA-Z_$]([a-zA-Z_0-9$]*)$/)) key = JSON.stringify(key);
      return childIndent + key + ': ' + generateJSVariable(value, childIndent, opt);
    }).join(',\n') + '\n' + indent + '}';
  } else if (obj === undefined) {
    return 'undefined';
  } else {
    return JSON.stringify(obj);
  }
}

/***
 *
 * @param o
 * @param {Array<{test, replace}>| null=} replacers
 * @returns {*}
 */
function copyJSVariable(o, replacers) {
  var _arguments = arguments;
  var replacer;
  if (replacers && replacers.length > 0) {
    replacer = replacers.find(function (rp) {
      return rp.test.apply(rp, [o].concat(Array.prototype.slice.call(_arguments, 2)));
    });
    if (replacer) {
      return replacer.replace.apply(replacer, [o].concat(Array.prototype.slice.call(arguments, 2)));
    }
  }
  if (o === null) return null;
  if (o === undefined) return undefined;
  var type = _typeof(o);
  if (type === "boolean") return o;
  if (o instanceof Date || typeof o.getTime === "function") return new Date(o.getTime());
  if (type === "number") return o;
  if (type === "string") return o + '';
  if (typeof o.map === "function") {
    return o.map(function (it, i) {
      return copyJSVariable(it, replacers, i, o);
    });
  }
  if (type === "object" && o.constructor === Object) {
    return Object.keys(o).reduce(function (ac, cr) {
      ac[cr] = copyJSVariable(o[cr], replacers, cr, o);
      return ac;
    }, {});
  }
  return o;
}
function replaceDateStringJSVariable(o) {
  return copyJSVariable(o, [{
    test: function test(x) {
      return typeof x === "string" && x.match(/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s+([a-zA-Z]{3})\s+[\d\s:]+GMT[\d+]+\s*\([^)]+\)$/) && !isNaN(new Date(x).getTime());
    },
    replace: function replace(x) {
      return new Date(x);
    }
  }]);
}

/***
 *
 * @param a
 * @param b
 * @return {boolean}
 */
function isJSVariableEqual(a, b) {
  if (a === b) return true; //1
  var tA = _typeof(a);
  var tB = _typeof(b);
  if (tA !== tB) return false; //2
  if (!a !== !b) return false;
  if (tA === 'string') return false; //because 1 & 2
  if (tA === "number") {
    if (isNaN(a) && isNaN(b)) return true; //because 2
    return false; //because 1
  }

  var aIsDate = a instanceof Date;
  var bIsDate = b instanceof Date;
  if (aIsDate !== bIsDate) return false;
  if (aIsDate) return isJSVariableEqual(a.getTime(), b.getTime());
  var aIsArray = a instanceof Array;
  var bIsArray = a instanceof Array;
  if (aIsArray !== bIsArray) return false;
  var i;
  if (aIsArray) {
    if (a.length !== b.length) return false;
    for (i = 0; i < a.length; ++i) {
      if (!isJSVariableEqual(a[i], b[i])) return false;
    }
    return true;
  }

  //object
  if (a.equals) return a.equals(b);
  var aKeys = Object.keys(a);
  var bKeys = Object.keys(b);
  aKeys.sort();
  bKeys.sort();
  if (!isJSVariableEqual(aKeys, bKeys)) return false;
  for (i = 0; i < aKeys.length; ++i) {
    if (!isJSVariableEqual(a[aKeys[i]], b[aKeys[i]])) return false;
  }
  return true;
}

/***/ }),

/***/ 88975:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.compareQuerySelectorSpecificity = compareQuerySelectorSpecificity;
exports.computeMeasureExpression = computeMeasureExpression;
exports.getQuerySelectorSpecificity = getQuerySelectorSpecificity;
var _DPParser = _interopRequireDefault(__webpack_require__(7679));
var _DPParseInstance = __webpack_require__(36093);
var _Array = __webpack_require__(40411);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***** css expression rules****/

// var exp = `calc(var(--abcd) + 15px + 15%)`;

var elementRegexes = [['varname', /--[a-z-]+/], ['word', /[_a-zA-Z][_a-zA-Z0-9]*/], ['msnumber', /(\d+([.]\d*)?([eE][+-]?\d+)?|[.]\d+([eE][+-]?\d+)?)(vh|vw|px|%|pt)/], ['number', /(\d+([.]\d*)?([eE][+-]?\d+)?|[.]\d+([eE][+-]?\d+)?)/], ['symbol', /[^\s_a-zA-Z0-9]/], ['string', /("(?:[^"\\]|\\.)*?")|('(?:[^'\\]|\\.)*?')/]];
var rules = [];
rules.push({
  target: 'measure_num',
  elements: ['.msnumber'],
  toAST: function toAST(pN) {
    pN = pN.children[0];
    return {
      type: "MeasureLiteral",
      value: parseFloat(pN.content.replace(/vh|vw|px|%|pt/, '')),
      unit: pN.content.match(/px|%|pt|vw|vh/)[0]
    };
  }
});
rules.push({
  target: 'number',
  elements: ['.number'],
  toAST: function toAST(pN) {
    pN = pN.children[0];
    return {
      type: "NumericLiteral",
      value: parseFloat(pN.content)
    };
  }
});
rules.push({
  target: 'exp',
  elements: ['measure_num'],
  toAST: function toAST(pN) {
    return (0, _DPParseInstance.parsedNodeToAST)(pN.children[0]);
  }
});
rules.push({
  target: 'bracket_group',
  elements: ['_(', 'exp', '_)'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]);
  }
});
rules.push({
  target: 'exp',
  elements: ['bracket_group'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'variable_name',
  elements: ['.varname'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'VariableName',
      name: parsedNode.children[0].content
    };
  }
});
rules.push({
  target: 'exp',
  elements: ['variable_name'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
['+', '-', '*', '/'].forEach(function (op) {
  rules.push({
    target: 'bin_op',
    elements: ['_' + op],
    toAST: function toAST(parsedNode) {
      return {
        type: "BinaryOperator",
        content: op
      };
    }
  });
});
var operatorOrder = {
  '*': 5,
  '/': 5,
  '%': 5,
  '+': 6,
  '-': 6
};
var operatorTokenToAst = function operatorTokenToAst(token) {
  return {
    type: token.type,
    content: token.content
  };
};
rules.push({
  target: 'exp',
  elements: ['exp', 'bin_op', 'exp'],
  // longestOnly: true,//* error when parse return (...)...
  ident: 'bin_op_rec',
  toASTChain: function toASTChain(parseNode) {
    var res = [];
    if (parseNode.children[0].rule === this) {
      res = res.concat(this.toASTChain(parseNode.children[0]));
    } else {
      res.push((0, _DPParseInstance.parsedNodeToAST)(parseNode.children[0]));
    }
    res.push(parseNode.children[1].children[0]);
    if (parseNode.children[2].rule === this) {
      res = res.concat(this.toASTChain(parseNode.children[2]));
    } else {
      res.push((0, _DPParseInstance.parsedNodeToAST)(parseNode.children[2]));
    }
    return res;
  },
  toAST: function toAST(parsedNode) {
    var chain = this.toASTChain(parsedNode);
    var stack = [];
    var item;
    var newNode;
    while (chain.length > 0) {
      item = chain.shift();
      if (item.content in operatorOrder) {
        while (stack.length >= 3 && operatorOrder[stack[stack.length - 2].content] <= operatorOrder[item.content]) {
          newNode = {
            type: 'BinaryExpression'
          };
          newNode.right = stack.pop();
          newNode.operator = operatorTokenToAst(stack.pop());
          newNode.left = stack.pop();
          stack.push(newNode);
        }
      }
      stack.push(item);
    }
    while (stack.length >= 3) {
      newNode = {
        type: 'BinaryExpression'
      };
      newNode.right = stack.pop();
      newNode.operator = operatorTokenToAst(stack.pop());
      newNode.left = stack.pop();
      stack.push(newNode);
    }
    return stack.pop();
  }
});
rules.push({
  target: 'args_list',
  elements: ['exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  },
  toASTChain: function toASTChain(parsedNode) {
    return [(0, _DPParseInstance.parsedNodeToAST)(parsedNode)];
  }
});
rules.push({
  target: 'ident',
  elements: ['.word'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'Identifier',
      name: parsedNode.children[0].content
    };
  }
});
rules.push({
  target: 'number',
  elements: ['.number'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'NumericLiteral',
      value: parseFloat(parsedNode.children[0].content)
    };
  }
});
rules.push({
  target: 'args_list',
  elements: ['args_list', '_,', 'exp'],
  longestOnly: true,
  ident: 'args_list_rec',
  toASTChain: function toASTChain(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[0]).concat((0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2]));
  }
});
rules.push({
  target: 'function_callee',
  elements: ['ident'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'function_callee',
  elements: ['mem_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'function_call',
  elements: ['function_callee', '_(', 'args_list', '_)'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'CallExpression',
      arguments: parsedNode.children[2].rule.toASTChain(parsedNode.children[2]),
      callee: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])
    };
  }
});
rules.push({
  target: 'function_call',
  elements: ['function_callee', '_(', '_)'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'CallExpression',
      arguments: [],
      callee: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])
    };
  }
});
rules.push({
  target: 'exp',
  elements: ['function_call'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'exp',
  elements: ['number'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
var cssExpressionParser = new _DPParser["default"]({
  elementRegexes: elementRegexes,
  rules: rules
});
var getScreenViewSize = function getScreenViewSize() {
  var div = document.createElement('div');
  div.style.width = '100vw';
  div.style.height = '100vh';
  div.style.zIndex = '-10000';
  div.style.visibility = 'hidden';
  div.style.position = 'fixed';
  document.body.appendChild(div);
  var res = div.getBoundingClientRect();
  div.remove();
  return {
    width: res.width,
    height: res.height
  };
};
var fx = {
  calc: function calc(x) {
    return x;
  },
  'var': function _var(x, ctx) {
    if (!ctx.style) {
      if (ctx.elt) {
        ctx.style = getComputedStyle(ctx.elt);
      }
    }
    if (ctx.style) {
      if (ctx.style.getPropertyValue) {
        return ctx.style.getPropertyValue(x);
      } else {
        return ctx.style[x];
      }
    }
    throw new Error("Miss style:CSSStyleDeclaration in ctx");
  },
  '*': function _(x, y, ctx) {
    if (x && x.unit) {
      if (y && y.unit) {
        throw Error("Can not call ".concat(x.value + x.unit, " * ").concat(y.value + y.unit));
      } else {
        return {
          value: x.value * y,
          unit: x.unit
        };
      }
    } else {
      if (y && y.unit) {
        return {
          value: x * y.value,
          unit: y.unit
        };
      } else return x * y;
    }
  },
  '/': function _(x, y, ctx) {
    if (x && x.unit) {
      if (y && y.unit) {
        throw Error("Can not call ".concat(x.value + x.unit, " / ").concat(y.value + y.unit));
      } else {
        return {
          value: x.value / y,
          unit: x.unit
        };
      }
    } else {
      if (y && y.unit) {
        throw Error("Can not call ".concat(x, " / ").concat(y.value + y.unit));
      } else return x * y;
    }
  },
  '+': function add(x, y, ctx) {
    if (x && x.unit) {
      if (y && y.unit) {
        if (x.unit === y.unit) {
          return {
            value: x.value + y.value,
            unit: x.unit
          };
        } else {
          return fx['+'](fx.toPx(x, ctx), fx.toPx(y, ctx));
        }
      } else {
        throw Error("Can not call ".concat(x.value + x.unit, " + ").concat(y));
      }
    } else {
      if (y && y.unit) {
        throw Error("Can not call ".concat(x, " +  ").concat(y.value + y.unit));
      } else return x + y;
    }
  },
  '-': function add(x, y, ctx) {
    if (x && x.unit) {
      if (y && y.unit) {
        if (x.unit === y.unit) {
          return {
            value: x.value - y.value,
            unit: x.unit
          };
        } else {
          return fx['+'](fx.toPx(x, ctx), fx.toPx(y, ctx));
        }
      } else {
        throw Error("Can not call ".concat(x.value - x.unit, " + ").concat(y));
      }
    } else {
      if (y && y.unit) {
        throw Error("Can not call ".concat(x, " -  ").concat(y.value + y.unit));
      } else return x + y;
    }
  },
  toPx: function toPx(val, ctx) {
    switch (val.unit) {
      case '%':
        if (typeof ctx.parentSize !== "number") throw new Error("Miss parentSize:number(px) in ctx");
        return {
          value: ctx.parentSize * val.value / 100,
          unit: 'px'
        };
      case 'vh':
        if (!ctx.screenSize) {
          ctx.screenSize = getScreenViewSize();
        }
        return {
          value: ctx.screenSize.height * val.value / 100,
          unit: 'px'
        };
      case 'vw':
        if (!ctx.screenSize) {
          ctx.screenSize = getScreenViewSize();
        }
        return {
          value: ctx.screenSize.width * val.value / 100,
          unit: 'px'
        };
      default:
        break;
    }
    return val;
  }
};
var visitors = {
  CallExpression: function CallExpression(astNode, ctx) {
    var args = astNode.arguments.map(function (it) {
      return accept(it, ctx);
    });
    args.push(ctx);
    return fx[astNode.callee.name].apply(null, args);
  },
  BinaryExpression: function BinaryExpression(astNode, ctx) {
    var left = accept(astNode.left, ctx);
    var right = accept(astNode.right, ctx);
    var func = fx[astNode.operator.content];
    return func(left, right, ctx);
  },
  MeasureLiteral: function MeasureLiteral(astNode, ctx) {
    return {
      value: astNode.value,
      unit: astNode.unit
    };
  },
  NumericLiteral: function NumericLiteral(astNode, ctx) {
    return astNode.value;
  },
  VariableName: function VariableName(astNode, ctx) {
    return astNode.name;
  }
};
var accept = function accept(astNode, ctx) {
  return visitors[astNode.type](astNode, ctx);
};

/**
 *
 * @param {string} exp
 * @param {{parentSize?: number, screenViewSize?:{width: number, height: number}, style?:CSSStyleDeclaration|Object, elt:AElement|any}} ctx
 * @param {boolean=} debug
 * @returns {*|null}
 */
function computeMeasureExpression(exp, ctx, debug) {
  try {
    var p = cssExpressionParser.parse(exp, 'exp');
    if (p.ast) {
      return accept(p.ast, ctx);
    }
    return null;
  } catch (error) {
    return null;
  }
}
function getQuerySelectorSpecificity(selector) {
  var inline = 0;
  var idCount = 0;
  var classCount = 0;
  var tagCount = 0;

  // Remove pseudo-elements
  selector = selector.replace(/::\w+/g, '');

  // Check for inline styles (not directly calculable from selector string)
  if (selector.includes('style="')) {
    inline = 1;
  }

  // Count ID selectors
  idCount = (selector.match(/#[\w-]+/g) || []).length;

  // Count class selectors, attributes selectors, and pseudo-classes
  classCount = (selector.match(/\.[\w-]+/g) || []).length + (selector.match(/\[[^\]]+\]/g) || []).length + (selector.match(/:(?!:)[\w-]+/g) || []).length;

  // Count element selectors and pseudo-elements
  tagCount = (selector.match(/^[\w-]+|\s[\w-]+/g) || []).length;
  return [inline, idCount, classCount, tagCount];
}
function compareQuerySelectorSpecificity(selector1, selector2) {
  var specificity1 = getQuerySelectorSpecificity(selector1);
  var specificity2 = getQuerySelectorSpecificity(selector2);
  return (0, _Array.arrayLexicographicalCompare)(selector1, specificity2);
}

/***/ }),

/***/ 18144:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "computeMeasureExpression", ({
  enumerable: true,
  get: function get() {
    return _CSSParser.computeMeasureExpression;
  }
}));
exports.parseClassAttr = parseClassAttr;
exports.parseMeasureValue = parseMeasureValue;
exports.parseStyleAttr = parseStyleAttr;
var _CSSParser = __webpack_require__(88975);
/**
 * 
 * @param {String} text 
 *  @returns {Object}
 */
function parseStyleAttr(text) {
  return text.split(';').map(function (line) {
    var parts = line.split(':');
    if (parts.length < 2) return null;
    var key = parts.shift().trim();
    var value = parts.join(':').trim();
    if (key.length == 0 || value.length == 0) return null;
    return [key, value];
  }).filter(function (it) {
    return it != null;
  }).reduce(function (ac, cr) {
    ac[cr[0]] = cr[1];
    return ac;
  }, {});
}

/**
 * 
 * @param {String} text 
 *  @returns {Array<String>}
 */
function parseClassAttr(text) {
  return text.trim().split(/\s+/);
}

/**
 *
 * @param mValue
 * @returns {{unit: null, value: string}|{unit: string, value: number}|null}
 */
function parseMeasureValue(mValue) {
  if (mValue === 'auto') return {
    unit: null,
    value: 'auto'
  };
  if (mValue === 'match_parent') return {
    unit: null,
    value: 'match_parent'
  };
  var value = NaN;
  var unit = null;
  var matched;
  if (typeof mValue === "number") {
    value = mValue;
    unit = 'px';
  } else if (typeof mValue === "string") {
    matched = mValue.match(/([+-]?([0-9]*[.])?[0-9]+([eE][+-]?[0-9]+)?)(px|%|vw|vh|em|rem|pt)?/i);
    if (matched) {
      value = parseFloat(matched[1]);
      unit = matched[4];
    }
  }
  if (isNaN(value)) return null;
  unit = unit || 'px';
  return {
    value: value,
    unit: unit
  };
}

/***/ }),

/***/ 18313:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.domVisitor = domVisitor;
exports.parseDom = parseDom;
var _attribute = __webpack_require__(18144);
function domVisitor(jsxCode) {
  var visitor = {
    File: function File(node, ac) {
      return acept(node.program, ac);
    },
    Program: function Program(node, ac) {
      ac.child = node.body.map(function (cNode) {
        return acept(cNode, {});
      });
      return ac;
    },
    ExpressionStatement: function ExpressionStatement(node, ac) {
      return acept(node.expression, ac);
    },
    JSXElement: function JSXElement(node, ac) {
      acept(node.openingElement, ac);
      if (node.children && node.children.length > 0) {
        ac.child = node.children.map(function (cNode) {
          return acept(cNode, {});
        });
      }
      return ac;
    },
    JSXOpeningElement: function JSXOpeningElement(node, ac) {
      var name = {};
      acept(node.name, name);
      ac.tag = name.value;
      if (node.attributes && node.attributes.length > 0) {
        node.attributes.forEach(function (aNode) {
          var attribute = {};
          acept(aNode, attribute);
          if (attribute.key) {
            if (attribute.key.startsWith('data-')) {
              ac.data = ac.data || {};
              ac.data[attribute.key.replace('data-', '')] = attribute.value;
            } else if (attribute.key.startsWith('prop-')) {
              ac.props = ac.props || {};
              ac.props[attribute.key.replace('prop-', '')] = attribute.value;
            } else if (attribute.key.startsWith('on-')) {
              ac.on = ac.props || {};
              ac.on[attribute.key.replace('on-', '')] = attribute.value;
            } else if (attribute.key == 'style') {
              ac.style = (0, _attribute.parseStyleAttr)(attribute.value);
            } else if (attribute.key == 'class') {
              var classList = (0, _attribute.parseClassAttr)(attribute.value);
              if (classList.length > 0) ac["class"] = classList;
            } else {
              ac.attr = ac.attr || {};
              ac.attr[attribute.key] = attribute.value;
            }
          }
        }, {});
      }
      return ac;
    },
    JSXIdentifier: function JSXIdentifier(node, ac) {
      ac.value = node.name;
    },
    JSXAttribute: function JSXAttribute(node, ac) {
      var key = {};
      acept(node.name, key);
      ac.key = key.value;
      var value = {};
      acept(node.value, value);
      ac.value = value.value;
      return ac;
    },
    StringLiteral: function StringLiteral(node, ac) {
      ac.value = node.value;
    },
    JSXExpressionContainer: function JSXExpressionContainer(node, ac) {
      ac.value = {
        expression: jsxCode.substring(node.expression.start, node.expression.end)
      };
      return ac;
    },
    JSXText: function JSXText(node, ac) {
      ac.text = node.value;
      return ac;
    }
  };
  function accept(node, ac) {
    return node && visitor[node.type] && visitor[node.type](node, ac);
  }
  return {
    acept: accept,
    accept: accept,
    visitor: visitor
  };
}

/***
 * @param {String} jsxCode
 */
function parseDom(jsxCode) {
  jsxCode = jsxCode.trim().replace(/>\s+</gm, '><').replace(/<(\/?)(img|input|link|br|meta)([^>]*)>/g, function (sub, end, tag, content) {
    if (end == '/') return '';
    return '<' + tag + content + '/>';
  });
  var ast = babel.parse(jsxCode, {
    plugins: [babel.pluginSyntaxJsx]
  });
  var xmlData = {};
  domVisitor(jsxCode).acept(ast, xmlData);
  if (xmlData.child.length > 1) return xmlData.child;
  return xmlData.child[0];
}

/***/ }),

/***/ 6483:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _int = __webpack_require__(65909);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function Arc(x, y, r, start, end) {
  this.x = x;
  this.y = y;
  this.r = r;
  this.start = start;
  this.end = end;
}
Arc.prototype.isPointInBound = function (p) {
  if ((0, _int.distance)(this.x, this.y, p.x, p.y) > r) return false;
  return (0, _int.radianInRange)(Math.atan2(p.y - this.y, p.x - this.x), start, end);
};
Arc.prototype.isRectInBound = function (rect) {
  return this.isPointInBound(rect.A()) && this.isPointInBound(rect.B()) && this.isPointInBound(rect.C()) && this.isPointInBound(rect.D());
};
Arc.prototype.isRectOutBound = function (rect) {
  return !this.isPointInBound(rect.A()) && !this.isPointInBound(rect.B()) && !this.isPointInBound(rect.C()) && !this.isPointInBound(rect.D());
};
Arc.prototype.isRectCollapse = function (rect) {
  return this.isPointInBound(rect.A()) || this.isPointInBound(rect.B()) || this.isPointInBound(rect.C()) || this.isPointInBound(rect.D());
};
Arc.prototype.centerPoint = function () {
  var mid = (this.start + this.end) / 2;
  var x = this.x + Math.cos(mid) * this.r * 2 / 3;
  var y = this.y + Math.sin(mid) * this.r * 2 / 3;
  return new _Vec["default"](x, y);
};
Arc.prototype.centerRoundPoint = function () {
  var mid = (this.start + this.end) / 2;
  var x = this.x + Math.cos(mid) * this.r;
  var y = this.y + Math.sin(mid) * this.r;
  return new _Vec["default"](x, y);
};
Arc.make = function (x, y, r, start, end) {
  return new Arc(x, y, r, start, end);
};
var _default = Arc;
exports["default"] = _default;

/***/ }),

/***/ 57015:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @param {Vec2} startPoint
 * @param {Vec2} ctrlPoint1
 * @param {Vec2} ctrlPoint2
 * @param {Vec2} endPoint
 * @constructor
 */
function BezierCurve(startPoint, ctrlPoint1, ctrlPoint2, endPoint) {
  this.startPoint = startPoint;
  this.ctrlPoint1 = ctrlPoint1;
  this.ctrlPoint2 = ctrlPoint2;
  this.endPoint = endPoint;
}

/**
 *
 * @param {number} t
 */
BezierCurve.prototype.pointAt = function (t) {
  var s1 = this.ctrlPoint1.sub(this.startPoint).mult(t).add(this.startPoint);
  var s2 = this.ctrlPoint2.sub(this.ctrlPoint1).mult(t).add(this.ctrlPoint1);
  var s3 = this.endPoint.sub(this.ctrlPoint2).mult(t).add(this.ctrlPoint2);
  var s4 = s2.sub(s1).mult(t).add(s1);
  var s5 = s3.sub(s2).mult(t).add(s2);
  return s5.sub(s4).mult(t).add(s4);
};

/**
 *
 * @param {Vec2} point
 * @returns {number}
 */
BezierCurve.prototype.nearestBzParamToPoint = function (point) {
  var low = 0;
  var high = 1;
  var ml;
  var mh;
  var delta = 0.00001;
  while (high - low > delta) {
    ml = low + (high - low) / 3;
    mh = high - (high - low) / 3;
    if (this.pointAt(ml).dist(point) < this.pointAt(mh).dist(point)) {
      high = mh;
    } else {
      low = ml;
    }
  }
  return (low + high) / 2;
};

/**
 *
 * @param {Vec2} point
 * @returns {*}
 */
BezierCurve.prototype.distanceToPoint = function (point) {
  return this.pointAt(this.nearestBzParamToPoint(point)).dist(point);
};
/**
 *
 * @param {BezierCurve} otherCurve
 * @returns {{current: number, other: number}}
 */
BezierCurve.prototype.nearestBParamToOtherBzCurve = function (otherCurve) {
  var res = {
    current: 0,
    other: 0
  };
  var delta = 0.00001;
  var low = 0;
  var high = 1;
  var ml;
  var mh;
  var currentPointL, currentPointH;
  while (high - low > delta) {
    ml = low + (high - low) / 3;
    mh = high - (high - low) / 3;
    currentPointL = this.pointAt(ml);
    currentPointH = this.pointAt(mh);
    if (otherCurve.distanceToPoint(currentPointL) < otherCurve.distanceToPoint(currentPointH)) {
      high = mh;
    } else {
      low = ml;
    }
  }
  res.current = (low + high) / 2;
  currentPointL = this.pointAt(res.current);
  res.other = otherCurve.nearestBzParamToPoint(currentPointL);
  return res;
};

/**
 * @returns {BezierCurve}
 */
BezierCurve.prototype.copy = function () {
  return new BezierCurve(this.startPoint.copy(), this.ctrlPoint1.copy(), this.ctrlPoint2.copy(), this.endPoint.copy());
};
var _default = BezierCurve;
exports["default"] = _default;

/***/ }),

/***/ 96603:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function Mat3(data) {
  this.data = data || Array(6).fill(0);
}
Mat3.identity = function () {
  return new Mat3([1, 0, 0, 0, 1, 0, 0, 0, 1]);
};

/**
 *
 * @returns {Mat3|null}
 */
Mat3.prototype.invert = function () {
  var a = this.data;
  var out = Array(9);
  var a00 = a[0],
    a01 = a[1],
    a02 = a[2];
  var a10 = a[3],
    a11 = a[4],
    a12 = a[5];
  var a20 = a[6],
    a21 = a[7],
    a22 = a[8];
  var b01 = a22 * a11 - a12 * a21;
  var b11 = -a22 * a10 + a12 * a20;
  var b21 = a21 * a10 - a11 * a20;

  // Calculate the determinant
  var det = a00 * b01 + a01 * b11 + a02 * b21;
  if (!det) return null;
  det = 1.0 / det;
  out[0] = b01 * det;
  out[1] = (-a22 * a01 + a02 * a21) * det;
  out[2] = (a12 * a01 - a02 * a11) * det;
  out[3] = b11 * det;
  out[4] = (a22 * a00 - a02 * a20) * det;
  out[5] = (-a12 * a00 + a02 * a10) * det;
  out[6] = b21 * det;
  out[7] = (-a21 * a00 + a01 * a20) * det;
  out[8] = (a11 * a00 - a01 * a10) * det;
  return new Mat3(out);
};

/**
 *
 * @param {Vec2} v
 * @return {Mat3}
 */
Mat3.prototype.translate = function (v) {
  var out = Array(9);
  var a = this.data;
  var a00 = a[0],
    a01 = a[1],
    a02 = a[2];
  var a10 = a[3],
    a11 = a[4],
    a12 = a[5];
  var a20 = a[6],
    a21 = a[7],
    a22 = a[8];
  var x = v.x,
    y = v.y;
  out[0] = a00;
  out[1] = a01;
  out[2] = a02;
  out[3] = a10;
  out[4] = a11;
  out[5] = a12;
  out[6] = x * a00 + y * a10 + a20;
  out[7] = x * a01 + y * a11 + a21;
  out[8] = x * a02 + y * a12 + a22;
  return new Mat3(out);
};

/**
 *
 * @param {Mat3} mat
 * @returns {Mat3}
 */
Mat3.prototype.multiply = function (mat) {
  var a = this.data;
  var b = mat.data;
  var a00 = a[0],
    a01 = a[1],
    a02 = a[2];
  var a10 = a[3],
    a11 = a[4],
    a12 = a[5];
  var a20 = a[6],
    a21 = a[7],
    a22 = a[8];
  var b00 = b[0],
    b01 = b[1],
    b02 = b[2];
  var b10 = b[3],
    b11 = b[4],
    b12 = b[5];
  var b20 = b[6],
    b21 = b[7],
    b22 = b[8];
  var out = Array(9);
  out[0] = b00 * a00 + b01 * a10 + b02 * a20;
  out[1] = b00 * a01 + b01 * a11 + b02 * a21;
  out[2] = b00 * a02 + b01 * a12 + b02 * a22;
  out[3] = b10 * a00 + b11 * a10 + b12 * a20;
  out[4] = b10 * a01 + b11 * a11 + b12 * a21;
  out[5] = b10 * a02 + b11 * a12 + b12 * a22;
  out[6] = b20 * a00 + b21 * a10 + b22 * a20;
  out[7] = b20 * a01 + b21 * a11 + b22 * a21;
  out[8] = b20 * a02 + b21 * a12 + b22 * a22;
  return new Mat3(out);
};

/***
 *
 * @param {Number} rad
 * @return {Mat3}
 */
Mat3.prototype.rotate = function (rad) {
  var a = this.data;
  var a00 = a[0],
    a01 = a[1],
    a02 = a[2];
  var a10 = a[3],
    a11 = a[4],
    a12 = a[5];
  var a20 = a[6],
    a21 = a[7],
    a22 = a[8];
  var s = Math.sin(rad);
  var c = Math.cos(rad);
  var out = Array(9);
  out[0] = c * a00 + s * a10;
  out[1] = c * a01 + s * a11;
  out[2] = c * a02 + s * a12;
  out[3] = c * a10 - s * a00;
  out[4] = c * a11 - s * a01;
  out[5] = c * a12 - s * a02;
  out[6] = a20;
  out[7] = a21;
  out[8] = a22;
  return new Mat3(out);
};

/***
 *
 * @param {Vec2} v
 * @returns {Mat3}
 */
Mat3.prototype.scale = function (v) {
  var x = v.x;
  var y = v.y;
  var out = Array(9);
  out[0] = x * a[0];
  out[1] = x * a[1];
  out[2] = x * a[2];
  out[3] = y * a[3];
  out[4] = y * a[4];
  out[5] = y * a[5];
  out[6] = a[6];
  out[7] = a[7];
  out[8] = a[8];
  return new Mat3(out);
};

/***
 *
 * @return {Mat3}
 */
Mat3.prototype.transpose = function () {
  var a = this.data;
  var out = Array(9);
  out[0] = a[0];
  out[1] = a[3];
  out[2] = a[6];
  out[3] = a[1];
  out[4] = a[4];
  out[5] = a[7];
  out[6] = a[2];
  out[7] = a[5];
  out[8] = a[8];
  return new Mat3(out);
};

/**
 *
 * @param {Vec2}v
 */
Mat3.prototype.apply2DTransform = function (v) {
  var a = this.data;
  var x0 = v.x;
  var y0 = v.y;
  var x = x0 * a[0] + y0 * a[3] + a[6];
  var y = x0 * a[1] + y0 * a[4] + a[7];
  return new _Vec["default"](x, y);
};
var _default = Mat3;
exports["default"] = _default;

/***/ }),

/***/ 96667:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * 
 * @param {Number} start 
 * @param {Number} length
 */
function NumRange(start, length) {
  if (arguments.length === 1) length = 0;else if (arguments.length === 0) {
    length = 0;
    start = 0;
  }
  this.start = start;
  this.length = length;
}

/**
 * @param {Number} num 
 */
NumRange.prototype.contains = function (num) {
  return num >= this.start && num <= this.start + this.length;
};

/**
 * @param {NumRange} other
 * @returns {NumRange}
 */
NumRange.prototype.merge = function (other) {
  var start = Math.min(this.start, other.start);
  var end = Math.max(this.start + this.length, other.start + other.length);
  return new NumRange(start, end - start);
};
NumRange.prototype.centerValue = function () {
  return this.start + this.length / 2;
};

/**
 * @param {NumRange} other
 * @returns {Boolean}
 */
NumRange.prototype.isCollapse = function (other) {
  var start = Math.max(this.start, other.start);
  var end = Math.min(this.start + this.length, other.start + other.length);
  return start <= end;
};

/**
 * @param {NumRange} other
 * @returns {NumRange}
 */
NumRange.prototype.collapsedNumRange = function (other) {
  var start = Math.max(this.start, other.start);
  var end = Math.min(this.start + this.length, other.start + other.length);
  if (start <= end) return new NumRange(start, end - start);
  return null;
};
NumRange.prototype.clone = function () {
  return new NumRange(this.start, this.length);
};
var _default = NumRange;
exports["default"] = _default;

/***/ }),

/***/ 25682:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {Vec2[]} vertices
 * @constructor
 */
function Polygon(vertices) {
  this.vertices = vertices;
}

/***
 *
 * @param {Vec2} P
 * @returns {-1|0|1}
 */
Polygon.prototype.pointLocalIn = function (P) {
  var A = this.vertices[this.vertices.length - 1];
  var B;
  var AB, PA, PB;
  var t, x;
  var count = 0;
  for (var i = 0; i < this.vertices.length; ++i) {
    B = this.vertices[i];
    PA = A.sub(P);
    PB = B.sub(P);
    if (PA.cross(PB) === 0 && PA.dot(PB) <= 0) {
      return 0;
    }
    AB = B.sub(A);
    if (A.y !== B.y) {
      t = -PA.y / AB.y;
      x = A.x + AB.x * t;
      if (t >= 0 && t < 1 && x > P.x) {
        count++;
      }
    }
    A = B;
  }
  return count % 2 === 1 ? 1 : -1;
};
Polygon.prototype.getPathString = function () {
  var vts = this.vertices;
  var res = 'M' + vts[0].x + ' ' + vts[0].y;
  for (var i = 1; i < vts.length; ++i) {
    res += 'L' + vts[i].x + ' ' + vts[i].y;
  }
  res += 'z';
  return res;
};
Polygon.prototype.copy = function () {
  return new Polygon(this.vertices.map(function (v) {
    return v.copy();
  }));
};
Polygon.make = function (vertices) {
  return new Polygon(vertices);
};
var _default = Polygon;
exports["default"] = _default;

/***/ }),

/***/ 67161:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _SegmentLine = _interopRequireDefault(__webpack_require__(86767));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function Polyline(points) {
  if (points.length < 2) points = [new _Vec["default"](0, 0), new _Vec["default"](0, 0)];
  this.points = points;
}
Polyline.prototype.nearestParamToPoint = function (point) {
  var sgm;
  var minDist = Infinity;
  var minParam = 0;
  var param;
  for (var i = 0; i < this.points.length - 1; ++i) {
    sgm = new _SegmentLine["default"](this.points[i], this.points[i + 1]);
    param = sgm.nearestParamToPoint(point);
    if (sgm.pointAt(param).dist(point) < minDist) {
      minDist = sgm.pointAt(param).dist(point);
      minParam = i + param;
    }
  }
  return minParam;
};

/**
 *
 * @param {number} param - from 0 to points_length - 1
 * @returns {Vec2}
 */
Polyline.prototype.pointAt = function (param) {
  if (param < 0) return this.points[0];
  if (param >= this.points.length - 1) return this.points[this.points.length - 1];
  var idx = Math.floor(param);
  var sgm = new _SegmentLine["default"](this.points[idx], this.points[idx + 1]);
  return sgm.pointAt(param - idx);
};
Polyline.prototype.copy = function () {
  return new Polyline(this.points.map(function (p) {
    return p.copy();
  }));
};

/**
 * @param {number=} tolerance
 * @returns {Polyline}
 */
Polyline.prototype.simplify = function (tolerance) {
  tolerance = tolerance || 0.00001;
  var points = this.points;
  var newPoints = [];
  var point, lastPoint;
  var sm;
  var dist;
  for (var i = 0; i < points.length; ++i) {
    point = points[i];
    if (newPoints.length < 2) {
      newPoints.push(point);
      continue;
    }
    lastPoint = newPoints[newPoints.length - 1];
    sm = new _SegmentLine["default"](newPoints[newPoints.length - 2], point);
    dist = sm.nearestPointToPoint(lastPoint).dist(lastPoint);
    if (dist > tolerance) {
      newPoints.push(point);
    } else {
      newPoints[newPoints.length - 1] = point;
    }
  }
  return new Polyline(newPoints);
};
var _default = Polyline;
exports["default"] = _default;

/***/ }),

/***/ 62986:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @param {Number} x
 * @param {Number} y
 * @param {Number} width
 * @param {Number} height
 */
function Rectangle(x, y, width, height) {
  this.width = width;
  this.height = height;
  this.x = x;
  this.y = y;
}

/**
 *
 * @return {Vec2}
 * @constructor
 */
Rectangle.prototype.A = function () {
  return new _Vec["default"](this.x, this.y);
};

/***
 *
 * @return {Vec2}
 * @constructor
 */
Rectangle.prototype.B = function () {
  return new _Vec["default"](this.x + this.width, this.y);
};

/***
 *
 * @return {Vec2}
 * @constructor
 */
Rectangle.prototype.C = function () {
  return new _Vec["default"](this.x + this.width, this.y + this.height);
};

/***
 *
 * @return {Vec2}
 * @constructor
 */
Rectangle.prototype.D = function () {
  return new _Vec["default"](this.x, this.y + this.height);
};

/***
 *
 * @return {number}
 */
Rectangle.prototype.square = function () {
  return this.width * this.height;
};
Rectangle.prototype.nearestPoint = function (arg0, arg1) {
  if (arg1) arg0 = _Vec["default"].make(arg0, arg1);
  var res = this.A();
  var mind = res.dist(arg0);
  var d = this.B().dist(arg0);
  if (d < mind) {
    mind = d;
    res = this.B();
  }
  d = this.C().dist(arg0);
  if (d < mind) {
    mind = d;
    res = this.C();
  }
  d = this.D().dist(arg0);
  if (d < mind) {
    mind = d;
    res = this.D();
  }
  return res;
};
Rectangle.prototype.centerPoint = function () {
  return new _Vec["default"](this.x + this.width / 2, this.y + this.height / 2);
};

/***
 *
 * @param {Rectangle} r
 * @param {number=} margin
 * @return {boolean}
 */
Rectangle.prototype.isCollapse = function (r, margin) {
  if (!margin) margin = 0;
  return !(this.x >= r.x + r.width + margin || this.y >= r.y + r.height + margin || r.x >= this.x + this.width + margin || r.y >= this.y + this.height + margin);
};

/***
 *
 * @param {Rectangle} r
 * @return {number}
 */
Rectangle.prototype.collapsedSquare = function (r) {
  var collapseRect = this.collapsedRect(r);
  if (collapseRect) {
    return collapseRect.square();
  } else {
    return 0;
  }
};

/***
 *
 * @param {Rectangle} r
 * @return {Rectangle}
 */
Rectangle.prototype.collapsedRect = function (r) {
  var maxX, minX, maxY, minY, width, height;
  minX = Math.max(this.x, r.x);
  minY = Math.max(this.y, r.y);
  maxX = Math.min(this.x + this.width, r.x + r.width);
  maxY = Math.min(this.y + this.height, r.y + r.height);
  width = maxX - minX;
  height = maxY - minY;
  if (width >= 0 && height >= 0) {
    return new Rectangle(minX, minY, width, height);
  }
  return null;
};

/**
 * @param {Rectangle} r
 * @returns {Boolean}
 */
Rectangle.prototype.contains = function (r) {
  return this.x <= r.x && this.y <= r.y && this.x + this.width >= r.x + r.width && this.y + this.height >= r.y + r.height;
};

/**
 * @param {Vec2} p
 * @returns {Boolean}
 */
Rectangle.prototype.containsPoint = function (p) {
  return this.x <= p.x && this.y <= p.y && this.x + this.width >= p.x && this.y + this.height >= p.y;
};

/**
 * @param {Rectangle} other
 * @returns {Rectangle}
 */
Rectangle.prototype.merge = function (other) {
  var left = Math.min(this.x, other.x);
  var top = Math.min(this.y, other.y);
  var right = Math.max(this.x + this.width, other.x + other.width);
  var bottom = Math.max(this.y + this.height, other.y + other.height);
  return new Rectangle(left, top, right - left, bottom - top);
};

/**
 * @returns {Rectangle}
 */
Rectangle.prototype.copy = function () {
  return new Rectangle(this.x, this.y, this.width, this.height);
};

/**
 * @returns {Rectangle}
 */
Rectangle.prototype.clone = function () {
  return this.copy();
};

/***
 *
 * @param {Rectangle} r
 */
Rectangle.prototype.equals = function (r) {
  return this.x === r.x && this.y === r.y && this.height === r.height && this.width === r.width;
};

/**
 * @param {Number} x
 * @param {Number} y
 * @param {Number} width
 * @param {Number} height
 * @returns {Rectangle}
 */
Rectangle.make = function (x, y, width, height) {
  return new Rectangle(x, y, width, height);
};

/**
 * @param {Number} x
 * @param {Number} y
 * @param {Number} width
 * @param {Number} height
 * @returns {Rectangle}
 */
Rectangle.makeCenter = function (x, y, width, height) {
  return new Rectangle(x - width / 2, y - height / 2, width, height);
};

/**
 * @param {ClientRect|DOMRect} clientRect
 * @returns {Rectangle}
 */
Rectangle.fromClientRect = function (clientRect) {
  return new Rectangle(clientRect.left, clientRect.top, clientRect.width, clientRect.height);
};

/***
 *
 * @param {Vec2[]} points
 * @returns  {Rectangle}
 */
Rectangle.boundingPoints = function (points) {
  var minX = Infinity,
    minY = Infinity,
    maxX = -Infinity,
    maxY = -Infinity;
  var point;
  for (var i = 0; i < points.length; ++i) {
    point = points[i];
    minX = Math.min(minX, point.x);
    maxX = Math.max(maxX, point.x);
    minY = Math.min(minY, point.y);
    maxY = Math.max(maxY, point.y);
  }
  return new Rectangle(minX, minY, maxX - minX, maxY - minY);
};
var _default = Rectangle;
exports["default"] = _default;

/***/ }),

/***/ 86767:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Vec = _interopRequireDefault(__webpack_require__(73316));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 *
 * @param {Vec2} start
 * @param {Vec2}end
 * @constructor
 */
function SegmentLine(start, end) {
  this.start = start;
  this.end = end;
}
SegmentLine.prototype.length = function () {
  return this.start.dist(this.end);
};

/**
 *
 * @param t
 * @returns {Vec2}
 */
SegmentLine.prototype.pointAt = function (t) {
  return this.start.add(this.end.sub(this.start).mult(t));
};

/**
 *
 * @param {Vec2} point
 * @returns {number}
 */
SegmentLine.prototype.nearestParamToPoint = function (point) {
  var v = this.end.sub(this.start);
  var w = point.sub(this.start);
  var c1 = w.dot(v);
  if (c1 <= 0) {
    return 0;
  }
  var c2 = v.dot(v);
  if (c2 <= c1) {
    return 1;
  }
  return c1 / c2;
};

/**
 *
 * @param {Vec2} point
 * @returns {Vec2}
 */
SegmentLine.prototype.nearestPointToPoint = function (point) {
  return this.pointAt(this.nearestParamToPoint(point));
};

/**
 *
 * @param {SegmentLine} sgm
 * @returns {Vec2}
 */
SegmentLine.prototype.intersect = function (sgm) {
  var x1 = this.start.x;
  var y1 = this.start.y;
  var x2 = this.end.x;
  var y2 = this.end.y;
  var x3 = sgm.start.x;
  var y3 = sgm.start.y;
  var x4 = sgm.end.x;
  var y4 = sgm.end.y;
  var d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);
  if (d === 0) {
    return null;
  }
  var xi = ((x3 - x4) * (x1 * y2 - y1 * x2) - (x1 - x2) * (x3 * y4 - y3 * x4)) / d;
  var yi = ((y3 - y4) * (x1 * y2 - y1 * x2) - (y1 - y2) * (x3 * y4 - y3 * x4)) / d;
  return new _Vec["default"](xi, yi);
};

/**
 *
 * @param {SegmentLine} sgm
 * @returns {boolean}
 */
SegmentLine.prototype.isIntersectWithSegment = function (sgm) {
  return this.intersect(sgm) !== null;
};

/**
 * @param {Vec2} point
 */
SegmentLine.prototype.orthogonalProjectionPoint = function (point) {
  var v = this.end.sub(this.start);
  var w = point.sub(this.start);
  var c1 = w.dot(v);
  var c2 = v.dot(v);
  if (c2 === 0) return this.start;
  return this.start.add(v.mult(c1 / c2));
};
SegmentLine.prototype.midpoint = function () {
  return this.pointAt(0.5);
};
SegmentLine.prototype.clone = function () {
  return new SegmentLine(this.start.clone(), this.end.clone());
};
var _default = SegmentLine;
exports["default"] = _default;

/***/ }),

/***/ 73316:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/***
 *
 * @param  {Number} x
 * @param {Number} y
 * @constructor
 */
function Vec2(x, y) {
  this.x = x;
  this.y = y;
}

/***
 *
 * @returns {Vec2}
 */
Vec2.prototype.copy = function () {
  return new Vec2(this.x, this.y);
};

/***
 *
 * @returns {string}
 */
Vec2.prototype.toString = function () {
  return "(" + this.x + ", " + this.y + ")";
};

/***
 *
 * @returns {number}
 */
Vec2.prototype.abs = function () {
  return Math.sqrt(this.x * this.x + this.y * this.y);
};

/***
 *
 * @returns {Vec2}
 */
Vec2.prototype.normalized = function () {
  var l = this.abs();
  if (l == 0) l = 1;
  return this.div(l);
};

/***
 *
 * @param {number} h
 * @returns {Vec2}
 */
Vec2.prototype.mult = function (h) {
  return new Vec2(this.x * h, this.y * h);
};

/***
 *
 * @param {number} h
 * @returns {Vec2}
 */
Vec2.prototype.div = function (h) {
  return new Vec2(this.x / h, this.y / h);
};

/***
 *
 * @param v
 * @returns {number}
 */
Vec2.prototype.dist = function (v) {
  var dx = v.x - this.x;
  var dy = v.y - this.y;
  return Math.sqrt(dx * dx + dy * dy);
};

/***
 *
 * @param {Vec2} v
 * @returns {Vec2}
 */
Vec2.prototype.sub = function (v) {
  return new Vec2(this.x - v.x, this.y - v.y);
};

/***
 *
 * @param {Vec2} v
 * @returns {Vec2}
 */
Vec2.prototype.add = function (v) {
  return new Vec2(this.x + v.x, this.y + v.y);
};

/***
 *
 * @returns {Vec2}
 */
Vec2.prototype.inv = function () {
  return new Vec2(-this.x, -this.y);
};

/***
 *
 * @param {Vec2} v
 * @param {number} h
 * @returns {Vec2}
 */
Vec2.prototype.linear = function (v, h) {
  return new Vec2(this.x * (1 - h) + v.x * h, this.y * (1 - h) + v.y * h);
};

/***
 *
 * @param {Vec2} v1
 * @returns {number}
 */
Vec2.prototype.dot = function (v1) {
  return this.x * v1.x + this.y * v1.y;
};

/***
 *
 * @param {Vec2} v1
 * @returns {number}
 */
Vec2.prototype.cross = function (v1) {
  return this.x * v1.y - this.y * v1.x;
};

/***
 *
 * @returns {number}
 */
Vec2.prototype.direction = function () {
  return Math.atan2(this.y, this.x);
};

/***
 *
 * @param {Number} dx
 * @param {Number} dy
 */
Vec2.prototype.translate = function (dx, dy) {
  return this.add(new Vec2(dx, dy));
};

/****
 *
 * @param {Number} angle - radian
 * @returns {Vec2}
 */
Vec2.prototype.rotate = function (angle) {
  var sinA = Math.sin(angle);
  var cosA = Math.cos(angle);
  var x = this.x * cosA - this.y * sinA;
  var y = this.x * sinA + this.y * cosA;
  return new Vec2(x, y);
};

/***
 *
 * @returns {Vec2}
 */
Vec2.prototype.rotate90 = function () {
  return new Vec2(-this.y, this.x);
};

/***
 *
 * @param {Vec2} b
 */
Vec2.prototype.equals = function (b) {
  return b && this.x === b.x && this.y === b.y;
};

/***
 *
 * @param {number} angle
 * @returns {Vec2}
 */
Vec2.fromDirection = function (angle) {
  return new Vec2(Math.cos(angle), Math.sin(angle));
};

/***
 *
 * @param x
 * @param y
 * @returns {Vec2}
 */
Vec2.make = function (x, y) {
  if (x instanceof Array) {
    return new Vec2(x[0], x[1]);
  } else if (x instanceof Vec2) {
    return x.copy();
  } else return new Vec2(x, y);
};
Vec2.ZERO = new Vec2(0, 0);
Vec2.OX = new Vec2(1, 0);
Vec2.OY = new Vec2(0, 1);
var _default = Vec2;
exports["default"] = _default;

/***/ }),

/***/ 65909:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.distance = distance;
exports.harmonicMean = harmonicMean;
exports.integerZeroPadding = integerZeroPadding;
exports.isNumber = isNumber;
exports.map = map;
exports.numberAutoFixed = numberAutoFixed;
exports.numberToString = numberToString;
exports.radianInRange = radianInRange;
exports.sumArr = sumArr;
/**
 *
 * @param {number} x
 * @param {number} l
 * @param {number} h
 * @param {number} L
 * @param {number} H
 * @returns {number}
 */
function map(x, l, h, L, H) {
  return (x - l) / (h - l) * (H - L) + L;
}
function sumArr(arr) {
  var res = 0;
  for (var i = 0; i < arr.length; ++i) {
    res += arr[i];
  }
  return res;
}
function radianInRange(x, start, end) {
  if (start > end) return radianInRange(x, end, start);
  if (x < start) x += Math.PI * 2 * Math.ceil((start - x) / 2 / Math.PI);
  if (x > end) x -= Math.PI * 2 * Math.ceil((x - end) / 2 / Math.PI);
  return x >= start && x <= end;
}
function distance(x0, y0, x1, y1) {
  var dx = x0 - x1;
  var dy = y0 - y1;
  return Math.sqrt(dx * dx + dy * dy);
}

/**
 *
 * @param {Number} numb
 * @param {Number} floatFixed
 * @param {"."|","} decimalSeparator
 * @param {","|"."} thousandsSeparator
 * @param {Number} decimalPadding
 */
function numberToString(numb, floatFixed, decimalSeparator, thousandsSeparator, decimalPadding) {
  if (floatFixed === undefined || floatFixed === null || typeof floatFixed != "number" || isNaN(floatFixed) || floatFixed < -1) floatFixed = -1;
  if (decimalSeparator === undefined || decimalSeparator === null || decimalSeparator != '.' && decimalSeparator != ',') decimalSeparator = '.';
  if (thousandsSeparator === undefined || thousandsSeparator === null || floatFixed >= 0 && thousandsSeparator == decimalSeparator) thousandsSeparator = undefined;
  if (thousandsSeparator != ',' && thousandsSeparator != '.') thousandsSeparator = undefined;
  if (decimalPadding === undefined || decimalPadding === null || typeof decimalPadding != "number" || isNaN(decimalPadding) || decimalPadding < 0) decimalPadding = 0;
  var text = numb.toString();
  var matched = text.match(/[+-]?([0-9]*)(\.([0-9]*))?(e([+-]?[0-9]+))?/);
  var dec = matched[1] || '';
  var real = matched[3] || '';
  var floatPoint = parseInt(matched[5] || '0');
  var decDigits = dec.split('').map(function (d) {
    return parseInt(d);
  });
  var realDigits = real.split('').map(function (d) {
    return parseInt(d);
  });
  while (floatPoint < 0) {
    if (decDigits.length > 0) {
      realDigits.unshift(decDigits.pop());
    } else {
      realDigits.unshift(0);
    }
    floatPoint++;
  }
  while (floatPoint > 0) {
    if (realDigits.length > 0) {
      decDigits.push(realDigits.unshift());
    } else {
      decDigits.push(0);
    }
    floatPoint++;
  }
  var mem = 0,
    i,
    cValue;
  if (floatFixed > realDigits.length) {
    while (realDigits.length < floatFixed) {
      realDigits.push(0);
    }
  } else if (floatFixed < realDigits.length && floatFixed >= 0) {
    i = floatFixed;
    mem = realDigits[i] >= 5 ? 1 : 0;
    realDigits.splice(floatFixed);
    --i;
    while (mem > 0) {
      if (i >= 0) {
        cValue = realDigits[i] + mem;
        realDigits[i] = cValue % 10;
        mem = Math.floor(cValue / 10);
      } else {
        if (decDigits.length + i < 0) decDigits.unshift(0);
        cValue = decDigits[decDigits.length + i] + mem;
        decDigits[decDigits.length + i] = cValue % 10;
        mem = Math.floor(cValue / 10);
      }
      --i;
    }
  }
  while (decDigits.length < decimalPadding) {
    decDigits.unshift(0);
  }
  var decText = numb < 0 ? '-' : '';
  var breadMod = (decDigits.length + 2) % 3;
  if (thousandsSeparator) {
    for (i = 0; i < decDigits.length; ++i) {
      decText += decDigits[i];
      if (i % 3 == breadMod && i + 1 < decDigits.length) {
        decText += thousandsSeparator;
      }
    }
  } else {
    decText += decDigits.join('');
  }
  var realText = realDigits.length == 0 ? '' : decimalSeparator + realDigits.join('');
  return decText + realText;
}

/***
 *
 * @param value
 * @param {string=}decimalSeparator
 */
function isNumber(value, decimalSeparator) {
  decimalSeparator = decimalSeparator || '.';
  if (typeof value === "number") return true;
  if (typeof value !== "string") return false;
  var thousandsSeparator = decimalSeparator === '.' ? ',' : '.';
  value = value.split(thousandsSeparator).join('');
  value = value.replace(decimalSeparator, '.');
  return !!value.match(/^[+-]?\d+(\.\d+)?$/);
}
function numberAutoFixed(x, eDelta) {
  eDelta = eDelta || 10;
  eDelta = Math.round(eDelta);
  var e = parseFloat('1e+' + eDelta);
  return Math.round(x * e) / e;
}

/***
 *
 * @param {number} number
 * @param {number} length
 * @returns {string}
 */
function integerZeroPadding(number, length) {
  var res = number + '';
  while (res.length < length) {
    res = '0' + res;
  }
  return res;
}
function harmonicMean(a, b) {
  return 2 / (1 / a + 1 / b);
}

/***/ }),

/***/ 23873:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.PAGE_SIZE_IN_POINT = exports.PAGE_SIZE_IN_DOT = void 0;
exports.centimeterToPx = centimeterToPx;
exports.dotToPoint = dotToPoint;
exports.feetToMeter = feetToMeter;
exports.latLngDistance = latLngDistance;
exports.latLngRectFromCenter = latLngRectFromCenter;
exports.meterToFeet = meterToFeet;
exports.meterToInch = meterToInch;
exports.meterToMile = meterToMile;
exports.meterToYard = meterToYard;
exports.mileToMeter = mileToMeter;
exports.pointToDot = pointToDot;
exports.pxToCentimeter = pxToCentimeter;
exports.yardToMeter = yardToMeter;
function feetToMeter(ft) {
  return ft / 3.28084;
}
function meterToFeet(mt) {
  return mt * 3.28084;
}
function meterToInch(mt) {
  return mt * 39.3701;
}
function mileToMeter(ml) {
  return ml * 1609.34;
}
function meterToMile(ml) {
  return ml / 1609.34;
}
function meterToYard(mt) {
  return mt * 1.09361;
}
function yardToMeter(yd) {
  return yd / 1.09361;
}

/**
 * dot is same pixel in web
 * @param p
 * @returns {number}
 */
function pointToDot(p) {
  return p * 72 / 96;
}
function dotToPoint(d) {
  return d * 96 / 72;
}
function pxToCentimeter(px) {}
function centimeterToPx(cm) {
  return meterToInch(cm / 100) * 96;
}
var PAGE_SIZE_IN_DOT = {
  a0: [2383.94, 3370.39],
  a1: [1683.78, 2383.94],
  a2: [1190.55, 1683.78],
  a3: [841.89, 1190.55],
  a4: [595.28, 841.89],
  a5: [419.53, 595.28],
  a6: [297.64, 419.53],
  a7: [209.76, 297.64],
  a8: [147.4, 209.76],
  a9: [104.88, 147.4],
  a10: [73.7, 104.88],
  b0: [2834.65, 4008.19],
  b1: [2004.09, 2834.65],
  b2: [1417.32, 2004.09],
  b3: [1000.63, 1417.32],
  b4: [708.66, 1000.63],
  b5: [498.9, 708.66],
  b6: [354.33, 498.9],
  b7: [249.45, 354.33],
  b8: [175.75, 249.45],
  b9: [124.72, 175.75],
  b10: [87.87, 124.72],
  c0: [2599.37, 3676.54],
  c1: [1836.85, 2599.37],
  c2: [1298.27, 1836.85],
  c3: [918.43, 1298.27],
  c4: [649.13, 918.43],
  c5: [459.21, 649.13],
  c6: [323.15, 459.21],
  c7: [229.61, 323.15],
  c8: [161.57, 229.61],
  c9: [113.39, 161.57],
  c10: [79.37, 113.39],
  dl: [311.81, 623.62],
  letter: [612, 792],
  "government-letter": [576, 756],
  legal: [612, 1008],
  "junior-legal": [576, 360],
  ledger: [1224, 792],
  tabloid: [792, 1224],
  "credit-card": [153, 243]
};
exports.PAGE_SIZE_IN_DOT = PAGE_SIZE_IN_DOT;
var PAGE_SIZE_IN_POINT = Object.keys(PAGE_SIZE_IN_DOT).reduce(function (ac, key) {
  ac[key] = PAGE_SIZE_IN_DOT[key].map(function (d) {
    return dotToPoint(d);
  });
  return ac;
}, {});
exports.PAGE_SIZE_IN_POINT = PAGE_SIZE_IN_POINT;
function latLngRectFromCenter(center, distance) {
  var lat = center.latitude;
  var lng = center.longitude;
  var r_earth = 6378;
  var pi = Math.PI;
  var northLat = lat + distance / r_earth * (180 / pi);
  var eastLng = lng + distance / r_earth * (180 / pi) / Math.cos(lat * pi / 180);
  var southLat = lat - distance / r_earth * (180 / pi);
  var westLng = lng - distance / r_earth * (180 / pi) / Math.cos(lat * pi / 180);
  return {
    latitude: {
      min: Math.min(northLat, southLat),
      max: Math.max(northLat, southLat)
    },
    longitude: {
      min: Math.min(eastLng, westLng),
      max: Math.max(eastLng, westLng)
    }
  };
}

/***
 *
 * @param p0
 * @param p1
 * @returns {number} in km
 */
function latLngDistance(p0, p1) {
  var lat0 = p0.latitude;
  var lat1 = p1.latitude;
  var lng0 = p0.longitude;
  var lng1 = p1.longitude;
  var toRad = function toRad(value) {
    return value * Math.PI / 180;
  };
  var R = 6371;
  var dLat = toRad(lat1 - lat0);
  var dLng = toRad(lng1 - lng0);
  lat0 = toRad(lat0);
  lat1 = toRad(lat1);
  var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.sin(dLng / 2) * Math.sin(dLng / 2) * Math.cos(lat0) * Math.cos(lat1);
  var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
  return R * c;
}

/***/ }),

/***/ 88917:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.randomArbitrary = randomArbitrary;
exports.randomInt = randomInt;
exports.randomPick = randomPick;
/**
 * Returns a random number between min (inclusive) and max (exclusive)
 */
function randomArbitrary(min, max) {
  return Math.random() * (max - min) + min;
}

/**
 * Returns a random integer between min (inclusive) and max (inclusive)
 * Using Math.round() will give you a non-uniform distribution!
 */
function randomInt(min, max) {
  return Math.floor(Math.random() * (max - min + 1)) + min;
}
function randomPick(arr) {
  var id = randomInt(0, arr.length - 1);
  return arr[id];
}

/***/ }),

/***/ 15910:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _stringGenerate = __webpack_require__(10713);
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
// it can be replace BroadcastChanel
function Broadcast(channel, id) {
  _EventEmitter["default"].call(this);
  this.channel = channel;
  this.id = id || (0, _stringGenerate.randomIdent)(32);
  this._ev_message = this._ev_message.bind(this);
  this._ev_storage = this._ev_storage.bind(this);
  this._init();
}
_OOP["default"].mixClass(Broadcast, _EventEmitter["default"]);
Broadcast.prototype._init = function () {
  if ('BroadcastChannel' in window) {
    this.nativeBroadcastChannel = new BroadcastChannel(this.channel);
    this.nativeBroadcastChannel.onmessage = this._ev_message;
  } else if ('localStorage' in window) {
    if (!('onstorage' in window)) console.warn("Your browser may not support onstorage event.");
    if (window.addEventListener) {
      window.addEventListener('storage', this._ev_storage);
    } else {
      window.attachEvent('onstorage', this._ev_storage);
    }
    this.storageKey = '_broadcast_' + this.channel;
  } else {
    throw new Error("Your browser can not support broadcast!");
  }
};
Broadcast.prototype._ev_storage = function (event) {
  if (event.key == this.storageKey) {
    var data = JSON.parse(event.newValue);
    if (data.sourceId != this.id) this.handleMessData(data.message);
  }
};
Broadcast.prototype._ev_message = function (event) {
  var data = event.data;
  this.handleMessData(data);
};
Broadcast.prototype.handleMessData = function (data) {
  if (data.type == "EMIT") this.fire.apply(this, data.params);
  if (typeof this.onmessage == 'function') this.onmessage(event);
};

/**
 * @param {...Array<*>}
 */
Broadcast.prototype.emit = function () {
  var params = Array.prototype.slice.call(arguments);
  this.postMessage({
    type: "EMIT",
    params: params,
    sourceId: this.id
  });
};

/**
 * @param {*} message
 */
Broadcast.prototype.postMessage = function (message) {
  if (this.nativeBroadcastChannel) {
    this.nativeBroadcastChannel.postMessage(message);
  } else {
    localStorage.setItem(this.storageKey, JSON.stringify({
      message: message,
      sourceId: this.id
    }));
  }
};
Broadcast.prototype.onmessage = null;
Broadcast.prototype.close = function () {
  if (this.nativeBroadcastChannel) this.nativeBroadcastChannel.close();
};
var _default = Broadcast;
exports["default"] = _default;

/***/ }),

/***/ 53069:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.fileExist = fileExist;
exports.saveAs = saveAs;
exports.saveTextAs = saveTextAs;
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @typedef {{revokeTimeout?: number, autoBom?:boolean }} FileSaverOpts
 *
 */
function fileExist(url) {
  var xhr = new XMLHttpRequest();
  xhr.open('HEAD', url, true);
  return new Promise(function (resolve) {
    xhr.onreadystatechange = function () {
      if (this.readyState === 4) {
        resolve(xhr.status === 200);
      }
    };
    xhr.onerror = function (err) {};
    xhr.send();
  });
}

/***
 *
 * @param url
 * @param name
 * @param {FileSaverOpts} opts
 */
function download(url, name, opts) {
  var xhr = new XMLHttpRequest();
  xhr.open('GET', url);
  xhr.responseType = 'blob';
  xhr.onload = function () {
    saveAs(xhr.response, name, opts);
  };
  xhr.onerror = function () {
    console.error('Could not download: ' + url);
  };
  xhr.send(null);
}
function bom(blob, opts) {
  if (_typeof(opts) === undefined) opts = {
    autoBom: false
  };else if (_typeof(opts) !== 'object') opts = {
    autoBom: !opts
  };
  if (opts.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
    return new Blob([String.fromCharCode(0xFEFF), blob], {
      type: blob.type
    });
  }
  return blob;
}
function corsEnabled(url) {
  var xhr = new XMLHttpRequest();
  return new Promise(function (resolve) {
    xhr.onload = function () {
      resolve(xhr.status >= 200 && xhr.status < 299);
    };
    xhr.onerror = function () {
      resolve(xhr.status >= 200 && xhr.status < 299);
    };
    xhr.open('HEAD', url, true);
    xhr.send();
  });
}
function click(node) {
  try {
    node.dispatchEvent(new MouseEvent('click'));
  } catch (e) {
    var evt = document.createEvent('MouseEvents');
    evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
    node.dispatchEvent(evt);
  }
}
function normalSaveAs(blob, name, opts) {
  var URL = window.URL || window.webkitURL;
  var a = document.createElement('a');
  name = name || blob.name || 'download';
  a.download = name;
  a.rel = 'noopener';
  if (typeof blob === 'string') {
    a.href = blob;
    if (a.origin !== location.origin) {
      corsEnabled(a.href).then(function (result) {
        if (result) {
          download(blob, name, opts);
        } else {
          a.target = '_blank';
          click(a);
        }
      });
    } else {
      click(a);
    }
  } else {
    a.href = URL.createObjectURL(blob);
    setTimeout(function () {}, opts && opts.revokeTimeout || 4E4);
    setTimeout(function () {
      click(a);
    }, 0);
  }
}
function msSaveAs(blob, name, opts) {
  name = name || blob.name || 'download';
  if (typeof blob === 'string') {
    corsEnabled(blob).then(function (result) {
      if (result) {
        download(blob, name, opts);
      } else {
        var a = document.createElement('a');
        a.href = blob;
        a.target = '_blank';
        setTimeout(function () {
          click(a);
        });
      }
    });
  } else {
    navigator.msSaveOrOpenBlob(bom(blob, opts), name);
  }
}
function popupSaveAs(blob, name, opts, popup) {
  if (typeof blob === 'string') {
    download(blob, name, opts);
    return;
  }
  popup = popup || open('', '_blank');
  if (popup) {
    popup.document.title = name || 'download';
    popup.document.body.innerText = "downloading...";
  }
  name = name || blob.name || 'download';
  blob.name = name;
  var force = blob.type === 'application/octet-stream';
  var isSafari = _BrowserDetector["default"].isSafari;
  var isChromeIOS = _BrowserDetector["default"].isChromeIOS;
  var isMacOSWebView = _BrowserDetector["default"].isMacOSWebView;
  var isSafariUnder13 = _BrowserDetector["default"].browser.type === 'safari' && parseFloat(_BrowserDetector["default"].browser.version) < 13;
  if ((!isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== 'undefined' & !isSafariUnder13) {
    var reader = new FileReader();
    reader.onloadend = function () {
      var url = reader.result;
      url = isChromeIOS ? url : url.replace(/^data:[^;]*/, 'data:attachment/file');
      if (popup) popup.location.href = url;else location = url;
      popup = null;
    };
    reader.readAsDataURL(blob);
  } else {
    var URL = window.URL || window.webkitURL;
    var url = URL.createObjectURL(blob);
    if (popup) popup.location.href = url;else location.href = url;
    popup = null;
    setTimeout(function () {
      URL.revokeObjectURL(blob);
    }, opts && opts.revokeTimeout || 4E4);
  }
}

/***
 *
 * @param {string  | File | Blob}blob
 * @param {string=} name
 * @param {Object=} opts
 * @param {Object=} popup
 */
function saveAs(blob, name, opts, popup) {
  if ((typeof window === "undefined" ? "undefined" : _typeof(window)) !== "object" || window !== self) {
    console.error("FileSaver is not support!");
  } else if ('wkSaveAs' in navigator) {
    navigator.wkSaveAs(blob, name, opts);
  } else if ('download' in HTMLAnchorElement.prototype && !_BrowserDetector["default"].isMacOSWebView) {
    normalSaveAs(blob, name, opts);
  } else if ('msSaveOrOpenBlob' in navigator) {
    msSaveAs(blob, name, opts);
  } else {
    setTimeout(function () {
      popupSaveAs(blob, name, opts, popup);
    }, 100);
  }
}
function saveTextAs(text, name, opts) {
  var blob = new Blob([text], {
    type: 'text/plain'
  });
  saveAs(blob, name, opts);
}

/***/ }),

/***/ 52281:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _stringGenerate = __webpack_require__(10713);
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var TYPE_WORKER = 'WORKER';
var TYPE_IFRAME = 'IFRAME';
var TYPE_IFRAME_MASTER = 'IFRAME_MASTER';
var TYPE_WORKER_MASTER = 'WORKER_MASTER';

/**
 *
 * @param {Worker|HTMLIFrameElement|WorkerGlobalScope|Window=} host
 */
function IFrameBridge(host) {
  var _this = this;
  _EventEmitter["default"].call(this);
  /***
   *
   * @type {Worker|HTMLIFrameElement|WorkerGlobalScope|Window|WorkerGlobalScope|Window}
   */
  this.host = host || self;
  this.sender = null;
  this.receiver = null;
  this.origin = null;
  this.type = 'NOT_DETECT';
  this.id = "UNSET";
  this.sync = this._detectHost().then(function () {
    return _this._attach();
  });
  this.__azarResolveCallbacks = {};
  this.__azarRejectCallbacks = {};
}
IFrameBridge.TYPE_WORKER = TYPE_WORKER;
IFrameBridge.TYPE_IFRAME = TYPE_IFRAME;
IFrameBridge.TYPE_IFRAME_MASTER = TYPE_IFRAME_MASTER;
IFrameBridge.TYPE_WORKER_MASTER = TYPE_WORKER_MASTER;
IFrameBridge.prototype._detectHost = function () {
  var _this2 = this;
  return new Promise(function (rs) {
    var iframeLoaded = function iframeLoaded() {
      if (_this2.host.removeEventListener) {
        _this2.host.removeEventListener("load", iframeLoaded);
      } else {
        _this2.host.detachEvent("onload", iframeLoaded);
      }
      _this2.sender = _this2.host.contentWindow;
      rs();
    };
    if (_this2.host instanceof Worker) {
      _this2.type = TYPE_WORKER_MASTER;
      _this2.sender = _this2.host;
      _this2.receiver = _this2.host;
    } else if (_this2.host.tagName === 'IFRAME') {
      _this2.type = TYPE_IFRAME_MASTER;
      _this2.receiver = self;
      _this2.id = _this2.host.src;
      _this2.origin = '*';
      if (_this2.host.addEventListener) {
        _this2.host.addEventListener("load", iframeLoaded);
      } else {
        _this2.host.attachEvent("onload", iframeLoaded);
      }
    } else if (IFrameBridge.isInIFrame()) {
      _this2.type = TYPE_IFRAME;
      _this2.sender = window.parent;
      _this2.receiver = _this2.host;
      _this2.id = location.href;
      _this2.origin = '*';
    } else if (IFrameBridge.isInWorker()) {
      _this2.type = TYPE_WORKER;
      _this2.sender = _this2.host;
      _this2.receiver = _this2.host;
    }
    if (_this2.sender) rs();
  });
};
IFrameBridge.prototype._attach = function () {
  if (this.receiver.addEventListener) {
    this.receiver.addEventListener("message", this.__azarMessageListener.bind(this), false);
  } else if (this.receiver.attachEvent) {
    this.receiver.attachEvent("onmessage", this.__azarMessageListener.bind(this));
  } else {
    this.receiver.onmessage = this.__azarMessageListener.bind(this);
  }
};
IFrameBridge.fromIFrame = function (iframe) {
  return new IFrameBridge(iframe);
  var host = iframe.contentWindow || iframe.contentDocument;
  var src = iframe.src;
  var rootOrigin = location.origin;
  var iframeOrigin = src.match(/^(http|https):\/\/[^/]+/);
  if (iframeOrigin) {
    iframeOrigin = iframeOrigin[0];
  } else {
    iframeOrigin = rootOrigin;
  }
  if (host) return new IFrameBridge(host, iframeOrigin);else {
    var result = new IFrameBridge(undefined, iframeOrigin);
    var attachedHost = function attachedHost() {
      var host = iframe.contentWindow || iframe.contentDocument;
      result.attach(host);
    };
    if (iframe.addEventListener) {
      iframe.addEventListener("load", attachedHost);
    } else {
      iframe.attachEvent("onload", attachedHost);
    }
    return result;
  }
};
IFrameBridge.getInstance = function () {
  if (!IFrameBridge.shareInstance) {
    var origin = location.origin;
    var rootOrigin = IFrameBridge.fromIFrame() ? IFrameBridge.getParentUrl().match(/^(http|https):\/\/[^/]+/) : null;
    if (rootOrigin) {
      rootOrigin = rootOrigin[0];
    } else {
      rootOrigin = origin;
    }

    // IFrameBridge.shareInstance = new IFrameBridge(self, rootOrigin == origin? undefined: "*" || rootOrigin );
    var host = self;
    IFrameBridge.shareInstance = new IFrameBridge(host, rootOrigin);
  }
  return IFrameBridge.shareInstance;
};
Object.defineProperties(IFrameBridge.prototype, Object.getOwnPropertyDescriptors(_EventEmitter["default"].prototype));
IFrameBridge.prototype.constructor = IFrameBridge;
IFrameBridge.isInIFrame = function () {
  return !IFrameBridge.isInWorker() && top !== self;
};
IFrameBridge.isInWorker = function () {
  return typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;
};
IFrameBridge.getParentUrl = function () {
  var parentUrl = window.location != window.parent.location ? document.referrer : document.location.href;
  return parentUrl;
};
IFrameBridge.prototype.__azarMessageListener = function (event) {
  this.__azarHandleData(event.data);
};
IFrameBridge.prototype.__azarHandleData = function (data) {
  if (data.bridgeId !== this.id) return;
  if (data.type) {
    if (data.type == "INVOKE") {
      try {
        var result = this.__azarSelfInvoke(data.name, data.params);
        if (result && typeof result.then == 'function') {
          result.then(function (result) {
            this.__azarResolve(data.taskId, result);
          }.bind(this))["catch"](function (err) {
            (0, _safeThrow["default"])(err);
            this.__azarResolve(data.taskId, null, err);
          }.bind(this));
        } else {
          this.__azarResolve(data.taskId, result);
        }
      } catch (err) {
        (0, _safeThrow["default"])(err);
        this.__azarResolve(data.taskId, null, err);
      }
    } else if (data.type == "INVOKE_RESULT") {
      if (this.__azarResolveCallbacks[data.taskId]) {
        if (data.error) {
          this.__azarRejectCallbacks[data.taskId](data.error);
        } else {
          this.__azarResolveCallbacks[data.taskId](data.result);
        }
        delete this.__azarResolveCallbacks[data.taskId];
        delete this.__azarRejectCallbacks[data.taskId];
      }
    } else if (data.type == "EMIT") {
      this.fire.apply(this, data.params);
    } else this.fire('message', data, this);
  }
};
IFrameBridge.prototype.__azarResolve = function (taskId, result, error) {
  var data = {
    type: "INVOKE_RESULT",
    taskId: taskId,
    result: result,
    error: error,
    bridgeId: this.id
  };
  if (this.origin) {
    this.sender.postMessage(data, this.origin);
  } else {
    this.sender.postMessage(data);
  }
};
IFrameBridge.prototype.__azarSelfInvoke = function (name, params) {
  if (typeof this[name] == 'function') {
    return this[name].apply(this, params);
  } else {
    return this[name];
  }
};
IFrameBridge.prototype.emit = function () {
  var params = [];
  params.push.apply(params, arguments);
  this.sync.then(function () {
    var data = {
      type: "EMIT",
      params: params,
      bridgeId: this.id
    };
    if (this.origin) {
      this.sender.postMessage(data, this.origin);
    } else {
      this.sender.postMessage(data);
    }
  }.bind(this));
  return this;
};
IFrameBridge.prototype.invoke = function (name) {
  var params = [];
  params.push.apply(params, arguments);
  params.shift();
  return this.sync.then(function () {
    var indent = (0, _stringGenerate.randomIdent)(32);
    var data = {
      type: 'INVOKE',
      params: params,
      taskId: indent,
      name: name,
      bridgeId: this.id
    };
    if (this.origin) {
      this.host.postMessage(data, this.origin);
    } else {
      this.host.postMessage(data);
    }
    return new Promise(function (resolve, reject) {
      this.__azarResolveCallbacks[indent] = resolve;
      this.__azarRejectCallbacks[indent] = reject;
    }.bind(this));
  }.bind(this));
};
IFrameBridge.prototype.importScriptURLs = function () {
  return this.invoke.apply(this, ['_receiveScriptURLs'].concat(Array.prototype.slice.call(arguments)));
};
IFrameBridge.prototype.importScript = function (code) {
  var blob = new Blob([code], {
    type: 'application/javascript'
  });
  var url = URL.createObjectURL(blob);
  return this.importScriptURLs(url);
};
IFrameBridge.prototype.createMethod = function (name, fx) {
  this[name] = function () {
    return this.invoke.apply(this, [name].concat(Array.prototype.slice.call(arguments)));
  };
  return this.invoke.apply(this, ['_receiveMethod', name, fx.toString()]);
};
IFrameBridge.prototype._receiveScriptURLs = function () {
  if (self.importScripts) {
    self.importScripts.apply(self, arguments);
  }
};
IFrameBridge.prototype._receiveMethod = function (name, code) {
  this[name] = new Function('return ' + code)();
};
var _default = IFrameBridge;
exports["default"] = _default;

/***/ }),

/***/ 44067:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _IFrameBridge = _interopRequireDefault(__webpack_require__(52281));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _RemoteThread = _interopRequireDefault(__webpack_require__(87333));
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {{methods?:Object, extendCode: string}} opt
 * @constructor
 */
function Thread(opt) {
  this.worker = new Worker(this._makeCodeUrl(opt));
  _IFrameBridge["default"].call(this, this.worker);
  this._attachClientMethods(opt.methods);
}
Thread.prototype._makeCodeUrl = function (opt) {
  var code = [this._makeLibCode(opt.libs), _RemoteThread["default"], this._makeMethodCode(opt.methods), this._makePropCode(opt.props), opt.extendCode || ''].join('\n\n');
  var blob = new Blob([code], {
    type: 'application/javascript'
  });
  var url = URL.createObjectURL(blob);
  return url;
};
Thread.prototype._makePropCode = function (props) {
  if (!props) return '';
  return 'Object.assign(self, ' + JSON.stringify(props) + ');';
};
Thread.prototype._makeLibCode = function (libs) {
  if (!libs) return '';
  return libs.map(function (lib) {
    return 'self.importScripts(' + JSON.stringify(lib) + ');';
  }).join('\n');
};
Thread.prototype._makeMethodCode = function (methods) {
  if (!methods) return '';
  return Object.keys(methods).map(function (key) {
    var fx = methods[key];
    if (typeof fx === "function") {
      fx = fx.toString();
      return 'self[' + JSON.stringify(key) + '] = ' + fx;
    }
  }).join('\n\n');
};
Thread.prototype._attachClientMethods = function (methods) {
  if (!methods) return '';
  Object.keys(methods).reduce(function (ac, name) {
    ac[name] = function () {
      return this.invoke.apply(this, [name].concat(Array.prototype.slice.call(arguments)));
    };
    return ac;
  }, this);
};
Thread.prototype.destroy = function () {
  if (this.worker) {
    this.worker.terminate();
    delete this.worker;
  }
};
Thread.prototype.revokeResource = function () {
  this.destroy();
  this.revokeResource = _noop["default"];
};
_OOP["default"].mixClass(Thread, _IFrameBridge["default"]);
var _default = Thread;
exports["default"] = _default;

/***/ }),

/***/ 53710:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var XHR = {};
XHR.makeHttpObject = function () {
  try {
    return new XMLHttpRequest();
  } catch (error) {}
  try {
    return new ActiveXObject("Msxml2.XMLHTTP");
  } catch (error) {}
  try {
    return new ActiveXObject("Microsoft.XMLHTTP");
  } catch (error) {}
  throw new Error("Could not create HTTP request object.");
};

/***
 * 
 * @param {String} url
 * @param {String} body
 * @param {String} responseType
 * @param {Function} success
 * @param {Function} failure
 * @returns {Promise}
 */
XHR.getRequest = function (url, props, success, failure) {
  return new Promise(function (rs, rj) {
    var request = XHR.makeHttpObject();
    request.open("GET", url, true);
    if (typeof props == 'string') request.responseType = props || '';else if (props && _typeof(props) == 'object') {
      Object.assign(request, props);
    }
    request.send(null);
    request.onreadystatechange = function () {
      if (request.readyState == 4) {
        if (request.status == 200) {
          var response = request.response;
          success && success(response);
          rs(response);
        } else {
          failure && failure(request.status, request.statusText);
          rj({
            status: request.status
          });
        }
      }
    };
    request.onerror = function () {
      failure && failure(request.status, request.statusText);
      rj(new Error(request.status + request.statusText));
    };
  });
};
XHR.postRepquest = function (url, payload, props, headers, success, failure) {
  return new Promise(function (rs, rj) {
    var method = "POST";
    var shouldBeAsync = true;
    var request = XHR.makeHttpObject();
    request.onreadystatechange = function () {
      if (request.readyState == 4) {
        if (request.status == 200) {
          success && success(request.response);
          rs(request.response);
        } else if (failure) {
          failure && failure(request.status, request.statusText);
          rj({
            status: request.status,
            statusText: request.statusText
          });
        }
      }
    };
    request.onerror = function () {
      failure && failure(request.status, request.statusText);
      rj(new Error(request.status + request.statusText));
    };
    request.open(method, url, shouldBeAsync);
    if (typeof props == 'string') request.responseType = props || '';else if (props && _typeof(props) == 'object') {
      Object.assign(request, props);
    }
    headers = headers || {};
    headers["Content-Type"] = headers["Content-Type"] || "application/json;charset=UTF-8";
    Object.keys(headers).forEach(function (key) {
      request.setRequestHeader(key, headers[key]);
    });
    request.send(payload);
  });
};
XHR.request = function (method, url, props, headers, body, successCallback, failureCallback) {
  return new Promise(function (rs, rj) {
    var shouldBeAsync = true;
    var request = new XMLHttpRequest();
    request.onreadystatechange = function () {
      if (request.readyState == 4) {
        if (request.status == 200) {
          successCallback && successCallback(request.response);
          rs(request.response);
        } else {
          failureCallback && failureCallback(request.status, request.statusText);
          rj({
            status: request.status,
            statusText: request.statusText
          });
        }
      }
    };
    request.onerror = function () {
      var error = new Error("Network Error!");
      if (failureCallback) failureCallback(error);
      rj(error);
    };
    request.open(method, url, shouldBeAsync);
    if (typeof props == 'string') request.responseType = props || '';else if (props && _typeof(props) == 'object') {
      Object.assign(request, props);
    }
    headers = headers || {};
    headers["Content-Type"] = headers["Content-Type"] || "application/json;charset=UTF-8";
    Object.keys(headers).forEach(function (key) {
      request.setRequestHeader(key, headers[key]);
    });
    request.send(body);
  });
};
var _default = XHR;
exports["default"] = _default;

/***/ }),

/***/ 47913:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.isImageURLAllowCrossOrigin = isImageURLAllowCrossOrigin;
exports.loadScript = loadScript;
exports.loadToBlobURL = loadToBlobURL;
var XLoader = {};
function loadScript(url, onComplete, onError) {
  return new Promise(function (resolve, reject) {
    var script = document.createElement("script");
    script.type = "text/javascript";
    if (script.readyState) {
      //IE
      script.onreadystatechange = function () {
        if (script.readyState === "loaded" || script.readyState === "complete") {
          script.onreadystatechange = null;
          onComplete && onComplete();
          resolve();
        }
      };
    } else {
      //Others
      script.onload = function () {
        script.onload = null;
        script.onerror = null;
        onComplete && onComplete();
        resolve();
      };
      script.onerror = function () {
        script.onerror = null;
        script.onload = null;
        script.remove();
        onError && onError();
        reject();
      };
    }
    script.src = url;
    document.getElementsByTagName("head")[0].appendChild(script);
  });
}
XLoader.loadScript = loadScript;
function isImageURLAllowCrossOrigin(url) {
  return new Promise(function (rs, rj) {
    url = url || '';
    if (url.startsWith('data:') || url.startsWith('blob:')) {
      rs(true);
      return;
    }
    var img = new Image();
    // img.crossOrigin = "anonymous";
    img.onload = function () {
      var canvas = document.createElement('canvas');
      canvas.width = 10;
      canvas.height = 10;
      var ctx = canvas.getContext("2d");
      ctx.drawImage(this, 0, 0);
      try {
        ctx.getImageData(0, 0, 10, 10);
        rs(true);
      } catch (err) {
        rs(false);
      }
    };
    img.onerror = function (event) {
      rj(event.error || event);
    };
    img.src = url;
  });
}
var blobCache = {};

/***
 *
 * @param {string} url
 * @param {boolean=}noCache
 * @return {*}
 */
function loadToBlobURL(url, noCache) {
  if (blobCache[url]) return blobCache[url];
  blobCache[url] = fetch(url).then(function (res) {
    return res.blob();
  }).then(function (blob) {
    return URL.createObjectURL(blob);
  });
  return blobCache[url];
}
var _default = XLoader;
exports["default"] = _default;

/***/ }),

/***/ 40332:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = remoteRequireNodeAsync;
var _url = __webpack_require__(12569);
function remoteRequireNodeAsync(filename, entry) {
  var moduleCache = {};
  var factors = {};
  var resources = {};
  function getFileName(path) {
    return path.split('/').pop();
  }
  function getExtension(fileName) {
    return fileName.split('.').slice(1).pop() || null;
  }
  function require(currentLoc, fn) {
    var fullPath = (0, _url.resolveUrl)(currentLoc, fn);
    if (factors[fullPath + '.js']) fullPath = fullPath + '.js';
    var filename = getFileName(fullPath); //__filename
    var module = moduleCache[fullPath];
    if (!module) {
      if (factors[fullPath]) {
        module = {
          'exports': {}
        };
        moduleCache[fullPath] = module;
        factors[fullPath](require.bind(null, fullPath), module, module.exports, (0, _url.resolveUrl)(fullPath, '.'), filename, window);
      } else {
        throw new Error("Could not find module :" + fullPath);
      }
    }
    return module.exports;
  }
  function findAllRequire(s) {
    var regex0 = /[^a-zA-Z_.0-9]require\s*\([^\)]+\)/gm;
    var regex1 = /require\s*\([^)]+\)/gm;
    var regex2 = /\([^)]+\)/gm;
    var es = s.match(regex0);
    if (!es) return [];
    return es.map(function (s) {
      s = s.match(regex1)[0];
      s = s.match(regex2)[0];
      s = s.replace(/['"()]/gm, '');
      if (!getExtension(getFileName(s))) s += '.js';
      return s;
    });
  }
  function fetchResource(fullPath) {
    if (resources[fullPath]) return Promise.resolve();
    var resource = {};
    resources[fullPath] = resource;
    var ext = getExtension(getFileName(fullPath));
    resource.sync = fetch(fullPath, {
      cache: "no-cache"
    }).then(function (res) {
      return res.text();
    }).then(function (text) {
      resource.text = text;
      switch (ext) {
        case 'js':
          factors[fullPath] = new Function('require', 'module', 'exports', '__dir', '__filename', 'global', text);
          break;
        case 'json':
          factors[fullPath] = true;
          moduleCache[fullPath] = {
            exports: JSON.parse(text)
          };
          break;
        default:
          factors[fullPath] = true;
          moduleCache[fullPath] = {
            exports: text
          };
      }
      var requiredNodes;
      if (ext === 'js') {
        requiredNodes = findAllRequire(text);
        var syncs = requiredNodes.map(function (ident) {
          return fetchResource((0, _url.resolveUrl)(fullPath, ident));
        });
        return Promise.all(syncs);
      }
    });
    return resource.sync;
  }
  var absoluteEntry = location.href;
  function requireCode(filename, entry, fileList) {
    if (!fileList) fileList = {};
    if (!entry) entry = absoluteEntry;
    var fullPath = (0, _url.resolveUrl)(entry, filename);
    if (fileList[fullPath] === 'pending') {
      return Promise.resolve();
    } else if (fileList[fullPath] !== undefined && fileList[fullPath] !== 'pending') {
      return Promise.resolve();
    }
    fileList[fullPath] = true;
    fileList[fullPath] = 'pending';
    return fetch(fullPath, {
      cache: "no-cache"
    }).then(function (res) {
      return res.text();
    }).then(function (text) {
      fileList[fullPath] = text;
      var requirePath = findAllRequire(text);
      var waitCode = requirePath.map(function (e) {
        return requireCode(e, fullPath, fileList);
      });
      return Promise.all(waitCode).then(function () {
        return fileList;
      });
    });
  }
  if (!entry) entry = absoluteEntry;
  if (!getExtension(filename)) filename += '.js';
  var fullPath = (0, _url.resolveUrl)(entry, filename);
  return fetchResource(fullPath).then(function () {
    return require('', fullPath);
  });
}

/***/ }),

/***/ 12569:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.resolveUrl = resolveUrl;
/***
 *
 * @param {string} current
 * @param {string} target
 * @return {string}
 */
function resolveUrl(current, target) {
  current = current.trim();
  target = target.trim();
  if (target.match(/[a-z]+:\/\//)) return target;
  var origin = current.match(/^[a-z]+:\/\/[a-zA-Z0-9._]+(:[0-9]+)?/);
  if (origin) origin = origin[0];
  var cPath = current.replace(/^[a-z]+:\/\/[a-zA-Z0-9._]+(:[0-9]+)?/, '');
  if (target.startsWith('/')) return origin ? origin + target : target;
  var cParts = cPath.split('/');
  cParts.pop();
  var tParts = target.split('/');
  var t;
  //todo: normal current
  while (tParts.length > 0) {
    t = tParts.shift().trim();
    if (t === '..') {
      cParts.pop();
    } else if (t !== '.' && t.length > 0) {
      cParts.push(t);
    }
  }
  if (origin) {
    if (cParts[0].length === 0) cParts.shift();
    cParts.unshift(origin);
  }
  return cParts.join('/');
}

/***/ }),

/***/ 36093:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.parsedNodeToAST = parsedNodeToAST;
exports.parsedNodeToASTChain = parsedNodeToASTChain;
var _Heap = _interopRequireDefault(__webpack_require__(92568));
var _stringUtils = __webpack_require__(26243);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var TARGET = 0;
var RULE = 1;
var PASSED = 2;
var LENGTH = 3;
var TRACK = 4;

/***
 * @param {string} target
 * @param {Rule|null} rule
 * @param {number} passed
 * @param {number} length
 * @param {[]} track
 *
 * @returns {*[]}
 */
function mkItem(target, rule, passed, length, track) {
  return [target, rule, passed, length, track];
}
function indexingItem(item) {
  return item[TARGET] + '*' + item[PASSED] + '*' + item[LENGTH];
}
function arrayKey(item) {
  return item[TARGET] + '*' + item[PASSED];
}

/****
 *
 * @param {DPParser} parser
 * @param {string || []} source
 * @param {string} target
 * @constructor
 */
function DPParseInstance(parser, source, target) {
  this.target = target;
  this.parser = parser;
  this.targets = parser.targets;
  this.rules = parser.rules;
  this.tokenTypes = parser.tokenizer.types;
  this.error = null;
  this.source = source;
  var start = Date.now();
  if (typeof source === "string") {
    this.tokens = parser.tokenizer.tokenize(source).filter(function (tk) {
      return tk.type !== 'skip';
    });
  } else if (source instanceof Array) {
    this.tokens = source;
  } else {
    throw new Error("Invalid source, source must be string or array of token");
  }
  this.tokenIdx = 0;
  this.priQueue = new _Heap["default"](this._cmpFunction);
  this.maxSize = 0;
  this.expectedArr = [];
  this.parsedNode = null;
  this.ast = null;
  start = Date.now();
  this._dp();
  this._trackBack();
  if (this.parsedNode) {
    this._calcAST();
  } else {
    this._findError();
  }
}
DPParseInstance.prototype._dp = function () {
  while (this.tokenIdx < this.tokens.length) {
    this._nextToken();
  }
};
DPParseInstance.prototype._cmpFunction = function (a, b) {
  return b[LENGTH] - a[LENGTH];
};
DPParseInstance.prototype._nextToken = function () {
  var idx = this.tokenIdx++;
  var token = this.tokens[idx];
  this.priQueue.push(mkItem('.' + token.type, null, 1, 1, [null, token]));
  this.priQueue.push(mkItem('_' + token.content, null, 1, 1, [null, token]));
  var expected = {};
  var pushed = {};
  var itemIndex;
  var longestChecked = {};
  this.expectedArr.push(expected);
  var cur, next;
  var i, j, rule;
  var prevExpectedList, prevRule;
  var prevExpectedItem;
  //nếu cùng 1 rule, cùng điểm bắt dầu, cùng passed thì dài hơn lấy
  while (this.priQueue.size() > 0) {
    this.maxSize = Math.max(this.maxSize, this.priQueue.size());
    cur = this.priQueue.pop();
    for (i = 0; i < this.rules.length; ++i) {
      rule = this.rules[i];
      if (rule.elements[0] === cur[TARGET]) {
        if (rule.elements.length === 1) {
          next = mkItem(rule.target, rule, cur[PASSED], cur[LENGTH], [null, cur]);
          itemIndex = indexingItem(next);
          if (!pushed[itemIndex]) {
            pushed[itemIndex] = true;
            this.priQueue.push(next);
          }
          expected['^'] = expected['^'] || [];
          expected['^'].push(next);
        } else {
          next = mkItem(rule.target, rule, 1, cur[LENGTH], [null, cur]);
          expected[rule.elements[1]] = expected[rule.elements[1]] || [];
          expected[rule.elements[1]].push(next);
        }
      }
    }
    prevExpectedList = this.expectedArr[idx - cur[LENGTH]] && this.expectedArr[idx - cur[LENGTH]][cur[TARGET]];
    if (prevExpectedList) {
      for (j = 0; j < prevExpectedList.length; ++j) {
        prevExpectedItem = prevExpectedList[j];
        prevRule = prevExpectedItem[RULE];
        next = mkItem(prevRule.target, prevRule, prevExpectedItem[PASSED] + 1, prevExpectedItem[LENGTH] + cur[LENGTH], [prevExpectedItem, cur]);
        if (prevExpectedItem[PASSED] + 1 === prevRule.elements.length) {
          itemIndex = indexingItem(next);
          if (next[RULE] && next[RULE].longestOnly) {
            if (longestChecked[next[RULE].ident] && longestChecked[next[RULE].ident] >= next[LENGTH]) {
              continue;
            }
            longestChecked[next[RULE].ident] = next[LENGTH];
          }
          if (!pushed[itemIndex]) {
            pushed[itemIndex] = true;
            this.priQueue.push(next);
          }
          expected['^'] = expected['^'] || [];
          expected['^'].push(next); //[rule index, passed, length]
        } else {
          expected[prevRule.elements[prevExpectedItem[PASSED] + 1]] = expected[prevRule.elements[prevExpectedItem[PASSED] + 1]] || [];
          expected[prevRule.elements[prevExpectedItem[PASSED] + 1]].push(next);
        }
      }
    }
  }
};
DPParseInstance.prototype._trackBack = function () {
  var expectedAr = this.expectedArr;
  function visit(target, start, length) {
    var node = {
      type: target,
      start: start,
      end: start + length
    };
    var matchedItem = null;
    var expected = expectedAr[start + length - 1];
    if (!expected) return null;
    var itemList = expected['^'];
    if (!itemList) return null;
    var item;
    if (itemList) {
      for (var j = 0; j < itemList.length; ++j) {
        item = itemList[j];
        if (item[TARGET] === target) {
          if (item[LENGTH] === length) {
            matchedItem = item;
          }
        }
      }
    }
    if (!matchedItem) {
      return null;
    }
    node.rule = matchedItem[RULE];
    var childItem = [];
    var cTrack = matchedItem[TRACK];
    var right, left;
    while (cTrack) {
      left = cTrack[0];
      right = cTrack[1];
      childItem.unshift(right);
      cTrack = left && left[TRACK];
    }
    var ac = childItem.reduce(function (ac, item) {
      if (typeof item[TRACK][1].type === "string") {
        ac.child.push(item[TRACK][1]);
        ac.start += 1;
      } else {
        ac.child.push(visit(item[TARGET], ac.start, item[LENGTH]));
        ac.start += item[LENGTH];
      }
      return ac;
    }, {
      start: start,
      child: []
    });
    node.children = ac.child;
    node.end = ac.start;
    return node;
  }
  this.parsedNode = visit(this.target, 0, this.expectedArr.length);
};
DPParseInstance.prototype._findError = function () {
  function cmp(a, b) {
    return b.i - a.i;
  }
  var queue = new _Heap["default"](cmp);
  var doneArr = Array(this.expectedArr.length).fill(null).map(function () {
    return {};
  });
  this.expectedArr.forEach(function (ex, i) {
    for (var k in ex) {
      ex[k].forEach(function (it) {
        var target = it[TARGET];
        var done = doneArr[i - it[LENGTH] + 1];
        done[target] = done[target] || [];
        done[target].push(it);
      });
    }
  });
  var d = {};
  queue.push({
    t: this.target,
    i: 0
  });
  d[this.target + '/' + 0] = true;
  var cr, next;
  var nextIdent;
  var item;
  var hasNewExpected;
  while (queue.size() > 0) {
    cr = queue.pop();
    if (cr.i >= doneArr.length) {
      if (!this.error || this.error.tokenIdx < cr.i || this.error.type !== "expected") {
        this.error = {
          tokenIdx: cr.i,
          type: 'expected',
          expectedToken: []
        };
      }
      if (cr.t[0] === '_' || cr.t[0] === '.') {
        this.error.expectedToken.push(cr.t);
      }
      continue;
    }
    hasNewExpected = false;
    if (doneArr[cr.i][cr.t]) {
      doneArr[cr.i][cr.t].forEach(function (item) {
        if (item[PASSED] < item[RULE].elements.length) {
          next = {
            i: cr.i + item[LENGTH],
            t: item[RULE].elements[item[PASSED]]
          };
          nextIdent = next.t + '/' + next.i;
          hasNewExpected = true;
          if (!d[nextIdent]) {
            d[nextIdent] = true;
            queue.push(next);
          }
        }
      });
    }
    this.rules.forEach(function (rule) {
      if (rule.target === cr.t) {
        next = {
          i: cr.i,
          t: rule.elements[0]
        };
        nextIdent = next.t + '/' + next.i;
        if (!d[nextIdent]) {
          d[nextIdent] = true;
          queue.push(next);
        }
      }
    });
    if (!hasNewExpected) {
      if (!this.error || this.error.tokenIdx < cr.i) {
        this.error = {
          tokenIdx: cr.i,
          type: 'unexpected'
        };
      }
    }
  }
  if (this.error.type === 'expected') {
    this.error.message = 'Expected: ' + this.error.expectedToken.map(function (t) {
      if (t[0] === '.') return t.substring(1);
      if (t[0] === '_') return JSON.stringify(t.substring(1));
    }).join(', ');
  } else if (this.error.type === 'unexpected') {
    this.error.message = 'Unexpected token ' + (this.tokens[this.error.tokenIdx].content || JSON.stringify(this.tokens[this.error.tokenIdx]));
  }
};
DPParseInstance.prototype._calcAST = function () {
  this.ast = this.parsedNode.rule.toAST(this.parsedNode);
};
function parsedNodeToAST(parsedNode) {
  return parsedNode.rule.toAST(parsedNode);
}
function parsedNodeToASTChain(parsedNode) {
  return parsedNode.rule.toASTChain(parsedNode);
}
var _default = DPParseInstance;
exports["default"] = _default;

/***/ }),

/***/ 7679:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _DPTokenizer = _interopRequireDefault(__webpack_require__(36782));
var _DPParseInstance = _interopRequireDefault(__webpack_require__(36093));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @typedef Rule
 * @property {string} target
 * @property {string[]} elements
 */

/***
 *
 * @param {{rules?:Array, elementRegexes?:Array}}opt
 * @constructor
 */
function DPParser(opt) {
  opt = opt || {};
  if (opt.rules) {
    this.rules = opt.rules;
  }
  this.targets = {};
  this.tokenizer = new _DPTokenizer["default"](opt);
  this.computeTarget();
}

/****
 * @type {Rule[]}
 */
DPParser.prototype.rules = [];
DPParser.prototype.computeTarget = function () {
  this.rules.reduce(function (ac, rule) {
    var target = ac[rule.target];
    if (!target) {
      target = {
        rules: []
      };
      ac[rule.target] = target;
    }
    target.rules.push(rule);
    return ac;
  }, this.targets);
};

/***
 *
 * @param {string|[]}source
 * @param target
 * @returns {DPParseInstance}
 */
DPParser.prototype.parse = function (source, target) {
  return new _DPParseInstance["default"](this, source, target);
};
var _default = DPParser;
exports["default"] = _default;

/***/ }),

/***/ 36782:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
function DPTokenizer(opt) {
  opt = opt || {};
  if (opt.elementRegexes) this.elementRegexes = opt.elementRegexes;
  this._combineTokenRegex();
}
DPTokenizer.prototype.elementRegexes = [['string', /("(?:[^"\\]|\\.)*?")|('(?:[^'\\]|\\.)*?')/], ['number', /(\d+([.]\d*)?([eE][+-]?\d+)?|[.]\d+([eE][+-]?\d+)?)/], ['word', /[_a-zA-Z][_a-zA-Z0-9]*/], ['skip', /([\s\r\n]+)|(\/\/[^\n]*)|(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)/], ['dsymbol', /\+\+|--|==|!=|<=|>=|\|\||&&/], ['tsymbol', /\.\.\./], ['symbol', /[^\s_a-zA-Z0-9]/]];
DPTokenizer.prototype._combineTokenRegex = function () {
  var tokenRegexSource = this.elementRegexes.map(function (cr) {
    return '(' + cr[1].source + ')';
  }).join('|');
  this.tokenRegex = new RegExp(tokenRegexSource, 'g');
  this.groupIndexOfTypes = this.elementRegexes.slice(0, this.elementRegexes.length - 1).reduce(function (ac, cr) {
    var subGroupLength = new RegExp(cr[1].source + '|.').exec('a').length;
    ac.push(ac[ac.length - 1] + subGroupLength);
    return ac;
  }, [1]);
  this.types = this.elementRegexes.reduce(function (ac, cr) {
    ac[cr[0]] = cr;
    return ac;
  }, {});
};
DPTokenizer.prototype.tokenize = function (source) {
  var regex = new RegExp(this.tokenRegex.source, 'g');
  var elementRegexes = this.elementRegexes;
  var groupIndexOfTypes = this.groupIndexOfTypes;
  var res = [];
  var matched = regex.exec(source);
  var type, i;
  while (matched) {
    type = null;
    for (i = 0; i < groupIndexOfTypes.length; ++i) {
      if (matched[groupIndexOfTypes[i]]) {
        type = elementRegexes[i][0];
      }
    }
    res.push({
      type: type,
      content: matched[0],
      start: matched.index,
      end: matched.index + matched[0].length
    });
    matched = regex.exec(source);
  }
  return res;
};
var _default = DPTokenizer;
exports["default"] = _default;

/***/ }),

/***/ 68304:
/***/ (() => {

"use strict";


if (navigator.geolocation) {
  var getCurrentPosition = navigator.geolocation.getCurrentPosition;
  var lastResult = null;
  navigator.geolocation.getCurrentPosition = function (successCallback, errorCallback, options) {
    if (typeof successCallback !== "function") successCallback = function successCallback() {};
    if (typeof errorCallback !== "function") errorCallback = function errorCallback() {};
    var ended = false;
    var to = setTimeout(function () {
      if (lastResult && !ended) {
        ended = true;
        successCallback && successCallback(lastResult);
      } else if (!ended) {
        ended = true;
        errorCallback && errorCallback(new Error("GPS không phản hồi."));
      }
    }, lastResult ? 5000 : 10000);
    getCurrentPosition.call(this, function (result) {
      lastResult = result;
      if (!ended) {
        ended = true;
        successCallback && successCallback(lastResult);
      }
    }, function (error) {
      if (error && error.message.indexOf('deni') > 0 && !ended) {
        ended = true;
        errorCallback && errorCallback(new Error("Chưa cấp quyền truy cập GPS."));
      } else if (lastResult && !ended) {
        ended = true;
        successCallback && successCallback(lastResult);
      } else if (!ended) {
        ended = true;
        errorCallback && errorCallback(error);
      }
    }, {
      maximumAge: 1000
    });
  };
}

/***/ }),

/***/ 81284:
/***/ ((module, exports, __webpack_require__) => {

"use strict";
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;

var _atob = _interopRequireDefault(__webpack_require__(29733));
var _btoa = _interopRequireDefault(__webpack_require__(66835));
var _intl = _interopRequireDefault(__webpack_require__(49178));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
if (!('Intl' in window)) {
  window.Intl = _intl["default"];
}
if (!('atob' in window)) {
  window.atob = _atob["default"];
}
if (!('btoa' in window)) {
  window.btoa = _btoa["default"];
}
!function (e, n) {
  "object" == ( false ? 0 : _typeof(exports)) && "undefined" != "object" ? n() :  true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (n),
		__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
		(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
		__WEBPACK_AMD_DEFINE_FACTORY__),
		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : 0;
}(0, function () {
  "use strict";

  function e(e) {
    var n = this.constructor;
    return this.then(function (t) {
      return n.resolve(e()).then(function () {
        return t;
      });
    }, function (t) {
      return n.resolve(e()).then(function () {
        return n.reject(t);
      });
    });
  }
  function n() {}
  function t(e) {
    if (!(this instanceof t)) throw new TypeError("Promises must be constructed via new");
    if ("function" != typeof e) throw new TypeError("not a function");
    this._state = 0, this._handled = !1, this._value = undefined, this._deferreds = [], u(e, this);
  }
  function o(e, n) {
    for (; 3 === e._state;) {
      e = e._value;
    }
    0 !== e._state ? (e._handled = !0, t._immediateFn(function () {
      var t = 1 === e._state ? n.onFulfilled : n.onRejected;
      if (null !== t) {
        var o;
        try {
          o = t(e._value);
        } catch (f) {
          return void i(n.promise, f);
        }
        r(n.promise, o);
      } else (1 === e._state ? r : i)(n.promise, e._value);
    })) : e._deferreds.push(n);
  }
  function r(e, n) {
    try {
      if (n === e) throw new TypeError("A promise cannot be resolved with itself.");
      if (n && ("object" == _typeof(n) || "function" == typeof n)) {
        var o = n.then;
        if (n instanceof t) return e._state = 3, e._value = n, void f(e);
        if ("function" == typeof o) return void u(function (e, n) {
          return function () {
            e.apply(n, arguments);
          };
        }(o, n), e);
      }
      e._state = 1, e._value = n, f(e);
    } catch (r) {
      i(e, r);
    }
  }
  function i(e, n) {
    e._state = 2, e._value = n, f(e);
  }
  function f(e) {
    2 === e._state && 0 === e._deferreds.length && t._immediateFn(function () {
      e._handled || t._unhandledRejectionFn(e._value);
    });
    for (var n = 0, r = e._deferreds.length; r > n; n++) {
      o(e, e._deferreds[n]);
    }
    e._deferreds = null;
  }
  function u(e, n) {
    var t = !1;
    try {
      e(function (e) {
        t || (t = !0, r(n, e));
      }, function (e) {
        t || (t = !0, i(n, e));
      });
    } catch (o) {
      if (t) return;
      t = !0, i(n, o);
    }
  }
  var c = setTimeout;
  t.prototype["catch"] = function (e) {
    return this.then(null, e);
  }, t.prototype.then = function (e, t) {
    var r = new this.constructor(n);
    return o(this, new function (e, n, t) {
      this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof n ? n : null, this.promise = t;
    }(e, t, r)), r;
  }, t.prototype["finally"] = e, t.all = function (e) {
    return new t(function (n, t) {
      function o(e, f) {
        try {
          if (f && ("object" == _typeof(f) || "function" == typeof f)) {
            var u = f.then;
            if ("function" == typeof u) return void u.call(f, function (n) {
              o(e, n);
            }, t);
          }
          r[e] = f, 0 == --i && n(r);
        } catch (c) {
          t(c);
        }
      }
      if (!e || "undefined" == typeof e.length) throw new TypeError("Promise.all accepts an array");
      var r = Array.prototype.slice.call(e);
      if (0 === r.length) return n([]);
      for (var i = r.length, f = 0; r.length > f; f++) {
        o(f, r[f]);
      }
    });
  }, t.resolve = function (e) {
    return e && "object" == _typeof(e) && e.constructor === t ? e : new t(function (n) {
      n(e);
    });
  }, t.reject = function (e) {
    return new t(function (n, t) {
      t(e);
    });
  }, t.race = function (e) {
    return new t(function (n, t) {
      for (var o = 0, r = e.length; r > o; o++) {
        e[o].then(n, t);
      }
    });
  }, t._immediateFn = "function" == typeof setImmediate && function (e) {
    setImmediate(e);
  } || function (e) {
    c(e, 0);
  }, t._unhandledRejectionFn = function (e) {
    void 0 !== console && console && console.warn("Possible Unhandled Promise Rejection:", e);
  };
  var l = function () {
    if ("undefined" != typeof self) return self;
    if ("undefined" != typeof window) return window;
    if ("undefined" != typeof __webpack_require__.g) return __webpack_require__.g;
    throw Error("unable to locate global object");
  }();
  "Promise" in l ? l.Promise.prototype["finally"] || (l.Promise.prototype["finally"] = e) : l.Promise = t;
});
!function () {
  var vendors = ['ms', 'moz', 'webkit', 'o'];
  for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
  }
  if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback, element) {
    var id = window.setTimeout(function () {
      callback(element);
    }, 1000 / 60);
    return id;
  };
  if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) {
    clearTimeout(id);
  };
}();

//Object
(function () {
  'use strict';

  var ObjectProto = Object.prototype,
    defineGetter = ObjectProto.__defineGetter__,
    defineSetter = ObjectProto.__defineSetter__,
    lookupGetter = ObjectProto.__lookupGetter__,
    lookupSetter = ObjectProto.__lookupSetter__,
    hasOwnProp = ObjectProto.hasOwnProperty;
  var supportDom = true;
  try {
    if (Object.defineProperty) {
      Object.defineProperty(document.createElement('div'), 'theRandomName', {
        set: function set() {},
        get: function get() {}
      });
    }
  } catch (error) {
    supportDom = false;
  }
  if ((!supportDom || !Object.defineProperty) && defineGetter && defineSetter && lookupGetter && lookupSetter) {
    var originObjetDefineProperty = Object.defineProperty;
    Object.defineProperty = function (obj, prop, descriptor) {
      if (!originObjetDefineProperty || typeof obj.nodeType === "number" && typeof obj.nodeName === "string") {
        if (arguments.length < 3) {
          // all arguments required
          throw new TypeError("Arguments not optional");
        }
        prop += ""; // convert prop to string

        if (hasOwnProp.call(descriptor, "value")) {
          if (!lookupGetter.call(obj, prop) && !lookupSetter.call(obj, prop)) {
            // data property defined and no pre-existing accessors
            obj[prop] = descriptor.value;
          }
          if (hasOwnProp.call(descriptor, "get") || hasOwnProp.call(descriptor, "set")) {
            // descriptor has a value prop but accessor already exists
            throw new TypeError("Cannot specify an accessor and a value");
          }
        }
        if (descriptor.get) {
          defineGetter.call(obj, prop, descriptor.get);
        }
        if (descriptor.set) {
          defineSetter.call(obj, prop, descriptor.set);
        }
        return obj;
      } else {
        return originObjetDefineProperty.call(this, obj, prop, descriptor);
      }
    };
    var originObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
    Object.getOwnPropertyDescriptor = function (obj, prop) {
      if (!originObjectGetOwnPropertyDescriptor || typeof obj.nodeType === "number" && typeof obj.nodeName === "string") {
        if (arguments.length < 2) {
          // all arguments required
          throw new TypeError("Arguments not optional.");
        }
        prop += ""; // convert prop to string

        var descriptor = {
            configurable: true,
            enumerable: true,
            writable: true
          },
          getter = lookupGetter.call(obj, prop),
          setter = lookupSetter.call(obj, prop);
        if (!hasOwnProp.call(obj, prop)) {
          // property doesn't exist or is inherited
          return descriptor;
        }
        if (!getter && !setter) {
          // not an accessor so return prop
          descriptor.value = obj[prop];
          return descriptor;
        }

        // there is an accessor, remove descriptor.writable;
        // populate descriptor.get and descriptor.set (IE's behavior)
        delete descriptor.writable;
        descriptor.get = descriptor.set = undefined;
        if (getter) {
          descriptor.get = getter;
        }
        if (setter) {
          descriptor.set = setter;
        }
        return descriptor;
      } else {
        return originObjectGetOwnPropertyDescriptor(obj, prop);
      }
    };
  }
  if (!supportDom || !Object.getOwnPropertyDescriptors) {
    Object.getOwnPropertyDescriptors = function (o) {
      var res = {};
      for (var key in o) {
        res[key] = Object.getOwnPropertyDescriptor(o, key);
      }
      return res;
    };
  }
  if (!supportDom || !Object.defineProperties) {
    Object.defineProperties = function (obj, props) {
      var prop;
      for (prop in props) {
        if (hasOwnProp.call(props, prop)) {
          Object.defineProperty(obj, prop, props[prop]);
        }
      }
    };
  }
  if (typeof Object.assign != 'function') {
    Object.assign = function (target, varArgs) {
      'use strict';

      if (target == null) {
        throw new TypeError('Cannot convert undefined or null to object');
      }
      var to = Object(target);
      for (var index = 1; index < arguments.length; index++) {
        var nextSource = arguments[index];
        if (nextSource != null) {
          for (var nextKey in nextSource) {
            if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
              to[nextKey] = nextSource[nextKey];
            }
          }
        }
      }
      return to;
    };
  }
})();

//string
!function () {
  if (!String.prototype.startsWith) {
    String.prototype.startsWith = function (searchString, position) {
      position = position || 0;
      return this.indexOf(searchString, position) === position;
    };
  }
  if (!String.prototype.replaceAll) {
    String.prototype.replaceAll = function () {
      var find = arguments[0];
      if (!find) return this;
      if (typeof find == "string") {
        return this.split(find).join(arguments[1]);
      } else if (find instanceof RegExp) {
        return this.replace(new RegExp(find.source, 'g'), arguments[1]);
      }
    };
  }
}();

//array
!function () {
  if (!Array.prototype.fill) {
    Object.defineProperty(Array.prototype, 'fill', {
      value: function value(_value) {
        // Steps 1-2.
        if (this == null) {
          throw new TypeError('this is null or not defined');
        }
        var O = Object(this);

        // Steps 3-5.
        var len = O.length >>> 0;

        // Steps 6-7.
        var start = arguments[1];
        var relativeStart = start >> 0;

        // Step 8.
        var k = relativeStart < 0 ? Math.max(len + relativeStart, 0) : Math.min(relativeStart, len);

        // Steps 9-10.
        var end = arguments[2];
        var relativeEnd = end === undefined ? len : end >> 0;

        // Step 11.
        var _final = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : Math.min(relativeEnd, len);

        // Step 12.
        while (k < _final) {
          O[k] = _value;
          k++;
        }

        // Step 13.
        return O;
      }
    });
  }
  if (!Array.prototype.some) {
    Array.prototype.some = function (fun /*, thisp */) {
      "use strict";

      if (this == null) throw new TypeError();
      var t = Object(this),
        len = t.length >>> 0;
      if (typeof fun != "function") throw new TypeError();
      var thisp = arguments[1];
      for (var i = 0; i < len; i++) {
        if (i in t && fun.call(thisp, t[i], i, t)) return true;
      }
      return false;
    };
  }
}();

//function
!function () {
  if (!Function.prototype.bind) {
    var ArrayPrototypeSlice = Array.prototype.slice;
    Function.prototype.bind = function (otherThis) {
      if (typeof this !== 'function') {
        // closest thing possible to the ECMAScript 5
        // internal IsCallable function
        throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
      }
      var baseArgs = ArrayPrototypeSlice.call(arguments, 1),
        baseArgsLength = baseArgs.length,
        fToBind = this,
        fNOP = function fNOP() {},
        fBound = function fBound() {
          baseArgs.length = baseArgsLength; // reset to default base arguments
          baseArgs.push.apply(baseArgs, arguments);
          return fToBind.apply(fNOP.prototype.isPrototypeOf(this) ? this : otherThis, baseArgs);
        };
      if (this.prototype) {
        // Function.prototype doesn't have a prototype property
        fNOP.prototype = this.prototype;
      }
      fBound.prototype = new fNOP();
      return fBound;
    };
  }
}();

/***/ }),

/***/ 40156:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _XLoader = __webpack_require__(47913);
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _generator = __webpack_require__(18528);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var fontIdOf = function fontIdOf(fontName) {
  if (fontName.toLowerCase().indexOf('arial') >= 0) return 'arial';
  if (fontName.toLowerCase().indexOf('times') >= 0) return 'times';
  if (fontName === "Material Design Icons") return 'MDI_6_7_96';
  return fontName;
};
var P2D = 72 / 96;
var color2RGB255 = function color2RGB255(color) {
  try {
    color = _Color["default"].parse(color + '');
    return color.rgba.slice(0, 3).map(function (x) {
      return x * 255 >> 0;
    });
  } catch (e) {
    return null;
  }
};
function PaperPrinter(opt) {
  var _this = this;
  this.opt = Object.assign((0, _generator.copyJSVariable)(this.defaultOptions), opt);
  this.objects = [];
  this.processInfo = {
    state: "STAND_BY"
  };
  this.subDocs = null;
  this.pdfDoc = null;
  this.pageFormat = null;
  this.computedPages = 0;
  this.sync = this.ready().then(function () {
    _this.processInfo.state = 'READY';
  });
}
PaperPrinter.prototype.defaultOptions = {
  size: 'a4',
  margin: {
    top: 57,
    left: 57,
    bottom: 57,
    right: 57
  },
  footer: null,
  header: null,
  paddingEven: true,
  lastPagePaddingEven: false
};
PaperPrinter.prototype.share = {
  jsPDFUrl: 'https://absol.cf/vendor/jspdf.umd.js',
  jsPDF: null,
  readySync: null,
  fonts: [{
    url: 'https://absol.cf/vendor/fonts/arial.ttf',
    fileName: 'arial.ttf',
    name: 'arial',
    style: 'normal'
  }, {
    url: 'https://absol.cf/vendor/fonts/arialbd.ttf',
    fileName: 'arialbd.ttf',
    name: 'arial',
    style: 'bold'
  }, {
    url: 'https://absol.cf/vendor/fonts/ariali.ttf',
    fileName: 'ariali.ttf',
    name: 'arial',
    style: 'italic'
  }, {
    url: 'https://absol.cf/vendor/fonts/arialbi.ttf',
    fileName: 'arialbi.ttf',
    name: 'arial',
    style: 'bold_italic'
  }, {
    url: 'https://absol.cf/vendor/fonts/times.ttf',
    fileName: 'times.ttf',
    name: 'times',
    style: 'normal'
  }, {
    url: 'https://absol.cf/vendor/fonts/timesbd.ttf',
    fileName: 'timesbd.ttf',
    name: 'times',
    style: 'bold'
  }, {
    url: 'https://absol.cf/vendor/fonts/timesi.ttf',
    fileName: 'timesi.ttf',
    name: 'times',
    style: 'italic'
  }, {
    url: 'https://absol.cf/vendor/fonts/timesbi.ttf',
    fileName: 'timesbi.ttf',
    name: 'times',
    style: 'bold_italic'
  }]
};
PaperPrinter.prototype.ready = function () {
  var _this2 = this;
  var sync;
  if (!this.share.readySync) {
    sync = this.share.fonts.map(function (font) {
      return fetch(font.url).then(function (res) {
        return res.blob();
      }).then(function (blob) {
        var reader = new window.FileReader();
        return new Promise(function (rs) {
          reader.onload = function () {
            rs(this.result);
          };
          reader.readAsDataURL(blob);
        });
      }).then(function (b64Url) {
        var idx = b64Url.indexOf('base64,');
        return b64Url.substring(idx + 'base64,'.length);
      }).then(function (b64) {
        font.content = b64;
      });
    });
    if (window.jspdf) {
      this.share.jsPDF = window.jspdf.jsPDF;
    } else {
      sync.push((0, _XLoader.loadScript)(this.share.jsPDFUrl).then(function () {
        _this2.share.jsPDF = window.jspdf.jsPDF;
      }));
    }
    this.share.readySync = Promise.all(sync);
  }
  return this.share.readySync;
};

/***
 *
 * @param at
 * @param opt
 */
PaperPrinter.prototype.addSubDocument = function (at, opt) {
  this.objects.push({
    type: 'sub_document',
    at: at,
    opt: opt
  });
};

/***
 *
 * @param {string} text
 * @param {Vec2 | Rectangle} pos
 * @param {Object=}style
 */
PaperPrinter.prototype.text = function (text, pos, style) {
  this.objects.push({
    type: 'text',
    pos: pos,
    text: text,
    style: style || {}
  });
  return this;
};

/***
 *
 * @param {string} text
 * @param {Vec2} start
 * @param {Vec2} end
 * @param {Object=}style
 */
PaperPrinter.prototype.line = function (start, end, style) {
  this.objects.push({
    type: 'line',
    start: start,
    end: end,
    style: style || {}
  });
  return this;
};

/***
 *
 * @param {Vec2} at
 * @param {boolean=} paddingEven
 */
PaperPrinter.prototype.pageBreak = function (at, paddingEven) {
  this.objects.push({
    type: 'page_break',
    at: at,
    paddingEven: !!paddingEven
  });
  return this;
};

/***
 *
 * @param {Rectangle}rect
 * @param {Object=}style
 */
PaperPrinter.prototype.rect = function (rect, style) {
  this.objects.push({
    type: 'rect',
    rect: rect,
    style: style || {}
  });
};

/***
 *
 * @param {HTMLCanvasElement|AElement |Image} image
 * @param {Rectangle}rect
 * @param {Object=}style
 */
PaperPrinter.prototype.image = function (image, rect, style) {
  this.objects.push({
    type: 'image',
    rect: rect,
    style: style || {},
    image: image
  });
  return this;
};
PaperPrinter.prototype.boundOf = function (objectData) {
  return this.measures[objectData.type](objectData);
};
PaperPrinter.prototype.computeObjects = function () {
  var _this3 = this;
  var objects = this.objects.slice();
  if (!objects[0] || objects[0].type !== 'sub_document') {
    objects.unshift({
      type: 'sub_document',
      at: _Vec["default"].ZERO
    });
  }
  this.subDocs = objects.reduce(function (ac, obj) {
    switch (obj.type) {
      case 'sub_document':
        ac.push({
          objects: [obj]
        });
        break;
      default:
        ac[ac.length - 1].objects.push(obj);
        break;
    }
    return ac;
  }, []);
  this.subDocs.forEach(function (doc, i) {
    doc.objects.forEach(function (o, i) {
      o.idx = i;
      o.bound = _this3.boundOf(o);
    });
    var newDocCmd = doc.objects.shift();
    doc.objects.sort(function (a, b) {
      return a.bound.y - b.bound.y;
    });
    doc.opt = Object.assign((0, _generator.copyJSVariable)(_this3.opt), newDocCmd.opt || {});
    doc.objects.unshift(newDocCmd);
    doc.startPage = i > 0 ? _this3.subDocs[i - 1].startPage + _this3.subDocs[i - 1].pages.length : _this3.computedPages;
    if (_this3.opt.paddingEven && doc.startPage % 2 > 0) doc.startPage++;
    var pageContentHeight = 1123 - doc.opt.margin.top - doc.opt.margin.bottom;
    doc.pages = doc.objects.reduce(function (ac, cr) {
      var page = ac[ac.length - 1];
      if (cr.bound.height > pageContentHeight) {
        page.objects.push(cr);
      } else {
        if (cr.bound.y + cr.bound.height - page.y > pageContentHeight || cr.type === 'page_break') {
          page = {
            y: cr.bound.y,
            objects: [cr]
          };
          ac.push(page);
        } else {
          page.objects.push(cr);
        }
      }
      return ac;
    }, [{
      objects: [],
      y: 0
    }]);
    doc.pages.forEach(function (page) {
      return page.objects.sort(function (a, b) {
        return a.idx - b.idx;
      });
    });
    _this3.computedPages = doc.startPage + doc.pages.length;
  });
};
PaperPrinter.prototype.getDoc = function () {
  var _this4 = this;
  if (this.docSync) return this.docSync;
  this.docSync = this.sync.then(function () {
    if (_this4.pdfDoc) return _this4.pdfDoc;
    var jsPDF = jspdf.jsPDF;
    _this4.pdfDoc = new jsPDF({
      orientation: 'p',
      unit: 'px',
      format: 'a4',
      putOnlyUsedFonts: true,
      floatPrecision: 16,
      dpi: 300,
      hotfixes: ["px_scaling"]
    });
    _this4.share.fonts.forEach(function (font) {
      _this4.pdfDoc.addFileToVFS(font.fileName, font.content);
      _this4.pdfDoc.addFont(font.fileName, font.name, font.style);
    });
    return _this4.pdfDoc;
  });
  this.sync = this.docSync;
  return this.docSync;
};
PaperPrinter.prototype.flush = function () {
  var _this5 = this;
  this.sync = this.getDoc().then(function (pdfDoc) {
    _this5.computeObjects();
    var subDocs = _this5.subDocs;
    _this5.subDocs = null; //reset
    var onProcess = _this5.opt.onProcess;
    var processInfo = _this5.processInfo;
    processInfo.pdf = {
      all: subDocs.reduce(function (ac, sD) {
        return ac + sD.objects.length;
      }, 0),
      done: 0
    };
    processInfo.onProcess = function () {
      onProcess && onProcess(processInfo);
    };
    processInfo.state = 'RENDER_PDF';
    return subDocs.reduce(function (sync, doc, i) {
      return sync.then(function () {
        var startPage = doc.startPage;
        while (pdfDoc.getNumberOfPages() <= startPage) {
          pdfDoc.addPage();
        }
        return doc.pages.reduce(function (docSync, page, i) {
          return docSync.then(function () {
            if (pdfDoc.getNumberOfPages() <= startPage + i) {
              pdfDoc.addPage();
            }
            pdfDoc.setPage(startPage + i + 1);
            page.O = new _Vec["default"](_this5.opt.margin.left, _this5.opt.margin.top - page.y);
            return page.objects.reduce(function (pageSync, obj) {
              return pageSync.then(function () {
                var type = obj.type;
                var res = _this5.pdfHandlers[type](page, pdfDoc, obj);
                processInfo.pdf.done++;
                if (res && res.then) {
                  res.then(function () {
                    return processInfo.onProcess();
                  });
                }
                return res;
              });
            }, Promise.resolve()).then(function () {
              pdfDoc.setTextColor(0, 0, 0);
              pdfDoc.setFontSize(14 * P2D);
              pdfDoc.setFont('arial', 'normal');
              pdfDoc.text(i + 1 + '/' + doc.pages.length, 794 - 25, 1123 - 25, {
                align: 'right'
              });
              if (typeof doc.opt.footer === 'string') {
                pdfDoc.text(doc.opt.footer, 25, 1123 - 25, {
                  align: 'left'
                });
              }
            });
          });
        }, Promise.resolve()).then(function () {
          if (_this5.opt.lastPagePaddingEven) {
            while (pdfDoc.getNumberOfPages() % 2 > 0) {
              pdfDoc.addPage();
            }
          }
        });
      });
    }, Promise.resolve());
  });
  return this.sync;
};
PaperPrinter.prototype.exportAsPDF = function () {
  var _this6 = this;
  return this.flush().then(function () {
    return _this6.pdfDoc;
  });
};
PaperPrinter.prototype.pdfHandlers = {
  text: function text(context, doc, data) {
    var fontFamily = data.style.fontFamily;
    var lineHeight = data.style.lineHeight || 1.2;
    var color = color2RGB255(data.style.color) || [0, 0, 0];
    doc.setTextColor(color[0], color[1], color[2]);
    var fontSize = data.style.fontSize || 14;
    var textPos = data.pos.A().add(context.O);
    doc.setLineHeightFactor(lineHeight);
    doc.setFontSize(fontSize * P2D);
    doc.setFont(fontIdOf(fontFamily), data.style.fontStyle);
    var style = {
      baseline: 'top',
      maxWidth: data.pos.width
    };
    if (data.style.align) {
      //todo: check align
      style.align = {
        start: 'left',
        end: 'right',
        center: 'center'
      }[data.style.align] || 'left';
    }
    doc.text(data.text, textPos.x, textPos.y + fontSize * (lineHeight - 1) / 2, style);
  },
  rect: function rect(context, doc, data) {
    var fillColor = null;
    var strokeColor = null;
    var strokeWidth = data.style.strokeWidth || 1;
    var rounded = data.style.rounded;
    if (typeof rounded === "number") rounded = [rounded, rounded];
    if (data.style.fill) {
      fillColor = color2RGB255(data.style.fill);
    }
    if (data.style.stroke) {
      strokeColor = color2RGB255(data.style.stroke);
    }
    if (fillColor) doc.setFillColor(fillColor[0], fillColor[1], fillColor[2]);
    if (strokeColor) {
      doc.setLineWidth(strokeWidth);
      doc.setDrawColor(strokeColor[0], strokeColor[1], strokeColor[2]);
    }
    var flat = 'F';
    if (strokeColor && fillColor) flat = 'FD';else if (strokeColor) flat = 'S';else if (fillColor) flat = 'F';else return;
    var O = context.O;
    var A = data.rect.A().add(O);
    if (rounded) {
      doc.roundedRect(A.x, A.y, data.rect.width, data.rect.height, rounded[0], rounded[1], flat);
    } else {
      doc.rect(A.x, A.y, data.rect.width, data.rect.height, flat);
    }
  },
  line: function line(context, doc, data) {
    var fillColor = null;
    var strokeColor = null;
    var strokeWidth = data.style.strokeWidth || 1;
    if (data.style.stroke) {
      strokeColor = color2RGB255(data.style.stroke);
    }
    if (strokeColor) {
      doc.setLineWidth(strokeWidth);
      doc.setDrawColor(strokeColor[0], strokeColor[1], strokeColor[2]);
    }
    var flat = 'S';
    var O = context.O;
    var A = data.start.add(O);
    var B = data.end.add(O);
    doc.line(A.x, A.y, B.x, B.y, flat);
  },
  image: function image(context, doc, data) {
    var handleImage = function handleImage(image) {
      if (!image) return;
      var rect = data.rect.clone();
      rect.x += context.O.x;
      rect.y += context.O.y;
      doc.addImage(image, 'PNG', rect.x, rect.y, rect.width, rect.height);
    };
    if (data.image.then) {
      return data.image.then(handleImage)["catch"](function (err) {});
    } else return handleImage(data.image);
  },
  page_break: function page_break(context, doc, data) {},
  sub_document: function sub_document(context, doc, data) {}
};
PaperPrinter.prototype.measures = {
  sub_document: function sub_document(data) {
    return new _Rectangle["default"](0, 0, 0, 0);
  },
  rect: function rect(data) {
    return data.rect;
  },
  text: function text(data) {
    return data.pos;
  },
  image: function image(data) {
    return data.rect;
  },
  line: function line(data) {
    return _Rectangle["default"].boundingPoints([data.start, data.end]);
  },
  page_break: function page_break(data) {
    return new _Rectangle["default"](0, data.at.y, 0, 0);
  }
};
var _default = PaperPrinter;
exports["default"] = _default;

/***/ }),

/***/ 1162:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.computePrintAttr = computePrintAttr;
exports["default"] = void 0;
exports.getComputedStyleCache = getComputedStyleCache;
exports.getComputedStyleValueCache = getComputedStyleValueCache;
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Svg = _interopRequireWildcard(__webpack_require__(98315));
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _attribute = __webpack_require__(18144);
var _XLoader = __webpack_require__(47913);
var _noop = _interopRequireDefault(__webpack_require__(5025));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _ = _Dom["default"].ShareInstance._;
var $ = _Dom["default"].ShareInstance.$;
var $$ = _Dom["default"].ShareInstance.$$;

/***
 *
 * @param {AElement|HTMLElement} elt
 * @param {string=} ps
 * @return {*}
 */
function getComputedStyleCache(elt, ps) {
  ps = ps || '';
  var key = '__computedStyleCache__' + ps;
  if (elt[key]) return elt[key];
  elt[key] = ps ? getComputedStyle(elt, ps) : getComputedStyle(elt);
  return elt[key];
}

/***
 *
 * @param {AElement|HTMLElement} elt
 * @param {string} pName
 * @return {string}
 */
function getComputedStyleValueCache(elt, pName) {
  return getComputedStyleCache(elt).getPropertyValue(pName);
}
function computePrintAttr(elt) {
  var style = getComputedStyleCache(elt);
  var fontSize = elt.getFontSize();
  var lineHeight = style.getPropertyValue('line-height');
  if (lineHeight === 'normal') lineHeight = 1.2;else lineHeight = parseFloat(lineHeight.replace('px', '')) / fontSize;
  if (!isNaN(lineHeight)) lineHeight = 1.2;
  var fontWeight = style.getPropertyValue('font-weight');
  var fontStyle = fontWeight === '400' ? 'normal' : 'bold';
  var dirs = ['top', 'right', 'bottom', 'left'];
  var paddingStyle = dirs.map(function (dir) {
    return (0, _attribute.parseMeasureValue)(style.getPropertyValue('padding-' + dir));
  });
  var borderWidthStyle = dirs.map(function (dir) {
    return (0, _attribute.parseMeasureValue)(style.getPropertyValue('border-' + dir + '-width'));
  });
  var contentBound = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
  contentBound.x += paddingStyle[3].value + borderWidthStyle[3].value;
  contentBound.y += paddingStyle[0].value + borderWidthStyle[0].value;
  contentBound.width += paddingStyle[1].value + borderWidthStyle[1].value + paddingStyle[3].value + borderWidthStyle[3].value;
  contentBound.height += paddingStyle[2].value + borderWidthStyle[2].value + paddingStyle[0].value + borderWidthStyle[0].value;
  return {
    contentBound: contentBound,
    whiteSpace: style.getPropertyValue('white-space'),
    style: {
      color: style.getPropertyValue('color'),
      fontFamily: style.getPropertyValue('font-family'),
      fontStyle: fontStyle,
      lineHeight: lineHeight,
      fontSize: fontSize,
      align: style.getPropertyValue('text-align')
    }
  };
}

/***
 *
 * @type {PSHandler[]}
 */
var PrintSerialHandlers = [];
PrintSerialHandlers.push({
  id: 'TextNode',
  match: function match(elt) {
    return elt.nodeType === Node.TEXT_NODE;
  },
  exec: function exec(printer, text, scope, stack, accept) {
    var O = printer.O;
    var elt = text.parentElement;
    var bound = _Rectangle["default"].fromClientRect((0, _Dom.getTextNodeBound)(text));
    if (bound.width === 0) return;
    var printAttr = computePrintAttr(elt);
    var txt = text.data;
    var y = -Infinity;
    var c;
    var range;
    var parts = [];
    var cPart;
    var j;
    var delta = printAttr.style.lineHeight * printAttr.style.fontSize / 3;
    var rect;
    var i = 0;
    while (i < txt.length) {
      c = txt[i];
      if (!c.match(/[\s\n]/)) {
        j = i + 1;
        while (j < txt.length) {
          c = txt[j];
          if (c.match(/[\s\n]/)) {
            break;
          } else {
            ++j;
          }
        }
        range = document.createRange();
        range.setStart(text, i);
        range.setEnd(text, j);
        rect = _Rectangle["default"].fromClientRect(range.getBoundingClientRect());
        if (Math.abs(rect.y - y) < delta) {
          cPart.end = j;
          cPart.rect = cPart.rect.merge(rect);
        } else {
          cPart = {
            start: i,
            end: j,
            rect: rect
          };
          y = rect.y;
          parts.push(cPart);
        }
        i = j;
      } else {
        ++i;
      }
    }
    parts.forEach(function (part) {
      rect = part.rect;
      rect.x -= O.x;
      rect.y -= O.y;
      rect.width += printAttr.style.fontSize * 1000;
      var lineTxt = txt.substring(part.start, part.end);
      if (printAttr.whiteSpace === 'normal') {
        lineTxt = lineTxt.replace(/[\s\n]+/g, ' ');
      }
      delete printAttr.style.align; //text-node bound
      printer.text(lineTxt, rect, printAttr.style);
    });
  }
});
PrintSerialHandlers.push({
  id: 'Border',
  match: function match(elt, scope, stack) {
    if (scope.isDeclared('borderStyle')) return false;
    var style = getComputedStyleCache(elt);
    var borderColor = style.getPropertyValue('border-color');
    var borderStyle = style.getPropertyValue('border-style');
    var borderWidth = style.getPropertyValue('border-width');
    var borderRadius = style.getPropertyValue('border-radius');
    if (borderStyle === 'none' || borderWidth === '0px') return false;
    scope.declare('borderStyle', {
      width: parseFloat(borderWidth.replace('px', '')),
      radius: (0, _attribute.parseMeasureValue)(borderRadius),
      color: borderColor
    });
    return true;
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var borderStyle = scope.get('borderStyle');
    var bound = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    var rect = bound.clone();
    var strokeWidth = borderStyle.width;
    if (elt.tagName === 'TD' || elt.tagName === 'TH') {
      rect.x -= printer.O.x;
      rect.y -= printer.O.y;
    } else {
      rect.x -= printer.O.x - strokeWidth / 2;
      rect.y -= printer.O.y - strokeWidth / 2;
      rect.width -= strokeWidth;
      rect.height -= strokeWidth;
    }
    var radius = borderStyle.radius;
    var rounded;
    if (radius) {
      switch (radius.unit) {
        case '%':
          rounded = [radius.value * rect.width / 100, radius.value * rect.height / 100];
          break;
        case 'px':
          rounded = radius.value;
          break;
      }
    }
    printer.rect(rect, {
      stroke: borderStyle.color,
      rounded: rounded,
      strokeWidth: strokeWidth
    });
    return true;
  }
});
PrintSerialHandlers.push({
  id: 'BackgroundImage',
  match: function match(elt, scope, stack) {
    return elt.getComputedStyleValue('background-image') !== 'none';
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var style = getComputedStyleCache(elt);
    var backgroundSize = style.getPropertyValue('background-size');
    var url = style.getPropertyValue('background-image').trim().replace('url("', '').replace('")', '');
    var rect = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    rect.x -= printer.O.x;
    rect.y -= printer.O.y;
    var borderRadius = ['top-left', 'top-right', 'bottom-right', 'bottom-left'].map(function (key) {
      return (0, _attribute.parseMeasureValue)(style.getPropertyValue('border-' + key + '-radius'));
    });
    var image = (0, _XLoader.isImageURLAllowCrossOrigin)(url).then(function (result) {
      /***
       *
       * @type {HTMLCanvasElement}
       */
      var canvas = document.createElement('canvas');
      var width = rect.width;
      var height = rect.height;
      canvas.width = width;
      canvas.height = height;
      var image = new Image();
      image.crossOrigin = 'anonymous';
      image.src = result ? url : 'https://absol.cf/crossdownload.php?file=' + encodeURIComponent(url);
      var ctx = canvas.getContext('2d');
      var isRect = borderRadius.every(function (x) {
        return x.value === 0;
      });
      var x, y, r;
      var eclipses = [];
      var points = [];
      if (!isRect) {
        r = borderRadius[0];
        x = r.unit === '%' ? r.value / 100 * width : r.value;
        y = 0;
        points.push([x, y]);
        r = borderRadius[1];
        x = r.unit === '%' ? (1 - r.value / 100) * width : width - r.value;
        points.push([x, y]);
        if (r.value > 0) {
          y = r.unit === '%' ? r.value / 100 * height : r.value;
          eclipses.push([x, y, width - x, y, 0, -Math.PI / 2, 0]);
          x = width;
          points.push([x, y]);
        } else {
          x = width;
        }
        r = borderRadius[2];
        y = r.unit === '%' ? (1 - r.value / 100) * height : height - r.value;
        points.push([x, y]);
        if (r.value > 0) {
          x = r.unit === '%' ? (1 - r.value / 100) * width : width - r.value;
          eclipses.push([x, y, width - x, height - y, 0, 0, Math.PI / 2]);
          y = height;
          points.push([x, y]);
        } else {
          y = height;
        }
        r = borderRadius[3];
        x = r.unit === '%' ? r.value / 100 * width : r.value;
        points.push([x, y]);
        if (r.value > 0) {
          y = r.unit === '%' ? (1 - r.value / 100) * height : height - r.value;
          eclipses.push([x, y, x, height - y, 0, Math.PI / 2, Math.PI]);
          x = 0;
          points.push([x, y]);
        } else {
          x = 0;
        }
        r = borderRadius[0];
        y = r.unit === '%' ? r.value / 100 * height : r.value;
        points.push([x, y]);
        if (r.value > 0) {
          x = r.unit === '%' ? r.value / 100 * width : r.value;
          eclipses.push([x, y, x, y, 0, Math.PI, Math.PI * 3 / 2]);
        }
        ctx.beginPath();
        points.forEach(function (p, i) {
          if (i === 0) ctx.moveTo(p[0], p[1]);else ctx.lineTo(p[0], p[1]);
        });
        ctx.closePath();
        ctx.fillStyle = 'red';
        ctx.fill();
        eclipses.forEach(function (e) {
          ctx.beginPath();
          ctx.ellipse(e[0], e[1], e[2], e[3], e[4], e[5], e[6]);
          ctx.fill();
        });
        ctx.globalCompositeOperation = 'source-in';
      }
      return new Promise(function (rs) {
        image.onload = function () {
          var scale;
          var nW;
          var nH; //todo: handle more
          switch (backgroundSize) {
            case 'cover':
              scale = Math.max(width / image.naturalWidth, height / image.height);
              nW = image.naturalWidth * scale;
              nH = image.naturalHeight * scale;
              ctx.drawImage(image, 0, 0, nW, nH);
              break;
            case 'auto':
            default:
              ctx.drawImage(image, 0, 0);
          }
          rs(canvas);
        };
        image.onerror = function () {
          console.error('can not load ', image.src);
          rs(null);
        };
      });
    })["catch"](function (err) {
      console.error(err);
    });
    printer.image(image, rect);
    return true;
  }
});
PrintSerialHandlers.push({
  id: 'BreakInside',
  match: function match(elt, scope, stack) {
    return getComputedStyleValueCache(elt, 'break-inside') === 'avoid';
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var rect = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    rect.x -= printer.O.x;
    rect.y -= printer.O.y;
    printer.rect(rect, {});
    return true;
  }
});
PrintSerialHandlers.push({
  id: 'MDI_FA',
  match: function match(elt, scope, stack) {
    return elt.classList && (elt.classList.contains('mdi') || elt.classList.contains('fab') || elt.classList.contains('far') || elt.classList.contains('fas') || elt.classList.contains('material-icons'));
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var style = elt.classList.contains('material-icons') ? getComputedStyleCache(elt) : getComputedStyleCache(elt, '::before');
    var content = elt.classList.contains('material-icons') ? elt.innerHTML : style.getPropertyValue('content');
    content = content.replace('"', '');
    var font = style.getPropertyValue('font');
    var rect = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    if (rect.width * rect.height === 0) return;
    var canvas = document.createElement('canvas');
    canvas.width = rect.width;
    canvas.height = rect.height;
    var ctx = canvas.getContext('2d');
    ctx.font = font;
    ctx.textBaseline = "top";
    rect.x -= printer.O.x;
    rect.y -= printer.O.y;
    ctx.fillStyle = style.getPropertyValue('color');
    ctx.fillText(content, 0, 0);
    printer.image(canvas, rect);
  }
});
PrintSerialHandlers.push({
  id: 'Img',
  match: function match(elt) {
    return elt.tagName && elt.tagName.toLowerCase() === 'img' && elt.src && elt.naturalWidth;
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var bound = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    if (bound.width === 0) return;
    var rect = bound.clone();
    rect.x -= printer.O.x;
    rect.y -= printer.O.y;
    printer.image(elt, rect);
  }
});
PrintSerialHandlers.push({
  id: 'Canvas',
  match: function match(elt) {
    return elt.tagName && elt.tagName.toLowerCase() === 'canvas';
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var bound = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    if (bound.width === 0) return;
    var rect = bound.clone();
    rect.x -= printer.O.x;
    rect.y -= printer.O.y;
    printer.image(elt, rect);
  }
});
PrintSerialHandlers.push({
  id: 'SVG',
  match: function match(elt) {
    return elt.tagName && elt.tagName.toLowerCase() === 'svg';
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var bound = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    if (bound.width === 0) return;
    var rect = bound.clone();
    rect.x -= printer.O.x;
    rect.y -= printer.O.y;
    var res = _Svg["default"].svgToCanvas(elt.__origin__)["catch"](function (err) {
      console.error(err);
    });
    res.elt = elt;
    printer.image(res, rect);
  }
});
PrintSerialHandlers.push({
  id: 'TextInput',
  match: function match(elt, scope, stack) {
    return elt.tagName === 'INPUT' && (elt.attr('type') === 'text' || elt.attr('type') === 'number' || !elt.attr('type'));
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var O = printer.O;
    var style = getComputedStyleCache(elt);
    var paddingLeft = (0, _attribute.parseMeasureValue)(style.getPropertyValue('padding-left'));
    var paddingTop = (0, _attribute.parseMeasureValue)(style.getPropertyValue('padding-top'));
    var paddingBottom = (0, _attribute.parseMeasureValue)(style.getPropertyValue('padding-bottom'));
    var borderLeftWidth = (0, _attribute.parseMeasureValue)(style.getPropertyValue('border-left-width'));
    var borderTopWidth = (0, _attribute.parseMeasureValue)(style.getPropertyValue('border-top-width'));
    var borderBottomWidth = (0, _attribute.parseMeasureValue)(style.getPropertyValue('border-top-width'));
    var rect = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    var fontSize = elt.getFontSize();
    var lineHeight = style.getPropertyValue('line-height');
    if (lineHeight === 'normal') lineHeight = 1.2;else lineHeight = parseFloat(lineHeight.replace('px', '')) / fontSize;
    if (!isNaN(lineHeight)) lineHeight = 1.2;
    var fontWeight = style.getPropertyValue('font-weight');
    var fontStyle = fontWeight === '400' ? 'normal' : 'bold';
    rect.width = 700;
    rect.x += borderLeftWidth.value + paddingLeft.value - O.x;
    rect.height -= borderTopWidth.value + borderBottomWidth.value + paddingTop.value + paddingBottom.value;
    rect.y += borderTopWidth.value + paddingTop.value - O.y;
    var centerY = rect.centerPoint().y;
    rect.y = centerY - fontSize * lineHeight / 2;
    rect.height = fontSize * lineHeight;
    printer.text(elt.value, rect, {
      fontFamily: style.getPropertyValue('font-family'),
      fontStyle: fontStyle,
      fontSize: fontSize,
      lineHeight: lineHeight
    });
  }
});
PrintSerialHandlers.push({
  id: 'BreakPage',
  match: function match(elt) {
    return elt.hasClass && elt.hasClass('as-page-break');
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    var rect = _Rectangle["default"].fromClientRect(elt.getBoundingClientRect());
    rect.x -= printer.O.x;
    rect.y -= printer.O.y;
    printer.pageBreak(rect.A());
  }
});
PrintSerialHandlers.push({
  id: '*',
  match: function match() {
    return true;
  },
  exec: function exec(printer, elt, scope, stack, accept) {
    if (elt.getComputedStyleValue('display') === 'none') return;
    if (elt.childNodes) {
      Array.prototype.forEach.call(elt.childNodes, function (child) {
        return accept(child);
      });
    }
  }
});
var _default = PrintSerialHandlers;
exports["default"] = _default;

/***/ }),

/***/ 40424:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _VarScope = _interopRequireDefault(__webpack_require__(61607));
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _PrintSerialHandlers = _interopRequireDefault(__webpack_require__(1162));
var _XLoader = __webpack_require__(47913);
var _noop = _interopRequireDefault(__webpack_require__(5025));
var _stringGenerate = __webpack_require__(10713);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
/***
 * @typedef {Object} PSHandler
 * @property {string} id
 * @property {function(elt:AElement, scope: VarScope, stack:Array<AElement>):boolean} match
 * @property {function(printer: PaperPrinter,elt:AElement|Text, scope: VarScope, stack:Array<{elt: AElement|Text, scope:VarScope}>, accept: function():void):(boolean|void)} exec - return true if run other handle
 *
 */

/***
 *
 * @constructor
 */
function PrintSerializer() {
  /***
   * @type {Array<PSHandler>}
   */
  this.handlers = this.handlers.slice();
}
PrintSerializer.prototype.handlers = _PrintSerialHandlers["default"];

/***
 *
 * @param {PaperPrinter} printer
 * @param {AElement|AElementNS|Text} elt
 * @param {VarScope} scope
 * @param {Array<{elt: AElement|Text, scope:VarScope}>} stack
 */
PrintSerializer.prototype.accept = function (printer, elt, scope, stack) {
  var _this = this;
  if (elt.nodeType === Node.ELEMENT_NODE) _Dom["default"].ShareInstance.$(elt);
  var handler;
  var matched, cont;
  for (var i = 0; (!matched || cont) && i < this.handlers.length; ++i) {
    handler = this.handlers[i];
    matched = handler.match(elt, scope, stack);
    if (matched) {
      cont = handler.exec(printer, elt, scope, stack, function (elt1) {
        _this.accept(printer, elt1, new _VarScope["default"](scope), stack.concat([{
          elt: elt,
          scope: scope
        }]));
      });
    }
  }
};

/***
 *
 * @param {Array<AElement> | AElement | Array<{elt: AElement, opt:Object}>} docList
 * @param printer
 * @param onProcess
 * @return {Promise<Awaited<unknown>[]>}
 */
PrintSerializer.prototype.serialize = function (docList, printer, _onProcess) {
  var _this2 = this;
  var $ = _Dom["default"].ShareInstance.$;
  if (!(docList instanceof Array)) docList = [docList];
  docList = docList.map(function (doc) {
    if (typeof doc === "string") {
      return {
        elt: $(doc)
      };
    } else if ((0, _Dom.isDomNode)(doc)) {
      return {
        elt: $(doc)
      };
    } else if (_typeof(doc) === "object" && doc) {
      if (typeof doc.elt === "string") doc.elt = $(doc.elt);
      if (doc.elt && (0, _Dom.isDomNode)(doc.elt)) return doc;
    } else return null;
  }).filter(function (it) {
    return !!it;
  });
  var sync = [];
  var processInfo = {
    state: 'RENDER_DOM',
    total: {
      all: 0,
      text: 0,
      image: 0
    },
    dom: {
      text: 0,
      image: 0
    },
    onProcess: function onProcess() {
      _onProcess && _onProcess(processInfo);
    }
  };
  printer.processInfo = processInfo;
  var contentChildList = docList.map(function (doc) {
    var elt = doc.elt;
    return (0, _Dom.depthClone)(elt, function (originElt, copyElt) {
      copyElt.__idx__ = processInfo.total.all;
      copyElt.__origin__ = originElt;
      processInfo.total.all++;
      var parent, fontWeight, style;
      var done = false;
      if (originElt.nodeType === Node.TEXT_NODE) {
        processInfo.total.text++;
        sync.push(new Promise(function (rs) {
          setTimeout(function () {
            parent = originElt.parentElement;
            if (!copyElt.__fontWeight__) {
              style = getComputedStyle(parent);
              fontWeight = parseInt(style.getPropertyValue('font-weight')); //not support other style
              copyElt.__fontWeight__ = fontWeight;
              if (fontWeight <= 400) {
                copyElt.parentElement.style.setProperty('font-weight', 'normal');
              } else if (fontWeight > 400) {
                copyElt.parentElement.style.setProperty('font-weight', 'bold');
              }
              processInfo.dom.text++;
            }
            processInfo.dom.text++;
            rs();
          }, 0);
        }));
      } else if (originElt.tagName && originElt.tagName.toLowerCase() === 'canvas') {
        copyElt.getContext('2d').drawImage(originElt, 0, 0);
      } else if (originElt.tagName === 'IMG' && !originElt.classList.contains('absol-attachhook') && originElt.src) {
        processInfo.total.image++;
        sync.push((0, _XLoader.isImageURLAllowCrossOrigin)(originElt.src).then(function (result) {
          var newElt;
          if (!result) {
            newElt = copyElt.cloneNode();
            newElt.__idx__ = copyElt.__idx__;
            newElt.__origin__ = copyElt.__origin__;
            ;
            copyElt.parentElement.replaceChild(newElt, copyElt);
            return (0, _XLoader.loadToBlobURL)('https://absol.cf/crossdownload.php?file=' + encodeURIComponent(originElt.src)).then(function (url) {
              return newElt.src = url;
            }).then(function () {
              return (0, _Dom.waitImageLoaded)(newElt, 10000);
            }).then(function () {
              if (!done) {
                processInfo.dom.image++;
                processInfo.onProcess();
                done = true;
              }
            });
          } else {
            return (0, _Dom.waitImageLoaded)(copyElt, 10000).then(function () {
              if (!done) {
                processInfo.dom.image++;
                processInfo.onProcess();
                done = true;
              }
            });
          }
        }, function (err) {
          console.error(err);
          if (!done) {
            processInfo.dom.image++;
            processInfo.onProcess();
            done = true;
          }
        }));
      } else if (originElt.tagName === 'INPUT') {
        if (originElt.getAttribute('type') === 'text' || !originElt.getAttribute('type') || originElt.getAttribute('type') === 'number') {
          copyElt.value = originElt.value;
        } else if (originElt.getAttribute('type') === 'radio') {
          copyElt.setAttribute('name', (copyElt.getAttribute('name') || (0, _stringGenerate.randomIdent)()) + '_for_print');
          copyElt.checked = originElt.checked;
        }
      }
    });
  });
  var content = _Dom["default"].ShareInstance._({
    style: {
      width: 794 - 57 * 2 + 'px',
      //WIDTH: 1123 - 57*2
      display: 'inline-block',
      overflow: 'visible'
    },
    "class": 'as-printer-content',
    child: contentChildList
  });
  var scroller = _Dom["default"].ShareInstance._({
    "class": 'as-printer',
    style: {
      'text-size-adjust': 'none',
      '-webkit-text-size-adjust': 'none',
      '-moz-text-size-adjust': 'none',
      '-ms-text-size-adjust': 'none',
      position: 'fixed',
      top: '10px',
      bottom: '10px',
      left: '10px',
      overflow: 'scroll',
      width: '794px',
      // maxWidth: '90vw',
      background: 'white',
      // zIndex: 1000,

      opacity: '0',
      zIndex: '-100',
      visibility: 'hidden',
      pointerEvents: 'none'
    },
    child: content
  }).addTo(document.body);
  sync.push(new Promise(function (rs) {
    setTimeout(rs, 50);
  }));
  return Promise.all(sync).then(function () {
    processInfo.state = "SERIALIZE";
    processInfo.onProcess();
    docList.forEach(function (doc, i) {
      printer.O = _Rectangle["default"].fromClientRect(contentChildList[i].getBoundingClientRect()).A();
      printer.addSubDocument(printer.O, doc.opt);
      _this2.accept(printer, contentChildList[i], new _VarScope["default"](), []);
    });
  }).then(function () {
    scroller.remove();
    processInfo.onProcess = _noop["default"];
    return printer;
  });
};

/***
 *
 * @param {PSHandler} handler
 * @returns {this}
 */
PrintSerializer.prototype.addHandler = function (handler) {
  this.handlers.unshift(handler);
  return this;
};

/***
 *
 * @param {PSHandler} handler
 * @param {string} bf
 * @returns {this}
 */
PrintSerializer.prototype.addHandlerBefore = function (handler, bf) {
  var idx = this.handlers.findIndex(function (value) {
    return value.id === bf;
  });
  if (idx >= 0) {
    this.handlers.splice(idx, 0, handler);
  }
  return this;
};

/***
 *
 * @param {PSHandler} handler
 * @param {string} at
 * @returns {this}
 */
PrintSerializer.prototype.addHandlerAfter = function (handler, at) {
  var idx = this.handlers.findIndex(function (value) {
    return value.id === at;
  });
  if (idx >= 0) {
    this.handlers.splice(idx + 1, 0, handler);
  }
  return this;
};

/***
 *
 * @param {Array<PSHandler>} handlers
 * @returns {this}
 */
PrintSerializer.prototype.addHandlers = function (handlers) {
  this.handlers.unshift.apply(this.handlers, handlers);
  return this;
};

/***
 *
 * @param {string} id
 * @returns {this}
 */
PrintSerializer.prototype.removeHandler = function (id) {
  var idx = this.handlers.findIndex(function (value) {
    return value.id === id;
  });
  if (idx >= 0) {
    this.handlers.splice(idx, 1);
  }
  return this;
};

/***
 *
 * @param {string} id
 * @returns {PSHandler|null}
 */
PrintSerializer.prototype.getHandler = function (id) {
  var idx = this.handlers.findIndex(function (value) {
    return value.id === id;
  });
  if (idx >= 0) {
    return this.handlers[idx];
  }
  return null;
};
var _default = PrintSerializer;
exports["default"] = _default;

/***/ }),

/***/ 38522:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.mergePdfs = mergePdfs;
var _XLoader = __webpack_require__(47913);
// var pdLibUrl = 'https://unpkg.com/pdf-lib/dist/pdf-lib.js';
var pdLibUrl = 'https://absol.cf/vendor/pdf-lib.js';
var libSync = null;
function loadVendorLib() {
  if (libSync) return libSync;
  if ('PDFLib' in window) {
    libSync = Promise.resolve(window.PDFLib);
  } else {
    libSync = (0, _XLoader.loadScript)(pdLibUrl).then(function () {
      return window.PDFLib;
    });
  }
  return libSync;
}
function loadPdf(data) {
  if (typeof data === "string") {
    return fetch(data).then(function (res) {
      return res.arrayBuffer();
    }).then(function (buff) {
      return loadPdf(buff);
    });
  } else if (data instanceof ArrayBuffer) {
    return PDFLib.PDFDocument.load(data);
  } else return null;
}
function mergePdfs(pdfsToMerges, onProcess) {
  var processInfo = {
    all: pdfsToMerges.length,
    loaded: 0,
    merged: 0
  };
  return loadVendorLib().then(function () {
    var pdfSync = pdfsToMerges.map(function (it) {
      return loadPdf(it).then(function (r) {
        processInfo.loaded++;
        onProcess && onProcess(processInfo);
        return r;
      });
    });
    pdfSync.push(PDFLib.PDFDocument.create());
    return Promise.all(pdfSync);
  }).then(function (pdfs) {
    var mergedPdf = pdfs.pop();
    return pdfs.reduce(function (sync, pdf) {
      return mergedPdf.copyPages(pdf, pdf.getPageIndices()).then(function (copiedPages) {
        return sync.then(function () {
          return copiedPages;
        });
      }).then(function (copiedPages) {
        copiedPages.forEach(function (page) {
          mergedPdf.addPage(page);
        });
        processInfo.merged++;
        onProcess && onProcess(processInfo);
      });
    }, Promise.resolve()).then(function () {
      return mergedPdf;
    });
  }).then(function (mergedPdf) {
    return mergedPdf;
  });
}

/***/ }),

/***/ 97397:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
Object.defineProperty(exports, "PaperPrinter", ({
  enumerable: true,
  get: function get() {
    return _PaperPrinter["default"];
  }
}));
Object.defineProperty(exports, "PrintSerializer", ({
  enumerable: true,
  get: function get() {
    return _PrintSerializer["default"];
  }
}));
exports.ShareSerializer = void 0;
exports.downloadAsPDF = downloadAsPDF;
Object.defineProperty(exports, "mergePdfs", ({
  enumerable: true,
  get: function get() {
    return _pdf.mergePdfs;
  }
}));
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _PrintSerializer = _interopRequireDefault(__webpack_require__(40424));
var _PaperPrinter = _interopRequireDefault(__webpack_require__(40156));
var _FileSaver = __webpack_require__(53069);
var _pdf = __webpack_require__(38522);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var ShareSerializer = new _PrintSerializer["default"]();
exports.ShareSerializer = ShareSerializer;
/***
 *
 * @param elt
 * @param fileName
 * @param {function(processInfo):void=} onProcess
 * @returns {Promise<*>}
 */

/**
 * @type {((elt:AElement, fileName: string, onProcess: function(processInfo):void) => Promise ) & ((elt:AElement, opt: object, onProcess: function(processInfo):void) => Promise) }
 */
function downloadAsPDF(docList, arg2, onProcess) {
  var opt = {
    fileName: 'exports.pdf.js'
  };
  if (typeof arg2 === 'string') opt.fileName = arg2;else Object.assign(opt, arg2);
  var $ = _Dom["default"].ShareInstance.$;
  if (!(docList instanceof Array)) docList = [docList];
  docList = docList.map(function (doc) {
    if (typeof doc === "string") {
      return {
        elt: $(doc)
      };
    } else if ((0, _Dom.isDomNode)(doc)) {
      return {
        elt: $(doc)
      };
    } else if (_typeof(doc) === "object" && doc) {
      if (typeof doc.elt === "string") doc.elt = $(doc.elt);
      if (doc.elt && (0, _Dom.isDomNode)(doc.elt)) return doc;
    } else return null;
  }).filter(function (it) {
    return !!it;
  }).map(function (doc) {
    var elt = docList[0];
    if (elt.fmComponent) {
      if (!doc.opt) doc.opt = {};
      if (!doc.opt.margin) {
        doc.opt.margin = {
          top: elt.fmComponent.style.paddingTop || 57,
          left: elt.fmComponent.style.paddingLeft || 57,
          bottom: elt.fmComponent.style.paddingBottom || 57,
          right: elt.fmComponent.style.paddingRight || 57
        };
      }
    }
    return doc;
  });
  var serializer = ShareSerializer;
  opt.onProcess = typeof onProcess === "function" ? onProcess : function () {};
  var printer = new _PaperPrinter["default"](opt);
  return serializer.serialize(docList, printer, opt.onProcess).then(function (printer) {
    return printer.exportAsPDF();
  }).then(function (doc) {
    (0, _FileSaver.saveAs)(doc.output('blob'), opt.fileName);
  });
}

/***/ }),

/***/ 31647:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.SCCodeHighlightingGenerator = SCCodeHighlightingGenerator;
exports["default"] = void 0;
exports.generateSCCode = generateSCCode;
exports.generateSCHighlightPreviewCode = generateSCHighlightPreviewCode;
var _SCGrammar = _interopRequireDefault(__webpack_require__(43480));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @constructor
 */
function SCCodeGenerator() {}
SCCodeGenerator.prototype.accept = function (node) {
  if (!node) return '/*TODO*/';
  var visitor = this.visitors[node.type];
  if (visitor) {
    try {
      return this.visitors[node.type].apply(this, arguments);
    } catch (e) {
      console.error(e, node);
    }
  } else {
    return '[' + node.type + ']';
    // throw { message: 'Can not handle ', node: node };
  }
};

SCCodeGenerator.prototype.generate = function (ast) {
  return this.accept(ast);
};

/***
 *
 * @type {Object<string, function>}
 */
SCCodeGenerator.prototype.visitors = {
  Program: function Program(node) {
    var _this = this;
    return node.body.map(function (st) {
      return _this.accept(st);
    }).join('\n');
  },
  FunctionDeclaration: function FunctionDeclaration(node) {
    var _this2 = this;
    var bodyCode = this.accept(node.body);
    var argsCode = node.params.map(function (arg) {
      return _this2.accept(arg);
    }).join(', ');
    return "function ".concat(node.id.name, "(").concat(argsCode, ") ").concat(bodyCode);
  },
  ArgumentDeclaration: function ArgumentDeclaration(node) {
    var res = node.id.name;
    var typeText;
    if (node.typeAnnotation) typeText = this.accept(node.typeAnnotation);
    if (typeText && typeText !== 'any') res += ': ' + typeText;
    return res;
  },
  TypeAnnotation: function TypeAnnotation(node) {
    return this.accept(node.typeAnnotation);
  },
  GenericType: function GenericType(node) {
    var _this3 = this;
    var typeText = this.accept(node.id);
    if (node.typeParameters && node.typeParameters.length > 0) {
      typeText += '<';
      typeText += node.typeParameters.map(function (it) {
        return _this3.accept(it);
      }).join(', ');
      typeText += '>';
    }
    return typeText;
  },
  LinkedType: function LinkedType(node) {
    return 'linktype ' + this.accept(node.address);
  },
  Identifier: function Identifier(node) {
    return node.name;
  },
  VariableDeclarator: function VariableDeclarator(node) {
    var res = node.id.name;
    var typeText;
    if (node.typeAnnotation) typeText = this.accept(node.typeAnnotation);
    if (typeText && typeText !== 'any') res += ': ' + typeText;
    if (node.init) res += ' = ' + this.accept(node.init);
    res += ';';
    return res;
  },
  VariableDeclaration: function VariableDeclaration(node) {
    var _this4 = this;
    var res = 'var ';
    if (node.declarations) {
      res += node.declarations.map(function (arg) {
        return _this4.accept(arg);
      }).join(', ');
    } else {
      node = Object.assign({}, node);
      node.type = 'VariableDeclarator';
      res += this.accept(node); //adapter for old version
    }

    return res;
  },
  BlockStatement: function BlockStatement(node) {
    var _this5 = this;
    var bodyCode = node.body.map(function (it) {
      return _this5.accept(it);
    }).join('\n');
    if (bodyCode.length > 0) {
      bodyCode = bodyCode.split('\n').map(function (r) {
        return '    ' + r;
      }).join('\n');
    }
    return ['{', bodyCode, '}'].join('\n');
  },
  AssignStatement: function AssignStatement(node) {
    //@deprecated
    return this.accept(node.left) + ' = ' + this.accept(node.right) + ';';
  },
  AssignmentExpression: function AssignmentExpression(node) {
    return this.accept(node.left) + ' = ' + this.accept(node.right);
  },
  BooleanLiteral: function BooleanLiteral(node) {
    return node.value ? 'true' : 'false';
  },
  NullLiteral: function NullLiteral(node) {
    return "null";
  },
  NewExpression: function NewExpression(node) {
    var _this6 = this;
    var res = 'new ';
    if (node.callee.type === 'Identifier' || node.callee.type === 'MemberExpression') {
      res += this.accept(node.callee);
    } else {
      res += '(' + this.accept(node.callee) + ')';
    }
    res += '(';
    res += node.arguments.map(function (arg) {
      return _this6.accept(arg);
    }).join(', ');
    res += ')';
    return res;
  },
  CallExpression: function CallExpression(node) {
    var _this7 = this;
    var res = '';
    if (node.callee && (node.callee.type === 'Identifier' || node.callee.type === 'MemberExpression')) {
      res += this.accept(node.callee);
    } else {
      res += '(' + this.accept(node.callee) + ')';
    }
    res += '(';
    res += node.arguments.map(function (arg) {
      return _this7.accept(arg);
    }).join(', ');
    res += ')';
    return res;
  },
  MemberExpression: function MemberExpression(node) {
    var res = '';
    if (node.object.type === 'Identifier' || node.object.type === 'MemberExpression') {
      res += this.accept(node.object);
    } else {
      res += '(' + this.accept(node.object) + ')';
    }
    if (node.computed) {
      res += '[';
      res += this.accept(node.property);
      res += ']';
    } else {
      res += '.';
      res += this.accept(node.property);
    }
    return res;
  },
  IfStatement: function IfStatement(node) {
    var res = 'if (';
    res += this.accept(node.test);
    res += ') ';
    res += this.accept(node.consequent);
    if (node.alternate) {
      res += '\nelse ';
      res += this.accept(node.alternate);
    }
    return res;
  },
  WhileStatement: function WhileStatement(node) {
    var res = 'while (';
    res += this.accept(node.test);
    res += ') ';
    res += this.accept(node.body);
    return res;
  },
  ForCountStatement: function ForCountStatement(node) {
    var res = ['for', this.accept(node["for"]), 'from', this.accept(node.from), 'to', this.accept(node.to)].join(' ') + ' ';
    res += this.accept(node.body);
    return res;
  },
  ForOfStatement: function ForOfStatement(node) {
    var res = ['for', this.accept(node["for"]), 'of', this.accept(node.of)].join(' ') + ' ';
    res += this.accept(node.body);
    return res;
  },
  ForInStatement: function ForInStatement(node) {
    var res = ['for', this.accept(node["for"]), 'in', this.accept(node["in"])].join(' ') + ' ';
    res += this.accept(node.body);
    return res;
  },
  BreakStatement: function BreakStatement() {
    return 'break;';
  },
  ReturnStatement: function ReturnStatement(node) {
    if (node.argument) return 'return ' + this.accept(node.argument) + ';';
    return 'return;';
  },
  BinaryExpression: function BinaryExpression(node) {
    var callOrderOf = function callOrderOf(snode) {
      if (!snode) return 100;
      if (snode.type === 'BinaryExpression') {
        return Math.max(_SCGrammar["default"].operatorOrder[snode.operator.content], callOrderOf(snode.right), callOrderOf(snode.right));
      } else if (snode.type === 'UnaryExpression') return -1;else return -2;
    };
    var operatorContent = node.operator.content;
    var cOrder = _SCGrammar["default"].operatorOrder[operatorContent];
    var left = this.accept(node.left);
    var right = this.accept(node.right);
    var leftOrder = callOrderOf(node.left);
    var rightOrder = callOrderOf(node.right);
    if (leftOrder > cOrder) left = '(' + left + ')';
    if (rightOrder >= cOrder) right = '(' + right + ')';
    return [left, operatorContent, right].join(' ');
  },
  UnaryExpression: function UnaryExpression(node) {
    var res = node.operator.content;
    if (node.argument && node.argument.type === 'BinaryExpression') {
      res += '(' + this.accept(node.argument) + ')';
    } else {
      res += this.accept(node.argument);
    }
    return res;
  },
  ExpressionStatement: function ExpressionStatement(node) {
    return this.accept(node.expression) + ';';
  },
  NumericLiteral: function NumericLiteral(node) {
    if (typeof node.value === "number") return node.value.toString();
    return '0';
  },
  StringLiteral: function StringLiteral(node) {
    return JSON.stringify(node.value);
  },
  ArrayExpression: function ArrayExpression(node) {
    var _this8 = this;
    var res = '[';
    var elementTexts = node.elements.map(function (arg) {
      return _this8.accept(arg);
    });
    var needWrap = elementTexts.some(function (et) {
      return et.length > 60;
    });
    if (needWrap) {
      res += '\n';
      res += elementTexts.join(',\n').split('\n').map(function (t) {
        return '    ' + t;
      }).join('\n');
      res += '\n';
    } else {
      res += elementTexts.join(', ');
    }
    res += ']';
    return res;
  },
  ObjectProperty: function ObjectProperty(node) {
    return this.accept(node.key) + ': ' + this.accept(node.value);
  },
  ObjectExpression: function ObjectExpression(node) {
    var _this9 = this;
    var res = '{';
    var propertyTexts = node.properties.map(function (arg) {
      return _this9.accept(arg);
    });
    var needWrap = propertyTexts.some(function (et) {
      return et.length > 60;
    });
    if (needWrap) {
      res += '\n';
      res += propertyTexts.join(',\n').split('\n').map(function (t) {
        return '    ' + t;
      }).join('\n');
      res += '\n';
    } else {
      res += propertyTexts.join(', ');
    }
    res += '}';
    return res;
  },
  ConditionalExpression: function ConditionalExpression(node) {
    return [this.accept(node.test), '?', this.accept(node.consequent), ':', this.accept(node.alternate)].join(' ');
  }
};
var _default = SCCodeGenerator;
/***
 * @extends SCCodeGenerator
 * @constructor
 */
exports["default"] = _default;
function SCCodeHighlightingGenerator() {
  SCCodeGenerator.apply(this, arguments);
}
_OOP["default"].mixClass(SCCodeHighlightingGenerator, SCCodeGenerator);
SCCodeHighlightingGenerator.prototype.accept = function (node) {
  if (!node) return '/*TODO*/';
  var visitor = this.visitors[node.type];
  if (visitor) {
    try {
      return "<div class=\"sclang-node sclang-".concat(node.type).concat(node.error ? ' sclang-error' : '', "\"").concat(node.error ? 'title=' + JSON.stringify(node.error) : '', ">").concat(this.visitors[node.type].apply(this, arguments), "</div>");
    } catch (e) {
      console.error(e, node);
    }
  } else {
    return '[' + node.type + ']';
    // throw { message: 'Can not handle ', node: node };
  }
};

SCCodeHighlightingGenerator.prototype.visitors = Object.assign({}, SCCodeGenerator.prototype.visitors, {
  IfStatement: function IfStatement(node) {
    var res = '<span class="sclang-keyword">if</span> (';
    res += this.accept(node.test);
    res += ') ';
    res += this.accept(node.consequent);
    if (node.alternate) {
      res += '\n<span class="sclang-keyword">else</span> ';
      res += this.accept(node.alternate);
    }
    return res;
  },
  FunctionDeclaration: function FunctionDeclaration(node) {
    var _this10 = this;
    var bodyCode = this.accept(node.body);
    var argsCode = node.params.map(function (arg) {
      return _this10.accept(arg);
    }).join(', ');
    return "<span class=\"sclang-keyword\">function</span> ".concat(node.id.name, "(").concat(argsCode, ") ").concat(bodyCode);
  },
  ForStatement: function ForStatement(node) {},
  ForCountStatement: function ForCountStatement(node) {
    var res = ['<span class="sclang-keyword">for</span>', this.accept(node["for"]), '<span class="sclang-keyword">from</span>', this.accept(node.from), '<span class="sclang-keyword">to</span>', this.accept(node.to)].join(' ') + ' ';
    res += this.accept(node.body);
    return res;
  },
  ForOfStatement: function ForOfStatement(node) {
    var res = ['<span class="sclang-keyword">for</span>', this.accept(node["for"]), '<span class="sclang-keyword">of</span>', this.accept(node.of)].join(' ') + ' ';
    res += this.accept(node.body);
    return res;
  },
  ForInStatement: function ForInStatement(node) {
    var res = ['<span class="sclang-keyword">for</span>', this.accept(node["for"]), '<span class="sclang-keyword">in</span>', this.accept(node["in"])].join(' ') + ' ';
    res += this.accept(node.body);
    return res;
  },
  VariableDeclarator: function VariableDeclarator(node) {
    var res = node.id.name;
    var typeText;
    if (node.typeAnnotation) typeText = this.accept(node.typeAnnotation);
    if (typeText && typeText !== 'any') res += ': ' + typeText;
    if (node.init) res += ' = ' + this.accept(node.init);
    return res;
  },
  VariableDeclaration: function VariableDeclaration(node) {
    var _this11 = this;
    var res = '<span class="sclang-keyword">var</span> ';
    if (node.declarations) {
      res += node.declarations.map(function (arg) {
        return _this11.accept(arg);
      }).join(', ');
    } else {
      node = Object.assign({}, node);
      node.type = 'VariableDeclarator';
      res += this.accept(node); //adapter for old version
    }

    res += ';';
    return res;
  },
  LinkedType: function LinkedType(node) {
    return '<span class="sclang-keyword">linktype</span>&nbsp;' + this.accept(node.address);
  }
});
SCCodeHighlightingGenerator.prototype.generate = function (ast) {
  var text = this.accept(ast);
  return text.split('\n').map(function (text) {
    return text.replace(/^\s+/, function (full) {
      return "<span>".concat('&nbsp;'.repeat(full.length), "</span>");
    });
  }).join('<br>');
};
function generateSCCode(ast) {
  var generator = new SCCodeGenerator();
  return generator.generate(ast);
}
function generateSCHighlightPreviewCode(ast) {
  var generator = new SCCodeHighlightingGenerator();
  return generator.generate(ast);
}

/***/ }),

/***/ 87748:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.validateSCCode = validateSCCode;
var _SCParser = _interopRequireDefault(__webpack_require__(13682));
var _VarScope = _interopRequireDefault(__webpack_require__(61607));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * @typedef {Object} SCCodeValidationOption
 * @property {string} target - default: "program"
 * @variables {string[]} variables
 *
 */

/**
 *
 * @param {string} source
 * @param {SCCodeValidationOption} opt
 * @constructor
 */
function SCCodeValidation(source, opt) {
  this.source = source;
  this.opt = opt || {};
  this.error = null;
  this.parsed = null;
  this.usedGlobalVariables = [];
  this.glolbalScope = new _VarScope["default"]();
  this.topScope = new _VarScope["default"](this.glolbalScope);
  console.log(this.topScope);
  this.stack = [{
    scope: this.glolbalScope
  }, {
    scope: this.topScope
  }];
  this.execute();
}
SCCodeValidation.prototype.execute = function () {
  this.parsed = _SCParser["default"].parse(this.source, this.opt.target || 'program');
  this.calcErrorMessages();
  if (!this.parsed.error) {
    this.accept(this.parsed.ast);
    this.calcNameError();
  }
};
SCCodeValidation.prototype.accept = function (node) {
  var visitor = this.visitors[node.type];
  if (visitor) {
    return this.visitors[node.type].apply(this, arguments);
    // try {
    //
    // } catch (e) {
    //     console.error(e, node)
    // }
  } else {
    // throw this.makeError("NotHandle", 'Can not handle node type ' + node && node.type, node);
  }
};
SCCodeValidation.prototype.visitors = {
  Program: function Program(nd) {
    var i = 0;
    var statements = nd.body;
    while (i < statements.length) {
      this.accept(statements[i]);
      i++;
    }
  },
  BlockStatement: function BlockStatement(nd) {
    var i = 0;
    var statements = nd.body;
    while (i < statements.length) {
      this.accept(statements[i]);
      i++;
    }
  },
  ExpressionStatement: function ExpressionStatement(nd) {
    this.accept(nd.expression);
  },
  VariableDeclarator: function VariableDeclarator(nd) {
    var name = this.accept(nd.id);
    this.topScope.declare(name, null, true);
    if (nd.init) this.accept(nd.init, 'get_var');
  },
  VariableDeclaration: function VariableDeclaration(nd) {
    var _this = this;
    if (nd.declarations) nd.declarations.forEach(function (it) {
      _this.accept(it);
    });
  },
  ArrayExpression: function ArrayExpression(nd) {
    var _this2 = this;
    nd.elements.forEach(function (it) {
      _this2.accept(it);
    });
  },
  ForCountStatement: function ForCountStatement(nd) {
    this.accept(nd.from, 'get_var');
    this.accept(nd.to, 'get_var');
    this.accept(nd["for"], 'get_var');
    this.accept(nd.body);
  },
  WhileStatement: function WhileStatement(nd) {
    this.accept(nd.test, 'get_var');
    this.accept(nd.body);
  },
  DoWhileStatement: function DoWhileStatement(nd) {
    this.accept(nd.test, 'get_var');
    this.accept(nd.body);
  },
  ForOfStatement: function ForOfStatement(nd) {
    this.accept(nd["for"], 'get_var');
    this.accept(nd.of, 'get_var');
    this.accept(nd.body);
  },
  ForInStatement: function ForInStatement(nd) {
    this.accept(nd["for"], 'get_var');
    this.accept(nd["in"], 'get_var');
    this.accept(nd.body);
  },
  AssignmentExpression: function AssignmentExpression(nd) {
    this.accept(nd.left, 'get_var');
    this.accept(nd.right, 'get_var');
  },
  IfStatement: function IfStatement(nd) {
    this.accept(nd.test, 'get_var');
    this.accept(nd.consequent);
    if (nd.alternate) {
      this.accept(nd.alternate);
    }
  },
  ConditionalExpression: function ConditionalExpression(nd) {
    this.accept(nd.test, 'get_var');
    this.accept(nd.consequent);
    this.accept(nd.alternate);
  },
  BinaryExpression: function BinaryExpression(nd) {
    this.accept(nd.left, 'get_var');
    this.accept(nd.right, 'get_var');
  },
  UnaryExpression: function UnaryExpression(nd) {
    this.accept(nd.argument, 'get_var');
  },
  CallExpression: function CallExpression(nd) {
    var _this3 = this;
    this.accept(nd.callee, 'get_var');
    nd.arguments.forEach(function (it) {
      _this3.accept(it, 'get_var');
    });
  },
  FunctionDeclaration: function FunctionDeclaration(nd) {},
  NewExpression: function NewExpression(nd) {
    var _this4 = this;
    this.accept(nd.callee, 'get_var');
    nd.arguments.forEach(function (it) {
      _this4.accept(it, 'get_var');
    });
  },
  ObjectProperty: function ObjectProperty(nd) {
    this.accept(nd.value, 'get_var');
  },
  ObjectExpression: function ObjectExpression(nd) {
    var _this5 = this;
    nd.properties.forEach(function (it) {
      _this5.accept(it, 'get_var');
    });
  },
  /**
   * @this {SCCodeValidation}
   * @param nd
   */
  MemberExpression: function MemberExpression(nd) {
    this.accept(nd.object, 'get_var');
    if (nd.computed) {
      this.accept(nd.property, 'get_var');
    }
  },
  ReturnStatement: function ReturnStatement(nd) {
    this.accept(nd.argument, 'get_var');
  },
  Identifier: function Identifier(nd, type) {
    var name = nd.name;
    var scope;
    if (type === 'get_var') {
      scope = this.topScope.findScope(name);
      if (!scope) {
        this.glolbalScope.declare(name, null, true);
      }
    }
    return name;
  }
};
SCCodeValidation.prototype.calcErrorMessages = function () {
  var rawError = this.parsed.error;
  var ist = this.parsed;
  var rows;
  var errorText = '';
  var error = ist.error;
  var token, charIdx, rowIdx;
  if (rawError) {
    rows = this.source.split('\n');
    switch (error.type) {
      case 'unexpected':
        errorText = "<span style=\"color:red;\">".concat(error.message, "</span>");
        token = ist.tokens[error.tokenIdx];
        charIdx = token.start;
        rowIdx = 0;
        while (rowIdx < rows.length) {
          if (charIdx <= rows[rowIdx].length) {
            errorText = "<strong>Line ".concat(rowIdx + 1, ":</strong> ") + errorText;
            errorText += '<br>';
            errorText += "<div style=\"color:blue; white-space: pre-wrap; font-family: Consolas, serif;\">".concat(rows[rowIdx], "</div>");
            errorText += "<div style=\" --text-color:red; white-space: pre-wrap; font-family: Consolas, serif;\" class=\"as-blink-text\">".concat(' '.repeat(charIdx), "^</div>");
            break;
          }
          charIdx -= rows[rowIdx].length + 1; //by \n
          rowIdx++;
        }
        break;
      default:
        errorText = "<span style=\"color:red\">".concat(error.message, "</span>");
        break;
    }
    this.error = {
      type: 'syntax',
      message: rawError.message,
      htmlMessage: errorText
    };
  }
};
SCCodeValidation.prototype.calcNameError = function () {
  var variables = this.opt.variables || [];
  var variableDict = variables.reduce(function (ac, cr) {
    ac[cr] = true;
    return ac;
  }, {});
  var undefinedVariables = Object.keys(this.glolbalScope.data).filter(function (name) {
    return !variableDict[name];
  });
  if (undefinedVariables.length > 0) {
    this.error = {
      type: 'name',
      message: 'Undefined variables: ' + undefinedVariables.join(', '),
      htmlMessage: "<span style=\"color:red;\">Undefined variables: ".concat(undefinedVariables.join(', '), "</span>")
    };
  }
};
var _default = SCCodeValidation;
exports["default"] = _default;
function validateSCCode(code, opt) {
  return new SCCodeValidation(code, opt);
}
/*
var d = absol.sclang.validateSCCode(`
var name = nd.name;
        var scope;
        var a;
        a = b;
        var m = {a: a, b: b, d: d};
        if (type === 'get_var') {
        x = y;
            scope = this.topScope.findScope(nd.object);
            if (!scope) {
                this.glolbalScope.declare(name, null, true);
            }
        }
        z = Math.max(x,y, scope[a]);
        return name;`, {variables: ['Math', 'Date', 'x','this']});


if (d.error) {
console.log(d.error);
    var div = document.createElement('div');

    setTimeout(() => {
        document.body.appendChild(div);
        div.innerHTML = d.error.htmlMessage;
    }, 100)
}

*/

/***/ }),

/***/ 53018:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
exports.evalSCExpression = evalSCExpression;
var _SCParser = _interopRequireDefault(__webpack_require__(13682));
var _SCProgramInstance = _interopRequireDefault(__webpack_require__(47790));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var SCExpressionCaller = _SCProgramInstance["default"];
var _default = SCExpressionCaller;
exports["default"] = _default;
function evalSCExpression(code, env) {
  var parsed = _SCParser["default"].parse(code, 'exp');
  var caller;
  if (parsed.ast) {
    caller = new _SCProgramInstance["default"](parsed.ast, env);
    return caller.exec();
  } else {
    throw parsed.error;
  }
}

/***/ }),

/***/ 43480:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _DPParseInstance = __webpack_require__(36093);
/*********************************
 * EXPRESSION
 */
var operatorOrder = {
  'NOT': 4,
  '!': 4,
  '*': 5,
  '/': 5,
  'MOD': 5,
  '%': 5,
  '+': 6,
  '-': 6,
  '<': 9,
  '>': 9,
  '<=': 9,
  '>=': 9,
  '==': 9,
  '===': 9,
  '!=': 9,
  'AND': 14,
  '&&': 14,
  'OR': 15,
  '||': 15,
  'XOR': 15
};
var elementRegexes = [['string', /("(?:[^"\\]|\\.)*?")|('(?:[^'\\]|\\.)*?')/], ['number', /(\d+([.]\d*)?([eE][+-]?\d+)?|[.]\d+([eE][+-]?\d+)?)/], ['word', /[_a-zA-Z][_a-zA-Z0-9]*/], ['skip', /([\s\r\n]+)|(\/\/[^\n]*)|(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)/], ['tsymbol', /(\.\.\.)|(===)/], ['dsymbol', /\+\+|--|==|!=|<=|>=|\|\||&&/], ['symbol', /[^\s_a-zA-Z0-9]/]];
var rules = [];
rules.push({
  target: 'null',
  elements: ['_null'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'NullLiteral'
    };
  }
});
rules.push({
  target: 'ident',
  elements: ['.word'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'Identifier',
      name: parsedNode.children[0].content
    };
  }
});
rules.push({
  target: 'args_list',
  elements: ['exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  },
  toASTChain: function toASTChain(parsedNode) {
    return [(0, _DPParseInstance.parsedNodeToAST)(parsedNode)];
  }
});
rules.push({
  target: 'args_list',
  elements: ['args_list', '_,', 'exp'],
  longestOnly: true,
  ident: 'args_list_rec',
  toASTChain: function toASTChain(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[0]).concat((0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2]));
  }
});
rules.push({
  target: 'function_callee',
  elements: ['ident'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'function_callee',
  elements: ['mem_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'function_call',
  elements: ['function_callee', '_(', 'args_list', '_)'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'CallExpression',
      arguments: parsedNode.children[2].rule.toASTChain(parsedNode.children[2]),
      callee: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])
    };
  }
});
rules.push({
  target: 'function_call',
  elements: ['function_callee', '_(', '_)'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'CallExpression',
      arguments: [],
      callee: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])
    };
  }
});
rules.push({
  target: 'new_expression',
  elements: ['_new', 'function_call'],
  toAST: function toAST(parsedNode) {
    var callAst = (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]);
    return {
      type: 'NewExpression',
      arguments: callAst.arguments,
      callee: callAst.callee
    };
  }
});
rules.push({
  target: 'exp',
  elements: ['new_expression'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'exp',
  elements: ['null'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'exp',
  elements: ['ident'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'number',
  elements: ['.number'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'NumericLiteral',
      value: parseFloat(parsedNode.children[0].content)
    };
  }
});
rules.push({
  target: 'string',
  elements: ['.string'],
  toAST: function toAST(parsedNode) {
    var content = parsedNode.children[0].content;
    if (content[0] === "'") content = '"' + content.substring(1, content.length - 1).replace(/["]/g, '\\"') + '"';
    return {
      type: 'StringLiteral',
      value: JSON.parse(content)
    };
  }
});
rules.push({
  target: 'boolean',
  elements: ['_true'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'BooleanLiteral',
      value: true
    };
  }
});
rules.push({
  target: 'boolean',
  elements: ['_false'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'BooleanLiteral',
      value: false
    };
  }
});
rules.push({
  target: 'exp',
  elements: ['number'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'exp',
  elements: ['string'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'exp',
  elements: ['boolean'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
['+', '-', '*', '/', '%', '&&', '||', 'XOR', '==', '===', '!=', '<', '>', '>=', '<='].forEach(function (op) {
  rules.push({
    target: 'bin_op',
    elements: ['_' + op],
    toAST: function toAST(parsedNode) {
      return {
        type: "BinaryOperator",
        content: op
      };
    }
  });
});
rules.push({
  target: 'exp',
  elements: ['exp', 'bin_op', 'exp'],
  // longestOnly: true,//* error when parse return (...)...
  ident: 'bin_op_rec',
  toASTChain: function toASTChain(parseNode) {
    var res = [];
    if (parseNode.children[0].rule === this) {
      res = res.concat(this.toASTChain(parseNode.children[0]));
    } else {
      res.push((0, _DPParseInstance.parsedNodeToAST)(parseNode.children[0]));
    }
    res.push(parseNode.children[1].children[0]);
    if (parseNode.children[2].rule === this) {
      res = res.concat(this.toASTChain(parseNode.children[2]));
    } else {
      res.push((0, _DPParseInstance.parsedNodeToAST)(parseNode.children[2]));
    }
    return res;
  },
  toAST: function toAST(parsedNode) {
    var chain = this.toASTChain(parsedNode);
    var stack = [];
    var item;
    var newNode;
    while (chain.length > 0) {
      item = chain.shift();
      if (item.content in operatorOrder) {
        while (stack.length >= 3 && operatorOrder[stack[stack.length - 2].content] <= operatorOrder[item.content]) {
          newNode = {
            type: 'BinaryExpression'
          };
          newNode.right = stack.pop();
          newNode.operator = stack.pop();
          newNode.left = stack.pop();
          stack.push(newNode);
        }
      }
      stack.push(item);
    }
    while (stack.length >= 3) {
      newNode = {
        type: 'BinaryExpression'
      };
      newNode.right = stack.pop();
      newNode.operator = stack.pop();
      newNode.left = stack.pop();
      stack.push(newNode);
    }
    return stack.pop();
  }
});
rules.push({
  target: 'condition_exp',
  elements: ['exp', '_?', 'exp', '_:', 'exp'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ConditionalExpression',
      test: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      consequent: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2]),
      alternate: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[4])
    };
  }
});
rules.push({
  target: 'sequence_exp',
  elements: ['exp', '_,', 'exp'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'SequenceExpression',
      expressions: [(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]), (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])]
    };
  }
});
rules.push({
  target: 'sequence_exp',
  elements: ['sequence_exp', '_,', 'exp'],
  toAST: function toAST(parsedNode) {
    var ast = (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
    ast.expressions.push((0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2]));
    return ast;
  }
});
rules.push({
  target: 'exp',
  elements: ['condition_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'exp',
  elements: ['function_call'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'bracket_group',
  elements: ['_(', 'exp', '_)'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]);
  }
});
rules.push({
  target: 'exp',
  elements: ['bracket_group'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});

// rules.push({
//     target: 'exp',
//     elements: ['_(', 'exp', '_)'],
//     toAST: function (parsedNode) {
//         return parsedNodeToAST(parsedNode.children[1]);
//     }
// });

['+', '-', '!'].forEach(function (op) {
  ['number', 'bracket_group', 'ident', 'function_call', 'mem_exp', 'unary_exp'].forEach(function (arg) {
    rules.push({
      target: 'unary_exp',
      elements: ['_' + op, arg],
      toAST: function toAST(parsedNode) {
        return {
          type: 'UnaryExpression',
          argument: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]),
          operator: {
            type: 'UnaryOperator',
            content: op
          }
        };
      }
    });
  });
});
rules.push({
  target: 'exp',
  elements: ['unary_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['ident', '_.', 'ident'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: false,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['ident', '_[', 'exp', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: true,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['new_expression', '_.', 'ident'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: false,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['new_expression', '_[', 'exp', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: true,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['mem_exp', '_.', 'ident'],
  longestOnly: true,
  ident: 'mem_exp_ident_rev',
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: false,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['mem_exp', '_[', 'exp', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: true,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['bracket_group', '_.', 'ident'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: false,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'mem_exp',
  elements: ['bracket_group', '_[', 'exp', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "MemberExpression",
      computed: true,
      object: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      property: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'exp',
  elements: ['mem_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'object_exp',
  elements: ['_{', '_}'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ObjectExpression',
      properties: []
    };
  }
});
rules.push({
  target: 'object_exp',
  elements: ['_{', 'object_property_list', '_}'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ObjectExpression',
      properties: (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[1])
    };
  }
});
rules.push({
  target: 'exp',
  elements: ['object_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'object_property',
  elements: ['ident', '_:', 'exp'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ObjectProperty',
      key: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      value: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'object_property',
  elements: ['string', '_:', 'exp'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ObjectProperty',
      key: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      value: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'object_property_list',
  elements: ['object_property'],
  toASTChain: function toASTChain(parsedNode) {
    return [(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])];
  }
});
rules.push({
  target: 'object_property_list',
  elements: ['object_property_list', '_,', 'object_property'],
  longestOnly: true,
  ident: 'object_property_list_rec',
  toASTChain: function toASTChain(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[0]).concat([(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])]);
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'exp',
  elements: ['array_exp'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'array_exp',
  elements: ['_[', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "ArrayExpression",
      elements: []
    };
  }
});
rules.push({
  target: 'array_exp',
  elements: ['_[', 'array_item_list', '_]'],
  toAST: function toAST(parsedNode) {
    return {
      type: "ArrayExpression",
      elements: (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[1])
    };
  }
});
rules.push({
  target: 'array_item_list',
  elements: ['exp'],
  toASTChain: function toASTChain(parsedNode) {
    return [(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])];
  }
});
rules.push({
  target: 'array_item_list',
  elements: ['array_item_list', '_,', 'exp'],
  longestOnly: true,
  ident: 'array_item_list_rec',
  toASTChain: function toASTChain(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[0]).concat([(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])]);
  }
});

/**********************************************************************************************************************/
/**************FOR QUICK PARSING***********************/

rules.push({
  target: 'exp',
  elements: ['.constance'],
  toAST: function toAST(parsedNode) {
    return parsedNode.children[0];
  },
  toASTChain: function toASTChain(parsedNode) {
    return [parsedNode.children[0]];
  }
});

/***********************************************************************************************************************/

rules.push({
  target: 'generic_type',
  elements: ['ident'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'GenericType',
      id: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])
    };
  }
});
rules.push({
  target: 'linked_type',
  elements: ['_linktype', 'exp'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'LinkedType',
      address: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1])
    };
  }
});
rules.push({
  target: 'var_type',
  elements: ['generic_type'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'var_type',
  elements: ['linked_type'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});

/*
rules.push({
    target: 'var_type',
    elements: ['ident', '<', 'var_type', '>']
});

rules.push({
    target: 'var_type',
    elements: ['ident', '<', '.string', '>']
});
*/

rules.push({
  target: 'type_annotation',
  elements: ['_:', 'var_type'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'TypeAnnotation',
      typeAnnotation: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1])
    };
  }
});

/**********************************************************************************************************************/
/*
@decrepted ast
rules.push({
    target: 'variable_declaration',
    elements: ['_var', 'ident', 'type_annotation', '_;'],
    toAST: function (parsedNode) {
        return {
            type: 'VariableDeclaration',
            id: parsedNodeToAST(parsedNode.children[1]),
            typeAnnotation: parsedNodeToAST(parsedNode.children[2])
        }
    }
});

rules.push({
    target: 'variable_declaration',
    elements: ['_var', 'ident', '_;'],
    toAST: function (parsedNode) {
        return {
            type: 'VariableDeclaration',
            id: parsedNodeToAST(parsedNode.children[1]),
        }
    }
});

rules.push({
    target: 'variable_declaration',
    elements: ['_var', 'ident', '_=', 'exp', '_;'],
    toAST: function (parsedNode) {
        return {
            type: 'VariableDeclaration',
            id: parsedNodeToAST(parsedNode.children[1]),
            init: parsedNodeToAST(parsedNode.children[3])
        }
    }
});

rules.push({
    target: 'variable_declaration',
    elements: ['_var', 'ident', 'type_annotation', '_=', 'exp', '_;'],
    toAST: function (parsedNode) {
        return {
            type: 'VariableDeclaration',
            id: parsedNodeToAST(parsedNode.children[1]),
            typeAnnotation: parsedNodeToAST(parsedNode.children[2]),
            init: parsedNodeToAST(parsedNode.children[4]),
            kind: 'var'
        }

    }
});
*/

rules.push({
  target: 'variable_declarator',
  elements: ['ident', '_=', 'exp'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'VariableDeclarator',
      id: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      init: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'variable_declarator',
  elements: ['ident', 'type_annotation', '_=', 'exp'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'VariableDeclarator',
      id: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      typeAnnotation: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]),
      init: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[3])
    };
  }
});
rules.push({
  target: 'variable_declarator',
  elements: ['ident'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'VariableDeclarator',
      id: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      init: null
    };
  }
});
rules.push({
  target: 'variable_declarator',
  elements: ['ident', 'type_annotation'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'VariableDeclarator',
      id: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      typeAnnotation: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]),
      init: null
    };
  }
});
rules.push({
  target: 'variable_declarator_sequence',
  elements: ['variable_declarator'],
  toASTChain: function toASTChain(parsedNode) {
    return [(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])];
  }
});
rules.push({
  target: 'variable_declarator_sequence',
  elements: ['variable_declarator_sequence', '_,', 'variable_declarator'],
  toASTChain: function toASTChain(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[0]).concat([(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])]);
  }
});
rules.push({
  target: 'variable_declaration',
  elements: ['_var', 'variable_declarator_sequence', '_;'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'VariableDeclaration',
      declarations: (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[1]),
      kind: 'var'
    };
  }
});

//todo
rules.push({
  target: 'expression_statement',
  elements: ['function_call', '_;'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ExpressionStatement',
      expression: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])
    };
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'assign_expression',
  elements: ['ident', '_=', 'exp'],
  toAST: function toAST(parseNode) {
    return {
      type: 'AssignmentExpression',
      left: (0, _DPParseInstance.parsedNodeToAST)(parseNode.children[0]),
      right: (0, _DPParseInstance.parsedNodeToAST)(parseNode.children[2])
    };
  }
});
rules.push({
  target: 'assign_expression',
  elements: ['mem_exp', '_=', 'exp'],
  toAST: function toAST(parseNode) {
    return {
      type: 'AssignmentExpression',
      left: (0, _DPParseInstance.parsedNodeToAST)(parseNode.children[0]),
      right: (0, _DPParseInstance.parsedNodeToAST)(parseNode.children[2])
    };
  }
});
rules.push({
  target: 'expression_statement',
  elements: ['assign_expression', '_;'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ExpressionStatement',
      expression: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])
    };
  }
});

/**********************************************************************************************************************/
rules.push({
  target: 'if_statement_1',
  elements: ['_if', '_(', 'exp', '_)', 'statement'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'IfStatement',
      test: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2]),
      consequent: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[4])
    };
  }
});
rules.push({
  target: 'if_statement_2',
  elements: ['if_statement_1', '_else', 'statement'],
  toAST: function toAST(parsedNode) {
    var ast = (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
    ast.alternate = (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2]);
    return ast;
  }
});
rules.push({
  target: 'statement',
  elements: ['if_statement_1'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'statement',
  elements: ['if_statement_2'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'for_count_statement',
  elements: ['_for', 'ident', '_from', 'exp', '_to', 'exp', 'block_statement'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ForCountStatement',
      "for": (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]),
      from: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[3]),
      to: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[5]),
      body: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[6])
    };
  }
});
rules.push({
  target: 'for_of_statement',
  elements: ['_for', 'ident', '_of', 'exp', 'block_statement'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ForOfStatement',
      "for": (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]),
      of: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[3]),
      body: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[4])
    };
  }
});
rules.push({
  target: 'for_in_statement',
  elements: ['_for', 'ident', '_in', 'exp', 'block_statement'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'ForInStatement',
      "for": (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]),
      "in": (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[3]),
      body: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[4])
    };
  }
});
rules.push({
  target: 'iterable_range',
  elements: ['iterable_range_limit', '_...', 'iterable_range_limit']
});
rules.push({
  target: 'iterable_range_limit',
  elements: ['.number']
});
rules.push({
  target: 'iterable_range_limit',
  elements: ['ident']
});
/**************************************************************************************/
rules.push({
  target: 'for_statement',
  elements: ['_for', 'bracket_group', 'statement']
});

/**********************************************************************************************************************/

rules.push({
  target: 'while_statement',
  elements: ['_while', 'bracket_group', 'statement'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'WhileStatement',
      test: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]),
      body: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])
    };
  }
});
rules.push({
  target: 'statement',
  elements: ['while_statement'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'do_while_statement',
  elements: ['_do', 'statement', '_while', 'bracket_group', '_;'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'DoWhileStatement',
      test: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[3]),
      body: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1])
    };
  }
});
rules.push({
  target: 'statement',
  elements: ['do_while_statement'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'break_statement',
  elements: ['_break', '_;'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'BreakStatement'
    };
  }
});
rules.push({
  target: 'statement',
  elements: ['break_statement'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'block_statement',
  elements: ['_{', '_}'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'BlockStatement',
      body: []
    };
  }
});
rules.push({
  target: 'block_statement',
  elements: ['_{', 'statement_arr', '_}'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'BlockStatement',
      body: (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[1])
    };
  }
});
rules.push({
  target: 'statement',
  elements: ['variable_declaration'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'statement',
  elements: ['block_statement'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'statement',
  elements: ['expression_statement'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'statement',
  elements: ['for_count_statement'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'statement',
  elements: ['for_in_statement'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'statement',
  elements: ['for_of_statement'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'statement',
  elements: ['assign_statement'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'statement_arr',
  elements: ['statement'],
  toASTChain: function toASTChain(parsedNode) {
    return [(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])];
  }
});
rules.push({
  target: 'statement_arr',
  elements: ['statement_arr', 'statement'],
  longestOnly: true,
  toASTChain: function toASTChain(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[0]).concat([(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1])]);
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'function_arguments_declaration',
  elements: ['_(', '_)'],
  toASTChain: function toASTChain(parsedNode) {
    return [];
  }
});
rules.push({
  target: 'function_arguments_declaration',
  elements: ['_(', 'argument_declaration_list', '_)'],
  toASTChain: function toASTChain(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[1]);
  }
});
rules.push({
  target: 'argument_declaration',
  elements: ['ident', 'type_annotation'],
  toAST: function toAST(parsedNode) {
    return {
      type: "ArgumentDeclaration",
      id: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]),
      typeAnnotation: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1])
    };
  }
});
rules.push({
  target: 'argument_declaration',
  elements: ['ident'],
  toAST: function toAST(parsedNode) {
    return {
      type: "ArgumentDeclaration",
      id: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])
    };
  }
});
rules.push({
  target: 'argument_declaration_list',
  elements: ['argument_declaration'],
  toASTChain: function toASTChain(parsedNode) {
    return [(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0])];
  }
});
rules.push({
  target: 'argument_declaration_list',
  elements: ['argument_declaration_list', '_,', 'argument_declaration'],
  toASTChain: function toASTChain(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[0]).concat([(0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[2])]);
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'return_statement',
  elements: ['_return', 'exp', '_;'],
  toAST: function toAST(parsedNode) {
    return {
      type: "ReturnStatement",
      argument: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1])
    };
  }
});
rules.push({
  target: 'return_statement',
  elements: ['_return', '_;'],
  toAST: function toAST(parsedNode) {
    return {
      type: "ReturnStatement"
    };
  }
});
rules.push({
  target: 'statement',
  elements: ['return_statement'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});

/**********************************************************************************************************************/

rules.push({
  target: 'function_declare',
  elements: ['_function', 'ident', 'function_arguments_declaration', 'type_annotation', 'block_statement'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'FunctionDeclaration',
      id: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]),
      params: (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[2]),
      returnType: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[3]),
      body: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[4])
    };
  }
});
rules.push({
  target: 'function_declare',
  elements: ['_function', 'ident', 'function_arguments_declaration', 'block_statement'],
  toAST: function toAST(parsedNode) {
    return {
      type: 'FunctionDeclaration',
      id: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[1]),
      params: (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[2]),
      body: (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[3])
    };
  }
});
rules.push({
  target: 'statement',
  elements: ['function_declare'],
  toAST: function toAST(parsedNode) {
    return (0, _DPParseInstance.parsedNodeToAST)(parsedNode.children[0]);
  }
});
rules.push({
  target: 'program',
  elements: ['statement_arr'],
  toAST: function toAST(parsedNode) {
    return {
      type: "Program",
      body: (0, _DPParseInstance.parsedNodeToASTChain)(parsedNode.children[0])
    };
  }
});
var _default = {
  elementRegexes: elementRegexes,
  rules: rules,
  operatorOrder: operatorOrder
};
exports["default"] = _default;

/***/ }),

/***/ 68717:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.OperatorExecutor = OperatorExecutor;
exports["default"] = void 0;
function OperatorExecutor() {
  this.oFXYs = {};
  this.oFXs = {};
}

/***
 *
 * @param {string} operator
 * @param {function(x, y, next: function):void} fxy
 */
OperatorExecutor.prototype.addBinaryOperator = function (operator, fxy) {
  if (!this.oFXYs[operator]) this.oFXYs[operator] = [];
  this.oFXYs[operator].unshift(fxy);
};

/***
 *
 * @param {string} operator
 * @param {function(x,  next: function):void} fx
 */
OperatorExecutor.prototype.addUnaryOperator = function (operator, fx) {
  if (!this.oFXs[operator]) this.oFXs[operator] = [];
  this.oFXs[operator].unshift(fx);
};
OperatorExecutor.prototype.executeBinaryOperator = function (operator, x, y) {
  var fXYs = this.oFXYs[operator];
  var i, _next;
  if (fXYs) {
    i = -1;
    _next = function next() {
      ++i;
      if (i >= fXYs.length) throw {
        message: 'Could not match any function for operator' + operator,
        x: x,
        y: y
      };
      return fXYs[i](x, y, _next);
    };
    return _next();
  } else {
    throw {
      message: 'Could not find operate: ' + operator
    };
  }
};
OperatorExecutor.prototype.executeUnaryOperator = function (operator, x) {
  var fXs = this.oFXs[operator];
  var i, _next2;
  if (fXs) {
    i = -1;
    _next2 = function next() {
      ++i;
      if (i >= fXs.length) throw {
        message: 'Could not match any function for operator' + operator,
        x: x
      };
      return fXs[i](x, _next2);
    };
    return _next2();
  } else {
    throw {
      message: 'Could not find operate: ' + operator
    };
  }
};

/***
 * @type {OperatorExecutor}
 */
var SCOperatorExecutor = new OperatorExecutor();
var _default = SCOperatorExecutor;
exports["default"] = _default;

/***/ }),

/***/ 29800:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ADD = ADD;
exports.AND = AND;
exports.DIV = DIV;
exports.EQUAL = EQUAL;
exports.EXTRACT_EQUAL = EXTRACT_EQUAL;
exports.LESS_AND_EQUAL = LESS_AND_EQUAL;
exports.LESS_THAN = LESS_THAN;
exports.MOD = MOD;
exports.MORE_AND_EQUAL = MORE_AND_EQUAL;
exports.MORE_THAN = MORE_THAN;
exports.MUL = MUL;
exports.NEGATIVE = NEGATIVE;
exports.NOT = NOT;
exports.NOT_EQUAL = NOT_EQUAL;
exports.OR = OR;
exports.POSITIVE = POSITIVE;
exports.SUB = SUB;
var _datetime = __webpack_require__(58286);
var _SCOperatorExecutor = _interopRequireDefault(__webpack_require__(68717));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
function ADD(a, b) {
  var type_a = _typeof(a);
  var type_b = _typeof(b);
  if (type_a === "number") {
    if (type_b === "number" || type_b === 'string') return a + b;
  }
  if (type_a === "undefined" && type_b === "undefined") return undefined;
  if (type_a === 'string') {
    if (type_b === "string") return a + b;
    if (b instanceof Date) return a + (0, _datetime.formatDateTime)(b, 'dd/MM/yyyy');
    if (type_b === "number") return a + b;
  }
  if (a instanceof Date) {
    if (type_b === 'number') {
      return new Date(a.getTime() + _datetime.MILLIS_PER_DAY * b);
    } else if (type_b === 'string') {
      return (0, _datetime.formatDateTime)(a, 'dd/MM/yyyy') + b;
    }
  }
  if (a.add && a.constructor === b.constructor) return a.add(b);
  console.error("Can not add: ", a, b);
  return NaN;
}
_SCOperatorExecutor["default"].addBinaryOperator('+', ADD);
function SUB(a, b) {
  var type_a = _typeof(a);
  var type_b = _typeof(b);
  if (type_a === "number" && type_b === "number") {
    return a - b;
  }
  if (type_a === "undefined" && type_b === "undefined") return undefined;
  if (a instanceof Date) {
    if (type_b === 'number') {
      return new Date(a.getTime() - _datetime.MILLIS_PER_DAY * b);
    }
  }
  if (a.sub && a.constructor === b.constructor) return a.sub(b);
  console.error("Can not sub: ", a, b);
  return NaN;
}
_SCOperatorExecutor["default"].addBinaryOperator('-', SUB);
function MUL(a, b) {
  var type_a = _typeof(a);
  var type_b = _typeof(b);
  if (type_a === "number" && type_b === "number") {
    return a * b;
  }
  if (type_a === "undefined" && type_b === "undefined") return undefined;
  if (type_a === "string" && type_b === "number") {
    return a.repeat(b);
  }
  console.error("Can not mul: ", a, b);
  return NaN;
}
_SCOperatorExecutor["default"].addBinaryOperator('*', MUL);
function DIV(a, b) {
  var type_a = _typeof(a);
  var type_b = _typeof(b);
  if (type_a === "number" && type_b === "number") {
    return a / b;
  }
  if (type_a === "undefined" && type_b === "undefined") return undefined;
  console.error("Can not div: ", a, b);
  return NaN;
}
_SCOperatorExecutor["default"].addBinaryOperator('/', DIV);
function MOD(x, m) {
  return x % m;
}
_SCOperatorExecutor["default"].addBinaryOperator('%', MOD);
function NEGATIVE(x) {
  return -x;
}
_SCOperatorExecutor["default"].addUnaryOperator('-', NEGATIVE);
function POSITIVE(x) {
  return x;
}
_SCOperatorExecutor["default"].addUnaryOperator('+', POSITIVE);
function NOT(x) {
  return !x;
}
_SCOperatorExecutor["default"].addUnaryOperator('!', NOT);
function LESS_THAN(a, b) {
  if (a instanceof Date) a = a.getTime();
  if (b instanceof Date) b = b.getTime();
  return a < b;
}
_SCOperatorExecutor["default"].addBinaryOperator('<', LESS_THAN);
function MORE_THAN(a, b) {
  if (a instanceof Date) a = a.getTime();
  if (b instanceof Date) b = b.getTime();
  return a > b;
}
_SCOperatorExecutor["default"].addBinaryOperator('>', MORE_THAN);
function EQUAL(a, b) {
  if (a instanceof Date) a = a.getTime();
  if (b instanceof Date) b = b.getTime();
  return a == b;
}
_SCOperatorExecutor["default"].addBinaryOperator('==', EQUAL);
function EXTRACT_EQUAL(a, b) {
  if (a instanceof Date) a = a.getTime();
  if (b instanceof Date) b = b.getTime();
  return a === b;
}
_SCOperatorExecutor["default"].addBinaryOperator('===', EXTRACT_EQUAL);
function LESS_AND_EQUAL(a, b) {
  if (a instanceof Date) a = a.getTime();
  if (b instanceof Date) b = b.getTime();
  return a <= b;
}
_SCOperatorExecutor["default"].addBinaryOperator('<=', LESS_AND_EQUAL);
function MORE_AND_EQUAL(a, b) {
  if (a instanceof Date) a = a.getTime();
  if (b instanceof Date) b = b.getTime();
  return a >= b;
}
_SCOperatorExecutor["default"].addBinaryOperator('>=', MORE_AND_EQUAL);
function NOT_EQUAL(a, b) {
  if (a instanceof Date) a = a.getTime();
  if (b instanceof Date) b = b.getTime();
  return a != b;
}
_SCOperatorExecutor["default"].addBinaryOperator('!=', NOT_EQUAL);
function AND(a, b) {
  return a && b;
}
_SCOperatorExecutor["default"].addBinaryOperator('&&', AND);
function OR(a, b) {
  return a || b;
}
_SCOperatorExecutor["default"].addBinaryOperator('||', OR);

/***/ }),

/***/ 13682:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _DPParser = _interopRequireDefault(__webpack_require__(7679));
var _SCGrammar = _interopRequireDefault(__webpack_require__(43480));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 * @type {DPParser}
 */
var SCParser = new _DPParser["default"](_SCGrammar["default"]);
var _default = SCParser;
exports["default"] = _default;

/***/ }),

/***/ 47790:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = exports.SCStaticLibScope = exports.SCDynamicLibScope = void 0;
__webpack_require__(29800);
var _SCOperatorExecutor = _interopRequireDefault(__webpack_require__(68717));
var _SCScope = _interopRequireDefault(__webpack_require__(55830));
var _stringGenerate = __webpack_require__(10713);
var _SCCodeGenerator = __webpack_require__(31647);
var _ext2MineType = _interopRequireDefault(__webpack_require__(13578));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var SCStaticLibScope = new _SCScope["default"]();
exports.SCStaticLibScope = SCStaticLibScope;
var SCDynamicLibScope = new _SCScope["default"](SCStaticLibScope);
exports.SCDynamicLibScope = SCDynamicLibScope;
function SCProgramInstance(ast, env) {
  var _this = this;
  env = env || {};
  if (env instanceof _SCScope["default"]) {
    this.global = env;
  } else {
    this.global = new _SCScope["default"](SCDynamicLibScope);
    Object.keys(env).forEach(function (key) {
      _this.global.declareConst(key, env[key]);
    });
  }
  this.topScope = this.global;
  this.stack = [{
    scope: this.global
  }];
  this.ast = ast;
}
SCProgramInstance.prototype.exec = function () {
  return this.accept(this.ast);
};
SCProgramInstance.prototype.accept = function (node) {
  var visitor = this.visitors[node.type];
  if (visitor) {
    return this.visitors[node.type].apply(this, arguments);
    // try {
    //
    // } catch (e) {
    //     console.error(e, node)
    // }
  } else {
    throw this.makeError("NotHandle", 'Can not handle node type ' + node && node.type, node);
  }
};
SCProgramInstance.prototype.makeError = function (type, message, node) {
  var err = {};
  var copy = function copy(o) {
    if (!o) return o;
    if (o instanceof Array) {
      return o.map(function (e) {
        return copy(e);
      });
    }
    if (o instanceof Date) return new Date(o.getTime());
    if (o.constructor === Object) return Object.keys(o).reduce(function (ac, key) {
      ac[key] = copy(o[key]);
      return ac;
    }, o === node ? {
      error: message || type || true
    } : {});
    return o;
  };
  err.ast = copy(this.ast);
  err.message = message;
  err.errorNode = node;
  err._shown = false;
  Object.defineProperty(err, 'SHOW_ERROR', {
    enumerable: false,
    get: function get() {
      if (this._shown) return;
      this._shown = true;
      var text = (0, _SCCodeGenerator.generateSCHighlightPreviewCode)(this.ast);
      var html = "<html><head><title>Error</title>\n<style> \n .sclang-Program {\n    font-family: Consolas, serif;\n    white-space: pre-wrap;\n    line-height: 1.5;\n}\n.sclang-keyword {\n    color: #2C82FF;\n}\n.sclang-node {\n    display: inline;\n}\n .sclang-error {\n    animation: 1s linear infinite condemned_blink_effect;\n }\n \n\n\n@keyframes condemned_blink_effect {\n  0% {\n    background-color: transparent;\n  }\n  50% {\n    background-color: transparent;\n  }\n  51% {\n     background-color: #f76868;\n  }\n  100% {\n      background-color: #f76868;\n  }\n}\n.sclang-CallExpression > .sclang-MemberExpression:first-child > .sclang-Identifier:last-child,\n.sclang-CallExpression > .sclang-Identifier:first-child{\n    color: #41a01b;\n}</style></head><body>".concat(text, "</body></html>");
      var blob = new Blob([html], {
        type: _ext2MineType["default"].html
      });
      var url = URL.createObjectURL(blob);
      window.open(url, '_blank');
      setTimeout(function () {
        URL.revokeObjectURL(url);
      }, 4000);
      return true;
    }
  });
  return err;
};
SCProgramInstance.prototype.getRefOf = function (name) {
  return this.topScope.findRef(name);
};
SCProgramInstance.prototype.isFunctionReturned = function () {
  var topStack = this.stack[this.stack.length - 1];
  if (topStack.isFunctionReturned) {
    return topStack.isFunctionReturned();
  }
  return false;
};
SCProgramInstance.prototype.functionReturn = function (res) {
  var topStack = this.stack[this.stack.length - 1];
  if (topStack.functionReturn) {
    return topStack.functionReturn(res);
  }
};
SCProgramInstance.prototype.isLoopBroken = function () {
  var topStack = this.stack[this.stack.length - 1];
  if (topStack.loop && topStack.loop.length > 0) {
    // console.log(topStack.loop[topStack.loop.length - 1].isBroken());
    return topStack.loop[topStack.loop.length - 1].isBroken();
  }
  return false;
};
SCProgramInstance.prototype.loopPush = function (holder) {
  var topStack = this.stack[this.stack.length - 1];
  topStack.loop = topStack.loop || [];
  topStack.loop.push(holder);
};
SCProgramInstance.prototype.loopPop = function () {
  var topStack = this.stack[this.stack.length - 1];
  topStack.loop.pop();
};
SCProgramInstance.prototype.loopBreak = function () {
  var topStack = this.stack[this.stack.length - 1];
  topStack.loop[topStack.loop.length - 1]["break"]();
};
SCProgramInstance.prototype.visitors = {
  Program: function Program(node) {
    var _this2 = this;
    var i = 0;
    var statements = node.body;
    var returnWith;
    var res = new Promise(function (rs) {
      return returnWith = rs;
    });
    var runStep = function runStep() {
      var statement;
      var sResult;
      while (i < statements.length) {
        statement = statements[i++];
        sResult = _this2.accept(statement);
        if (sResult && sResult.then) {
          sResult.then(runStep);
          return;
        }
      }
      returnWith(0);
    };
    runStep();
    return res;
  },
  BooleanLiteral: function BooleanLiteral(node) {
    return node.value;
  },
  BlockStatement: function BlockStatement(node) {
    var _this3 = this;
    var i = 0;
    var statements = node.body;
    var returnWith;
    var resolved = false;
    var result = undefined;
    var sync = new Promise(function (rs) {
      returnWith = function returnWith(res) {
        resolved = true;
        result = res;
        rs(res);
      };
    });
    var runStep = function runStep() {
      var statement;
      var sResult;
      while (i < statements.length && !_this3.isFunctionReturned() && !_this3.isLoopBroken()) {
        statement = statements[i++];
        sResult = _this3.accept(statement);
        if (sResult && sResult.then) {
          sResult.then(runStep);
          return;
        }
      }
      returnWith(0);
    };
    runStep();
    if (resolved) {
      return this.result;
    } else return sync;
  },
  ExpressionStatement: function ExpressionStatement(node) {
    return this.accept(node.expression);
  },
  VariableDeclarator: function VariableDeclarator(node, kind) {
    var _this4 = this;
    var initValue = null;
    if (node.init) {
      initValue = this.accept(node.init, 'const');
    }
    if (initValue && initValue.then) {
      return initValue.then(function (result) {
        if (kind === 'const') {
          _this4.topScope.declareConst(node.id.name, result);
        } else {
          _this4.topScope.declareVar(node.id.name, result);
        }
      });
    } else {
      if (kind === 'const') {
        this.topScope.declareConst(node.id.name, initValue);
      } else {
        this.topScope.declareVar(node.id.name, initValue);
      }
    }
  },
  VariableDeclaration: function VariableDeclaration(node) {
    var _this5 = this;
    var resolved = false;
    var sync;
    var resolve;
    var _doStep;
    var i;
    var declarations = node.declarations;
    if (declarations) {
      i = 0;
      _doStep = function doStep() {
        var dResult;
        while (i < declarations.length) {
          dResult = _this5.accept(declarations[i++], node.kind);
          if (dResult && dResult.then) {
            if (!sync) {
              sync = new Promise(function (rs) {
                resolve = rs;
              });
            }
            dResult.then(_doStep);
            return;
          }
        }
        if (resolve) resolve();else resolved = true;
      };
      _doStep();
      if (!resolved) return sync;
    } else {
      node = Object.assign({}, node);
      node.type = 'VariableDeclarator';
      return this.accept(node); //adapter for old version
    }
  },

  ArrayExpression: function ArrayExpression(node) {
    var _this6 = this;
    var res = [];
    var resolved = false;
    var resolve;
    var sync = new Promise(function (rs) {
      resolve = function resolve() {
        resolved = true;
        rs(res);
      };
    });
    var elements = node.elements;
    var i = 0;
    var doStep = function doStep() {
      var eResult;
      while (i < elements.length) {
        eResult = _this6.accept(elements[i++], 'const');
        if (eResult && eResult.then) {
          eResult.then(function (item) {
            res.push(item);
            doStep();
          });
          return;
        } else {
          res.push(eResult);
        }
      }
      resolve();
    };
    doStep();
    if (resolved) {
      return res;
    } else {
      return sync;
    }
  },
  ForCountStatement: function ForCountStatement(node) {
    var _this7 = this;
    var idRef = this.accept(node["for"], 'ref');
    var from = this.accept(node.from, 'const');
    var to = this.accept(node.to, 'const');
    var result;
    var resolved = false;
    var resolveWith;
    var sync = new Promise(function (rs) {
      resolveWith = function resolveWith(res) {
        result = res;
        resolved = true;
        rs(res);
      };
    });
    var i = from;
    var runStep = function runStep() {
      while (i <= to) {
        idRef.set(i);
        ++i;
        var stResult = _this7.accept(node.body);
        if (stResult && stResult.then) {
          stResult.then(runStep);
          return;
        }
      }
      resolveWith(0);
    };
    runStep();
    if (resolved) {
      return result;
    } else {
      return sync;
    }
  },
  WhileStatement: function WhileStatement(node) {
    var _this8 = this;
    var resolved = false;
    var resolve;
    var sync = new Promise(function (rs) {
      resolve = function resolve() {
        resolved = true;
        rs(undefined);
      };
    });
    this.loopPush({
      "break": function _break() {
        resolved = true;
      },
      isBroken: function isBroken() {
        return resolved;
      }
    });
    var state = 0;
    var doStep = function doStep() {
      var sResult;
      while (!resolved) {
        if (_this8.isFunctionReturned()) {
          resolve();
          return;
        }
        if (state === 0) {
          sResult = _this8.accept(node.test, 'const');
          state = 1;
        } else {
          sResult = _this8.accept(node.body);
          state = 0;
        }
        if (sResult && typeof sResult.then === "function") {
          sResult.then(function (sResult) {
            if (state === 0 || sResult) {
              doStep();
            } else {
              resolve();
            }
          });
          return;
        } else {
          if (state === 1 && !sResult) {
            resolve();
          }
        }
      }
    };
    doStep();
    if (resolved) {
      this.loopPop();
      return undefined;
    } else {
      return sync.then(function () {
        return _this8.loopPop();
      });
    }
  },
  DoWhileStatement: function DoWhileStatement(node) {
    var _this9 = this;
    var resolved = false;
    var resolve;
    var sync = new Promise(function (rs) {
      resolve = function resolve() {
        resolved = true;
        rs(undefined);
      };
    });
    var state = 1;
    var doStep = function doStep() {
      var sResult;
      while (!resolved) {
        if (state === 0) {
          sResult = _this9.accept(node.test, 'const');
          state = 1;
        } else {
          sResult = _this9.accept(node.body);
          state = 0;
        }
        if (sResult && typeof sResult.then === "function") {
          sResult.then(function (sResult) {
            if (state === 0 || sResult) {
              doStep();
            } else {
              resolve();
            }
          });
          return;
        } else {
          if (state === 1 && !sResult) {
            resolve();
          }
        }
      }
    };
    doStep();
    if (resolved) {
      return undefined;
    } else {
      return sync;
    }
  },
  ForOfStatement: function ForOfStatement(node) {
    var _this10 = this;
    var valRef = this.accept(node["for"], 'ref');
    var of = this.accept(node.of, 'const');
    var values;
    var result;
    var resolved = false;
    var resolveWith;
    var sync = new Promise(function (rs) {
      resolveWith = function resolveWith(res) {
        result = res;
        resolved = true;
        rs(res);
      };
    });
    var i = 0;
    var runStep = function runStep() {
      while (i < values.length) {
        valRef.set(values[i]);
        ++i;
        var stResult = _this10.accept(node.body);
        if (stResult && stResult.then) {
          stResult.then(runStep);
          return;
        }
      }
      resolveWith(0);
    };
    if (of.then) of.then(function (value) {
      of = value;
      values = of instanceof Array ? of : Object.values(value);
      runStep();
    });else {
      values = of instanceof Array ? of : Object.values(value);
      runStep();
    }
    if (resolved) {
      return result;
    } else {
      return sync;
    }
  },
  ForInStatement: function ForInStatement(node) {
    var _this11 = this;
    var valRef = this.accept(node["for"], 'ref');
    var inObj = this.accept(node["in"], 'const');
    var keys;
    var result;
    var resolved = false;
    var resolveWith;
    var sync = new Promise(function (rs) {
      resolveWith = function resolveWith(res) {
        result = res;
        resolved = true;
        rs(res);
      };
    });
    var i = 0;
    var runStep = function runStep() {
      while (i < keys.length) {
        valRef.set(keys[i]);
        ++i;
        var stResult = _this11.accept(node.body);
        if (stResult && stResult.then) {
          stResult.then(runStep);
          return;
        }
      }
      resolveWith(0);
    };
    if (inObj.then) inObj.then(function (value) {
      inObj = value;
      keys = Object.keys(inObj);
      runStep();
    });else {
      keys = Object.keys(inObj);
      runStep();
    }
    if (resolved) {
      return result;
    } else {
      return sync;
    }
  },
  AssignStatement: function AssignStatement(node) {
    //@deprecated
    var leftRef = this.accept(node.left, 'ref');
    var right = this.accept(node.right, 'const');
    if (right && right.then) {
      return right.then(function (value) {
        leftRef.set(value);
        return value;
      });
    } else {
      leftRef.set(right);
      return right;
    }
  },
  AssignmentExpression: function AssignmentExpression(node) {
    var leftRef = this.accept(node.left, 'ref');
    var right = this.accept(node.right, 'const');
    if (right && right.then) {
      return right.then(function (value) {
        leftRef.set(value);
        return value;
      });
    } else {
      leftRef.set(right);
      return right;
    }
  },
  IfStatement: function IfStatement(node) {
    var _this12 = this;
    var test = this.accept(node.test, 'const');
    if (test && typeof test.then === 'function') {
      return test.then(function (test) {
        if (test) {
          return _this12.accept(node.consequent);
        } else if (node.alternate) {
          return _this12.accept(node.alternate);
        }
      });
    } else {
      if (test) {
        return this.accept(node.consequent);
      } else if (node.alternate) {
        return this.accept(node.alternate);
      }
    }
  },
  ConditionalExpression: function ConditionalExpression(node) {
    var _this13 = this;
    var test = this.accept(node.test, 'const');
    if (test && typeof test.then === 'function') {
      return test.then(function (test) {
        if (test) {
          return _this13.accept(node.consequent);
        } else {
          return _this13.accept(node.alternate);
        }
      });
    } else {
      if (test) {
        return this.accept(node.consequent);
      } else {
        return this.accept(node.alternate);
      }
    }
  },
  NullLiteral: function NullLiteral(node) {
    return null;
  },
  NumericLiteral: function NumericLiteral(node) {
    return node.value;
  },
  StringLiteral: function StringLiteral(node) {
    return node.value;
  },
  BinaryExpression: function BinaryExpression(node) {
    var op = node.operator.content;
    var leftValue = this.accept(node.left, 'const');
    if (op === '&&' && !leftValue) {
      return leftValue;
    } else if (op === '||' && leftValue && !leftValue.then) {
      return leftValue;
    }
    var rightValue = this.accept(node.right, 'const');
    var sync = [];
    if (leftValue && leftValue.then) {
      sync.push(leftValue);
      leftValue.then(function (result) {
        return leftValue = result;
      });
    }
    if (rightValue && rightValue.then) {
      sync.push(rightValue);
      rightValue.then(function (result) {
        return rightValue = result;
      });
    }
    if (sync.length === 0) {
      return _SCOperatorExecutor["default"].executeBinaryOperator(node.operator.content, leftValue, rightValue);
    } else {
      return Promise.all(sync).then(function (u) {
        return _SCOperatorExecutor["default"].executeBinaryOperator(node.operator.content, leftValue, rightValue);
      });
    }
  },
  UnaryExpression: function UnaryExpression(node) {
    var arg = this.accept(node.argument, 'const');
    if (arg && arg.then) {
      return arg.then(function (value) {
        return _SCOperatorExecutor["default"].executeUnaryOperator(node.operator.content, value);
      });
    } else {
      return _SCOperatorExecutor["default"].executeUnaryOperator(node.operator.content, arg);
    }
  },
  Identifier: function Identifier(node, type) {
    var ref;
    if (type === 'const') {
      ref = this.getRefOf(node.name);
      if (ref) {
        return ref.get();
      } else {
        throw this.makeError("NotDeclare", "", node);
      }
    } else if (type === 'ref') {
      ref = this.getRefOf(node.name);
      if (ref) {
        return ref;
      } else {
        this.makeError("NotDeclare", "", node);
      }
    }
    return node.name;
  },
  CallExpression: function CallExpression(node) {
    var _this14 = this;
    var calleeFunction;
    var object = null;
    var ref;
    if (node.callee.type === "Identifier") {
      ref = this.getRefOf(node.callee.name);
      calleeFunction = ref.get();
    } else if (node.callee.type === 'MemberExpression') {
      ref = this.accept(node.callee);
      calleeFunction = ref.get();
      object = ref.object;
    }
    var argumentValues = node.arguments.map(function (exp) {
      return _this14.accept(exp, 'const');
    });
    var sync = [];
    argumentValues.forEach(function (arg, i) {
      if (arg && arg.then) {
        sync.push(arg.then(function (result) {
          argumentValues[i] = result;
        }));
      }
    });
    if (sync.length > 0) {
      return Promise.all(sync).then(function () {
        if (!calleeFunction) {
          throw {
            message: 'Undefined function ' + (0, _SCCodeGenerator.generateSCCode)(node.callee),
            ast: node
          };
        }
        return calleeFunction.apply(object, argumentValues);
      });
    } else {
      if (!calleeFunction) {
        throw {
          message: 'Undefined function ' + (0, _SCCodeGenerator.generateSCCode)(node.callee),
          ast: node
        };
      }
      return calleeFunction.apply(object, argumentValues);
    }
  },
  NewExpression: function NewExpression(node) {
    var _this15 = this;
    var calleeFunction;
    var ref;
    if (node.callee.type === "Identifier") {
      ref = this.getRefOf(node.callee.name);
      calleeFunction = ref.get();
    } else if (node.callee.type === 'MemberExpression') {
      ref = this.accept(node.callee);
      calleeFunction = ref.get();
    }
    var argumentValues = node.arguments.map(function (exp) {
      return _this15.accept(exp, 'const');
    });
    var code = "return new clazz(".concat(argumentValues.map(function (u, i) {
      return "args[".concat(i, "]");
    }).join(', '), ");");
    var f = new Function('clazz', 'args', code);
    return f(calleeFunction, argumentValues);
  },
  MemberExpression: function MemberExpression(node, type) {
    var object = this.accept(node.object, 'const');
    var key;
    if (node.property.type === 'Identifier' && !node.computed) {
      key = node.property.name;
    } else {
      key = this.accept(node.property, 'const');
    }
    if (key && key.then) {
      return key.then(function (key) {
        if (!object) {
          throw {
            message: 'Can not access ' + JSON.stringify(key) + ' from ' + (0, _SCCodeGenerator.generateSCCode)(node.object)
          };
        }
        if (type === 'const') return object[key];
        return {
          set: function set(value) {
            return object[key] = value;
          },
          get: function get() {
            return object[key];
          },
          object: object
        };
      });
    } else {
      if (type === 'const') return object[key];
      return {
        set: function set(value) {
          return object[key] = value;
        },
        get: function get() {
          return object[key];
        },
        object: object
      };
    }
  },
  ObjectProperty: function ObjectProperty(node) {
    var res = {};
    var key = this.accept(node.key);
    var value = this.accept(node.value, 'const');
    if (value && typeof value.then === 'function') {
      return value.then(function (value) {
        res[key] = value;
        return res;
      });
    } else {
      res[key] = value;
    }
    return res;
  },
  ObjectExpression: function ObjectExpression(node) {
    var _this16 = this;
    var res = {};
    var resolved = false;
    var resolve;
    var sync = new Promise(function (rs) {
      resolve = function resolve() {
        resolved = true;
        rs(res);
      };
    });
    var i = 0;
    var properties = node.properties;
    var doStep = function doStep() {
      var pResult;
      while (i < properties.length) {
        pResult = _this16.accept(properties[i++]);
        if (pResult && typeof pResult.then === "function") {
          pResult.then(function (pO) {
            Object.assign(res, pO);
          });
          return;
        } else {
          Object.assign(res, pResult);
        }
      }
      resolve();
    };
    doStep();
    if (resolved) {
      return res;
    } else {
      return sync;
    }
  },
  FunctionDeclaration: function FunctionDeclaration(node) {
    var self = this;
    //todo: overloading
    var functionName = node.id.name;
    function f() {
      var scope = new _SCScope["default"](self.topScope);
      var result = undefined;
      var resolved = false;
      var functionReturn = function functionReturn(res) {
        resolved = true;
        result = res;
      };
      var isFunctionReturned = function isFunctionReturned() {
        return resolved;
      };
      self.stack.push({
        scope: scope,
        functionReturn: functionReturn,
        isFunctionReturned: isFunctionReturned
      });
      self.topScope = scope;
      for (var i = 0; i < node.params.length; ++i) {
        scope.declareVar(node.params[i].id.name, arguments[i]);
      }
      scope.declareVar('arguments', arguments);
      var res = self.accept(node.body);
      if (res && typeof res.then === "function") {
        return res.then(function (res) {
          if (self.stack[self.stack.length - 1].scope === scope) {
            self.stack.pop();
            self.topScope = self.stack[self.stack.length - 1].scope;
            return result;
          } else {
            throw new Error('EngineError: Bug in stack!');
          }
        });
      } else {
        if (self.stack[self.stack.length - 1].scope === scope) {
          self.stack.pop();
          self.topScope = self.stack[self.stack.length - 1].scope;
          return result;
        } else {
          throw new Error('EngineError: Bug in stack!');
        }
      }
    }
    var code = "return function ".concat(functionName, "(").concat(node.params.map(function (pr) {
      return pr.id.name || (0, _stringGenerate.randomIdent)(5);
    }).join(','), ") { return f.apply(this, arguments); }");
    var func = new Function('f', code)(f);
    this.topScope.declareVar(functionName, func);
    return func;
  },
  BreakStatement: function BreakStatement(node) {
    this.loopBreak();
  },
  ReturnStatement: function ReturnStatement(node) {
    var _this17 = this;
    var res = undefined;
    if (node.argument) {
      res = this.accept(node.argument, 'const');
    }
    if (res && res.then) {
      res.then(function (res) {
        _this17.functionReturn(res);
      });
    } else {
      this.functionReturn(res);
    }
  }
};
var _default = SCProgramInstance;
exports["default"] = _default;

/***/ }),

/***/ 55830:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _Ref = _interopRequireDefault(__webpack_require__(90060));
var _Const = _interopRequireDefault(__webpack_require__(31010));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/***
 *
 * @param {SCScope=} parent
 * @constructor
 */
function SCScope(parent) {
  this.parent = parent;
  /***
   *
   * @type {Object<string, Ref|Const>}
   */
  this.data = {};
}
SCScope.prototype.set = function (name, value) {
  var ref = this.findRef(name);
  if (!ref) throw new Error('"' + name + '" was not declared!');
  if (ref.set) {
    ref.set(value);
  } else {
    throw new Error('"' + name + '" defined with const cannot be modified!');
  }
};
SCScope.prototype.get = function (name) {
  var ref = this.findRef(name);
  if (!ref) throw new Error('"' + name + '" was not declared!');
  return ref.get();
};
SCScope.prototype.declareConst = function (name, value, force, type) {
  if (name in this.data && !force) throw new Error("Cannot redefine variable, " + name + " is already declared!");
  this.data[name] = new _Const["default"](value, type);
};
SCScope.prototype.declareVar = function (name, value, force, type) {
  if (name in this.data && !force) throw new Error("Cannot redefine variable, " + name + " is already declared!");
  this.data[name] = new _Ref["default"](value, type);
};
SCScope.prototype.revoke = function (name) {
  delete this.data[name];
};

/***
 *
 * @param {string} name
 * @return {Ref|Const|null}
 */
SCScope.prototype.findRef = function (name) {
  return this.data[name] || this.parent && this.parent.findRef(name) || null;
};

/***
 *
 * @param {string} name
 * @return {SCScope|null}
 */
SCScope.prototype.findScope = function (name) {
  if (this.data[name]) return this;
  if (this.parent) return this.parent.findScope(name);
  return null;
};

/**
 *
 * @returns {SCScope}
 */
SCScope.prototype.makeFlattenedScope = function () {
  var res;
  if (this.parent) res = this.parent.makeFlattenedScope();else res = new SCScope();
  Object.assign(res.data, this.data);
  return res;
};
var _default = SCScope;
exports["default"] = _default;

/***/ }),

/***/ 13721:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = getFunctionName;
/**
 * 
 * @param {Function} func 
 */
function getFunctionName(func) {
  var ret = func.toString();
  ret = ret.substr('function '.length);
  ret = ret.substr(0, ret.indexOf('('));
  return ret;
}

/***/ }),

/***/ 22294:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.breakTextToLineByLength = breakTextToLineByLength;
exports.camelCaseToKebabCase = camelCaseToKebabCase;
exports.camelCaseToPascalCase = camelCaseToPascalCase;
exports.camelCaseToUnderScore = camelCaseToUnderScore;
exports.camelCaseToUpperUnderScore = camelCaseToUpperUnderScore;
exports.kebabCaseToCamelCase = kebabCaseToCamelCase;
exports.kebabCaseToPascalCase = kebabCaseToPascalCase;
exports.kebabCaseToUnderScore = kebabCaseToUnderScore;
exports.kebabCaseToUpperUnderScore = kebabCaseToUpperUnderScore;
exports.nonAccentVietnamese = nonAccentVietnamese;
exports.normalizeIdent = normalizeIdent;
exports.pascalCaseToCamelCase = pascalCaseToCamelCase;
exports.pascalCaseToKebabCase = pascalCaseToKebabCase;
exports.pascalCaseToUnderScore = pascalCaseToUnderScore;
exports.pascalCaseToUpperUnderScore = pascalCaseToUpperUnderScore;
exports.underScoreToCamelCase = underScoreToCamelCase;
exports.underScoreToKebabCase = underScoreToKebabCase;
exports.underScoreToPascalCase = underScoreToPascalCase;
exports.wrapToLines = wrapToLines;
/**
 *
 * @param {String} s
 * @param {Number} maxLength
 */
function wrapToLines(s, maxLength) {
  var res = [];
  var currentWord = '';
  var currentLine = '';
  for (var i = 0; i < s.length; ++i) {
    if (s[i].match(/\s/)) {
      if (currentWord.length + currentLine.length >= maxLength) {
        if (currentLine.length > 0) {
          res.push(currentLine.trim());
          currentLine = '';
          currentWord = currentWord.trimLeft() + s[i];
        } else {
          currentLine = currentLine + currentWord;
          res.push(currentLine.trim());
          currentLine = '';
          currentWord = '';
        }
      } else {
        currentLine = currentLine + currentWord;
        currentWord = s[i];
      }
    } else {
      currentWord = currentWord + s[i];
    }
  }
  currentLine = (currentLine + currentWord).trim();
  if (currentLine.length > 0) res.push(currentLine);
  return res;
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function nonAccentVietnamese(s) {
  return s.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g, "a").replace(/À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ/g, "A").replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g, "e").replace(/È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ/g, "E").replace(/ì|í|ị|ỉ|ĩ/g, "i").replace(/Ì|Í|Ị|Ỉ|Ĩ/g, "I").replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g, "o").replace(/Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ/g, "O").replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g, "u").replace(/Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ/g, "U").replace(/ỳ|ý|ỵ|ỷ|ỹ/g, "y").replace(/Ỳ|Ý|Ỵ|Ỷ|Ỹ/g, "Y").replace(/đ/g, "d").replace(/Đ/g, "D").replace(/\u0300|\u0301|\u0303|\u0309|\u0323/g, "").replace(/\u02C6|\u0306|\u031B/g, "");
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function pascalCaseToCamelCase(s) {
  return s.substr(0, 1).toLowerCase() + s.substr(1);
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function kebabCaseToCamelCase(s) {
  return s.replace(/-+([^-])/g, function (full, c) {
    return c.toUpperCase();
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function underScoreToCamelCase(s) {
  return s.replace(/(_+)?([^_]+)/g, function (full, underscore, word) {
    if (underscore) {
      if (word) {
        return word.substr(0, 1).toUpperCase() + word.substr(1).toLowerCase();
      } else return '';
    } else {
      return word.toLowerCase();
    }
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function camelCaseToPascalCase(s) {
  return s.substr(0, 1).toUpperCase() + s.substr(1);
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function underScoreToPascalCase(s) {
  return s.replace(/(_+|^)?([^_]+)/g, function (full, underscore, word) {
    return word.substr(0, 1).toUpperCase() + word.substr(1).toLowerCase();
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function kebabCaseToPascalCase(s) {
  return s.replace(/(-+|^)([^-])/g, function (full, u, c) {
    return c.toUpperCase();
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function pascalCaseToKebabCase(s) {
  return s.replace(/[A-Z][^A-Z]*/g, function (full, index) {
    if (index == 0) return full.toLowerCase();
    return '-' + full.toLowerCase();
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function camelCaseToKebabCase(s) {
  return s.replace(/(^|[A-Z])[^A-Z]*/g, function (full, index) {
    if (index == 0) return full.toLowerCase();
    return '-' + full.toLowerCase();
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function underScoreToKebabCase(s) {
  return s.replace(/(^|_+)([^_]+)/g, function (full, score, word, index) {
    if (index == 0) return word.toLowerCase();
    return '-' + word.toLowerCase();
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function pascalCaseToUnderScore(s) {
  return s.replace(/[A-Z][^A-Z]*/g, function (full, index) {
    if (index == 0) return full.toLowerCase();
    return '_' + full.toLowerCase();
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function pascalCaseToUpperUnderScore(s) {
  return s.replace(/[A-Z][^A-Z]*/g, function (full, index) {
    if (index == 0) return full.toUpperCase();
    return '_' + full.toUpperCase();
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function camelCaseToUnderScore(s) {
  return s.replace(/(^|[A-Z])[^A-Z]*/g, function (full, index) {
    if (index == 0) return full.toLowerCase();
    return '_' + full.toLowerCase();
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function camelCaseToUpperUnderScore(s) {
  return s.replace(/(^|[A-Z])[^A-Z]*/g, function (full, index) {
    if (index == 0) return full.toUpperCase();
    return '_' + full.toUpperCase();
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function kebabCaseToUnderScore(s) {
  return s.replace(/(-+|^)([^-]+)/g, function (full, u, word, index) {
    if (index == 0) return word.toLowerCase();
    return '_' + word.toLowerCase();
  });
}

/**
 *
 * @param {String} s
 * @returns {String}
 */
function kebabCaseToUpperUnderScore(s) {
  return s.replace(/(-+|^)([^-]+)/g, function (full, u, word, index) {
    if (index == 0) return word.toUpperCase();
    return '_' + word.toUpperCase();
  });
}

/***
 *
 * @param {String} text
 */
function normalizeIdent(text, opt) {
  var spaces = '_';
  if (opt && 'spaces' in opt) {
    spaces = opt.spaces || '';
  }
  var symbols = '_';
  if (opt && 'symbols' in opt) {
    symbols = opt.symbols || '';
  }
  var startsWithDigit = false;
  if (opt && 'startsWithDigit' in opt) {
    startsWithDigit = opt.startsWithDigit || false;
  }
  var res = nonAccentVietnamese(text);
  if (typeof spaces === "string") {
    res = res.replace(/\s+/g, spaces);
  }
  if (typeof symbols === 'string') {
    if (spaces === '_') res = res.replace(/[^a-zA-Z0-9_$]+/g, symbols);else if (spaces === '-') {
      res = res.replace(/[^a-zA-Z0-9_$\-]+/g, symbols);
    }
  }
  if (spaces) {
    res = res.replace(new RegExp("([".concat(spaces, "]+)"), 'g'), spaces);
  }
  if (symbols && symbols !== spaces) {
    res = res.replace(new RegExp("([".concat(symbols, "]+)"), 'g'), spaces);
  }
  if (spaces) {
    res = res.replace(new RegExp("([".concat(spaces, "]+$)|(^[").concat(spaces, "]+)"), 'g'), '');
  }
  if (symbols && symbols !== spaces) {
    res = res.replace(new RegExp("([".concat(symbols, "]+$)|(^[").concat(symbols, "]+$)"), 'g'), '');
  }
  if (!startsWithDigit && res.match(/^[0-9]/)) {
    res = '$' + res;
  }
  return res;
}
function breakTextToLineByLength(text, limitLength) {
  limitLength = limitLength || 256;
  var lines = text.split(/\n/);
  var newLines = [];
  var breakLine = function breakLine(line) {
    var testLine = nonAccentVietnamese(line).toLowerCase();
    var wordRgx = /(\(?(\d+([.]\d*)?([eE][+-]?\d+)?|[.]\d+([eE][+-]?\d+)?)\)?)|([()_a-z0-9,.]+)|([^\sa-z0-9,._()])/g;
    var poss = [];
    var matched = wordRgx.exec(testLine);
    while (matched) {
      poss.push(matched.index);
      matched = wordRgx.exec(testLine);
    }
    if (poss[0] !== 0) poss.unshift(0);
    poss.push(testLine.length);
    poss.push(testLine.length);
    var start = poss[0] || 0;
    var end,
      pend = start;
    var newLine;
    var chars;
    for (var i = 1; i < poss.length; ++i) {
      end = poss[i];
      if (end - start > limitLength || i + 1 === poss.length) {
        newLine = line.substring(start, pend).trimEnd();
        if (newLine.length > limitLength) {
          chars = newLine.split('');
          while (chars.length > 0) {
            newLine = chars.splice(0, limitLength).join('');
            newLines.push(newLine);
          }
        } else if (newLine.length > 0) {
          newLines.push(newLine);
        }
        start = pend;
      }
      pend = end;
    }
  };
  lines.forEach(function (line) {
    return breakLine(line);
  });
  return newLines.join('\n');
}

// window.t = `Sử dụng công thức tính: (Luong_Gio  OT150  0.5) + (Luong_Gio  OT200  1.0) + (Luong_Gio  OT210  1.1) + (Luong_Gio  OT270  1.7) + (Luong_Gio  OT300  2.0)`;
// console.log(breakTextToLineByLength(t, 50))

String.nonAccentVietnamese = nonAccentVietnamese;
String.prototype.nonAccentVietnamese = function () {
  return String.nonAccentVietnamese(this);
};

/***/ }),

/***/ 10713:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.ipsumLoremWord = exports.identCharacters = void 0;
exports.parallelMatch = parallelMatch;
exports.randomIdent = randomIdent;
exports.randomParagraph = randomParagraph;
exports.randomPhrase = randomPhrase;
exports.randomSentence = randomSentence;
exports.randomWord = randomWord;
var _random = __webpack_require__(88917);
var identCharacters = function () {
  var chars = 'qwertyuiopasdfghjklzxcvbnm';
  chars = chars + chars.toUpperCase();
  var num = '0123456789';
  var spect = '_';
  return (chars + spect + num).split('');
}();
exports.identCharacters = identCharacters;
function randomIdent(length) {
  if (!(length > 0)) length = 4;
  var factor = identCharacters;
  return [factor[Math.random() * (factor.length - 10) >> 0]].concat(Array(length - 1).fill('').map(function () {
    return factor[Math.random() * factor.length >> 0];
  })).join('');
}
function parallelMatch(a, b) {
  var l = Math.min(a.length, b.length);
  var res = 0;
  for (var i = 0; i < l; ++i) {
    if (a[i] == b[i]) ++res;
  }
  return res;
}
var ipsumLoremWord = ['lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur', 'adipiscing', 'elit', 'sed', 'do', 'eiusmod', 'tempor', 'incididunt', 'ut', 'labore', 'et', 'dolore', 'magna', 'aliqua', 'enim', 'ad', 'minim', 'veniam', 'quis', 'nostrud', 'exercitation', 'ullamco', 'laboris', 'nisi', 'aliquip', 'ex', 'ea', 'commodo', 'consequat', 'duis', 'aute', 'irure', 'in', 'reprehenderit', 'voluptate', 'velit', 'esse', 'cillum', 'eu', 'fugiat', 'nulla', 'pariatur', 'excepteur', 'sint', 'occaecat', 'cupidatat', 'non', 'proident', 'sunt', 'culpa', 'qui', 'officia', 'deserunt', 'mollit', 'anim', 'id', 'est', 'laborum', 'perspiciatis', 'unde', 'omnis', 'iste', 'natus', 'error', 'voluptatem', 'accusantium', 'doloremque', 'laudantium', 'totam', 'rem', 'aperiam', 'eaque', 'ipsa', 'quae', 'ab', 'illo', 'inventore', 'veritatis', 'quasi', 'architecto', 'beatae', 'vitae', 'dicta', 'explicabo', 'nemo', 'ipsam', 'quia', 'voluptas', 'aspernatur', 'aut', 'odit', 'fugit', 'consequuntur', 'magni', 'dolores', 'eos', 'ratione', 'sequi', 'nesciunt', 'neque', 'porro', 'quisquam', 'dolorem', 'adipisci', 'numquam', 'eius', 'modi', 'tempora', 'incidunt', 'magnam', 'aliquam', 'quaerat', 'minima', 'nostrum', 'exercitationem', 'ullam', 'corporis', 'suscipit', 'laboriosam', 'aliquid', 'commodi', 'consequatur', 'autem', 'vel', 'eum', 'iure', 'quam', 'nihil', 'molestiae', 'illum', 'quo', 'at', 'vero', 'accusamus', 'iusto', 'odio', 'dignissimos', 'ducimus', 'blanditiis', 'praesentium', 'voluptatum', 'deleniti', 'atque', 'corrupti', 'quos', 'quas', 'molestias', 'excepturi', 'occaecati', 'cupiditate', 'provident', 'similique', 'mollitia', 'animi', 'dolorum', 'fuga', 'harum', 'quidem', 'rerum', 'facilis', 'expedita', 'distinctio', 'nam', 'libero', 'tempore', 'sum', 'soluta', 'nobis', 'eligendi', 'optio', 'cumque', 'impedit', 'minus', 'quod', 'maxime', 'placeat', 'facere', 'possimus', 'assumenda', 'repellendus', 'temporibus', 'quibusdam', 'officiis', 'debitis', 'necessitatibus', 'saepe', 'eveniet', 'voluptates', 'repudiandae', 'recusandae', 'itaque', 'earum', 'hic', 'tenetur', 'a', 'sapiente', 'delectus', 'reiciendis', 'voluptatibus', 'maiores', 'alias', 'perferendis', 'doloribus', 'asperiores', 'repellat', 'integer', 'nec', 'praesent', 'cursus', 'ante', 'dapibus', 'diam', 'sem', 'nibh', 'elementum', 'imperdiet', 'sagittis', 'mauris', 'fusce', 'tellus', 'augue', 'semper', 'porta', 'massa', 'vestibulum', 'lacinia', 'arcu', 'eget', 'class', 'aptent', 'taciti', 'sociosqu', 'litora', 'torquent', 'per', 'conubia', 'nostra', 'inceptos', 'himenaeos', 'curabitur', 'sodales', 'ligula', 'dignissim', 'nunc', 'tortor', 'pellentesque', 'aenean', 'scelerisque', 'maecenas', 'mattis', 'convallis', 'tristique', 'proin', 'egestas', 'porttitor', 'morbi', 'lectus', 'risus', 'iaculis', 'luctus', 'ac', 'turpis', 'aliquet', 'metus', 'ullamcorper', 'tincidunt', 'euismod', 'quisque', 'volutpat', 'condimentum', 'urna', 'facilisi', 'fringilla', 'suspendisse', 'potenti', 'feugiat', 'mi', 'sapien', 'etiam', 'ultrices', 'justo', 'lacus', 'pharetra', 'auctor', 'interdum', 'primis', 'faucibus', 'orci', 'posuere', 'cubilia', 'curae', 'molestie', 'dui', 'blandit', 'congue', 'pede', 'facilisis', 'laoreet', 'donec', 'viverra', 'malesuada', 'pulvinar', 'sollicitudin', 'cras', 'nisl', 'felis', 'venenatis', 'ultricies', 'accumsan', 'pretium', 'fermentum', 'nullam', 'purus', 'mollis', 'vivamus', 'consectetuer'];
exports.ipsumLoremWord = ipsumLoremWord;
function randomWord() {
  var arr = ipsumLoremWord;
  var idx = (0, _random.randomInt)(0, arr.length - 1);
  return arr[idx];
}

/**
 * @param {number}arg1
 * @param {number=}arg2
 * @also
 * @param {number} arg1
 * @returns {string}
 */
function randomPhrase(arg1, arg2) {
  var limitLength = arguments[arguments.length - 1];
  var minLength = 1;
  if (arguments.length > 1) minLength = arguments[0];
  if (!limitLength) limitLength = 50;
  var length = Math.ceil((Math.random() * (limitLength - minLength) + minLength) / 7);
  return new Array(length).fill(null).map(randomWord).reduce(function (ac, cr) {
    if (ac.length + cr.length < limitLength || ac.length < minLength) {
      ac.parts.push(cr);
    }
    return ac;
  }, {
    parts: [],
    length: 0
  }).parts.join(' ');
}
function randomSentence(limitLenght) {
  if (!limitLenght) limitLenght = 300;
  var length = Math.ceil(Math.random() * limitLenght / 70);
  var res = new Array(length).fill(null).map(function (value) {
    return randomPhrase(value);
  }).reduce(function (ac, cr) {
    if (ac.length + cr.length < limitLenght) {
      ac.parts.push(cr);
    }
    return ac;
  }, {
    parts: [],
    length: 0
  }).parts.join(', ');
  if (Math.random() < 0.03) {
    res = res.replace(/\,/i, ':');
  }
  res = res.replace(/^./, function (x) {
    return x.toUpperCase();
  });
  res += '.';
  return res;
}
function randomParagraph(limitLength) {
  if (!limitLength) limitLength = 1000;
  var length = Math.ceil(Math.random() * limitLength / 200);
  return new Array(length).fill(null).map(function (value) {
    return randomSentence(value);
  }).reduce(function (ac, cr) {
    if (ac.length + cr.length < limitLength) {
      ac.parts.push(cr);
    }
    return ac;
  }, {
    parts: [],
    length: 0
  }).parts.join(' ');
}

/***/ }),

/***/ 59163:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.exportStringMatchingCode = exportStringMatchingCode;
exports.phraseLike = phraseLike;
exports.phraseMatch = phraseMatch;
exports.wordLike = wordLike;
exports.wordsMatch = wordsMatch;
var _int = __webpack_require__(65909);
/**
 *
 * @param {String} a
 * @param {String} b
 */

function wordLike(a, b) {
  var m = a.length;
  var n = b.length;
  function map(i, j) {
    return i * (n + 1) + j;
  }
  var Q = Array((m + 1) * (n + 1)).fill(0);
  for (var i = 0; i < m; ++i) {
    for (var j = 0; j < n; ++j) {
      if (a.charAt(i) == b.charAt(j)) {
        if (Q[map(i + 1, j + 1)]) {
          if (Q[map(i + 1, j + 1)] < Q[map(i, j)] + 1) Q[map(i + 1, j + 1)] = Q[map(i, j)] + 1;
        } else Q[map(i + 1, j + 1)] = Q[map(i, j)] + 1;
      } else Q[map(i + 1, j + 1)] = Math.max(Q[map(i + 1, j)], Q[map(i, j + 1)]);
    }
  }
  return Q[map(m, n)] / (0, _int.harmonicMean)(m, n);
}

/**
 *
 * @param {Array<String>} sq1
 * @param {Array<String>} sq2
 * @param {number=} matchWordPow
 */
function wordsMatch(sq1, sq2, matchWordPow) {
  matchWordPow = matchWordPow === undefined ? 1 : matchWordPow;
  var m = sq1.length;
  var n = sq2.length;
  function map(i, j) {
    return i * (n + 1) + j;
  }
  var Q = Array((m + 1) * (n + 1)).fill(0);
  var e = 0.0;
  for (var i = 0; i < m; ++i) {
    for (var j = 0; j < n; ++j) {
      e = Math.pow(wordLike(sq1[i], sq2[j]), matchWordPow);
      if (Q[map(i + 1, j + 1)]) {
        if (Q[map(i + 1, j + 1)] < Q[map(i, j)] + e) Q[map(i + 1, j + 1)] = Q[map(i, j)] + e;
      } else Q[map(i + 1, j + 1)] = Q[map(i, j)] + e;
      e = Math.max(Q[map(i + 1, j)], Q[map(i, j + 1)]);
      if (e > Q[map(i + 1, j + 1)]) Q[map(i + 1, j + 1)] = e;
    }
  }
  return Q[map(m, n)];
}
function phraseMatch(a, b, matchWordPow) {
  matchWordPow = matchWordPow || 1;
  var spliter = /[\s,-\.+?\_]+/;
  var notEmp = function notEmp(e) {
    return e.length > 0;
  };
  var sq1 = a.toLowerCase().split(spliter).filter(notEmp);
  var sq2 = b.toLowerCase().split(spliter).filter(notEmp);
  var wordsMatchScore = wordsMatch(sq1, sq2);
  var m = sq1.length;
  var n = sq2.length;
  return wordsMatchScore / Math.max((0, _int.harmonicMean)(m, n), 1);
}
;
function phraseLike(a, b, matchWordPow) {
  matchWordPow = matchWordPow || 1;
  var spliter = /[\s,-\.+?\_]+/;
  var notEmp = function notEmp(e) {
    return e.length > 0;
  };
  var sq1 = a.toLowerCase().split(spliter).filter(notEmp);
  var sq2 = b.toLowerCase().split(spliter).filter(notEmp);
  var m = sq1.length;
  var n = sq2.length;
  var wordsMatchScore = wordsMatch(sq1, sq2);
  return wordsMatchScore / Math.max((0, _int.harmonicMean)(m, n), 1);
}
function exportStringMatchingCode() {
  return [_int.harmonicMean, phraseLike, phraseMatch, wordLike, wordsMatch].map(function (f) {
    return f + '';
  }).join('\n') + '\nvar _stringFormat = {harmonicMean, phraseLike, wordLike, wordsMatch};';
}

/***/ }),

/***/ 26243:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.stringHashCode = stringHashCode;
function stringHashCode(st) {
  var hash = 0,
    i,
    chr;
  if (st.length === 0) return hash;
  for (i = 0; i < st.length; i++) {
    chr = st.charCodeAt(i);
    hash = (hash << 5) - hash + chr;
    hash |= 0; // Convert to 32bit integer
  }

  return hash;
}
function crc16($str) {
  var $CRC16_Lookup = [0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, 0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, 0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, 0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE, 0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485, 0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D, 0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4, 0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC, 0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823, 0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B, 0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12, 0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A, 0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41, 0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49, 0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70, 0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78, 0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F, 0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067, 0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E, 0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256, 0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D, 0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C, 0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634, 0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB, 0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3, 0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A, 0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92, 0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9, 0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1, 0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8, 0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0];
  var $crc16 = 0xFFFF; // the CRC
  var $len = $str.length;
  var $t;
  for (var $i = 0; $i < $len; $i++) {
    $t = $crc16 >> 8 ^ $str.charCodeAt($i); // High byte Xor Message Byte to get index
    $crc16 = $crc16 << 8 & 0xffff ^ $CRC16_Lookup[$t]; // Update the CRC from table
  }

  $crc16 = $crc16.toString(16).toUpperCase();
  return $crc16;
}

/***/ }),

/***/ 30768:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * 
 * @param {Date| Number} time 
 * @param {Function} callback 
 */
function Alarm(time, callback) {
  this.LIMIT_TIMEOUT = 2147483647;
  this.callback = callback;
  this.state = "STAND_BY";
  this.timeout = -1;
  if (typeof time == 'number') this.time = time;else this.time = time.getTime();
  this.args = Array.prototype.slice.call(arguments, 2);
  this.tick = this.tick.bind(this);
  if (this.time >= new Date().getTime()) this.start();else this.kill();
}
Alarm.prototype.start = function () {
  if (this.state == 'STAND_BY' || this.state == "PAUSE") {
    this.state = "RUNNING";
    this.tick();
    return true;
  }
  return false;
};
Alarm.prototype.pause = function () {
  if (this.state == "RUNNING") {
    clearTimeout(this.timeout);
    this.timeout = -1;
    this.state = 'PAUSE';
  }
};
Alarm.prototype.tick = function () {
  var now = new Date().getTime();
  if (now >= this.time) {
    this.callback && this.callback.apply(null, this.args);
    this.start = 'FINISH';
  } else {
    var deltaTime = Math.min(this.LIMIT_TIMEOUT, this.time - now);
    this.timeout = setTimeout(this.tick, deltaTime);
    this.state = "RUNNING";
  }
};
Alarm.prototype.kill = function () {
  if (this.state != "FINISH" && this.state != "DEAD") {
    if (this.timeout >= 0) clearTimeout(this.timeout);
    this.state = 'DEAD';
    return true;
  }
  return false;
};
var _default = Alarm;
exports["default"] = _default;

/***/ }),

/***/ 58286:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.MILLIS_PER_MINUTE = exports.MILLIS_PER_HOUR = exports.MILLIS_PER_DAY = exports.LOCAL_DATE_TIME_FORMAT = exports.LOCAL_DATE_FORMAT = exports.DATE_TIME_TOKEN_RGX = void 0;
exports.addDate = addDate;
exports.addMonth = addMonth;
exports.addMonthKeepDate = addMonthKeepDate;
exports.addMonthKeepDateTime = addMonthKeepDateTime;
exports.addQuarter = addQuarter;
exports.addWeek = addWeek;
exports.addYear = addYear;
exports.beginOfDay = beginOfDay;
exports.beginOfHour = beginOfHour;
exports.beginOfMinute = beginOfMinute;
exports.beginOfMonth = beginOfMonth;
exports.beginOfQuarter = beginOfQuarter;
exports.beginOfSecond = beginOfSecond;
exports.beginOfWeek = beginOfWeek;
exports.beginOfYear = beginOfYear;
exports.compareDate = compareDate;
exports.compareMonth = compareMonth;
exports.compareYear = compareYear;
exports.dayNames = exports.dateFormatList = exports.dateFormat2LocationList = void 0;
exports.daysInMonth = daysInMonth;
exports.ddmmyyyy = ddmmyyyy;
exports.formartDateString = formartDateString;
exports.formatDateString = formatDateString;
exports.formatDateTime = formatDateTime;
exports.formatTimeRange24 = formatTimeRange24;
exports.formatTokenRegex = void 0;
exports.getDefaultFirstDayOfWeek = getDefaultFirstDayOfWeek;
exports.getTimeRangeFromStep = getTimeRangeFromStep;
exports.implicitDate = implicitDate;
exports.monthNames = exports.language2LocalDateFormat = void 0;
exports.monthOfTwoDate = monthOfTwoDate;
exports.nextDate = nextDate;
exports.nextMonth = nextMonth;
exports.nextQuarter = nextQuarter;
exports.nextWeek = nextWeek;
exports.nextYear = nextYear;
exports.parseDateString = parseDateString;
exports.parseDateTime = parseDateTime;
exports.prevDate = prevDate;
exports.prevMonth = prevMonth;
exports.prevQuarter = prevQuarter;
exports.prevWeek = prevWeek;
exports.prevYear = prevYear;
exports.setDefaultFirstDayOfWeek = setDefaultFirstDayOfWeek;
exports.shortMonthNames = exports.shortDayNames = void 0;
exports.weekInYear = weekInYear;
exports.weekIndexOf = weekIndexOf;
exports.yyymmdd = yyymmdd;
var _stringFormat = __webpack_require__(22294);
var _int = __webpack_require__(65909);
var MILLIS_PER_DAY = 24 * 3600000;
exports.MILLIS_PER_DAY = MILLIS_PER_DAY;
var MILLIS_PER_HOUR = 3600000;
exports.MILLIS_PER_HOUR = MILLIS_PER_HOUR;
var MILLIS_PER_MINUTE = 60000;
exports.MILLIS_PER_MINUTE = MILLIS_PER_MINUTE;
var _default_first_day_of_week = 1;
function getDefaultFirstDayOfWeek() {
  return _default_first_day_of_week;
}
function setDefaultFirstDayOfWeek(value) {
  if (isNaN(value) || !isFinite(value)) return;
  value = Math.floor(value) % 7;
  _default_first_day_of_week = value;
}

/**
 *
 * @param {Date} date
 * @returns {String}
 */
function ddmmyyyy(date) {
  return formatDateTime(date, 'dd/MM/yyyy');
}
var language2LocalDateFormat = {
  "af-ZA": "yyyy/mm/dd",
  "am-ET": "d/m/yyyy",
  "ar-AE": "dd/mm/yyyy",
  "ar-BH": "dd/mm/yyyy",
  "ar-DZ": "dd-mm-yyyy",
  "ar-EG": "dd/mm/yyyy",
  "ar-IQ": "dd/mm/yyyy",
  "ar-JO": "dd/mm/yyyy",
  "ar-KW": "dd/mm/yyyy",
  "ar-LB": "dd/mm/yyyy",
  "ar-LY": "dd/mm/yyyy",
  "ar-MA": "dd-mm-yyyy",
  "ar-OM": "dd/mm/yyyy",
  "ar-QA": "dd/mm/yyyy",
  "ar-SA": "dd/mm/yy",
  "ar-SY": "dd/mm/yyyy",
  "ar-TN": "dd-mm-yyyy",
  "ar-YE": "dd/mm/yyyy",
  "arn-CL": "dd-mm-yyyy",
  "as-IN": "dd-mm-yyyy",
  "az-Cyrl-AZ": "dd.mm.yyyy",
  "az-Latn-AZ": "dd.mm.yyyy",
  "ba-RU": "dd.mm.yy",
  "be-BY": "dd.mm.yyyy",
  "bg-BG": "dd.m.yyyy",
  "bn-BD": "dd-mm-yy",
  "bn-IN": "dd-mm-yy",
  "bo-CN": "yyyy/m/d",
  "br-FR": "dd/mm/yyyy",
  "bs-Cyrl-BA": "d.m.yyyy",
  "bs-Latn-BA": "d.m.yyyy",
  "ca-ES": "dd/mm/yyyy",
  "co-FR": "dd/mm/yyyy",
  "cs-CZ": "d.m.yyyy",
  "cy-GB": "dd/mm/yyyy",
  "da-DK": "dd-mm-yyyy",
  "de-AT": "dd.mm.yyyy",
  "de-CH": "dd.mm.yyyy",
  "de-DE": "dd.mm.yyyy",
  "de-LI": "dd.mm.yyyy",
  "de-LU": "dd.mm.yyyy",
  "dsb-DE": "d. m. yyyy",
  "dv-MV": "dd/mm/yy",
  "el-GR": "d/m/yyyy",
  "en-029": "mm/dd/yyyy",
  "en-AU": "d/mm/yyyy",
  "en-BZ": "dd/mm/yyyy",
  "en-CA": "dd/mm/yyyy",
  "en-GB": "dd/mm/yyyy",
  "en-IE": "dd/mm/yyyy",
  "en-IN": "dd-mm-yyyy",
  "en-JM": "dd/mm/yyyy",
  "en-MY": "d/m/yyyy",
  "en-NZ": "d/mm/yyyy",
  "en-PH": "m/d/yyyy",
  "en-SG": "d/m/yyyy",
  "en-TT": "dd/mm/yyyy",
  "en-US": "m/d/yyyy",
  "en-ZA": "yyyy/mm/dd",
  "en-ZW": "m/d/yyyy",
  "es-AR": "dd/mm/yyyy",
  "es-BO": "dd/mm/yyyy",
  "es-CL": "dd-mm-yyyy",
  "es-CO": "dd/mm/yyyy",
  "es-CR": "dd/mm/yyyy",
  "es-DO": "dd/mm/yyyy",
  "es-EC": "dd/mm/yyyy",
  "es-ES": "dd/mm/yyyy",
  "es-GT": "dd/mm/yyyy",
  "es-HN": "dd/mm/yyyy",
  "es-MX": "dd/mm/yyyy",
  "es-NI": "dd/mm/yyyy",
  "es-PA": "mm/dd/yyyy",
  "es-PE": "dd/mm/yyyy",
  "es-PR": "dd/mm/yyyy",
  "es-PY": "dd/mm/yyyy",
  "es-SV": "dd/mm/yyyy",
  "es-US": "m/d/yyyy",
  "es-UY": "dd/mm/yyyy",
  "es-VE": "dd/mm/yyyy",
  "et-EE": "d.mm.yyyy",
  "eu-ES": "yyyy/mm/dd",
  "fa-IR": "mm/dd/yyyy",
  "fi-FI": "d.m.yyyy",
  "fil-PH": "m/d/yyyy",
  "fo-FO": "dd-mm-yyyy",
  "fr-BE": "d/mm/yyyy",
  "fr-CA": "yyyy-mm-dd",
  "fr-CH": "dd.mm.yyyy",
  "fr-FR": "dd/mm/yyyy",
  "fr-LU": "dd/mm/yyyy",
  "fr-MC": "dd/mm/yyyy",
  "fy-NL": "d-m-yyyy",
  "ga-IE": "dd/mm/yyyy",
  "gd-GB": "dd/mm/yyyy",
  "gl-ES": "dd/mm/yy",
  "gsw-FR": "dd/mm/yyyy",
  "gu-IN": "dd-mm-yy",
  "ha-Latn-NG": "d/m/yyyy",
  "he-IL": "dd/mm/yyyy",
  "hi-IN": "dd-mm-yyyy",
  "hr-BA": "d.m.yyyy.",
  "hr-HR": "d.m.yyyy",
  "hsb-DE": "d. m. yyyy",
  "hu-HU": "yyyy. mm. dd.",
  "hy-AM": "dd.mm.yyyy",
  "id-ID": "dd/mm/yyyy",
  "ig-NG": "d/m/yyyy",
  "ii-CN": "yyyy/m/d",
  "is-IS": "d.m.yyyy",
  "it-CH": "dd.mm.yyyy",
  "it-IT": "dd/mm/yyyy",
  "iu-Cans-CA": "d/m/yyyy",
  "iu-Latn-CA": "d/mm/yyyy",
  "ja-JP": "yyyy/mm/dd",
  "ka-GE": "dd.mm.yyyy",
  "kk-KZ": "dd.mm.yyyy",
  "kl-GL": "dd-mm-yyyy",
  "km-KH": "yyyy-mm-dd",
  "kn-IN": "dd-mm-yy",
  "ko-KR": "yyyy-mm-dd",
  "kok-IN": "dd-mm-yyyy",
  "ky-KG": "dd.mm.yy",
  "lb-LU": "dd/mm/yyyy",
  "lo-LA": "dd/mm/yyyy",
  "lt-LT": "yyyy.mm.dd",
  "lv-LV": "yyyy.mm.dd.",
  "mi-NZ": "dd/mm/yyyy",
  "mk-MK": "dd.mm.yyyy",
  "ml-IN": "dd-mm-yy",
  "mn-MN": "yy.mm.dd",
  "mn-Mong-CN": "yyyy/m/d",
  "moh-CA": "m/d/yyyy",
  "mr-IN": "dd-mm-yyyy",
  "ms-BN": "dd/mm/yyyy",
  "ms-MY": "dd/mm/yyyy",
  "mt-MT": "dd/mm/yyyy",
  "nb-NO": "dd.mm.yyyy",
  "ne-NP": "m/d/yyyy",
  "nl-BE": "d/mm/yyyy",
  "nl-NL": "d-m-yyyy",
  "nn-NO": "dd.mm.yyyy",
  "nso-ZA": "yyyy/mm/dd",
  "oc-FR": "dd/mm/yyyy",
  "or-IN": "dd-mm-yy",
  "pa-IN": "dd-mm-yy",
  "pl-PL": "yyyy-mm-dd",
  "prs-AF": "dd/mm/yy",
  "ps-AF": "dd/mm/yy",
  "pt-BR": "d/m/yyyy",
  "pt-PT": "dd-mm-yyyy",
  "qut-GT": "dd/mm/yyyy",
  "quz-BO": "dd/mm/yyyy",
  "quz-EC": "dd/mm/yyyy",
  "quz-PE": "dd/mm/yyyy",
  "rm-CH": "dd/mm/yyyy",
  "ro-RO": "dd.mm.yyyy",
  "ru-RU": "dd.mm.yyyy",
  "rw-RW": "m/d/yyyy",
  "sa-IN": "dd-mm-yyyy",
  "sah-RU": "mm.dd.yyyy",
  "se-FI": "d.m.yyyy",
  "se-NO": "dd.mm.yyyy",
  "se-SE": "yyyy-mm-dd",
  "si-LK": "yyyy-mm-dd",
  "sk-SK": "d. m. yyyy",
  "sl-SI": "d.m.yyyy",
  "sma-NO": "dd.mm.yyyy",
  "sma-SE": "yyyy-mm-dd",
  "smj-NO": "dd.mm.yyyy",
  "smj-SE": "yyyy-mm-dd",
  "smn-FI": "d.m.yyyy",
  "sms-FI": "d.m.yyyy",
  "sq-AL": "yyyy-mm-dd",
  "sr-Cyrl-BA": "d.m.yyyy",
  "sr-Cyrl-CS": "d.m.yyyy",
  "sr-Cyrl-ME": "d.m.yyyy",
  "sr-Cyrl-RS": "d.m.yyyy",
  "sr-Latn-BA": "d.m.yyyy",
  "sr-Latn-CS": "d.m.yyyy",
  "sr-Latn-ME": "d.m.yyyy",
  "sr-Latn-RS": "d.m.yyyy",
  "sv-FI": "d.m.yyyy",
  "sv-SE": "yyyy-mm-dd",
  "sw-KE": "m/d/yyyy",
  "syr-SY": "dd/mm/yyyy",
  "ta-IN": "dd-mm-yyyy",
  "te-IN": "dd-mm-yy",
  "tg-Cyrl-TJ": "dd.mm.yy",
  "th-TH": "d/m/yyyy",
  "tk-TM": "dd.mm.yy",
  "tn-ZA": "yyyy/mm/dd",
  "tr-TR": "dd.mm.yyyy",
  "tt-RU": "dd.mm.yyyy",
  "tzm-Latn-DZ": "dd-mm-yyyy",
  "ug-CN": "yyyy-m-d",
  "uk-UA": "dd.mm.yyyy",
  "ur-PK": "dd/mm/yyyy",
  "uz-Cyrl-UZ": "dd.mm.yyyy",
  "uz-Latn-UZ": "dd/mm yyyy",
  "vi-VN": "dd/mm/yyyy",
  "wo-SN": "dd/mm/yyyy",
  "xh-ZA": "yyyy/mm/dd",
  "yo-NG": "d/m/yyyy",
  "zh-CN": "yyyy/m/d",
  "zh-HK": "d/m/yyyy",
  "zh-MO": "d/m/yyyy",
  "zh-SG": "d/m/yyyy",
  "zh-TW": "yyyy/m/d",
  "zu-ZA": "yyyy/mm/dd"
};
exports.language2LocalDateFormat = language2LocalDateFormat;
var dateFormat2LocationList = Object.keys(language2LocalDateFormat).reduce(function (ac, cr) {
  ac[language2LocalDateFormat[cr]] = ac[language2LocalDateFormat[cr]] || [];
  ac[language2LocalDateFormat[cr]].push(cr);
  return ac;
}, {});
exports.dateFormat2LocationList = dateFormat2LocationList;
var dateFormatList = Object.keys(dateFormat2LocationList);

/**
 *
 * @param {Date} date
 * @returns {String}
 */
exports.dateFormatList = dateFormatList;
function yyymmdd(date) {
  return formatDateTime(date, 'yyyy/MM/dd');
}
var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
exports.dayNames = dayNames;
var shortDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
exports.shortDayNames = shortDayNames;
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
exports.monthNames = monthNames;
var shortMonthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
exports.shortMonthNames = shortMonthNames;
var formatTokenRegex = /([,.\-\/])|([a-zA-Z0-9]+)/g; //more
exports.formatTokenRegex = formatTokenRegex;
var DATE_TIME_TOKEN_RGX = /([^\s.\/:\-,]+)|([.\/:\-,]+)/i;

/**
 *
 * @param {Date} date
 * @param {String=} format
 * @returns {String}
 */
exports.DATE_TIME_TOKEN_RGX = DATE_TIME_TOKEN_RGX;
function formatDateString(date, format) {
  format = format || 'dd/mm/yyyy';
  var dt = date.getDate();
  var day = date.getDay();
  var month = date.getMonth();
  var year = date.getFullYear();
  return format.replace(formatTokenRegex, function (x) {
    switch (x) {
      case "dddd":
        return dayNames[day];
      case "ddd":
        return shortDayNames[day];
      case "dd":
        return dt < 10 ? '0' + dt : '' + dt;
      case "d":
        return '' + dt;
      case "mmmm":
        return monthNames[month];
      case "mmm":
        return shortMonthNames[month];
      case "mm":
        return month + 1 < 10 ? '0' + (month + 1) : '' + (month + 1);
      case "m":
        return '' + (month + 1);
      case 'yy':
        return (year + '').match(/..$/)[0];
      case 'yyyy':
        return year + '';
      default:
        return x;
    }
  });
}
var LOCAL_DATE_FORMAT = function () {
  var d = new Date(2021, 4, 4);
  var s = d.toLocaleDateString();
  var fm = s.replace(new RegExp(DATE_TIME_TOKEN_RGX.source, 'g'), function (token) {
    switch (token) {
      case '2021':
        return 'yyyy';
      case '5':
        return 'M';
      case '05':
        return 'MM';
      case '4':
        return 'd';
      case '04':
        return 'dd';
      default:
        return token;
    }
  });
  return fm;
}();
exports.LOCAL_DATE_FORMAT = LOCAL_DATE_FORMAT;
var LOCAL_DATE_TIME_FORMAT = function () {
  var d = new Date(2021, 4, 4, 6, 7, 3);
  var s = d.toLocaleString();
  var fm = s.replace(new RegExp(DATE_TIME_TOKEN_RGX.source, 'g'), function (token) {
    switch (token) {
      case '2021':
        return 'yyyy';
      case '5':
        return 'M';
      case '05':
        return 'MM';
      case '4':
        return 'd';
      case '04':
        return 'dd';
      case '06':
        if (new Date(2021, 4, 4, 18, 7, 3).toLocaleString().indexOf(18) >= 0) return 'HH';
        return 'hh';
      case '6':
        return 'h';
      case '07':
        return 'mm';
      case '7':
        return 'm';
      case '03':
        return 'ss';
      case '3':
        return 's';
      case 'AM':
        return 'a';
      default:
        return token;
    }
  });
  return fm;
}();
exports.LOCAL_DATE_TIME_FORMAT = LOCAL_DATE_TIME_FORMAT;
function formartDateString() {
  window.ALogger.warn("spelled incorrectly: formartDateString");
  return formatDateString.apply(null, arguments);
}

/**
 *
 * @param {String} text
 * @param {String} format
 * @returns {Date}
 */
function parseDateString(text, format) {
  text = (0, _stringFormat.nonAccentVietnamese)(text).toLowerCase();
  format = (0, _stringFormat.nonAccentVietnamese)(format).toLowerCase();
  var textTokens = text.match(formatTokenRegex) || [];
  var formatTokens = format.match(formatTokenRegex) || [];
  var year = new Date().getFullYear();
  var month = 0;
  var day = 1;
  var n = Math.min(textTokens.length, formatTokens.length);
  var textToken;
  var formatToken;
  for (var i = 0; i < n; ++i) {
    textToken = textTokens[i];
    formatToken = formatTokens[i];
    switch (formatToken) {
      case "dd":
        day = parseInt(textToken);
        break;
      case "d":
        day = parseInt(textToken);
        break;
      case "mmmm":
        month = monthNames.indexOf(textToken.substr(0, 1).toUpperCase() + textToken.substr(1).toLowerCase());
        break;
      case "mmm":
        month = shortMonthNames.indexOf(textToken.substr(0, 1).toUpperCase() + textToken.substr(1).toLowerCase());
        break;
      case "mm":
      case 'MM':
        month = parseInt(textToken) - 1;
        break;
      case "m":
      case 'M':
        month = parseInt(textToken) - 1;
        break;
      case 'yy':
        year = Math.floor(new Date().getFullYear() / 100) * 100 + parseInt(textToken);
        break;
      case 'yyyy':
        year = parseInt(textToken);
        break;
      default:
        if (textToken !== formatToken) throw new Error('Unexpected token ' + textToken);
    }
  }
  if (isNaN(year)) throw new Error('Invalid year');
  if (isNaN(month) && month !== -1) {
    throw new Error('Invalid month');
  } else {
    month = Math.max(0, Math.min(11, month));
  }
  if (!isNaN(day)) {
    day = Math.max(1, Math.min(31, day));
    if (!isNaN(month)) {
      day = Math.min(daysInMonth(2000, month), day);
      if (!isNaN(year)) day = Math.min(daysInMonth(year, month), day);
    }
  } else {
    throw new Error('Invalid day');
  }
  return new Date(year, month, day);
}

/***
 *
 * @param date
 * @param {number} delta - must be a integer
 * @param {boolean=} gmt
 * @returns {Date}
 */
function addDate(date, delta, gmt) {
  delta = Math.round(delta);
  var res = beginOfDay(date, gmt);
  if (gmt) {
    res.setUTCDate(date.getUTCDate() + delta);
  } else {
    res.setDate(date.getDate() + delta);
  }
  return beginOfDay(res, gmt);
}

/**
 * @param {Date} date
 * @param {boolean=} gmt
 * @return {Date}
 */
function prevDate(date, gmt) {
  return addDate(date, -1, gmt);
}

/**
 * @param {Date} date
 * @param {boolean=} gmt
 * @return {Date}
 */
function nextDate(date, gmt) {
  return addDate(date, 1, gmt);
}

/****
 *
 * @param {Date} date
 * @param {boolean=} gmt
 * @param {number=} startDayOfWeek
 * @returns {number}
 */
function weekIndexOf(date, gmt, startDayOfWeek) {
  if (typeof startDayOfWeek !== "number") startDayOfWeek = getDefaultFirstDayOfWeek();
  var by = beginOfYear(date, gmt);
  var byw = beginOfWeek(by, gmt, startDayOfWeek);
  return Math.floor(compareDate(date, byw, gmt) / 7);
}

/***
 *
 * @param {number} year
 * @param {number} weekIdx
 * @param {boolean=} gmt
 * @param {number=} startDayOfWeek
 * @returns {Date}
 */
function weekInYear(year, weekIdx, gmt, startDayOfWeek) {
  if (typeof startDayOfWeek !== "number") startDayOfWeek = getDefaultFirstDayOfWeek();
  var bg = new Date(year, 0, 1, 0, 0, 0, 0);
  if (gmt) bg.setUTCHours(0);
  var byw = beginOfWeek(bg, gmt, startDayOfWeek);
  if (weekIdx === 0) return bg;
  return new Date(byw.getTime() + weekIdx * 7 * MILLIS_PER_DAY);
}

/**
 * @param {Date} date
 * @param {Boolean=} gmt default:false
 * @return {Date} date at xx:xx:xx:00
 */
function beginOfSecond(date, gmt) {
  var res = new Date(date.getTime());
  if (gmt) res.setUTCMilliseconds(0);else res.setMilliseconds(0);
  return res;
}

/**
 * @param {Date} date
 * @param {Boolean=} gmt default:false
 * @return {Date} date at xx:xx:00
 */
function beginOfMinute(date, gmt) {
  var res = new Date(date.getTime());
  if (gmt) res.setUTCSeconds(0, 0);else res.setSeconds(0, 0);
  return res;
}

/**
 * @param {Date} date
 * @param {Boolean=} gmt default:false
 * @return {Date} date at 00:00
 */
function beginOfDay(date, gmt) {
  var res = new Date(date.getTime());
  if (gmt) res.setUTCHours(0, 0, 0, 0);else res.setHours(0, 0, 0, 0);
  return res;
}

/**
 * @param {Date} date
 * @param {Boolean=} gmt default:false
 * @return {Date} date at xx:00
 */
function beginOfHour(date, gmt) {
  var res = new Date(date.getTime());
  if (gmt) res.setUTCMinutes(0, 0, 0);else res.setMinutes(0, 0, 0);
  return res;
}

/**
 * @param {Date} date
 * @param {Boolean=} gmt default:false
 * @param {number=} startDayOfWeek default:0
 * @return {Date} date at 00:00
 */
function beginOfWeek(date, gmt, startDayOfWeek) {
  if (typeof startDayOfWeek !== "number") startDayOfWeek = getDefaultFirstDayOfWeek();
  var res = beginOfDay(date, gmt);
  if (isNaN(res.getTime())) return res;
  while ((gmt ? res.getUTCDay() : res.getDay()) !== startDayOfWeek) {
    res = prevDate(res, gmt);
  }
  return res;
}

/***
 *
 * @param {Date} date
 * @param {number} delta
 * @param {boolean=} gmt
 */
function addWeek(date, delta, gmt) {
  date = beginOfWeek(date, gmt);
  delta = Math.round(delta);
  return addDate(date, delta * 7, gmt);
}

/****
 *
 * @param {Date} date
 * @param {boolean=} gmt
 * @returns {Date}
 */
function nextWeek(date, gmt) {
  return addWeek(date, 1, gmt);
}

/****
 *
 * @param {Date} date
 * @param {boolean=} gmt
 * @returns {Date}
 */
function prevWeek(date, gmt) {
  return addWeek(date, -1, gmt);
}

/**
 * @param {Date} date
 * @param {Boolean=} gmt default:false
 * @return {Date} date at 00:00 AM
 */
function beginOfMonth(date, gmt) {
  var m = gmt ? date.getUTCMonth() : date.getMonth();
  var y = gmt ? date.getUTCFullYear() : date.getFullYear();
  var res = new Date();
  if (gmt) res.setUTCFullYear(y, m, 1);else res.setFullYear(y, m, 1);
  return beginOfDay(res, gmt);
}

/**
 * @param {Date} date
 * @param {Boolean=} gmt default:false
 * @return {Date} date at 00:00 AM
 */
function beginOfQuarter(date, gmt) {
  var y = gmt ? date.getUTCFullYear() : date.getFullYear();
  var m = gmt ? date.getUTCMonth() : date.getMonth();
  m = Math.floor(m / 3) * 3;
  var res = new Date();
  if (gmt) res.setUTCFullYear(y, m, 1);else res.setFullYear(y, m, 1);
  return beginOfDay(res, gmt);
}

/***
 *
 * @param {Date} date
 * @param {number=} delta
 * @param {boolean=} gmt
 */
function addQuarter(date, delta, gmt) {
  delta = Math.round(delta);
  date = beginOfQuarter(date, gmt);
  return addMonth(date, delta * 3, gmt);
}

/***
 *
 * @param {Date} date
 * @param {boolean=} gmt
 * @returns {Date}
 */
function nextQuarter(date, gmt) {
  date = beginOfQuarter(date);
  return nextMonth(nextMonth(nextMonth(date, gmt), gmt), gmt);
}

/***
 *
 * @param {Date} date
 * @param {boolean=} gmt
 * @returns {Date}
 */
function prevQuarter(date, gmt) {
  date = beginOfQuarter(date, gmt);
  return prevMonth(prevMonth(prevMonth(date, gmt), gmt), gmt);
}

/**
 * @param {Date} date
 * @param {Boolean=} gmt default:false
 * @return {Date} date at 00:00 AM
 */
function beginOfYear(date, gmt) {
  var y = gmt ? date.getUTCFullYear() : date.getFullYear();
  var res = new Date();
  if (gmt) res.setUTCFullYear(y, 0, 1);else res.setFullYear(y, 0, 1);
  return beginOfDay(res, gmt);
}

/**
 * @param {Date} date
 * @param {number} delta
 * @param {Boolean=} gmt default:false
 * @return {Date} date at 00:00 AM
 */
function addYear(date, delta, gmt) {
  delta = Math.round(delta);
  var y = gmt ? date.getUTCFullYear() : date.getFullYear();
  var res = new Date();
  if (gmt) res.setUTCFullYear(y + delta, 0, 1);else res.setFullYear(y + delta, 0, 1);
  return beginOfDay(res, gmt);
}

/**
 * @param {Date} date
 * @param {Boolean=} gmt default:false
 * @return {Date} date at 00:00 AM
 */
function nextYear(date, gmt) {
  return addYear(date, 1, gmt);
}

/**
 * @param {Date} date
 * @param {Boolean=} gmt default:false
 * @return {Date} date at 00:00 AM
 */
function prevYear(date, gmt) {
  return addYear(date, -1, gmt);
}

/**
 * @param {Date} date0
 * @param {Date} date1
 * @param {Boolean=} gmt default:false
 * @return {number}
 */
function compareDate(date0, date1, gmt) {
  date0 = beginOfDay(date0, gmt);
  date1 = beginOfDay(date1, gmt);
  //Date(1975, 5, 12) has 1 hour extend
  return Math.floor((date0.getTime() - date1.getTime()) / 86400000);
}

/**
 * @param {Date} date0
 * @param {Date} date1
 * @param {Boolean=} gmt default:false
 * @return {number}
 */

function compareMonth(date0, date1, gmt) {
  var m0 = gmt ? date0.getUTCMonth() : date0.getMonth();
  var y0 = gmt ? date0.getUTCFullYear() : date0.getFullYear();
  var m1 = gmt ? date1.getUTCMonth() : date1.getMonth();
  var y1 = gmt ? date1.getUTCFullYear() : date1.getFullYear();
  return (y0 - y1) * 12 + (m0 - m1);
}

/***
 *
 * @param {Date} date0
 * @param {Date} date1
 * @param {boolean=}gmt
 * @returns {number}
 */
function compareYear(date0, date1, gmt) {
  var y0 = gmt ? date0.getUTCFullYear() : date0.getFullYear();
  var y1 = gmt ? date1.getUTCFullYear() : date1.getFullYear();
  return y0 - y1;
}

/**
 *
 * @param {Date} date
 * @param {number} delta
 * @param {boolean=} gmt
 * @returns {Date}
 */
function addMonth(date, delta, gmt) {
  var res = beginOfMonth(date, gmt);
  if (gmt) {
    res.setUTCMonth(res.getUTCMonth() + delta);
  } else {
    res.setMonth(res.getMonth() + delta);
  }
  return beginOfDay(res, gmt);
}

/**
 *
 * @param {Date} date
 * @param {number} delta
 * @param {boolean=} gmt
 * @returns {Date}
 */
function addMonthKeepDate(date, delta, gmt) {
  var res = addMonth(date, delta, gmt);
  var dateNum = gmt ? date.getUTCDate() : date.getDate();
  var dim = daysInMonth(gmt ? date.getUTCFullYear() : date.getFullYear(), gmt ? date.getUTCFullYear() : date.getFullYear());
  dateNum = Math.min(dateNum, dim);
  res = addDate(res, dateNum - 1, gmt);
  return res;
}

/**
 *
 * @param {Date} date
 * @param {number} delta
 * @param {boolean=} gmt
 * @returns {Date}
 */
function addMonthKeepDateTime(date, delta, gmt) {
  var dayOffset = date.getTime() - beginOfDay(date, gmt).getTime();
  var res = addMonthKeepDate(date, delta, gmt);
  res = new Date(res.getTime() + dayOffset);
  return res;
}

/**
 *
 * @param {Date} date
 * @param {boolean=} gmt
 * @returns {Date}
 */
function nextMonth(date, gmt) {
  return addMonth(date, 1, gmt);
}

/**
 *
 * @param {Date} date
 * @param {boolean=} gmt
 * @returns {Date}
 */
function prevMonth(date, gmt) {
  return addMonth(date, -1, gmt);
}

/**
 * note:argument will be converted to 00h00
 * @param date0
 * @param date1
 */
function monthOfTwoDate(date0, date1) {
  date0 = beginOfDay(date0);
  date1 = beginOfDay(date1);
  var temp;
  var sign = 1;
  var res = 0;
  var cmdv = compareDate(date0, date1);
  if (cmdv > 0) {
    sign = -1;
    temp = date0;
    date0 = date1;
    date1 = temp;
  } else if (cmdv === 0) return 0;
  var d1 = date0.getDate();
  var d2 = date1.getDate();
  var y0 = date0.getFullYear();
  var y1 = date1.getFullYear();
  var m0 = date0.getMonth();
  var m1 = date1.getMonth();
  var nextMD0;
  if (d1 <= d2) {
    res += (y1 - y0) * 12 + (m1 - m0);
    res += 2 * (d2 - d1) / (daysInMonth(y0, m0) + daysInMonth(y1, m1));
  } else {
    res += (y1 - y0) * 12 + (m1 - m0) - 1;
    nextMD0 = beginOfMonth(nextMonth(date0));
    res += 2 * (compareDate(nextMD0, date0) + compareDate(date1, beginOfMonth(date1))) / (daysInMonth(y0, m0) + daysInMonth(y1, m1));
  }
  return sign * res;
}

/**
 *
 * @param {Number} year
 * @param {Number} month
 * @returns {Number}
 */
function daysInMonth(year, month) {
  var start = new Date(year, month, 1);
  var end = nextMonth(start);
  return compareDate(end, start);
}

/****
 *
 * @param text
 * @param format support d, M, Y, Q
 * @param {*=} opt
 * @returns {Date}
 */
function parseDateTime(text, format, opt) {
  opt = Object.assign({
    startDayOfWeek: 0
  }, opt);
  var tokenMap = {};
  var txtRgx = new RegExp(DATE_TIME_TOKEN_RGX.source, 'g');
  var fmRgx = new RegExp(DATE_TIME_TOKEN_RGX.source, 'g');
  var tkMatched, fmMatched;
  tkMatched = txtRgx.exec(text);
  fmMatched = fmRgx.exec(format);
  var tkText, fmText;
  while (tkMatched && fmMatched) {
    tkText = tkMatched[0];
    fmText = fmMatched[0];
    switch (fmText) {
      case 'd':
      case 'dd':
        tokenMap.day = parseInt(tkText, 10);
        break;
      case 'w':
      case 'ww':
        tokenMap.week = parseInt(tkText, 10) - 1;
        break;
      case 'M':
      case 'MM':
        tokenMap.month = parseInt(tkText, 10) - 1;
        break;
      case 'y':
      case 'yyyy':
        tokenMap.year = parseInt(tkText, 10);
        break;
      case 'h':
      case 'hh':
      case 'H':
      case 'HH':
        tokenMap.hour = parseInt(tkText, 10);
        break;
      case 'm':
      case 'mm':
        tokenMap.minute = parseInt(tkText, 10);
        break;
      case 'a':
        if (tkText === 'AM' || tkText === 'PM') tokenMap.period = tkText;else throw new Error('Invalid period(a):' + tkText);
        break;
      case 'Q':
      case 'QQ':
        tokenMap.month = (parseInt(tkText, 10) - 1) * 3;
        break;
      default:
        if (tkText !== fmText) {
          throw new Error('Unexpected token ' + JSON.stringify(tkText) + ' at ' + tkMatched.index + ', expected ' + fmText);
        }
    }
    tkMatched = txtRgx.exec(text);
    fmMatched = fmRgx.exec(format);
  }
  if (tokenMap.period) {
    if (tokenMap.period === 'AM' && tokenMap.hour === 12) tokenMap.hour = 0;else if (tokenMap.period === "PM" && tokenMap.hour < 12) tokenMap.hour += 12;
  }
  var paramNames = ['year', 'month', 'day', 'hour', 'minute', 'second'];
  var paramShortNames = ['y', 'M', 'd', 'h', 'm', 's'];
  var paramDefaultValues = [new Date().getFullYear(), 0, 1, 0, 0, 0];
  var resParam = paramDefaultValues.slice();
  var paramList = paramNames.reduce(function (ac, cr, i) {
    var sN = paramShortNames[i];
    if (cr in tokenMap) {
      ac += sN;
    }
    return ac;
  }, '');
  var paramName;
  for (var i = 0; i < paramNames.length; ++i) {
    paramName = paramNames[i];
    resParam[i] = tokenMap[paramName] === undefined ? paramDefaultValues[i] : tokenMap[paramName];
  }
  var weekDate;
  if ('week' in tokenMap && !isNaN(tokenMap.week)) {
    weekDate = weekInYear(resParam[0], tokenMap.week, false, opt.startDayOfWeek);
    resParam[1] = weekDate.getMonth();
    resParam[2] = weekDate.getDate();
  }
  switch (paramList) {
    case 'hm':
      resParam.splice(1, 2, new Date().getMonth(), new Date().getDate());
      break;
  }
  return new Date(resParam[0], resParam[1], resParam[2], resParam[3], resParam[4], resParam[5]);
}

/***
 *
 * @param {Date} date
 * @param {string} format
 * @param {*=} opt
 * @return {string}
 */
function formatDateTime(date, format, opt) {
  opt = Object.assign({
    startDayOfWeek: 0
  }, opt);
  var fmRgx = new RegExp(DATE_TIME_TOKEN_RGX.source, 'g');
  return format.replace(fmRgx, function (s) {
    var res = s;
    switch (s) {
      case 'd':
      case 'dd':
        res = (0, _int.integerZeroPadding)(date.getDate(), s.length);
        break;
      case 'w':
      case 'ww':
        res = (0, _int.integerZeroPadding)(weekIndexOf(date, false, opt.startDayOfWeek || getDefaultFirstDayOfWeek()) + 1, s.length);
        break;
      case 'M':
      case 'MM':
        res = (0, _int.integerZeroPadding)(date.getMonth() + 1, s.length);
        break;
      case 'MMM':
        res = shortMonthNames[date.getMonth()];
        break;
      case 'MMMM':
        res = monthNames[date.getMonth()];
        break;
      case 'y':
      case 'yyyy':
        res = (0, _int.integerZeroPadding)(date.getFullYear(), s.length);
        break;
      case 'yy':
        res = (0, _int.integerZeroPadding)(date.getFullYear() % 100, s.length);
        break;
      case 'a':
        res = date.getHours() < 12 ? "AM" : "PM";
        break;
      case "H":
      case 'HH':
        res = (0, _int.integerZeroPadding)(date.getHours(), s.length);
        break;
      case 'h':
      case 'hh':
        res = (0, _int.integerZeroPadding)(1 + (date.getHours() - 1) % 12, s.length);
        break;
      case 'm':
      case 'mm':
        res = (0, _int.integerZeroPadding)(date.getMinutes(), s.length);
        break;
      case 's':
      case 'ss':
        res = (0, _int.integerZeroPadding)(date.getSeconds(), s.length);
        break;
      case 'Q':
      case 'QQ':
        res = (0, _int.integerZeroPadding)(Math.floor(date.getMonth() / 3) + 1, s.length);
        break;
    }
    return res;
  });
}
var number = [/[+-]?\d+$/, function (matched) {
  return new Date(parseInt(matched[0]));
}];
var reISO = [/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*))(?:Z|(\+|-)([\d|:]*))?$/, function (matched) {
  return new Date(matched[0]);
}];
var reMsAjax = [/^\/Date\((d|-|.*)\)[\/|\\]$/, function (matched) {
  return new Date(parseInt(matched[1]));
}];
var reString = [/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s+([a-zA-Z]{3})\s+[\d\s:]+GMT[\d+]+\s*\([^)]+\)$/, function (matched) {
  return new Date(matched[0]);
}];
function implicitDate(o) {
  var res = null;
  if (o instanceof Date) {
    res = new Date(o.getTime());
  } else if (typeof o === "number") {
    res = new Date(o);
  } else if (typeof o === 'string') {
    [reString, reISO, reMsAjax, number].some(function (rule) {
      var matched = o.match(rule[0]);
      if (matched) {
        res = rule[1](matched);
        return true;
      }
      return false;
    });
  }
  if (res && isNaN(res.getTime())) res = null;
  return res;
}

/***
 *
 * @param {null|{dayOffset?: number, duration?: number}}range
 * @param opt
 */
function formatTimeRange24(range, opt) {
  opt = Object.assign({
    nextDayText: !window.systemconfig || typeof window.systemconfig.language !== "string" || window.systemconfig.language.toLowerCase().indexOf('vn') >= 0 || window.systemconfig.language.toLowerCase().indexOf('vi') >= 0 ? 'Hôm sau' : 'Next day'
  }, opt || {});
  range = range || {};
  var m0 = Math.floor(range.dayOffset / MILLIS_PER_MINUTE);
  var h0 = Math.floor(m0 / 60);
  var d0 = Math.floor(h0 / 24);
  m0 = m0 % 60;
  h0 = h0 % 24;
  var endOffset = range.dayOffset + range.duration;
  var m1 = Math.floor(endOffset / MILLIS_PER_MINUTE);
  var h1 = Math.floor(m1 / 60);
  var d1 = Math.floor(h1 / 24);
  m1 = m1 % 60;
  h1 = h1 % 24;
  var res = h0 + ':' + (0, _int.integerZeroPadding)(m0, 2) + ' - ' + h1 + ':' + (0, _int.integerZeroPadding)(m1, 2);
  if (d0 !== d1) res += ' (' + opt.nextDayText + ')';
  return res;
}

/**
 *
 * @param {Date} date
 * @param type
 * @param {number} n
 * @returns {{expireddate: Date, startdate: Date}}
 */
function getTimeRangeFromStep(date, type, n) {
  var startDate, expiredDate;
  var initHandlers = {
    month: function month(x) {
      return beginOfMonth(x);
    },
    quarter: function quarter(x) {
      return beginOfQuarter(x);
    },
    year: function year(x) {
      return beginOfYear(x);
    }
  };
  var addHandlers = {
    month: function month(x, d) {
      return addMonth(x, d);
    },
    quarter: function quarter(x, d) {
      return addQuarter(x, d);
    },
    year: function year(x, d) {
      return addYear(x, d);
    }
  };
  startDate = initHandlers[type](addHandlers[type](date, n));
  expiredDate = addHandlers[type](startDate, 1);
  return {
    startdate: startDate,
    expireddate: expiredDate
  };
}

/***/ }),

/***/ 83383:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _XMLDeclarationNode = _interopRequireDefault(__webpack_require__(76314));
var _XMLElement = _interopRequireDefault(__webpack_require__(87901));
var _XMLTextNode = _interopRequireDefault(__webpack_require__(71672));
var _XMLConstant = _interopRequireDefault(__webpack_require__(69865));
var _XMLCommentNode = _interopRequireDefault(__webpack_require__(62024));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
 * 
 * @param {RegExp} regex 
 */
function getRegexBody(regex) {
  return regex.toString().match(/^\/(.+)\/([gimuy]*)$/)[1];
}
var BEGIN_TAG = 1;
var END_TAG = 2;
var CDATA = 3;
var DECLARATION = 4;
var COMMENT = 5;
var TEXT = 6;
var identRgx = /[^\s\"\r\n\'\!\/=\>\<\]\[\?\+\.]+/;
var spaceRgx = /[\s\r\n]+/;
var stringRgx = /\"(([^\"\\]*|(\\.))*)\"/;
var textRgx = /[^\<\-]+/;
var doctypeOpenRgx = /\<\!DOCTYPE/;
var commentOpenRgx = /\<!\-\-/;
var commentCloseRgx = /\-\-\>/;
var cdataOpenRgx = /\<\!\[CDATA\[/;
var cdataCloseRgx = /\]\]\>/;
var openRgx = /\</;
var openEndTagRgx = /\<\//;
var closeRgx = /\>/;
var shortCloseRgx = /\/\>/;
var declarationOpenRgx = /\<\?/;
var declarationCloseRgx = /\?\>/;
var assignOpRgx = /=/;
var tokenRgxBody = '(' + [spaceRgx, doctypeOpenRgx, declarationOpenRgx, cdataOpenRgx, commentOpenRgx, openEndTagRgx, openRgx, assignOpRgx, stringRgx, commentCloseRgx, identRgx, declarationCloseRgx, shortCloseRgx, closeRgx, cdataCloseRgx, textRgx].map(function (e) {
  return getRegexBody(e);
}).join(')|(') + ')';
var tokenType = {
  space: spaceRgx,
  doctypeOpen: doctypeOpenRgx,
  declarationOpen: declarationOpenRgx,
  cdataOpen: cdataOpenRgx,
  commentOpen: commentOpenRgx,
  openEndTag: openEndTagRgx,
  open: openRgx,
  ident: identRgx,
  assignOp: assignOpRgx,
  string: stringRgx,
  commentClose: commentCloseRgx,
  declarationClose: declarationCloseRgx,
  shortClose: shortCloseRgx,
  close: closeRgx,
  cdataClose: cdataCloseRgx,
  text: textRgx
};
var tokenRgx = new RegExp(tokenRgxBody);

/**
 * 
 * @typedef {Object} Token
 * @property {String} text
 * @property {*} matched
 */

/**
 * 
 * @param {String} text 
 * @returns {Array<Token>}
 */
function xmlTokenize(text) {
  var texts = text.match(new RegExp(tokenRgxBody, 'g'));
  return text.match(new RegExp(tokenRgxBody, 'g')).map(function (tokenText, i) {
    var result = {
      text: tokenText,
      matched: {}
    };
    for (var tType in tokenType) {
      var matched = tokenText.match(tokenType[tType]);
      if (matched) {
        if (matched[0] == tokenText) result.matched[tType] = matched;
      }
    }
    return result;
  });
}

/**
 * @typedef {Object} XMLPaseInfo
 * @property {Array<Token>} tokens
 * @property {Number} type
 * @property {Number} start
 * @property {Number} end
 * @property {Error} error
 * @property {Boolean} closed
 * 
 * 
 * 
 * @typedef {Object} XMLParseNode 
 * @property {XMLPaseInfo} __xml__
 * @property {String} tagName
 * @property {*} attributes
 * @property {String} text
 */

/**
 * 
 * @param {Array<Token>} tokens 
 * @param {Number} i 
 * @returns {XMLParseNode}
 */
function matchAssign(tokens, i) {
  var result = {
    __xml__: {
      start: i
    }
  };
  var cToken;
  if (i < tokens.length) {
    cToken = tokens[i];
    if (cToken.matched['ident']) {
      result.key = cToken.text;
      ++i;
      if (i < tokens.length) {
        cToken = tokens[i];
        if (cToken.matched['space']) {
          ++i;
        }
        if (i < tokens.length) {
          cToken = tokens[i];
          if (cToken.matched['assignOp']) {
            ++i;
            if (i < tokens.length) {
              cToken = tokens[i];
              if (cToken.matched['space']) {
                ++i;
              }
              if (i < tokens.length) {
                cToken = tokens[i];
                if (cToken.matched['string']) {
                  result.value = cToken.matched.string[1];
                  ++i;
                } else {
                  result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected string');
                }
              } else {
                result.__xml__.error = new Error('End of data found, expected ident');
              }
            } else {
              result.__xml__.error = new Error('End of data found, expected ident');
            }
          } else {
            result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected =');
          }
        } else {
          result.__xml__.error = new Error('End of data found, expected =');
        }
      } else {
        result.__xml__.error = new Error('End of data found, expected =');
      }
    } else {
      result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected ident');
    }
  } else {
    result.__xml__.error = new Error('End of data found, expected ident');
  }
  result.__xml__.end = i;
  return result;
}

/**
 * 
 * @param {Array<Token>} tokens 
 * @param {Number} i 
 * @returns {XMLParseNode}
 */
function matchBeginTag(tokens, i) {
  var result = {
    __xml__: {
      type: BEGIN_TAG,
      start: i
    }
  };
  var cToken;
  if (i < tokens.length) {
    cToken = tokens[i];
    if (cToken.matched['open']) {
      ++i;
      if (i < tokens.length) {
        cToken = tokens[i];
        if (cToken.matched['ident']) {
          result.tagName = cToken.text;
          ++i;
          if (i < tokens.length) {
            var finished = false; //when find the close symbol
            while (i < tokens.length) {
              cToken = tokens[i];
              if (cToken.matched['space']) {
                ++i;
              } //skip space between attributes
              if (i < tokens.length) {
                cToken = tokens[i];
                if (cToken.matched['shortClose']) {
                  result.__xml__.closed = true;
                  ++i;
                  finished = true;
                  break;
                } else if (cToken.matched['close']) {
                  result.__xml__.closed = false;
                  ++i;
                  finished = true;
                  break;
                } else if (tokens[i - 1].matched['space']) {
                  var assign = matchAssign(tokens, i);
                  if (!assign.__xml__.error) {
                    result.attributes = result.attributes || {};
                    result.attributes[assign.key] = assign.value;
                    i = assign.__xml__.end;
                  } else if (cToken.matched['ident']) {
                    result.attributes = result.attributes || {};
                    result.attributes[cToken.text] = true; // a flag
                    ++i;
                  } else {
                    //TODO: we can ignore some error here, the same with order Match* function
                    result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected > or indent');
                    break;
                  }
                } else {
                  //TODO: we can ignore some error here
                  result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected > or indent');
                  break;
                }
              } else {
                result.__xml__.error = new Error('End of data found, expected /> or >');
                break;
              }
            }
            if (!finished && !result.__xml__.error) {
              result.__xml__.error = new Error('End of data found, expected /> or >');
            }
          } else {
            result.__xml__.error = new Error('End of data found, expected /> or >');
          }
        } else {
          result.__xml__.error = new Error('Expected indent');
        }
      } else {
        result.__xml__.error = new Error('End of data found, expected indent');
      }
      result.__xml__.end = i;
    } else {
      result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected <');
    }
  } else {
    result.__xml__.error = new Error('End of data found, expected <');
  }
  result.__xml__.end = i;
  return result;
}

/**
 * 
 * @param {Array<Token>} tokens 
 * @param {Number} i 
 * @returns {XMLParseNode}
 */
function matchEndTag(tokens, i) {
  var result = {
    __xml__: {
      type: END_TAG,
      closed: true,
      start: i
    }
  };
  var cToken;
  if (i < tokens.length) {
    cToken = tokens[i];
    if (cToken.matched['openEndTag']) {
      ++i;
      if (i < tokens.length) {
        cToken = tokens[i];
        if (cToken.matched['ident']) {
          result.tagName = cToken.text;
          ++i;
          if (i < tokens.length) {
            var finished = false; //when find the close symbol
            while (i < tokens.length) {
              cToken = tokens[i];
              if (cToken.matched['space']) {
                ++i;
              } //skip space between attributes
              if (i < tokens.length) {
                cToken = tokens[i];
                if (cToken.matched['close']) {
                  ++i;
                  finished = true;
                  break;
                } else if (tokens[i - 1].matched['space']) {
                  var assign = matchAssign(tokens, i);
                  if (!assign.__xml__.error) {
                    result.attributes = result.attributes || {};
                    result.attributes[assign.key] = assign.value;
                    i = assign.__xml__.end;
                  } else if (cToken.matched['ident']) {
                    result.attributes = result.attributes || {};
                    result.attributes[cToken.text] = true; // a flag
                    ++i;
                  } else {
                    result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected > or indent');
                  }
                } else {
                  result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected > or indent');
                }
              } else {
                result.__xml__.error = new Error('End of data found, expected /> or >');
              }
            }
            if (!finished && !result.__xml__.error) {
              result.__xml__.error = new Error('End of data found, expected /> or >');
            }
          } else {
            result.__xml__.error = new Error('End of data found, expected /> or >');
          }
        } else {
          result.__xml__.error = new Error('Expected indent');
        }
      } else {
        result.__xml__.error = new Error('End of data found, expected indent');
      }
      result.__xml__.end = i;
    } else {
      result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected <');
    }
  } else {
    result.__xml__.error = new Error('End of data found, expected <');
  }
  result.__xml__.end = i;
  return result;
}

/**
 * 
 * @param {Array<Token>} tokens 
 * @param {Number} i 
 * @returns {XMLParseNode}
 */
function matchDeclaration(tokens, i) {
  var result = {
    __xml__: {
      type: DECLARATION,
      start: i
    }
  };
  var cToken;
  if (i < tokens.length) {
    cToken = tokens[i];
    if (cToken.matched['declarationOpen']) {
      ++i;
      if (i < tokens.length) {
        cToken = tokens[i];
        if (cToken.matched['ident']) {
          result.tagName = cToken.text;
          ++i;
          if (i < tokens.length) {
            var finished = false; //when find the close symbol
            while (i < tokens.length) {
              cToken = tokens[i];
              if (cToken.matched['space']) {
                ++i;
              } //skip space between attributes
              if (i < tokens.length) {
                cToken = tokens[i];
                if (cToken.matched['declarationClose']) {
                  result.__xml__.closed = false;
                  ++i;
                  finished = true;
                  break;
                } else if (tokens[i - 1].matched['space']) {
                  var assign = matchAssign(tokens, i);
                  if (!assign.__xml__.error) {
                    result.attributes = result.attributes || {};
                    result.attributes[assign.key] = assign.value;
                    i = assign.__xml__.end;
                  } else if (cToken.matched['ident']) {
                    result.attributes = result.attributes || {};
                    result.attributes[cToken.text] = true; // a flag
                    ++i;
                  } else {
                    result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected > or indent');
                  }
                } else {
                  result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected > or indent');
                }
              } else {
                result.__xml__.error = new Error('End of data found, expected /> or >');
              }
            }
            if (!finished && !result.__xml__.error) {
              result.__xml__.error = new Error('End of data found, expected /> or >');
            }
          } else {
            result.__xml__.error = new Error('End of data found, expected /> or >');
          }
        } else {
          result.__xml__.error = new Error('Expected indent');
        }
      } else {
        result.__xml__.error = new Error('End of data found, expected indent');
      }
      result.__xml__.end = i;
    } else {
      result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected <');
    }
  } else {
    result.__xml__.error = new Error('End of data found, expected <');
  }
  result.__xml__.end = i;
  return result;
}

/**
 * 
 * @param {Array<Token>} tokens 
 * @param {Number} i 
 * @returns {XMLParseNode}
 */
function matchCData(tokens, i) {
  var result = {
    __xml__: {
      type: CDATA,
      start: i
    }
  };
  var cToken;
  if (i < tokens.length) {
    cToken = tokens[i];
    if (cToken.matched['cdataOpen']) {
      ++i;
      result.text = '';
      var finished = false;
      while (i < tokens.length) {
        cToken = tokens[i];
        if (cToken.matched['cdataClose']) {
          finished = true;
          ++i;
          break;
        } else {
          result.text += cToken.text;
          ++i;
        }
      }
      if (!finished) {
        result.__xml__.error = new Error('End of data found, expected ]]>');
      }
    } else {
      result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected <![CDATA[');
    }
  } else {
    result.__xml__.error = new Error('End of data found, expected <![CDATA[');
  }
  result.__xml__.end = i;
  return result;
}

/**
 * 
 * @param {Array<Token>} tokens 
 * @param {Number} i 
 * @returns {XMLParseNode}
 */
function matchComment(tokens, i) {
  var result = {
    __xml__: {
      type: COMMENT,
      start: i
    }
  };
  var cToken;
  if (i < tokens.length) {
    cToken = tokens[i];
    if (cToken.matched['commentOpen']) {
      ++i;
      result.text = '';
      var finished = false;
      while (i < tokens.length) {
        cToken = tokens[i];
        if (cToken.matched['commentClose']) {
          finished = true;
          ++i;
          break;
        } else {
          result.text += cToken.text;
          ++i;
        }
      }
      if (!finished) {
        result.__xml__.error = new Error('End of data found, expected -->');
      }
    } else {
      result.__xml__.error = new Error('"' + cToken.text + '"' + 'found, expected <!--');
    }
  } else {
    result.__xml__.error = new Error('End of data found, expected <!--');
  }
  result.__xml__.end = i;
  return result;
}

/**
 * 
 * @param {Token} tokens 
 */
function parseXMLTab(tokens) {
  var tabs = [];
  var i = 0;
  while (i < tokens.length) {
    var comment = matchComment(tokens, i);
    if (!comment.__xml__.error) {
      tabs.push(comment);
      i = comment.__xml__.end;
    } else {
      var declaration = matchDeclaration(tokens, i);
      if (!declaration.__xml__.error) {
        tabs.push(declaration);
        i = declaration.__xml__.end;
      } else {
        var begin = matchBeginTag(tokens, i);
        if (!begin.__xml__.error) {
          tabs.push(begin);
          i = begin.__xml__.end;
        } else {
          var end = matchEndTag(tokens, i);
          if (!end.__xml__.error) {
            tabs.push(end);
            i = end.__xml__.end;
          } else {
            var cdata = matchCData(tokens, i);
            if (!cdata.__xml__.error) {
              tabs.push(cdata);
              i = cdata.__xml__.end;
            } else {
              ++i; //skip
            }
          }
        }
      }
    }
  }

  return tabs;
}

/**
 * 
 * @param {Array<Token>} tokens 
 * @param {Array<XMLParseNode>} tabs 
 * @returns {Array<XMLParseNode>}
 */
function parseXMLText(tokens, tabs) {
  var texts = [];
  var ofs = 0;
  var text;
  var tab;
  for (var i = 0; i < tabs.length; ++i) {
    tab = tabs[i];
    if (tab.__xml__.start > ofs) {
      text = tokens.slice(ofs, tab.__xml__.start).map(function (token) {
        return token.text;
      }).join('').trim();
      if (text.length > 0) texts.push({
        __xml__: {
          type: TEXT,
          tokens: tokens,
          start: ofs,
          end: tab.__xml__.start
        },
        text: text
      });
    }
    ofs = tab.__xml__.end;
  }
  if (ofs < tokens.length) {
    text = tokens.slice(ofs).map(function (token) {
      return token.text;
    }).join('').trim();
    if (text.length > 0) texts.push({
      __xml__: {
        type: TEXT,
        tokens: tokens,
        start: ofs,
        end: tab.__xml__.start
      },
      text: text
    });
  }
  return texts;
}

/**
 * 
 * @param {Array<XMLParseNode>} tabs 
 * @param {Array<XMLParseNode>} texts 
 * @return {Array<XMLParseNode>}  
 */
function mergeNodes(tabs, texts) {
  var nodes = [];
  var choose;
  var iTabs = 0,
    iTexts = 0;
  var diTabs, diTexts;
  var minStart;
  do {
    choose = undefined;
    diTabs = 0, diTexts = 0;
    minStart = 100000000;
    if (iTabs < tabs.length) {
      choose = tabs[iTabs];
      minStart = choose.__xml__.start;
      diTabs = 1;
    }
    if (iTexts < texts.length && texts[iTexts].__xml__.start < minStart) {
      choose = texts[iTexts];
      minStart = choose.__xml__.start;
      diTabs = 0;
      diTexts = 1;
    }
    if (choose) {
      iTexts += diTexts;
      iTabs += diTabs;
      nodes.push(choose);
    }
  } while (choose);
  return nodes;
}

/**
 * 
 * @param {String} text 
 * @return {Array<XMLParseNode>} 
 */
function parseXMLTextToXMLParseNode(text) {
  text = text.trim();
  var tokens = xmlTokenize(text.trim());
  var tabs = parseXMLTab(tokens);
  var texts = parseXMLText(tokens, tabs);
  return mergeNodes(tabs, texts);
}

/**
 * 
 * @param {Array<XMLParseNode>} nodes
 * @returns {Array}
 */
function paresNodesToXMLs(nodes) {
  var node;
  var parentXMLElement = new _XMLElement["default"]();
  parentXMLElement.tagName = "FAKE_DOCUMENT";
  var assignAttributes = function assignAttributes(node, attributes) {
    Object.keys(attributes).forEach(function (key) {
      node.setAttribute(key, attributes[key]);
    });
  };
  var newXMLNode;
  for (var i = 0; i < nodes.length; ++i) {
    node = nodes[i];
    newXMLNode = undefined;
    switch (node.__xml__.type) {
      case DECLARATION:
        newXMLNode = new _XMLDeclarationNode["default"]();
        newXMLNode.tagName = node.tagName;
        if (node.attributes) assignAttributes(newXMLNode, node.attributes);
        parentXMLElement.appendChild(newXMLNode);
        break;
      case BEGIN_TAG:
        newXMLNode = new _XMLElement["default"]();
        newXMLNode.tagName = node.tagName;
        if (node.attributes) assignAttributes(newXMLNode, node.attributes);
        parentXMLElement.appendChild(newXMLNode);
        if (!node.__xml__.closed) parentXMLElement = newXMLNode;
        break;
      case END_TAG:
        if (parentXMLElement && node.tagName == parentXMLElement.tagName) {
          parentXMLElement = parentXMLElement.parentNode;
        } else if (parentXMLElement && (parentXMLElement.tagName == 'img' || parentXMLElement.tagName == 'input')) {
          // image can be not close
          while (parentXMLElement.tagName == 'img' || parentXMLElement.tagName == 'input') {
            parentXMLElement = parentXMLElement.parentNode;
          }
          parentXMLElement = parentXMLElement.parentNode;
        } else {
          throw new Error("Unknown close of tagName " + node.tagName + ', but ' + (parentXMLElement ? parentXMLElement.tagName : "EOF") + ' expected');
        }
        break;
      case TEXT:
        newXMLNode = new _XMLTextNode["default"](node.text);
        parentXMLElement.appendChild(newXMLNode);
        break;
      case COMMENT:
        newXMLNode = new _XMLCommentNode["default"](node.text);
        parentXMLElement.appendChild(newXMLNode);
        break;
    }
  }
  return parentXMLElement.childNodes.slice().map(function (e) {
    e.remove();
    return e;
  });
}

/**
 * 
 * @param {XMLElement} node 
 */
function makeOpenXMLElementTab(node) {
  var res = '<' + node.tagName;
  var attributesText = Object.keys(node.attributes).map(function (key) {
    var value = node.attributes[key];
    if (value === null) {
      return key;
    } else {
      return key + '=' + '"' + value + '"';
    }
  }).join(' ');
  if (attributesText.length > 0) {
    res += ' ' + attributesText;
  }
  res += '>';
  return res;
}

/**
 * 
 * @param {XMLDeclaretionNode} node 
 */
function makeXMLDeclaretionTab(node) {
  var res = '<?' + node.tagName;
  var attributesText = Object.keys(node.attributes).map(function (key) {
    var value = node.attributes[key];
    if (value === null) {
      return key;
    } else {
      return key + '=' + '"' + value + '"';
    }
  }).join(' ');
  if (attributesText.length > 0) {
    res += ' ' + attributesText;
  }
  res += '?>';
  return res;
}

/**
 * 
 * @param {XMLDeclaretionNode} node 
 */
function makeXMLCommentTab(node) {
  var res = '<!--' + node.data + '-->';
  return res;
}
var XML = {};

/**
 * @param {String} code
 * @returns {Array<XMLElement>}
 */
XML.parseLikeHTML = function (code) {
  var nodes = parseXMLTextToXMLParseNode(code);
  // console.log('nodes', nodes);
  var xmls = paresNodesToXMLs(nodes);
  return xmls;
};

/**
 * @param {String} code
 * @returns {XMLElement}
 */
XML.parse = function (code) {
  var xmls = this.parseLikeHTML(code);
  if (xmls.length == 0) return undefined;
  var obj = xmls[xmls.length - 1].toObject();
  return obj;
};
XML.DFNodeVisit = function (node, handlers, accumulator) {
  if (!node.childNodes || node.childNodes.length == 0) {
    if (handlers.leaf) handlers.leaf(accumulator, node);
  } else {
    if (handlers.open) handlers.open(accumulator, node);
    for (var i = 0; i < node.childNodes.length; ++i) {
      this.DFNodeVisit(node.childNodes[i], handlers, accumulator);
    }
    if (handlers.close) handlers.close(accumulator, node);
    return accumulator;
  }
};

/**
 * @typedef {Object} XMLBeautifyOption
 * @property {String} indent
 * @property {Number} initDepth 
 */

/**
 * @param {Array<XMLElement>} o 
 * @param {XMLBeautifyOption} beautifyOption 
 * 
 * 
 */
XML.stringify = function (o, beautifyOption) {
  var texts = [];
  var indent = '';
  var lineBreak = '';
  var depth = 0;
  if (beautifyOption) {
    lineBreak = '\n';
    indent = typeof beautifyOption.indent == 'string' ? beautifyOption.indent : '    ';
    depth = beautifyOption.initDepth || 0;
  }
  if (!(o instanceof Array)) {
    o = [o];
  }
  var visitor = {
    open: function open(ac, node) {
      var currentLineIndent = ac.lineIndentStack[ac.lineIndentStack.length - 1];
      var openTabText = makeOpenXMLElementTab(node);
      ac.texts.push(currentLineIndent + openTabText);
      ac.lineIndentStack.push(currentLineIndent + ac.indent);
    },
    close: function close(ac, node) {
      ac.lineIndentStack.pop();
      var currentLineIndent = ac.lineIndentStack[ac.lineIndentStack.length - 1];
      var endTab = '</' + node.tagName + '>';
      if (node.childNodes.length == 1 && node.childNodes[0].nodeType == _XMLConstant["default"].TYPE_TEXT) {
        ac.texts[ac.texts.length - 1] += endTab;
      } else {
        ac.texts.push(currentLineIndent + endTab);
      }
    },
    leaf: function leaf(ac, node) {
      var currentLineIndent = ac.lineIndentStack[ac.lineIndentStack.length - 1];
      var tab;
      if (node.nodeType == _XMLConstant["default"].TYPE_TEXT) {
        if (node.parentNode && node.parentNode.childNodes.length == 1) {
          ac.texts[ac.texts.length - 1] += node.data;
        } else {
          ac.texts.push(currentLineIndent + node.data);
        }
      } else if (node.nodeType == _XMLConstant["default"].TYPE_ELEMENT) {
        var openTabText = makeOpenXMLElementTab(node);
        var endTab = '</' + node.tagName + '>';
        ac.texts.push(currentLineIndent + openTabText + endTab);
      } else if (node.nodeType == _XMLConstant["default"].TYPE_DECLARATION) {
        tab = makeXMLDeclaretionTab(node);
        ac.texts.push(currentLineIndent + tab);
      } else if (node.nodeType == _XMLConstant["default"].TYPE_COMMENT) {
        tab = makeXMLCommentTab(node);
        ac.texts.push(currentLineIndent + tab);
      }
    }
  };
  for (var i = 0; i < o.length; ++i) {
    this.DFNodeVisit(o[i], visitor, {
      depth: 0,
      texts: texts,
      lineIndentStack: [''],
      indent: indent
    });
  }
  return texts.join(lineBreak);
};
var _default = XML;
exports["default"] = _default;

/***/ }),

/***/ 40689:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * 
 * @param {XMLElement} xmlNode 
 */
function XMLClassList(xmlNode) {
  this.xmlNode = xmlNode;
}

/**
 * @param {String} name
 * @returns {Boolean}
 */
XMLClassList.prototype.contains = function (name) {
  var className = this.xmlNode.getAttribute('class');
  if (className) {
    var classes = className.trim().split(/\s+/);
    for (var i = 0; i < classes.length; ++i) {
      if (classes[i] == name) return true;
    }
    return false;
  } else return false;
};

/**
 * @param {Number} index
 * @returns {String}
 */
XMLClassList.prototype.item = function (index) {
  var className = this.xmlNode.getAttribute('class');
  if (className) {
    var classes = className.trim().split(/\s+/);
    return classes[index];
  } else return undefined;
};

/**
 * @param {Array<String>} arguments
 */
XMLClassList.prototype.remove = function () {
  var dict = Array.prototype.reduce.call(arguments, function (ac, name) {
    ac[name] = true;
    return ac;
  }, {});
  var className = this.xmlNode.getAttribute('class');
  if (className) {
    var classes = className.trim().split(/\s+/);
    var newClasses = classes.filter(function (name) {
      dict[name];
    });
    this.xmlNode.setAttribute(newClasses.join(' '));
  }
};

/**
 * @param {Array<String>} arguments
 */
XMLClassList.prototype.add = function () {
  var className = this.xmlNode.getAttribute('class') || '';
  var classes = className.trim().split(/\s+/);
  var dict = classes.reduce(function (ac, name) {
    ac[name] = true;
    return ac;
  }, {});
  for (var i = 0; i < arguments.length; ++i) {
    var newClass = arguments[i].trim();
    if (newClass.length == 0) return;
    if (!dict[newClass]) {
      classes.push(newClass);
      dict[newClass] = true;
    }
  }
  this.xmlNode.setAttribute('class', classes.join(' '));
};
var _default = XMLClassList;
exports["default"] = _default;

/***/ }),

/***/ 62024:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _XMLConstant = _interopRequireDefault(__webpack_require__(69865));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function XMLCommentNode(data) {
  this.nodeType = _XMLConstant["default"].TYPE_COMMENT;
  /**
   * @type {XMLNode}
   */
  this.parentNode;
  /**
   * @type {String}
   */
  this.data = data || '';
}
XMLCommentNode.prototype.remove = function () {
  if (this.parentNode) {
    this.parentNode.removeChild(this);
  }
};
XMLCommentNode.prototype.toObject = function () {
  return {
    nodeType: this.nodeType,
    data: this.data
  };
};
var _default = XMLCommentNode;
exports["default"] = _default;

/***/ }),

/***/ 69865:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var XMLConstant = {
  TYPE_ELEMENT: 1,
  TYPE_TEXT: 3,
  TYPE_COMMENT: 8,
  TYPE_DECLARATION: 16
};
var _default = XMLConstant;
exports["default"] = _default;

/***/ }),

/***/ 76314:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _XMLConstant = _interopRequireDefault(__webpack_require__(69865));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function XMLDeclaretionNode() {
  this.nodeType = _XMLConstant["default"].TYPE_DECLARATION;
  this.parentNode;
  /**
   * @type {String}
   */
  this.tagName = '';
  /**
  * @type {XMLElement}
  */
  this.parentNode;
  this.attributes = {};
}

/**
 * @param {String} name attribute name
 */
XMLDeclaretionNode.prototype.getAttribute = function (name) {
  return this.attributes[name];
};

/**
 * @param {String} name attribute name
 * @param {String} value 
 */
XMLDeclaretionNode.prototype.setAttribute = function (name, value) {
  this.attributes[name] = value;
};

/**
 * @param {String} name attribute name
 */
XMLDeclaretionNode.prototype.removeAttribute = function (name) {
  delete this.attributes[name];
};
XMLDeclaretionNode.prototype.remove = function () {
  if (this.parentNode) {
    this.parentNode.removeChild(this);
  }
};
XMLDeclaretionNode.prototype.toObject = function () {
  return {
    nodeType: this.nodeType,
    tagName: this.tagName,
    attributes: Object.assign({}, this.attributes)
  };
};
var _default = XMLDeclaretionNode;
exports["default"] = _default;

/***/ }),

/***/ 87901:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _XMLClassList = _interopRequireDefault(__webpack_require__(40689));
var _XMLConstant = _interopRequireDefault(__webpack_require__(69865));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function XMLElement() {
  this.nodeType = _XMLConstant["default"].TYPE_ELEMENT;

  /**
   * @type {String}
   */
  this.tagName = '';
  /**
   * @type {XMLElement}
   */
  this.parentNode;
  this.attributes = {};
  /**
   * @type {Array} Array of  XMLElement or XMLText
   */
  this.childNodes = [];
  Object.defineProperty(this, 'classList', {
    value: new _XMLClassList["default"](this),
    writable: false
  });
}

/**
 * @param {String} name attribute name
 */
XMLElement.prototype.getAttribute = function (name) {
  return this.attributes[name];
};

/**
 * @param {String} name attribute name
 * @param {String} value 
 */
XMLElement.prototype.setAttribute = function (name, value) {
  this.attributes[name] = value;
};

/**
 * @param {String} name attribute name
 */
XMLElement.prototype.removeAttribute = function (name) {
  delete this.attributes[name];
};
XMLElement.prototype.appendChild = function (node) {
  node.remove();
  this.childNodes.push(node);
  node.parentNode = this;
  return node;
};

/**
 * @param {XMLElement} child
 * @returns {XMLElement} removed node
 */
XMLElement.prototype.removeChild = function (child) {
  var result;
  if (this == child.parentNode) {
    var j = 0;
    for (var i = 0; i < this.childNodes.length; ++i) {
      if (child != this.childNodes[i]) {
        this.childNodes[j] = this.childNodes[i];
        ++j;
      } else {
        child.parentNode = undefined;
        result = child;
      }
    }
    while (j > this.childNodes.length) {
      this.childNodes.pop();
    }
  }
  return result;
};

/**
 * @param {XMLElement|XMLText|XMLDeclaretionNode} node
 */
XMLElement.prototype.inserBefore = function (node, child) {
  if (node == child) return;
  var childIndex = -1;
  for (var i = 0; i < this.childNodes.length; ++i) {
    if (this.childNodes[i] == child) {
      childIndex = i;
      break;
    }
  }
  if (childIndex < 0) return;
  node.remove();
  node.parentNode = this;
  this.childNodes.push(null);
  var cIndex = this.childNodes.length - 2;
  while (cIndex >= 0) {
    if (this.childNodes[cIndex] == child) {
      this.childNodes[cIndex + 1] = node;
    } else this.childNodes[cIndex + 1] = this.childNodes[cIndex];
  }
};
XMLElement.prototype.remove = function () {
  if (this.parentNode) {
    this.parentNode.removeChild(this);
  }
};
XMLElement.prototype.toObject = function () {
  return {
    nodeType: this.nodeType,
    tagName: this.tagName,
    attributes: Object.assign({}, this.attributes),
    childNodes: this.childNodes.map(function (child) {
      return child.toObject();
    })
  };
};
var _default = XMLElement;
exports["default"] = _default;

/***/ }),

/***/ 71672:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _XMLConstant = _interopRequireDefault(__webpack_require__(69865));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function XMLTextNode(data) {
  this.nodeType = _XMLConstant["default"].TYPE_TEXT;
  /**
   * @type {XMLNode}
   */
  this.parentNode;
  /**
   * @type {String}
   */
  this.data = data || '';
}
XMLTextNode.prototype.remove = function () {
  if (this.parentNode) {
    this.parentNode.removeChild(this);
  }
};
XMLTextNode.prototype.toObject = function () {
  return {
    nodeType: this.nodeType,
    data: this.data
  };
};
var _default = XMLTextNode;
exports["default"] = _default;

/***/ }),

/***/ 46790:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var _ = _interopRequireDefault(__webpack_require__(30018));
var _AElement = _interopRequireDefault(__webpack_require__(63445));
var _AElementNS = _interopRequireDefault(__webpack_require__(75658));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
//for old plugin
_["default"]['HTML' + 'El' + 'ement'.toLowerCase()] = _["default"].Element;
_["default"].dom = _["default"].Dom;
_["default"].event = _["default"].EventEmitter;
_["default"].Event = _["default"].EventEmitter;
_["default"].color = _["default"].Color;
_["default"].documentReady = _["default"].Dom.documentReady;
window.AComp = _["default"].AComp;
window.PhotoSwipeViewer = _["default"].PhotoSwipeViewer;
window.IFrameBridge = _["default"].IFrameBridge;
window.absol = _["default"];
var mapKeys = {
  ShareDom: 'coreDom',
  ShareDomCreator: 'domCreator',
  ShareSvgC: 'coreSvgCreator',
  ShareSvgCreator: 'svgCreator',
  ShareCreator: 'domCreator'
};
_["default"].logData = [];
_["default"].log = function () {
  _["default"].logData.push([new Error('TraceError')].concat(Array.prototype.slice.call(arguments)));
};
Object.keys(mapKeys).forEach(function (key) {
  var valueKey = mapKeys[key];
  Object.defineProperty(_["default"], key, {
    get: function get() {
      if (!this['__warn' + key + '__']) {
        this['__warn' + key + '__'] = true;
        _["default"].log("use " + valueKey + ' instead of ' + key);
      }
      return this[valueKey];
    }
  });
});

/**
 * @deprecated
 * @param {string|Array} className
 * @returns {Boolean}
 */
_AElement["default"].prototype.containsClass = function (className) {
  if (className.forEach && className.map) {
    for (var i = 0; i < className.length; ++i) {
      if (!this.classList.containsClass(className[i])) return false;
    }
    return true;
  } else return this.classList.contains(className);
};

/**
 * @deprecated
 * @param {string|Array} className
 * @returns {Boolean}
 */
_AElementNS["default"].prototype.containsClass = _AElement["default"].prototype.containsClass;

/***/ }),

/***/ 30018:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
__webpack_require__(81284);
var _EventEmitter = _interopRequireDefault(__webpack_require__(46833));
var _BrowserDetector = _interopRequireDefault(__webpack_require__(69638));
var _JSPath = _interopRequireDefault(__webpack_require__(67807));
var _TemplateString = _interopRequireDefault(__webpack_require__(73021));
var _TemplateXML = _interopRequireDefault(__webpack_require__(1401));
var _Dom = _interopRequireWildcard(__webpack_require__(64821));
var _Svg = _interopRequireDefault(__webpack_require__(98315));
var _OOP = _interopRequireDefault(__webpack_require__(38608));
var _XML = _interopRequireDefault(__webpack_require__(83383));
var _Color = _interopRequireDefault(__webpack_require__(64974));
var _IFrameBridge = _interopRequireDefault(__webpack_require__(52281));
var _JSDocx = _interopRequireDefault(__webpack_require__(6733));
var _Broadcast = _interopRequireDefault(__webpack_require__(15910));
var text = _interopRequireWildcard(__webpack_require__(35844));
var file = _interopRequireWildcard(__webpack_require__(54134));
var base64 = _interopRequireWildcard(__webpack_require__(6954));
var _Alarm = _interopRequireDefault(__webpack_require__(30768));
var _Ref = _interopRequireDefault(__webpack_require__(90060));
var _XHR = _interopRequireDefault(__webpack_require__(53710));
var stringGenerate = _interopRequireWildcard(__webpack_require__(10713));
var stringFormat = _interopRequireWildcard(__webpack_require__(22294));
var jsxdom = _interopRequireWildcard(__webpack_require__(18313));
var jsxattribute = _interopRequireWildcard(__webpack_require__(18144));
var _Activity = _interopRequireDefault(__webpack_require__(14594));
var _Context = _interopRequireDefault(__webpack_require__(16311));
var _ContextManager = _interopRequireDefault(__webpack_require__(88062));
var _Application = _interopRequireDefault(__webpack_require__(62480));
var _VarScope = _interopRequireDefault(__webpack_require__(61607));
var _Fragment = _interopRequireDefault(__webpack_require__(5925));
var _Rectangle = _interopRequireDefault(__webpack_require__(62986));
var _Arc = _interopRequireDefault(__webpack_require__(6483));
var _NumRange = _interopRequireDefault(__webpack_require__(96667));
var clipboard = _interopRequireWildcard(__webpack_require__(89085));
var _Heap = _interopRequireDefault(__webpack_require__(92568));
var datetime = _interopRequireWildcard(__webpack_require__(58286));
var _CMDRunner = _interopRequireDefault(__webpack_require__(34470));
var _Element = _interopRequireDefault(__webpack_require__(55781));
var _AElementNS = _interopRequireDefault(__webpack_require__(75658));
var _DomSignal = _interopRequireWildcard(__webpack_require__(47341));
var _CookieStore = _interopRequireDefault(__webpack_require__(30416));
var _parseCookieString = _interopRequireDefault(__webpack_require__(19540));
var _ResizeSystem = _interopRequireDefault(__webpack_require__(62826));
var _Vec = _interopRequireDefault(__webpack_require__(73316));
var _Mat = _interopRequireDefault(__webpack_require__(96603));
var _LanguageSystem = _interopRequireDefault(__webpack_require__(19677));
var _int = _interopRequireWildcard(__webpack_require__(65909));
var _ALogger = _interopRequireDefault(__webpack_require__(47375));
var _FlagManager = _interopRequireDefault(__webpack_require__(64805));
var _ObservableArray = _interopRequireDefault(__webpack_require__(51249));
var _ObservableStruct = _interopRequireDefault(__webpack_require__(65257));
var _CCBlock = _interopRequireDefault(__webpack_require__(99125));
var _CCLine = _interopRequireDefault(__webpack_require__(83141));
var FileSaver = _interopRequireWildcard(__webpack_require__(53069));
var _Thread = _interopRequireDefault(__webpack_require__(44067));
var _generator = __webpack_require__(18528);
var _ShareConfiguration = _interopRequireDefault(__webpack_require__(23376));
var _safeThrow = _interopRequireDefault(__webpack_require__(628));
var array = _interopRequireWildcard(__webpack_require__(40411));
var _remoteRequireNodeAsync = _interopRequireDefault(__webpack_require__(40332));
var _Polygon = _interopRequireDefault(__webpack_require__(25682));
var _DynamicCSS = _interopRequireDefault(__webpack_require__(30401));
var _SCParser = _interopRequireDefault(__webpack_require__(13682));
var _SCProgramInstance = _interopRequireWildcard(__webpack_require__(47790));
var _SCOperatorExecutor = _interopRequireDefault(__webpack_require__(68717));
var _Const = _interopRequireDefault(__webpack_require__(31010));
var _SCScope = _interopRequireDefault(__webpack_require__(55830));
var _SCCodeGenerator = _interopRequireWildcard(__webpack_require__(31647));
var printer = _interopRequireWildcard(__webpack_require__(97397));
var measurements = _interopRequireWildcard(__webpack_require__(23873));
var _QRCode = _interopRequireDefault(__webpack_require__(28485));
var _DelaySignal = _interopRequireDefault(__webpack_require__(81809));
var _BezierCurve = _interopRequireDefault(__webpack_require__(57015));
var _SCCodeValidation = __webpack_require__(87748);
var _MQTTExec = __webpack_require__(54707);
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var absol = {
  "int": _int,
  array: array,
  safeThrow: _safeThrow["default"],
  Rectangle: _Rectangle["default"],
  BezierCurve: _BezierCurve["default"],
  ResizeSystem: _ResizeSystem["default"],
  Arc: _Arc["default"],
  Polygon: _Polygon["default"],
  NumRange: _NumRange["default"],
  CookieStore: _CookieStore["default"],
  parseCookieString: _parseCookieString["default"],
  CMDRunner: _CMDRunner["default"],
  ContextManager: _ContextManager["default"],
  Application: _Application["default"],
  Fragment: _Fragment["default"],
  VarScope: _VarScope["default"],
  Context: _Context["default"],
  Activity: _Activity["default"],
  Element: _Element["default"],
  ElementNS: _AElementNS["default"],
  AElement: _Element["default"],
  AElementNS: _AElementNS["default"],
  DomSignal: _DomSignal["default"],
  DelaySignal: _DelaySignal["default"],
  JSPath: _JSPath["default"],
  TemplateString: _TemplateString["default"],
  TemplateXML: _TemplateXML["default"],
  Dom: _Dom["default"],
  Svg: _Svg["default"],
  BrowserDetector: _BrowserDetector["default"],
  OOP: _OOP["default"],
  XML: _XML["default"],
  Color: _Color["default"],
  EventEmitter: _EventEmitter["default"],
  JSZip: window.JSZip,
  IFrameBridge: _IFrameBridge["default"],
  JSDocx: _JSDocx["default"],
  Broadcast: _Broadcast["default"],
  text: text,
  file: file,
  base64: base64,
  Alarm: _Alarm["default"],
  coreDom: _Dom["default"].ShareInstance,
  coreSvg: _Svg["default"].ShareInstance,
  require: function require(tagName) {
    return this.coreDom.require(tagName) || this.coreSvg.require(tagName);
  },
  domCreator: _Dom["default"].ShareInstance.creator,
  svgCreator: _Dom["default"].ShareInstance.creator,
  _: _Dom["default"].ShareInstance._,
  $: _Dom["default"].ShareInstance.$,
  $$: _Dom["default"].ShareInstance.$$,
  _svg: _Svg["default"].ShareInstance._,
  $svg: _Svg["default"].ShareInstance.$,
  Ref: _Ref["default"],
  Const: _Const["default"],
  XHR: _XHR["default"],
  string: Object.assign({}, stringFormat, stringGenerate),
  jsx: {
    dom: jsxdom,
    attribute: jsxattribute
  },
  QRCode: _QRCode["default"],
  clipboard: clipboard,
  dataStructure: {
    Heap: _Heap["default"]
  },
  datetime: datetime,
  Vec2: _Vec["default"],
  Mat3: _Mat["default"],
  LanguageSystem: _LanguageSystem["default"],
  ALogger: _ALogger["default"],
  FlagManager: _FlagManager["default"],
  ObservableArray: _ObservableArray["default"],
  ObservableStruct: _ObservableStruct["default"],
  circuit: {
    CCBlock: _CCBlock["default"],
    CCLine: _CCLine["default"]
  },
  FileSaver: FileSaver,
  Thread: _Thread["default"],
  setDomImmediate: _DomSignal.setDomImmediate,
  clearDomImmediate: _DomSignal.clearDomImmediate,
  generateJSVariable: _generator.generateJSVariable,
  copyJSVariable: _generator.copyJSVariable,
  normalizeIdent: stringFormat.normalizeIdent,
  replaceDateStringJSVariable: _generator.replaceDateStringJSVariable,
  remoteNodeRequireAsync: _remoteRequireNodeAsync["default"],
  shareConfiguration: _ShareConfiguration["default"].instance,
  DynamicCSS: _DynamicCSS["default"],
  getSystemFontSize: _Dom.getSystemFontSize,
  sclang: {
    'SCParser': _SCParser["default"],
    'SCProgramInstance': _SCProgramInstance["default"],
    'SCOperatorExecutor': _SCOperatorExecutor["default"],
    'SCStaticLibScope': _SCProgramInstance.SCStaticLibScope,
    'SCDynamicLibScope': _SCProgramInstance.SCDynamicLibScope,
    'SCScope': _SCScope["default"],
    'SCCodeGenerator': _SCCodeGenerator["default"],
    'generateSCCode': _SCCodeGenerator.generateSCCode,
    'generateSCHighlightPreviewCode': _SCCodeGenerator.generateSCHighlightPreviewCode,
    'validateSCCode': _SCCodeValidation.validateSCCode
  },
  printer: printer,
  measurements: measurements,
  MQTTExecMaster: _MQTTExec.MQTTExecMaster,
  MQTTExecSlave: _MQTTExec.MQTTExecSlave
};
var _default = absol;
exports["default"] = _default;

/***/ }),

/***/ 23470:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


__webpack_require__(81284);
__webpack_require__(68304);

/***/ }),

/***/ 29733:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/* module decorator */ module = __webpack_require__.nmd(module);
/* provided dependency */ var Buffer = __webpack_require__(80365)["lW"];


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
(function (w) {
  "use strict";

  function findBest(atobNative) {
    // normal window
    if ('function' === typeof atobNative) {
      return atobNative;
    }

    // browserify (web worker)
    if ('function' === typeof Buffer) {
      return function atobBrowserify(a) {
        //!! Deliberately using an API that's deprecated in node.js because
        //!! this file is for browsers and we expect them to cope with it.
        //!! Discussion: github.com/node-browser-compat/atob/pull/9
        return new Buffer(a, 'base64').toString('binary');
      };
    }

    // ios web worker with base64js
    if ('object' === _typeof(w.base64js)) {
      // bufferToBinaryString
      // https://git.coolaj86.com/coolaj86/unibabel.js/blob/master/index.js#L50
      return function atobWebWorker_iOS(a) {
        var buf = w.base64js.b64ToByteArray(a);
        return Array.prototype.map.call(buf, function (ch) {
          return String.fromCharCode(ch);
        }).join('');
      };
    }
    return function () {
      // ios web worker without base64js
      throw new Error("You're probably in an old browser or an iOS webworker." + " It might help to include beatgammit's base64-js.");
    };
  }
  var atobBest = findBest(w.atob);
  w.atob = atobBest;
  if (( false ? 0 : _typeof(module)) === 'object' && module && module.exports) {
    module.exports = atobBest;
  }
})(window);

/***/ }),

/***/ 47943:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


exports.byteLength = byteLength;
exports.toByteArray = toByteArray;
exports.fromByteArray = fromByteArray;
var lookup = [];
var revLookup = [];
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
for (var i = 0, len = code.length; i < len; ++i) {
  lookup[i] = code[i];
  revLookup[code.charCodeAt(i)] = i;
}

// Support decoding URL-safe base64 strings, as Node.js does.
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
revLookup['-'.charCodeAt(0)] = 62;
revLookup['_'.charCodeAt(0)] = 63;
function getLens(b64) {
  var len = b64.length;
  if (len % 4 > 0) {
    throw new Error('Invalid string. Length must be a multiple of 4');
  }

  // Trim off extra bytes after placeholder bytes are found
  // See: https://github.com/beatgammit/base64-js/issues/42
  var validLen = b64.indexOf('=');
  if (validLen === -1) validLen = len;
  var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
  return [validLen, placeHoldersLen];
}

// base64 is 4/3 + up to two characters of the original data
function byteLength(b64) {
  var lens = getLens(b64);
  var validLen = lens[0];
  var placeHoldersLen = lens[1];
  return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
}
function _byteLength(b64, validLen, placeHoldersLen) {
  return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
}
function toByteArray(b64) {
  var tmp;
  var lens = getLens(b64);
  var validLen = lens[0];
  var placeHoldersLen = lens[1];
  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
  var curByte = 0;

  // if there are placeholders, only get up to the last complete 4 chars
  var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
  var i;
  for (i = 0; i < len; i += 4) {
    tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
    arr[curByte++] = tmp >> 16 & 0xFF;
    arr[curByte++] = tmp >> 8 & 0xFF;
    arr[curByte++] = tmp & 0xFF;
  }
  if (placeHoldersLen === 2) {
    tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
    arr[curByte++] = tmp & 0xFF;
  }
  if (placeHoldersLen === 1) {
    tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
    arr[curByte++] = tmp >> 8 & 0xFF;
    arr[curByte++] = tmp & 0xFF;
  }
  return arr;
}
function tripletToBase64(num) {
  return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
}
function encodeChunk(uint8, start, end) {
  var tmp;
  var output = [];
  for (var i = start; i < end; i += 3) {
    tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);
    output.push(tripletToBase64(tmp));
  }
  return output.join('');
}
function fromByteArray(uint8) {
  var tmp;
  var len = uint8.length;
  var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
  var parts = [];
  var maxChunkLength = 16383; // must be multiple of 3

  // go through the array every three bytes, we'll deal with trailing stuff later
  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
    parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
  }

  // pad the end with zeros, but make sure to not forget the extra bytes
  if (extraBytes === 1) {
    tmp = uint8[len - 1];
    parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');
  } else if (extraBytes === 2) {
    tmp = (uint8[len - 2] << 8) + uint8[len - 1];
    parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');
  }
  return parts.join('');
}

/***/ }),

/***/ 66835:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/* provided dependency */ var Buffer = __webpack_require__(80365)["lW"];


(function () {
  "use strict";

  function btoa(str) {
    var buffer;
    if (str instanceof Buffer) {
      buffer = str;
    } else {
      buffer = Buffer.from(str.toString(), 'binary');
    }
    return buffer.toString('base64');
  }
  module.exports = btoa;
})();

/***/ }),

/***/ 80365:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";
var __webpack_unused_export__;
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
/* eslint-disable no-proto */



function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _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); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var base64 = __webpack_require__(47943);
var ieee754 = __webpack_require__(48405);
var customInspectSymbol = typeof Symbol === 'function' && typeof Symbol['for'] === 'function' // eslint-disable-line dot-notation
? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation
: null;
exports.lW = Buffer;
__webpack_unused_export__ = SlowBuffer;
exports.h2 = 50;
var K_MAX_LENGTH = 0x7fffffff;
__webpack_unused_export__ = K_MAX_LENGTH;

/**
 * If `Buffer.TYPED_ARRAY_SUPPORT`:
 *   === true    Use Uint8Array implementation (fastest)
 *   === false   Print warning and recommend using `buffer` v4.x which has an Object
 *               implementation (most compatible, even IE6)
 *
 * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
 * Opera 11.6+, iOS 4.2+.
 *
 * We report that the browser does not support typed arrays if the are not subclassable
 * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
 * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
 * for __proto__ and has a buggy typed array implementation.
 */
Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();
if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') {
  console.error('This browser lacks typed array (Uint8Array) support which is required by ' + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.');
}
function typedArraySupport() {
  // Can typed array instances can be augmented?
  try {
    var arr = new Uint8Array(1);
    var proto = {
      foo: function foo() {
        return 42;
      }
    };
    Object.setPrototypeOf(proto, Uint8Array.prototype);
    Object.setPrototypeOf(arr, proto);
    return arr.foo() === 42;
  } catch (e) {
    return false;
  }
}
Object.defineProperty(Buffer.prototype, 'parent', {
  enumerable: true,
  get: function get() {
    if (!Buffer.isBuffer(this)) return undefined;
    return this.buffer;
  }
});
Object.defineProperty(Buffer.prototype, 'offset', {
  enumerable: true,
  get: function get() {
    if (!Buffer.isBuffer(this)) return undefined;
    return this.byteOffset;
  }
});
function createBuffer(length) {
  if (length > K_MAX_LENGTH) {
    throw new RangeError('The value "' + length + '" is invalid for option "size"');
  }
  // Return an augmented `Uint8Array` instance
  var buf = new Uint8Array(length);
  Object.setPrototypeOf(buf, Buffer.prototype);
  return buf;
}

/**
 * The Buffer constructor returns instances of `Uint8Array` that have their
 * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
 * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
 * and the `Uint8Array` methods. Square bracket notation works as expected -- it
 * returns a single octet.
 *
 * The `Uint8Array` prototype remains unmodified.
 */

function Buffer(arg, encodingOrOffset, length) {
  // Common case.
  if (typeof arg === 'number') {
    if (typeof encodingOrOffset === 'string') {
      throw new TypeError('The "string" argument must be of type string. Received type number');
    }
    return allocUnsafe(arg);
  }
  return from(arg, encodingOrOffset, length);
}
Buffer.poolSize = 8192; // not used by this implementation

function from(value, encodingOrOffset, length) {
  if (typeof value === 'string') {
    return fromString(value, encodingOrOffset);
  }
  if (ArrayBuffer.isView(value)) {
    return fromArrayView(value);
  }
  if (value == null) {
    throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + _typeof(value));
  }
  if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
    return fromArrayBuffer(value, encodingOrOffset, length);
  }
  if (typeof SharedArrayBuffer !== 'undefined' && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
    return fromArrayBuffer(value, encodingOrOffset, length);
  }
  if (typeof value === 'number') {
    throw new TypeError('The "value" argument must not be of type number. Received type number');
  }
  var valueOf = value.valueOf && value.valueOf();
  if (valueOf != null && valueOf !== value) {
    return Buffer.from(valueOf, encodingOrOffset, length);
  }
  var b = fromObject(value);
  if (b) return b;
  if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') {
    return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);
  }
  throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + _typeof(value));
}

/**
 * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
 * if value is a number.
 * Buffer.from(str[, encoding])
 * Buffer.from(array)
 * Buffer.from(buffer)
 * Buffer.from(arrayBuffer[, byteOffset[, length]])
 **/
Buffer.from = function (value, encodingOrOffset, length) {
  return from(value, encodingOrOffset, length);
};

// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
// https://github.com/feross/buffer/pull/148
Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);
Object.setPrototypeOf(Buffer, Uint8Array);
function assertSize(size) {
  if (typeof size !== 'number') {
    throw new TypeError('"size" argument must be of type number');
  } else if (size < 0) {
    throw new RangeError('The value "' + size + '" is invalid for option "size"');
  }
}
function alloc(size, fill, encoding) {
  assertSize(size);
  if (size <= 0) {
    return createBuffer(size);
  }
  if (fill !== undefined) {
    // Only pay attention to encoding if it's a string. This
    // prevents accidentally sending in a number that would
    // be interpreted as a start offset.
    return typeof encoding === 'string' ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
  }
  return createBuffer(size);
}

/**
 * Creates a new filled Buffer instance.
 * alloc(size[, fill[, encoding]])
 **/
Buffer.alloc = function (size, fill, encoding) {
  return alloc(size, fill, encoding);
};
function allocUnsafe(size) {
  assertSize(size);
  return createBuffer(size < 0 ? 0 : checked(size) | 0);
}

/**
 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
 * */
Buffer.allocUnsafe = function (size) {
  return allocUnsafe(size);
};
/**
 * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
 */
Buffer.allocUnsafeSlow = function (size) {
  return allocUnsafe(size);
};
function fromString(string, encoding) {
  if (typeof encoding !== 'string' || encoding === '') {
    encoding = 'utf8';
  }
  if (!Buffer.isEncoding(encoding)) {
    throw new TypeError('Unknown encoding: ' + encoding);
  }
  var length = byteLength(string, encoding) | 0;
  var buf = createBuffer(length);
  var actual = buf.write(string, encoding);
  if (actual !== length) {
    // Writing a hex string, for example, that contains invalid characters will
    // cause everything after the first invalid character to be ignored. (e.g.
    // 'abxxcd' will be treated as 'ab')
    buf = buf.slice(0, actual);
  }
  return buf;
}
function fromArrayLike(array) {
  var length = array.length < 0 ? 0 : checked(array.length) | 0;
  var buf = createBuffer(length);
  for (var i = 0; i < length; i += 1) {
    buf[i] = array[i] & 255;
  }
  return buf;
}
function fromArrayView(arrayView) {
  if (isInstance(arrayView, Uint8Array)) {
    var copy = new Uint8Array(arrayView);
    return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
  }
  return fromArrayLike(arrayView);
}
function fromArrayBuffer(array, byteOffset, length) {
  if (byteOffset < 0 || array.byteLength < byteOffset) {
    throw new RangeError('"offset" is outside of buffer bounds');
  }
  if (array.byteLength < byteOffset + (length || 0)) {
    throw new RangeError('"length" is outside of buffer bounds');
  }
  var buf;
  if (byteOffset === undefined && length === undefined) {
    buf = new Uint8Array(array);
  } else if (length === undefined) {
    buf = new Uint8Array(array, byteOffset);
  } else {
    buf = new Uint8Array(array, byteOffset, length);
  }

  // Return an augmented `Uint8Array` instance
  Object.setPrototypeOf(buf, Buffer.prototype);
  return buf;
}
function fromObject(obj) {
  if (Buffer.isBuffer(obj)) {
    var len = checked(obj.length) | 0;
    var buf = createBuffer(len);
    if (buf.length === 0) {
      return buf;
    }
    obj.copy(buf, 0, 0, len);
    return buf;
  }
  if (obj.length !== undefined) {
    if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
      return createBuffer(0);
    }
    return fromArrayLike(obj);
  }
  if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
    return fromArrayLike(obj.data);
  }
}
function checked(length) {
  // Note: cannot use `length < K_MAX_LENGTH` here because that fails when
  // length is NaN (which is otherwise coerced to zero.)
  if (length >= K_MAX_LENGTH) {
    throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes');
  }
  return length | 0;
}
function SlowBuffer(length) {
  if (+length != length) {
    // eslint-disable-line eqeqeq
    length = 0;
  }
  return Buffer.alloc(+length);
}
Buffer.isBuffer = function isBuffer(b) {
  return b != null && b._isBuffer === true && b !== Buffer.prototype; // so Buffer.isBuffer(Buffer.prototype) will be false
};

Buffer.compare = function compare(a, b) {
  if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);
  if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);
  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
    throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
  }
  if (a === b) return 0;
  var x = a.length;
  var y = b.length;
  for (var i = 0, len = Math.min(x, y); i < len; ++i) {
    if (a[i] !== b[i]) {
      x = a[i];
      y = b[i];
      break;
    }
  }
  if (x < y) return -1;
  if (y < x) return 1;
  return 0;
};
Buffer.isEncoding = function isEncoding(encoding) {
  switch (String(encoding).toLowerCase()) {
    case 'hex':
    case 'utf8':
    case 'utf-8':
    case 'ascii':
    case 'latin1':
    case 'binary':
    case 'base64':
    case 'ucs2':
    case 'ucs-2':
    case 'utf16le':
    case 'utf-16le':
      return true;
    default:
      return false;
  }
};
Buffer.concat = function concat(list, length) {
  if (!Array.isArray(list)) {
    throw new TypeError('"list" argument must be an Array of Buffers');
  }
  if (list.length === 0) {
    return Buffer.alloc(0);
  }
  var i;
  if (length === undefined) {
    length = 0;
    for (i = 0; i < list.length; ++i) {
      length += list[i].length;
    }
  }
  var buffer = Buffer.allocUnsafe(length);
  var pos = 0;
  for (i = 0; i < list.length; ++i) {
    var buf = list[i];
    if (isInstance(buf, Uint8Array)) {
      if (pos + buf.length > buffer.length) {
        if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);
        buf.copy(buffer, pos);
      } else {
        Uint8Array.prototype.set.call(buffer, buf, pos);
      }
    } else if (!Buffer.isBuffer(buf)) {
      throw new TypeError('"list" argument must be an Array of Buffers');
    } else {
      buf.copy(buffer, pos);
    }
    pos += buf.length;
  }
  return buffer;
};
function byteLength(string, encoding) {
  if (Buffer.isBuffer(string)) {
    return string.length;
  }
  if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
    return string.byteLength;
  }
  if (typeof string !== 'string') {
    throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + 'Received type ' + _typeof(string));
  }
  var len = string.length;
  var mustMatch = arguments.length > 2 && arguments[2] === true;
  if (!mustMatch && len === 0) return 0;

  // Use a for loop to avoid recursion
  var loweredCase = false;
  for (;;) {
    switch (encoding) {
      case 'ascii':
      case 'latin1':
      case 'binary':
        return len;
      case 'utf8':
      case 'utf-8':
        return utf8ToBytes(string).length;
      case 'ucs2':
      case 'ucs-2':
      case 'utf16le':
      case 'utf-16le':
        return len * 2;
      case 'hex':
        return len >>> 1;
      case 'base64':
        return base64ToBytes(string).length;
      default:
        if (loweredCase) {
          return mustMatch ? -1 : utf8ToBytes(string).length; // assume utf8
        }

        encoding = ('' + encoding).toLowerCase();
        loweredCase = true;
    }
  }
}
Buffer.byteLength = byteLength;
function slowToString(encoding, start, end) {
  var loweredCase = false;

  // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  // property of a typed array.

  // This behaves neither like String nor Uint8Array in that we set start/end
  // to their upper/lower bounds if the value passed is out of range.
  // undefined is handled specially as per ECMA-262 6th Edition,
  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  if (start === undefined || start < 0) {
    start = 0;
  }
  // Return early if start > this.length. Done here to prevent potential uint32
  // coercion fail below.
  if (start > this.length) {
    return '';
  }
  if (end === undefined || end > this.length) {
    end = this.length;
  }
  if (end <= 0) {
    return '';
  }

  // Force coercion to uint32. This will also coerce falsey/NaN values to 0.
  end >>>= 0;
  start >>>= 0;
  if (end <= start) {
    return '';
  }
  if (!encoding) encoding = 'utf8';
  while (true) {
    switch (encoding) {
      case 'hex':
        return hexSlice(this, start, end);
      case 'utf8':
      case 'utf-8':
        return utf8Slice(this, start, end);
      case 'ascii':
        return asciiSlice(this, start, end);
      case 'latin1':
      case 'binary':
        return latin1Slice(this, start, end);
      case 'base64':
        return base64Slice(this, start, end);
      case 'ucs2':
      case 'ucs-2':
      case 'utf16le':
      case 'utf-16le':
        return utf16leSlice(this, start, end);
      default:
        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
        encoding = (encoding + '').toLowerCase();
        loweredCase = true;
    }
  }
}

// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
// to detect a Buffer instance. It's not possible to use `instanceof Buffer`
// reliably in a browserify context because there could be multiple different
// copies of the 'buffer' package in use. This method works even for Buffer
// instances that were created from another copy of the `buffer` package.
// See: https://github.com/feross/buffer/issues/154
Buffer.prototype._isBuffer = true;
function swap(b, n, m) {
  var i = b[n];
  b[n] = b[m];
  b[m] = i;
}
Buffer.prototype.swap16 = function swap16() {
  var len = this.length;
  if (len % 2 !== 0) {
    throw new RangeError('Buffer size must be a multiple of 16-bits');
  }
  for (var i = 0; i < len; i += 2) {
    swap(this, i, i + 1);
  }
  return this;
};
Buffer.prototype.swap32 = function swap32() {
  var len = this.length;
  if (len % 4 !== 0) {
    throw new RangeError('Buffer size must be a multiple of 32-bits');
  }
  for (var i = 0; i < len; i += 4) {
    swap(this, i, i + 3);
    swap(this, i + 1, i + 2);
  }
  return this;
};
Buffer.prototype.swap64 = function swap64() {
  var len = this.length;
  if (len % 8 !== 0) {
    throw new RangeError('Buffer size must be a multiple of 64-bits');
  }
  for (var i = 0; i < len; i += 8) {
    swap(this, i, i + 7);
    swap(this, i + 1, i + 6);
    swap(this, i + 2, i + 5);
    swap(this, i + 3, i + 4);
  }
  return this;
};
Buffer.prototype.toString = function toString() {
  var length = this.length;
  if (length === 0) return '';
  if (arguments.length === 0) return utf8Slice(this, 0, length);
  return slowToString.apply(this, arguments);
};
Buffer.prototype.toLocaleString = Buffer.prototype.toString;
Buffer.prototype.equals = function equals(b) {
  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');
  if (this === b) return true;
  return Buffer.compare(this, b) === 0;
};
Buffer.prototype.inspect = function inspect() {
  var str = '';
  var max = exports.h2;
  str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();
  if (this.length > max) str += ' ... ';
  return '<Buffer ' + str + '>';
};
if (customInspectSymbol) {
  Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;
}
Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
  if (isInstance(target, Uint8Array)) {
    target = Buffer.from(target, target.offset, target.byteLength);
  }
  if (!Buffer.isBuffer(target)) {
    throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. ' + 'Received type ' + _typeof(target));
  }
  if (start === undefined) {
    start = 0;
  }
  if (end === undefined) {
    end = target ? target.length : 0;
  }
  if (thisStart === undefined) {
    thisStart = 0;
  }
  if (thisEnd === undefined) {
    thisEnd = this.length;
  }
  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
    throw new RangeError('out of range index');
  }
  if (thisStart >= thisEnd && start >= end) {
    return 0;
  }
  if (thisStart >= thisEnd) {
    return -1;
  }
  if (start >= end) {
    return 1;
  }
  start >>>= 0;
  end >>>= 0;
  thisStart >>>= 0;
  thisEnd >>>= 0;
  if (this === target) return 0;
  var x = thisEnd - thisStart;
  var y = end - start;
  var len = Math.min(x, y);
  var thisCopy = this.slice(thisStart, thisEnd);
  var targetCopy = target.slice(start, end);
  for (var i = 0; i < len; ++i) {
    if (thisCopy[i] !== targetCopy[i]) {
      x = thisCopy[i];
      y = targetCopy[i];
      break;
    }
  }
  if (x < y) return -1;
  if (y < x) return 1;
  return 0;
};

// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string, Buffer, or number
// - byteOffset - an index into `buffer`; will be clamped to an int32
// - encoding - an optional encoding, relevant is val is a string
// - dir - true for indexOf, false for lastIndexOf
function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
  // Empty buffer means no match
  if (buffer.length === 0) return -1;

  // Normalize byteOffset
  if (typeof byteOffset === 'string') {
    encoding = byteOffset;
    byteOffset = 0;
  } else if (byteOffset > 0x7fffffff) {
    byteOffset = 0x7fffffff;
  } else if (byteOffset < -0x80000000) {
    byteOffset = -0x80000000;
  }
  byteOffset = +byteOffset; // Coerce to Number.
  if (numberIsNaN(byteOffset)) {
    // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
    byteOffset = dir ? 0 : buffer.length - 1;
  }

  // Normalize byteOffset: negative offsets start from the end of the buffer
  if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
  if (byteOffset >= buffer.length) {
    if (dir) return -1;else byteOffset = buffer.length - 1;
  } else if (byteOffset < 0) {
    if (dir) byteOffset = 0;else return -1;
  }

  // Normalize val
  if (typeof val === 'string') {
    val = Buffer.from(val, encoding);
  }

  // Finally, search either indexOf (if dir is true) or lastIndexOf
  if (Buffer.isBuffer(val)) {
    // Special case: looking for empty string/buffer always fails
    if (val.length === 0) {
      return -1;
    }
    return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
  } else if (typeof val === 'number') {
    val = val & 0xFF; // Search for a byte value [0-255]
    if (typeof Uint8Array.prototype.indexOf === 'function') {
      if (dir) {
        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
      } else {
        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
      }
    }
    return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
  }
  throw new TypeError('val must be string, number or Buffer');
}
function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
  var indexSize = 1;
  var arrLength = arr.length;
  var valLength = val.length;
  if (encoding !== undefined) {
    encoding = String(encoding).toLowerCase();
    if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
      if (arr.length < 2 || val.length < 2) {
        return -1;
      }
      indexSize = 2;
      arrLength /= 2;
      valLength /= 2;
      byteOffset /= 2;
    }
  }
  function read(buf, i) {
    if (indexSize === 1) {
      return buf[i];
    } else {
      return buf.readUInt16BE(i * indexSize);
    }
  }
  var i;
  if (dir) {
    var foundIndex = -1;
    for (i = byteOffset; i < arrLength; i++) {
      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
        if (foundIndex === -1) foundIndex = i;
        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
      } else {
        if (foundIndex !== -1) i -= i - foundIndex;
        foundIndex = -1;
      }
    }
  } else {
    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
    for (i = byteOffset; i >= 0; i--) {
      var found = true;
      for (var j = 0; j < valLength; j++) {
        if (read(arr, i + j) !== read(val, j)) {
          found = false;
          break;
        }
      }
      if (found) return i;
    }
  }
  return -1;
}
Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
  return this.indexOf(val, byteOffset, encoding) !== -1;
};
Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
  return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
};
Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
  return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
};
function hexWrite(buf, string, offset, length) {
  offset = Number(offset) || 0;
  var remaining = buf.length - offset;
  if (!length) {
    length = remaining;
  } else {
    length = Number(length);
    if (length > remaining) {
      length = remaining;
    }
  }
  var strLen = string.length;
  if (length > strLen / 2) {
    length = strLen / 2;
  }
  var i;
  for (i = 0; i < length; ++i) {
    var parsed = parseInt(string.substr(i * 2, 2), 16);
    if (numberIsNaN(parsed)) return i;
    buf[offset + i] = parsed;
  }
  return i;
}
function utf8Write(buf, string, offset, length) {
  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
}
function asciiWrite(buf, string, offset, length) {
  return blitBuffer(asciiToBytes(string), buf, offset, length);
}
function base64Write(buf, string, offset, length) {
  return blitBuffer(base64ToBytes(string), buf, offset, length);
}
function ucs2Write(buf, string, offset, length) {
  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
}
Buffer.prototype.write = function write(string, offset, length, encoding) {
  // Buffer#write(string)
  if (offset === undefined) {
    encoding = 'utf8';
    length = this.length;
    offset = 0;
    // Buffer#write(string, encoding)
  } else if (length === undefined && typeof offset === 'string') {
    encoding = offset;
    length = this.length;
    offset = 0;
    // Buffer#write(string, offset[, length][, encoding])
  } else if (isFinite(offset)) {
    offset = offset >>> 0;
    if (isFinite(length)) {
      length = length >>> 0;
      if (encoding === undefined) encoding = 'utf8';
    } else {
      encoding = length;
      length = undefined;
    }
  } else {
    throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
  }
  var remaining = this.length - offset;
  if (length === undefined || length > remaining) length = remaining;
  if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
    throw new RangeError('Attempt to write outside buffer bounds');
  }
  if (!encoding) encoding = 'utf8';
  var loweredCase = false;
  for (;;) {
    switch (encoding) {
      case 'hex':
        return hexWrite(this, string, offset, length);
      case 'utf8':
      case 'utf-8':
        return utf8Write(this, string, offset, length);
      case 'ascii':
      case 'latin1':
      case 'binary':
        return asciiWrite(this, string, offset, length);
      case 'base64':
        // Warning: maxLength not taken into account in base64Write
        return base64Write(this, string, offset, length);
      case 'ucs2':
      case 'ucs-2':
      case 'utf16le':
      case 'utf-16le':
        return ucs2Write(this, string, offset, length);
      default:
        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
        encoding = ('' + encoding).toLowerCase();
        loweredCase = true;
    }
  }
};
Buffer.prototype.toJSON = function toJSON() {
  return {
    type: 'Buffer',
    data: Array.prototype.slice.call(this._arr || this, 0)
  };
};
function base64Slice(buf, start, end) {
  if (start === 0 && end === buf.length) {
    return base64.fromByteArray(buf);
  } else {
    return base64.fromByteArray(buf.slice(start, end));
  }
}
function utf8Slice(buf, start, end) {
  end = Math.min(buf.length, end);
  var res = [];
  var i = start;
  while (i < end) {
    var firstByte = buf[i];
    var codePoint = null;
    var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
    if (i + bytesPerSequence <= end) {
      var secondByte = void 0,
        thirdByte = void 0,
        fourthByte = void 0,
        tempCodePoint = void 0;
      switch (bytesPerSequence) {
        case 1:
          if (firstByte < 0x80) {
            codePoint = firstByte;
          }
          break;
        case 2:
          secondByte = buf[i + 1];
          if ((secondByte & 0xC0) === 0x80) {
            tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
            if (tempCodePoint > 0x7F) {
              codePoint = tempCodePoint;
            }
          }
          break;
        case 3:
          secondByte = buf[i + 1];
          thirdByte = buf[i + 2];
          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
              codePoint = tempCodePoint;
            }
          }
          break;
        case 4:
          secondByte = buf[i + 1];
          thirdByte = buf[i + 2];
          fourthByte = buf[i + 3];
          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
              codePoint = tempCodePoint;
            }
          }
      }
    }
    if (codePoint === null) {
      // we did not generate a valid codePoint so insert a
      // replacement char (U+FFFD) and advance only 1 byte
      codePoint = 0xFFFD;
      bytesPerSequence = 1;
    } else if (codePoint > 0xFFFF) {
      // encode to utf16 (surrogate pair dance)
      codePoint -= 0x10000;
      res.push(codePoint >>> 10 & 0x3FF | 0xD800);
      codePoint = 0xDC00 | codePoint & 0x3FF;
    }
    res.push(codePoint);
    i += bytesPerSequence;
  }
  return decodeCodePointsArray(res);
}

// Based on http://stackoverflow.com/a/22747272/680742, the browser with
// the lowest limit is Chrome, with 0x10000 args.
// We go 1 magnitude less, for safety
var MAX_ARGUMENTS_LENGTH = 0x1000;
function decodeCodePointsArray(codePoints) {
  var len = codePoints.length;
  if (len <= MAX_ARGUMENTS_LENGTH) {
    return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
  }

  // Decode in chunks to avoid "call stack size exceeded".
  var res = '';
  var i = 0;
  while (i < len) {
    res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
  }
  return res;
}
function asciiSlice(buf, start, end) {
  var ret = '';
  end = Math.min(buf.length, end);
  for (var i = start; i < end; ++i) {
    ret += String.fromCharCode(buf[i] & 0x7F);
  }
  return ret;
}
function latin1Slice(buf, start, end) {
  var ret = '';
  end = Math.min(buf.length, end);
  for (var i = start; i < end; ++i) {
    ret += String.fromCharCode(buf[i]);
  }
  return ret;
}
function hexSlice(buf, start, end) {
  var len = buf.length;
  if (!start || start < 0) start = 0;
  if (!end || end < 0 || end > len) end = len;
  var out = '';
  for (var i = start; i < end; ++i) {
    out += hexSliceLookupTable[buf[i]];
  }
  return out;
}
function utf16leSlice(buf, start, end) {
  var bytes = buf.slice(start, end);
  var res = '';
  // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)
  for (var i = 0; i < bytes.length - 1; i += 2) {
    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
  }
  return res;
}
Buffer.prototype.slice = function slice(start, end) {
  var len = this.length;
  start = ~~start;
  end = end === undefined ? len : ~~end;
  if (start < 0) {
    start += len;
    if (start < 0) start = 0;
  } else if (start > len) {
    start = len;
  }
  if (end < 0) {
    end += len;
    if (end < 0) end = 0;
  } else if (end > len) {
    end = len;
  }
  if (end < start) end = start;
  var newBuf = this.subarray(start, end);
  // Return an augmented `Uint8Array` instance
  Object.setPrototypeOf(newBuf, Buffer.prototype);
  return newBuf;
};

/*
 * Need to make sure that buffer isn't trying to write out of bounds.
 */
function checkOffset(offset, ext, length) {
  if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
}
Buffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
  offset = offset >>> 0;
  byteLength = byteLength >>> 0;
  if (!noAssert) checkOffset(offset, byteLength, this.length);
  var val = this[offset];
  var mul = 1;
  var i = 0;
  while (++i < byteLength && (mul *= 0x100)) {
    val += this[offset + i] * mul;
  }
  return val;
};
Buffer.prototype.readUintBE = Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
  offset = offset >>> 0;
  byteLength = byteLength >>> 0;
  if (!noAssert) {
    checkOffset(offset, byteLength, this.length);
  }
  var val = this[offset + --byteLength];
  var mul = 1;
  while (byteLength > 0 && (mul *= 0x100)) {
    val += this[offset + --byteLength] * mul;
  }
  return val;
};
Buffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 1, this.length);
  return this[offset];
};
Buffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 2, this.length);
  return this[offset] | this[offset + 1] << 8;
};
Buffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 2, this.length);
  return this[offset] << 8 | this[offset + 1];
};
Buffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 4, this.length);
  return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
};
Buffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 4, this.length);
  return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
};
Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
  offset = offset >>> 0;
  validateNumber(offset, 'offset');
  var first = this[offset];
  var last = this[offset + 7];
  if (first === undefined || last === undefined) {
    boundsError(offset, this.length - 8);
  }
  var lo = first + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 24);
  var hi = this[++offset] + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + last * Math.pow(2, 24);
  return BigInt(lo) + (BigInt(hi) << BigInt(32));
});
Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {
  offset = offset >>> 0;
  validateNumber(offset, 'offset');
  var first = this[offset];
  var last = this[offset + 7];
  if (first === undefined || last === undefined) {
    boundsError(offset, this.length - 8);
  }
  var hi = first * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + this[++offset];
  var lo = this[++offset] * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + last;
  return (BigInt(hi) << BigInt(32)) + BigInt(lo);
});
Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
  offset = offset >>> 0;
  byteLength = byteLength >>> 0;
  if (!noAssert) checkOffset(offset, byteLength, this.length);
  var val = this[offset];
  var mul = 1;
  var i = 0;
  while (++i < byteLength && (mul *= 0x100)) {
    val += this[offset + i] * mul;
  }
  mul *= 0x80;
  if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  return val;
};
Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
  offset = offset >>> 0;
  byteLength = byteLength >>> 0;
  if (!noAssert) checkOffset(offset, byteLength, this.length);
  var i = byteLength;
  var mul = 1;
  var val = this[offset + --i];
  while (i > 0 && (mul *= 0x100)) {
    val += this[offset + --i] * mul;
  }
  mul *= 0x80;
  if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  return val;
};
Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 1, this.length);
  if (!(this[offset] & 0x80)) return this[offset];
  return (0xff - this[offset] + 1) * -1;
};
Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 2, this.length);
  var val = this[offset] | this[offset + 1] << 8;
  return val & 0x8000 ? val | 0xFFFF0000 : val;
};
Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 2, this.length);
  var val = this[offset + 1] | this[offset] << 8;
  return val & 0x8000 ? val | 0xFFFF0000 : val;
};
Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 4, this.length);
  return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
};
Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 4, this.length);
  return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
};
Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
  offset = offset >>> 0;
  validateNumber(offset, 'offset');
  var first = this[offset];
  var last = this[offset + 7];
  if (first === undefined || last === undefined) {
    boundsError(offset, this.length - 8);
  }
  var val = this[offset + 4] + this[offset + 5] * Math.pow(2, 8) + this[offset + 6] * Math.pow(2, 16) + (last << 24); // Overflow

  return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 24));
});
Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {
  offset = offset >>> 0;
  validateNumber(offset, 'offset');
  var first = this[offset];
  var last = this[offset + 7];
  if (first === undefined || last === undefined) {
    boundsError(offset, this.length - 8);
  }
  var val = (first << 24) +
  // Overflow
  this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + this[++offset];
  return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + last);
});
Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 4, this.length);
  return ieee754.read(this, offset, true, 23, 4);
};
Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 4, this.length);
  return ieee754.read(this, offset, false, 23, 4);
};
Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 8, this.length);
  return ieee754.read(this, offset, true, 52, 8);
};
Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
  offset = offset >>> 0;
  if (!noAssert) checkOffset(offset, 8, this.length);
  return ieee754.read(this, offset, false, 52, 8);
};
function checkInt(buf, value, offset, ext, max, min) {
  if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
  if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
  if (offset + ext > buf.length) throw new RangeError('Index out of range');
}
Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
  value = +value;
  offset = offset >>> 0;
  byteLength = byteLength >>> 0;
  if (!noAssert) {
    var maxBytes = Math.pow(2, 8 * byteLength) - 1;
    checkInt(this, value, offset, byteLength, maxBytes, 0);
  }
  var mul = 1;
  var i = 0;
  this[offset] = value & 0xFF;
  while (++i < byteLength && (mul *= 0x100)) {
    this[offset + i] = value / mul & 0xFF;
  }
  return offset + byteLength;
};
Buffer.prototype.writeUintBE = Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
  value = +value;
  offset = offset >>> 0;
  byteLength = byteLength >>> 0;
  if (!noAssert) {
    var maxBytes = Math.pow(2, 8 * byteLength) - 1;
    checkInt(this, value, offset, byteLength, maxBytes, 0);
  }
  var i = byteLength - 1;
  var mul = 1;
  this[offset + i] = value & 0xFF;
  while (--i >= 0 && (mul *= 0x100)) {
    this[offset + i] = value / mul & 0xFF;
  }
  return offset + byteLength;
};
Buffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
  this[offset] = value & 0xff;
  return offset + 1;
};
Buffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  this[offset] = value & 0xff;
  this[offset + 1] = value >>> 8;
  return offset + 2;
};
Buffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  this[offset] = value >>> 8;
  this[offset + 1] = value & 0xff;
  return offset + 2;
};
Buffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  this[offset + 3] = value >>> 24;
  this[offset + 2] = value >>> 16;
  this[offset + 1] = value >>> 8;
  this[offset] = value & 0xff;
  return offset + 4;
};
Buffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  this[offset] = value >>> 24;
  this[offset + 1] = value >>> 16;
  this[offset + 2] = value >>> 8;
  this[offset + 3] = value & 0xff;
  return offset + 4;
};
function wrtBigUInt64LE(buf, value, offset, min, max) {
  checkIntBI(value, min, max, buf, offset, 7);
  var lo = Number(value & BigInt(0xffffffff));
  buf[offset++] = lo;
  lo = lo >> 8;
  buf[offset++] = lo;
  lo = lo >> 8;
  buf[offset++] = lo;
  lo = lo >> 8;
  buf[offset++] = lo;
  var hi = Number(value >> BigInt(32) & BigInt(0xffffffff));
  buf[offset++] = hi;
  hi = hi >> 8;
  buf[offset++] = hi;
  hi = hi >> 8;
  buf[offset++] = hi;
  hi = hi >> 8;
  buf[offset++] = hi;
  return offset;
}
function wrtBigUInt64BE(buf, value, offset, min, max) {
  checkIntBI(value, min, max, buf, offset, 7);
  var lo = Number(value & BigInt(0xffffffff));
  buf[offset + 7] = lo;
  lo = lo >> 8;
  buf[offset + 6] = lo;
  lo = lo >> 8;
  buf[offset + 5] = lo;
  lo = lo >> 8;
  buf[offset + 4] = lo;
  var hi = Number(value >> BigInt(32) & BigInt(0xffffffff));
  buf[offset + 3] = hi;
  hi = hi >> 8;
  buf[offset + 2] = hi;
  hi = hi >> 8;
  buf[offset + 1] = hi;
  hi = hi >> 8;
  buf[offset] = hi;
  return offset + 8;
}
Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value) {
  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));
});
Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value) {
  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));
});
Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) {
    var limit = Math.pow(2, 8 * byteLength - 1);
    checkInt(this, value, offset, byteLength, limit - 1, -limit);
  }
  var i = 0;
  var mul = 1;
  var sub = 0;
  this[offset] = value & 0xFF;
  while (++i < byteLength && (mul *= 0x100)) {
    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
      sub = 1;
    }
    this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  }
  return offset + byteLength;
};
Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) {
    var limit = Math.pow(2, 8 * byteLength - 1);
    checkInt(this, value, offset, byteLength, limit - 1, -limit);
  }
  var i = byteLength - 1;
  var mul = 1;
  var sub = 0;
  this[offset + i] = value & 0xFF;
  while (--i >= 0 && (mul *= 0x100)) {
    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
      sub = 1;
    }
    this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  }
  return offset + byteLength;
};
Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
  if (value < 0) value = 0xff + value + 1;
  this[offset] = value & 0xff;
  return offset + 1;
};
Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  this[offset] = value & 0xff;
  this[offset + 1] = value >>> 8;
  return offset + 2;
};
Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  this[offset] = value >>> 8;
  this[offset + 1] = value & 0xff;
  return offset + 2;
};
Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  this[offset] = value & 0xff;
  this[offset + 1] = value >>> 8;
  this[offset + 2] = value >>> 16;
  this[offset + 3] = value >>> 24;
  return offset + 4;
};
Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  if (value < 0) value = 0xffffffff + value + 1;
  this[offset] = value >>> 24;
  this[offset + 1] = value >>> 16;
  this[offset + 2] = value >>> 8;
  this[offset + 3] = value & 0xff;
  return offset + 4;
};
Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value) {
  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));
});
Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value) {
  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));
});
function checkIEEE754(buf, value, offset, ext, max, min) {
  if (offset + ext > buf.length) throw new RangeError('Index out of range');
  if (offset < 0) throw new RangeError('Index out of range');
}
function writeFloat(buf, value, offset, littleEndian, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) {
    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
  }
  ieee754.write(buf, value, offset, littleEndian, 23, 4);
  return offset + 4;
}
Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
  return writeFloat(this, value, offset, true, noAssert);
};
Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
  return writeFloat(this, value, offset, false, noAssert);
};
function writeDouble(buf, value, offset, littleEndian, noAssert) {
  value = +value;
  offset = offset >>> 0;
  if (!noAssert) {
    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);
  }
  ieee754.write(buf, value, offset, littleEndian, 52, 8);
  return offset + 8;
}
Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
  return writeDouble(this, value, offset, true, noAssert);
};
Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
  return writeDouble(this, value, offset, false, noAssert);
};

// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy(target, targetStart, start, end) {
  if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer');
  if (!start) start = 0;
  if (!end && end !== 0) end = this.length;
  if (targetStart >= target.length) targetStart = target.length;
  if (!targetStart) targetStart = 0;
  if (end > 0 && end < start) end = start;

  // Copy 0 bytes; we're done
  if (end === start) return 0;
  if (target.length === 0 || this.length === 0) return 0;

  // Fatal error conditions
  if (targetStart < 0) {
    throw new RangeError('targetStart out of bounds');
  }
  if (start < 0 || start >= this.length) throw new RangeError('Index out of range');
  if (end < 0) throw new RangeError('sourceEnd out of bounds');

  // Are we oob?
  if (end > this.length) end = this.length;
  if (target.length - targetStart < end - start) {
    end = target.length - targetStart + start;
  }
  var len = end - start;
  if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
    // Use built-in when available, missing from IE11
    this.copyWithin(targetStart, start, end);
  } else {
    Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
  }
  return len;
};

// Usage:
//    buffer.fill(number[, offset[, end]])
//    buffer.fill(buffer[, offset[, end]])
//    buffer.fill(string[, offset[, end]][, encoding])
Buffer.prototype.fill = function fill(val, start, end, encoding) {
  // Handle string cases:
  if (typeof val === 'string') {
    if (typeof start === 'string') {
      encoding = start;
      start = 0;
      end = this.length;
    } else if (typeof end === 'string') {
      encoding = end;
      end = this.length;
    }
    if (encoding !== undefined && typeof encoding !== 'string') {
      throw new TypeError('encoding must be a string');
    }
    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
      throw new TypeError('Unknown encoding: ' + encoding);
    }
    if (val.length === 1) {
      var code = val.charCodeAt(0);
      if (encoding === 'utf8' && code < 128 || encoding === 'latin1') {
        // Fast path: If `val` fits into a single byte, use that numeric value.
        val = code;
      }
    }
  } else if (typeof val === 'number') {
    val = val & 255;
  } else if (typeof val === 'boolean') {
    val = Number(val);
  }

  // Invalid ranges are not set to a default, so can range check early.
  if (start < 0 || this.length < start || this.length < end) {
    throw new RangeError('Out of range index');
  }
  if (end <= start) {
    return this;
  }
  start = start >>> 0;
  end = end === undefined ? this.length : end >>> 0;
  if (!val) val = 0;
  var i;
  if (typeof val === 'number') {
    for (i = start; i < end; ++i) {
      this[i] = val;
    }
  } else {
    var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding);
    var len = bytes.length;
    if (len === 0) {
      throw new TypeError('The value "' + val + '" is invalid for argument "value"');
    }
    for (i = 0; i < end - start; ++i) {
      this[i + start] = bytes[i % len];
    }
  }
  return this;
};

// CUSTOM ERRORS
// =============

// Simplified versions from Node, changed for Buffer-only usage
var errors = {};
function E(sym, getMessage, Base) {
  errors[sym] = /*#__PURE__*/function (_Base) {
    _inherits(NodeError, _Base);
    var _super = _createSuper(NodeError);
    function NodeError() {
      var _this;
      _classCallCheck(this, NodeError);
      _this = _super.call(this);
      Object.defineProperty(_assertThisInitialized(_this), 'message', {
        value: getMessage.apply(_assertThisInitialized(_this), arguments),
        writable: true,
        configurable: true
      });

      // Add the error code to the name to include it in the stack trace.
      _this.name = "".concat(_this.name, " [").concat(sym, "]");
      // Access the stack to generate the error message including the error code
      // from the name.
      _this.stack; // eslint-disable-line no-unused-expressions
      // Reset the name to the actual name.
      delete _this.name;
      return _this;
    }
    _createClass(NodeError, [{
      key: "code",
      get: function get() {
        return sym;
      },
      set: function set(value) {
        Object.defineProperty(this, 'code', {
          configurable: true,
          enumerable: true,
          value: value,
          writable: true
        });
      }
    }, {
      key: "toString",
      value: function toString() {
        return "".concat(this.name, " [").concat(sym, "]: ").concat(this.message);
      }
    }]);
    return NodeError;
  }(Base);
}
E('ERR_BUFFER_OUT_OF_BOUNDS', function (name) {
  if (name) {
    return "".concat(name, " is outside of buffer bounds");
  }
  return 'Attempt to access memory outside buffer bounds';
}, RangeError);
E('ERR_INVALID_ARG_TYPE', function (name, actual) {
  return "The \"".concat(name, "\" argument must be of type number. Received type ").concat(_typeof(actual));
}, TypeError);
E('ERR_OUT_OF_RANGE', function (str, range, input) {
  var msg = "The value of \"".concat(str, "\" is out of range.");
  var received = input;
  if (Number.isInteger(input) && Math.abs(input) > Math.pow(2, 32)) {
    received = addNumericalSeparator(String(input));
  } else if (typeof input === 'bigint') {
    received = String(input);
    if (input > Math.pow(BigInt(2), BigInt(32)) || input < -Math.pow(BigInt(2), BigInt(32))) {
      received = addNumericalSeparator(received);
    }
    received += 'n';
  }
  msg += " It must be ".concat(range, ". Received ").concat(received);
  return msg;
}, RangeError);
function addNumericalSeparator(val) {
  var res = '';
  var i = val.length;
  var start = val[0] === '-' ? 1 : 0;
  for (; i >= start + 4; i -= 3) {
    res = "_".concat(val.slice(i - 3, i)).concat(res);
  }
  return "".concat(val.slice(0, i)).concat(res);
}

// CHECK FUNCTIONS
// ===============

function checkBounds(buf, offset, byteLength) {
  validateNumber(offset, 'offset');
  if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {
    boundsError(offset, buf.length - (byteLength + 1));
  }
}
function checkIntBI(value, min, max, buf, offset, byteLength) {
  if (value > max || value < min) {
    var n = typeof min === 'bigint' ? 'n' : '';
    var range;
    if (byteLength > 3) {
      if (min === 0 || min === BigInt(0)) {
        range = ">= 0".concat(n, " and < 2").concat(n, " ** ").concat((byteLength + 1) * 8).concat(n);
      } else {
        range = ">= -(2".concat(n, " ** ").concat((byteLength + 1) * 8 - 1).concat(n, ") and < 2 ** ") + "".concat((byteLength + 1) * 8 - 1).concat(n);
      }
    } else {
      range = ">= ".concat(min).concat(n, " and <= ").concat(max).concat(n);
    }
    throw new errors.ERR_OUT_OF_RANGE('value', range, value);
  }
  checkBounds(buf, offset, byteLength);
}
function validateNumber(value, name) {
  if (typeof value !== 'number') {
    throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value);
  }
}
function boundsError(value, length, type) {
  if (Math.floor(value) !== value) {
    validateNumber(value, type);
    throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value);
  }
  if (length < 0) {
    throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
  }
  throw new errors.ERR_OUT_OF_RANGE(type || 'offset', ">= ".concat(type ? 1 : 0, " and <= ").concat(length), value);
}

// HELPER FUNCTIONS
// ================

var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
function base64clean(str) {
  // Node takes equal signs as end of the Base64 encoding
  str = str.split('=')[0];
  // Node strips out invalid characters like \n and \t from the string, base64-js does not
  str = str.trim().replace(INVALID_BASE64_RE, '');
  // Node converts strings with length < 2 to ''
  if (str.length < 2) return '';
  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  while (str.length % 4 !== 0) {
    str = str + '=';
  }
  return str;
}
function utf8ToBytes(string, units) {
  units = units || Infinity;
  var codePoint;
  var length = string.length;
  var leadSurrogate = null;
  var bytes = [];
  for (var i = 0; i < length; ++i) {
    codePoint = string.charCodeAt(i);

    // is surrogate component
    if (codePoint > 0xD7FF && codePoint < 0xE000) {
      // last char was a lead
      if (!leadSurrogate) {
        // no lead yet
        if (codePoint > 0xDBFF) {
          // unexpected trail
          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
          continue;
        } else if (i + 1 === length) {
          // unpaired lead
          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
          continue;
        }

        // valid lead
        leadSurrogate = codePoint;
        continue;
      }

      // 2 leads in a row
      if (codePoint < 0xDC00) {
        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
        leadSurrogate = codePoint;
        continue;
      }

      // valid surrogate pair
      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
    } else if (leadSurrogate) {
      // valid bmp char, but last char was a lead
      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
    }
    leadSurrogate = null;

    // encode utf8
    if (codePoint < 0x80) {
      if ((units -= 1) < 0) break;
      bytes.push(codePoint);
    } else if (codePoint < 0x800) {
      if ((units -= 2) < 0) break;
      bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
    } else if (codePoint < 0x10000) {
      if ((units -= 3) < 0) break;
      bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
    } else if (codePoint < 0x110000) {
      if ((units -= 4) < 0) break;
      bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
    } else {
      throw new Error('Invalid code point');
    }
  }
  return bytes;
}
function asciiToBytes(str) {
  var byteArray = [];
  for (var i = 0; i < str.length; ++i) {
    // Node's code seems to be doing this and not & 0x7F..
    byteArray.push(str.charCodeAt(i) & 0xFF);
  }
  return byteArray;
}
function utf16leToBytes(str, units) {
  var c, hi, lo;
  var byteArray = [];
  for (var i = 0; i < str.length; ++i) {
    if ((units -= 2) < 0) break;
    c = str.charCodeAt(i);
    hi = c >> 8;
    lo = c % 256;
    byteArray.push(lo);
    byteArray.push(hi);
  }
  return byteArray;
}
function base64ToBytes(str) {
  return base64.toByteArray(base64clean(str));
}
function blitBuffer(src, dst, offset, length) {
  var i;
  for (i = 0; i < length; ++i) {
    if (i + offset >= dst.length || i >= src.length) break;
    dst[i + offset] = src[i];
  }
  return i;
}

// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
// the `instanceof` check but they should be treated as of that type.
// See: https://github.com/feross/buffer/issues/166
function isInstance(obj, type) {
  return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
}
function numberIsNaN(obj) {
  // For IE11 support
  return obj !== obj; // eslint-disable-line no-self-compare
}

// Create lookup table for `toString('hex')`
// See: https://github.com/feross/buffer/issues/219
var hexSliceLookupTable = function () {
  var alphabet = '0123456789abcdef';
  var table = new Array(256);
  for (var i = 0; i < 16; ++i) {
    var i16 = i * 16;
    for (var j = 0; j < 16; ++j) {
      table[i16 + j] = alphabet[i] + alphabet[j];
    }
  }
  return table;
}();

// Return not function with Error if BigInt not supported
function defineBigIntMethod(fn) {
  return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn;
}
function BufferBigIntNotDefined() {
  throw new Error('BigInt not supported');
}

/***/ }),

/***/ 55788:
/***/ ((module) => {

"use strict";


/*
  MIT License http://www.opensource.org/licenses/mit-license.php
  Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function (useSourceMap) {
  var list = []; // return the list of modules as css string

  list.toString = function toString() {
    return this.map(function (item) {
      var content = cssWithMappingToString(item, useSourceMap);
      if (item[2]) {
        return '@media ' + item[2] + '{' + content + '}';
      } else {
        return content;
      }
    }).join('');
  }; // import a list of modules into the list

  list.i = function (modules, mediaQuery) {
    if (typeof modules === 'string') {
      modules = [[null, modules, '']];
    }
    var alreadyImportedModules = {};
    for (var i = 0; i < this.length; i++) {
      var id = this[i][0];
      if (id != null) {
        alreadyImportedModules[id] = true;
      }
    }
    for (i = 0; i < modules.length; i++) {
      var item = modules[i]; // skip already imported module
      // this implementation is not 100% perfect for weird media query combinations
      // when a module is imported multiple times with different media queries.
      // I hope this will never occur (Hey this way we have smaller bundles)

      if (item[0] == null || !alreadyImportedModules[item[0]]) {
        if (mediaQuery && !item[2]) {
          item[2] = mediaQuery;
        } else if (mediaQuery) {
          item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
        }
        list.push(item);
      }
    }
  };
  return list;
};
function cssWithMappingToString(item, useSourceMap) {
  var content = item[1] || '';
  var cssMapping = item[3];
  if (!cssMapping) {
    return content;
  }
  if (useSourceMap && typeof btoa === 'function') {
    var sourceMapping = toComment(cssMapping);
    var sourceURLs = cssMapping.sources.map(function (source) {
      return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
    });
    return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  }
  return [content].join('\n');
} // Adapted from convert-source-map (MIT)

function toComment(sourceMap) {
  // eslint-disable-next-line no-undef
  var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  return '/*# ' + data + ' */';
}

/***/ }),

/***/ 48405:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  var e, m;
  var eLen = nBytes * 8 - mLen - 1;
  var eMax = (1 << eLen) - 1;
  var eBias = eMax >> 1;
  var nBits = -7;
  var i = isLE ? nBytes - 1 : 0;
  var d = isLE ? -1 : 1;
  var s = buffer[offset + i];
  i += d;
  e = s & (1 << -nBits) - 1;
  s >>= -nBits;
  nBits += eLen;
  for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
  m = e & (1 << -nBits) - 1;
  e >>= -nBits;
  nBits += mLen;
  for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
  if (e === 0) {
    e = 1 - eBias;
  } else if (e === eMax) {
    return m ? NaN : (s ? -1 : 1) * Infinity;
  } else {
    m = m + Math.pow(2, mLen);
    e = e - eBias;
  }
  return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
};
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  var e, m, c;
  var eLen = nBytes * 8 - mLen - 1;
  var eMax = (1 << eLen) - 1;
  var eBias = eMax >> 1;
  var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
  var i = isLE ? 0 : nBytes - 1;
  var d = isLE ? 1 : -1;
  var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  value = Math.abs(value);
  if (isNaN(value) || value === Infinity) {
    m = isNaN(value) ? 1 : 0;
    e = eMax;
  } else {
    e = Math.floor(Math.log(value) / Math.LN2);
    if (value * (c = Math.pow(2, -e)) < 1) {
      e--;
      c *= 2;
    }
    if (e + eBias >= 1) {
      value += rt / c;
    } else {
      value += rt * Math.pow(2, 1 - eBias);
    }
    if (value * c >= 2) {
      e++;
      c /= 2;
    }
    if (e + eBias >= eMax) {
      m = 0;
      e = eMax;
    } else if (e + eBias >= 1) {
      m = (value * c - 1) * Math.pow(2, mLen);
      e = e + eBias;
    } else {
      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
      e = 0;
    }
  }
  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  e = e << mLen | m;
  eLen += mLen;
  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  buffer[offset + i - d] |= s * 128;
};

/***/ }),

/***/ 49178:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


// Expose `IntlPolyfill` as global to add locale data into runtime later on.
__webpack_require__.g.IntlPolyfill = __webpack_require__(57857);

// Require all locale data for `Intl`. This module will be
// ignored when bundling for the browser with Browserify/Webpack.
__webpack_require__(12482);

// hack to export the polyfill as global Intl if needed
if (!__webpack_require__.g.Intl) {
  __webpack_require__.g.Intl = __webpack_require__.g.IntlPolyfill;
  __webpack_require__.g.IntlPolyfill.__applyLocaleSensitivePrototypes();
}

// providing an idiomatic api for the nodejs version of this module
module.exports = __webpack_require__.g.IntlPolyfill;

/***/ }),

/***/ 57857:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof2(obj); }
var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
  return _typeof2(obj);
} : function (obj) {
  return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : _typeof2(obj);
};
var jsx = function () {
  var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol["for"] && Symbol["for"]("react.element") || 0xeac7;
  return function createRawReactElement(type, props, key, children) {
    var defaultProps = type && type.defaultProps;
    var childrenLength = arguments.length - 3;
    if (!props && childrenLength !== 0) {
      props = {};
    }
    if (props && defaultProps) {
      for (var propName in defaultProps) {
        if (props[propName] === void 0) {
          props[propName] = defaultProps[propName];
        }
      }
    } else if (!props) {
      props = defaultProps || {};
    }
    if (childrenLength === 1) {
      props.children = children;
    } else if (childrenLength > 1) {
      var childArray = Array(childrenLength);
      for (var i = 0; i < childrenLength; i++) {
        childArray[i] = arguments[i + 3];
      }
      props.children = childArray;
    }
    return {
      $$typeof: REACT_ELEMENT_TYPE,
      type: type,
      key: key === undefined ? null : '' + key,
      ref: null,
      props: props,
      _owner: null
    };
  };
}();
var asyncToGenerator = function asyncToGenerator(fn) {
  return function () {
    var gen = fn.apply(this, arguments);
    return new Promise(function (resolve, reject) {
      function step(key, arg) {
        try {
          var info = gen[key](arg);
          var value = info.value;
        } catch (error) {
          reject(error);
          return;
        }
        if (info.done) {
          resolve(value);
        } else {
          return Promise.resolve(value).then(function (value) {
            return step("next", value);
          }, function (err) {
            return step("throw", err);
          });
        }
      }
      return step("next");
    });
  };
};
var classCallCheck = function classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
};
var createClass = function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];
      descriptor.enumerable = descriptor.enumerable || false;
      descriptor.configurable = true;
      if ("value" in descriptor) descriptor.writable = true;
      Object.defineProperty(target, descriptor.key, descriptor);
    }
  }
  return function (Constructor, protoProps, staticProps) {
    if (protoProps) defineProperties(Constructor.prototype, protoProps);
    if (staticProps) defineProperties(Constructor, staticProps);
    return Constructor;
  };
}();
var defineEnumerableProperties = function defineEnumerableProperties(obj, descs) {
  for (var key in descs) {
    var desc = descs[key];
    desc.configurable = desc.enumerable = true;
    if ("value" in desc) desc.writable = true;
    Object.defineProperty(obj, key, desc);
  }
  return obj;
};
var defaults = function defaults(obj, _defaults) {
  var keys = Object.getOwnPropertyNames(_defaults);
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    var value = Object.getOwnPropertyDescriptor(_defaults, key);
    if (value && value.configurable && obj[key] === undefined) {
      Object.defineProperty(obj, key, value);
    }
  }
  return obj;
};
var defineProperty$1 = function defineProperty$1(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }
  return obj;
};
var _extends = Object.assign || function (target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i];
    for (var key in source) {
      if (Object.prototype.hasOwnProperty.call(source, key)) {
        target[key] = source[key];
      }
    }
  }
  return target;
};
var get = function get(object, property, receiver) {
  if (object === null) object = Function.prototype;
  var desc = Object.getOwnPropertyDescriptor(object, property);
  if (desc === undefined) {
    var parent = Object.getPrototypeOf(object);
    if (parent === null) {
      return undefined;
    } else {
      return get(parent, property, receiver);
    }
  } else if ("value" in desc) {
    return desc.value;
  } else {
    var getter = desc.get;
    if (getter === undefined) {
      return undefined;
    }
    return getter.call(receiver);
  }
};
var inherits = function inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function, not " + _typeof2(superClass));
  }
  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      enumerable: false,
      writable: true,
      configurable: true
    }
  });
  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
var _instanceof = function _instanceof(left, right) {
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
    return right[Symbol.hasInstance](left);
  } else {
    return left instanceof right;
  }
};
var interopRequireDefault = function interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
};
var interopRequireWildcard = function interopRequireWildcard(obj) {
  if (obj && obj.__esModule) {
    return obj;
  } else {
    var newObj = {};
    if (obj != null) {
      for (var key in obj) {
        if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
      }
    }
    newObj["default"] = obj;
    return newObj;
  }
};
var newArrowCheck = function newArrowCheck(innerThis, boundThis) {
  if (innerThis !== boundThis) {
    throw new TypeError("Cannot instantiate an arrow function");
  }
};
var objectDestructuringEmpty = function objectDestructuringEmpty(obj) {
  if (obj == null) throw new TypeError("Cannot destructure undefined");
};
var objectWithoutProperties = function objectWithoutProperties(obj, keys) {
  var target = {};
  for (var i in obj) {
    if (keys.indexOf(i) >= 0) continue;
    if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
    target[i] = obj[i];
  }
  return target;
};
var possibleConstructorReturn = function possibleConstructorReturn(self, call) {
  if (!self) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }
  return call && (_typeof2(call) === "object" || typeof call === "function") ? call : self;
};
var selfGlobal = typeof __webpack_require__.g === "undefined" ? self : __webpack_require__.g;
var set = function set(object, property, value, receiver) {
  var desc = Object.getOwnPropertyDescriptor(object, property);
  if (desc === undefined) {
    var parent = Object.getPrototypeOf(object);
    if (parent !== null) {
      set(parent, property, value, receiver);
    }
  } else if ("value" in desc && desc.writable) {
    desc.value = value;
  } else {
    var setter = desc.set;
    if (setter !== undefined) {
      setter.call(receiver, value);
    }
  }
  return value;
};
var slicedToArray = function () {
  function sliceIterator(arr, i) {
    var _arr = [];
    var _n = true;
    var _d = false;
    var _e = undefined;
    try {
      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
        _arr.push(_s.value);
        if (i && _arr.length === i) break;
      }
    } catch (err) {
      _d = true;
      _e = err;
    } finally {
      try {
        if (!_n && _i["return"]) _i["return"]();
      } finally {
        if (_d) throw _e;
      }
    }
    return _arr;
  }
  return function (arr, i) {
    if (Array.isArray(arr)) {
      return arr;
    } else if (Symbol.iterator in Object(arr)) {
      return sliceIterator(arr, i);
    } else {
      throw new TypeError("Invalid attempt to destructure non-iterable instance");
    }
  };
}();
var slicedToArrayLoose = function slicedToArrayLoose(arr, i) {
  if (Array.isArray(arr)) {
    return arr;
  } else if (Symbol.iterator in Object(arr)) {
    var _arr = [];
    for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
      _arr.push(_step.value);
      if (i && _arr.length === i) break;
    }
    return _arr;
  } else {
    throw new TypeError("Invalid attempt to destructure non-iterable instance");
  }
};
var taggedTemplateLiteral = function taggedTemplateLiteral(strings, raw) {
  return Object.freeze(Object.defineProperties(strings, {
    raw: {
      value: Object.freeze(raw)
    }
  }));
};
var taggedTemplateLiteralLoose = function taggedTemplateLiteralLoose(strings, raw) {
  strings.raw = raw;
  return strings;
};
var temporalRef = function temporalRef(val, name, undef) {
  if (val === undef) {
    throw new ReferenceError(name + " is not defined - temporal dead zone");
  } else {
    return val;
  }
};
var temporalUndefined = {};
var toArray = function toArray(arr) {
  return Array.isArray(arr) ? arr : Array.from(arr);
};
var toConsumableArray = function toConsumableArray(arr) {
  if (Array.isArray(arr)) {
    for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
      arr2[i] = arr[i];
    }
    return arr2;
  } else {
    return Array.from(arr);
  }
};
var babelHelpers$1 = Object.freeze({
  jsx: jsx,
  asyncToGenerator: asyncToGenerator,
  classCallCheck: classCallCheck,
  createClass: createClass,
  defineEnumerableProperties: defineEnumerableProperties,
  defaults: defaults,
  defineProperty: defineProperty$1,
  get: get,
  inherits: inherits,
  interopRequireDefault: interopRequireDefault,
  interopRequireWildcard: interopRequireWildcard,
  newArrowCheck: newArrowCheck,
  objectDestructuringEmpty: objectDestructuringEmpty,
  objectWithoutProperties: objectWithoutProperties,
  possibleConstructorReturn: possibleConstructorReturn,
  selfGlobal: selfGlobal,
  set: set,
  slicedToArray: slicedToArray,
  slicedToArrayLoose: slicedToArrayLoose,
  taggedTemplateLiteral: taggedTemplateLiteral,
  taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,
  temporalRef: temporalRef,
  temporalUndefined: temporalUndefined,
  toArray: toArray,
  toConsumableArray: toConsumableArray,
  "typeof": _typeof,
  "extends": _extends,
  "instanceof": _instanceof
});
var realDefineProp = function () {
  var sentinel = function sentinel() {};
  try {
    Object.defineProperty(sentinel, 'a', {
      get: function get() {
        return 1;
      }
    });
    Object.defineProperty(sentinel, 'prototype', {
      writable: false
    });
    return sentinel.a === 1 && sentinel.prototype instanceof Object;
  } catch (e) {
    return false;
  }
}();

// Need a workaround for getters in ES3
var es3 = !realDefineProp && !Object.prototype.__defineGetter__;

// We use this a lot (and need it for proto-less objects)
var hop = Object.prototype.hasOwnProperty;

// Naive defineProperty for compatibility
var defineProperty = realDefineProp ? Object.defineProperty : function (obj, name, desc) {
  if ('get' in desc && obj.__defineGetter__) obj.__defineGetter__(name, desc.get);else if (!hop.call(obj, name) || 'value' in desc) obj[name] = desc.value;
};

// Array.prototype.indexOf, as good as we need it to be
var arrIndexOf = Array.prototype.indexOf || function (search) {
  /*jshint validthis:true */
  var t = this;
  if (!t.length) return -1;
  for (var i = arguments[1] || 0, max = t.length; i < max; i++) {
    if (t[i] === search) return i;
  }
  return -1;
};

// Create an object with the specified prototype (2nd arg required for Record)
var objCreate = Object.create || function (proto, props) {
  var obj = void 0;
  function F() {}
  F.prototype = proto;
  obj = new F();
  for (var k in props) {
    if (hop.call(props, k)) defineProperty(obj, k, props[k]);
  }
  return obj;
};

// Snapshot some (hopefully still) native built-ins
var arrSlice = Array.prototype.slice;
var arrConcat = Array.prototype.concat;
var arrPush = Array.prototype.push;
var arrJoin = Array.prototype.join;
var arrShift = Array.prototype.shift;

// Naive Function.prototype.bind for compatibility
var fnBind = Function.prototype.bind || function (thisObj) {
  var fn = this,
    args = arrSlice.call(arguments, 1);

  // All our (presently) bound functions have either 1 or 0 arguments. By returning
  // different function signatures, we can pass some tests in ES3 environments
  if (fn.length === 1) {
    return function () {
      return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments)));
    };
  }
  return function () {
    return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments)));
  };
};

// Object housing internal properties for constructors
var internals = objCreate(null);

// Keep internal properties internal
var secret = Math.random();

// Helper functions
// ================

/**
 * A function to deal with the inaccuracy of calculating log10 in pre-ES6
 * JavaScript environments. Math.log(num) / Math.LN10 was responsible for
 * causing issue #62.
 */
function log10Floor(n) {
  // ES6 provides the more accurate Math.log10
  if (typeof Math.log10 === 'function') return Math.floor(Math.log10(n));
  var x = Math.round(Math.log(n) * Math.LOG10E);
  return x - (Number('1e' + x) > n);
}

/**
 * A map that doesn't contain Object in its prototype chain
 */
function Record(obj) {
  // Copy only own properties over unless this object is already a Record instance
  for (var k in obj) {
    if (obj instanceof Record || hop.call(obj, k)) defineProperty(this, k, {
      value: obj[k],
      enumerable: true,
      writable: true,
      configurable: true
    });
  }
}
Record.prototype = objCreate(null);

/**
 * An ordered list
 */
function List() {
  defineProperty(this, 'length', {
    writable: true,
    value: 0
  });
  if (arguments.length) arrPush.apply(this, arrSlice.call(arguments));
}
List.prototype = objCreate(null);

/**
 * Constructs a regular expression to restore tainted RegExp properties
 */
function createRegExpRestore() {
  if (internals.disableRegExpRestore) {
    return function () {/* no-op */};
  }
  var regExpCache = {
      lastMatch: RegExp.lastMatch || '',
      leftContext: RegExp.leftContext,
      multiline: RegExp.multiline,
      input: RegExp.input
    },
    has = false;

  // Create a snapshot of all the 'captured' properties
  for (var i = 1; i <= 9; i++) {
    has = (regExpCache['$' + i] = RegExp['$' + i]) || has;
  }
  return function () {
    // Now we've snapshotted some properties, escape the lastMatch string
    var esc = /[.?*+^$[\]\\(){}|-]/g,
      lm = regExpCache.lastMatch.replace(esc, '\\$&'),
      reg = new List();

    // If any of the captured strings were non-empty, iterate over them all
    if (has) {
      for (var _i = 1; _i <= 9; _i++) {
        var m = regExpCache['$' + _i];

        // If it's empty, add an empty capturing group
        if (!m) lm = '()' + lm;

        // Else find the string in lm and escape & wrap it to capture it
        else {
          m = m.replace(esc, '\\$&');
          lm = lm.replace(m, '(' + m + ')');
        }

        // Push it to the reg and chop lm to make sure further groups come after
        arrPush.call(reg, lm.slice(0, lm.indexOf('(') + 1));
        lm = lm.slice(lm.indexOf('(') + 1);
      }
    }
    var exprStr = arrJoin.call(reg, '') + lm;

    // Shorten the regex by replacing each part of the expression with a match
    // for a string of that exact length.  This is safe for the type of
    // expressions generated above, because the expression matches the whole
    // match string, so we know each group and each segment between capturing
    // groups can be matched by its length alone.
    exprStr = exprStr.replace(/(\\\(|\\\)|[^()])+/g, function (match) {
      return '[\\s\\S]{' + match.replace('\\', '').length + '}';
    });

    // Create the regular expression that will reconstruct the RegExp properties
    var expr = new RegExp(exprStr, regExpCache.multiline ? 'gm' : 'g');

    // Set the lastIndex of the generated expression to ensure that the match
    // is found in the correct index.
    expr.lastIndex = regExpCache.leftContext.length;
    expr.exec(regExpCache.input);
  };
}

/**
 * Mimics ES5's abstract ToObject() function
 */
function toObject(arg) {
  if (arg === null) throw new TypeError('Cannot convert null or undefined to object');
  if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') return arg;
  return Object(arg);
}
function toNumber(arg) {
  if (typeof arg === 'number') return arg;
  return Number(arg);
}
function toInteger(arg) {
  var number = toNumber(arg);
  if (isNaN(number)) return 0;
  if (number === +0 || number === -0 || number === +Infinity || number === -Infinity) return number;
  if (number < 0) return Math.floor(Math.abs(number)) * -1;
  return Math.floor(Math.abs(number));
}
function toLength(arg) {
  var len = toInteger(arg);
  if (len <= 0) return 0;
  if (len === Infinity) return Math.pow(2, 53) - 1;
  return Math.min(len, Math.pow(2, 53) - 1);
}

/**
 * Returns "internal" properties for an object
 */
function getInternalProperties(obj) {
  if (hop.call(obj, '__getInternalProperties')) return obj.__getInternalProperties(secret);
  return objCreate(null);
}

/**
* Defines regular expressions for various operations related to the BCP 47 syntax,
* as defined at http://tools.ietf.org/html/bcp47#section-2.1
*/

// extlang       = 3ALPHA              ; selected ISO 639 codes
//                 *2("-" 3ALPHA)      ; permanently reserved
var extlang = '[a-z]{3}(?:-[a-z]{3}){0,2}';

// language      = 2*3ALPHA            ; shortest ISO 639 code
//                 ["-" extlang]       ; sometimes followed by
//                                     ; extended language subtags
//               / 4ALPHA              ; or reserved for future use
//               / 5*8ALPHA            ; or registered language subtag
var language = '(?:[a-z]{2,3}(?:-' + extlang + ')?|[a-z]{4}|[a-z]{5,8})';

// script        = 4ALPHA              ; ISO 15924 code
var script = '[a-z]{4}';

// region        = 2ALPHA              ; ISO 3166-1 code
//               / 3DIGIT              ; UN M.49 code
var region = '(?:[a-z]{2}|\\d{3})';

// variant       = 5*8alphanum         ; registered variants
//               / (DIGIT 3alphanum)
var variant = '(?:[a-z0-9]{5,8}|\\d[a-z0-9]{3})';

//                                     ; Single alphanumerics
//                                     ; "x" reserved for private use
// singleton     = DIGIT               ; 0 - 9
//               / %x41-57             ; A - W
//               / %x59-5A             ; Y - Z
//               / %x61-77             ; a - w
//               / %x79-7A             ; y - z
var singleton = '[0-9a-wy-z]';

// extension     = singleton 1*("-" (2*8alphanum))
var extension = singleton + '(?:-[a-z0-9]{2,8})+';

// privateuse    = "x" 1*("-" (1*8alphanum))
var privateuse = 'x(?:-[a-z0-9]{1,8})+';

// irregular     = "en-GB-oed"         ; irregular tags do not match
//               / "i-ami"             ; the 'langtag' production and
//               / "i-bnn"             ; would not otherwise be
//               / "i-default"         ; considered 'well-formed'
//               / "i-enochian"        ; These tags are all valid,
//               / "i-hak"             ; but most are deprecated
//               / "i-klingon"         ; in favor of more modern
//               / "i-lux"             ; subtags or subtag
//               / "i-mingo"           ; combination
//               / "i-navajo"
//               / "i-pwn"
//               / "i-tao"
//               / "i-tay"
//               / "i-tsu"
//               / "sgn-BE-FR"
//               / "sgn-BE-NL"
//               / "sgn-CH-DE"
var irregular = '(?:en-GB-oed' + '|i-(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)' + '|sgn-(?:BE-FR|BE-NL|CH-DE))';

// regular       = "art-lojban"        ; these tags match the 'langtag'
//               / "cel-gaulish"       ; production, but their subtags
//               / "no-bok"            ; are not extended language
//               / "no-nyn"            ; or variant subtags: their meaning
//               / "zh-guoyu"          ; is defined by their registration
//               / "zh-hakka"          ; and all of these are deprecated
//               / "zh-min"            ; in favor of a more modern
//               / "zh-min-nan"        ; subtag or sequence of subtags
//               / "zh-xiang"
var regular = '(?:art-lojban|cel-gaulish|no-bok|no-nyn' + '|zh-(?:guoyu|hakka|min|min-nan|xiang))';

// grandfathered = irregular           ; non-redundant tags registered
//               / regular             ; during the RFC 3066 era
var grandfathered = '(?:' + irregular + '|' + regular + ')';

// langtag       = language
//                 ["-" script]
//                 ["-" region]
//                 *("-" variant)
//                 *("-" extension)
//                 ["-" privateuse]
var langtag = language + '(?:-' + script + ')?(?:-' + region + ')?(?:-' + variant + ')*(?:-' + extension + ')*(?:-' + privateuse + ')?';

// Language-Tag  = langtag             ; normal language tags
//               / privateuse          ; private use tag
//               / grandfathered       ; grandfathered tags
var expBCP47Syntax = RegExp('^(?:' + langtag + '|' + privateuse + '|' + grandfathered + ')$', 'i');

// Match duplicate variants in a language tag
var expVariantDupes = RegExp('^(?!x).*?-(' + variant + ')-(?:\\w{4,8}-(?!x-))*\\1\\b', 'i');

// Match duplicate singletons in a language tag (except in private use)
var expSingletonDupes = RegExp('^(?!x).*?-(' + singleton + ')-(?:\\w+-(?!x-))*\\1\\b', 'i');

// Match all extension sequences
var expExtSequences = RegExp('-' + extension, 'ig');

// Default locale is the first-added locale data for us
var defaultLocale = void 0;
function setDefaultLocale(locale) {
  defaultLocale = locale;
}

// IANA Subtag Registry redundant tag and subtag maps
var redundantTags = {
  tags: {
    "art-lojban": "jbo",
    "i-ami": "ami",
    "i-bnn": "bnn",
    "i-hak": "hak",
    "i-klingon": "tlh",
    "i-lux": "lb",
    "i-navajo": "nv",
    "i-pwn": "pwn",
    "i-tao": "tao",
    "i-tay": "tay",
    "i-tsu": "tsu",
    "no-bok": "nb",
    "no-nyn": "nn",
    "sgn-BE-FR": "sfb",
    "sgn-BE-NL": "vgt",
    "sgn-CH-DE": "sgg",
    "zh-guoyu": "cmn",
    "zh-hakka": "hak",
    "zh-min-nan": "nan",
    "zh-xiang": "hsn",
    "sgn-BR": "bzs",
    "sgn-CO": "csn",
    "sgn-DE": "gsg",
    "sgn-DK": "dsl",
    "sgn-ES": "ssp",
    "sgn-FR": "fsl",
    "sgn-GB": "bfi",
    "sgn-GR": "gss",
    "sgn-IE": "isg",
    "sgn-IT": "ise",
    "sgn-JP": "jsl",
    "sgn-MX": "mfs",
    "sgn-NI": "ncs",
    "sgn-NL": "dse",
    "sgn-NO": "nsl",
    "sgn-PT": "psr",
    "sgn-SE": "swl",
    "sgn-US": "ase",
    "sgn-ZA": "sfs",
    "zh-cmn": "cmn",
    "zh-cmn-Hans": "cmn-Hans",
    "zh-cmn-Hant": "cmn-Hant",
    "zh-gan": "gan",
    "zh-wuu": "wuu",
    "zh-yue": "yue"
  },
  subtags: {
    BU: "MM",
    DD: "DE",
    FX: "FR",
    TP: "TL",
    YD: "YE",
    ZR: "CD",
    heploc: "alalc97",
    'in': "id",
    iw: "he",
    ji: "yi",
    jw: "jv",
    mo: "ro",
    ayx: "nun",
    bjd: "drl",
    ccq: "rki",
    cjr: "mom",
    cka: "cmr",
    cmk: "xch",
    drh: "khk",
    drw: "prs",
    gav: "dev",
    hrr: "jal",
    ibi: "opa",
    kgh: "kml",
    lcq: "ppr",
    mst: "mry",
    myt: "mry",
    sca: "hle",
    tie: "ras",
    tkk: "twm",
    tlw: "weo",
    tnf: "prs",
    ybd: "rki",
    yma: "lrr"
  },
  extLang: {
    aao: ["aao", "ar"],
    abh: ["abh", "ar"],
    abv: ["abv", "ar"],
    acm: ["acm", "ar"],
    acq: ["acq", "ar"],
    acw: ["acw", "ar"],
    acx: ["acx", "ar"],
    acy: ["acy", "ar"],
    adf: ["adf", "ar"],
    ads: ["ads", "sgn"],
    aeb: ["aeb", "ar"],
    aec: ["aec", "ar"],
    aed: ["aed", "sgn"],
    aen: ["aen", "sgn"],
    afb: ["afb", "ar"],
    afg: ["afg", "sgn"],
    ajp: ["ajp", "ar"],
    apc: ["apc", "ar"],
    apd: ["apd", "ar"],
    arb: ["arb", "ar"],
    arq: ["arq", "ar"],
    ars: ["ars", "ar"],
    ary: ["ary", "ar"],
    arz: ["arz", "ar"],
    ase: ["ase", "sgn"],
    asf: ["asf", "sgn"],
    asp: ["asp", "sgn"],
    asq: ["asq", "sgn"],
    asw: ["asw", "sgn"],
    auz: ["auz", "ar"],
    avl: ["avl", "ar"],
    ayh: ["ayh", "ar"],
    ayl: ["ayl", "ar"],
    ayn: ["ayn", "ar"],
    ayp: ["ayp", "ar"],
    bbz: ["bbz", "ar"],
    bfi: ["bfi", "sgn"],
    bfk: ["bfk", "sgn"],
    bjn: ["bjn", "ms"],
    bog: ["bog", "sgn"],
    bqn: ["bqn", "sgn"],
    bqy: ["bqy", "sgn"],
    btj: ["btj", "ms"],
    bve: ["bve", "ms"],
    bvl: ["bvl", "sgn"],
    bvu: ["bvu", "ms"],
    bzs: ["bzs", "sgn"],
    cdo: ["cdo", "zh"],
    cds: ["cds", "sgn"],
    cjy: ["cjy", "zh"],
    cmn: ["cmn", "zh"],
    coa: ["coa", "ms"],
    cpx: ["cpx", "zh"],
    csc: ["csc", "sgn"],
    csd: ["csd", "sgn"],
    cse: ["cse", "sgn"],
    csf: ["csf", "sgn"],
    csg: ["csg", "sgn"],
    csl: ["csl", "sgn"],
    csn: ["csn", "sgn"],
    csq: ["csq", "sgn"],
    csr: ["csr", "sgn"],
    czh: ["czh", "zh"],
    czo: ["czo", "zh"],
    doq: ["doq", "sgn"],
    dse: ["dse", "sgn"],
    dsl: ["dsl", "sgn"],
    dup: ["dup", "ms"],
    ecs: ["ecs", "sgn"],
    esl: ["esl", "sgn"],
    esn: ["esn", "sgn"],
    eso: ["eso", "sgn"],
    eth: ["eth", "sgn"],
    fcs: ["fcs", "sgn"],
    fse: ["fse", "sgn"],
    fsl: ["fsl", "sgn"],
    fss: ["fss", "sgn"],
    gan: ["gan", "zh"],
    gds: ["gds", "sgn"],
    gom: ["gom", "kok"],
    gse: ["gse", "sgn"],
    gsg: ["gsg", "sgn"],
    gsm: ["gsm", "sgn"],
    gss: ["gss", "sgn"],
    gus: ["gus", "sgn"],
    hab: ["hab", "sgn"],
    haf: ["haf", "sgn"],
    hak: ["hak", "zh"],
    hds: ["hds", "sgn"],
    hji: ["hji", "ms"],
    hks: ["hks", "sgn"],
    hos: ["hos", "sgn"],
    hps: ["hps", "sgn"],
    hsh: ["hsh", "sgn"],
    hsl: ["hsl", "sgn"],
    hsn: ["hsn", "zh"],
    icl: ["icl", "sgn"],
    ils: ["ils", "sgn"],
    inl: ["inl", "sgn"],
    ins: ["ins", "sgn"],
    ise: ["ise", "sgn"],
    isg: ["isg", "sgn"],
    isr: ["isr", "sgn"],
    jak: ["jak", "ms"],
    jax: ["jax", "ms"],
    jcs: ["jcs", "sgn"],
    jhs: ["jhs", "sgn"],
    jls: ["jls", "sgn"],
    jos: ["jos", "sgn"],
    jsl: ["jsl", "sgn"],
    jus: ["jus", "sgn"],
    kgi: ["kgi", "sgn"],
    knn: ["knn", "kok"],
    kvb: ["kvb", "ms"],
    kvk: ["kvk", "sgn"],
    kvr: ["kvr", "ms"],
    kxd: ["kxd", "ms"],
    lbs: ["lbs", "sgn"],
    lce: ["lce", "ms"],
    lcf: ["lcf", "ms"],
    liw: ["liw", "ms"],
    lls: ["lls", "sgn"],
    lsg: ["lsg", "sgn"],
    lsl: ["lsl", "sgn"],
    lso: ["lso", "sgn"],
    lsp: ["lsp", "sgn"],
    lst: ["lst", "sgn"],
    lsy: ["lsy", "sgn"],
    ltg: ["ltg", "lv"],
    lvs: ["lvs", "lv"],
    lzh: ["lzh", "zh"],
    max: ["max", "ms"],
    mdl: ["mdl", "sgn"],
    meo: ["meo", "ms"],
    mfa: ["mfa", "ms"],
    mfb: ["mfb", "ms"],
    mfs: ["mfs", "sgn"],
    min: ["min", "ms"],
    mnp: ["mnp", "zh"],
    mqg: ["mqg", "ms"],
    mre: ["mre", "sgn"],
    msd: ["msd", "sgn"],
    msi: ["msi", "ms"],
    msr: ["msr", "sgn"],
    mui: ["mui", "ms"],
    mzc: ["mzc", "sgn"],
    mzg: ["mzg", "sgn"],
    mzy: ["mzy", "sgn"],
    nan: ["nan", "zh"],
    nbs: ["nbs", "sgn"],
    ncs: ["ncs", "sgn"],
    nsi: ["nsi", "sgn"],
    nsl: ["nsl", "sgn"],
    nsp: ["nsp", "sgn"],
    nsr: ["nsr", "sgn"],
    nzs: ["nzs", "sgn"],
    okl: ["okl", "sgn"],
    orn: ["orn", "ms"],
    ors: ["ors", "ms"],
    pel: ["pel", "ms"],
    pga: ["pga", "ar"],
    pks: ["pks", "sgn"],
    prl: ["prl", "sgn"],
    prz: ["prz", "sgn"],
    psc: ["psc", "sgn"],
    psd: ["psd", "sgn"],
    pse: ["pse", "ms"],
    psg: ["psg", "sgn"],
    psl: ["psl", "sgn"],
    pso: ["pso", "sgn"],
    psp: ["psp", "sgn"],
    psr: ["psr", "sgn"],
    pys: ["pys", "sgn"],
    rms: ["rms", "sgn"],
    rsi: ["rsi", "sgn"],
    rsl: ["rsl", "sgn"],
    sdl: ["sdl", "sgn"],
    sfb: ["sfb", "sgn"],
    sfs: ["sfs", "sgn"],
    sgg: ["sgg", "sgn"],
    sgx: ["sgx", "sgn"],
    shu: ["shu", "ar"],
    slf: ["slf", "sgn"],
    sls: ["sls", "sgn"],
    sqk: ["sqk", "sgn"],
    sqs: ["sqs", "sgn"],
    ssh: ["ssh", "ar"],
    ssp: ["ssp", "sgn"],
    ssr: ["ssr", "sgn"],
    svk: ["svk", "sgn"],
    swc: ["swc", "sw"],
    swh: ["swh", "sw"],
    swl: ["swl", "sgn"],
    syy: ["syy", "sgn"],
    tmw: ["tmw", "ms"],
    tse: ["tse", "sgn"],
    tsm: ["tsm", "sgn"],
    tsq: ["tsq", "sgn"],
    tss: ["tss", "sgn"],
    tsy: ["tsy", "sgn"],
    tza: ["tza", "sgn"],
    ugn: ["ugn", "sgn"],
    ugy: ["ugy", "sgn"],
    ukl: ["ukl", "sgn"],
    uks: ["uks", "sgn"],
    urk: ["urk", "ms"],
    uzn: ["uzn", "uz"],
    uzs: ["uzs", "uz"],
    vgt: ["vgt", "sgn"],
    vkk: ["vkk", "ms"],
    vkt: ["vkt", "ms"],
    vsi: ["vsi", "sgn"],
    vsl: ["vsl", "sgn"],
    vsv: ["vsv", "sgn"],
    wuu: ["wuu", "zh"],
    xki: ["xki", "sgn"],
    xml: ["xml", "sgn"],
    xmm: ["xmm", "ms"],
    xms: ["xms", "sgn"],
    yds: ["yds", "sgn"],
    ysl: ["ysl", "sgn"],
    yue: ["yue", "zh"],
    zib: ["zib", "sgn"],
    zlm: ["zlm", "ms"],
    zmi: ["zmi", "ms"],
    zsl: ["zsl", "sgn"],
    zsm: ["zsm", "ms"]
  }
};

/**
 * Convert only a-z to uppercase as per section 6.1 of the spec
 */
function toLatinUpperCase(str) {
  var i = str.length;
  while (i--) {
    var ch = str.charAt(i);
    if (ch >= "a" && ch <= "z") str = str.slice(0, i) + ch.toUpperCase() + str.slice(i + 1);
  }
  return str;
}

/**
 * The IsStructurallyValidLanguageTag abstract operation verifies that the locale
 * argument (which must be a String value)
 *
 * - represents a well-formed BCP 47 language tag as specified in RFC 5646 section
 *   2.1, or successor,
 * - does not include duplicate variant subtags, and
 * - does not include duplicate singleton subtags.
 *
 * The abstract operation returns true if locale can be generated from the ABNF
 * grammar in section 2.1 of the RFC, starting with Language-Tag, and does not
 * contain duplicate variant or singleton subtags (other than as a private use
 * subtag). It returns false otherwise. Terminal value characters in the grammar are
 * interpreted as the Unicode equivalents of the ASCII octet values given.
 */
function /* 6.2.2 */IsStructurallyValidLanguageTag(locale) {
  // represents a well-formed BCP 47 language tag as specified in RFC 5646
  if (!expBCP47Syntax.test(locale)) return false;

  // does not include duplicate variant subtags, and
  if (expVariantDupes.test(locale)) return false;

  // does not include duplicate singleton subtags.
  if (expSingletonDupes.test(locale)) return false;
  return true;
}

/**
 * The CanonicalizeLanguageTag abstract operation returns the canonical and case-
 * regularized form of the locale argument (which must be a String value that is
 * a structurally valid BCP 47 language tag as verified by the
 * IsStructurallyValidLanguageTag abstract operation). It takes the steps
 * specified in RFC 5646 section 4.5, or successor, to bring the language tag
 * into canonical form, and to regularize the case of the subtags, but does not
 * take the steps to bring a language tag into “extlang form” and to reorder
 * variant subtags.

 * The specifications for extensions to BCP 47 language tags, such as RFC 6067,
 * may include canonicalization rules for the extension subtag sequences they
 * define that go beyond the canonicalization rules of RFC 5646 section 4.5.
 * Implementations are allowed, but not required, to apply these additional rules.
 */
function /* 6.2.3 */CanonicalizeLanguageTag(locale) {
  var match = void 0,
    parts = void 0;

  // A language tag is in 'canonical form' when the tag is well-formed
  // according to the rules in Sections 2.1 and 2.2

  // Section 2.1 says all subtags use lowercase...
  locale = locale.toLowerCase();

  // ...with 2 exceptions: 'two-letter and four-letter subtags that neither
  // appear at the start of the tag nor occur after singletons.  Such two-letter
  // subtags are all uppercase (as in the tags "en-CA-x-ca" or "sgn-BE-FR") and
  // four-letter subtags are titlecase (as in the tag "az-Latn-x-latn").
  parts = locale.split('-');
  for (var i = 1, max = parts.length; i < max; i++) {
    // Two-letter subtags are all uppercase
    if (parts[i].length === 2) parts[i] = parts[i].toUpperCase();

    // Four-letter subtags are titlecase
    else if (parts[i].length === 4) parts[i] = parts[i].charAt(0).toUpperCase() + parts[i].slice(1);

    // Is it a singleton?
    else if (parts[i].length === 1 && parts[i] !== 'x') break;
  }
  locale = arrJoin.call(parts, '-');

  // The steps laid out in RFC 5646 section 4.5 are as follows:

  // 1.  Extension sequences are ordered into case-insensitive ASCII order
  //     by singleton subtag.
  if ((match = locale.match(expExtSequences)) && match.length > 1) {
    // The built-in sort() sorts by ASCII order, so use that
    match.sort();

    // Replace all extensions with the joined, sorted array
    locale = locale.replace(RegExp('(?:' + expExtSequences.source + ')+', 'i'), arrJoin.call(match, ''));
  }

  // 2.  Redundant or grandfathered tags are replaced by their 'Preferred-
  //     Value', if there is one.
  if (hop.call(redundantTags.tags, locale)) locale = redundantTags.tags[locale];

  // 3.  Subtags are replaced by their 'Preferred-Value', if there is one.
  //     For extlangs, the original primary language subtag is also
  //     replaced if there is a primary language subtag in the 'Preferred-
  //     Value'.
  parts = locale.split('-');
  for (var _i = 1, _max = parts.length; _i < _max; _i++) {
    if (hop.call(redundantTags.subtags, parts[_i])) parts[_i] = redundantTags.subtags[parts[_i]];else if (hop.call(redundantTags.extLang, parts[_i])) {
      parts[_i] = redundantTags.extLang[parts[_i]][0];

      // For extlang tags, the prefix needs to be removed if it is redundant
      if (_i === 1 && redundantTags.extLang[parts[1]][1] === parts[0]) {
        parts = arrSlice.call(parts, _i++);
        _max -= 1;
      }
    }
  }
  return arrJoin.call(parts, '-');
}

/**
 * The DefaultLocale abstract operation returns a String value representing the
 * structurally valid (6.2.2) and canonicalized (6.2.3) BCP 47 language tag for the
 * host environment’s current locale.
 */
function /* 6.2.4 */DefaultLocale() {
  return defaultLocale;
}

// Sect 6.3 Currency Codes
// =======================

var expCurrencyCode = /^[A-Z]{3}$/;

/**
 * The IsWellFormedCurrencyCode abstract operation verifies that the currency argument
 * (after conversion to a String value) represents a well-formed 3-letter ISO currency
 * code. The following steps are taken:
 */
function /* 6.3.1 */IsWellFormedCurrencyCode(currency) {
  // 1. Let `c` be ToString(currency)
  var c = String(currency);

  // 2. Let `normalized` be the result of mapping c to upper case as described
  //    in 6.1.
  var normalized = toLatinUpperCase(c);

  // 3. If the string length of normalized is not 3, return false.
  // 4. If normalized contains any character that is not in the range "A" to "Z"
  //    (U+0041 to U+005A), return false.
  if (expCurrencyCode.test(normalized) === false) return false;

  // 5. Return true
  return true;
}
var expUnicodeExSeq = /-u(?:-[0-9a-z]{2,8})+/gi; // See `extension` below

function /* 9.2.1 */CanonicalizeLocaleList(locales) {
  // The abstract operation CanonicalizeLocaleList takes the following steps:

  // 1. If locales is undefined, then a. Return a new empty List
  if (locales === undefined) return new List();

  // 2. Let seen be a new empty List.
  var seen = new List();

  // 3. If locales is a String value, then
  //    a. Let locales be a new array created as if by the expression new
  //    Array(locales) where Array is the standard built-in constructor with
  //    that name and locales is the value of locales.
  locales = typeof locales === 'string' ? [locales] : locales;

  // 4. Let O be ToObject(locales).
  var O = toObject(locales);

  // 5. Let lenValue be the result of calling the [[Get]] internal method of
  //    O with the argument "length".
  // 6. Let len be ToUint32(lenValue).
  var len = toLength(O.length);

  // 7. Let k be 0.
  var k = 0;

  // 8. Repeat, while k < len
  while (k < len) {
    // a. Let Pk be ToString(k).
    var Pk = String(k);

    // b. Let kPresent be the result of calling the [[HasProperty]] internal
    //    method of O with argument Pk.
    var kPresent = (Pk in O);

    // c. If kPresent is true, then
    if (kPresent) {
      // i. Let kValue be the result of calling the [[Get]] internal
      //     method of O with argument Pk.
      var kValue = O[Pk];

      // ii. If the type of kValue is not String or Object, then throw a
      //     TypeError exception.
      if (kValue === null || typeof kValue !== 'string' && (typeof kValue === "undefined" ? "undefined" : babelHelpers$1["typeof"](kValue)) !== 'object') throw new TypeError('String or Object type expected');

      // iii. Let tag be ToString(kValue).
      var tag = String(kValue);

      // iv. If the result of calling the abstract operation
      //     IsStructurallyValidLanguageTag (defined in 6.2.2), passing tag as
      //     the argument, is false, then throw a RangeError exception.
      if (!IsStructurallyValidLanguageTag(tag)) throw new RangeError("'" + tag + "' is not a structurally valid language tag");

      // v. Let tag be the result of calling the abstract operation
      //    CanonicalizeLanguageTag (defined in 6.2.3), passing tag as the
      //    argument.
      tag = CanonicalizeLanguageTag(tag);

      // vi. If tag is not an element of seen, then append tag as the last
      //     element of seen.
      if (arrIndexOf.call(seen, tag) === -1) arrPush.call(seen, tag);
    }

    // d. Increase k by 1.
    k++;
  }

  // 9. Return seen.
  return seen;
}

/**
 * The BestAvailableLocale abstract operation compares the provided argument
 * locale, which must be a String value with a structurally valid and
 * canonicalized BCP 47 language tag, against the locales in availableLocales and
 * returns either the longest non-empty prefix of locale that is an element of
 * availableLocales, or undefined if there is no such element. It uses the
 * fallback mechanism of RFC 4647, section 3.4. The following steps are taken:
 */
function /* 9.2.2 */BestAvailableLocale(availableLocales, locale) {
  // 1. Let candidate be locale
  var candidate = locale;

  // 2. Repeat
  while (candidate) {
    // a. If availableLocales contains an element equal to candidate, then return
    // candidate.
    if (arrIndexOf.call(availableLocales, candidate) > -1) return candidate;

    // b. Let pos be the character index of the last occurrence of "-"
    // (U+002D) within candidate. If that character does not occur, return
    // undefined.
    var pos = candidate.lastIndexOf('-');
    if (pos < 0) return;

    // c. If pos ≥ 2 and the character "-" occurs at index pos-2 of candidate,
    //    then decrease pos by 2.
    if (pos >= 2 && candidate.charAt(pos - 2) === '-') pos -= 2;

    // d. Let candidate be the substring of candidate from position 0, inclusive,
    //    to position pos, exclusive.
    candidate = candidate.substring(0, pos);
  }
}

/**
 * The LookupMatcher abstract operation compares requestedLocales, which must be
 * a List as returned by CanonicalizeLocaleList, against the locales in
 * availableLocales and determines the best available language to meet the
 * request. The following steps are taken:
 */
function /* 9.2.3 */LookupMatcher(availableLocales, requestedLocales) {
  // 1. Let i be 0.
  var i = 0;

  // 2. Let len be the number of elements in requestedLocales.
  var len = requestedLocales.length;

  // 3. Let availableLocale be undefined.
  var availableLocale = void 0;
  var locale = void 0,
    noExtensionsLocale = void 0;

  // 4. Repeat while i < len and availableLocale is undefined:
  while (i < len && !availableLocale) {
    // a. Let locale be the element of requestedLocales at 0-origined list
    //    position i.
    locale = requestedLocales[i];

    // b. Let noExtensionsLocale be the String value that is locale with all
    //    Unicode locale extension sequences removed.
    noExtensionsLocale = String(locale).replace(expUnicodeExSeq, '');

    // c. Let availableLocale be the result of calling the
    //    BestAvailableLocale abstract operation (defined in 9.2.2) with
    //    arguments availableLocales and noExtensionsLocale.
    availableLocale = BestAvailableLocale(availableLocales, noExtensionsLocale);

    // d. Increase i by 1.
    i++;
  }

  // 5. Let result be a new Record.
  var result = new Record();

  // 6. If availableLocale is not undefined, then
  if (availableLocale !== undefined) {
    // a. Set result.[[locale]] to availableLocale.
    result['[[locale]]'] = availableLocale;

    // b. If locale and noExtensionsLocale are not the same String value, then
    if (String(locale) !== String(noExtensionsLocale)) {
      // i. Let extension be the String value consisting of the first
      //    substring of locale that is a Unicode locale extension sequence.
      var extension = locale.match(expUnicodeExSeq)[0];

      // ii. Let extensionIndex be the character position of the initial
      //     "-" of the first Unicode locale extension sequence within locale.
      var extensionIndex = locale.indexOf('-u-');

      // iii. Set result.[[extension]] to extension.
      result['[[extension]]'] = extension;

      // iv. Set result.[[extensionIndex]] to extensionIndex.
      result['[[extensionIndex]]'] = extensionIndex;
    }
  }
  // 7. Else
  else
    // a. Set result.[[locale]] to the value returned by the DefaultLocale abstract
    //    operation (defined in 6.2.4).
    result['[[locale]]'] = DefaultLocale();

  // 8. Return result
  return result;
}

/**
 * The BestFitMatcher abstract operation compares requestedLocales, which must be
 * a List as returned by CanonicalizeLocaleList, against the locales in
 * availableLocales and determines the best available language to meet the
 * request. The algorithm is implementation dependent, but should produce results
 * that a typical user of the requested locales would perceive as at least as
 * good as those produced by the LookupMatcher abstract operation. Options
 * specified through Unicode locale extension sequences must be ignored by the
 * algorithm. Information about such subsequences is returned separately.
 * The abstract operation returns a record with a [[locale]] field, whose value
 * is the language tag of the selected locale, which must be an element of
 * availableLocales. If the language tag of the request locale that led to the
 * selected locale contained a Unicode locale extension sequence, then the
 * returned record also contains an [[extension]] field whose value is the first
 * Unicode locale extension sequence, and an [[extensionIndex]] field whose value
 * is the index of the first Unicode locale extension sequence within the request
 * locale language tag.
 */
function /* 9.2.4 */BestFitMatcher(availableLocales, requestedLocales) {
  return LookupMatcher(availableLocales, requestedLocales);
}

/**
 * The ResolveLocale abstract operation compares a BCP 47 language priority list
 * requestedLocales against the locales in availableLocales and determines the
 * best available language to meet the request. availableLocales and
 * requestedLocales must be provided as List values, options as a Record.
 */
function /* 9.2.5 */ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData) {
  if (availableLocales.length === 0) {
    throw new ReferenceError('No locale data has been provided for this object yet.');
  }

  // The following steps are taken:
  // 1. Let matcher be the value of options.[[localeMatcher]].
  var matcher = options['[[localeMatcher]]'];
  var r = void 0;

  // 2. If matcher is "lookup", then
  if (matcher === 'lookup')
    // a. Let r be the result of calling the LookupMatcher abstract operation
    //    (defined in 9.2.3) with arguments availableLocales and
    //    requestedLocales.
    r = LookupMatcher(availableLocales, requestedLocales);

    // 3. Else
  else
    // a. Let r be the result of calling the BestFitMatcher abstract
    //    operation (defined in 9.2.4) with arguments availableLocales and
    //    requestedLocales.
    r = BestFitMatcher(availableLocales, requestedLocales);

  // 4. Let foundLocale be the value of r.[[locale]].
  var foundLocale = r['[[locale]]'];
  var extensionSubtags = void 0,
    extensionSubtagsLength = void 0;

  // 5. If r has an [[extension]] field, then
  if (hop.call(r, '[[extension]]')) {
    // a. Let extension be the value of r.[[extension]].
    var extension = r['[[extension]]'];
    // b. Let split be the standard built-in function object defined in ES5,
    //    15.5.4.14.
    var split = String.prototype.split;
    // c. Let extensionSubtags be the result of calling the [[Call]] internal
    //    method of split with extension as the this value and an argument
    //    list containing the single item "-".
    extensionSubtags = split.call(extension, '-');
    // d. Let extensionSubtagsLength be the result of calling the [[Get]]
    //    internal method of extensionSubtags with argument "length".
    extensionSubtagsLength = extensionSubtags.length;
  }

  // 6. Let result be a new Record.
  var result = new Record();

  // 7. Set result.[[dataLocale]] to foundLocale.
  result['[[dataLocale]]'] = foundLocale;

  // 8. Let supportedExtension be "-u".
  var supportedExtension = '-u';
  // 9. Let i be 0.
  var i = 0;
  // 10. Let len be the result of calling the [[Get]] internal method of
  //     relevantExtensionKeys with argument "length".
  var len = relevantExtensionKeys.length;

  // 11 Repeat while i < len:
  while (i < len) {
    // a. Let key be the result of calling the [[Get]] internal method of
    //    relevantExtensionKeys with argument ToString(i).
    var key = relevantExtensionKeys[i];
    // b. Let foundLocaleData be the result of calling the [[Get]] internal
    //    method of localeData with the argument foundLocale.
    var foundLocaleData = localeData[foundLocale];
    // c. Let keyLocaleData be the result of calling the [[Get]] internal
    //    method of foundLocaleData with the argument key.
    var keyLocaleData = foundLocaleData[key];
    // d. Let value be the result of calling the [[Get]] internal method of
    //    keyLocaleData with argument "0".
    var value = keyLocaleData['0'];
    // e. Let supportedExtensionAddition be "".
    var supportedExtensionAddition = '';
    // f. Let indexOf be the standard built-in function object defined in
    //    ES5, 15.4.4.14.
    var indexOf = arrIndexOf;

    // g. If extensionSubtags is not undefined, then
    if (extensionSubtags !== undefined) {
      // i. Let keyPos be the result of calling the [[Call]] internal
      //    method of indexOf with extensionSubtags as the this value and
      // an argument list containing the single item key.
      var keyPos = indexOf.call(extensionSubtags, key);

      // ii. If keyPos ≠ -1, then
      if (keyPos !== -1) {
        // 1. If keyPos + 1 < extensionSubtagsLength and the length of the
        //    result of calling the [[Get]] internal method of
        //    extensionSubtags with argument ToString(keyPos +1) is greater
        //    than 2, then
        if (keyPos + 1 < extensionSubtagsLength && extensionSubtags[keyPos + 1].length > 2) {
          // a. Let requestedValue be the result of calling the [[Get]]
          //    internal method of extensionSubtags with argument
          //    ToString(keyPos + 1).
          var requestedValue = extensionSubtags[keyPos + 1];
          // b. Let valuePos be the result of calling the [[Call]]
          //    internal method of indexOf with keyLocaleData as the
          //    this value and an argument list containing the single
          //    item requestedValue.
          var valuePos = indexOf.call(keyLocaleData, requestedValue);

          // c. If valuePos ≠ -1, then
          if (valuePos !== -1) {
            // i. Let value be requestedValue.
            value = requestedValue,
            // ii. Let supportedExtensionAddition be the
            //     concatenation of "-", key, "-", and value.
            supportedExtensionAddition = '-' + key + '-' + value;
          }
        }
        // 2. Else
        else {
          // a. Let valuePos be the result of calling the [[Call]]
          // internal method of indexOf with keyLocaleData as the this
          // value and an argument list containing the single item
          // "true".
          var _valuePos = indexOf(keyLocaleData, 'true');

          // b. If valuePos ≠ -1, then
          if (_valuePos !== -1)
            // i. Let value be "true".
            value = 'true';
        }
      }
    }
    // h. If options has a field [[<key>]], then
    if (hop.call(options, '[[' + key + ']]')) {
      // i. Let optionsValue be the value of options.[[<key>]].
      var optionsValue = options['[[' + key + ']]'];

      // ii. If the result of calling the [[Call]] internal method of indexOf
      //     with keyLocaleData as the this value and an argument list
      //     containing the single item optionsValue is not -1, then
      if (indexOf.call(keyLocaleData, optionsValue) !== -1) {
        // 1. If optionsValue is not equal to value, then
        if (optionsValue !== value) {
          // a. Let value be optionsValue.
          value = optionsValue;
          // b. Let supportedExtensionAddition be "".
          supportedExtensionAddition = '';
        }
      }
    }
    // i. Set result.[[<key>]] to value.
    result['[[' + key + ']]'] = value;

    // j. Append supportedExtensionAddition to supportedExtension.
    supportedExtension += supportedExtensionAddition;

    // k. Increase i by 1.
    i++;
  }
  // 12. If the length of supportedExtension is greater than 2, then
  if (supportedExtension.length > 2) {
    // a.
    var privateIndex = foundLocale.indexOf("-x-");
    // b.
    if (privateIndex === -1) {
      // i.
      foundLocale = foundLocale + supportedExtension;
    }
    // c.
    else {
      // i.
      var preExtension = foundLocale.substring(0, privateIndex);
      // ii.
      var postExtension = foundLocale.substring(privateIndex);
      // iii.
      foundLocale = preExtension + supportedExtension + postExtension;
    }
    // d. asserting - skipping
    // e.
    foundLocale = CanonicalizeLanguageTag(foundLocale);
  }
  // 13. Set result.[[locale]] to foundLocale.
  result['[[locale]]'] = foundLocale;

  // 14. Return result.
  return result;
}

/**
 * The LookupSupportedLocales abstract operation returns the subset of the
 * provided BCP 47 language priority list requestedLocales for which
 * availableLocales has a matching locale when using the BCP 47 Lookup algorithm.
 * Locales appear in the same order in the returned list as in requestedLocales.
 * The following steps are taken:
 */
function /* 9.2.6 */LookupSupportedLocales(availableLocales, requestedLocales) {
  // 1. Let len be the number of elements in requestedLocales.
  var len = requestedLocales.length;
  // 2. Let subset be a new empty List.
  var subset = new List();
  // 3. Let k be 0.
  var k = 0;

  // 4. Repeat while k < len
  while (k < len) {
    // a. Let locale be the element of requestedLocales at 0-origined list
    //    position k.
    var locale = requestedLocales[k];
    // b. Let noExtensionsLocale be the String value that is locale with all
    //    Unicode locale extension sequences removed.
    var noExtensionsLocale = String(locale).replace(expUnicodeExSeq, '');
    // c. Let availableLocale be the result of calling the
    //    BestAvailableLocale abstract operation (defined in 9.2.2) with
    //    arguments availableLocales and noExtensionsLocale.
    var availableLocale = BestAvailableLocale(availableLocales, noExtensionsLocale);

    // d. If availableLocale is not undefined, then append locale to the end of
    //    subset.
    if (availableLocale !== undefined) arrPush.call(subset, locale);

    // e. Increment k by 1.
    k++;
  }

  // 5. Let subsetArray be a new Array object whose elements are the same
  //    values in the same order as the elements of subset.
  var subsetArray = arrSlice.call(subset);

  // 6. Return subsetArray.
  return subsetArray;
}

/**
 * The BestFitSupportedLocales abstract operation returns the subset of the
 * provided BCP 47 language priority list requestedLocales for which
 * availableLocales has a matching locale when using the Best Fit Matcher
 * algorithm. Locales appear in the same order in the returned list as in
 * requestedLocales. The steps taken are implementation dependent.
 */
function /*9.2.7 */BestFitSupportedLocales(availableLocales, requestedLocales) {
  // ###TODO: implement this function as described by the specification###
  return LookupSupportedLocales(availableLocales, requestedLocales);
}

/**
 * The SupportedLocales abstract operation returns the subset of the provided BCP
 * 47 language priority list requestedLocales for which availableLocales has a
 * matching locale. Two algorithms are available to match the locales: the Lookup
 * algorithm described in RFC 4647 section 3.4, and an implementation dependent
 * best-fit algorithm. Locales appear in the same order in the returned list as
 * in requestedLocales. The following steps are taken:
 */
function /*9.2.8 */SupportedLocales(availableLocales, requestedLocales, options) {
  var matcher = void 0,
    subset = void 0;

  // 1. If options is not undefined, then
  if (options !== undefined) {
    // a. Let options be ToObject(options).
    options = new Record(toObject(options));
    // b. Let matcher be the result of calling the [[Get]] internal method of
    //    options with argument "localeMatcher".
    matcher = options.localeMatcher;

    // c. If matcher is not undefined, then
    if (matcher !== undefined) {
      // i. Let matcher be ToString(matcher).
      matcher = String(matcher);

      // ii. If matcher is not "lookup" or "best fit", then throw a RangeError
      //     exception.
      if (matcher !== 'lookup' && matcher !== 'best fit') throw new RangeError('matcher should be "lookup" or "best fit"');
    }
  }
  // 2. If matcher is undefined or "best fit", then
  if (matcher === undefined || matcher === 'best fit')
    // a. Let subset be the result of calling the BestFitSupportedLocales
    //    abstract operation (defined in 9.2.7) with arguments
    //    availableLocales and requestedLocales.
    subset = BestFitSupportedLocales(availableLocales, requestedLocales);
    // 3. Else
  else
    // a. Let subset be the result of calling the LookupSupportedLocales
    //    abstract operation (defined in 9.2.6) with arguments
    //    availableLocales and requestedLocales.
    subset = LookupSupportedLocales(availableLocales, requestedLocales);

  // 4. For each named own property name P of subset,
  for (var P in subset) {
    if (!hop.call(subset, P)) continue;

    // a. Let desc be the result of calling the [[GetOwnProperty]] internal
    //    method of subset with P.
    // b. Set desc.[[Writable]] to false.
    // c. Set desc.[[Configurable]] to false.
    // d. Call the [[DefineOwnProperty]] internal method of subset with P, desc,
    //    and true as arguments.
    defineProperty(subset, P, {
      writable: false,
      configurable: false,
      value: subset[P]
    });
  }
  // "Freeze" the array so no new elements can be added
  defineProperty(subset, 'length', {
    writable: false
  });

  // 5. Return subset
  return subset;
}

/**
 * The GetOption abstract operation extracts the value of the property named
 * property from the provided options object, converts it to the required type,
 * checks whether it is one of a List of allowed values, and fills in a fallback
 * value if necessary.
 */
function /*9.2.9 */GetOption(options, property, type, values, fallback) {
  // 1. Let value be the result of calling the [[Get]] internal method of
  //    options with argument property.
  var value = options[property];

  // 2. If value is not undefined, then
  if (value !== undefined) {
    // a. Assert: type is "boolean" or "string".
    // b. If type is "boolean", then let value be ToBoolean(value).
    // c. If type is "string", then let value be ToString(value).
    value = type === 'boolean' ? Boolean(value) : type === 'string' ? String(value) : value;

    // d. If values is not undefined, then
    if (values !== undefined) {
      // i. If values does not contain an element equal to value, then throw a
      //    RangeError exception.
      if (arrIndexOf.call(values, value) === -1) throw new RangeError("'" + value + "' is not an allowed value for `" + property + '`');
    }

    // e. Return value.
    return value;
  }
  // Else return fallback.
  return fallback;
}

/**
 * The GetNumberOption abstract operation extracts a property value from the
 * provided options object, converts it to a Number value, checks whether it is
 * in the allowed range, and fills in a fallback value if necessary.
 */
function /* 9.2.10 */GetNumberOption(options, property, minimum, maximum, fallback) {
  // 1. Let value be the result of calling the [[Get]] internal method of
  //    options with argument property.
  var value = options[property];

  // 2. If value is not undefined, then
  if (value !== undefined) {
    // a. Let value be ToNumber(value).
    value = Number(value);

    // b. If value is NaN or less than minimum or greater than maximum, throw a
    //    RangeError exception.
    if (isNaN(value) || value < minimum || value > maximum) throw new RangeError('Value is not a number or outside accepted range');

    // c. Return floor(value).
    return Math.floor(value);
  }
  // 3. Else return fallback.
  return fallback;
}

// 8 The Intl Object
var Intl = {};

// 8.2 Function Properties of the Intl Object

// 8.2.1
// @spec[tc39/ecma402/master/spec/intl.html]
// @clause[sec-intl.getcanonicallocales]
function getCanonicalLocales(locales) {
  // 1. Let ll be ? CanonicalizeLocaleList(locales).
  var ll = CanonicalizeLocaleList(locales);
  // 2. Return CreateArrayFromList(ll).
  {
    var result = [];
    var len = ll.length;
    var k = 0;
    while (k < len) {
      result[k] = ll[k];
      k++;
    }
    return result;
  }
}
Object.defineProperty(Intl, 'getCanonicalLocales', {
  enumerable: false,
  configurable: true,
  writable: true,
  value: getCanonicalLocales
});

// Currency minor units output from get-4217 grunt task, formatted
var currencyMinorUnits = {
  BHD: 3,
  BYR: 0,
  XOF: 0,
  BIF: 0,
  XAF: 0,
  CLF: 4,
  CLP: 0,
  KMF: 0,
  DJF: 0,
  XPF: 0,
  GNF: 0,
  ISK: 0,
  IQD: 3,
  JPY: 0,
  JOD: 3,
  KRW: 0,
  KWD: 3,
  LYD: 3,
  OMR: 3,
  PYG: 0,
  RWF: 0,
  TND: 3,
  UGX: 0,
  UYI: 0,
  VUV: 0,
  VND: 0
};

// Define the NumberFormat constructor internally so it cannot be tainted
function NumberFormatConstructor() {
  var locales = arguments[0];
  var options = arguments[1];
  if (!this || this === Intl) {
    return new Intl.NumberFormat(locales, options);
  }
  return InitializeNumberFormat(toObject(this), locales, options);
}
defineProperty(Intl, 'NumberFormat', {
  configurable: true,
  writable: true,
  value: NumberFormatConstructor
});

// Must explicitly set prototypes as unwritable
defineProperty(Intl.NumberFormat, 'prototype', {
  writable: false
});

/**
 * The abstract operation InitializeNumberFormat accepts the arguments
 * numberFormat (which must be an object), locales, and options. It initializes
 * numberFormat as a NumberFormat object.
 */
function /*11.1.1.1 */InitializeNumberFormat(numberFormat, locales, options) {
  // This will be a internal properties object if we're not already initialized
  var internal = getInternalProperties(numberFormat);

  // Create an object whose props can be used to restore the values of RegExp props
  var regexpRestore = createRegExpRestore();

  // 1. If numberFormat has an [[initializedIntlObject]] internal property with
  // value true, throw a TypeError exception.
  if (internal['[[initializedIntlObject]]'] === true) throw new TypeError('`this` object has already been initialized as an Intl object');

  // Need this to access the `internal` object
  defineProperty(numberFormat, '__getInternalProperties', {
    value: function value() {
      // NOTE: Non-standard, for internal use only
      if (arguments[0] === secret) return internal;
    }
  });

  // 2. Set the [[initializedIntlObject]] internal property of numberFormat to true.
  internal['[[initializedIntlObject]]'] = true;

  // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
  //    abstract operation (defined in 9.2.1) with argument locales.
  var requestedLocales = CanonicalizeLocaleList(locales);

  // 4. If options is undefined, then
  if (options === undefined)
    // a. Let options be the result of creating a new object as if by the
    // expression new Object() where Object is the standard built-in constructor
    // with that name.
    options = {};

    // 5. Else
  else
    // a. Let options be ToObject(options).
    options = toObject(options);

  // 6. Let opt be a new Record.
  var opt = new Record(),
    // 7. Let matcher be the result of calling the GetOption abstract operation
    //    (defined in 9.2.9) with the arguments options, "localeMatcher", "string",
    //    a List containing the two String values "lookup" and "best fit", and
    //    "best fit".
    matcher = GetOption(options, 'localeMatcher', 'string', new List('lookup', 'best fit'), 'best fit');

  // 8. Set opt.[[localeMatcher]] to matcher.
  opt['[[localeMatcher]]'] = matcher;

  // 9. Let NumberFormat be the standard built-in object that is the initial value
  //    of Intl.NumberFormat.
  // 10. Let localeData be the value of the [[localeData]] internal property of
  //     NumberFormat.
  var localeData = internals.NumberFormat['[[localeData]]'];

  // 11. Let r be the result of calling the ResolveLocale abstract operation
  //     (defined in 9.2.5) with the [[availableLocales]] internal property of
  //     NumberFormat, requestedLocales, opt, the [[relevantExtensionKeys]]
  //     internal property of NumberFormat, and localeData.
  var r = ResolveLocale(internals.NumberFormat['[[availableLocales]]'], requestedLocales, opt, internals.NumberFormat['[[relevantExtensionKeys]]'], localeData);

  // 12. Set the [[locale]] internal property of numberFormat to the value of
  //     r.[[locale]].
  internal['[[locale]]'] = r['[[locale]]'];

  // 13. Set the [[numberingSystem]] internal property of numberFormat to the value
  //     of r.[[nu]].
  internal['[[numberingSystem]]'] = r['[[nu]]'];

  // The specification doesn't tell us to do this, but it's helpful later on
  internal['[[dataLocale]]'] = r['[[dataLocale]]'];

  // 14. Let dataLocale be the value of r.[[dataLocale]].
  var dataLocale = r['[[dataLocale]]'];

  // 15. Let s be the result of calling the GetOption abstract operation with the
  //     arguments options, "style", "string", a List containing the three String
  //     values "decimal", "percent", and "currency", and "decimal".
  var s = GetOption(options, 'style', 'string', new List('decimal', 'percent', 'currency'), 'decimal');

  // 16. Set the [[style]] internal property of numberFormat to s.
  internal['[[style]]'] = s;

  // 17. Let c be the result of calling the GetOption abstract operation with the
  //     arguments options, "currency", "string", undefined, and undefined.
  var c = GetOption(options, 'currency', 'string');

  // 18. If c is not undefined and the result of calling the
  //     IsWellFormedCurrencyCode abstract operation (defined in 6.3.1) with
  //     argument c is false, then throw a RangeError exception.
  if (c !== undefined && !IsWellFormedCurrencyCode(c)) throw new RangeError("'" + c + "' is not a valid currency code");

  // 19. If s is "currency" and c is undefined, throw a TypeError exception.
  if (s === 'currency' && c === undefined) throw new TypeError('Currency code is required when style is currency');
  var cDigits = void 0;

  // 20. If s is "currency", then
  if (s === 'currency') {
    // a. Let c be the result of converting c to upper case as specified in 6.1.
    c = c.toUpperCase();

    // b. Set the [[currency]] internal property of numberFormat to c.
    internal['[[currency]]'] = c;

    // c. Let cDigits be the result of calling the CurrencyDigits abstract
    //    operation (defined below) with argument c.
    cDigits = CurrencyDigits(c);
  }

  // 21. Let cd be the result of calling the GetOption abstract operation with the
  //     arguments options, "currencyDisplay", "string", a List containing the
  //     three String values "code", "symbol", and "name", and "symbol".
  var cd = GetOption(options, 'currencyDisplay', 'string', new List('code', 'symbol', 'name'), 'symbol');

  // 22. If s is "currency", then set the [[currencyDisplay]] internal property of
  //     numberFormat to cd.
  if (s === 'currency') internal['[[currencyDisplay]]'] = cd;

  // 23. Let mnid be the result of calling the GetNumberOption abstract operation
  //     (defined in 9.2.10) with arguments options, "minimumIntegerDigits", 1, 21,
  //     and 1.
  var mnid = GetNumberOption(options, 'minimumIntegerDigits', 1, 21, 1);

  // 24. Set the [[minimumIntegerDigits]] internal property of numberFormat to mnid.
  internal['[[minimumIntegerDigits]]'] = mnid;

  // 25. If s is "currency", then let mnfdDefault be cDigits; else let mnfdDefault
  //     be 0.
  var mnfdDefault = s === 'currency' ? cDigits : 0;

  // 26. Let mnfd be the result of calling the GetNumberOption abstract operation
  //     with arguments options, "minimumFractionDigits", 0, 20, and mnfdDefault.
  var mnfd = GetNumberOption(options, 'minimumFractionDigits', 0, 20, mnfdDefault);

  // 27. Set the [[minimumFractionDigits]] internal property of numberFormat to mnfd.
  internal['[[minimumFractionDigits]]'] = mnfd;

  // 28. If s is "currency", then let mxfdDefault be max(mnfd, cDigits); else if s
  //     is "percent", then let mxfdDefault be max(mnfd, 0); else let mxfdDefault
  //     be max(mnfd, 3).
  var mxfdDefault = s === 'currency' ? Math.max(mnfd, cDigits) : s === 'percent' ? Math.max(mnfd, 0) : Math.max(mnfd, 3);

  // 29. Let mxfd be the result of calling the GetNumberOption abstract operation
  //     with arguments options, "maximumFractionDigits", mnfd, 20, and mxfdDefault.
  var mxfd = GetNumberOption(options, 'maximumFractionDigits', mnfd, 20, mxfdDefault);

  // 30. Set the [[maximumFractionDigits]] internal property of numberFormat to mxfd.
  internal['[[maximumFractionDigits]]'] = mxfd;

  // 31. Let mnsd be the result of calling the [[Get]] internal method of options
  //     with argument "minimumSignificantDigits".
  var mnsd = options.minimumSignificantDigits;

  // 32. Let mxsd be the result of calling the [[Get]] internal method of options
  //     with argument "maximumSignificantDigits".
  var mxsd = options.maximumSignificantDigits;

  // 33. If mnsd is not undefined or mxsd is not undefined, then:
  if (mnsd !== undefined || mxsd !== undefined) {
    // a. Let mnsd be the result of calling the GetNumberOption abstract
    //    operation with arguments options, "minimumSignificantDigits", 1, 21,
    //    and 1.
    mnsd = GetNumberOption(options, 'minimumSignificantDigits', 1, 21, 1);

    // b. Let mxsd be the result of calling the GetNumberOption abstract
    //     operation with arguments options, "maximumSignificantDigits", mnsd,
    //     21, and 21.
    mxsd = GetNumberOption(options, 'maximumSignificantDigits', mnsd, 21, 21);

    // c. Set the [[minimumSignificantDigits]] internal property of numberFormat
    //    to mnsd, and the [[maximumSignificantDigits]] internal property of
    //    numberFormat to mxsd.
    internal['[[minimumSignificantDigits]]'] = mnsd;
    internal['[[maximumSignificantDigits]]'] = mxsd;
  }
  // 34. Let g be the result of calling the GetOption abstract operation with the
  //     arguments options, "useGrouping", "boolean", undefined, and true.
  var g = GetOption(options, 'useGrouping', 'boolean', undefined, true);

  // 35. Set the [[useGrouping]] internal property of numberFormat to g.
  internal['[[useGrouping]]'] = g;

  // 36. Let dataLocaleData be the result of calling the [[Get]] internal method of
  //     localeData with argument dataLocale.
  var dataLocaleData = localeData[dataLocale];

  // 37. Let patterns be the result of calling the [[Get]] internal method of
  //     dataLocaleData with argument "patterns".
  var patterns = dataLocaleData.patterns;

  // 38. Assert: patterns is an object (see 11.2.3)

  // 39. Let stylePatterns be the result of calling the [[Get]] internal method of
  //     patterns with argument s.
  var stylePatterns = patterns[s];

  // 40. Set the [[positivePattern]] internal property of numberFormat to the
  //     result of calling the [[Get]] internal method of stylePatterns with the
  //     argument "positivePattern".
  internal['[[positivePattern]]'] = stylePatterns.positivePattern;

  // 41. Set the [[negativePattern]] internal property of numberFormat to the
  //     result of calling the [[Get]] internal method of stylePatterns with the
  //     argument "negativePattern".
  internal['[[negativePattern]]'] = stylePatterns.negativePattern;

  // 42. Set the [[boundFormat]] internal property of numberFormat to undefined.
  internal['[[boundFormat]]'] = undefined;

  // 43. Set the [[initializedNumberFormat]] internal property of numberFormat to
  //     true.
  internal['[[initializedNumberFormat]]'] = true;

  // In ES3, we need to pre-bind the format() function
  if (es3) numberFormat.format = GetFormatNumber.call(numberFormat);

  // Restore the RegExp properties
  regexpRestore();

  // Return the newly initialised object
  return numberFormat;
}
function CurrencyDigits(currency) {
  // When the CurrencyDigits abstract operation is called with an argument currency
  // (which must be an upper case String value), the following steps are taken:

  // 1. If the ISO 4217 currency and funds code list contains currency as an
  // alphabetic code, then return the minor unit value corresponding to the
  // currency from the list; else return 2.
  return currencyMinorUnits[currency] !== undefined ? currencyMinorUnits[currency] : 2;
}

/* 11.2.3 */
internals.NumberFormat = {
  '[[availableLocales]]': [],
  '[[relevantExtensionKeys]]': ['nu'],
  '[[localeData]]': {}
};

/**
 * When the supportedLocalesOf method of Intl.NumberFormat is called, the
 * following steps are taken:
 */
/* 11.2.2 */
defineProperty(Intl.NumberFormat, 'supportedLocalesOf', {
  configurable: true,
  writable: true,
  value: fnBind.call(function (locales) {
    // Bound functions only have the `this` value altered if being used as a constructor,
    // this lets us imitate a native function that has no constructor
    if (!hop.call(this, '[[availableLocales]]')) throw new TypeError('supportedLocalesOf() is not a constructor');

    // Create an object whose props can be used to restore the values of RegExp props
    var regexpRestore = createRegExpRestore(),
      // 1. If options is not provided, then let options be undefined.
      options = arguments[1],
      // 2. Let availableLocales be the value of the [[availableLocales]] internal
      //    property of the standard built-in object that is the initial value of
      //    Intl.NumberFormat.

      availableLocales = this['[[availableLocales]]'],
      // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
      //    abstract operation (defined in 9.2.1) with argument locales.
      requestedLocales = CanonicalizeLocaleList(locales);

    // Restore the RegExp properties
    regexpRestore();

    // 4. Return the result of calling the SupportedLocales abstract operation
    //    (defined in 9.2.8) with arguments availableLocales, requestedLocales,
    //    and options.
    return SupportedLocales(availableLocales, requestedLocales, options);
  }, internals.NumberFormat)
});

/**
 * This named accessor property returns a function that formats a number
 * according to the effective locale and the formatting options of this
 * NumberFormat object.
 */
/* 11.3.2 */
defineProperty(Intl.NumberFormat.prototype, 'format', {
  configurable: true,
  get: GetFormatNumber
});
function GetFormatNumber() {
  var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);

  // Satisfy test 11.3_b
  if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for format() is not an initialized Intl.NumberFormat object.');

  // The value of the [[Get]] attribute is a function that takes the following
  // steps:

  // 1. If the [[boundFormat]] internal property of this NumberFormat object
  //    is undefined, then:
  if (internal['[[boundFormat]]'] === undefined) {
    // a. Let F be a Function object, with internal properties set as
    //    specified for built-in functions in ES5, 15, or successor, and the
    //    length property set to 1, that takes the argument value and
    //    performs the following steps:
    var F = function F(value) {
      // i. If value is not provided, then let value be undefined.
      // ii. Let x be ToNumber(value).
      // iii. Return the result of calling the FormatNumber abstract
      //      operation (defined below) with arguments this and x.
      return FormatNumber(this, /* x = */Number(value));
    };

    // b. Let bind be the standard built-in function object defined in ES5,
    //    15.3.4.5.
    // c. Let bf be the result of calling the [[Call]] internal method of
    //    bind with F as the this value and an argument list containing
    //    the single item this.
    var bf = fnBind.call(F, this);

    // d. Set the [[boundFormat]] internal property of this NumberFormat
    //    object to bf.
    internal['[[boundFormat]]'] = bf;
  }
  // Return the value of the [[boundFormat]] internal property of this
  // NumberFormat object.
  return internal['[[boundFormat]]'];
}
function formatToParts() {
  var value = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];
  var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
  if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for formatToParts() is not an initialized Intl.NumberFormat object.');
  var x = Number(value);
  return FormatNumberToParts(this, x);
}
Object.defineProperty(Intl.NumberFormat.prototype, 'formatToParts', {
  configurable: true,
  enumerable: false,
  writable: true,
  value: formatToParts
});

/*
 * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]
 * @clause[sec-formatnumbertoparts]
 */
function FormatNumberToParts(numberFormat, x) {
  // 1. Let parts be ? PartitionNumberPattern(numberFormat, x).
  var parts = PartitionNumberPattern(numberFormat, x);
  // 2. Let result be ArrayCreate(0).
  var result = [];
  // 3. Let n be 0.
  var n = 0;
  // 4. For each part in parts, do:
  for (var i = 0; parts.length > i; i++) {
    var part = parts[i];
    // a. Let O be ObjectCreate(%ObjectPrototype%).
    var O = {};
    // a. Perform ? CreateDataPropertyOrThrow(O, "type", part.[[type]]).
    O.type = part['[[type]]'];
    // a. Perform ? CreateDataPropertyOrThrow(O, "value", part.[[value]]).
    O.value = part['[[value]]'];
    // a. Perform ? CreateDataPropertyOrThrow(result, ? ToString(n), O).
    result[n] = O;
    // a. Increment n by 1.
    n += 1;
  }
  // 5. Return result.
  return result;
}

/*
 * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]
 * @clause[sec-partitionnumberpattern]
 */
function PartitionNumberPattern(numberFormat, x) {
  var internal = getInternalProperties(numberFormat),
    locale = internal['[[dataLocale]]'],
    nums = internal['[[numberingSystem]]'],
    data = internals.NumberFormat['[[localeData]]'][locale],
    ild = data.symbols[nums] || data.symbols.latn,
    pattern = void 0;

  // 1. If x is not NaN and x < 0, then:
  if (!isNaN(x) && x < 0) {
    // a. Let x be -x.
    x = -x;
    // a. Let pattern be the value of numberFormat.[[negativePattern]].
    pattern = internal['[[negativePattern]]'];
  }
  // 2. Else,
  else {
    // a. Let pattern be the value of numberFormat.[[positivePattern]].
    pattern = internal['[[positivePattern]]'];
  }
  // 3. Let result be a new empty List.
  var result = new List();
  // 4. Let beginIndex be Call(%StringProto_indexOf%, pattern, "{", 0).
  var beginIndex = pattern.indexOf('{', 0);
  // 5. Let endIndex be 0.
  var endIndex = 0;
  // 6. Let nextIndex be 0.
  var nextIndex = 0;
  // 7. Let length be the number of code units in pattern.
  var length = pattern.length;
  // 8. Repeat while beginIndex is an integer index into pattern:
  while (beginIndex > -1 && beginIndex < length) {
    // a. Set endIndex to Call(%StringProto_indexOf%, pattern, "}", beginIndex)
    endIndex = pattern.indexOf('}', beginIndex);
    // a. If endIndex = -1, throw new Error exception.
    if (endIndex === -1) throw new Error();
    // a. If beginIndex is greater than nextIndex, then:
    if (beginIndex > nextIndex) {
      // i. Let literal be a substring of pattern from position nextIndex, inclusive, to position beginIndex, exclusive.
      var literal = pattern.substring(nextIndex, beginIndex);
      // ii. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result.
      arrPush.call(result, {
        '[[type]]': 'literal',
        '[[value]]': literal
      });
    }
    // a. Let p be the substring of pattern from position beginIndex, exclusive, to position endIndex, exclusive.
    var p = pattern.substring(beginIndex + 1, endIndex);
    // a. If p is equal "number", then:
    if (p === "number") {
      // i. If x is NaN,
      if (isNaN(x)) {
        // 1. Let n be an ILD String value indicating the NaN value.
        var n = ild.nan;
        // 2. Add new part record { [[type]]: "nan", [[value]]: n } as a new element of the list result.
        arrPush.call(result, {
          '[[type]]': 'nan',
          '[[value]]': n
        });
      }
      // ii. Else if isFinite(x) is false,
      else if (!isFinite(x)) {
        // 1. Let n be an ILD String value indicating infinity.
        var _n = ild.infinity;
        // 2. Add new part record { [[type]]: "infinity", [[value]]: n } as a new element of the list result.
        arrPush.call(result, {
          '[[type]]': 'infinity',
          '[[value]]': _n
        });
      }
      // iii. Else,
      else {
        // 1. If the value of numberFormat.[[style]] is "percent" and isFinite(x), let x be 100 × x.
        if (internal['[[style]]'] === 'percent' && isFinite(x)) x *= 100;
        var _n2 = void 0;
        // 2. If the numberFormat.[[minimumSignificantDigits]] and numberFormat.[[maximumSignificantDigits]] are present, then
        if (hop.call(internal, '[[minimumSignificantDigits]]') && hop.call(internal, '[[maximumSignificantDigits]]')) {
          // a. Let n be ToRawPrecision(x, numberFormat.[[minimumSignificantDigits]], numberFormat.[[maximumSignificantDigits]]).
          _n2 = ToRawPrecision(x, internal['[[minimumSignificantDigits]]'], internal['[[maximumSignificantDigits]]']);
        }
        // 3. Else,
        else {
          // a. Let n be ToRawFixed(x, numberFormat.[[minimumIntegerDigits]], numberFormat.[[minimumFractionDigits]], numberFormat.[[maximumFractionDigits]]).
          _n2 = ToRawFixed(x, internal['[[minimumIntegerDigits]]'], internal['[[minimumFractionDigits]]'], internal['[[maximumFractionDigits]]']);
        }
        // 4. If the value of the numberFormat.[[numberingSystem]] matches one of the values in the "Numbering System" column of Table 2 below, then
        if (numSys[nums]) {
          (function () {
            // a. Let digits be an array whose 10 String valued elements are the UTF-16 string representations of the 10 digits specified in the "Digits" column of the matching row in Table 2.
            var digits = numSys[nums];
            // a. Replace each digit in n with the value of digits[digit].
            _n2 = String(_n2).replace(/\d/g, function (digit) {
              return digits[digit];
            });
          })();
        }
        // 5. Else use an implementation dependent algorithm to map n to the appropriate representation of n in the given numbering system.
        else _n2 = String(_n2); // ###TODO###

        var integer = void 0;
        var fraction = void 0;
        // 6. Let decimalSepIndex be Call(%StringProto_indexOf%, n, ".", 0).
        var decimalSepIndex = _n2.indexOf('.', 0);
        // 7. If decimalSepIndex > 0, then:
        if (decimalSepIndex > 0) {
          // a. Let integer be the substring of n from position 0, inclusive, to position decimalSepIndex, exclusive.
          integer = _n2.substring(0, decimalSepIndex);
          // a. Let fraction be the substring of n from position decimalSepIndex, exclusive, to the end of n.
          fraction = _n2.substring(decimalSepIndex + 1, decimalSepIndex.length);
        }
        // 8. Else:
        else {
          // a. Let integer be n.
          integer = _n2;
          // a. Let fraction be undefined.
          fraction = undefined;
        }
        // 9. If the value of the numberFormat.[[useGrouping]] is true,
        if (internal['[[useGrouping]]'] === true) {
          // a. Let groupSepSymbol be the ILND String representing the grouping separator.
          var groupSepSymbol = ild.group;
          // a. Let groups be a List whose elements are, in left to right order, the substrings defined by ILND set of locations within the integer.
          var groups = [];
          // ----> implementation:
          // Primary group represents the group closest to the decimal
          var pgSize = data.patterns.primaryGroupSize || 3;
          // Secondary group is every other group
          var sgSize = data.patterns.secondaryGroupSize || pgSize;
          // Group only if necessary
          if (integer.length > pgSize) {
            // Index of the primary grouping separator
            var end = integer.length - pgSize;
            // Starting index for our loop
            var idx = end % sgSize;
            var start = integer.slice(0, idx);
            if (start.length) arrPush.call(groups, start);
            // Loop to separate into secondary grouping digits
            while (idx < end) {
              arrPush.call(groups, integer.slice(idx, idx + sgSize));
              idx += sgSize;
            }
            // Add the primary grouping digits
            arrPush.call(groups, integer.slice(end));
          } else {
            arrPush.call(groups, integer);
          }
          // a. Assert: The number of elements in groups List is greater than 0.
          if (groups.length === 0) throw new Error();
          // a. Repeat, while groups List is not empty:
          while (groups.length) {
            // i. Remove the first element from groups and let integerGroup be the value of that element.
            var integerGroup = arrShift.call(groups);
            // ii. Add new part record { [[type]]: "integer", [[value]]: integerGroup } as a new element of the list result.
            arrPush.call(result, {
              '[[type]]': 'integer',
              '[[value]]': integerGroup
            });
            // iii. If groups List is not empty, then:
            if (groups.length) {
              // 1. Add new part record { [[type]]: "group", [[value]]: groupSepSymbol } as a new element of the list result.
              arrPush.call(result, {
                '[[type]]': 'group',
                '[[value]]': groupSepSymbol
              });
            }
          }
        }
        // 10. Else,
        else {
          // a. Add new part record { [[type]]: "integer", [[value]]: integer } as a new element of the list result.
          arrPush.call(result, {
            '[[type]]': 'integer',
            '[[value]]': integer
          });
        }
        // 11. If fraction is not undefined, then:
        if (fraction !== undefined) {
          // a. Let decimalSepSymbol be the ILND String representing the decimal separator.
          var decimalSepSymbol = ild.decimal;
          // a. Add new part record { [[type]]: "decimal", [[value]]: decimalSepSymbol } as a new element of the list result.
          arrPush.call(result, {
            '[[type]]': 'decimal',
            '[[value]]': decimalSepSymbol
          });
          // a. Add new part record { [[type]]: "fraction", [[value]]: fraction } as a new element of the list result.
          arrPush.call(result, {
            '[[type]]': 'fraction',
            '[[value]]': fraction
          });
        }
      }
    }
    // a. Else if p is equal "plusSign", then:
    else if (p === "plusSign") {
      // i. Let plusSignSymbol be the ILND String representing the plus sign.
      var plusSignSymbol = ild.plusSign;
      // ii. Add new part record { [[type]]: "plusSign", [[value]]: plusSignSymbol } as a new element of the list result.
      arrPush.call(result, {
        '[[type]]': 'plusSign',
        '[[value]]': plusSignSymbol
      });
    }
    // a. Else if p is equal "minusSign", then:
    else if (p === "minusSign") {
      // i. Let minusSignSymbol be the ILND String representing the minus sign.
      var minusSignSymbol = ild.minusSign;
      // ii. Add new part record { [[type]]: "minusSign", [[value]]: minusSignSymbol } as a new element of the list result.
      arrPush.call(result, {
        '[[type]]': 'minusSign',
        '[[value]]': minusSignSymbol
      });
    }
    // a. Else if p is equal "percentSign" and numberFormat.[[style]] is "percent", then:
    else if (p === "percentSign" && internal['[[style]]'] === "percent") {
      // i. Let percentSignSymbol be the ILND String representing the percent sign.
      var percentSignSymbol = ild.percentSign;
      // ii. Add new part record { [[type]]: "percentSign", [[value]]: percentSignSymbol } as a new element of the list result.
      arrPush.call(result, {
        '[[type]]': 'literal',
        '[[value]]': percentSignSymbol
      });
    }
    // a. Else if p is equal "currency" and numberFormat.[[style]] is "currency", then:
    else if (p === "currency" && internal['[[style]]'] === "currency") {
      // i. Let currency be the value of numberFormat.[[currency]].
      var currency = internal['[[currency]]'];
      var cd = void 0;

      // ii. If numberFormat.[[currencyDisplay]] is "code", then
      if (internal['[[currencyDisplay]]'] === "code") {
        // 1. Let cd be currency.
        cd = currency;
      }
      // iii. Else if numberFormat.[[currencyDisplay]] is "symbol", then
      else if (internal['[[currencyDisplay]]'] === "symbol") {
        // 1. Let cd be an ILD string representing currency in short form. If the implementation does not have such a representation of currency, use currency itself.
        cd = data.currencies[currency] || currency;
      }
      // iv. Else if numberFormat.[[currencyDisplay]] is "name", then
      else if (internal['[[currencyDisplay]]'] === "name") {
        // 1. Let cd be an ILD string representing currency in long form. If the implementation does not have such a representation of currency, then use currency itself.
        cd = currency;
      }
      // v. Add new part record { [[type]]: "currency", [[value]]: cd } as a new element of the list result.
      arrPush.call(result, {
        '[[type]]': 'currency',
        '[[value]]': cd
      });
    }
    // a. Else,
    else {
      // i. Let literal be the substring of pattern from position beginIndex, inclusive, to position endIndex, inclusive.
      var _literal = pattern.substring(beginIndex, endIndex);
      // ii. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result.
      arrPush.call(result, {
        '[[type]]': 'literal',
        '[[value]]': _literal
      });
    }
    // a. Set nextIndex to endIndex + 1.
    nextIndex = endIndex + 1;
    // a. Set beginIndex to Call(%StringProto_indexOf%, pattern, "{", nextIndex)
    beginIndex = pattern.indexOf('{', nextIndex);
  }
  // 9. If nextIndex is less than length, then:
  if (nextIndex < length) {
    // a. Let literal be the substring of pattern from position nextIndex, inclusive, to position length, exclusive.
    var _literal2 = pattern.substring(nextIndex, length);
    // a. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result.
    arrPush.call(result, {
      '[[type]]': 'literal',
      '[[value]]': _literal2
    });
  }
  // 10. Return result.
  return result;
}

/*
 * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]
 * @clause[sec-formatnumber]
 */
function FormatNumber(numberFormat, x) {
  // 1. Let parts be ? PartitionNumberPattern(numberFormat, x).
  var parts = PartitionNumberPattern(numberFormat, x);
  // 2. Let result be an empty String.
  var result = '';
  // 3. For each part in parts, do:
  for (var i = 0; parts.length > i; i++) {
    var part = parts[i];
    // a. Set result to a String value produced by concatenating result and part.[[value]].
    result += part['[[value]]'];
  }
  // 4. Return result.
  return result;
}

/**
 * When the ToRawPrecision abstract operation is called with arguments x (which
 * must be a finite non-negative number), minPrecision, and maxPrecision (both
 * must be integers between 1 and 21) the following steps are taken:
 */
function ToRawPrecision(x, minPrecision, maxPrecision) {
  // 1. Let p be maxPrecision.
  var p = maxPrecision;
  var m = void 0,
    e = void 0;

  // 2. If x = 0, then
  if (x === 0) {
    // a. Let m be the String consisting of p occurrences of the character "0".
    m = arrJoin.call(Array(p + 1), '0');
    // b. Let e be 0.
    e = 0;
  }
  // 3. Else
  else {
    // a. Let e and n be integers such that 10ᵖ⁻¹ ≤ n < 10ᵖ and for which the
    //    exact mathematical value of n × 10ᵉ⁻ᵖ⁺¹ – x is as close to zero as
    //    possible. If there are two such sets of e and n, pick the e and n for
    //    which n × 10ᵉ⁻ᵖ⁺¹ is larger.
    e = log10Floor(Math.abs(x));

    // Easier to get to m from here
    var f = Math.round(Math.exp(Math.abs(e - p + 1) * Math.LN10));

    // b. Let m be the String consisting of the digits of the decimal
    //    representation of n (in order, with no leading zeroes)
    m = String(Math.round(e - p + 1 < 0 ? x * f : x / f));
  }

  // 4. If e ≥ p, then
  if (e >= p)
    // a. Return the concatenation of m and e-p+1 occurrences of the character "0".
    return m + arrJoin.call(Array(e - p + 1 + 1), '0');

    // 5. If e = p-1, then
  else if (e === p - 1)
    // a. Return m.
    return m;

    // 6. If e ≥ 0, then
  else if (e >= 0)
    // a. Let m be the concatenation of the first e+1 characters of m, the character
    //    ".", and the remaining p–(e+1) characters of m.
    m = m.slice(0, e + 1) + '.' + m.slice(e + 1);

    // 7. If e < 0, then
  else if (e < 0)
    // a. Let m be the concatenation of the String "0.", –(e+1) occurrences of the
    //    character "0", and the string m.
    m = '0.' + arrJoin.call(Array(-(e + 1) + 1), '0') + m;

  // 8. If m contains the character ".", and maxPrecision > minPrecision, then
  if (m.indexOf(".") >= 0 && maxPrecision > minPrecision) {
    // a. Let cut be maxPrecision – minPrecision.
    var cut = maxPrecision - minPrecision;

    // b. Repeat while cut > 0 and the last character of m is "0":
    while (cut > 0 && m.charAt(m.length - 1) === '0') {
      //  i. Remove the last character from m.
      m = m.slice(0, -1);

      //  ii. Decrease cut by 1.
      cut--;
    }

    // c. If the last character of m is ".", then
    if (m.charAt(m.length - 1) === '.')
      //    i. Remove the last character from m.
      m = m.slice(0, -1);
  }
  // 9. Return m.
  return m;
}

/**
 * @spec[tc39/ecma402/master/spec/numberformat.html]
 * @clause[sec-torawfixed]
 * When the ToRawFixed abstract operation is called with arguments x (which must
 * be a finite non-negative number), minInteger (which must be an integer between
 * 1 and 21), minFraction, and maxFraction (which must be integers between 0 and
 * 20) the following steps are taken:
 */
function ToRawFixed(x, minInteger, minFraction, maxFraction) {
  // 1. Let f be maxFraction.
  var f = maxFraction;
  // 2. Let n be an integer for which the exact mathematical value of n ÷ 10f – x is as close to zero as possible. If there are two such n, pick the larger n.
  var n = Math.pow(10, f) * x; // diverging...
  // 3. If n = 0, let m be the String "0". Otherwise, let m be the String consisting of the digits of the decimal representation of n (in order, with no leading zeroes).
  var m = n === 0 ? "0" : n.toFixed(0); // divering...

  {
    // this diversion is needed to take into consideration big numbers, e.g.:
    // 1.2344501e+37 -> 12344501000000000000000000000000000000
    var idx = void 0;
    var exp = (idx = m.indexOf('e')) > -1 ? m.slice(idx + 1) : 0;
    if (exp) {
      m = m.slice(0, idx).replace('.', '');
      m += arrJoin.call(Array(exp - (m.length - 1) + 1), '0');
    }
  }
  var _int = void 0;
  // 4. If f ≠ 0, then
  if (f !== 0) {
    // a. Let k be the number of characters in m.
    var k = m.length;
    // a. If k ≤ f, then
    if (k <= f) {
      // i. Let z be the String consisting of f+1–k occurrences of the character "0".
      var z = arrJoin.call(Array(f + 1 - k + 1), '0');
      // ii. Let m be the concatenation of Strings z and m.
      m = z + m;
      // iii. Let k be f+1.
      k = f + 1;
    }
    // a. Let a be the first k–f characters of m, and let b be the remaining f characters of m.
    var a = m.substring(0, k - f),
      b = m.substring(k - f, m.length);
    // a. Let m be the concatenation of the three Strings a, ".", and b.
    m = a + "." + b;
    // a. Let int be the number of characters in a.
    _int = a.length;
  }
  // 5. Else, let int be the number of characters in m.
  else _int = m.length;
  // 6. Let cut be maxFraction – minFraction.
  var cut = maxFraction - minFraction;
  // 7. Repeat while cut > 0 and the last character of m is "0":
  while (cut > 0 && m.slice(-1) === "0") {
    // a. Remove the last character from m.
    m = m.slice(0, -1);
    // a. Decrease cut by 1.
    cut--;
  }
  // 8. If the last character of m is ".", then
  if (m.slice(-1) === ".") {
    // a. Remove the last character from m.
    m = m.slice(0, -1);
  }
  // 9. If int < minInteger, then
  if (_int < minInteger) {
    // a. Let z be the String consisting of minInteger–int occurrences of the character "0".
    var _z = arrJoin.call(Array(minInteger - _int + 1), '0');
    // a. Let m be the concatenation of Strings z and m.
    m = _z + m;
  }
  // 10. Return m.
  return m;
}

// Sect 11.3.2 Table 2, Numbering systems
// ======================================
var numSys = {
  arab: ["٠", "١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩"],
  arabext: ["۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹"],
  bali: ["᭐", "᭑", "᭒", "᭓", "᭔", "᭕", "᭖", "᭗", "᭘", "᭙"],
  beng: ["০", "১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯"],
  deva: ["०", "१", "२", "३", "४", "५", "६", "७", "८", "९"],
  fullwide: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  gujr: ["૦", "૧", "૨", "૩", "૪", "૫", "૬", "૭", "૮", "૯"],
  guru: ["੦", "੧", "੨", "੩", "੪", "੫", "੬", "੭", "੮", "੯"],
  hanidec: ["〇", "一", "二", "三", "四", "五", "六", "七", "八", "九"],
  khmr: ["០", "១", "២", "៣", "៤", "៥", "៦", "៧", "៨", "៩"],
  knda: ["೦", "೧", "೨", "೩", "೪", "೫", "೬", "೭", "೮", "೯"],
  laoo: ["໐", "໑", "໒", "໓", "໔", "໕", "໖", "໗", "໘", "໙"],
  latn: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
  limb: ["᥆", "᥇", "᥈", "᥉", "᥊", "᥋", "᥌", "᥍", "᥎", "᥏"],
  mlym: ["൦", "൧", "൨", "൩", "൪", "൫", "൬", "൭", "൮", "൯"],
  mong: ["᠐", "᠑", "᠒", "᠓", "᠔", "᠕", "᠖", "᠗", "᠘", "᠙"],
  mymr: ["၀", "၁", "၂", "၃", "၄", "၅", "၆", "၇", "၈", "၉"],
  orya: ["୦", "୧", "୨", "୩", "୪", "୫", "୬", "୭", "୮", "୯"],
  tamldec: ["௦", "௧", "௨", "௩", "௪", "௫", "௬", "௭", "௮", "௯"],
  telu: ["౦", "౧", "౨", "౩", "౪", "౫", "౬", "౭", "౮", "౯"],
  thai: ["๐", "๑", "๒", "๓", "๔", "๕", "๖", "๗", "๘", "๙"],
  tibt: ["༠", "༡", "༢", "༣", "༤", "༥", "༦", "༧", "༨", "༩"]
};

/**
 * This function provides access to the locale and formatting options computed
 * during initialization of the object.
 *
 * The function returns a new object whose properties and attributes are set as
 * if constructed by an object literal assigning to each of the following
 * properties the value of the corresponding internal property of this
 * NumberFormat object (see 11.4): locale, numberingSystem, style, currency,
 * currencyDisplay, minimumIntegerDigits, minimumFractionDigits,
 * maximumFractionDigits, minimumSignificantDigits, maximumSignificantDigits, and
 * useGrouping. Properties whose corresponding internal properties are not present
 * are not assigned.
 */
/* 11.3.3 */
defineProperty(Intl.NumberFormat.prototype, 'resolvedOptions', {
  configurable: true,
  writable: true,
  value: function value() {
    var prop = void 0,
      descs = new Record(),
      props = ['locale', 'numberingSystem', 'style', 'currency', 'currencyDisplay', 'minimumIntegerDigits', 'minimumFractionDigits', 'maximumFractionDigits', 'minimumSignificantDigits', 'maximumSignificantDigits', 'useGrouping'],
      internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);

    // Satisfy test 11.3_b
    if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for resolvedOptions() is not an initialized Intl.NumberFormat object.');
    for (var i = 0, max = props.length; i < max; i++) {
      if (hop.call(internal, prop = '[[' + props[i] + ']]')) descs[props[i]] = {
        value: internal[prop],
        writable: true,
        configurable: true,
        enumerable: true
      };
    }
    return objCreate({}, descs);
  }
});

/* jslint esnext: true */

// Match these datetime components in a CLDR pattern, except those in single quotes
var expDTComponents = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
// trim patterns after transformations
var expPatternTrimmer = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
// Skip over patterns with these datetime components because we don't have data
// to back them up:
// timezone, weekday, amoung others
var unwantedDTCs = /[rqQASjJgwWIQq]/; // xXVO were removed from this list in favor of computing matches with timeZoneName values but printing as empty string

var dtKeys = ["era", "year", "month", "day", "weekday", "quarter"];
var tmKeys = ["hour", "minute", "second", "hour12", "timeZoneName"];
function isDateFormatOnly(obj) {
  for (var i = 0; i < tmKeys.length; i += 1) {
    if (obj.hasOwnProperty(tmKeys[i])) {
      return false;
    }
  }
  return true;
}
function isTimeFormatOnly(obj) {
  for (var i = 0; i < dtKeys.length; i += 1) {
    if (obj.hasOwnProperty(dtKeys[i])) {
      return false;
    }
  }
  return true;
}
function joinDateAndTimeFormats(dateFormatObj, timeFormatObj) {
  var o = {
    _: {}
  };
  for (var i = 0; i < dtKeys.length; i += 1) {
    if (dateFormatObj[dtKeys[i]]) {
      o[dtKeys[i]] = dateFormatObj[dtKeys[i]];
    }
    if (dateFormatObj._[dtKeys[i]]) {
      o._[dtKeys[i]] = dateFormatObj._[dtKeys[i]];
    }
  }
  for (var j = 0; j < tmKeys.length; j += 1) {
    if (timeFormatObj[tmKeys[j]]) {
      o[tmKeys[j]] = timeFormatObj[tmKeys[j]];
    }
    if (timeFormatObj._[tmKeys[j]]) {
      o._[tmKeys[j]] = timeFormatObj._[tmKeys[j]];
    }
  }
  return o;
}
function computeFinalPatterns(formatObj) {
  // From http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns:
  //  'In patterns, two single quotes represents a literal single quote, either
  //   inside or outside single quotes. Text within single quotes is not
  //   interpreted in any way (except for two adjacent single quotes).'
  formatObj.pattern12 = formatObj.extendedPattern.replace(/'([^']*)'/g, function ($0, literal) {
    return literal ? literal : "'";
  });

  // pattern 12 is always the default. we can produce the 24 by removing {ampm}
  formatObj.pattern = formatObj.pattern12.replace('{ampm}', '').replace(expPatternTrimmer, '');
  return formatObj;
}
function expDTComponentsMeta($0, formatObj) {
  switch ($0.charAt(0)) {
    // --- Era
    case 'G':
      formatObj.era = ['short', 'short', 'short', 'long', 'narrow'][$0.length - 1];
      return '{era}';

    // --- Year
    case 'y':
    case 'Y':
    case 'u':
    case 'U':
    case 'r':
      formatObj.year = $0.length === 2 ? '2-digit' : 'numeric';
      return '{year}';

    // --- Quarter (not supported in this polyfill)
    case 'Q':
    case 'q':
      formatObj.quarter = ['numeric', '2-digit', 'short', 'long', 'narrow'][$0.length - 1];
      return '{quarter}';

    // --- Month
    case 'M':
    case 'L':
      formatObj.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][$0.length - 1];
      return '{month}';

    // --- Week (not supported in this polyfill)
    case 'w':
      // week of the year
      formatObj.week = $0.length === 2 ? '2-digit' : 'numeric';
      return '{weekday}';
    case 'W':
      // week of the month
      formatObj.week = 'numeric';
      return '{weekday}';

    // --- Day
    case 'd':
      // day of the month
      formatObj.day = $0.length === 2 ? '2-digit' : 'numeric';
      return '{day}';
    case 'D': // day of the year
    case 'F': // day of the week
    case 'g':
      // 1..n: Modified Julian day
      formatObj.day = 'numeric';
      return '{day}';

    // --- Week Day
    case 'E':
      // day of the week
      formatObj.weekday = ['short', 'short', 'short', 'long', 'narrow', 'short'][$0.length - 1];
      return '{weekday}';
    case 'e':
      // local day of the week
      formatObj.weekday = ['numeric', '2-digit', 'short', 'long', 'narrow', 'short'][$0.length - 1];
      return '{weekday}';
    case 'c':
      // stand alone local day of the week
      formatObj.weekday = ['numeric', undefined, 'short', 'long', 'narrow', 'short'][$0.length - 1];
      return '{weekday}';

    // --- Period
    case 'a': // AM, PM
    case 'b': // am, pm, noon, midnight
    case 'B':
      // flexible day periods
      formatObj.hour12 = true;
      return '{ampm}';

    // --- Hour
    case 'h':
    case 'H':
      formatObj.hour = $0.length === 2 ? '2-digit' : 'numeric';
      return '{hour}';
    case 'k':
    case 'K':
      formatObj.hour12 = true; // 12-hour-cycle time formats (using h or K)
      formatObj.hour = $0.length === 2 ? '2-digit' : 'numeric';
      return '{hour}';

    // --- Minute
    case 'm':
      formatObj.minute = $0.length === 2 ? '2-digit' : 'numeric';
      return '{minute}';

    // --- Second
    case 's':
      formatObj.second = $0.length === 2 ? '2-digit' : 'numeric';
      return '{second}';
    case 'S':
    case 'A':
      formatObj.second = 'numeric';
      return '{second}';

    // --- Timezone
    case 'z': // 1..3, 4: specific non-location format
    case 'Z': // 1..3, 4, 5: The ISO8601 varios formats
    case 'O': // 1, 4: miliseconds in day short, long
    case 'v': // 1, 4: generic non-location format
    case 'V': // 1, 2, 3, 4: time zone ID or city
    case 'X': // 1, 2, 3, 4: The ISO8601 varios formats
    case 'x':
      // 1, 2, 3, 4: The ISO8601 varios formats
      // this polyfill only supports much, for now, we are just doing something dummy
      formatObj.timeZoneName = $0.length < 4 ? 'short' : 'long';
      return '{timeZoneName}';
  }
}

/**
 * Converts the CLDR availableFormats into the objects and patterns required by
 * the ECMAScript Internationalization API specification.
 */
function createDateTimeFormat(skeleton, pattern) {
  // we ignore certain patterns that are unsupported to avoid this expensive op.
  if (unwantedDTCs.test(pattern)) return undefined;
  var formatObj = {
    originalPattern: pattern,
    _: {}
  };

  // Replace the pattern string with the one required by the specification, whilst
  // at the same time evaluating it for the subsets and formats
  formatObj.extendedPattern = pattern.replace(expDTComponents, function ($0) {
    // See which symbol we're dealing with
    return expDTComponentsMeta($0, formatObj._);
  });

  // Match the skeleton string with the one required by the specification
  // this implementation is based on the Date Field Symbol Table:
  // http://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
  // Note: we are adding extra data to the formatObject even though this polyfill
  //       might not support it.
  skeleton.replace(expDTComponents, function ($0) {
    // See which symbol we're dealing with
    return expDTComponentsMeta($0, formatObj);
  });
  return computeFinalPatterns(formatObj);
}

/**
 * Processes DateTime formats from CLDR to an easier-to-parse format.
 * the result of this operation should be cached the first time a particular
 * calendar is analyzed.
 *
 * The specification requires we support at least the following subsets of
 * date/time components:
 *
 *   - 'weekday', 'year', 'month', 'day', 'hour', 'minute', 'second'
 *   - 'weekday', 'year', 'month', 'day'
 *   - 'year', 'month', 'day'
 *   - 'year', 'month'
 *   - 'month', 'day'
 *   - 'hour', 'minute', 'second'
 *   - 'hour', 'minute'
 *
 * We need to cherry pick at least these subsets from the CLDR data and convert
 * them into the pattern objects used in the ECMA-402 API.
 */
function createDateTimeFormats(formats) {
  var availableFormats = formats.availableFormats;
  var timeFormats = formats.timeFormats;
  var dateFormats = formats.dateFormats;
  var result = [];
  var skeleton = void 0,
    pattern = void 0,
    computed = void 0,
    i = void 0,
    j = void 0;
  var timeRelatedFormats = [];
  var dateRelatedFormats = [];

  // Map available (custom) formats into a pattern for createDateTimeFormats
  for (skeleton in availableFormats) {
    if (availableFormats.hasOwnProperty(skeleton)) {
      pattern = availableFormats[skeleton];
      computed = createDateTimeFormat(skeleton, pattern);
      if (computed) {
        result.push(computed);
        // in some cases, the format is only displaying date specific props
        // or time specific props, in which case we need to also produce the
        // combined formats.
        if (isDateFormatOnly(computed)) {
          dateRelatedFormats.push(computed);
        } else if (isTimeFormatOnly(computed)) {
          timeRelatedFormats.push(computed);
        }
      }
    }
  }

  // Map time formats into a pattern for createDateTimeFormats
  for (skeleton in timeFormats) {
    if (timeFormats.hasOwnProperty(skeleton)) {
      pattern = timeFormats[skeleton];
      computed = createDateTimeFormat(skeleton, pattern);
      if (computed) {
        result.push(computed);
        timeRelatedFormats.push(computed);
      }
    }
  }

  // Map date formats into a pattern for createDateTimeFormats
  for (skeleton in dateFormats) {
    if (dateFormats.hasOwnProperty(skeleton)) {
      pattern = dateFormats[skeleton];
      computed = createDateTimeFormat(skeleton, pattern);
      if (computed) {
        result.push(computed);
        dateRelatedFormats.push(computed);
      }
    }
  }

  // combine custom time and custom date formats when they are orthogonals to complete the
  // formats supported by CLDR.
  // This Algo is based on section "Missing Skeleton Fields" from:
  // http://unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems
  for (i = 0; i < timeRelatedFormats.length; i += 1) {
    for (j = 0; j < dateRelatedFormats.length; j += 1) {
      if (dateRelatedFormats[j].month === 'long') {
        pattern = dateRelatedFormats[j].weekday ? formats.full : formats["long"];
      } else if (dateRelatedFormats[j].month === 'short') {
        pattern = formats.medium;
      } else {
        pattern = formats["short"];
      }
      computed = joinDateAndTimeFormats(dateRelatedFormats[j], timeRelatedFormats[i]);
      computed.originalPattern = pattern;
      computed.extendedPattern = pattern.replace('{0}', timeRelatedFormats[i].extendedPattern).replace('{1}', dateRelatedFormats[j].extendedPattern).replace(/^[,\s]+|[,\s]+$/gi, '');
      result.push(computeFinalPatterns(computed));
    }
  }
  return result;
}

// this represents the exceptions of the rule that are not covered by CLDR availableFormats
// for single property configurations, they play no role when using multiple properties, and
// those that are not in this table, are not exceptions or are not covered by the data we
// provide.
var validSyntheticProps = {
  second: {
    numeric: 's',
    '2-digit': 'ss'
  },
  minute: {
    numeric: 'm',
    '2-digit': 'mm'
  },
  year: {
    numeric: 'y',
    '2-digit': 'yy'
  },
  day: {
    numeric: 'd',
    '2-digit': 'dd'
  },
  month: {
    numeric: 'L',
    '2-digit': 'LL',
    narrow: 'LLLLL',
    "short": 'LLL',
    "long": 'LLLL'
  },
  weekday: {
    narrow: 'ccccc',
    "short": 'ccc',
    "long": 'cccc'
  }
};
function generateSyntheticFormat(propName, propValue) {
  if (validSyntheticProps[propName] && validSyntheticProps[propName][propValue]) {
    var _ref2;
    return _ref2 = {
      originalPattern: validSyntheticProps[propName][propValue],
      _: defineProperty$1({}, propName, propValue),
      extendedPattern: "{" + propName + "}"
    }, defineProperty$1(_ref2, propName, propValue), defineProperty$1(_ref2, "pattern12", "{" + propName + "}"), defineProperty$1(_ref2, "pattern", "{" + propName + "}"), _ref2;
  }
}

// An object map of date component keys, saves using a regex later
var dateWidths = objCreate(null, {
  narrow: {},
  "short": {},
  "long": {}
});

/**
 * Returns a string for a date component, resolved using multiple inheritance as specified
 * as specified in the Unicode Technical Standard 35.
 */
function resolveDateString(data, ca, component, width, key) {
  // From http://www.unicode.org/reports/tr35/tr35.html#Multiple_Inheritance:
  // 'In clearly specified instances, resources may inherit from within the same locale.
  //  For example, ... the Buddhist calendar inherits from the Gregorian calendar.'
  var obj = data[ca] && data[ca][component] ? data[ca][component] : data.gregory[component],
    // "sideways" inheritance resolves strings when a key doesn't exist
    alts = {
      narrow: ['short', 'long'],
      "short": ['long', 'narrow'],
      "long": ['short', 'narrow']
    },
    //
    resolved = hop.call(obj, width) ? obj[width] : hop.call(obj, alts[width][0]) ? obj[alts[width][0]] : obj[alts[width][1]];

  // `key` wouldn't be specified for components 'dayPeriods'
  return key !== null ? resolved[key] : resolved;
}

// Define the DateTimeFormat constructor internally so it cannot be tainted
function DateTimeFormatConstructor() {
  var locales = arguments[0];
  var options = arguments[1];
  if (!this || this === Intl) {
    return new Intl.DateTimeFormat(locales, options);
  }
  return InitializeDateTimeFormat(toObject(this), locales, options);
}
defineProperty(Intl, 'DateTimeFormat', {
  configurable: true,
  writable: true,
  value: DateTimeFormatConstructor
});

// Must explicitly set prototypes as unwritable
defineProperty(DateTimeFormatConstructor, 'prototype', {
  writable: false
});

/**
 * The abstract operation InitializeDateTimeFormat accepts the arguments dateTimeFormat
 * (which must be an object), locales, and options. It initializes dateTimeFormat as a
 * DateTimeFormat object.
 */
function /* 12.1.1.1 */InitializeDateTimeFormat(dateTimeFormat, locales, options) {
  // This will be a internal properties object if we're not already initialized
  var internal = getInternalProperties(dateTimeFormat);

  // Create an object whose props can be used to restore the values of RegExp props
  var regexpRestore = createRegExpRestore();

  // 1. If dateTimeFormat has an [[initializedIntlObject]] internal property with
  //    value true, throw a TypeError exception.
  if (internal['[[initializedIntlObject]]'] === true) throw new TypeError('`this` object has already been initialized as an Intl object');

  // Need this to access the `internal` object
  defineProperty(dateTimeFormat, '__getInternalProperties', {
    value: function value() {
      // NOTE: Non-standard, for internal use only
      if (arguments[0] === secret) return internal;
    }
  });

  // 2. Set the [[initializedIntlObject]] internal property of numberFormat to true.
  internal['[[initializedIntlObject]]'] = true;

  // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
  //    abstract operation (defined in 9.2.1) with argument locales.
  var requestedLocales = CanonicalizeLocaleList(locales);

  // 4. Let options be the result of calling the ToDateTimeOptions abstract
  //    operation (defined below) with arguments options, "any", and "date".
  options = ToDateTimeOptions(options, 'any', 'date');

  // 5. Let opt be a new Record.
  var opt = new Record();

  // 6. Let matcher be the result of calling the GetOption abstract operation
  //    (defined in 9.2.9) with arguments options, "localeMatcher", "string", a List
  //    containing the two String values "lookup" and "best fit", and "best fit".
  var matcher = GetOption(options, 'localeMatcher', 'string', new List('lookup', 'best fit'), 'best fit');

  // 7. Set opt.[[localeMatcher]] to matcher.
  opt['[[localeMatcher]]'] = matcher;

  // 8. Let DateTimeFormat be the standard built-in object that is the initial
  //    value of Intl.DateTimeFormat.
  var DateTimeFormat = internals.DateTimeFormat; // This is what we *really* need

  // 9. Let localeData be the value of the [[localeData]] internal property of
  //    DateTimeFormat.
  var localeData = DateTimeFormat['[[localeData]]'];

  // 10. Let r be the result of calling the ResolveLocale abstract operation
  //     (defined in 9.2.5) with the [[availableLocales]] internal property of
  //      DateTimeFormat, requestedLocales, opt, the [[relevantExtensionKeys]]
  //      internal property of DateTimeFormat, and localeData.
  var r = ResolveLocale(DateTimeFormat['[[availableLocales]]'], requestedLocales, opt, DateTimeFormat['[[relevantExtensionKeys]]'], localeData);

  // 11. Set the [[locale]] internal property of dateTimeFormat to the value of
  //     r.[[locale]].
  internal['[[locale]]'] = r['[[locale]]'];

  // 12. Set the [[calendar]] internal property of dateTimeFormat to the value of
  //     r.[[ca]].
  internal['[[calendar]]'] = r['[[ca]]'];

  // 13. Set the [[numberingSystem]] internal property of dateTimeFormat to the value of
  //     r.[[nu]].
  internal['[[numberingSystem]]'] = r['[[nu]]'];

  // The specification doesn't tell us to do this, but it's helpful later on
  internal['[[dataLocale]]'] = r['[[dataLocale]]'];

  // 14. Let dataLocale be the value of r.[[dataLocale]].
  var dataLocale = r['[[dataLocale]]'];

  // 15. Let tz be the result of calling the [[Get]] internal method of options with
  //     argument "timeZone".
  var tz = options.timeZone;

  // 16. If tz is not undefined, then
  if (tz !== undefined) {
    // a. Let tz be ToString(tz).
    // b. Convert tz to upper case as described in 6.1.
    //    NOTE: If an implementation accepts additional time zone values, as permitted
    //          under certain conditions by the Conformance clause, different casing
    //          rules apply.
    tz = toLatinUpperCase(tz);

    // c. If tz is not "UTC", then throw a RangeError exception.
    // ###TODO: accept more time zones###
    if (tz !== 'UTC') throw new RangeError('timeZone is not supported.');
  }

  // 17. Set the [[timeZone]] internal property of dateTimeFormat to tz.
  internal['[[timeZone]]'] = tz;

  // 18. Let opt be a new Record.
  opt = new Record();

  // 19. For each row of Table 3, except the header row, do:
  for (var prop in dateTimeComponents) {
    if (!hop.call(dateTimeComponents, prop)) continue;

    // 20. Let prop be the name given in the Property column of the row.
    // 21. Let value be the result of calling the GetOption abstract operation,
    //     passing as argument options, the name given in the Property column of the
    //     row, "string", a List containing the strings given in the Values column of
    //     the row, and undefined.
    var value = GetOption(options, prop, 'string', dateTimeComponents[prop]);

    // 22. Set opt.[[<prop>]] to value.
    opt['[[' + prop + ']]'] = value;
  }

  // Assigned a value below
  var bestFormat = void 0;

  // 23. Let dataLocaleData be the result of calling the [[Get]] internal method of
  //     localeData with argument dataLocale.
  var dataLocaleData = localeData[dataLocale];

  // 24. Let formats be the result of calling the [[Get]] internal method of
  //     dataLocaleData with argument "formats".
  //     Note: we process the CLDR formats into the spec'd structure
  var formats = ToDateTimeFormats(dataLocaleData.formats);

  // 25. Let matcher be the result of calling the GetOption abstract operation with
  //     arguments options, "formatMatcher", "string", a List containing the two String
  //     values "basic" and "best fit", and "best fit".
  matcher = GetOption(options, 'formatMatcher', 'string', new List('basic', 'best fit'), 'best fit');

  // Optimization: caching the processed formats as a one time operation by
  // replacing the initial structure from localeData
  dataLocaleData.formats = formats;

  // 26. If matcher is "basic", then
  if (matcher === 'basic') {
    // 27. Let bestFormat be the result of calling the BasicFormatMatcher abstract
    //     operation (defined below) with opt and formats.
    bestFormat = BasicFormatMatcher(opt, formats);

    // 28. Else
  } else {
    {
      // diverging
      var _hr = GetOption(options, 'hour12', 'boolean' /*, undefined, undefined*/);
      opt.hour12 = _hr === undefined ? dataLocaleData.hour12 : _hr;
    }
    // 29. Let bestFormat be the result of calling the BestFitFormatMatcher
    //     abstract operation (defined below) with opt and formats.
    bestFormat = BestFitFormatMatcher(opt, formats);
  }

  // 30. For each row in Table 3, except the header row, do
  for (var _prop in dateTimeComponents) {
    if (!hop.call(dateTimeComponents, _prop)) continue;

    // a. Let prop be the name given in the Property column of the row.
    // b. Let pDesc be the result of calling the [[GetOwnProperty]] internal method of
    //    bestFormat with argument prop.
    // c. If pDesc is not undefined, then
    if (hop.call(bestFormat, _prop)) {
      // i. Let p be the result of calling the [[Get]] internal method of bestFormat
      //    with argument prop.
      var p = bestFormat[_prop];
      {
        // diverging
        p = bestFormat._ && hop.call(bestFormat._, _prop) ? bestFormat._[_prop] : p;
      }

      // ii. Set the [[<prop>]] internal property of dateTimeFormat to p.
      internal['[[' + _prop + ']]'] = p;
    }
  }
  var pattern = void 0; // Assigned a value below

  // 31. Let hr12 be the result of calling the GetOption abstract operation with
  //     arguments options, "hour12", "boolean", undefined, and undefined.
  var hr12 = GetOption(options, 'hour12', 'boolean' /*, undefined, undefined*/);

  // 32. If dateTimeFormat has an internal property [[hour]], then
  if (internal['[[hour]]']) {
    // a. If hr12 is undefined, then let hr12 be the result of calling the [[Get]]
    //    internal method of dataLocaleData with argument "hour12".
    hr12 = hr12 === undefined ? dataLocaleData.hour12 : hr12;

    // b. Set the [[hour12]] internal property of dateTimeFormat to hr12.
    internal['[[hour12]]'] = hr12;

    // c. If hr12 is true, then
    if (hr12 === true) {
      // i. Let hourNo0 be the result of calling the [[Get]] internal method of
      //    dataLocaleData with argument "hourNo0".
      var hourNo0 = dataLocaleData.hourNo0;

      // ii. Set the [[hourNo0]] internal property of dateTimeFormat to hourNo0.
      internal['[[hourNo0]]'] = hourNo0;

      // iii. Let pattern be the result of calling the [[Get]] internal method of
      //      bestFormat with argument "pattern12".
      pattern = bestFormat.pattern12;
    }

    // d. Else
    else
      // i. Let pattern be the result of calling the [[Get]] internal method of
      //    bestFormat with argument "pattern".
      pattern = bestFormat.pattern;
  }

  // 33. Else
  else
    // a. Let pattern be the result of calling the [[Get]] internal method of
    //    bestFormat with argument "pattern".
    pattern = bestFormat.pattern;

  // 34. Set the [[pattern]] internal property of dateTimeFormat to pattern.
  internal['[[pattern]]'] = pattern;

  // 35. Set the [[boundFormat]] internal property of dateTimeFormat to undefined.
  internal['[[boundFormat]]'] = undefined;

  // 36. Set the [[initializedDateTimeFormat]] internal property of dateTimeFormat to
  //     true.
  internal['[[initializedDateTimeFormat]]'] = true;

  // In ES3, we need to pre-bind the format() function
  if (es3) dateTimeFormat.format = GetFormatDateTime.call(dateTimeFormat);

  // Restore the RegExp properties
  regexpRestore();

  // Return the newly initialised object
  return dateTimeFormat;
}

/**
 * Several DateTimeFormat algorithms use values from the following table, which provides
 * property names and allowable values for the components of date and time formats:
 */
var dateTimeComponents = {
  weekday: ["narrow", "short", "long"],
  era: ["narrow", "short", "long"],
  year: ["2-digit", "numeric"],
  month: ["2-digit", "numeric", "narrow", "short", "long"],
  day: ["2-digit", "numeric"],
  hour: ["2-digit", "numeric"],
  minute: ["2-digit", "numeric"],
  second: ["2-digit", "numeric"],
  timeZoneName: ["short", "long"]
};

/**
 * When the ToDateTimeOptions abstract operation is called with arguments options,
 * required, and defaults, the following steps are taken:
 */
function ToDateTimeFormats(formats) {
  if (Object.prototype.toString.call(formats) === '[object Array]') {
    return formats;
  }
  return createDateTimeFormats(formats);
}

/**
 * When the ToDateTimeOptions abstract operation is called with arguments options,
 * required, and defaults, the following steps are taken:
 */
function ToDateTimeOptions(options, required, defaults) {
  // 1. If options is undefined, then let options be null, else let options be
  //    ToObject(options).
  if (options === undefined) options = null;else {
    // (#12) options needs to be a Record, but it also needs to inherit properties
    var opt2 = toObject(options);
    options = new Record();
    for (var k in opt2) {
      options[k] = opt2[k];
    }
  }

  // 2. Let create be the standard built-in function object defined in ES5, 15.2.3.5.
  var create = objCreate;

  // 3. Let options be the result of calling the [[Call]] internal method of create with
  //    undefined as the this value and an argument list containing the single item
  //    options.
  options = create(options);

  // 4. Let needDefaults be true.
  var needDefaults = true;

  // 5. If required is "date" or "any", then
  if (required === 'date' || required === 'any') {
    // a. For each of the property names "weekday", "year", "month", "day":
    // i. If the result of calling the [[Get]] internal method of options with the
    //    property name is not undefined, then let needDefaults be false.
    if (options.weekday !== undefined || options.year !== undefined || options.month !== undefined || options.day !== undefined) needDefaults = false;
  }

  // 6. If required is "time" or "any", then
  if (required === 'time' || required === 'any') {
    // a. For each of the property names "hour", "minute", "second":
    // i. If the result of calling the [[Get]] internal method of options with the
    //    property name is not undefined, then let needDefaults be false.
    if (options.hour !== undefined || options.minute !== undefined || options.second !== undefined) needDefaults = false;
  }

  // 7. If needDefaults is true and defaults is either "date" or "all", then
  if (needDefaults && (defaults === 'date' || defaults === 'all'))
    // a. For each of the property names "year", "month", "day":
    // i. Call the [[DefineOwnProperty]] internal method of options with the
    //    property name, Property Descriptor {[[Value]]: "numeric", [[Writable]]:
    //    true, [[Enumerable]]: true, [[Configurable]]: true}, and false.
    options.year = options.month = options.day = 'numeric';

  // 8. If needDefaults is true and defaults is either "time" or "all", then
  if (needDefaults && (defaults === 'time' || defaults === 'all'))
    // a. For each of the property names "hour", "minute", "second":
    // i. Call the [[DefineOwnProperty]] internal method of options with the
    //    property name, Property Descriptor {[[Value]]: "numeric", [[Writable]]:
    //    true, [[Enumerable]]: true, [[Configurable]]: true}, and false.
    options.hour = options.minute = options.second = 'numeric';

  // 9. Return options.
  return options;
}

/**
 * When the BasicFormatMatcher abstract operation is called with two arguments options and
 * formats, the following steps are taken:
 */
function BasicFormatMatcher(options, formats) {
  // 1. Let removalPenalty be 120.
  var removalPenalty = 120;

  // 2. Let additionPenalty be 20.
  var additionPenalty = 20;

  // 3. Let longLessPenalty be 8.
  var longLessPenalty = 8;

  // 4. Let longMorePenalty be 6.
  var longMorePenalty = 6;

  // 5. Let shortLessPenalty be 6.
  var shortLessPenalty = 6;

  // 6. Let shortMorePenalty be 3.
  var shortMorePenalty = 3;

  // 7. Let bestScore be -Infinity.
  var bestScore = -Infinity;

  // 8. Let bestFormat be undefined.
  var bestFormat = void 0;

  // 9. Let i be 0.
  var i = 0;

  // 10. Assert: formats is an Array object.

  // 11. Let len be the result of calling the [[Get]] internal method of formats with argument "length".
  var len = formats.length;

  // 12. Repeat while i < len:
  while (i < len) {
    // a. Let format be the result of calling the [[Get]] internal method of formats with argument ToString(i).
    var format = formats[i];

    // b. Let score be 0.
    var score = 0;

    // c. For each property shown in Table 3:
    for (var property in dateTimeComponents) {
      if (!hop.call(dateTimeComponents, property)) continue;

      // i. Let optionsProp be options.[[<property>]].
      var optionsProp = options['[[' + property + ']]'];

      // ii. Let formatPropDesc be the result of calling the [[GetOwnProperty]] internal method of format
      //     with argument property.
      // iii. If formatPropDesc is not undefined, then
      //     1. Let formatProp be the result of calling the [[Get]] internal method of format with argument property.
      var formatProp = hop.call(format, property) ? format[property] : undefined;

      // iv. If optionsProp is undefined and formatProp is not undefined, then decrease score by
      //     additionPenalty.
      if (optionsProp === undefined && formatProp !== undefined) score -= additionPenalty;

      // v. Else if optionsProp is not undefined and formatProp is undefined, then decrease score by
      //    removalPenalty.
      else if (optionsProp !== undefined && formatProp === undefined) score -= removalPenalty;

      // vi. Else
      else {
        // 1. Let values be the array ["2-digit", "numeric", "narrow", "short",
        //    "long"].
        var values = ['2-digit', 'numeric', 'narrow', 'short', 'long'];

        // 2. Let optionsPropIndex be the index of optionsProp within values.
        var optionsPropIndex = arrIndexOf.call(values, optionsProp);

        // 3. Let formatPropIndex be the index of formatProp within values.
        var formatPropIndex = arrIndexOf.call(values, formatProp);

        // 4. Let delta be max(min(formatPropIndex - optionsPropIndex, 2), -2).
        var delta = Math.max(Math.min(formatPropIndex - optionsPropIndex, 2), -2);

        // 5. If delta = 2, decrease score by longMorePenalty.
        if (delta === 2) score -= longMorePenalty;

        // 6. Else if delta = 1, decrease score by shortMorePenalty.
        else if (delta === 1) score -= shortMorePenalty;

        // 7. Else if delta = -1, decrease score by shortLessPenalty.
        else if (delta === -1) score -= shortLessPenalty;

        // 8. Else if delta = -2, decrease score by longLessPenalty.
        else if (delta === -2) score -= longLessPenalty;
      }
    }

    // d. If score > bestScore, then
    if (score > bestScore) {
      // i. Let bestScore be score.
      bestScore = score;

      // ii. Let bestFormat be format.
      bestFormat = format;
    }

    // e. Increase i by 1.
    i++;
  }

  // 13. Return bestFormat.
  return bestFormat;
}

/**
 * When the BestFitFormatMatcher abstract operation is called with two arguments options
 * and formats, it performs implementation dependent steps, which should return a set of
 * component representations that a typical user of the selected locale would perceive as
 * at least as good as the one returned by BasicFormatMatcher.
 *
 * This polyfill defines the algorithm to be the same as BasicFormatMatcher,
 * with the addition of bonus points awarded where the requested format is of
 * the same data type as the potentially matching format.
 *
 * This algo relies on the concept of closest distance matching described here:
 * http://unicode.org/reports/tr35/tr35-dates.html#Matching_Skeletons
 * Typically a “best match” is found using a closest distance match, such as:
 *
 * Symbols requesting a best choice for the locale are replaced.
 *      j → one of {H, k, h, K}; C → one of {a, b, B}
 * -> Covered by cldr.js matching process
 *
 * For fields with symbols representing the same type (year, month, day, etc):
 *     Most symbols have a small distance from each other.
 *         M ≅ L; E ≅ c; a ≅ b ≅ B; H ≅ k ≅ h ≅ K; ...
 *     -> Covered by cldr.js matching process
 *
 *     Width differences among fields, other than those marking text vs numeric, are given small distance from each other.
 *         MMM ≅ MMMM
 *         MM ≅ M
 *     Numeric and text fields are given a larger distance from each other.
 *         MMM ≈ MM
 *     Symbols representing substantial differences (week of year vs week of month) are given much larger a distances from each other.
 *         d ≋ D; ...
 *     Missing or extra fields cause a match to fail. (But see Missing Skeleton Fields).
 *
 *
 * For example,
 *
 *     { month: 'numeric', day: 'numeric' }
 *
 * should match
 *
 *     { month: '2-digit', day: '2-digit' }
 *
 * rather than
 *
 *     { month: 'short', day: 'numeric' }
 *
 * This makes sense because a user requesting a formatted date with numeric parts would
 * not expect to see the returned format containing narrow, short or long part names
 */
function BestFitFormatMatcher(options, formats) {
  /** Diverging: this block implements the hack for single property configuration, eg.:
   *
   *      `new Intl.DateTimeFormat('en', {day: 'numeric'})`
   *
   * should produce a single digit with the day of the month. This is needed because
   * CLDR `availableFormats` data structure doesn't cover these cases.
   */
  {
    var optionsPropNames = [];
    for (var property in dateTimeComponents) {
      if (!hop.call(dateTimeComponents, property)) continue;
      if (options['[[' + property + ']]'] !== undefined) {
        optionsPropNames.push(property);
      }
    }
    if (optionsPropNames.length === 1) {
      var _bestFormat = generateSyntheticFormat(optionsPropNames[0], options['[[' + optionsPropNames[0] + ']]']);
      if (_bestFormat) {
        return _bestFormat;
      }
    }
  }

  // 1. Let removalPenalty be 120.
  var removalPenalty = 120;

  // 2. Let additionPenalty be 20.
  var additionPenalty = 20;

  // 3. Let longLessPenalty be 8.
  var longLessPenalty = 8;

  // 4. Let longMorePenalty be 6.
  var longMorePenalty = 6;

  // 5. Let shortLessPenalty be 6.
  var shortLessPenalty = 6;

  // 6. Let shortMorePenalty be 3.
  var shortMorePenalty = 3;
  var patternPenalty = 2;
  var hour12Penalty = 1;

  // 7. Let bestScore be -Infinity.
  var bestScore = -Infinity;

  // 8. Let bestFormat be undefined.
  var bestFormat = void 0;

  // 9. Let i be 0.
  var i = 0;

  // 10. Assert: formats is an Array object.

  // 11. Let len be the result of calling the [[Get]] internal method of formats with argument "length".
  var len = formats.length;

  // 12. Repeat while i < len:
  while (i < len) {
    // a. Let format be the result of calling the [[Get]] internal method of formats with argument ToString(i).
    var format = formats[i];

    // b. Let score be 0.
    var score = 0;

    // c. For each property shown in Table 3:
    for (var _property in dateTimeComponents) {
      if (!hop.call(dateTimeComponents, _property)) continue;

      // i. Let optionsProp be options.[[<property>]].
      var optionsProp = options['[[' + _property + ']]'];

      // ii. Let formatPropDesc be the result of calling the [[GetOwnProperty]] internal method of format
      //     with argument property.
      // iii. If formatPropDesc is not undefined, then
      //     1. Let formatProp be the result of calling the [[Get]] internal method of format with argument property.
      var formatProp = hop.call(format, _property) ? format[_property] : undefined;

      // Diverging: using the default properties produced by the pattern/skeleton
      // to match it with user options, and apply a penalty
      var patternProp = hop.call(format._, _property) ? format._[_property] : undefined;
      if (optionsProp !== patternProp) {
        score -= patternPenalty;
      }

      // iv. If optionsProp is undefined and formatProp is not undefined, then decrease score by
      //     additionPenalty.
      if (optionsProp === undefined && formatProp !== undefined) score -= additionPenalty;

      // v. Else if optionsProp is not undefined and formatProp is undefined, then decrease score by
      //    removalPenalty.
      else if (optionsProp !== undefined && formatProp === undefined) score -= removalPenalty;

      // vi. Else
      else {
        // 1. Let values be the array ["2-digit", "numeric", "narrow", "short",
        //    "long"].
        var values = ['2-digit', 'numeric', 'narrow', 'short', 'long'];

        // 2. Let optionsPropIndex be the index of optionsProp within values.
        var optionsPropIndex = arrIndexOf.call(values, optionsProp);

        // 3. Let formatPropIndex be the index of formatProp within values.
        var formatPropIndex = arrIndexOf.call(values, formatProp);

        // 4. Let delta be max(min(formatPropIndex - optionsPropIndex, 2), -2).
        var delta = Math.max(Math.min(formatPropIndex - optionsPropIndex, 2), -2);
        {
          // diverging from spec
          // When the bestFit argument is true, subtract additional penalty where data types are not the same
          if (formatPropIndex <= 1 && optionsPropIndex >= 2 || formatPropIndex >= 2 && optionsPropIndex <= 1) {
            // 5. If delta = 2, decrease score by longMorePenalty.
            if (delta > 0) score -= longMorePenalty;else if (delta < 0) score -= longLessPenalty;
          } else {
            // 5. If delta = 2, decrease score by longMorePenalty.
            if (delta > 1) score -= shortMorePenalty;else if (delta < -1) score -= shortLessPenalty;
          }
        }
      }
    }
    {
      // diverging to also take into consideration differences between 12 or 24 hours
      // which is special for the best fit only.
      if (format._.hour12 !== options.hour12) {
        score -= hour12Penalty;
      }
    }

    // d. If score > bestScore, then
    if (score > bestScore) {
      // i. Let bestScore be score.
      bestScore = score;
      // ii. Let bestFormat be format.
      bestFormat = format;
    }

    // e. Increase i by 1.
    i++;
  }

  // 13. Return bestFormat.
  return bestFormat;
}

/* 12.2.3 */
internals.DateTimeFormat = {
  '[[availableLocales]]': [],
  '[[relevantExtensionKeys]]': ['ca', 'nu'],
  '[[localeData]]': {}
};

/**
 * When the supportedLocalesOf method of Intl.DateTimeFormat is called, the
 * following steps are taken:
 */
/* 12.2.2 */
defineProperty(Intl.DateTimeFormat, 'supportedLocalesOf', {
  configurable: true,
  writable: true,
  value: fnBind.call(function (locales) {
    // Bound functions only have the `this` value altered if being used as a constructor,
    // this lets us imitate a native function that has no constructor
    if (!hop.call(this, '[[availableLocales]]')) throw new TypeError('supportedLocalesOf() is not a constructor');

    // Create an object whose props can be used to restore the values of RegExp props
    var regexpRestore = createRegExpRestore(),
      // 1. If options is not provided, then let options be undefined.
      options = arguments[1],
      // 2. Let availableLocales be the value of the [[availableLocales]] internal
      //    property of the standard built-in object that is the initial value of
      //    Intl.NumberFormat.

      availableLocales = this['[[availableLocales]]'],
      // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
      //    abstract operation (defined in 9.2.1) with argument locales.
      requestedLocales = CanonicalizeLocaleList(locales);

    // Restore the RegExp properties
    regexpRestore();

    // 4. Return the result of calling the SupportedLocales abstract operation
    //    (defined in 9.2.8) with arguments availableLocales, requestedLocales,
    //    and options.
    return SupportedLocales(availableLocales, requestedLocales, options);
  }, internals.NumberFormat)
});

/**
 * This named accessor property returns a function that formats a number
 * according to the effective locale and the formatting options of this
 * DateTimeFormat object.
 */
/* 12.3.2 */
defineProperty(Intl.DateTimeFormat.prototype, 'format', {
  configurable: true,
  get: GetFormatDateTime
});
function GetFormatDateTime() {
  var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);

  // Satisfy test 12.3_b
  if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for format() is not an initialized Intl.DateTimeFormat object.');

  // The value of the [[Get]] attribute is a function that takes the following
  // steps:

  // 1. If the [[boundFormat]] internal property of this DateTimeFormat object
  //    is undefined, then:
  if (internal['[[boundFormat]]'] === undefined) {
    // a. Let F be a Function object, with internal properties set as
    //    specified for built-in functions in ES5, 15, or successor, and the
    //    length property set to 0, that takes the argument date and
    //    performs the following steps:
    var F = function F() {
      var date = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];

      //   i. If date is not provided or is undefined, then let x be the
      //      result as if by the expression Date.now() where Date.now is
      //      the standard built-in function defined in ES5, 15.9.4.4.
      //  ii. Else let x be ToNumber(date).
      // iii. Return the result of calling the FormatDateTime abstract
      //      operation (defined below) with arguments this and x.
      var x = date === undefined ? Date.now() : toNumber(date);
      return FormatDateTime(this, x);
    };
    // b. Let bind be the standard built-in function object defined in ES5,
    //    15.3.4.5.
    // c. Let bf be the result of calling the [[Call]] internal method of
    //    bind with F as the this value and an argument list containing
    //    the single item this.
    var bf = fnBind.call(F, this);
    // d. Set the [[boundFormat]] internal property of this NumberFormat
    //    object to bf.
    internal['[[boundFormat]]'] = bf;
  }
  // Return the value of the [[boundFormat]] internal property of this
  // NumberFormat object.
  return internal['[[boundFormat]]'];
}
function formatToParts$1() {
  var date = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];
  var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
  if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for formatToParts() is not an initialized Intl.DateTimeFormat object.');
  var x = date === undefined ? Date.now() : toNumber(date);
  return FormatToPartsDateTime(this, x);
}
Object.defineProperty(Intl.DateTimeFormat.prototype, 'formatToParts', {
  enumerable: false,
  writable: true,
  configurable: true,
  value: formatToParts$1
});
function CreateDateTimeParts(dateTimeFormat, x) {
  // 1. If x is not a finite Number, then throw a RangeError exception.
  if (!isFinite(x)) throw new RangeError('Invalid valid date passed to format');
  var internal = dateTimeFormat.__getInternalProperties(secret);

  // Creating restore point for properties on the RegExp object... please wait
  /* let regexpRestore = */
  createRegExpRestore(); // ###TODO: review this

  // 2. Let locale be the value of the [[locale]] internal property of dateTimeFormat.
  var locale = internal['[[locale]]'];

  // 3. Let nf be the result of creating a new NumberFormat object as if by the
  // expression new Intl.NumberFormat([locale], {useGrouping: false}) where
  // Intl.NumberFormat is the standard built-in constructor defined in 11.1.3.
  var nf = new Intl.NumberFormat([locale], {
    useGrouping: false
  });

  // 4. Let nf2 be the result of creating a new NumberFormat object as if by the
  // expression new Intl.NumberFormat([locale], {minimumIntegerDigits: 2, useGrouping:
  // false}) where Intl.NumberFormat is the standard built-in constructor defined in
  // 11.1.3.
  var nf2 = new Intl.NumberFormat([locale], {
    minimumIntegerDigits: 2,
    useGrouping: false
  });

  // 5. Let tm be the result of calling the ToLocalTime abstract operation (defined
  // below) with x, the value of the [[calendar]] internal property of dateTimeFormat,
  // and the value of the [[timeZone]] internal property of dateTimeFormat.
  var tm = ToLocalTime(x, internal['[[calendar]]'], internal['[[timeZone]]']);

  // 6. Let result be the value of the [[pattern]] internal property of dateTimeFormat.
  var pattern = internal['[[pattern]]'];

  // 7.
  var result = new List();

  // 8.
  var index = 0;

  // 9.
  var beginIndex = pattern.indexOf('{');

  // 10.
  var endIndex = 0;

  // Need the locale minus any extensions
  var dataLocale = internal['[[dataLocale]]'];

  // Need the calendar data from CLDR
  var localeData = internals.DateTimeFormat['[[localeData]]'][dataLocale].calendars;
  var ca = internal['[[calendar]]'];

  // 11.
  while (beginIndex !== -1) {
    var fv = void 0;
    // a.
    endIndex = pattern.indexOf('}', beginIndex);
    // b.
    if (endIndex === -1) {
      throw new Error('Unclosed pattern');
    }
    // c.
    if (beginIndex > index) {
      arrPush.call(result, {
        type: 'literal',
        value: pattern.substring(index, beginIndex)
      });
    }
    // d.
    var p = pattern.substring(beginIndex + 1, endIndex);
    // e.
    if (dateTimeComponents.hasOwnProperty(p)) {
      //   i. Let f be the value of the [[<p>]] internal property of dateTimeFormat.
      var f = internal['[[' + p + ']]'];
      //  ii. Let v be the value of tm.[[<p>]].
      var v = tm['[[' + p + ']]'];
      // iii. If p is "year" and v ≤ 0, then let v be 1 - v.
      if (p === 'year' && v <= 0) {
        v = 1 - v;
      }
      //  iv. If p is "month", then increase v by 1.
      else if (p === 'month') {
        v++;
      }
      //   v. If p is "hour" and the value of the [[hour12]] internal property of
      //      dateTimeFormat is true, then
      else if (p === 'hour' && internal['[[hour12]]'] === true) {
        // 1. Let v be v modulo 12.
        v = v % 12;
        // 2. If v is 0 and the value of the [[hourNo0]] internal property of
        //    dateTimeFormat is true, then let v be 12.
        if (v === 0 && internal['[[hourNo0]]'] === true) {
          v = 12;
        }
      }

      //  vi. If f is "numeric", then
      if (f === 'numeric') {
        // 1. Let fv be the result of calling the FormatNumber abstract operation
        //    (defined in 11.3.2) with arguments nf and v.
        fv = FormatNumber(nf, v);
      }
      // vii. Else if f is "2-digit", then
      else if (f === '2-digit') {
        // 1. Let fv be the result of calling the FormatNumber abstract operation
        //    with arguments nf2 and v.
        fv = FormatNumber(nf2, v);
        // 2. If the length of fv is greater than 2, let fv be the substring of fv
        //    containing the last two characters.
        if (fv.length > 2) {
          fv = fv.slice(-2);
        }
      }
      // viii. Else if f is "narrow", "short", or "long", then let fv be a String
      //     value representing f in the desired form; the String value depends upon
      //     the implementation and the effective locale and calendar of
      //     dateTimeFormat. If p is "month", then the String value may also depend
      //     on whether dateTimeFormat has a [[day]] internal property. If p is
      //     "timeZoneName", then the String value may also depend on the value of
      //     the [[inDST]] field of tm.
      else if (f in dateWidths) {
        switch (p) {
          case 'month':
            fv = resolveDateString(localeData, ca, 'months', f, tm['[[' + p + ']]']);
            break;
          case 'weekday':
            try {
              fv = resolveDateString(localeData, ca, 'days', f, tm['[[' + p + ']]']);
              // fv = resolveDateString(ca.days, f)[tm['[['+ p +']]']];
            } catch (e) {
              throw new Error('Could not find weekday data for locale ' + locale);
            }
            break;
          case 'timeZoneName':
            fv = ''; // ###TODO
            break;
          case 'era':
            try {
              fv = resolveDateString(localeData, ca, 'eras', f, tm['[[' + p + ']]']);
            } catch (e) {
              throw new Error('Could not find era data for locale ' + locale);
            }
            break;
          default:
            fv = tm['[[' + p + ']]'];
        }
      }
      // ix
      arrPush.call(result, {
        type: p,
        value: fv
      });
      // f.
    } else if (p === 'ampm') {
      // i.
      var _v = tm['[[hour]]'];
      // ii./iii.
      fv = resolveDateString(localeData, ca, 'dayPeriods', _v > 11 ? 'pm' : 'am', null);
      // iv.
      arrPush.call(result, {
        type: 'dayPeriod',
        value: fv
      });
      // g.
    } else {
      arrPush.call(result, {
        type: 'literal',
        value: pattern.substring(beginIndex, endIndex + 1)
      });
    }
    // h.
    index = endIndex + 1;
    // i.
    beginIndex = pattern.indexOf('{', index);
  }
  // 12.
  if (endIndex < pattern.length - 1) {
    arrPush.call(result, {
      type: 'literal',
      value: pattern.substr(endIndex + 1)
    });
  }
  // 13.
  return result;
}

/**
 * When the FormatDateTime abstract operation is called with arguments dateTimeFormat
 * (which must be an object initialized as a DateTimeFormat) and x (which must be a Number
 * value), it returns a String value representing x (interpreted as a time value as
 * specified in ES5, 15.9.1.1) according to the effective locale and the formatting
 * options of dateTimeFormat.
 */
function FormatDateTime(dateTimeFormat, x) {
  var parts = CreateDateTimeParts(dateTimeFormat, x);
  var result = '';
  for (var i = 0; parts.length > i; i++) {
    var part = parts[i];
    result += part.value;
  }
  return result;
}
function FormatToPartsDateTime(dateTimeFormat, x) {
  var parts = CreateDateTimeParts(dateTimeFormat, x);
  var result = [];
  for (var i = 0; parts.length > i; i++) {
    var part = parts[i];
    result.push({
      type: part.type,
      value: part.value
    });
  }
  return result;
}

/**
 * When the ToLocalTime abstract operation is called with arguments date, calendar, and
 * timeZone, the following steps are taken:
 */
function ToLocalTime(date, calendar, timeZone) {
  // 1. Apply calendrical calculations on date for the given calendar and time zone to
  //    produce weekday, era, year, month, day, hour, minute, second, and inDST values.
  //    The calculations should use best available information about the specified
  //    calendar and time zone. If the calendar is "gregory", then the calculations must
  //    match the algorithms specified in ES5, 15.9.1, except that calculations are not
  //    bound by the restrictions on the use of best available information on time zones
  //    for local time zone adjustment and daylight saving time adjustment imposed by
  //    ES5, 15.9.1.7 and 15.9.1.8.
  // ###TODO###
  var d = new Date(date),
    m = 'get' + (timeZone || '');

  // 2. Return a Record with fields [[weekday]], [[era]], [[year]], [[month]], [[day]],
  //    [[hour]], [[minute]], [[second]], and [[inDST]], each with the corresponding
  //    calculated value.
  return new Record({
    '[[weekday]]': d[m + 'Day'](),
    '[[era]]': +(d[m + 'FullYear']() >= 0),
    '[[year]]': d[m + 'FullYear'](),
    '[[month]]': d[m + 'Month'](),
    '[[day]]': d[m + 'Date'](),
    '[[hour]]': d[m + 'Hours'](),
    '[[minute]]': d[m + 'Minutes'](),
    '[[second]]': d[m + 'Seconds'](),
    '[[inDST]]': false // ###TODO###
  });
}

/**
 * The function returns a new object whose properties and attributes are set as if
 * constructed by an object literal assigning to each of the following properties the
 * value of the corresponding internal property of this DateTimeFormat object (see 12.4):
 * locale, calendar, numberingSystem, timeZone, hour12, weekday, era, year, month, day,
 * hour, minute, second, and timeZoneName. Properties whose corresponding internal
 * properties are not present are not assigned.
 */
/* 12.3.3 */
defineProperty(Intl.DateTimeFormat.prototype, 'resolvedOptions', {
  writable: true,
  configurable: true,
  value: function value() {
    var prop = void 0,
      descs = new Record(),
      props = ['locale', 'calendar', 'numberingSystem', 'timeZone', 'hour12', 'weekday', 'era', 'year', 'month', 'day', 'hour', 'minute', 'second', 'timeZoneName'],
      internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);

    // Satisfy test 12.3_b
    if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for resolvedOptions() is not an initialized Intl.DateTimeFormat object.');
    for (var i = 0, max = props.length; i < max; i++) {
      if (hop.call(internal, prop = '[[' + props[i] + ']]')) descs[props[i]] = {
        value: internal[prop],
        writable: true,
        configurable: true,
        enumerable: true
      };
    }
    return objCreate({}, descs);
  }
});
var ls = Intl.__localeSensitiveProtos = {
  Number: {},
  Date: {}
};

/**
 * When the toLocaleString method is called with optional arguments locales and options,
 * the following steps are taken:
 */
/* 13.2.1 */
ls.Number.toLocaleString = function () {
  // Satisfy test 13.2.1_1
  if (Object.prototype.toString.call(this) !== '[object Number]') throw new TypeError('`this` value must be a number for Number.prototype.toLocaleString()');

  // 1. Let x be this Number value (as defined in ES5, 15.7.4).
  // 2. If locales is not provided, then let locales be undefined.
  // 3. If options is not provided, then let options be undefined.
  // 4. Let numberFormat be the result of creating a new object as if by the
  //    expression new Intl.NumberFormat(locales, options) where
  //    Intl.NumberFormat is the standard built-in constructor defined in 11.1.3.
  // 5. Return the result of calling the FormatNumber abstract operation
  //    (defined in 11.3.2) with arguments numberFormat and x.
  return FormatNumber(new NumberFormatConstructor(arguments[0], arguments[1]), this);
};

/**
 * When the toLocaleString method is called with optional arguments locales and options,
 * the following steps are taken:
 */
/* 13.3.1 */
ls.Date.toLocaleString = function () {
  // Satisfy test 13.3.0_1
  if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleString()');

  // 1. Let x be this time value (as defined in ES5, 15.9.5).
  var x = +this;

  // 2. If x is NaN, then return "Invalid Date".
  if (isNaN(x)) return 'Invalid Date';

  // 3. If locales is not provided, then let locales be undefined.
  var locales = arguments[0];

  // 4. If options is not provided, then let options be undefined.
  var options = arguments[1];

  // 5. Let options be the result of calling the ToDateTimeOptions abstract
  //    operation (defined in 12.1.1) with arguments options, "any", and "all".
  options = ToDateTimeOptions(options, 'any', 'all');

  // 6. Let dateTimeFormat be the result of creating a new object as if by the
  //    expression new Intl.DateTimeFormat(locales, options) where
  //    Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3.
  var dateTimeFormat = new DateTimeFormatConstructor(locales, options);

  // 7. Return the result of calling the FormatDateTime abstract operation (defined
  //    in 12.3.2) with arguments dateTimeFormat and x.
  return FormatDateTime(dateTimeFormat, x);
};

/**
 * When the toLocaleDateString method is called with optional arguments locales and
 * options, the following steps are taken:
 */
/* 13.3.2 */
ls.Date.toLocaleDateString = function () {
  // Satisfy test 13.3.0_1
  if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleDateString()');

  // 1. Let x be this time value (as defined in ES5, 15.9.5).
  var x = +this;

  // 2. If x is NaN, then return "Invalid Date".
  if (isNaN(x)) return 'Invalid Date';

  // 3. If locales is not provided, then let locales be undefined.
  var locales = arguments[0],
    // 4. If options is not provided, then let options be undefined.
    options = arguments[1];

  // 5. Let options be the result of calling the ToDateTimeOptions abstract
  //    operation (defined in 12.1.1) with arguments options, "date", and "date".
  options = ToDateTimeOptions(options, 'date', 'date');

  // 6. Let dateTimeFormat be the result of creating a new object as if by the
  //    expression new Intl.DateTimeFormat(locales, options) where
  //    Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3.
  var dateTimeFormat = new DateTimeFormatConstructor(locales, options);

  // 7. Return the result of calling the FormatDateTime abstract operation (defined
  //    in 12.3.2) with arguments dateTimeFormat and x.
  return FormatDateTime(dateTimeFormat, x);
};

/**
 * When the toLocaleTimeString method is called with optional arguments locales and
 * options, the following steps are taken:
 */
/* 13.3.3 */
ls.Date.toLocaleTimeString = function () {
  // Satisfy test 13.3.0_1
  if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleTimeString()');

  // 1. Let x be this time value (as defined in ES5, 15.9.5).
  var x = +this;

  // 2. If x is NaN, then return "Invalid Date".
  if (isNaN(x)) return 'Invalid Date';

  // 3. If locales is not provided, then let locales be undefined.
  var locales = arguments[0];

  // 4. If options is not provided, then let options be undefined.
  var options = arguments[1];

  // 5. Let options be the result of calling the ToDateTimeOptions abstract
  //    operation (defined in 12.1.1) with arguments options, "time", and "time".
  options = ToDateTimeOptions(options, 'time', 'time');

  // 6. Let dateTimeFormat be the result of creating a new object as if by the
  //    expression new Intl.DateTimeFormat(locales, options) where
  //    Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3.
  var dateTimeFormat = new DateTimeFormatConstructor(locales, options);

  // 7. Return the result of calling the FormatDateTime abstract operation (defined
  //    in 12.3.2) with arguments dateTimeFormat and x.
  return FormatDateTime(dateTimeFormat, x);
};
defineProperty(Intl, '__applyLocaleSensitivePrototypes', {
  writable: true,
  configurable: true,
  value: function value() {
    defineProperty(Number.prototype, 'toLocaleString', {
      writable: true,
      configurable: true,
      value: ls.Number.toLocaleString
    });
    // Need this here for IE 8, to avoid the _DontEnum_ bug
    defineProperty(Date.prototype, 'toLocaleString', {
      writable: true,
      configurable: true,
      value: ls.Date.toLocaleString
    });
    for (var k in ls.Date) {
      if (hop.call(ls.Date, k)) defineProperty(Date.prototype, k, {
        writable: true,
        configurable: true,
        value: ls.Date[k]
      });
    }
  }
});

/**
 * Can't really ship a single script with data for hundreds of locales, so we provide
 * this __addLocaleData method as a means for the developer to add the data on an
 * as-needed basis
 */
defineProperty(Intl, '__addLocaleData', {
  value: function value(data) {
    if (!IsStructurallyValidLanguageTag(data.locale)) throw new Error("Object passed doesn't identify itself with a valid language tag");
    addLocaleData(data, data.locale);
  }
});
function addLocaleData(data, tag) {
  // Both NumberFormat and DateTimeFormat require number data, so throw if it isn't present
  if (!data.number) throw new Error("Object passed doesn't contain locale data for Intl.NumberFormat");
  var locale = void 0,
    locales = [tag],
    parts = tag.split('-');

  // Create fallbacks for locale data with scripts, e.g. Latn, Hans, Vaii, etc
  if (parts.length > 2 && parts[1].length === 4) arrPush.call(locales, parts[0] + '-' + parts[2]);
  while (locale = arrShift.call(locales)) {
    // Add to NumberFormat internal properties as per 11.2.3
    arrPush.call(internals.NumberFormat['[[availableLocales]]'], locale);
    internals.NumberFormat['[[localeData]]'][locale] = data.number;

    // ...and DateTimeFormat internal properties as per 12.2.3
    if (data.date) {
      data.date.nu = data.number.nu;
      arrPush.call(internals.DateTimeFormat['[[availableLocales]]'], locale);
      internals.DateTimeFormat['[[localeData]]'][locale] = data.date;
    }
  }

  // If this is the first set of locale data added, make it the default
  if (defaultLocale === undefined) setDefaultLocale(tag);
}
defineProperty(Intl, '__disableRegExpRestore', {
  value: function value() {
    internals.disableRegExpRestore = true;
  }
});
module.exports = Intl;

/***/ }),

/***/ 47127:
/***/ ((module, exports, __webpack_require__) => {

"use strict";
var __WEBPACK_AMD_DEFINE_RESULT__;

function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
; /*! showdown v 1.9.1 - 02-11-2019 */
(function () {
  /**
   * Created by Tivie on 13-07-2015.
   */

  function getDefaultOpts(simple) {
    'use strict';

    var defaultOptions = {
      omitExtraWLInCodeBlocks: {
        defaultValue: false,
        describe: 'Omit the default extra whiteline added to code blocks',
        type: 'boolean'
      },
      noHeaderId: {
        defaultValue: false,
        describe: 'Turn on/off generated header id',
        type: 'boolean'
      },
      prefixHeaderId: {
        defaultValue: false,
        describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \'section-\' prefix',
        type: 'string'
      },
      rawPrefixHeaderId: {
        defaultValue: false,
        describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',
        type: 'boolean'
      },
      ghCompatibleHeaderId: {
        defaultValue: false,
        describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)',
        type: 'boolean'
      },
      rawHeaderId: {
        defaultValue: false,
        describe: 'Remove only spaces, \' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids',
        type: 'boolean'
      },
      headerLevelStart: {
        defaultValue: false,
        describe: 'The header blocks level start',
        type: 'integer'
      },
      parseImgDimensions: {
        defaultValue: false,
        describe: 'Turn on/off image dimension parsing',
        type: 'boolean'
      },
      simplifiedAutoLink: {
        defaultValue: false,
        describe: 'Turn on/off GFM autolink style',
        type: 'boolean'
      },
      excludeTrailingPunctuationFromURLs: {
        defaultValue: false,
        describe: 'Excludes trailing punctuation from links generated with autoLinking',
        type: 'boolean'
      },
      literalMidWordUnderscores: {
        defaultValue: false,
        describe: 'Parse midword underscores as literal underscores',
        type: 'boolean'
      },
      literalMidWordAsterisks: {
        defaultValue: false,
        describe: 'Parse midword asterisks as literal asterisks',
        type: 'boolean'
      },
      strikethrough: {
        defaultValue: false,
        describe: 'Turn on/off strikethrough support',
        type: 'boolean'
      },
      tables: {
        defaultValue: false,
        describe: 'Turn on/off tables support',
        type: 'boolean'
      },
      tablesHeaderId: {
        defaultValue: false,
        describe: 'Add an id to table headers',
        type: 'boolean'
      },
      ghCodeBlocks: {
        defaultValue: true,
        describe: 'Turn on/off GFM fenced code blocks support',
        type: 'boolean'
      },
      tasklists: {
        defaultValue: false,
        describe: 'Turn on/off GFM tasklist support',
        type: 'boolean'
      },
      smoothLivePreview: {
        defaultValue: false,
        describe: 'Prevents weird effects in live previews due to incomplete input',
        type: 'boolean'
      },
      smartIndentationFix: {
        defaultValue: false,
        description: 'Tries to smartly fix indentation in es6 strings',
        type: 'boolean'
      },
      disableForced4SpacesIndentedSublists: {
        defaultValue: false,
        description: 'Disables the requirement of indenting nested sublists by 4 spaces',
        type: 'boolean'
      },
      simpleLineBreaks: {
        defaultValue: false,
        description: 'Parses simple line breaks as <br> (GFM Style)',
        type: 'boolean'
      },
      requireSpaceBeforeHeadingText: {
        defaultValue: false,
        description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',
        type: 'boolean'
      },
      ghMentions: {
        defaultValue: false,
        description: 'Enables github @mentions',
        type: 'boolean'
      },
      ghMentionsLink: {
        defaultValue: 'https://github.com/{u}',
        description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',
        type: 'string'
      },
      encodeEmails: {
        defaultValue: true,
        description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',
        type: 'boolean'
      },
      openLinksInNewWindow: {
        defaultValue: false,
        description: 'Open all links in new windows',
        type: 'boolean'
      },
      backslashEscapesHTMLTags: {
        defaultValue: false,
        description: 'Support for HTML Tag escaping. ex: \<div>foo\</div>',
        type: 'boolean'
      },
      emoji: {
        defaultValue: false,
        description: 'Enable emoji support. Ex: `this is a :smile: emoji`',
        type: 'boolean'
      },
      underline: {
        defaultValue: false,
        description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`',
        type: 'boolean'
      },
      completeHTMLDocument: {
        defaultValue: false,
        description: 'Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags',
        type: 'boolean'
      },
      metadata: {
        defaultValue: false,
        description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',
        type: 'boolean'
      },
      splitAdjacentBlockquotes: {
        defaultValue: false,
        description: 'Split adjacent blockquote blocks',
        type: 'boolean'
      }
    };
    if (simple === false) {
      return JSON.parse(JSON.stringify(defaultOptions));
    }
    var ret = {};
    for (var opt in defaultOptions) {
      if (defaultOptions.hasOwnProperty(opt)) {
        ret[opt] = defaultOptions[opt].defaultValue;
      }
    }
    return ret;
  }
  function allOptionsOn() {
    'use strict';

    var options = getDefaultOpts(true),
      ret = {};
    for (var opt in options) {
      if (options.hasOwnProperty(opt)) {
        ret[opt] = true;
      }
    }
    return ret;
  }

  /**
   * Created by Tivie on 06-01-2015.
   */

  // Private properties
  var showdown = {},
    parsers = {},
    extensions = {},
    globalOptions = getDefaultOpts(true),
    setFlavor = 'vanilla',
    flavor = {
      github: {
        omitExtraWLInCodeBlocks: true,
        simplifiedAutoLink: true,
        excludeTrailingPunctuationFromURLs: true,
        literalMidWordUnderscores: true,
        strikethrough: true,
        tables: true,
        tablesHeaderId: true,
        ghCodeBlocks: true,
        tasklists: true,
        disableForced4SpacesIndentedSublists: true,
        simpleLineBreaks: true,
        requireSpaceBeforeHeadingText: true,
        ghCompatibleHeaderId: true,
        ghMentions: true,
        backslashEscapesHTMLTags: true,
        emoji: true,
        splitAdjacentBlockquotes: true
      },
      original: {
        noHeaderId: true,
        ghCodeBlocks: false
      },
      ghost: {
        omitExtraWLInCodeBlocks: true,
        parseImgDimensions: true,
        simplifiedAutoLink: true,
        excludeTrailingPunctuationFromURLs: true,
        literalMidWordUnderscores: true,
        strikethrough: true,
        tables: true,
        tablesHeaderId: true,
        ghCodeBlocks: true,
        tasklists: true,
        smoothLivePreview: true,
        simpleLineBreaks: true,
        requireSpaceBeforeHeadingText: true,
        ghMentions: false,
        encodeEmails: true
      },
      vanilla: getDefaultOpts(true),
      allOn: allOptionsOn()
    };

  /**
   * helper namespace
   * @type {{}}
   */
  showdown.helper = {};

  /**
   * TODO LEGACY SUPPORT CODE
   * @type {{}}
   */
  showdown.extensions = {};

  /**
   * Set a global option
   * @static
   * @param {string} key
   * @param {*} value
   * @returns {showdown}
   */
  showdown.setOption = function (key, value) {
    'use strict';

    globalOptions[key] = value;
    return this;
  };

  /**
   * Get a global option
   * @static
   * @param {string} key
   * @returns {*}
   */
  showdown.getOption = function (key) {
    'use strict';

    return globalOptions[key];
  };

  /**
   * Get the global options
   * @static
   * @returns {{}}
   */
  showdown.getOptions = function () {
    'use strict';

    return globalOptions;
  };

  /**
   * Reset global options to the default values
   * @static
   */
  showdown.resetOptions = function () {
    'use strict';

    globalOptions = getDefaultOpts(true);
  };

  /**
   * Set the flavor showdown should use as default
   * @param {string} name
   */
  showdown.setFlavor = function (name) {
    'use strict';

    if (!flavor.hasOwnProperty(name)) {
      throw Error(name + ' flavor was not found');
    }
    showdown.resetOptions();
    var preset = flavor[name];
    setFlavor = name;
    for (var option in preset) {
      if (preset.hasOwnProperty(option)) {
        globalOptions[option] = preset[option];
      }
    }
  };

  /**
   * Get the currently set flavor
   * @returns {string}
   */
  showdown.getFlavor = function () {
    'use strict';

    return setFlavor;
  };

  /**
   * Get the options of a specified flavor. Returns undefined if the flavor was not found
   * @param {string} name Name of the flavor
   * @returns {{}|undefined}
   */
  showdown.getFlavorOptions = function (name) {
    'use strict';

    if (flavor.hasOwnProperty(name)) {
      return flavor[name];
    }
  };

  /**
   * Get the default options
   * @static
   * @param {boolean} [simple=true]
   * @returns {{}}
   */
  showdown.getDefaultOptions = function (simple) {
    'use strict';

    return getDefaultOpts(simple);
  };

  /**
   * Get or set a subParser
   *
   * subParser(name)       - Get a registered subParser
   * subParser(name, func) - Register a subParser
   * @static
   * @param {string} name
   * @param {function} [func]
   * @returns {*}
   */
  showdown.subParser = function (name, func) {
    'use strict';

    if (showdown.helper.isString(name)) {
      if (typeof func !== 'undefined') {
        parsers[name] = func;
      } else {
        if (parsers.hasOwnProperty(name)) {
          return parsers[name];
        } else {
          throw Error('SubParser named ' + name + ' not registered!');
        }
      }
    }
  };

  /**
   * Gets or registers an extension
   * @static
   * @param {string} name
   * @param {object|function=} ext
   * @returns {*}
   */
  showdown.extension = function (name, ext) {
    'use strict';

    if (!showdown.helper.isString(name)) {
      throw Error('Extension \'name\' must be a string');
    }
    name = showdown.helper.stdExtName(name);

    // Getter
    if (showdown.helper.isUndefined(ext)) {
      if (!extensions.hasOwnProperty(name)) {
        throw Error('Extension named ' + name + ' is not registered!');
      }
      return extensions[name];

      // Setter
    } else {
      // Expand extension if it's wrapped in a function
      if (typeof ext === 'function') {
        ext = ext();
      }

      // Ensure extension is an array
      if (!showdown.helper.isArray(ext)) {
        ext = [ext];
      }
      var validExtension = validate(ext, name);
      if (validExtension.valid) {
        extensions[name] = ext;
      } else {
        throw Error(validExtension.error);
      }
    }
  };

  /**
   * Gets all extensions registered
   * @returns {{}}
   */
  showdown.getAllExtensions = function () {
    'use strict';

    return extensions;
  };

  /**
   * Remove an extension
   * @param {string} name
   */
  showdown.removeExtension = function (name) {
    'use strict';

    delete extensions[name];
  };

  /**
   * Removes all extensions
   */
  showdown.resetExtensions = function () {
    'use strict';

    extensions = {};
  };

  /**
   * Validate extension
   * @param {array} extension
   * @param {string} name
   * @returns {{valid: boolean, error: string}}
   */
  function validate(extension, name) {
    'use strict';

    var errMsg = name ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension',
      ret = {
        valid: true,
        error: ''
      };
    if (!showdown.helper.isArray(extension)) {
      extension = [extension];
    }
    for (var i = 0; i < extension.length; ++i) {
      var baseMsg = errMsg + ' sub-extension ' + i + ': ',
        ext = extension[i];
      if (_typeof(ext) !== 'object') {
        ret.valid = false;
        ret.error = baseMsg + 'must be an object, but ' + _typeof(ext) + ' given';
        return ret;
      }
      if (!showdown.helper.isString(ext.type)) {
        ret.valid = false;
        ret.error = baseMsg + 'property "type" must be a string, but ' + _typeof(ext.type) + ' given';
        return ret;
      }
      var type = ext.type = ext.type.toLowerCase();

      // normalize extension type
      if (type === 'language') {
        type = ext.type = 'lang';
      }
      if (type === 'html') {
        type = ext.type = 'output';
      }
      if (type !== 'lang' && type !== 'output' && type !== 'listener') {
        ret.valid = false;
        ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: "lang/language", "output/html" or "listener"';
        return ret;
      }
      if (type === 'listener') {
        if (showdown.helper.isUndefined(ext.listeners)) {
          ret.valid = false;
          ret.error = baseMsg + '. Extensions of type "listener" must have a property called "listeners"';
          return ret;
        }
      } else {
        if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) {
          ret.valid = false;
          ret.error = baseMsg + type + ' extensions must define either a "regex" property or a "filter" method';
          return ret;
        }
      }
      if (ext.listeners) {
        if (_typeof(ext.listeners) !== 'object') {
          ret.valid = false;
          ret.error = baseMsg + '"listeners" property must be an object but ' + _typeof(ext.listeners) + ' given';
          return ret;
        }
        for (var ln in ext.listeners) {
          if (ext.listeners.hasOwnProperty(ln)) {
            if (typeof ext.listeners[ln] !== 'function') {
              ret.valid = false;
              ret.error = baseMsg + '"listeners" property must be an hash of [event name]: [callback]. listeners.' + ln + ' must be a function but ' + _typeof(ext.listeners[ln]) + ' given';
              return ret;
            }
          }
        }
      }
      if (ext.filter) {
        if (typeof ext.filter !== 'function') {
          ret.valid = false;
          ret.error = baseMsg + '"filter" must be a function, but ' + _typeof(ext.filter) + ' given';
          return ret;
        }
      } else if (ext.regex) {
        if (showdown.helper.isString(ext.regex)) {
          ext.regex = new RegExp(ext.regex, 'g');
        }
        if (!(ext.regex instanceof RegExp)) {
          ret.valid = false;
          ret.error = baseMsg + '"regex" property must either be a string or a RegExp object, but ' + _typeof(ext.regex) + ' given';
          return ret;
        }
        if (showdown.helper.isUndefined(ext.replace)) {
          ret.valid = false;
          ret.error = baseMsg + '"regex" extensions must implement a replace string or function';
          return ret;
        }
      }
    }
    return ret;
  }

  /**
   * Validate extension
   * @param {object} ext
   * @returns {boolean}
   */
  showdown.validateExtension = function (ext) {
    'use strict';

    var validateExtension = validate(ext, null);
    if (!validateExtension.valid) {
      console.warn(validateExtension.error);
      return false;
    }
    return true;
  };

  /**
   * showdownjs helper functions
   */

  if (!showdown.hasOwnProperty('helper')) {
    showdown.helper = {};
  }

  /**
   * Check if var is string
   * @static
   * @param {string} a
   * @returns {boolean}
   */
  showdown.helper.isString = function (a) {
    'use strict';

    return typeof a === 'string' || a instanceof String;
  };

  /**
   * Check if var is a function
   * @static
   * @param {*} a
   * @returns {boolean}
   */
  showdown.helper.isFunction = function (a) {
    'use strict';

    var getType = {};
    return a && getType.toString.call(a) === '[object Function]';
  };

  /**
   * isArray helper function
   * @static
   * @param {*} a
   * @returns {boolean}
   */
  showdown.helper.isArray = function (a) {
    'use strict';

    return Array.isArray(a);
  };

  /**
   * Check if value is undefined
   * @static
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
   */
  showdown.helper.isUndefined = function (value) {
    'use strict';

    return typeof value === 'undefined';
  };

  /**
   * ForEach helper function
   * Iterates over Arrays and Objects (own properties only)
   * @static
   * @param {*} obj
   * @param {function} callback Accepts 3 params: 1. value, 2. key, 3. the original array/object
   */
  showdown.helper.forEach = function (obj, callback) {
    'use strict';

    // check if obj is defined
    if (showdown.helper.isUndefined(obj)) {
      throw new Error('obj param is required');
    }
    if (showdown.helper.isUndefined(callback)) {
      throw new Error('callback param is required');
    }
    if (!showdown.helper.isFunction(callback)) {
      throw new Error('callback param must be a function/closure');
    }
    if (typeof obj.forEach === 'function') {
      obj.forEach(callback);
    } else if (showdown.helper.isArray(obj)) {
      for (var i = 0; i < obj.length; i++) {
        callback(obj[i], i, obj);
      }
    } else if (_typeof(obj) === 'object') {
      for (var prop in obj) {
        if (obj.hasOwnProperty(prop)) {
          callback(obj[prop], prop, obj);
        }
      }
    } else {
      throw new Error('obj does not seem to be an array or an iterable object');
    }
  };

  /**
   * Standardidize extension name
   * @static
   * @param {string} s extension name
   * @returns {string}
   */
  showdown.helper.stdExtName = function (s) {
    'use strict';

    return s.replace(/[_?*+\/\\.^-]/g, '').replace(/\s/g, '').toLowerCase();
  };
  function escapeCharactersCallback(wholeMatch, m1) {
    'use strict';

    var charCodeToEscape = m1.charCodeAt(0);
    return '¨E' + charCodeToEscape + 'E';
  }

  /**
   * Callback used to escape characters when passing through String.replace
   * @static
   * @param {string} wholeMatch
   * @param {string} m1
   * @returns {string}
   */
  showdown.helper.escapeCharactersCallback = escapeCharactersCallback;

  /**
   * Escape characters in a string
   * @static
   * @param {string} text
   * @param {string} charsToEscape
   * @param {boolean} afterBackslash
   * @returns {XML|string|void|*}
   */
  showdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash) {
    'use strict';

    // First we have to escape the escape characters so that
    // we can build a character class out of them
    var regexString = '([' + charsToEscape.replace(/([\[\]\\])/g, '\\$1') + '])';
    if (afterBackslash) {
      regexString = '\\\\' + regexString;
    }
    var regex = new RegExp(regexString, 'g');
    text = text.replace(regex, escapeCharactersCallback);
    return text;
  };

  /**
   * Unescape HTML entities
   * @param txt
   * @returns {string}
   */
  showdown.helper.unescapeHTMLEntities = function (txt) {
    'use strict';

    return txt.replace(/&quot;/g, '"').replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&');
  };
  var rgxFindMatchPos = function rgxFindMatchPos(str, left, right, flags) {
    'use strict';

    var f = flags || '',
      g = f.indexOf('g') > -1,
      x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')),
      l = new RegExp(left, f.replace(/g/g, '')),
      pos = [],
      t,
      s,
      m,
      start,
      end;
    do {
      t = 0;
      while (m = x.exec(str)) {
        if (l.test(m[0])) {
          if (!t++) {
            s = x.lastIndex;
            start = s - m[0].length;
          }
        } else if (t) {
          if (! --t) {
            end = m.index + m[0].length;
            var obj = {
              left: {
                start: start,
                end: s
              },
              match: {
                start: s,
                end: m.index
              },
              right: {
                start: m.index,
                end: end
              },
              wholeMatch: {
                start: start,
                end: end
              }
            };
            pos.push(obj);
            if (!g) {
              return pos;
            }
          }
        }
      }
    } while (t && (x.lastIndex = s));
    return pos;
  };

  /**
   * matchRecursiveRegExp
   *
   * (c) 2007 Steven Levithan <stevenlevithan.com>
   * MIT License
   *
   * Accepts a string to search, a left and right format delimiter
   * as regex patterns, and optional regex flags. Returns an array
   * of matches, allowing nested instances of left/right delimiters.
   * Use the "g" flag to return all matches, otherwise only the
   * first is returned. Be careful to ensure that the left and
   * right format delimiters produce mutually exclusive matches.
   * Backreferences are not supported within the right delimiter
   * due to how it is internally combined with the left delimiter.
   * When matching strings whose format delimiters are unbalanced
   * to the left or right, the output is intentionally as a
   * conventional regex library with recursion support would
   * produce, e.g. "<<x>" and "<x>>" both produce ["x"] when using
   * "<" and ">" as the delimiters (both strings contain a single,
   * balanced instance of "<x>").
   *
   * examples:
   * matchRecursiveRegExp("test", "\\(", "\\)")
   * returns: []
   * matchRecursiveRegExp("<t<<e>><s>>t<>", "<", ">", "g")
   * returns: ["t<<e>><s>", ""]
   * matchRecursiveRegExp("<div id=\"x\">test</div>", "<div\\b[^>]*>", "</div>", "gi")
   * returns: ["test"]
   */
  showdown.helper.matchRecursiveRegExp = function (str, left, right, flags) {
    'use strict';

    var matchPos = rgxFindMatchPos(str, left, right, flags),
      results = [];
    for (var i = 0; i < matchPos.length; ++i) {
      results.push([str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end), str.slice(matchPos[i].match.start, matchPos[i].match.end), str.slice(matchPos[i].left.start, matchPos[i].left.end), str.slice(matchPos[i].right.start, matchPos[i].right.end)]);
    }
    return results;
  };

  /**
   *
   * @param {string} str
   * @param {string|function} replacement
   * @param {string} left
   * @param {string} right
   * @param {string} flags
   * @returns {string}
   */
  showdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) {
    'use strict';

    if (!showdown.helper.isFunction(replacement)) {
      var repStr = replacement;
      replacement = function replacement() {
        return repStr;
      };
    }
    var matchPos = rgxFindMatchPos(str, left, right, flags),
      finalStr = str,
      lng = matchPos.length;
    if (lng > 0) {
      var bits = [];
      if (matchPos[0].wholeMatch.start !== 0) {
        bits.push(str.slice(0, matchPos[0].wholeMatch.start));
      }
      for (var i = 0; i < lng; ++i) {
        bits.push(replacement(str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end), str.slice(matchPos[i].match.start, matchPos[i].match.end), str.slice(matchPos[i].left.start, matchPos[i].left.end), str.slice(matchPos[i].right.start, matchPos[i].right.end)));
        if (i < lng - 1) {
          bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start));
        }
      }
      if (matchPos[lng - 1].wholeMatch.end < str.length) {
        bits.push(str.slice(matchPos[lng - 1].wholeMatch.end));
      }
      finalStr = bits.join('');
    }
    return finalStr;
  };

  /**
   * Returns the index within the passed String object of the first occurrence of the specified regex,
   * starting the search at fromIndex. Returns -1 if the value is not found.
   *
   * @param {string} str string to search
   * @param {RegExp} regex Regular expression to search
   * @param {int} [fromIndex = 0] Index to start the search
   * @returns {Number}
   * @throws InvalidArgumentError
   */
  showdown.helper.regexIndexOf = function (str, regex, fromIndex) {
    'use strict';

    if (!showdown.helper.isString(str)) {
      throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';
    }
    if (regex instanceof RegExp === false) {
      throw 'InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp';
    }
    var indexOf = str.substring(fromIndex || 0).search(regex);
    return indexOf >= 0 ? indexOf + (fromIndex || 0) : indexOf;
  };

  /**
   * Splits the passed string object at the defined index, and returns an array composed of the two substrings
   * @param {string} str string to split
   * @param {int} index index to split string at
   * @returns {[string,string]}
   * @throws InvalidArgumentError
   */
  showdown.helper.splitAtIndex = function (str, index) {
    'use strict';

    if (!showdown.helper.isString(str)) {
      throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string';
    }
    return [str.substring(0, index), str.substring(index)];
  };

  /**
   * Obfuscate an e-mail address through the use of Character Entities,
   * transforming ASCII characters into their equivalent decimal or hex entities.
   *
   * Since it has a random component, subsequent calls to this function produce different results
   *
   * @param {string} mail
   * @returns {string}
   */
  showdown.helper.encodeEmailAddress = function (mail) {
    'use strict';

    var encode = [function (ch) {
      return '&#' + ch.charCodeAt(0) + ';';
    }, function (ch) {
      return '&#x' + ch.charCodeAt(0).toString(16) + ';';
    }, function (ch) {
      return ch;
    }];
    mail = mail.replace(/./g, function (ch) {
      if (ch === '@') {
        // this *must* be encoded. I insist.
        ch = encode[Math.floor(Math.random() * 2)](ch);
      } else {
        var r = Math.random();
        // roughly 10% raw, 45% hex, 45% dec
        ch = r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch);
      }
      return ch;
    });
    return mail;
  };

  /**
   *
   * @param str
   * @param targetLength
   * @param padString
   * @returns {string}
   */
  showdown.helper.padEnd = function padEnd(str, targetLength, padString) {
    'use strict';

    /*jshint bitwise: false*/
    // eslint-disable-next-line space-infix-ops
    targetLength = targetLength >> 0; //floor if number or convert non-number to 0;
    /*jshint bitwise: true*/
    padString = String(padString || ' ');
    if (str.length > targetLength) {
      return String(str);
    } else {
      targetLength = targetLength - str.length;
      if (targetLength > padString.length) {
        padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed
      }

      return String(str) + padString.slice(0, targetLength);
    }
  };

  /**
   * POLYFILLS
   */
  // use this instead of builtin is undefined for IE8 compatibility
  if (typeof console === 'undefined') {
    console = {
      warn: function warn(msg) {
        'use strict';

        alert(msg);
      },
      log: function log(msg) {
        'use strict';

        alert(msg);
      },
      error: function error(msg) {
        'use strict';

        throw msg;
      }
    };
  }

  /**
   * Common regexes.
   * We declare some common regexes to improve performance
   */
  showdown.helper.regexes = {
    asteriskDashAndColon: /([*_:~])/g
  };

  /**
   * EMOJIS LIST
   */
  showdown.helper.emojis = {
    '+1': "\uD83D\uDC4D",
    '-1': "\uD83D\uDC4E",
    '100': "\uD83D\uDCAF",
    '1234': "\uD83D\uDD22",
    '1st_place_medal': "\uD83E\uDD47",
    '2nd_place_medal': "\uD83E\uDD48",
    '3rd_place_medal': "\uD83E\uDD49",
    '8ball': "\uD83C\uDFB1",
    'a': "\uD83C\uDD70\uFE0F",
    'ab': "\uD83C\uDD8E",
    'abc': "\uD83D\uDD24",
    'abcd': "\uD83D\uDD21",
    'accept': "\uD83C\uDE51",
    'aerial_tramway': "\uD83D\uDEA1",
    'airplane': "\u2708\uFE0F",
    'alarm_clock': "\u23F0",
    'alembic': "\u2697\uFE0F",
    'alien': "\uD83D\uDC7D",
    'ambulance': "\uD83D\uDE91",
    'amphora': "\uD83C\uDFFA",
    'anchor': "\u2693\uFE0F",
    'angel': "\uD83D\uDC7C",
    'anger': "\uD83D\uDCA2",
    'angry': "\uD83D\uDE20",
    'anguished': "\uD83D\uDE27",
    'ant': "\uD83D\uDC1C",
    'apple': "\uD83C\uDF4E",
    'aquarius': "\u2652\uFE0F",
    'aries': "\u2648\uFE0F",
    'arrow_backward': "\u25C0\uFE0F",
    'arrow_double_down': "\u23EC",
    'arrow_double_up': "\u23EB",
    'arrow_down': "\u2B07\uFE0F",
    'arrow_down_small': "\uD83D\uDD3D",
    'arrow_forward': "\u25B6\uFE0F",
    'arrow_heading_down': "\u2935\uFE0F",
    'arrow_heading_up': "\u2934\uFE0F",
    'arrow_left': "\u2B05\uFE0F",
    'arrow_lower_left': "\u2199\uFE0F",
    'arrow_lower_right': "\u2198\uFE0F",
    'arrow_right': "\u27A1\uFE0F",
    'arrow_right_hook': "\u21AA\uFE0F",
    'arrow_up': "\u2B06\uFE0F",
    'arrow_up_down': "\u2195\uFE0F",
    'arrow_up_small': "\uD83D\uDD3C",
    'arrow_upper_left': "\u2196\uFE0F",
    'arrow_upper_right': "\u2197\uFE0F",
    'arrows_clockwise': "\uD83D\uDD03",
    'arrows_counterclockwise': "\uD83D\uDD04",
    'art': "\uD83C\uDFA8",
    'articulated_lorry': "\uD83D\uDE9B",
    'artificial_satellite': "\uD83D\uDEF0",
    'astonished': "\uD83D\uDE32",
    'athletic_shoe': "\uD83D\uDC5F",
    'atm': "\uD83C\uDFE7",
    'atom_symbol': "\u269B\uFE0F",
    'avocado': "\uD83E\uDD51",
    'b': "\uD83C\uDD71\uFE0F",
    'baby': "\uD83D\uDC76",
    'baby_bottle': "\uD83C\uDF7C",
    'baby_chick': "\uD83D\uDC24",
    'baby_symbol': "\uD83D\uDEBC",
    'back': "\uD83D\uDD19",
    'bacon': "\uD83E\uDD53",
    'badminton': "\uD83C\uDFF8",
    'baggage_claim': "\uD83D\uDEC4",
    'baguette_bread': "\uD83E\uDD56",
    'balance_scale': "\u2696\uFE0F",
    'balloon': "\uD83C\uDF88",
    'ballot_box': "\uD83D\uDDF3",
    'ballot_box_with_check': "\u2611\uFE0F",
    'bamboo': "\uD83C\uDF8D",
    'banana': "\uD83C\uDF4C",
    'bangbang': "\u203C\uFE0F",
    'bank': "\uD83C\uDFE6",
    'bar_chart': "\uD83D\uDCCA",
    'barber': "\uD83D\uDC88",
    'baseball': "\u26BE\uFE0F",
    'basketball': "\uD83C\uDFC0",
    'basketball_man': "\u26F9\uFE0F",
    'basketball_woman': "\u26F9\uFE0F&zwj;\u2640\uFE0F",
    'bat': "\uD83E\uDD87",
    'bath': "\uD83D\uDEC0",
    'bathtub': "\uD83D\uDEC1",
    'battery': "\uD83D\uDD0B",
    'beach_umbrella': "\uD83C\uDFD6",
    'bear': "\uD83D\uDC3B",
    'bed': "\uD83D\uDECF",
    'bee': "\uD83D\uDC1D",
    'beer': "\uD83C\uDF7A",
    'beers': "\uD83C\uDF7B",
    'beetle': "\uD83D\uDC1E",
    'beginner': "\uD83D\uDD30",
    'bell': "\uD83D\uDD14",
    'bellhop_bell': "\uD83D\uDECE",
    'bento': "\uD83C\uDF71",
    'biking_man': "\uD83D\uDEB4",
    'bike': "\uD83D\uDEB2",
    'biking_woman': "\uD83D\uDEB4&zwj;\u2640\uFE0F",
    'bikini': "\uD83D\uDC59",
    'biohazard': "\u2623\uFE0F",
    'bird': "\uD83D\uDC26",
    'birthday': "\uD83C\uDF82",
    'black_circle': "\u26AB\uFE0F",
    'black_flag': "\uD83C\uDFF4",
    'black_heart': "\uD83D\uDDA4",
    'black_joker': "\uD83C\uDCCF",
    'black_large_square': "\u2B1B\uFE0F",
    'black_medium_small_square': "\u25FE\uFE0F",
    'black_medium_square': "\u25FC\uFE0F",
    'black_nib': "\u2712\uFE0F",
    'black_small_square': "\u25AA\uFE0F",
    'black_square_button': "\uD83D\uDD32",
    'blonde_man': "\uD83D\uDC71",
    'blonde_woman': "\uD83D\uDC71&zwj;\u2640\uFE0F",
    'blossom': "\uD83C\uDF3C",
    'blowfish': "\uD83D\uDC21",
    'blue_book': "\uD83D\uDCD8",
    'blue_car': "\uD83D\uDE99",
    'blue_heart': "\uD83D\uDC99",
    'blush': "\uD83D\uDE0A",
    'boar': "\uD83D\uDC17",
    'boat': "\u26F5\uFE0F",
    'bomb': "\uD83D\uDCA3",
    'book': "\uD83D\uDCD6",
    'bookmark': "\uD83D\uDD16",
    'bookmark_tabs': "\uD83D\uDCD1",
    'books': "\uD83D\uDCDA",
    'boom': "\uD83D\uDCA5",
    'boot': "\uD83D\uDC62",
    'bouquet': "\uD83D\uDC90",
    'bowing_man': "\uD83D\uDE47",
    'bow_and_arrow': "\uD83C\uDFF9",
    'bowing_woman': "\uD83D\uDE47&zwj;\u2640\uFE0F",
    'bowling': "\uD83C\uDFB3",
    'boxing_glove': "\uD83E\uDD4A",
    'boy': "\uD83D\uDC66",
    'bread': "\uD83C\uDF5E",
    'bride_with_veil': "\uD83D\uDC70",
    'bridge_at_night': "\uD83C\uDF09",
    'briefcase': "\uD83D\uDCBC",
    'broken_heart': "\uD83D\uDC94",
    'bug': "\uD83D\uDC1B",
    'building_construction': "\uD83C\uDFD7",
    'bulb': "\uD83D\uDCA1",
    'bullettrain_front': "\uD83D\uDE85",
    'bullettrain_side': "\uD83D\uDE84",
    'burrito': "\uD83C\uDF2F",
    'bus': "\uD83D\uDE8C",
    'business_suit_levitating': "\uD83D\uDD74",
    'busstop': "\uD83D\uDE8F",
    'bust_in_silhouette': "\uD83D\uDC64",
    'busts_in_silhouette': "\uD83D\uDC65",
    'butterfly': "\uD83E\uDD8B",
    'cactus': "\uD83C\uDF35",
    'cake': "\uD83C\uDF70",
    'calendar': "\uD83D\uDCC6",
    'call_me_hand': "\uD83E\uDD19",
    'calling': "\uD83D\uDCF2",
    'camel': "\uD83D\uDC2B",
    'camera': "\uD83D\uDCF7",
    'camera_flash': "\uD83D\uDCF8",
    'camping': "\uD83C\uDFD5",
    'cancer': "\u264B\uFE0F",
    'candle': "\uD83D\uDD6F",
    'candy': "\uD83C\uDF6C",
    'canoe': "\uD83D\uDEF6",
    'capital_abcd': "\uD83D\uDD20",
    'capricorn': "\u2651\uFE0F",
    'car': "\uD83D\uDE97",
    'card_file_box': "\uD83D\uDDC3",
    'card_index': "\uD83D\uDCC7",
    'card_index_dividers': "\uD83D\uDDC2",
    'carousel_horse': "\uD83C\uDFA0",
    'carrot': "\uD83E\uDD55",
    'cat': "\uD83D\uDC31",
    'cat2': "\uD83D\uDC08",
    'cd': "\uD83D\uDCBF",
    'chains': "\u26D3",
    'champagne': "\uD83C\uDF7E",
    'chart': "\uD83D\uDCB9",
    'chart_with_downwards_trend': "\uD83D\uDCC9",
    'chart_with_upwards_trend': "\uD83D\uDCC8",
    'checkered_flag': "\uD83C\uDFC1",
    'cheese': "\uD83E\uDDC0",
    'cherries': "\uD83C\uDF52",
    'cherry_blossom': "\uD83C\uDF38",
    'chestnut': "\uD83C\uDF30",
    'chicken': "\uD83D\uDC14",
    'children_crossing': "\uD83D\uDEB8",
    'chipmunk': "\uD83D\uDC3F",
    'chocolate_bar': "\uD83C\uDF6B",
    'christmas_tree': "\uD83C\uDF84",
    'church': "\u26EA\uFE0F",
    'cinema': "\uD83C\uDFA6",
    'circus_tent': "\uD83C\uDFAA",
    'city_sunrise': "\uD83C\uDF07",
    'city_sunset': "\uD83C\uDF06",
    'cityscape': "\uD83C\uDFD9",
    'cl': "\uD83C\uDD91",
    'clamp': "\uD83D\uDDDC",
    'clap': "\uD83D\uDC4F",
    'clapper': "\uD83C\uDFAC",
    'classical_building': "\uD83C\uDFDB",
    'clinking_glasses': "\uD83E\uDD42",
    'clipboard': "\uD83D\uDCCB",
    'clock1': "\uD83D\uDD50",
    'clock10': "\uD83D\uDD59",
    'clock1030': "\uD83D\uDD65",
    'clock11': "\uD83D\uDD5A",
    'clock1130': "\uD83D\uDD66",
    'clock12': "\uD83D\uDD5B",
    'clock1230': "\uD83D\uDD67",
    'clock130': "\uD83D\uDD5C",
    'clock2': "\uD83D\uDD51",
    'clock230': "\uD83D\uDD5D",
    'clock3': "\uD83D\uDD52",
    'clock330': "\uD83D\uDD5E",
    'clock4': "\uD83D\uDD53",
    'clock430': "\uD83D\uDD5F",
    'clock5': "\uD83D\uDD54",
    'clock530': "\uD83D\uDD60",
    'clock6': "\uD83D\uDD55",
    'clock630': "\uD83D\uDD61",
    'clock7': "\uD83D\uDD56",
    'clock730': "\uD83D\uDD62",
    'clock8': "\uD83D\uDD57",
    'clock830': "\uD83D\uDD63",
    'clock9': "\uD83D\uDD58",
    'clock930': "\uD83D\uDD64",
    'closed_book': "\uD83D\uDCD5",
    'closed_lock_with_key': "\uD83D\uDD10",
    'closed_umbrella': "\uD83C\uDF02",
    'cloud': "\u2601\uFE0F",
    'cloud_with_lightning': "\uD83C\uDF29",
    'cloud_with_lightning_and_rain': "\u26C8",
    'cloud_with_rain': "\uD83C\uDF27",
    'cloud_with_snow': "\uD83C\uDF28",
    'clown_face': "\uD83E\uDD21",
    'clubs': "\u2663\uFE0F",
    'cocktail': "\uD83C\uDF78",
    'coffee': "\u2615\uFE0F",
    'coffin': "\u26B0\uFE0F",
    'cold_sweat': "\uD83D\uDE30",
    'comet': "\u2604\uFE0F",
    'computer': "\uD83D\uDCBB",
    'computer_mouse': "\uD83D\uDDB1",
    'confetti_ball': "\uD83C\uDF8A",
    'confounded': "\uD83D\uDE16",
    'confused': "\uD83D\uDE15",
    'congratulations': "\u3297\uFE0F",
    'construction': "\uD83D\uDEA7",
    'construction_worker_man': "\uD83D\uDC77",
    'construction_worker_woman': "\uD83D\uDC77&zwj;\u2640\uFE0F",
    'control_knobs': "\uD83C\uDF9B",
    'convenience_store': "\uD83C\uDFEA",
    'cookie': "\uD83C\uDF6A",
    'cool': "\uD83C\uDD92",
    'policeman': "\uD83D\uDC6E",
    'copyright': "\xA9\uFE0F",
    'corn': "\uD83C\uDF3D",
    'couch_and_lamp': "\uD83D\uDECB",
    'couple': "\uD83D\uDC6B",
    'couple_with_heart_woman_man': "\uD83D\uDC91",
    'couple_with_heart_man_man': "\uD83D\uDC68&zwj;\u2764\uFE0F&zwj;\uD83D\uDC68",
    'couple_with_heart_woman_woman': "\uD83D\uDC69&zwj;\u2764\uFE0F&zwj;\uD83D\uDC69",
    'couplekiss_man_man': "\uD83D\uDC68&zwj;\u2764\uFE0F&zwj;\uD83D\uDC8B&zwj;\uD83D\uDC68",
    'couplekiss_man_woman': "\uD83D\uDC8F",
    'couplekiss_woman_woman': "\uD83D\uDC69&zwj;\u2764\uFE0F&zwj;\uD83D\uDC8B&zwj;\uD83D\uDC69",
    'cow': "\uD83D\uDC2E",
    'cow2': "\uD83D\uDC04",
    'cowboy_hat_face': "\uD83E\uDD20",
    'crab': "\uD83E\uDD80",
    'crayon': "\uD83D\uDD8D",
    'credit_card': "\uD83D\uDCB3",
    'crescent_moon': "\uD83C\uDF19",
    'cricket': "\uD83C\uDFCF",
    'crocodile': "\uD83D\uDC0A",
    'croissant': "\uD83E\uDD50",
    'crossed_fingers': "\uD83E\uDD1E",
    'crossed_flags': "\uD83C\uDF8C",
    'crossed_swords': "\u2694\uFE0F",
    'crown': "\uD83D\uDC51",
    'cry': "\uD83D\uDE22",
    'crying_cat_face': "\uD83D\uDE3F",
    'crystal_ball': "\uD83D\uDD2E",
    'cucumber': "\uD83E\uDD52",
    'cupid': "\uD83D\uDC98",
    'curly_loop': "\u27B0",
    'currency_exchange': "\uD83D\uDCB1",
    'curry': "\uD83C\uDF5B",
    'custard': "\uD83C\uDF6E",
    'customs': "\uD83D\uDEC3",
    'cyclone': "\uD83C\uDF00",
    'dagger': "\uD83D\uDDE1",
    'dancer': "\uD83D\uDC83",
    'dancing_women': "\uD83D\uDC6F",
    'dancing_men': "\uD83D\uDC6F&zwj;\u2642\uFE0F",
    'dango': "\uD83C\uDF61",
    'dark_sunglasses': "\uD83D\uDD76",
    'dart': "\uD83C\uDFAF",
    'dash': "\uD83D\uDCA8",
    'date': "\uD83D\uDCC5",
    'deciduous_tree': "\uD83C\uDF33",
    'deer': "\uD83E\uDD8C",
    'department_store': "\uD83C\uDFEC",
    'derelict_house': "\uD83C\uDFDA",
    'desert': "\uD83C\uDFDC",
    'desert_island': "\uD83C\uDFDD",
    'desktop_computer': "\uD83D\uDDA5",
    'male_detective': "\uD83D\uDD75\uFE0F",
    'diamond_shape_with_a_dot_inside': "\uD83D\uDCA0",
    'diamonds': "\u2666\uFE0F",
    'disappointed': "\uD83D\uDE1E",
    'disappointed_relieved': "\uD83D\uDE25",
    'dizzy': "\uD83D\uDCAB",
    'dizzy_face': "\uD83D\uDE35",
    'do_not_litter': "\uD83D\uDEAF",
    'dog': "\uD83D\uDC36",
    'dog2': "\uD83D\uDC15",
    'dollar': "\uD83D\uDCB5",
    'dolls': "\uD83C\uDF8E",
    'dolphin': "\uD83D\uDC2C",
    'door': "\uD83D\uDEAA",
    'doughnut': "\uD83C\uDF69",
    'dove': "\uD83D\uDD4A",
    'dragon': "\uD83D\uDC09",
    'dragon_face': "\uD83D\uDC32",
    'dress': "\uD83D\uDC57",
    'dromedary_camel': "\uD83D\uDC2A",
    'drooling_face': "\uD83E\uDD24",
    'droplet': "\uD83D\uDCA7",
    'drum': "\uD83E\uDD41",
    'duck': "\uD83E\uDD86",
    'dvd': "\uD83D\uDCC0",
    'e-mail': "\uD83D\uDCE7",
    'eagle': "\uD83E\uDD85",
    'ear': "\uD83D\uDC42",
    'ear_of_rice': "\uD83C\uDF3E",
    'earth_africa': "\uD83C\uDF0D",
    'earth_americas': "\uD83C\uDF0E",
    'earth_asia': "\uD83C\uDF0F",
    'egg': "\uD83E\uDD5A",
    'eggplant': "\uD83C\uDF46",
    'eight_pointed_black_star': "\u2734\uFE0F",
    'eight_spoked_asterisk': "\u2733\uFE0F",
    'electric_plug': "\uD83D\uDD0C",
    'elephant': "\uD83D\uDC18",
    'email': "\u2709\uFE0F",
    'end': "\uD83D\uDD1A",
    'envelope_with_arrow': "\uD83D\uDCE9",
    'euro': "\uD83D\uDCB6",
    'european_castle': "\uD83C\uDFF0",
    'european_post_office': "\uD83C\uDFE4",
    'evergreen_tree': "\uD83C\uDF32",
    'exclamation': "\u2757\uFE0F",
    'expressionless': "\uD83D\uDE11",
    'eye': "\uD83D\uDC41",
    'eye_speech_bubble': "\uD83D\uDC41&zwj;\uD83D\uDDE8",
    'eyeglasses': "\uD83D\uDC53",
    'eyes': "\uD83D\uDC40",
    'face_with_head_bandage': "\uD83E\uDD15",
    'face_with_thermometer': "\uD83E\uDD12",
    'fist_oncoming': "\uD83D\uDC4A",
    'factory': "\uD83C\uDFED",
    'fallen_leaf': "\uD83C\uDF42",
    'family_man_woman_boy': "\uD83D\uDC6A",
    'family_man_boy': "\uD83D\uDC68&zwj;\uD83D\uDC66",
    'family_man_boy_boy': "\uD83D\uDC68&zwj;\uD83D\uDC66&zwj;\uD83D\uDC66",
    'family_man_girl': "\uD83D\uDC68&zwj;\uD83D\uDC67",
    'family_man_girl_boy': "\uD83D\uDC68&zwj;\uD83D\uDC67&zwj;\uD83D\uDC66",
    'family_man_girl_girl': "\uD83D\uDC68&zwj;\uD83D\uDC67&zwj;\uD83D\uDC67",
    'family_man_man_boy': "\uD83D\uDC68&zwj;\uD83D\uDC68&zwj;\uD83D\uDC66",
    'family_man_man_boy_boy': "\uD83D\uDC68&zwj;\uD83D\uDC68&zwj;\uD83D\uDC66&zwj;\uD83D\uDC66",
    'family_man_man_girl': "\uD83D\uDC68&zwj;\uD83D\uDC68&zwj;\uD83D\uDC67",
    'family_man_man_girl_boy': "\uD83D\uDC68&zwj;\uD83D\uDC68&zwj;\uD83D\uDC67&zwj;\uD83D\uDC66",
    'family_man_man_girl_girl': "\uD83D\uDC68&zwj;\uD83D\uDC68&zwj;\uD83D\uDC67&zwj;\uD83D\uDC67",
    'family_man_woman_boy_boy': "\uD83D\uDC68&zwj;\uD83D\uDC69&zwj;\uD83D\uDC66&zwj;\uD83D\uDC66",
    'family_man_woman_girl': "\uD83D\uDC68&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67",
    'family_man_woman_girl_boy': "\uD83D\uDC68&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC66",
    'family_man_woman_girl_girl': "\uD83D\uDC68&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC67",
    'family_woman_boy': "\uD83D\uDC69&zwj;\uD83D\uDC66",
    'family_woman_boy_boy': "\uD83D\uDC69&zwj;\uD83D\uDC66&zwj;\uD83D\uDC66",
    'family_woman_girl': "\uD83D\uDC69&zwj;\uD83D\uDC67",
    'family_woman_girl_boy': "\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC66",
    'family_woman_girl_girl': "\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC67",
    'family_woman_woman_boy': "\uD83D\uDC69&zwj;\uD83D\uDC69&zwj;\uD83D\uDC66",
    'family_woman_woman_boy_boy': "\uD83D\uDC69&zwj;\uD83D\uDC69&zwj;\uD83D\uDC66&zwj;\uD83D\uDC66",
    'family_woman_woman_girl': "\uD83D\uDC69&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67",
    'family_woman_woman_girl_boy': "\uD83D\uDC69&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC66",
    'family_woman_woman_girl_girl': "\uD83D\uDC69&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC67",
    'fast_forward': "\u23E9",
    'fax': "\uD83D\uDCE0",
    'fearful': "\uD83D\uDE28",
    'feet': "\uD83D\uDC3E",
    'female_detective': "\uD83D\uDD75\uFE0F&zwj;\u2640\uFE0F",
    'ferris_wheel': "\uD83C\uDFA1",
    'ferry': "\u26F4",
    'field_hockey': "\uD83C\uDFD1",
    'file_cabinet': "\uD83D\uDDC4",
    'file_folder': "\uD83D\uDCC1",
    'film_projector': "\uD83D\uDCFD",
    'film_strip': "\uD83C\uDF9E",
    'fire': "\uD83D\uDD25",
    'fire_engine': "\uD83D\uDE92",
    'fireworks': "\uD83C\uDF86",
    'first_quarter_moon': "\uD83C\uDF13",
    'first_quarter_moon_with_face': "\uD83C\uDF1B",
    'fish': "\uD83D\uDC1F",
    'fish_cake': "\uD83C\uDF65",
    'fishing_pole_and_fish': "\uD83C\uDFA3",
    'fist_raised': "\u270A",
    'fist_left': "\uD83E\uDD1B",
    'fist_right': "\uD83E\uDD1C",
    'flags': "\uD83C\uDF8F",
    'flashlight': "\uD83D\uDD26",
    'fleur_de_lis': "\u269C\uFE0F",
    'flight_arrival': "\uD83D\uDEEC",
    'flight_departure': "\uD83D\uDEEB",
    'floppy_disk': "\uD83D\uDCBE",
    'flower_playing_cards': "\uD83C\uDFB4",
    'flushed': "\uD83D\uDE33",
    'fog': "\uD83C\uDF2B",
    'foggy': "\uD83C\uDF01",
    'football': "\uD83C\uDFC8",
    'footprints': "\uD83D\uDC63",
    'fork_and_knife': "\uD83C\uDF74",
    'fountain': "\u26F2\uFE0F",
    'fountain_pen': "\uD83D\uDD8B",
    'four_leaf_clover': "\uD83C\uDF40",
    'fox_face': "\uD83E\uDD8A",
    'framed_picture': "\uD83D\uDDBC",
    'free': "\uD83C\uDD93",
    'fried_egg': "\uD83C\uDF73",
    'fried_shrimp': "\uD83C\uDF64",
    'fries': "\uD83C\uDF5F",
    'frog': "\uD83D\uDC38",
    'frowning': "\uD83D\uDE26",
    'frowning_face': "\u2639\uFE0F",
    'frowning_man': "\uD83D\uDE4D&zwj;\u2642\uFE0F",
    'frowning_woman': "\uD83D\uDE4D",
    'middle_finger': "\uD83D\uDD95",
    'fuelpump': "\u26FD\uFE0F",
    'full_moon': "\uD83C\uDF15",
    'full_moon_with_face': "\uD83C\uDF1D",
    'funeral_urn': "\u26B1\uFE0F",
    'game_die': "\uD83C\uDFB2",
    'gear': "\u2699\uFE0F",
    'gem': "\uD83D\uDC8E",
    'gemini': "\u264A\uFE0F",
    'ghost': "\uD83D\uDC7B",
    'gift': "\uD83C\uDF81",
    'gift_heart': "\uD83D\uDC9D",
    'girl': "\uD83D\uDC67",
    'globe_with_meridians': "\uD83C\uDF10",
    'goal_net': "\uD83E\uDD45",
    'goat': "\uD83D\uDC10",
    'golf': "\u26F3\uFE0F",
    'golfing_man': "\uD83C\uDFCC\uFE0F",
    'golfing_woman': "\uD83C\uDFCC\uFE0F&zwj;\u2640\uFE0F",
    'gorilla': "\uD83E\uDD8D",
    'grapes': "\uD83C\uDF47",
    'green_apple': "\uD83C\uDF4F",
    'green_book': "\uD83D\uDCD7",
    'green_heart': "\uD83D\uDC9A",
    'green_salad': "\uD83E\uDD57",
    'grey_exclamation': "\u2755",
    'grey_question': "\u2754",
    'grimacing': "\uD83D\uDE2C",
    'grin': "\uD83D\uDE01",
    'grinning': "\uD83D\uDE00",
    'guardsman': "\uD83D\uDC82",
    'guardswoman': "\uD83D\uDC82&zwj;\u2640\uFE0F",
    'guitar': "\uD83C\uDFB8",
    'gun': "\uD83D\uDD2B",
    'haircut_woman': "\uD83D\uDC87",
    'haircut_man': "\uD83D\uDC87&zwj;\u2642\uFE0F",
    'hamburger': "\uD83C\uDF54",
    'hammer': "\uD83D\uDD28",
    'hammer_and_pick': "\u2692",
    'hammer_and_wrench': "\uD83D\uDEE0",
    'hamster': "\uD83D\uDC39",
    'hand': "\u270B",
    'handbag': "\uD83D\uDC5C",
    'handshake': "\uD83E\uDD1D",
    'hankey': "\uD83D\uDCA9",
    'hatched_chick': "\uD83D\uDC25",
    'hatching_chick': "\uD83D\uDC23",
    'headphones': "\uD83C\uDFA7",
    'hear_no_evil': "\uD83D\uDE49",
    'heart': "\u2764\uFE0F",
    'heart_decoration': "\uD83D\uDC9F",
    'heart_eyes': "\uD83D\uDE0D",
    'heart_eyes_cat': "\uD83D\uDE3B",
    'heartbeat': "\uD83D\uDC93",
    'heartpulse': "\uD83D\uDC97",
    'hearts': "\u2665\uFE0F",
    'heavy_check_mark': "\u2714\uFE0F",
    'heavy_division_sign': "\u2797",
    'heavy_dollar_sign': "\uD83D\uDCB2",
    'heavy_heart_exclamation': "\u2763\uFE0F",
    'heavy_minus_sign': "\u2796",
    'heavy_multiplication_x': "\u2716\uFE0F",
    'heavy_plus_sign': "\u2795",
    'helicopter': "\uD83D\uDE81",
    'herb': "\uD83C\uDF3F",
    'hibiscus': "\uD83C\uDF3A",
    'high_brightness': "\uD83D\uDD06",
    'high_heel': "\uD83D\uDC60",
    'hocho': "\uD83D\uDD2A",
    'hole': "\uD83D\uDD73",
    'honey_pot': "\uD83C\uDF6F",
    'horse': "\uD83D\uDC34",
    'horse_racing': "\uD83C\uDFC7",
    'hospital': "\uD83C\uDFE5",
    'hot_pepper': "\uD83C\uDF36",
    'hotdog': "\uD83C\uDF2D",
    'hotel': "\uD83C\uDFE8",
    'hotsprings': "\u2668\uFE0F",
    'hourglass': "\u231B\uFE0F",
    'hourglass_flowing_sand': "\u23F3",
    'house': "\uD83C\uDFE0",
    'house_with_garden': "\uD83C\uDFE1",
    'houses': "\uD83C\uDFD8",
    'hugs': "\uD83E\uDD17",
    'hushed': "\uD83D\uDE2F",
    'ice_cream': "\uD83C\uDF68",
    'ice_hockey': "\uD83C\uDFD2",
    'ice_skate': "\u26F8",
    'icecream': "\uD83C\uDF66",
    'id': "\uD83C\uDD94",
    'ideograph_advantage': "\uD83C\uDE50",
    'imp': "\uD83D\uDC7F",
    'inbox_tray': "\uD83D\uDCE5",
    'incoming_envelope': "\uD83D\uDCE8",
    'tipping_hand_woman': "\uD83D\uDC81",
    'information_source': "\u2139\uFE0F",
    'innocent': "\uD83D\uDE07",
    'interrobang': "\u2049\uFE0F",
    'iphone': "\uD83D\uDCF1",
    'izakaya_lantern': "\uD83C\uDFEE",
    'jack_o_lantern': "\uD83C\uDF83",
    'japan': "\uD83D\uDDFE",
    'japanese_castle': "\uD83C\uDFEF",
    'japanese_goblin': "\uD83D\uDC7A",
    'japanese_ogre': "\uD83D\uDC79",
    'jeans': "\uD83D\uDC56",
    'joy': "\uD83D\uDE02",
    'joy_cat': "\uD83D\uDE39",
    'joystick': "\uD83D\uDD79",
    'kaaba': "\uD83D\uDD4B",
    'key': "\uD83D\uDD11",
    'keyboard': "\u2328\uFE0F",
    'keycap_ten': "\uD83D\uDD1F",
    'kick_scooter': "\uD83D\uDEF4",
    'kimono': "\uD83D\uDC58",
    'kiss': "\uD83D\uDC8B",
    'kissing': "\uD83D\uDE17",
    'kissing_cat': "\uD83D\uDE3D",
    'kissing_closed_eyes': "\uD83D\uDE1A",
    'kissing_heart': "\uD83D\uDE18",
    'kissing_smiling_eyes': "\uD83D\uDE19",
    'kiwi_fruit': "\uD83E\uDD5D",
    'koala': "\uD83D\uDC28",
    'koko': "\uD83C\uDE01",
    'label': "\uD83C\uDFF7",
    'large_blue_circle': "\uD83D\uDD35",
    'large_blue_diamond': "\uD83D\uDD37",
    'large_orange_diamond': "\uD83D\uDD36",
    'last_quarter_moon': "\uD83C\uDF17",
    'last_quarter_moon_with_face': "\uD83C\uDF1C",
    'latin_cross': "\u271D\uFE0F",
    'laughing': "\uD83D\uDE06",
    'leaves': "\uD83C\uDF43",
    'ledger': "\uD83D\uDCD2",
    'left_luggage': "\uD83D\uDEC5",
    'left_right_arrow': "\u2194\uFE0F",
    'leftwards_arrow_with_hook': "\u21A9\uFE0F",
    'lemon': "\uD83C\uDF4B",
    'leo': "\u264C\uFE0F",
    'leopard': "\uD83D\uDC06",
    'level_slider': "\uD83C\uDF9A",
    'libra': "\u264E\uFE0F",
    'light_rail': "\uD83D\uDE88",
    'link': "\uD83D\uDD17",
    'lion': "\uD83E\uDD81",
    'lips': "\uD83D\uDC44",
    'lipstick': "\uD83D\uDC84",
    'lizard': "\uD83E\uDD8E",
    'lock': "\uD83D\uDD12",
    'lock_with_ink_pen': "\uD83D\uDD0F",
    'lollipop': "\uD83C\uDF6D",
    'loop': "\u27BF",
    'loud_sound': "\uD83D\uDD0A",
    'loudspeaker': "\uD83D\uDCE2",
    'love_hotel': "\uD83C\uDFE9",
    'love_letter': "\uD83D\uDC8C",
    'low_brightness': "\uD83D\uDD05",
    'lying_face': "\uD83E\uDD25",
    'm': "\u24C2\uFE0F",
    'mag': "\uD83D\uDD0D",
    'mag_right': "\uD83D\uDD0E",
    'mahjong': "\uD83C\uDC04\uFE0F",
    'mailbox': "\uD83D\uDCEB",
    'mailbox_closed': "\uD83D\uDCEA",
    'mailbox_with_mail': "\uD83D\uDCEC",
    'mailbox_with_no_mail': "\uD83D\uDCED",
    'man': "\uD83D\uDC68",
    'man_artist': "\uD83D\uDC68&zwj;\uD83C\uDFA8",
    'man_astronaut': "\uD83D\uDC68&zwj;\uD83D\uDE80",
    'man_cartwheeling': "\uD83E\uDD38&zwj;\u2642\uFE0F",
    'man_cook': "\uD83D\uDC68&zwj;\uD83C\uDF73",
    'man_dancing': "\uD83D\uDD7A",
    'man_facepalming': "\uD83E\uDD26&zwj;\u2642\uFE0F",
    'man_factory_worker': "\uD83D\uDC68&zwj;\uD83C\uDFED",
    'man_farmer': "\uD83D\uDC68&zwj;\uD83C\uDF3E",
    'man_firefighter': "\uD83D\uDC68&zwj;\uD83D\uDE92",
    'man_health_worker': "\uD83D\uDC68&zwj;\u2695\uFE0F",
    'man_in_tuxedo': "\uD83E\uDD35",
    'man_judge': "\uD83D\uDC68&zwj;\u2696\uFE0F",
    'man_juggling': "\uD83E\uDD39&zwj;\u2642\uFE0F",
    'man_mechanic': "\uD83D\uDC68&zwj;\uD83D\uDD27",
    'man_office_worker': "\uD83D\uDC68&zwj;\uD83D\uDCBC",
    'man_pilot': "\uD83D\uDC68&zwj;\u2708\uFE0F",
    'man_playing_handball': "\uD83E\uDD3E&zwj;\u2642\uFE0F",
    'man_playing_water_polo': "\uD83E\uDD3D&zwj;\u2642\uFE0F",
    'man_scientist': "\uD83D\uDC68&zwj;\uD83D\uDD2C",
    'man_shrugging': "\uD83E\uDD37&zwj;\u2642\uFE0F",
    'man_singer': "\uD83D\uDC68&zwj;\uD83C\uDFA4",
    'man_student': "\uD83D\uDC68&zwj;\uD83C\uDF93",
    'man_teacher': "\uD83D\uDC68&zwj;\uD83C\uDFEB",
    'man_technologist': "\uD83D\uDC68&zwj;\uD83D\uDCBB",
    'man_with_gua_pi_mao': "\uD83D\uDC72",
    'man_with_turban': "\uD83D\uDC73",
    'tangerine': "\uD83C\uDF4A",
    'mans_shoe': "\uD83D\uDC5E",
    'mantelpiece_clock': "\uD83D\uDD70",
    'maple_leaf': "\uD83C\uDF41",
    'martial_arts_uniform': "\uD83E\uDD4B",
    'mask': "\uD83D\uDE37",
    'massage_woman': "\uD83D\uDC86",
    'massage_man': "\uD83D\uDC86&zwj;\u2642\uFE0F",
    'meat_on_bone': "\uD83C\uDF56",
    'medal_military': "\uD83C\uDF96",
    'medal_sports': "\uD83C\uDFC5",
    'mega': "\uD83D\uDCE3",
    'melon': "\uD83C\uDF48",
    'memo': "\uD83D\uDCDD",
    'men_wrestling': "\uD83E\uDD3C&zwj;\u2642\uFE0F",
    'menorah': "\uD83D\uDD4E",
    'mens': "\uD83D\uDEB9",
    'metal': "\uD83E\uDD18",
    'metro': "\uD83D\uDE87",
    'microphone': "\uD83C\uDFA4",
    'microscope': "\uD83D\uDD2C",
    'milk_glass': "\uD83E\uDD5B",
    'milky_way': "\uD83C\uDF0C",
    'minibus': "\uD83D\uDE90",
    'minidisc': "\uD83D\uDCBD",
    'mobile_phone_off': "\uD83D\uDCF4",
    'money_mouth_face': "\uD83E\uDD11",
    'money_with_wings': "\uD83D\uDCB8",
    'moneybag': "\uD83D\uDCB0",
    'monkey': "\uD83D\uDC12",
    'monkey_face': "\uD83D\uDC35",
    'monorail': "\uD83D\uDE9D",
    'moon': "\uD83C\uDF14",
    'mortar_board': "\uD83C\uDF93",
    'mosque': "\uD83D\uDD4C",
    'motor_boat': "\uD83D\uDEE5",
    'motor_scooter': "\uD83D\uDEF5",
    'motorcycle': "\uD83C\uDFCD",
    'motorway': "\uD83D\uDEE3",
    'mount_fuji': "\uD83D\uDDFB",
    'mountain': "\u26F0",
    'mountain_biking_man': "\uD83D\uDEB5",
    'mountain_biking_woman': "\uD83D\uDEB5&zwj;\u2640\uFE0F",
    'mountain_cableway': "\uD83D\uDEA0",
    'mountain_railway': "\uD83D\uDE9E",
    'mountain_snow': "\uD83C\uDFD4",
    'mouse': "\uD83D\uDC2D",
    'mouse2': "\uD83D\uDC01",
    'movie_camera': "\uD83C\uDFA5",
    'moyai': "\uD83D\uDDFF",
    'mrs_claus': "\uD83E\uDD36",
    'muscle': "\uD83D\uDCAA",
    'mushroom': "\uD83C\uDF44",
    'musical_keyboard': "\uD83C\uDFB9",
    'musical_note': "\uD83C\uDFB5",
    'musical_score': "\uD83C\uDFBC",
    'mute': "\uD83D\uDD07",
    'nail_care': "\uD83D\uDC85",
    'name_badge': "\uD83D\uDCDB",
    'national_park': "\uD83C\uDFDE",
    'nauseated_face': "\uD83E\uDD22",
    'necktie': "\uD83D\uDC54",
    'negative_squared_cross_mark': "\u274E",
    'nerd_face': "\uD83E\uDD13",
    'neutral_face': "\uD83D\uDE10",
    'new': "\uD83C\uDD95",
    'new_moon': "\uD83C\uDF11",
    'new_moon_with_face': "\uD83C\uDF1A",
    'newspaper': "\uD83D\uDCF0",
    'newspaper_roll': "\uD83D\uDDDE",
    'next_track_button': "\u23ED",
    'ng': "\uD83C\uDD96",
    'no_good_man': "\uD83D\uDE45&zwj;\u2642\uFE0F",
    'no_good_woman': "\uD83D\uDE45",
    'night_with_stars': "\uD83C\uDF03",
    'no_bell': "\uD83D\uDD15",
    'no_bicycles': "\uD83D\uDEB3",
    'no_entry': "\u26D4\uFE0F",
    'no_entry_sign': "\uD83D\uDEAB",
    'no_mobile_phones': "\uD83D\uDCF5",
    'no_mouth': "\uD83D\uDE36",
    'no_pedestrians': "\uD83D\uDEB7",
    'no_smoking': "\uD83D\uDEAD",
    'non-potable_water': "\uD83D\uDEB1",
    'nose': "\uD83D\uDC43",
    'notebook': "\uD83D\uDCD3",
    'notebook_with_decorative_cover': "\uD83D\uDCD4",
    'notes': "\uD83C\uDFB6",
    'nut_and_bolt': "\uD83D\uDD29",
    'o': "\u2B55\uFE0F",
    'o2': "\uD83C\uDD7E\uFE0F",
    'ocean': "\uD83C\uDF0A",
    'octopus': "\uD83D\uDC19",
    'oden': "\uD83C\uDF62",
    'office': "\uD83C\uDFE2",
    'oil_drum': "\uD83D\uDEE2",
    'ok': "\uD83C\uDD97",
    'ok_hand': "\uD83D\uDC4C",
    'ok_man': "\uD83D\uDE46&zwj;\u2642\uFE0F",
    'ok_woman': "\uD83D\uDE46",
    'old_key': "\uD83D\uDDDD",
    'older_man': "\uD83D\uDC74",
    'older_woman': "\uD83D\uDC75",
    'om': "\uD83D\uDD49",
    'on': "\uD83D\uDD1B",
    'oncoming_automobile': "\uD83D\uDE98",
    'oncoming_bus': "\uD83D\uDE8D",
    'oncoming_police_car': "\uD83D\uDE94",
    'oncoming_taxi': "\uD83D\uDE96",
    'open_file_folder': "\uD83D\uDCC2",
    'open_hands': "\uD83D\uDC50",
    'open_mouth': "\uD83D\uDE2E",
    'open_umbrella': "\u2602\uFE0F",
    'ophiuchus': "\u26CE",
    'orange_book': "\uD83D\uDCD9",
    'orthodox_cross': "\u2626\uFE0F",
    'outbox_tray': "\uD83D\uDCE4",
    'owl': "\uD83E\uDD89",
    'ox': "\uD83D\uDC02",
    'package': "\uD83D\uDCE6",
    'page_facing_up': "\uD83D\uDCC4",
    'page_with_curl': "\uD83D\uDCC3",
    'pager': "\uD83D\uDCDF",
    'paintbrush': "\uD83D\uDD8C",
    'palm_tree': "\uD83C\uDF34",
    'pancakes': "\uD83E\uDD5E",
    'panda_face': "\uD83D\uDC3C",
    'paperclip': "\uD83D\uDCCE",
    'paperclips': "\uD83D\uDD87",
    'parasol_on_ground': "\u26F1",
    'parking': "\uD83C\uDD7F\uFE0F",
    'part_alternation_mark': "\u303D\uFE0F",
    'partly_sunny': "\u26C5\uFE0F",
    'passenger_ship': "\uD83D\uDEF3",
    'passport_control': "\uD83D\uDEC2",
    'pause_button': "\u23F8",
    'peace_symbol': "\u262E\uFE0F",
    'peach': "\uD83C\uDF51",
    'peanuts': "\uD83E\uDD5C",
    'pear': "\uD83C\uDF50",
    'pen': "\uD83D\uDD8A",
    'pencil2': "\u270F\uFE0F",
    'penguin': "\uD83D\uDC27",
    'pensive': "\uD83D\uDE14",
    'performing_arts': "\uD83C\uDFAD",
    'persevere': "\uD83D\uDE23",
    'person_fencing': "\uD83E\uDD3A",
    'pouting_woman': "\uD83D\uDE4E",
    'phone': "\u260E\uFE0F",
    'pick': "\u26CF",
    'pig': "\uD83D\uDC37",
    'pig2': "\uD83D\uDC16",
    'pig_nose': "\uD83D\uDC3D",
    'pill': "\uD83D\uDC8A",
    'pineapple': "\uD83C\uDF4D",
    'ping_pong': "\uD83C\uDFD3",
    'pisces': "\u2653\uFE0F",
    'pizza': "\uD83C\uDF55",
    'place_of_worship': "\uD83D\uDED0",
    'plate_with_cutlery': "\uD83C\uDF7D",
    'play_or_pause_button': "\u23EF",
    'point_down': "\uD83D\uDC47",
    'point_left': "\uD83D\uDC48",
    'point_right': "\uD83D\uDC49",
    'point_up': "\u261D\uFE0F",
    'point_up_2': "\uD83D\uDC46",
    'police_car': "\uD83D\uDE93",
    'policewoman': "\uD83D\uDC6E&zwj;\u2640\uFE0F",
    'poodle': "\uD83D\uDC29",
    'popcorn': "\uD83C\uDF7F",
    'post_office': "\uD83C\uDFE3",
    'postal_horn': "\uD83D\uDCEF",
    'postbox': "\uD83D\uDCEE",
    'potable_water': "\uD83D\uDEB0",
    'potato': "\uD83E\uDD54",
    'pouch': "\uD83D\uDC5D",
    'poultry_leg': "\uD83C\uDF57",
    'pound': "\uD83D\uDCB7",
    'rage': "\uD83D\uDE21",
    'pouting_cat': "\uD83D\uDE3E",
    'pouting_man': "\uD83D\uDE4E&zwj;\u2642\uFE0F",
    'pray': "\uD83D\uDE4F",
    'prayer_beads': "\uD83D\uDCFF",
    'pregnant_woman': "\uD83E\uDD30",
    'previous_track_button': "\u23EE",
    'prince': "\uD83E\uDD34",
    'princess': "\uD83D\uDC78",
    'printer': "\uD83D\uDDA8",
    'purple_heart': "\uD83D\uDC9C",
    'purse': "\uD83D\uDC5B",
    'pushpin': "\uD83D\uDCCC",
    'put_litter_in_its_place': "\uD83D\uDEAE",
    'question': "\u2753",
    'rabbit': "\uD83D\uDC30",
    'rabbit2': "\uD83D\uDC07",
    'racehorse': "\uD83D\uDC0E",
    'racing_car': "\uD83C\uDFCE",
    'radio': "\uD83D\uDCFB",
    'radio_button': "\uD83D\uDD18",
    'radioactive': "\u2622\uFE0F",
    'railway_car': "\uD83D\uDE83",
    'railway_track': "\uD83D\uDEE4",
    'rainbow': "\uD83C\uDF08",
    'rainbow_flag': "\uD83C\uDFF3\uFE0F&zwj;\uD83C\uDF08",
    'raised_back_of_hand': "\uD83E\uDD1A",
    'raised_hand_with_fingers_splayed': "\uD83D\uDD90",
    'raised_hands': "\uD83D\uDE4C",
    'raising_hand_woman': "\uD83D\uDE4B",
    'raising_hand_man': "\uD83D\uDE4B&zwj;\u2642\uFE0F",
    'ram': "\uD83D\uDC0F",
    'ramen': "\uD83C\uDF5C",
    'rat': "\uD83D\uDC00",
    'record_button': "\u23FA",
    'recycle': "\u267B\uFE0F",
    'red_circle': "\uD83D\uDD34",
    'registered': "\xAE\uFE0F",
    'relaxed': "\u263A\uFE0F",
    'relieved': "\uD83D\uDE0C",
    'reminder_ribbon': "\uD83C\uDF97",
    'repeat': "\uD83D\uDD01",
    'repeat_one': "\uD83D\uDD02",
    'rescue_worker_helmet': "\u26D1",
    'restroom': "\uD83D\uDEBB",
    'revolving_hearts': "\uD83D\uDC9E",
    'rewind': "\u23EA",
    'rhinoceros': "\uD83E\uDD8F",
    'ribbon': "\uD83C\uDF80",
    'rice': "\uD83C\uDF5A",
    'rice_ball': "\uD83C\uDF59",
    'rice_cracker': "\uD83C\uDF58",
    'rice_scene': "\uD83C\uDF91",
    'right_anger_bubble': "\uD83D\uDDEF",
    'ring': "\uD83D\uDC8D",
    'robot': "\uD83E\uDD16",
    'rocket': "\uD83D\uDE80",
    'rofl': "\uD83E\uDD23",
    'roll_eyes': "\uD83D\uDE44",
    'roller_coaster': "\uD83C\uDFA2",
    'rooster': "\uD83D\uDC13",
    'rose': "\uD83C\uDF39",
    'rosette': "\uD83C\uDFF5",
    'rotating_light': "\uD83D\uDEA8",
    'round_pushpin': "\uD83D\uDCCD",
    'rowing_man': "\uD83D\uDEA3",
    'rowing_woman': "\uD83D\uDEA3&zwj;\u2640\uFE0F",
    'rugby_football': "\uD83C\uDFC9",
    'running_man': "\uD83C\uDFC3",
    'running_shirt_with_sash': "\uD83C\uDFBD",
    'running_woman': "\uD83C\uDFC3&zwj;\u2640\uFE0F",
    'sa': "\uD83C\uDE02\uFE0F",
    'sagittarius': "\u2650\uFE0F",
    'sake': "\uD83C\uDF76",
    'sandal': "\uD83D\uDC61",
    'santa': "\uD83C\uDF85",
    'satellite': "\uD83D\uDCE1",
    'saxophone': "\uD83C\uDFB7",
    'school': "\uD83C\uDFEB",
    'school_satchel': "\uD83C\uDF92",
    'scissors': "\u2702\uFE0F",
    'scorpion': "\uD83E\uDD82",
    'scorpius': "\u264F\uFE0F",
    'scream': "\uD83D\uDE31",
    'scream_cat': "\uD83D\uDE40",
    'scroll': "\uD83D\uDCDC",
    'seat': "\uD83D\uDCBA",
    'secret': "\u3299\uFE0F",
    'see_no_evil': "\uD83D\uDE48",
    'seedling': "\uD83C\uDF31",
    'selfie': "\uD83E\uDD33",
    'shallow_pan_of_food': "\uD83E\uDD58",
    'shamrock': "\u2618\uFE0F",
    'shark': "\uD83E\uDD88",
    'shaved_ice': "\uD83C\uDF67",
    'sheep': "\uD83D\uDC11",
    'shell': "\uD83D\uDC1A",
    'shield': "\uD83D\uDEE1",
    'shinto_shrine': "\u26E9",
    'ship': "\uD83D\uDEA2",
    'shirt': "\uD83D\uDC55",
    'shopping': "\uD83D\uDECD",
    'shopping_cart': "\uD83D\uDED2",
    'shower': "\uD83D\uDEBF",
    'shrimp': "\uD83E\uDD90",
    'signal_strength': "\uD83D\uDCF6",
    'six_pointed_star': "\uD83D\uDD2F",
    'ski': "\uD83C\uDFBF",
    'skier': "\u26F7",
    'skull': "\uD83D\uDC80",
    'skull_and_crossbones': "\u2620\uFE0F",
    'sleeping': "\uD83D\uDE34",
    'sleeping_bed': "\uD83D\uDECC",
    'sleepy': "\uD83D\uDE2A",
    'slightly_frowning_face': "\uD83D\uDE41",
    'slightly_smiling_face': "\uD83D\uDE42",
    'slot_machine': "\uD83C\uDFB0",
    'small_airplane': "\uD83D\uDEE9",
    'small_blue_diamond': "\uD83D\uDD39",
    'small_orange_diamond': "\uD83D\uDD38",
    'small_red_triangle': "\uD83D\uDD3A",
    'small_red_triangle_down': "\uD83D\uDD3B",
    'smile': "\uD83D\uDE04",
    'smile_cat': "\uD83D\uDE38",
    'smiley': "\uD83D\uDE03",
    'smiley_cat': "\uD83D\uDE3A",
    'smiling_imp': "\uD83D\uDE08",
    'smirk': "\uD83D\uDE0F",
    'smirk_cat': "\uD83D\uDE3C",
    'smoking': "\uD83D\uDEAC",
    'snail': "\uD83D\uDC0C",
    'snake': "\uD83D\uDC0D",
    'sneezing_face': "\uD83E\uDD27",
    'snowboarder': "\uD83C\uDFC2",
    'snowflake': "\u2744\uFE0F",
    'snowman': "\u26C4\uFE0F",
    'snowman_with_snow': "\u2603\uFE0F",
    'sob': "\uD83D\uDE2D",
    'soccer': "\u26BD\uFE0F",
    'soon': "\uD83D\uDD1C",
    'sos': "\uD83C\uDD98",
    'sound': "\uD83D\uDD09",
    'space_invader': "\uD83D\uDC7E",
    'spades': "\u2660\uFE0F",
    'spaghetti': "\uD83C\uDF5D",
    'sparkle': "\u2747\uFE0F",
    'sparkler': "\uD83C\uDF87",
    'sparkles': "\u2728",
    'sparkling_heart': "\uD83D\uDC96",
    'speak_no_evil': "\uD83D\uDE4A",
    'speaker': "\uD83D\uDD08",
    'speaking_head': "\uD83D\uDDE3",
    'speech_balloon': "\uD83D\uDCAC",
    'speedboat': "\uD83D\uDEA4",
    'spider': "\uD83D\uDD77",
    'spider_web': "\uD83D\uDD78",
    'spiral_calendar': "\uD83D\uDDD3",
    'spiral_notepad': "\uD83D\uDDD2",
    'spoon': "\uD83E\uDD44",
    'squid': "\uD83E\uDD91",
    'stadium': "\uD83C\uDFDF",
    'star': "\u2B50\uFE0F",
    'star2': "\uD83C\uDF1F",
    'star_and_crescent': "\u262A\uFE0F",
    'star_of_david': "\u2721\uFE0F",
    'stars': "\uD83C\uDF20",
    'station': "\uD83D\uDE89",
    'statue_of_liberty': "\uD83D\uDDFD",
    'steam_locomotive': "\uD83D\uDE82",
    'stew': "\uD83C\uDF72",
    'stop_button': "\u23F9",
    'stop_sign': "\uD83D\uDED1",
    'stopwatch': "\u23F1",
    'straight_ruler': "\uD83D\uDCCF",
    'strawberry': "\uD83C\uDF53",
    'stuck_out_tongue': "\uD83D\uDE1B",
    'stuck_out_tongue_closed_eyes': "\uD83D\uDE1D",
    'stuck_out_tongue_winking_eye': "\uD83D\uDE1C",
    'studio_microphone': "\uD83C\uDF99",
    'stuffed_flatbread': "\uD83E\uDD59",
    'sun_behind_large_cloud': "\uD83C\uDF25",
    'sun_behind_rain_cloud': "\uD83C\uDF26",
    'sun_behind_small_cloud': "\uD83C\uDF24",
    'sun_with_face': "\uD83C\uDF1E",
    'sunflower': "\uD83C\uDF3B",
    'sunglasses': "\uD83D\uDE0E",
    'sunny': "\u2600\uFE0F",
    'sunrise': "\uD83C\uDF05",
    'sunrise_over_mountains': "\uD83C\uDF04",
    'surfing_man': "\uD83C\uDFC4",
    'surfing_woman': "\uD83C\uDFC4&zwj;\u2640\uFE0F",
    'sushi': "\uD83C\uDF63",
    'suspension_railway': "\uD83D\uDE9F",
    'sweat': "\uD83D\uDE13",
    'sweat_drops': "\uD83D\uDCA6",
    'sweat_smile': "\uD83D\uDE05",
    'sweet_potato': "\uD83C\uDF60",
    'swimming_man': "\uD83C\uDFCA",
    'swimming_woman': "\uD83C\uDFCA&zwj;\u2640\uFE0F",
    'symbols': "\uD83D\uDD23",
    'synagogue': "\uD83D\uDD4D",
    'syringe': "\uD83D\uDC89",
    'taco': "\uD83C\uDF2E",
    'tada': "\uD83C\uDF89",
    'tanabata_tree': "\uD83C\uDF8B",
    'taurus': "\u2649\uFE0F",
    'taxi': "\uD83D\uDE95",
    'tea': "\uD83C\uDF75",
    'telephone_receiver': "\uD83D\uDCDE",
    'telescope': "\uD83D\uDD2D",
    'tennis': "\uD83C\uDFBE",
    'tent': "\u26FA\uFE0F",
    'thermometer': "\uD83C\uDF21",
    'thinking': "\uD83E\uDD14",
    'thought_balloon': "\uD83D\uDCAD",
    'ticket': "\uD83C\uDFAB",
    'tickets': "\uD83C\uDF9F",
    'tiger': "\uD83D\uDC2F",
    'tiger2': "\uD83D\uDC05",
    'timer_clock': "\u23F2",
    'tipping_hand_man': "\uD83D\uDC81&zwj;\u2642\uFE0F",
    'tired_face': "\uD83D\uDE2B",
    'tm': "\u2122\uFE0F",
    'toilet': "\uD83D\uDEBD",
    'tokyo_tower': "\uD83D\uDDFC",
    'tomato': "\uD83C\uDF45",
    'tongue': "\uD83D\uDC45",
    'top': "\uD83D\uDD1D",
    'tophat': "\uD83C\uDFA9",
    'tornado': "\uD83C\uDF2A",
    'trackball': "\uD83D\uDDB2",
    'tractor': "\uD83D\uDE9C",
    'traffic_light': "\uD83D\uDEA5",
    'train': "\uD83D\uDE8B",
    'train2': "\uD83D\uDE86",
    'tram': "\uD83D\uDE8A",
    'triangular_flag_on_post': "\uD83D\uDEA9",
    'triangular_ruler': "\uD83D\uDCD0",
    'trident': "\uD83D\uDD31",
    'triumph': "\uD83D\uDE24",
    'trolleybus': "\uD83D\uDE8E",
    'trophy': "\uD83C\uDFC6",
    'tropical_drink': "\uD83C\uDF79",
    'tropical_fish': "\uD83D\uDC20",
    'truck': "\uD83D\uDE9A",
    'trumpet': "\uD83C\uDFBA",
    'tulip': "\uD83C\uDF37",
    'tumbler_glass': "\uD83E\uDD43",
    'turkey': "\uD83E\uDD83",
    'turtle': "\uD83D\uDC22",
    'tv': "\uD83D\uDCFA",
    'twisted_rightwards_arrows': "\uD83D\uDD00",
    'two_hearts': "\uD83D\uDC95",
    'two_men_holding_hands': "\uD83D\uDC6C",
    'two_women_holding_hands': "\uD83D\uDC6D",
    'u5272': "\uD83C\uDE39",
    'u5408': "\uD83C\uDE34",
    'u55b6': "\uD83C\uDE3A",
    'u6307': "\uD83C\uDE2F\uFE0F",
    'u6708': "\uD83C\uDE37\uFE0F",
    'u6709': "\uD83C\uDE36",
    'u6e80': "\uD83C\uDE35",
    'u7121': "\uD83C\uDE1A\uFE0F",
    'u7533': "\uD83C\uDE38",
    'u7981': "\uD83C\uDE32",
    'u7a7a': "\uD83C\uDE33",
    'umbrella': "\u2614\uFE0F",
    'unamused': "\uD83D\uDE12",
    'underage': "\uD83D\uDD1E",
    'unicorn': "\uD83E\uDD84",
    'unlock': "\uD83D\uDD13",
    'up': "\uD83C\uDD99",
    'upside_down_face': "\uD83D\uDE43",
    'v': "\u270C\uFE0F",
    'vertical_traffic_light': "\uD83D\uDEA6",
    'vhs': "\uD83D\uDCFC",
    'vibration_mode': "\uD83D\uDCF3",
    'video_camera': "\uD83D\uDCF9",
    'video_game': "\uD83C\uDFAE",
    'violin': "\uD83C\uDFBB",
    'virgo': "\u264D\uFE0F",
    'volcano': "\uD83C\uDF0B",
    'volleyball': "\uD83C\uDFD0",
    'vs': "\uD83C\uDD9A",
    'vulcan_salute': "\uD83D\uDD96",
    'walking_man': "\uD83D\uDEB6",
    'walking_woman': "\uD83D\uDEB6&zwj;\u2640\uFE0F",
    'waning_crescent_moon': "\uD83C\uDF18",
    'waning_gibbous_moon': "\uD83C\uDF16",
    'warning': "\u26A0\uFE0F",
    'wastebasket': "\uD83D\uDDD1",
    'watch': "\u231A\uFE0F",
    'water_buffalo': "\uD83D\uDC03",
    'watermelon': "\uD83C\uDF49",
    'wave': "\uD83D\uDC4B",
    'wavy_dash': "\u3030\uFE0F",
    'waxing_crescent_moon': "\uD83C\uDF12",
    'wc': "\uD83D\uDEBE",
    'weary': "\uD83D\uDE29",
    'wedding': "\uD83D\uDC92",
    'weight_lifting_man': "\uD83C\uDFCB\uFE0F",
    'weight_lifting_woman': "\uD83C\uDFCB\uFE0F&zwj;\u2640\uFE0F",
    'whale': "\uD83D\uDC33",
    'whale2': "\uD83D\uDC0B",
    'wheel_of_dharma': "\u2638\uFE0F",
    'wheelchair': "\u267F\uFE0F",
    'white_check_mark': "\u2705",
    'white_circle': "\u26AA\uFE0F",
    'white_flag': "\uD83C\uDFF3\uFE0F",
    'white_flower': "\uD83D\uDCAE",
    'white_large_square': "\u2B1C\uFE0F",
    'white_medium_small_square': "\u25FD\uFE0F",
    'white_medium_square': "\u25FB\uFE0F",
    'white_small_square': "\u25AB\uFE0F",
    'white_square_button': "\uD83D\uDD33",
    'wilted_flower': "\uD83E\uDD40",
    'wind_chime': "\uD83C\uDF90",
    'wind_face': "\uD83C\uDF2C",
    'wine_glass': "\uD83C\uDF77",
    'wink': "\uD83D\uDE09",
    'wolf': "\uD83D\uDC3A",
    'woman': "\uD83D\uDC69",
    'woman_artist': "\uD83D\uDC69&zwj;\uD83C\uDFA8",
    'woman_astronaut': "\uD83D\uDC69&zwj;\uD83D\uDE80",
    'woman_cartwheeling': "\uD83E\uDD38&zwj;\u2640\uFE0F",
    'woman_cook': "\uD83D\uDC69&zwj;\uD83C\uDF73",
    'woman_facepalming': "\uD83E\uDD26&zwj;\u2640\uFE0F",
    'woman_factory_worker': "\uD83D\uDC69&zwj;\uD83C\uDFED",
    'woman_farmer': "\uD83D\uDC69&zwj;\uD83C\uDF3E",
    'woman_firefighter': "\uD83D\uDC69&zwj;\uD83D\uDE92",
    'woman_health_worker': "\uD83D\uDC69&zwj;\u2695\uFE0F",
    'woman_judge': "\uD83D\uDC69&zwj;\u2696\uFE0F",
    'woman_juggling': "\uD83E\uDD39&zwj;\u2640\uFE0F",
    'woman_mechanic': "\uD83D\uDC69&zwj;\uD83D\uDD27",
    'woman_office_worker': "\uD83D\uDC69&zwj;\uD83D\uDCBC",
    'woman_pilot': "\uD83D\uDC69&zwj;\u2708\uFE0F",
    'woman_playing_handball': "\uD83E\uDD3E&zwj;\u2640\uFE0F",
    'woman_playing_water_polo': "\uD83E\uDD3D&zwj;\u2640\uFE0F",
    'woman_scientist': "\uD83D\uDC69&zwj;\uD83D\uDD2C",
    'woman_shrugging': "\uD83E\uDD37&zwj;\u2640\uFE0F",
    'woman_singer': "\uD83D\uDC69&zwj;\uD83C\uDFA4",
    'woman_student': "\uD83D\uDC69&zwj;\uD83C\uDF93",
    'woman_teacher': "\uD83D\uDC69&zwj;\uD83C\uDFEB",
    'woman_technologist': "\uD83D\uDC69&zwj;\uD83D\uDCBB",
    'woman_with_turban': "\uD83D\uDC73&zwj;\u2640\uFE0F",
    'womans_clothes': "\uD83D\uDC5A",
    'womans_hat': "\uD83D\uDC52",
    'women_wrestling': "\uD83E\uDD3C&zwj;\u2640\uFE0F",
    'womens': "\uD83D\uDEBA",
    'world_map': "\uD83D\uDDFA",
    'worried': "\uD83D\uDE1F",
    'wrench': "\uD83D\uDD27",
    'writing_hand': "\u270D\uFE0F",
    'x': "\u274C",
    'yellow_heart': "\uD83D\uDC9B",
    'yen': "\uD83D\uDCB4",
    'yin_yang': "\u262F\uFE0F",
    'yum': "\uD83D\uDE0B",
    'zap': "\u26A1\uFE0F",
    'zipper_mouth_face': "\uD83E\uDD10",
    'zzz': "\uD83D\uDCA4",
    /* special emojis :P */
    'octocat': '<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',
    'showdown': '<span style="font-family: \'Anonymous Pro\', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;">S</span>'
  };

  /**
   * Created by Estevao on 31-05-2015.
   */

  /**
   * Showdown Converter class
   * @class
   * @param {object} [converterOptions]
   * @returns {Converter}
   */
  showdown.Converter = function (converterOptions) {
    'use strict';

    var
      /**
       * Options used by this converter
       * @private
       * @type {{}}
       */
      options = {},
      /**
       * Language extensions used by this converter
       * @private
       * @type {Array}
       */
      langExtensions = [],
      /**
       * Output modifiers extensions used by this converter
       * @private
       * @type {Array}
       */
      outputModifiers = [],
      /**
       * Event listeners
       * @private
       * @type {{}}
       */
      listeners = {},
      /**
       * The flavor set in this converter
       */
      setConvFlavor = setFlavor,
      /**
       * Metadata of the document
       * @type {{parsed: {}, raw: string, format: string}}
       */
      metadata = {
        parsed: {},
        raw: '',
        format: ''
      };
    _constructor();

    /**
     * Converter constructor
     * @private
     */
    function _constructor() {
      converterOptions = converterOptions || {};
      for (var gOpt in globalOptions) {
        if (globalOptions.hasOwnProperty(gOpt)) {
          options[gOpt] = globalOptions[gOpt];
        }
      }

      // Merge options
      if (_typeof(converterOptions) === 'object') {
        for (var opt in converterOptions) {
          if (converterOptions.hasOwnProperty(opt)) {
            options[opt] = converterOptions[opt];
          }
        }
      } else {
        throw Error('Converter expects the passed parameter to be an object, but ' + _typeof(converterOptions) + ' was passed instead.');
      }
      if (options.extensions) {
        showdown.helper.forEach(options.extensions, _parseExtension);
      }
    }

    /**
     * Parse extension
     * @param {*} ext
     * @param {string} [name='']
     * @private
     */
    function _parseExtension(ext, name) {
      name = name || null;
      // If it's a string, the extension was previously loaded
      if (showdown.helper.isString(ext)) {
        ext = showdown.helper.stdExtName(ext);
        name = ext;

        // LEGACY_SUPPORT CODE
        if (showdown.extensions[ext]) {
          console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' + 'Please inform the developer that the extension should be updated!');
          legacyExtensionLoading(showdown.extensions[ext], ext);
          return;
          // END LEGACY SUPPORT CODE
        } else if (!showdown.helper.isUndefined(extensions[ext])) {
          ext = extensions[ext];
        } else {
          throw Error('Extension "' + ext + '" could not be loaded. It was either not found or is not a valid extension.');
        }
      }
      if (typeof ext === 'function') {
        ext = ext();
      }
      if (!showdown.helper.isArray(ext)) {
        ext = [ext];
      }
      var validExt = validate(ext, name);
      if (!validExt.valid) {
        throw Error(validExt.error);
      }
      for (var i = 0; i < ext.length; ++i) {
        switch (ext[i].type) {
          case 'lang':
            langExtensions.push(ext[i]);
            break;
          case 'output':
            outputModifiers.push(ext[i]);
            break;
        }
        if (ext[i].hasOwnProperty('listeners')) {
          for (var ln in ext[i].listeners) {
            if (ext[i].listeners.hasOwnProperty(ln)) {
              listen(ln, ext[i].listeners[ln]);
            }
          }
        }
      }
    }

    /**
     * LEGACY_SUPPORT
     * @param {*} ext
     * @param {string} name
     */
    function legacyExtensionLoading(ext, name) {
      if (typeof ext === 'function') {
        ext = ext(new showdown.Converter());
      }
      if (!showdown.helper.isArray(ext)) {
        ext = [ext];
      }
      var valid = validate(ext, name);
      if (!valid.valid) {
        throw Error(valid.error);
      }
      for (var i = 0; i < ext.length; ++i) {
        switch (ext[i].type) {
          case 'lang':
            langExtensions.push(ext[i]);
            break;
          case 'output':
            outputModifiers.push(ext[i]);
            break;
          default:
            // should never reach here
            throw Error('Extension loader error: Type unrecognized!!!');
        }
      }
    }

    /**
     * Listen to an event
     * @param {string} name
     * @param {function} callback
     */
    function listen(name, callback) {
      if (!showdown.helper.isString(name)) {
        throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + _typeof(name) + ' given');
      }
      if (typeof callback !== 'function') {
        throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + _typeof(callback) + ' given');
      }
      if (!listeners.hasOwnProperty(name)) {
        listeners[name] = [];
      }
      listeners[name].push(callback);
    }
    function rTrimInputText(text) {
      var rsp = text.match(/^\s*/)[0].length,
        rgx = new RegExp('^\\s{0,' + rsp + '}', 'gm');
      return text.replace(rgx, '');
    }

    /**
     * Dispatch an event
     * @private
     * @param {string} evtName Event name
     * @param {string} text Text
     * @param {{}} options Converter Options
     * @param {{}} globals
     * @returns {string}
     */
    this._dispatch = function dispatch(evtName, text, options, globals) {
      if (listeners.hasOwnProperty(evtName)) {
        for (var ei = 0; ei < listeners[evtName].length; ++ei) {
          var nText = listeners[evtName][ei](evtName, text, this, options, globals);
          if (nText && typeof nText !== 'undefined') {
            text = nText;
          }
        }
      }
      return text;
    };

    /**
     * Listen to an event
     * @param {string} name
     * @param {function} callback
     * @returns {showdown.Converter}
     */
    this.listen = function (name, callback) {
      listen(name, callback);
      return this;
    };

    /**
     * Converts a markdown string into HTML
     * @param {string} text
     * @returns {*}
     */
    this.makeHtml = function (text) {
      //check if text is not falsy
      if (!text) {
        return text;
      }
      var globals = {
        gHtmlBlocks: [],
        gHtmlMdBlocks: [],
        gHtmlSpans: [],
        gUrls: {},
        gTitles: {},
        gDimensions: {},
        gListLevel: 0,
        hashLinkCounts: {},
        langExtensions: langExtensions,
        outputModifiers: outputModifiers,
        converter: this,
        ghCodeBlocks: [],
        metadata: {
          parsed: {},
          raw: '',
          format: ''
        }
      };

      // This lets us use ¨ trema as an escape char to avoid md5 hashes
      // The choice of character is arbitrary; anything that isn't
      // magic in Markdown will work.
      text = text.replace(/¨/g, '¨T');

      // Replace $ with ¨D
      // RegExp interprets $ as a special character
      // when it's in a replacement string
      text = text.replace(/\$/g, '¨D');

      // Standardize line endings
      text = text.replace(/\r\n/g, '\n'); // DOS to Unix
      text = text.replace(/\r/g, '\n'); // Mac to Unix

      // Stardardize line spaces
      text = text.replace(/\u00A0/g, '&nbsp;');
      if (options.smartIndentationFix) {
        text = rTrimInputText(text);
      }

      // Make sure text begins and ends with a couple of newlines:
      text = '\n\n' + text + '\n\n';

      // detab
      text = showdown.subParser('detab')(text, options, globals);

      /**
       * Strip any lines consisting only of spaces and tabs.
       * This makes subsequent regexs easier to write, because we can
       * match consecutive blank lines with /\n+/ instead of something
       * contorted like /[ \t]*\n+/
       */
      text = text.replace(/^[ \t]+$/mg, '');

      //run languageExtensions
      showdown.helper.forEach(langExtensions, function (ext) {
        text = showdown.subParser('runExtension')(ext, text, options, globals);
      });

      // run the sub parsers
      text = showdown.subParser('metadata')(text, options, globals);
      text = showdown.subParser('hashPreCodeTags')(text, options, globals);
      text = showdown.subParser('githubCodeBlocks')(text, options, globals);
      text = showdown.subParser('hashHTMLBlocks')(text, options, globals);
      text = showdown.subParser('hashCodeTags')(text, options, globals);
      text = showdown.subParser('stripLinkDefinitions')(text, options, globals);
      text = showdown.subParser('blockGamut')(text, options, globals);
      text = showdown.subParser('unhashHTMLSpans')(text, options, globals);
      text = showdown.subParser('unescapeSpecialChars')(text, options, globals);

      // attacklab: Restore dollar signs
      text = text.replace(/¨D/g, '$$');

      // attacklab: Restore tremas
      text = text.replace(/¨T/g, '¨');

      // render a complete html document instead of a partial if the option is enabled
      text = showdown.subParser('completeHTMLDocument')(text, options, globals);

      // Run output modifiers
      showdown.helper.forEach(outputModifiers, function (ext) {
        text = showdown.subParser('runExtension')(ext, text, options, globals);
      });

      // update metadata
      metadata = globals.metadata;
      return text;
    };

    /**
     * Converts an HTML string into a markdown string
     * @param src
     * @param [HTMLParser] A WHATWG DOM and HTML parser, such as JSDOM. If none is supplied, window.document will be used.
     * @returns {string}
     */
    this.makeMarkdown = this.makeMd = function (src, HTMLParser) {
      // replace \r\n with \n
      src = src.replace(/\r\n/g, '\n');
      src = src.replace(/\r/g, '\n'); // old macs

      // due to an edge case, we need to find this: > <
      // to prevent removing of non silent white spaces
      // ex: <em>this is</em> <strong>sparta</strong>
      src = src.replace(/>[ \t]+</, '>¨NBSP;<');
      if (!HTMLParser) {
        if (window && window.document) {
          HTMLParser = window.document;
        } else {
          throw new Error('HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM');
        }
      }
      var doc = HTMLParser.createElement('div');
      doc.innerHTML = src;
      var globals = {
        preList: substitutePreCodeTags(doc)
      };

      // remove all newlines and collapse spaces
      clean(doc);

      // some stuff, like accidental reference links must now be escaped
      // TODO
      // doc.innerHTML = doc.innerHTML.replace(/\[[\S\t ]]/);

      var nodes = doc.childNodes,
        mdDoc = '';
      for (var i = 0; i < nodes.length; i++) {
        mdDoc += showdown.subParser('makeMarkdown.node')(nodes[i], globals);
      }
      function clean(node) {
        for (var n = 0; n < node.childNodes.length; ++n) {
          var child = node.childNodes[n];
          if (child.nodeType === 3) {
            if (!/\S/.test(child.nodeValue)) {
              node.removeChild(child);
              --n;
            } else {
              child.nodeValue = child.nodeValue.split('\n').join(' ');
              child.nodeValue = child.nodeValue.replace(/(\s)+/g, '$1');
            }
          } else if (child.nodeType === 1) {
            clean(child);
          }
        }
      }

      // find all pre tags and replace contents with placeholder
      // we need this so that we can remove all indentation from html
      // to ease up parsing
      function substitutePreCodeTags(doc) {
        var pres = doc.querySelectorAll('pre'),
          presPH = [];
        for (var i = 0; i < pres.length; ++i) {
          if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') {
            var content = pres[i].firstChild.innerHTML.trim(),
              language = pres[i].firstChild.getAttribute('data-language') || '';

            // if data-language attribute is not defined, then we look for class language-*
            if (language === '') {
              var classes = pres[i].firstChild.className.split(' ');
              for (var c = 0; c < classes.length; ++c) {
                var matches = classes[c].match(/^language-(.+)$/);
                if (matches !== null) {
                  language = matches[1];
                  break;
                }
              }
            }

            // unescape html entities in content
            content = showdown.helper.unescapeHTMLEntities(content);
            presPH.push(content);
            pres[i].outerHTML = '<precode language="' + language + '" precodenum="' + i.toString() + '"></precode>';
          } else {
            presPH.push(pres[i].innerHTML);
            pres[i].innerHTML = '';
            pres[i].setAttribute('prenum', i.toString());
          }
        }
        return presPH;
      }
      return mdDoc;
    };

    /**
     * Set an option of this Converter instance
     * @param {string} key
     * @param {*} value
     */
    this.setOption = function (key, value) {
      options[key] = value;
    };

    /**
     * Get the option of this Converter instance
     * @param {string} key
     * @returns {*}
     */
    this.getOption = function (key) {
      return options[key];
    };

    /**
     * Get the options of this Converter instance
     * @returns {{}}
     */
    this.getOptions = function () {
      return options;
    };

    /**
     * Add extension to THIS converter
     * @param {{}} extension
     * @param {string} [name=null]
     */
    this.addExtension = function (extension, name) {
      name = name || null;
      _parseExtension(extension, name);
    };

    /**
     * Use a global registered extension with THIS converter
     * @param {string} extensionName Name of the previously registered extension
     */
    this.useExtension = function (extensionName) {
      _parseExtension(extensionName);
    };

    /**
     * Set the flavor THIS converter should use
     * @param {string} name
     */
    this.setFlavor = function (name) {
      if (!flavor.hasOwnProperty(name)) {
        throw Error(name + ' flavor was not found');
      }
      var preset = flavor[name];
      setConvFlavor = name;
      for (var option in preset) {
        if (preset.hasOwnProperty(option)) {
          options[option] = preset[option];
        }
      }
    };

    /**
     * Get the currently set flavor of this converter
     * @returns {string}
     */
    this.getFlavor = function () {
      return setConvFlavor;
    };

    /**
     * Remove an extension from THIS converter.
     * Note: This is a costly operation. It's better to initialize a new converter
     * and specify the extensions you wish to use
     * @param {Array} extension
     */
    this.removeExtension = function (extension) {
      if (!showdown.helper.isArray(extension)) {
        extension = [extension];
      }
      for (var a = 0; a < extension.length; ++a) {
        var ext = extension[a];
        for (var i = 0; i < langExtensions.length; ++i) {
          if (langExtensions[i] === ext) {
            langExtensions[i].splice(i, 1);
          }
        }
        for (var ii = 0; ii < outputModifiers.length; ++i) {
          if (outputModifiers[ii] === ext) {
            outputModifiers[ii].splice(i, 1);
          }
        }
      }
    };

    /**
     * Get all extension of THIS converter
     * @returns {{language: Array, output: Array}}
     */
    this.getAllExtensions = function () {
      return {
        language: langExtensions,
        output: outputModifiers
      };
    };

    /**
     * Get the metadata of the previously parsed document
     * @param raw
     * @returns {string|{}}
     */
    this.getMetadata = function (raw) {
      if (raw) {
        return metadata.raw;
      } else {
        return metadata.parsed;
      }
    };

    /**
     * Get the metadata format of the previously parsed document
     * @returns {string}
     */
    this.getMetadataFormat = function () {
      return metadata.format;
    };

    /**
     * Private: set a single key, value metadata pair
     * @param {string} key
     * @param {string} value
     */
    this._setMetadataPair = function (key, value) {
      metadata.parsed[key] = value;
    };

    /**
     * Private: set metadata format
     * @param {string} format
     */
    this._setMetadataFormat = function (format) {
      metadata.format = format;
    };

    /**
     * Private: set metadata raw text
     * @param {string} raw
     */
    this._setMetadataRaw = function (raw) {
      metadata.raw = raw;
    };
  };

  /**
   * Turn Markdown link shortcuts into XHTML <a> tags.
   */
  showdown.subParser('anchors', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('anchors.before', text, options, globals);
    var writeAnchorTag = function writeAnchorTag(wholeMatch, linkText, linkId, url, m5, m6, title) {
      if (showdown.helper.isUndefined(title)) {
        title = '';
      }
      linkId = linkId.toLowerCase();

      // Special case for explicit empty url
      if (wholeMatch.search(/\(<?\s*>? ?(['"].*['"])?\)$/m) > -1) {
        url = '';
      } else if (!url) {
        if (!linkId) {
          // lower-case and turn embedded newlines into spaces
          linkId = linkText.toLowerCase().replace(/ ?\n/g, ' ');
        }
        url = '#' + linkId;
        if (!showdown.helper.isUndefined(globals.gUrls[linkId])) {
          url = globals.gUrls[linkId];
          if (!showdown.helper.isUndefined(globals.gTitles[linkId])) {
            title = globals.gTitles[linkId];
          }
        } else {
          return wholeMatch;
        }
      }

      //url = showdown.helper.escapeCharacters(url, '*_', false); // replaced line to improve performance
      url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
      var result = '<a href="' + url + '"';
      if (title !== '' && title !== null) {
        title = title.replace(/"/g, '&quot;');
        //title = showdown.helper.escapeCharacters(title, '*_', false); // replaced line to improve performance
        title = title.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
        result += ' title="' + title + '"';
      }

      // optionLinksInNewWindow only applies
      // to external links. Hash links (#) open in same page
      if (options.openLinksInNewWindow && !/^#/.test(url)) {
        // escaped _
        result += ' rel="noopener noreferrer" target="¨E95Eblank"';
      }
      result += '>' + linkText + '</a>';
      return result;
    };

    // First, handle reference-style links: [link text] [id]
    text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g, writeAnchorTag);

    // Next, inline-style links: [link text](url "optional title")
    // cases with crazy urls like ./image/cat1).png
    text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g, writeAnchorTag);

    // normal cases
    text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g, writeAnchorTag);

    // handle reference-style shortcuts: [link text]
    // These must come last in case you've also got [link test][1]
    // or [link test](/foo)
    text = text.replace(/\[([^\[\]]+)]()()()()()/g, writeAnchorTag);

    // Lastly handle GithubMentions if option is enabled
    if (options.ghMentions) {
      text = text.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi, function (wm, st, escape, mentions, username) {
        if (escape === '\\') {
          return st + mentions;
        }

        //check if options.ghMentionsLink is a string
        if (!showdown.helper.isString(options.ghMentionsLink)) {
          throw new Error('ghMentionsLink option must be a string');
        }
        var lnk = options.ghMentionsLink.replace(/\{u}/g, username),
          target = '';
        if (options.openLinksInNewWindow) {
          target = ' rel="noopener noreferrer" target="¨E95Eblank"';
        }
        return st + '<a href="' + lnk + '"' + target + '>' + mentions + '</a>';
      });
    }
    text = globals.converter._dispatch('anchors.after', text, options, globals);
    return text;
  });

  // url allowed chars [a-z\d_.~:/?#[]@!$&'()*+,;=-]

  var simpleURLRegex = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,
    simpleURLRegex2 = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,
    delimUrlRegex = /()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,
    simpleMailRegex = /(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,
    delimMailRegex = /<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,
    replaceLink = function replaceLink(options) {
      'use strict';

      return function (wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) {
        link = link.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
        var lnkTxt = link,
          append = '',
          target = '',
          lmc = leadingMagicChars || '',
          tmc = trailingMagicChars || '';
        if (/^www\./i.test(link)) {
          link = link.replace(/^www\./i, 'http://www.');
        }
        if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) {
          append = trailingPunctuation;
        }
        if (options.openLinksInNewWindow) {
          target = ' rel="noopener noreferrer" target="¨E95Eblank"';
        }
        return lmc + '<a href="' + link + '"' + target + '>' + lnkTxt + '</a>' + append + tmc;
      };
    },
    replaceMail = function replaceMail(options, globals) {
      'use strict';

      return function (wholeMatch, b, mail) {
        var href = 'mailto:';
        b = b || '';
        mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals);
        if (options.encodeEmails) {
          href = showdown.helper.encodeEmailAddress(href + mail);
          mail = showdown.helper.encodeEmailAddress(mail);
        } else {
          href = href + mail;
        }
        return b + '<a href="' + href + '">' + mail + '</a>';
      };
    };
  showdown.subParser('autoLinks', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('autoLinks.before', text, options, globals);
    text = text.replace(delimUrlRegex, replaceLink(options));
    text = text.replace(delimMailRegex, replaceMail(options, globals));
    text = globals.converter._dispatch('autoLinks.after', text, options, globals);
    return text;
  });
  showdown.subParser('simplifiedAutoLinks', function (text, options, globals) {
    'use strict';

    if (!options.simplifiedAutoLink) {
      return text;
    }
    text = globals.converter._dispatch('simplifiedAutoLinks.before', text, options, globals);
    if (options.excludeTrailingPunctuationFromURLs) {
      text = text.replace(simpleURLRegex2, replaceLink(options));
    } else {
      text = text.replace(simpleURLRegex, replaceLink(options));
    }
    text = text.replace(simpleMailRegex, replaceMail(options, globals));
    text = globals.converter._dispatch('simplifiedAutoLinks.after', text, options, globals);
    return text;
  });

  /**
   * These are all the transformations that form block-level
   * tags like paragraphs, headers, and list items.
   */
  showdown.subParser('blockGamut', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('blockGamut.before', text, options, globals);

    // we parse blockquotes first so that we can have headings and hrs
    // inside blockquotes
    text = showdown.subParser('blockQuotes')(text, options, globals);
    text = showdown.subParser('headers')(text, options, globals);

    // Do Horizontal Rules:
    text = showdown.subParser('horizontalRule')(text, options, globals);
    text = showdown.subParser('lists')(text, options, globals);
    text = showdown.subParser('codeBlocks')(text, options, globals);
    text = showdown.subParser('tables')(text, options, globals);

    // We already ran _HashHTMLBlocks() before, in Markdown(), but that
    // was to escape raw HTML in the original Markdown source. This time,
    // we're escaping the markup we've just created, so that we don't wrap
    // <p> tags around block-level tags.
    text = showdown.subParser('hashHTMLBlocks')(text, options, globals);
    text = showdown.subParser('paragraphs')(text, options, globals);
    text = globals.converter._dispatch('blockGamut.after', text, options, globals);
    return text;
  });
  showdown.subParser('blockQuotes', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('blockQuotes.before', text, options, globals);

    // add a couple extra lines after the text and endtext mark
    text = text + '\n\n';
    var rgx = /(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;
    if (options.splitAdjacentBlockquotes) {
      rgx = /^ {0,3}>[\s\S]*?(?:\n\n)/gm;
    }
    text = text.replace(rgx, function (bq) {
      // attacklab: hack around Konqueror 3.5.4 bug:
      // "----------bug".replace(/^-/g,"") == "bug"
      bq = bq.replace(/^[ \t]*>[ \t]?/gm, ''); // trim one level of quoting

      // attacklab: clean up hack
      bq = bq.replace(/¨0/g, '');
      bq = bq.replace(/^[ \t]+$/gm, ''); // trim whitespace-only lines
      bq = showdown.subParser('githubCodeBlocks')(bq, options, globals);
      bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse

      bq = bq.replace(/(^|\n)/g, '$1  ');
      // These leading spaces screw with <pre> content, so we need to fix that:
      bq = bq.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm, function (wholeMatch, m1) {
        var pre = m1;
        // attacklab: hack around Konqueror 3.5.4 bug:
        pre = pre.replace(/^  /mg, '¨0');
        pre = pre.replace(/¨0/g, '');
        return pre;
      });
      return showdown.subParser('hashBlock')('<blockquote>\n' + bq + '\n</blockquote>', options, globals);
    });
    text = globals.converter._dispatch('blockQuotes.after', text, options, globals);
    return text;
  });

  /**
   * Process Markdown `<pre><code>` blocks.
   */
  showdown.subParser('codeBlocks', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('codeBlocks.before', text, options, globals);

    // sentinel workarounds for lack of \A and \Z, safari\khtml bug
    text += '¨0';
    var pattern = /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;
    text = text.replace(pattern, function (wholeMatch, m1, m2) {
      var codeblock = m1,
        nextChar = m2,
        end = '\n';
      codeblock = showdown.subParser('outdent')(codeblock, options, globals);
      codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);
      codeblock = showdown.subParser('detab')(codeblock, options, globals);
      codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
      codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing newlines

      if (options.omitExtraWLInCodeBlocks) {
        end = '';
      }
      codeblock = '<pre><code>' + codeblock + end + '</code></pre>';
      return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar;
    });

    // strip sentinel
    text = text.replace(/¨0/, '');
    text = globals.converter._dispatch('codeBlocks.after', text, options, globals);
    return text;
  });

  /**
   *
   *   *  Backtick quotes are used for <code></code> spans.
   *
   *   *  You can use multiple backticks as the delimiters if you want to
   *     include literal backticks in the code span. So, this input:
   *
   *         Just type ``foo `bar` baz`` at the prompt.
   *
   *       Will translate to:
   *
   *         <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
   *
   *    There's no arbitrary limit to the number of backticks you
   *    can use as delimters. If you need three consecutive backticks
   *    in your code, use four for delimiters, etc.
   *
   *  *  You can use spaces to get literal backticks at the edges:
   *
   *         ... type `` `bar` `` ...
   *
   *       Turns to:
   *
   *         ... type <code>`bar`</code> ...
   */
  showdown.subParser('codeSpans', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('codeSpans.before', text, options, globals);
    if (typeof text === 'undefined') {
      text = '';
    }
    text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function (wholeMatch, m1, m2, m3) {
      var c = m3;
      c = c.replace(/^([ \t]*)/g, ''); // leading whitespace
      c = c.replace(/[ \t]*$/g, ''); // trailing whitespace
      c = showdown.subParser('encodeCode')(c, options, globals);
      c = m1 + '<code>' + c + '</code>';
      c = showdown.subParser('hashHTMLSpans')(c, options, globals);
      return c;
    });
    text = globals.converter._dispatch('codeSpans.after', text, options, globals);
    return text;
  });

  /**
   * Create a full HTML document from the processed markdown
   */
  showdown.subParser('completeHTMLDocument', function (text, options, globals) {
    'use strict';

    if (!options.completeHTMLDocument) {
      return text;
    }
    text = globals.converter._dispatch('completeHTMLDocument.before', text, options, globals);
    var doctype = 'html',
      doctypeParsed = '<!DOCTYPE HTML>\n',
      title = '',
      charset = '<meta charset="utf-8">\n',
      lang = '',
      metadata = '';
    if (typeof globals.metadata.parsed.doctype !== 'undefined') {
      doctypeParsed = '<!DOCTYPE ' + globals.metadata.parsed.doctype + '>\n';
      doctype = globals.metadata.parsed.doctype.toString().toLowerCase();
      if (doctype === 'html' || doctype === 'html5') {
        charset = '<meta charset="utf-8">';
      }
    }
    for (var meta in globals.metadata.parsed) {
      if (globals.metadata.parsed.hasOwnProperty(meta)) {
        switch (meta.toLowerCase()) {
          case 'doctype':
            break;
          case 'title':
            title = '<title>' + globals.metadata.parsed.title + '</title>\n';
            break;
          case 'charset':
            if (doctype === 'html' || doctype === 'html5') {
              charset = '<meta charset="' + globals.metadata.parsed.charset + '">\n';
            } else {
              charset = '<meta name="charset" content="' + globals.metadata.parsed.charset + '">\n';
            }
            break;
          case 'language':
          case 'lang':
            lang = ' lang="' + globals.metadata.parsed[meta] + '"';
            metadata += '<meta name="' + meta + '" content="' + globals.metadata.parsed[meta] + '">\n';
            break;
          default:
            metadata += '<meta name="' + meta + '" content="' + globals.metadata.parsed[meta] + '">\n';
        }
      }
    }
    text = doctypeParsed + '<html' + lang + '>\n<head>\n' + title + charset + metadata + '</head>\n<body>\n' + text.trim() + '\n</body>\n</html>';
    text = globals.converter._dispatch('completeHTMLDocument.after', text, options, globals);
    return text;
  });

  /**
   * Convert all tabs to spaces
   */
  showdown.subParser('detab', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('detab.before', text, options, globals);

    // expand first n-1 tabs
    text = text.replace(/\t(?=\t)/g, '    '); // g_tab_width

    // replace the nth with two sentinels
    text = text.replace(/\t/g, '¨A¨B');

    // use the sentinel to anchor our regex so it doesn't explode
    text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) {
      var leadingText = m1,
        numSpaces = 4 - leadingText.length % 4; // g_tab_width

      // there *must* be a better way to do this:
      for (var i = 0; i < numSpaces; i++) {
        leadingText += ' ';
      }
      return leadingText;
    });

    // clean up sentinels
    text = text.replace(/¨A/g, '    '); // g_tab_width
    text = text.replace(/¨B/g, '');
    text = globals.converter._dispatch('detab.after', text, options, globals);
    return text;
  });
  showdown.subParser('ellipsis', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('ellipsis.before', text, options, globals);
    text = text.replace(/\.\.\./g, '…');
    text = globals.converter._dispatch('ellipsis.after', text, options, globals);
    return text;
  });

  /**
   * Turn emoji codes into emojis
   *
   * List of supported emojis: https://github.com/showdownjs/showdown/wiki/Emojis
   */
  showdown.subParser('emoji', function (text, options, globals) {
    'use strict';

    if (!options.emoji) {
      return text;
    }
    text = globals.converter._dispatch('emoji.before', text, options, globals);
    var emojiRgx = /:([\S]+?):/g;
    text = text.replace(emojiRgx, function (wm, emojiCode) {
      if (showdown.helper.emojis.hasOwnProperty(emojiCode)) {
        return showdown.helper.emojis[emojiCode];
      }
      return wm;
    });
    text = globals.converter._dispatch('emoji.after', text, options, globals);
    return text;
  });

  /**
   * Smart processing for ampersands and angle brackets that need to be encoded.
   */
  showdown.subParser('encodeAmpsAndAngles', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('encodeAmpsAndAngles.before', text, options, globals);

    // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
    // http://bumppo.net/projects/amputator/
    text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, '&amp;');

    // Encode naked <'s
    text = text.replace(/<(?![a-z\/?$!])/gi, '&lt;');

    // Encode <
    text = text.replace(/</g, '&lt;');

    // Encode >
    text = text.replace(/>/g, '&gt;');
    text = globals.converter._dispatch('encodeAmpsAndAngles.after', text, options, globals);
    return text;
  });

  /**
   * Returns the string, with after processing the following backslash escape sequences.
   *
   * attacklab: The polite way to do this is with the new escapeCharacters() function:
   *
   *    text = escapeCharacters(text,"\\",true);
   *    text = escapeCharacters(text,"`*_{}[]()>#+-.!",true);
   *
   * ...but we're sidestepping its use of the (slow) RegExp constructor
   * as an optimization for Firefox.  This function gets called a LOT.
   */
  showdown.subParser('encodeBackslashEscapes', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals);
    text = text.replace(/\\(\\)/g, showdown.helper.escapeCharactersCallback);
    text = text.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g, showdown.helper.escapeCharactersCallback);
    text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals);
    return text;
  });

  /**
   * Encode/escape certain characters inside Markdown code runs.
   * The point is that in code, these characters are literals,
   * and lose their special Markdown meanings.
   */
  showdown.subParser('encodeCode', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('encodeCode.before', text, options, globals);

    // Encode all ampersands; HTML entities are not
    // entities within a Markdown code span.
    text = text.replace(/&/g, '&amp;')
    // Do the angle bracket song and dance:
    .replace(/</g, '&lt;').replace(/>/g, '&gt;')
    // Now, escape characters that are magic in Markdown:
    .replace(/([*_{}\[\]\\=~-])/g, showdown.helper.escapeCharactersCallback);
    text = globals.converter._dispatch('encodeCode.after', text, options, globals);
    return text;
  });

  /**
   * Within tags -- meaning between < and > -- encode [\ ` * _ ~ =] so they
   * don't conflict with their use in Markdown for code, italics and strong.
   */
  showdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.before', text, options, globals);

    // Build a regex to find HTML tags.
    var tags = /<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,
      comments = /<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;
    text = text.replace(tags, function (wholeMatch) {
      return wholeMatch.replace(/(.)<\/?code>(?=.)/g, '$1`').replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);
    });
    text = text.replace(comments, function (wholeMatch) {
      return wholeMatch.replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback);
    });
    text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.after', text, options, globals);
    return text;
  });

  /**
   * Handle github codeblocks prior to running HashHTML so that
   * HTML contained within the codeblock gets escaped properly
   * Example:
   * ```ruby
   *     def hello_world(x)
   *       puts "Hello, #{x}"
   *     end
   * ```
   */
  showdown.subParser('githubCodeBlocks', function (text, options, globals) {
    'use strict';

    // early exit if option is not enabled
    if (!options.ghCodeBlocks) {
      return text;
    }
    text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals);
    text += '¨0';
    text = text.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g, function (wholeMatch, delim, language, codeblock) {
      var end = options.omitExtraWLInCodeBlocks ? '' : '\n';

      // First parse the github code block
      codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);
      codeblock = showdown.subParser('detab')(codeblock, options, globals);
      codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
      codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing whitespace

      codeblock = '<pre><code' + (language ? ' class="' + language + ' language-' + language + '"' : '') + '>' + codeblock + end + '</code></pre>';
      codeblock = showdown.subParser('hashBlock')(codeblock, options, globals);

      // Since GHCodeblocks can be false positives, we need to
      // store the primitive text and the parsed text in a global var,
      // and then return a token
      return '\n\n¨G' + (globals.ghCodeBlocks.push({
        text: wholeMatch,
        codeblock: codeblock
      }) - 1) + 'G\n\n';
    });

    // attacklab: strip sentinel
    text = text.replace(/¨0/, '');
    return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals);
  });
  showdown.subParser('hashBlock', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('hashBlock.before', text, options, globals);
    text = text.replace(/(^\n+|\n+$)/g, '');
    text = '\n\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\n\n';
    text = globals.converter._dispatch('hashBlock.after', text, options, globals);
    return text;
  });

  /**
   * Hash and escape <code> elements that should not be parsed as markdown
   */
  showdown.subParser('hashCodeTags', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('hashCodeTags.before', text, options, globals);
    var repFunc = function repFunc(wholeMatch, match, left, right) {
      var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;
      return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C';
    };

    // Hash naked <code>
    text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '<code\\b[^>]*>', '</code>', 'gim');
    text = globals.converter._dispatch('hashCodeTags.after', text, options, globals);
    return text;
  });
  showdown.subParser('hashElement', function (text, options, globals) {
    'use strict';

    return function (wholeMatch, m1) {
      var blockText = m1;

      // Undo double lines
      blockText = blockText.replace(/\n\n/g, '\n');
      blockText = blockText.replace(/^\n/, '');

      // strip trailing blank lines
      blockText = blockText.replace(/\n+$/g, '');

      // Replace the element text with a marker ("¨KxK" where x is its key)
      blockText = '\n\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\n\n';
      return blockText;
    };
  });
  showdown.subParser('hashHTMLBlocks', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('hashHTMLBlocks.before', text, options, globals);
    var blockTags = ['pre', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'table', 'dl', 'ol', 'ul', 'script', 'noscript', 'form', 'fieldset', 'iframe', 'math', 'style', 'section', 'header', 'footer', 'nav', 'article', 'aside', 'address', 'audio', 'canvas', 'figure', 'hgroup', 'output', 'video', 'p'],
      repFunc = function repFunc(wholeMatch, match, left, right) {
        var txt = wholeMatch;
        // check if this html element is marked as markdown
        // if so, it's contents should be parsed as markdown
        if (left.search(/\bmarkdown\b/) !== -1) {
          txt = left + globals.converter.makeHtml(match) + right;
        }
        return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n';
      };
    if (options.backslashEscapesHTMLTags) {
      // encode backslash escaped HTML tags
      text = text.replace(/\\<(\/?[^>]+?)>/g, function (wm, inside) {
        return '&lt;' + inside + '&gt;';
      });
    }

    // hash HTML Blocks
    for (var i = 0; i < blockTags.length; ++i) {
      var opTagPos,
        rgx1 = new RegExp('^ {0,3}(<' + blockTags[i] + '\\b[^>]*>)', 'im'),
        patLeft = '<' + blockTags[i] + '\\b[^>]*>',
        patRight = '</' + blockTags[i] + '>';
      // 1. Look for the first position of the first opening HTML tag in the text
      while ((opTagPos = showdown.helper.regexIndexOf(text, rgx1)) !== -1) {
        // if the HTML tag is \ escaped, we need to escape it and break

        //2. Split the text in that position
        var subTexts = showdown.helper.splitAtIndex(text, opTagPos),
          //3. Match recursively
          newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im');

        // prevent an infinite loop
        if (newSubText1 === subTexts[1]) {
          break;
        }
        text = subTexts[0].concat(newSubText1);
      }
    }
    // HR SPECIAL CASE
    text = text.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, showdown.subParser('hashElement')(text, options, globals));

    // Special case for standalone HTML comments
    text = showdown.helper.replaceRecursiveRegExp(text, function (txt) {
      return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n';
    }, '^ {0,3}<!--', '-->', 'gm');

    // PHP and ASP-style processor instructions (<?...?> and <%...%>)
    text = text.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, showdown.subParser('hashElement')(text, options, globals));
    text = globals.converter._dispatch('hashHTMLBlocks.after', text, options, globals);
    return text;
  });

  /**
   * Hash span elements that should not be parsed as markdown
   */
  showdown.subParser('hashHTMLSpans', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('hashHTMLSpans.before', text, options, globals);
    function hashHTMLSpan(html) {
      return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C';
    }

    // Hash Self Closing tags
    text = text.replace(/<[^>]+?\/>/gi, function (wm) {
      return hashHTMLSpan(wm);
    });

    // Hash tags without properties
    text = text.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, function (wm) {
      return hashHTMLSpan(wm);
    });

    // Hash tags with properties
    text = text.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g, function (wm) {
      return hashHTMLSpan(wm);
    });

    // Hash self closing tags without />
    text = text.replace(/<[^>]+?>/gi, function (wm) {
      return hashHTMLSpan(wm);
    });

    /*showdown.helper.matchRecursiveRegExp(text, '<code\\b[^>]*>', '</code>', 'gi');*/

    text = globals.converter._dispatch('hashHTMLSpans.after', text, options, globals);
    return text;
  });

  /**
   * Unhash HTML spans
   */
  showdown.subParser('unhashHTMLSpans', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('unhashHTMLSpans.before', text, options, globals);
    for (var i = 0; i < globals.gHtmlSpans.length; ++i) {
      var repText = globals.gHtmlSpans[i],
        // limiter to prevent infinite loop (assume 10 as limit for recurse)
        limit = 0;
      while (/¨C(\d+)C/.test(repText)) {
        var num = RegExp.$1;
        repText = repText.replace('¨C' + num + 'C', globals.gHtmlSpans[num]);
        if (limit === 10) {
          console.error('maximum nesting of 10 spans reached!!!');
          break;
        }
        ++limit;
      }
      text = text.replace('¨C' + i + 'C', repText);
    }
    text = globals.converter._dispatch('unhashHTMLSpans.after', text, options, globals);
    return text;
  });

  /**
   * Hash and escape <pre><code> elements that should not be parsed as markdown
   */
  showdown.subParser('hashPreCodeTags', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('hashPreCodeTags.before', text, options, globals);
    var repFunc = function repFunc(wholeMatch, match, left, right) {
      // encode html entities
      var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;
      return '\n\n¨G' + (globals.ghCodeBlocks.push({
        text: wholeMatch,
        codeblock: codeblock
      }) - 1) + 'G\n\n';
    };

    // Hash <pre><code>
    text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>', '^ {0,3}</code>\\s*</pre>', 'gim');
    text = globals.converter._dispatch('hashPreCodeTags.after', text, options, globals);
    return text;
  });
  showdown.subParser('headers', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('headers.before', text, options, globals);
    var headerLevelStart = isNaN(parseInt(options.headerLevelStart)) ? 1 : parseInt(options.headerLevelStart),
      // Set text-style headers:
      //	Header 1
      //	========
      //
      //	Header 2
      //	--------
      //
      setextRegexH1 = options.smoothLivePreview ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm,
      setextRegexH2 = options.smoothLivePreview ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm;
    text = text.replace(setextRegexH1, function (wholeMatch, m1) {
      var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),
        hID = options.noHeaderId ? '' : ' id="' + headerId(m1) + '"',
        hLevel = headerLevelStart,
        hashBlock = '<h' + hLevel + hID + '>' + spanGamut + '</h' + hLevel + '>';
      return showdown.subParser('hashBlock')(hashBlock, options, globals);
    });
    text = text.replace(setextRegexH2, function (matchFound, m1) {
      var spanGamut = showdown.subParser('spanGamut')(m1, options, globals),
        hID = options.noHeaderId ? '' : ' id="' + headerId(m1) + '"',
        hLevel = headerLevelStart + 1,
        hashBlock = '<h' + hLevel + hID + '>' + spanGamut + '</h' + hLevel + '>';
      return showdown.subParser('hashBlock')(hashBlock, options, globals);
    });

    // atx-style headers:
    //  # Header 1
    //  ## Header 2
    //  ## Header 2 with closing hashes ##
    //  ...
    //  ###### Header 6
    //
    var atxStyle = options.requireSpaceBeforeHeadingText ? /^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm : /^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;
    text = text.replace(atxStyle, function (wholeMatch, m1, m2) {
      var hText = m2;
      if (options.customizedHeaderId) {
        hText = m2.replace(/\s?\{([^{]+?)}\s*$/, '');
      }
      var span = showdown.subParser('spanGamut')(hText, options, globals),
        hID = options.noHeaderId ? '' : ' id="' + headerId(m2) + '"',
        hLevel = headerLevelStart - 1 + m1.length,
        header = '<h' + hLevel + hID + '>' + span + '</h' + hLevel + '>';
      return showdown.subParser('hashBlock')(header, options, globals);
    });
    function headerId(m) {
      var title, prefix;

      // It is separate from other options to allow combining prefix and customized
      if (options.customizedHeaderId) {
        var match = m.match(/\{([^{]+?)}\s*$/);
        if (match && match[1]) {
          m = match[1];
        }
      }
      title = m;

      // Prefix id to prevent causing inadvertent pre-existing style matches.
      if (showdown.helper.isString(options.prefixHeaderId)) {
        prefix = options.prefixHeaderId;
      } else if (options.prefixHeaderId === true) {
        prefix = 'section-';
      } else {
        prefix = '';
      }
      if (!options.rawPrefixHeaderId) {
        title = prefix + title;
      }
      if (options.ghCompatibleHeaderId) {
        title = title.replace(/ /g, '-')
        // replace previously escaped chars (&, ¨ and $)
        .replace(/&amp;/g, '').replace(/¨T/g, '').replace(/¨D/g, '')
        // replace rest of the chars (&~$ are repeated as they might have been escaped)
        // borrowed from github's redcarpet (some they should produce similar results)
        .replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g, '').toLowerCase();
      } else if (options.rawHeaderId) {
        title = title.replace(/ /g, '-')
        // replace previously escaped chars (&, ¨ and $)
        .replace(/&amp;/g, '&').replace(/¨T/g, '¨').replace(/¨D/g, '$')
        // replace " and '
        .replace(/["']/g, '-').toLowerCase();
      } else {
        title = title.replace(/[^\w]/g, '').toLowerCase();
      }
      if (options.rawPrefixHeaderId) {
        title = prefix + title;
      }
      if (globals.hashLinkCounts[title]) {
        title = title + '-' + globals.hashLinkCounts[title]++;
      } else {
        globals.hashLinkCounts[title] = 1;
      }
      return title;
    }
    text = globals.converter._dispatch('headers.after', text, options, globals);
    return text;
  });

  /**
   * Turn Markdown link shortcuts into XHTML <a> tags.
   */
  showdown.subParser('horizontalRule', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('horizontalRule.before', text, options, globals);
    var key = showdown.subParser('hashBlock')('<hr />', options, globals);
    text = text.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, key);
    text = text.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, key);
    text = text.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, key);
    text = globals.converter._dispatch('horizontalRule.after', text, options, globals);
    return text;
  });

  /**
   * Turn Markdown image shortcuts into <img> tags.
   */
  showdown.subParser('images', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('images.before', text, options, globals);
    var inlineRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,
      crazyRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,
      base64RegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,
      referenceRegExp = /!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,
      refShortcutRegExp = /!\[([^\[\]]+)]()()()()()/g;
    function writeImageTagBase64(wholeMatch, altText, linkId, url, width, height, m5, title) {
      url = url.replace(/\s/g, '');
      return writeImageTag(wholeMatch, altText, linkId, url, width, height, m5, title);
    }
    function writeImageTag(wholeMatch, altText, linkId, url, width, height, m5, title) {
      var gUrls = globals.gUrls,
        gTitles = globals.gTitles,
        gDims = globals.gDimensions;
      linkId = linkId.toLowerCase();
      if (!title) {
        title = '';
      }
      // Special case for explicit empty url
      if (wholeMatch.search(/\(<?\s*>? ?(['"].*['"])?\)$/m) > -1) {
        url = '';
      } else if (url === '' || url === null) {
        if (linkId === '' || linkId === null) {
          // lower-case and turn embedded newlines into spaces
          linkId = altText.toLowerCase().replace(/ ?\n/g, ' ');
        }
        url = '#' + linkId;
        if (!showdown.helper.isUndefined(gUrls[linkId])) {
          url = gUrls[linkId];
          if (!showdown.helper.isUndefined(gTitles[linkId])) {
            title = gTitles[linkId];
          }
          if (!showdown.helper.isUndefined(gDims[linkId])) {
            width = gDims[linkId].width;
            height = gDims[linkId].height;
          }
        } else {
          return wholeMatch;
        }
      }
      altText = altText.replace(/"/g, '&quot;')
      //altText = showdown.helper.escapeCharacters(altText, '*_', false);
      .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
      //url = showdown.helper.escapeCharacters(url, '*_', false);
      url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
      var result = '<img src="' + url + '" alt="' + altText + '"';
      if (title && showdown.helper.isString(title)) {
        title = title.replace(/"/g, '&quot;')
        //title = showdown.helper.escapeCharacters(title, '*_', false);
        .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
        result += ' title="' + title + '"';
      }
      if (width && height) {
        width = width === '*' ? 'auto' : width;
        height = height === '*' ? 'auto' : height;
        result += ' width="' + width + '"';
        result += ' height="' + height + '"';
      }
      result += ' />';
      return result;
    }

    // First, handle reference-style labeled images: ![alt text][id]
    text = text.replace(referenceRegExp, writeImageTag);

    // Next, handle inline images:  ![alt text](url =<width>x<height> "optional title")

    // base64 encoded images
    text = text.replace(base64RegExp, writeImageTagBase64);

    // cases with crazy urls like ./image/cat1).png
    text = text.replace(crazyRegExp, writeImageTag);

    // normal cases
    text = text.replace(inlineRegExp, writeImageTag);

    // handle reference-style shortcuts: ![img text]
    text = text.replace(refShortcutRegExp, writeImageTag);
    text = globals.converter._dispatch('images.after', text, options, globals);
    return text;
  });
  showdown.subParser('italicsAndBold', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('italicsAndBold.before', text, options, globals);

    // it's faster to have 3 separate regexes for each case than have just one
    // because of backtracing, in some cases, it could lead to an exponential effect
    // called "catastrophic backtrace". Ominous!

    function parseInside(txt, left, right) {
      /*
      if (options.simplifiedAutoLink) {
        txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);
      }
      */
      return left + txt + right;
    }

    // Parse underscores
    if (options.literalMidWordUnderscores) {
      text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) {
        return parseInside(txt, '<strong><em>', '</em></strong>');
      });
      text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) {
        return parseInside(txt, '<strong>', '</strong>');
      });
      text = text.replace(/\b_(\S[\s\S]*?)_\b/g, function (wm, txt) {
        return parseInside(txt, '<em>', '</em>');
      });
    } else {
      text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) {
        return /\S$/.test(m) ? parseInside(m, '<strong><em>', '</em></strong>') : wm;
      });
      text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) {
        return /\S$/.test(m) ? parseInside(m, '<strong>', '</strong>') : wm;
      });
      text = text.replace(/_([^\s_][\s\S]*?)_/g, function (wm, m) {
        // !/^_[^_]/.test(m) - test if it doesn't start with __ (since it seems redundant, we removed it)
        return /\S$/.test(m) ? parseInside(m, '<em>', '</em>') : wm;
      });
    }

    // Now parse asterisks
    if (options.literalMidWordAsterisks) {
      text = text.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g, function (wm, lead, txt) {
        return parseInside(txt, lead + '<strong><em>', '</em></strong>');
      });
      text = text.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g, function (wm, lead, txt) {
        return parseInside(txt, lead + '<strong>', '</strong>');
      });
      text = text.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g, function (wm, lead, txt) {
        return parseInside(txt, lead + '<em>', '</em>');
      });
    } else {
      text = text.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g, function (wm, m) {
        return /\S$/.test(m) ? parseInside(m, '<strong><em>', '</em></strong>') : wm;
      });
      text = text.replace(/\*\*(\S[\s\S]*?)\*\*/g, function (wm, m) {
        return /\S$/.test(m) ? parseInside(m, '<strong>', '</strong>') : wm;
      });
      text = text.replace(/\*([^\s*][\s\S]*?)\*/g, function (wm, m) {
        // !/^\*[^*]/.test(m) - test if it doesn't start with ** (since it seems redundant, we removed it)
        return /\S$/.test(m) ? parseInside(m, '<em>', '</em>') : wm;
      });
    }
    text = globals.converter._dispatch('italicsAndBold.after', text, options, globals);
    return text;
  });

  /**
   * Form HTML ordered (numbered) and unordered (bulleted) lists.
   */
  showdown.subParser('lists', function (text, options, globals) {
    'use strict';

    /**
     * Process the contents of a single ordered or unordered list, splitting it
     * into individual list items.
     * @param {string} listStr
     * @param {boolean} trimTrailing
     * @returns {string}
     */
    function processListItems(listStr, trimTrailing) {
      // The $g_list_level global keeps track of when we're inside a list.
      // Each time we enter a list, we increment it; when we leave a list,
      // we decrement. If it's zero, we're not in a list anymore.
      //
      // We do this because when we're not inside a list, we want to treat
      // something like this:
      //
      //    I recommend upgrading to version
      //    8. Oops, now this line is treated
      //    as a sub-list.
      //
      // As a single paragraph, despite the fact that the second line starts
      // with a digit-period-space sequence.
      //
      // Whereas when we're inside a list (or sub-list), that line will be
      // treated as the start of a sub-list. What a kludge, huh? This is
      // an aspect of Markdown's syntax that's hard to parse perfectly
      // without resorting to mind-reading. Perhaps the solution is to
      // change the syntax rules such that sub-lists must start with a
      // starting cardinal number; e.g. "1." or "a.".
      globals.gListLevel++;

      // trim trailing blank lines:
      listStr = listStr.replace(/\n{2,}$/, '\n');

      // attacklab: add sentinel to emulate \z
      listStr += '¨0';
      var rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,
        isParagraphed = /\n[ \t]*\n(?!¨0)/.test(listStr);

      // Since version 1.5, nesting sublists requires 4 spaces (or 1 tab) indentation,
      // which is a syntax breaking change
      // activating this option reverts to old behavior
      if (options.disableForced4SpacesIndentedSublists) {
        rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm;
      }
      listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) {
        checked = checked && checked.trim() !== '';
        var item = showdown.subParser('outdent')(m4, options, globals),
          bulletStyle = '';

        // Support for github tasklists
        if (taskbtn && options.tasklists) {
          bulletStyle = ' class="task-list-item" style="list-style-type: none;"';
          item = item.replace(/^[ \t]*\[(x|X| )?]/m, function () {
            var otp = '<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';
            if (checked) {
              otp += ' checked';
            }
            otp += '>';
            return otp;
          });
        }

        // ISSUE #312
        // This input: - - - a
        // causes trouble to the parser, since it interprets it as:
        // <ul><li><li><li>a</li></li></li></ul>
        // instead of:
        // <ul><li>- - a</li></ul>
        // So, to prevent it, we will put a marker (¨A)in the beginning of the line
        // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser
        item = item.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g, function (wm2) {
          return '¨A' + wm2;
        });

        // m1 - Leading line or
        // Has a double return (multi paragraph) or
        // Has sublist
        if (m1 || item.search(/\n{2,}/) > -1) {
          item = showdown.subParser('githubCodeBlocks')(item, options, globals);
          item = showdown.subParser('blockGamut')(item, options, globals);
        } else {
          // Recursion for sub-lists:
          item = showdown.subParser('lists')(item, options, globals);
          item = item.replace(/\n$/, ''); // chomp(item)
          item = showdown.subParser('hashHTMLBlocks')(item, options, globals);

          // Colapse double linebreaks
          item = item.replace(/\n\n+/g, '\n\n');
          if (isParagraphed) {
            item = showdown.subParser('paragraphs')(item, options, globals);
          } else {
            item = showdown.subParser('spanGamut')(item, options, globals);
          }
        }

        // now we need to remove the marker (¨A)
        item = item.replace('¨A', '');
        // we can finally wrap the line in list item tags
        item = '<li' + bulletStyle + '>' + item + '</li>\n';
        return item;
      });

      // attacklab: strip sentinel
      listStr = listStr.replace(/¨0/g, '');
      globals.gListLevel--;
      if (trimTrailing) {
        listStr = listStr.replace(/\s+$/, '');
      }
      return listStr;
    }
    function styleStartNumber(list, listType) {
      // check if ol and starts by a number different than 1
      if (listType === 'ol') {
        var res = list.match(/^ *(\d+)\./);
        if (res && res[1] !== '1') {
          return ' start="' + res[1] + '"';
        }
      }
      return '';
    }

    /**
     * Check and parse consecutive lists (better fix for issue #142)
     * @param {string} list
     * @param {string} listType
     * @param {boolean} trimTrailing
     * @returns {string}
     */
    function parseConsecutiveLists(list, listType, trimTrailing) {
      // check if we caught 2 or more consecutive lists by mistake
      // we use the counterRgx, meaning if listType is UL we look for OL and vice versa
      var olRgx = options.disableForced4SpacesIndentedSublists ? /^ ?\d+\.[ \t]/gm : /^ {0,3}\d+\.[ \t]/gm,
        ulRgx = options.disableForced4SpacesIndentedSublists ? /^ ?[*+-][ \t]/gm : /^ {0,3}[*+-][ \t]/gm,
        counterRxg = listType === 'ul' ? olRgx : ulRgx,
        result = '';
      if (list.search(counterRxg) !== -1) {
        (function parseCL(txt) {
          var pos = txt.search(counterRxg),
            style = styleStartNumber(list, listType);
          if (pos !== -1) {
            // slice
            result += '\n\n<' + listType + style + '>\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '</' + listType + '>\n';

            // invert counterType and listType
            listType = listType === 'ul' ? 'ol' : 'ul';
            counterRxg = listType === 'ul' ? olRgx : ulRgx;

            //recurse
            parseCL(txt.slice(pos));
          } else {
            result += '\n\n<' + listType + style + '>\n' + processListItems(txt, !!trimTrailing) + '</' + listType + '>\n';
          }
        })(list);
      } else {
        var style = styleStartNumber(list, listType);
        result = '\n\n<' + listType + style + '>\n' + processListItems(list, !!trimTrailing) + '</' + listType + '>\n';
      }
      return result;
    }

    /** Start of list parsing **/
    text = globals.converter._dispatch('lists.before', text, options, globals);
    // add sentinel to hack around khtml/safari bug:
    // http://bugs.webkit.org/show_bug.cgi?id=11231
    text += '¨0';
    if (globals.gListLevel) {
      text = text.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm, function (wholeMatch, list, m2) {
        var listType = m2.search(/[*+-]/g) > -1 ? 'ul' : 'ol';
        return parseConsecutiveLists(list, listType, true);
      });
    } else {
      text = text.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm, function (wholeMatch, m1, list, m3) {
        var listType = m3.search(/[*+-]/g) > -1 ? 'ul' : 'ol';
        return parseConsecutiveLists(list, listType, false);
      });
    }

    // strip sentinel
    text = text.replace(/¨0/, '');
    text = globals.converter._dispatch('lists.after', text, options, globals);
    return text;
  });

  /**
   * Parse metadata at the top of the document
   */
  showdown.subParser('metadata', function (text, options, globals) {
    'use strict';

    if (!options.metadata) {
      return text;
    }
    text = globals.converter._dispatch('metadata.before', text, options, globals);
    function parseMetadataContents(content) {
      // raw is raw so it's not changed in any way
      globals.metadata.raw = content;

      // escape chars forbidden in html attributes
      // double quotes
      content = content
      // ampersand first
      .replace(/&/g, '&amp;')
      // double quotes
      .replace(/"/g, '&quot;');
      content = content.replace(/\n {4}/g, ' ');
      content.replace(/^([\S ]+): +([\s\S]+?)$/gm, function (wm, key, value) {
        globals.metadata.parsed[key] = value;
        return '';
      });
    }
    text = text.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/, function (wholematch, format, content) {
      parseMetadataContents(content);
      return '¨M';
    });
    text = text.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/, function (wholematch, format, content) {
      if (format) {
        globals.metadata.format = format;
      }
      parseMetadataContents(content);
      return '¨M';
    });
    text = text.replace(/¨M/g, '');
    text = globals.converter._dispatch('metadata.after', text, options, globals);
    return text;
  });

  /**
   * Remove one level of line-leading tabs or spaces
   */
  showdown.subParser('outdent', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('outdent.before', text, options, globals);

    // attacklab: hack around Konqueror 3.5.4 bug:
    // "----------bug".replace(/^-/g,"") == "bug"
    text = text.replace(/^(\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width

    // attacklab: clean up hack
    text = text.replace(/¨0/g, '');
    text = globals.converter._dispatch('outdent.after', text, options, globals);
    return text;
  });

  /**
   *
   */
  showdown.subParser('paragraphs', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('paragraphs.before', text, options, globals);
    // Strip leading and trailing lines:
    text = text.replace(/^\n+/g, '');
    text = text.replace(/\n+$/g, '');
    var grafs = text.split(/\n{2,}/g),
      grafsOut = [],
      end = grafs.length; // Wrap <p> tags

    for (var i = 0; i < end; i++) {
      var str = grafs[i];
      // if this is an HTML marker, copy it
      if (str.search(/¨(K|G)(\d+)\1/g) >= 0) {
        grafsOut.push(str);

        // test for presence of characters to prevent empty lines being parsed
        // as paragraphs (resulting in undesired extra empty paragraphs)
      } else if (str.search(/\S/) >= 0) {
        str = showdown.subParser('spanGamut')(str, options, globals);
        str = str.replace(/^([ \t]*)/g, '<p>');
        str += '</p>';
        grafsOut.push(str);
      }
    }

    /** Unhashify HTML blocks */
    end = grafsOut.length;
    for (i = 0; i < end; i++) {
      var blockText = '',
        grafsOutIt = grafsOut[i],
        codeFlag = false;
      // if this is a marker for an html block...
      // use RegExp.test instead of string.search because of QML bug
      while (/¨(K|G)(\d+)\1/.test(grafsOutIt)) {
        var delim = RegExp.$1,
          num = RegExp.$2;
        if (delim === 'K') {
          blockText = globals.gHtmlBlocks[num];
        } else {
          // we need to check if ghBlock is a false positive
          if (codeFlag) {
            // use encoded version of all text
            blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals);
          } else {
            blockText = globals.ghCodeBlocks[num].codeblock;
          }
        }
        blockText = blockText.replace(/\$/g, '$$$$'); // Escape any dollar signs

        grafsOutIt = grafsOutIt.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/, blockText);
        // Check if grafsOutIt is a pre->code
        if (/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(grafsOutIt)) {
          codeFlag = true;
        }
      }
      grafsOut[i] = grafsOutIt;
    }
    text = grafsOut.join('\n');
    // Strip leading and trailing lines:
    text = text.replace(/^\n+/g, '');
    text = text.replace(/\n+$/g, '');
    return globals.converter._dispatch('paragraphs.after', text, options, globals);
  });

  /**
   * Run extension
   */
  showdown.subParser('runExtension', function (ext, text, options, globals) {
    'use strict';

    if (ext.filter) {
      text = ext.filter(text, globals.converter, options);
    } else if (ext.regex) {
      // TODO remove this when old extension loading mechanism is deprecated
      var re = ext.regex;
      if (!(re instanceof RegExp)) {
        re = new RegExp(re, 'g');
      }
      text = text.replace(re, ext.replace);
    }
    return text;
  });

  /**
   * These are all the transformations that occur *within* block-level
   * tags like paragraphs, headers, and list items.
   */
  showdown.subParser('spanGamut', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('spanGamut.before', text, options, globals);
    text = showdown.subParser('codeSpans')(text, options, globals);
    text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals);
    text = showdown.subParser('encodeBackslashEscapes')(text, options, globals);

    // Process anchor and image tags. Images must come first,
    // because ![foo][f] looks like an anchor.
    text = showdown.subParser('images')(text, options, globals);
    text = showdown.subParser('anchors')(text, options, globals);

    // Make links out of things like `<http://example.com/>`
    // Must come after anchors, because you can use < and >
    // delimiters in inline links like [this](<url>).
    text = showdown.subParser('autoLinks')(text, options, globals);
    text = showdown.subParser('simplifiedAutoLinks')(text, options, globals);
    text = showdown.subParser('emoji')(text, options, globals);
    text = showdown.subParser('underline')(text, options, globals);
    text = showdown.subParser('italicsAndBold')(text, options, globals);
    text = showdown.subParser('strikethrough')(text, options, globals);
    text = showdown.subParser('ellipsis')(text, options, globals);

    // we need to hash HTML tags inside spans
    text = showdown.subParser('hashHTMLSpans')(text, options, globals);

    // now we encode amps and angles
    text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals);

    // Do hard breaks
    if (options.simpleLineBreaks) {
      // GFM style hard breaks
      // only add line breaks if the text does not contain a block (special case for lists)
      if (!/\n\n¨K/.test(text)) {
        text = text.replace(/\n+/g, '<br />\n');
      }
    } else {
      // Vanilla hard breaks
      text = text.replace(/  +\n/g, '<br />\n');
    }
    text = globals.converter._dispatch('spanGamut.after', text, options, globals);
    return text;
  });
  showdown.subParser('strikethrough', function (text, options, globals) {
    'use strict';

    function parseInside(txt) {
      if (options.simplifiedAutoLink) {
        txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals);
      }
      return '<del>' + txt + '</del>';
    }
    if (options.strikethrough) {
      text = globals.converter._dispatch('strikethrough.before', text, options, globals);
      text = text.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function (wm, txt) {
        return parseInside(txt);
      });
      text = globals.converter._dispatch('strikethrough.after', text, options, globals);
    }
    return text;
  });

  /**
   * Strips link definitions from text, stores the URLs and titles in
   * hash references.
   * Link defs are in the form: ^[id]: url "optional title"
   */
  showdown.subParser('stripLinkDefinitions', function (text, options, globals) {
    'use strict';

    var regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,
      base64Regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;

    // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
    text += '¨0';
    var replaceFunc = function replaceFunc(wholeMatch, linkId, url, width, height, blankLines, title) {
      linkId = linkId.toLowerCase();
      if (url.match(/^data:.+?\/.+?;base64,/)) {
        // remove newlines
        globals.gUrls[linkId] = url.replace(/\s/g, '');
      } else {
        globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals); // Link IDs are case-insensitive
      }

      if (blankLines) {
        // Oops, found blank lines, so it's not a title.
        // Put back the parenthetical statement we stole.
        return blankLines + title;
      } else {
        if (title) {
          globals.gTitles[linkId] = title.replace(/"|'/g, '&quot;');
        }
        if (options.parseImgDimensions && width && height) {
          globals.gDimensions[linkId] = {
            width: width,
            height: height
          };
        }
      }
      // Completely remove the definition from the text
      return '';
    };

    // first we try to find base64 link references
    text = text.replace(base64Regex, replaceFunc);
    text = text.replace(regex, replaceFunc);

    // attacklab: strip sentinel
    text = text.replace(/¨0/, '');
    return text;
  });
  showdown.subParser('tables', function (text, options, globals) {
    'use strict';

    if (!options.tables) {
      return text;
    }
    var tableRgx = /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,
      //singeColTblRgx = /^ {0,3}\|.+\|\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n(?: {0,3}\|.+\|\n)+(?:\n\n|¨0)/gm;
      singeColTblRgx = /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;
    function parseStyles(sLine) {
      if (/^:[ \t]*--*$/.test(sLine)) {
        return ' style="text-align:left;"';
      } else if (/^--*[ \t]*:[ \t]*$/.test(sLine)) {
        return ' style="text-align:right;"';
      } else if (/^:[ \t]*--*[ \t]*:$/.test(sLine)) {
        return ' style="text-align:center;"';
      } else {
        return '';
      }
    }
    function parseHeaders(header, style) {
      var id = '';
      header = header.trim();
      // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility
      if (options.tablesHeaderId || options.tableHeaderId) {
        id = ' id="' + header.replace(/ /g, '_').toLowerCase() + '"';
      }
      header = showdown.subParser('spanGamut')(header, options, globals);
      return '<th' + id + style + '>' + header + '</th>\n';
    }
    function parseCells(cell, style) {
      var subText = showdown.subParser('spanGamut')(cell, options, globals);
      return '<td' + style + '>' + subText + '</td>\n';
    }
    function buildTable(headers, cells) {
      var tb = '<table>\n<thead>\n<tr>\n',
        tblLgn = headers.length;
      for (var i = 0; i < tblLgn; ++i) {
        tb += headers[i];
      }
      tb += '</tr>\n</thead>\n<tbody>\n';
      for (i = 0; i < cells.length; ++i) {
        tb += '<tr>\n';
        for (var ii = 0; ii < tblLgn; ++ii) {
          tb += cells[i][ii];
        }
        tb += '</tr>\n';
      }
      tb += '</tbody>\n</table>\n';
      return tb;
    }
    function parseTable(rawTable) {
      var i,
        tableLines = rawTable.split('\n');
      for (i = 0; i < tableLines.length; ++i) {
        // strip wrong first and last column if wrapped tables are used
        if (/^ {0,3}\|/.test(tableLines[i])) {
          tableLines[i] = tableLines[i].replace(/^ {0,3}\|/, '');
        }
        if (/\|[ \t]*$/.test(tableLines[i])) {
          tableLines[i] = tableLines[i].replace(/\|[ \t]*$/, '');
        }
        // parse code spans first, but we only support one line code spans
        tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals);
      }
      var rawHeaders = tableLines[0].split('|').map(function (s) {
          return s.trim();
        }),
        rawStyles = tableLines[1].split('|').map(function (s) {
          return s.trim();
        }),
        rawCells = [],
        headers = [],
        styles = [],
        cells = [];
      tableLines.shift();
      tableLines.shift();
      for (i = 0; i < tableLines.length; ++i) {
        if (tableLines[i].trim() === '') {
          continue;
        }
        rawCells.push(tableLines[i].split('|').map(function (s) {
          return s.trim();
        }));
      }
      if (rawHeaders.length < rawStyles.length) {
        return rawTable;
      }
      for (i = 0; i < rawStyles.length; ++i) {
        styles.push(parseStyles(rawStyles[i]));
      }
      for (i = 0; i < rawHeaders.length; ++i) {
        if (showdown.helper.isUndefined(styles[i])) {
          styles[i] = '';
        }
        headers.push(parseHeaders(rawHeaders[i], styles[i]));
      }
      for (i = 0; i < rawCells.length; ++i) {
        var row = [];
        for (var ii = 0; ii < headers.length; ++ii) {
          if (showdown.helper.isUndefined(rawCells[i][ii])) {}
          row.push(parseCells(rawCells[i][ii], styles[ii]));
        }
        cells.push(row);
      }
      return buildTable(headers, cells);
    }
    text = globals.converter._dispatch('tables.before', text, options, globals);

    // find escaped pipe characters
    text = text.replace(/\\(\|)/g, showdown.helper.escapeCharactersCallback);

    // parse multi column tables
    text = text.replace(tableRgx, parseTable);

    // parse one column tables
    text = text.replace(singeColTblRgx, parseTable);
    text = globals.converter._dispatch('tables.after', text, options, globals);
    return text;
  });
  showdown.subParser('underline', function (text, options, globals) {
    'use strict';

    if (!options.underline) {
      return text;
    }
    text = globals.converter._dispatch('underline.before', text, options, globals);
    if (options.literalMidWordUnderscores) {
      text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) {
        return '<u>' + txt + '</u>';
      });
      text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) {
        return '<u>' + txt + '</u>';
      });
    } else {
      text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) {
        return /\S$/.test(m) ? '<u>' + m + '</u>' : wm;
      });
      text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) {
        return /\S$/.test(m) ? '<u>' + m + '</u>' : wm;
      });
    }

    // escape remaining underscores to prevent them being parsed by italic and bold
    text = text.replace(/(_)/g, showdown.helper.escapeCharactersCallback);
    text = globals.converter._dispatch('underline.after', text, options, globals);
    return text;
  });

  /**
   * Swap back in all the special characters we've hidden.
   */
  showdown.subParser('unescapeSpecialChars', function (text, options, globals) {
    'use strict';

    text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals);
    text = text.replace(/¨E(\d+)E/g, function (wholeMatch, m1) {
      var charCodeToReplace = parseInt(m1);
      return String.fromCharCode(charCodeToReplace);
    });
    text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals);
    return text;
  });
  showdown.subParser('makeMarkdown.blockquote', function (node, globals) {
    'use strict';

    var txt = '';
    if (node.hasChildNodes()) {
      var children = node.childNodes,
        childrenLength = children.length;
      for (var i = 0; i < childrenLength; ++i) {
        var innerTxt = showdown.subParser('makeMarkdown.node')(children[i], globals);
        if (innerTxt === '') {
          continue;
        }
        txt += innerTxt;
      }
    }
    // cleanup
    txt = txt.trim();
    txt = '> ' + txt.split('\n').join('\n> ');
    return txt;
  });
  showdown.subParser('makeMarkdown.codeBlock', function (node, globals) {
    'use strict';

    var lang = node.getAttribute('language'),
      num = node.getAttribute('precodenum');
    return '```' + lang + '\n' + globals.preList[num] + '\n```';
  });
  showdown.subParser('makeMarkdown.codeSpan', function (node) {
    'use strict';

    return '`' + node.innerHTML + '`';
  });
  showdown.subParser('makeMarkdown.emphasis', function (node, globals) {
    'use strict';

    var txt = '';
    if (node.hasChildNodes()) {
      txt += '*';
      var children = node.childNodes,
        childrenLength = children.length;
      for (var i = 0; i < childrenLength; ++i) {
        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
      }
      txt += '*';
    }
    return txt;
  });
  showdown.subParser('makeMarkdown.header', function (node, globals, headerLevel) {
    'use strict';

    var headerMark = new Array(headerLevel + 1).join('#'),
      txt = '';
    if (node.hasChildNodes()) {
      txt = headerMark + ' ';
      var children = node.childNodes,
        childrenLength = children.length;
      for (var i = 0; i < childrenLength; ++i) {
        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
      }
    }
    return txt;
  });
  showdown.subParser('makeMarkdown.hr', function () {
    'use strict';

    return '---';
  });
  showdown.subParser('makeMarkdown.image', function (node) {
    'use strict';

    var txt = '';
    if (node.hasAttribute('src')) {
      txt += '![' + node.getAttribute('alt') + '](';
      txt += '<' + node.getAttribute('src') + '>';
      if (node.hasAttribute('width') && node.hasAttribute('height')) {
        txt += ' =' + node.getAttribute('width') + 'x' + node.getAttribute('height');
      }
      if (node.hasAttribute('title')) {
        txt += ' "' + node.getAttribute('title') + '"';
      }
      txt += ')';
    }
    return txt;
  });
  showdown.subParser('makeMarkdown.links', function (node, globals) {
    'use strict';

    var txt = '';
    if (node.hasChildNodes() && node.hasAttribute('href')) {
      var children = node.childNodes,
        childrenLength = children.length;
      txt = '[';
      for (var i = 0; i < childrenLength; ++i) {
        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
      }
      txt += '](';
      txt += '<' + node.getAttribute('href') + '>';
      if (node.hasAttribute('title')) {
        txt += ' "' + node.getAttribute('title') + '"';
      }
      txt += ')';
    }
    return txt;
  });
  showdown.subParser('makeMarkdown.list', function (node, globals, type) {
    'use strict';

    var txt = '';
    if (!node.hasChildNodes()) {
      return '';
    }
    var listItems = node.childNodes,
      listItemsLenght = listItems.length,
      listNum = node.getAttribute('start') || 1;
    for (var i = 0; i < listItemsLenght; ++i) {
      if (typeof listItems[i].tagName === 'undefined' || listItems[i].tagName.toLowerCase() !== 'li') {
        continue;
      }

      // define the bullet to use in list
      var bullet = '';
      if (type === 'ol') {
        bullet = listNum.toString() + '. ';
      } else {
        bullet = '- ';
      }

      // parse list item
      txt += bullet + showdown.subParser('makeMarkdown.listItem')(listItems[i], globals);
      ++listNum;
    }

    // add comment at the end to prevent consecutive lists to be parsed as one
    txt += '\n<!-- -->\n';
    return txt.trim();
  });
  showdown.subParser('makeMarkdown.listItem', function (node, globals) {
    'use strict';

    var listItemTxt = '';
    var children = node.childNodes,
      childrenLenght = children.length;
    for (var i = 0; i < childrenLenght; ++i) {
      listItemTxt += showdown.subParser('makeMarkdown.node')(children[i], globals);
    }
    // if it's only one liner, we need to add a newline at the end
    if (!/\n$/.test(listItemTxt)) {
      listItemTxt += '\n';
    } else {
      // it's multiparagraph, so we need to indent
      listItemTxt = listItemTxt.split('\n').join('\n    ').replace(/^ {4}$/gm, '').replace(/\n\n+/g, '\n\n');
    }
    return listItemTxt;
  });
  showdown.subParser('makeMarkdown.node', function (node, globals, spansOnly) {
    'use strict';

    spansOnly = spansOnly || false;
    var txt = '';

    // edge case of text without wrapper paragraph
    if (node.nodeType === 3) {
      return showdown.subParser('makeMarkdown.txt')(node, globals);
    }

    // HTML comment
    if (node.nodeType === 8) {
      return '<!--' + node.data + '-->\n\n';
    }

    // process only node elements
    if (node.nodeType !== 1) {
      return '';
    }
    var tagName = node.tagName.toLowerCase();
    switch (tagName) {
      //
      // BLOCKS
      //
      case 'h1':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.header')(node, globals, 1) + '\n\n';
        }
        break;
      case 'h2':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.header')(node, globals, 2) + '\n\n';
        }
        break;
      case 'h3':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.header')(node, globals, 3) + '\n\n';
        }
        break;
      case 'h4':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.header')(node, globals, 4) + '\n\n';
        }
        break;
      case 'h5':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.header')(node, globals, 5) + '\n\n';
        }
        break;
      case 'h6':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.header')(node, globals, 6) + '\n\n';
        }
        break;
      case 'p':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.paragraph')(node, globals) + '\n\n';
        }
        break;
      case 'blockquote':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.blockquote')(node, globals) + '\n\n';
        }
        break;
      case 'hr':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.hr')(node, globals) + '\n\n';
        }
        break;
      case 'ol':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ol') + '\n\n';
        }
        break;
      case 'ul':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ul') + '\n\n';
        }
        break;
      case 'precode':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.codeBlock')(node, globals) + '\n\n';
        }
        break;
      case 'pre':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.pre')(node, globals) + '\n\n';
        }
        break;
      case 'table':
        if (!spansOnly) {
          txt = showdown.subParser('makeMarkdown.table')(node, globals) + '\n\n';
        }
        break;

      //
      // SPANS
      //
      case 'code':
        txt = showdown.subParser('makeMarkdown.codeSpan')(node, globals);
        break;
      case 'em':
      case 'i':
        txt = showdown.subParser('makeMarkdown.emphasis')(node, globals);
        break;
      case 'strong':
      case 'b':
        txt = showdown.subParser('makeMarkdown.strong')(node, globals);
        break;
      case 'del':
        txt = showdown.subParser('makeMarkdown.strikethrough')(node, globals);
        break;
      case 'a':
        txt = showdown.subParser('makeMarkdown.links')(node, globals);
        break;
      case 'img':
        txt = showdown.subParser('makeMarkdown.image')(node, globals);
        break;
      default:
        txt = node.outerHTML + '\n\n';
    }

    // common normalization
    // TODO eventually

    return txt;
  });
  showdown.subParser('makeMarkdown.paragraph', function (node, globals) {
    'use strict';

    var txt = '';
    if (node.hasChildNodes()) {
      var children = node.childNodes,
        childrenLength = children.length;
      for (var i = 0; i < childrenLength; ++i) {
        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
      }
    }

    // some text normalization
    txt = txt.trim();
    return txt;
  });
  showdown.subParser('makeMarkdown.pre', function (node, globals) {
    'use strict';

    var num = node.getAttribute('prenum');
    return '<pre>' + globals.preList[num] + '</pre>';
  });
  showdown.subParser('makeMarkdown.strikethrough', function (node, globals) {
    'use strict';

    var txt = '';
    if (node.hasChildNodes()) {
      txt += '~~';
      var children = node.childNodes,
        childrenLength = children.length;
      for (var i = 0; i < childrenLength; ++i) {
        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
      }
      txt += '~~';
    }
    return txt;
  });
  showdown.subParser('makeMarkdown.strong', function (node, globals) {
    'use strict';

    var txt = '';
    if (node.hasChildNodes()) {
      txt += '**';
      var children = node.childNodes,
        childrenLength = children.length;
      for (var i = 0; i < childrenLength; ++i) {
        txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
      }
      txt += '**';
    }
    return txt;
  });
  showdown.subParser('makeMarkdown.table', function (node, globals) {
    'use strict';

    var txt = '',
      tableArray = [[], []],
      headings = node.querySelectorAll('thead>tr>th'),
      rows = node.querySelectorAll('tbody>tr'),
      i,
      ii;
    for (i = 0; i < headings.length; ++i) {
      var headContent = showdown.subParser('makeMarkdown.tableCell')(headings[i], globals),
        allign = '---';
      if (headings[i].hasAttribute('style')) {
        var style = headings[i].getAttribute('style').toLowerCase().replace(/\s/g, '');
        switch (style) {
          case 'text-align:left;':
            allign = ':---';
            break;
          case 'text-align:right;':
            allign = '---:';
            break;
          case 'text-align:center;':
            allign = ':---:';
            break;
        }
      }
      tableArray[0][i] = headContent.trim();
      tableArray[1][i] = allign;
    }
    for (i = 0; i < rows.length; ++i) {
      var r = tableArray.push([]) - 1,
        cols = rows[i].getElementsByTagName('td');
      for (ii = 0; ii < headings.length; ++ii) {
        var cellContent = ' ';
        if (typeof cols[ii] !== 'undefined') {
          cellContent = showdown.subParser('makeMarkdown.tableCell')(cols[ii], globals);
        }
        tableArray[r].push(cellContent);
      }
    }
    var cellSpacesCount = 3;
    for (i = 0; i < tableArray.length; ++i) {
      for (ii = 0; ii < tableArray[i].length; ++ii) {
        var strLen = tableArray[i][ii].length;
        if (strLen > cellSpacesCount) {
          cellSpacesCount = strLen;
        }
      }
    }
    for (i = 0; i < tableArray.length; ++i) {
      for (ii = 0; ii < tableArray[i].length; ++ii) {
        if (i === 1) {
          if (tableArray[i][ii].slice(-1) === ':') {
            tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':';
          } else {
            tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-');
          }
        } else {
          tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount);
        }
      }
      txt += '| ' + tableArray[i].join(' | ') + ' |\n';
    }
    return txt.trim();
  });
  showdown.subParser('makeMarkdown.tableCell', function (node, globals) {
    'use strict';

    var txt = '';
    if (!node.hasChildNodes()) {
      return '';
    }
    var children = node.childNodes,
      childrenLength = children.length;
    for (var i = 0; i < childrenLength; ++i) {
      txt += showdown.subParser('makeMarkdown.node')(children[i], globals, true);
    }
    return txt.trim();
  });
  showdown.subParser('makeMarkdown.txt', function (node) {
    'use strict';

    var txt = node.nodeValue;

    // multiple spaces are collapsed
    txt = txt.replace(/ +/g, ' ');

    // replace the custom ¨NBSP; with a space
    txt = txt.replace(/¨NBSP;/g, ' ');

    // ", <, > and & should replace escaped html entities
    txt = showdown.helper.unescapeHTMLEntities(txt);

    // escape markdown magic characters
    // emphasis, strong and strikethrough - can appear everywhere
    // we also escape pipe (|) because of tables
    // and escape ` because of code blocks and spans
    txt = txt.replace(/([*_~|`])/g, '\\$1');

    // escape > because of blockquotes
    txt = txt.replace(/^(\s*)>/g, '\\$1>');

    // hash character, only troublesome at the beginning of a line because of headers
    txt = txt.replace(/^#/gm, '\\#');

    // horizontal rules
    txt = txt.replace(/^(\s*)([-=]{3,})(\s*)$/, '$1\\$2$3');

    // dot, because of ordered lists, only troublesome at the beginning of a line when preceded by an integer
    txt = txt.replace(/^( {0,3}\d+)\./gm, '$1\\.');

    // +, * and -, at the beginning of a line becomes a list, so we need to escape them also (asterisk was already escaped)
    txt = txt.replace(/^( {0,3})([+-])/gm, '$1\\$2');

    // images and links, ] followed by ( is problematic, so we escape it
    txt = txt.replace(/]([\s]*)\(/g, '\\]$1\\(');

    // reference URIs must also be escaped
    txt = txt.replace(/^ {0,3}\[([\S \t]*?)]:/gm, '\\[$1]:');
    return txt;
  });
  var root = this;

  // AMD Loader
  if (true) {
    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
      'use strict';

      return showdown;
    }).call(exports, __webpack_require__, exports, module),
		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));

    // CommonJS/nodeJS Loader
  } else {}
}).call(void 0);

/***/ }),

/***/ 57008:
/***/ ((module) => {

"use strict";


/**
 * When source maps are enabled, `style-loader` uses a link element with a data-uri to
 * embed the css on the page. This breaks all relative urls because now they are relative to a
 * bundle instead of the current page.
 *
 * One solution is to only use full urls, but that may be impossible.
 *
 * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
 *
 * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
 *
 */

module.exports = function (css) {
  // get current location
  var location = typeof window !== "undefined" && window.location;
  if (!location) {
    throw new Error("fixUrls requires window.location");
  }

  // blank or null?
  if (!css || typeof css !== "string") {
    return css;
  }
  var baseUrl = location.protocol + "//" + location.host;
  var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");

  // convert each url(...)
  /*
  This regular expression is just a way to recursively match brackets within
  a string.
  	 /url\s*\(  = Match on the word "url" with any whitespace after it and then a parens
     (  = Start a capturing group
       (?:  = Start a non-capturing group
           [^)(]  = Match anything that isn't a parentheses
           |  = OR
           \(  = Match a start parentheses
               (?:  = Start another non-capturing groups
                   [^)(]+  = Match anything that isn't a parentheses
                   |  = OR
                   \(  = Match a start parentheses
                       [^)(]*  = Match anything that isn't a parentheses
                   \)  = Match a end parentheses
               )  = End Group
               *\) = Match anything and then a close parens
           )  = Close non-capturing group
           *  = Match anything
        )  = Close capturing group
   \)  = Match a close parens
  	 /gi  = Get all matches, not the first.  Be case insensitive.
   */
  var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function (fullMatch, origUrl) {
    // strip quotes (if they exist)
    var unquotedOrigUrl = origUrl.trim().replace(/^"(.*)"$/, function (o, $1) {
      return $1;
    }).replace(/^'(.*)'$/, function (o, $1) {
      return $1;
    });

    // already a full url? no change
    if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
      return fullMatch;
    }

    // convert the url to a full url
    var newUrl;
    if (unquotedOrigUrl.indexOf("//") === 0) {
      //TODO: should we add protocol?
      newUrl = unquotedOrigUrl;
    } else if (unquotedOrigUrl.indexOf("/") === 0) {
      // path should be relative to the base url
      newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
    } else {
      // path should be relative to current directory
      newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
    }

    // send back the fixed url(...)
    return "url(" + JSON.stringify(newUrl) + ")";
  });

  // send back the fixed css
  return fixedCss;
};

/***/ }),

/***/ 81919:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-align-box {\r\n    display: table;\r\n}\r\n\r\n.as-align-box-cell {\r\n    display: table-cell;\r\n}\r\n\r\n.as-align-box-cell>.as-relative-layout,\r\n.as-align-box-cell>.absol-bscroller,\r\n.as-align-box-cell>.as-linear-layout,\r\n.as-align-box-cell>.as-chain-layout\r\n {\r\n    display: inline-block;\r\n}", ""]);



/***/ }),

/***/ 50601:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-resize-box.as-focus .as-resize-box-body {\r\n    border-color: rgb(255, 174, 0);\r\n}\r\n\r\n\r\n.as-resize-box.as-focus .as-resize-box-dot {\r\n    background: rgb(255, 174, 0);\r\n}\r\n\r\n\r\n.as-align-vertical-line {\r\n    margin-left: 0.5px;\r\n    border-left: solid 1px rgba(255, 100, 100, 0.2);\r\n}\r\n\r\n\r\n.as-align-horizontal-line {\r\n    margin-top: 0.5px;\r\n    border-top: solid 1px rgba(255, 100, 100, 0.2);\r\n}\r\n\r\n.as-align-vertical-line,\r\n.as-align-horizontal-line {\r\n    position: absolute;\r\n    box-sizing: border-box;\r\n    z-index: 1;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-align-vertical-line.as-active,\r\n.as-align-horizontal-line.as-active {\r\n    border-color: rgba(255, 100, 100, 0.9);\r\n}\r\n\r\n\r\n.as-hae-new-pos {\r\n    position: absolute;\r\n    width: 100px;\r\n    height: 100px;\r\n    left: 0;\r\n    top: 0;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-hae-new-pos::before {\r\n    content: \"\";\r\n    position: absolute;\r\n}\r\n\r\n\r\n.as-hae-new-pos[data-type=\"before\"][data-of-pos=\"block\"]::before {\r\n    left: 0;\r\n    top: -2px;\r\n    width: 100%;\r\n    border-top: 4px solid #0080ff;\r\n}\r\n\r\n\r\n.as-hae-new-pos[data-type=\"after\"][data-of-pos=\"block\"]::before {\r\n    left: 0;\r\n    bottom: -2px;\r\n    width: 100%;\r\n    border-top: 4px solid #0080ff;\r\n}\r\n\r\n.as-hae-new-pos[data-type=\"before\"][data-of-pos=\"inline-block\"]::before,\r\n.as-hae-new-pos[data-type=\"before\"][data-of-pos=\"inline\"]::before {\r\n    left: -2px;\r\n    top: 0;\r\n    height: 100%;\r\n    border-left: 4px solid #0080ff;\r\n}\r\n\r\n.as-hae-new-pos[data-type=\"after\"][data-of-pos=\"inline-block\"]::before,\r\n.as-hae-new-pos[data-type=\"after\"][data-of-pos=\"inline\"]::before {\r\n    right: -2px;\r\n    top: 0;\r\n    height: 100%;\r\n    border-left: 4px solid #0080ff;\r\n}\r\n\r\n\r\n.as-layout-editor-foreground .as-resize-box.as-order-moving .as-resize-box-body {\r\n    background-color: rgba(255, 220, 220, 0.5);\r\n}\r\n\r\n", ""]);



/***/ }),

/***/ 80479:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-array-of-fragment {\r\n    overflow: auto;\r\n    position: relative;\r\n}\r\n\r\n.as-array-of-fragment-item {\r\n    display: block;\r\n\r\n}\r\n", ""]);



/***/ }),

/***/ 50134:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-style-value-declare {\r\n    --as-left: unset;\r\n    --as-right: unset;\r\n    --as-top: unset;\r\n    --as-bottom: unset;\r\n    --as-width: unset;\r\n    --as-height: unset;\r\n    --as-min-height: unset;\r\n    --as-min-width: unset;\r\n    --as-view-width: unset;\r\n    --as-view-height: unset;\r\n}\r\n\r\n.as-base-component:not(.as-width-auto) {\r\n    width: var(--as-width);\r\n}\r\n\r\n.as-base-component:not(.as-height-auto) {\r\n    height: var(--as-height);\r\n}\r\n\r\n\r\n.as-relative-layout {\r\n    position: relative;\r\n    --as-layout-view-height: var(--as-view-height);\r\n    --as-layout-view-width: var(--as-view-width);\r\n}\r\n\r\n.as-relative-layout.as-height-auto {\r\n    height: var(--as-min-height);\r\n}\r\n\r\n.as-relative-layout.as-width-auto {\r\n    width: var(--as-min-width);\r\n}\r\n\r\n.as-relative-layout > .as-base-component {\r\n    position: absolute;\r\n}\r\n\r\n.as-relative-layout > .as-base-component.as-h-align-left,\r\n.as-relative-layout > .as-base-component.as-h-align-fixed {\r\n    left: var(--as-left);\r\n}\r\n\r\n.as-relative-layout > .as-base-component.as-h-align-center {\r\n    left: calc(50% - var(--as-view-width) * 0.5);\r\n}\r\n\r\n.as-relative-layout > .as-base-component.as-h-align-right,\r\n.as-relative-layout > .as-base-component.as-h-align-fixed {\r\n    right: var(--as-right);\r\n}\r\n\r\n.as-relative-layout > .as-base-component.as-h-align-fixed {\r\n    width: auto;\r\n}\r\n\r\n.as-relative-layout.as-width-auto > .as-base-component.as-v-align-center {\r\n    left: calc(var(--as-layout-view-width) * 0.5 - var(--as-view-width) * 0.5);\r\n}\r\n\r\n\r\n.as-relative-layout > .as-base-component.as-v-align-top,\r\n.as-relative-layout > .as-base-component.as-v-align-fixed {\r\n    top: var(--as-top);\r\n}\r\n\r\n.as-relative-layout > .as-base-component.as-v-align-center {\r\n    top: calc(50% - var(--as-view-height) * 0.5);\r\n}\r\n\r\n\r\n.as-relative-layout > .as-base-component.as-v-align-bottom,\r\n.as-relative-layout > .as-base-component.as-v-align-fixed {\r\n    bottom: var(--as-bottom);\r\n}\r\n\r\n.as-relative-layout.as-height-auto > .as-base-component.as-v-align-center {\r\n    top: calc(var(--as-layout-view-height) * 0.5 - var(--as-view-height) * 0.5); /*not calc 50% of height*/\r\n}\r\n\r\n.as-relative-layout > .as-base-component.as-v-align-fixed {\r\n    height: auto;\r\n}\r\n\r\n/**************************************/\r\n.as-linear-layout::before, .as-linear-layout::after {\r\n    content: \"\";\r\n    display: block;\r\n    height: 0px;\r\n}\r\n\r\n.as-linear-layout > .as-base-component {\r\n    display: block;\r\n}\r\n\r\n.as-linear-layout > .as-base-component.as-component-content-scaleless {\r\n    display: table;\r\n}\r\n\r\n.as-chain-layout > .as-base-component {\r\n    display: inline-block;\r\n}\r\n\r\n.as-chain-layout > .as-base-component.as-component-content-scaleless {\r\n    display: inline-table;\r\n}\r\n\r\n.as-chain-layout > .as-base-component.as-v-align-top {\r\n    vertical-align: top;\r\n}\r\n\r\n.as-chain-layout > .as-base-component.as-v-align-center {\r\n    vertical-align: center;\r\n}\r\n\r\n\r\n.as-chain-layout > .as-base-component.as-v-align-bottom {\r\n    vertical-align: bottom;\r\n}\r\n\r\n\r\n/********************************************************************************/\r\n.as-grid-layout,\r\n.as-grid-layout.as-display-block,\r\n.as-linear-layout>.as-grid-layout.as-base-component{\r\n    display: grid;\r\n}\r\n\r\n.as-grid-layout.as-display-inline-block,\r\n.as-grid-layout.as-display-inline {\r\n    display: inline-grid;\r\n}\r\n\r\n\r\n/********************************************************************************/\r\n\r\n.as-base-component {\r\n    pointer-events: all;\r\n    box-sizing: border-box;\r\n    text-align: left;\r\n    --as-margin-left: 0;\r\n    --as-margin-right: 0;\r\n    --as-margin-top: 0;\r\n    --as-margin-bottom: 0;\r\n    --as-left: 0;\r\n    --as-top: 0;\r\n    --as-right: 0;\r\n    --as-bottom: 0;\r\n}\r\n\r\n.as-base-component textarea {\r\n    resize: none;\r\n    font-style: inherit;\r\n    font-size: inherit;\r\n    font-weight: inherit;\r\n    color: inherit;\r\n    font-family: inherit;\r\n}\r\n\r\n.as-component-content-scaleless {\r\n    display: inline-table;\r\n}\r\n\r\n.as-base-component.as-component-content-scaleless.as-display-block {\r\n    display: table; /*TODO: hidden*/\r\n}\r\n\r\n.as-component-content-scaleless-cell {\r\n    display: table-cell;\r\n    width: 100%;\r\n    font-style: inherit;\r\n    font-size: inherit;\r\n    font-weight: inherit;\r\n    color: inherit;\r\n    font-family: inherit;\r\n}\r\n\r\n.as-component-content-scaleless.as-align-left-top > .as-component-content-scaleless-cell {\r\n    text-align: left;\r\n    vertical-align: top;\r\n}\r\n\r\n.as-component-content-scaleless.as-align-right-top > .as-component-content-scaleless-cell {\r\n    text-align: right;\r\n    vertical-align: top;\r\n}\r\n\r\n.as-component-content-scaleless.as-align-center-top > .as-component-content-scaleless-cell {\r\n    text-align: center;\r\n    vertical-align: top;\r\n}\r\n\r\n\r\n.as-component-content-scaleless.as-align-left-center > .as-component-content-scaleless-cell {\r\n    text-align: left;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-component-content-scaleless.as-align-right-center > .as-component-content-scaleless-cell {\r\n    text-align: right;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-component-content-scaleless.as-align-center-center > .as-component-content-scaleless-cell {\r\n    text-align: center;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-component-content-scaleless.as-align-left-bottom > .as-component-content-scaleless-cell {\r\n    text-align: left;\r\n    vertical-align: bottom;\r\n}\r\n\r\n.as-component-content-scaleless.as-align-right-bottom > .as-component-content-scaleless-cell {\r\n    text-align: right;\r\n    vertical-align: bottom;\r\n}\r\n\r\n.as-component-content-scaleless.as-align-center-bottom > .as-component-content-scaleless-cell {\r\n    text-align: center;\r\n    vertical-align: bottom;\r\n}\r\n\r\n.as-component-content-scaleless-cell {\r\n    font-style: inherit;\r\n    font-size: inherit;\r\n    font-weight: inherit;\r\n    color: inherit;\r\n    font-family: inherit;\r\n}\r\n\r\n\r\n.as-component-content-scaleless-cell > div {\r\n    display: inline-block;\r\n    font-style: inherit;\r\n    font-size: inherit;\r\n    font-weight: inherit;\r\n    color: inherit;\r\n    font-family: inherit;\r\n}\r\n\r\n.as-base-component label {\r\n    font-style: inherit;\r\n    font-size: inherit;\r\n    font-weight: inherit;\r\n    color: inherit;\r\n    font-family: inherit;\r\n}\r\n\r\n.as-linear-layout, .as-chain-layout {\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-chain-layout {\r\n    text-align: left;\r\n}\r\n\r\n.as-chain-layout.as-h-align-item-center {\r\n    text-align: center;\r\n}\r\n\r\n\r\n.as-chain-layout.as-h-align-item-right {\r\n    text-align: right;\r\n}\r\n\r\n\r\n.as-hyper-layout,\r\n.as-hyper-layout > .as-hyper-layout.as-position-static {\r\n    position: relative;\r\n}\r\n\r\n\r\n.as-hyper-layout {\r\n    --as-layout-view-height: var(--as-view-height);\r\n    --as-layout-view-width: var(--as-view-width);\r\n    text-align: left;\r\n}\r\n\r\n.as-hyper-layout.as-content-align-center {\r\n    text-align: center;\r\n}\r\n\r\n.as-hyper-layout.as-content-align-right {\r\n    text-align: right;\r\n}\r\n\r\n\r\n.as-base-component.as-display-inline-block,\r\n.as-layout-editor-layout-container .as-base-component.as-display-inline-block.as-disembark,\r\n.as-layout-editor-layout-container .as-base-component.as-display-inline-block.as-display-hidden {\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.as-base-component.as-display-inline,\r\n.as-layout-editor-layout-container .as-base-component.as-display-inline.as-disembark,\r\n.as-layout-editor-layout-container .as-base-component.as-display-inline.as-display-hidden {\r\n    display: inline;\r\n}\r\n\r\n.as-base-component.as-display-block,\r\n.as-layout-editor-layout-container .as-base-component.as-display-block.as-disembark,\r\n.as-layout-editor-layout-container .as-base-component.as-display-block.as-display-hidden {\r\n    display: block;\r\n}\r\n\r\n.as-base-component.as-display-inline-block.as-component-content-scaleless,\r\n.as-layout-editor-layout-container .as-base-component.as-display-inline-block.as-component-content-scaleless.as-disembark,\r\n.as-layout-editor-layout-container .as-base-component.as-display-inline-block.as-component-content-scaleless.as-display-hidden {\r\n    display: inline-table;\r\n}\r\n\r\n\r\n.as-base-component.as-display-inline-block.as-v-align-center {\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-base-component.as-display-inline-block.as-v-align-top {\r\n    vertical-align: top;\r\n}\r\n\r\n\r\n.as-base-component.as-display-inline-block.as-v-align-bottom {\r\n    vertical-align: bottom;\r\n}\r\n\r\n.as-hyper-layout > .as-base-component.as-position-absolute {\r\n    position: absolute;\r\n}\r\n\r\n.as-hyper-layout > .as-base-component.as-position-relative {\r\n    position: relative;\r\n}\r\n\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-h-align-left,\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-h-align-fixed,\r\n.as-hyper-layout > .as-base-component.as-position-relative.as-h-align-left {\r\n    left: var(--as-left);\r\n}\r\n\r\n\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-h-align-right,\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-h-align-fixed,\r\n.as-hyper-layout > .as-base-component.as-position-relative.as-h-align-right {\r\n    right: var(--as-right);\r\n}\r\n\r\n\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-v-align-top,\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-v-align-fixed,\r\n.as-hyper-layout > .as-base-component.as-position-relative.as-v-align-top {\r\n    top: var(--as-top);\r\n}\r\n\r\n\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-v-align-bottom,\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-v-align-fixed,\r\n.as-hyper-layout > .as-base-component.as-position-relative.as-v-align-bottom {\r\n    bottom: var(--as-bottom);\r\n}\r\n\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-h-align-center {\r\n    left: calc(50% - var(--as-view-width) * 0.5);\r\n}\r\n\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-v-align-center {\r\n    top: calc(50% - var(--as-view-height) * 0.5);\r\n}\r\n\r\n\r\n.as-hyper-layout.as-width-auto > .as-base-component.as-position-absolute.as-h-align-center {\r\n    left: calc(var(--as-layout-view-width) * 0.5 - var(--as-view-width) * 0.5);\r\n}\r\n\r\n.as-hyper-layout.as-height-auto > .as-base-component.as-position-absolute.as-v-align-center {\r\n    top: calc(var(--as-layout-view-height) * 0.5 - var(--as-view-height) * 0.5);\r\n}\r\n\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-h-align-fixed {\r\n    width: unset;\r\n}\r\n\r\n.as-hyper-layout > .as-base-component.as-position-absolute.as-v-align-fixed {\r\n    height: unset;\r\n}\r\n\r\n.as-hyper-layout > .as-image.as-position-absolute.as-h-align-fixed.as-height-auto:not(.as-v-align-fixed) {\r\n    height: calc(var(--as-view-width) / var(--as-image-ratio));\r\n}\r\n\r\n.as-hyper-layout > .as-base-component.as-position-static,\r\n.as-hyper-layout > .as-base-component.as-position-relative {\r\n    margin: var(--as-margin-top) var(--as-margin-right) var(--as-margin-bottom) var(--as-margin-left);\r\n}\r\n\r\n\r\n.as-hyper-layout > .as-base-component:not(.as-position-absolute).as-float-right {\r\n    float: right;\r\n}\r\n\r\n\r\n/*.as-linear-layout::before {*/\r\n/*    content: \"\";*/\r\n/*    display: block;*/\r\n/*    height: 1px;*/\r\n/*    margin-bottom: -1px;*/\r\n/*    overflow-x: visible;*/\r\n/*}*/\r\n\r\n/*.as-linear-layout::after,*/\r\n.as-array-of-fragment::after {\r\n    content: \"\";\r\n    display: block;\r\n    height: 1px;\r\n    margin-top: -1px;\r\n    overflow-x: visible;\r\n}\r\n\r\n\r\n.as-base-component.as-disembark,\r\n.as-linear-anchor-box.as-disembark,\r\n.as-chain-anchor-box.as-disembark,\r\n.as-base-component.as-display-inline-block.as-component-content-scaleless.as-disembark {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-disembark,\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-disembark {\r\n    display: block;\r\n}\r\n\r\n.as-layout-editor-layout-container .as-chain-anchor-box.as-disembark {\r\n    display: inline-block;\r\n}\r\n\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-disembark,\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-disembark,\r\n.as-layout-editor-layout-container .as-chain-anchor-box.as-disembark,\r\n.as-layout-editor-layout-container .as-relative-layout > .as-base-component.as-disembark,\r\n.as-layout-editor-layout-container .as-hyper-layout > .as-base-component.as-disembark {\r\n    background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.5), rgba(45, 52, 52, 0.5) 1px, rgba(255, 255, 255, 0.5) 2px, rgba(255, 255, 255, 0.5) 5px);\r\n}\r\n\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-disembark > .as-base-component,\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-disembark > .as-base-component,\r\n.as-layout-editor-layout-container .as-chain-anchor-box.as-disembark > .as-base-component {\r\n    opacity: 0.8;\r\n}\r\n\r\n\r\n.as-relative-layout > .as-base-component.as-display-hidden,\r\n.as-hyper-layout > .as-base-component.as-display-hidden,\r\n.as-base-component.as-display-inline-block.as-component-content-scaleless.as-display-hidden,\r\n.as-linear-anchor-box.as-display-hidden,\r\n.as-chain-anchor-box.as-display-hidden,\r\n\r\n.as-relative-layout > .as-base-component.as-union-hidden,\r\n.as-hyper-layout > .as-base-component.as-union-hidden,\r\n.as-base-component.as-display-inline-block.as-component-content-scaleless.as-union-hidden,\r\n.as-linear-anchor-box.as-union-hidden,\r\n.as-chain-anchor-box.as-union-hidden{\r\n    display: none;\r\n}\r\n\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-display-hidden,\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-display-hidden {\r\n    display: block;\r\n}\r\n\r\n\r\n\r\n.as-layout-editor-layout-container .as-chain-anchor-box.as-display-hidden {\r\n    display: inline-block;\r\n}\r\n\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-display-hidden,\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-display-hidden,\r\n.as-layout-editor-layout-container .as-chain-anchor-box.as-display-hidden,\r\n.as-layout-editor-layout-container .as-relative-layout > .as-base-component.as-display-hidden,\r\n.as-layout-editor-layout-container .as-hyper-layout > .as-base-component.as-display-hidden {\r\n    background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.5), rgba(234, 110, 110, 0.5) 1px, rgba(255, 255, 255, 0.5) 2px, rgba(255, 255, 255, 0.5) 5px);\r\n}\r\n\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-union-hidden,\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-union-hidden,\r\n.as-layout-editor-layout-container .as-chain-anchor-box.as-union-hidden,\r\n.as-layout-editor-layout-container .as-relative-layout > .as-base-component.as-union-hidden,\r\n.as-layout-editor-layout-container .as-hyper-layout > .as-base-component.as-union-hidden {\r\n    background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.5), rgba(110, 255,234, 0.5) 1px, rgba(255, 255, 255, 0.5) 2px, rgba(255, 255, 255, 0.5) 5px);\r\n}\r\n\r\n\r\n.as-layout-editor-layout-container .as-relative-layout > .as-base-component.as-display-hidden > *,\r\n.as-layout-editor-layout-container .as-relative-layout > .as-base-component.as-disembark > *,\r\n.as-layout-editor-layout-container .as-hyper-layout > .as-base-component.as-disembark > * {\r\n    opacity: 0.3;\r\n}\r\n\r\n.as-layout-editor-layout-container .as-relative-layout > .as-base-component.as-display-hidden,\r\n.as-layout-editor-layout-container .as-relative-layout > .as-base-component.as-disembark {\r\n    display: block;\r\n}\r\n\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-display-hidden > .as-base-component,\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-display-hidden > .as-base-component,\r\n.as-layout-editor-layout-container .as-chain-anchor-box.as-display-hidden > .as-base-component {\r\n    opacity: 0.3;\r\n}\r\n\r\n\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-display-hidden.as-disembark,\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-display-hidden.as-disembark,\r\n.as-layout-editor-layout-container .as-chain-anchor-box.as-display-hidden.as-disembark,\r\n.as-layout-editor-layout-container .as-relative-layout > .as-base-component.as-display-hidden.as-disembark,\r\n.as-layout-editor-layout-container .as-hyper-layout > .as-base-component.as-display-hidden.as-disembark {\r\n    background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.5), rgba(234, 110, 110, 0.5) 1px, rgba(255, 255, 255, 0.5) 2px, rgba(255, 255, 255, 0.5) 5px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.5), rgba(45, 52, 52, 0.5) 1px, rgba(255, 255, 255, 0.5) 2px, rgba(255, 255, 255, 0.5) 5px);\r\n}\r\n\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-display-hidden > .as-base-component,\r\n.as-layout-editor-layout-container .as-linear-anchor-box.as-display-hidden > .as-base-component,\r\n.as-layout-editor-layout-container .as-chain-anchor-box.as-display-hidden > .as-base-component {\r\n    opacity: 0.3;\r\n}\r\n\r\n\r\n.as-printer-content > .as-linear-layout {\r\n    padding: 0 !important;\r\n    width: 642px !important;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    font-size: 14px;\r\n    border: none !important;\r\n    box-shadow: none !important;\r\n    box-sizing: border-box !important;\r\n}\r\n\r\n/******TEMP FIXED*********/\r\n.as-hyper-layout > .as-relative-layout {\r\n    min-height: var(--as-min-height);\r\n}", ""]);



/***/ }),

/***/ 71283:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-frame > .as-block-editor {\r\n    width: 100%;\r\n    height: 100%;\r\n    display: flex;\r\n    flex-direction: column;\r\n}\r\n\r\n.as-block-editor {\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    font-size: 14px;\r\n    outline: none;\r\n}\r\n\r\n.as-block-editor-header {\r\n    border-bottom: 1px solid #dddddd;\r\n}\r\n\r\n.as-block-editor-body {\r\n    padding: 10px;\r\n    overflow-y: auto;\r\n    box-sizing: border-box;\r\n    flex-grow: 1;\r\n}\r\n\r\n\r\n.as-be-base {\r\n    background-color: white;\r\n    white-space: pre;\r\n    border-radius: 3px;\r\n    -webkit-box-shadow: 0 0 0 1px #dddddd;\r\n    box-shadow: 0 0 0 1px #dddddd;\r\n}\r\n\r\n.as-be-base.as-activated {\r\n    -webkit-box-shadow: 0 0 0 2px rgb(32, 150, 218);\r\n    box-shadow: 0 0 0 3px rgb(32, 150, 218);\r\n}\r\n\r\n.as-be-base.as-activated.as-focus {\r\n    -webkit-box-shadow: 0 0 0 2px rgba(250, 174, 0, 1);\r\n    box-shadow: 0 0 0 3px rgba(250, 174, 0, 1);\r\n}\r\n\r\n.as-be-base:not(:last-child) {\r\n    margin-bottom: 10px;\r\n}\r\n\r\n.as-be-base-header {\r\n    height: 30px;\r\n    padding-left: 10px;\r\n    background-color: rgba(169, 169, 170, 0.11659);\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    position: relative;\r\n}\r\n\r\n.as-be-base-header-right-ctn {\r\n    position: absolute;\r\n    top: 0;\r\n    right: 10px;\r\n    bottom: 0;\r\n}\r\n\r\n.as-be-base-header-right-ctn::after {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n.as-be-base-header-right-ctn > div {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    margin-left: 10px;\r\n}\r\n\r\n\r\n.as-be-base-permission-ctn {\r\n\r\n}\r\n\r\n\r\n.as-be-base-permission-ctn > .mdi {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-be-base[data-permission-owner=\"system\"] .as-be-base-permission-ctn .mdi.mdi-lock-outline {\r\n    display: inline-block;\r\n}\r\n\r\n.as-be-base-permission-ctn .mdi.mdi-lock-outline {\r\n    color: red;\r\n    display: none;\r\n}\r\n\r\n.as-be-base:not(.as-has-lines) .as-be-line-count-ctn {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-be-base-header > .mdi {\r\n    font-size: 1.2em;\r\n    margin-right: 0.35em;\r\n}\r\n\r\n\r\nspan.as-be-base-tag {\r\n    line-height: 30px;\r\n    font-weight: bold;\r\n    color: rgb(69, 69, 70);\r\n}\r\n\r\n.as-be-base-body {\r\n    padding-left: 15px;\r\n    padding-right: 10px;\r\n    padding-top: 10px;\r\n}\r\n\r\n.as-be-base-attribute {\r\n    display: flex;\r\n    padding-bottom: 10px;\r\n}\r\n\r\n\r\n.as-be-base-attribute-name-ctn {\r\n    padding-right: 20px;\r\n}\r\n\r\n.as-be-base-attribute-name {\r\n    width: 60px;\r\n    line-height: 24px;\r\n    display: inline-block;\r\n}\r\n\r\n.as-be-base-attribute-value-ctn {\r\n    flex-grow: 1;\r\n}\r\n\r\n.as-be-function-args-add-btn {\r\n    margin-left: 5px;\r\n}\r\n\r\n.as-be-function-args-add-btn,\r\n.as-be-function-arg-new-input {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-be-base-id {\r\n    height: 24px;\r\n    font-size: 14px;\r\n    border: 1px solid #dddddd;\r\n    outline: none;\r\n}\r\n\r\n.as-be-function-arg-new-input {\r\n    min-width: 50px;\r\n    -webkit-box-shadow: 0 0 0 1px #dddddd;\r\n    box-shadow: 0 0 0 1px #dddddd;\r\n\r\n}\r\n\r\n.as-be-function-arg {\r\n    font-family: inherit;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-size: 14px;\r\n    height: 24px;\r\n    margin-left: 5px;\r\n    line-height: 24px;\r\n    outline: none;\r\n    overflow-y: hidden;\r\n    padding-right: 0.35em;\r\n    padding-left: 0.35em;\r\n}\r\n\r\n.as-be-function-body {\r\n    min-height: 32px;\r\n}\r\n\r\n.as-be-file-downloader-file-name {\r\n    width: 100%;\r\n}\r\n\r\n.as-be-base input[type=\"text\"],\r\n.as-be-base input[type=\"number\"] {\r\n    height: 24px;\r\n    font-size: 14px;\r\n    border: 1px solid #dddddd;\r\n    outline: none;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.as-be-base-attribute-value-ctn > input[type=\"text\"],\r\n.as-be-base-attribute-value-ctn > textarea {\r\n    width: 100%;\r\n}\r\n\r\n.as-be-base-attribute-value-ctn > textarea {\r\n    border: 1px solid #dddddd;\r\n    outline: none;\r\n    box-sizing: border-box;\r\n    font-size: 14px;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n}\r\n\r\n\r\n.as-be-base[data-tag=\"CBExtendConfig\"] .as-be-base-attribute:last-child {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 42946:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "\r\n.as-chain-anchor-box {\r\n    display: inline-block;\r\n}\r\n\r\n.as-chain-anchor-box.as-v-align-top {\r\n    vertical-align: top;\r\n}\r\n\r\n.as-chain-anchor-box.as-v-align-center {\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-chain-anchor-box.as-v-align-bottom {\r\n    vertical-align: bottom;\r\n}\r\n\r\n\r\n.as-chain-anchor-box>.as-base-component{\r\n    width: 100%;\r\n    height: 100%;\r\n}", ""]);



/***/ }),

/***/ 9279:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-tab-frame > .as-cde {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-cde {\r\n    display: flex;\r\n    flex-direction: column;\r\n    align-items: stretch;\r\n    outline: none;\r\n}\r\n\r\n\r\n.as-cde-header {\r\n    border-bottom: 1px solid #dddddd;\r\n}\r\n\r\n.as-cde-body {\r\n    flex-grow: 1;\r\n    position: relative;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-cde-v-scroll-bar {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    width: 10px;\r\n    bottom: 10px;\r\n    z-index: 2;\r\n}\r\n\r\n.as-cde-h-scroll-bar {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 10px;\r\n    bottom: 0;\r\n    height: 10px;\r\n    z-index: 2;\r\n}\r\n\r\n.as-cde-v-scroll-bar:not(.as-overflow),\r\n.as-cde-h-scroll-bar:not(.as-overflow) {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-cde-line-layer {\r\n    position: absolute;\r\n    z-index: 0;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n}\r\n\r\n.as-cde-node-layer {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    z-index: 1;\r\n    overflow: visible;\r\n}\r\n\r\n.as-cde-node-layer > .as-cde-node {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    z-index: 3;\r\n}\r\n\r\n\r\n.as-cde-node {\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    background-color: rgb(252, 252, 255, 0.75);\r\n    -webkit-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    -moz-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    display: inline-block;\r\n    border-radius: 4px;\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n}\r\n\r\n.as-cde-node.as-focus,\r\n.as-cde-node.as-selected.as-focus {\r\n    background-color: rgb(252, 252, 255, 0.9);\r\n    -webkit-box-shadow: 2px 2px 9px 0px rgba(150, 150, 20, 1);\r\n    -moz-box-shadow: 2px 2px 9px 0px rgba(150, 150, 20, 1);\r\n    box-shadow: 2px 2px 9px 0px rgba(150, 150, 20, 1);\r\n}\r\n\r\n.as-cde-node.as-selected {\r\n    -webkit-box-shadow: 2px 2px 9px 0px rgb(20, 150, 124);\r\n    -moz-box-shadow: 2px 2px 9px 0px rgb(20, 150, 124);\r\n    box-shadow: 2px 2px 9px 0px rgb(20, 150, 124);\r\n}\r\n\r\n\r\n.as-cde-node-layer > .as-cde-node.as-focus {\r\n    z-index: 5;\r\n}\r\n\r\n.as-cde-node-header {\r\n    padding: 10px 5px;\r\n    background-color: rgba(169, 169, 169, 0.15);\r\n    white-space: nowrap;\r\n}\r\n\r\n\r\n.as-cde-node-name-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-cde-node-type-icon {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-size: 18px;\r\n    width: 1em;\r\n    height: 1em;\r\n}\r\n\r\n.as-cde-node-name {\r\n    font-weight: bold;\r\n    white-space: pre;\r\n}\r\n\r\n.as-cde-node-description {\r\n    font-size: 10px;\r\n    color: rgb(104, 104, 104);\r\n}\r\n\r\n.as-cde-node-body {\r\n    white-space: nowrap;\r\n    display: flex;\r\n    justify-content: space-between;\r\n    padding: 2px 0;\r\n}\r\n\r\n.as-cde-node-input-ctn,\r\n.as-cde-node-output-ctn {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n}\r\n\r\n.as-cde-node-input-ctn {\r\n    text-align: left;\r\n    padding-right: 5px;\r\n}\r\n\r\n.as-cde-node-output-ctn {\r\n    text-align: right;\r\n    padding-left: 5px;\r\n}\r\n\r\n.as-cde-node-pin {\r\n    height: 20px;\r\n    cursor: default;\r\n}\r\n\r\n\r\n.as-cde-node-input-ctn > .as-cde-node-pin {\r\n    border-radius: 0 10px 10px 0;\r\n    padding-left: 2px;\r\n    padding-right: 10px;\r\n}\r\n\r\n.as-cde-node-input-ctn .as-cde-node-pin-ico {\r\n    margin-right: 0.25em;\r\n}\r\n\r\n.as-cde-node-output-ctn > .as-cde-node-pin {\r\n    border-radius: 10px 0 0 10px;\r\n    padding-right: 2px;\r\n    padding-left: 10px;\r\n}\r\n\r\n.as-cde-node-output-ctn .as-cde-node-pin-ico {\r\n    margin-left: 0.25em;\r\n}\r\n\r\n.as-cde-node-pin:hover {\r\n    background-color: rgba(0, 80, 255, 0.15);\r\n}\r\n\r\n.as-cde-node-pin.as-active,\r\n.as-cde-node-pin:active {\r\n    background-color: rgba(0, 250, 255, 0.35);\r\n}\r\n\r\n.as-cde-node-pin > svg,\r\n.as-cde-node-pin > span,\r\n.as-cde-node-pin::before {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-cde-node-pin::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n\r\n.as-cde-node-pin-ico {\r\n    width: 1em;\r\n    height: 1em;\r\n}\r\n\r\n.as-cde-node-pin-ico path {\r\n    fill: rgb(69, 69, 69);\r\n}\r\n\r\n.as-cde-line-group {\r\n    --line-color: red;\r\n    --line-lock-color: green;\r\n}\r\n\r\n.as-cde-line-group[data-permission-owner=\"system\"] .as-cde-line-lock {\r\n    display: initial;\r\n}\r\n\r\n.as-cde-line {\r\n    stroke-width: 2;\r\n    /*stroke: rgb(69, 69, 69);*/\r\n    stroke: var(--line-color);\r\n    fill: none;\r\n}\r\n\r\n.as-cde-line-lock {\r\n    stroke-dasharray: 10, 5, 2, 2, 2, 5;\r\n    pointer-events: none;\r\n    display: none;\r\n    stroke: var(--line-lock-color);\r\n    fill: none;\r\n    stroke-width: 1.5;\r\n}\r\n\r\n.as-cde-line-group.as-new .as-cde-hit-line {\r\n    display: none;\r\n}\r\n\r\n.as-cde-line-text,\r\n.as-cde-line-text-shadow {\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    font-size: 14px;\r\n\r\n}\r\n\r\n.as-cde-line-text-shadow {\r\n    stroke-width: 4;\r\n    stroke: white;\r\n    fill: white;\r\n}\r\n\r\n\r\n.as-cde-hit-line {\r\n    stroke-width: 8;\r\n    /*stroke: rgb(69, 69, 69);*/\r\n    stroke: transparent;\r\n    fill: none;\r\n}\r\n\r\n.as-cde-line-group:hover .as-cde-hit-line {\r\n    stroke: rgb(230, 250, 0, 0.5);\r\n}\r\n\r\n.as-cde-line-group.as-selected .as-cde-hit-line {\r\n    stroke: rgba(0, 250, 217, 1);\r\n}\r\n\r\n.as-cde-line-group.as-selected.as-focus .as-cde-hit-line,\r\n.as-cde-line-group.as-focus .as-cde-hit-line {\r\n    stroke: rgba(250, 221, 0, 1);\r\n}\r\n\r\n\r\n\r\n/*.as-cde.as-choose-remove-line .as-cde-line-group:hover*/\r\n/*{*/\r\n/*    cursor: url(\"https://absol.cf/libs/absol-full/assets/cursor-remove.cur\"), auto;*/\r\n/*}*/", ""]);



/***/ }),

/***/ 44270:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --sb-color: #5BA55B;\r\n}\r\n\r\n\r\n.sb-quick-menu {\r\n    max-height: calc(100vh - 80px);\r\n    overflow-y: auto;\r\n}\r\n\r\n\r\n.sb-menu-selection-title {\r\n    font-size: 12px;\r\n    color: rgb(120, 120, 120);\r\n    padding: 5px 10px 5px 10px;\r\n    font-weight: bold;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.sb-token-selection {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    background-color: rgba(255, 255, 255, 0.5);\r\n    box-sizing: border-box;\r\n    padding: 2px 3px 2px 2px;\r\n    border-radius: 0.3em;\r\n    color: black;\r\n    cursor: pointer;\r\n    user-select: none;\r\n    white-space: nowrap;\r\n}\r\n\r\n.sb-token-selection:active {\r\n    background-color: rgba(255, 255, 255, 0.8);\r\n}\r\n\r\n.sb-inline-text {\r\n    display: inline-block;\r\n    line-height: 2em;\r\n    white-space: pre;\r\n}\r\n\r\n.sb-token-selection::after {\r\n    content: \"▼\";\r\n    margin-left: 1em;\r\n    white-space: pre;\r\n    font-size: 0.7em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    color: #606060;\r\n}\r\n\r\n.sb-identifier-input {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    background-color: rgba(255, 255, 255, 0.5);\r\n    box-sizing: border-box;\r\n    padding: 2px 3px 2px 2px;\r\n    border-radius: 0.3em;\r\n    color: black;\r\n    user-select: none;\r\n    border: none;\r\n    outline: none;\r\n}\r\n\r\n.sb-identifier-input-dialog {\r\n    padding: 5px;\r\n    background-color: white;\r\n}\r\n\r\n\r\n.sb-variable {\r\n    padding-top: 5px;\r\n    padding-bottom: 5px;\r\n    --sb-color: #a5a15b;\r\n}\r\n\r\n\r\n.sb-block-sub-ctn.as-quick-menu-attached > .sb-block > svg > .sb-block-bound {\r\n    stroke-width: 2;\r\n    stroke: #f9bf2f;\r\n}\r\n\r\n.sb-block {\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    display: inline-block;\r\n    padding-right: 10px;\r\n    padding-left: 10px;\r\n    position: relative;\r\n    z-index: 1;\r\n    overflow: visible;\r\n    box-sizing: border-box;\r\n    color: white;\r\n    min-height: 2em;\r\n    min-width: 4em;\r\n    vertical-align: middle;\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n    pointer-events: none;\r\n}\r\n\r\n.sb-block > * {\r\n    z-index: 10;\r\n    position: relative;\r\n}\r\n\r\n.sb-block-img {\r\n    position: absolute;\r\n    left: -10px;\r\n    top: 0;\r\n    height: calc(100% + 5px);\r\n    width: calc(100% + 10px);\r\n    z-index: 0;\r\n    pointer-events: none;\r\n}\r\n\r\n\r\n.sb-block-bound {\r\n    stroke: rgba(255, 255, 255, 0.5);\r\n    stroke-width: 1;\r\n    fill: var(--sb-color);\r\n    fill-rule: evenodd;\r\n    -webkit-box-shadow: inset 1px 1px 1px 2px rgba(255, 255, 255, 0.75);\r\n    box-shadow: inset 1px 1px 1px 2px rgba(255, 255, 255, 0.75);\r\n}\r\n\r\n.sb-block > span {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    margin-top: 5px;\r\n    margin-bottom: 5px;\r\n}\r\n\r\n\r\n.sb-block-sub-ctn {\r\n    min-height: 1.5em;\r\n    /*background-color: rgba(84, 221, 242, 0.5);*/\r\n    min-width: 2.5em;\r\n    box-sizing: border-box;\r\n}\r\n\r\n/* handle event*/\r\n\r\n\r\n.sb-block-bound,\r\n.sb-block button,\r\n.sb-block input,\r\n.sb-block .sb-token-selection,\r\n.sb-block .as-preinput {\r\n    pointer-events: all;\r\n}\r\n\r\n/**************************************************************************/\r\n.sb-numeric-literal {\r\n    padding-top: 5px;\r\n    padding-bottom: 5px;\r\n    --sb-color: #0c7668;\r\n    padding-left: 15px;\r\n}\r\n\r\n.sb-numeric-literal .absol-number-input {\r\n    background-color: white;\r\n    width: calc(var(--text-width) + 15px);\r\n}\r\n\r\n.sb-numeric-literal {\r\n\r\n}\r\n\r\n/**************************************************************************/\r\n.sb-string-literal {\r\n    padding-top: 5px;\r\n    padding-bottom: 5px;\r\n    --sb-color: #0c6b76;\r\n    padding-left: 15px;\r\n    white-space: nowrap;\r\n}\r\n\r\n.sb-string-literal > .mdi {\r\n    pointer-events: none;\r\n}\r\n\r\n.sb-string-literal .sb-string-input {\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.sb-object-property .as-preinput {\r\n    background-color: rgba(255, 255, 255, 0.2);\r\n    padding: 0 0.3em;\r\n    vertical-align: middle;\r\n    line-height: 1.5;\r\n    outline: none;\r\n    display: inline-block;\r\n    white-space: pre;\r\n    min-width: 3em;\r\n}\r\n\r\n/**************************************************************************/\r\n.sb-boolean-literal {\r\n    padding-top: 5px;\r\n    padding-bottom: 5px;\r\n    font-weight: bold;\r\n    --sb-color: #919f8e;\r\n}\r\n\r\n.sb-boolean-literal .sb-token-selection {\r\n    color: darkred;\r\n}\r\n\r\n.sb-boolean-literal[data-value=\"true\"] .sb-token-selection {\r\n    color: #1e65ea;\r\n}\r\n\r\n/**************************************************************************/\r\n.sb-identifier {\r\n    --sb-color: rgb(24, 109, 160);\r\n    display: flex;\r\n    align-items: center;\r\n}\r\n\r\n.sb-sub-ctn > .sb-identifier > .sb-identifier-name {\r\n    pointer-events: none;\r\n}\r\n\r\n/**************************************************************************/\r\n.sb-if-statement {\r\n    padding-top: 0;\r\n    display: block;\r\n    padding-bottom: 5px;\r\n    --sb-color: #5B80A5;\r\n    position: relative;\r\n}\r\n\r\n\r\n.sb-if-statement-do,\r\n.sb-if-statement-else,\r\n.sb-if-statement-else-if,\r\n.sb-if-statement-if {\r\n    display: flex;\r\n}\r\n\r\n.sb-if-statement-do > .sb-inline-text,\r\n.sb-if-statement-else > .sb-inline-text {\r\n    width: 2.2em;\r\n}\r\n\r\n.sb-if-statement-do > .sb-block-sub-ctn,\r\n.sb-if-statement-else > .sb-block-sub-ctn {\r\n    padding-bottom: 5px;\r\n}\r\n\r\n.sb-if-statement-if > .sb-inline-text,\r\n.sb-if-statement-else-if > .sb-inline-text {\r\n    width: 4.5em;\r\n}\r\n\r\n\r\n.sb-if-statement-else {\r\n    padding-top: 5px;\r\n}\r\n\r\n.sb-if-statement-option-btn {\r\n    position: absolute;\r\n    top: 7px;\r\n    left: 30px;\r\n    z-index: 11;\r\n}\r\n\r\n\r\n.sb-if-statement-option-btn:hover,\r\n.sb-function-option-btn:hover,\r\n.sb-call-expression-option-btn:hover,\r\n.sb-member-chain-expression-option-btn:hover,\r\n.sb-option-btn:hover {\r\n    color: white;\r\n}\r\n\r\n\r\n.sb-function-option-btn, .sb-if-statement-option-btn, .sb-call-expression-option-btn,\r\n.sb-member-chain-expression-option-btn,\r\n.sb-option-btn {\r\n    width: 17px;\r\n    height: 17px;\r\n    font-size: 12px;\r\n    background-color: #0266b9;\r\n    border: 1px solid #d6d6d6;\r\n    color: #d6d6d6;\r\n    border-radius: 4px;\r\n    padding: 0;\r\n}\r\n\r\n.sb-option-btn .mdi::before {\r\n    display: block;\r\n}\r\n\r\n/************************************************************/\r\n.sb-while-statement {\r\n    --sb-color: #5ca55b;\r\n    padding-top: 0;\r\n    display: block;\r\n    padding-bottom: 5px;\r\n    position: relative;\r\n}\r\n\r\n.sb-while-statement-test {\r\n    display: flex;\r\n    align-items: stretch;\r\n}\r\n\r\n.sb-while-statement-test > .sb-inline-text {\r\n    width: 4.5em;\r\n}\r\n\r\n.sb-while-statement-test > .sb-block-sub-ctn {\r\n\r\n}\r\n\r\n.sb-while-statement-do {\r\n    white-space: nowrap;\r\n}\r\n\r\n.sb-while-statement-do > .sb-inline-text {\r\n    margin-right: 0.2em;\r\n    vertical-align: top;\r\n}\r\n\r\n.sb-while-statement-do > .sb-block-sub-ctn {\r\n    display: inline-block;\r\n    white-space: normal;\r\n    vertical-align: top;\r\n}\r\n\r\n\r\n/************************************************************/\r\n\r\n.sb-assign-statement {\r\n    --sb-color: #A55B80;\r\n    display: flex;\r\n    align-items: stretch;\r\n    flex-wrap: nowrap;\r\n}\r\n\r\n.sb-for-count-statement-body-ctn > .sb-block.sb-assign-statement,\r\n.sb-for-of-statement-body-ctn > .sb-block.sb-assign-statement,\r\n.sb-for-in-statement-body-ctn > .sb-block.sb-assign-statement {\r\n    display: flex;\r\n}\r\n\r\n\r\n.sb-assign-statement-front {\r\n    padding-top: 5px;\r\n}\r\n\r\n.sb-assign-statement-front > .sb-inline-text {\r\n    margin-right: 20px;\r\n}\r\n\r\n.sb-assign-statement-left-ctn {\r\n    margin-right: 20px;\r\n    margin-bottom: 5px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.sb-block > .sb-block-sub-ctn.sb-assign-statement-right-ctn {\r\n    vertical-align: middle;\r\n    margin-left: 20px;\r\n    display: inline-flex;\r\n    align-items: stretch;\r\n}\r\n\r\n.sb-assign-statement-left-ctn > .sb-identifier .sb-token-selection {\r\n    pointer-events: none;\r\n\r\n}\r\n\r\n\r\n/**************************************/\r\n\r\n.sb-binary-expression,\r\n.sb-unary-expression {\r\n    display: flex;\r\n    align-items: center;\r\n    padding-top: 5px;\r\n    padding-bottom: 5px;\r\n    --sb-color: rgba(91, 103, 165, 1);\r\n}\r\n\r\n.sb-binary-expression-left-ctn,\r\n.sb-binary-expression-right-ctn,\r\n.sb-unary-expression-argument-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.sb-binary-expression-left-ctn {\r\n    margin-right: 10px;\r\n    margin-left: 10px;\r\n}\r\n\r\n.sb-binary-expression-right-ctn, .sb-unary-expression-argument-ctn {\r\n    margin-left: 20px;\r\n}\r\n\r\n\r\n/**************************************/\r\n\r\n.sb-add-expression {\r\n    --sb-color: rgba(91, 103, 165, 0.5);\r\n    cursor: pointer;\r\n}\r\n\r\n\r\n.sb-add-expression:active {\r\n    --sb-color: rgba(91, 103, 165, 0.3);\r\n}\r\n\r\n.sb-add-statement {\r\n    --sb-color: rgba(91, 128, 165, 0.5);\r\n    cursor: pointer;\r\n}\r\n\r\n\r\n.sb-add-statement:active {\r\n    --sb-color: rgba(91, 128, 165, 0.3);\r\n}\r\n\r\n.sb-add-argument-declaration {\r\n    --sb-color: rgba(153, 91, 165, 0.5);\r\n}\r\n\r\n\r\n.sb-add-argument-declaration:active {\r\n    --sb-color: rgba(153, 91, 165, 0.3);\r\n\r\n}\r\n\r\n\r\n.sb-add-variable-declaration {\r\n    --sb-color: rgba(165, 161, 91, 0.5);\r\n\r\n}\r\n\r\n.sb-add-statement, .sb-add-expression, .sb-add-variable-declaration, .sb-add-argument-declaration, .sb-add-referent {\r\n    font-weight: bold;\r\n}\r\n\r\n.sb-add-referent {\r\n    --sb-color: rgba(165, 138, 91, 0.5);\r\n}\r\n\r\n.sb-add-referent:active {\r\n    --sb-color: rgba(165, 138, 91, 0.3);\r\n}\r\n\r\n\r\n/*********** FOR_COUNT_STATEMENT ***********************************/\r\n\r\n.sb-for-count-statement,\r\n.sb-for-of-statement,\r\n.sb-for-in-statement {\r\n    padding-bottom: 5px;\r\n    display: block;\r\n    --sb-color: #16a416;\r\n}\r\n\r\n.sb-for-of-statement {\r\n    --sb-color: #1b691b;\r\n}\r\n\r\n.sb-for-in-statement {\r\n    --sb-color: #44be44;\r\n}\r\n\r\n.sb-for-count-statement-for-ctn,\r\n.sb-for-count-statement-from-ctn,\r\n.sb-for-count-statement-to-ctn,\r\n.sb-for-of-statement-of-ctn,\r\n.sb-for-of-statement-for-ctn,\r\n.sb-for-in-statement-for-ctn,\r\n.sb-for-in-statement-in-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    margin: 5px 5px 5px 20px;\r\n}\r\n\r\n.sb-for-count-statement-body-ctn,\r\n.sb-for-of-statement-body-ctn,\r\n.sb-for-in-statement-body-ctn {\r\n    display: block;\r\n    padding-bottom: 5px;\r\n}\r\n\r\n.sb-for-count-statement-body-ctn > .sb-block,\r\n.sb-for-of-statement-body-ctn > .sb-block,\r\n.sb-for-in-statement-body-ctn > .sb-block {\r\n    display: block;\r\n}\r\n\r\n.sb-break-statement {\r\n    --sb-color: green;\r\n}\r\n\r\n/******** function **********************************************/\r\n.sb-function {\r\n    --sb-color: #995BA5;\r\n    display: block;\r\n    padding-bottom: 5px;\r\n}\r\n\r\n.sb-function-type::before {\r\n    content: \"proceduce\";\r\n}\r\n\r\n.sb-function[data-function-type=\"function\"] > .sb-function-head .sb-function-type::before {\r\n    content: \"function\";\r\n}\r\n\r\n\r\n.sb-function-head {\r\n    padding-top: 5px;\r\n    padding-bottom: 5px;\r\n}\r\n\r\n.sb-function-head-left > * {\r\n    margin-right: 10px;\r\n}\r\n\r\n.sb-function-head-left {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.sb-function-argument-ctn {\r\n    min-height: 1.5em;\r\n    min-width: 3em;\r\n    padding-bottom: 5px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.sb-function-argument-ctn > .sb-block {\r\n    display: block;\r\n}\r\n\r\n\r\n.sb-function-option-btn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    margin-right: 1em;\r\n}\r\n\r\n\r\n.sb-function-statement-body-ctn {\r\n    padding-bottom: 5px;\r\n}\r\n\r\n\r\n.sb-function-statement-body-ctn > .sb-variable-declaration {\r\n    display: flex;\r\n}\r\n\r\n.sb-function[data-function-type=\"function\"] {\r\n    padding-bottom: 0;\r\n}\r\n\r\n.sb-function-statement-return-row {\r\n    padding-left: calc(1em + 17px);\r\n    min-height: 20px;\r\n    white-space: nowrap;\r\n    display: none;\r\n}\r\n\r\n.sb-function[data-function-type=\"function\"] > .sb-function-statement-return-row {\r\n    display: block;\r\n}\r\n\r\n\r\n.sb-function-statement-return-row > .sb-inline-text,\r\n.sb-function-statement-return-row > .sb-block-sub-ctn {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n}\r\n\r\n.sb-function-statement-return-row > .sb-inline-text {\r\n    line-height: 2;\r\n    margin-right: 1em;\r\n}\r\n\r\n\r\n/*******************************************************/\r\n\r\n.sb-argument-declaration {\r\n}\r\n\r\n.sb-argument-declaration > input,\r\n.sb-argument-declaration > span:not(:last-child) {\r\n    margin-right: 10px;\r\n}\r\n\r\n.sb-argument-declaration:not(.sb-has-type-parameters) .sb-argument-declaration-of-text,\r\n.sb-argument-declaration:not(.sb-has-type-parameters) .sb-argument-declaration-of {\r\n    display: none;\r\n}\r\n\r\n/*******************************************************/\r\n\r\n.sb-call-expression-statement.sb-call-expression {\r\n    --sb-color: #6d41a2;\r\n    display: block;\r\n}\r\n\r\n\r\n/*******************************************************/\r\n.sb-variable-declaration {\r\n    --sb-color: #AA5588;\r\n    display: flex;\r\n    align-items: stretch;\r\n}\r\n\r\n.sb-variable-declaration:not(.sb-has-init) .sb-variable-declaration-right {\r\n    display: none;\r\n}\r\n\r\n.sb-variable-declaration-left {\r\n    padding-right: 20px;\r\n}\r\n\r\n.sb-variable-declaration-left::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 30px;\r\n}\r\n\r\n\r\n.sb-variable-declaration-left > input,\r\n.sb-variable-declaration-left > span:not(:last-child),\r\n.sb-variable-declaration-left > .sb-token-selection {\r\n    margin-right: 10px;\r\n}\r\n\r\n\r\n.sb-block.as-selected.as-last-selected > .sb-block-img > .sb-block-bound {\r\n    stroke: yellow;\r\n    stroke-width: 2;\r\n}\r\n\r\n/***********************************************************************************************************************/\r\n\r\n.sb-call-expression {\r\n    position: relative;\r\n    --argument-text-width: 50px;\r\n    --sb-color: #4141a2;\r\n}\r\n\r\n.sb-call-expression[data-arguments-length=\"0\"] > .sb-call-expression-with-ctn {\r\n    display: none;\r\n}\r\n\r\n.sb-call-expression-option-btn {\r\n    position: absolute;\r\n    top: 5px;\r\n    left: 4.2em;\r\n    z-index: 11;\r\n}\r\n\r\n.sb-call-expression-callee-row {\r\n    white-space: nowrap;\r\n    pointer-events: none;\r\n}\r\n\r\n/*.sb-call-expression-callee-ctn {*/\r\n/*    pointer-events: initial;*/\r\n/*}*/\r\n\r\n.sb-call-expression-callee-row > .sb-inline-text:first-child {\r\n    width: calc(var(--argument-text-width) + 1.5em);\r\n    vertical-align: top;\r\n    pointer-events: none;\r\n}\r\n\r\n.sb-call-expression-callee-row > .sb-inline-text:first-child::before {\r\n    content: \"call\";\r\n}\r\n\r\n.sb-call-expression-callee-ctn {\r\n    min-height: 30px;\r\n    display: inline-block;\r\n    vertical-align: top;\r\n}\r\n\r\n.sb-call-expression-param {\r\n    white-space: nowrap;\r\n}\r\n\r\n.sb-call-expression-param-name,\r\n.sb-call-expression-param-value-ctn {\r\n    display: inline-block;\r\n}\r\n\r\n.sb-call-expression-param-name {\r\n    width: var(--argument-text-width);\r\n\r\n}\r\n\r\n.sb-call-expression-with-ctn {\r\n    white-space: nowrap;\r\n\r\n}\r\n\r\n.sb-call-expression-argument-list-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    margin-left: 1em;\r\n}\r\n\r\n.sb-call-expression[data-ast-type=\"NewExpression\"] {\r\n    --sb-color: #a07c41;\r\n}\r\n\r\n.sb-call-expression[data-ast-type=\"NewExpression\"] > .sb-call-expression-callee-row > .sb-inline-text:first-child::before {\r\n    content: \"new\";\r\n}\r\n\r\n\r\n/******************************/\r\n\r\n.sb-member-chain-expression {\r\n    padding: 5px 30px 5px 15px;\r\n    position: relative;\r\n    --sb-color: #3e5f2a;\r\n}\r\n\r\n.sb-member-chain-expression-object,\r\n.sb-member-chain-expression-access-member {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.sb-member-chain-expression-option-btn {\r\n    position: absolute;\r\n    right: 5px;\r\n    top: calc(50% - 9px);\r\n}\r\n\r\n.sb-member-chain-expression-property-ctn,\r\n.sb-member-chain-expression-object-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n\r\n}\r\n\r\n.sb-member-chain-expression-property-ctn.sb-computed {\r\n    padding-left: 5px;\r\n}\r\n\r\n.sb-member-chain-expression-property-ctn > .sb-block-sub-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.sb-member-chain-expression-property-ctn.sb-computed::before {\r\n    content: \"[\";\r\n    padding-right: 15px;\r\n    padding-left: 10px;\r\n}\r\n\r\n\r\n.sb-member-chain-expression-property-ctn.sb-computed::after {\r\n    content: \"]\";\r\n    padding-left: 10px;\r\n}\r\n\r\n.sb-member-chain-expression-property-ctn.sb-computed::before,\r\n.sb-member-chain-expression-property-ctn.sb-computed::after {\r\n    font-size: 20px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    line-height: 1;\r\n    text-rendering: auto;\r\n    padding-bottom: 3px;\r\n}\r\n\r\n\r\n/***********************************************************************************************************************/\r\n.sb-array-expression {\r\n    --sb-color: #38949b;\r\n    display: flex;\r\n    align-items: stretch;\r\n}\r\n\r\n\r\n.sb-array-expression-text {\r\n    padding-right: 20px;\r\n}\r\n\r\n.sb-array-expression-text::before {\r\n    content: \"array with\";\r\n}\r\n\r\n\r\n.sb-array-element-wrapper {\r\n    display: block;\r\n}\r\n\r\n.sb-array-element-wrapper::before {\r\n    display: inline-block;\r\n    width: 3em;\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n    content: \"[\" attr(data-idx) \"]\";\r\n    vertical-align: middle;\r\n    text-align: right;\r\n    padding-right: 1em;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.sb-array-element-wrapper > * {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n/***********************************************************************************************************************/\r\n\r\n\r\n.sb-object-expression {\r\n    --sb-color: #296b9d;\r\n}\r\n\r\n.sb-object-expression > .sb-sub-ctn {\r\n    /*margin-left: 30px;*/\r\n    display: block;\r\n}\r\n\r\n\r\n.sb-add-object-property {\r\n    display: block;\r\n    --sb-color: rgba(71, 153, 169, 0.5);\r\n}\r\n\r\n.sb-add-object-property:active {\r\n    --sb-color: rgba(71, 153, 169, 0.3);\r\n}\r\n\r\n.sb-object-expression > .sb-inline-text {\r\n    font-weight: bold;\r\n}\r\n\r\n.sb-object-property {\r\n    --sb-color: #277e95;\r\n    display: block;\r\n}\r\n\r\n.sb-object-property[data-key-type=\"Identifier\"] > .sb-object-property-key > .sb-string-input,\r\n.sb-object-property[data-key-type=\"Identifier\"] > .sb-object-property-key > .mdi {\r\n    display: none;\r\n}\r\n\r\n\r\n.sb-object-property[data-key-type=\"StringLiteral\"] > .sb-object-property-key > input {\r\n    display: none;\r\n}\r\n\r\n.sb-object-property-key > span,\r\n.sb-object-property-key > .sb-string-input {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.sb-object-property-key > .sb-string-input {\r\n    margin-top: 5px;\r\n    margin-bottom: 5px;\r\n}\r\n\r\n.sb-object-property-key > .sb-option-btn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    margin-right: 0.5em;\r\n}\r\n\r\n.sb-object-property-key {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    padding: 5px 0;\r\n}\r\n\r\n.sb-object-property > .sb-sub-ctn {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    margin-left: 1em;\r\n}\r\n\r\n/***********************/\r\n\r\n.sb-return-statement {\r\n    --sb-color: #ab3939;\r\n    display: block;\r\n}\r\n\r\n.sb-return-statement-left, .sb-return-statement-argument-ctn {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n}\r\n\r\n.sb-return-statement-left {\r\n    margin-right: 2em;\r\n}\r\n\r\n.sb-function[data-function-type=\"procedure\"] .sb-return-statement-argument-ctn {\r\n    display: none;\r\n}\r\n\r\n\r\n/*********************/\r\n.sb-null-literal {\r\n    --sb-color: #8e581e;\r\n}\r\n\r\n.sb-null-literal .sb-inline-text {\r\n    font-weight: bold;\r\n}\r\n\r\n/***********************************************************************************************************************/\r\n\r\n\r\n.sb-blockly-editor,\r\n.sc-javascript-editor {\r\n    display: flex;\r\n    align-items: stretch;\r\n    flex-direction: column;\r\n    border: 1px solid #d6d6d6;\r\n    box-sizing: border-box;\r\n    outline: none;\r\n}\r\n\r\n.sb-blockly-editor-header,\r\n.sc-javascript-editor-header {\r\n    border-bottom: 1px solid #d6d6d6;\r\n    background-color: #F8F8F8;\r\n}\r\n\r\n.sb-blockly-editor-body,\r\n.sc-javascript-editor-body {\r\n    overflow: hidden;\r\n    flex-grow: 1;\r\n    position: relative;\r\n    z-index: 100; /*fix background of block*/\r\n}\r\n\r\n\r\n.sb-blockly-editor-content{\r\n    position: absolute;\r\n    padding: 10px 10px 10px 5px;\r\n    left: 0;\r\n    top: 0;\r\n    width: 5000px;\r\n    pointer-events: none;\r\n}\r\n\r\n.sb-blockly-editor-content::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    z-index: -100;\r\n    /*background-color: #2d3434;*/\r\n}\r\n\r\n.sb-blockly-editor-content > .sb-block {\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.sc-javascript-editor-content {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    padding: 0;\r\n    margin: 0;\r\n}\r\n\r\n.as-quick-menu-trigger > .sb-identifier .sb-identifier-name {\r\n    pointer-events: none;\r\n}\r\n\r\n.sb-blockly-editor-v-scrollbar,\r\n.sb-blockly-editor-h-scrollbar {\r\n    position: absolute;\r\n    right: 0;\r\n    bottom: 0;\r\n    z-index: 10;\r\n    background-color: rgba(180, 180, 180, 0.2);\r\n    visibility: hidden;\r\n\r\n\r\n}\r\n\r\n.sb-blockly-editor-v-scrollbar.as-overflow,\r\n.sb-blockly-editor-h-scrollbar.as-overflow {\r\n    visibility: visible;\r\n}\r\n\r\n.sb-blockly-editor-v-scrollbar {\r\n    width: 10px;\r\n    top: 0;\r\n}\r\n\r\n.sb-blockly-editor-h-scrollbar {\r\n    position: absolute;\r\n    height: 10px;\r\n    left: 0;\r\n}\r\n\r\n\r\n/************************************************************************************/\r\n\r\n\r\n/************************************************************************************/\r\n\r\n.as-message-dialog.sc-type-selection-dialog {\r\n    z-index: 1000;\r\n    width: 500px;\r\n    max-width: 50vw;\r\n\r\n}\r\n\r\n.sc-type-selection-dialog .as-message-dialog-body {\r\n    padding-left: 0;\r\n    padding-right: 0;\r\n    padding-top: 0;\r\n}\r\n\r\n\r\n.sc-type-selection-dialog .absol-search-text-input {\r\n    margin: 5px;\r\n}\r\n\r\n.sc-type-selection-dialog .as-toc-item-quick-menu-ctn {\r\n    display: none;\r\n}\r\n\r\n.as-message-dialog-list-ctn {\r\n    overflow-y: auto;\r\n    max-height: calc(100vh - 150px);\r\n}\r\n\r\n.as-toc-item.sc-is-array .as-toc-item-ext-icon-ctn {\r\n    position: relative;\r\n}\r\n\r\n.as-toc-item.sc-is-array .as-toc-item-ext-icon-ctn::before {\r\n    content: \"[\";\r\n    font-size: 18px;\r\n    display: inline-block;\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n}\r\n\r\n.as-toc-item.sc-is-array .as-toc-item-ext-icon-ctn::after {\r\n    content: \"]\";\r\n    font-size: 18px;\r\n    display: inline-block;\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n}\r\n\r\n.sc-type-selection-dialog .as-toc-item.sc-selected {\r\n    background-color: #dddddd;\r\n}\r\n\r\n.sc-expression-input-dialog .as-preinput,\r\n.sc-statement-input-dialog .as-preinput {\r\n    min-height: 2em;\r\n    min-width: 200px;\r\n    max-width: 70vw;\r\n    white-space: pre-wrap;\r\n    border: 1px solid #dddddd;\r\n    display: inline-block;\r\n    outline: none;\r\n    box-sizing: border-box;\r\n    padding: 0.25em;\r\n}\r\n\r\n.sc-expression-input-dialog,\r\n.sc-statement-input-dialog {\r\n    background-color: white;\r\n    padding: 5px;\r\n    white-space: nowrap;\r\n}\r\n\r\n.sc-expression-input-dialog > *,\r\n.sc-statement-input-dialog > * {\r\n    vertical-align: middle;\r\n}\r\n\r\n.sc-expression-input-dialog > *:not(:first-child),\r\n.sc-statement-input-dialog > *:not(:first-child) {\r\n    margin-left: 5px;\r\n}\r\n\r\n\r\n/*****************************************************/\r\n.sb-string-input {\r\n    position: relative;\r\n    min-height: 1.5em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    box-sizing: border-box;\r\n    background-color: rgba(255, 255, 255, 0.2);\r\n}\r\n\r\n.sb-string-input-content {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    min-height: 1.5em;\r\n    white-space: pre;\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    box-sizing: border-box;\r\n    padding: 0 0.25em;\r\n    outline: none;\r\n    line-height: 20px;\r\n\r\n}\r\n\r\n\r\n/*****************************************************/\r\n\r\n.sb-blockly-clipboard-dialog .as-message-dialog-body {\r\n    padding: 10px 5px 10px 15px;\r\n    overflow: auto;\r\n    max-height: calc(90vh - 100px);\r\n}\r\n\r\n\r\n.sb-blockly-clipboard-content * {\r\n    pointer-events: none !important;\r\n}\r\n\r\n\r\n.sb-blockly-clipboard-content .sb-add-statement,\r\n.sb-blockly-clipboard-content .sb-add-argument-declaration,\r\n.sb-blockly-clipboard-content .sb-add-referent,\r\n.sb-blockly-clipboard-content .sb-add-expression {\r\n    display: none;\r\n}\r\n\r\n\r\n/*************************/\r\n\r\n.sb-sc-lang-editor-dialog {\r\n    background-color: white;\r\n    box-shadow: 2px 1px 5px 0px rgba(0, 0, 0, 0.75);\r\n    -webkit-box-shadow: 2px 1px 5px 0px rgba(0, 0, 0, 0.75);\r\n    -moz-box-shadow: 2px 1px 5px 0px rgba(0, 0, 0, 0.75);\r\n    padding: 5px;\r\n}\r\n\r\n.sb-sc-lang-editor-dialog-editor-ctn {\r\n    width: 960px;\r\n    max-width: 90vw;\r\n    height: calc(80vh - 200px);\r\n    box-shadow: 0px 0px 0px 1px #5d807e;;\r\n    -webkit-box-shadow: 0px 0px 0px 1px #5d807e;;\r\n    -moz-box-shadow: 0px 0px 0px 1px #5d807e;;\r\n\r\n}\r\n\r\n.sb-sc-lang-editor-dialog-error-message {\r\n    border-top: 1px solid #dddddd;\r\n    height: 5em;\r\n    padding: 5px 0;\r\n    box-sizing: border-box;\r\n    font-family: Consolas, serif;\r\n    white-space: pre;\r\n    overflow: auto;\r\n}", ""]);



/***/ }),

/***/ 59027:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-code-editor{\r\n    margin: 0;\r\n}", ""]);



/***/ }),

/***/ 7604:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "textarea.as-base-component {\r\n    resize: none;\r\n\r\n}\r\n\r\ninput.as-base-component,\r\ntextarea.as-base-component {\r\n    outline: none;\r\n    border: solid 1px #d6d6d6;\r\n    border-radius: 2px;\r\n    padding: var(--as-input-vertical-padding) var(--as-input-horizontal-padding);\r\n    font-size: var(--as-input-font-size);\r\n    font-family: var(--as-input-font-family);\r\n}\r\n\r\n.as-base-component {\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n\r\ntable.as-inner-table {\r\n    border-collapse: collapse;\r\n    box-sizing: border-box;\r\n    min-width: calc(100% - 1px);\r\n    min-height: calc(100% - 1px);\r\n    background: white;\r\n    box-sizing: border-box;\r\n}\r\n\r\ntable.as-inner-table > thead {\r\n    font-style: italic;\r\n    background: #f5f5f5;\r\n}\r\n\r\ntable.as-inner-table > tbody > tr > td,\r\ntable.as-inner-table > thead > tr > th {\r\n    border: 1px solid #aaaaaa;\r\n    box-sizing: border-box;\r\n    padding: 0.25em;\r\n    white-space: nowrap;\r\n}\r\n\r\n\r\n.as-base-component.as-text {\r\n    white-space: pre-wrap;\r\n    margin: 0;\r\n}\r\n\r\n.as-base-component.as-text:empty[data-place-holder]::before {\r\n    content: attr(data-place-holder);\r\n    opacity: 0.5;\r\n}\r\n\r\n.as-select-list-text {\r\n    white-space: nowrap;\r\n}\r\n\r\n\r\n.as-select-list-text > span {\r\n    border: none;\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    padding-left: 0;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    white-space: nowrap;\r\n    max-width: 100%;\r\n}\r\n\r\n.as-select-list-text::before {\r\n    content: \"\";\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n    height: 100%;\r\n}\r\n\r\nspan.cke_button_icon.cke_button__as-variable-box-ico_icon {\r\n    background-size: cover;\r\n    background-image: url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiICB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPHBhdGggZmlsbD0iIzAwMDBmZiIgZD0iTTE5IDNINUMzLjkgMyAzIDMuOSAzIDVWMTlDMyAyMC4xIDMuOSAyMSA1IDIxSDE5QzIwLjEgMjEgMjEgMjAuMSAyMSAxOVY1QzIxIDMuOSAyMC4xIDMgMTkgM003LjQgMThDNS45IDE2LjUgNSAxNC4zIDUgMTJTNS45IDcuNSA3LjQgNkw5IDYuN0M3LjcgNy45IDcgOS45IDcgMTJTNy43IDE2LjEgOSAxNy4zTDcuNCAxOE0xMi43IDE1TDExLjkgMTNMMTAuNSAxNUg5TDExLjMgMTEuOUwxMCA5SDExLjNMMTIuMSAxMUwxMy41IDlIMTVMMTIuOCAxMkwxNC4xIDE1SDEyLjdNMTYuNiAxOEwxNSAxNy4zQzE2LjMgMTYgMTcgMTQuMSAxNyAxMlMxNi4zIDcuOSAxNSA2LjdMMTYuNiA2QzE4LjEgNy41IDE5IDkuNyAxOSAxMlMxOC4xIDE2LjUgMTYuNiAxOFoiIC8+Cjwvc3ZnPg==\");\r\n}\r\n\r\n.as-ckeditor-wrapper .as-ck-inline-short-text {\r\n    width: 100% !important;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-selectmenu.as-read-only.as-keep-dropdown-icon svg.dropdown {\r\n    display: block;\r\n}\r\n\r\n.absol-selectmenu.as-read-only.as-keep-dropdown-icon {\r\n    cursor: pointer;\r\n}\r\n\r\ninput.as-select-list-text {\r\n    border: none;\r\n    padding-left: 0;\r\n}\r\n\r\n\r\n.as-base-component.as-text.as-decode-html {\r\n    white-space: normal;\r\n}\r\n\r\n\r\n.as-chain-anchor-box.as-width-auto > .absol-number-input.as-border-none input {\r\n    width: calc(0.4em + var(--text-width));\r\n}\r\n\r\n.as-chain-anchor-box.as-width-auto > .absol-number-input.as-border-none .absol-number-input-text-container {\r\n    position: static;\r\n    left: unset;\r\n    top: unset;\r\n    right: unset;\r\n    bottom: unset;\r\n    display: block;\r\n    height: 100%;\r\n}\r\n\r\n\r\n.absol-number-input.as-base-component[data-text-align=\"left\"] input {\r\n    text-align: left;\r\n}\r\n\r\n\r\n.absol-number-input.as-base-component[data-text-align=\"center\"] input {\r\n    text-align: center;\r\n}\r\n\r\n.absol-number-input.as-base-component[data-text-align=\"right\"] input {\r\n    text-align: right;\r\n}\r\n\r\n.absol-number-input.as-base-component.as-border-none.as-read-only[data-text-align=\"default\"] input {\r\n    text-align: left;\r\n}\r\n\r\n\r\n.as-height-auto > .absol-textarea2 {\r\n    min-height: var(--content-height);\r\n}\r\n\r\n.as-base-component.as-image {\r\n    --as-image-ratio: unset;\r\n    --as-natural-height: unset;\r\n    --as-natural-width: unset;\r\n    background-size: cover;\r\n\r\n}\r\n\r\n.as-hyper-layout > .as-base-component.as-image.as-position-static {\r\n    position: relative;\r\n}\r\n\r\n.as-base-component.as-image > img {\r\n    display: block;\r\n    position: absolute;\r\n    left: 0;\r\n    width: 100%;\r\n    top: 0;\r\n    height: 100%;\r\n}\r\n.as-base-component.as-image.as-empty {\r\n    min-height: 20px;\r\n    min-width: 20px;\r\n}\r\n\r\n.as-base-component.as-image.as-width-auto.as-height-auto {\r\n    width: var(--as-natural-width);\r\n    height: var(--as-natural-height);\r\n}\r\n\r\n.as-base-component.as-image.as-width-auto:not(.as-height-auto) {\r\n    height: var(--as-height);\r\n    width: calc(var(--as-height) * var(--as-image-ratio));\r\n}\r\n\r\n.as-base-component.as-image.as-height-auto:not(.as-width-auto) {\r\n    width: var(--as-width);\r\n    height: calc(var(--as-width) / var(--as-image-ratio));\r\n}\r\n\r\n\r\n.as-base-component.as-image.as-empty > img {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-base-component.as-image.as-empty {\r\n    background-position: center center;\r\n    background-repeat: no-repeat;\r\n    background-size: contain;\r\n    background-image: url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJ5ZXMiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iI2RkZGRkZCIgZD0iTTIzIDE4SDFMOC4yNSA4LjMzTDEwLjI1IDExTDE0IDZMMjMgMThNMTEuNSAxMi42N0wxNCAxNkwxOSAxNkwxNCA5LjMzTDExLjUgMTIuNjdNNSAxNkwxMS41IDE2TDguMjUgMTEuNjdMNSAxNloiIC8+PC9zdmc+\");\r\n}\r\n\r\n.as-base-component.as-empty.as-empty[data-place-holder=\"avatar\"] {\r\n    background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eaccount-outline%3C/title%3E%3Cpath style='fill:rgb(221,221,221)'  d='M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,6A2,2 0 0,0 10,8A2,2 0 0,0 12,10A2,2 0 0,0 14,8A2,2 0 0,0 12,6M12,13C14.67,13 20,14.33 20,17V20H4V17C4,14.33 9.33,13 12,13M12,14.9C9.03,14.9 5.9,16.36 5.9,17V18.1H18.1V17C18.1,16.36 14.97,14.9 12,14.9Z' /%3E%3C/svg%3E\");\r\n}\r\n\r\n\r\n.as-base-component.as-image.as-display-inline img {\r\n    position: static;\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.as-base-component.as-image.as-display-inline:not(.as-height-auto) img {\r\n    height: var(--as-height);\r\n}\r\n\r\n\r\n.as-base-component.as-image.as-display-inline:not(.as-width-auto) img {\r\n    width: var(--as-width);\r\n}\r\n\r\n.as-base-component:not(.as-height-auto) > .as-ck-placeholder {\r\n    height: var(--as-height);\r\n}\r\n\r\n\r\n.as-common-table {\r\n    border-collapse: collapse;\r\n}\r\n\r\n.as-common-table > thead {\r\n    background-color: #eeeeee;\r\n}\r\n\r\n.as-common-table > thead > tr > *,\r\n.as-common-table > tbody > tr > * {\r\n    border: 1px solid #dddddd;\r\n}", ""]);



/***/ }),

/***/ 50072:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-component-outline-node-selected > .absol-exp-node {\r\n    background-color: rgba(20, 185, 235, 0.3);\r\n}\r\n\r\n\r\n.as-component-outline-node-focus > .absol-exp-node {\r\n    background-color: rgba(185, 235, 20, 0.3);\r\n}\r\n\r\n\r\n.as-window-box-body >.as-component-outline {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n\r\n.as-component-outline-tree-ctn {\r\n    overflow-y: auto;\r\n    position: absolute;\r\n    left: 0;\r\n    width: 100%;\r\n    top: 30px;\r\n    bottom: 0;\r\n}\r\n\r\n.as-component-outline-tree-ctn.as-searching .absol-exp-tree:not(.as-in-search-result) {\r\n    display: none;\r\n}\r\n\r\n.as-component-outline-tree-ctn.as-in-search-result {\r\n    display: flex;\r\n    flex-direction: column;\r\n}\r\n\r\n.as-component-outline-tree-ctn.as-searching .absol-exp-items {\r\n    display: flex;\r\n    align-items: stretch;\r\n    flex-direction: column;\r\n}", ""]);



/***/ }),

/***/ 65074:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-window-box-body .as-component-picker {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-component-picker {\r\n    overflow-y: auto;\r\n}\r\n\r\n\r\n.as-component-picker-foreground {\r\n    position: fixed;\r\n    z-index: 1000;\r\n    cursor: none;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    overflow: hidden;\r\n    /* background: rgba(169, 169, 169, 0.1); */\r\n}\r\n\r\n.as-component-picker-higne {\r\n    position: relative;\r\n    left: 0;\r\n    top: 0;\r\n}\r\n\r\n.as-component-picker-add-box-container {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n}\r\n\r\n.as-component-picker-add-box {\r\n    position: relative;\r\n    width: 2em;\r\n    height: 2em;\r\n    background: white;\r\n    border: 1px solid #d6d6d6;\r\n    text-align: center;\r\n    opacity: 0.7;\r\n}\r\n\r\n.as-component-picker-add-box.as-can-drop {\r\n    opacity: 1;\r\n    -webkit-box-shadow: 0px 0px 5px 3px rgba(40, 141, 224, 0.6);\r\n    -moz-box-shadow: 0px 0px 5px 3px rgba(40, 141, 224, 0.6);\r\n    box-shadow: 0px 0px 5px 3px rgba(40, 141, 224, 0.6);\r\n}\r\n\r\n.as-component-picker-add-box-plus {\r\n    position: absolute;\r\n    left: -0.5em;\r\n    top: -0.5em;\r\n    width: 1em;\r\n    height: 1em;\r\n    text-align: center;\r\n    z-index: 1;\r\n}\r\n\r\n.as-component-picker-add-box-plus span {\r\n    /* font-size: 0.5em; */\r\n    vertical-align: top;\r\n}\r\n\r\n.as-component-picker-add-box > svg,\r\n.as-component-picker-add-box > span {\r\n    width: 1.25em;\r\n    height: 1.25em;\r\n    font-size: 1.25em;\r\n    line-height: 1.6;\r\n}", ""]);



/***/ }),

/***/ 22277:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-form-component-properties-editor-window .as-form-component-properties-editor {\r\n    width: 100%;\r\n    height: 100%;\r\n    font-size: 14px;\r\n}\r\n\r\n.as-layout-editor-property-container>.as-form-component-properties-editor {\r\n    height: 100%;\r\n    min-width: 25em;\r\n}\r\n\r\n.as-form-component-properties-editor-window {\r\n    min-width: 25em;\r\n    font-size: 14px;\r\n    min-height: 10em;\r\n    z-index: 99;\r\n}\r\n\r\n.as-form-component-properties-editor-window .absol-onscreen-window-head-bar-button-minimize {\r\n    display: none;\r\n}\r\n\r\n.as-form-component-properties-editor-quickmenu-button {\r\n    top: 0;\r\n    right: 0;\r\n    position: absolute;\r\n    color: #dddddd;\r\n}\r\n\r\n.as-form-component-properties-editor-window .as-form-component-properties-editor-quickmenu-button {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 87887:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".ez-container.as-width-auto {\r\n    width: auto;\r\n}\r\n\r\n.ez-container.as-height-auto {\r\n    height: auto;\r\n}\r\n\r\n.ez-container {\r\n    --indent: 0;\r\n}\r\n\r\n.ez-container:not(.as-width-auto) {\r\n    width: var(--as-width);\r\n}\r\n\r\n\r\n.ez-container:not(.as-height-auto) {\r\n    height: var(--as-height);\r\n}\r\n\r\n.ez-container.ez-row::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    width: var(--indent);\r\n}\r\n\r\n.ez-container.ez-column > .ez-container.ez-grid,\r\n.ez-container.ez-grid {\r\n    display: grid;\r\n}\r\n\r\n.ez-container.ez-row > * {\r\n    display: inline-block;\r\n}\r\n\r\n.ez-container.ez-row > .ez-container.ez-grid {\r\n    display: inline-grid;\r\n}\r\n\r\n.ez-container.ez-column > * {\r\n    display: block;\r\n}\r\n\r\n.ez-container.ez-grid.as-align-items-start {\r\n    align-items: start;\r\n}\r\n\r\n.ez-container.ez-grid.as-align-items-center {\r\n    align-items: center;\r\n}\r\n\r\n.ez-container.ez-grid.as-align-items-end {\r\n    align-items: end;\r\n}\r\n\r\n.ez-container.ez-grid.as-justify-items-start {\r\n    justify-items: start;\r\n}\r\n\r\n\r\n.ez-grid-item {\r\n    position: relative;;\r\n}\r\n\r\n\r\n.ez-label{\r\n    white-space: pre;\r\n}\r\n\r\n.ez-label::before {\r\n    content: \"\";\r\n}\r\n\r\n.ez-label.as-has-required-indicator::after {\r\n    content: \"*\";\r\n    color: #ff5555;\r\n    font-weight: bold;\r\n    font-size: 1.5em;\r\n    line-height: 0.5em;\r\n}\r\n\r\n.ez-container,\r\n.ez-text-input,\r\n.ez-button,\r\n.ez-combo-box,\r\n.ez-dual-combobox,\r\n.ez-tree-combobox,\r\n.ez-multi-select-tree-combo-box,\r\n.ez-multi-select-tree-leaf-combo-box,\r\n.ez-multi-select-combo-box,\r\n.as-date-input.ez-date-input,\r\n.as-date-time-input,\r\n.ez-image,\r\n.ez-text-area,\r\n.ez-number-input,\r\n.ez-tree-leaf-combo-box,\r\n.ez-date-in-year-input.as-date-in-year-input,\r\n.ez-location-view,\r\n.ez-file-input,\r\n.ez-table-input,\r\n.ac-time-input.ez-time-24-input,\r\n.ez-track-bar {\r\n    width: var(--as-width);\r\n    height: var(--as-height);\r\n}\r\n\r\n\r\n.ez-container .as-union-hidden {\r\n    display: none;\r\n}\r\n\r\n.ez-container.as-group-hidden,\r\n.ez-container> .as-group-hidden {\r\n    display: none;\r\n}\r\n\r\n.ez-image {\r\n    position: relative;\r\n}\r\n\r\n.ez-image > img {\r\n    display: block;\r\n    position: absolute;\r\n    left: 0;\r\n    width: 100%;\r\n    top: 0;\r\n    height: 100%;\r\n}\r\n\r\n.ez-text-area {\r\n    border: 1px solid #dddddd;\r\n}\r\n\r\n.ac-time-input.ez-time-24-input.as-width-auto {\r\n    width: 13em;\r\n}\r\n\r\n\r\n.ez-text-input.as-error {\r\n    border-color: #ff5555;\r\n}", ""]);



/***/ }),

/***/ 30470:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".ez-layout-editor {\r\n    display: grid;\r\n    grid-template-rows: auto 1fr;\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.ez-layout-editor-header {\r\n}\r\n\r\n.ez-layout-editor-body {\r\n    position: relative;\r\n    padding-left: 1.5em;\r\n    padding-top: 1.5em;\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.ez-layout-editor-space {\r\n    width: 100%;\r\n    height: 100%;\r\n    position: relative;\r\n    overflow: hidden;\r\n    --desk-x: 10px;\r\n    --desk-y: 10px;\r\n    background-color: rgb(250, 250, 255);\r\n}\r\n\r\n\r\n.ez-layout-editor-space > .absol-vscrollbar,\r\n.ez-layout-editor-space > .absol-hscrollbar {\r\n    position: absolute;\r\n    bottom: 0;\r\n    right: 0;\r\n    z-index: 30;\r\n}\r\n\r\n.ez-layout-editor-space > .absol-vscrollbar {\r\n    top: 0;\r\n    width: 10px;\r\n}\r\n\r\n\r\n.ez-layout-editor-space > .absol-hscrollbar {\r\n    left: 0;\r\n    height: 10px;\r\n}\r\n\r\n\r\n.ez-layout-editor-desk {\r\n    position: absolute;\r\n    top: var(--desk-y);\r\n    left: var(--desk-x);\r\n    box-shadow: 1px 1px 4px #aaa;\r\n    transition: left 0.1s, top 0.1s;\r\n    background-color: white;\r\n}\r\n\r\n.ez-layout-editor-desk.as-no-transition {\r\n    transition: none;\r\n}\r\n\r\n.ez-layout-editor-desk > div {\r\n    pointer-events: none;\r\n}\r\n\r\n.ez-layout-editor-desk > * {\r\n    pointer-events: none;\r\n}\r\n\r\n.ez-layout-editor-desk .ez-component[data-union]{\r\n    background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.5), rgba(110, 255,234, 0.5) 1px, rgba(255, 255, 255, 0.5) 2px, rgba(255, 255, 255, 0.5) 5px);\r\n\r\n}\r\n\r\n.ez-layout-editor-desk .ez-component[data-union]>*{\r\n    opacity: 0.8;\r\n}\r\n\r\n.ez-layout-editor-desk .ez-component[data-union] * {\r\n    background-color: transparent !important;\r\n}\r\n\r\n.ez-layout-editor-desk .ez-multi-select-combo-box.as-border-none,\r\n.ez-layout-editor-desk .ez-tree-combo-box.as-border-none,\r\n.ez-layout-editor-desk .ez-tree-leaf-combo-box.as-border-none,\r\n.ez-layout-editor-desk .ez-text:empty {\r\n    border: 1px dashed #dddddd;\r\n}\r\n\r\n.ez-layout-editor-desk .ez-text {\r\n    min-height: 1em;\r\n}\r\n\r\n.ez-layout-editor-select-overlay {\r\n    position: absolute;\r\n    z-index: 3;\r\n    top: var(--desk-y);\r\n    left: var(--desk-x);\r\n    pointer-events: none;\r\n    overflow: visible;\r\n}\r\n\r\n.ez-layout-editor-editing-container-rect {\r\n    position: absolute;\r\n    border: 1px dashed rgba(140, 0, 255, 0.5);\r\n    box-sizing: border-box;\r\n}\r\n\r\n.ez-layout-editor-select-rect {\r\n    position: absolute;\r\n    border: 2px solid #acf;\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.ez-layout-editor-select-rect.as-focus {\r\n    border-color: #fff424;\r\n}\r\n\r\n\r\n.ez-layout-editor-desk .ez-container.as-width-auto.as-height-auto:empty::before {\r\n    display: block;\r\n    content: \"Empty Container\";\r\n    font-style: italic;\r\n    padding: 20px;\r\n    color: #296b9d;\r\n    border: 1px dashed #ddd;\r\n}\r\n\r\n.ez-test-config-editor,\r\n.ez-test-runner {\r\n    display: grid;\r\n    width: 100%;\r\n    height: 100%;\r\n    grid-template-rows: auto 1fr;\r\n}\r\n\r\n.ez-test-config-editor-header {\r\n\r\n}\r\n\r\n.ez-test-config-editor-body {\r\n\r\n}\r\n\r\n.ez-test-config-editor-script {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n\r\n.ez-test-runner-body {\r\n    overflow: auto;\r\n    padding: 20px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.ez-test-runner-content {\r\n    box-shadow: 1px 1px 4px #aaa;\r\n    display: inline-block;\r\n}\r\n\r\n.ez-explorer {\r\n    grid-template-rows: auto 1fr;\r\n    height: 100%;\r\n}\r\n\r\n.ez-explorer-body {\r\n    box-sizing: border-box;\r\n    position: relative;\r\n}\r\n\r\n.ez-explorer-content{\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    overflow: auto;\r\n}\r\n\r\n.ez-explorer-header .as-cmd-tool-group-x2::before {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 87117:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-editable-array-of-fragment.as-disabled > .as-editable-array-of-fragment-bottom,\r\n.as-editable-array-of-fragment.as-disabled > .as-editable-array-of-fragment-item-list > .as-editable-array-of-fragment-item > .as-editable-array-of-fragment-remove-btn-ctn {\r\n    display: none;\r\n}\r\n\r\n.as-editable-array-of-fragment.as-disabled > .as-editable-array-of-fragment-item-list > .as-editable-array-of-fragment-item {\r\n    padding-right: 0;\r\n}\r\n\r\n.as-editable-array-of-fragment.as-disabled {\r\n    padding-bottom: 0;\r\n}\r\n\r\n.as-editable-array-of-fragment {\r\n    padding-bottom: 40px;\r\n    position: relative;\r\n    min-width: calc(var(--button-min-width) + 20px);\r\n    --as-aof-item-spacing: 10px;\r\n}\r\n\r\n.as-editable-array-of-fragment-list {\r\n    overflow: auto;\r\n    padding-top: 5px;\r\n}\r\n\r\n.as-editable-array-of-fragment-item:not(:last-child) {\r\n    margin-bottom: var(--as-aof-item-spacing);\r\n    padding-bottom: 10px;\r\n}\r\n\r\n.as-editable-array-of-fragment-item:not(:last-child)::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: 50px;\r\n    right: 50px;\r\n    bottom: 0;\r\n    border-bottom: 1px dashed #a5a6a5;\r\n}\r\n\r\n\r\n\r\n.as-editable-array-of-fragment-bottom {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    bottom: 0;\r\n    height: 35px;\r\n    padding-left: 10px;\r\n    padding-right: 10px;\r\n    text-align: center;\r\n}\r\n\r\n.as-editable-array-of-fragment-bottom > .as-flexicon-button {\r\n    height: 30px;\r\n    min-width: var(--button-min-width);\r\n}\r\n\r\n.as-editable-array-of-fragment-item {\r\n    padding-right: 40px;\r\n    display: block;\r\n    position: relative;\r\n}\r\n\r\n\r\n.as-editable-array-of-fragment-remove-btn-ctn {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: 40px;\r\n    text-align: center;\r\n}\r\n\r\n.as-editable-array-of-fragment-remove-btn-ctn::before {\r\n    content: \"\";\r\n    height: 100%;\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n}\r\n\r\n.as-editable-array-of-fragment-remove-btn-ctn > button {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 30px;\r\n    border: none;\r\n    background-color: transparent;\r\n    outline: none;\r\n    font-size: 14px;\r\n}\r\n\r\n.as-editable-array-of-fragment-remove-btn-ctn button .mdi-delete {\r\n    color: rgb(255, 70, 71);\r\n}\r\n\r\nbody:not(.bsc-white) {\r\n    --button-min-width: 110px;\r\n}", ""]);



/***/ }),

/***/ 41705:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".af-explore {\r\n    font-size: inherit;\r\n    overflow: hidden;\r\n}\r\n\r\n.af-explore-title-bar {\r\n    padding-left: 1em;\r\n    background-color: rgba(169, 169, 169, 0.05);\r\n    height: 2em;\r\n    display: flex;\r\n}\r\n\r\n.af-explore-title-bar/*:empty*/::before {\r\n    content: \"EXPLORER\";\r\n    font-size: 0.75em;\r\n    line-height: 2.666;\r\n    color: rgb(173, 173, 173);\r\n    flex-grow: 1;\r\n}\r\n\r\n.af-explore-title-bar > .as-form-editor-quick-toolbar {\r\n    background-color: transparent;\r\n    border: none;\r\n}\r\n\r\n.af-explore-body {\r\n    height: calc(100% - 2em);\r\n}\r\n\r\n.af-explore-body > .absol-exp-tree > .absol-exp-node {\r\n    font-weight: bold;\r\n}\r\n\r\n\r\n.as-form-explorer-body.as-searching .absol-exp-tree:not(.as-in-search-result) {\r\n    display: none;\r\n}\r\n\r\n.as-form-explorer-body.as-in-search-result {\r\n    display: flex;\r\n    flex-direction: column;\r\n}\r\n\r\n.as-form-explorer-body.as-searching .absol-exp-items {\r\n    display: flex;\r\n    align-items: stretch;\r\n    flex-direction: column;\r\n}", ""]);



/***/ }),

/***/ 44010:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".fde-editor {\n    display: flex;\n    flex-direction: column;\n    align-items: stretch;\n    color: white;\n    width: 100%;\n    height: 100%;\n    box-sizing: border-box;\n}\n\n.fde-editor-body {\n    flex-grow: 1;\n    position: relative;\n}\n\n.fde-content {\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\n    font-size: 14px;\n    caret-color: transparent;\n}\n\n\n.fde-foreground {\n\n}\n\n.fde-viewport {\n    position: absolute;\n    left: 0;\n    top: 0;\n    width: 100%;\n    height: 100%;\n    overflow: auto;\n    padding: 5px;\n    box-sizing: border-box;\n}\n\n.fde-body {\n    position: relative;\n}\n\n.fde-content {\n    color: black;\n    box-shadow: 2px 5px 10px 0px rgba(0, 0, 0, 0.5);\n    display: inline-block;\n    outline: none;\n}\n\n.fde-foreground:not(.fd-focus) .fde-virtual-caret {\n    display: none;\n}\n\n.fd-block-component .fd-text-ctn {\n    color: transparent;\n}\n\n.fd-block-component ::selection {\n    background-color: transparent;\n}\n\n.as-label.fd-component label {\n    cursor: text;\n    white-space: pre-wrap;\n}\n\n.fde-space {\n    position: relative;\n}\n\n.fde-foreground {\n    position: absolute;\n    left: 0;\n    top: 0;\n    width: 100%;\n    height: 100%;\n    pointer-events: none;\n    z-index: 5;\n}\n\n.fd-component.as-base-component.as-image span {\n    position: absolute;\n    left: calc(50% - 15px);\n    top: calc(50% - 15px);\n    text-align: center;\n    width: 30px;\n    height: 30px;\n    line-height: 30px;\n    display: inline-block;\n    color: transparent;\n}\n\n.fd-block-component ::selection {\n    background-color: transparent !important;\n}\n\n.fd-component.as-base-component.as-image img {\n    user-select: none;\n}\n\n.fd-date-input .as-date-input-text::before,\n.fd-component.as-date-time-input .as-date-time-input-text::before {\n    content: attr(data-text);\n    line-height: 2em;\n}\n\n\n.fd-component.as-label.fd-empty .fd-text-ctn::after {\n    content: attr(data-place-holder);\n}\n\n.fd-component.as-label.fd-empty .fd-text-ctn {\n    color: rgb(162, 162, 162, 0.5);\n}\n\n.fd-component.as-select-list-text .fd-text-ctn::before {\n    content: attr(data-text);\n    color: rgb(162, 162, 162, 0.5);\n}\n\n\n.fd-component.as-date-in-year-input .as-date-time-input-text {\n    font-size: inherit;\n    outline: none;\n    width: calc(100% - 2em - 1px);\n    height: 100%;\n    border: none;\n    display: block;\n    padding: 0 0 0 var(--as-input-horizontal-padding);\n    -webkit-user-select: auto;\n    user-select: auto;\n    -webkit-user-drag: none;\n    color: inherit;\n    box-sizing: border-box;\n}\n\n.fd-component.as-date-in-year-input .as-date-time-input-text::before,\n.fd-component.as-date-n-level-input .as-date-input-text::before {\n    content: attr(data-text);\n    display: inline-block;\n    vertical-align: middle;\n}\n\n\n.fd-component.as-date-in-year-input .as-date-time-input-text::after,\n.fd-component.as-date-n-level-input .as-date-input-text::after {\n    height: 100%;\n    content: \"\";\n    display: inline-block;\n    vertical-align: middle;\n}\n\n.fd-component.as-time-range-24-input .as-time-input-text::before {\n    content: attr(data-text);\n}\n\n.fd-component.as-time-range-24-input .as-time-input-text {\n    padding-left: var(--as-input-horizontal-padding);\n    display: inline-block;\n    vertical-align: middle;\n}\n\n.fd-component.as-time-range-24-input .ac-time-input::before {\n    content: \"\";\n    height: 100%;\n    display: inline-block;\n    vertical-align: middle;\n}\n\n\n.fd-component.absol-textarea2 {\n    outline: none;\n    border: solid 1px #d6d6d6;\n    border-radius: 2px;\n    padding: var(--as-input-vertical-padding) var(--as-input-horizontal-padding);\n    font-size: var(--as-input-font-size);\n    font-family: var(--as-input-font-family);\n}\n\n.as-grid-layout.fd-component:not(:empty) > .fd-text-ctn {\n    display: none;\n}\n\n.fde-virtual-caret {\n    position: absolute;\n    color: #1e65ea;\n    border-left: 2px solid currentColor;\n    animation: blink-caret 1s linear infinite;\n}\n\n.fde-virtual-selected-range {\n    background-color: rgba(72, 129, 239, 0.5);\n    position: absolute;\n    /*backdrop-filter: invert(100%);*/\n}\n\n\n.fde-content ::selection {\n    background-color: transparent;\n    /*color: white;*/\n}\n\n@keyframes blink-caret {\n    0% {\n        opacity: 1;\n    }\n    1% {\n        opacity: 0;\n    }\n    50% {\n        opacity: 0;\n    }\n    51% {\n        opacity: 1;\n    }\n    100% {\n        opacity: 1;\n    }\n}\n\n\n.fde-anchor-editor {\n    position: absolute;\n\n}\n\n.fde-anchor-editor-size-box {\n    position: absolute;\n    left: -1px;\n    top: -1px;\n    right: -1px;\n    bottom: -1px;\n    border: solid 2px #FFC83D;\n}\n\n.fde-anchor-editor-move,\n.fde-anchor-editor-resize-width,\n.fde-anchor-editor-resize-height,\n.fde-anchor-editor-resize-width-height {\n    display: none;\n    position: absolute;\n    pointer-events: all;\n}\n\n.fde-anchor-editor-resize-width::before,\n.fde-anchor-editor-resize-height::before,\n.fde-anchor-editor-resize-width-height::before {\n    content: \"\";\n    display: block;\n    position: absolute;\n    left: calc(50% - 3px);\n    top: calc(50% - 3px);\n    width: 6px;\n    height: 6px;\n    background-color: #FFC83D;\n}\n\n.fde-anchor-editor.fde-option-move .fde-anchor-editor-move,\n.fde-anchor-editor.fde-option-width .fde-anchor-editor-resize-width,\n.fde-anchor-editor.fde-option-height .fde-anchor-editor-resize-height,\n.fde-anchor-editor.fde-option-width.fde-option-height .fde-anchor-editor-resize-width-height {\n    display: block;\n}\n\n\n.fde-anchor-editor-move {\n    left: 0;\n    bottom: 100%;\n    width: 20px;\n    height: 20px;\n    text-align: center;\n    background-color: #FFC83D;\n    color: white;\n    font-size: 18px;\n    line-height: 20px;\n    cursor: move;\n}\n\n.fde-anchor-editor-resize-width {\n    z-index: 1;\n    right: -2px;\n    top: 0;\n    height: 100%;\n    width: 4px;\n    cursor: ew-resize;\n\n}\n\n\n.fde-anchor-editor-resize-height {\n    z-index: 1;\n    left: 0;\n    bottom: -2px;\n    height: 4px;\n    width: 100%;\n    cursor: ns-resize;\n}\n\n.fde-anchor-editor-resize-width-height {\n    z-index: 1;\n    right: -3px;\n    bottom: -3px;\n    height: 6px;\n    width: 6px;\n    cursor: nwse-resize;\n}\n\n\n.fd-component.as-flexicon-button::after {\n    content: attr(data-text);\n}\n\n.fd-component.absol-number-input .fd-text-ctn::before {\n    content: attr(data-value);\n    color: black;\n    display: inline-block;\n    line-height: 28px;\n}\n\n.fd-component.absol-number-input .absol-number-input-text-container {\n    padding-left: var(--as-input-horizontal-padding);\n}", ""]);



/***/ }),

/***/ 21725:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-frame .as-flex-form-editor {\r\n    width: 100%;\r\n    height: 100%;\r\n    position: relative;\r\n}\r\n\r\n.as-flex-form-editor {\r\n    padding-right: 20px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.as-flex-form-editor-right-tab {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: 20px;\r\n    background-color: rgba(169, 169, 170, 0.11659);\r\n    box-sizing: border-box;\r\n    box-shadow: -1px 0 1px rgba(0,0,0, 0.3);\r\n    z-index: 1;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n}\r\n\r\n.as-flex-form-editor-right-tab-top {\r\n    transform-origin: 50% 10px;\r\n    transform: rotate(90deg);\r\n    height: 20px;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-flex-form-editor-right-tab-btn {\r\n    height: 20px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-flex-form-editor-frame-view {\r\n    width: 100%;\r\n    height: 100%;\r\n}", ""]);



/***/ }),

/***/ 46991:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-font-icon-picker {\r\n    font-size: 14px;\r\n    background-color: white;\r\n    display: inline-block;\r\n    padding: 0.357em;\r\n    -webkit-box-shadow: 2px 2px 17px -1px rgba(0, 0, 0, 0.54);\r\n    -moz-box-shadow: 2px 2px 17px -1px rgba(0, 0, 0, 0.54);\r\n    box-shadow: 2px 2px 17px -1px rgba(0, 0, 0, 0.54);\r\n}\r\n\r\n.as-font-icon-picker>.absol-search-text-input {\r\n    margin-bottom: 0.357em;\r\n}\r\n\r\n.as-font-icon-picker-option {\r\n    padding-bottom: 0.357em;\r\n}\r\n\r\nbutton.as-font-icon-picker-icon {\r\n    height: 3em;\r\n    width: 3em;\r\n    padding: 0;\r\n    margin: 0.1em;\r\n    font-size: 1em;\r\n    box-sizing: border-box;\r\n    background-color: rgba(169, 169, 172, 0);\r\n    border: 1px solid #dddd;\r\n\r\n}\r\n\r\nbutton.as-font-icon-picker-icon:hover {\r\n    background-color: rgba(169, 169, 172, 0.2);\r\n}\r\n\r\nbutton.as-font-icon-picker-icon>span {\r\n    font-size: 2em;\r\n}\r\n\r\n\r\n.as-font-icon-picker-content {\r\n    text-align: center;\r\n    height: 19.2em;\r\n    width: 20.2em;\r\n    overflow-y: auto;\r\n}\r\n\r\nbutton.as-font-icon-picker-icon.as-font-icon-picker-selected {\r\n    background-color: rgba(20, 185, 235, 0.3);\r\n}\r\n\r\nbutton.as-font-icon-input{\r\n    font-size: 14px;\r\n    width: 2em;\r\n    height: 2em;\r\n    padding: 0;\r\n    margin: 0;\r\n    box-sizing: content-box;\r\n    border: solid 1px #ddd;\r\n    background-color: rgba(169, 169, 172, 0);\r\n    outline: none;\r\n}\r\n\r\n\r\nbutton.as-font-icon-input>span,\r\nbutton.as-font-icon-input>i{\r\n    font-size: 1.5em;\r\n}\r\n\r\n.as-font-icon-input.as-font-icon-selecting{\r\n\r\n}", ""]);



/***/ }),

/***/ 30569:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-form-editor {\r\n    position: relative;\r\n    font-size: 14px;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    outline: none;\r\n    -webkit-box-shadow: 0px 0px 0px 1px rgba(110, 110, 110, 0.3);\r\n    -moz-box-shadow: 0px 0px 0px 1px rgba(110, 110, 110, 0.3);\r\n    box-shadow: 0px 0px 0px 1px rgba(110, 110, 110, 0.3);\r\n}\r\n\r\n.as-form-editor-resizer {\r\n    z-index: 10;\r\n    position: absolute;\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n}\r\n\r\n.as-form-editor-resizer.vertical {\r\n    top: 0;\r\n    bottom: 0;\r\n    width: 0.2em;\r\n    cursor: w-resize;\r\n}\r\n\r\n.as-form-editor-left-tab-bar {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 1.2em;\r\n    width: 20px;\r\n    background-color: rgba(169, 169, 170, 0.11659);\r\n    font-size: 13px;\r\n}\r\n\r\n.as-form-editor-left-tab-bar-top {\r\n    position: absolute;\r\n    left: 0;\r\n    top: -20px;\r\n    width: 500px;\r\n    height: 20px;\r\n    z-index: 2;\r\n    transform-origin: 0 100%;\r\n    transform: rotate(90deg);\r\n}\r\n\r\n.as-form-editor-vertical-tab-btn {\r\n    height: 100%;\r\n    font-size: 1em;\r\n    padding: 0 10px;\r\n    border: none;\r\n    background-color: transparent;\r\n    color: rgb(141, 141, 141);\r\n    outline: none;\r\n}\r\n\r\n.as-form-editor-left-tab-bar-top .as-form-editor-vertical-tab-btn {\r\n    transform: rotate(180deg);\r\n}\r\n\r\n\r\n.as-form-editor-vertical-tab-btn:hover {\r\n    color: rgb(102, 102, 102);\r\n}\r\n\r\n.as-form-editor-vertical-tab-btn:active,\r\n.as-form-editor-vertical-tab-btn.active {\r\n    background-color: rgb(169, 169, 169);\r\n    color: white;\r\n}\r\n\r\n.as-form-editor-vertical-tab-btn.as-hidden {\r\n    display: none;\r\n}\r\n\r\n.as-form-editor-vertical-tab-btn > svg {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: 1em;\r\n    height: 1em;\r\n}\r\n\r\n.as-form-editor > .as-status-bar {\r\n    position: absolute;\r\n    bottom: 0;\r\n    left: 0;\r\n    right: 0;\r\n    box-shadow: 0px -1px 0px 0px rgba(169, 169, 172, 0.5);\r\n    z-index: 2;\r\n}\r\n\r\n/*\r\n\r\n.as-form-editor-left-tab-bar > button,\r\n.as-form-editor-left-tab-bar-bottom-container > button {\r\n    display: none;\r\n    width: 3em;\r\n    height: 3em;\r\n\r\n}\r\n\r\n.as-form-editor-quick-toolbar button,\r\n.as-form-editor-left-tab-bar > button,\r\n.as-form-editor-left-tab-bar-bottom-container > button {\r\n    font-size: 1em;\r\n    color: rgb(196, 196, 196);\r\n    border: none;\r\n    background-color: transparent;\r\n    border-radius: 0;\r\n    outline: none;\r\n}\r\n\r\n.as-form-editor-left-tab-bar > button:hover,\r\n.as-form-editor-left-tab-bar-bottom-container > button:hover,\r\n.as-form-editor-quick-toolbar button:hover {\r\n    color: rgb(102, 102, 102);\r\n}\r\n\r\n.as-form-editor-left-tab-bar > button:active,\r\n.as-form-editor-left-tab-bar > button.active,\r\n.as-form-editor-quick-toolbar button:active {\r\n    background-color: rgb(169, 169, 169);\r\n    color: white;\r\n\r\n}\r\n\r\n.as-form-editor-left-tab-bar > button > span,\r\n.as-form-editor-left-tab-bar-bottom-container > button > span {\r\n    font-size: 2em;\r\n}\r\n\r\n.as-form-editor-left-tab-bar-bottom-container {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    bottom: 0;\r\n}\r\n*/\r\n\r\n.as-form-editor-left-site-container {\r\n    position: absolute;\r\n    left: 20px;\r\n    top: 0;\r\n    bottom: 1.2em;\r\n    width: calc(15% - 20px);\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.as-form-editor-left-site-container > .as-form-editor-left-site {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-form-editor-resizer.vertical.left-site {\r\n    left: calc(15% - 0.1em);\r\n}\r\n\r\n.as-form-editor-editor-space-container,\r\n.as-form-editor-empty-space {\r\n    position: absolute;\r\n    left: 15%;\r\n    top: 0;\r\n    bottom: 1.2em;\r\n    right: 0;\r\n    border-left: 1px solid #ddd;\r\n\r\n}\r\n\r\n.as-form-editor-empty-space {\r\n    z-index: 0;\r\n}\r\n\r\n.as-form-editor-editor-space-container {\r\n    z-index: 1;\r\n    background: white;\r\n}\r\n\r\n.as-form-editor-editor-space-container .as-layout-editor,\r\n.as-form-editor-editor-space-container .as-code-editor,\r\n.as-form-editor-editor-space-container .as-form-preview,\r\n.as-form-editor-editor-space-container .ptswpf {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-form-editor-editor-space-container > div {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-form-editor-resizer.vertical.right-site {\r\n    right: calc(23em - 0.2em);\r\n}\r\n\r\n.as-form-editor-right-site-container {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: 23em;\r\n    border-left: 1px solid #ddd;\r\n}\r\n\r\n.as-form-editor-right-site-container > .as-form-editor-right-site {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-form-editor-editor-space-container > .as-layout-editor {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n\r\ntable.as-form-params {\r\n    border-collapse: collapse;\r\n    box-sizing: border-box;\r\n}\r\n\r\ntable.as-form-params > tbody > tr > td,\r\ntable.as-form-params > thead > tr > td {\r\n    border: 1px solid #eeeeee;\r\n    padding: 0.25em;\r\n\r\n}\r\n\r\n.as-form-property-tab > table.as-form-params {\r\n    width: calc(100% - 10px);\r\n    margin: 5px;\r\n}\r\n\r\ntable.as-form-params > tbody > tr > td > input[type=\"text\"],\r\ntable.as-form-params > tbody > tr > td > textarea {\r\n    font-size: 1em;\r\n    width: 100%;\r\n    box-sizing: border-box;\r\n    border: solid 1px #d6d6d6;\r\n    outline: none;\r\n}\r\n\r\ntable.as-form-params > tbody > tr > td > textarea {\r\n    width: 100% !important;\r\n}\r\n\r\n\r\n.as-form-tool-site {\r\n}\r\n\r\n\r\n.as-form-left-tool-site-tab .as-form-explorer,\r\n.as-form-left-tool-site-tab .as-component-picker,\r\n.as-form-left-tool-site-tab .as-flex-form-component-tool {\r\n    height: calc(100% - 2em);\r\n}\r\n\r\n.as-form-tool-site-header {\r\n    height: 2em;\r\n    padding-left: 1em;\r\n    background-color: rgba(169, 169, 169, 0.05);\r\n}\r\n\r\n.as-form-tool-site-header span {\r\n    color: rgb(173, 173, 173);\r\n    font-size: 0.75em;\r\n    line-height: 2.666;\r\n}\r\n\r\n.as-form-tool-site .as-form-search-toolbox {\r\n    margin: 0.3em;\r\n}\r\n\r\n.as-form-tool-site .absol-drop-panel {\r\n    font-size: 12px;\r\n}\r\n\r\n.af-launcher-site-right .as-window-box-body,\r\n.af-launcher-site-left .as-window-box-body {\r\n    position: relative;\r\n    height: calc(100% - 1.4em);\r\n}\r\n\r\n.as-form-explorer .absol-drop-panel {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 50px;\r\n    height: calc(100% - 50px);\r\n}\r\n\r\n.as-form-explorer .absol-drop-panel.show .absol-drop-panel-body {\r\n    height: calc(100% - 24px);\r\n}\r\n\r\n\r\n.as-form-editor-editor-space-container > .absol-tabview > .absol-tabbar .absol-tabbar-button {\r\n    border-radius: 0;\r\n    margin-right: 0;\r\n    margin-left: 0;\r\n    border-left: none;\r\n    border-top: none;\r\n    border-bottom: none;\r\n    border-right: solid 1px rgba(169, 169, 169, 0.3);\r\n    font-size: 1em;\r\n}\r\n\r\n\r\n.as-form-editor-quick-toolbar {\r\n    height: 2em;\r\n    min-width: 2em;\r\n    position: absolute;\r\n    z-index: 1;\r\n    top: 0;\r\n    right: 0;\r\n    background-color: rgb(248, 248, 248);\r\n    border-bottom: 1px solid #ddd;\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.as-form-editor-quick-toolbar button {\r\n    height: 100%;\r\n    width: 2em;\r\n    border: none;\r\n    border-radius: 0;\r\n    font-size: 1em;\r\n    outline: none;\r\n    padding: 0;\r\n    background-color: transparent;\r\n}\r\n\r\n.as-form-editor-quick-toolbar button:hover {\r\n    color: rgb(102, 102, 102);\r\n}\r\n\r\n\r\n.as-form-editor-quick-toolbar button:active {\r\n    background-color: rgb(169, 169, 169);\r\n    color: white;\r\n}\r\n\r\n.as-form-editor-quick-toolbar button > span {\r\n    font-size: 1.3em;\r\n}\r\n\r\n\r\n.as-form-editor-main-tabview > .absol-tabbar {\r\n    width: calc(100% - 28px);\r\n}", ""]);



/***/ }),

/***/ 52418:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-form-preview {\r\n    font-size: 14px;\r\n    z-index: 99;\r\n    overflow: auto;\r\n}\r\n\r\n\r\n.as-form-preview::after {\r\n    content: \"\";\r\n    display: table;\r\n    clear: both;\r\n}\r\n\r\n.as-form-preview-actions {\r\n    padding: 0.357em;\r\n    border-bottom: 1px solid #ddd;\r\n}\r\n\r\n.as-form-preview-actions>button {\r\n    margin-right: 1em;\r\n}\r\n\r\n\r\n.as-form-preview-content {\r\n    padding: 0.5em;\r\n    position: relative;\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.as-form-preview-content>.as-base-component {\r\n    -webkit-box-shadow: 1px 1px 15px 0px rgba(0, 0, 0, 0.75);\r\n    -moz-box-shadow: 1px 1px 15px 0px rgba(0, 0, 0, 0.75);\r\n    box-shadow: 1px 1px 15px 0px rgba(0, 0, 0, 0.75);\r\n}\r\n\r\n\r\n.as-form-preview-content:empty {\r\n    height: 0;\r\n    width: 0;\r\n}\r\n\r\n.as-form-preview-size-setting {\r\n    padding: 5px 0 5px 20px;\r\n    border-bottom: 2px solid #ddd;\r\n    box-sizing: content-box;\r\n}\r\n\r\n.as-form-preview-size-setting span {\r\n    font-size: 12px;\r\n}\r\n\r\n.as-form-preview-size-setting input[type=\"number\"] {\r\n    border: 1px solid #ddd;\r\n    outline: none;\r\n    font-size: 12px;\r\n}\r\n\r\n.as-form-preview-size-setting input[type=\"number\"].as-input-width,\r\n.as-form-preview-size-setting input[type=\"number\"].as-input-height {\r\n    width: 5em;\r\n}", ""]);



/***/ }),

/***/ 6222:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-hline {\r\n    position: absolute;\r\n    pointer-events: none;\r\n    opacity: 0.5;\r\n\r\n}\r\n\r\n.as-hline-body {\r\n    position: relative;\r\n    border-top: solid 2px rgb(55, 180, 159);\r\n    box-sizing: border-box;\r\n    width: 100%;\r\n    margin-top: -1px;\r\n    margin-bottom: -1px; \r\n\r\n}\r\n\r\n.as-hline-dot {\r\n    position: absolute;\r\n    top: calc(-0.2em - 1px);\r\n    height: 0.4em;\r\n    width: 0.4em;\r\n    background-color: rgb(55, 180, 159);\r\n}\r\n\r\n\r\n.as-hline-dot.left {\r\n    left: -0.2em;\r\n}\r\n\r\n\r\n.as-hline-dot.right {\r\n    right: -0.2em;\r\n}", ""]);



/***/ }),

/***/ 54676:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".asf-image-file-input {\r\n    position: relative;\r\n    border: 1px solid #d6d6d6;\r\n    cursor: pointer;\r\n}\r\n\r\n.asf-image-file-input:not(.as-width-auto) {\r\n    width: var(--as-width);\r\n}\r\n\r\n\r\n.asf-image-file-input:not(.as-height-auto) {\r\n    height: var(--as-height);\r\n}\r\n\r\n.asf-image-file-input-img{\r\n    position: absolute;\r\n    left: 10%;\r\n    right: 10%;\r\n    top: 10%;\r\n    bottom: 10%;\r\n    background-size: contain;\r\n    background-repeat: no-repeat;\r\n    background-position: center;\r\n    opacity: 0.7;\r\n}\r\n\r\n.asf-image-file-input:hover .asf-image-file-input-img{\r\n    opacity: 1;\r\n}\r\n\r\n.asf-image-file-input:hover{\r\n    border-color: #aaaaaa;\r\n}\r\n\r\n.asf-image-file-input.as-has-file .asf-image-file-input-img{\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    opacity: 1;\r\n}\r\n\r\n.asf-image-file-input.as-has-file:hover .asf-image-file-input-img{\r\n    opacity: 0.8;\r\n}", ""]);



/***/ }),

/***/ 56815:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-included-block-manager {\r\n    display: inline-block;\r\n}\r\n\r\n.as-included-block-manager .as-message-dialog-body {\r\n\r\n}\r\n\r\n.as-included-block-manager-table-wrapper {\r\n    position: relative;\r\n}\r\n\r\n.as-included-block-manager-table-scroller {\r\n    overflow-y: auto;\r\n    max-height: calc(100vh - 300px);\r\n}\r\n\r\n.as-included-block-manager-table {\r\n    border-collapse: collapse;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-included-block-manager-table thead {\r\n    font-style: italic;\r\n    background: #f5f5f5;\r\n    border-bottom: 1px solid #aaaaaa;\r\n\r\n}\r\n\r\n.as-included-block-manager-table td,\r\n.as-included-block-manager-table th {\r\n    padding-left: 5px;\r\n    padding-right: 5px;\r\n    border: 1px solid #aaaaaa;\r\n    box-sizing: border-box;\r\n    border-collapse: collapse;\r\n}\r\n\r\n.as-included-block-manager-table th {\r\n    font-style: italic;\r\n    font-weight: normal;\r\n    background: #f5f5f5;\r\n    box-sizing: border-box;\r\n    height: 25px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-included-block-manager-table-header-ctn {\r\n    position: absolute;\r\n    z-index: 2;\r\n    left: 0;\r\n    top: 0;\r\n    display: flex;\r\n    background: #f5f5f5;\r\n}\r\n\r\n.as-included-block-manager-table-header-cell {\r\n    border: 1px solid #aaaaaa;\r\n    font-style: italic;\r\n    font-weight: normal;\r\n    box-sizing: border-box;\r\n    height: 26px;\r\n}\r\n\r\n.as-included-block-manager-table-header-cell:not(:last-child) {\r\n    border-right: none;\r\n}\r\n\r\n.as-included-block-manager-table td:first-child {\r\n    text-align: center;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-included-block-manager-search-ctn {\r\n    padding-bottom: 5px;\r\n}\r\n\r\n.as-included-block-manager-table td>*{\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-included-block-manager-table tr.as-will-added{\r\n    color: darkcyan;\r\n}\r\n\r\n\r\n.as-included-block-manager-table tr.as-will-removed{\r\n    color: #ea6e6e;\r\n}\r\n\r\n", ""]);



/***/ }),

/***/ 78398:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".card-mobile-content > div > .as-hyper-layout.as-width-auto > .as-select-menu {\r\n    width: 100%;\r\n}\r\n\r\n.card-mobile-content > div > .as-linear-layout,\r\n.card-mobile-content > div > div:not(.as-base-component) > .as-linear-layout,\r\n.card-mobile-content div:not(.as-base-component) > .as-linear-layout {\r\n    width: 100%;\r\n}\r\n\r\n\r\n.card-mobile-content > div > .as-linear-layout > .as-width-auto {\r\n    width: 100%;\r\n}\r\n\r\n.card-mobile-content > div > .as-linear-layout > .as-select-menu,\r\n.card-mobile-content > div > .as-linear-layout > .as-linear-layout > .as-select-menu {\r\n    width: 100%;\r\n    min-width: unset;\r\n}\r\n\r\n/*layout in section*/\r\ndiv[data-sectionid] > div > .as-linear-layout > .as-linear-layout > .as-base-component:last-child:not(.as-component-content-scaleless) {\r\n    width: 100%;\r\n}\r\n\r\n\r\n.card-mobile-content .asht-table-editor {\r\n    overflow: initial;\r\n}\r\n\r\n.mk-main-right .as-chain-layout>.as-multi-select-menu.as-base-component {\r\n    height: auto;\r\n}\r\n\r\n.card-mobile-content .am-multi-check-menu{\r\n    height: auto;\r\n}", ""]);



/***/ }),

/***/ 18351:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".af-launcher {\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    display: flex;\r\n    align-items: stretch;\r\n    flex-direction: column;\r\n    outline: none;\r\n    position: relative;\r\n    background-color: white;\r\n\r\n\r\n    --f-launcher-site-left-width-percent: 20;\r\n    --f-launcher-client-width: 0px;\r\n    --f-launcher-client-height: 0px;\r\n    --f-launcher-site-right-width: 200px;\r\n    --f-launcher-site-left-width: 200px;\r\n\r\n}\r\n\r\n.absol-frame > .af-launcher {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.af-launcher-header {\r\n}\r\n\r\n\r\n.af-launcher-body {\r\n    flex-grow: 1;\r\n    display: flex;\r\n    align-items: stretch;\r\n}\r\n\r\n.af-launcher-footer {\r\n\r\n}\r\n\r\n.af-launcher-site-left {\r\n    display: flex;\r\n    align-items: stretch;\r\n    flex-direction: column;\r\n    padding-right: 4px;\r\n}\r\n\r\n\r\n.af-launcher-tab-bar-left, .af-launcher-tab-bar-right {\r\n    background-color: rgba(169, 169, 170, 0.11659);\r\n    width: 20px;\r\n    position: relative;\r\n}\r\n\r\n\r\n.af-launcher-tab-bar-left-top {\r\n    position: absolute;\r\n    left: 0;\r\n    top: -20px;\r\n    width: 500px;\r\n    height: 20px;\r\n    z-index: 2;\r\n    transform-origin: 0 100%;\r\n    transform: rotate(90deg);\r\n}\r\n\r\n/*.af-launcher-tab-bar-left-top > button {*/\r\n/*    transform: rotate(180deg);*/\r\n/*}*/\r\n\r\n.af-launcher-tab-bar-right-top {\r\n    position: absolute;\r\n    transform: rotate(90deg);\r\n    left: 0;\r\n    top: -20px;\r\n    width: 500px;\r\n    height: 20px;\r\n    z-index: 2;\r\n    transform-origin: 0 100%;\r\n}\r\n\r\n/*.af-launcher-tab-bar-right-top>button {*/\r\n/*    */\r\n/*}*/\r\n\r\n.af-launcher-tab-bar-bottom {\r\n    background-color: rgba(169, 169, 170, 0.11659);\r\n    height: 20px;\r\n}\r\n\r\n\r\n.af-launcher-site-right:empty, .af-launcher-site-left:empty {\r\n    display: none;\r\n}\r\n\r\n.af-launcher-site-right {\r\n    padding: 0 0 0 4px;\r\n    display: flex;\r\n    box-sizing: border-box;\r\n    flex-direction: column;\r\n}\r\n\r\n\r\n.af-launcher-site-left > div {\r\n    width: var(--f-launcher-site-left-width);\r\n\r\n}\r\n\r\n.af-launcher-site-right > div {\r\n    width: var(--f-launcher-site-right-width);\r\n\r\n}\r\n\r\n\r\n.af-launcher-site-middle {\r\n    flex-grow: 1;\r\n}\r\n\r\n.af-launcher-resizer-left {\r\n    position: absolute;\r\n    z-index: 300;\r\n    top: 0;\r\n    bottom: 0;\r\n    left: calc(var(--f-launcher-client-width) * var(--f-launcher-site-left-width-percent) / 100 - 1px);;\r\n    padding: 0 1px;\r\n    cursor: col-resize;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n}\r\n\r\n.af-launcher-resizer-left::before {\r\n    content: \"\";\r\n    display: block;\r\n    position: absolute;\r\n    height: 100%;\r\n    box-sizing: border-box;\r\n    border-left: 1px solid transparent;\r\n\r\n}\r\n\r\n\r\n.af-launcher-main-tab-frame > div,\r\n.af-launcher-main-tab-frame > pre {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n\r\n.af-launcher-main-tab-frame {\r\n    overflow: hidden;\r\n}\r\n\r\n.af-launcher-main-tab-view {\r\n    width: 100%;\r\n    height: 100%;\r\n    box-sizing: border-box;\r\n    border: 1px solid #dddddd;\r\n}\r\n\r\n\r\n.af-launcher-resizer {\r\n    position: absolute;\r\n}\r\n\r\n.af-launcher-resizer[data-target=\"site-right-width\"] {\r\n    top: 0;\r\n    bottom: 0;\r\n    right: calc(var(--f-launcher-site-right-width) + 2px);\r\n    z-index: 50;\r\n    cursor: col-resize;\r\n    width: 4px;\r\n}\r\n\r\n.af-launcher-resizer[data-target=\"site-left-width\"] {\r\n    top: 0;\r\n    bottom: 0;\r\n    left: calc(var(--f-launcher-site-left-width) + 2px);\r\n    z-index: 50;\r\n    cursor: col-resize;\r\n    width: 4px;\r\n}\r\n\r\n.af-launcher-resize-modal {\r\n    z-index: 51;\r\n}\r\n\r\n.af-launcher-resize-modal[data-of=\"width\"] {\r\n    cursor: col-resize;\r\n}\r\n\r\n\r\n.af-float-window {\r\n    font-size: 12px;\r\n    border: 1px solid #dddddd;\r\n}\r\n\r\n\r\n.af-launcher-site-right .af-float-window,\r\n.af-launcher-site-left .af-float-window {\r\n    box-shadow: none;\r\n    flex-grow: 1;\r\n}\r\n\r\n.af-launcher-site-right .af-float-window.af-minimize {\r\n    flex-grow: unset;\r\n}\r\n\r\n.af-float-window .absol-search-text-input {\r\n    font-size: inherit;\r\n    border-radius: 0;\r\n}\r\n\r\n.af-float-window.af-minimize {\r\n    flex-grow: unset;\r\n}\r\n\r\n.af-float-window.af-minimize .as-window-box-body {\r\n    display: none;\r\n}\r\n\r\n.as-window-box-body>.af-explore{\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n", ""]);



/***/ }),

/***/ 24232:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-tab-frame > .as-layout-editor {\r\n    height: 100%;\r\n}\r\n\r\n.as-layout-editor {\r\n    position: relative;\r\n    box-sizing: border-box;\r\n    display: flex;\r\n    flex-direction: row;\r\n    outline: none;\r\n}\r\n\r\n.as-layout-editor-left {\r\n    flex-grow: 1;\r\n    display: flex;\r\n    flex-direction: column;\r\n}\r\n\r\n.as-layout-editor-header {\r\n    display: block;\r\n    position: relative;\r\n}\r\n\r\n.as-layout-editor-body {\r\n    flex-grow: 1;\r\n    position: relative;\r\n}\r\n\r\n.as-layout-editor-tool-tab-ctn {\r\n    background-color: rgba(169, 169, 170, 0.11659);\r\n    border-left: solid 1px #dddddd;\r\n    position: relative;\r\n    overflow: visible;\r\n}\r\n\r\n.as-layout-editor-tool-ctn {\r\n    position: absolute;\r\n    top: 0;\r\n    right: 100%;\r\n    bottom: 0;\r\n    /*background-color: white;*/\r\n    /*border: 1px solid #dddddd;*/\r\n    border-top: none;\r\n    z-index: 300;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-layout-editor-tool-ctn > div {\r\n    pointer-events: initial;\r\n}\r\n\r\n.as-layout-editor-tool-ctn .as-undo-history,\r\n.as-layout-editor-tool-ctn .as-form-component-properties-editor {\r\n    background-color: white;\r\n    border-left: 1px solid #dddddd;\r\n    border-bottom: 1px solid #dddddd;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-layout-editor-tool-ctn .as-form-component-properties-editor {\r\n    max-height: 100%;\r\n    min-width: 150px;\r\n}\r\n\r\n.as-layout-editor-tool-tab-bar {\r\n    padding: 0 2px 0 1px;\r\n}\r\n\r\n.as-layout-editor-tool-tab-btn {\r\n    display: block;\r\n    width: 32px;\r\n    height: 32px;\r\n    padding: 0;\r\n    border: none;\r\n    outline: none;\r\n    font-size: 14px;\r\n}\r\n\r\n\r\n.as-layout-editor-tool-tab-btn:hover {\r\n    color: rgb(102, 102, 102);\r\n}\r\n\r\n.as-layout-editor-tool-tab-btn:active,\r\n.as-layout-editor-tool-tab-btn.active {\r\n    background-color: rgb(169, 169, 169);\r\n    color: white;\r\n}\r\n\r\n.as-layout-editor-tool-tab-btn.as-hidden {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-layout-editor-quickpath-container {\r\n    padding-left: 0.5em;\r\n}\r\n\r\n.as-layout-editor-cmd-tool-container {\r\n    border-bottom: solid 1px #dddddd;\r\n}\r\n\r\n.as-layout-editor-cmd-tool-container:empty,\r\n.as-layout-editor-property-container:empty {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-layout-editor-property-container {\r\n    /*display: inline-block;*/\r\n    border-left: solid 1px #dddddd;\r\n    display: none;\r\n}\r\n\r\n.as-layout-editor-property-container .as-form-component-properties-editor {\r\n    display: inline-block;\r\n}\r\n\r\n.as-layout-editor-measure-container {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-layout-editor-v-align-line,\r\n.as-layout-editor-h-align-line {\r\n    position: absolute;\r\n\r\n}\r\n\r\n\r\n.as-layout-editor-h-align-line {\r\n    left: 0;\r\n    right: 0;\r\n    border-top: dashed 1px rgba(59, 154, 209, 0.753);\r\n}\r\n\r\n.as-layout-editor-v-align-line {\r\n    top: 0;\r\n    bottom: 0;\r\n    border-left: dashed 1px rgba(59, 154, 209, 0.753);\r\n}\r\n\r\n\r\n.as-layout-editor-space-container {\r\n    position: absolute;\r\n    top: 1.5em;\r\n    left: 1.5em;\r\n    right: 0;\r\n    bottom: 0;\r\n    overflow: hidden;\r\n    --viewport-x: 0;\r\n    --viewport-y: 0;\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n}\r\n\r\n\r\n.as-layout-editor-space {\r\n    display: inline-block;\r\n    position: absolute;\r\n    left: var(--viewport-x);\r\n    top: var(--viewport-y);\r\n    overflow: visible;\r\n}\r\n\r\n.as-layout-editor-space-container.as-homing .as-layout-editor-space {\r\n    transition: left 0.2s, top 0.2s;\r\n}\r\n\r\n\r\n.as-layout-editor-layout-container {\r\n    padding: 0.4em;\r\n    display: inline-block;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-layout-editor-layout-container * {\r\n    pointer-events: none !important;\r\n}\r\n\r\n.as-layout-editor-layout-container > .as-relative-layout,\r\n.as-layout-editor-layout-container > .as-linear-layout,\r\n.as-layout-editor-layout-container > .as-chain-layout {\r\n    -webkit-box-shadow: 1px 1px 15px 0px rgba(0, 0, 0, 0.75);\r\n    -moz-box-shadow: 1px 1px 15px 0px rgba(0, 0, 0, 0.75);\r\n    box-shadow: 1px 1px 15px 0px rgba(0, 0, 0, 0.75);\r\n}\r\n\r\n\r\n.as-layout-editor-background {\r\n    z-index: 0;\r\n}\r\n\r\n.as-layout-editor-layout-container {\r\n    z-index: 1;\r\n}\r\n\r\n\r\n.as-layout-editor-foreground {\r\n    position: absolute;\r\n    left: -10000px;\r\n    top: -100000px;\r\n    right: -10000px;\r\n    bottom: -10000px;\r\n    z-index: 100;\r\n}\r\n\r\nsvg.as-layout-editor-overlay-graphic {\r\n    position: absolute;\r\n    left: -500px;\r\n    top: -500px;\r\n    width: 2000px;\r\n    height: 5000px;\r\n    z-index: 10;\r\n    pointer-events: none;\r\n}\r\n\r\n\r\n.as-layout-editor-hrule-container {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 1.5em;\r\n    right: 0;\r\n    height: 1.5em;\r\n    z-index: 1;\r\n}\r\n\r\n.as-layout-editor-vrule-container {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 1.5em;\r\n    bottom: 0;\r\n    width: 1.5em;\r\n    z-index: 2;\r\n\r\n}\r\n\r\n.as-layout-editor-vrule-container > .as-vruler,\r\n.as-layout-editor-hrule-container > .as-hruler {\r\n    height: 100%;\r\n    width: 100%;\r\n}\r\n\r\n.as-layout-editor-new-component-menu-trigger {\r\n    position: absolute;\r\n    width: 1.5em;\r\n    height: 1.5em;\r\n    top: -1.5em;\r\n    left: -1.5em;\r\n}\r\n\r\n\r\n.as-layout-editor-preview-button-container {\r\n    left: 0;\r\n    top: 0;\r\n    width: 1.5em;\r\n    height: 1.45em;\r\n}\r\n\r\n.as-layout-editor-preview-button-container > button {\r\n    border: none;\r\n    width: 100%;\r\n    height: 100%;\r\n    padding: 0;\r\n    outline: none;\r\n    cursor: pointer;\r\n    background-color: transparent;\r\n    font-size: 1em;\r\n}\r\n\r\n.as-layout-editor-preview-button-container > button:hover {\r\n    background-color: rgba(169, 169, 170, 0.2);\r\n}\r\n\r\n.as-layout-editor-preview-button-container > button:active {\r\n    background-color: rgba(169, 169, 170, 0.4);\r\n}\r\n\r\n.as-layout-editor-mouse-selecting-box {\r\n    z-index: 100;\r\n    position: absolute;\r\n    background-color: rgba(0, 0, 255, 0.1);\r\n}\r\n\r\n.as-vruler,\r\n.as-hruler {\r\n    -webkit-user-select: none;\r\n    /* Safari 3.1+ */\r\n    -moz-user-select: none;\r\n    /* Firefox 2+ */\r\n    -ms-user-select: none;\r\n    /* IE 10+ */\r\n    user-select: none;\r\n    /* Standard syntax */\r\n    background-color: rgba(169, 169, 170, 0.5);\r\n}\r\n\r\n.as-vruler-mouse,\r\n.as-hruler-mouse {\r\n    position: absolute;\r\n    box-sizing: border-box;\r\n    z-index: 6;\r\n\r\n}\r\n\r\n.as-vruler-mouse {\r\n    left: 0;\r\n    right: 0;\r\n    border-top: solid 2px rgba(255, 0, 0, 0.5);\r\n}\r\n\r\n.as-hruler-mouse {\r\n    top: 0;\r\n    bottom: 0;\r\n    border-left: solid 2px rgba(255, 0, 0, 0.5);\r\n}\r\n\r\n.as-layout-editor .as-hruler-line,\r\n.as-layout-editor .as-vruler-line,\r\n.as-layout-editor .as-hruler-major-number,\r\n.as-layout-editor .as-vruler-major-number {\r\n    z-index: 5;\r\n}\r\n\r\n\r\n.as-hruler-editing,\r\n.as-vruler-editing {\r\n    z-index: 1;\r\n    position: absolute;\r\n    background-color: rgba(255, 255, 255, 0.9);\r\n}\r\n\r\n\r\n.as-hruler-editing {\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n\r\n.as-vruler-editing {\r\n    left: 0;\r\n    right: 0;\r\n}\r\n\r\n.as-layout-editor-curtain {\r\n    position: absolute;\r\n    background-color: rgba(169, 169, 180, 0.5);\r\n}\r\n\r\n\r\n.as-mouse-status {\r\n\r\n}\r\n\r\n.as-depth-selecting .as-linear-anchor-box,\r\n.as-depth-selecting .as-chain-anchor-box {\r\n    position: relative;\r\n}\r\n\r\n.as-depth-selecting .as-linear-anchor-box::before,\r\n.as-depth-selecting .as-chain-anchor-box::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: -0.5px;\r\n    right: -0.5px;\r\n    top: -0.5px;\r\n    bottom: -0.5px;\r\n    border: 1px dashed rgba(169, 169, 255, 0.8);\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n/*test*/\r\n.as-layout-editor-layout-container .as-chain-anchor-box,\r\n.as-layout-editor-layout-container .as-linear-anchor-box {\r\n    position: relative;\r\n}\r\n\r\n/*\r\n\r\n.as-current-layout-selecting-mode.as-editing-layout-anchor > .as-base-component > .as-anchor-box:not(.as-editing-layout-anchor)::before,\r\n.as-current-layout-selecting-mode .as-editing-layout-anchor > .as-base-component > .as-anchor-box:not(.as-editing-layout-anchor)::before,\r\n.as-depth-selecting-mode .as-anchor-box:not(.as-editing-layout-anchor)::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: -0.5px;\r\n    right: -0.5px;\r\n    top: -0.5px;\r\n    bottom: -0.5px;\r\n    border: 1px dashed rgba(107, 107, 211, 0.2);\r\n    box-sizing: border-box;\r\n    z-index: 2;\r\n    pointer-events: none;\r\n}*/\r\n\r\n/*.as-current-layout-selecting-mode.as-editing-layout-anchor > .as-base-component > .as-relative-anchor-box.as-h-align-center.as-v-align-center:not(.as-editing-layout-anchor)::before,*/\r\n/*\r\n.as-current-layout-selecting-mode.as-editing-layout-anchor > .as-base-component > .as-anchor-box.as-h-align-center:not(.as-editing-layout-anchor)::before,\r\n.as-current-layout-selecting-mode .as-editing-layout-anchor > .as-base-component > .as-anchor-box.as-h-align-center:not(.as-editing-layout-anchor)::before,\r\n.as-depth-selecting-mode .as-anchor-box.as-h-align-center:not(.as-editing-layout-anchor)::before {\r\n    left: calc(50% - var(--select-bound-width) / 2 - 0.5px);\r\n    width: calc(var(--select-bound-width) + 1px);\r\n}\r\n\r\n.as-current-layout-selecting-mode.as-editing-layout-anchor > .as-base-component > .as-anchor-box.as-v-align-center:not(.as-editing-layout-anchor)::before,\r\n.as-current-layout-selecting-mode .as-editing-layout-anchor > .as-base-component > .as-anchor-box.as-v-align-center:not(.as-editing-layout-anchor)::before,\r\n.as-depth-selecting-mode .as-anchor-box.as-v-align-center:not(.as-editing-layout-anchor)::before {\r\n    top: calc(50% - var(--select-bound-height) / 2 - 0.5px);\r\n    height: calc(var(--select-bound-height) + 1px);\r\n}\r\n\r\n\r\n.as-editing-layout-anchor::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: -0.5px;\r\n    right: -0.5px;\r\n    top: -0.5px;\r\n    bottom: -0.5px;\r\n    border: 1px dashed #e39898;\r\n}*/\r\n\r\n.as-editing-layout-anchor.as-v-align-center::before {\r\n    top: calc(50% - var(--select-bound-height) / 2 - 0.5px);\r\n    height: calc(var(--select-bound-height) + 1px);\r\n}\r\n\r\n.as-editing-layout-anchor.as-h-align-center::before {\r\n    left: calc(50% - var(--select-bound-width) / 2 - 0.5px);\r\n    width: calc(var(--select-bound-width) + 1px);\r\n}\r\n\r\n\r\n.as-clipboard-anchor-border {\r\n    position: absolute;\r\n    left: -2px;\r\n    right: -2px;\r\n    top: -2px;\r\n    bottom: -2px;\r\n    border: 3px dashed #4086f3;\r\n    box-sizing: border-box;\r\n    pointer-events: none;\r\n    z-index: 2;\r\n}\r\n\r\n.as-relative-anchor-box.as-v-align-center > .as-clipboard-anchor-border {\r\n    top: calc(50% - var(--select-bound-height) / 2 - 2px);\r\n    height: calc(var(--select-bound-height) + 4px);\r\n}\r\n\r\n.as-relative-anchor-box.as-h-align-center > .as-clipboard-anchor-border {\r\n    left: calc(50% - var(--select-bound-width) / 2 - 2px);\r\n    width: calc(var(--select-bound-width) + 4px);\r\n}\r\n\r\n\r\n.as-page-setting-paper-box {\r\n    border: 1px dashed black;\r\n    display: inline-block;\r\n    /*background-color: rgb(253, 221, 155);*/\r\n    background-color: rgb(195, 208, 139);\r\n    line-height: 1.5;\r\n}\r\n\r\n.as-page-setting-padding-tb {\r\n    text-align: center;\r\n}\r\n\r\n.as-page-setting-padding-lr {\r\n    text-align: center;\r\n    width: 4em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-page-setting-paper-content-box {\r\n    background-color: rgb(140, 182, 192);\r\n    padding: 5px 10px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-le-bound-rect {\r\n    fill: none;\r\n    stroke: rgba(107, 107, 211, 0.5);\r\n    stroke-dasharray: 4 2;\r\n}\r\n\r\n.as-le-editing-layout-bound {\r\n    stroke: #d97a7a;\r\n    stroke-width: 2;\r\n}\r\n\r\n\r\n.as-text-editing-tool-attached .as-layout-editor-foreground {\r\n    visibility: hidden;\r\n}\r\n\r\n.as-text-editing-tool-attached .as-layout-editor-layout-container .as-text-editing-tool-target {\r\n    pointer-events: all !important;\r\n    outline: none;\r\n}\r\n\r\n.as-layout-editor-v-scroll-bar,\r\n.as-layout-editor-h-scroll-bar {\r\n    position: absolute;\r\n    z-index: 100;\r\n    right: 0;\r\n    bottom: 0;\r\n    visibility: hidden;\r\n    background-color: rgba(180, 180, 182, 0.2);\r\n\r\n}\r\n\r\n.as-layout-editor-v-scroll-bar {\r\n    top: 0;\r\n    width: 10px;\r\n}\r\n\r\n.as-layout-editor-h-scroll-bar {\r\n    left: 0;\r\n    height: 10px;\r\n}\r\n\r\n.as-layout-editor-v-scroll-bar.as-overflow,\r\n.as-layout-editor-h-scroll-bar.as-overflow {\r\n    visibility: visible;\r\n}\r\n\r\n/*****************************/\r\n.as-text-decoration-picker {\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    padding: 5px;\r\n    display: inline-block;\r\n}\r\n\r\n.as-text-decoration-picker .as-table-grid-row[data-name=\"lines\"] button {\r\n    padding: 5px 8px;\r\n    cursor: pointer;\r\n}\r\n\r\n.as-text-decoration-picker .as-table-grid-row[data-name=\"lines\"] button.as-selected {\r\n    background-color: #23669d;\r\n    color: white;\r\n    border-radius: 3px;\r\n}\r\n\r\n\r\n.as-text-decoration-picker .as-table-grid-cell {\r\n    padding-bottom: 5px;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-text-decoration-picker .as-table-grid-cell:not(:last-child) {\r\n    padding-right: 10px;\r\n}\r\n\r\n.as-line-style-select-menu {\r\n    white-space: pre;\r\n    padding: 5px 30px 5px 5px;\r\n    box-sizing: border-box;\r\n    border: 1px solid #dddddd;\r\n    text-align: center;\r\n    position: relative;\r\n    cursor: pointer;\r\n}\r\n\r\n.as-text-decoration-picker .as-table-grid-cell > * {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-text-decoration-picker .as-table-grid-cell > *:not(:last-child) {\r\n    margin-right: 10px;\r\n}\r\n\r\n.as-text-decoration-picker .as-color-picker-button:disabled {\r\n    opacity: 0.5;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-text-decoration-picker-preview {\r\n    padding: 15px 10px;\r\n    text-align: center;\r\n    box-sizing: border-box;\r\n    border: 1px solid #dddddd;\r\n}\r\n\r\n.as-line-style-select-menu-item {\r\n    white-space: pre;\r\n    text-align: center;\r\n    cursor: default;\r\n    padding: 5px 30px 5px 5px;\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n}\r\n\r\n.as-line-style-select-menu-item:hover {\r\n    background-color: #efefef;\r\n}\r\n\r\n.as-line-style-select-menu-item.as-selected {\r\n    background-color: #dfdfdf;\r\n}\r\n", ""]);



/***/ }),

/***/ 46921:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-size-box-editor {\r\n    padding: 0.35em;\r\n    border: 1px solid black;\r\n    font-size: 12px;\r\n    display: table;\r\n    width: 100%;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-size-box-editor-title{\r\n    width: 0;\r\n    overflow: visible;\r\n    white-space: nowrap;\r\n    color: rgb(169, 169, 169);\r\n}\r\n\r\n.as-size-box-editor-position-top,\r\n.as-size-box-editor-position-bottom {\r\n    height: 1.2em;\r\n    text-align: center;\r\n    display: table-row;\r\n}\r\n\r\n.as-size-box-editor-position-top>*,\r\n.as-size-box-editor-position-bottom>* {\r\n    display: table-cell;\r\n}\r\n\r\n.as-size-box-editor-position-top>span,\r\n.as-size-box-editor-position-bottom>span {\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.as-size-box-editor-top-text{\r\n    outline: none;\r\n}\r\n\r\n.as-size-box-editor-position-top>span {\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.as-size-box-editor-position-mid {\r\n    display: table-row;\r\n}\r\n\r\n.as-size-box-editor-position-left,\r\n.as-size-box-editor-position-right {\r\n    display: table-cell;\r\n    width: 0;\r\n    padding-left: 0.2em;\r\n    padding-right: 0.2em;\r\n    vertical-align: middle;\r\n\r\n}\r\n\r\n.as-size-box-editor-position-left>span,\r\n.as-size-box-editor-position-right>span {\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.as-size-box-editor-position-center {\r\n    display: table-cell;\r\n    width: 100%;\r\n    box-sizing: border-box;\r\n    background-color: rgba(255, 0, 0, 0.3);    \r\n}\r\n", ""]);



/***/ }),

/***/ 96418:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-linear-anchor-box {\r\n    display: block;\r\n    box-sizing: content-box;\r\n}\r\n\r\n\r\n.as-linear-anchor-box:not(.as-width-auto) > .as-base-component {\r\n    width: 100%;\r\n}\r\n\r\n.as-linear-anchor-box:not(.as-height-auto) > .as-base-component {\r\n    height: 100%;\r\n}", ""]);



/***/ }),

/***/ 80793:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-list-editor-add-row {\r\n    cursor: pointer;\r\n}\r\n\r\ntable.as-list-editor {\r\n    border-collapse: collapse;\r\n}\r\n\r\ntable.as-list-editor,\r\ntable.as-list-editor>thead>tr>td,\r\ntable.as-list-editor>tbody>tr>td {\r\n    border: 1px solid #d6d6d6;\r\n}\r\n\r\n.as-list-editor-text,\r\n.as-list-editor-value {\r\n    outline: none;\r\n    padding: 0.2em 1em;\r\n}\r\n\r\n.as-list-editor-cell.empty-cell {\r\n    background-color: rgba(255, 20, 20, 0.3);\r\n}\r\n\r\n.as-list-editor-cell.duplicate-cell {\r\n    background-color: rgba(235, 229, 151, 0.3);\r\n}\r\n\r\n.as-list-editor-quick-menu-trigger {\r\n    border: none;\r\n    width: 1.5em;\r\n    height: 1.5em;\r\n    font-size: 1em;\r\n    padding: 0;\r\n    border-radius: 0;\r\n    margin: 0;\r\n}", ""]);



/***/ }),

/***/ 62718:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-single-page-scroller-viewport > .as-process-flow-diagram-editor:first-child:last-child {\r\n    width: 100%;\r\n    height: 100%;\r\n    box-sizing: border-box;\r\n}\r\n\r\nbody.pfde-hanging-tool-dragging,\r\nbody.pfde-hanging-tool-dragging .pfde-hanging-tool-active {\r\n    cursor: grabbing;\r\n}\r\n\r\n.pfde-hanging-tool-active {\r\n    cursor: grab;\r\n}\r\n\r\n\r\n.pfde-hanging-tool-active .as-cde-node-layer,\r\n.pfde-hanging-tool-active .as-cde-line-layer path {\r\n    pointer-events: none;\r\n}\r\n\r\n.pfde-selecting-area {\r\n    position: absolute;\r\n    border: 2px solid rgba(72, 129, 239, 0.8);\r\n    background-color: rgba(72, 129, 239, 0.2);\r\n    z-index: 2;\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.pfde-block {\r\n    position: absolute;\r\n}\r\n\r\n.pfdeb-start-background {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    right: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.pfde-block .as-cde-node-type-icon {\r\n    font-size: 20px;\r\n    margin-right: 5px;\r\n}\r\n\r\n.pfdeb-start-background-left {\r\n    box-sizing: border-box;\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    right: 60px;\r\n    background-color: white;\r\n    border-left: 1px solid black;\r\n    border-top: 1px solid black;\r\n    border-bottom: 1px solid black;\r\n}\r\n\r\n\r\n.as-cde-intermediate-point-circle {\r\n    fill: var(--line-color);\r\n    stroke: none;\r\n    opacity: 0.5;\r\n}\r\n\r\n.pfde-draw-line-tool-active .as-cde-intermediate-point {\r\n    cursor: move;\r\n}\r\n\r\n.as-cde-intermediate-point-circle-highlight {\r\n    stroke: none;\r\n    fill: none;\r\n}\r\n\r\n.as-cde-intermediate-point.as-selected .as-cde-intermediate-point-circle-highlight {\r\n    fill: rgb(79, 235, 207);\r\n}\r\n\r\n.as-cde-intermediate-point.as-selected.as-focus .as-cde-intermediate-point-circle-highlight {\r\n    fill: rgb(253, 194, 23);\r\n}\r\n\r\n.pfde-graphic-canvas {\r\n    position: absolute;\r\n    z-index: 0;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    user-select: none;\r\n    --webkit-user-select: none;\r\n}\r\n\r\n.pfde-line-layer {\r\n\r\n}\r\n\r\n\r\n.pfde-intermediate-point-layer {\r\n\r\n}\r\n\r\n\r\n.pfde-draw-line-tool-active {\r\n    cursor: crosshair;\r\n}\r\n\r\n.pfde-block-go-to-btn {\r\n\r\n}\r\n\r\n.as-cde-node-header {\r\n    z-index: 3;\r\n    position: relative;\r\n}\r\n\r\n.as-cde-node-header .mdi-flag-checkered {\r\n    color: #0057fa;\r\n}\r\n\r\n.as-cde-node-header .mdi-flag-off-outline {\r\n    color: #fa0000;\r\n}\r\n\r\n.as-cde-node-header .mdi-ray-start-arrow {\r\n    color: #f6ac00;\r\n}\r\n\r\n.pfde-block.as-hovering .pfde-block-pin-to-connect-ctn {\r\n    display: block;\r\n}\r\n\r\n\r\n.pfde-block-pin-to-connect-ctn {\r\n    display: none;\r\n    position: absolute;\r\n    left: -18px;\r\n    top: -18px;\r\n    bottom: -18px;\r\n    right: -18px;\r\n\r\n}\r\n\r\n.pfde-block-pin-to-connect {\r\n    position: absolute;\r\n    height: 10px;\r\n    width: 10px;\r\n    border-radius: 50%;\r\n    background-color: #35eedf;\r\n}\r\n\r\n.pfde-block-pin-to-connect:hover {\r\n    background-color: #f8ed0a;\r\n}\r\n\r\n.pfde-block-pin-to-connect.as-left {\r\n    left: 0;\r\n    top: calc(50% - 5px);\r\n}\r\n\r\n\r\n.pfde-block-pin-to-connect.as-right {\r\n    right: 0;\r\n    top: calc(50% - 5px);\r\n}\r\n\r\n.pfde-block-pin-to-connect.as-top {\r\n    top: 0;\r\n    left: calc(50% - 5px);\r\n}\r\n\r\n\r\n.pfde-block-pin-to-connect.as-bottom {\r\n    bottom: 0;\r\n    left: calc(50% - 5px);\r\n}\r\n\r\n\r\n.pfde-block[data-tag=\"Success\"] .pfde-block-go-to-btn,\r\n.pfde-block[data-tag=\"Fail\"] .pfde-block-go-to-btn {\r\n    display: none;\r\n}\r\n\r\n.pfde-block-go-to-btn {\r\n    cursor: pointer;\r\n}\r\n\r\n.pfde-new-point {\r\n    pointer-events: none;\r\n}", ""]);



/***/ }),

/***/ 51886:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-form-explorer {}\r\n\r\n.as-form-explorer .absol-drop-panel-head {\r\n    font-size: 12px;\r\n    height: 2em;\r\n    line-height: 2;\r\n}\r\n\r\n.as-form-explorer .absol-drop-panel-head > svg,\r\n.as-form-explorer .absol-drop-panel-head > span{\r\n    font-size: 14px;\r\n}\r\n\r\n\r\n.absol-drop-panel-head svg {\r\n    width: 0.8em;\r\n    height: 0.8em;\r\n    line-height: 1.5;\r\n}\r\n\r\n\r\n.as-form-explorer .absol-exp-tree {\r\n    font-size: 14px;\r\n}\r\n\r\n.as-form-explorer .absol-drop-panel-head {\r\n    position: relative;\r\n}\r\n\r\n.as-form-explorer .absol-drop-panel-head-cmd-button-container {\r\n    position: absolute;\r\n    top: 0px;\r\n    bottom: 0px;\r\n    right: 9px;\r\n}\r\n\r\n.as-form-explorer .absol-drop-panel-head-cmd-button-container>button {\r\n    width: 2em;\r\n    height: 2em;\r\n    font-size: inherit;\r\n    margin-left: 0.3em;\r\n    padding: 0;\r\n    background-color: transparent;\r\n    vertical-align: middle;\r\n    border: none;\r\n    border-radius: 0;\r\n    outline: none;\r\n}\r\n\r\n\r\n.as-form-explorer .absol-drop-panel-head-cmd-button-container>button:hover{\r\n    background-color: rgba(169, 169, 169, 0.2);\r\n}\r\n\r\n\r\n.as-form-explorer .absol-drop-panel-head-cmd-button-container>button>span{\r\n    font-size: 1.5em;\r\n}\r\n", ""]);



/***/ }),

/***/ 33897:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-property-editor {\r\n    padding: 0.357em 0;\r\n}\r\n\r\n.as-property-editor > .as-basic-table{\r\n    width: 100%;\r\n}\r\n.as-property-editor .as-color-picker-button {\r\n    height: 2em;\r\n}\r\n\r\n.as-basic-table {\r\n    border-collapse: collapse;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-basic-table > thead {\r\n    font-style: italic;\r\n    background: #f5f5f5;\r\n}\r\n\r\n.as-basic-table > tbody > tr > td,\r\n.as-basic-table > thead > tr > td {\r\n    border: 1px solid #aaaaaa;\r\n    padding: 0.25em;\r\n\r\n}\r\n\r\n.as-form-property-tab > .as-basic-table {\r\n    width: calc(100% - 10px);\r\n    margin: 5px;\r\n}\r\n\r\n.as-basic-table > tbody > tr > td > input[type=\"text\"],\r\n.as-basic-table > tbody > tr > td > textarea {\r\n    font-size: 1em;\r\n    width: 100%;\r\n    box-sizing: border-box;\r\n    border: solid 1px #d6d6d6;\r\n    outline: none;\r\n}\r\n\r\n.as-basic-table > tbody > tr > td > textarea {\r\n    width: 100% !important;\r\n}\r\n\r\n.as-basic-table > tbody > tr > td>* {\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.as-property-editor-text-align-input {\r\n    font-size: 1.5em;\r\n    width: 1.2em;\r\n    height: 1.2em;\r\n    padding: 0;\r\n    margin: 0;\r\n    box-sizing: content-box;\r\n    border: solid 1px #ddd;\r\n    background-color: rgba(169, 169, 172, 0);\r\n    outline: none;\r\n}\r\n\r\n\r\n.as-window-box-body> .as-property-editor{\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    overflow: auto;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.as-property-editor tr[data-type=\"measurePosition\"] .absol-number-input,\r\n.as-property-editor tr[data-type=\"measureSize\"] .absol-number-input{\r\n    width: 5em;\r\n}\r\n\r\n.as-property-editor tr[data-type=\"Permission\"] button:not(:disabled) {\r\n    cursor: pointer;\r\n}\r\n\r\n\r\n.as-property-editor-text-decoration-input {\r\n    border: none;\r\n    height: 25px;\r\n    box-sizing: border-box;\r\n    padding: 0 10px;\r\n    background-color: transparent;\r\n}\r\n\r\n.as-property-editor-text-decoration-input:hover{\r\n    background-color: rgba(150, 150, 200, 0.3);\r\n}\r\n", ""]);



/***/ }),

/***/ 88448:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-relative-anchor-box {\r\n    position: absolute;\r\n    z-index: 1;\r\n    pointer-events: none;\r\n}\r\n\r\n\r\n/*\r\n    width: auto | set\r\n    left: set\r\n    right: unset,\r\n*/\r\n\r\n\r\n\r\n/*\r\n    width: auto | set\r\n    right: set\r\n    left: unset,\r\n*/\r\n.as-relative-anchor-box.as-h-align-right {\r\n    right: 0;\r\n}\r\n\r\n\r\n/*\r\n    left: unset\r\n    right: unset\r\n    width: auto | set\r\n    warning: inner element should be set text-align to default to prevent error \r\n*/\r\n.as-relative-anchor-box.as-h-align-center {\r\n    left: 0;\r\n    right: 0;\r\n    text-align: center;\r\n}\r\n\r\n/*\r\n    left: set\r\n    right: set\r\n    width: unset\r\n*/\r\n.as-relative-anchor-box.as-h-align-fixed {\r\n    left: 0;\r\n    right: 0;\r\n}\r\n\r\n\r\n/*\r\n    left: set\r\n    right: set\r\n    width: unset\r\n*/\r\n.as-relative-anchor-box.as-h-align-fixed {\r\n    left: 0;\r\n    right: 0;\r\n}\r\n\r\n\r\n/*\r\n    bottom: set\r\n    height: unset\r\n    top: set\r\n*/\r\n.as-relative-anchor-box.as-v-align-fixed {\r\n    bottom: 0;\r\n    top: 0\r\n}\r\n\r\n\r\n.as-relative-anchor-box.as-v-align-center > .as-align-box > .as-align-box-cell {\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-relative-anchor-box > .as-base-component {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n\r\n.as-relative-anchor-box.as-v-align-center {\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-relative-anchor-box.as-v-align-center > * {\r\n    white-space: normal;\r\n}\r\n\r\n.as-relative-anchor-box.as-v-align-center::after {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n    width: 0;\r\n}\r\n\r\n.as-relative-anchor-box.as-v-align-center>.as-base-component{\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}", ""]);



/***/ }),

/***/ 90914:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".af-remote-form-preview {\r\n    display: flex;\r\n    flex-direction: column;\r\n}\r\n\r\n.af-remote-form-preview-body {\r\n    flex-grow: 1;\r\n    overflow: auto;\r\n}\r\n\r\n.af-remote-form-preview-body > div {\r\n    width: auto;\r\n    height: auto;\r\n}\r\n\r\n.af-remote-form-preview-header {\r\n    background-color: rgba(167, 167, 167, 0.1);\r\n}", ""]);



/***/ }),

/***/ 90933:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-sc-expression-input {\r\n    border-color: var(--as-input-border-color);\r\n    border-style: solid;\r\n    box-sizing: border-box;\r\n    border-width: 1px;\r\n    border-radius: var(--as-input-border-radius);\r\n    font-size: 14px;\r\n    position: relative;\r\n}\r\n\r\n.as-sc-expression-input-content {\r\n    min-height: 28px;\r\n    outline: none;\r\n    line-height: 28px;\r\n    padding-left: calc(18px + var(--as-input-horizontal-padding));\r\n    white-space: pre;\r\n}\r\n\r\n.as-sc-expression-input-content .as-token[data-type=\"number\"] {\r\n    color: #0289f6;\r\n}\r\n\r\n.as-sc-expression-input-content .as-token[data-type=\"string\"] {\r\n    color: darkgreen;\r\n}\r\n\r\n\r\n.as-sc-expression-input-icon-ctn {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    pointer-events: none;\r\n    font-size: 1.5em;\r\n    line-height: 28px;\r\n}\r\n\r\n.as-sc-expression-input-icon-ctn .mdi-function-variant {\r\n\r\n    color: rgba(169, 169, 170);\r\n}\r\n\r\n.as-sc-expression-input-icon-ctn .mdi-alert-circle {\r\n    color: red;\r\n    opacity: 0.8;\r\n    display: none;\r\n}\r\n\r\n\r\n.as-sc-expression-input.as-error .as-sc-expression-input-icon-ctn .mdi-alert-circle {\r\n    display: inline-block;\r\n}\r\n\r\n.as-sc-expression-input.as-error .as-sc-expression-input-icon-ctn .mdi-function-variant {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-token.as-unexpected-token {\r\n    background-color: red;\r\n    animation-name: error_blink;\r\n    animation-duration: 1s;\r\n    animation-iteration-count: infinite;\r\n}\r\n\r\n@keyframes error_blink {\r\n    0% {\r\n        background-color: red\r\n    }\r\n    50% {\r\n        background-color: transparent\r\n    }\r\n    100% {\r\n        background-color: red\r\n    }\r\n}", ""]);



/***/ }),

/***/ 88022:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-select-component-type-dialog > .as-message-dialog-body {\r\n    max-height: calc(75vh - 100px);\r\n    min-width: 420px;\r\n    overflow: auto;\r\n    padding: 0;\r\n}\r\n\r\n.as-select-component-type-dialog .absol-exp-node {\r\n    height: 3em;\r\n}\r\n\r\n.as-select-component-type-dialog .absol-exp-tree.as-selected>button{\r\n    background-color: rgba(185, 235, 20, 0.3);\r\n}\r\n\r\n.as-select-component-type-modal {\r\n    padding-top: 15vh;\r\n    padding-bottom: 10vh;\r\n}\r\n\r\n.as-select-component-type-modal.as-modal::before,\r\n.as-select-component-type-modal.as-modal > .as-modal-content {\r\n    vertical-align: top;\r\n}\r\n\r\n", ""]);



/***/ }),

/***/ 57974:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-select-list-editor {\r\n    width: 100%;\r\n    height: 100%;\r\n    position: relative;\r\n}\r\n\r\n\r\n.as-select-list-editor-cmd-tool-container {\r\n    display: block;\r\n    border-bottom: solid 1px #dddddd;\r\n}\r\n\r\n.as-select-list-editor-cmd-tool-container:empty {\r\n    display: none;\r\n}\r\n\r\n.as-select-list-editor-body {\r\n    position: absolute;\r\n    bottom: 0;\r\n    left: 0;\r\n    right: 0;\r\n}\r\n\r\n.as-select-list-editor-body > .asht-table-editor {\r\n    width: 100%;\r\n    height: 100%;\r\n}", ""]);



/***/ }),

/***/ 33235:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-status-bar {\r\n    background-color: rgb(240, 240, 240);\r\n    position: relative;\r\n    min-height: 1.2em;\r\n    color: black;\r\n}\r\n\r\nbutton.as-status-bar-item {\r\n    border: none;\r\n    background-color: transparent;\r\n    font-size: 0.8em;\r\n    height: 100%;\r\n    padding-left: 0.5em;\r\n    padding-right: 0.5em;\r\n    color: black;\r\n    outline: none;\r\n}\r\n\r\nbutton.as-status-bar-item:hover {\r\n    background-color: rgba(102, 102, 102, 0.1);\r\n}\r\n\r\nbutton.as-status-bar-item .mdi {\r\n    font-size: 1.2em;\r\n}\r\n\r\n/*\r\n    rgb(r, g, 255) * alpha + (1 - alpha) * rgb(0, 122, 204) = rgb(31, 137, 210)\r\n=>  255 * alpha + 204 - 204 * alpha = 210\r\n=>  (255 - 204)alpha = 210-204\r\n=> alpha = (210-204)/(255-204)\r\n\r\n*/\r\n.as-status-bar-left {\r\n    /* background: rgba(red, green, 255, 0.11764705882352941); */\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n\r\n}\r\n\r\n.as-status-bar-right {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    padding-right: 0.5em;\r\n    line-height: 1.2;\r\n}", ""]);



/***/ }),

/***/ 97643:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-tokenize-input {\r\n    font-size: 14px;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    line-height: 28px;\r\n    min-height: 30px;\r\n    box-sizing: border-box;\r\n    border-radius: var(--as-input-border-radius);\r\n    border-color: var(--as-input-border-color);\r\n    border-style: solid;\r\n    outline: none;\r\n    border-width: 1px;\r\n    padding-left: var(--as-input-horizontal-padding);\r\n    position: relative;\r\n}\r\n\r\n.as-tokenize-input .as-token {\r\n    white-space: pre;\r\n}\r\n\r\n\r\n.as-tokenize-input .as-type-number {\r\n    color: #0289f6;\r\n}\r\n\r\n.as-tokenize-input:focus .as-type-symbol.as-highlight {\r\n    color: #ff16ae;\r\n}\r\n\r\n.as-tokenize-input .as-type-constance{\r\n    color: #6c3910;\r\n}\r\n", ""]);



/***/ }),

/***/ 82278:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-undo-history-window {\r\n    min-width: 200px;\r\n    min-height: 200px;\r\n    z-index: 5000;\r\n}\r\n\r\n.as-undo-history-window  .as-window-box-body{\r\n    position: relative;\r\n}\r\n\r\n.as-undo-history-window .as-undo-history{\r\n    width: 100%;\r\n    height: 100%;\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n}\r\n\r\n.as-undo-history {\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    position: relative;\r\n    padding-bottom: 2em;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n\r\n.as-undo-history-item-list {\r\n    overflow-y: auto;\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-undo-history-active-buttons {\r\n    height: 1.4em;\r\n    padding: 0.1em;\r\n}\r\n\r\n.as-undo-history-active-buttons button {\r\n    width: 1.4em;\r\n    height: 1.4em;\r\n    font-size: 1em;\r\n    padding: 0;\r\n    border: 0;\r\n    margin-left: 0.2em;\r\n    margin-right: 0.2em;\r\n    outline: none;\r\n    background-color: rgba(169, 169, 169, 0.1);\r\n}\r\n\r\n.as-undo-history-active-buttons button:disabled {\r\n    pointer-events: none;\r\n}\r\n\r\n.as-undo-history-active-buttons button:hover {\r\n    background-color: rgba(169, 169, 169, 0.2);\r\n}\r\n\r\n.as-undo-history-active-buttons button:active {\r\n    background-color: rgba(169, 169, 169, 0.4);\r\n}\r\n\r\n.as-undo-history-active-buttons .mdi-delete {\r\n    color: rgb(255, 59, 59);\r\n}\r\n\r\n.as-undo-history-active-buttons-right-container {\r\n    position: absolute;\r\n    top: 0.1em;\r\n    right: 0.1em;\r\n}\r\n\r\n.as-undo-history-item {\r\n    position: relative;\r\n    padding-left: 1.4em;\r\n    min-height: 1.4em;\r\n    box-sizing: content-box;\r\n    border-bottom: 1px solid #ddd;\r\n    cursor: pointer;\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n    white-space: nowrap;\r\n\r\n}\r\n\r\n.as-undo-history-item > span {\r\n    overflow: hidden;\r\n\r\n}\r\n\r\n.as-undo-history-item-icon-container {\r\n    top: calc(50% - 0.6em);\r\n    bottom: calc(50% - 0.6em);\r\n    left: 0.1em;\r\n    width: 1.2em;\r\n    position: absolute;\r\n}\r\n\r\n.as-undo-history-item-icon-container > span {\r\n    font-size: 1em;\r\n    line-height: 1.2;\r\n}\r\n\r\n.as-undo-history-item-active {\r\n    background: rgba(169, 169, 199, 0.3);\r\n}\r\n\r\n.as-undo-history-item-disabled {\r\n    color: rgb(152, 152, 155);\r\n}", ""]);



/***/ }),

/***/ 68299:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-vline {\r\n    position: absolute;\r\n    pointer-events: none;\r\n    opacity: 0.5;\r\n\r\n}\r\n\r\n.as-vline-body {\r\n    position: relative;\r\n    border-left: solid 2px rgb(55, 180, 159);\r\n    box-sizing: border-box;\r\n    height:  100%;\r\n    margin-left: -1px;\r\n    margin-right: -1px;\r\n\r\n}\r\n\r\n.as-vline-dot {\r\n    position: absolute;\r\n    left: calc(-0.2em - 1px);\r\n    height: 0.4em;\r\n    width: 0.4em;\r\n    background-color: rgb(55, 180, 159);\r\n}\r\n\r\n\r\n.as-vline-dot.top {\r\n    top: -0.2em;\r\n}\r\n\r\n\r\n.as-vline-dot.bottom {\r\n    bottom: -0.2em;\r\n}", ""]);



/***/ }),

/***/ 68042:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-autocomplete-input {\r\n    display: inline-block;\r\n    position: relative;\r\n    box-sizing: border-box;\r\n    border: solid 1px #d6d6d6;\r\n}\r\n\r\n.absol-autocomplete-input.absol-disabled {\r\n    pointer-events: none;\r\n    color: rgb(84, 84, 84);\r\n    background-color: rgb(235, 235, 228);\r\n}\r\n\r\n.absol-autocomplete-input>input {\r\n    min-width: 100%;\r\n    min-height: 100%;\r\n    box-sizing: border-box;\r\n    background-color: transparent;\r\n    border: none;\r\n    outline: none;\r\n}\r\n\r\n\r\n.absol-autocomplete-input-dropdown {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 100%;\r\n    min-width: 100%;\r\n    z-index: 1005;\r\n    border: solid 1px rgb(169, 169, 169);\r\n    box-sizing: border-box;\r\n    background-color: white;\r\n}\r\n\r\n.absol-autocomplete-input-dropdown .as-bscroller{\r\n    overflow-y: auto;\r\n}\r\n\r\n.absol-autocomplete-input-dropdown.top {\r\n    top: auto;\r\n    bottom: 100%;\r\n}\r\n\r\n.absol-autocomplete-input-item {\r\n    height: 30px;\r\n}\r\n\r\n.absol-autocomplete-input-item:hover {\r\n    background-color: rgba(169, 169, 169, 0.18605);\r\n    cursor: pointer;\r\n}\r\n\r\n.absol-autocomplete-input-item.active,\r\n.absol-autocomplete-input-item.active:hover {\r\n    background-color: rgba(169, 169, 169, 0.37209);\r\n}\r\n\r\n.absol-autocomplete-input-item-text {\r\n    line-height: 30px;\r\n    margin-left: 5px;\r\n    margin-right: 5px;\r\n}", ""]);



/***/ }),

/***/ 63608:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-has-board-table-drag,\r\n.as-has-board-table-drag * {\r\n    cursor: grabbing;\r\n    -webkit-user-select: none !important;\r\n    -moz-user-select: none !important;\r\n    -ms-user-select: none !important;\r\n    user-select: none !important;\r\n}\r\n\r\n\r\n\r\n.as-board-table {\r\n    overflow: visible;\r\n    position: relative;\r\n\r\n}\r\n\r\n.as-board-drag-zone {\r\n    -webkit-user-select: none !important;\r\n    -moz-user-select: none !important;\r\n    -ms-user-select: none !important;\r\n    user-select: none !important;\r\n}\r\n\r\n\r\n.as-board {\r\n    white-space: normal;\r\n    box-sizing: border-box;\r\n    position: relative;\r\n    vertical-align: middle;\r\n}\r\n\r\n/**\r\nBug note: don't put fixed position element to a element which has transform\r\n */\r\n.as-board-moving {\r\n    transform-origin: 30% 55%;\r\n    transform: rotate(5deg);\r\n    transition: transform 0.05s;\r\n    user-select: none;\r\n    pointer-events: none;\r\n    position: fixed !important;\r\n    z-index: 2000;\r\n}\r\n\r\n\r\n.as-board-place-holder {\r\n    opacity: 0.3;\r\n}\r\n\r\n.as-board-table-prevent-context {\r\n    position: fixed;\r\n    --x: -10000px;\r\n    --y: -10000px;\r\n    left: calc(var(--x) - 100px);\r\n    top: calc(var(--y) - 100px);\r\n    opacity: 0;\r\n    z-index: 100000000;\r\n    width: 200px;\r\n    height: 200px;\r\n    cursor: default;\r\n    -webkit-user-select: none;\r\n    -webkit-touch-callout: none;\r\n    -khtml-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none;\r\n    -o-user-select: none;\r\n}", ""]);



/***/ }),

/***/ 19001:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "/* OLD module */\r\n\r\n.absol-bscroller {\r\n    scrollbar-width: thin;\r\n    scrollbar-color: rgba(151, 151, 151, 0.4) rgba(220, 220, 220, 0.4);\r\n    overflow: auto;\r\n}\r\n\r\n\r\n.absol-bscroller::-webkit-scrollbar {\r\n    width: 6px;\r\n    height: 6px;\r\n}\r\n\r\n.absol-bscroller::-webkit-scrollbar-track {\r\n    background: rgba(220, 220, 220, 0.4);\r\n}\r\n\r\n.absol-bscroller::-webkit-scrollbar-thumb {\r\n    background: rgba(182, 182, 182, 0.4);\r\n}\r\n\r\n.absol-bscroller::-webkit-scrollbar-thumb:hover {\r\n    background: rgba(32, 32, 32, 0.4);\r\n}\r\n\r\n.absol-bscroller::-webkit-scrollbar-thumb:active {\r\n    background: rgba(13, 13, 13, 0.6);\r\n}\r\n\r\n.absol-bscroller.dark,\r\n.dark .absol-bscroller {\r\n    scrollbar-color: rgba(104, 104, 104, 0.4) rgba(35, 35, 35, 0.4);\r\n}\r\n\r\n\r\n.absol-bscroller.dark::-webkit-scrollbar-track,\r\n.dark .absol-bscroller::-webkit-scrollbar-track {\r\n    background: rgba(35, 35, 35, 0.4);\r\n}\r\n\r\n.absol-bscroller.dark::-webkit-scrollbar-thumb,\r\n.dark .absol-bscroller::-webkit-scrollbar-thumb {\r\n    background: rgba(73, 73, 73, 0.4);\r\n}\r\n\r\n.absol-bscroller.dark::-webkit-scrollbar-thumb:hover,\r\n.dark .absol-bscroller::-webkit-scrollbar-thumb:hover {\r\n    background: rgba(223, 223, 223, 0.4);\r\n}\r\n\r\n.absol-bscroller.dark::-webkit-scrollbar-thumb:active,\r\n.dark .absol-bscroller::-webkit-scrollbar-thumb:active {\r\n    background: rgba(242, 242, 242, 0.6);\r\n}\r\n\r\n/*******************************************/\r\n.as-bscroller {\r\n    scrollbar-width: thin;\r\n    scrollbar-color: rgba(151, 151, 151, 0.4) rgba(220, 220, 220, 0.4);\r\n}\r\n\r\n\r\n.as-bscroller::-webkit-scrollbar {\r\n    width: 6px;\r\n    height: 6px;\r\n}\r\n\r\n.as-bscroller::-webkit-scrollbar-track {\r\n    background: rgba(220, 220, 220, 0.4);\r\n}\r\n\r\n.as-bscroller::-webkit-scrollbar-thumb {\r\n    background: rgba(182, 182, 182, 0.4);\r\n}\r\n\r\n.as-bscroller::-webkit-scrollbar-thumb:hover {\r\n    background: rgba(32, 32, 32, 0.4);\r\n}\r\n\r\n.as-bscroller::-webkit-scrollbar-thumb:active {\r\n    background: rgba(13, 13, 13, 0.6);\r\n}\r\n\r\n.as-bscroller.dark,\r\n.dark .as-bscroller,\r\n.as-dark .as-bscroller,\r\n.as-dark.as-bscroller\r\n{\r\n    scrollbar-color: rgba(104, 104, 104, 0.4) rgba(150, 150, 150, 0.4);\r\n}\r\n\r\n\r\n.as-bscroller.dark::-webkit-scrollbar-track,\r\n.dark .as-bscroller::-webkit-scrollbar-track,\r\n.as-dark .as-bscroller::-webkit-scrollbar-track,\r\n.as-dark.as-bscroller::-webkit-scrollbar-track\r\n{\r\n    background: rgba(150, 150, 150, 0.4);\r\n}\r\n\r\n.as-bscroller.dark::-webkit-scrollbar-thumb,\r\n.dark .as-bscroller::-webkit-scrollbar-thumb,\r\n.as-dark .as-bscroller::-webkit-scrollbar-thumb,\r\n.as-dark.as-bscroller::-webkit-scrollbar-thumb\r\n{\r\n    background: rgba(104, 104, 104, 0.4);\r\n}\r\n\r\n.as-bscroller.dark::-webkit-scrollbar-thumb:hover,\r\n.dark .as-bscroller::-webkit-scrollbar-thumb:hover,\r\n.as-dark .as-bscroller::-webkit-scrollbar-thumb:hover,\r\n.as-dark.as-bscroller::-webkit-scrollbar-thumb:hover\r\n{\r\n    background: rgba(223, 223, 223, 0.4);\r\n}\r\n\r\n.as-bscroller.dark::-webkit-scrollbar-thumb:active,\r\n.dark .as-bscroller::-webkit-scrollbar-thumb:active,\r\n.as-dark .as-bscroller::-webkit-scrollbar-thumb:active,\r\n.as-dark.as-bscroller::-webkit-scrollbar-thumb:active\r\n{\r\n    background: rgba(242, 242, 242, 0.6);\r\n}", ""]);



/***/ }),

/***/ 1682:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-button-array {\r\n    font-size: 1rem;\r\n    border: 1px solid #006ce5;\r\n    display: inline-block;\r\n    border-radius: 0.2em;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-button-array-item {\r\n    text-align: center;\r\n    font-size: inherit;\r\n    height: 2em;\r\n    border: none;\r\n    box-sizing: border-box;\r\n    padding-left: 0.35714em;\r\n    padding-right: 0.35714em;\r\n    outline: none;\r\n    color: #006ce5;\r\n    background-color: white;\r\n    border-radius: 0;\r\n    transition: background-color 0.1s, color 0.1s;\r\n    margin: 0;\r\n}\r\n\r\n.as-button-array-item:not(:first-child) {\r\n    border-left: 1px solid #006ce5;\r\n    border-right: none;\r\n}\r\n\r\n\r\n.as-button-array-item.as-active {\r\n    color: white;\r\n    background-color: #006ce5;\r\n}", ""]);



/***/ }),

/***/ 71843:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-button-range-wrapper {\r\n    border-top: 1px solid rgb(209, 209, 213);\r\n    border-bottom: 1px solid rgb(209, 209, 213);\r\n}\r\n\r\n.as-button-range {\r\n    position: relative;\r\n    overflow-y: hidden;\r\n    height: var(--height);\r\n    box-sizing: border-box;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    --underline-left: 0;\r\n    --underline-width: 0;\r\n    --height: 2em;\r\n}\r\n\r\n.as-button-range-scroller {\r\n    font-size: inherit;\r\n    height: calc(var(--height) + 17px);\r\n    box-sizing: border-box;\r\n    overflow-x: scroll;\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0.5em;\r\n    right: 0.5em;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-button-range-scroller::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: var(--underline-left);\r\n    width: var(--underline-width);\r\n    height: 0.2em;\r\n    top: calc(var(--height) - 0.2em);\r\n    background-color: rgb(0, 106, 255);\r\n    transition: left 0.2s, width 0.2s;\r\n}\r\n\r\n.as-button-range-left-ctn,\r\n.as-button-range-right-ctn {\r\n    position: absolute;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.as-button-range-right-ctn::after,\r\n.as-button-range-left-ctn::before {\r\n    content: \"\";\r\n    height: 100%;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-button-range-left-ctn {\r\n    left: 0;\r\n}\r\n\r\n.as-button-range-right-ctn {\r\n    right: 0;\r\n}\r\n\r\n.as-button-range-right-btn,\r\n.as-button-range-left-btn {\r\n    font-size: inherit;\r\n    padding: 0;\r\n    margin: 0;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    border: none;\r\n    outline: none;\r\n    color: rgb(0, 106, 266);\r\n    background-color: rgba(255, 255, 255, 0.5);\r\n    border-radius: 0.5em;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-button-range-left-btn {\r\n    -webkit-box-shadow: 1em 2px 1.5em -1em rgba(255, 255, 255, 0.62);\r\n    -moz-box-shadow: 1em 2px 1.5em -1em rgba(255, 255, 255, 0.62);\r\n    box-shadow: 1em 2px 1.5em -1em rgba(255, 255, 255, 0.62);\r\n}\r\n\r\n.as-button-range-right-btn {\r\n    -webkit-box-shadow: -1em 2px 1.5em -1em rgba(255, 255, 255, 0.62);\r\n    -moz-box-shadow: -1em 2px 1.5em -1em rgba(255, 255, 255, 0.62);\r\n    box-shadow: -1em 2px 1.5em -1em rgba(255, 255, 255, 0.62);\r\n}\r\n\r\n.as-button-range-right-btn polygon,\r\n.as-button-range-left-btn polygon {\r\n    fill: #2488FF;\r\n}\r\n\r\n.as-button-range-right-btn:disabled,\r\n.as-button-range-left-btn:disabled {\r\n    display: none;\r\n}\r\n\r\n.as-button-range-left-btn > svg,\r\n.as-button-range-right-btn > svg {\r\n    width: 1.25em;\r\n    height: 1.25em;\r\n    margin-left: -0.25em;\r\n    margin-right: -0.25em;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-button-range-item {\r\n    outline: none;\r\n    font-size: inherit;\r\n    padding: 0 0.5em;\r\n    margin: 0;\r\n    height: var(--height);\r\n    border: none;\r\n    background-color: transparent;\r\n    color: black;\r\n}\r\n\r\n.as-button-range-item.as-active {\r\n    color: rgb(87, 157, 255);\r\n}", ""]);



/***/ }),

/***/ 26106:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-calendar-input {\r\n    font-size: 1rem;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    width: 7em;\r\n    height: 2em;\r\n    box-sizing: content-box;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    border: solid 1px #d6d6d6;\r\n    border-radius: 0.2em;\r\n}\r\n\r\n.absol-calendar-input.as-border-none {\r\n    border: none;\r\n}\r\n\r\n.absol-calendar-input.as-border-none > input {\r\n    text-align: left;\r\n    padding-left: 0;\r\n}\r\n\r\n.absol-calendar-input > input {\r\n    text-align: center;\r\n    width: 100%;\r\n    height: 100%;\r\n    outline: none;\r\n    border: none;\r\n    background: transparent;\r\n    padding: 0;\r\n    font: inherit;\r\n}\r\n\r\n.absol-calendar-input:not(.as-read-only) input {\r\n    cursor: pointer;\r\n}\r\n\r\n.absol-calendar-input:not(.as-read-only) > input:hover,\r\n.absol-calendar-input:not(.as-read-only) > input:focus {\r\n    color: red;\r\n}\r\n\r\n.absol-calendar-input.absol-disabled {\r\n    pointer-events: none;\r\n    background-color: var(--as-disabled-background-color);\r\n}\r\n\r\n.absol-calendar-input.absol-disabled input {\r\n    color: var(--as-disabled-text-color);\r\n}\r\n", ""]);



/***/ }),

/***/ 23368:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "/** align middle in table cell **/\r\n.KPIsimpletableclass td > .absol-checkbox:first-child:last-child,\r\n.KPIsimpletableclass td > .absol-checkbox.as-no-label:first-child:last-child .as-checkbox-input {\r\n    display: block;\r\n    margin: auto;\r\n}\r\n\r\n.cardsimpletableclass > table > tbody > tr > td > .absol-checkbox:first-child:last-child {\r\n    display: block;\r\n}\r\n\r\n.absol-checkbox {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    line-height: 16px;\r\n}\r\n\r\n.absol-checkbox:not(.as-read-only):not(.as-disabled) {\r\n    cursor: pointer;\r\n    user-select: none;\r\n}\r\n\r\n.absol-checkbox.right > .absol-checkbox-label.as-right {\r\n    display: none;\r\n}\r\n\r\n\r\n.absol-checkbox:not(.right) > .absol-checkbox-label.as-left {\r\n    display: none;\r\n}\r\n\r\n.absol-checkbox-label {\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.absol-checkbox-label.as-left {\r\n    padding-right: 0.3em;\r\n}\r\n\r\n\r\n.absol-checkbox-label.as-right {\r\n    padding-left: 0.3em;\r\n}\r\n\r\n.absol-checkbox.as-no-label {\r\n    width: calc(1em + 2px);\r\n    height: calc(1em + 2px);\r\n}\r\n\r\n\r\n.absol-checkbox.as-no-label .absol-checkbox-label {\r\n    display: none;\r\n}\r\n\r\n.absol-checkbox.as-no-label .as-checkbox-input {\r\n    display: block;\r\n}\r\n\r\n.absol-checkbox.as-disabled .absol-checkbox-label {\r\n    color: var(--as-disabled-text-color);\r\n}\r\n\r\n\r\n.absol-checkbox.as-wrap-text {\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-checkbox.as-wrap-text .absol-checkbox-label {\r\n    white-space: normal;\r\n}\r\n\r\n.absol-checkbox.as-wrap-text > * {\r\n    vertical-align: top;\r\n}\r\n\r\n.absol-checkbox.as-wrap-text .absol-checkbox-label {\r\n    max-width: calc(100% - 24px);\r\n}\r\n\r\n.absol-checkbox.as-read-only .as-checkbox-input {\r\n    pointer-events: none;\r\n}\r\n\r\n.absol-checkbox.as-read-only.as-border-none .bound {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 2943:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-checkbox-button{\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-checkbox-button .absol-checkbox-icon{\r\n    display: block;\r\n}", ""]);



/***/ }),

/***/ 76241:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --candy-border-color: #929292;\r\n    --candy-hover-background-color: #eeeee9;\r\n    --candy-disabled-background-color: #ebebe4;\r\n}\r\n\r\nlabel.as-checkbox-input {\r\n    display: inline-block;\r\n    position: relative;\r\n    width: calc(1em + 2px);\r\n    height: calc(1em + 2px);\r\n    font-size: inherit;\r\n    box-sizing: border-box;\r\n    vertical-align: middle;\r\n    border-radius: 0.25em;\r\n    padding: 0;\r\n    margin: 0; /*fix boostrap override*/\r\n    overflow: hidden;\r\n}\r\n\r\n.as-checkbox-input:not(.as-read-only):not(.as-disabled){\r\n    cursor: pointer;\r\n}\r\n\r\n\r\nlabel.as-checkbox-input:hover:not(.as-read-only) .bound,\r\n.absol-checkbox:hover:not(.as-read-only) .bound {\r\n    fill: var(--candy-hover-background-color);\r\n}\r\n\r\n.as-checkbox-input .tick,\r\n.as-checkbox-input .minus {\r\n    fill: #606060;\r\n}\r\n\r\n\r\n.as-checkbox-input input.as-checkbox-input-value {\r\n    font-size: inherit;\r\n    position: absolute;\r\n    right: 100%;\r\n    top: 0;\r\n    opacity: 0.0;\r\n    z-index: -100000000000;\r\n}\r\n\r\ninput.as-checkbox-input-value:not(:checked) ~ svg .tick {\r\n    opacity: 0;\r\n}\r\n\r\n.as-checkbox-input.as-has-minus .minus {\r\n    opacity: 1;\r\n}\r\n\r\n.as-checkbox-input .minus,\r\ninput.as-checkbox-input-value:checked ~ svg .minus {\r\n    opacity: 0;\r\n}\r\n\r\n\r\nlabel.as-checkbox-input .bound {\r\n    stroke: var(--candy-border-color);\r\n    fill: white;\r\n}\r\n\r\nlabel.as-checkbox-input .tick {\r\n    opacity: 1;\r\n    transition: opacity 0.1s;\r\n}\r\n\r\nlabel.as-checkbox-input .minus {\r\n    transition: opacity 0.1s;\r\n}\r\n\r\nlabel.as-checkbox-input.as-disabled > svg .bound,\r\nlabel.as-checkbox-input.as-disabled:hover > svg .bound {\r\n    stroke: #929292;\r\n    fill: #ebebe4;\r\n}\r\n\r\n\r\n.as-checkbox-input > svg {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-checkbox-input.as-read-only.as-border-none .bound{\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 16172:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-check-list-box.as-select-list-box {\r\n    width: calc(var(--select-list-estimate-width) + 2px + 5px + 23px + 7px);\r\n    --as-width-limit: calc(100vw - 20px);\r\n}\r\n\r\n.as-check-list-box.as-select-list-box.as-enable-search .as-select-list-box-scroller {\r\n    max-height: calc(var(--max-height) - 2em - 10px - 2em - 1px);\r\n}\r\n\r\n.as-check-list-box.as-select-list-box .as-select-list-box-scroller {\r\n    max-height: calc(var(--max-height) - 2em - 1px);\r\n}\r\n\r\n\r\n.as-check-list-box.as-select-list-box .absol-selectlist-item-text {\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n    max-width: calc(var(--as-width-limit) - 0.7em - 2.5em);\r\n}\r\n", ""]);



/***/ }),

/***/ 72254:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-check-list-item {\r\n    padding-left: 0.35em;\r\n    height: calc(30rem / 14);\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n}\r\n\r\n.as-check-list-item-checkbox {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-check-list-item-checkbox .as-checkbox-input-check-icon{\r\n    display: block;\r\n\r\n}\r\n\r\n.absol-selectlist-item.as-check-list-item > span {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    line-height: calc(30rem / 14);\r\n}\r\n\r\n.absol-selectlist-item.as-check-list-item .absol-selectlist-item-desc {\r\n    line-height: calc(25rem / 14);\r\n}\r\n\r\n.as-check-list-item.as-no-select .as-check-list-item-checkbox {\r\n    visibility: hidden;\r\n}\r\n\r\n.as-check-list-item.as-no-select {\r\n    pointer-events: none;\r\n}", ""]);



/***/ }),

/***/ 75021:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-select-list-box-page > .as-check-tree-item {\r\n    width: 100%;\r\n}\r\n\r\n.as-check-tree-box {\r\n    min-width: 18em;\r\n}\r\n\r\n.as-check-tree-box.as-no-transition label.as-checkbox-input .minus,\r\n.as-check-tree-box.as-no-transition label.as-checkbox-input .tick {\r\n    transition: none;\r\n}\r\n\r\n\r\n.as-check-tree-box.as-select-list-box.as-enable-search .as-select-list-box-scroller {\r\n    max-height: calc(var(--max-height) - 2em - 10px - 2em - 1px);\r\n}\r\n\r\n.as-check-tree-box.as-select-list-box .as-select-list-box-scroller {\r\n    max-height: calc(var(--max-height) - 2em - 1px);\r\n}\r\n\r\n/***********************************************************************************************************************/\r\n\r\n.am-check-tree-box .as-dropdown-box-footer,\r\n.am-check-tree-box\r\n{\r\n    min-width: 18em;\r\n}\r\n\r\n.am-check-tree-box-list {\r\n    --text-width: 100%;\r\n    --desc-width: 0;\r\n}\r\n\r\n.am-check-tree-box-modal:not(.as-enable-search) .absol-search-text-input {\r\n    visibility: hidden;\r\n    opacity: 0;\r\n    pointer-events: none;\r\n}\r\n\r\n.am-check-tree-box .as-check-tree-box-scroller {\r\n    max-height: calc(100vh - var(--modal-margin-top) - 100px);\r\n}\r\n\r\n.am-check-tree-box {\r\n    width: var(--select-list-estimate-width);\r\n    /*max-width: calc(100vw - 20px);*/\r\n}\r\n\r\n.am-check-tree-box .as-check-tree-box-content {\r\n    /*max-width: calc(100vw - 20px);*/\r\n}\r\n\r\n.am-check-tree-box.as-has-desc {\r\n    --text-width: 50%;\r\n    --desc-width: 50%;\r\n}\r\n\r\n\r\n.am-check-tree-box-body {\r\n    overflow-y: auto;\r\n    max-height: calc(80vh - 2em);\r\n}\r\n\r\n.am-check-tree-box.as-enable-search .am-check-tree-box-body {\r\n    max-height: calc(80vh - 4em - 10px);\r\n}\r\n\r\n.am-check-tree-item {\r\n    display: block;\r\n    white-space: nowrap;\r\n    position: relative;\r\n    width: 100%;\r\n    overflow: hidden;\r\n    --level: 0;\r\n    --icon-width: 0px;\r\n}\r\n\r\n\r\n.am-check-tree-item.as-has-icon {\r\n    --icon-width: 2.7em;\r\n}\r\n\r\n\r\n.am-check-tree-item-toggle-ctn,\r\n.am-check-tree-item-icon-ctn,\r\n.am-check-tree-item-checkbox-ctn {\r\n    position: absolute;\r\n    white-space: nowrap;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.am-check-tree-item-toggle-ctn {\r\n    left: calc(2em * var(--level) + 0.2em);\r\n    width: 1.5em;\r\n    text-align: center;\r\n}\r\n\r\n.am-check-tree-item-toggle-ctn > svg {\r\n    width: 0.7em;\r\n    height: 0.7em;\r\n}\r\n\r\n\r\n.am-check-tree-item-icon-ctn {\r\n    left: calc(2em * var(--level) + 3.2em);\r\n}\r\n\r\n.am-check-tree-item-checkbox-ctn {\r\n    left: calc(2em * var(--level) + 1.7em)\r\n}\r\n\r\n.am-check-tree-item-icon-ctn > svg {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n\r\n}\r\n\r\n\r\n.am-check-tree-item.as-status-open svg .toggle-close,\r\n.am-check-tree-item.as-status-close svg .toggle-open,\r\n.am-check-tree-item:not(.as-status-close):not(.as-status-open) .am-check-tree-item-toggle-ctn {\r\n    display: none;\r\n}\r\n\r\n.am-check-tree-item-icon-ctn::before,\r\n.am-check-tree-item-toggle-ctn::before,\r\n.am-check-tree-item-checkbox-ctn::before {\r\n    content: \"\";\r\n    height: 100%;\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n}\r\n\r\n.am-check-tree-item-icon-ctn:empty {\r\n    display: none;\r\n}\r\n\r\n.am-check-tree-item-icon-ctn > span {\r\n    font-size: 1.8em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.am-check-tree-item-icon-ctn img,\r\n.am-check-tree-item-icon-ctn svg {\r\n    width: 1.8em;\r\n    height: 1.8em;\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.am-check-tree-item-text {\r\n    width: var(--text-width);\r\n    box-sizing: border-box;\r\n    padding: 0.3em 0.5em 0.3em calc(3em + 2em * var(--level) + var(--icon-width));\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    line-height: 1.5;\r\n    white-space: normal;\r\n}\r\n\r\n\r\n.am-check-tree-item-desc {\r\n    display: none;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.am-check-tree-leaf-item:not(.as-is-leaf) .am-check-tree-item-checkbox-ctn {\r\n    display: none;\r\n}\r\n\r\n.am-check-tree-leaf-item:not(.as-is-leaf) .am-check-tree-item-text {\r\n    padding: 0.3em 0.5em 0.3em calc(2em * var(--level) + var(--icon-width) + 1em);\r\n}\r\n\r\n.am-check-tree-leaf-item:not(.as-is-leaf) .am-check-tree-item-icon-ctn {\r\n    left: calc(2em * var(--level) + 1.5em);\r\n}\r\n\r\n.am-check-tree-box-list.as-has-desc .am-check-tree-item-desc {\r\n    display: inline-block;\r\n}\r\n\r\n.am-check-tree-box.as-leaf-only .am-check-tree-item:not(.as-has-leaf) .as-checkbox-input {\r\n    pointer-events: none;\r\n    opacity: 0.2;\r\n}\r\n\r\n\r\n.am-check-tree-box.as-leaf-only:not(.as-has-leaf) .as-select-list-box-check-all {\r\n    pointer-events: none;\r\n    color: var(--as-disabled-text-color);\r\n}\r\n\r\n.am-check-tree-box.as-leaf-only:not(.as-has-leaf) .as-select-list-box-check-all label.as-checkbox-input .bound {\r\n    stroke: #929292;\r\n    fill: #ebebe4;\r\n}\r\n\r\n.as-multi-select-menu-item-ctn:empty::before {\r\n    position: absolute;\r\n    left: 0;\r\n    top: calc(50% - 1em);\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    padding: 0 5px;\r\n    line-height: 2;\r\n}\r\n\r\n.as-multi-select-menu-item-ctn:not(:empty):before,\r\n.as-multi-select-menu.as-read-only .as-multi-select-menu-item-ctn::before,\r\n.as-multi-select-menu.as-disabled .as-multi-select-menu-item-ctn::before {\r\n    display: none;\r\n}\r\n\r\n.as-multi-select-menu-item-ctn[data-placeholder]:empty::before {\r\n    content: attr(data-placeholder);\r\n}\r\n", ""]);



/***/ }),

/***/ 4334:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-check-tree-item {\r\n    font-size: inherit;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    height: 2em;\r\n}\r\n\r\n.as-check-tree-item:focus {\r\n    background-color: unset;\r\n}\r\n\r\n.as-check-tree-item:hover:focus {\r\n    background-color: rgba(169, 169, 172, 0.1);\r\n}\r\n\r\n.as-check-tree-item .as-checkbox-input {\r\n    margin-right: 0.35em;\r\n}\r\n\r\n.as-check-tree-item.as-no-select .as-checkbox-input,\r\n.absol-checkbox.as-no-select {\r\n    pointer-events: none;\r\n    opacity: 0.3;\r\n}\r\n\r\n.as-check-tree-item.as-no-select .as-checkbox-input .bound,\r\n.absol-checkbox.as-no-select .bound {\r\n    stroke: #929292;\r\n    fill: #ebebe4;\r\n}\r\n\r\n.as-check-tree-item.as-no-select .as-checkbox-input .tick,\r\n.as-check-tree-item.as-no-select .as-checkbox-input .minus,\r\n.absol-checkbox.as-no-select .tick,\r\n.absol-checkbox.as-no-select .minus {\r\n    display: none;\r\n    opacity: 0;\r\n    visibility: hidden;\r\n}\r\n\r\n.as-check-tree-item.as-check-unsafe-tree-item {\r\n    padding-right: 45px;\r\n}\r\n\r\n.as-check-unsafe-tree-item .as-check-unsafe-tree-item-action-ctn {\r\n    display: none;\r\n    position: absolute;\r\n    height: 20px;\r\n    right: 5px;\r\n    top: calc(50% - 10px);\r\n    --as-transparent-button-text-color: rgba(107, 107, 108, 0.3);\r\n}\r\n\r\n/*.as-check-unsafe-tree-item.status-close .as-check-unsafe-tree-item-action-ctn,*/\r\n/*.as-check-unsafe-tree-item.status-open .as-check-unsafe-tree-item-action-ctn*/\r\n/*{*/\r\n/*    display: block;*/\r\n/*}*/\r\n\r\n\r\n.as-check-unsafe-tree-item-action-ctn >button{\r\n    width: 25px;\r\n    height: 20px;\r\n}\r\n\r\n/*.as-check-unsafe-tree-item-action-ctn >button:not(:first-child) {*/\r\n/*    margin-left: 5px;*/\r\n/*}*/\r\n\r\n.absol-checkbox.as-no-select {\r\n    visibility: hidden;\r\n}", ""]);



/***/ }),

/***/ 63909:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-chrome-calendar {\r\n    display: inline-block;\r\n    font-family: Helvetica, Arial, sans-serif;\r\n    font-size: 1rem;\r\n    padding: 0.6em;\r\n    border: solid 1px rgb(191, 191, 191);\r\n    box-shadow: 1px 1px 2px rgb(240, 240, 240);\r\n    z-index: 100;\r\n    touch-action: manipulation;\r\n    user-select: none;\r\n    background-color: rgb(255, 255, 255);\r\n    white-space: initial;\r\n    outline: none;\r\n}\r\n\r\n.absol-chrome-calendar * {\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.absol-chrome-calendar-header {\r\n    white-space: nowrap;\r\n    position: relative;\r\n}\r\n\r\n\r\n.absol-chrome-calendar-title {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.absol-chrome-calendar-header-buttons {\r\n    position: absolute;\r\n    top: 0;\r\n    bottom: 0;\r\n    right: 0;\r\n}\r\n\r\n.absol-chrome-calendar-header-buttons > button {\r\n    font-size: 1em;\r\n    width: 1.5em;\r\n    height: 1.5em;\r\n    padding: 0;\r\n    border-radius: 0.2em;\r\n    border: solid 1px rgb(167, 167, 167);\r\n    background: linear-gradient(rgb(240, 240, 240), rgb(233, 233, 233), rgb(223, 223, 223));\r\n    cursor: pointer;\r\n    outline: none;\r\n    box-shadow: 1px 1px 2px #aaa;\r\n    color: rgb(110, 110, 110);\r\n}\r\n\r\n.absol-chrome-calendar-header-buttons > button:nth-child(2) {\r\n    margin-left: 0.2em;\r\n    margin-right: 0.2em;\r\n}\r\n\r\n\r\n.absol-chrome-calendar-header-buttons > button:active {\r\n    box-shadow: 0px 0px 2px #aaa;\r\n\r\n}\r\n\r\n.absol-chrome-calendar:not(.view-era) .absol-chrome-calendar-title {\r\n    cursor: pointer;\r\n}\r\n\r\n.absol-chrome-calendar-title::after {\r\n    content: \"\\25BC\";\r\n}\r\n\r\n.absol-chrome-calendar[data-view=\"era\"] .absol-chrome-calendar-title::after {\r\n    content: \"\";\r\n}\r\n\r\n.absol-chrome-calendar-title > span {\r\n    line-height: 1.5em;\r\n    min-width: 5em;\r\n    display: inline-block;\r\n}\r\n\r\n.absol-chrome-calendar-instance {\r\n    margin-top: 1em;\r\n    border: solid 1px rgb(140, 140, 140);\r\n    width: calc(14em + 2px);\r\n    position: relative;\r\n    height: calc(8.4em + 3px);\r\n    overflow: hidden;\r\n    box-sizing: border-box;\r\n    /*border*/\r\n}\r\n\r\n.absol-chrome-calendar-dayofweek {\r\n    background-color: rgb(241, 241, 241);\r\n    height: 1.2em;\r\n    white-space: nowrap;\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    z-index: 10;\r\n}\r\n\r\n.absol-chrome-calendar[data-level=\"week\"] .absol-chrome-calendar-dayofweek::before {\r\n    content: \"wk\";\r\n    text-align: center;\r\n    line-height: 1.2;\r\n    display: inline-block;\r\n    color: rgb(130, 130, 255);\r\n    border-bottom: solid 1px rgb(191, 191, 191);\r\n    border-right: solid 1px rgb(191, 191, 191);\r\n    box-sizing: border-box;\r\n    width: 12.5%;\r\n}\r\n\r\n.absol-chrome-calendar-dayofweek > div {\r\n    text-align: center;\r\n    line-height: 1.2;\r\n    display: inline-block;\r\n    width: calc(100% / 7);\r\n    border-bottom: solid 1px rgb(191, 191, 191);\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-chrome-calendar[data-level=\"week\"] .absol-chrome-calendar-dayofweek > div {\r\n    width: 12.5%;\r\n}\r\n\r\n.absol-chrome-calendar-month-animation-container {\r\n    position: absolute;\r\n    transition: top 0.2s;\r\n}\r\n\r\n.absol-chrome-calendar-month-animation-container.old {\r\n    z-index: 7;\r\n    /* background: red; */\r\n}\r\n\r\n.absol-chrome-calendar-month-animation-container.new {\r\n    z-index: 8;\r\n    /* background: blue; */\r\n}\r\n\r\n.absol-chrome-calendar-month-animation-container > .absol-chrome-calendar-month {\r\n    width: 100%;\r\n    height: 100%;\r\n    margin-top: -1px;\r\n}\r\n\r\n\r\n.absol-chrome-calendar-month {\r\n    width: 100%;\r\n    margin-top: 1.2em;\r\n    background-color: white;\r\n    /*for header*/\r\n}\r\n\r\n.absol-chrome-calendar-month.as-animation {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    margin: 0;\r\n    z-index: 8;\r\n    transition: top 0.2s;\r\n    /*opacity: 0.5;*/\r\n}\r\n\r\n.absol-chrome-calendar-month.as-animation div {\r\n    pointer-events: none;\r\n    transition: color 0.2s;\r\n}\r\n\r\n.absol-chrome-calendar[data-view=\"month\"] .absol-chrome-calendar-month {\r\n    display: table;\r\n}\r\n\r\n.absol-chrome-calendar[data-view=\"month\"] .absol-chrome-calendar-dayofweek {\r\n    display: block;\r\n}\r\n\r\n\r\n.absol-chrome-calendar-week-in-month {\r\n    display: table-row;\r\n    height: 1.2em;\r\n}\r\n\r\n.absol-chrome-calendar-week-in-month > div::before {\r\n    content: attr(data-date);\r\n}\r\n\r\n\r\n.absol-chrome-calendar[data-level=\"week\"] .absol-chrome-calendar-week-in-month::before {\r\n    content: attr(data-week-idx-text);\r\n    display: table-cell;\r\n    text-align: right;\r\n    padding-right: 0.4em;\r\n    color: rgb(130, 130, 255);\r\n    text-shadow: 1px 0 0 currentColor;\r\n    border-right: solid 1px rgb(191, 191, 191);\r\n    width: 12.5%;\r\n}\r\n\r\n\r\n.absol-chrome-calendar-week-in-month > div {\r\n    display: table-cell;\r\n    text-align: right;\r\n    padding-right: 0.4em;\r\n    cursor: pointer;\r\n    box-sizing: border-box;\r\n    width: calc(100% / 7);\r\n}\r\n\r\n.absol-chrome-calendar[data-level=\"week\"] .absol-chrome-calendar-week-in-month > div {\r\n    width: calc(100% / 8);\r\n}\r\n\r\n\r\n.absol-chrome-calendar[data-level=\"day\"] .absol-chrome-calendar-week-in-month > div:hover,\r\n.absol-chrome-calendar[data-level=\"week\"] .absol-chrome-calendar-week-in-month.as-hover-in-year > div:not(.as-not-in-year),\r\n.absol-chrome-calendar[data-level=\"week\"] .absol-chrome-calendar-week-in-month.as-hover-in-year::before,\r\n.absol-chrome-calendar[data-level=\"week\"] .absol-chrome-calendar-week-in-month.as-hover-not-in-year > .as-not-in-year\r\n{\r\n    background-color: rgb(224, 245, 256);\r\n}\r\n\r\n.absol-chrome-calendar[data-level=\"day\"] .absol-chrome-calendar-not-in-month:not(.as-disabled),\r\n.absol-chrome-calendar[data-level=\"week\"] .absol-chrome-calendar-not-in-month:not(.as-disabled) {\r\n    color: rgb(140, 140, 140);\r\n}\r\n\r\n.absol-chrome-calendar-today {\r\n    border: inset 1px rgb(191, 191, 191);\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-chrome-calendar-selected,\r\n.absol-chrome-calendar[data-level=\"week\"] .as-week-selected,\r\n.absol-chrome-calendar[data-level=\"quarter\"] .as-quarter-selected,\r\n.absol-chrome-calendar[data-level=\"week\"] .absol-chrome-calendar-week-in-month.as-selected::before\r\n{\r\n    background-color: rgb(188, 205, 236) !important;\r\n}\r\n\r\n.absol-chrome-calendar[data-level=\"week\"] .as-week-selected .absol-chrome-calendar-selected {\r\n    background-color: transparent;\r\n}\r\n\r\n\r\n.absol-chrome-calendar-years {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    z-index: 1;\r\n}\r\n\r\n.absol-chrome-calendar:not([data-view=\"year\"]) .absol-chrome-calendar-years {\r\n    z-index: -10000;\r\n    opacity: 0;\r\n    visibility: hidden;\r\n}\r\n\r\n.absol-chrome-calendar.view-year .absol-chrome-calendar-instance {\r\n    border-color: rgb(77, 114, 254)\r\n}\r\n\r\n.absol-chrome-calendar-month,\r\n.absol-chrome-calendar-dayofweek,\r\n.absol-chrome-calendar-era {\r\n    display: none;\r\n}\r\n\r\n\r\n.absol-chrome-calendar:not(.view-month) .absol-chrome-calendar-title {\r\n    color: rgb(191, 191, 191);\r\n}\r\n\r\n\r\n.absol-chrome-calendar-year {\r\n    overflow: hidden;\r\n}\r\n\r\n\r\n.absol-chrome-calendar-year-head {\r\n    background-color: rgb(241, 241, 241);\r\n    border-bottom: solid 1px rgb(191, 191, 191);\r\n    height: 1.5em;\r\n    text-align: center;\r\n    line-height: 1.5em;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.absol-chrome-calendar-year:last-child .absol-chrome-calendar-year-head {\r\n    border-bottom: solid 1px rgb(191, 191, 191);\r\n}\r\n\r\n.absol-chrome-calendar-year.start-opening .absol-chrome-calendar-year-months,\r\n.absol-chrome-calendar-year.closing .absol-chrome-calendar-year-months {\r\n    margin-bottom: -6em;\r\n    transition: margin-bottom linear 0.1s;\r\n}\r\n\r\n.absol-chrome-calendar-year.opening .absol-chrome-calendar-year-months,\r\n.absol-chrome-calendar-year.start-closing .absol-chrome-calendar-year-months {\r\n    margin-bottom: 0;\r\n    transition: margin-bottom linear 0.1s;\r\n\r\n}\r\n\r\n.absol-chrome-calendar-year-months {\r\n    width: 100%;\r\n    display: table;\r\n    height: calc(6em + 1px);\r\n    border-bottom: solid 1px rgb(191, 191, 191);\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-chrome-calendar-year-row-months {\r\n    display: table-row;\r\n    line-height: 1.5;\r\n    height: 2em;\r\n}\r\n\r\n.absol-chrome-calendar-year-month {\r\n    text-align: center;\r\n    display: table-cell;\r\n    vertical-align: middle;\r\n}\r\n\r\n.absol-chrome-calendar-year-month:hover,\r\n.absol-chrome-calendar-era-year:hover,\r\n.absol-chrome-calendar[data-level=\"quarter\"] .absol-chrome-calendar-years-content[data-hover-quarter=\"0\"] .absol-chrome-calendar-year-month[data-quarter=\"0\"],\r\n.absol-chrome-calendar[data-level=\"quarter\"] .absol-chrome-calendar-years-content[data-hover-quarter=\"1\"] .absol-chrome-calendar-year-month[data-quarter=\"1\"],\r\n.absol-chrome-calendar[data-level=\"quarter\"] .absol-chrome-calendar-years-content[data-hover-quarter=\"2\"] .absol-chrome-calendar-year-month[data-quarter=\"2\"],\r\n.absol-chrome-calendar[data-level=\"quarter\"] .absol-chrome-calendar-years-content[data-hover-quarter=\"3\"] .absol-chrome-calendar-year-month[data-quarter=\"3\"] {\r\n    background-color: rgb(224, 245, 256);\r\n}\r\n\r\n\r\n.absol-chrome-calendar-years:hover .absol-scrollbar {\r\n    opacity: 1;\r\n\r\n}\r\n\r\n.absol-chrome-calendar-years .absol-scrollbar {\r\n    background-color: rgba(169, 169, 172, 0.2);\r\n    opacity: 0;\r\n    transition: opacity 0.2s;\r\n}\r\n\r\n.absol-chrome-calendar-week-in-month > div.as-disabled,\r\n.absol-chrome-calendar-date-disabled,\r\n.absol-chrome-calendar-era-year.absol-chrome-calendar-date-disabled {\r\n    color: rgb(240, 230, 230);\r\n    pointer-events: none;\r\n    cursor: not-allowed;\r\n}\r\n\r\nbutton.absol-chrome-calendar-button-disabled,\r\n.absol-chrome-calendar button:disabled {\r\n    color: rgb(220, 210, 210);\r\n    pointer-events: none;\r\n    box-shadow: none;\r\n    cursor: not-allowed;\r\n}\r\n\r\n.absol-chrome-calendar-era {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    z-index: 1000000;\r\n    /*width: 100%;*/\r\n    /*height: 100%; */\r\n    width: calc(14em + 17px);\r\n    box-sizing: border-box;\r\n    height: 100%;\r\n    background-color: white;\r\n    box-shadow: 0px 0px 1px 0 black;\r\n    overflow-y: scroll;\r\n    overflow-x: hidden;\r\n    font-size: inherit;\r\n}\r\n\r\n.absol-chrome-calendar[data-view=\"era\"] .absol-chrome-calendar-era {\r\n    display: block;\r\n}\r\n\r\n.absol-chrome-calendar[data-level=\"year\"] .absol-chrome-calendar-era {\r\n    display: block;\r\n}\r\n\r\n.absol-chrome-calendar-era-row {\r\n    width: 14em;\r\n    height: 25%;\r\n    white-space: nowrap;\r\n    font-size: inherit;\r\n}\r\n\r\n.absol-chrome-calendar-era-year {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    height: 100%;\r\n    width: 25%;\r\n    text-align: center;\r\n    line-height: 2.1em;\r\n    font-size: inherit;\r\n    color: rgb(140, 140, 140);\r\n}\r\n\r\n\r\n.absol-chrome-calendar-in-decade:not(.absol-chrome-calendar-date-disabled) {\r\n    color: black;\r\n}\r\n\r\n/*.absol-chrome-calendar-era*/", ""]);



/***/ }),

/***/ 94142:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".ac-time-input.as-time-24-input {\r\n    width: 13em;\r\n}\r\n\r\n.as-chrome-time-24-picker {\r\n    --next-day-h24-width : 120px;\r\n    --minute-width: 60px;\r\n    font-size: 14px;\r\n\r\n}\r\n\r\n.as-chrome-time-24-picker .as-chrome-time-picker-h24 {\r\n    width: var(--next-day-h24-width);\r\n}\r\n\r\n.as-chrome-time-24-picker .as-chrome-time-picker-list.as-chrome-time-picker-m60 {\r\n    width: var(--minute-width);\r\n}\r\n\r\n.as-chrome-time-24-picker-tomorrow-text {\r\n    display: none;\r\n}\r\n\r\n.as-in-tomorrow.as-chrome-time-picker-btn .as-chrome-time-24-picker-tomorrow-text {\r\n    display: initial;\r\n}\r\n\r\n.as-chrome-time-24-picker .as-chrome-time-picker-btn:disabled {\r\n    pointer-events: none;\r\n}", ""]);



/***/ }),

/***/ 85009:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-chrome-time-picker {\r\n    box-sizing: border-box;\r\n    vertical-align: top;\r\n    display: inline-block;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    font-size: 1rem;\r\n    padding: 0.6em;\r\n    border: solid 1px rgb(191, 191, 191);\r\n    box-shadow: 1px 1px 2px rgb(240, 240, 240);\r\n    z-index: 100;\r\n    touch-action: manipulation;\r\n    user-select: none;\r\n    -webkit-user-select: none; /* Safari */\r\n    -moz-user-select: none; /* Firefox */\r\n    -ms-user-select: none;\r\n    background-color: rgb(255, 255, 255);\r\n    /*width: calc(160px + 1.2em);*/\r\n    height: 12.38em;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-chrome-time-picker.as-24h-clock .as-chrome-time-picker-scroller-h12,\r\n.as-chrome-time-picker:not(.as-24h-clock) .as-chrome-time-picker-scroller-h24,\r\n.as-chrome-time-picker.as-24h-clock .as-chrome-time-picker-period {\r\n    display: none;\r\n}\r\n\r\n.as-chrome-time-picker-period {\r\n    padding-top: 1.43em;\r\n    padding-bottom: 1.43em;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.as-chrome-time-picker > div:not(:first-child) {\r\n    margin-left: 5px;\r\n}\r\n\r\n\r\n.as-chrome-time-picker-scroller {\r\n    position: relative;\r\n    padding-top: 1.43em;\r\n    padding-bottom: 1.43em;\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    height: 100%;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-chrome-time-picker-scroller-up,\r\n.as-chrome-time-picker-scroller-down {\r\n    position: absolute;\r\n    left: 0;\r\n    width: 100%;\r\n    height: 1.43em;\r\n    padding: 0;\r\n    box-sizing: border-box;\r\n    background-color: transparent;\r\n    border-radius: 3px;\r\n    border: none;\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.as-chrome-time-picker-scroller-up > span,\r\n.as-chrome-time-picker-scroller-down > span {\r\n    font-size: 1.5em;\r\n}\r\n\r\n.as-chrome-time-picker-scroller-up:hover,\r\n.as-chrome-time-picker-scroller-down:hover {\r\n    background-color: rgba(169, 169, 169, 0.2);\r\n}\r\n\r\n.as-chrome-time-picker-scroller-up {\r\n    top: -5px;\r\n}\r\n\r\n.as-chrome-time-picker-scroller-down {\r\n    bottom: -5px;\r\n}\r\n\r\n\r\n.as-chrome-time-picker-viewport {\r\n    width: 3.6em;\r\n    height: 100%;\r\n    overflow: hidden;\r\n    white-space: normal;\r\n    display: inline-block;\r\n    vertical-align: top;\r\n}\r\n\r\n\r\n.as-chrome-time-picker-list.as-chrome-time-picker-m60,\r\n.as-chrome-time-picker-list.as-chrome-time-picker-h24 {\r\n    width: 120px;\r\n    overflow: hidden;\r\n    position: relative;\r\n}\r\n\r\n.as-chrome-time-picker-list.as-chrome-time-picker-m60>button,\r\n.as-chrome-time-picker-list.as-chrome-time-picker-h24>button{\r\n    display: block;\r\n    position: absolute;\r\n    left: 0;\r\n    width: 100%;\r\n    font-size: inherit;\r\n}\r\n\r\n.as-chrome-time-picker-list {\r\n    height: 100%;\r\n    overflow-y: scroll;\r\n    width: calc(100% + 18px);\r\n}\r\n\r\n.as-chrome-time-picker-btn {\r\n    font-size: inherit;\r\n    height: 2em;\r\n    width: 100%;\r\n    padding: 0;\r\n    border: none;\r\n    background-color: transparent;\r\n    color: black;\r\n}\r\n\r\n.as-chrome-time-picker-btn:disabled {\r\n    color: #dddddd;\r\n}\r\n\r\n.as-chrome-time-picker-btn:hover {\r\n    background-color: rgb(224, 245, 256);\r\n}\r\n\r\n.as-chrome-time-picker-btn.as-selected {\r\n    background-color: rgb(188, 205, 236);\r\n    border-radius: 3px;\r\n}\r\n\r\n.as-chrome-time-picker-btn > span {\r\n    font-size: calc(16em / 14);\r\n}\r\n\r\n\r\n\r\n", ""]);



/***/ }),

/***/ 9680:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-circle-section-label {\r\n    position: relative;\r\n    -webkit-print-color-adjust: exact;\r\n    /*friendly print*/\r\n}\r\n\r\n.as-circle-section-label-text {\r\n    position: relative;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-size: 1em;\r\n    padding-right: 2.5em;\r\n    color: white;\r\n    font-weight: bold;\r\n    z-index: 2;\r\n}\r\n\r\n\r\n.as-circle-section-label-index {\r\n    position: relative;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    text-align: center;\r\n    color: rgb(30, 162, 245);\r\n    font-weight: 900;\r\n    z-index: 2;\r\n}\r\n\r\n\r\n@media print {\r\n    .as-circle-section-label-text {\r\n        color: white !important;\r\n    }\r\n\r\n    .as-circle-section-label-index {\r\n        color: rgb(30, 162, 245) !important;\r\n    }\r\n}\r\n\r\n\r\n.as-circle-section-label-background {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    bottom: 0;\r\n    z-index: 1;\r\n}\r\n\r\n.as-circle-section-label-background>svg {\r\n    display: block;\r\n}\r\n\r\n.as-circle-section-label-index-box {\r\n    stroke: rgb(129, 211, 246);\r\n    fill: white;\r\n    stroke-width: 2.5;\r\n}\r\n\r\n.as-circle-section-label-arrow {\r\n    stroke: rgb(30, 162, 245);\r\n    fill: none;\r\n    stroke-linecap: round;\r\n}\r\n\r\n.as-circle-section-label-text-box {\r\n    fill: rgb(30, 162, 245);\r\n    stroke: none;\r\n}\r\n\r\n.as-circle-section-label-arrow-marker-path {\r\n    fill: rgb(30, 162, 245);\r\n    stroke: none;\r\n}", ""]);



/***/ }),

/***/ 76457:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".cke_panel {\r\n    z-index: 1000000000 !important;\r\n}\r\n\r\n\r\nspan.cke_button_icon.cke_button__as-variable-box-ico_icon {\r\n    background-size: cover;\r\n    background-image: url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiICB2aWV3Qm94PSIwIDAgMjQgMjQiPgogICAgPHBhdGggZmlsbD0iIzAwMDBmZiIgZD0iTTE5IDNINUMzLjkgMyAzIDMuOSAzIDVWMTlDMyAyMC4xIDMuOSAyMSA1IDIxSDE5QzIwLjEgMjEgMjEgMjAuMSAyMSAxOVY1QzIxIDMuOSAyMC4xIDMgMTkgM003LjQgMThDNS45IDE2LjUgNSAxNC4zIDUgMTJTNS45IDcuNSA3LjQgNkw5IDYuN0M3LjcgNy45IDcgOS45IDcgMTJTNy43IDE2LjEgOSAxNy4zTDcuNCAxOE0xMi43IDE1TDExLjkgMTNMMTAuNSAxNUg5TDExLjMgMTEuOUwxMCA5SDExLjNMMTIuMSAxMUwxMy41IDlIMTVMMTIuOCAxMkwxNC4xIDE1SDEyLjdNMTYuNiAxOEwxNSAxNy4zQzE2LjMgMTYgMTcgMTQuMSAxNyAxMlMxNi4zIDcuOSAxNSA2LjdMMTYuNiA2QzE4LjEgNy41IDE5IDkuNyAxOSAxMlMxOC4xIDE2LjUgMTYuNiAxOFoiIC8+Cjwvc3ZnPg==\");\r\n}\r\n\r\nspan.cke_button_icon.cke_button__as-expression-box-ico_icon {\r\n    background-size: cover;\r\n    background-image: url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiICB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgIDxwYXRoIGZpbGw9IiMwMDAwMDAiIGQ9Ik01LDNIN1Y1SDVWMTBBMiwyIDAgMCwxIDMsMTJBMiwyIDAgMCwxIDUsMTRWMTlIN1YyMUg1QzMuOTMsMjAuNzMgMywyMC4xIDMsMTlWMTVBMiwyIDAgMCwwIDEsMTNIMFYxMUgxQTIsMiAwIDAsMCAzLDlWNUEyLDIgMCAwLDEgNSwzTTE5LDNBMiwyIDAgMCwxIDIxLDVWOUEyLDIgMCAwLDAgMjMsMTFIMjRWMTNIMjNBMiwyIDAgMCwwIDIxLDE1VjE5QTIsMiAwIDAsMSAxOSwyMUgxN1YxOUgxOVYxNEEyLDIgMCAwLDEgMjEsMTJBMiwyIDAgMCwxIDE5LDEwVjVIMTdWM0gxOU0xMiwxNUExLDEgMCAwLDEgMTMsMTZBMSwxIDAgMCwxIDEyLDE3QTEsMSAwIDAsMSAxMSwxNkExLDEgMCAwLDEgMTIsMTVNOCwxNUExLDEgMCAwLDEgOSwxNkExLDEgMCAwLDEgOCwxN0ExLDEgMCAwLDEgNywxNkExLDEgMCAwLDEgOCwxNU0xNiwxNUExLDEgMCAwLDEgMTcsMTZBMSwxIDAgMCwxIDE2LDE3QTEsMSAwIDAsMSAxNSwxNkExLDEgMCAwLDEgMTYsMTVaIiAvPgo8L3N2Zz4=\");\r\n}\r\n\r\nspan.cke_button_icon.cke_button__insert_video_icon {\r\n    background-size: cover;\r\n    background-image: url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgIDxwYXRoIGZpbGw9IiMwMDAwMDAiIGQ9Ik0xOSwxOUg1VjVIMTlNMTksM0g1QTIsMiAwIDAsMCAzLDVWMTlBMiwyIDAgMCwwIDUsMjFIMTlBMiwyIDAgMCwwIDIxLDE5VjVDMjEsMy44OSAyMC4xLDMgMTksM00xMCw4VjE2TDE1LDEyTDEwLDhaIiAvPgo8L3N2Zz4=\");\r\n}\r\n\r\n\r\ndiv.as-ck-inline-short-text {\r\n    border: 1px solid #dddddd;\r\n    height: 30px;\r\n    line-height: 28px;\r\n    font-size: 14px;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    padding-left: var(--as-input-horizontal-padding);\r\n    padding-right: var(--as-input-horizontal-padding);\r\n    outline: none;\r\n    overflow: hidden;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-ck-inline-short-text p {\r\n    padding: 0;\r\n    margin: 0;\r\n}\r\n\r\n.as-ck-inline-short-text p::after {\r\n    content: \"\";\r\n}\r\n\r\n.as-ck-inline-short-text .cke_reset.cke_widget_drag_handler_container {\r\n    visibility: hidden;\r\n    opacity: 0;\r\n    display: none;\r\n}\r\n\r\n.cke.cke_browser_webkit {\r\n    z-index: 2000000 !important;\r\n}\r\n\r\n.cke.cke_browser_webkit.as-hidden {\r\n    opacity: 0;\r\n    visibility: hidden;\r\n    pointer-events: none;\r\n}\r\n\r\n.cke.as-has-sticky-toolbar {\r\n    border-top: none;\r\n}\r\n\r\n.cke.as-has-sticky-toolbar > .cke_inner > .cke_top {\r\n    border-top: 1px solid #d1d1d1;\r\n    z-index: 100;\r\n}\r\n\r\n\r\n.as-mdi-picker {\r\n    background-color: white;\r\n    border: 1px solid #dddddd;\r\n    padding: 10px 0  10px 10px;\r\n    min-width: 267px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-mdi-picker-body {\r\n    max-height: 40vh;\r\n    overflow-y: auto;\r\n    margin-top: 10px;\r\n}\r\n\r\n.as-mdi-picker button {\r\n    width: 30px;\r\n    height: 30px;\r\n}\r\n", ""]);



/***/ }),

/***/ 82264:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-form-cmd-tool-window .absol-onscreen-window-body-container {\r\n    overflow-y: auto;\r\n}\r\n\r\n\r\n.as-from-tool-button:not(:disabled) > span.mdi-delete-variant {\r\n    color: red;\r\n}\r\n\r\n.as-from-tool-button:disabled > span {\r\n    color: #c4c4c4 !important;\r\n}\r\n\r\n.as-from-tool-button:disabled > svg > path {\r\n    fill: #c4c4c4;\r\n}\r\n\r\n.as-form-cmd-tool .as-from-tool-ribbon-button,\r\n.bsc-white .as-form-cmd-tool .as-from-tool-ribbon-button,\r\n.as-form-cmd-tool .as-from-tool-ribbon-button {\r\n    font-size: 12px;\r\n    height: 2em;\r\n    width: 3em;\r\n    padding-right: 0.2em;\r\n    /**override theme*/\r\n    min-width: unset !important;\r\n    white-space: nowrap;\r\n    border: none !important;\r\n    background-color: transparent;\r\n}\r\n\r\n.as-form-cmd-tool .as-ribbon-button,\r\n.as-form-cmd-tool .as-ribbon-split-button {\r\n    font-size: 12px;\r\n    width: 6.5em;\r\n    vertical-align: top;\r\n}\r\n\r\n\r\n.as-form-cmd-tool .as-ribbon-button.as-checked.as-type-toggle-switch,\r\n.as-form-cmd-tool .as-ribbon-button.as-checked.as-type-color {\r\n    -webkit-box-shadow: inset 0px 0px 2px 0px rgba(0, 0, 0, 0.6);\r\n    box-shadow: inset 0px 0px 2px 0px rgba(0, 0, 0, 0.6);\r\n    background-color: rgba(0, 0, 0, 0.05);\r\n    color: #1e65ea;\r\n}\r\n\r\n\r\n.as-from-tool-group-buttons {\r\n    margin-right: 2px;\r\n\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-from-tool-group-buttons .as-from-tool-group-buttons:not(:last-child) {\r\n    border-right: 0.5px solid #ddd;\r\n}\r\n\r\n.as-from-tool-group-buttons .as-from-tool-group-buttons:not(:first-child) {\r\n    border-left: 0.5px solid #ddd;\r\n}\r\n\r\n.absol-tooltip-root {\r\n    z-index: 100;\r\n}\r\n\r\n.as-from-tool-group-buttons:empty {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-form-cmd-tool-menu-trigger {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    color: #ddd;\r\n}\r\n\r\n.as-form-cmd-tool-window .absol-onscreen-window-head-bar-button-dock {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-form-cmd-tool-window .as-form-cmd-tool-menu-trigger {\r\n    display: none;\r\n}\r\n\r\n.as-cmd-tool-group-x2 {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    position: relative;\r\n}\r\n\r\n.as-cmd-tool-tab .as-cmd-tool-group-x2 {\r\n    min-height: 60px;\r\n}\r\n\r\n\r\n.as-cmd-tool-group-x2::before {\r\n    content: '';\r\n    display: block;\r\n    position: absolute;\r\n    top: 0;\r\n    bottom: 0;\r\n    left: -1px;\r\n    border: 1px solid #ddd;\r\n}\r\n\r\n.as-cmd-tool-tab {\r\n    overflow: hidden;\r\n}", ""]);



/***/ }),

/***/ 81660:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-collapsible-tree-navigator {\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    font-size: 14px;\r\n    border-bottom: 1px solid #aaaaaa;\r\n    /*border-left: 1px solid #aaaaaa;*/\r\n    user-select: none;\r\n    padding-right: 4px;\r\n    position: relative;\r\n    box-sizing: border-box;\r\n    --level: 0;\r\n    --selected-y: 0;\r\n}\r\n\r\n.as-collapsible-tree-navigator::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    transition: top 0.2s;\r\n    top: var(--selected-y);\r\n    height: 30px;\r\n    border-right: 4px solid rgb(20, 100, 246);\r\n    right: 0;\r\n}\r\n\r\n\r\n.as-ctn-collapse-node {\r\n    --children-height: 1000px;\r\n}\r\n\r\n\r\n.as-ctn-right > span.mdi {\r\n    font-size: 20px;\r\n    vertical-align: middle;\r\n    transition: transform 0.2s ease-in-out;\r\n    transform: rotate(0deg);\r\n    visibility: hidden;\r\n    display: inline-block;\r\n\r\n}\r\n\r\n.as-ctn-collapse-node.as-close .as-ctn-right > span.mdi-chevron-right {\r\n    visibility: visible;\r\n}\r\n\r\n.as-ctn-collapse-node.as-open .as-ctn-right > span.mdi-chevron-right {\r\n    visibility: visible;\r\n    transform: rotate(90deg);\r\n}\r\n\r\n.as-ctn-collapse-node-content {\r\n    height: 31px;\r\n    box-sizing: border-box;\r\n    padding: 0 50px 0 8px;\r\n    position: relative;\r\n    background-color: rgb(240, 240, 242);\r\n    border-top: 1px solid #aaaaaa;\r\n    /*border-right: 1px solid #aaaaaa;*/\r\n}\r\n\r\n\r\n.as-ctn-collapse-node-content:hover::after,\r\n.as-ctn-node-content:hover::after {\r\n    content: \"\";\r\n    pointer-events: none;\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    z-index: 5;\r\n    background-color: var(--as-transparent-button-hover-color);\r\n}\r\n\r\n.as-ctn-collapse-node-content::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.as-ctn-collapse-node.as-open .as-ctn-collapse-node-children-ctn {\r\n    /*max-height: calc(var(--children-height) + 1px);*/\r\n}\r\n\r\n\r\n.as-ctn-collapse-node.as-close .as-ctn-collapse-node-children-ctn,\r\n.as-ctn-node.as-close .as-ctn-node-children-ctn {\r\n    /*max-height: 0;*/\r\n    display: none;\r\n}\r\n\r\n\r\n.as-ctn-collapse-node-children-ctn,\r\n.as-ctn-node-children-ctn\r\n{\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.as-ctn-collapse-node.as-open .as-ctn-collapse-node-content,\r\n.as-ctn-collapse-node:not(:last-child) {\r\n    /*border-bottom: 1px solid rgb(60, 60, 62);*/\r\n}\r\n\r\n.as-ctn-right {\r\n    position: absolute;\r\n    right: 10px;\r\n    top: 0;\r\n    height: 100%;\r\n}\r\n.as-ctn-right>button {\r\n    width: 30px;\r\n    height: 30px;\r\n\r\n}\r\n\r\n.as-ctn-right>button *{\r\n    font-size: 20px;\r\n}\r\n\r\n\r\n.as-ctn-right::after {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.as-ctn-right>button:hover {\r\n    background-color: var(--icon-background-cover-hover);\r\n\r\n}\r\n\r\n.as-ctn-text {\r\n    margin-left: 7px;\r\n}\r\n\r\n.as-ctn-icon-ctn:empty {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-ctn-icon-ctn>*{\r\n    font-size: 1.5em;\r\n}\r\n\r\n.as-ctn-icon-ctn>img,\r\n.as-ctn-icon-ctn>svg {\r\n    width: 1em;\r\n    height: 1em;\r\n}\r\n\r\n\r\n\r\n\r\n.as-ctn-text, .as-ctn-icon-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-ctn-count {\r\n    font-size: 14px;\r\n    box-sizing: border-box;\r\n    text-align: center;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    background-color: rgb(113, 148, 169);\r\n    line-height: 20px;\r\n    min-width: 20px;\r\n    padding-left: 5px;\r\n    padding-right: 5px;\r\n    height: 20px;\r\n    border-radius: 10px;\r\n    margin-left: 5px;\r\n    color: white;\r\n}\r\n\r\n\r\n.as-ctn-node {\r\n    position: relative;\r\n}\r\n\r\n\r\n.as-ctn-node-children-ctn:empty,\r\n.as-ctn-node-children-ctn:empty {\r\n    display: none;\r\n}\r\n\r\n.as-ctn-node-children-ctn .as-ctn-node:first-child::before {\r\n    top: -15px;\r\n    height: 30px;\r\n}\r\n\r\n.as-ctn-node:not(:last-child)::before {\r\n    height: 100%;\r\n}\r\n\r\n\r\n.as-ctn-node-content {\r\n    position: relative;\r\n    height: 30px;\r\n    padding-right: 10px;\r\n    box-sizing: border-box;\r\n    padding-left: calc(25px * var(--level) - 20px);/*5 is padding in level 0*/\r\n}\r\n\r\n\r\n.as-ctn-node-content::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.as-ctn-node-children-ctn {\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n\r\n.as-ctn-collapse-node.as-selected > .as-ctn-collapse-node-content .as-ctn-text,\r\n.as-ctn-node.as-selected > .as-ctn-node-content .as-ctn-text {\r\n    text-shadow: 1px 0 0 currentColor;\r\n}\r\n\r\n\r\n.as-ctn-collapse-node-content .toggler-ico,\r\n.as-ctn-node-content .toggler-ico {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: 1em;\r\n    height: 1em;\r\n}\r\n\r\n.as-ctn-collapse-node-content .toggler-ico g,\r\n.as-ctn-node-content .toggler-ico g {\r\n    visibility: hidden;\r\n}\r\n\r\n.as-ctn-collapse-node.as-open > .as-ctn-collapse-node-content .toggler-ico .toggle-open,\r\n.as-ctn-collapse-node.as-close > .as-ctn-collapse-node-content .toggler-ico .toggle-close,\r\n.as-ctn-node.as-open > .as-ctn-node-content .toggler-ico .toggle-open,\r\n.as-ctn-node.as-close > .as-ctn-node-content .toggler-ico .toggle-close {\r\n    visibility: visible;\r\n}\r\n", ""]);



/***/ }),

/***/ 15118:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-color-picker-button {\r\n    width: 45px;\r\n    height: 30px;\r\n    border-radius: 3px;\r\n    border: 1px solid #d6d6d6;\r\n    background-color: transparent;\r\n    padding: 5px;\r\n    outline: none;\r\n}\r\n\r\n.as-color-picker-button-inner {\r\n    height: 100%;\r\n    width: 100%;\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAaSURBVBhXYzh8+PD///8hJAOcBSRxyRw+DABJUCox2kjvSgAAAABJRU5ErkJggg==');\r\n    background-size: 1.5em;\r\n    image-rendering: optimizeSpeed;\r\n    /* STOP SMOOTHING, GIVE ME SPEED  */\r\n    image-rendering: -moz-crisp-edges;\r\n    /* Firefox                        */\r\n    image-rendering: -o-crisp-edges;\r\n    /* Opera                          */\r\n    image-rendering: -webkit-optimize-contrast;\r\n    /* Chrome (and eventually Safari) */\r\n    image-rendering: pixelated;\r\n    /* Chrome */\r\n    image-rendering: optimize-contrast;\r\n    /* CSS3 Proposed                  */\r\n    -ms-interpolation-mode: nearest-neighbor;\r\n    /* IE8+                           */\r\n}\r\n\r\n.as-color-picker-button-inner-value {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-color-picker-button-fol {\r\n    z-index: 1000;\r\n}\r\n\r\n.as-color-picker-button[data-mode=\"HEX6\"] .as-null .as-color-cell-value {\r\n    display: none;\r\n}\r\n\r\n.as-color-picker-button.as-border-none{\r\n    border: none;\r\n}\r\n\r\n.as-select-color-scheme-menu-dropdown {\r\n    font-size: 14px;\r\n    padding: 5px;\r\n}\r\n\r\n.as-select-color-scheme-menu {\r\n    box-sizing: border-box;\r\n    padding-right: 30px;\r\n    padding-left: 5px;\r\n}\r\n\r\n.as-select-color-scheme-menu::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.as-select-color-scheme-menu-selected-item {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-select-color-scheme-menu-selected-item .as-scsm-item-cell {\r\n    width: 20px;\r\n    height: 20px;\r\n}\r\n\r\n.as-scsm-item-list-row {\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-scsm-item-wrapper {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    padding: 7px;\r\n}\r\n\r\n.as-scsm-item {\r\n\r\n    border-radius: 4px;\r\n    overflow: hidden;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-scsm-item-wrapper:hover .as-scsm-item:not(.as-selected) {\r\n    box-shadow: 0px 0px 0px 2px rgba(107, 159, 255, 0.5);\r\n}\r\n\r\n.as-scsm-item.as-selected {\r\n    box-shadow: 0px 0px 0px 2px #1464f6;\r\n}\r\n\r\n.as-scsm-item-row {\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-scsm-item-cell {\r\n    width: 1.2em;\r\n    height: 1.2em;\r\n    display: inline-block;\r\n    vertical-align: top;\r\n}", ""]);



/***/ }),

/***/ 15132:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-text-input {\r\n    border-style: solid;\r\n    border-width: 1px;\r\n    border-radius: var(--as-input-border-radius);\r\n    border-color: var(--as-input-border-color);\r\n    outline: none;\r\n    height: var(--as-input-height);\r\n    padding-left: var(--as-input-vertical-padding);\r\n    font-size: inherit;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-text-input[readonly].as-border-none {\r\n    border: none;\r\n    padding-left: 0;\r\n    padding-right: 0;\r\n}\r\n\r\ninput[type=\"text\"].as-text-input:disabled,\r\ntextarea.as-text-input:disabled {\r\n    background-color: var(--as-disabled-background-color);\r\n}\r\n\r\n\r\n.as-blink-text {\r\n    --blink-duration: 1s;\r\n    --text-color: black;\r\n    animation-name: as-anim-text-blink-1-1;\r\n    animation-duration: var(--blink-duration);\r\n    animation-iteration-count: infinite;\r\n}\r\n\r\n\r\n@keyframes as-anim-text-blink-1-1 {\r\n    0% {\r\n        color: var(--text-color);\r\n    }\r\n    49% {\r\n        color: var(--text-color);\r\n    }\r\n    50% {\r\n        color: transparent;\r\n    }\r\n    99% {\r\n        color: transparent;\r\n    }\r\n    100% {\r\n        color: var(--text-color);\r\n    }\r\n}\r\n\r\n.as-mti-star {\r\n    font-family: 'Material Icons';\r\n    color: #ffa834;\r\n    font-size: var(--icon-font-size);\r\n    -webkit-font-smoothing: antialiased;\r\n}\r\n\r\n.as-mti-star::before {\r\n    content: \"star\";\r\n}\r\n\r\n.as-cursor-pointer {\r\n    cursor: pointer;\r\n}\r\n\r\n\r\n.as-table-grid {\r\n    display: table;\r\n}\r\n\r\n.as-table-grid.as-inline {\r\n    display: inline-table;\r\n}\r\n\r\n.as-table-grid-row {\r\n    display: table-row;\r\n}\r\n\r\n\r\n.as-table-grid-cell {\r\n    display: table-cell;\r\n}\r\n\r\n\r\n.as-pseudo-align-child-center {\r\n    text-align: center;\r\n}\r\n\r\n.as-pseudo-align-child-center::before {\r\n    height: 100%;\r\n    content: \"\";\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n}\r\n\r\n.as-pseudo-align-child-center > * {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-transparent-button {\r\n    background-color: transparent;\r\n    border: none;\r\n    padding: 0;\r\n    margin: 0;\r\n    font-size: inherit;\r\n    color: var(--as-transparent-button-text-color);\r\n}\r\n\r\n.as-transparent-button:hover {\r\n    color: var(--as-transparent-button-text-hover-color);\r\n}\r\n\r\n\r\n.as-transparent-button:active {\r\n    color: var(--as-transparent-button-text-active-color);\r\n}\r\n\r\n.as-transparent-button .mdi {\r\n    font-size: 1.5em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-transparent-button > svg,\r\n.as-transparent-button > img {\r\n    width: 1.5em;\r\n    height: 1.5em;\r\n}\r\n\r\n\r\n.as-transparent-button.as-variant-danger {\r\n    color: var(--variant-color-danger);\r\n}\r\n\r\n.as-transparent-button.as-variant-danger:hover {\r\n    color: #c03542;\r\n}\r\n\r\n\r\n\r\n.as-transparent-button.as-variant-danger:active{\r\n    color: #ef0d23;\r\n}\r\n\r\nbutton.as-transparent-button:disabled {\r\n    color: #dddddd;\r\n}\r\n\r\n.as-section-text-n-line {\r\n    position: relative;\r\n    display: block;\r\n    padding-bottom: 5px;\r\n}\r\n\r\n.as-section-text-n-line span {\r\n    background-color: white;\r\n    position: relative;\r\n    z-index: 2;\r\n    padding-right: 5px;\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.as-section-text-n-line::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    z-index: 1;\r\n    left: 0;\r\n    right: 0;\r\n    top: calc(50% - 1px);\r\n    border-top: 1px solid #dddddd;\r\n}\r\n", ""]);



/***/ }),

/***/ 2526:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-compact-data-grid-editor {\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    font-size: 14px;\r\n    border: 1px solid #dddddd;\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n\r\n.as-cag-var-mng {\r\n    padding: 10px;\r\n    border-bottom: 1px solid #dddddd;\r\n    background-color: #fefefe;\r\n}\r\n\r\n.as-cag-var {\r\n    display: inline-block;\r\n    padding: 5px 10px;\r\n    background-color: #0a90eb;\r\n    border-radius: 5px;\r\n\r\n    color: white;\r\n    cursor: move;\r\n    user-select: none;\r\n}\r\n\r\n.as-cag-var::after {\r\n    content: attr(data-default-title);\r\n    font-weight: inherit;\r\n    font-style: inherit;\r\n}\r\n\r\n.as-cag-var:not([data-default-title]) {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-cag-var.as-focus {\r\n    box-shadow: 0px 0px 2px 2px rgba(255, 153, 0, 0.75);\r\n}\r\n\r\n/*.as-cag-var::before {*/\r\n/*    content: \"[title]: \";*/\r\n/*}*/\r\n\r\n.as-cag-var[data-title]::before {\r\n    content: attr(data-title) \": \";\r\n    font-style: italic;\r\n\r\n}\r\n\r\n.as-cag-var[data-title=\"\"]::before {\r\n    display: none;\r\n}\r\n\r\n.as-clone-var {\r\n    box-shadow: 0px 0px 0px 4px rgba(70, 70, 90, 0.95) !important;\r\n    background-color: rgba(255, 255, 255, 0.7);\r\n    color: rgba(0, 0, 0, 0.7);\r\n}\r\n\r\n.as-cag-var-mng .as-cag-var {\r\n    margin-bottom: 5px;\r\n}\r\n\r\n.as-cag-var:not(:last-child) {\r\n    margin-right: 10px;\r\n}\r\n\r\n\r\n.as-cdg-table {\r\n    margin: 15px;\r\n    border-collapse: collapse;\r\n    user-select: none;\r\n}\r\n\r\n.as-cdg-table > thead {\r\n    background-color: #e3e2e2;\r\n}\r\n\r\n.as-cdg-table > thead.as-hidden {\r\n    display: none;\r\n}\r\n\r\n.as-cdg-table > thead th {\r\n    border-color: #aaaaaa;\r\n    height: 40px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-cdg-table > thead pre{\r\n    white-space: pre-wrap;\r\n    font-family: inherit;\r\n    outline: none;\r\n    line-height: 1.5;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-cdg-table > thead pre:focus {\r\n    background-color: rgba(255, 255, 255, 0.5);\r\n}\r\n\r\n.as-ca-cell:empty {\r\n    padding: 10px 30px;\r\n    text-align: center;\r\n}\r\n\r\n.as-cdg-table > tbody .as-ca-cell:empty::before {\r\n    content: \"+\";\r\n    font-size: 1.1em;\r\n    color: #1da1ff;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-ca-cell {\r\n    /*border: 1px dashed rgba(150, 150, 250, 0.3);*/\r\n    border: 1px solid #dddddd;\r\n    white-space: nowrap;\r\n    padding: 5px 20px;\r\n    position: relative;\r\n}\r\n\r\n.as-ca-cell.as-hovering,\r\n.as-ca-cell.as-hovering.as-selected {\r\n    background-color: rgba(78, 246, 162, 0.15);\r\n}\r\n\r\n\r\n.as-ca-cell.as-selected {\r\n    background-color: rgba(78, 222, 246, 0.25);\r\n}\r\n\r\n.as-ca-cell.as-drag-over::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    right: 0;\r\n    display: block;\r\n    border: 2px solid #ff922a;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-ca-cell.as-drag-over.as-bf {\r\n    --hover-x: 20px;\r\n\r\n}\r\n\r\n.as-ca-cell.as-drag-over.as-bf::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    top: 4px;\r\n    bottom: 4px;\r\n    width: 6px;\r\n    border-radius: 3px;\r\n    background-color: #0a90eb;\r\n    left: calc(var(--hover-x) - 8px);\r\n    animation-name: as_ca_bf_blink;\r\n    animation-duration: 0.5s;\r\n    animation-iteration-count: infinite;\r\n}\r\n\r\n\r\n@keyframes as_ca_bf_blink {\r\n    0% {\r\n        background-color: #0a90eb;\r\n    }\r\n    50% {\r\n        background-color: transparent;\r\n    }\r\n    100% {\r\n        background-color: #0a90eb;\r\n    }\r\n}\r\n\r\n\r\n.as-cdg-variable-edit-dialog .as-table-grid-cell {\r\n    padding: 5px 10px;\r\n}\r\n\r\n.as-cdg-variable-edit-dialog button {\r\n    min-width: 100px;\r\n}\r\n\r\n\r\n.as-cdg-variable-edit-dialog input[type=\"text\"] {\r\n    width: 200px;\r\n}\r\n\r\n\r\n.as-compact-data-grid-editor-body {\r\n    overflow: auto;\r\n}\r\n\r\n.as-compact-data-grid-editor .as-table-of-text-input-tool .as-ribbon-button {\r\n    width: 80px;\r\n}\r\n\r\n.as-compact-data-grid-editor .as-table-of-text-input-tool .as-ribbon-button svg {\r\n    width: 24px;\r\n    height: 24px;\r\n}\r\n\r\n.as-toggle-header-ico:not(.as-show-header) .as-icon-add {\r\n    display: none;\r\n}\r\n\r\n.as-toggle-header-ico .as-icon-minus {\r\n    stroke: red !important;\r\n}\r\n\r\n.as-toggle-header-ico.as-show-header .as-icon-minus,\r\n.as-toggle-header-ico.as-show-header .as-icon-add {\r\n    stroke: blue !important;\r\n}", ""]);



/***/ }),

/***/ 64273:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-context-menu-hook {\r\n    position: absolute;\r\n    z-index: -100000;\r\n    width: 14px;\r\n    height: 14px;\r\n    top: 0;\r\n    opacity: 0;\r\n    resize: none;\r\n    cursor: default;\r\n}\r\n\r\n.absol-context-hinge-fixed-container {\r\n    position: fixed;\r\n    left: 0;\r\n    top: 0;\r\n    z-index: 1000000001;\r\n}\r\n\r\n.absol-context-hinge {\r\n    position: relative;\r\n    width: 0;\r\n    height: 0;\r\n}\r\n\r\n.absol-context-hinge > .absol-context-menu {\r\n    position: absolute;\r\n    top: -10000px;\r\n    left: -10000px;\r\n    visibility: hidden;\r\n    z-index: 1000000000;\r\n    display: inline-block;\r\n}\r\n\r\n.absol-context-hinge .absol-vmenu,\r\n.absol-context-hinge .absol-hmenu {\r\n    padding-top: 0.4em;\r\n    padding-bottom: 0.4em;\r\n    /* background-color: rgb(37, 37, 38);\r\n    -webkit-box-shadow: 2px 2px 9px 0px rgba(7, 7, 7, 1);\r\n    -moz-box-shadow: 2px 2px 9px 0px rgb(7, 7, 7, 1);\r\n    box-shadow: 2px 2px 9px 0px rgba(7, 7, 7, 1); */\r\n    color: black;\r\n    background-color: rgb(252, 252, 255);\r\n    -webkit-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    -moz-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n}\r\n\r\n.absol-context-menu-anchor.dark .absol-hmenu,\r\n.absol-context-menu-anchor.dark .absol-vmenu,\r\n.dark .absol-context-menu-anchor .absol-hmenu,\r\n.dark .absol-context-menu-anchor .absol-vmenu {\r\n    background-color: rgb(37, 37, 38);\r\n}\r\n\r\n\r\n.absol-context-menu-anchor {\r\n    position: fixed;\r\n    z-index: -1000;\r\n    left: 0;\r\n    top: 0;\r\n    display: block;\r\n    opacity: 0;\r\n    visibility: hidden;\r\n    font-size: inherit;\r\n}\r\n\r\n.absol-context-menu-anchor > textarea {\r\n    width: 160px;\r\n    height: 160px;\r\n    margin: 0;\r\n    resize: none;\r\n    border: none;\r\n    opacity: 0;\r\n    cursor: default;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n}\r\n\r\n.absol-context-menu-anchor.absol-active {\r\n    z-index: 1000000000 !important;\r\n    opacity: 1;\r\n    visibility: visible;\r\n}\r\n\r\n\r\n.absol-context-menu-anchor .absol-vmenu,\r\n.absol-context-menu-anchor .absol-hmenu {\r\n    padding-top: 0.4em;\r\n    padding-bottom: 0.4em;\r\n    color: black;\r\n    background-color: rgb(252, 252, 255);\r\n    -webkit-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    -moz-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n}\r\n\r\n\r\n.absol-context-menu-anchor .absol-dropright > .absol-dropright-content {\r\n    -webkit-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    -moz-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n}\r\n\r\n\r\n.as-system-context-menu {\r\n    /** nothing here, to define use system context menu**/\r\n}\r\n\r\n.as-context-menu-ctn {\r\n    font-size: var(--as-context-menu-font-size);\r\n    font-family: var(--as-input-font-family);\r\n}\r\n\r\n.as-context-menu-ctn.as-anchor-modal,\r\n.absol-context-menu-anchor.as-anchor-modal {\r\n    position: fixed;\r\n    z-index: 800000000;\r\n    left: 0 !important;\r\n    right: 0 !important;;\r\n    top: 0 !important;;\r\n    bottom: 0 !important;;\r\n    box-sizing: border-box;\r\n    text-align: center;\r\n    background-color: rgba(155, 155, 155, 0.3);\r\n}\r\n\r\n.as-context-menu-ctn.as-anchor-modal::before,\r\n.as-context-menu-ctn.as-anchor-modal > .absol-vmenu,\r\n.absol-context-menu-anchor.as-anchor-modal::before,\r\n.absol-context-menu-anchor.as-anchor-modal > .absol-vmenu {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-context-menu-ctn.as-anchor-modal > .absol-vmenu,\r\n.absol-context-menu-anchor.as-anchor-modal > .absol-vmenu {\r\n    text-align: left;\r\n}\r\n\r\n\r\n.as-context-menu-ctn.as-anchor-modal::before,\r\n.absol-context-menu-anchor.as-anchor-modal::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n.as-context-menu-ctn.as-anchor-modal > .absol-vmenu,\r\n.absol-context-menu-anchor.as-anchor-modal > .absol-vmenu {\r\n    min-width: 70%;\r\n    max-width: calc(100% - 10px);\r\n    max-height: calc(100% - 10px);\r\n}\r\n\r\n.as-quick-menu {\r\n    font-size: 1rem;\r\n}\r\n\r\n.as-quick-menu {\r\n    --available-height: calc(100vh - 20px);\r\n    max-height: var(--available-height);\r\n}\r\n\r\n.absol-context-menu-anchor.as-anchor-modal .as-quick-menu {\r\n    max-height: calc(100vh - 20px);\r\n}", ""]);



/***/ }),

/***/ 96048:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-countdown-clock {\r\n    width: 7em;\r\n    height: 7em;\r\n    border-radius: 50%;\r\n    position: relative;\r\n    display:inline-block;\r\n    font-family: Consolas;\r\n}\r\n\r\n.as-countdown-clock-border-wrapper{\r\n    pointer-events:none;\r\n    position: absolute;\r\n    box-sizing: border-box;\r\n    left: 0.2em;\r\n    right: 0.2em;\r\n    top: 0.2em;\r\n    bottom: 0.2em;\r\n    filter: drop-shadow(0 0px 1px rgb(100, 200, 255));\r\n}\r\n\r\n.as-countdown-clock-border {\r\n    width: 100%;\r\n    height: 100%;\r\n    border: solid 0.2em rgb(100, 200, 255);\r\n    border-radius: 50%;\r\n    object-fit: cover;\r\n}\r\n\r\n.as-countdown-clock-text {\r\n    position: absolute;\r\n    left: 50%;\r\n    top: 50%;\r\n    transform:translate(-50%, -50%);\r\n    font-size: 2em;\r\n}\r\n\r\n.as-countdown-clock div,\r\n.as-countdown-clock span\r\n{\r\n    font-family: inherit;\r\n}", ""]);



/***/ }),

/***/ 67338:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-countdown-text {\r\n\r\n}\r\n", ""]);



/***/ }),

/***/ 41242:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-cpu-viewer{\r\n    position: fixed;\r\n    bottom: 5px;\r\n    right: 5px;\r\n    box-sizing: border-box;\r\n    z-index: 1000000000;\r\n    border: 1px solid black;\r\n    display: inline-block;\r\n}\r\n\r\n.as-cpu-viewer canvas{\r\n    display: block;\r\n}\r\n\r\n.as-pending-attachhook-count{\r\n    padding: 10px;\r\n    border-radius: 4px;\r\n    position: fixed;\r\n    z-index: 1000000;\r\n    right: 10px;\r\n    top: 10px;\r\n    background: white;\r\n    border: 1px solid red;\r\n    opacity: 0.5;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-pending-attachhook-count:hover {\r\n    opacity: 0.0;\r\n}", ""]);



/***/ }),

/***/ 3397:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-date-input {\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    font-size: 1rem;\r\n    border: 1px solid #ddd;\r\n    border-radius: 3px;\r\n    height: calc(2em + 2px);\r\n    width: 10.5em;\r\n    box-sizing: border-box;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    position: relative;\r\n    background-color: white;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-date-input[data-format] {\r\n    --format-width: 8.5em;\r\n    width: calc(var(--format-width) + 2em + 1em);\r\n}\r\n\r\n.as-date-input-text {\r\n    outline: none;\r\n    width: calc(100% - 29px);\r\n    height: 100%;\r\n    border: none;\r\n    background-color: transparent;\r\n    display: block;\r\n    padding: 0 0 0 var(--as-input-horizontal-padding);\r\n    font: inherit;\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.as-date-input-icon-ctn {\r\n    font-size: inherit;\r\n    border-left: 1px solid #ddd;\r\n    border-right: none;\r\n    border-top: none;\r\n    border-bottom: none;\r\n    text-align: center;\r\n    position: absolute;\r\n    right: 0;\r\n    width: calc(2em + 1px);\r\n    box-sizing: border-box;\r\n    top: 0;\r\n    height: 100%;\r\n    background-color: rgba(169, 169, 169, 0.1);\r\n    cursor: pointer;\r\n    color: black;\r\n    padding: 0;\r\n}\r\n\r\n\r\n.as-date-input-icon-ctn:hover {\r\n    background-color: rgba(169, 169, 169, 0.25);\r\n}\r\n\r\n.as-date-input-icon-ctn:active {\r\n    background-color: rgba(169, 169, 169, 0.5);\r\n}\r\n\r\n\r\n.as-date-input-icon-ctn > span {\r\n    line-height: 28px;\r\n    font-size: calc(16em / 14);\r\n    display: inline-block;\r\n    padding: 0;\r\n}\r\n\r\n.as-date-input.as-read-only .as-date-input-icon-ctn {\r\n    pointer-events: none;\r\n}\r\n\r\n.as-date-input.as-disabled {\r\n    color: var(--as-disabled-text-color);\r\n    pointer-events: none;\r\n}\r\n\r\n.as-date-input.as-disabled input {\r\n    background-color: var(--as-disabled-background-color);\r\n}\r\n\r\n.as-date-input.as-value-null .as-date-input-clear-btn,\r\n.as-date-input.as-must-not-null .as-date-input-clear-btn {\r\n    display: none;\r\n}\r\n\r\n.as-date-input-clear-btn {\r\n    font-size: inherit;\r\n    position: absolute;\r\n    right: 2em;\r\n    height: 2em;\r\n    padding: 0 0.3em;\r\n    top: calc(50% - 1em);\r\n    box-sizing: border-box;\r\n    background-color: transparent;\r\n    border: none;\r\n    color: #bbb;\r\n    visibility: hidden;\r\n}\r\n\r\n.as-date-input.as-read-only .as-date-input-clear-btn {\r\n    display: none;\r\n}\r\n\r\n.as-date-input-clear-btn:hover {\r\n    color: rgb(132, 132, 132)\r\n}\r\n\r\n.as-date-input-clear-btn:active {\r\n    color: #525555;\r\n}\r\n\r\n.as-date-input-text:focus + .as-date-input-clear-btn,\r\n.as-date-input:hover .as-date-input-clear-btn {\r\n    visibility: visible;\r\n}\r\n\r\n.as-date-input.as-border-none {\r\n    border: transparent;\r\n    background-color: transparent;\r\n}\r\n\r\n.as-date-input.as-border-none .as-date-input-icon-ctn {\r\n    display: none;\r\n}\r\n\r\n.as-date-input.as-border-none .as-date-input-text {\r\n    width: 100%;\r\n    padding-left: 0;\r\n}\r\n\r\n.as-date-n-level-input {\r\n    white-space: nowrap;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    position: relative;\r\n    width: 13.5em;\r\n    height: calc(2em + 2px);\r\n}\r\n\r\n.as-date-n-level-input .as-date-input {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-date-n-level-input-select-level {\r\n    position: absolute;\r\n    left: 1px;\r\n    top: 1px;\r\n    width: 2em;\r\n    height: 2em;\r\n    padding: 0;\r\n}\r\n\r\n\r\n.as-date-n-level-input.as-disabled .as-date-n-level-input-select-level {\r\n    opacity: 0.5;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-date-n-level-input.as-read-only .as-date-n-level-input-select-level {\r\n    pointer-events: none;\r\n}\r\n\r\n\r\n.as-date-n-level-input .as-date-input-text {\r\n    padding-left: calc(var(--as-input-horizontal-padding) + 2em);\r\n    width: calc(100% - 2em - 1px);\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.as-date-n-level-input.as-border-none.as-read-only .as-date-input {\r\n    border: none;\r\n}\r\n\r\n\r\n.as-date-n-level-input.as-border-none.as-read-only .as-date-input-text {\r\n    width: 100%;\r\n    text-align: left;\r\n    padding-left: 0;\r\n}\r\n.as-date-n-level-input.as-border-none.as-read-only button {\r\n    display: none;\r\n}\r\n", ""]);



/***/ }),

/***/ 45406:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-date-in-year-follower {\r\n    z-index: 900000000;\r\n}\r\n\r\n.as-date-in-year-picker {\r\n    font-size: 1rem;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    /*width: 20em;*/\r\n    box-sizing: border-box;\r\n    border: 1px solid #dddddd;\r\n    display: inline-block;\r\n    padding: calc(10em / 14) calc(5rem / 14);\r\n    box-shadow: 1px 1px 2px rgb(240, 240, 240);\r\n    background-color: white;\r\n}\r\n\r\n\r\n.as-date-in-year-picker-table {\r\n    display: table;\r\n}\r\n\r\n.as-date-in-year-picker-row {\r\n    display: table-row;\r\n}\r\n\r\n\r\n.as-date-in-year-picker-row:first-child {\r\n    text-align: center;\r\n    line-height: 1.5;\r\n}\r\n\r\n.as-date-in-year-picker-cell {\r\n    display: table-cell;\r\n}\r\n\r\n\r\n.as-date-in-year-picker-cell:first-child {\r\n    padding-right: 10px;\r\n}\r\n\r\n\r\n.as-date-in-year-picker-month-col {\r\n    position: relative;\r\n    padding-top: calc(25em / 14);\r\n    padding-bottom: calc(25em / 14);\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-date-in-year-picker-month-viewport {\r\n    width: calc(50em / 14);\r\n    overflow: hidden;\r\n\r\n}\r\n\r\n.as-date-in-year-picker-month-scroller {\r\n    width: calc(100% + 17px);\r\n    height: 8em;\r\n    overflow-y: scroll;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\nbutton.as-date-in-year-picker-month {\r\n    font-size: inherit;\r\n    height: 2em;\r\n    width: calc(50em / 14);\r\n    padding: 0;\r\n    border: none;\r\n    background-color: transparent;\r\n}\r\n\r\nbutton.as-date-in-year-picker-month:hover {\r\n    background-color: rgb(224, 245, 256);\r\n}\r\n\r\nbutton.as-date-in-year-picker-month.as-selected {\r\n    background-color: rgb(188, 205, 236);\r\n    border-radius: 3px;\r\n}\r\n\r\nbutton.as-date-in-year-picker-month > span {\r\n    font-size: calc(16rem / 14);\r\n}\r\n\r\n\r\n.as-chrome-time-picker-scroller-up:hover,\r\n.as-chrome-time-picker-scroller-down:hover {\r\n    background-color: rgba(169, 169, 169, 0.2);\r\n}\r\n\r\n\r\n.as-date-in-year-picker-month-btn {\r\n    position: absolute;\r\n    left: 0;\r\n    font-size: inherit;\r\n    height: calc(20em / 14);\r\n    width: calc(50em / 14);\r\n    padding: 0;\r\n    border: none;\r\n    background-color: transparent;\r\n    box-sizing: border-box;\r\n    border-radius: 3px;\r\n}\r\n\r\n.as-date-in-year-picker-month-btn.as-up {\r\n    top: 0;\r\n}\r\n\r\n.as-date-in-year-picker-month-btn.as-down {\r\n    bottom: 0;\r\n}\r\n\r\n\r\n.as-date-in-year-picker-month-btn:hover {\r\n    background-color: rgba(169, 169, 169, 0.2);\r\n}\r\n\r\n.as-date-in-year-picker-month-btn > span {\r\n    font-size: 1.5em;\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n}\r\n\r\n\r\n.as-date-in-year-picker-days {\r\n    display: inline-table;\r\n    vertical-align: middle;\r\n    border: solid 1px rgb(190, 190, 190);\r\n}\r\n\r\n.as-date-in-year-picker-week {\r\n    display: table-row;\r\n}\r\n\r\n.as-date-in-year-picker-day {\r\n    display: table-cell;\r\n    text-align: right;\r\n    padding: calc(5em / 14);\r\n    line-height: calc(20em / 14);\r\n    font-size: inherit;\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n}\r\n\r\n\r\n.as-date-in-year-picker-day:hover {\r\n    background-color: rgb(224, 245, 256);\r\n    cursor: default;\r\n}\r\n\r\n.as-date-in-year-picker-day.as-selected {\r\n    background-color: rgb(188, 205, 236);\r\n}\r\n\r\n\r\n.as-date-time-input.as-date-in-year-input {\r\n    width: calc(8em + 2px);\r\n}\r\n\r\n.as-date-in-year-input.as-must-not-null .as-time-input-clear-btn,\r\n.as-date-in-year-input.as-empty .as-time-input-clear-btn {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-date-in-year-follower {\r\n    z-index: 1000000;\r\n}", ""]);



/***/ }),

/***/ 37437:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-date-time-input {\r\n    border: 1px solid #ddd;\r\n    border-radius: 3px;\r\n    height: calc(2em + 2px);\r\n    width: calc(14em + 2px);\r\n    box-sizing: border-box;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    position: relative;\r\n    background-color: white;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-date-time-input.as-disabled {\r\n    color: var(--as-disabled-text-color);\r\n    pointer-events: none;\r\n}\r\n\r\n\r\n.as-date-time-input input {\r\n    font-size: inherit;\r\n    outline: none;\r\n    width: calc(100% - 2em - 1px);\r\n    height: 100%;\r\n    border: none;\r\n    display: block;\r\n    padding: 0 0 0 var(--as-input-horizontal-padding);\r\n    -webkit-user-select: auto;\r\n    user-select: auto;\r\n    -webkit-user-drag: none;\r\n    color: inherit;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-date-time-input.as-disabled input {\r\n    background-color: var(--as-disabled-background-color);\r\n}\r\n\r\n.as-date-time-input-icon-btn {\r\n    border-right: none;\r\n    border-top: none;\r\n    border-bottom: none;\r\n    border-left: 1px solid #ddd;\r\n    position: absolute;\r\n    right: 0;\r\n    width: calc(2em + 1px);\r\n    box-sizing: border-box;\r\n    top: 0;\r\n    bottom: 0;\r\n    background-color: rgba(169, 169, 169, 0.1);\r\n    cursor: pointer;\r\n    border-radius: 0;\r\n    color: inherit;\r\n    font-size: inherit;\r\n    padding: 0;\r\n}\r\n\r\n.as-date-time-input-icon-btn > span {\r\n    font-size: calc(16em / 14);\r\n}\r\n\r\n\r\n.as-date-time-input-icon-btn:hover {\r\n    background-color: rgba(169, 169, 169, 0.25);\r\n}\r\n\r\n.as-date-time-input-icon-btn:active {\r\n    background-color: rgba(169, 169, 169, 0.5);\r\n}\r\n\r\n\r\n.as-date-time-input-icon-btn.as-disabled {\r\n    color: rgb(102, 102, 102);\r\n    pointer-events: none;\r\n}\r\n\r\n.as-date-time-input-follower {\r\n    box-sizing: border-box;\r\n    background-color: white;\r\n    border: 1px solid #ddd;\r\n    padding: 5px;\r\n}\r\n\r\n.as-date-time-input-date-picker {\r\n    border: none;\r\n    box-shadow: none;\r\n}\r\n\r\n.as-date-time-input-picker-header {\r\n    text-align: right;\r\n    padding-bottom: 5px;\r\n}\r\n\r\n\r\n.as-date-time-input-picker-btn {\r\n    height: 20px;\r\n    min-width: 25px;\r\n    padding: 0 5px;\r\n    box-sizing: border-box;\r\n    font-size: inherit;\r\n    border: 1px solid rgb(47, 82, 143);\r\n    background-color: rgb(68, 144, 196);\r\n    color: white;\r\n    border-radius: 0;\r\n}\r\n\r\n.as-date-time-input-picker-btn:active {\r\n    background-color: rgb(50, 122, 169);\r\n}\r\n\r\n\r\n.as-chrome-time-picker.as-date-time-input-time-picker {\r\n    height: 11.8em;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-date-time-input-picker-ctn {\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-date-time-input-picker-ctn > div {\r\n    display: inline-block;\r\n    white-space: initial;\r\n    vertical-align: top;\r\n}\r\n\r\n.as-date-time-input-follower > div {\r\n    border-color: white;\r\n}\r\n\r\n.as-date-time-input:hover .as-time-input-clear-btn {\r\n    visibility: visible;\r\n}\r\n\r\n.as-date-time-input.as-must-not-null .as-time-input-clear-btn,\r\n.as-date-time-input.as-read-only .as-time-input-clear-btn {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-date-time-input.as-read-only .as-date-time-input-icon-btn {\r\n    pointer-events: none;\r\n}\r\n\r\n\r\n.as-date-time-input.as-border-none {\r\n    border: none;\r\n}\r\n\r\n\r\n.as-date-time-input.as-border-none .as-date-time-input-icon-btn {\r\n    display: none;\r\n}\r\n\r\n.as-date-time-input.as-border-none input {\r\n    width: 100%;\r\n    padding-left: 0;\r\n}\r\n\r\n.as-date-time-input[data-text].as-read-only.as-border-none input {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-date-time-input[data-text].as-read-only.as-border-none {\r\n    width: auto;\r\n}\r\n\r\n.as-date-time-input[data-text].as-read-only.as-border-none::before {\r\n    content: attr(data-text);\r\n    line-height: 30px;\r\n}\r\n\r\n\r\n.as-relative-time-text[data-time-text]::after {\r\n    content: attr(data-time-text);\r\n}", ""]);



/***/ }),

/***/ 74100:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-debug-task {\r\n    position: fixed;\r\n    right: 10px;\r\n    bottom: 10px;\r\n    z-index: 999999;\r\n    border-radius: 4px;\r\n    background: rgba(169, 169, 171, 0.3);\r\n    border: solid 1px rgba(21, 21, 214, 0.5);\r\n    min-width: 45px;\r\n    min-height: 30px;\r\n    font-size: 12px;\r\n    padding: 5px;\r\n    pointer-events: none;\r\n}\r\n\r\n.absol-debug-task-name{\r\n    color: darkcyan;\r\n}\r\n\r\n.absol-debug-task-value{\r\n    color: rgb(159, 8, 197);\r\n}", ""]);



/***/ }),

/***/ 6478:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --as-input-height: calc(2rem + 2px);\r\n    --as-input-font-size: 1rem;\r\n    --as-input-font-family: Arial, Helvetica, sans-serif;\r\n    --as-input-vertical-padding: 0.3571em;\r\n    --as-input-horizontal-padding: 0.5em;\r\n    --as-input-border-color: #ddd;\r\n    --as-input-border-radius: 3px;\r\n    --as-context-menu-font-size: 1rem;\r\n    --as-context-font-family: Arial, Helvetica, sans-serif;\r\n    --as-disabled-background-color: #ebebe4;\r\n    --as-disabled-text-color: rgb(102, 102, 102);\r\n    --icon-background-cover-hover: #91e4fb;\r\n    --as-transparent-button-hover-color: rgba(169, 169, 172, 0.25);\r\n    --as-transparent-button-focus-color:  rgba(20, 185, 235, 0.3);\r\n    --as-transparent-button-active-color:  rgba(169, 169, 172, 0.2);\r\n    --as-transparent-button-text-color: rgb(139, 139, 140);\r\n    --as-transparent-button-text-hover-color: rgb(107, 107, 107);\r\n    --as-transparent-button-text-active-color: rgb(0, 0, 0);\r\n\r\n    --as-list-item-hover-background-color: #efefef;\r\n    --as-list-item-selected-background-color: #dfdfdf;\r\n\r\n\r\n    --modal-margin-top: 10vh;\r\n    --icon-font-size: 1.42857142857rem;\r\n}\r\n\r\n", ""]);



/***/ }),

/***/ 21908:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-draggable-stack {\r\n    position: relative;\r\n}\r\n\r\n.absol-draggable-stack .drag-zone {\r\n    touch-action: none;\r\n}\r\n\r\n.absol-draggable-stack > .as-dragging {\r\n    opacity: 0.2 !important;\r\n}\r\n\r\n.absol-draggable-stack-child-container.as-dragging {\r\n    opacity: 0.2 !important;\r\n}\r\n\r\n.absol-draggable-stack-clone-container {\r\n    position: fixed;\r\n    left: 0;\r\n    top: 0;\r\n    z-index: 100000;\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n    -ms-user-select: none;\r\n    pointer-events: all;\r\n    opacity: 0.5;\r\n    background: white;\r\n}\r\n\r\n.absol-draggable-vstack > .absol-draggable-stack-clone-container {\r\n    left: 0;\r\n    right: 0;\r\n\r\n}\r\n\r\n.absol-draggable-stack-clone-container * {\r\n    pointer-events: none !important;\r\n}\r\n\r\n.absol-draggable-stack-clone-container > * {\r\n    width: 100% !important;\r\n    height: 100% !important;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.absol-draggable-stack-clone-container.home-going {\r\n    transition: top 0.2s;\r\n}\r\n\r\n.absol-draggable-stack-dest-line {\r\n    position: absolute;\r\n    z-index: 99;\r\n    box-sizing: content-box;\r\n}\r\n\r\n.absol-draggable-vstack > .absol-draggable-stack-dest-line {\r\n    transition: top 0.1s;\r\n    left: 0;\r\n    right: 0;\r\n    border-top: solid 3px rgb(74, 174, 233);\r\n    border-bottom: solid 3px rgb(74, 174, 233);\r\n}\r\n\r\n\r\n.absol-draggable-hstack {\r\n    --dest-x: 0px;\r\n}\r\n\r\n.absol-draggable-hstack.as-has-dragging::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    transition: left 0.1s;\r\n    top: 0;\r\n    bottom: 0;\r\n    left: calc(var(--dest-x) - 3px);\r\n    border-left: solid 3px rgb(74, 174, 233);\r\n    border-right: solid 3px rgb(74, 174, 233);\r\n}\r\n\r\n.absol-draggable-hstack.as-no-change::after {\r\n    visibility: hidden;\r\n}\r\n\r\n\r\n.absol-draggable-hstack > * {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.absol-draggable-vstack {\r\n    --dest-y: unset;\r\n}\r\n\r\n/**.as-state-drag*/\r\n.absol-draggable-vstack.as-state-drag::after {\r\n    content: \"\";\r\n    display: block;\r\n    position: absolute;\r\n    top: calc(var(--dest-y) - 3px);\r\n    left: 0;\r\n    right: 0;\r\n    transition: top 0.1s;\r\n    border-top: solid 3px rgb(74, 174, 233);\r\n    border-bottom: solid 3px rgb(74, 174, 233);\r\n    z-index: 999;\r\n}\r\n\r\n\r\n.absol-draggable-vstack.as-state-no-change::after {\r\n    visibility: hidden;\r\n}", ""]);



/***/ }),

/***/ 16189:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "\r\n/**********************************************************************************************************************/\r\ndiv.as-dropdown-box-common-style {\r\n    -webkit-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    -moz-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    border: solid 1px rgb(100, 100, 255);\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    background-color: white;\r\n}\r\n\r\n.as-dropdown-box-footer {\r\n    height: calc(2em + 1px);\r\n    border-top: 1px solid #dddddd;\r\n    box-sizing: border-box;\r\n    padding-left: 0.35em;\r\n    white-space: nowrap;\r\n    position: relative;\r\n}\r\n\r\n\r\n.as-dropdown-box-footer > *,\r\n.as-dropdown-box-footer::before,\r\n.as-dropdown-box-footer-right::before,\r\n.as-dropdown-box-footer-right > * {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-dropdown-box-footer-right::before,\r\n.as-dropdown-box-footer::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n.as-dropdown-box-footer > *:not(:last-child) {\r\n    margin-right: 6.5em;\r\n}\r\n\r\n.as-dropdown-box-footer .absol-checkbox-label.as-right {\r\n    padding-left: 0.35em;\r\n}\r\n\r\n.as-dropdown-box-footer-right {\r\n    position: absolute;\r\n    right: 10px;\r\n    top: 0;\r\n    height: 100%;\r\n}\r\n\r\n.as-dropdown-box-footer a {\r\n    cursor: pointer;\r\n    margin-left: 30px;\r\n}\r\n\r\n.as-dropdown-box-footer a:hover {\r\n    color: #1da1ff;\r\n}\r\n\r\n.as-dropdown-box-footer a.as-select-list-box-cancel-btn {\r\n    color: #888888;\r\n}\r\n\r\n.as-dropdown-box-footer a.as-select-list-box-close-btn {\r\n    padding: 0 10px;\r\n}\r\n\r\n.as-dropdown-box-footer a.as-select-list-box-cancel-btn:hover {\r\n    color: #ea2121;\r\n}\r\n\r\n/********** MOBILE ***************/\r\n\r\n.am-modal.am-dropdown-box-modal{\r\n    z-index: 100001000;\r\n}\r\n\r\n.am-dropdown-box {\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    font-size: 1rem;\r\n    max-width: 95vw;\r\n}\r\n\r\n.am-dropdown-box.as-enable-search .absol-search-text-input,\r\n.am-dropdown-box-modal.as-enable-search .absol-search-text-input\r\n{\r\n    visibility: visible;\r\n}\r\n\r\n.am-dropdown-box-header {\r\n    height: calc(2em + 10px);\r\n    display: block;\r\n    white-space: nowrap;\r\n    box-sizing: border-box;\r\n    padding-top: 5px;\r\n    padding-bottom: 5px;\r\n    padding-left: 10px;\r\n    border-bottom: solid 1px #dddddd;\r\n}\r\n\r\n.am-dropdown-box-header .absol-search-text-input {\r\n    display: inline-block;\r\n    width: calc(100% - 2em - 18px);\r\n    vertical-align: middle;\r\n    box-sizing: border-box;\r\n    background-color: white;\r\n    visibility: hidden;\r\n}\r\n\r\n.am-dropdown-box-close-btn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    border-radius: 50%;\r\n    padding: 0;\r\n    height: 2em;\r\n    width: 2em;\r\n    font-size: inherit;\r\n    border: none;\r\n    outline: none;\r\n    margin-left: 10px;\r\n    background-color: rgb(255, 255, 255);\r\n    color: #7a7a7a;\r\n    white-space: nowrap;\r\n}\r\n\r\n.am-dropdown-box-close-btn span {\r\n    font-size: 1.5em;\r\n}\r\n\r\n.am-dropdown-box-close-btn:active {\r\n    background-color: rgba(169, 169, 172, 0.3);\r\n}\r\n\r\n.am-dropdown-box-item {\r\n    border-bottom: 1px solid #efefef;\r\n}\r\n", ""]);



/***/ }),

/***/ 36485:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "\r\n.absol-drop-panel-head {\r\n    height: 2.75em;\r\n    line-height: 2.75em;\r\n    -webkit-box-shadow: 0px 3px 4px -3px rgba(0, 0, 0, 0.75);\r\n    -moz-box-shadow: 0px 3px 4px -3px rgba(0, 0, 0, 0.75);\r\n    box-shadow: 0px 3px 4px -3px rgba(0, 0, 0, 0.75);\r\n    background-color: rgba(240, 240, 242);\r\n    color: black;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n}\r\n\r\n.absol-drop-panel-head .toggler-ico path {\r\n    fill: rgb(104, 104, 104);\r\n}\r\n\r\n\r\n.dark .absol-drop-panel-head {\r\n    background-color: rgba(54, 54, 56);\r\n    color: rgb(204, 204, 204);\r\n}\r\n\r\n.absol-drop-panel.show .absol-drop-panel-body {\r\n    height:auto;\r\n}\r\n\r\n.absol-drop-panel-body {\r\n    transition: height 0.2s;\r\n    height: 0;\r\n    overflow-x: hidden;\r\n    overflow-y: auto;\r\n}\r\n\r\n\r\n.absol-drop-panel.show>.absol-drop-panel-head  .toggle-close{\r\n    display: none;\r\n}\r\n\r\n.absol-drop-panel:not(.show)>.absol-drop-panel-head  .toggle-open{\r\n    display: none;\r\n}\r\n\r\n", ""]);



/***/ }),

/***/ 40468:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-drop-zone {\r\n}", ""]);



/***/ }),

/***/ 94492:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-dual-select-box {\r\n\r\n}\r\n\r\n\r\n.am-dual-select-box .absol-selectlist-item span {\r\n    white-space: normal;\r\n    display: inline-block;\r\n    margin-right: 0;\r\n    line-height: calc(30rem / 14);\r\n}\r\n\r\n.am-mobile-theme.bsc-white .am-dual-select-box .absol-selectlist-item span{\r\n    line-height: calc(30rem / 14);\r\n}\r\n\r\n.am-dual-select-box .absol-selectlist-item {\r\n    height: auto;\r\n}\r\n\r\n.am-mobile-theme.bsc-white .am-dual-select-box .absol-selectlist-item {\r\n    height: auto;\r\n}\r\n\r\n.am-dual-select-box .absol-selectlist-item:not(:last-child) {\r\n    border-bottom: 1px solid #efefef;\r\n}", ""]);



/***/ }),

/***/ 4487:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-dual-select-box {\r\n    -webkit-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    -moz-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    --max-height: 70vh;\r\n    box-sizing: border-box;\r\n    --dual-list-estimate-width: 0;\r\n    width: var(--dual-list-estimate-width);\r\n    z-index: 10000000;\r\n    background-color: white;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    font-size: 1rem;\r\n\r\n}\r\n\r\n.as-dual-select-box-search-ctn {\r\n    padding: 5px;\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n}\r\n\r\n.as-dual-select-box.as-enable-search.as-anchor-6 .as-dual-select-box-search-ctn,\r\n.as-dual-select-box.as-enable-search.as-anchor-5 .as-dual-select-box-search-ctn {\r\n    bottom: 0;\r\n}\r\n\r\n.as-dual-select-box.as-enable-search.as-anchor-6,\r\n.as-dual-select-box.as-enable-search.as-anchor-5 {\r\n    padding-bottom: calc(2rem + 10px);\r\n}\r\n\r\n.as-dual-select-box.as-enable-search.as-anchor-1,\r\n.as-dual-select-box.as-enable-search.as-anchor-2 {\r\n    padding-top: calc(2rem + 10px);\r\n}\r\n\r\n.as-dual-select-box.as-enable-search.as-anchor-1 .as-dual-select-box-search-ctn,\r\n.as-dual-select-box.as-enable-search.as-anchor-2 .as-dual-select-box-search-ctn {\r\n    top: 0;\r\n}\r\n\r\n\r\n.as-dual-select-box-list-ctn {\r\n    white-space: nowrap;\r\n    display: flex;\r\n    align-items: stretch;\r\n}\r\n\r\n.as-dual-select-box:not(.as-enable-search) .as-dual-select-box-search-ctn {\r\n    display: none;\r\n}\r\n\r\n.as-dual-select-box-list {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    max-height: calc(var(--max-height) - 2em - 2em - 11px);\r\n    overflow-y: auto;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-dual-select-box.as-enable-search .as-dual-select-box-list {\r\n    max-height: calc(var(--max-height) - 6rem - 11px);\r\n}\r\n\r\n.as-dual-select-box-arrow-ctn {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n}\r\n\r\n.as-dual-select-box-arrow-ctn::before,\r\n.as-dual-select-box-arrow-ctn span {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-dual-select-box-arrow-ctn::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n\r\n.as-dual-select-box-list:first-child {\r\n    border-right: solid 1px #dddddd;\r\n}\r\n\r\n\r\n.as-dual-select-box-list:last-child {\r\n    border-left: solid 1px #dddddd;\r\n    flex-grow: 1;\r\n}\r\n\r\n.as-dual-select-menu.absol-selectmenu {\r\n    min-width: calc(var(--dual-list-estimate-text-width) + 5.5em);\r\n    --dual-list-estimate-text-width: 20px;\r\n}\r\n\r\n\r\n.am-dual-select-menu .absol-selectmenu-holder-item{\r\n    position: relative;\r\n    height: 100%;\r\n    top: unset;\r\n    bottom: unset;\r\n}\r\n\r\n.am-dual-select-menu{\r\n    width: auto;\r\n}", ""]);



/***/ }),

/***/ 48367:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-dv-exp-tree {\r\n\r\n}\r\n\r\n.as-dv-exp-tree > .absol-exp-node > .absol-exp-node-level {\r\n}\r\n\r\n.as-dv-exp-tree > .absol-exp-node > .absol-radio-button {\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n    margin-right: 5px;\r\n    /*margin-left: 5px;*/\r\n}\r\n\r\n\r\n.as-dv-exp-tree:not(.as-has-radio) > .absol-exp-node > .absol-radio-button {\r\n    /*visibility: hidden;*/\r\n    display: none;\r\n}\r\n\r\n\r\n.as-dv-exp-tree > .absol-exp-node > .as-dv-exp-tree-index {\r\n    box-sizing: border-box;\r\n    padding: 0 0 0 0.5em;\r\n    margin-left: 0.5em;\r\n    outline: none;\r\n    height: 1.2em;\r\n    min-width: 3em;\r\n    box-shadow: 0 0  0 1px #dddddd;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    background-color: white;\r\n}\r\n\r\n.as-dv-exp-tree > .absol-exp-node > .as-dv-exp-tree-index:hover{\r\n    box-shadow: 0 0  0 1px #aaaaaa;\r\n}\r\n\r\n.as-dv-exp-tree:not(.as-has-index-input) > .absol-exp-node > .as-dv-exp-tree-index {\r\n    display: none;\r\n}\r\n\r\n/*.as-dv-exp-tree>.absol-exp-node:not(.status-open):not(.status-close)>.toggler-ico{*/\r\n/*    display: none;*/\r\n/*}*/\r\n\r\n/*.as-dv-exp-tree .absol-exp-node-ext-icon{*/\r\n/*    display: none;*/\r\n/*}*/", ""]);



/***/ }),

/***/ 70131:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --table-row-height: 40px;\r\n}\r\n\r\n\r\n.as-efficient-table-wrapper {\r\n    box-sizing: border-box;\r\n    position: relative;\r\n    overflow: hidden;\r\n    overflow-anchor: none !important;\r\n    scroll-snap-stop: normal !important;\r\n    overscroll-behavior: unset !important;\r\n    scroll-behavior: unset !important;\r\n}\r\n\r\n.as-efficient-table-wrapper > .as-dynamic-table {\r\n    position: relative;\r\n    table-layout: auto;\r\n}\r\n\r\n.as-efficient-table-wrapper.as-headless .as-dynamic-table {\r\n    table-layout: fixed;\r\n}\r\n\r\n\r\n.as-dynamic-table-wrapper {\r\n    --dt-content-height: 0px;\r\n    --dt-scroll-bar-width: 17px;\r\n    --dt-content-width: 0;\r\n    --dt-header-height: 0;\r\n    --dt-fixed-x-width: 0;\r\n    --dt-dragging-row-height: 0;\r\n    position: relative;\r\n\r\n    /*padding-right: 17px;*/\r\n    /*padding-bottom: 17px;*/\r\n    box-sizing: border-box;\r\n    height: calc(var(--dt-content-height) + 1px);\r\n    overflow: hidden;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-width-match-parent {\r\n\r\n}\r\n\r\n\r\n.as-dynamic-table-wrapper.as-table-layout-fixed table.as-dynamic-table {\r\n    table-layout: fixed;\r\n}\r\n\r\ntd .as-dynamic-table-wrapper .as-dt-header-cell {\r\n    --as-force-min-width: 0;\r\n}\r\n\r\n.as-dynamic-table-wrapper .as-dt-header-cell.as-col-width-auto::before { /*table in table bug*/\r\n    content: \"\";\r\n    display: block;\r\n    width: var(--as-force-min-width);\r\n}\r\n\r\n\r\n.as-dynamic-table-wrapper.as-inline {\r\n    max-width: calc(var(--dt-content-width) + var(--dt-scroll-bar-width));\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-overflow-x.as-has-fixed-col .as-dynamic-table-viewport::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    top: 0;\r\n    bottom: 0;\r\n    border-right: 2px solid #aaa;\r\n    left: calc(var(--dt-fixed-x-width) - 1px);\r\n    z-index: 20;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-overflow-y .as-dynamic-table-viewport::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: 0;\r\n    width: 100%;\r\n    max-width: var(--dt-content-width);\r\n    border-top: 2px solid #aaa;\r\n    top: calc(var(--dt-header-height) - 1px);\r\n    z-index: 20;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-has-fixed-col {\r\n    max-width: var(--dt-content-width);\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-has-fixed-col.as-overflow-y {\r\n    max-width: calc(var(--dt-content-width) + var(--dt-scroll-bar-width));\r\n}\r\n\r\n\r\n.as-dynamic-table-wrapper.as-inline {\r\n}\r\n\r\n\r\n.as-dynamic-table-wrapper.as-overflow-x {\r\n    padding-bottom: var(--dt-scroll-bar-width);\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-overflow-x {\r\n    height: calc(var(--dt-content-height) + var(--dt-scroll-bar-width));\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-overflow-x .as-dynamic-table-hb,\r\n.as-dynamic-table-wrapper.as-overflow-y .as-dynamic-table-vb {\r\n    display: block;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-overflow-y {\r\n    padding-right: var(--dt-scroll-bar-width);\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-overflow-y.as-width-auto {\r\n    /*max-width: calc(var(--dt-content-width) + var(--dt-scroll-bar-width)); disable for resizer testing*/\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-overflow-y.as-has-fixed-col,\r\n.as-dynamic-table-wrapper.as-overflow-y:not(.as-width-match-parent) {\r\n    /*max-width: calc(var(--dt-content-width) + var(--dt-scroll-bar-width));*/\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-adapt-infinity-grow.as-auto-height {\r\n    height: calc(var(--dt-content-height) + 1px) !important;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-adapt-infinity-grow {\r\n    max-height: unset !important;\r\n}\r\n\r\n\r\n.as-dynamic-table-viewport {\r\n    width: 100%;\r\n    height: 100%;\r\n    overflow: hidden;\r\n    position: relative;\r\n}\r\n\r\n\r\n.as-dynamic-table.as-dt-fixed-y,\r\n.as-dynamic-table.as-fixed-x {\r\n    table-layout: fixed;\r\n    width: auto;\r\n    /*display: inline-block;*/\r\n}\r\n\r\n.as-dynamic-table-fixed-x-ctn {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    z-index: 6;\r\n    display: none;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-has-fixed-col .as-dynamic-table-fixed-x-ctn {\r\n    display: block;\r\n}\r\n\r\n.as-dynamic-table-fixed-xy-ctn {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    z-index: 9;\r\n}\r\n\r\n\r\n.as-dynamic-table-fixed-y-ctn {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    z-index: 6;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-headless .as-dynamic-table-fixed-x-ctn,\r\n.as-dynamic-table-wrapper.as-headless .as-dynamic-table-fixed-y-ctn,\r\n.as-dynamic-table-wrapper.as-headless .as-dynamic-table-fixed-xy-ctn {\r\n    visibility: hidden;\r\n}\r\n\r\n.as-dynamic-table-space {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n}\r\n\r\n.as-dynamic-table-space > table {\r\n    vertical-align: top;\r\n}\r\n\r\n\r\n.as-dynamic-table-wrapper.as-has-fixed-col .as-dynamic-table-space,\r\n.as-dynamic-table-wrapper.as-inline .as-dynamic-table-space {\r\n    width: 8096px;\r\n}\r\n\r\n\r\n.as-dynamic-table-vb {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    height: 100%;\r\n    width: var(--dt-scroll-bar-width);\r\n    display: none;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-overflow-x .as-dynamic-table-vb {\r\n    height: calc(100% - var(--dt-scroll-bar-width));\r\n}\r\n\r\n.as-dynamic-table-hb {\r\n    position: absolute;\r\n    left: 0;\r\n    bottom: 0;\r\n    width: 100%;\r\n    height: var(--dt-scroll-bar-width);\r\n    display: none;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-overflow-y .as-dynamic-table-hb {\r\n    width: calc(100% - var(--dt-scroll-bar-width));\r\n}\r\n\r\n\r\n.as-dynamic-table-wrapper.as-no-paging .absol-page-selector {\r\n    display: none;\r\n}\r\n\r\n.as-dynamic-table-wrapper .absol-page-selector[data-page-count=\"1\"] {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-dynamic-table-fixed-x-col {\r\n    display: none;\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: auto !important;\r\n    z-index: 12;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-has-fixed-col .as-dynamic-table-fixed-x-col {\r\n    display: block;\r\n}\r\n\r\n.as-dynamic-table {\r\n    font-size: 1rem;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    border-collapse: collapse;\r\n    box-sizing: border-box;\r\n    display: inline-table;\r\n    table-layout: fixed;\r\n}\r\n\r\n\r\n.as-dynamic-table-wrapper:not(.as-inline) .as-dynamic-table-space .as-dynamic-table {\r\n    /*min-width: 100%;*/\r\n    table-layout: auto;\r\n    /*display: table;*/\r\n}\r\n\r\n.as-dt-header {\r\n    background-color: #d6d6d6;\r\n}\r\n\r\n.as-dt-header-cell {\r\n    font-weight: bold;\r\n    padding: 10px;\r\n    border: 1px solid #ababab;\r\n    position: relative;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-dt-header-cell-resizer {\r\n    position: absolute;\r\n    right: -3px;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: 6px;\r\n    /*border-right: 6px solid transparent;*/\r\n    z-index: 5;\r\n    cursor: col-resize;\r\n    /*display: none;*/\r\n}\r\n\r\n/*\r\n.as-dynamic-table-wrapper[id] .as-dt-header-cell[data-col-id] .as-dt-header-cell-resizer {\r\n    display: block;\r\n}*/\r\n\r\n.as-dt-header-cell[data-sort-key] {\r\n    padding-right: 1.75em;\r\n    cursor: pointer;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n}\r\n\r\n.as-dt-sort-btn {\r\n    display: none;\r\n    vertical-align: middle;\r\n    line-height: 1.5em;\r\n    position: absolute;\r\n    right: 0.25em;\r\n    top: calc(50% - 0.75em);\r\n    color: #a9a9a9;\r\n\r\n    height: 1.5em;\r\n    width: 1.5em;\r\n    pointer-events: none;\r\n    /*color: transparent;*/\r\n}\r\n\r\n.as-dt-header-cell[data-sort-key] .as-dt-sort-btn {\r\n    display: inline-block;\r\n}\r\n\r\n.as-dt-header-cell[data-sort-order=\"ascending\"] .as-dt-sort-btn .mdi-menu-up,\r\n.as-dt-header-cell[data-sort-order=\"descending\"] .as-dt-sort-btn .mdi-menu-down {\r\n    color: #007bff;\r\n}\r\n\r\n.as-dt-sort-btn span {\r\n    position: absolute;\r\n    display: inline-block;\r\n    left: 0;\r\n    font-size: 2em;\r\n\r\n}\r\n\r\n.as-dt-sort-btn .mdi-menu-up {\r\n    bottom: 0.18em;\r\n}\r\n\r\n\r\n.as-dt-sort-btn .mdi-menu-down {\r\n    top: 0.18em;\r\n}\r\n\r\n\r\n.as-dt-body-row:nth-child(odd) {\r\n    background-color: rgb(245, 245, 245);\r\n}\r\n\r\n.as-dt-body-row:nth-child(even) {\r\n    background-color: white;\r\n}\r\n\r\n.as-dt-body-cell {\r\n    padding: 4px 5px;\r\n    border: 1px solid #ddd;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-dt-body-row .as-drag-zone{\r\n    user-select: none;\r\n}\r\n\r\n.as-dt-body-row .as-drag-zone .mdi,\r\n.as-tree-table-row .as-drag-zone .mdi {\r\n    font-size: 25px;\r\n}\r\n\r\n\r\n.as-dt-body-row {\r\n    height: calc(40em / 14);\r\n}\r\n\r\n.as-dt-body-row {\r\n    height: var(--table-row-height);\r\n}\r\n\r\n.as-dynamic-table-wrapper:not(.as-searching) .as-dt-body-row .as-drag-zone,\r\n.as-tree-table:not(.as-searching) .as-tree-table-row .as-drag-zone {\r\n    cursor: move;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-row-dragging .as-dt-body-row {\r\n    transition: transform 0.2s;\r\n}\r\n\r\n.as-dt-body-row.as-dragging {\r\n    opacity: 0.0;\r\n    /*position: relative;*/\r\n    /*z-index: 1000000;*/\r\n\r\n    /*opacity: 0.8;*/\r\n}\r\n\r\n\r\n.as-dt-body-row.as-after-dragging {\r\n\r\n}\r\n\r\n\r\n.as-dt-body-row-cloned-ctn {\r\n    position: fixed;\r\n    cursor: move;\r\n    opacity: 0.7;\r\n    -webkit-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    -moz-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n\r\n}\r\n\r\n.as-dt-body-row-cloned-ctn > table {\r\n    display: block;\r\n}\r\n\r\n.as-dt-body-row.as-drag-neighbor {\r\n    position: relative;\r\n    z-index: 1;\r\n    transition: transform 0.05s;\r\n\r\n}\r\n\r\n.as-dt-body-row.as-dragging.as-homing {\r\n    transition: transform 0.06s;\r\n}\r\n\r\n\r\n.as-dynamic-table-wrapper.as-searching .as-drag-zone {\r\n    opacity: 0.3;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-dynamic-table-wrapper .as-drag-zone {\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n}\r\n\r\n.as-dt-insert-line {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    border-top: 2px solid blue;\r\n}\r\n\r\n.as-dt-body-cell > .absol-checkbox:last-child:first-child {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-dt-row-index::before {\r\n    content: attr(data-idx);\r\n}\r\n\r\n.as-dt-row-index:not([data-idx])::before {\r\n    content: \"000\";\r\n}\r\n\r\n\r\n.as-dynamic-table-wrapper.as-no-graphic .as-dt-header-cell,\r\n.as-dynamic-table-wrapper.as-no-graphic .as-dt-body-cell {\r\n    border: none;\r\n}\r\n\r\n.as-dynamic-table-wrapper.as-no-graphic .as-dt-header,\r\n.as-dynamic-table-wrapper.as-no-graphic .as-dt-body-row {\r\n    background-color: transparent;\r\n}\r\n\r\n\r\n.absol-single-page-scroller-viewport .as-dynamic-table-wrapper:not(.as-adapt-infinity-grow) {\r\n    max-height: calc(var(--single-page-scroller-height) - 2px);\r\n}\r\n\r\n.absol-single-page-scroller-viewport > div:last-child .as-dynamic-table-wrapper:not(.as-adapt-infinity-grow) {\r\n    max-height: calc(var(--single-page-scroller-height) - 2px);\r\n}\r\n\r\n\r\n.as-dynamic-table-wrapper tr.as-dragged,\r\n.as-dynamic-table-wrapper tr.as-dragging{\r\n    background-color: #FFF9C4;\r\n}\r\n\r\n/*.absol-single-page-scroller-viewport > div:last-child .as-dynamic-table-wrapper.as-overflow-y:not(.as-adapt-infinity-grow) {*/\r\n/*    max-height: calc(var(--single-page-scroller-height) - 2px);*/\r\n/*} try remove this*/\r\n\r\n\r\n/*Keeview modal*/\r\nbody > div > table .as-dynamic-table-wrapper {\r\n    width: var(--dt-content-width);\r\n    max-width: calc(90vw - 50px);\r\n}\r\n\r\nbody > div > table .as-dynamic-table-wrapper.as-overflow-y {\r\n    width: calc(var(--dt-content-width) + var(--dt-scroll-bar-width));\r\n    max-width: calc(90vw - 50px);\r\n}\r\n\r\n/*.as-dynamic-table-wrapper*/\r\n\r\n", ""]);



/***/ }),

/***/ 34854:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "\r\n.absol-editabe-text {\r\n    display: inline;\r\n}\r\n\r\n.absol-editabe-text span {\r\n    font-style: inherit;\r\n    font-size: inherit;\r\n    white-space: pre;\r\n}\r\n\r\n.absol-editabe-text-higne {\r\n    display: inline-block;\r\n    position: relative;\r\n    width: 0px;\r\n    height: 0ox;\r\n}\r\n\r\n.absol-editabe-text-higne input {\r\n    position: absolute;\r\n    display: none;\r\n    border: none;\r\n    top: -2;\r\n    left: -2;\r\n    padding-top: 0px;\r\n    padding-left: 2px;\r\n    padding-bottom: 4px;\r\n    margin: 0;\r\n    background: transparent;\r\n    outline: none;\r\n    font-style: inherit;\r\n    font-size: inherit;\r\n}\r\n\r\n.absol-editabe-text.editing .absol-editabe-text-higne input {\r\n    display: block;\r\n}\r\n\r\n.absol-editabe-text.editing span {\r\n    visibility: hidden;\r\n}\r\n\r\n.absol-editabe-text.editing {\r\n    -webkit-box-shadow: 0px 0px 2px 0px rgba(33, 77, 255, 1);\r\n    -moz-box-shadow: 0px 0px 2px 0px rgba(33, 77, 255, 1);\r\n    box-shadow: 0px 0px 2px 0px rgba(33, 77, 255, 1);\r\n    border-radius: 0.17em;\r\n}\r\n", ""]);



/***/ }),

/***/ 35593:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-emoji-counter {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    color: rgb(38, 141, 145);\r\n    box-sizing: border-box;\r\n    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);\r\n    height:  calc(2rem + 2px);\r\n    text-align: center;\r\n    min-height:  calc(2rem + 2px);\r\n    padding: 0 8px;\r\n    border-radius: calc(1rem + 1px);\r\n    font-size: 1rem;\r\n    background-color: white;\r\n    outline: none;\r\n}\r\n\r\n.as-emoji-counter::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.as-emoji-counter-sprite {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: 1.285em;\r\n    height:  1.285em;\r\n}\r\n\r\n.as-emoji-counter-num {\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    margin-left: 0.2em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-size: inherit;\r\n    color: inherit;\r\n    cursor: default;\r\n}\r\n\r\n.as-emoji-counter-num:empty {\r\n    display: none;\r\n}\r\n\r\n.as-emoji-counter.as-zero {\r\n    background-color: rgba(220, 220, 220);\r\n}\r\n\r\n.as-emoji-counter + .as-emoji-counter {\r\n    margin-left: 0.3em;\r\n}", ""]);



/***/ }),

/***/ 5543:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-emoji-picker {\r\n    font-size: calc(12em / 14);\r\n    border: 1px solid #dddddd;\r\n    box-sizing: border-box;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.as-emoji-picker-preview {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    width: 5.7em;\r\n    height: calc(8em + 30px);\r\n    border-right: 1px solid #dddddd;\r\n    text-align: center;\r\n\r\n}\r\n\r\n\r\n.as-emoji-picker-preview-anim {\r\n    width: 60px;\r\n    height: 60px;\r\n    margin-top: 5px;\r\n}\r\n\r\n.as-emoji-picker-preview-desc {\r\n    font-size: 12px;\r\n    font-weight: bold;\r\n    color: black;\r\n}\r\n\r\n.as-emoji-picker-preview-shortcut {\r\n    font-size: 12px;\r\n    color: rgb(70, 70, 70);\r\n}\r\n\r\n\r\n.as-emoji-picker-list {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    overflow-y: auto;\r\n    width: calc(100% - 5.7em - 1px);\r\n    height: calc(8em + 30px);\r\n    padding: 5px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.as-emoji-picker-item {\r\n    display: inline-block;\r\n    padding: 5px;\r\n    width: 2em;\r\n    height: 2em;\r\n    box-sizing: border-box;\r\n    border-radius: 0.4em;\r\n}\r\n\r\n.as-emoji-picker-item:hover {\r\n    background-color: rgba(169, 169, 170, 0.3);\r\n}\r\n\r\n.as-emoji-picker-item:active {\r\n    background-color: rgba(169, 169, 170, 0.7);\r\n}", ""]);



/***/ }),

/***/ 47110:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-emoji-picker-tooltip {\r\n    --tool-tip-background-color: white;\r\n    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));\r\n}\r\n\r\n.as-emoji-picker-tooltip .absol-tooltip-content {\r\n    display: block;\r\n    padding: 0;\r\n    box-sizing: border-box;\r\n    position: relative;\r\n    white-space: nowrap;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-emoji-picker-tooltip-left-btn,\r\n.as-emoji-picker-tooltip-right-btn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 60px;\r\n    width: 40px;\r\n    font-size: 25px;\r\n    padding: 0;\r\n    background-color: transparent;\r\n    border: none;\r\n    color: rgb(155, 155, 175);\r\n    outline: none;\r\n}\r\n\r\n.as-emoji-picker-tooltip-left-btn:hover,\r\n.as-emoji-picker-tooltip-right-btn:hover {\r\n    background-color: rgba(156, 156, 156, 0.15);\r\n}\r\n\r\n.as-emoji-picker-tooltip-left-btn:active,\r\n.as-emoji-picker-tooltip-right-btn:active {\r\n    background-color: rgba(0, 0, 0, 0.15);\r\n}\r\n\r\n.as-emoji-picker-tooltip-left-btn:disabled,\r\n.as-emoji-picker-tooltip-right-btn:disabled {\r\n    pointer-events: none;\r\n    color: rgb(230, 230, 235);\r\n}\r\n\r\n.as-emoji-picker-tooltip-scroller {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    position: relative;\r\n    width: 360px;\r\n    height: 60px;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-emoji-picker-tooltip-icon-list {\r\n    position: absolute;\r\n    top: 0;\r\n    bottom: 0;\r\n    left: 0;\r\n    white-space: nowrap;\r\n}\r\n\r\n\r\n.as-emoji-picker-tooltip:not(.as-scrolling) .as-emoji-picker-tooltip-icon-list {\r\n    transition: left 0.5s;\r\n}\r\n\r\n.as-emoji-picker-tooltip-icon-btn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 60px;\r\n    width: 60px;\r\n    padding: 0;\r\n    border: none;\r\n    outline: none;\r\n    background-color: transparent;\r\n}\r\n\r\n\r\n.as-emoji-picker-tooltip-icon {\r\n    transition: width 0.3s, height 0.3s;\r\n    width: 35px;\r\n    height: 35px;\r\n}\r\n\r\n.as-emoji-picker-tooltip-icon-btn:hover .as-emoji-picker-tooltip-icon {\r\n    width: 45px;\r\n    height: 45px;\r\n}\r\n\r\n.as-emoji-picker-tooltip-remove-btn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 60px;\r\n    width: 60px;\r\n    padding: 0;\r\n    border: none;\r\n    outline: none;\r\n    background-color: transparent;\r\n    font-size: 40px;\r\n    color: rgb(185, 185, 185);\r\n}\r\n\r\n.as-emoji-picker-tooltip-remove-btn:hover {\r\n    color: rgb(255, 30, 30);\r\n}\r\n\r\n\r\n.as-emoji-picker-tooltip:not(.as-mobile) .as-emoji-picker-tooltip-page-indicator {\r\n    display: none;\r\n}\r\n\r\n.as-emoji-picker-tooltip.as-mobile .as-emoji-picker-tooltip-right-btn,\r\n.as-emoji-picker-tooltip.as-mobile .as-emoji-picker-tooltip-left-btn {\r\n    display: none;\r\n}\r\n\r\n\r\n@media (max-width: 410px) and (min-width: 310px) {\r\n    .as-emoji-picker-tooltip-left-btn,\r\n    .as-emoji-picker-tooltip-right-btn {\r\n        height: 36px;\r\n        width: 24px;\r\n        font-size: 15px;\r\n    }\r\n\r\n    .as-emoji-picker-tooltip-scroller {\r\n        width: 216px;\r\n        height: 36px;\r\n    }\r\n\r\n    .as-emoji-picker-tooltip-icon-btn {\r\n        height: 36px;\r\n        width: 36px;\r\n    }\r\n\r\n\r\n    .as-emoji-picker-tooltip-icon {\r\n        width: 21px;\r\n        height: 21px;\r\n    }\r\n\r\n    .as-emoji-picker-tooltip-icon-btn:hover .as-emoji-picker-tooltip-icon {\r\n        width: 27px;\r\n        height: 27px;\r\n    }\r\n\r\n    .as-emoji-picker-tooltip-remove-btn {\r\n        height: 36px;\r\n        width: 36px;\r\n        font-size: 24px;\r\n    }\r\n}\r\n\r\n@media (max-width: 510px) and (min-width: 410px) {\r\n    .as-emoji-picker-tooltip-left-btn,\r\n    .as-emoji-picker-tooltip-right-btn {\r\n        height: 48px;\r\n        width: 32px;\r\n        font-size: 20px;\r\n    }\r\n\r\n\r\n    .as-emoji-picker-tooltip-scroller {\r\n        width: 288px;\r\n        height: 48px;\r\n    }\r\n\r\n\r\n    .as-emoji-picker-tooltip-icon-btn {\r\n        height: 48px;\r\n        width: 48px;\r\n    }\r\n\r\n\r\n    .as-emoji-picker-tooltip-icon {\r\n        width: 28px;\r\n        height: 28px;\r\n    }\r\n\r\n    .as-emoji-picker-tooltip-icon-btn:hover .as-emoji-picker-tooltip-icon {\r\n        width: 36px;\r\n        height: 36px;\r\n    }\r\n\r\n    .as-emoji-picker-tooltip-remove-btn {\r\n        height: 48px;\r\n        width: 48px;\r\n        font-size: 32px;\r\n    }\r\n}", ""]);



/***/ }),

/***/ 67691:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-emoji-user-list-tooltip {\r\n    --tool-tip-background-color: white;\r\n    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));\r\n    text-align: left;\r\n}\r\n\r\n\r\n.as-emoji-user-list-tooltip-emoji {\r\n    position: absolute;\r\n    width: 60px;\r\n    height: 60px;\r\n    top: -30px;\r\n    left: calc(50% - 30px);\r\n    z-index: 2;\r\n\r\n}\r\n\r\n.as-emoji-user-list-tooltip .absol-tooltip-content {\r\n    min-height: 60px;\r\n    min-width: 120px;\r\n    padding-top: 25px;\r\n}\r\n\r\n.as-emoji-user-list-tooltip-user{\r\n    padding: 3px  10px 3px 0 ;\r\n}\r\n\r\n.as-emoji-user-list-tooltip-user.as-clickable{\r\n    cursor: pointer;\r\n}\r\n\r\n.as-emoji-user-list-tooltip-avatar {\r\n    width: 30px;\r\n    height: 30px;\r\n    border-radius: 50%;\r\n    background-size: cover;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-emoji-user-list-tooltip-name {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    margin-left: 10px;\r\n    color: rgb(70, 70, 72);\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n}", ""]);



/***/ }),

/***/ 49931:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "/*.as-expression-input {*/\r\n/*    box-sizing: border-box;*/\r\n/*    border: 1px solid var(--as-input-border-color);*/\r\n/*    min-height: var(--as-input-height);*/\r\n\r\n/*}*/\r\n\r\n/*.as-expression-input-content {*/\r\n/*    font-size: 14px;*/\r\n/*    line-height: 2;*/\r\n/*    min-height: 2em;*/\r\n/*}*/\r\n\r\n/*.as-expression-input-content::before{*/\r\n/*    content: \"=\";*/\r\n/*    color: #aaaaaa;*/\r\n/*    display: inline-block;*/\r\n/*    height: 28px;*/\r\n/*    vertical-align: middle;*/\r\n/*    padding: 0 5px;*/\r\n/*}*/\r\n\r\n/*.asei-identifier{*/\r\n/*    display: inline-block;*/\r\n/*}*/\r\n\r\n\r\n.as-expression-input {\r\n    font-family: Consolas, monospace;\r\n    border-color: var(--as-input-border-color);\r\n    border-style: solid;\r\n    box-sizing: border-box;\r\n    border-width: 1px;\r\n    border-radius: var(--as-input-border-radius);\r\n    font-size: 14px;\r\n    position: relative;\r\n    line-height: 2;\r\n    background-color: white;\r\n}\r\n\r\n.as-expression-input.as-disabled {\r\n    background-color: var(--as-disabled-background-color);\r\n    color: var(--as-disabled-text-color);\r\n    pointer-events: none;\r\n}\r\n\r\n.as-expression-input.as-border-none {\r\n    border: none;\r\n}\r\n\r\n.as-expression-input:not(.as-read-only):not(.as-disabled){\r\n    user-select: none;\r\n}\r\n\r\n.as-expression-input-range-ctn {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    z-index: 9;\r\n    pointer-events: none;\r\n}\r\n\r\n\r\n.as-expression-input-range {\r\n    position: absolute;\r\n    background-color: rgba(19, 176, 233, 0.4);\r\n}\r\n\r\n\r\n.as-expression-input-content {\r\n    min-height: 28px;\r\n    outline: none;\r\n    line-height: inherit;\r\n    white-space: pre-wrap;\r\n    padding-left: var(--as-input-horizontal-padding);\r\n}\r\n\r\n.as-expression-input-range-ctn {\r\n    left: var(--as-input-horizontal-padding);\r\n\r\n}\r\n\r\n.as-expression-input.as-has-icon .as-expression-input-content {\r\n    padding-left: calc(18px + var(--as-input-horizontal-padding));\r\n}\r\n\r\n.as-expression-input.as-has-icon .as-expression-input-range-ctn {\r\n    left: calc(18px + var(--as-input-horizontal-padding));\r\n}\r\n\r\n\r\n.as-expression-input-content .as-token[data-type=\"number\"] {\r\n    color: #0289f6;\r\n}\r\n\r\n.as-expression-input-content .as-token[data-type=\"string\"] {\r\n    color: darkgreen;\r\n}\r\n\r\n\r\n.as-expression-input-content .as-token[data-ex-type=\"boolean\"] {\r\n    color: #f6a128;\r\n}\r\n\r\n\r\n.as-expression-input-content .as-token[data-ex-type=\"function\"] {\r\n    color: #2419c8\r\n}\r\n\r\n.as-expression-input-icon-ctn {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    pointer-events: none;\r\n    font-size: 1.5em;\r\n    line-height: 28px;\r\n    display: none;\r\n}\r\n\r\n\r\n.as-expression-input.as-has-icon .as-expression-input-icon-ctn {\r\n    display: block;\r\n}\r\n\r\n.as-expression-input-icon-ctn .mdi-equal {\r\n    color: rgba(169, 169, 170);\r\n}\r\n\r\n.as-expression-input-icon-ctn .mdi-alert-circle {\r\n    color: red;\r\n    opacity: 0.8;\r\n    display: none;\r\n}\r\n\r\n\r\n.as-expression-input.as-error .as-expression-input-icon-ctn .mdi-alert-circle {\r\n    display: inline-block;\r\n}\r\n\r\n.as-expression-input.as-error .as-expression-input-icon-ctn .mdi-equal {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-token.as-unexpected-token {\r\n    background-color: red;\r\n    animation-name: error_blink;\r\n    animation-duration: 1s;\r\n    animation-iteration-count: infinite;\r\n}\r\n\r\n.as-expression-input-autocomplete {\r\n    min-width: 10em;\r\n    position: fixed;\r\n    z-index: 1000;\r\n}\r\n\r\n.as-expression-input-autocomplete .absol-selectlist-item {\r\n    padding-right: 0.3em;\r\n}\r\n\r\n.as-ei-suggestion-list-item {\r\n    --level: 0;\r\n    height: 30px;\r\n    padding-right: 1em;\r\n    min-width: 10em;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-ei-suggestion-list-item:hover {\r\n    background-color: var(--as-list-item-hover-background-color);\r\n}\r\n\r\n.as-ei-suggestion-list-item.as-selected {\r\n    background-color: var(--as-list-item-selected-background-color);\r\n}\r\n\r\n\r\n.as-ei-suggestion-list-item::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n.as-ei-suggestion-list-item > *,\r\n.as-ei-suggestion-list-item::before\r\n{\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-ei-suggestion-list-item:not(.as-status-open):not(.as-status-close)  .as-eisli-toggler{\r\n    visibility: hidden;\r\n}\r\n\r\n.as-ei-suggestion-list-item.as-status-open .toggle-close,\r\n.as-ei-suggestion-list-item.as-status-close .toggle-open\r\n{\r\n    display: none;\r\n}\r\n\r\n\r\n\r\n.as-eisli-toggler {\r\n    text-align: right;\r\n    width: calc(1em * var(--level) + 1.5em);\r\n    padding-right: 0.5em;\r\n}\r\n\r\n.as-ei-suggestion-list {\r\n    max-height: calc(100vh - 100px);\r\n    overflow-y:auto ;\r\n}\r\n\r\n.as-ei-suggestion-list .mdi {\r\n    width: 30px;\r\n    text-align: center;\r\n    font-size: 1em;\r\n}\r\n\r\n.as-ei-suggestion-list .mdi.mdi-function {\r\n    color: #2419c8;\r\n}\r\n\r\n.as-ei-suggestion-list .mdi.mdi-variable {\r\n    color: #5b5d42;\r\n}\r\n\r\n.as-ei-suggestion-list .am-select-tree-leaf-item-icon-ctn {\r\n    left: calc(2em * var(--level) - 14px)\r\n}\r\n\r\n.as-expression-input-real-input {\r\n    position: absolute;\r\n    z-index: 10;\r\n    right: 0;\r\n    top: 0;\r\n    width: 100px;\r\n    height: 100px;\r\n    opacity: 0.5;\r\n    /*visibility: hidden;*/\r\n}\r\n\r\n.as-expression-input-foreground {\r\n    position: absolute;\r\n    z-index: 8;\r\n    top: 0;\r\n    left: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n\r\n}\r\n\r\n.as-ei-command-tool {\r\n    background: white;\r\n    border: 1px solid #e0e0e0;\r\n    border-radius: 3px;\r\n    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\r\n    padding: 0 3px;\r\n    box-sizing: border-box;\r\n    height: 31px;\r\n}\r\n\r\n.as-ei-command-tool::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.as-ei-command-tool button {\r\n    font-size: 14px;\r\n    width: 25px;\r\n    height: 25px;\r\n    padding: 0;\r\n    box-sizing: border-box;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-ei-command-tool button:hover {\r\n    background-color: #f0f0f0;\r\n}\r\n\r\n.as-ei-command-tool button:not(:last-child) {\r\n    margin-right: 3px;\r\n}\r\n\r\n@keyframes error_blink {\r\n    0% {\r\n        background-color: red\r\n    }\r\n    50% {\r\n        background-color: transparent\r\n    }\r\n    100% {\r\n        background-color: red\r\n    }\r\n}", ""]);



/***/ }),

/***/ 82375:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-exp-node {\r\n    height: 2em;\r\n    text-align: left;\r\n    background-color: transparent;\r\n    border: none;\r\n    outline: none;\r\n    white-space: nowrap;\r\n    font-size: inherit;\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n    position: relative;\r\n    color: rgb(33, 33, 34);\r\n}\r\n\r\n.absol-exp-node .toggler-ico {\r\n    width: 0.7em;\r\n    height: 0.7em;\r\n    margin-right: 0.35em;\r\n}\r\n\r\n.absol-exp-node .toggler-ico path {\r\n    fill: rgb(104, 104, 104);\r\n}\r\n\r\n.absol-exp-node.status-removable .toggler-ico,\r\n.absol-exp-node.status-modified .toggler-ico {\r\n    display: none;\r\n}\r\n\r\n.absol-exp-node:not(.status-open) .toggle-open {\r\n    display: none;\r\n}\r\n\r\n.absol-exp-node:not(.status-close) .toggle-close {\r\n    display: none;\r\n}\r\n\r\n\r\n\r\n.absol-exp-node:hover .remove-ico {\r\n    visibility: visible;\r\n}\r\n\r\n\r\n\r\n.absol-exp-node.status-removable .remove-ico,\r\n.absol-exp-node.status-modified .remove-ico {\r\n    display: inline-block;\r\n}\r\n\r\n.absol-exp-node.status-removable .remove-ico .modified {\r\n    visibility: hidden;\r\n}\r\n\r\n.absol-exp-node.status-modified .remove-ico .close {\r\n    visibility: hidden;\r\n}\r\n\r\n.absol-exp-node.status-modified .remove-ico:hover .close {\r\n    visibility: visible;\r\n}\r\n\r\n.absol-exp-node.status-modified .remove-ico:hover .modified {\r\n    visibility: hidden;\r\n}\r\n\r\n\r\n.absol-exp-node .remove-ico {\r\n    width: 0.9em;\r\n    height: 0.9em;\r\n    display: none;\r\n    visibility: hidden;\r\n    margin-left: -0.3em;\r\n    margin-right: 0.45em;\r\n}\r\n\r\n.absol-exp-node .remove-ico .close,\r\n.absol-exp-node .remove-ico .modified {\r\n    fill: rgb(169, 169, 169);\r\n    stroke: none;\r\n}\r\n\r\n\r\n.absol-exp-node.has-status {\r\n    padding-right: 2.5em;\r\n}\r\n\r\n.absol-exp-node>div,\r\n.absol-exp-node>svg {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.absol-exp-node .editing input {\r\n    color: khaki;\r\n    padding-top: 2px;\r\n    padding-bottom: 2px;\r\n}\r\n\r\n.absol-exp-node:hover {\r\n    background-color: var(--as-transparent-button-hover-color);\r\n}\r\n\r\n.absol-exp-node:focus,\r\n.absol-exp-node.as-active:focus {\r\n    background-color: var(--as-transparent-button-focus-color);\r\n}\r\n\r\n.absol-exp-node.as-active {\r\n    background-color: var(--as-transparent-button-active-color);\r\n}\r\n\r\n\r\n\r\n.absol-exp-node-name {\r\n    /* -webkit-touch-callout: none;\r\n    -webkit-user-select: none;\r\n    -khtml-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none; */\r\n    user-select: none;\r\n    vertical-align: middle;\r\n    color: black;\r\n    margin-left: 0.5em;\r\n}\r\n\r\n.absol-exp-node-desc {\r\n    color: rgb(104, 104, 104);\r\n    margin-left: 0.5em;\r\n    font-size: 0.85em;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.absol-exp-node-desc:empty {\r\n    margin-left: 0;\r\n}\r\n\r\n\r\n.absol-exp-node-expand-icon {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    margin-right: 0.2em;\r\n    height: 0.5em;\r\n    width: 0.5em;\r\n}\r\n\r\nimg.absol-exp-node-ext-icon {\r\n    display: none;\r\n}\r\n\r\n.absol-exp-node-ext-icon,\r\n.absol-exp-node-ext-icon>img {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: 1.5em;\r\n    height: 1.5em;\r\n}\r\n\r\ndiv.absol-exp-node-ext-icon:empty {\r\n    display: none;\r\n}\r\n\r\ndiv.absol-exp-node-ext-icon {\r\n    text-align: center;\r\n}\r\n\r\n.absol-exp-node-ext-icon>.mdi,\r\n.absol-exp-node-ext-icon>span .absol-exp-node-ext-icon>svg {\r\n    line-height: 1em;\r\n    font-size: 1.5em;\r\n}\r\n\r\nimg.absol-exp-node-ext-icon[src] {\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.absol-exp-tree>.absol-exp-node {\r\n    width: 100%;\r\n    display: block;\r\n}\r\n\r\n.absol-exp-tree.hide-children>.absol-exp-items {\r\n    display: none;\r\n}\r\n\r\n\r\n.dark .toggler-ico path {\r\n    fill: rgb(169, 169, 169);\r\n}\r\n\r\n\r\n.dark .absol-exp-node-name {\r\n    color: rgb(204, 204, 204);\r\n}\r\n\r\n.dark .absol-exp-node-desc {\r\n    color: rgb(169, 169, 170);\r\n}\r\n\r\n.dark .absol-exp-node {\r\n    color: rgb(169, 169, 170);\r\n}", ""]);



/***/ }),

/***/ 20893:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-file-input-box {\r\n    font-size: 14px;\r\n    position: relative;\r\n    width: 100px;\r\n    height: 100px;\r\n    box-sizing: border-box;\r\n    border: 1px solid #dddddd;\r\n    background-color: white;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    overflow: visible;\r\n}\r\n\r\n.as-file-input-box-trigger:hover + .as-file-input-box-upload-overlay,\r\n.as-file-input-box-trigger.as-drag-over + .as-file-input-box-upload-overlay {\r\n    display: block;\r\n}\r\n\r\n.as-file-input-box-trigger input {\r\n    visibility: hidden;\r\n    opacity: 0;\r\n}\r\n\r\n.as-file-input-box-upload-overlay {\r\n    display: none;\r\n    pointer-events: none;\r\n    background-color: rgba(30, 30, 80, 0.3);\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    z-index: 5;\r\n    overflow: hidden;\r\n    text-align: center;\r\n    white-space: nowrap;\r\n    font-size: 3em;\r\n    color: #b0fffb;\r\n}\r\n\r\n.as-file-input-box-upload-overlay::before,\r\n.as-file-input-box-upload-overlay > span {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-file-input-box-upload-overlay::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n\r\n.as-file-input-box-trigger {\r\n    position: absolute;\r\n    z-index: 2;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    opacity: 0;\r\n}\r\n\r\n.as-file-input-box:not(.as-has-file-name) .as-file-input-box-file-name,\r\n.as-file-input-box:not(.as-has-file-name) .as-file-input-box-file-name + br,\r\n.as-file-input-box:not(.as-has-file-size) .as-file-input-box-file-size,\r\n.as-file-input-box:not(.as-has-value) .as-file-input-box-action-left,\r\n.as-file-input-box:not(.as-has-value) .as-file-input-box-action-right,\r\n.as-file-input-box:not(.as-downloadable) .as-file-input-box-action-right,\r\n.as-file-input-box:not(.as-removable) .as-file-input-box-action-left,\r\n.as-file-input-box:not(.as-allow-upload) .as-file-input-box-trigger {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-file-input-box-background {\r\n    position: absolute;\r\n    z-index: 1;\r\n    left: 4%;\r\n    top: 4%;\r\n    right: 4%;\r\n    bottom: 4%;\r\n    background-size: contain;\r\n    background-repeat: no-repeat;\r\n    background-position: center;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-file-input-box.as-allow-upload .as-file-input-box-background {\r\n    background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZlcnNpb249IjEuMSIgIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij4NCiAgIDxwYXRoIGZpbGw9IiNhYWFhYWEiIGQ9Ik0xMyw5SDE4LjVMMTMsMy41VjlNNiwySDE0TDIwLDhWMjBBMiwyIDAgMCwxIDE4LDIySDZDNC44OSwyMiA0LDIxLjEgNCwyMFY0QzQsMi44OSA0Ljg5LDIgNiwyTTExLDE1VjEySDlWMTVINlYxN0g5VjIwSDExVjE3SDE0VjE1SDExWiIgLz4NCjwvc3ZnPg==);\r\n}\r\n\r\n\r\n.as-file-input-box-info {\r\n    position: absolute;\r\n    bottom: 0;\r\n    left: 0;\r\n    right: 0;\r\n    padding: 2px;\r\n    z-index: 3;\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n    background-color: rgba(255, 255, 255, 0.3);\r\n    pointer-events: none;\r\n    text-align: center;\r\n}\r\n\r\n.as-file-input-box-file-name {\r\n    font-size: inherit;\r\n    color: black;\r\n    text-shadow: 0 0 5px white;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-file-input-box-action-left,\r\n.as-file-input-box-action-right {\r\n    position: absolute;\r\n    z-index: 6;\r\n    top: 0;\r\n}\r\n\r\n\r\n.as-file-input-box-action-left {\r\n    left: 0;\r\n}\r\n\r\n\r\n.as-file-input-box-action-right {\r\n    right: 0;\r\n}\r\n\r\n.as-file-input-box button {\r\n    height: 2em;\r\n    width: 2em;\r\n    padding: 0;\r\n    border: none;\r\n    background-color: rgba(255, 255, 255, 0.3);\r\n    border-radius: 0;\r\n}\r\n\r\n.as-file-input-box button span {\r\n    font-size: 1.5em;\r\n}\r\n\r\n.as-file-input-box .mdi-close {\r\n    color: rgb(250, 100, 100);\r\n}\r\n\r\n.as-file-input-box .mdi-download {\r\n    color: rgb(100, 100, 250);\r\n}\r\n\r\n.as-file-input-box button:hover .mdi-close {\r\n    color: rgb(250, 50, 50);\r\n}\r\n\r\n.as-file-input-box button:hover .mdi-download {\r\n    color: rgb(50, 50, 250);\r\n}\r\n\r\n.as-file-input-box button:active .mdi-close {\r\n    color: rgb(250, 0, 0);\r\n}\r\n\r\n.as-file-input-box button:active .mdi-download {\r\n    color: rgb(0, 0, 250);\r\n}\r\n\r\n.as-file-input-box-checked {\r\n    display: none;\r\n    box-sizing: border-box;\r\n    z-index: 4;\r\n    position: absolute;\r\n    left: -1px;\r\n    top: -1px;\r\n    bottom: -1px;\r\n    right: -1px;\r\n    pointer-events: none;\r\n    border: 3px solid #0a90eb;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-file-input-box.as-checked .as-file-input-box-checked{\r\n    display: block;\r\n}\r\n\r\n.as-file-input-box-checked::before {\r\n    content: \"\";\r\n    display: block;\r\n    position: absolute;\r\n    right: -20px;\r\n    top: -20px;\r\n    width: 40px;\r\n    height: 40px;\r\n    transform: rotate(45deg);\r\n    background-color: #0a90eb;\r\n}\r\n\r\n.as-file-input-box-checked .mdi {\r\n    display: inline-block;\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    font-size: 14px;\r\n    color: white;\r\n}", ""]);



/***/ }),

/***/ 14237:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "\r\n.as-file-list-input {\r\n    padding: 5px;\r\n    border: 1px solid #dddddd;\r\n    box-sizing: border-box;\r\n    overflow: auto;\r\n    --item-width: 100%;\r\n    --item-require-width: 300px;\r\n    position: relative;\r\n    min-height: 42px;\r\n}\r\n\r\n.as-file-list-input.as-border-none {\r\n    border: none;\r\n    padding: 0;\r\n}\r\n\r\n.as-file-list-input.as-disabled {\r\n    background-color: var(--as-disabled-background-color);\r\n}\r\n\r\n.as-file-list-input.as-disabled > * {\r\n    opacity: 0.5;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-file-list-input-upload-overlay {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    overflow: hidden;\r\n    text-align: center;\r\n    white-space: nowrap;\r\n    pointer-events: none;\r\n    background-color: rgba(30, 30, 80, 0.3);\r\n    color: #b0fffb;\r\n}\r\n\r\n.as-file-list-input-upload-overlay::before {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n    content: \"\";\r\n}\r\n\r\n.as-file-list-input-upload-overlay > span {\r\n    font-size: 30px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-file-list-input:not(.as-drag-over) .as-file-list-input-upload-overlay,\r\n.as-file-list-input:not(.as-droppable) .as-file-list-input-upload-overlay,\r\n.as-file-list-input:not(.as-droppable) .as-file-list-drag-file-text,\r\n.as-file-list-input.as-read-only .as-file-list-input-upload-overlay {\r\n    display: none;\r\n}\r\n\r\n/*span.mdi.mdi-upload*/\r\n\r\n.as-file-list-input .as-file-input-box {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    margin-right: 10px;\r\n}\r\n\r\n.as-file-list-input.as-read-only .as-file-list-input-add {\r\n    display: none;\r\n}\r\n\r\n.as-file-list-input-add {\r\n    border: none;\r\n    width: 3.5em;\r\n    border-radius: 5px;\r\n    background-color: rgba(235, 235, 235, 0.2);\r\n    height: calc(2em + 2px);\r\n    padding-bottom: 10px;\r\n    box-sizing: border-box;\r\n    display: inline-block;\r\n    overflow: hidden;\r\n    position: relative;\r\n    vertical-align: middle;\r\n    margin-right: 5px;\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.as-file-list-input-add:hover {\r\n    background-color: rgb(235, 235, 235);\r\n}\r\n\r\n.as-file-list-input-add:active {\r\n    background-color: rgb(212, 212, 212);\r\n}\r\n\r\n\r\n.as-file-list-input-add input {\r\n    opacity: 0;\r\n    visibility: hidden;\r\n}\r\n\r\n.as-file-list-input-add-icon-ctn {\r\n    font-size: 1.5em;\r\n    text-align: center;\r\n    color: rgb(100, 100, 250);\r\n    position: absolute;\r\n    top: 0;\r\n    bottom: 0;\r\n    left: 0;\r\n    right: 0;\r\n    white-space: nowrap;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-file-list-input-add-icon-ctn span {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-file-list-input-add-icon-ctn::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.as-file-list-input.as-drag-over.as-droppable .as-file-list-input-add,\r\n.as-file-list-input.as-drag-over .as-file-list-drag-file-text {\r\n    visibility: hidden;\r\n}\r\n\r\n.as-file-list-item {\r\n    position: relative;\r\n    height: calc(2em + 2px);\r\n    font-size: 1rem;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    width: calc(var(--item-width) - 5px);\r\n    padding-left: 2.3em;\r\n    white-space: nowrap;\r\n    box-sizing: border-box;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n    padding-right: calc(2.3em + 5px);\r\n}\r\n\r\n.as-file-list-item .as-file-list-item-check {\r\n    display: none;\r\n    position: absolute;\r\n    left: 0.1em;\r\n    top:calc(50% - 1px - 0.5em);\r\n\r\n\r\n}\r\n\r\n\r\n.as-file-list-input.as-show-check .as-file-list-item .as-file-list-item-check {\r\n    display: block;\r\n}\r\n\r\n.as-file-list-input.as-show-check .as-file-list-item\r\n{\r\n    padding-left: 3.5em ;\r\n}\r\n\r\n.as-file-list-input.as-show-check .as-file-list-item .as-file-list-item-icon{\r\n    left: 1.2em;\r\n}\r\n\r\n.as-file-list-item-icon {\r\n    position: absolute;\r\n    left: 0;\r\n    top: calc(50% - 1em - 1px);\r\n    bottom: 0;\r\n    width: calc(2em + 2px);\r\n    height: calc(2em + 2px);\r\n}\r\n\r\n\r\n.as-file-list-item-name {\r\n    color: rgb(89, 89, 95);\r\n    display: inline-block;\r\n    overflow-x: hidden;\r\n    vertical-align: middle;\r\n    width: 100%;\r\n    text-overflow: ellipsis;\r\n    white-space: nowrap;\r\n    font-weight: bold;\r\n}\r\n\r\n\r\n.as-file-list-item::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    height: 100%;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-file-list-input .as-file-list-item {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    margin-bottom: 5px;\r\n    margin-right: 5px;\r\n}\r\n\r\n.as-file-list-input:not(.as-empty) .as-file-list-drag-file-text,\r\n.as-file-list-input.as-read-only .as-file-list-drag-file-text {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-file-list-item:hover {\r\n    background-color: rgba(169, 169, 172, 0.1);\r\n}\r\n\r\n\r\n.as-file-list-input .as-file-list-item:hover .as-file-list-item-quick-btn {\r\n    visibility: visible;\r\n}\r\n\r\n\r\n.as-file-list-item-quick-btn {\r\n    position: absolute;\r\n    border: none;\r\n    background-color: transparent;\r\n    outline: none;\r\n    border-radius: 3px;\r\n    height: 2em;\r\n    width: 2em;\r\n    font-size: inherit;\r\n    padding: 0;\r\n    right: 5px;\r\n    top: calc(50% - 1em);\r\n    visibility: hidden;\r\n}\r\n\r\n\r\n.as-file-list-item-quick-btn.as-quick-menu-attached {\r\n    display: block;\r\n}\r\n\r\n.as-file-list-item-quick-btn > span {\r\n    font-size: 1.2em;\r\n}\r\n\r\n\r\n.as-file-list-item-quick-btn.as-active {\r\n    background-color: rgba(20, 185, 235, 0.3);\r\n}\r\n\r\n.as-file-list-item-quick-btn:hover {\r\n    background-color: #91e4fb77;\r\n}\r\n\r\n.as-file-list-item-quick-btn:active {\r\n    background-color: #91e4fb;\r\n\r\n}\r\n\r\n", ""]);



/***/ }),

/***/ 76209:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-finder {\r\n    font-size: 1rem;\r\n    position: relative;\r\n    --finder-header-height: 51px;\r\n    --finder-nav-width: 250px;\r\n    overflow: hidden;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.as-finder.as-compact-mode {\r\n    --finder-header-height: 0;\r\n}\r\n\r\n.as-finder.as-compact-mode .as-finder-header {\r\n    display: none;\r\n}\r\n\r\n.as-finder-header {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    height: var(--finder-header-height);\r\n    width: 100%;\r\n    border-bottom: 1px solid #dddddd;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-finder-header .as-flexicon-button {\r\n    min-width: 110px;\r\n}\r\n\r\n.as-finder-nav-ctn,\r\n.as-finder-search-ctn {\r\n    position: absolute;\r\n    left: 0;\r\n    top: var(--finder-header-height);\r\n    width: var(--finder-nav-width);\r\n    bottom: 0;\r\n    border-right: 1px solid #dddddd;\r\n    padding-top: 29px;\r\n    background-color: white;\r\n    z-index: 20;\r\n}\r\n\r\n.as-finder-nav-ctn {\r\n}\r\n\r\n.as-finder-search-ctn {\r\n    visibility: hidden;\r\n\r\n}\r\n\r\n\r\n.as-finder-nav-header,\r\n.as-finder-search-header {\r\n    display: flex;\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    right: 0;\r\n    height: 29px;\r\n    box-sizing: border-box;\r\n    border-bottom: 1px solid #dddddd;\r\n    align-items: center;\r\n}\r\n\r\n.as-finder-nav-header-left {\r\n    flex-grow: 1;\r\n}\r\n\r\n.as-finder-nav-header-right button {\r\n    height: 100%;\r\n    width: 30px;\r\n    margin-left: 5px;\r\n}\r\n\r\n.as-finder-nav-ctn > .as-exp-group,\r\n.as-finder-search-ctn > .as-finder-search-body {\r\n    overflow-y: auto;\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n\r\n.as-finder-search-body {\r\n    padding: 10px 5px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.as-finder-search-field {\r\n    padding-top: 10px;\r\n}\r\n\r\n.as-finder-search-field > div {\r\n    display: inline-block;\r\n}\r\n\r\n.as-finder-search-field > div:first-child {\r\n    width: 5em;\r\n}\r\n\r\n\r\n.as-finder-search-footer {\r\n    text-align: center;\r\n    padding-top: 20px;\r\n\r\n}\r\n\r\n.as-finder-search-footer button {\r\n    min-width: 100px;\r\n}\r\n\r\n.as-finder-search-footer button:not(:last-child) {\r\n    margin-right: 20px;\r\n}\r\n\r\n.as-finder-body {\r\n    position: absolute;\r\n    right: 0;\r\n    left: var(--finder-nav-width);\r\n    top: var(--finder-header-height);\r\n    bottom: 0;\r\n    padding-top: 29px;\r\n}\r\n\r\n.as-finder-content-header {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    right: 0;\r\n    height: 29px;\r\n    box-sizing: border-box;\r\n    border-bottom: 1px solid white;\r\n    display: flex;\r\n\r\n}\r\n\r\n.as-finder-content-header-left {\r\n    flex-grow: 1;\r\n}\r\n\r\n.as-finder:not(.as-mobile) .as-finder-content-header-right::after {\r\n    content: \"Kéo thả file vào đây để tải lên\";\r\n    color: rgb(100, 100, 180);\r\n    font-style: italic;\r\n    line-height: 28px;\r\n    padding-right: 10px;\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.as-finder-content-ctn {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n\r\n.as-finder-normal-action-button-ctn,\r\n.as-finder-tiny-action-button-ctn {\r\n    position: absolute;\r\n    left: 10px;\r\n    top: calc(50% - 15px);\r\n    white-space: nowrap;\r\n    max-width: calc(100% - 50px);\r\n    overflow: hidden;\r\n}\r\n\r\n.as-finder-normal-action-button-ctn > button:not(:last-child),\r\n.as-finder-tiny-action-button-ctn > button:not(:last-child) {\r\n    margin-right: 10px;\r\n}\r\n\r\n.as-finder-tiny-action-button-ctn button,\r\n.as-finder-content-header button:not(.as-ribbon-button) {\r\n    background-color: transparent;\r\n    border: none;\r\n    border-radius: 3px;\r\n    width: 30px;\r\n    height: 30px;\r\n    font-size: inherit;\r\n    padding: 0;\r\n    color: var(--as-transparent-button-text-color);\r\n}\r\n\r\n.as-finder-content-header button.as-ribbon-button {\r\n    height: 30px;\r\n}\r\n\r\n\r\n\r\n.as-finder-tiny-action-button-ctn button span {\r\n    font-size: 1.3em;\r\n}\r\n\r\n.as-finder-tiny-action-button-ctn button:hover {\r\n    color: var(--as-transparent-button-text-hover-color);\r\n}\r\n\r\n.as-finder-tiny-action-button-ctn button:active {\r\n    color: var(--as-transparent-button-text-active-color);\r\n}\r\n\r\n\r\n.as-action-button-minimized .as-finder-normal-action-button-ctn,\r\n.as-finder:not(.as-action-button-minimized) .as-finder-tiny-action-button-ctn {\r\n    visibility: hidden;\r\n}\r\n\r\n.as-finder[data-selected-file-count=\"0\"] .as-finder-header button[name=\"view\"],\r\n.as-finder[data-selected-file-count=\"0\"] .as-finder-header button[name=\"delete\"],\r\n.as-finder:not([data-selected-folder-count=\"0\"]) .as-finder-header button[name=\"delete\"],\r\n.as-finder[data-selected-file-count=\"0\"] .as-finder-header button[name=\"download\"],\r\n.as-finder[data-selected-file-count=\"0\"][data-selected-folder-count=\"0\"] .as-finder-header button[name=\"move\"],\r\n.as-finder:not([data-selected-file-count=\"1\"][data-selected-folder-count=\"0\"]) .as-finder-header button[name=\"rename\"],\r\n.as-finder:not(.as-mini-layout) .as-finder-content-header button[name=\"nav_toggle\"],\r\n.as-finder:not(.as-mini-layout) .as-finder-nav-ctn button[name=\"nav_toggle\"] {\r\n    display: none;\r\n}\r\n\r\n.as-finder-nav-ctn {\r\n    overflow-y: auto;\r\n\r\n}\r\n\r\n.as-finder-content-ctn {\r\n    overflow-y: auto;\r\n    z-index: 1;\r\n}\r\n\r\n.as-finder.as-mini-layout .as-finder-body {\r\n    left: 0;\r\n}\r\n\r\n.as-finder.as-mini-layout .as-finder-nav-ctn,\r\n.as-finder.as-mini-layout .as-finder-search-ctn {\r\n    left: calc(var(--finder-nav-width) * -1);\r\n    transition: left 0.2s;\r\n}\r\n\r\n\r\n.as-finder.as-mini-layout.as-nav-open .as-finder-nav-ctn,\r\n.as-finder.as-mini-layout.as-nav-open .as-finder-search-ctn {\r\n    left: 0;\r\n}\r\n\r\n.as-finder.as-mini-layout.as-nav-open::after {\r\n    content: \"\";\r\n    display: block;\r\n    z-index: 8;\r\n    position: absolute;\r\n    left: 0;\r\n    top: var(--finder-header-height);\r\n    width: 100%;\r\n    height: 100%;\r\n    background-color: rgba(169, 169, 172, 0.2);\r\n}\r\n\r\n\r\n.as-finder-content::before,\r\n.as-finder-content::after {\r\n    content: \"\";\r\n    display: block;\r\n}\r\n\r\n.as-finder-content .as-file-thumbnail {\r\n    display: inline-block;\r\n    margin: 5px;\r\n}\r\n\r\n\r\n.as-finder-content {\r\n    user-select: none;\r\n    min-height: 100%;\r\n    box-sizing: border-box;\r\n    position: relative;\r\n}\r\n\r\n\r\n.as-finder:not(.as-writable-folder) .as-finder-header button[name=\"upload\"],\r\n.as-finder:not(.as-writable-folder) .as-finder-header button[name=\"delete\"],\r\n.as-finder:not(.as-writable-folder) .as-finder-header button[name=\"rename\"],\r\n.as-finder:not(.as-writable-folder) .as-finder-header button[name=\"move\"],\r\n.as-finder.as-disable-create-folder .as-finder-header button[name=\"new_folder\"]\r\n{\r\n    display: none;\r\n}\r\n\r\n.as-finder-select-area {\r\n    position: fixed;\r\n    box-sizing: border-box;\r\n    border: 2px solid rgba(0, 103, 240, 0.5);\r\n    width: 100px;\r\n    height: 100px;\r\n    background-color: rgba(0, 103, 240, 0.2);\r\n    /*background-color: ;*/\r\n}\r\n\r\n.as-finder:not(.as-dragging) .as-file-thumbnail:hover {\r\n    background-color: rgba(29, 161, 255, 0.13);\r\n}\r\n\r\n\r\n.as-finder-upload-overlay {\r\n    display: none;\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    right: 0;\r\n    z-index: 4;\r\n    backdrop-filter: blur(1px);\r\n    -webkit-backdrop-filter: blur(1px);\r\n    background-color: rgba(167, 167, 167, 0.1);\r\n    font-size: 2rem;\r\n    text-align: center;\r\n    text-shadow: 2px 2px 3px white, -2px -2px 3px white, -2px 2px 3px white, 2px -2px 3px white;\r\n    color: rgb(97, 79, 100);\r\n    font-weight: bold;\r\n    padding-top: calc(50% - 6em);\r\n}\r\n\r\n\r\n.as-finder-upload-overlay-icon-ctn {\r\n    text-align: center;\r\n    color: #1da1ff;\r\n    font-size: 8rem;\r\n\r\n}\r\n\r\n.as-finder:not(.as-searching) .as-finder-body.as-drag-over .as-finder-upload-overlay {\r\n    display: block;\r\n}\r\n\r\n\r\n.as-finder.as-searching .as-finder-nav-ctn {\r\n    visibility: hidden;\r\n}\r\n\r\n.as-finder.as-searching .as-finder-search-ctn {\r\n    visibility: visible;\r\n}\r\n\r\n.as-finder.as-searching .as-finder-content-header-right,\r\n.as-finder.as-searching .as-finder-header button[name='upload'],\r\n.as-finder.as-searching .as-finder-header button[name='move'] {\r\n    display: none;\r\n}\r\n\r\n.as-finder-task-check {\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-finder-task-check >span{\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-finder-task-check .mdi {\r\n    font-size: 1.5em;\r\n    color: rgb(30, 237, 219);\r\n}\r\n\r\n\r\n.as-finder-task-check .mdi.mdi-alert-decagram-outline {\r\n    color: red;\r\n}\r\n\r\n\r\n/**************************************************/\r\n\r\n.as-file-thumbnail {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    position: relative;\r\n}\r\n\r\n.as-file-thumbnail-background {\r\n    display: block;\r\n    width: 100px;\r\n    height: 100px;\r\n    background-size: contain;\r\n    background-position: center;\r\n    background-repeat: no-repeat;\r\n    box-sizing: border-box;\r\n    border: 1px solid #c0c0c0;\r\n}\r\n\r\n.as-file-thumbnail-check {\r\n    display: none;\r\n    position: absolute;\r\n    top: -2px;\r\n    left: -2px;\r\n    bottom: -2px;\r\n    right: -2px;\r\n    overflow: hidden;\r\n    z-index: 4;\r\n    pointer-events: none;\r\n    border: 2px solid #0a90eb;\r\n}\r\n\r\n.as-file-thumbnail.as-checked .as-file-thumbnail-check {\r\n    display: block;\r\n}\r\n\r\n.as-file-thumbnail-check::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    right: -28px;\r\n    top: -28px;\r\n    width: 56px;\r\n    height: 56px;\r\n    transform: rotate(45deg);\r\n    background-color: #0a90eb;\r\n}\r\n\r\n.as-file-thumbnail-check .mdi {\r\n    display: inline-block;\r\n    position: absolute;\r\n    right: 5px;\r\n    top: 5px;\r\n    font-size: 14px;\r\n    color: white;\r\n}\r\n\r\n.as-file-thumbnail-file-name {\r\n    word-wrap: break-word; /* IE 5.5-7 */\r\n    white-space: -moz-pre-wrap; /* Firefox 1.0-2.0 */\r\n    white-space: pre-wrap;\r\n    text-overflow: ellipsis;\r\n    overflow: hidden;\r\n    width: 100px;\r\n    max-height: 6.2em;\r\n    line-height: 1.5;\r\n    text-align: center;\r\n    font-size: 13px;\r\n    padding-top: 0.2em;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-file-thumbnail-file-name > span:last-child {\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-finder-folder-dialog-tree-ctn {\r\n    max-height: calc(90vh - 250px);\r\n    overflow-y: auto;\r\n    border: 1px solid #dddddd;\r\n}\r\n\r\n.as-finder-folder-dialog-tree-ctn > .as-exp-group {\r\n    width: 300px;\r\n}\r\n\r\n.as-finder-folder-dialog-selected-ctn {\r\n    padding-bottom: 10px;\r\n    white-space: pre-wrap;\r\n}\r\n\r\n.as-finder-folder-dialog-selected-ctn > span {\r\n    white-space: nowrap;\r\n}\r\n\r\ndiv[data-view-as=\"list\"] {\r\n    --col: 1;\r\n}\r\n\r\ndiv[data-view-as=\"list\"] .as-file-thumbnail {\r\n    display: inline-block;\r\n    margin-right: 4px;\r\n    height: 50px;\r\n    padding-left: 60px;\r\n    white-space: nowrap;\r\n    box-sizing: border-box;\r\n    width: calc(100% / var(--col) - 10px * var(--col));\r\n}\r\n\r\ndiv[data-view-as=\"list\"] .as-file-thumbnail::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\ndiv[data-view-as=\"list\"] .as-file-thumbnail-background {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: 50px;\r\n    height: 50px;\r\n}\r\n\r\ndiv[data-view-as=\"list\"] .as-file-thumbnail-file-name {\r\n    width: unset;\r\n    max-width: 100%;\r\n    text-align: left;\r\n}\r\n\r\ndiv[data-view-as=\"list\"] .as-file-thumbnail-background,\r\ndiv[data-view-as=\"list\"] .as-file-thumbnail-file-name {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\ndiv[data-view-as=\"lage_icons\"] .as-file-thumbnail-background{\r\n    width: 200px;\r\n    height: 200px;\r\n}\r\n\r\ndiv[data-view-as=\"lage_icons\"]  .as-file-thumbnail-file-name {\r\n    width: 200px;\r\n}", ""]);



/***/ }),

/***/ 85225:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-flexicon-button {\r\n    box-sizing: border-box;\r\n    border: solid 1px #bfbfbf;\r\n    background-color: #ebebeb;\r\n    border-radius: 0.2em;\r\n    outline: none;\r\n    padding: 0;\r\n    overflow: hidden;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: var(--as-input-height);\r\n    font-size: 1rem;\r\n    cursor: pointer;\r\n    color: black;\r\n}\r\n\r\n.as-flexicon-button:disabled {\r\n    pointer-events: none;\r\n    background-color: #c7c7c7 !important;\r\n}\r\n\r\n\r\n.as-flexicon-button div,\r\n.as-flexicon-button span {\r\n    font-weight: inherit;\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.as-icon-button-table-box {\r\n    display: table;\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-flexicon-button:hover .as-flexicon-button-content {\r\n    background-color: rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.as-flexicon-button:active {\r\n    -webkit-box-shadow: inset 0 0.2em 0.25em rgba(0, 0, 0, 0.125);\r\n    box-shadow: inset 0 0.2em 0.25em rgba(0, 0, 0, 0.125);\r\n}\r\n\r\n\r\n.as-flexicon-button-content {\r\n    display: table-row;\r\n}\r\n\r\n\r\n.as-flexicon-button-icon-container,\r\n.as-flexicon-button-text-container {\r\n    display: table-cell;\r\n    box-sizing: content-box;\r\n    vertical-align: middle;\r\n    text-align: center;\r\n}\r\n\r\n.as-flexicon-button-icon-container:empty,\r\n.as-flexicon-button-text-container:empty:not([data-ml-key]) {\r\n    display: none;\r\n}\r\n\r\n.as-flexicon-button-icon-container {\r\n    width: 2em;\r\n    background-color: rgba(0, 0, 0, 0.0893617021);\r\n    color: rgb(146, 146, 146);\r\n}\r\n\r\n\r\n.as-flexicon-button-icon-container > span,\r\n.as-flexicon-button-icon-container > i,\r\n.as-flexicon-button-icon-container > svg,\r\n.as-flexicon-button-icon-container > img {\r\n    font-size: 1em;\r\n}\r\n\r\n.as-flexicon-button-text-container {\r\n    padding-left: 0.357em;\r\n    padding-right: 0.357em;\r\n    box-sizing: border-box;\r\n    min-width: 2em;\r\n}\r\n\r\n\r\n.as-flexicon-button-icon-container + .as-flexicon-button-text-container {\r\n    border-left: solid 1px #bfbfbf;\r\n}\r\n\r\n.as-flexicon-button-icon-container:empty + .as-flexicon-button-text-container {\r\n    border-left: none;\r\n    padding-left: 0.714em;\r\n    padding-right: 0.714em;\r\n}\r\n\r\n/*** theme  ***/\r\n\r\n.as-flexicon-button.primary {\r\n    border-color: #005bbd;\r\n    background-color: #007bff;\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.primary .as-flexicon-button-icon-container {\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.primary .as-flexicon-button-text-container {\r\n    border-color: #005bbd;\r\n}\r\n\r\n\r\n.as-flexicon-button.secondary {\r\n    border-color: #4e555a;\r\n    background-color: #6d767e;\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.secondary .as-flexicon-button-icon-container {\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.secondary .as-flexicon-button-text-container {\r\n    border-left-color: #4e555a;\r\n}\r\n\r\n\r\n.as-flexicon-button.success {\r\n    border-color: #1e7b34;\r\n    background-color: #29a847;\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.success .as-flexicon-button-icon-container {\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.success .as-flexicon-button-text-container {\r\n    border-left-color: #1e7b34;\r\n}\r\n\r\n\r\n.as-flexicon-button.danger {\r\n    border-color: #b21f2e;\r\n    background-color: #dc3848;\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.danger .as-flexicon-button-icon-container {\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.danger .as-flexicon-button-text-container {\r\n    border-left-color: #b21f2e;\r\n}\r\n\r\n.as-flexicon-button.warning {\r\n    border-color: #9e7700;\r\n    background-color: #e0a800;\r\n    color: black;\r\n}\r\n\r\n.as-flexicon-button.warning .as-flexicon-button-icon-container {\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.warning .as-flexicon-button-text-container {\r\n    border-left-color: #9e7700;\r\n}\r\n\r\n.as-flexicon-button.info {\r\n    border-color: #117888;\r\n    background-color: #17a2b8;\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.info .as-flexicon-button-icon-container {\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.info .as-flexicon-button-text-container {\r\n    border-left-color: #117888;\r\n}\r\n\r\n.as-flexicon-button.light {\r\n    border-color: #c9d1d9;\r\n    background-color: #f8f9fa;\r\n    color: #212529;\r\n}\r\n\r\n.as-flexicon-button.light .as-flexicon-button-icon-container {\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.light .as-flexicon-button-text-container {\r\n    border-left-color: #c9d1d9;\r\n}\r\n\r\n.as-flexicon-button.dark {\r\n    border-color: #171a1c;\r\n    background-color: #343a40;\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.dark .as-flexicon-button-icon-container {\r\n    color: white;\r\n}\r\n\r\n.as-flexicon-button.dark .as-flexicon-button-text-container {\r\n    border-left-color: #171a1c;\r\n}\r\n\r\n.as-flexicon-button.link {\r\n    border-color: transparent;\r\n    background-color: transparent;\r\n    color: #007bff;\r\n}\r\n\r\n.as-flexicon-button.link .as-flexicon-button-icon-container {\r\n    color: #007bff;\r\n    background: transparent;\r\n}\r\n\r\n.as-flexicon-button.link .as-flexicon-button-text-container {\r\n    border-left-color: transparent;\r\n}\r\n\r\n.as-flexicon-button.link:hover .as-flexicon-button-text-container {\r\n    text-decoration: underline;\r\n}", ""]);



/***/ }),

/***/ 36240:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-flexicon-input-icon-ctn > span,\r\n.as-flexicon-input-icon-ctn > i,\r\n.as-flexicon-input-icon-ctn > svg,\r\n.as-flexicon-input-icon-ctn > img {\r\n    font-size: 1em;\r\n    line-height: 1;\r\n}\r\n\r\n.as-flexicon-input {\r\n    position: relative;\r\n    border: 1px solid #dddddd;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 2em;\r\n    font-size: 1rem;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    box-sizing: border-box;\r\n    border-radius: 3px;\r\n    text-align: left;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-flexicon-input.as-border-none {\r\n    border: none;\r\n}\r\n\r\n.as-flexicon-input.as-disabled {\r\n    background-color: var(--as-disabled-background-color);\r\n}\r\n\r\n.as-flexicon-input::before {\r\n    content: \"\";\r\n    width: 0;\r\n    height: 100%;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-flexicon-input-icon-ctn:empty {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-flexicon-input:not(.as-flexicon-input-has-icon) input {\r\n    padding-left: 0.3em;\r\n}\r\n\r\n.as-flexicon-input-icon-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    /*text-align: center;*/\r\n    font-size: 1.2em;\r\n    width: 1.25em;\r\n    text-align: center;\r\n}\r\n\r\n.as-flexicon-input-unit-ctn {\r\n    width: 1.5em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    text-align: center;\r\n}\r\n\r\n.as-flexicon-input-unit-ctn:empty {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-flexicon-input input {\r\n    border: none;\r\n    font-size: inherit;\r\n    font-family: inherit;\r\n    outline: none;\r\n    height: 100%;\r\n    background-color: transparent;\r\n    box-sizing: border-box;\r\n    width: 100%;\r\n    padding-left: 0;\r\n    padding-right: 0;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    text-align: inherit;\r\n}\r\n\r\n\r\n.as-flexicon-input.as-flexicon-input-has-icon input,\r\n.as-flexicon-input.as-flexicon-input-has-unit input {\r\n    width: calc(100% - 1.5em);\r\n}\r\n\r\n.as-flexicon-input.as-flexicon-input-has-unit {\r\n    text-align: right;\r\n}\r\n\r\n\r\n.as-flexicon-input.as-flexicon-input-has-icon.as-flexicon-input-has-unit input {\r\n    width: calc(100% - 3em);\r\n}", ""]);



/***/ }),

/***/ 70729:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-follower {\r\n    position: fixed;\r\n    z-index: 100;\r\n}\r\n\r\n.absol-follower-hidden{\r\n    z-index: -1000 !important;\r\n    opacity: 0;\r\n    visibility: hidden;\r\n}", ""]);



/***/ }),

/***/ 42305:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-font-input {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: calc(2em + 2px);\r\n    width: 12em;\r\n    border-radius: 3px;\r\n    border: 1px solid #ddd;\r\n\r\n}\r\n\r\n.as-font-input-family {\r\n\r\n}\r\n\r\n.as-font-input-size {\r\n\r\n}\r\n\r\n\r\n\r\n.as-font-family-select-list {\r\n    font-size: 16px;\r\n    cursor: default;\r\n    user-select: none;\r\n    min-width: 12em;\r\n    padding-top: 40px;\r\n\r\n}\r\n\r\n.as-font-family-select-list-header{\r\n    padding: 5px;\r\n    position: absolute;\r\n    left: 0;\r\n    width: 100%;\r\n    box-sizing: border-box;\r\n    height: 40px;\r\n    top: 0;\r\n}\r\n\r\n.as-font-family-select-list-content {\r\n    overflow-y: auto;\r\n}\r\n\r\n.as-font-family-select-item {\r\n    height: 2em;\r\n    line-height: 2em;\r\n    padding: 0 20px 0 10px;\r\n\r\n}\r\n\r\n.as-font-family-select-item:hover {\r\n    background-color: var(--as-list-item-hover-background-color);\r\n}\r\n\r\n.as-font-family-select-item:active {\r\n    /*background-color: var(--as-list-item-active-background-color);*/\r\n}\r\n\r\n.as-font-family-select-item.as-selected {\r\n    background-color: var(--as-list-item-selected-background-color);\r\n}", ""]);



/***/ }),

/***/ 38278:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-frame{\r\n    \r\n}", ""]);



/***/ }),

/***/ 70058:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-frame-view {\r\n    position: relative;\r\n}\r\n\r\n\r\n.absol-frame-view-frame-container {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    background-color: white;\r\n}\r\n\r\n\r\n.absol-frame-view-frame-container:not(.absol-active) {\r\n    z-index: -100;\r\n    visibility: hidden;\r\n    opacity: 0;\r\n}\r\n\r\n.absol-frame-view-frame-container:not(.absol-active) *,\r\n.absol-frame-view-frame-container:not(.absol-active) {\r\n    pointer-events: none;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n}\r\n\r\n\r\n.absol-frame-view-frame-container > div {\r\n    width: 100%;\r\n    height: 100%;\r\n    display: block;/* avoid overflow if this div is inline-block*/\r\n}", ""]);



/***/ }),

/***/ 64713:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-has-hanger-drag,\r\n.as-has-hanger-drag * {\r\n    touch-action: none;\r\n    -webkit-user-select: none !important;\r\n    -moz-user-select: none !important;\r\n    -ms-user-select: none !important;\r\n    user-select: none !important;\r\n}", ""]);



/***/ }),

/***/ 17726:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-hexa-section-label {\r\n    position: relative;\r\n    -webkit-print-color-adjust: exact;\r\n    /*friendly print*/\r\n}\r\n\r\n.as-hexa-section-label-text {\r\n    position: relative;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-size: 1em;\r\n    padding-right: 2.5em;\r\n    color: white;\r\n    font-weight: bold;\r\n    z-index: 2;\r\n}\r\n\r\n@media print {\r\n    .as-hexa-section-label-text {\r\n        color: white !important;\r\n    }\r\n\r\n    .as-hexa-section-label-index {\r\n        color: rgb(237, 147, 54) !important;\r\n    }\r\n}\r\n\r\n\r\n.as-hexa-section-label-index {\r\n    position: relative;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    text-align: center;\r\n    color: rgb(237, 147, 54);\r\n    font-weight: 900;\r\n    z-index: 2;\r\n}\r\n\r\n.as-hexa-section-label-background {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    bottom: 0;\r\n    z-index: 1;\r\n}\r\n\r\n.as-hexa-section-label-background>svg {\r\n    display: block;\r\n}\r\n\r\n.as-hexa-section-label-index-box {\r\n    stroke: rgb(251, 186, 130);\r\n    fill: white;\r\n    stroke-width: 2.5;\r\n}\r\n\r\n.as-hexa-section-label-text-box {\r\n    fill: rgb(237, 147, 54);\r\n    stroke: none;\r\n}", ""]);



/***/ }),

/***/ 69847:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "/*margin for border size*/\r\n.as-hruler {\r\n    position: relative;\r\n    height: 1.5em;\r\n    border: solid 1px black;\r\n    overflow: hidden;\r\n    font-family: courier, \"courier new\", monospace;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.as-hruler-line {\r\n    position: absolute;\r\n    bottom: 0;\r\n    height: 25%;\r\n    border-left: solid 1px rgb(17, 48, 43);\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-hruler-line.major {\r\n    height: 50%;\r\n    border-left: solid 1px rgb(5, 20, 18);\r\n}\r\n\r\n.as-hruler-major-number{\r\n    position: absolute;\r\n    text-align: center;\r\n    width: 5em;\r\n    pointer-events: none;\r\n    font-size: 0.7em;\r\n    bottom: 50%;\r\n} ", ""]);



/***/ }),

/***/ 55498:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "", ""]);



/***/ }),

/***/ 25531:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "/****Adapt icon************/\r\n.fa-close:before {\r\n    content: \"\\f00d\";\r\n}\r\n\r\n\r\n.kv-document-2-site {\r\n    display: flex;\r\n    align-content: stretch;\r\n}\r\n\r\n.kv-document-2-site-left {\r\n\r\n    background-color: rgb(61, 29, 154);\r\n}\r\n\r\n.kv-document-2-site-right {\r\n    flex-grow: 1;\r\n\r\n}\r\n\r\n.kv-document-2-site-left-header {\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    padding: 25px 20px;\r\n\r\n}\r\n\r\n.kv-document-2-site-left-header-logo {\r\n    height: 65px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.kv-document-2-site-left-header-text {\r\n    font-weight: bold;\r\n    font-size: 25px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    color: #26afa8;\r\n}\r\n\r\n.kv-document-2-site-left .as-vertical-timeline {\r\n    padding: 5px 20px;\r\n}\r\n\r\n\r\n/* For Document page */\r\n.kv-document-page {\r\n    flex-direction: column;\r\n    display: flex;\r\n}\r\n\r\ndiv.kv-document-page.absol-frame {\r\n    display: flex;\r\n}\r\n\r\n.kv-document-page-header {\r\n    position: relative;\r\n    text-align: left;\r\n    padding: 10px 10px 10px 10px;\r\n}\r\n\r\n.kv-document-page-title {\r\n    font-size: 18px;\r\n    font-weight: bold;\r\n    line-height: 30px;\r\n}\r\n\r\n.kv-document-page-close-btn {\r\n    float: right;\r\n}\r\n\r\n.kv-document-transparent-btn {\r\n    background-color: transparent;\r\n    border-radius: 50%;\r\n    height: 30px;\r\n    width: 30px;\r\n    padding: 0;\r\n    color: var(--as-transparent-button-text-color);\r\n    font-size: 20px;\r\n    border: none;\r\n}\r\n\r\n.kv-document-transparent-btn:hover {\r\n    color: var(--as-transparent-button-text-hover-color);\r\n}\r\n\r\n.kv-document-transparent-btn:active {\r\n    color: var(--as-transparent-button-text-active-color);\r\n}\r\n\r\n\r\n.kv-document-page-content {\r\n    flex-grow: 1;\r\n    overflow: auto;\r\n    padding: 10px 20px 10px 20px;\r\n}\r\n\r\n.kv-document-page-footer {\r\n    display: flex;\r\n    position: relative;\r\n    padding: 30px 20px 10px 20px;\r\n}\r\n\r\n.kv-document-page-footer .as-flexicon-button {\r\n    min-width: 110px;\r\n    height: 30px;\r\n}\r\n\r\n.kv-document-page-footer-left {\r\n    flex-grow: 1;\r\n}\r\n\r\n.kv-document-page-footer-left > *:not(:first-child) {\r\n    margin-left: 20px;\r\n}\r\n\r\n.kv-document-page-footer-right {\r\n    text-align: right;\r\n}\r\n\r\n\r\n.kv-document-page-footer-right > *:not(:last-child) {\r\n    margin-right: 20px;\r\n}\r\n\r\n.kv-document-link {\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    font-size: 14px;\r\n    color: black;\r\n    cursor: pointer;\r\n    height: 30px;\r\n    padding: 0 20px;\r\n    white-space: normal;\r\n    border-radius: 3px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.kv-document-link:hover {\r\n    color: rgb(20, 100, 246);\r\n}\r\n\r\n\r\n.kv-document-link > span,\r\n.kv-document-link::before {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.kv-document-link::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n\r\n.kv-document-link.kv-variant-primary {\r\n    color: white;\r\n    background-color: rgb(26, 146, 255);\r\n}\r\n\r\n\r\n/*************************************************************/\r\n\r\n.as-message-input-body .as-message-input-text-input {\r\n    padding-left: var(--control-horizontal-distance-2);\r\n    padding-top: var(--control-verticle-distance-1);\r\n    padding-bottom: var(--control-verticle-distance-1);\r\n    padding-right: var(--control-horizontal-distance-2);\r\n    min-height: 40px;\r\n}\r\n\r\n/*TODO: find usage*/\r\n.bsc-white .absol-selectmenu-anchor-content-container {\r\n    z-index: 200001;\r\n}\r\n\r\n.bsc-white .absol-context-menu-anchor {\r\n    font-size: var(--font-size-right-mouse-menu);\r\n}\r\n\r\n.card-mobile-content > div:not([class]):first-child:last-child .as-dynamic-table-wrapper.as-overflow-y {\r\n    height: 100%;\r\n}\r\n\r\n/* todo: normalize for all module\r\n.absol-selectmenu-holder-item .absol-selectlist-item-text,\r\n.absol-selectmenu-holder-item .absol-selectlist-item-desc {\r\n    line-height: calc(var(--control-height) - 10px);\r\n}\r\n\r\n.bsc-white .absol-selectmenu {\r\n    height: var(--control-height);\r\n    font-size: var(--font-size-text-input);\r\n}\r\n\r\n.bsc-white .absol-selectlist .absol-selectlist-item {\r\n    font-size: var(--font-size-text-input);\r\n    height: 1.42857142857em;\r\n}\r\n\r\n.bsc-white .absol-selectlist .absol-selectlist-item>span {\r\n    line-height: 1.42857142857;\r\n}\r\n\r\n.bsc-white .absol-search-text-input {\r\n    font-size: var(--font-size-text-input);\r\n}\r\n\r\n */\r\n\r\n.absol-single-page.as-has-footer-margin > .absol-single-page-scroller{\r\n   padding-bottom:  var(--footer-margin);\r\n}", ""]);



/***/ }),

/***/ 96227:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".kv-overview-widget {\r\n    background-color: rgb(212, 227, 252);\r\n    padding: 0 5px 5px 5px;\r\n    border-radius: 3px;\r\n    box-sizing: border-box;\r\n    display: inline-block;\r\n    width: 25em;\r\n    height: 40em;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    font-size: 1rem;\r\n    position: fixed;\r\n    --x: 0;\r\n    --y: 0;\r\n    left: var(--x);\r\n    top: var(--y);\r\n    z-index: 3000000;\r\n}\r\n\r\n.kv-overview-widget-header {\r\n    height: 2em;\r\n    padding-left: calc(10em / 14);\r\n    user-select: none;\r\n    position: relative;\r\n}\r\n\r\n.kv-overview-widget-header-window-action {\r\n    position: absolute;\r\n    right: 5px;\r\n    top: calc(50% - 10em / 14);\r\n    height: calc(20em / 14);\r\n    display: inline-block;\r\n}\r\n\r\n.kv-overview-widget-header-window-action button {\r\n    background-color: transparent;\r\n    border-radius: 3px;\r\n    padding: 0;\r\n    border: none;\r\n    width: 20px;\r\n    height: 20px;\r\n    color: rgb(69, 69, 70);\r\n}\r\n\r\n.kv-overview-widget-header-window-action button:hover {\r\n    background-color: var(--as-transparent-button-hover-color);\r\n}\r\n\r\n.kv-overview-widget-header-window-action button:hover {\r\n    background-color: var(--as-transparent-button-active-color);\r\n}\r\n\r\n.kv-overview-widget-title {\r\n    font-weight: bold;\r\n    display: inline-block;\r\n    line-height: 2em;\r\n}\r\n\r\n.kv-overview-widget-body {\r\n    box-sizing: border-box;\r\n    padding-top: 5px;\r\n    background-color: white;\r\n    height: calc(100% - 2em);\r\n    position: relative;\r\n}\r\n\r\n.kv-overview-widget-body > .absol-tabview > .absol-tabbar .absol-hscroller-viewport {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.kv-overview-widget-body > .absol-tabview > .absol-tabbar .absol-hscroller-viewport {\r\n    padding-left: 5px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.kv-overview-widget-body > .absol-tabview > .absol-tabbar .as-tab-bar-button-ext-icon-ctn {\r\n    margin: 0;\r\n}\r\n\r\n.kv-overview-widget-page > div {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.kv-overview-widget-tab-view .absol-tabbar-button > .absol-tabbar-button-icon-container {\r\n    display: none;\r\n}\r\n\r\n.kv-overview-widget-tab-view .absol-tabbar-button {\r\n    min-width: 70px;\r\n    text-align: left;\r\n}\r\n\r\n.kv-overview-widget-tab-view {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.kv-overview-widget-bubble {\r\n    position: fixed;\r\n    z-index: 3000000;\r\n    width: 54px;\r\n    height: 54px;\r\n    border-radius: 50%;\r\n    background-color: white;\r\n    box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.75);\r\n    -webkit-box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.75);\r\n    -moz-box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.75);\r\n    user-select: none;\r\n}\r\n\r\n.kv-overview-widget-bubble:hover {\r\n    background-color: rgb(240, 240, 250);\r\n\r\n}\r\n\r\n.kv-overview-widget-bubble:active {\r\n    box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.75);\r\n    -webkit-box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.75);\r\n    -moz-box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.75);\r\n}\r\n\r\n.kv-overview-widget-bubble-background {\r\n    position: absolute;\r\n    left: 20%;\r\n    top: 20%;\r\n    width: 60%;\r\n    height: 60%;\r\n    pointer-events: none;\r\n}\r\n\r\n.kv-overview-widget-bubble-badge {\r\n    position: absolute;\r\n    left: calc(85% - 10px);\r\n    bottom: calc(85% - 10px);\r\n    text-align: center;\r\n    padding:0 3px ;\r\n    background-color: rgba(255,  0, 0, 0.7);\r\n    color: white;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    font-size: 14px;\r\n    height: 30px;\r\n    min-width: 30px;\r\n    white-space: nowrap;\r\n    border-radius: 15px;\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.kv-overview-widget-bubble-badge span,\r\n.kv-overview-widget-bubble-badge::before {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.kv-overview-widget-bubble-badge::before{\r\n    content:\"\" ;\r\n    height: 100%;\r\n}", ""]);



/***/ }),

/***/ 31140:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".kv-ow-modal-manager {\r\n    position: absolute;\r\n    z-index: 3000010;\r\n    width: 100%;\r\n    height: 100%;\r\n    left: 0;\r\n    top: 0;\r\n    font-size: 14px;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    background-color: rgba(0, 0, 0, 0.502);\r\n    box-sizing: border-box;\r\n    overflow: auto;\r\n    padding-top: 10px;\r\n    padding-bottom: 10px;\r\n}\r\n\r\n.kv-ow-modal-manager:empty {\r\n    display: none;\r\n}\r\n\r\n.kv-ow-modal {\r\n    white-space: nowrap;\r\n    text-align: center;\r\n    position: absolute;\r\n    z-index: 1;\r\n    left: 0;\r\n    right: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    box-sizing: border-box;\r\n    padding: 60px 20px 10px 20px;\r\n}\r\n\r\n.kv-ow-modal::before {\r\n    content: \"\";\r\n    height: 66%;\r\n}\r\n\r\n.kv-ow-modal::before,\r\n.kv-ow-modal-window {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.kv-ow-modal-window {\r\n    background-color: white;\r\n    white-space: normal;\r\n    text-align: left;\r\n    -webkit-box-shadow: 2px 2px 6px 0 rgba(0, 0, 90, 0.55);\r\n    -moz-box-shadow: 2px 2px 6px 0 rgba(0, 0, 90, 0.55);\r\n    box-shadow: 2px 2px 6px 0 rgba(0, 0, 90, 0.55);\r\n    border-radius: 4px;\r\n    max-width: 100%;\r\n    max-height: 100%;\r\n    overflow: hidden;\r\n    box-sizing: border-box;\r\n    display: inline-flex;\r\n    flex-direction: column;\r\n    align-items: stretch;\r\n}\r\n\r\n.kv-ow-modal-title {\r\n    font-size: 14px;\r\n    line-height: 1.5;\r\n    font-weight: bold;\r\n}\r\n\r\n.kv-ow-modal-header {\r\n    padding: 10px 10px 5px 10px;\r\n}\r\n\r\n.kv-ow-modal-body {\r\n    flex-grow: 1;\r\n    overflow-y: auto;\r\n    padding: 10px 10px;\r\n}\r\n\r\n.kv-ow-modal-footer {\r\n    padding: 10px 10px;\r\n    text-align: center;\r\n}\r\n\r\n.kv-ow-modal-header:empty,\r\n.kv-ow-modal-body:empty,\r\n.kv-ow-modal-footer:empty {\r\n    display: none;\r\n}\r\n\r\n.kv-ow-modal-footer > button {\r\n    height: 30px;\r\n    min-width: 110px;\r\n}\r\n\r\n\r\n.kv-ow-modal-footer > button:not(:last-child) {\r\n    margin-right: 20px;\r\n}", ""]);



/***/ }),

/***/ 26394:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".kv-comment-item {\r\n    font-size: 1rem;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    position: relative;\r\n\r\n    padding: 0 calc(2em + 7px) 0 calc(2.85em + 20px);\r\n    cursor: pointer;\r\n    background-color: white;\r\n}\r\n\r\n.kv-comment-item:hover{\r\n    background-color: #f2f5fa;\r\n}\r\n\r\n\r\n.kv-comment-avatar-ctn {\r\n    position: absolute;\r\n    left: 10px;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.kv-comment-avatar-ctn::before,\r\n.kv-comment-item-flag-ctn::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    height: 100%;\r\n    vertical-align: middle;\r\n}\r\n\r\n.kv-comment-avatar {\r\n    width: 2.85em;\r\n    height: 2.85em;\r\n    background-size: cover;\r\n    border-radius: 50%;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.kv-comment-item-content {\r\n    padding: 5px 10px;\r\n    border: 1px solid #d6d6d6;\r\n    border-radius: 7px;\r\n    line-height: 1.5;\r\n}\r\n\r\n\r\n.kv-comment-item-flag-ctn {\r\n    position: absolute;\r\n    right: 10px;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.kv-comment-item-flag-unread {\r\n    display: none;\r\n    vertical-align: middle;\r\n    width: 0.75em;\r\n    height: 0.75em;\r\n    background-color: blue;\r\n    border-radius: 50%;\r\n}\r\n\r\n.kv-comment-item.as-unread .kv-comment-item-flag-unread {\r\n    display: inline-block;\r\n}\r\n\r\n.kv-comment-item-time {\r\n    font-weight: bold;\r\n}", ""]);



/***/ }),

/***/ 12761:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-linear-color-bar {\r\n    position: relative;\r\n    height: 2em;\r\n}\r\n\r\n.as-linear-color-background {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    right: 0;\r\n    bottom: 0;\r\n    display: block;\r\n}\r\n\r\n.as-linear-color-value-text {\r\n    position: absolute;\r\n    top: 0;\r\n    font-weight: 900;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-linear-color-min-value-text,\r\n.as-linear-color-max-value-text {\r\n    position: absolute;\r\n    bottom: 0;\r\n    white-space: nowrap;\r\n    font-weight: bold;\r\n}\r\n\r\n\r\n\r\n.as-linear-color-min-value-text {\r\n    left: 0;\r\n}\r\n\r\n.as-linear-color-rect {\r\n    stroke: none;\r\n}\r\n\r\n\r\n.as-linear-color-value-arrow {\r\n    fill: rgb(244, 124, 32);\r\n    stroke: rgb(244, 124, 32);\r\n}\r\n\r\n.as-linear-color-split-line {\r\n    stroke: white;\r\n}\r\n\r\n\r\n.as-linear-color-tiny-bar {\r\n    font-size: 1rem;\r\n    --value: 1;\r\n    --extend: 0.5;\r\n    --color: green;\r\n    position: relative;\r\n\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    white-space: nowrap;\r\n}\r\n\r\n\r\n.as-linear-color-tiny-text {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    padding-right: 0.3em;\r\n    width: 4em;\r\n    text-align: right;\r\n}\r\n\r\n.as-linear-color-tiny-bar-rect {\r\n    height: calc(10em / 14);\r\n    width: calc(10em * var(--value) / 1.4);\r\n    max-width: calc(10em / 1.4 + 10em * var(--extend) / 1.4);\r\n    min-width: 3px;\r\n    background-color: var(--color);\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n", ""]);



/***/ }),

/***/ 22691:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-list-compare-tool {\r\n    border: 1px solid #ddd;\r\n    box-sizing: border-box;\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\r\n    --item-min-width: 10px;\r\n    min-width: calc(var(--item-min-width) + var(--item-min-width) + 122px + 44px);\r\n    overflow: hidden;\r\n    --list-max-height: auto;\r\n    position: relative;\r\n}\r\n\r\n.as-remove-line-tool-active .as-list-compare-tool-body,\r\n.as-remove-line-tool-active .as-lct-item {\r\n    cursor: none;\r\n}\r\n\r\n.as-lct-cursor {\r\n    position: absolute;\r\n    pointer-events: none;\r\n    z-index: 1e9;\r\n    top: -100px;\r\n    left: -100px;\r\n    font-size: 25px;\r\n    width: 30px;\r\n    height: 30px;\r\n    color: rgba(0, 0, 0, 0.75);\r\n}\r\n\r\n.as-list-compare-tool-header {\r\n    padding-bottom: 5px;\r\n    border-bottom: 1px solid #ddd;\r\n}\r\n\r\n.as-list-compare-tool-header .as-form-cmd-tool,\r\n.as-list-compare-tool-check-ctn {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n}\r\n\r\n.as-list-compare-tool-header .as-cmd-tool-group-x2::before {\r\n    display: none;\r\n}\r\n\r\n.as-list-compare-tool-body {\r\n    width: 100%;\r\n    white-space: nowrap;\r\n    position: relative;\r\n    padding: 30px 10px 10px 10px;\r\n    box-sizing: border-box;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-list-compare-tool-before-title,\r\n.as-list-compare-tool-after-title{\r\n    position: absolute;\r\n    top: 5px;\r\n    line-height: 20px;\r\n    background-color: white;\r\n    z-index: 11;\r\n}\r\n\r\n.as-list-compare-tool-before-title {\r\n    left: 10px;\r\n    line-height: 20px;\r\n}\r\n\r\n.as-list-compare-tool-after-title {\r\n    left: calc(50% + 60px);\r\n}\r\n\r\n.as-list-compare-tool-before-title::before {\r\n    content: \"Form cũ\";\r\n}\r\n\r\n\r\n.as-list-compare-tool-after-title::before {\r\n    content: \"Form mới\";\r\n}\r\n\r\n/*.as-list-compare-tool.as-display-inline {*/\r\n/*    display: inline-block;*/\r\n/*}*/\r\n\r\n.as-list-compare-tool-before,\r\n.as-list-compare-tool-after,\r\n.as-list-compare-tool-spacing {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    position: relative;\r\n\r\n}\r\n\r\n\r\n.as-list-compare-tool-before,\r\n.as-list-compare-tool-after {\r\n    border: 1px solid #ddd;\r\n    box-sizing: border-box;\r\n    width: calc(50% - 60px);\r\n    max-height: var(--list-max-height);\r\n    overflow-block: auto;\r\n}\r\n\r\n\r\n.as-list-compare-tool-before .as-lct-item:not(:last-child),\r\n.as-list-compare-tool-after .as-lct-item:not(:last-child) {\r\n    border-bottom: 1px solid #ddd;\r\n    height: 29px;\r\n}\r\n\r\n\r\n.as-list-compare-tool-spacing {\r\n    width: 120px;\r\n    height: 30px;\r\n}\r\n\r\n.as-list-compare-tool-operators > svg {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-list-compare-tool-operators {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    pointer-events: none;\r\n    z-index: 10;\r\n}\r\n\r\n.as-list-compare-tool-operators > svg .as-lct-line-group:not(.as-same-value) .as-lct-line-hit-box {\r\n    pointer-events: all;\r\n}\r\n\r\n.as-list-compare-tool.as-view-changed {\r\n\r\n}\r\n\r\n\r\n.as-list-compare-tool.as-view-unchanged {\r\n\r\n}\r\n\r\n\r\n.as-list-compare-tool.as-remove-line-tool-active .as-lct-line-group:hover:not(.as-same-value) .as-lct-line-hit-box {\r\n    stroke: rgba(255, 100, 0, 0.5);\r\n}\r\n\r\n\r\n.as-lct-line {\r\n    fill: none;\r\n    stroke: blue;\r\n}\r\n\r\n.as-lct-line-hit-box {\r\n    stroke-width: 8px;\r\n    stroke: transparent;\r\n}\r\n\r\n.as-lct-line-group.as-same-value .as-lct-line {\r\n    stroke: #9cf6b6;\r\n}\r\n\r\n.as-lct-line.as-new-line {\r\n    stroke: #c07777;\r\n}\r\n\r\n.as-lct-arrow {\r\n    fill: blue;\r\n    stroke: none;\r\n}\r\n\r\n.as-lct-same-value-arrow {\r\n    fill: #9cf6b6;\r\n    stroke: none;\r\n}\r\n\r\n.as-lct-new-line-arrow {\r\n    stroke: none;\r\n    fill: #c07777;\r\n}\r\n\r\n\r\n.as-lct-item {\r\n    white-space: nowrap;\r\n    height: 28px;\r\n    box-sizing: border-box;\r\n    padding-right: 10px;\r\n    position: relative;\r\n    overflow: visible;\r\n    padding-left: 10px;\r\n}\r\n\r\n\r\n.as-list-compare-tool.as-view-changed-only .as-lct-item:not(.as-mapped):not(.as-removed):not(.as-added) {\r\n    display: none;\r\n}\r\n\r\n.as-lct-item.as-removed {\r\n    background-color: #fbcece;\r\n}\r\n\r\n.as-lct-item.as-added {\r\n    background-color: #cedbfb;\r\n}\r\n\r\n\r\n.as-lct-item:hover {\r\n    background-color: var(--as-transparent-button-hover-color);\r\n}\r\n\r\n.as-lct-item.as-active {\r\n    background-color: var(--as-transparent-button-active-color);\r\n}\r\n\r\n.as-lct-item::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.as-lct-item::after {\r\n    content: \"\";\r\n    display: block;\r\n    position: absolute;\r\n    z-index: 5;\r\n    top: calc(50% - 5px);\r\n    right: 5px;\r\n    width: 10px;\r\n    height: 10px;\r\n    background-color: #cdcdcd;\r\n    border-radius: 50%;\r\n}\r\n\r\n\r\n.as-lct-item.as-removed,\r\n.as-lct-item.as-added {\r\n    cursor: pointer;\r\n}\r\n\r\n.as-lct-item.as-removed::after,\r\n.as-lct-item.as-added::after {\r\n    background-color: #37e0e0;\r\n\r\n}\r\n\r\n\r\n\r\n.as-list-compare-tool-after .as-lct-item::after {\r\n    left: 5px;\r\n}\r\n\r\n.as-list-compare-tool-after .as-lct-item {\r\n    padding-left: 15px;\r\n}\r\n\r\n\r\n.as-lct-item-text {\r\n    padding-right: 20px;\r\n}\r\n\r\n.as-lct-item-text,\r\n.as-lct-item-icon-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-lct-item-icon-ctn {\r\n    width: 25px;\r\n    height: 20px;\r\n    text-align: left;\r\n}\r\n\r\n.as-lct-item-icon-ctn > * {\r\n    font-size: 20px;\r\n    display: block;\r\n}\r\n\r\n.as-lct-item-text::before {\r\n    content: attr(data-text);\r\n}", ""]);



/***/ }),

/***/ 98375:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-location-input-modal {\r\n    z-index: 800001;\r\n    background-color: rgb(0, 0, 0, 0.1);\r\n}\r\n\r\n\r\n.as-location-picker-control-ctn {\r\n    margin: 10px;\r\n    background-color: white;\r\n    box-shadow: rgb(0 0 0 / 30%) 0px 1px 4px -1px;\r\n    border-radius: 2px;\r\n}\r\n\r\n\r\n.as-location-picker-control-btn {\r\n    width: 40px;\r\n    height: 40px;\r\n    padding: 0;\r\n    box-sizing: border-box;\r\n    background-color: transparent;\r\n    border: none;\r\n    color: rgb(102, 102, 102);\r\n}\r\n\r\n.as-location-picker-control-btn:hover {\r\n    color: black;\r\n}\r\n\r\n.gm-ui-hover-effect {\r\n    outline: none;\r\n}\r\n\r\n.as-location-picker-control-btn > span {\r\n    font-size: 2em;\r\n}\r\n\r\n\r\n.as-location-picker-search-input {\r\n    height: 30px;\r\n    width: 250px;\r\n    border-radius: 2px;\r\n    padding-right: 30px;\r\n    position: relative;\r\n}\r\n\r\n.as-location-picker-search-input > input {\r\n    outline: none;\r\n}\r\n\r\n\r\n.as-location-picker-search-input-search-icon-ctn {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: 30px;\r\n    text-align: center;\r\n    font-size: 20px;\r\n    color: rgb(102, 102, 102);\r\n}\r\n\r\n.as-location-picker-search-input-search-icon-ctn:hover {\r\n    color: black;\r\n}\r\n\r\n.as-location-picker-search-input-search-icon-ctn::before,\r\n.as-location-picker-search-input-search-icon-ctn > span {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-location-picker-search-input-search-icon-ctn::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n.as-location-picker-control-ctn .as-flexicon-button {\r\n    font-size: 14px;\r\n    min-width: 9em;\r\n    height: calc(2em + 2px);\r\n}\r\n\r\n.as-location-picker-control-ctn .as-flexicon-button:not(:last-child) {\r\n    margin-right: 20px;\r\n}\r\n\r\n\r\n.as-location-picker-control-ctn.as-transparent {\r\n    background-color: transparent;\r\n    box-shadow: none;\r\n}\r\n\r\n.as-location-picker.as-read-only .as-location-picker-cancel-btn,\r\n.as-location-picker.as-read-only .as-location-picker-search-input {\r\n    display: none;\r\n}\r\n\r\n.as-location-picker-control-ctn.as-bottom button{\r\n    box-shadow: 0 0px 2px 4px white;\r\n    -webkit-box-shadow: 0 0 2px 4px white;\r\n    -moz-box-shadow: 0 0 2px 4px white;\r\n}\r\n\r\n\r\n.as-location-input-modal {\r\n\r\n}\r\n\r\n.as-location-input-modal-window {\r\n    padding: 10px;\r\n    width: calc(100vw - 10px);\r\n    height: calc(100vh - 10px);\r\n    box-sizing: border-box;\r\n    max-width: 900px;\r\n    max-height: 600px;\r\n    box-shadow: 0px 1px 4px -1px rgba(0, 0, 0, 0.7);\r\n    -webkit-box-shadow: 0px 1px 4px -1px rgba(0, 0, 0, 0.7);\r\n    border-radius: 5px;\r\n    background-color: white;\r\n}\r\n\r\n\r\n.as-location-input-modal-window > .as-location-picker {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-location-input {\r\n    height: var(--as-input-height);\r\n    border-radius: var(--as-input-border-radius);\r\n    border: 1px solid #dddddd;\r\n    box-sizing: border-box;\r\n    width: calc(13em + 50px);\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    position: relative;\r\n    background-color: white;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n}\r\n\r\n\r\n.as-location-input.as-disabled {\r\n    background-color: var(--as-disabled-background-color);\r\n    pointer-events: none;\r\n}\r\n\r\n\r\n.as-location-input-text {\r\n    outline: none;\r\n    width: calc(100% - 2em - 1px);\r\n    height: 100%;\r\n    border: none;\r\n    background-color: transparent;\r\n    display: block;\r\n    padding: 0 0 0 var(--as-input-horizontal-padding);\r\n    font: inherit;\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.as-location-input-icon-ctn {\r\n    border-left: 1px solid #ddd;\r\n    border-right: none;\r\n    border-top: none;\r\n    border-bottom: none;\r\n    text-align: center;\r\n    position: absolute;\r\n    right: 0;\r\n    width: calc(2rem + 1px);\r\n    box-sizing: border-box;\r\n    top: 0;\r\n    height: 100%;\r\n    background-color: rgba(169, 169, 169, 0.1);\r\n    cursor: pointer;\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.as-location-input-icon-ctn:hover {\r\n    background-color: rgba(169, 169, 169, 0.25);\r\n}\r\n\r\n.as-location-input-icon-ctn:active {\r\n    background-color: rgba(169, 169, 169, 0.5);\r\n}\r\n\r\n\r\n.as-location-input-icon-ctn > span {\r\n    line-height: 2em;\r\n    font-size: calc(16em / 14);\r\n}\r\n\r\n.as-location-input.as-disabled {\r\n    color: var(--as-disabled-text-color);\r\n    pointer-events: none;\r\n}\r\n\r\n.as-location-input.as-disabled input {\r\n    background-color: var(--as-disabled-background-color);\r\n}\r\n\r\n.as-location-input.as-value-null .as-location-input-clear-btn,\r\n.as-location-input.as-must-not-null .as-location-input-clear-btn {\r\n    display: none;\r\n}\r\n\r\n.as-location-input-clear-btn {\r\n    font-size: inherit;\r\n    position: absolute;\r\n    right: calc(2em + 2px);\r\n    height: calc(2em + 2px);\r\n    top: calc(50% - -1em - 1px);\r\n    box-sizing: border-box;\r\n    background-color: transparent;\r\n    border: none;\r\n    color: #bbb;\r\n    visibility: hidden;\r\n}\r\n\r\n.as-location-input-clear-btn:hover {\r\n    color: rgb(132, 132, 132)\r\n}\r\n\r\n.as-location-input-clear-btn:active {\r\n    color: #525555;\r\n}\r\n\r\n.as-location-input-text:focus + .as-location-input-clear-btn,\r\n.as-location-input:hover .as-location-input-clear-btn {\r\n    visibility: visible;\r\n}\r\n\r\n\r\n@media screen and (max-width: 600px) {\r\n    .as-location-input-modal-window {\r\n        max-width: unset;\r\n        max-height: unset;\r\n\r\n    }\r\n}\r\n\r\n\r\n@media screen  and  (max-width: 500px) {\r\n    .as-location-picker-control-ctn.as-top {\r\n        margin-top: 60px;\r\n        width: calc(100% - 20px);\r\n    }\r\n\r\n    .as-location-picker-control-ctn.as-top .as-location-picker-search-input {\r\n        width: 100%;\r\n    }\r\n\r\n    .as-location-input-modal-window {\r\n        padding: 0;\r\n    }\r\n\r\n    .as-location-picker-control-ctn.as-bottom button{\r\n        margin-top: 20px;\r\n    }\r\n}\r\n\r\n\r\n.as-location-input-modal.as-mobile .as-location-input-modal-window {\r\n    height: calc(100vh - 80px);\r\n}", ""]);



/***/ }),

/***/ 40091:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".vmedia-no-show {\r\n    position: fixed;\r\n    top: 0;\r\n    left: 0;\r\n    width: 1;\r\n    height: 1;\r\n    z-index: -100000;\r\n    opacity: 0;\r\n}\r\n\r\n.vmedia-no-select,\r\n.vmedia-no-select * {\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none;\r\n    user-select: none;\r\n}\r\n\r\ncoccocgrammar {\r\n    display: none;\r\n}\r\n\r\n.vmedia-media-input {\r\n    box-sizing: border-box;\r\n    border: solid 1px rgba(0, 0, 0, 0.1)\r\n}\r\n\r\n\r\n.vmedia-media-input-text-container {\r\n    position: relative;\r\n    min-height: 2.5em;\r\n}\r\n\r\n.vmedia-media-input-text-container-editor:focus {\r\n    outline: none;\r\n}\r\n\r\n.vmedia-media-input-text-container-editor img {\r\n    display: none;\r\n}\r\n\r\n.vmedia-media-input-text-container-editor * {\r\n    font-family: inherit;\r\n    font-size: inherit;\r\n    font-weight: inherit;\r\n    text-decoration: inherit;\r\n    color: inherit;\r\n    background: none;\r\n    padding: 0;\r\n    margin: 0;\r\n    white-space: pre;\r\n}\r\n\r\n.vmedia-media-input-text-container-editor {\r\n    min-height: 2em;\r\n    padding-left: 0.5em;\r\n    padding-top: 0.25em;\r\n    padding-bottom: 0.25em;\r\n    margin-right: 0.5em;\r\n    box-sizing: border-box;\r\n    max-height: 6.66666666em;\r\n    overflow-x: hidden;\r\n    overflow-y: auto;\r\n}\r\n\r\n.vmedia-media-input-imagepreview-container {\r\n    white-space: normal;\r\n}\r\n\r\n.vmedia-media-input:not(.dragover) .vmedia-media-input-dropover {\r\n    display: none;\r\n}\r\n\r\n.vmedia-media-input-dropover {\r\n    display: inline-block;\r\n    width: 7em;\r\n    height: 7em;\r\n}\r\n\r\n.vmedia-media-input-dropover>svg {\r\n    width: 7em;\r\n    height: 7em;\r\n}\r\n\r\n.vmedia-media-input-imagepreview-container .vmedia-media-input-filepreview,\r\n.vmedia-media-input-imagepreview-container .vmedia-media-input-imagepreview {\r\n    margin: 0.3em;\r\n    vertical-align: middle;\r\n}\r\n\r\n.vmedia-media-input-filepreview,\r\n.vmedia-media-input-imagepreview {\r\n    position: relative;\r\n    display: inline-block;\r\n}\r\n\r\n.vmedia-media-input-imagepreview img {\r\n    height: 2.5em;\r\n    width: auto;\r\n}\r\n\r\n.vmedia-media-input-filepreview svg.attachment {\r\n    height: 2em;\r\n    width: 2em;\r\n}\r\n\r\n.vmedia-media-input-filepreview svg.times,\r\n.vmedia-media-input-imagepreview svg.times {\r\n    position: absolute;\r\n    top: 0.1em;\r\n    right: 0.1em;\r\n    width: 1em;\r\n    height: 1em;\r\n    fill: rgba(69, 69, 69, 0.6);\r\n}\r\n\r\n.vmedia-media-input-filepreview svg.times:hover,\r\n.vmedia-media-input-imagepreview svg.times:hover {\r\n    fill: rgba(144, 144, 144, 0.6);\r\n}\r\n\r\n.vmedia-media-input-filepreview svg.times:active,\r\n.vmedia-media-input-imagepreview svg.times:active {\r\n    fill: rgba(220, 220, 240, 0.6);\r\n}\r\n\r\n.vmedia-media-input-plug-button-container {\r\n    position: absolute;\r\n    left: 0.25em;\r\n    bottom: 0.25em;\r\n    top: 0.25em;\r\n}\r\n\r\n.vmedia-media-input-plug-button-container svg {\r\n    height: 1.5em;\r\n    width: 1.5em;\r\n    vertical-align: middle;\r\n    transition: transform .22s cubic-bezier(.5, 0, .4, 1);\r\n}\r\n\r\n\r\n.vmedia-media-input-plug-button-container svg path {\r\n    fill: rgba(66, 133, 244, 0.7);\r\n    transition: fill .22s cubic-bezier(.5, 0, .4, 1);\r\n}\r\n\r\n.vmedia-media-input.show-plugin .vmedia-media-input-plug-button svg path {\r\n    fill: rgba(134, 142, 153, 0.75);\r\n}\r\n\r\n\r\n\r\n.vmedia-media-input-plug-button {\r\n    padding: 0;\r\n    height: 100%;\r\n    width: 2em;\r\n    border: none;\r\n    background: transparent;\r\n    outline: none;\r\n\r\n}\r\n\r\n\r\n.vmedia-media-input-plugin-content-container {\r\n    position: absolute;\r\n    bottom: calc(1px + 100%);\r\n    opacity: 1;\r\n    transition: opacity .22s cubic-bezier(.5, 0, .4, 1);\r\n    background-color: white;\r\n    box-sizing: border-box;\r\n    border: solid 1px rgba(0, 0, 0, 0.1);\r\n    z-index: 20;\r\n    background: white;\r\n}\r\n\r\n.vmedia-media-input-plugin-content-container:empty{\r\n    display: none;\r\n}\r\n\r\n\r\n\r\n.vmedia-media-input-tool-container {\r\n    position: relative;\r\n    display: block;\r\n    height: 1.5em;\r\n    /* background: red;     */\r\n}\r\n\r\n\r\n\r\n.vmedia-media-input-tool-container-left {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.vmedia-media-input-tool-container-right {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.vmedia-media-input-tool-container button {\r\n    width: 2.5em;\r\n    height: 100%;\r\n    font-size: 1em;\r\n    margin-left: 0.1em;\r\n    margin-right: 0.1em;\r\n    border: none;\r\n    background-color: transparent;\r\n    border-radius: 0.4em;\r\n}\r\n\r\n.vmedia-media-input-text-container-editor {\r\n    scrollbar-width: thin;\r\n}\r\n\r\n.vmedia-media-input-text-container-editor::-webkit-scrollbar {\r\n    width: 7px;\r\n}\r\n\r\n\r\n\r\n.vmedia-media-input-text-container-editor::-webkit-scrollbar-track {\r\n    background: rgb(240, 240, 240);\r\n}\r\n\r\n.vmedia-media-input-text-container-editor::-webkit-scrollbar-thumb {\r\n    background: rgb(205, 205, 205);\r\n}\r\n\r\n.vmedia-media-input-tool-container button svg {\r\n    height: 1.25em;\r\n    width: 1.25em;\r\n}\r\n\r\n.vmedia-media-input-tool-container button:hover {\r\n    background-color: rgba(91, 192, 222, 0.1);\r\n}\r\n\r\n.vmedia-media-input-tool-container button:active {\r\n    background-color: rgba(91, 192, 222, 0.4);\r\n}\r\n\r\n.vmedia-media-input-tool-container button svg.send {\r\n    fill: rgba(66, 133, 244, 0.7);\r\n}\r\n\r\n.vmedia-media-input-tool-container button svg.add-file,\r\n.vmedia-media-input-tool-container button svg.add-image {\r\n    fill: rgba(66, 66, 66, 0.5);\r\n}\r\n\r\n.vmedia-media-input-tool-container button .mdi{\r\n    font-size:1.2em; \r\n}\r\n\r\n.vmedia-media-input-tool-container button:focus {\r\n    outline: none;\r\n}\r\n\r\n.vmedia-media-input-tool-container button{\r\n    vertical-align: middle;\r\n}\r\n\r\n.vmedia-media-input-plugin-content-container.blur{\r\n    visibility: hidden;\r\n}", ""]);



/***/ }),

/***/ 5848:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-ico {\r\n    width: 1em;\r\n    height: 1em;\r\n}\r\n\r\n.absol-button {\r\n    white-space: normal;\r\n    -webkit-touch-callout: none;\r\n    -webkit-user-select: none;\r\n    -khtml-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none;\r\n    user-select: none;\r\n}\r\n\r\n.absol-dropdown {\r\n    position: relative;\r\n}\r\n\r\n.absol-dropdown-content {\r\n    z-index: 1;\r\n    position: fixed;\r\n    left: 0;\r\n    top: 0;\r\n    overflow: auto;\r\n    -webkit-touch-callout: none;\r\n    -webkit-user-select: none;\r\n    -khtml-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none;\r\n    user-select: none;\r\n}\r\n\r\n.absol-dropdown.top > .absol-dropdown-content {\r\n    top: auto;\r\n    bottom: 100%;\r\n}\r\n\r\n.absol-dropdown.overlap-left > .absol-dropdown-content {\r\n    left: auto;\r\n    right: 0;\r\n}\r\n\r\n.absol-dropright {\r\n    position: relative;\r\n}\r\n\r\n.absol-dropright-content {\r\n    z-index: 1;\r\n    position: fixed;\r\n    left: 0;\r\n    top: 0;\r\n    -webkit-touch-callout: none;\r\n    -webkit-user-select: none;\r\n    -khtml-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none;\r\n    user-select: none;\r\n    overflow: auto;\r\n}\r\n\r\n.absol-dropright.overlap-top > .absol-dropright-content {\r\n    top: unset;\r\n    bottom: 0;\r\n}\r\n\r\n.absol-drop-hidden > .absol-dropdown-content,\r\n.absol-drop-hidden > .absol-dropright-content {\r\n    visibility: hidden;\r\n    top: 0 !important;\r\n    left: 0 !important;\r\n    max-height: 99vh !important;\r\n    opacity: 0;\r\n    pointer-events: none;\r\n}\r\n\r\n.absol-drop-hidden > .absol-dropright-content *,\r\n.absol-drop-hidden > .absol-dropdown-content * {\r\n    visibility: hidden;\r\n}\r\n\r\n.absol-hmenu {\r\n    display: inline-block;\r\n    background-color: rgb(252, 252, 255);\r\n    /* background-color: rgb(33, 33, 33); */\r\n\r\n}\r\n\r\n.absol-hmenu > .absol-dropdown {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.absol-hmenu-button:hover,\r\n.absol-hmenu .absol-hmenu-button-hover {\r\n\r\n    background-color: rgb(175, 175, 175);\r\n}\r\n\r\n.absol-hmenu-button {\r\n    padding-left: 1em;\r\n    padding-right: 1em;\r\n}\r\n\r\n.absol-hmenu-button:focus {\r\n    outline: none;\r\n}\r\n\r\n.absol-hmenu-button,\r\n.absol-vmenu-button {\r\n    color: rgb(55, 55, 55);\r\n    height: 100%;\r\n    background-color: transparent;\r\n    font-size: 1em;\r\n    border: none;\r\n    padding: 0;\r\n    margin: 0;\r\n    outline: none;\r\n}\r\n\r\n.absol-hmenu-button {\r\n    padding-left: 1em;\r\n    padding-right: 1em;\r\n}\r\n\r\n.absol-vmenu {\r\n\r\n}\r\n\r\n.absol-hmenu .absol-dropdown-content,\r\n.absol-hmenu .absol-dropright-content,\r\n.as-v-root-menu .absol-dropright-content {\r\n    padding-top: 0.4em;\r\n    padding-bottom: 0.4em;\r\n    background-color: rgb(252, 252, 255);\r\n    -webkit-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    -moz-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n}\r\n\r\n.absol-vmenu-button {\r\n    text-align: left;\r\n    padding-left: 0.5em;\r\n    padding-right: 2em;\r\n    height: 1.8em;\r\n    white-space: nowrap;\r\n    position: relative;\r\n    display: block;\r\n}\r\n\r\nimg.absol-vmenu-button-icon {\r\n    opacity: 0;\r\n    display: none;\r\n}\r\n\r\nimg.absol-vmenu-button-icon[src] {\r\n    display: block;\r\n}\r\n\r\n.absol-vmenu-button-ext-icon-container {\r\n    display: inline-block;\r\n    width: 1.2em;\r\n    height: 1.2em;\r\n    vertical-align: middle;\r\n    margin-right: 0.5em;\r\n}\r\n\r\n.absol-vmenu-button-ext-icon-container > span,\r\n.absol-vmenu-button-ext-icon-container > i {\r\n    font-size: 1.2em;\r\n    line-height: 1;\r\n    display: block;\r\n}\r\n\r\n\r\n.absol-vmenu-button-ext-icon-container > svg,\r\n.absol-vmenu-button-ext-icon-container > img {\r\n    height: 1.2em;\r\n    width: 1.2em;\r\n    display: block;\r\n}\r\n\r\n\r\n.absol-vmenu-button-text,\r\n.absol-vmenu-button-key {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.absol-vmenu-button-key {\r\n    font-style: italic;\r\n    text-align: right;\r\n    margin-left: 1em;\r\n}\r\n\r\n.absol-vmenu-arrow-container {\r\n    position: absolute;\r\n    right: 0.2em;\r\n    top: 0.3em;\r\n    bottom: 0.3em;\r\n}\r\n\r\n\r\n.absol-vmenu-arrow-container::after {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n\r\n.absol-vmenu-arrow {\r\n    display: inline-block;\r\n    font-size: inherit;\r\n    vertical-align: middle;\r\n}\r\n\r\n.absol-menu-item-disabled .absol-vmenu-arrow {\r\n    display: none;\r\n}\r\n\r\n.absol-vmenu-button:hover,\r\n.absol-vmenu .absol-vmenu-button-hover {\r\n    background-color: rgb(214, 214, 217);\r\n}\r\n\r\n.absol-menu-item-disabled .absol-vmenu-button:hover,\r\n.absol-menu-item-disabled .absol-vmenu .absol-vmenu-button-hover,\r\n.absol-menu-item-disabled .absol-hmenu-button:hover,\r\n.absol-menu-item-disabled .absol-hmenu .absol-hmenu-button-hover {\r\n    background-color: transparent;\r\n}\r\n\r\n.absol-vmenu-line {\r\n    text-align: center;\r\n    padding: 0.2em 1em;\r\n}\r\n\r\n.absol-vmenu-line > div {\r\n    height: 1px;\r\n    background-color: rgb(97, 97, 97);\r\n}\r\n\r\n.absol-menu-item-disabled {\r\n}\r\n\r\n.absol-menu-item-hidden {\r\n    display: none;\r\n}\r\n\r\n.absol-menu-item-disabled button {\r\n    color: rgb(155, 155, 159);\r\n}\r\n\r\n.dark .absol-menu-item-disabled button {\r\n    color: rgb(100, 100, 100);\r\n}\r\n\r\n.dark .absol-vmenu-button:hover,\r\n.dark .absol-vmenu .absol-vmenu-button-hover {\r\n    background-color: rgb(9, 71, 113);\r\n}\r\n\r\n\r\n.dark .absol-hmenu .absol-dropdown-content,\r\n.dark .absol-hmenu .absol-dropright-content {\r\n    background-color: rgb(37, 37, 38);\r\n}\r\n\r\n\r\n.dark .absol-hmenu-button,\r\n.dark .absol-vmenu-button {\r\n    color: rgb(200, 200, 200);\r\n\r\n}\r\n\r\n\r\n.dark .absol-hmenu-button:hover,\r\n.dark .absol-hmenu .absol-hmenu-button-hover {\r\n    background-color: rgb(80, 80, 80);\r\n}\r\n\r\n\r\n.dark .absol-hmenu {\r\n    background-color: rgb(33, 33, 33);\r\n}\r\n\r\n/*standard-alone*/\r\n.absol-vmenu-button.standard-alone {\r\n    height: 2em;\r\n    border-radius: 0.3em;\r\n    border: solid rgb(169, 169, 170) 1px;\r\n    outline: none;\r\n}\r\n\r\n.as-v-root-menu {\r\n    display: inline-block;\r\n    box-sizing: border-box;\r\n    /*overflow-y: auto;*/\r\n    /*overflow-x: hidden;*/\r\n}", ""]);



/***/ }),

/***/ 68491:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-message-dialog {\r\n    font-size: 1rem;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    box-sizing: border-box;\r\n    background-color: white;\r\n    border-radius: 0.3em;\r\n    border: 1px solid #dddddd;\r\n    -webkit-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    -moz-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n}\r\n\r\n.as-message-dialog-header {\r\n    padding: calc(5em / 14) 1em;\r\n    border-bottom: 1px solid #e9ecef;\r\n}\r\n\r\n\r\n.as-message-dialog-title {\r\n    font-size: 1.25em;\r\n    font-weight: 500;\r\n}\r\n\r\n.as-message-dialog-body {\r\n    padding: 1em;\r\n}\r\n\r\n.as-message-dialog-footer {\r\n    text-align: right;\r\n    padding: 10px 20px;\r\n    border-top: 1px solid #e9ecef;\r\n}\r\n\r\n.as-message-dialog-footer:empty,\r\n.as-message-dialog-header:empty {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-message-dialog-footer button {\r\n    margin-left: 1.5em;\r\n}\r\n\r\n\r\n.as-message-dialog-footer button.as-flexicon-button .as-flexicon-button-text-container {\r\n    padding-left: 2em;\r\n    padding-right: 2em;\r\n}", ""]);



/***/ }),

/***/ 48904:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-conversation-box {\r\n    display: flex;\r\n    flex-direction: column;\r\n    font-size: 4rem;\r\n    --right-width: 0;\r\n}\r\n\r\n.as-conversation-box-message-ctn {\r\n    flex-grow: 1;\r\n}\r\n\r\n.as-conversation-box-input-ctn {\r\n    /** empty**/\r\n}\r\n\r\n.as-message-input {\r\n    position: relative;\r\n    box-sizing: border-box;\r\n    padding-top: calc(5em  / 14);\r\n    padding-bottom: calc(5em  / 14);\r\n    padding-left: calc(5em  / 14);\r\n    overflow: visible;\r\n    font-size: var(--as-input-font-size);\r\n    font-family: var(--as-input-font-family);\r\n}\r\n\r\n.as-message-input * {\r\n    font: inherit;\r\n}\r\n\r\n\r\n.as-message-input-plugin-btn {\r\n    font-size: inherit;\r\n    width: calc(40em / 14);\r\n    height: calc(40em / 14);\r\n    padding: 0;\r\n    border: none;\r\n    color: rgb(122, 122, 122);\r\n    background-color: rgb(241, 241, 241);\r\n    outline: none;\r\n    border-radius: 50%;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-message-input-plugin-btn:active {\r\n    background-color: rgb(212, 212, 212);\r\n}\r\n\r\n.as-message-input-plugin-btn:hover {\r\n    background-color: rgb(235, 235, 235);\r\n\r\n}\r\n\r\n\r\n.as-message-input-plugin-btn span {\r\n    font-size: calc(24em / 14);\r\n}\r\n\r\n\r\n.as-message-input-right {\r\n    position: absolute;\r\n    bottom: calc(10em / 14);\r\n    right: calc(5em / 14);\r\n    z-index: 0;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-message-input-right .as-message-input-plugin-btn {\r\n    margin-left: calc(10em / 14);\r\n}\r\n\r\n\r\n.as-message-input-left {\r\n    position: absolute;\r\n    left: calc(5em / 14);\r\n    bottom:calc(5em / 14);\r\n}\r\n\r\n\r\n.as-message-input-pre-ctn {\r\n    position: relative;\r\n    width: calc(100% - var(--right-width));\r\n    border-radius: 1.8em;\r\n    box-sizing: border-box;\r\n    transition: width 0.1s;\r\n    padding: calc(10em / 14) calc(20em / 14) calc(10em / 14) 3.57em;\r\n    background-color: rgb(241, 241, 244);\r\n}\r\n\r\n\r\n.as-message-input-pre-ctn::after {\r\n    display: inline-block;\r\n    content: \"\";\r\n    height: calc(2em + 2px);\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-message-input:not(.as-v2)  .as-message-input-pre:before {\r\n    content: \"\";\r\n    line-height: calc(2em + 2px);\r\n    display: inline;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n/*.as-message-input.as-has-text.as-text-changed .as-message-input-pre-ctn,*/\r\n/*.as-message-input.as-has-quote .as-message-input-pre-ctn,*/\r\n/*.as-message-input.as-has-attachment .as-message-input-pre-ctn {*/\r\n/*    width: calc(100% - 4em - var(--always-visible-buttons-width));*/\r\n/*}*/\r\n\r\n\r\n.as-message-input-pre {\r\n    display: inline-block;\r\n    width: calc(100% - 2px);\r\n    max-height: 6.5em;\r\n    box-sizing: border-box;\r\n    font-family: inherit;\r\n    font-size: inherit;\r\n    outline: none;\r\n    vertical-align: middle;\r\n    margin: 0;\r\n    white-space: pre-wrap;\r\n    overflow-x: hidden;\r\n    overflow-y: auto;\r\n    line-height: 1.5;\r\n    border: none;\r\n}\r\n\r\n\r\n\r\n.as-message-input-camera-caller,\r\n.as-message-input-camera-microphone {\r\n    display: none;\r\n}\r\n\r\n.as-message-input-emoji-picker-ctn {\r\n    position: absolute;\r\n    bottom: 100%;\r\n    left: 0;\r\n    right: 0;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    background-color: white;\r\n}\r\n\r\n\r\n.as-message-input-plugin-btn.as-message-input-plugin-send {\r\n    color: white;\r\n    background: linear-gradient(135deg, rgb(0, 120, 212), rgb(0, 188, 242));\r\n    transform: scale(1);\r\n    transition: scale 0.1s;\r\n}\r\n\r\n.as-message-input-plugin-btn.as-message-input-plugin-send span {\r\n    font-size: calc(20em / 14);\r\n}\r\n\r\n.as-message-input-plugin-btn.as-message-input-plugin-send:hover {\r\n    background: linear-gradient(135deg, rgb(0, 140, 212), rgb(0, 208, 252));\r\n}\r\n\r\n.as-message-input-plugin-btn.as-message-input-plugin-send:active {\r\n    transform: scale(0.9);\r\n}\r\n\r\n\r\n.as-message-input:not(.as-text-changed):not(.as-has-attachment):not(.as-has-quote) .as-message-input-plugin-send,\r\n.as-message-input:not(.as-has-text):not(.as-has-attachment):not(.as-has-quote) .as-message-input-plugin-send,\r\n.as-message-input:not(.as-mode-edit) .as-message-input-plugin-cancel,\r\n.as-message-input.as-mode-edit.as-text-changed.as-has-text .as-message-input-plugin-cancel,\r\n.as-message-input:not(.as-has-attachment):not(.as-drag-hover) .as-message-input-attachment-ctn,\r\n.as-message-input.as-auto-send .as-message-input-attachment-ctn,\r\n.as-message-input.as-mode-edit .as-message-input-plugin-file,\r\n.as-message-input.as-has-text .as-message-input-plugin-file,\r\n.as-message-input.as-has-quote .as-message-input-plugin-file,\r\n.as-message-input:not(.as-has-quote) .as-message-quote-box {\r\n    display: none;\r\n}\r\n\r\n.as-message-input .as-message-quote-box {\r\n    border-bottom: 1px solid #ddd;\r\n}\r\n\r\n.as-message-quote-box {\r\n    position: relative;\r\n\r\n}\r\n\r\n.as-message-input.as-has-attachment .as-message-quote-box {\r\n    margin-bottom: 5px;\r\n}\r\n\r\n.as-message-quote-remove-btn {\r\n    position: absolute;\r\n    color: rgb(43, 44, 51);\r\n    right: -7px;\r\n    top: 5px;\r\n    width: 20px;\r\n    height: 20px;\r\n    padding: 0;\r\n    background: transparent;\r\n    border: none;\r\n    border-radius: 50%;\r\n    font-size: 16px;\r\n    outline: none;\r\n}\r\n\r\n.as-message-quote-remove-btn:hover {\r\n    color: rgb(143, 144, 151);\r\n}\r\n\r\n.as-message-quote-box {\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n}\r\n\r\n.as-message-quote-box:not(.as-removable) .as-message-quote-remove-btn {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-message-quote-box > div {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n}\r\n\r\n.as-message-quote-box:not(.as-has-img):not(.as-has-file) .as-message-quote-img {\r\n    display: none;\r\n}\r\n\r\n.as-message-quote-img {\r\n    width: 40px;\r\n    height: 40px;\r\n    padding: 5px;\r\n    box-sizing: border-box;\r\n    background-size: cover;\r\n    background-origin: border-box;\r\n    background-position: center;\r\n    background-repeat: no-repeat;\r\n}\r\n\r\n.as-message-quote-sym {\r\n    width: 1.8em;\r\n}\r\n\r\n.as-message-quote-sym > span {\r\n    font-size: 1.8em;\r\n    color: rgb(169, 169, 172);\r\n}\r\n\r\n.as-message-quote-content {\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    width: calc(100% - 26px);\r\n    box-sizing: border-box;\r\n    padding-left: 20px;\r\n}\r\n\r\n.as-message-quote-box.as-has-img .as-message-quote-content,\r\n.as-message-quote-box.as-has-file .as-message-quote-content {\r\n    width: calc(100% - 66px);\r\n    padding-left: 5px;\r\n}\r\n\r\n.as-message-quote-box.as-has-file .as-message-quote-img {\r\n    background-origin: padding-box;\r\n    background-size: contain;\r\n}\r\n\r\n.as-message-quote-text {\r\n    font-size: calc(16em / 14);\r\n    line-height: 1.75;\r\n    font-style: italic;\r\n    color: rgb(43, 44, 51);\r\n    max-width: 100%;\r\n    word-break: break-word;\r\n    white-space: pre-wrap;\r\n}\r\n\r\n.as-message-quote-box.as-shorten-text .as-message-quote-text {\r\n    word-break: normal;\r\n\r\n    overflow: hidden;\r\n    white-space: nowrap;\r\n    text-overflow: ellipsis;\r\n}\r\n\r\n.as-message-quote-text .as-emoji {\r\n    width: 20px;\r\n    height: 20px;\r\n}\r\n\r\n.as-message-quote-desc {\r\n    font-size: 0.85em;\r\n    color: rgb(80, 80, 88);\r\n}\r\n\r\n.as-message-input-attachment-ctn {\r\n    border-bottom: 1px solid #ddd;\r\n    max-height: 170px;\r\n    overflow-y: auto;\r\n}\r\n\r\n\r\n.as-message-input-attach-preview {\r\n    display: inline-block;\r\n    position: relative;\r\n    width: 135px;\r\n    height: 135px;\r\n    vertical-align: middle;\r\n    margin-right: 5px;\r\n    margin-bottom: 5px;\r\n    border-radius: 10px;\r\n    background-color: white;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-message-input-attach-preview-image {\r\n    min-width: 20px;\r\n    image-orientation: from-image;\r\n    width: 100%;\r\n    height: 100%;\r\n    background-size: cover;\r\n    background-position: center center;\r\n    background-repeat: no-repeat;\r\n}\r\n\r\n\r\n.as-message-input-attach-preview-file {\r\n    max-width: 50%;\r\n    max-height: 50%;\r\n    margin-left: 10px;\r\n    margin-top: 10px;\r\n}\r\n\r\n.as-message-input-attach-preview-close-btn {\r\n    position: absolute;\r\n    right: 10px;\r\n    top: 10px;\r\n    width: 18px;\r\n    height: 18px;\r\n    border-radius: 50%;\r\n    text-align: center;\r\n    border: 1px solid white;\r\n    outline: none;\r\n    padding: 0;\r\n    color: white;\r\n    -webkit-box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.64);\r\n    -moz-box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.64);\r\n    box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.64);\r\n    background-color: rgba(100, 100, 100, 0.5);\r\n}\r\n\r\n.as-message-input-attach-preview-close-btn span {\r\n    font-size: 14px;\r\n}\r\n\r\n.as-message-input-attach-preview-close-btn:hover {\r\n    background-color: rgba(255, 255, 255, 0.5);\r\n    color: rgb(200, 200, 200);\r\n}\r\n\r\n.as-message-input-attach-preview-close-btn:active {\r\n    background-color: rgba(255, 255, 255, 0.7);\r\n    color: rgb(255, 255, 255);\r\n}\r\n\r\n\r\n.as-message-input:not(.as-drag-hover) .as-message-input-attachment-add-btn-drop,\r\n.as-message-input.as-drag-hover .as-message-input-attachment-add-btn-plus {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-message-input-attach-preview-info {\r\n    position: absolute;\r\n    left: 10px;\r\n    bottom: 10px;\r\n    right: 10px;\r\n    max-height: calc(100% - 20px);\r\n    text-shadow: 0px 1px 3px white;\r\n    color: black;\r\n    font-size: 14px;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.as-message-input-attach-preview-name {\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n}\r\n\r\n.as-message-input-attach-preview-size {\r\n    color: #42494c;\r\n}\r\n\r\n.as-message-input-attachment-add-btn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 135px;\r\n    width: 60px;\r\n    border: none;\r\n    border-radius: 10px;\r\n    padding: 0;\r\n    background-color: rgb(196, 196, 200);\r\n    color: white;\r\n    font-size: 50px;\r\n    outline: none;\r\n    margin-bottom: 10px;\r\n}\r\n\r\n.as-message-input-attachment-add-btn:hover {\r\n    background-color: rgb(169, 169, 169)\r\n\r\n}\r\n\r\n.as-message-input-attachment-add-btn:active {\r\n    background-color: rgb(138, 141, 145)\r\n}\r\n\r\n.as-message-input-external-tools-popup {\r\n    position: absolute;\r\n\r\n    max-width: 100%;\r\n    bottom: 100%;\r\n    background-color: white;\r\n}\r\n\r\n.as-message-input-external-tools-popup.as-align-left{\r\n    left: 0;\r\n}\r\n\r\n\r\n.as-message-input-external-tools-popup.as-align-right{\r\n    right: 0;\r\n}\r\n\r\n.as-message-input-external-tools-popup.as-align-fixed{\r\n    right: 0;\r\n    left: 0;\r\n}\r\n\r\nimg.as-emoji {\r\n    vertical-align: bottom;\r\n}\r\n\r\nspan.as-emoji-text {\r\n    position: absolute;\r\n    color: transparent;\r\n    width: 20px;\r\n    opacity: 0;\r\n}", ""]);



/***/ }),

/***/ 47965:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --control-horizontal-distance-2: 10px;\r\n}\r\n\r\n.mk-nav {\r\n    position: relative;\r\n    --mk-nav-line-top: 0;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    font-size: 1rem;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -ms-user-select: none;\r\n    -moz-user-select: none;\r\n    --mk-navigator-bound-left: 0;\r\n    padding-right: 4px;\r\n    box-sizing: border-box;\r\n    --max-text-width: 10px;\r\n    min-width: calc(var(--max-text-width) + 96px);\r\n}\r\n\r\n.mk-nav::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    transition: top 0.2s;\r\n    top: var(--mk-nav-line-top);\r\n    height:  calc(2em + 12px);\r\n    border-right: 4px solid rgb(20, 100, 246);\r\n    right: 0px;\r\n}\r\n\r\n.mk-nav.mk-has-draggable .mk-nav-item {\r\n    padding-left: calc(2em + 2px);\r\n}\r\n\r\n.mk-nav-item {\r\n    height: calc(2em + 12px);\r\n    padding-left: var(--control-horizontal-distance-2);\r\n    padding-right: 20px;\r\n    min-width: 100px;\r\n    cursor: pointer;\r\n    white-space: nowrap;\r\n    position: relative;\r\n    overflow: visible;\r\n    display: flex;\r\n    align-items: center;\r\n    background-color: white;\r\n}\r\n\r\n.mk-nav-item.as-board-moving {\r\n    transform: none;\r\n    left: var(--mk-navigator-bound-left) !important;\r\n    background-color: rgb(169, 169, 172, 0.3);\r\n}\r\n\r\n.mk-nav-item:hover {\r\n    background-color: rgb(169, 169, 172, 0.3);\r\n}\r\n\r\n.mk-nav-item.as-hidden{\r\n    display: none;\r\n}\r\n\r\n.mk-nav-item-text-ctn {\r\n    flex-grow: 1;\r\n    padding-right: var(--control-horizontal-distance-2);\r\n    padding-left: var(--control-horizontal-distance-2)\r\n}\r\n\r\n\r\n.mk-nav-item-switch-ctn {\r\n\r\n}\r\n\r\n/*\r\n.mk-nav-item::after {\r\n    content: \"\";\r\n    border: 1px solid #ddd;\r\n    z-index: 2;\r\n    pointer-events: none;\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: -1px;\r\n}\r\n\r\n.mk-nav-item:hover::after,\r\n.mk-nav-item.mk-current::after{\r\n    border-color: rgb(20, 100, 246);\r\n    z-index: 3;\r\n}\r\n*/\r\n\r\n\r\n.mk-nav-item.mk-current {\r\n    color: rgb(20, 100, 246);\r\n    text-shadow: 1px 0 0 currentColor;\r\n}\r\n\r\n.mk-nav-item-drag-zone {\r\n    position: absolute;\r\n    z-index: 1;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: 30px;\r\n    font-size: inherit;\r\n}\r\n\r\n.mk-nav-item-drag-zone i {\r\n    font-size: 1.7em;\r\n}\r\n\r\n.mk-nav-item-drag-zone::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n.mk-nav-item-drag-zone::before,\r\n.mk-nav-item-drag-zone i {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}", ""]);



/***/ }),

/***/ 16951:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "/**** APP ***************/\r\n\r\n.am-application {\r\n    width: 100%;\r\n    height: 100%;\r\n    position: relative;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    font-size: 14px;\r\n}\r\n\r\n.am-application-frameview {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n\r\n.am-application-tabbar {\r\n    display: none;\r\n}\r\n\r\n.am-application.am-show-tabbar .am-application-tabbar {\r\n    display: block;\r\n}\r\n\r\n.am-application.am-show-tabbar .am-application-frameview {\r\n    height: calc(100% - 3em);\r\n}\r\n\r\n\r\n/*************** HEADER****************************************/\r\n\r\n.am-header-bar {\r\n    display: flex;\r\n    align-items: center;\r\n    background-color: var(--variant-color-primary);\r\n    -webkit-box-shadow: 0px 1px 10px 2px rgba(0, 0, 0, 0.5);\r\n    -moz-box-shadow: 0px 1px 10px 2px rgba(0, 0, 0, 0.5);\r\n    box-shadow: 0px 1px 5px 1px rgba(0, 0, 0, 0.5);\r\n    box-sizing: border-box;\r\n    position: relative;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    color: white;\r\n    height: 3em;\r\n    font-size: 1rem;\r\n}\r\n\r\n\r\n.am-header-bar-left-btn,\r\nbutton.am-header-bar-command {\r\n    display: inline-block;\r\n    text-align: center;\r\n    border: none;\r\n    background-color: transparent;\r\n    height: 3em;\r\n    width: 3em;\r\n    padding: 0;\r\n    margin: 0;\r\n    vertical-align: middle;\r\n    color: white;\r\n    outline: none;\r\n    font-size: inherit;\r\n}\r\n\r\n.am-header-bar-left-btn span,\r\nbutton.am-header-bar-command span,\r\n.am-header-bar-left-btn i,\r\nbutton.am-header-bar-command i {\r\n    font-size: 2em;\r\n}\r\n\r\nbutton.am-header-bar-command:not(:last-child) {\r\n    margin-right: 0.6256em;\r\n}\r\n\r\n\r\n.am-header-bar-left-btn:active,\r\nbutton.am-header-bar-action:active,\r\nbutton.am-header-bar-command:active {\r\n    color: rgb(220, 220, 222);\r\n}\r\n\r\n\r\n.as-header-bar-notification-action {\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-header-bar-notification-action-count {\r\n    position: relative;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-header-bar-notification-action-count::before {\r\n        display: none;\r\n        content: \"0\";\r\n        position: absolute;\r\n        font-size: 12px;\r\n        line-height: 18px;\r\n        bottom: 5px;\r\n        right: -8px;\r\n        background-color: rgb(221, 35, 52);\r\n        color: white;\r\n        text-align: center;\r\n        min-width: 18px;\r\n        height: 18px;\r\n        padding-left: 2px;\r\n        padding-right: 2px;\r\n        box-sizing: border-box;\r\n        border-radius: 9px;\r\n}\r\n\r\n.am-header-bar-title-ctn {\r\n    flex-grow: 1;\r\n    white-space: nowrap;\r\n    overflow: inherit;\r\n    position: relative;\r\n    height: 3em;\r\n}\r\n\r\n.am-header-bar-no-size-wrapper {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    right: 0;\r\n    white-space: nowrap;\r\n}\r\n\r\n.am-header-bar-no-size-wrapper::before {\r\n    content: \"\";\r\n    height: 100%;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-header-bar-title-wrapper {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: 100%;\r\n\r\n}\r\n\r\n.am-header-bar-title-ctn:first-child .am-header-bar-title {\r\n    padding-left: 1.2em;\r\n}\r\n\r\n\r\n.am-header-bar-title {\r\n    font-size: 1.2em;\r\n    color: white;\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n\r\n}\r\n\r\n.am-header-bar-title-desc {\r\n    font-size: 0.8em;\r\n    line-height: 2;\r\n}\r\n\r\n.am-header-bar-title-desc:empty {\r\n    display: none;\r\n}\r\n\r\n\r\n.am-header-bar-right {\r\n\r\n}\r\n\r\n.am-header-bar-right::after {\r\n    content: \"\";\r\n    height: 100%;\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n    width: 0.357142857em;\r\n}\r\n\r\n\r\n.am-header-bar-right-item-ctn {\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n}\r\n\r\n\r\nbutton.am-header-bar-action {\r\n    height: 3em;\r\n    width: 3em;\r\n    background-color: transparent;\r\n    color: white;\r\n    border: none;\r\n    font-size: inherit;\r\n    outline: none;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-header-bar-quickmenu-btn.am-status-active .am-header-bar-quickmenu-btn-circle {\r\n    background-color: rgba(169, 169, 169, 0.5);\r\n}\r\n\r\n\r\n.am-header-bar-quickmenu-btn-circle {\r\n    height: 2em;\r\n    width: 2em;\r\n    border-radius: 50%;\r\n    text-align: center;\r\n}\r\n\r\n.am-header-bar-quickmenu-btn-circle span {\r\n    font-size: 1.6em;\r\n    line-height: 1.25em;\r\n}\r\n\r\n.am-header-bar-quickmenu-btn.as-active .mdi-dots-horizontal-circle-outline,\r\n.am-header-bar-quickmenu-btn:not(.as-active) .mdi-dots-horizontal-circle {\r\n    display: none;\r\n}\r\n\r\n\r\n.am-header-bar.am-light-weight,\r\n.am-header-bar.am-light-weight .am-header-bar-title-ctn,\r\n.am-header-bar.am-light-weight .am-header-bar-left-btn,\r\n.am-header-bar.am-light-weight button.am-header-bar-command,\r\n.am-header-bar.am-light-weight button.am-header-bar-action {\r\n    height: calc(2rem + 2px);\r\n}\r\n\r\n\r\n.am-header-bar.am-light-weight .am-header-bar-left-btn span,\r\n.am-header-bar.am-light-weight button.am-header-bar-command span,\r\n.am-header-bar-left-btn i,\r\n.am-header-bar.am-light-weight button.am-header-bar-command i {\r\n    font-size: 1.6em;\r\n}\r\n\r\n.am-application.am-stack > .am-activity {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n}\r\n\r\n\r\n.am-activity {\r\n    width: 100%;\r\n    height: 100%;\r\n    background-color: white;\r\n}\r\n\r\n.am-activity.am-grid {\r\n    grid-template-areas: 'header' 'body';\r\n    grid-template-rows: 3em auto;\r\n    display: grid;\r\n}\r\n\r\n\r\n.am-activity.am-grid > .am-header-bar {\r\n    grid-area: header;\r\n}\r\n\r\n.am-activity.am-grid > .am-activity-body {\r\n    grid-area: body;\r\n    padding: 10px 5px;\r\n    overflow: auto;\r\n}\r\n\r\n.am-explore-item-block {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    padding: 10px 18px 15px 18px;\r\n    position: relative;\r\n    user-select: none;\r\n    box-sizing: border-box;\r\n    width: var(--item-width);\r\n    outline: none;\r\n}\r\n\r\n.am-explore-item-block.as-hidden {\r\n    display: none;\r\n}\r\n\r\n.am-explore-item-block:active::after,\r\n.am-explore-item-block:hover::after,\r\n.am-explore-item-block:focus::after {\r\n    display: block;\r\n    position: absolute;\r\n    left: 10px;\r\n    right: 10px;\r\n    top: 0;\r\n    bottom: 0;\r\n    z-index: 2;\r\n    border-radius: 5px;\r\n}\r\n\r\n.am-explore-item-block:active::after {\r\n    content: \"\";\r\n    background-color: var(--as-transparent-button-active-color);\r\n}\r\n\r\n.am-explore-item-block:focus::after {\r\n    content: \"\";\r\n    border: 1px solid #a9a9a9;\r\n    background-color: var(--as-transparent-button-hover-color);\r\n}\r\n\r\n.am-explore-item-block-icon {\r\n    display: block;\r\n    box-sizing: border-box;\r\n    width: 100%;\r\n    height: 50px;\r\n    text-align: center;\r\n    white-space: nowrap;\r\n    color: var(--variant-color-secondary);\r\n    padding: 0 5px;\r\n}\r\n\r\n.am-explore-item-block-icon::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.am-explore-item-block-icon > span:first-child,\r\n.am-explore-item-block-icon > .mdi {\r\n    display: inline-block;\r\n    font-size: 50px;\r\n    vertical-align: middle;\r\n    line-height: 1;\r\n}\r\n\r\n.am-explore-item-block-icon > svg {\r\n    width: 50px;\r\n    height: 50px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.am-explore-item-block-name {\r\n    width: 100%;\r\n    text-align: center;\r\n    padding: 10px 0 5px 0;\r\n}\r\n\r\n\r\n.am-explore-section-break {\r\n    display: flex;\r\n    align-content: center;\r\n    margin-bottom: 10px;\r\n}\r\n\r\n.am-explore-section-break-name {\r\n    padding: 3px 5px 3px 5px;\r\n    background-color: var(--variant-color-link);\r\n    border-radius: 2px;\r\n    color: white;\r\n\r\n}\r\n\r\n.am-explore-section-break-line {\r\n    flex-grow: 1;\r\n    position: relative;\r\n}\r\n\r\n.am-explore-section-break-line::after {\r\n    position: absolute;\r\n    left: 0;\r\n    width: 100%;\r\n    top: calc(50% - 1px);\r\n    display: block;\r\n    content: \"\";\r\n    flex-grow: 1;\r\n    border-top: 2px solid #dddddd;\r\n    vertical-align: center;\r\n}\r\n\r\n.am-float-button {\r\n    position: fixed;\r\n    bottom: 12px;\r\n    right: 12px;\r\n    border-radius: 50%;\r\n    width: 50px;\r\n    height: 50px;\r\n    transition: box-shadow 0.4s ease;\r\n    background: #4610f5;\r\n    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);\r\n    color: #fff;\r\n    font-size: 1.7rem;\r\n    font-weight: bold;\r\n    cursor: pointer;\r\n    z-index: 500;\r\n    border: none;\r\n}\r\n\r\n.am-explore-group {\r\n    padding: 5px 5px 10px 5px;\r\n}\r\n\r\n.am-explore-group.as-hidden {\r\n    display: none;\r\n}\r\n\r\n/******************************/\r\n.am-springboard-menu {\r\n    --item-width: 150px;\r\n    outline: none;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.am-springboard-menu.am-style-simple {\r\n    background-color: rgb(235, 235, 235);\r\n    padding: 10px;\r\n}\r\n\r\n.am-springboard-menu.am-style-simple .am-explore-group {\r\n    background-color: white;\r\n    border-radius: 5px;\r\n    padding: 5px;\r\n\r\n}\r\n\r\n\r\n.am-springboard-menu.am-style-simple .am-explore-group:not(:last-child) {\r\n    margin-bottom: 10px;\r\n}\r\n\r\n.am-springboard-menu.am-style-simple .am-explore-section-break-line {\r\n    display: none;\r\n}\r\n\r\n\r\n.am-springboard-menu.am-style-simple .am-explore-section-break-name {\r\n    background-color: transparent;\r\n    color: black;\r\n    font-weight: bold;\r\n    padding: 5px 15px;\r\n}\r\n\r\n.am-springboard-menu.am-style-simple .am-explore-item-block {\r\n    padding: 5px 16px;\r\n}\r\n\r\n\r\n.am-springboard-menu.am-style-simple .am-explore-section-break {\r\n    margin-bottom: 0;\r\n}\r\n\r\n.am-springboard-menu.as-style-desktop .am-explore-section-break-name {\r\n    background-color: white;\r\n    color: black;\r\n    font-weight: bold;\r\n    font-size: 14px;\r\n}\r\n\r\n.am-springboard-menu.as-style-desktop .am-explore-item-block:hover .am-explore-item-block-icon {\r\n    color: var(--as-transparent-button-text-hover-color);\r\n}\r\n\r\n.am-springboard-menu.as-style-desktop .am-explore-item-block:hover::after {\r\n    content: \"\";\r\n    background-color: var(--as-transparent-button-hover-color);\r\n}\r\n\r\n.am-springboard-menu.as-style-desktop .am-explore-item-block:active::after {\r\n    content: \"\";\r\n    background-color: var(--as-transparent-button-active-color);\r\n}\r\n\r\n.am-springboard-menu > .absol-search-text-input {\r\n    margin: 10px;\r\n    max-width: 400px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.am-springboard-menu::before {\r\n    content: \"\";\r\n    display: block;\r\n    height: 1px;\r\n}\r\n\r\n/*justify-content: space-between;*/\r\n\r\n\r\n.am-springboard-menu.as-searching .am-explore-group:not(.as-search-result),\r\n.am-springboard-menu:not(.as-searching) .am-explore-group.as-search-result {\r\n    display: none;\r\n}\r\n", ""]);



/***/ }),

/***/ 80918:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-modal {\r\n    position: fixed;\r\n    left: 0;\r\n    height: 100%;\r\n    top: 0;\r\n    width: 100%;\r\n    z-index: 1001000;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-modal.as-hidden {\r\n    z-index: -1000;\r\n    visibility: hidden;\r\n    opacity: 0;\r\n}\r\n\r\n.as-modal.as-center {\r\n    text-align: center;\r\n}\r\n\r\n\r\n.as-modal.as-middle::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n    width: 0;\r\n}\r\n\r\n.as-modal > .as-modal-content {\r\n    display: inline-block;\r\n    text-align: initial;\r\n    white-space: initial;\r\n}\r\n\r\n/*for content*/\r\n.as-modal.as-middle > .as-modal-content {\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-loading-cube-modal {\r\n    background-color: rgba(169, 169, 169, 0.3);\r\n}\r\n\r\n\r\n.as-loading-cube-modal {\r\n    z-index: 1000000;\r\n    background-color: rgba(169, 169, 169, 0.3);\r\n}\r\n\r\n.as-loading-cube-modal > .as-modal-content {\r\n    background-color: white;\r\n    border-radius: 4px;\r\n    padding: 10px;\r\n    -webkit-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    -moz-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    display: inline-block;\r\n}\r\n\r\n.as-loading-cube-modal > .as-modal-content > svg {\r\n    width: 5em;\r\n    height: 5em;\r\n}\r\n\r\n\r\n.am-modal {\r\n    z-index: 100005;\r\n    position: fixed;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    text-align: center;\r\n    box-sizing: border-box;\r\n    padding-top: var(--modal-margin-top);\r\n}\r\n\r\n.am-modal>div{\r\n    text-align: initial;\r\n    display: inline-block;\r\n}", ""]);



/***/ }),

/***/ 78257:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --multi-select-menu-max-height: 90px;\r\n}\r\n\r\n.as-multi-select-menu {\r\n    --list-min-width: 3em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    position: relative;\r\n    min-height: var(--select-box-min-height);\r\n    min-width: var(--list-min-width);\r\n    border: solid 1px #d6d6d6;\r\n    border-radius: 3px;\r\n    box-sizing: border-box;\r\n    outline: none;\r\n    background-color: white;\r\n    padding-right: 45px;\r\n    white-space: normal;\r\n    --as-width-limit: 100vw;\r\n    max-width: var(--as-width-limit);\r\n}\r\n\r\n.as-multi-select-menu.am-multi-select-menu {\r\n    min-width: unset;\r\n}\r\n\r\n.as-multi-select-menu .absol-selectbox-item-text span{\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n    max-width: calc(var(--as-width-limit) - 85px);\r\n}\r\n\r\n.as-multi-select-menu-item-ctn {\r\n    display: block;\r\n    max-height: var(--multi-select-menu-max-height);\r\n    overflow-y: auto;\r\n}\r\n\r\n.as-multi-select-menu-item-ctn.as-has-more {\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-multi-select-menu-item-ctn.as-has-more::after {\r\n    content: \"...\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-weight: bold;\r\n    font-size: 1.5em;\r\n    color: rgb(57, 57, 58);\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.as-multi-select-menu-toggle-btn {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: 30px;\r\n    pointer-events: none;\r\n    border: none;\r\n    background-color: transparent;\r\n}\r\n\r\n.as-multi-select-menu-toggle-btn svg.dropdown {\r\n    width: 10px;\r\n    height: 10px;\r\n    fill: #929292;\r\n}\r\n\r\n.as-multi-select-menu:hover svg.dropdown {\r\n    fill: black;\r\n}\r\n\r\n.as-multi-select-menu.as-disable-click-to-focus .as-multi-select-menu-toggle-btn {\r\n    display: none;\r\n}\r\n\r\n.as-multi-select-menu .absol-selectbox-item {\r\n    margin: calc((var(--select-box-min-height) - 2px - var(--select-box-item-height)) / 2) 2px;\r\n}\r\n\r\n\r\n.as-multi-select-menu.as-item-focusable .absol-selectbox-item.as-active {\r\n    background-color: var(--select-box-focus-item-color);\r\n}\r\n\r\n.as-multi-select-menu.as-disabled {\r\n    background-color: #ebebe4;\r\n}\r\n\r\n.as-multi-select-menu-toggle-btn {\r\n\r\n}\r\n\r\n.as-multi-select-menu.as-disabled .as-multi-select-menu-item-ctn * {\r\n    pointer-events: none;\r\n}\r\n\r\n\r\n.as-multi-select-menu.as-multi-check-tree-leaf-menu {\r\n    min-width: calc(var(--select-list-estimate-width) + 14px);\r\n}\r\n\r\n\r\n.as-multi-select-menu.as-read-only .absol-selectbox-item-close,\r\n.as-multi-select-menu.as-read-only .as-multi-select-menu-toggle-btn,\r\n.as-multi-select-menu.as-disabled .absol-selectbox-item-close,\r\n.as-multi-select-menu.as-disabled .as-multi-select-menu-toggle-btn {\r\n    display: none;\r\n}\r\n\r\n.as-multi-select-menu.as-read-only .absol-selectbox-item-text {\r\n    padding-right: 10px;\r\n}\r\n\r\n.as-multi-select-menu.as-read-only {\r\n    padding-right: 0;\r\n}\r\n\r\n.as-multi-select-menu.as-border-none {\r\n    border: none;\r\n}\r\n\r\n.as-multi-select-menu.as-border-none .as-multi-select-menu-item-ctn {\r\n    max-height: unset;\r\n    overflow-y: auto;\r\n}\r\n\r\n\r\n.as-multi-select-menu.as-has-max-width {\r\n    --max-width: 1024px;\r\n    max-width: var(--max-width);\r\n    min-width: 100px !important;\r\n}\r\n\r\n.as-multi-select-menu.as-has-max-width  .absol-selectbox-item-text span{\r\n    max-width: calc(var(--max-width) - 85px);\r\n}", ""]);



/***/ }),

/***/ 21491:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --np-item-width: 370px;\r\n}\r\n\r\n\r\n.as-mobile-notification-virtual-dropdown {\r\n    --np-item-width: auto;\r\n}\r\n\r\n.as-notification-panel {\r\n    padding: 5px 10px;\r\n    text-align: center;\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n}\r\n\r\n\r\n.as-notification-panel > .as-np-dropdown-button:not(:last-child) {\r\n    margin-right: 10px;\r\n}\r\n\r\n\r\n.as-np-dropdown-button {\r\n    display: inline-block;\r\n    vertical-align: center;\r\n}\r\n\r\n.as-np-db-btn {\r\n    width: 40px;\r\n    height: 40px;\r\n    border: none;\r\n    background-color: rgba(169, 169, 171, 0.2);\r\n    border-radius: 50%;\r\n    position: relative;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-np-db-btn:hover {\r\n    background-color: rgba(169, 169, 171, 0.4);\r\n}\r\n\r\n.as-np-db-icon-ctn, .as-np-db-count {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-np-dropdown-button.as-active > .as-np-db-btn {\r\n    background-color: rgba(169, 169, 220, 0.4);\r\n}\r\n\r\n\r\n.as-np-dropdown-button.as-active .as-np-db-icon-ctn {\r\n    color: #0866ff;\r\n}\r\n\r\n.as-np-db-count:not([data-count]) {\r\n    display: none;\r\n}\r\n\r\n.as-np-db-count {\r\n    position: relative;\r\n    overflow: visible;\r\n}\r\n\r\n\r\n.as-np-db-count::before {\r\n    content: attr(data-count);\r\n    position: absolute;\r\n    font-size: 12px;\r\n    line-height: 18px;\r\n    bottom: 5px;\r\n    left: -5px;\r\n    background-color: rgb(221, 35, 52);\r\n    color: white;\r\n    border-radius: 9px;\r\n    text-align: center;\r\n    min-width: 18px;\r\n    height: 18px;\r\n    padding-left: 2px;\r\n    padding-right: 2px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.as-np-db-icon-ctn > span,\r\n.as-np-db-icon-ctn > i,\r\n.as-np-db-icon-ctn > svg {\r\n    font-size: 20px;\r\n    color: currentColor;\r\n}\r\n\r\n\r\n.as-np-db-dropdown {\r\n    position: fixed;\r\n    right: 20px;\r\n\r\n    background-color: white;\r\n    visibility: hidden;\r\n    opacity: 0;\r\n    --max-height: calc(90vh - 160px);\r\n    max-height: var(--max-height);\r\n    z-index: -1000;\r\n    text-align: left;\r\n}\r\n\r\n.as-np-db-dropdown::before {\r\n    content: \"\";\r\n    display: block;\r\n    height: 0;\r\n}\r\n\r\n\r\n.as-np-db-dropdown:empty {\r\n    display: none;\r\n}\r\n\r\n.as-np-db-dropdown-quick-menu-ctn {\r\n    position: absolute;\r\n    z-index: 9;\r\n    left: calc(var(--np-item-width) - 30px);\r\n    top: 2px;\r\n}\r\n\r\n.as-np-db-quick-menu-btn {\r\n    width: 30px;\r\n    height: 30px;\r\n}\r\n\r\n.as-np-db-quick-menu-btn:hover {\r\n    background-color: var(--icon-background-cover-hover);\r\n}\r\n\r\n.as-np-dropdown-button.as-active .as-np-db-dropdown {\r\n    z-index: 10;\r\n    visibility: visible;\r\n    opacity: 1;\r\n}\r\n\r\n.as-np-db-dropdown-body > h3 {\r\n    font-size: 16px;\r\n    margin: 0;\r\n    padding: 0 10px;\r\n    text-align: left;\r\n    color: rgb(169, 169, 170);\r\n    line-height: 34px;\r\n\r\n}\r\n\r\n.as-np-db-dropdown-body > h4 {\r\n    font-size: 14px;\r\n    margin: 0;\r\n    padding: 0 20px;\r\n    text-align: left;\r\n    color: rgb(69, 69, 70);\r\n}\r\n\r\n\r\n.as-np-section-header {\r\n    padding: 5px 20px;\r\n    display: flex;\r\n}\r\n\r\n.as-np-section-name {\r\n    font-size: 14px;\r\n    font-weight: bold;\r\n    flex-grow: 1;\r\n    line-height: 20px;\r\n}\r\n\r\n.as-np-section-name::before {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    line-height: 1.5;\r\n    content: attr(data-name);\r\n}\r\n\r\n.as-np-section-action {\r\n    cursor: pointer;\r\n    color: var(--variant-color-link);\r\n    padding: 0 5px;\r\n    line-height: 20px;\r\n}\r\n\r\n.as-np-section-action:hover {\r\n    background-color: var(--as-transparent-button-hover-color);\r\n}\r\n\r\n.as-np-section-action:not([data-text]) {\r\n    display: none;\r\n}\r\n\r\n.as-np-section-action::before {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    line-height: 1.5;\r\n    content: attr(data-text);\r\n}\r\n\r\n\r\n.as-np-list {\r\n    overflow-y: auto;\r\n    max-height: calc(var(--max-height) - 100px);\r\n}\r\n\r\n.as-np-db-dropdown.as-has-quick-menu > .as-np-db-dropdown-body > .as-np-list:first-child {\r\n    margin-top: 30px;\r\n}\r\n\r\n.as-np-list-more-ctn {\r\n    padding: 10px 0;\r\n    text-align: center;\r\n}\r\n\r\n.as-np-list-more-btn {\r\n    width: calc(100% - 20px);\r\n    height: 30px;\r\n}\r\n\r\n.as-np-item {\r\n    box-sizing: border-box;\r\n    position: relative;\r\n    cursor: pointer;\r\n    border-bottom: 1px solid #dddddd;\r\n    width: var(--np-item-width);\r\n}\r\n\r\n.as-np-item-body {\r\n    padding-right: 26px;\r\n    min-height: 52px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-np-item-body[data-time-text]::after {\r\n    display: block;\r\n    font-size: 12px;\r\n    color: #1da1ff;\r\n    padding-left: 10px;\r\n}\r\n\r\n\r\n.as-np-item-body:hover {\r\n    background-color: var(--as-transparent-button-hover-color);\r\n}\r\n\r\n\r\n.as-np-item-unread-btn::after {\r\n    content: \"\";\r\n    background-color: rgb(107, 176, 255);\r\n    width: 12px;\r\n    height: 12px;\r\n    border-radius: 50%;\r\n    display: inline-block;\r\n}\r\n\r\n.as-np-item-unread-btn {\r\n    position: absolute;\r\n    right: 0;\r\n    top: calc(50% - 13px);\r\n    width: 26px;\r\n    height: 26px;\r\n    padding: 0;\r\n    background-color: transparent;\r\n    outline: none;\r\n    box-sizing: border-box;\r\n    cursor: pointer;\r\n    border: none;\r\n}\r\n\r\n.as-np-item-pin-btn {\r\n    position: absolute;\r\n    right: 0px;\r\n    top: 0;\r\n    width: 26px;\r\n    height: 26px;\r\n    padding: 0;\r\n    background-color: transparent;\r\n    outline: none;\r\n    box-sizing: border-box;\r\n    cursor: pointer;\r\n    border: none;\r\n}\r\n\r\n.as-np-item-pin-btn > span {\r\n    color: #aaaaaa;\r\n    font-size: 20px;\r\n    display: inline-block;\r\n}\r\n\r\n.as-np-item-pin-btn:hover > span {\r\n    color: #dddddd;\r\n}\r\n\r\n\r\n.as-np-item.as-pin .as-np-item-unread-btn {\r\n    top: calc(50% - 7px);\r\n}\r\n\r\n\r\n.as-np-item:not(.as-unread) .as-np-item-unread-btn,\r\n.as-np-item:not(.as-pin) .as-np-item-pin-btn {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-np-item-quick-menu-ctn {\r\n    position: absolute;\r\n    z-index: 1;\r\n    right: 30px;\r\n    top: calc(50% - 15px);\r\n    visibility: hidden;\r\n\r\n}\r\n\r\n.as-np-item:hover .as-np-item-quick-menu-ctn {\r\n    visibility: visible;\r\n}\r\n\r\n.as-np-item-quick-menu-btn {\r\n    background-color: rgb(230, 230, 230);\r\n    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);\r\n    width: 30px;\r\n    height: 30px;\r\n    border-radius: 50%;\r\n    border: none;\r\n    font-size: 20px;\r\n    cursor: pointer;\r\n    padding: 0;\r\n}\r\n\r\n.as-np-item-quick-menu-btn:active {\r\n    box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n\r\n.as-mb-vd-header-bar .as-header-bar-notification-action {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-mobile-notification-virtual-dropdown {\r\n    position: fixed;\r\n    right: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    background-color: white;\r\n    overflow: hidden;\r\n    z-index: 1005;\r\n}\r\n\r\n\r\n.as-mobile-notification-virtual-dropdown.as-hidden {\r\n    visibility: hidden;\r\n    opacity: 0;\r\n    z-index: -1000;\r\n}\r\n\r\n.as-mb-vd-body {\r\n    height: calc(100% - 3em);\r\n    overflow: auto;\r\n}\r\n\r\n.as-mb-vd-body .as-np-item-body {\r\n    padding-right: 56px;\r\n}\r\n\r\n.as-mb-vd-body .as-np-item-quick-menu-ctn {\r\n    visibility: visible;\r\n}\r\n\r\n.as-mb-vd-body .as-np-item-quick-menu-btn {\r\n    background-color: transparent;\r\n    box-shadow: none !important;\r\n}\r\n\r\n.as-mb-vd-body .as-np-item-quick-menu-btn:active {\r\n    background-color: var(--as-transparent-button-active-color);\r\n}", ""]);



/***/ }),

/***/ 33448:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-number-input {\r\n    text-align: right;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    position: relative;\r\n    min-width: calc(1em + 2px);\r\n    height: calc(2em + 2px);\r\n    border: solid 1px #d6d6d6;\r\n    font-size: 1rem;\r\n    box-sizing: border-box;\r\n    width: 4em;\r\n    --text-width: 0.5em;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.absol-number-input.as-width-auto {\r\n    width: calc(var(--text-width) + 1em);\r\n}\r\n\r\n.absol-number-input.as-has-stepper.as-width-auto {\r\n    width: calc(var(--text-width) + 2.2em);\r\n}\r\n\r\n.absol-number-input-text-container {\r\n    right: 0;\r\n    left: 0em;\r\n    top: 0;\r\n    bottom: 0;\r\n    position: absolute;\r\n}\r\n\r\n/*.absol-number-input.as-read-only .absol-number-input-button-up-container,*/\r\n/*.absol-number-input.as-read-only .absol-number-input-button-down-container,*/\r\n.absol-number-input-button-up-container,\r\n.absol-number-input-button-down-container {\r\n    display: none;\r\n}\r\n\r\n.absol-number-input.as-read-only.as-border-none {\r\n    border: none;\r\n}\r\n\r\n.absol-number-input.as-read-only.as-border-none input {\r\n    /*text-align: left;*/\r\n    padding-left: 0;\r\n}\r\n\r\n\r\n.absol-number-input-button-up-container {\r\n    top: 0;\r\n}\r\n\r\n.absol-number-input-button-down-container {\r\n    bottom: 0;\r\n}\r\n\r\n.absol-number-input.as-has-stepper .absol-number-input-button-up-container,\r\n.absol-number-input.as-has-stepper .absol-number-input-button-down-container {\r\n    right: 0;\r\n    position: absolute;\r\n    height: 1em;\r\n    width: 1em;\r\n    max-height: 50%;\r\n    overflow: hidden;\r\n    display: block;\r\n}\r\n\r\n.absol-number-input-button-up-container > button,\r\n.absol-number-input-button-down-container > button {\r\n    width: 100%;\r\n    height: 100%;\r\n    line-height: 1;\r\n    padding: 0;\r\n    border: none;\r\n    box-sizing: border-box;\r\n    outline: none;\r\n    color: rgb(101, 101, 101);\r\n    background-color: transparent;\r\n    font-size: inherit;\r\n}\r\n\r\n.as-printer-content .absol-number-input button {\r\n    display: none;\r\n}\r\n\r\n.absol-number-input-button-up-container > button:active,\r\n.absol-number-input-button-down-container > button:active {\r\n    color: black;\r\n    background-color: rgba(101, 101, 101, 0.3);\r\n}\r\n\r\n.absol-number-input.as-has-stepper .absol-number-input-text-container {\r\n    right: 1.2em;\r\n}\r\n\r\n\r\n.absol-number-input-text-container > input[type=\"text\"] {\r\n    border: none;\r\n    outline: none;\r\n    width: 100%;\r\n    height: 100%;\r\n    text-align: right;\r\n    padding: 0 0.35em;\r\n    box-sizing: border-box;\r\n    font: inherit;\r\n}\r\n\r\n.absol-number-input.as-has-stepper .absol-number-input-text-container > input[type=\"text\"] {\r\n    padding: 0 0.2em;\r\n}\r\n\r\n.absol-number-input.absol-disabled {\r\n    pointer-events: none;\r\n    color: var(--as-disabled-text-color);\r\n}\r\n\r\n.absol-number-input.absol-disabled input {\r\n    background-color: var(--as-disabled-background-color);\r\n}\r\n\r\n.absol-number-input.absol-disabled .absol-number-input-button-up-container,\r\n.absol-number-input.absol-disabled .absol-number-input-button-down-container {\r\n    opacity: 0.3;\r\n}\r\n\r\nbody.as-number-input-force-dragging {\r\n    user-select: none;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-number-input-mouse-line {\r\n    border: 1px dashed #bfc1c2;\r\n    position: fixed;\r\n    z-index: 1e8;\r\n}", ""]);



/***/ }),

/***/ 82720:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-omt {\r\n    display: block;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    font-size: 1rem;\r\n}\r\n\r\n.as-omt-node {\r\n\r\n}\r\n\r\n\r\n.as-omt-field {\r\n    --level: 0;\r\n    position: relative;\r\n    padding-bottom: 10px;\r\n}\r\n\r\n\r\n.as-omt-field.as-hover::before {\r\n    border-color: rgb(30, 101, 234);\r\n    border-width: 2px;\r\n}\r\n\r\n.as-omt-field::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: 0;\r\n    top: 15px;\r\n    right: 0;\r\n    bottom: 0;\r\n    border: 1px solid rgb(170, 170, 200);\r\n    z-index: 0;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-omt-field-header {\r\n    padding-left: 10px;\r\n    line-height: 2;\r\n}\r\n\r\n\r\n.as-omt-field-body {\r\n    padding-left: 10px;\r\n    padding-right: 10px;\r\n    min-height: 1em;\r\n}\r\n\r\n\r\n.as-omt-field-raw-ctn,\r\n.as-omt-field.as-mode-raw > .as-omt-field-body {\r\n    display: none;\r\n}\r\n\r\n.as-omt-field.as-mode-raw > .as-omt-field-raw-ctn {\r\n    display: block;\r\n}\r\n\r\n\r\n.as-omt-field-command-ctn {\r\n    position: absolute;\r\n    z-index: 20;\r\n    right: 10px;\r\n    top: 20px;\r\n    background-color: white;\r\n    height: 30px;\r\n    display: none;\r\n}\r\n\r\n.bsc-white .as-omt-field-command-ctn button[data-command=\"view_mode\"] {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-omt-field.as-hover > .as-omt-field-command-ctn {\r\n    display: block;\r\n}\r\n\r\n.as-omt-field-command-ctn > button {\r\n    height: 30px;\r\n}\r\n\r\n.as-omt-field-command-ctn > button:not(:first-child) {\r\n    margin-left: 5px;\r\n}\r\n\r\n.as-omt-field-command-ctn > button span {\r\n    font-size: 24px;\r\n}\r\n\r\n.as-omt-field-name {\r\n    font-weight: bold;\r\n    background-color: white;\r\n    display: inline-block;\r\n    z-index: 3;\r\n    position: relative;\r\n    padding-left: 5px;\r\n    padding-right: 5px;\r\n    margin-right: 10px;\r\n}\r\n\r\n\r\n.as-omt-field-body > .as-omt-field:first-child {\r\n    margin-top: 10px;\r\n}\r\n\r\n.as-omt-field code {\r\n    white-space: pre-wrap;\r\n}\r\n\r\n.as-omt-field-raw-ctn {\r\n    padding-left: 10px;\r\n    padding-right: 10px;\r\n}\r\n\r\n.as-omt-field.as-type-struct > .as-omt-field-body {\r\n    padding-left: 20px;\r\n}\r\n\r\nimg.as-omt-field-value {\r\n    max-width: calc(100vw - 5em);\r\n    max-height: 10em;\r\n}\r\n\r\n.as-omt-dialog .as-message-dialog-body {\r\n    max-height: calc(90vh - 5em);\r\n    max-width: calc(90vw - 5em);\r\n    overflow: auto;\r\n}\r\n\r\n.as-omt-option-row {\r\n    display: flex;\r\n    align-items: center;\r\n}\r\n\r\n.as-omt-option-row:not(:first-child) {\r\n    margin-top: 5px;\r\n}\r\n\r\n.as-omt-field-raw-ctn > div > .as-omt-field-name {\r\n    display: none;\r\n}\r\n\r\n.as-omt-option-row > .as-omt-field {\r\n    flex-grow: 1;\r\n}\r\n\r\n\r\n.as-omt-field-color-value-bg {\r\n    height: 2em;\r\n    width: 5em;\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAaSURBVBhXYzh8+PD///8hJAOcBSRxyRw+DABJUCox2kjvSgAAAABJRU5ErkJggg==');\r\n    background-size: 1.5em;\r\n    image-rendering: optimizeSpeed;\r\n    image-rendering: -moz-crisp-edges;\r\n    image-rendering: -o-crisp-edges;\r\n    image-rendering: -webkit-optimize-contrast;\r\n    image-rendering: pixelated;\r\n    image-rendering: optimize-contrast;\r\n    -ms-interpolation-mode: nearest-neighbor;\r\n    --omt-color-value: transparent;\r\n}\r\n\r\n.as-omt-field-color-value {\r\n    width: 100%;\r\n    height: 100%;\r\n    background-color: var(--omt-color-value);\r\n}\r\n", ""]);



/***/ }),

/***/ 77557:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-onscreen-widget {\r\n    --client-width: 0px;\r\n    --client-height: 0px;\r\n    --cx: 0.9;\r\n    --cy: 0.9;\r\n    position: fixed;\r\n    z-index: 1000000;\r\n    left: calc((100vw - var(--client-width) - 4px) * var(--cx) + 2px);\r\n    top: calc((100vh - var(--client-height) - 4px) * var(--cy) + 2px);\r\n    touch-action: none;\r\n    user-select: none;\r\n}\r\n\r\n.as-onscreen-widget.as-size-loading {\r\n    visibility: hidden;\r\n}", ""]);



/***/ }),

/***/ 41154:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-onscreen-window {\r\n    z-index: 1002;\r\n    position: fixed;\r\n    left: 10px;\r\n    top: 10px;\r\n    width: 12em;\r\n    height: 5em;\r\n    /*default size*/\r\n    /* min-width: 12em;\r\n    min-height: 1.4em; */\r\n}\r\n\r\n\r\n.absol-onscreen-window > .as-window-box {\r\n    width: 100%;\r\n    height: 100%;\r\n    display: flex;\r\n    flex-direction: column;\r\n}\r\n\r\n.absol-onscreen-window > .as-window-box > .as-window-box-body {\r\n    flex-grow: 1;\r\n}\r\n\r\n.as-window-box {\r\n    position: relative;\r\n\r\n    background: white;\r\n    -webkit-box-shadow: 2px 2px 17px -1px rgba(0, 0, 0, 0.54);\r\n    -moz-box-shadow: 2px 2px 17px -1px rgba(0, 0, 0, 0.54);\r\n    box-shadow: 2px 2px 17px -1px rgba(0, 0, 0, 0.54);\r\n}\r\n\r\n.as-window-box-header {\r\n    display: flex;\r\n    min-height: 1.4em;\r\n    position: relative;\r\n    background-color: rgba(169, 169, 169, 0.15);\r\n    padding: 0.2em;\r\n    box-sizing: border-box;\r\n    align-items: center;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n}\r\n\r\n.as-window-box-header-icon-ctn:empty {\r\n    display: none;\r\n}\r\n\r\n.as-window-box-header-title {\r\n    flex-grow: 1;\r\n    padding-left: 0.2em;\r\n}\r\n\r\n.as-window-box-header-button-ctn {\r\n}\r\n\r\n.as-window-box-header-icon {\r\n    margin-right: 0.2em;\r\n    font-size: inherit;\r\n}\r\n\r\nspan.as-window-box-header-icon {\r\n    line-height: 1.2em;\r\n}\r\n\r\nsvg.as-window-box-header-icon {\r\n    width: 1.2em;\r\n    height: 1.2em;\r\n}\r\n\r\nspan.as-window-box-header-title {\r\n    line-height: 1.2em;\r\n    font-size: 1em;\r\n    color: rgb(33, 33, 34);\r\n}\r\n\r\n\r\n.as-window-box-header-button-ctn > button {\r\n    height: 100%;\r\n    width: 1em;\r\n    font-size: 1em;\r\n    padding: 0;\r\n    margin: 0 0 0 0.1em;\r\n    border: none;\r\n    color: rgb(169, 169, 169);\r\n    outline: none;\r\n}\r\n\r\n.as-window-box-header-button-ctn > button:hover {\r\n    color: rgb(103, 103, 103);\r\n}\r\n\r\n.as-window-box-header-button-ctn > button:active {\r\n    color: rgb(33, 33, 34);\r\n}\r\n\r\n.as-window-box-header-button-ctn > button:hover > .mdi-close {\r\n    color: rgb(255, 59, 59);\r\n}\r\n\r\n.as-window-box-header-button-ctn > button > span {\r\n    vertical-align: middle;\r\n}\r\n\r\n.absol-onscreen-window-body-container {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 1.4em;\r\n    bottom: 0;\r\n}\r\n\r\n\r\n.absol-onscreen-window-moving-modal {\r\n    position: fixed;\r\n    left: 1px;\r\n    right: 1px;\r\n    top: 1px;\r\n    bottom: 1px;\r\n    z-index: 1000000006;\r\n}\r\n\r\n.absol-onscreen-window-resizer {\r\n    position: absolute;\r\n}\r\n\r\n.absol-onscreen-window-resizer.absol-onscreen-window-resize-bottom {\r\n    bottom: -3px;\r\n    height: 6px;\r\n    left: 3px;\r\n    right: 3px;\r\n    z-index: 3;\r\n}\r\n\r\n.absol-onscreen-window-resizer.absol-onscreen-window-resize-top {\r\n    top: -3px;\r\n    height: 6px;\r\n    left: 3px;\r\n    right: 3px;\r\n    z-index: 3;\r\n}\r\n\r\n.absol-onscreen-window-resizer.absol-onscreen-window-resize-left {\r\n    left: -3px;\r\n    top: 3px;\r\n    bottom: 3px;\r\n    width: 6px;\r\n    cursor: ew-resize;\r\n}\r\n\r\n.absol-onscreen-window-resizer.absol-onscreen-window-resize-right {\r\n    right: -3px;\r\n    top: 3px;\r\n    bottom: 3px;\r\n    width: 6px;\r\n    cursor: ew-resize;\r\n}\r\n\r\n.absol-onscreen-window-resizer.absol-onscreen-window-resize-bottom-right {\r\n    width: 6px;\r\n    height: 6px;\r\n    right: -3px;\r\n    bottom: -3px;\r\n}\r\n\r\n.absol-onscreen-window-resizer.absol-onscreen-window-resize-bottom-left {\r\n    width: 6px;\r\n    height: 6px;\r\n    left: -3px;\r\n    bottom: -3px;\r\n}\r\n\r\n.absol-onscreen-window-resizer.absol-onscreen-window-resize-top-left {\r\n    width: 6px;\r\n    height: 6px;\r\n    left: -3px;\r\n    top: -3px;\r\n}\r\n\r\n.absol-onscreen-window-resizer.absol-onscreen-window-resize-top-right {\r\n    width: 6px;\r\n    height: 6px;\r\n    right: -3px;\r\n    top: -3px;\r\n}\r\n\r\n\r\n.absol-onscreen-window-resize-top,\r\n.absol-onscreen-window-resize-bottom {\r\n    cursor: ns-resize;\r\n\r\n}\r\n\r\n.absol-onscreen-window-resize-left,\r\n.absol-onscreen-window-resize-right {\r\n    cursor: ew-resize;\r\n\r\n}\r\n\r\n\r\n.absol-onscreen-window-resize-bottom-right {\r\n    cursor: se-resize;\r\n}\r\n\r\n.absol-onscreen-window-resize-bottom-left {\r\n    cursor: sw-resize;\r\n}\r\n\r\n.absol-onscreen-window-resize-top-left {\r\n    cursor: nw-resize;\r\n}\r\n\r\n.absol-onscreen-window-resize-top-right {\r\n    cursor: ne-resize;\r\n}", ""]);



/***/ }),

/***/ 78351:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-page-indicator {\r\n    text-align: center;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-page-indicator::before{\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.as-page-indicator-item {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    text-align: center;\r\n    font-size: inherit;\r\n    width: 1.5em;\r\n    padding: 0;\r\n    border: 0;\r\n    background-color: transparent;\r\n}\r\n\r\n\r\n\r\n.as-page-indicator-item::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    height: 0.5em;\r\n    width: 0.5em;\r\n    transition: width 0.25s, height 0.25s, color 0.25s;\r\n    border-radius: 50%;\r\n    background-color: rgb(196, 196, 196);\r\n    font-size: inherit;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-page-indicator-item.as-active::before{\r\n    width: 0.75em;\r\n    height: 0.75em;\r\n    background-color: var(--variant-color-primary);\r\n\r\n}", ""]);



/***/ }),

/***/ 26993:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-page-selector {\r\n    white-space: normal;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n    font-size: 14px;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.absol-page-selector > ul {\r\n    margin-bottom: 0px;\r\n    margin-top: 0;\r\n}\r\n\r\n.absol-page-number-buttons {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-page-number-input > label {\r\n    font-weight: 100;\r\n}\r\n\r\n.absol-page-number-buttons > li.page-previous,\r\n.absol-page-number-buttons > li.page-next,\r\n.absol-page-number-buttons > li.page-first,\r\n.absol-page-number-buttons > li.page-last {\r\n    display: inline-block;\r\n    height: calc(2em + 2px);;\r\n    padding-left: 10px;\r\n    padding-right: 10px;\r\n    text-align: center;\r\n    transition: all .3s linear;\r\n    background-color: transparent;\r\n    cursor: pointer;\r\n}\r\n\r\n.absol-page-number-buttons > li.absol-page-number {\r\n    font-size: inherit;\r\n    display: inline-block;\r\n    height: calc(2em + 2px);\r\n    width: 3em;\r\n    text-align: center;\r\n    transition: all .3s linear;\r\n    background-color: transparent;\r\n    cursor: pointer;\r\n}\r\n\r\nli.absol-page-number > a {\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.absol-page-number-buttons > li.absol-page-number.active {\r\n    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .16), 0 2px 10px 0 rgba(0, 0, 0, .12);\r\n    background-color: #4285f4;\r\n    border-radius: 2px;\r\n\r\n}\r\n\r\n.absol-page-number-buttons > li.absol-page-number.active > a {\r\n    color: white;\r\n\r\n}\r\n\r\n.absol-page-number-buttons > li > a {\r\n    line-height: calc(2em + 2px);\r\n    text-decoration: none;\r\n    outline: none;\r\n}\r\n\r\n.absol-page-number-buttons > li:not(.active):hover {\r\n    background-color: var(--icon-background-cover-hover);\r\n\r\n}\r\n\r\n.absol-page-selector .absol-page-number-input {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.absol-page-selector .absol-page-number-input input[type=\"text\"] {\r\n    font-size: inherit;\r\n    width: 3em;\r\n    margin-left: 0.3em;\r\n    margin-right: 0.3em;\r\n    text-align: center;\r\n    height: 1.8em;\r\n    border: solid 1px #ccc;\r\n    border-radius: 2px;\r\n\r\n}\r\n\r\n.absol-page-link {\r\n    color: #147af6;\r\n    cursor: pointer;\r\n    text-decoration: underline;\r\n}\r\n\r\n.absol-page-number {\r\n    color: #147af6;\r\n    cursor: pointer;\r\n}\r\n\r\n.absol-page-number a::before {\r\n    content: attr(data-index-text);\r\n}\r\n\r\n.absol-page-selector.as-simple-mode .absol-page-number,\r\n.absol-page-selector.as-simple-mode .page-first,\r\n.absol-page-selector.as-simple-mode  .page-last{\r\n    display: none;\r\n}\r\n\r\n.absol-page-selector.as-simple-mode  .mdi{\r\n    font-size: 20px;\r\n    line-height: 1.5;\r\n}", ""]);



/***/ }),

/***/ 16972:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --as-path-menu-max-text-width: 150px;\r\n}\r\n\r\n.am-mobile-theme {\r\n    --as-path-menu-max-text-width: 100px;\r\n}\r\n\r\n\r\n.as-path-menu-item .mdi-chevron-right::before {\r\n    transition: transform 0.1s;\r\n}\r\n\r\n.as-path-menu .as-ribbon-split-button-text {\r\n    max-width: var(--as-path-menu-max-text-width);\r\n    text-overflow: ellipsis;\r\n    overflow: hidden;\r\n    display: inline-block;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-path-menu-item.as-has-no-item .as-ribbon-split-button-extend {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-path-view {\r\n    white-space: nowrap;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    font-size: 1em;\r\n    height: calc(2em + 2px);\r\n}\r\n\r\n.as-path-view-item {\r\n    display: inline-block;\r\n    white-space: nowrap;\r\n    background: transparent;\r\n    border: 1px solid transparent;\r\n    box-sizing: border-box;\r\n    height: 100%;\r\n    position: relative;\r\n    padding-left: 0.5em;\r\n    padding-right: 0;\r\n    cursor: pointer;\r\n    font-size: inherit;\r\n}\r\n\r\n.as-path-view-item:last-child {\r\n    padding-right: 0.5em;\r\n}\r\n\r\n.as-path-view-item:hover {\r\n    border-color: #dddddd;\r\n}\r\n\r\n.as-path-view-item::before{\r\n    content: \"\";\r\n    position: absolute;\r\n    left: 0;\r\n    right: 1em;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.as-path-view-item:last-child::before{\r\n    right: 0;\r\n}\r\n\r\n.as-path-view-item:hover::before {\r\n    background-color: rgba(169, 169, 169, 0.15);\r\n}\r\n\r\n.as-path-view-item:active::before {\r\n    background-color: rgba(169, 169, 169, 0.3);\r\n}\r\n\r\n.as-path-view-item-icon {\r\n    margin-right: 0.5em;\r\n}\r\n\r\nspan.as-path-view-item-icon,\r\ni.as-path-view-item-icon {\r\n    font-size: 1.5em;\r\n    line-height: 1;\r\n    text-align: center;\r\n}\r\n\r\nsvg.as-path-view-item-icon,\r\nimg.as-path-view-item-icon {\r\n    width: 1.5em;\r\n    height: 1.5em;\r\n}\r\n\r\n\r\n\r\n.as-path-view-item-text {\r\n    padding-right: 0.2em;\r\n}\r\n\r\n\r\n.as-path-view-item-arrow {\r\n    width: 1em;\r\n    text-align: center;\r\n}\r\n\r\n.as-path-view-item-icon,\r\n.as-path-view-item-text,\r\n.as-path-view-item-arrow {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-path-view-item:last-child .as-path-view-item-arrow {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 10301:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-picking-list {\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n}\r\n\r\n\r\n.as-picking-list-item {\r\n    height: 30px;\r\n    position: relative;\r\n    padding-right: 40px;\r\n    padding-left: 10px;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-picking-list-item::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    height: 100%;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-picking-list-item-text {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-picking-list-item:hover {\r\n    background-color: var(--as-transparent-button-hover-color);\r\n}\r\n\r\n.as-picking-list-item:active {\r\n    background-color: var(--as-transparent-button-active-color);\r\n}\r\n\r\n.as-picking-list-item-checked {\r\n    position: absolute;\r\n    right: 5px;\r\n    top: 0;\r\n    bottom: 0;\r\n    font-size: 20px;\r\n}\r\n\r\n.as-picking-list-item-checked::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n.as-picking-list-item-checked::before,\r\n.as-picking-list-item-checked span {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-size: inherit;\r\n}\r\n\r\n.as-picking-list-item:not(.as-checked) .as-picking-list-item-checked {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 90646:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-autocomplete-input-item.as-place-search-auto-complete-item:not(:last-child) {\r\n    border-bottom: 1px solid #dddddd;\r\n\r\n}\r\n\r\n.absol-autocomplete-input-item.as-place-search-auto-complete-item {\r\n    padding: 3px 5px;\r\n    height: auto;\r\n}\r\n", ""]);



/***/ }),

/***/ 36155:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-preinput {\r\n    margin: 0;\r\n    padding: 0;\r\n    white-space: pre-wrap;\r\n    -moz-user-modify: read-write;\r\n    -webkit-user-modify: read-write;\r\n    word-break: normal;\r\n}\r\npre.as-preinput{\r\n    word-break: normal;\r\n}\r\n\r\n\r\n.as-preinput img {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 31610:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --as-process-l-bar-active-color: rgb(255, 160, 0);\r\n    --as-process-l-bar-item-width: 60px;\r\n}\r\n\r\n.as-process-l-bar {\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    font-size: 14px;\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    position: relative;\r\n    --as-process-l-bar-item-min-width: 0;\r\n}\r\n\r\n\r\n\r\n.as-process-l-bar-step-ctn {\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-process-l-bar-col:not(:last-child) {\r\n    margin-right: 10px;\r\n}\r\n\r\n.as-process-l-bar-col {\r\n    vertical-align: top;\r\n    display: inline-block;\r\n}\r\n\r\n.as-process-l-bar-step {\r\n    width: var(--as-process-l-bar-item-width);\r\n    min-width: var(--as-process-l-bar-item-min-width);\r\n    height: 15px;\r\n    background-color: #ebebeb;\r\n    border: solid 1px #bfbfbf;\r\n    transition: background-color 0.2s;\r\n    position: relative;\r\n}\r\n\r\n\r\n\r\n.as-process-l-bar-step.as-active {\r\n    background-color: var(--as-process-l-bar-active-color);\r\n    border-color: rgb(20, 100, 246);\r\n}\r\n\r\n.as-process-l-bar-step.as-active::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: calc(100% + 3px);\r\n    border-top: 2px solid rgb(20, 100, 246);\r\n}\r\n\r\n\r\n.as-process-l-bar-step::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.as-process-l-bar.as-disabled .as-process-l-bar-step::before{\r\n    display: none;\r\n}\r\n\r\n.as-process-l-bar-step:hover::before {\r\n    background-color: rgba(169, 169, 172, 0.3);\r\n}\r\n\r\n.as-process-l-bar-step.as-active,\r\n.as-process-l-bar-step:hover {\r\n    background-color: var(--as-process-l-bar-active-color);\r\n}\r\n\r\n\r\n.as-process-l-bar-col .as-process-l-bar-step:not(:last-child) {\r\n    margin-bottom: 10px;\r\n}\r\n\r\n.as-process-l-bar-step-name {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 24px;\r\n    font-weight: bold;\r\n}\r\n\r\n\r\n.as-process-l-bar.as-col-layout .as-process-l-bar-step-name {\r\n    position: relative;\r\n    left: initial;\r\n    top: unset;\r\n}\r\n\r\n\r\n.as-process-l-bar.as-single-line .as-process-l-bar-step-ctn {\r\n    white-space: normal;\r\n}\r\n\r\n\r\n.as-process-l-bar.as-single-line  .as-process-l-bar-col {\r\n    margin-bottom: 10px;\r\n}\r\n\r\n.as-process-l-bar.as-single-line .as-process-l-bar-step-name {\r\n    position: relative;\r\n    display: block;\r\n    left: 0 !important;\r\n    top: 0!important;\r\n}", ""]);



/***/ }),

/***/ 63899:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-progress-bar {\r\n    height: 1em;\r\n    background-color: #e9ecef;\r\n    border-radius: .25em;\r\n    box-sizing: border-box;\r\n    overflow: hidden;\r\n    --value-color: #007bff;\r\n}\r\n\r\n\r\n.as-progress-bar-value {\r\n    height: 100%;\r\n    width: 0;\r\n    color: #fff;\r\n    text-align: center;\r\n    white-space: nowrap;\r\n    background-color: var(--value-color);\r\n    transition: width .6s ease;\r\n}\r\n\r\n.as-progress-bar.as-variant-success,\r\n.as-progress-circle.as-variant-success {\r\n    --value-color: #28a745;\r\n}\r\n\r\n.as-progress-bar.as-variant-info,\r\n.as-progress-circle.as-variant-info {\r\n    --value-color: #17a2b8;\r\n}\r\n\r\n.as-progress-bar.as-variant-warning,\r\n.as-progress-circle.as-variant-warning {\r\n    --value-color: #ffc107;\r\n}\r\n\r\n.as-progress-bar.as-variant-danger,\r\n.as-progress-circle.as-variant-danger {\r\n    --value-color: #dc3545;\r\n}\r\n\r\n\r\n.as-progress-bar.as-striped .as-progress-bar-value,\r\n.as-progress-bar.as-animated .as-progress-bar-value {\r\n    background-image: linear-gradient(45deg, hsla(0, 0%, 100%, .15) 25%, transparent 0, transparent 50%, hsla(0, 0%, 100%, .15) 0, hsla(0, 0%, 100%, .15) 75%, transparent 0, transparent);\r\n    background-size: 1.33333em 1.33333em;\r\n}\r\n\r\n@keyframes as-progress-bar-stripes {\r\n    0% {\r\n        background-position: 1.33333em 0\r\n    }\r\n\r\n    to {\r\n        background-position: 0 0\r\n    }\r\n}\r\n\r\n.as-progress-bar.as-animated .as-progress-bar-value {\r\n    animation: as-progress-bar-stripes 1s linear infinite;\r\n}\r\n\r\n\r\n.as-progress-circle {\r\n    display: inline-block;\r\n    width: 7em;\r\n    height: 7em;\r\n    background-color: #fcfcf6;\r\n    border-radius: 50%;\r\n    position: relative;\r\n    --value-color: #007bff;\r\n\r\n    box-shadow: 3px 2px 12px -1px rgba(0, 0, 0, 0.1) inset;\r\n    overflow: hidden;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.as-progress-circle-inner {\r\n    background-color: white;\r\n    position: absolute;\r\n    border-radius: 50%;\r\n    left: 0.8em;\r\n    right: 0.8em;\r\n    top: 0.8em;\r\n    bottom: 0.8em;\r\n    font-size: 1rem;\r\n    box-shadow: 3px 2px 12px -1px rgba(0, 0, 0, 0.1);\r\n    white-space: nowrap;\r\n    text-align: center;\r\n}\r\n\r\n\r\n.as-progress-circle-inner::before {\r\n    content: \"\";\r\n    height: 100%;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-progress-circle-text {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    white-space: pre-wrap;\r\n    max-width: calc(100% - 0.3em);\r\n    font-size: 1em;\r\n    color: #454c5b;\r\n}\r\n\r\n.as-progress-circle-start,\r\n.as-progress-circle-end {\r\n    border-radius: 50%;\r\n    width: 0.8em;\r\n    height: 0.8em;\r\n    background-color: var(--value-color);\r\n    /*background-color: red;*/\r\n    top: 0;\r\n    left: calc(50% - 0.4em);\r\n    position: absolute;\r\n    /*box-shadow: 3px 2px 12px -1px rgba(0, 0, 0, 0.1);*/\r\n}\r\n\r\n.as-progress-circle-pie {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    border-radius: 50%;\r\n    background-color: var(--value-color);\r\n}\r\n\r\n\r\n.as-progress-circle-end {\r\n\r\n}\r\n\r\n\r\n", ""]);



/***/ }),

/***/ 30780:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-quick-list-button {\r\n    box-sizing: border-box;\r\n    height: calc(2em + 2px);\r\n    font-size: 14px;\r\n}\r\n\r\n.as-quick-list-button .as-flexicon-button-text-container {\r\n    border-right: solid 1px #bfbfbf;\r\n}\r\n\r\n\r\n.as-quick-list-button-follower .absol-selectlist {\r\n    max-height: calc(100vh - 20px);\r\n    overflow-y: auto;\r\n    border: solid 1px rgb(100, 100, 255);\r\n    box-sizing: border-box;\r\n    background-color: white;\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    -webkit-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    -moz-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n}", ""]);



/***/ }),

/***/ 42453:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-quick-path {\r\n    position: relative;\r\n    box-sizing: border-box;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -ms-user-select: none;\r\n    -moz-user-select: none;\r\n    min-height: 1.5em;\r\n}\r\n\r\n.absol-quick-path button {\r\n    outline: none;\r\n    color: rgb(69, 69, 69);\r\n    height: 1.5em;\r\n}\r\n\r\n.absol-quick-path button:hover {\r\n    color: black;\r\n}\r\n\r\n.absol-quick-path .toggler-ico path {\r\n    fill: rgb(104, 104, 104);\r\n}\r\n\r\n.dark .absol-quick-path button {\r\n    color: rgb(200, 200, 200);\r\n}\r\n\r\n\r\n.dark .absol-quick-path button:hover {\r\n    color: white;\r\n}\r\n\r\n.dark .absol-quick-path .toggler-ico path {\r\n    fill: rgb(169, 169, 169);\r\n}\r\n\r\n\r\n\r\n.absol-quick-path-btn:focus span {\r\n    text-decoration: underline;\r\n}\r\n\r\n/* \r\n.absol-quick-path-btn .toggler-ico path {\r\n    fill: rgb(104, 104, 104);\r\n} */\r\n", ""]);



/***/ }),

/***/ 31142:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-radio {\r\n    display: inline;\r\n    cursor: pointer;\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-radio input {\r\n    display: none;\r\n}\r\n\r\n.absol-radio > span {\r\n    white-space: pre;\r\n    cursor: inherit;\r\n    vertical-align: middle;\r\n    margin: 0;\r\n    font-size: inherit;\r\n}\r\n\r\n.absol-radio > span:empty {\r\n    display: none;\r\n}\r\n\r\n.absol-radio > svg {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: calc(1em + 4px);\r\n    height: calc(1em + 4px);\r\n}\r\n\r\n.absol-radio > svg .bound {\r\n    stroke: #929292;\r\n    fill: white;\r\n}\r\n\r\n.absol-radio:hover > svg .bound {\r\n    fill: #d6d6d6;\r\n    stroke: black;\r\n}\r\n\r\n/* \r\n.absol-radio>svg .bound {\r\n    fill: none;\r\n} */\r\n\r\n.absol-radio-icon .border {\r\n}\r\n\r\n.absol-radio .dot {\r\n    transition: opacity 0.07s;\r\n    opacity: 0;\r\n    fill: #606060;\r\n}\r\n\r\n.absol-radio:hover .dot {\r\n    transition: opacity 0.07s;\r\n    opacity: 0;\r\n    fill: black;\r\n}\r\n\r\n.absol-radio.checked .dot {\r\n    opacity: 1;\r\n    transition: opacity 0.1s;\r\n}\r\n\r\n.absol-radio:not(.right) > span.absol-radio-left-label {\r\n    display: none;\r\n}\r\n\r\n.absol-radio.right > span.absol-radio-right-label {\r\n    display: none;\r\n}\r\n\r\nspan.absol-radio-left-label {\r\n    padding-right: 0.3em;\r\n}\r\n\r\nspan.absol-radio-right-label {\r\n    padding-left: 0.3em;\r\n}\r\n\r\n\r\n\r\n\r\n.absol-radio.disabled {\r\n    cursor: default;\r\n}\r\n\r\n.absol-radio.disabled{\r\n    color: #777;\r\n}\r\n\r\n.absol-radio.disabled:hover .dot,\r\n.absol-radio.disabled .dot {\r\n    fill: #929292;\r\n}\r\n\r\n.absol-radio.disabled .bound,\r\n.absol-radio.disabled:hover .bound {\r\n    stroke: #929292;\r\n    fill: #ebebe4;\r\n}\r\n\r\n\r\n.absol-radio .standar-alone {\r\n    display: inline-block;\r\n}\r\n\r\ninput:checked ~ .absol-radio-icon .dot {\r\n    opacity: 1;\r\n}", ""]);



/***/ }),

/***/ 93586:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-radio-button {\r\n    display: inline;\r\n    cursor: pointer;\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-radio-button input {\r\n    display: none;\r\n}\r\n\r\n\r\n.absol-radio-button > svg {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: calc(1em + 4px);\r\n    height: calc(1em + 4px);\r\n}\r\n\r\n.absol-radio-button > svg .bound {\r\n    stroke: #929292;\r\n    fill: white;\r\n}\r\n\r\n.absol-radio-button:hover > svg .bound {\r\n    fill: #d6d6d6;\r\n    stroke: black;\r\n}\r\n\r\n.absol-radio-icon .border {\r\n}\r\n\r\n.absol-radio-button .dot {\r\n    transition: opacity 0.07s;\r\n    opacity: 0;\r\n    fill: #606060;\r\n}\r\n\r\n.absol-radio-button:hover .dot {\r\n    transition: opacity 0.07s;\r\n    opacity: 0;\r\n    fill: black;\r\n}\r\n\r\n.absol-radio-button.checked .dot {\r\n    opacity: 1;\r\n    transition: opacity 0.1s;\r\n}\r\n\r\n\r\n\r\n.absol-radio-button > span:last-child {\r\n    display: none;\r\n}\r\n\r\n\r\n.absol-radio-button.disabled {\r\n    cursor: default;\r\n}\r\n\r\n.absol-radio-button.disabled:hover .dot,\r\n.absol-radio-button.disabled .dot {\r\n    fill: #929292;\r\n}\r\n\r\n.absol-radio-button.disabled .bound,\r\n.absol-radio-button.disabled:hover .bound {\r\n    stroke: #929292;\r\n    fill: #ebebe4;\r\n}\r\n\r\n\r\n.absol-radio .standar-alone {\r\n    display: inline-block;\r\n}\r\n\r\n.absol-radio > span:not(:last-child) {\r\n    padding-right: 0.3em;\r\n}\r\n\r\n.absol-radio span:last-child {\r\n    padding-left: 0.3em;\r\n}\r\n\r\ninput:checked ~ .absol-radio-icon .dot {\r\n    opacity: 1;\r\n}", ""]);



/***/ }),

/***/ 78239:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "label.as-radio-input {\r\n    display: inline-block;\r\n    position: relative;\r\n    width: calc(1em + 2px);\r\n    height: calc(1em + 2px);\r\n    cursor: pointer;\r\n    font-size: inherit;\r\n    box-sizing: border-box;\r\n    overflow: hidden;\r\n    vertical-align: middle;\r\n    border-radius: 50%;\r\n    border: 1px solid var(--candy-border-color);\r\n    text-align: center;\r\n    background-color: white;\r\n    text-align: center;\r\n    white-space: nowrap;\r\n}\r\n\r\nlabel.as-radio-input:hover {\r\n    background-color: var(--candy-hover-background-color);\r\n}\r\n\r\nlabel.as-radio-input::after{\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.as-radio-input .as-radio-input-check-mark {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: 0.5em;\r\n    height: 0.5em;\r\n    background-color: #606060;\r\n    font-size: inherit;\r\n    border-radius: 50%;\r\n}\r\n\r\n.as-radio-input input.as-radio-input-value {\r\n    font-size: inherit;\r\n    position: absolute;\r\n    right: 100%;\r\n    top: 0;\r\n    opacity: 0.0;\r\n}\r\n\r\ninput.as-radio-input-value:not(:checked) ~ .as-radio-input-check-mark {\r\n    display: none;\r\n}\r\n\r\n\r\nlabel.as-radio-input.as-disabled,\r\nlabel.as-radio-input.as-disabled:hover {\r\n    border-color: #929292;\r\n    background-color: #ebebe4;\r\n}", ""]);



/***/ }),

/***/ 61209:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-resize-box {\r\n    position: absolute;\r\n    /*or fixed*/\r\n    z-index: 1;\r\n    box-sizing: border-box;\r\n    opacity: 0.5;\r\n    pointer-events: none;\r\n}\r\n\r\n.as-resize-box-body {\r\n    margin: -1px;\r\n    width: calc(100% + 2px);\r\n    height: calc(100% + 2px);\r\n    position: relative;\r\n    box-sizing: border-box;\r\n    border: solid 2px rgb(32, 150, 218);\r\n}\r\n\r\n.as-resize-box.as-can-move .as-resize-box-body {\r\n    cursor: move;\r\n    pointer-events: all;\r\n}\r\n\r\n.as-resize-box.as-can-click .as-resize-box-body {\r\n    pointer-events: all;\r\n}\r\n\r\n.as-resize-box.as-can-move .as-resize-box-dot,\r\n.as-resize-box.as-can-resize .as-resize-box-dot.right,\r\n.as-resize-box.as-can-resize .as-resize-box-dot.bottom,\r\n.as-resize-box.as-can-resize .as-resize-box-dot.right-bottom {\r\n    display: unset;\r\n\r\n}\r\n\r\n.as-resize-box-dot {\r\n    position: absolute;\r\n    width: 0.6em;\r\n    height: 0.6em;\r\n    background: rgb(32, 150, 218);\r\n    display: none;\r\n    pointer-events: all;\r\n}\r\n\r\n.as-resize-box-dot.left-top {\r\n    top: calc(-0.3em - 1px);\r\n    left: calc(-0.3em - 1px);\r\n    cursor: nw-resize;\r\n}\r\n\r\n.as-resize-box-dot.left-bottom {\r\n    bottom: calc(-0.3em - 1px);\r\n    left: calc(-0.3em - 1px);\r\n    cursor: sw-resize;\r\n}\r\n\r\n.as-resize-box-dot.left {\r\n    top: calc(50% - 0.3em);\r\n    left: calc(-0.3em - 1px);\r\n    cursor: w-resize;\r\n}\r\n\r\n.as-resize-box-dot.top {\r\n    top: calc(-0.3em - 1px);\r\n    left: calc(50% - 0.3em);\r\n    cursor: n-resize;\r\n}\r\n\r\n.as-resize-box-dot.bottom {\r\n    bottom: calc(-0.3em - 1px);\r\n    left: calc(50% - 0.3em);\r\n    cursor: s-resize;\r\n}\r\n\r\n.as-resize-box-dot.right-top {\r\n    top: calc(-0.3em - 1px);\r\n    right: calc(-0.3em - 1px);\r\n    cursor: ne-resize;\r\n}\r\n\r\n.as-resize-box-dot.right-bottom {\r\n    bottom: calc(-0.3em - 1px);\r\n    right: calc(-0.3em - 1px);\r\n    cursor: se-resize;\r\n}\r\n\r\n\r\n.as-resize-box-dot.right {\r\n    top: calc(50% - 0.3em);\r\n    right: calc(-0.3em - 1px);\r\n    cursor: e-resize;\r\n}\r\n\r\n.as-resize-box-overiding .as-resize-box-dot,\r\n.as-resize-box-overiding .as-resize-box-body {\r\n    cursor: unset;\r\n}\r\n\r\n.as-resize-box-overiding.body {\r\n    cursor: move !important;\r\n}\r\n\r\n\r\n.as-resize-box-overiding.left-top {\r\n    cursor: nw-resize !important;\r\n}\r\n\r\n.as-resize-box-overiding.left-bottom {\r\n    cursor: sw-resize !important;\r\n}\r\n\r\n.as-resize-box-overiding.left {\r\n    cursor: w-resize !important;\r\n}\r\n\r\n.as-resize-box-overiding.top {\r\n    cursor: n-resize !important;\r\n}\r\n\r\n.as-resize-box-overiding.bottom {\r\n    cursor: s-resize !important;\r\n}\r\n\r\n.as-resize-box-overiding.right-top {\r\n    cursor: ne-resize !important;\r\n}\r\n\r\n.as-resize-box-overiding.right-bottom {\r\n    cursor: se-resize !important;\r\n}\r\n\r\n\r\n.as-resize-box-overiding.right {\r\n    cursor: e-resize !important;\r\n}", ""]);



/***/ }),

/***/ 4559:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-ribbon-button {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: calc(2em + 2);\r\n    padding-left: 0.5em;\r\n    padding-right: 0.5em;\r\n\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    font-size: 1rem;\r\n    box-sizing: border-box;\r\n    border-radius: 0;\r\n    outline: none;\r\n    border-style: solid;\r\n    border-color: transparent;\r\n    border-width: 1px 1px 1px 1px;\r\n    background-color: transparent;\r\n}\r\n\r\n.as-ribbon-button:disabled .as-ribbon-button-icon {\r\n    color: rgba(16, 16, 16, 0.3) !important;\r\n}\r\n\r\n.as-ribbon-button div,\r\n.as-ribbon-button span {\r\n    font-weight: inherit;\r\n    font-size: inherit;\r\n}\r\n\r\n.as-ribbon-button:hover {\r\n    background-color: rgba(169, 168, 169, 0.15);\r\n}\r\n\r\n.as-ribbon-button:active {\r\n    background-color: rgba(169, 168, 169, 0.3);\r\n}\r\n\r\n\r\n.as-ribbon-split-button:active:hover .as-ribbon-split-button-content > button,\r\n.as-ribbon-split-button:active .as-ribbon-split-button-content > button {\r\n    border-color: rgba(169, 168, 169, 0.3);\r\n}\r\n\r\n.as-ribbon-split-button:hover .as-ribbon-split-button-content > button {\r\n    border-color: rgba(169, 168, 169, 0.15);\r\n}\r\n\r\n.as-ribbon-button-icon {\r\n    font-size: 1.2em;\r\n    margin-right: 0.5em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\nimg.as-ribbon-button-icon,\r\nsvg.as-ribbon-button-icon {\r\n    width: 1.2em;\r\n    height: 1.2em;\r\n}\r\n\r\n.as-ribbon-button-text {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-size: inherit;\r\n}\r\n\r\n.as-ribbon-button-text::before {\r\n    content: attr(data-text);\r\n}\r\n\r\n.as-ribbon-button.as-no-dropdown .as-ribbon-dropdown-icon {\r\n    display: none;\r\n}\r\n\r\n.as-ribbon-button.as-big {\r\n    width: 5em;\r\n    height: auto;\r\n    white-space: nowrap;\r\n    padding-left: 0;\r\n    padding-right: 0;\r\n}\r\n\r\n.as-ribbon-button.as-big span.as-ribbon-button-icon {\r\n    font-size: 2em;\r\n    display: block;\r\n    margin-left: auto;\r\n    margin-right: auto;\r\n}\r\n\r\n.as-ribbon-button.as-big .as-ribbon-button-text {\r\n    white-space: normal;\r\n    max-width: calc(100% - 1em);\r\n}\r\n\r\n.as-ribbon-button.as-big svg.as-ribbon-button-icon,\r\n.as-ribbon-button.as-big img.as-ribbon-button-icon {\r\n    height: 2em;\r\n    width: 2em;\r\n    display: block;\r\n    margin-left: auto;\r\n    margin-right: auto;\r\n}\r\n\r\n.as-ribbon-button.as-appearance-button {\r\n    height: calc(2rem + 2px);\r\n    box-sizing: border-box;\r\n    border: solid 1px #bfbfbf;\r\n    background-color: #ebebeb;\r\n    border-radius: 0.2em;\r\n    outline: none;\r\n    font-size: 1rem;\r\n}\r\n\r\n\r\n.as-ribbon-button.as-appearance-button:hover {\r\n    background-color: #D3D3D3;\r\n}\r\n\r\n.as-ribbon-button.as-appearance-button:active,\r\n.as-ribbon-button.as-appearance-button.as-quick-menu-attached {\r\n    -webkit-box-shadow: inset 0 0.2em 0.25em rgba(0, 0, 0, 0.125);\r\n    box-shadow: inset 0 0.2em 0.25em rgba(0, 0, 0, 0.125);\r\n}\r\n\r\n\r\n.as-select-ribbon-menu {\r\n    color: #007bff;\r\n}\r\n\r\n.as-ribbon-selected {\r\n    background-color: #dfdfdf;\r\n}\r\n\r\n.as-mobile-ribbon-list > button {\r\n    font-size: 12px;\r\n}\r\n\r\n@media screen and (min-width: 350px) {\r\n    .as-mobile-ribbon-list .as-ribbon-button.as-big {\r\n        width: 25%;\r\n    }\r\n}\r\n\r\n\r\n@media screen and (max-width: 350px) {\r\n    .as-mobile-ribbon-list .as-ribbon-button.as-big {\r\n        width: 33%;\r\n    }\r\n}\r\n\r\n.as-mobile-ribbon-list .as-ribbon-button {\r\n    vertical-align: top;\r\n    font-size: 13px;\r\n}\r\n\r\n.as-mobile-ribbon-list .as-ribbon-button.as-big span.as-ribbon-button-icon {\r\n    font-size: 20px;\r\n}", ""]);



/***/ }),

/***/ 68551:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-ribbon-split-button {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: calc(2em + 2px);\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    box-sizing: border-box;\r\n    font-size: 1rem;\r\n}\r\n\r\n.as-ribbon-split-button div,\r\n.as-ribbon-split-button span,\r\n.as-ribbon-split-button button {\r\n    font-weight: inherit;\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.as-ribbon-split-button-content {\r\n    height: 100%;\r\n}\r\n\r\n.as-ribbon-split-button-content > button {\r\n    font-family: inherit;\r\n    border-radius: 0;\r\n    background-color: transparent;\r\n    height: 100%;\r\n    margin-right: 0;\r\n    outline: none;\r\n    box-sizing: border-box;\r\n    border-style: solid;\r\n    border-color: transparent;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-ribbon-split-button-content > button:hover {\r\n    background-color: rgba(169, 168, 169, 0.15);\r\n}\r\n\r\n.as-ribbon-split-button-content > button:active {\r\n    background-color: rgba(169, 168, 169, 0.3);\r\n}\r\n\r\n\r\n.as-ribbon-split-button-primary {\r\n    font-size: inherit;\r\n    padding-left: 0.5em;\r\n    padding-right: 0.2em;\r\n    border-width: 1px 0px 1px 1px;\r\n    color: inherit;\r\n}\r\n\r\n.as-ribbon-split-button-extend {\r\n    color: rgb(37, 36, 35);\r\n    width: calc(1em + 2px);\r\n    padding: 0;\r\n    text-align: center;\r\n    font-size: 20px;\r\n    border-width: 1px 1px 1px 0px;\r\n}\r\n\r\n.as-ribbon-split-button-extend span:before {\r\n    margin-left: -3px;\r\n}\r\n\r\n\r\n.as-ribbon-split-button:active:hover .as-ribbon-split-button-content > button,\r\n.as-ribbon-split-button:active .as-ribbon-split-button-content > button {\r\n    border-color: rgba(169, 168, 169, 0.3);\r\n}\r\n\r\n.as-ribbon-split-button:hover .as-ribbon-split-button-content > button {\r\n    border-color: rgba(169, 168, 169, 0.15);\r\n}\r\n\r\n.as-ribbon-split-button-icon {\r\n    margin-right: 0.5em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\nspan.as-ribbon-split-button-icon {\r\n    font-size: 1.2em;\r\n}\r\n\r\nimg.as-ribbon-split-button-icon,\r\nsvg.as-ribbon-split-button-icon {\r\n    width: 1.2em;\r\n    height: 1.2em;\r\n}\r\n\r\n.as-ribbon-split-button-text {\r\n    vertical-align: middle;\r\n    font-size: inherit;\r\n}\r\n\r\n.as-ribbon-split-button-text::before {\r\n    content: attr(data-text);\r\n}\r\n\r\n.as-ribbon-split-button-extend .as-ribbon-split-button-text {\r\n    display: none;\r\n}\r\n\r\n.as-ribbon-split-button.as-no-dropdown .as-ribbon-dropdown-icon{\r\n    display: none;\r\n}\r\n\r\n.as-ribbon-split-button.as-no-dropdown .as-ribbon-split-button-primary {\r\n    padding-right: 5px;\r\n    border-width: 1px 1px 1px 1px;\r\n}\r\n\r\n.as-ribbon-split-button.as-big {\r\n    width: 5em;\r\n    height: auto;\r\n}\r\n\r\n.as-ribbon-split-button.as-big .as-ribbon-split-button-content {\r\n    height: auto;\r\n}\r\n\r\n.as-ribbon-split-button.as-big span.as-ribbon-split-button-icon {\r\n    font-size: 2em;\r\n    display: block;\r\n    margin: 0;\r\n}\r\n\r\n.as-ribbon-split-button.as-big .as-ribbon-split-button-extend .as-ribbon-split-button-text {\r\n    display: inline-block;\r\n    white-space: normal;\r\n    max-width: calc(100% - 1em);\r\n}\r\n\r\n.as-ribbon-split-button.as-big .as-ribbon-split-button-primary .as-ribbon-split-button-text {\r\n    display: none;\r\n}\r\n\r\n.as-ribbon-split-button.as-big .as-ribbon-split-button-extend {\r\n    white-space: nowrap;\r\n    width: 100%;\r\n    height: auto;\r\n    border-width: 0 1px 1px 1px;\r\n\r\n}\r\n\r\n.as-ribbon-split-button.as-big .as-ribbon-split-button-primary {\r\n    width: 100%;\r\n    height: 2.5em;\r\n    box-sizing: border-box;\r\n    border-width: 1px 1px 0 1px;\r\n}\r\n\r\n.as-ribbon-split-button.as-big img.as-ribbon-split-button-icon,\r\n.as-ribbon-split-button.as-big svg.as-ribbon-split-button-icon {\r\n    width: 2em;\r\n    height: 2em;\r\n}", ""]);



/***/ }),

/***/ 13478:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-rotated-text {\r\n\r\n}\r\n\r\n.as-rotated-text::after {\r\n    content: \"o\";\r\n    color: transparent;\r\n    display: inline;\r\n}\r\n\r\n.as-rotated-text-content {\r\n    transform: rotate(0deg);\r\n    transform-origin: 0.3em 50%;\r\n    display: block;\r\n    zoom: 1.001;\r\n}\r\n\r\n\r\n.as-rotated-text-anchor{\r\n    position: fixed;\r\n    z-index: 1000;\r\n}\r\n\r\n.as-rotated-text,.as-rotated-text-anchor,  .as-rotated-text-content{\r\n    font: inherit;\r\n}", ""]);



/***/ }),

/***/ 59355:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-vscroller {\r\n    position: relative;\r\n    overflow-x: hidden;\r\n}\r\n\r\n\r\n.absol-vscroller.disabled > .absol-vscroller-viewport {\r\n    overflow-y: visible;\r\n    margin-right: 0px;\r\n    min-width: 100%;\r\n}\r\n\r\n.absol-vscroller.disabled {\r\n    overflow: visible;\r\n    overflow-x: visible;\r\n\r\n}\r\n\r\n\r\n.absol-vscroller-viewport {\r\n    overflow-y: scroll;\r\n    box-sizing: content-box;\r\n\r\n}\r\n\r\n.absol-vscroller > .absol-vscroller-viewport {\r\n    max-height: 100%;\r\n}\r\n\r\n.absol-vscroller.limited-height > .absol-vscroller-viewport {\r\n    max-height: inherit;\r\n}\r\n\r\n\r\n/************  hscroller  ***********/\r\n.absol-hscroller {\r\n    position: relative;\r\n    overflow-y: hidden;\r\n}\r\n\r\n.absol-hscroller.disabled {\r\n    overflow: visible;\r\n    overflow-y: visible;\r\n}\r\n\r\n.absol-hscroller-viewport {\r\n    overflow-x: scroll;\r\n    box-sizing: content-box;\r\n    min-height: calc(100% + 17px);\r\n}\r\n\r\n.absol-hscroller.disabled > .absol-hscroller-viewport {\r\n    overflow-x: visible;\r\n    margin-bottom: 0px;\r\n}\r\n\r\n\r\n.absol-hscroller > .absol-hscroller-viewport {\r\n    max-width: 100%;\r\n}\r\n\r\n\r\n/********** scroll bar *********************/\r\n.absol-scrollbar-force-modal {\r\n    position: fixed;\r\n    top: 5px;\r\n    left: 5px;\r\n    right: 5px;\r\n    bottom: 5px;\r\n    z-index: 1000000;\r\n}\r\n\r\n.absol-scrollbar-container {\r\n    position: absolute;\r\n    right: 0;\r\n    bottom: 0;\r\n    z-index: 10;\r\n}\r\n\r\n.absol-scrollbar-container.vertical {\r\n    top: 0;\r\n    width: 7px;\r\n}\r\n\r\n.absol-scrollbar-container.horizontal {\r\n    height: 7px;\r\n    left: 0;\r\n}\r\n\r\n.absol-scrollbar-container > .absol-scrollbar {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n\r\n.absol-scrollbar-container.vertical > .absol-scrollbar > .absol-scrollbar-button {\r\n    left: 1px;\r\n    right: 1px;\r\n    top: 0;\r\n}\r\n\r\n.absol-scrollbar-container.horizontal > .absol-scrollbar > .absol-scrollbar-button {\r\n    top: 1px;\r\n    bottom: 1px;\r\n    left: 0;\r\n}\r\n\r\n.absol-scrollbar {\r\n    position: relative;\r\n    background-color: rgba(180, 180, 182, 0.1);\r\n    overflow: hidden;\r\n}\r\n\r\n.absol-scrollbar-button {\r\n    position: absolute;\r\n    background-color: rgba(133, 133, 133, 0.5);\r\n    border-radius: 2px;\r\n}\r\n\r\n.absol-scrollbar-button:hover, .absol-scrollbar-button:active {\r\n    background-color: rgba(133, 133, 133, 1);;\r\n}\r\n\r\n\r\n.absol-scrollbar.absol-hidden {\r\n    visibility: hidden;\r\n}\r\n\r\n.absol-vscrollbar .absol-scrollbar-button {\r\n    width: 100%;\r\n}\r\n\r\n\r\n.absol-hscrollbar .absol-scrollbar-button {\r\n    height: 100%;\r\n}\r\n\r\n.absol-table-scroller-vscrollbar-container .absol-vscrollbar:not(.as-overflow) {\r\n    visibility: hidden;\r\n    pointer-events: none;\r\n}\r\n\r\n.absol-table-scroller-left-vscroller-viewport:empty {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 23542:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-search-text-input {\r\n    position: relative;\r\n    height: 2em;\r\n    border-radius: 0.3em;\r\n    border: solid 1px #a9a9a9;\r\n    font-size: 1rem;\r\n    background-color: white;\r\n}\r\n\r\n.absol-search-text-input.focus {\r\n    outline: solid 1px rgba(30, 30, 255, 0.4);\r\n}\r\n\r\n.absol-search-text-input-container {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    right: 2em;\r\n}\r\n\r\n.absol-search-text-button-container {\r\n    position: absolute;\r\n    top: 0;\r\n    right: 0;\r\n    width: 2em;\r\n    bottom: 0em;\r\n}\r\n\r\n.absol-search-text-button-container button {\r\n    width: 100%;\r\n    height: 100%;\r\n    outline: none;\r\n    border: none;\r\n    background: transparent;\r\n    padding: 0;\r\n    font-size: 1em;\r\n}\r\n\r\n.absol-search-text-button-container button > svg {\r\n    height: calc(16em / 14);\r\n    width: calc(16em / 14);\r\n    fill: rgb(132, 132, 132);\r\n}\r\n\r\n.absol-search-text-input-container input {\r\n    width: 100%;\r\n    height: 100%;\r\n    font-size: 1em;\r\n    box-sizing: border-box;\r\n    outline: none;\r\n    border: none;\r\n    background-color: transparent;\r\n    padding-left: 0.6em;\r\n}\r\n\r\n.absol-search-text-input:not(.searching) svg.times {\r\n    display: none;\r\n}\r\n\r\n.absol-search-text-input.searching svg.find {\r\n    display: none;\r\n}\r\n\r\n.absol-search-text-input .as-spinner-ico{\r\n    width: 2em;\r\n    height: 2em;\r\n}\r\n\r\n.absol-search-text-input:not(.as-waiting) svg.as-spinner-ico,\r\n.absol-search-text-input.as-waiting svg:not(.as-spinner-ico) {\r\n    display: none;\r\n}\r\n\r\n.absol-search-text-input-container input::-webkit-search-cancel-button {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 60182:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --select-box-item-height: calc(20rem / 14);\r\n    --select-box-item-font-size: 1rem;\r\n    --select-box-item-border-radius: 9px;\r\n    --select-box-item-close-opacity: 0;\r\n    --select-box-min-height: calc(2rem + 2px);\r\n    --select-box-focus-item-color: rgb(208, 145, 239);\r\n}\r\n\r\n.absol-selectbox {\r\n    --list-min-width: 3em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    position: relative;\r\n    min-height: var(--select-box-min-height);\r\n    min-width: var(--list-min-width);\r\n    border: solid 1px #d6d6d6;\r\n    border-radius: calc(3rem / 14);\r\n    box-sizing: border-box;\r\n    padding-right: var(--select-box-item-height);\r\n    overflow-y: auto;\r\n    outline: none;\r\n    background-color: white;\r\n}\r\n\r\n.absol-selectbox:not(.as-disable-click-to-focus) {\r\n    cursor: copy;\r\n}\r\n\r\n.absol-selectbox.as-disabled {\r\n    pointer-events: none;\r\n    background-color: var(--as-disabled-background-color);\r\n}\r\n\r\n.absol-selectbox.as-disabled .absol-selectbox-item {\r\n    opacity: 0.7;\r\n}\r\n\r\n.absol-selectbox {\r\n    white-space: normal;\r\n}\r\n\r\n.absol-selectbox .absol-selectbox-item {\r\n    margin: calc((var(--select-box-min-height) - 2px - var(--select-box-item-height)) / 2) 2px;\r\n}\r\n\r\n.absol-selectbox-item {\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    display: inline-block;\r\n    position: relative;\r\n    font-size: var(--select-box-item-font-size);\r\n    height: var(--select-box-item-height);\r\n    box-sizing: border-box;\r\n    border-radius: var(--select-box-item-border-radius);\r\n    overflow: hidden;\r\n    background-color: rgb(113, 148, 169);\r\n    border-color: rgb(121, 165, 192);\r\n    vertical-align: top;\r\n    white-space: normal;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none;\r\n    user-select: none;\r\n    color: white;\r\n    cursor: pointer;\r\n}\r\n\r\n\r\n.absol-selectbox-item.as-theme-confirmed {\r\n    background-color: rgb(145, 228, 251);\r\n}\r\n\r\n.absol-selectbox-item.as-theme-declined {\r\n    background-color: rgb(255, 138, 138)\r\n}\r\n\r\n.absol-selectbox-item.as-theme-waiting {\r\n    background-color: rgb(255, 227, 174);\r\n    color: black;\r\n}\r\n\r\n.absol-selectbox-item-text {\r\n    height: var(--select-box-item-height);\r\n    padding-right: calc(var(--select-box-item-height) + 5px);\r\n    padding-left: 5px;\r\n    font-size: inherit;\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-selectbox-item-text:hover {\r\n    background-color: rgba(0, 0, 0, 0.0893617021);\r\n}\r\n\r\n.absol-selectbox-item-text span {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-selectbox-item-close {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: var(--select-box-item-height);\r\n    text-align: center;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none;\r\n    user-select: none;\r\n    cursor: pointer;\r\n    background-color: rgba(0, 0, 0, var(--select-box-item-close-opacity));\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-selectbox-item-close:hover {\r\n    color: var(--as-transparent-button-text-hover-color);\r\n}\r\n\r\n.absol-selectbox-item-close::after,\r\n.absol-selectbox-item-text::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.absol-selectbox-item-close span {\r\n    font-size: 1.25em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.absol-selectbox.as-item-focusable .absol-selectbox-item.as-active {\r\n    background-color: var(--select-box-focus-item-color);\r\n}", ""]);



/***/ }),

/***/ 4994:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-selectlist {\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.absol-selectlist * {\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-selectlist .absol-selectlist-item:hover {\r\n    background-color: #efefef;\r\n}\r\n\r\n.absol-selectlist .absol-selectlist-item {\r\n    height: calc(20rem / 14);\r\n    font-size: 1rem;\r\n    cursor: pointer;\r\n}\r\n\r\n.absol-selectlist-item.as-selected {\r\n    background-color: #dfdfdf;\r\n}\r\n\r\n\r\n.absol-selectlist-item.as-disabled,\r\n.absol-selectlist-item.as-disabled * {\r\n    color: var(--as-disabled-text-color);\r\n    pointer-events: none;\r\n}\r\n\r\n.absol-selectlist:not(.as-searching) > .absol-selectlist-item.as-last-in-group,\r\n.as-select-list-box:not(.as-searching) .as-last-in-group {\r\n    position: relative;\r\n    overflow: visible;\r\n}\r\n\r\n\r\n.as-select-list-box:not(.as-searching) .as-last-in-group::after,\r\n.absol-selectlist:not(.as-searching) > .absol-selectlist-item.as-last-in-group:not(:last-child)::after {\r\n    content: \"\";\r\n    border-bottom: 1px solid #aaaaaa;\r\n    position: absolute;\r\n    left: 0.2em;\r\n    right: 0.2em;\r\n    bottom: -0.5px;\r\n    z-index: 20;\r\n}\r\n\r\n.absol-selectlist-item-text {\r\n    line-height: inherit;\r\n    white-space: pre;\r\n    padding-left: var(--as-input-horizontal-padding);\r\n    padding-right: var(--as-input-horizontal-padding);\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none;\r\n    user-select: none;\r\n}\r\n\r\n.absol-selectlist-item {\r\n    height: 20px;\r\n    line-height: 20px;\r\n    --level: 0;\r\n    padding-left: calc(0.9em * var(--level));\r\n}\r\n\r\n\r\n.absol-selectlist-item {\r\n    position: relative;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-selectlist-item-desc-container {\r\n    position: absolute;\r\n    right: 0.3em;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.absol-selectlist-item-desc {\r\n    font-style: italic;\r\n    line-height: 20px;\r\n    white-space: nowrap;\r\n    color: rgb(37, 37, 37);\r\n}\r\n\r\n.absol-selectlist-item-desc:empty {\r\n    display: none;\r\n}\r\n\r\n.absol-selectlist-item {\r\n    padding-right: calc(0.35em + var(--select-list-desc-width));\r\n}\r\n\r\n.absol-selectlist-item-desc-container {\r\n    width: var(--select-list-desc-width);\r\n}\r\n\r\n\r\n.as-select-list-icon {\r\n    font-size: 1.5em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    padding-left: var(--as-input-horizontal-padding);\r\n}\r\n\r\n\r\n\r\n/**************** MOBILE ******************************/\r\n\r\n:root {\r\n    --modal-margin-top: 80px;\r\n    --modal-margin-bottom: 80px;\r\n    --modal-max-width: 500px;\r\n    --modal-width: calc(100vw - 80px);\r\n    /*--modal-border-radius: 8px;*/\r\n    --modal-border-radius: 0px;\r\n}\r\n\r\n.am-list-modal,\r\n.am-list-modal-v2 {\r\n    z-index: 100005;\r\n    position: fixed;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    text-align: center;\r\n    box-sizing: border-box;\r\n    padding-top: var(--modal-margin-top);\r\n    background-color: rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.am-list-modal > div,\r\n.am-list-modal-v2 > div {\r\n    display: inline-block;\r\n    text-align: initial;\r\n}\r\n\r\n\r\n.am-list-popup-box {\r\n    box-shadow: 2px 2px 2px 0px #908787;\r\n    -webkit-box-shadow: 2px 2px 2px 0px #908787;\r\n    background-color: #ffffff;\r\n    border-radius: var(--modal-border-radius);\r\n    font-family: Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.am-list-popup-box.am-enable-search .absol-search-text-input,\r\n.am-list-modal-v2.as-enable-search .absol-search-text-input {\r\n    visibility: visible;\r\n}\r\n\r\n\r\n.am-list-popup-header {\r\n    height: calc(2em + 10px);\r\n    display: block;\r\n    white-space: nowrap;\r\n    box-sizing: border-box;\r\n    padding-top: 5px;\r\n    padding-bottom: 5px;\r\n    padding-left: 10px;\r\n    border-bottom: solid 1px #dddddd;\r\n    /*background-color: rgba(169, 169, 169, 0.2);*/\r\n}\r\n\r\n.am-list-popup-header .absol-search-text-input {\r\n    display: inline-block;\r\n    width: calc(100% - 2em - 18px);\r\n    vertical-align: middle;\r\n    box-sizing: border-box;\r\n    background-color: white;\r\n}\r\n\r\n.am-list-popup-close-btn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    border-radius: 50%;\r\n    padding: 0;\r\n    height: 2em;\r\n    width: 2em;\r\n    font-size: inherit;\r\n    border: none;\r\n    outline: none;\r\n    margin-left: 10px;\r\n    background-color: rgb(255, 255, 255);\r\n    color: #7a7a7a;\r\n    white-space: nowrap;\r\n}\r\n\r\n.am-list-popup-close-btn:active {\r\n    color: red;\r\n}\r\n\r\n\r\n.am-list-popup-close-btn:before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    height: 2em;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-list-popup-close-btn span {\r\n    font-size: 24px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    line-height: 1;\r\n}\r\n\r\n.am-list-popup-box .absol-search-text-input {\r\n    visibility: hidden;\r\n}\r\n\r\n.am-list-popup-paging {\r\n    display: block;\r\n    height: 2em;\r\n    text-align: center;\r\n    box-sizing: border-box;\r\n    border-bottom: 1px solid #dddddd;\r\n}\r\n\r\n.am-list-popup-paging::before {\r\n    content: \"\";\r\n    height: 100%;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-list-popup-paging-content {\r\n    padding-left: 0.5em;\r\n    padding-right: 0.5em;\r\n}\r\n\r\n.am-list-popup-paging > * {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-list-popup-paging > button {\r\n    padding: 0;\r\n    margin-left: 0.25em;\r\n    margin-right: 0.25em;\r\n    width: 1.75em;\r\n    height: 1.75em;\r\n    display: inline-block;\r\n    background-color: transparent;\r\n    border: none;\r\n    box-sizing: border-box;\r\n    outline: none;\r\n}\r\n\r\n.am-list-popup-paging > button:active {\r\n    background-color: rgba(169, 169, 169, 0.3);\r\n}\r\n\r\n\r\ninput[type=\"number\"].am-list-popup-paging-offset {\r\n    width: 4em;\r\n    outline: none;\r\n    margin-right: 0.2em;\r\n    /*border: solid 1px #a9a9a9;*/\r\n    /*border-radius: 0.3em;*/\r\n    border: none;\r\n    text-align: right;\r\n    font-size: inherit;\r\n    height: 1.25em;\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.am-list-popup-list-scroller {\r\n    width: 100%;\r\n    overflow: auto;\r\n    --content-height: calc(100vh - 200px);\r\n    -ms-overflow-style: none; /* IE and Edge */\r\n    scrollbar-width: none; /* Firefox */\r\n}\r\n\r\n\r\n.am-list-popup-list-scroller::-webkit-scrollbar {\r\n    display: none;\r\n}\r\n\r\n.am-list-popup-content {\r\n    display: block;\r\n    position: relative;\r\n}\r\n\r\n.am-list-popup-list-page {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: -200vh;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.am-list-modal .am-selectlist {\r\n    width: 100%;\r\n}\r\n\r\n.am-list-popup-list-page.am-selectlist {\r\n    --desc-width: inherit;\r\n}\r\n\r\n.am-value-hidden .am-selectlist-item.as-selected {\r\n    display: none;\r\n}\r\n\r\n.am-selectlist {\r\n    display: table;\r\n    border-collapse: collapse;\r\n    border-spacing: 0;\r\n}\r\n\r\n.am-selectlist > .am-selectlist-item {\r\n    display: table-row;\r\n\r\n}\r\n\r\n.am-selectlist > .am-selectlist-item:active {\r\n    background-color: rgba(169, 169, 169, 0.4);\r\n}\r\n\r\n.am-selectlist > .am-selectlist-item.as-selected {\r\n    background-color: #dfdfdf;\r\n}\r\n\r\n\r\n.am-selectlist > .am-selectlist-item {\r\n    border-bottom: 0.5px solid #dddddd;\r\n}\r\n\r\n.am-selectlist > .am-selectlist-item > .am-selectlist-item-check-ctn {\r\n    display: table-cell;\r\n    vertical-align: middle;\r\n    padding-left: 0.35em;\r\n}\r\n\r\n.am-selectlist > .am-selectlist-item > .am-selectlist-item-text-ctn,\r\n.am-selectlist > .am-selectlist-item > .am-selectlist-item-desc-ctn {\r\n    display: table-cell;\r\n    padding-top: 0.5em;\r\n    padding-bottom: 0.5em;\r\n}\r\n\r\n.am-selectlist > .am-selectlist-item > .am-selectlist-item-text-ctn {\r\n    padding-right: 5px;\r\n    padding-left: calc(10px + 0.9em * var(--level));\r\n}\r\n\r\n.am-selectlist > .am-selectlist-item > .am-selectlist-item-desc-ctn {\r\n    padding-left: 5px;\r\n    padding-right: 10px;\r\n}\r\n\r\n\r\n.am-selectlist {\r\n    --desc-width: auto;\r\n}\r\n\r\n.am-selectlist .am-selectlist-item-desc-ctn {\r\n    width: var(--desc-width);\r\n}\r\n\r\n.am-check-list-page {\r\n    overflow: hidden;\r\n}\r\n\r\n/******************************************************/\r\n.am-selectlist-item {\r\n    --level: 0;\r\n}\r\n\r\n.am-selectlist-item-text-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-selectlist-item-desc-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.am-selectlist-item-desc {\r\n    font-style: italic;\r\n    line-height: 20px;\r\n    color: rgb(80, 80, 82);\r\n    white-space: pre;\r\n}\r\n\r\n\r\n.am-selectlist-item-icon {\r\n    font-size: 1.5em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-check-list-scroller {\r\n    max-height: calc(100vh - var(--modal-margin-top) - 200px);\r\n    overflow-y: auto;\r\n    overflow-x: hidden;\r\n}\r\n\r\n.am-check-list-modal {\r\n    --col1-width: 100px;\r\n    --col2-width: 100px;\r\n}\r\n\r\n.am-check-list-modal .am-list-popup-content {\r\n    width: calc(var(--col1-width) + var(--col2-width));\r\n    min-width: 300px;\r\n}\r\n\r\n.am-check-list-modal .am-selectlist-item {\r\n    position: relative;\r\n    min-height: 30px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.am-check-list-modal .am-selectlist-item-desc-ctn {\r\n    position: absolute;\r\n    width: var(--col2-width);\r\n    right: 0;\r\n    height: 100%;\r\n    white-space: nowrap;\r\n\r\n}\r\n\r\n.am-check-list-modal .am-selectlist-item-text,\r\n.am-check-list-modal .am-selectlist-item-desc {\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n    line-height: 20px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    white-space: pre;\r\n}\r\n\r\n.am-check-list-modal .am-selectlist-item-text-ctn {\r\n    position: absolute;\r\n    right: var(--col2-width);\r\n    left: calc(var(--level) * 12px + 30px);\r\n    height: 100%;\r\n    white-space: nowrap;\r\n}\r\n\r\n\r\n.am-check-list-modal .am-selectlist-item-check-ctn {\r\n    position: absolute;\r\n    top: 0;\r\n    left: calc(var(--level) * 12px + 5px);\r\n    height: 100%;\r\n}\r\n\r\n.am-check-list-modal .am-selectlist-item-check-ctn::before,\r\n.am-check-list-modal .am-selectlist-item-check-ctn > *,\r\n.am-check-list-modal .am-selectlist-item-text-ctn::before,\r\n.am-check-list-modal .am-selectlist-item-desc-ctn::before,\r\n.am-check-list-modal .am-selectlist-item-text-ctn > span {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-check-list-modal .am-selectlist-item-check-ctn::before,\r\n.am-check-list-modal .am-selectlist-item-text-ctn::before,\r\n.am-check-list-modal .am-selectlist-item-desc-ctn::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n\r\n.am-check-list-modal .am-selectlist-item-text-ctn {\r\n    white-space: nowrap;\r\n}\r\n\r\n.am-check-list-modal .am-selectlist-item-text {\r\n    max-height: 100%;\r\n    line-height: 20px;\r\n    white-space: pre;\r\n    width: calc(var(--col1-width) - 12px * var(--level) - 30px - 21px - 10px);\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n}\r\n\r\n.am-list-modal-v2 {\r\n    position: fixed;\r\n    top: 0;\r\n    left: 0;\r\n    height: 100%;\r\n    width: 100%;\r\n    box-sizing: border-box;\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.am-list-modal-v2 .am-list-popup-list-scroller {\r\n    max-height: calc(100vh - var(--modal-margin-top) - 200px);\r\n}\r\n\r\n.am-list-modal-v2 .am-list-popup-content {\r\n    width: calc(var(--col1-width) + var(--col2-width));\r\n}\r\n\r\n.am-list-modal-v2 .am-selectlist-item-text-ctn {\r\n    padding-left: 10px;\r\n    white-space: nowrap;\r\n}\r\n\r\n.am-list-modal-v2 .am-selectlist-item-text-ctn::before,\r\n.am-list-modal-v2 .am-selectlist-item-desc-ctn::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n.am-list-modal-v2 .am-selectlist-item-text-ctn::before,\r\n.am-list-modal-v2 .am-selectlist-item-desc-ctn::before,\r\n.am-list-modal-v2 .am-selectlist-item-text,\r\n.am-list-modal-v2 .am-selectlist-item-desc {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-selectlist-item-text {\r\n    white-space: pre;\r\n}\r\n\r\n.am-list-modal-v2 .am-selectlist-item {\r\n    position: relative;\r\n    height: 30px;\r\n    line-height: 20px;\r\n}\r\n\r\n\r\n.am-list-modal-v2 .am-selectlist-item::after {\r\n    content: \"\";\r\n    display: block;\r\n    position: absolute;\r\n    bottom: 0;\r\n    left: 0;\r\n    right: 0;\r\n    border-bottom: 1px solid #eee;\r\n}\r\n\r\n.am-check-list-modal .am-selectlist-item.as-last-in-group::after{\r\n    content: \"\";\r\n    display: block;\r\n    position: absolute;\r\n    bottom: 0;\r\n    left: 0;\r\n    right: 0;\r\n    border-bottom: 1px solid #aaa;\r\n}\r\n\r\n.am-list-modal-v2 .am-selectlist-item.as-selected {\r\n    background-color: #dfdfdf;\r\n}\r\n\r\n.am-list-modal-v2 .am-selectlist-item-text-ctn,\r\n.am-list-modal-v2 .am-selectlist-item-desc-ctn {\r\n    box-sizing: border-box;\r\n    overflow: hidden;\r\n    height: 100%;\r\n}\r\n\r\n.am-list-modal-v2 .am-selectlist-item {\r\n    white-space: nowrap;\r\n}\r\n\r\n\r\n.am-list-modal-v2 .am-selectlist-item-text-ctn {\r\n    width: var(--col1-width);\r\n}\r\n\r\n.am-list-modal-v2 .am-selectlist-item-desc-ctn {\r\n    width: var(--col2-width);\r\n}\r\n\r\n.am-list-modal-v2 .am-list-popup-header {\r\n    height: auto;\r\n    min-height: calc(2em + 10px);\r\n}\r\n\r\n.am-selectlist-item.as-disabled .as-checkbox-input{\r\n    visibility: hidden;\r\n}", ""]);



/***/ }),

/***/ 17289:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-select-list-box {\r\n    --select-list-estimate-width: 0;\r\n    --max-height: calc(100vh - 80px);\r\n    --as-width-limit: 100vw;\r\n    position: fixed;\r\n    top: 10px;\r\n    left: 10px;\r\n    width: calc(var(--select-list-estimate-width) + 2px + 5px + 7px);\r\n    font-size: 1rem;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    border: solid 1px rgb(100, 100, 255);\r\n    box-sizing: border-box;\r\n    background-color: white;\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    -webkit-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    -moz-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    outline: none;\r\n}\r\n\r\n.as-select-list-box.as-has-icon .absol-selectlist-item {\r\n    height: calc(30rem / 14);\r\n    line-height: calc(30rem / 14);\r\n}\r\n\r\n.as-select-list-box.as-enable-search {\r\n    min-width: 10em;\r\n}\r\n\r\n.as-select-list-box.as-text-align-center .absol-selectlist-item {\r\n    text-align: center;\r\n}\r\n\r\n.as-select-list-box.as-text-align-center .absol-selectlist-item-text {\r\n    padding-right: calc(0.35em + 28px);\r\n}\r\n\r\n.as-select-menu.as-text-align-center {\r\n    text-align: center;\r\n}\r\n\r\n.as-select-menu.as-text-align-center .absol-selectlist-item,\r\n.as-select-list-box.as-text-align-center .absol-selectlist-item {\r\n    padding-left: 0.35em;\r\n    padding-right: calc(0.35em + 28px);\r\n}\r\n\r\n.as-select-menu.as-text-align-center .absol-selectlist-item-text,\r\n.as-select-list-box.as-text-align-center .absol-selectlist-item-text {\r\n    padding: 0;\r\n}\r\n\r\n\r\ndiv.absol-follower.as-select-list-box {\r\n    z-index: 4000000;\r\n}\r\n\r\n.as-select-list-box .as-select-list-box {\r\n    min-width: 100%;\r\n}\r\n\r\n.as-select-list-box-search-ctn {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n}\r\n\r\n.as-select-list-box.as-enable-search.as-anchor-6 .as-select-list-box-search-ctn,\r\n.as-select-list-box.as-enable-search.as-anchor-5 .as-select-list-box-search-ctn {\r\n    bottom: 0;\r\n    top: unset;\r\n}\r\n\r\n.as-select-list-box.as-enable-search.as-anchor-6,\r\n.as-select-list-box.as-enable-search.as-anchor-5 {\r\n    padding-bottom: calc(2em + 10px);\r\n    padding-top: 0;\r\n}\r\n\r\n.as-select-list-box.as-enable-search,\r\n.as-select-list-box.as-enable-search.as-anchor-1,\r\n.as-select-list-box.as-enable-search.as-anchor-2 {\r\n    padding-top: calc(2em + 10px);\r\n}\r\n\r\n.as-select-list-box.as-enable-search .as-select-list-box-search-ctn,\r\n.as-select-list-box.as-enable-search.as-anchor-1 .as-select-list-box-search-ctn,\r\n.as-select-list-box.as-enable-search.as-anchor-2 .as-select-list-box-search-ctn {\r\n    top: 0;\r\n    bottom: unset;\r\n}\r\n\r\n.as-select-list-box-scroller {\r\n    overflow-y: auto;\r\n    overflow-x: visible;\r\n}\r\n\r\n.as-select-list-box .as-select-list-box-scroller {\r\n    max-height: var(--max-height);\r\n}\r\n\r\n.as-select-list-box.as-enable-search .as-select-list-box-scroller {\r\n    max-height: calc(var(--max-height) - 2em - 10px);\r\n}\r\n\r\n.as-select-list-box-content {\r\n    position: relative;\r\n}\r\n\r\n.as-select-list-box-page {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-select-list-box .absol-selectlist-item {\r\n    cursor: default;\r\n}\r\n\r\n.as-select-list-box .absol-selectlist-item-text {\r\n    max-width: calc(var(--as-width-limit) - var(--select-list-desc-width) - 10px);\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    text-overflow: ellipsis;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-select-list-box-search-ctn {\r\n    display: none;\r\n    padding: 5px;\r\n}\r\n\r\n\r\n.as-select-list-box.as-enable-search .as-select-list-box-search-ctn {\r\n    display: block;\r\n}\r\n\r\n\r\n.as-select-list-box .as-last-in-group span {\r\n    line-height: 19px;\r\n}\r\n\r\n\r\n.as-select-list-box .absol-selectlist-item:hover {\r\n    background-color: #efefef;\r\n}\r\n\r\n.as-select-list-box.as-value-hidden .absol-selectlist-item.as-selected {\r\n    color: #aaaaaa;\r\n}\r\n\r\n.as-select-list-box.as-value-hidden .absol-selectlist-item.as-selected.as-is-leaft {\r\n    display: none;\r\n}\r\n\r\n\r\n/**********************************************************************************************************************/\r\n", ""]);



/***/ }),

/***/ 92183:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-selectmenu-anchor-container {\r\n    /* position: fixed; */\r\n\r\n    /* top: 0; */\r\n    /* left: 0; */\r\n    width: 0;\r\n    height: 0;\r\n    overflow: visible;\r\n}\r\n\r\n.absol-selectmenu-anchor {\r\n    position: relative;\r\n}\r\n\r\n.absol-selectmenu-anchor-content-container {\r\n    position: absolute;\r\n    z-index: 1002;\r\n    top: 0;\r\n    left: 0;\r\n}\r\n\r\n.absol-selectmenu-anchor-content-container .absol-bscroller {\r\n    max-height: calc(100vh - 50px);\r\n}\r\n\r\n\r\n.absol-selectmenu-anchor.absol-disabled .absol-selectmenu-anchor-content-container {\r\n    visibility: hidden;\r\n    top: -100000px;\r\n    left: -10000px;\r\n    z-index: -1000;\r\n    opacity: 0;\r\n}\r\n\r\n\r\n.absol-selectmenu-dropdown-box {\r\n    border: solid 1px rgb(100, 100, 255);\r\n    box-sizing: border-box;\r\n    background-color: white;\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    -webkit-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    -moz-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n}\r\n\r\n.absol-selectmenu-dropdown-box > .as-bscroller {\r\n    overflow-y: auto;\r\n}\r\n\r\n.absol-selectmenu-dropdown-box .absol-search-text-input {\r\n    margin: 0.2em;\r\n}\r\n\r\n\r\n.absol-selectmenu.absol-hidden {\r\n    display: none !important;\r\n}\r\n\r\n.absol-selectmenu-render-space {\r\n    position: fixed;\r\n    top: 0;\r\n    left: 0;\r\n    z-index: -1000;\r\n    visibility: hidden;\r\n    font-size: 14px;\r\n}\r\n\r\n.absol-selectmenu-render-space > div {\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.absol-selectmenu.as-disabled,\r\n.as-select-menu.as-disabled {\r\n    pointer-events: none;\r\n    background-color: var(--as-disabled-background-color);\r\n    color: var(--as-disabled-text-color);\r\n}\r\n\r\n.absol-selectmenu {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    position: relative;\r\n    height: calc(2em + 2px);\r\n    min-width: calc(2em + 2px);\r\n    border: solid 1px #d6d6d6;\r\n    border-radius: 2px;\r\n    box-sizing: border-box;\r\n    font-size: 1rem;\r\n    outline: none;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    background-color: white;\r\n}\r\n\r\n.absol-selectmenu.as-border-none {\r\n    border: none;\r\n}\r\n\r\n.absol-selectmenu.as-border-none .absol-selectlist-item span {\r\n    padding-left: 0;\r\n    user-select: inherit;\r\n    -ms-user-select: inherit;\r\n    -webkit-user-select: inherit;\r\n}\r\n\r\n.absol-selectmenu:not(.as-read-only) {\r\n    cursor: pointer;\r\n}\r\n\r\n.absol-selectmenu.as-read-only .absol-selectlist-item span {\r\n    user-select: inherit;\r\n    -moz-user-select: inherit;\r\n    -webkit-user-select: inherit;\r\n    -ms-user-select: inherit;\r\n}\r\n\r\n\r\n.absol-selectmenu-btn {\r\n    position: absolute;\r\n    top: 0;\r\n    bottom: 0;\r\n    right: 0;\r\n    width: 30px;\r\n    border: none;\r\n    background: transparent;\r\n    z-index: 2;\r\n    pointer-events: none;\r\n}\r\n\r\n.absol-selectmenu-btn:focus {\r\n    outline: none;\r\n}\r\n\r\n.absol-selectmenu-btn svg.dropdown {\r\n    width: 10px;\r\n    height: 10px;\r\n    fill: #929292;\r\n}\r\n\r\n.absol-selectmenu.as-read-only svg.dropdown {\r\n    display: none;\r\n}\r\n\r\n.absol-selectmenu:not(.as-read-only):hover svg.dropdown {\r\n    width: 10px;\r\n    height: 10px;\r\n    fill: black;\r\n}\r\n\r\n.absol-selectmenu .absol-selectlist-item-text {\r\n    display: inline-block;\r\n    overflow: hidden;\r\n    max-width: calc(var(--as-width-limit) - 30px);\r\n    text-overflow: ellipsis;\r\n    vertical-align: middle;\r\n\r\n}\r\n\r\n\r\n.absol-selectmenu-holder-item {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    /*1px for border*/\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-selectmenu-holder-item::before {\r\n    content: \"\";\r\n    height: 100%;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.absol-selectmenu-holder-item > .absol-selectlist-item {\r\n    display: inline-block;\r\n    width: 100%;\r\n    vertical-align: middle;\r\n}\r\n\r\n.absol-selectmenu .absol-selectlist-item-text {\r\n    padding-right: 28px;\r\n}\r\n\r\n.absol-selectmenu .absol-scroll-button {\r\n    background-color: rgba(0, 0, 0, 0.1);\r\n    border-radius: 3px;\r\n}\r\n\r\n.absol-selectmenu .absol-scroll-button:hover {\r\n    background-color: rgba(0, 0, 0, 0.2);\r\n}\r\n\r\n.absol-scroll-bar-v-container {\r\n    width: 10px;\r\n}\r\n\r\n.absol-selectmenu .absol-search-text-input {\r\n    margin: 4px;\r\n}\r\n\r\n.absol-selectmenu-render-space .absol-selectlist-item span {\r\n    padding-right: 0;\r\n}\r\n\r\n\r\n.absol-selectmenu .absol-selectlist-item-desc-container {\r\n    right: 30px;\r\n}\r\n\r\n\r\n.absol-selectmenu-dropdown-box .absol-bscroller {\r\n    overflow-y: auto;\r\n}\r\n\r\n\r\n.as-select-anchor {\r\n    position: fixed;\r\n    z-index: 1000001;\r\n}\r\n\r\n\r\n.as-select-anchor.as-hidden {\r\n    left: 0;\r\n    top: 0;\r\n    z-index: -1000;\r\n    visibility: hidden;\r\n    opacity: 0;\r\n}\r\n\r\n\r\n.as-select-menu {\r\n    --select-list-estimate-width: 0px;\r\n    --select-list-desc-width: 0px;\r\n    width: calc(var(--select-list-estimate-width) + 32px);\r\n    min-width: calc(var(--select-list-estimate-width) + 32px);\r\n}\r\n\r\n/***********************************************************************************************************************/\r\n\r\n.am-selectmenu-modal {\r\n    z-index: 100005;\r\n    position: fixed;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    text-align: center;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.am-selectmenu-modal>div{\r\n    display: inline-block;\r\n    text-align: initial;\r\n}\r\n\r\n.am-selectmenu-popup-box {\r\n    max-width: calc(100vw - 60px);\r\n    -webkit-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    -moz-box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    box-shadow: 2px 2px 6px 0px rgba(0, 0, 90, 0.55);\r\n    background-color: #ffffff;\r\n    border-radius: 0.5em;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.am-selectmenu-popup-box-header{\r\n    height: calc(2em + 10px);\r\n    display: block;\r\n    white-space: nowrap;\r\n    box-sizing: border-box;\r\n    padding-top: 5px;\r\n    padding-bottom: 5px;\r\n    padding-left: 10px;\r\n    border-bottom: solid 1px #dddddd;\r\n    background-color: rgba(169, 169, 169,0.2);\r\n}\r\n\r\n.am-selectmenu-popup-box-header .absol-search-text-input{\r\n    display: inline-block;\r\n    width: calc(100% - 2em - 25px);\r\n    vertical-align: middle;\r\n    box-sizing: border-box;\r\n    background-color: white;\r\n}\r\n\r\n.am-selectmenu-popup-box-close-btn{\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    border-radius:50%;\r\n    padding: 0;\r\n    height: 2em;\r\n    width: 2em;\r\n    font-size: inherit;\r\n    border: none;\r\n    outline: none;\r\n    margin-right: 10px;\r\n    background-color: rgb(255, 255, 255);\r\n    color: rgb(190, 30, 30);\r\n}\r\n\r\n.am-selectmenu-popup-box-close-btn:active{\r\n    color: red;\r\n}\r\n\r\n\r\n.am-selectmenu-popup-box-close-btn:before{\r\n    content: \"\";\r\n    display: inline-block;\r\n    height: 2em;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-selectmenu-popup-box-close-btn span{\r\n    font-size: 1.5em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    line-height: 1;\r\n}\r\n\r\n.am-selectmenu-scroller {\r\n    max-height: calc(100vh - 140px);\r\n    overflow-y: auto;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.am-selectlist.am-selectmeu-list{\r\n    min-width: 30vw;\r\n}\r\n\r\n.am-selectlist.am-selectmeu-list.as-searching{\r\n    width: 100%;\r\n}\r\n\r\n.am-selectmenu-popup-box .absol-search-text-input{\r\n    display: none;\r\n}\r\n\r\n\r\n.am-selectmenu-popup-box.am-enable-search .absol-search-text-input{\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-selectmenu{\r\n    white-space: nowrap;\r\n    background: white;\r\n    overflow: hidden;\r\n    box-sizing: border-box;\r\n    padding-right: 35px;\r\n    max-width: 95vw;\r\n    width: var(--recommend-width);\r\n}\r\n\r\n.am-selectmenu.disabled .absol-selectmenu-btn{\r\n    background-color: #ebebe4;\r\n}\r\n\r\n.am-selectmenu .absol-selectmenu-btn{\r\n    background: white;\r\n}\r\n\r\n.am-selectmenu::before{\r\n    content: \"\";\r\n    height: 100%;\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.am-selectmenu-holder-item{\r\n    display: inline-table;\r\n    vertical-align: middle;\r\n    width: 100%;\r\n    table-layout: auto;\r\n}\r\n\r\n.am-selectmenu-holder-item>.am-selectlist-item{\r\n    display: table-row;\r\n}\r\n\r\n.am-selectmenu-holder-item .am-selectlist-item-text-ctn,\r\n.am-selectmenu-holder-item .am-selectlist-item-desc-ctn{\r\n    display: table-cell;\r\n    padding-left: 10px;\r\n    white-space: nowrap;\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n    width: auto;\r\n}\r\n\r\n\r\n.am-selectmenu.disabled {\r\n    pointer-events: none;\r\n    background-color: #ebebe4;\r\n}", ""]);



/***/ }),

/***/ 54894:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-select-table-render-space {\r\n    position: fixed;\r\n    top: 0;\r\n    left: 0;\r\n    z-index: -1000;\r\n    visibility: hidden;\r\n    font-size: 14px;\r\n}\r\n\r\n.absol-select-table {\r\n    border: solid 1px #a9a9a9;\r\n    min-width: 26em;\r\n    overflow: hidden;\r\n}\r\n\r\n.absol-select-table-header {\r\n    display: block;\r\n    position: relative;\r\n    box-sizing: content-box;\r\n    height: 2.2857142857em;\r\n}\r\n\r\n.absol-select-table-searchtextinput-container {\r\n    position: absolute;\r\n    left: 0.14285714285em;\r\n    top: 0.14285714285em;\r\n    height: 2em;\r\n    right: 10em;\r\n    /* background-color: cyan; */\r\n}\r\n\r\n.absol-select-table.disable-move-all .absol-select-table-buttons-container {\r\n    display: none;\r\n}\r\n\r\n.absol-select-table.disable-move-all .absol-select-table-searchtextinput-container {\r\n    right: 0.14285714285em !important;\r\n}\r\n\r\n.absol-select-table-buttons-container {\r\n    position: absolute;\r\n    right: 0.14285714285em;\r\n    top: 0.14285714285em;\r\n    width: 10.7142857143em;\r\n    height: 2em;\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-select-table-buttons-container>button {\r\n    height: 2em;\r\n    font-size: 1em;\r\n    background-color: transparent;\r\n    border: none;\r\n    padding: 0 0.5em;\r\n    margin: 0;\r\n    text-decoration: underline;\r\n    cursor: pointer;\r\n}\r\n\r\n.absol-select-table-buttons-container>button:focus {\r\n    outline: none;\r\n}\r\n\r\n.absol-select-table-buttons-container>button:hover {\r\n    color: #a9a9a9;\r\n}\r\n\r\n.absol-select-table-buttons-container>button:active {\r\n    color: #a9a9ff;\r\n}\r\n\r\n.absol-select-table-body {\r\n    margin: 0.14285714285em;\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-select-table-items-scroller {\r\n    width: 50%;\r\n    display: inline-block;\r\n    box-sizing: border-box;\r\n    vertical-align: top;\r\n    overflow-y: auto;\r\n}\r\n\r\n.absol-select-table-items-scroller .absol-scroll-button {\r\n    background-color: rgba(1, 1, 30, 0.1);\r\n}\r\n\r\n.absol-select-table-items-scroller .absol-scroll-bar-v-container {\r\n    width: 0.69em;\r\n}\r\n\r\n.absol-select-table-selected-search-items-container,\r\n.absol-select-table-nonselected-search-items-container,\r\n.absol-select-table.searching .absol-select-table-selected-items-container,\r\n.absol-select-table.searching .absol-select-table-nonselected-items-container {\r\n    display: none;\r\n}\r\n\r\n.absol-select-table.searching .absol-select-table-selected-search-items-container,\r\n.absol-select-table.searching .absol-select-table-nonselected-search-items-container {\r\n    display: block;\r\n    padding-right: 0.7em;\r\n}\r\n\r\n.absol-select-table-nonselected-items-container,\r\n.absol-select-table-selected-items-container {\r\n    padding-right: 0.7em;\r\n}\r\n\r\n.absol-select-table-nonselected-items-container>.absol-select-table-item,\r\n.absol-select-table-selected-items-container>.absol-select-table-item,\r\n.absol-select-table-nonselected-search-items-container>.absol-select-table-item,\r\n.absol-select-table-selected-search-items-container>.absol-select-table-item {\r\n    margin: 0.14285714285em;\r\n}\r\n\r\n.absol-select-table-item {\r\n    display: block;\r\n    line-height: 2em;\r\n    min-height: 2em;\r\n    position: relative;\r\n    background-color: rgba(169, 169, 169, 0.05);\r\n    border: solid 1px rgb(235, 235, 235);\r\n    border-radius: 0.2em;\r\n    overflow: hidden;\r\n    -webkit-user-select: none;\r\n    /* Safari 3.1+ */\r\n    -moz-user-select: none;\r\n    /* Firefox 2+ */\r\n    -ms-user-select: none;\r\n    /* IE 10+ */\r\n    user-select: none;\r\n    /* Standard syntax */\r\n    padding-left: 0.69em;\r\n    padding-right: 1.8em;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-select-table-item:hover {\r\n    background-color: rgba(169, 169, 169, 0.1);\r\n}\r\n\r\n.absol-select-table-item-right-container {\r\n    right: 0.3em;\r\n    bottom: 0.3em;\r\n    top: 0.3em;\r\n    padding: 0.2em;\r\n    width: 1.4em;\r\n    position: absolute;\r\n    border-radius: 0.2em;\r\n    box-sizing: border-box;\r\n ;\r\n}\r\n\r\n.absol-select-table-item-right-container:hover {\r\n    background-color: rgba(169, 169, 169, 0.3);\r\n}\r\n\r\nspan.absol-select-table-item-text {\r\n    white-space: normal;\r\n    \r\n}\r\n\r\n.absol-select-table-item-right-container-table{\r\n    display: table;\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n.absol-select-table-item-right-container-cell{\r\n    display: table-cell;\r\n    vertical-align: middle;\r\n}\r\n\r\n.absol-select-table-item-right-container svg {\r\n    width: 1em;\r\n    height: 1em;\r\n    display: none;\r\n}\r\n\r\n/* clearfix\r\n.absol-select-table-none-nonselected-items-container::after,\r\n.absol-select-table-none-selected-items-container::after {\r\n    content: \"\";\r\n    display:table;\r\n    clear: both;\r\n} */\r\n\r\n.absol-select-table-selected-items-container .absol-select-table-item-right-container svg.sub-icon,\r\n.absol-select-table-selected-search-items-container .absol-select-table-item-right-container svg.sub-icon {\r\n    display: block;\r\n    stroke: rgb(243, 61, 61);\r\n    fill: rgb(226, 100, 100);\r\n}\r\n\r\n.absol-select-table-nonselected-items-container .absol-select-table-item-right-container svg.add-icon,\r\n.absol-select-table-nonselected-search-items-container .absol-select-table-item-right-container svg.add-icon {\r\n    display: block;\r\n    fill: rgb(100, 226, 167);\r\n    stroke: rgb(61, 185, 243);\r\n}\r\n\r\n.absol-select-table.portrait {}", ""]);



/***/ }),

/***/ 6322:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-select-tree-leaf-box {\r\n    min-width: 10em;\r\n}\r\n\r\n.am-select-tree-leaf-box-body {\r\n    overflow-y: auto;\r\n    max-height: calc(80vh - 2em);\r\n}\r\n\r\n.am-select-tree-leaf-box.as-enable-search .am-select-tree-leaf-box-body {\r\n    max-height: calc(80vh - 4em - 10px);\r\n}\r\n\r\n\r\n.am-select-tree-leaf-item {\r\n    display: block;\r\n    white-space: nowrap;\r\n    position: relative;\r\n    width: 100%;\r\n    overflow: hidden;\r\n    --level: 0;\r\n    --icon-width: 0px;\r\n}\r\n\r\n.am-select-tree-leaf-item:active {\r\n    background-color: #efefef;\r\n}\r\n\r\n.am-select-tree-leaf-item.as-selected {\r\n    background-color: #dfdfdf;\r\n}\r\n\r\n\r\n.am-select-tree-leaf-item.as-has-icon {\r\n    --icon-width: 2.7em;\r\n}\r\n\r\n\r\n.am-select-tree-leaf-item-toggle-ctn,\r\n.am-select-tree-leaf-item-icon-ctn,\r\n.am-select-tree-leaf-item-checkbox-ctn {\r\n    position: absolute;\r\n    white-space: nowrap;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.am-select-tree-leaf-item-toggle-ctn {\r\n    left: calc(2em * var(--level) + 0.2em);\r\n    width: 1.5em;\r\n    text-align: center;\r\n}\r\n\r\n.am-select-tree-leaf-item-toggle-ctn > svg {\r\n    width: 0.7em;\r\n    height: 0.7em;\r\n}\r\n\r\n\r\n.am-select-tree-leaf-item-icon-ctn {\r\n    left: calc(2em * var(--level) + 1.7em);\r\n}\r\n\r\n\r\n.am-select-tree-leaf-item-icon-ctn > svg {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n\r\n}\r\n\r\n.am-select-tree-leaf-item-icon-ctn {\r\n\r\n}\r\n\r\n.am-select-tree-leaf-item.as-status-open svg .toggle-close,\r\n.am-select-tree-leaf-item.as-status-close svg .toggle-open,\r\n.am-select-tree-leaf-item:not(.as-status-close):not(.as-status-open) .am-select-tree-leaf-item-toggle-ctn {\r\n    display: none;\r\n}\r\n\r\n.am-select-tree-leaf-item-icon-ctn::before,\r\n.am-select-tree-leaf-item-toggle-ctn::before,\r\n.am-select-tree-leaf-item-checkbox-ctn::before {\r\n    content: \"\";\r\n    height: 100%;\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n}\r\n\r\n.am-select-tree-leaf-item-icon-ctn:empty {\r\n    display: none;\r\n}\r\n\r\n.am-select-tree-leaf-item-icon-ctn > span {\r\n    font-size: 1.8em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.am-select-tree-leaf-item-icon-ctn img,\r\n.am-select-tree-leaf-item-icon-ctn svg {\r\n    width: 1.8em;\r\n    height: 1.8em;\r\n    display: inline-block;\r\n}\r\n\r\n\r\n.am-select-tree-leaf-item-text {\r\n    width: var(--text-width);\r\n    box-sizing: border-box;\r\n    padding: 0.3em 0.5em 0.3em calc(1.2em + 2em * var(--level) + var(--icon-width));\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    line-height: 1.5;\r\n    white-space: normal;\r\n}\r\n\r\n\r\n.am-select-tree-leaf-item-desc {\r\n    display: none;\r\n    vertical-align: middle;\r\n}\r\n", ""]);



/***/ }),

/***/ 86923:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-select-tree-leaf-item:not(.as-is-leaf) > .absol-exp-node > .absol-exp-node-name,\r\n.as-select-tree-leaf-item:not(.as-is-leaf) > .absol-exp-node > .absol-exp-node-ext-icon,\r\n.as-select-tree-leaf-item.as-no-select > .absol-exp-node > .absol-exp-node-name,\r\n.as-select-tree-leaf-item.as-no-select > .absol-exp-node > .absol-exp-node-ext-icon\r\n{\r\n    color: #888;\r\n}\r\n\r\n.as-select-tree-leaf-item:not(.as-is-leaf) > .absol-exp-node > .absol-exp-node-desc {\r\n    color: rgb(169, 169, 172)\r\n}\r\n\r\n.as-select-tree-leaf-item > .absol-exp-node:hover,\r\n.as-select-tree-leaf-item > .absol-exp-node:focus,\r\n.as-select-tree-leaf-item > .absol-exp-node:active {\r\n    background-color: transparent;\r\n}\r\n\r\n.as-select-tree-leaf-item.as-is-leaf:not(.as-no-select) > .absol-exp-node:hover {\r\n    background-color: #efefef;\r\n}\r\n\r\n.as-select-tree-leaf-item.as-selected > .absol-exp-node {\r\n    background-color: #dfdfdf;\r\n}\r\n\r\n.am-select-tree-menu.absol-selectmenu {\r\n    width: auto;\r\n}\r\n\r\n.am-select-tree-menu .absol-selectmenu-holder-item {\r\n    position: relative;\r\n    left: unset;\r\n    right: unset;\r\n    top: unset;\r\n    bottom: unset;\r\n    height: 100%;\r\n    max-width: 100%;\r\n}\r\n\r\n\r\n.am-select-tree-menu .absol-selectlist-item-text {\r\n    max-width: calc(100vw - 200px);/**TODO: find better solution*/\r\n    text-overflow: ellipsis;\r\n    overflow: hidden;\r\n}", ""]);



/***/ }),

/***/ 32206:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-selecttreemenu  .absol-tree-list-item-desc-container{\r\n    right: 30px;\r\n}\r\n\r\n\r\n.absol-selectmenu-holder-item .absol-tree-list-item-parent:hover {\r\n    background-color: transparent;\r\n}\r\n\r\n.am-select-tree-menu {\r\n    max-width: var(--as-width-limit);\r\n}", ""]);



/***/ }),

/***/ 89423:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-single-page {\r\n    position: relative;\r\n    overflow: hidden;\r\n}\r\n\r\n\r\n.absol-single-page-header {\r\n    box-sizing: border-box;\r\n    z-index: 2;\r\n    display: block;\r\n}\r\n\r\n.absol-single-page-footer {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    bottom: 0;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.absol-single-page-scroller-viewport {\r\n    min-height: 100%;\r\n    display: block;\r\n    position: relative;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-single-page-scroller {\r\n    position: relative;\r\n    overflow-y: auto;\r\n}\r\n\r\n.absol-single-page.as-has-header {\r\n    display: grid;\r\n    grid-template-rows: auto 1fr;\r\n}\r\n\r\n.absol-single-page:not(.as-has-header) .absol-single-page-scroller{\r\n    width: 100%;\r\n    height: 100%;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.absol-single-page.as-viewport-full > .absol-single-page-scroller > .absol-single-page-scroller-viewport {\r\n    height: 100%;\r\n    width: 100%;\r\n    overflow: hidden;\r\n}\r\n\r\n.absol-single-page.as-no-scroll > .absol-single-page-scroller {\r\n    overflow: hidden;\r\n}", ""]);



/***/ }),

/***/ 87111:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-snackbar {\r\n    visibility: hidden;\r\n    min-width: 250px;\r\n    margin-left: -125px;\r\n    background-color: #333;\r\n    color: #fff;\r\n    text-align: center;\r\n    border-radius: 2px;\r\n    padding: 16px;\r\n    position: fixed;\r\n    z-index: 1000000000;\r\n    left: 50%;\r\n    bottom: 0;\r\n    font-size: 17px;\r\n    opacity: 0;\r\n    transition: opacity 0.25s ease-in, bottom 0.25s ease-in;\r\n\r\n}\r\n\r\n.as-snackbar.as-show {\r\n    visibility: visible;\r\n    bottom: 30px;\r\n    opacity: 1;\r\n}\r\n\r\n.as-snackbar.as-hiding{\r\n    transition: opacity 0.5s ease-out, bottom 0.5s ease-out;\r\n    visibility: visible;\r\n    bottom: 0;\r\n    opacity: 0;\r\n}\r\n\r\n", ""]);



/***/ }),

/***/ 86778:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-solid-color-picker:not(.as-solid-color-picker-mode-swatches) .as-solid-color-picker-swatches-select-ctn,\r\n.as-solid-color-picker:not(.as-solid-color-picker-mode-swatches) .as-solid-color-picker-swatches-ctn,\r\n.as-solid-color-picker:not(.as-solid-color-picker-mode-picker) .as-solid-color-picker-spectrum,\r\n.as-solid-color-picker:not(.as-solid-color-picker-mode-picker) .as-solid-color-picker-hue,\r\n.as-solid-color-picker:not(.as-solid-color-picker-mode-picker) .as-solid-color-picker-alpha,\r\n.as-solid-color-picker:not(.as-solid-color-picker-mode-picker) .as-solid-color-picker-near {\r\n    display: none;\r\n}\r\n\r\n.as-solid-color-picker:not(.as-has-opacity) .as-solid-color-picker-color-opacity,\r\n.as-solid-color-picker:not(.as-has-opacity) .as-solid-color-picker-alpha {\r\n    visibility: hidden;\r\n}\r\n\r\n.as-solid-color-picker .as-hanger {\r\n    user-select: none;\r\n    touch-action: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none;\r\n}\r\n\r\n.as-solid-color-picker {\r\n    display: inline-block;\r\n    border: 1px solid black;\r\n    font-size: 12px;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    outline: none;\r\n    background-color: white;\r\n}\r\n\r\n.as-solid-color-picker-body {\r\n    padding-bottom: 10px;\r\n    padding-left: 10px;\r\n    padding-right: 10px;\r\n    box-sizing: border-box;\r\n    border-bottom: 1px solid #dddddd;\r\n}\r\n\r\n.as-solid-color-picker-header {\r\n    padding: 10px;\r\n}\r\n\r\n.as-solid-color-picker-mode {\r\n    font-size: 0.9em;\r\n}\r\n\r\n.as-solid-color-picker-mode button {\r\n    height: 1.5em;\r\n    min-width: 7em;\r\n}\r\n\r\n.as-solid-color-picker-swatches-name {\r\n    color: #006ce5;\r\n    text-decoration: underline;\r\n    cursor: pointer;\r\n}\r\n\r\n.as-solid-color-picker-swatches-select-ctn {\r\n    line-height: 2em;\r\n}\r\n\r\n.as-solid-color-picker-swatches-ctn {\r\n    overflow-y: auto;\r\n    width: 20em;\r\n    height: 20em;\r\n    box-sizing: content-box;\r\n}\r\n\r\n.as-solid-color-picker-swatches-ctn .as-swatches-table {\r\n    width: 100%;\r\n}\r\n\r\n.as-solid-color-picker-swatches-ctn .as-swatches-table-row,\r\n.as-solid-color-picker-recent-swatches-ctn .as-swatches-table-row {\r\n    height: 2em;\r\n}\r\n\r\n.as-solid-color-picker-recent-swatches-ctn .as-swatches-table-cell {\r\n    width: 1.6666666em;\r\n}\r\n\r\n\r\n.as-solid-color-picker-recent-title {\r\n    line-height: 1.5em;\r\n    margin-top: 0.5em;\r\n    font-weight: bold;\r\n}\r\n\r\n.as-solid-color-picker-recent-swatches-ctn {\r\n    overflow-y: auto;\r\n    width: 20em;\r\n    height: 4em;\r\n    box-sizing: content-box;\r\n}\r\n\r\n.as-solid-color-picker-footer {\r\n    padding: 10px;\r\n}\r\n\r\n.as-solid-color-picker-footer .as-flexicon-button {\r\n    font-size: inherit;\r\n    height: 2em;\r\n    box-sizing: border-box;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-solid-color-picker-selected {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 2em;\r\n    width: 5em;\r\n    border: 1px solid #ddd;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-solid-color-picker-color-hex,\r\n.as-solid-color-picker-color-opacity {\r\n    font-size: inherit;\r\n    width: 6em;\r\n}\r\n\r\n.as-solid-color-picker-color-hex input {\r\n    margin-left: 0;\r\n}\r\n\r\n.as-flexicon-input.as-solid-color-picker-color-opacity.as-flexicon-input-has-icon.as-flexicon-input-has-unit input {\r\n    width: calc(100% - 4em);\r\n}\r\n\r\n.as-solid-color-picker.as-nullable .as-solid-color-picker-none-ctn{\r\n    display: inline-block;\r\n\r\n}\r\n\r\n.as-solid-color-picker-none-ctn {\r\n    display: none;\r\n    margin-top: 5px;\r\n    padding: 5px;\r\n    cursor: default;\r\n    user-select: none;\r\n}\r\n\r\n.as-solid-color-picker-none-ctn.as-selected {\r\n    box-shadow: rgba(0, 0, 0, 0.7) 0px 0px 0.3em 0.125em inset;\r\n}\r\n\r\n.as-solid-color-picker-none-ctn:hover {\r\n    color: var(--as-transparent-button-text-hover-color);\r\n}\r\n\r\n\r\n.as-solid-color-picker-none-ctn:active {\r\n    color: var(--as-transparent-button-text-active-color);\r\n}\r\n\r\n.as-solid-color-picker-none-ctn > * {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-solid-color-picker-none-cell {\r\n    width: 1.5em;\r\n    height: 1.5em;\r\n    margin-right: 0.3em;\r\n}\r\n\r\n\r\n.as-solid-color-picker-color-opacity input {\r\n    padding-left: 0;\r\n    padding-right: 0;\r\n}\r\n\r\n.as-solid-color-picker-footer > *:not(:first-child) {\r\n    margin-left: 0.5em;\r\n}\r\n\r\n.as-swatches-table-cell .as-solid-color-picker-selected-dot {\r\n    left: calc(50% - 0.5em);\r\n    top: calc(50% - 0.5em);\r\n}\r\n\r\n.as-solid-color-picker-selected-dot {\r\n    position: absolute;\r\n    width: 1em;\r\n    height: 1em;\r\n    box-shadow: inset 0px 0px 0.3em 0.125em rgba(255, 255, 255, 0.7);\r\n    z-index: 1;\r\n    border-radius: 50%;\r\n}\r\n\r\n\r\n.as-solid-color-picker-spectrum {\r\n    width: 20em;\r\n    height: 13.3em;\r\n    background-color: red;\r\n    position: relative;\r\n}\r\n\r\n.as-solid-color-picker-spectrum-dot {\r\n    width: 1em;\r\n    height: 1em;\r\n    box-shadow: inset 0px 0px 0.3em 0.125em rgba(0, 0, 0, 0.7);\r\n    z-index: 1;\r\n    border-radius: 50%;\r\n    position: absolute;\r\n    bottom: calc(100% - 0.5em);\r\n    left: calc(100% - 0.5em);\r\n}\r\n\r\n\r\n.as-solid-color-picker-hue {\r\n    width: 20em;\r\n    height: 2em;\r\n    background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\r\n    position: relative;\r\n}\r\n\r\n.as-solid-color-picker-hue-dot {\r\n    width: 1em;\r\n    height: 1em;\r\n    box-shadow: inset 0px 0px 0.3em 0.125em rgba(0, 0, 0, 0.7);\r\n    z-index: 1;\r\n    border-radius: 50%;\r\n    position: absolute;\r\n    top: calc(50% - 0.5em);\r\n    left: calc(0% - 0.5em);\r\n}\r\n\r\n\r\n.as-solid-color-picker-alpha {\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAaSURBVBhXYzh8+PD///8hJAOcBSRxyRw+DABJUCox2kjvSgAAAABJRU5ErkJggg==');\r\n    background-size: 1.5em;\r\n    image-rendering: optimizeSpeed;\r\n    image-rendering: -moz-crisp-edges;\r\n    image-rendering: -o-crisp-edges;\r\n    image-rendering: -webkit-optimize-contrast;\r\n    image-rendering: pixelated;\r\n    image-rendering: optimize-contrast;\r\n    -ms-interpolation-mode: nearest-neighbor;\r\n\r\n    width: 20em;\r\n    height: 2em;\r\n    position: relative;\r\n}\r\n\r\n.as-solid-color-picker-alpha-color {\r\n    background: linear-gradient(to right, rgba(255, 0, 0, 0.0) 0%, rgba(255, 0, 0, 1) 100%);\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.as-solid-color-picker-alpha-dot {\r\n    width: 1em;\r\n    height: 1em;\r\n    box-shadow: inset 0px 0px 0.3em 0.125em rgba(0, 0, 0, 0.7);\r\n    z-index: 1;\r\n    border-radius: 50%;\r\n    position: absolute;\r\n    top: calc(50% - 0.5em);\r\n    left: calc(100% - 0.5em);\r\n}\r\n\r\n\r\n.as-solid-color-picker-near {\r\n    margin-top: 0.5em;\r\n    width: 20em;\r\n    height: 4.2em;\r\n}\r\n\r\n.as-solid-color-picker-near .as-swatches-table-cell-color {\r\n    transition: transform 0.1s;\r\n}\r\n\r\n\r\n.as-solid-color-picker-near .as-swatches-table-cell-color:hover {\r\n    transform: scale(1.2);\r\n    z-index: 2;\r\n}", ""]);



/***/ }),

/***/ 4476:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-span-input {\r\n    white-space: pre;\r\n}\r\n\r\n.absol-span-input:focus {\r\n    outline-color: rgba(30, 150, 255, 0.3);\r\n    outline-width: 1px;\r\n}\r\n\r\n.absol-span-input:empty::before {\r\n    content: \" \";\r\n    display: inline;\r\n    white-space: pre;\r\n}\r\n\r\n.absol-span-input.absol-span-input-empty-minus:empty::before {\r\n    content: \"-\";\r\n}", ""]);



/***/ }),

/***/ 19910:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-spectrum-color {\r\n    position: relative;\r\n    touch-action: none;\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n}\r\n\r\n.as-spectrum-color-sat {\r\n    width: 100%;\r\n    height: 100%;\r\n    box-sizing: content-box;\r\n    background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));\r\n    background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));\r\n    background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\r\n    background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\r\n    background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\r\n    background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));\r\n    -ms-filter: \"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)\";\r\n    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');\r\n}\r\n\r\n\r\n.as-spectrum-color-val {\r\n    width: 100%;\r\n    height: 100%;\r\n    box-sizing: content-box;\r\n    background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));\r\n    background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));\r\n    background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\r\n    background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\r\n    background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\r\n    background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));\r\n    -ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)\";\r\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');\r\n}", ""]);



/***/ }),

/***/ 65199:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-static-tabbar {\r\n    position: relative;\r\n}\r\n\r\n.absol-static-tabbar-button {\r\n    height: 2em;\r\n    background-color: transparent;\r\n    border: none;\r\n    font-size: 1em;\r\n    padding-left: 0.5em;\r\n    padding-right: 0.5em;\r\n    color: rgb(104, 104, 104);\r\n}\r\n\r\n.absol-static-tabbar-button:hover {\r\n    color: rgb(30, 30, 55);\r\n}\r\n\r\n.absol-static-tabbar-button.active {\r\n    color: black;\r\n}\r\n\r\n.absol-static-tabbar-button:focus {\r\n    outline: none;\r\n}\r\n\r\n.absol-static-tabbar-button>span {\r\n    font-size: 0.7em;\r\n}\r\n\r\n.absol-static-tabbar-hline {\r\n    border-bottom: solid 1px rgb(127, 127, 128);\r\n    height: 100%;\r\n}\r\n\r\n.absol-static-tabbar-active-box {\r\n    position: absolute;\r\n    bottom: 0;\r\n    top: 0;\r\n    left: 0;\r\n    width: 0;\r\n    transition: left 0.15s, width 0.15s;\r\n    padding-left: 0.5em;\r\n    padding-right: 0.5em;\r\n    box-sizing: border-box;\r\n    /* z-index: 1; */\r\n}\r\n\r\n.absol-static-tabbar.dark .absol-static-tabbar-hline{\r\n    border-bottom-color: white;\r\n}\r\n\r\n.absol-static-tabbar.dark .absol-static-tabbar-button.active{\r\n    color: white;\r\n}\r\n\r\n.absol-static-tabbar.dark .absol-static-tabbar-button {\r\n    color: rgb(204, 204, 204);\r\n}", ""]);



/***/ }),

/***/ 84679:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-color-cell {\r\n    position: relative;\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAaSURBVBhXYzh8+PD///8hJAOcBSRxyRw+DABJUCox2kjvSgAAAABJRU5ErkJggg==');\r\n    background-size: 1.5em;\r\n    image-rendering: optimizeSpeed;\r\n    /* STOP SMOOTHING, GIVE ME SPEED  */\r\n    image-rendering: -moz-crisp-edges;\r\n    /* Firefox                        */\r\n    image-rendering: -o-crisp-edges;\r\n    /* Opera                          */\r\n    image-rendering: -webkit-optimize-contrast;\r\n    /* Chrome (and eventually Safari) */\r\n    image-rendering: pixelated;\r\n    /* Chrome */\r\n    image-rendering: optimize-contrast;\r\n    /* CSS3 Proposed                  */\r\n    -ms-interpolation-mode: nearest-neighbor;\r\n    /* IE8+                           */\r\n}\r\n\r\n.as-color-cell.as-null .as-color-cell-value {\r\n    background-color: transparent !important;\r\n    background-size: contain;\r\n    background-position: center;\r\n    }\r\n\r\n.as-color-cell-value {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    right: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.as-swatches-table {\r\n    display: table;\r\n    table-layout: fixed;\r\n}\r\n\r\n.as-swatches-table-row {\r\n    display: table-row;\r\n}\r\n\r\n\r\n.as-swatches-table-cell.as-color-cell {\r\n    position: relative;\r\n    display: table-cell;\r\n    background-size: 1.5em;\r\n\r\n}\r\n", ""]);



/***/ }),

/***/ 670:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-switch {\r\n    position: relative;\r\n    display: inline-block;\r\n    width: 2.2em;\r\n    height: 1.2em;\r\n    vertical-align: middle;\r\n}\r\n\r\n.absol-switch input {\r\n    opacity: 0;\r\n    width: 0;\r\n    height: 0;\r\n}\r\n\r\n.absol-switch:not(.as-read-only) .absol-switch-slider{\r\n    cursor: pointer;\r\n}\r\n\r\n.absol-switch-slider {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    right: 0;\r\n    bottom: 0;\r\n    background-color: #ccc;\r\n    -webkit-transition: .4s;\r\n    transition: .4s;\r\n    border-radius: 0.6em;\r\n}\r\n\r\n.absol-switch-slider:before {\r\n    position: absolute;\r\n    content: \"\";\r\n    height: 1em;\r\n    width: 1em;\r\n    left: 0.1em;\r\n    bottom: 0.1em;\r\n    background-color: white;\r\n    -webkit-transition: .4s;\r\n    transition: .4s;\r\n    border-radius: 0.5em;\r\n}\r\n\r\ninput:checked+.absol-switch-slider {\r\n    background-color: #2196F3;\r\n}\r\n\r\ninput:focus+.absol-switch-slider {\r\n    box-shadow: 0 0 1px #2196F3;\r\n}\r\n\r\ninput:checked+.absol-switch-slider:before {\r\n    -webkit-transform: translateX(1em);\r\n    -ms-transform: translateX(1em);\r\n    transform: translateX(1em);\r\n}\r\n\r\n/* Rounded absol-switch-sliders */\r\n.absol-switch.square .absol-switch-slider {\r\n    border-radius: 0;\r\n}\r\n\r\n.absol-switch.square .absol-switch-slider:before {\r\n    border-radius: 0;\r\n}\r\n\r\n.absol-switch.disabled {\r\n    pointer-events: none;\r\n}\r\n\r\n.absol-switch.disabled .absol-switch-slider:before{\r\n    background-color: rgb(234, 234, 234);\r\n}\r\n\r\n.absol-switch.disabled input:checked+.absol-switch-slider {\r\n    background-color: rgb(141, 188, 226);\r\n}\r\n\r\n.absol-switch.disabled .absol-switch-slider {\r\n    background-color: rgb(171, 171, 171);\r\n}\r\n\r\n", ""]);



/***/ }),

/***/ 75575:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "\r\n.as-table-of-text-input-wrapper {\r\n    border: 1px solid #dddddd;\r\n}\r\n\r\n.as-table-of-text-input-content-ctn {\r\n    overflow: auto;\r\n}\r\n\r\n\r\n.as-table-of-text-input {\r\n    width: 100%;\r\n    border-collapse: collapse;\r\n    color: black;\r\n    font-family: 'Aptos Narrow', Calibri, sans-serif, 'Mongolian Baiti', 'Microsoft Yi Baiti', 'Javanese Text', 'Yu Gothic';\r\n    font-size: 11pt;\r\n    margin: 10px;\r\n}\r\n\r\n.as-table-of-text-input-wrapper.as-size-a4 .as-table-of-text-input {\r\n    width: 445pt;\r\n}\r\n\r\n.as-table-of-text-input pre {\r\n    font: inherit;\r\n    line-height: 1.75;\r\n}\r\n\r\n.as-table-of-text-input.as-inline {\r\n    display: inline-table;\r\n}\r\n\r\n.as-table-of-text-input-cell {\r\n    vertical-align: top;\r\n    padding: 0px 5px;\r\n    border: 1px dashed #808080;\r\n    position: relative;\r\n}\r\n\r\n.as-table-of-text-input-cell.as-focus::before {\r\n    pointer-events: none;\r\n    content: \"\";\r\n    position: absolute;\r\n    border: 1px dashed var(--variant-color-primary);\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.as-table-of-text-input-cell .as-preinput {\r\n    outline: none;\r\n    display: block;\r\n}\r\n\r\n.as-table-of-text-input-cell.as-bold {\r\n    font-weight: bold;\r\n}\r\n\r\n.as-table-of-text-input-cell.as-italic {\r\n    font-style: italic;\r\n}\r\n\r\n.as-table-of-text-input-tool {\r\n    background-color: #f8f8f8;\r\n    font-size: 14px;\r\n    /*-webkit-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);*/\r\n    /*-moz-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);*/\r\n    /*box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);*/\r\n    /*border-radius: 4px;*/\r\n    padding: 3px;\r\n    border-bottom: 1px solid #dddddd;\r\n}\r\n\r\n.as-table-of-text-input-tool > button,\r\n.as-table-of-text-input-tool-group > button {\r\n    height: 30px;\r\n    width: 30px;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.as-table-of-text-input-tool-group {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-table-of-text-input-tool-group:not(:last-child) {\r\n    border-right: 1px solid #dddddd;\r\n}\r\n\r\n\r\n.as-table-of-text-input-tool  button.as-checked {\r\n    color: #2977ff;\r\n    /*background-color: rgb(240, 247, 255);*/\r\n    box-shadow: inset gray 0px 0px 4px -2px;\r\n}\r\n", ""]);



/***/ }),

/***/ 52296:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-table-scroller .absol-table-scroller-viewport {\r\n    width: calc(100% + var(--scrollbar-width));\r\n    height: calc(100% + var(--scrollbar-width));\r\n}\r\n\r\n.absol-table-scroller .absol-table-scroller-header-hscroller-viewport {\r\n    margin-bottom: calc(0px - var(--scrollbar-width))\r\n}\r\n\r\n\r\n.absol-table-scroller {\r\n    --scrollbar-width: 17px;\r\n    --new-pos-y: 0;\r\n    position: relative;\r\n    padding-right: 17px;\r\n    padding-bottom: 17px;\r\n    --tvs-scroll-padding-bottom: 0px;\r\n}\r\n\r\n.absol-table-scroller:not(.as-scroll-vertical) {\r\n    padding-right: 0;\r\n}\r\n\r\n\r\n.absol-table-scroller:not(.as-scroll-horizontal) {\r\n    padding-bottom: 0;\r\n}\r\n\r\n.as-table-scroller-origin-table-ctn {\r\n    padding-bottom: var(--tvs-scroll-padding-bottom);\r\n\r\n}\r\n\r\n\r\n.as-table-scroller-vertical-scroller {\r\n    overflow-y: scroll;\r\n    height: 100%;\r\n    box-sizing: border-box;\r\n    margin-right: calc(0px - var(--scrollbar-width));\r\n}\r\n\r\n.as-table-scroller-fixed-y-header-ctn {\r\n    position: absolute;\r\n    z-index: 4;\r\n    top: 0;\r\n    left: 0;\r\n    right: 0;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-table-scroller-fixed-x-col-ctn {\r\n    position: absolute;\r\n    z-index: 5;\r\n    top: 0;\r\n    left: 0;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-table-scroller-fixed-xy-header-ctn {\r\n    position: absolute;\r\n    z-index: 12;\r\n    top: 0;\r\n    left: 0;\r\n    overflow: hidden;\r\n}\r\n\r\n.as-table-scroller-fixed-y-header-scroller {\r\n    overflow-x: scroll;\r\n    margin-bottom: calc(var(--scrollbar-width) * -1);\r\n}\r\n\r\n.as-mobile-theme .as-table-scroller-fixed-y-header-scroller::-webkit-scrollbar,\r\n.as-mobile-theme .absol-table-scroller-header-hscroller-viewport::-webkit-scrollbar {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-table-scroller-horizontal-scroller-viewport {\r\n    overflow: hidden;\r\n    position: relative;\r\n}\r\n\r\n.as-table-scroller-horizontal-scroller {\r\n    overflow-x: scroll;\r\n    width: 100%;\r\n    box-sizing: border-box;\r\n    margin-bottom: calc(var(--scrollbar-width) * -1);\r\n}\r\n\r\n.absol-table-scroller-content {\r\n    position: relative;\r\n    overflow: hidden;\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.absol-table-scroller-render-space {\r\n    position: fixed;\r\n    overflow: scroll;\r\n    left: 0;\r\n    top: 0;\r\n    max-width: calc(99vw - 30px);\r\n    max-height: calc(99vh - 30px);\r\n    opacity: 0;\r\n    z-index: -1000;\r\n    visibility: hidden;\r\n}\r\n\r\n\r\n.absol-table-scroller-viewport {\r\n    box-sizing: border-box;\r\n    overflow: scroll;\r\n    width: calc(100% + 17px);\r\n    height: calc(100% + 17px);\r\n    background-color: white;\r\n}\r\n\r\n.absol-table-scroller-fixed-viewport {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    z-index: 10;\r\n    overflow: hidden;\r\n    background-color: white;\r\n    /*pointer-events: none;*/\r\n}\r\n\r\n.absol-table-scroller-fixed-viewport > table > thead,\r\n.absol-table-scroller-fixed-viewport > table {\r\n    /*border-top-color: transparent !important;*/\r\n}\r\n\r\n.absol-table-scroller-fixed-hidden {\r\n    visibility: hidden !important;\r\n    opacity: 0 !important;\r\n    border-color: transparent !important;\r\n\r\n}\r\n\r\n.absol-table-scroller-header-hscroller {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    right: 0;\r\n    z-index: 9;\r\n    overflow: hidden;\r\n    /*pointer-events: none;*/\r\n}\r\n\r\n.absol-table-scroller-header-hscroller-viewport {\r\n    max-width: 100%;\r\n    overflow-x: scroll;\r\n    margin-bottom: -17px; /*default*/\r\n    background-color: white;\r\n}\r\n\r\n.absol-table-scroller-header-hscroller-viewport table {\r\n    table-layout: fixed;\r\n}\r\n\r\n\r\n.absol-table-scroller-left-vscroller {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    bottom: 0;\r\n    z-index: 7;\r\n    /* width: 200px; */\r\n    overflow-x: hidden;\r\n    /*pointer-events: none;*/\r\n}\r\n\r\n.absol-table-scroller-left-vscroller-viewport {\r\n    max-height: 100%;\r\n    overflow-y: scroll;\r\n    min-width: calc(100% + 19px);\r\n    overflow-x: hidden;\r\n    background-color: white;\r\n}\r\n\r\n\r\n.absol-table-scroller-head-line,\r\n.absol-table-scroller-left-line {\r\n    z-index: 30;\r\n    /*pointer-events: none;*/\r\n    position: absolute;\r\n}\r\n\r\n.absol-table-scroller-head-line {\r\n    left: 0;\r\n    border-bottom: solid 2px rgb(169, 169, 170);\r\n    width: 100%;\r\n}\r\n\r\n.absol-table-scroller-left-line {\r\n    top: 0;\r\n    border-right: solid 2px rgb(169, 169, 170);\r\n    height: 100%;\r\n}\r\n\r\n\r\n.absol-table-scroller.as-scroll-vertical .absol-table-scroller-head-line {\r\n    width: 100%;\r\n}\r\n\r\n.absol-table-scroller.as-scroll-horizontal .absol-table-scroller-left-line {\r\n    height: 100%;\r\n}\r\n\r\n\r\n.absol-table-scroller:not(.as-scroll-vertical) .absol-table-scroller-head-line {\r\n    display: none;\r\n}\r\n\r\n.absol-table-scroller:not(.as-scroll-horizontal) .absol-table-scroller-left-line {\r\n    display: none;\r\n}\r\n\r\n\r\n.absol-table-scroller-vscrollbar-container {\r\n    position: absolute;\r\n    top: 0;\r\n    right: 0px;\r\n    width: 17px;\r\n    bottom: 0;\r\n    z-index: 31;\r\n}\r\n\r\n.absol-table-scroller-vscrollbar-container .absol-scrollbar-button {\r\n    left: 1px;\r\n    right: 1px;\r\n}\r\n\r\n\r\n.absol-table-scroller-vscrollbar-container > div,\r\n.absol-table-scroller-hscrollbar-container > div {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.absol-table-scroller-hscrollbar-container {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    height: 17px;\r\n    bottom: 0;\r\n    z-index: 31;\r\n}\r\n\r\n\r\n.absol-table-scroller-hscrollbar-container .absol-scrollbar-button {\r\n    top: 1px;\r\n    bottom: 1px;\r\n}\r\n\r\n\r\n.absol-table-scroller:not(.as-scroll-vertical) .absol-table-scroller-vscrollbar-container {\r\n    display: none;\r\n}\r\n\r\n.absol-table-scroller:not(.as-scroll-horizontal) .absol-table-scroller-hscrollbar-container {\r\n    display: none;\r\n}\r\n\r\n\r\n.absol-table-scroller.as-scroll-horizontal .absol-table-scroller-vscrollbar-container {\r\n    bottom: 17px;\r\n}\r\n\r\n.absol-table-scroller.as-scroll-vertical .absol-table-scroller-hscrollbar-container {\r\n    right: 17px;\r\n}\r\n\r\n.absol-table-scroller-fixed-table {\r\n    table-layout: fixed;\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.absol-table-scroller-fixed-table *,\r\n.absol-table-scroller-header-hscroller * {\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-table-scroller .as-drag-zone {\r\n    cursor: move;\r\n}\r\n\r\n\r\n.absol-table-scroller tr.as-dragging {\r\n    position: relative;\r\n    z-index: 1;\r\n    -webkit-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    -moz-box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    box-shadow: 2px 2px 9px 0px rgba(20, 20, 20, 1);\r\n    opacity: 0.8;\r\n}\r\n\r\n.absol-table-scroller td.as-transparent-fix {\r\n    visibility: hidden;\r\n    opacity: 0;\r\n}\r\n\r\n.absol-table-scroller.as-dragging tbody tr:not(.as-dragging) {\r\n    transition: transform 0.1s;\r\n}\r\n\r\n\r\n.absol-table-scroller-viewport thead .as-rotated-text-anchor,\r\n.absol-table-scroller-fixed-viewport thead .as-rotated-text-anchor,\r\n.absol-table-scroller-left-vscroller thead .as-rotated-text-anchor {\r\n    display: none;\r\n}\r\n\r\n.absol-table-scroller .as-rotated-text-anchor {\r\n    white-space: nowrap;\r\n}\r\n\r\n\r\n.as-table-scroller-row-index::before {\r\n    content: attr(data-idx);\r\n}\r\n\r\n/*.absol-table-scroller.as-has-new-pos.as-dragging::before {*/\r\n/*    content: \"\";*/\r\n/*    position: absolute;*/\r\n/*    left: 0;*/\r\n/*    top: var(--new-pos-y);*/\r\n/*    right: 0;*/\r\n/*    border-top: 2px solid blue;*/\r\n/*    z-index: 8;*/\r\n/*    transition: top 0.1s;*/\r\n/*}*/\r\n\r\n", ""]);



/***/ }),

/***/ 44439:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-table-vscroller {\r\n    position: relative;\r\n    --tvs-scroll-padding-bottom: 1px;\r\n}\r\n\r\n.absol-table-vscroller-head {\r\n    position: absolute;\r\n    z-index: 2;\r\n    width: 300px;\r\n    height: 20px;\r\n    top: 0;\r\n    left: 0;\r\n}\r\n\r\n.absol-table-vscroller-head-line{\r\n    position: absolute;\r\n    left: 0;\r\n    z-index: 3;\r\n    pointer-events: none;\r\n    border-bottom:solid 2px rgb(169, 169, 170); \r\n    width: 100%;\r\n}\r\n\r\n.absol-table-vscroller.scroll-v .absol-table-vscroller-head-line{\r\n    width: calc(100% - 7px);\r\n}\r\n\r\n.absol-table-vscroller-viewport {\r\n    max-height: 100%;\r\n    padding-bottom: var(--tvs-scroll-padding-bottom);\r\n    padding-top: 1px;\r\n    overflow-y: auto;\r\n}\r\n\r\n.absol-table-vscroller-viewport > table{\r\n    box-sizing: border-box;\r\n    width: 100%;\r\n}", ""]);



/***/ }),

/***/ 79127:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-tabbar {\r\n    height: 2em;\r\n    white-space: nowrap;\r\n}\r\n\r\n\r\n.absol-tabbar .absol-hscroller-viewport {\r\n    overflow-y: hidden;\r\n}\r\n\r\n.absol-tabbar .absol-tabbar-button,\r\n.absol-tabbar .as-tab-bar-add-btn {\r\n    height: 100%;\r\n}\r\n\r\n/* .absol-tabbar .absol-scrollbar-container {\r\n    height: 5px;\r\n} */\r\n\r\n.absol-tabbar .absol-scrollbar-container.horizontal {\r\n    bottom: -2px;\r\n}\r\n\r\n.absol-tabbar .absol-scrollbar-container {\r\n    opacity: 0;\r\n    transition: opacity 0.2s;\r\n    background: rgba(169, 169, 169, 0.1);\r\n}\r\n\r\n.absol-tabbar:hover .absol-scrollbar-container,\r\n.absol-tabbar:active .absol-scrollbar-container {\r\n    opacity: 1;\r\n}\r\n\r\n.absol-tabbar .absol-scrollbar-button {\r\n    background-color: rgba(33, 33, 40, 0.1);\r\n}\r\n\r\n.absol-tabbar .absol-scrollbar-button:hover {\r\n    background-color: rgba(33, 33, 40, 0.3);\r\n}\r\n\r\n\r\n.absol-tabbar .absol-scrollbar-button:active,\r\n.absol-tabbar .absol-hscrollbar.absol-active .absol-scrollbar-button {\r\n    background-color: rgba(47, 47, 55, 0.4);\r\n\r\n}\r\n\r\n\r\n.absol-tabbar-button {\r\n    padding-left: 1em;\r\n    padding-right: 1em;\r\n    background-color: rgb(45, 45, 45);\r\n    color: rgb(200, 200, 200);\r\n    margin-right: 1px;\r\n    border: none;\r\n    outline: none;\r\n    font-size: 1em;\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-tab-bar-add-btn {\r\n    padding-left: 0.5em;\r\n    padding-right: 0.5em;\r\n    background-color: rgb(45, 45, 45);\r\n    color: rgb(200, 200, 200);\r\n    margin-right: 1px;\r\n    border: none;\r\n    outline: none;\r\n    font-size: 1em;\r\n    white-space: nowrap;\r\n}\r\n\r\n\r\n.as-tab-bar-button-ext-icon-ctn:empty {\r\n    display: none\r\n}\r\n\r\n.as-tab-bar-button-ext-icon-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    padding-right: 0.35em;\r\n    margin-left: -0.5em;\r\n}\r\n\r\n.absol-tabbar-button-text {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    max-width: 300px;\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n}\r\n\r\n.as-tab-bar-button-ext-icon-ctn span {\r\n    font-size: 1.2em;\r\n}\r\n\r\n\r\n.absol-tabbar .absol-tabbar-button-active {\r\n    background-color: rgb(30, 30, 30);\r\n    color: rgb(250, 250, 252);\r\n}\r\n\r\n.absol-tabbar-button-text,\r\n.absol-tabbar-button-icon-container > span {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-size: 1em;\r\n}\r\n\r\n.absol-tabbar-button .absol-tabbar-button-close,\r\n.absol-tabbar-button .absol-tabbar-button-close-circle {\r\n    visibility: hidden;\r\n    color: rgb(190, 190, 190);\r\n}\r\n\r\n.absol-tabbar-button.as-prevent-closing .absol-tabbar-button-close,\r\n.absol-tabbar-button.as-prevent-closing .absol-tabbar-button-close-circle {\r\n    visibility: hidden;\r\n}\r\n\r\n.absol-tabbar-button.as-prevent-closing .absol-tabbar-button-icon-container {\r\n    pointer-events: none;\r\n}\r\n\r\n.absol-tabbar-button-icon-container {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    margin-left: 0.5em;\r\n}\r\n\r\n\r\n.absol-tabbar-button:not(.as-prevent-closing):hover .absol-tabbar-button-close,\r\n.absol-tabbar-button-active:not(.as-prevent-closing) .absol-tabbar-button-close,\r\n.absol-tabbar-button:hover:not(.as-prevent-closing) .absol-tabbar-button-close-circle,\r\n.absol-tabbar-button-active:not(.as-prevent-closing) .absol-tabbar-button-close-circle {\r\n    visibility: visible;\r\n    color: red;\r\n}\r\n\r\n.absol-tabbar-button-active .absol-tabbar-button-modified-flag {\r\n    color: lightblue;\r\n}\r\n\r\n.absol-tabbar-button-modified-flag {\r\n    color: mediumaquamarine;\r\n}\r\n\r\n.absol-tabbar-button:not(.absol-tabbar-button-modified) .absol-tabbar-button-modified-flag,\r\n.absol-tabbar-button.absol-tabbar-button-modified:not(.active) .absol-tabbar-button-icon-container:hover .absol-tabbar-button-modified-flag,\r\n.absol-tabbar-button.absol-tabbar-button-modified .absol-tabbar-button-icon-container:not(:hover) .absol-tabbar-button-close,\r\n.absol-tabbar-button:not(.absol-tabbar-button-modified) .absol-tabbar-button-icon-container:not(:hover) .absol-tabbar-button-close-circle,\r\n.absol-tabbar-button:not(.absol-tabbar-button-modified) .absol-tabbar-button-icon-container:hover .absol-tabbar-button-close,\r\n.absol-tabbar-button.absol-tabbar-button-modified .absol-tabbar-button-close-circle,\r\n.absol-tabbar-button.absol-tabbar-button-modified .absol-tabbar-button-icon-container:not(:hover) .absol-tabbar-button-close {\r\n    display: none;\r\n}\r\n\r\n\r\n.absol-button-range {\r\n}\r\n\r\n\r\n.absol-tabview {\r\n    position: relative;\r\n}\r\n\r\n.as-tabview-title {\r\n    padding: 10px 10px;\r\n    font-weight: bold;\r\n    font-size: 14px;\r\n    color: rgb(230, 230, 205);\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.bsc-white .as-tabview-title,\r\n.bsc-white .as-np-db-btn{\r\n    color: var(--tab-button-font-color-hover);\r\n}\r\n\r\n\r\n.absol-tabview-container {\r\n    position: absolute;\r\n    top: 2em;\r\n    left: 0;\r\n    right: 0;\r\n    bottom: 0;\r\n    overflow: auto;\r\n    background-color: white;\r\n}\r\n\r\n\r\n.absol-tabview-container.absol-tabview-container-hidden {\r\n    z-index: -9999;\r\n    visibility: hidden;\r\n    opacity: 0;\r\n\r\n}\r\n\r\n.absol-tabview-container.absol-tabview-container-hidden *,\r\n.absol-tabview-container.absol-tabview-container-hidden {\r\n    pointer-events: none;\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n}\r\n\r\n\r\n.absol-tabview-container > div,\r\n.absol-tabview-container > pre {\r\n    width: 100%;\r\n    height: 100%;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-tabview-container > pre {\r\n    margin: 0;\r\n}\r\n\r\n.absol-frame > iframe {\r\n    border: none;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-tabview .absol-tabbar-button {\r\n    border-radius: 0.7em 0.7em 0 0;\r\n    height: 2em;\r\n    box-sizing: border-box;\r\n    border: solid 1px #ccc;\r\n    background-color: white;\r\n    color: black;\r\n    padding-left: 1em;\r\n    padding-right: 0.357em;\r\n    margin-right: 0.357em;\r\n}\r\n\r\n.absol-tabview .as-tab-bar-add-btn {\r\n    border-radius: 0.7em 0.7em 0 0;\r\n    height: 2em;\r\n    box-sizing: border-box;\r\n    border: solid 1px #ccc;\r\n    background-color: white;\r\n    color: black;\r\n}\r\n\r\n.absol-tabview .absol-tabbar {\r\n    height: 2em;\r\n    overflow-y: hidden;\r\n    border-bottom: 1px solid #ccc;\r\n    box-sizing: border-box;\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n}\r\n\r\n.absol-tabview .absol-tabbar-button-active {\r\n    background-color: #5bc0de;\r\n    border-color: #46b8da;\r\n    color: white;\r\n}\r\n\r\n/* .absol-tabview .absol-tabbar-button-close {\r\n    color: rgb(170, 170, 170);\r\n    line-height: 1.5em;\r\n    margin-left: 1em;\r\n    font-size: 1.3em;\r\n} */\r\n\r\n.absol-tabview .absol-tabbar-button-close:hover {\r\n    color: red;\r\n}\r\n\r\n\r\n/************** Mini version - like window form ***********************/\r\n\r\n.absol-tabview.xp-tiny .absol-tabbar {\r\n    height: 1.5em;\r\n    border-bottom: none;\r\n}\r\n\r\n.absol-tabview.xp-tiny .absol-tabbar-button,\r\n.absol-tabview.xp-tiny .as-tab-bar-add-btn {\r\n    height: 1.4em;\r\n    padding-left: 5px;\r\n    padding-right: 5px;\r\n    border-radius: 0;\r\n    vertical-align: bottom;\r\n    margin: 0.1em 0 0 0;\r\n    background-color: rgb(242, 242, 242);\r\n    color: black;\r\n    position: relative;\r\n}\r\n\r\n.absol-tabview.xp-tiny::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    top: calc(1.5em - 4px);\r\n    z-index: 0;\r\n    left: 0;\r\n    right: 0;\r\n    height: 4px;\r\n    border-bottom: solid 1px #ccc;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-tabview.xp-tiny .absol-tabbar-button.absol-tabbar-button-active {\r\n    height: 1.5em;\r\n    margin-top: 0;\r\n    background-color: white;\r\n    border-top-color: #ccc;\r\n    border-left-color: #ccc;\r\n    border-right-color: #ccc;\r\n    border-bottom-color: white;\r\n}\r\n\r\n\r\n.absol-hscroller.absol-tabbar.disabled .absol-scrollbar-container {\r\n    visibility: hidden;\r\n}\r\n\r\n.absol-tabview.absol-tabview.xp-tiny .absol-tabbar-button-close {\r\n    line-height: 1.4em;\r\n}\r\n\r\n.absol-tabview.xp-tiny .absol-tabbar-button-icon-container {\r\n    display: none;\r\n}\r\n\r\n.absol-tabview.xp-tiny .absol-tabview-container {\r\n    top: 1.5em;\r\n}\r\n\r\n.absol-tabview.xp-tiny .absol-tab-absol {\r\n    border-left: solid 1px #ccc;\r\n    border-right: solid 1px #ccc;\r\n    border-bottom: solid 1px #ccc;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.absol-tabview.as-without-close-button > .absol-tabbar .absol-tabbar-button .absol-tabbar-button-icon-container {\r\n    display: none;\r\n}\r\n\r\n.absol-tabview.as-without-close-button > .absol-tabbar .absol-tabbar-button {\r\n    padding-right: 1em;\r\n}\r\n\r\n.absol-tabview > .absol-tabbar .as-tab-bar-add-btn {\r\n    display: none;\r\n}\r\n\r\n.absol-tabview.as-has-add-btn > .absol-tabbar .as-tab-bar-add-btn {\r\n    display: inline-block;\r\n}\r\n\r\n\r\n/************************ Like Metro theme *********************/\r\n\r\n.absol-tabview.metro-flat > .absol-tabbar .absol-tabbar-button,\r\n.absol-tabview.metro-flat > .absol-tabbar .as-tab-bar-add-btn {\r\n    border-radius: 0;\r\n    margin-right: 0;\r\n    margin-left: 0;\r\n    border-left: none;\r\n    border-top: none;\r\n    border-bottom: none;\r\n    border-right: solid 1px rgba(169, 169, 169, 0.3);\r\n    font-size: 1em;\r\n}\r\n\r\n.absol-tabview.metro-flat > .absol-tabbar {\r\n    box-shadow: 0px -1px 0px 0px #ccc;\r\n}\r\n\r\n/************************ Round Out theme *********************/\r\n\r\n/*.absol-tabview.rond-out > .absol-tabbar .absol-tabbar-button*/\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar {\r\n    border-bottom: calc(0.1em + 1px) solid #3B4453;;\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabview-container {\r\n    top: 2.1em;\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar {\r\n    height: 2.1em;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button.absol-tabbar-button-active {\r\n    background-color: #3B4453;\r\n    color: white;\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button {\r\n    background-color: #313946;\r\n    color: rgb(169, 169, 170);\r\n\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button::before,\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    bottom: 0;\r\n    width: 1em;\r\n    height: 1em;\r\n    z-index: 1;\r\n    background-size: cover;\r\n    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMTYiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDguNDY2NjY2NCA0LjIzMzMzMzUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiA8ZyBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIj4KICA8cGF0aCB0cmFuc2Zvcm09Im1hdHJpeCguMTMzOTAzNjQgMCAwIC4yNzU0NTg5MSAtLjAzMjY2NDYxIC0uMDgwNjM0OTIpIiBkPSJNIDMxLjg1ODcxNiwwLjI5MjcyOTQxIFYgMTUuNjYxMDIzIEggMC4yNDM5NDExNyBDIDE1LjI0NzAyOCwxNS43NzU5MjkgMzEuMzU0NDkzLDExLjExODk1NiAzMS44NTg3MTYsMC4yOTI3Mjk0MSBaIiBzdHlsZT0icGFpbnQtb3JkZXI6ZmlsbCBtYXJrZXJzIHN0cm9rZTtmaWxsOiMzMTM5NDYiLz4KICA8cGF0aCB0cmFuc2Zvcm09Im1hdHJpeCgtLjEzMzkwMzY0IDAgMCAuMjc1NDU4OTEgOC40OTkzMzE1IC0uMDgwNjM0OTIpIiBkPSJNIDMxLjg1ODcxNiwwLjI5MjcyOTQxIFYgMTUuNjYxMDIzIEggMC4yNDM5NDExNyBDIDE1LjI0NzAyOCwxNS43NzU5MjkgMzEuMzU0NDkzLDExLjExODk1NiAzMS44NTg3MTYsMC4yOTI3Mjk0MSBaIiBzdHlsZT0icGFpbnQtb3JkZXI6ZmlsbCBtYXJrZXJzIHN0cm9rZTtmaWxsOiMzMTM5NDYiLz4KIDwvZz4KPC9zdmc+Cg==');\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button.absol-tabbar-button-active::before,\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button.absol-tabbar-button-active::after,\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button.absol-tabbar-button-active {\r\n    z-index: 3;\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button.absol-tabbar-button-active::before,\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button.absol-tabbar-button-active::after {\r\n    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMTYiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDguNDY2NjY2NCA0LjIzMzMzMzUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiA8ZyBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIj4KICA8cGF0aCB0cmFuc2Zvcm09Im1hdHJpeCguMTMzOTAzNjQgMCAwIC4yNzU0NTg5MSAtLjAzMjY2NDYxIC0uMDgwNjM0OTIpIiBkPSJNIDMxLjg1ODcxNiwwLjI5MjcyOTQxIFYgMTUuNjYxMDIzIEggMC4yNDM5NDExNyBDIDE1LjI0NzAyOCwxNS43NzU5MjkgMzEuMzU0NDkzLDExLjExODk1NiAzMS44NTg3MTYsMC4yOTI3Mjk0MSBaIiBzdHlsZT0icGFpbnQtb3JkZXI6ZmlsbCBtYXJrZXJzIHN0cm9rZTtmaWxsOiMzQjQ0NTMiLz4KICA8cGF0aCB0cmFuc2Zvcm09Im1hdHJpeCgtLjEzMzkwMzY0IDAgMCAuMjc1NDU4OTEgOC40OTkzMzE1IC0uMDgwNjM0OTIpIiBkPSJNIDMxLjg1ODcxNiwwLjI5MjcyOTQxIFYgMTUuNjYxMDIzIEggMC4yNDM5NDExNyBDIDE1LjI0NzAyOCwxNS43NzU5MjkgMzEuMzU0NDkzLDExLjExODk1NiAzMS44NTg3MTYsMC4yOTI3Mjk0MSBaIiBzdHlsZT0icGFpbnQtb3JkZXI6ZmlsbCBtYXJrZXJzIHN0cm9rZTtmaWxsOiMzQjQ0NTMiLz4KIDwvZz4KPC9zdmc+Cg==');\r\n}\r\n\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button {\r\n    position: relative;\r\n    margin-right: 0;\r\n    border: none;\r\n    border-radius: 0.8em 0.8em 0 0;\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-hscroller-viewport {\r\n    padding-left: 1.2em;\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button::before {\r\n    left: -0.98em;\r\n    background-position: left;\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar .absol-tabbar-button::after {\r\n    right: -0.98em;\r\n    background-position: right;\r\n\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar .as-tab-bar-add-btn {\r\n    background-color: #313946;\r\n    color: rgb(169, 169, 170);\r\n    font-weight: bold;\r\n    border: 4px solid #222933;\r\n    border-radius: 0.8em 0.8em 0 0.8em;\r\n}\r\n\r\n.absol-tabview.cad-dark > .absol-tabbar .as-tab-bar-add-btn:active {\r\n    color: white;\r\n    background-color: #3B4453;\r\n    font-weight: bold;\r\n}\r\n\r\n.as-tabview-right-ctn {\r\n    position: absolute;\r\n    z-index: 150;\r\n    right: 0;\r\n    top: 0;\r\n}\r\n\r\n\r\n\r\n.bsc-white .as-tabview-right-ctn {\r\n    top: -10px;\r\n}\r\n\r\n.as-tabview-right-ctn> div{\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.bsc-white .as-tabview-right-ctn::before {\r\n    content: \"\";\r\n    height: 50px;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}", ""]);



/***/ }),

/***/ 26085:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-textarea2 {\r\n    overflow: hidden;\r\n    resize: none;\r\n    box-sizing: border-box;\r\n    --content-height: 1.425em;\r\n    height: var(--content-height);\r\n    font: inherit;\r\n}\r\n\r\n.absol-textarea2.as-border-none {\r\n    border: none;\r\n    outline: none;\r\n}\r\n\r\n.absol-textarea2:disabled {\r\n    background-color: var(--as-disabled-background-color);\r\n}", ""]);



/***/ }),

/***/ 74315:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-text-clipboard {\r\n    opacity: 0;\r\n    font-size: 1px;\r\n    height: 1px;\r\n    width: 1px;\r\n}", ""]);



/***/ }),

/***/ 74015:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".ac-time-input {\r\n    box-sizing: border-box;\r\n    height: calc(2em + 2px);\r\n    width: 9em;\r\n    border: solid 1px #d6d6d6;\r\n    border-radius: 2px;\r\n    font-size: 1rem;\r\n    outline: none;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    background-color: white;\r\n    position: relative;\r\n}\r\n\r\n.ac-time-input.as-disabled {\r\n    color: rgb(102, 102, 102);\r\n    pointer-events: none;\r\n}\r\n\r\n.ac-time-input.as-must-not-null .as-time-input-clear-btn {\r\n    display: none;\r\n}\r\n\r\n.ac-time-input.as-read-only.as-border-none {\r\n    border: none;\r\n}\r\n\r\n.ac-time-input.as-read-only.as-border-none .as-time-input-icon-btn {\r\n    display: none;\r\n}\r\n\r\n.ac-time-input.as-read-only.as-border-none input {\r\n    padding-left: 0;\r\n}\r\n\r\n.ac-time-input input {\r\n    font: inherit;\r\n    outline: none;\r\n    width: calc(100% - 2em - 2px);\r\n    height: 100%;\r\n    border: none;\r\n    display: block;\r\n    padding: 0 0 0 var(--as-input-horizontal-padding);\r\n    -webkit-user-select: auto;\r\n    user-select: auto;\r\n    -webkit-user-drag: none;\r\n    color: inherit;\r\n    box-sizing: border-box;\r\n    background-color: transparent;\r\n}\r\n\r\n.ac-time-input.as-disabled {\r\n    background-color: var(--as-disabled-background-color);\r\n}\r\n\r\n.as-time-input-icon-btn {\r\n    border-right: none;\r\n    border-top: none;\r\n    border-bottom: none;\r\n    border-left: 1px solid #ddd;\r\n    position: absolute;\r\n    padding: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    right: 0;\r\n    width: calc(2em + 1px);\r\n    box-sizing: border-box;\r\n    background-color: rgba(169, 169, 169, 0.1);\r\n    cursor: pointer;\r\n    border-radius: 0;\r\n    font-size: inherit;\r\n    color: inherit;\r\n}\r\n\r\n.ac-time-input.as-read-only .as-time-input-icon-btn {\r\n    pointer-events: none;\r\n}\r\n\r\n\r\n.as-time-input-icon-btn > span {\r\n    font-size: calc(16em / 14);\r\n}\r\n\r\n\r\n.as-time-input-icon-btn:hover {\r\n    background-color: rgba(169, 169, 169, 0.25);\r\n}\r\n\r\n.as-time-input-icon-btn:active {\r\n    background-color: rgba(169, 169, 169, 0.5);\r\n}\r\n\r\n\r\n.as-time-input-icon-btn.as-disabled {\r\n    color: rgb(102, 102, 102);\r\n    pointer-events: none;\r\n}\r\n\r\n\r\n.as-time-input-clear-btn {\r\n    font-size: inherit;\r\n    position: absolute;\r\n    right: calc(2em + 2px);\r\n    height: 2em;\r\n    top: calc(50% - 1em);\r\n    box-sizing: border-box;\r\n    background-color: transparent;\r\n    border: none;\r\n    color: #bbb;\r\n    visibility: hidden;\r\n}\r\n\r\n\r\n.ac-time-input.as-value-null .as-time-input-clear-btn {\r\n    display: none;\r\n}\r\n\r\n.as-time-input-clear-btn:hover {\r\n    color: rgb(132, 132, 132);\r\n}\r\n\r\n.as-time-input-clear-btn:active {\r\n    color: #525555;\r\n}\r\n\r\ninput:focus + .as-time-input-clear-btn,\r\n.ac-time-input .as-time-input-clear-btn {\r\n    visibility: visible;\r\n}\r\n\r\n.as-dropdown-box-common-style .as-time-input-picker {\r\n    border: none;\r\n    box-shadow: none;\r\n}\r\n\r\n\r\n/*.ac-time-input-picker-ctn {*/\r\n/*    position: fixed;*/\r\n/*}*/\r\n\r\n/*.ac-time-input > span {*/\r\n/*    font-size: 1em;*/\r\n/*    line-height: 2em;*/\r\n/*}*/\r\n\r\n/*.ac-time-input-picker-ctn-hidden {*/\r\n/*    z-index: -1000;*/\r\n/*    opacity: 0;*/\r\n/*    visibility: hidden;*/\r\n/*}*/\r\n\r\n/*.ac-time-input-picker-ctn-hidden:not(.absol-follower) {*/\r\n/*    transition: all 0.1s;*/\r\n/*}*/\r\n\r\n/*.ac-time-input.as-disabled {*/\r\n/*    color: rgb(102, 102, 102);*/\r\n/*    pointer-events: none;*/\r\n/*}*/", ""]);



/***/ }),

/***/ 78875:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".ac-time-picker {\r\n    /*like chrome-calender*/\r\n    display: inline-block;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    font-size: 1rem;\r\n    padding: 0.6em;\r\n    border: solid 1px rgb(191, 191, 191);\r\n    box-shadow: 1px 1px 2px rgb(240, 240, 240);\r\n    z-index: 100;\r\n    touch-action: manipulation;\r\n    user-select: none;\r\n    background-color: rgb(255, 255, 255);\r\n    white-space: initial;\r\n}\r\n\r\n\r\n@media screen and (orientation: portrait) {\r\n    .ac-time-picker.ac-time-picker-touch {\r\n        font-size: 5vw;\r\n    }\r\n}\r\n\r\n@media screen and (orientation: landscape) {\r\n    .ac-time-picker.ac-time-picker-touch {\r\n        font-size: 4vh;\r\n    }\r\n}\r\n\r\n\r\n.ac-time-picker:not(.ac-time-picker-clock-mode) .ac-time-picker-set-clock,\r\n.ac-time-picker:not(.ac-time-picker-clock-mode) .ac-time-picker-keyboard-btn,\r\n.ac-time-picker:not(.ac-time-picker-touch) .ac-time-picker-keyboard-btn,\r\n.ac-time-picker:not(.ac-time-picker-time-mode) .ac-time-picker-set-time,\r\n.ac-time-picker:not(.ac-time-picker-time-mode) .ac-time-picker-clock-btn {\r\n    display: none;\r\n}\r\n\r\n.ac-time-picker-set-clock-header {\r\n    font-size: 2.8em;\r\n    text-align: center;\r\n    min-width: 4.28571428571em;\r\n    font-weight: bold;\r\n\r\n}\r\n\r\n.ac-time-picker-set-clock-header > span {\r\n    font-size: inherit;\r\n}\r\n\r\n.ac-time-picker-clock {\r\n    width: 12em;\r\n    height: 12em;\r\n}\r\n\r\n.ac-time-picker-clock-hour-pm {\r\n    fill: rgb(20, 20, 20);\r\n    font-size: 0.7em;\r\n}\r\n\r\n\r\n.ac-time-picker-clock-hour-am {\r\n    fill: black;\r\n    font-size: 0.8em;\r\n}\r\n\r\n.ac-time-picker-clock-minute {\r\n    fill: black;\r\n    font-size: 0.8em;\r\n}\r\n\r\n\r\n.ac-time-picker-clock-center,\r\n.ac-time-picker-clock-select-circle {\r\n    fill: rgb(115, 166, 248);\r\n}\r\n\r\n.ac-time-picker-clock-select-center {\r\n    fill: white;\r\n}\r\n\r\n.ac-time-picker-clock-select-line {\r\n    stroke-width: 1;\r\n    stroke: rgb(115, 166, 248);\r\n}\r\n\r\n\r\n.ac-time-picker-hour,\r\n.ac-time-picker-minute {\r\n    outline: none;\r\n}\r\n\r\n.ac-time-picker-edit-hour .ac-time-picker-hour,\r\n.ac-time-picker-edit-minute .ac-time-picker-minute {\r\n    color: rgb(62, 125, 189);\r\n}\r\n\r\n.ac-time-picker:not(.ac-time-picker-edit-hour) .ac-time-picker-clock-hour-ctn,\r\n.ac-time-picker:not(.ac-time-picker-edit-minute) .ac-time-picker-clock-minute-ctn {\r\n    visibility: hidden;\r\n}\r\n\r\n.ac-time-picker:not(.ac-time-picker-edit-hour):not(.ac-time-picker-edit-minute) .ac-time-picker-clock {\r\n    display: none;\r\n}\r\n\r\n.ac-time-picker-hour:empty::before,\r\n.ac-time-picker-minute:empty::before {\r\n    content: \"0\";\r\n    display: inline;\r\n}\r\n\r\n.ac-time-picker-footer {\r\n    display: block;\r\n    position: relative;\r\n    min-height: 1.5em;\r\n    min-width: 12em;\r\n}\r\n\r\n.ac-time-picker-footer-right {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n}\r\n\r\n.ac-time-picker-footer button {\r\n    font-size: 1em;\r\n    height: 1.5em;\r\n    padding-top: 0;\r\n    padding-bottom: 0;\r\n    border: none;\r\n    background-color: transparent;\r\n    outline: none;\r\n    padding-left: 0.3em;\r\n    padding-right: 0.3em;\r\n}\r\n\r\n.ac-time-picker-footer button:hover,\r\n.ac-time-picker-footer button:focus {\r\n    background-color: rgba(170, 170, 170, 0.3);\r\n}\r\n\r\n.ac-time-picker-footer > button {\r\n    margin-right: 1em;\r\n}\r\n\r\n.ac-time-picker-footer-right > button {\r\n    margin-left: 1em;\r\n}\r\n\r\n\r\n.ac-time-picker-footer button .mdi {\r\n    font-size: 1.3em;\r\n}\r\n\r\n\r\n/* .ac-time-picker:not(.ac-time-picker-touch) .ac-time-picker-keyboard-btn {\r\n    display: none;\r\n} */\r\n\r\n/* keyboard-outline */\r\n\r\n.ac-time-picker-set-time-header {\r\n    font-size: 1.4em;\r\n    font-weight: bold;\r\n    margin-bottom: 1em;\r\n}\r\n\r\n.ac-time-picker-set-time-label {\r\n    font-size: 1em;\r\n    font-weight: bold;\r\n    margin-bottom: 0.3em;\r\n}\r\n\r\n.ac-time-picker-set-time-input-group {\r\n    margin-bottom: 0.3em;\r\n    font-size: 1em;\r\n    white-space: nowrap;\r\n}\r\n\r\n.ac-time-picker-set-time-input-hm > input {\r\n    height: 1.2em;\r\n    line-height: 1.2em;\r\n    width: 2em;\r\n    text-align: center;\r\n    font-size: 1em;\r\n    border-top: none;\r\n    border-left: none;\r\n    border-right: none;\r\n    border-bottom: 1px solid rgb(70, 70, 72);\r\n    outline: none;\r\n}\r\n\r\n.ac-time-picker-set-time-input-label-hm {\r\n    font-size: 1em;\r\n    white-space: nowrap;\r\n\r\n}\r\n\r\n.ac-time-picker-set-time-input-label-hm span {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-size: 1em;\r\n\r\n}\r\n\r\n\r\n.ac-time-picker-set-time-input-label-hm > span:first-child {\r\n    width: 2em;\r\n}", ""]);



/***/ }),

/***/ 22652:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-time-range-24-input {\r\n    white-space: nowrap;\r\n    display: inline-block;\r\n    min-width: 318px;\r\n}\r\n\r\n.as-time-range-24-input.as-read-only.as-border-none {\r\n    min-width: unset;\r\n}\r\n\r\n.as-time-range-24-input > div:first-child {\r\n    margin-right: 10px;\r\n}\r\n\r\n\r\n.as-time-range-24-input.as-read-only.as-border-none .ac-time-input {\r\n    display: none;\r\n}\r\n\r\n.as-time-range-24-input.as-read-only.as-border-none::after{\r\n    content: attr(data-text);\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n}\r\n\r\n.as-time-range-24-input.as-read-only.as-border-none::before{\r\n    content: \"\";\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n    height: calc(2em + 2px);\r\n}\r\n\r\n\r\n.as-chrome-time-24-picker-follower .as-chrome-time-24-picker {\r\n    border: none;\r\n    box-shadow: none;\r\n}", ""]);



/***/ }),

/***/ 50475:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-time-select-input {\r\n    display: inline-block;\r\n    position: relative;\r\n    height: calc(2em + 2px);\r\n    border: solid 1px #d6d6d6;\r\n    border-radius: 2px;\r\n    box-sizing: border-box;\r\n    cursor: pointer;\r\n    font-size: 1rem;\r\n    outline: none;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    white-space: nowrap;\r\n    padding-right: 30px;\r\n    --list-min-width: unset;\r\n    width: calc(var(--list-min-width) + 2em + 2px);\r\n    min-width: calc(var(--list-min-width) + 2em + 2px);\r\n}\r\n\r\n.as-time-select-input.as-disabled {\r\n    pointer-events: none;\r\n    background-color: #ebebe4;\r\n}\r\n\r\n.as-time-select-input-text {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n    width: 100%;\r\n    outline: none;\r\n    border: none;\r\n    box-sizing: border-box;\r\n    padding-left: 10px;\r\n    padding-right: 0;\r\n    background-color: transparent;\r\n    font-size: inherit;\r\n}", ""]);



/***/ }),

/***/ 1449:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-toast-list {\r\n    position: fixed;\r\n    z-index: 1100000000;\r\n    width: 25em;\r\n    max-height: calc(100vh - 20px);\r\n    overflow-y: auto;\r\n}\r\n\r\n.as-toast-list > .as-toast {\r\n    box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.35);\r\n}\r\n\r\n\r\n.as-toast-list.as-se {\r\n    bottom: 10px;\r\n    right: 10px;\r\n}\r\n\r\n.as-toast-list.as-sw {\r\n    bottom: 10px;\r\n    left: 10px;\r\n}\r\n\r\n.as-toast-list.as-ne {\r\n    top: 10px;\r\n    right: 10px;\r\n}\r\n\r\n.as-toast-list.as-nw {\r\n    top: 10px;\r\n    left: 10px;\r\n}\r\n\r\n\r\n.as-toast-list.as-sc {\r\n    bottom: 10px;\r\n    left: calc(50% - 177px);\r\n}\r\n\r\n.as-toast-list:empty {\r\n    visibility: hidden;\r\n}\r\n\r\n.as-toast-list.as-ne > .as-toast,\r\n.as-toast-list.as-nw > .as-toast {\r\n    margin-bottom: 5px;\r\n}\r\n\r\n.as-toast-list.as-sc > .as-toast,\r\n.as-toast-list.as-se > .as-toast,\r\n.as-toast-list.as-sw > .as-toast {\r\n    margin-top: 5px;\r\n}\r\n\r\n\r\n.as-toast {\r\n    display: block;\r\n    max-width: calc(100vw - 20px);\r\n    overflow: hidden;\r\n    background-color: white;\r\n    background-clip: padding-box;\r\n    border: 1px solid rgba(0, 0, 0, 0.1);\r\n    font-family: Roboto, sans-serif;\r\n    font-size: 1rem;\r\n}\r\n\r\n.as-toast-header {\r\n    display: flex;\r\n    display: -ms-flex;\r\n    -ms-flex-align: center;\r\n    align-items: center;\r\n    padding: 0.25em 0.75em;\r\n    color: #6c757d;\r\n    background-clip: padding-box;\r\n    border-bottom: 1px solid rgba(0, 0, 0, 0.05);\r\n}\r\n\r\n.as-toast-header strong {\r\n    text-align: left;\r\n    margin-right: auto;\r\n}\r\n\r\n.as-toast-variant-color {\r\n    margin-right: 0.5em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    background-color: var(--variant-color-primary);\r\n    width: 1.25em;\r\n    height: 1.25em;\r\n}\r\n\r\n\r\n.as-toast-close-btn {\r\n    padding: 0;\r\n    background-color: transparent;\r\n    border: none;\r\n    outline: none;\r\n    color: inherit;\r\n    margin-left: 0.25em;\r\n    margin-bottom: 0.25em;\r\n    font-size: inherit;\r\n    width: 24px;\r\n    height: 24px;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-toast-close-btn:hover {\r\n    color: black;\r\n    background-color: var(--icon-background-cover-hover);\r\n}\r\n\r\n.as-toast-close-btn span {\r\n    /*font-size: 1.5em;*/\r\n    font-size: 20px;\r\n    text-shadow: 0 1px 0 currentColor;\r\n}\r\n\r\n.as-toast-body {\r\n\r\n}\r\n\r\n.as-toast-message {\r\n    padding: 0.75em;\r\n}\r\n\r\n\r\n.as-toast.as-not-appeared {\r\n    opacity: 0;\r\n    transition: opacity 0.2s;\r\n}\r\n\r\n.as-toast.as-not-appeared.as-appearing {\r\n    opacity: 1;\r\n}\r\n\r\n.as-toast.as-appeared {\r\n    transition: opacity 0.5s;\r\n    opacity: 1;\r\n}\r\n\r\n.as-toast.as-disappearing {\r\n    opacity: 0;\r\n}\r\n\r\n.as-toast.as-variant-sticky-note {\r\n    background-color: #ffff88;\r\n}\r\n\r\n\r\n.as-toast.as-variant-sticky-note .as-toast-variant-color,\r\n.as-toast.as-variant-background .as-toast-variant-color {\r\n    display: none;\r\n}\r\n\r\n.as-toast.as-variant-sticky-note .as-toast-title {\r\n    color: #1e1ec8;\r\n}", ""]);



/***/ }),

/***/ 30238:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-toc-list {\r\n\r\n}\r\n\r\n.as-toc-list.as-searching .as-toc-list-body,\r\n.as-toc-list:not(.as-searching) .as-toc-list-searching {\r\n    display: none;\r\n}\r\n\r\n.as-toc-item {\r\n    font-size: 14px;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    display: flex;\r\n    height: 30px;\r\n    align-items: stretch;\r\n    --level: 0;\r\n}\r\n\r\n.as-toc-item:not(.as-status-close) .as-toc-item-toggle-ico-ctn .toggle-close,\r\n.as-toc-item:not(.as-status-open) .as-toc-item-toggle-ico-ctn .toggle-open {\r\n    display: none;\r\n}\r\n\r\n.as-toc-item.as-status-none .as-toc-item-toggle-ico-ctn {\r\n    visibility: hidden;\r\n}\r\n\r\n.as-toc-item.as-active {\r\n    background-color: var(--as-transparent-button-active-color);\r\n}\r\n\r\n\r\n.as-toc-item:hover {\r\n    background-color: var(--as-transparent-button-hover-color);\r\n}\r\n\r\n.as-toc-item > div {\r\n    white-space: nowrap;\r\n    width: 30px;\r\n}\r\n\r\n.as-toc-item > div::before,\r\n.as-toc-item > div > * {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-toc-item > div::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n.as-toc-item-name-ctn {\r\n    flex-grow: 1;\r\n\r\n}\r\n\r\n.as-toc-item-name {\r\n    user-select: none;\r\n    max-width: 100%;\r\n    overflow: hidden;\r\n    text-overflow: ellipsis;\r\n}\r\n\r\ndiv.as-toc-item-toggle-ico-ctn {\r\n    padding-left: calc(20px * var(--level));\r\n    box-sizing: content-box !important;\r\n}\r\n\r\n.as-toc-item-toggle-ico-ctn .toggler-ico {\r\n    width: 0.7em;\r\n    height: 0.7em;\r\n}\r\n\r\n.as-toc-item-toggle-ico-ctn .toggler-ico path {\r\n    fill: rgb(104, 104, 104);\r\n}\r\n\r\n.as-toc-item-ext-icon-ctn:empty {\r\n    display: none;\r\n}\r\n\r\n.as-toc-item-ext-icon-ctn > img,\r\n.as-toc-item-ext-icon-ctn > svg {\r\n    width: 20px;\r\n    height: 20px;\r\n}\r\n\r\n.as-toc-item-ext-icon-ctn > span {\r\n    font-size: 20px;\r\n}\r\n\r\n\r\n.as-toc-item-toggle-ico-ctn,\r\n.as-toc-item-check-ctn,\r\n.as-toc-item-quick-menu-ctn,\r\n.as-toc-item-ext-icon-ctn {\r\n    text-align: center;\r\n    width: 30px;\r\n}\r\n\r\n.as-toc-item-quick-menu-ctn span {\r\n    font-size: 20px;\r\n}\r\n\r\n.as-toc-item-quick-menu-ctn button {\r\n    border: none;\r\n    background-color: transparent;\r\n    padding: 0;\r\n    width: 24px;\r\n    height: 24px;\r\n}\r\n\r\n.as-toc-item-quick-menu-ctn button.as-quick-menu-attached {\r\n    background-color: var(--as-transparent-button-active-color);\r\n}\r\n\r\n.as-toc-item-quick-menu-ctn button:hover {\r\n    background-color: var(--icon-background-cover-hover);\r\n}\r\n\r\n.as-toc-item:not(.as-has-quick-menu) .as-toc-item-quick-menu-ctn {\r\n    visibility: hidden;\r\n    pointer-events: none;\r\n    opacity: 0;\r\n}\r\n\r\n.as-toc-item-name-ctn input {\r\n    font: inherit;\r\n    border: none;\r\n    /*background-color: transparent;*/\r\n    width: 8px;\r\n    padding-left: 2px;\r\n    padding-right: 2px;\r\n    margin-left: -2px;\r\n    margin-right: -2px;\r\n    outline: none;\r\n    box-sizing: content-box;\r\n    background-color: #5bc0de;\r\n    max-width: 100%;\r\n}\r\n\r\n.as-toc-item:not(.as-renaming) .as-toc-item-name-ctn input,\r\n.as-toc-item.as-renaming .as-toc-item-name {\r\n    display: none;\r\n}\r\n", ""]);



/***/ }),

/***/ 63519:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-token-field {\r\n    font-size: 1rem;\r\n    border: 1px solid #dddddd;\r\n}\r\n\r\n.as-token-field-input-text {\r\n    font: inherit;\r\n    padding: 0;\r\n    box-sizing: border-box;\r\n    min-width: 4.3em;\r\n    border: none;\r\n    outline: none;\r\n    height: var(--select-box-item-height);\r\n    line-height: var(--select-box-item-height);\r\n    vertical-align: top;\r\n    margin-top: 2px;\r\n}\r\n\r\n.absol-selectbox-item.as-token-field-item {\r\n    font: inherit;\r\n    margin: 2px;\r\n    outline: none;\r\n}\r\n\r\n.as-token-field-item:focus {\r\n    background-color: var(--select-box-focus-item-color);\r\n}\r\n", ""]);



/***/ }),

/***/ 54771:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-tokenize-hyper-input {\r\n    margin: 0;\r\n    padding: 0;\r\n    white-space: pre-wrap;\r\n    -moz-user-modify: read-write;\r\n    -webkit-user-modify: read-write;\r\n    word-break: normal;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n}\r\n\r\n\r\n.as-emoji-token{\r\n    font-size: inherit;\r\n    overflow: hidden;\r\n    box-sizing: border-box;\r\n    display: inline;\r\n    white-space: pre;\r\n    background-size: 1.2em;\r\n    background-position:left;\r\n    background-repeat: no-repeat;\r\n}\r\n\r\n.as-tag-token{\r\n    font-size: inherit;\r\n    display: inline;\r\n    white-space: pre;\r\n    font-weight: bold;\r\n    color: #1e1ec8;\r\n}\r\n\r\n\r\n\r\n", ""]);



/***/ }),

/***/ 70095:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --tool-tip-arrow-pos: 50%;\r\n    --tool-tip-background-color: gray;\r\n    --tool-tip-text-color: white;\r\n}\r\n\r\n.absol-tooltip {\r\n    margin: 0;\r\n    position: relative;\r\n    box-sizing: border-box;\r\n    display: inline-block;\r\n    color: var(--tool-tip-text-color);\r\n}\r\n\r\n.absol-tooltip-content {\r\n    display: block;\r\n    border-radius: 0.25em;\r\n    background-color: var(--tool-tip-background-color);\r\n    padding: 0.25em 0.5em;\r\n    font-size: inherit;\r\n}\r\n\r\n\r\n.absol-tooltip-arrow {\r\n    width: 0;\r\n    height: 0;\r\n    position: absolute;\r\n    box-sizing: content-box;\r\n    font-size: inherit;\r\n}\r\n\r\n.absol-tooltip.top .absol-tooltip-arrow {\r\n    border-left: 0.4em solid transparent;\r\n    border-right: 0.3em solid transparent;\r\n\r\n    border-top: 0.3em solid var(--tool-tip-background-color);\r\n    bottom: 0;\r\n    left: calc(var(--tool-tip-arrow-pos) - 0.3em);\r\n}\r\n\r\n\r\n.absol-tooltip.top {\r\n    padding-bottom: 0.28em;\r\n}\r\n\r\n\r\n.absol-tooltip.bottom .absol-tooltip-arrow {\r\n    border-left: 0.3em solid transparent;\r\n    border-right: 0.4em solid transparent;\r\n    border-bottom: 0.3em solid var(--tool-tip-background-color);\r\n\r\n    top: 0;\r\n    left: calc(var(--tool-tip-arrow-pos) - 0.3em);\r\n}\r\n\r\n.absol-tooltip.bottom {\r\n    padding-top: 0.28em;\r\n}\r\n\r\n\r\n.absol-tooltip.left .absol-tooltip-arrow {\r\n    border-top: 0.3em solid transparent;\r\n    border-bottom: 0.4em solid transparent;\r\n    border-left: 0.4em solid var(--tool-tip-background-color);\r\n\r\n    right: 0;\r\n    top: calc(var(--tool-tip-arrow-pos) - 0.3em);\r\n}\r\n\r\n.absol-tooltip.left {\r\n    padding-right: 0.38em;\r\n}\r\n\r\n\r\n.absol-tooltip.right .absol-tooltip-arrow {\r\n    border-top: 0.4em solid transparent;\r\n    border-bottom: 0.4em solid transparent;\r\n    border-right: 0.4em solid var(--tool-tip-background-color);\r\n\r\n    left: 0;\r\n    top: calc(var(--tool-tip-arrow-pos) - 0.3em);\r\n}\r\n\r\n.absol-tooltip.ne .absol-tooltip-arrow {\r\n    border-top: 0.3em solid transparent;\r\n    border-bottom: 0.4em solid transparent;\r\n    border-left: 0.4em solid var(--tool-tip-background-color);\r\n    bottom: -0.3em;\r\n    left: 0;\r\n}\r\n\r\n.absol-tooltip.nw .absol-tooltip-arrow {\r\n    border-top: 0.3em solid transparent;\r\n    border-bottom: 0.4em solid transparent;\r\n    border-right: 0.4em solid var(--tool-tip-background-color);\r\n    bottom: -0.3em;\r\n    right: 0;\r\n}\r\n\r\n.absol-tooltip.se .absol-tooltip-arrow {\r\n    border-top: 0.3em solid transparent;\r\n    border-bottom: 0.4em solid transparent;\r\n    border-left: 0.4em solid var(--tool-tip-background-color);\r\n    top: -0.3em;\r\n    left: 0;\r\n}\r\n\r\n.absol-tooltip.sw .absol-tooltip-arrow {\r\n    border-top: 0.3em solid transparent;\r\n    border-bottom: 0.4em solid transparent;\r\n    border-right: 0.4em solid var(--tool-tip-background-color);\r\n    top: -0.25em;\r\n    right: 0;\r\n}\r\n\r\n.absol-tooltip.right {\r\n    padding-left: 0.38em;\r\n}\r\n\r\n\r\n.absol-tooltip-root {\r\n    position: relative;\r\n    width: 0;\r\n    height: 0;\r\n}\r\n\r\n.absol-tooltip-root-holder {\r\n    position: fixed;\r\n    z-index: 100000000;\r\n    left: 0;\r\n    top: 0;\r\n}\r\n\r\n.as-copyable-icon-tooltip {\r\n    font-size: inherit;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    color: #428bca;\r\n    border: none;\r\n    padding: 0;\r\n    margin: 0;\r\n    background-color: transparent;\r\n}\r\n\r\n.as-copyable-icon-tooltip:hover {\r\n    background-color: var(--as-transparent-button-hover-color);\r\n}\r\n\r\n.as-copyable-icon-tooltip:active {\r\n    background-color: var(--as-transparent-button-active-color);\r\n}\r\n\r\n.as-cit-icon {\r\n    font-size: inherit;\r\n    color: inherit;\r\n    display: block;\r\n}\r\n\r\n.as-cit-icon::before {\r\n    display: block;\r\n}\r\n", ""]);



/***/ }),

/***/ 61048:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-trackbar {\r\n    height: 1.2em;\r\n    min-width: 7em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    -webkit-touch-callout: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none;\r\n    user-select: none;\r\n    padding: 0 0.6em;\r\n    box-sizing: border-box;\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-trackbar::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.absol-trackbar-line {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: 100%;\r\n    position: relative;\r\n    height: 0.4em;\r\n    box-sizing: border-box;\r\n    background-color: rgb(200, 200, 200);\r\n    -webkit-box-shadow: 0 0 0.2em 0.1em rgb(160, 160, 160) inset;\r\n    -moz-box-shadow: 0 0 0.2em 0.1em rgb(160, 160, 160) inset;\r\n    box-shadow: 0 0 0.2em 0.1em rgb(160, 160, 160) inset;\r\n    border-radius: 0.15em;\r\n}\r\n\r\n.absol-trackbar-button {\r\n    position: absolute;\r\n    z-index: 1;\r\n    top: -0.4em;\r\n    /* bottom: -0.4em; */\r\n    height: 1.2em;\r\n    left: 0;\r\n    width: 1.2em;\r\n    margin-left: -0.6em ;\r\n    background: rgb(245, 245, 245);\r\n    border-radius: 50%;\r\n    border: solid 1px rgb(139, 139, 139);\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-trackbar:not(.as-read-only) .absol-trackbar-button,\r\n.absol-trackbar:not(.as-read-only) .absol-trackbar-line {\r\n    cursor: pointer;\r\n}\r\n\r\n.absol-trackbar.as-disabled {\r\n    pointer-events: none;\r\n}\r\n\r\n.absol-trackbar.as-disabled .absol-trackbar-button {\r\n    background: rgb(225, 225, 225);\r\n    border: solid 1px rgb(200, 200, 200);\r\n}\r\n\r\n.absol-trackbar.as-disabled .absol-trackbar-line {\r\n    background-color: rgb(220, 220, 220);\r\n    -webkit-box-shadow: 0 0 0.2em 0.1em rgb(200, 200, 200) inset;\r\n    -moz-box-shadow: 0 0 0.2em 0.1em rgb(200, 200, 200) inset;\r\n    box-shadow: 0 0 0.2em 0.1em rgb(200, 200, 200) inset;\r\n}", ""]);



/***/ }),

/***/ 64178:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-trackbar-input {\r\n    box-sizing: border-box;\r\n    display: inline-block;\r\n    white-space: nowrap;\r\n    position: relative;\r\n    min-width: 13.5em;\r\n    height: 2em;\r\n    --input-width: 4em;\r\n    font-size: 1rem;\r\n}\r\n\r\n.absol-trackbar-input::after {\r\n    content: \"\";\r\n    vertical-align: middle;\r\n    height: 100%;\r\n}\r\n\r\n.absol-trackbar-input > .absol-trackbar {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: calc(100% - var(--input-width) - 5px);\r\n}\r\n\r\n\r\n.absol-trackbar-input > .as-flexicon-input {\r\n    width: var(--input-width);\r\n    vertical-align: middle;\r\n    height: 2em;\r\n    box-sizing: border-box;\r\n    margin-left: 5px;\r\n}\r\n\r\n.absol-trackbar-input.as-disabled {\r\n    pointer-events: none;\r\n    color: #777777;\r\n\r\n}\r\n\r\n.absol-trackbar-input input {\r\n    color: inherit;\r\n    font-size: inherit;\r\n}\r\n\r\n.absol-trackbar-input.as-border-none .as-flexicon-input {\r\n    border: none;\r\n}", ""]);



/***/ }),

/***/ 70194:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-tree-chart * {\r\n    box-sizing: border-box;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\r\n}\r\n\r\n.as-tree-chart {\r\n    --root-background-color: #ED7D31;\r\n    --root-text-color: white;\r\n\r\n    --vert-node-background-color: #4472C4;\r\n    --vert-node-text-color: white;\r\n\r\n    --horz-node-background-color: #A9D18E;\r\n    --horz-node-text-color: black;\r\n\r\n    --leaf-node-background-color: #F8CBAD;\r\n    --leaf-node-text-color: black;\r\n\r\n\r\n    font-size: 1rem;\r\n    display: inline-block;\r\n}\r\n\r\n.as-tree-chart-node {\r\n    display: inline-block;\r\n    white-space: normal;\r\n    vertical-align: top;\r\n    position: relative;\r\n}\r\n\r\n.as-tree-chart-content-ctn {\r\n    text-align: center;\r\n    position: relative;\r\n}\r\n\r\n.as-tree-chart-node[data-level=\"0\"] >.as-tree-chart-content-ctn> .as-tree-chart-content {\r\n    background-color: var(--root-background-color);\r\n    color: var(--root-text-color);\r\n}\r\n\r\n.as-tree-chart-node.as-horizontal .as-tree-chart-child-ctn .as-tree-chart-content{\r\n    background-color: var(--horz-node-background-color);\r\n    color: var(--horz-node-text-color);\r\n}\r\n\r\n.as-tree-chart-node.as-is-leaf >.as-tree-chart-content-ctn> .as-tree-chart-content {\r\n    background-color: var(--leaf-node-background-color);\r\n    color: var(--leaf-node-text-color);\r\n}\r\n\r\n\r\n\r\n.as-tree-chart-content {\r\n    padding: 5px;\r\n    border-radius: 4px;\r\n    border: 1px solid black;\r\n    text-align: center;\r\n    position: relative;\r\n    display: inline-block;\r\n    background-color: var(--vert-node-background-color);\r\n    color: var(--vert-node-text-color);\r\n}\r\n\r\n.as-tree-chart-icon,\r\n.as-tree-chart-text {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-tree-chart-icon {\r\n    font-size: 1.25em;\r\n    padding-right: 0.25em;\r\n}\r\n\r\n.as-tree-chart-node.as-has-children > .as-tree-chart-content-ctn {\r\n    padding-bottom: 10px;\r\n}\r\n\r\n.as-tree-chart-node.as-has-children > .as-tree-chart-content-ctn::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    bottom: 0;\r\n    left: 50%;\r\n    height: 10px;\r\n    border-left: 1px solid black;\r\n}\r\n\r\n.as-tree-chart-child-ctn {\r\n    white-space: nowrap;\r\n    padding-top: 10px;\r\n    text-align: center;\r\n    vertical-align: top;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-tree-chart-node:not(.as-horizontal) > .as-tree-chart-child-ctn > .as-tree-chart-node:not(:last-child) {\r\n    margin-right: 10px;\r\n}\r\n\r\n.as-tree-chart-child-ctn > .as-tree-chart-node:not(:first-child):not(:last-child)::before {\r\n    content: \"\";\r\n    border-top: 1px solid black;\r\n    position: absolute;\r\n    left: 0;\r\n    right: -10px;\r\n    top: -10px;\r\n}\r\n\r\n.as-tree-chart-child-ctn > .as-tree-chart-node:first-child:not(:last-child)::before {\r\n    content: \"\";\r\n    border-top: 1px solid black;\r\n    position: absolute;\r\n    left: 50%;\r\n    right: -10px;\r\n    top: -10px;\r\n}\r\n\r\n.as-tree-chart-child-ctn > .as-tree-chart-node > .as-tree-chart-content-ctn .as-tree-chart-content::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: 50%;\r\n    height: 10px;\r\n    top: -11px;\r\n    border-left: 1px solid black;\r\n}\r\n\r\n.as-tree-chart-child-ctn > .as-tree-chart-node:not(:first-child):last-child > .as-tree-chart-content-ctn::before {\r\n    content: \"\";\r\n    border-top: 1px solid black;\r\n    position: absolute;\r\n    left: 0;\r\n    width: calc(50% + 1px);\r\n    top: -10px;\r\n}\r\n\r\n.as-tree-chart-node.as-horizontal .as-tree-chart-child-ctn .as-tree-chart-content {\r\n    text-align: left;\r\n}\r\n\r\n.as-tree-chart-node.as-horizontal > .as-tree-chart-content-ctn .as-tree-chart-content {\r\n    display: block;\r\n}\r\n\r\n.as-tree-chart-node.as-horizontal .as-tree-chart-node {\r\n    display: block;\r\n}\r\n\r\n.as-tree-chart-node.as-horizontal .as-tree-chart-child-ctn {\r\n    padding-left: 20px;\r\n}\r\n\r\n.as-tree-chart-node.as-horizontal .as-tree-chart-child-ctn .as-tree-chart-content-ctn {\r\n    text-align: left;\r\n}\r\n\r\n.as-tree-chart-node.as-horizontal .as-tree-chart-content-ctn::after {\r\n    left: 10px;\r\n}\r\n\r\n.as-tree-chart-node.as-horizontal .as-tree-chart-node:not(:last-child)::before {\r\n    right: unset;\r\n    bottom: 0;\r\n    border-top: none;\r\n    border-left: 1px solid black;\r\n    left: -10px;\r\n    height: unset;\r\n}\r\n\r\n.as-tree-chart-node.as-horizontal .as-tree-chart-child-ctn > .as-tree-chart-node > .as-tree-chart-content-ctn .as-tree-chart-content::before {\r\n    border-left: none;\r\n    border-top: 1px solid black;\r\n    left: -10px;\r\n    width: 10px;\r\n    top: 50%;\r\n}\r\n\r\n.as-tree-chart-node.as-horizontal .as-tree-chart-node:last-child > .as-tree-chart-content-ctn::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: -10px;\r\n    top: -10px;\r\n    height: calc(50% + 10px);\r\n    border-top: none;\r\n    border-left: 1px solid black;\r\n    /*width: unset;*/\r\n}\r\n\r\n.as-tree-chart-node.as-horizontal .as-tree-chart-node.as-has-children:last-child > .as-tree-chart-content-ctn::before {\r\n    height: calc(50% + 5px);\r\n    /*width: unset;*/\r\n}\r\n", ""]);



/***/ }),

/***/ 30619:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-tree-list {}\r\n\r\n.absol-tree-list-item {}\r\n\r\n.absol-tree-list-item-parent:hover {\r\n    background: #efefef;\r\n    cursor: pointer;\r\n}\r\n\r\n.absol-tree-list-item-parent {\r\n    padding-left: 0.3em;\r\n    padding-right: 0.6em;\r\n    position: relative;\r\n}\r\n\r\n.absol-tree-list-item.active>.absol-tree-list-item-parent {\r\n    background: #dfdfdf;\r\n}\r\n\r\n.absol-tree-list-item-parent>span {\r\n    line-height: 20px;\r\n    white-space: nowrap;\r\n}\r\n\r\n.absol-tree-list-item-child {}\r\n\r\n.absol-tree-list-item>.absol-tree-list-item-child:empty {\r\n    display: none;\r\n}\r\n\r\n.absol-tree-list-item-desc-container {\r\n    right: 0.3em;\r\n    top: 0;\r\n    bottom: 0;\r\n    position: absolute;\r\n}\r\n\r\n.absol-tree-list-item-desc {\r\n    font-style: italic;\r\n    line-height: 20px;\r\n    white-space: nowrap;\r\n    margin-left: 1em;\r\n    color: rgb(37, 37, 37);\r\n}\r\n\r\n.absol-tree-list-item-desc:empty {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 29496:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "\r\n.as-tree-table {\r\n    font-size: 1rem;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    border-collapse: collapse;\r\n}\r\n\r\n.as-tree-table-toggle {\r\n    position: absolute;\r\n    left: 5px;\r\n    top: 0;\r\n    bottom: 0;\r\n    vertical-align: middle;\r\n    padding-right: 0.3em;\r\n    white-space: nowrap;\r\n    user-select: none;\r\n}\r\n\r\n\r\n\r\n.as-tree-table-toggle::before {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n.as-tree-table-head {\r\n    background-color: #d6d6d6;\r\n}\r\n\r\n\r\n.as-tree-table-head-cell {\r\n    font-weight: bold;\r\n    padding: 10px;\r\n    border: 1px solid #ddd;\r\n    position: relative;\r\n}\r\n\r\n\r\n.as-tree-table-row {\r\n    height: calc(40em / 14);\r\n    page-break-inside: avoid;\r\n    break-inside: avoid;\r\n}\r\n\r\n.as-tree-table-row:nth-child(odd) {\r\n    background-color: rgb(245, 245, 245);\r\n}\r\n\r\n.as-tree-table-row:nth-child(even) {\r\n    background-color: white;\r\n}\r\n\r\n.as-tree-table-cell {\r\n    padding: 5px;\r\n    border: 1px solid #ddd;\r\n    position: relative;\r\n    page-break-inside: avoid;\r\n    break-inside: avoid;\r\n}\r\n\r\n.as-tree-table-cell[data-type=\"number\"] {\r\n    text-align: right;\r\n}\r\n\r\n.as-tree-table-row.as-is-opened .as-tree-table-toggle .toggle-close,\r\n.as-tree-table-row:not(.as-is-opened) .as-tree-table-toggle .toggle-open {\r\n    display: none;\r\n}\r\n\r\n.as-tree-table-toggle .toggler-ico {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n\r\n.as-tree-table-row:not(.as-has-sub-row) .as-tree-table-toggle .toggler-ico {\r\n    visibility: hidden;\r\n}\r\n\r\n/*.as-tree-table-row {*/\r\n/*    height: var(--table-row-height);*/\r\n/*}*/\r\n\r\n.as-printer-content .as-tree-table-toggle svg{\r\n    display: none;\r\n}\r\n\r\n.as-printer-content .as-tree-table-head-cell,\r\n.as-printer-content .as-tree-table-cell{\r\n    border-color: black;\r\n}\r\n\r\n.as-tree-table-cell>span:first-child:last-child{\r\n    page-break-inside: avoid;\r\n    break-inside: avoid;\r\n}\r\n\r\n@media print {\r\n    div[align=\"center\"]> .as-tree-table{\r\n        display: block !important;\r\n    }\r\n    /*trick avoid break row*/\r\n    .as-tree-table tbody tr td:before,\r\n    .as-tree-table tbody tr td:after {\r\n        content: \"\";\r\n        height: 4px;\r\n        display: block;\r\n    }\r\n\r\n    .as-tree-table-head {\r\n        display: table-header-group  !important;\r\n    }\r\n\r\n    .as-tree-table-head + tbody tr:first-child th {\r\n        display: none;\r\n    }\r\n}", ""]);



/***/ }),

/***/ 29581:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --variant-color-primary: #007bff;\r\n    --variant-color-secondary: #6c757d;\r\n    --variant-color-success: #28a745;\r\n    --variant-color-warning: #ffc107;\r\n    --variant-color-danger: #dc3545;\r\n    --variant-color-info: #17a2b8;\r\n    --variant-color-light: #f8f9fa;\r\n    --variant-color-dark: #343a40;\r\n    --variant-color-error: #ff4052;\r\n    --variant-color-link: #007bff;\r\n    --variant-color-note: #ffff88;\r\n\r\n\r\n    --variant-medium-contract-color-primary: #e2edd5;\r\n    --variant-medium-contract-color-secondary: #fca75b;\r\n    --variant-medium-contract-color-success: #fce8e8;\r\n    --variant-medium-contract-color-info: #fcf5e8;\r\n    --variant-medium-contract-color-warning: #5e5a75;\r\n    --variant-medium-contract-color-error:#e0dfce;\r\n    --variant-medium-contract-color-danger: #e5e8d5;\r\n    --variant-medium-contract-color-light: #7a5b3c;\r\n    --variant-medium-contract-color-dark: #bf7d3b;\r\n    --variant-medium-contract-color-link: #dde8c9;\r\n    --variant-medium-contract-color-note: #1e1ec8;\r\n}", ""]);



/***/ }),

/***/ 91652:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ":root {\r\n    --as-vertical-timeline-item-height: 40px;\r\n}\r\n\r\n.as-vertical-timeline {\r\n    display: inline-block;\r\n    color: white;\r\n    font-size: 14px;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    text-align: left;\r\n    padding: 5px;\r\n}\r\n\r\n.as-vertical-timeline-item {\r\n    height: var(--as-vertical-timeline-item-height);\r\n    white-space: nowrap;\r\n}\r\n\r\n.as-vertical-timeline-item.as-inactive {\r\n    color: rgba(200, 200, 200, 0.5);\r\n}\r\n\r\n.as-vertical-timeline-item.as-active .as-vertical-timeline-tile {\r\n    text-shadow: 1px 0 0 currentColor;\r\n}\r\n\r\n.as-vertical-timeline-item:not(:first-child) .as-vertical-timeline-icon-ctn::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    height: calc(var(--as-vertical-timeline-item-height) - 30px);\r\n    border-left: 2px solid currentColor;\r\n    position: absolute;\r\n    left: calc(50% - 1px);\r\n    bottom: calc(100% + 2px);\r\n}\r\n\r\n\r\n.as-vertical-timeline-icon-ctn {\r\n    display: inline-block;\r\n    margin-right: 20px;\r\n    position: relative;\r\n    vertical-align: middle;\r\n\r\n}\r\n\r\n.as-vertical-timeline-icon-ctn span {\r\n    font-size: 24px;\r\n}\r\n\r\n\r\n.as-vertical-timeline-tile {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n\r\n}\r\n\r\n\r\n/*//check-circle*/", ""]);



/***/ }),

/***/ 43034:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-vertical-tree-diagram {\r\n    --node-name-max-width: 200px;\r\n}\r\n\r\n\r\n.as-vertical-tree-diagram-node {\r\n\r\n}\r\n\r\n.template-ctn {\r\n    display: none;\r\n}\r\n\r\n.as-vertical-tree-diagram-node, .as-vertical-tree-diagram-node * {\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-vertical-tree-diagram-node {\r\n    display: inline-block;\r\n    vertical-align: top;\r\n    position: relative;\r\n    background: white;\r\n}\r\n\r\n.as-vertical-tree-diagram-child-ctn > .as-vertical-tree-diagram-node:not(:first-child) {\r\n    margin-left: 10px;\r\n}\r\n\r\n.as-vertical-tree-diagram-node-name-ctn {\r\n    text-align: center;\r\n    padding-bottom: 9px;\r\n}\r\n\r\n.as-vertical-tree-diagram-node-name {\r\n    display: inline-block;\r\n    padding: 5px;\r\n    border: 1px solid #333;\r\n    position: relative;\r\n    white-space: normal;\r\n    max-width: var(--node-name-max-width);\r\n}\r\n\r\n.as-vertical-tree-diagram-node.as-has-child > .as-vertical-tree-diagram-node-name-ctn .as-vertical-tree-diagram-node-name::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    height: 10px;\r\n    left: 50%;\r\n    top: 100%;\r\n    border-left: 1px solid #333;\r\n}\r\n\r\n.as-vertical-tree-diagram-node.as-has-child.as-has-1-child > .as-vertical-tree-diagram-node-name-ctn .as-vertical-tree-diagram-node-name::before {\r\n    height: 20px;\r\n}\r\n\r\n.as-vertical-tree-diagram-child-ctn {\r\n    padding-top: 10px;\r\n\r\n}\r\n\r\n.as-vertical-tree-diagram-node:not(.as-has-1-child) > .as-vertical-tree-diagram-child-ctn {\r\n    border-top: 1px solid #333;\r\n}\r\n\r\n.as-vertical-tree-diagram-node:not(.as-has-child) > .as-vertical-tree-diagram-child-ctn {\r\n    display: none;\r\n}\r\n\r\n.as-vertical-tree-diagram-child-ctn > .as-vertical-tree-diagram-node::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    z-index: 1;\r\n    left: 50%;\r\n    bottom: 100%;\r\n    height: 10px;\r\n    border-left: 1px solid black;\r\n}\r\n\r\n.as-vertical-tree-diagram-node.as-has-1-child > .as-vertical-tree-diagram-child-ctn > .as-vertical-tree-diagram-node::before,\r\n.as-vertical-tree-diagram-node.as-has-1-child > .as-vertical-tree-diagram-child-ctn > .as-vertical-tree-diagram-node::after {\r\n    display: none;\r\n}\r\n\r\n\r\n.as-vertical-tree-diagram-child-ctn > .as-vertical-tree-diagram-node:last-child::before {\r\n    left: unset;\r\n    right: 50%;\r\n}\r\n\r\n\r\n.as-vertical-tree-diagram-child-ctn > .as-vertical-tree-diagram-node:first-child::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    z-index: 2;\r\n    right: 50%;\r\n    left: 0;\r\n    bottom: 100%;\r\n    height: 11px;\r\n    background-color: white;\r\n}\r\n\r\n.as-vertical-tree-diagram-child-ctn > .as-vertical-tree-diagram-node:last-child::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    z-index: 2;\r\n    left: 50%;\r\n    right: 0;\r\n    bottom: 100%;\r\n    height: 11px;\r\n    background-color: white;\r\n}\r\n\r\n.as-vertical-tree-diagram-child-ctn > .as-vertical-tree-diagram-node:first-child:last-child::after {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 45930:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "\r\n.as-video-url-dialog-url {\r\n    max-width: calc(100vw - 8em - 40px);\r\n    width: 500px;\r\n    min-height: 30px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-video-url-dialog input[type=\"number\"] {\r\n    width: 5em;\r\n}\r\n\r\n.as-video-url-dialog-row> label {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: 6em;\r\n}\r\n\r\n.as-video-url-dialog-row {\r\n    padding-bottom: 10px;\r\n    white-space: pre;\r\n}\r\n\r\n.as-video-url-dialog-row > * {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-video-url-dialog-video-image{\r\n    max-width: 200px;\r\n    max-height: 200px;\r\n\r\n}", ""]);



/***/ }),

/***/ 33122:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "/*margin for border size*/\r\n.as-vruler {\r\n    position: relative;\r\n    width: 1.5em;\r\n    border: solid 1px black;\r\n    overflow: hidden;\r\n    font-family: courier, \"courier new\", monospace;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.as-vruler-line {\r\n    position: absolute;\r\n    right: 0;\r\n    width: 25%;\r\n    border-top: solid 1px rgb(17, 48, 43);\r\n    box-sizing: border-box;\r\n\r\n}\r\n\r\n.as-vruler-line.major {\r\n    width: 50%;\r\n    border-top: solid 1px rgb(5, 20, 18);\r\n}\r\n\r\n.as-vruler-major-number {\r\n    position: absolute;\r\n    text-align: center;\r\n    width:  5em;\r\n    pointer-events: none;\r\n    font-size: 0.7em;\r\n    right: calc(52% - 2em);\r\n    height: 1em;\r\n    transform-origin: center;\r\n    \r\n    -webkit-transform:rotate(90deg);\r\n    -moz-transform:rotate(90deg);\r\n    -o-transform: rotate(90deg);\r\n    -ms-transform:rotate(90deg);\r\n    transform: rotate(-90deg);\r\n}", ""]);



/***/ }),

/***/ 22839:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-width-height-resizer {\r\n    position: relative;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-width-height-resizer-anchor-bot-right {\r\n    cursor: nwse-resize;\r\n    position: absolute;\r\n    z-index: 1;\r\n    right: 0;\r\n    bottom: 0;\r\n    height: 13px;\r\n    width: 13px;\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAQUlEQVQoz2NgIBGkpaX9Z2IgA9BWU1pa2n+S/UGSZnRFBDVhU4BXEy4bcGrC5ySsmgj5AUMTMZ4mOehhmhjJ0QkA9TYwPsqIBKMAAAAASUVORK5CYII=');\r\n}\r\n\r\n.absol-width-height-resizer-anchor-bot-left {\r\n    cursor: nesw-resize;\r\n    position: absolute;\r\n    z-index: 1;\r\n    left: 0;\r\n    bottom: 0;\r\n    height: 13px;\r\n    width: 13px;\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAABCSURBVChTY0hLS/vPQCJggtIkAco0keRMZMVEa0RXSJRGbIoIaoQpIMlGZEmiNRJSiFUjNkGCGrGaRAAwkq6JgQEAnaEwPtyU/MEAAAAASUVORK5CYII=');\r\n}\r\n\r\n.absol-width-height-resizer-anchor-top-right {\r\n    cursor: nesw-resize;\r\n    position: absolute;\r\n    z-index: 1;\r\n    right: 0;\r\n    top: 0;\r\n    height: 13px;\r\n    width: 13px;\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAABMSURBVChTY0xLS/vPQGsAsoQJygYDdFuJdgUhjTgNwqcQpyYQwKURryYQwKaAoCYQwGUjQYCskGhNIABTTJImGABpQolcYgEZmhgYAEPpMD56IPESAAAAAElFTkSuQmCC')\r\n}\r\n\r\n.absol-width-height-resizer-anchor-top-left {\r\n    cursor: nwse-resize;\r\n    position: absolute;\r\n    z-index: 1;\r\n    top: 0;\r\n    left: 0;\r\n    height: 13px;\r\n    width: 13px;\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAABNSURBVChTnZFbCgAgCAStw3r/GxQLClaSj/kJckcFBzMvqtKRprwHd6OncRRwN7GfKQFoIS0Ar/gVQGmCYkMpAWgwLYBSWHCPG9GQiDbsRTA+Srvt5gAAAABJRU5ErkJggg==');\r\n}\r\n\r\n.absol-width-height-resizer-content {\r\n    width: 100%;\r\n    height: 100%;\r\n    overflow: auto;\r\n}\r\n\r\n/* .absol-width-height-resizer */", ""]);



/***/ }),

/***/ 58542:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".brace-diff {\r\n    position: relative;\r\n}\r\n\r\n\r\n.brace-diff-left-container {\r\n    position: absolute;\r\n    left: 0;\r\n    width: calc(50% - 3.5em);\r\n    top: 0;\r\n    bottom: 0;\r\n    background: gray;\r\n}\r\n\r\n\r\n.brace-diff-right-container {\r\n    right: 0;\r\n    position: absolute;\r\n    width: calc(50% - 3.5em);\r\n    top: 0;\r\n    bottom: 0;\r\n    background: gray;\r\n    \r\n}\r\n\r\n.brace-diff-middle-tool-container{\r\n    position: absolute;\r\n    left:calc(50% - 3.5em - 19px) ;\r\n    right: calc(50% - 3.5em - 19px);\r\n    top: 0;\r\n    bottom: 0;\r\n    z-index: 9;\r\n    pointer-events: none;\r\n}\r\n\r\n.brace-diff-middle-tool{\r\n    position: relative;\r\n    width: 100%;\r\n    height: 100%;\r\n    overflow: hidden;\r\n}\r\n\r\n.brace-diff-left-container>pre,\r\n.brace-diff-right-container>pre {\r\n    width: 100%;\r\n    height: 100%;\r\n    margin: 0;\r\n}\r\n\r\n.brace-diff-foreground {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    z-index: 7;\r\n    pointer-events: none;\r\n}\r\n\r\n.brace-diff-foreground>svg {\r\n    /*todo*/\r\n    margin: 0;\r\n    pointer-events: none;\r\n}\r\n\r\npath.brace-diff-gap{\r\n    fill:rgba(9, 205, 231, 0.1);\r\n    stroke:rgba(8, 73, 82, 0.5);\r\n    stroke-width: 1;\r\n}\r\n\r\nbutton.brace-diff-arrow{\r\n    height: 14px;\r\n    width: 19px; \r\n    padding: 0;\r\n    position: absolute;\r\n    outline: none;\r\n    border: solid 1px rgba(169, 169, 169,1); \r\n    background-color: white;\r\n    pointer-events: all;\r\n    \r\n}\r\n\r\nbutton.brace-diff-arrow.pick-left{\r\n    left: 0;\r\n}\r\n\r\nbutton.brace-diff-arrow.pick-left >svg{\r\n    fill:rgb(226, 35, 35);\r\n}\r\n\r\nbutton.brace-diff-arrow.pick-right >svg{\r\n    fill:rgb(35, 134, 226);\r\n}\r\n\r\nbutton.brace-diff-arrow.pick-right{\r\n    right: 0;\r\n}\r\n\r\nbutton.brace-diff-arrow> svg{\r\n    height:  12px;\r\n    width: 12px;\r\n}", ""]);



/***/ }),

/***/ 67597:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".ace_editor  ::-webkit-scrollbar {\r\n    width: 17px;\r\n}   \r\n\r\n/* Track */\r\n.ace_editor  ::-webkit-scrollbar-track {\r\n    background: rgba(169, 169, 169, 0.1);\r\n}\r\n\r\n/* Handle */\r\n.ace_editor  ::-webkit-scrollbar-thumb {\r\n    background: rgba(169, 169, 169, 0.3);\r\n}\r\n\r\n/* Handle on hover */\r\n.ace_editor  ::-webkit-scrollbar-thumb:hover {\r\n    background: rgba(85, 85, 85, 0.445);\r\n}\r\n\r\n\r\n.ace_editor div {\r\n    scrollbar-color:  rgba(169, 169, 169, 0.3) rgba(169, 169, 169, 0.1);\r\n}\r\n\r\n\r\n.ace_window_box .as-flexicon-button:focus{\r\n    box-shadow: 0 0  2px 2px rgba(95,173,217,0.79);\r\n    -webkit-box-shadow: 0 0  2px 2px rgba(95,173,217,0.79);\r\n    -moz-box-shadow: 0 0 2px 2px rgba(95,173,217,0.79);\r\n}\r\n\r\n\r\n.ace_window_box .material-icons.close{\r\n    font-size: 1em;\r\n}\r\n.ace_window_box .material-icons.close:hover{\r\n    color: red;\r\n}", ""]);



/***/ }),

/***/ 32331:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".absol-color-picker {\r\n    user-select: none;\r\n    height: 19em;\r\n    width: 20em;\r\n    position: relative;\r\n    background-color: white;\r\n    /* background-color: rgb(45, 45, 49); */\r\n    color: rgb(26, 26, 46);\r\n    border-radius: 0.4em;\r\n    padding: 0.7em;\r\n    display: inline-block;\r\n    border: solid 1px rgba(139, 139, 169, 0.733);\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    -webkit-box-shadow: 2px 2px 17px -1px rgba(0, 0, 0, 0.54);\r\n    -moz-box-shadow: 2px 2px 17px -1px rgba(0, 0, 0, 0.54);\r\n    box-shadow: 2px 2px 17px -1px rgba(0, 0, 0, 0.54);\r\n}\r\n\r\n.absol-color-picker.with-alpha {\r\n    width: 23em;\r\n}\r\n\r\n.absol-color-picker.with-alpha .absol-color-picker-color,\r\n.absol-color-picker.with-alpha .absol-color-picker-input {\r\n    right: 8em;\r\n}\r\n\r\n\r\n.absol-color-picker,\r\n.absol-color-picker * {\r\n    box-sizing: border-box;\r\n}\r\n\r\n.absol-color-picker-color {\r\n    z-index: 1;\r\n    position: absolute;\r\n    left: 1em;\r\n    right: 5em;\r\n    top: 1em;\r\n    bottom: 4em;\r\n    padding: 0;\r\n    border: solid 1px rgb(220, 220, 220);\r\n    border-bottom-width: 2px;\r\n    box-sizing: content-box;\r\n}\r\n\r\n.absol-color-picker-sat {\r\n    box-sizing: content-box;\r\n    width: 100%;\r\n    height: 100%;\r\n    background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));\r\n    background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));\r\n    background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\r\n    background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\r\n    background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\r\n    background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));\r\n    -ms-filter: \"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)\";\r\n    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');\r\n}\r\n\r\n.absol-color-picker-val {\r\n    position: relative;\r\n    width: 100%;\r\n    height: 100%;\r\n    box-sizing: content-box;\r\n    background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));\r\n    background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));\r\n    background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\r\n    background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\r\n    background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\r\n    background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));\r\n    -ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)\";\r\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');\r\n}\r\n\r\n.absol-color-dragger {\r\n    border: solid 1px rgb(160, 160, 160);\r\n    box-shadow: inset 0px 0px 0.4em 0.1em rgba(255, 255, 255, 0.7);\r\n}\r\n\r\n.absol-color-picker-val .absol-color-dragger {\r\n    position: absolute;\r\n    z-index: 10;\r\n    width: 1em;\r\n    height: 1em;\r\n    border: solid 1px rgb(160, 160, 160);\r\n    bottom: 0;\r\n    left: 0;\r\n    margin-top: -0.5em;\r\n    margin-bottom: -0.5em;\r\n    margin-left: -0.5em;\r\n    margin-right: -0.5em;\r\n    border-radius: 50%;\r\n    box-shadow: inset 0px 0px 0.4em 0.1em rgba(255, 255, 255, 0.7);\r\n}\r\n\r\n.absol-color-picker-hue-range {\r\n    position: absolute;\r\n    top: 1em;\r\n    right: 1.5em;\r\n    bottom: 4em;\r\n    width: 1.7em;\r\n}\r\n\r\n.absol-color-picker-hue {\r\n    position: relative;\r\n    width: 100%;\r\n    height: 100%;\r\n    border: inset 1px rgba(220, 220, 225);\r\n    background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\r\n}\r\n\r\n.absol-color-picker-hue .absol-color-dragger,\r\n.absol-color-picker-alpha .absol-color-dragger {\r\n    position: absolute;\r\n    height: 0.6em;\r\n    left: -0.3em;\r\n    right: -0.3em;\r\n    top: 0%;\r\n    margin-top: -0.3em;\r\n    margin-bottom: -0.3em;\r\n    border-width: 0.1em;\r\n}\r\n\r\n.absol-color-picker-alpha {\r\n    position: relative;\r\n    width: 100%;\r\n    height: 100%;\r\n    background-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));\r\n}\r\n\r\n.absol-color-picker-alpha-range,\r\n.absol-color-picker-input {\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAaSURBVBhXYzh8+PD///8hJAOcBSRxyRw+DABJUCox2kjvSgAAAABJRU5ErkJggg==');\r\n    background-size: 1.5em;\r\n    image-rendering: optimizeSpeed;\r\n    /* STOP SMOOTHING, GIVE ME SPEED  */\r\n    image-rendering: -moz-crisp-edges;\r\n    /* Firefox                        */\r\n    image-rendering: -o-crisp-edges;\r\n    /* Opera                          */\r\n    image-rendering: -webkit-optimize-contrast;\r\n    /* Chrome (and eventually Safari) */\r\n    image-rendering: pixelated;\r\n    /* Chrome */\r\n    image-rendering: optimize-contrast;\r\n    /* CSS3 Proposed                  */\r\n    -ms-interpolation-mode: nearest-neighbor;\r\n    /* IE8+                           */\r\n}\r\n\r\n.absol-color-picker-alpha-range {\r\n    position: absolute;\r\n    right: 4.5em;\r\n    top: 1em;\r\n    bottom: 4em;\r\n    width: 1.7em;\r\n}\r\n\r\n.absol-color-picker:not(.with-alpha) .absol-color-picker-alpha-range {\r\n    display: none;\r\n}\r\n\r\n.absol-color-picker-input {\r\n    position: absolute;\r\n    left: 1em;\r\n    bottom: 1em;\r\n    right: 5em;\r\n    height: 2em;\r\n}\r\n\r\n.absol-color-picker-text-container {\r\n    background-color: transparent;\r\n    outline: none;\r\n    border: none;\r\n    width: 100%;\r\n    height: 100%;\r\n    color: rgb(230, 230, 235);\r\n    text-align: center;\r\n    font-size: 1em;\r\n    background-color: #000;\r\n}\r\n\r\n.absol-color-picker-text-container> span,\r\n.absol-color-picker-text-container> div{\r\n    line-height: 2.5;\r\n    font-size: 0.8em;\r\n}\r\n\r\n.absol-color-picker-mode {\r\n    position: absolute;\r\n    right: 1em;\r\n    bottom: 1em;\r\n    height: 2em;\r\n    width: 3em;\r\n    box-sizing: border-box;\r\n    font-size: 1em;\r\n    border: none;\r\n    outline: none;\r\n    background-color: rgb(243, 243, 243);\r\n    color: rgb(21, 21, 34);\r\n}\r\n\r\n.absol-color-picker.with-alpha .absol-color-picker-mode {\r\n    right: 2.5em;\r\n    width: 3.7em;\r\n}", ""]);



/***/ }),

/***/ 98459:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-color-picker-button {\r\n    width: 45px;\r\n    height: 30px;\r\n    border-radius: 3px;\r\n    border: 1px solid #d6d6d6;\r\n    background-color: transparent;\r\n    padding: 5px;\r\n    outline: none;\r\n}\r\n\r\n.as-color-picker-button-inner {\r\n    height: 100%;\r\n    width: 100%;\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAaSURBVBhXYzh8+PD///8hJAOcBSRxyRw+DABJUCox2kjvSgAAAABJRU5ErkJggg==');\r\n    background-size: 1.5em;\r\n    image-rendering: optimizeSpeed;\r\n    /* STOP SMOOTHING, GIVE ME SPEED  */\r\n    image-rendering: -moz-crisp-edges;\r\n    /* Firefox                        */\r\n    image-rendering: -o-crisp-edges;\r\n    /* Opera                          */\r\n    image-rendering: -webkit-optimize-contrast;\r\n    /* Chrome (and eventually Safari) */\r\n    image-rendering: pixelated;\r\n    /* Chrome */\r\n    image-rendering: optimize-contrast;\r\n    /* CSS3 Proposed                  */\r\n    -ms-interpolation-mode: nearest-neighbor;\r\n    /* IE8+                           */\r\n}\r\n\r\n.as-color-picker-button-inner-value {\r\n    width: 100%;\r\n    height: 100%;\r\n}\r\n\r\n.as-color-picker-button-fol{\r\n    z-index: 1000;\r\n}", ""]);



/***/ }),

/***/ 16599:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-solid-color-picker:not(.as-solid-color-picker-mode-swatches) .as-solid-color-picker-swatches-select-ctn,\r\n.as-solid-color-picker:not(.as-solid-color-picker-mode-swatches) .as-solid-color-picker-swatches-ctn,\r\n.as-solid-color-picker:not(.as-solid-color-picker-mode-picker) .as-solid-color-picker-spectrum,\r\n.as-solid-color-picker:not(.as-solid-color-picker-mode-picker) .as-solid-color-picker-hue,\r\n.as-solid-color-picker:not(.as-solid-color-picker-mode-picker) .as-solid-color-picker-alpha,\r\n.as-solid-color-picker:not(.as-solid-color-picker-mode-picker) .as-solid-color-picker-near {\r\n    display: none;\r\n}\r\n\r\n.as-solid-color-picker:not(.as-has-opacity) .as-solid-color-picker-color-opacity,\r\n.as-solid-color-picker:not(.as-has-opacity) .as-solid-color-picker-alpha {\r\n    visibility: hidden;\r\n}\r\n\r\n.as-solid-color-picker .as-hanger {\r\n    user-select: none;\r\n    touch-action: none;\r\n    -webkit-user-select: none;\r\n    -moz-user-select: none;\r\n    -ms-user-select: none;\r\n}\r\n\r\n.as-solid-color-picker {\r\n    display: inline-block;\r\n    border: 1px solid black;\r\n    font-size: 12px;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    outline: none;\r\n    background-color: white;\r\n}\r\n\r\n.as-solid-color-picker-body {\r\n    padding-bottom: 10px;\r\n    padding-left: 10px;\r\n    padding-right: 10px;\r\n    box-sizing: border-box;\r\n    border-bottom: 1px solid #dddddd;\r\n}\r\n\r\n.as-solid-color-picker-header {\r\n    padding: 10px;\r\n}\r\n\r\n.as-solid-color-picker-mode {\r\n    font-size: 0.9em;\r\n}\r\n\r\n.as-solid-color-picker-mode button {\r\n    height: 1.5em;\r\n    min-width: 7em;\r\n}\r\n\r\n.as-solid-color-picker-swatches-name {\r\n    color: #006ce5;\r\n    text-decoration: underline;\r\n    cursor: pointer;\r\n}\r\n\r\n.as-solid-color-picker-swatches-select-ctn {\r\n    line-height: 2em;\r\n}\r\n\r\n.as-solid-color-picker-swatches-ctn {\r\n    overflow-y: auto;\r\n    width: 20em;\r\n    height: 20em;\r\n    box-sizing: content-box;\r\n}\r\n\r\n.as-solid-color-picker-swatches-ctn .as-swatches-table {\r\n    width: 100%;\r\n}\r\n\r\n.as-solid-color-picker-swatches-ctn .as-swatches-table-row,\r\n.as-solid-color-picker-recent-swatches-ctn .as-swatches-table-row {\r\n    height: 2em;\r\n}\r\n\r\n.as-solid-color-picker-recent-swatches-ctn .as-swatches-table-cell {\r\n    width: 1.6666666em;\r\n}\r\n\r\n\r\n.as-solid-color-picker-recent-title {\r\n    line-height: 1.5em;\r\n    margin-top: 0.5em;\r\n    font-weight: bold;\r\n}\r\n\r\n.as-solid-color-picker-recent-swatches-ctn {\r\n    overflow-y: auto;\r\n    width: 20em;\r\n    height: 4em;\r\n    box-sizing: content-box;\r\n}\r\n\r\n.as-solid-color-picker-footer {\r\n    padding: 10px;\r\n}\r\n\r\n.as-solid-color-picker-footer .as-flexicon-button {\r\n    font-size: inherit;\r\n    height: 2em;\r\n    box-sizing: border-box;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-solid-color-picker-selected-ctn {\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAaSURBVBhXYzh8+PD///8hJAOcBSRxyRw+DABJUCox2kjvSgAAAABJRU5ErkJggg==');\r\n    background-size: 1.5em;\r\n    image-rendering: optimizeSpeed;\r\n    image-rendering: -moz-crisp-edges;\r\n    image-rendering: -o-crisp-edges;\r\n    image-rendering: -webkit-optimize-contrast;\r\n    image-rendering: pixelated;\r\n    image-rendering: optimize-contrast;\r\n    -ms-interpolation-mode: nearest-neighbor;\r\n\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.as-solid-color-picker-selected {\r\n    height: 2em;\r\n    width: 5em;\r\n    border: 1px solid #ddd;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-solid-color-picker-color-hex,\r\n.as-solid-color-picker-color-opacity {\r\n    font-size: inherit;\r\n    width: 6em;\r\n}\r\n\r\n.as-flexicon-input.as-solid-color-picker-color-opacity.as-flexicon-input-has-icon.as-flexicon-input-has-unit input {\r\n    width: calc(100% - 4em);\r\n}\r\n\r\n\r\n/*.as-solid-color-picker-color-hex input {*/\r\n/*    padding-left: 0;*/\r\n/*    padding-right: 0;*/\r\n/*}*/\r\n\r\n.as-solid-color-picker-color-opacity input {\r\n    padding-left: 0;\r\n    padding-right: 0;\r\n}\r\n\r\n.as-solid-color-picker-footer *:not(:first-child) {\r\n    margin-left: 0.5em;\r\n}\r\n\r\n.as-swatches-table-cell .as-solid-color-picker-selected-dot {\r\n    left: calc(50% - 0.5em);\r\n    top: calc(50% - 0.5em);\r\n}\r\n\r\n.as-solid-color-picker-selected-dot {\r\n    position: absolute;\r\n    width: 1em;\r\n    height: 1em;\r\n    box-shadow: inset 0px 0px 0.3em 0.125em rgba(255, 255, 255, 0.7);\r\n    z-index: 1;\r\n    border-radius: 50%;\r\n}\r\n\r\n\r\n.as-solid-color-picker-spectrum {\r\n    width: 20em;\r\n    height: 13.3em;\r\n    background-color: red;\r\n    position: relative;\r\n}\r\n\r\n.as-solid-color-picker-spectrum-dot {\r\n    width: 1em;\r\n    height: 1em;\r\n    box-shadow: inset 0px 0px 0.3em 0.125em rgba(0, 0, 0, 0.7);\r\n    z-index: 1;\r\n    border-radius: 50%;\r\n    position: absolute;\r\n    bottom: calc(100% - 0.5em);\r\n    left: calc(100% - 0.5em);\r\n}\r\n\r\n\r\n.as-solid-color-picker-hue {\r\n    width: 20em;\r\n    height: 2em;\r\n    background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\r\n    position: relative;\r\n}\r\n\r\n.as-solid-color-picker-hue-dot {\r\n    width: 1em;\r\n    height: 1em;\r\n    box-shadow: inset 0px 0px 0.3em 0.125em rgba(0, 0, 0, 0.7);\r\n    z-index: 1;\r\n    border-radius: 50%;\r\n    position: absolute;\r\n    top: calc(50% - 0.5em);\r\n    left: calc(0% - 0.5em);\r\n}\r\n\r\n\r\n.as-solid-color-picker-alpha {\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAaSURBVBhXYzh8+PD///8hJAOcBSRxyRw+DABJUCox2kjvSgAAAABJRU5ErkJggg==');\r\n    background-size: 1.5em;\r\n    image-rendering: optimizeSpeed;\r\n    image-rendering: -moz-crisp-edges;\r\n    image-rendering: -o-crisp-edges;\r\n    image-rendering: -webkit-optimize-contrast;\r\n    image-rendering: pixelated;\r\n    image-rendering: optimize-contrast;\r\n    -ms-interpolation-mode: nearest-neighbor;\r\n\r\n    width: 20em;\r\n    height: 2em;\r\n    position: relative;\r\n}\r\n\r\n.as-solid-color-picker-alpha-color {\r\n    background: linear-gradient(to right, rgba(255, 0, 0, 0.0) 0%, rgba(255, 0, 0, 1) 100%);\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n}\r\n\r\n.as-solid-color-picker-alpha-dot {\r\n    width: 1em;\r\n    height: 1em;\r\n    box-shadow: inset 0px 0px 0.3em 0.125em rgba(0, 0, 0, 0.7);\r\n    z-index: 1;\r\n    border-radius: 50%;\r\n    position: absolute;\r\n    top: calc(50% - 0.5em);\r\n    left: calc(100% - 0.5em);\r\n}\r\n\r\n\r\n.as-solid-color-picker-near {\r\n    margin-top: 0.5em;\r\n    width: 20em;\r\n    height: 4.2em;\r\n}\r\n\r\n.as-solid-color-picker-near .as-swatches-table-cell-color {\r\n    transition: transform 0.1s;\r\n}\r\n\r\n\r\n.as-solid-color-picker-near .as-swatches-table-cell-color:hover {\r\n    transform: scale(1.2);\r\n    z-index: 2;\r\n}", ""]);



/***/ }),

/***/ 67902:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-spectrum-color {\r\n    position: relative;\r\n    touch-action: none;\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n}\r\n\r\n.as-spectrum-color-sat {\r\n    width: 100%;\r\n    height: 100%;\r\n    box-sizing: content-box;\r\n    background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));\r\n    background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));\r\n    background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\r\n    background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\r\n    background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));\r\n    background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));\r\n    -ms-filter: \"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)\";\r\n    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');\r\n}\r\n\r\n\r\n.as-spectrum-color-val {\r\n    width: 100%;\r\n    height: 100%;\r\n    box-sizing: content-box;\r\n    background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));\r\n    background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));\r\n    background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\r\n    background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\r\n    background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));\r\n    background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));\r\n    -ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)\";\r\n    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');\r\n}", ""]);



/***/ }),

/***/ 66559:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-swatches-table {\r\n    display: table;\r\n    table-layout: fixed;\r\n}\r\n\r\n.as-swatches-table-row {\r\n    display: table-row;\r\n}\r\n\r\n\r\n.as-swatches-table-cell {\r\n    position: relative;\r\n    display: table-cell;\r\n    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAaSURBVBhXYzh8+PD///8hJAOcBSRxyRw+DABJUCox2kjvSgAAAABJRU5ErkJggg==');\r\n    background-size: 1.5em;\r\n    image-rendering: optimizeSpeed;\r\n    /* STOP SMOOTHING, GIVE ME SPEED  */\r\n    image-rendering: -moz-crisp-edges;\r\n    /* Firefox                        */\r\n    image-rendering: -o-crisp-edges;\r\n    /* Opera                          */\r\n    image-rendering: -webkit-optimize-contrast;\r\n    /* Chrome (and eventually Safari) */\r\n    image-rendering: pixelated;\r\n    /* Chrome */\r\n    image-rendering: optimize-contrast;\r\n    /* CSS3 Proposed                  */\r\n    -ms-interpolation-mode: nearest-neighbor;\r\n    /* IE8+                           */\r\n}\r\n\r\n.as-swatches-table-cell-color {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n}", ""]);



/***/ }),

/***/ 34454:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-blink-modal {\r\n    left: 10px;\r\n    right: 10px;\r\n    position: fixed;\r\n    --hide-top: -1000px;\r\n    --show-top: 10px;\r\n    top: var(--hide-top);\r\n    z-index: -10000000;\r\n    border-radius: 10px;\r\n    overflow: hidden;\r\n    backdrop-filter: blur(1.5rem);\r\n    -webkit-backdrop-filter: blur(1.5rem);\r\n    background-color: rgba(228, 228, 228, 0.6);\r\n    -webkit-box-shadow: 10px 9px 29px -2px rgba(0,0,0,0.3);\r\n    -moz-box-shadow: 10px 9px 29px -2px rgba(0,0,0,0.3);\r\n    box-shadow: 10px 9px 29px -2px rgba(0,0,0,0.3);\r\n    padding: 25px;\r\n    visibility: hidden;\r\n    opacity: 0;\r\n}\r\n\r\n.am-blink-modal.am-animation {\r\n    z-index: 10000000;\r\n    visibility: visible;\r\n    opacity: 1;\r\n    transition: top cubic-bezier(.59, .01, .2, .99) 0.2s;\r\n}\r\n\r\n\r\n.am-blink-modal.am-show {\r\n    top: var(--show-top);\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n", ""]);



/***/ }),

/***/ 99322:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-bottom-tabbar {\r\n    position: fixed;\r\n    bottom: 0;\r\n    left: 0;\r\n    right: 0;\r\n    -webkit-box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.52);\r\n    -moz-box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.52);\r\n    box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.25);\r\n    /*filter: drop-shadow(0 0 0.75rem rgba(0, 0, 0, 0.25));*/\r\n    background-color: white;\r\n    z-index: 100;\r\n    font-size: 1rem;\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n    height: 3rem;\r\n}\r\n\r\n.am-bottom-tabbar-line {\r\n    left: 40%;\r\n    width: 20%;\r\n    top: 0;\r\n    position: absolute;\r\n    border-top: 2px solid rgb(47, 147, 246);\r\n    box-sizing: border-box;\r\n    transition: left cubic-bezier(.47, 0, .4, 1) 0.1s;\r\n}\r\n\r\n.am-bottom-tabbar-content {\r\n    width: 100%;\r\n    display: table;\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    z-index: 5;\r\n}\r\n\r\n.am-bottom-tabbar-content-row {\r\n    display: table-row;\r\n}\r\n\r\n\r\n.am-bottom-tabbar-item {\r\n    display: table-cell;\r\n    text-align: center;\r\n    color: rgb(96, 96, 96);\r\n    transition: color cubic-bezier(.47, 0, .4, 1) 0.2s;\r\n    position: relative;\r\n}\r\n\r\n.am-bottom-tabbar-item.am-active {\r\n    color: rgb(47, 147, 246);\r\n\r\n}\r\n\r\n\r\n.am-bottom-tabbar-item > span {\r\n    font-size: 2em;\r\n    line-height: 1.5;\r\n}\r\n\r\n.am-bottom-tabbar-item-counter {\r\n    height: 1.4em;\r\n    left: calc(50% + 0.33em);\r\n    top: calc(50% - 1em);\r\n    font-size: 0.8em;\r\n    position: absolute;\r\n    min-width: 1.0em;\r\n    border-radius: 0.7em;\r\n    z-index: 1;\r\n    text-align: center;\r\n    background-color: rgb(254, 80, 81);\r\n    line-height: 1.4em;\r\n    color: white;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    padding-left: 0.2em;\r\n    padding-right: 0.2em;\r\n    box-sizing: content-box;\r\n}\r\n\r\n.am-bottom-tabbar-item-counter:empty {\r\n    display: none;\r\n}\r\n\r\n.am-bottom-tabbar-sub-item-ctn {\r\n    position: absolute;\r\n    left: 0;\r\n    right:0 ;\r\n    bottom: 0;\r\n    z-index: 1;\r\n    height: 3rem;\r\n    transition: all 200ms cubic-bezier(0.805, 0.125, 0.025, 1.325); /* custom */\r\n    transition-timing-function: cubic-bezier(0.805, 0.125, 0.025, 1.325); /* custom */\r\n    text-align: center;\r\n}\r\n\r\n.am-bottom-tabbar-sub-item-ctn.am-prepare-appear {\r\n    bottom: 0;\r\n    visibility: hidden;\r\n}\r\n\r\n\r\n.am-bottom-tabbar-sub-item-ctn.am-appear {\r\n    bottom: 3rem;\r\n}\r\n\r\n.am-bottom-tabbar-sub-item-ctn.am-prepare-disappear{\r\n    bottom: 0;\r\n}\r\n\r\n.am-bottom-tabbar-sub-item-box {\r\n    border-radius: 0.2rem;\r\n    display: inline-block;\r\n    background-color: white;\r\n    -webkit-box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.52);\r\n    -moz-box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.52);\r\n    box-shadow: 0px -2px 5px 0px rgba(0, 0, 0, 0.25);\r\n}\r\n\r\n.am-bottom-tabbar-sub-item-box .am-bottom-tabbar-item{\r\n    display: inline-block;\r\n    width: 4rem;\r\n}", ""]);



/***/ }),

/***/ 27634:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-cabinet-list {\r\n\r\n}\r\n\r\n.am-cabinet-list.am-searching .am-cabinet-item-drag{\r\n    pointer-events: none;\r\n    color: rgb(230, 230, 232);\r\n}\r\n\r\n.am-cabinet-item {\r\n    position: relative;\r\n    border-bottom: 1px solid #d6d6d6;\r\n}\r\n\r\n\r\n.am-cabinet-item:first-child {\r\n    border-top: 1px solid #d6d6d6;\r\n}\r\n\r\n\r\n\r\n\r\n.am-cabinet-item-drag {\r\n    width: 40px;\r\n    text-align: center;\r\n    display: none;\r\n    visibility: hidden;\r\n}\r\n\r\n.am-cabinet-item.as-board .am-cabinet-item-drag{\r\n    visibility: visible;\r\n}\r\n\r\n\r\n.am-cabinet-item-drag > i {\r\n    color: inherit;\r\n}\r\n\r\n.am-cabinet-list.am-draggable .am-cabinet-item-drag {\r\n    display: block;\r\n}\r\n\r\n.am-cabinet-item-body {\r\n    min-height: 39px;\r\n    white-space: nowrap;\r\n    display: flex;\r\n    align-items: center;\r\n    left: 0;\r\n    transition: left 0.1s;\r\n    position: relative;\r\n    background-color: white;\r\n    z-index: 3;\r\n\r\n}\r\n\r\n.am-cabinet-item.as-dragging .am-cabinet-item-body {\r\n    transition: none;\r\n}\r\n\r\n.am-cabinet-item-content {\r\n    flex-grow: 1;\r\n}\r\n\r\n.am-cabinet-item.am-flex-content .am-cabinet-item-content{\r\n    display: flex;\r\n    align-items: center;\r\n}\r\n\r\n.am-cabinet-item-quick-menu-btn {\r\n    width: 30px;\r\n    height: 30px;\r\n    background-color: transparent;\r\n    border: none;\r\n    padding: 0;\r\n    box-sizing: border-box;\r\n    transition: opacity 0.1s;\r\n    opacity: 1;\r\n    color: black;\r\n}\r\n\r\n.am-cabinet-item-quick-menu-btn i {\r\n    font-size: 20px;\r\n    color: inherit;\r\n}\r\n\r\n.am-cabinet-item-quick-menu-btn i{\r\n    font-size: var(--icon-fontsize);\r\n}\r\n\r\n\r\n.am-cabinet-item.as-board-moving {\r\n    transform: none;\r\n    left: var(--mk-navigator-bound-left) !important;\r\n}\r\n\r\n.am-cabinet-item.as-board-moving .am-cabinet-item-body {\r\n    background-color: rgb(169, 169, 172, 0.3);\r\n}\r\n\r\n.am-cabinet-item.as-board-moving .am-cabinet-item-right-action-ctn {\r\n    display: none;\r\n}\r\n\r\n.am-cabinet-item:not(.am-has-quick-menu) .am-cabinet-item-quick-menu-ctn {\r\n    display: none;\r\n}\r\n\r\n\r\n.am-cabinet-item-right-action-ctn {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    display: flex;\r\n    align-items: stretch;\r\n    transition: width 0.1s;\r\n    background-color: #ebebeb;\r\n    /*border-radius: 4px;*/\r\n    /*overflow: hidden;*/\r\n}\r\n\r\n.am-cabinet-item-right-action-ctn:empty {\r\n    display: none;\r\n}\r\n\r\n.am-cabinet-item.as-dragging .am-cabinet-item-right-action-ctn {\r\n    transition: none;\r\n}\r\n\r\n.am-cabinet-item-action {\r\n    min-width: 60px;\r\n    padding: 0 8px;\r\n    flex-grow: 1;\r\n    background-color: transparent;\r\n    border: none;\r\n}\r\n\r\n.am-cabinet-item-action:not(:first-child) {\r\n    border-left: 1px solid #dddddd;\r\n}\r\n\r\n.am-cabinet-item-action:active {\r\n    -webkit-box-shadow: inset 0 0.2em 0.25em rgba(0, 0, 0, 0.125);\r\n    box-shadow: inset 0 0.2em 0.25em rgba(0, 0, 0, 0.125);\r\n}\r\n\r\n.am-cabinet-transparent-btn {\r\n    border: none;\r\n    width: 30px;\r\n    height: 30px;\r\n    background-color: transparent;\r\n    outline: none;\r\n}", ""]);



/***/ }),

/***/ 31546:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-cabinet-tree-list {\r\n\r\n}\r\n\r\n\r\n.am-cabinet-tree-list > .am-cabinet-tree:first-child > .am-cabinet-tree-node,\r\n.am-cabinet-tree-list.am-searching .am-cabinet-tree.am-first-result>.am-cabinet-tree-node{\r\n    border-top: 1px solid #d6d6d6;\r\n}\r\n\r\n.am-cabinet-tree {\r\n\r\n}\r\n\r\n.am-cabinet-tree:not(.am-has-children) > .am-cabinet-tree-node .am-cabinet-tree-node-toggle-ctn,\r\n.am-cabinet-tree:not(.am-opened) > .am-cabinet-tree-children,\r\n.am-cabinet-tree-children:empty {\r\n    display: none;\r\n}\r\n\r\n.am-cabinet-tree-node {\r\n    border-bottom: 1px solid #d6d6d6;\r\n}\r\n\r\n\r\n.am-cabinet-tree-node-body {\r\n    position: relative;\r\n    box-sizing: border-box;\r\n    --level-padding: 0px;\r\n    padding-left: calc(40px + var(--level-padding));\r\n    /*padding-left: 1em;*/\r\n}\r\n\r\n.am-cabinet-tree-node-toggle-ctn {\r\n    box-sizing: border-box;\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: calc(40px + var(--level-padding));\r\n    text-align: right;\r\n    padding-right: 0.5em;\r\n}\r\n\r\n.am-cabinet-tree-node-toggle-ctn > span,\r\n.am-cabinet-tree-node-toggle-ctn::before {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-size: 20px;\r\n}\r\n\r\n\r\n .am-cabinet-tree-node-toggle-ctn .mdi::before{\r\n    -webkit-transform: rotate(0deg);\r\n    -ms-transform: rotate(0deg);\r\n    transform: rotate(0deg);\r\n    transition: transform 0.1s;\r\n}\r\n.am-cabinet-tree.am-opened > .am-cabinet-tree-node .am-cabinet-tree-node-toggle-ctn .mdi::before{\r\n    -webkit-transform: rotate(90deg);\r\n    -ms-transform: rotate(90deg);\r\n    transform: rotate(90deg);\r\n}\r\n\r\n.am-cabinet-tree-node-toggle-ctn::before {\r\n    content: \"\";\r\n    height: 100%;\r\n}\r\n\r\n\r\n.am-cabinet-tree-node-content {\r\n    min-height: 39px;\r\n}\r\n\r\n\r\n.am-cabinet-tree.am-flex-content > .am-cabinet-tree-node .am-cabinet-tree-node-content {\r\n    display: flex;\r\n    align-items: center;\r\n}\r\n\r\n\r\n.am-cabinet-tree-node:not(.am-has-quick-menu) .am-cabinet-tree-node-quick-menu-ctn {\r\n    display: none;\r\n}\r\n\r\n.am-cabinet-tree-node-quick-menu-ctn {\r\n    position: absolute;\r\n    right: 5px;\r\n    top: calc(50% - 15px);\r\n\r\n}\r\n\r\n\r\n.am-cabinet-tree-node.am-has-quick-menu .am-cabinet-tree-node-body {\r\n    padding-right: 40px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.am-cabinet-tree-list.am-searching .am-cabinet-tree:not(.am-in-search-result){\r\n    display: none;\r\n}\r\n\r\n.am-cabinet-tree-list.am-searching>.am-cabinet-tree:first-child .am-cabinet-tree-node{\r\n    border-top: none;\r\n}\r\n\r\n\r\n\r\n\r\n\r\n.am-cabinet-tree-list.am-searching,\r\n.am-cabinet-tree-list.am-searching .am-cabinet-tree.am-opened>.am-cabinet-tree-children {\r\n    display: flex;\r\n    flex-direction: column;\r\n    align-items: stretch;\r\n}", ""]);



/***/ }),

/***/ 66066:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "/*Moved to absol-acomp*/", ""]);



/***/ }),

/***/ 36388:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-conversation {\r\n    position: relative;\r\n    height: 5em;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.am-conversation-avatar-ctn {\r\n    position: absolute;\r\n    left: 0.625em;\r\n    top: calc(50% - 1.725em);\r\n    height: 3.5em;\r\n    width: 3.5em;\r\n}\r\n\r\n.am-conversation-avatar-ctn .am-conversation-avatar{\r\n    width: 100%;\r\n    height: 100%;\r\n} \r\n\r\n.am-conversation-bottom-line {\r\n    position: absolute;\r\n    bottom: 0;\r\n    right: 0;\r\n    left: 5em;\r\n    border-bottom: 0.5px solid #dddddd;\r\n}\r\n\r\n.am-conversation-body {\r\n    position: absolute;\r\n    left: 5em;\r\n    overflow: hidden;\r\n    right: 3em;\r\n    padding-top: 0.5em;\r\n}\r\n\r\n.am-conversation-name {\r\n    line-height: 2;\r\n}\r\n\r\n.am-conversation-short-content {\r\n    text-overflow: ellipsis;\r\n    max-width: 100%;\r\n    height: 2em;\r\n    line-height: 2;\r\n    white-space: nowrap;\r\n    overflow: hidden;\r\n    font-size: 0.825em;\r\n}\r\n\r\n.am-conversation-time-ctn {\r\n    position: absolute;\r\n    right: 0.625em;\r\n    top: 0.825em;\r\n}\r\n\r\n.am-conversation-time {\r\n    font-size: 0.75em;\r\n}\r\n\r\n\r\n\r\n.am-conversation-counter {\r\n    height: 1.4em;\r\n    right: 0.78125em;\r\n    top: 3.3em;\r\n    font-size: 0.8em;\r\n    position: absolute;\r\n    min-width: 1.0em;\r\n    border-radius: 0.7em;\r\n    z-index: 1;\r\n    background-color: black;\r\n    text-align: center;\r\n    background-color: rgb(254, 80, 81);\r\n    line-height: 1.4em;\r\n    color: white;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    padding-left: 0.2em;\r\n    padding-right: 0.2em;\r\n    box-sizing: content-box;\r\n}\r\n\r\n\r\n.am-conversation-counter:empty {\r\n    display: none;\r\n}\r\n\r\n.am-conversation.am-status-unread .am-conversation-name,\r\n.am-conversation.am-status-unread .am-conversation-short-content {\r\n    font-weight: bold;\r\n}", ""]);



/***/ }),

/***/ 34038:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "/**IN ACOMP*/\r\n", ""]);



/***/ }),

/***/ 41130:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-h-snap-scroller {\r\n    overflow-x: auto;\r\n}\r\n", ""]);



/***/ }),

/***/ 31000:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-navigator {}\r\n\r\n.am-navigator-content {\r\n    right: 100%;\r\n    top: 0;\r\n    bottom: 0;\r\n    z-index: 1001;\r\n    position: fixed;\r\n    /* touch-action: auto; */\r\n    overflow-y: scroll;\r\n}\r\n\r\n.am-navigator-content:empty {\r\n    background-color: gray;\r\n    width: 60vw;\r\n}\r\n\r\n.am-navigator-modal {\r\n    position: fixed;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: 20px;\r\n    touch-action: none;\r\n    opacity: 0.001;\r\n}\r\n\r\n.am-navigator.am-dragging {\r\n    touch-action: none;\r\n    user-select: none;\r\n}\r\n\r\n\r\n.am-navigator.am-dragging .am-navigator-modal,\r\n.am-navigator.am-open .am-navigator-modal {\r\n    width: 100%;\r\n    background-color: rgb(169, 160, 170);\r\n    z-index: 1000;\r\n}\r\n\r\n.am-navigator.am-open .am-navigator-modal {\r\n    opacity: 0.5;\r\n}", ""]);



/***/ }),

/***/ 10883:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-mat-menu-button {\r\n    font-size: inherit;\r\n    position: relative;\r\n    display: block;\r\n    padding: 0;\r\n    padding-left: 1.07142857143em;\r\n    height: 3em;\r\n    box-sizing: border-box;\r\n    align-items: center;\r\n    border: none;\r\n    outline: none;\r\n    text-align: left;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n    border-top: 1px solid #ddd;\r\n\r\n    user-select: none;\r\n    -webkit-user-select: none;\r\n    background-color: transparent;\r\n    color: black;\r\n}\r\n\r\n.am-mat-menu-button-level {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    white-space: pre;\r\n}\r\n\r\n.am-mat-menu-button:not(.am-status-close):not(.am-status-open):active {\r\n    background-color: rgb(169, 169, 169, 0.1);\r\n}\r\n\r\n\r\n.am-mat-menu-button .am-mat-menu-button-toggle-icon-ctn {\r\n    visibility: hidden;\r\n}\r\n\r\n.am-mat-menu-button.am-status-close .am-mat-menu-button-toggle-icon-ctn,\r\n.am-mat-menu-button.am-status-open .am-mat-menu-button-toggle-icon-ctn {\r\n    visibility: visible;\r\n}\r\n\r\n.am-mat-menu-button[data-level=\"1\"] .am-mat-menu-button-icon-ctn .am-mdi-rect {\r\n    background: rgb(136, 136, 136);\r\n}\r\n\r\n.am-mat-menu-button-icon-ctn {\r\n    height: 2em;\r\n    width: 2em;\r\n    text-align: center;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.am-mat-menu-button-icon-ctn > img {\r\n    display: inline-block;\r\n    font-size: inherit;\r\n    width: 2em;\r\n    height: 2em;\r\n}\r\n\r\n.am-mat-menu-button-icon-ctn > span {\r\n    font-size: 2em;\r\n    line-height: 1;\r\n}\r\n\r\n.am-mat-menu-button-text {\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n    margin-left: 1.07142857143em;\r\n    font-size: inherit;\r\n}\r\n\r\n.am-mat-menu-button-toggle-icon-ctn {\r\n    position: absolute;\r\n    right: 1.07142857143em;\r\n    top: 0.5em;\r\n    bottom: 0.5em;\r\n    width: 2em;\r\n    text-align: center;\r\n}\r\n\r\n.am-mat-menu-button-toggle-icon-ctn > span {\r\n    font-size: 1.5em;\r\n    line-height: 1.3333333;\r\n    color: rgb(191, 191, 191);\r\n}\r\n\r\n.am-mat-menu-button-toggle-icon-ctn > span:before {\r\n    transition: transform 0.2s;\r\n}\r\n\r\n.am-mat-menu-item > .am-mat-menu-button {\r\n    width: 100%;\r\n}\r\n\r\n.am-mat-menu-dropdown:empty {\r\n    display: none;\r\n}\r\n\r\n.am-mat-menu-dropdown {\r\n    overflow-y: hidden;\r\n    transition: max-height 0.2s ease-out;\r\n    max-height: 0;\r\n}\r\n\r\n\r\n.am-mat-menu {\r\n    background-color: white;\r\n    -webkit-box-shadow: 0px 1px 1px 0px #ddd;\r\n    -moz-box-shadow: 0px 1px 1px 0px #ddd;\r\n    box-shadow: 0px 1px 1px 0px #ddd;\r\n}", ""]);



/***/ }),

/***/ 23678:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-mdi-rect {\r\n    border-radius: 0.2em;\r\n    font-size: inherit;\r\n    height: 2em;\r\n    width: 2em;\r\n    text-align: center;\r\n    background-color: rgb(2, 121, 251);\r\n    vertical-align: middle;\r\n    display: inline-block;\r\n}\r\n\r\n.am-mdi-rect-icon{\r\n    font-size: 1.5em;\r\n    line-height: 1.333333;\r\n    color: white;\r\n    display: inline-block;\r\n}\r\n", ""]);



/***/ }),

/***/ 8069:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-message-input-left {\r\n    position: absolute;\r\n    left: 10px;\r\n    bottom: 13px;\r\n}\r\n\r\n.am-message-input.as-message-input {\r\n    padding-left: 50px;\r\n}\r\n\r\n.am-message-input .as-message-input-emoji-btn-ctn {\r\n    left: unset;\r\n    right: 6px;\r\n}\r\n\r\n.am-message-input .as-message-input-pre-ctn::after {\r\n    height: 24px;\r\n}\r\n\r\n\r\n.am-message-input .as-message-input-plugin-file {\r\n    display: none;\r\n}\r\n\r\n.am-message-input .as-message-input-pre-ctn {\r\n    padding-left: 40px;\r\n    padding-right: 15px;\r\n    width: calc(100% - 49px);\r\n}\r\n\r\n.am-message-input .as-message-input-right {\r\n    bottom: 13px;\r\n}\r\n\r\n\r\n.as-message-input.as-mode-edit .am-message-input-plugin-camera,\r\n.as-message-input.as-has-text .am-message-input-plugin-camera {\r\n    display: none;\r\n}\r\n\r\n\r\n.am-message-input .as-message-input-plugin-btn {\r\n    width: 34px;\r\n    height: 34px;\r\n}\r\n\r\n\r\n.am-message-input:not(.as-has-text):not(.as-focus) .am-message-input-plugin-more {\r\n    background: linear-gradient(135deg, rgb(0, 120, 212), rgb(0, 188, 242));\r\n    color: white;\r\n}", ""]);



/***/ }),

/***/ 42338:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-message-tool {\r\n    position: fixed;\r\n    top: 0;\r\n    left: 0;\r\n    right: 0;\r\n    bottom: 0;\r\n    z-index: 100000;\r\n    background-color: rgba(0, 0, 0, 0.5);\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    --box-height: 272px;\r\n    transition: background-color 0.25s;\r\n}\r\n\r\n.am-message-tool.am-hiding .am-message-tool-box {\r\n    bottom: calc(0px - var(--box-height));\r\n}\r\n\r\n.am-message-tool.am-hiding {\r\n    background-color: rgba(0, 0, 0, 0.0);\r\n}\r\n\r\n.am-message-tool-box {\r\n    position: fixed;\r\n    left: 0;\r\n    right: 0;\r\n    bottom: 0;\r\n    background-color: white;\r\n    padding-bottom: 10px;\r\n    transition: bottom 0.25s;\r\n}\r\n\r\n.am-message-tool-header {\r\n    position: relative;\r\n    height: calc(3em + 10px);\r\n    box-sizing: border-box;\r\n    text-align: center;\r\n}\r\n\r\n.am-message-tool-header::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    height: 100%;\r\n    vertical-align: middle;\r\n}\r\n\r\n\r\n.am-message-tool-header-close-btn-ctn {\r\n    position: absolute;\r\n    left: 5px;\r\n    top: calc(50% - 1.5em);\r\n}\r\n\r\n.am-message-tool-header-close-btn {\r\n    height: 3em;\r\n    width: 3em;\r\n    border-radius: 50%;\r\n    border: none;\r\n    color: black;\r\n    background-color: transparent;\r\n    outline: none;\r\n}\r\n\r\n.am-message-tool-header-close-btn:active {\r\n    background-color: rgba(169, 169, 169, 0.3);\r\n}\r\n\r\n.am-message-tool-header-close-btn span {\r\n    font-size: 2em;\r\n}\r\n\r\n.am-message-tool-title {\r\n    font-size: 1.5em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    font-weight: bolder;\r\n}\r\n\r\n.am-message-tool-body {\r\n    overflow-y: auto;\r\n    max-height: 60vh;\r\n}\r\n\r\n.am-message-tool-plugin {\r\n    display: flex;\r\n    height: 5em;\r\n}\r\n\r\n.am-message-tool-plugin-icon-ctn {\r\n    width: 5em;\r\n    text-align: center;\r\n    padding: 0.8em;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.am-message-tool-plugin-icon-ctn > span {\r\n    display: block;\r\n    width: 100%;\r\n    height: 100%;\r\n    font-size: 2em;\r\n    line-height: 1.7;\r\n    background-color: rgb(241, 241, 243);\r\n    border-radius: 0.3em;\r\n}\r\n\r\n.am-message-tool-plugin-content {\r\n    flex-grow: 1;\r\n    padding: 5px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.am-message-tool-plugin:not(:last-child) .am-message-tool-plugin-content {\r\n    border-bottom: 1px solid #dddddd;\r\n}\r\n\r\n.am-message-tool-plugin-name {\r\n    font-size: 1.5em;\r\n    font-weight: bold;\r\n    margin-bottom: 0.3em;\r\n}\r\n\r\n.am-message-tool-plugin-desc {\r\n    color: rgb(79, 79, 80);\r\n}", ""]);



/***/ }),

/***/ 38070:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-multi-check-menu{\r\n    --item-min-width: 60px;\r\n    max-height: var(--multi-select-menu-max-height);\r\n    max-width: calc(95vw - 60px);\r\n}\r\n\r\n.am-multi-check-menu .absol-selectbox-item-text span{\r\n    max-width: calc(95vw - 60px - 5em);\r\n    text-overflow: ellipsis;\r\n    overflow: hidden;\r\n}\r\n\r\n", ""]);



/***/ }),

/***/ 25583:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-navigator-menu {\r\n    font-family: Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.am-navigator-menu-header {\r\n    background-image: url(http://absol.cf/assets/background/188-1881044_dual-android-navigation-drawer-background.jpg);\r\n    min-width: 12em;\r\n    background-size: cover;\r\n    color: white;\r\n    box-sizing: border-box;\r\n    padding-left: 0.625em;\r\n    padding-top: 0.625em;\r\n    padding-bottom: 0.625em;\r\n    padding-right: 0.125em;\r\n}\r\n\r\n.am-navigator-menu .am-navigator-content {\r\n    background-color: white;\r\n    overflow-y: auto;\r\n}\r\n\r\n.am-navigator-menu-avatar-ctn {\r\n    padding-top: 0.625em;\r\n    padding-bottom: 0.625em;\r\n}\r\n\r\n\r\n.am-navigator-menu-avatar {\r\n    width: 5em;\r\n    height: 5em;\r\n    border-radius: 50%;\r\n    background-image: url(https://avatars2.githubusercontent.com/u/9133017?s=460&v=4);\r\n    background-size: cover;\r\n}\r\n\r\n.am-navigator-menu-full-name {\r\n    font-size: 1.14285714286em;\r\n    font-weight: bold;\r\n    white-space: nowrap;\r\n}\r\n\r\n.am-navigator-menu-email {}\r\n\r\n\r\n.am-navigator-menu-group-name {\r\n    padding-left: 0.625em;\r\n    line-height: 2.5;\r\n    color: rgb(104, 104, 105);\r\n    font-weight: bold;\r\n}\r\n\r\n\r\n\r\n.am-navigator-menu-item {\r\n    position: relative;\r\n    height: 2.5em;\r\n    padding-left: 2.92857143em;\r\n}\r\n\r\n.am-navigator-menu-item:active{\r\n    background-color: rgba(169, 169, 169, 0.3 );\r\n}\r\n\r\n\r\n\r\n\r\n .am-navigator-menu-item-icon-ctn {\r\n    position: absolute;\r\n    left: 0.625em;\r\n    top: 0.5em;\r\n    bottom: 0.5em;\r\n    width: 1.5em;\r\n    height: 1.5em;\r\n}\r\n\r\n.am-navigator-menu-item-icon-ctn span {\r\n    font-size: 1.5em;\r\n    line-height: 1;\r\n}\r\n\r\n.am-navigator-menu-item-text {\r\n    font-size: inherit;\r\n    line-height: 2.5;\r\n}\r\n\r\n.am-navigator-menu-group:not(:last-child) {\r\n    border-bottom: 1px solid #ddd;\r\n}", ""]);



/***/ }),

/***/ 43657:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-select-box {\r\n\r\n}\r\n\r\n.am-select-box-modal .am-selectlist-item.as-selected {\r\n    display: none;\r\n}\r\n\r\n.am-select-box.disabled,\r\n.am-select-box.as-disabled {\r\n    pointer-events: none;\r\n    background-color: #ebebe4;\r\n}", ""]);



/***/ }),

/***/ 2222:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".am-tiny-profile-block {\r\n    height: 5.42857143em;\r\n    background-color: white;\r\n    position: relative;\r\n    box-sizing: border-box;\r\n    padding-top: 0.625em;\r\n    padding-bottom: 0.625em;\r\n    padding-left: 0.125em;\r\n    font-family: Arial, Helvetica, sans-serif;\r\n}\r\n\r\n.am-tiny-profile-block-avatar {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    width: 4em;\r\n    height: 4em;\r\n    border-radius: 50%;\r\n    background-image: url(https://avatars1.githubusercontent.com/u/32388488?s=400&v=4);\r\n    background-size: cover;\r\n}\r\n\r\n.am-tiny-profile-block-text-ctn {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    padding-left: 0.125em;\r\n}\r\n\r\n\r\n.am-tiny-profile-block-name {\r\n    font-size: 1.5em;\r\n    font-weight: 400;\r\n}\r\n\r\n.am-tiny-profile-block-desc {\r\n    font-size: 0.8em;\r\n}", ""]);



/***/ }),

/***/ 39598:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".ptswpf,\r\n.ptswpf * {\r\n    user-select: none;\r\n    -moz-user-select: none;\r\n    -webkit-user-select: none;\r\n    -ms-user-select: none;\r\n    outline: none;\r\n}\r\n\r\n\r\n.ptswpf button {\r\n    border: none;\r\n    border-radius: 0.4em;\r\n    font-size: 1em;\r\n    background-color: rgb(169, 169, 169, 0.05);\r\n    color: white;\r\n    padding: 0;\r\n}\r\n\r\n\r\n\r\n.ptswpf button:active,\r\n.ptswpf button:active:hover {\r\n    background-color: rgb(169, 169, 169, 0.12);\r\n}\r\n\r\n\r\n.ptswpf button:hover {\r\n    background-color: rgb(169, 169, 169, 0.07);\r\n}\r\n\r\n.ptswpf {\r\n    background-color: white;\r\n    position: relative;\r\n    font-size: 1em;\r\n}\r\n\r\n\r\n\r\n\r\n.ptswpf.ptswpf-dark {\r\n    background-color: rgb(36, 36, 37);\r\n    /* background-color: red; */\r\n}\r\n\r\nbutton.ptswpf-to-prev-image,\r\nbutton.ptswpf-to-next-image {\r\n    position: absolute;\r\n    height: 3em;\r\n    width: 3em;\r\n    top: calc(50% - 0.75em);\r\n    z-index: 10;\r\n    display: none;\r\n}\r\n\r\n.ptswpf.ptswpf-multi-image .ptswpf-to-prev-image,\r\n.ptswpf.ptswpf-multi-image .ptswpf-to-next-image {\r\n    display: initial;\r\n}\r\n\r\n\r\n.ptswpf-to-prev-image {\r\n    left: 0.325em;\r\n}\r\n\r\n.ptswpf-to-next-image {\r\n    right: 0.325em;\r\n}\r\n\r\nbutton.ptswpf-to-prev-image>i,\r\nbutton.ptswpf-to-next-image>i {\r\n    font-size: 2.5em;\r\n}\r\n\r\n\r\n.ptswpf-top-bar {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    right: 0;\r\n    z-index: 20;\r\n    background-color: rgba(0, 0, 0, 0, 0.2);\r\n    text-align: right;\r\n    padding-top: 1em;\r\n    padding-right: 2em;\r\n    font-size: 0.5em;\r\n}\r\n\r\n.ptswpf-top-bar>button {\r\n    width: 3em;\r\n    height: 3em;\r\n    color: rgb(200, 200, 200);\r\n    margin-left: 1em;\r\n    margin-bottom: 0.5em;\r\n}\r\n\r\n.ptswpf-top-bar>button>i {\r\n    font-size: 2em;\r\n}\r\n\r\n\r\n.ptswpf-image.ptswpf-loading {\r\n    visibility: hidden;\r\n}\r\n\r\n.ptswpf-move-animation,\r\n.ptswpf-move-animation .ptswpf-image {\r\n    transition: all 0.2s linear;\r\n}\r\n\r\n\r\n\r\nimg.ptswpf-image {\r\n    image-orientation: from-image;\r\n    position: absolute;\r\n}\r\n\r\n\r\n\r\n.ptswpf-download-trigger {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    visibility: hidden;\r\n}\r\n\r\n.ptswpf-mode-pan .ptswpf-action-pan_tool {\r\n    color: white;\r\n}\r\n\r\n.ptswpf-mode-pan img.ptswpf-image {\r\n    cursor: grab;\r\n}\r\n\r\n\r\n.ptswpf-mode-zoom-in .ptswpf-action-zoom_in {\r\n    color: white;\r\n}\r\n\r\n.ptswpf-mode-zoom-in img.ptswpf-image {\r\n    cursor: zoom-in;\r\n}\r\n\r\n.ptswpf-mode-zoom-out .ptswpf-action-zoom_out {\r\n    color: white;\r\n}\r\n\r\n.ptswpf-mode-zoom-out img.ptswpf-image {\r\n    cursor: zoom-out;\r\n}\r\n\r\n\r\n.ptswpf-frame {\r\n    position: absolute;\r\n    width: 100%;\r\n    height: 100%;\r\n    left: 0;\r\n    top: 0;\r\n    overflow: hidden;\r\n    touch-action: none;\r\n    z-index: 4;\r\n}\r\n\r\n.ptswpf-frame-left {\r\n    left: -100%;\r\n    z-index: 3;\r\n}\r\n\r\n.ptswpf-frame-right {\r\n    left: 100%;\r\n    z-index: 3;\r\n\r\n}\r\n\r\n\r\n\r\n.ptswpf-frame-loading-img {\r\n    display: block;\r\n    position: absolute;\r\n    left: calc(50% - 5em);\r\n    top: calc(50% - 5em);\r\n    width: 10em;\r\n    height: 10em;\r\n}", ""]);



/***/ }),

/***/ 35095:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".asht-modal {\r\n    position: fixed;\r\n    z-index: 100000;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    right: 0;\r\n}\r\n\r\n.asht-window {\r\n    z-index: 110000;\r\n    user-select: none;\r\n}\r\n\r\n.asht-window.as-blink .absol-onscreen-window-head-bar {\r\n    animation: asht-window-hear-blink 0.75s;\r\n\r\n}\r\n\r\n.asht-window.as-blink .absol-onscreen-window-head-bar button{\r\n    background-color: transparent;\r\n}\r\n\r\n@keyframes asht-window-hear-blink {\r\n    0% {\r\n        background-color: rgba(169, 169, 169, 0.15)\r\n    }\r\n    15% {\r\n        background-color: rgba(169, 169, 169, 0.5)\r\n    }\r\n    25% {\r\n        background-color: rgba(169, 169, 169, 0.15)\r\n    }\r\n    35% {\r\n        background-color: rgba(169, 169, 169, 0.5)\r\n    }\r\n    50% {\r\n        background-color: rgba(169, 169, 169, 0.15)\r\n    }\r\n    65% {\r\n        background-color: rgba(169, 169, 169, 0.5)\r\n    }\r\n    75% {\r\n        background-color: rgba(169, 169, 169, 0.15)\r\n    }\r\n\r\n    100% {\r\n        background-color: rgba(169, 169, 169, 0.15)\r\n    }\r\n\r\n}\r\n\r\n.asht-select-row-width-window-content {\r\n    padding: 5px;\r\n}\r\n\r\n.asht-select-row-width-window .absol-onscreen-window-head-bar-button-minimize,\r\n.asht-select-row-width-window .absol-onscreen-window-head-bar-button-dock {\r\n    display: none;\r\n}", ""]);



/***/ }),

/***/ 35857:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".asht-form-array-editor {\r\n    font-size: 14px;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    line-height: 1.8;\r\n}\r\n\r\n.asht-form-array > tbody > tr > td:first-child {\r\n    padding-right: 20px;\r\n}\r\n\r\n.asht-form-array-break td {\r\n    position: relative;\r\n    height: 9px;\r\n}\r\n\r\n.asht-form-array-break td::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: 5px;\r\n    top: 4px;\r\n    right: 5px;\r\n    border-top: 1px solid #dddddd;\r\n}\r\n\r\n", ""]);



/***/ }),

/***/ 38310:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, "table.asht-table-data {\r\n    --row-height: 30px;\r\n}\r\n\r\n\r\ntable.asht-table-data {\r\n    border: solid 1px #dddddd;\r\n    box-sizing: border-box;\r\n}\r\n\r\ntable.asht-table-data > tbody > tr > td,\r\ntable.asht-table-data > thead > tr > td,\r\ntable.asht-table-data > tr > td {\r\n    border: solid 1px #dddddd;\r\n    padding-left: 0.35em;\r\n    padding-right: 0.35em;\r\n    white-space: pre-wrap;\r\n    word-break: normal;\r\n    box-sizing: border-box;\r\n}\r\n\r\ntable.asht-table-data  > tbody > tr > td:first-child,\r\ntable.asht-table-data  > thead > tr > td:first-child{\r\n    text-align: right;\r\n    width: var(--index-col-width);\r\n    min-width:  var(--index-col-width);/*force width*/\r\n}\r\n\r\ntable.asht-table-data  > thead > tr > td {\r\n    min-height: 30px;\r\n}\r\n\r\n\r\ntable.asht-table-data > tbody > tr > td,\r\ntable.asht-table-data > tr > td {\r\n    height: var(--row-height);\r\n    min-height: var(--row-height);\r\n}\r\n\r\n\r\ntable.asht-table-data > thead > tr > td {\r\n    background-color: rgb(248, 249, 250);\r\n    text-align: center;\r\n    box-sizing: border-box;\r\n    min-height: var(--row-height);\r\n    height: var(--row-height);\r\n}\r\n\r\ntable.asht-table-data > tbody > tr > td > span {\r\n    white-space: pre;\r\n}\r\n\r\ntable.asht-table-data > tbody > tr > td:first-child,\r\ntable.asht-table-data > tr > td:first-child {\r\n    background-color: rgb(248, 249, 250);\r\n    text-align: right;\r\n}\r\n\r\n\r\ntd.asht-type-number {\r\n    text-align: right;\r\n    padding-left: 0.35em;\r\n    min-width: 64px;\r\n}\r\n\r\ntd.asht-type-boolean {\r\n    text-align: center;\r\n}\r\n\r\ntd.asht-type-text {\r\n    text-align: left;\r\n    min-width: 64px;\r\n    line-height: 2;\r\n}\r\n\r\n\r\n\r\n.asht-table-editor td.asht-calc {\r\n    background-color: rgba(255, 255, 0, 0.3);\r\n}\r\n\r\n/*unique value in column*/\r\ntd.asht-duplicated {\r\n    background-color: rgba(255, 0, 0, 0.3);\r\n}\r\n\r\n\r\ntd.asht-type-time {\r\n    min-width: 110px;\r\n}\r\n\r\ntable.asht-table-data > tbody > tr > td.asht-type-date {\r\n    text-align: left;\r\n    padding-right: 1.35em;\r\n    min-width: calc(6em + 50px);\r\n    box-sizing: border-box;\r\n}\r\n\r\ntable.asht-table-data > tbody > tr > td.asht-type-date-time {\r\n    text-align: left;\r\n    padding-right: 1.35em;\r\n    min-width: calc(10em + 50px);\r\n    box-sizing: border-box;\r\n}\r\n\r\ntd.asht-row-idx {\r\n    text-align: right;\r\n}\r\n\r\ntable.asht-table-data > tbody > tr > td.asht-type-enum {\r\n    text-align: left;\r\n    padding-right: calc(0.35em + 18px);\r\n}\r\n\r\ntable.asht-table-data > tbody > tr > td.asht-type-time-range-24{\r\n    text-align: left;\r\n    padding-right: 1.35em;\r\n    min-width: calc(14em + 11px);\r\n    box-sizing: border-box;\r\n}\r\n\r\n.as-layout-editor .asht-table-editor.asht-read-only.asht-headless .asht-new-row:first-child{\r\n    display: table-row;\r\n    pointer-events: none;\r\n}\r\n", ""]);



/***/ }),

/***/ 33560:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".asht-table-editor-pre-render{\r\n    position: fixed;\r\n    left: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    right: 0;\r\n    overflow: scroll;\r\n    z-index: -1000;\r\n    pointer-events: none;\r\n    visibility: hidden;\r\n    opacity: 0;\r\n\r\n}\r\n\r\n.asht-table-editor {\r\n    position: relative;\r\n    overflow: hidden;\r\n    font-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n    font-size: 14px;\r\n    --available-width: 10000000px;\r\n    --available-height: 1000000px;\r\n    --sys-scrollbar-width: 17px;\r\n    --sys-scrollbar-height: 17px;\r\n    --head-height: 21px;\r\n    --index-col-width: 35px;\r\n    box-sizing: border-box;\r\n}\r\n\r\n.asht-table-editor-header .as-form-cmd-tool{\r\n    border: 1px solid #dddddd;\r\n    display: inline-block;\r\n    height: 100%;\r\n    box-sizing: border-box;\r\n    overflow: hidden;\r\n}\r\n\r\n.asht-table-editor-header {\r\n    height: 60px;\r\n}\r\n\r\n.asht-table-editor-header .as-cmd-tool-group-x2::before {\r\n    display: none;\r\n}\r\n\r\n.asht-table-editor-header .mdi-table-row-remove {\r\n    color: #db1414;\r\n}\r\n\r\n.asht-table-editor-body {\r\n    position: relative;\r\n}\r\n\r\n\r\n\r\n.asht-table-editor-body::before {\r\n    content: \"\";\r\n    position: absolute;\r\n    left: 0;\r\n    width: 100%;\r\n    top: var(--head-height);\r\n    max-width: var(--content-width);\r\n    border-bottom: 1px solid #aaa;\r\n    z-index: 23;\r\n}\r\n\r\n.asht-table-editor.asht-overflow-y .asht-table-editor-body::before {\r\n    width: calc(100% - 17px);\r\n}\r\n\r\n.asht-table-editor-body::after {\r\n    content: \"\";\r\n    position: absolute;\r\n    z-index: 23;\r\n    border-right: 1px solid #aaa;\r\n    left: calc(var(--index-col-width));\r\n    height: 100%;\r\n    top: 0;\r\n    max-height: var(--content-height);\r\n}\r\n\r\n.asht-table-editor.asht-overflow-x::after {\r\n    height: calc(100% - 17px);\r\n\r\n}\r\n\r\n.asht-table-editor * {\r\n    /*background-color: transparent !important;*/\r\n}\r\n\r\n.asht-table-editor.asht-overflow-x .asht-table-editor-body {\r\n    padding-bottom: 17px;\r\n}\r\n\r\n.asht-table-editor.asht-overflow-y .asht-table-editor-body{\r\n    padding-right: 17px;\r\n}\r\n\r\n.asht-table-editor.asht-headless .asht-table-data >thead{\r\n    display: none;\r\n}\r\n/************ STYLE HANDLER  *******************************/\r\n\r\n/*will not overflow y*/\r\n.asht-table-editor.as-height-auto .asht-table-editor-main-scroller .asht-table-data{\r\n    min-width: var(--available-width);\r\n}\r\n\r\n.asht-table-editor.as-width-auto {\r\n    /*max-width: var(--available-width);*/\r\n}\r\n\r\n/********** MAIN *********************/\r\n.asht-table-editor-main-viewport {\r\n    overflow: hidden;\r\n    max-height: var(--content-height);\r\n    position: relative;\r\n}\r\n\r\n.asht-table-editor-main-scroller {\r\n    overflow-x: scroll;\r\n    overflow-y: scroll;\r\n    margin-right: calc(var(--sys-scrollbar-width) * -1);\r\n}\r\n\r\n\r\n.asht-table-editor.asht-overflow-x {\r\n    width: var(--available-width);\r\n    padding-bottom: 17px;\r\n}\r\n\r\n.asht-table-editor.asht-overflow-y {\r\n    height: var(--available-height);\r\n    padding-right: 17px;\r\n}\r\n\r\n\r\n.asht-table-editor.asht-overflow-x .asht-table-editor-main-viewport {\r\n    width: 100%;\r\n}\r\n\r\n.asht-table-editor.asht-overflow-x .asht-table-editor-main-scroller {\r\n    width: calc(100% + var(--sys-scrollbar-width));\r\n}\r\n\r\n.asht-table-editor.asht-overflow-y .asht-table-editor-main-viewport {\r\n    height: 100%;\r\n}\r\n\r\n.asht-table-editor.asht-overflow-y .asht-table-editor-main-scroller {\r\n    height: 100%;\r\n}\r\n\r\n\r\n\r\n.asht-table-editor.asht-overflow-y .asht-table-editor-main-viewport {\r\n    height: 100%;\r\n}\r\n\r\n.asht-table-editor.asht-overflow-y .asht-table-editor-main-scroller {\r\n    height: calc(100% + var(--sys-scrollbar-height));\r\n}\r\n\r\n/*******   FIXED Y ***************************/\r\n\r\n.asht-table-editor-fixed-y-viewport {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    overflow: hidden;\r\n    z-index: 20;\r\n    height: var(--head-height);\r\n    width: 100%;\r\n    user-select: none;\r\n}\r\n\r\n\r\n\r\n.asht-table-editor-fixed-y-scroller {\r\n    overflow-x: scroll;\r\n    overflow-y: hidden;\r\n}\r\n\r\n.asht-table-editor-fixed-y-scroller {\r\n    width: 100%;\r\n}\r\n\r\n.asht-table-editor.asht-overflow-y .asht-table-editor-fixed-y-scroller {\r\n    height: calc(100% + var(--sys-scrollbar-height));\r\n}\r\n\r\n\r\n.asht-table-editor-fixed-y-size-wrapper {\r\n    width: var(--content-width);\r\n}\r\n\r\n/********** FIXED X ************************/\r\n\r\n.asht-table-editor-fixed-x-viewport {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    overflow: hidden;\r\n    z-index: 20;\r\n    height: 100%;\r\n    width: var(--index-col-width);\r\n    user-select: none;\r\n}\r\n\r\n\r\n.asht-table-editor-fixed-x-scroller {\r\n    overflow: scroll;\r\n    height: calc(100% + var(--sys-scrollbar-height));\r\n    width: 200px;\r\n}\r\n\r\n/********** FIXED XY ************************/\r\n\r\n.asht-table-editor-fixed-xy-viewport {\r\n    position: absolute;\r\n    left: 0;\r\n    top: 0;\r\n    z-index: 21;\r\n    user-select: none;\r\n}\r\n\r\n.asht-table-editor-fixed-xy td {\r\n    width: calc(var(--index-col-width)); /*? border*/\r\n    height: var(--head-height);\r\n    box-sizing: border-box;\r\n}\r\n\r\n/*******  SCROLLER ***************/\r\n\r\n.asht-table-editor-v-scrollbar {\r\n    position: absolute;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    width: 17px;\r\n    display: none;\r\n}\r\n\r\n.asht-table-editor-h-scrollbar {\r\n    position: absolute;\r\n    left: 0;\r\n    bottom: 0;\r\n    right: 0;\r\n    height: 17px;\r\n    display: none;\r\n}\r\n\r\n\r\n.asht-table-editor.asht-overflow-x .asht-table-editor-v-scrollbar {\r\n    bottom: 17px;\r\n}\r\n\r\n.asht-table-editor.asht-overflow-y .asht-table-editor-h-scrollbar {\r\n    right: 17px;\r\n}\r\n\r\n.asht-table-editor.asht-overflow-x .asht-table-editor-h-scrollbar,\r\n.asht-table-editor.asht-overflow-y .asht-table-editor-v-scrollbar {\r\n    display: block;\r\n}\r\n\r\n\r\n.asht-table-editor .ash-fixed-y-header-ctn {\r\n    z-index: 20;\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    position: absolute;\r\n    overflow: hidden;\r\n}\r\n\r\n.ash-fixed-y-header-scroller {\r\n    overflow-x: scroll;\r\n    overflow-y: hidden;\r\n    margin-bottom: -17px;\r\n    padding-bottom: 17px;\r\n}\r\n\r\n.ash-fixed-y-header-size-wrapper {\r\n    display: inline-block;\r\n    width: var(--content-width);\r\n}\r\n\r\n\r\ntable.asht-table-editor-fixed-y-scroller-header {\r\n    display: inline-table;\r\n}\r\n\r\n.asht-table-editor .as-table-scroller-fixed-xy-header-ctn {\r\n    z-index: 21;\r\n}\r\n\r\n.asht-table-editor-content {\r\n    position: relative;\r\n    display: inline-block;\r\n}\r\n\r\n.asht-table-editor-foreground {\r\n    position: absolute;\r\n    z-index: 15;\r\n    top: 0;\r\n    left: 0;\r\n    bottom: 0;\r\n    right: 0;\r\n    overflow: hidden;\r\n    pointer-events: none;\r\n}\r\n\r\n\r\ntable.asht-table-data {\r\n    table-layout: fixed;\r\n    border-collapse: collapse;\r\n    box-sizing: border-box;\r\n}\r\n\r\n\r\n.asht-read-only .asht-new-row {\r\n    display: none;\r\n}\r\n\r\n.asht-table-editor-editing-box {\r\n    position: absolute;\r\n    box-sizing: border-box;\r\n    z-index: 8;\r\n    --cell-width: 0;\r\n    --cell-height: 0;\r\n    min-width: var(--cell-width);\r\n    min-height: var(--cell-height);\r\n    border: solid 1px rgb(134, 158, 193);\r\n}\r\n\r\n.asht-table-editor-editing-box::before {\r\n    content: \"\";\r\n    pointer-events: none;\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 0;\r\n    bottom: 0;\r\n    box-sizing: border-box;\r\n    border: 1px solid rgb(134, 158, 193);\r\n    z-index: 2;\r\n}\r\n\r\n.asht-table-editor-editing-box.as-status-focus,\r\n.asht-table-editor-editing-box.as-status-focus::before {\r\n    border-color: rgb(26, 115, 232);\r\n}\r\n\r\n\r\n.asht-cell-editor-input {\r\n    min-height: calc(var(--cell-height) - 0px);\r\n    min-width: calc(var(--cell-width) - 0px);\r\n    box-sizing: border-box;\r\n    display: block;\r\n    border: none;\r\n    background: white;\r\n    outline: none;\r\n}\r\n\r\npre.as-preinput.asht-cell-editor-input {\r\n    min-width: calc(var(--cell-width) + 1px);\r\n    background: white;\r\n}\r\n\r\n\r\ninput.asht-cell-editor-input[type=\"number\"] {\r\n    width: var(--cell-width);\r\n    text-align: right;\r\n    -moz-appearance: textfield;\r\n\r\n}\r\n\r\ninput.asht-cell-editor-input[type=\"number\"]::-webkit-outer-spin-button,\r\ninput.asht-cell-editor-input[type=\"number\"]::-webkit-inner-spin-button {\r\n    -webkit-appearance: none;\r\n    margin: 0;\r\n}\r\n\r\n.absol-number-input.asht-cell-editor-input {\r\n    height: calc(var(--cell-height) - 0px);\r\n    min-width: calc(var(--cell-width) - 0px);\r\n\r\n}\r\n\r\n.absol-number-input.asht-cell-editor-input .absol-number-input-text-container {\r\n    right: 4px;\r\n}\r\n\r\n.absol-number-input.asht-cell-editor-input .absol-number-input-button-up-container,\r\n.absol-number-input.asht-cell-editor-input .absol-number-input-button-down-container {\r\n    display: none;\r\n}\r\n\r\n\r\n.asht-boolean-cell-editor-input.asht-state-wait-action > .as-checkbox-input {\r\n    visibility: hidden;\r\n}\r\n\r\n.asht-date-cell-editor-input.asht-state-wait-action {\r\n    opacity: 0;\r\n}\r\n\r\n.asht-boolean-cell-editor-input {\r\n    text-align: center;\r\n}\r\n\r\n.asht-boolean-cell-editor-input .as-checkbox-input {\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n}\r\n\r\n.asht-boolean-cell-editor-input::before {\r\n    content: \"\";\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    height: var(--cell-height);\r\n}\r\n\r\n.asht-enum-set-cell-editor-input {\r\n    min-width: var(--cell-width);\r\n    min-height: var(--cell-height);\r\n    max-width: calc(var(--cell-width) * 2);\r\n    --select-box-item-font-size: 11px;\r\n    --select-box-item-height: 16px;\r\n    --select-box-item-border-radius: 5px;\r\n    --select-box-min-height: 20px;\r\n}\r\n\r\n.asht-table-editor-selected-box {\r\n    border: 1px solid rgba(26, 115, 232, 0.7);\r\n    background-color: rgba(26, 115, 232, 0.1);\r\n    position: absolute;\r\n    z-index: 20;\r\n    box-sizing: border-box;\r\n    pointer-events: none;\r\n}\r\n\r\n.asht-date-cell-editor-input,\r\n.asht-date-time-cell-editor-input,\r\n.asht-date-cell-editor-input[data-format].as-date-input\r\n{\r\n    height: var(--cell-height);\r\n    width: var(--cell-width);\r\n    border: none;\r\n}\r\n\r\n.asht-date-cell-editor-input.asht-state-editing {\r\n    width: calc(var(--cell-width) + 28px);\r\n}\r\n\r\n.asht-date-cell-editor-input input,\r\n.asht-date-time-cell-editor-input input {\r\n    padding-left: 0.35em;\r\n    font: inherit;\r\n}\r\n\r\n.asht-date-cell-editor-input .as-date-input-icon-ctn {\r\n    height: 100%;\r\n}\r\n\r\n.asht-date-cell-editor-input .as-date-input-icon-ctn span {\r\n    line-height: var(--cell-height);\r\n}\r\n\r\n\r\n.asht-cell-editor-input.as-select-menu {\r\n    height: var(--cell-height);\r\n    width: var(--cell-width);\r\n}\r\n\r\n.absol-selectmenu.as-select-menu.as-select-tree-menu.asht-cell-editor-input {\r\n    min-width: calc(var(--select-list-estimate-width) + 30px);\r\n}\r\n\r\n\r\n.asht-time-range-24-cell-editor-input .ac-time-input,\r\n.asht-time-range-24-cell-editor-input .ac-time-input .as-time-input-text {\r\n    font: inherit;\r\n\r\n}\r\n\r\n.asht-time-range-24-cell-editor-input .ac-time-input {\r\n    height: var(--cell-height);\r\n    width: 7em;\r\n}\r\n\r\n/*.asht-date-n-level-cell-editor-input > div,*/\r\n/*.asht-date-n-level-cell-editor-input input.as-date-input-text {*/\r\n/*    height: var(--cell-height);*/\r\n/*}*/\r\n\r\n.as-date-n-level-input.asht-date-n-level-cell-editor-input {\r\n    padding: 0;\r\n    margin: 0;\r\n    height: var(--cell-height);\r\n    width: calc(6em + 50px + 2em);\r\n}\r\n\r\n.asht-date-n-level-cell-editor-input .as-date-n-level-input-select-level {\r\n    height: 100%;\r\n    font-size: 0.8em;\r\n    width: 1em;\r\n}\r\n\r\n.asht-date-n-level-cell-editor-input .as-date-input-text {\r\n    padding-left: 1.2em;\r\n}\r\n\r\n.asht-date-n-level-cell-editor-input .as-date-input-clear-btn {\r\n    height: calc(var(--cell-height) - 2px);\r\n    top: calc(50% - var(--cell-height) * 0.5 + 1px)\r\n}\r\n\r\n.asht-date-n-level-cell-editor-input button span.mdi {\r\n    line-height: 1;\r\n}\r\n\r\n.asht-date-n-level-cell-editor-input {\r\n    background-color: white;\r\n    padding: 0;\r\n}\r\n\r\n.card-mobile-content .asht-table-editor {\r\n    max-width: calc(100vw - 40px);\r\n}\r\n\r\n\r\n.absol-follower.asht-table-editor-command-follower{\r\n    z-index: 1;\r\n    background-color: white;\r\n    border: 1px solid #aaaaaa;\r\n}", ""]);



/***/ }),

/***/ 13763:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(55788)(false);
// Module
exports.push([module.id, ".as-view-box{\n    display: inline-block;\n    --zoom-rev: 1;\n}\n\n\n.ag-view-box-grid-primary{\n    stroke-width: var(--zoom-rev);\n    stroke: #ddd;\n}\n\n.ag-view-box-grid-secondary {\n    stroke-width: calc(var(--zoom-rev) / 2);\n    stroke: #eee;\n}", ""]);



/***/ }),

/***/ 89667:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg width=\"24\" height=\"24\" version=\"1.1\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g>\r\n  <path transform=\"translate(-9 -.5)\" d=\"m10 3.5v4h11.5v-4z\" color=\"#000000\" fill=\"#009700\" style=\"-inkscape-stroke:none\"/>\r\n  <path transform=\"translate(-11.5)\" d=\"m13 4h10\" fill=\"#00f700\"/>\r\n  <path d=\"m12.5 3c-5.2230106 0-9.5 4.2769894-9.5 9.5 0 5.223011 4.2769894 9.5 9.5 9.5 5.223011 0 9.5-4.276989 9.5-9.5 0-5.2230106-4.276989-9.5-9.5-9.5zm0 4c3.061252 0 5.5 2.4387477 5.5 5.5 0 3.061252-2.438748 5.5-5.5 5.5-3.0612523 0-5.5-2.438748-5.5-5.5 0-3.0612523 2.4387477-5.5 5.5-5.5z\" color=\"#000000\" fill=\"#00c400\" fill-rule=\"evenodd\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"-inkscape-stroke:none;paint-order:fill markers stroke\"/>\r\n  <path transform=\"translate(10 -.5)\" d=\"m2 3.5v4h11v-4z\" color=\"#000000\" fill=\"#d40000\" style=\"-inkscape-stroke:none\"/>\r\n  <path transform=\"translate(16.5,-10)\" d=\"m-5 10v10l5-5z\" fill=\"#72c400\" style=\"mix-blend-mode:normal\"/>\r\n </g>\r\n</svg>\r\n");

/***/ }),

/***/ 80303:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg id=\"Layer_2\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\" width=\"24\" height=\"24\" >\r\n<path style=\"fill:currentColor\" d=\"M172.4,229.7c-4.3,0-11.8-1.9-33.7-14.3-3.8-2.1-8.7-1.4-11.6,1.9-7.5,8.3-12.3,11.7-17.4,12.3-5.5.6-10.2-1.5-15.2-3.8-4.1-1.9-8.8-4-15.3-5.4-1.6-.4-3.3-.6-4.8-.9-15.8-2.8-27.6-7.3-36.2-39.7-2.1-7.8-5.2-9.3-10.5-11.9-4.9-2.4-11.5-5.7-15-14.2-3.1-7.6-2.9-18,.5-33.6,8.2-37,29.3-38.6,39.4-39.3.2,0,.4,0,.6,0-.7-10,1.5-17.4,6.6-22.2,5.1-4.8,11.1-5,13.7-4.8h31.6l23.1-8.9c2.3-.9,4.1-2.6,5.1-4.8l1.4-3.1c4.7-10.2,15.1-16.9,26.4-16.9h5.9l28.4,7.7c12.3,3.3,21.1,14.6,21.4,27.3l.4,20.6c0,3.1-.4,6.2-1.3,9.2l-6.3,20.3c-.8,2.6-.4,5.3,1,7.6l4.9,7.8c5.5,8.9,5.8,20.1.8,29.3l-17,30.7c-1.4,2.5-1.5,5.4-.4,8,5.4,12.9.8,27.8-10.9,35.4-5.5,3.6-10,5.4-14.1,5.7-.4,0-.9,0-1.4,0ZM172.9,210.1h0ZM108,210h0ZM134.2,194.6c4.9,0,9.8,1.2,14.2,3.7,16.4,9.3,22.5,11.2,24.1,11.6.6-.2,2.2-.8,4.8-2.6,3.7-2.4,5.1-7.1,3.4-11.3-3.4-8.2-2.9-17.4,1.4-25.1l17-30.7c1.6-2.9,1.5-6.5-.2-9.3l-4.9-7.8c-4.5-7.1-5.6-15.9-3.1-23.9l6.3-20.3c.3-1,.4-1.9.4-2.9l-.4-20.6c0-4.1-2.9-7.7-6.9-8.7l-25.9-7h-3.3c-3.7,0-7,2.1-8.5,5.4l-1.4,3.1c-3.2,6.9-8.8,12.2-15.9,14.9l-26.5,10.2h-35.6c-.3,1.1-.6,3.4-.2,7.3.6,5.6-.5,10.2-3.4,13.6-4.3,5.2-10.5,5.7-15.5,6-8.6.6-16.7,1.3-21.7,24-3.2,14.5-2.3,20-1.5,22,.5,1.3,1.4,1.9,5.5,4,6.5,3.2,16.4,8.1,20.8,24.5,3,11.1,6.2,18.3,9.7,21.5,2.4,2.2,5.3,2.8,11,3.8,1.8.3,3.6.6,5.6,1.1,8.5,1.9,14.7,4.6,19.2,6.7,1.4.6,3.1,1.4,4.3,1.8,1-.8,2.8-2.5,5.6-5.6,5.6-6.2,13.6-9.6,21.7-9.6ZM53.4,83.8h0ZM71.3,73.3s0,0,0,0h0Z\"/>\r\n<circle style=\"fill:currentColor\" cx=\"143.5\" cy=\"150\" r=\"19.9\"/>\r\n</svg>");

/***/ }),

/***/ 42116:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg id=\"Layer_2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 240 240\"><path style=\"fill:currentColor\" d=\"M200,20.1H40c-11,0-20,8.9-20,20v160.1c0,11,9,20,20,20h80.8c-5.6-5.8-10.1-12.6-13.2-20.1H40v-110.1h160v31.9c8.1,5,14.9,11.8,20,19.8V40.1c0-11.1-9-20-20-20ZM200,70.3H40v-30.1h160v30.1ZM216.6,189.7l-11.2-8.9c0-1.3.2-2.7.2-4,0-2.1,0-4.2-.3-6.3l11.1-8.8c.5-.9,1.3-2.3.7-3.2l-10.7-18.2c-.3-.2-.7-.4-1-.6-.7-.4-1.4-.8-1.7-1l-12.8,5.4-9.1-5.2-2.3-14c-.3-.2-.8-1-1.5-1.4,0,0,0,0,0,0-.3-.2-.7-.3-1.1-.2,0,0,0,0,0,0h-10.2s-10.4,0-10.4,0c-1.6,0-2.6,1-2.6,2.1l-2.1,14.2c-3.1,1.6-6.3,3.1-8.9,5.2l-13.1-5.2c-1.1,0-2.6,0-3.2,1l-10.5,18.4v3.2l11,8.4v10.5l-11,8.9c0,.5-1.1,2.1,0,3.2l10.5,18.4c0,1,2.1,1,3.2,1l13.1-5.2c2.6,2.1,5.8,4.2,8.9,5.2l2.1,13.7c0,1,1.6,2.1,2.6,2.1h20.7c1.2,0,2-1.3,2.5-2.2l2-14c3.1-1.2,6.5-2.9,9-5.1l13.3,5.2c.9.5,2.6-.3,3.1-1.2l10.4-18.1c.8-1.4.4-2.8-.5-3.3ZM201.4,200.3l-12.9-5c-4.5,4.7-9.8,7.6-16,8.9l-1.8,14.2h-8.4l-2.1-13.7c-6.3-1.6-11.6-4.7-15.8-9.5l-12.6,5.2-4.2-6.8,11-8.4c-2.1-6.3-2.1-12.6,0-18.9l-11-8.4,4.2-6.8,12.6,5.2c3.7-4.7,9.4-8.4,15.8-9.5l2.1-13.6h7.9l1.8,13.9c3.7.7,7,2,10,3.9,0,0,.1,0,.2.1,2.2,1.4,4.1,3.1,6,5.1,0,0,.1.2.2.2l12.4-5.2h.4c0-.1,3.6,6.4,3.6,6.4v.2c0,0,.2.2.2.2l-10.8,8.3c1.2,2.8,1.8,6,1.9,9.3,0,3-.4,6.1-1.5,9l10.8,8.6-3.9,6.8ZM181.1,175.9c0,8.1-6.6,14.7-14.7,14.7s-14.7-6.6-14.7-14.7,6.6-14.7,14.7-14.7,14.7,6.6,14.7,14.7Z\"/></svg>");

/***/ }),

/***/ 76634:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg id=\"Layer_2\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\" width=\"24\" height=\"24\" >\r\n<path d=\"M173.4,159.1c0,11-8.9,19.9-19.9,19.9s-19.9-8.9-19.9-19.9,8.9-19.9,19.9-19.9,19.9,8.9,19.9,19.9ZM201.4,174c-1.3,2.4-1.5,5.2-.4,7.8,5.2,12.5.8,26.9-10.5,34.2-5.3,3.4-9.7,5.2-13.7,5.6-.4,0-.9,0-1.4,0-4.2,0-11.5-1.8-32.6-13.8-3.7-2.1-8.4-1.3-11.2,1.8-7.2,8-11.9,11.3-16.8,11.9-5.3.6-9.9-1.5-14.7-3.6-4-1.8-8.5-3.8-14.9-5.2-1.6-.3-3.1-.6-4.7-.9-15.3-2.7-26.7-7.1-35.1-38.4-2-7.5-5.1-9-10.1-11.5-4.7-2.3-11.2-5.5-14.5-13.8-3-7.4-2.8-17.4.5-32.5,7.9-35.8,28.3-37.3,38.1-38.1.2,0,.4,0,.6,0-.7-9.6,1.4-16.9,6.4-21.5,5-4.7,10.7-4.8,13.3-4.6h30.6l22.4-8.6c2.2-.8,4-2.5,5-4.6l1.4-3c4.6-9.9,14.6-16.3,25.5-16.3h5.7l27.5,7.5c12,3.2,20.5,14.1,20.7,26.4l.4,20c0,3-.4,6-1.3,8.9l-6.1,19.7c-.8,2.5-.4,5.2.9,7.4l4.7,7.5c5.4,8.6,5.7,19.5.8,28.3l-16.4,29.7ZM173.4,159.1c0-11-8.9-19.9-19.9-19.9s-19.9,8.9-19.9,19.9,8.9,19.9,19.9,19.9,19.9-8.9,19.9-19.9ZM153.4,139.2c-11,0-19.9,8.9-19.9,19.9s8.9,19.9,19.9,19.9,19.9-8.9,19.9-19.9-8.9-19.9-19.9-19.9Z\" style=\"fill:currentColor\"/>\r\n</svg>");

/***/ }),

/***/ 58993:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg id=\"Layer_2\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\"  width=\"24\" height=\"24\"><path style=\"fill:currentColor\"  d=\"M110,110V20H20v90M40,90v-50h50v50M200,65c0,14-11,25-25,25s-25-11-25-25,11.1-25,25-25,25,11.1,25,25M65,140l-45,80h90M75.8,200h-21.6l10.8-19.2M220,65c0-25-20-45-45-45s-45,20-45,45,20,45,45,45,45-20,45-45M210.8,179.3v4l7.7,5.6c.7.5,1,1.4.7,2.2l-.2.5s-.2,1.3-1,2.1l-8,14.4s-1.6.8-2.4,0l-9.6-4c-2.4,1.6-4.8,3.2-7.2,4l-1.6,10.4c0,.8-.8,1.6-1.6,1.6h-16.8c-.8,0-1.6,0-1.6-1.6l-1.6-10.4c-2.4-.8-5.6-2.4-7.2-4.8l-9.6,4h-2.4l-8-14.4v-2.4l8.8-6.4v-8.8l-8-6.4s-.8-1.6,0-2.4l8.8-14.4s1.6-.8,2.4,0l9.6,4c2.4-1.6,4-3.2,7.2-4l1.6-10.4c0-.8.8-1.6,1.6-1.6h16.8c.8,0,1.6,0,1.6,1.6l1.6,10.4c2.4.8,4.8,2.4,7.2,4l9.6-4h2.4l8,14.4v2.4l-8.8,6.4v4ZM191.6,180.9c0-6.4-5.6-12-12-12s-12,5.6-12,12,5.6,12,12,12,12-5.6,12-12Z\" /></svg>");

/***/ }),

/***/ 2497:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg\n   width=\"24\"\n   height=\"24\"\n   viewBox=\"0 0 6.3499999 6.3500002\"\n   version=\"1.1\"\n   id=\"svg5\"\n   xmlns=\"http://www.w3.org/2000/svg\"\n   xmlns:svg=\"http://www.w3.org/2000/svg\">\n  <g\n     inkscape:label=\"Layer 1\"\n     inkscape:groupmode=\"layer\"\n     id=\"layer1\">\n    <path\n       id=\"path1315\"\n       style=\"fill:currentColor;fill-opacity:1;fill-rule:evenodd;stroke-width:0.1;stroke-linecap:square;stroke-linejoin:round;paint-order:markers stroke fill\"\n       transform=\"matrix(0.26458334,0,0,0.26458334,-1.3750001e-8,0.52916667)\"\n       d=\"m 21,10 a 9,9 0 0 1 -9,9 9,9 0 0 1 -9,-9 9,9 0 0 1 9,-9 9,9 0 0 1 9,9 z m 1.999999,-2e-7 A 10.999999,11 0 0 1 12,21 10.999999,11 0 0 1 0.99999998,9.9999998 10.999999,11 0 0 1 12,-0.99999996 10.999999,11 0 0 1 22.999999,9.9999998 Z\" />\n    <path\n       id=\"path1800\"\n       style=\"fill:currentColor;fill-rule:evenodd;stroke-width:0.1;stroke-linecap:square;stroke-linejoin:round;paint-order:markers stroke fill\"\n       transform=\"scale(0.26458334)\"\n       d=\"M 10,10 A 2,2 0 0 1 8,12 2,2 0 0 1 6,10 2,2 0 0 1 8,8 2,2 0 0 1 10,10 Z\" />\n    <path\n       id=\"path1802\"\n       style=\"fill:currentColor;fill-rule:evenodd;stroke-width:0.1;stroke-linecap:square;stroke-linejoin:round;paint-order:markers stroke fill\"\n       transform=\"matrix(0.26458334,0,0,0.26458334,-0.2645834,0)\"\n       d=\"m 19,10 a 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 2,2 0 0 1 2,2 z\" />\n  </g>\n</svg>\n");

/***/ }),

/***/ 54371:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg height=\"100%\" width=\"100%\" viewBox=\"0,0,2048,2048\" focusable=\"false\">\r\n<path style=\"fill:currentColor\" shape-rendering=\"optimizeQuality\" type=\"path\" class=\"as-font-color-text\"  d=\"M 1504 1408 l -156 -392 h -603 l -152 392 h -145 l 536 -1408 h 132 l 533 1408 m -602 -1236 h -4 l -254 725 h 515 m 744 639 v 512 h -2048 v -512 z\"></path>\r\n<path shape-rendering=\"optimizeQuality\" type=\"path\" class=\"as-font-color-contract\" d=\"M 2048 1536 v 512 h -2048 v -512 m 1920 128 h -1792 v 256 h 1792 z\"></path>\r\n<path shape-rendering=\"optimizeQuality\" type=\"path\" class=\"as-font-color-value\" d=\"M 1984 1984 h -1920 v -384 h 1920 z\"></path>\r\n</svg>");

/***/ }),

/***/ 7870:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg id=\"Layer_2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 240 240\"><path style=\"fill:currentColor\" d=\"M116.4,119.8c0,.3,0,.6-.1.9-3.2,20.7-6.4,42.1-17.3,63.7-8.3,16.4-18.7,25-31,25.5-.4,0-.7,0-1.1,0-19.8,0-33.8-22-35.4-24.6-2.9-4.7-1.4-10.9,3.3-13.7,4.7-2.9,10.9-1.4,13.7,3.3,3.8,6.1,12.2,15,18.4,15s.2,0,.3,0c4.3-.2,9.3-5.4,13.9-14.5,9.1-18.1,12.3-37.1,15.1-55.6h-13.4c-7.1,0-12.9-5.8-12.9-12.9h0c0-7.1,5.8-12.9,12.9-12.9h17.8c3.6-17.2,9.3-34.3,21.6-50.1,16.9-21.7,30.6-22.7,39.1-19.8,11.7,4.1,19,18.2,18.8,36,0,5.5-4.5,9.9-10.1,9.9-5.5,0-9.9-4.6-9.9-10.1.1-9.6-3.1-16.1-5.4-16.9-1.3-.5-7.2,1-16.7,13.2-9,11.6-13.7,24.3-16.9,37.8h16.1c7.1,0,12.9,5.8,12.9,12.9h0c0,7.1-5.8,12.9-12.9,12.9h-20.7ZM181.7,174.2v3.5l6.7,4.9c.6.4.9,1.2.6,1.9v.5c-.1,0-.3,1.1-1,1.8l-7,12.6s-1.4.7-2.1,0l-8.4-3.5c-2.1,1.4-4.2,2.8-6.3,3.5l-1.4,9.1c0,.7-.7,1.4-1.4,1.4h-14.7c-.7,0-1.4,0-1.4-1.4l-1.4-9.1c-2.1-.7-4.9-2.1-6.3-4.2l-8.4,3.5h-2.1l-7-12.6v-2.1l7.7-5.6v-7.7l-7-5.6s-.7-1.4,0-2.1l7.7-12.6s1.4-.7,2.1,0l8.4,3.5c2.1-1.4,3.5-2.8,6.3-3.5l1.4-9.1c0-.7.7-1.4,1.4-1.4h14.7c.7,0,1.4,0,1.4,1.4l1.4,9.1c2.1.7,4.2,2.1,6.3,3.5l8.4-3.5h2.1l7,12.6v2.1l-7.7,5.6v3.5ZM164.9,175.6c0-5.6-4.9-10.5-10.5-10.5s-10.5,4.9-10.5,10.5,4.9,10.5,10.5,10.5,10.5-4.9,10.5-10.5Z\" /></svg>");

/***/ }),

/***/ 81039:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg id=\"Layer_2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 240 240\"><circle cx=\"120\" cy=\"207.26325\" r=\"20.2697\" style=\"fill:none;stroke:currentColor;\" stroke-miterlimit=\"10\" stroke-width=\"20\"/><path  style=\"fill:none;stroke:currentColor;\"  d=\"M119.91441,162.875h-.00004c-10.3258,0-18.86289-8.04674-19.47299-18.3545l-6.17585-104.34288c-.87661-14.81057,10.89792-27.30262,25.73441-27.30262h.00005c14.85315,0,26.63372,12.51893,25.73189,27.34468l-6.3464,104.33265c-.6262,10.29447-9.15758,18.32267-19.47108,18.32267Z\"  stroke-miterlimit=\"10\" stroke-width=\"20\"/></svg>");

/***/ }),

/***/ 20677:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg class=\"procedure-outline-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\" width=\"24px\" height=\"24px\">\r\n<path d=\"M200,19.9H40c-11,0-20,9-20,20v160.1c0,11,9,20,20,20h90v-20.1H40v-110.1h160v110.1h-10v20.1h10c11,0,20-9,20-20V39.9c0-11-9-20-20-20ZM200,70H40v-30.1h160v30.1ZM140,139.9h40v10.1h-10v70h10v9.9h-40v-9.9h10v-70h-10v-10.1Z\" style=\"stroke:none;fill:currentColor\"/>\r\n</svg>");

/***/ }),

/***/ 39314:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\r\n    <path style=\"fill:currentColor\" d=\"M20 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1h-6c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zm-1 2h-4v14h4V5zM6 7c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2H5v1.999L3 11v2l2-.001V15h2v-2.001L9 13v-2l-2-.001V9z\"/>\r\n</svg>");

/***/ }),

/***/ 28791:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\r\n    <path style=\"fill:currentColor\" d=\"M10 3c.552 0 1 .448 1 1v16c0 .552-.448 1-1 1H4c-.552 0-1-.448-1-1V4c0-.552.448-1 1-1h6zM9 5H5v14h4V5zm9 2c2.761 0 5 2.239 5 5s-2.239 5-5 5-5-2.239-5-5 2.239-5 5-5zm1 2h-2v1.999L15 11v2l2-.001V15h2v-2.001L21 13v-2l-2-.001V9z\"/>\r\n</svg>");

/***/ }),

/***/ 15436:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg viewBox=\"0 0 24 24\">\r\n    <path fill=\"currentColor\" d=\"M20 6H4V4H20V6M14.3 12C13.5 12.96 13 14.18 13 15.5C13 16.64 13.43 17.86 14 19V20H4V14H3V12L4 7H20L20.7 10.5C20.04 10.18 19.32 10 18.56 10L18.36 9H5.64L5.04 12H14.3M12 14H6V18H12V14M22 15.5C22 18.1 18.5 22 18.5 22S15 18.1 15 15.5C15 13.6 16.6 12 18.5 12S22 13.6 22 15.5M19.7 15.6C19.7 15 19.1 14.4 18.5 14.4S17.3 14.9 17.3 15.6C17.3 16.2 17.8 16.8 18.5 16.8S19.8 16.2 19.7 15.6Z\" />\r\n</svg>");

/***/ }),

/***/ 77083:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg class=\"procedure-outline-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\" width=\"24px\" height=\"24px\">\r\n<path d=\"M225.5,147.3l-12.8-12.8c-1.9-1.9-5.1-1.9-7,0l-9.5,9.5,19.8,19.8,9.5-9.5c1.9-1.8,1.9-5,0-7h0ZM209.2,170.6l-39.4,39.4-20,20h-19.8v-19.8l.2-.2,19.6-19.6,39.6-39.6,10.5,10.6,9.2,9.3ZM160,20H60c-11-.1-20,8.8-20,19.9v159.9c0,11,8.9,20,20,20h40c0,0,0-29.7,0-29.7h-40V49.9l100,.2v69.7h20c0,0,0-79.7,0-79.7,0-11-8.9-20-20-20ZM65,39.7c-2.8,0-5-2.2-5-5s2.2-5,5-5,5,2.2,5,5-2.2,5-5,5ZM140,34.6c0,2.8-2.3,5.1-5.1,5.1h-49.9c-2.8,0-5.1-2.3-5.1-5.1v-5.1h60v5.1ZM120,169.9\" style=\"stroke:none;fill:currentColor\"/>\r\n</svg>");

/***/ }),

/***/ 55073:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg class=\"procedure-outline-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\" width=\"24px\" height=\"24px\">\r\n<polygon xmlns=\"http://www.w3.org/2000/svg\" points=\"190 130 190 119.9 150 119.9 150 130 160 130 160 200 150 200 150 209.9 190 209.9 190 200 180 200 180 130 190 130\" style=\"fill:currentColor; stroke: none\"/>\r\n<path xmlns=\"http://www.w3.org/2000/svg\" d=\"M60,180V39.9l100,.2v69.7h20c0,0,0-79.7,0-79.7,0-11-8.9-20-20-20H60c-11-.1-20,8.8-20,19.9v159.9c0,11,8.9,20,20,20h40c0,0,40,0,40,0v-29.8H60ZM80,20h60v5.1c0,2.8-2.3,5.1-5.1,5.1h-49.9c-2.8,0-5.1-2.3-5.1-5.1v-5.1ZM65,20c2.8,0,5,2.2,5,5s-2.2,5-5,5-5-2.2-5-5,2.2-5,5-5Z\" style=\"fill:currentColor; stroke: none\"/>\r\n</svg>");

/***/ }),

/***/ 50296:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg class=\"procedure-outline-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\" width=\"24px\" height=\"24px\">\r\n<path d=\"M160,20.3H60c-11-.1-20,8.8-20,19.9v159.9c0,11,8.9,20,20,20h40c0,0,22.9,0,22.9,0-12.1-7-22.1-17.4-28.7-29.8h-34.3V50.1l100,.2v98.3c6.9,0,13.6,1,20,2.7V40.3c0-11-8.9-20-20-20ZM65,40.2c-2.8,0-5-2.2-5-5s2.2-5,5-5,5,2.2,5,5-2.2,5-5,5ZM140,35.3c0,2.8-2.3,5.1-5.1,5.1h-49.9c-2.8,0-5.1-2.3-5.1-5.1v-5.1h60v5.1ZM160,158.6c-21.8,0-40.7,12.5-50,30.7,9.3,18.2,28.2,30.7,50,30.7s40.7-12.5,50-30.7c-9.3-18.2-28.2-30.7-50-30.7ZM160,208c-10.3,0-18.7-8.4-18.7-18.7s8.4-18.7,18.7-18.7,18.7,8.4,18.7,18.7-8.4,18.7-18.7,18.7ZM160,180.6c-4.8,0-8.7,3.9-8.7,8.7s3.9,8.7,8.7,8.7,8.7-3.9,8.7-8.7-3.9-8.7-8.7-8.7Z\" style=\"fill:currentColor; stroke: none\"/></svg>");

/***/ }),

/***/ 24722:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg class=\"procedure-outline-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\" width=\"24px\" height=\"24px\">\r\n<path d=\"M200,19.6H40c-11,0-20,8.9-20,20v160.1c0,11,9,20,20,20h89.6c-8.7-5.1-16.2-12-22.2-20.1H40v-110.1h160v66.7c7.4,3.6,14.2,8.5,20,14.3V39.6c0-11.1-9-20-20-20ZM200,69.7H40v-30.1h160v30.1ZM167.4,158.6c-21.8,0-40.7,12.5-50,30.7,9.3,18.2,28.2,30.7,50,30.7s40.7-12.5,50-30.7c-9.3-18.2-28.2-30.7-50-30.7ZM167.4,208c-10.3,0-18.7-8.4-18.7-18.7s8.4-18.7,18.7-18.7,18.7,8.4,18.7,18.7-8.4,18.7-18.7,18.7ZM176.2,189.3c0,4.8-3.9,8.7-8.7,8.7s-8.7-3.9-8.7-8.7,3.9-8.7,8.7-8.7,8.7,3.9,8.7,8.7Z\" style=\"stroke:none;fill:currentColor\"/>\r\n</svg>");

/***/ }),

/***/ 55330:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg class=\"procedure-outline-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\" width=\"24px\" height=\"24px\">\r\n<path d=\"M183.9,209.9h-72.5l35.9-89.9L111.4,30h72.5l35.9,89.9-35.9,89.9ZM140.9,189.9h29.4l27.9-69.9-27.9-69.9h-29.4l27.9,69.9-27.9,69.9ZM89.8,209.9H17.3l35.9-89.9L17.3,30h72.5l35.9,89.9-35.9,89.9ZM46.8,189.9h29.4l27.9-69.9-27.9-69.9h-29.4l27.9,69.9-27.9,69.9Z\" style=\"stroke:none;fill:currentColor\"/>\r\n</svg>");

/***/ }),

/***/ 42592:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg class=\"process-outline-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\">\r\n<path style=\"stroke:none;fill:currentColor\" d=\"M12,15.9h-.4c-2.2,0-4-1.8-4-4s1.8-4,4-4,4.2,1.9,4,4.4c-1.7.6-3,1.9-3.6,3.6M13.6,11.9c0-1.1-.9-2-2-2s-2,.9-2,2,.9,2,2,2,2-.9,2-2M22.6,19.3c0,0,.1.2,0,.3l-1,1.8c0,0-.2.1-.3,0l-1.2-.5c-.3.2-.6.4-.9.5l-.2,1.3c0,.1-.1.2-.2.2h-2.1c-.1,0-.2,0-.2-.2l-.2-1.3c-.3-.1-.7-.3-.9-.6l-1.2.5c0,0-.2,0-.3,0l-1-1.8c0,0,0-.2,0-.3l1.1-.8c0-.2,0-.3,0-.5s0-.4,0-.6l-1-.8c0,0-.1-.2,0-.3l1.1-1.8c0,0,.2-.1.3,0l1.2.5h0c.3-.2.5-.4.9-.5h0s.2-1.3.2-1.3c0-.1.1-.2.2-.2h2.1c.1,0,.2,0,.2.2l.2,1.3h0c.3.1.6.3.9.5h0s1.2-.5,1.2-.5c0,0,.2,0,.3,0l1,1.8c0,0,0,.2,0,.3l-1.1.8h0c0,.2,0,.4,0,.5s0,.3,0,.5h0s1.1.8,1.1.8ZM17.8,16.5c-.8,0-1.5.7-1.5,1.5s.7,1.5,1.5,1.5,1.5-.7,1.5-1.5-.7-1.5-1.5-1.5ZM21.4,8.7l-2-3.5c-.1-.2-.4-.2-.6-.2l-2.5,1c-.5-.4-1.1-.8-1.7-1l-.4-2.7c0-.2-.3-.4-.5-.4h-4c-.3,0-.5.2-.5.4l-.4,2.7c-.6.3-1.2.6-1.7,1l-2.5-1c-.2,0-.5,0-.6.2l-2,3.5c0,.2,0,.5,0,.6l2.1,1.6v2l-2.1,1.7c0,.1-.2.4,0,.6l2,3.5c0,.2.4.2.6.2l2.5-1c.5.4,1.1.8,1.7,1l.4,2.6c0,.2.3.4.5.4h3.4c-.5-.6-.8-1.1-1.1-1.9h-1.1l-.4-2.6c-1.2-.3-2.2-.9-3-1.8l-2.4,1-.8-1.3,2.1-1.6c-.4-1.2-.4-2.4,0-3.6l-2.1-1.6.8-1.3,2.4,1c.7-.9,1.8-1.6,3-1.8l.4-2.6h1.5l.4,2.6c1.2.3,2.2.9,3,1.8l2.4-1,.8,1.3-2.1,1.6c.2.6.3,1.2.3,1.8h.5c.5,0,1,0,1.5.2v-1.2l2.1-1.6c.1,0,.2-.4.1-.6Z\"/>\r\n</svg>");

/***/ }),

/***/ 8161:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg width=\"$width\" height=\"$height\" version=\"1.1\" viewBox=\"0 0 $width $height\" xmlns=\"http://www.w3.org/2000/svg\">\r\n    <g fill=\"none\" stroke=\"#f00\">\r\n        <path d=\"m0 0 $width $height\"/>\r\n        <path d=\"m$width 0-$width $heightz\" stroke-width=\"1px\"/>\r\n    </g>\r\n</svg>\r\n");

/***/ }),

/***/ 40420:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg class=\"as-spinner-ico\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"  viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\">\r\n    <g><circle cx=\"73.801\" cy=\"68.263\" fill=\"#e15b64\" r=\"4\">\r\n        <animateTransform attributeName=\"transform\" type=\"rotate\" calcMode=\"spline\" values=\"0 50 50;360 50 50\" times=\"0;1\" keySplines=\"0.5 0 0.5 1\" repeatCount=\"indefinite\" dur=\"1.4925373134328357s\" begin=\"0s\"></animateTransform>\r\n    </circle><circle cx=\"68.263\" cy=\"73.801\" fill=\"#f47e60\" r=\"4\">\r\n        <animateTransform attributeName=\"transform\" type=\"rotate\" calcMode=\"spline\" values=\"0 50 50;360 50 50\" times=\"0;1\" keySplines=\"0.5 0 0.5 1\" repeatCount=\"indefinite\" dur=\"1.4925373134328357s\" begin=\"-0.062s\"></animateTransform>\r\n    </circle><circle cx=\"61.481\" cy=\"77.716\" fill=\"#f8b26a\" r=\"4\">\r\n        <animateTransform attributeName=\"transform\" type=\"rotate\" calcMode=\"spline\" values=\"0 50 50;360 50 50\" times=\"0;1\" keySplines=\"0.5 0 0.5 1\" repeatCount=\"indefinite\" dur=\"1.4925373134328357s\" begin=\"-0.125s\"></animateTransform>\r\n    </circle><circle cx=\"53.916\" cy=\"79.743\" fill=\"#abbd81\" r=\"4\">\r\n        <animateTransform attributeName=\"transform\" type=\"rotate\" calcMode=\"spline\" values=\"0 50 50;360 50 50\" times=\"0;1\" keySplines=\"0.5 0 0.5 1\" repeatCount=\"indefinite\" dur=\"1.4925373134328357s\" begin=\"-0.187s\"></animateTransform>\r\n    </circle><circle cx=\"46.084\" cy=\"79.743\" fill=\"#849b87\" r=\"4\">\r\n        <animateTransform attributeName=\"transform\" type=\"rotate\" calcMode=\"spline\" values=\"0 50 50;360 50 50\" times=\"0;1\" keySplines=\"0.5 0 0.5 1\" repeatCount=\"indefinite\" dur=\"1.4925373134328357s\" begin=\"-0.25s\"></animateTransform>\r\n    </circle><circle cx=\"38.519\" cy=\"77.716\" fill=\"#6492ac\" r=\"4\">\r\n        <animateTransform attributeName=\"transform\" type=\"rotate\" calcMode=\"spline\" values=\"0 50 50;360 50 50\" times=\"0;1\" keySplines=\"0.5 0 0.5 1\" repeatCount=\"indefinite\" dur=\"1.4925373134328357s\" begin=\"-0.312s\"></animateTransform>\r\n    </circle><circle cx=\"31.737\" cy=\"73.801\" fill=\"#637cb5\" r=\"4\">\r\n        <animateTransform attributeName=\"transform\" type=\"rotate\" calcMode=\"spline\" values=\"0 50 50;360 50 50\" times=\"0;1\" keySplines=\"0.5 0 0.5 1\" repeatCount=\"indefinite\" dur=\"1.4925373134328357s\" begin=\"-0.375s\"></animateTransform>\r\n    </circle><circle cx=\"26.199\" cy=\"68.263\" fill=\"#6a63b6\" r=\"4\">\r\n        <animateTransform attributeName=\"transform\" type=\"rotate\" calcMode=\"spline\" values=\"0 50 50;360 50 50\" times=\"0;1\" keySplines=\"0.5 0 0.5 1\" repeatCount=\"indefinite\" dur=\"1.4925373134328357s\" begin=\"-0.437s\"></animateTransform>\r\n    </circle><animateTransform attributeName=\"transform\" type=\"rotate\" calcMode=\"spline\" values=\"0 50 50;0 50 50\" times=\"0;1\" keySplines=\"0.5 0 0.5 1\" repeatCount=\"indefinite\" dur=\"1.4925373134328357s\"></animateTransform></g>\r\n</svg>");

/***/ }),

/***/ 15608:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg\n   viewBox=\"0 0 24 24\"\n   version=\"1.1\"\n   xmlns=\"http://www.w3.org/2000/svg\"\n   xmlns:svg=\"http://www.w3.org/2000/svg\"\n   class=\"as-toggle-header-ico\">\n  <path\n     class=\"as-icon-table\"\n     d=\"M 1 1 L 1 1.5 L 1 23 L 23 23 L 23 1 L 1 1 z M 2 2 L 22 2 L 22 10 L 2 10 L 2 2 z M 2 11 L 5 11 L 5 14 L 2 14 L 2 11 z M 6 11 L 9 11 L 9 14 L 6 14 L 6 11 z M 10 11 L 14 11 L 14 14 L 10 14 L 10 11 z M 15 11 L 18 11 L 18 14 L 15 14 L 15 11 z M 19 11 L 22 11 L 22 14 L 19 14 L 19 11 z M 2 15 L 5 15 L 5 18 L 2 18 L 2 15 z M 6 15 L 9 15 L 9 18 L 6 18 L 6 15 z M 10 15 L 14 15 L 14 18 L 10 18 L 10 15 z M 15 15 L 18 15 L 18 18 L 15 18 L 15 15 z M 19 15 L 22 15 L 22 18 L 19 18 L 19 15 z M 2 19 L 5 19 L 5 22 L 2 22 L 2 19 z M 6 19 L 9 19 L 9 22 L 6 22 L 6 19 z M 10 19 L 14 19 L 14 22 L 10 22 L 10 19 z M 15 19 L 18 19 L 18 22 L 15 22 L 15 19 z M 19 19 L 22 19 L 22 22 L 19 22 L 19 19 z \" />\n  <path\n     style=\"fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;\"\n     d=\"m 9,6 h 6\"\n      class=\"as-icon-minus\" />\n  <path\n     style=\"fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;\"\n     d=\"M 12,9 V 3\"\n     class=\"as-icon-add\" />\n</svg>\n");

/***/ }),

/***/ 70858:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg class=\"procedure-outline-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\" width=\"24px\" height=\"24px\">\r\n<path d=\"M200.1,20H39.9c-11,0-19.9,8.9-19.9,19.9v160.2c0,11,8.9,19.9,19.9,19.9h160.1c11,0,19.9-8.9,19.9-19.9V39.9c0-11-8.9-19.9-19.9-19.9ZM120,190c0,5.5-4.5,10-10,10h-60c-5.5,0-10-4.5-10-10v-80c0-5.5,4.5-10,10-10h60c5.5,0,10,4.5,10,10v80ZM200,190c0,5.5-4.5,10-10,10h-50c-5.5,0-10-4.5-10-10v-30c0-5.5,4.5-10,10-10h50c5.5,0,10,4.5,10,10v30ZM200,130c0,5.5-4.5,10-10,10h-50c-5.5,0-10-4.5-10-10v-20c0-5.5,4.5-10,10-10h50c5.5,0,10,4.5,10,10v20ZM200,80c0,5.5-4.5,10-10,10H50c-5.5,0-10-4.5-10-10v-30c0-5.5,4.5-10,10-10h140c5.5,0,10,4.5,10,10v30Z\" style=\"stroke:none;fill:currentColor\"/>\r\n</svg>");

/***/ }),

/***/ 24453:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg id=\"Layer_2\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\"><path style=\"fill:currentColor\" d=\"M160.1,144.7c-6.2-2.8-13-4.3-20.2-4.4h-.2c-27.5,0-49.9,22.3-49.9,49.9s22.3,49.9,49.9,49.9,49.9-22.3,49.9-49.9-1.5-14-4.3-20.2c-5-11.2-14-20.3-25.2-25.3ZM153.9,215.1c-2.8,2.4-5.9,4-9.5,4.7v5.3h-10.1v-5c-2.7-.2-5.2-.7-7.4-1.4-5.1-1.6-7.6-4.1-7.6-7.5s.5-3.1,1.5-4.2c1-1.1,2.3-1.7,3.9-1.7s3.3.6,6.4,1.6c1.2.4,2.2.8,3.2,1,1.6.4,3,.6,4.1.6,2.6,0,4.6-.6,6-1.9,0,0,0,0,.1,0,1.5-1.3,2.2-3,2.2-5.1s-.8-2.7-2.3-3.8c-1.1-.8-2.7-1.6-4.7-2.2-2-.6-3.8-1.2-5.4-1.7-4.3-1.4-6.9-2.4-7.8-2.9-4.8-2.7-7.1-6.8-7.1-12.3s2-10,5.9-13.4c2.6-2.2,5.6-3.8,9-4.5v-5.3h10.1v5.1c1.7.3,3.4.7,5,1.3,4.2,1.5,6.3,3.7,6.3,6.5s-.5,3-1.5,4.2c-1,1.2-2.3,1.8-3.9,1.8s-2.3-.2-3.7-.7c-.8-.3-1.5-.5-2.2-.7-2.2-.7-3.9-1-5.1-1-1.9,0-3.4.4-4.8,1.3-.1,0-.2.2-.3.2-1.1.9-1.7,2.1-1.7,3.7s.5,2,1.7,2.8c1.2.9,3,1.7,5.4,2.5,1.7.5,3.3,1.1,4.7,1.6,4.1,1.4,6.9,2.6,8.5,3.6,4.8,3.1,7.1,7.7,7.1,13.8s-2,10.2-6.1,13.7ZM80.2,199.9c.8,7.1,3,13.9,6.2,20H30c-11,0-20-9-20-20V40.2c0-11,9-20,20-20h159.8c11,0,20,8.9,20,20v42.8c-5.2-1.6-10.8-2.5-16.6-2.5s-2.1,0-3.2,0v-20.6c0-11-9-20-20-20H50c-11,0-20,8.9-20,20v120c0,11,9,20,20,20h30.2ZM239.7,140.3c0,24.2-17.3,44.4-40.1,48.9-.1-6.9-1.4-13.4-3.6-19.6,13.6-2.8,23.9-14.9,23.9-29.4s-13.4-30-30-30-26.5,10.2-29.3,23.7c-6.1-2.3-12.7-3.6-19.5-3.7,4.6-22.8,24.8-39.9,48.9-39.9s49.9,22.3,49.9,49.9ZM199.7,158.1l-15-13.2,1.4-26.3c.1-2,1.8-3.6,3.8-3.6s3.6,1.5,3.8,3.5l1.5,22,10.1,12.2c1.3,1.6,1.1,3.9-.5,5.2h0c-1.4,1.3-3.5,1.2-4.9,0ZM159.8,90.3H49.8v-20h110v20ZM119.8,130.1H49.8v-20h70v20ZM49.8,160.1h20.1v20.1h-20.1v-20.1Z\"/></svg>");

/***/ }),

/***/ 85792:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<svg class=\"procedure-outline-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 240 240\" width=\"24px\" height=\"24px\">\r\n<path d=\"M225.5,144.3l-9.5,9.5-19.8-19.8,9.5-9.5c1.8-1.9,5-1.9,7,0l12.8,12.8c1.9,1.9,1.9,5.1,0,7ZM60,180.4h50v19.6H40c-11,0-20-9-20-20V49.9c0-11,9-20,20-20h160c11,0,20,9,20,20v60h-20v-40H40v90.5c0,11,9,20,20,20ZM170,50c0,5.5,4.5,10,10,10s10-4.5,10-10-4.5-10-10-10-10,4.5-10,10ZM140,50c0,5.5,4.5,10,10,10s10-4.5,10-10-4.5-10-10-10-10,4.5-10,10ZM110,50c0,5.5,4.5,10,10,10s10-4.5,10-10-4.5-10-10-10-10,4.5-10,10ZM189.5,140.8l-39.6,39.6-19.6,19.6-.2.2v19.8h19.8l20-20,39.4-39.4-9.2-9.3-10.5-10.6Z\" style=\"stroke:none;fill:currentColor\"/>\r\n</svg>");

/***/ }),

/***/ 37828:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("\r\n.as-ck-alert {\r\n    padding: .75rem 1.25rem;\r\n    margin-bottom: 1rem;\r\n    border: 1px solid transparent;\r\n    border-radius: .188rem;\r\n}\r\n\r\n.as-ck-alert.as-variant-notice {\r\n    color: #7b5700;\r\n    background-color: #fbedcc;\r\n    border-color: #fae6b8;\r\n}\r\n\r\n.as-ck-alert.as-variant-warning {\r\n    color: #852d19;\r\n    background-color: #ffddd6;\r\n    border-color: #ffd0c5;\r\n}\r\n\r\n.as-ck-alert.as-variant-info {\r\n    color: #352c64;\r\n    background-color: #e0ddf2;\r\n    border-color: #d4cfed;\r\n}\r\n\r\n.as-ck-alert.as-variant-success {\r\n    color: #2a601f;\r\n    background-color: #dcf1d8;\r\n    border-color: #ceebc8;\r\n}\r\n\r\n\r\n.cke_contents_ltr ul {\r\n    list-style: none;\r\n}\r\n\r\n.cke_contents_ltr ul li {\r\n    position: relative;\r\n}\r\n\r\n.cke_contents_ltr ul li::before {\r\n    color: #007bff;\r\n    content: '●';\r\n    position: absolute;\r\n    left: -1.2em;\r\n    top: -0.1em;\r\n    display: inline-block;\r\n}\r\n\r\n.cke_contents_ltr thead {\r\n    background-color: #d6d6d6;\r\n\r\n}\r\n\r\n.cke_contents_ltr table {\r\n    border-collapse: collapse;\r\n}\r\n\r\n.cke_contents_ltr table[align=\"center\"] {\r\n    margin-left: auto;\r\n    margin-right: auto;\r\n}\r\n\r\n.cke_contents_ltr table[align=\"right\"] {\r\n    margin-left: auto;\r\n}\r\n\r\n\r\n.cke_contents_ltr thead td {\r\n    padding: 10px;\r\n    border: 1px solid #efefef;\r\n    font-weight: bold;\r\n}\r\n\r\n.cke_contents_ltr thead td:last-child {\r\n    border-right-color: #dddddd;\r\n}\r\n\r\n\r\n.cke_contents_ltr thead td:first-child {\r\n    border-left-color: #dddddd;\r\n}\r\n\r\n\r\n.cke_contents_ltr tbody td {\r\n\r\n}\r\n\r\n.cke_contents_ltr tbody tr:nth-child(odd) {\r\n    background-color: rgb(245, 245, 245);\r\n}\r\n\r\n.cke_contents_ltr tbody tr:nth-child(even) {\r\n    background-color: white;\r\n}\r\n\r\n.cke_contents_ltr tbody td {\r\n    padding: 5px 10px;\r\n    border: 1px solid #ddd;\r\n}\r\n\r\n\r\n.cke_button_icon.cke_button__insert_expression_icon {\r\n    background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiICB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgIDxwYXRoIGZpbGw9IiMwMDAwMDAiIGQ9Ik01LDNIN1Y1SDVWMTBBMiwyIDAgMCwxIDMsMTJBMiwyIDAgMCwxIDUsMTRWMTlIN1YyMUg1QzMuOTMsMjAuNzMgMywyMC4xIDMsMTlWMTVBMiwyIDAgMCwwIDEsMTNIMFYxMUgxQTIsMiAwIDAsMCAzLDlWNUEyLDIgMCAwLDEgNSwzTTE5LDNBMiwyIDAgMCwxIDIxLDVWOUEyLDIgMCAwLDAgMjMsMTFIMjRWMTNIMjNBMiwyIDAgMCwwIDIxLDE1VjE5QTIsMiAwIDAsMSAxOSwyMUgxN1YxOUgxOVYxNEEyLDIgMCAwLDEgMjEsMTJBMiwyIDAgMCwxIDE5LDEwVjVIMTdWM0gxOU0xMiwxNUExLDEgMCAwLDEgMTMsMTZBMSwxIDAgMCwxIDEyLDE3QTEsMSAwIDAsMSAxMSwxNkExLDEgMCAwLDEgMTIsMTVNOCwxNUExLDEgMCAwLDEgOSwxNkExLDEgMCAwLDEgOCwxN0ExLDEgMCAwLDEgNywxNkExLDEgMCAwLDEgOCwxNU0xNiwxNUExLDEgMCAwLDEgMTcsMTZBMSwxIDAgMCwxIDE2LDE3QTEsMSAwIDAsMSAxNSwxNkExLDEgMCAwLDEgMTYsMTVaIiAvPgo8L3N2Zz4=');\r\n    background-position: 0 0px;\r\n    background-size: 16px;\r\n}\r\n\r\n.cke_button_icon.cke_button__insert_variable_icon {\r\n    background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiICB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgIDxwYXRoIGZpbGw9IiMwMDAwMDAiIGQ9Ik0yMC40MSwzQzIxLjgsNS43MSAyMi4zNSw4Ljg0IDIyLDEyQzIxLjgsMTUuMTYgMjAuNywxOC4yOSAxOC44MywyMUwxNy4zLDIwQzE4LjkxLDE3LjU3IDE5Ljg1LDE0LjggMjAsMTJDMjAuMzQsOS4yIDE5Ljg5LDYuNDMgMTguNyw0TDIwLjQxLDNNNS4xNywzTDYuNyw0QzUuMDksNi40MyA0LjE1LDkuMiA0LDEyQzMuNjYsMTQuOCA0LjEyLDE3LjU3IDUuMywyMEwzLjYxLDIxQzIuMjEsMTguMjkgMS42NSwxNS4xNyAyLDEyQzIuMiw4Ljg0IDMuMyw1LjcxIDUuMTcsM00xMi4wOCwxMC42OEwxNC40LDcuNDVIMTYuOTNMMTMuMTUsMTIuNDVMMTUuMzUsMTcuMzdIMTMuMDlMMTEuNzEsMTRMOS4yOCwxNy4zM0g2Ljc2TDEwLjY2LDEyLjIxTDguNTMsNy40NUgxMC44TDEyLjA4LDEwLjY4WiIgLz4KPC9zdmc+');\r\n    background-position: 0 0px;\r\n    background-size: 16px;\r\n}\r\n\r\n.cke_button_icon.cke_button__insert_dynamic_link_icon {\r\n    background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiICB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+CiAgIDxwYXRoIGZpbGw9IiMwMDAwMDAiIGQ9Ik0zIDFDMS44OSAxIDEgMS44OSAxIDNWMTRDMSAxNS4xMSAxLjg5IDE2IDMgMTZIMTRDMTUuMTEgMTYgMTYgMTUuMTEgMTYgMTRWMTFIMTRWMTRIM1YzSDE0VjVIMTZWM0MxNiAxLjg5IDE1LjExIDEgMTQgMU05IDdDNy44OSA3IDcgNy44OSA3IDlWMTJIOVY5SDIwVjIwSDlWMThIN1YyMEM3IDIxLjExIDcuODkgMjIgOSAyMkgyMEMyMS4xMSAyMiAyMiAyMS4xMSAyMiAyMFY5QzIyIDcuODkgMjEuMTEgNyAyMCA3SDkiIC8+Cjwvc3ZnPg==');\r\n    background-position: 0 0px;\r\n    background-size: 16px;\r\n}\r\n\r\n\r\n.cke_button_icon.cke_button__mdi_dialog_icon {\r\n    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIsMkg4VjRIMTZWMkgyMlY4SDIwVjE2SDIyVjIySDE2VjIwSDhWMjJIMlYxNkg0VjhIMlYyTTE2LDhWNkg4VjhINlYxNkg4VjE4SDE2VjE2SDE4VjhIMTZNNCw0VjZINlY0SDRNMTgsNFY2SDIwVjRIMThNNCwxOFYyMEg2VjE4SDRNMTgsMThWMjBIMjBWMThIMThaIiAvPjwvc3ZnPg==');\r\n    background-position: 0 0px;\r\n    background-size: 16px;\r\n}\r\n\r\n\r\n\r\n.as-ck-widget-expression {\r\n    color: #1da1ff;\r\n}\r\n\r\n.as-ck-widget-variable {\r\n    color: #144f25;\r\n}\r\n\r\n.as-ck-widget-mdi {\r\n    display: inline-block;\r\n    width: 1.5em;\r\n    height: 1.5em;\r\n    position: relative;\r\n    vertical-align: baseline;\r\n}\r\n.as-ck-widget-mdi.mdi::before {\r\n    display: block;\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    text-align: center;\r\n    font-size: 1.5em;\r\n    line-height: 1;\r\n}\r\n\r\n\r\n.cke_button__image_mgn_dialog_icon {\r\n    background: url($basePath/plugins/icons.png) no-repeat 0 -960px !important;\r\n}\r\n\r\n\r\nbody .cke_contents_ltr h1,\r\nbody .cke_contents_ltr h2,\r\nbody .cke_contents_ltr h3,\r\nbody .cke_contents_ltr h4,\r\nbody .cke_contents_ltr h5,\r\nbody .cke_contents_ltr h6 {\r\n    font-weight: normal;\r\n    line-height: 1.2;\r\n}\r\n\r\nbody .cke_contents_ltr {\r\n    line-height: 1.6;\r\n    font-size: inherit;\r\n    font-family: sans-serif, Arial, Verdana, \"Trebuchet MS\", \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\r\n    background-color: #fff;\r\n    word-wrap: break-word;\r\n    text-align: left;\r\n}\r\n\r\n.cke_contents_ltr blockquote {\r\n    font-style: italic;\r\n    font-family: inherit;\r\n    border-style: solid;\r\n    border-color: #ccc;\r\n    border-width: 0;\r\n    padding-left: 20px;\r\n    padding-right: 8px;\r\n    border-left-width: 5px;\r\n}\r\n\r\nbody .cke_contents_ltr a {\r\n    color: #0782C1;\r\n}\r\n\r\nbody .cke_contents_ltr ol,\r\nbody .cke_contents_ltr ul,\r\nbody .cke_contents_ltr dl {\r\n    /* IE7: reset rtl list margin. (#7334) */\r\n    *margin-right: 0px;\r\n    /* Preserved spaces for list items with text direction different than the list. (#6249,#8049)*/\r\n    padding: 0 40px;\r\n}\r\n\r\n\r\nbody.cke_contents_ltr { /*editor*/\r\n    font-size: 14px;\r\n}\r\n\r\n\r\nbody .cke_contents_ltr hr\r\n{\r\n    border: 0px;\r\n    border-top: 1px solid #ccc;\r\n}\r\n\r\nbody .cke_contents_ltr img.right\r\n{\r\n    border: 1px solid #ccc;\r\n    float: right;\r\n    margin-left: 15px;\r\n    padding: 5px;\r\n}\r\n\r\nbody .cke_contents_ltr img.left\r\n{\r\n    border: 1px solid #ccc;\r\n    float: left;\r\n    margin-right: 15px;\r\n    padding: 5px;\r\n}\r\n\r\nbody .cke_contents_ltr pre\r\n{\r\n    white-space: pre-wrap; /* CSS 2.1 */\r\n    word-wrap: break-word; /* IE7 */\r\n    -moz-tab-size: 4;\r\n    tab-size: 4;\r\n}\r\n\r\nbody .cke_contents_ltr .marker\r\n{\r\n    background-color: Yellow;\r\n}\r\n\r\nbody .cke_contents_ltr span[lang]\r\n{\r\n    font-style: italic;\r\n}\r\n\r\nbody .cke_contents_ltr figure\r\n{\r\n    text-align: center;\r\n    outline: solid 1px #ccc;\r\n    background: rgba(0,0,0,0.05);\r\n    padding: 10px;\r\n    margin: 10px 20px;\r\n    display: inline-block;\r\n}\r\n\r\nbody .cke_contents_ltr figure > figcaption\r\n{\r\n    text-align: center;\r\n    display: block; /* For IE8 */\r\n}\r\n\r\nbody .cke_contents_ltr a > img {\r\n    padding: 1px;\r\n    margin: 1px;\r\n    border: none;\r\n    outline: 1px solid #0782C1;\r\n}\r\n\r\n/* Widget Styles */\r\nbody .cke_contents_ltr .code-featured\r\n{\r\n    border: 5px solid red;\r\n}\r\n\r\nbody .cke_contents_ltr .math-featured\r\n{\r\n    padding: 20px;\r\n    box-shadow: 0 0 2px rgba(200, 0, 0, 1);\r\n    background-color: rgba(255, 0, 0, 0.05);\r\n    margin: 10px;\r\n}\r\n\r\nbody .cke_contents_ltr .image-clean\r\n{\r\n    border: 0;\r\n    background: none;\r\n    padding: 0;\r\n}\r\n\r\nbody .cke_contents_ltr .image-clean > figcaption\r\n{\r\n    font-size: .9em;\r\n    text-align: right;\r\n}\r\n\r\nbody .cke_contents_ltr .image-grayscale\r\n{\r\n    background-color: white;\r\n    color: #666;\r\n}\r\n\r\nbody .cke_contents_ltr .image-grayscale img, img.image-grayscale\r\n{\r\n    filter: grayscale(100%);\r\n}\r\n\r\nbody .cke_contents_ltr .embed-240p\r\n{\r\n    max-width: 426px;\r\n    max-height: 240px;\r\n    margin:0 auto;\r\n}\r\n\r\nbody .cke_contents_ltr .embed-360p\r\n{\r\n    max-width: 640px;\r\n    max-height: 360px;\r\n    margin:0 auto;\r\n}\r\n\r\nbody .cke_contents_ltr .embed-480p\r\n{\r\n    max-width: 854px;\r\n    max-height: 480px;\r\n    margin:0 auto;\r\n}\r\n\r\nbody .cke_contents_ltr .embed-720p\r\n{\r\n    max-width: 1280px;\r\n    max-height: 720px;\r\n    margin:0 auto;\r\n}\r\n\r\nbody .cke_contents_ltr .embed-1080p\r\n{\r\n    max-width: 1920px;\r\n    max-height: 1080px;\r\n    margin:0 auto;\r\n}\r\n");

/***/ }),

/***/ 77053:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("/******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 627:\n/***/ ((__unused_webpack_module, exports) => {\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.longestCommonSubTokens = longestCommonSubTokens;\n\n/**\n * @typedef TokenPair\n * @property {Token} lToken\n * @property {Token} rToken\n * \n * @typedef LCSTResult\n * @property {Number} score\n * @property {Array<TokenPair>} subExtraMatched\n * @property {Boolean} isExtraMatched\n * \n * @param {Array<Token>} lTokens \n * @param {Array<Token>} rTokens\n * @returns {LCSTResult} \n */\nfunction longestCommonSubTokens(lTokens, rTokens) {\n  var Q = Array(lTokens.length + 1).fill(null).map(function (u, i) {\n    return Array(rTokens.length + 1).fill(0);\n  }); //QHD\n\n  for (var i = 0; i < lTokens.length; ++i) {\n    for (var j = 0; j < rTokens.length; ++j) {\n      Q[i + 1][j + 1] = Math.max(Q[i][j + 1], Q[i + 1][j]);\n\n      if (lTokens[i].value == rTokens[j].value) {\n        Q[i + 1][j + 1] = Math.max(Q[i + 1][j + 1], Q[i][j] + rTokens[j].score);\n      }\n    }\n  } //trace\n\n\n  var subExtraMatched = [];\n  var i = lTokens.length;\n  var j = rTokens.length;\n  var score = 0;\n\n  while (i > 0 && j > 0) {\n    if (Q[i][j] == 0) break;\n\n    while (Q[i][j] == Q[i][j - 1]) {\n      --j;\n    }\n\n    while (Q[i][j] == Q[i - 1][j]) {\n      --i;\n    }\n\n    score += lTokens[i - 1].score;\n    subExtraMatched.push({\n      lToken: lTokens[i - 1],\n      rToken: rTokens[j - 1]\n    });\n    --j;\n    --i;\n  }\n\n  subExtraMatched = subExtraMatched.reverse();\n  return {\n    subExtraMatched: subExtraMatched,\n    isExtraMatched: subExtraMatched.length == lTokens.length && subExtraMatched.length == rTokens.length,\n    score: score\n  };\n}\n\n;\n\n/***/ }),\n\n/***/ 560:\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.diffByLineText = diffByLineText;\nexports.diffSingleText = diffSingleText;\n\nvar _string = __webpack_require__(733);\n\nvar _agorithm = __webpack_require__(627);\n\nvar _Segment = _interopRequireDefault(__webpack_require__(936));\n\nvar _Trapezium = _interopRequireDefault(__webpack_require__(622));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n// AbsolDiff\n// tokenize\nvar FLAG_MATCHED = 1;\nvar FLAG_NOT_MATCHED = -1;\n/**\n * \n * @typedef CLTResult\n * @property {Boolean} isExtraMatched\n * \n * @param {String} lText \n * @param {String} rText \n * @returns {Array<Trapezium>}\n */\n\nfunction diffSingleText(lText, rText) {\n  if (lText == rText) {\n    return [(0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(0, lText.length), (0, _Segment[\"default\"])(0, rText.length), FLAG_MATCHED)];\n  }\n\n  var lToken = (0, _string.tokenize)(lText);\n  var rTokens = (0, _string.tokenize)(rText);\n  var lcst = (0, _agorithm.longestCommonSubTokens)(lToken, rTokens);\n  var cmpPairsRd = lcst.subExtraMatched.reduce(function (ac, pair) {\n    var last = ac.last;\n    var lBw = last.left.betweenSegment(pair.lToken.range);\n    var rBw = last.right.betweenSegment(pair.rToken.range);\n    var newTpzm = new _Trapezium[\"default\"](lBw, rBw);\n\n    if (newTpzm.square() > 0) {\n      newTpzm.color = FLAG_NOT_MATCHED;\n      ac.result.push(newTpzm);\n    }\n\n    newTpzm = new _Trapezium[\"default\"](pair.lToken.range, pair.rToken.range);\n    newTpzm.color = FLAG_MATCHED;\n    ac.result.push(newTpzm);\n    ac.last = newTpzm;\n    return ac;\n  }, {\n    result: [],\n    last: (0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(0, 0), (0, _Segment[\"default\"])(0, 0))\n  });\n  var lBw = (0, _Segment[\"default\"])(cmpPairsRd.last.left.end, lText.length);\n  var rBw = (0, _Segment[\"default\"])(cmpPairsRd.last.right.end, rText.length);\n  var newTpzm = new _Trapezium[\"default\"](lBw, rBw);\n  newTpzm.color = FLAG_NOT_MATCHED;\n  cmpPairsRd.result.push(newTpzm);\n  var cmpPairs = cmpPairsRd.result.filter(function (trp) {\n    return trp.square() > 0;\n  }).reduce(function (ac, trp) {\n    if (trp.color == FLAG_MATCHED) {\n      ac.push(trp);\n    } else {\n      var lSubText = lText.substring(trp.left.start, trp.left.end);\n      var rSubText = rText.substring(trp.right.start, trp.right.end);\n      var leftMatchedLength = (0, _string.leftMatchString)(lSubText, rSubText);\n      var rightMatchedLength = (0, _string.rightMatchString)(lSubText, rSubText);\n      var mTextLength = Math.min(lSubText.length, rSubText.length);\n      var newTpzm;\n\n      if (leftMatchedLength + rightMatchedLength < mTextLength) {\n        if (leftMatchedLength > 0) {\n          newTpzm = (0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(trp.left.start, trp.left.start + leftMatchedLength), (0, _Segment[\"default\"])(trp.right.start, trp.right.start + leftMatchedLength));\n          newTpzm.color = FLAG_MATCHED;\n          ac.push(newTpzm);\n        }\n\n        newTpzm = (0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(trp.left.start + leftMatchedLength, trp.left.end - rightMatchedLength), (0, _Segment[\"default\"])(trp.right.start + leftMatchedLength, trp.right.end - rightMatchedLength));\n        newTpzm.color = FLAG_NOT_MATCHED;\n        ac.push(newTpzm);\n\n        if (rightMatchedLength > 0) {\n          newTpzm = (0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(trp.left.end - rightMatchedLength, trp.left.end), (0, _Segment[\"default\"])(trp.right.end - rightMatchedLength, trp.right.end));\n          newTpzm.color = FLAG_MATCHED;\n          ac.push(newTpzm);\n        }\n      } else {\n        if (rightMatchedLength > leftMatchedLength) {\n          //rightMatchedLength always > 0 \n          newTpzm = (0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(trp.left.start, trp.left.end - rightMatchedLength), (0, _Segment[\"default\"])(trp.right.start, trp.right.end - rightMatchedLength));\n          newTpzm.color = FLAG_NOT_MATCHED;\n          ac.push(newTpzm);\n          newTpzm = (0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(trp.left.end - rightMatchedLength, trp.left.end), (0, _Segment[\"default\"])(trp.right.end - rightMatchedLength, trp.right.end));\n          newTpzm.color = FLAG_MATCHED;\n          ac.push(newTpzm);\n        } else {\n          if (leftMatchedLength > 0) {\n            newTpzm = (0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(trp.left.start, trp.left.start + leftMatchedLength), (0, _Segment[\"default\"])(trp.right.start, trp.right.start + leftMatchedLength));\n            newTpzm.color = FLAG_MATCHED;\n            ac.push(newTpzm);\n          }\n\n          newTpzm = (0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(trp.left.start + leftMatchedLength, trp.left.end), (0, _Segment[\"default\"])(trp.right.start + leftMatchedLength, trp.right.end));\n          newTpzm.color = FLAG_NOT_MATCHED;\n          ac.push(newTpzm);\n        }\n      }\n    }\n\n    return ac;\n  }, []).reduce(function (ac, trp) {\n    if (ac.length == 0) {\n      ac.push(trp);\n      return ac;\n    } else {\n      var last = ac[ac.length - 1];\n\n      if (last.color == trp.color) {\n        var newTrp = last.merge(trp);\n        newTrp.color = last.color;\n        ac[ac.length - 1] = newTrp;\n      } else {\n        ac.push(trp);\n      }\n\n      return ac;\n    }\n  }, []);\n  return cmpPairs;\n}\n/**\n * \n * \n * @param {*} lText \n * @param {*} rText \n */\n\n\nfunction diffByLineText(lText, rText) {\n  var lLines = lText.split(/\\r?\\n/);\n  var rLines = rText.split(/\\r?\\n/);\n  var result = {\n    lLines: lLines,\n    rLines: rLines\n  };\n\n  function lineAsToken(line, index) {\n    var nonSpace = 0;\n\n    for (var i = 0; i < line.length; ++i) {\n      if (line[i].trim().length > 0) ++nonSpace;\n    }\n\n    return {\n      index: index,\n      text: line,\n      value: (0, _string.hashCode)(line),\n      score: nonSpace == 0 ? 0.01 : 1 + nonSpace / 1000000\n    };\n  }\n\n  var lTokens = lLines.map(lineAsToken);\n  var rTokens = rLines.map(lineAsToken);\n  var lcst = (0, _agorithm.longestCommonSubTokens)(lTokens, rTokens);\n  var trapeziumes = lcst.subExtraMatched.reduce(function (ac, cr) {\n    var last = ac[ac.length - 1];\n    var rowSegment = (0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(cr.lToken.index, cr.lToken.index + 1), (0, _Segment[\"default\"])(cr.rToken.index, cr.rToken.index + 1), FLAG_MATCHED);\n\n    if (last.isOverlap(rowSegment)) {\n      last = last.merge(rowSegment);\n      ac[ac.length - 1] = last;\n    } else {\n      var lBw = rowSegment.left.betweenSegment(last.left);\n      var rBw = rowSegment.right.betweenSegment(last.right);\n      last = (0, _Trapezium[\"default\"])(lBw, rBw, FLAG_NOT_MATCHED);\n\n      if (last.square() > 0) {\n        ac.push(last);\n      }\n\n      ac.push(rowSegment);\n    }\n\n    return ac;\n  }, [(0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(0, 0), (0, _Segment[\"default\"])(0, 0), FLAG_MATCHED)]);\n  var lastTrapeziume = trapeziumes[trapeziumes.length - 1];\n\n  if (lastTrapeziume.left.end < lTokens.length || lastTrapeziume.right.end < rTokens.length) {\n    trapeziumes.push((0, _Trapezium[\"default\"])((0, _Segment[\"default\"])(lastTrapeziume.left.end, lTokens.length), (0, _Segment[\"default\"])(lastTrapeziume.right.end, rTokens.length), FLAG_NOT_MATCHED));\n  }\n\n  trapeziumes = trapeziumes.filter(function (trp) {\n    return trp.square() > 0;\n  });\n  result.trapeziumes = trapeziumes;\n  return result;\n}\n\n/***/ }),\n\n/***/ 733:\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.hashCode = hashCode;\nexports.leftMatchString = leftMatchString;\nexports.rightMatchString = rightMatchString;\nexports.tokenize = tokenize;\n\nvar _Segment = _interopRequireDefault(__webpack_require__(936));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar letterRegex = /[\\_a-zA-Z0-9àáạảãâầấậẩẫăằắặẳẵÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴèéẹẻẽêềếệểễÈÉẸẺẼÊỀẾỆỂỄìíịỉĩÌÍỊỈĨòóọỏõôồốộổỗơờớợởỡÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠùúụủũưừứựửữÙÚỤỦŨƯỪỨỰỬỮỳýỵỷỹỲÝỴỶỸđĐ\\u0300\\u0301\\u0303\\u0309\\u0323\\u02C6\\u0306\\u031B]/;\nvar spaceRegex = /\\s+/;\nvar wordScore = 1;\nvar opScore = 0.99;\nvar spaceScore = 0.01;\n/**\n * \n * @typedef Token\n * @property {String} value\n * @property {Segment} range\n * @property {Number} score\n * \n * @param {String} text\n * @returns {Array<Token>} \n */\n\nfunction tokenize(text) {\n  var simpleToken = new RegExp(['(', letterRegex.source, '+)|(', spaceRegex.source, ')|(', '.', ')'].join(''), 'g');\n  var result = [];\n  var matched;\n\n  do {\n    matched = simpleToken.exec(text);\n\n    if (matched) {\n      var score = 0;\n      if (matched[1]) score = wordScore;\n      if (matched[2]) score = spaceScore;\n      if (matched[3]) score = opScore;\n      result.push({\n        range: (0, _Segment[\"default\"])(matched.index, simpleToken.lastIndex),\n        value: matched[0],\n        score: score + score * matched[0].length / 1000000\n      });\n    }\n  } while (matched);\n\n  return result;\n}\n/**\n * \n * @param {String} a \n * @param {String} b \n * @returns {Number} length of common string\n */\n\n\nfunction leftMatchString(a, b) {\n  var res = 0;\n  var i = 0;\n  var j = 0;\n\n  while (i < a.length && j < b.length) {\n    if (a[i] == b[j]) {\n      ++res;\n    } else {\n      break;\n    }\n\n    ++i;\n    ++j;\n  }\n\n  return res;\n}\n/**\n * \n * @param {String} a \n * @param {String} b \n * @returns {Number} length of common string\n */\n\n\nfunction rightMatchString(a, b) {\n  var res = 0;\n  var i = a.length;\n  var j = b.length;\n\n  while (i > 0 && j > 0) {\n    --i;\n    --j;\n\n    if (a[i] == b[j]) {\n      ++res;\n    } else {\n      break;\n    }\n  }\n\n  return res;\n}\n/**\n * \n * @param {String} text \n */\n\n\nfunction hashCode(text) {\n  var hash = 0,\n      i,\n      chr;\n  if (text.length === 0) return hash;\n\n  for (i = 0; i < text.length; i++) {\n    chr = text.charCodeAt(i);\n    hash = (hash << 5) - hash + chr;\n    hash |= 0; // Convert to 32bit integer\n  }\n\n  return hash;\n}\n\n;\n\n/***/ }),\n\n/***/ 936:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = void 0;\n\n/**\n * \n * @param {Number} start \n * @param {Number} end \n */\nfunction Segment(start, end) {\n  if (!(this instanceof Segment)) return new Segment(start, end);\n  if (!(start <= end)) throw new Error(\"Invalid range [\" + start + ', ' + end + ']');\n  this.start = start;\n  this.end = end;\n}\n/**\n * @param {Segment} other\n * @returns {Boolean}\n */\n\n\nSegment.prototype.isOverlap = function (other) {\n  if (this.start > other.end) return false;\n  if (this.end < other.start) return false;\n  return true;\n};\n/**\n * @returns {Number}\n */\n\n\nSegment.prototype.length = function () {\n  return this.end - this.start;\n};\n/**\n * @param {Segment} other\n * @returns {Segment}\n */\n\n\nSegment.prototype.merge = function (other) {\n  return new Segment(Math.min(this.start, other.start), Math.max(this.end, other.end));\n};\n/**\n * @param {Segment} other\n * @returns {Segment}\n */\n\n\nSegment.prototype.betweenSegment = function (other) {\n  if (this.start >= other.end) return new Segment(other.end, this.start);\n  if (this.end <= other.start) return new Segment(this.end, other.start);\n  return null;\n};\n/**\n * @returns {Segment}\n */\n\n\nSegment.prototype.clone = function () {\n  return new Segment(this.start, this.end);\n};\n\nvar _default = Segment;\nexports[\"default\"] = _default;\n\n/***/ }),\n\n/***/ 622:\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _Segment = _interopRequireDefault(__webpack_require__(936));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n/**\n * \n * @param {Segment} left \n * @param {Segment} right \n */\nfunction Trapezium(left, right, color) {\n  if (!(this instanceof Trapezium)) return new Trapezium(left, right, color);\n  this.left = left;\n  this.right = right;\n  this.color = color;\n}\n/**\n *  @param {Trapezium} other\n * @returns {Trapezium} \n */\n\n\nTrapezium.prototype.merge = function (other) {\n  return new Trapezium(this.left.merge(other.left), this.right.merge(other.right), this.color);\n};\n/**\n *  @param {Trapezium} other\n * @returns {Boolean} \n */\n\n\nTrapezium.prototype.isOverlap = function (other) {\n  return this.right.isOverlap(other.right) && this.left.isOverlap(other.left);\n};\n/**\n * @returns {Number}\n */\n\n\nTrapezium.prototype.square = function () {\n  return (this.right.length() + this.left.length()) / 2;\n};\n\nTrapezium.prototype.clone - function () {\n  return new Trapezium(this.left.clone(), this.right.clone(), this.color);\n};\nvar _default = Trapezium;\nexports[\"default\"] = _default;\n\n/***/ }),\n\n/***/ 628:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = safeThrow;\n\nfunction safeThrow(error) {\n  setTimeout(function () {\n    throw error;\n  }, 0);\n}\n\n/***/ }),\n\n/***/ 833:\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.copyEvent = copyEvent;\nexports.copyTouch = copyTouch;\nexports.eventProperties = exports[\"default\"] = void 0;\nexports.findChangedTouchByIdent = findChangedTouchByIdent;\nexports.findTouchByIdent = findTouchByIdent;\nexports.hitElement = hitElement;\nexports.isMouseLeft = isMouseLeft;\nexports.isMouseRight = isMouseRight;\nexports.touchProperties = void 0;\n\nvar _safeThrow = _interopRequireDefault(__webpack_require__(628));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction EventEmitter() {\n  if (!this._azar_extendEvents) {\n    Object.defineProperty(this, '_azar_extendEvents', {\n      enumerable: false,\n      value: this._azar_extendEvents || {\n        supported: {},\n        prioritize: {},\n        nonprioritize: {}\n      }\n    });\n    Object.defineProperty(this, '__azar_force', {\n      value: !((typeof Node === \"undefined\" ? \"undefined\" : _typeof(Node)) === \"object\" ? this instanceof Node : this && _typeof(this) === \"object\" && typeof this.nodeType === \"number\" && typeof this.nodeName === \"string\"),\n      enumerable: false\n    });\n  }\n}\n\nEventEmitter.prototype.defineEvent = function (name) {\n  if (name instanceof Array) {\n    for (var i = 0; i < name.length; ++i) {\n      this._azar_extendEvents.supported[name[i]] = true;\n    }\n  } else this._azar_extendEvents.supported[name] = true;\n\n  return this;\n};\n\nEventEmitter.prototype.isSupportedEvent = function (name) {\n  return this.__azar_force || !!this._azar_extendEvents.supported[name];\n};\n\nEventEmitter.prototype.emit = function (eventName, data) {\n  this.fire.apply(this, arguments);\n};\n\nEventEmitter.prototype.fire = function (eventName, data) {\n  var others = Array.prototype.slice.call(arguments, 1);\n\n  if (this.isSupportedEvent(eventName)) {\n    var listenerList;\n    var i;\n\n    if (this._azar_extendEvents.prioritize[eventName]) {\n      listenerList = this._azar_extendEvents.prioritize[eventName].slice();\n\n      for (i = 0; i < listenerList.length; ++i) {\n        try {\n          listenerList[i].wrappedCallback.apply(this, others);\n        } catch (e) {\n          (0, _safeThrow[\"default\"])(e);\n        }\n      }\n    }\n\n    if (this._azar_extendEvents.nonprioritize[eventName]) {\n      listenerList = this._azar_extendEvents.nonprioritize[eventName].slice();\n\n      for (i = 0; i < listenerList.length; ++i) {\n        try {\n          listenerList[i].wrappedCallback.apply(this, others);\n        } catch (e) {\n          (0, _safeThrow[\"default\"])(e);\n        }\n      }\n    }\n  } else {\n    if (this.dispatchEvent) {\n      var event = new Event(eventName);\n      data && Object.assign(event, data);\n      this.dispatchEvent(event);\n    } else throw new Error(\"Not support event \" + eventName);\n  }\n\n  return this;\n};\n\nEventEmitter.prototype.eventEmittorOnWithTime = function (isOnce, arg0, arg1, arg2) {\n  if (_typeof(arg0) == 'object') {\n    for (var key in arg0) {\n      this.eventEmittorOnWithTime(isOnce, key, arg0[key]);\n    }\n\n    return this;\n  } else {\n    if (_typeof(arg1) == 'object') {\n      return this.eventEmittorOnWithTime(isOnce, arg0, arg1.callback, arg1.cap);\n    } else {\n      var eventArr = this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] || [];\n      var eventIndex = -1;\n\n      for (var i = 0; i < eventArr.length; ++i) {\n        if (eventArr[i].wrappedCallback == arg1) {\n          eventIndex = i;\n          break;\n        }\n      }\n\n      if (eventIndex < 0) {\n        var event = {\n          isOnce: isOnce,\n          eventName: arg0,\n          callback: arg1,\n          cap: !!arg2\n        }; //wrappedCallback will be call\n\n        if (isOnce) {\n          event.wrappedCallback = function () {\n            this.off(event.eventName, event.wrappedCallback, event.cap);\n            event.callback.apply(this, arguments);\n          };\n        } else {\n          event.wrappedCallback = event.callback;\n        }\n\n        if (!this.isSupportedEvent(arg0)) {\n          if (this.addEventListener) {\n            this.addEventListener(arg0, event.wrappedCallback, !!arg2);\n          } else {\n            this.attachEvent('on' + arg0, arg1, !!arg2);\n          }\n        }\n\n        eventArr.push(event);\n        this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] = eventArr;\n      } else {\n        console.warn(\"dupplicate event\");\n      }\n    }\n\n    return this;\n  }\n};\n\nEventEmitter.prototype.on = function (arg0, arg1, arg2) {\n  this.eventEmittorOnWithTime(false, arg0, arg1, arg2);\n  return this;\n};\n\nEventEmitter.prototype.once = function (arg0, arg1, arg2) {\n  this.eventEmittorOnWithTime(true, arg0, arg1, arg2);\n  return this;\n};\n\nEventEmitter.prototype.off = function (arg0, arg1, arg2) {\n  if (_typeof(arg0) == 'object') {\n    for (var key in arg0) {\n      this.off(key, arg0[key]);\n    }\n\n    return this;\n  } else {\n    if (_typeof(arg1) == 'object') {\n      return this.off(arg0, arg1.callback, arg1.cap);\n    } else {\n      var eventArr = this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] || [];\n      var newEventArray = [];\n\n      for (var i = 0; i < eventArr.length; ++i) {\n        var event = eventArr[i];\n\n        if (event.wrappedCallback == arg1) {\n          //Dont add to newEventArray\n          if (this.isSupportedEvent(arg0)) {} else {\n            if (this.removeEventListener) {\n              this.removeEventListener(event.eventName, event.wrappedCallback, !!event.cap);\n            } else {\n              this.detachEvent('on' + event.eventName, event.wrappedCallback, !!event.cap);\n            }\n          }\n        } else {\n          newEventArray.push(event);\n        }\n      }\n\n      this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] = newEventArray;\n      return this;\n    }\n  }\n};\n\nvar eventProperties = [\"altKey\", \"bubbles\", \"button\", \"buttons\", \"cancelBubble\", \"cancelable\", \"clientX\", \"clientY\", \"composed\", \"ctrlKey\", \"currentTarget\", \"defaultPrevented\", \"deltaMode\", \"deltaX\", \"deltaY\", \"deltaZ\", \"detail\", \"eventPhase\", \"explicitOriginalTarget\", \"isTrusted\", \"layerX\", \"layerY\", \"metaKey\", \"movementX\", \"movementY\", \"mozInputSource\", \"mozPressure\", \"offsetX\", \"offsetY\", \"originalTarget\", \"pageX\", \"pageY\", \"rangeOffset\", \"rangeParent\", \"region\", \"relatedTarget\", \"returnValue\", \"screenX\", \"screenY\", \"shiftKey\", \"srcElement\", \"target\", \"timeStamp\", \"type\", \"deltaMode\", \"deltaX\", \"deltaY\", \"deltaZ\", 'preventDefault'];\nexports.eventProperties = eventProperties;\nvar touchProperties = ['clientX', 'clientY', 'force', 'identifier', 'pageX', 'pageY', 'rotationAngle', 'screenX', 'screenY', 'target'];\nexports.touchProperties = touchProperties;\n\nfunction isMouseRight(event) {\n  var isRightMB = false;\n  if (\"which\" in event) // Gecko (Firefox), WebKit (Safari/Chrome) & Opera\n    isRightMB = event.which == 3;else if (\"button\" in event) // IE, Opera\n    isRightMB = event.button == 2;\n  return isRightMB;\n}\n\nfunction isMouseLeft(event) {\n  var isLeftMB = false;\n  if (\"which\" in event) // Gecko (Firefox), WebKit (Safari/Chrome) & Opera\n    isLeftMB = event.which == 1;else if (\"button\" in event) // IE, Opera\n    isLeftMB = event.button == 1;\n  return isLeftMB;\n}\n\nfunction hitElement(element, event) {\n  var current = event.target;\n\n  while (current) {\n    if (current == element) return true;\n    current = current.parentElement;\n  }\n\n  return false;\n}\n\nfunction copyEvent(event, props) {\n  var result = {};\n  var key, value; //copy native property\n\n  for (var i = 0; i < eventProperties.length; ++i) {\n    key = eventProperties[i];\n    value = event[key];\n\n    if (value !== undefined) {\n      if (typeof value == \"function\") {\n        result[key] = event[key].bind(event);\n      } else {\n        result[key] = event[key];\n      }\n    }\n  }\n\n  Object.assign(result, event);\n  if (props) Object.assign(result, props);\n\n  if (event.changedTouches) {\n    result.changedTouches = Array.prototype.map.call(event.changedTouches, function (touch) {\n      return copyTouch(touch);\n    });\n  }\n\n  if (event.touches) {\n    result.touches = Array.prototype.map.call(event.touches, function (touch) {\n      return copyTouch(touch);\n    });\n  }\n\n  return result;\n}\n\nfunction copyTouch(touch, props) {\n  var result = {};\n  var key, value; //copy native property\n\n  for (var i = 0; i < touchProperties.length; ++i) {\n    key = touchProperties[i];\n    value = touch[key];\n\n    if (value !== undefined) {\n      if (typeof value == \"function\") {\n        result[key] = touch[key].bind(touch);\n      } else {\n        result[key] = touch[key];\n      }\n    }\n  }\n\n  Object.assign(result, touch);\n  if (props) Object.assign(result, props);\n  return result;\n}\n/***\n *\n * @param {TouchEvent} event\n * @return {Touch | null}\n */\n\n\nfunction findChangedTouchByIdent(event, identifier) {\n  if (event.changedTouches) {\n    for (var i = 0; i < event.changedTouches.length; ++i) {\n      if (event.changedTouches[i].identifier === identifier) {\n        return event.changedTouches[i];\n      }\n    }\n  }\n\n  return null;\n}\n/***\n *\n * @param event\n * @param identifier\n * @return {Touch|null}\n */\n\n\nfunction findTouchByIdent(event, identifier) {\n  if (event.touches) {\n    for (var i = 0; i < event.touches.length; ++i) {\n      if (event.touches[i].identifier === identifier) {\n        return event.touches[i];\n      }\n    }\n  }\n\n  return null;\n}\n\nEventEmitter.isMouseRight = isMouseRight;\nEventEmitter.isMouseLeft = isMouseLeft;\nEventEmitter.hitElement = hitElement;\nEventEmitter.copyEvent = copyEvent;\nEventEmitter.eventProperties = eventProperties;\nvar _default = EventEmitter;\nexports[\"default\"] = _default;\n\n/***/ }),\n\n/***/ 917:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.randomArbitrary = randomArbitrary;\nexports.randomInt = randomInt;\nexports.randomPick = randomPick;\n\n/**\n * Returns a random number between min (inclusive) and max (exclusive)\n */\nfunction randomArbitrary(min, max) {\n  return Math.random() * (max - min) + min;\n}\n/**\n * Returns a random integer between min (inclusive) and max (inclusive)\n * Using Math.round() will give you a non-uniform distribution!\n */\n\n\nfunction randomInt(min, max) {\n  return Math.floor(Math.random() * (max - min + 1)) + min;\n}\n\nfunction randomPick(arr) {\n  var id = randomInt(0, arr.length - 1);\n  return arr[id];\n}\n\n/***/ }),\n\n/***/ 281:\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _EventEmitter = _interopRequireDefault(__webpack_require__(833));\n\nvar _stringGenerate = __webpack_require__(713);\n\nvar _safeThrow = _interopRequireDefault(__webpack_require__(628));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar TYPE_WORKER = 'WORKER';\nvar TYPE_IFRAME = 'IFRAME';\nvar TYPE_IFRAME_MASTER = 'IFRAME_MASTER';\nvar TYPE_WORKER_MASTER = 'WORKER_MASTER';\n/**\n *\n * @param {Worker|HTMLIFrameElement|WorkerGlobalScope|Window=} host\n */\n\nfunction IFrameBridge(host) {\n  var _this = this;\n\n  _EventEmitter[\"default\"].call(this);\n  /***\n   *\n   * @type {Worker|HTMLIFrameElement|WorkerGlobalScope|Window|WorkerGlobalScope|Window}\n   */\n\n\n  this.host = host || self;\n  this.sender = null;\n  this.receiver = null;\n  this.origin = null;\n  this.type = 'NOT_DETECT';\n  this.id = \"UNSET\";\n  this.sync = this._detectHost().then(function () {\n    return _this._attach();\n  });\n  this.__azarResolveCallbacks = {};\n  this.__azarRejectCallbacks = {};\n}\n\nIFrameBridge.TYPE_WORKER = TYPE_WORKER;\nIFrameBridge.TYPE_IFRAME = TYPE_IFRAME;\nIFrameBridge.TYPE_IFRAME_MASTER = TYPE_IFRAME_MASTER;\nIFrameBridge.TYPE_WORKER_MASTER = TYPE_WORKER_MASTER;\n\nIFrameBridge.prototype._detectHost = function () {\n  var _this2 = this;\n\n  return new Promise(function (rs) {\n    var iframeLoaded = function iframeLoaded() {\n      if (_this2.host.removeEventListener) {\n        _this2.host.removeEventListener(\"load\", iframeLoaded);\n      } else {\n        _this2.host.detachEvent(\"onload\", iframeLoaded);\n      }\n\n      _this2.sender = _this2.host.contentWindow;\n      rs();\n    };\n\n    if (_this2.host instanceof Worker) {\n      _this2.type = TYPE_WORKER_MASTER;\n      _this2.sender = _this2.host;\n      _this2.receiver = _this2.host;\n    } else if (_this2.host.tagName === 'IFRAME') {\n      _this2.type = TYPE_IFRAME_MASTER;\n      _this2.receiver = self;\n      _this2.id = _this2.host.src;\n      _this2.origin = '*';\n\n      if (_this2.host.addEventListener) {\n        _this2.host.addEventListener(\"load\", iframeLoaded);\n      } else {\n        _this2.host.attachEvent(\"onload\", iframeLoaded);\n      }\n    } else if (IFrameBridge.isInIFrame()) {\n      _this2.type = TYPE_IFRAME;\n      _this2.sender = window.parent;\n      _this2.receiver = _this2.host;\n      _this2.id = location.href;\n      _this2.origin = '*';\n    } else if (IFrameBridge.isInWorker()) {\n      _this2.type = TYPE_WORKER;\n      _this2.sender = _this2.host;\n      _this2.receiver = _this2.host;\n    }\n\n    if (_this2.sender) rs();\n  });\n};\n\nIFrameBridge.prototype._attach = function () {\n  if (this.receiver.addEventListener) {\n    this.receiver.addEventListener(\"message\", this.__azarMessageListener.bind(this), false);\n  } else if (this.receiver.attachEvent) {\n    this.receiver.attachEvent(\"onmessage\", this.__azarMessageListener.bind(this));\n  } else {\n    this.receiver.onmessage = this.__azarMessageListener.bind(this);\n  }\n};\n\nIFrameBridge.fromIFrame = function (iframe) {\n  return new IFrameBridge(iframe);\n  var host = iframe.contentWindow || iframe.contentDocument;\n  var src = iframe.src;\n  var rootOrigin = location.origin;\n  var iframeOrigin = src.match(/^(http|https):\\/\\/[^/]+/);\n\n  if (iframeOrigin) {\n    iframeOrigin = iframeOrigin[0];\n  } else {\n    iframeOrigin = rootOrigin;\n  }\n\n  if (host) return new IFrameBridge(host, iframeOrigin);else {\n    var result = new IFrameBridge(undefined, iframeOrigin);\n\n    var attachedHost = function attachedHost() {\n      var host = iframe.contentWindow || iframe.contentDocument;\n      result.attach(host);\n    };\n\n    if (iframe.addEventListener) {\n      iframe.addEventListener(\"load\", attachedHost);\n    } else {\n      iframe.attachEvent(\"onload\", attachedHost);\n    }\n\n    return result;\n  }\n};\n\nIFrameBridge.getInstance = function () {\n  if (!IFrameBridge.shareInstance) {\n    var origin = location.origin;\n    var rootOrigin = IFrameBridge.isInIFrame()? IFrameBridge.getParentUrl().match(/^(http|https):\\/\\/[^/]+/): null;\n\n    if (rootOrigin) {\n      rootOrigin = rootOrigin[0];\n    } else {\n      rootOrigin = origin;\n    } // IFrameBridge.shareInstance = new IFrameBridge(self, rootOrigin == origin? undefined: \"*\" || rootOrigin );\n\n\n    var host = self;\n    IFrameBridge.shareInstance = new IFrameBridge(host, rootOrigin);\n  }\n\n  return IFrameBridge.shareInstance;\n};\n\nObject.defineProperties(IFrameBridge.prototype, Object.getOwnPropertyDescriptors(_EventEmitter[\"default\"].prototype));\nIFrameBridge.prototype.constructor = IFrameBridge;\n\nIFrameBridge.isInIFrame = function () {\n  return !IFrameBridge.isInWorker() && top !== self;\n};\n\nIFrameBridge.isInWorker = function () {\n  return typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\n};\n\nIFrameBridge.getParentUrl = function () {\n  var parentUrl = window.location != window.parent.location ? document.referrer : document.location.href;\n  return parentUrl;\n};\n\nIFrameBridge.prototype.__azarMessageListener = function (event) {\n  this.__azarHandleData(event.data);\n};\n\nIFrameBridge.prototype.__azarHandleData = function (data) {\n  console.log(data)\n  if (data.bridgeId !== this.id) return;\n\n  if (data.type) {\n    if (data.type == \"INVOKE\") {\n      try {\n        var result = this.__azarSelfInvoke(data.name, data.params);\n\n        if (result && typeof result.then == 'function') {\n          result.then(function (result) {\n            this.__azarResolve(data.taskId, result);\n          }.bind(this))[\"catch\"](function (err) {\n            (0, _safeThrow[\"default\"])(err);\n\n            this.__azarResolve(data.taskId, null, err);\n          }.bind(this));\n        } else {\n          this.__azarResolve(data.taskId, result);\n        }\n      } catch (err) {\n        (0, _safeThrow[\"default\"])(err);\n\n        this.__azarResolve(data.taskId, null, err);\n      }\n    } else if (data.type == \"INVOKE_RESULT\") {\n      if (this.__azarResolveCallbacks[data.taskId]) {\n        if (data.error) {\n          this.__azarRejectCallbacks[data.taskId](data.error);\n        } else {\n          this.__azarResolveCallbacks[data.taskId](data.result);\n        }\n\n        delete this.__azarResolveCallbacks[data.taskId];\n        delete this.__azarRejectCallbacks[data.taskId];\n      }\n    } else if (data.type == \"EMIT\") {\n      this.fire.apply(this, data.params);\n    } else this.fire('message', data, this);\n  }\n};\n\nIFrameBridge.prototype.__azarResolve = function (taskId, result, error) {\n  var data = {\n    type: \"INVOKE_RESULT\",\n    taskId: taskId,\n    result: result,\n    error: error,\n    bridgeId: this.id\n  };\n\n  if (this.origin) {\n    this.sender.postMessage(data, this.origin);\n  } else {\n    this.sender.postMessage(data);\n  }\n};\n\nIFrameBridge.prototype.__azarSelfInvoke = function (name, params) {\n  if (typeof this[name] == 'function') {\n    return this[name].apply(this, params);\n  } else {\n    return this[name];\n  }\n};\n\nIFrameBridge.prototype.emit = function () {\n  var params = [];\n  params.push.apply(params, arguments);\n  this.sync.then(function () {\n    var data = {\n      type: \"EMIT\",\n      params: params,\n      bridgeId: this.id\n    };\n\n    if (this.origin) {\n      this.sender.postMessage(data, this.origin);\n    } else {\n      this.sender.postMessage(data);\n    }\n  }.bind(this));\n  return this;\n};\n\nIFrameBridge.prototype.invoke = function (name) {\n  var params = [];\n  params.push.apply(params, arguments);\n  params.shift();\n  return this.sync.then(function () {\n    var indent = (0, _stringGenerate.randomIdent)(32);\n    var data = {\n      type: 'INVOKE',\n      params: params,\n      taskId: indent,\n      name: name,\n      bridgeId: this.id\n    };\n\n    if (this.origin) {\n      this.host.postMessage(data, this.origin);\n    } else {\n      this.host.postMessage(data);\n    }\n\n    return new Promise(function (resolve, reject) {\n      this.__azarResolveCallbacks[indent] = resolve;\n      this.__azarRejectCallbacks[indent] = reject;\n    }.bind(this));\n  }.bind(this));\n};\n\nIFrameBridge.prototype.importScriptURLs = function () {\n  return this.invoke.apply(this, ['_receiveScriptURLs'].concat(Array.prototype.slice.call(arguments)));\n};\n\nIFrameBridge.prototype.importScript = function (code) {\n  var blob = new Blob([code], {\n    type: 'application/javascript'\n  });\n  var url = URL.createObjectURL(blob);\n  return this.importScriptURLs(url);\n};\n\nIFrameBridge.prototype.createMethod = function (name, fx) {\n  this[name] = function () {\n    return this.invoke.apply(this, [name].concat(Array.prototype.slice.call(arguments)));\n  };\n\n  return this.invoke.apply(this, ['_receiveMethod', name, fx.toString()]);\n};\n\nIFrameBridge.prototype._receiveScriptURLs = function () {\n  if (self.importScripts) {\n    self.importScripts.apply(self, arguments);\n  }\n};\n\nIFrameBridge.prototype._receiveMethod = function (name, code) {\n  this[name] = new Function('return ' + code)();\n};\n\nvar _default = IFrameBridge;\nexports[\"default\"] = _default;\n\n/***/ }),\n\n/***/ 713:\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.ipsumLoremWord = exports.identCharacters = void 0;\nexports.parallelMatch = parallelMatch;\nexports.randomIdent = randomIdent;\nexports.randomParagraph = randomParagraph;\nexports.randomPhrase = randomPhrase;\nexports.randomSentence = randomSentence;\nexports.randomWord = randomWord;\n\nvar _random = __webpack_require__(917);\n\nvar identCharacters = function () {\n  var chars = 'qwertyuiopasdfghjklzxcvbnm';\n  chars = chars + chars.toUpperCase();\n  var num = '0123456789';\n  var spect = '_';\n  return (chars + spect + num).split('');\n}();\n\nexports.identCharacters = identCharacters;\n\nfunction randomIdent(length) {\n  if (!(length > 0)) length = 4;\n  var factor = identCharacters;\n  return [factor[Math.random() * (factor.length - 10) >> 0]].concat(Array(length - 1).fill('').map(function () {\n    return factor[Math.random() * factor.length >> 0];\n  })).join('');\n}\n\nfunction parallelMatch(a, b) {\n  var l = Math.min(a.length, b.length);\n  var res = 0;\n\n  for (var i = 0; i < l; ++i) {\n    if (a[i] == b[i]) ++res;\n  }\n\n  return res;\n}\n\nvar ipsumLoremWord = ['lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur', 'adipiscing', 'elit', 'sed', 'do', 'eiusmod', 'tempor', 'incididunt', 'ut', 'labore', 'et', 'dolore', 'magna', 'aliqua', 'enim', 'ad', 'minim', 'veniam', 'quis', 'nostrud', 'exercitation', 'ullamco', 'laboris', 'nisi', 'aliquip', 'ex', 'ea', 'commodo', 'consequat', 'duis', 'aute', 'irure', 'in', 'reprehenderit', 'voluptate', 'velit', 'esse', 'cillum', 'eu', 'fugiat', 'nulla', 'pariatur', 'excepteur', 'sint', 'occaecat', 'cupidatat', 'non', 'proident', 'sunt', 'culpa', 'qui', 'officia', 'deserunt', 'mollit', 'anim', 'id', 'est', 'laborum', 'perspiciatis', 'unde', 'omnis', 'iste', 'natus', 'error', 'voluptatem', 'accusantium', 'doloremque', 'laudantium', 'totam', 'rem', 'aperiam', 'eaque', 'ipsa', 'quae', 'ab', 'illo', 'inventore', 'veritatis', 'quasi', 'architecto', 'beatae', 'vitae', 'dicta', 'explicabo', 'nemo', 'ipsam', 'quia', 'voluptas', 'aspernatur', 'aut', 'odit', 'fugit', 'consequuntur', 'magni', 'dolores', 'eos', 'ratione', 'sequi', 'nesciunt', 'neque', 'porro', 'quisquam', 'dolorem', 'adipisci', 'numquam', 'eius', 'modi', 'tempora', 'incidunt', 'magnam', 'aliquam', 'quaerat', 'minima', 'nostrum', 'exercitationem', 'ullam', 'corporis', 'suscipit', 'laboriosam', 'aliquid', 'commodi', 'consequatur', 'autem', 'vel', 'eum', 'iure', 'quam', 'nihil', 'molestiae', 'illum', 'quo', 'at', 'vero', 'accusamus', 'iusto', 'odio', 'dignissimos', 'ducimus', 'blanditiis', 'praesentium', 'voluptatum', 'deleniti', 'atque', 'corrupti', 'quos', 'quas', 'molestias', 'excepturi', 'occaecati', 'cupiditate', 'provident', 'similique', 'mollitia', 'animi', 'dolorum', 'fuga', 'harum', 'quidem', 'rerum', 'facilis', 'expedita', 'distinctio', 'nam', 'libero', 'tempore', 'sum', 'soluta', 'nobis', 'eligendi', 'optio', 'cumque', 'impedit', 'minus', 'quod', 'maxime', 'placeat', 'facere', 'possimus', 'assumenda', 'repellendus', 'temporibus', 'quibusdam', 'officiis', 'debitis', 'necessitatibus', 'saepe', 'eveniet', 'voluptates', 'repudiandae', 'recusandae', 'itaque', 'earum', 'hic', 'tenetur', 'a', 'sapiente', 'delectus', 'reiciendis', 'voluptatibus', 'maiores', 'alias', 'perferendis', 'doloribus', 'asperiores', 'repellat', 'integer', 'nec', 'praesent', 'cursus', 'ante', 'dapibus', 'diam', 'sem', 'nibh', 'elementum', 'imperdiet', 'sagittis', 'mauris', 'fusce', 'tellus', 'augue', 'semper', 'porta', 'massa', 'vestibulum', 'lacinia', 'arcu', 'eget', 'class', 'aptent', 'taciti', 'sociosqu', 'litora', 'torquent', 'per', 'conubia', 'nostra', 'inceptos', 'himenaeos', 'curabitur', 'sodales', 'ligula', 'dignissim', 'nunc', 'tortor', 'pellentesque', 'aenean', 'scelerisque', 'maecenas', 'mattis', 'convallis', 'tristique', 'proin', 'egestas', 'porttitor', 'morbi', 'lectus', 'risus', 'iaculis', 'luctus', 'ac', 'turpis', 'aliquet', 'metus', 'ullamcorper', 'tincidunt', 'euismod', 'quisque', 'volutpat', 'condimentum', 'urna', 'facilisi', 'fringilla', 'suspendisse', 'potenti', 'feugiat', 'mi', 'sapien', 'etiam', 'ultrices', 'justo', 'lacus', 'pharetra', 'auctor', 'interdum', 'primis', 'faucibus', 'orci', 'posuere', 'cubilia', 'curae', 'molestie', 'dui', 'blandit', 'congue', 'pede', 'facilisis', 'laoreet', 'donec', 'viverra', 'malesuada', 'pulvinar', 'sollicitudin', 'cras', 'nisl', 'felis', 'venenatis', 'ultricies', 'accumsan', 'pretium', 'fermentum', 'nullam', 'purus', 'mollis', 'vivamus', 'consectetuer'];\nexports.ipsumLoremWord = ipsumLoremWord;\n\nfunction randomWord() {\n  var arr = ipsumLoremWord;\n  var idx = (0, _random.randomInt)(0, arr.length - 1);\n  return arr[idx];\n}\n\nfunction randomPhrase(limitLenght) {\n  if (!limitLenght) limitLenght = 50;\n  var length = Math.ceil(Math.random() * limitLenght / 7);\n  return new Array(length).fill(null).map(randomWord).reduce(function (ac, cr) {\n    if (ac.length + cr.length < limitLenght) {\n      ac.parts.push(cr);\n    }\n\n    return ac;\n  }, {\n    parts: [],\n    length: 0\n  }).parts.join(' ');\n}\n\nfunction randomSentence(limitLenght) {\n  if (!limitLenght) limitLenght = 300;\n  var length = Math.ceil(Math.random() * limitLenght / 70);\n  var res = new Array(length).fill(null).map(randomPhrase).reduce(function (ac, cr) {\n    if (ac.length + cr.length < limitLenght) {\n      ac.parts.push(cr);\n    }\n\n    return ac;\n  }, {\n    parts: [],\n    length: 0\n  }).parts.join(', ');\n\n  if (Math.random() < 0.03) {\n    res = res.replace(/\\,/i, ':');\n  }\n\n  res = res.replace(/^./, function (x) {\n    return x.toUpperCase();\n  });\n  res += '.';\n  return res;\n}\n\nfunction randomParagraph(limitLength) {\n  if (!limitLength) limitLength = 1000;\n  var length = Math.ceil(Math.random() * limitLength / 200);\n  return new Array(length).fill(null).map(randomSentence).reduce(function (ac, cr) {\n    if (ac.length + cr.length < limitLength) {\n      ac.parts.push(cr);\n    }\n\n    return ac;\n  }, {\n    parts: [],\n    length: 0\n  }).parts.join(' ');\n}\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\nvar __webpack_exports__ = {};\n// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.\n(() => {\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _IFrameBridge = _interopRequireDefault(__webpack_require__(281));\n\nvar Diff = _interopRequireWildcard(__webpack_require__(560));\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar brige = _IFrameBridge[\"default\"].getInstance();\n\nbrige.diffByLine = function (a, b) {\n  console.log(a, b);\n  return Diff.diffByLineText(a, b);\n};\n\nbrige.diffByWord = function (a, b) {\n  return Diff.diffSingleText(a, b);\n};\n})();\n\n/******/ })()\n;");

/***/ }),

/***/ 93959:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n<Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">\r\n  <Default Extension=\"rels\" ContentType=\r\n    \"application/vnd.openxmlformats-package.relationships+xml\" />\r\n  <Override PartName=\"/word/document.xml\" ContentType=\r\n    \"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\"/>\r\n  <Override PartName=\"/word/afchunk.mht\" ContentType=\"message/rfc822\"/>\r\n</Types>\r\n");

/***/ }),

/***/ 7423:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\r\n  <Relationship Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk\"\r\n    Target=\"/word/afchunk.mht\" Id=\"htmlChunk\" />\r\n</Relationships>\r\n");

/***/ }),

/***/ 53372:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">\r\n  <Relationship\r\n      Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\"\r\n      Target=\"/word/document.xml\" Id=\"R09c83fafc067488e\" />\r\n</Relationships>\r\n");

/***/ }),

/***/ 15099:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n<w:document\r\n  xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"\r\n  xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\"\r\n  xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"\r\n  xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\"\r\n  xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"\r\n  xmlns:ns6=\"http://schemas.openxmlformats.org/schemaLibrary/2006/main\"\r\n  xmlns:c=\"http://schemas.openxmlformats.org/drawingml/2006/chart\"\r\n  xmlns:ns8=\"http://schemas.openxmlformats.org/drawingml/2006/chartDrawing\"\r\n  xmlns:dgm=\"http://schemas.openxmlformats.org/drawingml/2006/diagram\"\r\n  xmlns:pic=\"http://schemas.openxmlformats.org/drawingml/2006/picture\"\r\n  xmlns:ns11=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\"\r\n  xmlns:dsp=\"http://schemas.microsoft.com/office/drawing/2008/diagram\"\r\n  xmlns:ns13=\"urn:schemas-microsoft-com:office:excel\"\r\n  xmlns:o=\"urn:schemas-microsoft-com:office:office\"\r\n  xmlns:v=\"urn:schemas-microsoft-com:vml\"\r\n  xmlns:w10=\"urn:schemas-microsoft-com:office:word\"\r\n  xmlns:ns17=\"urn:schemas-microsoft-com:office:powerpoint\"\r\n  xmlns:odx=\"http://opendope.org/xpaths\"\r\n  xmlns:odc=\"http://opendope.org/conditions\"\r\n  xmlns:odq=\"http://opendope.org/questions\"\r\n  xmlns:odi=\"http://opendope.org/components\"\r\n  xmlns:odgm=\"http://opendope.org/SmartArt/DataHierarchy\"\r\n  xmlns:ns24=\"http://schemas.openxmlformats.org/officeDocument/2006/bibliography\"\r\n  xmlns:ns25=\"http://schemas.openxmlformats.org/drawingml/2006/compatibility\"\r\n  xmlns:ns26=\"http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas\">\r\n  <w:body>\r\n    <w:altChunk r:id=\"htmlChunk\" />\r\n    <w:sectPr>\r\n      <w:pgSz w:w=\"{{ pageSetting.width }}\" w:h=\"{{ pageSetting.height }}\" w:orient=\"{{ pageSetting.orient }}\" />\r\n      <w:pgMar w:top=\"{{ pageSetting.margins.top }}\"\r\n               w:right=\"{{ pageSetting.margins.right }}\"\r\n               w:bottom=\"{{ pageSetting.margins.bottom }}\"\r\n               w:left=\"{{ pageSetting.margins.left }}\"\r\n               w:header=\"{{ pageSetting.margins.header }}\"\r\n               w:footer=\"{{ pageSetting.margins.footer }}\"\r\n               w:gutter=\"{{ pageSetting.margins.gutter }}\"/>\r\n    </w:sectPr>\r\n  </w:body>\r\n</w:document>\r\n");

/***/ }),

/***/ 31551:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("MIME-Version: 1.0\r\nContent-Type: multipart/related;\r\n    type=\"text/html\";\r\n    boundary=\"----=mhtDocumentPart\"\r\n\r\n\r\n------=mhtDocumentPart\r\nContent-Type: text/html;\r\n    charset=\"utf-8\"\r\nContent-Transfer-Encoding: quoted-printable\r\nContent-Location: file:///C:/fake/document.html\r\n\r\n{{ htmlSource }}\r\n\r\n{{ contentParts }}\r\n\r\n------=mhtDocumentPart--\r\n");

/***/ }),

/***/ 61337:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("------=mhtDocumentPart\r\nContent-Type: {{ contentType }}\r\nContent-Transfer-Encoding: {{ contentEncoding }}\r\nContent-Location: {{ contentLocation }}\r\n\r\n{{ encodedContent }}\r\n");

/***/ }),

/***/ 87333:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("function safeThrow(error) {\r\n    setTimeout(function () {\r\n        throw  error;\r\n    }, 0);\r\n}\r\n\r\nfunction EventEmitter() {\r\n    if (!this._azar_extendEvents) {\r\n        Object.defineProperty(this, '_azar_extendEvents', {\r\n            enumerable: false,\r\n            value: this._azar_extendEvents || { supported: {}, prioritize: {}, nonprioritize: {} }\r\n        });\r\n        Object.defineProperty(this, '__azar_force', {\r\n            value: true,\r\n            enumerable: false\r\n        });\r\n    }\r\n}\r\n\r\n\r\nEventEmitter.prototype.defineEvent = function (name) {\r\n    if (name instanceof Array) {\r\n        for (var i = 0; i < name.length; ++i)\r\n            this._azar_extendEvents.supported[name[i]] = true;\r\n    }\r\n    else\r\n        this._azar_extendEvents.supported[name] = true;\r\n    return this;\r\n};\r\n\r\nEventEmitter.prototype.isSupportedEvent = function (name) {\r\n    return true;\r\n};\r\n\r\n\r\nEventEmitter.prototype.emit = function (eventName, data) {\r\n    this.fire.apply(this, arguments);\r\n};\r\n\r\nEventEmitter.prototype.fire = function (eventName, data) {\r\n    var others = Array.prototype.slice.call(arguments, 1);\r\n    if (this.isSupportedEvent(eventName)) {\r\n        var listenerList;\r\n        var i;\r\n        if (this._azar_extendEvents.prioritize[eventName]) {\r\n            listenerList = this._azar_extendEvents.prioritize[eventName].slice();\r\n            for (i = 0; i < listenerList.length; ++i) {\r\n                try {\r\n                    listenerList[i].wrappedCallback.apply(this, others);\r\n                } catch (e) {\r\n                   safeThrow(e);\r\n                }\r\n            }\r\n        }\r\n\r\n        if (this._azar_extendEvents.nonprioritize[eventName]) {\r\n            listenerList = this._azar_extendEvents.nonprioritize[eventName].slice();\r\n            for (i = 0; i < listenerList.length; ++i) {\r\n                try {\r\n                    listenerList[i].wrappedCallback.apply(this, others);\r\n                } catch (e) {\r\n                    safeThrow(e);\r\n                }\r\n            }\r\n        }\r\n    }\r\n    else {\r\n        if (this.dispatchEvent) {\r\n            var event = new Event(eventName);\r\n            data && Object.assign(event, data);\r\n            this.dispatchEvent(event);\r\n        }\r\n        else\r\n            throw new Error(\"Not support event \" + eventName);\r\n    }\r\n    return this;\r\n};\r\n\r\n\r\nEventEmitter.prototype.eventEmittorOnWithTime = function (isOnce, arg0, arg1, arg2) {\r\n    if (typeof arg0 == 'object') {\r\n        for (var key in arg0) {\r\n            this.eventEmittorOnWithTime(isOnce, key, arg0[key]);\r\n        }\r\n        return this;\r\n    }\r\n    else {\r\n        if (typeof arg1 == 'object') {\r\n            return this.eventEmittorOnWithTime(isOnce, arg0, arg1.callback, arg1.cap);\r\n        }\r\n        else {\r\n            var eventArr = this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] || [];\r\n            var eventIndex = -1;\r\n            for (var i = 0; i < eventArr.length; ++i) {\r\n                if (eventArr[i].wrappedCallback == arg1) {\r\n                    eventIndex = i;\r\n                    break;\r\n                }\r\n            }\r\n            if (eventIndex < 0) {\r\n                var event = { isOnce: isOnce, eventName: arg0, callback: arg1, cap: !!arg2 };\r\n                //wrappedCallback will be call\r\n                if (isOnce) {\r\n                    event.wrappedCallback = function () {\r\n                        event.callback.apply(this, arguments);\r\n                        this.off(event.eventName, event.wrappedCallback, event.cap);\r\n                    };\r\n                }\r\n                else {\r\n                    event.wrappedCallback = event.callback;\r\n                }\r\n\r\n                if (!this.isSupportedEvent(arg0)) {\r\n                    if (this.addEventListener) {\r\n                        this.addEventListener(arg0, event.wrappedCallback, !!arg2);\r\n                    }\r\n                    else {\r\n                        this.attachEvent('on' + arg0, arg1, !!arg2);\r\n                    }\r\n                }\r\n\r\n                eventArr.push(event);\r\n                this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] = eventArr;\r\n            }\r\n            else {\r\n                console.warn(\"dupplicate event\");\r\n            }\r\n\r\n        }\r\n        return this;\r\n    }\r\n};\r\n\r\n\r\nEventEmitter.prototype.on = function (arg0, arg1, arg2) {\r\n    this.eventEmittorOnWithTime(false, arg0, arg1, arg2);\r\n    return this;\r\n};\r\n\r\n\r\nEventEmitter.prototype.once = function (arg0, arg1, arg2) {\r\n    this.eventEmittorOnWithTime(true, arg0, arg1, arg2);\r\n    return this;\r\n};\r\n\r\nEventEmitter.prototype.off = function (arg0, arg1, arg2) {\r\n    if (typeof arg0 == 'object') {\r\n        for (var key in arg0) {\r\n            this.off(key, arg0[key]);\r\n        }\r\n        return this;\r\n    }\r\n    else {\r\n        if (typeof arg1 == 'object') {\r\n            return this.off(arg0, arg1.callback, arg1.cap);\r\n        }\r\n        else {\r\n            var eventArr = this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] || [];\r\n            var newEventArray = [];\r\n            for (var i = 0; i < eventArr.length; ++i) {\r\n                var event = eventArr[i];\r\n                if (event.wrappedCallback == arg1) {\r\n                    //Dont add to newEventArray\r\n                    if (this.isSupportedEvent(arg0)) {\r\n                    }\r\n                    else {\r\n                        if (this.removeEventListener) {\r\n                            this.removeEventListener(event.eventName, event.wrappedCallback, !!event.cap);\r\n                        }\r\n                        else {\r\n                            this.detachEvent('on' + event.eventName, event.wrappedCallback, !!event.cap);\r\n                        }\r\n                    }\r\n                }\r\n                else {\r\n                    newEventArray.push(event);\r\n                }\r\n            }\r\n            this._azar_extendEvents[arg2 ? 'prioritize' : 'nonprioritize'][arg0] = newEventArray;\r\n            return this;\r\n        }\r\n    }\r\n\r\n};\r\n\r\n\r\nvar TYPE_WORKER = 'WORKER';\r\n\r\n/**\r\n *\r\n * @param {Worker|HTMLIFrameElement|WorkerGlobalScope|Window=} host\r\n */\r\nfunction IFrameBridge(host) {\r\n    EventEmitter.call(this);\r\n    /***\r\n     *\r\n     * @type {Worker|HTMLIFrameElement|WorkerGlobalScope|Window|WorkerGlobalScope|Window}\r\n     */\r\n    this.host = host || self;\r\n    this.sender = null;\r\n    this.receiver = null;\r\n    this.origin = null;\r\n    this.type = 'NOT_DETECT';\r\n    this.id = \"UNSET\";\r\n\r\n    this.sync = this._detectHost().then(() => this._attach());\r\n\r\n    this.__azarResolveCallbacks = {};\r\n    this.__azarRejectCallbacks = {};\r\n}\r\n\r\nIFrameBridge.prototype._detectHost = function () {\r\n          this.type = TYPE_WORKER;\r\n          this.sender = this.host;\r\n          this.receiver = this.host;\r\n          return Promise.resolve();\r\n};\r\n\r\n\r\nIFrameBridge.prototype._attach = function () {\r\n    if (this.receiver.addEventListener) {\r\n        this.receiver.addEventListener(\"message\", this.__azarMessageListener.bind(this), false);\r\n    }\r\n    else if (this.receiver.attachEvent) {\r\n        this.receiver.attachEvent(\"onmessage\", this.__azarMessageListener.bind(this));\r\n    }\r\n    else {\r\n        this.receiver.onmessage = this.__azarMessageListener.bind(this);\r\n    }\r\n};\r\n\r\n\r\nIFrameBridge.getInstance = function () {\r\n    if (!IFrameBridge.shareInstance) {\r\n        var origin = location.origin;\r\n        var rootOrigin = IFrameBridge.getParentUrl().match(/^(http|https):\\/\\/[^/]+/);\r\n        if (rootOrigin) {\r\n            rootOrigin = rootOrigin[0];\r\n        }\r\n        else {\r\n            rootOrigin = origin;\r\n        }\r\n\r\n        // IFrameBridge.shareInstance = new IFrameBridge(self, rootOrigin == origin? undefined: \"*\" || rootOrigin );\r\n        var host = self;\r\n        IFrameBridge.shareInstance = new IFrameBridge(host, rootOrigin);\r\n    }\r\n    return IFrameBridge.shareInstance;\r\n};\r\n\r\n\r\nObject.defineProperties(IFrameBridge.prototype, Object.getOwnPropertyDescriptors(EventEmitter.prototype));\r\nIFrameBridge.prototype.constructor = IFrameBridge;\r\n\r\n\r\nIFrameBridge.getParentUrl = function () {\r\n    var parentUrl = (window.location != window.parent.location)\r\n        ? document.referrer\r\n        : document.location.href;\r\n    return parentUrl;\r\n};\r\n\r\nIFrameBridge.prototype.__azarMessageListener = function (event) {\r\n    this.__azarHandleData(event.data);\r\n};\r\n\r\n\r\nIFrameBridge.prototype.__azarHandleData = function (data) {\r\n    if (data.bridgeId !== this.id) return;\r\n    if (data.type) {\r\n        if (data.type == \"INVOKE\") {\r\n            try {\r\n                var result = this.__azarSelfInvoke(data.name, data.params);\r\n                if (result && typeof result.then == 'function') {\r\n                    result.then(function (result) {\r\n                        this.__azarResolve(data.taskId, result);\r\n                    }.bind(this))\r\n                        .catch(function (err) {\r\n                            safeThrow(err);\r\n                            this.__azarResolve(data.taskId, null, err);\r\n                        }.bind(this));\r\n                }\r\n                else {\r\n                    this.__azarResolve(data.taskId, result);\r\n                }\r\n            } catch (err) {\r\n                safeThrow(err);\r\n                this.__azarResolve(data.taskId, null, err);\r\n            }\r\n        }\r\n        else if (data.type == \"INVOKE_RESULT\") {\r\n            if (this.__azarResolveCallbacks[data.taskId]) {\r\n                if (data.error) {\r\n                    this.__azarRejectCallbacks[data.taskId](data.error);\r\n                }\r\n                else {\r\n                    this.__azarResolveCallbacks[data.taskId](data.result);\r\n                }\r\n                delete this.__azarResolveCallbacks[data.taskId];\r\n                delete this.__azarRejectCallbacks[data.taskId];\r\n            }\r\n        }\r\n        else if (data.type == \"EMIT\") {\r\n            this.fire.apply(this, data.params);\r\n        }\r\n        else this.fire('message', data, this);\r\n    }\r\n};\r\n\r\n\r\nIFrameBridge.prototype.__azarResolve = function (taskId, result, error) {\r\n    var data = {\r\n        type: \"INVOKE_RESULT\",\r\n        taskId: taskId,\r\n        result: result,\r\n        error: error,\r\n        bridgeId: this.id\r\n    };\r\n\r\n    if (this.origin) {\r\n        this.sender.postMessage(data, this.origin);\r\n    }\r\n    else {\r\n        this.sender.postMessage(data);\r\n    }\r\n};\r\n\r\n\r\nIFrameBridge.prototype.__azarSelfInvoke = function (name, params) {\r\n    if (typeof this[name] == 'function') {\r\n        return this[name].apply(this, params);\r\n    }\r\n    else {\r\n        return this[name];\r\n    }\r\n};\r\n\r\n\r\nIFrameBridge.prototype.emit = function () {\r\n    var params = [];\r\n    params.push.apply(params, arguments);\r\n    this.sync.then(function () {\r\n        var data = {\r\n            type: \"EMIT\",\r\n            params: params,\r\n            bridgeId: this.id\r\n        };\r\n        if (this.origin) {\r\n            this.sender.postMessage(data, this.origin);\r\n        }\r\n        else {\r\n            this.sender.postMessage(data);\r\n        }\r\n    }.bind(this));\r\n    return this;\r\n};\r\n\r\n\r\nIFrameBridge.prototype.invoke = function (name) {\r\n    var params = [];\r\n    params.push.apply(params, arguments);\r\n    params.shift();\r\n    return this.sync.then(function () {\r\n        var indent = randomIdent(32);\r\n        var data = {\r\n            type: 'INVOKE',\r\n            params: params,\r\n            taskId: indent,\r\n            name: name,\r\n            bridgeId: this.id\r\n        };\r\n        if (this.origin) {\r\n            this.host.postMessage(data, this.origin);\r\n        }\r\n        else {\r\n            this.host.postMessage(data);\r\n        }\r\n        return new Promise(function (resolve, reject) {\r\n            this.__azarResolveCallbacks[indent] = resolve;\r\n            this.__azarRejectCallbacks[indent] = reject;\r\n        }.bind(this));\r\n    }.bind(this));\r\n};\r\n\r\nIFrameBridge.prototype.importScriptURLs = function () {\r\n    return this.invoke.apply(this, ['_receiveScriptURLs'].concat(Array.prototype.slice.call(arguments)));\r\n};\r\n\r\nIFrameBridge.prototype.importScript = function (code) {\r\n    var blob = new Blob([code], { type: 'application/javascript' });\r\n    var url = URL.createObjectURL(blob);\r\n    return this.importScriptURLs(url);\r\n};\r\n\r\n\r\nIFrameBridge.prototype.createMethod = function (name, fx) {\r\n    this[name] = function () {\r\n        return this.invoke.apply(this, [name].concat(Array.prototype.slice.call(arguments)));\r\n    };\r\n    return this.invoke.apply(this, ['_receiveMethod', name, fx.toString()]);\r\n};\r\n\r\n\r\nIFrameBridge.prototype._receiveScriptURLs = function () {\r\n    if (self.importScripts) {\r\n        self.importScripts.apply(self, arguments);\r\n    }\r\n};\r\n\r\n\r\nIFrameBridge.prototype._receiveMethod = function (name, code) {\r\n    this[name] = (new Function('return ' + code))();\r\n};\r\n\r\n\r\nvar IFrameBridge_prototype_descriptors = Object.getOwnPropertyDescriptors(IFrameBridge.prototype);\r\ndelete IFrameBridge_prototype_descriptors.constructor;\r\n\r\nObject.defineProperties(self, IFrameBridge_prototype_descriptors);\r\nIFrameBridge.call(self, self);");

/***/ }),

/***/ 17067:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(81919);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 4365:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(50601);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 57626:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(80479);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 14413:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(50134);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 52058:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(71283);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 58181:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(42946);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 94066:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(9279);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 29211:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(44270);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 39917:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(59027);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 26189:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(7604);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 30402:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(50072);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 35646:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(65074);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 59019:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(22277);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 27134:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(87887);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 81274:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(30470);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 33130:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(87117);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 69267:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(41705);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 21230:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(44010);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 38140:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(21725);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 46185:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(46991);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 81329:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(30569);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 35196:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(52418);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 77030:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(6222);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 58072:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(54676);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 39814:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(56815);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 36404:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(78398);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 64883:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(18351);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 57751:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(24232);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 94998:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(46921);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 70332:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(96418);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 97121:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(80793);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 92380:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(62718);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 67243:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(51886);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 75628:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(33897);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 90062:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(88448);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 52344:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(90914);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 83373:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(90933);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 50562:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(88022);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 16702:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(57974);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 42879:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(33235);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 93499:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(97643);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 87778:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(82278);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 75638:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(68299);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 63824:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(68042);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 98521:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(63608);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 931:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(19001);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 99607:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(1682);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 11839:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(71843);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 350:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(26106);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 59338:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(23368);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 49409:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(2943);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 80963:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(76241);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 85969:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(16172);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 5416:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(72254);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 17779:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(75021);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 90127:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(4334);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 9479:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(63909);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 33573:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(94142);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 27442:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(85009);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 86995:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(9680);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 49538:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(76457);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 61397:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(82264);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 16959:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(81660);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 41693:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(15118);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 47515:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(15132);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 27346:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(2526);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 85843:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(64273);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 40466:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(96048);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 82261:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(67338);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 84980:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(41242);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 56163:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(3397);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 91439:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(45406);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 22863:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(37437);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 19858:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(74100);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 7425:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(6478);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 21984:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(21908);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 26795:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(16189);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 1784:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(36485);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 76727:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(40468);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 86692:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(94492);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 14912:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(4487);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 87612:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(48367);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 3505:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(70131);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 93755:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(34854);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 79047:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(35593);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 28395:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(5543);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 51922:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(47110);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 76974:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(67691);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 37959:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(49931);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 68687:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(82375);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 21457:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(20893);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 97484:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(14237);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 92209:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(76209);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 58913:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(85225);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 76177:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(36240);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 93138:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(70729);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 69561:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(42305);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 74892:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(38278);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 30215:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(70058);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 6026:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(64713);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 68829:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(17726);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 61908:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(69847);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 58934:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(55498);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 44629:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(25531);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 26477:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(96227);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 95043:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(31140);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 19175:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(26394);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 56090:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(12761);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 69577:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(22691);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 15472:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(98375);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 39725:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(40091);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 46538:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(5848);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 40210:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(68491);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 44647:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(48904);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 35778:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(47965);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 82287:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(16951);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 70603:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(80918);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 5033:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(78257);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 61536:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(21491);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 63081:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(33448);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 5519:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(82720);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 6032:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(77557);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 43576:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(41154);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 63386:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(78351);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 65461:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(26993);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 95945:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(16972);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 62390:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(10301);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 9656:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(90646);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 80441:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(36155);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 64214:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(31610);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 20487:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(63899);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 97775:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(30780);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 83293:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(42453);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 88316:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(31142);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 39429:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(93586);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 62800:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(78239);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 34388:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(61209);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 45507:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(4559);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 11391:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(68551);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 69083:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(13478);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 29874:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(59355);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 70880:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(23542);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 95370:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(60182);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 21540:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(4994);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 25929:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(17289);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 80571:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(92183);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 14920:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(54894);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 97535:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(6322);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 94817:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(86923);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 65997:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(32206);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 25289:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(89423);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 77058:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(87111);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 46270:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(86778);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 27439:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(4476);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 95345:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(19910);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 14378:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(65199);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 60401:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(84679);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 78434:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(670);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 97823:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(75575);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 52977:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(52296);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 57818:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(44439);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 35255:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(79127);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 99218:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(26085);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 13367:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(74315);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 22870:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(74015);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 22053:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(78875);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 11554:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(22652);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 78093:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(50475);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 15172:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(1449);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 61812:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(30238);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 12194:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(63519);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 67362:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(54771);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 59613:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(70095);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 5092:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(61048);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 74231:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(64178);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 56817:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(70194);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 24266:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(30619);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 38322:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(29496);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 3972:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(29581);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 70431:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(91652);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 3378:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(43034);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 1132:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(45930);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 90081:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(33122);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 65756:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(22839);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 80609:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(58542);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 61215:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(67597);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 70829:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(32331);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 31721:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(98459);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 53934:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(16599);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 501:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(67902);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 83370:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(66559);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 28737:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(34454);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 62314:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(99322);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 43937:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(27634);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 56685:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(31546);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 45053:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(66066);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 29778:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(36388);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 51231:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(34038);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 86099:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(41130);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 85300:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(31000);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 64194:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(10883);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 6913:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(23678);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 37907:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(8069);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 57223:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(42338);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 33190:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(38070);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 45090:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(25583);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 64952:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(43657);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 82986:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(2222);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 97084:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(39598);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 8528:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(35095);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 21546:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(35857);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 86054:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(38310);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 21225:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(33560);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 38271:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


var content = __webpack_require__(13763);

if(typeof content === 'string') content = [[module.id, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(76723)(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ 76723:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/

var stylesInDom = {};

var	memoize = function (fn) {
	var memo;

	return function () {
		if (typeof memo === "undefined") memo = fn.apply(this, arguments);
		return memo;
	};
};

var isOldIE = memoize(function () {
	// Test for IE <= 9 as proposed by Browserhacks
	// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
	// Tests for existence of standard globals is to allow style-loader
	// to operate correctly into non-standard environments
	// @see https://github.com/webpack-contrib/style-loader/issues/177
	return window && document && document.all && !window.atob;
});

var getTarget = function (target, parent) {
  if (parent){
    return parent.querySelector(target);
  }
  return document.querySelector(target);
};

var getElement = (function (fn) {
	var memo = {};

	return function(target, parent) {
                // If passing function in options, then use it for resolve "head" element.
                // Useful for Shadow Root style i.e
                // {
                //   insertInto: function () { return document.querySelector("#foo").shadowRoot }
                // }
                if (typeof target === 'function') {
                        return target();
                }
                if (typeof memo[target] === "undefined") {
			var styleTarget = getTarget.call(this, target, parent);
			// Special case to return head of iframe instead of iframe itself
			if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
				try {
					// This will throw an exception if access to iframe is blocked
					// due to cross-origin restrictions
					styleTarget = styleTarget.contentDocument.head;
				} catch(e) {
					styleTarget = null;
				}
			}
			memo[target] = styleTarget;
		}
		return memo[target]
	};
})();

var singleton = null;
var	singletonCounter = 0;
var	stylesInsertedAtTop = [];

var	fixUrls = __webpack_require__(57008);

module.exports = function(list, options) {
	if (typeof DEBUG !== "undefined" && DEBUG) {
		if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
	}

	options = options || {};

	options.attrs = typeof options.attrs === "object" ? options.attrs : {};

	// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
	// tags it will allow on a page
	if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();

	// By default, add <style> tags to the <head> element
        if (!options.insertInto) options.insertInto = "head";

	// By default, add <style> tags to the bottom of the target
	if (!options.insertAt) options.insertAt = "bottom";

	var styles = listToStyles(list, options);

	addStylesToDom(styles, options);

	return function update (newList) {
		var mayRemove = [];

		for (var i = 0; i < styles.length; i++) {
			var item = styles[i];
			var domStyle = stylesInDom[item.id];

			domStyle.refs--;
			mayRemove.push(domStyle);
		}

		if(newList) {
			var newStyles = listToStyles(newList, options);
			addStylesToDom(newStyles, options);
		}

		for (var i = 0; i < mayRemove.length; i++) {
			var domStyle = mayRemove[i];

			if(domStyle.refs === 0) {
				for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();

				delete stylesInDom[domStyle.id];
			}
		}
	};
};

function addStylesToDom (styles, options) {
	for (var i = 0; i < styles.length; i++) {
		var item = styles[i];
		var domStyle = stylesInDom[item.id];

		if(domStyle) {
			domStyle.refs++;

			for(var j = 0; j < domStyle.parts.length; j++) {
				domStyle.parts[j](item.parts[j]);
			}

			for(; j < item.parts.length; j++) {
				domStyle.parts.push(addStyle(item.parts[j], options));
			}
		} else {
			var parts = [];

			for(var j = 0; j < item.parts.length; j++) {
				parts.push(addStyle(item.parts[j], options));
			}

			stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
		}
	}
}

function listToStyles (list, options) {
	var styles = [];
	var newStyles = {};

	for (var i = 0; i < list.length; i++) {
		var item = list[i];
		var id = options.base ? item[0] + options.base : item[0];
		var css = item[1];
		var media = item[2];
		var sourceMap = item[3];
		var part = {css: css, media: media, sourceMap: sourceMap};

		if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
		else newStyles[id].parts.push(part);
	}

	return styles;
}

function insertStyleElement (options, style) {
	var target = getElement(options.insertInto)

	if (!target) {
		throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
	}

	var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];

	if (options.insertAt === "top") {
		if (!lastStyleElementInsertedAtTop) {
			target.insertBefore(style, target.firstChild);
		} else if (lastStyleElementInsertedAtTop.nextSibling) {
			target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
		} else {
			target.appendChild(style);
		}
		stylesInsertedAtTop.push(style);
	} else if (options.insertAt === "bottom") {
		target.appendChild(style);
	} else if (typeof options.insertAt === "object" && options.insertAt.before) {
		var nextSibling = getElement(options.insertAt.before, target);
		target.insertBefore(style, nextSibling);
	} else {
		throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
	}
}

function removeStyleElement (style) {
	if (style.parentNode === null) return false;
	style.parentNode.removeChild(style);

	var idx = stylesInsertedAtTop.indexOf(style);
	if(idx >= 0) {
		stylesInsertedAtTop.splice(idx, 1);
	}
}

function createStyleElement (options) {
	var style = document.createElement("style");

	if(options.attrs.type === undefined) {
		options.attrs.type = "text/css";
	}

	if(options.attrs.nonce === undefined) {
		var nonce = getNonce();
		if (nonce) {
			options.attrs.nonce = nonce;
		}
	}

	addAttrs(style, options.attrs);
	insertStyleElement(options, style);

	return style;
}

function createLinkElement (options) {
	var link = document.createElement("link");

	if(options.attrs.type === undefined) {
		options.attrs.type = "text/css";
	}
	options.attrs.rel = "stylesheet";

	addAttrs(link, options.attrs);
	insertStyleElement(options, link);

	return link;
}

function addAttrs (el, attrs) {
	Object.keys(attrs).forEach(function (key) {
		el.setAttribute(key, attrs[key]);
	});
}

function getNonce() {
	if (false) {}

	return __webpack_require__.nc;
}

function addStyle (obj, options) {
	var style, update, remove, result;

	// If a transform function was defined, run it on the css
	if (options.transform && obj.css) {
	    result = typeof options.transform === 'function'
		 ? options.transform(obj.css) 
		 : options.transform.default(obj.css);

	    if (result) {
	    	// If transform returns a value, use that instead of the original css.
	    	// This allows running runtime transformations on the css.
	    	obj.css = result;
	    } else {
	    	// If the transform function returns a falsy value, don't add this css.
	    	// This allows conditional loading of css
	    	return function() {
	    		// noop
	    	};
	    }
	}

	if (options.singleton) {
		var styleIndex = singletonCounter++;

		style = singleton || (singleton = createStyleElement(options));

		update = applyToSingletonTag.bind(null, style, styleIndex, false);
		remove = applyToSingletonTag.bind(null, style, styleIndex, true);

	} else if (
		obj.sourceMap &&
		typeof URL === "function" &&
		typeof URL.createObjectURL === "function" &&
		typeof URL.revokeObjectURL === "function" &&
		typeof Blob === "function" &&
		typeof btoa === "function"
	) {
		style = createLinkElement(options);
		update = updateLink.bind(null, style, options);
		remove = function () {
			removeStyleElement(style);

			if(style.href) URL.revokeObjectURL(style.href);
		};
	} else {
		style = createStyleElement(options);
		update = applyToTag.bind(null, style);
		remove = function () {
			removeStyleElement(style);
		};
	}

	update(obj);

	return function updateStyle (newObj) {
		if (newObj) {
			if (
				newObj.css === obj.css &&
				newObj.media === obj.media &&
				newObj.sourceMap === obj.sourceMap
			) {
				return;
			}

			update(obj = newObj);
		} else {
			remove();
		}
	};
}

var replaceText = (function () {
	var textStore = [];

	return function (index, replacement) {
		textStore[index] = replacement;

		return textStore.filter(Boolean).join('\n');
	};
})();

function applyToSingletonTag (style, index, remove, obj) {
	var css = remove ? "" : obj.css;

	if (style.styleSheet) {
		style.styleSheet.cssText = replaceText(index, css);
	} else {
		var cssNode = document.createTextNode(css);
		var childNodes = style.childNodes;

		if (childNodes[index]) style.removeChild(childNodes[index]);

		if (childNodes.length) {
			style.insertBefore(cssNode, childNodes[index]);
		} else {
			style.appendChild(cssNode);
		}
	}
}

function applyToTag (style, obj) {
	var css = obj.css;
	var media = obj.media;

	if(media) {
		style.setAttribute("media", media)
	}

	if(style.styleSheet) {
		style.styleSheet.cssText = css;
	} else {
		while(style.firstChild) {
			style.removeChild(style.firstChild);
		}

		style.appendChild(document.createTextNode(css));
	}
}

function updateLink (link, options, obj) {
	var css = obj.css;
	var sourceMap = obj.sourceMap;

	/*
		If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
		and there is no publicPath defined then lets turn convertToAbsoluteUrls
		on by default.  Otherwise default to the convertToAbsoluteUrls option
		directly
	*/
	var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;

	if (options.convertToAbsoluteUrls || autoFixUrls) {
		css = fixUrls(css);
	}

	if (sourceMap) {
		// http://stackoverflow.com/a/26603875
		css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
	}

	var blob = new Blob([css], { type: "text/css" });

	var oldSrc = link.href;

	link.href = URL.createObjectURL(blob);

	if(oldSrc) URL.revokeObjectURL(oldSrc);
}


/***/ }),

/***/ 12482:
/***/ (() => {

/* (ignored) */

/***/ }),

/***/ 82398:
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('["3g2","3ga","3gp","7z","aa","aac","ac","accdb","accdt","ace","adn","ai","aif","aifc","aiff","ait","amr","ani","apk","app","applescript","asax","asc","ascx","asf","ash","ashx","asm","asmx","asp","aspx","asx","au","aup","avi","axd","aze","bak","bash","bat","bin","blank","bmp","bowerrc","bpg","browser","bz2","bzempty","c","cab","cad","caf","cal","cd","cdda","cer","cfg","cfm","cfml","cgi","chm","class","cmd","code-workspace","codekit","coffee","coffeelintignore","com","compile","conf","config","cpp","cptx","cr2","crdownload","crt","crypt","cs","csh","cson","csproj","css","csv","cue","cur","dart","dat","data","db","dbf","deb","default","dgn","dist","diz","dll","dmg","dng","doc","docb","docm","docx","dot","dotm","dotx","download","dpj","ds_store","dsn","dtd","dwg","dxf","editorconfig","el","elf","eml","enc","eot","eps","epub","eslintignore","exe","f4v","fax","fb2","fla","flac","flv","fnt","folder","fon","gadget","gdp","gem","gif","gitattributes","gitignore","go","gpg","gpl","gradle","gz","h","handlebars","hbs","heic","hlp","hs","hsl","htm","html","ibooks","icns","ico","ics","idx","iff","ifo","image","img","iml","in","inc","indd","inf","info","ini","inv","iso","j2","jar","java","jpe","jpeg","jpg","js","json","jsp","jsx","key","kf8","kmk","ksh","kt","kts","kup","less","lex","licx","lisp","lit","lnk","lock","log","lua","m","m2v","m3u","m3u8","m4","m4a","m4r","m4v","map","master","mc","md","mdb","mdf","me","mi","mid","midi","mk","mkv","mm","mng","mo","mobi","mod","mov","mp2","mp3","mp4","mpa","mpd","mpe","mpeg","mpg","mpga","mpp","mpt","msg","msi","msu","nef","nes","nfo","nix","npmignore","ocx","odb","ods","odt","ogg","ogv","ost","otf","ott","ova","ovf","p12","p7b","pages","part","pcd","pdb","pdf","pem","pfx","pgp","ph","phar","php","pid","pkg","pl","plist","pm","png","po","pom","pot","potx","pps","ppsx","ppt","pptm","pptx","prop","ps","ps1","psd","psp","pst","pub","py","pyc","qt","ra","ram","rar","raw","rb","rdf","rdl","reg","resx","retry","rm","rom","rpm","rpt","rsa","rss","rst","rtf","ru","rub","sass","scss","sdf","sed","sh","sit","sitemap","skin","sldm","sldx","sln","sol","sphinx","sql","sqlite","step","stl","svg","swd","swf","swift","swp","sys","tar","tax","tcsh","tex","tfignore","tga","tgz","tif","tiff","tmp","tmx","torrent","tpl","ts","tsv","ttf","twig","txt","udf","vb","vbproj","vbs","vcd","vcf","vcs","vdi","vdx","vmdk","vob","vox","vscodeignore","vsd","vss","vst","vsx","vtx","war","wav","wbk","webinfo","webm","webp","wma","wmf","wmv","woff","woff2","wps","wsf","xaml","xcf","xfl","xlm","xls","xlsm","xlsx","xlt","xltm","xltx","xml","xpi","xps","xrb","xsd","xsl","xspf","xz","yaml","yml","z","zip","zsh"]');

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			id: moduleId,
/******/ 			loaded: false,
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/global */
/******/ 	(() => {
/******/ 		__webpack_require__.g = (function() {
/******/ 			if (typeof globalThis === 'object') return globalThis;
/******/ 			try {
/******/ 				return this || new Function('return this')();
/******/ 			} catch (e) {
/******/ 				if (typeof window === 'object') return window;
/******/ 			}
/******/ 		})();
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/node module decorator */
/******/ 	(() => {
/******/ 		__webpack_require__.nmd = (module) => {
/******/ 			module.paths = [];
/******/ 			if (!module.children) module.children = [];
/******/ 			return module;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/nonce */
/******/ 	(() => {
/******/ 		__webpack_require__.nc = undefined;
/******/ 	})();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";


function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
__webpack_require__(46790);
__webpack_require__(65554);
__webpack_require__(30947);
__webpack_require__(54897);
var _ = _interopRequireDefault(__webpack_require__(38851));
var _XLoader = _interopRequireDefault(__webpack_require__(47913));
var _install = _interopRequireDefault(__webpack_require__(56036));
var _SCParser = _interopRequireDefault(__webpack_require__(11547));
var _SCExpressionCaller = _interopRequireWildcard(__webpack_require__(52942));
var _SCProgramInstance = _interopRequireDefault(__webpack_require__(45540));
var _SCBlocklyEditor = _interopRequireDefault(__webpack_require__(91835));
__webpack_require__(16092);
var _SCGrammar = _interopRequireDefault(__webpack_require__(43480));
var _SCTypeManager = _interopRequireDefault(__webpack_require__(6360));
var EZUI = _interopRequireWildcard(__webpack_require__(13605));
var _KVEZUIComponentGenerator = _interopRequireDefault(__webpack_require__(49944));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
// EZUIComponentGenerator

(0, _install["default"])(absol.coreDom);
window.absol.form = _["default"];
window.absol.EZUI = EZUI;
window.absol.XLoader = _XLoader["default"];
absol.sclang = absol.sclang || {};
Object.assign(absol.sclang, {
  SCParser: _SCParser["default"],
  SCExpressionCaller: _SCProgramInstance["default"],
  SCGrammar: _SCGrammar["default"],
  evalSCExpression: _SCExpressionCaller.evalSCExpression,
  SCProgramInstance: _SCProgramInstance["default"],
  "SCBlocklyEditor": _SCBlocklyEditor["default"],
  "SCTypeManager": _SCTypeManager["default"]
});
})();

/******/ })()
;

VaKeR 2022