You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

214 rivejä
107 KiB

/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./src/preview.js");
/******/ })
/************************************************************************/
/******/ ({
/***/ "./node_modules/css-loader/index.js!./src/form/external/bootstrap-datetimepicker.css":
/*!**********************************************************************************!*\
!*** ./node_modules/css-loader!./src/form/external/bootstrap-datetimepicker.css ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/lib/css-base.js */ \"./node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.i, \"/*!\\r\\n * Datetimepicker for Bootstrap\\r\\n *\\r\\n * Copyright 2012 Stefan Petre\\r\\n * Improvements by Andrew Rowls\\r\\n * Licensed under the Apache License v2.0\\r\\n * http://www.apache.org/licenses/LICENSE-2.0\\r\\n *\\r\\n */\\r\\n.datetimepicker {\\r\\n\\tpadding: 4px;\\r\\n\\tmargin-top: 1px;\\r\\n\\t-webkit-border-radius: 4px;\\r\\n\\t-moz-border-radius: 4px;\\r\\n\\tborder-radius: 4px;\\r\\n\\tdirection: ltr;\\r\\n}\\r\\n\\r\\n.datetimepicker-inline {\\r\\n\\twidth: 220px;\\r\\n}\\r\\n\\r\\n.datetimepicker.datetimepicker-rtl {\\r\\n\\tdirection: rtl;\\r\\n}\\r\\n\\r\\n.datetimepicker.datetimepicker-rtl table tr td span {\\r\\n\\tfloat: right;\\r\\n}\\r\\n\\r\\n.datetimepicker-dropdown, .datetimepicker-dropdown-left {\\r\\n\\ttop: 0;\\r\\n\\tleft: 0;\\r\\n}\\r\\n\\r\\n[class*=\\\" datetimepicker-dropdown\\\"]:before {\\r\\n\\tcontent: '';\\r\\n\\tdisplay: inline-block;\\r\\n\\tborder-left: 7px solid transparent;\\r\\n\\tborder-right: 7px solid transparent;\\r\\n\\tborder-bottom: 7px solid #cccccc;\\r\\n\\tborder-bottom-color: rgba(0, 0, 0, 0.2);\\r\\n\\tposition: absolute;\\r\\n}\\r\\n\\r\\n[class*=\\\" datetimepicker-dropdown\\\"]:after {\\r\\n\\tcontent: '';\\r\\n\\tdisplay: inline-block;\\r\\n\\tborder-left: 6px solid transparent;\\r\\n\\tborder-right: 6px solid transparent;\\r\\n\\tborder-bottom: 6px solid #ffffff;\\r\\n\\tposition: absolute;\\r\\n}\\r\\n\\r\\n[class*=\\\" datetimepicker-dropdown-top\\\"]:before {\\r\\n\\tcontent: '';\\r\\n\\tdisplay: inline-block;\\r\\n\\tborder-left: 7px solid transparent;\\r\\n\\tborder-right: 7px solid transparent;\\r\\n\\tborder-top: 7px solid #cccccc;\\r\\n\\tborder-top-color: rgba(0, 0, 0, 0.2);\\r\\n\\tborder-bottom: 0;\\r\\n}\\r\\n\\r\\n[class*=\\\" datetimepicker-dropdown-top\\\"]:after {\\r\\n\\tcontent: '';\\r\\n\\tdisplay: inline-block;\\r\\n\\tborder-left: 6px solid transparent;\\r\\n\\tborder-right: 6px solid transparent;\\r\\n\\tborder-top: 6px solid #ffffff;\\r\\n\\tborder-bottom: 0;\\r\\n}\\r\\n\\r\\n.datetimepicker-dropdown-bottom-left:before {\\r\\n\\ttop: -7px;\\r\\n\\tright: 6px;\\r\\n}\\r\\n\\r\\n.datetimepicker-dropdown-bottom-left:after {\\r\\n\\ttop: -6px;\\r\\n\\tright: 7px;\\r\\n}\\r\\n\\r\\n.datetimepicker-dropdown-bottom-right:before {\\r\\n\\ttop: -7px;\\r\\n\\tleft: 6px;\\r\\n}\\r\\n\\r\\n.datetimepicker-dropdown-bottom-right:after {\\r\\n\\ttop: -6px;\\r\\n\\tleft: 7px;\\r\\n}\\r\\n\\r\\n.datetimepicker-dropdown-top-left:before {\\r\\n\\tbottom: -7px;\\r\\n\\tright: 6px;\\r\\n}\\r\\n\\r\\n.datetimepicker-dropdown-top-left:after {\\r\\n\\tbottom: -6px;\\r\\n\\tright: 7px;\\r\\n}\\r\\n\\r\\n.datetimepicker-dropdown-top-right:before {\\r\\n\\tbottom: -7px;\\r\\n\\tleft: 6px;\\r\\n}\\r\\n\\r\\n.datetimepicker-dropdown-top-right:after {\\r\\n\\tbottom: -6px;\\r\\n\\tleft: 7px;\\r\\n}\\r\\n\\r\\n.datetimepicker > div {\\r\\n\\tdisplay: none;\\r\\n}\\r\\n\\r\\n.datetimepicker.minutes div.datetimepicker-minutes {\\r\\n\\tdisplay: block;\\r\\n}\\r\\n\\r\\n.datetimepicker.hours div.datetimepicker-hours {\\r\\n\\tdisplay: block;\\r\\n}\\r\\n\\r\\n.datetimepicker.days div.datetimepicker-days {\\r\\n\\tdisplay: block;\\r\\n}\\r\\n\\r\\n.datetimepicker.months div.datetimepicker-months {\\r\\n\\tdisplay: block;\\r\\n}\\r\\n\\r\\n.datetimepicker.years div.datetimepicker-years {\\r\\n\\tdisplay: block;\\r\\n}\\r\\n\\r\\n.datetimepicker table {\\r\\n\\tmargin: 0;\\r\\n}\\r\\n\\r\\n.datetimepicker td,\\r\\n.datetimepicker th {\\r\\n\\ttext-align: center;\\r\\n\\twidth: 20px;\\r\\n\\theight: 20px;\\r\\n\\t-webkit-border-radius: 4px;\\r\\n\\t-moz-border-radius: 4px;\\r\\n\\tborder-radius: 4px;\\r\\n\\tborder: none;\\r\\n}\\r\\n\\r\\n.table-striped .datetimepicker table tr td,\\r\\n.table-striped .datetimepicker table tr th {\\r\\n\\tbackground-color: transparent;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td.minute:hover {\\r\\n\\tbackground: #eeeeee;\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td.hour:hover {\\r\\n\\tbackground: #eeeeee;\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td.day:hover {\\r\\n\\tbackground: #eeeeee;\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td.old,\\r\\n.datetimepicker table tr td.new {\\r\\n\\tcolor: #999999;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td.disabled,\\r\\n.datetimepicker table tr td.disabled:hover {\\r\\n\\tbackground: none;\\r\\n\\tcolor: #999999;\\r\\n\\tcursor: default;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td.today,\\r\\n.datetimepicker table tr td.today:hover,\\r\\n.datetimepicker table tr td.today.disabled,\\r\\n.datetimepicker table tr td.today.disabled:hover {\\r\\n\\tbackground-color: #fde19a;\\r\\n\\tbackground-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);\\r\\n\\tbackground-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);\\r\\n\\tbackground-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));\\r\\n\\tbackground-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);\\r\\n\\tbackground-image: -o-linear-gradient(top, #fdd49a, #fdf59a);\\r\\n\\tbackground-image: linear-gradient(to bottom, #fdd49a, #fdf59a);\\r\\n\\tbackground-repeat: repeat-x;\\r\\n\\tfilter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);\\r\\n\\tborder-color: #fdf59a #fdf59a #fbed50;\\r\\n\\tborder-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\\r\\n\\tfilter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td.today:hover,\\r\\n.datetimepicker table tr td.today:hover:hover,\\r\\n.datetimepicker table tr td.today.disabled:hover,\\r\\n.datetimepicker table tr td.today.disabled:hover:hover,\\r\\n.datetimepicker table tr td.today:active,\\r\\n.datetimepicker table tr td.today:hover:active,\\r\\n.datetimepicker table tr td.today.disabled:active,\\r\\n.datetimepicker table tr td.today.disabled:hover:active,\\r\\n.datetimepicker table tr td.today.active,\\r\\n.datetimepicker table tr td.today:hover.active,\\r\\n.datetimepicker table tr td.today.disabled.active,\\r\\n.datetimepicker table tr td.today.disabled:hover.active,\\r\\n.datetimepicker table tr td.today.disabled,\\r\\n.datetimepicker table tr td.today:hover.disabled,\\r\\n.datetimepicker table tr td.today.disabled.disabled,\\r\\n.datetimepicker table tr td.today.disabled:hover.disabled,\\r\\n.datetimepicker table tr td.today[disabled],\\r\\n.datetimepicker table tr td.today:hover[disabled],\\r\\n.datetimepicker table tr td.today.disabled[disabled],\\r\\n.datetimepicker table tr td.today.disabled:hover[disabled] {\\r\\n\\tbackground-color: #fdf59a;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td.today:active,\\r\\n.datetimepicker table tr td.today:hover:active,\\r\\n.datetimepicker table tr td.today.disabled:active,\\r\\n.datetimepicker table tr td.today.disabled:hover:active,\\r\\n.datetimepicker table tr td.today.active,\\r\\n.datetimepicker table tr td.today:hover.active,\\r\\n.datetimepicker table tr td.today.disabled.active,\\r\\n.datetimepicker table tr td.today.disabled:hover.active {\\r\\n\\tbackground-color: #fbf069;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td.active,\\r\\n.datetimepicker table tr td.active:hover,\\r\\n.datetimepicker table tr td.active.disabled,\\r\\n.datetimepicker table tr td.active.disabled:hover {\\r\\n\\tbackground-color: #006dcc;\\r\\n\\tbackground-image: -moz-linear-gradient(top, #0088cc, #0044cc);\\r\\n\\tbackground-image: -ms-linear-gradient(top, #0088cc, #0044cc);\\r\\n\\tbackground-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));\\r\\n\\tbackground-image: -webkit-linear-gradient(top, #0088cc, #0044cc);\\r\\n\\tbackground-image: -o-linear-gradient(top, #0088cc, #0044cc);\\r\\n\\tbackground-image: linear-gradient(to bottom, #0088cc, #0044cc);\\r\\n\\tbackground-repeat: repeat-x;\\r\\n\\tfilter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);\\r\\n\\tborder-color: #0044cc #0044cc #002a80;\\r\\n\\tborder-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\\r\\n\\tfilter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\\r\\n\\tcolor: #ffffff;\\r\\n\\ttext-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td.active:hover,\\r\\n.datetimepicker table tr td.active:hover:hover,\\r\\n.datetimepicker table tr td.active.disabled:hover,\\r\\n.datetimepicker table tr td.active.disabled:hover:hover,\\r\\n.datetimepicker table tr td.active:active,\\r\\n.datetimepicker table tr td.active:hover:active,\\r\\n.datetimepicker table tr td.active.disabled:active,\\r\\n.datetimepicker table tr td.active.disabled:hover:active,\\r\\n.datetimepicker table tr td.active.active,\\r\\n.datetimepicker table tr td.active:hover.active,\\r\\n.datetimepicker table tr td.active.disabled.active,\\r\\n.datetimepicker table tr td.active.disabled:hover.active,\\r\\n.datetimepicker table tr td.active.disabled,\\r\\n.datetimepicker table tr td.active:hover.disabled,\\r\\n.datetimepicker table tr td.active.disabled.disabled,\\r\\n.datetimepicker table tr td.active.disabled:hover.disabled,\\r\\n.datetimepicker table tr td.active[disabled],\\r\\n.datetimepicker table tr td.active:hover[disabled],\\r\\n.datetimepicker table tr td.active.disabled[disabled],\\r\\n.datetimepicker table tr td.active.disabled:hover[disabled] {\\r\\n\\tbackground-color: #0044cc;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td.active:active,\\r\\n.datetimepicker table tr td.active:hover:active,\\r\\n.datetimepicker table tr td.active.disabled:active,\\r\\n.datetimepicker table tr td.active.disabled:hover:active,\\r\\n.datetimepicker table tr td.active.active,\\r\\n.datetimepicker table tr td.active:hover.active,\\r\\n.datetimepicker table tr td.active.disabled.active,\\r\\n.datetimepicker table tr td.active.disabled:hover.active {\\r\\n\\tbackground-color: #003399;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td span {\\r\\n\\tdisplay: block;\\r\\n\\twidth: 23%;\\r\\n\\theight: 54px;\\r\\n\\tline-height: 54px;\\r\\n\\tfloat: left;\\r\\n\\tmargin: 1%;\\r\\n\\tcursor: pointer;\\r\\n\\t-webkit-border-radius: 4px;\\r\\n\\t-moz-border-radius: 4px;\\r\\n\\tborder-radius: 4px;\\r\\n}\\r\\n\\r\\n.datetimepicker .datetimepicker-hours span {\\r\\n\\theight: 26px;\\r\\n\\tline-height: 26px;\\r\\n}\\r\\n\\r\\n.datetimepicker .datetimepicker-hours table tr td span.hour_am,\\r\\n.datetimepicker .datetimepicker-hours table tr td span.hour_pm {\\r\\n\\twidth: 14.6%;\\r\\n}\\r\\n\\r\\n.datetimepicker .datetimepicker-hours fieldset legend,\\r\\n.datetimepicker .datetimepicker-minutes fieldset legend {\\r\\n\\tmargin-bottom: inherit;\\r\\n\\tline-height: 30px;\\r\\n}\\r\\n\\r\\n.datetimepicker .datetimepicker-minutes span {\\r\\n\\theight: 26px;\\r\\n\\tline-height: 26px;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td span:hover {\\r\\n\\tbackground: #eeeeee;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td span.disabled,\\r\\n.datetimepicker table tr td span.disabled:hover {\\r\\n\\tbackground: none;\\r\\n\\tcolor: #999999;\\r\\n\\tcursor: default;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td span.active,\\r\\n.datetimepicker table tr td span.active:hover,\\r\\n.datetimepicker table tr td span.active.disabled,\\r\\n.datetimepicker table tr td span.active.disabled:hover {\\r\\n\\tbackground-color: #006dcc;\\r\\n\\tbackground-image: -moz-linear-gradient(top, #0088cc, #0044cc);\\r\\n\\tbackground-image: -ms-linear-gradient(top, #0088cc, #0044cc);\\r\\n\\tbackground-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));\\r\\n\\tbackground-image: -webkit-linear-gradient(top, #0088cc, #0044cc);\\r\\n\\tbackground-image: -o-linear-gradient(top, #0088cc, #0044cc);\\r\\n\\tbackground-image: linear-gradient(to bottom, #0088cc, #0044cc);\\r\\n\\tbackground-repeat: repeat-x;\\r\\n\\tfilter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);\\r\\n\\tborder-color: #0044cc #0044cc #002a80;\\r\\n\\tborder-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);\\r\\n\\tfilter: progid:DXImageTransform.Microsoft.gradient(enabled=false);\\r\\n\\tcolor: #ffffff;\\r\\n\\ttext-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td span.active:hover,\\r\\n.datetimepicker table tr td span.active:hover:hover,\\r\\n.datetimepicker table tr td span.active.disabled:hover,\\r\\n.datetimepicker table tr td span.active.disabled:hover:hover,\\r\\n.datetimepicker table tr td span.active:active,\\r\\n.datetimepicker table tr td span.active:hover:active,\\r\\n.datetimepicker table tr td span.active.disabled:active,\\r\\n.datetimepicker table tr td span.active.disabled:hover:active,\\r\\n.datetimepicker table tr td span.active.active,\\r\\n.datetimepicker table tr td span.active:hover.active,\\r\\n.datetimepicker table tr td span.active.disabled.active,\\r\\n.datetimepicker table tr td span.active.disabled:hover.active,\\r\\n.datetimepicker table tr td span.active.disabled,\\r\\n.datetimepicker table tr td span.active:hover.disabled,\\r\\n.datetimepicker table tr td span.active.disabled.disabled,\\r\\n.datetimepicker table tr td span.active.disabled:hover.disabled,\\r\\n.datetimepicker table tr td span.active[disabled],\\r\\n.datetimepicker table tr td span.active:hover[disabled],\\r\\n.datetimepicker table tr td span.active.disabled[disabled],\\r\\n.datetimepicker table tr td span.active.disabled:hover[disabled] {\\r\\n\\tbackground-color: #0044cc;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td span.active:active,\\r\\n.datetimepicker table tr td span.active:hover:active,\\r\\n.datetimepicker table tr td span.active.disabled:active,\\r\\n.datetimepicker table tr td span.active.disabled:hover:active,\\r\\n.datetimepicker table tr td span.active.active,\\r\\n.datetimepicker table tr td span.active:hover.active,\\r\\n.datetimepicker table tr td span.active.disabled.active,\\r\\n.datetimepicker table tr td span.active.disabled:hover.active {\\r\\n\\tbackground-color: #003399;\\r\\n}\\r\\n\\r\\n.datetimepicker table tr td span.old {\\r\\n\\tcolor: #999999;\\r\\n}\\r\\n\\r\\n.datetimepicker th.switch {\\r\\n\\twidth: 145px;\\r\\n}\\r\\n\\r\\n.datetimepicker th span.glyphicon {\\r\\n\\tpointer-events: none;\\r\\n}\\r\\n\\r\\n.datetimepicker thead tr:first-child th,\\r\\n.datetimepicker tfoot th {\\r\\n\\tcursor: pointer;\\r\\n}\\r\\n\\r\\n.datetimepicker thead tr:first-child th:hover,\\r\\n.datetimepicker tfoot th:hover {\\r\\n\\tbackground: #eeeeee;\\r\\n}\\r\\n\\r\\n.input-append.date .add-on i,\\r\\n.input-prepend.date .add-on i,\\r\\n.input-group.date .input-group-addon span {\\r\\n\\tcursor: pointer;\\r\\n\\twidth: 14px;\\r\\n\\theight: 14px;\\r\\n}\\r\\n\", \"\"]);\n\n// exports\n\n\n//# sourceURL=webpack:///./src/form/external/bootstrap-datetimepicker.css?./node_modules/css-loader");
/***/ }),
/***/ "./node_modules/css-loader/lib/css-base.js":
/*!*************************************************!*\
!*** ./node_modules/css-loader/lib/css-base.js ***!
\*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n//# sourceURL=webpack:///./node_modules/css-loader/lib/css-base.js?");
/***/ }),
/***/ "./node_modules/style-loader/addStyles.js":
/*!************************************************!*\
!*** ./node_modules/style-loader/addStyles.js ***!
\************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nvar stylesInDom = {},\n\tmemoize = function(fn) {\n\t\tvar memo;\n\t\treturn function () {\n\t\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\t\treturn memo;\n\t\t};\n\t},\n\tisOldIE = memoize(function() {\n\t\treturn /msie [6-9]\\b/.test(self.navigator.userAgent.toLowerCase());\n\t}),\n\tgetHeadElement = memoize(function () {\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\n\t}),\n\tsingletonElement = null,\n\tsingletonCounter = 0,\n\tstyleElementsInsertedAtTop = [];\n\nmodule.exports = function(list, options) {\n\tif(typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif(typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (typeof options.singleton === \"undefined\") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the bottom of <head>.\n\tif (typeof options.insertAt === \"undefined\") options.insertAt = \"bottom\";\n\n\tvar styles = listToStyles(list);\n\taddStylesToDom(styles, options);\n\n\treturn function update(newList) {\n\t\tvar mayRemove = [];\n\t\tfor(var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\t\tfor(var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor(var j = 0; j < domStyle.parts.length; j++)\n\t\t\t\t\tdomStyle.parts[j]();\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction addStylesToDom(styles, options) {\n\tfor(var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles(list) {\n\tvar styles = [];\n\tvar newStyles = {};\n\tfor(var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\t\tif(!newStyles[id])\n\t\t\tstyles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse\n\t\t\tnewStyles[id].parts.push(part);\n\t}\n\treturn styles;\n}\n\nfunction insertStyleElement(options, styleElement) {\n\tvar head = getHeadElement();\n\tvar lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];\n\tif (options.insertAt === \"top\") {\n\t\tif(!lastStyleElementInsertedAtTop) {\n\t\t\thead.insertBefore(styleElement, head.firstChild);\n\t\t} else if(lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\thead.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\thead.appendChild(styleElement);\n\t\t}\n\t\tstyleElementsInsertedAtTop.push(styleElement);\n\t} else if (options.insertAt === \"bottom\") {\n\t\thead.appendChild(styleElement);\n\t} else {\n\t\tthrow new Error(\"Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.\");\n\t}\n}\n\nfunction removeStyleElement(styleElement) {\n\tstyleElement.parentNode.removeChild(styleElement);\n\tvar idx = styleElementsInsertedAtTop.indexOf(styleElement);\n\tif(idx >= 0) {\n\t\tstyleElementsInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement(options) {\n\tvar styleElement = document.createElement(\"style\");\n\tstyleElement.type = \"text/css\";\n\tinsertStyleElement(options, styleElement);\n\treturn styleElement;\n}\n\nfunction createLinkElement(options) {\n\tvar linkElement = document.createElement(\"link\");\n\tlinkElement.rel = \"stylesheet\";\n\tinsertStyleElement(options, linkElement);\n\treturn linkElement;\n}\n\nfunction addStyle(obj, options) {\n\tvar styleElement, update, remove;\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\t\tstyleElement = singletonElement || (singletonElement = createStyleElement(options));\n\t\tupdate = applyToSingletonTag.bind(null, styleElement, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);\n\t} else if(obj.sourceMap &&\n\t\ttypeof URL === \"function\" &&\n\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\ttypeof Blob === \"function\" &&\n\t\ttypeof btoa === \"function\") {\n\t\tstyleElement = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, styleElement);\n\t\tremove = function() {\n\t\t\tremoveStyleElement(styleElement);\n\t\t\tif(styleElement.href)\n\t\t\t\tURL.revokeObjectURL(styleElement.href);\n\t\t};\n\t} else {\n\t\tstyleElement = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, styleElement);\n\t\tremove = function() {\n\t\t\tremoveStyleElement(styleElement);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle(newObj) {\n\t\tif(newObj) {\n\t\t\tif(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)\n\t\t\t\treturn;\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\t\treturn textStore.filter(Boolean).join('\\n');\n\t};\n})();\n\nfunction applyToSingletonTag(styleElement, index, remove, obj) {\n\tvar css = remove ? \"\" : obj.css;\n\n\tif (styleElement.styleSheet) {\n\t\tstyleElement.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = styleElement.childNodes;\n\t\tif (childNodes[index]) styleElement.removeChild(childNodes[index]);\n\t\tif (childNodes.length) {\n\t\t\tstyleElement.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyleElement.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag(styleElement, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyleElement.setAttribute(\"media\", media)\n\t}\n\n\tif(styleElement.styleSheet) {\n\t\tstyleElement.styleSheet.cssText = css;\n\t} else {\n\t\twhile(styleElement.firstChild) {\n\t\t\tstyleElement.removeChild(styleElement.firstChild);\n\t\t}\n\t\tstyleElement.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink(linkElement, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\tif(sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t}\n\n\tvar blob = new Blob([css], { type: \"text/css\" });\n\n\tvar oldSrc = linkElement.href;\n\n\tlinkElement.href = URL.createObjectURL(blob);\n\n\tif(oldSrc)\n\t\tURL.revokeObjectURL(oldSrc);\n}\n\n\n//# sourceURL=webpack:///./node_modules/style-loader/addStyles.js?");
/***/ }),
/***/ "./node_modules/undo-manager/lib/undomanager.js":
/*!******************************************************!*\
!*** ./node_modules/undo-manager/lib/undomanager.js ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var __WEBPACK_AMD_DEFINE_RESULT__;/*\nSimple Javascript undo and redo.\nhttps://github.com/ArthurClemens/Javascript-Undo-Manager\n*/\n\n;(function() {\n\n\t'use strict';\n\n function removeFromTo(array, from, to) {\n array.splice(from,\n !to ||\n 1 + to - from + (!(to < 0 ^ from >= 0) && (to < 0 || -1) * array.length));\n return array.length;\n }\n\n var UndoManager = function() {\n\n var commands = [],\n index = -1,\n limit = 0,\n isExecuting = false,\n callback,\n \n // functions\n execute;\n\n execute = function(command, action) {\n if (!command || typeof command[action] !== \"function\") {\n return this;\n }\n isExecuting = true;\n\n command[action]();\n\n isExecuting = false;\n return this;\n };\n\n return {\n\n /*\n Add a command to the queue.\n */\n add: function (command) {\n if (isExecuting) {\n return this;\n }\n // if we are here after having called undo,\n // invalidate items higher on the stack\n commands.splice(index + 1, commands.length - index);\n\n commands.push(command);\n \n // if limit is set, remove items from the start\n if (limit && commands.length > limit) {\n removeFromTo(commands, 0, -(limit+1));\n }\n \n // set the current index to the end\n index = commands.length - 1;\n if (callback) {\n callback();\n }\n return this;\n },\n\n /*\n Pass a function to be called on undo and redo actions.\n */\n setCallback: function (callbackFunc) {\n callback = callbackFunc;\n },\n\n /*\n Perform undo: call the undo function at the current index and decrease the index by 1.\n */\n undo: function () {\n var command = commands[index];\n if (!command) {\n return this;\n }\n execute(command, \"undo\");\n index -= 1;\n if (callback) {\n callback();\n }\n return this;\n },\n\n /*\n Perform redo: call the redo function at the next index and increase the index by 1.\n */\n redo: function () {\n var command = commands[index + 1];\n if (!command) {\n return this;\n }\n execute(command, \"redo\");\n index += 1;\n if (callback) {\n callback();\n }\n return this;\n },\n\n /*\n Clears the memory, losing all stored states. Reset the index.\n */\n clear: function () {\n var prev_size = commands.length;\n\n commands = [];\n index = -1;\n\n if (callback && (prev_size > 0)) {\n callback();\n }\n },\n\n hasUndo: function () {\n return index !== -1;\n },\n\n hasRedo: function () {\n return index < (commands.length - 1);\n },\n\n getCommands: function () {\n return commands;\n },\n\n getIndex: function() {\n return index;\n },\n \n setLimit: function (l) {\n limit = l;\n }\n };\n };\n\n\tif (true) {\n\t\t// AMD. Register as an anonymous module.\n\t\t!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n\t\t\treturn UndoManager;\n\t\t}).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n\n}());\n\n\n//# sourceURL=webpack:///./node_modules/undo-manager/lib/undomanager.js?");
/***/ }),
/***/ "./src/MsgBox.js":
/*!***********************!*\
!*** ./src/MsgBox.js ***!
\***********************/
/*! exports provided: alert, confirm, dialog, showDialog */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"alert\", function() { return alert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"confirm\", function() { return confirm; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dialog\", function() { return dialog; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"showDialog\", function() { return showDialog; });\n/**\r\n * Created by jacky on 2016/7/9.\r\n */\nfunction alert(msg) {\n const dialog = buildDialog('消息提示', msg);\n dialog.modal('show');\n};\n\nfunction confirm(msg, callback) {\n const dialog = buildDialog('确认提示', msg, [{\n name: '确认',\n click: function () {\n callback.call(this);\n }\n }]);\n dialog.modal('show');\n};\n\nfunction dialog(title, content, callback) {\n const dialog = buildDialog(title, content, [{\n name: '确认',\n click: function () {\n callback.call(this);\n }\n }]);\n dialog.modal('show');\n};\n\nfunction showDialog(title, dialogContent, buttons, events, large) {\n const dialog = buildDialog(title, dialogContent, buttons, large);\n dialog.modal('show');\n if (events) {\n for (let event of events) {\n dialog.on(event.name, event.callback);\n }\n }\n};\n\nfunction buildDialog(title, dialogContent, buttons, large) {\n const className = 'modal-dialog' + (large ? ' modal-lg' : '');\n let modal = $(`<div class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\"></div>`);\n let dialog = $(`<div class=\"${className}\"></div>`);\n modal.append(dialog);\n let content = $(`<div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">\n &times;\n </button>\n <h4 class=\"modal-title\">\n ${title}\n </h4>\n </div>\n <div class=\"modal-body\">\n ${typeof dialogContent === 'string' ? dialogContent : ''}\n </div>`);\n if (typeof dialogContent === 'object') {\n content.find('.modal-body').append(dialogContent);\n }\n dialog.append(content);\n let footer = $(`<div class=\"modal-footer\"></div>`);\n content.append(footer);\n if (buttons) {\n buttons.forEach((btn, index) => {\n let button = $(`<button type=\"button\" class=\"btn btn-default\">${btn.name}</button>`);\n button.click(function (e) {\n btn.click.call(this);\n if (!btn.holdDialog) {\n modal.modal('hide');\n }\n }.bind(this));\n footer.append(button);\n });\n } else {\n let okBtn = $(`<button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">确定</button>`);\n footer.append(okBtn);\n }\n\n modal.on(\"show.bs.modal\", function () {\n var index = 1050;\n $(document).find('.modal').each(function (i, d) {\n var zIndex = $(d).css('z-index');\n if (zIndex && zIndex !== '' && !isNaN(zIndex)) {\n zIndex = parseInt(zIndex);\n if (zIndex > index) {\n index = zIndex;\n }\n }\n });\n index++;\n modal.css({ 'z-index': index });\n });\n return modal;\n};\n\n//# sourceURL=webpack:///./src/MsgBox.js?");
/***/ }),
/***/ "./src/Utils.js":
/*!**********************!*\
!*** ./src/Utils.js ***!
\**********************/
/*! exports provided: showLoading, showSearchLoading, hideSearchLoading, hideLoading, resetTableData, buildNewCellDef, tableToXml, encode, getParameter, mmToPoint, pointToMM, pointToPixel, pixelToPoint, setDirty, resetDirty, formatDate, buildPageSizeList, undoManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"showLoading\", function() { return showLoading; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"showSearchLoading\", function() { return showSearchLoading; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hideSearchLoading\", function() { return hideSearchLoading; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hideLoading\", function() { return hideLoading; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetTableData\", function() { return resetTableData; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"buildNewCellDef\", function() { return buildNewCellDef; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"tableToXml\", function() { return tableToXml; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"encode\", function() { return encode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getParameter\", function() { return getParameter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mmToPoint\", function() { return mmToPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pointToMM\", function() { return pointToMM; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pointToPixel\", function() { return pointToPixel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pixelToPoint\", function() { return pixelToPoint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setDirty\", function() { return setDirty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetDirty\", function() { return resetDirty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatDate\", function() { return formatDate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"buildPageSizeList\", function() { return buildPageSizeList; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"undoManager\", function() { return undoManager; });\n/* harmony import */ var undo_manager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! undo-manager */ \"./node_modules/undo-manager/lib/undomanager.js\");\n/* harmony import */ var undo_manager__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(undo_manager__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _MsgBox_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MsgBox.js */ \"./src/MsgBox.js\");\n/**\r\n * Created by Jacky.gao on 2016/7/27.\r\n */\n\n\n\nfunction showLoading() {\n const url = window._server + '/res/ureport-asserts/icons/loading.gif';\n const h = $(window).height() / 2,\n w = $(window).width() / 2;\n const cover = $(`<div class=\"ureport-loading-cover\" style=\"position: absolute;left: 0px;top: 0px;width:${w * 2}px;height:${h * 2}px;z-index: 1199;background:rgba(222,222,222,.5)\"></div>`);\n $(document.body).append(cover);\n const loading = $(`<div class=\"ureport-loading\" style=\"text-align: center;position: absolute;z-index: 1120;left: ${w - 35}px;top: ${h - 35}px;\"><img src=\"${url}\">\n <div style=\"margin-top: 5px\">打印数据加载中...</div></div>`);\n $(document.body).append(loading);\n};\n\nfunction showSearchLoading() {\n const url = window._server + '/res/ureport-asserts/icons/loading.gif';\n const h = $(window).height() / 2,\n w = $(window).width() / 2;\n const cover = $(`<div class=\"ureport-search-loading-cover\" style=\"position: absolute;left: 0px;top: 0px;width:${w * 2}px;height:${h * 2}px;z-index: 1199;background:rgba(222,222,222,.5)\"></div>`);\n $(document.body).append(cover);\n const loading = $(`<div class=\"ureport-search-loading\" style=\"text-align: center;position: absolute;z-index: 1120;left: ${w - 35}px;top: ${h - 35}px;\"><img src=\"${url}\">\n <div style=\"margin-top: 5px\">数据正在努力加载中,请稍等...</div></div>`);\n $(document.body).append(loading);\n};\n\nfunction hideSearchLoading() {\n $('.ureport-search-loading-cover').remove();\n $('.ureport-search-loading').remove();\n};\n\nfunction hideLoading() {\n $('.ureport-loading-cover').remove();\n $('.ureport-loading').remove();\n};\n\nfunction resetTableData(hot) {\n const countCols = hot.countCols(),\n countRows = hot.countRows(),\n context = hot.context,\n data = [];\n for (let i = 0; i < countRows; i++) {\n let rowData = [];\n for (let j = 0; j < countCols; j++) {\n let td = hot.getCell(i, j);\n if (!td) {\n rowData.push(\"\");\n continue;\n }\n let cellDef = context.getCell(i, j);\n if (cellDef) {\n let valueType = cellDef.value.type,\n value = cellDef.value;\n if (valueType === 'dataset') {\n let text = value.datasetName + \".\" + value.aggregate + \"(\";\n let prop = value.property;\n if (prop.length > 13) {\n text += prop.substring(0, 10) + '..)';\n } else {\n text += prop + \")\";\n }\n rowData.push(text);\n } else if (valueType === 'expression') {\n let v = value.value || '';\n if (v.length > 16) {\n v = v.substring(0, 13) + '...';\n }\n rowData.push(v);\n } else {\n rowData.push(value.value || \"\");\n }\n } else {\n rowData.push(\"\");\n }\n }\n data.push(rowData);\n }\n hot.loadData(data);\n};\n\nfunction buildNewCellDef(rowNumber, columnNumber) {\n let cellDef = { rowNumber, columnNumber, expand: 'None', cellStyle: { fontSize: 9, forecolor: '0,0,0', fontFamily: '宋体', align: 'center', valign: 'middle' }, value: { type: 'simple', value: '' } };\n return cellDef;\n};\n\nfunction tableToXml(context) {\n const hot = context.hot;\n const countRows = hot.countRows(),\n countCols = hot.countCols();\n let xml = `<?xml version=\"1.0\" encoding=\"UTF-8\"?><ureport>`;\n let rowsXml = '',\n columnXml = '';\n const rowHeaders = context.rowHeaders;\n for (let i = 0; i < countRows; i++) {\n let height = hot.getRowHeight(i) || 16;\n height = pixelToPoint(height);\n let band = null;\n for (let header of rowHeaders) {\n if (header.rowNumber === i) {\n band = header.band;\n break;\n }\n }\n if (band) {\n rowsXml += `<row row-number=\"${i + 1}\" height=\"${height}\" band=\"${band}\"/>`;\n } else {\n rowsXml += `<row row-number=\"${i + 1}\" height=\"${height}\"/>`;\n }\n }\n for (let i = 0; i < countCols; i++) {\n let width = hot.getColWidth(i) || 30;\n width = pixelToPoint(width);\n columnXml += `<column col-number=\"${i + 1}\" width=\"${width}\"/>`;\n }\n let cellXml = '',\n spanData = [];\n for (let i = 0; i < countRows; i++) {\n for (let j = 0; j < countCols; j++) {\n if (spanData.indexOf(i + \",\" + j) > -1) {\n continue;\n }\n let cellDef = context.getCell(i, j);\n if (!cellDef) {\n continue;\n }\n let cellName = context.getCellName(i, j);\n cellXml += `<cell expand=\"${cellDef.expand}\" name=\"${cellName}\" row=\"${i + 1}\" col=\"${j + 1}\"`;\n if (cellDef.leftParentCellName && cellDef.leftParentCellName !== '') {\n cellXml += ` left-cell=\"${cellDef.leftParentCellName}\"`;\n }\n if (cellDef.topParentCellName && cellDef.topParentCellName !== '') {\n cellXml += ` top-cell=\"${cellDef.topParentCellName}\"`;\n }\n if (cellDef.fillBlankRows) {\n cellXml += ` fill-blank-rows=\"${cellDef.fillBlankRows}\"`;\n if (cellDef.multiple) {\n cellXml += ` multiple=\"${cellDef.multiple}\"`;\n }\n }\n\n const span = getSpan(hot, i, j);\n let rowSpan = span.rowspan,\n colSpan = span.colspan;\n let startRow = i,\n endRow = i + rowSpan - 1,\n startCol = j,\n endCol = j + colSpan - 1;\n for (let r = startRow; r <= endRow; r++) {\n for (let c = startCol; c <= endCol; c++) {\n spanData.push(r + \",\" + c);\n }\n }\n if (rowSpan > 1) {\n cellXml += ` row-span=\"${rowSpan}\"`;\n }\n if (colSpan > 1) {\n cellXml += ` col-span=\"${colSpan}\"`;\n }\n\n if (cellDef.linkUrl && cellDef.linkUrl !== '') {\n cellXml += ` link-url=\"${cellDef.linkUrl}\"`;\n }\n if (cellDef.linkTargetWindow && cellDef.linkTargetWindow !== '') {\n cellXml += ` link-target-window=\"${cellDef.linkTargetWindow}\"`;\n }\n\n cellXml += '>';\n let cellStyle = cellDef.cellStyle;\n cellXml += buildCellStyle(cellStyle);\n if (cellDef.linkParameters && cellDef.linkParameters.length > 0) {\n for (let param of cellDef.linkParameters) {\n cellXml += `<link-parameter name=\"${param.name}\">`;\n cellXml += `<value><![CDATA[${param.value}]]></value>`;\n cellXml += `</link-parameter>`;\n }\n }\n const value = cellDef.value;\n if (value.type === 'dataset') {\n let msg = null;\n if (!value.datasetName) {\n msg = `${cellName}单元格数据集属性不能为空!`;\n }\n if (!msg && !value.property) {\n msg = `${cellName}单元格属性不能为空!`;\n }\n if (!msg && !value.aggregate) {\n msg = `${cellName}单元格聚合方式属性不能为空!`;\n }\n if (msg) {\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_1__[\"alert\"])(msg);\n throw msg;\n }\n const mappingType = value.mappingType || 'simple';\n cellXml += `<dataset-value dataset-name=\"${encode(value.datasetName)}\" aggregate=\"${value.aggregate}\" property=\"${value.property}\" order=\"${value.order}\" mapping-type=\"${mappingType}\"`;\n if (mappingType === 'dataset') {\n cellXml += ` mapping-dataset=\"${value.mappingDataset}\" mapping-key-property=\"${value.mappingKeyProperty}\" mapping-value-property=\"${value.mappingValueProperty}\"`;\n }\n cellXml += '>';\n cellXml += buildConditions(value.conditions);\n if (value.aggregate === 'customgroup') {\n const groupItems = value.groupItems;\n for (let groupItem of groupItems) {\n cellXml += `<group-item name=\"${groupItem.name}\">`;\n for (let condition of groupItem.conditions) {\n cellXml += `<condition property=\"${condition.left}\" op=\"${encode(condition.operation || condition.op)}\" id=\"${condition.id}\"`;\n if (condition.join) {\n cellXml += ` join=\"${condition.join}\">`;\n } else {\n cellXml += `>`;\n }\n cellXml += `<value><![CDATA[${condition.right}]]></value>`;\n cellXml += `</condition>`;\n }\n cellXml += '</group-item>';\n }\n }\n if (mappingType === 'simple') {\n const mappingItems = value.mappingItems;\n if (mappingItems && mappingItems.length > 0) {\n for (let mappingItem of mappingItems) {\n cellXml += `<mapping-item value=\"${encode(mappingItem.value)}\" label=\"${encode(mappingItem.label)}\"/>`;\n }\n }\n }\n cellXml += `</dataset-value>`;\n } else if (value.type === 'expression') {\n if (!value.value || value.value === '') {\n const msg = `${cellName}单元格表达式不能为空`;\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_1__[\"alert\"])(msg);\n throw msg;\n }\n cellXml += `<expression-value>`;\n cellXml += `<![CDATA[${value.value}]]>`;\n cellXml += `</expression-value>`;\n } else if (value.type === 'simple') {\n cellXml += `<simple-value>`;\n cellXml += `<![CDATA[${value.value || ''}]]>`;\n cellXml += `</simple-value>`;\n } else if (value.type === 'image') {\n cellXml += `<image-value source=\"${value.source}\"`;\n if (value.width) {\n cellXml += ` width=\"${value.width}\"`;\n }\n if (value.height) {\n cellXml += ` height=\"${value.height}\"`;\n }\n cellXml += `>`;\n cellXml += `<text>`;\n cellXml += `<![CDATA[${value.value}]]>`;\n cellXml += `</text>`;\n cellXml += `</image-value>`;\n } else if (value.type === 'zxing') {\n cellXml += `<zxing-value source=\"${value.source}\" category=\"${value.category}\" width=\"${value.width}\" height=\"${value.height}\"`;\n if (value.format) {\n cellXml += ` format=\"${value.format}\"`;\n }\n cellXml += `>`;\n cellXml += `<text>`;\n cellXml += `<![CDATA[${value.value}]]>`;\n cellXml += `</text>`;\n cellXml += `</zxing-value>`;\n } else if (value.type === 'slash') {\n cellXml += `<slash-value>`;\n const slashes = value.slashes;\n for (let slash of slashes) {\n cellXml += `<slash text=\"${slash.text}\" x=\"${slash.x}\" y=\"${slash.y}\" degree=\"${slash.degree}\"/>`;\n }\n cellXml += `<base64-data>`;\n cellXml += `<![CDATA[${value.base64Data}]]>`;\n cellXml += `</base64-data>`;\n cellXml += `</slash-value>`;\n } else if (value.type === 'chart') {\n cellXml += `<chart-value>`;\n const chart = value.chart;\n const dataset = chart.dataset;\n cellXml += `<dataset dataset-name=\"${dataset.datasetName}\" type=\"${dataset.type}\"`;\n if (dataset.categoryProperty) {\n cellXml += ` category-property=\"${dataset.categoryProperty}\"`;\n }\n if (dataset.seriesProperty) {\n cellXml += ` series-property=\"${dataset.seriesProperty}\"`;\n }\n if (dataset.seriesType) {\n cellXml += ` series-type=\"${dataset.seriesType}\"`;\n }\n if (dataset.seriesText) {\n cellXml += ` series-text=\"${dataset.seriesText}\"`;\n }\n if (dataset.valueProperty) {\n cellXml += ` value-property=\"${dataset.valueProperty}\"`;\n }\n if (dataset.rProperty) {\n cellXml += ` r-property=\"${dataset.rProperty}\"`;\n }\n if (dataset.xProperty) {\n cellXml += ` x-property=\"${dataset.xProperty}\"`;\n }\n if (dataset.yProperty) {\n cellXml += ` y-property=\"${dataset.yProperty}\"`;\n }\n if (dataset.collectType) {\n cellXml += ` collect-type=\"${dataset.collectType}\"`;\n }\n cellXml += `/>`;\n const xaxes = chart.xaxes;\n if (xaxes) {\n cellXml += `<xaxes`;\n if (xaxes.rotation) {\n cellXml += ` rotation=\"${xaxes.rotation}\"`;\n }\n cellXml += `>`;\n const scaleLabel = xaxes.scaleLabel;\n if (scaleLabel) {\n cellXml += `<scale-label display=\"${scaleLabel.display}\"`;\n if (scaleLabel.labelString) {\n cellXml += ` label-string=\"${scaleLabel.labelString}\"`;\n }\n cellXml += `/>`;\n }\n cellXml += `</xaxes>`;\n }\n const yaxes = chart.yaxes;\n if (yaxes) {\n cellXml += `<yaxes`;\n if (yaxes.rotation) {\n cellXml += ` rotation=\"${yaxes.rotation}\"`;\n }\n cellXml += `>`;\n const scaleLabel = yaxes.scaleLabel;\n if (scaleLabel) {\n cellXml += `<scale-label display=\"${scaleLabel.display}\"`;\n if (scaleLabel.labelString) {\n cellXml += ` label-string=\"${scaleLabel.labelString}\"`;\n }\n cellXml += `/>`;\n }\n cellXml += `</yaxes>`;\n }\n const options = chart.options;\n if (options) {\n for (let option of options) {\n cellXml += `<option type=\"${option.type}\"`;\n if (option.position) {\n cellXml += ` position=\"${option.position}\"`;\n }\n if (option.display !== undefined && option.display !== null) {\n cellXml += ` display=\"${option.display}\"`;\n }\n if (option.duration) {\n cellXml += ` duration=\"${option.duration}\"`;\n }\n if (option.easing) {\n cellXml += ` easing=\"${option.easing}\"`;\n }\n if (option.text) {\n cellXml += ` text=\"${option.text}\"`;\n }\n cellXml += `/>`;\n }\n }\n const plugins = chart.plugins || [];\n for (let plugin of plugins) {\n cellXml += `<plugin name=\"${plugin.name}\" display=\"${plugin.display}\"/>`;\n }\n if (plugins) {}\n cellXml += `</chart-value>`;\n }\n const propertyConditions = cellDef.conditionPropertyItems || [];\n for (let pc of propertyConditions) {\n cellXml += `<condition-property-item name=\"${pc.name}\"`;\n const rowHeight = pc.rowHeight;\n if (rowHeight !== null && rowHeight !== undefined && rowHeight !== -1) {\n cellXml += ` row-height=\"${rowHeight}\"`;\n }\n const colWidth = pc.colWidth;\n if (colWidth !== null && colWidth !== undefined && colWidth !== -1) {\n cellXml += ` col-width=\"${colWidth}\"`;\n }\n if (pc.newValue && pc.newValue !== '') {\n cellXml += ` new-value=\"${pc.newValue}\"`;\n }\n if (pc.linkUrl && pc.linkUrl !== '') {\n cellXml += ` link-url=\"${pc.linkUrl}\"`;\n let targetWindow = pc.linkTargetWindow;\n if (!targetWindow || targetWindow === '') {\n targetWindow = \"_self\";\n }\n cellXml += ` link-target-window=\"${pc.linkTargetWindow}\"`;\n }\n cellXml += `>`;\n const paging = pc.paging;\n if (paging) {\n cellXml += `<paging position=\"${paging.position}\" line=\"${paging.line}\"/>`;\n }\n if (pc.linkParameters && pc.linkParameters.length > 0) {\n for (let param of pc.linkParameters) {\n cellXml += `<link-parameter name=\"${param.name}\">`;\n cellXml += `<value><![CDATA[${param.value}]]></value>`;\n cellXml += `</link-parameter>`;\n }\n }\n const style = pc.cellStyle;\n if (style) {\n cellXml += buildCellStyle(style, true);\n }\n cellXml += buildConditions(pc.conditions);\n cellXml += `</condition-property-item>`;\n }\n cellXml += '</cell>';\n }\n }\n xml += cellXml;\n xml += rowsXml;\n xml += columnXml;\n const header = context.reportDef.header;\n if (header && (header.left || header.center || header.right)) {\n xml += '<header ';\n if (header.fontFamily) {\n xml += ` font-family=\"${header.fontFamily}\"`;\n }\n if (header.fontSize) {\n xml += ` font-size=\"${header.fontSize}\"`;\n }\n if (header.forecolor) {\n xml += ` forecolor=\"${header.forecolor}\"`;\n }\n if (header.bold) {\n xml += ` bold=\"${header.bold}\"`;\n }\n if (header.italic) {\n xml += ` italic=\"${header.italic}\"`;\n }\n if (header.underline) {\n xml += ` underline=\"${header.underline}\"`;\n }\n if (header.margin) {\n xml += ` margin=\"${header.margin}\"`;\n }\n xml += '>';\n if (header.left) {\n xml += `<left><![CDATA[${header.left}]]></left>`;\n }\n if (header.center) {\n xml += `<center><![CDATA[${header.center}]]></center>`;\n }\n if (header.right) {\n xml += `<right><![CDATA[${header.right}]]></right>`;\n }\n xml += '</header>';\n }\n const footer = context.reportDef.footer;\n if (footer && (footer.left || footer.center || footer.right)) {\n xml += '<footer ';\n if (footer.fontFamily) {\n xml += ` font-family=\"${footer.fontFamily}\"`;\n }\n if (footer.fontSize) {\n xml += ` font-size=\"${footer.fontSize}\"`;\n }\n if (footer.forecolor) {\n xml += ` forecolor=\"${footer.forecolor}\"`;\n }\n if (footer.bold) {\n xml += ` bold=\"${footer.bold}\"`;\n }\n if (footer.italic) {\n xml += ` italic=\"${footer.italic}\"`;\n }\n if (footer.underline) {\n xml += ` underline=\"${footer.underline}\"`;\n }\n if (footer.margin) {\n xml += ` margin=\"${footer.margin}\"`;\n }\n xml += '>';\n if (footer.left) {\n xml += `<left><![CDATA[${footer.left}]]></left>`;\n }\n if (footer.center) {\n xml += `<center><![CDATA[${footer.center}]]></center>`;\n }\n if (footer.right) {\n xml += `<right><![CDATA[${footer.right}]]></right>`;\n }\n xml += '</footer>';\n }\n let datasourceXml = \"\";\n const datasources = context.reportDef.datasources;\n for (let datasource of datasources) {\n let ds = `<datasource name=\"${encode(datasource.name)}\" type=\"${datasource.type}\"`;\n let type = datasource.type;\n if (type === 'jdbc') {\n ds += ` username=\"${encode(datasource.username)}\"`;\n ds += ` password=\"${encode(datasource.password)}\"`;\n ds += ` url=\"${encode(datasource.url)}\"`;\n ds += ` driver=\"${datasource.driver}\"`;\n ds += '>';\n for (let dataset of datasource.datasets) {\n ds += `<dataset name=\"${encode(dataset.name)}\" type=\"sql\">`;\n ds += `<sql><![CDATA[${dataset.sql}]]></sql>`;\n for (let field of dataset.fields) {\n ds += `<field name=\"${field.name}\"/>`;\n }\n for (let parameter of dataset.parameters) {\n ds += `<parameter name=\"${encode(parameter.name)}\" type=\"${parameter.type}\" default-value=\"${encode(parameter.defaultValue)}\"/>`;\n }\n ds += `</dataset>`;\n }\n } else if (type === 'spring') {\n ds += ` bean=\"${datasource.beanId}\">`;\n for (let dataset of datasource.datasets) {\n ds += `<dataset name=\"${encode(dataset.name)}\" type=\"bean\" method=\"${dataset.method}\" clazz=\"${dataset.clazz}\">`;\n for (let field of dataset.fields) {\n ds += `<field name=\"${field.name}\"/>`;\n }\n ds += `</dataset>`;\n }\n } else if (type === 'buildin') {\n ds += '>';\n for (let dataset of datasource.datasets) {\n ds += `<dataset name=\"${encode(dataset.name)}\" type=\"sql\">`;\n ds += `<sql><![CDATA[${dataset.sql}]]></sql>`;\n for (let field of dataset.fields) {\n ds += `<field name=\"${field.name}\"/>`;\n }\n for (let parameter of dataset.parameters) {\n ds += `<parameter name=\"${parameter.name}\" type=\"${parameter.type}\" default-value=\"${parameter.defaultValue}\"/>`;\n }\n ds += `</dataset>`;\n }\n }\n ds += \"</datasource>\";\n datasourceXml += ds;\n }\n xml += datasourceXml;\n const paper = context.reportDef.paper;\n let htmlIntervalRefreshValue = 0;\n if (paper.htmlIntervalRefreshValue !== null && paper.htmlIntervalRefreshValue !== undefined) {\n htmlIntervalRefreshValue = paper.htmlIntervalRefreshValue;\n }\n xml += `<paper type=\"${paper.paperType}\" left-margin=\"${paper.leftMargin}\" right-margin=\"${paper.rightMargin}\"\n top-margin=\"${paper.topMargin}\" bottom-margin=\"${paper.bottomMargin}\" paging-mode=\"${paper.pagingMode}\" fixrows=\"${paper.fixRows}\"\n width=\"${paper.width}\" height=\"${paper.height}\" orientation=\"${paper.orientation}\" html-report-align=\"${paper.htmlReportAlign}\" bg-image=\"${paper.bgImage || ''}\" html-interval-refresh-value=\"${htmlIntervalRefreshValue}\" column-enabled=\"${paper.columnEnabled}\"`;\n if (paper.columnEnabled) {\n xml += ` column-count=\"${paper.columnCount}\" column-margin=\"${paper.columnMargin}\"`;\n }\n xml += `></paper>`;\n if (context.reportDef.searchFormXml) {\n xml += context.reportDef.searchFormXml;\n }\n xml += `</ureport>`;\n xml = encodeURIComponent(xml);\n return xml;\n};\n\nfunction getSpan(hot, row, col) {\n const mergeCells = hot.getSettings().mergeCells || [];\n for (let item of mergeCells) {\n if (item.row === row && item.col === col) {\n return item;\n }\n }\n return { rowspan: 0, colspan: 0 };\n}\n\nfunction buildConditions(conditions) {\n let cellXml = '';\n if (conditions) {\n const size = conditions.length;\n for (let condition of conditions) {\n if (!condition.type || condition.type === 'property') {\n if (condition.left) {\n cellXml += `<condition property=\"${condition.left}\" op=\"${encode(condition.operation)}\" id=\"${condition.id}\"`;\n } else {\n cellXml += `<condition op=\"${encode(condition.operation)}\" id=\"${condition.id}\"`;\n }\n cellXml += ` type=\"${condition.type}\"`;\n if (condition.join && size > 1) {\n cellXml += ` join=\"${condition.join}\">`;\n } else {\n cellXml += `>`;\n }\n cellXml += `<value><![CDATA[${condition.right}]]></value>`;\n } else {\n cellXml += `<condition type=\"${condition.type}\" op=\"${encode(condition.operation)}\" id=\"${condition.id}\"`;\n if (condition.join && size > 1) {\n cellXml += ` join=\"${condition.join}\">`;\n } else {\n cellXml += `>`;\n }\n cellXml += `<left><![CDATA[${condition.left}]]></left>`;\n cellXml += `<right><![CDATA[${condition.right}]]></right>`;\n }\n cellXml += `</condition>`;\n }\n }\n return cellXml;\n};\n\nfunction buildCellStyle(cellStyle, condition) {\n let cellXml = \"<cell-style\";\n if (condition) {\n cellXml += ` for-condition=\"true\"`;\n }\n if (cellStyle.fontSize && cellStyle.fontSize !== '') {\n cellXml += ` font-size=\"${cellStyle.fontSize}\"`;\n }\n if (cellStyle.fontSizeScope) {\n cellXml += ` font-size-scope=\"${cellStyle.fontSizeScope}\"`;\n }\n if (cellStyle.forecolor && cellStyle.forecolor !== '') {\n cellXml += ` forecolor=\"${cellStyle.forecolor}\"`;\n }\n if (cellStyle.forecolorScope) {\n cellXml += ` forecolor-scope=\"${cellStyle.forecolorScope}\"`;\n }\n if (cellStyle.fontFamily) {\n if (cellStyle.fontFamily === '0') {\n cellXml += ` font-family=\"\"`;\n } else {\n cellXml += ` font-family=\"${cellStyle.fontFamily}\"`;\n }\n }\n if (cellStyle.fontFamilyScope) {\n cellXml += ` font-family-scope=\"${cellStyle.fontFamilyScope}\"`;\n }\n if (cellStyle.bgcolor && cellStyle.bgcolor !== '') {\n cellXml += ` bgcolor=\"${cellStyle.bgcolor}\"`;\n }\n if (cellStyle.bgcolorScope) {\n cellXml += ` bgcolor-scope=\"${cellStyle.bgcolorScope}\"`;\n }\n if (cellStyle.format && cellStyle.format !== '') {\n cellXml += ` format=\"${cellStyle.format}\"`;\n }\n if (cellStyle.bold !== undefined && cellStyle.bold !== null) {\n cellXml += ` bold=\"${cellStyle.bold}\"`;\n }\n if (cellStyle.boldScope) {\n cellXml += ` bold-scope=\"${cellStyle.boldScope}\"`;\n }\n if (cellStyle.italic !== undefined && cellStyle.italic !== null) {\n cellXml += ` italic=\"${cellStyle.italic}\"`;\n }\n if (cellStyle.italicScope) {\n cellXml += ` italic-scope=\"${cellStyle.italicScope}\"`;\n }\n if (cellStyle.underline !== undefined && cellStyle.underline !== null) {\n cellXml += ` underline=\"${cellStyle.underline}\"`;\n }\n if (cellStyle.underlineScope) {\n cellXml += ` underline-scope=\"${cellStyle.underlineScope}\"`;\n }\n if (cellStyle.wrapCompute !== undefined && cellStyle.wrapCompute !== null) {\n cellXml += ` wrap-compute=\"${cellStyle.wrapCompute}\"`;\n }\n if (cellStyle.align && cellStyle.align !== '') {\n cellXml += ` align=\"${cellStyle.align}\"`;\n }\n if (cellStyle.alignScope) {\n cellXml += ` align-scope=\"${cellStyle.alignScope}\"`;\n }\n if (cellStyle.valign && cellStyle.valign !== '') {\n cellXml += ` valign=\"${cellStyle.valign}\"`;\n }\n if (cellStyle.valignScope) {\n cellXml += ` valign-scope=\"${cellStyle.valignScope}\"`;\n }\n if (cellStyle.lineHeight) {\n cellXml += ` line-height=\"${cellStyle.lineHeight}\"`;\n }\n cellXml += '>';\n let leftBorder = cellStyle.leftBorder;\n if (leftBorder && leftBorder.style !== \"none\") {\n cellXml += `<left-border width=\"${leftBorder.width}\" style=\"${leftBorder.style}\" color=\"${leftBorder.color}\"/>`;\n }\n let rightBorder = cellStyle.rightBorder;\n if (rightBorder && rightBorder.style !== \"none\") {\n cellXml += `<right-border width=\"${rightBorder.width}\" style=\"${rightBorder.style}\" color=\"${rightBorder.color}\"/>`;\n }\n let topBorder = cellStyle.topBorder;\n if (topBorder && topBorder.style !== \"none\") {\n cellXml += `<top-border width=\"${topBorder.width}\" style=\"${topBorder.style}\" color=\"${topBorder.color}\"/>`;\n }\n let bottomBorder = cellStyle.bottomBorder;\n if (bottomBorder && bottomBorder.style !== \"none\") {\n cellXml += `<bottom-border width=\"${bottomBorder.width}\" style=\"${bottomBorder.style}\" color=\"${bottomBorder.color}\"/>`;\n }\n cellXml += '</cell-style>';\n return cellXml;\n};\n\nfunction encode(text) {\n let result = text.replace(/[<>&\"]/g, function (c) {\n return { '<': '&lt;', '>': '&gt;', '&': '&amp;', '\"': '&quot;' }[c];\n });\n return result;\n};\n\nfunction getParameter(name) {\n var reg = new RegExp(\"(^|&)\" + name + \"=([^&]*)(&|$)\");\n var r = window.location.search.substr(1).match(reg);\n if (r != null) return r[2];\n return null;\n};\n\nfunction mmToPoint(mm) {\n let value = mm * 2.834646;\n return Math.round(value);\n};\nfunction pointToMM(point) {\n let value = point * 0.352778;\n return Math.round(value);\n};\n\nfunction pointToPixel(point) {\n const value = point * 1.33;\n return Math.round(value);\n};\n\nfunction pixelToPoint(pixel) {\n const value = pixel * 0.75;\n return Math.round(value);\n};\n\nfunction setDirty() {\n $('#__save_btn').removeClass('disabled');\n};\n\nfunction resetDirty() {\n $('#__save_btn').addClass('disabled');\n};\n\nfunction formatDate(date, format) {\n if (typeof date === 'number') {\n date = new Date(date);\n }\n if (typeof date === 'string') {\n return date;\n }\n var o = {\n \"M+\": date.getMonth() + 1,\n \"d+\": date.getDate(),\n \"H+\": date.getHours(),\n \"m+\": date.getMinutes(),\n \"s+\": date.getSeconds()\n };\n if (/(y+)/.test(format)) format = format.replace(RegExp.$1, (date.getFullYear() + \"\").substr(4 - RegExp.$1.length));\n for (var k in o) if (new RegExp(\"(\" + k + \")\").test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : (\"00\" + o[k]).substr((\"\" + o[k]).length));\n return format;\n};\n\nfunction buildPageSizeList() {\n return {\n A0: { width: 841, height: 1189 },\n A1: { width: 594, height: 841 },\n A2: { width: 420, height: 594 },\n A3: { width: 297, height: 420 },\n A4: { width: 210, height: 297 },\n A5: { width: 148, height: 210 },\n A6: { width: 105, height: 148 },\n A7: { width: 74, height: 105 },\n A8: { width: 52, height: 74 },\n A9: { width: 37, height: 52 },\n A10: { width: 26, height: 37 },\n B0: { width: 1000, height: 1414 },\n B1: { width: 707, height: 1000 },\n B2: { width: 500, height: 707 },\n B3: { width: 353, height: 500 },\n B4: { width: 250, height: 353 },\n B5: { width: 176, height: 250 },\n B6: { width: 125, height: 176 },\n B7: { width: 88, height: 125 },\n B8: { width: 62, height: 88 },\n B9: { width: 44, height: 62 },\n B10: { width: 31, height: 44 }\n };\n}\n\nconst undoManager = new undo_manager__WEBPACK_IMPORTED_MODULE_0___default.a();\n\n//# sourceURL=webpack:///./src/Utils.js?");
/***/ }),
/***/ "./src/dialog/PDFPrintDialog.js":
/*!**************************************!*\
!*** ./src/dialog/PDFPrintDialog.js ***!
\**************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return PDFPrintDialog; });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils.js */ \"./src/Utils.js\");\n/* harmony import */ var _MsgBox_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../MsgBox.js */ \"./src/MsgBox.js\");\n/**\r\n * Created by Jacky.Gao on 2017-02-07.\r\n */\n\n\n\nclass PDFPrintDialog {\n constructor() {\n const w = $(window).width(),\n h = $(window).height();\n this.paperSizeList = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"buildPageSizeList\"])();\n this.dialog = $(`<div class=\"modal fade\" role=\"dialog\" aria-hidden=\"true\" style=\"z-index: 1110\">\n <div class=\"modal-dialog modal-lg\" style=\"width: 1250px;\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">\n &times;\n </button>\n <h4 class=\"modal-title\">\n ${window.i18n.pdfPrint.title}\n </h4>\n </div>\n <div class=\"modal-body\" style=\"padding-top:5px\"></div>\n <div class=\"modal-footer\">\n </div>\n </div>\n </div>\n </div>`);\n this.body = this.dialog.find('.modal-body');\n const footer = this.dialog.find(\".modal-footer\");\n this.initBody();\n }\n initBody() {\n const toolbar = $(`<fieldset style=\"width: 100%;height: 60px;font-size: 12px;border: solid 1px #ddd;border-radius: 5px;padding: 1px 8px;\">\n <legend style=\"font-size: 12px;width: 60px;border-bottom: none;margin-bottom: 0;\">${window.i18n.pdfPrint.setup}</legend>\n </fieldset>`);\n this.body.append(toolbar);\n const pageTypeGroup = $(`<div class=\"form-group\" style=\"display: inline-block\"><label>${window.i18n.pdfPrint.paper}</label></div>`);\n toolbar.append(pageTypeGroup);\n this.pageSelect = $(`<select class=\"form-control\" style=\"display: inline-block;width: 68px;font-size: 12px;padding: 1px;height: 28px;\">\n <option>A0</option>\n <option>A1</option>\n <option>A2</option>\n <option>A3</option>\n <option>A4</option>\n <option>A5</option>\n <option>A6</option>\n <option>A7</option>\n <option>A8</option>\n <option>A9</option>\n <option>A10</option>\n <option>B0</option>\n <option>B1</option>\n <option>B2</option>\n <option>B3</option>\n <option>B4</option>\n <option>B5</option>\n <option>B6</option>\n <option>B7</option>\n <option>B8</option>\n <option>B9</option>\n <option>B10</option>\n <option value=\"CUSTOM\">${window.i18n.pdfPrint.custom}</option>\n </select>`);\n pageTypeGroup.append(this.pageSelect);\n const _this = this;\n this.pageSelect.change(function () {\n let value = $(this).val();\n if (value === 'CUSTOM') {\n _this.pageWidthEditor.prop('readonly', false);\n _this.pageHeightEditor.prop('readonly', false);\n } else {\n _this.pageWidthEditor.prop('readonly', true);\n _this.pageHeightEditor.prop('readonly', true);\n let pageSize = _this.paperSizeList[value];\n _this.pageWidthEditor.val(pageSize.width);\n _this.pageHeightEditor.val(pageSize.height);\n _this.paper.width = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"mmToPoint\"])(pageSize.width);\n _this.paper.height = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"mmToPoint\"])(pageSize.height);\n }\n _this.paper.paperType = value;\n });\n\n const pageWidthGroup = $(`<div class=\"form-group\" style=\"display: inline-block;margin-left: 6px\"><span>${window.i18n.pdfPrint.width}</span></div>`);\n toolbar.append(pageWidthGroup);\n this.pageWidthEditor = $(`<input type=\"number\" class=\"form-control\" readonly style=\"display: inline-block;width: 40px;font-size: 12px;padding: 1px;height: 28px\">`);\n pageWidthGroup.append(this.pageWidthEditor);\n this.pageWidthEditor.change(function () {\n let value = $(this).val();\n if (!value || isNaN(value)) {\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_1__[\"alert\"])(`${window.i18n.pdfPrint.numberTip}`);\n return;\n }\n _this.paper.width = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"mmToPoint\"])(value);\n _this.context.printLine.refresh();\n });\n\n const pageHeightGroup = $(`<div class=\"form-group\" style=\"display: inline-block;margin-left: 6px\"><span>${window.i18n.pdfPrint.height}</span></div>`);\n toolbar.append(pageHeightGroup);\n this.pageHeightEditor = $(`<input type=\"number\" class=\"form-control\" readonly style=\"display: inline-block;width: 40px;font-size: 12px;padding: 1px;height: 28px\">`);\n pageHeightGroup.append(this.pageHeightEditor);\n this.pageHeightEditor.change(function () {\n let value = $(this).val();\n if (!value || isNaN(value)) {\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_1__[\"alert\"])(`${window.i18n.pdfPrint.numberTip}`);\n return;\n }\n _this.paper.height = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"mmToPoint\"])(value);\n });\n\n const orientationGroup = $(`<div class=\"form-group\" style=\"display: inline-block;margin-left: 6px\"><label>${window.i18n.pdfPrint.orientation}</label></div>`);\n toolbar.append(orientationGroup);\n this.orientationSelect = $(`<select class=\"form-control\" style=\"display:inline-block;width: 60px;font-size: 12px;padding: 1px;height: 28px\">\n <option value=\"portrait\">${window.i18n.pdfPrint.portrait}</option>\n <option value=\"landscape\">${window.i18n.pdfPrint.landscape}</option>\n </select>`);\n orientationGroup.append(this.orientationSelect);\n this.orientationSelect.change(function () {\n let value = $(this).val();\n _this.paper.orientation = value;\n });\n\n const marginGroup = $(`<div style=\"display: inline-block\"></div>`);\n toolbar.append(marginGroup);\n\n const leftMarginGroup = $(`<div class=\"form-group\" style=\"display: inline-block;margin-left:6px\"><label>${window.i18n.pdfPrint.leftMargin}</label></div>`);\n marginGroup.append(leftMarginGroup);\n this.leftMarginEditor = $(`<input type=\"number\" class=\"form-control\" style=\"display: inline-block;width: 40px;font-size: 12px;padding: 1px;height: 28px\">`);\n leftMarginGroup.append(this.leftMarginEditor);\n this.leftMarginEditor.change(function () {\n let value = $(this).val();\n if (!value || isNaN(value)) {\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_1__[\"alert\"])(`${window.i18n.pdfPrint.numberTip}`);\n return;\n }\n _this.paper.leftMargin = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"mmToPoint\"])(value);\n _this.context.printLine.refresh();\n });\n\n const rightMarginGroup = $(`<div class=\"form-group\" style=\"display: inline-block;margin-top: 5px;margin-left: 6px\"\"><label>${window.i18n.pdfPrint.rightMargin}</label></div>`);\n marginGroup.append(rightMarginGroup);\n this.rightMarginEditor = $(`<input type=\"number\" class=\"form-control\" style=\"display: inline-block;width: 40px;font-size: 12px;padding: 1px;height: 28px\">`);\n rightMarginGroup.append(this.rightMarginEditor);\n this.rightMarginEditor.change(function () {\n let value = $(this).val();\n if (!value || isNaN(value)) {\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_1__[\"alert\"])(`${window.i18n.pdfPrint.numberTip}`);\n return;\n }\n _this.paper.rightMargin = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"mmToPoint\"])(value);\n _this.context.printLine.refresh();\n });\n\n const topMarginGroup = $(`<div class=\"form-group\" style=\"display: inline-block;margin-left: 6px;\"><label>${window.i18n.pdfPrint.topMargin}</label></div>`);\n marginGroup.append(topMarginGroup);\n this.topMarginEditor = $(`<input type=\"number\" class=\"form-control\" style=\"display: inline-block;width: 40px;font-size: 12px;padding: 1px;height: 28px\">`);\n topMarginGroup.append(this.topMarginEditor);\n this.topMarginEditor.change(function () {\n let value = $(this).val();\n if (!value || isNaN(value)) {\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_1__[\"alert\"])(`${window.i18n.pdfPrint.numberTip}`);\n return;\n }\n _this.paper.topMargin = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"mmToPoint\"])(value);\n });\n\n const bottomMarginGroup = $(`<div class=\"form-group\" style=\"display: inline-block;margin-left: 6px\"\"><label>${window.i18n.pdfPrint.bottomMargin}</label></div>`);\n marginGroup.append(bottomMarginGroup);\n this.bottomMarginEditor = $(`<input type=\"number\" class=\"form-control\" style=\"display: inline-block;width: 40px;font-size: 12px;padding: 1px;height: 28px\">`);\n bottomMarginGroup.append(this.bottomMarginEditor);\n this.bottomMarginEditor.change(function () {\n let value = $(this).val();\n if (!value || isNaN(value)) {\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_1__[\"alert\"])(`${window.i18n.pdfPrint.numberTip}`);\n return;\n }\n _this.paper.bottomMargin = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"mmToPoint\"])(value);\n });\n const file = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"getParameter\"])('_u');\n const urlParameters = window.location.search;\n const button = $(`<button class=\"btn btn-primary\" style=\"padding-top:5px;height: 30px;margin-left: 10px;\">${window.i18n.pdfPrint.apply}</button>`);\n toolbar.append(button);\n let index = 0;\n button.click(function () {\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"showLoading\"])();\n const paperData = JSON.stringify(_this.paper);\n $.ajax({\n type: 'POST',\n data: { _paper: paperData },\n url: window._server + '/pdf/newPaging' + urlParameters,\n success: function () {\n const newUrl = window._server + '/pdf/show' + urlParameters + '&_r=' + index++;\n _this.iFrame.prop('src', newUrl);\n },\n error: function () {\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"hideLoading\"])();\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_1__[\"alert\"])(`${window.i18n.pdfPrint.fail}`);\n }\n });\n });\n\n const printButton = $(`<button class=\"btn btn-danger\" style=\"padding-top:5px;height: 30px;margin-left: 10px;\">${window.i18n.pdfPrint.print}</button>`);\n toolbar.append(printButton);\n printButton.click(function () {\n window.frames['_iframe_for_pdf_print'].window.print();\n });\n }\n\n initIFrame() {\n if (this.iFrame) {\n return;\n }\n const urlParameters = buildLocationSearchParameters();\n const h = $(window).height();\n const url = window._server + \"/pdf/show\" + urlParameters + \"&_p=1\";\n this.iFrame = $(`<iframe name=\"_iframe_for_pdf_print\" style=\"width: 100%;height:${h}px;margin-top: 5px;border:solid 1px #c2c2c2\" frameborder=\"0\" src=\"${url}\"></iframe>`);\n this.body.append(this.iFrame);\n const iframe = this.iFrame.get(0);\n const msie = window.navigator.appName.indexOf(\"Internet Explorer\");\n const ie11 = !!window.MSInputMethodContext && !!document.documentMode;\n if (msie === -1 && !ie11) {\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"showLoading\"])();\n }\n this.iFrame.on('load', function () {\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"hideLoading\"])();\n });\n }\n\n show(paper) {\n this.paper = paper;\n this.pageSelect.val(this.paper.paperType);\n this.pageWidthEditor.val(Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"pointToMM\"])(this.paper.width));\n this.pageHeightEditor.val(Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"pointToMM\"])(this.paper.height));\n this.pageSelect.trigger('change');\n this.leftMarginEditor.val(Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"pointToMM\"])(this.paper.leftMargin));\n this.rightMarginEditor.val(Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"pointToMM\"])(this.paper.rightMargin));\n this.topMarginEditor.val(Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"pointToMM\"])(this.paper.topMargin));\n this.bottomMarginEditor.val(Object(_Utils_js__WEBPACK_IMPORTED_MODULE_0__[\"pointToMM\"])(this.paper.bottomMargin));\n this.orientationSelect.val(this.paper.orientation);\n this.dialog.modal('show');\n this.initIFrame();\n }\n};\n\n//# sourceURL=webpack:///./src/dialog/PDFPrintDialog.js?");
/***/ }),
/***/ "./src/form/external/bootstrap-datetimepicker.css":
/*!********************************************************!*\
!*** ./src/form/external/bootstrap-datetimepicker.css ***!
\********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../node_modules/css-loader!./bootstrap-datetimepicker.css */ \"./node_modules/css-loader/index.js!./src/form/external/bootstrap-datetimepicker.css\");\nif(typeof content === 'string') content = [[module.i, content, '']];\n// add the styles to the DOM\nvar update = __webpack_require__(/*! ../../../node_modules/style-loader/addStyles.js */ \"./node_modules/style-loader/addStyles.js\")(content, {});\nif(content.locals) module.exports = content.locals;\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./src/form/external/bootstrap-datetimepicker.css?");
/***/ }),
/***/ "./src/i18n/preview.json":
/*!*******************************!*\
!*** ./src/i18n/preview.json ***!
\*******************************/
/*! exports provided: pdfPrint, default */
/***/ (function(module) {
eval("module.exports = JSON.parse(\"{\\\"pdfPrint\\\":{\\\"title\\\":\\\"PDF在线打印\\\",\\\"setup\\\":\\\"打印配置\\\",\\\"paper\\\":\\\"纸张:\\\",\\\"custom\\\":\\\"自定义\\\",\\\"width\\\":\\\"宽(毫米):\\\",\\\"numberTip\\\":\\\"请输入数字!\\\",\\\"height\\\":\\\"高(毫米):\\\",\\\"orientation\\\":\\\"方向:\\\",\\\"portrait\\\":\\\"纵向\\\",\\\"landscape\\\":\\\"横向\\\",\\\"leftMargin\\\":\\\"左边距(毫米):\\\",\\\"rightMargin\\\":\\\"右边距(毫米):\\\",\\\"topMargin\\\":\\\"上边距(毫米):\\\",\\\"bottomMargin\\\":\\\"下边距(毫米):\\\",\\\"apply\\\":\\\"应用\\\",\\\"fail\\\":\\\"操作失败!\\\",\\\"print\\\":\\\"打印\\\"}}\");\n\n//# sourceURL=webpack:///./src/i18n/preview.json?");
/***/ }),
/***/ "./src/i18n/preview_en.json":
/*!**********************************!*\
!*** ./src/i18n/preview_en.json ***!
\**********************************/
/*! exports provided: pdfPrint, default */
/***/ (function(module) {
eval("module.exports = JSON.parse(\"{\\\"pdfPrint\\\":{\\\"title\\\":\\\"pdf online print\\\",\\\"setup\\\":\\\"Print Setup\\\",\\\"paper\\\":\\\"Paper:\\\",\\\"custom\\\":\\\"Custom\\\",\\\"width\\\":\\\"Width(mm):\\\",\\\"numberTip\\\":\\\"Please input a number\\\",\\\"height\\\":\\\"Height(mm):\\\",\\\"orientation\\\":\\\"Orientation:\\\",\\\"portrait\\\":\\\"Portrait\\\",\\\"landscape\\\":\\\"Landscape\\\",\\\"leftMargin\\\":\\\"Left Margin(mm):\\\",\\\"rightMargin\\\":\\\"Right Margin(mm):\\\",\\\"topMargin\\\":\\\"Top Margin(mm):\\\",\\\"bottomMargin\\\":\\\"Bottom Margin(mm):\\\",\\\"apply\\\":\\\"Apply\\\",\\\"fail\\\":\\\"Apply fail!\\\",\\\"print\\\":\\\"Print\\\"}}\");\n\n//# sourceURL=webpack:///./src/i18n/preview_en.json?");
/***/ }),
/***/ "./src/preview.js":
/*!************************!*\
!*** ./src/preview.js ***!
\************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _form_external_bootstrap_datetimepicker_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./form/external/bootstrap-datetimepicker.css */ \"./src/form/external/bootstrap-datetimepicker.css\");\n/* harmony import */ var _form_external_bootstrap_datetimepicker_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_form_external_bootstrap_datetimepicker_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Utils.js */ \"./src/Utils.js\");\n/* harmony import */ var _MsgBox_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MsgBox.js */ \"./src/MsgBox.js\");\n/* harmony import */ var _dialog_PDFPrintDialog_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dialog/PDFPrintDialog.js */ \"./src/dialog/PDFPrintDialog.js\");\n/* harmony import */ var _i18n_preview_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./i18n/preview.json */ \"./src/i18n/preview.json\");\nvar _i18n_preview_json__WEBPACK_IMPORTED_MODULE_4___namespace = /*#__PURE__*/__webpack_require__.t(/*! ./i18n/preview.json */ \"./src/i18n/preview.json\", 1);\n/* harmony import */ var _i18n_preview_en_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./i18n/preview_en.json */ \"./src/i18n/preview_en.json\");\nvar _i18n_preview_en_json__WEBPACK_IMPORTED_MODULE_5___namespace = /*#__PURE__*/__webpack_require__.t(/*! ./i18n/preview_en.json */ \"./src/i18n/preview_en.json\", 1);\n/**\r\n * Created by Jacky.Gao on 2017-03-17.\r\n */\n\n\n\n\n\n\n(function ($) {\n $.fn.datetimepicker.dates['zh-CN'] = {\n days: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\"],\n daysShort: [\"周日\", \"周一\", \"周二\", \"周三\", \"周四\", \"周五\", \"周六\", \"周日\"],\n daysMin: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\", \"日\"],\n months: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\n monthsShort: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\n today: \"今天\",\n suffix: [],\n meridiem: [\"上午\", \"下午\"]\n };\n})(jQuery);\n\n$(document).ready(function () {\n let language = window.navigator.language || window.navigator.browserLanguage;\n if (!language) {\n language = 'zh-cn';\n }\n language = language.toLowerCase();\n window.i18n = _i18n_preview_json__WEBPACK_IMPORTED_MODULE_4__;\n if (language !== 'zh-cn') {\n window.i18n = _i18n_preview_en_json__WEBPACK_IMPORTED_MODULE_5__;\n }\n $('.ureport-print').click(function () {\n const urlParameters = buildLocationSearchParameters();\n const url = window._server + '/preview/loadPrintPages' + urlParameters;\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"showLoading\"])();\n $.ajax({\n url,\n type: 'POST',\n success: function (result) {\n $.get(window._server + '/preview/loadPagePaper' + urlParameters, function (paper) {\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"hideLoading\"])();\n const html = result.html;\n const iFrame = window.frames['_print_frame'];\n let styles = `<style type=\"text/css\">`;\n styles += buildPrintStyle(paper);\n styles += $('#_ureport_table_style').html();\n styles += `</style>`;\n $(iFrame.document.body).html(styles + html);\n iFrame.window.focus();\n iFrame.window.print();\n });\n },\n error: function (response) {\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"hideLoading\"])();\n if (response && response.responseText) {\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_2__[\"alert\"])(\"服务端错误:\" + response.responseText + \"\");\n } else {\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_2__[\"alert\"])(\"服务端出错!\");\n }\n }\n });\n });\n let directPrintPdf = false,\n index = 0;\n const pdfPrintDialog = new _dialog_PDFPrintDialog_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"]();\n $(`.ureport-pdf-print`).click(function () {\n const urlParameters = buildLocationSearchParameters();\n $.get(window._server + '/preview/loadPagePaper' + urlParameters, function (paper) {\n pdfPrintDialog.show(paper);\n });\n });\n $(`.ureport-pdf-direct-print`).click(function () {\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"showLoading\"])();\n const urlParameters = buildLocationSearchParameters();\n const url = window._server + '/pdf/show' + urlParameters + `&_i=${index++}`;\n const iframe = window.frames['_print_pdf_frame'];\n if (!directPrintPdf) {\n directPrintPdf = true;\n $(\"iframe[name='_print_pdf_frame']\").on(\"load\", function () {\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"hideLoading\"])();\n iframe.window.focus();\n iframe.window.print();\n });\n }\n iframe.window.focus();\n iframe.location.href = url;\n });\n $(`.ureport-export-pdf`).click(function () {\n const urlParameters = buildLocationSearchParameters();\n const url = window._server + '/pdf' + urlParameters;\n window.open(url, '_blank');\n });\n $(`.ureport-export-word`).click(function () {\n const urlParameters = buildLocationSearchParameters();\n const url = window._server + '/word' + urlParameters;\n window.open(url, '_blank');\n });\n $(`.ureport-export-excel`).click(function () {\n const urlParameters = buildLocationSearchParameters();\n const url = window._server + '/excel' + urlParameters;\n window.open(url, '_blank');\n });\n $(`.ureport-export-excel-paging`).click(function () {\n const urlParameters = buildLocationSearchParameters();\n const url = window._server + '/excel/paging' + urlParameters;\n window.open(url, '_blank');\n });\n $(`.ureport-export-excel-paging-sheet`).click(function () {\n const urlParameters = buildLocationSearchParameters();\n const url = window._server + '/excel/sheet' + urlParameters;\n window.open(url, '_blank');\n });\n});\n\nwindow._currentPageIndex = null;\nwindow._totalPage = null;\n\nwindow.buildLocationSearchParameters = function (exclude) {\n let urlParameters = window.location.search;\n if (urlParameters.length > 0) {\n urlParameters = urlParameters.substring(1, urlParameters.length);\n }\n let parameters = {};\n const pairs = urlParameters.split('&');\n for (let i = 0; i < pairs.length; i++) {\n const item = pairs[i];\n if (item === '') {\n continue;\n }\n const param = item.split('=');\n let key = param[0];\n if (exclude && key === exclude) {\n continue;\n }\n let value = param[1];\n parameters[key] = value;\n }\n if (window.searchFormParameters) {\n for (let key in window.searchFormParameters) {\n if (key === exclude) {\n continue;\n }\n const value = window.searchFormParameters[key];\n if (value) {\n parameters[key] = value;\n }\n }\n }\n let p = '?';\n for (let key in parameters) {\n if (p === '?') {\n p += key + '=' + parameters[key];\n } else {\n p += '&' + key + '=' + parameters[key];\n }\n }\n return p;\n};\n\nfunction buildPrintStyle(paper) {\n const marginLeft = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"pointToMM\"])(paper.leftMargin);\n const marginTop = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"pointToMM\"])(paper.topMargin);\n const marginRight = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"pointToMM\"])(paper.rightMargin);\n const marginBottom = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"pointToMM\"])(paper.bottomMargin);\n const paperType = paper.paperType;\n let page = paperType;\n if (paperType === 'CUSTOM') {\n page = Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"pointToMM\"])(paper.width) + 'mm ' + Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"pointToMM\"])(paper.height) + 'mm';\n }\n const style = `\n @media print {\n .page-break{\n display: block;\n page-break-before: always;\n }\n }\n @page {\n size: ${page} ${paper.orientation};\n margin-left: ${marginLeft}mm;\n margin-top: ${marginTop}mm;\n margin-right:${marginRight}mm;\n margin-bottom:${marginBottom}mm;\n }\n `;\n return style;\n};\n\nwindow.buildPaging = function (pageIndex, totalPage) {\n if (totalPage === 0) {\n return;\n }\n if (!pageIndex) {\n return;\n }\n if (!window._currentPageIndex) {\n window._currentPageIndex = pageIndex;\n }\n pageIndex = window._currentPageIndex;\n if (!window._totalPage) {\n window._totalPage = totalPage;\n }\n\n const pageSelector = $('#pageSelector');\n pageSelector.change(function () {\n const parameters = window.buildLocationSearchParameters('_i');\n let url = window._server + `/preview${parameters}&_i=${$(this).val()}`;\n window.open(url, '_self');\n });\n pageSelector.val(pageIndex);\n if (totalPage === 1) {\n return;\n }\n const parameters = window.buildLocationSearchParameters('_i');\n const pagingContainer = $('#pageLinkContainer');\n pagingContainer.empty();\n if (pageIndex > 1) {\n let url = window._server + `/preview${parameters}&_i=${pageIndex - 1}`;\n const prevPage = $(`<button type=\"button\" class=\"btn btn-link btn-sm\">上一页</button>`);\n pagingContainer.append(prevPage);\n prevPage.click(function () {\n window.open(url, '_self');\n });\n }\n if (pageIndex < totalPage) {\n let url = window._server + `/preview${parameters}&_i=${pageIndex + 1}`;\n const nextPage = $(`<button type=\"button\" class=\"btn btn-link btn-sm\">下一页</button>`);\n pagingContainer.append(nextPage);\n nextPage.click(function () {\n window.open(url, '_self');\n });\n }\n};\n\nwindow._intervalRefresh = function (value, totalPage) {\n if (!value) {\n return;\n }\n window._totalPage = totalPage;\n const second = value * 1000;\n setTimeout(function () {\n _refreshData(second);\n }, second);\n};\n\nfunction _refreshData(second) {\n const params = buildLocationSearchParameters('_i');\n let url = window._server + `/preview/loadData${params}`;\n const totalPage = window._totalPage;\n if (totalPage > 0) {\n if (window._currentPageIndex) {\n if (window._currentPageIndex > totalPage) {\n window._currentPageIndex = 1;\n }\n url += \"&_i=\" + window._currentPageIndex + \"\";\n }\n $(\"#pageSelector\").val(window._currentPageIndex);\n }\n $.ajax({\n url,\n type: 'GET',\n success: function (report) {\n const tableContainer = $(`#_ureport_table`);\n tableContainer.empty();\n window._totalPage = report.totalPageWithCol;\n tableContainer.append(report.content);\n _buildChartDatas(report.chartDatas);\n buildPaging(window._currentPageIndex, window._totalPage);\n if (window._currentPageIndex) {\n window._currentPageIndex++;\n }\n setTimeout(function () {\n _refreshData(second);\n }, second);\n },\n error: function (response) {\n const tableContainer = $(`#_ureport_table`);\n tableContainer.empty();\n if (response && response.responseText) {\n tableContainer.append(\"<h3 style='color: #d30e00;'>服务端错误:\" + response.responseText + \"</h3>\");\n } else {\n tableContainer.append(\"<h3 style='color: #d30e00;'>加载数据失败</h3>\");\n }\n setTimeout(function () {\n _refreshData(second);\n }, second);\n }\n });\n};\n\nwindow._buildChartDatas = function (chartData) {\n if (!chartData) {\n return;\n }\n for (let d of chartData) {\n let json = d.json;\n json = JSON.parse(json, function (k, v) {\n if (v.indexOf && v.indexOf('function') > -1) {\n return eval(\"(function(){return \" + v + \" })()\");\n }\n return v;\n });\n _buildChart(d.id, json);\n }\n};\nwindow._buildChart = function (canvasId, chartJson) {\n const ctx = document.getElementById(canvasId);\n if (!ctx) {\n return;\n }\n let options = chartJson.options;\n if (!options) {\n options = {};\n chartJson.options = options;\n }\n let animation = options.animation;\n if (!animation) {\n animation = {};\n options.animation = animation;\n }\n animation.onComplete = function (event) {\n const chart = event.chart;\n const base64Image = chart.toBase64Image();\n const urlParameters = window.location.search;\n const url = window._server + '/chart/storeData' + urlParameters;\n const canvas = $(\"#\" + canvasId);\n const width = parseInt(canvas.css('width'));\n const height = parseInt(canvas.css('height'));\n $.ajax({\n type: 'POST',\n data: { _base64Data: base64Image, _chartId: canvasId, _width: width, _height: height },\n url\n });\n };\n const chart = new Chart(ctx, chartJson);\n};\n\nwindow.submitSearchForm = function (file, customParameters) {\n\n window.searchFormParameters = {};\n for (let fun of window.formElements) {\n const json = fun.call(this);\n for (let key in json) {\n let value = json[key];\n value = encodeURI(value);\n value = encodeURI(value);\n window.searchFormParameters[key] = value;\n }\n }\n const parameters = window.buildLocationSearchParameters('_i');\n let url = window._server + \"/preview/loadData\" + parameters;\n const pageSelector = $(`#pageSelector`);\n if (pageSelector.length > 0) {\n url += '&_i=1';\n }\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"showSearchLoading\"])();\n $.ajax({\n url,\n type: 'POST',\n success: function (report) {\n window._currentPageIndex = 1;\n const tableContainer = $(`#_ureport_table`);\n tableContainer.empty();\n tableContainer.append(report.content);\n _buildChartDatas(report.chartDatas);\n const totalPage = report.totalPage;\n window._totalPage = totalPage;\n if (pageSelector.length > 0) {\n pageSelector.empty();\n for (let i = 1; i <= totalPage; i++) {\n pageSelector.append(`<option>${i}</option>`);\n }\n const pageIndex = report.pageIndex || 1;\n pageSelector.val(pageIndex);\n $('#totalPageLabel').html(totalPage);\n buildPaging(pageIndex, totalPage);\n }\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"hideSearchLoading\"])();\n },\n error: function (response) {\n Object(_Utils_js__WEBPACK_IMPORTED_MODULE_1__[\"hideSearchLoading\"])();\n if (response && response.responseText) {\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_2__[\"alert\"])(\"服务端错误:\" + response.responseText + \"\");\n } else {\n Object(_MsgBox_js__WEBPACK_IMPORTED_MODULE_2__[\"alert\"])('查询操作失败!');\n }\n }\n });\n};\n\n//# sourceURL=webpack:///./src/preview.js?");
/***/ })
/******/ });