invoice-sample 1.0.74 → 1.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.InvoiceSample=n():t.InvoiceSample=n()}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=157)}([function(t,n,e){var r=e(37)("wks"),i=e(31),o=e(2).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,n,e){"use strict";var r=e(41),i={};i[e(0)("toStringTag")]="z",i+""!="[object z]"&&e(14)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n,e){var r=e(2),i=e(25),o=e(16),a=e(14),u=e(26),s=function(t,n,e){var c,l,f,p,h=t&s.F,d=t&s.G,m=t&s.S,g=t&s.P,v=t&s.B,x=d?r:m?r[n]||(r[n]={}):(r[n]||{}).prototype,y=d?i:i[n]||(i[n]={}),S=y.prototype||(y.prototype={});for(c in d&&(e=n),e)f=((l=!h&&x&&void 0!==x[c])?x:e)[c],p=v&&l?u(f,r):g&&"function"==typeof f?u(Function.call,f):f,x&&a(x,c,f,t&s.U),y[c]!=f&&o(y,c,p),g&&S[c]!=f&&(S[c]=f)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,n,e){var r=e(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){t.exports=!e(5)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){"use strict";var r=e(43),i=e(109),o=e(34),a=e(27);t.exports=e(74)(Array,"Array",(function(t,n){this._t=a(t),this._i=0,this._k=n}),(function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,i(1)):i(0,"keys"==n?e:"values"==n?t[e]:[e,t[e]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,n,e){"use strict";var r,i,o,a,u=e(32),s=e(2),c=e(26),l=e(41),f=e(3),p=e(6),h=e(38),d=e(89),m=e(90),g=e(68),v=e(69).set,x=e(95)(),y=e(70),S=e(96),b=e(97),w=e(98),A=s.TypeError,T=s.process,E=T&&T.versions,P=E&&E.v8||"",C=s.Promise,N="process"==l(T),R=function(){},I=i=y.f,Y=!!function(){try{var t=C.resolve(1),n=(t.constructor={})[e(0)("species")]=function(t){t(R,R)};return(N||"function"==typeof PromiseRejectionEvent)&&t.then(R)instanceof n&&0!==P.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(t){}}(),_=function(t){var n;return!(!p(t)||"function"!=typeof(n=t.then))&&n},O=function(t,n){if(!t._n){t._n=!0;var e=t._c;x((function(){for(var r=t._v,i=1==t._s,o=0,a=function(n){var e,o,a,u=i?n.ok:n.fail,s=n.resolve,c=n.reject,l=n.domain;try{u?(i||(2==t._h&&M(t),t._h=1),!0===u?e=r:(l&&l.enter(),e=u(r),l&&(l.exit(),a=!0)),e===n.promise?c(A("Promise-chain cycle")):(o=_(e))?o.call(e,s,c):s(e)):c(r)}catch(t){l&&!a&&l.exit(),c(t)}};e.length>o;)a(e[o++]);t._c=[],t._n=!1,n&&!t._h&&B(t)}))}},B=function(t){v.call(s,(function(){var n,e,r,i=t._v,o=L(t);if(o&&(n=S((function(){N?T.emit("unhandledRejection",i,t):(e=s.onunhandledrejection)?e({promise:t,reason:i}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=N||L(t)?2:1),t._a=void 0,o&&n.e)throw n.v}))},L=function(t){return 1!==t._h&&0===(t._a||t._c).length},M=function(t){v.call(s,(function(){var n;N?T.emit("rejectionHandled",t):(n=s.onrejectionhandled)&&n({promise:t,reason:t._v})}))},X=function(t){var n=this;n._d||(n._d=!0,(n=n._w||n)._v=t,n._s=2,n._a||(n._a=n._c.slice()),O(n,!0))},D=function(t){var n,e=this;if(!e._d){e._d=!0,e=e._w||e;try{if(e===t)throw A("Promise can't be resolved itself");(n=_(t))?x((function(){var r={_w:e,_d:!1};try{n.call(t,c(D,r,1),c(X,r,1))}catch(t){X.call(r,t)}})):(e._v=t,e._s=1,O(e,!1))}catch(t){X.call({_w:e,_d:!1},t)}}};Y||(C=function(t){d(this,C,"Promise","_h"),h(t),r.call(this);try{t(c(D,this,1),c(X,this,1))}catch(t){X.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=e(99)(C.prototype,{then:function(t,n){var e=I(g(this,C));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=N?T.domain:void 0,this._c.push(e),this._a&&this._a.push(e),this._s&&O(this,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=c(D,t,1),this.reject=c(X,t,1)},y.f=I=function(t){return t===C||t===a?new o(t):i(t)}),f(f.G+f.W+f.F*!Y,{Promise:C}),e(42)(C,"Promise"),e(100)("Promise"),a=e(25).Promise,f(f.S+f.F*!Y,"Promise",{reject:function(t){var n=I(this);return(0,n.reject)(t),n.promise}}),f(f.S+f.F*(u||!Y),"Promise",{resolve:function(t){return w(u&&this===a?C:this,t)}}),f(f.S+f.F*!(Y&&e(101)((function(t){C.all(t).catch(R)}))),"Promise",{all:function(t){var n=this,e=I(n),r=e.resolve,i=e.reject,o=S((function(){var e=[],o=0,a=1;m(t,!1,(function(t){var u=o++,s=!1;e.push(void 0),a++,n.resolve(t).then((function(t){s||(s=!0,e[u]=t,--a||r(e))}),i)})),--a||r(e)}));return o.e&&i(o.v),e.promise},race:function(t){var n=this,e=I(n),r=e.reject,i=S((function(){m(t,!1,(function(t){n.resolve(t).then(e.resolve,r)}))}));return i.e&&r(i.v),e.promise}})},function(t,n,e){"use strict";var r=e(2),i=e(17),o=e(7),a=e(3),u=e(14),s=e(102).KEY,c=e(5),l=e(37),f=e(42),p=e(31),h=e(0),d=e(71),m=e(103),g=e(104),v=e(72),x=e(4),y=e(6),S=e(28),b=e(27),w=e(35),A=e(36),T=e(53),E=e(106),P=e(55),C=e(51),N=e(13),R=e(33),I=P.f,Y=N.f,_=E.f,O=r.Symbol,B=r.JSON,L=B&&B.stringify,M=h("_hidden"),X=h("toPrimitive"),D={}.propertyIsEnumerable,k=l("symbol-registry"),F=l("symbols"),W=l("op-symbols"),j=Object.prototype,U="function"==typeof O&&!!C.f,K=r.QObject,z=!K||!K.prototype||!K.prototype.findChild,Q=o&&c((function(){return 7!=T(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(t,n,e){var r=I(j,n);r&&delete j[n],Y(t,n,e),r&&t!==j&&Y(j,n,r)}:Y,H=function(t){var n=F[t]=T(O.prototype);return n._k=t,n},J=U&&"symbol"==typeof O.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof O},G=function(t,n,e){return t===j&&G(W,n,e),x(t),n=w(n,!0),x(e),i(F,n)?(e.enumerable?(i(t,M)&&t[M][n]&&(t[M][n]=!1),e=T(e,{enumerable:A(0,!1)})):(i(t,M)||Y(t,M,A(1,{})),t[M][n]=!0),Q(t,n,e)):Y(t,n,e)},V=function(t,n){x(t);for(var e,r=g(n=b(n)),i=0,o=r.length;o>i;)G(t,e=r[i++],n[e]);return t},q=function(t){var n=D.call(this,t=w(t,!0));return!(this===j&&i(F,t)&&!i(W,t))&&(!(n||!i(this,t)||!i(F,t)||i(this,M)&&this[M][t])||n)},Z=function(t,n){if(t=b(t),n=w(n,!0),t!==j||!i(F,n)||i(W,n)){var e=I(t,n);return!e||!i(F,n)||i(t,M)&&t[M][n]||(e.enumerable=!0),e}},$=function(t){for(var n,e=_(b(t)),r=[],o=0;e.length>o;)i(F,n=e[o++])||n==M||n==s||r.push(n);return r},tt=function(t){for(var n,e=t===j,r=_(e?W:b(t)),o=[],a=0;r.length>a;)!i(F,n=r[a++])||e&&!i(j,n)||o.push(F[n]);return o};U||(u((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),n=function(e){this===j&&n.call(W,e),i(this,M)&&i(this[M],t)&&(this[M][t]=!1),Q(this,t,A(1,e))};return o&&z&&Q(j,t,{configurable:!0,set:n}),H(t)}).prototype,"toString",(function(){return this._k})),P.f=Z,N.f=G,e(54).f=E.f=$,e(40).f=q,C.f=tt,o&&!e(32)&&u(j,"propertyIsEnumerable",q,!0),d.f=function(t){return H(h(t))}),a(a.G+a.W+a.F*!U,{Symbol:O});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;nt.length>et;)h(nt[et++]);for(var rt=R(h.store),it=0;rt.length>it;)m(rt[it++]);a(a.S+a.F*!U,"Symbol",{for:function(t){return i(k,t+="")?k[t]:k[t]=O(t)},keyFor:function(t){if(!J(t))throw TypeError(t+" is not a symbol!");for(var n in k)if(k[n]===t)return n},useSetter:function(){z=!0},useSimple:function(){z=!1}}),a(a.S+a.F*!U,"Object",{create:function(t,n){return void 0===n?T(t):V(T(t),n)},defineProperty:G,defineProperties:V,getOwnPropertyDescriptor:Z,getOwnPropertyNames:$,getOwnPropertySymbols:tt});var ot=c((function(){C.f(1)}));a(a.S+a.F*ot,"Object",{getOwnPropertySymbols:function(t){return C.f(S(t))}}),B&&a(a.S+a.F*(!U||c((function(){var t=O();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))}))),"JSON",{stringify:function(t){for(var n,e,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(e=n=r[1],(y(n)||void 0!==t)&&!J(t))return v(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!J(n))return n}),r[1]=n,L.apply(B,r)}}),O.prototype[X]||e(16)(O.prototype,X,O.prototype.valueOf),f(O,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,n,e){"use strict";var r=e(73)(!0);e(74)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})}))},function(t,n,e){for(var r=e(8),i=e(33),o=e(14),a=e(2),u=e(16),s=e(34),c=e(0),l=c("iterator"),f=c("toStringTag"),p=s.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=i(h),m=0;m<d.length;m++){var g,v=d[m],x=h[v],y=a[v],S=y&&y.prototype;if(S&&(S[l]||u(S,l,p),S[f]||u(S,f,v),s[v]=p,x))for(g in r)S[g]||o(S,g,r[g],!0)}},function(t,n,e){var r=e(4),i=e(65),o=e(35),a=Object.defineProperty;n.f=e(7)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return a(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(2),i=e(16),o=e(17),a=e(31)("src"),u=e(87),s=(""+u).split("toString");e(25).inspectSource=function(t){return u.call(t)},(t.exports=function(t,n,e,u){var c="function"==typeof e;c&&(o(e,"name")||i(e,"name",n)),t[n]!==e&&(c&&(o(e,a)||i(e,a,t[n]?""+t[n]:s.join(String(n)))),t===r?t[n]=e:u?t[n]?t[n]=e:i(t,n,e):(delete t[n],i(t,n,e)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||u.call(this)}))},function(t,n,e){"use strict";var r=e(4),i=e(28),o=e(19),a=e(39),u=e(56),s=e(57),c=Math.max,l=Math.min,f=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;e(58)("replace",2,(function(t,n,e,d){return[function(r,i){var o=t(this),a=null==r?void 0:r[n];return void 0!==a?a.call(r,o,i):e.call(String(o),r,i)},function(t,n){var i=d(e,t,this,n);if(i.done)return i.value;var f=r(t),p=String(this),h="function"==typeof n;h||(n=String(n));var g=f.global;if(g){var v=f.unicode;f.lastIndex=0}for(var x=[];;){var y=s(f,p);if(null===y)break;if(x.push(y),!g)break;""===String(y[0])&&(f.lastIndex=u(p,o(f.lastIndex),v))}for(var S,b="",w=0,A=0;A<x.length;A++){y=x[A];for(var T=String(y[0]),E=c(l(a(y.index),p.length),0),P=[],C=1;C<y.length;C++)P.push(void 0===(S=y[C])?S:String(S));var N=y.groups;if(h){var R=[T].concat(P,E,p);void 0!==N&&R.push(N);var I=String(n.apply(void 0,R))}else I=m(T,p,E,P,N,n);E>=w&&(b+=p.slice(w,E)+I,w=E+T.length)}return b+p.slice(w)}];function m(t,n,r,o,a,u){var s=r+t.length,c=o.length,l=h;return void 0!==a&&(a=i(a),l=p),e.call(u,l,(function(e,i){var u;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(s);case"<":u=a[i.slice(1,-1)];break;default:var l=+i;if(0===l)return e;if(l>c){var p=f(l/10);return 0===p?e:p<=c?void 0===o[p-1]?i.charAt(1):o[p-1]+i.charAt(1):e}u=o[l-1]}return void 0===u?"":u}))}}))},function(t,n,e){var r=e(13),i=e(36);t.exports=e(7)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r=e(39),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n,e){"use strict";var r=e(2),i=e(17),o=e(18),a=e(111),u=e(35),s=e(5),c=e(54).f,l=e(55).f,f=e(13).f,p=e(113).trim,h=r.Number,d=h,m=h.prototype,g="Number"==o(e(53)(m)),v="trim"in String.prototype,x=function(t){var n=u(t,!1);if("string"==typeof n&&n.length>2){var e,r,i,o=(n=v?n.trim():p(n,3)).charCodeAt(0);if(43===o||45===o){if(88===(e=n.charCodeAt(2))||120===e)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+n}for(var a,s=n.slice(2),c=0,l=s.length;c<l;c++)if((a=s.charCodeAt(c))<48||a>i)return NaN;return parseInt(s,r)}}return+n};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof h&&(g?s((function(){m.valueOf.call(e)})):"Number"!=o(e))?a(new d(x(n)),e,h):x(n)};for(var y,S=e(7)?c(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),b=0;S.length>b;b++)i(d,y=S[b])&&!i(h,y)&&f(h,y,l(d,y));h.prototype=m,m.constructor=h,e(14)(r,"Number",h)}},function(t,n,e){"use strict";e(115);var r=e(4),i=e(60),o=e(7),a=/./.toString,u=function(t){e(14)(RegExp.prototype,"toString",t,!0)};e(5)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?u((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=a.name&&u((function(){return a.call(this)}))},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n){var e,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];n.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},n.getSymbolTotalCodewords=function(t){return r[t]},n.getBCHDigit=function(t){for(var n=0;0!==t;)n++,t>>>=1;return n},n.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},n.isKanjiModeEnabled=function(){return void 0!==e},n.toSJIS=function(t){return e(t)}},function(t,n,e){var r=e(82),i=e(83);n.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},n.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},n.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},n.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},n.MIXED={bit:-1},n.getCharCountIndicator=function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},n.getBestModeForData=function(t){return i.testNumeric(t)?n.NUMERIC:i.testAlphanumeric(t)?n.ALPHANUMERIC:i.testKanji(t)?n.KANJI:n.BYTE},n.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},n.isValid=function(t){return t&&t.bit&&t.ccBits},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return n.NUMERIC;case"alphanumeric":return n.ALPHANUMERIC;case"kanji":return n.KANJI;case"byte":return n.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return e}}},function(t,n){var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},function(t,n,e){var r=e(38);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n,e){var r=e(47),i=e(22);t.exports=function(t){return r(i(t))}},function(t,n,e){var r=e(22);t.exports=function(t){return Object(r(t))}},function(t,n,e){"use strict";var r=e(62);o.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}();var i=o.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function o(t,n,e){return o.TYPED_ARRAY_SUPPORT||this instanceof o?"number"==typeof t?s(this,t):function(t,n,e,r){if("number"==typeof n)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer)return function(t,n,e,r){if(e<0||n.byteLength<e)throw new RangeError("'offset' is out of bounds");if(n.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");var i;i=void 0===e&&void 0===r?new Uint8Array(n):void 0===r?new Uint8Array(n,e):new Uint8Array(n,e,r);o.TYPED_ARRAY_SUPPORT?i.__proto__=o.prototype:i=c(t,i);return i}(t,n,e,r);if("string"==typeof n)return function(t,n){var e=0|f(n),r=u(t,e),i=r.write(n);i!==e&&(r=r.slice(0,i));return r}(t,n);return function(t,n){if(o.isBuffer(n)){var e=0|a(n.length),r=u(t,e);return 0===r.length||n.copy(r,0,0,e),r}if(n){if("undefined"!=typeof ArrayBuffer&&n.buffer instanceof ArrayBuffer||"length"in n)return"number"!=typeof n.length||(i=n.length)!=i?u(t,0):c(t,n);if("Buffer"===n.type&&Array.isArray(n.data))return c(t,n.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,n)}(this,t,n,e):new o(t,n,e)}function a(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function u(t,n){var e;return o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(n)).__proto__=o.prototype:(null===(e=t)&&(e=new o(n)),e.length=n),e}function s(t,n){var e=u(t,n<0?0:0|a(n));if(!o.TYPED_ARRAY_SUPPORT)for(var r=0;r<n;++r)e[r]=0;return e}function c(t,n){for(var e=n.length<0?0:0|a(n.length),r=u(t,e),i=0;i<e;i+=1)r[i]=255&n[i];return r}function l(t,n){var e;n=n||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((e=t.charCodeAt(a))>55295&&e<57344){if(!i){if(e>56319){(n-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(n-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(n-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(n-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((n-=1)<0)break;o.push(e)}else if(e<2048){if((n-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((n-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function f(t){return o.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:l(t).length)}o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),o.prototype.write=function(t,n,e){void 0===n||void 0===e&&"string"==typeof n?(e=this.length,n=0):isFinite(n)&&(n|=0,isFinite(e)?e|=0:e=void 0);var r=this.length-n;if((void 0===e||e>r)&&(e=r),t.length>0&&(e<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,n,e,r){return function(t,n,e,r){for(var i=0;i<r&&!(i+e>=n.length||i>=t.length);++i)n[i+e]=t[i];return i}(l(n,t.length-e),t,e,r)}(this,t,n,e)},o.prototype.slice=function(t,n){var e,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n<t&&(n=t),o.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,n)).__proto__=o.prototype;else{var i=n-t;e=new o(i,void 0);for(var a=0;a<i;++a)e[a]=this[a+t]}return e},o.prototype.copy=function(t,n,e,r){if(e||(e=0),r||0===r||(r=this.length),n>=t.length&&(n=t.length),n||(n=0),r>0&&r<e&&(r=e),r===e)return 0;if(0===t.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-n<r-e&&(r=t.length-n+e);var i,a=r-e;if(this===t&&e<n&&n<r)for(i=a-1;i>=0;--i)t[i+n]=this[i+e];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+n]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+a),n);return a},o.prototype.fill=function(t,n,e){if("string"==typeof t){if("string"==typeof n?(n=0,e=this.length):"string"==typeof e&&(e=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}}else"number"==typeof t&&(t&=255);if(n<0||this.length<n||this.length<e)throw new RangeError("Out of range index");if(e<=n)return this;var i;if(n>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=n;i<e;++i)this[i]=t;else{var a=o.isBuffer(t)?t:new o(t),u=a.length;for(i=0;i<e-n;++i)this[i+n]=a[i%u]}return this},o.concat=function(t,n){if(!r(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u(null,0);var e;if(void 0===n)for(n=0,e=0;e<t.length;++e)n+=t[e].length;var i=s(null,n),a=0;for(e=0;e<t.length;++e){var c=t[e];if(!o.isBuffer(c))throw new TypeError('"list" argument must be an Array of Buffers');c.copy(i,a),a+=c.length}return i},o.byteLength=f,o.prototype._isBuffer=!0,o.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.exports.alloc=function(t){var n=new o(t);return n.fill(0),n},t.exports.from=function(t){return new o(t)}},function(t,n,e){var r=e(128),i=e(129),o=e(151),a=e(152);function u(t,n,e,o,a){var u=[].slice.call(arguments,1),s=u.length,c="function"==typeof u[s-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(s<1)throw new Error("Too few arguments provided");return 1===s?(e=n,n=o=void 0):2!==s||n.getContext||(o=e,e=n,n=void 0),new Promise((function(r,a){try{var u=i.create(e,o);r(t(u,n,o))}catch(t){a(t)}}))}if(s<2)throw new Error("Too few arguments provided");2===s?(a=e,e=n,n=o=void 0):3===s&&(n.getContext&&void 0===a?(a=o,o=void 0):(a=o,o=e,e=n,n=void 0));try{var l=i.create(e,o);a(null,t(l,n,o))}catch(t){a(t)}}n.create=i.create,n.toCanvas=u.bind(null,o.render),n.toDataURL=u.bind(null,o.renderToDataURL),n.toString=u.bind(null,(function(t,n,e){return a.render(t,e)}))},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n){t.exports=!1},function(t,n,e){var r=e(66),i=e(50);t.exports=Object.keys||function(t){return r(t,i)}},function(t,n){t.exports={}},function(t,n,e){var r=e(6);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(25),i=e(2),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e(32)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(18),i=e(0)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var n,e,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),i))?e:o?r(n):"Object"==(a=r(n))&&"function"==typeof n.callee?"Arguments":a}},function(t,n,e){var r=e(13).f,i=e(17),o=e(0)("toStringTag");t.exports=function(t,n,e){t&&!i(t=e?t:t.prototype,o)&&r(t,o,{configurable:!0,value:n})}},function(t,n,e){var r=e(0)("unscopables"),i=Array.prototype;null==i[r]&&e(16)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,n,e){"use strict";var r=e(3),i=e(67)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(43)("includes")},function(t,n,e){"use strict";var r=e(76),i=e(4),o=e(68),a=e(56),u=e(19),s=e(57),c=e(59),l=e(5),f=Math.min,p=[].push,h="length",d=!l((function(){RegExp(4294967295,"y")}));e(58)("split",2,(function(t,n,e,l){var m;return m="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[h]||2!="ab".split(/(?:ab)*/)[h]||4!=".".split(/(.?)(.?)/)[h]||".".split(/()()/)[h]>1||"".split(/.?/)[h]?function(t,n){var i=String(this);if(void 0===t&&0===n)return[];if(!r(t))return e.call(i,t,n);for(var o,a,u,s=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,d=void 0===n?4294967295:n>>>0,m=new RegExp(t.source,l+"g");(o=c.call(m,i))&&!((a=m.lastIndex)>f&&(s.push(i.slice(f,o.index)),o[h]>1&&o.index<i[h]&&p.apply(s,o.slice(1)),u=o[0][h],f=a,s[h]>=d));)m.lastIndex===o.index&&m.lastIndex++;return f===i[h]?!u&&m.test("")||s.push(""):s.push(i.slice(f)),s[h]>d?s.slice(0,d):s}:"0".split(void 0,0)[h]?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,r){var i=t(this),o=null==e?void 0:e[n];return void 0!==o?o.call(e,i,r):m.call(String(i),e,r)},function(t,n){var r=l(m,t,this,n,m!==e);if(r.done)return r.value;var c=i(t),p=String(this),h=o(c,RegExp),g=c.unicode,v=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(d?"y":"g"),x=new h(d?c:"^(?:"+c.source+")",v),y=void 0===n?4294967295:n>>>0;if(0===y)return[];if(0===p.length)return null===s(x,p)?[p]:[];for(var S=0,b=0,w=[];b<p.length;){x.lastIndex=d?b:0;var A,T=s(x,d?p:p.slice(b));if(null===T||(A=f(u(x.lastIndex+(d?0:b)),p.length))===S)b=a(p,b,g);else{if(w.push(p.slice(S,b)),w.length===y)return w;for(var E=1;E<=T.length-1;E++)if(w.push(T[E]),w.length===y)return w;b=S=A}}return w.push(p.slice(S)),w}]}))},function(t,n,e){var r=e(6),i=e(2).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){var r=e(18);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n,e){var r=e(39),i=Math.max,o=Math.min;t.exports=function(t,n){return(t=r(t))<0?i(t+n,0):o(t,n)}},function(t,n,e){var r=e(37)("keys"),i=e(31);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(2).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(4),i=e(105),o=e(50),a=e(49)("IE_PROTO"),u=function(){},s=function(){var t,n=e(46)("iframe"),r=o.length;for(n.style.display="none",e(52).appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s.prototype[o[r]];return s()};t.exports=Object.create||function(t,n){var e;return null!==t?(u.prototype=r(t),e=new u,u.prototype=null,e[a]=t):e=s(),void 0===n?e:i(e,n)}},function(t,n,e){var r=e(66),i=e(50).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,n,e){var r=e(40),i=e(36),o=e(27),a=e(35),u=e(17),s=e(65),c=Object.getOwnPropertyDescriptor;n.f=e(7)?c:function(t,n){if(t=o(t),n=a(n,!0),s)try{return c(t,n)}catch(t){}if(u(t,n))return i(!r.f.call(t,n),t[n])}},function(t,n,e){"use strict";var r=e(73)(!0);t.exports=function(t,n,e){return n+(e?r(t,n).length:1)}},function(t,n,e){"use strict";var r=e(41),i=RegExp.prototype.exec;t.exports=function(t,n){var e=t.exec;if("function"==typeof e){var o=e.call(t,n);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,n)}},function(t,n,e){"use strict";e(110);var r=e(14),i=e(16),o=e(5),a=e(22),u=e(0),s=e(59),c=u("species"),l=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),f=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e="ab".split(t);return 2===e.length&&"a"===e[0]&&"b"===e[1]}();t.exports=function(t,n,e){var p=u(t),h=!o((function(){var n={};return n[p]=function(){return 7},7!=""[t](n)})),d=h?!o((function(){var n=!1,e=/a/;return e.exec=function(){return n=!0,null},"split"===t&&(e.constructor={},e.constructor[c]=function(){return e}),e[p](""),!n})):void 0;if(!h||!d||"replace"===t&&!l||"split"===t&&!f){var m=/./[p],g=e(a,p,""[t],(function(t,n,e,r,i){return n.exec===s?h&&!i?{done:!0,value:m.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}})),v=g[0],x=g[1];r(String.prototype,t,v),i(RegExp.prototype,p,2==n?function(t,n){return x.call(t,this,n)}:function(t){return x.call(t,this)})}}},function(t,n,e){"use strict";var r,i,o=e(60),a=RegExp.prototype.exec,u=String.prototype.replace,s=a,c=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),l=void 0!==/()??/.exec("")[1];(c||l)&&(s=function(t){var n,e,r,i,s=this;return l&&(e=new RegExp("^"+s.source+"$(?!\\s)",o.call(s))),c&&(n=s.lastIndex),r=a.call(s,t),c&&r&&(s.lastIndex=s.global?r.index+r[0].length:n),l&&r&&r.length>1&&u.call(r[0],e,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=s},function(t,n,e){"use strict";var r=e(4);t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,e){"use strict";var r=e(3),i=e(119);r(r.P+r.F*e(120)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,n){n.L={bit:1},n.M={bit:0},n.Q={bit:3},n.H={bit:2},n.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return n.L;case"m":case"medium":return n.M;case"q":case"quartile":return n.Q;case"h":case"high":return n.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return e}}},function(t,n,e){var r=e(3);r(r.S+r.F,"Object",{assign:e(88)})},function(t,n,e){t.exports=!e(7)&&!e(5)((function(){return 7!=Object.defineProperty(e(46)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(17),i=e(27),o=e(67)(!1),a=e(49)("IE_PROTO");t.exports=function(t,n){var e,u=i(t),s=0,c=[];for(e in u)e!=a&&r(u,e)&&c.push(e);for(;n.length>s;)r(u,e=n[s++])&&(~o(c,e)||c.push(e));return c}},function(t,n,e){var r=e(27),i=e(19),o=e(48);t.exports=function(t){return function(n,e,a){var u,s=r(n),c=i(s.length),l=o(a,c);if(t&&e!=e){for(;c>l;)if((u=s[l++])!=u)return!0}else for(;c>l;l++)if((t||l in s)&&s[l]===e)return t||l||0;return!t&&-1}}},function(t,n,e){var r=e(4),i=e(38),o=e(0)("species");t.exports=function(t,n){var e,a=r(t).constructor;return void 0===a||null==(e=r(a)[o])?n:i(e)}},function(t,n,e){var r,i,o,a=e(26),u=e(94),s=e(52),c=e(46),l=e(2),f=l.process,p=l.setImmediate,h=l.clearImmediate,d=l.MessageChannel,m=l.Dispatch,g=0,v={},x=function(){var t=+this;if(v.hasOwnProperty(t)){var n=v[t];delete v[t],n()}},y=function(t){x.call(t.data)};p&&h||(p=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return v[++g]=function(){u("function"==typeof t?t:Function(t),n)},r(g),g},h=function(t){delete v[t]},"process"==e(18)(f)?r=function(t){f.nextTick(a(x,t,1))}:m&&m.now?r=function(t){m.now(a(x,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=y,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",y,!1)):r="onreadystatechange"in c("script")?function(t){s.appendChild(c("script")).onreadystatechange=function(){s.removeChild(this),x.call(t)}}:function(t){setTimeout(a(x,t,1),0)}),t.exports={set:p,clear:h}},function(t,n,e){"use strict";var r=e(38);function i(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=r(n),this.reject=r(e)}t.exports.f=function(t){return new i(t)}},function(t,n,e){n.f=e(0)},function(t,n,e){var r=e(18);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){var r=e(39),i=e(22);t.exports=function(t){return function(n,e){var o,a,u=String(i(n)),s=r(e),c=u.length;return s<0||s>=c?t?"":void 0:(o=u.charCodeAt(s))<55296||o>56319||s+1===c||(a=u.charCodeAt(s+1))<56320||a>57343?t?u.charAt(s):o:t?u.slice(s,s+2):a-56320+(o-55296<<10)+65536}}},function(t,n,e){"use strict";var r=e(32),i=e(3),o=e(14),a=e(16),u=e(34),s=e(107),c=e(42),l=e(108),f=e(0)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,n,e,d,m,g,v){s(e,n,d);var x,y,S,b=function(t){if(!p&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},w=n+" Iterator",A="values"==m,T=!1,E=t.prototype,P=E[f]||E["@@iterator"]||m&&E[m],C=P||b(m),N=m?A?b("entries"):C:void 0,R="Array"==n&&E.entries||P;if(R&&(S=l(R.call(new t)))!==Object.prototype&&S.next&&(c(S,w,!0),r||"function"==typeof S[f]||a(S,f,h)),A&&P&&"values"!==P.name&&(T=!0,C=function(){return P.call(this)}),r&&!v||!p&&!T&&E[f]||a(E,f,C),u[n]=C,u[w]=h,m)if(x={values:A?C:b("values"),keys:g?C:b("keys"),entries:N},v)for(y in x)y in E||o(E,y,x[y]);else i(i.P+i.F*(p||T),n,x);return x}},function(t,n,e){"use strict";var r=e(4),i=e(19),o=e(56),a=e(57);e(58)("match",1,(function(t,n,e,u){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=u(e,t,this);if(n.done)return n.value;var s=r(t),c=String(this);if(!s.global)return a(s,c);var l=s.unicode;s.lastIndex=0;for(var f,p=[],h=0;null!==(f=a(s,c));){var d=String(f[0]);p[h]=d,""===d&&(s.lastIndex=o(c,i(s.lastIndex),l)),h++}return 0===h?null:p}]}))},function(t,n,e){var r=e(6),i=e(18),o=e(0)("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[o])?!!n:"RegExp"==i(t))}},function(t,n,e){"use strict";var r=e(3),i=e(52),o=e(18),a=e(48),u=e(19),s=[].slice;r(r.P+r.F*e(5)((function(){i&&s.call(i)})),"Array",{slice:function(t,n){var e=u(this.length),r=o(this);if(n=void 0===n?e:n,"Array"==r)return s.call(this,t,n);for(var i=a(t,e),c=a(n,e),l=u(c-i),f=new Array(l),p=0;p<l;p++)f[p]="String"==r?this.charAt(i+p):this[i+p];return f}})},function(t,n,e){var r=e(26),i=e(47),o=e(28),a=e(19),u=e(122);t.exports=function(t,n){var e=1==t,s=2==t,c=3==t,l=4==t,f=6==t,p=5==t||f,h=n||u;return function(n,u,d){for(var m,g,v=o(n),x=i(v),y=r(u,d,3),S=a(x.length),b=0,w=e?h(n,S):s?h(n,0):void 0;S>b;b++)if((p||b in x)&&(g=y(m=x[b],b,v),t))if(e)w[b]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return b;case 2:w.push(m)}else if(l)return!1;return f?-1:c||l?l:w}}},function(t,n,e){"use strict";var r=/^([+-])?0*(\d+)(\.(\d+))?$/,i=/^([+-])?0*(\d+)(\.(\d+))?e(([+-])?(\d+))$/i,o=n.e2ten=function(t){var n=i.exec(t.toString());if(!n)return t;var e=n[2],r=n[4]||"",o=n[5]?+n[5]:0;if(o>0){var a=r.substr(0,o);a=a.length<o?a+new Array(o-a.length+1).join("0"):a,r=r.substr(o),e+=a}else{o=-o;var u=e.length-o;u=u<0?0:u;var s=e.substr(u,o);s=s.length<o?new Array(o-s.length+1).join("0")+s:s,e=e.substring(0,u),r=s+r}return e=""==e?"0":e,("-"==n[1]?"-":"")+e+(r?"."+r:"")};n.getNumbResult=function(t){var n=r.exec(t.toString());if(!n&&i.test(t.toString())&&(n=r.exec(o(t.toString()))),n)return{int:n[2],decimal:n[4],minus:"-"==n[1],num:n.slice(1,3).join("")}},n.centerArray=function t(n,e){if(n.splice.apply(n,[0,e.length].concat(e.splice(0,e.length))),arguments.length>2){var r=[].slice.call(arguments,2);r.unshift(n),t.apply(null,r)}return n};var a=n.hasAttr=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)};n.extend=function(t){for(var n,e=arguments[0]||{},r=Array.prototype.slice.call(arguments,1),i=0;i<r.length;i++){var o=r[i];for(n in o)a(o,n)&&(e[n]=o[n])}return e},n.getDigit=function(t){return t>=5?4*(t-4)+4:t},n.unshiftZero=function(t,n){if(null==n&&(n=1),!(n<=0))for(;n--;)t.unshift(0)},n.clearZero=function(t,n,e){if(null==t)return"";var r=~"*.?+$^[](){}|\\/".indexOf(n)?"\\"+n:n,i=new RegExp("^"+r+"+"),o=new RegExp(r+"+$"),a=new RegExp(r+"{2}","g");return t=t.toString(),"^"==e&&(t=t.replace(i,"")),e&&"$"!=e||(t=t.replace(o,"")),e&&"nto1"!=e||(t=t.replace(a,n)),t}},function(t,n,e){"use strict";function r(t){var n=-1;i||(i=function(){for(var t=new Int32Array(256),n=0;n<256;n++){for(var e=n,r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}());for(var e=0;e<t.length;e++)n=i[255&(n^t[e])]^n>>>8;return-1^n}Object.defineProperty(n,"__esModule",{value:!0}),n.changeDpiBlob=function(t,n){var e=t.slice(0,33);return new Promise((function(r,i){var o=new FileReader;o.onload=function(){var e=new Uint8Array(o.result),i=t.slice(33),a=f(e,n,t.type);r(new Blob([a,i],{type:t.type}))},o.readAsArrayBuffer(e)}))},n.changeDpiDataUrl=function(t,n){var e=t.split(","),r=e[0],i=e[1],u=void 0,s=void 0,c=!1;if(-1!==r.indexOf(o)){u=o;var l=function(t){var n=t.indexOf("AAlwSFlz");-1===n&&(n=t.indexOf("AAAJcEhZ"));-1===n&&(n=t.indexOf("AAAACXBI"));return n}(i);l>=0?(s=4*Math.ceil((l+28)/3),c=!0):s=44}-1!==r.indexOf(a)&&(u=a,s=24);for(var p=i.substring(0,s),h=i.substring(s),d=atob(p),m=new Uint8Array(d.length),g=0;g<m.length;g++)m[g]=d.charCodeAt(g);var v=f(m,n,u,c),x=btoa(String.fromCharCode.apply(String,function(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return Array.from(t)}(v)));return[r,",",x,h].join("")};var i=void 0,o="image/png",a="image/jpeg",u="p".charCodeAt(0),s="H".charCodeAt(0),c="Y".charCodeAt(0),l="s".charCodeAt(0);function f(t,n,e,i){if(e===a)return t[13]=1,t[14]=n>>8,t[15]=255&n,t[16]=n>>8,t[17]=255&n,t;if(e===o){var f=new Uint8Array(13);n*=39.3701,f[0]=u,f[1]=s,f[2]=c,f[3]=l,f[4]=n>>>24,f[5]=n>>>16,f[6]=n>>>8,f[7]=255&n,f[8]=f[4],f[9]=f[5],f[10]=f[6],f[11]=f[7],f[12]=1;var p=r(f),h=new Uint8Array(4);if(h[0]=p>>>24,h[1]=p>>>16,h[2]=p>>>8,h[3]=255&p,i){var d=function(t){for(var n=t.length-1;n>=4;n--)if(9===t[n-4]&&t[n-3]===u&&t[n-2]===s&&t[n-1]===c&&t[n]===l)return n-3}(t);return t.set(f,d),t.set(h,d+13),t}var m=new Uint8Array(4);m[0]=0,m[1]=0,m[2]=0,m[3]=9;var g=new Uint8Array(54);return g.set(t,0),g.set(m,33),g.set(f,37),g.set(h,50),g}}},function(t,n,e){var r=e(63),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];n.getBlocksCount=function(t,n){switch(n){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}},n.getTotalCodewordsCount=function(t,n){switch(n){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}}},function(t,n){n.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},function(t,n){var e="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",r="(?:(?![A-Z0-9 $%*+\\-./:]|"+(e=e.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";n.KANJI=new RegExp(e,"g"),n.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),n.BYTE=new RegExp(r,"g"),n.NUMERIC=new RegExp("[0-9]+","g"),n.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var i=new RegExp("^"+e+"$"),o=new RegExp("^[0-9]+$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");n.testKanji=function(t){return i.test(t)},n.testNumeric=function(t){return o.test(t)},n.testAlphanumeric=function(t){return a.test(t)}},function(t,n){function e(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");var n=t.slice().replace("#","").split("");if(n.length<3||5===n.length||n.length>8)throw new Error("Invalid hex color: "+t);3!==n.length&&4!==n.length||(n=Array.prototype.concat.apply([],n.map((function(t){return[t,t]})))),6===n.length&&n.push("F","F");var e=parseInt(n.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:255&e,hex:"#"+n.slice(0,6).join("")}}n.getOptions=function(t){t||(t={}),t.color||(t.color={});var n=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},n.getScale=function(t,n){return n.width&&n.width>=t+2*n.margin?n.width/(t+2*n.margin):n.scale},n.getImageWidth=function(t,e){var r=n.getScale(t,e);return Math.floor((t+2*e.margin)*r)},n.qrToImageData=function(t,e,r){for(var i=e.modules.size,o=e.modules.data,a=n.getScale(i,r),u=Math.floor((i+2*r.margin)*a),s=r.margin*a,c=[r.color.light,r.color.dark],l=0;l<u;l++)for(var f=0;f<u;f++){var p=4*(l*u+f),h=r.color.light;if(l>=s&&f>=s&&l<u-s&&f<u-s)h=c[o[Math.floor((l-s)/a)*i+Math.floor((f-s)/a)]?1:0];t[p++]=h.r,t[p++]=h.g,t[p++]=h.b,t[p]=h.a}}},function(t,n,e){"use strict";var r=e(3),i=e(78)(1);r(r.P+r.F*!e(153)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,n,e){var r=e(124),i={s:e(126),b:e(127)};t.exports=r(i.s,i.b)},function(t,n,e){t.exports=e(37)("native-function-to-string",Function.toString)},function(t,n,e){"use strict";var r=e(7),i=e(33),o=e(51),a=e(40),u=e(28),s=e(47),c=Object.assign;t.exports=!c||e(5)((function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach((function(t){n[t]=t})),7!=c({},t)[e]||Object.keys(c({},n)).join("")!=r}))?function(t,n){for(var e=u(t),c=arguments.length,l=1,f=o.f,p=a.f;c>l;)for(var h,d=s(arguments[l++]),m=f?i(d).concat(f(d)):i(d),g=m.length,v=0;g>v;)h=m[v++],r&&!p.call(d,h)||(e[h]=d[h]);return e}:c},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n,e){var r=e(26),i=e(91),o=e(92),a=e(4),u=e(19),s=e(93),c={},l={};(n=t.exports=function(t,n,e,f,p){var h,d,m,g,v=p?function(){return t}:s(t),x=r(e,f,n?2:1),y=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(o(v)){for(h=u(t.length);h>y;y++)if((g=n?x(a(d=t[y])[0],d[1]):x(t[y]))===c||g===l)return g}else for(m=v.call(t);!(d=m.next()).done;)if((g=i(m,x,d.value,n))===c||g===l)return g}).BREAK=c,n.RETURN=l},function(t,n,e){var r=e(4);t.exports=function(t,n,e,i){try{return i?n(r(e)[0],e[1]):n(e)}catch(n){var o=t.return;throw void 0!==o&&r(o.call(t)),n}}},function(t,n,e){var r=e(34),i=e(0)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,n,e){var r=e(41),i=e(0)("iterator"),o=e(34);t.exports=e(25).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,n){t.exports=function(t,n,e){var r=void 0===e;switch(n.length){case 0:return r?t():t.call(e);case 1:return r?t(n[0]):t.call(e,n[0]);case 2:return r?t(n[0],n[1]):t.call(e,n[0],n[1]);case 3:return r?t(n[0],n[1],n[2]):t.call(e,n[0],n[1],n[2]);case 4:return r?t(n[0],n[1],n[2],n[3]):t.call(e,n[0],n[1],n[2],n[3])}return t.apply(e,n)}},function(t,n,e){var r=e(2),i=e(69).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,s="process"==e(18)(a);t.exports=function(){var t,n,e,c=function(){var r,i;for(s&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?e():n=void 0,r}}n=void 0,r&&r.enter()};if(s)e=function(){a.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var l=u.resolve(void 0);e=function(){l.then(c)}}else e=function(){i.call(r,c)};else{var f=!0,p=document.createTextNode("");new o(c).observe(p,{characterData:!0}),e=function(){p.data=f=!f}}return function(r){var i={fn:r,next:void 0};n&&(n.next=i),t||(t=i,e()),n=i}}},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,e){var r=e(2).navigator;t.exports=r&&r.userAgent||""},function(t,n,e){var r=e(4),i=e(6),o=e(70);t.exports=function(t,n){if(r(t),i(n)&&n.constructor===t)return n;var e=o.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){var r=e(14);t.exports=function(t,n,e){for(var i in n)r(t,i,n[i],e);return t}},function(t,n,e){"use strict";var r=e(2),i=e(13),o=e(7),a=e(0)("species");t.exports=function(t){var n=r[t];o&&n&&!n[a]&&i.f(n,a,{configurable:!0,get:function(){return this}})}},function(t,n,e){var r=e(0)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:e=!0}},o[r]=function(){return a},t(o)}catch(t){}return e}},function(t,n,e){var r=e(31)("meta"),i=e(6),o=e(17),a=e(13).f,u=0,s=Object.isExtensible||function(){return!0},c=!e(5)((function(){return s(Object.preventExtensions({}))})),l=function(t){a(t,r,{value:{i:"O"+ ++u,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,n){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!s(t))return"F";if(!n)return"E";l(t)}return t[r].i},getWeak:function(t,n){if(!o(t,r)){if(!s(t))return!0;if(!n)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&f.NEED&&s(t)&&!o(t,r)&&l(t),t}}},function(t,n,e){var r=e(2),i=e(25),o=e(32),a=e(71),u=e(13).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||u(n,t,{value:a.f(t)})}},function(t,n,e){var r=e(33),i=e(51),o=e(40);t.exports=function(t){var n=r(t),e=i.f;if(e)for(var a,u=e(t),s=o.f,c=0;u.length>c;)s.call(t,a=u[c++])&&n.push(a);return n}},function(t,n,e){var r=e(13),i=e(4),o=e(33);t.exports=e(7)?Object.defineProperties:function(t,n){i(t);for(var e,a=o(n),u=a.length,s=0;u>s;)r.f(t,e=a[s++],n[e]);return t}},function(t,n,e){var r=e(27),i=e(54).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,n,e){"use strict";var r=e(53),i=e(36),o=e(42),a={};e(16)(a,e(0)("iterator"),(function(){return this})),t.exports=function(t,n,e){t.prototype=r(a,{next:i(1,e)}),o(t,n+" Iterator")}},function(t,n,e){var r=e(17),i=e(28),o=e(49)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){"use strict";var r=e(59);e(3)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,n,e){var r=e(6),i=e(112).set;t.exports=function(t,n,e){var o,a=n.constructor;return a!==e&&"function"==typeof a&&(o=a.prototype)!==e.prototype&&r(o)&&i&&i(t,o),t}},function(t,n,e){var r=e(6),i=e(4),o=function(t,n){if(i(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=e(26)(Function.call,e(55).f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},function(t,n,e){var r=e(3),i=e(22),o=e(5),a=e(114),u="["+a+"]",s=RegExp("^"+u+u+"*"),c=RegExp(u+u+"*$"),l=function(t,n,e){var i={},u=o((function(){return!!a[t]()||"
"!="
"[t]()})),s=i[t]=u?n(f):a[t];e&&(i[e]=s),r(r.P+r.F*u,"String",i)},f=l.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(s,"")),2&n&&(t=t.replace(c,"")),t};t.exports=l},function(t,n){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,n,e){e(7)&&"g"!=/./g.flags&&e(13).f(RegExp.prototype,"flags",{configurable:!0,get:e(60)})},function(t,n,e){"use strict";e(117)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,n,e){var r=e(3),i=e(5),o=e(22),a=/"/g,u=function(t,n,e,r){var i=String(o(t)),u="<"+n;return""!==e&&(u+=" "+e+'="'+String(r).replace(a,""")+'"'),u+">"+i+"</"+n+">"};t.exports=function(t,n){var e={};e[t]=n(u),r(r.P+r.F*i((function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3})),"String",e)}},function(t,n,e){var r=e(3);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,e){var r=e(76),i=e(22);t.exports=function(t,n,e){if(r(n))throw TypeError("String#"+e+" doesn't accept regex!");return String(i(t))}},function(t,n,e){var r=e(0)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,e){"use strict";var r=e(3),i=e(78)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(43)("find")},function(t,n,e){var r=e(123);t.exports=function(t,n){return new(r(t))(n)}},function(t,n,e){var r=e(6),i=e(72),o=e(0)("species");t.exports=function(t){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&null===(n=n[o])&&(n=void 0)),void 0===n?Array:n}},function(t,n,e){var r=e(125),i=e(79);t.exports=function(t,n){return{encodeS:function(n,e){return e=i.extend({ww:!0,tenMin:!0},e),r.CL.call(t,n,e)},encodeB:function(t,e){return e=i.extend({ww:!0},e),r.CL.call(n,t,e)},decodeS:function(){return r.unCL.apply(t,arguments)},decodeB:function(){return r.unCL.apply(n,arguments)},toMoney:function(t,e){return e=i.extend({ww:!0},e),r.toMoney.call(n,t,e)}}}},function(t,n,e){var r=e(79);function i(t,n){var e=r.getNumbResult(t);if(!e)return t;n=n||{};var i=this.ch,o=this.ch_u,a=this.ch_f||"",u=this.ch_d||".",s=i.charAt(0),c=e.int,l=e.decimal,f="",p="",h=e.minus?a:"";if(l){l=r.clearZero(l,"0","$");for(var d=0;d<l.length;d++)p+=i.charAt(+l.charAt(d));p=p?u+p:""}if(f=function t(e,a,u){e=r.getNumbResult(e).int;var c="",l=arguments.length>1?arguments[1]:n.tenMin,f=e.length;if(1==f)return i.charAt(+e);if(f<=4)for(var p=0,h=f;h--;){var d=+e.charAt(p);c+=l&&2==f&&0==p&&1==d?"":i.charAt(d),c+=d&&h?o.charAt(h):"",p++}else{for(var m=e.length/4>>0,g=e.length%4;0==g||!o.charAt(3+m);)g+=4,m--;var v=e.substr(0,g),x=e.substr(g);c=t(v,l)+o.charAt(3+m)+("0"==x.charAt(0)?s:"")+t(x,x.length>4&&l)}return c=r.clearZero(c,s)}(c),n.ww&&o.length>5){var m=o.charAt(4),g=o.charAt(5),v=f.lastIndexOf(g);~v&&(f=f.substring(0,v).replace(new RegExp(g,"g"),m+m)+f.substring(v))}return h+f+p}t.exports={CL:i,unCL:function(t){for(var n=(t=t.toString()).split(this.ch_d),e=n[0].replace(this.ch_f,""),i=n[1],o=!!~n[0].indexOf(this.ch_f),a=this.ch_u.charAt(1),u=this.ch_u.charAt(4),s=this.ch_u.charAt(5),c=(e=e.replace(new RegExp(u+"{2}","g"),s)).split(""),l=0,f=0,p=[],h=[],d=[],m=0;m<c.length;m++){var g,v=c[m],x=0;if(~(g=this.ch.indexOf(v)))g>0&&d.unshift(g);else if(~(x=this.ch_u.indexOf(v))){var y=r.getDigit(x);l>x?(r.unshiftZero(d,y),r.centerArray(h,d)):x>=f?(0==m&&(d=[1]),r.centerArray(p,h,d),p.length>0&&r.unshiftZero(p,y),f=x):(0==d.length&&a==v&&(d=[1]),r.centerArray(h,d),r.unshiftZero(h,r.getDigit(x)),l=x)}}r.centerArray(p,h,d).reverse(),0==p.length&&p.push(0);var S=0;if(i){p.push("."),S="0.";for(m=0;m<i.length;m++)S+=this.ch.indexOf(i.charAt(m)),p.push(this.ch.indexOf(i.charAt(m)));S=+S}return o&&p.unshift("-"),parseFloat(p.join(""))},toMoney:function(t,n){var e=r.getNumbResult(t),o=this.ch.charAt(0);if(n="object"==typeof n?n:{},!e)return t;n=r.extend({ww:!0,complete:!1,outSymbol:!0},n);var a=e.num,u=e.decimal||"",s=n.outSymbol?this.m_t:"",c=u?"":this.m_z,l="";if(n.complete){for(var f=1;f<this.m_u.length;f++)l+=i.call(this,u.charAt(f-1)||"0")+this.m_u.charAt(f);c=i.call(this,a,n)+this.m_u.charAt(0)}else{if(u=u.substr(0,this.m_u.length-1),u=r.clearZero(u,"0","$")){var p;for(f=0;f<this.m_u.length-1;f++)u.charAt(f)&&"0"!=u.charAt(f)&&(l+=i.call(this,u.charAt(f))+this.m_u.charAt(f+1),p=!1),"0"!==u.charAt(f)||p||(0==f&&"0"==a||(l+=o),p=!0)}"0"==a&&!c&&l||(c=i.call(this,a,n)+this.m_u.charAt(0)+c)}return s+c+l}}},function(t,n){t.exports={ch:"零一二三四五六七八九",ch_u:"个十百千万亿",ch_f:"负",ch_d:"点"}},function(t,n){t.exports={ch:"零壹贰叁肆伍陆柒捌玖",ch_u:"个拾佰仟万亿",ch_f:"负",ch_d:"点",m_t:"人民币",m_z:"整",m_u:"元角分"}},function(t,n){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},function(t,n,e){var r=e(29),i=e(23),o=e(63),a=e(130),u=e(131),s=e(132),c=e(133),l=e(134),f=e(81),p=e(135),h=e(143),d=e(144),m=e(24),g=e(145),v=e(62);function x(t,n,e){var r,i,o=t.size,a=d.getEncodedBits(n,e);for(r=0;r<15;r++)i=1==(a>>r&1),r<6?t.set(r,8,i,!0):r<8?t.set(r+1,8,i,!0):t.set(o-15+r,8,i,!0),r<8?t.set(8,o-r-1,i,!0):r<9?t.set(8,15-r-1+1,i,!0):t.set(8,15-r-1,i,!0);t.set(o-8,8,1,!0)}function y(t,n,e){var o=new a;e.forEach((function(n){o.put(n.mode.bit,4),o.put(n.getLength(),m.getCharCountIndicator(n.mode,t)),n.write(o)}));var u=8*(i.getSymbolTotalCodewords(t)-f.getTotalCodewordsCount(t,n));for(o.getLengthInBits()+4<=u&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);for(var s=(u-o.getLengthInBits())/8,c=0;c<s;c++)o.put(c%2?17:236,8);return function(t,n,e){for(var o=i.getSymbolTotalCodewords(n),a=f.getTotalCodewordsCount(n,e),u=o-a,s=f.getBlocksCount(n,e),c=s-o%s,l=Math.floor(o/s),h=Math.floor(u/s),d=h+1,m=l-h,g=new p(m),v=0,x=new Array(s),y=new Array(s),S=0,b=r.from(t.buffer),w=0;w<s;w++){var A=w<c?h:d;x[w]=b.slice(v,v+A),y[w]=g.encode(x[w]),v+=A,S=Math.max(S,A)}var T,E,P=r.alloc(o),C=0;for(T=0;T<S;T++)for(E=0;E<s;E++)T<x[E].length&&(P[C++]=x[E][T]);for(T=0;T<m;T++)for(E=0;E<s;E++)P[C++]=y[E][T];return P}(o,t,n)}function S(t,n,e,r){var o;if(v(t))o=g.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var a=n;if(!a){var f=g.rawSplit(t);a=h.getBestVersionForData(f,e)}o=g.fromString(t,a||40)}var p=h.getBestVersionForData(o,e);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else n=p;var d=y(n,e,o),m=i.getSymbolSize(n),S=new u(m);return function(t,n){for(var e=t.size,r=c.getPositions(n),i=0;i<r.length;i++)for(var o=r[i][0],a=r[i][1],u=-1;u<=7;u++)if(!(o+u<=-1||e<=o+u))for(var s=-1;s<=7;s++)a+s<=-1||e<=a+s||(u>=0&&u<=6&&(0===s||6===s)||s>=0&&s<=6&&(0===u||6===u)||u>=2&&u<=4&&s>=2&&s<=4?t.set(o+u,a+s,!0,!0):t.set(o+u,a+s,!1,!0))}(S,n),function(t){for(var n=t.size,e=8;e<n-8;e++){var r=e%2==0;t.set(e,6,r,!0),t.set(6,e,r,!0)}}(S),function(t,n){for(var e=s.getPositions(n),r=0;r<e.length;r++)for(var i=e[r][0],o=e[r][1],a=-2;a<=2;a++)for(var u=-2;u<=2;u++)-2===a||2===a||-2===u||2===u||0===a&&0===u?t.set(i+a,o+u,!0,!0):t.set(i+a,o+u,!1,!0)}(S,n),x(S,e,0),n>=7&&function(t,n){for(var e,r,i,o=t.size,a=h.getEncodedBits(n),u=0;u<18;u++)e=Math.floor(u/3),r=u%3+o-8-3,i=1==(a>>u&1),t.set(e,r,i,!0),t.set(r,e,i,!0)}(S,n),function(t,n){for(var e=t.size,r=-1,i=e-1,o=7,a=0,u=e-1;u>0;u-=2)for(6===u&&u--;;){for(var s=0;s<2;s++)if(!t.isReserved(i,u-s)){var c=!1;a<n.length&&(c=1==(n[a]>>>o&1)),t.set(i,u-s,c),-1===--o&&(a++,o=7)}if((i+=r)<0||e<=i){i-=r,r=-r;break}}}(S,d),isNaN(r)&&(r=l.getBestMask(S,x.bind(null,S,e))),l.applyMask(r,S),x(S,e,r),{modules:S,version:n,errorCorrectionLevel:e,maskPattern:r,segments:o}}n.create=function(t,n){if(void 0===t||""===t)throw new Error("No input text");var e,r,a=o.M;return void 0!==n&&(a=o.from(n.errorCorrectionLevel,o.M),e=h.from(n.version),r=l.from(n.maskPattern),n.toSJISFunc&&i.setToSJISFunction(n.toSJISFunc)),S(t,e,a,r)}},function(t,n){function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){var n=Math.floor(t/8);return 1==(this.buffer[n]>>>7-t%8&1)},put:function(t,n){for(var e=0;e<n;e++)this.putBit(1==(t>>>n-e-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},t.exports=e},function(t,n,e){var r=e(29);function i(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=r.alloc(t*t),this.reservedBit=r.alloc(t*t)}i.prototype.set=function(t,n,e,r){var i=t*this.size+n;this.data[i]=e,r&&(this.reservedBit[i]=!0)},i.prototype.get=function(t,n){return this.data[t*this.size+n]},i.prototype.xor=function(t,n,e){this.data[t*this.size+n]^=e},i.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},t.exports=i},function(t,n,e){var r=e(23).getSymbolSize;n.getRowColCoords=function(t){if(1===t)return[];for(var n=Math.floor(t/7)+2,e=r(t),i=145===e?26:2*Math.ceil((e-13)/(2*n-2)),o=[e-7],a=1;a<n-1;a++)o[a]=o[a-1]-i;return o.push(6),o.reverse()},n.getPositions=function(t){for(var e=[],r=n.getRowColCoords(t),i=r.length,o=0;o<i;o++)for(var a=0;a<i;a++)0===o&&0===a||0===o&&a===i-1||o===i-1&&0===a||e.push([r[o],r[a]]);return e}},function(t,n,e){var r=e(23).getSymbolSize;n.getPositions=function(t){var n=r(t);return[[0,0],[n-7,0],[0,n-7]]}},function(t,n){n.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e=3,r=3,i=40,o=10;function a(t,e,r){switch(t){case n.Patterns.PATTERN000:return(e+r)%2==0;case n.Patterns.PATTERN001:return e%2==0;case n.Patterns.PATTERN010:return r%3==0;case n.Patterns.PATTERN011:return(e+r)%3==0;case n.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case n.Patterns.PATTERN101:return e*r%2+e*r%3==0;case n.Patterns.PATTERN110:return(e*r%2+e*r%3)%2==0;case n.Patterns.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}n.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},n.from=function(t){return n.isValid(t)?parseInt(t,10):void 0},n.getPenaltyN1=function(t){for(var n=t.size,r=0,i=0,o=0,a=null,u=null,s=0;s<n;s++){i=o=0,a=u=null;for(var c=0;c<n;c++){var l=t.get(s,c);l===a?i++:(i>=5&&(r+=e+(i-5)),a=l,i=1),(l=t.get(c,s))===u?o++:(o>=5&&(r+=e+(o-5)),u=l,o=1)}i>=5&&(r+=e+(i-5)),o>=5&&(r+=e+(o-5))}return r},n.getPenaltyN2=function(t){for(var n=t.size,e=0,i=0;i<n-1;i++)for(var o=0;o<n-1;o++){var a=t.get(i,o)+t.get(i,o+1)+t.get(i+1,o)+t.get(i+1,o+1);4!==a&&0!==a||e++}return e*r},n.getPenaltyN3=function(t){for(var n=t.size,e=0,r=0,o=0,a=0;a<n;a++){r=o=0;for(var u=0;u<n;u++)r=r<<1&2047|t.get(a,u),u>=10&&(1488===r||93===r)&&e++,o=o<<1&2047|t.get(u,a),u>=10&&(1488===o||93===o)&&e++}return e*i},n.getPenaltyN4=function(t){for(var n=0,e=t.data.length,r=0;r<e;r++)n+=t.data[r];return Math.abs(Math.ceil(100*n/e/5)-10)*o},n.applyMask=function(t,n){for(var e=n.size,r=0;r<e;r++)for(var i=0;i<e;i++)n.isReserved(i,r)||n.xor(i,r,a(t,i,r))},n.getBestMask=function(t,e){for(var r=Object.keys(n.Patterns).length,i=0,o=1/0,a=0;a<r;a++){e(a),n.applyMask(a,t);var u=n.getPenaltyN1(t)+n.getPenaltyN2(t)+n.getPenaltyN3(t)+n.getPenaltyN4(t);n.applyMask(a,t),u<o&&(o=u,i=a)}return i}},function(t,n,e){var r=e(29),i=e(136),o=e(138).Buffer;function a(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(t){this.degree=t,this.genPoly=i.generateECPolynomial(this.degree)},a.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var n=r.alloc(this.degree),e=o.concat([t,n],t.length+this.degree),a=i.mod(e,this.genPoly),u=this.degree-a.length;if(u>0){var s=r.alloc(this.degree);return a.copy(s,u),s}return a},t.exports=a},function(t,n,e){var r=e(29),i=e(137);n.mul=function(t,n){for(var e=r.alloc(t.length+n.length-1),o=0;o<t.length;o++)for(var a=0;a<n.length;a++)e[o+a]^=i.mul(t[o],n[a]);return e},n.mod=function(t,n){for(var e=r.from(t);e.length-n.length>=0;){for(var o=e[0],a=0;a<n.length;a++)e[a]^=i.mul(n[a],o);for(var u=0;u<e.length&&0===e[u];)u++;e=e.slice(u)}return e},n.generateECPolynomial=function(t){for(var e=r.from([1]),o=0;o<t;o++)e=n.mul(e,[1,i.exp(o)]);return e}},function(t,n,e){var r=e(29),i=r.alloc(512),o=r.alloc(256);!function(){for(var t=1,n=0;n<255;n++)i[n]=t,o[t]=n,256&(t<<=1)&&(t^=285);for(n=255;n<512;n++)i[n]=i[n-255]}(),n.log=function(t){if(t<1)throw new Error("log("+t+")");return o[t]},n.exp=function(t){return i[t]},n.mul=function(t,n){return 0===t||0===n?0:i[o[t]+o[n]]}},function(t,n,e){"use strict";(function(t){
|
|
1
|
+
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.InvoiceSample=n():t.InvoiceSample=n()}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=157)}([function(t,n,e){var r=e(38)("wks"),i=e(31),o=e(2).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,n,e){"use strict";var r=e(42),i={};i[e(0)("toStringTag")]="z",i+""!="[object z]"&&e(15)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n,e){var r=e(2),i=e(26),o=e(17),a=e(15),u=e(27),s=function(t,n,e){var c,l,f,p,h=t&s.F,m=t&s.G,d=t&s.S,g=t&s.P,v=t&s.B,x=m?r:d?r[n]||(r[n]={}):(r[n]||{}).prototype,y=m?i:i[n]||(i[n]={}),S=y.prototype||(y.prototype={});for(c in m&&(e=n),e)f=((l=!h&&x&&void 0!==x[c])?x:e)[c],p=v&&l?u(f,r):g&&"function"==typeof f?u(Function.call,f):f,x&&a(x,c,f,t&s.U),y[c]!=f&&o(y,c,p),g&&S[c]!=f&&(S[c]=f)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,n,e){var r=e(7);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){"use strict";var r=e(44),i=e(110),o=e(34),a=e(28);t.exports=e(75)(Array,"Array",(function(t,n){this._t=a(t),this._i=0,this._k=n}),(function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,i(1)):i(0,"keys"==n?e:"values"==n?t[e]:[e,t[e]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){t.exports=!e(5)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){"use strict";var r,i,o,a,u=e(32),s=e(2),c=e(27),l=e(42),f=e(3),p=e(7),h=e(39),m=e(90),d=e(91),g=e(69),v=e(70).set,x=e(96)(),y=e(71),S=e(97),b=e(98),w=e(99),A=s.TypeError,T=s.process,E=T&&T.versions,P=E&&E.v8||"",N=s.Promise,C="process"==l(T),Y=function(){},R=i=y.f,I=!!function(){try{var t=N.resolve(1),n=(t.constructor={})[e(0)("species")]=function(t){t(Y,Y)};return(C||"function"==typeof PromiseRejectionEvent)&&t.then(Y)instanceof n&&0!==P.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(t){}}(),_=function(t){var n;return!(!p(t)||"function"!=typeof(n=t.then))&&n},X=function(t,n){if(!t._n){t._n=!0;var e=t._c;x((function(){for(var r=t._v,i=1==t._s,o=0,a=function(n){var e,o,a,u=i?n.ok:n.fail,s=n.resolve,c=n.reject,l=n.domain;try{u?(i||(2==t._h&&B(t),t._h=1),!0===u?e=r:(l&&l.enter(),e=u(r),l&&(l.exit(),a=!0)),e===n.promise?c(A("Promise-chain cycle")):(o=_(e))?o.call(e,s,c):s(e)):c(r)}catch(t){l&&!a&&l.exit(),c(t)}};e.length>o;)a(e[o++]);t._c=[],t._n=!1,n&&!t._h&&O(t)}))}},O=function(t){v.call(s,(function(){var n,e,r,i=t._v,o=L(t);if(o&&(n=S((function(){C?T.emit("unhandledRejection",i,t):(e=s.onunhandledrejection)?e({promise:t,reason:i}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=C||L(t)?2:1),t._a=void 0,o&&n.e)throw n.v}))},L=function(t){return 1!==t._h&&0===(t._a||t._c).length},B=function(t){v.call(s,(function(){var n;C?T.emit("rejectionHandled",t):(n=s.onrejectionhandled)&&n({promise:t,reason:t._v})}))},M=function(t){var n=this;n._d||(n._d=!0,(n=n._w||n)._v=t,n._s=2,n._a||(n._a=n._c.slice()),X(n,!0))},D=function(t){var n,e=this;if(!e._d){e._d=!0,e=e._w||e;try{if(e===t)throw A("Promise can't be resolved itself");(n=_(t))?x((function(){var r={_w:e,_d:!1};try{n.call(t,c(D,r,1),c(M,r,1))}catch(t){M.call(r,t)}})):(e._v=t,e._s=1,X(e,!1))}catch(t){M.call({_w:e,_d:!1},t)}}};I||(N=function(t){m(this,N,"Promise","_h"),h(t),r.call(this);try{t(c(D,this,1),c(M,this,1))}catch(t){M.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=e(100)(N.prototype,{then:function(t,n){var e=R(g(this,N));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=C?T.domain:void 0,this._c.push(e),this._a&&this._a.push(e),this._s&&X(this,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=c(D,t,1),this.reject=c(M,t,1)},y.f=R=function(t){return t===N||t===a?new o(t):i(t)}),f(f.G+f.W+f.F*!I,{Promise:N}),e(43)(N,"Promise"),e(101)("Promise"),a=e(26).Promise,f(f.S+f.F*!I,"Promise",{reject:function(t){var n=R(this);return(0,n.reject)(t),n.promise}}),f(f.S+f.F*(u||!I),"Promise",{resolve:function(t){return w(u&&this===a?N:this,t)}}),f(f.S+f.F*!(I&&e(102)((function(t){N.all(t).catch(Y)}))),"Promise",{all:function(t){var n=this,e=R(n),r=e.resolve,i=e.reject,o=S((function(){var e=[],o=0,a=1;d(t,!1,(function(t){var u=o++,s=!1;e.push(void 0),a++,n.resolve(t).then((function(t){s||(s=!0,e[u]=t,--a||r(e))}),i)})),--a||r(e)}));return o.e&&i(o.v),e.promise},race:function(t){var n=this,e=R(n),r=e.reject,i=S((function(){d(t,!1,(function(t){n.resolve(t).then(e.resolve,r)}))}));return i.e&&r(i.v),e.promise}})},function(t,n,e){"use strict";var r=e(2),i=e(18),o=e(8),a=e(3),u=e(15),s=e(103).KEY,c=e(5),l=e(38),f=e(43),p=e(31),h=e(0),m=e(72),d=e(104),g=e(105),v=e(73),x=e(4),y=e(7),S=e(29),b=e(28),w=e(36),A=e(37),T=e(53),E=e(107),P=e(55),N=e(51),C=e(14),Y=e(33),R=P.f,I=C.f,_=E.f,X=r.Symbol,O=r.JSON,L=O&&O.stringify,B=h("_hidden"),M=h("toPrimitive"),D={}.propertyIsEnumerable,k=l("symbol-registry"),W=l("symbols"),F=l("op-symbols"),U=Object.prototype,j="function"==typeof X&&!!N.f,K=r.QObject,z=!K||!K.prototype||!K.prototype.findChild,Q=o&&c((function(){return 7!=T(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a}))?function(t,n,e){var r=R(U,n);r&&delete U[n],I(t,n,e),r&&t!==U&&I(U,n,r)}:I,H=function(t){var n=W[t]=T(X.prototype);return n._k=t,n},J=j&&"symbol"==typeof X.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof X},G=function(t,n,e){return t===U&&G(F,n,e),x(t),n=w(n,!0),x(e),i(W,n)?(e.enumerable?(i(t,B)&&t[B][n]&&(t[B][n]=!1),e=T(e,{enumerable:A(0,!1)})):(i(t,B)||I(t,B,A(1,{})),t[B][n]=!0),Q(t,n,e)):I(t,n,e)},V=function(t,n){x(t);for(var e,r=g(n=b(n)),i=0,o=r.length;o>i;)G(t,e=r[i++],n[e]);return t},q=function(t){var n=D.call(this,t=w(t,!0));return!(this===U&&i(W,t)&&!i(F,t))&&(!(n||!i(this,t)||!i(W,t)||i(this,B)&&this[B][t])||n)},Z=function(t,n){if(t=b(t),n=w(n,!0),t!==U||!i(W,n)||i(F,n)){var e=R(t,n);return!e||!i(W,n)||i(t,B)&&t[B][n]||(e.enumerable=!0),e}},$=function(t){for(var n,e=_(b(t)),r=[],o=0;e.length>o;)i(W,n=e[o++])||n==B||n==s||r.push(n);return r},tt=function(t){for(var n,e=t===U,r=_(e?F:b(t)),o=[],a=0;r.length>a;)!i(W,n=r[a++])||e&&!i(U,n)||o.push(W[n]);return o};j||(u((X=function(){if(this instanceof X)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),n=function(e){this===U&&n.call(F,e),i(this,B)&&i(this[B],t)&&(this[B][t]=!1),Q(this,t,A(1,e))};return o&&z&&Q(U,t,{configurable:!0,set:n}),H(t)}).prototype,"toString",(function(){return this._k})),P.f=Z,C.f=G,e(54).f=E.f=$,e(41).f=q,N.f=tt,o&&!e(32)&&u(U,"propertyIsEnumerable",q,!0),m.f=function(t){return H(h(t))}),a(a.G+a.W+a.F*!j,{Symbol:X});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;nt.length>et;)h(nt[et++]);for(var rt=Y(h.store),it=0;rt.length>it;)d(rt[it++]);a(a.S+a.F*!j,"Symbol",{for:function(t){return i(k,t+="")?k[t]:k[t]=X(t)},keyFor:function(t){if(!J(t))throw TypeError(t+" is not a symbol!");for(var n in k)if(k[n]===t)return n},useSetter:function(){z=!0},useSimple:function(){z=!1}}),a(a.S+a.F*!j,"Object",{create:function(t,n){return void 0===n?T(t):V(T(t),n)},defineProperty:G,defineProperties:V,getOwnPropertyDescriptor:Z,getOwnPropertyNames:$,getOwnPropertySymbols:tt});var ot=c((function(){N.f(1)}));a(a.S+a.F*ot,"Object",{getOwnPropertySymbols:function(t){return N.f(S(t))}}),O&&a(a.S+a.F*(!j||c((function(){var t=X();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))}))),"JSON",{stringify:function(t){for(var n,e,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(e=n=r[1],(y(n)||void 0!==t)&&!J(t))return v(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!J(n))return n}),r[1]=n,L.apply(O,r)}}),X.prototype[M]||e(17)(X.prototype,M,X.prototype.valueOf),f(X,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,n,e){"use strict";var r=e(74)(!0);e(75)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})}))},function(t,n,e){for(var r=e(6),i=e(33),o=e(15),a=e(2),u=e(17),s=e(34),c=e(0),l=c("iterator"),f=c("toStringTag"),p=s.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=i(h),d=0;d<m.length;d++){var g,v=m[d],x=h[v],y=a[v],S=y&&y.prototype;if(S&&(S[l]||u(S,l,p),S[f]||u(S,f,v),s[v]=p,x))for(g in r)S[g]||o(S,g,r[g],!0)}},function(t,n,e){"use strict";var r=e(4),i=e(29),o=e(20),a=e(40),u=e(56),s=e(57),c=Math.max,l=Math.min,f=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;e(58)("replace",2,(function(t,n,e,m){return[function(r,i){var o=t(this),a=null==r?void 0:r[n];return void 0!==a?a.call(r,o,i):e.call(String(o),r,i)},function(t,n){var i=m(e,t,this,n);if(i.done)return i.value;var f=r(t),p=String(this),h="function"==typeof n;h||(n=String(n));var g=f.global;if(g){var v=f.unicode;f.lastIndex=0}for(var x=[];;){var y=s(f,p);if(null===y)break;if(x.push(y),!g)break;""===String(y[0])&&(f.lastIndex=u(p,o(f.lastIndex),v))}for(var S,b="",w=0,A=0;A<x.length;A++){y=x[A];for(var T=String(y[0]),E=c(l(a(y.index),p.length),0),P=[],N=1;N<y.length;N++)P.push(void 0===(S=y[N])?S:String(S));var C=y.groups;if(h){var Y=[T].concat(P,E,p);void 0!==C&&Y.push(C);var R=String(n.apply(void 0,Y))}else R=d(T,p,E,P,C,n);E>=w&&(b+=p.slice(w,E)+R,w=E+T.length)}return b+p.slice(w)}];function d(t,n,r,o,a,u){var s=r+t.length,c=o.length,l=h;return void 0!==a&&(a=i(a),l=p),e.call(u,l,(function(e,i){var u;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(s);case"<":u=a[i.slice(1,-1)];break;default:var l=+i;if(0===l)return e;if(l>c){var p=f(l/10);return 0===p?e:p<=c?void 0===o[p-1]?i.charAt(1):o[p-1]+i.charAt(1):e}u=o[l-1]}return void 0===u?"":u}))}}))},function(t,n,e){var r=e(4),i=e(66),o=e(36),a=Object.defineProperty;n.f=e(8)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return a(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(2),i=e(17),o=e(18),a=e(31)("src"),u=e(88),s=(""+u).split("toString");e(26).inspectSource=function(t){return u.call(t)},(t.exports=function(t,n,e,u){var c="function"==typeof e;c&&(o(e,"name")||i(e,"name",n)),t[n]!==e&&(c&&(o(e,a)||i(e,a,t[n]?""+t[n]:s.join(String(n)))),t===r?t[n]=e:u?t[n]?t[n]=e:i(t,n,e):(delete t[n],i(t,n,e)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||u.call(this)}))},function(t,n,e){"use strict";var r=e(2),i=e(18),o=e(19),a=e(112),u=e(36),s=e(5),c=e(54).f,l=e(55).f,f=e(14).f,p=e(114).trim,h=r.Number,m=h,d=h.prototype,g="Number"==o(e(53)(d)),v="trim"in String.prototype,x=function(t){var n=u(t,!1);if("string"==typeof n&&n.length>2){var e,r,i,o=(n=v?n.trim():p(n,3)).charCodeAt(0);if(43===o||45===o){if(88===(e=n.charCodeAt(2))||120===e)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+n}for(var a,s=n.slice(2),c=0,l=s.length;c<l;c++)if((a=s.charCodeAt(c))<48||a>i)return NaN;return parseInt(s,r)}}return+n};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof h&&(g?s((function(){d.valueOf.call(e)})):"Number"!=o(e))?a(new m(x(n)),e,h):x(n)};for(var y,S=e(8)?c(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),b=0;S.length>b;b++)i(m,y=S[b])&&!i(h,y)&&f(h,y,l(m,y));h.prototype=d,d.constructor=h,e(15)(r,"Number",h)}},function(t,n,e){var r=e(14),i=e(37);t.exports=e(8)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r=e(40),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n,e){"use strict";e(116);var r=e(4),i=e(60),o=e(8),a=/./.toString,u=function(t){e(15)(RegExp.prototype,"toString",t,!0)};e(5)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?u((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=a.name&&u((function(){return a.call(this)}))},function(t,n,e){var r=e(129),i=e(130),o=e(152),a=e(153);function u(t,n,e,o,a){var u=[].slice.call(arguments,1),s=u.length,c="function"==typeof u[s-1];if(!c&&!r())throw new Error("Callback required as last argument");if(!c){if(s<1)throw new Error("Too few arguments provided");return 1===s?(e=n,n=o=void 0):2!==s||n.getContext||(o=e,e=n,n=void 0),new Promise((function(r,a){try{var u=i.create(e,o);r(t(u,n,o))}catch(t){a(t)}}))}if(s<2)throw new Error("Too few arguments provided");2===s?(a=e,e=n,n=o=void 0):3===s&&(n.getContext&&void 0===a?(a=o,o=void 0):(a=o,o=e,e=n,n=void 0));try{var l=i.create(e,o);a(null,t(l,n,o))}catch(t){a(t)}}n.create=i.create,n.toCanvas=u.bind(null,o.render),n.toDataURL=u.bind(null,o.renderToDataURL),n.toString=u.bind(null,(function(t,n,e){return a.render(t,e)}))},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n){var e,r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];n.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},n.getSymbolTotalCodewords=function(t){return r[t]},n.getBCHDigit=function(t){for(var n=0;0!==t;)n++,t>>>=1;return n},n.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');e=t},n.isKanjiModeEnabled=function(){return void 0!==e},n.toSJIS=function(t){return e(t)}},function(t,n,e){var r=e(82),i=e(83);n.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},n.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},n.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},n.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},n.MIXED={bit:-1},n.getCharCountIndicator=function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},n.getBestModeForData=function(t){return i.testNumeric(t)?n.NUMERIC:i.testAlphanumeric(t)?n.ALPHANUMERIC:i.testKanji(t)?n.KANJI:n.BYTE},n.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},n.isValid=function(t){return t&&t.bit&&t.ccBits},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return n.NUMERIC;case"alphanumeric":return n.ALPHANUMERIC;case"kanji":return n.KANJI;case"byte":return n.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return e}}},function(t,n){var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},function(t,n,e){var r=e(39);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n,e){var r=e(47),i=e(23);t.exports=function(t){return r(i(t))}},function(t,n,e){var r=e(23);t.exports=function(t){return Object(r(t))}},function(t,n,e){"use strict";var r=e(63);o.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}();var i=o.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function o(t,n,e){return o.TYPED_ARRAY_SUPPORT||this instanceof o?"number"==typeof t?s(this,t):function(t,n,e,r){if("number"==typeof n)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer)return function(t,n,e,r){if(e<0||n.byteLength<e)throw new RangeError("'offset' is out of bounds");if(n.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");var i;i=void 0===e&&void 0===r?new Uint8Array(n):void 0===r?new Uint8Array(n,e):new Uint8Array(n,e,r);o.TYPED_ARRAY_SUPPORT?i.__proto__=o.prototype:i=c(t,i);return i}(t,n,e,r);if("string"==typeof n)return function(t,n){var e=0|f(n),r=u(t,e),i=r.write(n);i!==e&&(r=r.slice(0,i));return r}(t,n);return function(t,n){if(o.isBuffer(n)){var e=0|a(n.length),r=u(t,e);return 0===r.length||n.copy(r,0,0,e),r}if(n){if("undefined"!=typeof ArrayBuffer&&n.buffer instanceof ArrayBuffer||"length"in n)return"number"!=typeof n.length||(i=n.length)!=i?u(t,0):c(t,n);if("Buffer"===n.type&&Array.isArray(n.data))return c(t,n.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,n)}(this,t,n,e):new o(t,n,e)}function a(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function u(t,n){var e;return o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(n)).__proto__=o.prototype:(null===(e=t)&&(e=new o(n)),e.length=n),e}function s(t,n){var e=u(t,n<0?0:0|a(n));if(!o.TYPED_ARRAY_SUPPORT)for(var r=0;r<n;++r)e[r]=0;return e}function c(t,n){for(var e=n.length<0?0:0|a(n.length),r=u(t,e),i=0;i<e;i+=1)r[i]=255&n[i];return r}function l(t,n){var e;n=n||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((e=t.charCodeAt(a))>55295&&e<57344){if(!i){if(e>56319){(n-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(n-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(n-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(n-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((n-=1)<0)break;o.push(e)}else if(e<2048){if((n-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((n-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function f(t){return o.isBuffer(t)?t.length:"undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer)?t.byteLength:("string"!=typeof t&&(t=""+t),0===t.length?0:l(t).length)}o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),o.prototype.write=function(t,n,e){void 0===n||void 0===e&&"string"==typeof n?(e=this.length,n=0):isFinite(n)&&(n|=0,isFinite(e)?e|=0:e=void 0);var r=this.length-n;if((void 0===e||e>r)&&(e=r),t.length>0&&(e<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(t,n,e,r){return function(t,n,e,r){for(var i=0;i<r&&!(i+e>=n.length||i>=t.length);++i)n[i+e]=t[i];return i}(l(n,t.length-e),t,e,r)}(this,t,n,e)},o.prototype.slice=function(t,n){var e,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n<t&&(n=t),o.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,n)).__proto__=o.prototype;else{var i=n-t;e=new o(i,void 0);for(var a=0;a<i;++a)e[a]=this[a+t]}return e},o.prototype.copy=function(t,n,e,r){if(e||(e=0),r||0===r||(r=this.length),n>=t.length&&(n=t.length),n||(n=0),r>0&&r<e&&(r=e),r===e)return 0;if(0===t.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-n<r-e&&(r=t.length-n+e);var i,a=r-e;if(this===t&&e<n&&n<r)for(i=a-1;i>=0;--i)t[i+n]=this[i+e];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+n]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+a),n);return a},o.prototype.fill=function(t,n,e){if("string"==typeof t){if("string"==typeof n?(n=0,e=this.length):"string"==typeof e&&(e=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}}else"number"==typeof t&&(t&=255);if(n<0||this.length<n||this.length<e)throw new RangeError("Out of range index");if(e<=n)return this;var i;if(n>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=n;i<e;++i)this[i]=t;else{var a=o.isBuffer(t)?t:new o(t),u=a.length;for(i=0;i<e-n;++i)this[i+n]=a[i%u]}return this},o.concat=function(t,n){if(!r(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u(null,0);var e;if(void 0===n)for(n=0,e=0;e<t.length;++e)n+=t[e].length;var i=s(null,n),a=0;for(e=0;e<t.length;++e){var c=t[e];if(!o.isBuffer(c))throw new TypeError('"list" argument must be an Array of Buffers');c.copy(i,a),a+=c.length}return i},o.byteLength=f,o.prototype._isBuffer=!0,o.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.exports.alloc=function(t){var n=new o(t);return n.fill(0),n},t.exports.from=function(t){return new o(t)}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n){t.exports=!1},function(t,n,e){var r=e(67),i=e(50);t.exports=Object.keys||function(t){return r(t,i)}},function(t,n){t.exports={}},function(t,n,e){"use strict";var r=e(77),i=e(4),o=e(69),a=e(56),u=e(20),s=e(57),c=e(59),l=e(5),f=Math.min,p=[].push,h="length",m=!l((function(){RegExp(4294967295,"y")}));e(58)("split",2,(function(t,n,e,l){var d;return d="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[h]||2!="ab".split(/(?:ab)*/)[h]||4!=".".split(/(.?)(.?)/)[h]||".".split(/()()/)[h]>1||"".split(/.?/)[h]?function(t,n){var i=String(this);if(void 0===t&&0===n)return[];if(!r(t))return e.call(i,t,n);for(var o,a,u,s=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,m=void 0===n?4294967295:n>>>0,d=new RegExp(t.source,l+"g");(o=c.call(d,i))&&!((a=d.lastIndex)>f&&(s.push(i.slice(f,o.index)),o[h]>1&&o.index<i[h]&&p.apply(s,o.slice(1)),u=o[0][h],f=a,s[h]>=m));)d.lastIndex===o.index&&d.lastIndex++;return f===i[h]?!u&&d.test("")||s.push(""):s.push(i.slice(f)),s[h]>m?s.slice(0,m):s}:"0".split(void 0,0)[h]?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,r){var i=t(this),o=null==e?void 0:e[n];return void 0!==o?o.call(e,i,r):d.call(String(i),e,r)},function(t,n){var r=l(d,t,this,n,d!==e);if(r.done)return r.value;var c=i(t),p=String(this),h=o(c,RegExp),g=c.unicode,v=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(m?"y":"g"),x=new h(m?c:"^(?:"+c.source+")",v),y=void 0===n?4294967295:n>>>0;if(0===y)return[];if(0===p.length)return null===s(x,p)?[p]:[];for(var S=0,b=0,w=[];b<p.length;){x.lastIndex=m?b:0;var A,T=s(x,m?p:p.slice(b));if(null===T||(A=f(u(x.lastIndex+(m?0:b)),p.length))===S)b=a(p,b,g);else{if(w.push(p.slice(S,b)),w.length===y)return w;for(var E=1;E<=T.length-1;E++)if(w.push(T[E]),w.length===y)return w;b=S=A}}return w.push(p.slice(S)),w}]}))},function(t,n,e){var r=e(7);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(26),i=e(2),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e(32)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(19),i=e(0)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var n,e,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),i))?e:o?r(n):"Object"==(a=r(n))&&"function"==typeof n.callee?"Arguments":a}},function(t,n,e){var r=e(14).f,i=e(18),o=e(0)("toStringTag");t.exports=function(t,n,e){t&&!i(t=e?t:t.prototype,o)&&r(t,o,{configurable:!0,value:n})}},function(t,n,e){var r=e(0)("unscopables"),i=Array.prototype;null==i[r]&&e(17)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,n,e){"use strict";var r=e(3),i=e(68)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(44)("includes")},function(t,n,e){var r=e(7),i=e(2).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){var r=e(19);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n,e){var r=e(40),i=Math.max,o=Math.min;t.exports=function(t,n){return(t=r(t))<0?i(t+n,0):o(t,n)}},function(t,n,e){var r=e(38)("keys"),i=e(31);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(2).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(4),i=e(106),o=e(50),a=e(49)("IE_PROTO"),u=function(){},s=function(){var t,n=e(46)("iframe"),r=o.length;for(n.style.display="none",e(52).appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s.prototype[o[r]];return s()};t.exports=Object.create||function(t,n){var e;return null!==t?(u.prototype=r(t),e=new u,u.prototype=null,e[a]=t):e=s(),void 0===n?e:i(e,n)}},function(t,n,e){var r=e(67),i=e(50).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,n,e){var r=e(41),i=e(37),o=e(28),a=e(36),u=e(18),s=e(66),c=Object.getOwnPropertyDescriptor;n.f=e(8)?c:function(t,n){if(t=o(t),n=a(n,!0),s)try{return c(t,n)}catch(t){}if(u(t,n))return i(!r.f.call(t,n),t[n])}},function(t,n,e){"use strict";var r=e(74)(!0);t.exports=function(t,n,e){return n+(e?r(t,n).length:1)}},function(t,n,e){"use strict";var r=e(42),i=RegExp.prototype.exec;t.exports=function(t,n){var e=t.exec;if("function"==typeof e){var o=e.call(t,n);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,n)}},function(t,n,e){"use strict";e(111);var r=e(15),i=e(17),o=e(5),a=e(23),u=e(0),s=e(59),c=u("species"),l=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),f=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e="ab".split(t);return 2===e.length&&"a"===e[0]&&"b"===e[1]}();t.exports=function(t,n,e){var p=u(t),h=!o((function(){var n={};return n[p]=function(){return 7},7!=""[t](n)})),m=h?!o((function(){var n=!1,e=/a/;return e.exec=function(){return n=!0,null},"split"===t&&(e.constructor={},e.constructor[c]=function(){return e}),e[p](""),!n})):void 0;if(!h||!m||"replace"===t&&!l||"split"===t&&!f){var d=/./[p],g=e(a,p,""[t],(function(t,n,e,r,i){return n.exec===s?h&&!i?{done:!0,value:d.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}})),v=g[0],x=g[1];r(String.prototype,t,v),i(RegExp.prototype,p,2==n?function(t,n){return x.call(t,this,n)}:function(t){return x.call(t,this)})}}},function(t,n,e){"use strict";var r,i,o=e(60),a=RegExp.prototype.exec,u=String.prototype.replace,s=a,c=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),l=void 0!==/()??/.exec("")[1];(c||l)&&(s=function(t){var n,e,r,i,s=this;return l&&(e=new RegExp("^"+s.source+"$(?!\\s)",o.call(s))),c&&(n=s.lastIndex),r=a.call(s,t),c&&r&&(s.lastIndex=s.global?r.index+r[0].length:n),l&&r&&r.length>1&&u.call(r[0],e,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=s},function(t,n,e){"use strict";var r=e(4);t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,e){"use strict";var r=e(3),i=e(120);r(r.P+r.F*e(121)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,e){"use strict";function r(t){var n=-1;i||(i=function(){for(var t=new Int32Array(256),n=0;n<256;n++){for(var e=n,r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}());for(var e=0;e<t.length;e++)n=i[255&(n^t[e])]^n>>>8;return-1^n}Object.defineProperty(n,"__esModule",{value:!0}),n.changeDpiBlob=function(t,n){var e=t.slice(0,33);return new Promise((function(r,i){var o=new FileReader;o.onload=function(){var e=new Uint8Array(o.result),i=t.slice(33),a=f(e,n,t.type);r(new Blob([a,i],{type:t.type}))},o.readAsArrayBuffer(e)}))},n.changeDpiDataUrl=function(t,n){var e=t.split(","),r=e[0],i=e[1],u=void 0,s=void 0,c=!1;if(-1!==r.indexOf(o)){u=o;var l=function(t){var n=t.indexOf("AAlwSFlz");-1===n&&(n=t.indexOf("AAAJcEhZ"));-1===n&&(n=t.indexOf("AAAACXBI"));return n}(i);l>=0?(s=4*Math.ceil((l+28)/3),c=!0):s=44}-1!==r.indexOf(a)&&(u=a,s=24);for(var p=i.substring(0,s),h=i.substring(s),m=atob(p),d=new Uint8Array(m.length),g=0;g<d.length;g++)d[g]=m.charCodeAt(g);var v=f(d,n,u,c),x=btoa(String.fromCharCode.apply(String,function(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return Array.from(t)}(v)));return[r,",",x,h].join("")};var i=void 0,o="image/png",a="image/jpeg",u="p".charCodeAt(0),s="H".charCodeAt(0),c="Y".charCodeAt(0),l="s".charCodeAt(0);function f(t,n,e,i){if(e===a)return t[13]=1,t[14]=n>>8,t[15]=255&n,t[16]=n>>8,t[17]=255&n,t;if(e===o){var f=new Uint8Array(13);n*=39.3701,f[0]=u,f[1]=s,f[2]=c,f[3]=l,f[4]=n>>>24,f[5]=n>>>16,f[6]=n>>>8,f[7]=255&n,f[8]=f[4],f[9]=f[5],f[10]=f[6],f[11]=f[7],f[12]=1;var p=r(f),h=new Uint8Array(4);if(h[0]=p>>>24,h[1]=p>>>16,h[2]=p>>>8,h[3]=255&p,i){var m=function(t){for(var n=t.length-1;n>=4;n--)if(9===t[n-4]&&t[n-3]===u&&t[n-2]===s&&t[n-1]===c&&t[n]===l)return n-3}(t);return t.set(f,m),t.set(h,m+13),t}var d=new Uint8Array(4);d[0]=0,d[1]=0,d[2]=0,d[3]=9;var g=new Uint8Array(54);return g.set(t,0),g.set(d,33),g.set(f,37),g.set(h,50),g}}},function(t,n){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,n){n.L={bit:1},n.M={bit:0},n.Q={bit:3},n.H={bit:2},n.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},n.from=function(t,e){if(n.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return n.L;case"m":case"medium":return n.M;case"q":case"quartile":return n.Q;case"h":case"high":return n.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return e}}},function(t,n,e){var r=e(3);r(r.S+r.F,"Object",{assign:e(89)})},function(t,n,e){t.exports=!e(8)&&!e(5)((function(){return 7!=Object.defineProperty(e(46)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(18),i=e(28),o=e(68)(!1),a=e(49)("IE_PROTO");t.exports=function(t,n){var e,u=i(t),s=0,c=[];for(e in u)e!=a&&r(u,e)&&c.push(e);for(;n.length>s;)r(u,e=n[s++])&&(~o(c,e)||c.push(e));return c}},function(t,n,e){var r=e(28),i=e(20),o=e(48);t.exports=function(t){return function(n,e,a){var u,s=r(n),c=i(s.length),l=o(a,c);if(t&&e!=e){for(;c>l;)if((u=s[l++])!=u)return!0}else for(;c>l;l++)if((t||l in s)&&s[l]===e)return t||l||0;return!t&&-1}}},function(t,n,e){var r=e(4),i=e(39),o=e(0)("species");t.exports=function(t,n){var e,a=r(t).constructor;return void 0===a||null==(e=r(a)[o])?n:i(e)}},function(t,n,e){var r,i,o,a=e(27),u=e(95),s=e(52),c=e(46),l=e(2),f=l.process,p=l.setImmediate,h=l.clearImmediate,m=l.MessageChannel,d=l.Dispatch,g=0,v={},x=function(){var t=+this;if(v.hasOwnProperty(t)){var n=v[t];delete v[t],n()}},y=function(t){x.call(t.data)};p&&h||(p=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return v[++g]=function(){u("function"==typeof t?t:Function(t),n)},r(g),g},h=function(t){delete v[t]},"process"==e(19)(f)?r=function(t){f.nextTick(a(x,t,1))}:d&&d.now?r=function(t){d.now(a(x,t,1))}:m?(o=(i=new m).port2,i.port1.onmessage=y,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",y,!1)):r="onreadystatechange"in c("script")?function(t){s.appendChild(c("script")).onreadystatechange=function(){s.removeChild(this),x.call(t)}}:function(t){setTimeout(a(x,t,1),0)}),t.exports={set:p,clear:h}},function(t,n,e){"use strict";var r=e(39);function i(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=r(n),this.reject=r(e)}t.exports.f=function(t){return new i(t)}},function(t,n,e){n.f=e(0)},function(t,n,e){var r=e(19);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){var r=e(40),i=e(23);t.exports=function(t){return function(n,e){var o,a,u=String(i(n)),s=r(e),c=u.length;return s<0||s>=c?t?"":void 0:(o=u.charCodeAt(s))<55296||o>56319||s+1===c||(a=u.charCodeAt(s+1))<56320||a>57343?t?u.charAt(s):o:t?u.slice(s,s+2):a-56320+(o-55296<<10)+65536}}},function(t,n,e){"use strict";var r=e(32),i=e(3),o=e(15),a=e(17),u=e(34),s=e(108),c=e(43),l=e(109),f=e(0)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,n,e,m,d,g,v){s(e,n,m);var x,y,S,b=function(t){if(!p&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},w=n+" Iterator",A="values"==d,T=!1,E=t.prototype,P=E[f]||E["@@iterator"]||d&&E[d],N=P||b(d),C=d?A?b("entries"):N:void 0,Y="Array"==n&&E.entries||P;if(Y&&(S=l(Y.call(new t)))!==Object.prototype&&S.next&&(c(S,w,!0),r||"function"==typeof S[f]||a(S,f,h)),A&&P&&"values"!==P.name&&(T=!0,N=function(){return P.call(this)}),r&&!v||!p&&!T&&E[f]||a(E,f,N),u[n]=N,u[w]=h,d)if(x={values:A?N:b("values"),keys:g?N:b("keys"),entries:C},v)for(y in x)y in E||o(E,y,x[y]);else i(i.P+i.F*(p||T),n,x);return x}},function(t,n,e){"use strict";var r=e(4),i=e(20),o=e(56),a=e(57);e(58)("match",1,(function(t,n,e,u){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=u(e,t,this);if(n.done)return n.value;var s=r(t),c=String(this);if(!s.global)return a(s,c);var l=s.unicode;s.lastIndex=0;for(var f,p=[],h=0;null!==(f=a(s,c));){var m=String(f[0]);p[h]=m,""===m&&(s.lastIndex=o(c,i(s.lastIndex),l)),h++}return 0===h?null:p}]}))},function(t,n,e){var r=e(7),i=e(19),o=e(0)("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[o])?!!n:"RegExp"==i(t))}},function(t,n,e){"use strict";var r=e(3),i=e(52),o=e(19),a=e(48),u=e(20),s=[].slice;r(r.P+r.F*e(5)((function(){i&&s.call(i)})),"Array",{slice:function(t,n){var e=u(this.length),r=o(this);if(n=void 0===n?e:n,"Array"==r)return s.call(this,t,n);for(var i=a(t,e),c=a(n,e),l=u(c-i),f=new Array(l),p=0;p<l;p++)f[p]="String"==r?this.charAt(i+p):this[i+p];return f}})},function(t,n,e){var r=e(27),i=e(47),o=e(29),a=e(20),u=e(123);t.exports=function(t,n){var e=1==t,s=2==t,c=3==t,l=4==t,f=6==t,p=5==t||f,h=n||u;return function(n,u,m){for(var d,g,v=o(n),x=i(v),y=r(u,m,3),S=a(x.length),b=0,w=e?h(n,S):s?h(n,0):void 0;S>b;b++)if((p||b in x)&&(g=y(d=x[b],b,v),t))if(e)w[b]=g;else if(g)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:w.push(d)}else if(l)return!1;return f?-1:c||l?l:w}}},function(t,n,e){"use strict";var r=/^([+-])?0*(\d+)(\.(\d+))?$/,i=/^([+-])?0*(\d+)(\.(\d+))?e(([+-])?(\d+))$/i,o=n.e2ten=function(t){var n=i.exec(t.toString());if(!n)return t;var e=n[2],r=n[4]||"",o=n[5]?+n[5]:0;if(o>0){var a=r.substr(0,o);a=a.length<o?a+new Array(o-a.length+1).join("0"):a,r=r.substr(o),e+=a}else{o=-o;var u=e.length-o;u=u<0?0:u;var s=e.substr(u,o);s=s.length<o?new Array(o-s.length+1).join("0")+s:s,e=e.substring(0,u),r=s+r}return e=""==e?"0":e,("-"==n[1]?"-":"")+e+(r?"."+r:"")};n.getNumbResult=function(t){var n=r.exec(t.toString());if(!n&&i.test(t.toString())&&(n=r.exec(o(t.toString()))),n)return{int:n[2],decimal:n[4],minus:"-"==n[1],num:n.slice(1,3).join("")}},n.centerArray=function t(n,e){if(n.splice.apply(n,[0,e.length].concat(e.splice(0,e.length))),arguments.length>2){var r=[].slice.call(arguments,2);r.unshift(n),t.apply(null,r)}return n};var a=n.hasAttr=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)};n.extend=function(t){for(var n,e=arguments[0]||{},r=Array.prototype.slice.call(arguments,1),i=0;i<r.length;i++){var o=r[i];for(n in o)a(o,n)&&(e[n]=o[n])}return e},n.getDigit=function(t){return t>=5?4*(t-4)+4:t},n.unshiftZero=function(t,n){if(null==n&&(n=1),!(n<=0))for(;n--;)t.unshift(0)},n.clearZero=function(t,n,e){if(null==t)return"";var r=~"*.?+$^[](){}|\\/".indexOf(n)?"\\"+n:n,i=new RegExp("^"+r+"+"),o=new RegExp(r+"+$"),a=new RegExp(r+"{2}","g");return t=t.toString(),"^"==e&&(t=t.replace(i,"")),e&&"$"!=e||(t=t.replace(o,"")),e&&"nto1"!=e||(t=t.replace(a,n)),t}},function(t,n,e){var r=e(64),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];n.getBlocksCount=function(t,n){switch(n){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}},n.getTotalCodewordsCount=function(t,n){switch(n){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}}},function(t,n){n.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},function(t,n){var e="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",r="(?:(?![A-Z0-9 $%*+\\-./:]|"+(e=e.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";n.KANJI=new RegExp(e,"g"),n.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),n.BYTE=new RegExp(r,"g"),n.NUMERIC=new RegExp("[0-9]+","g"),n.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var i=new RegExp("^"+e+"$"),o=new RegExp("^[0-9]+$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");n.testKanji=function(t){return i.test(t)},n.testNumeric=function(t){return o.test(t)},n.testAlphanumeric=function(t){return a.test(t)}},function(t,n){function e(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");var n=t.slice().replace("#","").split("");if(n.length<3||5===n.length||n.length>8)throw new Error("Invalid hex color: "+t);3!==n.length&&4!==n.length||(n=Array.prototype.concat.apply([],n.map((function(t){return[t,t]})))),6===n.length&&n.push("F","F");var e=parseInt(n.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:255&e,hex:"#"+n.slice(0,6).join("")}}n.getOptions=function(t){t||(t={}),t.color||(t.color={});var n=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},n.getScale=function(t,n){return n.width&&n.width>=t+2*n.margin?n.width/(t+2*n.margin):n.scale},n.getImageWidth=function(t,e){var r=n.getScale(t,e);return Math.floor((t+2*e.margin)*r)},n.qrToImageData=function(t,e,r){for(var i=e.modules.size,o=e.modules.data,a=n.getScale(i,r),u=Math.floor((i+2*r.margin)*a),s=r.margin*a,c=[r.color.light,r.color.dark],l=0;l<u;l++)for(var f=0;f<u;f++){var p=4*(l*u+f),h=r.color.light;if(l>=s&&f>=s&&l<u-s&&f<u-s)h=c[o[Math.floor((l-s)/a)*i+Math.floor((f-s)/a)]?1:0];t[p++]=h.r,t[p++]=h.g,t[p++]=h.b,t[p]=h.a}}},function(t,n,e){"use strict";var r=e(3),i=e(79)(1);r(r.P+r.F*!e(154)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";e.r(n),n.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIgAAACACAYAAADQ6SE/AAAR50lEQVR4Xu2dWei+2xTH1/+KDHFMRcJxQZI4mZPhJEMhJIRjOCkkZYoLN5wrKcUhmQrHBUWmlLk4MiSEQiFTckM4x4W4os/7f9bfPvu/97PW2nu/z/O8w66399fv3c8e1v7uNe/9XJDTLc8SkddWpn9HEXnIQNL8QUT4aPmpiNwkIt8SkZ9Nfw/sblxTF8Y1dXAtAYCPiciDNzBywPNuEflCBqTVh3bKAIH4cApA8szVV+L/AwAo122Fq5w6QHRZ7iMiLxMRxM4WOAri52oRQRStWs4AKZP/CdO/9TuvBaD4UBBVd9jDKgKSq9YWOWeAjFlZRBUc6G2DwYJOAldbrZwB4iM9AMDigV7/rTwCJ+GjnMXXsl3ryjW5yBkg9gKpMvs6EeGzD3EyN4pni8jnfcMcX+sMkBhN4SSIkZr/JNaarzYWDX2uUloBAqEwDVWJw+FzwyozWKdTxAjm6BLm8Y0JnRefbQtAkLOfK8ha/AnXLj6DdTtMrRlrJNDn3lalwu+tAGETq8lOG00lChAI8pPJwVTq8BRBAh3e6qA+1kiL+z4KELg648lNdHwqcL0Qp48CBGXJYqunCBJMXIi/DwWWBaV9T6HeR42KuPVRfF1OuAhA4B6/94xycl+forhBmXypk0beal4lFY7xTWejgAQnHM642RIBCCwS3cNbTpGTQBsWquaBVdqx0736CBsNWlqFzRvxwbg40z4BwoROFSTWYqJAwuI9ICEmg5U4V6KbV9u6wuIiEYBEREw6mVMFCTrJCH+JByDQuEW0mU64CEBY9NZJnypI2NnMvUd59QAkKl50A5v6TRQgKjZa0HqqIEGc4KK39JJaVPj108asiRja/4cl0yq/m8FAD0AeJCKvEpEfJspSK0s7VZCwPiwkYhrdQ51YpBvyN7oI36WYCxYHAbtawaz1msF5G6aPxQLIXUTkxyJyr6nlt4jI26e/PT6R0qROFSQKjhZxA83gJKlZCqDe1QEO1sa0ZOYAcisR+Xdhhd8wDYwBol23ZGCdKkgQI9CsBSSAA7rxDe3RbyJmbWmzmiZ0DSB3FZG/zLC1F4rIJ6eBnkESUwB6QBLrab72zRPAZp1lJYDcV0R+6xjJIya95NQ5CbsYHQKCu9zX08ay4jJ4ZR/vWIfWKqaJS8M5QBg0wThvubOI/L2Tk5imlncwC9YDFATEcuVQz7pc73BuMVwFVz50zU5rVT7nSIHlAvhcYE4B8jgRaQkLaxs9nMSUhQsuvtUVi0fMg/nOFXxGKJZzZZ9Bvj9OVhEqgALXmttlv+viPlFEvhF++uIDsFYlVg9IDkVxBRyWT0NJ6ZkTgMMi9LjdvUs0jCsDENiNJ59hbnB/SkxhQILt3qKpewjqJdI+6rXEPDzcsYdm+TxN30aEMHNZ2pF2qPtzEcGpRunR1JHfeB63WFpCDZajS+fZAr4SjYZxDxoHIM8VkU8NWo3vichjBoDEs+sGDTnUDPK8xbIg98KjFAKmXlEzHCBQyAuSX4jIe0TkQyLyTxG5fYG8XxWRpx4pSIh5WMppCXFWPEWfaQVg2udeAOIBCbGYa0Tk19NobiMivxGRexQo8lkRec4RgqR2aColAe5rrAYsFNXDvIvWCsBFADIHEhSfF4sIymhaiNV8V0TuVwDJx5MchR6dZEvihoWfU77z2IZGcflO7wcpcZkRxgLtutMJPcK15EnNxc1XJs7xt0qDyMzPiMhDC7+/X0RePf0/kjOZN7UVkFgiwJO7USKjJ9nYs55aB30HT6kFSrPNWixGQYKogHP8y2jpAZOTjRhOXt4pIm+a/tlDiC2AxEpzsKLjS4DDXPSpAtwQIPGB8xWV6LkJPVpEvu/tzfCnpDL4kEFiiYEoQPA/rXasMltbuCPK9C2AEp1QDS9wGXSOufIKEfnwgXMSS0xG6NmT6BPYt6Gql11cE5lQracnicjXnMN4moh8aQBIWmW9c5jValbitoeeIxJ90gGSlYYDzzow5Z37LS6u8UxoruHHisi3vT1P9dLFbRU3a17RNOfMsu7yABzEcqxQf0pSYl0AABEAQLGI0iQtLEzElPfQlGe5iA2h5F4W7vc8rHUeNg3qdpGHjgAkc4rqHGdrAQeLjws+T+pJx1ACCFylJdMvXcrdXFo5yAMn0/b+DeDQR1JitsQ4aGcNTjLH9WoeU3Y+pxIjnMPKF1WQ5AAhlgUH6OUoKKtXtQLkEyLygg5wlEBimZC17pYGyZweUlpUb/5IOj+vSQ/N4ExsMAUEFiPiqBcgjOfKVoBY5l46WQb/FBHBV1IqKSc5FJCwu0osPI/cRsGBvoGl5AnsKS0BLGKIDHfKSIBc2woQ4jDfmU6IzzGS54nIpycvKx5ZXPPHABIURV2QfD4auY2CA72BhW7xfqZiLwUIgGPTtR4BvaEVIEqUH1Vc7Pz+ZBH5ekK9p4vIF2fQdE8R+fP0+9Y5yVzuLvIfFg/n9BZEE6Azr2OoNJiOB4BQcMJp8pAnyFhq+sZegNBoKQWPg1Z5YI+6bxaRd8xQLR3P1kEyIndDRcIIb6qOB/MUwIwAyE0jAMLxhy+LyJ2m4xJYOP+ZAQFBPcTTrQt1SB9II8M1WW/tzF7FFT0AtqyX2GrSL9xBr3CaEzPW+Pgd9k8bnrs/PO1pRho6nV5D1ctBuvwg6aBB7UtE5I0i8jvHbF4jIu+t1EsTjnqSoFtAQn94JOduN2ansuMhvvfGpXyqLcqog6y7cQFixq8cpMuJNoKDeAZeqjOXHY4Z/aLpoaVAAlsGHF5fBQvBTo1mmKGM8pxH31Brkbr4WLzcRp8rOdE4DuFOa1wLIB4z+SMi8vKFQMIic2Cs96yrtVmiymiuXHqz/pW+JacZIgirx3WFxxoAeaWIfMCi5PQ7ydTPXwAkkbMuzqFfVs2bdpg+WLI+PCBRs7fkEwEg3mOdNy8NkEjkF0L9QEQelVCsJ3Wxloo36rhBDTg9ymjNPPWADQVfTe7UqxoByBAz17ujOA6B9eItEPaRIvKr7IEekEA0CJTK/9brm7zz8Ga05+1ZuSfW4WvEJaJTg4TaPkzBSp3UuosBhEUlZ6SUklgj9Bx3GwUS67C6htrZiYAr6h3VuanjjIPT3mKJPUBOeoGl7Ob6Xg4Q9CK4a+l05WIA4dQd/hFvua0jD3YESJDVNZd57vpuiciW5gvY+GBhlNzq9IM15Tn/6wnq5f6aHCBzsZvFADLnks+JeDcR+asTSb0gYYFqPo/0NFwr57CmoYnDWg9x4DWzecaji+TnfiMAuX4pJfXuIvJBEXmGQTF2D3Z6pPSApNZPGrbfFzgic6zV9QCEZ1MuEgHIdUsBRCdIYjMJzqWCCPplI9UsXSLarKYOqgiKOsOi/bXWtxTVtF29dDA/sD8nYhYHCAN+X3KYSifwcBFBDPWU1vzWvE+974RYTCQi2zP2lmfhtBHHHiDXC2tS83kOIFcvzUGUEER0iexSOC0fTXyuEXQESPTt194cCgA1dxwz5Np2IqU3lrN5gEAHFhMl0bqo3kmzS9V6QaLmrKdfWDxK7pzbmh0KJ8IqQRTqd8sFO4wJ60dp5xljqY4XIM05qa0DW+q5XpBY42QHs9gAnBjOnOVRy3RHPOhldXyn13hpOmN6cyIbSf0x1vis39NcljkRc2EtEWNNYMTv+wJJGo21vJ3MwzorM2Ku0TZSy+9kAaJibNSJM9ojOopnEv+Fx/wFTBG/RnShe+qrh1VN5VLc56g5CCyc9+uNskRUVLDgKLCeO0w9ns6eRe59VkUWYMkBsgP3MYoYFEYcQyN3rirSqa5gLc6WuYeOXfUeOGIOkF264jEBBH0AcRLxDViL3Pp7qsS2trH0c0cNkH0ppC2L1OujaOlzxDNHCxAPOGD3GhZvucbSuwCHCg7mlwNkp7weuoiZi8HgwdQsb33HSvTqBS8wcgsn8txW6h4lQGpJNfm1CS1XL3gXjsgvllLkPK237SXr5QDZZcIdMgepcY/8WME+wbFFJ1grqHKAdN0P0jqIkc/Vjk6kru3oWZfo+Lbu54jM5+gAUkq8TUPgHk9nhIC1uscCkpyeO+54yCKm5BrWs6j4RLjRZ6lEn2MASZ6Zt8PGsQEE04xIpRV/QbEERO4jiA5WE8nucjS3SpU8NfHoAMLCE3+Z4xx6TqV0HgZOkN8i6F2plsPi3raXrMfJPXJcdjQ8Ng4yR0icWEwcWcvkS68zhx78hsnawl2OBSSIm53ZfsgA8Z4OY575GZeSBZQruD0vQMaSOnS/yG6zbR0giAt2vWZetbDa/ER9zX9CLmp6RqbnOMWxcJLNAoSQPd7JXiuEfAd0DhRXFhzA1a57KimZJw+SLXKQNS65nztCcNIg2RpA1gAHYst66WAvSOBOo7P3W8Rt+JktAWTf93T0ekJ7QELfB+lM2xJASpFZvXwFiwDFjzqjMsYQK4AyYm14stjndmkrSMhhUUU9n78eAEfJjszFxU22ApDS/edpVDYSkcWbqhfMQdScoBBRz5i4iJRV8iQojQCJWnCXnFaOwQIWlHuy7617QxzNbcfMLRG99Upr74l3F4EqlXpBgreWRcwLG0Ez5ns4JeDAWiv1EZr3VjhI7rjSjPBaRBbxgEsYlp+nEC4VE+kFSXpSDjAwlwi38Cw0nBSx1sxNtgoQzdJC5yj5QhQEpWOPS76urBcknkXurVO6l83d5lYBoojPwYHSyqKwM2rvbVl6TocAEs/VmUXQLE3MGnI9Jm6eMV667D93l7t3SmfFQwAJ+gi6T6hsBSCW+ZiDo6abtJqRIaJVKre+nWJE3942LIfgZe1sBSBzOzAHR+3mn+iNO16iRuq1vp3C04e+HAjxqgUxC+28Z31QjNHR3GUrAJm7Y4NAm76bDVFUM/+WVE5rBLbeq+temKyi9QIAODA08uSwhOi0NkAiDrA54lpviGxdmJbnRosaOAfAs0xV71sxQnramgCpgQNRATG8731tveq6ZfE9z1j6lKeNtE7E8efNhnOf51kLILXzKmlyj8pXfSdL/rZp5D1u5ZaXAEYXKVofgLfeQZb35V7M6UEPQN2bag2A1CyQLYmJKCDy+pF0yLm+Wu8YsfrX4yHmPJcGSA0cbkSbM9pGBWuBvKNs8l1Mlo119MO19q5K3tkY9Urg6HmXyqBh7aWZUQDpiStZr0J1WTNLAaTk5zjkuzQsVI0CyBUO66U2Fssn4wLfEgApgcOy660F2PrvnLnpTbh26wkVYujd7DVauayjfQOkBA7scP5v2fVbB0FtfKPiMmG3eDYg68WRqwOENxjlRwyOyVKpAWTEK85ci2fsIFwAc/fNu/rYFwcpZaevGUhbihuN4B6tlkvU1F4FIMhdXvGVXjKb5nAstVBr9WPJ/dq48B6j2MJxRzn+LEV5cYCUXOcoo4BleLb1Wggw+rVMy/RxxK3edDwKFGn7lqLs4uijREwNHN5XkG90vUPD8kZyW45bhAYyk22XtrOYH6QEjugryKME2GJ9TwzEG5ntnZ9HF3L5WHo5CN5RrnpKczRGKVm9RFr6eQ9AXHJ/wMCtlAN97ZrZVQ9ASq5zl1wzR3WYFTwAcbH1AdO39A93TkgrQHJwpLf3DJjfQTbhAUg0dN9CCI94cW/kFoCQ9oefQ13JSyhdLYRa+hmPkroEB7Fe6Q5dXPoHFaMAydF57DGVKMgsM3ffaQ0e7uEWL1GA5J2fgts8ChArghpanGDn3ouD3eIlCpDUM7eUNh6k0erVrfgHA9yHHsLmxYNtRZDDGWoREaNHDyDCQd6WswB85l5Pot3DZYjUjiqRW5nCOlAEIKMmdOztWGKG+Xefup9uA4i8gq0pv+QMkPFw9ZwzplfiLwTn0OUihYtlOGOLWe0tzR7cM0C8JI7VsyKpaWskTsFReAYlNk+kwnzmyIfeH9JysUxz8tEZILGF99b2OM28bfXWC1kteWdngPSSv/68x6LZX+8XW+62Ns8A2e8SWUGzffbexTl0YGeA7HOJLra9NEiGxsXOANk/QOhhKXEzPA/nDJBlAEIvONEAiveyl8jIAMbIfNZLfZ8BElmGMXWxcHCN4y/puQEAkxjzmM/ezhidATJm0VtbASx84C7EUUrcBQ8oBccaHzy16TVUrX27nvsf1ZYuuGRplQcAAAAASUVORK5CYII="},function(t,n,e){var r=e(125),i={s:e(127),b:e(128)};t.exports=r(i.s,i.b)},function(t,n,e){t.exports=e(38)("native-function-to-string",Function.toString)},function(t,n,e){"use strict";var r=e(8),i=e(33),o=e(51),a=e(41),u=e(29),s=e(47),c=Object.assign;t.exports=!c||e(5)((function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach((function(t){n[t]=t})),7!=c({},t)[e]||Object.keys(c({},n)).join("")!=r}))?function(t,n){for(var e=u(t),c=arguments.length,l=1,f=o.f,p=a.f;c>l;)for(var h,m=s(arguments[l++]),d=f?i(m).concat(f(m)):i(m),g=d.length,v=0;g>v;)h=d[v++],r&&!p.call(m,h)||(e[h]=m[h]);return e}:c},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n,e){var r=e(27),i=e(92),o=e(93),a=e(4),u=e(20),s=e(94),c={},l={};(n=t.exports=function(t,n,e,f,p){var h,m,d,g,v=p?function(){return t}:s(t),x=r(e,f,n?2:1),y=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(o(v)){for(h=u(t.length);h>y;y++)if((g=n?x(a(m=t[y])[0],m[1]):x(t[y]))===c||g===l)return g}else for(d=v.call(t);!(m=d.next()).done;)if((g=i(d,x,m.value,n))===c||g===l)return g}).BREAK=c,n.RETURN=l},function(t,n,e){var r=e(4);t.exports=function(t,n,e,i){try{return i?n(r(e)[0],e[1]):n(e)}catch(n){var o=t.return;throw void 0!==o&&r(o.call(t)),n}}},function(t,n,e){var r=e(34),i=e(0)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,n,e){var r=e(42),i=e(0)("iterator"),o=e(34);t.exports=e(26).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,n){t.exports=function(t,n,e){var r=void 0===e;switch(n.length){case 0:return r?t():t.call(e);case 1:return r?t(n[0]):t.call(e,n[0]);case 2:return r?t(n[0],n[1]):t.call(e,n[0],n[1]);case 3:return r?t(n[0],n[1],n[2]):t.call(e,n[0],n[1],n[2]);case 4:return r?t(n[0],n[1],n[2],n[3]):t.call(e,n[0],n[1],n[2],n[3])}return t.apply(e,n)}},function(t,n,e){var r=e(2),i=e(70).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,s="process"==e(19)(a);t.exports=function(){var t,n,e,c=function(){var r,i;for(s&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?e():n=void 0,r}}n=void 0,r&&r.enter()};if(s)e=function(){a.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var l=u.resolve(void 0);e=function(){l.then(c)}}else e=function(){i.call(r,c)};else{var f=!0,p=document.createTextNode("");new o(c).observe(p,{characterData:!0}),e=function(){p.data=f=!f}}return function(r){var i={fn:r,next:void 0};n&&(n.next=i),t||(t=i,e()),n=i}}},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,e){var r=e(2).navigator;t.exports=r&&r.userAgent||""},function(t,n,e){var r=e(4),i=e(7),o=e(71);t.exports=function(t,n){if(r(t),i(n)&&n.constructor===t)return n;var e=o.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){var r=e(15);t.exports=function(t,n,e){for(var i in n)r(t,i,n[i],e);return t}},function(t,n,e){"use strict";var r=e(2),i=e(14),o=e(8),a=e(0)("species");t.exports=function(t){var n=r[t];o&&n&&!n[a]&&i.f(n,a,{configurable:!0,get:function(){return this}})}},function(t,n,e){var r=e(0)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:e=!0}},o[r]=function(){return a},t(o)}catch(t){}return e}},function(t,n,e){var r=e(31)("meta"),i=e(7),o=e(18),a=e(14).f,u=0,s=Object.isExtensible||function(){return!0},c=!e(5)((function(){return s(Object.preventExtensions({}))})),l=function(t){a(t,r,{value:{i:"O"+ ++u,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,n){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!s(t))return"F";if(!n)return"E";l(t)}return t[r].i},getWeak:function(t,n){if(!o(t,r)){if(!s(t))return!0;if(!n)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&f.NEED&&s(t)&&!o(t,r)&&l(t),t}}},function(t,n,e){var r=e(2),i=e(26),o=e(32),a=e(72),u=e(14).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||u(n,t,{value:a.f(t)})}},function(t,n,e){var r=e(33),i=e(51),o=e(41);t.exports=function(t){var n=r(t),e=i.f;if(e)for(var a,u=e(t),s=o.f,c=0;u.length>c;)s.call(t,a=u[c++])&&n.push(a);return n}},function(t,n,e){var r=e(14),i=e(4),o=e(33);t.exports=e(8)?Object.defineProperties:function(t,n){i(t);for(var e,a=o(n),u=a.length,s=0;u>s;)r.f(t,e=a[s++],n[e]);return t}},function(t,n,e){var r=e(28),i=e(54).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,n,e){"use strict";var r=e(53),i=e(37),o=e(43),a={};e(17)(a,e(0)("iterator"),(function(){return this})),t.exports=function(t,n,e){t.prototype=r(a,{next:i(1,e)}),o(t,n+" Iterator")}},function(t,n,e){var r=e(18),i=e(29),o=e(49)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){"use strict";var r=e(59);e(3)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,n,e){var r=e(7),i=e(113).set;t.exports=function(t,n,e){var o,a=n.constructor;return a!==e&&"function"==typeof a&&(o=a.prototype)!==e.prototype&&r(o)&&i&&i(t,o),t}},function(t,n,e){var r=e(7),i=e(4),o=function(t,n){if(i(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=e(27)(Function.call,e(55).f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},function(t,n,e){var r=e(3),i=e(23),o=e(5),a=e(115),u="["+a+"]",s=RegExp("^"+u+u+"*"),c=RegExp(u+u+"*$"),l=function(t,n,e){var i={},u=o((function(){return!!a[t]()||"
"!="
"[t]()})),s=i[t]=u?n(f):a[t];e&&(i[e]=s),r(r.P+r.F*u,"String",i)},f=l.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(s,"")),2&n&&(t=t.replace(c,"")),t};t.exports=l},function(t,n){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,n,e){e(8)&&"g"!=/./g.flags&&e(14).f(RegExp.prototype,"flags",{configurable:!0,get:e(60)})},function(t,n,e){"use strict";e(118)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,n,e){var r=e(3),i=e(5),o=e(23),a=/"/g,u=function(t,n,e,r){var i=String(o(t)),u="<"+n;return""!==e&&(u+=" "+e+'="'+String(r).replace(a,""")+'"'),u+">"+i+"</"+n+">"};t.exports=function(t,n){var e={};e[t]=n(u),r(r.P+r.F*i((function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3})),"String",e)}},function(t,n,e){var r=e(3);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,e){var r=e(77),i=e(23);t.exports=function(t,n,e){if(r(n))throw TypeError("String#"+e+" doesn't accept regex!");return String(i(t))}},function(t,n,e){var r=e(0)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,e){"use strict";var r=e(3),i=e(79)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(44)("find")},function(t,n,e){var r=e(124);t.exports=function(t,n){return new(r(t))(n)}},function(t,n,e){var r=e(7),i=e(73),o=e(0)("species");t.exports=function(t){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&null===(n=n[o])&&(n=void 0)),void 0===n?Array:n}},function(t,n,e){var r=e(126),i=e(80);t.exports=function(t,n){return{encodeS:function(n,e){return e=i.extend({ww:!0,tenMin:!0},e),r.CL.call(t,n,e)},encodeB:function(t,e){return e=i.extend({ww:!0},e),r.CL.call(n,t,e)},decodeS:function(){return r.unCL.apply(t,arguments)},decodeB:function(){return r.unCL.apply(n,arguments)},toMoney:function(t,e){return e=i.extend({ww:!0},e),r.toMoney.call(n,t,e)}}}},function(t,n,e){var r=e(80);function i(t,n){var e=r.getNumbResult(t);if(!e)return t;n=n||{};var i=this.ch,o=this.ch_u,a=this.ch_f||"",u=this.ch_d||".",s=i.charAt(0),c=e.int,l=e.decimal,f="",p="",h=e.minus?a:"";if(l){l=r.clearZero(l,"0","$");for(var m=0;m<l.length;m++)p+=i.charAt(+l.charAt(m));p=p?u+p:""}if(f=function t(e,a,u){e=r.getNumbResult(e).int;var c="",l=arguments.length>1?arguments[1]:n.tenMin,f=e.length;if(1==f)return i.charAt(+e);if(f<=4)for(var p=0,h=f;h--;){var m=+e.charAt(p);c+=l&&2==f&&0==p&&1==m?"":i.charAt(m),c+=m&&h?o.charAt(h):"",p++}else{for(var d=e.length/4>>0,g=e.length%4;0==g||!o.charAt(3+d);)g+=4,d--;var v=e.substr(0,g),x=e.substr(g);c=t(v,l)+o.charAt(3+d)+("0"==x.charAt(0)?s:"")+t(x,x.length>4&&l)}return c=r.clearZero(c,s)}(c),n.ww&&o.length>5){var d=o.charAt(4),g=o.charAt(5),v=f.lastIndexOf(g);~v&&(f=f.substring(0,v).replace(new RegExp(g,"g"),d+d)+f.substring(v))}return h+f+p}t.exports={CL:i,unCL:function(t){for(var n=(t=t.toString()).split(this.ch_d),e=n[0].replace(this.ch_f,""),i=n[1],o=!!~n[0].indexOf(this.ch_f),a=this.ch_u.charAt(1),u=this.ch_u.charAt(4),s=this.ch_u.charAt(5),c=(e=e.replace(new RegExp(u+"{2}","g"),s)).split(""),l=0,f=0,p=[],h=[],m=[],d=0;d<c.length;d++){var g,v=c[d],x=0;if(~(g=this.ch.indexOf(v)))g>0&&m.unshift(g);else if(~(x=this.ch_u.indexOf(v))){var y=r.getDigit(x);l>x?(r.unshiftZero(m,y),r.centerArray(h,m)):x>=f?(0==d&&(m=[1]),r.centerArray(p,h,m),p.length>0&&r.unshiftZero(p,y),f=x):(0==m.length&&a==v&&(m=[1]),r.centerArray(h,m),r.unshiftZero(h,r.getDigit(x)),l=x)}}r.centerArray(p,h,m).reverse(),0==p.length&&p.push(0);var S=0;if(i){p.push("."),S="0.";for(d=0;d<i.length;d++)S+=this.ch.indexOf(i.charAt(d)),p.push(this.ch.indexOf(i.charAt(d)));S=+S}return o&&p.unshift("-"),parseFloat(p.join(""))},toMoney:function(t,n){var e=r.getNumbResult(t),o=this.ch.charAt(0);if(n="object"==typeof n?n:{},!e)return t;n=r.extend({ww:!0,complete:!1,outSymbol:!0},n);var a=e.num,u=e.decimal||"",s=n.outSymbol?this.m_t:"",c=u?"":this.m_z,l="";if(n.complete){for(var f=1;f<this.m_u.length;f++)l+=i.call(this,u.charAt(f-1)||"0")+this.m_u.charAt(f);c=i.call(this,a,n)+this.m_u.charAt(0)}else{if(u=u.substr(0,this.m_u.length-1),u=r.clearZero(u,"0","$")){var p;for(f=0;f<this.m_u.length-1;f++)u.charAt(f)&&"0"!=u.charAt(f)&&(l+=i.call(this,u.charAt(f))+this.m_u.charAt(f+1),p=!1),"0"!==u.charAt(f)||p||(0==f&&"0"==a||(l+=o),p=!0)}"0"==a&&!c&&l||(c=i.call(this,a,n)+this.m_u.charAt(0)+c)}return s+c+l}}},function(t,n){t.exports={ch:"零一二三四五六七八九",ch_u:"个十百千万亿",ch_f:"负",ch_d:"点"}},function(t,n){t.exports={ch:"零壹贰叁肆伍陆柒捌玖",ch_u:"个拾佰仟万亿",ch_f:"负",ch_d:"点",m_t:"人民币",m_z:"整",m_u:"元角分"}},function(t,n){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},function(t,n,e){var r=e(30),i=e(24),o=e(64),a=e(131),u=e(132),s=e(133),c=e(134),l=e(135),f=e(81),p=e(136),h=e(144),m=e(145),d=e(25),g=e(146),v=e(63);function x(t,n,e){var r,i,o=t.size,a=m.getEncodedBits(n,e);for(r=0;r<15;r++)i=1==(a>>r&1),r<6?t.set(r,8,i,!0):r<8?t.set(r+1,8,i,!0):t.set(o-15+r,8,i,!0),r<8?t.set(8,o-r-1,i,!0):r<9?t.set(8,15-r-1+1,i,!0):t.set(8,15-r-1,i,!0);t.set(o-8,8,1,!0)}function y(t,n,e){var o=new a;e.forEach((function(n){o.put(n.mode.bit,4),o.put(n.getLength(),d.getCharCountIndicator(n.mode,t)),n.write(o)}));var u=8*(i.getSymbolTotalCodewords(t)-f.getTotalCodewordsCount(t,n));for(o.getLengthInBits()+4<=u&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);for(var s=(u-o.getLengthInBits())/8,c=0;c<s;c++)o.put(c%2?17:236,8);return function(t,n,e){for(var o=i.getSymbolTotalCodewords(n),a=f.getTotalCodewordsCount(n,e),u=o-a,s=f.getBlocksCount(n,e),c=s-o%s,l=Math.floor(o/s),h=Math.floor(u/s),m=h+1,d=l-h,g=new p(d),v=0,x=new Array(s),y=new Array(s),S=0,b=r.from(t.buffer),w=0;w<s;w++){var A=w<c?h:m;x[w]=b.slice(v,v+A),y[w]=g.encode(x[w]),v+=A,S=Math.max(S,A)}var T,E,P=r.alloc(o),N=0;for(T=0;T<S;T++)for(E=0;E<s;E++)T<x[E].length&&(P[N++]=x[E][T]);for(T=0;T<d;T++)for(E=0;E<s;E++)P[N++]=y[E][T];return P}(o,t,n)}function S(t,n,e,r){var o;if(v(t))o=g.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");var a=n;if(!a){var f=g.rawSplit(t);a=h.getBestVersionForData(f,e)}o=g.fromString(t,a||40)}var p=h.getBestVersionForData(o,e);if(!p)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<p)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+p+".\n")}else n=p;var m=y(n,e,o),d=i.getSymbolSize(n),S=new u(d);return function(t,n){for(var e=t.size,r=c.getPositions(n),i=0;i<r.length;i++)for(var o=r[i][0],a=r[i][1],u=-1;u<=7;u++)if(!(o+u<=-1||e<=o+u))for(var s=-1;s<=7;s++)a+s<=-1||e<=a+s||(u>=0&&u<=6&&(0===s||6===s)||s>=0&&s<=6&&(0===u||6===u)||u>=2&&u<=4&&s>=2&&s<=4?t.set(o+u,a+s,!0,!0):t.set(o+u,a+s,!1,!0))}(S,n),function(t){for(var n=t.size,e=8;e<n-8;e++){var r=e%2==0;t.set(e,6,r,!0),t.set(6,e,r,!0)}}(S),function(t,n){for(var e=s.getPositions(n),r=0;r<e.length;r++)for(var i=e[r][0],o=e[r][1],a=-2;a<=2;a++)for(var u=-2;u<=2;u++)-2===a||2===a||-2===u||2===u||0===a&&0===u?t.set(i+a,o+u,!0,!0):t.set(i+a,o+u,!1,!0)}(S,n),x(S,e,0),n>=7&&function(t,n){for(var e,r,i,o=t.size,a=h.getEncodedBits(n),u=0;u<18;u++)e=Math.floor(u/3),r=u%3+o-8-3,i=1==(a>>u&1),t.set(e,r,i,!0),t.set(r,e,i,!0)}(S,n),function(t,n){for(var e=t.size,r=-1,i=e-1,o=7,a=0,u=e-1;u>0;u-=2)for(6===u&&u--;;){for(var s=0;s<2;s++)if(!t.isReserved(i,u-s)){var c=!1;a<n.length&&(c=1==(n[a]>>>o&1)),t.set(i,u-s,c),-1===--o&&(a++,o=7)}if((i+=r)<0||e<=i){i-=r,r=-r;break}}}(S,m),isNaN(r)&&(r=l.getBestMask(S,x.bind(null,S,e))),l.applyMask(r,S),x(S,e,r),{modules:S,version:n,errorCorrectionLevel:e,maskPattern:r,segments:o}}n.create=function(t,n){if(void 0===t||""===t)throw new Error("No input text");var e,r,a=o.M;return void 0!==n&&(a=o.from(n.errorCorrectionLevel,o.M),e=h.from(n.version),r=l.from(n.maskPattern),n.toSJISFunc&&i.setToSJISFunction(n.toSJISFunc)),S(t,e,a,r)}},function(t,n){function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){var n=Math.floor(t/8);return 1==(this.buffer[n]>>>7-t%8&1)},put:function(t,n){for(var e=0;e<n;e++)this.putBit(1==(t>>>n-e-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},t.exports=e},function(t,n,e){var r=e(30);function i(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=r.alloc(t*t),this.reservedBit=r.alloc(t*t)}i.prototype.set=function(t,n,e,r){var i=t*this.size+n;this.data[i]=e,r&&(this.reservedBit[i]=!0)},i.prototype.get=function(t,n){return this.data[t*this.size+n]},i.prototype.xor=function(t,n,e){this.data[t*this.size+n]^=e},i.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},t.exports=i},function(t,n,e){var r=e(24).getSymbolSize;n.getRowColCoords=function(t){if(1===t)return[];for(var n=Math.floor(t/7)+2,e=r(t),i=145===e?26:2*Math.ceil((e-13)/(2*n-2)),o=[e-7],a=1;a<n-1;a++)o[a]=o[a-1]-i;return o.push(6),o.reverse()},n.getPositions=function(t){for(var e=[],r=n.getRowColCoords(t),i=r.length,o=0;o<i;o++)for(var a=0;a<i;a++)0===o&&0===a||0===o&&a===i-1||o===i-1&&0===a||e.push([r[o],r[a]]);return e}},function(t,n,e){var r=e(24).getSymbolSize;n.getPositions=function(t){var n=r(t);return[[0,0],[n-7,0],[0,n-7]]}},function(t,n){n.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e=3,r=3,i=40,o=10;function a(t,e,r){switch(t){case n.Patterns.PATTERN000:return(e+r)%2==0;case n.Patterns.PATTERN001:return e%2==0;case n.Patterns.PATTERN010:return r%3==0;case n.Patterns.PATTERN011:return(e+r)%3==0;case n.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case n.Patterns.PATTERN101:return e*r%2+e*r%3==0;case n.Patterns.PATTERN110:return(e*r%2+e*r%3)%2==0;case n.Patterns.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}n.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},n.from=function(t){return n.isValid(t)?parseInt(t,10):void 0},n.getPenaltyN1=function(t){for(var n=t.size,r=0,i=0,o=0,a=null,u=null,s=0;s<n;s++){i=o=0,a=u=null;for(var c=0;c<n;c++){var l=t.get(s,c);l===a?i++:(i>=5&&(r+=e+(i-5)),a=l,i=1),(l=t.get(c,s))===u?o++:(o>=5&&(r+=e+(o-5)),u=l,o=1)}i>=5&&(r+=e+(i-5)),o>=5&&(r+=e+(o-5))}return r},n.getPenaltyN2=function(t){for(var n=t.size,e=0,i=0;i<n-1;i++)for(var o=0;o<n-1;o++){var a=t.get(i,o)+t.get(i,o+1)+t.get(i+1,o)+t.get(i+1,o+1);4!==a&&0!==a||e++}return e*r},n.getPenaltyN3=function(t){for(var n=t.size,e=0,r=0,o=0,a=0;a<n;a++){r=o=0;for(var u=0;u<n;u++)r=r<<1&2047|t.get(a,u),u>=10&&(1488===r||93===r)&&e++,o=o<<1&2047|t.get(u,a),u>=10&&(1488===o||93===o)&&e++}return e*i},n.getPenaltyN4=function(t){for(var n=0,e=t.data.length,r=0;r<e;r++)n+=t.data[r];return Math.abs(Math.ceil(100*n/e/5)-10)*o},n.applyMask=function(t,n){for(var e=n.size,r=0;r<e;r++)for(var i=0;i<e;i++)n.isReserved(i,r)||n.xor(i,r,a(t,i,r))},n.getBestMask=function(t,e){for(var r=Object.keys(n.Patterns).length,i=0,o=1/0,a=0;a<r;a++){e(a),n.applyMask(a,t);var u=n.getPenaltyN1(t)+n.getPenaltyN2(t)+n.getPenaltyN3(t)+n.getPenaltyN4(t);n.applyMask(a,t),u<o&&(o=u,i=a)}return i}},function(t,n,e){var r=e(30),i=e(137),o=e(139).Buffer;function a(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}a.prototype.initialize=function(t){this.degree=t,this.genPoly=i.generateECPolynomial(this.degree)},a.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var n=r.alloc(this.degree),e=o.concat([t,n],t.length+this.degree),a=i.mod(e,this.genPoly),u=this.degree-a.length;if(u>0){var s=r.alloc(this.degree);return a.copy(s,u),s}return a},t.exports=a},function(t,n,e){var r=e(30),i=e(138);n.mul=function(t,n){for(var e=r.alloc(t.length+n.length-1),o=0;o<t.length;o++)for(var a=0;a<n.length;a++)e[o+a]^=i.mul(t[o],n[a]);return e},n.mod=function(t,n){for(var e=r.from(t);e.length-n.length>=0;){for(var o=e[0],a=0;a<n.length;a++)e[a]^=i.mul(n[a],o);for(var u=0;u<e.length&&0===e[u];)u++;e=e.slice(u)}return e},n.generateECPolynomial=function(t){for(var e=r.from([1]),o=0;o<t;o++)e=n.mul(e,[1,i.exp(o)]);return e}},function(t,n,e){var r=e(30),i=r.alloc(512),o=r.alloc(256);!function(){for(var t=1,n=0;n<255;n++)i[n]=t,o[t]=n,256&(t<<=1)&&(t^=285);for(n=255;n<512;n++)i[n]=i[n-255]}(),n.log=function(t){if(t<1)throw new Error("log("+t+")");return o[t]},n.exp=function(t){return i[t]},n.mul=function(t,n){return 0===t||0===n?0:i[o[t]+o[n]]}},function(t,n,e){"use strict";(function(t){
|
|
2
2
|
/*!
|
|
3
3
|
* The buffer module from node.js, for the browser.
|
|
4
4
|
*
|
|
5
5
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/
|
|
8
|
-
var r=e(140),i=e(141),o=e(142);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,n){if(a()<n)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(n)).__proto__=s.prototype:(null===t&&(t=new s(n)),t.length=n),t}function s(t,n,e){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,n,e);if("number"==typeof t){if("string"==typeof n)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return c(this,t,n,e)}function c(t,n,e,r){if("number"==typeof n)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer?function(t,n,e,r){if(n.byteLength,e<0||n.byteLength<e)throw new RangeError("'offset' is out of bounds");if(n.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");n=void 0===e&&void 0===r?new Uint8Array(n):void 0===r?new Uint8Array(n,e):new Uint8Array(n,e,r);s.TYPED_ARRAY_SUPPORT?(t=n).__proto__=s.prototype:t=p(t,n);return t}(t,n,e,r):"string"==typeof n?function(t,n,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(n,e),i=(t=u(t,r)).write(n,e);i!==r&&(t=t.slice(0,i));return t}(t,n,e):function(t,n){if(s.isBuffer(n)){var e=0|h(n.length);return 0===(t=u(t,e)).length||n.copy(t,0,0,e),t}if(n){if("undefined"!=typeof ArrayBuffer&&n.buffer instanceof ArrayBuffer||"length"in n)return"number"!=typeof n.length||(r=n.length)!=r?u(t,0):p(t,n);if("Buffer"===n.type&&o(n.data))return p(t,n.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,n)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,n){if(l(n),t=u(t,n<0?0:0|h(n)),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<n;++e)t[e]=0;return t}function p(t,n){var e=n.length<0?0:0|h(n.length);t=u(t,e);for(var r=0;r<e;r+=1)t[r]=255&n[r];return t}function h(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,n){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var r=!1;;)switch(n){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return W(t).length;default:if(r)return F(t).length;n=(""+n).toLowerCase(),r=!0}}function m(t,n,e){var r=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(n>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,n,e);case"utf8":case"utf-8":return P(this,n,e);case"ascii":return C(this,n,e);case"latin1":case"binary":return N(this,n,e);case"base64":return E(this,n,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,n,e);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function v(t,n,e,r,i){if(0===t.length)return-1;if("string"==typeof e?(r=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof n&&(n=s.from(n,r)),s.isBuffer(n))return 0===n.length?-1:x(t,n,e,r,i);if("number"==typeof n)return n&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,n,e):Uint8Array.prototype.lastIndexOf.call(t,n,e):x(t,[n],e,r,i);throw new TypeError("val must be string, number or Buffer")}function x(t,n,e,r,i){var o,a=1,u=t.length,s=n.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||n.length<2)return-1;a=2,u/=2,s/=2,e/=2}function c(t,n){return 1===a?t[n]:t.readUInt16BE(n*a)}if(i){var l=-1;for(o=e;o<u;o++)if(c(t,o)===c(n,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===s)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(e+s>u&&(e=u-s),o=e;o>=0;o--){for(var f=!0,p=0;p<s;p++)if(c(t,o+p)!==c(n,p)){f=!1;break}if(f)return o}return-1}function y(t,n,e,r){e=Number(e)||0;var i=t.length-e;r?(r=Number(r))>i&&(r=i):r=i;var o=n.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var u=parseInt(n.substr(2*a,2),16);if(isNaN(u))return a;t[e+a]=u}return a}function S(t,n,e,r){return j(F(n,t.length-e),t,e,r)}function b(t,n,e,r){return j(function(t){for(var n=[],e=0;e<t.length;++e)n.push(255&t.charCodeAt(e));return n}(n),t,e,r)}function w(t,n,e,r){return b(t,n,e,r)}function A(t,n,e,r){return j(W(n),t,e,r)}function T(t,n,e,r){return j(function(t,n){for(var e,r,i,o=[],a=0;a<t.length&&!((n-=2)<0);++a)e=t.charCodeAt(a),r=e>>8,i=e%256,o.push(i),o.push(r);return o}(n,t.length-e),t,e,r)}function E(t,n,e){return 0===n&&e===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(n,e))}function P(t,n,e){e=Math.min(t.length,e);for(var r=[],i=n;i<e;){var o,a,u,s,c=t[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=e)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(l=s);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(s=(15&c)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(l=s)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(t){var n=t.length;if(n<=4096)return String.fromCharCode.apply(String,t);var e="",r=0;for(;r<n;)e+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return e}(r)}n.Buffer=s,n.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},n.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),n.kMaxLength=a(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,n,e){return c(null,t,n,e)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,n,e){return function(t,n,e,r){return l(n),n<=0?u(t,n):void 0!==e?"string"==typeof r?u(t,n).fill(e,r):u(t,n).fill(e):u(t,n)}(null,t,n,e)},s.allocUnsafe=function(t){return f(null,t)},s.allocUnsafeSlow=function(t){return f(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,n){if(!s.isBuffer(t)||!s.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var e=t.length,r=n.length,i=0,o=Math.min(e,r);i<o;++i)if(t[i]!==n[i]){e=t[i],r=n[i];break}return e<r?-1:r<e?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,n){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var e;if(void 0===n)for(n=0,e=0;e<t.length;++e)n+=t[e].length;var r=s.allocUnsafe(n),i=0;for(e=0;e<t.length;++e){var a=t[e];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<t;n+=2)g(this,n,n+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<t;n+=4)g(this,n,n+3),g(this,n+1,n+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<t;n+=8)g(this,n,n+7),g(this,n+1,n+6),g(this,n+2,n+5),g(this,n+3,n+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):m.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,n,e,r,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===e&&(e=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),n<0||e>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&n>=e)return 0;if(r>=i)return-1;if(n>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(e>>>=0)-(n>>>=0),u=Math.min(o,a),c=this.slice(r,i),l=t.slice(n,e),f=0;f<u;++f)if(c[f]!==l[f]){o=c[f],a=l[f];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,n,e){return-1!==this.indexOf(t,n,e)},s.prototype.indexOf=function(t,n,e){return v(this,t,n,e,!0)},s.prototype.lastIndexOf=function(t,n,e){return v(this,t,n,e,!1)},s.prototype.write=function(t,n,e,r){if(void 0===n)r="utf8",e=this.length,n=0;else if(void 0===e&&"string"==typeof n)r=n,e=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n|=0,isFinite(e)?(e|=0,void 0===r&&(r="utf8")):(r=e,e=void 0)}var i=this.length-n;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,t,n,e);case"utf8":case"utf-8":return S(this,t,n,e);case"ascii":return b(this,t,n,e);case"latin1":case"binary":return w(this,t,n,e);case"base64":return A(this,t,n,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n,e);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(t,n,e){var r="";e=Math.min(t.length,e);for(var i=n;i<e;++i)r+=String.fromCharCode(127&t[i]);return r}function N(t,n,e){var r="";e=Math.min(t.length,e);for(var i=n;i<e;++i)r+=String.fromCharCode(t[i]);return r}function R(t,n,e){var r=t.length;(!n||n<0)&&(n=0),(!e||e<0||e>r)&&(e=r);for(var i="",o=n;o<e;++o)i+=k(t[o]);return i}function I(t,n,e){for(var r=t.slice(n,e),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function Y(t,n,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+n>e)throw new RangeError("Trying to access beyond buffer length")}function _(t,n,e,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>i||n<o)throw new RangeError('"value" argument is out of bounds');if(e+r>t.length)throw new RangeError("Index out of range")}function O(t,n,e,r){n<0&&(n=65535+n+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(n&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function B(t,n,e,r){n<0&&(n=4294967295+n+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=n>>>8*(r?i:3-i)&255}function L(t,n,e,r,i,o){if(e+r>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function M(t,n,e,r,o){return o||L(t,0,e,4),i.write(t,n,e,r,23,4),e+4}function X(t,n,e,r,o){return o||L(t,0,e,8),i.write(t,n,e,r,52,8),e+8}s.prototype.slice=function(t,n){var e,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n<t&&(n=t),s.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,n)).__proto__=s.prototype;else{var i=n-t;e=new s(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},s.prototype.readUIntLE=function(t,n,e){t|=0,n|=0,e||Y(t,n,this.length);for(var r=this[t],i=1,o=0;++o<n&&(i*=256);)r+=this[t+o]*i;return r},s.prototype.readUIntBE=function(t,n,e){t|=0,n|=0,e||Y(t,n,this.length);for(var r=this[t+--n],i=1;n>0&&(i*=256);)r+=this[t+--n]*i;return r},s.prototype.readUInt8=function(t,n){return n||Y(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,n){return n||Y(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,n){return n||Y(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,n){return n||Y(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,n){return n||Y(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,n,e){t|=0,n|=0,e||Y(t,n,this.length);for(var r=this[t],i=1,o=0;++o<n&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*n)),r},s.prototype.readIntBE=function(t,n,e){t|=0,n|=0,e||Y(t,n,this.length);for(var r=n,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*n)),o},s.prototype.readInt8=function(t,n){return n||Y(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,n){n||Y(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt16BE=function(t,n){n||Y(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt32LE=function(t,n){return n||Y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,n){return n||Y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,n){return n||Y(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,n){return n||Y(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,n){return n||Y(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,n){return n||Y(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,n,e,r){(t=+t,n|=0,e|=0,r)||_(this,t,n,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[n]=255&t;++o<e&&(i*=256);)this[n+o]=t/i&255;return n+e},s.prototype.writeUIntBE=function(t,n,e,r){(t=+t,n|=0,e|=0,r)||_(this,t,n,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[n+i]=255&t;--i>=0&&(o*=256);)this[n+i]=t/o&255;return n+e},s.prototype.writeUInt8=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=255&t,n+1},s.prototype.writeUInt16LE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):O(this,t,n,!0),n+2},s.prototype.writeUInt16BE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):O(this,t,n,!1),n+2},s.prototype.writeUInt32LE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t):B(this,t,n,!0),n+4},s.prototype.writeUInt32BE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):B(this,t,n,!1),n+4},s.prototype.writeIntLE=function(t,n,e,r){if(t=+t,n|=0,!r){var i=Math.pow(2,8*e-1);_(this,t,n,e,i-1,-i)}var o=0,a=1,u=0;for(this[n]=255&t;++o<e&&(a*=256);)t<0&&0===u&&0!==this[n+o-1]&&(u=1),this[n+o]=(t/a>>0)-u&255;return n+e},s.prototype.writeIntBE=function(t,n,e,r){if(t=+t,n|=0,!r){var i=Math.pow(2,8*e-1);_(this,t,n,e,i-1,-i)}var o=e-1,a=1,u=0;for(this[n+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[n+o+1]&&(u=1),this[n+o]=(t/a>>0)-u&255;return n+e},s.prototype.writeInt8=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[n]=255&t,n+1},s.prototype.writeInt16LE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):O(this,t,n,!0),n+2},s.prototype.writeInt16BE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):O(this,t,n,!1),n+2},s.prototype.writeInt32LE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):B(this,t,n,!0),n+4},s.prototype.writeInt32BE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):B(this,t,n,!1),n+4},s.prototype.writeFloatLE=function(t,n,e){return M(this,t,n,!0,e)},s.prototype.writeFloatBE=function(t,n,e){return M(this,t,n,!1,e)},s.prototype.writeDoubleLE=function(t,n,e){return X(this,t,n,!0,e)},s.prototype.writeDoubleBE=function(t,n,e){return X(this,t,n,!1,e)},s.prototype.copy=function(t,n,e,r){if(e||(e=0),r||0===r||(r=this.length),n>=t.length&&(n=t.length),n||(n=0),r>0&&r<e&&(r=e),r===e)return 0;if(0===t.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-n<r-e&&(r=t.length-n+e);var i,o=r-e;if(this===t&&e<n&&n<r)for(i=o-1;i>=0;--i)t[i+n]=this[i+e];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+n]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),n);return o},s.prototype.fill=function(t,n,e,r){if("string"==typeof t){if("string"==typeof n?(r=n,n=0,e=this.length):"string"==typeof e&&(r=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(n<0||this.length<n||this.length<e)throw new RangeError("Out of range index");if(e<=n)return this;var o;if(n>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=n;o<e;++o)this[o]=t;else{var a=s.isBuffer(t)?t:F(new s(t,r).toString()),u=a.length;for(o=0;o<e-n;++o)this[o+n]=a[o%u]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function k(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,n){var e;n=n||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((e=t.charCodeAt(a))>55295&&e<57344){if(!i){if(e>56319){(n-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(n-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(n-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(n-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((n-=1)<0)break;o.push(e)}else if(e<2048){if((n-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((n-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function W(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,n,e,r){for(var i=0;i<r&&!(i+e>=n.length||i>=t.length);++i)n[i+e]=t[i];return i}}).call(this,e(139))},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){"use strict";n.byteLength=function(t){var n=c(t),e=n[0],r=n[1];return 3*(e+r)/4-r},n.toByteArray=function(t){var n,e,r=c(t),a=r[0],u=r[1],s=new o(function(t,n,e){return 3*(n+e)/4-e}(0,a,u)),l=0,f=u>0?a-4:a;for(e=0;e<f;e+=4)n=i[t.charCodeAt(e)]<<18|i[t.charCodeAt(e+1)]<<12|i[t.charCodeAt(e+2)]<<6|i[t.charCodeAt(e+3)],s[l++]=n>>16&255,s[l++]=n>>8&255,s[l++]=255&n;2===u&&(n=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4,s[l++]=255&n);1===u&&(n=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2,s[l++]=n>>8&255,s[l++]=255&n);return s},n.fromByteArray=function(t){for(var n,e=t.length,i=e%3,o=[],a=0,u=e-i;a<u;a+=16383)o.push(l(t,a,a+16383>u?u:a+16383));1===i?(n=t[e-1],o.push(r[n>>2]+r[n<<4&63]+"==")):2===i&&(n=(t[e-2]<<8)+t[e-1],o.push(r[n>>10]+r[n>>4&63]+r[n<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=a.length;u<s;++u)r[u]=a[u],i[a.charCodeAt(u)]=u;function c(t){var n=t.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=n),[e,e===n?0:4-e%4]}function l(t,n,e){for(var i,o,a=[],u=n;u<e;u+=3)i=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,n){
|
|
8
|
+
var r=e(141),i=e(142),o=e(143);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,n){if(a()<n)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(n)).__proto__=s.prototype:(null===t&&(t=new s(n)),t.length=n),t}function s(t,n,e){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,n,e);if("number"==typeof t){if("string"==typeof n)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return c(this,t,n,e)}function c(t,n,e,r){if("number"==typeof n)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer?function(t,n,e,r){if(n.byteLength,e<0||n.byteLength<e)throw new RangeError("'offset' is out of bounds");if(n.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");n=void 0===e&&void 0===r?new Uint8Array(n):void 0===r?new Uint8Array(n,e):new Uint8Array(n,e,r);s.TYPED_ARRAY_SUPPORT?(t=n).__proto__=s.prototype:t=p(t,n);return t}(t,n,e,r):"string"==typeof n?function(t,n,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(n,e),i=(t=u(t,r)).write(n,e);i!==r&&(t=t.slice(0,i));return t}(t,n,e):function(t,n){if(s.isBuffer(n)){var e=0|h(n.length);return 0===(t=u(t,e)).length||n.copy(t,0,0,e),t}if(n){if("undefined"!=typeof ArrayBuffer&&n.buffer instanceof ArrayBuffer||"length"in n)return"number"!=typeof n.length||(r=n.length)!=r?u(t,0):p(t,n);if("Buffer"===n.type&&o(n.data))return p(t,n.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,n)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,n){if(l(n),t=u(t,n<0?0:0|h(n)),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<n;++e)t[e]=0;return t}function p(t,n){var e=n.length<0?0:0|h(n.length);t=u(t,e);for(var r=0;r<e;r+=1)t[r]=255&n[r];return t}function h(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function m(t,n){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var r=!1;;)switch(n){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return F(t).length;default:if(r)return W(t).length;n=(""+n).toLowerCase(),r=!0}}function d(t,n,e){var r=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(n>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Y(this,n,e);case"utf8":case"utf-8":return P(this,n,e);case"ascii":return N(this,n,e);case"latin1":case"binary":return C(this,n,e);case"base64":return E(this,n,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,n,e);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function v(t,n,e,r,i){if(0===t.length)return-1;if("string"==typeof e?(r=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof n&&(n=s.from(n,r)),s.isBuffer(n))return 0===n.length?-1:x(t,n,e,r,i);if("number"==typeof n)return n&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,n,e):Uint8Array.prototype.lastIndexOf.call(t,n,e):x(t,[n],e,r,i);throw new TypeError("val must be string, number or Buffer")}function x(t,n,e,r,i){var o,a=1,u=t.length,s=n.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||n.length<2)return-1;a=2,u/=2,s/=2,e/=2}function c(t,n){return 1===a?t[n]:t.readUInt16BE(n*a)}if(i){var l=-1;for(o=e;o<u;o++)if(c(t,o)===c(n,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===s)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(e+s>u&&(e=u-s),o=e;o>=0;o--){for(var f=!0,p=0;p<s;p++)if(c(t,o+p)!==c(n,p)){f=!1;break}if(f)return o}return-1}function y(t,n,e,r){e=Number(e)||0;var i=t.length-e;r?(r=Number(r))>i&&(r=i):r=i;var o=n.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var u=parseInt(n.substr(2*a,2),16);if(isNaN(u))return a;t[e+a]=u}return a}function S(t,n,e,r){return U(W(n,t.length-e),t,e,r)}function b(t,n,e,r){return U(function(t){for(var n=[],e=0;e<t.length;++e)n.push(255&t.charCodeAt(e));return n}(n),t,e,r)}function w(t,n,e,r){return b(t,n,e,r)}function A(t,n,e,r){return U(F(n),t,e,r)}function T(t,n,e,r){return U(function(t,n){for(var e,r,i,o=[],a=0;a<t.length&&!((n-=2)<0);++a)e=t.charCodeAt(a),r=e>>8,i=e%256,o.push(i),o.push(r);return o}(n,t.length-e),t,e,r)}function E(t,n,e){return 0===n&&e===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(n,e))}function P(t,n,e){e=Math.min(t.length,e);for(var r=[],i=n;i<e;){var o,a,u,s,c=t[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=e)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(l=s);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(s=(15&c)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(l=s)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(t){var n=t.length;if(n<=4096)return String.fromCharCode.apply(String,t);var e="",r=0;for(;r<n;)e+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return e}(r)}n.Buffer=s,n.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},n.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),n.kMaxLength=a(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,n,e){return c(null,t,n,e)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,n,e){return function(t,n,e,r){return l(n),n<=0?u(t,n):void 0!==e?"string"==typeof r?u(t,n).fill(e,r):u(t,n).fill(e):u(t,n)}(null,t,n,e)},s.allocUnsafe=function(t){return f(null,t)},s.allocUnsafeSlow=function(t){return f(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,n){if(!s.isBuffer(t)||!s.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var e=t.length,r=n.length,i=0,o=Math.min(e,r);i<o;++i)if(t[i]!==n[i]){e=t[i],r=n[i];break}return e<r?-1:r<e?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,n){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var e;if(void 0===n)for(n=0,e=0;e<t.length;++e)n+=t[e].length;var r=s.allocUnsafe(n),i=0;for(e=0;e<t.length;++e){var a=t[e];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},s.byteLength=m,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var n=0;n<t;n+=2)g(this,n,n+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var n=0;n<t;n+=4)g(this,n,n+3),g(this,n+1,n+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var n=0;n<t;n+=8)g(this,n,n+7),g(this,n+1,n+6),g(this,n+2,n+5),g(this,n+3,n+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):d.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,n,e,r,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===e&&(e=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),n<0||e>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&n>=e)return 0;if(r>=i)return-1;if(n>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(e>>>=0)-(n>>>=0),u=Math.min(o,a),c=this.slice(r,i),l=t.slice(n,e),f=0;f<u;++f)if(c[f]!==l[f]){o=c[f],a=l[f];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,n,e){return-1!==this.indexOf(t,n,e)},s.prototype.indexOf=function(t,n,e){return v(this,t,n,e,!0)},s.prototype.lastIndexOf=function(t,n,e){return v(this,t,n,e,!1)},s.prototype.write=function(t,n,e,r){if(void 0===n)r="utf8",e=this.length,n=0;else if(void 0===e&&"string"==typeof n)r=n,e=this.length,n=0;else{if(!isFinite(n))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");n|=0,isFinite(e)?(e|=0,void 0===r&&(r="utf8")):(r=e,e=void 0)}var i=this.length-n;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,t,n,e);case"utf8":case"utf-8":return S(this,t,n,e);case"ascii":return b(this,t,n,e);case"latin1":case"binary":return w(this,t,n,e);case"base64":return A(this,t,n,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n,e);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function N(t,n,e){var r="";e=Math.min(t.length,e);for(var i=n;i<e;++i)r+=String.fromCharCode(127&t[i]);return r}function C(t,n,e){var r="";e=Math.min(t.length,e);for(var i=n;i<e;++i)r+=String.fromCharCode(t[i]);return r}function Y(t,n,e){var r=t.length;(!n||n<0)&&(n=0),(!e||e<0||e>r)&&(e=r);for(var i="",o=n;o<e;++o)i+=k(t[o]);return i}function R(t,n,e){for(var r=t.slice(n,e),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function I(t,n,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+n>e)throw new RangeError("Trying to access beyond buffer length")}function _(t,n,e,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>i||n<o)throw new RangeError('"value" argument is out of bounds');if(e+r>t.length)throw new RangeError("Index out of range")}function X(t,n,e,r){n<0&&(n=65535+n+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(n&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(t,n,e,r){n<0&&(n=4294967295+n+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=n>>>8*(r?i:3-i)&255}function L(t,n,e,r,i,o){if(e+r>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function B(t,n,e,r,o){return o||L(t,0,e,4),i.write(t,n,e,r,23,4),e+4}function M(t,n,e,r,o){return o||L(t,0,e,8),i.write(t,n,e,r,52,8),e+8}s.prototype.slice=function(t,n){var e,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n<t&&(n=t),s.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,n)).__proto__=s.prototype;else{var i=n-t;e=new s(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},s.prototype.readUIntLE=function(t,n,e){t|=0,n|=0,e||I(t,n,this.length);for(var r=this[t],i=1,o=0;++o<n&&(i*=256);)r+=this[t+o]*i;return r},s.prototype.readUIntBE=function(t,n,e){t|=0,n|=0,e||I(t,n,this.length);for(var r=this[t+--n],i=1;n>0&&(i*=256);)r+=this[t+--n]*i;return r},s.prototype.readUInt8=function(t,n){return n||I(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,n){return n||I(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,n){return n||I(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,n){return n||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,n){return n||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,n,e){t|=0,n|=0,e||I(t,n,this.length);for(var r=this[t],i=1,o=0;++o<n&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*n)),r},s.prototype.readIntBE=function(t,n,e){t|=0,n|=0,e||I(t,n,this.length);for(var r=n,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*n)),o},s.prototype.readInt8=function(t,n){return n||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,n){n||I(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt16BE=function(t,n){n||I(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt32LE=function(t,n){return n||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,n){return n||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,n){return n||I(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,n){return n||I(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,n){return n||I(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,n){return n||I(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,n,e,r){(t=+t,n|=0,e|=0,r)||_(this,t,n,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[n]=255&t;++o<e&&(i*=256);)this[n+o]=t/i&255;return n+e},s.prototype.writeUIntBE=function(t,n,e,r){(t=+t,n|=0,e|=0,r)||_(this,t,n,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[n+i]=255&t;--i>=0&&(o*=256);)this[n+i]=t/o&255;return n+e},s.prototype.writeUInt8=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=255&t,n+1},s.prototype.writeUInt16LE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):X(this,t,n,!0),n+2},s.prototype.writeUInt16BE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):X(this,t,n,!1),n+2},s.prototype.writeUInt32LE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t):O(this,t,n,!0),n+4},s.prototype.writeUInt32BE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):O(this,t,n,!1),n+4},s.prototype.writeIntLE=function(t,n,e,r){if(t=+t,n|=0,!r){var i=Math.pow(2,8*e-1);_(this,t,n,e,i-1,-i)}var o=0,a=1,u=0;for(this[n]=255&t;++o<e&&(a*=256);)t<0&&0===u&&0!==this[n+o-1]&&(u=1),this[n+o]=(t/a>>0)-u&255;return n+e},s.prototype.writeIntBE=function(t,n,e,r){if(t=+t,n|=0,!r){var i=Math.pow(2,8*e-1);_(this,t,n,e,i-1,-i)}var o=e-1,a=1,u=0;for(this[n+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[n+o+1]&&(u=1),this[n+o]=(t/a>>0)-u&255;return n+e},s.prototype.writeInt8=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[n]=255&t,n+1},s.prototype.writeInt16LE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):X(this,t,n,!0),n+2},s.prototype.writeInt16BE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):X(this,t,n,!1),n+2},s.prototype.writeInt32LE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):O(this,t,n,!0),n+4},s.prototype.writeInt32BE=function(t,n,e){return t=+t,n|=0,e||_(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):O(this,t,n,!1),n+4},s.prototype.writeFloatLE=function(t,n,e){return B(this,t,n,!0,e)},s.prototype.writeFloatBE=function(t,n,e){return B(this,t,n,!1,e)},s.prototype.writeDoubleLE=function(t,n,e){return M(this,t,n,!0,e)},s.prototype.writeDoubleBE=function(t,n,e){return M(this,t,n,!1,e)},s.prototype.copy=function(t,n,e,r){if(e||(e=0),r||0===r||(r=this.length),n>=t.length&&(n=t.length),n||(n=0),r>0&&r<e&&(r=e),r===e)return 0;if(0===t.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-n<r-e&&(r=t.length-n+e);var i,o=r-e;if(this===t&&e<n&&n<r)for(i=o-1;i>=0;--i)t[i+n]=this[i+e];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+n]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),n);return o},s.prototype.fill=function(t,n,e,r){if("string"==typeof t){if("string"==typeof n?(r=n,n=0,e=this.length):"string"==typeof e&&(r=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(n<0||this.length<n||this.length<e)throw new RangeError("Out of range index");if(e<=n)return this;var o;if(n>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=n;o<e;++o)this[o]=t;else{var a=s.isBuffer(t)?t:W(new s(t,r).toString()),u=a.length;for(o=0;o<e-n;++o)this[o+n]=a[o%u]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function k(t){return t<16?"0"+t.toString(16):t.toString(16)}function W(t,n){var e;n=n||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((e=t.charCodeAt(a))>55295&&e<57344){if(!i){if(e>56319){(n-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(n-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(n-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(n-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((n-=1)<0)break;o.push(e)}else if(e<2048){if((n-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((n-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function F(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,n,e,r){for(var i=0;i<r&&!(i+e>=n.length||i>=t.length);++i)n[i+e]=t[i];return i}}).call(this,e(140))},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){"use strict";n.byteLength=function(t){var n=c(t),e=n[0],r=n[1];return 3*(e+r)/4-r},n.toByteArray=function(t){var n,e,r=c(t),a=r[0],u=r[1],s=new o(function(t,n,e){return 3*(n+e)/4-e}(0,a,u)),l=0,f=u>0?a-4:a;for(e=0;e<f;e+=4)n=i[t.charCodeAt(e)]<<18|i[t.charCodeAt(e+1)]<<12|i[t.charCodeAt(e+2)]<<6|i[t.charCodeAt(e+3)],s[l++]=n>>16&255,s[l++]=n>>8&255,s[l++]=255&n;2===u&&(n=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4,s[l++]=255&n);1===u&&(n=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2,s[l++]=n>>8&255,s[l++]=255&n);return s},n.fromByteArray=function(t){for(var n,e=t.length,i=e%3,o=[],a=0,u=e-i;a<u;a+=16383)o.push(l(t,a,a+16383>u?u:a+16383));1===i?(n=t[e-1],o.push(r[n>>2]+r[n<<4&63]+"==")):2===i&&(n=(t[e-2]<<8)+t[e-1],o.push(r[n>>10]+r[n>>4&63]+r[n<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=a.length;u<s;++u)r[u]=a[u],i[a.charCodeAt(u)]=u;function c(t){var n=t.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=n),[e,e===n?0:4-e%4]}function l(t,n,e){for(var i,o,a=[],u=n;u<e;u+=3)i=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,n){
|
|
9
9
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
10
|
-
n.read=function(t,n,e,r,i){var o,a,u=8*i-r-1,s=(1<<u)-1,c=s>>1,l=-7,f=e?i-1:0,p=e?-1:1,h=t[n+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=u;l>0;o=256*o+t[n+f],f+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[n+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},n.write=function(t,n,e,r,i,o){var a,u,s,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,m=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,a=l):(a=Math.floor(Math.log(n)/Math.LN2),n*(s=Math.pow(2,-a))<1&&(a--,s*=2),(n+=a+f>=1?p/s:p*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=l?(u=0,a=l):a+f>=1?(u=(n*s-1)*Math.pow(2,i),a+=f):(u=n*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[e+h]=255&u,h+=d,u/=256,i-=8);for(a=a<<i|u,c+=i;c>0;t[e+h]=255&a,h+=d,a/=256,c-=8);t[e+h-d]|=128*m}},function(t,n){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,n,e){var r=e(23),i=e(81),o=e(63),a=e(24),u=e(82),s=e(62),c=r.getBCHDigit(7973);function l(t,n){return a.getCharCountIndicator(t,n)+4}function f(t,n){var e=0;return t.forEach((function(t){var r=l(t.mode,n);e+=r+t.getBitsLength()})),e}n.from=function(t,n){return u.isValid(t)?parseInt(t,10):n},n.getCapacity=function(t,n,e){if(!u.isValid(t))throw new Error("Invalid QR Code version");void 0===e&&(e=a.BYTE);var o=8*(r.getSymbolTotalCodewords(t)-i.getTotalCodewordsCount(t,n));if(e===a.MIXED)return o;var s=o-l(e,t);switch(e){case a.NUMERIC:return Math.floor(s/10*3);case a.ALPHANUMERIC:return Math.floor(s/11*2);case a.KANJI:return Math.floor(s/13);case a.BYTE:default:return Math.floor(s/8)}},n.getBestVersionForData=function(t,e){var r,i=o.from(e,o.M);if(s(t)){if(t.length>1)return function(t,e){for(var r=1;r<=40;r++){if(f(t,r)<=n.getCapacity(r,e,a.MIXED))return r}}(t,i);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,e,r){for(var i=1;i<=40;i++)if(e<=n.getCapacity(i,r,t))return i}(r.mode,r.getLength(),i)},n.getEncodedBits=function(t){if(!u.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var n=t<<12;r.getBCHDigit(n)-c>=0;)n^=7973<<r.getBCHDigit(n)-c;return t<<12|n}},function(t,n,e){var r=e(23),i=r.getBCHDigit(1335);n.getEncodedBits=function(t,n){for(var e=t.bit<<3|n,o=e<<10;r.getBCHDigit(o)-i>=0;)o^=1335<<r.getBCHDigit(o)-i;return 21522^(e<<10|o)}},function(t,n,e){var r=e(24),i=e(146),o=e(147),a=e(148),u=e(149),s=e(83),c=e(23),l=e(150);function f(t){return unescape(encodeURIComponent(t)).length}function p(t,n,e){for(var r,i=[];null!==(r=t.exec(e));)i.push({data:r[0],index:r.index,mode:n,length:r[0].length});return i}function h(t){var n,e,i=p(s.NUMERIC,r.NUMERIC,t),o=p(s.ALPHANUMERIC,r.ALPHANUMERIC,t);return c.isKanjiModeEnabled()?(n=p(s.BYTE,r.BYTE,t),e=p(s.KANJI,r.KANJI,t)):(n=p(s.BYTE_KANJI,r.BYTE,t),e=[]),i.concat(o,n,e).sort((function(t,n){return t.index-n.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function d(t,n){switch(n){case r.NUMERIC:return i.getBitsLength(t);case r.ALPHANUMERIC:return o.getBitsLength(t);case r.KANJI:return u.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function m(t,n){var e,s=r.getBestModeForData(t);if((e=r.from(n,s))!==r.BYTE&&e.bit<s.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(e)+".\n Suggested mode is: "+r.toString(s));switch(e!==r.KANJI||c.isKanjiModeEnabled()||(e=r.BYTE),e){case r.NUMERIC:return new i(t);case r.ALPHANUMERIC:return new o(t);case r.KANJI:return new u(t);case r.BYTE:return new a(t)}}n.fromArray=function(t){return t.reduce((function(t,n){return"string"==typeof n?t.push(m(n,null)):n.data&&t.push(m(n.data,n.mode)),t}),[])},n.fromString=function(t,e){for(var i=function(t,n){for(var e={},i={start:{}},o=["start"],a=0;a<t.length;a++){for(var u=t[a],s=[],c=0;c<u.length;c++){var l=u[c],f=""+a+c;s.push(f),e[f]={node:l,lastCount:0},i[f]={};for(var p=0;p<o.length;p++){var h=o[p];e[h]&&e[h].node.mode===l.mode?(i[h][f]=d(e[h].lastCount+l.length,l.mode)-d(e[h].lastCount,l.mode),e[h].lastCount+=l.length):(e[h]&&(e[h].lastCount=l.length),i[h][f]=d(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,n))}}o=s}for(p=0;p<o.length;p++)i[o[p]].end=0;return{map:i,table:e}}(function(t){for(var n=[],e=0;e<t.length;e++){var i=t[e];switch(i.mode){case r.NUMERIC:n.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:n.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:n.push([i,{data:i.data,mode:r.BYTE,length:f(i.data)}]);break;case r.BYTE:n.push([{data:i.data,mode:r.BYTE,length:f(i.data)}])}}return n}(h(t,c.isKanjiModeEnabled())),e),o=l.find_path(i.map,"start","end"),a=[],u=1;u<o.length-1;u++)a.push(i.table[o[u]].node);return n.fromArray(function(t){return t.reduce((function(t,n){var e=t.length-1>=0?t[t.length-1]:null;return e&&e.mode===n.mode?(t[t.length-1].data+=n.data,t):(t.push(n),t)}),[])}(a))},n.rawSplit=function(t){return n.fromArray(h(t,c.isKanjiModeEnabled()))}},function(t,n,e){var r=e(24);function i(t){this.mode=r.NUMERIC,this.data=t.toString()}i.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var n,e,r;for(n=0;n+3<=this.data.length;n+=3)e=this.data.substr(n,3),r=parseInt(e,10),t.put(r,10);var i=this.data.length-n;i>0&&(e=this.data.substr(n),r=parseInt(e,10),t.put(r,3*i+1))},t.exports=i},function(t,n,e){var r=e(24),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(t){this.mode=r.ALPHANUMERIC,this.data=t}o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var n;for(n=0;n+2<=this.data.length;n+=2){var e=45*i.indexOf(this.data[n]);e+=i.indexOf(this.data[n+1]),t.put(e,11)}this.data.length%2&&t.put(i.indexOf(this.data[n]),6)},t.exports=o},function(t,n,e){var r=e(29),i=e(24);function o(t){this.mode=i.BYTE,this.data=r.from(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(var n=0,e=this.data.length;n<e;n++)t.put(this.data[n],8)},t.exports=o},function(t,n,e){var r=e(24),i=e(23);function o(t){this.mode=r.KANJI,this.data=t}o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var n;for(n=0;n<this.data.length;n++){var e=i.toSJIS(this.data[n]);if(e>=33088&&e<=40956)e-=33088;else{if(!(e>=57408&&e<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");e-=49472}e=192*(e>>>8&255)+(255&e),t.put(e,13)}},t.exports=o},function(t,n,e){"use strict";var r={single_source_shortest_paths:function(t,n,e){var i={},o={};o[n]=0;var a,u,s,c,l,f,p,h=r.PriorityQueue.make();for(h.push(n,0);!h.empty();)for(s in u=(a=h.pop()).value,c=a.cost,l=t[u]||{})l.hasOwnProperty(s)&&(f=c+l[s],p=o[s],(void 0===o[s]||p>f)&&(o[s]=f,h.push(s,f),i[s]=u));if(void 0!==e&&void 0===o[e]){var d=["Could not find a path from ",n," to ",e,"."].join("");throw new Error(d)}return i},extract_shortest_path_from_predecessor_list:function(t,n){for(var e=[],r=n;r;)e.push(r),t[r],r=t[r];return e.reverse(),e},find_path:function(t,n,e){var i=r.single_source_shortest_paths(t,n,e);return r.extract_shortest_path_from_predecessor_list(i,e)},PriorityQueue:{make:function(t){var n,e=r.PriorityQueue,i={};for(n in t=t||{},e)e.hasOwnProperty(n)&&(i[n]=e[n]);return i.queue=[],i.sorter=t.sorter||e.default_sorter,i},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){var e={value:t,cost:n};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=r},function(t,n,e){var r=e(84);n.render=function(t,n,e){var i=e,o=n;void 0!==i||n&&n.getContext||(i=n,n=void 0),n||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);var a=r.getImageWidth(t.modules.size,i),u=o.getContext("2d"),s=u.createImageData(a,a);return r.qrToImageData(s.data,t,i),function(t,n,e){t.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=e,n.width=e,n.style.height=e+"px",n.style.width=e+"px"}(u,o,a),u.putImageData(s,0,0),o},n.renderToDataURL=function(t,e,r){var i=r;void 0!==i||e&&e.getContext||(i=e,e=void 0),i||(i={});var o=n.render(t,e,i),a=i.type||"image/png",u=i.rendererOpts||{};return o.toDataURL(a,u.quality)}},function(t,n,e){var r=e(84);function i(t,n){var e=t.a/255,r=n+'="'+t.hex+'"';return e<1?r+" "+n+'-opacity="'+e.toFixed(2).slice(1)+'"':r}function o(t,n,e){var r=t+n;return void 0!==e&&(r+=" "+e),r}n.render=function(t,n,e){var a=r.getOptions(n),u=t.modules.size,s=t.modules.data,c=u+2*a.margin,l=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",f="<path "+i(a.color.dark,"stroke")+' d="'+function(t,n,e){for(var r="",i=0,a=!1,u=0,s=0;s<t.length;s++){var c=Math.floor(s%n),l=Math.floor(s/n);c||a||(a=!0),t[s]?(u++,s>0&&c>0&&t[s-1]||(r+=a?o("M",c+e,.5+l+e):o("m",i,0),i=0,a=!1),c+1<n&&t[s+1]||(r+=o("h",u),u=0)):i++}return r}(s,u,a.margin)+'"/>',p='viewBox="0 0 '+c+" "+c+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+p+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof e&&e(null,h),h}},function(t,n,e){"use strict";var r=e(5);t.exports=function(t,n){return!!t&&r((function(){n?t.call(null,(function(){}),1):t.call(null)}))}},function(t,n,e){"use strict";e.r(n),n.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIgAAACACAYAAADQ6SE/AAAR50lEQVR4Xu2dWei+2xTH1/+KDHFMRcJxQZI4mZPhJEMhJIRjOCkkZYoLN5wrKcUhmQrHBUWmlLk4MiSEQiFTckM4x4W4os/7f9bfPvu/97PW2nu/z/O8w66399fv3c8e1v7uNe/9XJDTLc8SkddWpn9HEXnIQNL8QUT4aPmpiNwkIt8SkZ9Nfw/sblxTF8Y1dXAtAYCPiciDNzBywPNuEflCBqTVh3bKAIH4cApA8szVV+L/AwAo122Fq5w6QHRZ7iMiLxMRxM4WOAri52oRQRStWs4AKZP/CdO/9TuvBaD4UBBVd9jDKgKSq9YWOWeAjFlZRBUc6G2DwYJOAldbrZwB4iM9AMDigV7/rTwCJ+GjnMXXsl3ryjW5yBkg9gKpMvs6EeGzD3EyN4pni8jnfcMcX+sMkBhN4SSIkZr/JNaarzYWDX2uUloBAqEwDVWJw+FzwyozWKdTxAjm6BLm8Y0JnRefbQtAkLOfK8ha/AnXLj6DdTtMrRlrJNDn3lalwu+tAGETq8lOG00lChAI8pPJwVTq8BRBAh3e6qA+1kiL+z4KELg648lNdHwqcL0Qp48CBGXJYqunCBJMXIi/DwWWBaV9T6HeR42KuPVRfF1OuAhA4B6/94xycl+forhBmXypk0beal4lFY7xTWejgAQnHM642RIBCCwS3cNbTpGTQBsWquaBVdqx0736CBsNWlqFzRvxwbg40z4BwoROFSTWYqJAwuI9ICEmg5U4V6KbV9u6wuIiEYBEREw6mVMFCTrJCH+JByDQuEW0mU64CEBY9NZJnypI2NnMvUd59QAkKl50A5v6TRQgKjZa0HqqIEGc4KK39JJaVPj108asiRja/4cl0yq/m8FAD0AeJCKvEpEfJspSK0s7VZCwPiwkYhrdQ51YpBvyN7oI36WYCxYHAbtawaz1msF5G6aPxQLIXUTkxyJyr6nlt4jI26e/PT6R0qROFSQKjhZxA83gJKlZCqDe1QEO1sa0ZOYAcisR+Xdhhd8wDYwBol23ZGCdKkgQI9CsBSSAA7rxDe3RbyJmbWmzmiZ0DSB3FZG/zLC1F4rIJ6eBnkESUwB6QBLrab72zRPAZp1lJYDcV0R+6xjJIya95NQ5CbsYHQKCu9zX08ay4jJ4ZR/vWIfWKqaJS8M5QBg0wThvubOI/L2Tk5imlncwC9YDFATEcuVQz7pc73BuMVwFVz50zU5rVT7nSIHlAvhcYE4B8jgRaQkLaxs9nMSUhQsuvtUVi0fMg/nOFXxGKJZzZZ9Bvj9OVhEqgALXmttlv+viPlFEvhF++uIDsFYlVg9IDkVxBRyWT0NJ6ZkTgMMi9LjdvUs0jCsDENiNJ59hbnB/SkxhQILt3qKpewjqJdI+6rXEPDzcsYdm+TxN30aEMHNZ2pF2qPtzEcGpRunR1JHfeB63WFpCDZajS+fZAr4SjYZxDxoHIM8VkU8NWo3vichjBoDEs+sGDTnUDPK8xbIg98KjFAKmXlEzHCBQyAuSX4jIe0TkQyLyTxG5fYG8XxWRpx4pSIh5WMppCXFWPEWfaQVg2udeAOIBCbGYa0Tk19NobiMivxGRexQo8lkRec4RgqR2aColAe5rrAYsFNXDvIvWCsBFADIHEhSfF4sIymhaiNV8V0TuVwDJx5MchR6dZEvihoWfU77z2IZGcflO7wcpcZkRxgLtutMJPcK15EnNxc1XJs7xt0qDyMzPiMhDC7+/X0RePf0/kjOZN7UVkFgiwJO7USKjJ9nYs55aB30HT6kFSrPNWixGQYKogHP8y2jpAZOTjRhOXt4pIm+a/tlDiC2AxEpzsKLjS4DDXPSpAtwQIPGB8xWV6LkJPVpEvu/tzfCnpDL4kEFiiYEoQPA/rXasMltbuCPK9C2AEp1QDS9wGXSOufIKEfnwgXMSS0xG6NmT6BPYt6Gql11cE5lQracnicjXnMN4moh8aQBIWmW9c5jValbitoeeIxJ90gGSlYYDzzow5Z37LS6u8UxoruHHisi3vT1P9dLFbRU3a17RNOfMsu7yABzEcqxQf0pSYl0AABEAQLGI0iQtLEzElPfQlGe5iA2h5F4W7vc8rHUeNg3qdpGHjgAkc4rqHGdrAQeLjws+T+pJx1ACCFylJdMvXcrdXFo5yAMn0/b+DeDQR1JitsQ4aGcNTjLH9WoeU3Y+pxIjnMPKF1WQ5AAhlgUH6OUoKKtXtQLkEyLygg5wlEBimZC17pYGyZweUlpUb/5IOj+vSQ/N4ExsMAUEFiPiqBcgjOfKVoBY5l46WQb/FBHBV1IqKSc5FJCwu0osPI/cRsGBvoGl5AnsKS0BLGKIDHfKSIBc2woQ4jDfmU6IzzGS54nIpycvKx5ZXPPHABIURV2QfD4auY2CA72BhW7xfqZiLwUIgGPTtR4BvaEVIEqUH1Vc7Pz+ZBH5ekK9p4vIF2fQdE8R+fP0+9Y5yVzuLvIfFg/n9BZEE6Azr2OoNJiOB4BQcMJp8pAnyFhq+sZegNBoKQWPg1Z5YI+6bxaRd8xQLR3P1kEyIndDRcIIb6qOB/MUwIwAyE0jAMLxhy+LyJ2m4xJYOP+ZAQFBPcTTrQt1SB9II8M1WW/tzF7FFT0AtqyX2GrSL9xBr3CaEzPW+Pgd9k8bnrs/PO1pRho6nV5D1ctBuvwg6aBB7UtE5I0i8jvHbF4jIu+t1EsTjnqSoFtAQn94JOduN2ansuMhvvfGpXyqLcqog6y7cQFixq8cpMuJNoKDeAZeqjOXHY4Z/aLpoaVAAlsGHF5fBQvBTo1mmKGM8pxH31Brkbr4WLzcRp8rOdE4DuFOa1wLIB4z+SMi8vKFQMIic2Cs96yrtVmiymiuXHqz/pW+JacZIgirx3WFxxoAeaWIfMCi5PQ7ydTPXwAkkbMuzqFfVs2bdpg+WLI+PCBRs7fkEwEg3mOdNy8NkEjkF0L9QEQelVCsJ3Wxloo36rhBDTg9ymjNPPWADQVfTe7UqxoByBAz17ujOA6B9eItEPaRIvKr7IEekEA0CJTK/9brm7zz8Ga05+1ZuSfW4WvEJaJTg4TaPkzBSp3UuosBhEUlZ6SUklgj9Bx3GwUS67C6htrZiYAr6h3VuanjjIPT3mKJPUBOeoGl7Ob6Xg4Q9CK4a+l05WIA4dQd/hFvua0jD3YESJDVNZd57vpuiciW5gvY+GBhlNzq9IM15Tn/6wnq5f6aHCBzsZvFADLnks+JeDcR+asTSb0gYYFqPo/0NFwr57CmoYnDWg9x4DWzecaji+TnfiMAuX4pJfXuIvJBEXmGQTF2D3Z6pPSApNZPGrbfFzgic6zV9QCEZ1MuEgHIdUsBRCdIYjMJzqWCCPplI9UsXSLarKYOqgiKOsOi/bXWtxTVtF29dDA/sD8nYhYHCAN+X3KYSifwcBFBDPWU1vzWvE+974RYTCQi2zP2lmfhtBHHHiDXC2tS83kOIFcvzUGUEER0iexSOC0fTXyuEXQESPTt194cCgA1dxwz5Np2IqU3lrN5gEAHFhMl0bqo3kmzS9V6QaLmrKdfWDxK7pzbmh0KJ8IqQRTqd8sFO4wJ60dp5xljqY4XIM05qa0DW+q5XpBY42QHs9gAnBjOnOVRy3RHPOhldXyn13hpOmN6cyIbSf0x1vis39NcljkRc2EtEWNNYMTv+wJJGo21vJ3MwzorM2Ku0TZSy+9kAaJibNSJM9ojOopnEv+Fx/wFTBG/RnShe+qrh1VN5VLc56g5CCyc9+uNskRUVLDgKLCeO0w9ns6eRe59VkUWYMkBsgP3MYoYFEYcQyN3rirSqa5gLc6WuYeOXfUeOGIOkF264jEBBH0AcRLxDViL3Pp7qsS2trH0c0cNkH0ppC2L1OujaOlzxDNHCxAPOGD3GhZvucbSuwCHCg7mlwNkp7weuoiZi8HgwdQsb33HSvTqBS8wcgsn8txW6h4lQGpJNfm1CS1XL3gXjsgvllLkPK237SXr5QDZZcIdMgepcY/8WME+wbFFJ1grqHKAdN0P0jqIkc/Vjk6kru3oWZfo+Lbu54jM5+gAUkq8TUPgHk9nhIC1uscCkpyeO+54yCKm5BrWs6j4RLjRZ6lEn2MASZ6Zt8PGsQEE04xIpRV/QbEERO4jiA5WE8nucjS3SpU8NfHoAMLCE3+Z4xx6TqV0HgZOkN8i6F2plsPi3raXrMfJPXJcdjQ8Ng4yR0icWEwcWcvkS68zhx78hsnawl2OBSSIm53ZfsgA8Z4OY575GZeSBZQruD0vQMaSOnS/yG6zbR0giAt2vWZetbDa/ER9zX9CLmp6RqbnOMWxcJLNAoSQPd7JXiuEfAd0DhRXFhzA1a57KimZJw+SLXKQNS65nztCcNIg2RpA1gAHYst66WAvSOBOo7P3W8Rt+JktAWTf93T0ekJ7QELfB+lM2xJASpFZvXwFiwDFjzqjMsYQK4AyYm14stjndmkrSMhhUUU9n78eAEfJjszFxU22ApDS/edpVDYSkcWbqhfMQdScoBBRz5i4iJRV8iQojQCJWnCXnFaOwQIWlHuy7617QxzNbcfMLRG99Upr74l3F4EqlXpBgreWRcwLG0Ez5ns4JeDAWiv1EZr3VjhI7rjSjPBaRBbxgEsYlp+nEC4VE+kFSXpSDjAwlwi38Cw0nBSx1sxNtgoQzdJC5yj5QhQEpWOPS76urBcknkXurVO6l83d5lYBoojPwYHSyqKwM2rvbVl6TocAEs/VmUXQLE3MGnI9Jm6eMV667D93l7t3SmfFQwAJ+gi6T6hsBSCW+ZiDo6abtJqRIaJVKre+nWJE3942LIfgZe1sBSBzOzAHR+3mn+iNO16iRuq1vp3C04e+HAjxqgUxC+28Z31QjNHR3GUrAJm7Y4NAm76bDVFUM/+WVE5rBLbeq+temKyi9QIAODA08uSwhOi0NkAiDrA54lpviGxdmJbnRosaOAfAs0xV71sxQnramgCpgQNRATG8731tveq6ZfE9z1j6lKeNtE7E8efNhnOf51kLILXzKmlyj8pXfSdL/rZp5D1u5ZaXAEYXKVofgLfeQZb35V7M6UEPQN2bag2A1CyQLYmJKCDy+pF0yLm+Wu8YsfrX4yHmPJcGSA0cbkSbM9pGBWuBvKNs8l1Mlo119MO19q5K3tkY9Urg6HmXyqBh7aWZUQDpiStZr0J1WTNLAaTk5zjkuzQsVI0CyBUO66U2Fssn4wLfEgApgcOy660F2PrvnLnpTbh26wkVYujd7DVauayjfQOkBA7scP5v2fVbB0FtfKPiMmG3eDYg68WRqwOENxjlRwyOyVKpAWTEK85ci2fsIFwAc/fNu/rYFwcpZaevGUhbihuN4B6tlkvU1F4FIMhdXvGVXjKb5nAstVBr9WPJ/dq48B6j2MJxRzn+LEV5cYCUXOcoo4BleLb1Wggw+rVMy/RxxK3edDwKFGn7lqLs4uijREwNHN5XkG90vUPD8kZyW45bhAYyk22XtrOYH6QEjugryKME2GJ9TwzEG5ntnZ9HF3L5WHo5CN5RrnpKczRGKVm9RFr6eQ9AXHJ/wMCtlAN97ZrZVQ9ASq5zl1wzR3WYFTwAcbH1AdO39A93TkgrQHJwpLf3DJjfQTbhAUg0dN9CCI94cW/kFoCQ9oefQ13JSyhdLYRa+hmPkroEB7Fe6Q5dXPoHFaMAydF57DGVKMgsM3ffaQ0e7uEWL1GA5J2fgts8ChArghpanGDn3ouD3eIlCpDUM7eUNh6k0erVrfgHA9yHHsLmxYNtRZDDGWoREaNHDyDCQd6WswB85l5Pot3DZYjUjiqRW5nCOlAEIKMmdOztWGKG+Xefup9uA4i8gq0pv+QMkPFw9ZwzplfiLwTn0OUihYtlOGOLWe0tzR7cM0C8JI7VsyKpaWskTsFReAYlNk+kwnzmyIfeH9JysUxz8tEZILGF99b2OM28bfXWC1kteWdngPSSv/68x6LZX+8XW+62Ns8A2e8SWUGzffbexTl0YGeA7HOJLra9NEiGxsXOANk/QOhhKXEzPA/nDJBlAEIvONEAiveyl8jIAMbIfNZLfZ8BElmGMXWxcHCN4y/puQEAkxjzmM/ezhidATJm0VtbASx84C7EUUrcBQ8oBccaHzy16TVUrX27nvsf1ZYuuGRplQcAAAAASUVORK5CYII="},function(t,n,e){var r=e(3);r(r.P,"Array",{fill:e(156)}),e(43)("fill")},function(t,n,e){"use strict";var r=e(28),i=e(48),o=e(19);t.exports=function(t){for(var n=r(this),e=o(n.length),a=arguments.length,u=i(a>1?arguments[1]:void 0,e),s=a>2?arguments[2]:void 0,c=void 0===s?e:i(s,e);c>u;)n[u++]=t;return n}},function(t,n,e){"use strict";e.r(n);e(64),e(1),e(9),e(10),e(11),e(8),e(12),e(75),e(20),e(15),e(21),e(44),e(45);var r={CRC16:null,isArray:null,ToCRC16:null,ToModbusCRC16:null,strToByte:null,convertChinese:null,filterChinese:null,strToHex:null,padLeft:null,toString:null};r.CRC16=function(t){var n=t.length;if(n>0){for(var e=65535,r=0;r<n;r++){e^=t[r];for(var i=0;i<8;i++)e=0!=(1&e)?e>>1^40961:e>>1}return[(65280&e)>>8,255&e]}return[0,0]},r.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},r.ToCRC16=function(t,n){return r.toString(r.CRC16(r.isArray(t)?t:r.strToByte(t)),n)},r.ToModbusCRC16=function(t,n){return r.toString(r.CRC16(r.isArray(t)?t:r.strToHex(t)),n)},r.strToByte=function(t){for(var n=t.split(""),e=[],r=0,i=n.length;r<i;r++){var o=encodeURI(n[r]);if(1==o.length)e.push(o.charCodeAt(0));else for(var a=o.split("%"),u=1;u<a.length;u++)e.push(parseInt("0x"+a[u]))}return e},r.convertChinese=function(t){for(var n=t.split(""),e=[],r=0,i=n.length;r<i;r++){var o=n[r].charCodeAt();o<=0||o>=127?e.push(o.toString(16)):e.push(n[r])}return e},r.filterChinese=function(t){for(var n=t.split(""),e=[],r=0,i=n.length;r<i;r++){var o=n[r].charCodeAt();o>0&&o<127&&e.push(n[r])}return e},r.strToHex=function(t,n){t=(t=n?r.filterChinese(t).join(""):r.convertChinese(t).join("")).replace(/\s/g,"");for(var e=(t+=t.length%2!=0?"0":"").length/2,i=[],o=0;o<e;o++)i.push(parseInt(t.substr(2*o,2),16));return i},r.padLeft=function(t,n,e){null==e&&(e="0");for(var r=0,i=n-t.length;r<i;r++)t=e+t;return t},r.toString=function(t,n){void 0===n&&(n=!0);var e=t[0],i=t[1];return r.padLeft((n?e+256*i:256*e+i).toString(16).toUpperCase(),4,"0")};var i=r,o=(e(77),e(116),e(118),e(61),e(121),e(86)),a=e.n(o),u=function(t){void 0===t&&(t=""),"number"==typeof t&&(t+=""),null==t&&(t="");for(var n=0,e=t.length,r=-1,i=0;i<e;i++)n+=(r=t.charCodeAt(i))>=0&&r<=128?1:2;return n},s=function(t){return a.a.toMoney(t,{outSymbol:!1})},c=function(){function t(){}return t.add=function(t,n){var e,r,i;try{e=t.toString().split(".")[1].length}catch(t){e=0}try{r=n.toString().split(".")[1].length}catch(t){r=0}return(t*(i=Math.pow(10,Math.max(e,r)))+n*i)/i},t.sub=function(t,n){var e,r,i;try{e=t.toString().split(".")[1].length}catch(t){e=0}try{r=n.toString().split(".")[1].length}catch(t){r=0}return((t*(i=Math.pow(10,Math.max(e,r)))-n*i)/i).toFixed(e>=r?e:r)},t.mul=function(t,n){var e=0,r=t.toString(),i=n.toString();try{e+=r.split(".")[1].length}catch(t){}try{e+=i.split(".")[1].length}catch(t){}return Number(r.replace(".",""))*Number(i.replace(".",""))/Math.pow(10,e)},t.div=function(t,n){var e=0,r=0;try{e=t.toString().split(".")[1].length}catch(t){}try{r=n.toString().split(".")[1].length}catch(t){}return Number(t.toString().replace(".",""))/Number(n.toString().replace(".",""))*Math.pow(10,r-e)},t}(),l=function(t,n){return!(!t||!t.hasOwnProperty(n))},f=function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Number.MAX_SAFE_INTEGER}(t.length)&&!function(t){return"[object Function]"===Object.prototype.toString.call(t)}(t)},p=function(t){if(null===t)return!0;if(void 0===t)return!0;if(f(t))return!t.length;if(e=t,"[object Object]"===Object.prototype.toString.call(e))for(var n in t)if(l.call(t,n))return!1;var e;return!1},h=function(t,n,e){if(void 0===n&&(n=2),void 0===e&&(e=!1),null==t||""===t)return t;if("string"==typeof t&&t.includes(","))return t;if(t=+t,!isNaN(t))if((""+t).includes(".")){var r=(""+t).split(".")[0],i="0."+(""+t).split(".")[1],o=Number(i),a="";e?t=r.replace(/\B(?=(\d{3})+\b)/g,",")+o:(a="."+(""+(a=o.toFixed(n))).split(".")[1],t=r.replace(/\B(?=(\d{3})+\b)/g,",")+a)}else t=t.toFixed(n).replace(/(\d)(?=(\d{3})+\.)/g,"$1,");return t},d=function(t,n,e,r,i,o,a,u,s){function c(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function l(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===r&&(r=""),"number"==typeof r&&(r+=""),null==r&&(r=""),1===s?r.length<e&&(t.textAlign="center"):0===s?t.textAlign="left":2===s&&(t.textAlign="right");for(var f=1;c(r)>0;f++){var p=l(r,e),h=p.tlen,d=p.isNextLine;t.fillStyle=a,t.font=u,t.textBaseline="top",t.fillText(r.substr(0,h).replace(/^\s+|\s+$/,""),i,(f-1)*n+o),r=d?r.substr(h+1):r.substr(h)}t.save()},m=[{taxOfficeCode:"3100",taxOffice:"上海国税",taxProvince:"上海市税务局",title:"上海"},{taxOfficeCode:"1100",taxOffice:"北京国税",taxProvince:"北京市税务局",title:"北京"},{taxOfficeCode:"4200",taxOffice:"湖北国税",taxProvince:"湖北省税务局",title:"湖北"},{taxOfficeCode:"4300",taxOffice:"湖南国税",taxProvince:"湖南省税务局",title:"湖南"},{taxOfficeCode:"1300",taxOffice:"河北国税",taxProvince:"河北省税务局",title:"河北"},{taxOfficeCode:"4100",taxOffice:"河南国税",taxProvince:"河南省税务局",title:"河南"},{taxOfficeCode:"6100",taxOffice:"陕西国税",taxProvince:"陕西省税务局",title:"陕西"},{taxOfficeCode:"3200",taxOffice:"江苏国税",taxProvince:"江苏省税务局",title:"江苏"},{taxOfficeCode:"3300",taxOffice:"浙江国税",taxProvince:"浙江省税务局",title:"浙江"},{taxOfficeCode:"3302",taxOffice:"宁波国税",taxProvince:"宁波市税务局",title:"宁波"},{taxOfficeCode:"6200",taxOffice:"甘肃国税",taxProvince:"甘肃省税务局",title:"甘肃"},{taxOfficeCode:"5300",taxOffice:"云南国税",taxProvince:"云南省税务局",title:"云南"},{taxOfficeCode:"3500",taxOffice:"福建国税",taxProvince:"福建省税务局",title:"福建"},{taxOfficeCode:"3502",taxOffice:"厦门国税",taxProvince:"厦门市税务局",title:"厦门"},{taxOfficeCode:"2200",taxOffice:"吉林国税",taxProvince:"吉林省税务局",title:"吉林"},{taxOfficeCode:"2100",taxOffice:"辽宁国税",taxProvince:"辽宁省税务局",title:"辽宁"},{taxOfficeCode:"6400",taxOffice:"宁夏国税",taxProvince:"宁夏回族自治区税务局",title:"宁夏"},{taxOfficeCode:"1200",taxOffice:"天津国税",taxProvince:"天津市税务局",title:"天津"},{taxOfficeCode:"4600",taxOffice:"海南国税",taxProvince:"海南省税务局",title:"海南"},{taxOfficeCode:"2102",taxOffice:"大连国税",taxProvince:"大连市税务局",title:"大连"},{taxOfficeCode:"3700",taxOffice:"山东国税",taxProvince:"山东省税务局",title:"山东"},{taxOfficeCode:"3702",taxOffice:"青岛国税",taxProvince:"青岛市税务局",title:"青岛"},{taxOfficeCode:"4400",taxOffice:"广东国税",taxProvince:"广东省税务局",title:"广东"},{taxOfficeCode:"4403",taxOffice:"深圳国税",taxProvince:"深圳市税务局",title:"深圳"},{taxOfficeCode:"5200",taxOffice:"贵州国税",taxProvince:"贵州省税务局",title:"贵州"},{taxOfficeCode:"6300",taxOffice:"青海国税",taxProvince:"青海省税务局",title:"青海"},{taxOfficeCode:"6500",taxOffice:"新疆国税",taxProvince:"新疆维吾尔自治区税务局",title:"新疆"},{taxOfficeCode:"4500",taxOffice:"广西国税",taxProvince:"广西壮族自治区税务局",title:"广西"},{taxOfficeCode:"5100",taxOffice:"四川国税",taxProvince:"四川省税务局",title:"四川"},{taxOfficeCode:"1400",taxOffice:"山西国税",taxProvince:"山西省税务局",title:"山西"},{taxOfficeCode:"5000",taxOffice:"重庆国税",taxProvince:"重庆市税务局",title:"重庆"},{taxOfficeCode:"2300",taxOffice:"黑龙江国税",taxProvince:"黑龙江税务局",title:"黑龙江"},{taxOfficeCode:"3400",taxOffice:"安徽国税",taxProvince:"安徽省税务局",title:"安徽"},{taxOfficeCode:"1500",taxOffice:"内蒙国税",taxProvince:"内蒙古自治区税务局",title:"内蒙古"},{taxOfficeCode:"3600",taxOffice:"江西国税",taxProvince:"上海市税务局",title:"上海"},{taxOfficeCode:"5400",taxOffice:"西藏国税",taxProvince:"西藏自治区税务局",title:"西藏"}],g=function(t,n,e,r){return void 0===e&&(e="value"),void 0===r&&(r="label"),t||0===t?(n||[]).find((function(n){return n[e]===t}))?(n||[]).find((function(n){return n[e]===t}))[r]:t:null},v=e(30),x=e.n(v),y=e(80).changeDpiDataUrl;function S(t){var n=t.startX,e=t.startY,r=t.ctx,i=t.points,o=t.lineWidth,a=void 0===o?1:o,u=t.color,s=void 0===u?"#975124":u;r.beginPath(),r.moveTo(n,e),r.lineWidth=a,r.strokeStyle=s,i&&i.length&&i.forEach((function(t){r.lineTo(t.pointX,t.pointY)})),r.stroke(),r.closePath(),r.save()}function b(t,n,e,r,i,o,a,u,s){function c(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function l(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===r&&(r=""),"number"==typeof r&&(r+=""),null==r&&(r=""),1===s?r.length<e&&(t.textAlign="center"):0===s?t.textAlign="left":2===s&&(t.textAlign="right");for(var f=1;c(r)>0;f++){var p=l(r,e),h=p.tlen,d=p.isNextLine;t.fillStyle=a,t.font=u,t.textBaseline="top",t.fillText(r.substr(0,h).replace(/^\s+|\s+$/,""),i,(f-1)*n+o),r=d?r.substr(h+1):r.substr(h)}t.save()}function w(t,n){var e,r,i,o,a=n.details,s=n.amount,c=n.taxAmount,l=(n.taxRate,n.listFlag),f=n.qdbz;function h(n,e,r){u(r)<=31?b(t,18,32,r,n,e,"#000000","normal 18px SimSun",0):u(r)<=35?b(t,18,36,r,n,e,"#000000","normal 16px SimSun",0):u(r)<=40?b(t,18,42,r,n,e,"#000000","normal 14px SimSun",0):u(r)<=47?b(t,18,48,r,n,e,"#000000","normal 12px SimSun",0):u(r)<=51?b(t,18,52,r,n,e,"#000000","normal 11px SimSun",0):b(t,11,52,r,n,e-4,"#000000","normal 11px SimSun",0)}function d(n,e,r){var i=r||0===r?Number(r).toFixed(2):r;b(t,18,18,i,n,e,"#000000","normal 18px SimSun",2)}function m(n,e,r,i){i?0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="免税":0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="不征税":"number"==typeof r&&(r=100*r+"%"):r=r,u(r)<=5?b(t,18,6,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=6?b(t,18,7,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=7?b(t,18,8,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=8?b(t,18,9,r,n,e,"#000000","normal 12px SimSun",2):b(t,12,9,r,n,e,"#000000","normal 12px SimSun",2)}function g(t){var n,e=[];t.details.forEach((function(r,i){n=0===r.taxPre&&1===r.taxPreType&&1!==Number(t.invoiceType)&&4!==Number(t.invoiceType)?"免税":0===r.taxPre&&2===r.taxPreType&&1!==Number(t.invoiceType)&&4!==Number(t.invoiceType)?"不征税":"number"==typeof r.taxRate?100*r.taxRate+"%":r.taxRate,e.includes(n)||e.push(n)})),1===e.length?m(986,338,e[0],""):2===e.length&&e.includes("免税")&&e.includes("不征税")&&m(986,338,"零税率","")}function v(n){var e;p(n.taxAmount)?e=n.taxAmount.toFixed(2):"number"==typeof n.taxAmount&&(e=0===n.taxAmount?"***":n.taxAmount.toFixed(2)),b(t,18,18,e,1154,338,"#000000","normal 18px SimSun",2)}if(1===l||a.length>8||1===f)s>=0?(h(38,338,"(详见销货清单)"),d(922,338,s),g(n),v(n)):(h(38,338,"详见对应正数发票及清单"),d(922,338,s),g(n),v(n));else{a.forEach((function(n,e){var r,i,o;if(h(38,338+22*e,""+(n.shortName||"")+n.goodsName),r=330,i=338+24*e,o=n.specification,u(o)<=14?b(t,18,15,o,r,i,"#000000","normal 18px SimSun",0):u(o)<=16?b(t,18,17,o,r,i,"#000000","normal 16px SimSun",0):u(o)<=19?b(t,18,20,o,r,i,"#000000","normal 13px SimSun",0):b(t,12,22,o,r,i-4,"#000000","normal 12px SimSun",0),function(n,e,r){u(r)<=7?b(t,18,8,r,n,e,"#000000","normal 18px SimSun",1):u(r)<=9?b(t,18,10,r,n,e,"#000000","normal 14px SimSun",1):u(r)<=11?b(t,18,12,r,n,e,"#000000","normal 12px SimSun",1):u(r)<=13?b(t,18,14,r,n,e,"#000000","normal 10px SimSun",1):u(r)<=17?b(t,18,18,r,n,e,"#000000","normal 8px SimSun",1):b(t,8,18,r,n,e,"#000000","normal 8px SimSun",1)}(502,338+22*e,n.unit),n.quantity&&n.unitPrice){var a=String(n.quantity),s=String(n.unitPrice);!function(n,e,r){u(r)<=10?b(t,18,11,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=12?b(t,18,13,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=14?b(t,18,15,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=16?b(t,18,17,r,n,e,"#000000","normal 12px SimSun",2):b(t,12,17,r,n,e,"#000000","normal 12px SimSun",2)}(640,338+22*e,a.length>13?a.substr(0,13):a),function(n,e,r){u(r)<=10?b(t,18,11,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=12?b(t,18,13,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=14?b(t,18,15,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=16?b(t,18,17,r,n,e,"#000000","normal 12px SimSun",2):b(t,12,17,r,n,e,"#000000","normal 12px SimSun",2)}(752,338+22*e,s.length>13?s.substr(0,13):s)}d(922,338+22*e,n.amount),m(986,338+22*e,n.taxRate,n),function(n,e,r,i){r=0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)||0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?"***":p(r)?"":0===r?"***":Number(r).toFixed(2),b(t,18,18,r,n,e,"#000000","normal 18px SimSun",2)}(1154,338+22*e,n.taxAmount,n)}))}e=922,r=520,o=(i=s)||0===i?Number(i).toFixed(2):i,b(t,18,18,o,e,r,"#000000","normal 18px Courier New",2);var x=p(c)?"":0===c?"***":c;""!==x&&"***"!==x&&(x="¥"+(x=x||0===x?Number(x).toFixed(2):x)),function(n,e,r){b(t,18,18,r,n,e,"#000000","normal 18px Courier New",2)}(1154,520,x)}function A(t){var n=t.data,e=t.showSample,r=document.createElement("canvas");if(r.getContext){var o=r.getContext("2d");!function(t,n,e){var r=t.invoiceType,o=t.invoiceCode,a=t.invoiceNo,u=t.amount,s=t.drewDate,c=t.checkCode,l="10";1===Number(r)?l="01":2===Number(r)?l="04":3===Number(r)?l="10":4===Number(r)&&(l="08");var f=new Date(s),p=f.getFullYear(),h=f.getMonth()+1,d=h.toString();h>=1&&h<=9&&(d="0"+h);var m=f.getDate(),g=m.toString();m>=0&&m<=9&&(g="0"+m);var v=s?""+p+d+g:"",y="01,"+l+","+o+","+a+","+(u||0===u?Number(u).toFixed(2):u)+","+v+","+c+",",S=""+y+i.ToCRC16(y,!0)+",";x.a.toCanvas(n,S,{errorCorrectionLevel:"M",margin:0,width:113},(function(t){t&&console.error(t),console.log("success!"),e()}))}(n,r,(function(){}));var a=o.getImageData(0,0,113,113);return r.width=1192,r.height=794,o.fillStyle="#fff",o.fillRect(0,0,1192,794),o.putImageData(a,48,20),function(t,n){function e(t,n,e,r,i){var o=.5522848,a=r*o,u=i*o;t.beginPath(),t.moveTo(n-r,e),t.bezierCurveTo(n-r,e-u,n-a,e-i,n,e-i),t.bezierCurveTo(n+a,e-i,n+r,e-u,n+r,e),t.bezierCurveTo(n+r,e+u,n+a,e+i,n,e+i),t.bezierCurveTo(n-a,e+i,n-r,e+u,n-r,e),t.closePath(),t.stroke()}t.strokeStyle="red",t.lineWidth=4,e(t,596,100,80,50),t.lineWidth=1,e(t,596,100,75,45),function(t,n,e,r){var i=n,o=e,a=59,u=160,s=a,c=(u-30)/(r.length-1);t.font="11px KaiTi";var l=70/a,f=57/a;t.scale(l,f);var p=0;for(p=0;p<r.length;p++)t.save(),t.beginPath(),t.translate(i+Math.cos(Math.PI/180*u)*s-6,o-Math.sin(Math.PI/180*u)*s+14),t.rotate(Math.PI/2-Math.PI/180*u),t.fillText(r.charAt(p),0,0),t.strokeText(r.charAt(p),0,0),u-=c,t.restore();t.scale(1/l,1/f)}(t,508,110,"全国统一发票监制章");var r=n.invoiceCode,i=void 0===r?"":r,o="";o=i&&12===i.length?i?i.substr(1,4):i:i?i.substr(0,4):i;var a=g(o,m,"taxOfficeCode","taxProvince")||"国家税务总局监制";a===o&&(a="国家税务总局监制"),console.log(a),function(t,n,e,r){var i=n,o=e,a=59,u=226,s=a,c=(u-150)/(r.length-1);t.font="11px KaiTi";var l=60/a,f=50/a;t.scale(l,f);var p=0;for(p=0;p<r.length;p++){t.save(),t.beginPath();var h=i+Math.cos(Math.PI/180*u)*s-6,d=o-Math.sin(Math.PI/180*u)*s+14;t.translate(h,d),t.rotate(Math.PI/180*(45-12*p)),t.fillText(r.charAt(p),0,0),t.strokeText(r.charAt(p),0,0),u+=c,t.translate(-h,-d),t.restore()}t.scale(1/l,1/f)}(t,594,96,a),b(t,18,50,"国家税务总局",596,94,"#ff0000","normal 14px KaiTi",1)}(o,n),function(t,n,e){e&&function(e){var r=e.invoiceStatus,i=e.status,o=e.amountWithTax,a=e.amount;function u(t){var n=t.startX,e=t.startY,r=t.ctx,i=t.points,o=t.lineWidth,a=void 0===o?1:o,u=t.color,s=void 0===u?"#975124":u;r.beginPath(),r.moveTo(n,e),r.lineWidth=a,r.strokeStyle=s,i&&i.length&&i.forEach((function(t){r.lineTo(t.pointX,t.pointY)})),r.stroke(),r.closePath()}t.save(),t.translate(940,582),t.rotate(-30*Math.PI/180),u({startX:-200,startY:-85,ctx:t,points:[{pointX:200,pointY:-85},{pointX:200,pointY:85},{pointX:-200,pointY:85},{pointX:-196,pointY:-85}],lineWidth:8,color:"#F17171"}),u({startX:-188,startY:-75,ctx:t,points:[{pointX:190,pointY:-75},{pointX:190,pointY:75},{pointX:-190,pointY:75},{pointX:-186,pointY:-75}],lineWidth:4,color:"#F17171"}),b(t,18,30,"样张",0,-36,"#F17171","normal 72px SimHei",1),20!==r&&20!==i||b(t,18,42,"已红冲",74,26,"#F17171","normal 32px SimHei",0),t.restore(),t.rotate(30*Math.PI/180),t.translate(-940,-582),30!==r&&30!==i||b(t,18,42,"作废",211,92,"#000","normal 32px SimHei",0),o<0&&a<0&&b(t,18,42,"销项负数",211,92,"#000","normal 28px SimHei",0),1===n.specialFlag&&b(t,18,42,"成品油",211,36,"#000","normal 28px SimHei",0)}(n)}(o,n,e),function(t){S({startX:26,startY:170,ctx:t,points:[{pointX:1164,pointY:170},{pointX:1164,pointY:702},{pointX:26,pointY:702},{pointX:26,pointY:170}],lineWidth:1,color:"#975124"}),S({startX:388,startY:100,ctx:t,points:[{pointX:801,pointY:100}],lineWidth:1,color:"#975124"}),S({startX:388,startY:104,ctx:t,points:[{pointX:801,pointY:104}],lineWidth:1,color:"#975124"}),S({startX:26,startY:294,ctx:t,points:[{pointX:1164,pointY:294}],lineWidth:1,color:"#975124"}),S({startX:26,startY:544,ctx:t,points:[{pointX:1164,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:26,startY:590,ctx:t,points:[{pointX:1164,pointY:590}],lineWidth:1,color:"#975124"}),S({startX:72,startY:170,ctx:t,points:[{pointX:72,pointY:294}],lineWidth:1,color:"#975124"}),S({startX:678,startY:170,ctx:t,points:[{pointX:678,pointY:294}],lineWidth:1,color:"#975124"}),S({startX:708,startY:170,ctx:t,points:[{pointX:708,pointY:294}],lineWidth:1,color:"#975124"}),S({startX:320,startY:294,ctx:t,points:[{pointX:320,pointY:590}],lineWidth:1,color:"#975124"}),S({startX:468,startY:294,ctx:t,points:[{pointX:468,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:536,startY:294,ctx:t,points:[{pointX:536,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:650,startY:294,ctx:t,points:[{pointX:650,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:762,startY:294,ctx:t,points:[{pointX:762,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:932,startY:294,ctx:t,points:[{pointX:932,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:996,startY:294,ctx:t,points:[{pointX:996,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:72,startY:590,ctx:t,points:[{pointX:72,pointY:702}],lineWidth:1,color:"#975124"}),S({startX:678,startY:590,ctx:t,points:[{pointX:678,pointY:702}],lineWidth:1,color:"#975124"}),S({startX:706,startY:590,ctx:t,points:[{pointX:706,pointY:702}],lineWidth:1,color:"#975124"})}(o),function(t,n){var e=n.invoiceType,r=n.invoiceCode;!function(){var n="";n=r&&12===r.length?r?r.substr(1,4):r:r?r.substr(0,4):r;var i=g(n,m,"taxOfficeCode","title")||"";i===n&&(i="");var o=i+"增值税电子普通发票";1===Number(e)?o=i+"增值税专用发票":2===Number(e)?o=i+"增值税普通发票":4===Number(e)&&(o=i+"增值税电子专用发票"),b(t,18,30,o,596,38,"#9C5223","normal 38px KaiTi",1)}(),b(t,18,30,"机器编号:",32,134,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"发票代码:",842,40,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"发票号码:",842,72,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"开票日期:",842,102,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"校验码:",842,134,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"购",40,198,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"买",40,226,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"方",40,252,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"密",684,198,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"码",684,226,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"区",684,252,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"销",40,614,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"售",40,640,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"方",40,668,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"备",684,616,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"注",684,662,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"名",84,178,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"称:",174,178,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"纳税人识别号:",84,208,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"地 址、电 话:",84,236,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"开户行及账号:",84,266,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"项目名称",132,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"规格型号",358,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"单位",484,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"数 量",570,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"单 价",684,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"金 额",828,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"税率",948,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"税 额",1058,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"合 计",134,520,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"价税合计(大写)",106,560,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"(小写)",864,560,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"名",84,594,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"称:",174,594,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"纳税人识别号:",84,622,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"地 址、电 话:",84,652,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"开户行及账号:",84,680,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"收款人:",40,710,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"复 核:",360,710,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"开票人:",598,710,"#9C5223","normal 18px KaiTi",0)}(o,n),function(t,n){var e=n.invoiceCode,r=n.invoiceNo,i=n.drewDate,o=n.checkCode,a=n.machineCode;n.invoiceStatus,n.status,b(t,18,42,e,940,40,"#000000","normal 18px SimSun",0),b(t,18,42,r,940,72,"#000000","normal 18px SimSun",0),b(t,18,42,a,126,134,"#000000","normal 18px SimSun",0),function(n){if(n){var e=new Date(n),r=e.getFullYear(),i=e.getMonth()+1,o=i.toString();i>=1&&i<=9&&(o="0"+i);var a=e.getDate(),u=a.toString();a>=0&&a<=9&&(u="0"+a),b(t,18,42,r+"年"+o+"月"+u+"日",940,102,"#000000","normal 18px SimSun",0)}}(i),function(n){if(void 0===n&&(n=""),!p(n))for(var e=n.length/4,r=0;r<4;r++){var i=n.substr(0===r?0:e*r,e);b(t,18,32,i,940+50*r,134,"#000000","normal 18px SimSun",0)}}(o)}(o,n),function(t,n){var e=n.purchaserName,r=n.purchaserTaxNo,i=n.purchaserAddress,o=n.purchaserTel,a=n.purchaserBankName,s=n.purchaserBankAccount,c=n.sellerName,l=n.sellerTaxNo,f=n.sellerAddress,p=n.sellerTel,h=n.sellerBankName,d=n.sellerBankAccount;function m(n,e,r){u(r)<=48?b(t,18,49,r,n,e,"#000000","normal 18px SimSun",0):u(r)<=62?b(t,18,63,r,n,e,"#000000","normal 15px SimSun",0):b(t,15,63,r,n,e-4,"#000000","normal 15px SimSun",0)}m(206,178,e),b(t,18,49,r,206,204,"#000000","normal 24px Courier New",0),m(206,236,""+(i||"")+(o||"")),m(206,266,""+(a||"")+(s||"")),m(206,594,c),b(t,18,49,l,206,618,"#000000","normal 24px Courier New",0),m(206,652,""+(f||"")+(p||"")),m(206,680,""+(h||"")+(d||""))}(o,n),function(t,n){var e=n.ciphertext,r=void 0===e?"":e;if(!p(r))for(var i=r.length/4,o=0;o<4;o++){b(t,18,32,r.substr(0===o?0:i*o,i),740,178+30*o,"#000000","normal 24px Courier New",0)}}(o,n),w(o,n),function(t,n){var e,r,i,o=n.amountWithTax;t.beginPath(),t.lineWidth=1,t.strokeStyle="black",t.arc(350,567,12,0,2*Math.PI,!1),t.stroke(),t.closePath(),t.save(),t.translate(350,567),t.rotate(45*Math.PI/180),t.lineWidth=1,t.strokeStyle="black",t.beginPath(),t.moveTo(-12,0),t.lineTo(12,0),t.moveTo(0,-12),t.lineTo(0,12),t.stroke(),t.closePath(),t.restore(),e=370,r=560,i=(i=o)>0?s(i).replace("元","圆"):"(负数)"+s(Math.abs(i)).replace("元","圆"),b(t,18,56,i,e,r,"#000000","normal 18px SimSun",0),function(n,e,r){b(t,18,56,r,n,e,"#000000","normal 22px Courier New",0)}(938,558,"¥"+(o||0===o?Number(o).toFixed(2):o))}(o,n),function(t,n){var e=n.remark;p(e)&&(e=""),b(t,18,50,e.replace(/\\r\\n/g,"\n")||"",714,596,"#000000","normal 18px SimSun",0)}(o,n),function(t,n){var e=n.payee,r=n.reviewer,i=n.drawer;b(t,18,50,e,106,710,"#000000","normal 18px SimSun",0),b(t,18,50,r,420,710,"#000000","normal 18px SimSun",0),b(t,18,50,i,666,710,"#000000","normal 18px SimSun",0)}(o,n),y(r.toDataURL("image/png",.92),300)}}e(85);var T=function(){return(T=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)};function E(t){var n=t.startX,e=t.startY,r=t.ctx,i=t.points;r.beginPath(),r.moveTo(n,e),r.lineWidth=1,r.strokeStyle="#975124",i&&i.length&&i.forEach((function(t){r.lineTo(t.pointX,t.pointY)})),r.stroke(),r.closePath(),r.save()}function P(t,n,e,r,i,o,a,u,s){function c(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function l(t,n){for(var e=t.length,r=e,i=0,o=0;o<e;o++)if(t.charCodeAt(o)>128){if(!(i+2<n)){r=o;break}i+=2}else{if(!(i+1<n)){r=o;break}i+=1}return r}"number"==typeof r&&(r+=""),null==r&&(r=""),1===s?r.length<e&&(t.textAlign="center"):0===s?t.textAlign="left":2===s&&(t.textAlign="right");for(var f=1;c(r)>0;f++){var p=l(r,e);t.fillStyle=a,t.font=u,t.textBaseline="top",t.fillText(r.substr(0,p).replace(/^\s+|\s+$/,""),i,(f-1)*n+o),r=r.substr(p)}t.save()}function C(t,n){var e=n.details,r=n.amount,i=n.taxAmount,o=n.invoiceListCurrent,a=n.invoiceListTotalCount,s=n.subtotalAmount,c=n.subtotalTaxAmount,l=n.discountAmount,f=n.discountTaxAmount;e.forEach((function(n,e){P(t,18,26,e+1,48,384+40*e,"#000000","normal 18px SimSun",1),function(n,e,r){u(r)<=25?P(t,18,26,r,n,e,"#000000","normal 18px SimSun",0):u(r)<=29?P(t,18,30,r,n,e,"#000000","normal 16px SimSun",0):u(r)<=33?P(t,18,34,r,n,e,"#000000","normal 14px SimSun",0):u(r)<=38?P(t,18,39,r,n,e,"#000000","normal 12px SimSun",0):u(r)<=46?P(t,18,47,r,n,e,"#000000","normal 10px SimSun",0):P(t,10,47,r,n,e-4,"#000000","normal 10px SimSun",0)}(84,384+40*e,""+(n.shortName||"")+n.goodsName),function(n,e,r){u(r)<=14?P(t,18,15,r,n,e,"#000000","normal 18px SimSun",0):u(r)<=16?P(t,18,17,r,n,e,"#000000","normal 16px SimSun",0):u(r)<=19?P(t,18,20,r,n,e,"#000000","normal 13px SimSun",0):P(t,13,22,r,n,e-4,"#000000","normal 12px SimSun",0)}(330,384+40*e,n.specification),function(n,e,r){u(r)<=7?P(t,18,8,r,n,e,"#000000","normal 18px SimSun",1):u(r)<=9?P(t,18,10,r,n,e,"#000000","normal 14px SimSun",1):u(r)<=11?P(t,18,12,r,n,e,"#000000","normal 12px SimSun",1):u(r)<=13?P(t,18,14,r,n,e,"#000000","normal 10px SimSun",1):u(r)<=17?P(t,18,18,r,n,e,"#000000","normal 8px SimSun",1):P(t,8,18,r,n,e,"#000000","normal 8px SimSun",1)}(502,384+40*e,n.unit),n.quantity&&n.unitPrice&&(function(n,e,r){u(r)<=10?P(t,18,11,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=12?P(t,18,13,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=14?P(t,18,15,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=16?P(t,18,17,r,n,e,"#000000","normal 12px SimSun",2):P(t,12,17,r,n,e,"#000000","normal 12px SimSun",2)}(640,384+40*e,n.quantity),function(n,e,r){u(r)<=10?P(t,18,11,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=12?P(t,18,13,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=14?P(t,18,15,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=16?P(t,18,17,r,n,e,"#000000","normal 12px SimSun",2):P(t,12,17,r,n,e,"#000000","normal 12px SimSun",2)}(752,384+40*e,n.unitPrice)),function(n,e,r){P(t,18,18,r,n,e,"#000000","normal 18px SimSun",2)}(922,384+40*e,n.amount),function(n,e,r,i){0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="免税":0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="不征税":"number"==typeof r&&(r=100*r+"%"),u(r)<=5?P(t,18,6,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=6?P(t,18,7,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=7?P(t,18,8,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=8?P(t,18,9,r,n,e,"#000000","normal 12px SimSun",2):P(t,12,9,r,n,e,"#000000","normal 12px SimSun",2)}(986,384+40*e,n.taxRate,n),function(n,e,r,i){r=0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)||0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?"***":p(r)?"":0===r?"***":r,P(t,18,18,r,n,e,"#000000","normal 18px SimSun",2)}(1154,384+40*e,n.taxAmount,n)})),o===a?(P(t,18,30,"¥"+s,922,1416,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+c,1154,1416,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+r,922,1496,"#000000","normal 18px Courier New",2)):(P(t,18,30,"¥"+s,922,1456,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+c,1154,1456,"#000000","normal 18px Courier New",2)),o===a?(P(t,18,30,"¥"+l,922,1456,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+f,1154,1456,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+i,1154,1496,"#000000","normal 18px Courier New",2)):(P(t,18,30,"¥"+l,922,1496,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+f,1154,1496,"#000000","normal 18px Courier New",2))}function N(t){var n=document.createElement("canvas");if(n.getContext){n.width=1194,n.height=1686;var e=n.getContext("2d");return e.fillStyle="#fff",e.fillRect(0,0,1194,1686),function(t){E({startX:26,startY:334,ctx:t,points:[{pointX:1166,pointY:334},{pointX:1166,pointY:1570},{pointX:26,pointY:1570},{pointX:26,pointY:334}]}),E({startX:26,startY:374,ctx:t,points:[{pointX:1166,pointY:374}]}),E({startX:26,startY:1526,ctx:t,points:[{pointX:1166,pointY:1526}]}),E({startX:76,startY:334,ctx:t,points:[{pointX:76,pointY:1570}]}),E({startX:320,startY:334,ctx:t,points:[{pointX:320,pointY:1526}]}),E({startX:468,startY:334,ctx:t,points:[{pointX:468,pointY:1526}]}),E({startX:536,startY:334,ctx:t,points:[{pointX:536,pointY:1526}]}),E({startX:650,startY:334,ctx:t,points:[{pointX:650,pointY:1526}]}),E({startX:762,startY:334,ctx:t,points:[{pointX:762,pointY:1526}]}),E({startX:932,startY:334,ctx:t,points:[{pointX:932,pointY:1526}]}),E({startX:996,startY:334,ctx:t,points:[{pointX:996,pointY:1526}]})}(e),function(t,n){var e,r=n.invoiceType,i=n.invoiceListCurrent,o=n.invoiceListTotalCount;P(t,18,40,"销售货物或者提供应税劳务、服务清单",597,80,"#9C5223","normal 38px KaiTi",1),P(t,18,30,"购买方名称:",56,210,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"销售方名称:",56,242,"#9C5223","normal 18px KaiTi",0),e="所属增值税电子普通发票代码:",1===Number(r)?e="所属增值税专用发票代码:":2===Number(r)?e="所属增值税普通发票代码:":4===Number(r)&&(e="所属增值税电子专用发票代码:"),P(t,18,30,e,56,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"号码:",538,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"共",936,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"页",1018,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"第",1056,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"页",1136,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"序号",34,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"项目名称",162,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"规格型号",358,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"单位",484,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"数量",576,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"单价",688,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"金额",828,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"税率",946,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"税额",1064,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"备注",34,1536,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"开票日期:",788,1578,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"年",920,1578,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"月",966,1578,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"日",1012,1578,"#9C5223","normal 18px KaiTi",0),i===o?(P(t,18,30,"小计",34,1416,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"折扣",34,1456,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"总计",34,1496,"#9C5223","normal 18px KaiTi",0)):(P(t,18,30,"小计",34,1456,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"折扣",34,1496,"#9C5223","normal 18px KaiTi",0))}(e,t),C(e,t),function(t,n){P(t,18,120,n.remark,86,1530,"#000000","normal 18px SimSun",0)}(e,t),function(t,n){var e=n.purchaserName,r=n.sellerName,i=n.invoiceNo,o=n.invoiceCode,a=n.invoiceListTotalCount,u=n.invoiceListCurrent;P(t,16,110,e,168,210,"#000000","normal 18px SimSun",0),P(t,16,110,r,168,242,"#000000","normal 18px SimSun",0),P(t,18,50,o,300,274,"#000000","normal 18px SimSun",0),P(t,18,50,i,594,274,"#000000","normal 18px SimSun",0),P(t,18,50,a,986,274,"#000000","normal 18px SimSun",1),P(t,18,50,u,1106,274,"#000000","normal 18px SimSun",1)}(e,t),function(t,n){var e=n.drewDate;if(e){var r=new Date(e),i=r.getFullYear(),o=r.getMonth()+1,a=o.toString();o>=1&&o<=9&&(a="0"+o);var u=r.getDate(),s=u.toString();u>=0&&u<=9&&(s="0"+u),P(t,18,50,i,878,1578,"#000000","normal 18px SimSun",0),P(t,18,50,a,944,1578,"#000000","normal 18px SimSun",0),P(t,18,50,s,988,1578,"#000000","normal 18px SimSun",0)}}(e,t),n.toDataURL()}}var R=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},I=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},Y=e(80).changeDpiDataUrl,_=e(154);function O(t){var n=t.startX,e=t.startY,r=t.ctx,i=t.points,o=t.lineWidth,a=void 0===o?4:o,u=t.color,s=void 0===u?"#000":u;r.beginPath(),r.moveTo(n,e),r.lineWidth=a,r.strokeStyle=s,i&&i.length&&i.forEach((function(t){r.lineTo(t.pointX,t.pointY)})),r.stroke(),r.closePath(),r.save()}function B(t,n,e,r,i,o,a,u,s){function c(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function l(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===r&&(r=""),"number"==typeof r&&(r+=""),null==r&&(r=""),1===s?r.length<e&&(t.textAlign="center"):0===s?t.textAlign="left":2===s&&(t.textAlign="right");for(var f=1;c(r)>0;f++){var p=l(r,e),h=p.tlen,d=p.isNextLine;t.fillStyle=a,t.font=u,t.textBaseline="top",t.fillText(r.substr(0,h).replace(/^\s+|\s+$/,""),i,(f-1)*n+o),r=d?r.substr(h+1):r.substr(h)}t.save()}function L(t,n){var e=n.goodsDetailList;(void 0===e?[]:e).forEach((function(n,e){var r,i,o;r=196,i=1660+204*e,o=n.goodsNo,B(t,40,30,o,r,i,"#000000","normal 48px SimSun",0),function(n,e,r){B(t,40,30,r,n,e,"#000000","normal 48px SimSun",0)}(401,1660+204*e,n.goodsCode),function(n,e,r){B(t,54,44,r,n,e,"#000000","normal 48px SimSun",0)}(1e3,1660+204*e,""+n.goodsName+n.specification),function(n,e,r){var i=r.quantity,o=r.unit,a=r.quantity1,u=r.quantity2,s=""+(a||"")+(r.unit1Name||""),c=""+(u||"")+(r.unit2Name||"");B(t,40,53,""+(i||"")+(o||""),n,e,"#000000","normal 48px SimSun",2),B(t,40,53,s,n,e+55,"#000000","normal 48px SimSun",2),B(t,40,53,c,n,e+110,"#000000","normal 48px SimSun",2)}(2500,1660+204*e,{quantity:n.quantity,unit:n.unit,quantity1:n.quantity1,quantity2:n.quantity2,unit1Name:n.unit1Name,unit2Name:n.unit2Name}),function(n,e,r){var i=r.unitPrice,o=r.declTotal,a=r.tradeCurrency;B(t,40,53,i,n,e,"#000000","normal 48px SimSun",2),B(t,40,53,o,n,e+55,"#000000","normal 48px SimSun",2),B(t,40,53,a,n,e+110,"#000000","normal 48px SimSun",2)}(2860,1660+204*e,{unitPrice:n.unitPrice,declTotal:n.declTotal,tradeCurrency:n.tradeCurrency}),function(n,e,r){B(t,40,30,r,n,e,"#000000","normal 48px SimSun",0)}(2960,1660+204*e,n.cusOriginCountryName+"("+n.cusOriginCountry+")"),function(n,e,r){B(t,40,53,r,n,e,"#000000","normal 48px SimSun",0)}(3226,1660+204*e,n.destinationCountryName+"("+n.destinationCountry+")"),function(n,e,r){B(t,40,53,r,n,e,"#000000","normal 48px SimSun",0)}(3800,1660+204*e,n.districtCodeName+"("+n.districtCode+")"),function(n,e,r){B(t,40,53,r,n,e,"#000000","normal 48px SimSun",0)}(4280,1660+204*e,n.dutyModeName)}))}function M(t){var n=t.data;return R(this,void 0,void 0,(function(){function t(t){var n=new Image;return n.src=t,new Promise((function(t,e){n.onload=function(){t(n)}}))}var e,r,i,o,a,s,c;return I(this,(function(l){switch(l.label){case 0:return e=n.entryId,r="*"+e+"*",[4,t(_.default)];case 1:return i=l.sent(),o={errorCorrectionLevel:"M",margin:0,width:235},[4,x.a.toDataURL(r,o)];case 2:return[4,t(l.sent())];case 3:return a=l.sent(),console.log(a),(s=document.createElement("canvas")).getContext?(c=s.getContext("2d"),console.log("window.devicePixelRatio",window.devicePixelRatio),.5,s.width=2340,s.height=1653.5,c.scale(.5,.5),c.fillStyle="#fff",c.fillRect(0,0,4680,3307),c.drawImage(i,155,144,239,225),c.drawImage(a,4249,144,235,235),function(t){O({startX:152,startY:517,ctx:t,points:[{pointX:4488,pointY:517},{pointX:4488,pointY:3167},{pointX:152,pointY:3167},{pointX:152,pointY:517}],lineWidth:4,color:"#000"}),O({startX:152,startY:640,ctx:t,points:[{pointX:4488,pointY:640}],lineWidth:4,color:"#000"}),O({startX:152,startY:764,ctx:t,points:[{pointX:4488,pointY:764}],lineWidth:4,color:"#000"}),O({startX:152,startY:887,ctx:t,points:[{pointX:4488,pointY:887}],lineWidth:4,color:"#000"}),O({startX:152,startY:1010,ctx:t,points:[{pointX:4488,pointY:1010}],lineWidth:4,color:"#000"}),O({startX:152,startY:1134,ctx:t,points:[{pointX:4488,pointY:1134}],lineWidth:4,color:"#000"}),O({startX:152,startY:1257,ctx:t,points:[{pointX:4488,pointY:1257}],lineWidth:4,color:"#000"}),O({startX:152,startY:1564,ctx:t,points:[{pointX:4488,pointY:1564}],lineWidth:4,color:"#000"}),O({startX:152,startY:1642,ctx:t,points:[{pointX:4488,pointY:1642}],lineWidth:4,color:"#000"}),O({startX:152,startY:1844,ctx:t,points:[{pointX:4488,pointY:1844}],lineWidth:4,color:"#000"}),O({startX:152,startY:2049,ctx:t,points:[{pointX:4488,pointY:2049}],lineWidth:4,color:"#000"}),O({startX:152,startY:2254,ctx:t,points:[{pointX:4488,pointY:2254}],lineWidth:4,color:"#000"}),O({startX:152,startY:2458,ctx:t,points:[{pointX:4488,pointY:2458}],lineWidth:4,color:"#000"}),O({startX:152,startY:2663,ctx:t,points:[{pointX:4488,pointY:2663}],lineWidth:4,color:"#000"}),O({startX:152,startY:2865,ctx:t,points:[{pointX:4488,pointY:2865}],lineWidth:4,color:"#000"}),O({startX:152,startY:2954,ctx:t,points:[{pointX:4488,pointY:2954}],lineWidth:4,color:"#000"}),O({startX:152,startY:3167,ctx:t,points:[{pointX:4488,pointY:3167}],lineWidth:4,color:"#000"}),O({startX:1499,startY:521,ctx:t,points:[{pointX:1499,pointY:1134}],lineWidth:4,color:"#000"}),O({startX:2209,startY:521,ctx:t,points:[{pointX:2209,pointY:1134}],lineWidth:4,color:"#000"}),O({startX:3038,startY:521,ctx:t,points:[{pointX:3038,pointY:1134}],lineWidth:4,color:"#000"}),O({startX:3697,startY:521,ctx:t,points:[{pointX:3697,pointY:640}],lineWidth:4,color:"#000"}),O({startX:1698,startY:1010,ctx:t,points:[{pointX:1698,pointY:1134}],lineWidth:4,color:"#000"}),O({startX:2715,startY:1010,ctx:t,points:[{pointX:2715,pointY:1134}],lineWidth:4,color:"#000"}),O({startX:3522,startY:1010,ctx:t,points:[{pointX:3522,pointY:1134}],lineWidth:4,color:"#000"}),O({startX:4005,startY:1010,ctx:t,points:[{pointX:4005,pointY:1134}],lineWidth:4,color:"#000"})}(c),function(t,n){console.log(n),B(t,89,40,"中华人民共和国海关出口货物报关单",2340,180,"#000","normal 90px SimSun",1),B(t,38,30,"预录入编号:",155,449,"#000","normal 42px SimSun",0),B(t,38,30,"海关编号:",1522,449,"#000","normal 42px SimSun",0),B(t,38,30,"海关编号:",1522,449,"#000","normal 42px SimSun",0),B(t,38,30,"仅供核对用",3292,449,"#000","normal 42px SimSun",0),B(t,38,30,"页码/页数:",4171,449,"#000","normal 42px SimSun",0),B(t,38,30,"境内发货人",178,530,"#000","normal 42px SimSun",0),B(t,38,30,"出境关别 ("+n.importExportPort+")",1527,530,"#000","normal 42px SimSun",0),B(t,38,30,"出口日期",2237,530,"#000","normal 42px SimSun",0),B(t,38,30,"申报日期",3066,530,"#000","normal 42px SimSun",0),B(t,38,30,"备案号",3720,530,"#000","normal 42px SimSun",0),B(t,38,30,"境外收货人",178,655,"#000","normal 42px SimSun",0),B(t,38,30,"运输方式 ("+n.cusTrafficMode+")",1527,655,"#000","normal 42px SimSun",0),B(t,38,30,"运输工具名称及航次号",2237,655,"#000","normal 42px SimSun",0),B(t,38,30,"提运单号",3066,655,"#000","normal 42px SimSun",0),B(t,38,36,"生产销售单位 ("+n.ownerSocialCreditCode+")",178,779,"#000","normal 42px SimSun",0),B(t,38,30,"监管方式 ("+n.superviseModeCode+")",1527,779,"#000","normal 42px SimSun",0),B(t,38,30,"征免性质 ("+n.cutMode+")",2237,779,"#000","normal 42px SimSun",0),B(t,38,30,"许可证号",3066,779,"#000","normal 42px SimSun",0),B(t,38,30,"合同协议号",178,901,"#000","normal 42px SimSun",0),B(t,38,30,"贸易国(地区)",1527,901,"#000","normal 42px SimSun",0),B(t,38,30,"运抵国 ("+n.cusTradeCountry+") ",2237,901,"#000","normal 42px SimSun",0),B(t,38,30,"指运港 ("+n.distinatePort+")",3066,901,"#000","normal 42px SimSun",0),B(t,38,30,"离境口岸 ("+n.departurePortCode+")",3720,901,"#000","normal 42px SimSun",0),B(t,38,30,"包装种类 ("+n.wrapType+")",178,1023,"#000","normal 42px SimSun",0),B(t,38,30,"件数",1527,1023,"#000","normal 42px SimSun",0),B(t,38,30,"毛重(千克)",1724,1023,"#000","normal 42px SimSun",0),B(t,38,30,"净重(千克)",2237,1023,"#000","normal 42px SimSun",0),B(t,38,30,"成交方式 ("+n.transacMode+")",2736,1023,"#000","normal 42px SimSun",0),B(t,38,30,"运费",3066,1023,"#000","normal 42px SimSun",0),B(t,38,30,"保费",3547,1023,"#000","normal 42px SimSun",0),B(t,38,30,"杂费",4028,1023,"#000","normal 42px SimSun",0),B(t,38,30,"附随单证及编号",178,1156,"#000","normal 42px SimSun",0),B(t,38,30,"标记唛码备注",178,1279,"#000","normal 42px SimSun",0),B(t,38,30,"项号",192,1585,"#000","normal 40px SimSun",0),B(t,38,30,"商品编号",400,1585,"#000","normal 40px SimSun",0),B(t,38,30,"商品名称及规格型号",1239,1585,"#000","normal 40px SimSun",0),B(t,38,30,"数量及单位",2279,1585,"#000","normal 40px SimSun",0),B(t,38,30,"单价/总价/币制",2626,1585,"#000","normal 40px SimSun",0),B(t,38,30,"原产国(地区)",2945,1585,"#000","normal 40px SimSun",0),B(t,38,30,"最终目的国(地区)",3226,1585,"#000","normal 40px SimSun",0),B(t,38,30,"境内货源地",3809,1585,"#000","normal 40px SimSun",0),B(t,38,30,"征免",4326,1585,"#000","normal 40px SimSun",0),B(t,38,30,"特殊关系确认:",783,2893,"#000","normal 42px SimSun",0),B(t,38,30,"价格影响确认:",1689,2893,"#000","normal 42px SimSun",0),B(t,38,30,"支付特许权使用费确认:",2596,2893,"#000","normal 42px SimSun",0),B(t,38,30,"自报自缴:",3678,2893,"#000","normal 42px SimSun",0),B(t,38,30,"报关人员",177,2993,"#000","normal 42px SimSun",0),B(t,38,30,"报关人员证号",660,2993,"#000","normal 42px SimSun",0),B(t,38,30,"电话",1315,2993,"#000","normal 42px SimSun",0),B(t,38,50,"兹申明对以上内容承担如实申报、依法纳税之法律责任",1822,2993,"#000","normal 42px SimSun",0),B(t,38,30,"海关批注及签章",3062,2993,"#000","normal 42px SimSun",0),B(t,38,30,"申报单位",177,3107,"#000","normal 42px SimSun",0),B(t,38,30,"申报单位(签章)",2515,3107,"#000","normal 42px SimSun",0)}(c,n),function(t,n){var e=n.preEntryId,r=n.entryId,i=n.consignorCname,o=n.importExportPortName,a=n.importExportDate,s=n.declareDate,c=n.manualNo,l=n.consigneeEname,f=n.cusTrafficModeName,p=n.trafficName,h=n.billNo,d=n.ownerName,m=n.superviseModeCodeName,g=n.cutModeName,v=n.licenseNo,x=n.contractNo,y=(n.cusTradeCountry,n.distinatePort,n.cusTradeCountryName),S=n.distinatePortName,b=n.departurePortCodeName,w=n.wrapTypeName,A=n.packNum,T=n.grossWeight,E=n.netWeight,P=n.transacModeName,C=n.feeCurrency,N=n.feeMark,R=n.feeRate,I=n.insuranceCurrency,Y=n.insuranceMark,_=n.insuranceRate,O=n.otherCurrency,L=n.otherMark,M=n.otherRate,X=n.remark,D=n.agentName,k=n.agentSocialCreditCode;function F(n,e,r){u(r)<=56?B(t,38,56,r,n,e,"#000000","normal 48px SimSun",0):u(r)<=76?B(t,40,64,r,n,e-15,"#000000","normal 42px SimSun",0):B(t,30,66,r,n,e-4,"#000000","normal 40px SimSun",0)}n.ownerSocialCreditCode,F(395,447,e),F(1723,447,r),F(180,580,i),F(1529,587,o),F(2240,587,a),F(3069,587,s),F(3724,587,c),F(180,708,l),F(1529,708,f),F(2239,708,p),F(3066,708,h),F(180,832,d),F(1529,832,m),F(2241,832,g),F(3068,832,v),F(179,953,x),F(2239,953,y),F(3069,953,S),F(3720,953,b),F(179,1075,w),F(1529,1075,A),F(1729,1075,T),F(2240,1075,E),F(2737,1075,P),F(380,3105,D+"("+k+")"),R&&N&&F(3071,1079,(C||"000")+"/"+R+"/"+N),_&&Y&&F(3549,1079,(I||"000")+"/"+_+"/"+Y),M&&L&&F(4030,1079,(O||"000")+"/"+M+"/"+L),B(t,48,180,X,180,1333,"#000000","normal 48px SimSun",0)}(c,n),L(c,n),function(t,n){B(t,38,55,"*"+n.entryId+"*",3144,133,"#000000","normal 160px C39HrP24DhTt",0)}(c,n),B(c,38,30,"1/1",4371,449,"#000","normal 38px SimSun",0),[2,Y(s.toDataURL("image/png",.92),300)]):[2]}}))}))}e(155);var X=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},D=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function k(t,n,e,r,i,o,a,u,s){function c(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function l(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===r&&(r=""),"number"==typeof r&&(r+=""),null==r&&(r=""),1===s?r.length<e&&(t.textAlign="center"):0===s?t.textAlign="left":2===s&&(t.textAlign="right");for(var f=1;c(r)>0;f++){var p=l(r,e),h=p.tlen,d=p.isNextLine;t.fillStyle=a,t.font=u,t.textBaseline="top",t.fillText(r.substr(0,h).replace(/^\s+|\s+$/,""),i,(f-1)*n+o),r=d?r.substr(h+1):r.substr(h)}t.save()}function F(t){var n=t.data;return X(this,void 0,void 0,(function(){var t,e,r,i,o,a,u,s,c,l,f;return D(this,(function(p){switch(p.label){case 0:return t=n.url,e=n.amountWithTax,r=n.remark,i=n.sellerName,o=n.orderCode,a=n.createTime,u={errorCorrectionLevel:"M",margin:0,width:800},[4,x.a.toDataURL(t,u)];case 1:return s=p.sent(),[4,(h=s,d=new Image,d.src=h,new Promise((function(t,n){d.onload=function(){t(d)}})))];case 2:return c=p.sent(),console.log(c),(l=document.createElement("canvas")).getContext?(f=l.getContext("2d"),l.width=1200,l.height=1900,f.fillStyle="#fff",f.fillRect(0,0,1200,1900),f.fillStyle="#3378FF",f.fillRect(0,0,1200,280),f.fillStyle="rgba(255, 128, 0, 0.04)",f.fillRect(0,280,1200,104),f.drawImage(c,200,484,800,800),k(f,80,30,i,600,63,"#FFFFFF","Bold 56px Microsoft YaHei",1),k(f,52,60,"提醒:二维码有效期为15天,电子发票默认推送至客户定制邮箱",47,310,"#FF8000","400 40px Microsoft YaHei",0),k(f,52,16,"发票金额",200,1384,"#666666","400 40px Microsoft YaHei",0),k(f,52,16,"开票日期",200,1500,"#666666","400 40px Microsoft YaHei",0),k(f,52,16,"订单编号",200,1616,"#666666","400 40px Microsoft YaHei",0),k(f,52,8,"备注",200,1732,"#666666","400 40px Microsoft YaHei",0),k(f,52,20,e,1e3,1384,"#000000","Bold 40px Microsoft YaHei",2),k(f,52,20,a,1e3,1500,"#000000","Bold 40px Microsoft YaHei",2),k(f,52,20,o,1e3,1616,"#000000","Bold 40px Microsoft YaHei",2),k(f,52,36,r,1e3,1732,"#000000","Bold 40px Microsoft YaHei",2),[2,l.toDataURL()]):[2]}var h,d}))}))}var W=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},j=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function U(t){var n=t.startX,e=t.startY,r=t.ctx,i=t.points,o=t.lineWidth,a=void 0===o?4:o,u=t.color,s=void 0===u?"#000":u;r.beginPath(),r.moveTo(n,e),r.lineWidth=a,r.strokeStyle=s,i&&i.length&&i.forEach((function(t){r.lineTo(t.pointX,t.pointY)})),r.stroke(),r.closePath(),r.save()}function K(t,n){var e=n.details;function r(n,e,r){u(r)<=11?d(t,44,12,r,n,e,"#000000","normal 44px SimSun",2):u(r)<=14?d(t,36,15,r,n,e,"#000000","normal 36px SimSun",2):(u(r),d(t,20,20,r,n,e,"#000000","normal 26px SimSun",2))}function i(n,e,r,i){r=0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)||0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?"***":p(r)?"":0===r?"***":r,u(r)<=18?d(t,44,19,r,n,e,"#000000","normal 44px SimSun",2):u(r)<=22?d(t,36,23,r,n,e,"#000000","normal 36px SimSun",2):u(r)<=30?d(t,26,31,r,n,e,"#000000","normal 26px SimSun",2):u(r)<=34?d(t,24,35,r,n,e,"#000000","normal 24px SimSun",2):u(r)<=42?d(t,20,43,r,n,e,"#000000","normal 20px SimSun",0):d(t,20,43,r,n,e-4,"#000000","normal 20px SimSun",0)}e.forEach((function(n,e){var o,a,s;o=432,a=793+40*e,s=""+n.goodsName,u(s)<=18?d(t,44,19,s,o,a,"#000000","normal 44px SimSun",0):u(s)<=22?d(t,40,23,s,o,a,"#000000","normal 36px SimSun",0):u(s)<=30?d(t,26,31,s,o,a,"#000000","normal 26px SimSun",0):u(s)<=34?d(t,24,35,s,o,a,"#000000","normal 24px SimSun",0):u(s)<=42?d(t,20,43,s,o,a,"#000000","normal 20px SimSun",0):d(t,20,43,s,o,a-4,"#000000","normal 20px SimSun",0),n.quantity&&n.unitPrice&&(function(n,e,r){u(r)<=18?d(t,44,19,r,n,e,"#000000","normal 44px SimSun",2):u(r)<=22?d(t,36,23,r,n,e,"#000000","normal 36px SimSun",2):u(r)<=30?d(t,26,31,r,n,e,"#000000","normal 26px SimSun",2):u(r)<=34?d(t,24,35,r,n,e,"#000000","normal 24px SimSun",2):u(r)<=42?d(t,20,43,r,n,e,"#000000","normal 20px SimSun",0):d(t,20,43,r,n,e-4,"#000000","normal 20px SimSun",0)}(1238,793+40*e,n.quantity),function(n,e,r){u(r)<=11?d(t,44,12,r,n,e,"#000000","normal 44px SimSun",2):u(r)<=14?d(t,36,15,r,n,e,"#000000","normal 36px SimSun",2):(u(r),d(t,20,20,r,n,e,"#000000","normal 26px SimSun",2))}(1516,793+40*e,n.unitPrice)),r(1794,793+40*e,n.amount),function(n,e,r,i){0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="免税":0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="不征税":"number"==typeof r&&(r=100*r+"%"),d(t,44,6,r,n,e,"#000000","normal 44px SimSun",1)}(1885,793+40*e,n.taxRate,n),i(2278,793+40*e,n.taxAmount,n)}));var o=e[0].amount,a=e[0].taxAmount;r(1794,1743,o?"¥"+o:o),i(2278,1743,a?"¥"+a:a,e[0])}function z(t){var n=t.data;return W(this,void 0,void 0,(function(){var t,e;return j(this,(function(r){return(t=document.createElement("canvas")).getContext?(e=t.getContext("2d"),t.width=2480,t.height=3508,e.fillStyle="#fff",e.fillRect(0,0,2480,3508),function(t){U({startX:200,startY:472,ctx:t,points:[{pointX:2280,pointY:472},{pointX:2280,pointY:3303},{pointX:200,pointY:3303},{pointX:200,pointY:472}],lineWidth:4,color:"#000"}),U({startX:200,startY:672,ctx:t,points:[{pointX:2280,pointY:672}],lineWidth:4,color:"#000"}),U({startX:424,startY:572,ctx:t,points:[{pointX:1240,pointY:572}],lineWidth:4,color:"#000"}),U({startX:1464,startY:572,ctx:t,points:[{pointX:2280,pointY:572}],lineWidth:4,color:"#000"}),U({startX:424,startY:472,ctx:t,points:[{pointX:424,pointY:3303}],lineWidth:4,color:"#000"}),U({startX:738,startY:472,ctx:t,points:[{pointX:738,pointY:672}],lineWidth:4,color:"#000"}),U({startX:1240,startY:472,ctx:t,points:[{pointX:1240,pointY:784}],lineWidth:4,color:"#000"}),U({startX:1464,startY:472,ctx:t,points:[{pointX:1464,pointY:672}],lineWidth:4,color:"#000"}),U({startX:1778,startY:472,ctx:t,points:[{pointX:1778,pointY:672}],lineWidth:4,color:"#000"}),U({startX:424,startY:784,ctx:t,points:[{pointX:2280,pointY:784}],lineWidth:4,color:"#000"}),U({startX:842,startY:672,ctx:t,points:[{pointX:842,pointY:784}],lineWidth:4,color:"#000"}),U({startX:1240,startY:672,ctx:t,points:[{pointX:1240,pointY:784}],lineWidth:4,color:"#000"}),U({startX:1518,startY:672,ctx:t,points:[{pointX:1518,pointY:784}],lineWidth:4,color:"#000"}),U({startX:1796,startY:672,ctx:t,points:[{pointX:1796,pointY:784}],lineWidth:4,color:"#000"}),U({startX:1974,startY:672,ctx:t,points:[{pointX:1974,pointY:784}],lineWidth:4,color:"#000"}),U({startX:200,startY:1808,ctx:t,points:[{pointX:2280,pointY:1808}],lineWidth:4,color:"#000"}),U({startX:200,startY:2833,ctx:t,points:[{pointX:2280,pointY:2833}],lineWidth:4,color:"#000"}),U({startX:1090,startY:2419,ctx:t,points:[{pointX:1493,pointY:2419}],lineWidth:2,color:"#000"}),U({startX:1643,startY:2419,ctx:t,points:[{pointX:2055,pointY:2419}],lineWidth:2,color:"#000"}),U({startX:1090,startY:2750,ctx:t,points:[{pointX:1493,pointY:2750}],lineWidth:2,color:"#000"}),U({startX:1643,startY:2750,ctx:t,points:[{pointX:2055,pointY:2750}],lineWidth:2,color:"#000"}),U({startX:698,startY:1828,ctx:t,points:[{pointX:750,pointY:1828},{pointX:750,pointY:1880},{pointX:698,pointY:1880},{pointX:698,pointY:1828}],lineWidth:2,color:"#000"}),U({startX:910,startY:1957,ctx:t,points:[{pointX:962,pointY:1957},{pointX:962,pointY:2009},{pointX:910,pointY:2009},{pointX:910,pointY:1957}],lineWidth:2,color:"#000"}),U({startX:910,startY:2025,ctx:t,points:[{pointX:962,pointY:2025},{pointX:962,pointY:2077},{pointX:910,pointY:2077},{pointX:910,pointY:2025}],lineWidth:2,color:"#000"}),U({startX:698,startY:2486,ctx:t,points:[{pointX:750,pointY:2486},{pointX:750,pointY:2537},{pointX:698,pointY:2537},{pointX:698,pointY:2486}],lineWidth:2,color:"#000"})}(e),function(t){d(t,64,40,"开具红字增值税专用发票信息表",1240,180,"#000","normal 64px Microsoft YaHei",1),d(t,40,40,"填开日期:",272,384,"#000","normal 40px Microsoft YaHei",0),d(t,48,10,"销售方",312,545,"#000","normal 48px SimSun",1),d(t,48,10,"购买方",1352,545,"#000","normal 48px SimSun",1),d(t,44,20,"名 称",581,497,"#000","normal 44px SimSun",1),d(t,44,20,"纳税人识别号",581,596,"#000","normal 44px SimSun",1),d(t,44,20,"名 称",1621,497,"#000","normal 44px SimSun",1),d(t,44,20,"纳税人识别号",1621,596,"#000","normal 44px SimSun",1),d(t,60,5,"开具红字专用发票内容",312,1054,"#000","normal 48px SimSun",1),d(t,44,18,"货物(劳务服务)名称",633,680,"#000","normal 44px SimSun",1),d(t,44,18,"数量",1046,703,"#000","normal 44px SimSun",1),d(t,44,18,"单价",1379,703,"#000","normal 44px SimSun",1),d(t,44,18,"金额",1662,703,"#000","normal 44px SimSun",1),d(t,44,18,"税率",1885,703,"#000","normal 44px SimSun",1),d(t,44,18,"税额",2137,703,"#000","normal 44px SimSun",1),d(t,44,18,"合计",590,1743,"#000","normal 44px SimSun",0),d(t,60,5,"说明",312,2296,"#000","normal 48px SimSun",1),d(t,48,20,"一、购买方",450,1830,"#000","normal 48px SimSun",0),d(t,48,100,"对应蓝字专用发票抵扣增值税销项税额情况:",536,1893,"#000","normal 44px SimSun",0),d(t,48,100,"1.已抵扣:",698,1961,"#000","normal 44px SimSun",0),d(t,48,100,"2.未抵扣:",698,2029,"#000","normal 44px SimSun",0),d(t,48,100,"对应蓝字专用发票的代码:",536,2351,"#000","normal 44px SimSun",0),d(t,48,100,"号码:",1504,2351,"#000","normal 44px SimSun",0),d(t,48,20,"二、销售方",450,2488,"#000","normal 48px SimSun",0),d(t,48,100,"对应蓝字专用发票的代码:",536,2691,"#000","normal 44px SimSun",0),d(t,48,100,"号码:",1504,2691,"#000","normal 44px SimSun",0),d(t,60,7,"红字发票信息表编号",240,2978,"#000","normal 48px SimSun",1)}(e),function(t,n){var e=n.applyTime,r=new Date(e),i=r.getFullYear(),o=r.getMonth()+1,a=o.toString();o>=1&&o<=9&&(a="0"+o);var u=r.getDate(),s=u.toString();u>=0&&u<=9&&(s="0"+u),d(t,44,24,e?i+"年"+a+"月"+s+"日":"",500,378,"#000","normal 44px SimSun",0)}(e,n),function(t,n){console.log(n),d(t,48,24,n.sellerName,753,476,"#000","normal 44px SimSun",0),d(t,48,24,n.sellerTaxNo,753,600,"#000","normal 44px SimSun",0),d(t,48,24,n.purchaserName,1786,476,"#000","normal 44px SimSun",0),d(t,48,24,n.purchaserTaxNo,1786,600,"#000","normal 44px SimSun",0)}(e,n),K(e,n),function(t,n){var e=n.applicationRole,r=n.invoiceCode,i=n.invoiceNo,o=n.deductFlag;1===e?(d(t,44,43,r,1090,2351,"#000000","normal 44px SimSun",0),d(t,44,43,i,1644,2351,"#000000","normal 44px SimSun",0),d(t,44,43,"√",698,1828,"#000000","normal 50px SimSun",0),1===o?d(t,44,43,"√",910,1957,"#000000","normal 50px SimSun",0):2===o&&d(t,44,43,"√",910,2025,"#000000","normal 50px SimSun",0)):(d(t,44,43,r,1090,2691,"#000000","normal 44px SimSun",0),d(t,44,43,i,1644,2691,"#000000","normal 44px SimSun",0),d(t,44,43,"√",698,2486,"#000000","normal 50px SimSun",0))}(e,n),d(e,44,43,n.applicationNo,440,3043,"#000000","normal 50px SimSun",0),[2,t.toDataURL()]):[2]}))}))}var Q=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},H=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function J(t,n){t.lineWidth=4,t.strokeStyle="black",t.beginPath(),t.setLineDash([20,15]),t.moveTo(0,n),t.lineTo(630,n),t.stroke()}function G(t,n){t.beginPath(),t.lineWidth=4,t.strokeStyle="black",t.setLineDash([]),t.arc(116,n+60,60,0,2*Math.PI,!1),t.stroke()}function V(t,n){t.fillStyle="#fff",t.fillRect(0,0,630,1150),J(t,160),J(t,542),G(t,198),d(t,65,40,"收",84,230,"#000","bold 65px Microsoft YaHei",0),G(t,580),d(t,65,40,"寄",84,612,"#000","bold 65px Microsoft YaHei",0),d(t,56,16,n.mailNo,315,32,"#000","normal 56px Bahnschrift",1),d(t,28,40,n.createTime,315,96,"#000","normal 28px Microsoft YaHei",1),d(t,42,26,n.sender,56,352,"#000","normal 40px Microsoft YaHei",0),d(t,42,26,n.senderMobile,56,452,"#000","normal 40px Microsoft YaHei",0),d(t,42,26,n.receiver,56,734,"#000","normal 40px Microsoft YaHei",0),d(t,42,26,n.receiveAddress,56,834,"#000","normal 40px Microsoft YaHei",0),d(t,42,26,n.mailNo,315,970,"#000","normal 120px C39HrP24DhTt",1)}function q(t){var n=t.data;return Q(this,void 0,void 0,(function(){var t,e;return H(this,(function(r){return(t=document.createElement("canvas")).getContext?(e=t.getContext("2d"),t.width=3508,t.height=2480,e.fillStyle="#fff",e.fillRect(0,0,3508,2480),function(t,n){n.forEach((function(n,e){0===e?(t.translate(60,60),V(t,n)):e<5?(t.translate(690,0),V(t,n)):5===e?(t.translate(0,1210),V(t,n)):(t.translate(-690,0),V(t,n))}))}(e,n),[2,t.toDataURL()]):[2]}))}))}var Z=null,$=function(){try{var t=navigator.userAgent;if(t.match(/Windows\sPhone/i))return!0;if(t.match(/iPhone|iPod|iPad/i))return!0;if(t.match(/Android/i))return!0;if(t.match(/Edge\D?\d+/i))return!0;var n=t.match(/Trident\D?\d+/i),e=t.match(/MSIE\D?\d+/i),r=t.match(/OPR\D?\d+/i),i=t.match(/Firefox\D?\d+/i),o=t.match(/x64/i);if(!n&&!e&&o)return!0;if(i){if(i=i[0].match(/\d+/),Number(i[0])>=41||o)return!0}else if(r){if(r=r[0].match(/\d+/),Number(r[0])>=32)return!0}else if(!n&&!e){var a=t.match(/Chrome\D?\d+/i);if(a&&(a=a[0].match(/\d+/),Number(a[0])>=41))return!0}return!1}catch(t){return!0}},tt=function(t,n,e,r){var i,o="<br><font color='#000'>第一步:<br>请先安装打印所需字体!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/resource/%E5%AD%97%E4%BD%93.ttf' target='_self'>下载并双击打开后安装字体文件</a><br>(如已安装,请忽略)</font><br>";function a(t){var n='\n <div style="width:500px;height:300px;padding: 20px 15px 0px 15px;z-index:99999;background:rgba(255,251,251,1);">\n <p style="text-align: right;margin: 0"><span class="icon-font" id="lodop-print-close" style="cursor:pointer"><img style="width: 20px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFKUlEQVR4Xu2bWc8URRSGX2IIUSOKK664RI0aWVwQccEt7oILeM8N/AN/hRfeypXXqCgKIu6K+woSYowxigqKCigKRo1LHnMm6Uy6TndXV9U3cabuYLqr6nmm+nTNOfVN05i3aWPOr4mAyQoYcwOTR2DMF0BjEDxC0gOSlkh6VdLDkr4dcWknS1pdmfODkn4NzbnpEVgraUXl5h32709GVMIFkh6VdFFlfo9IWhkj4DpJL9fcuN0kfDpiEs43+Itr5nWWpC/r5uutgJAA+tlmEj4bEQnnGvy8wHwuk/RBVwHzbQUcE+j0I5Pw+RRLOFvSY5IWBObxiqTrYx4B7mGF/O0AYpUY8cUUSTjT4C8NjE+sYn7ErtrWFAS5abqkPxzA9yQtl/RVYQlnGPzlgXGJUcATs4KtjQBuPlzSIaefd0zCN4UknGbwVwTGIzYBT6xyW1sBdHKUpANOb2+ZhN1Ng/b8/BSDvzLQDzEJeGJUY+sigM6OlbTX6fUNk/Bd48hxF8w2+KsCtxOL7pf0ftvuuwqg3xMl7XEG2GISvm87iZbXMS7R/prA9TsN/t2W/f13WYwA7mMZ7nIGYttMYPyxy2Sca4+39zx7k7r2tcG/3XW8WAGMQxTGeqixi0TCvq6TGrqex47t7Q2BfvgiWPZvxozTRwDjsQnxNkIvmoSfYiYniU0Y8DcF7ueHGfCvR/Yf/QhUxztPkve74HmT4L1B6uY/0+BvDsARh4B/LRa+TwwYHvNCb7clabNJCP4sHerwSAt4twbgfjB4trm9Wt9HoDo4P0S2OrPZJOk+Sb81zJhNF9H+9sB1vIb55l/qRW43pxRAl+zJvXfwBlsJvwcmP8Pg7wx8vt/gX0gBn/IRqM6H7an3OnrKJPw5BMFvDr75pQG4nw3+uVTwuQTQLzs1LzI/aRL+MpjDDP7uANwvBv9sSvicAuibPKIXpNaZBK7lm783AHfQ4J9JDZ9bAP3fKMl7XgGnsWGqawRMAh6xI0tLHQTrJsmrjDdA10agBJ6Yka2VEMDkiepPd6AgQAJPrMjaSgkAggD3RAsaAiPwxIjsraSAwbPO3j7U/jH4QWz43wkYLrTUASKIFVCklVwBbeAH0MUklBLQBb6ohBICPPhBjZGa3pQ8DrkFePDkEAYbIIIetb3iEnIK8ODJ2wP/sRHPte0wNb6iEnIJ8OBJoQE/nDugFslKOKekhBwCPHjy9sB/GIC8xCRQzi6yElIL8ODJIAPfVLSglM1KmFNCQkoBHjx5e+DbFi0WmoTTc0tIJcCDJ28PfNeixSKTcGpOCSkEePDk7YGPKlpIWmwSOPiUJSb0FeDBk7cHPrpoYcRXm4STckjoI8CDJ28PfK+iRQX4WpNwQmoJsQI8ePL21OfrTpgF5t/qvymM8nY4LqWEGAEePHl74KkJ5mgUSJEwK5WErgI8ePL2wFMLzNkolCLh6BQSugjw4MnbA08NsES7xQqnHNvp9XZoK8CDJ28PfEzmt4+s20wChdRoCW0EePDk7YHf2Iekx713mAQKqlESmgRwOnxVoHPy9sB3SXf3YA3eepdJoLBa19bY6fHaDz0BbDxCp73I2wO/PgdRRJ/LTAIF1rrGmabaY/6eAJIUdQcNydsD3ybHH8ESfcs9JoFC63CLOixNJ2xmqiezyNsD/3j0NPPeyAEMMsrVL7bXYWnK3PzFCDV7nnWep2yFykRuKMMRt4gNvJkekhQ8U9AUBBPNaXS7mQgY3e+mzMwmK6CM59EdZexXwL8Q0/tB+Dg3tAAAAABJRU5ErkJggg=="></img></span></p>\n '.concat(t,"\n </div>"),e=document.createElement("div");e.style.cssText="background:rgba(0,0,0,0.3);position:fixed;top:0%;left:0%;width:100%;height:100%;z-index:99999;display: flex;justify-content: center;align-items: center;",e.innerHTML=n,document.body.appendChild(e),document.getElementById("lodop-print-close").onclick=function(){document.body.removeChild(e)}}try{var u=navigator.userAgent,s=!!u.match(/MSIE/i)||!!u.match(/Trident/i);if($()){try{i=window.getCLodop()}catch(t){}if(!i&&"complete"!==document.readyState)return;if(!i)return void a(o+"<br><font color='#000'>第二步:<br>Web打印服务CLodop未安装启动,点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/CLodop_Setup_for_Win32NT.exe' target='_self'>下载执行安装</a>"+(r?"<br>(若此前已安装过,可<a href='CLodop.protocol:setup' target='_self'>点这里直接再次启动</a>)":"")+",成功后请刷新本页面。</font>");window.CLODOP.CVERSION<"3.0.6.0"&&a(o+"<br><font color='#000'>第二步:<br>Web打印服务CLodop需升级!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/CLodop_Setup_for_Win32NT.exe' target='_self'>执行升级</a>,升级后请刷新页面。</font>"),n&&n.parentNode&&n.parentNode.removeChild(n),t&&t.parentNode&&t.parentNode.removeChild(t)}else{var c=s&&!!u.match(/x64/i);if(t||n?i=s?t:n:Z?i=Z:((i=document.createElement("object")).setAttribute("width",0),i.setAttribute("height",0),i.setAttribute("style","position:absolute;left:0px;top:-100px;width:0px;height:0px;"),s?i.setAttribute("classid","clsid:2105C259-1E0C-4534-8141-A753534CB4CA"):i.setAttribute("type","application/x-print-lodop"),document.documentElement.appendChild(i),Z=i,(i=document.createElement("object")).setAttribute("width",0),i.setAttribute("height",0),i.setAttribute("style","position:absolute;left:0px;top:-100px;width:0px;height:0px;"),s?i.setAttribute("classid","clsid:2105C259-1E0C-4534-8141-A753534CB4CA"):i.setAttribute("type","application/x-print-lodop"),document.documentElement.appendChild(i),Z=i),!i||!i.VERSION)return u.indexOf("Chrome")>=0&&a("<br><br><font color='#000'>(如果此前正常,仅因浏览器升级或重安装而出问题,需重新执行以上安装)</font>"),u.indexOf("Firefox")>=0&&a("<br><br><font color='#000'>(注意:如曾安装过Lodop旧版附件npActiveXPLugin,请在【工具】->【附加组件】->【扩展】中先卸它)</font>"),a(c?"<br><font color='#000'>第二步:<br>打印控件未安装!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/install_lodop64.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>":"<br><font color='#000'>第二步:<br>打印控件未安装!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/install_lodop32.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>"),i}return i.VERSION<"6.2.2.4"?($()||a(c?"<br><font color='#000'>第二步:<br>打印控件需要升级!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/install_lodop64.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>":"<br><font color='#000'>第二步:<br>打印控件需要升级!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/install_lodop32.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>"),i):(i.SET_LICENSES("",e,"",""),i)}catch(t){alert("getLodop出错:"+t)}};function nt(t){return t.toString().includes("mm")?Number(t.split("mm")[0]):t.toString().includes("pt")?.376*t.split("pt")[0]:(console.log(t,"-----"),Number(25.4*t/96))}function et(t,n,e,r,i,o,a,u,s,c,l){function f(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function p(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===s&&(s=1),void 0===c&&(c=null),void 0===l&&(l=.3),"number"==typeof r&&(r+=""),null==r&&(r="");for(var h=1;f(r)>0;h++){var d=p(r,e),m=d.tlen,g=d.isNextLine;o||console.log(r);var v=(h-1)*nt(n)+nt(o)+"mm",x=e/2*a+a+"pt";c&&(x=c),t.ADD_PRINT_TEXT(v,i,x,18,r.substr(0,m).replace(/^\s+|\s+$/,"")),r=g?r.substr(m+1):r.substr(m),t.SET_PRINT_STYLEA(0,"FontSize",a),t.SET_PRINT_STYLEA(0,"LineSpacing",-3),t.SET_PRINT_STYLEA(0,"LetterSpacing",l),t.SET_PRINT_STYLEA(0,"TextNeatRow",!0),t.SET_PRINT_STYLEA(0,"FontName",u),2===s?r.length<e&&t.SET_PRINT_STYLEA(0,"Alignment",2):1===s?t.SET_PRINT_STYLEA(0,"Alignment",1):3===s&&t.SET_PRINT_STYLEA(0,"Alignment",3)}}function rt(t,n){var e,r,i,o,a=n.details,s=n.amount,c=n.taxAmount,l=(n.taxRate,n.listFlag),f=n.qdbz;function h(n,e,r){u(r)<=31?et(t,"9pt",32,r,n,e,9,"宋体",0,"53mm"):u(r)<=34?et(t,"8pt",36,r,n,e,8,"宋体",0,"53mm"):u(r)<=40?et(t,"7pt",42,r,n,e,7,"宋体",0,"53mm"):u(r)<=47?et(t,"6pt",48,r,n,e,6,"宋体",0,"53mm"):(u(r),et(t,"5.5pt",52,r,n,e,5.5,"宋体",0,"53mm"))}function d(n,e,r){var i=r||0===r?Number(r).toFixed(2):r;et(t,"9pt",18,i,n,e,9,"宋体",3,"28mm")}function m(n,e,r,i){i?0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="免税":0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="不征税":"number"==typeof r&&(r=100*r+"%"):r=r,u(r)<=5?et(t,"9pt",6,r,n,e,9,"宋体",3,"12mm",1):u(r)<=6?et(t,"8pt",7,r,n,e,8,"宋体",3,"12mm",1):u(r)<=7?et(t,"7pt",8,r,n,e,7,"宋体",3,"12mm",1):(u(r),et(t,"6pt",9,r,n,e,6,"宋体",3,"12mm",1))}function g(t){var n,e=[];t.details.forEach((function(r,i){n=0===r.taxPre&&1===r.taxPreType&&1!==Number(t.invoiceType)&&4!==Number(t.invoiceType)?"免税":0===r.taxPre&&2===r.taxPreType&&1!==Number(t.invoiceType)&&4!==Number(t.invoiceType)?"不征税":"number"==typeof r.taxRate?100*r.taxRate+"%":r.taxRate,e.includes(n)||e.push(n)})),1===e.length?m("162mm","52mm",e[0],""):2===e.length&&e.includes("免税")&&e.includes("不征税")&&m("162mm","52mm","零税率","")}function v(n){var e;p(n.taxAmount)?e=n.taxAmount.toFixed(2):"number"==typeof n.taxAmount&&(e=0===n.taxAmount?"***":n.taxAmount.toFixed(2)),et(t,"9pt",18,e,"175mm","52mm",9,"宋体",3,"28mm")}if(1===l||a.length>8||1===f)s>=0?(h("7mm","52mm","(详见销货清单)"),d("134mm","52mm",s),g(n),v(n)):(h("7mm","52mm","详见对应正数发票及清单"),d("134mm","52mm",s),g(n),v(n));else{a.forEach((function(n,e){var r,i,o;if(h("6mm",52+4*e+"mm",""+(n.shortName||"")+n.goodsName),r="57mm",i=52+4*e+"mm",o=n.specification,u(o)<=14?et(t,"9pt",15,o,r,i,9,"宋体",0,"26mm"):u(o)<=16?et(t,"9pt",17,o,r,i,7,"宋体",0,"26mm"):u(o)<=19?et(t,"9pt",20,o,r,i,6.5,"宋体",0,"26mm"):et(t,"4.5pt",22,o,r,i,5.5,"宋体",0,"26mm"),function(n,e,r){u(r)<=7?et(t,"9pt",8,r,n,e,9,"宋体",2):u(r)<=9?et(t,"9pt",10,r,n,e,7,"宋体",2):u(r)<=11?et(t,"9pt",12,r,n,e,6,"宋体",2):u(r)<=13?et(t,"9pt",14,r,n,e,5,"宋体",2):u(r)<=17?et(t,"9pt",18,r,n,e,4,"宋体",2):et(t,"5pt",18,r,n,e,4,"宋体",2)}("80mm",52+4*e+"mm",n.unit),n.quantity&&n.unitPrice){var a=String(n.quantity),s=String(n.unitPrice);!function(n,e,r){u(r)<=9?et(t,"9pt",11,r,n,e,9,"宋体",3,"20mm"):u(r)<=12?et(t,"9pt",13,r,n,e,7,"宋体",3,"20mm"):u(r)<=14?et(t,"9pt",15,r,n,e,7,"宋体",3,"20mm"):u(r)<=16?et(t,"9pt",17,r,n,e,6,"宋体",3,"20mm"):et(t,"6pt",17,r,n,e,6,"宋体",3,"20mm")}("92mm",52+4*e+"mm",a.length>13?a.substr(0,13):a),function(n,e,r){u(r)<=9?et(t,"9pt",11,r,n,e,9,"宋体",3,"22mm"):u(r)<=12?et(t,"9pt",13,r,n,e,8,"宋体",3,"22mm"):u(r)<=14?et(t,"9pt",15,r,n,e,7,"宋体",3,"22mm"):u(r)<=16?et(t,"9pt",17,r,n,e,6,"宋体",3,"22mm"):et(t,"6pt",17,r,n,e,6,"宋体",3,"22mm")}("112mm",52+4*e+"mm",s.length>13?s.substr(0,13):s)}d("134mm",52+4*e+"mm",n.amount),m("162mm",52+4*e+"mm",n.taxRate,n),function(n,e,r,i){r=0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)||0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?"***":p(r)?"":0===r?"***":Number(r).toFixed(2),et(t,"9pt",18,r,n,e,9,"宋体",3,"28mm")}("175mm",52+4*e+"mm",n.taxAmount,n)}))}e="134mm",r="86mm",o=(i=s)||0===i?Number(i).toFixed(2):i,et(t,"9pt",18,"¥"+o,e,r,9,"Courier New",3,"28mm");var x=p(c)?"":0===c?"***":c;""!==x&&"***"!==x&&(x="¥"+(x=x||0===x?Number(x).toFixed(2):x)),function(n,e,r){et(t,"9pt",18,r,n,e,9,"Courier New",3,"28mm")}("175mm","86mm",x)}var it=function(t){var n=t.data,e=t.top,r=void 0===e?0:e,o=t.left,a=void 0===o?0:o,c=t.showWindow,l=void 0!==c&&c,f=t.toolsType,h=void 0===f?0:f,d=t.licenses,m=void 0===d?"":d,g=t.company,v=void 0===g?"":g,x=t.getProjectLodop,y=void 0===x?tt:x,S=t.isInitPrinter,b=void 0===S?1:S,w=t.printer,A=void 0===w?"":w;a-=16,console.log("调用打印方法了",n,r,a,l,h);var T=y("","",m);T&&(T.PRINT_INITA(r,a,"241.3mm","139.7mm",n.invoiceCode+" "+n.invoiceNo),T.SET_PRINT_PAGESIZE(1,"241.3mm","139.7mm",""),T.SET_SHOW_MODE("LANGUAGE",0),T.SET_LICENSES(v,m,"",""),0===b&&A&&T.SET_PRINTER_INDEXA(A),function(t,n){var e=n.invoiceType,r=n.invoiceCode,o=n.invoiceNo,a=n.amount,u=n.drewDate,s=n.checkCode,c="10";1===Number(e)?c="01":2===Number(e)?c="04":3===Number(e)?c="10":4===Number(e)&&(c="08");var l=new Date(u),f=l.getFullYear(),p=l.getMonth()+1,h=p.toString();p>=1&&p<=9&&(h="0"+p);var d=l.getDate(),m=d.toString();d>=0&&d<=9&&(m="0"+d);var g=u?""+f+h+m:"",v="01,"+c+","+r+","+o+","+(a||0===a?Number(a).toFixed(2):a)+","+g+","+s,x=v+","+i.ToCRC16(v,!0);console.log(x),t.ADD_PRINT_BARCODE("3.5mm","8.5mm","22.00mm","22.00mm","QRCode",""+x),t.SET_PRINT_STYLEA(0,"GroundColor","#FFFFFF"),t.SET_PRINT_STYLEA(0,"QRCodeVersion",5),t.SET_PRINT_STYLEA(0,"QRCodeErrorLevel","L"),t.SET_PRINT_STYLEA(0,"DataCharset","GB2312")}(T,n),function(t,n){var e=n.invoiceCode,r=n.invoiceNo,i=n.drewDate,o=n.checkCode,a=(n.machineCode,n.invoiceStatus,n.status,n.invoiceType);!function(n){if(n){var e=new Date(n),r=e.getFullYear(),i=e.getMonth()+1,o=i.toString();i>=1&&i<=9&&(o="0"+i);var a=e.getDate(),u=a.toString();a>=0&&a<=9&&(u="0"+a),et(t,"9pt",42,r+"年"+o+"月"+u+"日","175mm","18mm",9,"宋体")}}(i),function(n){if(void 0===n&&(n=""),!p(n)&&1!==Number(a)&&4!==Number(a)){et(t,"9pt",8,"校验码","30mm","18mm",9,"宋体");for(var e=n.length/4,r=0;r<4;r++){var i=n.substr(0===r?0:e*r,e);et(t,"9pt",6,i,42+10*r+"mm","18mm",9,"宋体")}}}(o),et(t,"9pt",42,e,"178mm","8mm",8,"宋体",2,"38mm"),et(t,"9pt",42,r,"178mm","13mm",11,"宋体",2,"38mm")}(T,n),function(t,n){var e=n.purchaserName,r=n.purchaserTaxNo,i=n.purchaserAddress,o=n.purchaserTel,a=n.purchaserBankName,s=n.purchaserBankAccount,c=n.sellerName,l=n.sellerTaxNo,f=n.sellerAddress,p=n.sellerTel,h=n.sellerBankName,d=n.sellerBankAccount;function m(n,e,r){u(r)<=48?et(t,"9pt",49,r,n,e,9,"宋体"):u(r)<=62?et(t,"9pt",63,r,n,e,7.5,"宋体"):et(t,"7pt",63,r,n,e,7.5,"宋体")}m("36mm","26mm",e),et(t,"9pt",30,r,"39mm","31mm",12,"Courier New"),m("36mm","36mm",""+(i||"")+(o||"")),m("36mm","41mm",""+(a||"")+(s||"")),m("36mm","100mm",c),et(t,"9pt",30,l,"39mm","105mm",12,"Courier New"),m("36mm","110mm",""+(f||"")+(p||"")),m("36mm","115mm",""+(h||"")+(d||""))}(T,n),function(t,n){var e=n.ciphertext,r=void 0===e?"":e;if(!p(r))for(var i=r.length/4,o=0;o<4;o++){et(t,"9pt",36,r.substr(0===o?0:i*o,i),"126mm",26+5*o+"mm",12,"Courier New")}}(T,n),rt(T,n),function(t,n){var e,r,i,o=n.amountWithTax;!function(n,e,r){t.ADD_PRINT_ELLIPSE(nt(e)-nt(r)/2+"mm",nt(n)-nt(r)/2+"mm",r,r,0,1);var i=Math.sqrt(nt(r)/2);t.ADD_PRINT_LINE(nt(e)-i+"mm",nt(n)-i+"mm",nt(e)+i+"mm",nt(n)+i+"mm",0,1),t.ADD_PRINT_LINE(nt(e)-i+"mm",nt(n)+i+"mm",nt(e)+i+"mm",nt(n)-i+"mm",0,1)}("60mm","94.2mm","4mm"),e="63mm",r="93mm",i=(i=o)>0?s(i).replace("元","圆"):"(负数)"+s(Math.abs(i)).replace("元","圆"),et(t,"9pt",56,i,e,r,9,"宋体",0,"96mm"),function(n,e,r){et(t,"9pt",56,r,n,e,11,"Courier New",0,"37mm")}("168mm","93mm","¥"+(o||0===o?Number(o).toFixed(2):o))}(T,n),function(t,n){var e=n.remark;p(e)&&(e=""),et(t,"9pt",50,e.replace(/\\r\\n/g,"\n")||"","126mm","100mm",9,"宋体")}(T,n),function(t,n){var e=n.payee,r=n.reviewer,i=n.drawer;et(t,"9pt",50,e,"22mm","121mm",9,"宋体"),et(t,"9pt",50,r,"74mm","121mm",9,"宋体"),et(t,"9pt",50,i,"121mm","121mm",9,"宋体")}(T,n),function(t,n){n.invoiceStatus,n.status;var e=n.amountWithTax,r=n.amount;e<0&&r<0&&et(t,"9pt",42,"销项负数","30mm","14mm",9,"黑体"),1===n.specialFlag&&et(t,"9pt",42,"成品油","30mm","10mm",9,"黑体")}(T,n),l?T.PREVIEW():T.PRINT(),console.log("打印打印"))},ot={0:"类型异常",1:"增值税专用发票",2:"增值税普通发票",3:"增值税电子发票"},at=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},ut=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},st=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},ct=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function lt(t){return t.toString().includes("mm")?Number(t.split("mm")[0]):t.toString().includes("pt")?.376*t.split("pt")[0]:(console.log(t,"-----"),Number(25.4*t/96))}function ft(t,n,e,r,i,o,a,u,s,c){function l(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function f(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===s&&(s=1),void 0===c&&(c=null),"number"==typeof r&&(r+=""),null==r&&(r="");for(var p=1;l(r)>0;p++){var h=f(r,e),d=h.tlen,m=h.isNextLine;o||console.log(r);var g=(p-1)*lt(n)+lt(o)+"mm",v=e/2*a+a+"pt";c&&(v=c),t.ADD_PRINT_TEXT(g,i,v,18,r.substr(0,d).replace(/^\s+|\s+$/,"")),r=m?r.substr(d+1):r.substr(d),t.SET_PRINT_STYLEA(0,"FontSize",a),t.SET_PRINT_STYLEA(0,"LineSpacing",-3),t.SET_PRINT_STYLEA(0,"TextNeatRow",!0),t.SET_PRINT_STYLEA(0,"FontName",u),2===s?r.length<e&&t.SET_PRINT_STYLEA(0,"Alignment",2):1===s?t.SET_PRINT_STYLEA(0,"Alignment",1):3===s&&t.SET_PRINT_STYLEA(0,"Alignment",3)}}var pt=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},ht=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},dt=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},mt=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},gt=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},vt=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function xt(t){!function(t){var n=t.data,e=t.top,r=void 0===e?0:e,i=t.left,o=void 0===i?0:i,a=t.width,u=void 0===a?"210mm":a,s=t.height,c=void 0===s?"297mm":s,l=t.showWindow,f=void 0!==l&&l,p=t.invoiceListFieldMapping,d=void 0===p?{invoiceList:[]}:p,m=t.licenses,g=void 0===m?"":m,v=t.company,x=void 0===v?"":v,y=t.getProjectLodop,S=void 0===y?tt:y,b=t.isInitPrinter,w=void 0===b?1:b,A=t.printer,T=void 0===A?"":A,E=[],P=0,C=0,N=0,R=[];if(d.invoiceList&&(R=d.invoiceList),R.length>0){var I=R.length;P=Number(h(70/(7+I),2)),C=Number(h(84/(7+I),2)),N=Number(h(54/(7+I),2))}else P=10,C=12,N=8;n.details.forEach((function(t){1===t.invoiceLineType&&E.push(t)}));var Y,_=document.createElement("div");_.innerHTML='<table border=0 width="700" cellspacing="0" cellpadding="0" style="border-collapse:collapse" bordercolor="#000000">\n <thead>\n <tr>\n <td colspan="'+(9+R.length)+'" height="50px;"></td>\n </tr>\n <tr>\n <td colspan="'+(9+R.length)+'" style="font-size: 24px;font-weight: bold;text-align: center;">销售货物或者提供应税劳务、服务清单</td>\n </tr>\n <tr>\n <td colspan="'+(9+R.length)+'" height="20px;"></td>\n </tr>\n <tr>\n <td border=1 colspan="'+(9+R.length)+'" style="text-align: left;">\n <span style="font-size: 14px;">购买方名称:</span>\n '+(n.purchaserName&&n.purchaserName.length>26?'<span style="font-size: 12px;">'+n.purchaserName+"</span>":'<span style="font-size: 14px;">'+n.purchaserName+"</span>")+'\n </td>\n </tr>\n <tr>\n <td colspan="'+(9+R.length)+'" height="15px;"></td>\n </tr>\n <tr>\n <td border=1 colspan="'+(9+R.length)+'" style="text-align: left;">\n <span style="font-size: 14px;">销售方名称:</span>\n '+(n.sellerName&&n.sellerName.length>26?'<span style="font-size: 12px;">'+n.sellerName+"</span>":'<span style="font-size: 14px;">'+n.sellerName+"</span>")+'\n </td>\n </tr>\n <tr>\n <td colspan="'+(9+R.length)+'" height="15px;"></td>\n </tr>\n <tr>\n <td colspan="'+(6+R.length/2)+'" style="text-align: left;font-size: 14px;">\n 所属增值税'+(1===Number(n.invoiceType)?"专用":2===Number(n.invoiceType)?"普通":3===Number(n.invoiceType)?"电子普通":"电子专用")+"发票代码:"+n.invoiceCode+'\n <span style="margin-left: 10px;">号码:'+n.invoiceNo+'</span>\n </td>\n <td width="100%" colspan="'+(3+R.length/2)+'" tindex="1" style="text-align: right;font-size: 14px;">\n 共<span style="margin: 0px 10px;"><font tdata="PageCount">##</font></span>页\n <span style="margin-left: 10px;">第<span style="margin: 0px 10px;"><font tdata="PageNO">##</font></span>页</span>\n </td>\n </tr>\n <tr>\n <td colspan="'+(9+R.length)+'" height="10px"></td>\n </tr>\n <tr>\n <td width="7%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">序号</td>\n <td width="23%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">货物(劳务)名称</td>\n <td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">规格型号</td>\n <td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">单位</td>\n <td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">数量</td>\n <td width="'+C+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">单价</td>\n <td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">金额</td>\n <td width="'+N+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">税率</td>\n <td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">税额</td>\n '+R.map((function(t,n){return'<td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">'+t.displayName+"</td>"}))+"\n </tr>\n </thead>\n "+n.details.map((function(t,e){var r=t.goodsName,i="12px";i=(r=t.shortName+r)&&r.length<14?"12px":r&&r.length<23?"10px":"8px";var o,a,u="12px",s="12px",c="12px",l="12px",f="12px",p="10px";1!==t.discountFlag&&(u=t.specification&&t.specification.length<9?"12px":t.specification&&t.specification.length<17?"10px":"8px",s=t.unit&&t.unit.length<3?"12px":t.unit&&t.unit.length<5?"10px":"8px",0===t.quantity&&0===t.unitPrice?(o="",a=""):0!==t.quantity&&0===t.unitPrice?(o=t.quantity,a=t.unitPrice.toFixed(2)):(o=t.quantity,a=t.unitPrice?String(t.unitPrice).slice(0,13):t.unitPrice),c=o&&JSON.stringify(o).length<9?"12px":o&&JSON.stringify(o).length<23?"10px":"8px",l=a&&JSON.stringify(a).length<12?"12px":a&&JSON.stringify(a).length<23?"10px":"8px");var h,d=t.amount?Number(t.amount).toFixed(2):t.amount;f=(d=d.toString())&&JSON.stringify(d).length<15?"12px":d&&JSON.stringify(d).length<23?"10px":"8px",h=0===t.taxPre&&1===t.taxPreType&&1!==Number(n.invoiceType)&&4!==Number(n.invoiceType)?"免税":0===t.taxPre&&2===t.taxPreType&&1!==Number(n.invoiceType)&&4!==Number(n.invoiceType)?"不征税":"number"==typeof t.taxRate?100*t.taxRate+"%":t.taxRate;var m=0===t.taxPre&&1===t.taxPreType&&1!==Number(n.invoiceType)&&4!==Number(n.invoiceType)||0===t.taxPre&&2===t.taxPreType&&1!==Number(n.invoiceType)&&4!==Number(n.invoiceType)||0===t.taxAmount?"***":t.taxAmount?Number(t.taxAmount).toFixed(2):t.taxAmount;p=(m=m.toString())&&JSON.stringify(m).length<15?"12px":m&&JSON.stringify(m).length<23?"10px":"8px";var g="";return R.forEach((function(e){var r="";"mainFields"===e.source?(r=n[e.fieldName],"invoiceType"===e.sourceFieldName&&(r=ot[r]||"")):r=t[e.fieldName],g+='<td width="'+P+'%" height="30px;" style="height: 30px;text-align: left;border-right: 1px solid #000;font-size: 12px;table-layout:fixed;word-break:break-all;word-wrap:break-word;border-collapse:collapse;">\n '+r+"\n </td>"})),'<tr>\n <td width="7%" style="height: 30px;font-size: 12px;text-align: center;border-left: 1px solid #000;border-right: 1px solid #000;">'+(e+1)+'</td>\n <td width="23%" style="height: 30px;border-right: 1px solid #000;font-size: '+i+';">'+r+'</td>\n <td width="'+P+'%" style="height: 30px;border-right: 1px solid #000;font-size: '+u+';">'+t.specification+'</td>\n <td width="'+P+'%" style="height: 30px;text-align: center;border-right: 1px solid #000;font-size: '+s+';">'+t.unit+'</td>\n <td width="'+P+'%" style="height: 30px;text-align: right;border-right: 1px solid #000;font-size: '+c+';padding-right: 2px;">'+o+'</td>\n <td width="'+C+'%" style="height: 30px;text-align: right;border-right: 1px solid #000;font-size: '+l+';padding-right: 2px;">'+a+'</td>\n <td width="'+P+'%" tclass="'+(1===t.invoiceLineType?"discountTemporaryAmount":"temporaryAmount")+'" style="height: 30px;text-align: right;border-right: 1px solid #000;font-size: '+f+';padding-right: 2px;">'+d+'</td>\n <td width="'+N+'%" style="height: 30px;text-align: right;border-right: 1px solid #000;padding-right: 2px;font-size: 12px;">'+h+'</td>\n <td width="'+P+'%" tclass="'+(1===t.invoiceLineType?"discountTemporaryTax":"temporaryTax")+'" style="height: 30px;text-align: right;border-right: 1px solid #000;font-size: '+p+';padding-right: 2px;">'+m+"</td>\n "+g+"\n </tr>"}))+'\n <tfoot>\n <tr>\n <td width="7%" align="center" style="height:30px;border-left: 1px solid #000;border-right: 1px solid #000;font-size: 12px;">小计</td>\n <td width="23%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+C+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="SubSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;"><font id="id01">#########</font></td>\n <td width="'+N+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="SubSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;"><font id="id01">#########</font></td>\n '+R.map((function(t,n){return'<td width="'+P+'%" style="border-right: 1px solid #000;"></td>'}))+"\n </tr>\n "+(E.length?'\n <tr>\n <td width="7%" align="center" style="height:30px;border-left: 1px solid #000;border-right: 1px solid #000;font-size: 12px;">折扣</td>\n <td width="23%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+C+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="SubSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;"><font tclass="discountTemporaryAmount">#########</font></td>\n <td width="'+N+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="SubSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;"><font tclass="discountTemporaryTax">#########</font></td>\n '+R.map((function(t,n){return'<td width="'+P+'%" style="border-right: 1px solid #000;"></td>'}))+"\n </tr>\n ":"")+'\n <tr>\n <td width="7%" align="center" style="height:30px;border-left: 1px solid #000;border-right: 1px solid #000;font-size: 12px;">合计</td>\n <td width="23%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+C+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="AllSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;">\n <font id="id02" >###########</font>\n </td>\n <td width="'+N+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="AllSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;"><font id="id02">#########</font></td>\n '+R.map((function(t,n){return'<td width="'+P+'%" style="border-right: 1px solid #000;"></td>'}))+'\n </tr>\n <tr>\n <td width="7%" align="center" style="height:50px;border: 1px solid #000;font-size: 12px;">备注</td>\n <td colspan="'+(8+R.length)+'" style="height:50px;border: 1px solid #000;">'+(((Y=n.remark&&n.remark.replace(/\\r\\n/g,"\n")||"")&&Y.length<=50?'<span style="font-size: 14px;">'+Y+"</span>":Y&&Y.length>50&&Y.length<100?'<span style="font-size: 12px;">'+Y+"</span>":Y?'<span style="font-size: 10px;">'+Y+"</span>":"")+'</td>\n </tr>\n <tr>\n <td width="100%" colspan="')+(9+R.length)+'" height="10px"></td>\n </tr>\n <tr>\n <td width="100%" colspan="'+(6+R.length/2)+'" style="font-size: 14px;">销货单位(章):</td>\n <td width="100%" colspan="'+(3+R.length/2)+'" style="font-size: 14px;">开票日期:'+function(t){if(t){var n=new Date(t),e=n.getFullYear(),r=n.getMonth()+1,i=r.toString();r>=1&&r<=9&&(i="0"+r);var o=n.getDate(),a=o.toString();return o>=0&&o<=9&&(a="0"+o),e+"年"+i+"月"+a+"日"}}(n.drewDate)+'</td>\n </tr>\n <tr>\n <td width="100%" colspan="'+(9+R.length)+'" height="10px"></td>\n </tr>\n \n </tfoot>\n </table>';var O=S("","",g);O.PRINT_INITA(r,o,u,c,n.invoiceCode+" "+n.invoiceNo),"210mm"===u&&"297mm"===c?O.SET_PRINT_PAGESIZE(1,0,0,"A4"):O.SET_PRINT_PAGESIZE(1,u,c,""),O.SET_SHOW_MODE("LANGUAGE",0),O.SET_LICENSES(x,g,"",""),O.ADD_PRINT_TABLE(0,"5%","90%","BottomMargin:30mm",_.innerHTML),0===w&&T&&O.SET_PRINTER_INDEXA(T),f?O.PREVIEW():O.PRINT()}(t)}function yt(t){var n,e,r,i,o,a,u,s,c,l,f,p,h,d,m,g,v,x;e=(n=t).data,r=n.top,i=void 0===r?0:r,o=n.left,a=void 0===o?0:o,u=n.showWindow,s=void 0!==u&&u,c=n.licenses,l=void 0===c?"":c,f=n.company,p=void 0===f?"":f,h=n.getProjectLodop,d=void 0===h?tt:h,m=n.isInitPrinter,g=void 0===m?1:m,v=n.printer,x=void 0===v?"":v,at(void 0,void 0,void 0,(function(){var t,n,r;return ut(this,(function(o){switch(o.label){case 0:console.log("调用打印方法了",e,i,a,s),t="",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,M({data:e})];case 2:return t=o.sent(),[3,4];case 3:return n=o.sent(),console.error(n),[3,4];case 4:return(r=d("","",l))?(r.PRINT_INITA(i,a,"297mm","210mm",e.invoiceCode+" "+e.invoiceNo),r.SET_PRINT_PAGESIZE(2,"210mm","297mm",""),r.SET_SHOW_MODE("LANGUAGE",0),r.SET_LICENSES(p,l,"",""),0===g&&x&&r.SET_PRINTER_INDEXA(x),r.ADD_PRINT_IMAGE(0,0,"100%","100%",t),r.SET_PRINT_STYLEA(0,"Stretch",2),s?r.PREVIEW():r.PRINT(),console.log("打印打印"),[2]):[2]}}))}))}function St(t){var n,e,r,i,o,a,u,s,c,l,f,p,h,d,m,g,v,x;e=(n=t).data,r=n.top,i=void 0===r?0:r,o=n.left,a=void 0===o?0:o,u=n.showWindow,s=void 0!==u&&u,c=n.licenses,l=void 0===c?"":c,f=n.company,p=void 0===f?"":f,h=n.getProjectLodop,d=void 0===h?tt:h,m=n.isInitPrinter,g=void 0===m?1:m,v=n.printer,x=void 0===v?"":v,st(void 0,void 0,void 0,(function(){var t;return ct(this,(function(n){return console.log("调用打印方法了",e,i,a,s),(t=d("","",l))?(t.PRINT_INITA(i,a,"80mm","100mm","开票二维码"),t.SET_PRINT_PAGESIZE(1,"80mm","100mm",""),t.SET_SHOW_MODE("LANGUAGE",0),t.SET_LICENSES(p,l,"",""),0===g&&x&&t.SET_PRINTER_INDEXA(x),ft(t,"10pt",28,e.sellerName,"3mm","5mm",10,"宋体",2),ft(t,"9pt",40,"二维码有限期为15天,请及时开票!","4mm","15mm",7,"宋体",2),ft(t,"9pt",40,"开票金额:","5mm","70mm",7,"宋体",1),ft(t,"9pt",32,e.amountWithTax+"元","5mm","70mm",8,"宋体",3),ft(t,"9pt",40,"订单编号:","5mm","75mm",7,"宋体",1),ft(t,"9pt",32,""+e.orderCode,"10mm","75mm",7,"宋体",3),ft(t,"9pt",40,"生成时间:","5mm","80mm",7,"宋体",1),ft(t,"9pt",32,""+e.createTime,"10mm","80mm",7,"宋体",3),function(t,n){t.ADD_PRINT_BARCODE("20mm","7mm","60.00mm","60.00mm","QRCode",""+n.url),t.SET_PRINT_STYLEA(0,"GroundColor","#FFFFFF"),t.SET_PRINT_STYLEA(0,"QRCodeVersion",10),t.SET_PRINT_STYLEA(0,"QRCodeErrorLevel","L"),t.SET_PRINT_STYLEA(0,"DataCharset","GB2312")}(t,e),s?t.PREVIEW():t.PRINT(),console.log("打印打印"),[2]):[2]}))}))}function bt(t){var n,e,r,i,o,a,u,s,c,l,f,p,h,d,m,g,v,x;e=(n=t).data,r=n.top,i=void 0===r?0:r,o=n.left,a=void 0===o?0:o,u=n.showWindow,s=void 0!==u&&u,c=n.licenses,l=void 0===c?"":c,f=n.company,p=void 0===f?"":f,h=n.getProjectLodop,d=void 0===h?tt:h,m=n.isInitPrinter,g=void 0===m?1:m,v=n.printer,x=void 0===v?"":v,pt(void 0,void 0,void 0,(function(){var t,n,r;return ht(this,(function(o){switch(o.label){case 0:console.log("调用打印方法了",e,i,a,s),t="",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,z({data:e})];case 2:return t=o.sent(),[3,4];case 3:return n=o.sent(),console.error(n),[3,4];case 4:return(r=d("","",l))?(r.PRINT_INITA(i,a,"210mm","297mm",e.invoiceCode+" "+e.invoiceNo),r.SET_PRINT_PAGESIZE(1,"210mm","297mm",""),r.SET_SHOW_MODE("LANGUAGE",0),r.SET_LICENSES(p,l,"",""),0===g&&x&&r.SET_PRINTER_INDEXA(x),r.ADD_PRINT_IMAGE(0,0,"100%","100%",t),r.SET_PRINT_STYLEA(0,"Stretch",2),s?r.PREVIEW():r.PRINT(),console.log("打印打印"),[2]):[2]}}))}))}function wt(t){var n,e,r,i,o,a,u,s,c,l,f,p,h,d,m,g,v,x;e=(n=t).data,r=n.top,i=void 0===r?0:r,o=n.left,a=void 0===o?0:o,u=n.showWindow,s=void 0!==u&&u,c=n.licenses,l=void 0===c?"":c,f=n.company,p=void 0===f?"":f,h=n.getProjectLodop,d=void 0===h?tt:h,m=n.isInitPrinter,g=void 0===m?1:m,v=n.printer,x=void 0===v?"":v,dt(void 0,void 0,void 0,(function(){var t,n,r;return mt(this,(function(o){switch(o.label){case 0:console.log("调用打印方法了",e,i,a,s),t="",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,A({data:e,showSample:!1})];case 2:return t=o.sent(),[3,4];case 3:return n=o.sent(),console.error(n),[3,4];case 4:return(r=d("","",l))?(r.PRINT_INIT(e.invoiceCode+" "+e.invoiceNo),r.SET_PRINT_PAGESIZE(2,0,0,"A4"),r.SET_SHOW_MODE("LANGUAGE",0),r.SET_LICENSES(p,l,"",""),0===g&&x&&r.SET_PRINTER_INDEXA(x),r.ADD_PRINT_IMAGE(0,0,"200mm","133.2mm",t),r.SET_PRINT_STYLEA(0,"Stretch",1),r.SET_PRINT_STYLEA(0,"Horient",2),s?r.PREVIEW():r.PRINT(),console.log("打印打印"),[2]):[2]}}))}))}function At(t){var n,e,r,i,o,a,u,s,c,l,f,p,h,d,m,g,v,x;e=(n=t).data,r=n.top,i=void 0===r?0:r,o=n.left,a=void 0===o?0:o,u=n.showWindow,s=void 0!==u&&u,c=n.licenses,l=void 0===c?"":c,f=n.company,p=void 0===f?"":f,h=n.getProjectLodop,d=void 0===h?tt:h,m=n.isInitPrinter,g=void 0===m?1:m,v=n.printer,x=void 0===v?"":v,gt(void 0,void 0,void 0,(function(){var t,n,r;return vt(this,(function(o){switch(o.label){case 0:console.log("调用打印方法了",e,i,a,s),t="",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,q({data:e})];case 2:return t=o.sent(),[3,4];case 3:return n=o.sent(),console.error(n),[3,4];case 4:return(r=d("","",l))?(r.PRINT_INITA(i,a,"297mm","210mm",e.invoiceCode+" "+e.invoiceNo),r.SET_PRINT_PAGESIZE(2,"210mm","297mm",""),r.SET_SHOW_MODE("LANGUAGE",0),r.SET_LICENSES(p,l,"",""),0===g&&x&&r.SET_PRINTER_INDEXA(x),r.ADD_PRINT_IMAGE(0,0,"100%","100%",t),r.SET_PRINT_STYLEA(0,"Stretch",2),s?r.PREVIEW():r.PRINT(),console.log("打印打印"),[2]):[2]}}))}))}function Tt(t){return(Tt="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)}var Et=function(){return(Et=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)},Pt=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},Ct=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},Nt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]])}return e},Rt=function(){function t(t){this.getLodop=null,this.needCLodop=null;var n=(null==t?void 0:t.data)||{};this.invoiceData=n,this.getInvoiceSample=this.getInvoiceSample.bind(this),this.getInvoiceListSample=this.getInvoiceListSample.bind(this),this.getCustomsDeclarationFormSample=this.getCustomsDeclarationFormSample.bind(this),this.createInvoiceQrCode=this.createInvoiceQrCode.bind(this),this.createRedLetterNotice=this.createRedLetterNotice.bind(this),this.createExpressDeliveryCode=this.createExpressDeliveryCode.bind(this),this.printInvoice=this.printInvoice.bind(this),this.printInvoiceList=this.printInvoiceList.bind(this),this.printCustomsDeclaration=this.printCustomsDeclaration.bind(this),this.printInvoiceQrCode=this.printInvoiceQrCode.bind(this),this.printRedLetterNotice=this.printRedLetterNotice.bind(this),this.printInvoiceSample=this.printInvoiceSample.bind(this),this.printExpressDeliveryCode=this.printExpressDeliveryCode.bind(this),this.initLodop=this.initLodop.bind(this),this.getLodop=tt,this.needCLodop=$}return t.prototype.getInvoiceSample=function(t){var n=!0;t&&"object"===Tt(t)&&(n=t.showSample);try{return A({data:this.invoiceData,showSample:n})}catch(t){console.error(t)}},t.prototype.getInvoiceListSample=function(){try{return t=this.invoiceData,(n=function(t,n){for(var e=0,r=[];e<t.length;)r.push(t.slice(e,e+=n));return r}(t.details,26)).map((function(e,r){var i=0,o=0,a=0,u=0;return e.forEach((function(t){1===t.invoiceLineType?(a=c.add(a,t.amount),u=c.add(u,t.taxAmount)):(i=c.add(i,t.amount),o=c.add(o,t.taxAmount))})),N(T(T({},t),{details:e,invoiceListTotalCount:n.length,invoiceListCurrent:r+1,subtotalAmount:i.toFixed(2),subtotalTaxAmount:o.toFixed(2),discountAmount:a.toFixed(2),discountTaxAmount:u.toFixed(2)}))}))}catch(t){console.error(t)}var t,n},t.prototype.getCustomsDeclarationFormSample=function(){return Pt(this,void 0,void 0,(function(){var t;return Ct(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,M({data:this.invoiceData})];case 1:return[2,n.sent()];case 2:return t=n.sent(),console.error(t),[3,3];case 3:return[2]}}))}))},t.prototype.createInvoiceQrCode=function(){return Pt(this,void 0,void 0,(function(){var t;return Ct(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,F({data:this.invoiceData})];case 1:return[2,n.sent()];case 2:return t=n.sent(),console.error(t),[3,3];case 3:return[2]}}))}))},t.prototype.createRedLetterNotice=function(){return Pt(this,void 0,void 0,(function(){var t;return Ct(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,z({data:this.invoiceData})];case 1:return[2,n.sent()];case 2:return t=n.sent(),console.error(t),[3,3];case 3:return[2]}}))}))},t.prototype.createExpressDeliveryCode=function(){return Pt(this,void 0,void 0,(function(){var t;return Ct(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,q({data:this.invoiceData})];case 1:return[2,n.sent()];case 2:return t=n.sent(),console.error(t),[3,3];case 3:return[2]}}))}))},t.prototype.printInvoice=function(t){var n=t.licenses,e=Nt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),function(t){it(t)}(Et({data:this.invoiceData,licenses:n},e))},t.prototype.printInvoiceList=function(t){var n=t.licenses,e=Nt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),xt(Et({data:this.invoiceData},e))},t.prototype.printCustomsDeclaration=function(t){var n=t.licenses,e=Nt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),yt(Et({data:this.invoiceData,licenses:n},e))},t.prototype.printExpressDeliveryCode=function(t){var n=t.licenses,e=Nt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),At(Et({data:this.invoiceData,licenses:n},e))},t.prototype.printInvoiceQrCode=function(t){var n=t.licenses,e=Nt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),St(Et({data:this.invoiceData,licenses:n},e))},t.prototype.printRedLetterNotice=function(t){var n=t.licenses,e=Nt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),bt(Et({data:this.invoiceData,licenses:n},e))},t.prototype.printInvoiceSample=function(t){var n=t.licenses,e=Nt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),wt(Et({data:this.invoiceData,licenses:n},e))},t.prototype.initLodop=function(t){var n,e=t.targetAddress,r=void 0===e?"localhost":e;if($()){var i="http://"+r+":8000/CLodopfuncs.js?priority=1",o="http://"+r+":18000/CLodopfuncs.js?priority=0",a=document.head||document.getElementsByTagName("head")[0]||document.documentElement,u=document.createElement("script");u.src=i,a.insertBefore(u,a.firstChild),(u=document.createElement("script")).src=o,a.insertBefore(u,a.firstChild),n=!!(i+o).match(/\/\/localho|\/\/127.0.0./i),this.CLodopIsLocal=n}},t}();n.default=Rt}]).default}));
|
|
10
|
+
n.read=function(t,n,e,r,i){var o,a,u=8*i-r-1,s=(1<<u)-1,c=s>>1,l=-7,f=e?i-1:0,p=e?-1:1,h=t[n+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=u;l>0;o=256*o+t[n+f],f+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[n+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},n.write=function(t,n,e,r,i,o){var a,u,s,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,m=r?1:-1,d=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,a=l):(a=Math.floor(Math.log(n)/Math.LN2),n*(s=Math.pow(2,-a))<1&&(a--,s*=2),(n+=a+f>=1?p/s:p*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=l?(u=0,a=l):a+f>=1?(u=(n*s-1)*Math.pow(2,i),a+=f):(u=n*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[e+h]=255&u,h+=m,u/=256,i-=8);for(a=a<<i|u,c+=i;c>0;t[e+h]=255&a,h+=m,a/=256,c-=8);t[e+h-m]|=128*d}},function(t,n){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,n,e){var r=e(24),i=e(81),o=e(64),a=e(25),u=e(82),s=e(63),c=r.getBCHDigit(7973);function l(t,n){return a.getCharCountIndicator(t,n)+4}function f(t,n){var e=0;return t.forEach((function(t){var r=l(t.mode,n);e+=r+t.getBitsLength()})),e}n.from=function(t,n){return u.isValid(t)?parseInt(t,10):n},n.getCapacity=function(t,n,e){if(!u.isValid(t))throw new Error("Invalid QR Code version");void 0===e&&(e=a.BYTE);var o=8*(r.getSymbolTotalCodewords(t)-i.getTotalCodewordsCount(t,n));if(e===a.MIXED)return o;var s=o-l(e,t);switch(e){case a.NUMERIC:return Math.floor(s/10*3);case a.ALPHANUMERIC:return Math.floor(s/11*2);case a.KANJI:return Math.floor(s/13);case a.BYTE:default:return Math.floor(s/8)}},n.getBestVersionForData=function(t,e){var r,i=o.from(e,o.M);if(s(t)){if(t.length>1)return function(t,e){for(var r=1;r<=40;r++){if(f(t,r)<=n.getCapacity(r,e,a.MIXED))return r}}(t,i);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,e,r){for(var i=1;i<=40;i++)if(e<=n.getCapacity(i,r,t))return i}(r.mode,r.getLength(),i)},n.getEncodedBits=function(t){if(!u.isValid(t)||t<7)throw new Error("Invalid QR Code version");for(var n=t<<12;r.getBCHDigit(n)-c>=0;)n^=7973<<r.getBCHDigit(n)-c;return t<<12|n}},function(t,n,e){var r=e(24),i=r.getBCHDigit(1335);n.getEncodedBits=function(t,n){for(var e=t.bit<<3|n,o=e<<10;r.getBCHDigit(o)-i>=0;)o^=1335<<r.getBCHDigit(o)-i;return 21522^(e<<10|o)}},function(t,n,e){var r=e(25),i=e(147),o=e(148),a=e(149),u=e(150),s=e(83),c=e(24),l=e(151);function f(t){return unescape(encodeURIComponent(t)).length}function p(t,n,e){for(var r,i=[];null!==(r=t.exec(e));)i.push({data:r[0],index:r.index,mode:n,length:r[0].length});return i}function h(t){var n,e,i=p(s.NUMERIC,r.NUMERIC,t),o=p(s.ALPHANUMERIC,r.ALPHANUMERIC,t);return c.isKanjiModeEnabled()?(n=p(s.BYTE,r.BYTE,t),e=p(s.KANJI,r.KANJI,t)):(n=p(s.BYTE_KANJI,r.BYTE,t),e=[]),i.concat(o,n,e).sort((function(t,n){return t.index-n.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function m(t,n){switch(n){case r.NUMERIC:return i.getBitsLength(t);case r.ALPHANUMERIC:return o.getBitsLength(t);case r.KANJI:return u.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function d(t,n){var e,s=r.getBestModeForData(t);if((e=r.from(n,s))!==r.BYTE&&e.bit<s.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(e)+".\n Suggested mode is: "+r.toString(s));switch(e!==r.KANJI||c.isKanjiModeEnabled()||(e=r.BYTE),e){case r.NUMERIC:return new i(t);case r.ALPHANUMERIC:return new o(t);case r.KANJI:return new u(t);case r.BYTE:return new a(t)}}n.fromArray=function(t){return t.reduce((function(t,n){return"string"==typeof n?t.push(d(n,null)):n.data&&t.push(d(n.data,n.mode)),t}),[])},n.fromString=function(t,e){for(var i=function(t,n){for(var e={},i={start:{}},o=["start"],a=0;a<t.length;a++){for(var u=t[a],s=[],c=0;c<u.length;c++){var l=u[c],f=""+a+c;s.push(f),e[f]={node:l,lastCount:0},i[f]={};for(var p=0;p<o.length;p++){var h=o[p];e[h]&&e[h].node.mode===l.mode?(i[h][f]=m(e[h].lastCount+l.length,l.mode)-m(e[h].lastCount,l.mode),e[h].lastCount+=l.length):(e[h]&&(e[h].lastCount=l.length),i[h][f]=m(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,n))}}o=s}for(p=0;p<o.length;p++)i[o[p]].end=0;return{map:i,table:e}}(function(t){for(var n=[],e=0;e<t.length;e++){var i=t[e];switch(i.mode){case r.NUMERIC:n.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:n.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:n.push([i,{data:i.data,mode:r.BYTE,length:f(i.data)}]);break;case r.BYTE:n.push([{data:i.data,mode:r.BYTE,length:f(i.data)}])}}return n}(h(t,c.isKanjiModeEnabled())),e),o=l.find_path(i.map,"start","end"),a=[],u=1;u<o.length-1;u++)a.push(i.table[o[u]].node);return n.fromArray(function(t){return t.reduce((function(t,n){var e=t.length-1>=0?t[t.length-1]:null;return e&&e.mode===n.mode?(t[t.length-1].data+=n.data,t):(t.push(n),t)}),[])}(a))},n.rawSplit=function(t){return n.fromArray(h(t,c.isKanjiModeEnabled()))}},function(t,n,e){var r=e(25);function i(t){this.mode=r.NUMERIC,this.data=t.toString()}i.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){var n,e,r;for(n=0;n+3<=this.data.length;n+=3)e=this.data.substr(n,3),r=parseInt(e,10),t.put(r,10);var i=this.data.length-n;i>0&&(e=this.data.substr(n),r=parseInt(e,10),t.put(r,3*i+1))},t.exports=i},function(t,n,e){var r=e(25),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(t){this.mode=r.ALPHANUMERIC,this.data=t}o.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var n;for(n=0;n+2<=this.data.length;n+=2){var e=45*i.indexOf(this.data[n]);e+=i.indexOf(this.data[n+1]),t.put(e,11)}this.data.length%2&&t.put(i.indexOf(this.data[n]),6)},t.exports=o},function(t,n,e){var r=e(30),i=e(25);function o(t){this.mode=i.BYTE,this.data=r.from(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(var n=0,e=this.data.length;n<e;n++)t.put(this.data[n],8)},t.exports=o},function(t,n,e){var r=e(25),i=e(24);function o(t){this.mode=r.KANJI,this.data=t}o.getBitsLength=function(t){return 13*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){var n;for(n=0;n<this.data.length;n++){var e=i.toSJIS(this.data[n]);if(e>=33088&&e<=40956)e-=33088;else{if(!(e>=57408&&e<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");e-=49472}e=192*(e>>>8&255)+(255&e),t.put(e,13)}},t.exports=o},function(t,n,e){"use strict";var r={single_source_shortest_paths:function(t,n,e){var i={},o={};o[n]=0;var a,u,s,c,l,f,p,h=r.PriorityQueue.make();for(h.push(n,0);!h.empty();)for(s in u=(a=h.pop()).value,c=a.cost,l=t[u]||{})l.hasOwnProperty(s)&&(f=c+l[s],p=o[s],(void 0===o[s]||p>f)&&(o[s]=f,h.push(s,f),i[s]=u));if(void 0!==e&&void 0===o[e]){var m=["Could not find a path from ",n," to ",e,"."].join("");throw new Error(m)}return i},extract_shortest_path_from_predecessor_list:function(t,n){for(var e=[],r=n;r;)e.push(r),t[r],r=t[r];return e.reverse(),e},find_path:function(t,n,e){var i=r.single_source_shortest_paths(t,n,e);return r.extract_shortest_path_from_predecessor_list(i,e)},PriorityQueue:{make:function(t){var n,e=r.PriorityQueue,i={};for(n in t=t||{},e)e.hasOwnProperty(n)&&(i[n]=e[n]);return i.queue=[],i.sorter=t.sorter||e.default_sorter,i},default_sorter:function(t,n){return t.cost-n.cost},push:function(t,n){var e={value:t,cost:n};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=r},function(t,n,e){var r=e(84);n.render=function(t,n,e){var i=e,o=n;void 0!==i||n&&n.getContext||(i=n,n=void 0),n||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);var a=r.getImageWidth(t.modules.size,i),u=o.getContext("2d"),s=u.createImageData(a,a);return r.qrToImageData(s.data,t,i),function(t,n,e){t.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=e,n.width=e,n.style.height=e+"px",n.style.width=e+"px"}(u,o,a),u.putImageData(s,0,0),o},n.renderToDataURL=function(t,e,r){var i=r;void 0!==i||e&&e.getContext||(i=e,e=void 0),i||(i={});var o=n.render(t,e,i),a=i.type||"image/png",u=i.rendererOpts||{};return o.toDataURL(a,u.quality)}},function(t,n,e){var r=e(84);function i(t,n){var e=t.a/255,r=n+'="'+t.hex+'"';return e<1?r+" "+n+'-opacity="'+e.toFixed(2).slice(1)+'"':r}function o(t,n,e){var r=t+n;return void 0!==e&&(r+=" "+e),r}n.render=function(t,n,e){var a=r.getOptions(n),u=t.modules.size,s=t.modules.data,c=u+2*a.margin,l=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",f="<path "+i(a.color.dark,"stroke")+' d="'+function(t,n,e){for(var r="",i=0,a=!1,u=0,s=0;s<t.length;s++){var c=Math.floor(s%n),l=Math.floor(s/n);c||a||(a=!0),t[s]?(u++,s>0&&c>0&&t[s-1]||(r+=a?o("M",c+e,.5+l+e):o("m",i,0),i=0,a=!1),c+1<n&&t[s+1]||(r+=o("h",u),u=0)):i++}return r}(s,u,a.margin)+'"/>',p='viewBox="0 0 '+c+" "+c+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+p+' shape-rendering="crispEdges">'+l+f+"</svg>\n";return"function"==typeof e&&e(null,h),h}},function(t,n,e){"use strict";var r=e(5);t.exports=function(t,n){return!!t&&r((function(){n?t.call(null,(function(){}),1):t.call(null)}))}},function(t,n,e){var r=e(3);r(r.P,"Array",{fill:e(156)}),e(44)("fill")},function(t,n,e){"use strict";var r=e(29),i=e(48),o=e(20);t.exports=function(t){for(var n=r(this),e=o(n.length),a=arguments.length,u=i(a>1?arguments[1]:void 0,e),s=a>2?arguments[2]:void 0,c=void 0===s?e:i(s,e);c>u;)n[u++]=t;return n}},function(t,n,e){"use strict";e.r(n);e(65),e(1),e(9),e(10),e(11),e(6),e(12),e(76),e(16),e(13),e(21),e(45),e(35);var r={CRC16:null,isArray:null,ToCRC16:null,ToModbusCRC16:null,strToByte:null,convertChinese:null,filterChinese:null,strToHex:null,padLeft:null,toString:null};r.CRC16=function(t){var n=t.length;if(n>0){for(var e=65535,r=0;r<n;r++){e^=t[r];for(var i=0;i<8;i++)e=0!=(1&e)?e>>1^40961:e>>1}return[(65280&e)>>8,255&e]}return[0,0]},r.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},r.ToCRC16=function(t,n){return r.toString(r.CRC16(r.isArray(t)?t:r.strToByte(t)),n)},r.ToModbusCRC16=function(t,n){return r.toString(r.CRC16(r.isArray(t)?t:r.strToHex(t)),n)},r.strToByte=function(t){for(var n=t.split(""),e=[],r=0,i=n.length;r<i;r++){var o=encodeURI(n[r]);if(1==o.length)e.push(o.charCodeAt(0));else for(var a=o.split("%"),u=1;u<a.length;u++)e.push(parseInt("0x"+a[u]))}return e},r.convertChinese=function(t){for(var n=t.split(""),e=[],r=0,i=n.length;r<i;r++){var o=n[r].charCodeAt();o<=0||o>=127?e.push(o.toString(16)):e.push(n[r])}return e},r.filterChinese=function(t){for(var n=t.split(""),e=[],r=0,i=n.length;r<i;r++){var o=n[r].charCodeAt();o>0&&o<127&&e.push(n[r])}return e},r.strToHex=function(t,n){t=(t=n?r.filterChinese(t).join(""):r.convertChinese(t).join("")).replace(/\s/g,"");for(var e=(t+=t.length%2!=0?"0":"").length/2,i=[],o=0;o<e;o++)i.push(parseInt(t.substr(2*o,2),16));return i},r.padLeft=function(t,n,e){null==e&&(e="0");for(var r=0,i=n-t.length;r<i;r++)t=e+t;return t},r.toString=function(t,n){void 0===n&&(n=!0);var e=t[0],i=t[1];return r.padLeft((n?e+256*i:256*e+i).toString(16).toUpperCase(),4,"0")};var i=r,o=(e(78),e(117),e(119),e(61),e(122),e(87)),a=e.n(o),u=function(t){void 0===t&&(t=""),"number"==typeof t&&(t+=""),null==t&&(t="");for(var n=0,e=t.length,r=-1,i=0;i<e;i++)n+=(r=t.charCodeAt(i))>=0&&r<=128?1:2;return n},s=function(t){return a.a.toMoney(t,{outSymbol:!1})},c=function(){function t(){}return t.add=function(t,n){var e,r,i;try{e=t.toString().split(".")[1].length}catch(t){e=0}try{r=n.toString().split(".")[1].length}catch(t){r=0}return(t*(i=Math.pow(10,Math.max(e,r)))+n*i)/i},t.sub=function(t,n){var e,r,i;try{e=t.toString().split(".")[1].length}catch(t){e=0}try{r=n.toString().split(".")[1].length}catch(t){r=0}return((t*(i=Math.pow(10,Math.max(e,r)))-n*i)/i).toFixed(e>=r?e:r)},t.mul=function(t,n){var e=0,r=t.toString(),i=n.toString();try{e+=r.split(".")[1].length}catch(t){}try{e+=i.split(".")[1].length}catch(t){}return Number(r.replace(".",""))*Number(i.replace(".",""))/Math.pow(10,e)},t.div=function(t,n){var e=0,r=0;try{e=t.toString().split(".")[1].length}catch(t){}try{r=n.toString().split(".")[1].length}catch(t){}return Number(t.toString().replace(".",""))/Number(n.toString().replace(".",""))*Math.pow(10,r-e)},t}(),l=function(t,n){return!(!t||!t.hasOwnProperty(n))},f=function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Number.MAX_SAFE_INTEGER}(t.length)&&!function(t){return"[object Function]"===Object.prototype.toString.call(t)}(t)},p=function(t){if(null===t)return!0;if(void 0===t)return!0;if(f(t))return!t.length;if(e=t,"[object Object]"===Object.prototype.toString.call(e))for(var n in t)if(l.call(t,n))return!1;var e;return!1},h=function(t,n,e){if(void 0===n&&(n=2),void 0===e&&(e=!1),null==t||""===t)return t;if("string"==typeof t&&t.includes(","))return t;if(t=+t,!isNaN(t))if((""+t).includes(".")){var r=(""+t).split(".")[0],i="0."+(""+t).split(".")[1],o=Number(i),a="";e?t=r.replace(/\B(?=(\d{3})+\b)/g,",")+o:(a="."+(""+(a=o.toFixed(n))).split(".")[1],t=r.replace(/\B(?=(\d{3})+\b)/g,",")+a)}else t=t.toFixed(n).replace(/(\d)(?=(\d{3})+\.)/g,"$1,");return t},m=function(t,n,e,r,i,o,a,u,s){function c(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function l(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===r&&(r=""),"number"==typeof r&&(r+=""),null==r&&(r=""),1===s?r.length<e&&(t.textAlign="center"):0===s?t.textAlign="left":2===s&&(t.textAlign="right");for(var f=1;c(r)>0;f++){var p=l(r,e),h=p.tlen,m=p.isNextLine;t.fillStyle=a,t.font=u,t.textBaseline="top",t.fillText(r.substr(0,h).replace(/^\s+|\s+$/,""),i,(f-1)*n+o),r=m?r.substr(h+1):r.substr(h)}t.save()},d=[{taxOfficeCode:"3100",taxOffice:"上海国税",taxProvince:"上海市税务局",title:"上海"},{taxOfficeCode:"1100",taxOffice:"北京国税",taxProvince:"北京市税务局",title:"北京"},{taxOfficeCode:"4200",taxOffice:"湖北国税",taxProvince:"湖北省税务局",title:"湖北"},{taxOfficeCode:"4300",taxOffice:"湖南国税",taxProvince:"湖南省税务局",title:"湖南"},{taxOfficeCode:"1300",taxOffice:"河北国税",taxProvince:"河北省税务局",title:"河北"},{taxOfficeCode:"4100",taxOffice:"河南国税",taxProvince:"河南省税务局",title:"河南"},{taxOfficeCode:"6100",taxOffice:"陕西国税",taxProvince:"陕西省税务局",title:"陕西"},{taxOfficeCode:"3200",taxOffice:"江苏国税",taxProvince:"江苏省税务局",title:"江苏"},{taxOfficeCode:"3300",taxOffice:"浙江国税",taxProvince:"浙江省税务局",title:"浙江"},{taxOfficeCode:"3302",taxOffice:"宁波国税",taxProvince:"宁波市税务局",title:"宁波"},{taxOfficeCode:"6200",taxOffice:"甘肃国税",taxProvince:"甘肃省税务局",title:"甘肃"},{taxOfficeCode:"5300",taxOffice:"云南国税",taxProvince:"云南省税务局",title:"云南"},{taxOfficeCode:"3500",taxOffice:"福建国税",taxProvince:"福建省税务局",title:"福建"},{taxOfficeCode:"3502",taxOffice:"厦门国税",taxProvince:"厦门市税务局",title:"厦门"},{taxOfficeCode:"2200",taxOffice:"吉林国税",taxProvince:"吉林省税务局",title:"吉林"},{taxOfficeCode:"2100",taxOffice:"辽宁国税",taxProvince:"辽宁省税务局",title:"辽宁"},{taxOfficeCode:"6400",taxOffice:"宁夏国税",taxProvince:"宁夏回族自治区税务局",title:"宁夏"},{taxOfficeCode:"1200",taxOffice:"天津国税",taxProvince:"天津市税务局",title:"天津"},{taxOfficeCode:"4600",taxOffice:"海南国税",taxProvince:"海南省税务局",title:"海南"},{taxOfficeCode:"2102",taxOffice:"大连国税",taxProvince:"大连市税务局",title:"大连"},{taxOfficeCode:"3700",taxOffice:"山东国税",taxProvince:"山东省税务局",title:"山东"},{taxOfficeCode:"3702",taxOffice:"青岛国税",taxProvince:"青岛市税务局",title:"青岛"},{taxOfficeCode:"4400",taxOffice:"广东国税",taxProvince:"广东省税务局",title:"广东"},{taxOfficeCode:"4403",taxOffice:"深圳国税",taxProvince:"深圳市税务局",title:"深圳"},{taxOfficeCode:"5200",taxOffice:"贵州国税",taxProvince:"贵州省税务局",title:"贵州"},{taxOfficeCode:"6300",taxOffice:"青海国税",taxProvince:"青海省税务局",title:"青海"},{taxOfficeCode:"6500",taxOffice:"新疆国税",taxProvince:"新疆维吾尔自治区税务局",title:"新疆"},{taxOfficeCode:"4500",taxOffice:"广西国税",taxProvince:"广西壮族自治区税务局",title:"广西"},{taxOfficeCode:"5100",taxOffice:"四川国税",taxProvince:"四川省税务局",title:"四川"},{taxOfficeCode:"1400",taxOffice:"山西国税",taxProvince:"山西省税务局",title:"山西"},{taxOfficeCode:"5000",taxOffice:"重庆国税",taxProvince:"重庆市税务局",title:"重庆"},{taxOfficeCode:"2300",taxOffice:"黑龙江国税",taxProvince:"黑龙江税务局",title:"黑龙江"},{taxOfficeCode:"3400",taxOffice:"安徽国税",taxProvince:"安徽省税务局",title:"安徽"},{taxOfficeCode:"1500",taxOffice:"内蒙国税",taxProvince:"内蒙古自治区税务局",title:"内蒙古"},{taxOfficeCode:"3600",taxOffice:"江西国税",taxProvince:"上海市税务局",title:"上海"},{taxOfficeCode:"5400",taxOffice:"西藏国税",taxProvince:"西藏自治区税务局",title:"西藏"}],g=function(t,n,e,r){return void 0===e&&(e="value"),void 0===r&&(r="label"),t||0===t?(n||[]).find((function(n){return n[e]===t}))?(n||[]).find((function(n){return n[e]===t}))[r]:t:null},v=e(22),x=e.n(v),y=e(62).changeDpiDataUrl;function S(t){var n=t.startX,e=t.startY,r=t.ctx,i=t.points,o=t.lineWidth,a=void 0===o?1:o,u=t.color,s=void 0===u?"#975124":u;r.beginPath(),r.moveTo(n,e),r.lineWidth=a,r.strokeStyle=s,i&&i.length&&i.forEach((function(t){r.lineTo(t.pointX,t.pointY)})),r.stroke(),r.closePath(),r.save()}function b(t,n,e,r,i,o,a,u,s){function c(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function l(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===r&&(r=""),"number"==typeof r&&(r+=""),null==r&&(r=""),1===s?r.length<e&&(t.textAlign="center"):0===s?t.textAlign="left":2===s&&(t.textAlign="right");for(var f=1;c(r)>0;f++){var p=l(r,e),h=p.tlen,m=p.isNextLine;t.fillStyle=a,t.font=u,t.textBaseline="top",t.fillText(r.substr(0,h).replace(/^\s+|\s+$/,""),i,(f-1)*n+o),r=m?r.substr(h+1):r.substr(h)}t.save()}function w(t,n){var e,r,i,o,a=n.details,s=n.amount,c=n.taxAmount,l=(n.taxRate,n.listFlag),f=n.qdbz;function h(n,e,r){u(r)<=31?b(t,18,32,r,n,e,"#000000","normal 18px SimSun",0):u(r)<=35?b(t,18,36,r,n,e,"#000000","normal 16px SimSun",0):u(r)<=40?b(t,18,42,r,n,e,"#000000","normal 14px SimSun",0):u(r)<=47?b(t,18,48,r,n,e,"#000000","normal 12px SimSun",0):u(r)<=51?b(t,18,52,r,n,e,"#000000","normal 11px SimSun",0):b(t,11,52,r,n,e-4,"#000000","normal 11px SimSun",0)}function m(n,e,r){var i=r||0===r?Number(r).toFixed(2):r;b(t,18,18,i,n,e,"#000000","normal 18px SimSun",2)}function d(n,e,r,i){i?0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="免税":0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="不征税":"number"==typeof r&&(r=100*r+"%"):r=r,u(r)<=5?b(t,18,6,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=6?b(t,18,7,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=7?b(t,18,8,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=8?b(t,18,9,r,n,e,"#000000","normal 12px SimSun",2):b(t,12,9,r,n,e,"#000000","normal 12px SimSun",2)}function g(t){var n,e=[];t.details.forEach((function(r,i){n=0===r.taxPre&&1===r.taxPreType&&1!==Number(t.invoiceType)&&4!==Number(t.invoiceType)?"免税":0===r.taxPre&&2===r.taxPreType&&1!==Number(t.invoiceType)&&4!==Number(t.invoiceType)?"不征税":"number"==typeof r.taxRate?100*r.taxRate+"%":r.taxRate,e.includes(n)||e.push(n)})),1===e.length?d(986,338,e[0],""):2===e.length&&e.includes("免税")&&e.includes("不征税")&&d(986,338,"零税率","")}function v(n){var e;p(n.taxAmount)?e=n.taxAmount.toFixed(2):"number"==typeof n.taxAmount&&(e=0===n.taxAmount?"***":n.taxAmount.toFixed(2)),b(t,18,18,e,1154,338,"#000000","normal 18px SimSun",2)}if(1===l||a.length>8||1===f)s>=0?(h(38,338,"(详见销货清单)"),m(922,338,s),g(n),v(n)):(h(38,338,"详见对应正数发票及清单"),m(922,338,s),g(n),v(n));else{a.forEach((function(n,e){var r,i,o;if(h(38,338+22*e,""+(n.shortName||"")+n.goodsName),r=330,i=338+24*e,o=n.specification,u(o)<=14?b(t,18,15,o,r,i,"#000000","normal 18px SimSun",0):u(o)<=16?b(t,18,17,o,r,i,"#000000","normal 16px SimSun",0):u(o)<=19?b(t,18,20,o,r,i,"#000000","normal 13px SimSun",0):b(t,12,22,o,r,i-4,"#000000","normal 12px SimSun",0),function(n,e,r){u(r)<=7?b(t,18,8,r,n,e,"#000000","normal 18px SimSun",1):u(r)<=9?b(t,18,10,r,n,e,"#000000","normal 14px SimSun",1):u(r)<=11?b(t,18,12,r,n,e,"#000000","normal 12px SimSun",1):u(r)<=13?b(t,18,14,r,n,e,"#000000","normal 10px SimSun",1):u(r)<=17?b(t,18,18,r,n,e,"#000000","normal 8px SimSun",1):b(t,8,18,r,n,e,"#000000","normal 8px SimSun",1)}(502,338+22*e,n.unit),n.quantity&&n.unitPrice){var a=String(n.quantity),s=String(n.unitPrice);!function(n,e,r){u(r)<=10?b(t,18,11,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=12?b(t,18,13,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=14?b(t,18,15,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=16?b(t,18,17,r,n,e,"#000000","normal 12px SimSun",2):b(t,12,17,r,n,e,"#000000","normal 12px SimSun",2)}(640,338+22*e,a.length>13?a.substr(0,13):a),function(n,e,r){u(r)<=10?b(t,18,11,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=12?b(t,18,13,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=14?b(t,18,15,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=16?b(t,18,17,r,n,e,"#000000","normal 12px SimSun",2):b(t,12,17,r,n,e,"#000000","normal 12px SimSun",2)}(752,338+22*e,s.length>13?s.substr(0,13):s)}m(922,338+22*e,n.amount),d(986,338+22*e,n.taxRate,n),function(n,e,r,i){r=0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)||0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?"***":p(r)?"":0===r?"***":Number(r).toFixed(2),b(t,18,18,r,n,e,"#000000","normal 18px SimSun",2)}(1154,338+22*e,n.taxAmount,n)}))}e=922,r=520,o=(i=s)||0===i?Number(i).toFixed(2):i,b(t,18,18,o,e,r,"#000000","normal 18px Courier New",2);var x=p(c)?"":0===c?"***":c;""!==x&&"***"!==x&&(x="¥"+(x=x||0===x?Number(x).toFixed(2):x)),function(n,e,r){b(t,18,18,r,n,e,"#000000","normal 18px Courier New",2)}(1154,520,x)}function A(t){var n=t.data,e=t.showSample,r=document.createElement("canvas");if(r.getContext){var o=r.getContext("2d");!function(t,n,e){var r=t.invoiceType,o=t.invoiceCode,a=t.invoiceNo,u=t.amount,s=t.drewDate,c=t.checkCode,l="10";1===Number(r)?l="01":2===Number(r)?l="04":3===Number(r)?l="10":4===Number(r)&&(l="08");var f=new Date(s),p=f.getFullYear(),h=f.getMonth()+1,m=h.toString();h>=1&&h<=9&&(m="0"+h);var d=f.getDate(),g=d.toString();d>=0&&d<=9&&(g="0"+d);var v=s?""+p+m+g:"",y="01,"+l+","+o+","+a+","+(u||0===u?Number(u).toFixed(2):u)+","+v+","+c+",",S=""+y+i.ToCRC16(y,!0)+",";x.a.toCanvas(n,S,{errorCorrectionLevel:"M",margin:0,width:113},(function(t){t&&console.error(t),console.log("success!"),e()}))}(n,r,(function(){}));var a=o.getImageData(0,0,113,113);return r.width=1192,r.height=794,o.fillStyle="#fff",o.fillRect(0,0,1192,794),o.putImageData(a,48,20),function(t,n){function e(t,n,e,r,i){var o=.5522848,a=r*o,u=i*o;t.beginPath(),t.moveTo(n-r,e),t.bezierCurveTo(n-r,e-u,n-a,e-i,n,e-i),t.bezierCurveTo(n+a,e-i,n+r,e-u,n+r,e),t.bezierCurveTo(n+r,e+u,n+a,e+i,n,e+i),t.bezierCurveTo(n-a,e+i,n-r,e+u,n-r,e),t.closePath(),t.stroke()}t.strokeStyle="red",t.lineWidth=4,e(t,596,100,80,50),t.lineWidth=1,e(t,596,100,75,45),function(t,n,e,r){var i=n,o=e,a=59,u=160,s=a,c=(u-30)/(r.length-1);t.font="11px KaiTi";var l=70/a,f=57/a;t.scale(l,f);var p=0;for(p=0;p<r.length;p++)t.save(),t.beginPath(),t.translate(i+Math.cos(Math.PI/180*u)*s-6,o-Math.sin(Math.PI/180*u)*s+14),t.rotate(Math.PI/2-Math.PI/180*u),t.fillText(r.charAt(p),0,0),t.strokeText(r.charAt(p),0,0),u-=c,t.restore();t.scale(1/l,1/f)}(t,508,110,"全国统一发票监制章");var r=n.invoiceCode,i=void 0===r?"":r,o="";o=i&&12===i.length?i?i.substr(1,4):i:i?i.substr(0,4):i;var a=g(o,d,"taxOfficeCode","taxProvince")||"国家税务总局监制";a===o&&(a="国家税务总局监制"),console.log(a),function(t,n,e,r){var i=n,o=e,a=59,u=226,s=a,c=(u-150)/(r.length-1);t.font="11px KaiTi";var l=60/a,f=50/a;t.scale(l,f);var p=0;for(p=0;p<r.length;p++){t.save(),t.beginPath();var h=i+Math.cos(Math.PI/180*u)*s-6,m=o-Math.sin(Math.PI/180*u)*s+14;t.translate(h,m),t.rotate(Math.PI/180*(45-12*p)),t.fillText(r.charAt(p),0,0),t.strokeText(r.charAt(p),0,0),u+=c,t.translate(-h,-m),t.restore()}t.scale(1/l,1/f)}(t,594,96,a),b(t,18,50,"国家税务总局",596,94,"#ff0000","normal 14px KaiTi",1)}(o,n),function(t,n,e){e&&function(e){var r=e.invoiceStatus,i=e.status,o=e.amountWithTax,a=e.amount;function u(t){var n=t.startX,e=t.startY,r=t.ctx,i=t.points,o=t.lineWidth,a=void 0===o?1:o,u=t.color,s=void 0===u?"#975124":u;r.beginPath(),r.moveTo(n,e),r.lineWidth=a,r.strokeStyle=s,i&&i.length&&i.forEach((function(t){r.lineTo(t.pointX,t.pointY)})),r.stroke(),r.closePath()}t.save(),t.translate(940,582),t.rotate(-30*Math.PI/180),u({startX:-200,startY:-85,ctx:t,points:[{pointX:200,pointY:-85},{pointX:200,pointY:85},{pointX:-200,pointY:85},{pointX:-196,pointY:-85}],lineWidth:8,color:"#F17171"}),u({startX:-188,startY:-75,ctx:t,points:[{pointX:190,pointY:-75},{pointX:190,pointY:75},{pointX:-190,pointY:75},{pointX:-186,pointY:-75}],lineWidth:4,color:"#F17171"}),b(t,18,30,"样张",0,-36,"#F17171","normal 72px SimHei",1),20!==r&&20!==i||b(t,18,42,"已红冲",74,26,"#F17171","normal 32px SimHei",0),t.restore(),t.rotate(30*Math.PI/180),t.translate(-940,-582),30!==r&&30!==i||b(t,18,42,"作废",211,92,"#000","normal 32px SimHei",0),o<0&&a<0&&b(t,18,42,"销项负数",211,92,"#000","normal 28px SimHei",0),1===n.specialFlag&&b(t,18,42,"成品油",211,36,"#000","normal 28px SimHei",0)}(n)}(o,n,e),function(t){S({startX:26,startY:170,ctx:t,points:[{pointX:1164,pointY:170},{pointX:1164,pointY:702},{pointX:26,pointY:702},{pointX:26,pointY:170}],lineWidth:1,color:"#975124"}),S({startX:388,startY:100,ctx:t,points:[{pointX:801,pointY:100}],lineWidth:1,color:"#975124"}),S({startX:388,startY:104,ctx:t,points:[{pointX:801,pointY:104}],lineWidth:1,color:"#975124"}),S({startX:26,startY:294,ctx:t,points:[{pointX:1164,pointY:294}],lineWidth:1,color:"#975124"}),S({startX:26,startY:544,ctx:t,points:[{pointX:1164,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:26,startY:590,ctx:t,points:[{pointX:1164,pointY:590}],lineWidth:1,color:"#975124"}),S({startX:72,startY:170,ctx:t,points:[{pointX:72,pointY:294}],lineWidth:1,color:"#975124"}),S({startX:678,startY:170,ctx:t,points:[{pointX:678,pointY:294}],lineWidth:1,color:"#975124"}),S({startX:708,startY:170,ctx:t,points:[{pointX:708,pointY:294}],lineWidth:1,color:"#975124"}),S({startX:320,startY:294,ctx:t,points:[{pointX:320,pointY:590}],lineWidth:1,color:"#975124"}),S({startX:468,startY:294,ctx:t,points:[{pointX:468,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:536,startY:294,ctx:t,points:[{pointX:536,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:650,startY:294,ctx:t,points:[{pointX:650,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:762,startY:294,ctx:t,points:[{pointX:762,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:932,startY:294,ctx:t,points:[{pointX:932,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:996,startY:294,ctx:t,points:[{pointX:996,pointY:544}],lineWidth:1,color:"#975124"}),S({startX:72,startY:590,ctx:t,points:[{pointX:72,pointY:702}],lineWidth:1,color:"#975124"}),S({startX:678,startY:590,ctx:t,points:[{pointX:678,pointY:702}],lineWidth:1,color:"#975124"}),S({startX:706,startY:590,ctx:t,points:[{pointX:706,pointY:702}],lineWidth:1,color:"#975124"})}(o),function(t,n){var e=n.invoiceType,r=n.invoiceCode;!function(){var n="";n=r&&12===r.length?r?r.substr(1,4):r:r?r.substr(0,4):r;var i=g(n,d,"taxOfficeCode","title")||"";i===n&&(i="");var o=i+"增值税电子普通发票";1===Number(e)?o=i+"增值税专用发票":2===Number(e)?o=i+"增值税普通发票":4===Number(e)&&(o=i+"增值税电子专用发票"),b(t,18,30,o,596,38,"#9C5223","normal 38px KaiTi",1)}(),b(t,18,30,"机器编号:",32,134,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"发票代码:",842,40,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"发票号码:",842,72,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"开票日期:",842,102,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"校验码:",842,134,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"购",40,198,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"买",40,226,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"方",40,252,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"密",684,198,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"码",684,226,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"区",684,252,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"销",40,614,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"售",40,640,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"方",40,668,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"备",684,616,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"注",684,662,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"名",84,178,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"称:",174,178,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"纳税人识别号:",84,208,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"地 址、电 话:",84,236,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"开户行及账号:",84,266,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"项目名称",132,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"规格型号",358,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"单位",484,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"数 量",570,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"单 价",684,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"金 额",828,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"税率",948,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"税 额",1058,304,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"合 计",134,520,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"价税合计(大写)",106,560,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"(小写)",864,560,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"名",84,594,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"称:",174,594,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"纳税人识别号:",84,622,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"地 址、电 话:",84,652,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"开户行及账号:",84,680,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"收款人:",40,710,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"复 核:",360,710,"#9C5223","normal 18px KaiTi",0),b(t,18,30,"开票人:",598,710,"#9C5223","normal 18px KaiTi",0)}(o,n),function(t,n){var e=n.invoiceCode,r=n.invoiceNo,i=n.drewDate,o=n.checkCode,a=n.machineCode;n.invoiceStatus,n.status,b(t,18,42,e,940,40,"#000000","normal 18px SimSun",0),b(t,18,42,r,940,72,"#000000","normal 18px SimSun",0),b(t,18,42,a,126,134,"#000000","normal 18px SimSun",0),function(n){if(n){var e=new Date(n),r=e.getFullYear(),i=e.getMonth()+1,o=i.toString();i>=1&&i<=9&&(o="0"+i);var a=e.getDate(),u=a.toString();a>=0&&a<=9&&(u="0"+a),b(t,18,42,r+"年"+o+"月"+u+"日",940,102,"#000000","normal 18px SimSun",0)}}(i),function(n){if(void 0===n&&(n=""),!p(n))for(var e=n.length/4,r=0;r<4;r++){var i=n.substr(0===r?0:e*r,e);b(t,18,32,i,940+50*r,134,"#000000","normal 18px SimSun",0)}}(o)}(o,n),function(t,n){var e=n.purchaserName,r=n.purchaserTaxNo,i=n.purchaserAddress,o=n.purchaserTel,a=n.purchaserBankName,s=n.purchaserBankAccount,c=n.sellerName,l=n.sellerTaxNo,f=n.sellerAddress,p=n.sellerTel,h=n.sellerBankName,m=n.sellerBankAccount;function d(n,e,r){u(r)<=48?b(t,18,49,r,n,e,"#000000","normal 18px SimSun",0):u(r)<=62?b(t,18,63,r,n,e,"#000000","normal 15px SimSun",0):b(t,15,63,r,n,e-4,"#000000","normal 15px SimSun",0)}d(206,178,e),b(t,18,49,r,206,204,"#000000","normal 24px Courier New",0),d(206,236,""+(i||"")+(o||"")),d(206,266,""+(a||"")+(s||"")),d(206,594,c),b(t,18,49,l,206,618,"#000000","normal 24px Courier New",0),d(206,652,""+(f||"")+(p||"")),d(206,680,""+(h||"")+(m||""))}(o,n),function(t,n){var e=n.ciphertext,r=void 0===e?"":e;if(!p(r))for(var i=r.length/4,o=0;o<4;o++){b(t,18,32,r.substr(0===o?0:i*o,i),740,178+30*o,"#000000","normal 24px Courier New",0)}}(o,n),w(o,n),function(t,n){var e,r,i,o=n.amountWithTax;t.beginPath(),t.lineWidth=1,t.strokeStyle="black",t.arc(350,567,12,0,2*Math.PI,!1),t.stroke(),t.closePath(),t.save(),t.translate(350,567),t.rotate(45*Math.PI/180),t.lineWidth=1,t.strokeStyle="black",t.beginPath(),t.moveTo(-12,0),t.lineTo(12,0),t.moveTo(0,-12),t.lineTo(0,12),t.stroke(),t.closePath(),t.restore(),e=370,r=560,i=(i=o)>0?s(i).replace("元","圆"):"(负数)"+s(Math.abs(i)).replace("元","圆"),b(t,18,56,i,e,r,"#000000","normal 18px SimSun",0),function(n,e,r){b(t,18,56,r,n,e,"#000000","normal 22px Courier New",0)}(938,558,"¥"+(o||0===o?Number(o).toFixed(2):o))}(o,n),function(t,n){var e=n.remark;p(e)&&(e=""),b(t,18,50,e.replace(/\\r\\n/g,"\n")||"",714,596,"#000000","normal 18px SimSun",0)}(o,n),function(t,n){var e=n.payee,r=n.reviewer,i=n.drawer;b(t,18,50,e,106,710,"#000000","normal 18px SimSun",0),b(t,18,50,r,420,710,"#000000","normal 18px SimSun",0),b(t,18,50,i,666,710,"#000000","normal 18px SimSun",0)}(o,n),y(r.toDataURL("image/png",.92),300)}}e(85);var T=function(){return(T=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)};function E(t){var n=t.startX,e=t.startY,r=t.ctx,i=t.points;r.beginPath(),r.moveTo(n,e),r.lineWidth=1,r.strokeStyle="#975124",i&&i.length&&i.forEach((function(t){r.lineTo(t.pointX,t.pointY)})),r.stroke(),r.closePath(),r.save()}function P(t,n,e,r,i,o,a,u,s){function c(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function l(t,n){for(var e=t.length,r=e,i=0,o=0;o<e;o++)if(t.charCodeAt(o)>128){if(!(i+2<n)){r=o;break}i+=2}else{if(!(i+1<n)){r=o;break}i+=1}return r}"number"==typeof r&&(r+=""),null==r&&(r=""),1===s?r.length<e&&(t.textAlign="center"):0===s?t.textAlign="left":2===s&&(t.textAlign="right");for(var f=1;c(r)>0;f++){var p=l(r,e);t.fillStyle=a,t.font=u,t.textBaseline="top",t.fillText(r.substr(0,p).replace(/^\s+|\s+$/,""),i,(f-1)*n+o),r=r.substr(p)}t.save()}function N(t,n){var e=n.details,r=n.amount,i=n.taxAmount,o=n.invoiceListCurrent,a=n.invoiceListTotalCount,s=n.subtotalAmount,c=n.subtotalTaxAmount,l=n.discountAmount,f=n.discountTaxAmount;e.forEach((function(n,e){P(t,18,26,e+1,48,384+40*e,"#000000","normal 18px SimSun",1),function(n,e,r){u(r)<=25?P(t,18,26,r,n,e,"#000000","normal 18px SimSun",0):u(r)<=29?P(t,18,30,r,n,e,"#000000","normal 16px SimSun",0):u(r)<=33?P(t,18,34,r,n,e,"#000000","normal 14px SimSun",0):u(r)<=38?P(t,18,39,r,n,e,"#000000","normal 12px SimSun",0):u(r)<=46?P(t,18,47,r,n,e,"#000000","normal 10px SimSun",0):P(t,10,47,r,n,e-4,"#000000","normal 10px SimSun",0)}(84,384+40*e,""+(n.shortName||"")+n.goodsName),function(n,e,r){u(r)<=14?P(t,18,15,r,n,e,"#000000","normal 18px SimSun",0):u(r)<=16?P(t,18,17,r,n,e,"#000000","normal 16px SimSun",0):u(r)<=19?P(t,18,20,r,n,e,"#000000","normal 13px SimSun",0):P(t,13,22,r,n,e-4,"#000000","normal 12px SimSun",0)}(330,384+40*e,n.specification),function(n,e,r){u(r)<=7?P(t,18,8,r,n,e,"#000000","normal 18px SimSun",1):u(r)<=9?P(t,18,10,r,n,e,"#000000","normal 14px SimSun",1):u(r)<=11?P(t,18,12,r,n,e,"#000000","normal 12px SimSun",1):u(r)<=13?P(t,18,14,r,n,e,"#000000","normal 10px SimSun",1):u(r)<=17?P(t,18,18,r,n,e,"#000000","normal 8px SimSun",1):P(t,8,18,r,n,e,"#000000","normal 8px SimSun",1)}(502,384+40*e,n.unit),n.quantity&&n.unitPrice&&(function(n,e,r){u(r)<=10?P(t,18,11,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=12?P(t,18,13,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=14?P(t,18,15,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=16?P(t,18,17,r,n,e,"#000000","normal 12px SimSun",2):P(t,12,17,r,n,e,"#000000","normal 12px SimSun",2)}(640,384+40*e,n.quantity),function(n,e,r){u(r)<=10?P(t,18,11,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=12?P(t,18,13,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=14?P(t,18,15,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=16?P(t,18,17,r,n,e,"#000000","normal 12px SimSun",2):P(t,12,17,r,n,e,"#000000","normal 12px SimSun",2)}(752,384+40*e,n.unitPrice)),function(n,e,r){P(t,18,18,r,n,e,"#000000","normal 18px SimSun",2)}(922,384+40*e,n.amount),function(n,e,r,i){0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="免税":0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="不征税":"number"==typeof r&&(r=100*r+"%"),u(r)<=5?P(t,18,6,r,n,e,"#000000","normal 18px SimSun",2):u(r)<=6?P(t,18,7,r,n,e,"#000000","normal 16px SimSun",2):u(r)<=7?P(t,18,8,r,n,e,"#000000","normal 14px SimSun",2):u(r)<=8?P(t,18,9,r,n,e,"#000000","normal 12px SimSun",2):P(t,12,9,r,n,e,"#000000","normal 12px SimSun",2)}(986,384+40*e,n.taxRate,n),function(n,e,r,i){r=0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)||0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?"***":p(r)?"":0===r?"***":r,P(t,18,18,r,n,e,"#000000","normal 18px SimSun",2)}(1154,384+40*e,n.taxAmount,n)})),o===a?(P(t,18,30,"¥"+s,922,1416,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+c,1154,1416,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+r,922,1496,"#000000","normal 18px Courier New",2)):(P(t,18,30,"¥"+s,922,1456,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+c,1154,1456,"#000000","normal 18px Courier New",2)),o===a?(P(t,18,30,"¥"+l,922,1456,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+f,1154,1456,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+i,1154,1496,"#000000","normal 18px Courier New",2)):(P(t,18,30,"¥"+l,922,1496,"#000000","normal 18px Courier New",2),P(t,18,30,"¥"+f,1154,1496,"#000000","normal 18px Courier New",2))}function C(t){var n=document.createElement("canvas");if(n.getContext){n.width=1194,n.height=1686;var e=n.getContext("2d");return e.fillStyle="#fff",e.fillRect(0,0,1194,1686),function(t){E({startX:26,startY:334,ctx:t,points:[{pointX:1166,pointY:334},{pointX:1166,pointY:1570},{pointX:26,pointY:1570},{pointX:26,pointY:334}]}),E({startX:26,startY:374,ctx:t,points:[{pointX:1166,pointY:374}]}),E({startX:26,startY:1526,ctx:t,points:[{pointX:1166,pointY:1526}]}),E({startX:76,startY:334,ctx:t,points:[{pointX:76,pointY:1570}]}),E({startX:320,startY:334,ctx:t,points:[{pointX:320,pointY:1526}]}),E({startX:468,startY:334,ctx:t,points:[{pointX:468,pointY:1526}]}),E({startX:536,startY:334,ctx:t,points:[{pointX:536,pointY:1526}]}),E({startX:650,startY:334,ctx:t,points:[{pointX:650,pointY:1526}]}),E({startX:762,startY:334,ctx:t,points:[{pointX:762,pointY:1526}]}),E({startX:932,startY:334,ctx:t,points:[{pointX:932,pointY:1526}]}),E({startX:996,startY:334,ctx:t,points:[{pointX:996,pointY:1526}]})}(e),function(t,n){var e,r=n.invoiceType,i=n.invoiceListCurrent,o=n.invoiceListTotalCount;P(t,18,40,"销售货物或者提供应税劳务、服务清单",597,80,"#9C5223","normal 38px KaiTi",1),P(t,18,30,"购买方名称:",56,210,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"销售方名称:",56,242,"#9C5223","normal 18px KaiTi",0),e="所属增值税电子普通发票代码:",1===Number(r)?e="所属增值税专用发票代码:":2===Number(r)?e="所属增值税普通发票代码:":4===Number(r)&&(e="所属增值税电子专用发票代码:"),P(t,18,30,e,56,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"号码:",538,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"共",936,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"页",1018,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"第",1056,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"页",1136,274,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"序号",34,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"项目名称",162,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"规格型号",358,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"单位",484,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"数量",576,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"单价",688,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"金额",828,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"税率",946,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"税额",1064,344,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"备注",34,1536,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"开票日期:",788,1578,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"年",920,1578,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"月",966,1578,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"日",1012,1578,"#9C5223","normal 18px KaiTi",0),i===o?(P(t,18,30,"小计",34,1416,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"折扣",34,1456,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"总计",34,1496,"#9C5223","normal 18px KaiTi",0)):(P(t,18,30,"小计",34,1456,"#9C5223","normal 18px KaiTi",0),P(t,18,30,"折扣",34,1496,"#9C5223","normal 18px KaiTi",0))}(e,t),N(e,t),function(t,n){P(t,18,120,n.remark,86,1530,"#000000","normal 18px SimSun",0)}(e,t),function(t,n){var e=n.purchaserName,r=n.sellerName,i=n.invoiceNo,o=n.invoiceCode,a=n.invoiceListTotalCount,u=n.invoiceListCurrent;P(t,16,110,e,168,210,"#000000","normal 18px SimSun",0),P(t,16,110,r,168,242,"#000000","normal 18px SimSun",0),P(t,18,50,o,300,274,"#000000","normal 18px SimSun",0),P(t,18,50,i,594,274,"#000000","normal 18px SimSun",0),P(t,18,50,a,986,274,"#000000","normal 18px SimSun",1),P(t,18,50,u,1106,274,"#000000","normal 18px SimSun",1)}(e,t),function(t,n){var e=n.drewDate;if(e){var r=new Date(e),i=r.getFullYear(),o=r.getMonth()+1,a=o.toString();o>=1&&o<=9&&(a="0"+o);var u=r.getDate(),s=u.toString();u>=0&&u<=9&&(s="0"+u),P(t,18,50,i,878,1578,"#000000","normal 18px SimSun",0),P(t,18,50,a,944,1578,"#000000","normal 18px SimSun",0),P(t,18,50,s,988,1578,"#000000","normal 18px SimSun",0)}}(e,t),n.toDataURL()}}var Y=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},R=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},I=e(62).changeDpiDataUrl,_=e(86);function X(t){var n=t.startX,e=t.startY,r=t.ctx,i=t.points,o=t.lineWidth,a=void 0===o?4:o,u=t.color,s=void 0===u?"#000":u;r.beginPath(),r.moveTo(n,e),r.lineWidth=a,r.strokeStyle=s,i&&i.length&&i.forEach((function(t){r.lineTo(t.pointX,t.pointY)})),r.stroke(),r.closePath(),r.save()}function O(t,n,e,r,i,o,a,u,s){function c(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function l(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===r&&(r=""),"number"==typeof r&&(r+=""),null==r&&(r=""),1===s?r.length<e&&(t.textAlign="center"):0===s?t.textAlign="left":2===s&&(t.textAlign="right");for(var f=1;c(r)>0;f++){var p=l(r,e),h=p.tlen,m=p.isNextLine;t.fillStyle=a,t.font=u,t.textBaseline="top",t.fillText(r.substr(0,h).replace(/^\s+|\s+$/,""),i,(f-1)*n+o),r=m?r.substr(h+1):r.substr(h)}t.save()}function L(t,n){var e=n.goodsDetailList;(void 0===e?[]:e).forEach((function(n,e){var r,i,o;r=196,i=1660+204*e,o=n.goodsNo,O(t,40,30,o,r,i,"#000000","normal 48px SimSun",0),function(n,e,r){O(t,40,30,r,n,e,"#000000","normal 48px SimSun",0)}(401,1660+204*e,n.goodsCode),function(n,e,r){O(t,54,44,r,n,e,"#000000","normal 48px SimSun",0)}(1e3,1660+204*e,""+n.goodsName+n.specification),function(n,e,r){var i=r.quantity,o=r.unit,a=r.quantity1,u=r.quantity2,s=""+(a||"")+(r.unit1Name||""),c=""+(u||"")+(r.unit2Name||"");O(t,40,53,""+(i||"")+(o||""),n,e,"#000000","normal 48px SimSun",2),O(t,40,53,s,n,e+55,"#000000","normal 48px SimSun",2),O(t,40,53,c,n,e+110,"#000000","normal 48px SimSun",2)}(2500,1660+204*e,{quantity:n.quantity,unit:n.unit,quantity1:n.quantity1,quantity2:n.quantity2,unit1Name:n.unit1Name,unit2Name:n.unit2Name}),function(n,e,r){var i=r.unitPrice,o=r.declTotal,a=r.tradeCurrency;O(t,40,53,i,n,e,"#000000","normal 48px SimSun",2),O(t,40,53,o,n,e+55,"#000000","normal 48px SimSun",2),O(t,40,53,a,n,e+110,"#000000","normal 48px SimSun",2)}(2860,1660+204*e,{unitPrice:n.unitPrice,declTotal:n.declTotal,tradeCurrency:n.tradeCurrency}),function(n,e,r){O(t,40,30,r,n,e,"#000000","normal 48px SimSun",0)}(2960,1660+204*e,n.cusOriginCountryName+"("+n.cusOriginCountry+")"),function(n,e,r){O(t,40,53,r,n,e,"#000000","normal 48px SimSun",0)}(3226,1660+204*e,n.destinationCountryName+"("+n.destinationCountry+")"),function(n,e,r){O(t,40,53,r,n,e,"#000000","normal 48px SimSun",0)}(3800,1660+204*e,n.districtCodeName+"("+n.districtCode+")"),function(n,e,r){O(t,40,53,r,n,e,"#000000","normal 48px SimSun",0)}(4280,1660+204*e,n.dutyModeName)}))}function B(t){var n=t.data;return Y(this,void 0,void 0,(function(){function t(t){var n=new Image;return n.src=t,new Promise((function(t,e){n.onload=function(){t(n)}}))}var e,r,i,o,a,s,c;return R(this,(function(l){switch(l.label){case 0:return e=n.entryId,r="*"+e+"*",[4,t(_.default)];case 1:return i=l.sent(),o={errorCorrectionLevel:"M",margin:0,width:235},[4,x.a.toDataURL(r,o)];case 2:return[4,t(l.sent())];case 3:return a=l.sent(),console.log(a),(s=document.createElement("canvas")).getContext?(c=s.getContext("2d"),console.log("window.devicePixelRatio",window.devicePixelRatio),.5,s.width=2340,s.height=1653.5,c.scale(.5,.5),c.fillStyle="#fff",c.fillRect(0,0,4680,3307),c.drawImage(i,155,144,239,225),c.drawImage(a,4249,144,235,235),function(t){X({startX:152,startY:517,ctx:t,points:[{pointX:4488,pointY:517},{pointX:4488,pointY:3167},{pointX:152,pointY:3167},{pointX:152,pointY:517}],lineWidth:4,color:"#000"}),X({startX:152,startY:640,ctx:t,points:[{pointX:4488,pointY:640}],lineWidth:4,color:"#000"}),X({startX:152,startY:764,ctx:t,points:[{pointX:4488,pointY:764}],lineWidth:4,color:"#000"}),X({startX:152,startY:887,ctx:t,points:[{pointX:4488,pointY:887}],lineWidth:4,color:"#000"}),X({startX:152,startY:1010,ctx:t,points:[{pointX:4488,pointY:1010}],lineWidth:4,color:"#000"}),X({startX:152,startY:1134,ctx:t,points:[{pointX:4488,pointY:1134}],lineWidth:4,color:"#000"}),X({startX:152,startY:1257,ctx:t,points:[{pointX:4488,pointY:1257}],lineWidth:4,color:"#000"}),X({startX:152,startY:1564,ctx:t,points:[{pointX:4488,pointY:1564}],lineWidth:4,color:"#000"}),X({startX:152,startY:1642,ctx:t,points:[{pointX:4488,pointY:1642}],lineWidth:4,color:"#000"}),X({startX:152,startY:1844,ctx:t,points:[{pointX:4488,pointY:1844}],lineWidth:4,color:"#000"}),X({startX:152,startY:2049,ctx:t,points:[{pointX:4488,pointY:2049}],lineWidth:4,color:"#000"}),X({startX:152,startY:2254,ctx:t,points:[{pointX:4488,pointY:2254}],lineWidth:4,color:"#000"}),X({startX:152,startY:2458,ctx:t,points:[{pointX:4488,pointY:2458}],lineWidth:4,color:"#000"}),X({startX:152,startY:2663,ctx:t,points:[{pointX:4488,pointY:2663}],lineWidth:4,color:"#000"}),X({startX:152,startY:2865,ctx:t,points:[{pointX:4488,pointY:2865}],lineWidth:4,color:"#000"}),X({startX:152,startY:2954,ctx:t,points:[{pointX:4488,pointY:2954}],lineWidth:4,color:"#000"}),X({startX:152,startY:3167,ctx:t,points:[{pointX:4488,pointY:3167}],lineWidth:4,color:"#000"}),X({startX:1499,startY:521,ctx:t,points:[{pointX:1499,pointY:1134}],lineWidth:4,color:"#000"}),X({startX:2209,startY:521,ctx:t,points:[{pointX:2209,pointY:1134}],lineWidth:4,color:"#000"}),X({startX:3038,startY:521,ctx:t,points:[{pointX:3038,pointY:1134}],lineWidth:4,color:"#000"}),X({startX:3697,startY:521,ctx:t,points:[{pointX:3697,pointY:640}],lineWidth:4,color:"#000"}),X({startX:1698,startY:1010,ctx:t,points:[{pointX:1698,pointY:1134}],lineWidth:4,color:"#000"}),X({startX:2715,startY:1010,ctx:t,points:[{pointX:2715,pointY:1134}],lineWidth:4,color:"#000"}),X({startX:3522,startY:1010,ctx:t,points:[{pointX:3522,pointY:1134}],lineWidth:4,color:"#000"}),X({startX:4005,startY:1010,ctx:t,points:[{pointX:4005,pointY:1134}],lineWidth:4,color:"#000"})}(c),function(t,n){console.log(n),O(t,89,40,"中华人民共和国海关出口货物报关单",2340,180,"#000","normal 90px SimSun",1),O(t,38,30,"预录入编号:",155,449,"#000","normal 42px SimSun",0),O(t,38,30,"海关编号:",1522,449,"#000","normal 42px SimSun",0),O(t,38,30,"海关编号:",1522,449,"#000","normal 42px SimSun",0),O(t,38,30,"仅供核对用",3292,449,"#000","normal 42px SimSun",0),O(t,38,30,"页码/页数:",4171,449,"#000","normal 42px SimSun",0),O(t,38,30,"境内发货人",178,530,"#000","normal 42px SimSun",0),O(t,38,30,"出境关别 ("+n.importExportPort+")",1527,530,"#000","normal 42px SimSun",0),O(t,38,30,"出口日期",2237,530,"#000","normal 42px SimSun",0),O(t,38,30,"申报日期",3066,530,"#000","normal 42px SimSun",0),O(t,38,30,"备案号",3720,530,"#000","normal 42px SimSun",0),O(t,38,30,"境外收货人",178,655,"#000","normal 42px SimSun",0),O(t,38,30,"运输方式 ("+n.cusTrafficMode+")",1527,655,"#000","normal 42px SimSun",0),O(t,38,30,"运输工具名称及航次号",2237,655,"#000","normal 42px SimSun",0),O(t,38,30,"提运单号",3066,655,"#000","normal 42px SimSun",0),O(t,38,36,"生产销售单位 ("+n.ownerSocialCreditCode+")",178,779,"#000","normal 42px SimSun",0),O(t,38,30,"监管方式 ("+n.superviseModeCode+")",1527,779,"#000","normal 42px SimSun",0),O(t,38,30,"征免性质 ("+n.cutMode+")",2237,779,"#000","normal 42px SimSun",0),O(t,38,30,"许可证号",3066,779,"#000","normal 42px SimSun",0),O(t,38,30,"合同协议号",178,901,"#000","normal 42px SimSun",0),O(t,38,30,"贸易国(地区)",1527,901,"#000","normal 42px SimSun",0),O(t,38,30,"运抵国 ("+n.cusTradeCountry+") ",2237,901,"#000","normal 42px SimSun",0),O(t,38,30,"指运港 ("+n.distinatePort+")",3066,901,"#000","normal 42px SimSun",0),O(t,38,30,"离境口岸 ("+n.departurePortCode+")",3720,901,"#000","normal 42px SimSun",0),O(t,38,30,"包装种类 ("+n.wrapType+")",178,1023,"#000","normal 42px SimSun",0),O(t,38,30,"件数",1527,1023,"#000","normal 42px SimSun",0),O(t,38,30,"毛重(千克)",1724,1023,"#000","normal 42px SimSun",0),O(t,38,30,"净重(千克)",2237,1023,"#000","normal 42px SimSun",0),O(t,38,30,"成交方式 ("+n.transacMode+")",2736,1023,"#000","normal 42px SimSun",0),O(t,38,30,"运费",3066,1023,"#000","normal 42px SimSun",0),O(t,38,30,"保费",3547,1023,"#000","normal 42px SimSun",0),O(t,38,30,"杂费",4028,1023,"#000","normal 42px SimSun",0),O(t,38,30,"附随单证及编号",178,1156,"#000","normal 42px SimSun",0),O(t,38,30,"标记唛码备注",178,1279,"#000","normal 42px SimSun",0),O(t,38,30,"项号",192,1585,"#000","normal 40px SimSun",0),O(t,38,30,"商品编号",400,1585,"#000","normal 40px SimSun",0),O(t,38,30,"商品名称及规格型号",1239,1585,"#000","normal 40px SimSun",0),O(t,38,30,"数量及单位",2279,1585,"#000","normal 40px SimSun",0),O(t,38,30,"单价/总价/币制",2626,1585,"#000","normal 40px SimSun",0),O(t,38,30,"原产国(地区)",2945,1585,"#000","normal 40px SimSun",0),O(t,38,30,"最终目的国(地区)",3226,1585,"#000","normal 40px SimSun",0),O(t,38,30,"境内货源地",3809,1585,"#000","normal 40px SimSun",0),O(t,38,30,"征免",4326,1585,"#000","normal 40px SimSun",0),O(t,38,30,"特殊关系确认:",783,2893,"#000","normal 42px SimSun",0),O(t,38,30,"价格影响确认:",1689,2893,"#000","normal 42px SimSun",0),O(t,38,30,"支付特许权使用费确认:",2596,2893,"#000","normal 42px SimSun",0),O(t,38,30,"自报自缴:",3678,2893,"#000","normal 42px SimSun",0),O(t,38,30,"报关人员",177,2993,"#000","normal 42px SimSun",0),O(t,38,30,"报关人员证号",660,2993,"#000","normal 42px SimSun",0),O(t,38,30,"电话",1315,2993,"#000","normal 42px SimSun",0),O(t,38,50,"兹申明对以上内容承担如实申报、依法纳税之法律责任",1822,2993,"#000","normal 42px SimSun",0),O(t,38,30,"海关批注及签章",3062,2993,"#000","normal 42px SimSun",0),O(t,38,30,"申报单位",177,3107,"#000","normal 42px SimSun",0),O(t,38,30,"申报单位(签章)",2515,3107,"#000","normal 42px SimSun",0)}(c,n),function(t,n){var e=n.preEntryId,r=n.entryId,i=n.consignorCname,o=n.importExportPortName,a=n.importExportDate,s=n.declareDate,c=n.manualNo,l=n.consigneeEname,f=n.cusTrafficModeName,p=n.trafficName,h=n.billNo,m=n.ownerName,d=n.superviseModeCodeName,g=n.cutModeName,v=n.licenseNo,x=n.contractNo,y=(n.cusTradeCountry,n.distinatePort,n.cusTradeCountryName),S=n.distinatePortName,b=n.departurePortCodeName,w=n.wrapTypeName,A=n.packNum,T=n.grossWeight,E=n.netWeight,P=n.transacModeName,N=n.feeCurrency,C=n.feeMark,Y=n.feeRate,R=n.insuranceCurrency,I=n.insuranceMark,_=n.insuranceRate,X=n.otherCurrency,L=n.otherMark,B=n.otherRate,M=n.remark,D=n.agentName,k=n.agentSocialCreditCode;function W(n,e,r){u(r)<=56?O(t,38,56,r,n,e,"#000000","normal 48px SimSun",0):u(r)<=76?O(t,40,64,r,n,e-15,"#000000","normal 42px SimSun",0):O(t,30,66,r,n,e-4,"#000000","normal 40px SimSun",0)}n.ownerSocialCreditCode,W(395,447,e),W(1723,447,r),W(180,580,i),W(1529,587,o),W(2240,587,a),W(3069,587,s),W(3724,587,c),W(180,708,l),W(1529,708,f),W(2239,708,p),W(3066,708,h),W(180,832,m),W(1529,832,d),W(2241,832,g),W(3068,832,v),W(179,953,x),W(2239,953,y),W(3069,953,S),W(3720,953,b),W(179,1075,w),W(1529,1075,A),W(1729,1075,T),W(2240,1075,E),W(2737,1075,P),W(380,3105,D+"("+k+")"),Y&&C&&W(3071,1079,(N||"000")+"/"+Y+"/"+C),_&&I&&W(3549,1079,(R||"000")+"/"+_+"/"+I),B&&L&&W(4030,1079,(X||"000")+"/"+B+"/"+L),O(t,48,180,M,180,1333,"#000000","normal 48px SimSun",0)}(c,n),L(c,n),function(t,n){O(t,38,55,"*"+n.entryId+"*",3144,133,"#000000","normal 160px C39HrP24DhTt",0)}(c,n),O(c,38,30,"1/1",4371,449,"#000","normal 38px SimSun",0),[2,I(s.toDataURL("image/png",.92),300)]):[2]}}))}))}var M=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},D=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},k=e(62).changeDpiDataUrl,W=e(86);function F(t){var n=t.startX,e=t.startY,r=t.ctx,i=t.points,o=t.lineWidth,a=void 0===o?4:o,u=t.color,s=void 0===u?"#000":u;r.beginPath(),r.moveTo(n,e),r.lineWidth=a,r.strokeStyle=s,i&&i.length&&i.forEach((function(t){r.lineTo(t.pointX,t.pointY)})),r.stroke(),r.closePath(),r.save()}function U(t,n,e,r,i,o,a,u,s){function c(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function l(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===r&&(r=""),"number"==typeof r&&(r+=""),null==r&&(r=""),1===s?r.length<e&&(t.textAlign="center"):0===s?t.textAlign="left":2===s&&(t.textAlign="right");for(var f=1;c(r)>0;f++){var p=l(r,e),h=p.tlen,m=p.isNextLine;t.fillStyle=a,t.font=u,t.textBaseline="top";var d=(n-Number(u.split(" ")[1].replace("px","")))/2;t.fillText(r.substr(0,h).replace(/^\s+|\s+$/,""),i,(f-1)*n+d+o),r=m?r.substr(h+1):r.substr(h)}t.save()}function j(t,n){var e=n.invoiceNo,r=n.purchaserCoveringWarrantVo,i=r.exchequerNo,o=r.deliveryNum,a=(r.portCode,r.purchaserTaxNo2,r.drewDate),c=r.payDate,l=r.applyCompanyNo,f=r.incomeOrganization,p=r.contractNo,h=(r.sources,r.purchaserTaxNo1,r.amount),m=r.transportWay,d=r.manifestNo,g=r.purchaserName1,v=r.budgetNo,x=(r.tradeWay,r.purchaserName2),y=n.purchaserInvoiceDetailVOList;function S(n,e,r){u(r)<=11?U(t,94,60,r,n,e,"#000000","normal 67px SimSun",1):u(r)<=16?U(t,94,64,r,n,e,"#000000","normal 43px SimSun",1):U(t,94,66,r,n,e,"#000000","normal 40px SimSun",1)}function b(n,e,r,i){u(r)<=17?U(t,94,60,r,n,e,"#000000","normal 67px SimSun",i):u(r)<=20?U(t,94,64,r,n,e,"#000000","normal 43px SimSun",i):U(t,94,66,r,n,e,"#000000","normal 40px SimSun",i)}U(t,85,20,a,2014,567,"#000","normal 67px SimSun",0),U(t,85,40,e,3360,572,"#000","normal 67px SimSun",0),U(t,85,40,g,2851,667,"#000","normal 67px SimSun",0),U(t,85,40,x,2851,734,"#000","normal 67px SimSun",0),U(t,85,30,f,1023,667,"#000","normal 67px SimSun",0),U(t,85,30,v,1023,823,"#000","normal 67px SimSun",0),U(t,85,30,i,1023,978,"#000","normal 67px SimSun",0),U(t,85,18,l,978,2029,"#000","normal 67px SimSun",0),U(t,85,18,p,978,2184,"#000","normal 67px SimSun",0),U(t,85,18,c,978,2340,"#000","normal 67px SimSun",0),U(t,85,18,d,2145,2029,"#000","normal 67px SimSun",0),U(t,85,18,m,2145,2184,"#000","normal 67px SimSun",0),U(t,85,18,o,2145,2340,"#000","normal 67px SimSun",0),U(t,85,50,s(h).replace("元","圆"),1212,1912,"#000","normal 67px SimSun",0),b(3524,1890,h,0),y&&Array.isArray(y)&&y.forEach((function(n,e){var r,i,o;r=522,i=1284+90*e,o=e+1+". "+n.taxInfo,u(o)<=13?U(t,94,60,o,r,i,"#000000","normal 67px SimSun",0):u(o)<=20?U(t,94,64,o,r,i,"#000000","normal 43px SimSun",0):U(t,94,66,o,r,i,"#000000","normal 40px SimSun",0),function(n,e,r){u(r)<=30?U(t,94,60,r,n,e,"#000000","normal 67px SimSun",0):u(r)<=48?U(t,94,64,r,n,e,"#000000","normal 43px SimSun",0):U(t,94,66,r,n,e,"#000000","normal 40px SimSun",0)}(1023,1284+90*e,n.goodsName),S(2290,1284+90*e,n.quantity),function(n,e,r){u(r)<=6?U(t,94,60,r,n,e,"#000000","normal 67px SimSun",1):u(r)<=10?U(t,94,64,r,n,e,"#000000","normal 43px SimSun",1):U(t,94,66,r,n,e,"#000000","normal 40px SimSun",1)}(2630,1284+90*e,n.unit),function(n,e,r){u(r)<=13?U(t,94,60,r,n,e,"#000000","normal 67px SimSun",2):u(r)<=20?U(t,94,64,r,n,e,"#000000","normal 43px SimSun",2):U(t,94,66,r,n,e,"#000000","normal 40px SimSun",2)}(3240,1284+90*e,n.unitPrice),S(3376,1284+90*e,n.taxRate),b(4150,1284+90*e,n.taxAmount,2)}))}function K(t){var n=t.data;return M(this,void 0,void 0,(function(){function t(t){var n=new Image;return n.src=t,new Promise((function(t,e){n.onload=function(){t(n)}}))}var e,r,i,o,a,u;return D(this,(function(s){switch(s.label){case 0:return e=n.entryId,r="*"+e+"*",[4,t(W.default)];case 1:return s.sent(),i={errorCorrectionLevel:"M",margin:0,width:235},[4,x.a.toDataURL(r,i)];case 2:return[4,t(s.sent())];case 3:return o=s.sent(),console.log(o),(a=document.createElement("canvas")).getContext?(u=a.getContext("2d"),console.log("window.devicePixelRatio",window.devicePixelRatio),.5,a.width=2340,a.height=1653.5,u.scale(.5,.5),u.fillStyle="#fff",u.fillRect(0,0,4680,3307),function(t){F({startX:512,startY:667,ctx:t,points:[{pointX:4169,pointY:667},{pointX:4169,pointY:2874},{pointX:512,pointY:2874},{pointX:512,pointY:667}],lineWidth:4,color:"#000"}),F({startX:623,startY:667,ctx:t,points:[{pointX:623,pointY:1134}],lineWidth:4,color:"#000"}),F({startX:1001,startY:667,ctx:t,points:[{pointX:1001,pointY:1890}],lineWidth:4,color:"#000"}),F({startX:968,startY:2029,ctx:t,points:[{pointX:968,pointY:2496}],lineWidth:4,color:"#000"}),F({startX:1679,startY:2029,ctx:t,points:[{pointX:1679,pointY:2496}],lineWidth:4,color:"#000"}),F({startX:2135,startY:2029,ctx:t,points:[{pointX:2135,pointY:2496}],lineWidth:4,color:"#000"}),F({startX:2813,startY:2029,ctx:t,points:[{pointX:2813,pointY:2874}],lineWidth:4,color:"#000"}),F({startX:3480,startY:2029,ctx:t,points:[{pointX:3480,pointY:2874}],lineWidth:4,color:"#000"}),F({startX:3169,startY:1890,ctx:t,points:[{pointX:3169,pointY:2029}],lineWidth:4,color:"#000"}),F({startX:3514,startY:1890,ctx:t,points:[{pointX:3514,pointY:2029}],lineWidth:4,color:"#000"}),F({startX:2074,startY:1134,ctx:t,points:[{pointX:2074,pointY:1890}],lineWidth:4,color:"#000"}),F({startX:2519,startY:1134,ctx:t,points:[{pointX:2519,pointY:1890}],lineWidth:4,color:"#000"}),F({startX:2752,startY:1134,ctx:t,points:[{pointX:2752,pointY:1890}],lineWidth:4,color:"#000"}),F({startX:3247,startY:1134,ctx:t,points:[{pointX:3247,pointY:1890}],lineWidth:4,color:"#000"}),F({startX:3514,startY:1134,ctx:t,points:[{pointX:3514,pointY:1890}],lineWidth:4,color:"#000"}),F({startX:1501,startY:823,ctx:t,points:[{pointX:1501,pointY:978}],lineWidth:4,color:"#000"}),F({startX:1801,startY:823,ctx:t,points:[{pointX:1801,pointY:978}],lineWidth:4,color:"#000"}),F({startX:2340,startY:667,ctx:t,points:[{pointX:2340,pointY:1134}],lineWidth:4,color:"#000"}),F({startX:2451,startY:667,ctx:t,points:[{pointX:2451,pointY:1134}],lineWidth:4,color:"#000"}),F({startX:2829,startY:667,ctx:t,points:[{pointX:2829,pointY:1134}],lineWidth:4,color:"#000"}),F({startX:623,startY:823,ctx:t,points:[{pointX:2340,pointY:823}],lineWidth:4,color:"#000"}),F({startX:623,startY:979,ctx:t,points:[{pointX:2340,pointY:979}],lineWidth:4,color:"#000"}),F({startX:2451,startY:823,ctx:t,points:[{pointX:4168,pointY:823}],lineWidth:4,color:"#000"}),F({startX:2451,startY:979,ctx:t,points:[{pointX:4168,pointY:979}],lineWidth:4,color:"#000"}),F({startX:512,startY:1135,ctx:t,points:[{pointX:4169,pointY:1135}],lineWidth:4,color:"#000"}),F({startX:512,startY:1291,ctx:t,points:[{pointX:4169,pointY:1291}],lineWidth:4,color:"#000"}),F({startX:512,startY:1891,ctx:t,points:[{pointX:4169,pointY:1891}],lineWidth:4,color:"#000"}),F({startX:512,startY:2030,ctx:t,points:[{pointX:4169,pointY:2030}],lineWidth:4,color:"#000"}),F({startX:512,startY:2186,ctx:t,points:[{pointX:2813,pointY:2186}],lineWidth:4,color:"#000"}),F({startX:512,startY:2342,ctx:t,points:[{pointX:2813,pointY:2342}],lineWidth:4,color:"#000"}),F({startX:512,startY:2498,ctx:t,points:[{pointX:2813,pointY:2498}],lineWidth:4,color:"#000"}),F({startX:2901,startY:2179,ctx:t,points:[{pointX:3390,pointY:2179}],lineWidth:4,color:"#000"}),F({startX:3574,startY:2179,ctx:t,points:[{pointX:4063,pointY:2179}],lineWidth:4,color:"#000"}),F({startX:3085,startY:2701,ctx:t,points:[{pointX:3452,pointY:2701}],lineWidth:4,color:"#000"})}(u),function(t,n){console.log(n),U(t,183,20,"海关进口关税",1445,345,"#000","normal 133px SimSun",0),U(t,183,20,"专用缴款书",2507,345,"#000","normal 133px SimSun",0),U(t,94,20,"收入系统: 海关系统",667,567,"#000","normal 67px SimSun",0),U(t,94,10,"填发日期: ",1679,567,"#000","normal 67px SimSun",0),U(t,94,10,"号码 No.",3096,572,"#000","normal 67px SimSun",0),U(t,83,3,"收款单位",539,723,"#000","normal 67px SimSun",0),U(t,94,10,"收入机关",667,695,"#000","normal 67px SimSun",0),U(t,94,20,"科 目",667,850,"#000","normal 67px SimSun",0),U(t,94,10,"收款国库",667,1006,"#000","normal 67px SimSun",0),U(t,99,10,"预算级次",1523,850,"#000","normal 67px SimSun",0),U(t,83,3,"收款单位",2362,678,"#000","normal 67px SimSun",0),t.save(),t.translate(2440,1e3),t.rotate(90*Math.PI/180),U(t,83,3,"(",0,0,"#000","normal 67px SimSun",0),t.restore(),t.rotate(-90*Math.PI/180),t.translate(-2440,-1e3),t.translate(2440,1100),t.rotate(90*Math.PI/180),U(t,83,3,")",0,0,"#000","normal 67px SimSun",0),t.restore(),t.rotate(-90*Math.PI/180),t.translate(-2440,-1100),U(t,83,3,"人",2362,1017,"#000","normal 67px SimSun",0),U(t,83,20,"名 称",2496,695,"#000","normal 67px SimSun",0),U(t,83,20,"账 号",2496,850,"#000","normal 67px SimSun",0),U(t,83,20,"开户银行",2496,1006,"#000","normal 67px SimSun",0),U(t,83,20,"税 号",584,1162,"#000","normal 67px SimSun",0),U(t,83,30,"货 物 名 称",1234,1162,"#000","normal 67px SimSun",0),U(t,83,30,"数 量",2162,1162,"#000","normal 67px SimSun",0),U(t,83,10,"单位",2562,1162,"#000","normal 67px SimSun",0),U(t,83,20,"完税价格(¥)",2796,1162,"#000","normal 67px SimSun",0),U(t,83,20,"税率(%)",3263,1162,"#000","normal 67px SimSun",0),U(t,83,20,"税款金额(¥)",3641,1162,"#000","normal 67px SimSun",0),U(t,83,20,"金额人民币(大写)",606,1912,"#000","normal 67px SimSun",0),U(t,83,20,"合计(¥)",3207,1912,"#000","normal 67px SimSun",0),U(t,83,20,"申请单位编号",556,2057,"#000","normal 67px SimSun",0),U(t,83,20,"合同(批文)号",556,2212,"#000","normal 67px SimSun",0),U(t,83,20,"缴款期限",556,2368,"#000","normal 67px SimSun",0),U(t,83,20,"报关单编号",1723,2057,"#000","normal 67px SimSun",0),U(t,83,20,"运输工具(号)",1723,2212,"#000","normal 67px SimSun",0),U(t,83,20,"提/装货单号",1723,2368,"#000","normal 67px SimSun",0),U(t,83,3,"备注",550,2573,"#000","normal 67px SimSun",0),U(t,83,20,"填 制 单 位",2940,2079,"#000","normal 67px SimSun",0),U(t,83,30,"收款国库(银行)",3596,2079,"#000","normal 67px SimSun",0),U(t,83,20,"制单人",2874,2629,"#000","normal 67px SimSun",0),U(t,83,30,"复核人",2874,2740,"#000","normal 67px SimSun",0),U(t,83,100,"从填发缴款书之日起限15日内缴纳(期末遇法定节假日顺延),逾期按日征收税款总额万分之五的滞纳金",634,2885,"#000","normal 67px SimSun",0)}(u,n),j(u,n),[2,k(a.toDataURL("image/png",.92),300)]):[2]}}))}))}e(155);var z=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},Q=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function H(t,n,e,r,i,o,a,u,s){function c(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function l(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===r&&(r=""),"number"==typeof r&&(r+=""),null==r&&(r=""),1===s?r.length<e&&(t.textAlign="center"):0===s?t.textAlign="left":2===s&&(t.textAlign="right");for(var f=1;c(r)>0;f++){var p=l(r,e),h=p.tlen,m=p.isNextLine;t.fillStyle=a,t.font=u,t.textBaseline="top",t.fillText(r.substr(0,h).replace(/^\s+|\s+$/,""),i,(f-1)*n+o),r=m?r.substr(h+1):r.substr(h)}t.save()}function J(t){var n=t.data;return z(this,void 0,void 0,(function(){var t,e,r,i,o,a,u,s,c,l,f;return Q(this,(function(p){switch(p.label){case 0:return t=n.url,e=n.amountWithTax,r=n.remark,i=n.sellerName,o=n.orderCode,a=n.createTime,u={errorCorrectionLevel:"M",margin:0,width:800},[4,x.a.toDataURL(t,u)];case 1:return s=p.sent(),[4,(h=s,m=new Image,m.src=h,new Promise((function(t,n){m.onload=function(){t(m)}})))];case 2:return c=p.sent(),console.log(c),(l=document.createElement("canvas")).getContext?(f=l.getContext("2d"),l.width=1200,l.height=1900,f.fillStyle="#fff",f.fillRect(0,0,1200,1900),f.fillStyle="#3378FF",f.fillRect(0,0,1200,280),f.fillStyle="rgba(255, 128, 0, 0.04)",f.fillRect(0,280,1200,104),f.drawImage(c,200,484,800,800),H(f,80,30,i,600,63,"#FFFFFF","Bold 56px Microsoft YaHei",1),H(f,52,60,"提醒:二维码有效期为15天,电子发票默认推送至客户定制邮箱",47,310,"#FF8000","400 40px Microsoft YaHei",0),H(f,52,16,"发票金额",200,1384,"#666666","400 40px Microsoft YaHei",0),H(f,52,16,"开票日期",200,1500,"#666666","400 40px Microsoft YaHei",0),H(f,52,16,"订单编号",200,1616,"#666666","400 40px Microsoft YaHei",0),H(f,52,8,"备注",200,1732,"#666666","400 40px Microsoft YaHei",0),H(f,52,20,e,1e3,1384,"#000000","Bold 40px Microsoft YaHei",2),H(f,52,20,a,1e3,1500,"#000000","Bold 40px Microsoft YaHei",2),H(f,52,20,o,1e3,1616,"#000000","Bold 40px Microsoft YaHei",2),H(f,52,36,r,1e3,1732,"#000000","Bold 40px Microsoft YaHei",2),[2,l.toDataURL()]):[2]}var h,m}))}))}var G=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},V=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function q(t){var n=t.startX,e=t.startY,r=t.ctx,i=t.points,o=t.lineWidth,a=void 0===o?4:o,u=t.color,s=void 0===u?"#000":u;r.beginPath(),r.moveTo(n,e),r.lineWidth=a,r.strokeStyle=s,i&&i.length&&i.forEach((function(t){r.lineTo(t.pointX,t.pointY)})),r.stroke(),r.closePath(),r.save()}function Z(t,n){var e=n.details;function r(n,e,r){u(r)<=11?m(t,44,12,r,n,e,"#000000","normal 44px SimSun",2):u(r)<=14?m(t,36,15,r,n,e,"#000000","normal 36px SimSun",2):(u(r),m(t,20,20,r,n,e,"#000000","normal 26px SimSun",2))}function i(n,e,r,i){r=0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)||0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?"***":p(r)?"":0===r?"***":r,u(r)<=18?m(t,44,19,r,n,e,"#000000","normal 44px SimSun",2):u(r)<=22?m(t,36,23,r,n,e,"#000000","normal 36px SimSun",2):u(r)<=30?m(t,26,31,r,n,e,"#000000","normal 26px SimSun",2):u(r)<=34?m(t,24,35,r,n,e,"#000000","normal 24px SimSun",2):u(r)<=42?m(t,20,43,r,n,e,"#000000","normal 20px SimSun",0):m(t,20,43,r,n,e-4,"#000000","normal 20px SimSun",0)}e.forEach((function(n,e){var o,a,s;o=432,a=793+40*e,s=""+n.goodsName,u(s)<=18?m(t,44,19,s,o,a,"#000000","normal 44px SimSun",0):u(s)<=22?m(t,40,23,s,o,a,"#000000","normal 36px SimSun",0):u(s)<=30?m(t,26,31,s,o,a,"#000000","normal 26px SimSun",0):u(s)<=34?m(t,24,35,s,o,a,"#000000","normal 24px SimSun",0):u(s)<=42?m(t,20,43,s,o,a,"#000000","normal 20px SimSun",0):m(t,20,43,s,o,a-4,"#000000","normal 20px SimSun",0),n.quantity&&n.unitPrice&&(function(n,e,r){u(r)<=18?m(t,44,19,r,n,e,"#000000","normal 44px SimSun",2):u(r)<=22?m(t,36,23,r,n,e,"#000000","normal 36px SimSun",2):u(r)<=30?m(t,26,31,r,n,e,"#000000","normal 26px SimSun",2):u(r)<=34?m(t,24,35,r,n,e,"#000000","normal 24px SimSun",2):u(r)<=42?m(t,20,43,r,n,e,"#000000","normal 20px SimSun",0):m(t,20,43,r,n,e-4,"#000000","normal 20px SimSun",0)}(1238,793+40*e,n.quantity),function(n,e,r){u(r)<=11?m(t,44,12,r,n,e,"#000000","normal 44px SimSun",2):u(r)<=14?m(t,36,15,r,n,e,"#000000","normal 36px SimSun",2):(u(r),m(t,20,20,r,n,e,"#000000","normal 26px SimSun",2))}(1516,793+40*e,n.unitPrice)),r(1794,793+40*e,n.amount),function(n,e,r,i){0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="免税":0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="不征税":"number"==typeof r&&(r=100*r+"%"),m(t,44,6,r,n,e,"#000000","normal 44px SimSun",1)}(1885,793+40*e,n.taxRate,n),i(2278,793+40*e,n.taxAmount,n)}));var o=e[0].amount,a=e[0].taxAmount;r(1794,1743,o?"¥"+o:o),i(2278,1743,a?"¥"+a:a,e[0])}function $(t){var n=t.data;return G(this,void 0,void 0,(function(){var t,e;return V(this,(function(r){return(t=document.createElement("canvas")).getContext?(e=t.getContext("2d"),t.width=2480,t.height=3508,e.fillStyle="#fff",e.fillRect(0,0,2480,3508),function(t){q({startX:200,startY:472,ctx:t,points:[{pointX:2280,pointY:472},{pointX:2280,pointY:3303},{pointX:200,pointY:3303},{pointX:200,pointY:472}],lineWidth:4,color:"#000"}),q({startX:200,startY:672,ctx:t,points:[{pointX:2280,pointY:672}],lineWidth:4,color:"#000"}),q({startX:424,startY:572,ctx:t,points:[{pointX:1240,pointY:572}],lineWidth:4,color:"#000"}),q({startX:1464,startY:572,ctx:t,points:[{pointX:2280,pointY:572}],lineWidth:4,color:"#000"}),q({startX:424,startY:472,ctx:t,points:[{pointX:424,pointY:3303}],lineWidth:4,color:"#000"}),q({startX:738,startY:472,ctx:t,points:[{pointX:738,pointY:672}],lineWidth:4,color:"#000"}),q({startX:1240,startY:472,ctx:t,points:[{pointX:1240,pointY:784}],lineWidth:4,color:"#000"}),q({startX:1464,startY:472,ctx:t,points:[{pointX:1464,pointY:672}],lineWidth:4,color:"#000"}),q({startX:1778,startY:472,ctx:t,points:[{pointX:1778,pointY:672}],lineWidth:4,color:"#000"}),q({startX:424,startY:784,ctx:t,points:[{pointX:2280,pointY:784}],lineWidth:4,color:"#000"}),q({startX:842,startY:672,ctx:t,points:[{pointX:842,pointY:784}],lineWidth:4,color:"#000"}),q({startX:1240,startY:672,ctx:t,points:[{pointX:1240,pointY:784}],lineWidth:4,color:"#000"}),q({startX:1518,startY:672,ctx:t,points:[{pointX:1518,pointY:784}],lineWidth:4,color:"#000"}),q({startX:1796,startY:672,ctx:t,points:[{pointX:1796,pointY:784}],lineWidth:4,color:"#000"}),q({startX:1974,startY:672,ctx:t,points:[{pointX:1974,pointY:784}],lineWidth:4,color:"#000"}),q({startX:200,startY:1808,ctx:t,points:[{pointX:2280,pointY:1808}],lineWidth:4,color:"#000"}),q({startX:200,startY:2833,ctx:t,points:[{pointX:2280,pointY:2833}],lineWidth:4,color:"#000"}),q({startX:1090,startY:2419,ctx:t,points:[{pointX:1493,pointY:2419}],lineWidth:2,color:"#000"}),q({startX:1643,startY:2419,ctx:t,points:[{pointX:2055,pointY:2419}],lineWidth:2,color:"#000"}),q({startX:1090,startY:2750,ctx:t,points:[{pointX:1493,pointY:2750}],lineWidth:2,color:"#000"}),q({startX:1643,startY:2750,ctx:t,points:[{pointX:2055,pointY:2750}],lineWidth:2,color:"#000"}),q({startX:698,startY:1828,ctx:t,points:[{pointX:750,pointY:1828},{pointX:750,pointY:1880},{pointX:698,pointY:1880},{pointX:698,pointY:1828}],lineWidth:2,color:"#000"}),q({startX:910,startY:1957,ctx:t,points:[{pointX:962,pointY:1957},{pointX:962,pointY:2009},{pointX:910,pointY:2009},{pointX:910,pointY:1957}],lineWidth:2,color:"#000"}),q({startX:910,startY:2025,ctx:t,points:[{pointX:962,pointY:2025},{pointX:962,pointY:2077},{pointX:910,pointY:2077},{pointX:910,pointY:2025}],lineWidth:2,color:"#000"}),q({startX:698,startY:2486,ctx:t,points:[{pointX:750,pointY:2486},{pointX:750,pointY:2537},{pointX:698,pointY:2537},{pointX:698,pointY:2486}],lineWidth:2,color:"#000"})}(e),function(t){m(t,64,40,"开具红字增值税专用发票信息表",1240,180,"#000","normal 64px Microsoft YaHei",1),m(t,40,40,"填开日期:",272,384,"#000","normal 40px Microsoft YaHei",0),m(t,48,10,"销售方",312,545,"#000","normal 48px SimSun",1),m(t,48,10,"购买方",1352,545,"#000","normal 48px SimSun",1),m(t,44,20,"名 称",581,497,"#000","normal 44px SimSun",1),m(t,44,20,"纳税人识别号",581,596,"#000","normal 44px SimSun",1),m(t,44,20,"名 称",1621,497,"#000","normal 44px SimSun",1),m(t,44,20,"纳税人识别号",1621,596,"#000","normal 44px SimSun",1),m(t,60,5,"开具红字专用发票内容",312,1054,"#000","normal 48px SimSun",1),m(t,44,18,"货物(劳务服务)名称",633,680,"#000","normal 44px SimSun",1),m(t,44,18,"数量",1046,703,"#000","normal 44px SimSun",1),m(t,44,18,"单价",1379,703,"#000","normal 44px SimSun",1),m(t,44,18,"金额",1662,703,"#000","normal 44px SimSun",1),m(t,44,18,"税率",1885,703,"#000","normal 44px SimSun",1),m(t,44,18,"税额",2137,703,"#000","normal 44px SimSun",1),m(t,44,18,"合计",590,1743,"#000","normal 44px SimSun",0),m(t,60,5,"说明",312,2296,"#000","normal 48px SimSun",1),m(t,48,20,"一、购买方",450,1830,"#000","normal 48px SimSun",0),m(t,48,100,"对应蓝字专用发票抵扣增值税销项税额情况:",536,1893,"#000","normal 44px SimSun",0),m(t,48,100,"1.已抵扣:",698,1961,"#000","normal 44px SimSun",0),m(t,48,100,"2.未抵扣:",698,2029,"#000","normal 44px SimSun",0),m(t,48,100,"对应蓝字专用发票的代码:",536,2351,"#000","normal 44px SimSun",0),m(t,48,100,"号码:",1504,2351,"#000","normal 44px SimSun",0),m(t,48,20,"二、销售方",450,2488,"#000","normal 48px SimSun",0),m(t,48,100,"对应蓝字专用发票的代码:",536,2691,"#000","normal 44px SimSun",0),m(t,48,100,"号码:",1504,2691,"#000","normal 44px SimSun",0),m(t,60,7,"红字发票信息表编号",240,2978,"#000","normal 48px SimSun",1)}(e),function(t,n){var e=n.applyTime,r=new Date(e),i=r.getFullYear(),o=r.getMonth()+1,a=o.toString();o>=1&&o<=9&&(a="0"+o);var u=r.getDate(),s=u.toString();u>=0&&u<=9&&(s="0"+u),m(t,44,24,e?i+"年"+a+"月"+s+"日":"",500,378,"#000","normal 44px SimSun",0)}(e,n),function(t,n){console.log(n),m(t,48,24,n.sellerName,753,476,"#000","normal 44px SimSun",0),m(t,48,24,n.sellerTaxNo,753,600,"#000","normal 44px SimSun",0),m(t,48,24,n.purchaserName,1786,476,"#000","normal 44px SimSun",0),m(t,48,24,n.purchaserTaxNo,1786,600,"#000","normal 44px SimSun",0)}(e,n),Z(e,n),function(t,n){var e=n.applicationRole,r=n.invoiceCode,i=n.invoiceNo,o=n.deductFlag;1===e?(m(t,44,43,r,1090,2351,"#000000","normal 44px SimSun",0),m(t,44,43,i,1644,2351,"#000000","normal 44px SimSun",0),m(t,44,43,"√",698,1828,"#000000","normal 50px SimSun",0),1===o?m(t,44,43,"√",910,1957,"#000000","normal 50px SimSun",0):2===o&&m(t,44,43,"√",910,2025,"#000000","normal 50px SimSun",0)):(m(t,44,43,r,1090,2691,"#000000","normal 44px SimSun",0),m(t,44,43,i,1644,2691,"#000000","normal 44px SimSun",0),m(t,44,43,"√",698,2486,"#000000","normal 50px SimSun",0))}(e,n),m(e,44,43,n.applicationNo,440,3043,"#000000","normal 50px SimSun",0),[2,t.toDataURL()]):[2]}))}))}var tt=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},nt=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function et(t,n){t.lineWidth=4,t.strokeStyle="black",t.beginPath(),t.setLineDash([20,15]),t.moveTo(0,n),t.lineTo(630,n),t.stroke()}function rt(t,n){t.beginPath(),t.lineWidth=4,t.strokeStyle="black",t.setLineDash([]),t.arc(116,n+60,60,0,2*Math.PI,!1),t.stroke()}function it(t,n){t.fillStyle="#fff",t.fillRect(0,0,630,1150),et(t,160),et(t,542),rt(t,198),m(t,65,40,"收",84,230,"#000","bold 65px Microsoft YaHei",0),rt(t,580),m(t,65,40,"寄",84,612,"#000","bold 65px Microsoft YaHei",0),m(t,56,16,n.mailNo,315,32,"#000","normal 56px Bahnschrift",1),m(t,28,40,n.createTime,315,96,"#000","normal 28px Microsoft YaHei",1),m(t,42,26,n.sender,56,352,"#000","normal 40px Microsoft YaHei",0),m(t,42,26,n.senderMobile,56,452,"#000","normal 40px Microsoft YaHei",0),m(t,42,26,n.receiver,56,734,"#000","normal 40px Microsoft YaHei",0),m(t,42,26,n.receiveAddress,56,834,"#000","normal 40px Microsoft YaHei",0),m(t,42,26,n.mailNo,315,970,"#000","normal 120px C39HrP24DhTt",1)}function ot(t){var n=t.data;return tt(this,void 0,void 0,(function(){var t,e;return nt(this,(function(r){return(t=document.createElement("canvas")).getContext?(e=t.getContext("2d"),t.width=3508,t.height=2480,e.fillStyle="#fff",e.fillRect(0,0,3508,2480),function(t,n){n.forEach((function(n,e){0===e?(t.translate(60,60),it(t,n)):e<5?(t.translate(690,0),it(t,n)):5===e?(t.translate(0,1210),it(t,n)):(t.translate(-690,0),it(t,n))}))}(e,n),[2,t.toDataURL()]):[2]}))}))}var at=null,ut=function(){try{var t=navigator.userAgent;if(t.match(/Windows\sPhone/i))return!0;if(t.match(/iPhone|iPod|iPad/i))return!0;if(t.match(/Android/i))return!0;if(t.match(/Edge\D?\d+/i))return!0;var n=t.match(/Trident\D?\d+/i),e=t.match(/MSIE\D?\d+/i),r=t.match(/OPR\D?\d+/i),i=t.match(/Firefox\D?\d+/i),o=t.match(/x64/i);if(!n&&!e&&o)return!0;if(i){if(i=i[0].match(/\d+/),Number(i[0])>=41||o)return!0}else if(r){if(r=r[0].match(/\d+/),Number(r[0])>=32)return!0}else if(!n&&!e){var a=t.match(/Chrome\D?\d+/i);if(a&&(a=a[0].match(/\d+/),Number(a[0])>=41))return!0}return!1}catch(t){return!0}},st=function(t,n,e,r){var i,o="<br><font color='#000'>第一步:<br>请先安装打印所需字体!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/resource/%E5%AD%97%E4%BD%93.ttf' target='_self'>下载并双击打开后安装字体文件</a><br>(如已安装,请忽略)</font><br>";function a(t){var n='\n <div style="width:500px;height:300px;padding: 20px 15px 0px 15px;z-index:99999;background:rgba(255,251,251,1);">\n <p style="text-align: right;margin: 0"><span class="icon-font" id="lodop-print-close" style="cursor:pointer"><img style="width: 20px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFKUlEQVR4Xu2bWc8URRSGX2IIUSOKK664RI0aWVwQccEt7oILeM8N/AN/hRfeypXXqCgKIu6K+woSYowxigqKCigKRo1LHnMm6Uy6TndXV9U3cabuYLqr6nmm+nTNOfVN05i3aWPOr4mAyQoYcwOTR2DMF0BjEDxC0gOSlkh6VdLDkr4dcWknS1pdmfODkn4NzbnpEVgraUXl5h32709GVMIFkh6VdFFlfo9IWhkj4DpJL9fcuN0kfDpiEs43+Itr5nWWpC/r5uutgJAA+tlmEj4bEQnnGvy8wHwuk/RBVwHzbQUcE+j0I5Pw+RRLOFvSY5IWBObxiqTrYx4B7mGF/O0AYpUY8cUUSTjT4C8NjE+sYn7ErtrWFAS5abqkPxzA9yQtl/RVYQlnGPzlgXGJUcATs4KtjQBuPlzSIaefd0zCN4UknGbwVwTGIzYBT6xyW1sBdHKUpANOb2+ZhN1Ng/b8/BSDvzLQDzEJeGJUY+sigM6OlbTX6fUNk/Bd48hxF8w2+KsCtxOL7pf0ftvuuwqg3xMl7XEG2GISvm87iZbXMS7R/prA9TsN/t2W/f13WYwA7mMZ7nIGYttMYPyxy2Sca4+39zx7k7r2tcG/3XW8WAGMQxTGeqixi0TCvq6TGrqex47t7Q2BfvgiWPZvxozTRwDjsQnxNkIvmoSfYiYniU0Y8DcF7ueHGfCvR/Yf/QhUxztPkve74HmT4L1B6uY/0+BvDsARh4B/LRa+TwwYHvNCb7clabNJCP4sHerwSAt4twbgfjB4trm9Wt9HoDo4P0S2OrPZJOk+Sb81zJhNF9H+9sB1vIb55l/qRW43pxRAl+zJvXfwBlsJvwcmP8Pg7wx8vt/gX0gBn/IRqM6H7an3OnrKJPw5BMFvDr75pQG4nw3+uVTwuQTQLzs1LzI/aRL+MpjDDP7uANwvBv9sSvicAuibPKIXpNaZBK7lm783AHfQ4J9JDZ9bAP3fKMl7XgGnsWGqawRMAh6xI0tLHQTrJsmrjDdA10agBJ6Yka2VEMDkiepPd6AgQAJPrMjaSgkAggD3RAsaAiPwxIjsraSAwbPO3j7U/jH4QWz43wkYLrTUASKIFVCklVwBbeAH0MUklBLQBb6ohBICPPhBjZGa3pQ8DrkFePDkEAYbIIIetb3iEnIK8ODJ2wP/sRHPte0wNb6iEnIJ8OBJoQE/nDugFslKOKekhBwCPHjy9sB/GIC8xCRQzi6yElIL8ODJIAPfVLSglM1KmFNCQkoBHjx5e+DbFi0WmoTTc0tIJcCDJ28PfNeixSKTcGpOCSkEePDk7YGPKlpIWmwSOPiUJSb0FeDBk7cHPrpoYcRXm4STckjoI8CDJ28PfK+iRQX4WpNwQmoJsQI8ePL21OfrTpgF5t/qvymM8nY4LqWEGAEePHl74KkJ5mgUSJEwK5WErgI8ePL2wFMLzNkolCLh6BQSugjw4MnbA08NsES7xQqnHNvp9XZoK8CDJ28PfEzmt4+s20wChdRoCW0EePDk7YHf2Iekx713mAQKqlESmgRwOnxVoHPy9sB3SXf3YA3eepdJoLBa19bY6fHaDz0BbDxCp73I2wO/PgdRRJ/LTAIF1rrGmabaY/6eAJIUdQcNydsD3ybHH8ESfcs9JoFC63CLOixNJ2xmqiezyNsD/3j0NPPeyAEMMsrVL7bXYWnK3PzFCDV7nnWep2yFykRuKMMRt4gNvJkekhQ8U9AUBBPNaXS7mQgY3e+mzMwmK6CM59EdZexXwL8Q0/tB+Dg3tAAAAABJRU5ErkJggg=="></img></span></p>\n '.concat(t,"\n </div>"),e=document.createElement("div");e.style.cssText="background:rgba(0,0,0,0.3);position:fixed;top:0%;left:0%;width:100%;height:100%;z-index:99999;display: flex;justify-content: center;align-items: center;",e.innerHTML=n,document.body.appendChild(e),document.getElementById("lodop-print-close").onclick=function(){document.body.removeChild(e)}}try{var u=navigator.userAgent,s=!!u.match(/MSIE/i)||!!u.match(/Trident/i);if(ut()){try{i=window.getCLodop()}catch(t){}if(!i&&"complete"!==document.readyState)return;if(!i)return void a(o+"<br><font color='#000'>第二步:<br>Web打印服务CLodop未安装启动,点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/CLodop_Setup_for_Win32NT.exe' target='_self'>下载执行安装</a>"+(r?"<br>(若此前已安装过,可<a href='CLodop.protocol:setup' target='_self'>点这里直接再次启动</a>)":"")+",成功后请刷新本页面。</font>");window.CLODOP.CVERSION<"3.0.6.0"&&a(o+"<br><font color='#000'>第二步:<br>Web打印服务CLodop需升级!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/CLodop_Setup_for_Win32NT.exe' target='_self'>执行升级</a>,升级后请刷新页面。</font>"),n&&n.parentNode&&n.parentNode.removeChild(n),t&&t.parentNode&&t.parentNode.removeChild(t)}else{var c=s&&!!u.match(/x64/i);if(t||n?i=s?t:n:at?i=at:((i=document.createElement("object")).setAttribute("width",0),i.setAttribute("height",0),i.setAttribute("style","position:absolute;left:0px;top:-100px;width:0px;height:0px;"),s?i.setAttribute("classid","clsid:2105C259-1E0C-4534-8141-A753534CB4CA"):i.setAttribute("type","application/x-print-lodop"),document.documentElement.appendChild(i),at=i,(i=document.createElement("object")).setAttribute("width",0),i.setAttribute("height",0),i.setAttribute("style","position:absolute;left:0px;top:-100px;width:0px;height:0px;"),s?i.setAttribute("classid","clsid:2105C259-1E0C-4534-8141-A753534CB4CA"):i.setAttribute("type","application/x-print-lodop"),document.documentElement.appendChild(i),at=i),!i||!i.VERSION)return u.indexOf("Chrome")>=0&&a("<br><br><font color='#000'>(如果此前正常,仅因浏览器升级或重安装而出问题,需重新执行以上安装)</font>"),u.indexOf("Firefox")>=0&&a("<br><br><font color='#000'>(注意:如曾安装过Lodop旧版附件npActiveXPLugin,请在【工具】->【附加组件】->【扩展】中先卸它)</font>"),a(c?"<br><font color='#000'>第二步:<br>打印控件未安装!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/install_lodop64.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>":"<br><font color='#000'>第二步:<br>打印控件未安装!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/install_lodop32.exe' target='_self'>执行安装</a>,安装后请刷新页面或重新进入。</font>"),i}return i.VERSION<"6.2.2.4"?(ut()||a(c?"<br><font color='#000'>第二步:<br>打印控件需要升级!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/install_lodop64.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>":"<br><font color='#000'>第二步:<br>打印控件需要升级!点击这里<a href='https://smarttax-basic.oss-cn-shanghai.aliyuncs.com/lodop_plugin/install_lodop32.exe' target='_self'>执行升级</a>,升级后请重新进入。</font>"),i):(i.SET_LICENSES("",e,"",""),i)}catch(t){alert("getLodop出错:"+t)}};function ct(t){return t.toString().includes("mm")?Number(t.split("mm")[0]):t.toString().includes("pt")?.376*t.split("pt")[0]:(console.log(t,"-----"),Number(25.4*t/96))}function lt(t,n,e,r,i,o,a,u,s,c,l){function f(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function p(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===s&&(s=1),void 0===c&&(c=null),void 0===l&&(l=.3),"number"==typeof r&&(r+=""),null==r&&(r="");for(var h=1;f(r)>0;h++){var m=p(r,e),d=m.tlen,g=m.isNextLine;o||console.log(r);var v=(h-1)*ct(n)+ct(o)+"mm",x=e/2*a+a+"pt";c&&(x=c),t.ADD_PRINT_TEXT(v,i,x,18,r.substr(0,d).replace(/^\s+|\s+$/,"")),r=g?r.substr(d+1):r.substr(d),t.SET_PRINT_STYLEA(0,"FontSize",a),t.SET_PRINT_STYLEA(0,"LineSpacing",-3),t.SET_PRINT_STYLEA(0,"LetterSpacing",l),t.SET_PRINT_STYLEA(0,"TextNeatRow",!0),t.SET_PRINT_STYLEA(0,"FontName",u),2===s?r.length<e&&t.SET_PRINT_STYLEA(0,"Alignment",2):1===s?t.SET_PRINT_STYLEA(0,"Alignment",1):3===s&&t.SET_PRINT_STYLEA(0,"Alignment",3)}}function ft(t,n){var e,r,i,o,a=n.details,s=n.amount,c=n.taxAmount,l=(n.taxRate,n.listFlag),f=n.qdbz;function h(n,e,r){u(r)<=31?lt(t,"9pt",32,r,n,e,9,"宋体",0,"53mm"):u(r)<=34?lt(t,"8pt",36,r,n,e,8,"宋体",0,"53mm"):u(r)<=40?lt(t,"7pt",42,r,n,e,7,"宋体",0,"53mm"):u(r)<=47?lt(t,"6pt",48,r,n,e,6,"宋体",0,"53mm"):(u(r),lt(t,"5.5pt",52,r,n,e,5.5,"宋体",0,"53mm"))}function m(n,e,r){var i=r||0===r?Number(r).toFixed(2):r;lt(t,"9pt",18,i,n,e,9,"宋体",3,"28mm")}function d(n,e,r,i){i?0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="免税":0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?r="不征税":"number"==typeof r&&(r=100*r+"%"):r=r,u(r)<=5?lt(t,"9pt",6,r,n,e,9,"宋体",3,"12mm",1):u(r)<=6?lt(t,"8pt",7,r,n,e,8,"宋体",3,"12mm",1):u(r)<=7?lt(t,"7pt",8,r,n,e,7,"宋体",3,"12mm",1):(u(r),lt(t,"6pt",9,r,n,e,6,"宋体",3,"12mm",1))}function g(t){var n,e=[];t.details.forEach((function(r,i){n=0===r.taxPre&&1===r.taxPreType&&1!==Number(t.invoiceType)&&4!==Number(t.invoiceType)?"免税":0===r.taxPre&&2===r.taxPreType&&1!==Number(t.invoiceType)&&4!==Number(t.invoiceType)?"不征税":"number"==typeof r.taxRate?100*r.taxRate+"%":r.taxRate,e.includes(n)||e.push(n)})),1===e.length?d("162mm","52mm",e[0],""):2===e.length&&e.includes("免税")&&e.includes("不征税")&&d("162mm","52mm","零税率","")}function v(n){var e;p(n.taxAmount)?e=n.taxAmount.toFixed(2):"number"==typeof n.taxAmount&&(e=0===n.taxAmount?"***":n.taxAmount.toFixed(2)),lt(t,"9pt",18,e,"175mm","52mm",9,"宋体",3,"28mm")}if(1===l||a.length>8||1===f)s>=0?(h("7mm","52mm","(详见销货清单)"),m("134mm","52mm",s),g(n),v(n)):(h("7mm","52mm","详见对应正数发票及清单"),m("134mm","52mm",s),g(n),v(n));else{a.forEach((function(n,e){var r,i,o;if(h("6mm",52+4*e+"mm",""+(n.shortName||"")+n.goodsName),r="57mm",i=52+4*e+"mm",o=n.specification,u(o)<=14?lt(t,"9pt",15,o,r,i,9,"宋体",0,"26mm"):u(o)<=16?lt(t,"9pt",17,o,r,i,7,"宋体",0,"26mm"):u(o)<=19?lt(t,"9pt",20,o,r,i,6.5,"宋体",0,"26mm"):lt(t,"4.5pt",22,o,r,i,5.5,"宋体",0,"26mm"),function(n,e,r){u(r)<=7?lt(t,"9pt",8,r,n,e,9,"宋体",2):u(r)<=9?lt(t,"9pt",10,r,n,e,7,"宋体",2):u(r)<=11?lt(t,"9pt",12,r,n,e,6,"宋体",2):u(r)<=13?lt(t,"9pt",14,r,n,e,5,"宋体",2):u(r)<=17?lt(t,"9pt",18,r,n,e,4,"宋体",2):lt(t,"5pt",18,r,n,e,4,"宋体",2)}("80mm",52+4*e+"mm",n.unit),n.quantity&&n.unitPrice){var a=String(n.quantity),s=String(n.unitPrice);!function(n,e,r){u(r)<=9?lt(t,"9pt",11,r,n,e,9,"宋体",3,"20mm"):u(r)<=12?lt(t,"9pt",13,r,n,e,7,"宋体",3,"20mm"):u(r)<=14?lt(t,"9pt",15,r,n,e,7,"宋体",3,"20mm"):u(r)<=16?lt(t,"9pt",17,r,n,e,6,"宋体",3,"20mm"):lt(t,"6pt",17,r,n,e,6,"宋体",3,"20mm")}("92mm",52+4*e+"mm",a.length>13?a.substr(0,13):a),function(n,e,r){u(r)<=9?lt(t,"9pt",11,r,n,e,9,"宋体",3,"22mm"):u(r)<=12?lt(t,"9pt",13,r,n,e,8,"宋体",3,"22mm"):u(r)<=14?lt(t,"9pt",15,r,n,e,7,"宋体",3,"22mm"):u(r)<=16?lt(t,"9pt",17,r,n,e,6,"宋体",3,"22mm"):lt(t,"6pt",17,r,n,e,6,"宋体",3,"22mm")}("112mm",52+4*e+"mm",s.length>13?s.substr(0,13):s)}m("134mm",52+4*e+"mm",n.amount),d("162mm",52+4*e+"mm",n.taxRate,n),function(n,e,r,i){r=0===i.taxPre&&1===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)||0===i.taxPre&&2===i.taxPreType&&1!==Number(i.invoiceType)&&4!==Number(i.invoiceType)?"***":p(r)?"":0===r?"***":Number(r).toFixed(2),lt(t,"9pt",18,r,n,e,9,"宋体",3,"28mm")}("175mm",52+4*e+"mm",n.taxAmount,n)}))}e="134mm",r="86mm",o=(i=s)||0===i?Number(i).toFixed(2):i,lt(t,"9pt",18,"¥"+o,e,r,9,"Courier New",3,"28mm");var x=p(c)?"":0===c?"***":c;""!==x&&"***"!==x&&(x="¥"+(x=x||0===x?Number(x).toFixed(2):x)),function(n,e,r){lt(t,"9pt",18,r,n,e,9,"Courier New",3,"28mm")}("175mm","86mm",x)}var pt=function(t){var n=t.data,e=t.top,r=void 0===e?0:e,o=t.left,a=void 0===o?0:o,c=t.showWindow,l=void 0!==c&&c,f=t.toolsType,h=void 0===f?0:f,m=t.licenses,d=void 0===m?"":m,g=t.company,v=void 0===g?"":g,x=t.getProjectLodop,y=void 0===x?st:x,S=t.isInitPrinter,b=void 0===S?1:S,w=t.printer,A=void 0===w?"":w;a-=16,console.log("调用打印方法了",n,r,a,l,h);var T=y("","",d);T&&(T.PRINT_INITA(r,a,"241.3mm","139.7mm",n.invoiceCode+" "+n.invoiceNo),T.SET_PRINT_PAGESIZE(1,"241.3mm","139.7mm",""),T.SET_SHOW_MODE("LANGUAGE",0),T.SET_LICENSES(v,d,"",""),0===b&&A&&T.SET_PRINTER_INDEXA(A),function(t,n){var e=n.invoiceType,r=n.invoiceCode,o=n.invoiceNo,a=n.amount,u=n.drewDate,s=n.checkCode,c="10";1===Number(e)?c="01":2===Number(e)?c="04":3===Number(e)?c="10":4===Number(e)&&(c="08");var l=new Date(u),f=l.getFullYear(),p=l.getMonth()+1,h=p.toString();p>=1&&p<=9&&(h="0"+p);var m=l.getDate(),d=m.toString();m>=0&&m<=9&&(d="0"+m);var g=u?""+f+h+d:"",v="01,"+c+","+r+","+o+","+(a||0===a?Number(a).toFixed(2):a)+","+g+","+s,x=v+","+i.ToCRC16(v,!0);console.log(x),t.ADD_PRINT_BARCODE("3.5mm","8.5mm","22.00mm","22.00mm","QRCode",""+x),t.SET_PRINT_STYLEA(0,"GroundColor","#FFFFFF"),t.SET_PRINT_STYLEA(0,"QRCodeVersion",5),t.SET_PRINT_STYLEA(0,"QRCodeErrorLevel","L"),t.SET_PRINT_STYLEA(0,"DataCharset","GB2312")}(T,n),function(t,n){var e=n.invoiceCode,r=n.invoiceNo,i=n.drewDate,o=n.checkCode,a=(n.machineCode,n.invoiceStatus,n.status,n.invoiceType);!function(n){if(n){var e=new Date(n),r=e.getFullYear(),i=e.getMonth()+1,o=i.toString();i>=1&&i<=9&&(o="0"+i);var a=e.getDate(),u=a.toString();a>=0&&a<=9&&(u="0"+a),lt(t,"9pt",42,r+"年"+o+"月"+u+"日","175mm","18mm",9,"宋体")}}(i),function(n){if(void 0===n&&(n=""),!p(n)&&1!==Number(a)&&4!==Number(a)){lt(t,"9pt",8,"校验码","30mm","18mm",9,"宋体");for(var e=n.length/4,r=0;r<4;r++){var i=n.substr(0===r?0:e*r,e);lt(t,"9pt",6,i,42+10*r+"mm","18mm",9,"宋体")}}}(o),lt(t,"9pt",42,e,"178mm","8mm",8,"宋体",2,"38mm"),lt(t,"9pt",42,r,"178mm","13mm",11,"宋体",2,"38mm")}(T,n),function(t,n){var e=n.purchaserName,r=n.purchaserTaxNo,i=n.purchaserAddress,o=n.purchaserTel,a=n.purchaserBankName,s=n.purchaserBankAccount,c=n.sellerName,l=n.sellerTaxNo,f=n.sellerAddress,p=n.sellerTel,h=n.sellerBankName,m=n.sellerBankAccount;function d(n,e,r){u(r)<=48?lt(t,"9pt",49,r,n,e,9,"宋体"):u(r)<=62?lt(t,"9pt",63,r,n,e,7.5,"宋体"):lt(t,"7pt",63,r,n,e,7.5,"宋体")}d("36mm","26mm",e),lt(t,"9pt",30,r,"39mm","31mm",12,"Courier New"),d("36mm","36mm",""+(i||"")+(o||"")),d("36mm","41mm",""+(a||"")+(s||"")),d("36mm","100mm",c),lt(t,"9pt",30,l,"39mm","105mm",12,"Courier New"),d("36mm","110mm",""+(f||"")+(p||"")),d("36mm","115mm",""+(h||"")+(m||""))}(T,n),function(t,n){var e=n.ciphertext,r=void 0===e?"":e;if(!p(r))for(var i=r.length/4,o=0;o<4;o++){lt(t,"9pt",36,r.substr(0===o?0:i*o,i),"126mm",26+5*o+"mm",12,"Courier New")}}(T,n),ft(T,n),function(t,n){var e,r,i,o=n.amountWithTax;!function(n,e,r){t.ADD_PRINT_ELLIPSE(ct(e)-ct(r)/2+"mm",ct(n)-ct(r)/2+"mm",r,r,0,1);var i=Math.sqrt(ct(r)/2);t.ADD_PRINT_LINE(ct(e)-i+"mm",ct(n)-i+"mm",ct(e)+i+"mm",ct(n)+i+"mm",0,1),t.ADD_PRINT_LINE(ct(e)-i+"mm",ct(n)+i+"mm",ct(e)+i+"mm",ct(n)-i+"mm",0,1)}("60mm","94.2mm","4mm"),e="63mm",r="93mm",i=(i=o)>0?s(i).replace("元","圆"):"(负数)"+s(Math.abs(i)).replace("元","圆"),lt(t,"9pt",56,i,e,r,9,"宋体",0,"96mm"),function(n,e,r){lt(t,"9pt",56,r,n,e,11,"Courier New",0,"37mm")}("168mm","93mm","¥"+(o||0===o?Number(o).toFixed(2):o))}(T,n),function(t,n){var e=n.remark;p(e)&&(e=""),lt(t,"9pt",50,e.replace(/\\r\\n/g,"\n")||"","126mm","100mm",9,"宋体")}(T,n),function(t,n){var e=n.payee,r=n.reviewer,i=n.drawer;lt(t,"9pt",50,e,"22mm","121mm",9,"宋体"),lt(t,"9pt",50,r,"74mm","121mm",9,"宋体"),lt(t,"9pt",50,i,"121mm","121mm",9,"宋体")}(T,n),function(t,n){n.invoiceStatus,n.status;var e=n.amountWithTax,r=n.amount;e<0&&r<0&<(t,"9pt",42,"销项负数","30mm","14mm",9,"黑体"),1===n.specialFlag&<(t,"9pt",42,"成品油","30mm","10mm",9,"黑体")}(T,n),l?T.PREVIEW():T.PRINT(),console.log("打印打印"))},ht={0:"类型异常",1:"增值税专用发票",2:"增值税普通发票",3:"增值税电子发票"},mt=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},dt=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},gt=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},vt=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function xt(t){return t.toString().includes("mm")?Number(t.split("mm")[0]):t.toString().includes("pt")?.376*t.split("pt")[0]:(console.log(t,"-----"),Number(25.4*t/96))}function yt(t,n,e,r,i,o,a,u,s,c){function l(t){for(var n=t.length,e=0,r=0;r<n;r++)t.charCodeAt(r)>128?e+=2:e+=1;return e}function f(t,n){for(var e=t.length,r=e,i=0,o=!1,a=0;a<e;a++){if(o="\n"===t.substr(a,1)){r=a;break}if(t.charCodeAt(a)>128){if(!(i+2<n)){r=a;break}i+=2}else{if(!(i+1<n)){r=a;break}i+=1}}return{tlen:r,isNextLine:o}}void 0===s&&(s=1),void 0===c&&(c=null),"number"==typeof r&&(r+=""),null==r&&(r="");for(var p=1;l(r)>0;p++){var h=f(r,e),m=h.tlen,d=h.isNextLine;o||console.log(r);var g=(p-1)*xt(n)+xt(o)+"mm",v=e/2*a+a+"pt";c&&(v=c),t.ADD_PRINT_TEXT(g,i,v,18,r.substr(0,m).replace(/^\s+|\s+$/,"")),r=d?r.substr(m+1):r.substr(m),t.SET_PRINT_STYLEA(0,"FontSize",a),t.SET_PRINT_STYLEA(0,"LineSpacing",-3),t.SET_PRINT_STYLEA(0,"TextNeatRow",!0),t.SET_PRINT_STYLEA(0,"FontName",u),2===s?r.length<e&&t.SET_PRINT_STYLEA(0,"Alignment",2):1===s?t.SET_PRINT_STYLEA(0,"Alignment",1):3===s&&t.SET_PRINT_STYLEA(0,"Alignment",3)}}var St=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},bt=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},wt=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},At=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},Tt=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},Et=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};function Pt(t){!function(t){var n=t.data,e=t.top,r=void 0===e?0:e,i=t.left,o=void 0===i?0:i,a=t.width,u=void 0===a?"210mm":a,s=t.height,c=void 0===s?"297mm":s,l=t.showWindow,f=void 0!==l&&l,p=t.invoiceListFieldMapping,m=void 0===p?{invoiceList:[]}:p,d=t.licenses,g=void 0===d?"":d,v=t.company,x=void 0===v?"":v,y=t.getProjectLodop,S=void 0===y?st:y,b=t.isInitPrinter,w=void 0===b?1:b,A=t.printer,T=void 0===A?"":A,E=[],P=0,N=0,C=0,Y=[];if(m.invoiceList&&(Y=m.invoiceList),Y.length>0){var R=Y.length;P=Number(h(70/(7+R),2)),N=Number(h(84/(7+R),2)),C=Number(h(54/(7+R),2))}else P=10,N=12,C=8;n.details.forEach((function(t){1===t.invoiceLineType&&E.push(t)}));var I,_=document.createElement("div");_.innerHTML='<table border=0 width="700" cellspacing="0" cellpadding="0" style="border-collapse:collapse" bordercolor="#000000">\n <thead>\n <tr>\n <td colspan="'+(9+Y.length)+'" height="50px;"></td>\n </tr>\n <tr>\n <td colspan="'+(9+Y.length)+'" style="font-size: 24px;font-weight: bold;text-align: center;">销售货物或者提供应税劳务、服务清单</td>\n </tr>\n <tr>\n <td colspan="'+(9+Y.length)+'" height="20px;"></td>\n </tr>\n <tr>\n <td border=1 colspan="'+(9+Y.length)+'" style="text-align: left;">\n <span style="font-size: 14px;">购买方名称:</span>\n '+(n.purchaserName&&n.purchaserName.length>26?'<span style="font-size: 12px;">'+n.purchaserName+"</span>":'<span style="font-size: 14px;">'+n.purchaserName+"</span>")+'\n </td>\n </tr>\n <tr>\n <td colspan="'+(9+Y.length)+'" height="15px;"></td>\n </tr>\n <tr>\n <td border=1 colspan="'+(9+Y.length)+'" style="text-align: left;">\n <span style="font-size: 14px;">销售方名称:</span>\n '+(n.sellerName&&n.sellerName.length>26?'<span style="font-size: 12px;">'+n.sellerName+"</span>":'<span style="font-size: 14px;">'+n.sellerName+"</span>")+'\n </td>\n </tr>\n <tr>\n <td colspan="'+(9+Y.length)+'" height="15px;"></td>\n </tr>\n <tr>\n <td colspan="'+(6+Y.length/2)+'" style="text-align: left;font-size: 14px;">\n 所属增值税'+(1===Number(n.invoiceType)?"专用":2===Number(n.invoiceType)?"普通":3===Number(n.invoiceType)?"电子普通":"电子专用")+"发票代码:"+n.invoiceCode+'\n <span style="margin-left: 10px;">号码:'+n.invoiceNo+'</span>\n </td>\n <td width="100%" colspan="'+(3+Y.length/2)+'" tindex="1" style="text-align: right;font-size: 14px;">\n 共<span style="margin: 0px 10px;"><font tdata="PageCount">##</font></span>页\n <span style="margin-left: 10px;">第<span style="margin: 0px 10px;"><font tdata="PageNO">##</font></span>页</span>\n </td>\n </tr>\n <tr>\n <td colspan="'+(9+Y.length)+'" height="10px"></td>\n </tr>\n <tr>\n <td width="7%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">序号</td>\n <td width="23%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">货物(劳务)名称</td>\n <td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">规格型号</td>\n <td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">单位</td>\n <td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">数量</td>\n <td width="'+N+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">单价</td>\n <td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">金额</td>\n <td width="'+C+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">税率</td>\n <td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">税额</td>\n '+Y.map((function(t,n){return'<td width="'+P+'%" height="30px;" style="text-align: center;border: 1px solid #000;font-size: 12px;">'+t.displayName+"</td>"}))+"\n </tr>\n </thead>\n "+n.details.map((function(t,e){var r=t.goodsName,i="12px";i=(r=t.shortName+r)&&r.length<14?"12px":r&&r.length<23?"10px":"8px";var o,a,u="12px",s="12px",c="12px",l="12px",f="12px",p="10px";1!==t.discountFlag&&(u=t.specification&&t.specification.length<9?"12px":t.specification&&t.specification.length<17?"10px":"8px",s=t.unit&&t.unit.length<3?"12px":t.unit&&t.unit.length<5?"10px":"8px",0===t.quantity&&0===t.unitPrice?(o="",a=""):0!==t.quantity&&0===t.unitPrice?(o=t.quantity,a=t.unitPrice.toFixed(2)):(o=t.quantity,a=t.unitPrice?String(t.unitPrice).slice(0,13):t.unitPrice),c=o&&JSON.stringify(o).length<9?"12px":o&&JSON.stringify(o).length<23?"10px":"8px",l=a&&JSON.stringify(a).length<12?"12px":a&&JSON.stringify(a).length<23?"10px":"8px");var h,m=t.amount?Number(t.amount).toFixed(2):t.amount;f=(m=m.toString())&&JSON.stringify(m).length<15?"12px":m&&JSON.stringify(m).length<23?"10px":"8px",h=0===t.taxPre&&1===t.taxPreType&&1!==Number(n.invoiceType)&&4!==Number(n.invoiceType)?"免税":0===t.taxPre&&2===t.taxPreType&&1!==Number(n.invoiceType)&&4!==Number(n.invoiceType)?"不征税":"number"==typeof t.taxRate?100*t.taxRate+"%":t.taxRate;var d=0===t.taxPre&&1===t.taxPreType&&1!==Number(n.invoiceType)&&4!==Number(n.invoiceType)||0===t.taxPre&&2===t.taxPreType&&1!==Number(n.invoiceType)&&4!==Number(n.invoiceType)||0===t.taxAmount?"***":t.taxAmount?Number(t.taxAmount).toFixed(2):t.taxAmount;p=(d=d.toString())&&JSON.stringify(d).length<15?"12px":d&&JSON.stringify(d).length<23?"10px":"8px";var g="";return Y.forEach((function(e){var r="";"mainFields"===e.source?(r=n[e.fieldName],"invoiceType"===e.sourceFieldName&&(r=ht[r]||"")):r=t[e.fieldName],g+='<td width="'+P+'%" height="30px;" style="height: 30px;text-align: left;border-right: 1px solid #000;font-size: 12px;table-layout:fixed;word-break:break-all;word-wrap:break-word;border-collapse:collapse;">\n '+r+"\n </td>"})),'<tr>\n <td width="7%" style="height: 30px;font-size: 12px;text-align: center;border-left: 1px solid #000;border-right: 1px solid #000;">'+(e+1)+'</td>\n <td width="23%" style="height: 30px;border-right: 1px solid #000;font-size: '+i+';">'+r+'</td>\n <td width="'+P+'%" style="height: 30px;border-right: 1px solid #000;font-size: '+u+';">'+t.specification+'</td>\n <td width="'+P+'%" style="height: 30px;text-align: center;border-right: 1px solid #000;font-size: '+s+';">'+t.unit+'</td>\n <td width="'+P+'%" style="height: 30px;text-align: right;border-right: 1px solid #000;font-size: '+c+';padding-right: 2px;">'+o+'</td>\n <td width="'+N+'%" style="height: 30px;text-align: right;border-right: 1px solid #000;font-size: '+l+';padding-right: 2px;">'+a+'</td>\n <td width="'+P+'%" tclass="'+(1===t.invoiceLineType?"discountTemporaryAmount":"temporaryAmount")+'" style="height: 30px;text-align: right;border-right: 1px solid #000;font-size: '+f+';padding-right: 2px;">'+m+'</td>\n <td width="'+C+'%" style="height: 30px;text-align: right;border-right: 1px solid #000;padding-right: 2px;font-size: 12px;">'+h+'</td>\n <td width="'+P+'%" tclass="'+(1===t.invoiceLineType?"discountTemporaryTax":"temporaryTax")+'" style="height: 30px;text-align: right;border-right: 1px solid #000;font-size: '+p+';padding-right: 2px;">'+d+"</td>\n "+g+"\n </tr>"}))+'\n <tfoot>\n <tr>\n <td width="7%" align="center" style="height:30px;border-left: 1px solid #000;border-right: 1px solid #000;font-size: 12px;">小计</td>\n <td width="23%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+N+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="SubSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;"><font id="id01">#########</font></td>\n <td width="'+C+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="SubSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;"><font id="id01">#########</font></td>\n '+Y.map((function(t,n){return'<td width="'+P+'%" style="border-right: 1px solid #000;"></td>'}))+"\n </tr>\n "+(E.length?'\n <tr>\n <td width="7%" align="center" style="height:30px;border-left: 1px solid #000;border-right: 1px solid #000;font-size: 12px;">折扣</td>\n <td width="23%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+N+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="SubSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;"><font tclass="discountTemporaryAmount">#########</font></td>\n <td width="'+C+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="SubSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;"><font tclass="discountTemporaryTax">#########</font></td>\n '+Y.map((function(t,n){return'<td width="'+P+'%" style="border-right: 1px solid #000;"></td>'}))+"\n </tr>\n ":"")+'\n <tr>\n <td width="7%" align="center" style="height:30px;border-left: 1px solid #000;border-right: 1px solid #000;font-size: 12px;">合计</td>\n <td width="23%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+N+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="AllSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;">\n <font id="id02" >###########</font>\n </td>\n <td width="'+C+'%" style="border-right: 1px solid #000;"></td>\n <td width="'+P+'%" tdata="AllSum" format="#,##0.00" align="right" style="height:30px;font-size: 12px;border-right: 1px solid #000;padding-right: 2px;"><font id="id02">#########</font></td>\n '+Y.map((function(t,n){return'<td width="'+P+'%" style="border-right: 1px solid #000;"></td>'}))+'\n </tr>\n <tr>\n <td width="7%" align="center" style="height:50px;border: 1px solid #000;font-size: 12px;">备注</td>\n <td colspan="'+(8+Y.length)+'" style="height:50px;border: 1px solid #000;">'+(((I=n.remark&&n.remark.replace(/\\r\\n/g,"\n")||"")&&I.length<=50?'<span style="font-size: 14px;">'+I+"</span>":I&&I.length>50&&I.length<100?'<span style="font-size: 12px;">'+I+"</span>":I?'<span style="font-size: 10px;">'+I+"</span>":"")+'</td>\n </tr>\n <tr>\n <td width="100%" colspan="')+(9+Y.length)+'" height="10px"></td>\n </tr>\n <tr>\n <td width="100%" colspan="'+(6+Y.length/2)+'" style="font-size: 14px;">销货单位(章):</td>\n <td width="100%" colspan="'+(3+Y.length/2)+'" style="font-size: 14px;">开票日期:'+function(t){if(t){var n=new Date(t),e=n.getFullYear(),r=n.getMonth()+1,i=r.toString();r>=1&&r<=9&&(i="0"+r);var o=n.getDate(),a=o.toString();return o>=0&&o<=9&&(a="0"+o),e+"年"+i+"月"+a+"日"}}(n.drewDate)+'</td>\n </tr>\n <tr>\n <td width="100%" colspan="'+(9+Y.length)+'" height="10px"></td>\n </tr>\n \n </tfoot>\n </table>';var X=S("","",g);X.PRINT_INITA(r,o,u,c,n.invoiceCode+" "+n.invoiceNo),"210mm"===u&&"297mm"===c?X.SET_PRINT_PAGESIZE(1,0,0,"A4"):X.SET_PRINT_PAGESIZE(1,u,c,""),X.SET_SHOW_MODE("LANGUAGE",0),X.SET_LICENSES(x,g,"",""),X.ADD_PRINT_TABLE(0,"5%","90%","BottomMargin:30mm",_.innerHTML),0===w&&T&&X.SET_PRINTER_INDEXA(T),f?X.PREVIEW():X.PRINT()}(t)}function Nt(t){var n,e,r,i,o,a,u,s,c,l,f,p,h,m,d,g,v,x;e=(n=t).data,r=n.top,i=void 0===r?0:r,o=n.left,a=void 0===o?0:o,u=n.showWindow,s=void 0!==u&&u,c=n.licenses,l=void 0===c?"":c,f=n.company,p=void 0===f?"":f,h=n.getProjectLodop,m=void 0===h?st:h,d=n.isInitPrinter,g=void 0===d?1:d,v=n.printer,x=void 0===v?"":v,mt(void 0,void 0,void 0,(function(){var t,n,r;return dt(this,(function(o){switch(o.label){case 0:console.log("调用打印方法了",e,i,a,s),t="",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,B({data:e})];case 2:return t=o.sent(),[3,4];case 3:return n=o.sent(),console.error(n),[3,4];case 4:return(r=m("","",l))?(r.PRINT_INITA(i,a,"297mm","210mm",e.invoiceCode+" "+e.invoiceNo),r.SET_PRINT_PAGESIZE(2,"210mm","297mm",""),r.SET_SHOW_MODE("LANGUAGE",0),r.SET_LICENSES(p,l,"",""),0===g&&x&&r.SET_PRINTER_INDEXA(x),r.ADD_PRINT_IMAGE(0,0,"100%","100%",t),r.SET_PRINT_STYLEA(0,"Stretch",2),s?r.PREVIEW():r.PRINT(),console.log("打印打印"),[2]):[2]}}))}))}function Ct(t){var n,e,r,i,o,a,u,s,c,l,f,p,h,m,d,g,v,x;e=(n=t).data,r=n.top,i=void 0===r?0:r,o=n.left,a=void 0===o?0:o,u=n.showWindow,s=void 0!==u&&u,c=n.licenses,l=void 0===c?"":c,f=n.company,p=void 0===f?"":f,h=n.getProjectLodop,m=void 0===h?st:h,d=n.isInitPrinter,g=void 0===d?1:d,v=n.printer,x=void 0===v?"":v,gt(void 0,void 0,void 0,(function(){var t;return vt(this,(function(n){return console.log("调用打印方法了",e,i,a,s),(t=m("","",l))?(t.PRINT_INITA(i,a,"80mm","100mm","开票二维码"),t.SET_PRINT_PAGESIZE(1,"80mm","100mm",""),t.SET_SHOW_MODE("LANGUAGE",0),t.SET_LICENSES(p,l,"",""),0===g&&x&&t.SET_PRINTER_INDEXA(x),yt(t,"10pt",28,e.sellerName,"3mm","5mm",10,"宋体",2),yt(t,"9pt",40,"二维码有限期为15天,请及时开票!","4mm","15mm",7,"宋体",2),yt(t,"9pt",40,"开票金额:","5mm","70mm",7,"宋体",1),yt(t,"9pt",32,e.amountWithTax+"元","5mm","70mm",8,"宋体",3),yt(t,"9pt",40,"订单编号:","5mm","75mm",7,"宋体",1),yt(t,"9pt",32,""+e.orderCode,"10mm","75mm",7,"宋体",3),yt(t,"9pt",40,"生成时间:","5mm","80mm",7,"宋体",1),yt(t,"9pt",32,""+e.createTime,"10mm","80mm",7,"宋体",3),function(t,n){t.ADD_PRINT_BARCODE("20mm","7mm","60.00mm","60.00mm","QRCode",""+n.url),t.SET_PRINT_STYLEA(0,"GroundColor","#FFFFFF"),t.SET_PRINT_STYLEA(0,"QRCodeVersion",10),t.SET_PRINT_STYLEA(0,"QRCodeErrorLevel","L"),t.SET_PRINT_STYLEA(0,"DataCharset","GB2312")}(t,e),s?t.PREVIEW():t.PRINT(),console.log("打印打印"),[2]):[2]}))}))}function Yt(t){var n,e,r,i,o,a,u,s,c,l,f,p,h,m,d,g,v,x;e=(n=t).data,r=n.top,i=void 0===r?0:r,o=n.left,a=void 0===o?0:o,u=n.showWindow,s=void 0!==u&&u,c=n.licenses,l=void 0===c?"":c,f=n.company,p=void 0===f?"":f,h=n.getProjectLodop,m=void 0===h?st:h,d=n.isInitPrinter,g=void 0===d?1:d,v=n.printer,x=void 0===v?"":v,St(void 0,void 0,void 0,(function(){var t,n,r;return bt(this,(function(o){switch(o.label){case 0:console.log("调用打印方法了",e,i,a,s),t="",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,$({data:e})];case 2:return t=o.sent(),[3,4];case 3:return n=o.sent(),console.error(n),[3,4];case 4:return(r=m("","",l))?(r.PRINT_INITA(i,a,"210mm","297mm",e.invoiceCode+" "+e.invoiceNo),r.SET_PRINT_PAGESIZE(1,"210mm","297mm",""),r.SET_SHOW_MODE("LANGUAGE",0),r.SET_LICENSES(p,l,"",""),0===g&&x&&r.SET_PRINTER_INDEXA(x),r.ADD_PRINT_IMAGE(0,0,"100%","100%",t),r.SET_PRINT_STYLEA(0,"Stretch",2),s?r.PREVIEW():r.PRINT(),console.log("打印打印"),[2]):[2]}}))}))}function Rt(t){var n,e,r,i,o,a,u,s,c,l,f,p,h,m,d,g,v,x;e=(n=t).data,r=n.top,i=void 0===r?0:r,o=n.left,a=void 0===o?0:o,u=n.showWindow,s=void 0!==u&&u,c=n.licenses,l=void 0===c?"":c,f=n.company,p=void 0===f?"":f,h=n.getProjectLodop,m=void 0===h?st:h,d=n.isInitPrinter,g=void 0===d?1:d,v=n.printer,x=void 0===v?"":v,wt(void 0,void 0,void 0,(function(){var t,n,r;return At(this,(function(o){switch(o.label){case 0:console.log("调用打印方法了",e,i,a,s),t="",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,A({data:e,showSample:!1})];case 2:return t=o.sent(),[3,4];case 3:return n=o.sent(),console.error(n),[3,4];case 4:return(r=m("","",l))?(r.PRINT_INIT(e.invoiceCode+" "+e.invoiceNo),r.SET_PRINT_PAGESIZE(2,0,0,"A4"),r.SET_SHOW_MODE("LANGUAGE",0),r.SET_LICENSES(p,l,"",""),0===g&&x&&r.SET_PRINTER_INDEXA(x),r.ADD_PRINT_IMAGE(0,0,"200mm","133.2mm",t),r.SET_PRINT_STYLEA(0,"Stretch",1),r.SET_PRINT_STYLEA(0,"Horient",2),s?r.PREVIEW():r.PRINT(),console.log("打印打印"),[2]):[2]}}))}))}function It(t){var n,e,r,i,o,a,u,s,c,l,f,p,h,m,d,g,v,x;e=(n=t).data,r=n.top,i=void 0===r?0:r,o=n.left,a=void 0===o?0:o,u=n.showWindow,s=void 0!==u&&u,c=n.licenses,l=void 0===c?"":c,f=n.company,p=void 0===f?"":f,h=n.getProjectLodop,m=void 0===h?st:h,d=n.isInitPrinter,g=void 0===d?1:d,v=n.printer,x=void 0===v?"":v,Tt(void 0,void 0,void 0,(function(){var t,n,r;return Et(this,(function(o){switch(o.label){case 0:console.log("调用打印方法了",e,i,a,s),t="",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,ot({data:e})];case 2:return t=o.sent(),[3,4];case 3:return n=o.sent(),console.error(n),[3,4];case 4:return(r=m("","",l))?(r.PRINT_INITA(i,a,"297mm","210mm",e.invoiceCode+" "+e.invoiceNo),r.SET_PRINT_PAGESIZE(2,"210mm","297mm",""),r.SET_SHOW_MODE("LANGUAGE",0),r.SET_LICENSES(p,l,"",""),0===g&&x&&r.SET_PRINTER_INDEXA(x),r.ADD_PRINT_IMAGE(0,0,"100%","100%",t),r.SET_PRINT_STYLEA(0,"Stretch",2),s?r.PREVIEW():r.PRINT(),console.log("打印打印"),[2]):[2]}}))}))}function _t(t){return(_t="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)}var Xt=function(){return(Xt=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)},Ot=function(t,n,e,r){return new(e||(e=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function u(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}s((r=r.apply(t,n||[])).next())}))},Lt=function(t,n){var e,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=n.call(t,a)}catch(t){o=[6,t],r=0}finally{e=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},Bt=function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(e[r[i]]=t[r[i]])}return e},Mt=function(){function t(t){this.getLodop=null,this.needCLodop=null;var n=(null==t?void 0:t.data)||{};this.invoiceData=n,this.getInvoiceSample=this.getInvoiceSample.bind(this),this.getInvoiceListSample=this.getInvoiceListSample.bind(this),this.getCustomsDeclarationFormSample=this.getCustomsDeclarationFormSample.bind(this),this.getCustomsPaymentLetterSample=this.getCustomsPaymentLetterSample.bind(this),this.createInvoiceQrCode=this.createInvoiceQrCode.bind(this),this.createRedLetterNotice=this.createRedLetterNotice.bind(this),this.createExpressDeliveryCode=this.createExpressDeliveryCode.bind(this),this.printInvoice=this.printInvoice.bind(this),this.printInvoiceList=this.printInvoiceList.bind(this),this.printCustomsDeclaration=this.printCustomsDeclaration.bind(this),this.printInvoiceQrCode=this.printInvoiceQrCode.bind(this),this.printRedLetterNotice=this.printRedLetterNotice.bind(this),this.printInvoiceSample=this.printInvoiceSample.bind(this),this.printExpressDeliveryCode=this.printExpressDeliveryCode.bind(this),this.initLodop=this.initLodop.bind(this),this.getLodop=st,this.needCLodop=ut}return t.prototype.getInvoiceSample=function(t){var n=!0;t&&"object"===_t(t)&&(n=t.showSample);try{return A({data:this.invoiceData,showSample:n})}catch(t){console.error(t)}},t.prototype.getInvoiceListSample=function(){try{return t=this.invoiceData,(n=function(t,n){for(var e=0,r=[];e<t.length;)r.push(t.slice(e,e+=n));return r}(t.details,26)).map((function(e,r){var i=0,o=0,a=0,u=0;return e.forEach((function(t){1===t.invoiceLineType?(a=c.add(a,t.amount),u=c.add(u,t.taxAmount)):(i=c.add(i,t.amount),o=c.add(o,t.taxAmount))})),C(T(T({},t),{details:e,invoiceListTotalCount:n.length,invoiceListCurrent:r+1,subtotalAmount:i.toFixed(2),subtotalTaxAmount:o.toFixed(2),discountAmount:a.toFixed(2),discountTaxAmount:u.toFixed(2)}))}))}catch(t){console.error(t)}var t,n},t.prototype.getCustomsDeclarationFormSample=function(){return Ot(this,void 0,void 0,(function(){var t;return Lt(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,B({data:this.invoiceData})];case 1:return[2,n.sent()];case 2:return t=n.sent(),console.error(t),[3,3];case 3:return[2]}}))}))},t.prototype.getCustomsPaymentLetterSample=function(){return Ot(this,void 0,void 0,(function(){var t;return Lt(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,K({data:this.invoiceData})];case 1:return[2,n.sent()];case 2:return t=n.sent(),console.error(t),[3,3];case 3:return[2]}}))}))},t.prototype.createInvoiceQrCode=function(){return Ot(this,void 0,void 0,(function(){var t;return Lt(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,J({data:this.invoiceData})];case 1:return[2,n.sent()];case 2:return t=n.sent(),console.error(t),[3,3];case 3:return[2]}}))}))},t.prototype.createRedLetterNotice=function(){return Ot(this,void 0,void 0,(function(){var t;return Lt(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,$({data:this.invoiceData})];case 1:return[2,n.sent()];case 2:return t=n.sent(),console.error(t),[3,3];case 3:return[2]}}))}))},t.prototype.createExpressDeliveryCode=function(){return Ot(this,void 0,void 0,(function(){var t;return Lt(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,ot({data:this.invoiceData})];case 1:return[2,n.sent()];case 2:return t=n.sent(),console.error(t),[3,3];case 3:return[2]}}))}))},t.prototype.printInvoice=function(t){var n=t.licenses,e=Bt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),function(t){pt(t)}(Xt({data:this.invoiceData,licenses:n},e))},t.prototype.printInvoiceList=function(t){var n=t.licenses,e=Bt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),Pt(Xt({data:this.invoiceData},e))},t.prototype.printCustomsDeclaration=function(t){var n=t.licenses,e=Bt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),Nt(Xt({data:this.invoiceData,licenses:n},e))},t.prototype.printExpressDeliveryCode=function(t){var n=t.licenses,e=Bt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),It(Xt({data:this.invoiceData,licenses:n},e))},t.prototype.printInvoiceQrCode=function(t){var n=t.licenses,e=Bt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),Ct(Xt({data:this.invoiceData,licenses:n},e))},t.prototype.printRedLetterNotice=function(t){var n=t.licenses,e=Bt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),Yt(Xt({data:this.invoiceData,licenses:n},e))},t.prototype.printInvoiceSample=function(t){var n=t.licenses,e=Bt(t,["licenses"]);n||console.error("请传入licenses注册码字段"),Rt(Xt({data:this.invoiceData,licenses:n},e))},t.prototype.initLodop=function(t){var n,e=t.targetAddress,r=void 0===e?"localhost":e;if(ut()){var i="http://"+r+":8000/CLodopfuncs.js?priority=1",o="http://"+r+":18000/CLodopfuncs.js?priority=0",a=document.head||document.getElementsByTagName("head")[0]||document.documentElement,u=document.createElement("script");u.src=i,a.insertBefore(u,a.firstChild),(u=document.createElement("script")).src=o,a.insertBefore(u,a.firstChild),n=!!(i+o).match(/\/\/localho|\/\/127.0.0./i),this.CLodopIsLocal=n}},t}();n.default=Mt}]).default}));
|
|
11
11
|
//# sourceMappingURL=invoice-sample.min.js.map
|