! function (t, e) {
"object" == typeof exports && "object" == typeof module ? module.exports = e(require("jquery"), require("jsbarcode"), require("socket.io-client"), require("jspdf"), require("html2canvas"), require("canvg")) : "function" == typeof define && define.amd ? define("vue-plugin-hiprint", ["jquery", "jsbarcode", "socket.io-client", "jspdf", "html2canvas", "canvg"], e) : "object" == typeof exports ? exports["vue-plugin-hiprint"] = e(require("jquery"), require("jsbarcode"), require("socket.io-client"), require("jspdf"), require("html2canvas"), require("canvg")) : t["vue-plugin-hiprint"] = e(t.jQuery, t.JsBarcode, t.io, t.jspdf, t.html2canvas, t.canvg)
}(window, function (__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__106__, __WEBPACK_EXTERNAL_MODULE__157__, __WEBPACK_EXTERNAL_MODULE__160__, __WEBPACK_EXTERNAL_MODULE__161__, __WEBPACK_EXTERNAL_MODULE__162__) {
return function (i) {
var n = {};
function r(t) {
var e;
return (n[t] || (e = n[t] = {
i: t,
l: !1,
exports: {}
}, i[t].call(e.exports, e, e.exports, r), e.l = !0, e)).exports
}
return r.m = i, r.c = n, r.d = function (t, e, i) {
r.o(t, e) || Object.defineProperty(t, e, {
enumerable: !0,
get: i
})
}, r.r = function (t) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
value: "Module"
}), Object.defineProperty(t, "__esModule", {
value: !0
})
}, r.t = function (e, t) {
if (1 & t && (e = r(e)), 8 & t) return e;
if (4 & t && "object" == typeof e && e && e.__esModule) return e;
var i = Object.create(null);
if (r.r(i), Object.defineProperty(i, "default", {
enumerable: !0,
value: e
}), 2 & t && "string" != typeof e)
for (var n in e) r.d(i, n, function (t) {
return e[t]
}.bind(null, n));
return i
}, r.n = function (t) {
var e = t && t.__esModule ? function () {
return t.default
} : function () {
return t
};
return r.d(e, "a", e), e
}, r.o = function (t, e) {
return Object.prototype.hasOwnProperty.call(t, e)
}, r.p = "/dist/", r(r.s = 165)
}([function (t, e) {
t.exports = __WEBPACK_EXTERNAL_MODULE__0__
}, function (t, e, i) {
"use strict";
var i = i(56),
n = Function.prototype,
r = n.call,
n = i && n.bind.bind(r, r);
t.exports = i ? n : function (t) {
return function () {
return r.apply(t, arguments)
}
}
}, function (t, e, i) {
"use strict";
t.exports = function (t) {
try {
return !!t()
} catch (t) {
return !0
}
}
}, function (t, e, i) {
"use strict";
var l = i(4),
p = i(36).f,
d = i(24),
u = i(15),
f = i(80),
h = i(84),
m = i(86);
t.exports = function (t, e) {
var i, n, r, a = t.target,
o = t.global,
s = t.stat,
c = o ? l : s ? l[a] || f(a, {}) : (l[a] || {}).prototype;
if (c)
for (i in e) {
if (n = e[i], r = t.dontCallGetSet ? (r = p(c, i)) && r.value : c[i], !m(o ? i : a + (s ? "." : "#") + i, t.forced) && void 0 !== r) {
if (typeof n == typeof r) continue;
h(n, r)
} (t.sham || r && r.sham) && d(n, "sham", !0), u(c, i, n, t)
}
}
}, function (i, t, e) {
"use strict";
! function (t) {
function e(t) {
return t && t.Math === Math && t
}
i.exports = e("object" == typeof globalThis && globalThis) || e("object" == typeof window && window) || e("object" == typeof self && self) || e("object" == typeof t && t) || function () {
return this
}() || this || Function("return this")()
}.call(this, e(168))
}, function (t, e, i) {
"use strict";
i = i(2);
t.exports = !i(function () {
return 7 !== Object.defineProperty({}, 1, {
get: function () {
return 7
}
})[1]
})
}, function (t, e, i) {
"use strict";
var n = i(4),
r = i(39),
a = i(9),
o = i(81),
s = i(37),
i = i(110),
c = n.Symbol,
l = r("wks"),
p = i ? c.for || c : c && c.withoutSetter || o;
t.exports = function (t) {
return a(l, t) || (l[t] = s && a(c, t) ? c[t] : p("Symbol." + t)), l[t]
}
}, function (t, e, i) {
"use strict";
var n = i(49),
r = String;
t.exports = function (t) {
if ("Symbol" === n(t)) throw new TypeError("Cannot convert a Symbol value to a string");
return r(t)
}
}, function (t, e, i) {
"use strict";
var i = i(109),
n = i.all;
t.exports = i.IS_HTMLDDA ? function (t) {
return "function" == typeof t || t === n
} : function (t) {
return "function" == typeof t
}
}, function (t, e, i) {
"use strict";
var n = i(1),
r = i(16),
a = n({}.hasOwnProperty);
t.exports = Object.hasOwn || function (t, e) {
return a(r(t), e)
}
}, function (t, e, i) {
"use strict";
var i = i(56),
n = Function.prototype.call;
t.exports = i ? n.bind(n) : function () {
return n.apply(n, arguments)
}
}, function (t, e, i) {
"use strict";
var n = i(13),
r = String,
a = TypeError;
t.exports = function (t) {
if (n(t)) return t;
throw new a(r(t) + " is not an object")
}
}, function (t, e, i) {
"use strict";
var n = i(5),
r = i(111),
a = i(112),
o = i(11),
s = i(58),
c = TypeError,
l = Object.defineProperty,
p = Object.getOwnPropertyDescriptor,
d = "enumerable",
u = "configurable",
f = "writable";
e.f = n ? a ? function (t, e, i) {
var n;
return o(t), e = s(e), o(i), "function" == typeof t && "prototype" === e && "value" in i && f in i && !i[f] && (n = p(t, e)) && n[f] && (t[e] = i.value, i = {
configurable: (u in i ? i : n)[u],
enumerable: (d in i ? i : n)[d],
writable: !1
}), l(t, e, i)
} : l : function (t, e, i) {
if (o(t), e = s(e), o(i), r) try {
return l(t, e, i)
} catch (t) { }
if ("get" in i || "set" in i) throw new c("Accessors not supported");
return "value" in i && (t[e] = i.value), t
}
}, function (t, e, i) {
"use strict";
var n = i(8),
i = i(109),
r = i.all;
t.exports = i.IS_HTMLDDA ? function (t) {
return "object" == typeof t ? null !== t : n(t) || t === r
} : function (t) {
return "object" == typeof t ? null !== t : n(t)
}
}, function (t, e, i) {
"use strict";
var n = i(4),
r = i(8);
t.exports = function (t, e) {
return arguments.length < 2 ? (i = n[t], r(i) ? i : void 0) : n[t] && n[t][e];
var i
}
}, function (t, e, i) {
"use strict";
var o = i(8),
s = i(12),
c = i(83),
l = i(80);
t.exports = function (t, e, i, n) {
var r = (n = n || {}).enumerable,
a = void 0 !== n.name ? n.name : e;
if (o(i) && c(i, a, n), n.global) r ? t[e] = i : l(e, i);
else {
try {
n.unsafe ? t[e] && (r = !0) : delete t[e]
} catch (t) { }
r ? t[e] = i : s.f(t, e, {
value: i,
enumerable: !1,
configurable: !n.nonConfigurable,
writable: !n.nonWritable
})
}
return t
}
}, function (t, e, i) {
"use strict";
var n = i(17),
r = Object;
t.exports = function (t) {
return r(n(t))
}
}, function (t, e, i) {
"use strict";
var n = i(32),
r = TypeError;
t.exports = function (t) {
if (n(t)) throw new r("Can't call method on " + t);
return t
}
}, function (t, e, i) {
"use strict";
t.exports = !1
}, function (module, __webpack_exports__, __webpack_require__) {
"use strict";
! function (jQuery) {
__webpack_require__.d(__webpack_exports__, "b", function () {
return hiprint
}), __webpack_require__.d(__webpack_exports__, "a", function () {
return defaultElementTypeProvider
});
var _home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35),
_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23),
_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26),
core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(166),
core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3__),
core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(181),
core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4___default = __webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4__),
core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89),
core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5___default = __webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_5__),
core_js_modules_es_symbol_has_instance_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(183),
core_js_modules_es_symbol_has_instance_js__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(core_js_modules_es_symbol_has_instance_js__WEBPACK_IMPORTED_MODULE_6__),
core_js_modules_es_function_has_instance_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(184),
core_js_modules_es_function_has_instance_js__WEBPACK_IMPORTED_MODULE_7___default = __webpack_require__.n(core_js_modules_es_function_has_instance_js__WEBPACK_IMPORTED_MODULE_7__),
core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(186),
core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8___default = __webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_8__),
core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(122),
core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9___default = __webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_9__),
core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(189),
core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = __webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_10__),
core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(190),
core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11___default = __webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11__),
core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(54),
core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_12___default = __webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_12__),
core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(131),
core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_13___default = __webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_13__),
core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(192),
core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_14___default = __webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_14__),
core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(98),
core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15___default = __webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_15__),
core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(194),
core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_16___default = __webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_16__),
core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(196),
core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_17___default = __webpack_require__.n(core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_17__),
core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(197),
core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_18___default = __webpack_require__.n(core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_18__),
core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(134),
core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_19___default = __webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_19__),
core_js_modules_es_symbol_to_string_tag_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(198),
core_js_modules_es_symbol_to_string_tag_js__WEBPACK_IMPORTED_MODULE_20___default = __webpack_require__.n(core_js_modules_es_symbol_to_string_tag_js__WEBPACK_IMPORTED_MODULE_20__),
core_js_modules_es_json_to_string_tag_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(199),
core_js_modules_es_json_to_string_tag_js__WEBPACK_IMPORTED_MODULE_21___default = __webpack_require__.n(core_js_modules_es_json_to_string_tag_js__WEBPACK_IMPORTED_MODULE_21__),
core_js_modules_es_math_to_string_tag_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(200),
core_js_modules_es_math_to_string_tag_js__WEBPACK_IMPORTED_MODULE_22___default = __webpack_require__.n(core_js_modules_es_math_to_string_tag_js__WEBPACK_IMPORTED_MODULE_22__),
core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(135),
core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_23___default = __webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_23__),
core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(201),
core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_24___default = __webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_24__),
core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(138),
core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25___default = __webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_25__),
core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(202),
core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_26___default = __webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_26__),
core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(120),
core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_27___default = __webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_27__),
core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(203),
core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_28___default = __webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_28__),
core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(101),
core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_29___default = __webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_29__),
core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(139),
core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_30___default = __webpack_require__.n(core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_30__),
core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(204),
core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_31___default = __webpack_require__.n(core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_31__),
core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(206),
core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_32___default = __webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_32__),
core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(141),
core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_33___default = __webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_33__),
core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(207),
core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_34___default = __webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_34__),
core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(208),
core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_35___default = __webpack_require__.n(core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_35__),
core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(142),
core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_36___default = __webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_36__),
core_js_modules_es_string_fixed_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(209),
core_js_modules_es_string_fixed_js__WEBPACK_IMPORTED_MODULE_37___default = __webpack_require__.n(core_js_modules_es_string_fixed_js__WEBPACK_IMPORTED_MODULE_37__),
core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(210),
core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_38___default = __webpack_require__.n(core_js_modules_es_object_set_prototype_of_js__WEBPACK_IMPORTED_MODULE_38__),
core_js_modules_es_object_proto_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(211),
core_js_modules_es_object_proto_js__WEBPACK_IMPORTED_MODULE_39___default = __webpack_require__.n(core_js_modules_es_object_proto_js__WEBPACK_IMPORTED_MODULE_39__),
core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(212),
core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_40___default = __webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_40__),
core_js_modules_es_array_fill_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(213),
core_js_modules_es_array_fill_js__WEBPACK_IMPORTED_MODULE_41___default = __webpack_require__.n(core_js_modules_es_array_fill_js__WEBPACK_IMPORTED_MODULE_41__),
core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(147),
core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_42___default = __webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_42__),
core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(215),
core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_43___default = __webpack_require__.n(core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_43__),
core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(148),
core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_44___default = __webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_44__),
core_js_modules_es_string_ends_with_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(220),
core_js_modules_es_string_ends_with_js__WEBPACK_IMPORTED_MODULE_45___default = __webpack_require__.n(core_js_modules_es_string_ends_with_js__WEBPACK_IMPORTED_MODULE_45__),
core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(221),
core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_46___default = __webpack_require__.n(core_js_modules_es_string_trim_js__WEBPACK_IMPORTED_MODULE_46__),
core_js_modules_es_string_link_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(223),
core_js_modules_es_string_link_js__WEBPACK_IMPORTED_MODULE_47___default = __webpack_require__.n(core_js_modules_es_string_link_js__WEBPACK_IMPORTED_MODULE_47__),
core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(224),
core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_48___default = __webpack_require__.n(core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_48__),
core_js_modules_web_btoa_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(228),
core_js_modules_web_btoa_js__WEBPACK_IMPORTED_MODULE_49___default = __webpack_require__.n(core_js_modules_web_btoa_js__WEBPACK_IMPORTED_MODULE_49__),
core_js_modules_web_dom_exception_constructor_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(229),
core_js_modules_web_dom_exception_constructor_js__WEBPACK_IMPORTED_MODULE_50___default = __webpack_require__.n(core_js_modules_web_dom_exception_constructor_js__WEBPACK_IMPORTED_MODULE_50__),
core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(233),
core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_51___default = __webpack_require__.n(core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_51__),
core_js_modules_web_dom_exception_to_string_tag_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(234),
core_js_modules_web_dom_exception_to_string_tag_js__WEBPACK_IMPORTED_MODULE_52___default = __webpack_require__.n(core_js_modules_web_dom_exception_to_string_tag_js__WEBPACK_IMPORTED_MODULE_52__),
core_js_modules_web_atob_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(235),
core_js_modules_web_atob_js__WEBPACK_IMPORTED_MODULE_53___default = __webpack_require__.n(core_js_modules_web_atob_js__WEBPACK_IMPORTED_MODULE_53__),
core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(236),
core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_54___default = __webpack_require__.n(core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_54__),
core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(245),
core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_55___default = __webpack_require__.n(core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_55__),
core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(246),
core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_56___default = __webpack_require__.n(core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_56__),
core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(247),
core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_57___default = __webpack_require__.n(core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_57__),
core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(248),
core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_58___default = __webpack_require__.n(core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_58__),
core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(249),
core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_59___default = __webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_59__),
jquery__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(0),
jquery__WEBPACK_IMPORTED_MODULE_60___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_60__),
_claviska_jquery_minicolors_jquery_minicolors_min__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(252),
_claviska_jquery_minicolors_jquery_minicolors_min__WEBPACK_IMPORTED_MODULE_61___default = __webpack_require__.n(_claviska_jquery_minicolors_jquery_minicolors_min__WEBPACK_IMPORTED_MODULE_61__),
jsbarcode__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(106),
jsbarcode__WEBPACK_IMPORTED_MODULE_62___default = __webpack_require__.n(jsbarcode__WEBPACK_IMPORTED_MODULE_62__),
_plugins_qrcode_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(253),
_plugins_qrcode_js__WEBPACK_IMPORTED_MODULE_63___default = __webpack_require__.n(_plugins_qrcode_js__WEBPACK_IMPORTED_MODULE_63__),
bwip_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(107),
bwip_js__WEBPACK_IMPORTED_MODULE_64___default = __webpack_require__.n(bwip_js__WEBPACK_IMPORTED_MODULE_64__),
_plugins_watermark_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(77),
socket_io_client__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(157),
socket_io_client__WEBPACK_IMPORTED_MODULE_66___default = __webpack_require__.n(socket_io_client__WEBPACK_IMPORTED_MODULE_66__),
_css_image_l_img_svg__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(158),
_css_image_l_img_svg__WEBPACK_IMPORTED_MODULE_67___default = __webpack_require__.n(_css_image_l_img_svg__WEBPACK_IMPORTED_MODULE_67__),
_css_image_v_img_svg__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(159),
_css_image_v_img_svg__WEBPACK_IMPORTED_MODULE_68___default = __webpack_require__.n(_css_image_v_img_svg__WEBPACK_IMPORTED_MODULE_68__),
jspdf__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(160),
jspdf__WEBPACK_IMPORTED_MODULE_69___default = __webpack_require__.n(jspdf__WEBPACK_IMPORTED_MODULE_69__),
html2canvas__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(161),
html2canvas__WEBPACK_IMPORTED_MODULE_70___default = __webpack_require__.n(html2canvas__WEBPACK_IMPORTED_MODULE_70__),
nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(27),
nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default = __webpack_require__.n(nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71__),
canvg__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(162),
canvg__WEBPACK_IMPORTED_MODULE_72___default = __webpack_require__.n(canvg__WEBPACK_IMPORTED_MODULE_72__),
_etypes_default_etyps_provider__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(163);
function _instanceof(t, e) {
return null != e && "undefined" != typeof Symbol && e[Symbol.hasInstance] ? !!e[Symbol.hasInstance](t) : t instanceof e
}
function _typeof(t) {
return (_typeof = "function" == typeof Symbol && "symbol" === Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_2__.a)(Symbol.iterator) ? function (t) {
return Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_2__.a)(t)
} : function (t) {
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_2__.a)(t)
})(t)
}
window.$ = window.jQuery = jquery__WEBPACK_IMPORTED_MODULE_60___default.a, window.autoConnect = !0, window.io = socket_io_client__WEBPACK_IMPORTED_MODULE_66__.io;
var languages = {},
ctx = __webpack_require__(254),
i18n = (ctx.keys().forEach(function (t) {
languages[t.match(/\.\/([^.]+)/)[1]] = ctx(t)
}), {
lang: "cn",
languages: languages,
__: function (t, e) {
var i = this.languages[this.lang][t] || t;
return e && e instanceof Object ? (Object.keys(e).forEach(function (t) {
i = i.replace(new RegExp("{{".concat(t, "}}"), "g"), e[t])
}), i) : e ? i = i.replace(/%s/g, e) : i
},
__n: function (t, e) {
return this.languages[this.lang][t].replace(/%s/g, e)
}
}),
hiprint = function (i) {
var n = {};
function r(t) {
var e;
return (n[t] || (e = n[t] = {
i: t,
l: !1,
exports: {}
}, i[t].call(e.exports, e, e.exports, r), e.l = !0, e)).exports
}
return r.m = i, r.c = n, r.d = function (t, e, i) {
r.o(t, e) || Object.defineProperty(t, e, {
enumerable: !0,
get: i
})
}, r.r = function (t) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
value: "Module"
}), Object.defineProperty(t, "__esModule", {
value: !0
})
}, r.t = function (e, t) {
if (1 & t && (e = r(e)), 8 & t) return e;
if (4 & t && "object" == _typeof(e) && e && e.__esModule) return e;
var i = Object.create(null);
if (r.r(i), Object.defineProperty(i, "default", {
enumerable: !0,
value: e
}), 2 & t && "string" != typeof e)
for (var n in e) r.d(i, n, function (t) {
return e[t]
}.bind(null, n));
return i
}, r.n = function (t) {
var e = t && t.__esModule ? function () {
return t.default
} : function () {
return t
};
return r.d(e, "a", e), e
}, r.o = function (t, e) {
return Object.prototype.hasOwnProperty.call(t, e)
}, r.p = "/", r(r.s = 21)
}([function (t, e, i) {
var a;
i.d(e, "a", function () {
return hinnn
}), window.hinnn = {}, hinnn.event = (a = {}, {
on: function (t, e) {
a[t] || (a[t] = []), a[t].push(e)
},
id: 0,
off: function (t, e) {
var i = a[t];
if (i) {
for (var n = -1, r = 0; r < i.length; r++)
if (i[r] === e) {
n = r;
break
} n < 0 || a[t].splice(n, 1)
}
},
trigger: function (t) {
var e = a[t];
if (e && e.length)
for (var i = Array.prototype.slice.call(arguments, 1), n = 0; n < e.length; n++) e[n].apply(this, i)
},
clear: function (t) {
a[t] = []
},
getId: function () {
return this.id += 1, this.id
},
getNameWithId: function (t) {
return t + "-" + this.getId()
}
}), hinnn.form = {
serialize: function (t) {
var t = jquery__WEBPACK_IMPORTED_MODULE_60___default()(t).serializeArray(),
e = {};
return jquery__WEBPACK_IMPORTED_MODULE_60___default.a.each(t, function () {
e[this.name] ? "[object Array]" == Object.prototype.toString.call(e[this.name]) ? e[this.name].push(this.value) : e[this.name] = [e[this.name], this.value] : e[this.name] = this.value
}), e
}
}, hinnn.pt = {
toPx: function (t) {
return t * (this.getDpi() / 72)
},
toMm: function (t) {
return hinnn.px.toMm(hinnn.pt.toPx(t))
},
dpi: 0,
getDpi: function () {
var t;
return this.dpi || ((t = document.createElement("DIV")).style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden", document.body.appendChild(t), this.dpi = t.offsetHeight), this.dpi
}
}, hinnn.px = {
toPt: function (t) {
return t * (72 / this.getDpi())
},
toMm: function (t) {
return Math.round(t / this.getDpi() * 25.4 * 100) / 100
},
dpi: 0,
getDpi: function () {
var t;
return this.dpi || ((t = document.createElement("DIV")).style.cssText = "width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden", document.body.appendChild(t), this.dpi = t.offsetHeight), this.dpi
}
}, hinnn.mm = {
toPt: function (t) {
return 72 / 25.4 * t
},
toPx: function (t) {
return hinnn.pt.toPx(hinnn.mm.toPt(t))
}
}, hinnn.throttle = function (i, n, r) {
function a() {
p = !1 === r.leading ? 0 : _.now(), l = null, c = i.apply(o, s), l || (o = s = null)
}
var o, s, c, l = null,
p = 0;
r = r || {};
return function () {
var t = _.now(),
e = (p || !1 !== r.leading || (p = t), n - (t - p));
return o = this, s = arguments, e <= 0 || n < e ? (l && (clearTimeout(l), l = null), p = t, c = i.apply(o, s), l || (o = s = null)) : l || !1 === r.trailing || (l = setTimeout(a, e)), c
}
}, hinnn.debounce = function (e, i, n) {
function r() {
var t = _.now() - c;
t < i && 0 <= t ? a = setTimeout(r, i - t) : (a = null, n || (l = e.apply(s, o), a) || (s = o = null))
}
var a, o, s, c, l;
return function () {
s = this, o = arguments, c = _.now();
var t = n && !a;
return a = a || setTimeout(r, i), t && (l = e.apply(s, o), s = o = null), l
}
}, hinnn.toUtf8 = function (t) {
for (var e, i = "", n = t.length, r = 0; r < n; r++) 1 <= (e = t.charCodeAt(r)) && e <= 127 ? i += t.charAt(r) : (2047 < e ? i = (i += String.fromCharCode(224 | e >> 12 & 15)) + String.fromCharCode(128 | e >> 6 & 63) : i += String.fromCharCode(192 | e >> 6 & 31), i += String.fromCharCode(128 | e >> 0 & 63));
return i
}, hinnn.groupBy = function (t, n, r) {
var a = {};
return t.forEach(function (e) {
var i = JSON.stringify(r(e));
a[i] || (a[i] = {
rows: []
}, n.forEach(function (t) {
a[i][t] = e[t]
})), a[i].rows.push(e)
}), Object.keys(a).map(function (t) {
return a[t]
})
}, hinnn.orderBy = function (t, e) {
if (t.length <= 1) return t;
var i = Math.floor(t.length / 2),
n = t.splice(i, 1)[0],
r = [],
a = [],
o = !0,
i = !1,
s = void 0;
try {
for (var c, l = t[Symbol.iterator](); !(o = (c = l.next()).done); o = !0) {
var p = c.value;
(e(p) < e(n) ? r : a).push(p)
}
} catch (t) {
i = !0, s = t
} finally {
try {
o || null == l.return || l.return()
} finally {
if (i) throw s
}
}
return this.orderBy(r, e).concat([n], this.orderBy(a, e))
}, hinnn.dateFormat = function (t, e) {
if (t) try {
var i, n = "string" == typeof t ? new Date(t) : t,
r = {
"y+": n.getFullYear(),
"M+": n.getMonth() + 1,
"d+": n.getDate(),
"H+": n.getHours(),
"m+": n.getMinutes(),
"s+": n.getSeconds(),
"q+": Math.floor((n.getMonth() + 3) / 3),
S: n.getMilliseconds()
};
for (i in /(y+)/.test(e) && (e = e.replace(RegExp.$1, (n.getFullYear() + "").substr(4 - RegExp.$1.length))), r) new RegExp("(" + i + ")").test(e) && (e = e.replace(RegExp.$1, 1 == RegExp.$1.length ? r[i] : ("00" + r[i]).substr(("" + r[i]).length)));
return e
} catch (t) { }
return ""
}, hinnn.numFormat = function (t, e) {
if (null != t) try {
var i = "string" == typeof t ? parseFloat(t) : t,
n = parseInt(e);
return 0 < n ? i.toFixed(n) : parseInt(i.toString())
} catch (t) { }
return ""
}, hinnn.toUpperCase = function (t, e) {
if (!nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a) return e;
var i = e;
switch (t) {
case "0":
i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.encodeS(e);
break;
case "1":
i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.encodeS(e, {
tenMin: !1
});
break;
case "2":
i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.encodeB(e, {
tenMin: !0
});
break;
case "3":
i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.encodeB(e);
break;
case "4":
i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.toMoney(e, {
tenMin: !0
});
break;
case "5":
i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.toMoney(e);
break;
case "6":
i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.toMoney(e, {
complete: !0
});
break;
case "7":
i = nzh_dist_nzh_min_js__WEBPACK_IMPORTED_MODULE_71___default.a.cn.toMoney(e, {
complete: !0,
outSymbol: !1
})
}
return i
}
}, function (t, e, i) {
i.d(e, "a", function () {
return r
});
var n = i(9),
r = (a.prototype.init = function (t) {
t && jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend(this, t)
}, a.prototype.on = function (t, e) {
hinnn.event.on(t, e)
}, a.prototype.clear = function (t) {
hinnn.event.clear(t)
}, a.prototype.registerItems = function (t) {
t.forEach(function (t) {
n.a.registerItem(new t)
})
}, Object.defineProperty(a, "instance", {
get: function () {
return a._instance || (a._instance = new a, window.HIPRINT_CONFIG && jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend(a._instance, HIPRINT_CONFIG), a._instance.optionItems && a._instance.optionItems.forEach(function (t) {
n.a.registerItem(new t)
})), a._instance
},
enumerable: !0,
configurable: !0
}), a);
function a() { }
}, function (t, e, i) {
r.prototype.updatePosition = function (t, e) {
this.left = t, this.top = e
};
var n = r;
function r(t) {
this.printElement = t
}
i.d(e, "a", function () {
return a
});
Object.defineProperty(o, "instance", {
get: function () {
return this._instance || (this._instance = new o), this._instance
},
enumerable: !0,
configurable: !0
}), o.prototype.getDragingPrintElement = function () {
return o.instance.dragingPrintElement
}, o.prototype.setDragingPrintElement = function (t) {
o.instance.dragingPrintElement = new n(t)
}, o.prototype.guid = function () {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (t) {
var e = 16 * Math.random() | 0;
return ("x" == t ? e : 3 & e | 8).toString(16)
})
}, o.prototype.imageToBase64 = function (t) {
if (-1 == jquery__WEBPACK_IMPORTED_MODULE_60___default()(t).attr("src").indexOf("base64")) try {
var e = document.createElement("canvas"),
i = new Image;
i.src = t.attr("src"), e.width = i.width, e.height = i.height, e.getContext("2d").drawImage(i, 0, 0), t.attr("src", e.toDataURL("image/png"))
} catch (e) {
try {
this.xhrLoadImage(t)
} catch (t) { }
}
}, o.prototype.xhrLoadImage = function (t) { }, o.prototype.transformImg = function (t) {
var i = this;
t.map(function (t, e) {
i.imageToBase64(jquery__WEBPACK_IMPORTED_MODULE_60___default()(e))
})
}, o.prototype.getPrintTemplateById = function (t) {
return o.instance.printTemplateContainer[t]
}, o.prototype.setPrintTemplateById = function (t, e) {
return o.instance.printTemplateContainer[t] = e
};
var a = o;
function o() {
this.printTemplateContainer = {}, this.A1 = {
width: 841,
height: 594
}, this.A2 = {
width: 420,
height: 594
}, this.A3 = {
width: 420,
height: 297
}, this.A4 = {
width: 210,
height: 297
}, this.A5 = {
width: 210,
height: 148
}, this.A6 = {
width: 105,
height: 148
}, this.A7 = {
width: 105,
height: 74
}, this.A8 = {
width: 52,
height: 74
}, this.B1 = {
width: 1e3,
height: 707
}, this.B2 = {
width: 500,
height: 707
}, this.B3 = {
width: 500,
height: 353
}, this.B4 = {
width: 250,
height: 353
}, this.B5 = {
width: 250,
height: 176
}, this.B6 = {
width: 125,
height: 176
}, this.B7 = {
width: 125,
height: 88
}, this.B8 = {
width: 62,
height: 88
}, this.dragLengthCNum = function (t, e) {
return Math.round(.75 * t / e) * e
}
}
}, function (t, e, i) {
var r = function () { },
n = (i.d(e, "a", function () {
return n
}), a.prototype.setDefault = function (t) {
var e = this;
this.defaultOptions = t, this.initSize(), Object.keys(this.defaultOptions).forEach(function (t) {
e[t] = e[t] || e.defaultOptions[t]
})
}, a.prototype.initSize = function () {
this.width || this.setWidth(this.defaultOptions.width), this.height || this.setHeight(this.defaultOptions.height)
}, a.prototype.initSizeByHtml = function (t, e) {
this.width || this.setWidth(t), this.height || this.setHeight(e)
}, a.prototype.getRectInfo = function () {
var t, e, i, n, r, a, o = {
w: 0,
h: 0,
diffW: 0,
diffH: 0
};
return this.transform && (e = this.transform * Math.PI / 180, n = this.width, t = this.height, a = Math.sin(e), e = Math.cos(e), r = (n - (i = Math.abs(n * e) + Math.abs(t * a))) / 2, a = (t - (n = Math.abs(n * a) + Math.abs(t * e))) / 2, o.w = i, o.h = n, o.diffW = r, o.diffH = a), o
}, a.prototype.getLeft = function () {
return this.left
}, a.prototype.posLeft = function () {
var t = this.left;
return this.transform && (t += this.getRectInfo().diffW), Math.floor(10 * t) / 10
}, a.prototype.setRotate = function (t) {
null != t && (this.transform = t)
}, a.prototype.displayLeft = function (t) {
return this.transform && t ? this.left + this.getRectInfo().diffW + "pt" : this.left + "pt"
}, a.prototype.setLeft = function (t) {
null != t && (this.left = t)
}, a.prototype.getTop = function () {
return this.top
}, a.prototype.posTop = function () {
var t = this.top;
return this.transform && (t += this.getRectInfo().diffH), Math.floor(10 * t) / 10
}, a.prototype.getTopInDesign = function () {
return this.topInDesign
}, a.prototype.displayTop = function (t) {
return this.transform && t ? this.top + this.getRectInfo().diffH + "pt" : this.top + "pt"
}, a.prototype.setTop = function (t) {
null != t && (this.top = t)
}, a.prototype.copyDesignTopFromTop = function () {
this.topInDesign = this.top
}, a.prototype.getHeight = function () {
var t;
return this.transform ? (t = this.getRectInfo()).h + t.diffH : this.height
}, a.prototype.displayHeight = function () {
return this.height + "pt"
}, a.prototype.setHeight = function (t) {
null != t && (this.height = t)
}, a.prototype.getWidth = function () {
var t;
return this.transform ? (t = this.getRectInfo()).w + t.diffW : this.width
}, a.prototype.displayWidth = function () {
return this.width + "pt"
}, a.prototype.setWidth = function (t) {
null != t && (this.width = t)
}, a.prototype.getValueFromOptionsOrDefault = function (t) {
return (null == this[t] ? this.defaultOptions : this)[t]
}, a.prototype.getPrintElementOptionEntity = function () {
var i = new r,
n = this;
return Object.keys(this).filter(function (t) {
return "topInDesign" != t
}).forEach(function (t) {
var e;
"number" != typeof n[t] && "string" != typeof n[t] && !["fields"].includes(t) && _typeof(n[t]) != _typeof(!0) || (i[t] = n[t]), "style" == t && (i.style = {}, e = n[t]) && Object.keys(e).forEach(function (t) {
"number" != typeof e[t] && "string" != typeof e[t] || (i.style[t] = e[t])
})
}), i
}, a.prototype.init = function (e) {
var i = this;
e && Object.keys(e).forEach(function (t) {
i[t] = e[t]
})
}, a);
function a(t) {
this.left = (t = t || {}).left, this.top = t.top, this.topInDesign = this.top, this.height = t.height, this.width = t.width, this.transform = t.transform, this.init(t)
}
}, function (module, __webpack_exports__, __webpack_require__) {
__webpack_require__.d(__webpack_exports__, "a", function () {
return BasePrintElement
});
var _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17),
_HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1),
_print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9),
_dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6),
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0),
_PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8),
_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2),
BasePrintElement = function () {
function BasePrintElement(t) {
this.printElementType = t, this.id = _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.guid()
}
return BasePrintElement.prototype.getConfigOptionsByName = function (t) {
return _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance[t]
}, BasePrintElement.prototype.getProxyTarget = function (t) {
t && this.SetProxyTargetOption(t);
var t = this.getData(),
e = this.createTarget(this.getTitle(), t);
return this.updateTargetSize(e), this.css(e, t), e
}, BasePrintElement.prototype.SetProxyTargetOption = function (t) {
this.options.getPrintElementOptionEntity(), jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend(this.options, t), this.copyFromType()
}, BasePrintElement.prototype.showInPage = function (t, e) {
var i = this.options.showInPage,
n = this.options.unShowInPage;
if (i) {
if ("first" == i) return 0 == t;
if (t == e - 1 && "last" == n) return !1;
if ("odd" == i) return (0 != t || "first" != n) && t % 2 == 0;
if ("even" == i) return t % 2 == 1;
if ("last" == i) return t == e - 1
}
return !(0 == t && "first" == n || t == e - 1 && "last" == n)
}, BasePrintElement.prototype.setTemplateId = function (t) {
this.templateId = t
}, BasePrintElement.prototype.setPanel = function (t) {
this.panel = t
}, BasePrintElement.prototype.getField = function () {
return this.options.field || this.printElementType.field
}, BasePrintElement.prototype.getTitle = function () {
return this.printElementType.title
}, BasePrintElement.prototype.updateSizeAndPositionOptions = function (t, e, i, n) {
this.options.setLeft(t), this.options.setTop(e), this.options.copyDesignTopFromTop(), this.options.setWidth(i), this.options.setHeight(n)
}, BasePrintElement.prototype.initSizeByHtml = function (t) {
t && t.length && (this.createTempContainer(), t = t.clone(), this.getTempContainer().append(t), this.options.initSizeByHtml(parseInt(hinnn.px.toPt(t.width()).toString()), parseInt(hinnn.px.toPt(t.height()).toString())), this.removeTempContainer())
}, BasePrintElement.prototype.updateTargetSize = function (t) {
t.css("width", this.options.displayWidth()), t.css("height", this.options.displayHeight())
}, BasePrintElement.prototype.updateTargetWidth = function (t) {
t.css("width", this.options.displayWidth())
}, BasePrintElement.prototype.getDesignTarget = function (t) {
var n = this,
e = 0;
return this.designTarget = this.getHtml(t)[0].target, this.designPaper = t, this.designTarget.click(function (t) {
500 < t.timeStamp - e && hinnn.event.trigger(n.getPrintElementSelectEventKey(), {
printElement: n
}), e = t.timeStamp
}), this.designTarget.dblclick(function (t) {
var e, i = n.designTarget.find(".hiprint-printElement-content");
i && (e = n.designTarget.find(".resize-panel"), "text" != n.printElementType.type || n.options.textType && "text" != n.options.textType || (n._editing = !0, n.designTarget.hidraggable("update", {
draggable: !1
}), i.css("cursor", "text"), i.addClass("editing"), n.designTarget.addClass("editing"), i.click(function (t) {
n._editing && t.stopPropagation()
}), i.attr("contenteditable", !0), e && e.css("display", "none"), n.selectEnd(i)))
}), this.designTarget
}, BasePrintElement.prototype.selectEnd = function (t) {
var e, i;
t.focus(), void 0 !== window.getSelection && void 0 !== document.createRange ? ((i = document.createRange()).selectNodeContents(t[0]), i.collapse(!1), (e = window.getSelection()).removeAllRanges(), e.addRange(i)) : void 0 !== document.body.createTextRange && ((i = document.body.createTextRange()).moveToElementText(t[0]), i.collapse(!1), i.select())
}, BasePrintElement.prototype.updateByContent = function (t) {
var e, i = this,
n = i.designTarget.find(".hiprint-printElement-content");
i._editing && (n && n.css("cursor", "") && n.removeClass("editing") && n.removeAttr("contenteditable"), i.designTarget.removeClass("editing"), n = n.text(), e = i.options.title + ":", n.startsWith(e) && i.options.field ? n.length > e.length ? i.options.testData = n.split(":")[1] : (i.options.title = n, i.options.testData = "") : i.options.title = n, t || hinnn.event.trigger(i.getPrintElementSelectEventKey(), {
printElement: i
}), i.updateDesignViewFromOptions(), hinnn.event.trigger("hiprintTemplateDataChanged_" + i.templateId, "编辑修改"), i._editing = !1, e = null == i.options.draggable || 1 == i.options.draggable, i.designTarget.hidraggable("update", {
draggable: e
}))
}, BasePrintElement.prototype.getPrintElementSelectEventKey = function () {
return "PrintElementSelectEventKey_" + this.templateId
}, BasePrintElement.prototype.design = function (t, c) {
var l = this;
this.designTarget.hidraggable({
draggable: l.options.draggable,
axis: l.options.axis || void 0,
designTarget: l,
onDrag: function (t, e, i) {
var n, r, a = l.panel.printElements.filter(function (t) {
return "block" == t.designTarget.children().last().css("display") && t.designTarget.children().last().hasClass("selected") && !t.printElementType.type.includes("table")
}),
o = 1 < a.length,
s = !l.designTarget.children().last().hasClass("selected");
o && (n = e - l.options.left, r = i - l.options.top, a.forEach(function (t) {
t.updateSizeAndPositionOptions(n + t.options.getLeft(), r + t.options.getTop()), t.designTarget.css("left", t.options.displayLeft()), t.designTarget.css("top", t.options.displayTop()), t.createLineOfPosition(c)
}), !s) || (l.updateSizeAndPositionOptions(e, i), l.createLineOfPosition(c)), _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.changed = !0
},
moveUnit: "pt",
minMove: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance,
onBeforeDrag: function (t) {
_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !0, l.designTarget.focus(), l.createLineOfPosition(c)
},
getScale: function () {
return l.designPaper.scale || 1
},
onStopDrag: function (t) {
_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.changed && hinnn.event.trigger("hiprintTemplateDataChanged_" + l.templateId, "移动"), _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !1, _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.changed = !1;
var e = l.panel.printElements.filter(function (t) {
return "block" == t.designTarget.children().last().css("display") && !t.printElementType.type.includes("table")
});
1 < e.length ? e.forEach(function (t) {
t.removeLineOfPosition()
}) : l.removeLineOfPosition()
}
}), this.setResizePanel(), this.bingCopyEvent(this.designTarget), this.bingKeyboardMoveEvent(this.designTarget, c)
}, BasePrintElement.prototype.getPrintElementEntity = function (t) {
return t ? new _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__.a(void 0, this.options.getPrintElementOptionEntity(), this.printElementType.getPrintElementTypeEntity()) : new _entity_PrintElementEntity__WEBPACK_IMPORTED_MODULE_0__.a(this.printElementType.tid, this.options.getPrintElementOptionEntity())
}, BasePrintElement.prototype.submitOption = function () {
var r = this,
t = this.getConfigOptions();
t && t.tabs && t.tabs.length ? this.getPrintElementOptionTabs().forEach(function (t) {
t.list.forEach(function (t) {
var e = t.getValue(),
i = "textType" == t.name && r.options[t.name] !== e,
n = "axis" == t.name && r.options[t.name] !== e;
e && "object" == _typeof(e) ? Object.keys(e).forEach(function (t) {
r.options[t] = e[t]
}) : r.options[t.name] = e, i && r.setResizePanel(), n && r.designTarget.hidraggable("update", {
axis: e
})
})
}) : this.getPrintElementOptionItems().forEach(function (t) {
var e = t.getValue(),
i = "textType" == t.name && r.options[t.name] !== e,
n = "axis" == t.name && r.options[t.name] !== e;
e && "object" == _typeof(e) ? Object.keys(e).forEach(function (t) {
r.options[t] = e[t]
}) : r.options[t.name] = e, i && r.setResizePanel(), n && r.designTarget.hidraggable("update", {
axis: e
})
}), this.updateDesignViewFromOptions(), hinnn.event.trigger("hiprintTemplateDataChanged_" + this.templateId, "元素修改")
}, BasePrintElement.prototype.updateOption = function (t, e, i) {
try {
var n = this.getConfigOptions(),
r = [];
n && n.tabs && n.tabs.length ? n.tabs.forEach(function (t) {
t.options.forEach(function (t) {
r.push(t.name)
})
}) : r = n.supportOptions.map(function (t) {
return t.name
}), r && r.includes(t) && (this.options[t] = e, this.updateDesignViewFromOptions(), i || hinnn.event.trigger("hiprintTemplateDataChanged_" + this.templateId, "参数修改"))
} catch (n) { }
}, BasePrintElement.prototype.getReizeableShowPoints = function () {
return ["barcode", "qrcode"].includes(this.options.textType) ? ["se", "r"] : ["s", "e", "r"]
}, BasePrintElement.prototype.setResizePanel = function () {
var o = this,
s = this.designPaper;
this.designTarget.hireizeable({
showPoints: o.getReizeableShowPoints(),
draggable: o.options.draggable,
showSizeBox: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.showSizeBox,
getScale: function () {
return o.designPaper.scale || 1
},
onBeforeResize: function () {
_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !0
},
onResize: function (t, e, i, n, r, a) {
null != a ? o.onRotate(t, a) : o.onResize(t, e, i, n, r), o.createLineOfPosition(s)
},
onStopResize: function (t) {
hinnn.event.trigger("hiprintTemplateDataChanged_" + o.templateId, t ? "旋转" : "大小"), _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging = !1, o.removeLineOfPosition()
}
})
}, BasePrintElement.prototype.onRotate = function (t, e) {
this.options.setRotate(e)
}, BasePrintElement.prototype.onResize = function (t, e, i, n, r) {
this.updateSizeAndPositionOptions(r, n, i, e)
}, BasePrintElement.prototype.getOrderIndex = function () {
return this.options.getTop()
}, BasePrintElement.prototype.getHtml = function (t, e, i) {
this.setCurrenttemplateData(e);
var n = [],
r = this.getBeginPrintTopInPaperByReferenceElement(t),
a = t.getPaperFooter(0),
a = (this.isHeaderOrFooter() || this.isFixed() || a < r && "none" != t.panelPageRule && (n.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: void 0,
printLine: void 0
})), r = r - a + t.paperHeader, t.getPaperFooter(1)), this.getData(e)),
i = this.createTarget(this.getTitle(), a, i);
return this.updateTargetSize(i), this.css(i, a), i.css("position", "absolute"), i.css("left", this.options.displayLeft()), i.css("top", r + "pt"), n.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: i,
printLine: r + this.options.getHeight(),
referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__.a({
top: this.options.getTop(),
left: this.options.getLeft(),
height: this.options.getHeight(),
width: this.options.getWidth(),
beginPrintPaperIndex: t.index,
bottomInLastPaper: r + this.options.getHeight(),
printTopInPaper: r
})
})), e && this.options.pageBreak && (n[0].target.css("top", t.paperHeader + "pt"), n[0].referenceElement.top = this.options.getTop() - this.options.getHeight() - t.paperHeader, n[0].printLine = t.paperHeader, n[0].referenceElement.bottomInLastPaper = 0, n[0].referenceElement.printTopInPaper = t.paperHeader, n.unshift(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: i,
printLine: t.height,
referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__.a({
top: 0,
left: 0,
height: 0,
width: 0,
beginPrintPaperIndex: t.index,
bottomInLastPaper: t.height,
printTopInPaper: t.paperHeader
})
}))), n
}, BasePrintElement.prototype.getHtml2 = function (t, e, i) {
var n = 0,
r = (this.setCurrenttemplateData(e), []),
a = this.getBeginPrintTopInPaperByReferenceElement(t),
o = t.getPaperFooter(n),
n = (this.isHeaderOrFooter() || this.isFixed() || ("none" != t.panelPageRule && o < a && (r.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: void 0,
printLine: void 0
})), a = a - o + t.paperHeader, o = t.getPaperFooter(++n)), a <= o && e && a + this.options.getHeight() > o && "none" != t.panelPageRule && (r.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: void 0,
printLine: void 0
})), a = t.paperHeader, o = t.getPaperFooter(++n))), this.getData(e)),
s = this.createTarget(this.getTitle(), n);
return "none" == t.panelPageRule && a + this.options.getHeight() > o && this.updatePanelHeight(a + this.options.getHeight(), t), this.updateTargetSize(s), this.css(s, n), s.css("position", "absolute"), s.css("left", this.options.displayLeft()), s.css("top", a + "pt"), r.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: s,
printLine: a + this.options.getHeight(),
referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__.a({
top: this.options.getTop(),
left: this.options.getLeft(),
height: this.options.getHeight(),
width: this.options.getWidth(),
beginPrintPaperIndex: t.index,
bottomInLastPaper: a + this.options.getHeight(),
printTopInPaper: a
})
})), e && this.options.pageBreak && (r[0].target.css("top", t.paperHeader + "pt"), r[0].referenceElement.top = this.options.getTop() - this.options.getHeight() - t.paperHeader, r[0].printLine = t.paperHeader, r[0].referenceElement.bottomInLastPaper = 0, r[0].referenceElement.printTopInPaper = t.paperHeader, r.unshift(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({
target: s,
printLine: t.height,
referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_5__.a({
top: 0,
left: 0,
height: 0,
width: 0,
beginPrintPaperIndex: t.index,
bottomInLastPaper: t.height,
printTopInPaper: t.paperHeader
})
}))), r
}, BasePrintElement.prototype.updatePanelHeight = function (t, e) {
var i;
"none" == this.panel.panelPageRule && (i = hinnn.pt.toMm(t), e.paperFooter = t, e.target.css("height", i + "mm"), e.target.attr("original-height", i))
}, BasePrintElement.prototype.getBeginPrintTopInPaperByReferenceElement = function (t) {
var e = this.options.getTop();
return this.isHeaderOrFooter() || this.isFixed() ? e : t.referenceElement.isPositionLeftOrRight(e) ? t.referenceElement.printTopInPaper + (e - t.referenceElement.top) : t.referenceElement.bottomInLastPaper + (e - (t.referenceElement.top + t.referenceElement.height))
}, BasePrintElement.prototype.css = function (i, t) {
var e, n = this,
r = [],
a = this.getConfigOptions();
a && (a.tabs && a.tabs.length ? (e = [], a.tabs.forEach(function (t) {
e = e.concat(t.options)
})) : e = a.supportOptions, e) && e.forEach(function (t) {
var e = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(t.name);
e && e.css && (e = e.css(i, n.options.getValueFromOptionsOrDefault(t.name))) && r.push(e)
}), this.stylerCss(i, t)
}, BasePrintElement.prototype.stylerCss = function (e, t) {
var i, n = this.getStyler();
n && (i = n(t, this.options, e, this._currenttemplateData)) && Object.keys(i).forEach(function (t) {
e.css(t, i[t])
})
}, BasePrintElement.prototype.getData = function (i) {
var t = this.getField();
return i ? t && t.split(".").reduce(function (t, e) {
return t ? t[e] : i ? i[e] : ""
}, !1) || "" : this.printElementType.getData()
}, BasePrintElement.prototype.copyFromType = function () {
var e = this.options,
i = this.printElementType,
t = this.getConfigOptions(),
n = [];
return t && t.tabs && t.tabs.length ? t.tabs.forEach(function (t) {
t.options.forEach(function (t) {
n.push(t.name)
})
}) : n = t.supportOptions.map(function (t) {
return t.name
}), Object.keys(i).forEach(function (t) {
i[t] && "columns" != t && -1 < n.indexOf(t) && (e[t] = "function" == _typeof(i[t]) ? i[t].toString() : i[t])
}), e
}, BasePrintElement.prototype.getPrintElementOptionTabs = function () {
var i, t;
return this._printElementOptionTabs || (i = [], (t = this.getConfigOptions()) && (t = t.tabs) && t.forEach(function (t, e) {
i.push({
name: t.name,
list: []
}), t.options.filter(function (t) {
return !t.hidden
}).forEach(function (t) {
t = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(t.name);
i[e].list.push(t)
})
}), this._printElementOptionTabs = i, this._printElementOptionItems = void 0), this._printElementOptionTabs
}, BasePrintElement.prototype.getPrintElementOptionItems = function () {
var e, t, i;
return this._printElementOptionItems || (e = [], (t = this.getConfigOptions()) && (t.tabs && t.tabs.length ? (i = [], t.tabs.forEach(function (t) {
t.concat(t.options)
})) : i = t.supportOptions, i) && i.filter(function (t) {
return !t.hidden
}).forEach(function (t) {
t = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(t.name);
e.push(t)
}), this._printElementOptionItems = this.filterOptionItems(e.concat()), this._printElementOptionTabs = void 0), this._printElementOptionItems
}, BasePrintElement.prototype.getPrintElementOptionItemsByName = function (t) {
var e, i = [],
t = this.getConfigOptionsByName(t);
return t && (t.tabs && t.tabs.length ? (e = [], t.tabs.forEach(function (t) {
e = e.concat(t.options)
})) : e = t.supportOptions, e) && e.filter(function (t) {
return !t.hidden
}).forEach(function (t) {
t = _print_element_option_PrintElementOptionItemManager__WEBPACK_IMPORTED_MODULE_2__.a.getItem(t.name);
i.push(t)
}), i.concat()
}, BasePrintElement.prototype.filterOptionItems = function (t) {
return this.printElementType.field ? t.filter(function (t) {
return "field" != t.name
}) : t
}, BasePrintElement.prototype.createTempContainer = function () {
this.removeTempContainer(), jquery__WEBPACK_IMPORTED_MODULE_60___default()("body").append(jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'))
}, BasePrintElement.prototype.removeTempContainer = function () {
jquery__WEBPACK_IMPORTED_MODULE_60___default()(".hiprint_temp_Container").remove()
}, BasePrintElement.prototype.getTempContainer = function () {
return jquery__WEBPACK_IMPORTED_MODULE_60___default()(".hiprint_temp_Container")
}, BasePrintElement.prototype.isHeaderOrFooter = function () {
return this.options.getTopInDesign() < this.panel.paperHeader || this.options.getTopInDesign() >= this.panel.paperFooter
}, BasePrintElement.prototype.delete = function () {
this.designTarget && this.designTarget.remove()
}, BasePrintElement.prototype.setCurrenttemplateData = function (t) {
this._currenttemplateData = t
}, BasePrintElement.prototype.isFixed = function () {
return this.options.fixed
}, BasePrintElement.prototype.onRendered = function (t, e) {
this.printElementType && this.printElementType.onRendered && this.printElementType.onRendered(e, this.options, t.getTarget())
}, BasePrintElement.prototype.createLineOfPosition = function (t) {
var e = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".toplineOfPosition.id" + this.id),
i = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".topPosition.id" + this.id),
n = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".leftlineOfPosition.id" + this.id),
r = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".leftPosition.id" + this.id),
a = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".rightlineOfPosition.id" + this.id),
o = jquery__WEBPACK_IMPORTED_MODULE_60___default()(".bottomlineOfPosition.id" + this.id),
s = _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance;
e.length ? e.css("top", this.options.displayTop(!0)) : ((e = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).css("top", this.options.displayTop(!0)), e.css("width", t.displayWidth()), this.designTarget.parents(".hiprint-printPaper-content").append(e)), s.showPosition && (i.length ? (i.toggleClass("topPosition-lineMode", s.positionLineMode), i.text(this.options.posTop() + (s.positionUnit ? "pt" : "")), i.css("top", this.options.posTop() - i.height() + "pt"), s.positionLineMode ? i.css("left", this.options.posLeft() - i.width() / 2 + "pt") : i.css("left", this.options.posLeft() + 2 + "pt"), this.designTarget.find(".size-box") && this.designTarget.find(".size-box").toggleClass("hide", !0)) : ((i = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).toggleClass("topPosition-lineMode", s.positionLineMode), i.text(this.options.posTop() + (s.positionUnit ? "pt" : "")), s.positionLineMode ? i.css("left", this.options.posLeft() - i.width() / 2 + "pt") : i.css("left", this.options.posLeft() + 2 + "pt"), this.designTarget.find(".size-box") && this.designTarget.find(".size-box").toggleClass("hide", !0), this.designTarget.parents(".hiprint-printPaper-content").append(i), i.css("top", this.options.posTop() - i.height() + "pt"))), n.length ? n.css("left", this.options.displayLeft(!0)) : ((e = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).css("left", this.options.displayLeft(!0)), e.css("height", t.displayHeight()), this.designTarget.parents(".hiprint-printPaper-content").append(e)), s.showPosition && (r.length ? (r.text(this.options.posLeft() + (s.positionUnit ? "pt" : "")), r.toggleClass("leftPosition-lineMode", s.positionLineMode), r.css("left", this.options.posLeft() - r.width() + "pt"), s.positionLineMode ? r.css("top", this.options.posTop() - r.height() / 3 + "pt") : r.css("top", this.options.posTop() + 2 + "pt")) : ((r = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).text(this.options.posLeft() + (s.positionUnit ? "pt" : "")), r.toggleClass("leftPosition-lineMode", s.positionLineMode), s.positionLineMode ? r.css("top", this.options.posTop() - r.height() / 3 + "pt") : r.css("top", this.options.posTop() + 2 + "pt"), this.designTarget.parents(".hiprint-printPaper-content").append(r), r.css("left", this.options.posLeft() - r.width() + "pt"))), a.length ? a.css("left", this.options.getLeft() + this.options.getWidth() + "pt") : ((i = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).css("left", this.options.getLeft() + this.options.getWidth() + "pt"), i.css("height", t.displayHeight()), this.designTarget.parents(".hiprint-printPaper-content").append(i)), o.length ? o.css("top", this.options.getTop() + this.options.getHeight() + "pt") : ((n = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).css("top", this.options.getTop() + this.options.getHeight() + "pt"), n.css("width", t.displayWidth()), this.designTarget.parents(".hiprint-printPaper-content").append(n))
}, BasePrintElement.prototype.removeLineOfPosition = function () {
jquery__WEBPACK_IMPORTED_MODULE_60___default()(".toplineOfPosition.id" + this.id).remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".topPosition.id" + this.id).remove(), this.designTarget.find(".size-box") && this.designTarget.find(".size-box").toggleClass("hide", !1), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".leftlineOfPosition.id" + this.id).remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".leftPosition.id" + this.id).remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".rightlineOfPosition.id" + this.id).remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".bottomlineOfPosition.id" + this.id).remove()
}, BasePrintElement.prototype.getFontList = function () {
var t = this.options.fontList;
return t || _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(this.templateId).getFontList()
}, BasePrintElement.prototype.getFields = function () {
return "table" == this.printElementType.type ? this.options.tableFields : this.options.fields || _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(this.templateId).getFields()
}, BasePrintElement.prototype.getOnImageChooseClick = function () {
var t = this.options.onImageChooseClick;
return t || _HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(this.templateId).getOnImageChooseClick()
}, BasePrintElement.prototype.bingCopyEvent = function (t) {
var e = this;
t.keydown(function (t) {
e._editing && !t.altKey && 13 == t.keyCode ? e.updateByContent() : (t.ctrlKey || t.metaKey) && 67 == t.keyCode && (e.copyJson(), t.preventDefault())
})
}, BasePrintElement.prototype.copyJson = function () {
try {
var t = this,
e = jquery__WEBPACK_IMPORTED_MODULE_60___default()("#copyArea"),
i = (e.length || (e = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')), jquery__WEBPACK_IMPORTED_MODULE_60___default()("body").append(e), JSON.stringify({
options: t.options,
printElementType: t.printElementType,
id: t.id,
templateId: t.templateId
})),
n = (e.text(i), e.css("visibility", "visible"), e.focus(), e.setSelectionRange ? e.setSelectionRange(0, e.value.length) : e.select(), !1),
n = document.execCommand("copy");
e.css("visibility", "hidden"), t.designTarget.focus()
} catch (t) {
n = !1
}
return n
}, BasePrintElement.prototype.clone = function (t) {
var e = this,
i = e.printElementType.createPrintElement();
return Object.keys(e.options).forEach(function (t) {
i.options[t] = e.options[t]
}), i
}, BasePrintElement.prototype.getFormatter = function () {
var formatter = void 0;
formatter = this.printElementType.formatter || this.options.formatter
if (!formatter) {
return null
}
try {
var s = "formatter=" + formatter;
eval(s)
} catch (err) {
console.log(err)
}
// if (this.printElementType.formatter && (formatter = this.printElementType.formatter), this.options.formatter) try {
// var s = "formatter=" + this.options.formatter;
// eval(s)
// } catch (t) {}
return window.formatter
}, BasePrintElement.prototype.getStyler = function () {
var fnstyler = void 0;
if (this.printElementType.styler && (fnstyler = this.printElementType.styler), this.options.styler) try {
var s = "fnstyler=" + this.options.styler;
eval(s)
} catch (t) { }
return fnstyler
}, BasePrintElement.prototype.bingKeyboardMoveEvent = function (r, t) {
var a = this,
o = void 0,
s = void 0;
r.attr("tabindex", "1"), r.keydown(function (t) {
if ("INPUT" != t.target.tagName && (!a._editing || t.altKey) && !1 !== a.options.draggable) {
var e = a.panel.printElements.filter(function (t) {
return "block" == t.designTarget.children().last().css("display") && !t.printElementType.type.includes("table")
}),
i = 1 < e.length,
n = _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance;
switch (t.keyCode) {
case 8:
case 46:
_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(a.templateId).deletePrintElement(a), hinnn.event.trigger("hiprintTemplateDataChanged_" + a.templateId, "删除"), hinnn.event.trigger("clearSettingContainer");
break;
case 37:
o = a.options.getLeft(), i ? e.forEach(function (t) {
t.updatePositionByMultipleSelect(0 - n, 0)
}) : (a.updateSizeAndPositionOptions(o - n), r.css("left", a.options.displayLeft())), t.preventDefault();
break;
case 38:
s = a.options.getTop(), i ? e.forEach(function (t) {
t.updatePositionByMultipleSelect(0, 0 - n)
}) : (a.updateSizeAndPositionOptions(void 0, s - n), r.css("top", a.options.displayTop())), t.preventDefault();
break;
case 39:
o = a.options.getLeft(), i ? e.forEach(function (t) {
t.updatePositionByMultipleSelect(n, 0)
}) : (a.updateSizeAndPositionOptions(o + n), r.css("left", a.options.displayLeft())), t.preventDefault();
break;
case 40:
s = a.options.getTop(), i ? e.forEach(function (t) {
t.updatePositionByMultipleSelect(0, n)
}) : (a.updateSizeAndPositionOptions(void 0, s + n), r.css("top", a.options.displayTop())), t.preventDefault()
}[37, 38, 39, 40].includes(t.keyCode) && hinnn.event.trigger("hiprintTemplateDataChanged_" + a.templateId, "键盘移动")
}
})
}, BasePrintElement.prototype.inRect = function (t) {
var e = this.designPaper.scale || 1,
i = this.designTarget[0].offsetLeft,
n = this.designTarget[0].offsetTop,
r = this.designTarget[0].offsetHeight,
a = i + this.designTarget[0].offsetWidth,
r = n + r,
o = jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.target[0]).position().left / e,
e = jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.target[0]).position().top / e,
s = t.target[0].offsetHeight,
t = t.target[0].offsetWidth;
return o < a && i < o + t && n < e + s && e < r
}, BasePrintElement.prototype.multipleSelect = function (t) {
t ? this.designTarget.addClass("multipleSelect") : this.designTarget.removeClass("multipleSelect")
}, BasePrintElement.prototype.updatePositionByMultipleSelect = function (t, e) {
!1 !== this.options.draggable && (this.updateSizeAndPositionOptions(t + this.options.getLeft(), e + this.options.getTop()), this.designTarget.css("left", this.options.displayLeft()), this.designTarget.css("top", this.options.displayTop()))
}, BasePrintElement
}()
}, function (t, e, i) {
A.prototype.init = function (t) {
this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()(''), t.getTarget().append(this.target), this.target.focus()
}, A.prototype.getValue = function () {
return this.target.val()
}, A.prototype.setValue = function (t) {
this.target.val(t)
}, A.prototype.destroy = function () {
this.target.remove()
};
var n = A,
r = (Object.defineProperty(I, "Instance", {
get: function () {
return I._instance = I._instance ? I._instance : new I
},
enumerable: !0,
configurable: !0
}), I),
a = (b.prototype.init = function (t, i) {
var n = '", this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()(n), i.getTarget().append(this.target), this.target.focus()
}, b.prototype.getValue = function () {
var t = this.target.val();
return this.target.find('option[value="' + t + '"]').text() + "#" + t
}, b.prototype.setValue = function (t) {
t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
}, b.prototype.destroy = function () {
this.target.remove()
}, b),
o = (Object.defineProperty(v, "Instance", {
get: function () {
return v._instance = v._instance ? v._instance : new v
},
enumerable: !0,
configurable: !0
}), v),
s = (Object.defineProperty(g, "Instance", {
get: function () {
return g._instance = r._instance ? g._instance : new g
},
enumerable: !0,
configurable: !0
}), g.prototype.createEditor = function (t) {
return jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend({}, r.Instance[t])
}, g.prototype.createSelect = function (t) {
return jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend({}, o.Instance[t])
}, g),
c = i(10),
l = i(14),
p = i(11),
d = (m.prototype.init = function (t, e) {
var i = this;
this.tableOptions = e, this.title = t.title, this.field = t.field, t.getTarget().unbind("dblclick.hitable").bind("dblclick.hitable", function () {
t.isEditing = !0, i.beginEdit(t)
})
}, m.prototype.getDisplayHtml = function () {
return this.title
}, m.prototype.beginEdit = function (e) {
var i = this;
i.tableOptions.options.fields && i.tableOptions.options.fields.length ? (this.editor = s.Instance.createSelect("select"), e.getTarget().html(""), this.editor.init(i.tableOptions.options.fields, e), this.editor.setValue(this.field || ""), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.editor.target).keydown(function (t) {
13 == t.keyCode && i.endEdit(e)
}), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.editor.target).change(function (t) {
i.endEdit(e)
}), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.editor.target).blur(function (t) {
i.endEdit(e)
})) : (this.editor = s.Instance.createEditor("text"), e.getTarget().html(""), this.editor.init(e), (this.title || this.field) && (this.tableOptions.options.isEnableEditField ? this.editor.setValue((this.title || "") + "#" + (this.field || "")) : this.editor.setValue(this.title || "")), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.editor.target).keydown(function (t) {
13 == t.keyCode && i.endEdit(e)
}), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.editor.target).blur(function (t) {
i.endEdit(e)
}), this.tableOptions.editingCell && this.tableOptions.editingCell.id != e.id && this.tableOptions.editingCell.innerElement.endEdit(this.tableOptions.editingCell), this.tableOptions.editingCell = e)
}, m.prototype.endEdit = function (t) {
t.isEditing = 0;
var e, i = this.editor.getValue();
i ? this.tableOptions.options.isEnableEditField || this.tableOptions.options.fields ? (e = i.split("#"), t.title = this.title = e[0], 0 < e.length && (t.columnId = t.field = this.field = e[1]), t.id && t.target.attr("id", t.id), t.columnId && t.target.attr("column-id", t.columnId), hinnn.event.trigger("hiprintTemplateDataChanged_" + this.tableOptions.options.templateId, "调整表格列字段")) : t.title = this.title = i : this.tableOptions.options.isEnableEditField ? (t.title = this.title = "", t.field = this.field = "") : t.title = this.title = "", this.editor.destroy(), t.getTarget().html(this.title)
}, m),
u = function (t) {
this.title = t.title, this.field = t.field, this.width = t.width, this.align = t.align, this.halign = t.halign, this.vAlign = t.vAlign, this.colspan = t.colspan, this.rowspan = t.rowspan, this.checked = t.checked, this.columnId = t.columnId, this.tableSummaryTitle = t.tableSummaryTitle, this.tableSummaryText = t.tableSummaryText, this.tableSummaryColspan = t.tableSummaryColspan, this.tableSummary = t.tableSummary, this.tableSummaryAlign = t.tableSummaryAlign, this.tableSummaryNumFormat = t.tableSummaryNumFormat, this.tableSummaryFormatter = t.tableSummaryFormatter, this.upperCase = t.upperCase, this.renderFormatter = t.renderFormatter && t.renderFormatter.toString(), this.formatter2 = t.formatter2 && t.formatter2.toString(), this.styler2 = t.styler2 && t.styler2.toString(), this.stylerHeader = t.stylerHeader && t.stylerHeader.toString(), this.tableColumnHeight = t.tableColumnHeight, this.tableTextType = t.tableTextType, this.tableBarcodeMode = t.tableBarcodeMode, this.tableQRCodeLevel = t.tableQRCodeLevel
},
f = (h.prototype.init = function (t, e, i, n) {
this.isHead = n, this.rowId = i, this.isEditing = !1;
n = /^[0-9]*$/, this.target = t, this.tableOptions = e, i = this.target.attr("colspan"), this.colspan = n.test(i) ? parseInt(i) : 1, t = this.target.attr("rowspan");
this.rowspan = n.test(t) ? parseInt(t) : 1, this.initEvent(), this.isHead && this.initInnerEelement()
}, h.prototype.beginEdit = function () {
var t;
!this.isEditing && this.tableOptions.isEnableEdit && this.tableOptions.onBeforEdit(this) && (t = this.getValue(), this.editor = s.Instance.createEditor("text"), this.isEditing = !0, (this.tableOptions.editingCell = this).target.html(""), this.editor.init(this), this.editor.setValue(t))
}, h.prototype.endEdit = function () {
this.isEditing = !1;
var t = this.editor.getValue();
this.editor.destroy(), this.target.html(t)
}, h.prototype.getTarget = function () {
return this.target
}, h.prototype.getValue = function () {
return this.target.html()
}, h.prototype.setValue = function (t) { }, h.prototype.initInnerEelement = function () {
this.innerElement = new d, this.innerElement.init(this, this.tableOptions)
}, h.prototype.initEvent = function () { }, h.prototype.isXYinCell = function (t, e) {
t = new c.b({
x: t,
y: e,
height: 0,
width: 0
});
return this.isOverlap(t)
}, h.prototype.getTableRect = function () {
return new c.b({
x: this.target.offset().left,
y: this.target.offset().top,
height: this.target[0].offsetHeight,
width: this.target[0].offsetWidth
})
}, h.prototype.isOverlap = function (t) {
var e = this.getTableRect();
return t.x + t.width > e.x && e.x + e.width > t.x && t.y + t.height > e.y && e.y + e.height > t.y
}, h.prototype.isInRect = function (t) {
var e = t.rect,
i = this.getTableRect();
return i.x >= e.x && i.x + i.width <= e.x + e.width && i.y >= e.y && i.y + i.height <= e.y + e.height && (i = l.a.mergeRect(e, i), JSON.stringify(e) == JSON.stringify(i) || (t.changed = !0, t.rect = i, !0))
}, h.prototype.isSelected = function () {
return this.target.hasClass("selected")
}, h.prototype.select = function () {
this.target.addClass("selected")
}, h.prototype.isHeader = function () {
return !1
}, h.prototype.setAlign = function (t) {
(this.align = t) ? this.target.css("text-align", t) : this.target[0].style.textAlign = ""
}, h.prototype.setVAlign = function (t) {
(this.vAlign = t) ? this.target.css("vertical-align", t) : this.target[0].style.verticalAlign = ""
}, h.prototype.getEntity = function () {
return new u(this)
}, h);
function h() {
this.id = p.a.createId()
}
function m() { }
function g() { }
function v() {
this.select = new a
}
function b() { }
function I() {
this.text = new n
}
function A() { }
i.d(e, "a", function () {
return x
});
(function (t, e) {
(Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
})(y = w, i = _ = f), y.prototype = null === i ? Object.create(i) : (M.prototype = i.prototype, new M), w.prototype.css = function (t) { };
var _, y, x = w;
function w(t) {
var e = this;
return t = t || {}, (e = _.call(this) || this).width = t.width ? parseFloat(t.width.toString()) : 100, e.title = t.title, e.descTitle = t.descTitle, e.field = t.field, e.fixed = t.fixed, e.rowspan = t.rowspan ? parseInt(t.rowspan) : 1, e.colspan = t.colspan ? parseInt(t.colspan) : 1, e.align = t.align, e.halign = t.halign, e.vAlign = t.vAlign, e.formatter = t.formatter, e.styler = t.styler, e.renderFormatter = t.renderFormatter, e.formatter2 = t.formatter2, e.styler2 = t.styler2, e.stylerHeader = t.stylerHeader, e.checkbox = t.checkbox, e.checked = 0 != t.checked, e.columnId = t.columnId || t.field, e.tableColumnHeight = t.tableColumnHeight, e.tableTextType = t.tableTextType, e.tableBarcodeMode = t.tableBarcodeMode, e.tableQRCodeLevel = t.tableQRCodeLevel, e.tableSummaryTitle = t.tableSummaryTitle, e.tableSummaryText = t.tableSummaryText, e.tableSummaryColspan = t.tableSummaryColspan, e.tableSummary = t.tableSummary, e.tableSummaryAlign = t.tableSummaryAlign, e.tableSummaryNumFormat = t.tableSummaryNumFormat, e.tableSummaryFormatter = t.tableSummaryFormatter, e.upperCase = t.upperCase, e
}
function M() {
this.constructor = y
}
}, function (t, e, i) {
i.d(e, "a", function () {
return n
});
var n = function (t) {
this.printLine = t.printLine, this.target = t.target, this.referenceElement = t.referenceElement
}
}, function (module, __webpack_exports__, __webpack_require__) {
__webpack_require__.d(__webpack_exports__, "a", function () {
return TableExcelHelper
});
var _ReconsitutionTableColumns__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19),
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0),
TableExcelHelper = function () {
function TableExcelHelper() { }
return TableExcelHelper.createTableHead = function (t, e) {
for (var i = TableExcelHelper.reconsitutionTableColumnTree(t), n = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""), a = TableExcelHelper.getColumnsWidth(i, e), r = 0; r < i.totalLayer; r++) ! function (t) {
var r = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
");
i[t].filter(function (t) {
return t.checked
}).forEach(function (t) {
var e, i = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
"),
n = (t.id && i.attr("id", t.id), t.columnId && i.attr("column-id", t.columnId), (t.align || t.halign) && i.css("text-align", t.halign || t.align), t.vAlign && i.css("vertical-align", t.vAlign), 1 < t.colspan && i.attr("colspan", t.colspan), 1 < t.rowspan && i.attr("rowspan", t.rowspan), i.html(t.title), a[t.id] ? (t.hasWidth = !0, t.targetWidth = a[t.id], i.attr("haswidth", "haswidth"), i.css("width", a[t.id] + "pt")) : t.hasWidth = !1, TableExcelHelper.getHeaderStyler(t));
n && (e = n(t)) && Object.keys(e).forEach(function (t) {
i.css(t, e[t])
}), r.append(i)
}), n.append(r)
}(r);
return TableExcelHelper.syncTargetWidthToOption(t), n
}, TableExcelHelper.createTableFooter = function (t, f, h, e, m, i) {
var g, n = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""),
e = this.getFooterFormatter(h, e),
v = this.tableSummaryTitle,
b = "last" == h.tableFooterRepeat ? f : i,
r = h.columns.length - 1,
r = this.rowColumns || h.columns[r].columns;
return "no" != h.tableFooterRepeat && r.some(function (t) {
return t.tableSummary
}) && (g = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
"), r.filter(function (t) {
return t.checked
}).forEach(function (e) {
var t = b.filter(function (t) {
return t && t[e.field]
}).map(function (t) {
return new RegExp("^-?(0|[1-9]\\d*)(\\.\\d+)?").test(t[e.field]) ? Number(t[e.field]) : 0
}),
i = e.tableSummaryText,
n = e.tableSummaryNumFormat || 2,
r = "text-align: ".concat(e.tableSummaryAlign || "center"),
a = null == e.tableSummaryColspan ? 1 : e.tableSummaryColspan,
o = e.upperCase,
s = _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__.a,
c = s.toUpperCase,
l = s.numFormat,
s = TableExcelHelper.getColumnTableSummaryFormatter(e),
s = s ? s(e, t, f, h) : "";
if (s) g.append(s);
else switch (e.tableSummary) {
case "count":
var p = v(e, i || "".concat(i18n.__("计数"), ":"), m),
d = c(o, b.filter(function (t) {
return t
}).length || 0);
g.append('
').concat(p).concat(d, "
"));
break;
case "sum":
p = (u = c(o, l(u = parseFloat(Number(t.reduce(function (t, e) {
return t + e
}, 0))), n)), v(e, i || "".concat(i18n.__("合计"), ":"), m));
g.append('
').concat(p).concat(u, "
"));
break;
case "avg":
var u = parseFloat(Number(t.reduce(function (t, e) {
return t + e
}, 0))),
d = c(o, l(parseFloat(Number(u / (t.length || 1))), n)),
p = v(e, i || "".concat(i18n.__("平均值"), ":"), m);
g.append('
').concat(p).concat(d, "
"));
break;
case "min":
u = Math.min.apply(Math, Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(t)) || 0, p = (u = c(o, l(u = u == 1 / 0 ? 0 : u, n)), v(e, i || "".concat(i18n.__("最小值"), ":"), m));
g.append('
').concat(p).concat(u || 0, "
"));
break;
case "max":
d = Math.max.apply(Math, Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(t)), p = (d = c(o, l(d = d == -1 / 0 ? 0 : d, n)), v(e, i || "".concat(i18n.__("最大值"), ":"), m));
g.append('
').concat(p).concat(d || 0, "
"));
break;
case "text":
g.append('
').concat(i || "", "
"));
break;
default:
1 <= a && g.append('
').concat(i || "", "
"))
}
}), n.append(g)), e && n.append(e(h, f, m, i)), n
}, TableExcelHelper.tableSummaryTitle = function (t, e, i) {
return null == t.tableSummaryTitle || 1 == t.tableSummaryTitle ? "".concat(e) : i ? "" : ''.concat(e, "")
}, TableExcelHelper.createTableRow = function (t, r, a, o, s) {
var c = this,
l = TableExcelHelper.reconsitutionTableColumnTree(t),
p = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""),
t = c.getGroupFieldsFormatter(o, s),
n = t ? o.groupFields = t(s, o, r) : s.groupFields || [];
return r = r || [], n.length ? _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_1__.a.groupBy(r, n, function (e) {
var i = {};
return n.forEach(function (t) {
return i[t] = e[t]
}), i
}).forEach(function (t) {
var e, i = c.getGroupFormatter(o, s),
i = (i && ((e = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
")).append(i(l.colspan, r, a, t, o)), p.append(e)), c.getGroupFooterFormatter(o, s)),
n = t;
n.rows.forEach(function (t, e) {
t = TableExcelHelper.createRowTarget(l, t, o, s, e, n.rows, a);
p.append(t)
}), i && ((e = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
")).append(i(l.colspan, r, a, t, o)), p.append(e))
}) : r.forEach(function (t, e) {
t = TableExcelHelper.createRowTarget(l, t, o, s, e, r, a);
p.append(t)
}), p
}, TableExcelHelper.createRowTarget = function (t, e, n, i, rowIndex, tableData, printData) {
var o = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
"), e && 0 < Object.keys(e).length && ("first" == n.tableHeaderRepeat || "none" == n.tableHeaderRepeat) ? (t.field && r.attr("field", t.field), t.align && r.css("text-align", t.align), t.vAlign && r.css("vertical-align", t.vAlign), n.rowsColumnsMerge && 1 < rowsColumnsArr[1] && (width = 0, columns.forEach(function (t, e) {
i <= e && e < i + rowsColumnsArr[1] && (width += t.width)
})), r.css("width", (width || t.width) + "pt")) : (t.field && r.attr("field", t.field), t.align && r.css("text-align", t.align), t.vAlign && r.css("vertical-align", t.vAlign)), TableExcelHelper.getColumnFormatter(t)),
p = a ? a(e[t.field], e, i, n) : e[t.field],
rf = TableExcelHelper.getColumnRenderFormatter(t),
imagebox;
if (rf) r.html(rf(e[t.field], e, i, n, rowIndex));
else if ("text" == t.tableTextType || null == t.tableTextType) r.html(p);
else {
if ("barcode" == t.tableTextType) {
r.html('');
try {
p ? (jsbarcode__WEBPACK_IMPORTED_MODULE_62___default()(r.find(".hibarcode_imgcode")[0], p, {
format: t.tableBarcodeMode || "CODE128A",
width: 1,
textMargin: -1,
lineColor: "#000000",
margin: 0,
height: parseInt(10),
displayValue: !1
}), r.find(".hibarcode_imgcode").attr("height", t.tableColumnHeight || "30pt"), r.find(".hibarcode_imgcode").css("margin", "5pt 10pt"), r.find(".hibarcode_imgcode").attr("width", "calc(100% - 20pt)")) : r.html("")
} catch (t) {
r.html("".concat(i18n.__("此格式不支持该文本")))
}
}
if ("image" == t.tableTextType && (r.html(""), p) && (imagebox = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'), imagebox.find("img").attr("src", p), r.html(imagebox)), "qrcode" == t.tableTextType) {
r.html("");
try {
var qrcodebox = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""),
l, u;
p && (l = parseInt(t.width || t.targetWidth || 20), u = parseInt(t.tableColumnHeight || 20), qrcodebox.css("height", (u < l ? u : l) + "pt"), new QRCode(qrcodebox[0], {
width: u < l ? u : l,
height: u < l ? u : l,
colorDark: "#000000",
useSVG: !0,
correctLevel: t.tableQRCodeLevel || 0
}).makeCode(p), r.html(qrcodebox))
} catch (t) {
r.html("".concat(i18n.__("二维码生成失败")))
}
}
"sequence" === t.tableTextType && r.html(rowIndex + 1)
}
var s = TableExcelHelper.getColumnStyler(t),
l;
s && (l = s(e[t.field], e, i, n), l) && Object.keys(l).forEach(function (t) {
r.css(t, l[t])
}), o.append(r)
}
}), TableExcelHelper.getRowStyler(n, i)),
a;
return r && (a = r(e, n), a) && Object.keys(a).forEach(function (t) {
o.css(t, a[t])
}), o
}, TableExcelHelper.createEmptyRowTarget = function (t, e) {
var t = TableExcelHelper.reconsitutionTableColumnTree(t),
n = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
");
return t.rowColumns.filter(function (t) {
return t.checked
}).forEach(function (t, e) {
var i = jquery__WEBPACK_IMPORTED_MODULE_60___default()("
");
t.field && i.attr("field", t.field), t.align && i.css("text-align", t.align), t.vAlign && i.css("vertical-align", t.vAlign), n.append(i)
}), e && e.options.tableBodyRowHeight && n.find("td:not([rowspan])").css("height", e.options.tableBodyRowHeight + "pt"), n
}, TableExcelHelper.getColumnsWidth = function (t, i) {
var n = {},
r = TableExcelHelper.allAutoWidth(t),
a = TableExcelHelper.allFixedWidth(t);
return t.rowColumns.filter(function (t) {
return t.checked
}).forEach(function (t) {
var e;
t.fixed ? n[t.id] = t.width : (e = t.width / r * (0 < (e = i - a) ? e : 0), n[t.id] = e)
}), n
}, TableExcelHelper.resizeTableCellWidth = function (t, e, i) {
var e = TableExcelHelper.reconsitutionTableColumnTree(e),
n = TableExcelHelper.getColumnsWidth(e, i);
t.find("thead tr td[haswidth]").map(function (t, e) {
var i = jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).attr("id"),
i = n[i];
jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).css("width", i + "pt")
})
}, TableExcelHelper.allAutoWidth = function (t) {
var e = 0,
i = {};
return t.rowColumns.filter(function (t) {
return t.checked
}).forEach(function (t) {
i[t.id] ? i[t.id] = 0 : i[t.id] = t.width, e += t.fixed ? 0 : i[t.id]
}), e
}, TableExcelHelper.allFixedWidth = function (t) {
var e = 0,
i = {};
return t.rowColumns.filter(function (t) {
return t.checked
}).forEach(function (t) {
i[t.id] ? i[t.id] = 0 : i[t.id] = t.width, e += t.fixed ? i[t.id] : 0
}), e
}, TableExcelHelper.reconsitutionTableColumnTree = function (t, e, i) {
for (var n = e || new _ReconsitutionTableColumns__WEBPACK_IMPORTED_MODULE_0__.a, r = n.colspan = 0; r < t.length; r++) ! function (e) {
n.totalLayer = e + 1, n[e] = t[e].columns, 0 == e && t[e].columns.forEach(function (t) {
0 == e && (n.colspan += t.colspan)
})
}(r);
return n.rowColumns = TableExcelHelper.getOrderdColumns(n), n
}, TableExcelHelper.syncTargetWidthToOption = function (t) {
t.forEach(function (t) {
t.columns.forEach(function (t) {
t.hasWidth && (t.width = t.targetWidth)
})
})
}, TableExcelHelper.getGroupFieldsFormatter = function (options, tablePrintElementType) {
var groupFieldsFormatter = void 0,
arr;
if (tablePrintElementType.groupFields && tablePrintElementType.groupFields.length && (arr = "string" == typeof tablePrintElementType.groupFields ? tablePrintElementType.groupFields : JSON.stringify(tablePrintElementType.groupFields), options.groupFieldsFormatter = "function(type,options,data){ return " + arr + " }"), tablePrintElementType.groupFieldsFormatter && (groupFieldsFormatter = tablePrintElementType.groupFieldsFormatter), options.groupFieldsFormatter) try {
var s = "groupFieldsFormatter=" + options.groupFieldsFormatter;
eval(s)
} catch (t) { }
return groupFieldsFormatter
}, TableExcelHelper.getGroupFormatter = function (options, tablePrintElementType) {
var groupFormatter = void 0;
if (tablePrintElementType.groupFormatter && (groupFormatter = tablePrintElementType.groupFormatter), options.groupFormatter) try {
var s = "groupFormatter=" + options.groupFormatter;
eval(s)
} catch (t) { }
return groupFormatter
}, TableExcelHelper.getGroupFooterFormatter = function (options, tablePrintElementType) {
var groupFooterFormatter = void 0;
if (tablePrintElementType.groupFooterFormatter && (groupFooterFormatter = tablePrintElementType.groupFooterFormatter), options.groupFooterFormatter) try {
var s = "groupFooterFormatter=" + options.groupFooterFormatter;
eval(s)
} catch (t) { }
return groupFooterFormatter
}, TableExcelHelper.getFooterFormatter = function (options, tablePrintElementType) {
var footerFormatter = void 0;
if (tablePrintElementType.footerFormatter && (footerFormatter = tablePrintElementType.footerFormatter), options.footerFormatter) try {
var s = "footerFormatter=" + options.footerFormatter;
eval(s)
} catch (t) { }
return footerFormatter
}, TableExcelHelper.getRowStyler = function (options, tablePrintElementType) {
var rowStyler = void 0;
if (tablePrintElementType.rowStyler && (rowStyler = tablePrintElementType.rowStyler), options.rowStyler) try {
var s = "rowStyler=" + options.rowStyler;
eval(s)
} catch (t) { }
return rowStyler
}, TableExcelHelper.getColumnTableSummaryFormatter = function (column) {
var tableSummaryFormatter = void 0;
if (column.tableSummaryFormatter && (tableSummaryFormatter = column.tableSummaryFormatter), column.tableSummaryFormatter) try {
var s = "tableSummaryFormatter=" + column.tableSummaryFormatter;
eval(s)
} catch (t) { }
return tableSummaryFormatter
}, TableExcelHelper.getColumnStyler = function (column) {
var styler = void 0;
if (column.styler && (styler = column.styler), column.styler2) try {
var s = "styler=" + column.styler2;
eval(s)
} catch (t) { }
return styler
}, TableExcelHelper.getHeaderStyler = function (column) {
var stylerHeader = void 0;
if (column.stylerHeader && (stylerHeader = column.stylerHeader), column.stylerHeader) try {
var s = "stylerHeader=" + column.stylerHeader;
eval(s)
} catch (t) { }
return stylerHeader
}, TableExcelHelper.getColumnRenderFormatter = function (column) {
var renderFormatter = void 0;
if (column.renderFormatter && (renderFormatter = column.renderFormatter), column.renderFormatter) try {
var s = "renderFormatter=" + column.renderFormatter;
eval(s)
} catch (t) { }
return renderFormatter
}, TableExcelHelper.getColumnFormatter = function (column) {
var formatter = void 0;
if (column.formatter && (formatter = column.formatter), column.formatter2) try {
var s = "formatter=" + column.formatter2;
eval(s)
} catch (t) { }
return formatter
}, TableExcelHelper.getOrderdColumns = function (t) {
for (var r = {}, e = 0; e < t.totalLayer; e++) ! function (n) {
r[n] = [], t[n].forEach(function (t, e) {
var i;
(i = r[n]).push.apply(i, Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(new Array(t.colspan).fill(Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)(Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)({}, t), {}, {
colspan: 1
}))))
})
}(e);
for (var i = 0; i < t.totalLayer; i++) ! function (n) {
r[n].forEach(function (t, e) {
for (var i = 1; i < t.rowspan; i++) r[n + i].splice(e, 0, Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)(Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)({}, t), {}, {
rowspan: 1
}))
})
}(i);
for (var n = [], a = 0; a < t.totalLayer; a++) ! function (i) {
i >= t.totalLayer - 1 ? r[i].forEach(function (t, e) {
t.field || (t.field = n[e])
}) : r[i].forEach(function (t, e) {
0 == i ? n.push(t.field || "") : t.field && (n[e] = t.field)
})
}(a);
return this.rowColumns = r[t.totalLayer - 1], r[t.totalLayer - 1]
}, TableExcelHelper
}()
}, function (t, e, i) {
i.d(e, "a", function () {
return n
});
r.prototype.isPositionLeftOrRight = function (t) {
return this.top <= t && this.top + this.height > t
};
var n = r;
function r(t) {
this.top = t.top, this.left = t.left, this.height = t.height, this.width = t.width, this.bottomInLastPaper = t.bottomInLastPaper, this.beginPrintPaperIndex = t.beginPrintPaperIndex, this.printTopInPaper = t.printTopInPaper, this.endPrintPaperIndex = t.endPrintPaperIndex
}
}, function (U, H, R) {
ln.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("line-height", e + "pt"), "line-height:" + e + "pt";
t[0].style.lineHeight = ""
}
return null
}, ln.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("字体行高"), '\n
\n
\n \n
\n
')), this.target
}, ln.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString())
}, ln.prototype.setValue = function (t) {
t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
}, ln.prototype.destroy = function () {
this.target.remove()
};
var z = ln,
O = (cn.prototype.createTarget = function (t) {
var i, e = void 0;
return (e = t ? t.getFontList() : e) ? (i = '
'))), this.target
}, Zi.prototype.getValue = function () {
return (this.isSelect ? this.target.find("select") : this.target.find("input")).val() || void 0
}, Zi.prototype.setValue = function (t) {
this.isSelect ? t && (this.target.find('option[value="' + t + '"]').length || this.target.find("select").prepend('"), this.target.find("select").val(t)) : this.target.find("input").val(t)
}, Zi.prototype.destroy = function () {
this.target.remove()
}, Zi),
dt = (Gi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("标题"), '\n
\n
\n \n
\n
')), this.target
}, Gi.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, Gi.prototype.setValue = function (t) {
this.target.find("textarea").val(t)
}, Gi.prototype.destroy = function () {
this.target.remove()
}, Gi),
ut = (Wi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("测试数据"), '\n
\n
\n \n
\n
')), this.target
}, Wi.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString()
}, Wi.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, Wi.prototype.destroy = function () {
this.target.remove()
}, Wi),
ft = (j.prototype.createTarget = function (t, e) {
var i = this;
return i.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("位置坐标"), '\n
\n
\n\n \n\n \n\n
\n\n
')), i.syncLock = e.coordinateSync || !1, i.createSyncLock(i.syncLock), i.target
}, j.prototype.createSyncLock = function (t) {
var e = this;
return e.lockTarget = e.syncLock ? jquery__WEBPACK_IMPORTED_MODULE_60___default()('')) : jquery__WEBPACK_IMPORTED_MODULE_60___default()('')), e.lockTarget.click(function () {
e.syncLock ? e.lockTarget.text("🔓").attr("title", "".concat(i18n.__("不同步"))) : e.lockTarget.text("🔗").attr("title", "".concat(i18n.__("同步"))), e.syncLock = !e.syncLock
}), e.target.find("input:first").after(e.lockTarget), e.target.find("input:first").change(function () {
e.syncLock && e.target.find("input:last").val(jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).val())
}), e.target.find("input:last").change(function () {
e.syncLock && e.target.find("input:first").val(jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).val())
}), e.lockTarget
}, j.prototype.css = function (t) {
var e;
if (t && t.length && this.target && (("block" == t.find(".resize-panel").css("display") || t[0].className.includes("table")) && this.el == t)) return e = this.getValue(), t.css("left", e.left + "pt").css("top", e.top + "pt");
return null
}, j.prototype.getValue = function () {
var t = {
coordinateSync: this.syncLock,
left: 0,
top: 0
};
return t.left = parseFloat(this.target.find("input:first").val() || 0), t.top = parseFloat(this.target.find("input:last").val() || 0), t
}, j.prototype.setValue = function (t, e) {
this.el = e.designTarget || e, this.target.find("input:first").val(t.left), this.target.find("input:last").val(t.top)
}, j.prototype.destroy = function () {
this.target.remove()
}, j),
ht = (P.prototype.createTarget = function (t, e) {
var i = this;
return i.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("宽高大小"), '\n
\n
\n\n \n\n \n\n
\n\n
')), i.syncLock = e.widthHeightSync || !1, i.createSyncLock(i.syncLock), i.target
}, P.prototype.createSyncLock = function (t) {
var e = this;
return e.lockTarget = e.syncLock ? jquery__WEBPACK_IMPORTED_MODULE_60___default()('')) : jquery__WEBPACK_IMPORTED_MODULE_60___default()('')), e.lockTarget.click(function () {
e.syncLock ? e.lockTarget.text("🔓").attr("title", "".concat(i18n.__("不同步"))) : e.lockTarget.text("🔗").attr("title", "".concat(i18n.__("同步"))), e.syncLock = !e.syncLock
}), e.target.find("input:first").after(e.lockTarget), e.target.find("input:first").change(function () {
e.syncLock && e.target.find("input:last").val(jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).val())
}), e.target.find("input:last").change(function () {
e.syncLock && e.target.find("input:first").val(jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).val())
}), e.lockTarget
}, P.prototype.css = function (t) {
var e;
if (t && t.length && this.target && (("block" == t.find(".resize-panel").css("display") || t[0].className.includes("table")) && this.el == t)) return e = this.getValue(), t.css("width", e.width + "pt").css("height", e.height + "pt");
return null
}, P.prototype.getValue = function () {
var t = {
widthHeightSync: this.syncLock,
width: 0,
height: 0
};
return t.width = parseFloat(this.target.find("input:first").val() || 0), t.height = parseFloat(this.target.find("input:last").val() || 0), t
}, P.prototype.setValue = function (t, e) {
this.el = e.designTarget || e, this.target.find("input:first").val(t.width), this.target.find("input:last").val(t.height)
}, P.prototype.destroy = function () {
this.target.remove()
}, P),
mt = (M.prototype.createTarget = function (t) {
this.el = t;
var e = void 0,
i = this;
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("图片地址"), '\n
\n
\n \n
\n
")), (e = t ? t.getOnImageChooseClick() : e) && this.target.find("button").click(function () {
e && e(i)
}), this.target
}, M.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString()
}, M.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, M.prototype.refresh = function (t, e, i) {
var n, r = this;
this.setValue(t), this.target.find("input").change(), this.el && e && ((n = new Image).src = t, n.complete ? r.updateEl(n.width, n.height, e, i) : n.onload = function () {
r.updateEl(n.width, n.height, e, i)
})
}, M.prototype.updateEl = function (t, e, i, n) {
var r, a, o;
i ? ((i || i.auto) && (e <= t ? i.width = !0 : i.height = !0), i.width ? (r = e / t, a = this.el.options.width, o = Math.floor(a * r * 10) / 10, this.el.options.height = o, this.el.designTarget.css("height", o + "pt")) : i.height ? (r = t / e, o = this.el.options.height, a = Math.floor(o * r * 10) / 10, this.el.options.width = a, this.el.designTarget.css("width", a + "pt")) : i.real && (a = hinnn.px.toPt(t), o = hinnn.px.toPt(e), this.el.options.width = a, this.el.options.height = o, this.el.designTarget.css("width", a + "pt"), this.el.designTarget.css("height", o + "pt")), this.el.designTarget.children(".resize-panel").trigger(jquery__WEBPACK_IMPORTED_MODULE_60___default.a.Event("click"))) : n && n(this.el, t, e)
}, M.prototype.destroy = function () {
this.target.remove()
}, M),
gt = (w.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.find("img").css("object-fit", e), "object-fit:" + e;
t.find("img")[0].style["object-fit"] = ""
}
return null
}, w.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("图片缩放"), '\n
\n
\n \n
\n
")), this.target, this.target
}, w.prototype.getValue = function () {
return this.target.find("select").val()
}, w.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, w.prototype.destroy = function () {
this.target.remove()
}, w),
vt = (x.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-color", e), "border-color:" + e;
t[0].style.borderColor = ""
}
return null
}, x.prototype.createTarget = function (t) {
t = ["hline", "vline", "rect", "oval"].includes(t.printElementType.type) ? "".concat(i18n.__("颜色")) : "".concat(i18n.__("边框颜色"));
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(t, '\n
\n
\n \n
\n
')), this.target
}, x.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString()
}, x.prototype.setValue = function (t) {
this.target.find("input").minicolors({
defaultValue: t || "",
theme: "bootstrap"
}), this.target.find("input").val(t)
}, x.prototype.destroy = function () {
this.target.remove()
}, x),
bt = (Li.prototype.createTarget = function () {
this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
')), this.target
}, Oi.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString()
}, Oi.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, Oi.prototype.destroy = function () {
this.target.remove()
}, Oi),
At = (zi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("显示页码"), '\n
\n
\n \n
\n
")), this.target
}, zi.prototype.getValue = function () {
if ("true" == this.target.find("select").val()) return !0
}, zi.prototype.setValue = function (t) {
this.target.find("select").val((null == t ? "" : t).toString())
}, zi.prototype.destroy = function () {
this.target.remove()
}, zi),
_t = (Ri.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("页码续排"), '\n
\n
\n \n
\n
")), this.target
}, Ri.prototype.getValue = function () {
return "true" == this.target.find("select").val()
}, Ri.prototype.setValue = function (t) {
this.target.find("select").val((null == t || t ? "true" : "reset").toString())
}, Ri.prototype.destroy = function () {
this.target.remove()
}, Ri),
yt = (y.prototype.css = function (t, e) {
return null
}, y.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("每行缩进"), '\n
\n
\n \n
\n
')), this.target
}, y.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString())
}, y.prototype.setValue = function (t) {
t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
}, y.prototype.destroy = function () {
this.target.remove()
}, y),
xt = (_.prototype.css = function (t, e) {
if (t && t.length) {
if (e && "none" == e) return t.addClass("alwaysHide");
t.removeClass("alwaysHide")
}
return null
}, _.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("显示规则"), '\n
\n
\n \n
\n
")), this.target
}, _.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, _.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, _.prototype.destroy = function () {
this.target.remove()
}, _),
wt = (A.prototype.css = function (t, e) {
if (t && t.length) {
if (e && "none" == e) return t.addClass("alwaysHide");
t.removeClass("alwaysHide")
}
return null
}, A.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("强制分页"), '\n
\n
\n \n
\n
")), this.target
}, A.prototype.getValue = function () {
if ("true" == this.target.find("select").val()) return !0
}, A.prototype.setValue = function (t) {
this.target.find("select").val((null == t ? "" : t).toString())
}, A.prototype.destroy = function () {
this.target.remove()
}, A),
Mt = (Hi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("打印规则"), '\n
\n
\n \n
\n
")), this.target
}, Hi.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, Hi.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, Hi.prototype.destroy = function () {
this.target.remove()
}, Hi),
Pt = (Ui.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("分页规则"), '\n
\n
\n \n
\n
")), this.target
}, Ui.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, Ui.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, Ui.prototype.destroy = function () {
this.target.remove()
}, Ui),
jt = (Ni.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("移除段落左侧空白"), '\n
\n
\n \n
\n
")), this.target
}, Ni.prototype.getValue = function () {
if ("false" == this.target.find("select").val()) return !1
}, Ni.prototype.setValue = function (t) {
this.target.find("select").val((null == t ? "" : t).toString())
}, Ni.prototype.destroy = function () {
this.target.remove()
}, Ni),
Et = (ki.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("首页页尾"), '\n
\n
\n \n
\n
')), this.target
}, ki.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString())
}, ki.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, ki.prototype.destroy = function () {
this.target.remove()
}, ki),
Tt = (Di.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("尾页页尾"), '\n
\n
\n \n
\n
')), this.target
}, Di.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString())
}, Di.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, Di.prototype.destroy = function () {
this.target.remove()
}, Di),
Ct = (Si.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("偶数页页尾"), '\n
\n
\n \n
\n
')), this.target
}, Si.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString())
}, Si.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, Si.prototype.destroy = function () {
this.target.remove()
}, Si),
Bt = (Bi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("奇数页页尾"), '\n
\n
\n \n
\n
')), this.target
}, Bi.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString())
}, Bi.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, Bi.prototype.destroy = function () {
this.target.remove()
}, Bi),
St = (Ci.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("位置固定"), '\n
\n
\n \n
\n
")), this.target
}, Ci.prototype.getValue = function () {
if ("true" == this.target.find("select").val()) return !0
}, Ci.prototype.setValue = function (t) {
this.target.find("select").val((null == t ? "" : t).toString())
}, Ci.prototype.destroy = function () {
this.target.remove()
}, Ci),
Dt = (Ti.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("拖动方向"), '\n
\n
\n \n
\n
")), this.target
}, Ti.prototype.getValue = function () {
return this.target.find("select").val() || void 0
}, Ti.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, Ti.prototype.destroy = function () {
this.target.remove()
}, Ti),
kt = (Ei.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("左偏移"), '\n
\n
\n \n
\n
')), this.target
}, Ei.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString())
}, Ei.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, Ei.prototype.destroy = function () {
this.target.remove()
}, Ei),
Nt = (ji.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("最低高度"), '\n
\n
\n \n
\n
')), this.target
}, ji.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString())
}, ji.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, ji.prototype.destroy = function () {
this.target.remove()
}, ji),
Ut = (Pi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("隐藏规则"), '\n
\n
\n \n
\n
")), this.target
}, Pi.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t
}, Pi.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, Pi.prototype.destroy = function () {
this.target.remove()
}, Pi),
Ht = (I.prototype.css = function (t, e) {
if (t.find("tbody tr").length) {
if ("border" == e || null == e) return t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-all");
"noBorder" == e ? t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-none") : "leftBorder" == e ? t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-left") : "rightBorder" == e ? t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-right") : "leftRightBorder" == e ? t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-lr") : "topBorder" == e ? t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-top") : "bottomBorder" == e ? t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-bottom") : "topBottomBorder" == e ? t.find("tbody tr").addClass("hiprint-printElement-tableTarget-border-tb") : t.find("tbody tr").removeClass()
}
return null
}, I.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("表体行边框"), '\n
\n
\n \n
\n
")), this.target
}, I.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, I.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, I.prototype.destroy = function () {
this.target.remove()
}, I),
Rt = (b.prototype.css = function (t, e) {
if (t && t.length) {
var i = t.find(".hiprint-printElement-content").parent(".hiprint-printElement");
if (i.length || (i = t), e) return i.css("transform", "rotate(" + e + "deg)"), i.css("-ms-transform", "rotate(" + e + "deg)"), i.css("-moz-transform", "rotate(" + e + "deg)"), i.css("-webkit-transform", "rotate(" + e + "deg)"), i.css("-o-transform", "rotate(" + e + "deg)"), "transform:rotate(" + e + "deg)";
i.length && (i[0].style.transform = "")
}
return null
}, b.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("旋转角度"), '\n
\n
\n \n
\n
')), this.target
}, b.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString())
}, b.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, b.prototype.destroy = function () {
this.target.remove()
}, b),
zt = (v.prototype.css = function (t, e) {
return t && t.length && e ? t.css("z-index", e) : null
}, v.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("元素层级"), '\n
\n
\n \n
\n
')), this.target
}, v.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseInt(t.toString())
}, v.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, v.prototype.destroy = function () {
this.target.remove()
}, v),
Ot = (Mi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("边框设置"), "\n
\n \n
")), this.target
}, Mi.prototype.getValue = function () { }, Mi.prototype.setValue = function (t) { }, Mi.prototype.destroy = function () {
this.target.remove()
}, Mi),
Lt = (g.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-top-style", e), "border-top:1px";
t[0].style.borderTopStyle = "", t[0].style.borderTopWidth = ""
}
return null
}, g.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("上边框"), '\n
\n
\n \n
\n
")), this.target
}, g.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t
}, g.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, g.prototype.destroy = function () {
this.target.remove()
}, g),
Wt = (m.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-left-style", e), "border-left:1px";
t[0].style.borderLeftStyle = "", t[0].style.borderLeftWidth = ""
}
return null
}, m.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("左边框"), '\n
\n
\n \n
\n
")), this.target
}, m.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t
}, m.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, m.prototype.destroy = function () {
this.target.remove()
}, m),
Gt = (h.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-right-style", e), "border-right:1px";
t[0].style.borderRightStyle = "", t[0].style.borderRightWidth = ""
}
return null
}, h.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("右边框"), '\n
\n
\n \n
\n
")), this.target
}, h.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t
}, h.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, h.prototype.destroy = function () {
this.target.remove()
}, h),
Zt = (f.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-bottom-style", e), "border-bottom-style:1px solid";
t[0].style.borderBottomStyle = "", t[0].style.borderBottomWidth = ""
}
return null
}, f.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("下边框"), '\n
\n
\n \n
\n
")), this.target
}, f.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t
}, f.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, f.prototype.destroy = function () {
this.target.remove()
}, f),
Ft = (u.prototype.css = function (t, e) {
t = t.find(".hiprint-printElement-content");
if (t && t.length) {
if (e) return t.css("padding-left", e + "pt"), "padding-left";
t[0].style.paddingLeft = ""
}
return null
}, u.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("左内边距"), '\n
\n
\n \n
\n
')), this.target
}, u.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString())
}, u.prototype.setValue = function (t) {
t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
}, u.prototype.destroy = function () {
this.target.remove()
}, u),
Yt = (d.prototype.css = function (t, e) {
t = t.find(".hiprint-printElement-content");
if (t && t.length) {
if (e) return t.css("padding-top", e + "pt"), "padding-top";
t[0].style.paddingTop = ""
}
return null
}, d.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("上内边距"), '\n
\n
\n \n
\n
')), this.target
}, d.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString())
}, d.prototype.setValue = function (t) {
t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
}, d.prototype.destroy = function () {
this.target.remove()
}, d),
Qt = (p.prototype.css = function (t, e) {
t = t.find(".hiprint-printElement-content");
if (t && t.length) {
if (e) return t.css("padding-right", e + "pt"), "padding-right";
t[0].style.paddingRight = ""
}
return null
}, p.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("右内边距"), '\n
\n
\n \n
\n
')), this.target
}, p.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString())
}, p.prototype.setValue = function (t) {
t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
}, p.prototype.destroy = function () {
this.target.remove()
}, p),
Jt = (l.prototype.css = function (t, e) {
t = t.find(".hiprint-printElement-content");
if (t && t.length) {
if (e) return t.css("padding-bottom", e + "pt"), "padding-bottom";
t[0].style.paddingBottom = ""
}
return null
}, l.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("下内边距"), '\n
\n
\n \n
\n
')), this.target
}, l.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString())
}, l.prototype.setValue = function (t) {
t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
}, l.prototype.destroy = function () {
this.target.remove()
}, l),
Vt = (c.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("border-style", e), "border-style:1px";
t[0].style.borderStyle = ""
}
return null
}, c.prototype.createTarget = function (t) {
t = ["hline", "vline", "rect", "oval"].includes(t.printElementType.type) ? "".concat(i18n.__("样式")) : "".concat(i18n.__("边框样式"));
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(t, '\n
\n
\n \n
\n
")), this.target
}, c.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t
}, c.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, c.prototype.destroy = function () {
this.target.remove()
}, c),
Kt = (s.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("background-color", e), "background-color:" + e;
t[0].style.backgroundColor = ""
}
return null
}, s.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("背景颜色"), '\n
\n
\n \n
\n
')), this.target
}, s.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString()
}, s.prototype.setValue = function (t) {
this.target.find("input").minicolors({
defaultValue: t || "",
theme: "bootstrap"
}), this.target.find("input").val(t)
}, s.prototype.destroy = function () {
this.target.remove()
}, s),
qt = (wi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("纸张方向(仅自定义纸质有效)"), '\n
\n
\n \n
\n
")), this.target
}, wi.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString())
}, wi.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, wi.prototype.destroy = function () {
this.target.remove()
}, wi),
Xt = (o.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("上下对齐"), '\n
\n
\n \n
\n
")), this.target
}, o.prototype.css = function (t, e) {
return t && t.length && (t.removeClass("hiprint-text-content-middle"), t.removeClass("hiprint-text-content-bottom"), e) ? ("middle" === e && t.addClass("hiprint-text-content-middle"), "bottom" === e && t.addClass("hiprint-text-content-bottom"), "") : null
}, o.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, o.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, o.prototype.destroy = function () {
this.target.remove()
}, o),
$t = (a.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("文本换行"), '\n
\n
\n \n
\n
")), this.target
}, a.prototype.css = function (t, e) {
return t && t.length && (t.removeClass("hiprint-text-content-wrap"), t.find(".hiprint-printElement-text-content").removeClass("hiprint-text-content-wrap-nowrap"), t.find(".hiprint-printElement-text-content").removeClass("hiprint-text-content-wrap-clip"), t.find(".hiprint-printElement-text-content").removeClass("hiprint-text-content-wrap-ellipsis"), e) ? (t.addClass("hiprint-text-content-wrap"), t.find(".hiprint-printElement-text-content").addClass("hiprint-text-content-wrap-" + e), "") : null
}, a.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, a.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, a.prototype.destroy = function () {
this.target.remove()
}, a),
te = R(5),
ee = (r.prototype.createTarget = function () {
return jquery__WEBPACK_IMPORTED_MODULE_60___default()('').appendTo("body"), this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n
\n
\n
'), this.target
}, r.prototype.getValue = function () {
return this.buildData()
}, r.prototype.setValue = function (t, e, i) {
var n = this,
r = this,
e = (this.value = t, this.options = e, (this.printElementType = i).columns[0].filter(function (e) {
return 0 == t[0].columns.filter(function (t) {
return e.columnId == t.columnId
}).length
}).map(function (t) {
t = new te.a(t);
return t.checked = !1, t
}));
this.allColumns = t[0].columns.concat(e), t && 1 == t.length && (this.target.find("ul").html(this.allColumns.map(function (t, e) {
return '
\n ' + (t.checked ? '' : '') + '\n
\n \n
\n
' + (t.title || t.descTitle || "") + "
"
}).join("")), this.target.find("input").change(function (t) {
var e = t.target.checked,
i = t.target.attributes["column-id"].nodeValue || "",
t = n.allColumns.findIndex(function (t) {
return t.field == i || t.id == i
});
0 <= t && (n.allColumns[t].checked = e), n.submit()
}), this.printElementType.columnDisplayIndexEditable) && this.target.find("li").hidraggable({
revert: !0,
handle: ".column-title",
moveUnit: "pt",
deltaX: 0,
deltaY: 0
}).hidroppable({
onDragOver: function (t, e) {
jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).css("border-top-color", "red")
},
onDragLeave: function (t, e) {
jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).css("border-top-color", "")
},
onDrop: function (t, e) {
jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).insertBefore(this), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).css("border-top-color", ""), r.submit()
}
})
}, r.prototype.buildData = function () {
var n = this,
r = [];
return 1 < n.options.columns.length || (n.printElementType.makeColumnObj(n.allColumns), this.target.find("input").map(function (t, e) {
var i, e = jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).attr("column-id"),
e = n.printElementType.getColumnByColumnId(e);
e && ((i = new te.a(e)).checked = e.checked, r.push(i))
}), this.value[0].columns = r), this.value
}, r.prototype.destroy = function () {
this.target.remove()
}, r),
ie = (xi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("打印类型"), '\n
\n
\n \n
\n
")), this.target
}, xi.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t
}, xi.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, xi.prototype.destroy = function () {
this.target.remove()
}, xi),
ne = (yi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("字段类型"), '\n
\n
\n \n
\n
")), this.target
}, yi.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t
}, yi.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, yi.prototype.destroy = function () {
this.target.remove()
}, yi),
re = (_i.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("条形码格式"), '\n
\n
\n \n
\n
')), this.target
}, _i.prototype.getValue = function () {
return this.target.find("select").val() || void 0
}, _i.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, _i.prototype.destroy = function () {
this.target.remove()
}, _i),
ae = (Ai.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("二维码容错率"), '\n
\n
\n \n
\n
')), this.target
}, Ai.prototype.getValue = function () {
var t = this.target.find("select").val();
return parseInt(t || 0)
}, Ai.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, Ai.prototype.destroy = function () {
this.target.remove()
}, Ai),
oe = (Ii.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("单元格高度"), '\n
\n
\n \n
\n
')), this.target
}, Ii.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString()
}, Ii.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, Ii.prototype.destroy = function () {
this.target.remove()
}, Ii),
se = (bi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'.concat(i18n.__("底部聚合标题"), '
")), this.target
}, bi.prototype.getValue = function () {
return !("false" == this.target.find("select").val())
}, bi.prototype.setValue = function (t) {
this.target.find("select").val((null == t ? "" : t).toString())
}, bi.prototype.destroy = function () {
this.target.remove()
}, bi),
ce = (vi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("底部聚合文本"), '\n
\n
\n \n
\n
')), this.target
}, vi.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString()
}, vi.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, vi.prototype.destroy = function () {
this.target.remove()
}, vi),
le = (gi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("底部聚合合并列数"), '\n
\n
\n \n
\n
')), this.target
}, gi.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return t.toString()
}, gi.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, gi.prototype.destroy = function () {
this.target.remove()
}, gi),
pe = (mi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("底部聚合类型左右对齐"), '\n
\n
\n \n
\n
")), this.target
}, mi.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, mi.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, mi.prototype.destroy = function () {
this.target.remove()
}, mi),
de = (hi.prototype.createTarget = function () {
var e = [{
t: "".concat(i18n.__("整数")),
v: "0"
}],
i = ([1, 2, 3, 4, 5, 6].forEach(function (t) {
e.push({
t: i18n.__n("保留%s位", t),
v: "" + t
})
}), '\n "));
return e.forEach(function (t) {
i += '\n "
}), this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("底部聚合小数"), '\n
\n
\n \n
\n
')), this.target.find(".auto-submit").append(jquery__WEBPACK_IMPORTED_MODULE_60___default()(i)), this.target
}, hi.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, hi.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, hi.prototype.destroy = function () {
this.target.remove()
}, hi),
ue = (fi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("底部聚合格式化函数"), '\n
\n
\n \n
\n
')), this.target
}, fi.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, fi.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, fi.prototype.destroy = function () {
this.target.remove()
}, fi),
fe = (ui.prototype.createTarget = function () {
var e = '\n");
return [{
t: "「小写」十点八",
v: "0"
}, {
t: "「小写」一十点八",
v: "1"
}, {
t: "「大写」拾点捌",
v: "2"
}, {
t: "「大写」壹拾点捌",
v: "3"
}, {
t: "「金额」人民币拾元捌角",
v: "4"
}, {
t: "「金额」人民币壹拾元捌角",
v: "5"
}, {
t: "「金额」人民币壹拾元捌角零分",
v: "6"
}, {
t: "「金额」壹拾元捌角零分",
v: "7"
}].forEach(function (t) {
e += "\n")
}), this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n'.concat(i18n.__("转大小写"), '\n
\n
\n\n
\n
')), this.target.find(".auto-submit").append(jquery__WEBPACK_IMPORTED_MODULE_60___default()(e)), this.target
}, ui.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, ui.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, ui.prototype.destroy = function () {
this.target.remove()
}, ui),
he = (di.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'.concat(i18n.__("底部聚合类型"), '
")), this.target
}, di.prototype.getValue = function () {
return this.target.find("select").val()
}, di.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, di.prototype.destroy = function () {
this.target.remove()
}, di),
me = (pi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("顶部偏移"), '\n
\n
\n \n
\n
')), this.target
}, pi.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseFloat(t.toString())
}, pi.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, pi.prototype.destroy = function () {
this.target.remove()
}, pi),
ge = (li.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("一行多组"), '\n
\n
\n \n
\n
")), this.target
}, li.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString())
}, li.prototype.setValue = function (t) {
t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
}, li.prototype.destroy = function () {
this.target.remove()
}, li),
ve = (n.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("一行多组间隔"), '\n
\n
\n \n
\n
')), this.target
}, n.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString())
}, n.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.find(".table-grid-row").css("margin-left", "-" + e + "pt").css("margin-right", "-" + e + "pt"), t.find(".tableGridColumnsGutterRow").css("padding-left", e + "pt").css("padding-right", e + "pt"), null;
t.find(".table-grid-row").map(function (t, e) {
e.style.marginLeft = "", e.style.marginRight = ""
}), t.find(".tableGridColumnsGutterRow").map(function (t, e) {
e.style.paddingLeft = "", e.style.paddingRight = ""
})
}
return null
}, n.prototype.setValue = function (t) {
t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
}, n.prototype.destroy = function () {
this.target.remove()
}, n),
be = (ci.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("表格头显示"), '\n
\n
\n \n
\n
")), this.target
}, ci.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, ci.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, ci.prototype.destroy = function () {
this.target.remove()
}, ci),
Ie = (i.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("padding-left", e + "pt"), "padding-left";
t[0].style.paddingLeft = ""
}
return null
}, i.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("左内边距"), '\n
\n
\n \n
\n
')), this.target
}, i.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString())
}, i.prototype.setValue = function (t) {
t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
}, i.prototype.destroy = function () {
this.target.remove()
}, i),
Ae = (e.prototype.css = function (t, e) {
if (t && t.length) {
if (e) return t.css("padding-right", e + "pt"), "padding-right";
t[0].style.paddingRight = ""
}
return null
}, e.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("右内边距"), '\n
\n
\n \n
\n
')), this.target
}, e.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return parseFloat(t.toString())
}, e.prototype.setValue = function (t) {
t && !this.target.find('option[value="' + t + '"]').length && this.target.find("select").prepend('"), this.target.find("select").val(t)
}, e.prototype.destroy = function () {
this.target.remove()
}, e),
_e = (t.prototype.createTarget = function () {
var e = this;
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('\n
\n
\n
\n '.concat(i18n.__("数据类型"), '\n
\n
\n \n
\n
\n
\n
\n ').concat(i18n.__("格式"), '\n
\n
\n \n \n
\n
\n
\n')), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.target.find(".hiprint-option-item-datatype")).change(function () {
var t = jquery__WEBPACK_IMPORTED_MODULE_60___default()(e.target.find(".hiprint-option-item-datatype")).val();
e.loadFormatSelectByDataType(t), e.submit(e.getValue())
}), this.target
}, t.prototype.getValue = function () {
var t = this.target.find(".hiprint-option-item-datatype").val();
return t ? {
dataType: t,
format: this.target.find(".hiprint-option-item-datatype-format").val() || void 0
} : {
dataType: void 0,
format: void 0
}
}, t.prototype.setValue = function (t, e) {
this.target.find(".hiprint-option-item-datatype").val(e.dataType || ""), this.loadFormatSelectByDataType(e.dataType), this.target.find(".hiprint-option-item-datatype-format").val(e.format || "")
}, t.prototype.destroy = function () {
this.target.remove()
}, t.prototype.loadFormatSelectByDataType = function (t) {
"boolean" === t ? (this.target.find(".hiprint-option-item-datatype-select-format").removeClass("hiprint-option-item-datatype-format").hide().val(""), this.target.find(".hiprint-option-item-datatype-input-format").addClass("hiprint-option-item-datatype-format").show()) : "datetime" === t ? (this.target.find(".hiprint-option-item-datatype-select-format").addClass("hiprint-option-item-datatype-format").show(), this.target.find(".hiprint-option-item-datatype-input-format").removeClass("hiprint-option-item-datatype-format").hide().val(""), this.target.find(".hiprint-option-item-datatype-select-format").html('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'))) : (this.target.find(".hiprint-option-item-datatype-select-format").show(), this.target.find(".hiprint-option-item-datatype-input-format").hide().val(""), this.target.find(".hiprint-option-item-datatype-format").html('\n \n")))
}, t),
ye = (si.prototype.createTarget = function () {
var t = '
\n
\n '.concat(i18n.__("格式化函数"), '\n
\n
\n \n
\n
');
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()(t), this.target
}, si.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, si.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, si.prototype.destroy = function () {
this.target.remove()
}, si),
xe = (oi.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("样式函数"), '\n
\n
\n \n
\n
')), this.target
}, oi.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, oi.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, oi.prototype.destroy = function () {
this.target.remove()
}, oi),
we = (ai.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("行/列合并函数"), '\n
\n
\n \n
\n
')), this.target
}, ai.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, ai.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, ai.prototype.destroy = function () {
this.target.remove()
}, ai),
Me = (ri.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("跨页合并是否清除"), '\n
\n
\n \n
\n
")), this.target
}, ri.prototype.getValue = function () {
if ("true" == this.target.find("select").val()) return !0
}, ri.prototype.setValue = function (t) {
this.target.find("select").val((null == t ? "" : t).toString())
}, ri.prototype.destroy = function () {
this.target.remove()
}, ri),
Pe = (ni.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("表格脚函数"), '\n
\n
\n \n
\n
')), this.target
}, ni.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, ni.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, ni.prototype.destroy = function () {
this.target.remove()
}, ni),
je = (ii.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("分组字段函数"), '\n
\n
\n \n
\n
')), this.target
}, ii.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, ii.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, ii.prototype.destroy = function () {
this.target.remove()
}, ii),
Ee = (ei.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("分组头格式化函数"), '\n
\n
\n \n
\n
')), this.target
}, ei.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, ei.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, ei.prototype.destroy = function () {
this.target.remove()
}, ei),
Te = (ti.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("分组脚格式化函数"), '\n
\n
\n \n
\n
')), this.target
}, ti.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, ti.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, ti.prototype.destroy = function () {
this.target.remove()
}, ti),
Ce = ($e.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("多组表格脚函数"), '\n
\n
\n \n
\n
')), this.target
}, $e.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, $e.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, $e.prototype.destroy = function () {
this.target.remove()
}, $e),
Be = (Xe.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("行样式函数"), '\n
\n
\n \n
\n
')), this.target
}, Xe.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, Xe.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, Xe.prototype.destroy = function () {
this.target.remove()
}, Xe),
Se = (qe.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("单元格左右对齐"), '\n
\n
\n \n
\n
")), this.target
}, qe.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, qe.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, qe.prototype.destroy = function () {
this.target.remove()
}, qe),
De = (Ke.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("单元格上下对齐"), '\n
\n
\n \n
\n
")), this.target
}, Ke.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, Ke.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, Ke.prototype.destroy = function () {
this.target.remove()
}, Ke),
ke = (Ve.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("表格头单元格左右对齐"), '\n
\n
\n \n
\n
")), this.target
}, Ve.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, Ve.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, Ve.prototype.destroy = function () {
this.target.remove()
}, Ve),
Ne = (Je.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("单元格样式函数"), '\n
\n
\n \n
\n
')), this.target
}, Je.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, Je.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, Je.prototype.destroy = function () {
this.target.remove()
}, Je),
Ue = (Qe.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("表格头样式函数"), '\n
\n
\n \n
\n
')), this.target
}, Qe.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, Qe.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, Qe.prototype.destroy = function () {
this.target.remove()
}, Qe),
He = (Ye.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("单元格格式化函数"), '\n
\n
\n \n
\n
')), this.target
}, Ye.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, Ye.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, Ye.prototype.destroy = function () {
this.target.remove()
}, Ye),
Re = (Fe.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("单元格渲染函数"), '\n
\n
\n \n
\n
')), this.target
}, Fe.prototype.getValue = function () {
var t = this.target.find("textarea").val();
if (t) return t
}, Fe.prototype.setValue = function (t) {
this.target.find("textarea").val(t ? t.toString() : null)
}, Fe.prototype.destroy = function () {
this.target.remove()
}, Fe),
ze = (Ze.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("自动补全"), '\n
\n
\n \n
\n
")), this.target
}, Ze.prototype.getValue = function () {
if ("true" == this.target.find("select").val()) return !0
}, Ze.prototype.setValue = function (t) {
this.target.find("select").val((null == t ? "" : t).toString())
}, Ze.prototype.destroy = function () {
this.target.remove()
}, Ze),
Oe = (Ge.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("每页最大行数"), '\n
\n
\n \n
\n
')), this.target
}, Ge.prototype.getValue = function () {
var t = this.target.find("input").val();
if (t) return parseInt(t.toString())
}, Ge.prototype.setValue = function (t) {
this.target.find("input").val(t)
}, Ge.prototype.destroy = function () {
this.target.remove()
}, Ge),
Le = (We.prototype.createTarget = function () {
return this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
\n
\n '.concat(i18n.__("表格脚显示"), '\n
\n
\n \n
\n
")), this.target
}, We.prototype.getValue = function () {
var t = this.target.find("select").val();
if (t) return t.toString()
}, We.prototype.setValue = function (t) {
this.target.find("select").val(t)
}, We.prototype.destroy = function () {
this.target.remove()
}, We);
function We() {
this.name = "tableFooterRepeat"
}
function Ge() {
this.name = "maxRows"
}
function Ze() {
this.name = "autoCompletion"
}
function Fe() {
this.name = "renderFormatter"
}
function Ye() {
this.name = "formatter2"
}
function Qe() {
this.name = "stylerHeader"
}
function Je() {
this.name = "styler2"
}
function Ve() {
this.name = "halign"
}
function Ke() {
this.name = "vAlign"
}
function qe() {
this.name = "align"
}
function Xe() {
this.name = "rowStyler"
}
function $e() {
this.name = "gridColumnsFooterFormatter"
}
function ti() {
this.name = "groupFooterFormatter"
}
function ei() {
this.name = "groupFormatter"
}
function ii() {
this.name = "groupFieldsFormatter"
}
function ni() {
this.name = "footerFormatter"
}
function ri() {
this.name = "rowsColumnsMergeClean"
}
function ai() {
this.name = "rowsColumnsMerge"
}
function oi() {
this.name = "styler"
}
function si() {
this.name = "formatter"
}
function t() {
this.name = "dataType"
}
function e() {
this.name = "paddingRight"
}
function i() {
this.name = "paddingLeft"
}
function ci() {
this.name = "tableHeaderRepeat"
}
function n() {
this.name = "gridColumnsGutter"
}
function li() {
this.name = "gridColumns"
}
function pi() {
this.name = "topOffset"
}
function di() {
this.name = "tableSummary"
}
function ui() {
this.name = "upperCase"
}
function fi() {
this.name = "tableSummaryFormatter"
}
function hi() {
this.name = "tableSummaryNumFormat"
}
function mi() {
this.name = "tableSummaryAlign"
}
function gi() {
this.name = "tableSummaryColspan"
}
function vi() {
this.name = "tableSummaryText"
}
function bi() {
this.name = "tableSummaryTitle"
}
function Ii() {
this.name = "tableColumnHeight"
}
function Ai() {
this.name = "tableQRCodeLevel"
}
function _i() {
this.name = "tableBarcodeMode"
}
function yi() {
this.name = "tableTextType"
}
function xi() {
this.name = "textType"
}
function r() {
this.name = "columns"
}
function a() {
this.name = "textContentWrap"
}
function o() {
this.name = "textContentVerticalAlign"
}
function wi() {
this.name = "orient"
}
function s() {
this.name = "backgroundColor"
}
function c() {
this.name = "borderStyle"
}
function l() {
this.name = "contentPaddingBottom"
}
function p() {
this.name = "contentPaddingRight"
}
function d() {
this.name = "contentPaddingTop"
}
function u() {
this.name = "contentPaddingLeft"
}
function f() {
this.name = "borderBottom"
}
function h() {
this.name = "borderRight"
}
function m() {
this.name = "borderLeft"
}
function g() {
this.name = "borderTop"
}
function Mi() {
this.name = "optionsGroup"
}
function v() {
this.name = "zIndex"
}
function b() {
this.name = "transform"
}
function I() {
this.name = "tableBodyRowBorder"
}
function Pi() {
this.name = "unShowInPage"
}
function ji() {
this.name = "lHeight"
}
function Ei() {
this.name = "leftOffset"
}
function Ti() {
this.name = "axis"
}
function Ci() {
this.name = "fixed"
}
function Bi() {
this.name = "oddPaperFooter"
}
function Si() {
this.name = "evenPaperFooter"
}
function Di() {
this.name = "lastPaperFooter"
}
function ki() {
this.name = "firstPaperFooter"
}
function Ni() {
this.name = "leftSpaceRemoved"
}
function Ui() {
this.name = "panelPageRule"
}
function Hi() {
this.name = "panelPaperRule"
}
function A() {
this.name = "pageBreak"
}
function _() {
this.name = "showInPage"
}
function y() {
this.name = "longTextIndent"
}
function Ri() {
this.name = "paperNumberContinue"
}
function zi() {
this.name = "paperNumberDisabled"
}
function Oi() {
this.name = "paperNumberFormat"
}
function Li() {
this.name = "watermarkOptions"
}
function x() {
this.name = "borderColor"
}
function w() {
this.name = "fit"
}
function M() {
this.name = "src"
}
function P() {
this.name = "widthHeight"
}
function j() {
this.name = "coordinate"
}
function Wi() {
this.name = "testData"
}
function Gi() {
this.name = "title"
}
function Zi() {
this.name = "field"
}
function E() {
this.name = "textDecoration"
}
function T() {
this.name = "color"
}
function Fi() {
this.name = "qrCodeLevel"
}
function Yi() {
this.name = "qrcodeType"
}
function Qi() {
this.name = "barcodeType"
}
function Ji() {
this.name = "barcodeMode"
}
function C() {
this.name = "borderWidth"
}
function B() {
this.name = "tableHeaderBackground"
}
function S() {
this.name = "tableBodyRowHeight"
}
function D() {
this.name = "tableBodyCellBorder"
}
function k() {
this.name = "tableHeaderFontWeight"
}
function Vi() {
this.name = "tableHeaderFontSize"
}
function Ki() {
this.name = "tableHeaderRowHeight"
}
function qi() {
this.name = "tableFooterCellBorder"
}
function Xi() {
this.name = "tableFooterBorder"
}
function $i() {
this.name = "tableHeaderCellBorder"
}
function tn() {
this.name = "tableHeaderBorder"
}
function en() {
this.name = "tableBorder"
}
function nn() {
this.name = "hideTitle"
}
function rn() {
this.name = "textAlign"
}
function an() {
this.name = "letterSpacing"
}
function on() {
this.name = "fontWeight"
}
function sn() {
this.name = "fontSize"
}
function cn() {
this.name = "fontFamily"
}
function ln() {
this.name = "lineHeight"
}
R.d(H, "a", function () {
return pn
});
N.init = function () {
N.printElementOptionItems || (N.printElementOptionItems = {}, N._printElementOptionItems.forEach(function (t) {
N.printElementOptionItems[t.name] = t
}))
}, N.registerItem = function (t) {
if (!t.name) throw new Error("styleItem must have name");
N.init(), N.printElementOptionItems[t.name] = t
}, N.getItem = function (t) {
return N.init(), N.printElementOptionItems[t]
}, N._printElementOptionItems = [new O, new L, new W, new G, new z, new Z, new F, new ie, new Y, new Q, new J, new q, new X, new $, new tt, new V, new K, new et, new it, new nt, new rt, new st, new ct, new lt, new pt, new dt, new ut, new ft, new ht, new mt, new gt, new vt, new It, new At, new _t, new bt, new yt, new xt, new wt, new Mt, new Pt, new jt, new Et, new Tt, new Ct, new Bt, new St, new Dt, new me, new kt, new Nt, new Ut, new Ht, new Rt, new zt, new Ot, new Lt, new Wt, new Gt, new Zt, new Yt, new Ft, new Qt, new Jt, new Vt, new Kt, new qt, new Xt, new $t, new ee, new ge, new ve, new be, new Ie, new Ae, new _e, new ye, new xe, new Pe, new we, new Me, new je, new Ee, new Te, new Ce, new Be, new Se, new ke, new De, new Ne, new Ue, new Re, new He, new ze, new Oe, new Le, new oe, new re, new ae, new ne, new se, new ce, new le, new he, new pe, new de, new ue, new fe, new at, new ot];
var pn = N;
function N() { }
}, function (t, e, i) {
i.d(e, "a", function () {
return r
}), i.d(e, "b", function () {
return a
});
var n = i(14),
r = (c.prototype.clear = function () {
this.tableTatget.find("td").removeClass("selected")
}, c.prototype.setSingleSelect = function (t) {
this.startCell = t, this.selectedCells = []
}, c.prototype.getSingleSelect = function () {
if (this.selectedCells.length) {
if (1 == this.selectedCells.length) return 1 == this.selectedCells[0].length ? this.selectedCells[0][0] : void 0;
if (1 < this.selectedCells.length) return
}
return this.startCell
}, c.prototype.singleSelectByXY = function (t, e) {
t = this.getCellByXY(t, e);
t && (this.clear(), t) && (t.cell.select(), this.startCell = t, this.selectedCells = [])
}, c.prototype.multipleSelectByXY = function (t, e) {
this.clear();
var i = [];
this.startCell && (t = this.getCellByXY(t, e)) && (e = n.a.mergeRect(this.startCell.cell.getTableRect(), t.cell.getTableRect()), this.selectByRect(new o(e), i)), this.selectedCells = i
}, c.prototype.selectByRect = function (n, r) {
this.rows.forEach(function (t, e) {
var i = [];
t.columns.forEach(function (t) {
t.isInRect(n) && (i.push(new s(e, t)), t.select())
}), i.length && r.push(i)
}), n.changed && (n.changed = !1, r.splice(0, r.length), this.selectByRect(n, r))
}, c.prototype.getSelectedCells = function () {
return this.selectedCells
}, c.prototype.getCellByXY = function (i, n) {
var r;
return this.rows.forEach(function (t, e) {
t = (t.columns || []).filter(function (t) {
return t.checked
}).filter(function (t) {
return t.isXYinCell(i, n)
});
t.length && (r = new s(e, t[0]))
}), r
}, c),
a = function (t) {
this.x = t.x, this.y = t.y, this.height = t.height, this.width = t.width
},
o = function (t) {
this.rect = t
},
s = function (t, e) {
this.rowIndex = t, this.cell = e
};
function c(t, e) {
this.selectedCells = [], this.rows = t, this.tableTatget = e
}
}, function (t, e, i) {
i.d(e, "a", function () {
return n
});
r.createId = function () {
return this.id += 1, this.id
}, r.id = 1;
var n = r;
function r() { }
}, function (t, e, i) {
i.d(e, "a", function () {
return s
});
var n, r, a, o = i(5),
e = i(13),
s = (n = function (t, e) {
return (n = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
}, r = e.a, n(a = c, i = r), a.prototype = null === i ? Object.create(i) : (l.prototype = i.prototype, new l), c.prototype.getPrintElementOptionEntity = function () {
var e = [],
t = this.allColumns ? this.allColumns.filter(function (t) {
return !t.checked
}) : [];
return [].concat(Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(this.columns), Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(t)).forEach(function (t) {
e.push(t.getEntity())
}), e
}, c);
function c(t) {
var e = r.call(this) || this;
return e.columns = [], t && t.constructor === Array ? (t || []).forEach(function (t) {
e.columns.push(new o.a(t))
}) : t.columns && (t.columns || []).forEach(function (t) {
e.columns.push(new o.a(t))
}), e
}
function l() {
this.constructor = a
}
}, function (t, e, i) {
i.d(e, "a", function () {
return a
});
var n = i(11),
r = i(5),
a = (o.prototype.init = function (t, e, i) {
this.isHead = i, this.target = e || jquery__WEBPACK_IMPORTED_MODULE_60___default()("
"), this.tableOptions = t, this.allColumns = this.columns || [], this.initCells((this.columns || []).filter(function (t) {
return t.checked
}))
}, o.prototype.getTarget = function () {
return this.target
}, o.prototype.initCells = function (t) {
var n = this;
t ? (this.columns = t).forEach(function (t, e) {
t.init(n.target.find("td:eq(" + e + ")"), n.tableOptions, n.id, n.isHead)
}) : (this.columns = [], this.target.find("td").map(function (t, e) {
var i = new r.a;
i.init(jquery__WEBPACK_IMPORTED_MODULE_60___default()(e), n.tableOptions, n.id, n.isHead), n.columns.push(i)
}))
}, o.prototype.removeCell = function (t) {
t = this.columns.indexOf(t);
this.columns[t].getTarget().remove(), this.columns.splice(t, 1)
}, o.prototype.createTableCell = function (t, e) {
var i = new r.a;
return i.init(jquery__WEBPACK_IMPORTED_MODULE_60___default()("
"), this.tableOptions, this.id, this.isHead), 1 < t && (i.getTarget().attr("rowspan", t), i.rowspan = t), 1 < e && (i.getTarget().attr("colspan", e), i.colspan = e), i
}, o.prototype.insertToTargetCellLeft = function (t, e) {
var i = this.columns.indexOf(t);
t.getTarget().before(e.getTarget()), this.columns.splice(i, 0, e)
}, o.prototype.insertToTargetCellRight = function (t, e) {
t = this.columns.indexOf(t);
this.columns[t].getTarget().after(e.getTarget()), this.columns.splice(t + 1, 0, e)
}, o.prototype.insertCellToFirst = function (t) {
this.target.prepend(t.getTarget()), this.columns.splice(0, 0, t)
}, o.prototype.insertCellToLast = function (t) {
this.columns.push(t), this.target.append(t.getTarget())
}, o.prototype.getPrintElementOptionEntity = function () {
var e = [];
return [].concat(Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(this.columns), Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__.a)(this.allColumns.filter(function (t) {
return !t.checked
}))).forEach(function (t) {
e.push(t.getEntity())
}), e
}, o);
function o() {
this.id = n.a.createId()
}
}, function (t, e, i) {
i.d(e, "a", function () {
return n
});
var r = i(10),
n = (a.mergeRect = function (t, e) {
var i = Math.min(t.x, e.x),
n = Math.min(t.y, e.y);
return new r.b({
x: i,
y: n,
height: Math.max(t.y + t.height, e.y + e.height) - n,
width: Math.max(t.x + t.width, e.x + e.width) - i
})
}, a.Rect = function (t, e, i, n) {
return {
minX: t < i ? t : i,
minY: e < n ? e : n,
maxX: t < i ? i : t,
maxY: e < n ? n : e
}
}, a);
function a() { }
}, function (module, __webpack_exports__, __webpack_require__) {
__webpack_require__.d(__webpack_exports__, "a", function () {
return TablePrintElement
});
var _BasePrintElement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4),
_HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1),
_dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6),
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0),
_PrintReferenceElement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8),
_option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18),
_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7),
_hitable_HiTale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(16),
_table_GridColumnsStructure__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(20),
_HiPrintlib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2),
__extends = (_extendStatics = function (t, e) {
return (_extendStatics = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
}, function (t, e) {
function i() {
this.constructor = t
}
_extendStatics(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}),
_extendStatics, TablePrintElement = function (_super) {
function TablePrintElement(t, e) {
t = _super.call(this, t) || this;
return t.gridColumnsFooterCss = "hiprint-gridColumnsFooter", t.tableGridRowCss = "table-grid-row", t.options = new _option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__.a(e, t.printElementType), t.options.setDefault(new _option_TablePrintElementOption__WEBPACK_IMPORTED_MODULE_5__.a(_HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.table.default).getPrintElementOptionEntity()), t
}
return __extends(TablePrintElement, _super), TablePrintElement.prototype.getColumns = function () {
return this.options.columns
}, TablePrintElement.prototype.getColumnByColumnId = function (t) {
return this.options.getColumnByColumnId(t)
}, TablePrintElement.prototype.updateDesignViewFromOptions = function () {
var t, e;
this.designTarget && (t = this.designTarget.find(".hiprint-printElement-table-content"), e = this.getHtml(this.designPaper), t.html(""), t.append(e[0].target.find(".table-grid-row")), this.printElementType.editable && this.setHitable(), this.setColumnsOptions(), this.css(this.designTarget, this.getData()))
}, TablePrintElement.prototype.css = function (t, e) {
if ((this.getField() || !this.options.content) && !this.printElementType.formatter) return _super.prototype.css.call(this, t, e)
}, TablePrintElement.prototype.getDesignTarget = function (t) {
return this.designTarget = this.getHtml(t)[0].target, this.css(this.designTarget, this.getData()), this.designPaper = t, this.designTarget.find("td").hidroppable({
accept: ".rn-draggable-item",
onDrop: function (t, e) { },
onDragEnter: function (t, e) {
jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).removeClass("rn-draggable-item")
},
onDragLeave: function (t, e) {
jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).addClass("rn-draggable-item")
}
}), this.designTarget
}, TablePrintElement.prototype.getConfigOptions = function () {
return _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.table
}, TablePrintElement.prototype.createTarget = function (t, e, i) {
for (var n = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'), r = this.createGridColumnsStructure(i), a = 0; a < r.gridColumns; a++) r.getByIndex(a).append(this.getTableHtml(e, i));
return n.find(".hiprint-printElement-table-content").append(r.target), n
}, TablePrintElement.prototype.createGridColumnsStructure = function (t) {
for (var e = jquery__WEBPACK_IMPORTED_MODULE_60___default()(''), i = 0; i < this.options.getGridColumns(); i++) {
var n = jquery__WEBPACK_IMPORTED_MODULE_60___default()('');
e.append(n)
}
var r, a = this.getGridColumnsFooterFormatter();
return a && ((r = jquery__WEBPACK_IMPORTED_MODULE_60___default()('')).append(a(this.options, this.getData(t), t, [])), e.append(r)), new _table_GridColumnsStructure__WEBPACK_IMPORTED_MODULE_8__.a(this.options.getGridColumns(), e)
}, TablePrintElement.prototype.createtempEmptyRowsTargetStructure = function (t) {
var e;
return this.getField() ? this.createTarget(this.printElementType.title, []) : ((e = this.createTarget(this.printElementType.title, []).clone()).find(".hiprint-printElement-tableTarget tbody tr").remove(), e)
}, TablePrintElement.prototype.getTableHtml = function (t, e) {
var i, n;
return !this.getField() && this.options.content ? ((n = jquery__WEBPACK_IMPORTED_MODULE_60___default()("")).append(this.options.content), (i = n.find("table")).addClass("hiprint-printElement-tableTarget"), i) : this.printElementType.formatter ? ((n = jquery__WEBPACK_IMPORTED_MODULE_60___default()("")).append(this.printElementType.formatter(t)), (i = n.find("table")).addClass("hiprint-printElement-tableTarget"), i) : ((n = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
')).append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableHead(this.getColumns(), this.options.getWidth() / this.options.getGridColumns())), n.append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableRow(this.getColumns(), t, e, this.options, this.printElementType)), "no" != this.options.tableFooterRepeat && _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, t, this.options, this.printElementType, e, t).insertBefore(n.find("tbody")), n)
}, TablePrintElement.prototype.getEmptyRowTarget = function () {
return _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createEmptyRowTarget(this.getColumns(), this)
}, TablePrintElement.prototype.getHtml = function (t, e) {
this.createTempContainer();
t = this.getPaperHtmlResult(t, e);
return this.removeTempContainer(), t
}, TablePrintElement.prototype.getPaperHtmlResult = function (t, e) {
var i = [],
n = this.getData(e),
r = this.getTableHtml(n, e),
a = this.createtempEmptyRowsTargetStructure(e),
o = (e ? this.updateTargetWidth(a) : this.updateTargetSize(a), this.css(a, n), this.css(r, n), this.getTempContainer().html(""), this.getTempContainer().append(a), a.find("tfoot").outerHeight() || 0);
a.find("tfoot").remove();
for (var s, c = this.getBeginPrintTopInPaperByReferenceElement(t), l = 0, p = !1; !p;) {
var d = 0,
u = t.getPaperFooter(l),
f = (0 == l && u < c && "none" != t.panelPageRule && (c = c - u + t.paperHeader, i.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__.a({
target: void 0,
printLine: void 0
})), d = t.getContentHeight(l) - (c - t.paperHeader), l++, u = t.getPaperFooter(l)), 0 < i.length ? i[i.length - 1].target : void 0),
u = this.getRowsInSpecificHeight(e, 0 < d ? d : 0 == l ? u - c : t.getContentHeight(l), a, r, l, f, o),
p = u.isEnd;
if (d < 0) {
i[0].target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'.concat(i18n._("没有足够空间进行表格分页,请调整页眉/页脚线"), "
")), i[0].printLine = c, i[0].referenceElement = new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_4__.a({
top: this.options.getTop(),
left: this.options.getLeft(),
height: this.options.getHeight(),
width: this.options.getWidth(),
beginPrintPaperIndex: t.index,
bottomInLastPaper: c + this.options.lHeight,
printTopInPaper: c
}), i[0].target.css("top", c + "pt"), i[0].target.css("left", this.options.displayLeft());
break
}
f = void 0;
u.target && (u.target.css("left", this.options.displayLeft()), u.target[0].height = ""), f = 0 == l || 0 < d ? (u.target && (s = c, u.target.css("top", c + "pt")), p && null != this.options.lHeight ? c + (u.height > this.options.lHeight ? u.height : this.options.lHeight) : c + u.height) : (u.target && (s = t.paperHeader, u.target.css("top", t.paperHeader + "pt")), t.paperHeader + u.height), i.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_2__.a({
target: u.target,
printLine: f,
referenceElement: new _PrintReferenceElement__WEBPACK_IMPORTED_MODULE_4__.a({
top: this.options.getTop(),
left: this.options.getLeft(),
height: this.options.getHeight(),
width: this.options.getWidth(),
beginPrintPaperIndex: t.index,
bottomInLastPaper: f,
printTopInPaper: s
})
})), l++, e && this.updatePanelHeight(f + this.options.getHeight(), t)
}
return i
}, TablePrintElement.prototype.getRowsInSpecificHeight = function (t, e, i, n, r, a, o) {
var s, c = n.find("tbody"),
l = _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.pt.toPx(e),
p = (i.find(".hiprint-printElement-tableTarget tbody").html(""), "last" != this.options.tableFooterRepeat && i.find(".hiprint-printElement-tableTarget tfoot").remove(), "first" == this.options.tableHeaderRepeat && 0 < r ? i.find(".hiprint-printElement-tableTarget thead").remove() : "none" == this.options.tableHeaderRepeat && (t ? i.find(".hiprint-printElement-tableTarget thead").remove() : (i.find(".hiprint-printElement-tableTarget thead").css("background", "firebrick"), i.find(".hiprint-printElement-tableTarget thead tr").css("background", "firebrick"))), "none" == this.panel.panelPageRule),
d = (t && p && (n = i.find(".hiprint-printElement-tableTarget thead").attr("style"), s = i.find(".hiprint-printElement-tableTarget thead tr").clone(), n ? s.attr("style", n) : s.css({
background: "#e8e8e8"
}), i.find(".hiprint-printElement-tableTarget thead").remove()), i.outerHeight());
if (!p && l < d) return {
target: void 0,
length: 0,
height: 0,
isEnd: !1
};
for (var u = this.options.getGridColumns(), f = [], h = 0; h < u; h++)
for (var m, g, v, b = i.find(".hiprint-printElement-tableTarget:eq(" + h + ")"), I = void 0, A = []; ;)
if (p ? 0 == (m = c.find("tr").length) ? (I = {
height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(d),
isEnd: !0
}, t && this.options.autoCompletion && (this.autoCompletion(l, b, o), d = i.outerHeight())) : (g = c.find("tr:lt(1)"), 0 == A.length && s && b.find("tbody").append(s), b.find("tbody").append(g), v = g.data("rowData"), f.push(v), A.push(v), d = i.outerHeight(), 0 == m && (c.prepend(g), f.pop(), A.pop(), I = {
height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(d),
isEnd: !1
})) : d <= l && (0 == c.find("tr").length ? (I = {
height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(d),
isEnd: !0
}, t && this.options.autoCompletion && (this.autoCompletion(l, b, o), d = b.outerHeight())) : (g = c.find("tr:lt(1)"), this.options.rowsColumnsMerge && (0 < r || 0 < h) && 0 == A.length && (g = this.fixMergeSpan(g, c)), b.find("tbody").append(g), v = g.data("rowData"), f.push(v), A.push(v), d = b.outerHeight(), (("last" == this.options.tableFooterRepeat ? d : d += o) > l || this.options.maxRows && A.length > +this.options.maxRows) && (c.prepend(g), f.pop(), A.pop(), d = b.outerHeight(), I = {
height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(d),
isEnd: !1
}))), I) {
if ("last" == this.options.tableFooterRepeat && !I.isEnd) break;
"no" !== this.options.tableFooterRepeat && (p ? b.find("tbody").append(_table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, this.getData(t), this.options, this.printElementType, t, A).children()) : _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.createTableFooter(this.printElementType.columns, this.getData(t), this.options, this.printElementType, t, A).insertBefore(b.find("tbody")), this.css(b, t));
break
} var _, e = i.find(".hiprint-printElement-tableTarget tbody tr").length,
n = this.getGridColumnsFooterFormatter(),
n = (n && i.find(this.gridColumnsFooterCss).html(n(this.options, this.getData(t), t, f)), d = i.outerHeight(), c.find("tr:lt(1)"));
return 0 == e && n.length && v == n.data("rowData") ? (b.find("tbody").append(n), _ = b.find("tbody tr").outerHeight(), c.prepend(n), {
target: jquery__WEBPACK_IMPORTED_MODULE_60___default()('
").append(n.css("background", "blue")),
length: e,
height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(d),
isEnd: !1
}) : 0 == c.find("tr").length ? 0 == e && a ? {
target: void 0,
length: 0,
height: 0,
isEnd: !0
} : {
target: i.clone(),
length: e,
height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(d),
isEnd: !0
} : {
target: i.clone(),
length: e,
height: _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.px.toPt(d),
isEnd: !1
}
}, TablePrintElement.prototype.fixMergeSpan = function (t, e) {
var i = this,
n = 1,
r = !1,
a = 1,
o = !1;
return t.nextAll().each(function (t) {
0 < jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).children().filter("td[rowspan=0]").length && !r ? n += 1 : r = !0, 0 < jquery__WEBPACK_IMPORTED_MODULE_60___default()(this).children().filter("td[colspan=0]").length && !o ? a += 1 : o = !0
}), t.children().each(function (t, e) {
jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).attr("rowspan") < 1 && (jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).attr("rowspan", n), jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).css("display", ""), i.options.rowsColumnsMergeClean) && jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).text(""), jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).attr("colspan") < 1 && (jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).attr("colspan", a), jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).css("display", ""), i.options.rowsColumnsMergeClean) && jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).text("")
}), t
}, TablePrintElement.prototype.autoCompletion = function (t, e, i) {
for (var n, r = this.getEmptyRowTarget(), a = e.outerHeight() + i; a < t && (n = r.clone(), e.find("tbody").append(n), a = e.outerHeight() + i, !(this.options.maxRows && e.find("tbody").children().length > this.options.maxRows)););
n && n.remove()
}, TablePrintElement.prototype.getData = function (i) {
if (!i) try {
var t = this.options.testData || "[{}]";
return JSON.parse(t)
} catch (e) {
return [{}]
}
var t = this.getField(),
e = t && t.split(".").reduce(function (t, e) {
return t ? t[e] : i ? i[e] : ""
}, !1) || "";
return e ? JSON.parse(JSON.stringify(e)) : []
}, TablePrintElement.prototype.onResize = function (t, e, i, n, r) {
_super.prototype.updateSizeAndPositionOptions.call(this, r, n, i, e), _table_TableExcelHelper__WEBPACK_IMPORTED_MODULE_6__.a.resizeTableCellWidth(this.designTarget, this.getColumns(), this.options.getWidth())
}, TablePrintElement.prototype.getReizeableShowPoints = function () {
return ["s", "e"]
}, TablePrintElement.prototype.design = function (t, a) {
var o = this;
this.designTarget.hidraggable({
handle: this.designTarget.find(".hiprint-printElement-table-handle"),
axis: o.options.axis || void 0,
designTarget: o,
onDrag: function (t, e, i) {
o.updateSizeAndPositionOptions(e, i), o.createLineOfPosition(a), _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.changed = !0
},
moveUnit: "pt",
minMove: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.movingDistance,
onBeforeDrag: function (t) {
_HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !0, o.createLineOfPosition(a)
},
getScale: function () {
return o.designPaper.scale || 1
},
onStopDrag: function (t) {
_HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.changed && _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger("hiprintTemplateDataChanged_" + o.templateId, "移动"), _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !1, _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.changed = !1, o.removeLineOfPosition()
}
}), this.printElementType.editable && this.setHitable(), this.setColumnsOptions(), this.designTarget.hireizeable({
showPoints: o.getReizeableShowPoints(),
showSizeBox: _HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.showSizeBox,
noContainer: !0,
onBeforeResize: function () {
_HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !0
},
getScale: function () {
return o.designPaper.scale || 1
},
onResize: function (t, e, i, n, r) {
o.onResize(t, e, i, n, r), o.hitable && o.hitable.updateColumnGrips(), o.createLineOfPosition(a)
},
onStopResize: function (t) {
_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger("hiprintTemplateDataChanged_" + o.templateId, t ? "旋转" : "大小"), _HiPrintlib__WEBPACK_IMPORTED_MODULE_9__.a.instance.draging = !1, o.removeLineOfPosition()
}
}), this.bingKeyboardMoveEvent(this.designTarget, a)
}, TablePrintElement.prototype.setHitable = function () {
var t = this;
this.hitable = new _hitable_HiTale__WEBPACK_IMPORTED_MODULE_7__.a({
templateId: t.templateId,
table: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)"),
rows: this.getColumns(),
resizeRow: !1,
resizeColumn: !0,
fields: this.options.fields,
trs: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("tbody tr"),
handle: this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead"),
isEnableEdit: this.printElementType.editable || !0,
columnDisplayEditable: null == this.printElementType.columnDisplayEditable || this.printElementType.columnDisplayEditable,
columnDisplayIndexEditable: null == this.printElementType.columnDisplayIndexEditable || this.printElementType.columnDisplayIndexEditable,
columnResizable: null == this.printElementType.columnResizable || this.printElementType.columnResizable,
columnAlignEditable: null == this.printElementType.columnAlignEditable || this.printElementType.columnAlignEditable,
isEnableEditText: null == this.printElementType.columnTitleEditable || this.printElementType.columnTitleEditable,
isEnableEditField: null == this.printElementType.isEnableEditField || this.printElementType.isEnableEditField,
isEnableContextMenu: null == this.printElementType.isEnableContextMenu || this.printElementType.isEnableContextMenu,
isEnableInsertRow: null == this.printElementType.isEnableInsertRow || this.printElementType.isEnableInsertRow,
isEnableDeleteRow: null == this.printElementType.isEnableDeleteRow || this.printElementType.isEnableDeleteRow,
isEnableInsertColumn: null == this.printElementType.isEnableInsertColumn || this.printElementType.isEnableInsertColumn,
isEnableDeleteColumn: null == this.printElementType.isEnableDeleteColumn || this.printElementType.isEnableDeleteColumn,
isEnableMergeCell: null == this.printElementType.isEnableMergeCell || this.printElementType.isEnableMergeCell
}), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.on("updateTable" + this.hitable.id, function () {
t.updateDesignViewFromOptions(), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger("hiprintTemplateDataChanged_" + t.templateId, "调整表头")
})
}, TablePrintElement.prototype.setColumnsOptions = function () {
var n = this;
this.designTarget.find(".hiprint-printElement-tableTarget:eq(0)").find("thead td").bind("click.hiprint", function (t) {
var e, t = jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.target).attr("id") || jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.target).attr("column-id"),
i = n.getColumnByColumnId(t);
i ? (e = n.getPrintElementOptionItemsByName("tableColumn"), _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger(n.getPrintElementSelectEventKey(), {
printElement: n,
customOptionsInput: [{
title: (i.title || "".concat(i.id, "(id)")) + "-".concat(i18n.__("列属性")),
optionItems: e,
options: i,
callback: function (t) {
e.forEach(function (t) {
var e = t.getValue();
"title" != t.name || !e || e.trim().endsWith("#") || e.trim().startsWith("#") ? i[t.name] = e : (e = e ? e.split("#") : "", i.title = e[0], 1 < e.length && (i.columnId = i.field = e[1]), i.columnId && i.target.attr("column-id", i.columnId), t.target.find("textarea").val(e[0]))
})
}
}]
})) : _assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_3__.a.event.trigger(n.getPrintElementSelectEventKey(), {
printElement: n
})
})
}, TablePrintElement.prototype.filterOptionItems = function (t) {
var e = _super.prototype.filterOptionItems.call(this, t);
return this.printElementType.editable && 1 == this.options.columns.length ? e : t.filter(function (t) {
return "columns" != t.name
})
}, TablePrintElement.prototype.getFooterFormatter = function () {
var footerFormatter = void 0;
if (this.printElementType.footerFormatter && (footerFormatter = this.printElementType.footerFormatter), this.options.footerFormatter) try {
var s = "footerFormatter=" + this.options.footerFormatter;
eval(s)
} catch (t) { }
return footerFormatter
}, TablePrintElement.prototype.getGridColumnsFooterFormatter = function () {
var gridColumnsFooterFormatter = void 0;
if (this.printElementType.gridColumnsFooterFormatter && (gridColumnsFooterFormatter = this.printElementType.gridColumnsFooterFormatter), this.options.gridColumnsFooterFormatter) try {
var s = "gridColumnsFooterFormatter=" + this.options.gridColumnsFooterFormatter;
eval(s)
} catch (t) { }
return gridColumnsFooterFormatter
}, TablePrintElement
}(_BasePrintElement__WEBPACK_IMPORTED_MODULE_0__.a)
}, function (t, e, i) {
var n = function (t) {
this.table = t.table, this.templateId = t.templateId, this.fields = t.fields, this.isEnableEdit = t.isEnableEdit, this.trs = t.trs, this.resizeRow = t.resizeRow, this.resizeColumn = t.resizeColumn, this.isEnableEditField = t.isEnableEditField, this.isEnableContextMenu = t.isEnableContextMenu, this.isEnableEditField = t.isEnableEditField, this.isEnableInsertRow = t.isEnableInsertRow, this.isEnableDeleteRow = t.isEnableDeleteRow, this.isEnableInsertColumn = t.isEnableInsertColumn, this.isEnableDeleteColumn = t.isEnableDeleteColumn, this.isEnableMergeCell = t.isEnableMergeCell, this.columnResizable = t.columnResizable, this.columnAlignEditable = t.columnAlignEditable
},
r = (y.prototype.enableEidt = function () {
this.options.isEnableEdit
}, y.prototype.disableEdit = function () {
this.options.isEnableEdit
}, y.prototype.isEnableEdit = function () {
return this.options.isEnableEdit
}, y),
p = i(0),
d = function (t) {
this.cell = t.cell, this.link = t.link, this.linkType = t.linkType, this.bottom = t.bottom, this.rightMost = t.rightMost, this.rowLevel = t.rowLevel, this.columnLevel = t.columnLevel, this.indexInTableGridRow = t.indexInTableGridRow, this.indexInTableGridColumn = t.indexInTableGridColumn
},
a = i(10),
s = (_.getLeftTableCell = function (t, i) {
var n;
return t.forEach(function (t, e) {
t.cell && e < i && (n = t.cell)
}), n
}, _.getIndex = function (t, i) {
var n;
return t.forEach(function (t, e) {
t.cell && t.cell.id == i && (n = e)
}), n
}, _),
c = i(13),
o = i(11),
l = function (t, e) {
this.target = t, this.grips = e
},
u = function (t) {
this.target = t
},
f = function () {
this.rowColumns = []
},
h = (A.getColumnsWidth = function (t, i) {
var n = {},
r = A.allAutoWidth(t);
return t.rowColumns.forEach(function (t) {
var e = +i,
e = t.width / r * (0 < e ? e : 0);
n[t.id] = e
}), n
}, A.resizeTableCellWeight = function (t) {
t.forEach(function (t) {
t.columns.forEach(function (t) {
t.hasWidth && jquery__WEBPACK_IMPORTED_MODULE_60___default()(t.getTarget()).css("width", t.width + "pt")
})
})
}, A.allAutoWidth = function (t) {
var e = 0;
return t.rowColumns.forEach(function (t) {
e += t.width
}), e
}, A.reconsitutionTableColumnTree = function (i, t, e) {
for (var n = t || new f, r = 0; r < i.length; r++) ! function (e) {
n.totalLayer = e + 1, n[e] = i[e].columns, n.rowColumns = n.rowColumns.concat(n[e].filter(function (t) {
return t.rowspan == i.length - e
}))
}(r);
return n
}, A),
m = i(2),
g = (I.prototype.init = function () {
this.addResizeRowAndColumn(), this.hitable.optionsCoat.options.resizeColumn && this.createColumnGrips(), this.hitable.optionsCoat.options.resizeRow && this.createRowGrips()
}, I.prototype.resizeTableCellWidth = function () {
h.resizeTableCellWeight(this.rows)
}, I.prototype.addResizeRowAndColumn = function () { }, I.prototype.createColumnGrips = function () {
var r = this,
a = this,
o = [],
s = jquery__WEBPACK_IMPORTED_MODULE_60___default()('');
s.width(this.target.width()), this.rows.forEach(function (t) {
(t.columns || []).filter(function (t) {
return t.checked
}).forEach(function (t, e) {
var i, n;
t.getTarget().attr("haswidth") && (i = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'), s.append(i), n = new u(i), 0 < o.length && (o[o.length - 1].nextGrip = n), o.push(n), r.syncGrips(t, n), jquery__WEBPACK_IMPORTED_MODULE_60___default()(i).hidraggable({
axis: "h",
onDrag: function (t, e, i) { },
moveUnit: "pt",
minMove: 1,
getScale: function () {
return jquery__WEBPACK_IMPORTED_MODULE_60___default()(".hiprint-printPaper")[0].style.transform && parseFloat(jquery__WEBPACK_IMPORTED_MODULE_60___default()(".hiprint-printPaper")[0].style.transform.slice(6, -1)) || 1
},
onBeforeDrag: function (t) {
if (m.a.instance.draging = !0, !n.nextGrip) return !1;
a.dragingGrip = n, a.dragingGrip.left = parseFloat(a.dragingGrip.target.css("left").replace("px", "")), n.target.addClass("columngripDraging")
},
onStopDrag: function (t) {
m.a.instance.draging = !1;
var e = parseFloat(a.dragingGrip.target.css("left").replace("px", "")),
e = p.a.px.toPt(e - a.dragingGrip.left);
n.cell.width + e < 10 ? e = 10 - n.cell.width : n.nextGrip.cell.width - e < 10 && (e = n.nextGrip.cell.width - 10), n.cell.width = n.cell.width + e, n.nextGrip.cell.width = n.nextGrip.cell.width - e, r.resizeTableCellWidth(), n.target.removeClass("columngripDraging"), a.updateColumnGrips()
}
}))
})
}), this.target.before(s), this.cgripContariner = new l(s, o)
}, I.prototype.updateColumnGrips = function () {
this.cgripContariner && (this.cgripContariner.target.remove(), this.createColumnGrips())
}, I.prototype.updateRowGrips = function () {
this.rgripContariner && (this.rgripContariner.target.remove(), this.createRowGrips())
}, I.prototype.createRowGrips = function () {
var r = this,
a = this,
o = [],
s = jquery__WEBPACK_IMPORTED_MODULE_60___default()('');
this.rows.forEach(function (t, i) {
var e = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'),
n = (s.append(e), new u(e));
o.push(n), 0 < i && i < r.rows.length && jquery__WEBPACK_IMPORTED_MODULE_60___default()(e).hidraggable({
axis: "v",
onDrag: function (t, e, i) { },
moveUnit: "pt",
minMove: 1,
onBeforeDrag: function (t) {
a.dragingGrip = n, a.dragingGrip.top = parseFloat(a.dragingGrip.target.css("top").replace("px", "")), n.target.addClass("rowgripDraging")
},
onStopDrag: function (t) {
var e = parseFloat(a.dragingGrip.target.css("top").replace("px", "")),
e = p.a.px.toPt(e - a.dragingGrip.top + a.rows[i].columns[0].getTarget().height());
a.rows[i].columns[0].getTarget().css("height", e + "pt"), a.syncRowGrips(), n.target.removeClass("rowgripDraging")
}
})
}), this.target.before(s), this.rgripContariner = new l(s, o), this.syncRowGrips()
}, I.prototype.syncGrips = function (t, e) {
var i = t.getTarget();
e.cell = t, e.target.css({
left: i.offset().left - this.target.offset().left + i.outerWidth(!1),
height: 30
})
}, I.prototype.syncRowGrips = function () {
var i = this;
this.rgripContariner.target.height(this.target.height()), this.rows.forEach(function (t, e) {
t = t.columns[0].getTarget();
i.rgripContariner.grips[e].target.css({
top: t.offset().top - i.target.offset().top + t.outerHeight(!1),
width: 30
})
})
}, I.prototype.addResizerHeadRow = function () {
this.target.find("thead").prepend()
}, I),
v = (b.prototype.init = function () { }, b.prototype.updateRowGrips = function () { }, b.prototype.updateColumnGrips = function () { }, b);
function b() { }
function I(t) {
this.signature = "HiTresizer", this.hitable = t, this.rows = t.rows, this.target = t.target
}
function A() { }
function _() { }
function y(t) {
this.options = new n(t)
}
i.d(e, "a", function () {
return x
});
w.prototype.insertRow = function (t, e, i) {
var e = e || this.tableCellSelector.getSingleSelect(),
n = e.cell,
r = this.rows[e.rowIndex],
e = e.rowIndex,
a = this.getCellGrid(),
o = new c.a;
o.init(this.optionsCoat, void 0, r.isHead), i && o.getTarget().addClass(i), "above" == t ? (a[e].forEach(function (t) {
var e, i = t.link || t.cell,
i = i.width / i.colspan;
0 == t.columnLevel ? ((e = o.createTableCell()).width = i, o.insertCellToLast(e)) : ("column" == t.linkType && (i = t.link.getTarget(), t.link.rowspan += 1, i.attr("rowspan", t.link.rowspan)), t.linkType)
}), this.rows.splice(e, 0, o), r.getTarget().before(o.getTarget())) : (a[i = e + n.rowspan - 1].forEach(function (t) {
var e, i, n = t.link || t.cell,
n = n.width / n.colspan;
t.bottom ? ((e = o.createTableCell()).width = n, o.insertCellToLast(e)) : (t.cell && (i = t.cell.getTarget(), t.cell.rowspan += 1, i.attr("rowspan", t.cell.rowspan)), "column" == t.linkType && (i = t.link.getTarget(), t.link.rowspan += 1, i.attr("rowspan", t.link.rowspan)))
}), this.rows.splice(1 + i, 0, o), this.rows[i].getTarget().after(o.getTarget())), p.a.event.trigger("newRow" + this.id, o)
}, w.prototype.insertColumn = function (t, e, a, o) {
var r, s, c = this,
l = this.rows.concat(this.trRows),
e = e || this.tableCellSelector.getSingleSelect(),
i = e.cell,
e = e.rowIndex,
n = this.getCellGrid(l),
e = n[e].filter(function (t) {
return t.cell && t.cell.id == i.id || t.link && t.link.id == i.id
});
"left" == t ? (r = e[0].indexInTableGridRow, n.forEach(function (t, e) {
var i, n = t[r],
t = t.filter(function (t, e) {
return r <= e && t.cell
});
0 == n.rowLevel ? (i = l[e], e = l[e].createTableCell(), a && e.getTarget().addClass(a), null != o && (e.width = o), t.length ? i.insertToTargetCellLeft(t[0].cell, e) : i.insertCellToLast(e), p.a.event.trigger("newCell" + c.id, e)) : "row" == n.linkType && (t = n.link.getTarget(), n.link.colspan += 1, t.attr("colspan", n.link.colspan))
})) : (s = e[e.length - 1].indexInTableGridRow, n.forEach(function (t, e) {
var i, n, r = t[s],
t = t.filter(function (t, e) {
return e <= s && t.cell
});
r.rightMost ? (i = (e = l[e]).createTableCell(), a && i.getTarget().addClass(a), null != o && (i.width = o), t.length ? e.insertToTargetCellRight(t[t.length - 1].cell, i) : e.insertCellToFirst(i), p.a.event.trigger("newCell" + c.id, i)) : (t = r.link || r.cell, "row" == r.linkType && (n = t.getTarget(), t.colspan += 1, n.attr("colspan", t.colspan)), r.cell && (n = t.getTarget(), t.colspan += 1, n.attr("colspan", t.colspan)))
}))
}, w.prototype.deleteRow = function () {
var a = this,
t = this.tableCellSelector.getSingleSelect(),
o = (t.cell, this.rows[t.rowIndex], t.rowIndex),
s = this.getCellGrid(),
c = this.rows[o];
s[o].forEach(function (t, i) {
var e, n, r;
t.cell ? 1 == t.cell.rowspan ? c.removeCell(t.cell) : (c.removeCell(t.cell), r = s[o + 1].filter(function (t, e) {
return t.cell && i < e
}), n = (e = a.rows[o + 1]).createTableCell(t.cell.rowspan - 1, t.cell.colspan), r.length ? e.insertToTargetCellLeft(r[0].cell, n) : e.insertCellToLast(n)) : "column" == t.linkType && (--(r = t.link).rowspan, r.getTarget().attr("rowspan", r.rowspan))
}), c.getTarget().remove(), this.rows.splice(o, 1)
}, w.prototype.deleteColums = function () {
var i = this.rows.concat(this.trRows),
t = this.tableCellSelector.getSingleSelect(),
e = t.cell,
t = t.rowIndex,
n = this.getCellGrid(i),
r = n[t].filter(function (t) {
return t.cell && t.cell.id == e.id || t.link && t.link.id == e.id
})[0].indexInTableGridRow;
n.forEach(function (t, e) {
t = t[r];
t.cell ? 1 == t.cell.colspan ? i[e].removeCell(t.cell) : (--t.cell.colspan, t.cell.getTarget().attr("colspan", t.cell.colspan)) : "row" == t.linkType && (--t.link.colspan, t.link.getTarget().attr("colspan", t.link.colspan))
})
}, w.prototype.mergeCell = function () {
var n, r = this,
a = this.tableCellSelector.getSelectedCells();
0 != a.length && (n = a[0][0].cell, a.forEach(function (t, i) {
t.forEach(function (t, e) {
0 == i ? 0 != e && (n.colspan += t.cell.colspan, r.rows[t.rowIndex].removeCell(t.cell)) : r.rows[t.rowIndex].removeCell(t.cell), 0 == e && a[0][0].rowIndex + n.rowspan - 1 < t.rowIndex && (n.rowspan += t.cell.rowspan)
})
}), n.getTarget().attr("colspan", n.colspan), n.getTarget().attr("rowspan", n.rowspan), this.tableCellSelector.setSingleSelect(a[0][0]))
}, w.prototype.splitCell = function () {
var t = this.tableCellSelector.getSingleSelect(),
e = this.getCellGrid(),
i = s.getIndex(e[t.rowIndex], t.cell.id);
if (t) {
for (var n = t.rowIndex; n < t.rowIndex + t.cell.rowspan; n++)
for (var r = this.rows[n], a = n == t.rowIndex ? t.cell : s.getLeftTableCell(e[n], i), o = 0; o < t.cell.colspan; o++) n == t.rowIndex && 0 == o || (a ? r.insertToTargetCellRight(a, r.createTableCell()) : r.insertCellToFirst(r.createTableCell()));
t.cell.rowspan = 1, t.cell.colspan = 1, t.cell.getTarget().attr("colspan", t.cell.colspan), t.cell.getTarget().attr("rowspan", t.cell.rowspan)
}
}, w.prototype.init = function (e) {
var i = this;
jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.target).addClass("hitable"), this.optionsCoat.onBeforEdit = function (t) {
return !(i.optionsCoat.options.onBeforEdit && !1 === e.onBeforEdit(t) || (i.optionsCoat.editingCell && i.optionsCoat.editingCell.endEdit(), 0))
}, jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.target).mousedown(function (t) {
i.optionsCoat.isLeftMouseButtonDown = !0
}), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.target).mouseup(function (t) {
i.optionsCoat.isLeftMouseButtonDown = !1
}), this.initContext(), this.target.on("mousemove", function (t) {
1 === t.buttons && i.tableCellSelector.multipleSelectByXY(t.pageX, t.pageY)
}).on("mousedown", function (t) {
1 === t.buttons && i.tableCellSelector.singleSelectByXY(t.pageX, t.pageY)
})
}, w.prototype.initRows = function (t) {
var i = this;
this.trRows = [], t ? ((this.rows = t).forEach(function (t, e) {
t.init(i.optionsCoat, i.target.find("tr:eq(" + e + ")"), !0)
}), (t = this.optionsCoat.options.trs) && this.initRowsByTrs(t).forEach(function (t) {
i.trRows.push(t)
})) : this.rows = this.initRowsByTrs(this.target.find("tr"))
}, w.prototype.initRowsByTrs = function (t) {
var n = this;
return t.map(function (t, e) {
var i = new c.a;
return i.init(n.optionsCoat, jquery__WEBPACK_IMPORTED_MODULE_60___default()(e)), i
}).get()
}, w.prototype.enableEidt = function () {
this.optionsCoat.enableEidt()
}, w.prototype.disableEdit = function () {
this.optionsCoat.disableEdit()
}, w.prototype.getCellGrid = function (t) {
var t = t || this.rows,
c = this.getColumnStep(),
l = new Array;
return t.forEach(function (t, s) {
t.columns.forEach(function (t, e) {
for (var i = 0; i < t.colspan; i++)
for (var n = 0, r = !1; n < c && !r;) {
if (l[s] = l[s] || [], !l[s][n]) {
l[s][n] = new d({
cell: 0 == i ? t : void 0,
link: 0 != i ? t : void 0,
linkType: 0 < i ? "row" : void 0,
rightMost: i == t.colspan - 1 || void 0,
bottom: 0 == t.rowspan - 1,
rowLevel: i,
columnLevel: 0,
indexInTableGridRow: n,
indexInTableGridColumn: s
});
for (var a = s + 1, o = 1; o < t.rowspan; o++) l[a] = l[a] || [], l[a][n] = new d({
cell: void 0,
link: t,
linkType: 0 < i ? "rowColumn" : "column",
rightMost: i == t.colspan - 1 || void 0,
bottom: o == t.rowspan - 1,
rowLevel: i,
columnLevel: o,
indexInTableGridRow: n,
indexInTableGridColumn: a
}), a += 1;
r = !0
}
n++
}
})
}), l
}, w.prototype.setAlign = function (t) {
var e = this.tableCellSelector.getSingleSelect();
e && e.cell.setAlign(t)
}, w.prototype.setVAlign = function (t) {
var e = this.tableCellSelector.getSingleSelect();
e && e.cell.setVAlign(t)
}, w.prototype.getColumnStep = function (t) {
var e = 0;
return this.rows.length && this.rows[t || 0].columns.forEach(function (t) {
e += t.colspan
}), e
}, w.prototype.initContext = function () {
var e = this;
if (!this.optionsCoat.options.isEnableContextMenu) return !1;
jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.handle).hicontextMenu({
menus: [{
text: "".concat(i18n.__("在上方插入行")),
enabled: this.optionsCoat.options.isEnableInsertRow,
disable: function () {
return !e.tableCellSelector.getSingleSelect()
},
callback: function () {
e.insertRow("above"), e.resizer.updateRowGrips(), p.a.event.trigger("updateTable" + e.id)
}
}, {
text: "".concat(i18n.__("在下方插入行")),
borderBottom: !0,
enabled: this.optionsCoat.options.isEnableInsertRow,
disable: function () {
return !e.tableCellSelector.getSingleSelect()
},
callback: function () {
e.insertRow("below"), e.resizer.updateRowGrips(), p.a.event.trigger("updateTable" + e.id)
}
}, {
text: "".concat(i18n.__("向左方插入列")),
enabled: this.optionsCoat.options.isEnableInsertColumn,
disable: function () {
return !e.tableCellSelector.getSingleSelect()
},
callback: function () {
e.insertColumn("left"), e.resizer.updateColumnGrips(), p.a.event.trigger("updateTable" + e.id)
}
}, {
text: "".concat(i18n.__("向右方插入列")),
enabled: this.optionsCoat.options.isEnableInsertColumn,
disable: function () {
return !e.tableCellSelector.getSingleSelect()
},
borderBottom: !0,
callback: function () {
e.insertColumn("right"), e.resizer.updateColumnGrips(), p.a.event.trigger("updateTable" + e.id)
}
}, {
text: "".concat(i18n.__("删除行")),
enabled: this.optionsCoat.options.isEnableDeleteRow,
disable: function () {
return !e.tableCellSelector.getSingleSelect() || e.rows.length <= 1
},
callback: function () {
e.deleteRow(), e.resizer.updateRowGrips(), p.a.event.trigger("updateTable" + e.id)
}
}, {
text: "".concat(i18n.__("删除列")),
borderBottom: !0,
enabled: this.optionsCoat.options.isEnableDeleteColumn,
disable: function () {
return !e.tableCellSelector.getSingleSelect() || 0 < e.rows.length && e.rows[0].columns.length <= 1
},
callback: function () {
e.deleteColums(), e.resizer.updateColumnGrips(), p.a.event.trigger("updateTable" + e.id)
}
}, {
text: "".concat(i18n.__("对齐")),
borderBottom: !0,
enabled: this.optionsCoat.options.columnAlignEditable,
menus: [{
text: "".concat(i18n.__("左")),
callback: function () {
e.setAlign("left")
}
}, {
text: "".concat(i18n.__("左右居中")),
callback: function () {
e.setAlign("center")
}
}, {
text: "".concat(i18n.__("右")),
callback: function () {
e.setAlign("right")
}
}, {
text: "".concat(i18n.__("默认")),
borderBottom: !0,
callback: function () {
e.setAlign("")
}
}, {
text: "".concat(i18n.__("上")),
callback: function () {
e.setVAlign("top")
}
}, {
text: "".concat(i18n.__("垂直居中")),
callback: function () {
e.setVAlign("middle")
}
}, {
text: "".concat(i18n.__("下")),
callback: function () {
e.setVAlign("bottom")
}
}, {
text: "".concat(i18n.__("默认")),
callback: function () {
e.setVAlign("")
}
}]
}, {
text: "".concat(i18n.__("合并单元格")),
enabled: this.optionsCoat.options.isEnableMergeCell,
disable: function () {
return e.tableCellSelector.getSingleSelect()
},
callback: function () {
e.mergeCell(), p.a.event.trigger("updateTable" + e.id)
}
}, {
text: "".concat(i18n.__("解开单元格")),
enabled: this.optionsCoat.options.isEnableMergeCell,
disable: function () {
var t = e.tableCellSelector.getSingleSelect();
return !t || 1 == t.cell.rowspan && 1 == t.cell.colspan
},
callback: function () {
e.splitCell(), p.a.event.trigger("updateTable" + e.id)
}
}].filter(function (t) {
return t.enabled
})
})
}, w.prototype.getTableWidth = function () {
return p.a.px.toPt(this.target.outerWidth(!1))
}, w.prototype.updateColumnGrips = function () {
this.resizer.updateColumnGrips()
}, w.prototype.updateRowGrips = function () {
this.resizer.updateRowGrips()
};
var x = w;
function w(t) {
this.id = o.a.createId(), this.optionsCoat = new r(t), this.handle = t.handle, this.target = t.table, this.initRows(t.rows), this.init(t), this.tableCellSelector = new a.a(this.rows, this.target), this.resizer = this.optionsCoat.options.columnResizable ? new g(this) : new v, this.resizer.init()
}
}, function (t, e, i) {
i.d(e, "a", function () {
return n
});
var n = function (t, e, i) {
this.tid = t, this.options = e, this.printElementType = i
}
}, function (t, e, i) {
var n = i(3),
r = i(12),
a = function (t) {
this.width = t.width, this.title = t.title, this.field = t.field, this.checked = t.checked, this.columnId = t.columnId, this.fixed = !1, this.rowspan = t.rowspan || 1, this.colspan = t.colspan || 1, this.align = t.align, this.halign = t.halign, this.vAlign = t.vAlign, this.renderFormatter = t.renderFormatter, this.formatter2 = t.formatter2, this.styler2 = t.styler2, this.stylerHeader = t.stylerHeader, this.tableColumnHeight = t.tableColumnHeight, this.tableTextType = t.tableTextType, this.tableBarcodeMode = t.tableBarcodeMode, this.tableQRCodeLevel = t.tableQRCodeLevel, this.tableSummaryTitle = t.tableSummaryTitle, this.tableSummaryText = t.tableSummaryText, this.tableSummaryColspan = t.tableSummaryColspan, this.tableSummary = t.tableSummary, this.tableSummaryAlign = t.tableSummaryAlign, this.tableSummaryNumFormat = t.tableSummaryNumFormat, this.tableSummaryFormatter = t.tableSummaryFormatter, this.upperCase = t.upperCase
},
o = i(5);
i.d(e, "a", function () {
return p
});
s = function (t, e) {
return (s = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
};
c = n.a, s(l = d, i = c), l.prototype = null === i ? Object.create(i) : (u.prototype = i.prototype, new u), d.prototype.getColumnByColumnId = function (t) {
return this.makeColumnObj()[t]
}, d.prototype.makeColumnObj = function () {
var e = {};
return this.columns && this.columns.forEach(function (t) {
t.columns.forEach(function (t) {
(t.id || t.columnId) && (e[t.id || t.columnId] = t)
})
}), e
}, d.prototype.getGridColumns = function () {
return this.gridColumns || 1
}, d.prototype.getPrintElementOptionEntity = function () {
var e = c.prototype.getPrintElementOptionEntity.call(this);
return e.fields = this.fields, this.columns && (e.columns = [], this.columns.forEach(function (t) {
t = t.getPrintElementOptionEntity().map(function (t) {
return new a(t)
});
e.columns.push(t)
})), e
};
var s, c, l, p = d;
function d(t, n) {
var e = this;
return (e = c.call(this, t = t || {}) || this).lHeight = t.lHeight, e.autoCompletion = t.autoCompletion, e.tableFooterRepeat = t.tableFooterRepeat, n && (e.columns = [], n.editable && t.columns && t.columns.length ? t.columns.forEach(function (t) {
var i = [];
t.forEach(function (t) {
var t = new a(t),
e = n.getColumnByColumnId(t.columnId),
e = e ? jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend(e, t) : new o.a(t);
i.push(e)
}), e.columns.push(new r.a(i))
}) : n.columns.forEach(function (t) {
e.columns.push(new r.a(t))
})), e
}
function u() {
this.constructor = l
}
}, function (t, e, i) {
i.d(e, "a", function () {
return n
});
var n = function () {
this.rowColumns = []
}
}, function (t, e, i) {
i.d(e, "a", function () {
return n
});
r.prototype.getByIndex = function (t) {
return this.target.find(".hi-grid-col:eq(" + t + ")")
};
var n = r;
function r(t, e) {
this.gridColumns = t, this.target = e
}
}, function (t, e, i) {
t.exports = i(33)
}, function (t, e) {
function I(t) {
var e = M.data(t.data.target, "hidraggable"),
i = e.options,
n = e.proxy,
r = t.data,
a = r.startLeft + (t.pageX - r.startX) / (e.options.getScale() || 1),
e = r.startTop + (t.pageY - r.startY) / (e.options.getScale() || 1);
n && (n.parent()[0] == document.body ? (a = null != i.deltaX && null != i.deltaX ? t.pageX + i.deltaX : t.pageX - t.data.offsetWidth, e = null != i.deltaY && null != i.deltaY ? t.pageY + i.deltaY : t.pageY - t.data.offsetHeight) : (null != i.deltaX && null != i.deltaX && (a += t.data.offsetWidth + i.deltaX), null != i.deltaY && null != i.deltaY && (e += t.data.offsetHeight + i.deltaY))), t.data.parent != document.body && (a += M(t.data.parent).scrollLeft(), e += M(t.data.parent).scrollTop()), "h" == i.axis ? r.left = a : "v" == i.axis || t.shiftKey && t.altKey ? r.top = e : t.shiftKey ? r.left = a : (r.left = a, r.top = e)
}
function A(t) {
var e = M.data(t.data.target, "hidraggable"),
i = e.options;
(e.proxy || M(t.data.target)).css({
left: M.fn.dragLengthC(t.data.left, i),
top: M.fn.dragLengthC(t.data.top, i)
}), M("body").css("cursor", i.cursor)
}
function c(e) {
M.fn.hidraggable.isDragging = !0;
var t = M.data(e.data.target, "hidraggable"),
i = t.options,
n = M(".hidroppable").filter(function () {
return e.data.target != this
}).filter(function () {
var t = M.data(this, "hidroppable").options.accept;
return !t || 0 < M(t).filter(function () {
return this == e.data.target
}).length
}),
n = (t.hidroppables = n, t.proxy);
return n || (i.proxy ? (n = "clone" == i.proxy ? M(e.data.target).clone().insertAfter(e.data.target) : i.proxy.call(e.data.target, e.data.target), t.proxy = n) : n = M(e.data.target)), n.css("position", "absolute"), I(e), A(e), i.onStartDrag.call(e.data.target, e), !1
}
function _(t, e, i, n, r, a) {
Math.abs(t[i] - e[n]) <= HIPRINT_CONFIG.adsorbLineMin ? t.v.length ? t.v.css("left", t[i] + "pt") : (t.v = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""), t.v.css("height", r + "pt"), t.v.css("left", t[i] + "pt"), a.append(t.v)) : t.v && t.v.remove()
}
function y(t) {
t && t.v && t.v.remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".verLine").remove()
}
function x(t, e, i, n, r, a) {
Math.abs(t[i] - e[n]) <= HIPRINT_CONFIG.adsorbLineMin ? t.h.length ? t.h.css("top", t[i] + "pt") : (t.h = jquery__WEBPACK_IMPORTED_MODULE_60___default()(""), t.h.css("width", r + "pt"), t.h.css("top", t[i] + "pt"), a.append(t.h)) : t.h && t.h.remove()
}
function w(t) {
t && t.h && t.h.remove(), jquery__WEBPACK_IMPORTED_MODULE_60___default()(".horLine").remove()
}
function l(i) {
var t, u, e, n, r, a, o, s, c, l, p, d, f, h, m, g, v = M.data(i.data.target, "hidraggable"),
b = (I(i), i.ctrlKey || i.metaKey || !i.data.target.className.startsWith("resize-panel") && "2" != i.data.target.style.zIndex && !i.data.target.className.startsWith("hiprint-printElement") || (t = i.data, 0 == M(".mouseRect").length && v.options.designTarget && v.options.designTarget.panel.printElements.filter(function (t) {
return "block" == t.designTarget.children().last().css("display") && !t.printElementType.type.includes("table")
}).length <= 1 && (l = window.hinnn.px.toPt(t.left), e = window.hinnn.px.toPt(t.top), (u = v.options.designTarget.options).left = l, u.top = e, u.right = l + u.width, u.bottom = e + u.height, u.vCenter = l + u.width / 2, u.hCenter = e + u.height / 2, c = v.options.designTarget.panel.printElements.filter(function (t) {
return t.id != v.options.designTarget.id
}).map(function (t) {
var e = t.options,
i = e.left,
n = e.top,
r = e.width,
e = e.height,
a = i + r,
o = i + r / 2,
s = n + e / 2,
c = u.left + u.width / 2,
l = u.top + u.height / 2,
p = u.left + u.width,
d = Math.sqrt(Math.pow(i - u.left, 2) + Math.pow(s - l, 2)),
c = Math.sqrt(Math.pow(o - c, 2) + Math.pow(s - l, 2)),
a = Math.sqrt(Math.pow(a - p, 2) + Math.pow(s - l, 2)),
p = Math.min(d, c, a);
return Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)(Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)({}, t.options), {}, {
distance: p,
h: jquery__WEBPACK_IMPORTED_MODULE_60___default()(".horLine.id-" + t.id),
v: jquery__WEBPACK_IMPORTED_MODULE_60___default()(".verLine.id-" + t.id),
bottom: n + e,
right: i + r,
vCenter: o,
hCenter: s
})
}).sort(function (t, e) {
return t.distance - e.distance
}).slice(0, 1), l = v.options.designTarget.designPaper, p = l.target.find(".hiprint-printPaper-content"), d = l.width, f = l.height, h = HIPRINT_CONFIG.showAdsorbLine, m = HIPRINT_CONFIG.adsorbMin, g = HIPRINT_CONFIG.adsorbLineMin, c.forEach(function (t, e) {
Math.abs(c[e].left - u.left) <= m ? (u.left = c[e].left, y(c[e])) : Math.abs(c[e].vCenter - u.left) <= m ? (u.left = c[e].vCenter, y(c[e])) : Math.abs(c[e].right - u.left) <= m && (u.left = c[e].right, y(c[e])), Math.abs(c[e].left - u.vCenter) <= m ? (u.left = c[e].left - u.width / 2, y(c[e])) : Math.abs(c[e].vCenter - u.vCenter) <= m ? (u.left = c[e].vCenter - u.width / 2, y(c[e])) : Math.abs(c[e].right - u.vCenter) <= m && (u.left = c[e].right - u.width / 2, y(c[e])), Math.abs(c[e].left - u.right) <= m ? (u.left = c[e].left - u.width, y(c[e])) : Math.abs(c[e].vCenter - u.right) <= m ? (u.left = c[e].vCenter - u.width, y(c[e])) : Math.abs(c[e].right - u.right) <= m && (u.left = c[e].right - u.width, y(c[e])), Math.abs(c[e].top - u.top) <= m ? (u.top = c[e].top, w(c[e])) : Math.abs(c[e].hCenter - u.top) <= m ? (u.top = c[e].hCenter, w(c[e])) : Math.abs(c[e].bottom - u.top) <= m && (u.top = c[e].bottom, w(c[e])), Math.abs(c[e].top - u.hCenter) <= m ? (u.top = c[e].top - u.height / 2, w(c[e])) : Math.abs(c[e].hCenter - u.hCenter) <= m ? (u.top = c[e].hCenter - u.height / 2, w(c[e])) : Math.abs(c[e].bottom - u.hCenter) <= m && (u.top = c[e].bottom - u.height / 2, w(c[e])), Math.abs(c[e].top - u.bottom) <= m ? (u.top = c[e].top - u.height, w(c[e])) : Math.abs(c[e].hCenter - u.bottom) <= m ? (u.top = c[e].hCenter - u.height, w(c[e])) : Math.abs(c[e].bottom - u.bottom) <= m && (u.top = c[e].bottom - u.height, w(c[e])), h && (Math.abs(c[e].left - u.left) > m && Math.abs(c[e].left - u.left) <= g ? _(c[e], u, "left", "left", f, p) : Math.abs(c[e].vCenter - u.left) > m && Math.abs(c[e].vCenter - u.left) <= g ? _(c[e], u, "vCenter", "left", f, p) : Math.abs(c[e].right - u.left) > m && Math.abs(c[e].right - u.left) <= g ? _(c[e], u, "right", "left", f, p) : Math.abs(c[e].left - u.vCenter) > m && Math.abs(c[e].left - u.vCenter) <= g ? _(c[e], u, "left", "vCenter", f, p) : Math.abs(c[e].vCenter - u.vCenter) > m && Math.abs(c[e].vCenter - u.vCenter) <= g ? _(c[e], u, "vCenter", "vCenter", f, p) : Math.abs(c[e].right - u.vCenter) > m && Math.abs(c[e].right - u.vCenter) <= g ? _(c[e], u, "right", "vCenter", f, p) : Math.abs(c[e].left - u.right) > m && Math.abs(c[e].left - u.right) <= g ? _(c[e], u, "left", "right", f, p) : Math.abs(c[e].vCenter - u.right) > m && Math.abs(c[e].vCenter - u.right) <= g ? _(c[e], u, "vCenter", "right", f, p) : Math.abs(c[e].right - u.right) > m && Math.abs(c[e].right - u.right) <= g ? _(c[e], u, "right", "right", f, p) : Math.abs(c[e].top - u.top) > m && Math.abs(c[e].top - u.top) <= g ? x(c[e], u, "top", "top", d, p) : Math.abs(c[e].hCenter - u.top) > m && Math.abs(c[e].hCenter - u.top) <= g ? x(c[e], u, "hCenter", "top", d, p) : Math.abs(c[e].bottom - u.top) > m && Math.abs(c[e].bottom - u.top) <= g ? x(c[e], u, "bottom", "top", d, p) : Math.abs(c[e].top - u.hCenter) > m && Math.abs(c[e].top - u.hCenter) <= g ? x(c[e], u, "top", "hCenter", d, p) : Math.abs(c[e].hCenter - u.hCenter) > m && Math.abs(c[e].hCenter - u.hCenter) <= g ? x(c[e], u, "hCenter", "hCenter", d, p) : Math.abs(c[e].bottom - u.hCenter) > m && Math.abs(c[e].bottom - u.hCenter) <= g ? x(c[e], u, "bottom", "hCenter", d, p) : Math.abs(c[e].top - u.bottom) > m && Math.abs(c[e].top - u.bottom) <= g ? x(c[e], u, "top", "bottom", d, p) : Math.abs(c[e].hCenter - u.bottom) > m && Math.abs(c[e].hCenter - u.bottom) <= g ? x(c[e], u, "hCenter", "bottom", d, p) : Math.abs(c[e].bottom - u.bottom) > m && Math.abs(c[e].bottom - u.bottom) <= g ? x(c[e], u, "bottom", "bottom", d, p) : (y(c[e]), w(c[e])))
}), i.data.left = window.hinnn.pt.toPx(u.left), i.data.top = window.hinnn.pt.toPx(u.top)), l = (e = t.parent.className.endsWith("design") ? t.parent : t.parent.offsetParent).clientWidth, e = e.clientHeight, n = t.target.clientWidth, r = t.target.clientHeight, s = o = 0, v.options.designTarget && v.options.designTarget.options.transform && (a = v.options.designTarget.options.getRectInfo(), o = window.hinnn.pt.toPx(a.diffW), s = window.hinnn.pt.toPx(a.diffH)), t.left < 0 - o ? t.left = 0 - o : t.left >= l - n + o && (t.left = l - n + o), t.top < 0 - s ? t.top = 0 - s : t.top >= e - r + s && (t.top = e - r + s), i.data = t), 0 != v.options.onDrag.call(i.data.target, i, M.fn.dragLengthCNum(i.data.left, v.options), M.fn.dragLengthCNum(i.data.top, v.options)) && A(i), i.data.target);
return v.hidroppables.each(function () {
var t, e = M(this);
e.hidroppable("options").disabled || (t = e.offset(), i.pageX > t.left && i.pageX < t.left + e.outerWidth() && i.pageY > t.top && i.pageY < t.top + e.outerHeight() ? (this.entered || (M(this).trigger("_dragenter", [b]), this.entered = !0), M(this).trigger("_dragover", [b])) : this.entered && (M(this).trigger("_dragleave", [b]), this.entered = !1))
}), !1
}
function p(r) {
M.fn.hidraggable.isDragging = !1, y(), w();
var t, e, i = M.data(r.data.target, "hidraggable"),
n = i.proxy,
a = i.options;
function o() {
n && n.remove(), i.proxy = null
}
function s() {
var n = !1;
return i.hidroppables.each(function () {
var t, e, i = M(this);
if (!i.hidroppable("options").disabled) return t = i.offset(), e = this.style.transform && parseFloat(this.style.transform.slice(6, -1)) || 1, r.pageX > t.left && r.pageX < t.left + i.outerWidth() * e && r.pageY > t.top && r.pageY < t.top + i.outerHeight() * e ? (a.revert && M(r.data.target).css({
position: r.data.startPosition,
left: r.data.startLeft,
top: r.data.startTop
}), M(this).trigger("_drop", [r.data.target]), o(), n = !0, this.entered = !1) : void 0
}), n || a.revert || o(), n
}
return a.revert ? 1 == s() ? M(r.data.target).css({
position: r.data.startPosition,
left: r.data.startLeft,
top: r.data.startTop
}) : n ? (e = n.parent()[0] == document.body ? (t = r.data.startX - r.data.offsetWidth, r.data.startY - r.data.offsetHeight) : (t = r.data.startLeft, r.data.startTop), n.animate({
left: t,
top: e
}, function () {
o()
})) : M(r.data.target).animate({
left: r.data.startLeft,
top: r.data.startTop
}, function () {
M(r.data.target).css("position", r.data.startPosition)
}) : (M(r.data.target).css({
position: "absolute",
left: M.fn.dragLengthC(r.data.left, a),
top: M.fn.dragLengthC(r.data.top, a)
}), s()), a.onStopDrag.call(r.data.target, r), M(document).unbind(".hidraggable"), setTimeout(function () {
M("body").css("cursor", "")
}, 100), !1
}
var M;
(M = jQuery).fn.hidraggable = function (i, t) {
return "string" == typeof i ? M.fn.hidraggable.methods[i](this, t) : this.each(function () {
var t = M.data(this, "hidraggable"),
t = t ? (t.handle.unbind(".hidraggable"), M.extend(t.options, i)) : M.extend({}, M.fn.hidraggable.defaults, M.fn.hidraggable.parseOptions(this), i || {}),
e = t.handle ? "string" == typeof t.handle ? M(t.handle, this) : t.handle : M(this);
function s(t) {
var e = M.data(t.data.target, "hidraggable"),
i = e.handle,
n = M(i).offset(),
r = M(i)[0].style.transform && parseInt(M(i)[0].style.transform.slice(7, -1)),
a = e.options.getScale(),
o = M(i).outerWidth(),
s = M(i).outerHeight(),
c = (r && (r = r * Math.PI / 180, c = M(i).outerWidth(), i = M(i).outerHeight(), l = Math.sin(r), r = Math.cos(r), o = Math.abs(c * r) + Math.abs(i * l), s = Math.abs(c * l) + Math.abs(i * r)), a && (o *= a, s *= a), t.pageY - n.top),
l = n.left + o - t.pageX,
i = n.top + s - t.pageY,
r = t.pageX - n.left;
return Math.min(c, l, i, r) > e.options.edge
}
M.data(this, "hidraggable", {
options: t,
handle: e
}), t.disabled ? M(this).css("cursor", "") : e.unbind(".hidraggable").bind("mousemove.hidraggable", {
target: this
}, function (t) {
var e;
M.fn.hidraggable.isDragging || (e = M.data(t.data.target, "hidraggable").options, s(t) ? M(this).css("cursor", e.cursor) : M(this).css("cursor", ""))
}).bind("mouseleave.hidraggable", {
target: this
}, function (t) {
M(this).css("cursor", "")
}).bind("mousedown.hidraggable", {
target: this
}, function (t) {
var e, i, n, r, a, o;
0 != s(t) && (M(this).css("cursor", ""), e = M(t.data.target).position(), r = M(t.data.target).offset(), !(e = {
startPosition: M(t.data.target).css("position"),
startLeft: e.left,
startTop: e.top,
left: e.left,
top: e.top,
startX: t.pageX,
startY: t.pageY,
offsetWidth: t.pageX - r.left,
offsetHeight: t.pageY - r.top,
target: t.data.target,
parent: M(t.data.target).parent()[0]
}) !== (r = M.data(t.data.target, "hidraggable")).options.draggable) && "r resizebtn" != t.target.className && ((r = r.options.getScale()) && (e.left /= r, e.top /= r, e.startLeft /= r, e.startTop /= r), (r = e.target.style.transform && parseInt(e.target.style.transform.slice(7, -1))) && (r = r * Math.PI / 180, o = M(t.data.target).outerWidth(), i = M(t.data.target).outerHeight(), n = Math.sin(r), r = Math.cos(r), a = (Math.abs(o * r) + Math.abs(i * n) - o) / 2, o = (Math.abs(o * n) + Math.abs(i * r) - i) / 2, e.left += a, e.top += o, e.startLeft += a, e.startTop += o), M.extend(t.data, e), 0 != M.data(t.data.target, "hidraggable").options.onBeforeDrag.call(t.data.target, t)) && (M(document).bind("mousedown.hidraggable", t.data, c), M(document).bind("mousemove.hidraggable", t.data, l), M(document).bind("mouseup.hidraggable", t.data, p))
})
})
}, M.fn.hidraggable.methods = {
options: function (t) {
return M.data(t[0], "hidraggable").options
},
update: function (e, i) {
i && "object" == Object(_home_runner_work_vue_plugin_hiprint_vue_plugin_hiprint_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_2__.a)(i) && M.data(e[0], "hidraggable") && Object.keys(i).forEach(function (t) {
M.data(e[0], "hidraggable").options[t] = i[t]
})
},
proxy: function (t) {
return M.data(t[0], "hidraggable").proxy
},
enable: function (t) {
return t.each(function () {
M(this).hidraggable({
disabled: !1
})
})
},
disable: function (t) {
return t.each(function () {
M(this).hidraggable({
disabled: !0
})
})
}
}, M.fn.hidraggable.parseOptions = function (t) {
var e = M(t);
return M.extend({}, M.hiprintparser.parseOptions(t, ["cursor", "handle", "axis", {
revert: "boolean",
deltaX: "number",
deltaY: "number",
edge: "number"
}]), {
disabled: !!e.attr("disabled") || void 0
})
}, M.fn.hidraggable.defaults = {
proxy: null,
revert: !1,
cursor: "move",
deltaX: null,
deltaY: null,
handle: null,
disabled: !1,
edge: 0,
axis: null,
getScale: function (t) { },
onBeforeDrag: function (t) { },
onStartDrag: function (t) { },
onDrag: function (t) { },
onStopDrag: function (t) { }
}, M.fn.hidraggable.isDragging = !1
}, function (t, e) {
var n;
(n = jQuery).fn.hidroppable = function (e, t) {
return "string" == typeof e ? n.fn.hidroppable.methods[e](this, t) : (e = e || {}, this.each(function () {
var i, t = n.data(this, "hidroppable");
t ? n.extend(t.options, e) : (n(i = this).addClass("hidroppable"), n(i).bind("_dragenter", function (t, e) {
n.data(i, "hidroppable").options.onDragEnter.apply(i, [t, e])
}), n(i).bind("_dragleave", function (t, e) {
n.data(i, "hidroppable").options.onDragLeave.apply(i, [t, e])
}), n(i).bind("_dragover", function (t, e) {
n.data(i, "hidroppable").options.onDragOver.apply(i, [t, e])
}), n(i).bind("_drop", function (t, e) {
n.data(i, "hidroppable").options.onDrop.apply(i, [t, e])
}), n.data(this, "hidroppable", {
options: n.extend({}, n.fn.hidroppable.defaults, n.fn.hidroppable.parseOptions(this), e)
}))
}))
}, n.fn.hidroppable.methods = {
options: function (t) {
return n.data(t[0], "hidroppable").options
},
enable: function (t) {
return t.each(function () {
n(this).hidroppable({
disabled: !1
})
})
},
disable: function (t) {
return t.each(function () {
n(this).hidroppable({
disabled: !0
})
})
}
}, n.fn.hidroppable.parseOptions = function (t) {
var e = n(t);
return n.extend({}, n.hiprintparser.parseOptions(t, ["accept"]), {
disabled: !!e.attr("disabled") || void 0
})
}, n.fn.hidroppable.defaults = {
accept: null,
disabled: !1,
onDragEnter: function (t, e) { },
onDragOver: function (t, e) { },
onDragLeave: function (t, e) { },
onDrop: function (t, e) { }
}
}, function (t, e) {
var p;
(p = jQuery).hiprintparser = {
parseOptions: function (t, e) {
var i = p(t),
n = {},
r = p.trim(i.attr("data-options"));
if (r && ("{" != r.substring(0, 1) && (r = "{" + r + "}"), n = new Function("return " + r)()), e) {
for (var a = {}, o = 0; o < e.length; o++) {
var s = e[o];
if ("string" == typeof s) a[s] = "width" == s || "height" == s || "left" == s || "top" == s ? parseInt(t.style[s]) || void 0 : i.attr(s);
else
for (var c in s) {
var l = s[c];
"boolean" == l ? a[c] = i.attr(c) ? "true" == i.attr(c) : void 0 : "number" == l && (a[c] = "0" == i.attr(c) ? 0 : parseFloat(i.attr(c)) || void 0)
}
}
p.extend(n, a)
}
return n
}
}, p.fn.dragLengthC = function (t, e) {
return "pt" == e.moveUnit ? p.fn.dragLengthCNum(t, e) + "pt" : p.fn.dragLengthCNum(t, e)
}, p.fn.dragLengthCNum = function (t, e) {
var i, n = 3;
return "pt" == e.moveUnit && (i = .75 * t, e.minMove) && (n = e.minMove), Math.round(i / n) * n
}
}, function (t, e) {
var i, w = jQuery,
m = {
maxPanelIndex: 0
};
(i = function (t) {
this.options = w.data(t.target, "hireizeable").options, this.init(t.target)
}).prototype = {
numHandlerText: function (t) {
return this.numHandler(t) + "pt"
},
numHandler: function (t) {
var e = 1.5;
return this.options.minResize && (e = this.options.minResize), Math.round(.75 * t / e) * e
},
init: function (t) {
this.initResizeBox(t)
},
initResizeBox: function (f) {
var h = this;
w(f).each(function () {
function t() {
var i = [],
n = h.options.showPoints;
return w.each([r, a, o, s, c, l, p, d], function (t, e) {
-1 < w.inArray(e.name, n) && i.push(e.target)
}), i
}
m.maxPanelIndex += 1, h.options.noContainer ? e = w(f) : (e = w("')).css({
width: "100%",
height: "100%",
top: 0,
left: 0,
position: "absolute",
"background-color": "rgba(0,0,0,0.5)",
cursor: "move",
display: "none"
}), h.appendHandler(e, w(this));
var e, r = {
name: "n",
target: w('')
},
a = {
name: "s",
target: w('')
},
o = {
name: "w",
target: w('')
},
s = {
name: "e",
target: w('')
},
c = {
name: "ne",
target: w('')
},
l = {
name: "nw",
target: w('')
},
p = {
name: "se",
target: w('')
},
d = {
name: "sw",
target: w('')
},
r = {
name: "r",
target: w('')
},
i = w(''),
n = w('
✕
'),
u = (h.refreshSizeBox(void 0, i, e), 0 != h.options.draggable && (e.append(n), e.on("mousedown", ".del-btn", function () {
var t = new KeyboardEvent("keydown", {
bubbles: !0,
keyCode: 46
});
f.dispatchEvent(t)
})), h.addHandlerCss(t()), h.appendHandler(t(), e), h.bindResizeEvent(e, w(this)), w(this));
w(e).on("mousedown", ".resizebtn", function () {
u.addClass("resizeing")
}), w(".easyui-droppable").on("mouseup", function () {
u.removeClass("resizeing")
}), h.bindTrigger(w(this))
}), h.bindHidePanel()
},
addHandlerCss: function (t) {
for (var e = 0; e < t.length; e++) t[e].css({
position: "absolute",
width: "8px",
height: "8px",
background: "#ff6600",
"border-radius": "50%"
})
},
appendHandler: function (t, e) {
e.find(".resize-panel").remove();
for (var i = 0; i < t.length; i++) e.append(t[i])
},
refreshSizeBox: function (t, e, i) {
if (this.options.showSizeBox) {
var n, r;
if (e && i.append(e), t && t.length) n = t[0].style, r = t.children("div[panelindex]").find(".size-box");
else if (i && i.parent()) {
if ((t = i.parent()).hasClass("hiprint-printPaper-content")) return;
(n = t[0].style).width || (n.width = hinnn.px.toPt(t[0].offsetWidth) + "pt"), n.height || (n.height = hinnn.px.toPt(t[0].offsetHeight) + "pt"), r = t.children("div[panelindex]").find(".size-box")
}
r && (r.text(n.width + " x " + n.height), r.css("top", -(r.outerHeight() || 20)))
}
},
triggerResize: function (t, e) {
e.ctrlKey || e.metaKey || (t.siblings().children("div[panelindex]").removeClass("selected"), t.siblings().children("div[panelindex]").css({
display: "none"
})), t.children("div[panelindex]").addClass("selected"), t.children("div[panelindex]").css({
display: "block"
}), this.refreshSizeBox(t)
},
bindResizeEvent: function (a, t) {
var o = this,
s = 0,
c = 0,
l = a.width(),
p = a.height(),
d = a.offset().left,
u = a.offset().top,
f = o.options.noContainer ? w(t) : a.parent(),
h = !1,
m = (a.on("mousedown", ".e", function (t) {
s = t.pageX, l = a.width(), h = !0
}), !1),
g = (a.on("mousedown", ".s", function (t) {
c = t.pageY, p = a.height(), m = !0
}), !1),
v = (a.on("mousedown", ".w", function (t) {
s = t.pageX, l = a.width(), g = !0, d = f.offset().left
}), !1),
b = (a.on("mousedown", ".n", function (t) {
c = t.pageY, p = a.height(), v = !0, u = f.offset().top
}), !1),
I = (a.on("mousedown", ".ne", function (t) {
s = t.pageX, c = t.pageY, l = a.width(), p = a.height(), b = !0, u = f.offset().top
}), !1),
A = (a.on("mousedown", ".nw", function (t) {
s = t.pageX, c = t.pageY, l = a.width(), p = a.height(), u = f.offset().top, d = f.offset().left, I = !0
}), !1),
_ = (a.on("mousedown", ".se", function (t) {
s = t.pageX, c = t.pageY, l = a.width(), p = a.height(), A = !0
}), !1),
y = (a.on("mousedown", ".sw", function (t) {
s = t.pageX, c = t.pageY, l = a.width(), p = a.height(), _ = !0, d = f.offset().left
}), !1),
x = (a.on("mousedown", ".r", function (t) {
s = t.pageX, c = t.pageY, l = a.width(), p = a.height(), y = !0, d = l / 2 + f.offset().left, u = p / 2 + f.offset().top
}), a.on("dblclick", ".r", function (t) {
f.css({
transform: "rotate(0deg)"
}), o.options.onResize(t, void 0, void 0, void 0, void 0, 0)
}), !1);
a.on("mousedown", function (t) {
o.options.onBeforeResize(), s = t.pageX, c = t.pageY, u = f.offset().top, d = f.offset().left, x = !1
}), w(o.options.stage).on("mousemove", function (t) {
var e, i, n, r;
h ? (n = (t.pageX - s) / o.options.getScale(), a.css({
width: "100%"
}), f.css({
width: o.numHandlerText(l + n)
}), o.options.onResize(t, void 0, o.numHandler(l + n), void 0, void 0)) : m ? (r = (t.pageY - c) / o.options.getScale(), a.css({
height: "100%"
}), f.css({
height: o.numHandlerText(p + r)
}), o.options.onResize(t, o.numHandler(p + r), void 0, void 0, void 0)) : y ? (a.css({
height: "100%"
}), i = t.pageX, t.pageY, i = 360 * (i - s) / 100, s = t.pageX, i = (f[0].style.transform && parseInt(f[0].style.transform.slice(7, -1)) || 0) + i, 360 < Math.abs(i) && (i %= 360), f.css({
transform: "rotate(" + i + "deg)"
}), o.options.onResize(t, void 0, void 0, void 0, void 0, i)) : g ? (n = (t.pageX - s) / o.options.getScale(), a.css({
width: "100%"
}), f.css({
width: o.numHandlerText(l - n),
left: o.numHandlerText(o.options.noDrag ? void 0 : o.numHandler(d + n))
}), o.options.onResize(t, void 0, o.numHandler(l - n), void 0, o.options.noDrag ? void 0 : o.numHandler(d + n))) : v ? (r = (t.pageY - c) / o.options.getScale(), a.css({
height: "100%"
}), f.css({
height: o.numHandlerText(p - r),
top: o.numHandlerText(o.options.noDrag ? void 0 : u + r)
}), o.options.onResize(t, o.numHandler(p - r), void 0, o.options.noDrag ? void 0 : o.numHandler(u + r), void 0)) : b ? (n = (t.pageX - s) / o.options.getScale(), r = (t.pageY - c) / o.options.getScale(), a.css({
height: "100%",
width: "100%"
}), f.css({
height: o.numHandlerText(p - r),
top: o.numHandlerText(o.options.noDrag ? void 0 : u + r),
width: o.numHandlerText(l + n)
}), o.options.onResize(t, o.numHandler(p - r), o.numHandler(l + n), o.options.noDrag ? void 0 : o.numHandler(u + r), void 0)) : I ? (n = (t.pageX - s) / o.options.getScale(), r = (t.pageY - c) / o.options.getScale(), a.css({
height: "100%",
width: "100%"
}), f.css({
height: o.numHandlerText(p - r),
top: o.numHandlerText(o.options.noDrag ? void 0 : u + r),
width: o.numHandlerText(l - n),
left: o.numHandlerText(o.options.noDrag ? void 0 : d + n)
}), o.options.onResize(t, o.numHandler(p - r), o.numHandler(l - n), o.options.noDrag ? void 0 : o.numHandler(u + r), o.options.noDrag ? void 0 : o.numHandler(d + n))) : A ? (n = (t.pageX - s) / o.options.getScale(), r = (t.pageY - c) / o.options.getScale(), a.css({
width: "100%",
height: "100%"
}), t.shiftKey ? (f.css({
width: o.numHandlerText(l + n),
height: o.numHandlerText(p + r)
}), o.options.onResize(t, o.numHandler(p + r), o.numHandler(l + n), void 0, void 0)) : (i = p + r, i = (e = l + n) * (p / l), f.css({
width: o.numHandlerText(e),
height: o.numHandlerText(i)
}), o.options.onResize(t, o.numHandler(i), o.numHandler(e), void 0, void 0))) : _ ? (n = (t.pageX - s) / o.options.getScale(), r = (t.pageY - c) / o.options.getScale(), a.css({
width: "100%",
height: "100%"
}), f.css({
width: o.numHandlerText(l - n),
left: o.numHandlerText(o.options.noDrag ? void 0 : d + n),
height: o.numHandlerText(p + r)
}), o.options.onResize(t, o.numHandler(p + r), o.numHandler(l - n), o.numHandler(otundefinedop), o.options.noDrag ? void 0 : o.numHandler(d + n))) : x && (n = (t.pageX - s) / o.options.getScale(), r = (t.pageY - c) / o.options.getScale(), f.css({
left: o.numHandlerText(o.options.noDrag ? void 0 : d + n),
top: o.numHandlerText(o.options.noDrag ? void 0 : u + r)
}), o.options.onResize(t, void 0, void 0, o.options.noDrag ? void 0 : o.numHandler(u + r), o.options.noDrag ? void 0 : o.numHandler(d + n)))
}).on("mouseup", function (t) {
(h || m || g || v || b || I || _ || A || x || y) && o.options.onStopResize(y), y = x = A = _ = I = b = v = g = m = h = !1
})
},
bindTrigger: function (e) {
var i = this;
e.on("click", function (t) {
t.stopPropagation(), i.triggerResize(e, t), w(".mouseRect").remove()
})
},
bindHidePanel: function (t) {
var e;
m.maxPanelIndex < 2 && (e = this.options.stage, w(e).bind("click", function (t) {
t.target.className && "string" == _typeof(t.target.className) && t.target.className.includes("design") && (t.stopPropagation(), w("div[panelindex]").css({
display: "none"
}), w("div[panelindex]").removeClass("selected"))
}))
}
}, w.fn.extend({
hireizeable: function (e) {
return this.each(function () {
var t = w.data(this, "hireizeable"),
t = t ? w.extend({}, t.options, e || {}) : w.extend({}, w.fn.hireizeable.defaults, e || {});
w.data(this, "hireizeable", {
options: t
}), new i({
target: this,
onResize: function (t, e, i, n, r) { },
onStopResize: function (t, e, i, n, r) { }
})
})
}
}), w.fn.hireizeable.defaults = {
stage: document,
reizeUnit: "pt",
minResize: 1.5,
showSizeBox: !0,
showPoints: ["s", "e"],
noContainer: !1,
onBeforeResize: function (t, e, i, n, r) { },
onResize: function (t, e, i, n, r) { },
onStopResize: function (t, e, i, n, r) { },
noDrag: !1
}
}, function (t, e) {
var r = "connected",
i = "reconnecting";
window.hiwebSocket = {
opened: !1,
name: "webSockets",
host: "http://localhost:17521",
token: null,
reconnectTimeout: 6e4,
reconnectWindowSetTimeout: null,
reconnectDelay: 2e3,
supportsKeepAlive: function () {
return !0
},
hasIo: function (t) {
return window.io
},
send: function (t) {
try {
this.socket.emit("news", t)
} catch (t) { }
},
getPrinterList: function () {
return this.printerList
},
refreshPrinterList: function () {
try {
this.socket.emit("refreshPrinterList")
} catch (t) { }
},
getClients: function () {
try {
this.socket.emit("getClients")
} catch (t) { }
},
getAddress: function (t) {
try {
for (var e, i = arguments.length, n = new Array(1 < i ? i - 1 : 0), r = 1; r < i; r++) n[r - 1] = arguments[r];
(e = this.socket).emit.apply(e, ["address", t].concat(n))
} catch (t) { }
},
ippPrint: function (t) {
try {
this.socket.emit("ippPrint", t)
} catch (t) { }
},
ippRequest: function (t) {
try {
this.socket.emit("ippRequest", t)
} catch (t) { }
},
setHost: function (t, e, i) {
"function" == typeof e && (i = e, e = void 0), this.host = t, this.token = e, this.stop(), this.start(i)
},
start: function (e) {
var i = this,
n = this;
window.WebSocket && !this.socket && (this.socket = window.io(this.host, {
transports: ["websocket"],
reconnectionAttempts: 5,
auth: {
token: this.token
}
}), this.socket.on("connect", function (t) {
n.opened = !0, i.socket.on("successs", function (t) {
hinnn.event.trigger("printSuccess_" + t.templateId, t)
}), i.socket.on("error", function (t) {
hinnn.event.trigger("printError_" + t.templateId, t)
}), i.socket.on("clients", function (t) {
n.clients = t, hinnn.event.trigger("clients", t)
}), i.socket.on("clientInfo", function (t) {
n.clientInfo = t, hinnn.event.trigger("clientInfo", t)
}), i.socket.on("printerList", function (t) {
n.printerList = t, hinnn.event.trigger("printerList", t)
}), i.socket.on("address", function (t, e, i) {
hinnn.event.trigger("address_" + t, {
addr: e,
e: i
})
}), i.socket.on("ippPrinterConnected", function (t) {
hinnn.event.trigger("ippPrinterConnected", t)
}), i.socket.on("ippPrinterCallback", function (t, e) {
hinnn.event.trigger("ippPrinterCallback", {
err: t,
res: e
})
}), i.socket.on("ippRequestCallback", function (t, e) {
hinnn.event.trigger("ippRequestCallback", {
err: t,
res: e
})
}), n.state = r, e && e(!0, t)
}), this.socket.on("connect_error", function (t) {
hinnn.event.trigger("connect_error", t)
}), this.socket.on("disconnect", function () {
n.opened = !1, e && e(!1)
})), e && e(!1)
},
reconnect: function () {
this.state !== r && this.state !== i || (this.stop(), this.ensureReconnectingState() && this.start())
},
stop: function () {
this.socket && (this.socket.close(), this.socket = null, this.printerList = [])
},
ensureReconnectingState: function () {
return this.state = i, this.state === i
}
}
}, function (t, e, i) {
var n = i(28);
"string" == typeof n && (n = [
[t.i, n, ""]
]);
i(30)(n, {
hmr: !0,
transform: void 0,
insertInto: void 0
}), n.locals && (t.exports = n.locals)
}, function (t, e, i) {
(t.exports = i(29)(!1)).push([t.i, ".hicontextmenu {\r\n\tposition: absolute;\r\n\tdisplay: inline-block;\r\n\twidth: 215px;\r\n\tpadding: 0 0;\r\n\tmargin: 0;\r\n\tfont-family: inherit;\r\n\tfont-size: inherit;\r\n\tlist-style-type: none;\r\n\tlist-style: none;\r\n\tbackground: #fff;\r\n\tborder: 1px solid #bebebe;\r\n\tborder-radius: 2px;\r\n\tfont-size: 13px;\r\n}\r\n\r\n.hicontextmenuroot .hicontextmenuitem {\r\n\tposition: relative;\r\n\t-webkit-box-sizing: content-box;\r\n\t-moz-box-sizing: content-box;\r\n\tbox-sizing: content-box;\r\n\tpadding: .2em 12px;\r\n\tcolor: #2f2f2f;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\ttext-decoration: none;\r\n\r\n\tuser-select: none;\r\n\tbackground-color: #fff;\r\n\r\n}\r\n\r\n.hicontextmenuroot>.hicontextmenuitem:hover,\r\n.hicontextmenuroot .hicontextmenuitem > a:hover {\r\n\tbackground-color: #f3f3f3;\r\n}\r\n\r\n.hicontextmenuroot .hicontextmenuitem>a {\r\n\ttext-decoration: none;\r\n\tcolor: #363636;\r\n\tline-height: 22px;\r\n\r\n}\r\n\r\n.hicontextmenuroot .hicontextsubmenu>ul {\r\n\tdisplay: none;\r\n\tposition: absolute;\r\n\r\n}\r\n\r\n.hicontextmenuroot .hicontextsubmenu:hover>ul {\r\n\tdisplay: block;\r\n\tleft: 100%;\r\n\ttop: -1px;\r\n\tmargin-left: 0px;\r\n}\r\n\r\n.hicontextmenuroot .borderBottom {\r\n\tborder-bottom: 1px solid #efe6e6;\r\n}\r\n\r\n.hicontextmenuroot .disable> a {\r\n \r\n color: #ccc;\r\n \r\n}\r\n.hicontextmenuroot>.disable:hover,\r\n.hicontextmenuroot .disable> a:hover {\r\n\tbackground-color:#fff;\r\n}", ""])
}, function (t, e, i) {
t.exports = function (a) {
var o = [];
return o.toString = function () {
return this.map(function (t) {
i = t[1] || "";
var e, i, n, r = (n = t[3]) ? (a && "function" == typeof btoa ? (e = "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(n)))) + " */", r = n.sources.map(function (t) {
return "/*# sourceURL=" + n.sourceRoot + t + " */"
}), [i].concat(r).concat([e])) : [i]).join("\n") : i;
return t[2] ? "@media " + t[2] + "{" + r + "}" : r
}).join("")
}, o.i = function (t, e) {
"string" == typeof t && (t = [
[null, t, ""]
]);
for (var i = {}, n = 0; n < this.length; n++) {
var r = this[n][0];
null != r && (i[r] = !0)
}
for (n = 0; n < t.length; n++) {
var a = t[n];
null != a[0] && i[a[0]] || (e && !a[2] ? a[2] = e : e && (a[2] = "(" + a[2] + ") and (" + e + ")"), o.push(a))
}
}, o
}
}, function (t, e, n) {
var i, r, a, c = {},
o = (i = function () {
return window && document && document.all && !window.atob
}, a = {}, function (t, e) {
if ("function" == typeof t) return t();
if (void 0 === a[t]) {
e = function (t, e) {
return (e || document).querySelector(t)
}.call(this, t, e);
if (window.HTMLIFrameElement && _instanceof(e, window.HTMLIFrameElement)) try {
e = e.contentDocument.head
} catch (t) {
e = null
}
a[t] = e
}
return a[t]
}),
s = null,
l = 0,
p = [],
d = n(31);
function u(t, e) {
for (var i = 0; i < t.length; i++) {
var n = t[i],
r = c[n.id];
if (r) {
r.refs++;
for (var a = 0; a < r.parts.length; a++) r.parts[a](n.parts[a]);
for (; a < n.parts.length; a++) r.parts.push(b(n.parts[a], e))
} else {
for (var o = [], a = 0; a < n.parts.length; a++) o.push(b(n.parts[a], e));
c[n.id] = {
id: n.id,
refs: 1,
parts: o
}
}
}
}
function f(t, e) {
for (var i = [], n = {}, r = 0; r < t.length; r++) {
var a = t[r],
o = e.base ? a[0] + e.base : a[0],
a = {
css: a[1],
media: a[2],
sourceMap: a[3]
};
n[o] ? n[o].parts.push(a) : i.push(n[o] = {
id: o,
parts: [a]
})
}
return i
}
function h(t, e) {
var i = o(t.insertInto);
if (!i) throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
var n = p[p.length - 1];
if ("top" === t.insertAt) n ? n.nextSibling ? i.insertBefore(e, n.nextSibling) : i.appendChild(e) : i.insertBefore(e, i.firstChild), p.push(e);
else if ("bottom" === t.insertAt) i.appendChild(e);
else {
if ("object" != _typeof(t.insertAt) || !t.insertAt.before) throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
n = o(t.insertAt.before, i);
i.insertBefore(e, n)
}
}
function m(t) {
null !== t.parentNode && (t.parentNode.removeChild(t), 0 <= (t = p.indexOf(t))) && p.splice(t, 1)
}
function g(t) {
var e, i = document.createElement("style");
return void 0 === t.attrs.type && (t.attrs.type = "text/css"), void 0 === t.attrs.nonce && (e = n.nc) && (t.attrs.nonce = e), v(i, t.attrs), h(t, i), i
}
function v(e, i) {
Object.keys(i).forEach(function (t) {
e.setAttribute(t, i[t])
})
}
function b(e, t) {
var i, n, r, a, o;
if (t.transform && e.css) {
if (!(a = "function" == typeof t.transform ? t.transform(e.css) : t.transform.default(e.css))) return function () { };
e.css = a
}
return r = t.singleton ? (a = l++, i = s = s || g(t), n = _.bind(null, i, a, !1), _.bind(null, i, a, !0)) : e.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (a = t, o = document.createElement("link"), void 0 === a.attrs.type && (a.attrs.type = "text/css"), a.attrs.rel = "stylesheet", v(o, a.attrs), h(a, o), i = o, n = function (t, e, i) {
var n = i.css,
i = i.sourceMap,
r = void 0 === e.convertToAbsoluteUrls && i,
e = ((e.convertToAbsoluteUrls || r) && (n = d(n)), i && (n += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(i)))) + " */"), new Blob([n], {
type: "text/css"
})),
r = t.href;
t.href = URL.createObjectURL(e), r && URL.revokeObjectURL(r)
}.bind(null, i, t), function () {
m(i), i.href && URL.revokeObjectURL(i.href)
}) : (i = g(t), n = function (t, e) {
var i = e.css,
e = e.media;
if (e && t.setAttribute("media", e), t.styleSheet) t.styleSheet.cssText = i;
else {
for (; t.firstChild;) t.removeChild(t.firstChild);
t.appendChild(document.createTextNode(i))
}
}.bind(null, i), function () {
m(i)
}), n(e),
function (t) {
t ? t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap || n(e = t) : r()
}
}
t.exports = function (t, o) {
if ("undefined" != typeof DEBUG && DEBUG && "object" != ("undefined" == typeof document ? "undefined" : _typeof(document))) throw new Error("The style-loader cannot be used in a non-browser environment");
(o = o || {}).attrs = "object" == _typeof(o.attrs) ? o.attrs : {}, o.singleton || "boolean" == typeof o.singleton || (o.singleton = function () {
return r = void 0 === r ? i.apply(this, arguments) : r
}()), o.insertInto || (o.insertInto = "head"), o.insertAt || (o.insertAt = "bottom");
var s = f(t, o);
return u(s, o),
function (t) {
for (var e, i = [], n = 0; n < s.length; n++) {
var r = s[n];
(e = c[r.id]).refs--, i.push(e)
}
for (t && u(f(t, o), o), n = 0; n < i.length; n++)
if (0 === (e = i[n]).refs) {
for (var a = 0; a < e.parts.length; a++) e.parts[a]();
delete c[e.id]
}
}
};
I = [];
var I, A = function (t, e) {
return I[t] = e, I.filter(Boolean).join("\n")
};
function _(t, e, i, n) {
var i = i ? "" : n.css;
t.styleSheet ? t.styleSheet.cssText = A(e, i) : (n = document.createTextNode(i), (i = t.childNodes)[e] && t.removeChild(i[e]), i.length ? t.insertBefore(n, i[e]) : t.appendChild(n))
}
}, function (t, e) {
t.exports = function (t) {
var i, n, e = "undefined" != typeof window && window.location;
if (e) return t && "string" == typeof t ? (i = e.protocol + "//" + e.host, n = i + e.pathname.replace(/\/[^\/]*$/, "/"), t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function (t, e) {
e = e.trim().replace(/^"(.*)"$/, function (t, e) {
return e
}).replace(/^'(.*)'$/, function (t, e) {
return e
});
return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(e) ? t : (t = 0 === e.indexOf("//") ? e : 0 === e.indexOf("/") ? i + e : n + e.replace(/^\.\//, ""), "url(" + JSON.stringify(t) + ")")
})) : t;
throw new Error("fixUrls requires window.location")
}
}, function (t, e) {
var i, n;
window, document, i = jQuery, (n = function (t, e) {
this.init(t, e)
}).prototype = {
init: function (t, e) {
this.ele = t, this.defaults = {
menu: [{
text: "text",
menus: [{}, {}],
callback: function () { }
}],
target: function (t) { },
width: 100,
itemHeight: 28,
bgColor: "#fff",
color: "#333",
fontSize: 14,
hoverBgColor: "#f5f5f5"
}, this.opts = i.extend(!0, {}, this.defaults, e), this.random = (new Date).getTime() + parseInt(1e3 * Math.random()), this.eventBind()
},
renderMenu: function (t, e) {
var r, a = this,
i = e;
t && t.length && (r = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'), i || (i = r).addClass("hicontextmenuroot"), jquery__WEBPACK_IMPORTED_MODULE_60___default.a.each(t, function (t, e) {
var i = !!e.disable && e.disable(),
n = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
")
}), n.append(e)
}), jquery__WEBPACK_IMPORTED_MODULE_60___default()(t).append(n), n.find(".ep-draggable-item")
}, t
}(),
u = n(5),
d = n(15),
c = function (t) {
this.title = t.title, this.type = t.type
},
ctable = function (t) {
this.title = t.title, this.type = t.type, this.editable = t.editable, this.columnDisplayEditable = t.columnDisplayEditable, this.columnDisplayIndexEditable = t.columnDisplayIndexEditable, this.columnTitleEditable = t.columnTitleEditable, this.columnResizable = t.columnResizable, this.columnAlignEditable = t.columnAlignEditable, this.isEnableEditField = t.isEnableEditField, this.isEnableContextMenu = t.isEnableContextMenu, this.isEnableInsertRow = t.isEnableInsertRow, this.isEnableDeleteRow = t.isEnableDeleteRow, this.isEnableInsertColumn = t.isEnableInsertColumn, this.isEnableDeleteColumn = t.isEnableDeleteColumn, this.isEnableMergeCell = t.isEnableMergeCell
},
h = function () {
function t(t) {
var i = this;
this.text = t.text, this.field = t.field, this.fields = t.fields, this.title = t.title, this.tid = t.tid, this.data = t.data, this.styler = t.styler, this.formatter = t.formatter, this.type = t.type, this.options = t.options, this.editable = null == t.editable || t.editable, this.columnDisplayEditable = null == t.columnDisplayEditable || t.columnDisplayEditable, this.columnDisplayIndexEditable = null == t.columnDisplayIndexEditable || t.columnDisplayIndexEditable, this.columnTitleEditable = null == t.columnTitleEditable || t.columnTitleEditable, this.columnResizable = null == t.columnResizable || t.columnResizable, this.columnAlignEditable = null == t.columnAlignEditable || t.columnAlignEditable, this.columns = [], (t.columns || []).forEach(function (t, e) {
i.columns.push(i.createTableColumnArray(t))
}), this.rowStyler = t.rowStyler, this.striped = t.striped, this.groupFields = t.groupFields || [], this.groupFormatter = t.groupFormatter, this.groupFooterFormatter = t.groupFooterFormatter, this.footerFormatter = t.footerFormatter, this.rowsColumnsMerge = t.rowsColumnsMerge, this.rowsColumnsMergeClean = t.rowsColumnsMergeClean, this.gridColumnsFooterFormatter = t.gridColumnsFooterFormatter, this.isEnableEditField = null == t.isEnableEditField || t.isEnableEditField, this.isEnableContextMenu = null == t.isEnableContextMenu || t.isEnableContextMenu, this.isEnableInsertRow = null == t.isEnableInsertRow || t.isEnableInsertRow, this.isEnableDeleteRow = null == t.isEnableDeleteRow || t.isEnableDeleteRow, this.isEnableInsertColumn = null == t.isEnableInsertColumn || t.isEnableInsertColumn, this.isEnableDeleteColumn = null == t.isEnableDeleteColumn || t.isEnableDeleteColumn, this.isEnableMergeCell = null == t.isEnableMergeCell || t.isEnableMergeCell, this.columnObj = this.makeColumnObj()
}
return t.prototype.getText = function () {
return this.text || this.title || ""
}, t.prototype.createPrintElement = function (t) {
var i = this;
return this.columns && 0 == this.columns.length && (t.columns || []).forEach(function (t, e) {
i.columns.push(i.createTableColumnArray(t))
}), new d.a(this, t)
}, t.prototype.getData = function () {
return [{}]
}, t.prototype.createTableColumnArray = function (t) {
var i = [];
return t.forEach(function (t, e) {
i.push(new u.a(t))
}), i
}, t.prototype.getPrintElementTypeEntity = function () {
return "table" == this.type ? new ctable({
title: this.title,
type: this.type,
editable: this.editable,
columnDisplayEditable: this.columnDisplayEditable,
columnDisplayIndexEditable: this.columnDisplayIndexEditable,
columnResizable: this.columnResizable,
columnAlignEditable: this.columnAlignEditable,
columnTitleEditable: this.columnTitleEditable,
isEnableEditField: this.isEnableEditField,
isEnableContextMenu: this.isEnableContextMenu,
isEnableInsertRow: this.isEnableInsertRow,
isEnableDeleteRow: this.isEnableDeleteRow,
isEnableInsertColumn: this.isEnableInsertColumn,
isEnableDeleteColumn: this.isEnableDeleteColumn,
isEnableMergeCell: this.isEnableMergeCell
}) : new c({
title: this.title,
type: this.type
})
}, t.prototype.getFields = function () {
return this.fields
}, t.prototype.getOptions = function () {
return this.options || {}
}, t.prototype.getColumnByColumnId = function (t) {
return this.columnObj[t]
}, t.prototype.makeColumnObj = function (t) {
var e = {};
return t ? t.forEach(function (t) {
(t.id || t.columnId) && (e[t.id || t.columnId] = t)
}) : this.columns && this.columns.forEach(function (t) {
t.forEach(function (t) {
(t.id || t.columnId) && (e[t.id || t.columnId] = t)
})
}), this.columnObj = e
}, t
}(),
f = n(4),
g = n(3),
m = (_r = function (t, e) {
return (_r = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
}, function (t, e) {
function i() {
this.constructor = t
}
_r(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}),
v = function (i) {
function t(t, e) {
t = i.call(this, t) || this;
return t.options = new g.a(e), t.options.setDefault(new g.a(p.a.instance.image.default).getPrintElementOptionEntity()), t
}
return m(t, i), t.prototype.getReizeableShowPoints = function () {
return ["se", "r"]
}, t.prototype.getData = function (i) {
var t = "",
e = this.getField(),
t = i && e ? e.split(".").reduce(function (t, e) {
return (t || i)[e]
}, !1) || "" : this.options.src || this.printElementType.getData(),
e = this.getFormatter();
return (t = e ? e(t, this.options, this._currenttemplateData) : t) || ""
}, t.prototype.createTarget = function (t, e) {
var i = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
');
return this.updateTargetImage(i, t, e), i
}, t.prototype.initSizeByHtml = function (t) {
i.prototype.initSizeByHtml.call(this, t), this.css(t, this.getData())
}, t.prototype.getConfigOptions = function () {
return p.a.instance.image
}, t.prototype.updateDesignViewFromOptions = function () {
this.designTarget && (this.css(this.designTarget, this.getData()), this.updateTargetImage(this.designTarget, this.getTitle(), this.getData()))
}, t.prototype.updateTargetImage = function (t, e, i) {
t = t.find(".hiprint-printElement-image-content");
t.find("img").length ? t.find("img").attr("src", i) : t.html(''), i.length ? t.find("img").css("cssText", 'width:100%;height:100%;content:url("'.concat(i, '")!important')) : t.find("img").css("cssText", "width:100%;height:100%;"), this.options.fit && t.find("img").css("object-fit", this.options.fit)
}, t.prototype.getHtml = function (t, e, i) {
return this.getHtml2(t, e, i)
}, t
}(f.a),
y = function () {
var n = function (t, e) {
return (n = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
};
return function (t, e) {
function i() {
this.constructor = t
}
n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}
}(),
b = function (i) {
function t(t) {
var e = this;
return (e = i.call(this, t = t || {}) || this).leftSpaceRemoved = t.leftSpaceRemoved, e
}
return y(t, i), t.prototype.getHideTitle = function () {
return (null == this.hideTitle ? this.defaultOptions : this).hideTitle
}, t
}(g.a),
E = n(8),
T = function () {
function t(t, e, i, n, r, a, s, c, l, p, d, u, f, h, m, g) {
this.panelPageRule = n, this.scale = r, this.watermarkOptions = i, this.defaultPaperNumberFormat = "${paperNo}-${paperCount}", this.printLine = 0, this.templateId = t, this.panelIdx = e, this.width = o.a.mm.toPt(a), this.height = o.a.mm.toPt(s), this.mmwidth = a, this.mmheight = s, this.paperHeader = 0 <= c ? c : 0, this.paperFooter = l, this.contentHeight = l - c, this.createTarget(), this.index = m, this.paperNumberLeft = p || parseInt((this.width - 30).toString()), this.paperNumberTop = d || parseInt((this.height - 22).toString()), this.paperNumberDisabled = u, this.paperNumberContinue = f, this.paperNumberFormat = h, this.referenceElement = g ? jquery__WEBPACK_IMPORTED_MODULE_60___default.a.extend({}, g) : new E.a({
top: 0,
left: 0,
height: 0,
width: 0,
bottomInLastPaper: 0,
beginPrintPaperIndex: 0,
printTopInPaper: 0,
endPrintPaperIndex: 0
})
}
return t.prototype.subscribePaperBaseInfoChanged = function (t) {
this.onPaperBaseInfoChanged = t
}, t.prototype.triggerOnPaperBaseInfoChanged = function (t) {
this.onPaperBaseInfoChanged && this.onPaperBaseInfoChanged({
panelPageRule: this.panelPageRule,
scale: this.scale,
paperHeader: this.paperHeader,
paperFooter: this.paperFooter,
paperNumberLeft: this.paperNumberLeft,
paperNumberTop: this.paperNumberTop,
paperNumberDisabled: this.paperNumberDisabled,
paperNumberContinue: this.paperNumberContinue,
paperNumberFormat: this.paperNumberFormat
}), o.a.event.trigger("hiprintTemplateDataChanged_" + this.templateId, t || "模板调整")
}, t.prototype.setFooter = function (t, e, i, n) {
this.firstPaperFooter = t, this.evenPaperFooter = e, this.oddPaperFooter = i, this.lastPaperFooter = n
}, t.prototype.setOffset = function (t, e) {
this.setLeftOffset(t), this.setTopOffset(e)
}, t.prototype.setLeftOffset = function (t) {
t ? this.paperContentTarget.css("left", t + "pt") : this.paperContentTarget[0].style.left = ""
}, t.prototype.setTopOffset = function (t) {
t ? this.paperContentTarget.css("top", t + "pt") : this.paperContentTarget[0].style.top = ""
}, t.prototype.createTarget = function () {
this.target = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'), this.paperContentTarget = this.target.find(".hiprint-printPaper-content"), this.target.css("width", this.mmwidth + "mm"), this.target.css("height", this.mmheight - p.a.instance.paperHeightTrim + "mm"), this.target.attr("original-height", this.mmheight), this.zoom(this.scale)
}, t.prototype.createHeaderLine = function () {
var i = this;
this.headerLinetarget = jquery__WEBPACK_IMPORTED_MODULE_60___default()(''), this.headerLinetarget.css("top", (this.paperHeader || -1) + "pt"), 0 == this.paperHeader && this.headerLinetarget.addClass("hideheaderLinetarget"), this.paperContentTarget.append(this.headerLinetarget), this.dragHeadLineOrFootLine(this.headerLinetarget, function (t, e) {
e >= i.paperFooter && (e = i.paperFooter - 10), i.paperHeader = 0 <= e ? e : 0, i.triggerOnPaperBaseInfoChanged()
})
}, t.prototype.createFooterLine = function () {
var i = this;
this.footerLinetarget = jquery__WEBPACK_IMPORTED_MODULE_60___default()(''), this.footerLinetarget.css("top", parseInt(this.paperFooter.toString()) + "pt"), this.paperFooter == this.height && (this.footerLinetarget.css("top", this.mmheight - p.a.instance.paperHeightTrim + "mm"), this.footerLinetarget.addClass("hidefooterLinetarget")), this.paperContentTarget.append(this.footerLinetarget), this.dragHeadLineOrFootLine(this.footerLinetarget, function (t, e) {
e <= i.paperHeader && (e = i.paperHeader + 10), i.paperFooter = e, i.triggerOnPaperBaseInfoChanged()
})
}, t.prototype.createPaperNumber = function (t, e) {
var i = this,
n = this.target.find(".hiprint-paperNumber");
return n.length ? n.html(t) : ((n = jquery__WEBPACK_IMPORTED_MODULE_60___default()('' + t + "")).css("top", this.paperNumberTop + "pt"), n.css("left", this.paperNumberLeft + "pt"), this.paperContentTarget.append(n), e && this.dragHeadLineOrFootLine(n, function (t, e) {
i.paperNumberTop = e, i.paperNumberLeft = t, i.triggerOnPaperBaseInfoChanged()
}, !0)), n
}, t.prototype.getTarget = function () {
return this.target
}, t.prototype.append = function (t) {
this.paperContentTarget.append(t)
}, t.prototype.updateReferenceElement = function (t) {
t && (this.referenceElement = t)
}, t.prototype.updatePrintLine = function (t) {
t >= this.printLine && (this.printLine = t)
}, t.prototype.design = function (t) {
var e = this;
this.createHeaderLine(), this.createFooterLine(), this.target.addClass("design"), t && t.grid && this.target.addClass("grid"), this.paperNumberTarget = this.createPaperNumber(this.formatPaperNumber(1, 1), !0), this.createRuler(), this.createWaterMark(!0, this.panelIdx, this.watermarkOptions), this.resetPaperNumber(this.paperNumberTarget), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.paperNumberTarget).bind("dblclick.hiprint", function () {
null == e.paperNumberDisabled && (e.paperNumberDisabled = !1), e.paperNumberDisabled = !e.paperNumberDisabled, e.resetPaperNumber(e.paperNumberTarget), e.triggerOnPaperBaseInfoChanged("初始")
}), jquery__WEBPACK_IMPORTED_MODULE_60___default()(this.paperNumberTarget).bind("click.hiprint", function () {
o.a.event.trigger("BuildCustomOptionSettingEventKey_" + e.templateId, {
options: {
paperNumberFormat: e.paperNumberFormat,
paperNumberDisabled: e.paperNumberDisabled,
paperNumberContinue: e.paperNumberContinue
},
callback: function (t) {
e.paperNumberDisabled = !!t.paperNumberDisabled || void 0, e.paperNumberContinue = t.paperNumberContinue, e.paperNumberFormat = t.paperNumberFormat || void 0, e.createPaperNumber(e.formatPaperNumber(1, 1), !0), e.resetPaperNumber(e.paperNumberTarget), e.triggerOnPaperBaseInfoChanged()
}
})
})
}, t.prototype.resetPaperNumber = function (t) {
this.paperNumberDisabled ? t.addClass("hiprint-paperNumber-disabled") : t.removeClass("hiprint-paperNumber-disabled")
}, t.prototype.updatePaperNumber = function (t, e, i) {
t = this.createPaperNumber(this.formatPaperNumber(t, e));
this.paperNumberDisabled ? t.hide() : i && this.index % 2 == 1 && (t[0].style.left = "", t.css("right", this.paperNumberLeft + "pt"))
}, t.prototype.formatPaperNumber = function (t, e) {
return this.createWaterMark(!1, t, this.watermarkOptions), eval("`" + (this.paperNumberFormat || this.defaultPaperNumberFormat).replace("paperNo", t).replace("paperCount", e) + "`")
}, t.prototype.dragHeadLineOrFootLine = function (t, n, e) {
var i = this;
t.hidraggable({
axis: e ? void 0 : "v",
onDrag: function (t, e, i) {
n(e, i)
},
moveUnit: "pt",
minMove: p.a.instance.movingDistance,
onBeforeDrag: function (t) {
s.a.instance.draging = !0
},
getScale: function () {
return i.scale || 1
},
onStopDrag: function (t) {
i.headerLinetarget.css("top", i.paperHeader + "pt"), i.footerLinetarget.css("top", i.paperFooter + "pt"), s.a.instance.draging = !1, i.footerLinetarget.removeClass("hidefooterLinetarget"), i.headerLinetarget.removeClass("hideheaderLinetarget")
}
})
}, t.prototype.resize = function (t, e) {
var i = this.paperFooter / this.height,
t = (this.width = o.a.mm.toPt(t), this.height = o.a.mm.toPt(e), this.mmwidth = t, this.mmheight = e, this.target.css("width", t + "mm"), this.target.css("height", e - p.a.instance.paperHeightTrim + "mm"), this.target.attr("original-height", this.mmheight), this.height * i);
this.paperFooter = t || this.height, this.footerLinetarget.css("top", t + "pt"), this.contentHeight = this.paperFooter - this.paperHeader, this.paperNumberLeft = this.paperNumberLeft > this.width ? parseInt((this.width - 30).toString()) : this.paperNumberLeft, this.paperNumberTop = this.paperNumberTop > this.height ? this.paperNumberTop = parseInt((this.height - 22).toString()) : this.paperNumberTop, this.paperNumberTarget.css("top", this.paperNumberTop + "pt"), this.paperNumberTarget.css("left", this.paperNumberLeft + "pt"), this.triggerOnPaperBaseInfoChanged("调整大小")
}, t.prototype.zoom = function (t) {
t && (this.scale = t, this.target.css("transform", "scale(" + t + ")"), 1 < t ? this.target.css("transform-origin", "-" + t + "% -" + t + "%") : this.target.css("transform-origin", "0 0"), this.triggerOnPaperBaseInfoChanged("缩放"))
}, t.prototype.getPaperFooter = function (t) {
t = this.index + t;
return 0 == t ? this.firstPaperFooter || this.oddPaperFooter || this.paperFooter : t % 2 == 0 ? this.oddPaperFooter || this.paperFooter : t % 2 == 1 ? this.evenPaperFooter || this.paperFooter : void 0
}, t.prototype.getContentHeight = function (t) {
return this.getPaperFooter(t) - this.paperHeader
}, t.prototype.createRuler = function () {
this.target.append('
\n \n \n
')
}, t.prototype.createWaterMark = function (t, e, i) {
var n = this,
i = Object.assign({}, i || {}, {
id: "".concat(n.templateId, "_").concat(n.panelIdx, "_").concat(e || 1, "_").concat(t ? "design" : n.index),
watch: t,
container: n.target[0]
});
i.container && (i.content ? (t && _plugins_watermark_js__WEBPACK_IMPORTED_MODULE_65__.a.destroyWatermark(Object.assign({}, i, {
id: "".concat(n.templateId, "_").concat(n.panelIdx, "_").concat(e || 1, "_").concat(n.index)
})), _plugins_watermark_js__WEBPACK_IMPORTED_MODULE_65__.a.createWatermark(i)) : _plugins_watermark_js__WEBPACK_IMPORTED_MODULE_65__.a.destroyWatermark(i))
}, t.prototype.displayHeight = function () {
return this.mmheight - p.a.instance.paperHeightTrim + "mm"
}, t.prototype.displayWidth = function () {
return this.mmwidth + "mm"
}, t.prototype.getPanelTarget = function () {
return this.target.parent(".hiprint-printPanel ")
}, t
}(),
P = n(6),
_ = function () {
var n = function (t, e) {
return (n = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
};
return function (t, e) {
function i() {
this.constructor = t
}
n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}
}(),
w = function (i) {
function t(t, e) {
t = i.call(this, t) || this;
return t.options = new b(e), t.options.setDefault(new b(p.a.instance.longText.default).getPrintElementOptionEntity()), t
}
return _(t, i), t.prototype.getDesignTarget = function (t) {
t = i.prototype.getDesignTarget.call(this, t);
return t.find(".hiprint-printElement-longText-content").css("border", "1px dashed #cebcbc"), t
}, t.prototype.getProxyTarget = function (t) {
t && this.SetProxyTargetOption(t);
var t = this.getData(),
e = this.createTarget(this.printElementType.getText(!0), t);
return this.updateTargetSize(e), this.css(e, t), e
}, t.prototype.updateDesignViewFromOptions = function () {
var t, e;
this.designTarget && (t = this.getData(), e = this.getHtml(this.designPaper)[0].target, this.designTarget.find(".hiprint-printElement-longText-content").html(e.find(".hiprint-printElement-longText-content").html()), this.css(this.designTarget, t))
}, t.prototype.getConfigOptions = function () {
return p.a.instance.longText
}, t.prototype.getTitle = function () {
return this.options.title || this.printElementType.title
}, t.prototype.getData = function (i) {
var t = this.getField(),
t = t && t.split(".").reduce(function (t, e) {
return t ? t[e] : i ? i[e] : ""
}, !1) || "";
return i ? t || "" : this.options.testData || this.printElementType.getData() || ""
}, t.prototype.updateTargetText = function (t, e, i) {
t = t.find(".hiprint-printElement-longText-content"), e = this.getText(e, i);
t.html(e)
}, t.prototype.createTarget = function (t, e) {
var i = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
');
return this.updateTargetText(i, t, e), i
}, t.prototype.getText = function (t, e) {
var i = this.getFormatter();
return e = e && (0 != this.options.leftSpaceRemoved ? e.toString().replace(/^\s*/, "") : e), (this.getField() ? (!this.options.getHideTitle() && t ? t + ":" : "") + (i ? i(t, e, this.options, this._currenttemplateData) : e) : i ? i(t, t, this.options, this._currenttemplateData) : t || "") || ""
}, t.prototype.getHtml = function (t, e) {
this.setCurrenttemplateData(e), this.createTempContainer();
t = this.getPaperHtmlResult(t, e);
return this.removeTempContainer(), t
}, t.prototype.getHeightByData = function (t) {
this.createTempContainer();
t = this.getPaperHtmlResult(new T("", "", void 0, 1e3, 1e3, 0, 25e3, 0, 0, !0, !0, void 0, 0, void 0), {}, t);
return this.removeTempContainer(), t[0].referenceElement.bottomInLastPaper - t[0].referenceElement.printTopInPaper
}, t.prototype.getLongTextIndent = function () {
return this.options.longTextIndent ? '' : ''
}, t.prototype.getPaperHtmlResult = function (t, e, i) {
var n = this,
r = [],
a = 0,
i = i || this.getData(e),
o = this.getText(this.getTitle(), i),
s = this.createTarget(this.getTitle(), this.options.testData || ""),
c = (this.css(s, i), e ? this.updateTargetWidth(s) : this.updateTargetSize(s), this.getTempContainer().html(""), this.getTempContainer().append(s), [this.getLongTextIndent()]),
l = o.split(new RegExp("\r|\n", "g"));
if (l.forEach(function (t, e) {
t = 0 != n.options.leftSpaceRemoved ? (t || "").toString().replace(/^\s*/, "") : t;
c = c.concat(t.split("")), e < l.length - 1 && c.push(" " + n.getLongTextIndent())
}), 0 == c.length && (c = [""]), this.isHeaderOrFooter() || this.isFixed() || !e) (f = this.getStringBySpecificHeight(c, 25e3, s)).target.css("left", this.options.displayLeft()), f.target.css("top", this.options.displayTop()), f.target[0].height = "", r.push(new P.a({
target: f.target,
printLine: this.options.displayTop() + f.height,
referenceElement: new E.a({
top: this.options.getTop(),
left: this.options.getLeft(),
height: this.options.getHeight(),
width: this.options.getWidth(),
beginPrintPaperIndex: t.index,
bottomInLastPaper: this.options.getTop() + f.height,
printTopInPaper: this.options.getTop()
})
}));
else
for (var p = this.getBeginPrintTopInPaperByReferenceElement(t); 0 < c.length;) {
var d = 0,
u = t.getPaperFooter(a),
f = (0 == a && u < p && "none" != t.panelPageRule && (p = p - u + t.paperHeader, r.push(new P.a({
target: void 0,
printLine: void 0
})), a++, d = t.getContentHeight(a) - (p - t.paperHeader), u = t.getPaperFooter(a)), this.getStringBySpecificHeight(c, 0 < d ? d : 0 == a ? u - p : t.getContentHeight(a), s)),
u = (c.splice(0, f.length), void 0),
h = void 0;
f.target.css("left", this.options.displayLeft()), f.target[0].height = "", u = 0 == a || 0 < d ? (h = p, f.target.css("top", h + "pt"), !(0 < c.length) && null != this.options.lHeight ? p + (f.height > this.options.lHeight ? f.height : this.options.lHeight) : p + f.height) : (h = t.paperHeader, f.target.css("top", h + "pt"), h + f.height), r.push(new P.a({
target: f.target,
printLine: u,
referenceElement: new E.a({
top: this.options.getTop(),
left: this.options.getLeft(),
height: this.options.getHeight(),
width: this.options.getWidth(),
beginPrintPaperIndex: t.index,
bottomInLastPaper: u,
printTopInPaper: h
})
})), a++, e && this.updatePanelHeight(u + this.options.getHeight(), t)
}
return r
}, t.prototype.getStringBySpecificHeight = function (t, e, i) {
var e = o.a.pt.toPx(e),
n = void 0;
return (n = "none" == this.panel.panelPageRule ? this.IsPaginationIndex(t, t.length, -1, i) : this.IsPaginationIndex(t, t.length - 1, e, i)).IsPagination ? n : this.BinarySearch(t, 0, t.length - 1, e, i)
}, t.prototype.BinarySearch = function (t, e, i, n, r) {
var a, o = Math.floor((e + i) / 2);
return i < e ? (r.find(".hiprint-printElement-longText-content").html(""), {
IsPagination: !0,
height: 0,
length: 0,
target: r.clone()
}) : (a = this.IsPaginationIndex(t, o, n, r)).IsPagination ? a : "l" == a.move ? this.BinarySearch(t, e, o - 1, n, r) : this.BinarySearch(t, o + 1, i, n, r)
}, t.prototype.IsPaginationIndex = function (t, e, i, n) {
if (-1 == i) return n.find(".hiprint-printElement-longText-content").html(t.slice(0, e).join("")), a = n.height(), {
IsPagination: !0,
height: o.a.px.toPt(a),
length: t.length,
target: n.clone()
};
n.find(".hiprint-printElement-longText-content").html(t.slice(0, e + 2).join(""));
var r = n.height(),
a = (n.find(".hiprint-printElement-longText-content").html(t.slice(0, e + 1).join("")), n.height());
return e >= t.length - 1 && a < i ? {
IsPagination: !0,
height: o.a.px.toPt(a),
length: t.length,
target: n.clone()
} : a <= i && i <= r ? {
IsPagination: !0,
height: a,
length: e + 1,
target: n.clone()
} : i <= a ? {
IsPagination: !1,
move: "l"
} : r <= i ? {
IsPagination: !1,
move: "r"
} : {
IsPagination: !0,
result: 1
}
}, t
}(f.a),
x = function () {
function t() { }
return t.replaceEnterAndNewline = function (t, e) {
return t.replace(new RegExp("\r|\n|/g", "g"), e)
}, t.replaceTab = function (t, e) {
return t.replace(new RegExp("\t/g", "g"), e)
}, t.replaceEnterAndNewlineAndTab = function (t, e) {
return t.replace(new RegExp("\r|\n|\t|/g", "g"), e)
}, t
}(),
C = function () {
var n = function (t, e) {
return (n = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
};
return function (t, e) {
function i() {
this.constructor = t
}
n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}
}(),
O = function (e) {
function t(t) {
t = e.call(this, t) || this;
return t.title && (t.title = x.replaceEnterAndNewlineAndTab(t.title, "")), t
}
return C(t, e), t.prototype.getHideTitle = function () {
return (null == this.hideTitle ? this.defaultOptions : this).hideTitle
}, t.prototype.getTextType = function () {
return (null == this.textType ? this.defaultOptions : this).textType || "text"
}, t.prototype.getFontSize = function () {
return (null == this.fontSize ? this.defaultOptions : this).fontSize || 9
}, t.prototype.getbarcodeMode = function () {
return (null == this.barcodeMode ? this.defaultOptions : this).barcodeMode || "CODE128"
}, t.prototype.getQRcodeLevel = function () {
return (null == this.qrCodeLevel ? this.defaultOptions : this).qrCodeLevel || 0
}, t
}(g.a),
H = function () {
var n = function (t, e) {
return (n = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
};
return function (t, e) {
function i() {
this.constructor = t
}
n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}
}(),
D = function (a) {
function t(t, e) {
t = a.call(this, t) || this;
return t.options = new O(e), t.options.setDefault(new O(p.a.instance.text.default).getPrintElementOptionEntity()), t
}
return H(t, a), t.prototype.getDesignTarget = function (t) {
return a.prototype.getDesignTarget.call(this, t)
}, t.prototype.getProxyTarget = function (t) {
t && this.SetProxyTargetOption(t);
var t = this.getData(),
e = this.createTarget(this.printElementType.getText(!0), t);
return this.updateTargetSize(e), this.css(e, t), e
}, t.prototype.updateDesignViewFromOptions = function () {
var t;
this.designTarget && (t = this.getData(), this.css(this.designTarget, t), this.updateTargetText(this.designTarget, this.getTitle(), t))
}, t.prototype.getConfigOptions = function () {
return p.a.instance.text
}, t.prototype.getTitle = function () {
var t = this.options.title || this.printElementType.title || "";
return t = t && x.replaceEnterAndNewlineAndTab(t, "")
}, t.prototype.getData = function (i) {
var t = this.getField(),
t = i ? t && t.split(".").reduce(function (t, e) {
return t ? t[e] : i ? i[e] : ""
}, !1) || "" : this.options.testData || this.printElementType.getData() || "";
if (this.options.format) {
if ("datetime" == this.options.dataType) return o.a.dateFormat(t, this.options.format);
if ("boolean" == this.options.dataType) {
var e = this.options.format.split(":");
if (0 < e.length) return !0 === t || "true" === t ? e[0] : e[1]
}
}
return t
}, t.prototype.updateTargetText = function (t, e, i, n, r) {
var a, s, c, l = this.getFormatter(),
p = t.find(".hiprint-printElement-text-content"),
l = this.getField() ? (!this.options.getHideTitle() && e ? e + ":" : "") + hinnn.toUpperCase(this.options.upperCase, l ? l(e, i, this.options, this._currenttemplateData, t) : i) : i = hinnn.toUpperCase(this.options.upperCase, l ? l(e, e, this.options, this._currenttemplateData, t) : e),
e = this.options.getTextType();
if ("text" == e) p.html(l);
else {
if ("barcode" == e) {
p.html('');
try {
i ? (jsbarcode__WEBPACK_IMPORTED_MODULE_62___default()(p.find(".hibarcode_imgcode")[0], i, {
format: this.options.getbarcodeMode(),
width: 1,
textMargin: -1,
lineColor: this.options.color || "#000000",
margin: 0,
height: parseInt(o.a.pt.toPx(this.options.getHeight() || 10).toString()),
displayValue: !1
}), p.find(".hibarcode_imgcode").attr("height", "100%"), p.find(".hibarcode_imgcode").attr("width", "100%"), this.options.hideTitle || p.find(".hibarcode_displayValue").html(i)) : p.html("")
} catch (t) {
p.html("".concat(i18n.__("此格式不支持该文本")))
}
}
if ("qrcode" == e) {
p.html("");
try {
i && (t.css("line-height", 0), p.css("text-align", "center"), a = this.options.getWidth() || 20, s = this.options.getHeight() || 20, c = jquery__WEBPACK_IMPORTED_MODULE_60___default()("").css({
width: (s < a ? s : a) + "pt",
height: (s < a ? s : a) + "pt",
display: "inline-block"
}), new QRCode(c[0], {
width: "100%",
height: "100%",
colorDark: this.options.color || "#000000",
useSVG: !0,
correctLevel: this.options.getQRcodeLevel()
}).makeCode(i), p.html(c))
} catch (t) {
p.html("".concat(i18n.__("二维码生成失败")))
}
}
}
}, t.prototype.onResize = function (t, e, i, n, r) {
a.prototype.onResize.call(this, t, e, i, n, r), "barcode" != this.options.getTextType() && "qrcode" != this.options.getTextType() || this.updateTargetText(this.designTarget, this.getTitle(), this.getData())
}, t.prototype.createTarget = function (t, e, i) {
var n = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
');
return this.updateTargetText(n, t, e, i), n
}, t.prototype.getHtml = function (t, e, i) {
return this.getHtml2(t, e, i)
}, t
}(f.a),
I = function () {
var n = function (t, e) {
return (n = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
};
return function (t, e) {
function i() {
this.constructor = t
}
n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}
}(),
R = function (e) {
function t(t) {
return e.call(this, t) || this
}
return I(t, e), t
}(g.a),
M = function () {
var n = function (t, e) {
return (n = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
};
return function (t, e) {
function i() {
this.constructor = t
}
n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}
}(),
S = function (i) {
function t(t, e) {
t = i.call(this, t) || this;
return t.options = new R(e), t.options.setDefault(new R(p.a.instance.html.default).getPrintElementOptionEntity()), t
}
return M(t, i), t.prototype.updateDesignViewFromOptions = function () {
var t;
this.designTarget && (t = this.getData(), this.css(this.designTarget, t), this.updateTargetHtml())
}, t.prototype.updateTargetHtml = function () {
var t = this.getFormatter();
t && (t = t(this.getData(), this.options, this._currenttemplateData), this.designTarget.find(".hiprint-printElement-html-content").html(t))
}, t.prototype.getConfigOptions = function () {
return p.a.instance.html
}, t.prototype.createTarget = function (t, e) {
var i = jquery__WEBPACK_IMPORTED_MODULE_60___default()('
'),
n = this.getFormatter();
return n ? (n = n(this.getData(), this.options, this._currenttemplateData), i.find(".hiprint-printElement-html-content").append(n)) : this.options.content && i.find(".hiprint-printElement-html-content").append(this.options.content), i
}, t.prototype.getHtml = function (t, e, i) {
return this.getHtml2(t, e, i)
}, t
}(f.a),
B = function () {
var n = function (t, e) {
return (n = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
};
return function (t, e) {
function i() {
this.constructor = t
}
n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}
}(),
F = function (i) {
function t(t, e) {
t = i.call(this, t) || this;
return t.options = new g.a(e), t.options.setDefault(new g.a(p.a.instance.vline.default).getPrintElementOptionEntity()), t
}
return B(t, i), t.prototype.updateDesignViewFromOptions = function () {
var t;
this.designTarget && (t = this.getData(), this.css(this.designTarget, t))
}, t.prototype.getConfigOptions = function () {
return p.a.instance.vline
}, t.prototype.createTarget = function (t, e) {
return jquery__WEBPACK_IMPORTED_MODULE_60___default()('')
}, t.prototype.getReizeableShowPoints = function () {
return ["s", "r"]
}, t.prototype.getHtml = function (t, e, i) {
return this.getHtml2(t, e, i)
}, t
}(f.a),
L = function () {
var n = function (t, e) {
return (n = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
};
return function (t, e) {
function i() {
this.constructor = t
}
n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}
}(),
A = function (i) {
function t(t, e) {
t = i.call(this, t) || this;
return t.options = new g.a(e), t.options.setDefault(new g.a(p.a.instance.hline.default).getPrintElementOptionEntity()), t
}
return L(t, i), t.prototype.updateDesignViewFromOptions = function () {
var t;
this.designTarget && (t = this.getData(), this.css(this.designTarget, t))
}, t.prototype.getConfigOptions = function () {
return p.a.instance.hline
}, t.prototype.createTarget = function (t, e) {
return jquery__WEBPACK_IMPORTED_MODULE_60___default()('')
}, t.prototype.getReizeableShowPoints = function () {
return ["e", "r"]
}, t
}(f.a),
z = function () {
var n = function (t, e) {
return (n = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
};
return function (t, e) {
function i() {
this.constructor = t
}
n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}
}(),
k = function (i) {
function t(t, e) {
t = i.call(this, t) || this;
return t.options = new g.a(e), t.options.setDefault(new g.a(p.a.instance.rect.default).getPrintElementOptionEntity()), t
}
return z(t, i), t.prototype.updateDesignViewFromOptions = function () {
var t;
this.designTarget && (t = this.getData(), this.css(this.designTarget, t))
}, t.prototype.getConfigOptions = function () {
return p.a.instance.rect
}, t.prototype.createTarget = function (t, e) {
return jquery__WEBPACK_IMPORTED_MODULE_60___default()('')
}, t.prototype.getHtml = function (t, e, i) {
return this.getHtml2(t, e, i)
}, t
}(f.a),
N = function () {
var n = function (t, e) {
return (n = Object.setPrototypeOf || (_instanceof({
__proto__: []
}, Array) ? function (t, e) {
t.__proto__ = e
} : function (t, e) {
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
}))(t, e)
};
return function (t, e) {
function i() {
this.constructor = t
}
n(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
}
}(),
V = function (i) {
function t(t, e) {
t = i.call(this, t) || this;
return t.options = new g.a(e), t.options.setDefault(new g.a(p.a.instance.oval.default).getPrintElementOptionEntity()), t
}
return N(t, i), t.prototype.updateDesignViewFromOptions = function () {
var t;
this.designTarget && (t = this.getData(), this.css(this.designTarget, t))
}, t.prototype.getConfigOptions = function () {
return p.a.instance.oval
}, t.prototype.createTarget = function (t, e) {
return jquery__WEBPACK_IMPORTED_MODULE_60___default()('')
}, t.prototype.getHtml = function (t, e, i) {
return this.getHtml2(t, e, i)
}, t
}(f.a),
barcode = function (a) {
function t(t, e) {
t = a.call(this, t) || this;
return t.options = new g.a(e), t.options.setDefault(new g.a(p.a.instance.barcode.default).getPrintElementOptionEntity()), t
}
return N(t, a), t.prototype.updateDesignViewFromOptions = function () {
var t;
this.designTarget && (t = this.getData(), this.css(this.designTarget, t), this.initBarcode(this.designTarget, this.getTitle(), this.getData()))
}, t.prototype.getConfigOptions = function () {
return p.a.instance.barcode
}, t.prototype.onResize = function (t, e, i, n, r) {
a.prototype.onResize.call(this, t, e, i, n, r), this.initBarcode(this.designTarget, this.getTitle(), this.getData())
}, t.prototype.getTitle = function () {
return this.options.title || this.printElementType.title
}, t.prototype.getData = function (i) {
var t = this.getField();
return i ? t && t.split(".").reduce(function (t, e) {
return t ? t[e] : i ? i[e] : ""
}, !1) || "" : this.options.testData || this.printElementType.getData() || ""
}, t.prototype.initBarcode = function (e, t, i) {
e = (e = e || this.designTarget).find(".hiprint-printElement-barcode-content");
try {
var n = bwip_js__WEBPACK_IMPORTED_MODULE_64___default.a.toSVG({
bcid: this.options.barcodeType || "code128",
text: i || this.options.testData || this.options.title,
scale: 1,
width: parseInt(o.a.pt.toPx(this.options.getWidth()) / 2.835),
height: parseInt(o.a.pt.toPx(this.options.getHeight()) / 2.835),
includetext: !1
});
e.html(jquery__WEBPACK_IMPORTED_MODULE_60___default()(n)), this.options.hideTitle || e.append(jquery__WEBPACK_IMPORTED_MODULE_60___default()('