/* artDialog v6.0.5 | https://github.com/aui/artDialog kgDialog*/ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;ec&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c").css({display:"none",position:"absolute",outline:0}).attr("tabindex","-1").html(this.innerHTML).appendTo("body");this.__backdrop=this.__mask=c("
").css({opacity:.7,background:"#000"});this.node=this.__popup[0]; this.backdrop=this.__backdrop[0];d++}var c=a("jquery"),d=0,h=!("minWidth"in c("html")[0].style),k=!h;return c.extend(b.prototype,{node:null,backdrop:null,fixed:!1,destroyed:!0,open:!1,returnValue:"",autofocus:!0,align:"bottom left",innerHTML:"",className:"ui-popup",show:function(a){if(this.destroyed)return this;var d=this.__popup,e=this.__backdrop;if(this.__activeElement=this.__getActive(),this.open=!0,this.follow=a||this.follow,!this.__ready){if(d.addClass(this.className).attr("role",this.modal? "alertdialog":"dialog").css("position",this.fixed?"fixed":"absolute"),h||c(window).on("resize",c.proxy(this.reset,this)),this.modal)a={position:"fixed",left:0,top:0,width:"100%",height:"100%",overflow:"hidden",userSelect:"none",zIndex:this.zIndex||b.zIndex},d.addClass(this.className+"-modal"),k||c.extend(a,{position:"absolute",width:c(window).width()+"px",height:c(document).height()+"px"}),e.css(a).attr({tabindex:"0"}).on("focus",c.proxy(this.focus,this)),this.__mask=e.clone(!0).attr("style","").insertAfter(d), e.addClass(this.className+"-backdrop").insertBefore(d),this.__ready=!0;d.html()||d.html(this.innerHTML)}return d.addClass(this.className+"-show").show(),e.show(),this.reset().focus(),this.__dispatchEvent("show"),this},showModal:function(){return this.modal=!0,this.show.apply(this,arguments)},close:function(a){return!this.destroyed&&this.open&&(void 0!==a&&(this.returnValue=a),this.__popup.hide().removeClass(this.className+"-show"),this.__backdrop.hide(),this.open=!1,this.blur(),this.__dispatchEvent("close")), this},remove:function(){if(this.destroyed)return this;this.__dispatchEvent("beforeremove");b.current===this&&(b.current=null);this.__popup.remove();this.__backdrop.remove();this.__mask.remove();h||c(window).off("resize",this.reset);this.__dispatchEvent("remove");for(var a in this)delete this[a];return this},reset:function(){var a=this.follow;return a?this.__follow(a):this.__center(),this.__dispatchEvent("reset"),this},focus:function(){var a=this.node,d=this.__popup,e=b.current,f=this.zIndex=b.zIndex++; (e&&e!==this&&e.blur(!1),c.contains(a,this.__getActive()))||(e=d.find("[autofocus]")[0],!this._autofocus&&e?this._autofocus=!0:e=a,this.__focus(e));return d.css("zIndex",f),b.current=this,d.addClass(this.className+"-focus"),this.__dispatchEvent("focus"),this},blur:function(a){var b=this.__activeElement;return!1!==a&&this.__focus(b),this._autofocus=!1,this.__popup.removeClass(this.className+"-focus"),this.__dispatchEvent("blur"),this},addEventListener:function(a,b){return this.__getEventListener(a).push(b), this},removeEventListener:function(a,b){a=this.__getEventListener(a);for(var c=0;ce.left*e.top)return this.__center()}var f= this.fixed,g=c(window);e=c(document);var h=g.width(),k=g.height(),l=e.scrollLeft(),x=e.scrollTop();e=d.width();g=d.height();var y=b?b.outerWidth():0,z=b?b.outerHeight():0,u=this.__offset(a);a=u.left;u=u.top;a=f?a-l:a;u=f?u-x:u;l=f?0:l;f=f?0:x;h=l+h-e;k=f+k-g;x={};var w=this.align.split(" "),C=this.className+"-",G={top:"bottom",bottom:"top",left:"right",right:"left"},t={top:"top",bottom:"top",left:"left",right:"left"},F=[{top:u-g,bottom:u+z,left:a-e,right:a+y},{top:u,bottom:u-g+z,left:a,right:a-e+ y}];e={left:a+y/2-e/2,top:u+z/2-g/2};var H={left:[l,h],top:[f,k]};c.each(w,function(a,b){F[a][b]>H[t[b]][1]&&(b=w[a]=G[b]);F[a][b]Loading..',title:"",statusbar:"",button:null,ok:null,cancel:null,okValue:"ok",cancelValue:"cancel",cancelDisplay:!0,width:"",height:"",padding:"",skin:"",quickClose:!1,cssUri:"../css/ui-dialog.css", innerHTML:'
'}); b("dialog",function(a){var b=a("jquery"),c=a("popup"),d=a("dialog-config"),h=d.cssUri;h&&(a=a[a.toUrl?"toUrl":"resolve"])&&(h=a(h),h='',b("base")[0]?b("base").before(h):b("head").append(h));var k=0,l=new Date-0;h=!("minWidth"in b("html")[0].style);var m="createTouch"in document&&!("onmousemove"in document)||/(iPhone|iPad|iPod)/i.test(navigator.userAgent),p=!h&&!m,n=function(a,c,d){var e=a=a||{};"string"!=typeof a&&1!==a.nodeType||(a={content:a,fixed:!m});a=b.extend(!0, {},n.defaults,a);a.original=e;e=a.id=a.id||l+k;var f=n.get(e);return f?f.focus():(p||(a.fixed=!1),a.quickClose&&(a.modal=!0,a.backdropOpacity=0),b.isArray(a.button)||(a.button=[]),void 0!==d&&(a.cancel=d),a.cancel&&a.button.push({id:"cancel",value:a.cancelValue,callback:a.cancel,display:a.cancelDisplay}),void 0!==c&&(a.ok=c),a.ok&&a.button.push({id:"ok",value:a.okValue,callback:a.ok,autofocus:!0}),n.list[e]=new n.create(a))};h=function(){};h.prototype=c.prototype;h=n.prototype=new h;return n.create= function(a){var d=this;b.extend(this,new c);var e=(a.original,b(this.node).html(a.innerHTML)),f=b(this.backdrop);return this.options=a,this._popup=e,b.each(a,function(a,b){"function"==typeof d[a]?d[a](b):d[a]=b}),a.zIndex&&(c.zIndex=a.zIndex),e.attr({"aria-labelledby":this._$("title").attr("id","title:"+this.id).attr("id"),"aria-describedby":this._$("content").attr("id","content:"+this.id).attr("id")}),this._$("close").css("display",!1===this.cancel?"none":"").attr("title",this.cancelValue).on("click", function(a){d._trigger("cancel");a.preventDefault()}),this._$("dialog").addClass(this.skin),this._$("body").css("padding",this.padding),a.quickClose&&f.on("onmousedown"in document?"mousedown":"click",function(){return d._trigger("cancel"),!1}),this.addEventListener("show",function(){f.css({opacity:0,background:a.backdropBackground}).animate({opacity:a.backdropOpacity},150)}),this._esc=function(a){var b=a.target,e=b.nodeName,f=/^input|textarea$/i;a=a.keyCode;c.current!==d||f.test(e)&&"button"!==b.type|| 27===a&&d._trigger("cancel")},b(document).on("keydown",this._esc),this.addEventListener("remove",function(){b(document).off("keydown",this._esc);delete n.list[this.id]}),k++,n.oncreate(this),this},n.create.prototype=h,b.extend(h,{content:function(a){var c=this._$("content");return"object"==typeof a?(a=b(a),c.empty("").append(a.show()),this.addEventListener("beforeremove",function(){b("body").append(a.hide())})):c.html(a),this.reset()},title:function(a){return this._$("title").text(a),this._$("header")[a? "show":"hide"](),this},width:function(a){return this._$("content").css("width",a),this.reset()},height:function(a){return this._$("content").css("height",a),this.reset()},button:function(a){a=a||[];var c=this,d="",e=0;return this.callbacks={},"string"==typeof a?(d=a,e++):b.each(a,function(a,f){var g=f.id=f.id||f.value;a="";c.callbacks[g]=f.callback;!1===f.display?a=' style="display:none"':e++;d+='";c._$("button").on("click","[i-id="+g+"]",function(a){b(this).attr("disabled")||c._trigger(g);a.preventDefault()})}),this._$("button").html(d),this._$("footer")[e?"show":"hide"](),this},statusbar:function(a){return this._$("statusbar").html(a)[a?"show":"hide"](),this},_$:function(a){return this._popup.find("[i="+a+"]")},_trigger:function(a){a=this.callbacks[a];return"function"!=typeof a||!1!==a.call(this)?this.close().remove():this}}),n.oncreate=b.noop,n.getCurrent=function(){return c.current}, n.get=function(a){return void 0===a?n.list:n.list[a]},n.list={},n.defaults=d,n});window.dialog=a("dialog")}();var maxTickDepth$$module$webapp$kinggrid$signature_all=100,toString$$module$webapp$kinggrid$signature_all=Object.prototype.toString,nextTick$$module$webapp$kinggrid$signature_all="function"===typeof setImmediate?setImmediate:function(a){setTimeout(a,0)},isArray$$module$webapp$kinggrid$signature_all=Array.isArray||function(a){return"[object Array]"===toString$$module$webapp$kinggrid$signature_all.call(a)}; function slice$$module$webapp$kinggrid$signature_all(a,b){var c=a.length,d=Array(c);for(b=b||0;c-- >b;)d[c-b]=a[c];return d}function carry$$module$webapp$kinggrid$signature_all(a,b){try{b.apply(null,slice$$module$webapp$kinggrid$signature_all(arguments,2))}catch(c){a(c)}}function defer$$module$webapp$kinggrid$signature_all(a,b){var c=slice$$module$webapp$kinggrid$signature_all(arguments,2);nextTick$$module$webapp$kinggrid$signature_all(function(){try{b.apply(null,c)}catch(d){a(d)}})} function Thenjs$$module$webapp$kinggrid$signature_all(a,b){if(a instanceof Thenjs$$module$webapp$kinggrid$signature_all)return a;if(!(this instanceof Thenjs$$module$webapp$kinggrid$signature_all))return new Thenjs$$module$webapp$kinggrid$signature_all(a,b);this._finally=this._error=this._fail=this._result=this._nextThen=this._chain=this._success=this._each=this._eachSeries=this._parallel=this._series=null;if(!arguments.length)return this;var c=genContinuation$$module$webapp$kinggrid$signature_all(this, b);try{"function"===typeof a?a(c):null==a?c():"function"===typeof a.toThunk?a.toThunk()(c):"function"===typeof a.then?a.then(function(a){c(null,a)},c):c(null,a)}catch(d){c(d)}}Thenjs$$module$webapp$kinggrid$signature_all.defer=defer$$module$webapp$kinggrid$signature_all; Thenjs$$module$webapp$kinggrid$signature_all.each=function(a,b,c){return thenFactory$$module$webapp$kinggrid$signature_all(function(c){defer$$module$webapp$kinggrid$signature_all(c,each$$module$webapp$kinggrid$signature_all,c,a,b)},null,c)};Thenjs$$module$webapp$kinggrid$signature_all.eachSeries=function(a,b,c){return thenFactory$$module$webapp$kinggrid$signature_all(function(c){defer$$module$webapp$kinggrid$signature_all(c,eachSeries$$module$webapp$kinggrid$signature_all,c,a,b)},null,c)}; Thenjs$$module$webapp$kinggrid$signature_all.parallel=function(a,b){return thenFactory$$module$webapp$kinggrid$signature_all(function(b){defer$$module$webapp$kinggrid$signature_all(b,parallel$$module$webapp$kinggrid$signature_all,b,a)},null,b)};Thenjs$$module$webapp$kinggrid$signature_all.series=function(a,b){return thenFactory$$module$webapp$kinggrid$signature_all(function(b){defer$$module$webapp$kinggrid$signature_all(b,series$$module$webapp$kinggrid$signature_all,b,a)},null,b)}; Thenjs$$module$webapp$kinggrid$signature_all.nextTick=function(a){var b=slice$$module$webapp$kinggrid$signature_all(arguments,1);nextTick$$module$webapp$kinggrid$signature_all(function(){a.apply(null,b)})};Thenjs$$module$webapp$kinggrid$signature_all.onerror=function(a){console.error("Thenjs caught error: ",a);throw a;};var proto$$module$webapp$kinggrid$signature_all=Thenjs$$module$webapp$kinggrid$signature_all.prototype; proto$$module$webapp$kinggrid$signature_all.fin=proto$$module$webapp$kinggrid$signature_all.all=proto$$module$webapp$kinggrid$signature_all["finally"]=function(a){return thenFactory$$module$webapp$kinggrid$signature_all(function(b,c){c._finally=wrapTaskHandler$$module$webapp$kinggrid$signature_all(b,a)},this)}; proto$$module$webapp$kinggrid$signature_all.then=function(a,b){return thenFactory$$module$webapp$kinggrid$signature_all(function(c,d){d._success=wrapTaskHandler$$module$webapp$kinggrid$signature_all(c,a);d._error=b&&wrapTaskHandler$$module$webapp$kinggrid$signature_all(c,b)},this)}; proto$$module$webapp$kinggrid$signature_all.fail=proto$$module$webapp$kinggrid$signature_all["catch"]=function(a){return thenFactory$$module$webapp$kinggrid$signature_all(function(b,c){c._fail=wrapTaskHandler$$module$webapp$kinggrid$signature_all(b,a);c._success=function(){b.apply(null,[null].concat(slice$$module$webapp$kinggrid$signature_all(arguments)))}},this)}; proto$$module$webapp$kinggrid$signature_all.each=function(a,b){return thenFactory$$module$webapp$kinggrid$signature_all(function(c,d){d._each=function(d,f){each$$module$webapp$kinggrid$signature_all(c,a||d,b||f)}},this)};proto$$module$webapp$kinggrid$signature_all.eachSeries=function(a,b){return thenFactory$$module$webapp$kinggrid$signature_all(function(c,d){d._eachSeries=function(d,f){eachSeries$$module$webapp$kinggrid$signature_all(c,a||d,b||f)}},this)}; proto$$module$webapp$kinggrid$signature_all.parallel=function(a){return thenFactory$$module$webapp$kinggrid$signature_all(function(b,c){c._parallel=function(c){parallel$$module$webapp$kinggrid$signature_all(b,a||c)}},this)};proto$$module$webapp$kinggrid$signature_all.series=function(a){return thenFactory$$module$webapp$kinggrid$signature_all(function(b,c){c._series=function(c){series$$module$webapp$kinggrid$signature_all(b,a||c)}},this)}; proto$$module$webapp$kinggrid$signature_all.toThunk=function(){var a=this;return function(b){a._result?(b.apply(null,a._result),a._result=!1):!1!==a._result&&(a._finally=b)}}; function continuation$$module$webapp$kinggrid$signature_all(a){var b=this,c=arguments;if(!1!==b._result){!b._result&&b._chain&&b.debug.apply(b,["\nChain "+b._chain+": "].concat(slice$$module$webapp$kinggrid$signature_all(c)));b._result=!1;try{continuationExec$$module$webapp$kinggrid$signature_all(b,c,a)}catch(d){nextTick$$module$webapp$kinggrid$signature_all(function(){continuationError$$module$webapp$kinggrid$signature_all(b,d,a)})}}} function continuationExec$$module$webapp$kinggrid$signature_all(a,b,c){if(a._finally)return a._finally.apply(null,b);if(null!=c)throw c;if(c=a._success||a._each||a._eachSeries||a._parallel||a._series)return c.apply(null,slice$$module$webapp$kinggrid$signature_all(b,1));a._result=b} function continuationError$$module$webapp$kinggrid$signature_all(a,b,c){var d=a,e=a._error||a._fail;a._nextThen&&null==c&&(e=null,d=a._nextThen);for(;!e&&d;)e=d._fail,d=d._nextThen;if(e)return e(b);if(Thenjs$$module$webapp$kinggrid$signature_all.onerror)return Thenjs$$module$webapp$kinggrid$signature_all.onerror(b);d._result=[b]} function genContinuation$$module$webapp$kinggrid$signature_all(a,b){function c(){return continuation$$module$webapp$kinggrid$signature_all.apply(a,arguments)}c._isCont=!0;b&&(proto$$module$webapp$kinggrid$signature_all.debug="function"===typeof b?b:defaultDebug$$module$webapp$kinggrid$signature_all,a._chain=1);return c} function thenFactory$$module$webapp$kinggrid$signature_all(a,b,c){var d=new Thenjs$$module$webapp$kinggrid$signature_all;c=genContinuation$$module$webapp$kinggrid$signature_all(d,c);a(c,b);if(!b)return d;b._nextThen=d;b._chain&&(d._chain=b._chain+1);b._result&&nextTick$$module$webapp$kinggrid$signature_all(function(){continuation$$module$webapp$kinggrid$signature_all.apply(b,b._result)});return d} function wrapTaskHandler$$module$webapp$kinggrid$signature_all(a,b){return b._isCont?b:function(){b.apply(null,[a].concat(slice$$module$webapp$kinggrid$signature_all(arguments)))}}function parallelNext$$module$webapp$kinggrid$signature_all(a,b,c,d){function e(e,g){if(!c.finished){if(null!=e)return c.finished=!0,a(e);b[d]=g;return 0>--c.i&&a(null,b)}}e._isCont=!0;return e} function each$$module$webapp$kinggrid$signature_all(a,b,c){var d,e=[],f={};if(!isArray$$module$webapp$kinggrid$signature_all(b))return a(errorify$$module$webapp$kinggrid$signature_all(b,"each"));f.i=d=b.length-1;if(0>d)return a(null,e);for(var g=0;g<=d;g++)c(parallelNext$$module$webapp$kinggrid$signature_all(a,e,f,g),b[g],g,b)} function parallel$$module$webapp$kinggrid$signature_all(a,b){var c,d=[],e={};if(!isArray$$module$webapp$kinggrid$signature_all(b))return a(errorify$$module$webapp$kinggrid$signature_all(b,"parallel"));e.i=c=b.length-1;if(0>c)return a(null,d);for(var f=0;f<=c;f++)b[f](parallelNext$$module$webapp$kinggrid$signature_all(a,d,e,f),f,b)} function eachSeries$$module$webapp$kinggrid$signature_all(a,b,c){function d(l,m){if(null!=l)return a(l);f[e]=m;if(++e>k)return a(null,f);g=0<--h?carry$$module$webapp$kinggrid$signature_all:(h=maxTickDepth$$module$webapp$kinggrid$signature_all,defer$$module$webapp$kinggrid$signature_all);g(a,c,d,b[e],e,b)}var e=0,f=[],g,h=maxTickDepth$$module$webapp$kinggrid$signature_all;d._isCont=!0;if(!isArray$$module$webapp$kinggrid$signature_all(b))return a(errorify$$module$webapp$kinggrid$signature_all(b,"eachSeries")); var k=b.length-1;if(0>k)return a(null,f);c(d,b[0],0,b)} function series$$module$webapp$kinggrid$signature_all(a,b){function c(k,l){if(null!=k)return a(k);e[d]=l;if(++d>h)return a(null,e);f=0<--g?carry$$module$webapp$kinggrid$signature_all:(g=maxTickDepth$$module$webapp$kinggrid$signature_all,defer$$module$webapp$kinggrid$signature_all);f(a,b[d],c,d,b)}var d=0,e=[],f,g=maxTickDepth$$module$webapp$kinggrid$signature_all;c._isCont=!0;if(!isArray$$module$webapp$kinggrid$signature_all(b))return a(errorify$$module$webapp$kinggrid$signature_all(b,"series")); var h=b.length-1;if(0>h)return a(null,e);b[0](c,0,b)}function defaultDebug$$module$webapp$kinggrid$signature_all(){console.log.apply(console,arguments)}function errorify$$module$webapp$kinggrid$signature_all(a,b){return Error("The argument "+(a&&a.toString())+' in "'+b+'" is not Array!')}Thenjs$$module$webapp$kinggrid$signature_all.NAME="Thenjs";Thenjs$$module$webapp$kinggrid$signature_all.VERSION="1.3.4"; var instance$$module$webapp$kinggrid$signature_all,root$$module$webapp$kinggrid$signature_all=window,KG$$module$webapp$kinggrid$signature_all=function(){function a(a,b){var c=p.length,d=a.constructor;d=q.is("Function",d)&&d.prototype||ObjProto;var e="constructor";for(q.has(a,e)&&!_.contains(b,e)&&b.push(e);c--;)e=p[c],e in a&&a[e]!==d[e]&&!_.contains(b,e)&&b.push(e)}function b(a){a=JSON.stringify(a);return e?a.replace(/\\u([0-9a-fA-F]{2,4})/g,function(a,b){return String.fromCharCode(parseInt(b,16))}): a}function c(){var a=navigator.userAgent.toLowerCase();return"micromessenger"==a.match(/MicroMessenger/i)?!1:"qq"==a.match(/QQ/i)?!1:"weibo"==a.match(/WeiBo/i)?!1:null!=a.match(/Android/i)?null==a.match(/browser/i):null!=a.match(/iPhone/i)?null==a.match(/safari/i):null==a.match(/macintosh/i)&&null==a.match(/windows/i)}function d(a){for(var c=[],d=0;d>>2]&=4294967295<<32-b%4*8;a.length=Math.ceil(b/4)},toString:function(a){return(a||g).stringify(this)}};var g={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;d>>2]>>>24-d%4*8&255;c.push((e>>>4).toString(16));c.push((e&15).toString(16))}return c.join("")}, parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},h={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;d>>2]>>>24-d%4*8&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-d%4*8;return new f(c,b)}},k={stringify:function(a){try{return decodeURIComponent(escape(h.stringify(a)))}catch(K){throw Error("Malformed UTF-8 data"); }},parse:function(a){return h.parse(unescape(encodeURIComponent(a)))}},l=function(a){this.map=a};l.map={};l.of=function(a){a=a||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var b=l.map[a];b||(b=new l(a));return b};l.prototype={decodeByte:function(a){var b=a.length,c=this.map,d=c.charAt(64);d&&(d=a.indexOf(d),-1!=d&&(b=d));d=[];for(var e=0,g=0;g>>6-g%4*2;d[e>>>2]|=(h|I)<<24-e%4*8;e++}return new f(d, e)},decode:function(a){return k.stringify(this.decodeByte(a))},encode:function(a){if(a)return this.encodeByte(k.parse(a))},encodeByte:function(a){var b=a.words,c=a.sigBytes,d=this.map;a.clamp();a=[];for(var e=0;e>>2]>>>24-e%4*8&255)<<16|(b[e+1>>>2]>>>24-(e+1)%4*8&255)<<8|b[e+2>>>2]>>>24-(e+2)%4*8&255,g=0;4>g&&e+.75*g>>6*(3-g)&63));if(b=d.charAt(64))for(;a.length%4;)a.push(b);return a.join("")}};var m=!{toString:null}.propertyIsEnumerable("toString"), p="valueOf isPrototypeOf toString propertyIsEnumerable hasOwnProperty toLocaleString".split(" "),n=function(a,b){var c=a.length,d=[];for(b=b||0;c-- >b;)d[c-b]=a[c];return d},r=function(){},q={Utf8:k,Base64:l,slice:n,boolean:function(a,b,c){return!(a.hasOwnProperty(b)?!a[b]:!c)},rand:function(a){return Math.ceil((9301*(new Date).getTime()+49297)%233280/233280*a)},addEvent:function(a){var b=c();return a?function(a,b,c){b=b.split(" ");for(var d=0;dd||null==c)return c;for(var e=1;earguments.length?[]:[].slice.call(arguments).slice(2);return a.apply(b, c)}return a},$:function(a){var b=document.getElementById(a);if(!b){var c=document.getElementsByName(a);c&&0b;b+=1)c+=a.slice(b,b+1).concat(a.slice(b,b+1));a=c}c=[];for(b=1;7>b;b+=2)c.push(parseInt("0x"+a.slice(b,b+2)));return"RGB("+c.join(",")+")"}return a},colorHex:function(a){if(/^(rgb|RGB)/.test(a)){for(var b=a.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(","),c="#",d=0;d]+)?%>/g,d=/(^( )?(var|if|for|else|switch|case|break|{|}))(.*)?/g,e="var r=[];\n",f=0,g=function(a,b){b?e+=a.match(d)?a+"\n":"r.push("+a+");\n":e+=""!=a?'r.push("'+a.replace(/"/g,'\\"')+'");\n':"";return g},h;h=c.exec(a);)g(a.slice(f,h.index))(h[1],!0),f= h.index+h[0].length;g(a.substr(f,a.length-f));e+='return r.join("");';return(new Function(e.replace(/[\r\t\n]/g,""))).apply(b,n(arguments,2))},first:function(a,b){return a.substring(0,1)[b?"toLowerCase":"toUpperCase"]()+a.substring(1)},html2Escape:function(a){return a.replace(/[<>&"]/g,function(a){return{"<":"<",">":">","&":"&",'"':"""}[a]})}},B=function(a){this.name=a};B.prototype={on:function(a,b){this.__getEventListener(a).push(b);return this},off:function(a,b){a=this.__getEventListener(a); for(var c=0;c
', sealTpl:'
\t
<% var seals = this.seals; %><% for(var i=0;i
<%seals[i].signname%>
<%}%>
<% if(this.signDateIsCheck){ %>  <%}else{%>  <%}%>
 <% if(this.showProtectedBtn){%> <%}%>
