Socket
Socket
Sign inDemoInstall

@cnhis-frontend/signature

Package Overview
Dependencies
Maintainers
5
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cnhis-frontend/signature - npm Package Compare versions

Comparing version 1.0.1-beta.0 to 1.0.1-beta.1

2

dist/signature.es.min.js

@@ -1,1 +0,1 @@

function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i,a,c=function(t){return t&&t.Math==Math&&t},u=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof r&&r)||function(){return this}()||Function("return this")(),f=function(t){try{return!!t()}catch(t){return!0}},s=!f((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!f((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),p=Function.prototype.call,v=l?p.bind(p):function(){return p.apply(p,arguments)},d={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,g={f:h&&!d.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:d},y=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},b=Function.prototype,m=b.bind,w=b.call,O=l&&m.bind(w,w),S=l?function(t){return t&&O(t)}:function(t){return t&&function(){return w.apply(t,arguments)}},x=S({}.toString),j=S("".slice),E=function(t){return j(x(t),8,-1)},T=Object,P=S("".split),I=f((function(){return!T("z").propertyIsEnumerable(0)}))?function(t){return"String"==E(t)?P(t,""):T(t)}:T,C=TypeError,R=function(t){if(null==t)throw C("Can't call method on "+t);return t},k=function(t){return I(R(t))},_=function(t){return"function"==typeof t},A=function(t){return"object"==typeof t?null!==t:_(t)},N=function(t){return _(t)?t:void 0},F=function(t,e){return arguments.length<2?N(u[t]):u[t]&&u[t][e]},M=S({}.isPrototypeOf),D=F("navigator","userAgent")||"",$=u.process,U=u.Deno,W=$&&$.versions||U&&U.version,G=W&&W.v8;G&&(a=(i=G.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!a&&D&&(!(i=D.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=D.match(/Chrome\/(\d+)/))&&(a=+i[1]);var z=a,B=!!Object.getOwnPropertySymbols&&!f((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&z&&z<41})),L=B&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Q=Object,Y=L?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return _(e)&&M(e.prototype,Q(t))},X=String,H=function(t){try{return X(t)}catch(t){return"Object"}},K=TypeError,J=function(t){if(_(t))return t;throw K(H(t)+" is not a function")},V=function(t,e){var n=t[e];return null==n?void 0:J(n)},q=TypeError,Z=Object.defineProperty,tt=function(t,e){try{Z(u,t,{value:e,configurable:!0,writable:!0})}catch(n){u[t]=e}return e},et=u["__core-js_shared__"]||tt("__core-js_shared__",{}),nt=o((function(t){(t.exports=function(t,e){return et[t]||(et[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),rt=Object,ot=function(t){return rt(R(t))},it=S({}.hasOwnProperty),at=Object.hasOwn||function(t,e){return it(ot(t),e)},ct=0,ut=Math.random(),ft=S(1..toString),st=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ft(++ct+ut,36)},lt=nt("wks"),pt=u.Symbol,vt=pt&&pt.for,dt=L?pt:pt&&pt.withoutSetter||st,ht=function(t){if(!at(lt,t)||!B&&"string"!=typeof lt[t]){var e="Symbol."+t;B&&at(pt,t)?lt[t]=pt[t]:lt[t]=L&&vt?vt(e):dt(e)}return lt[t]},gt=TypeError,yt=ht("toPrimitive"),bt=function(t,e){if(!A(t)||Y(t))return t;var n,r=V(t,yt);if(r){if(void 0===e&&(e="default"),n=v(r,t,e),!A(n)||Y(n))return n;throw gt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&_(n=t.toString)&&!A(r=v(n,t)))return r;if(_(n=t.valueOf)&&!A(r=v(n,t)))return r;if("string"!==e&&_(n=t.toString)&&!A(r=v(n,t)))return r;throw q("Can't convert object to primitive value")}(t,e)},mt=function(t){var e=bt(t,"string");return Y(e)?e:e+""},wt=u.document,Ot=A(wt)&&A(wt.createElement),St=function(t){return Ot?wt.createElement(t):{}},xt=!s&&!f((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),jt=Object.getOwnPropertyDescriptor,Et={f:s?jt:function(t,e){if(t=k(t),e=mt(e),xt)try{return jt(t,e)}catch(t){}if(at(t,e))return y(!v(g.f,t,e),t[e])}},Tt=s&&f((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pt=String,It=TypeError,Ct=function(t){if(A(t))return t;throw It(Pt(t)+" is not an object")},Rt=TypeError,kt=Object.defineProperty,_t=Object.getOwnPropertyDescriptor,At={f:s?Tt?function(t,e,n){if(Ct(t),e=mt(e),Ct(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=_t(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return kt(t,e,n)}:kt:function(t,e,n){if(Ct(t),e=mt(e),Ct(n),xt)try{return kt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Rt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Nt=s?function(t,e,n){return At.f(t,e,y(1,n))}:function(t,e,n){return t[e]=n,t},Ft=Function.prototype,Mt=s&&Object.getOwnPropertyDescriptor,Dt=at(Ft,"name"),$t={EXISTS:Dt,PROPER:Dt&&"something"===function(){}.name,CONFIGURABLE:Dt&&(!s||s&&Mt(Ft,"name").configurable)},Ut=S(Function.toString);_(et.inspectSource)||(et.inspectSource=function(t){return Ut(t)});var Wt,Gt,zt,Bt=et.inspectSource,Lt=u.WeakMap,Qt=_(Lt)&&/native code/.test(Bt(Lt)),Yt=nt("keys"),Xt=function(t){return Yt[t]||(Yt[t]=st(t))},Ht={},Kt=u.TypeError,Jt=u.WeakMap;if(Qt||et.state){var Vt=et.state||(et.state=new Jt),qt=S(Vt.get),Zt=S(Vt.has),te=S(Vt.set);Wt=function(t,e){if(Zt(Vt,t))throw new Kt("Object already initialized");return e.facade=t,te(Vt,t,e),e},Gt=function(t){return qt(Vt,t)||{}},zt=function(t){return Zt(Vt,t)}}else{var ee=Xt("state");Ht[ee]=!0,Wt=function(t,e){if(at(t,ee))throw new Kt("Object already initialized");return e.facade=t,Nt(t,ee,e),e},Gt=function(t){return at(t,ee)?t[ee]:{}},zt=function(t){return at(t,ee)}}var ne={set:Wt,get:Gt,has:zt,enforce:function(t){return zt(t)?Gt(t):Wt(t,{})},getterFor:function(t){return function(e){var n;if(!A(e)||(n=Gt(e)).type!==t)throw Kt("Incompatible receiver, "+t+" required");return n}}},re=o((function(t){var e=$t.CONFIGURABLE,n=ne.enforce,r=ne.get,o=Object.defineProperty,i=s&&!f((function(){return 8!==o((function(){}),"length",{value:8}).length})),a=String(String).split("String"),c=t.exports=function(t,r,c){"Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),c&&c.getter&&(r="get "+r),c&&c.setter&&(r="set "+r),(!at(t,"name")||e&&t.name!==r)&&(s?o(t,"name",{value:r,configurable:!0}):t.name=r),i&&c&&at(c,"arity")&&t.length!==c.arity&&o(t,"length",{value:c.arity});try{c&&at(c,"constructor")&&c.constructor?s&&o(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var u=n(t);return at(u,"source")||(u.source=a.join("string"==typeof r?r:"")),t};Function.prototype.toString=c((function(){return _(this)&&r(this).source||Bt(this)}),"toString")})),oe=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(_(n)&&re(n,i,r),r.global)o?t[e]=n:tt(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:At.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},ie=Math.ceil,ae=Math.floor,ce=Math.trunc||function(t){var e=+t;return(e>0?ae:ie)(e)},ue=function(t){var e=+t;return e!=e||0===e?0:ce(e)},fe=Math.max,se=Math.min,le=Math.min,pe=function(t){return t>0?le(ue(t),9007199254740991):0},ve=function(t){return pe(t.length)},de=function(t){return function(e,n,r){var o,i=k(e),a=ve(i),c=function(t,e){var n=ue(t);return n<0?fe(n+e,0):se(n,e)}(r,a);if(t&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},he={includes:de(!0),indexOf:de(!1)},ge=he.indexOf,ye=S([].push),be=function(t,e){var n,r=k(t),o=0,i=[];for(n in r)!at(Ht,n)&&at(r,n)&&ye(i,n);for(;e.length>o;)at(r,n=e[o++])&&(~ge(i,n)||ye(i,n));return i},me=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],we=me.concat("length","prototype"),Oe={f:Object.getOwnPropertyNames||function(t){return be(t,we)}},Se={f:Object.getOwnPropertySymbols},xe=S([].concat),je=F("Reflect","ownKeys")||function(t){var e=Oe.f(Ct(t)),n=Se.f;return n?xe(e,n(t)):e},Ee=function(t,e,n){for(var r=je(e),o=At.f,i=Et.f,a=0;a<r.length;a++){var c=r[a];at(t,c)||n&&at(n,c)||o(t,c,i(e,c))}},Te=/#|\.prototype\./,Pe=function(t,e){var n=Ce[Ie(t)];return n==ke||n!=Re&&(_(e)?f(e):!!e)},Ie=Pe.normalize=function(t){return String(t).replace(Te,".").toLowerCase()},Ce=Pe.data={},Re=Pe.NATIVE="N",ke=Pe.POLYFILL="P",_e=Pe,Ae=Et.f,Ne=function(t,e){var n,r,o,i,a,c=t.target,f=t.global,s=t.stat;if(n=f?u:s?u[c]||tt(c,{}):(u[c]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(a=Ae(n,r))&&a.value:n[r],!_e(f?r:c+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ee(i,o)}(t.sham||o&&o.sham)&&Nt(i,"sham",!0),oe(n,r,i,t)}},Fe=S([].slice),Me=Function,De=S([].concat),$e=S([].join),Ue={},We=function(t,e,n){if(!at(Ue,e)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";Ue[e]=Me("C,a","return new C("+$e(r,",")+")")}return Ue[e](t,n)},Ge=l?Me.bind:function(t){var e=J(this),n=e.prototype,r=Fe(arguments,1),o=function(){var n=De(r,Fe(arguments));return this instanceof o?We(e,n.length,n):e.apply(t,n)};return A(n)&&(o.prototype=n),o};Ne({target:"Function",proto:!0,forced:Function.bind!==Ge},{bind:Ge});var ze=he.indexOf,Be=S([].indexOf),Le=!!Be&&1/Be([1],1,-0)<0,Qe=function(t,e){var n=[][t];return!!n&&f((function(){n.call(null,e||function(){return 1},1)}))}("indexOf");Ne({target:"Array",proto:!0,forced:Le||!Qe},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Le?Be(this,t,e)||0:ze(this,t,e)}});var Ye={};Ye[ht("toStringTag")]="z";var Xe="[object z]"===String(Ye),He=ht("toStringTag"),Ke=Object,Je="Arguments"==E(function(){return arguments}()),Ve=Xe?E:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Ke(t),He))?n:Je?E(e):"Object"==(r=E(e))&&_(e.callee)?"Arguments":r},qe=Xe?{}.toString:function(){return"[object "+Ve(this)+"]"};Xe||oe(Object.prototype,"toString",qe,{unsafe:!0});var Ze="process"==E(u.process),tn=String,en=TypeError,nn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=S(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Ct(n),function(t){if("object"==typeof t||_(t))return t;throw en("Can't set "+tn(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),rn=At.f,on=ht("toStringTag"),an=ht("species"),cn=TypeError,un=function(){},fn=[],sn=F("Reflect","construct"),ln=/^\s*(?:class|function)\b/,pn=S(ln.exec),vn=!ln.exec(un),dn=function(t){if(!_(t))return!1;try{return sn(un,fn,t),!0}catch(t){return!1}},hn=function(t){if(!_(t))return!1;switch(Ve(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return vn||!!pn(ln,Bt(t))}catch(t){return!0}};hn.sham=!0;var gn,yn,bn,mn,wn=!sn||f((function(){var t;return dn(dn.call)||!dn(Object)||!dn((function(){t=!0}))||t}))?hn:dn,On=TypeError,Sn=ht("species"),xn=function(t,e){var n,r=Ct(t).constructor;return void 0===r||null==(n=Ct(r)[Sn])?e:function(t){if(wn(t))return t;throw On(H(t)+" is not a constructor")}(n)},jn=Function.prototype,En=jn.apply,Tn=jn.call,Pn="object"==typeof Reflect&&Reflect.apply||(l?Tn.bind(En):function(){return Tn.apply(En,arguments)}),In=S(S.bind),Cn=function(t,e){return J(t),void 0===e?t:l?In(t,e):function(){return t.apply(e,arguments)}},Rn=F("document","documentElement"),kn=TypeError,_n=function(t,e){if(t<e)throw kn("Not enough arguments");return t},An=/(?:ipad|iphone|ipod).*applewebkit/i.test(D),Nn=u.setImmediate,Fn=u.clearImmediate,Mn=u.process,Dn=u.Dispatch,$n=u.Function,Un=u.MessageChannel,Wn=u.String,Gn=0,zn={};try{gn=u.location}catch(t){}var Bn=function(t){if(at(zn,t)){var e=zn[t];delete zn[t],e()}},Ln=function(t){return function(){Bn(t)}},Qn=function(t){Bn(t.data)},Yn=function(t){u.postMessage(Wn(t),gn.protocol+"//"+gn.host)};Nn&&Fn||(Nn=function(t){_n(arguments.length,1);var e=_(t)?t:$n(t),n=Fe(arguments,1);return zn[++Gn]=function(){Pn(e,void 0,n)},yn(Gn),Gn},Fn=function(t){delete zn[t]},Ze?yn=function(t){Mn.nextTick(Ln(t))}:Dn&&Dn.now?yn=function(t){Dn.now(Ln(t))}:Un&&!An?(mn=(bn=new Un).port2,bn.port1.onmessage=Qn,yn=Cn(mn.postMessage,mn)):u.addEventListener&&_(u.postMessage)&&!u.importScripts&&gn&&"file:"!==gn.protocol&&!f(Yn)?(yn=Yn,u.addEventListener("message",Qn,!1)):yn="onreadystatechange"in St("script")?function(t){Rn.appendChild(St("script")).onreadystatechange=function(){Rn.removeChild(this),Bn(t)}}:function(t){setTimeout(Ln(t),0)});var Xn,Hn,Kn,Jn,Vn,qn,Zn,tr,er={set:Nn,clear:Fn},nr=/ipad|iphone|ipod/i.test(D)&&void 0!==u.Pebble,rr=/web0s(?!.*chrome)/i.test(D),or=Et.f,ir=er.set,ar=u.MutationObserver||u.WebKitMutationObserver,cr=u.document,ur=u.process,fr=u.Promise,sr=or(u,"queueMicrotask"),lr=sr&&sr.value;lr||(Xn=function(){var t,e;for(Ze&&(t=ur.domain)&&t.exit();Hn;){e=Hn.fn,Hn=Hn.next;try{e()}catch(t){throw Hn?Jn():Kn=void 0,t}}Kn=void 0,t&&t.enter()},An||Ze||rr||!ar||!cr?!nr&&fr&&fr.resolve?((Zn=fr.resolve(void 0)).constructor=fr,tr=Cn(Zn.then,Zn),Jn=function(){tr(Xn)}):Ze?Jn=function(){ur.nextTick(Xn)}:(ir=Cn(ir,u),Jn=function(){ir(Xn)}):(Vn=!0,qn=cr.createTextNode(""),new ar(Xn).observe(qn,{characterData:!0}),Jn=function(){qn.data=Vn=!Vn}));var pr=lr||function(t){var e={fn:t,next:void 0};Kn&&(Kn.next=e),Hn||(Hn=e,Jn()),Kn=e},vr=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},dr=function(){this.head=null,this.tail=null};dr.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}};var hr=dr,gr=u.Promise,yr="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,br=!yr&&!Ze&&"object"==typeof window&&"object"==typeof document;gr&&gr.prototype;var mr,wr,Or,Sr,xr,jr,Er=ht("species"),Tr=!1,Pr=_(u.PromiseRejectionEvent),Ir=_e("Promise",(function(){var t=Bt(gr),e=t!==String(gr);if(!e&&66===z)return!0;if(!z||z<51||!/native code/.test(t)){var n=new gr((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Er]=r,!(Tr=n.then((function(){}))instanceof r))return!0}return!e&&(br||yr)&&!Pr})),Cr={CONSTRUCTOR:Ir,REJECTION_EVENT:Pr,SUBCLASSING:Tr},Rr=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=J(e),this.reject=J(n)},kr={f:function(t){return new Rr(t)}},_r=er.set,Ar=Cr.CONSTRUCTOR,Nr=Cr.REJECTION_EVENT,Fr=Cr.SUBCLASSING,Mr=ne.getterFor("Promise"),Dr=ne.set,$r=gr&&gr.prototype,Ur=gr,Wr=$r,Gr=u.TypeError,zr=u.document,Br=u.process,Lr=kr.f,Qr=Lr,Yr=!!(zr&&zr.createEvent&&u.dispatchEvent),Xr=function(t){var e;return!(!A(t)||!_(e=t.then))&&e},Hr=function(t,e){var n,r,o,i=e.value,a=1==e.state,c=a?t.ok:t.fail,u=t.resolve,f=t.reject,s=t.domain;try{c?(a||(2===e.rejection&&Zr(e),e.rejection=1),!0===c?n=i:(s&&s.enter(),n=c(i),s&&(s.exit(),o=!0)),n===t.promise?f(Gr("Promise-chain cycle")):(r=Xr(n))?v(r,n,u,f):u(n)):f(i)}catch(t){s&&!o&&s.exit(),f(t)}},Kr=function(t,e){t.notified||(t.notified=!0,pr((function(){for(var n,r=t.reactions;n=r.get();)Hr(n,t);t.notified=!1,e&&!t.rejection&&Vr(t)})))},Jr=function(t,e,n){var r,o;Yr?((r=zr.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},!Nr&&(o=u["on"+t])?o(r):"unhandledrejection"===t&&function(t,e){var n=u.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},Vr=function(t){v(_r,u,(function(){var e,n=t.facade,r=t.value;if(qr(t)&&(e=vr((function(){Ze?Br.emit("unhandledRejection",r,n):Jr("unhandledrejection",n,r)})),t.rejection=Ze||qr(t)?2:1,e.error))throw e.value}))},qr=function(t){return 1!==t.rejection&&!t.parent},Zr=function(t){v(_r,u,(function(){var e=t.facade;Ze?Br.emit("rejectionHandled",e):Jr("rejectionhandled",e,t.value)}))},to=function(t,e,n){return function(r){t(e,r,n)}},eo=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Kr(t,!0))},no=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Gr("Promise can't be resolved itself");var r=Xr(e);r?pr((function(){var n={done:!1};try{v(r,e,to(no,n,t),to(eo,n,t))}catch(e){eo(n,e,t)}})):(t.value=e,t.state=1,Kr(t,!1))}catch(e){eo({done:!1},e,t)}}};if(Ar&&(Wr=(Ur=function(t){!function(t,e){if(M(e,t))return t;throw cn("Incorrect invocation")}(this,Wr),J(t),v(mr,this);var e=Mr(this);try{t(to(no,e),to(eo,e))}catch(t){eo(e,t)}}).prototype,(mr=function(t){Dr(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new hr,rejection:!1,state:0,value:void 0})}).prototype=oe(Wr,"then",(function(t,e){var n=Mr(this),r=Lr(xn(this,Ur));return n.parent=!0,r.ok=!_(t)||t,r.fail=_(e)&&e,r.domain=Ze?Br.domain:void 0,0==n.state?n.reactions.add(r):pr((function(){Hr(r,n)})),r.promise})),wr=function(){var t=new mr,e=Mr(t);this.promise=t,this.resolve=to(no,e),this.reject=to(eo,e)},kr.f=Lr=function(t){return t===Ur||undefined===t?new wr(t):Qr(t)},_(gr)&&$r!==Object.prototype)){Or=$r.then,Fr||oe($r,"then",(function(t,e){var n=this;return new Ur((function(t,e){v(Or,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete $r.constructor}catch(t){}nn&&nn($r,Wr)}Ne({global:!0,constructor:!0,wrap:!0,forced:Ar},{Promise:Ur}),xr="Promise",jr=!1,(Sr=Ur)&&!jr&&(Sr=Sr.prototype),Sr&&!at(Sr,on)&&rn(Sr,on,{configurable:!0,value:xr}),function(t){var e=F(t),n=At.f;s&&e&&!e[an]&&n(e,an,{configurable:!0,get:function(){return this}})}("Promise");var ro={},oo=ht("iterator"),io=Array.prototype,ao=ht("iterator"),co=function(t){if(null!=t)return V(t,ao)||V(t,"@@iterator")||ro[Ve(t)]},uo=TypeError,fo=function(t,e,n){var r,o;Ct(t);try{if(!(r=V(t,"return"))){if("throw"===e)throw n;return n}r=v(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Ct(r),n},so=TypeError,lo=function(t,e){this.stopped=t,this.result=e},po=lo.prototype,vo=function(t,e,n){var r,o,i,a,c,u,f,s,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),g=!(!n||!n.INTERRUPTED),y=Cn(e,l),b=function(t){return r&&fo(r,"normal",t),new lo(!0,t)},m=function(t){return p?(Ct(t),g?y(t[0],t[1],b):y(t[0],t[1])):g?y(t,b):y(t)};if(d)r=t.iterator;else if(h)r=t;else{if(!(o=co(t)))throw so(H(t)+" is not iterable");if(void 0!==(s=o)&&(ro.Array===s||io[oo]===s)){for(i=0,a=ve(t);a>i;i++)if((c=m(t[i]))&&M(po,c))return c;return new lo(!1)}r=function(t,e){var n=arguments.length<2?co(t):e;if(J(n))return Ct(v(n,t));throw uo(H(t)+" is not iterable")}(t,o)}for(u=d?t.next:r.next;!(f=v(u,r)).done;){try{c=m(f.value)}catch(t){fo(r,"throw",t)}if("object"==typeof c&&c&&M(po,c))return c}return new lo(!1)},ho=ht("iterator"),go=!1;try{var yo=0,bo={next:function(){return{done:!!yo++}},return:function(){go=!0}};bo[ho]=function(){return this},Array.from(bo,(function(){throw 2}))}catch(t){}var mo=Cr.CONSTRUCTOR||!function(t,e){if(!e&&!go)return!1;var n=!1;try{var r={};r[ho]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){gr.all(t).then(void 0,(function(){}))}));Ne({target:"Promise",stat:!0,forced:mo},{all:function(t){var e=this,n=kr.f(e),r=n.resolve,o=n.reject,i=vr((function(){var n=J(e.resolve),i=[],a=0,c=1;vo(t,(function(t){var u=a++,f=!1;c++,v(n,e,t).then((function(t){f||(f=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise}});var wo=Cr.CONSTRUCTOR,Oo=gr&&gr.prototype;if(Ne({target:"Promise",proto:!0,forced:wo,real:!0},{catch:function(t){return this.then(void 0,t)}}),_(gr)){var So=F("Promise").prototype.catch;Oo.catch!==So&&oe(Oo,"catch",So,{unsafe:!0})}Ne({target:"Promise",stat:!0,forced:mo},{race:function(t){var e=this,n=kr.f(e),r=n.reject,o=vr((function(){var o=J(e.resolve);vo(t,(function(t){v(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),Ne({target:"Promise",stat:!0,forced:Cr.CONSTRUCTOR},{reject:function(t){var e=kr.f(this);return v(e.reject,void 0,t),e.promise}});var xo=Cr.CONSTRUCTOR;F("Promise"),Ne({target:"Promise",stat:!0,forced:xo},{resolve:function(t){return function(t,e){if(Ct(t),A(e)&&e.constructor===t)return e;var n=kr.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var jo,Eo=String,To=function(t){if("Symbol"===Ve(t))throw TypeError("Cannot convert a Symbol value to a string");return Eo(t)},Po=function(){var t=Ct(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Io=u.RegExp,Co=f((function(){var t=Io("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Ro=Co||f((function(){return!Io("a","y").sticky})),ko={BROKEN_CARET:Co||f((function(){var t=Io("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:Ro,UNSUPPORTED_Y:Co},_o=Object.keys||function(t){return be(t,me)},Ao=s&&!Tt?Object.defineProperties:function(t,e){Ct(t);for(var n,r=k(e),o=_o(e),i=o.length,a=0;i>a;)At.f(t,n=o[a++],r[n]);return t},No={f:Ao},Fo=Xt("IE_PROTO"),Mo=function(){},Do=function(t){return"<script>"+t+"<\/script>"},$o=function(t){t.write(Do("")),t.close();var e=t.parentWindow.Object;return t=null,e},Uo=function(){try{jo=new ActiveXObject("htmlfile")}catch(t){}var t,e;Uo="undefined"!=typeof document?document.domain&&jo?$o(jo):((e=St("iframe")).style.display="none",Rn.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Do("document.F=Object")),t.close(),t.F):$o(jo);for(var n=me.length;n--;)delete Uo.prototype[me[n]];return Uo()};Ht[Fo]=!0;var Wo,Go,zo=Object.create||function(t,e){var n;return null!==t?(Mo.prototype=Ct(t),n=new Mo,Mo.prototype=null,n[Fo]=t):n=Uo(),void 0===e?n:No.f(n,e)},Bo=u.RegExp,Lo=f((function(){var t=Bo(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Qo=u.RegExp,Yo=f((function(){var t=Qo("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Xo=ne.get,Ho=nt("native-string-replace",String.prototype.replace),Ko=RegExp.prototype.exec,Jo=Ko,Vo=S("".charAt),qo=S("".indexOf),Zo=S("".replace),ti=S("".slice),ei=(Go=/b*/g,v(Ko,Wo=/a/,"a"),v(Ko,Go,"a"),0!==Wo.lastIndex||0!==Go.lastIndex),ni=ko.BROKEN_CARET,ri=void 0!==/()??/.exec("")[1];(ei||ri||ni||Lo||Yo)&&(Jo=function(t){var e,n,r,o,i,a,c,u=this,f=Xo(u),s=To(t),l=f.raw;if(l)return l.lastIndex=u.lastIndex,e=v(Jo,l,s),u.lastIndex=l.lastIndex,e;var p=f.groups,d=ni&&u.sticky,h=v(Po,u),g=u.source,y=0,b=s;if(d&&(h=Zo(h,"y",""),-1===qo(h,"g")&&(h+="g"),b=ti(s,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Vo(s,u.lastIndex-1))&&(g="(?: "+g+")",b=" "+b,y++),n=new RegExp("^(?:"+g+")",h)),ri&&(n=new RegExp("^"+g+"$(?!\\s)",h)),ei&&(r=u.lastIndex),o=v(Ko,d?n:u,b),d?o?(o.input=ti(o.input,y),o[0]=ti(o[0],y),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:ei&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),ri&&o&&o.length>1&&v(Ho,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=zo(null),i=0;i<p.length;i++)a[(c=p[i])[0]]=o[c[1]];return o});var oi=Jo;Ne({target:"RegExp",proto:!0,forced:/./.exec!==oi},{exec:oi});var ii=ht("species"),ai=RegExp.prototype,ci=S("".charAt),ui=S("".charCodeAt),fi=S("".slice),si=function(t){return function(e,n){var r,o,i=To(R(e)),a=ue(n),c=i.length;return a<0||a>=c?t?"":void 0:(r=ui(i,a))<55296||r>56319||a+1===c||(o=ui(i,a+1))<56320||o>57343?t?ci(i,a):r:t?fi(i,a,a+2):o-56320+(r-55296<<10)+65536}},li={codeAt:si(!1),charAt:si(!0)}.charAt,pi=function(t,e,n){return e+(n?li(t,e).length:1)},vi=Math.floor,di=S("".charAt),hi=S("".replace),gi=S("".slice),yi=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,bi=/\$([$&'`]|\d{1,2})/g,mi=function(t,e,n,r,o,i){var a=n+t.length,c=r.length,u=bi;return void 0!==o&&(o=ot(o),u=yi),hi(i,u,(function(i,u){var f;switch(di(u,0)){case"$":return"$";case"&":return t;case"`":return gi(e,0,n);case"'":return gi(e,a);case"<":f=o[gi(u,1,-1)];break;default:var s=+u;if(0===s)return i;if(s>c){var l=vi(s/10);return 0===l?i:l<=c?void 0===r[l-1]?di(u,1):r[l-1]+di(u,1):i}f=r[s-1]}return void 0===f?"":f}))},wi=TypeError,Oi=function(t,e){var n=t.exec;if(_(n)){var r=v(n,t,e);return null!==r&&Ct(r),r}if("RegExp"===E(t))return v(oi,t,e);throw wi("RegExp#exec called on incompatible receiver")},Si=ht("replace"),xi=Math.max,ji=Math.min,Ei=S([].concat),Ti=S([].push),Pi=S("".indexOf),Ii=S("".slice),Ci="$0"==="a".replace(/./,"$0"),Ri=!!/./[Si]&&""===/./[Si]("a","$0");!function(t,e,n,r){var o=ht(t),i=!f((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!f((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[ii]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!a||n){var c=S(/./[o]),u=e(o,""[t],(function(t,e,n,r,o){var a=S(t),u=e.exec;return u===oi||u===ai.exec?i&&!o?{done:!0,value:c(e,n,r)}:{done:!0,value:a(n,e,r)}:{done:!1}}));oe(String.prototype,t,u[0]),oe(ai,o,u[1])}r&&Nt(ai[o],"sham",!0)}("replace",(function(t,e,n){var r=Ri?"$":"$0";return[function(t,n){var r=R(this),o=null==t?void 0:V(t,Si);return o?v(o,t,r,n):v(e,To(r),t,n)},function(t,o){var i=Ct(this),a=To(t);if("string"==typeof o&&-1===Pi(o,r)&&-1===Pi(o,"$<")){var c=n(e,i,a,o);if(c.done)return c.value}var u=_(o);u||(o=To(o));var f=i.global;if(f){var s=i.unicode;i.lastIndex=0}for(var l=[];;){var p=Oi(i,a);if(null===p)break;if(Ti(l,p),!f)break;""===To(p[0])&&(i.lastIndex=pi(a,pe(i.lastIndex),s))}for(var v,d="",h=0,g=0;g<l.length;g++){for(var y=To((p=l[g])[0]),b=xi(ji(ue(p.index),a.length),0),m=[],w=1;w<p.length;w++)Ti(m,void 0===(v=p[w])?v:String(v));var O=p.groups;if(u){var S=Ei([y],m,b,a);void 0!==O&&Ti(S,O);var x=To(Pn(o,void 0,S))}else x=mi(y,a,b,m,O,o);b>=h&&(d+=Ii(a,h,b)+x,h=b+y.length)}return d+Ii(a,h)}]}),!!f((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Ci||Ri);var ki=/MSIE .\./.test(D),_i=u.Function,Ai=function(t){return ki?function(e,n){var r=_n(arguments.length,1)>2,o=_(e)?e:_i(e),i=r?Fe(arguments,2):void 0;return t(r?function(){Pn(o,this,i)}:o,n)}:t},Ni={setTimeout:Ai(u.setTimeout),setInterval:Ai(u.setInterval)},Fi=Ni.setInterval;Ne({global:!0,bind:!0,forced:u.setInterval!==Fi},{setInterval:Fi});var Mi=Ni.setTimeout;Ne({global:!0,bind:!0,forced:u.setTimeout!==Mi},{setTimeout:Mi});var Di=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,n=document.createElement("div"),r=document.getElementById("toast-temporary");r?r.innerText=t:(n.style="position:fixed;z-index:2000;left:50%;top:45%;transition:all .5s;font-size: 16px;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);text-align:center;border-radius:5px;color:#FFF;background:rgba(17,17,17,0.7);line-height:1.75;padding:8px 15px;",n.id="toast-temporary",n.innerText=t,document.body.appendChild(n),setTimeout((function(){document.body.removeChild(n)}),e))},$i=function(){function r(){var t=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e(this,"webSocket",null),e(this,"messageHandlerQueue",[]),r.instance)return r.instance;r.CheckEnvironment()?(r.instance=this,this.webSocket=new WebSocket("ws://127.0.0.1:2828"),this.webSocket.onmessage=this.handleMessage,this.webSocket.onerror=function(){return n(this,t),Di("socket连接错误")}.bind(this)):Di("当前浏览器不支持电子签名,请更换Chrome(谷歌)浏览器")}var o,i,a;return o=r,i=[{key:"CheckEnvironment",value:function(){return navigator.userAgent.indexOf("Chrome")>-1}},{key:"start",value:function(){var t=this;return this.webSocket?new Promise(function(e,r){n(this,t),this.messageHandlerQueue.push({resolve:e,reject:r}),this.webSocket.send("GWQ_DeviceOnline()")}.bind(this)):Promise.reject("webSocket初始化失败")}},{key:"handleMessage",value:function(t){var e=(t||{}).data;if(e)if(e.indexOf("BeginGWQ_DeviceOnline")>=0){var n=e.replace("BeginGWQ_DeviceOnline","").replace("EndGWQ_DeviceOnline","");if(0==n)this.webSocket.send("GWQ_SetPenWidth(10)"),this.webSocket.send("DoGWQ_StartSign2('','',0.1.0.50,请签名,0)");else if(-3==n){var r=this.messageHandlerQueue.shift();if(!r)return;r.resolve;var o="手写板连接失败,请检查设备连接";(0,r.reject)({msg:o}),Di(o)}}else if(e.indexOf("BeginAfterSign")>=0){var i=this.messageHandlerQueue.shift();if(!i)return;var a=i.resolve,c=i.reject,u=e.replace("BeginAfterSign","").replace("EndAfterSign",""),f=JSON.parse(u),s=f.signImage,l=f.fingerImage;if(s||l){var p="data:image/jpeg;base64,";a({signImage:s?p+s:"",fingerImage:l?p+l:""})}else{var v="签名已取消";c({msg:v}),Di(v)}}}}],a=[{key:"create",value:function(){return new r}}],i&&t(o.prototype,i),a&&t(o,a),Object.defineProperty(o,"prototype",{writable:!1}),r}();e($i,"instance",null);export{$i as default};
function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i,a,c=function(t){return t&&t.Math==Math&&t},u=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof r&&r)||function(){return this}()||Function("return this")(),f=function(t){try{return!!t()}catch(t){return!0}},s=!f((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!f((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),p=Function.prototype.call,v=l?p.bind(p):function(){return p.apply(p,arguments)},d={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,g={f:h&&!d.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:d},y=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},b=Function.prototype,m=b.bind,w=b.call,O=l&&m.bind(w,w),S=l?function(t){return t&&O(t)}:function(t){return t&&function(){return w.apply(t,arguments)}},x=S({}.toString),j=S("".slice),E=function(t){return j(x(t),8,-1)},T=Object,P=S("".split),I=f((function(){return!T("z").propertyIsEnumerable(0)}))?function(t){return"String"==E(t)?P(t,""):T(t)}:T,C=TypeError,R=function(t){if(null==t)throw C("Can't call method on "+t);return t},k=function(t){return I(R(t))},_=function(t){return"function"==typeof t},A=function(t){return"object"==typeof t?null!==t:_(t)},N=function(t){return _(t)?t:void 0},F=function(t,e){return arguments.length<2?N(u[t]):u[t]&&u[t][e]},M=S({}.isPrototypeOf),D=F("navigator","userAgent")||"",$=u.process,U=u.Deno,W=$&&$.versions||U&&U.version,G=W&&W.v8;G&&(a=(i=G.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!a&&D&&(!(i=D.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=D.match(/Chrome\/(\d+)/))&&(a=+i[1]);var z=a,B=!!Object.getOwnPropertySymbols&&!f((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&z&&z<41})),L=B&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Q=Object,Y=L?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return _(e)&&M(e.prototype,Q(t))},X=String,H=function(t){try{return X(t)}catch(t){return"Object"}},K=TypeError,J=function(t){if(_(t))return t;throw K(H(t)+" is not a function")},V=function(t,e){var n=t[e];return null==n?void 0:J(n)},q=TypeError,Z=Object.defineProperty,tt=function(t,e){try{Z(u,t,{value:e,configurable:!0,writable:!0})}catch(n){u[t]=e}return e},et=u["__core-js_shared__"]||tt("__core-js_shared__",{}),nt=o((function(t){(t.exports=function(t,e){return et[t]||(et[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),rt=Object,ot=function(t){return rt(R(t))},it=S({}.hasOwnProperty),at=Object.hasOwn||function(t,e){return it(ot(t),e)},ct=0,ut=Math.random(),ft=S(1..toString),st=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ft(++ct+ut,36)},lt=nt("wks"),pt=u.Symbol,vt=pt&&pt.for,dt=L?pt:pt&&pt.withoutSetter||st,ht=function(t){if(!at(lt,t)||!B&&"string"!=typeof lt[t]){var e="Symbol."+t;B&&at(pt,t)?lt[t]=pt[t]:lt[t]=L&&vt?vt(e):dt(e)}return lt[t]},gt=TypeError,yt=ht("toPrimitive"),bt=function(t,e){if(!A(t)||Y(t))return t;var n,r=V(t,yt);if(r){if(void 0===e&&(e="default"),n=v(r,t,e),!A(n)||Y(n))return n;throw gt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&_(n=t.toString)&&!A(r=v(n,t)))return r;if(_(n=t.valueOf)&&!A(r=v(n,t)))return r;if("string"!==e&&_(n=t.toString)&&!A(r=v(n,t)))return r;throw q("Can't convert object to primitive value")}(t,e)},mt=function(t){var e=bt(t,"string");return Y(e)?e:e+""},wt=u.document,Ot=A(wt)&&A(wt.createElement),St=function(t){return Ot?wt.createElement(t):{}},xt=!s&&!f((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),jt=Object.getOwnPropertyDescriptor,Et={f:s?jt:function(t,e){if(t=k(t),e=mt(e),xt)try{return jt(t,e)}catch(t){}if(at(t,e))return y(!v(g.f,t,e),t[e])}},Tt=s&&f((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pt=String,It=TypeError,Ct=function(t){if(A(t))return t;throw It(Pt(t)+" is not an object")},Rt=TypeError,kt=Object.defineProperty,_t=Object.getOwnPropertyDescriptor,At={f:s?Tt?function(t,e,n){if(Ct(t),e=mt(e),Ct(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=_t(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return kt(t,e,n)}:kt:function(t,e,n){if(Ct(t),e=mt(e),Ct(n),xt)try{return kt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Rt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Nt=s?function(t,e,n){return At.f(t,e,y(1,n))}:function(t,e,n){return t[e]=n,t},Ft=Function.prototype,Mt=s&&Object.getOwnPropertyDescriptor,Dt=at(Ft,"name"),$t={EXISTS:Dt,PROPER:Dt&&"something"===function(){}.name,CONFIGURABLE:Dt&&(!s||s&&Mt(Ft,"name").configurable)},Ut=S(Function.toString);_(et.inspectSource)||(et.inspectSource=function(t){return Ut(t)});var Wt,Gt,zt,Bt=et.inspectSource,Lt=u.WeakMap,Qt=_(Lt)&&/native code/.test(Bt(Lt)),Yt=nt("keys"),Xt=function(t){return Yt[t]||(Yt[t]=st(t))},Ht={},Kt=u.TypeError,Jt=u.WeakMap;if(Qt||et.state){var Vt=et.state||(et.state=new Jt),qt=S(Vt.get),Zt=S(Vt.has),te=S(Vt.set);Wt=function(t,e){if(Zt(Vt,t))throw new Kt("Object already initialized");return e.facade=t,te(Vt,t,e),e},Gt=function(t){return qt(Vt,t)||{}},zt=function(t){return Zt(Vt,t)}}else{var ee=Xt("state");Ht[ee]=!0,Wt=function(t,e){if(at(t,ee))throw new Kt("Object already initialized");return e.facade=t,Nt(t,ee,e),e},Gt=function(t){return at(t,ee)?t[ee]:{}},zt=function(t){return at(t,ee)}}var ne={set:Wt,get:Gt,has:zt,enforce:function(t){return zt(t)?Gt(t):Wt(t,{})},getterFor:function(t){return function(e){var n;if(!A(e)||(n=Gt(e)).type!==t)throw Kt("Incompatible receiver, "+t+" required");return n}}},re=o((function(t){var e=$t.CONFIGURABLE,n=ne.enforce,r=ne.get,o=Object.defineProperty,i=s&&!f((function(){return 8!==o((function(){}),"length",{value:8}).length})),a=String(String).split("String"),c=t.exports=function(t,r,c){"Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),c&&c.getter&&(r="get "+r),c&&c.setter&&(r="set "+r),(!at(t,"name")||e&&t.name!==r)&&(s?o(t,"name",{value:r,configurable:!0}):t.name=r),i&&c&&at(c,"arity")&&t.length!==c.arity&&o(t,"length",{value:c.arity});try{c&&at(c,"constructor")&&c.constructor?s&&o(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var u=n(t);return at(u,"source")||(u.source=a.join("string"==typeof r?r:"")),t};Function.prototype.toString=c((function(){return _(this)&&r(this).source||Bt(this)}),"toString")})),oe=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(_(n)&&re(n,i,r),r.global)o?t[e]=n:tt(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:At.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},ie=Math.ceil,ae=Math.floor,ce=Math.trunc||function(t){var e=+t;return(e>0?ae:ie)(e)},ue=function(t){var e=+t;return e!=e||0===e?0:ce(e)},fe=Math.max,se=Math.min,le=Math.min,pe=function(t){return t>0?le(ue(t),9007199254740991):0},ve=function(t){return pe(t.length)},de=function(t){return function(e,n,r){var o,i=k(e),a=ve(i),c=function(t,e){var n=ue(t);return n<0?fe(n+e,0):se(n,e)}(r,a);if(t&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},he={includes:de(!0),indexOf:de(!1)},ge=he.indexOf,ye=S([].push),be=function(t,e){var n,r=k(t),o=0,i=[];for(n in r)!at(Ht,n)&&at(r,n)&&ye(i,n);for(;e.length>o;)at(r,n=e[o++])&&(~ge(i,n)||ye(i,n));return i},me=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],we=me.concat("length","prototype"),Oe={f:Object.getOwnPropertyNames||function(t){return be(t,we)}},Se={f:Object.getOwnPropertySymbols},xe=S([].concat),je=F("Reflect","ownKeys")||function(t){var e=Oe.f(Ct(t)),n=Se.f;return n?xe(e,n(t)):e},Ee=function(t,e,n){for(var r=je(e),o=At.f,i=Et.f,a=0;a<r.length;a++){var c=r[a];at(t,c)||n&&at(n,c)||o(t,c,i(e,c))}},Te=/#|\.prototype\./,Pe=function(t,e){var n=Ce[Ie(t)];return n==ke||n!=Re&&(_(e)?f(e):!!e)},Ie=Pe.normalize=function(t){return String(t).replace(Te,".").toLowerCase()},Ce=Pe.data={},Re=Pe.NATIVE="N",ke=Pe.POLYFILL="P",_e=Pe,Ae=Et.f,Ne=function(t,e){var n,r,o,i,a,c=t.target,f=t.global,s=t.stat;if(n=f?u:s?u[c]||tt(c,{}):(u[c]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(a=Ae(n,r))&&a.value:n[r],!_e(f?r:c+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ee(i,o)}(t.sham||o&&o.sham)&&Nt(i,"sham",!0),oe(n,r,i,t)}},Fe=S([].slice),Me=Function,De=S([].concat),$e=S([].join),Ue={},We=function(t,e,n){if(!at(Ue,e)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";Ue[e]=Me("C,a","return new C("+$e(r,",")+")")}return Ue[e](t,n)},Ge=l?Me.bind:function(t){var e=J(this),n=e.prototype,r=Fe(arguments,1),o=function(){var n=De(r,Fe(arguments));return this instanceof o?We(e,n.length,n):e.apply(t,n)};return A(n)&&(o.prototype=n),o};Ne({target:"Function",proto:!0,forced:Function.bind!==Ge},{bind:Ge});var ze={};ze[ht("toStringTag")]="z";var Be="[object z]"===String(ze),Le=ht("toStringTag"),Qe=Object,Ye="Arguments"==E(function(){return arguments}()),Xe=Be?E:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Qe(t),Le))?n:Ye?E(e):"Object"==(r=E(e))&&_(e.callee)?"Arguments":r},He=Be?{}.toString:function(){return"[object "+Xe(this)+"]"};Be||oe(Object.prototype,"toString",He,{unsafe:!0});var Ke="process"==E(u.process),Je=String,Ve=TypeError,qe=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=S(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Ct(n),function(t){if("object"==typeof t||_(t))return t;throw Ve("Can't set "+Je(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),Ze=At.f,tn=ht("toStringTag"),en=ht("species"),nn=TypeError,rn=function(){},on=[],an=F("Reflect","construct"),cn=/^\s*(?:class|function)\b/,un=S(cn.exec),fn=!cn.exec(rn),sn=function(t){if(!_(t))return!1;try{return an(rn,on,t),!0}catch(t){return!1}},ln=function(t){if(!_(t))return!1;switch(Xe(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fn||!!un(cn,Bt(t))}catch(t){return!0}};ln.sham=!0;var pn,vn,dn,hn,gn=!an||f((function(){var t;return sn(sn.call)||!sn(Object)||!sn((function(){t=!0}))||t}))?ln:sn,yn=TypeError,bn=ht("species"),mn=function(t,e){var n,r=Ct(t).constructor;return void 0===r||null==(n=Ct(r)[bn])?e:function(t){if(gn(t))return t;throw yn(H(t)+" is not a constructor")}(n)},wn=Function.prototype,On=wn.apply,Sn=wn.call,xn="object"==typeof Reflect&&Reflect.apply||(l?Sn.bind(On):function(){return Sn.apply(On,arguments)}),jn=S(S.bind),En=function(t,e){return J(t),void 0===e?t:l?jn(t,e):function(){return t.apply(e,arguments)}},Tn=F("document","documentElement"),Pn=TypeError,In=function(t,e){if(t<e)throw Pn("Not enough arguments");return t},Cn=/(?:ipad|iphone|ipod).*applewebkit/i.test(D),Rn=u.setImmediate,kn=u.clearImmediate,_n=u.process,An=u.Dispatch,Nn=u.Function,Fn=u.MessageChannel,Mn=u.String,Dn=0,$n={};try{pn=u.location}catch(t){}var Un=function(t){if(at($n,t)){var e=$n[t];delete $n[t],e()}},Wn=function(t){return function(){Un(t)}},Gn=function(t){Un(t.data)},zn=function(t){u.postMessage(Mn(t),pn.protocol+"//"+pn.host)};Rn&&kn||(Rn=function(t){In(arguments.length,1);var e=_(t)?t:Nn(t),n=Fe(arguments,1);return $n[++Dn]=function(){xn(e,void 0,n)},vn(Dn),Dn},kn=function(t){delete $n[t]},Ke?vn=function(t){_n.nextTick(Wn(t))}:An&&An.now?vn=function(t){An.now(Wn(t))}:Fn&&!Cn?(hn=(dn=new Fn).port2,dn.port1.onmessage=Gn,vn=En(hn.postMessage,hn)):u.addEventListener&&_(u.postMessage)&&!u.importScripts&&pn&&"file:"!==pn.protocol&&!f(zn)?(vn=zn,u.addEventListener("message",Gn,!1)):vn="onreadystatechange"in St("script")?function(t){Tn.appendChild(St("script")).onreadystatechange=function(){Tn.removeChild(this),Un(t)}}:function(t){setTimeout(Wn(t),0)});var Bn,Ln,Qn,Yn,Xn,Hn,Kn,Jn,Vn={set:Rn,clear:kn},qn=/ipad|iphone|ipod/i.test(D)&&void 0!==u.Pebble,Zn=/web0s(?!.*chrome)/i.test(D),tr=Et.f,er=Vn.set,nr=u.MutationObserver||u.WebKitMutationObserver,rr=u.document,or=u.process,ir=u.Promise,ar=tr(u,"queueMicrotask"),cr=ar&&ar.value;cr||(Bn=function(){var t,e;for(Ke&&(t=or.domain)&&t.exit();Ln;){e=Ln.fn,Ln=Ln.next;try{e()}catch(t){throw Ln?Yn():Qn=void 0,t}}Qn=void 0,t&&t.enter()},Cn||Ke||Zn||!nr||!rr?!qn&&ir&&ir.resolve?((Kn=ir.resolve(void 0)).constructor=ir,Jn=En(Kn.then,Kn),Yn=function(){Jn(Bn)}):Ke?Yn=function(){or.nextTick(Bn)}:(er=En(er,u),Yn=function(){er(Bn)}):(Xn=!0,Hn=rr.createTextNode(""),new nr(Bn).observe(Hn,{characterData:!0}),Yn=function(){Hn.data=Xn=!Xn}));var ur=cr||function(t){var e={fn:t,next:void 0};Qn&&(Qn.next=e),Ln||(Ln=e,Yn()),Qn=e},fr=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},sr=function(){this.head=null,this.tail=null};sr.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}};var lr=sr,pr=u.Promise,vr="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,dr=!vr&&!Ke&&"object"==typeof window&&"object"==typeof document;pr&&pr.prototype;var hr,gr,yr,br,mr,wr,Or=ht("species"),Sr=!1,xr=_(u.PromiseRejectionEvent),jr=_e("Promise",(function(){var t=Bt(pr),e=t!==String(pr);if(!e&&66===z)return!0;if(!z||z<51||!/native code/.test(t)){var n=new pr((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Or]=r,!(Sr=n.then((function(){}))instanceof r))return!0}return!e&&(dr||vr)&&!xr})),Er={CONSTRUCTOR:jr,REJECTION_EVENT:xr,SUBCLASSING:Sr},Tr=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=J(e),this.reject=J(n)},Pr={f:function(t){return new Tr(t)}},Ir=Vn.set,Cr=Er.CONSTRUCTOR,Rr=Er.REJECTION_EVENT,kr=Er.SUBCLASSING,_r=ne.getterFor("Promise"),Ar=ne.set,Nr=pr&&pr.prototype,Fr=pr,Mr=Nr,Dr=u.TypeError,$r=u.document,Ur=u.process,Wr=Pr.f,Gr=Wr,zr=!!($r&&$r.createEvent&&u.dispatchEvent),Br=function(t){var e;return!(!A(t)||!_(e=t.then))&&e},Lr=function(t,e){var n,r,o,i=e.value,a=1==e.state,c=a?t.ok:t.fail,u=t.resolve,f=t.reject,s=t.domain;try{c?(a||(2===e.rejection&&Kr(e),e.rejection=1),!0===c?n=i:(s&&s.enter(),n=c(i),s&&(s.exit(),o=!0)),n===t.promise?f(Dr("Promise-chain cycle")):(r=Br(n))?v(r,n,u,f):u(n)):f(i)}catch(t){s&&!o&&s.exit(),f(t)}},Qr=function(t,e){t.notified||(t.notified=!0,ur((function(){for(var n,r=t.reactions;n=r.get();)Lr(n,t);t.notified=!1,e&&!t.rejection&&Xr(t)})))},Yr=function(t,e,n){var r,o;zr?((r=$r.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},!Rr&&(o=u["on"+t])?o(r):"unhandledrejection"===t&&function(t,e){var n=u.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},Xr=function(t){v(Ir,u,(function(){var e,n=t.facade,r=t.value;if(Hr(t)&&(e=fr((function(){Ke?Ur.emit("unhandledRejection",r,n):Yr("unhandledrejection",n,r)})),t.rejection=Ke||Hr(t)?2:1,e.error))throw e.value}))},Hr=function(t){return 1!==t.rejection&&!t.parent},Kr=function(t){v(Ir,u,(function(){var e=t.facade;Ke?Ur.emit("rejectionHandled",e):Yr("rejectionhandled",e,t.value)}))},Jr=function(t,e,n){return function(r){t(e,r,n)}},Vr=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Qr(t,!0))},qr=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Dr("Promise can't be resolved itself");var r=Br(e);r?ur((function(){var n={done:!1};try{v(r,e,Jr(qr,n,t),Jr(Vr,n,t))}catch(e){Vr(n,e,t)}})):(t.value=e,t.state=1,Qr(t,!1))}catch(e){Vr({done:!1},e,t)}}};if(Cr&&(Mr=(Fr=function(t){!function(t,e){if(M(e,t))return t;throw nn("Incorrect invocation")}(this,Mr),J(t),v(hr,this);var e=_r(this);try{t(Jr(qr,e),Jr(Vr,e))}catch(t){Vr(e,t)}}).prototype,(hr=function(t){Ar(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new lr,rejection:!1,state:0,value:void 0})}).prototype=oe(Mr,"then",(function(t,e){var n=_r(this),r=Wr(mn(this,Fr));return n.parent=!0,r.ok=!_(t)||t,r.fail=_(e)&&e,r.domain=Ke?Ur.domain:void 0,0==n.state?n.reactions.add(r):ur((function(){Lr(r,n)})),r.promise})),gr=function(){var t=new hr,e=_r(t);this.promise=t,this.resolve=Jr(qr,e),this.reject=Jr(Vr,e)},Pr.f=Wr=function(t){return t===Fr||undefined===t?new gr(t):Gr(t)},_(pr)&&Nr!==Object.prototype)){yr=Nr.then,kr||oe(Nr,"then",(function(t,e){var n=this;return new Fr((function(t,e){v(yr,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Nr.constructor}catch(t){}qe&&qe(Nr,Mr)}Ne({global:!0,constructor:!0,wrap:!0,forced:Cr},{Promise:Fr}),mr="Promise",wr=!1,(br=Fr)&&!wr&&(br=br.prototype),br&&!at(br,tn)&&Ze(br,tn,{configurable:!0,value:mr}),function(t){var e=F(t),n=At.f;s&&e&&!e[en]&&n(e,en,{configurable:!0,get:function(){return this}})}("Promise");var Zr={},to=ht("iterator"),eo=Array.prototype,no=ht("iterator"),ro=function(t){if(null!=t)return V(t,no)||V(t,"@@iterator")||Zr[Xe(t)]},oo=TypeError,io=function(t,e,n){var r,o;Ct(t);try{if(!(r=V(t,"return"))){if("throw"===e)throw n;return n}r=v(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Ct(r),n},ao=TypeError,co=function(t,e){this.stopped=t,this.result=e},uo=co.prototype,fo=function(t,e,n){var r,o,i,a,c,u,f,s,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),g=!(!n||!n.INTERRUPTED),y=En(e,l),b=function(t){return r&&io(r,"normal",t),new co(!0,t)},m=function(t){return p?(Ct(t),g?y(t[0],t[1],b):y(t[0],t[1])):g?y(t,b):y(t)};if(d)r=t.iterator;else if(h)r=t;else{if(!(o=ro(t)))throw ao(H(t)+" is not iterable");if(void 0!==(s=o)&&(Zr.Array===s||eo[to]===s)){for(i=0,a=ve(t);a>i;i++)if((c=m(t[i]))&&M(uo,c))return c;return new co(!1)}r=function(t,e){var n=arguments.length<2?ro(t):e;if(J(n))return Ct(v(n,t));throw oo(H(t)+" is not iterable")}(t,o)}for(u=d?t.next:r.next;!(f=v(u,r)).done;){try{c=m(f.value)}catch(t){io(r,"throw",t)}if("object"==typeof c&&c&&M(uo,c))return c}return new co(!1)},so=ht("iterator"),lo=!1;try{var po=0,vo={next:function(){return{done:!!po++}},return:function(){lo=!0}};vo[so]=function(){return this},Array.from(vo,(function(){throw 2}))}catch(t){}var ho=Er.CONSTRUCTOR||!function(t,e){if(!e&&!lo)return!1;var n=!1;try{var r={};r[so]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){pr.all(t).then(void 0,(function(){}))}));Ne({target:"Promise",stat:!0,forced:ho},{all:function(t){var e=this,n=Pr.f(e),r=n.resolve,o=n.reject,i=fr((function(){var n=J(e.resolve),i=[],a=0,c=1;fo(t,(function(t){var u=a++,f=!1;c++,v(n,e,t).then((function(t){f||(f=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise}});var go=Er.CONSTRUCTOR,yo=pr&&pr.prototype;if(Ne({target:"Promise",proto:!0,forced:go,real:!0},{catch:function(t){return this.then(void 0,t)}}),_(pr)){var bo=F("Promise").prototype.catch;yo.catch!==bo&&oe(yo,"catch",bo,{unsafe:!0})}Ne({target:"Promise",stat:!0,forced:ho},{race:function(t){var e=this,n=Pr.f(e),r=n.reject,o=fr((function(){var o=J(e.resolve);fo(t,(function(t){v(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),Ne({target:"Promise",stat:!0,forced:Er.CONSTRUCTOR},{reject:function(t){var e=Pr.f(this);return v(e.reject,void 0,t),e.promise}});var mo=Er.CONSTRUCTOR;F("Promise"),Ne({target:"Promise",stat:!0,forced:mo},{resolve:function(t){return function(t,e){if(Ct(t),A(e)&&e.constructor===t)return e;var n=Pr.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var wo=he.indexOf,Oo=S([].indexOf),So=!!Oo&&1/Oo([1],1,-0)<0,xo=function(t,e){var n=[][t];return!!n&&f((function(){n.call(null,e||function(){return 1},1)}))}("indexOf");Ne({target:"Array",proto:!0,forced:So||!xo},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return So?Oo(this,t,e)||0:wo(this,t,e)}});var jo,Eo=String,To=function(t){if("Symbol"===Xe(t))throw TypeError("Cannot convert a Symbol value to a string");return Eo(t)},Po=function(){var t=Ct(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Io=u.RegExp,Co=f((function(){var t=Io("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Ro=Co||f((function(){return!Io("a","y").sticky})),ko={BROKEN_CARET:Co||f((function(){var t=Io("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:Ro,UNSUPPORTED_Y:Co},_o=Object.keys||function(t){return be(t,me)},Ao=s&&!Tt?Object.defineProperties:function(t,e){Ct(t);for(var n,r=k(e),o=_o(e),i=o.length,a=0;i>a;)At.f(t,n=o[a++],r[n]);return t},No={f:Ao},Fo=Xt("IE_PROTO"),Mo=function(){},Do=function(t){return"<script>"+t+"<\/script>"},$o=function(t){t.write(Do("")),t.close();var e=t.parentWindow.Object;return t=null,e},Uo=function(){try{jo=new ActiveXObject("htmlfile")}catch(t){}var t,e;Uo="undefined"!=typeof document?document.domain&&jo?$o(jo):((e=St("iframe")).style.display="none",Tn.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Do("document.F=Object")),t.close(),t.F):$o(jo);for(var n=me.length;n--;)delete Uo.prototype[me[n]];return Uo()};Ht[Fo]=!0;var Wo,Go,zo=Object.create||function(t,e){var n;return null!==t?(Mo.prototype=Ct(t),n=new Mo,Mo.prototype=null,n[Fo]=t):n=Uo(),void 0===e?n:No.f(n,e)},Bo=u.RegExp,Lo=f((function(){var t=Bo(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Qo=u.RegExp,Yo=f((function(){var t=Qo("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Xo=ne.get,Ho=nt("native-string-replace",String.prototype.replace),Ko=RegExp.prototype.exec,Jo=Ko,Vo=S("".charAt),qo=S("".indexOf),Zo=S("".replace),ti=S("".slice),ei=(Go=/b*/g,v(Ko,Wo=/a/,"a"),v(Ko,Go,"a"),0!==Wo.lastIndex||0!==Go.lastIndex),ni=ko.BROKEN_CARET,ri=void 0!==/()??/.exec("")[1];(ei||ri||ni||Lo||Yo)&&(Jo=function(t){var e,n,r,o,i,a,c,u=this,f=Xo(u),s=To(t),l=f.raw;if(l)return l.lastIndex=u.lastIndex,e=v(Jo,l,s),u.lastIndex=l.lastIndex,e;var p=f.groups,d=ni&&u.sticky,h=v(Po,u),g=u.source,y=0,b=s;if(d&&(h=Zo(h,"y",""),-1===qo(h,"g")&&(h+="g"),b=ti(s,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Vo(s,u.lastIndex-1))&&(g="(?: "+g+")",b=" "+b,y++),n=new RegExp("^(?:"+g+")",h)),ri&&(n=new RegExp("^"+g+"$(?!\\s)",h)),ei&&(r=u.lastIndex),o=v(Ko,d?n:u,b),d?o?(o.input=ti(o.input,y),o[0]=ti(o[0],y),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:ei&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),ri&&o&&o.length>1&&v(Ho,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=zo(null),i=0;i<p.length;i++)a[(c=p[i])[0]]=o[c[1]];return o});var oi=Jo;Ne({target:"RegExp",proto:!0,forced:/./.exec!==oi},{exec:oi});var ii=ht("species"),ai=RegExp.prototype,ci=S("".charAt),ui=S("".charCodeAt),fi=S("".slice),si=function(t){return function(e,n){var r,o,i=To(R(e)),a=ue(n),c=i.length;return a<0||a>=c?t?"":void 0:(r=ui(i,a))<55296||r>56319||a+1===c||(o=ui(i,a+1))<56320||o>57343?t?ci(i,a):r:t?fi(i,a,a+2):o-56320+(r-55296<<10)+65536}},li={codeAt:si(!1),charAt:si(!0)}.charAt,pi=function(t,e,n){return e+(n?li(t,e).length:1)},vi=Math.floor,di=S("".charAt),hi=S("".replace),gi=S("".slice),yi=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,bi=/\$([$&'`]|\d{1,2})/g,mi=function(t,e,n,r,o,i){var a=n+t.length,c=r.length,u=bi;return void 0!==o&&(o=ot(o),u=yi),hi(i,u,(function(i,u){var f;switch(di(u,0)){case"$":return"$";case"&":return t;case"`":return gi(e,0,n);case"'":return gi(e,a);case"<":f=o[gi(u,1,-1)];break;default:var s=+u;if(0===s)return i;if(s>c){var l=vi(s/10);return 0===l?i:l<=c?void 0===r[l-1]?di(u,1):r[l-1]+di(u,1):i}f=r[s-1]}return void 0===f?"":f}))},wi=TypeError,Oi=function(t,e){var n=t.exec;if(_(n)){var r=v(n,t,e);return null!==r&&Ct(r),r}if("RegExp"===E(t))return v(oi,t,e);throw wi("RegExp#exec called on incompatible receiver")},Si=ht("replace"),xi=Math.max,ji=Math.min,Ei=S([].concat),Ti=S([].push),Pi=S("".indexOf),Ii=S("".slice),Ci="$0"==="a".replace(/./,"$0"),Ri=!!/./[Si]&&""===/./[Si]("a","$0");!function(t,e,n,r){var o=ht(t),i=!f((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!f((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[ii]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!a||n){var c=S(/./[o]),u=e(o,""[t],(function(t,e,n,r,o){var a=S(t),u=e.exec;return u===oi||u===ai.exec?i&&!o?{done:!0,value:c(e,n,r)}:{done:!0,value:a(n,e,r)}:{done:!1}}));oe(String.prototype,t,u[0]),oe(ai,o,u[1])}r&&Nt(ai[o],"sham",!0)}("replace",(function(t,e,n){var r=Ri?"$":"$0";return[function(t,n){var r=R(this),o=null==t?void 0:V(t,Si);return o?v(o,t,r,n):v(e,To(r),t,n)},function(t,o){var i=Ct(this),a=To(t);if("string"==typeof o&&-1===Pi(o,r)&&-1===Pi(o,"$<")){var c=n(e,i,a,o);if(c.done)return c.value}var u=_(o);u||(o=To(o));var f=i.global;if(f){var s=i.unicode;i.lastIndex=0}for(var l=[];;){var p=Oi(i,a);if(null===p)break;if(Ti(l,p),!f)break;""===To(p[0])&&(i.lastIndex=pi(a,pe(i.lastIndex),s))}for(var v,d="",h=0,g=0;g<l.length;g++){for(var y=To((p=l[g])[0]),b=xi(ji(ue(p.index),a.length),0),m=[],w=1;w<p.length;w++)Ti(m,void 0===(v=p[w])?v:String(v));var O=p.groups;if(u){var S=Ei([y],m,b,a);void 0!==O&&Ti(S,O);var x=To(xn(o,void 0,S))}else x=mi(y,a,b,m,O,o);b>=h&&(d+=Ii(a,h,b)+x,h=b+y.length)}return d+Ii(a,h)}]}),!!f((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Ci||Ri);var ki=/MSIE .\./.test(D),_i=u.Function,Ai=function(t){return ki?function(e,n){var r=In(arguments.length,1)>2,o=_(e)?e:_i(e),i=r?Fe(arguments,2):void 0;return t(r?function(){xn(o,this,i)}:o,n)}:t},Ni={setTimeout:Ai(u.setTimeout),setInterval:Ai(u.setInterval)},Fi=Ni.setInterval;Ne({global:!0,bind:!0,forced:u.setInterval!==Fi},{setInterval:Fi});var Mi=Ni.setTimeout;Ne({global:!0,bind:!0,forced:u.setTimeout!==Mi},{setTimeout:Mi});var Di=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,n=document.createElement("div"),r=document.getElementById("toast-temporary");r?r.innerText=t:(n.style="position:fixed;z-index:2000;left:50%;top:45%;transition:all .5s;font-size: 16px;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);text-align:center;border-radius:5px;color:#FFF;background:rgba(17,17,17,0.7);line-height:1.75;padding:8px 15px;",n.id="toast-temporary",n.innerText=t,document.body.appendChild(n),setTimeout((function(){document.body.removeChild(n)}),e))},$i=function(){function r(){var t=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e(this,"webSocket",null),e(this,"messageHandlerQueue",[]),r.instance)return r.instance;r.CheckEnvironment()?(r.instance=this,this.webSocket=new WebSocket("ws://127.0.0.1:2828"),this.webSocket.onmessage=this._handleMessage.bind(this),this.webSocket.onerror=function(){return n(this,t),Di("socket连接错误")}.bind(this)):Di("当前浏览器不支持电子签名,请更换Chrome(谷歌)浏览器")}var o,i,a;return o=r,i=[{key:"start",value:function(){var t=this;return this.webSocket?new Promise(function(e,r){n(this,t),this.messageHandlerQueue.push({resolve:e,reject:r}),this.webSocket.send("GWQ_DeviceOnline()")}.bind(this)):Promise.reject("webSocket初始化失败")}},{key:"_handleMessage",value:function(t){var e=(t||{}).data;if(e)if(e.indexOf("BeginGWQ_DeviceOnline")>=0){var n=e.replace("BeginGWQ_DeviceOnline","").replace("EndGWQ_DeviceOnline","");if(0==n)this.webSocket.send("GWQ_SetPenWidth(10)"),this.webSocket.send("DoGWQ_StartSign2('','',0.1.0.50,请签名,0)");else if(-3==n){var r=this.messageHandlerQueue.shift();if(!r)return;r.resolve;var o="手写板连接失败,请检查设备连接";(0,r.reject)({msg:o}),Di(o)}}else if(e.indexOf("BeginAfterSign")>=0){var i=this.messageHandlerQueue.shift();if(!i)return;var a=i.resolve,c=i.reject,u=e.replace("BeginAfterSign","").replace("EndAfterSign",""),f=JSON.parse(u),s=f.signImage,l=f.fingerImage;if(s||l){var p="data:image/jpeg;base64,";a({signImage:s?p+s:"",fingerImage:l?p+l:""})}else{var v="签名已取消";c({msg:v}),Di(v)}}}}],a=[{key:"create",value:function(){return new r}},{key:"CheckEnvironment",value:function(){return navigator.userAgent.indexOf("Chrome")>-1}}],i&&t(o.prototype,i),a&&t(o,a),Object.defineProperty(o,"prototype",{writable:!1}),r}();e($i,"instance",null);export{$i as default};

@@ -1,1 +0,1 @@

var Signature=function(){"use strict";function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i,c,a=function(t){return t&&t.Math==Math&&t},u=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof r&&r)||function(){return this}()||Function("return this")(),f=function(t){try{return!!t()}catch(t){return!0}},s=!f((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!f((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),p=Function.prototype.call,v=l?p.bind(p):function(){return p.apply(p,arguments)},d={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,g={f:h&&!d.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:d},y=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},b=Function.prototype,m=b.bind,w=b.call,O=l&&m.bind(w,w),S=l?function(t){return t&&O(t)}:function(t){return t&&function(){return w.apply(t,arguments)}},x=S({}.toString),j=S("".slice),E=function(t){return j(x(t),8,-1)},T=Object,I=S("".split),P=f((function(){return!T("z").propertyIsEnumerable(0)}))?function(t){return"String"==E(t)?I(t,""):T(t)}:T,C=TypeError,R=function(t){if(null==t)throw C("Can't call method on "+t);return t},k=function(t){return P(R(t))},A=function(t){return"function"==typeof t},_=function(t){return"object"==typeof t?null!==t:A(t)},N=function(t){return A(t)?t:void 0},F=function(t,e){return arguments.length<2?N(u[t]):u[t]&&u[t][e]},M=S({}.isPrototypeOf),D=F("navigator","userAgent")||"",$=u.process,U=u.Deno,W=$&&$.versions||U&&U.version,G=W&&W.v8;G&&(c=(i=G.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!c&&D&&(!(i=D.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=D.match(/Chrome\/(\d+)/))&&(c=+i[1]);var B=c,L=!!Object.getOwnPropertySymbols&&!f((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&B&&B<41})),z=L&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Q=Object,Y=z?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return A(e)&&M(e.prototype,Q(t))},X=String,H=function(t){try{return X(t)}catch(t){return"Object"}},K=TypeError,J=function(t){if(A(t))return t;throw K(H(t)+" is not a function")},V=function(t,e){var n=t[e];return null==n?void 0:J(n)},q=TypeError,Z=Object.defineProperty,tt=function(t,e){try{Z(u,t,{value:e,configurable:!0,writable:!0})}catch(n){u[t]=e}return e},et="__core-js_shared__",nt=u[et]||tt(et,{}),rt=o((function(t){(t.exports=function(t,e){return nt[t]||(nt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),ot=Object,it=function(t){return ot(R(t))},ct=S({}.hasOwnProperty),at=Object.hasOwn||function(t,e){return ct(it(t),e)},ut=0,ft=Math.random(),st=S(1..toString),lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+st(++ut+ft,36)},pt=rt("wks"),vt=u.Symbol,dt=vt&&vt.for,ht=z?vt:vt&&vt.withoutSetter||lt,gt=function(t){if(!at(pt,t)||!L&&"string"!=typeof pt[t]){var e="Symbol."+t;L&&at(vt,t)?pt[t]=vt[t]:pt[t]=z&&dt?dt(e):ht(e)}return pt[t]},yt=TypeError,bt=gt("toPrimitive"),mt=function(t,e){if(!_(t)||Y(t))return t;var n,r=V(t,bt);if(r){if(void 0===e&&(e="default"),n=v(r,t,e),!_(n)||Y(n))return n;throw yt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&A(n=t.toString)&&!_(r=v(n,t)))return r;if(A(n=t.valueOf)&&!_(r=v(n,t)))return r;if("string"!==e&&A(n=t.toString)&&!_(r=v(n,t)))return r;throw q("Can't convert object to primitive value")}(t,e)},wt=function(t){var e=mt(t,"string");return Y(e)?e:e+""},Ot=u.document,St=_(Ot)&&_(Ot.createElement),xt=function(t){return St?Ot.createElement(t):{}},jt=!s&&!f((function(){return 7!=Object.defineProperty(xt("div"),"a",{get:function(){return 7}}).a})),Et=Object.getOwnPropertyDescriptor,Tt={f:s?Et:function(t,e){if(t=k(t),e=wt(e),jt)try{return Et(t,e)}catch(t){}if(at(t,e))return y(!v(g.f,t,e),t[e])}},It=s&&f((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pt=String,Ct=TypeError,Rt=function(t){if(_(t))return t;throw Ct(Pt(t)+" is not an object")},kt=TypeError,At=Object.defineProperty,_t=Object.getOwnPropertyDescriptor,Nt="enumerable",Ft="configurable",Mt="writable",Dt={f:s?It?function(t,e,n){if(Rt(t),e=wt(e),Rt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Mt in n&&!n.writable){var r=_t(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:Ft in n?n.configurable:r.configurable,enumerable:Nt in n?n.enumerable:r.enumerable,writable:!1})}return At(t,e,n)}:At:function(t,e,n){if(Rt(t),e=wt(e),Rt(n),jt)try{return At(t,e,n)}catch(t){}if("get"in n||"set"in n)throw kt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},$t=s?function(t,e,n){return Dt.f(t,e,y(1,n))}:function(t,e,n){return t[e]=n,t},Ut=Function.prototype,Wt=s&&Object.getOwnPropertyDescriptor,Gt=at(Ut,"name"),Bt={EXISTS:Gt,PROPER:Gt&&"something"===function(){}.name,CONFIGURABLE:Gt&&(!s||s&&Wt(Ut,"name").configurable)},Lt=S(Function.toString);A(nt.inspectSource)||(nt.inspectSource=function(t){return Lt(t)});var zt,Qt,Yt,Xt=nt.inspectSource,Ht=u.WeakMap,Kt=A(Ht)&&/native code/.test(Xt(Ht)),Jt=rt("keys"),Vt=function(t){return Jt[t]||(Jt[t]=lt(t))},qt={},Zt="Object already initialized",te=u.TypeError,ee=u.WeakMap;if(Kt||nt.state){var ne=nt.state||(nt.state=new ee),re=S(ne.get),oe=S(ne.has),ie=S(ne.set);zt=function(t,e){if(oe(ne,t))throw new te(Zt);return e.facade=t,ie(ne,t,e),e},Qt=function(t){return re(ne,t)||{}},Yt=function(t){return oe(ne,t)}}else{var ce=Vt("state");qt[ce]=!0,zt=function(t,e){if(at(t,ce))throw new te(Zt);return e.facade=t,$t(t,ce,e),e},Qt=function(t){return at(t,ce)?t[ce]:{}},Yt=function(t){return at(t,ce)}}var ae={set:zt,get:Qt,has:Yt,enforce:function(t){return Yt(t)?Qt(t):zt(t,{})},getterFor:function(t){return function(e){var n;if(!_(e)||(n=Qt(e)).type!==t)throw te("Incompatible receiver, "+t+" required");return n}}},ue=o((function(t){var e=Bt.CONFIGURABLE,n=ae.enforce,r=ae.get,o=Object.defineProperty,i=s&&!f((function(){return 8!==o((function(){}),"length",{value:8}).length})),c=String(String).split("String"),a=t.exports=function(t,r,a){"Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(r="get "+r),a&&a.setter&&(r="set "+r),(!at(t,"name")||e&&t.name!==r)&&(s?o(t,"name",{value:r,configurable:!0}):t.name=r),i&&a&&at(a,"arity")&&t.length!==a.arity&&o(t,"length",{value:a.arity});try{a&&at(a,"constructor")&&a.constructor?s&&o(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var u=n(t);return at(u,"source")||(u.source=c.join("string"==typeof r?r:"")),t};Function.prototype.toString=a((function(){return A(this)&&r(this).source||Xt(this)}),"toString")})),fe=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(A(n)&&ue(n,i,r),r.global)o?t[e]=n:tt(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Dt.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},se=Math.ceil,le=Math.floor,pe=Math.trunc||function(t){var e=+t;return(e>0?le:se)(e)},ve=function(t){var e=+t;return e!=e||0===e?0:pe(e)},de=Math.max,he=Math.min,ge=Math.min,ye=function(t){return t>0?ge(ve(t),9007199254740991):0},be=function(t){return ye(t.length)},me=function(t){return function(e,n,r){var o,i=k(e),c=be(i),a=function(t,e){var n=ve(t);return n<0?de(n+e,0):he(n,e)}(r,c);if(t&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},we={includes:me(!0),indexOf:me(!1)},Oe=we.indexOf,Se=S([].push),xe=function(t,e){var n,r=k(t),o=0,i=[];for(n in r)!at(qt,n)&&at(r,n)&&Se(i,n);for(;e.length>o;)at(r,n=e[o++])&&(~Oe(i,n)||Se(i,n));return i},je=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ee=je.concat("length","prototype"),Te={f:Object.getOwnPropertyNames||function(t){return xe(t,Ee)}},Ie={f:Object.getOwnPropertySymbols},Pe=S([].concat),Ce=F("Reflect","ownKeys")||function(t){var e=Te.f(Rt(t)),n=Ie.f;return n?Pe(e,n(t)):e},Re=function(t,e,n){for(var r=Ce(e),o=Dt.f,i=Tt.f,c=0;c<r.length;c++){var a=r[c];at(t,a)||n&&at(n,a)||o(t,a,i(e,a))}},ke=/#|\.prototype\./,Ae=function(t,e){var n=Ne[_e(t)];return n==Me||n!=Fe&&(A(e)?f(e):!!e)},_e=Ae.normalize=function(t){return String(t).replace(ke,".").toLowerCase()},Ne=Ae.data={},Fe=Ae.NATIVE="N",Me=Ae.POLYFILL="P",De=Ae,$e=Tt.f,Ue=function(t,e){var n,r,o,i,c,a=t.target,f=t.global,s=t.stat;if(n=f?u:s?u[a]||tt(a,{}):(u[a]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(c=$e(n,r))&&c.value:n[r],!De(f?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Re(i,o)}(t.sham||o&&o.sham)&&$t(i,"sham",!0),fe(n,r,i,t)}},We=S([].slice),Ge=Function,Be=S([].concat),Le=S([].join),ze={},Qe=function(t,e,n){if(!at(ze,e)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";ze[e]=Ge("C,a","return new C("+Le(r,",")+")")}return ze[e](t,n)},Ye=l?Ge.bind:function(t){var e=J(this),n=e.prototype,r=We(arguments,1),o=function(){var n=Be(r,We(arguments));return this instanceof o?Qe(e,n.length,n):e.apply(t,n)};return _(n)&&(o.prototype=n),o};Ue({target:"Function",proto:!0,forced:Function.bind!==Ye},{bind:Ye});var Xe=we.indexOf,He=S([].indexOf),Ke=!!He&&1/He([1],1,-0)<0,Je=function(t,e){var n=[][t];return!!n&&f((function(){n.call(null,e||function(){return 1},1)}))}("indexOf");Ue({target:"Array",proto:!0,forced:Ke||!Je},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Ke?He(this,t,e)||0:Xe(this,t,e)}});var Ve={};Ve[gt("toStringTag")]="z";var qe="[object z]"===String(Ve),Ze=gt("toStringTag"),tn=Object,en="Arguments"==E(function(){return arguments}()),nn=qe?E:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=tn(t),Ze))?n:en?E(e):"Object"==(r=E(e))&&A(e.callee)?"Arguments":r},rn=qe?{}.toString:function(){return"[object "+nn(this)+"]"};qe||fe(Object.prototype,"toString",rn,{unsafe:!0});var on="process"==E(u.process),cn=String,an=TypeError,un=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=S(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Rt(n),function(t){if("object"==typeof t||A(t))return t;throw an("Can't set "+cn(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),fn=Dt.f,sn=gt("toStringTag"),ln=gt("species"),pn=TypeError,vn=function(){},dn=[],hn=F("Reflect","construct"),gn=/^\s*(?:class|function)\b/,yn=S(gn.exec),bn=!gn.exec(vn),mn=function(t){if(!A(t))return!1;try{return hn(vn,dn,t),!0}catch(t){return!1}},wn=function(t){if(!A(t))return!1;switch(nn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return bn||!!yn(gn,Xt(t))}catch(t){return!0}};wn.sham=!0;var On,Sn,xn,jn,En=!hn||f((function(){var t;return mn(mn.call)||!mn(Object)||!mn((function(){t=!0}))||t}))?wn:mn,Tn=TypeError,In=gt("species"),Pn=function(t,e){var n,r=Rt(t).constructor;return void 0===r||null==(n=Rt(r)[In])?e:function(t){if(En(t))return t;throw Tn(H(t)+" is not a constructor")}(n)},Cn=Function.prototype,Rn=Cn.apply,kn=Cn.call,An="object"==typeof Reflect&&Reflect.apply||(l?kn.bind(Rn):function(){return kn.apply(Rn,arguments)}),_n=S(S.bind),Nn=function(t,e){return J(t),void 0===e?t:l?_n(t,e):function(){return t.apply(e,arguments)}},Fn=F("document","documentElement"),Mn=TypeError,Dn=function(t,e){if(t<e)throw Mn("Not enough arguments");return t},$n=/(?:ipad|iphone|ipod).*applewebkit/i.test(D),Un=u.setImmediate,Wn=u.clearImmediate,Gn=u.process,Bn=u.Dispatch,Ln=u.Function,zn=u.MessageChannel,Qn=u.String,Yn=0,Xn={},Hn="onreadystatechange";try{On=u.location}catch(t){}var Kn=function(t){if(at(Xn,t)){var e=Xn[t];delete Xn[t],e()}},Jn=function(t){return function(){Kn(t)}},Vn=function(t){Kn(t.data)},qn=function(t){u.postMessage(Qn(t),On.protocol+"//"+On.host)};Un&&Wn||(Un=function(t){Dn(arguments.length,1);var e=A(t)?t:Ln(t),n=We(arguments,1);return Xn[++Yn]=function(){An(e,void 0,n)},Sn(Yn),Yn},Wn=function(t){delete Xn[t]},on?Sn=function(t){Gn.nextTick(Jn(t))}:Bn&&Bn.now?Sn=function(t){Bn.now(Jn(t))}:zn&&!$n?(jn=(xn=new zn).port2,xn.port1.onmessage=Vn,Sn=Nn(jn.postMessage,jn)):u.addEventListener&&A(u.postMessage)&&!u.importScripts&&On&&"file:"!==On.protocol&&!f(qn)?(Sn=qn,u.addEventListener("message",Vn,!1)):Sn=Hn in xt("script")?function(t){Fn.appendChild(xt("script")).onreadystatechange=function(){Fn.removeChild(this),Kn(t)}}:function(t){setTimeout(Jn(t),0)});var Zn,tr,er,nr,rr,or,ir,cr,ar={set:Un,clear:Wn},ur=/ipad|iphone|ipod/i.test(D)&&void 0!==u.Pebble,fr=/web0s(?!.*chrome)/i.test(D),sr=Tt.f,lr=ar.set,pr=u.MutationObserver||u.WebKitMutationObserver,vr=u.document,dr=u.process,hr=u.Promise,gr=sr(u,"queueMicrotask"),yr=gr&&gr.value;yr||(Zn=function(){var t,e;for(on&&(t=dr.domain)&&t.exit();tr;){e=tr.fn,tr=tr.next;try{e()}catch(t){throw tr?nr():er=void 0,t}}er=void 0,t&&t.enter()},$n||on||fr||!pr||!vr?!ur&&hr&&hr.resolve?((ir=hr.resolve(void 0)).constructor=hr,cr=Nn(ir.then,ir),nr=function(){cr(Zn)}):on?nr=function(){dr.nextTick(Zn)}:(lr=Nn(lr,u),nr=function(){lr(Zn)}):(rr=!0,or=vr.createTextNode(""),new pr(Zn).observe(or,{characterData:!0}),nr=function(){or.data=rr=!rr}));var br=yr||function(t){var e={fn:t,next:void 0};er&&(er.next=e),tr||(tr=e,nr()),er=e},mr=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},wr=function(){this.head=null,this.tail=null};wr.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}};var Or=wr,Sr=u.Promise,xr="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,jr=!xr&&!on&&"object"==typeof window&&"object"==typeof document;Sr&&Sr.prototype;var Er,Tr,Ir,Pr,Cr,Rr,kr=gt("species"),Ar=!1,_r=A(u.PromiseRejectionEvent),Nr=De("Promise",(function(){var t=Xt(Sr),e=t!==String(Sr);if(!e&&66===B)return!0;if(!B||B<51||!/native code/.test(t)){var n=new Sr((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[kr]=r,!(Ar=n.then((function(){}))instanceof r))return!0}return!e&&(jr||xr)&&!_r})),Fr={CONSTRUCTOR:Nr,REJECTION_EVENT:_r,SUBCLASSING:Ar},Mr=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=J(e),this.reject=J(n)},Dr={f:function(t){return new Mr(t)}},$r=ar.set,Ur="Promise",Wr=Fr.CONSTRUCTOR,Gr=Fr.REJECTION_EVENT,Br=Fr.SUBCLASSING,Lr=ae.getterFor(Ur),zr=ae.set,Qr=Sr&&Sr.prototype,Yr=Sr,Xr=Qr,Hr=u.TypeError,Kr=u.document,Jr=u.process,Vr=Dr.f,qr=Vr,Zr=!!(Kr&&Kr.createEvent&&u.dispatchEvent),to="unhandledrejection",eo=function(t){var e;return!(!_(t)||!A(e=t.then))&&e},no=function(t,e){var n,r,o,i=e.value,c=1==e.state,a=c?t.ok:t.fail,u=t.resolve,f=t.reject,s=t.domain;try{a?(c||(2===e.rejection&&ao(e),e.rejection=1),!0===a?n=i:(s&&s.enter(),n=a(i),s&&(s.exit(),o=!0)),n===t.promise?f(Hr("Promise-chain cycle")):(r=eo(n))?v(r,n,u,f):u(n)):f(i)}catch(t){s&&!o&&s.exit(),f(t)}},ro=function(t,e){t.notified||(t.notified=!0,br((function(){for(var n,r=t.reactions;n=r.get();)no(n,t);t.notified=!1,e&&!t.rejection&&io(t)})))},oo=function(t,e,n){var r,o;Zr?((r=Kr.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},!Gr&&(o=u["on"+t])?o(r):t===to&&function(t,e){var n=u.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},io=function(t){v($r,u,(function(){var e,n=t.facade,r=t.value;if(co(t)&&(e=mr((function(){on?Jr.emit("unhandledRejection",r,n):oo(to,n,r)})),t.rejection=on||co(t)?2:1,e.error))throw e.value}))},co=function(t){return 1!==t.rejection&&!t.parent},ao=function(t){v($r,u,(function(){var e=t.facade;on?Jr.emit("rejectionHandled",e):oo("rejectionhandled",e,t.value)}))},uo=function(t,e,n){return function(r){t(e,r,n)}},fo=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,ro(t,!0))},so=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Hr("Promise can't be resolved itself");var r=eo(e);r?br((function(){var n={done:!1};try{v(r,e,uo(so,n,t),uo(fo,n,t))}catch(e){fo(n,e,t)}})):(t.value=e,t.state=1,ro(t,!1))}catch(e){fo({done:!1},e,t)}}};if(Wr&&(Xr=(Yr=function(t){!function(t,e){if(M(e,t))return t;throw pn("Incorrect invocation")}(this,Xr),J(t),v(Er,this);var e=Lr(this);try{t(uo(so,e),uo(fo,e))}catch(t){fo(e,t)}}).prototype,(Er=function(t){zr(this,{type:Ur,done:!1,notified:!1,parent:!1,reactions:new Or,rejection:!1,state:0,value:void 0})}).prototype=fe(Xr,"then",(function(t,e){var n=Lr(this),r=Vr(Pn(this,Yr));return n.parent=!0,r.ok=!A(t)||t,r.fail=A(e)&&e,r.domain=on?Jr.domain:void 0,0==n.state?n.reactions.add(r):br((function(){no(r,n)})),r.promise})),Tr=function(){var t=new Er,e=Lr(t);this.promise=t,this.resolve=uo(so,e),this.reject=uo(fo,e)},Dr.f=Vr=function(t){return t===Yr||undefined===t?new Tr(t):qr(t)},A(Sr)&&Qr!==Object.prototype)){Ir=Qr.then,Br||fe(Qr,"then",(function(t,e){var n=this;return new Yr((function(t,e){v(Ir,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Qr.constructor}catch(t){}un&&un(Qr,Xr)}Ue({global:!0,constructor:!0,wrap:!0,forced:Wr},{Promise:Yr}),Cr=Ur,Rr=!1,(Pr=Yr)&&!Rr&&(Pr=Pr.prototype),Pr&&!at(Pr,sn)&&fn(Pr,sn,{configurable:!0,value:Cr}),function(t){var e=F(t),n=Dt.f;s&&e&&!e[ln]&&n(e,ln,{configurable:!0,get:function(){return this}})}(Ur);var lo={},po=gt("iterator"),vo=Array.prototype,ho=gt("iterator"),go=function(t){if(null!=t)return V(t,ho)||V(t,"@@iterator")||lo[nn(t)]},yo=TypeError,bo=function(t,e,n){var r,o;Rt(t);try{if(!(r=V(t,"return"))){if("throw"===e)throw n;return n}r=v(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Rt(r),n},mo=TypeError,wo=function(t,e){this.stopped=t,this.result=e},Oo=wo.prototype,So=function(t,e,n){var r,o,i,c,a,u,f,s,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),g=!(!n||!n.INTERRUPTED),y=Nn(e,l),b=function(t){return r&&bo(r,"normal",t),new wo(!0,t)},m=function(t){return p?(Rt(t),g?y(t[0],t[1],b):y(t[0],t[1])):g?y(t,b):y(t)};if(d)r=t.iterator;else if(h)r=t;else{if(!(o=go(t)))throw mo(H(t)+" is not iterable");if(void 0!==(s=o)&&(lo.Array===s||vo[po]===s)){for(i=0,c=be(t);c>i;i++)if((a=m(t[i]))&&M(Oo,a))return a;return new wo(!1)}r=function(t,e){var n=arguments.length<2?go(t):e;if(J(n))return Rt(v(n,t));throw yo(H(t)+" is not iterable")}(t,o)}for(u=d?t.next:r.next;!(f=v(u,r)).done;){try{a=m(f.value)}catch(t){bo(r,"throw",t)}if("object"==typeof a&&a&&M(Oo,a))return a}return new wo(!1)},xo=gt("iterator"),jo=!1;try{var Eo=0,To={next:function(){return{done:!!Eo++}},return:function(){jo=!0}};To[xo]=function(){return this},Array.from(To,(function(){throw 2}))}catch(t){}var Io=Fr.CONSTRUCTOR||!function(t,e){if(!e&&!jo)return!1;var n=!1;try{var r={};r[xo]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){Sr.all(t).then(void 0,(function(){}))}));Ue({target:"Promise",stat:!0,forced:Io},{all:function(t){var e=this,n=Dr.f(e),r=n.resolve,o=n.reject,i=mr((function(){var n=J(e.resolve),i=[],c=0,a=1;So(t,(function(t){var u=c++,f=!1;a++,v(n,e,t).then((function(t){f||(f=!0,i[u]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise}});var Po=Fr.CONSTRUCTOR,Co=Sr&&Sr.prototype;if(Ue({target:"Promise",proto:!0,forced:Po,real:!0},{catch:function(t){return this.then(void 0,t)}}),A(Sr)){var Ro=F("Promise").prototype.catch;Co.catch!==Ro&&fe(Co,"catch",Ro,{unsafe:!0})}Ue({target:"Promise",stat:!0,forced:Io},{race:function(t){var e=this,n=Dr.f(e),r=n.reject,o=mr((function(){var o=J(e.resolve);So(t,(function(t){v(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),Ue({target:"Promise",stat:!0,forced:Fr.CONSTRUCTOR},{reject:function(t){var e=Dr.f(this);return v(e.reject,void 0,t),e.promise}});var ko=Fr.CONSTRUCTOR;F("Promise"),Ue({target:"Promise",stat:!0,forced:ko},{resolve:function(t){return function(t,e){if(Rt(t),_(e)&&e.constructor===t)return e;var n=Dr.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var Ao,_o=String,No=function(t){if("Symbol"===nn(t))throw TypeError("Cannot convert a Symbol value to a string");return _o(t)},Fo=function(){var t=Rt(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Mo=u.RegExp,Do=f((function(){var t=Mo("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),$o=Do||f((function(){return!Mo("a","y").sticky})),Uo={BROKEN_CARET:Do||f((function(){var t=Mo("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:$o,UNSUPPORTED_Y:Do},Wo=Object.keys||function(t){return xe(t,je)},Go=s&&!It?Object.defineProperties:function(t,e){Rt(t);for(var n,r=k(e),o=Wo(e),i=o.length,c=0;i>c;)Dt.f(t,n=o[c++],r[n]);return t},Bo={f:Go},Lo=Vt("IE_PROTO"),zo=function(){},Qo=function(t){return"<script>"+t+"</"+"script>"},Yo=function(t){t.write(Qo("")),t.close();var e=t.parentWindow.Object;return t=null,e},Xo=function(){try{Ao=new ActiveXObject("htmlfile")}catch(t){}var t,e;Xo="undefined"!=typeof document?document.domain&&Ao?Yo(Ao):((e=xt("iframe")).style.display="none",Fn.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Qo("document.F=Object")),t.close(),t.F):Yo(Ao);for(var n=je.length;n--;)delete Xo.prototype[je[n]];return Xo()};qt[Lo]=!0;var Ho,Ko,Jo=Object.create||function(t,e){var n;return null!==t?(zo.prototype=Rt(t),n=new zo,zo.prototype=null,n[Lo]=t):n=Xo(),void 0===e?n:Bo.f(n,e)},Vo=u.RegExp,qo=f((function(){var t=Vo(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Zo=u.RegExp,ti=f((function(){var t=Zo("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),ei=ae.get,ni=rt("native-string-replace",String.prototype.replace),ri=RegExp.prototype.exec,oi=ri,ii=S("".charAt),ci=S("".indexOf),ai=S("".replace),ui=S("".slice),fi=(Ko=/b*/g,v(ri,Ho=/a/,"a"),v(ri,Ko,"a"),0!==Ho.lastIndex||0!==Ko.lastIndex),si=Uo.BROKEN_CARET,li=void 0!==/()??/.exec("")[1];(fi||li||si||qo||ti)&&(oi=function(t){var e,n,r,o,i,c,a,u=this,f=ei(u),s=No(t),l=f.raw;if(l)return l.lastIndex=u.lastIndex,e=v(oi,l,s),u.lastIndex=l.lastIndex,e;var p=f.groups,d=si&&u.sticky,h=v(Fo,u),g=u.source,y=0,b=s;if(d&&(h=ai(h,"y",""),-1===ci(h,"g")&&(h+="g"),b=ui(s,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==ii(s,u.lastIndex-1))&&(g="(?: "+g+")",b=" "+b,y++),n=new RegExp("^(?:"+g+")",h)),li&&(n=new RegExp("^"+g+"$(?!\\s)",h)),fi&&(r=u.lastIndex),o=v(ri,d?n:u,b),d?o?(o.input=ui(o.input,y),o[0]=ui(o[0],y),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:fi&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),li&&o&&o.length>1&&v(ni,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=c=Jo(null),i=0;i<p.length;i++)c[(a=p[i])[0]]=o[a[1]];return o});var pi=oi;Ue({target:"RegExp",proto:!0,forced:/./.exec!==pi},{exec:pi});var vi=gt("species"),di=RegExp.prototype,hi=S("".charAt),gi=S("".charCodeAt),yi=S("".slice),bi=function(t){return function(e,n){var r,o,i=No(R(e)),c=ve(n),a=i.length;return c<0||c>=a?t?"":void 0:(r=gi(i,c))<55296||r>56319||c+1===a||(o=gi(i,c+1))<56320||o>57343?t?hi(i,c):r:t?yi(i,c,c+2):o-56320+(r-55296<<10)+65536}},mi={codeAt:bi(!1),charAt:bi(!0)}.charAt,wi=function(t,e,n){return e+(n?mi(t,e).length:1)},Oi=Math.floor,Si=S("".charAt),xi=S("".replace),ji=S("".slice),Ei=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ti=/\$([$&'`]|\d{1,2})/g,Ii=function(t,e,n,r,o,i){var c=n+t.length,a=r.length,u=Ti;return void 0!==o&&(o=it(o),u=Ei),xi(i,u,(function(i,u){var f;switch(Si(u,0)){case"$":return"$";case"&":return t;case"`":return ji(e,0,n);case"'":return ji(e,c);case"<":f=o[ji(u,1,-1)];break;default:var s=+u;if(0===s)return i;if(s>a){var l=Oi(s/10);return 0===l?i:l<=a?void 0===r[l-1]?Si(u,1):r[l-1]+Si(u,1):i}f=r[s-1]}return void 0===f?"":f}))},Pi=TypeError,Ci=function(t,e){var n=t.exec;if(A(n)){var r=v(n,t,e);return null!==r&&Rt(r),r}if("RegExp"===E(t))return v(pi,t,e);throw Pi("RegExp#exec called on incompatible receiver")},Ri=gt("replace"),ki=Math.max,Ai=Math.min,_i=S([].concat),Ni=S([].push),Fi=S("".indexOf),Mi=S("".slice),Di="$0"==="a".replace(/./,"$0"),$i=!!/./[Ri]&&""===/./[Ri]("a","$0");!function(t,e,n,r){var o=gt(t),i=!f((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),c=i&&!f((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[vi]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!c||n){var a=S(/./[o]),u=e(o,""[t],(function(t,e,n,r,o){var c=S(t),u=e.exec;return u===pi||u===di.exec?i&&!o?{done:!0,value:a(e,n,r)}:{done:!0,value:c(n,e,r)}:{done:!1}}));fe(String.prototype,t,u[0]),fe(di,o,u[1])}r&&$t(di[o],"sham",!0)}("replace",(function(t,e,n){var r=$i?"$":"$0";return[function(t,n){var r=R(this),o=null==t?void 0:V(t,Ri);return o?v(o,t,r,n):v(e,No(r),t,n)},function(t,o){var i=Rt(this),c=No(t);if("string"==typeof o&&-1===Fi(o,r)&&-1===Fi(o,"$<")){var a=n(e,i,c,o);if(a.done)return a.value}var u=A(o);u||(o=No(o));var f=i.global;if(f){var s=i.unicode;i.lastIndex=0}for(var l=[];;){var p=Ci(i,c);if(null===p)break;if(Ni(l,p),!f)break;""===No(p[0])&&(i.lastIndex=wi(c,ye(i.lastIndex),s))}for(var v,d="",h=0,g=0;g<l.length;g++){for(var y=No((p=l[g])[0]),b=ki(Ai(ve(p.index),c.length),0),m=[],w=1;w<p.length;w++)Ni(m,void 0===(v=p[w])?v:String(v));var O=p.groups;if(u){var S=_i([y],m,b,c);void 0!==O&&Ni(S,O);var x=No(An(o,void 0,S))}else x=Ii(y,c,b,m,O,o);b>=h&&(d+=Mi(c,h,b)+x,h=b+y.length)}return d+Mi(c,h)}]}),!!f((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Di||$i);var Ui=/MSIE .\./.test(D),Wi=u.Function,Gi=function(t){return Ui?function(e,n){var r=Dn(arguments.length,1)>2,o=A(e)?e:Wi(e),i=r?We(arguments,2):void 0;return t(r?function(){An(o,this,i)}:o,n)}:t},Bi={setTimeout:Gi(u.setTimeout),setInterval:Gi(u.setInterval)},Li=Bi.setInterval;Ue({global:!0,bind:!0,forced:u.setInterval!==Li},{setInterval:Li});var zi=Bi.setTimeout;Ue({global:!0,bind:!0,forced:u.setTimeout!==zi},{setTimeout:zi});var Qi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,n=document.createElement("div"),r=document.getElementById("toast-temporary");r?r.innerText=t:(n.style="position:fixed;z-index:2000;left:50%;top:45%;transition:all .5s;font-size: 16px;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);text-align:center;border-radius:5px;color:#FFF;background:rgba(17,17,17,0.7);line-height:1.75;padding:8px 15px;",n.id="toast-temporary",n.innerText=t,document.body.appendChild(n),setTimeout((function(){document.body.removeChild(n)}),e))},Yi=function(){function r(){var t=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e(this,"webSocket",null),e(this,"messageHandlerQueue",[]),r.instance)return r.instance;r.CheckEnvironment()?(r.instance=this,this.webSocket=new WebSocket("ws://127.0.0.1:2828"),this.webSocket.onmessage=this.handleMessage,this.webSocket.onerror=function(){return n(this,t),Qi("socket连接错误")}.bind(this)):Qi("当前浏览器不支持电子签名,请更换Chrome(谷歌)浏览器")}var o,i,c;return o=r,i=[{key:"CheckEnvironment",value:function(){return navigator.userAgent.indexOf("Chrome")>-1}},{key:"start",value:function(){var t=this;return this.webSocket?new Promise(function(e,r){n(this,t),this.messageHandlerQueue.push({resolve:e,reject:r}),this.webSocket.send("GWQ_DeviceOnline()")}.bind(this)):Promise.reject("webSocket初始化失败")}},{key:"handleMessage",value:function(t){var e=(t||{}).data;if(e)if(e.indexOf("BeginGWQ_DeviceOnline")>=0){var n=e.replace("BeginGWQ_DeviceOnline","").replace("EndGWQ_DeviceOnline","");if(0==n)this.webSocket.send("GWQ_SetPenWidth(10)"),this.webSocket.send("DoGWQ_StartSign2('','',0.1.0.50,请签名,0)");else if(-3==n){var r=this.messageHandlerQueue.shift();if(!r)return;r.resolve;var o="手写板连接失败,请检查设备连接";(0,r.reject)({msg:o}),Qi(o)}}else if(e.indexOf("BeginAfterSign")>=0){var i=this.messageHandlerQueue.shift();if(!i)return;var c=i.resolve,a=i.reject,u=e.replace("BeginAfterSign","").replace("EndAfterSign",""),f=JSON.parse(u),s=f.signImage,l=f.fingerImage;if(s||l){var p="data:image/jpeg;base64,";c({signImage:s?p+s:"",fingerImage:l?p+l:""})}else{var v="签名已取消";a({msg:v}),Qi(v)}}}}],c=[{key:"create",value:function(){return new r}}],i&&t(o.prototype,i),c&&t(o,c),Object.defineProperty(o,"prototype",{writable:!1}),r}();return e(Yi,"instance",null),Yi}();
var Signature=function(){"use strict";function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i,c,a=function(t){return t&&t.Math==Math&&t},u=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof r&&r)||function(){return this}()||Function("return this")(),f=function(t){try{return!!t()}catch(t){return!0}},s=!f((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!f((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),p=Function.prototype.call,v=l?p.bind(p):function(){return p.apply(p,arguments)},d={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,g={f:h&&!d.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:d},y=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},b=Function.prototype,m=b.bind,w=b.call,O=l&&m.bind(w,w),S=l?function(t){return t&&O(t)}:function(t){return t&&function(){return w.apply(t,arguments)}},x=S({}.toString),j=S("".slice),E=function(t){return j(x(t),8,-1)},T=Object,I=S("".split),P=f((function(){return!T("z").propertyIsEnumerable(0)}))?function(t){return"String"==E(t)?I(t,""):T(t)}:T,C=TypeError,R=function(t){if(null==t)throw C("Can't call method on "+t);return t},k=function(t){return P(R(t))},_=function(t){return"function"==typeof t},A=function(t){return"object"==typeof t?null!==t:_(t)},N=function(t){return _(t)?t:void 0},F=function(t,e){return arguments.length<2?N(u[t]):u[t]&&u[t][e]},M=S({}.isPrototypeOf),D=F("navigator","userAgent")||"",$=u.process,U=u.Deno,W=$&&$.versions||U&&U.version,G=W&&W.v8;G&&(c=(i=G.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!c&&D&&(!(i=D.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=D.match(/Chrome\/(\d+)/))&&(c=+i[1]);var B=c,L=!!Object.getOwnPropertySymbols&&!f((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&B&&B<41})),z=L&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Q=Object,Y=z?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return _(e)&&M(e.prototype,Q(t))},X=String,H=function(t){try{return X(t)}catch(t){return"Object"}},K=TypeError,J=function(t){if(_(t))return t;throw K(H(t)+" is not a function")},V=function(t,e){var n=t[e];return null==n?void 0:J(n)},q=TypeError,Z=Object.defineProperty,tt=function(t,e){try{Z(u,t,{value:e,configurable:!0,writable:!0})}catch(n){u[t]=e}return e},et="__core-js_shared__",nt=u[et]||tt(et,{}),rt=o((function(t){(t.exports=function(t,e){return nt[t]||(nt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),ot=Object,it=function(t){return ot(R(t))},ct=S({}.hasOwnProperty),at=Object.hasOwn||function(t,e){return ct(it(t),e)},ut=0,ft=Math.random(),st=S(1..toString),lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+st(++ut+ft,36)},pt=rt("wks"),vt=u.Symbol,dt=vt&&vt.for,ht=z?vt:vt&&vt.withoutSetter||lt,gt=function(t){if(!at(pt,t)||!L&&"string"!=typeof pt[t]){var e="Symbol."+t;L&&at(vt,t)?pt[t]=vt[t]:pt[t]=z&&dt?dt(e):ht(e)}return pt[t]},yt=TypeError,bt=gt("toPrimitive"),mt=function(t,e){if(!A(t)||Y(t))return t;var n,r=V(t,bt);if(r){if(void 0===e&&(e="default"),n=v(r,t,e),!A(n)||Y(n))return n;throw yt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&_(n=t.toString)&&!A(r=v(n,t)))return r;if(_(n=t.valueOf)&&!A(r=v(n,t)))return r;if("string"!==e&&_(n=t.toString)&&!A(r=v(n,t)))return r;throw q("Can't convert object to primitive value")}(t,e)},wt=function(t){var e=mt(t,"string");return Y(e)?e:e+""},Ot=u.document,St=A(Ot)&&A(Ot.createElement),xt=function(t){return St?Ot.createElement(t):{}},jt=!s&&!f((function(){return 7!=Object.defineProperty(xt("div"),"a",{get:function(){return 7}}).a})),Et=Object.getOwnPropertyDescriptor,Tt={f:s?Et:function(t,e){if(t=k(t),e=wt(e),jt)try{return Et(t,e)}catch(t){}if(at(t,e))return y(!v(g.f,t,e),t[e])}},It=s&&f((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pt=String,Ct=TypeError,Rt=function(t){if(A(t))return t;throw Ct(Pt(t)+" is not an object")},kt=TypeError,_t=Object.defineProperty,At=Object.getOwnPropertyDescriptor,Nt="enumerable",Ft="configurable",Mt="writable",Dt={f:s?It?function(t,e,n){if(Rt(t),e=wt(e),Rt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Mt in n&&!n.writable){var r=At(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:Ft in n?n.configurable:r.configurable,enumerable:Nt in n?n.enumerable:r.enumerable,writable:!1})}return _t(t,e,n)}:_t:function(t,e,n){if(Rt(t),e=wt(e),Rt(n),jt)try{return _t(t,e,n)}catch(t){}if("get"in n||"set"in n)throw kt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},$t=s?function(t,e,n){return Dt.f(t,e,y(1,n))}:function(t,e,n){return t[e]=n,t},Ut=Function.prototype,Wt=s&&Object.getOwnPropertyDescriptor,Gt=at(Ut,"name"),Bt={EXISTS:Gt,PROPER:Gt&&"something"===function(){}.name,CONFIGURABLE:Gt&&(!s||s&&Wt(Ut,"name").configurable)},Lt=S(Function.toString);_(nt.inspectSource)||(nt.inspectSource=function(t){return Lt(t)});var zt,Qt,Yt,Xt=nt.inspectSource,Ht=u.WeakMap,Kt=_(Ht)&&/native code/.test(Xt(Ht)),Jt=rt("keys"),Vt=function(t){return Jt[t]||(Jt[t]=lt(t))},qt={},Zt="Object already initialized",te=u.TypeError,ee=u.WeakMap;if(Kt||nt.state){var ne=nt.state||(nt.state=new ee),re=S(ne.get),oe=S(ne.has),ie=S(ne.set);zt=function(t,e){if(oe(ne,t))throw new te(Zt);return e.facade=t,ie(ne,t,e),e},Qt=function(t){return re(ne,t)||{}},Yt=function(t){return oe(ne,t)}}else{var ce=Vt("state");qt[ce]=!0,zt=function(t,e){if(at(t,ce))throw new te(Zt);return e.facade=t,$t(t,ce,e),e},Qt=function(t){return at(t,ce)?t[ce]:{}},Yt=function(t){return at(t,ce)}}var ae={set:zt,get:Qt,has:Yt,enforce:function(t){return Yt(t)?Qt(t):zt(t,{})},getterFor:function(t){return function(e){var n;if(!A(e)||(n=Qt(e)).type!==t)throw te("Incompatible receiver, "+t+" required");return n}}},ue=o((function(t){var e=Bt.CONFIGURABLE,n=ae.enforce,r=ae.get,o=Object.defineProperty,i=s&&!f((function(){return 8!==o((function(){}),"length",{value:8}).length})),c=String(String).split("String"),a=t.exports=function(t,r,a){"Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(r="get "+r),a&&a.setter&&(r="set "+r),(!at(t,"name")||e&&t.name!==r)&&(s?o(t,"name",{value:r,configurable:!0}):t.name=r),i&&a&&at(a,"arity")&&t.length!==a.arity&&o(t,"length",{value:a.arity});try{a&&at(a,"constructor")&&a.constructor?s&&o(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var u=n(t);return at(u,"source")||(u.source=c.join("string"==typeof r?r:"")),t};Function.prototype.toString=a((function(){return _(this)&&r(this).source||Xt(this)}),"toString")})),fe=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(_(n)&&ue(n,i,r),r.global)o?t[e]=n:tt(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Dt.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},se=Math.ceil,le=Math.floor,pe=Math.trunc||function(t){var e=+t;return(e>0?le:se)(e)},ve=function(t){var e=+t;return e!=e||0===e?0:pe(e)},de=Math.max,he=Math.min,ge=Math.min,ye=function(t){return t>0?ge(ve(t),9007199254740991):0},be=function(t){return ye(t.length)},me=function(t){return function(e,n,r){var o,i=k(e),c=be(i),a=function(t,e){var n=ve(t);return n<0?de(n+e,0):he(n,e)}(r,c);if(t&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},we={includes:me(!0),indexOf:me(!1)},Oe=we.indexOf,Se=S([].push),xe=function(t,e){var n,r=k(t),o=0,i=[];for(n in r)!at(qt,n)&&at(r,n)&&Se(i,n);for(;e.length>o;)at(r,n=e[o++])&&(~Oe(i,n)||Se(i,n));return i},je=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ee=je.concat("length","prototype"),Te={f:Object.getOwnPropertyNames||function(t){return xe(t,Ee)}},Ie={f:Object.getOwnPropertySymbols},Pe=S([].concat),Ce=F("Reflect","ownKeys")||function(t){var e=Te.f(Rt(t)),n=Ie.f;return n?Pe(e,n(t)):e},Re=function(t,e,n){for(var r=Ce(e),o=Dt.f,i=Tt.f,c=0;c<r.length;c++){var a=r[c];at(t,a)||n&&at(n,a)||o(t,a,i(e,a))}},ke=/#|\.prototype\./,_e=function(t,e){var n=Ne[Ae(t)];return n==Me||n!=Fe&&(_(e)?f(e):!!e)},Ae=_e.normalize=function(t){return String(t).replace(ke,".").toLowerCase()},Ne=_e.data={},Fe=_e.NATIVE="N",Me=_e.POLYFILL="P",De=_e,$e=Tt.f,Ue=function(t,e){var n,r,o,i,c,a=t.target,f=t.global,s=t.stat;if(n=f?u:s?u[a]||tt(a,{}):(u[a]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(c=$e(n,r))&&c.value:n[r],!De(f?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Re(i,o)}(t.sham||o&&o.sham)&&$t(i,"sham",!0),fe(n,r,i,t)}},We=S([].slice),Ge=Function,Be=S([].concat),Le=S([].join),ze={},Qe=function(t,e,n){if(!at(ze,e)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";ze[e]=Ge("C,a","return new C("+Le(r,",")+")")}return ze[e](t,n)},Ye=l?Ge.bind:function(t){var e=J(this),n=e.prototype,r=We(arguments,1),o=function(){var n=Be(r,We(arguments));return this instanceof o?Qe(e,n.length,n):e.apply(t,n)};return A(n)&&(o.prototype=n),o};Ue({target:"Function",proto:!0,forced:Function.bind!==Ye},{bind:Ye});var Xe={};Xe[gt("toStringTag")]="z";var He="[object z]"===String(Xe),Ke=gt("toStringTag"),Je=Object,Ve="Arguments"==E(function(){return arguments}()),qe=He?E:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Je(t),Ke))?n:Ve?E(e):"Object"==(r=E(e))&&_(e.callee)?"Arguments":r},Ze=He?{}.toString:function(){return"[object "+qe(this)+"]"};He||fe(Object.prototype,"toString",Ze,{unsafe:!0});var tn="process"==E(u.process),en=String,nn=TypeError,rn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=S(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Rt(n),function(t){if("object"==typeof t||_(t))return t;throw nn("Can't set "+en(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),on=Dt.f,cn=gt("toStringTag"),an=gt("species"),un=TypeError,fn=function(){},sn=[],ln=F("Reflect","construct"),pn=/^\s*(?:class|function)\b/,vn=S(pn.exec),dn=!pn.exec(fn),hn=function(t){if(!_(t))return!1;try{return ln(fn,sn,t),!0}catch(t){return!1}},gn=function(t){if(!_(t))return!1;switch(qe(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return dn||!!vn(pn,Xt(t))}catch(t){return!0}};gn.sham=!0;var yn,bn,mn,wn,On=!ln||f((function(){var t;return hn(hn.call)||!hn(Object)||!hn((function(){t=!0}))||t}))?gn:hn,Sn=TypeError,xn=gt("species"),jn=function(t,e){var n,r=Rt(t).constructor;return void 0===r||null==(n=Rt(r)[xn])?e:function(t){if(On(t))return t;throw Sn(H(t)+" is not a constructor")}(n)},En=Function.prototype,Tn=En.apply,In=En.call,Pn="object"==typeof Reflect&&Reflect.apply||(l?In.bind(Tn):function(){return In.apply(Tn,arguments)}),Cn=S(S.bind),Rn=function(t,e){return J(t),void 0===e?t:l?Cn(t,e):function(){return t.apply(e,arguments)}},kn=F("document","documentElement"),_n=TypeError,An=function(t,e){if(t<e)throw _n("Not enough arguments");return t},Nn=/(?:ipad|iphone|ipod).*applewebkit/i.test(D),Fn=u.setImmediate,Mn=u.clearImmediate,Dn=u.process,$n=u.Dispatch,Un=u.Function,Wn=u.MessageChannel,Gn=u.String,Bn=0,Ln={},zn="onreadystatechange";try{yn=u.location}catch(t){}var Qn=function(t){if(at(Ln,t)){var e=Ln[t];delete Ln[t],e()}},Yn=function(t){return function(){Qn(t)}},Xn=function(t){Qn(t.data)},Hn=function(t){u.postMessage(Gn(t),yn.protocol+"//"+yn.host)};Fn&&Mn||(Fn=function(t){An(arguments.length,1);var e=_(t)?t:Un(t),n=We(arguments,1);return Ln[++Bn]=function(){Pn(e,void 0,n)},bn(Bn),Bn},Mn=function(t){delete Ln[t]},tn?bn=function(t){Dn.nextTick(Yn(t))}:$n&&$n.now?bn=function(t){$n.now(Yn(t))}:Wn&&!Nn?(wn=(mn=new Wn).port2,mn.port1.onmessage=Xn,bn=Rn(wn.postMessage,wn)):u.addEventListener&&_(u.postMessage)&&!u.importScripts&&yn&&"file:"!==yn.protocol&&!f(Hn)?(bn=Hn,u.addEventListener("message",Xn,!1)):bn=zn in xt("script")?function(t){kn.appendChild(xt("script")).onreadystatechange=function(){kn.removeChild(this),Qn(t)}}:function(t){setTimeout(Yn(t),0)});var Kn,Jn,Vn,qn,Zn,tr,er,nr,rr={set:Fn,clear:Mn},or=/ipad|iphone|ipod/i.test(D)&&void 0!==u.Pebble,ir=/web0s(?!.*chrome)/i.test(D),cr=Tt.f,ar=rr.set,ur=u.MutationObserver||u.WebKitMutationObserver,fr=u.document,sr=u.process,lr=u.Promise,pr=cr(u,"queueMicrotask"),vr=pr&&pr.value;vr||(Kn=function(){var t,e;for(tn&&(t=sr.domain)&&t.exit();Jn;){e=Jn.fn,Jn=Jn.next;try{e()}catch(t){throw Jn?qn():Vn=void 0,t}}Vn=void 0,t&&t.enter()},Nn||tn||ir||!ur||!fr?!or&&lr&&lr.resolve?((er=lr.resolve(void 0)).constructor=lr,nr=Rn(er.then,er),qn=function(){nr(Kn)}):tn?qn=function(){sr.nextTick(Kn)}:(ar=Rn(ar,u),qn=function(){ar(Kn)}):(Zn=!0,tr=fr.createTextNode(""),new ur(Kn).observe(tr,{characterData:!0}),qn=function(){tr.data=Zn=!Zn}));var dr=vr||function(t){var e={fn:t,next:void 0};Vn&&(Vn.next=e),Jn||(Jn=e,qn()),Vn=e},hr=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},gr=function(){this.head=null,this.tail=null};gr.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}};var yr=gr,br=u.Promise,mr="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,wr=!mr&&!tn&&"object"==typeof window&&"object"==typeof document;br&&br.prototype;var Or,Sr,xr,jr,Er,Tr,Ir=gt("species"),Pr=!1,Cr=_(u.PromiseRejectionEvent),Rr=De("Promise",(function(){var t=Xt(br),e=t!==String(br);if(!e&&66===B)return!0;if(!B||B<51||!/native code/.test(t)){var n=new br((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Ir]=r,!(Pr=n.then((function(){}))instanceof r))return!0}return!e&&(wr||mr)&&!Cr})),kr={CONSTRUCTOR:Rr,REJECTION_EVENT:Cr,SUBCLASSING:Pr},_r=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=J(e),this.reject=J(n)},Ar={f:function(t){return new _r(t)}},Nr=rr.set,Fr="Promise",Mr=kr.CONSTRUCTOR,Dr=kr.REJECTION_EVENT,$r=kr.SUBCLASSING,Ur=ae.getterFor(Fr),Wr=ae.set,Gr=br&&br.prototype,Br=br,Lr=Gr,zr=u.TypeError,Qr=u.document,Yr=u.process,Xr=Ar.f,Hr=Xr,Kr=!!(Qr&&Qr.createEvent&&u.dispatchEvent),Jr="unhandledrejection",Vr=function(t){var e;return!(!A(t)||!_(e=t.then))&&e},qr=function(t,e){var n,r,o,i=e.value,c=1==e.state,a=c?t.ok:t.fail,u=t.resolve,f=t.reject,s=t.domain;try{a?(c||(2===e.rejection&&ro(e),e.rejection=1),!0===a?n=i:(s&&s.enter(),n=a(i),s&&(s.exit(),o=!0)),n===t.promise?f(zr("Promise-chain cycle")):(r=Vr(n))?v(r,n,u,f):u(n)):f(i)}catch(t){s&&!o&&s.exit(),f(t)}},Zr=function(t,e){t.notified||(t.notified=!0,dr((function(){for(var n,r=t.reactions;n=r.get();)qr(n,t);t.notified=!1,e&&!t.rejection&&eo(t)})))},to=function(t,e,n){var r,o;Kr?((r=Qr.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),u.dispatchEvent(r)):r={promise:e,reason:n},!Dr&&(o=u["on"+t])?o(r):t===Jr&&function(t,e){var n=u.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},eo=function(t){v(Nr,u,(function(){var e,n=t.facade,r=t.value;if(no(t)&&(e=hr((function(){tn?Yr.emit("unhandledRejection",r,n):to(Jr,n,r)})),t.rejection=tn||no(t)?2:1,e.error))throw e.value}))},no=function(t){return 1!==t.rejection&&!t.parent},ro=function(t){v(Nr,u,(function(){var e=t.facade;tn?Yr.emit("rejectionHandled",e):to("rejectionhandled",e,t.value)}))},oo=function(t,e,n){return function(r){t(e,r,n)}},io=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Zr(t,!0))},co=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw zr("Promise can't be resolved itself");var r=Vr(e);r?dr((function(){var n={done:!1};try{v(r,e,oo(co,n,t),oo(io,n,t))}catch(e){io(n,e,t)}})):(t.value=e,t.state=1,Zr(t,!1))}catch(e){io({done:!1},e,t)}}};if(Mr&&(Lr=(Br=function(t){!function(t,e){if(M(e,t))return t;throw un("Incorrect invocation")}(this,Lr),J(t),v(Or,this);var e=Ur(this);try{t(oo(co,e),oo(io,e))}catch(t){io(e,t)}}).prototype,(Or=function(t){Wr(this,{type:Fr,done:!1,notified:!1,parent:!1,reactions:new yr,rejection:!1,state:0,value:void 0})}).prototype=fe(Lr,"then",(function(t,e){var n=Ur(this),r=Xr(jn(this,Br));return n.parent=!0,r.ok=!_(t)||t,r.fail=_(e)&&e,r.domain=tn?Yr.domain:void 0,0==n.state?n.reactions.add(r):dr((function(){qr(r,n)})),r.promise})),Sr=function(){var t=new Or,e=Ur(t);this.promise=t,this.resolve=oo(co,e),this.reject=oo(io,e)},Ar.f=Xr=function(t){return t===Br||undefined===t?new Sr(t):Hr(t)},_(br)&&Gr!==Object.prototype)){xr=Gr.then,$r||fe(Gr,"then",(function(t,e){var n=this;return new Br((function(t,e){v(xr,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Gr.constructor}catch(t){}rn&&rn(Gr,Lr)}Ue({global:!0,constructor:!0,wrap:!0,forced:Mr},{Promise:Br}),Er=Fr,Tr=!1,(jr=Br)&&!Tr&&(jr=jr.prototype),jr&&!at(jr,cn)&&on(jr,cn,{configurable:!0,value:Er}),function(t){var e=F(t),n=Dt.f;s&&e&&!e[an]&&n(e,an,{configurable:!0,get:function(){return this}})}(Fr);var ao={},uo=gt("iterator"),fo=Array.prototype,so=gt("iterator"),lo=function(t){if(null!=t)return V(t,so)||V(t,"@@iterator")||ao[qe(t)]},po=TypeError,vo=function(t,e,n){var r,o;Rt(t);try{if(!(r=V(t,"return"))){if("throw"===e)throw n;return n}r=v(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Rt(r),n},ho=TypeError,go=function(t,e){this.stopped=t,this.result=e},yo=go.prototype,bo=function(t,e,n){var r,o,i,c,a,u,f,s,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),g=!(!n||!n.INTERRUPTED),y=Rn(e,l),b=function(t){return r&&vo(r,"normal",t),new go(!0,t)},m=function(t){return p?(Rt(t),g?y(t[0],t[1],b):y(t[0],t[1])):g?y(t,b):y(t)};if(d)r=t.iterator;else if(h)r=t;else{if(!(o=lo(t)))throw ho(H(t)+" is not iterable");if(void 0!==(s=o)&&(ao.Array===s||fo[uo]===s)){for(i=0,c=be(t);c>i;i++)if((a=m(t[i]))&&M(yo,a))return a;return new go(!1)}r=function(t,e){var n=arguments.length<2?lo(t):e;if(J(n))return Rt(v(n,t));throw po(H(t)+" is not iterable")}(t,o)}for(u=d?t.next:r.next;!(f=v(u,r)).done;){try{a=m(f.value)}catch(t){vo(r,"throw",t)}if("object"==typeof a&&a&&M(yo,a))return a}return new go(!1)},mo=gt("iterator"),wo=!1;try{var Oo=0,So={next:function(){return{done:!!Oo++}},return:function(){wo=!0}};So[mo]=function(){return this},Array.from(So,(function(){throw 2}))}catch(t){}var xo=kr.CONSTRUCTOR||!function(t,e){if(!e&&!wo)return!1;var n=!1;try{var r={};r[mo]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){br.all(t).then(void 0,(function(){}))}));Ue({target:"Promise",stat:!0,forced:xo},{all:function(t){var e=this,n=Ar.f(e),r=n.resolve,o=n.reject,i=hr((function(){var n=J(e.resolve),i=[],c=0,a=1;bo(t,(function(t){var u=c++,f=!1;a++,v(n,e,t).then((function(t){f||(f=!0,i[u]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise}});var jo=kr.CONSTRUCTOR,Eo=br&&br.prototype;if(Ue({target:"Promise",proto:!0,forced:jo,real:!0},{catch:function(t){return this.then(void 0,t)}}),_(br)){var To=F("Promise").prototype.catch;Eo.catch!==To&&fe(Eo,"catch",To,{unsafe:!0})}Ue({target:"Promise",stat:!0,forced:xo},{race:function(t){var e=this,n=Ar.f(e),r=n.reject,o=hr((function(){var o=J(e.resolve);bo(t,(function(t){v(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),Ue({target:"Promise",stat:!0,forced:kr.CONSTRUCTOR},{reject:function(t){var e=Ar.f(this);return v(e.reject,void 0,t),e.promise}});var Io=kr.CONSTRUCTOR;F("Promise"),Ue({target:"Promise",stat:!0,forced:Io},{resolve:function(t){return function(t,e){if(Rt(t),A(e)&&e.constructor===t)return e;var n=Ar.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var Po=we.indexOf,Co=S([].indexOf),Ro=!!Co&&1/Co([1],1,-0)<0,ko=function(t,e){var n=[][t];return!!n&&f((function(){n.call(null,e||function(){return 1},1)}))}("indexOf");Ue({target:"Array",proto:!0,forced:Ro||!ko},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Ro?Co(this,t,e)||0:Po(this,t,e)}});var _o,Ao=String,No=function(t){if("Symbol"===qe(t))throw TypeError("Cannot convert a Symbol value to a string");return Ao(t)},Fo=function(){var t=Rt(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Mo=u.RegExp,Do=f((function(){var t=Mo("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),$o=Do||f((function(){return!Mo("a","y").sticky})),Uo={BROKEN_CARET:Do||f((function(){var t=Mo("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:$o,UNSUPPORTED_Y:Do},Wo=Object.keys||function(t){return xe(t,je)},Go=s&&!It?Object.defineProperties:function(t,e){Rt(t);for(var n,r=k(e),o=Wo(e),i=o.length,c=0;i>c;)Dt.f(t,n=o[c++],r[n]);return t},Bo={f:Go},Lo=Vt("IE_PROTO"),zo=function(){},Qo=function(t){return"<script>"+t+"</"+"script>"},Yo=function(t){t.write(Qo("")),t.close();var e=t.parentWindow.Object;return t=null,e},Xo=function(){try{_o=new ActiveXObject("htmlfile")}catch(t){}var t,e;Xo="undefined"!=typeof document?document.domain&&_o?Yo(_o):((e=xt("iframe")).style.display="none",kn.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Qo("document.F=Object")),t.close(),t.F):Yo(_o);for(var n=je.length;n--;)delete Xo.prototype[je[n]];return Xo()};qt[Lo]=!0;var Ho,Ko,Jo=Object.create||function(t,e){var n;return null!==t?(zo.prototype=Rt(t),n=new zo,zo.prototype=null,n[Lo]=t):n=Xo(),void 0===e?n:Bo.f(n,e)},Vo=u.RegExp,qo=f((function(){var t=Vo(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Zo=u.RegExp,ti=f((function(){var t=Zo("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),ei=ae.get,ni=rt("native-string-replace",String.prototype.replace),ri=RegExp.prototype.exec,oi=ri,ii=S("".charAt),ci=S("".indexOf),ai=S("".replace),ui=S("".slice),fi=(Ko=/b*/g,v(ri,Ho=/a/,"a"),v(ri,Ko,"a"),0!==Ho.lastIndex||0!==Ko.lastIndex),si=Uo.BROKEN_CARET,li=void 0!==/()??/.exec("")[1];(fi||li||si||qo||ti)&&(oi=function(t){var e,n,r,o,i,c,a,u=this,f=ei(u),s=No(t),l=f.raw;if(l)return l.lastIndex=u.lastIndex,e=v(oi,l,s),u.lastIndex=l.lastIndex,e;var p=f.groups,d=si&&u.sticky,h=v(Fo,u),g=u.source,y=0,b=s;if(d&&(h=ai(h,"y",""),-1===ci(h,"g")&&(h+="g"),b=ui(s,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==ii(s,u.lastIndex-1))&&(g="(?: "+g+")",b=" "+b,y++),n=new RegExp("^(?:"+g+")",h)),li&&(n=new RegExp("^"+g+"$(?!\\s)",h)),fi&&(r=u.lastIndex),o=v(ri,d?n:u,b),d?o?(o.input=ui(o.input,y),o[0]=ui(o[0],y),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:fi&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),li&&o&&o.length>1&&v(ni,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=c=Jo(null),i=0;i<p.length;i++)c[(a=p[i])[0]]=o[a[1]];return o});var pi=oi;Ue({target:"RegExp",proto:!0,forced:/./.exec!==pi},{exec:pi});var vi=gt("species"),di=RegExp.prototype,hi=S("".charAt),gi=S("".charCodeAt),yi=S("".slice),bi=function(t){return function(e,n){var r,o,i=No(R(e)),c=ve(n),a=i.length;return c<0||c>=a?t?"":void 0:(r=gi(i,c))<55296||r>56319||c+1===a||(o=gi(i,c+1))<56320||o>57343?t?hi(i,c):r:t?yi(i,c,c+2):o-56320+(r-55296<<10)+65536}},mi={codeAt:bi(!1),charAt:bi(!0)}.charAt,wi=function(t,e,n){return e+(n?mi(t,e).length:1)},Oi=Math.floor,Si=S("".charAt),xi=S("".replace),ji=S("".slice),Ei=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ti=/\$([$&'`]|\d{1,2})/g,Ii=function(t,e,n,r,o,i){var c=n+t.length,a=r.length,u=Ti;return void 0!==o&&(o=it(o),u=Ei),xi(i,u,(function(i,u){var f;switch(Si(u,0)){case"$":return"$";case"&":return t;case"`":return ji(e,0,n);case"'":return ji(e,c);case"<":f=o[ji(u,1,-1)];break;default:var s=+u;if(0===s)return i;if(s>a){var l=Oi(s/10);return 0===l?i:l<=a?void 0===r[l-1]?Si(u,1):r[l-1]+Si(u,1):i}f=r[s-1]}return void 0===f?"":f}))},Pi=TypeError,Ci=function(t,e){var n=t.exec;if(_(n)){var r=v(n,t,e);return null!==r&&Rt(r),r}if("RegExp"===E(t))return v(pi,t,e);throw Pi("RegExp#exec called on incompatible receiver")},Ri=gt("replace"),ki=Math.max,_i=Math.min,Ai=S([].concat),Ni=S([].push),Fi=S("".indexOf),Mi=S("".slice),Di="$0"==="a".replace(/./,"$0"),$i=!!/./[Ri]&&""===/./[Ri]("a","$0");!function(t,e,n,r){var o=gt(t),i=!f((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),c=i&&!f((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[vi]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!c||n){var a=S(/./[o]),u=e(o,""[t],(function(t,e,n,r,o){var c=S(t),u=e.exec;return u===pi||u===di.exec?i&&!o?{done:!0,value:a(e,n,r)}:{done:!0,value:c(n,e,r)}:{done:!1}}));fe(String.prototype,t,u[0]),fe(di,o,u[1])}r&&$t(di[o],"sham",!0)}("replace",(function(t,e,n){var r=$i?"$":"$0";return[function(t,n){var r=R(this),o=null==t?void 0:V(t,Ri);return o?v(o,t,r,n):v(e,No(r),t,n)},function(t,o){var i=Rt(this),c=No(t);if("string"==typeof o&&-1===Fi(o,r)&&-1===Fi(o,"$<")){var a=n(e,i,c,o);if(a.done)return a.value}var u=_(o);u||(o=No(o));var f=i.global;if(f){var s=i.unicode;i.lastIndex=0}for(var l=[];;){var p=Ci(i,c);if(null===p)break;if(Ni(l,p),!f)break;""===No(p[0])&&(i.lastIndex=wi(c,ye(i.lastIndex),s))}for(var v,d="",h=0,g=0;g<l.length;g++){for(var y=No((p=l[g])[0]),b=ki(_i(ve(p.index),c.length),0),m=[],w=1;w<p.length;w++)Ni(m,void 0===(v=p[w])?v:String(v));var O=p.groups;if(u){var S=Ai([y],m,b,c);void 0!==O&&Ni(S,O);var x=No(Pn(o,void 0,S))}else x=Ii(y,c,b,m,O,o);b>=h&&(d+=Mi(c,h,b)+x,h=b+y.length)}return d+Mi(c,h)}]}),!!f((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Di||$i);var Ui=/MSIE .\./.test(D),Wi=u.Function,Gi=function(t){return Ui?function(e,n){var r=An(arguments.length,1)>2,o=_(e)?e:Wi(e),i=r?We(arguments,2):void 0;return t(r?function(){Pn(o,this,i)}:o,n)}:t},Bi={setTimeout:Gi(u.setTimeout),setInterval:Gi(u.setInterval)},Li=Bi.setInterval;Ue({global:!0,bind:!0,forced:u.setInterval!==Li},{setInterval:Li});var zi=Bi.setTimeout;Ue({global:!0,bind:!0,forced:u.setTimeout!==zi},{setTimeout:zi});var Qi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,n=document.createElement("div"),r=document.getElementById("toast-temporary");r?r.innerText=t:(n.style="position:fixed;z-index:2000;left:50%;top:45%;transition:all .5s;font-size: 16px;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);text-align:center;border-radius:5px;color:#FFF;background:rgba(17,17,17,0.7);line-height:1.75;padding:8px 15px;",n.id="toast-temporary",n.innerText=t,document.body.appendChild(n),setTimeout((function(){document.body.removeChild(n)}),e))},Yi=function(){function r(){var t=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e(this,"webSocket",null),e(this,"messageHandlerQueue",[]),r.instance)return r.instance;r.CheckEnvironment()?(r.instance=this,this.webSocket=new WebSocket("ws://127.0.0.1:2828"),this.webSocket.onmessage=this._handleMessage.bind(this),this.webSocket.onerror=function(){return n(this,t),Qi("socket连接错误")}.bind(this)):Qi("当前浏览器不支持电子签名,请更换Chrome(谷歌)浏览器")}var o,i,c;return o=r,i=[{key:"start",value:function(){var t=this;return this.webSocket?new Promise(function(e,r){n(this,t),this.messageHandlerQueue.push({resolve:e,reject:r}),this.webSocket.send("GWQ_DeviceOnline()")}.bind(this)):Promise.reject("webSocket初始化失败")}},{key:"_handleMessage",value:function(t){var e=(t||{}).data;if(e)if(e.indexOf("BeginGWQ_DeviceOnline")>=0){var n=e.replace("BeginGWQ_DeviceOnline","").replace("EndGWQ_DeviceOnline","");if(0==n)this.webSocket.send("GWQ_SetPenWidth(10)"),this.webSocket.send("DoGWQ_StartSign2('','',0.1.0.50,请签名,0)");else if(-3==n){var r=this.messageHandlerQueue.shift();if(!r)return;r.resolve;var o="手写板连接失败,请检查设备连接";(0,r.reject)({msg:o}),Qi(o)}}else if(e.indexOf("BeginAfterSign")>=0){var i=this.messageHandlerQueue.shift();if(!i)return;var c=i.resolve,a=i.reject,u=e.replace("BeginAfterSign","").replace("EndAfterSign",""),f=JSON.parse(u),s=f.signImage,l=f.fingerImage;if(s||l){var p="data:image/jpeg;base64,";c({signImage:s?p+s:"",fingerImage:l?p+l:""})}else{var v="签名已取消";a({msg:v}),Qi(v)}}}}],c=[{key:"create",value:function(){return new r}},{key:"CheckEnvironment",value:function(){return navigator.userAgent.indexOf("Chrome")>-1}}],i&&t(o.prototype,i),c&&t(o,c),Object.defineProperty(o,"prototype",{writable:!1}),r}();return e(Yi,"instance",null),Yi}();
{
"name": "@cnhis-frontend/signature",
"version": "1.0.1-beta.0",
"description": "",
"version": "1.0.1-beta.1",
"description": "手写板签名对接 sdk",
"main": "dist/signature.es.min.js",

@@ -6,0 +6,0 @@ "files": [

# signature-sdk
手写板签名 sdk
手写板签名对接 sdk

@@ -5,0 +5,0 @@ ### 厂商列表

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc