UNPKG

vue-plugin-hiprint

Version:
1 lines 663 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jsbarcode"),require("socket.io-client"),require("jspdf"),require("html2canvas"),require("canvg"),require("@claviska/jquery-minicolors")):"function"==typeof define&&define.amd?define("vue-plugin-hiprint",["jsbarcode","socket.io-client","jspdf","html2canvas","canvg","@claviska/jquery-minicolors"],e):"object"==typeof exports?exports["vue-plugin-hiprint"]=e(require("jsbarcode"),require("socket.io-client"),require("jspdf"),require("html2canvas"),require("canvg"),require("@claviska/jquery-minicolors")):t["vue-plugin-hiprint"]=e(t.jsbarcode,t["socket.io-client"],t.jspdf,t.html2canvas,t.canvg,t["@claviska/jquery-minicolors"])}(window,function(__WEBPACK_EXTERNAL_MODULE__2__,__WEBPACK_EXTERNAL_MODULE__3__,__WEBPACK_EXTERNAL_MODULE__8__,__WEBPACK_EXTERNAL_MODULE__9__,__WEBPACK_EXTERNAL_MODULE__10__,__WEBPACK_EXTERNAL_MODULE__14__){return function(i){var n={};function o(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}return o.m=i,o.c=n,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(i,n,function(t){return e[t]}.bind(null,n));return i},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/dist/",o(o.s=12)}([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 _plugins_jquery_hiwprint_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(13),_plugins_jquery_hiwprint_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_plugins_jquery_hiwprint_js__WEBPACK_IMPORTED_MODULE_0__),_claviska_jquery_minicolors__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(14),_claviska_jquery_minicolors__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_claviska_jquery_minicolors__WEBPACK_IMPORTED_MODULE_1__),jsbarcode__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(2),jsbarcode__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(jsbarcode__WEBPACK_IMPORTED_MODULE_2__),_plugins_qrcode_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(15),_plugins_qrcode_js__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_plugins_qrcode_js__WEBPACK_IMPORTED_MODULE_3__),socket_io_client__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(3),socket_io_client__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(socket_io_client__WEBPACK_IMPORTED_MODULE_4__),_css_image_l_img_svg__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(6),_css_image_l_img_svg__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_css_image_l_img_svg__WEBPACK_IMPORTED_MODULE_5__),_css_image_v_img_svg__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(7),_css_image_v_img_svg__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_css_image_v_img_svg__WEBPACK_IMPORTED_MODULE_6__),jspdf__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(8),jspdf__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(jspdf__WEBPACK_IMPORTED_MODULE_7__),html2canvas__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(9),html2canvas__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(html2canvas__WEBPACK_IMPORTED_MODULE_8__),canvg__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(10),canvg__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(canvg__WEBPACK_IMPORTED_MODULE_9__),_etypes_default_etyps_provider__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(11);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"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}window.io=socket_io_client__WEBPACK_IMPORTED_MODULE_4__.io;var hiprint=function(i){var n={};function o(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}return o.m=i,o.c=n,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==_typeof(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(i,n,function(t){return e[t]}.bind(null,n));return i},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/",o(o.s=21)}([function(t,e,i){var r;i.d(e,"a",function(){return hinnn}),window.hinnn={},hinnn.event=(r={},{on:function(t,e){r[t]||(r[t]=[]),r[t].push(e)},id:0,off:function(t,e){var i=r[t];if(i){for(var n=-1,o=0;o<i.length;o++)if(i[o]===e){n=o;break}n<0||r[t].splice(n,1)}},trigger:function(t){var e=r[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){r[t]=[]},getId:function(){return this.id+=1,this.id},getNameWithId:function(t){return t+"-"+this.getId()}}),hinnn.form={serialize:function(t){var t=$(t).serializeArray(),e={};return $.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,o){function r(){c=!1===o.leading?0:_.now(),p=null,l=i.apply(a,s),p||(a=s=null)}var a,s,l,p=null,c=0;o=o||{};return function(){var t=_.now(),e=(c||!1!==o.leading||(c=t),n-(t-c));return a=this,s=arguments,e<=0||n<e?(p&&(clearTimeout(p),p=null),c=t,l=i.apply(a,s),p||(a=s=null)):p||!1===o.trailing||(p=setTimeout(r,e)),l}},hinnn.debounce=function(e,i,n){function o(){var t=_.now()-l;t<i&&0<=t?r=setTimeout(o,i-t):(r=null,n||(p=e.apply(s,a),r||(s=a=null)))}var r,a,s,l,p;return function(){s=this,a=arguments,l=_.now();var t=n&&!r;return r=r||setTimeout(o,i),t&&(p=e.apply(s,a),s=a=null),p}},hinnn.toUtf8=function(t){for(var e,i="",n=t.length,o=0;o<n;o++)1<=(e=t.charCodeAt(o))&&e<=127?i+=t.charAt(o):(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,o){var r={};return t.forEach(function(e){var i=JSON.stringify(o(e));r[i]||(r[i]={rows:[]},n.forEach(function(t){r[i][t]=e[t]})),r[i].rows.push(e)}),Object.keys(r).map(function(t){return r[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],o=[],r=[],a=!0,i=!1,s=void 0;try{for(var l,p=t[Symbol.iterator]();!(a=(l=p.next()).done);a=!0){var c=l.value;(e(c)<e(n)?o:r).push(c)}}catch(t){i=!0,s=t}finally{try{a||null==p.return||p.return()}finally{if(i)throw s}}return this.orderBy(o,e).concat([n],this.orderBy(r,e))},hinnn.dateFormat=function(t,e){if(t)try{var i,n="string"==typeof t?new Date(t):t,o={"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))),o)new RegExp("("+i+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?o[i]:("00"+o[i]).substr((""+o[i]).length)));return e}catch(t){return""}return""}},function(t,e,i){i.d(e,"a",function(){return o});var n=i(9),o=(r.prototype.init=function(t){t&&$.extend(this,t)},Object.defineProperty(r,"instance",{get:function(){return r._instance||(r._instance=new r,window.HIPRINT_CONFIG&&$.extend(r._instance,HIPRINT_CONFIG),r._instance.optionItems&&r._instance.optionItems.forEach(function(t){n.a.registerItem(t)})),r._instance},enumerable:!0,configurable:!0}),r);function r(){this.providers=[],this.movingDistance=1.5,this.paperHeightTrim=1,this.text={supportOptions:[{name:"title",hidden:!1,title:""},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"coordinate",hidden:!1},{name:"dataType",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"color",hidden:!1},{name:"textDecoration",hidden:!1},{name:"textAlign",hidden:!1},{name:"textContentVerticalAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"textType",hidden:!1},{name:"barcodeMode",hidden:!1},{name:"hideTitle",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"optionsGroup",hidden:!1},{name:"borderLeft",hidden:!1},{name:"borderTop",hidden:!1},{name:"borderRight",hidden:!1},{name:"borderBottom",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderColor",hidden:!1},{name:"contentPaddingLeft",hidden:!1},{name:"contentPaddingTop",hidden:!1},{name:"contentPaddingRight",hidden:!1},{name:"contentPaddingBottom",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{fontFamily:void 0,fontSize:void 0,fontWeight:"",letterSpacing:void 0,textAlign:void 0,textType:"text",hideTitle:!1,height:9.75,lineHeight:void 0,width:120}},this.image={supportOptions:[{name:"field",hidden:!1},{name:"src",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{}},this.longText={supportOptions:[{name:"title",hidden:!1},{name:"field",hidden:!1},{name:"testData",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"fontWeight",hidden:!1},{name:"letterSpacing",hidden:!1},{name:"textAlign",hidden:!1},{name:"lineHeight",hidden:!1},{name:"color",hidden:!1},{name:"hideTitle",hidden:!1},{name:"longTextIndent",hidden:!1},{name:"leftSpaceRemoved",hidden:!1},{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"lHeight",hidden:!1},{name:"transform",hidden:!1},{name:"optionsGroup",hidden:!1},{name:"borderLeft",hidden:!1},{name:"borderTop",hidden:!1},{name:"borderRight",hidden:!1},{name:"borderBottom",hidden:!1},{name:"borderWidth",hidden:!1},{name:"borderColor",hidden:!1},{name:"contentPaddingLeft",hidden:!1},{name:"contentPaddingTop",hidden:!1},{name:"contentPaddingRight",hidden:!1},{name:"contentPaddingBottom",hidden:!1},{name:"backgroundColor",hidden:!1},{name:"formatter",hidden:!1},{name:"styler",hidden:!1}],default:{fontFamily:void 0,fontSize:void 0,fontWeight:"",letterSpacing:void 0,textAlign:void 0,hideTitle:!1,height:42,lineHeight:void 0,width:550}},this.table={supportOptions:[{name:"field",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"lineHeight",hidden:!1},{name:"textAlign",hidden:!1},{name:"gridColumns",hidden:!1},{name:"gridColumnsGutter",hidden:!1},{name:"tableHeaderRepeat",hidden:!1},{name:"tableBorder",hidden:!1},{name:"tableHeaderBorder",hidden:!1},{name:"tableHeaderCellBorder",hidden:!1},{name:"tableHeaderRowHeight",hidden:!1},{name:"tableHeaderBackground",hidden:!1},{name:"tableHeaderFontSize",hidden:!1},{name:"tableHeaderFontWeight",hidden:!1},{name:"tableBodyRowHeight",hidden:!1},{name:"tableBodyRowBorder",hidden:!1},{name:"tableBodyCellBorder",hidden:!1},{name:"tableFooterBorder",hidden:!1},{name:"tableFooterCellBorder",hidden:!1},{name:"axis",hidden:!1},{name:"lHeight",hidden:!1},{name:"autoCompletion",hidden:!1},{name:"columns",hidden:!1},{name:"styler",hidden:!1},{name:"rowStyler",hidden:!1},{name:"tableFooterRepeat",hidden:!1},{name:"footerFormatter",hidden:!1},{name:"rowsColumnsMerge",hidden:!1},{name:"gridColumnsFooterFormatter",hidden:!1}],default:{fontFamily:void 0,fontSize:void 0,fontWeight:"",textAlign:void 0,tableBorder:void 0,tableHeaderBorder:void 0,tableHeaderCellBorder:void 0,tableHeaderBackground:void 0,tableHeaderRowHeight:void 0,tableHeaderFontWeight:void 0,tableBodyCellBorder:void 0,tableFooterBorder:void 0,tableFooterCellBorder:void 0,tableBodyRowHeight:void 0,letterSpacing:"",lineHeight:void 0,width:550}},this.tableCustom={supportOptions:[{name:"field",hidden:!1},{name:"fontFamily",hidden:!1},{name:"fontSize",hidden:!1},{name:"textAlign",hidden:!1},{name:"tableBorder",hidden:!1},{name:"tableHeaderBorder",hidden:!1},{name:"tableHeaderCellBorder",hidden:!1},{name:"tableHeaderRowHeight",hidden:!1},{name:"tableHeaderFontSize",hidden:!1},{name:"tableHeaderFontWeight",hidden:!1},{name:"tableHeaderBackground",hidden:!1},{name:"tableBodyRowHeight",hidden:!1},{name:"tableBodyRowBorder",hidden:!1},{name:"tableBodyCellBorder",hidden:!1},{name:"tableFooterBorder",hidden:!1},{name:"tableFooterCellBorder",hidden:!1},{name:"axis",hidden:!1},{name:"lHeight",hidden:!1},{name:"autoCompletion",hidden:!1},{name:"tableFooterRepeat",hidden:!1}],default:{fontFamily:void 0,fontSize:void 0,fontWeight:"",textAlign:void 0,tableBorder:void 0,tableHeaderBorder:void 0,tableHeaderCellBorder:void 0,tableHeaderBackground:void 0,tableHeaderRowHeight:void 0,tableHeaderFontWeight:void 0,tableBodyCellBorder:void 0,tableFooterBorder:void 0,tableFooterCellBorder:void 0,tableBodyRowHeight:void 0,letterSpacing:"",lineHeight:void 0,width:550}},this.hline={supportOptions:[{name:"borderColor",hidden:!1},{name:"borderWidth",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"borderStyle",hidden:!1}],default:{borderWidth:.75,height:9,width:90}},this.vline={supportOptions:[{name:"borderColor",hidden:!1},{name:"borderWidth",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"borderStyle",hidden:!1}],default:{borderWidth:void 0,height:90,width:9}},this.rect={supportOptions:[{name:"borderColor",hidden:!1},{name:"borderWidth",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"borderStyle",hidden:!1}],default:{borderWidth:void 0,height:90,width:90}},this.oval={supportOptions:[{name:"borderColor",hidden:!1},{name:"borderWidth",hidden:!1},{name:"showInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"transform",hidden:!1},{name:"borderStyle",hidden:!1}],default:{borderWidth:void 0,height:90,width:90}},this.html={supportOptions:[{name:"showInPage",hidden:!1},{name:"unShowInPage",hidden:!1},{name:"fixed",hidden:!1},{name:"axis",hidden:!1},{name:"formatter",hidden:!1}],default:{height:90,width:90}},this.tableColumn={supportOptions:[{name:"title",hidden:!1},{name:"align",hidden:!1},{name:"halign",hidden:!1},{name:"vAlign",hidden:!1},{name:"paddingLeft",hidden:!1},{name:"paddingRight",hidden:!1},{name:"formatter2",hidden:!1},{name:"tableSummary",hidden:!1},{name:"styler2",hidden:!1},{name:"tableTextType",hidden:!1},{name:"tableBarcodeMode",hidden:!1},{name:"tableColumnHeight",hidden:!1}],default:{height:90,width:90}}}},function(t,e,i){o.prototype.updatePosition=function(t,e){this.left=t,this.top=e};var n=o;function o(t){this.printElement=t}i.d(e,"a",function(){return r});Object.defineProperty(a,"instance",{get:function(){return this._instance||(this._instance=new a),this._instance},enumerable:!0,configurable:!0}),a.prototype.getDragingPrintElement=function(){return a.instance.dragingPrintElement},a.prototype.setDragingPrintElement=function(t){a.instance.dragingPrintElement=new n(t)},a.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)})},a.prototype.imageToBase64=function(t){if(-1==$(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){}}},a.prototype.xhrLoadImage=function(t){},a.prototype.transformImg=function(t){var i=this;t.map(function(t,e){i.imageToBase64($(e))})},a.prototype.getPrintTemplateById=function(t){return a.instance.printTemplateContainer[t]},a.prototype.setPrintTemplateById=function(t,e){return a.instance.printTemplateContainer[t]=e};var r=a;function a(){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 o=function(){},n=(i.d(e,"a",function(){return n}),r.prototype.setDefault=function(t){this.defaultOptions=t,this.initSize()},r.prototype.initSize=function(){this.width||this.setWidth(this.defaultOptions.width),this.height||this.setHeight(this.defaultOptions.height)},r.prototype.initSizeByHtml=function(t,e){this.width||this.setWidth(t),this.height||this.setHeight(e)},r.prototype.getRectInfo=function(){var t,e,i,n,o,r,a={w:0,h:0,diffW:0,diffH:0};return this.transform&&(e=this.transform*Math.PI/180,n=this.width,t=this.height,r=Math.sin(e),e=Math.cos(e),o=(n-(i=Math.abs(n*e)+Math.abs(t*r)))/2,r=(t-(n=Math.abs(n*r)+Math.abs(t*e)))/2,a.w=i,a.h=n,a.diffW=o,a.diffH=r),a},r.prototype.getLeft=function(){return this.left},r.prototype.posLeft=function(){var t=this.left;return this.transform&&(t+=this.getRectInfo().diffW),Math.floor(10*t)/10},r.prototype.setRotate=function(t){null!=t&&(this.transform=t)},r.prototype.displayLeft=function(t){return this.transform&&t?this.left+this.getRectInfo().diffW+"pt":this.left+"pt"},r.prototype.setLeft=function(t){null!=t&&(this.left=t)},r.prototype.getTop=function(){return this.top},r.prototype.posTop=function(){var t=this.top;return this.transform&&(t+=this.getRectInfo().diffH),Math.floor(10*t)/10},r.prototype.getTopInDesign=function(){return this.topInDesign},r.prototype.displayTop=function(t){return this.transform&&t?this.top+this.getRectInfo().diffH+"pt":this.top+"pt"},r.prototype.setTop=function(t){null!=t&&(this.top=t)},r.prototype.copyDesignTopFromTop=function(){this.topInDesign=this.top},r.prototype.getHeight=function(){var t;return this.transform?(t=this.getRectInfo()).h+t.diffH:this.height},r.prototype.displayHeight=function(){return this.height+"pt"},r.prototype.setHeight=function(t){null!=t&&(this.height=t)},r.prototype.getWidth=function(){var t;return this.transform?(t=this.getRectInfo()).w+t.diffW:this.width},r.prototype.displayWidth=function(){return this.width+"pt"},r.prototype.setWidth=function(t){null!=t&&(this.width=t)},r.prototype.getValueFromOptionsOrDefault=function(t){return(null==this[t]?this.defaultOptions:this)[t]},r.prototype.getPrintElementOptionEntity=function(){var i=new o,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]&&_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},r.prototype.init=function(e){var i=this;e&&Object.keys(e).forEach(function(t){i[t]=e[t]})},r);function r(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(),$.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(_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.px.toPt(t.width()).toString()),parseInt(_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.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 e=this;return this.designTarget=this.getHtml(t)[0].target,this.designPaper=t,this.designTarget.click(function(){_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger(e.getPrintElementSelectEventKey(),{printElement:e})}),this.designTarget},BasePrintElement.prototype.getPrintElementSelectEventKey=function(){return"PrintElementSelectEventKey_"+this.templateId},BasePrintElement.prototype.design=function(t,a){var s=this;this.designTarget.hidraggable({draggable:s.options.draggable,axis:s.options.axis&&t&&t.axisEnabled?s.options.axis:void 0,onDrag:function(t,e,i){var n,o,r=s.panel.printElements.filter(function(t){return"block"==t.designTarget.children().last().css("display")&&!t.printElementType.type.includes("table")});1<r.length?(n=e-s.options.left,o=i-s.options.top,r.forEach(function(t){t.updateSizeAndPositionOptions(n+t.options.getLeft(),o+t.options.getTop()),t.designTarget.css("left",t.options.displayLeft()),t.designTarget.css("top",t.options.displayTop()),t.createLineOfPosition(a)})):(s.updateSizeAndPositionOptions(e,i),s.createLineOfPosition(a)),_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,s.designTarget.focus(),s.createLineOfPosition(a)},getScale:function(){return s.designPaper.scale||1},onStopDrag:function(t){_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.changed&&_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger("hiprintTemplateDataChanged_"+s.templateId,"移动"),_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging=!1,_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.changed=!1,s.removeLineOfPosition()}}),this.designTarget.hireizeable({showPoints:s.getReizeableShowPoints(),showSizeBox:_HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance.showSizeBox,getScale:function(){return s.designPaper.scale||1},onBeforeResize:function(){_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging=!0},onResize:function(t,e,i,n,o,r){null!=r?s.onRotate(t,r):s.onResize(t,e,i,n,o),s.createLineOfPosition(a)},onStopResize:function(t){_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger("hiprintTemplateDataChanged_"+s.templateId,t?"旋转":"大小"),_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.draging=!1,s.removeLineOfPosition()}}),this.bindDocMouseUpEvent(this.designTarget),this.bingCopyEvent(this.designTarget),this.bingKeyboardMoveEvent(this.designTarget,a)},BasePrintElement.prototype.bindDocMouseUpEvent=function(t){var e=this;_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.on("hiprintTemplate_doc_mouseup",function(t){e.removeLineOfPosition()})},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 i=this;this.getPrintElementOptionItems().forEach(function(t){var e=t.getValue();e&&"object"==_typeof(e)?Object.keys(e).forEach(function(t){i.options[t]=e[t]}):i.options[t.name]=e}),this.updateDesignViewFromOptions(),_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger("hiprintTemplateDataChanged_"+this.templateId,"元素修改")},BasePrintElement.prototype.getReizeableShowPoints=function(){return["s","e","r"]},BasePrintElement.prototype.onRotate=function(t,e){this.options.setRotate(e)},BasePrintElement.prototype.onResize=function(t,e,i,n,o){this.updateSizeAndPositionOptions(o,n,i,e)},BasePrintElement.prototype.getOrderIndex=function(){return this.options.getTop()},BasePrintElement.prototype.getHtml=function(t,e,i){this.setCurrenttemplateData(e);var n=[],o=this.getBeginPrintTopInPaperByReferenceElement(t),r=t.getPaperFooter(0),t=(this.isHeaderOrFooter()||this.isFixed()||r<o&&(n.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({target:void 0,printLine:void 0})),o=o-r+t.paperHeader,r=t.getPaperFooter(1)),this.getData(e)),r=this.createTarget(this.getTitle(),t,i);return this.updateTargetSize(r),this.css(r,t),r.css("position","absolute"),r.css("left",this.options.displayLeft()),r.css("top",o+"pt"),n.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({target:r,printLine:o+this.options.getHeight()})),n},BasePrintElement.prototype.getHtml2=function(t,e,i){var n=0,o=(this.setCurrenttemplateData(e),[]),r=this.getBeginPrintTopInPaperByReferenceElement(t),a=t.getPaperFooter(n),n=(this.isHeaderOrFooter()||this.isFixed()||("none"!=t.panelPageRule&&a<r&&(o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({target:void 0,printLine:void 0})),r=r-a+t.paperHeader,a=t.getPaperFooter(++n)),r<=a&&r+this.options.getHeight()>a&&(o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({target:void 0,printLine:void 0})),r=t.paperHeader,a=t.getPaperFooter(++n))),this.getData(e)),e=this.createTarget(this.getTitle(),n);return"none"==t.panelPageRule&&r+this.options.getHeight()>a&&this.updatePanelHeight(r+this.options.getHeight(),t),this.updateTargetSize(e),this.css(e,n),e.css("position","absolute"),e.css("left",this.options.displayLeft()),e.css("top",r+"pt"),o.push(new _dto_PaperHtmlResult__WEBPACK_IMPORTED_MODULE_3__.a({target:e,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})})),o},BasePrintElement.prototype.updatePanelHeight=function(t,e){var i;"none"==this.panel.panelPageRule&&(i=_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.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 n=this,o=[],e=this.getConfigOptions();e&&(e=e.supportOptions)&&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)))&&o.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((t,e)=>t?t[e]:i?i[e]:"",!1)||"":this.printElementType.getData()},BasePrintElement.prototype.copyFromType=function(){var e=this.options,i=this.printElementType,n=this.getConfigOptions().supportOptions.map(function(t){return t.name});return 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.getPrintElementOptionItems=function(){if(this._printElementOptionItems)return this._printElementOptionItems;var e=[],t=this.getConfigOptions();return t&&(t=t.supportOptions)&&t.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._printElementOptionItems},BasePrintElement.prototype.getPrintElementOptionItemsByName=function(t){var e=[],t=this.getConfigOptionsByName(t);return t&&(t=t.supportOptions)&&t.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)}),e.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(),$("body").append($('<div class="hiprint_temp_Container hiprint-printPaper" style="overflow:hidden;height: 0px;box-sizing: border-box;"></div>'))},BasePrintElement.prototype.removeTempContainer=function(){$(".hiprint_temp_Container").remove()},BasePrintElement.prototype.getTempContainer=function(){return $(".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=$(".toplineOfPosition"+this.id),i=$(".topPosition.id"+this.id),n=$(".leftlineOfPosition"+this.id),o=$(".leftPosition.id"+this.id),r=$(".rightlineOfPosition"+this.id),a=$(".bottomlineOfPosition"+this.id),s=_HiPrintConfig__WEBPACK_IMPORTED_MODULE_1__.a.instance;e.length?e.css("top",this.options.displayTop(!0)):((e=$('<div class="toplineOfPosition'+this.id+'" style="border:0;border-top:1px dashed rgb(169, 169, 169);position: absolute; width: 100%;"></div>')).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=$('<div class="topPosition id'+this.id+'" style="position: absolute;"></div>')).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=$('<div class="leftlineOfPosition'+this.id+'" style="border:0;border-left:1px dashed rgb(169, 169, 169);position: absolute;height: 100%;"></div>')).css("left",this.options.displayLeft(!0)),e.css("height",t.displayHeight()),this.designTarget.parents(".hiprint-printPaper-content").append(e)),s.showPosition&&(o.length?(o.text(this.options.posLeft()+(s.positionUnit?"pt":"")),o.toggleClass("leftPosition-lineMode",s.positionLineMode),o.css("left",this.options.posLeft()-o.width()+"pt"),s.positionLineMode?o.css("top",this.options.posTop()-o.height()/3+"pt"):o.css("top",this.options.posTop()+2+"pt")):((o=$('<div class="leftPosition id'+this.id+'" style="position: absolute;"></div>')).text(this.options.posLeft()+(s.positionUnit?"pt":"")),o.toggleClass("leftPosition-lineMode",s.positionLineMode),s.positionLineMode?o.css("top",this.options.posTop()-o.height()/3+"pt"):o.css("top",this.options.posTop()+2+"pt"),this.designTarget.parents(".hiprint-printPaper-content").append(o),o.css("left",this.options.posLeft()-o.width()+"pt"))),r.length?r.css("left",this.options.getLeft()+this.options.getWidth()+"pt"):((i=$('<div class="rightlineOfPosition'+this.id+'" style="border:0;border-left:1px dashed rgb(169, 169, 169);position: absolute;height: 100%;"></div>')).css("left",this.options.getLeft()+this.options.getWidth()+"pt"),i.css("height",t.displayHeight()),this.designTarget.parents(".hiprint-printPaper-content").append(i)),a.length?a.css("top",this.options.getTop()+this.options.getHeight()+"pt"):((n=$('<div class="bottomlineOfPosition'+this.id+'" style="border:0;border-top:1px dashed rgb(169, 169, 169);position: absolute;width: 100%;"></div>')).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(){$(".toplineOfPosition"+this.id).remove(),$(".topPosition.id"+this.id).remove(),this.designTarget.find(".size-box")&&this.designTarget.find(".size-box").toggleClass("hide",!1),$(".leftlineOfPosition"+this.id).remove(),$(".leftPosition.id"+this.id).remove(),$(".rightlineOfPosition"+this.id).remove(),$(".bottomlineOfPosition"+this.id).remove()},BasePrintElement.prototype.getFields=function(){var t=this.printElementType.getFields();return t||_HiPrintlib__WEBPACK_IMPORTED_MODULE_6__.a.instance.getPrintTemplateById(this.templateId).getFields()},BasePrintElement.prototype.bingCopyEvent=function(t){var e=this;t.keydown(function(t){(t.ctrlKey||t.metaKey)&&67==t.keyCode&&(e.copyJson(),t.preventDefault())})},BasePrintElement.prototype.copyJson=function(){try{var t=this,e=$("#copyArea"),i=(e.length||(e=$('<textarea id="copyArea" style="position: absolute; left: 0px; top: 0px;opacity: 0"></textarea>')),$("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;let 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;if(this.printElementType.formatter&&(formatter=this.printElementType.formatter),this.options.formatter)try{var s="formatter="+this.options.formatter;eval(s)}catch(t){}return 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(o,r){var a=this,s=void 0,l=void 0;o.attr("tabindex","1"),o.keydown(function(t){if(a.printElementType.type.includes("table"))if(a.columns&&a.columns.length){if(a.columns[0].isHead&&a.columns[0].columns.some(t=>1==t.isEditing))return}else if(a.options.columns&&a.options.columns.length)if(a.options.columns[0].isHead&&a.options.columns[0].columns.some(t=>1==t.isEditing))return;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),_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger("hiprintTemplateDataChanged_"+a.templateId,"删除"),_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.event.trigger("clearSettingContainer");break;case 37:s=a.options.getLeft(),i?e.forEach(function(t){t.updatePositionByMultipleSelect(0-n,0)}):(a.updateSizeAndPositionOptions(s-n),o.css("left",a.options.displayLeft()),a.createLineOfPosition(r)),t.preventDefault();break;case 38:l=a.options.getTop(),i?e.forEach(function(t){t.updatePositionByMultipleSelect(0,0-n)}):(a.updateSizeAndPositionOptions(void 0,l-n),o.css("top",a.options.displayTop()),a.createLineOfPosition(r)),t.preventDefault();break;case 39:s=a.options.getLeft(),i?e.forEach(function(t){t.updatePositionByMultipleSelect(n,0)}):(a.updateSizeAndPositionOptions(s+n),o.css("left",a.options.displayLeft()),a.createLineOfPosition(r)),t.preventDefault();break;case 40:l=a.options.getTop(),i?e.forEach(function(t){t.updatePositionByMultipleSelect(0,n)}):(a.updateSizeAndPositionOptions(void 0,l+n),o.css("top",a.options.displayTop()),a.createLineOfPosition(r)),t.preventDefault()}[37,38,39,40].includes(t.keyCode)&&_assets_plugins_hinnn__WEBPACK_IMPORTED_MODULE_4__.a.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,o=this.designTarget[0].offsetHeight,r=i+this.designTarget[0].offsetWidth,o=n+o,a=$(t.target[0]).position().left/e,e=$(t.target[0]).position().top/e,s=t.target[0].offsetHeight,t=t.target[0].offsetWidth;return a<r&&i<a+t&&n<e+s&&e<o},BasePrintElement.prototype.multipleSelect=function(t){t?this.designTarget.addClass("multipleSelect"):this.designTarget.removeClass("multipleSelect")},BasePrintElement.prototype.updatePositionByMultipleSelect=function(t,e){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){M.prototype.init=function(t){this.target=$('<input type="text" class="hitable-editor-text" value="" />'),t.getTarget().append(this.target),this.target.focus()},M.prototype.getValue=function(){return this.target.val()},M.prototype.setValue=function(t){this.target.val(t)},M.prototype.destroy=function(){this.target.remove()};var n=M,o=(Object.defineProperty(y,"Instance",{get:function(){return y._instance=y._instance?y._instance:new y},enumerable:!0,configurable:!0}),y),r=(b.prototype.init=function(t,i){var n='<select class="auto-submit" style="width:100%">\n <option value="" disabled>请选择字段</option>';t.forEach(function(t,e){t.field==i.field?n+=' <option value="'+(t.field||"")+'" selected >'+(t.text||"")+"</option>":n+=' <option value="'+(t.field||"")+'" >'+(t.text||"")+"</option>"}),n+=" </select>",this.target=$(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('<option value="'+t+'" >'+t+"</option>"),this.target.find("select").val(t)},b.prototype.destroy=function(){this.target.remove()},b),a=(Object.defineProperty(f,"Instance",{get:function(){return f._instance=f._instance?f._instance:new f},enumerable:!0,configurable:!0}),f),s=(Object.defineProperty(m,"Instance",{get:function(){return m._instance=o._instance?m._instance:new m},enumerable:!0,configurable:!0}),m.prototype.createEditor=function(t){return $.extend({},o.Instance[t])},m.prototype.createSelect=function(t){return $.extend({},a.Instance[t])},m),l=i(10),p=i(14),c=i(11),I=(h.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)})},h.prototype.getDisplayHtml=function(){return this.title},h.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||""),$(this.editor.target).keydown(function(t){13==t.keyCode&&i.endEdit(e)}),$(this.editor.target).change(function(t){i.endEdit(e)}),$(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||"")),$(this.editor.target).keydown(function(t){13==t.keyCode&&i.endEdit(e)}),$(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)},h.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.field=this.field=e[1])):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)},h),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.tableSummary=t.tableSummary,this.formatter2=t.formatter2,this.styler2=t.styler2,this.tableColumnHeight=t.tableColumnHeight,this.tableTextType=t.tableTextType,this.tableBarcodeMode=t.tableBarcodeMode},d=(g.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()},g.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))},g.prototype.endEdit=function(){this.isEditing=!1;var t=this.editor.getValue();this.editor.destroy(),this.target.html(t)},g.prototype.getTarget=function(){return this.target},g.prototype.getValue=function(){return this.target.html()},g.prototype.setValue=function(t){},g.prototype.initInnerEelement=function(){this.innerElement=new I,this.innerElement.init(this,this.tableOptions)},g.prototype.initEvent=function(){},g.prototype.isXYinCell=function(t,e){t=new l.b({x:t,y:e,height:0,width:0});return this.isOverlap(t)},g.prototype.getTableRect=function(){return new l.b({x:this.target.offset().left,y:this.target.offset().top,height:this.target[0].offsetHeight,width:this.target[0].offsetWidth})},g.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},g.prototype.isInRect=function(t){var e=t.rect,i=this.getTableRect();return e.x+e.width>i.x&&i.x+i.width>e.x&&e.y+e.height>i.y&&i.y+i.height>e.y&&(i=p.a.mergeRect(e,i),JSON.stringify(e)==JSON.stringify(i)||(t.changed=!0,t.rect=i,!0))},g.prototype.isSelected=function(){return this.target.hasClass("selected")},g.prototype.select=function(){this.target.addClass("selected")},g.prototype.isHeader=function(){return!1},g.prototype.setAlign=function(t){(this.align=t)?this.target.css("text-align",t):this.target[0].style.textAlign=""},g.prototype.setVAlign=function(t){(this.vAlign=t)?this.target.css("vertical-align",t):this.target[0].style.verticalAlign=""},g.prototype.getEntity=function(){return new u(this)},g);function g(){this.id=c.a.createId()}function h(){}function m(){}function f(){this.select=new r}function b(){}function y(){this.text=new n}function M(){}i.d(e,"a",function(){return j});(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)})(P=x,i=v=d),P.prototype=null===i?Object.create(i):(T.prototype=i.prototype,new T),x.prototype.css=function(t){};var v,P,j=x;function x(t){var e=this;return t=t||{},(e=v.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.formatter2=t.formatter2,e.styler2=t.styler2,e.checkbox=t.checkbox,e.checked=0!=t.checked,e.columnId=t.columnId||t.field,e.tableColumnHeight=t.tableColumnHeight||30,e.tableTextType=t.tableTextType||"text",e.tableBarcodeMode=t.tableBarcodeMode||"CODE128A",e.tableSummary=t.tableSummary,e}function T(){this.constructor=P}},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 n=TableExcelHelper.reconsitutionTableColumnTree(t),o=$("<thead></thead>"),r=TableExcelHelper.getColumnsWidth(n,e),i=0;i<n.totalLayer;i++)!function(t){var i=$("<tr></tr>");n[t].forEach(function(t){var e=$("<td></td>");t.id&&e.attr("id",t.id),t.columnId&&e.attr("column-id",t.columnId),(t.align||t.halign)&&e.css("text-align",t.halign||t.align),t.vAlign&&e.css("vertical-align",t.vAlign),1<t.colspan&&e.attr("c