', passwordTpl:'
 
'}, font$$module$webapp$kinggrid$signature_all=plus$$module$webapp$kinggrid$signature_all.fontTemplate={fontFormat:"yyyy-M-d;yyyy.M.d;yyyy/M/d;yyyy\u5e74M\u6708d\u65e5;yy/M/d;yy.M.d;yyyy-MM-dd;yyyy/MM/dd;yyyy.MM.dd;yyyy\u5e74M\u6708d\u65e5*;yyyy\u5e74M\u6708d\u65e5**;MM/dd;MM.dd;M/d;M.d;d-MMM-yyyy;d-MMM-yy;yyyy-M-d hh:mm:ss".split(";"),fontFamily:"@Arial Unicode MS;@Fixedsys;@Malgun Gothic;@Malgun Gothic Semilight;@Meiryo;@Meiryo UI;@Microsoft JhengHei;@Microsoft JhengHei Light;@Microsoft JhengHei UI;@Microsoft JhengHei UI Light;@Microsoft YaHei UI;@Microsoft YaHei UI Light;@MingLiU_HKSCS-ExtB;@MingLiU-ExtB;@MS Gothic;@MS PGothic;@MS UI Gothic;@PMingLiU-ExtB;@SimSun-ExtB;@System;@Terminal;@Yu Gothic;@Yu Gothic Light;@Yu Gothic Medium;@Yu Gothic UI;@Yu Gothic UI Light;@Yu Gothic UI Semibold;@Yu Gothic UI Semilight;@\u7b49\u7ebf;@\u7b49\u7ebf Light;@\u65b9\u6b63\u5170\u4ead\u8d85\u7ec6\u9ed1\u7b80\u4f53;@\u65b9\u6b63\u8212\u4f53;@\u65b9\u6b63\u59da\u4f53;@\u4eff\u5b8b;@\u9ed1\u4f53;@\u534e\u6587\u5f69\u4e91;@\u534e\u6587\u4eff\u5b8b;@\u534e\u6587\u884c\u6977;@\u534e\u6587\u7425\u73c0;@\u534e\u6587\u6977\u4f53;@\u534e\u6587\u96b6\u4e66;@\u534e\u6587\u5b8b\u4f53;@\u534e\u6587\u7ec6\u9ed1;@\u534e\u6587\u65b0\u9b4f;@\u534e\u6587\u4e2d\u5b8b;@\u6977\u4f53;@\u96b6\u4e66;@\u5b8b\u4f53;@\u5fae\u8f6f\u96c5\u9ed1;@\u5fae\u8f6f\u96c5\u9ed1 Light;@\u65b0\u5b8b\u4f53;@\u5e7c\u5706;ADMUI3Lg;ADMUI3Sm;Agency FB;Algerian;Arial;Arial Black;Arial Narrow;Arial Rounded MT Bold;Arial Unicode MS;Axure Handwriting;Baskerville Old Face;Bauhaus 93;Bell MT;Berlin Sans FB;Berlin Sans FB Demi;Bernard MT Condensed;Blackadder ITC;Bodoni MT;Bodoni MT Black;Bodoni MT Condensed;Bodoni MT Poster Compressed;Book Antiqua;Bookman Old Style;Bookshelf Symbol 7;Bradley Hand ITC;Britannic Bold;Broadway;Brush Script MT;Calibri;Calibri Light;Californian FB;Calisto MT;Cambria;Cambria Math;Candara;Castellar;Centaur;Century;Century Gothic;Century Schoolbook;Chiller;Colonna MT;Comic Sans MS;Consolas;Constantia;Cooper Black;Copperplate Gothic Bold;Copperplate Gothic Light;Corbel;Courier;Courier New;Curlz MT;Default;Ebrima;Edwardian Script ITC;Elephant;Engravers MT;Eras Bold ITC;Eras Demi ITC;Eras Light ITC;Eras Medium ITC;Euro Sign;Felix Titling;Fixedsys;Footlight MT Light;Forte;Franklin Gothic Book;Franklin Gothic Demi;Franklin Gothic Demi Cond;Franklin Gothic Heavy;Franklin Gothic Medium;Franklin Gothic Medium Cond;Freestyle Script;French Script MT;Gabriola;Gadugi;Garamond;Georgia;Gigi;Gill Sans MT;Gill Sans MT Condensed;Gill Sans MT Ext Condensed Bold;Gill Sans Ultra Bold;Gill Sans Ultra Bold Condensed;Gloucester MT Extra Condensed;Goudy Old Style;Goudy Stout;Haettenschweiler;Harlow Solid Italic;Harrington;High Tower Text;Impact;Imprint MT Shadow;Informal Roman;Javanese Text;Jokerman;Juice ITC;Kristen ITC;Kunstler Script;Leelawadee UI;Leelawadee UI Semilight;Lucida Bright;Lucida Calligraphy;Lucida Console;Lucida Fax;Lucida Handwriting;Lucida Sans;Lucida Sans Typewriter;Lucida Sans Unicode;Magneto;Maiandra GD;Malgun Gothic;Malgun Gothic Semilight;Marlett;Matura MT Script Capitals;Meiryo;Meiryo UI;Microsoft Himalaya;Microsoft JhengHei;Microsoft JhengHei Light;Microsoft JhengHei UI;Microsoft JhengHei UI Light;Microsoft New Tai Lue;Microsoft PhagsPa;Microsoft Sans Serif;Microsoft Tai Le;Microsoft YaHei UI;Microsoft YaHei UI Light;Microsoft Yi Baiti;MingLiU_HKSCS-ExtB;MingLiU-ExtB;Mistral;Modern;Modern No. 20;Mongolian Baiti;Monotype Corsiva;MS Gothic;MS Outlook;MS PGothic;MS Reference Sans Serif;MS Reference Specialty;MS Sans Serif;MS Serif;MS UI Gothic;MT Extra;MV Boli;Myanmar Text;Niagara Engraved;Niagara Solid;Nirmala UI;Nirmala UI Semilight;OCR A Extended;Old English Text MT;Onyx;Palace Script MT;Palatino Linotype;Papyrus;Parchment;Perpetua;Perpetua Titling MT;Playbill;PMingLiU-ExtB;Poor Richard;Pristina;Rage Italic;Ravie;Rockwell;Rockwell Condensed;Rockwell Extra Bold;Roman;Script;Script MT Bold;Segoe MDL2 Assets;Segoe Print;Segoe Script;Segoe UI;Segoe UI Black;Segoe UI Emoji;Segoe UI Historic;Segoe UI Light;Segoe UI Semibold;Segoe UI Semilight;Segoe UI Symbol;Showcard Gothic;SimSun-ExtB;Sitka Banner;Sitka Display;Sitka Heading;Sitka Small;Sitka Subheading;Sitka Text;Small Fonts;Snap ITC;Stencil;Sylfaen;Symbol;System;Tahoma;TeamViewer11;Tempus Sans ITC;Terminal;Times New Roman;Trebuchet MS;Tw Cen MT;Tw Cen MT Condensed;Tw Cen MT Condensed Extra Bold;Verdana;Viner Hand ITC;Vivaldi;Vladimir Script;Webdings;Wide Latin;Wingdings;Wingdings 2;Wingdings 3;Yu Gothic;Yu Gothic Light;Yu Gothic Medium;Yu Gothic UI;Yu Gothic UI Light;Yu Gothic UI Semibold;Yu Gothic UI Semilight;ZWAdobeF;\u7b49\u7ebf;\u7b49\u7ebf Light;\u65b9\u6b63\u5170\u4ead\u8d85\u7ec6\u9ed1\u7b80\u4f53;\u65b9\u6b63\u8212\u4f53;\u65b9\u6b63\u59da\u4f53;\u4eff\u5b8b;\u9ed1\u4f53;\u534e\u6587\u5f69\u4e91;\u534e\u6587\u4eff\u5b8b;\u534e\u6587\u884c\u6977;\u534e\u6587\u7425\u73c0;\u534e\u6587\u6977\u4f53;\u534e\u6587\u96b6\u4e66;\u534e\u6587\u5b8b\u4f53;\u534e\u6587\u7ec6\u9ed1;\u534e\u6587\u65b0\u9b4f;\u534e\u6587\u4e2d\u5b8b;\u6977\u4f53;\u96b6\u4e66;\u5b8b\u4f53;\u5fae\u8f6f\u96c5\u9ed1;\u5fae\u8f6f\u96c5\u9ed1 Light;\u65b0\u5b8b\u4f53;\u5e7c\u5706".split(";"), fontSize:[8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72],fontColor:"#000000 #800000 #008000 #808000 #000080 #800080 #008080 #808080 #C0C0C0 #FFFFFF #FF0000 #00FF00 #FFFF00 #0000FF #FF00FF #00FFFF".split(" "),fontPosition:[["center","middle","inside","",""],["center","bottom","inside","",""],["right","middle","inside","",""],["right","bottom","inside","",""],["right","top","outside","left",""],["center","top","outside","","below"],["left","middle","outside","right",""],["right","top","outside","", "below"],["left","bottom","outside","right",""],["left","top","outside","right","below"]],position:"\u5c45\u4e2d \u5c45\u4e2d\u4e0b(\u7ae0\u5185) \u5c45\u53f3\u4e2d(\u7ae0\u5185) \u5c45\u53f3\u4e0b(\u7ae0\u5185) \u5c45\u5de6\u4e0a(\u7ae0\u5916) \u5c45\u4e2d\u4e0b(\u7ae0\u5916) \u5c45\u53f3\u4e2d(\u7ae0\u5916) \u5c45\u53f3\u4e0b(\u7ae0\u4e0b) \u5c45\u53f3\u4e0b(\u7ae0\u53f3) \u5c45\u53f3\u4e0b(\u7ae0\u53f3\u4e0b)".split(" ")},dafaultDate$$module$webapp$kinggrid$signature_all=plus$$module$webapp$kinggrid$signature_all.dafaultDate= "2017/01/01 12:00:00",defaultFont$$module$webapp$kinggrid$signature_all=plus$$module$webapp$kinggrid$signature_all.defaultFont={fontFormat:plus$$module$webapp$kinggrid$signature_all.fontTemplate.fontFormat[0],fontFamily:"\u5b8b\u4f53",fontSize:12,fontColor:"#000000",position:plus$$module$webapp$kinggrid$signature_all.fontTemplate.position[0]}; plus$$module$webapp$kinggrid$signature_all.kgFont=function(a){var b={};b.fontFormat=a.fontFormat?a.fontFormat:plus$$module$webapp$kinggrid$signature_all.defaultFont.fontFormat;b.fontFamily=a.fontFamily?a.fontFamily:plus$$module$webapp$kinggrid$signature_all.defaultFont.fontFamily;b.fontSize=a.fontSize?a.fontSize:plus$$module$webapp$kinggrid$signature_all.defaultFont.fontSize;b.fontColor=a.fontColor?a.fontColor:plus$$module$webapp$kinggrid$signature_all.defaultFont.fontColor;null!=a.position?(a=jQuery.inArray(a.position, plus$$module$webapp$kinggrid$signature_all.fontTemplate.position),b.fontPosition=plus$$module$webapp$kinggrid$signature_all.fontTemplate.fontPosition[a]):a.fontPositionIndex?b.fontPosition=plus$$module$webapp$kinggrid$signature_all.fontTemplate.fontPosition[a.fontPositionIndex]:(a=jQuery.inArray(plus$$module$webapp$kinggrid$signature_all.defaultFont.position,plus$$module$webapp$kinggrid$signature_all.fontTemplate.position),b.fontPosition=plus$$module$webapp$kinggrid$signature_all.fontTemplate.fontPosition[a]); return b};var formatArgs$$module$webapp$kinggrid$signature_all=function(a){var b=[a],c=Utils$$module$webapp$kinggrid$signature_all.slice(arguments,1),d;if(0>>2]|=(c[e>>>2]>>>24-e%4*8&255)<<24-(d+e)%4*8;else if(65535>>2]=c[e>>> 2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8;b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);a.words=this.words.slice(0);return a},random:function(b){for(var c=[],d=0;d>>2]>>>24-d%4*8&255;c.push((e>>>4).toString(16));c.push((e& 15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},k=g.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],d=0;d>>2]>>>24-d%4*8&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-d%4*8;return new f.init(c,b)}},l=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(r){throw Error("Malformed UTF-8 data"); }},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}},m=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=l.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=e/(4*g);h=b?a.ceil(h):a.max((h|0)-this._minBufferSize,0);b=h*g;e=a.min(4*b,e);if(b){for(var m=0;mr;r++){if(16>r)e[r]=a[b+r]|0;else{var q=e[r-3]^e[r-8]^e[r-14]^e[r-16];e[r]=q<<1|q>>>31}q=(d<<5|d>>>27)+n+e[r];q=20>r?q+((f&g|~f&p)+1518500249):40>r?q+((f^g^p)+1859775393):60>r? q+((f&g|f&p|g&p)-1894007588):q+((f^g^p)-899497514);n=p;p=g;g=f<<30|f>>>2;f=d;d=q}c[0]=c[0]+d|0;c[1]=c[1]+f|0;c[2]=c[2]+g|0;c[3]=c[3]+p|0;c[4]=c[4]+n|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32;b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296);b[(d+64>>>9<<4)+15]=c;a.sigBytes=4*b.length;this._process();return this._hash},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});a.SHA1=d._createHelper(b);a.HmacSHA1= d._createHmacHelper(b)})(this);var $$$module$webapp$kinggrid$signature_all=window.jQuery;kingPlus$$module$webapp$kinggrid$signature_all=window.kingPlus;isIE8$$module$webapp$kinggrid$signature_all=!1;root$$module$webapp$kinggrid$signature_all.JSON&&(isIE8$$module$webapp$kinggrid$signature_all='{"x":"\u4e2d"}'!==root$$module$webapp$kinggrid$signature_all.JSON.stringify({x:"\u4e2d"}));var canCanvas$$module$webapp$kinggrid$signature_all=!0; try{root$$module$webapp$kinggrid$signature_all.document.createElement("canvas").getContext("2d")}catch(a){canCanvas$$module$webapp$kinggrid$signature_all=!1}function stringify$$module$webapp$kinggrid$signature_all(a){a=JSON.stringify(a);return isIE8$$module$webapp$kinggrid$signature_all?a.replace(/\\u([0-9a-fA-F]{2,4})/g,function(a,c){return String.fromCharCode(parseInt(c,16))}):a}var now$$module$webapp$kinggrid$signature_all=function(){return(new Date).getTime()}; function rnd$$module$webapp$kinggrid$signature_all(a){return(9301*a+49297)%233280/233280}function rand$$module$webapp$kinggrid$signature_all(){var a=""+Math.ceil(99999*rnd$$module$webapp$kinggrid$signature_all((new Date).getTime())),b=5-a.length;if(0Math.abs(y-E)&&6>Math.abs(z-x)&&(m=!1);c?u.onend.call(a,b,m,g.marginLeft,g.marginTop):(console.log(3123), u.onend.call(a,b,m,f,e))};e.off=function(){d.off(f,e.start)};if(b)e.start(b);else d.on(f,e.start);return u};var Listener$$module$webapp$kinggrid$signature_all=kinggrid.Listener,Service$$module$webapp$kinggrid$signature_all=function(){};$$$module$webapp$kinggrid$signature_all.extend(Service$$module$webapp$kinggrid$signature_all.prototype,Listener$$module$webapp$kinggrid$signature_all.prototype);var SealService$$module$webapp$kinggrid$signature_all=function(){}; SealService$$module$webapp$kinggrid$signature_all.className=SealService$$module$webapp$kinggrid$signature_all.name||"SealService";Utils$$module$webapp$kinggrid$signature_all.inherit(SealService$$module$webapp$kinggrid$signature_all,Service$$module$webapp$kinggrid$signature_all); $$$module$webapp$kinggrid$signature_all.extend(SealService$$module$webapp$kinggrid$signature_all.prototype,{loadSeal:function(){throw Error("must impl");},saveLog:function(){},verifyPwd:function(){throw Error("must impl");}});var CertService$$module$webapp$kinggrid$signature_all=function(){};CertService$$module$webapp$kinggrid$signature_all.className=CertService$$module$webapp$kinggrid$signature_all.name||"CertService"; Utils$$module$webapp$kinggrid$signature_all.inherit(CertService$$module$webapp$kinggrid$signature_all,Service$$module$webapp$kinggrid$signature_all);$$$module$webapp$kinggrid$signature_all.extend(CertService$$module$webapp$kinggrid$signature_all.prototype,{sign:function(){throw Error("must impl");},verifySign:function(){throw Error("must impl");}});var KgObject$$module$webapp$kinggrid$signature_all=function(){}; $$$module$webapp$kinggrid$signature_all.extend(KgObject$$module$webapp$kinggrid$signature_all.prototype,{getAttr:function(a){return this[a]},setAttr:function(a){var b=this;$$$module$webapp$kinggrid$signature_all.each(a,function(a,d){if("function"===typeof b[a])b[a](d);else b[a]=d})},removeAttr:function(a){delete this[a]}}); var Signature$$module$webapp$kinggrid$signature_all=function(a,b){var c=this;c.signatureid=a;c.setSignatureData(b);c.on("load",function(){Signature$$module$webapp$kinggrid$signature_all.list[a]=this});c.on("remove",function(a){a=c._getLogInfo(Utils$$module$webapp$kinggrid$signature_all.extend(a||{},{LOGTYPE:"00",LOGSORT:"14",LOGMEMO:"\u64a4\u9500\u7b7e\u7ae0\u6210\u529f"}));c.sealService.saveLog(a);delete Signature$$module$webapp$kinggrid$signature_all.list[c.signatureid]});c.on("update",function(a){"signMeta"=== c._item&&(a=c._getLogInfo(Utils$$module$webapp$kinggrid$signature_all.extend(a||{},{LOGTYPE:"00",LOGSORT:"304",LOGMEMO:"\u6570\u5b57\u7b7e\u540d\u6210\u529f"})),c.sealService.saveLog(a))});c.on("fireremove",function(){Signature$$module$webapp$kinggrid$signature_all.removeList.push(c.signatureid)});c.on("fireupdate",function(){for(var a=!1,b=0;bf?k:f)}}else this.calSealPos(d,c,e,b);this.trigger("showAt",c[0],a,b);return c},calSealPos:function(a,b,c,d){var e=a.offsetParent();c=c||b;if("html"==e[0].tagName.toLowerCase()||"relative"== e[0].style.position)e=$$$module$webapp$kinggrid$signature_all("body");a=a.offset();var f=e.offset();e.is("body")&&(f={top:0,left:0});c.css({top:a.top-f.top,left:a.left-f.left});d?(e=d.marginLeft,d=d.marginTop):(e=b.css("marginLeft"),d=b.css("marginTop"));b.css({marginLeft:e||0,marginTop:d||0})},addDateToImg:function(a,b,c){b=kinggrid.Utils.formatDate(new Date(b),a.fontFormat);var d=$$$module$webapp$kinggrid$signature_all(document.createElement("div")).addClass("kg-date"),e=0,f=0;"outside"==a.fontPosition[2]&& ("right"==a.fontPosition[3]?e+=c.width():"left"==a.fontPosition[3]&&(e-=c.width()),"below"==a.fontPosition[4]&&(f+=c.height()));d.css({width:c.width(),height:c.height(),top:f,left:e});e=$$$module$webapp$kinggrid$signature_all(document.createElement("div")).addClass("kg-date-tmb").css({width:c.width(),top:"0px"});f=$$$module$webapp$kinggrid$signature_all(document.createElement("div")).addClass("kg-date-lcr").css({"text-align":a.fontPosition[0],"font-family":a.fontFamily,"font-size":a.fontSize+"px", color:a.fontColor});"bottom"==a.fontPosition[1]?e.css({bottom:0}):"middle"==a.fontPosition[1]&&f.css({"line-height":c.height()+"px"});f.html(b);e.html(f);d.html(e);c.append(d)},canSign:function(){return!this.modified&&!Signature$$module$webapp$kinggrid$signature_all.options.readonly&&Signature$$module$webapp$kinggrid$signature_all.options.signable&&!this.signatureData.signMeta},canMove:function(a){(a=!Signature$$module$webapp$kinggrid$signature_all.options.readonly&&this.signatureData.moveable&&Signature$$module$webapp$kinggrid$signature_all.options.moveable&& !$$$module$webapp$kinggrid$signature_all(a).attr("kg-display"))&&Signature$$module$webapp$kinggrid$signature_all.options.moveable_self&&(a=this.signatureData.keysn==Signature$$module$webapp$kinggrid$signature_all.options.keysn);return a},canDelete:function(){return!Signature$$module$webapp$kinggrid$signature_all.options.readonly},_handleImg:function(a){a.show();if(0==a.children(".kg-shade").length){var b=$$$module$webapp$kinggrid$signature_all(document.createElement("div")).addClass("kg-shade");b.append(createImg$$module$webapp$kinggrid$signature_all(blankImg$$module$webapp$kinggrid$signature_all, a.width(),a.height()));a.append(b)}this._invalid(a);this.trigger("handleImg",a[0])},setSignatureData:function(a){Utils$$module$webapp$kinggrid$signature_all.is("String",a)?this.signatureData=JSON.parse(Utils$$module$webapp$kinggrid$signature_all.Base64.of().decode(a)):this.signatureData=a;this.oriSignatureData=JSON.parse(JSON.stringify(this.signatureData))},getSignatureid:function(){return this.signatureid},getSignatureData:function(){var a=JSON.stringify(this.signatureData);return Utils$$module$webapp$kinggrid$signature_all.Base64.of().encode(a)}, getBase64Image:function(a,b,c,d){c="kg-img-div-"+a+"-"+c;c=document.getElementById(c);null!=c&&(isIE8$$module$webapp$kinggrid$signature_all?d(this,"",a,b):html2canvas(c).then(function(c){c=c.toDataURL("image/png").split(",");d(this,c,a,b)}))},_invalid:function(a){var b=a.children(".kg-invalid");if(0==b.length){b=$$$module$webapp$kinggrid$signature_all(document.createElement("div")).addClass("kg-hide").addClass("kg-invalid");a.append(b);var c=a.height()/3;b.css({top:c,height:c});c/=3;for(var d=a.width(), e=0;3>e;e++){var f=$$$module$webapp$kinggrid$signature_all(document.createElement("div")).height(c);0==e%2&&(f.addClass("kg-invalid-item"),f.append(createImg$$module$webapp$kinggrid$signature_all(blackImg$$module$webapp$kinggrid$signature_all,d,c)));b.append(f)}}if(this.modified){c="";for(d=0;d")},_formatValue:function(a,b){a&&(a=a.replace(/\r\n/ig,"\n"),a=a.replace(/\n/ig,"\r\n"));return a},getItemVal:function(a){var b;if(b=Utils$$module$webapp$kinggrid$signature_all.is("String",a)?Utils$$module$webapp$kinggrid$signature_all.$(a):a)return a=b.tagName.toLowerCase(),"input"===a||"textarea"===a||"select"===a?b.getAttribute("kg-value")||b.value:b.getAttribute("kg-value")||(isIE8$$module$webapp$kinggrid$signature_all?b.innerText:b.textContent);throw Error("No find protectedItem:"+a+" signatureid="+ this.signatureid);},getProtectedData:function(a){var b=this,c=[],d=function(a){var c=Utils$$module$webapp$kinggrid$signature_all.$(a);if(c){var d={field:a};d.desc=c.getAttribute("kg-desc")||a;d.value=b.getItemVal(c);return d}throw Error("No find protectedItem:"+a+" signatureid="+this.signatureid);},e=function(a){if(Utils$$module$webapp$kinggrid$signature_all.is("String",a))a=d(a);else if(!Utils$$module$webapp$kinggrid$signature_all.is("Object",a)||!a.field)throw Error("Unsupported protectedItems:"+ a.toString);Utils$$module$webapp$kinggrid$signature_all.is("Function",a.value)&&(a.value=a.value.call(b,a.field,a.desc));a.value=b._formatValue(a.value);return a};if(a)if(Utils$$module$webapp$kinggrid$signature_all.is("Array",a))for(var f=0,g=a.length;fk?(f.errorCallback({errcode:"11104"},b.errorCall),g=!1):e==k?a>l?(f.errorCallback({errcode:"11104"},b.errorCall),g=!1):a==l?g>h?(f.errorCallback({errcode:"11104"},b.errorCall),g=!1):g=!0:g=!0:g=!0}else return a=Signature$$module$webapp$kinggrid$signature_all.options.serverUrl+"_key_sealIsExpired",e=(parseInt(e)+1).toString(),$$$module$webapp$kinggrid$signature_all.ajax({url:a,type:"POST", data:{keysn:f.keyData.keysn,year:(new Date).getFullYear(),month:(new Date).getMonth(),date:(new Date).getDate(),index:e},async:!1,success:function(a){if(a.error)return f.errorCallback({errcode:"11105"},b.errorCall),!1;if(0==a.result)return f.certExpired(b,c,d);f.errorCallback({errcode:"11104"},b.errorCall);return!1},error:function(a){f.errorCallback({errcode:"11105"},b.errorCall)}}),!1;return g?f.certExpired(b,c,d):g},certExpired:function(a,b,c){var d=this,e=!1;if(void 0===Signature$$module$webapp$kinggrid$signature_all.options.valid|| null===Signature$$module$webapp$kinggrid$signature_all.options.valid||!1===Signature$$module$webapp$kinggrid$signature_all.options.valid)return!0;kinggrid.surry(Signature$$module$webapp$kinggrid$signature_all.options.clientUrl,"IWEBASSIST.iWebAssistCtrl.1","4240FB41-A213-42B6-8CB5E6705C99B319",Signature$$module$webapp$kinggrid$signature_all.options.clientCode).invoke("KGGetCerInfo","").ret(function(f){var g=parseInt(b.substr(0,4)),h=parseInt(b.substr(5,2)),k=parseInt(b.substr(8,2));if(f.result){f= f.certinfo.notAfter;var l=parseInt(f.substr(0,4)),m=parseInt(f.substr(4,1));m=0==m?parseInt(f.substr(5,1)):parseInt(f.substr(4,2));var p=parseInt(f.substr(6,1));p=0==p?parseInt(f.substr(7,1)):parseInt(f.substr(6,2));g>l?d.errorCallback({errcode:"11103"},a.errorCall):g==l?h>m?d.errorCallback({errcode:"11103"},a.errorCall):h==m?k>p?d.errorCallback({errcode:"11103"},a.errorCall):e=!0:e=!0:e=!0}else d.errorCallback({errcode:"11106"},a.errorCall);void 0!==c&&null!==c&&c(e)});return e},errorCallback:function(a, b,c,d){b?(plus$$module$webapp$kinggrid$signature_all.hideLoading(),b.call(null,a,c)):this.error(a,c,null,d)},runHW:function(a,b){var c=this;plus$$module$webapp$kinggrid$signature_all.showLoading();"undefined"!=typeof a.imageData&&null!=a.imageData&&(void 0!==a.beginCall&&a.beginCall&&a.beginCall.call(c),c.sealService.loadSeal({data:a.imageData,successCall:function(d){plus$$module$webapp$kinggrid$signature_all.hideLoading();if(d.result&&d.seals){for(var e in d.seals){d.seals=[{width:a.width,height:a.height, imgext:d.seals[e].imgext,signname:a.name,signsn:d.seals[e].signsn,username:d.seals[e].username,imgdata:a.imageData,headinfoex:d.seals[e].headinfoex}];break}c.keyData=d;c.showSeals(b)}else c.errorCallback(d,a.errorCall)},errorCall:function(b){c.errorCallback(b,a.errorCall)}}))},run:function(a){var b=this;b.keyData?b.showSeals(a):(plus$$module$webapp$kinggrid$signature_all.showLoading(),void 0!==a.beginCall&&a.beginCall&&a.beginCall.call(b),b.sealService.loadSeal({successCall:function(c){plus$$module$webapp$kinggrid$signature_all.hideLoading(); c.result?c.seals&&c.seals.length?(b.keyData=c,void 0!==Signature$$module$webapp$kinggrid$signature_all.options.imgtag&&0!==Signature$$module$webapp$kinggrid$signature_all.options.imgtag&&void 0===c.ServerTime?void 0!==b.serverUrl&&null!==b.serverUrl?(c={usercode:b.usercode,keysn:b.keyData.keysn,signname:b.signname,authcode:Signature$$module$webapp$kinggrid$signature_all.authcode},kinggrid.surry(b.serverUrl).request("_key_load",c).ret(function(c){c.result?(b.curDate=c.ServerTime,b.keyData=c,b.showSeals(a)): b.errorCallback(c,a.errorCall)})):(b.curDate=(new Date).toLocaleString(),b.showSeals(a)):(b.curDate=c.ServerTime,b.showSeals(a))):b.errorCallback({errcode:"11100"+Signature$$module$webapp$kinggrid$signature_all.options.imgtag},a.errorCall):b.errorCallback(c,a.errorCall)},errorCall:function(c){b.errorCallback(c,a.errorCall)}}));return this},getSealsByKeysn:function(a,b,c){var d=this;d.sealService.loadSeal({successCall:function(a){if(a.result){var c=[];if(void 0!==b&&null!=b){for(var e=0;e
'+a+'
 
', onOk:function(){this.find("#kg-noMorePrompts").is(":checked")&&localStorage.setItem("lastAlertDate",b)},onCancel:function(){}})}}); $$$module$webapp$kinggrid$signature_all.extend(Signature$$module$webapp$kinggrid$signature_all.options,{certType:"client",sealType:"client",clientUrl:"http://127.0.0.1:9581",moveable:!0,signable:!0,fontTemplate:plus$$module$webapp$kinggrid$signature_all.fontTemplate,template:{showSealsBtl:plus$$module$webapp$kinggrid$signature_all.template.sealTpl,showSealsBtl_nopassword:plus$$module$webapp$kinggrid$signature_all.template.sealTpl_nopassword,signSignatureBtl:'
', revokeSignatureBtl:'

<%this.signatureData.seal.signname%>

', protectedDataSetBtl:'
<% var newProData = this.newProData; %><% var isAllChecked = this.proItemsCheckedAll; %>
<% for(var i=0;i
<% var proId = "proItem"+i; %><% var filedd = newProData[i].desc && newProData[i].desc != "" ? newProData[i].desc : newProData[i].field; %><% var content = "[" + filedd+"]" + arguments[0](newProData[i].value); %><% if(newProData[i].isChecked){ %>  <% } %><% else{ isAllChecked = false; %>  <% } %>
<%}%>
<% if(isAllChecked){ %>  <% } else{ %>  <% } %>
', dateSetBtl:'
<% var fontColor = this.fontColor; %>
    <% for(var i=0;i
  • <%}%>
'}}); Signature$$module$webapp$kinggrid$signature_all.list={};Signature$$module$webapp$kinggrid$signature_all.updateList=[];Signature$$module$webapp$kinggrid$signature_all.removeList=[]; function formartSignatureData$$module$webapp$kinggrid$signature_all(a,b,c){var d=[],e={};for(k in a){var f={},g=a[k];Utils$$module$webapp$kinggrid$signature_all.is("String",g)&&0!=g.indexOf("ey")?(f["b64_"+k]=a[k],d.push(f)):e[k]=g}var h=[];(function(a){for(var b in a)h.push((new Signature$$module$webapp$kinggrid$signature_all(b,a[b])).load(Signature$$module$webapp$kinggrid$signature_all.options))})(e);if(a=d.length){e=Signature$$module$webapp$kinggrid$signature_all.options.signSize||5;var k=Math.ceil(a/ e);for(f=1;f<=k;f++){g=e*(f-1);var l=e*f>a?a:e*f;aisleKing$$module$webapp$kinggrid$signature_all=kinggrid.surry(Signature$$module$webapp$kinggrid$signature_all.options.serverUrl);aisleKing$$module$webapp$kinggrid$signature_all.request(Signature$$module$webapp$kinggrid$signature_all.options.b64Url,d.slice(g,l)).ret(function(a){if(a.result)for(var b in a){if(0==b.indexOf("b64_")){var c=a[b];Utils$$module$webapp$kinggrid$signature_all.is("String",c)&&(c=JSON.parse(c));h.push((new Signature$$module$webapp$kinggrid$signature_all(b.substring(4), c)).load(Signature$$module$webapp$kinggrid$signature_all.options))}}else Signature$$module$webapp$kinggrid$signature_all.prototype.error.call(null,a)})}}aisleKing$$module$webapp$kinggrid$signature_all.fin(function(a,d,e){b&&b(1==h.length?h[0]:h);c&&c()})} Signature$$module$webapp$kinggrid$signature_all.loadSignature=function(a,b,c,d){var e={};void 0==Signature$$module$webapp$kinggrid$signature_all.options.extra&&(Signature$$module$webapp$kinggrid$signature_all.options.extra={});e[a]=b;void 0!==e.extra&&null!==e.extra&&(Signature$$module$webapp$kinggrid$signature_all.options.extra[e.signatureid]=e.extra);formartSignatureData$$module$webapp$kinggrid$signature_all(e,c||function(a){Signature$$module$webapp$kinggrid$signature_all.verify()},d)}; Signature$$module$webapp$kinggrid$signature_all.loadSignatures=function(a,b,c){var d={};void 0==Signature$$module$webapp$kinggrid$signature_all.options.extra&&(Signature$$module$webapp$kinggrid$signature_all.options.extra={});if(Utils$$module$webapp$kinggrid$signature_all.is("Array",a))for(var e=0;e<%var modified = this.signModified;%><%var timeVerify = this.timeVerify;%>
">\u68c0\u6d4b\u7ed3\u679c\uff1a\u7b7e\u540d\u6570\u636e\u9a8c\u8bc1\u6b63\u5e38\uff01<%if(timeVerify!=null){%>"><%timeVerify==true?"(\u65f6\u95f4\u6233\u53ef\u4fe1\u4efb)":"(\u65f6\u95f4\u6233\u4e0d\u53ef\u4fe1\u4efb)"%><%}%>
">\u68c0\u6d4b\u7ed3\u679c\uff1a\u7b7e\u540d\u6570\u636e\u88ab\u7be1\u6539\uff01<%if(timeVerify!=null){%>"><%timeVerify==true?"(\u65f6\u95f4\u6233\u53ef\u4fe1\u4efb)":"(\u65f6\u95f4\u6233\u4e0d\u53ef\u4fe1\u4efb)"%><%}%>
<%var certinfo = this.signatureData.signMeta.certinfo; %>
V<%certinfo.version%>
<%certinfo.serialNumber%>
<%certinfo.algName%>
<%certinfo.issuerDN%>
<%certinfo.subjectDN%>
<%kinggrid.Utils.formatDate(new Date(certinfo.notBefore) , "yyyy-MM-dd hh:mm:ss")%>
<%kinggrid.Utils.formatDate(new Date(certinfo.notAfter) , "yyyy-MM-dd hh:mm:ss")%>
', signatureInfoBtl:'
<%var modified = this.modified;%><%var timeVerify = this.timeVerify;%><%var sealType = Signature.options.sealType;%>
">\u68c0\u6d4b\u7ed3\u679c\uff1a\u4fdd\u62a4\u6570\u636e\u6b63\u5e38\uff01<%if(timeVerify!=null){%>"><%timeVerify==true?"(\u65f6\u95f4\u6233\u53ef\u4fe1\u4efb)":"(\u65f6\u95f4\u6233\u4e0d\u53ef\u4fe1\u4efb)"%><%}%>
">\u68c0\u6d4b\u7ed3\u679c\uff1a\u4fdd\u62a4\u6570\u636e\u88ab\u7be1\u6539\uff01<%if(timeVerify!=null){%>"><%timeVerify==true?"(\u65f6\u95f4\u6233\u53ef\u4fe1\u4efb)":"(\u65f6\u95f4\u6233\u4e0d\u53ef\u4fe1\u4efb)"%><%}%>
signatureinfo"><% var SDATA = this.signatureData; %><% var modifiedItems = this.modifiedItems; %>
<%timeVerify%><%SDATA.appname%>
<%SDATA.orgname%>
<%SDATA.username%>
<%SDATA.keysn%>
<%SDATA.seal.signname%>
<%SDATA.seal.signsn%>
<%SDATA.timestamp.signtime%>
<%if(sealType == "client" && SDATA.seal.headinfoex){%>
<%SDATA.seal.headinfoex.sealProducer%>
<%SDATA.seal.headinfoex.sealMakingTime%>
<%}%>
<%if(modified){%><%var modifiedItems = this.modifiedItems;%><% for(var i=0;i<% var item = modifiedItems[i]; %>
">
<%this["_renderValue"](this["html2Escape"](item.orivalue)) %>
<%this["_renderValue"](this["html2Escape"](item.newvalue))%>
<%}%><%}%>
', handwritedlg:'
\u540d\u79f0:   \u989c\u8272:   \u7b14\u5bbd: height=<% this.canvasHeight%>>
            
', barcodedlg:'


',scanBCdlg:'

'}); plus$$module$webapp$kinggrid$signature_all=kingPlus$$module$webapp$kinggrid$signature_all();var _borken$$module$webapp$kinggrid$signature_all,_borkenReq$$module$webapp$kinggrid$signature_all; Signature$$module$webapp$kinggrid$signature_all.addLiseter("init",function(){aisleKing$$module$webapp$kinggrid$signature_all=Signature$$module$webapp$kinggrid$signature_all.aisleKing;for(var a=Signature$$module$webapp$kinggrid$signature_all.options.icons,b=0;b')}); a.on("handleImg",function(b){var c=$$$module$webapp$kinggrid$signature_all(b);c.find(".kg-img-icon").remove();if(options$$module$webapp$kinggrid$signature_all.icons){c=c.children(".kg-img-icons");for(var d=options$$module$webapp$kinggrid$signature_all.icons.length-1;0<=d;d--){var e=options$$module$webapp$kinggrid$signature_all.icons[d];if(Utils$$module$webapp$kinggrid$signature_all.val(e.enable,a,b)){"doornotmove"==e.id&&(a.signatureData.moveable?(e.iconClass=e.iconClass.substring(0,13)+"not",e.title= kinggrid.msg("SignatureMoveNot","KG_TITLE"),e.value="0"):(e.iconClass=e.iconClass.substring(0,13)+"do",e.title=kinggrid.msg("SignatureMoveDo","KG_TITLE"),e.value="1"));if("moveSignature"==e.id&&!a.signatureData.moveable)break;var f=$$$module$webapp$kinggrid$signature_all('');e.value&&(f=$$$module$webapp$kinggrid$signature_all(''));c.append(f);e.exec&&e.exec.call(a,b);(function(b,c,d){f.click(function(c){c.imgDiv=b;d.call(a,c,b)})})(b,f,e.click||function(a){a.preventDefault();a.stopPropagation()})}}}})},signatureInfo:function(){this.html2Escape=Utils$$module$webapp$kinggrid$signature_all.html2Escape;return this.showDialog("signatureInfoBtl",{target:this,onCancel:!1,onShow:function(){Signature$$module$webapp$kinggrid$signature_all.options.beginDlgShowCall&& Signature$$module$webapp$kinggrid$signature_all.options.beginDlgShowCall.call();var a=this.find(".kg-tab");this.tab=Utils$$module$webapp$kinggrid$signature_all.tab(a)}})},signInfo:function(){var a={title:kinggrid.msg("SignVerify","KG_TITLE"),target:this,onCancel:!1,onShow:function(){Signature$$module$webapp$kinggrid$signature_all.options.beginDlgShowCall&&Signature$$module$webapp$kinggrid$signature_all.options.beginDlgShowCall.call()}};return this.showDialog("signInfoBtl",a)},handWriteDlg:function(a, b){this.canvasHeight=a.canvas_height||500;this.canvasWidth=a.canvas_width||670;var c={title:kinggrid.msg("HWSignature","KG_TITLE"),target:this,onCancel:!1},d=this.showDialog("handwritedlg",c),e=d.find("#canvasId")[0];a.penColor=d.find("#hw_color").val();a.minWidth=.5;a.maxWidth=4.5;if(e.getContext){var f=new SignaturePad$$module$webapp$kinggrid$signature_all(e,a);e.onmouseleave=function(a){f.simulate_mouseevent(e,"mouseup");f.simulate_mouseevent(d.find("#kg-handwrite")[0],"mouseup")};d.find("#hw_color").click(function(){var a= d.find("#hw_color").val();f.penColor=a});d.find("#hw_width").click(function(){switch(d.find("#hw_width").val()){case "1":f.minWidth=.5;f.maxWidth=2.5;break;case "2":f.minWidth=.5;f.maxWidth=4.5;break;case "3":f.minWidth=1;f.maxWidth=6;break;case "4":f.minWidth=1;f.maxWidth=8;break;case "5":f.minWidth=2.5;f.maxWidth=10;break;case "6":f.minWidth=3;f.maxWidth=12;break;default:f.minWidth=.5,f.maxWidth=2.5}});c=d.find("#clearid");var g=d.find("#okid");c.click(function(){f.clear()});g.click(function(){d.close(); var c=f.toDataURL().replace(/^data:image\/\w+;base64,/,"");c&&(c={height:a.image_height||"5.00",width:a.image_width||"6.70",imageData:c,name:d.find("#nameid").val()},b(c),d.remove())});d.find(".ui-dialog-close").click(function(){d.close();a.onCancel&&a.onCancel.call()})}else d.close(),a.onError?a.onError.call():this.error({errcode:"11113"},"then")},fingerPrintsDevice:function(a,b){var c=this;kinggrid.surry(Signature$$module$webapp$kinggrid$signature_all.options.clientUrl,"IWEBASSIST.iWebAssistCtrl.1", "4240FB41-A213-42B6-8CB5E6705C99B319",Signature$$module$webapp$kinggrid$signature_all.options.clientCode).invoke("KGRunFingerPrints",a.device_type||"0",a.image_type||"gif","JSComServer","","").ret(function(d){if(d.result){var e=d.FingerPrintsMap,f=parseFloat(254*d.ImageWidth/9600).toFixed(2);d=parseFloat(254*d.ImageHeight/9600).toFixed(2);b({width:a.image_height||f,height:a.image_width||d,imageData:e,name:"\u6307\u7eb9\u7b7e\u540d"})}else c.errorCallback(d,a.errorCall,"KGRunFingerPrints")})},handWriteDevice:function(a, b){var c=this;void 0!=a.copy_right&&null!=a.copy_right&&kinggrid.surry(Signature$$module$webapp$kinggrid$signature_all.options.clientUrl,"IWEBASSIST.iWebAssistCtrl.1","4240FB41-A213-42B6-8CB5E6705C99B319",Signature$$module$webapp$kinggrid$signature_all.options.clientCode).invoke("KGRunHandWritten",a.device_type||"0",a.copy_right,"JSComServer","","").ret(function(d){if(d.result){var e=d.HandWrittenValue,f=parseFloat(254*d.ImageWidth/9600).toFixed(2);d=parseFloat(254*d.ImageHeight/9600).toFixed(2); b({width:a.image_height||f,height:a.image_width||d,imageData:e,name:"\u624b\u5199\u7b7e\u540d"})}else c.errorCallback(d,a.errorCall,"KGRunHandWritten")})},eqpHandWriter:function(a,b){var c=this;void 0!=a.Value&&null!=a.Value&&kinggrid.surry(Signature$$module$webapp$kinggrid$signature_all.options.clientUrl,"IWEBASSIST.iWebAssistCtrl.1","4240FB41-A213-42B6-8CB5E6705C99B319",Signature$$module$webapp$kinggrid$signature_all.options.clientCode).invoke("KGEQPHandWriter",a.Value,a.DllName,"JSComServer").ret(function(d){if(d.result){var e= d.imagedata,f=parseFloat(254*d.imagewidth/9600).toFixed(2);d=parseFloat(254*d.imageheight/9600).toFixed(2);b({width:a.image_height||f,height:a.image_width||d,imageData:e,name:"\u624b\u5199\u5c4f\u7b7e\u540d"})}else c.errorCallback(d,a.errorCall,"KGEQPHandWriter")})},barCodeDlg:function(a,b){if(void 0!=a.content&&null!=a.content){var c=$$$module$webapp$kinggrid$signature_all("#output").qrcode(a.content);b({height:a.image_height||"5",width:a.image_width||"5",imageData:c,name:"\u4e8c\u7ef4\u7801"})}}, scanBCDlg:function(a,b){var c={title:kinggrid.msg("scanBCSignature","KG_TITLE"),target:this,onCancel:!1},d=this.showDialog("scanBCdlg",c);try{var e=document.getElementById("canvas_scanBC").getContext("2d"),f=document.getElementById("video");c={video:!0,audio:!1};var g=!0,h=function(a){g=!1;a.PERMISSION_DENIED?alert("\u7528\u6237\u62d2\u7edd\u4e86\u6d4f\u89c8\u5668\u8bf7\u6c42\u5a92\u4f53\u7684\u6743\u9650","\u63d0\u793a"):a.NOT_SUPPORTED_ERROR?alert("\u5bf9\u4e0d\u8d77\uff0c\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u62cd\u7167\u529f\u80fd\uff0c\u8bf7\u4f7f\u7528\u5176\u4ed6\u6d4f\u89c8\u5668", "\u63d0\u793a"):a.MANDATORY_UNSATISFIED_ERROR?alert("\u6307\u5b9a\u7684\u5a92\u4f53\u7c7b\u578b\u672a\u63a5\u6536\u5230\u5a92\u4f53\u6d41","\u63d0\u793a"):alert("\u7cfb\u7edf\u672a\u80fd\u83b7\u53d6\u5230\u6444\u50cf\u5934\uff0c\u8bf7\u786e\u4fdd\u6444\u50cf\u5934\u5df2\u6b63\u786e\u5b89\u88c5\u3002\u6216\u5c1d\u8bd5\u5237\u65b0\u9875\u9762\uff0c\u91cd\u8bd5","\u63d0\u793a")};if(navigator.getUserMedia){if(-1a.indexOf("s")&&0>a.indexOf("h")&&0>a.indexOf("d"))a="s1800";Signature$$module$webapp$kinggrid$signature_all.options.pw_enc_save&&(b=Utils$$module$webapp$kinggrid$signature_all.Base64.of().encode(b)); setCookie$$module$webapp$kinggrid$signature_all("ksn",d,a);setCookie$$module$webapp$kinggrid$signature_all("pwd",b,a);setCookie$$module$webapp$kinggrid$signature_all("ck","true",a)}};Signature$$module$webapp$kinggrid$signature_all.options.pw_server_timeout?this.sealService.getPwdSaveTime(c,a):c(a)}else delCookie$$module$webapp$kinggrid$signature_all("ksn"),delCookie$$module$webapp$kinggrid$signature_all("pwd"),delCookie$$module$webapp$kinggrid$signature_all("ck")}; function Queue$$module$webapp$kinggrid$signature_all(a){var b=[];this.push=function(c){if(null==c)return!1;null==a||isNaN(a)||b.length==a&&this.pop();b.unshift(c);return!0};this.pop=function(){return b.pop()};this.size=function(){return b.length};this.quere=function(){return b}} var SignaturePad$$module$webapp$kinggrid$signature_all=function(a){var b=function(a,b){var c=this;b=b||{};this.velocityFilterWeight=b.velocityFilterWeight||.7;this.minWidth=b.minWidth||.5;this.maxWidth=b.maxWidth||2.5;this.dotSize=b.dotSize||function(){return(this.minWidth+this.maxWidth)/2};this.penColor=b.penColor||"black";this.backgroundColor=b.backgroundColor||"rgba(0,0,0,0)";this.onEnd=b.onEnd;this.onBegin=b.onBegin;this._canvas=a;this._ctx=a.getContext("2d");this._ctx.lineJoin="round";this._ctx.lineCap= "round";this.count=0;this.clear();this.ptQueue=new Queue$$module$webapp$kinggrid$signature_all(6);this.testTimer=function(){};this.funcCompleteListener=function(){for(var a=c.maxWidth;0a&&(a=.2);d=this.curPos.x-this.oldPos.x;var e=this.curPos.y-this.oldPos.y;var l=c-this.LstSize;var m=a-this.LstTrans;if(Math.abs(d)>=Math.abs(e)&&0=Math.abs(d)&&0=b;b++){var c=b/10;var d=this._point(c,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x);c=this._point(c,this.startPoint.y,this.control1.y, this.control2.y,this.endPoint.y);if(0