@bi_funsdata/js-sdk 1.0.0 → 1.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +193 -3
- package/demo/esm.html +13 -0
- package/demo/esm.js +15 -0
- package/demo/umd.html +137 -0
- package/dist/esm.min.js +2 -20
- package/dist/umd.min.js +8 -26
- package/package.json +10 -9
- package/dist/cjs.min.js +0 -27
package/dist/umd.min.js
CHANGED
|
@@ -1,27 +1,9 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).funsdata=e()}(this,function(){"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var json2={},hasRequiredJson2;function requireJson2(){return hasRequiredJson2||(hasRequiredJson2=1,"object"!=typeof JSON&&(JSON={}),function(){var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(t){return t<10?"0"+t:t}function this_value(){return this.valueOf()}function quote(t){return rx_escapable.lastIndex=0,rx_escapable.test(t)?'"'+t.replace(rx_escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var r,i,n,s,a,o=gap,h=e[t];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(t)),"function"==typeof rep&&(h=rep.call(e,t,h)),typeof h){case"string":return quote(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(h)){for(s=h.length,r=0;r<s;r+=1)a[r]=str(r,h)||"null";return n=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+o+"]":"["+a.join(",")+"]",gap=o,n}if(rep&&"object"==typeof rep)for(s=rep.length,r=0;r<s;r+=1)"string"==typeof rep[r]&&(n=str(i=rep[r],h))&&a.push(quote(i)+(gap?": ":":")+n);else for(i in h)Object.prototype.hasOwnProperty.call(h,i)&&(n=str(i,h))&&a.push(quote(i)+(gap?": ":":")+n);return n=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+o+"}":"{"+a.join(",")+"}",gap=o,n}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(t,e,r){var i;if(gap="",indent="","number"==typeof r)for(i=0;i<r;i+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(t,e){var r,i,n=t[e];if(n&&"object"==typeof n)for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(void 0!==(i=walk(n,r))?n[r]=i:delete n[r]);return reviver.call(t,e,n)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()),json2}requireJson2();var Config$1={LIB_VERSION:"1.0.0"},MAX_REFERRER_STRING_LENGTH=200,ArrayProto=Array.prototype,ObjProto=Object.prototype,slice=ArrayProto.slice,toString$2=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty,nativeForEach=ArrayProto.forEach,breaker={},utmTypes=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],_={},T;_.each=function(t,e,r){if(null!==t)if(nativeForEach&&t.forEach===nativeForEach)t.forEach(e,r);else if(t.length===+t.length){for(var i=0,n=t.length;i<n;i++)if(i in t&&e.call(r,t[i],i,t)===breaker)return}else for(var s in t)if(hasOwnProperty.call(t,s)&&e.call(r,t[s],s,t)===breaker)return},_.extend=function(t){return _.each(slice.call(arguments,1),function(e){for(var r in e)void 0!==e[r]&&(t[r]=e[r])}),t},_.formatDate=function(t){function e(t){return t<10?"0"+t:t}return t.getFullYear()+"-"+e(t.getMonth()+1)+"-"+e(t.getDate())+" "+e(t.getHours())+":"+e(t.getMinutes())+":"+e(t.getSeconds())+"."+((r=t.getMilliseconds())<10?"00"+r:r<100?"0"+r:r);var r},_.formatTimeZone=function(t,e){if("number"!=typeof e)return t;var r=t.getTime(),i=6e4*t.getTimezoneOffset();return new Date(r+i+36e5*e)},_.formatJsonString=function(t){try{return JSON.stringify(t,null,8)}catch(e){return JSON.stringify(t)}},_.searchObjDate=function(t,e){(_.check.isObject(t)||_.check.isArray(t))&&_.each(t,function(r,i){_.check.isObject(r)||_.check.isArray(r)?_.searchObjDate(t[i],e):_.check.isDate(r)&&(t[i]=_.formatDate(_.formatTimeZone(r,e)))})},_.check={isUndefined:function(t){return void 0===t},isObject:function(t){return"[object Object]"===toString$2.call(t)&&null!==t},isEmptyObject:function(t){if(_.check.isObject(t)){for(var e in t)if(hasOwnProperty.call(t,e))return!1;return!0}return!1},isArray:function(t){return"[object Array]"===toString$2.call(t)},isString:function(t){return"[object String]"===toString$2.call(t)},isDate:function(t){return"[object Date]"===toString$2.call(t)},isNumber:function(t){return"[object Number]"===toString$2.call(t)},isBoolean:function(t){return"[object Boolean]"===toString$2.call(t)},isJSONString:function(t){try{JSON.parse(t)}catch(t){return!1}return!0}},_.UUID=(T=function(){for(var t=1*new Date,e=0;t===1*new Date;)e++;return t.toString(16)+e.toString(16)},function(){var t=String(screen.height*screen.width);t=t&&/\d{5,}/.test(t)?t.toString(16):String(31242*Math.random()).replace(".","").slice(0,8);var e=T()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var t,e,r=navigator.userAgent,i=[],n=0;function s(t,e){var r,n=0;for(r=0;r<e.length;r++)n|=i[r]<<8*r;return t^n}for(t=0;t<r.length;t++)e=r.charCodeAt(t),i.unshift(255&e),i.length>=4&&(n=s(n,i),i=[]);return i.length>0&&(n=s(n,i)),n.toString(16)}()+"-"+t+"-"+T();return e||(String(Math.random())+String(Math.random())+String(Math.random())).slice(2,15)}),_.UUIDv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},_.getReferrer=function(t){var e=t||document.referrer;return"string"!=typeof e?"referrer exception"+String(e):(0===e.indexOf("https://www.baidu.com/")&&(e=e.split("?")[0]),"string"==typeof(e=e.slice(0,MAX_REFERRER_STRING_LENGTH))?e:"")},_.url=function(){function t(){return new RegExp(/(.*?)\.?([^\.]*?)\.(com|net|org|biz|ws|in|me|co\.uk|co|org\.uk|ltd\.uk|plc\.uk|me\.uk|edu|mil|br\.com|cn\.com|eu\.com|hu\.com|no\.com|qc\.com|sa\.com|se\.com|se\.net|us\.com|uy\.com|ac|co\.ac|gv\.ac|or\.ac|ac\.ac|af|am|as|at|ac\.at|co\.at|gv\.at|or\.at|asn\.au|com\.au|edu\.au|org\.au|net\.au|id\.au|be|ac\.be|adm\.br|adv\.br|am\.br|arq\.br|art\.br|bio\.br|cng\.br|cnt\.br|com\.br|ecn\.br|eng\.br|esp\.br|etc\.br|eti\.br|fm\.br|fot\.br|fst\.br|g12\.br|gov\.br|ind\.br|inf\.br|jor\.br|lel\.br|med\.br|mil\.br|net\.br|nom\.br|ntr\.br|odo\.br|org\.br|ppg\.br|pro\.br|psc\.br|psi\.br|rec\.br|slg\.br|tmp\.br|tur\.br|tv\.br|vet\.br|zlg\.br|br|ab\.ca|bc\.ca|mb\.ca|nb\.ca|nf\.ca|ns\.ca|nt\.ca|on\.ca|pe\.ca|qc\.ca|sk\.ca|yk\.ca|ca|cc|ac\.cn|net\.cn|com\.cn|edu\.cn|gov\.cn|org\.cn|bj\.cn|sh\.cn|tj\.cn|cq\.cn|he\.cn|nm\.cn|ln\.cn|jl\.cn|hl\.cn|js\.cn|zj\.cn|ah\.cn|gd\.cn|gx\.cn|hi\.cn|sc\.cn|gz\.cn|yn\.cn|xz\.cn|sn\.cn|gs\.cn|qh\.cn|nx\.cn|xj\.cn|tw\.cn|hk\.cn|mo\.cn|cn|cx|cz|de|dk|fo|com\.ec|tm\.fr|com\.fr|asso\.fr|presse\.fr|fr|gf|gs|co\.il|net\.il|ac\.il|k12\.il|gov\.il|muni\.il|ac\.in|co\.in|org\.in|ernet\.in|gov\.in|net\.in|res\.in|is|it|ac\.jp|co\.jp|go\.jp|or\.jp|ne\.jp|ac\.kr|co\.kr|go\.kr|ne\.kr|nm\.kr|or\.kr|li|lt|lu|asso\.mc|tm\.mc|com\.mm|org\.mm|net\.mm|edu\.mm|gov\.mm|ms|nl|no|nu|pl|ro|org\.ro|store\.ro|tm\.ro|firm\.ro|www\.ro|arts\.ro|rec\.ro|info\.ro|nom\.ro|nt\.ro|se|si|com\.sg|org\.sg|net\.sg|gov\.sg|sk|st|tf|ac\.th|co\.th|go\.th|mi\.th|net\.th|or\.th|tm|to|com\.tr|edu\.tr|gov\.tr|k12\.tr|net\.tr|org\.tr|com\.tw|org\.tw|net\.tw|ac\.uk|uk\.com|uk\.net|gb\.com|gb\.net|vg|sh|kz|ch|info|ua|gov|name|pro|ie|hk|com\.hk|org\.hk|net\.hk|edu\.hk|us|tk|cd|by|ad|lv|eu\.lv|bz|es|jp|cl|ag|mobi|eu|co\.nz|org\.nz|net\.nz|maori\.nz|iwi\.nz|io|la|md|sc|sg|vc|tw|travel|my|se|tv|pt|com\.pt|edu\.pt|asia|fi|com\.ve|net\.ve|fi|org\.ve|web\.ve|info\.ve|co\.ve|tel|im|gr|ru|net\.ru|org\.ru|hr|com\.hr|ly|xyz)$/)}function e(t){return _.decodeURIComponent(t.replace(/\+/g," "))}function r(t,e){var r=t.charAt(0),i=e.split(r);return r===t?i:i[(t=parseInt(t.substring(1),10))<0?i.length+t:t-1]}function i(t,r){for(var i=t.charAt(0),n=r.split("&"),s=[],a={},o=[],h=t.substring(1),c=0,u=n.length;c<u;c++)if((s=n[c].match(/(.*?)=(.*)/))||(s=[n[c],n[c],""]),""!==s[1].replace(/\s/g,"")){if(s[2]=e(s[2]||""),h===s[1])return s[2];(o=s[1].match(/(.*)\[([0-9]+)\]/))?(a[o[1]]=a[o[1]]||[],a[o[1]][o[2]]=s[2]):a[s[1]]=s[2]}return i===t?a:a[h]}return function(e,n){var s,a={};if("tld?"===e)return t();if(n=n||window.location.toString(),!e)return n;if(e=e.toString(),s=n.match(/^mailto:([^\/].+)/))a.protocol="mailto",a.email=s[1];else{if((s=n.match(/(.*?)\/#\!(.*)/))&&(n=s[1]+s[2]),(s=n.match(/(.*?)#(.*)/))&&(a.hash=s[2],n=s[1]),a.hash&&e.match(/^#/))return i(e,a.hash);if((s=n.match(/(.*?)\?(.*)/))&&(a.query=s[2],n=s[1]),a.query&&e.match(/^\?/))return i(e,a.query);if((s=n.match(/(.*?)\:?\/\/(.*)/))&&(a.protocol=s[1].toLowerCase(),n=s[2]),(s=n.match(/(.*?)(\/.*)/))&&(a.path=s[2],n=s[1]),a.path=(a.path||"").replace(/^([^\/])/,"/$1").replace(/\/$/,""),e.match(/^[\-0-9]+$/)&&(e=e.replace(/^([^\/])/,"/$1")),e.match(/^\//))return r(e,a.path.substring(1));if((s=r("/-1",a.path.substring(1)))&&(s=s.match(/(.*?)\.(.*)/))&&(a.file=s[0],a.filename=s[1],a.fileext=s[2]),(s=n.match(/(.*)\:([0-9]+)$/))&&(a.port=s[2],n=s[1]),(s=n.match(/(.*?)@(.*)/))&&(a.auth=s[1],n=s[2]),a.auth&&(s=a.auth.match(/(.*)\:(.*)/),a.user=s?s[1]:a.auth,a.pass=s?s[2]:void 0),a.hostname=n.toLowerCase(),"."===e.charAt(0))return r(e,a.hostname);t()&&(s=a.hostname.match(t()))&&(a.tld=s[3],a.domain=s[2]?s[2]+"."+s[3]:void 0,a.sub=s[1]||void 0);var o=a.port?":"+a.port:"";a.protocol=a.protocol||window.location.protocol.replace(":",""),a.port=a.port||("https"===a.protocol?"443":"80"),a.protocol=a.protocol||("443"===a.port?"https":"http"),a.basic=a.protocol+"://"+a.hostname+o}return e in a?a[e]:"{}"===e?a:""}}(),_.hashCode=function(t){if("string"!=typeof t)return 0;var e=0;if(0===t.length)return e;for(var r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e&=e;return e},_.decodeURIComponent=function(t){var e="";try{e=decodeURIComponent(t)}catch(r){e=t}return e},_.encodeURIComponent=function(t){var e="";try{e=encodeURIComponent(t)}catch(r){e=t}return e},_.utf8Encode=function(t){var e,r,i,n,s="";for(e=r=0,i=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,n=0;n<i;n++){var a=t.charCodeAt(n),o=null;a<128?r++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==o&&(r>e&&(s+=t.substring(e,r)),s+=o,e=r=n+1)}return r>e&&(s+=t.substring(e,t.length)),s},_.base64Encode=function(t){var e,r,i,n,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,h=0,c="",u=[];if(!t)return t;t=_.utf8Encode(t);do{e=(s=t.charCodeAt(o++)<<16|t.charCodeAt(o++)<<8|t.charCodeAt(o++))>>18&63,r=s>>12&63,i=s>>6&63,n=63&s,u[h++]=a.charAt(e)+a.charAt(r)+a.charAt(i)+a.charAt(n)}while(o<t.length);switch(c=u.join(""),t.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},_.cookie={get:function(t){for(var e=t+"=",r=document.cookie.split(";"),i=0;i<r.length;i++){for(var n=r[i];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(e))return _.decodeURIComponent(n.substring(e.length,n.length))}return null},set:function(t,e,r,i,n){var s="",a="",o="";if(r=null===r?73e3:r,i){var h=_.url("domain",location.href);s=h?"; domain=."+h:""}if(r){var c=new Date;"s"===String(r).slice(-1)?c.setTime(c.getTime()+1e3*Number(String(r).slice(0,-1))):c.setTime(c.getTime()+24*r*60*60*1e3),a="; expires="+c.toGMTString()}n&&(o="; secure");var u=t+"="+encodeURIComponent(e)+a+"; path=/"+s+o;return document.cookie=u,u},remove:function(t,e){_.cookie.set(t,"",-1,e)}},_.localStorage={get:function(t){try{return window.localStorage.getItem(t)}catch(t){_.localStorage.error(t)}},parse:function(t){var e;try{e=JSON.parse(_.localStorage.get(t))||null}catch(t){_.localStorage.error(t)}return e},set:function(t,e){try{window.localStorage.setItem(t,e)}catch(t){_.localStorage.error(t)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(t){_.localStorage.error(t)}},error:function(t){console.error("localStorage error: "+t)},isSupported:function(){var t=!0;try{var e="__funsdatasupport__",r="testIsSupportStorage";_.localStorage.set(e,r),_.localStorage.get(e)!==r&&(t=!1),_.localStorage.remove(e)}catch(e){t=!1}return t}},_.stripEmptyProperties=function(t){var e={};return _.each(t,function(t,r){_.check.isString(t)&&t.length>0&&(e[r]=t)}),e},_.info={os:function(){var t=navigator.userAgent;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""},browser:function(){var t={type:"",version:""};try{var e=navigator.userAgent.toLowerCase(),r=[];if(null!==e.match(/baidubrowser/)?(t.type="baidu",r.push(/baidubrowser\/([\d.]+)/)):null!==e.match(/bidubrowser/)?(t.type="baidu",r.push(/bidubrowser\/([\d.]+)/)):null!==e.match(/edga/)?(t.type="edge",r.push(/edga\/([\d.]+)/)):null!==e.match(/edgios/)?(t.type="edge",r.push(/edgios\/([\d.]+)/)):null!==e.match(/liebaofast/)?(t.type="liebao",r.push(/liebaofast\/([\d.]+)/)):null!==e.match(/sogoumobilebrowser/)?(t.type="sogou",r.push(/sogoumobilebrowser\/([\d.]+)/)):null!==e.match(/lbbrowser/)?(t.type="liebao",r.push(/lbbrowser\/([\d.]+)/)):null!==e.match(/crios/)?(t.type="chrome",r.push(/crios\/([\d.]+)/)):null!==e.match(/qihoobrowser/)?(t.type="360",r.push(/qihoobrowser\/([\d.]+)/)):null!==e.match(/mxios/)?(t.type="maxthon",r.push(/mxios\/([\d.]+)/)):null!==e.match(/fxios/)?(t.type="firefox",r.push(/fxios\/([\d.\w]+)/)):null!==e.match(/edge/)?(t.type="edge",r.push(/edge\/([\d.]+)/)):null!==e.match(/metasr/)?(t.type="sogou",r.push(/metasr ([\d.]+)/)):null!==e.match(/micromessenger/)?(t.type="micromessenger",r.push(/micromessenger\/([\d.]+)/)):null!==e.match(/mqqbrowser/)?(t.type="qq",r.push(/mqqbrowser\/([\d.]+)/)):null!==e.match(/qqbrowserlite/)?(t.type="qq",r.push(/qqbrowserlite\/([\d.]+)/)):null!==e.match(/tencenttraveler/)?(t.type="qq",r.push(/tencenttraveler\/([\d.]+)/)):null!==e.match(/qqbrowser/)?(t.type="qq",r.push(/qqbrowser\/([\d.]+)/)):null!==e.match(/maxthon/)?(t.type="maxthon",r.push(/maxthon\/([\d.]+)/)):null!==e.match(/ubrowser/)?(t.type="uc",r.push(/ubrowser\/([\d.]+)/)):null!==e.match(/ucbrowser/)?(t.type="uc",r.push(/ucbrowser\/([\d.]+)/)):null!==e.match(/firefox/)?(t.type="firefox",r.push(/firefox\/([\d.]+)/)):null!==e.match(/opera/)?(t.type="opera",r.push(/opera\/([\d.]+)/)):null!==e.match(/opr/)?(t.type="opera",r.push(/opr\/([\d.]+)/)):null!==e.match(/chrome/)?(t.type="chrome",r.push(/chrome\/([\d.]+)/)):null!==e.match(/safari/)?(t.type="safari",r.push(/version\/([\d.]+)/)):null===e.match(/trident/)&&null===e.match(/msie/)||(t.type="ie"),"ie"===t.type){var i=e.match(/trident\/([\d.]+)/)?e.match(/trident\/([\d.]+)/)[1]:"",n=e.match(/msie ([\d.]+)/)?e.match(/msie ([\d.]+)/)[1]:"";""!==i?t.version=String(parseInt(i)+4):""!==n&&(t.version=n)}else r&&(t.version=e.match(r[0])?e.match(r[0])[1]:"")}catch(t){Log.w("getting browser info failed due to ",t)}return t},properties:function(){var t=_.info.browser();return _.extend({"#os":_.info.os(),"#lib_version":Config$1.LIB_VERSION,"#lib":"js","#screen_height":screen.height,"#screen_width":screen.width,"#browser":t.type,"#browser_version":t.version,"#system_language":_.check.isString(navigator.languages[1])?navigator.languages[1].toLowerCase():"Value exception","#ua":_.check.isString(navigator.userAgent)?navigator.userAgent.toLowerCase():"Value exception","#utm":_.getUtm()})},pageProperties:function(){var t=_.getReferrer();return _.stripEmptyProperties({"#referrer":t,"#referrer_host":t?_.url("hostname",t):t,"#url":location.href,"#url_path":location.pathname,"#title":document.title})}},_.getUtm=function(){var t={};return _.each(utmTypes,function(e){var r=_.getQueryParam(location.href,e);r.length&&(t[e]=r)}),JSON.stringify(t)},_.getQueryParam=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),t=_.decodeURIComponent(t);var r=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===r||r&&"string"!=typeof r[1]&&r[1].length?"":_.decodeURIComponent(r[1])},_.createString=function(t){for(var e=t,r=Math.random().toString(36).substr(2);r.length<e;)r+=Math.random().toString(36).substr(2);return r=r.substr(0,t)},_.createAesKey=function(){return _.createString(16)},_.generateEncryptyData=function(t,e){if(void 0===e)return t;var r=e.publicKey,i=e.version;if(void 0===r||void 0===i)return t;if("undefined"==typeof CryptoJS||"undefined"==typeof JSEncrypt)return t;var n=_.createAesKey();try{var s=CryptoJS.enc.Utf8.parse(n),a=CryptoJS.enc.Utf8.parse(JSON.stringify(t)),o=CryptoJS.AES.encrypt(a,s,{mode:CryptoJS.mode.ECB,padding:CryptoJS.pad.Pkcs7}).toString(),h=new JSEncrypt;h.setPublicKey(r);var c=h.encrypt(n);return!1===c?(Log.w("encryption failed"),t):{pkv:i,ekey:c,payload:o}}catch(t){Log.w("encryption failed")}return t},_.paramType=function(t){return Object.prototype.toString.call(t).replace("[object ","").replace("]","")},_.addEvent=function(t,e,r,i){if(document.addEventListener)if("Array"!==this.paramType(t)&&"HTMLCollection"!==this.paramType(t)||!t.length||t===window)t.addEventListener(e,r,i);else for(var n=0;n<t.length;n++)this.addEvent(t[n],e,r,i);else if(t.length&&t!==window)for(var s=0;s<t.length;s++)this.addEvent(t[s],e,r);else t.attachEvent("on"+e,function(){return r.call(t,window.event)})},_.getRandom=function(){return(new Date).getTime()+"_"+Math.floor(1e6*Math.random())},_.safeJSONParse=function(t){var e=null;try{e=JSON.parse(t)}catch(e){return t}return e},_.saveObjectVal=function(t,e){_.check.isString(e)||(e=JSON.stringify(e)),_.localStorage.set(t,e)},_.readObjectVal=function(t){var e=_.localStorage.get(t);return e?_.safeJSONParse(e):null},_.indexOf=function(t,e){var r=t.indexOf;if(r)return r.call(t,e);for(var i=0;i<t.length;i++)if(e===t[i])return i;return-1},_.hasEncrypty=function(t){return!!_.check.isObject()&&("undefined"!==t.pkv&&"undefined"!==t.ekey&&"undefined"!==t.payload)},_.addSiteEvent=function(t,e,r,i){function n(t){return t&&(t.preventDefault=n.preventDefault,t.stopPropagation=n.stopPropagation,t._getPath=n._getPath),t}n._getPath=function(){var t;return this.path||this.composedPath&&this.composedPath()||(t=this.target,new s(t)).getParents()};var s=function(t){this.ele=t};n.preventDefault=function(){this.returnValue=!1},n.stopPropagation=function(){this.cancelBubble=!0};(function(t,e,r){if(void 0===i&&"click"===e&&(i=!0),t&&t.addEventListener)t.addEventListener(e,function(t){t._getPath=n._getPath,r.call(this,t)},i);else{var s="on"+e,a=t[s];t[s]=function(t,e,r,i){var s=function(s){if(s=s||n(window.event)){s.target=s.srcElement;var a,o,h=!0;return"function"==typeof r&&(a=r(s)),o=e.call(t,s),"beforeunload"!==i?(!1!==a&&!1!==o||(h=!1),h):void 0}};return s}(t,r,a,e)}}).apply(null,arguments)},_.getURLSearchParams=function(t){for(var e={},r=(t=t||"").substring(1).split("&"),i=0;i<r.length;i++){var n=r[i].indexOf("=");if(-1!==n){var s=r[i].substring(0,n),a=r[i].substring(n+1);s=_.decodeURIComponent(s),a=_.decodeURIComponent(a),e[s]=a}}return e},_.urlParse=function(t){var e=function(t){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,void 0!==t&&this._parse(t)};return e.prototype.setUrl=function(t){this._parse(t)},e.prototype._initValues=function(){for(var t in this._fields)this._values[t]=""},e.prototype.addQueryString=function(t){if("object"!=typeof t)return!1;var e=this._values.QueryString||"";for(var r in t)e=new RegExp(r+"[^&]+").test(e)?e.replace(new RegExp(r+"[^&]+"),r+"="+t[r]):"&"===e.slice(-1)?e+r+"="+t[r]:""===e?r+"="+t[r]:e+"&"+r+"="+t[r];this._values.QueryString=e},e.prototype.getUrl=function(){var t="";return t+=this._values.Origin,t+=this._values.Port?":"+this._values.Port:"",t+=this._values.Path,t+=this._values.QueryString?"?"+this._values.QueryString:"",t+=this._values.Fragment?"#"+this._values.Fragment:""},e.prototype._parse=function(t){this._initValues();var e=this._regex.exec(t);e||Log.i("URLParser::_parse -> Invalid URL");var r=t.split("#"),i=r[0],n=r.slice(1).join("#");for(var s in e=this._regex.exec(i),this._fields)void 0!==e[this._fields[s]]&&(this._values[s]=e[this._fields[s]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=n},new e(t)},_.trim=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},_.URL=function(t){var e,r={};if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(t){return!1}}())(r=new URL(t)).searchParams||(r.searchParams=(e=_.getURLSearchParams(r.search),{get:function(t){return e[t]}}));else{_.check.isString(t)||(t=String(t)),t=_.trim(t);if(!1===/^https?:\/\/.+/.test(t))return void Log.w("Invalid URL");var i=_.urlParse(t);r.hash=i._values.Fragment,r.host=i._values.Host?i._values.Host+(i._values.Port?":"+i._values.Port:""):"",r.href=i._values.URL,r.password=i._values.Password,r.pathname=i._values.Path,r.port=i._values.Port,r.search=i._values.QueryString?"?"+i._values.QueryString:"",r.username=i._values.Username,r.hostname=i._values.Hostname,r.protocol=i._values.Protocol?i._values.Protocol+":":"",r.origin=i._values.Origin?i._values.Origin+(i._values.Port?":"+i._values.Port:""):"",r.searchParams=function(){var t=_.getURLSearchParams("?"+i._values.QueryString);return{get:function(e){return t[e]}}}()}return r};class Log{static i(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=_.formatJsonString(arguments[0])),"object"==typeof console&&console.log)try{return console.log.apply(console,arguments)}catch(t){console.log(arguments[0])}}static w(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=_.formatJsonString(arguments[0])),"object"==typeof console&&console.warn)try{return console.warn.apply(console,arguments)}catch(t){console.warn(arguments[0])}}}var KEY_NAME_MATCH_REGEX=/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/;class PropertyChecker{static stripProperties(t){return _.check.isObject(t)?(_.each(t,function(t,e){_.check.isString(t)||_.check.isNumber(t)||_.check.isDate(t)||_.check.isBoolean(t)||_.check.isArray(t)||_.check.isObject(t)||Log.w("The format of Data-",e,t," does not meet the requirements and may not be stored correctly. The attribute value only supports String, Number, Date, Boolean, Array,Object")}),t):t}static _checkPropertiesKey(t){var e=!0;return _.each(t,(t,r)=>{KEY_NAME_MATCH_REGEX.test(r)||(Log.w("invalid key: "+r),e=!1)}),e}static event(t){return!(!_.check.isString(t)||!KEY_NAME_MATCH_REGEX.test(t))||(Log.w("Please check the parameter format, eventName must be an English letter or a string starting with '_', containing letters and numbers with no more than 50 characters: "+t),!1)}static propertyName(t){return!(!_.check.isString(t)||!KEY_NAME_MATCH_REGEX.test(t))||(Log.w("Please check the parameter format, propertyName must be an English letter or a string starting with '_', containing letters and numbers with no more than 50 characters: "+t),!1)}static properties(t){return this.stripProperties(t),!t||!!_.check.isObject(t)&&(!!this._checkPropertiesKey(t)||(Log.w("Please check the parameter format, the key of properties can only start with a letter, contain numbers, letters and underscores _, and the maximum length is 50 characters"),!1))}static propertiesMust(t){return this.stripProperties(t),void 0===t||!_.check.isObject(t)||_.check.isEmptyObject(t)?(Log.w("properties must be objects and have values"),!1):!!this._checkPropertiesKey(t)||(Log.w("Please check the parameter format, the key of properties can only start with a letter, contain numbers, letters and underscores _, and the maximum length is 50 characters"),!1)}static userId(t){return!(!_.check.isString(t)||!/^.{1,63}$/.test(t))||(Log.w("User id must be a string that cannot be empty and is less than 64 bits"),!1)}}
|
|
2
|
-
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(t){let e=t.length;for(;--e>=0;)t[e]=0}const STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),extra_dbits=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),extra_blbits=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bl_order=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DIST_CODE_LEN=512,static_ltree=new Array(2*(L_CODES$1+2));zero$1(static_ltree);const static_dtree=new Array(2*D_CODES$1);zero$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1(base_length);const base_dist=new Array(D_CODES$1);function StaticTreeDesc(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}zero$1(base_dist);const d_code=t=>t<256?_dist_code[t]:_dist_code[256+(t>>>7)],put_short=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},send_bits=(t,e,r)=>{t.bi_valid>Buf_size-r?(t.bi_buf|=e<<t.bi_valid&65535,put_short(t,t.bi_buf),t.bi_buf=e>>Buf_size-t.bi_valid,t.bi_valid+=r-Buf_size):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},send_code=(t,e,r)=>{send_bits(t,r[2*e],r[2*e+1])},bi_reverse=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},bi_flush=t=>{16===t.bi_valid?(put_short(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)},gen_bitlen=(t,e)=>{const r=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,h=e.stat_desc.max_length;let c,u,l,f,d,p,_=0;for(f=0;f<=MAX_BITS$1;f++)t.bl_count[f]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<HEAP_SIZE$1;c++)u=t.heap[c],f=r[2*r[2*u+1]+1]+1,f>h&&(f=h,_++),r[2*u+1]=f,u>i||(t.bl_count[f]++,d=0,u>=o&&(d=a[u-o]),p=r[2*u],t.opt_len+=p*(f+d),s&&(t.static_len+=p*(n[2*u+1]+d)));if(0!==_){do{for(f=h-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[h]--,_-=2}while(_>0);for(f=h;0!==f;f--)for(u=t.bl_count[f];0!==u;)l=t.heap[--c],l>i||(r[2*l+1]!==f&&(t.opt_len+=(f-r[2*l+1])*r[2*l],r[2*l+1]=f),u--)}},gen_codes=(t,e,r)=>{const i=new Array(MAX_BITS$1+1);let n,s,a=0;for(n=1;n<=MAX_BITS$1;n++)a=a+r[n-1]<<1,i[n]=a;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=bi_reverse(i[e]++,e))}},tr_static_init=()=>{let t,e,r,i,n;const s=new Array(MAX_BITS$1+1);for(r=0,i=0;i<LENGTH_CODES$1-1;i++)for(base_length[i]=r,t=0;t<1<<extra_lbits[i];t++)_length_code[r++]=i;for(_length_code[r-1]=i,n=0,i=0;i<16;i++)for(base_dist[i]=n,t=0;t<1<<extra_dbits[i];t++)_dist_code[n++]=i;for(n>>=7;i<D_CODES$1;i++)for(base_dist[i]=n<<7,t=0;t<1<<extra_dbits[i]-7;t++)_dist_code[256+n++]=i;for(e=0;e<=MAX_BITS$1;e++)s[e]=0;for(t=0;t<=143;)static_ltree[2*t+1]=8,t++,s[8]++;for(;t<=255;)static_ltree[2*t+1]=9,t++,s[9]++;for(;t<=279;)static_ltree[2*t+1]=7,t++,s[7]++;for(;t<=287;)static_ltree[2*t+1]=8,t++,s[8]++;for(gen_codes(static_ltree,L_CODES$1+1,s),t=0;t<D_CODES$1;t++)static_dtree[2*t+1]=5,static_dtree[2*t]=bi_reverse(t,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)},init_block=t=>{let e;for(e=0;e<L_CODES$1;e++)t.dyn_ltree[2*e]=0;for(e=0;e<D_CODES$1;e++)t.dyn_dtree[2*e]=0;for(e=0;e<BL_CODES$1;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*END_BLOCK]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},bi_windup=t=>{t.bi_valid>8?put_short(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},smaller=(t,e,r,i)=>{const n=2*e,s=2*r;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[r]},pqdownheap=(t,e,r)=>{const i=t.heap[r];let n=r<<1;for(;n<=t.heap_len&&(n<t.heap_len&&smaller(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!smaller(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i},compress_block=(t,e,r)=>{let i,n,s,a,o=0;if(0!==t.sym_next)do{i=255&t.pending_buf[t.sym_buf+o++],i+=(255&t.pending_buf[t.sym_buf+o++])<<8,n=t.pending_buf[t.sym_buf+o++],0===i?send_code(t,n,e):(s=_length_code[n],send_code(t,s+LITERALS$1+1,e),a=extra_lbits[s],0!==a&&(n-=base_length[s],send_bits(t,n,a)),i--,s=d_code(i),send_code(t,s,r),a=extra_dbits[s],0!==a&&(i-=base_dist[s],send_bits(t,i,a)))}while(o<t.sym_next);send_code(t,END_BLOCK,e)},build_tree=(t,e)=>{const r=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let a,o,h,c=-1;for(t.heap_len=0,t.heap_max=HEAP_SIZE$1,a=0;a<s;a++)0!==r[2*a]?(t.heap[++t.heap_len]=c=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=c<2?++c:0,r[2*h]=1,t.depth[h]=0,t.opt_len--,n&&(t.static_len-=i[2*h+1]);for(e.max_code=c,a=t.heap_len>>1;a>=1;a--)pqdownheap(t,r,a);h=s;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],pqdownheap(t,r,1),o=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=o,r[2*h]=r[2*a]+r[2*o],t.depth[h]=(t.depth[a]>=t.depth[o]?t.depth[a]:t.depth[o])+1,r[2*a+1]=r[2*o+1]=h,t.heap[1]=h++,pqdownheap(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],gen_bitlen(t,e),gen_codes(r,c,t.bl_count)},scan_tree=(t,e,r)=>{let i,n,s=-1,a=e[1],o=0,h=7,c=4;for(0===a&&(h=138,c=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=a,a=e[2*(i+1)+1],++o<h&&n===a||(o<c?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[2*REP_3_6]++):o<=10?t.bl_tree[2*REPZ_3_10]++:t.bl_tree[2*REPZ_11_138]++,o=0,s=n,0===a?(h=138,c=3):n===a?(h=6,c=3):(h=7,c=4))},send_tree=(t,e,r)=>{let i,n,s=-1,a=e[1],o=0,h=7,c=4;for(0===a&&(h=138,c=3),i=0;i<=r;i++)if(n=a,a=e[2*(i+1)+1],!(++o<h&&n===a)){if(o<c)do{send_code(t,n,t.bl_tree)}while(0!==--o);else 0!==n?(n!==s&&(send_code(t,n,t.bl_tree),o--),send_code(t,REP_3_6,t.bl_tree),send_bits(t,o-3,2)):o<=10?(send_code(t,REPZ_3_10,t.bl_tree),send_bits(t,o-3,3)):(send_code(t,REPZ_11_138,t.bl_tree),send_bits(t,o-11,7));o=0,s=n,0===a?(h=138,c=3):n===a?(h=6,c=3):(h=7,c=4)}},build_bl_tree=t=>{let e;for(scan_tree(t,t.dyn_ltree,t.l_desc.max_code),scan_tree(t,t.dyn_dtree,t.d_desc.max_code),build_tree(t,t.bl_desc),e=BL_CODES$1-1;e>=3&&0===t.bl_tree[2*bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e},send_all_trees=(t,e,r,i)=>{let n;for(send_bits(t,e-257,5),send_bits(t,r-1,5),send_bits(t,i-4,4),n=0;n<i;n++)send_bits(t,t.bl_tree[2*bl_order[n]+1],3);send_tree(t,t.dyn_ltree,e-1),send_tree(t,t.dyn_dtree,r-1)},detect_data_type=t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return Z_BINARY;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return Z_TEXT;for(e=32;e<LITERALS$1;e++)if(0!==t.dyn_ltree[2*e])return Z_TEXT;return Z_BINARY};let static_init_done=!1;const _tr_init$1=t=>{static_init_done||(tr_static_init(),static_init_done=!0),t.l_desc=new TreeDesc(t.dyn_ltree,static_l_desc),t.d_desc=new TreeDesc(t.dyn_dtree,static_d_desc),t.bl_desc=new TreeDesc(t.bl_tree,static_bl_desc),t.bi_buf=0,t.bi_valid=0,init_block(t)},_tr_stored_block$1=(t,e,r,i)=>{send_bits(t,(STORED_BLOCK<<1)+(i?1:0),3),bi_windup(t),put_short(t,r),put_short(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r},_tr_align$1=t=>{send_bits(t,STATIC_TREES<<1,3),send_code(t,END_BLOCK,static_ltree),bi_flush(t)},_tr_flush_block$1=(t,e,r,i)=>{let n,s,a=0;t.level>0?(t.strm.data_type===Z_UNKNOWN$1&&(t.strm.data_type=detect_data_type(t)),build_tree(t,t.l_desc),build_tree(t,t.d_desc),a=build_bl_tree(t),n=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=n&&(n=s)):n=s=r+5,r+4<=n&&-1!==e?_tr_stored_block$1(t,e,r,i):t.strategy===Z_FIXED$1||s===n?(send_bits(t,(STATIC_TREES<<1)+(i?1:0),3),compress_block(t,static_ltree,static_dtree)):(send_bits(t,(DYN_TREES<<1)+(i?1:0),3),send_all_trees(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),compress_block(t,t.dyn_ltree,t.dyn_dtree)),init_block(t),i&&bi_windup(t)},_tr_tally$1=(t,e,r)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(_length_code[r]+LITERALS$1+1)]++,t.dyn_dtree[2*d_code(e)]++),t.sym_next===t.sym_end);var _tr_init_1=_tr_init$1,_tr_stored_block_1=_tr_stored_block$1,_tr_flush_block_1=_tr_flush_block$1,_tr_tally_1=_tr_tally$1,_tr_align_1=_tr_align$1,trees={_tr_init:_tr_init_1,_tr_stored_block:_tr_stored_block_1,_tr_flush_block:_tr_flush_block_1,_tr_tally:_tr_tally_1,_tr_align:_tr_align_1};const adler32=(t,e,r,i)=>{let n=65535&t,s=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{n=n+e[i++]|0,s=s+n|0}while(--a);n%=65521,s%=65521}return n|s<<16};var adler32_1=adler32;const makeTable=()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e},crcTable=new Uint32Array(makeTable()),crc32=(t,e,r,i)=>{const n=crcTable,s=i+r;t^=-1;for(let r=i;r<s;r++)t=t>>>8^n[255&(t^e[r])];return-1^t};var crc32_1=crc32,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},constants$2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:_tr_init,_tr_stored_block:_tr_stored_block,_tr_flush_block:_tr_flush_block,_tr_tally:_tr_tally,_tr_align:_tr_align}=trees,{Z_NO_FLUSH:Z_NO_FLUSH$2,Z_PARTIAL_FLUSH:Z_PARTIAL_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH$1,Z_FINISH:Z_FINISH$3,Z_BLOCK:Z_BLOCK$1,Z_OK:Z_OK$3,Z_STREAM_END:Z_STREAM_END$3,Z_STREAM_ERROR:Z_STREAM_ERROR$2,Z_DATA_ERROR:Z_DATA_ERROR$2,Z_BUF_ERROR:Z_BUF_ERROR$1,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION$1,Z_FILTERED:Z_FILTERED,Z_HUFFMAN_ONLY:Z_HUFFMAN_ONLY,Z_RLE:Z_RLE,Z_FIXED:Z_FIXED,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY$1,Z_UNKNOWN:Z_UNKNOWN,Z_DEFLATED:Z_DEFLATED$2}=constants$2,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,GZIP_STATE=57,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,err=(t,e)=>(t.msg=messages[e],e),rank=t=>2*t-(t>4?9:0),zero=t=>{let e=t.length;for(;--e>=0;)t[e]=0},slide_hash=t=>{let e,r,i,n=t.w_size;e=t.hash_size,i=e;do{r=t.head[--i],t.head[i]=r>=n?r-n:0}while(--e);e=n,i=e;do{r=t.prev[--i],t.prev[i]=r>=n?r-n:0}while(--e)};let HASH_ZLIB=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask,HASH=HASH_ZLIB;const flush_pending=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},flush_block_only=(t,e)=>{_tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,flush_pending(t.strm)},put_byte=(t,e)=>{t.pending_buf[t.pending++]=e},putShortMSB=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},read_buf=(t,e,r,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),r),1===t.state.wrap?t.adler=adler32_1(t.adler,e,n,r):2===t.state.wrap&&(t.adler=crc32_1(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)},longest_match=(t,e)=>{let r,i,n=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match;const h=t.strstart>t.w_size-MIN_LOOKAHEAD?t.strstart-(t.w_size-MIN_LOOKAHEAD):0,c=t.window,u=t.w_mask,l=t.prev,f=t.strstart+MAX_MATCH;let d=c[s+a-1],p=c[s+a];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(r=e,c[r+a]===p&&c[r+a-1]===d&&c[r]===c[s]&&c[++r]===c[s+1]){s+=2,r++;do{}while(c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&s<f);if(i=MAX_MATCH-(f-s),s=f-MAX_MATCH,i>a){if(t.match_start=e,a=i,i>=o)break;d=c[s+a-1],p=c[s+a]}}}while((e=l[e&u])>h&&0!==--n);return a<=t.lookahead?a:t.lookahead},fill_window=t=>{const e=t.w_size;let r,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-MIN_LOOKAHEAD)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),slide_hash(t),i+=e),0===t.strm.avail_in)break;if(r=read_buf(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=r,t.lookahead+t.insert>=MIN_MATCH)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=HASH(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=HASH(t,t.ins_h,t.window[n+MIN_MATCH-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<MIN_MATCH)););}while(t.lookahead<MIN_LOOKAHEAD&&0!==t.strm.avail_in)},deflate_stored=(t,e)=>{let r,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,a=0,o=t.strm.avail_in;do{if(r=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,r>i+t.strm.avail_in&&(r=i+t.strm.avail_in),r>n&&(r=n),r<s&&(0===r&&e!==Z_FINISH$3||e===Z_NO_FLUSH$2||r!==i+t.strm.avail_in))break;a=e===Z_FINISH$3&&r===i+t.strm.avail_in?1:0,_tr_stored_block(t,0,0,a),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,flush_pending(t.strm),i&&(i>r&&(i=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,r-=i),r&&(read_buf(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(0===a);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),a?BS_FINISH_DONE:e!==Z_NO_FLUSH$2&&e!==Z_FINISH$3&&0===t.strm.avail_in&&t.strstart===t.block_start?BS_BLOCK_DONE:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(read_buf(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===Z_FINISH$3)&&e!==Z_NO_FLUSH$2&&0===t.strm.avail_in&&i<=n)&&(r=i>n?n:i,a=e===Z_FINISH$3&&0===t.strm.avail_in&&r===i?1:0,_tr_stored_block(t,t.block_start,r,a),t.block_start+=r,flush_pending(t.strm)),a?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(t,e)=>{let r,i;for(;;){if(t.lookahead<MIN_LOOKAHEAD){if(fill_window(t),t.lookahead<MIN_LOOKAHEAD&&e===Z_NO_FLUSH$2)return BS_NEED_MORE;if(0===t.lookahead)break}if(r=0,t.lookahead>=MIN_MATCH&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-MIN_LOOKAHEAD&&(t.match_length=longest_match(t,r)),t.match_length>=MIN_MATCH)if(i=_tr_tally(t,t.strstart-t.match_start,t.match_length-MIN_MATCH),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=MIN_MATCH){t.match_length--;do{t.strstart++,t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+1]);else i=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE}return t.insert=t.strstart<MIN_MATCH-1?t.strstart:MIN_MATCH-1,e===Z_FINISH$3?(flush_block_only(t,!0),0===t.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),0===t.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_slow=(t,e)=>{let r,i,n;for(;;){if(t.lookahead<MIN_LOOKAHEAD){if(fill_window(t),t.lookahead<MIN_LOOKAHEAD&&e===Z_NO_FLUSH$2)return BS_NEED_MORE;if(0===t.lookahead)break}if(r=0,t.lookahead>=MIN_MATCH&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=MIN_MATCH-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-MIN_LOOKAHEAD&&(t.match_length=longest_match(t,r),t.match_length<=5&&(t.strategy===Z_FILTERED||t.match_length===MIN_MATCH&&t.strstart-t.match_start>4096)&&(t.match_length=MIN_MATCH-1)),t.prev_length>=MIN_MATCH&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-MIN_MATCH,i=_tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-MIN_MATCH),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=HASH(t,t.ins_h,t.window[t.strstart+MIN_MATCH-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=MIN_MATCH-1,t.strstart++,i&&(flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE}else if(t.match_available){if(i=_tr_tally(t,0,t.window[t.strstart-1]),i&&flush_block_only(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return BS_NEED_MORE}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=_tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<MIN_MATCH-1?t.strstart:MIN_MATCH-1,e===Z_FINISH$3?(flush_block_only(t,!0),0===t.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),0===t.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_rle=(t,e)=>{let r,i,n,s;const a=t.window;for(;;){if(t.lookahead<=MAX_MATCH){if(fill_window(t),t.lookahead<=MAX_MATCH&&e===Z_NO_FLUSH$2)return BS_NEED_MORE;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=MIN_MATCH&&t.strstart>0&&(n=t.strstart-1,i=a[n],i===a[++n]&&i===a[++n]&&i===a[++n])){s=t.strstart+MAX_MATCH;do{}while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&n<s);t.match_length=MAX_MATCH-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=MIN_MATCH?(r=_tr_tally(t,1,t.match_length-MIN_MATCH),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE}return t.insert=0,e===Z_FINISH$3?(flush_block_only(t,!0),0===t.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),0===t.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(t,e)=>{let r;for(;;){if(0===t.lookahead&&(fill_window(t),0===t.lookahead)){if(e===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(t.match_length=0,r=_tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(flush_block_only(t,!1),0===t.strm.avail_out))return BS_NEED_MORE}return t.insert=0,e===Z_FINISH$3?(flush_block_only(t,!0),0===t.strm.avail_out?BS_FINISH_STARTED:BS_FINISH_DONE):t.sym_next&&(flush_block_only(t,!1),0===t.strm.avail_out)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}const configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],lm_init=t=>{t.window_size=2*t.w_size,zero(t.head),t.max_lazy_match=configuration_table[t.level].max_lazy,t.good_match=configuration_table[t.level].good_length,t.nice_match=configuration_table[t.level].nice_length,t.max_chain_length=configuration_table[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=MIN_MATCH-1,t.match_available=0,t.ins_h=0};function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(2*HEAP_SIZE),this.dyn_dtree=new Uint16Array(2*(2*D_CODES+1)),this.bl_tree=new Uint16Array(2*(2*BL_CODES+1)),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(MAX_BITS+1),this.heap=new Uint16Array(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const deflateStateCheck=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==INIT_STATE&&e.status!==GZIP_STATE&&e.status!==EXTRA_STATE&&e.status!==NAME_STATE&&e.status!==COMMENT_STATE&&e.status!==HCRC_STATE&&e.status!==BUSY_STATE&&e.status!==FINISH_STATE?1:0},deflateResetKeep=t=>{if(deflateStateCheck(t))return err(t,Z_STREAM_ERROR$2);t.total_in=t.total_out=0,t.data_type=Z_UNKNOWN;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?GZIP_STATE:e.wrap?INIT_STATE:BUSY_STATE,t.adler=2===e.wrap?0:1,e.last_flush=-2,_tr_init(e),Z_OK$3},deflateReset=t=>{const e=deflateResetKeep(t);return e===Z_OK$3&&lm_init(t.state),e},deflateSetHeader=(t,e)=>deflateStateCheck(t)||2!==t.state.wrap?Z_STREAM_ERROR$2:(t.state.gzhead=e,Z_OK$3),deflateInit2=(t,e,r,i,n,s)=>{if(!t)return Z_STREAM_ERROR$2;let a=1;if(e===Z_DEFAULT_COMPRESSION$1&&(e=6),i<0?(a=0,i=-i):i>15&&(a=2,i-=16),n<1||n>MAX_MEM_LEVEL||r!==Z_DEFLATED$2||i<8||i>15||e<0||e>9||s<0||s>Z_FIXED||8===i&&1!==a)return err(t,Z_STREAM_ERROR$2);8===i&&(i=9);const o=new DeflateState;return t.state=o,o.strm=t,o.status=INIT_STATE,o.wrap=a,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+MIN_MATCH-1)/MIN_MATCH),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=r,deflateReset(t)},deflateInit=(t,e)=>deflateInit2(t,e,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(t,e)=>{if(deflateStateCheck(t)||e>Z_BLOCK$1||e<0)return t?err(t,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const r=t.state;if(!t.output||0!==t.avail_in&&!t.input||r.status===FINISH_STATE&&e!==Z_FINISH$3)return err(t,0===t.avail_out?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const i=r.last_flush;if(r.last_flush=e,0!==r.pending){if(flush_pending(t),0===t.avail_out)return r.last_flush=-1,Z_OK$3}else if(0===t.avail_in&&rank(e)<=rank(i)&&e!==Z_FINISH$3)return err(t,Z_BUF_ERROR$1);if(r.status===FINISH_STATE&&0!==t.avail_in)return err(t,Z_BUF_ERROR$1);if(r.status===INIT_STATE&&0===r.wrap&&(r.status=BUSY_STATE),r.status===INIT_STATE){let e=Z_DEFLATED$2+(r.w_bits-8<<4)<<8,i=-1;if(i=r.strategy>=Z_HUFFMAN_ONLY||r.level<2?0:r.level<6?1:6===r.level?2:3,e|=i<<6,0!==r.strstart&&(e|=PRESET_DICT),e+=31-e%31,putShortMSB(r,e),0!==r.strstart&&(putShortMSB(r,t.adler>>>16),putShortMSB(r,65535&t.adler)),t.adler=1,r.status=BUSY_STATE,flush_pending(t),0!==r.pending)return r.last_flush=-1,Z_OK$3}if(r.status===GZIP_STATE)if(t.adler=0,put_byte(r,31),put_byte(r,139),put_byte(r,8),r.gzhead)put_byte(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),put_byte(r,255&r.gzhead.time),put_byte(r,r.gzhead.time>>8&255),put_byte(r,r.gzhead.time>>16&255),put_byte(r,r.gzhead.time>>24&255),put_byte(r,9===r.level?2:r.strategy>=Z_HUFFMAN_ONLY||r.level<2?4:0),put_byte(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(put_byte(r,255&r.gzhead.extra.length),put_byte(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=EXTRA_STATE;else if(put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,0),put_byte(r,9===r.level?2:r.strategy>=Z_HUFFMAN_ONLY||r.level<2?4:0),put_byte(r,OS_CODE),r.status=BUSY_STATE,flush_pending(t),0!==r.pending)return r.last_flush=-1,Z_OK$3;if(r.status===EXTRA_STATE){if(r.gzhead.extra){let e=r.pending,i=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+i>r.pending_buf_size;){let n=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>e&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex+=n,flush_pending(t),0!==r.pending)return r.last_flush=-1,Z_OK$3;e=0,i-=n}let n=new Uint8Array(r.gzhead.extra);r.pending_buf.set(n.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending+=i,r.gzhead.hcrc&&r.pending>e&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex=0}r.status=NAME_STATE}if(r.status===NAME_STATE){if(r.gzhead.name){let e,i=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-i,i)),flush_pending(t),0!==r.pending)return r.last_flush=-1,Z_OK$3;i=0}e=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,put_byte(r,e)}while(0!==e);r.gzhead.hcrc&&r.pending>i&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-i,i)),r.gzindex=0}r.status=COMMENT_STATE}if(r.status===COMMENT_STATE){if(r.gzhead.comment){let e,i=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-i,i)),flush_pending(t),0!==r.pending)return r.last_flush=-1,Z_OK$3;i=0}e=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,put_byte(r,e)}while(0!==e);r.gzhead.hcrc&&r.pending>i&&(t.adler=crc32_1(t.adler,r.pending_buf,r.pending-i,i))}r.status=HCRC_STATE}if(r.status===HCRC_STATE){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(flush_pending(t),0!==r.pending))return r.last_flush=-1,Z_OK$3;put_byte(r,255&t.adler),put_byte(r,t.adler>>8&255),t.adler=0}if(r.status=BUSY_STATE,flush_pending(t),0!==r.pending)return r.last_flush=-1,Z_OK$3}if(0!==t.avail_in||0!==r.lookahead||e!==Z_NO_FLUSH$2&&r.status!==FINISH_STATE){let i=0===r.level?deflate_stored(r,e):r.strategy===Z_HUFFMAN_ONLY?deflate_huff(r,e):r.strategy===Z_RLE?deflate_rle(r,e):configuration_table[r.level].func(r,e);if(i!==BS_FINISH_STARTED&&i!==BS_FINISH_DONE||(r.status=FINISH_STATE),i===BS_NEED_MORE||i===BS_FINISH_STARTED)return 0===t.avail_out&&(r.last_flush=-1),Z_OK$3;if(i===BS_BLOCK_DONE&&(e===Z_PARTIAL_FLUSH?_tr_align(r):e!==Z_BLOCK$1&&(_tr_stored_block(r,0,0,!1),e===Z_FULL_FLUSH$1&&(zero(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),flush_pending(t),0===t.avail_out))return r.last_flush=-1,Z_OK$3}return e!==Z_FINISH$3?Z_OK$3:r.wrap<=0?Z_STREAM_END$3:(2===r.wrap?(put_byte(r,255&t.adler),put_byte(r,t.adler>>8&255),put_byte(r,t.adler>>16&255),put_byte(r,t.adler>>24&255),put_byte(r,255&t.total_in),put_byte(r,t.total_in>>8&255),put_byte(r,t.total_in>>16&255),put_byte(r,t.total_in>>24&255)):(putShortMSB(r,t.adler>>>16),putShortMSB(r,65535&t.adler)),flush_pending(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?Z_OK$3:Z_STREAM_END$3)},deflateEnd=t=>{if(deflateStateCheck(t))return Z_STREAM_ERROR$2;const e=t.state.status;return t.state=null,e===BUSY_STATE?err(t,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(t,e)=>{let r=e.length;if(deflateStateCheck(t))return Z_STREAM_ERROR$2;const i=t.state,n=i.wrap;if(2===n||1===n&&i.status!==INIT_STATE||i.lookahead)return Z_STREAM_ERROR$2;if(1===n&&(t.adler=adler32_1(t.adler,e,r,0)),i.wrap=0,r>=i.w_size){0===n&&(zero(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(r-i.w_size,r),0),e=t,r=i.w_size}const s=t.avail_in,a=t.next_in,o=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,fill_window(i);i.lookahead>=MIN_MATCH;){let t=i.strstart,e=i.lookahead-(MIN_MATCH-1);do{i.ins_h=HASH(i,i.ins_h,i.window[t+MIN_MATCH-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=MIN_MATCH-1,fill_window(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=MIN_MATCH-1,i.match_available=0,t.next_in=a,t.input=o,t.avail_in=s,i.wrap=n,Z_OK$3};var deflateInit_1=deflateInit,deflateInit2_1=deflateInit2,deflateReset_1=deflateReset,deflateResetKeep_1=deflateResetKeep,deflateSetHeader_1=deflateSetHeader,deflate_2$1=deflate$2,deflateEnd_1=deflateEnd,deflateSetDictionary_1=deflateSetDictionary,deflateInfo="pako deflate (from Nodeca project)",deflate_1$2={deflateInit:deflateInit_1,deflateInit2:deflateInit2_1,deflateReset:deflateReset_1,deflateResetKeep:deflateResetKeep_1,deflateSetHeader:deflateSetHeader_1,deflate:deflate_2$1,deflateEnd:deflateEnd_1,deflateSetDictionary:deflateSetDictionary_1,deflateInfo:deflateInfo};const _has=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var assign=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)_has(r,e)&&(t[e]=r[e])}}return t},flattenChunks=t=>{let e=0;for(let r=0,i=t.length;r<i;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];r.set(n,i),i+=n.length}return r},common={assign:assign,flattenChunks:flattenChunks};let STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){STR_APPLY_UIA_OK=!1}const _utf8len=new Uint8Array(256);for(let t=0;t<256;t++)_utf8len[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,i,n,s,a=t.length,o=0;for(n=0;n<a;n++)r=t.charCodeAt(n),55296==(64512&r)&&n+1<a&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(r=65536+(r-55296<<10)+(i-56320),n++)),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(o),s=0,n=0;s<o;n++)r=t.charCodeAt(n),55296==(64512&r)&&n+1<a&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?e[s++]=r:r<2048?(e[s++]=192|r>>>6,e[s++]=128|63&r):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e};const buf2binstring=(t,e)=>{if(e<65534&&t.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let i=0;i<e;i++)r+=String.fromCharCode(t[i]);return r};var buf2string=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*r);for(n=0,i=0;i<r;){let e=t[i++];if(e<128){s[n++]=e;continue}let a=_utf8len[e];if(a>4)s[n++]=65533,i+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&i<r;)e=e<<6|63&t[i++],a--;a>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return buf2binstring(s,n)},utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+_utf8len[t[r]]>e?r:e},strings={string2buf:string2buf,buf2string:buf2string,utf8border:utf8border};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream;const toString$1=Object.prototype.toString,{Z_NO_FLUSH:Z_NO_FLUSH$1,Z_SYNC_FLUSH:Z_SYNC_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH,Z_FINISH:Z_FINISH$2,Z_OK:Z_OK$2,Z_STREAM_END:Z_STREAM_END$2,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY,Z_DEFLATED:Z_DEFLATED$1}=constants$2;function Deflate$1(t){this.options=common.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let r=deflate_1$2.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Z_OK$2)throw new Error(messages[r]);if(e.header&&deflate_1$2.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?strings.string2buf(e.dictionary):"[object ArrayBuffer]"===toString$1.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=deflate_1$2.deflateSetDictionary(this.strm,t),r!==Z_OK$2)throw new Error(messages[r]);this._dict_set=!0}}function deflate$1(t,e){const r=new Deflate$1(e);if(r.push(t,!0),r.err)throw r.msg||messages[r.err];return r.result}function deflateRaw$1(t,e){return(e=e||{}).raw=!0,deflate$1(t,e)}function gzip$1(t,e){return(e=e||{}).gzip=!0,deflate$1(t,e)}Deflate$1.prototype.push=function(t,e){const r=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Z_FINISH$2:Z_NO_FLUSH$1,"string"==typeof t?r.input=strings.string2buf(t):"[object ArrayBuffer]"===toString$1.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(s===Z_SYNC_FLUSH||s===Z_FULL_FLUSH)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(n=deflate_1$2.deflate(r,s),n===Z_STREAM_END$2)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),n=deflate_1$2.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Z_OK$2;if(0!==r.avail_out){if(s>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Deflate$1.prototype.onData=function(t){this.chunks.push(t)},Deflate$1.prototype.onEnd=function(t){t===Z_OK$2&&(this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Deflate_1$1=Deflate$1,deflate_2=deflate$1,deflateRaw_1$1=deflateRaw$1,gzip_1$1=gzip$1,constants$1=constants$2,deflate_1$1={Deflate:Deflate_1$1,deflate:deflate_2,deflateRaw:deflateRaw_1$1,gzip:gzip_1$1,constants:constants$1};const BAD$1=16209,TYPE$1=16191;var inffast=function(t,e){let r,i,n,s,a,o,h,c,u,l,f,d,p,_,g,b,m,y,v,S,E,w,R,T;const x=t.state;r=t.next_in,R=t.input,i=r+(t.avail_in-5),n=t.next_out,T=t.output,s=n-(e-t.avail_out),a=n+(t.avail_out-257),o=x.dmax,h=x.wsize,c=x.whave,u=x.wnext,l=x.window,f=x.hold,d=x.bits,p=x.lencode,_=x.distcode,g=(1<<x.lenbits)-1,b=(1<<x.distbits)-1;t:do{d<15&&(f+=R[r++]<<d,d+=8,f+=R[r++]<<d,d+=8),m=p[f&g];e:for(;;){if(y=m>>>24,f>>>=y,d-=y,y=m>>>16&255,0===y)T[n++]=65535&m;else{if(!(16&y)){if(64&y){if(32&y){x.mode=TYPE$1;break t}t.msg="invalid literal/length code",x.mode=BAD$1;break t}m=p[(65535&m)+(f&(1<<y)-1)];continue e}for(v=65535&m,y&=15,y&&(d<y&&(f+=R[r++]<<d,d+=8),v+=f&(1<<y)-1,f>>>=y,d-=y),d<15&&(f+=R[r++]<<d,d+=8,f+=R[r++]<<d,d+=8),m=_[f&b];;){if(y=m>>>24,f>>>=y,d-=y,y=m>>>16&255,16&y){if(S=65535&m,y&=15,d<y&&(f+=R[r++]<<d,d+=8,d<y&&(f+=R[r++]<<d,d+=8)),S+=f&(1<<y)-1,S>o){t.msg="invalid distance too far back",x.mode=BAD$1;break t}if(f>>>=y,d-=y,y=n-s,S>y){if(y=S-y,y>c&&x.sane){t.msg="invalid distance too far back",x.mode=BAD$1;break t}if(E=0,w=l,0===u){if(E+=h-y,y<v){v-=y;do{T[n++]=l[E++]}while(--y);E=n-S,w=T}}else if(u<y){if(E+=h+u-y,y-=u,y<v){v-=y;do{T[n++]=l[E++]}while(--y);if(E=0,u<v){y=u,v-=y;do{T[n++]=l[E++]}while(--y);E=n-S,w=T}}}else if(E+=u-y,y<v){v-=y;do{T[n++]=l[E++]}while(--y);E=n-S,w=T}for(;v>2;)T[n++]=w[E++],T[n++]=w[E++],T[n++]=w[E++],v-=3;v&&(T[n++]=w[E++],v>1&&(T[n++]=w[E++]))}else{E=n-S;do{T[n++]=T[E++],T[n++]=T[E++],T[n++]=T[E++],v-=3}while(v>2);v&&(T[n++]=T[E++],v>1&&(T[n++]=T[E++]))}break}if(64&y){t.msg="invalid distance code",x.mode=BAD$1;break t}m=_[(65535&m)+(f&(1<<y)-1)]}}break}}while(r<i&&n<a);v=d>>3,r-=v,d-=v<<3,f&=(1<<d)-1,t.next_in=r,t.next_out=n,t.avail_in=r<i?i-r+5:5-(r-i),t.avail_out=n<a?a-n+257:257-(n-a),x.hold=f,x.bits=d};const MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),lext=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),dbase=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),dext=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),inflate_table=(t,e,r,i,n,s,a,o)=>{const h=o.bits;let c,u,l,f,d,p,_=0,g=0,b=0,m=0,y=0,v=0,S=0,E=0,w=0,R=0,T=null;const x=new Uint16Array(MAXBITS+1),A=new Uint16Array(MAXBITS+1);let D,k,C,I=null;for(_=0;_<=MAXBITS;_++)x[_]=0;for(g=0;g<i;g++)x[e[r+g]]++;for(y=h,m=MAXBITS;m>=1&&0===x[m];m--);if(y>m&&(y=m),0===m)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b<m&&0===x[b];b++);for(y<b&&(y=b),E=1,_=1;_<=MAXBITS;_++)if(E<<=1,E-=x[_],E<0)return-1;if(E>0&&(t===CODES$1||1!==m))return-1;for(A[1]=0,_=1;_<MAXBITS;_++)A[_+1]=A[_]+x[_];for(g=0;g<i;g++)0!==e[r+g]&&(a[A[e[r+g]]++]=g);if(t===CODES$1?(T=I=a,p=20):t===LENS$1?(T=lbase,I=lext,p=257):(T=dbase,I=dext,p=0),R=0,g=0,_=b,d=s,v=y,S=0,l=-1,w=1<<y,f=w-1,t===LENS$1&&w>ENOUGH_LENS$1||t===DISTS$1&&w>ENOUGH_DISTS$1)return 1;for(;;){D=_-S,a[g]+1<p?(k=0,C=a[g]):a[g]>=p?(k=I[a[g]-p],C=T[a[g]-p]):(k=96,C=0),c=1<<_-S,u=1<<v,b=u;do{u-=c,n[d+(R>>S)+u]=D<<24|k<<16|C}while(0!==u);for(c=1<<_-1;R&c;)c>>=1;if(0!==c?(R&=c-1,R+=c):R=0,g++,0===--x[_]){if(_===m)break;_=e[r+a[g]]}if(_>y&&(R&f)!==l){for(0===S&&(S=y),d+=b,v=_-S,E=1<<v;v+S<m&&(E-=x[v+S],!(E<=0));)v++,E<<=1;if(w+=1<<v,t===LENS$1&&w>ENOUGH_LENS$1||t===DISTS$1&&w>ENOUGH_DISTS$1)return 1;l=R&f,n[l]=y<<24|v<<16|d-s}}return 0!==R&&(n[d+R]=_-S<<24|64<<16),o.bits=y,0};var inftrees=inflate_table;const CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK:Z_BLOCK,Z_TREES:Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR:Z_BUF_ERROR,Z_DEFLATED:Z_DEFLATED}=constants$2,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function InflateState(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const inflateStateCheck=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<HEAD||e.mode>SYNC?1:0},inflateResetKeep=t=>{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=HEAD,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(ENOUGH_LENS),e.distcode=e.distdyn=new Int32Array(ENOUGH_DISTS),e.sane=1,e.back=-1,Z_OK$1},inflateReset=t=>{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,inflateResetKeep(t)},inflateReset2=(t,e)=>{let r;if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const i=t.state;return e<0?(r=0,e=-e):(r=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Z_STREAM_ERROR$1:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,inflateReset(t))},inflateInit2=(t,e)=>{if(!t)return Z_STREAM_ERROR$1;const r=new InflateState;t.state=r,r.strm=t,r.window=null,r.mode=HEAD;const i=inflateReset2(t,e);return i!==Z_OK$1&&(t.state=null),i},inflateInit=t=>inflateInit2(t,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=t=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(inftrees(LENS,t.lens,0,288,lenfix,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;inftrees(DISTS,t.lens,0,32,distfix,0,t.work,{bits:5}),virgin=!1}t.lencode=lenfix,t.lenbits=9,t.distcode=distfix,t.distbits=5},updatewindow=(t,e,r,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(r-s.wsize,r),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(r-i,r-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(r-i,r),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0},inflate$2=(t,e)=>{let r,i,n,s,a,o,h,c,u,l,f,d,p,_,g,b,m,y,v,S,E,w,R=0;const T=new Uint8Array(4);let x,A;const D=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(t)||!t.output||!t.input&&0!==t.avail_in)return Z_STREAM_ERROR$1;r=t.state,r.mode===TYPE&&(r.mode=TYPEDO),a=t.next_out,n=t.output,h=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,c=r.hold,u=r.bits,l=o,f=h,w=Z_OK$1;t:for(;;)switch(r.mode){case HEAD:if(0===r.wrap){r.mode=TYPEDO;break}for(;u<16;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}if(2&r.wrap&&35615===c){0===r.wbits&&(r.wbits=15),r.check=0,T[0]=255&c,T[1]=c>>>8&255,r.check=crc32_1(r.check,T,2,0),c=0,u=0,r.mode=FLAGS;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=BAD;break}if((15&c)!==Z_DEFLATED){t.msg="unknown compression method",r.mode=BAD;break}if(c>>>=4,u-=4,E=8+(15&c),0===r.wbits&&(r.wbits=E),E>15||E>r.wbits){t.msg="invalid window size",r.mode=BAD;break}r.dmax=1<<r.wbits,r.flags=0,t.adler=r.check=1,r.mode=512&c?DICTID:TYPE,c=0,u=0;break;case FLAGS:for(;u<16;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}if(r.flags=c,(255&r.flags)!==Z_DEFLATED){t.msg="unknown compression method",r.mode=BAD;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=BAD;break}r.head&&(r.head.text=c>>8&1),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,r.check=crc32_1(r.check,T,2,0)),c=0,u=0,r.mode=TIME;case TIME:for(;u<32;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}r.head&&(r.head.time=c),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,r.check=crc32_1(r.check,T,4,0)),c=0,u=0,r.mode=OS;case OS:for(;u<16;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,r.check=crc32_1(r.check,T,2,0)),c=0,u=0,r.mode=EXLEN;case EXLEN:if(1024&r.flags){for(;u<16;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}r.length=c,r.head&&(r.head.extra_len=c),512&r.flags&&4&r.wrap&&(T[0]=255&c,T[1]=c>>>8&255,r.check=crc32_1(r.check,T,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=EXTRA;case EXTRA:if(1024&r.flags&&(d=r.length,d>o&&(d=o),d&&(r.head&&(E=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(i.subarray(s,s+d),E)),512&r.flags&&4&r.wrap&&(r.check=crc32_1(r.check,i,d,s)),o-=d,s+=d,r.length-=d),r.length))break t;r.length=0,r.mode=NAME;case NAME:if(2048&r.flags){if(0===o)break t;d=0;do{E=i[s+d++],r.head&&E&&r.length<65536&&(r.head.name+=String.fromCharCode(E))}while(E&&d<o);if(512&r.flags&&4&r.wrap&&(r.check=crc32_1(r.check,i,d,s)),o-=d,s+=d,E)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=COMMENT;case COMMENT:if(4096&r.flags){if(0===o)break t;d=0;do{E=i[s+d++],r.head&&E&&r.length<65536&&(r.head.comment+=String.fromCharCode(E))}while(E&&d<o);if(512&r.flags&&4&r.wrap&&(r.check=crc32_1(r.check,i,d,s)),o-=d,s+=d,E)break t}else r.head&&(r.head.comment=null);r.mode=HCRC;case HCRC:if(512&r.flags){for(;u<16;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}if(4&r.wrap&&c!==(65535&r.check)){t.msg="header crc mismatch",r.mode=BAD;break}c=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=TYPE;break;case DICTID:for(;u<32;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}t.adler=r.check=zswap32(c),c=0,u=0,r.mode=DICT;case DICT:if(0===r.havedict)return t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=c,r.bits=u,Z_NEED_DICT$1;t.adler=r.check=1,r.mode=TYPE;case TYPE:if(e===Z_BLOCK||e===Z_TREES)break t;case TYPEDO:if(r.last){c>>>=7&u,u-=7&u,r.mode=CHECK;break}for(;u<3;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}switch(r.last=1&c,c>>>=1,u-=1,3&c){case 0:r.mode=STORED;break;case 1:if(fixedtables(r),r.mode=LEN_,e===Z_TREES){c>>>=2,u-=2;break t}break;case 2:r.mode=TABLE;break;case 3:t.msg="invalid block type",r.mode=BAD}c>>>=2,u-=2;break;case STORED:for(c>>>=7&u,u-=7&u;u<32;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}if((65535&c)!=(c>>>16^65535)){t.msg="invalid stored block lengths",r.mode=BAD;break}if(r.length=65535&c,c=0,u=0,r.mode=COPY_,e===Z_TREES)break t;case COPY_:r.mode=COPY;case COPY:if(d=r.length,d){if(d>o&&(d=o),d>h&&(d=h),0===d)break t;n.set(i.subarray(s,s+d),a),o-=d,s+=d,h-=d,a+=d,r.length-=d;break}r.mode=TYPE;break;case TABLE:for(;u<14;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}if(r.nlen=257+(31&c),c>>>=5,u-=5,r.ndist=1+(31&c),c>>>=5,u-=5,r.ncode=4+(15&c),c>>>=4,u-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=BAD;break}r.have=0,r.mode=LENLENS;case LENLENS:for(;r.have<r.ncode;){for(;u<3;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}r.lens[D[r.have++]]=7&c,c>>>=3,u-=3}for(;r.have<19;)r.lens[D[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,x={bits:r.lenbits},w=inftrees(CODES,r.lens,0,19,r.lencode,0,r.work,x),r.lenbits=x.bits,w){t.msg="invalid code lengths set",r.mode=BAD;break}r.have=0,r.mode=CODELENS;case CODELENS:for(;r.have<r.nlen+r.ndist;){for(;R=r.lencode[c&(1<<r.lenbits)-1],g=R>>>24,b=R>>>16&255,m=65535&R,!(g<=u);){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}if(m<16)c>>>=g,u-=g,r.lens[r.have++]=m;else{if(16===m){for(A=g+2;u<A;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}if(c>>>=g,u-=g,0===r.have){t.msg="invalid bit length repeat",r.mode=BAD;break}E=r.lens[r.have-1],d=3+(3&c),c>>>=2,u-=2}else if(17===m){for(A=g+3;u<A;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}c>>>=g,u-=g,E=0,d=3+(7&c),c>>>=3,u-=3}else{for(A=g+7;u<A;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}c>>>=g,u-=g,E=0,d=11+(127&c),c>>>=7,u-=7}if(r.have+d>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=BAD;break}for(;d--;)r.lens[r.have++]=E}}if(r.mode===BAD)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=BAD;break}if(r.lenbits=9,x={bits:r.lenbits},w=inftrees(LENS,r.lens,0,r.nlen,r.lencode,0,r.work,x),r.lenbits=x.bits,w){t.msg="invalid literal/lengths set",r.mode=BAD;break}if(r.distbits=6,r.distcode=r.distdyn,x={bits:r.distbits},w=inftrees(DISTS,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,x),r.distbits=x.bits,w){t.msg="invalid distances set",r.mode=BAD;break}if(r.mode=LEN_,e===Z_TREES)break t;case LEN_:r.mode=LEN;case LEN:if(o>=6&&h>=258){t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=c,r.bits=u,inffast(t,f),a=t.next_out,n=t.output,h=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,c=r.hold,u=r.bits,r.mode===TYPE&&(r.back=-1);break}for(r.back=0;R=r.lencode[c&(1<<r.lenbits)-1],g=R>>>24,b=R>>>16&255,m=65535&R,!(g<=u);){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}if(b&&!(240&b)){for(y=g,v=b,S=m;R=r.lencode[S+((c&(1<<y+v)-1)>>y)],g=R>>>24,b=R>>>16&255,m=65535&R,!(y+g<=u);){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}c>>>=y,u-=y,r.back+=y}if(c>>>=g,u-=g,r.back+=g,r.length=m,0===b){r.mode=LIT;break}if(32&b){r.back=-1,r.mode=TYPE;break}if(64&b){t.msg="invalid literal/length code",r.mode=BAD;break}r.extra=15&b,r.mode=LENEXT;case LENEXT:if(r.extra){for(A=r.extra;u<A;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=DIST;case DIST:for(;R=r.distcode[c&(1<<r.distbits)-1],g=R>>>24,b=R>>>16&255,m=65535&R,!(g<=u);){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}if(!(240&b)){for(y=g,v=b,S=m;R=r.distcode[S+((c&(1<<y+v)-1)>>y)],g=R>>>24,b=R>>>16&255,m=65535&R,!(y+g<=u);){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}c>>>=y,u-=y,r.back+=y}if(c>>>=g,u-=g,r.back+=g,64&b){t.msg="invalid distance code",r.mode=BAD;break}r.offset=m,r.extra=15&b,r.mode=DISTEXT;case DISTEXT:if(r.extra){for(A=r.extra;u<A;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=BAD;break}r.mode=MATCH;case MATCH:if(0===h)break t;if(d=f-h,r.offset>d){if(d=r.offset-d,d>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=BAD;break}d>r.wnext?(d-=r.wnext,p=r.wsize-d):p=r.wnext-d,d>r.length&&(d=r.length),_=r.window}else _=n,p=a-r.offset,d=r.length;d>h&&(d=h),h-=d,r.length-=d;do{n[a++]=_[p++]}while(--d);0===r.length&&(r.mode=LEN);break;case LIT:if(0===h)break t;n[a++]=r.length,h--,r.mode=LEN;break;case CHECK:if(r.wrap){for(;u<32;){if(0===o)break t;o--,c|=i[s++]<<u,u+=8}if(f-=h,t.total_out+=f,r.total+=f,4&r.wrap&&f&&(t.adler=r.check=r.flags?crc32_1(r.check,n,f,a-f):adler32_1(r.check,n,f,a-f)),f=h,4&r.wrap&&(r.flags?c:zswap32(c))!==r.check){t.msg="incorrect data check",r.mode=BAD;break}c=0,u=0}r.mode=LENGTH;case LENGTH:if(r.wrap&&r.flags){for(;u<32;){if(0===o)break t;o--,c+=i[s++]<<u,u+=8}if(4&r.wrap&&c!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=BAD;break}c=0,u=0}r.mode=DONE;case DONE:w=Z_STREAM_END$1;break t;case BAD:w=Z_DATA_ERROR$1;break t;case MEM:return Z_MEM_ERROR$1;default:return Z_STREAM_ERROR$1}return t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=c,r.bits=u,(r.wsize||f!==t.avail_out&&r.mode<BAD&&(r.mode<CHECK||e!==Z_FINISH$1))&&updatewindow(t,t.output,t.next_out,f-t.avail_out),l-=t.avail_in,f-=t.avail_out,t.total_in+=l,t.total_out+=f,r.total+=f,4&r.wrap&&f&&(t.adler=r.check=r.flags?crc32_1(r.check,n,f,t.next_out-f):adler32_1(r.check,n,f,t.next_out-f)),t.data_type=r.bits+(r.last?64:0)+(r.mode===TYPE?128:0)+(r.mode===LEN_||r.mode===COPY_?256:0),(0===l&&0===f||e===Z_FINISH$1)&&w===Z_OK$1&&(w=Z_BUF_ERROR),w},inflateEnd=t=>{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;let e=t.state;return e.window&&(e.window=null),t.state=null,Z_OK$1},inflateGetHeader=(t,e)=>{if(inflateStateCheck(t))return Z_STREAM_ERROR$1;const r=t.state;return 2&r.wrap?(r.head=e,e.done=!1,Z_OK$1):Z_STREAM_ERROR$1},inflateSetDictionary=(t,e)=>{const r=e.length;let i,n,s;return inflateStateCheck(t)?Z_STREAM_ERROR$1:(i=t.state,0!==i.wrap&&i.mode!==DICT?Z_STREAM_ERROR$1:i.mode===DICT&&(n=1,n=adler32_1(n,e,r,0),n!==i.check)?Z_DATA_ERROR$1:(s=updatewindow(t,e,r,r),s?(i.mode=MEM,Z_MEM_ERROR$1):(i.havedict=1,Z_OK$1)))};var inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$2,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo:inflateInfo};function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader;const toString=Object.prototype.toString,{Z_NO_FLUSH:Z_NO_FLUSH,Z_FINISH:Z_FINISH,Z_OK:Z_OK,Z_STREAM_END:Z_STREAM_END,Z_NEED_DICT:Z_NEED_DICT,Z_STREAM_ERROR:Z_STREAM_ERROR,Z_DATA_ERROR:Z_DATA_ERROR,Z_MEM_ERROR:Z_MEM_ERROR}=constants$2;function Inflate$1(t){this.options=common.assign({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let r=inflate_1$2.inflateInit2(this.strm,e.windowBits);if(r!==Z_OK)throw new Error(messages[r]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=strings.string2buf(e.dictionary):"[object ArrayBuffer]"===toString.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=inflate_1$2.inflateSetDictionary(this.strm,e.dictionary),r!==Z_OK)))throw new Error(messages[r])}function inflate$1(t,e){const r=new Inflate$1(e);if(r.push(t),r.err)throw r.msg||messages[r.err];return r.result}function inflateRaw$1(t,e){return(e=e||{}).raw=!0,inflate$1(t,e)}Inflate$1.prototype.push=function(t,e){const r=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,a,o;if(this.ended)return!1;for(a=e===~~e?e:!0===e?Z_FINISH:Z_NO_FLUSH,"[object ArrayBuffer]"===toString.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),s=inflate_1$2.inflate(r,a),s===Z_NEED_DICT&&n&&(s=inflate_1$2.inflateSetDictionary(r,n),s===Z_OK?s=inflate_1$2.inflate(r,a):s===Z_DATA_ERROR&&(s=Z_NEED_DICT));r.avail_in>0&&s===Z_STREAM_END&&r.state.wrap>0&&0!==t[r.next_in];)inflate_1$2.inflateReset(r),s=inflate_1$2.inflate(r,a);switch(s){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(s),this.ended=!0,!1}if(o=r.avail_out,r.next_out&&(0===r.avail_out||s===Z_STREAM_END))if("string"===this.options.to){let t=strings.utf8border(r.output,r.next_out),e=r.next_out-t,n=strings.buf2string(r.output,t);r.next_out=e,r.avail_out=i-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(n)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(s!==Z_OK||0!==o){if(s===Z_STREAM_END)return s=inflate_1$2.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Inflate$1.prototype.onData=function(t){this.chunks.push(t)},Inflate$1.prototype.onEnd=function(t){t===Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,constants=constants$2,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1,constants:constants};const{Deflate:Deflate,deflate:deflate,deflateRaw:deflateRaw,gzip:gzip}=deflate_1$1,{Inflate:Inflate,inflate:inflate,inflateRaw:inflateRaw,ungzip:ungzip}=inflate_1$1;var Deflate_1=Deflate,deflate_1=deflate,deflateRaw_1=deflateRaw,gzip_1=gzip,Inflate_1=Inflate,inflate_1=inflate,inflateRaw_1=inflateRaw,ungzip_1=ungzip,constants_1=constants$2,pako={Deflate:Deflate_1,deflate:deflate_1,deflateRaw:deflateRaw_1,gzip:gzip_1,Inflate:Inflate_1,inflate:inflate_1,inflateRaw:inflateRaw_1,ungzip:ungzip_1,constants:constants_1},BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";function int2char(t){return BI_RM.charAt(t)}function op_and(t,e){return t&e}function op_or(t,e){return t|e}function op_xor(t,e){return t^e}function op_andnot(t,e){return t&~e}function lbit(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function cbit(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64pad="=",decoder$1;function hex2b64(t){var e,r,i="";for(e=0;e+3<=t.length;e+=3)r=parseInt(t.substring(e,e+3),16),i+=b64map.charAt(r>>6)+b64map.charAt(63&r);for(e+1==t.length?(r=parseInt(t.substring(e,e+1),16),i+=b64map.charAt(r<<2)):e+2==t.length&&(r=parseInt(t.substring(e,e+2),16),i+=b64map.charAt(r>>2)+b64map.charAt((3&r)<<4));(3&i.length)>0;)i+=b64pad;return i}function b64tohex(t){var e,r="",i=0,n=0;for(e=0;e<t.length&&t.charAt(e)!=b64pad;++e){var s=b64map.indexOf(t.charAt(e));s<0||(0==i?(r+=int2char(s>>2),n=3&s,i=1):1==i?(r+=int2char(n<<2|s>>4),n=15&s,i=2):2==i?(r+=int2char(n),r+=int2char(s>>2),n=3&s,i=3):(r+=int2char(n<<2|s>>4),r+=int2char(15&s),i=0))}return 1==i&&(r+=int2char(n<<2)),r}var Hex={decode:function(t){var e;if(void 0===decoder$1){var r="0123456789ABCDEF",i=" \f\n\r\t \u2028\u2029";for(decoder$1={},e=0;e<16;++e)decoder$1[r.charAt(e)]=e;for(r=r.toLowerCase(),e=10;e<16;++e)decoder$1[r.charAt(e)]=e;for(e=0;e<8;++e)decoder$1[i.charAt(e)]=-1}var n=[],s=0,a=0;for(e=0;e<t.length;++e){var o=t.charAt(e);if("="==o)break;if(-1!=(o=decoder$1[o])){if(void 0===o)throw new Error("Illegal character at offset "+e);s|=o,++a>=2?(n[n.length]=s,s=0,a=0):s<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return n}},decoder,Base64={decode:function(t){var e;if(void 0===decoder){var r="= \f\n\r\t \u2028\u2029";for(decoder=Object.create(null),e=0;e<64;++e)decoder["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(decoder["-"]=62,decoder._=63,e=0;e<9;++e)decoder[r.charAt(e)]=-1}var i=[],n=0,s=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=decoder[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);n|=a,++s>=4?(i[i.length]=n>>16,i[i.length]=n>>8&255,i[i.length]=255&n,n=0,s=0):n<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=n>>10;break;case 3:i[i.length]=n>>16,i[i.length]=n>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=Base64.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return Base64.decode(t)}},max=1e13,Int10=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var r,i,n=this.buf,s=n.length;for(r=0;r<s;++r)(i=n[r]*t+e)<max?e=0:i-=(e=0|i/max)*max,n[r]=i;e>0&&(n[r]=e)},t.prototype.sub=function(t){var e,r,i=this.buf,n=i.length;for(e=0;e<n;++e)(r=i[e]-t)<0?(r+=max,t=1):t=0,i[e]=r;for(;0===i[i.length-1];)i.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,r=e[e.length-1].toString(),i=e.length-2;i>=0;--i)r+=(max+e[i]).toString().substring(1);return r},t.prototype.valueOf=function(){for(var t=this.buf,e=0,r=t.length-1;r>=0;--r)e=e*max+t[r];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),ellipsis="…",reTimeS=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,reTimeL=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function stringCut(t,e){return t.length>e&&(t=t.substring(0,e)+ellipsis),t}var Stream=function(){function t(e,r){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=r)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,r){for(var i="",n=t;n<e;++n)if(i+=this.hexByte(this.get(n)),!0!==r)switch(15&n){case 7:i+=" ";break;case 15:i+="\n";break;default:i+=" "}return i},t.prototype.isASCII=function(t,e){for(var r=t;r<e;++r){var i=this.get(r);if(i<32||i>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var r="",i=t;i<e;++i)r+=String.fromCharCode(this.get(i));return r},t.prototype.parseStringUTF=function(t,e){for(var r="",i=t;i<e;){var n=this.get(i++);r+=n<128?String.fromCharCode(n):n>191&&n<224?String.fromCharCode((31&n)<<6|63&this.get(i++)):String.fromCharCode((15&n)<<12|(63&this.get(i++))<<6|63&this.get(i++))}return r},t.prototype.parseStringBMP=function(t,e){for(var r,i,n="",s=t;s<e;)r=this.get(s++),i=this.get(s++),n+=String.fromCharCode(r<<8|i);return n},t.prototype.parseTime=function(t,e,r){var i=this.parseStringISO(t,e),n=(r?reTimeS:reTimeL).exec(i);return n?(r&&(n[1]=+n[1],n[1]+=+n[1]<70?2e3:1900),i=n[1]+"-"+n[2]+"-"+n[3]+" "+n[4],n[5]&&(i+=":"+n[5],n[6]&&(i+=":"+n[6],n[7]&&(i+="."+n[7]))),n[8]&&(i+=" UTC","Z"!=n[8]&&(i+=n[8],n[9]&&(i+=":"+n[9]))),i):"Unrecognized time: "+i},t.prototype.parseInteger=function(t,e){for(var r,i=this.get(t),n=i>127,s=n?255:0,a="";i==s&&++t<e;)i=this.get(t);if(0===(r=e-t))return n?-1:0;if(r>4){for(a=i,r<<=3;!(128&(+a^s));)a=+a<<1,--r;a="("+r+" bit)\n"}n&&(i-=256);for(var o=new Int10(i),h=t+1;h<e;++h)o.mulAdd(256,this.get(h));return a+o.toString()},t.prototype.parseBitString=function(t,e,r){for(var i=this.get(t),n="("+((e-t-1<<3)-i)+" bit)\n",s="",a=t+1;a<e;++a){for(var o=this.get(a),h=a==e-1?i:0,c=7;c>=h;--c)s+=o>>c&1?"1":"0";if(s.length>r)return n+stringCut(s,r)}return n+s},t.prototype.parseOctetString=function(t,e,r){if(this.isASCII(t,e))return stringCut(this.parseStringISO(t,e),r);var i=e-t,n="("+i+" byte)\n";i>(r/=2)&&(e=t+r);for(var s=t;s<e;++s)n+=this.hexByte(this.get(s));return i>r&&(n+=ellipsis),n},t.prototype.parseOID=function(t,e,r){for(var i="",n=new Int10,s=0,a=t;a<e;++a){var o=this.get(a);if(n.mulAdd(128,127&o),s+=7,!(128&o)){if(""===i)if((n=n.simplify())instanceof Int10)n.sub(80),i="2."+n.toString();else{var h=n<80?n<40?0:1:2;i=h+"."+(n-40*h)}else i+="."+n.toString();if(i.length>r)return stringCut(i,r);n=new Int10,s=0}}return s>0&&(i+=".incomplete"),i},t}(),ASN1=function(){function t(t,e,r,i,n){if(!(i instanceof ASN1Tag))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=r,this.tag=i,this.sub=n}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+r,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);case 6:return this.stream.parseOID(e,e+r,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return stringCut(this.stream.parseStringUTF(e,e+r),t);case 18:case 19:case 20:case 21:case 22:case 26:return stringCut(this.stream.parseStringISO(e,e+r),t);case 30:return stringCut(this.stream.parseStringBMP(e,e+r),t);case 23:case 24:return this.stream.parseTime(e,e+r,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var r=0,i=this.sub.length;r<i;++r)e+=this.sub[r].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),r=127&e;if(r==e)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===r)return null;e=0;for(var i=0;i<r;++i)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,r=2*this.length;return t.substring(e,e+r)},t.decode=function(e){var r;r=e instanceof Stream?e:new Stream(e,0);var i=new Stream(r),n=new ASN1Tag(r),s=t.decodeLength(r),a=r.pos,o=a-i.pos,h=null,c=function(){var e=[];if(null!==s){for(var i=a+s;r.pos<i;)e[e.length]=t.decode(r);if(r.pos!=i)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var n=t.decode(r);if(n.tag.isEOC())break;e[e.length]=n}s=a-r.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(n.tagConstructed)h=c();else if(n.isUniversal()&&(3==n.tagNumber||4==n.tagNumber))try{if(3==n.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");h=c();for(var u=0;u<h.length;++u)if(h[u].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){h=null}if(null===h){if(null===s)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);r.pos=a+Math.abs(s)}return new t(i,o,s,n,h)},t}(),ASN1Tag=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=!!(32&e),this.tagNumber=31&e,31==this.tagNumber){var r=new Int10;do{e=t.get(),r.mulAdd(128,127&e)}while(128&e);this.tagNumber=r.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),dbits,canary=0xdeadbeefcafe,j_lm=15715070==(16777215&canary),lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=(1<<26)/lowprimes[lowprimes.length-1],BigInteger=function(){function t(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<<e)-1,n=!1,s="",a=this.t,o=this.DB-a*this.DB%e;if(a-- >0)for(o<this.DB&&(r=this[a]>>o)>0&&(n=!0,s=int2char(r));a>=0;)o<e?(r=(this[a]&(1<<o)-1)<<e-o,r|=this[--a]>>(o+=this.DB-e)):(r=this[a]>>(o-=e)&i,o<=0&&(o+=this.DB,--a)),r>0&&(n=!0),n&&(s+=int2char(r));return n?s:"0"},t.prototype.negate=function(){var e=nbi();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var r=nbi();return this.abs().divRemTo(e,null,r),this.s<0&&r.compareTo(t.ZERO)>0&&e.subTo(r,r),r},t.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new Classic(e):new Montgomery(e),this.exp(t,r)},t.prototype.clone=function(){var t=nbi();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var r,i=this.DB-t*this.DB%8,n=0;if(t-- >0)for(i<this.DB&&(r=this[t]>>i)!=(this.s&this.DM)>>i&&(e[n++]=r|this.s<<this.DB-i);t>=0;)i<8?(r=(this[t]&(1<<i)-1)<<8-i,r|=this[--t]>>(i+=this.DB-8)):(r=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),128&r&&(r|=-256),0==n&&(128&this.s)!=(128&r)&&++n,(n>0||r!=this.s)&&(e[n++]=r);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=nbi();return this.bitwiseTo(t,op_and,e),e},t.prototype.or=function(t){var e=nbi();return this.bitwiseTo(t,op_or,e),e},t.prototype.xor=function(t){var e=nbi();return this.bitwiseTo(t,op_xor,e),e},t.prototype.andNot=function(t){var e=nbi();return this.bitwiseTo(t,op_andnot,e),e},t.prototype.not=function(){for(var t=nbi(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=nbi();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=nbi();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+lbit(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=cbit(this[r]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,op_or)},t.prototype.clearBit=function(t){return this.changeBit(t,op_andnot)},t.prototype.flipBit=function(t){return this.changeBit(t,op_xor)},t.prototype.add=function(t){var e=nbi();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=nbi();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=nbi();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=nbi();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=nbi();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=nbi(),r=nbi();return this.divRemTo(t,e,r),[e,r]},t.prototype.modPow=function(t,e){var r,i,n=t.bitLength(),s=nbv(1);if(n<=0)return s;r=n<18?1:n<48?3:n<144?4:n<768?5:6,i=n<8?new Classic(e):e.isEven()?new Barrett(e):new Montgomery(e);var a=[],o=3,h=r-1,c=(1<<r)-1;if(a[1]=i.convert(this),r>1){var u=nbi();for(i.sqrTo(a[1],u);o<=c;)a[o]=nbi(),i.mulTo(u,a[o-2],a[o]),o+=2}var l,f,d=t.t-1,p=!0,_=nbi();for(n=nbits(t[d])-1;d>=0;){for(n>=h?l=t[d]>>n-h&c:(l=(t[d]&(1<<n+1)-1)<<h-n,d>0&&(l|=t[d-1]>>this.DB+n-h)),o=r;!(1&l);)l>>=1,--o;if((n-=o)<0&&(n+=this.DB,--d),p)a[l].copyTo(s),p=!1;else{for(;o>1;)i.sqrTo(s,_),i.sqrTo(_,s),o-=2;o>0?i.sqrTo(s,_):(f=s,s=_,_=f),i.mulTo(_,a[l],s)}for(;d>=0&&!(t[d]&1<<n);)i.sqrTo(s,_),f=s,s=_,_=f,--n<0&&(n=this.DB-1,--d)}return i.revert(s)},t.prototype.modInverse=function(e){var r=e.isEven();if(this.isEven()&&r||0==e.signum())return t.ZERO;for(var i=e.clone(),n=this.clone(),s=nbv(1),a=nbv(0),o=nbv(0),h=nbv(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),r?(s.isEven()&&a.isEven()||(s.addTo(this,s),a.subTo(e,a)),s.rShiftTo(1,s)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;n.isEven();)n.rShiftTo(1,n),r?(o.isEven()&&h.isEven()||(o.addTo(this,o),h.subTo(e,h)),o.rShiftTo(1,o)):h.isEven()||h.subTo(e,h),h.rShiftTo(1,h);i.compareTo(n)>=0?(i.subTo(n,i),r&&s.subTo(o,s),a.subTo(h,a)):(n.subTo(i,n),r&&o.subTo(s,o),h.subTo(a,h))}return 0!=n.compareTo(t.ONE)?t.ZERO:h.compareTo(e)>=0?h.subtract(e):h.signum()<0?(h.addTo(e,h),h.signum()<0?h.add(e):h):h},t.prototype.pow=function(t){return this.exp(t,new NullExp)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var n=e.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return e;for(n<s&&(s=n),s>0&&(e.rShiftTo(s,e),r.rShiftTo(s,r));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r},t.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=lowprimes[lowprimes.length-1]){for(e=0;e<lowprimes.length;++e)if(r[0]==lowprimes[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<lowprimes.length;){for(var i=lowprimes[e],n=e+1;n<lowprimes.length&&i<lplim;)i*=lowprimes[n++];for(i=r.modInt(i);e<n;)if(i%lowprimes[e++]==0)return!1}return r.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,r){var i;if(16==r)i=4;else if(8==r)i=3;else if(256==r)i=8;else if(2==r)i=1;else if(32==r)i=5;else{if(4!=r)return void this.fromRadix(e,r);i=2}this.t=0,this.s=0;for(var n=e.length,s=!1,a=0;--n>=0;){var o=8==i?255&+e[n]:intAt(e,n);o<0?"-"==e.charAt(n)&&(s=!0):(s=!1,0==a?this[this.t++]=o:a+i>this.DB?(this[this.t-1]|=(o&(1<<this.DB-a)-1)<<a,this[this.t++]=o>>this.DB-a):this[this.t-1]|=o<<a,(a+=i)>=this.DB&&(a-=this.DB))}8==i&&128&+e[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),s&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var r=t%this.DB,i=this.DB-r,n=(1<<i)-1,s=Math.floor(t/this.DB),a=this.s<<r&this.DM,o=this.t-1;o>=0;--o)e[o+s+1]=this[o]>>i|a,a=(this[o]&n)<<r;for(o=s-1;o>=0;--o)e[o]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,n=this.DB-i,s=(1<<i)-1;e[0]=this[r]>>i;for(var a=r+1;a<this.t;++a)e[a-r-1]|=(this[a]&s)<<n,e[a-r]=this[a]>>i;i>0&&(e[this.t-r-1]|=(this.s&s)<<n),e.t=this.t-r,e.clamp()}},t.prototype.subTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this[r]-t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i-=t[r],e[r++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()},t.prototype.multiplyTo=function(e,r){var i=this.abs(),n=e.abs(),s=i.t;for(r.t=s+n.t;--s>=0;)r[s]=0;for(s=0;s<n.t;++s)r[s+i.t]=i.am(0,n[s],r,s,0,i.t);r.s=0,r.clamp(),this.s!=e.s&&t.ZERO.subTo(r,r)},t.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var i=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,i,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,r,i){var n=e.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t)return null!=r&&r.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=nbi());var a=nbi(),o=this.s,h=e.s,c=this.DB-nbits(n[n.t-1]);c>0?(n.lShiftTo(c,a),s.lShiftTo(c,i)):(n.copyTo(a),s.copyTo(i));var u=a.t,l=a[u-1];if(0!=l){var f=l*(1<<this.F1)+(u>1?a[u-2]>>this.F2:0),d=this.FV/f,p=(1<<this.F1)/f,_=1<<this.F2,g=i.t,b=g-u,m=null==r?nbi():r;for(a.dlShiftTo(b,m),i.compareTo(m)>=0&&(i[i.t++]=1,i.subTo(m,i)),t.ONE.dlShiftTo(u,m),m.subTo(a,a);a.t<u;)a[a.t++]=0;for(;--b>=0;){var y=i[--g]==l?this.DM:Math.floor(i[g]*d+(i[g-1]+_)*p);if((i[g]+=a.am(0,y,i,b,0,u))<y)for(a.dlShiftTo(b,m),i.subTo(m,i);i[g]<--y;)i.subTo(m,i)}null!=r&&(i.drShiftTo(u,r),o!=h&&t.ZERO.subTo(r,r)),i.t=u,i.clamp(),c>0&&i.rShiftTo(c,i),o<0&&t.ZERO.subTo(i,i)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,r){if(e>4294967295||e<1)return t.ONE;var i=nbi(),n=nbi(),s=r.convert(this),a=nbits(e)-1;for(s.copyTo(i);--a>=0;)if(r.sqrTo(i,n),(e&1<<a)>0)r.mulTo(n,s,i);else{var o=i;i=n,n=o}return r.revert(i)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=nbv(r),n=nbi(),s=nbi(),a="";for(this.divRemTo(i,n,s);n.signum()>0;)a=(r+s.intValue()).toString(t).substring(1)+a,n.divRemTo(i,n,s);return s.intValue().toString(t)+a},t.prototype.fromRadix=function(e,r){this.fromInt(0),null==r&&(r=10);for(var i=this.chunkSize(r),n=Math.pow(r,i),s=!1,a=0,o=0,h=0;h<e.length;++h){var c=intAt(e,h);c<0?"-"==e.charAt(h)&&0==this.signum()&&(s=!0):(o=r*o+c,++a>=i&&(this.dMultiply(n),this.dAddOffset(o,0),a=0,o=0))}a>0&&(this.dMultiply(Math.pow(r,a)),this.dAddOffset(o,0)),s&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,r,i){if("number"==typeof r)if(e<2)this.fromInt(1);else for(this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var n=[],s=7&e;n.length=1+(e>>3),r.nextBytes(n),s>0?n[0]&=(1<<s)-1:n[0]=0,this.fromString(n,256)}},t.prototype.bitwiseTo=function(t,e,r){var i,n,s=Math.min(t.t,this.t);for(i=0;i<s;++i)r[i]=e(this[i],t[i]);if(t.t<this.t){for(n=t.s&this.DM,i=s;i<this.t;++i)r[i]=e(this[i],n);r.t=this.t}else{for(n=this.s&this.DM,i=s;i<t.t;++i)r[i]=e(n,t[i]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},t.prototype.changeBit=function(e,r){var i=t.ONE.shiftLeft(e);return this.bitwiseTo(i,r,i),i},t.prototype.addTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this[r]+t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i+=t[r],e[r++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[r++]=i:i<-1&&(e[r++]=this.DV+i),e.t=r,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,r){var i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(var n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},t.prototype.multiplyUpperTo=function(t,e,r){--e;var i=r.t=this.t+t.t-e;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)r[this.t+i-e]=this.am(e-i,t[i],r,0,0,this.t+i-e);r.clamp(),r.drShiftTo(1,r)},t.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r},t.prototype.millerRabin=function(e){var r=this.subtract(t.ONE),i=r.getLowestSetBit();if(i<=0)return!1;var n=r.shiftRight(i);(e=e+1>>1)>lowprimes.length&&(e=lowprimes.length);for(var s=nbi(),a=0;a<e;++a){s.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var o=s.modPow(n,this);if(0!=o.compareTo(t.ONE)&&0!=o.compareTo(r)){for(var h=1;h++<i&&0!=o.compareTo(r);)if(0==(o=o.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=o.compareTo(r))return!1}}return!0},t.prototype.square=function(){var t=nbi();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var r=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(r.compareTo(i)<0){var n=r;r=i,i=n}var s=r.getLowestSetBit(),a=i.getLowestSetBit();if(a<0)e(r);else{s<a&&(a=s),a>0&&(r.rShiftTo(a,r),i.rShiftTo(a,i));var o=function(){(s=r.getLowestSetBit())>0&&r.rShiftTo(s,r),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),r.compareTo(i)>=0?(r.subTo(i,r),r.rShiftTo(1,r)):(i.subTo(r,i),i.rShiftTo(1,i)),r.signum()>0?setTimeout(o,0):(a>0&&i.lShiftTo(a,i),setTimeout(function(){e(i)},0))};setTimeout(o,10)}},t.prototype.fromNumberAsync=function(e,r,i,n){if("number"==typeof r)if(e<2)this.fromInt(1);else{this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);var s=this,a=function(){s.dAddOffset(2,0),s.bitLength()>e&&s.subTo(t.ONE.shiftLeft(e-1),s),s.isProbablePrime(r)?setTimeout(function(){n()},0):setTimeout(a,0)};setTimeout(a,0)}else{var o=[],h=7&e;o.length=1+(e>>3),r.nextBytes(o),h>0?o[0]&=(1<<h)-1:o[0]=0,this.fromString(o,256)}},t}(),NullExp=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),Classic=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),Montgomery=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=nbi();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(BigInteger.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=nbi();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],i=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),Barrett=function(){function t(t){this.m=t,this.r2=nbi(),this.q3=nbi(),BigInteger.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=nbi();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function nbi(){return new BigInteger(null)}function parseBigInt(t,e){return new BigInteger(t,e)}var inBrowser="undefined"!=typeof navigator;inBrowser&&j_lm&&"Microsoft Internet Explorer"==navigator.appName?(BigInteger.prototype.am=function(t,e,r,i,n,s){for(var a=32767&e,o=e>>15;--s>=0;){var h=32767&this[t],c=this[t++]>>15,u=o*h+c*a;n=((h=a*h+((32767&u)<<15)+r[i]+(1073741823&n))>>>30)+(u>>>15)+o*c+(n>>>30),r[i++]=1073741823&h}return n},dbits=30):inBrowser&&j_lm&&"Netscape"!=navigator.appName?(BigInteger.prototype.am=function(t,e,r,i,n,s){for(;--s>=0;){var a=e*this[t++]+r[i]+n;n=Math.floor(a/67108864),r[i++]=67108863&a}return n},dbits=26):(BigInteger.prototype.am=function(t,e,r,i,n,s){for(var a=16383&e,o=e>>14;--s>=0;){var h=16383&this[t],c=this[t++]>>14,u=o*h+c*a;n=((h=a*h+((16383&u)<<14)+r[i]+n)>>28)+(u>>14)+o*c,r[i++]=268435455&h}return n},dbits=28),BigInteger.prototype.DB=dbits,BigInteger.prototype.DM=(1<<dbits)-1,BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP),BigInteger.prototype.F1=BI_FP-dbits,BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RC=[],rr,vv;for(rr="0".charCodeAt(0),vv=0;vv<=9;++vv)BI_RC[rr++]=vv;for(rr="a".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;for(rr="A".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;function intAt(t,e){var r=BI_RC[t.charCodeAt(e)];return null==r?-1:r}function nbv(t){var e=nbi();return e.fromInt(t),e}function nbits(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}BigInteger.ZERO=nbv(0),BigInteger.ONE=nbv(1);var Arcfour=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,r,i;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,i=this.S[e],this.S[e]=this.S[r],this.S[r]=i;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}();function prng_newstate(){return new Arcfour}var rng_psize=256,rng_state,rng_pool=null,rng_pptr;if(null==rng_pool){rng_pool=[],rng_pptr=0;var t=void 0;if("undefined"!=typeof window&&self.crypto&&self.crypto.getRandomValues){var z=new Uint32Array(256);for(self.crypto.getRandomValues(z),t=0;t<z.length;++t)rng_pool[rng_pptr++]=255&z[t]}var count=0,onMouseMoveListener_1=function(t){if((count=count||0)>=256||rng_pptr>=rng_psize)self.removeEventListener?self.removeEventListener("mousemove",onMouseMoveListener_1,!1):self.detachEvent&&self.detachEvent("onmousemove",onMouseMoveListener_1);else try{var e=t.x+t.y;rng_pool[rng_pptr++]=255&e,count+=1}catch(t){}};"undefined"!=typeof window&&(self.addEventListener?self.addEventListener("mousemove",onMouseMoveListener_1,!1):self.attachEvent&&self.attachEvent("onmousemove",onMouseMoveListener_1))}function rng_get_byte(){if(null==rng_state){for(rng_state=prng_newstate();rng_pptr<rng_psize;){var t=Math.floor(65536*Math.random());rng_pool[rng_pptr++]=255&t}for(rng_state.init(rng_pool),rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}var SecureRandom=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=rng_get_byte()},t}();function rstr_sha256(t){return binb2rstr(binb_sha256(rstr2binb(t),8*t.length))}function rstr2hex(t){for(var e="0123456789abcdef",r="",i=0;i<t.length;i++){var n=t.charCodeAt(i);r+=e.charAt(n>>>4&15)+e.charAt(15&n)}return r}function rstr2binb(t){for(var e=Array(t.length>>2),r=0;r<e.length;r++)e[r]=0;for(r=0;r<8*t.length;r+=8)e[r>>5]|=(255&t.charCodeAt(r/8))<<24-r%32;return e}function binb2rstr(t){for(var e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>24-r%32&255);return e}function sha256_S(t,e){return t>>>e|t<<32-e}function sha256_R(t,e){return t>>>e}function sha256_Ch(t,e,r){return t&e^~t&r}function sha256_Maj(t,e,r){return t&e^t&r^e&r}function sha256_Sigma0256(t){return sha256_S(t,2)^sha256_S(t,13)^sha256_S(t,22)}function sha256_Sigma1256(t){return sha256_S(t,6)^sha256_S(t,11)^sha256_S(t,25)}function sha256_Gamma0256(t){return sha256_S(t,7)^sha256_S(t,18)^sha256_R(t,3)}function sha256_Gamma1256(t){return sha256_S(t,17)^sha256_S(t,19)^sha256_R(t,10)}var sha256_K=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function binb_sha256(t,e){var r,i,n,s,a,o,h,c,u,l,f,d,p=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),_=new Array(64);for(t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e,u=0;u<t.length;u+=16){for(r=p[0],i=p[1],n=p[2],s=p[3],a=p[4],o=p[5],h=p[6],c=p[7],l=0;l<64;l++)_[l]=l<16?t[l+u]:safe_add(safe_add(safe_add(sha256_Gamma1256(_[l-2]),_[l-7]),sha256_Gamma0256(_[l-15])),_[l-16]),f=safe_add(safe_add(safe_add(safe_add(c,sha256_Sigma1256(a)),sha256_Ch(a,o,h)),sha256_K[l]),_[l]),d=safe_add(sha256_Sigma0256(r),sha256_Maj(r,i,n)),c=h,h=o,o=a,a=safe_add(s,f),s=n,n=i,i=r,r=safe_add(f,d);p[0]=safe_add(r,p[0]),p[1]=safe_add(i,p[1]),p[2]=safe_add(n,p[2]),p[3]=safe_add(s,p[3]),p[4]=safe_add(a,p[4]),p[5]=safe_add(o,p[5]),p[6]=safe_add(h,p[6]),p[7]=safe_add(c,p[7])}return p}function safe_add(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function pkcs1pad1(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var r=e-t.length-6,i="",n=0;n<r;n+=2)i+="ff";return parseBigInt("0001"+i+"00"+t,16)}function pkcs1pad2(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var r=[],i=t.length-1;i>=0&&e>0;){var n=t.charCodeAt(i--);n<128?r[--e]=n:n>127&&n<2048?(r[--e]=63&n|128,r[--e]=n>>6|192):(r[--e]=63&n|128,r[--e]=n>>6&63|128,r[--e]=n>>12|224)}r[--e]=0;for(var s=new SecureRandom,a=[];e>2;){for(a[0]=0;0==a[0];)s.nextBytes(a);r[--e]=a[0]}return r[--e]=2,r[--e]=0,new BigInteger(r)}function oaep_mgf1_arr(t,e,r){for(var i="",n=0;i.length<e;)i+=r(String.fromCharCode.apply(String,t.concat([(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n]))),n+=1;return i}var SHA256_SIZE=32;function oaep_pad(t,e){var r=SHA256_SIZE,i=rstr_sha256;if(t.length+2*r+2>e)throw"Message too long for RSA";var n,s="";for(n=0;n<e-t.length-2*r-2;n+=1)s+="\0";var a=i("")+s+""+t,o=new Array(r);(new SecureRandom).nextBytes(o);var h=oaep_mgf1_arr(o,a.length,i),c=[];for(n=0;n<a.length;n+=1)c[n]=a.charCodeAt(n)^h.charCodeAt(n);var u=oaep_mgf1_arr(c,o.length,i),l=[0];for(n=0;n<o.length;n+=1)l[n+1]=o[n]^u.charCodeAt(n);return new BigInteger(l.concat(c))}var RSAKey=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(r)<0;)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=parseBigInt(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t,e){void 0===e&&(e=pkcs1pad2);var r=this.n.bitLength()+7>>3,i=e(t,r);if(null==i)return null;var n=this.doPublic(i);if(null==n)return null;for(var s=n.toString(16),a=s.length,o=0;o<2*r-a;o++)s="0"+s;return s},t.prototype.setPrivate=function(t,e,r){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=parseBigInt(t,16),this.e=parseInt(e,16),this.d=parseBigInt(r,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,r,i,n,s,a,o){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=parseBigInt(t,16),this.e=parseInt(e,16),this.d=parseBigInt(r,16),this.p=parseBigInt(i,16),this.q=parseBigInt(n,16),this.dmp1=parseBigInt(s,16),this.dmq1=parseBigInt(a,16),this.coeff=parseBigInt(o,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var r=new SecureRandom,i=t>>1;this.e=parseInt(e,16);for(var n=new BigInteger(e,16);;){for(;this.p=new BigInteger(t-i,1,r),0!=this.p.subtract(BigInteger.ONE).gcd(n).compareTo(BigInteger.ONE)||!this.p.isProbablePrime(10););for(;this.q=new BigInteger(i,1,r),0!=this.q.subtract(BigInteger.ONE).gcd(n).compareTo(BigInteger.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var a=this.p.subtract(BigInteger.ONE),o=this.q.subtract(BigInteger.ONE),h=a.multiply(o);if(0==h.gcd(n).compareTo(BigInteger.ONE)){this.n=this.p.multiply(this.q),this.d=n.modInverse(h),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(o),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=parseBigInt(t,16),r=this.doPrivate(e);return null==r?null:pkcs1unpad2(r,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,r){var i=new SecureRandom,n=t>>1;this.e=parseInt(e,16);var s=new BigInteger(e,16),a=this,o=function(){var e=function(){if(a.p.compareTo(a.q)<=0){var t=a.p;a.p=a.q,a.q=t}var e=a.p.subtract(BigInteger.ONE),i=a.q.subtract(BigInteger.ONE),n=e.multiply(i);0==n.gcd(s).compareTo(BigInteger.ONE)?(a.n=a.p.multiply(a.q),a.d=s.modInverse(n),a.dmp1=a.d.mod(e),a.dmq1=a.d.mod(i),a.coeff=a.q.modInverse(a.p),setTimeout(function(){r()},0)):setTimeout(o,0)},h=function(){a.q=nbi(),a.q.fromNumberAsync(n,1,i,function(){a.q.subtract(BigInteger.ONE).gcda(s,function(t){0==t.compareTo(BigInteger.ONE)&&a.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(h,0)})})},c=function(){a.p=nbi(),a.p.fromNumberAsync(t-n,1,i,function(){a.p.subtract(BigInteger.ONE).gcda(s,function(t){0==t.compareTo(BigInteger.ONE)&&a.p.isProbablePrime(10)?setTimeout(h,0):setTimeout(c,0)})})};setTimeout(c,0)};setTimeout(o,0)},t.prototype.sign=function(t,e,r){var i=getDigestHeader(r)+e(t).toString(),n=this.n.bitLength()/4,s=pkcs1pad1(i,n);if(null==s)return null;var a=this.doPrivate(s);if(null==a)return null;for(var o=a.toString(16),h=o.length,c=0;c<n-h;c++)o="0"+o;return o},t.prototype.verify=function(t,e,r){var i=parseBigInt(e,16),n=this.doPublic(i);return null==n?null:removeDigestHeader(n.toString(16).replace(/^1f+00/,""))==r(t).toString()},t}();function pkcs1unpad2(t,e){for(var r=t.toByteArray(),i=0;i<r.length&&0==r[i];)++i;if(r.length-i!=e-1||2!=r[i])return null;for(++i;0!=r[i];)if(++i>=r.length)return null;for(var n="";++i<r.length;){var s=255&r[i];s<128?n+=String.fromCharCode(s):s>191&&s<224?(n+=String.fromCharCode((31&s)<<6|63&r[i+1]),++i):(n+=String.fromCharCode((15&s)<<12|(63&r[i+1])<<6|63&r[i+2]),i+=2)}return n}var DIGEST_HEADERS={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function getDigestHeader(t){return DIGEST_HEADERS[t]||""}function removeDigestHeader(t){for(var e in DIGEST_HEADERS)if(DIGEST_HEADERS.hasOwnProperty(e)){var r=DIGEST_HEADERS[e],i=r.length;if(t.substring(0,i)==r)return t.substring(i)}return t}function extendClass(t,e,r){if(!e||!t)throw new Error("extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),r){var n;for(n in r)t.prototype[n]=r[n];var s=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(s=function(t,e){for(n=0;n<a.length;n+=1){var r=a[n],i=e[r];"function"==typeof i&&i!=Object.prototype[r]&&(t[r]=i)}})}catch(t){}s(t.prototype,r)}}
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).funsdata=e()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,o(i.key),i)}}function r(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function o(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}var h,c="1.0.1-beta.1",u=Array.prototype,l=Object.prototype,f=u.slice,p=l.toString,d=l.hasOwnProperty,g=u.forEach,m={},v=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],_={};_.each=function(t,e,r){if(null!==t)if(g&&t.forEach===g)t.forEach(e,r);else if(t.length===+t.length){for(var i=0,n=t.length;i<n;i++)if(i in t&&e.call(r,t[i],i,t)===m)return}else for(var s in t)if(d.call(t,s)&&e.call(r,t[s],s,t)===m)return},_.extend=function(t){return _.each(f.call(arguments,1),function(e){for(var r in e)void 0!==e[r]&&(t[r]=e[r])}),t},_.formatDate=function(t){function e(t){return t<10?"0"+t:t}return t.getFullYear()+"-"+e(t.getMonth()+1)+"-"+e(t.getDate())+" "+e(t.getHours())+":"+e(t.getMinutes())+":"+e(t.getSeconds())+"."+((r=t.getMilliseconds())<10?"00"+r:r<100?"0"+r:r);var r},_.formatTimeZone=function(t,e){if("number"!=typeof e)return t;var r=t.getTime(),i=6e4*t.getTimezoneOffset();return new Date(r+i+36e5*e)},_.formatJsonString=function(t){try{return JSON.stringify(t,null,8)}catch(e){return JSON.stringify(t)}},_.searchObjDate=function(t,e){(_.check.isObject(t)||_.check.isArray(t))&&_.each(t,function(r,i){_.check.isObject(r)||_.check.isArray(r)?_.searchObjDate(t[i],e):_.check.isDate(r)&&(t[i]=_.formatDate(_.formatTimeZone(r,e)))})},_.check={isUndefined:function(t){return void 0===t},isObject:function(t){return"[object Object]"===p.call(t)&&null!==t},isEmptyObject:function(t){if(_.check.isObject(t)){for(var e in t)if(d.call(t,e))return!1;return!0}return!1},isArray:function(t){return"[object Array]"===p.call(t)},isString:function(t){return"[object String]"===p.call(t)},isDate:function(t){return"[object Date]"===p.call(t)},isNumber:function(t){return"[object Number]"===p.call(t)},isBoolean:function(t){return"[object Boolean]"===p.call(t)},isJSONString:function(t){try{JSON.parse(t)}catch(t){return!1}return!0}},_.UUID=(h=function(){for(var t=1*new Date,e=0;t===1*new Date;)e++;return t.toString(16)+e.toString(16)},function(){var t=String(screen.height*screen.width);t=t&&/\d{5,}/.test(t)?t.toString(16):String(31242*Math.random()).replace(".","").slice(0,8);var e=h()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var t,e,r=navigator.userAgent,i=[],n=0;function s(t,e){var r,n=0;for(r=0;r<e.length;r++)n|=i[r]<<8*r;return t^n}for(t=0;t<r.length;t++)e=r.charCodeAt(t),i.unshift(255&e),i.length>=4&&(n=s(n,i),i=[]);return i.length>0&&(n=s(n,i)),n.toString(16)}()+"-"+t+"-"+h();return e||(String(Math.random())+String(Math.random())+String(Math.random())).slice(2,15)}),_.UUIDv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},_.getReferrer=function(t){var e=t||document.referrer;return"string"!=typeof e?"referrer exception"+String(e):(0===e.indexOf("https://www.baidu.com/")&&(e=e.split("?")[0]),"string"==typeof(e=e.slice(0,200))?e:"")},_.url=function(){function t(){return new RegExp(/(.*?)\.?([^\.]*?)\.(com|net|org|biz|ws|in|me|co\.uk|co|org\.uk|ltd\.uk|plc\.uk|me\.uk|edu|mil|br\.com|cn\.com|eu\.com|hu\.com|no\.com|qc\.com|sa\.com|se\.com|se\.net|us\.com|uy\.com|ac|co\.ac|gv\.ac|or\.ac|ac\.ac|af|am|as|at|ac\.at|co\.at|gv\.at|or\.at|asn\.au|com\.au|edu\.au|org\.au|net\.au|id\.au|be|ac\.be|adm\.br|adv\.br|am\.br|arq\.br|art\.br|bio\.br|cng\.br|cnt\.br|com\.br|ecn\.br|eng\.br|esp\.br|etc\.br|eti\.br|fm\.br|fot\.br|fst\.br|g12\.br|gov\.br|ind\.br|inf\.br|jor\.br|lel\.br|med\.br|mil\.br|net\.br|nom\.br|ntr\.br|odo\.br|org\.br|ppg\.br|pro\.br|psc\.br|psi\.br|rec\.br|slg\.br|tmp\.br|tur\.br|tv\.br|vet\.br|zlg\.br|br|ab\.ca|bc\.ca|mb\.ca|nb\.ca|nf\.ca|ns\.ca|nt\.ca|on\.ca|pe\.ca|qc\.ca|sk\.ca|yk\.ca|ca|cc|ac\.cn|net\.cn|com\.cn|edu\.cn|gov\.cn|org\.cn|bj\.cn|sh\.cn|tj\.cn|cq\.cn|he\.cn|nm\.cn|ln\.cn|jl\.cn|hl\.cn|js\.cn|zj\.cn|ah\.cn|gd\.cn|gx\.cn|hi\.cn|sc\.cn|gz\.cn|yn\.cn|xz\.cn|sn\.cn|gs\.cn|qh\.cn|nx\.cn|xj\.cn|tw\.cn|hk\.cn|mo\.cn|cn|cx|cz|de|dk|fo|com\.ec|tm\.fr|com\.fr|asso\.fr|presse\.fr|fr|gf|gs|co\.il|net\.il|ac\.il|k12\.il|gov\.il|muni\.il|ac\.in|co\.in|org\.in|ernet\.in|gov\.in|net\.in|res\.in|is|it|ac\.jp|co\.jp|go\.jp|or\.jp|ne\.jp|ac\.kr|co\.kr|go\.kr|ne\.kr|nm\.kr|or\.kr|li|lt|lu|asso\.mc|tm\.mc|com\.mm|org\.mm|net\.mm|edu\.mm|gov\.mm|ms|nl|no|nu|pl|ro|org\.ro|store\.ro|tm\.ro|firm\.ro|www\.ro|arts\.ro|rec\.ro|info\.ro|nom\.ro|nt\.ro|se|si|com\.sg|org\.sg|net\.sg|gov\.sg|sk|st|tf|ac\.th|co\.th|go\.th|mi\.th|net\.th|or\.th|tm|to|com\.tr|edu\.tr|gov\.tr|k12\.tr|net\.tr|org\.tr|com\.tw|org\.tw|net\.tw|ac\.uk|uk\.com|uk\.net|gb\.com|gb\.net|vg|sh|kz|ch|info|ua|gov|name|pro|ie|hk|com\.hk|org\.hk|net\.hk|edu\.hk|us|tk|cd|by|ad|lv|eu\.lv|bz|es|jp|cl|ag|mobi|eu|co\.nz|org\.nz|net\.nz|maori\.nz|iwi\.nz|io|la|md|sc|sg|vc|tw|travel|my|se|tv|pt|com\.pt|edu\.pt|asia|fi|com\.ve|net\.ve|fi|org\.ve|web\.ve|info\.ve|co\.ve|tel|im|gr|ru|net\.ru|org\.ru|hr|com\.hr|ly|xyz)$/)}function e(t){return _.decodeURIComponent(t.replace(/\+/g," "))}function r(t,e){var r=t.charAt(0),i=e.split(r);return r===t?i:i[(t=parseInt(t.substring(1),10))<0?i.length+t:t-1]}function i(t,r){for(var i=t.charAt(0),n=r.split("&"),s=[],o={},a=[],h=t.substring(1),c=0,u=n.length;c<u;c++)if((s=n[c].match(/(.*?)=(.*)/))||(s=[n[c],n[c],""]),""!==s[1].replace(/\s/g,"")){if(s[2]=e(s[2]||""),h===s[1])return s[2];(a=s[1].match(/(.*)\[([0-9]+)\]/))?(o[a[1]]=o[a[1]]||[],o[a[1]][a[2]]=s[2]):o[s[1]]=s[2]}return i===t?o:o[h]}return function(e,n){var s,o={};if("tld?"===e)return t();if(n=n||window.location.toString(),!e)return n;if(e=e.toString(),s=n.match(/^mailto:([^\/].+)/))o.protocol="mailto",o.email=s[1];else{if((s=n.match(/(.*?)\/#\!(.*)/))&&(n=s[1]+s[2]),(s=n.match(/(.*?)#(.*)/))&&(o.hash=s[2],n=s[1]),o.hash&&e.match(/^#/))return i(e,o.hash);if((s=n.match(/(.*?)\?(.*)/))&&(o.query=s[2],n=s[1]),o.query&&e.match(/^\?/))return i(e,o.query);if((s=n.match(/(.*?)\:?\/\/(.*)/))&&(o.protocol=s[1].toLowerCase(),n=s[2]),(s=n.match(/(.*?)(\/.*)/))&&(o.path=s[2],n=s[1]),o.path=(o.path||"").replace(/^([^\/])/,"/$1").replace(/\/$/,""),e.match(/^[\-0-9]+$/)&&(e=e.replace(/^([^\/])/,"/$1")),e.match(/^\//))return r(e,o.path.substring(1));if((s=r("/-1",o.path.substring(1)))&&(s=s.match(/(.*?)\.(.*)/))&&(o.file=s[0],o.filename=s[1],o.fileext=s[2]),(s=n.match(/(.*)\:([0-9]+)$/))&&(o.port=s[2],n=s[1]),(s=n.match(/(.*?)@(.*)/))&&(o.auth=s[1],n=s[2]),o.auth&&(s=o.auth.match(/(.*)\:(.*)/),o.user=s?s[1]:o.auth,o.pass=s?s[2]:void 0),o.hostname=n.toLowerCase(),"."===e.charAt(0))return r(e,o.hostname);t()&&(s=o.hostname.match(t()))&&(o.tld=s[3],o.domain=s[2]?s[2]+"."+s[3]:void 0,o.sub=s[1]||void 0);var a=o.port?":"+o.port:"";o.protocol=o.protocol||window.location.protocol.replace(":",""),o.port=o.port||("https"===o.protocol?"443":"80"),o.protocol=o.protocol||("443"===o.port?"https":"http"),o.basic=o.protocol+"://"+o.hostname+a}return e in o?o[e]:"{}"===e?o:""}}(),_.hashCode=function(t){if("string"!=typeof t)return 0;var e=0;if(0===t.length)return e;for(var r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e&=e;return e},_.decodeURIComponent=function(t){var e="";try{e=decodeURIComponent(t)}catch(r){e=t}return e},_.encodeURIComponent=function(t){var e="";try{e=encodeURIComponent(t)}catch(r){e=t}return e},_.utf8Encode=function(t){var e,r,i,n,s="";for(e=r=0,i=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,n=0;n<i;n++){var o=t.charCodeAt(n),a=null;o<128?r++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),null!==a&&(r>e&&(s+=t.substring(e,r)),s+=a,e=r=n+1)}return r>e&&(s+=t.substring(e,t.length)),s},_.base64Encode=function(t){var e,r,i,n,s,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,h=0,c="",u=[];if(!t)return t;t=_.utf8Encode(t);do{e=(s=t.charCodeAt(a++)<<16|t.charCodeAt(a++)<<8|t.charCodeAt(a++))>>18&63,r=s>>12&63,i=s>>6&63,n=63&s,u[h++]=o.charAt(e)+o.charAt(r)+o.charAt(i)+o.charAt(n)}while(a<t.length);switch(c=u.join(""),t.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},_.cookie={get:function(t){for(var e=t+"=",r=document.cookie.split(";"),i=0;i<r.length;i++){for(var n=r[i];" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(e))return _.decodeURIComponent(n.substring(e.length,n.length))}return null},set:function(t,e,r,i,n){var s="",o="",a="";if(r=null===r?73e3:r,i){var h=_.url("domain",location.href);s=h?"; domain=."+h:""}if(r){var c=new Date;"s"===String(r).slice(-1)?c.setTime(c.getTime()+1e3*Number(String(r).slice(0,-1))):c.setTime(c.getTime()+24*r*60*60*1e3),o="; expires="+c.toGMTString()}n&&(a="; secure");var u=t+"="+encodeURIComponent(e)+o+"; path=/"+s+a;return document.cookie=u,u},remove:function(t,e){_.cookie.set(t,"",-1,e)}},_.localStorage={get:function(t){try{return window.localStorage.getItem(t)}catch(t){_.localStorage.error(t)}},parse:function(t){var e;try{e=JSON.parse(_.localStorage.get(t))||null}catch(t){_.localStorage.error(t)}return e},set:function(t,e){try{window.localStorage.setItem(t,e)}catch(t){_.localStorage.error(t)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(t){_.localStorage.error(t)}},error:function(t){console.error("localStorage error: "+t)},isSupported:function(){var t=!0;try{var e="__funsdatasupport__",r="testIsSupportStorage";_.localStorage.set(e,r),_.localStorage.get(e)!==r&&(t=!1),_.localStorage.remove(e)}catch(e){t=!1}return t}},_.stripEmptyProperties=function(t){var e={};return _.each(t,function(t,r){_.check.isString(t)&&t.length>0&&(e[r]=t)}),e},_.info={os:function(){var t=navigator.userAgent;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""},browser:function(){var t={type:"",version:""};try{var e=navigator.userAgent.toLowerCase(),r=[];if(null!==e.match(/baidubrowser/)?(t.type="baidu",r.push(/baidubrowser\/([\d.]+)/)):null!==e.match(/bidubrowser/)?(t.type="baidu",r.push(/bidubrowser\/([\d.]+)/)):null!==e.match(/edga/)?(t.type="edge",r.push(/edga\/([\d.]+)/)):null!==e.match(/edgios/)?(t.type="edge",r.push(/edgios\/([\d.]+)/)):null!==e.match(/liebaofast/)?(t.type="liebao",r.push(/liebaofast\/([\d.]+)/)):null!==e.match(/sogoumobilebrowser/)?(t.type="sogou",r.push(/sogoumobilebrowser\/([\d.]+)/)):null!==e.match(/lbbrowser/)?(t.type="liebao",r.push(/lbbrowser\/([\d.]+)/)):null!==e.match(/crios/)?(t.type="chrome",r.push(/crios\/([\d.]+)/)):null!==e.match(/qihoobrowser/)?(t.type="360",r.push(/qihoobrowser\/([\d.]+)/)):null!==e.match(/mxios/)?(t.type="maxthon",r.push(/mxios\/([\d.]+)/)):null!==e.match(/fxios/)?(t.type="firefox",r.push(/fxios\/([\d.\w]+)/)):null!==e.match(/edge/)?(t.type="edge",r.push(/edge\/([\d.]+)/)):null!==e.match(/metasr/)?(t.type="sogou",r.push(/metasr ([\d.]+)/)):null!==e.match(/micromessenger/)?(t.type="micromessenger",r.push(/micromessenger\/([\d.]+)/)):null!==e.match(/mqqbrowser/)?(t.type="qq",r.push(/mqqbrowser\/([\d.]+)/)):null!==e.match(/qqbrowserlite/)?(t.type="qq",r.push(/qqbrowserlite\/([\d.]+)/)):null!==e.match(/tencenttraveler/)?(t.type="qq",r.push(/tencenttraveler\/([\d.]+)/)):null!==e.match(/qqbrowser/)?(t.type="qq",r.push(/qqbrowser\/([\d.]+)/)):null!==e.match(/maxthon/)?(t.type="maxthon",r.push(/maxthon\/([\d.]+)/)):null!==e.match(/ubrowser/)?(t.type="uc",r.push(/ubrowser\/([\d.]+)/)):null!==e.match(/ucbrowser/)?(t.type="uc",r.push(/ucbrowser\/([\d.]+)/)):null!==e.match(/firefox/)?(t.type="firefox",r.push(/firefox\/([\d.]+)/)):null!==e.match(/opera/)?(t.type="opera",r.push(/opera\/([\d.]+)/)):null!==e.match(/opr/)?(t.type="opera",r.push(/opr\/([\d.]+)/)):null!==e.match(/chrome/)?(t.type="chrome",r.push(/chrome\/([\d.]+)/)):null!==e.match(/safari/)?(t.type="safari",r.push(/version\/([\d.]+)/)):null===e.match(/trident/)&&null===e.match(/msie/)||(t.type="ie"),"ie"===t.type){var i=e.match(/trident\/([\d.]+)/)?e.match(/trident\/([\d.]+)/)[1]:"",n=e.match(/msie ([\d.]+)/)?e.match(/msie ([\d.]+)/)[1]:"";""!==i?t.version=String(parseInt(i)+4):""!==n&&(t.version=n)}else r&&(t.version=e.match(r[0])?e.match(r[0])[1]:"")}catch(t){y.w("getting browser info failed due to ",t)}return t},properties:function(){var t=_.info.browser();return _.extend({"#os":_.info.os(),"#lib_version":c,"#lib":"js","#screen_height":screen.height,"#screen_width":screen.width,"#browser":t.type,"#browser_version":t.version,"#system_language":_.check.isString(navigator.languages[1])?navigator.languages[1].toLowerCase():"Value exception","#ua":_.check.isString(navigator.userAgent)?navigator.userAgent.toLowerCase():"Value exception","#utm":_.getUtm()})},pageProperties:function(){var t=_.getReferrer();return _.stripEmptyProperties({"#referrer":t,"#referrer_host":t?_.url("hostname",t):t,"#url":location.href,"#url_path":location.pathname,"#title":document.title})}},_.getUtm=function(){var t={};return _.each(v,function(e){var r=_.getQueryParam(location.href,e);r.length&&(t[e]=r)}),JSON.stringify(t)},_.getQueryParam=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),t=_.decodeURIComponent(t);var r=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===r||r&&"string"!=typeof r[1]&&r[1].length?"":_.decodeURIComponent(r[1])},_.createString=function(t){for(var e=t,r=Math.random().toString(36).substr(2);r.length<e;)r+=Math.random().toString(36).substr(2);return r=r.substr(0,t)},_.createAesKey=function(){return _.createString(16)},_.generateEncryptyData=function(t,e){if(void 0===e)return t;var r=e.publicKey,i=e.version;if(void 0===r||void 0===i)return t;if("undefined"==typeof CryptoJS||"undefined"==typeof JSEncrypt)return t;var n=_.createAesKey();try{var s=CryptoJS.enc.Utf8.parse(n),o=CryptoJS.enc.Utf8.parse(JSON.stringify(t)),a=CryptoJS.AES.encrypt(o,s,{mode:CryptoJS.mode.ECB,padding:CryptoJS.pad.Pkcs7}).toString(),h=new JSEncrypt;h.setPublicKey(r);var c=h.encrypt(n);return!1===c?(y.w("encryption failed"),t):{pkv:i,ekey:c,payload:a}}catch(t){y.w("encryption failed")}return t},_.paramType=function(t){return Object.prototype.toString.call(t).replace("[object ","").replace("]","")},_.addEvent=function(t,e,r,i){if(document.addEventListener)if("Array"!==this.paramType(t)&&"HTMLCollection"!==this.paramType(t)||!t.length||t===window)t.addEventListener(e,r,i);else for(var n=0;n<t.length;n++)this.addEvent(t[n],e,r,i);else if(t.length&&t!==window)for(var s=0;s<t.length;s++)this.addEvent(t[s],e,r);else t.attachEvent("on"+e,function(){return r.call(t,window.event)})},_.getRandom=function(){return(new Date).getTime()+"_"+Math.floor(1e6*Math.random())},_.safeJSONParse=function(t){var e=null;try{e=JSON.parse(t)}catch(e){return t}return e},_.saveObjectVal=function(t,e){_.check.isString(e)||(e=JSON.stringify(e)),_.localStorage.set(t,e)},_.readObjectVal=function(t){var e=_.localStorage.get(t);return e?_.safeJSONParse(e):null},_.indexOf=function(t,e){var r=t.indexOf;if(r)return r.call(t,e);for(var i=0;i<t.length;i++)if(e===t[i])return i;return-1},_.hasEncrypty=function(t){return!!_.check.isObject()&&("undefined"!==t.pkv&&"undefined"!==t.ekey&&"undefined"!==t.payload)},_.addSiteEvent=function(t,e,r,i){function n(t){return t&&(t.preventDefault=n.preventDefault,t.stopPropagation=n.stopPropagation,t._getPath=n._getPath),t}n._getPath=function(){var t;return this.path||this.composedPath&&this.composedPath()||(t=this.target,new s(t)).getParents()};var s=function(t){this.ele=t};n.preventDefault=function(){this.returnValue=!1},n.stopPropagation=function(){this.cancelBubble=!0};(function(t,e,r){if(void 0===i&&"click"===e&&(i=!0),t&&t.addEventListener)t.addEventListener(e,function(t){t._getPath=n._getPath,r.call(this,t)},i);else{var s="on"+e,o=t[s];t[s]=function(t,e,r,i){var s=function(s){if(s=s||n(window.event)){s.target=s.srcElement;var o,a,h=!0;return"function"==typeof r&&(o=r(s)),a=e.call(t,s),"beforeunload"!==i?(!1!==o&&!1!==a||(h=!1),h):void 0}};return s}(t,r,o,e)}}).apply(null,arguments)},_.getURLSearchParams=function(t){for(var e={},r=(t=t||"").substring(1).split("&"),i=0;i<r.length;i++){var n=r[i].indexOf("=");if(-1!==n){var s=r[i].substring(0,n),o=r[i].substring(n+1);s=_.decodeURIComponent(s),o=_.decodeURIComponent(o),e[s]=o}}return e},_.urlParse=function(t){var e=function(t){this._fields={Username:4,Password:5,Port:7,Protocol:2,Host:6,Path:8,URL:0,QueryString:9,Fragment:10},this._values={},this._regex=/^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/,void 0!==t&&this._parse(t)};return e.prototype.setUrl=function(t){this._parse(t)},e.prototype._initValues=function(){for(var t in this._fields)this._values[t]=""},e.prototype.addQueryString=function(t){if("object"!==a(t))return!1;var e=this._values.QueryString||"";for(var r in t)e=new RegExp(r+"[^&]+").test(e)?e.replace(new RegExp(r+"[^&]+"),r+"="+t[r]):"&"===e.slice(-1)?e+r+"="+t[r]:""===e?r+"="+t[r]:e+"&"+r+"="+t[r];this._values.QueryString=e},e.prototype.getUrl=function(){var t="";return t+=this._values.Origin,t+=this._values.Port?":"+this._values.Port:"",t+=this._values.Path,t+=this._values.QueryString?"?"+this._values.QueryString:"",t+=this._values.Fragment?"#"+this._values.Fragment:""},e.prototype._parse=function(t){this._initValues();var e=this._regex.exec(t);e||y.i("URLParser::_parse -> Invalid URL");var r=t.split("#"),i=r[0],n=r.slice(1).join("#");for(var s in e=this._regex.exec(i),this._fields)void 0!==e[this._fields[s]]&&(this._values[s]=e[this._fields[s]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=n},new e(t)},_.trim=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},_.URL=function(t){var e,r={};if("function"==typeof window.URL&&function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(t){return!1}}())(r=new URL(t)).searchParams||(r.searchParams=(e=_.getURLSearchParams(r.search),{get:function(t){return e[t]}}));else{_.check.isString(t)||(t=String(t)),t=_.trim(t);if(!1===/^https?:\/\/.+/.test(t))return void y.w("Invalid URL");var i=_.urlParse(t);r.hash=i._values.Fragment,r.host=i._values.Host?i._values.Host+(i._values.Port?":"+i._values.Port:""):"",r.href=i._values.URL,r.password=i._values.Password,r.pathname=i._values.Path,r.port=i._values.Port,r.search=i._values.QueryString?"?"+i._values.QueryString:"",r.username=i._values.Username,r.hostname=i._values.Hostname,r.protocol=i._values.Protocol?i._values.Protocol+":":"",r.origin=i._values.Origin?i._values.Origin+(i._values.Port?":"+i._values.Port:""):"",r.searchParams=function(){var t=_.getURLSearchParams("?"+i._values.QueryString);return{get:function(e){return t[e]}}}()}return r};var y=function(){return r(function e(){t(this,e)},null,[{key:"i",value:function(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=_.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":a(console))&&console.log)try{return console.log.apply(console,arguments)}catch(t){console.log(arguments[0])}}},{key:"w",value:function(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=_.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":a(console))&&console.warn)try{return console.warn.apply(console,arguments)}catch(t){console.warn(arguments[0])}}}])}(),b=/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/,w=function(){return r(function e(){t(this,e)},null,[{key:"stripProperties",value:function(t){return _.check.isObject(t)?(_.each(t,function(t,e){_.check.isString(t)||_.check.isNumber(t)||_.check.isDate(t)||_.check.isBoolean(t)||_.check.isArray(t)||_.check.isObject(t)||y.w("The format of Data-",e,t," does not meet the requirements and may not be stored correctly. The attribute value only supports String, Number, Date, Boolean, Array,Object")}),t):t}},{key:"_checkPropertiesKey",value:function(t){var e=!0;return _.each(t,function(t,r){b.test(r)||(y.w("invalid key: "+r),e=!1)}),e}},{key:"event",value:function(t){return!(!_.check.isString(t)||!b.test(t))||(y.w("Please check the parameter format, eventName must be an English letter or a string starting with '_', containing letters and numbers with no more than 50 characters: "+t),!1)}},{key:"propertyName",value:function(t){return!(!_.check.isString(t)||!b.test(t))||(y.w("Please check the parameter format, propertyName must be an English letter or a string starting with '_', containing letters and numbers with no more than 50 characters: "+t),!1)}},{key:"properties",value:function(t){return this.stripProperties(t),!t||!!_.check.isObject(t)&&(!!this._checkPropertiesKey(t)||(y.w("Please check the parameter format, the key of properties can only start with a letter, contain numbers, letters and underscores _, and the maximum length is 50 characters"),!1))}},{key:"propertiesMust",value:function(t){return this.stripProperties(t),void 0===t||!_.check.isObject(t)||_.check.isEmptyObject(t)?(y.w("properties must be objects and have values"),!1):!!this._checkPropertiesKey(t)||(y.w("Please check the parameter format, the key of properties can only start with a letter, contain numbers, letters and underscores _, and the maximum length is 50 characters"),!1)}},{key:"userId",value:function(t){return!(!_.check.isString(t)||!/^.{1,63}$/.test(t))||(y.w("User id must be a string that cannot be empty and is less than 64 bits"),!1)}}])}(),S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function x(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var T,k,E,D,O,A,P,C,R,I,B={},z={},N={};function U(){if(T)return N;T=1;function t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=256,r=286,i=30,n=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=new Array(576);t(c);const u=new Array(60);t(u);const l=new Array(512);t(l);const f=new Array(256);t(f);const p=new Array(29);t(p);const d=new Array(i);function g(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let m,v,_;function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const b=t=>t<256?l[t]:l[256+(t>>>7)],w=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},S=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},x=(t,e,r)=>{S(t,r[2*e],r[2*e+1])},k=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},E=(t,e,r)=>{const i=new Array(16);let s,o,a=0;for(s=1;s<=n;s++)a=a+r[s-1]<<1,i[s]=a;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=k(i[e]++,e))}},D=t=>{let e;for(e=0;e<r;e++)t.dyn_ltree[2*e]=0;for(e=0;e<i;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},O=t=>{t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=(t,e,r,i)=>{const n=2*e,s=2*r;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[r]},P=(t,e,r)=>{const i=t.heap[r];let n=r<<1;for(;n<=t.heap_len&&(n<t.heap_len&&A(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!A(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i},C=(t,r,i)=>{let n,a,h,c,u=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+u++],n+=(255&t.pending_buf[t.sym_buf+u++])<<8,a=t.pending_buf[t.sym_buf+u++],0===n?x(t,a,r):(h=f[a],x(t,h+e+1,r),c=s[h],0!==c&&(a-=p[h],S(t,a,c)),n--,h=b(n),x(t,h,i),c=o[h],0!==c&&(n-=d[h],S(t,n,c)))}while(u<t.sym_next);x(t,256,r)},R=(t,e)=>{const r=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.has_stree,o=e.stat_desc.elems;let a,h,c,u=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<o;a++)0!==r[2*a]?(t.heap[++t.heap_len]=u=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)c=t.heap[++t.heap_len]=u<2?++u:0,r[2*c]=1,t.depth[c]=0,t.opt_len--,s&&(t.static_len-=i[2*c+1]);for(e.max_code=u,a=t.heap_len>>1;a>=1;a--)P(t,r,a);c=o;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],P(t,r,1),h=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=h,r[2*c]=r[2*a]+r[2*h],t.depth[c]=(t.depth[a]>=t.depth[h]?t.depth[a]:t.depth[h])+1,r[2*a+1]=r[2*h+1]=c,t.heap[1]=c++,P(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,i=e.max_code,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,h=e.stat_desc.extra_base,c=e.stat_desc.max_length;let u,l,f,p,d,g,m=0;for(p=0;p<=n;p++)t.bl_count[p]=0;for(r[2*t.heap[t.heap_max]+1]=0,u=t.heap_max+1;u<573;u++)l=t.heap[u],p=r[2*r[2*l+1]+1]+1,p>c&&(p=c,m++),r[2*l+1]=p,l>i||(t.bl_count[p]++,d=0,l>=h&&(d=a[l-h]),g=r[2*l],t.opt_len+=g*(p+d),o&&(t.static_len+=g*(s[2*l+1]+d)));if(0!==m){do{for(p=c-1;0===t.bl_count[p];)p--;t.bl_count[p]--,t.bl_count[p+1]+=2,t.bl_count[c]--,m-=2}while(m>0);for(p=c;0!==p;p--)for(l=t.bl_count[p];0!==l;)f=t.heap[--u],f>i||(r[2*f+1]!==p&&(t.opt_len+=(p-r[2*f+1])*r[2*f],r[2*f+1]=p),l--)}})(t,e),E(r,u,t.bl_count)},I=(t,e,r)=>{let i,n,s=-1,o=e[1],a=0,h=7,c=4;for(0===o&&(h=138,c=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=o,o=e[2*(i+1)+1],++a<h&&n===o||(a<c?t.bl_tree[2*n]+=a:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,s=n,0===o?(h=138,c=3):n===o?(h=6,c=3):(h=7,c=4))},B=(t,e,r)=>{let i,n,s=-1,o=e[1],a=0,h=7,c=4;for(0===o&&(h=138,c=3),i=0;i<=r;i++)if(n=o,o=e[2*(i+1)+1],!(++a<h&&n===o)){if(a<c)do{x(t,n,t.bl_tree)}while(0!==--a);else 0!==n?(n!==s&&(x(t,n,t.bl_tree),a--),x(t,16,t.bl_tree),S(t,a-3,2)):a<=10?(x(t,17,t.bl_tree),S(t,a-3,3)):(x(t,18,t.bl_tree),S(t,a-11,7));a=0,s=n,0===o?(h=138,c=3):n===o?(h=6,c=3):(h=7,c=4)}};let z=!1;const U=(t,e,r,i)=>{S(t,0+(i?1:0),3),O(t),w(t,r),w(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};return N._tr_init=t=>{z||((()=>{let t,e,h,y,b;const w=new Array(16);for(h=0,y=0;y<28;y++)for(p[y]=h,t=0;t<1<<s[y];t++)f[h++]=y;for(f[h-1]=y,b=0,y=0;y<16;y++)for(d[y]=b,t=0;t<1<<o[y];t++)l[b++]=y;for(b>>=7;y<i;y++)for(d[y]=b<<7,t=0;t<1<<o[y]-7;t++)l[256+b++]=y;for(e=0;e<=n;e++)w[e]=0;for(t=0;t<=143;)c[2*t+1]=8,t++,w[8]++;for(;t<=255;)c[2*t+1]=9,t++,w[9]++;for(;t<=279;)c[2*t+1]=7,t++,w[7]++;for(;t<=287;)c[2*t+1]=8,t++,w[8]++;for(E(c,287,w),t=0;t<i;t++)u[2*t+1]=5,u[2*t]=k(t,5);m=new g(c,s,257,r,n),v=new g(u,o,0,i,n),_=new g(new Array(0),a,0,19,7)})(),z=!0),t.l_desc=new y(t.dyn_ltree,m),t.d_desc=new y(t.dyn_dtree,v),t.bl_desc=new y(t.bl_tree,_),t.bi_buf=0,t.bi_valid=0,D(t)},N._tr_stored_block=U,N._tr_flush_block=(t,r,i,n)=>{let s,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let r,i=4093624447;for(r=0;r<=31;r++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*r])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(r=32;r<e;r++)if(0!==t.dyn_ltree[2*r])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),a=(t=>{let e;for(I(t,t.dyn_ltree,t.l_desc.max_code),I(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),s=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=s&&(s=o)):s=o=i+5,i+4<=s&&-1!==r?U(t,r,i,n):4===t.strategy||o===s?(S(t,2+(n?1:0),3),C(t,c,u)):(S(t,4+(n?1:0),3),((t,e,r,i)=>{let n;for(S(t,e-257,5),S(t,r-1,5),S(t,i-4,4),n=0;n<i;n++)S(t,t.bl_tree[2*h[n]+1],3);B(t,t.dyn_ltree,e-1),B(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),C(t,t.dyn_ltree,t.dyn_dtree)),D(t),n&&O(t)},N._tr_tally=(t,r,i)=>(t.pending_buf[t.sym_buf+t.sym_next++]=r,t.pending_buf[t.sym_buf+t.sym_next++]=r>>8,t.pending_buf[t.sym_buf+t.sym_next++]=i,0===r?t.dyn_ltree[2*i]++:(t.matches++,r--,t.dyn_ltree[2*(f[i]+e+1)]++,t.dyn_dtree[2*b(r)]++),t.sym_next===t.sym_end),N._tr_align=t=>{S(t,2,3),x(t,256,c),(t=>{16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)},N}function j(){return P?A:(P=1,A={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"})}function L(){return R?C:(R=1,C={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8})}function M(){if(I)return z;I=1;const{_tr_init:t,_tr_stored_block:e,_tr_flush_block:r,_tr_tally:i,_tr_align:n}=U(),s=E?k:(E=1,k=(t,e,r,i)=>{let n=65535&t,s=t>>>16&65535,o=0;for(;0!==r;){o=r>2e3?2e3:r,r-=o;do{n=n+e[i++]|0,s=s+n|0}while(--o);n%=65521,s%=65521}return n|s<<16}),o=function(){if(O)return D;O=1;const t=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());return D=(e,r,i,n)=>{const s=t,o=n+i;e^=-1;for(let t=n;t<o;t++)e=e>>>8^s[255&(e^r[t])];return-1^e},D}(),a=j(),{Z_NO_FLUSH:h,Z_PARTIAL_FLUSH:c,Z_FULL_FLUSH:u,Z_FINISH:l,Z_BLOCK:f,Z_OK:p,Z_STREAM_END:d,Z_STREAM_ERROR:g,Z_DATA_ERROR:m,Z_BUF_ERROR:v,Z_DEFAULT_COMPRESSION:_,Z_FILTERED:y,Z_HUFFMAN_ONLY:b,Z_RLE:w,Z_FIXED:S,Z_DEFAULT_STRATEGY:x,Z_UNKNOWN:T,Z_DEFLATED:A}=L(),P=258,C=262,R=42,B=113,N=666,M=(t,e)=>(t.msg=a[e],e),V=t=>2*t-(t>4?9:0),q=t=>{let e=t.length;for(;--e>=0;)t[e]=0},H=t=>{let e,r,i,n=t.w_size;e=t.hash_size,i=e;do{r=t.head[--i],t.head[i]=r>=n?r-n:0}while(--e);e=n,i=e;do{r=t.prev[--i],t.prev[i]=r>=n?r-n:0}while(--e)};let F=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const K=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},Z=(t,e)=>{r(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,K(t.strm)},J=(t,e)=>{t.pending_buf[t.pending++]=e},$=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},W=(t,e,r,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),r),1===t.state.wrap?t.adler=s(t.adler,e,n,r):2===t.state.wrap&&(t.adler=o(t.adler,e,n,r)),t.next_in+=n,t.total_in+=n,n)},G=(t,e)=>{let r,i,n=t.max_chain_length,s=t.strstart,o=t.prev_length,a=t.nice_match;const h=t.strstart>t.w_size-C?t.strstart-(t.w_size-C):0,c=t.window,u=t.w_mask,l=t.prev,f=t.strstart+P;let p=c[s+o-1],d=c[s+o];t.prev_length>=t.good_match&&(n>>=2),a>t.lookahead&&(a=t.lookahead);do{if(r=e,c[r+o]===d&&c[r+o-1]===p&&c[r]===c[s]&&c[++r]===c[s+1]){s+=2,r++;do{}while(c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&c[++s]===c[++r]&&s<f);if(i=P-(f-s),s=f-P,i>o){if(t.match_start=e,o=i,i>=a)break;p=c[s+o-1],d=c[s+o]}}}while((e=l[e&u])>h&&0!==--n);return o<=t.lookahead?o:t.lookahead},X=t=>{const e=t.w_size;let r,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-C)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),H(t),i+=e),0===t.strm.avail_in)break;if(r=W(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=r,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=F(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=F(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<C&&0!==t.strm.avail_in)},Y=(t,r)=>{let i,n,s,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,a=0,c=t.strm.avail_in;do{if(i=65535,s=t.bi_valid+42>>3,t.strm.avail_out<s)break;if(s=t.strm.avail_out-s,n=t.strstart-t.block_start,i>n+t.strm.avail_in&&(i=n+t.strm.avail_in),i>s&&(i=s),i<o&&(0===i&&r!==l||r===h||i!==n+t.strm.avail_in))break;a=r===l&&i===n+t.strm.avail_in?1:0,e(t,0,0,a),t.pending_buf[t.pending-4]=i,t.pending_buf[t.pending-3]=i>>8,t.pending_buf[t.pending-2]=~i,t.pending_buf[t.pending-1]=~i>>8,K(t.strm),n&&(n>i&&(n=i),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,i-=n),i&&(W(t.strm,t.strm.output,t.strm.next_out,i),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i)}while(0===a);return c-=t.strm.avail_in,c&&(c>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=c&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-c,t.strm.next_in),t.strstart),t.strstart+=c,t.insert+=c>t.w_size-t.insert?t.w_size-t.insert:c),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),a?4:r!==h&&r!==l&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(s=t.window_size-t.strstart,t.strm.avail_in>s&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,s+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),s>t.strm.avail_in&&(s=t.strm.avail_in),s&&(W(t.strm,t.window,t.strstart,s),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.high_water<t.strstart&&(t.high_water=t.strstart),s=t.bi_valid+42>>3,s=t.pending_buf_size-s>65535?65535:t.pending_buf_size-s,o=s>t.w_size?t.w_size:s,n=t.strstart-t.block_start,(n>=o||(n||r===l)&&r!==h&&0===t.strm.avail_in&&n<=s)&&(i=n>s?s:n,a=r===l&&0===t.strm.avail_in&&i===n?1:0,e(t,t.block_start,i,a),t.block_start+=i,K(t.strm)),a?3:1)},Q=(t,e)=>{let r,n;for(;;){if(t.lookahead<C){if(X(t),t.lookahead<C&&e===h)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-C&&(t.match_length=G(t,r)),t.match_length>=3)if(n=i(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=F(t,t.ins_h,t.window[t.strstart+1]);else n=i(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Z(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2},tt=(t,e)=>{let r,n,s;for(;;){if(t.lookahead<C){if(X(t),t.lookahead<C&&e===h)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-C&&(t.match_length=G(t,r),t.match_length<=5&&(t.strategy===y||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){s=t.strstart+t.lookahead-3,n=i(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=s&&(t.ins_h=F(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Z(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=i(t,0,t.window[t.strstart-1]),n&&Z(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=i(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2};function et(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}const rt=[new et(0,0,0,0,Y),new et(4,4,8,4,Q),new et(4,5,16,8,Q),new et(4,6,32,32,Q),new et(4,4,16,16,tt),new et(8,16,32,32,tt),new et(8,16,128,128,tt),new et(8,32,128,256,tt),new et(32,128,258,1024,tt),new et(32,258,258,4096,tt)];function it(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=A,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),q(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const nt=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==R&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==B&&e.status!==N?1:0},st=e=>{if(nt(e))return M(e,g);e.total_in=e.total_out=0,e.data_type=T;const r=e.state;return r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=2===r.wrap?57:r.wrap?R:B,e.adler=2===r.wrap?0:1,r.last_flush=-2,t(r),p},ot=t=>{const e=st(t);var r;return e===p&&((r=t.state).window_size=2*r.w_size,q(r.head),r.max_lazy_match=rt[r.level].max_lazy,r.good_match=rt[r.level].good_length,r.nice_match=rt[r.level].nice_length,r.max_chain_length=rt[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},at=(t,e,r,i,n,s)=>{if(!t)return g;let o=1;if(e===_&&(e=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>9||r!==A||i<8||i>15||e<0||e>9||s<0||s>S||8===i&&1!==o)return M(t,g);8===i&&(i=9);const a=new it;return t.state=a,a.strm=t,a.status=R,a.wrap=o,a.gzhead=null,a.w_bits=i,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=n+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<n+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=e,a.strategy=s,a.method=r,ot(t)};return z.deflateInit=(t,e)=>at(t,e,A,15,8,x),z.deflateInit2=at,z.deflateReset=ot,z.deflateResetKeep=st,z.deflateSetHeader=(t,e)=>nt(t)||2!==t.state.wrap?g:(t.state.gzhead=e,p),z.deflate=(t,r)=>{if(nt(t)||r>f||r<0)return t?M(t,g):g;const s=t.state;if(!t.output||0!==t.avail_in&&!t.input||s.status===N&&r!==l)return M(t,0===t.avail_out?v:g);const a=s.last_flush;if(s.last_flush=r,0!==s.pending){if(K(t),0===t.avail_out)return s.last_flush=-1,p}else if(0===t.avail_in&&V(r)<=V(a)&&r!==l)return M(t,v);if(s.status===N&&0!==t.avail_in)return M(t,v);if(s.status===R&&0===s.wrap&&(s.status=B),s.status===R){let e=A+(s.w_bits-8<<4)<<8,r=-1;if(r=s.strategy>=b||s.level<2?0:s.level<6?1:6===s.level?2:3,e|=r<<6,0!==s.strstart&&(e|=32),e+=31-e%31,$(s,e),0!==s.strstart&&($(s,t.adler>>>16),$(s,65535&t.adler)),t.adler=1,s.status=B,K(t),0!==s.pending)return s.last_flush=-1,p}if(57===s.status)if(t.adler=0,J(s,31),J(s,139),J(s,8),s.gzhead)J(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),J(s,255&s.gzhead.time),J(s,s.gzhead.time>>8&255),J(s,s.gzhead.time>>16&255),J(s,s.gzhead.time>>24&255),J(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),J(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(J(s,255&s.gzhead.extra.length),J(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=o(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(J(s,0),J(s,0),J(s,0),J(s,0),J(s,0),J(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),J(s,3),s.status=B,K(t),0!==s.pending)return s.last_flush=-1,p;if(69===s.status){if(s.gzhead.extra){let e=s.pending,r=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+r>s.pending_buf_size;){let i=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>e&&(t.adler=o(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex+=i,K(t),0!==s.pending)return s.last_flush=-1,p;e=0,r-=i}let i=new Uint8Array(s.gzhead.extra);s.pending_buf.set(i.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending+=r,s.gzhead.hcrc&&s.pending>e&&(t.adler=o(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let e,r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r)),K(t),0!==s.pending)return s.last_flush=-1,p;r=0}e=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,J(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let e,r=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r)),K(t),0!==s.pending)return s.last_flush=-1,p;r=0}e=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,J(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=o(t.adler,s.pending_buf,s.pending-r,r))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(K(t),0!==s.pending))return s.last_flush=-1,p;J(s,255&t.adler),J(s,t.adler>>8&255),t.adler=0}if(s.status=B,K(t),0!==s.pending)return s.last_flush=-1,p}if(0!==t.avail_in||0!==s.lookahead||r!==h&&s.status!==N){let o=0===s.level?Y(s,r):s.strategy===b?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(X(t),0===t.lookahead)){if(e===h)return 1;break}if(t.match_length=0,r=i(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Z(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2})(s,r):s.strategy===w?((t,e)=>{let r,n,s,o;const a=t.window;for(;;){if(t.lookahead<=P){if(X(t),t.lookahead<=P&&e===h)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(s=t.strstart-1,n=a[s],n===a[++s]&&n===a[++s]&&n===a[++s])){o=t.strstart+P;do{}while(n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&n===a[++s]&&s<o);t.match_length=P-(o-s),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=i(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=i(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Z(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(Z(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Z(t,!1),0===t.strm.avail_out)?1:2})(s,r):rt[s.level].func(s,r);if(3!==o&&4!==o||(s.status=N),1===o||3===o)return 0===t.avail_out&&(s.last_flush=-1),p;if(2===o&&(r===c?n(s):r!==f&&(e(s,0,0,!1),r===u&&(q(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),K(t),0===t.avail_out))return s.last_flush=-1,p}return r!==l?p:s.wrap<=0?d:(2===s.wrap?(J(s,255&t.adler),J(s,t.adler>>8&255),J(s,t.adler>>16&255),J(s,t.adler>>24&255),J(s,255&t.total_in),J(s,t.total_in>>8&255),J(s,t.total_in>>16&255),J(s,t.total_in>>24&255)):($(s,t.adler>>>16),$(s,65535&t.adler)),K(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?p:d)},z.deflateEnd=t=>{if(nt(t))return g;const e=t.state.status;return t.state=null,e===B?M(t,m):p},z.deflateSetDictionary=(t,e)=>{let r=e.length;if(nt(t))return g;const i=t.state,n=i.wrap;if(2===n||1===n&&i.status!==R||i.lookahead)return g;if(1===n&&(t.adler=s(t.adler,e,r,0)),i.wrap=0,r>=i.w_size){0===n&&(q(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(r-i.w_size,r),0),e=t,r=i.w_size}const o=t.avail_in,a=t.next_in,h=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,X(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=F(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,X(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=a,t.input=h,t.avail_in=o,i.wrap=n,p},z.deflateInfo="pako deflate (from Nodeca project)",z}var V,q={};var H,F,K,Z,J={};function $(){if(H)return J;H=1;let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const e=new Uint8Array(256);for(let t=0;t<256;t++)e[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;e[254]=e[254]=1,J.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,i,n,s,o=t.length,a=0;for(n=0;n<o;n++)r=t.charCodeAt(n),55296==(64512&r)&&n+1<o&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(r=65536+(r-55296<<10)+(i-56320),n++)),a+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(a),s=0,n=0;s<a;n++)r=t.charCodeAt(n),55296==(64512&r)&&n+1<o&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?e[s++]=r:r<2048?(e[s++]=192|r>>>6,e[s++]=128|63&r):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e};return J.buf2string=(r,i)=>{const n=i||r.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(r.subarray(0,i));let s,o;const a=new Array(2*n);for(o=0,s=0;s<n;){let t=r[s++];if(t<128){a[o++]=t;continue}let i=e[t];if(i>4)a[o++]=65533,s+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&s<n;)t=t<<6|63&r[s++],i--;i>1?a[o++]=65533:t<65536?a[o++]=t:(t-=65536,a[o++]=55296|t>>10&1023,a[o++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let i="";for(let t=0;t<r;t++)i+=String.fromCharCode(e[t]);return i})(a,o)},J.utf8border=(t,r)=>{(r=r||t.length)>t.length&&(r=t.length);let i=r-1;for(;i>=0&&128==(192&t[i]);)i--;return i<0||0===i?r:i+e[t[i]]>r?i:r},J}var W=function(){if(Z)return B;Z=1;const t=M(),e=function(){if(V)return q;V=1;const t=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);return q.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const i=r.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const r in i)t(i,r)&&(e[r]=i[r])}}return e},q.flattenChunks=t=>{let e=0;for(let r=0,i=t.length;r<i;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];r.set(n,i),i+=n.length}return r},q}(),r=$(),i=j(),n=K?F:(K=1,F=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}),s=Object.prototype.toString,{Z_NO_FLUSH:o,Z_SYNC_FLUSH:a,Z_FULL_FLUSH:h,Z_FINISH:c,Z_OK:u,Z_STREAM_END:l,Z_DEFAULT_COMPRESSION:f,Z_DEFAULT_STRATEGY:p,Z_DEFLATED:d}=L();function g(o){this.options=e.assign({level:f,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:p},o||{});let a=this.options;a.raw&&a.windowBits>0?a.windowBits=-a.windowBits:a.gzip&&a.windowBits>0&&a.windowBits<16&&(a.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;let h=t.deflateInit2(this.strm,a.level,a.method,a.windowBits,a.memLevel,a.strategy);if(h!==u)throw new Error(i[h]);if(a.header&&t.deflateSetHeader(this.strm,a.header),a.dictionary){let e;if(e="string"==typeof a.dictionary?r.string2buf(a.dictionary):"[object ArrayBuffer]"===s.call(a.dictionary)?new Uint8Array(a.dictionary):a.dictionary,h=t.deflateSetDictionary(this.strm,e),h!==u)throw new Error(i[h]);this._dict_set=!0}}function m(t,e){const r=new g(e);if(r.push(t,!0),r.err)throw r.msg||i[r.err];return r.result}return g.prototype.push=function(e,i){const n=this.strm,f=this.options.chunkSize;let p,d;if(this.ended)return!1;for(d=i===~~i?i:!0===i?c:o,"string"==typeof e?n.input=r.string2buf(e):"[object ArrayBuffer]"===s.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(f),n.next_out=0,n.avail_out=f),(d===a||d===h)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(p=t.deflate(n,d),p===l)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),p=t.deflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===u;if(0!==n.avail_out){if(d>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},g.prototype.onData=function(t){this.chunks.push(t)},g.prototype.onEnd=function(t){t===u&&(this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},B.Deflate=g,B.deflate=m,B.deflateRaw=function(t,e){return(e=e||{}).raw=!0,m(t,e)},B.gzip=function(t,e){return(e=e||{}).gzip=!0,m(t,e)},B.constants=L(),B}();function G(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function X(t,e){return t&e}function Y(t,e){return t|e}function Q(t,e){return t^e}function tt(t,e){return t&~e}function et(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function rt(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var it,nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function st(t){var e,r,i="";for(e=0;e+3<=t.length;e+=3)r=parseInt(t.substring(e,e+3),16),i+=nt.charAt(r>>6)+nt.charAt(63&r);for(e+1==t.length?(r=parseInt(t.substring(e,e+1),16),i+=nt.charAt(r<<2)):e+2==t.length&&(r=parseInt(t.substring(e,e+2),16),i+=nt.charAt(r>>2)+nt.charAt((3&r)<<4));(3&i.length)>0;)i+="=";return i}function ot(t){var e,r="",i=0,n=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var s=nt.indexOf(t.charAt(e));s<0||(0==i?(r+=G(s>>2),n=3&s,i=1):1==i?(r+=G(n<<2|s>>4),n=15&s,i=2):2==i?(r+=G(n),r+=G(s>>2),n=3&s,i=3):(r+=G(n<<2|s>>4),r+=G(15&s),i=0))}return 1==i&&(r+=G(n<<2)),r}var at,ht=function(t){var e;if(void 0===it){var r="0123456789ABCDEF",i=" \f\n\r\t \u2028\u2029";for(it={},e=0;e<16;++e)it[r.charAt(e)]=e;for(r=r.toLowerCase(),e=10;e<16;++e)it[r.charAt(e)]=e;for(e=0;e<8;++e)it[i.charAt(e)]=-1}var n=[],s=0,o=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=it[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);s|=a,++o>=2?(n[n.length]=s,s=0,o=0):s<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return n},ct={decode:function(t){var e;if(void 0===at){var r="= \f\n\r\t \u2028\u2029";for(at=Object.create(null),e=0;e<64;++e)at["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(at["-"]=62,at._=63,e=0;e<9;++e)at[r.charAt(e)]=-1}var i=[],n=0,s=0;for(e=0;e<t.length;++e){var o=t.charAt(e);if("="==o)break;if(-1!=(o=at[o])){if(void 0===o)throw new Error("Illegal character at offset "+e);n|=o,++s>=4?(i[i.length]=n>>16,i[i.length]=n>>8&255,i[i.length]=255&n,n=0,s=0):n<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=n>>10;break;case 3:i[i.length]=n>>16,i[i.length]=n>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=ct.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return ct.decode(t)}},ut=1e13,lt=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var r,i,n=this.buf,s=n.length;for(r=0;r<s;++r)(i=n[r]*t+e)<ut?e=0:i-=(e=0|i/ut)*ut,n[r]=i;e>0&&(n[r]=e)},t.prototype.sub=function(t){var e,r,i=this.buf,n=i.length;for(e=0;e<n;++e)(r=i[e]-t)<0?(r+=ut,t=1):t=0,i[e]=r;for(;0===i[i.length-1];)i.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,r=e[e.length-1].toString(),i=e.length-2;i>=0;--i)r+=(ut+e[i]).toString().substring(1);return r},t.prototype.valueOf=function(){for(var t=this.buf,e=0,r=t.length-1;r>=0;--r)e=e*ut+t[r];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),ft=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,pt=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function dt(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var gt,mt=function(){function t(e,r){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=r)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,r){for(var i="",n=t;n<e;++n)if(i+=this.hexByte(this.get(n)),!0!==r)switch(15&n){case 7:i+=" ";break;case 15:i+="\n";break;default:i+=" "}return i},t.prototype.isASCII=function(t,e){for(var r=t;r<e;++r){var i=this.get(r);if(i<32||i>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var r="",i=t;i<e;++i)r+=String.fromCharCode(this.get(i));return r},t.prototype.parseStringUTF=function(t,e){for(var r="",i=t;i<e;){var n=this.get(i++);r+=n<128?String.fromCharCode(n):n>191&&n<224?String.fromCharCode((31&n)<<6|63&this.get(i++)):String.fromCharCode((15&n)<<12|(63&this.get(i++))<<6|63&this.get(i++))}return r},t.prototype.parseStringBMP=function(t,e){for(var r,i,n="",s=t;s<e;)r=this.get(s++),i=this.get(s++),n+=String.fromCharCode(r<<8|i);return n},t.prototype.parseTime=function(t,e,r){var i=this.parseStringISO(t,e),n=(r?ft:pt).exec(i);return n?(r&&(n[1]=+n[1],n[1]+=+n[1]<70?2e3:1900),i=n[1]+"-"+n[2]+"-"+n[3]+" "+n[4],n[5]&&(i+=":"+n[5],n[6]&&(i+=":"+n[6],n[7]&&(i+="."+n[7]))),n[8]&&(i+=" UTC","Z"!=n[8]&&(i+=n[8],n[9]&&(i+=":"+n[9]))),i):"Unrecognized time: "+i},t.prototype.parseInteger=function(t,e){for(var r,i=this.get(t),n=i>127,s=n?255:0,o="";i==s&&++t<e;)i=this.get(t);if(0===(r=e-t))return n?-1:0;if(r>4){for(o=i,r<<=3;!(128&(+o^s));)o=+o<<1,--r;o="("+r+" bit)\n"}n&&(i-=256);for(var a=new lt(i),h=t+1;h<e;++h)a.mulAdd(256,this.get(h));return o+a.toString()},t.prototype.parseBitString=function(t,e,r){for(var i=this.get(t),n="("+((e-t-1<<3)-i)+" bit)\n",s="",o=t+1;o<e;++o){for(var a=this.get(o),h=o==e-1?i:0,c=7;c>=h;--c)s+=a>>c&1?"1":"0";if(s.length>r)return n+dt(s,r)}return n+s},t.prototype.parseOctetString=function(t,e,r){if(this.isASCII(t,e))return dt(this.parseStringISO(t,e),r);var i=e-t,n="("+i+" byte)\n";i>(r/=2)&&(e=t+r);for(var s=t;s<e;++s)n+=this.hexByte(this.get(s));return i>r&&(n+="…"),n},t.prototype.parseOID=function(t,e,r){for(var i="",n=new lt,s=0,o=t;o<e;++o){var a=this.get(o);if(n.mulAdd(128,127&a),s+=7,!(128&a)){if(""===i)if((n=n.simplify())instanceof lt)n.sub(80),i="2."+n.toString();else{var h=n<80?n<40?0:1:2;i=h+"."+(n-40*h)}else i+="."+n.toString();if(i.length>r)return dt(i,r);n=new lt,s=0}}return s>0&&(i+=".incomplete"),i},t}(),vt=function(){function t(t,e,r,i,n){if(!(i instanceof _t))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=r,this.tag=i,this.sub=n}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+r,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+r,t);case 6:return this.stream.parseOID(e,e+r,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return dt(this.stream.parseStringUTF(e,e+r),t);case 18:case 19:case 20:case 21:case 22:case 26:return dt(this.stream.parseStringISO(e,e+r),t);case 30:return dt(this.stream.parseStringBMP(e,e+r),t);case 23:case 24:return this.stream.parseTime(e,e+r,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var r=0,i=this.sub.length;r<i;++r)e+=this.sub[r].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),r=127&e;if(r==e)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===r)return null;e=0;for(var i=0;i<r;++i)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,r=2*this.length;return t.substring(e,e+r)},t.decode=function(e){var r;r=e instanceof mt?e:new mt(e,0);var i=new mt(r),n=new _t(r),s=t.decodeLength(r),o=r.pos,a=o-i.pos,h=null,c=function(){var e=[];if(null!==s){for(var i=o+s;r.pos<i;)e[e.length]=t.decode(r);if(r.pos!=i)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var n=t.decode(r);if(n.tag.isEOC())break;e[e.length]=n}s=o-r.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(n.tagConstructed)h=c();else if(n.isUniversal()&&(3==n.tagNumber||4==n.tagNumber))try{if(3==n.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");h=c();for(var u=0;u<h.length;++u)if(h[u].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){h=null}if(null===h){if(null===s)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);r.pos=o+Math.abs(s)}return new t(i,a,s,n,h)},t}(),_t=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=!!(32&e),this.tagNumber=31&e,31==this.tagNumber){var r=new lt;do{e=t.get(),r.mulAdd(128,127&e)}while(128&e);this.tagNumber=r.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),yt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],bt=(1<<26)/yt[yt.length-1],wt=function(){function t(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,i=(1<<e)-1,n=!1,s="",o=this.t,a=this.DB-o*this.DB%e;if(o-- >0)for(a<this.DB&&(r=this[o]>>a)>0&&(n=!0,s=G(r));o>=0;)a<e?(r=(this[o]&(1<<a)-1)<<e-a,r|=this[--o]>>(a+=this.DB-e)):(r=this[o]>>(a-=e)&i,a<=0&&(a+=this.DB,--o)),r>0&&(n=!0),n&&(s+=G(r));return n?s:"0"},t.prototype.negate=function(){var e=Et();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Bt(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var r=Et();return this.abs().divRemTo(e,null,r),this.s<0&&r.compareTo(t.ZERO)>0&&e.subTo(r,r),r},t.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new xt(e):new Tt(e),this.exp(t,r)},t.prototype.clone=function(){var t=Et();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var r,i=this.DB-t*this.DB%8,n=0;if(t-- >0)for(i<this.DB&&(r=this[t]>>i)!=(this.s&this.DM)>>i&&(e[n++]=r|this.s<<this.DB-i);t>=0;)i<8?(r=(this[t]&(1<<i)-1)<<8-i,r|=this[--t]>>(i+=this.DB-8)):(r=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),128&r&&(r|=-256),0==n&&(128&this.s)!=(128&r)&&++n,(n>0||r!=this.s)&&(e[n++]=r);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=Et();return this.bitwiseTo(t,X,e),e},t.prototype.or=function(t){var e=Et();return this.bitwiseTo(t,Y,e),e},t.prototype.xor=function(t){var e=Et();return this.bitwiseTo(t,Q,e),e},t.prototype.andNot=function(t){var e=Et();return this.bitwiseTo(t,tt,e),e},t.prototype.not=function(){for(var t=Et(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=Et();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=Et();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+et(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=rt(this[r]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,Y)},t.prototype.clearBit=function(t){return this.changeBit(t,tt)},t.prototype.flipBit=function(t){return this.changeBit(t,Q)},t.prototype.add=function(t){var e=Et();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=Et();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=Et();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=Et();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=Et();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=Et(),r=Et();return this.divRemTo(t,e,r),[e,r]},t.prototype.modPow=function(t,e){var r,i,n=t.bitLength(),s=It(1);if(n<=0)return s;r=n<18?1:n<48?3:n<144?4:n<768?5:6,i=n<8?new xt(e):e.isEven()?new kt(e):new Tt(e);var o=[],a=3,h=r-1,c=(1<<r)-1;if(o[1]=i.convert(this),r>1){var u=Et();for(i.sqrTo(o[1],u);a<=c;)o[a]=Et(),i.mulTo(u,o[a-2],o[a]),a+=2}var l,f,p=t.t-1,d=!0,g=Et();for(n=Bt(t[p])-1;p>=0;){for(n>=h?l=t[p]>>n-h&c:(l=(t[p]&(1<<n+1)-1)<<h-n,p>0&&(l|=t[p-1]>>this.DB+n-h)),a=r;!(1&l);)l>>=1,--a;if((n-=a)<0&&(n+=this.DB,--p),d)o[l].copyTo(s),d=!1;else{for(;a>1;)i.sqrTo(s,g),i.sqrTo(g,s),a-=2;a>0?i.sqrTo(s,g):(f=s,s=g,g=f),i.mulTo(g,o[l],s)}for(;p>=0&&!(t[p]&1<<n);)i.sqrTo(s,g),f=s,s=g,g=f,--n<0&&(n=this.DB-1,--p)}return i.revert(s)},t.prototype.modInverse=function(e){var r=e.isEven();if(this.isEven()&&r||0==e.signum())return t.ZERO;for(var i=e.clone(),n=this.clone(),s=It(1),o=It(0),a=It(0),h=It(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),r?(s.isEven()&&o.isEven()||(s.addTo(this,s),o.subTo(e,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;n.isEven();)n.rShiftTo(1,n),r?(a.isEven()&&h.isEven()||(a.addTo(this,a),h.subTo(e,h)),a.rShiftTo(1,a)):h.isEven()||h.subTo(e,h),h.rShiftTo(1,h);i.compareTo(n)>=0?(i.subTo(n,i),r&&s.subTo(a,s),o.subTo(h,o)):(n.subTo(i,n),r&&a.subTo(s,a),h.subTo(o,h))}return 0!=n.compareTo(t.ONE)?t.ZERO:h.compareTo(e)>=0?h.subtract(e):h.signum()<0?(h.addTo(e,h),h.signum()<0?h.add(e):h):h},t.prototype.pow=function(t){return this.exp(t,new St)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var n=e.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return e;for(n<s&&(s=n),s>0&&(e.rShiftTo(s,e),r.rShiftTo(s,r));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r},t.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=yt[yt.length-1]){for(e=0;e<yt.length;++e)if(r[0]==yt[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<yt.length;){for(var i=yt[e],n=e+1;n<yt.length&&i<bt;)i*=yt[n++];for(i=r.modInt(i);e<n;)if(i%yt[e++]==0)return!1}return r.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,r){var i;if(16==r)i=4;else if(8==r)i=3;else if(256==r)i=8;else if(2==r)i=1;else if(32==r)i=5;else{if(4!=r)return void this.fromRadix(e,r);i=2}this.t=0,this.s=0;for(var n=e.length,s=!1,o=0;--n>=0;){var a=8==i?255&+e[n]:Rt(e,n);a<0?"-"==e.charAt(n)&&(s=!0):(s=!1,0==o?this[this.t++]=a:o+i>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=i)>=this.DB&&(o-=this.DB))}8==i&&128&+e[0]&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),s&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var r=t%this.DB,i=this.DB-r,n=(1<<i)-1,s=Math.floor(t/this.DB),o=this.s<<r&this.DM,a=this.t-1;a>=0;--a)e[a+s+1]=this[a]>>i|o,o=(this[a]&n)<<r;for(a=s-1;a>=0;--a)e[a]=0;e[s]=o,e.t=this.t+s+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,n=this.DB-i,s=(1<<i)-1;e[0]=this[r]>>i;for(var o=r+1;o<this.t;++o)e[o-r-1]|=(this[o]&s)<<n,e[o-r]=this[o]>>i;i>0&&(e[this.t-r-1]|=(this.s&s)<<n),e.t=this.t-r,e.clamp()}},t.prototype.subTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this[r]-t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i-=t[r],e[r++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()},t.prototype.multiplyTo=function(e,r){var i=this.abs(),n=e.abs(),s=i.t;for(r.t=s+n.t;--s>=0;)r[s]=0;for(s=0;s<n.t;++s)r[s+i.t]=i.am(0,n[s],r,s,0,i.t);r.s=0,r.clamp(),this.s!=e.s&&t.ZERO.subTo(r,r)},t.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var i=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,i,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,r,i){var n=e.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t)return null!=r&&r.fromInt(0),void(null!=i&&this.copyTo(i));null==i&&(i=Et());var o=Et(),a=this.s,h=e.s,c=this.DB-Bt(n[n.t-1]);c>0?(n.lShiftTo(c,o),s.lShiftTo(c,i)):(n.copyTo(o),s.copyTo(i));var u=o.t,l=o[u-1];if(0!=l){var f=l*(1<<this.F1)+(u>1?o[u-2]>>this.F2:0),p=this.FV/f,d=(1<<this.F1)/f,g=1<<this.F2,m=i.t,v=m-u,_=null==r?Et():r;for(o.dlShiftTo(v,_),i.compareTo(_)>=0&&(i[i.t++]=1,i.subTo(_,i)),t.ONE.dlShiftTo(u,_),_.subTo(o,o);o.t<u;)o[o.t++]=0;for(;--v>=0;){var y=i[--m]==l?this.DM:Math.floor(i[m]*p+(i[m-1]+g)*d);if((i[m]+=o.am(0,y,i,v,0,u))<y)for(o.dlShiftTo(v,_),i.subTo(_,i);i[m]<--y;)i.subTo(_,i)}null!=r&&(i.drShiftTo(u,r),a!=h&&t.ZERO.subTo(r,r)),i.t=u,i.clamp(),c>0&&i.rShiftTo(c,i),a<0&&t.ZERO.subTo(i,i)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,r){if(e>4294967295||e<1)return t.ONE;var i=Et(),n=Et(),s=r.convert(this),o=Bt(e)-1;for(s.copyTo(i);--o>=0;)if(r.sqrTo(i,n),(e&1<<o)>0)r.mulTo(n,s,i);else{var a=i;i=n,n=a}return r.revert(i)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=It(r),n=Et(),s=Et(),o="";for(this.divRemTo(i,n,s);n.signum()>0;)o=(r+s.intValue()).toString(t).substring(1)+o,n.divRemTo(i,n,s);return s.intValue().toString(t)+o},t.prototype.fromRadix=function(e,r){this.fromInt(0),null==r&&(r=10);for(var i=this.chunkSize(r),n=Math.pow(r,i),s=!1,o=0,a=0,h=0;h<e.length;++h){var c=Rt(e,h);c<0?"-"==e.charAt(h)&&0==this.signum()&&(s=!0):(a=r*a+c,++o>=i&&(this.dMultiply(n),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(r,o)),this.dAddOffset(a,0)),s&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,r,i){if("number"==typeof r)if(e<2)this.fromInt(1);else for(this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),Y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var n=[],s=7&e;n.length=1+(e>>3),r.nextBytes(n),s>0?n[0]&=(1<<s)-1:n[0]=0,this.fromString(n,256)}},t.prototype.bitwiseTo=function(t,e,r){var i,n,s=Math.min(t.t,this.t);for(i=0;i<s;++i)r[i]=e(this[i],t[i]);if(t.t<this.t){for(n=t.s&this.DM,i=s;i<this.t;++i)r[i]=e(this[i],n);r.t=this.t}else{for(n=this.s&this.DM,i=s;i<t.t;++i)r[i]=e(n,t[i]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},t.prototype.changeBit=function(e,r){var i=t.ONE.shiftLeft(e);return this.bitwiseTo(i,r,i),i},t.prototype.addTo=function(t,e){for(var r=0,i=0,n=Math.min(t.t,this.t);r<n;)i+=this[r]+t[r],e[r++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;r<this.t;)i+=this[r],e[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<t.t;)i+=t[r],e[r++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[r++]=i:i<-1&&(e[r++]=this.DV+i),e.t=r,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,r){var i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(var n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},t.prototype.multiplyUpperTo=function(t,e,r){--e;var i=r.t=this.t+t.t-e;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)r[this.t+i-e]=this.am(e-i,t[i],r,0,0,this.t+i-e);r.clamp(),r.drShiftTo(1,r)},t.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r},t.prototype.millerRabin=function(e){var r=this.subtract(t.ONE),i=r.getLowestSetBit();if(i<=0)return!1;var n=r.shiftRight(i);(e=e+1>>1)>yt.length&&(e=yt.length);for(var s=Et(),o=0;o<e;++o){s.fromInt(yt[Math.floor(Math.random()*yt.length)]);var a=s.modPow(n,this);if(0!=a.compareTo(t.ONE)&&0!=a.compareTo(r)){for(var h=1;h++<i&&0!=a.compareTo(r);)if(0==(a=a.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=a.compareTo(r))return!1}}return!0},t.prototype.square=function(){var t=Et();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var r=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(r.compareTo(i)<0){var n=r;r=i,i=n}var s=r.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)e(r);else{s<o&&(o=s),o>0&&(r.rShiftTo(o,r),i.rShiftTo(o,i));var a=function(){(s=r.getLowestSetBit())>0&&r.rShiftTo(s,r),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),r.compareTo(i)>=0?(r.subTo(i,r),r.rShiftTo(1,r)):(i.subTo(r,i),i.rShiftTo(1,i)),r.signum()>0?setTimeout(a,0):(o>0&&i.lShiftTo(o,i),setTimeout(function(){e(i)},0))};setTimeout(a,10)}},t.prototype.fromNumberAsync=function(e,r,i,n){if("number"==typeof r)if(e<2)this.fromInt(1);else{this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),Y,this),this.isEven()&&this.dAddOffset(1,0);var s=this,o=function(){s.dAddOffset(2,0),s.bitLength()>e&&s.subTo(t.ONE.shiftLeft(e-1),s),s.isProbablePrime(r)?setTimeout(function(){n()},0):setTimeout(o,0)};setTimeout(o,0)}else{var a=[],h=7&e;a.length=1+(e>>3),r.nextBytes(a),h>0?a[0]&=(1<<h)-1:a[0]=0,this.fromString(a,256)}},t}(),St=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),xt=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),Tt=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=Et();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(wt.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=Et();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],i=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),kt=function(){function t(t){this.m=t,this.r2=Et(),this.q3=Et(),wt.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=Et();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function Et(){return new wt(null)}function Dt(t,e){return new wt(t,e)}var Ot="undefined"!=typeof navigator;Ot&&"Microsoft Internet Explorer"==navigator.appName?(wt.prototype.am=function(t,e,r,i,n,s){for(var o=32767&e,a=e>>15;--s>=0;){var h=32767&this[t],c=this[t++]>>15,u=a*h+c*o;n=((h=o*h+((32767&u)<<15)+r[i]+(1073741823&n))>>>30)+(u>>>15)+a*c+(n>>>30),r[i++]=1073741823&h}return n},gt=30):Ot&&"Netscape"!=navigator.appName?(wt.prototype.am=function(t,e,r,i,n,s){for(;--s>=0;){var o=e*this[t++]+r[i]+n;n=Math.floor(o/67108864),r[i++]=67108863&o}return n},gt=26):(wt.prototype.am=function(t,e,r,i,n,s){for(var o=16383&e,a=e>>14;--s>=0;){var h=16383&this[t],c=this[t++]>>14,u=a*h+c*o;n=((h=o*h+((16383&u)<<14)+r[i]+n)>>28)+(u>>14)+a*c,r[i++]=268435455&h}return n},gt=28),wt.prototype.DB=gt,wt.prototype.DM=(1<<gt)-1,wt.prototype.DV=1<<gt;wt.prototype.FV=Math.pow(2,52),wt.prototype.F1=52-gt,wt.prototype.F2=2*gt-52;var At,Pt,Ct=[];for(At="0".charCodeAt(0),Pt=0;Pt<=9;++Pt)Ct[At++]=Pt;for(At="a".charCodeAt(0),Pt=10;Pt<36;++Pt)Ct[At++]=Pt;for(At="A".charCodeAt(0),Pt=10;Pt<36;++Pt)Ct[At++]=Pt;function Rt(t,e){var r=Ct[t.charCodeAt(e)];return null==r?-1:r}function It(t){var e=Et();return e.fromInt(t),e}function Bt(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}wt.ZERO=It(0),wt.ONE=It(1);var zt=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,r,i;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,i=this.S[e],this.S[e]=this.S[r],this.S[r]=i;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}();var Nt,Ut,jt=null;if(null==jt){jt=[],Ut=0;var Lt=void 0;if("undefined"!=typeof window&&self.crypto&&self.crypto.getRandomValues){var Mt=new Uint32Array(256);for(self.crypto.getRandomValues(Mt),Lt=0;Lt<Mt.length;++Lt)jt[Ut++]=255&Mt[Lt]}var Vt=0,qt=function(t){if((Vt=Vt||0)>=256||Ut>=256)self.removeEventListener?self.removeEventListener("mousemove",qt,!1):self.detachEvent&&self.detachEvent("onmousemove",qt);else try{var e=t.x+t.y;jt[Ut++]=255&e,Vt+=1}catch(t){}};"undefined"!=typeof window&&(self.addEventListener?self.addEventListener("mousemove",qt,!1):self.attachEvent&&self.attachEvent("onmousemove",qt))}function Ht(){if(null==Nt){for(Nt=new zt;Ut<256;){var t=Math.floor(65536*Math.random());jt[Ut++]=255&t}for(Nt.init(jt),Ut=0;Ut<jt.length;++Ut)jt[Ut]=0;Ut=0}return Nt.next()}var Ft=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=Ht()},t}();function Kt(t){return function(t){for(var e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>24-r%32&255);return e}(function(t,e){var r,i,n,s,o,a,h,c,u,l,f,p,d=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),g=new Array(64);for(t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e,u=0;u<t.length;u+=16){for(r=d[0],i=d[1],n=d[2],s=d[3],o=d[4],a=d[5],h=d[6],c=d[7],l=0;l<64;l++)g[l]=l<16?t[l+u]:re(re(re(te(g[l-2]),g[l-7]),Qt(g[l-15])),g[l-16]),f=re(re(re(re(c,Yt(o)),Wt(o,a,h)),ee[l]),g[l]),p=re(Xt(r),Gt(r,i,n)),c=h,h=a,a=o,o=re(s,f),s=n,n=i,i=r,r=re(f,p);d[0]=re(r,d[0]),d[1]=re(i,d[1]),d[2]=re(n,d[2]),d[3]=re(s,d[3]),d[4]=re(o,d[4]),d[5]=re(a,d[5]),d[6]=re(h,d[6]),d[7]=re(c,d[7])}return d}(function(t){for(var e=Array(t.length>>2),r=0;r<e.length;r++)e[r]=0;for(r=0;r<8*t.length;r+=8)e[r>>5]|=(255&t.charCodeAt(r/8))<<24-r%32;return e}(t),8*t.length))}function Zt(t){for(var e="0123456789abcdef",r="",i=0;i<t.length;i++){var n=t.charCodeAt(i);r+=e.charAt(n>>>4&15)+e.charAt(15&n)}return r}function Jt(t,e){return t>>>e|t<<32-e}function $t(t,e){return t>>>e}function Wt(t,e,r){return t&e^~t&r}function Gt(t,e,r){return t&e^t&r^e&r}function Xt(t){return Jt(t,2)^Jt(t,13)^Jt(t,22)}function Yt(t){return Jt(t,6)^Jt(t,11)^Jt(t,25)}function Qt(t){return Jt(t,7)^Jt(t,18)^$t(t,3)}function te(t){return Jt(t,17)^Jt(t,19)^$t(t,10)}var ee=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function re(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function ie(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var r=[],i=t.length-1;i>=0&&e>0;){var n=t.charCodeAt(i--);n<128?r[--e]=n:n>127&&n<2048?(r[--e]=63&n|128,r[--e]=n>>6|192):(r[--e]=63&n|128,r[--e]=n>>6&63|128,r[--e]=n>>12|224)}r[--e]=0;for(var s=new Ft,o=[];e>2;){for(o[0]=0;0==o[0];)s.nextBytes(o);r[--e]=o[0]}return r[--e]=2,r[--e]=0,new wt(r)}function ne(t,e,r){for(var i="",n=0;i.length<e;)i+=r(String.fromCharCode.apply(String,t.concat([(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n]))),n+=1;return i}function se(t,e){var r=Kt;if(t.length+64+2>e)throw"Message too long for RSA";var i,n="";for(i=0;i<e-t.length-64-2;i+=1)n+="\0";var s=r("")+n+""+t,o=new Array(32);(new Ft).nextBytes(o);var a=ne(o,s.length,r),h=[];for(i=0;i<s.length;i+=1)h[i]=s.charCodeAt(i)^a.charCodeAt(i);var c=ne(h,o.length,r),u=[0];for(i=0;i<o.length;i+=1)u[i+1]=o[i]^c.charCodeAt(i);return new wt(u.concat(h))}var oe=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(r)<0;)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Dt(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t,e){void 0===e&&(e=ie);var r=this.n.bitLength()+7>>3,i=e(t,r);if(null==i)return null;var n=this.doPublic(i);if(null==n)return null;for(var s=n.toString(16),o=s.length,a=0;a<2*r-o;a++)s="0"+s;return s},t.prototype.setPrivate=function(t,e,r){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Dt(t,16),this.e=parseInt(e,16),this.d=Dt(r,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,r,i,n,s,o,a){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=Dt(t,16),this.e=parseInt(e,16),this.d=Dt(r,16),this.p=Dt(i,16),this.q=Dt(n,16),this.dmp1=Dt(s,16),this.dmq1=Dt(o,16),this.coeff=Dt(a,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var r=new Ft,i=t>>1;this.e=parseInt(e,16);for(var n=new wt(e,16);;){for(;this.p=new wt(t-i,1,r),0!=this.p.subtract(wt.ONE).gcd(n).compareTo(wt.ONE)||!this.p.isProbablePrime(10););for(;this.q=new wt(i,1,r),0!=this.q.subtract(wt.ONE).gcd(n).compareTo(wt.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var o=this.p.subtract(wt.ONE),a=this.q.subtract(wt.ONE),h=o.multiply(a);if(0==h.gcd(n).compareTo(wt.ONE)){this.n=this.p.multiply(this.q),this.d=n.modInverse(h),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=Dt(t,16),r=this.doPrivate(e);return null==r?null:function(t,e){var r=t.toByteArray(),i=0;for(;i<r.length&&0==r[i];)++i;if(r.length-i!=e-1||2!=r[i])return null;++i;for(;0!=r[i];)if(++i>=r.length)return null;var n="";for(;++i<r.length;){var s=255&r[i];s<128?n+=String.fromCharCode(s):s>191&&s<224?(n+=String.fromCharCode((31&s)<<6|63&r[i+1]),++i):(n+=String.fromCharCode((15&s)<<12|(63&r[i+1])<<6|63&r[i+2]),i+=2)}return n}(r,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,r){var i=new Ft,n=t>>1;this.e=parseInt(e,16);var s=new wt(e,16),o=this,a=function(){var e=function(){if(o.p.compareTo(o.q)<=0){var t=o.p;o.p=o.q,o.q=t}var e=o.p.subtract(wt.ONE),i=o.q.subtract(wt.ONE),n=e.multiply(i);0==n.gcd(s).compareTo(wt.ONE)?(o.n=o.p.multiply(o.q),o.d=s.modInverse(n),o.dmp1=o.d.mod(e),o.dmq1=o.d.mod(i),o.coeff=o.q.modInverse(o.p),setTimeout(function(){r()},0)):setTimeout(a,0)},h=function(){o.q=Et(),o.q.fromNumberAsync(n,1,i,function(){o.q.subtract(wt.ONE).gcda(s,function(t){0==t.compareTo(wt.ONE)&&o.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(h,0)})})},c=function(){o.p=Et(),o.p.fromNumberAsync(t-n,1,i,function(){o.p.subtract(wt.ONE).gcda(s,function(t){0==t.compareTo(wt.ONE)&&o.p.isProbablePrime(10)?setTimeout(h,0):setTimeout(c,0)})})};setTimeout(c,0)};setTimeout(a,0)},t.prototype.sign=function(t,e,r){var i=(ae[r]||"")+e(t).toString(),n=this.n.bitLength()/4,s=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var r=e-t.length-6,i="",n=0;n<r;n+=2)i+="ff";return Dt("0001"+i+"00"+t,16)}(i,n);if(null==s)return null;var o=this.doPrivate(s);if(null==o)return null;for(var a=o.toString(16),h=a.length,c=0;c<n-h;c++)a="0"+a;return a},t.prototype.verify=function(t,e,r){var i=Dt(e,16),n=this.doPublic(i);return null==n?null:function(t){for(var e in ae)if(ae.hasOwnProperty(e)){var r=ae[e],i=r.length;if(t.substring(0,i)==r)return t.substring(i)}return t}(n.toString(16).replace(/^1f+00/,""))==r(t).toString()},t}();var ae={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function he(t,e,r){if(!e||!t)throw new Error("extend failed, please check that all dependencies are included.");var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e)}
|
|
3
2
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/var KJUR={};void 0!==KJUR.asn1&&KJUR.asn1||(KJUR.asn1={}),KJUR.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substring(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var r=e.substring(1).length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var i="",n=0;n<r;n++)i+="f";e=new BigInteger(i,16).xor(t).add(BigInteger.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=KJUR.asn1,r=e.DERBoolean,i=e.DERInteger,n=e.DERBitString,s=e.DEROctetString,a=e.DERNull,o=e.DERObjectIdentifier,h=e.DEREnumerated,c=e.DERUTF8String,u=e.DERNumericString,l=e.DERPrintableString,f=e.DERTeletexString,d=e.DERIA5String,p=e.DERUTCTime,_=e.DERGeneralizedTime,g=e.DERSequence,b=e.DERSet,m=e.DERTaggedObject,y=e.ASN1Util.newObject,v=Object.keys(t);if(1!=v.length)throw"key of param shall be only one.";var S=v[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+S+":"))throw"undefined key: "+S;if("bool"==S)return new r(t[S]);if("int"==S)return new i(t[S]);if("bitstr"==S)return new n(t[S]);if("octstr"==S)return new s(t[S]);if("null"==S)return new a(t[S]);if("oid"==S)return new o(t[S]);if("enum"==S)return new h(t[S]);if("utf8str"==S)return new c(t[S]);if("numstr"==S)return new u(t[S]);if("prnstr"==S)return new l(t[S]);if("telstr"==S)return new f(t[S]);if("ia5str"==S)return new d(t[S]);if("utctime"==S)return new p(t[S]);if("gentime"==S)return new _(t[S]);if("seq"==S){for(var E=t[S],w=[],R=0;R<E.length;R++){var T=y(E[R]);w.push(T)}return new g({array:w})}if("set"==S){for(E=t[S],w=[],R=0;R<E.length;R++){T=y(E[R]);w.push(T)}return new b({array:w})}if("tag"==S){var x=t[S];if("[object Array]"===Object.prototype.toString.call(x)&&3==x.length){var A=y(x[2]);return new m({tag:x[0],explicit:x[1],obj:A})}var D={};if(void 0!==x.explicit&&(D.explicit=x.explicit),void 0!==x.tag&&(D.tag=x.tag),void 0===x.obj)throw"obj shall be specified for 'tag'.";return D.obj=y(x.obj),new m(D)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},KJUR.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",r=parseInt(t.substring(0,2),16),i=(e=Math.floor(r/40)+"."+r%40,""),n=2;n<t.length;n+=2){var s=("00000000"+parseInt(t.substring(n,n+2),16).toString(2)).slice(-8);if(i+=s.substring(1,8),"0"==s.substring(0,1))e=e+"."+new BigInteger(i,2).toString(10),i=""}return e},KJUR.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",i=new BigInteger(t,10).toString(2),n=7-i.length%7;7==n&&(n=0);for(var s="",a=0;a<n;a++)s+="0";i=s+i;for(a=0;a<i.length-1;a+=7){var o=i.substring(a,a+7);a!=i.length-7&&(o="1"+o),r+=e(parseInt(o,2))}return r};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",n=t.split("."),s=40*parseInt(n[0])+parseInt(n[1]);i+=e(s),n.splice(0,2);for(var a=0;a<n.length;a++)i+=r(n[a]);return i},KJUR.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var r=e.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+r).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},KJUR.asn1.DERAbstractString=function(t){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},extendClass(KJUR.asn1.DERAbstractString,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractTime=function(t){KJUR.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,r){var i=this.zeroPadding,n=this.localDateToUTC(t),s=String(n.getFullYear());"utc"==e&&(s=s.substring(2,4));var a=s+i(String(n.getMonth()+1),2)+i(String(n.getDate()),2)+i(String(n.getHours()),2)+i(String(n.getMinutes()),2)+i(String(n.getSeconds()),2);if(!0===r){var o=n.getMilliseconds();if(0!=o){var h=i(String(o),3);a=a+"."+(h=h.replace(/[0]+$/,""))}}return a+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,r,i,n,s){var a=new Date(Date.UTC(t,e-1,r,i,n,s,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},extendClass(KJUR.asn1.DERAbstractTime,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractStructured=function(t){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},extendClass(KJUR.asn1.DERAbstractStructured,KJUR.asn1.ASN1Object),KJUR.asn1.DERBoolean=function(){KJUR.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},extendClass(KJUR.asn1.DERBoolean,KJUR.asn1.ASN1Object),KJUR.asn1.DERInteger=function(t){KJUR.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new BigInteger(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},extendClass(KJUR.asn1.DERInteger,KJUR.asn1.ASN1Object),KJUR.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=KJUR.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}KJUR.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var r="0"+t;this.hTLV=null,this.isModified=!0,this.hV=r+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var r=0;r<=e;r++)t+="0";var i="";for(r=0;r<t.length-1;r+=8){var n=t.substring(r,r+8),s=parseInt(n,2).toString(16);1==s.length&&(s="0"+s),i+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+e+i},this.setByBooleanArray=function(t){for(var e="",r=0;r<t.length;r++)1==t[r]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},extendClass(KJUR.asn1.DERBitString,KJUR.asn1.ASN1Object),KJUR.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=KJUR.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}KJUR.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},extendClass(KJUR.asn1.DEROctetString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNull=function(){KJUR.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},extendClass(KJUR.asn1.DERNull,KJUR.asn1.ASN1Object),KJUR.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",i=new BigInteger(t,10).toString(2),n=7-i.length%7;7==n&&(n=0);for(var s="",a=0;a<n;a++)s+="0";i=s+i;for(a=0;a<i.length-1;a+=7){var o=i.substring(a,a+7);a!=i.length-7&&(o="1"+o),r+=e(parseInt(o,2))}return r};KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",n=t.split("."),s=40*parseInt(n[0])+parseInt(n[1]);i+=e(s),n.splice(0,2);for(var a=0;a<n.length;a++)i+=r(n[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(t){var e=KJUR.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},extendClass(KJUR.asn1.DERObjectIdentifier,KJUR.asn1.ASN1Object),KJUR.asn1.DEREnumerated=function(t){KJUR.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new BigInteger(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},extendClass(KJUR.asn1.DEREnumerated,KJUR.asn1.ASN1Object),KJUR.asn1.DERUTF8String=function(t){KJUR.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},extendClass(KJUR.asn1.DERUTF8String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNumericString=function(t){KJUR.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},extendClass(KJUR.asn1.DERNumericString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERPrintableString=function(t){KJUR.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},extendClass(KJUR.asn1.DERPrintableString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERTeletexString=function(t){KJUR.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},extendClass(KJUR.asn1.DERTeletexString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERIA5String=function(t){KJUR.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},extendClass(KJUR.asn1.DERIA5String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERUTCTime=function(t){KJUR.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},extendClass(KJUR.asn1.DERUTCTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERGeneralizedTime=function(t){KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},extendClass(KJUR.asn1.DERGeneralizedTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERSequence=function(t){KJUR.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},extendClass(KJUR.asn1.DERSequence,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERSet=function(t){KJUR.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var r=this.asn1Array[e];t.push(r.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},extendClass(KJUR.asn1.DERSet,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERTaggedObject=function(t){KJUR.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,r){this.hT=e,this.isExplicit=t,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},extendClass(KJUR.asn1.DERTaggedObject,KJUR.asn1.ASN1Object);var __extends=(extendStatics=function(t,e){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},extendStatics(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),extendStatics,JSEncryptRSAKey=function(t){function e(r){var i=t.call(this)||this;return r&&("string"==typeof r?i.parseKey(r):(e.hasPrivateKeyProperty(r)||e.hasPublicKeyProperty(r))&&i.parsePropertiesFrom(r)),i}return __extends(e,t),e.prototype.parseKey=function(t){try{var e=0,r=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?Hex.decode(t):Base64.unarmor(t),n=ASN1.decode(i);if(3===n.sub.length&&(n=n.sub[2].sub[0]),9===n.sub.length){e=n.sub[1].getHexStringValue(),this.n=parseBigInt(e,16),r=n.sub[2].getHexStringValue(),this.e=parseInt(r,16);var s=n.sub[3].getHexStringValue();this.d=parseBigInt(s,16);var a=n.sub[4].getHexStringValue();this.p=parseBigInt(a,16);var o=n.sub[5].getHexStringValue();this.q=parseBigInt(o,16);var h=n.sub[6].getHexStringValue();this.dmp1=parseBigInt(h,16);var c=n.sub[7].getHexStringValue();this.dmq1=parseBigInt(c,16);var u=n.sub[8].getHexStringValue();this.coeff=parseBigInt(u,16)}else{if(2!==n.sub.length)return!1;if(n.sub[0].sub){var l=n.sub[1].sub[0];e=l.sub[0].getHexStringValue(),this.n=parseBigInt(e,16),r=l.sub[1].getHexStringValue(),this.e=parseInt(r,16)}else e=n.sub[0].getHexStringValue(),this.n=parseBigInt(e,16),r=n.sub[1].getHexStringValue(),this.e=parseInt(r,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new KJUR.asn1.DERInteger({int:0}),new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e}),new KJUR.asn1.DERInteger({bigint:this.d}),new KJUR.asn1.DERInteger({bigint:this.p}),new KJUR.asn1.DERInteger({bigint:this.q}),new KJUR.asn1.DERInteger({bigint:this.dmp1}),new KJUR.asn1.DERInteger({bigint:this.dmq1}),new KJUR.asn1.DERInteger({bigint:this.coeff})]};return new KJUR.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return hex2b64(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new KJUR.asn1.DERNull]}),e=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e})]}),r=new KJUR.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new KJUR.asn1.DERSequence({array:[t,r]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return hex2b64(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var r="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(r,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(RSAKey),_a,version="undefined"!=typeof process?null===(_a=process.env)||void 0===_a?void 0:_a.npm_package_version:void 0,JSEncrypt$2=function(){function t(t){void 0===t&&(t={}),this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=t.key||null}return t.prototype.setKey=function(t){t?(this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new JSEncryptRSAKey(t)):!this.key&&this.log&&console.error("A key was not set.")},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(b64tohex(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return hex2b64(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.encryptOAEP=function(t){try{return hex2b64(this.getKey().encrypt(t,oaep_pad))}catch(t){return!1}},t.prototype.sign=function(t,e,r){void 0===e&&(e=function(t){return t}),void 0===r&&(r="");try{return hex2b64(this.getKey().sign(t,e,r))}catch(t){return!1}},t.prototype.signSha256=function(t){return this.sign(t,function(t){return rstr2hex(rstr_sha256(t))},"sha256")},t.prototype.verify=function(t,e,r){void 0===r&&(r=function(t){return t});try{return this.getKey().verify(t,b64tohex(e),r)}catch(t){return!1}},t.prototype.verifySha256=function(t,e){return this.verify(t,e,function(t){return rstr2hex(rstr_sha256(t))})},t.prototype.getKey=function(t){if(!this.key){if(this.key=new JSEncryptRSAKey,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=version,t}(),JSEncrypt$1=JSEncrypt$2,cryptoJs$1={exports:{}};function commonjsRequire(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var core$1={exports:{}},core=core$1.exports,hasRequiredCore;function requireCore(){return hasRequiredCore||(hasRequiredCore=1,function(t){t.exports=function(){var t=t||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==commonjsGlobal&&commonjsGlobal.crypto&&(r=commonjsGlobal.crypto),!r&&"function"==typeof commonjsRequire)try{r=require("crypto")}catch(t){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),s={},a=s.lib={},o=a.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},h=a.WordArray=o.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var s=0;s<n;s++){var a=r[s>>>2]>>>24-s%4*8&255;e[i+s>>>2]|=a<<24-(i+s)%4*8}else for(var o=0;o<n;o+=4)e[i+o>>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r<t;r+=4)e.push(i());return new h.init(e,t)}}),c=s.enc={},u=c.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var s=e[n>>>2]>>>24-n%4*8&255;i.push((s>>>4).toString(16)),i.push((15&s).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i+=2)r[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new h.init(r,e/2)}},l=c.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var s=e[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(s))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new h.init(r,e)}},f=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},d=a.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,i=this._data,n=i.words,s=i.sigBytes,a=this.blockSize,o=s/(4*a),c=(o=e?t.ceil(o):t.max((0|o)-this._minBufferSize,0))*a,u=t.min(4*c,s);if(c){for(var l=0;l<c;l+=a)this._doProcessBlock(n,l);r=n.splice(0,c),i.sigBytes-=u}return new h.init(r,u)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});a.Hasher=d.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new p.HMAC.init(t,r).finalize(e)}}});var p=s.algo={};return s}(Math);return t}()}(core$1,core$1.exports)),core$1.exports}var x64Core$1={exports:{}},x64Core=x64Core$1.exports,hasRequiredX64Core;function requireX64Core(){return hasRequiredX64Core||(hasRequiredX64Core=1,function(t){t.exports=function(t){return i=(r=t).lib,n=i.Base,s=i.WordArray,(a=r.x64={}).Word=n.extend({init:function(t,e){this.high=t,this.low=e}}),a.WordArray=n.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var t=this.words,e=t.length,r=[],i=0;i<e;i++){var n=t[i];r.push(n.high),r.push(n.low)}return s.create(r,this.sigBytes)},clone:function(){for(var t=n.clone.call(this),e=t.words=this.words.slice(0),r=e.length,i=0;i<r;i++)e[i]=e[i].clone();return t}}),t;var e,r,i,n,s,a}(requireCore())}(x64Core$1,x64Core$1.exports)),x64Core$1.exports}var libTypedarrays$1={exports:{}},libTypedarrays=libTypedarrays$1.exports,hasRequiredLibTypedarrays;function requireLibTypedarrays(){return hasRequiredLibTypedarrays||(hasRequiredLibTypedarrays=1,function(t){t.exports=function(t){return function(){if("function"==typeof ArrayBuffer){var e=t.lib.WordArray,r=e.init,i=e.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var e=t.byteLength,i=[],n=0;n<e;n++)i[n>>>2]|=t[n]<<24-n%4*8;r.call(this,i,e)}else r.apply(this,arguments)};i.prototype=e}}(),t.lib.WordArray}(requireCore())}(libTypedarrays$1,libTypedarrays$1.exports)),libTypedarrays$1.exports}var encUtf16$1={exports:{}},encUtf16=encUtf16$1.exports,hasRequiredEncUtf16;function requireEncUtf16(){return hasRequiredEncUtf16||(hasRequiredEncUtf16=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.WordArray,i=e.enc;function n(t){return t<<8&4278255360|t>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n+=2){var s=e[n>>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(s))}return i.join("")},parse:function(t){for(var e=t.length,i=[],n=0;n<e;n++)i[n>>>1]|=t.charCodeAt(n)<<16-n%2*16;return r.create(i,2*e)}},i.Utf16LE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],s=0;s<r;s+=2){var a=n(e[s>>>2]>>>16-s%4*8&65535);i.push(String.fromCharCode(a))}return i.join("")},parse:function(t){for(var e=t.length,i=[],s=0;s<e;s++)i[s>>>1]|=n(t.charCodeAt(s)<<16-s%2*16);return r.create(i,2*e)}}}(),t.enc.Utf16}(requireCore())}(encUtf16$1,encUtf16$1.exports)),encUtf16$1.exports}var encBase64$1={exports:{}},encBase64=encBase64$1.exports,hasRequiredEncBase64;function requireEncBase64(){return hasRequiredEncBase64||(hasRequiredEncBase64=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.WordArray;function i(t,e,i){for(var n=[],s=0,a=0;a<e;a++)if(a%4){var o=i[t.charCodeAt(a-1)]<<a%4*2|i[t.charCodeAt(a)]>>>6-a%4*2;n[s>>>2]|=o<<24-s%4*8,s++}return r.create(n,s)}e.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],s=0;s<r;s+=3)for(var a=(e[s>>>2]>>>24-s%4*8&255)<<16|(e[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|e[s+2>>>2]>>>24-(s+2)%4*8&255,o=0;o<4&&s+.75*o<r;o++)n.push(i.charAt(a>>>6*(3-o)&63));var h=i.charAt(64);if(h)for(;n.length%4;)n.push(h);return n.join("")},parse:function(t){var e=t.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var s=0;s<r.length;s++)n[r.charCodeAt(s)]=s}var a=r.charAt(64);if(a){var o=t.indexOf(a);-1!==o&&(e=o)}return i(t,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64}(requireCore())}(encBase64$1,encBase64$1.exports)),encBase64$1.exports}var encBase64url$1={exports:{}},encBase64url=encBase64url$1.exports,hasRequiredEncBase64url;function requireEncBase64url(){return hasRequiredEncBase64url||(hasRequiredEncBase64url=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.WordArray;function i(t,e,i){for(var n=[],s=0,a=0;a<e;a++)if(a%4){var o=i[t.charCodeAt(a-1)]<<a%4*2|i[t.charCodeAt(a)]>>>6-a%4*2;n[s>>>2]|=o<<24-s%4*8,s++}return r.create(n,s)}e.enc.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var r=t.words,i=t.sigBytes,n=e?this._safe_map:this._map;t.clamp();for(var s=[],a=0;a<i;a+=3)for(var o=(r[a>>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,h=0;h<4&&a+.75*h<i;h++)s.push(n.charAt(o>>>6*(3-h)&63));var c=n.charAt(64);if(c)for(;s.length%4;)s.push(c);return s.join("")},parse:function(t,e){void 0===e&&(e=!0);var r=t.length,n=e?this._safe_map:this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var a=0;a<n.length;a++)s[n.charCodeAt(a)]=a}var o=n.charAt(64);if(o){var h=t.indexOf(o);-1!==h&&(r=h)}return i(t,r,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),t.enc.Base64url}(requireCore())}(encBase64url$1,encBase64url$1.exports)),encBase64url$1.exports}var md5$1={exports:{}},md5=md5$1.exports,hasRequiredMd5;function requireMd5(){return hasRequiredMd5||(hasRequiredMd5=1,function(t){t.exports=function(t){return function(e){var r=t,i=r.lib,n=i.WordArray,s=i.Hasher,a=r.algo,o=[];!function(){for(var t=0;t<64;t++)o[t]=4294967296*e.abs(e.sin(t+1))|0}();var h=a.MD5=s.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var s=this._hash.words,a=t[e+0],h=t[e+1],d=t[e+2],p=t[e+3],_=t[e+4],g=t[e+5],b=t[e+6],m=t[e+7],y=t[e+8],v=t[e+9],S=t[e+10],E=t[e+11],w=t[e+12],R=t[e+13],T=t[e+14],x=t[e+15],A=s[0],D=s[1],k=s[2],C=s[3];A=c(A,D,k,C,a,7,o[0]),C=c(C,A,D,k,h,12,o[1]),k=c(k,C,A,D,d,17,o[2]),D=c(D,k,C,A,p,22,o[3]),A=c(A,D,k,C,_,7,o[4]),C=c(C,A,D,k,g,12,o[5]),k=c(k,C,A,D,b,17,o[6]),D=c(D,k,C,A,m,22,o[7]),A=c(A,D,k,C,y,7,o[8]),C=c(C,A,D,k,v,12,o[9]),k=c(k,C,A,D,S,17,o[10]),D=c(D,k,C,A,E,22,o[11]),A=c(A,D,k,C,w,7,o[12]),C=c(C,A,D,k,R,12,o[13]),k=c(k,C,A,D,T,17,o[14]),A=u(A,D=c(D,k,C,A,x,22,o[15]),k,C,h,5,o[16]),C=u(C,A,D,k,b,9,o[17]),k=u(k,C,A,D,E,14,o[18]),D=u(D,k,C,A,a,20,o[19]),A=u(A,D,k,C,g,5,o[20]),C=u(C,A,D,k,S,9,o[21]),k=u(k,C,A,D,x,14,o[22]),D=u(D,k,C,A,_,20,o[23]),A=u(A,D,k,C,v,5,o[24]),C=u(C,A,D,k,T,9,o[25]),k=u(k,C,A,D,p,14,o[26]),D=u(D,k,C,A,y,20,o[27]),A=u(A,D,k,C,R,5,o[28]),C=u(C,A,D,k,d,9,o[29]),k=u(k,C,A,D,m,14,o[30]),A=l(A,D=u(D,k,C,A,w,20,o[31]),k,C,g,4,o[32]),C=l(C,A,D,k,y,11,o[33]),k=l(k,C,A,D,E,16,o[34]),D=l(D,k,C,A,T,23,o[35]),A=l(A,D,k,C,h,4,o[36]),C=l(C,A,D,k,_,11,o[37]),k=l(k,C,A,D,m,16,o[38]),D=l(D,k,C,A,S,23,o[39]),A=l(A,D,k,C,R,4,o[40]),C=l(C,A,D,k,a,11,o[41]),k=l(k,C,A,D,p,16,o[42]),D=l(D,k,C,A,b,23,o[43]),A=l(A,D,k,C,v,4,o[44]),C=l(C,A,D,k,w,11,o[45]),k=l(k,C,A,D,x,16,o[46]),A=f(A,D=l(D,k,C,A,d,23,o[47]),k,C,a,6,o[48]),C=f(C,A,D,k,m,10,o[49]),k=f(k,C,A,D,T,15,o[50]),D=f(D,k,C,A,g,21,o[51]),A=f(A,D,k,C,w,6,o[52]),C=f(C,A,D,k,p,10,o[53]),k=f(k,C,A,D,S,15,o[54]),D=f(D,k,C,A,h,21,o[55]),A=f(A,D,k,C,y,6,o[56]),C=f(C,A,D,k,x,10,o[57]),k=f(k,C,A,D,b,15,o[58]),D=f(D,k,C,A,R,21,o[59]),A=f(A,D,k,C,_,6,o[60]),C=f(C,A,D,k,E,10,o[61]),k=f(k,C,A,D,d,15,o[62]),D=f(D,k,C,A,v,21,o[63]),s[0]=s[0]+A|0,s[1]=s[1]+D|0,s[2]=s[2]+k|0,s[3]=s[3]+C|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;r[n>>>5]|=128<<24-n%32;var s=e.floor(i/4294967296),a=i;r[15+(n+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),r[14+(n+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var o=this._hash,h=o.words,c=0;c<4;c++){var u=h[c];h[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return o},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,r,i,n,s,a){var o=t+(e&r|~e&i)+n+a;return(o<<s|o>>>32-s)+e}function u(t,e,r,i,n,s,a){var o=t+(e&i|r&~i)+n+a;return(o<<s|o>>>32-s)+e}function l(t,e,r,i,n,s,a){var o=t+(e^r^i)+n+a;return(o<<s|o>>>32-s)+e}function f(t,e,r,i,n,s,a){var o=t+(r^(e|~i))+n+a;return(o<<s|o>>>32-s)+e}r.MD5=s._createHelper(h),r.HmacMD5=s._createHmacHelper(h)}(Math),t.MD5}(requireCore())}(md5$1,md5$1.exports)),md5$1.exports}var sha1$1={exports:{}},sha1=sha1$1.exports,hasRequiredSha1;function requireSha1(){return hasRequiredSha1||(hasRequiredSha1=1,function(t){t.exports=function(t){return r=(e=t).lib,i=r.WordArray,n=r.Hasher,s=e.algo,a=[],o=s.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],s=r[2],o=r[3],h=r[4],c=0;c<80;c++){if(c<16)a[c]=0|t[e+c];else{var u=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=u<<1|u>>>31}var l=(i<<5|i>>>27)+h+a[c];l+=c<20?1518500249+(n&s|~n&o):c<40?1859775393+(n^s^o):c<60?(n&s|n&o|s&o)-1894007588:(n^s^o)-899497514,h=o,o=s,s=n<<30|n>>>2,n=i,i=l}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+s|0,r[3]=r[3]+o|0,r[4]=r[4]+h|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=n._createHelper(o),e.HmacSHA1=n._createHmacHelper(o),t.SHA1;var e,r,i,n,s,a,o}(requireCore())}(sha1$1,sha1$1.exports)),sha1$1.exports}var sha256$1={exports:{}},sha256=sha256$1.exports,hasRequiredSha256;function requireSha256(){return hasRequiredSha256||(hasRequiredSha256=1,function(t){t.exports=function(t){return function(e){var r=t,i=r.lib,n=i.WordArray,s=i.Hasher,a=r.algo,o=[],h=[];!function(){function t(t){for(var r=e.sqrt(t),i=2;i<=r;i++)if(!(t%i))return!1;return!0}function r(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)t(i)&&(n<8&&(o[n]=r(e.pow(i,.5))),h[n]=r(e.pow(i,1/3)),n++),i++}();var c=[],u=a.SHA256=s.extend({_doReset:function(){this._hash=new n.init(o.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],s=r[2],a=r[3],o=r[4],u=r[5],l=r[6],f=r[7],d=0;d<64;d++){if(d<16)c[d]=0|t[e+d];else{var p=c[d-15],_=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[d-2],b=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[d]=_+c[d-7]+b+c[d-16]}var m=i&n^i&s^n&s,y=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),v=f+((o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25))+(o&u^~o&l)+h[d]+c[d];f=l,l=u,u=o,o=a+v|0,a=s,s=n,n=i,i=v+(y+m)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+o|0,r[5]=r[5]+u|0,r[6]=r[6]+l|0,r[7]=r[7]+f|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(n+64>>>9<<4)]=e.floor(i/4294967296),r[15+(n+64>>>9<<4)]=i,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}});r.SHA256=s._createHelper(u),r.HmacSHA256=s._createHmacHelper(u)}(Math),t.SHA256}(requireCore())}(sha256$1,sha256$1.exports)),sha256$1.exports}var sha224$1={exports:{}},sha224=sha224$1.exports,hasRequiredSha224;function requireSha224(){return hasRequiredSha224||(hasRequiredSha224=1,function(t){t.exports=function(t){return r=(e=t).lib.WordArray,i=e.algo,n=i.SHA256,s=i.SHA224=n.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=n._doFinalize.call(this);return t.sigBytes-=4,t}}),e.SHA224=n._createHelper(s),e.HmacSHA224=n._createHmacHelper(s),t.SHA224;var e,r,i,n,s}(requireCore(),requireSha256())}(sha224$1,sha224$1.exports)),sha224$1.exports}var sha512$1={exports:{}},sha512=sha512$1.exports,hasRequiredSha512;function requireSha512(){return hasRequiredSha512||(hasRequiredSha512=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.Hasher,i=e.x64,n=i.Word,s=i.WordArray,a=e.algo;function o(){return n.create.apply(n,arguments)}var h=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],c=[];!function(){for(var t=0;t<80;t++)c[t]=o()}();var u=a.SHA512=r.extend({_doReset:function(){this._hash=new s.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],s=r[2],a=r[3],o=r[4],u=r[5],l=r[6],f=r[7],d=i.high,p=i.low,_=n.high,g=n.low,b=s.high,m=s.low,y=a.high,v=a.low,S=o.high,E=o.low,w=u.high,R=u.low,T=l.high,x=l.low,A=f.high,D=f.low,k=d,C=p,I=_,B=g,O=b,N=m,$=y,M=v,L=S,P=E,H=w,q=R,U=T,F=x,z=A,Z=D,K=0;K<80;K++){var j,J,V=c[K];if(K<16)J=V.high=0|t[e+2*K],j=V.low=0|t[e+2*K+1];else{var X=c[K-15],G=X.high,Y=X.low,W=(G>>>1|Y<<31)^(G>>>8|Y<<24)^G>>>7,Q=(Y>>>1|G<<31)^(Y>>>8|G<<24)^(Y>>>7|G<<25),tt=c[K-2],et=tt.high,rt=tt.low,it=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,nt=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),st=c[K-7],at=st.high,ot=st.low,ht=c[K-16],ct=ht.high,ut=ht.low;J=(J=(J=W+at+((j=Q+ot)>>>0<Q>>>0?1:0))+it+((j+=nt)>>>0<nt>>>0?1:0))+ct+((j+=ut)>>>0<ut>>>0?1:0),V.high=J,V.low=j}var lt,ft=L&H^~L&U,dt=P&q^~P&F,pt=k&I^k&O^I&O,_t=C&B^C&N^B&N,gt=(k>>>28|C<<4)^(k<<30|C>>>2)^(k<<25|C>>>7),bt=(C>>>28|k<<4)^(C<<30|k>>>2)^(C<<25|k>>>7),mt=(L>>>14|P<<18)^(L>>>18|P<<14)^(L<<23|P>>>9),yt=(P>>>14|L<<18)^(P>>>18|L<<14)^(P<<23|L>>>9),vt=h[K],St=vt.high,Et=vt.low,wt=z+mt+((lt=Z+yt)>>>0<Z>>>0?1:0),Rt=bt+_t;z=U,Z=F,U=H,F=q,H=L,q=P,L=$+(wt=(wt=(wt=wt+ft+((lt+=dt)>>>0<dt>>>0?1:0))+St+((lt+=Et)>>>0<Et>>>0?1:0))+J+((lt+=j)>>>0<j>>>0?1:0))+((P=M+lt|0)>>>0<M>>>0?1:0)|0,$=O,M=N,O=I,N=B,I=k,B=C,k=wt+(gt+pt+(Rt>>>0<bt>>>0?1:0))+((C=lt+Rt|0)>>>0<lt>>>0?1:0)|0}p=i.low=p+C,i.high=d+k+(p>>>0<C>>>0?1:0),g=n.low=g+B,n.high=_+I+(g>>>0<B>>>0?1:0),m=s.low=m+N,s.high=b+O+(m>>>0<N>>>0?1:0),v=a.low=v+M,a.high=y+$+(v>>>0<M>>>0?1:0),E=o.low=E+P,o.high=S+L+(E>>>0<P>>>0?1:0),R=u.low=R+q,u.high=w+H+(R>>>0<q>>>0?1:0),x=l.low=x+F,l.high=T+U+(x>>>0<F>>>0?1:0),D=f.low=D+Z,f.high=A+z+(D>>>0<Z>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[30+(i+128>>>10<<5)]=Math.floor(r/4294967296),e[31+(i+128>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=r._createHelper(u),e.HmacSHA512=r._createHmacHelper(u)}(),t.SHA512}(requireCore(),requireX64Core())}(sha512$1,sha512$1.exports)),sha512$1.exports}var sha384$1={exports:{}},sha384=sha384$1.exports,hasRequiredSha384;function requireSha384(){return hasRequiredSha384||(hasRequiredSha384=1,function(t){t.exports=function(t){return r=(e=t).x64,i=r.Word,n=r.WordArray,s=e.algo,a=s.SHA512,o=s.SHA384=a.extend({_doReset:function(){this._hash=new n.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=16,t}}),e.SHA384=a._createHelper(o),e.HmacSHA384=a._createHmacHelper(o),t.SHA384;var e,r,i,n,s,a,o}(requireCore(),requireX64Core(),requireSha512())}(sha384$1,sha384$1.exports)),sha384$1.exports}var sha3$1={exports:{}},sha3=sha3$1.exports,hasRequiredSha3;function requireSha3(){return hasRequiredSha3||(hasRequiredSha3=1,function(t){t.exports=function(t){return function(e){var r=t,i=r.lib,n=i.WordArray,s=i.Hasher,a=r.x64.Word,o=r.algo,h=[],c=[],u=[];!function(){for(var t=1,e=0,r=0;r<24;r++){h[t+5*e]=(r+1)*(r+2)/2%64;var i=(2*t+3*e)%5;t=e%5,e=i}for(t=0;t<5;t++)for(e=0;e<5;e++)c[t+5*e]=e+(2*t+3*e)%5*5;for(var n=1,s=0;s<24;s++){for(var o=0,l=0,f=0;f<7;f++){if(1&n){var d=(1<<f)-1;d<32?l^=1<<d:o^=1<<d-32}128&n?n=n<<1^113:n<<=1}u[s]=a.create(o,l)}}();var l=[];!function(){for(var t=0;t<25;t++)l[t]=a.create()}();var f=o.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var r=this._state,i=this.blockSize/2,n=0;n<i;n++){var s=t[e+2*n],a=t[e+2*n+1];s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(D=r[n]).high^=a,D.low^=s}for(var o=0;o<24;o++){for(var f=0;f<5;f++){for(var d=0,p=0,_=0;_<5;_++)d^=(D=r[f+5*_]).high,p^=D.low;var g=l[f];g.high=d,g.low=p}for(f=0;f<5;f++){var b=l[(f+4)%5],m=l[(f+1)%5],y=m.high,v=m.low;for(d=b.high^(y<<1|v>>>31),p=b.low^(v<<1|y>>>31),_=0;_<5;_++)(D=r[f+5*_]).high^=d,D.low^=p}for(var S=1;S<25;S++){var E=(D=r[S]).high,w=D.low,R=h[S];R<32?(d=E<<R|w>>>32-R,p=w<<R|E>>>32-R):(d=w<<R-32|E>>>64-R,p=E<<R-32|w>>>64-R);var T=l[c[S]];T.high=d,T.low=p}var x=l[0],A=r[0];for(x.high=A.high,x.low=A.low,f=0;f<5;f++)for(_=0;_<5;_++){var D=r[S=f+5*_],k=l[S],C=l[(f+1)%5+5*_],I=l[(f+2)%5+5*_];D.high=k.high^~C.high&I.high,D.low=k.low^~C.low&I.low}D=r[0];var B=u[o];D.high^=B.high,D.low^=B.low}},_doFinalize:function(){var t=this._data,r=t.words;this._nDataBytes;var i=8*t.sigBytes,s=32*this.blockSize;r[i>>>5]|=1<<24-i%32,r[(e.ceil((i+1)/s)*s>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var a=this._state,o=this.cfg.outputLength/8,h=o/8,c=[],u=0;u<h;u++){var l=a[u],f=l.high,d=l.low;f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),c.push(d),c.push(f)}return new n.init(c,o)},clone:function(){for(var t=s.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});r.SHA3=s._createHelper(f),r.HmacSHA3=s._createHmacHelper(f)}(Math),t.SHA3}(requireCore(),requireX64Core())}(sha3$1,sha3$1.exports)),sha3$1.exports}var ripemd160$1={exports:{}},ripemd160=ripemd160$1.exports,hasRequiredRipemd160;function requireRipemd160(){return hasRequiredRipemd160||(hasRequiredRipemd160=1,function(t){t.exports=function(t){
|
|
11
|
-
/** @preserve
|
|
12
|
-
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
13
|
-
|
|
14
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
15
|
-
|
|
16
|
-
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
17
|
-
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
18
|
-
|
|
19
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
20
|
-
*/
|
|
21
|
-
return function(){var e=t,r=e.lib,i=r.WordArray,n=r.Hasher,s=e.algo,a=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),h=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=i.create([0,1518500249,1859775393,2400959708,2840853838]),l=i.create([1352829926,1548603684,1836072691,2053994217,0]),f=s.RIPEMD160=n.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var s,f,y,v,S,E,w,R,T,x,A,D=this._hash.words,k=u.words,C=l.words,I=a.words,B=o.words,O=h.words,N=c.words;for(E=s=D[0],w=f=D[1],R=y=D[2],T=v=D[3],x=S=D[4],r=0;r<80;r+=1)A=s+t[e+I[r]]|0,A+=r<16?d(f,y,v)+k[0]:r<32?p(f,y,v)+k[1]:r<48?_(f,y,v)+k[2]:r<64?g(f,y,v)+k[3]:b(f,y,v)+k[4],A=(A=m(A|=0,O[r]))+S|0,s=S,S=v,v=m(y,10),y=f,f=A,A=E+t[e+B[r]]|0,A+=r<16?b(w,R,T)+C[0]:r<32?g(w,R,T)+C[1]:r<48?_(w,R,T)+C[2]:r<64?p(w,R,T)+C[3]:d(w,R,T)+C[4],A=(A=m(A|=0,N[r]))+x|0,E=x,x=T,T=m(R,10),R=w,w=A;A=D[1]+y+T|0,D[1]=D[2]+v+x|0,D[2]=D[3]+S+E|0,D[3]=D[4]+s+w|0,D[4]=D[0]+f+R|0,D[0]=A},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,s=n.words,a=0;a<5;a++){var o=s[a];s[a]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}return n},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});function d(t,e,r){return t^e^r}function p(t,e,r){return t&e|~t&r}function _(t,e,r){return(t|~e)^r}function g(t,e,r){return t&r|e&~r}function b(t,e,r){return t^(e|~r)}function m(t,e){return t<<e|t>>>32-e}e.RIPEMD160=n._createHelper(f),e.HmacRIPEMD160=n._createHmacHelper(f)}(),t.RIPEMD160}(requireCore())}(ripemd160$1,ripemd160$1.exports)),ripemd160$1.exports}var hmac$1={exports:{}},hmac=hmac$1.exports,hasRequiredHmac;function requireHmac(){return hasRequiredHmac||(hasRequiredHmac=1,function(t){t.exports=function(t){var e,r,i;r=(e=t).lib.Base,i=e.enc.Utf8,e.algo.HMAC=r.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=i.parse(e));var r=t.blockSize,n=4*r;e.sigBytes>n&&(e=t.finalize(e)),e.clamp();for(var s=this._oKey=e.clone(),a=this._iKey=e.clone(),o=s.words,h=a.words,c=0;c<r;c++)o[c]^=1549556828,h[c]^=909522486;s.sigBytes=a.sigBytes=n,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,r=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(r))}})}(requireCore())}(hmac$1,hmac$1.exports)),hmac$1.exports}var pbkdf2$1={exports:{}},pbkdf2=pbkdf2$1.exports,hasRequiredPbkdf2;function requirePbkdf2(){return hasRequiredPbkdf2||(hasRequiredPbkdf2=1,function(t){t.exports=function(t){return r=(e=t).lib,i=r.Base,n=r.WordArray,s=e.algo,a=s.SHA256,o=s.HMAC,h=s.PBKDF2=i.extend({cfg:i.extend({keySize:4,hasher:a,iterations:25e4}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r=this.cfg,i=o.create(r.hasher,t),s=n.create(),a=n.create([1]),h=s.words,c=a.words,u=r.keySize,l=r.iterations;h.length<u;){var f=i.update(e).finalize(a);i.reset();for(var d=f.words,p=d.length,_=f,g=1;g<l;g++){_=i.finalize(_),i.reset();for(var b=_.words,m=0;m<p;m++)d[m]^=b[m]}s.concat(f),c[0]++}return s.sigBytes=4*u,s}}),e.PBKDF2=function(t,e,r){return h.create(r).compute(t,e)},t.PBKDF2;var e,r,i,n,s,a,o,h}(requireCore(),requireSha256(),requireHmac())}(pbkdf2$1,pbkdf2$1.exports)),pbkdf2$1.exports}var evpkdf$1={exports:{}},evpkdf=evpkdf$1.exports,hasRequiredEvpkdf;function requireEvpkdf(){return hasRequiredEvpkdf||(hasRequiredEvpkdf=1,function(t){t.exports=function(t){return r=(e=t).lib,i=r.Base,n=r.WordArray,s=e.algo,a=s.MD5,o=s.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r,i=this.cfg,s=i.hasher.create(),a=n.create(),o=a.words,h=i.keySize,c=i.iterations;o.length<h;){r&&s.update(r),r=s.update(t).finalize(e),s.reset();for(var u=1;u<c;u++)r=s.finalize(r),s.reset();a.concat(r)}return a.sigBytes=4*h,a}}),e.EvpKDF=function(t,e,r){return o.create(r).compute(t,e)},t.EvpKDF;var e,r,i,n,s,a,o}(requireCore(),requireSha1(),requireHmac())}(evpkdf$1,evpkdf$1.exports)),evpkdf$1.exports}var cipherCore$1={exports:{}},cipherCore=cipherCore$1.exports,hasRequiredCipherCore;function requireCipherCore(){return hasRequiredCipherCore||(hasRequiredCipherCore=1,function(t){t.exports=function(t){t.lib.Cipher||function(e){var r=t,i=r.lib,n=i.Base,s=i.WordArray,a=i.BufferedBlockAlgorithm,o=r.enc;o.Utf8;var h=o.Base64,c=r.algo.EvpKDF,u=i.Cipher=a.extend({cfg:n.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?y:b}return function(e){return{encrypt:function(r,i,n){return t(i).encrypt(e,r,i,n)},decrypt:function(r,i,n){return t(i).decrypt(e,r,i,n)}}}}()});i.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=r.mode={},f=i.BlockCipherMode=n.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),d=l.CBC=function(){var t=f.extend();function r(t,r,i){var n,s=this._iv;s?(n=s,this._iv=e):n=this._prevBlock;for(var a=0;a<i;a++)t[r+a]^=n[a]}return t.Encryptor=t.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize;r.call(this,t,e,n),i.encryptBlock(t,e),this._prevBlock=t.slice(e,e+n)}}),t.Decryptor=t.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,s=t.slice(e,e+n);i.decryptBlock(t,e),r.call(this,t,e,n),this._prevBlock=s}}),t}(),p=(r.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,i=r-t.sigBytes%r,n=i<<24|i<<16|i<<8|i,a=[],o=0;o<i;o+=4)a.push(n);var h=s.create(a,i);t.concat(h)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}};i.BlockCipher=u.extend({cfg:u.cfg.extend({mode:d,padding:p}),reset:function(){var t;u.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4});var _=i.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),g=(r.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?s.create([1398893684,1701076831]).concat(r).concat(e):e).toString(h)},parse:function(t){var e,r=h.parse(t),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(e=s.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),_.create({ciphertext:r,salt:e})}},b=i.SerializableCipher=n.extend({cfg:n.extend({format:g}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),s=n.finalize(e),a=n.cfg;return _.create({ciphertext:s,key:r,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),m=(r.kdf={}).OpenSSL={execute:function(t,e,r,i,n){if(i||(i=s.random(8)),n)a=c.create({keySize:e+r,hasher:n}).compute(t,i);else var a=c.create({keySize:e+r}).compute(t,i);var o=s.create(a.words.slice(e),4*r);return a.sigBytes=4*e,_.create({key:a,iv:o,salt:i})}},y=i.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:m}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize,i.salt,i.hasher);i.iv=n.iv;var s=b.encrypt.call(this,t,e,n.key,i);return s.mixIn(n),s},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt,i.hasher);return i.iv=n.iv,b.decrypt.call(this,t,e,n.key,i)}})}()}(requireCore(),requireEvpkdf())}(cipherCore$1,cipherCore$1.exports)),cipherCore$1.exports}var modeCfb$1={exports:{}},modeCfb=modeCfb$1.exports,hasRequiredModeCfb;function requireModeCfb(){return hasRequiredModeCfb||(hasRequiredModeCfb=1,function(t){t.exports=function(t){return t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();function r(t,e,r,i){var n,s=this._iv;s?(n=s.slice(0),this._iv=void 0):n=this._prevBlock,i.encryptBlock(n,0);for(var a=0;a<r;a++)t[e+a]^=n[a]}return e.Encryptor=e.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize;r.call(this,t,e,n,i),this._prevBlock=t.slice(e,e+n)}}),e.Decryptor=e.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,s=t.slice(e,e+n);r.call(this,t,e,n,i),this._prevBlock=s}}),e}(),t.mode.CFB}(requireCore(),requireCipherCore())}(modeCfb$1,modeCfb$1.exports)),modeCfb$1.exports}var modeCtr$1={exports:{}},modeCtr=modeCtr$1.exports,hasRequiredModeCtr;function requireModeCtr(){return hasRequiredModeCtr||(hasRequiredModeCtr=1,function(t){t.exports=function(t){return t.mode.CTR=(e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,s=this._counter;n&&(s=this._counter=n.slice(0),this._iv=void 0);var a=s.slice(0);r.encryptBlock(a,0),s[i-1]=s[i-1]+1|0;for(var o=0;o<i;o++)t[e+o]^=a[o]}}),e.Decryptor=r,e),t.mode.CTR;var e,r}(requireCore(),requireCipherCore())}(modeCtr$1,modeCtr$1.exports)),modeCtr$1.exports}var modeCtrGladman$1={exports:{}},modeCtrGladman=modeCtrGladman$1.exports,hasRequiredModeCtrGladman;function requireModeCtrGladman(){return hasRequiredModeCtrGladman||(hasRequiredModeCtrGladman=1,function(t){t.exports=function(t){
|
|
22
|
-
/** @preserve
|
|
23
|
-
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
24
|
-
* derived from CryptoJS.mode.CTR
|
|
25
|
-
* Jan Hruby jhruby.web@gmail.com
|
|
26
|
-
*/
|
|
27
|
-
return t.mode.CTRGladman=function(){var e=t.lib.BlockCipherMode.extend();function r(t){if(255&~(t>>24))t+=1<<24;else{var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}return t}function i(t){return 0===(t[0]=r(t[0]))&&(t[1]=r(t[1])),t}var n=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize,s=this._iv,a=this._counter;s&&(a=this._counter=s.slice(0),this._iv=void 0),i(a);var o=a.slice(0);r.encryptBlock(o,0);for(var h=0;h<n;h++)t[e+h]^=o[h]}});return e.Decryptor=n,e}(),t.mode.CTRGladman}(requireCore(),requireCipherCore())}(modeCtrGladman$1,modeCtrGladman$1.exports)),modeCtrGladman$1.exports}var modeOfb$1={exports:{}},modeOfb=modeOfb$1.exports,hasRequiredModeOfb;function requireModeOfb(){return hasRequiredModeOfb||(hasRequiredModeOfb=1,function(t){t.exports=function(t){return t.mode.OFB=(e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,s=this._keystream;n&&(s=this._keystream=n.slice(0),this._iv=void 0),r.encryptBlock(s,0);for(var a=0;a<i;a++)t[e+a]^=s[a]}}),e.Decryptor=r,e),t.mode.OFB;var e,r}(requireCore(),requireCipherCore())}(modeOfb$1,modeOfb$1.exports)),modeOfb$1.exports}var modeEcb$1={exports:{}},modeEcb=modeEcb$1.exports,hasRequiredModeEcb;function requireModeEcb(){return hasRequiredModeEcb||(hasRequiredModeEcb=1,function(t){t.exports=function(t){return t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),e.Decryptor=e.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),e),t.mode.ECB;var e}(requireCore(),requireCipherCore())}(modeEcb$1,modeEcb$1.exports)),modeEcb$1.exports}var padAnsix923$1={exports:{}},padAnsix923=padAnsix923$1.exports,hasRequiredPadAnsix923;function requirePadAnsix923(){return hasRequiredPadAnsix923||(hasRequiredPadAnsix923=1,function(t){t.exports=function(t){return t.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,i=4*e,n=i-r%i,s=r+n-1;t.clamp(),t.words[s>>>2]|=n<<24-s%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Ansix923}(requireCore(),requireCipherCore())}(padAnsix923$1,padAnsix923$1.exports)),padAnsix923$1.exports}var padIso10126$1={exports:{}},padIso10126=padIso10126$1.exports,hasRequiredPadIso10126;function requirePadIso10126(){return hasRequiredPadIso10126||(hasRequiredPadIso10126=1,function(t){t.exports=function(t){return t.pad.Iso10126={pad:function(e,r){var i=4*r,n=i-e.sigBytes%i;e.concat(t.lib.WordArray.random(n-1)).concat(t.lib.WordArray.create([n<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Iso10126}(requireCore(),requireCipherCore())}(padIso10126$1,padIso10126$1.exports)),padIso10126$1.exports}var padIso97971$1={exports:{}},padIso97971=padIso97971$1.exports,hasRequiredPadIso97971;function requirePadIso97971(){return hasRequiredPadIso97971||(hasRequiredPadIso97971=1,function(t){t.exports=function(t){return t.pad.Iso97971={pad:function(e,r){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,r)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971}(requireCore(),requireCipherCore())}(padIso97971$1,padIso97971$1.exports)),padIso97971$1.exports}var padZeropadding$1={exports:{}},padZeropadding=padZeropadding$1.exports,hasRequiredPadZeropadding;function requirePadZeropadding(){return hasRequiredPadZeropadding||(hasRequiredPadZeropadding=1,function(t){t.exports=function(t){return t.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){var e=t.words,r=t.sigBytes-1;for(r=t.sigBytes-1;r>=0;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},t.pad.ZeroPadding}(requireCore(),requireCipherCore())}(padZeropadding$1,padZeropadding$1.exports)),padZeropadding$1.exports}var padNopadding$1={exports:{}},padNopadding=padNopadding$1.exports,hasRequiredPadNopadding;function requirePadNopadding(){return hasRequiredPadNopadding||(hasRequiredPadNopadding=1,function(t){t.exports=function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding}(requireCore(),requireCipherCore())}(padNopadding$1,padNopadding$1.exports)),padNopadding$1.exports}var formatHex$1={exports:{}},formatHex=formatHex$1.exports,hasRequiredFormatHex;function requireFormatHex(){return hasRequiredFormatHex||(hasRequiredFormatHex=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.CipherParams,i=e.enc.Hex;e.format.Hex={stringify:function(t){return t.ciphertext.toString(i)},parse:function(t){var e=i.parse(t);return r.create({ciphertext:e})}}}(),t.format.Hex}(requireCore(),requireCipherCore())}(formatHex$1,formatHex$1.exports)),formatHex$1.exports}var aes$1={exports:{}},aes=aes$1.exports,hasRequiredAes;function requireAes(){return hasRequiredAes||(hasRequiredAes=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,i=e.algo,n=[],s=[],a=[],o=[],h=[],c=[],u=[],l=[],f=[],d=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var r=0,i=0;for(e=0;e<256;e++){var p=i^i<<1^i<<2^i<<3^i<<4;p=p>>>8^255&p^99,n[r]=p,s[p]=r;var _=t[r],g=t[_],b=t[g],m=257*t[p]^16843008*p;a[r]=m<<24|m>>>8,o[r]=m<<16|m>>>16,h[r]=m<<8|m>>>24,c[r]=m,m=16843009*b^65537*g^257*_^16843008*r,u[p]=m<<24|m>>>8,l[p]=m<<16|m>>>16,f[p]=m<<8|m>>>24,d[p]=m,r?(r=_^t[t[t[b^_]]],i^=t[t[i]]):r=i=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],_=i.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,i=4*((this._nRounds=r+6)+1),s=this._keySchedule=[],a=0;a<i;a++)a<r?s[a]=e[a]:(c=s[a-1],a%r?r>6&&a%r==4&&(c=n[c>>>24]<<24|n[c>>>16&255]<<16|n[c>>>8&255]<<8|n[255&c]):(c=n[(c=c<<8|c>>>24)>>>24]<<24|n[c>>>16&255]<<16|n[c>>>8&255]<<8|n[255&c],c^=p[a/r|0]<<24),s[a]=s[a-r]^c);for(var o=this._invKeySchedule=[],h=0;h<i;h++){if(a=i-h,h%4)var c=s[a];else c=s[a-4];o[h]=h<4||a<=4?c:u[n[c>>>24]]^l[n[c>>>16&255]]^f[n[c>>>8&255]]^d[n[255&c]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,o,h,c,n)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,u,l,f,d,s),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,s,a,o){for(var h=this._nRounds,c=t[e]^r[0],u=t[e+1]^r[1],l=t[e+2]^r[2],f=t[e+3]^r[3],d=4,p=1;p<h;p++){var _=i[c>>>24]^n[u>>>16&255]^s[l>>>8&255]^a[255&f]^r[d++],g=i[u>>>24]^n[l>>>16&255]^s[f>>>8&255]^a[255&c]^r[d++],b=i[l>>>24]^n[f>>>16&255]^s[c>>>8&255]^a[255&u]^r[d++],m=i[f>>>24]^n[c>>>16&255]^s[u>>>8&255]^a[255&l]^r[d++];c=_,u=g,l=b,f=m}_=(o[c>>>24]<<24|o[u>>>16&255]<<16|o[l>>>8&255]<<8|o[255&f])^r[d++],g=(o[u>>>24]<<24|o[l>>>16&255]<<16|o[f>>>8&255]<<8|o[255&c])^r[d++],b=(o[l>>>24]<<24|o[f>>>16&255]<<16|o[c>>>8&255]<<8|o[255&u])^r[d++],m=(o[f>>>24]<<24|o[c>>>16&255]<<16|o[u>>>8&255]<<8|o[255&l])^r[d++],t[e]=_,t[e+1]=g,t[e+2]=b,t[e+3]=m},keySize:8});e.AES=r._createHelper(_)}(),t.AES}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())}(aes$1,aes$1.exports)),aes$1.exports}var tripledes$1={exports:{}},tripledes=tripledes$1.exports,hasRequiredTripledes;function requireTripledes(){return hasRequiredTripledes||(hasRequiredTripledes=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib,i=r.WordArray,n=r.BlockCipher,s=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],h=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=s.DES=n.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var i=a[r]-1;e[r]=t[i>>>5]>>>31-i%32&1}for(var n=this._subKeys=[],s=0;s<16;s++){var c=n[s]=[],u=h[s];for(r=0;r<24;r++)c[r/6|0]|=e[(o[r]-1+u)%28]<<31-r%6,c[4+(r/6|0)]|=e[28+(o[r+24]-1+u)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var l=this._invSubKeys=[];for(r=0;r<16;r++)l[r]=n[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,r){this._lBlock=t[e],this._rBlock=t[e+1],f.call(this,4,252645135),f.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),f.call(this,1,1431655765);for(var i=0;i<16;i++){for(var n=r[i],s=this._lBlock,a=this._rBlock,o=0,h=0;h<8;h++)o|=c[h][((a^n[h])&u[h])>>>0];this._lBlock=a,this._rBlock=s^o}var l=this._lBlock;this._lBlock=this._rBlock,this._rBlock=l,f.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<<t}function d(t,e){var r=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<<t}e.DES=n._createHelper(l);var p=s.TripleDES=n.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),n=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=l.createEncryptor(i.create(e)),this._des2=l.createEncryptor(i.create(r)),this._des3=l.createEncryptor(i.create(n))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=n._createHelper(p)}(),t.TripleDES}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())}(tripledes$1,tripledes$1.exports)),tripledes$1.exports}var rc4$1={exports:{}},rc4=rc4$1.exports,hasRequiredRc4;function requireRc4(){return hasRequiredRc4||(hasRequiredRc4=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.StreamCipher,i=e.algo,n=i.RC4=r.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;n=0;for(var s=0;n<256;n++){var a=n%r,o=e[a>>>2]>>>24-a%4*8&255;s=(s+i[n]+o)%256;var h=i[n];i[n]=i[s],i[s]=h}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=s.call(this)},keySize:8,ivSize:0});function s(){for(var t=this._S,e=this._i,r=this._j,i=0,n=0;n<4;n++){r=(r+t[e=(e+1)%256])%256;var s=t[e];t[e]=t[r],t[r]=s,i|=t[(t[e]+t[r])%256]<<24-8*n}return this._i=e,this._j=r,i}e.RC4=r._createHelper(n);var a=i.RC4Drop=n.extend({cfg:n.cfg.extend({drop:192}),_doReset:function(){n._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)s.call(this)}});e.RC4Drop=r._createHelper(a)}(),t.RC4}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())}(rc4$1,rc4$1.exports)),rc4$1.exports}var rabbit$1={exports:{}},rabbit=rabbit$1.exports,hasRequiredRabbit;function requireRabbit(){return hasRequiredRabbit||(hasRequiredRabbit=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.StreamCipher,i=e.algo,n=[],s=[],a=[],o=i.Rabbit=r.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,r=0;r<4;r++)t[r]=16711935&(t[r]<<8|t[r]>>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,r=0;r<4;r++)h.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var s=e.words,a=s[0],o=s[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),l=c>>>16|4294901760&u,f=u<<16|65535&c;for(n[0]^=c,n[1]^=l,n[2]^=u,n[3]^=f,n[4]^=c,n[5]^=l,n[6]^=u,n[7]^=f,r=0;r<4;r++)h.call(this)}},_doProcessBlock:function(t,e){var r=this._X;h.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),t[e+i]^=n[i]},blockSize:4,ivSize:2});function h(){for(var t=this._X,e=this._C,r=0;r<8;r++)s[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<s[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<s[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<s[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<s[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<s[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<s[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<s[6]>>>0?1:0)|0,this._b=e[7]>>>0<s[7]>>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,h=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);a[r]=h^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=r._createHelper(o)}(),t.Rabbit}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())}(rabbit$1,rabbit$1.exports)),rabbit$1.exports}var rabbitLegacy$1={exports:{}},rabbitLegacy=rabbitLegacy$1.exports,hasRequiredRabbitLegacy;function requireRabbitLegacy(){return hasRequiredRabbitLegacy||(hasRequiredRabbitLegacy=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.StreamCipher,i=e.algo,n=[],s=[],a=[],o=i.RabbitLegacy=r.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var n=0;n<4;n++)h.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var s=e.words,a=s[0],o=s[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),l=c>>>16|4294901760&u,f=u<<16|65535&c;for(i[0]^=c,i[1]^=l,i[2]^=u,i[3]^=f,i[4]^=c,i[5]^=l,i[6]^=u,i[7]^=f,n=0;n<4;n++)h.call(this)}},_doProcessBlock:function(t,e){var r=this._X;h.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),t[e+i]^=n[i]},blockSize:4,ivSize:2});function h(){for(var t=this._X,e=this._C,r=0;r<8;r++)s[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<s[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<s[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<s[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<s[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<s[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<s[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<s[6]>>>0?1:0)|0,this._b=e[7]>>>0<s[7]>>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,h=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);a[r]=h^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=r._createHelper(o)}(),t.RabbitLegacy}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())}(rabbitLegacy$1,rabbitLegacy$1.exports)),rabbitLegacy$1.exports}var blowfish$1={exports:{}},blowfish=blowfish$1.exports,hasRequiredBlowfish;function requireBlowfish(){return hasRequiredBlowfish||(hasRequiredBlowfish=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,i=e.algo;const n=16,s=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var o={pbox:[],sbox:[]};function h(t,e){let r=e>>24&255,i=e>>16&255,n=e>>8&255,s=255&e,a=t.sbox[0][r]+t.sbox[1][i];return a^=t.sbox[2][n],a+=t.sbox[3][s],a}function c(t,e,r){let i,s=e,a=r;for(let e=0;e<n;++e)s^=t.pbox[e],a=h(t,s)^a,i=s,s=a,a=i;return i=s,s=a,a=i,a^=t.pbox[n],s^=t.pbox[n+1],{left:s,right:a}}function u(t,e,r){let i,s=e,a=r;for(let e=n+1;e>1;--e)s^=t.pbox[e],a=h(t,s)^a,i=s,s=a,a=i;return i=s,s=a,a=i,a^=t.pbox[1],s^=t.pbox[0],{left:s,right:a}}function l(t,e,r){for(let e=0;e<4;e++){t.sbox[e]=[];for(let r=0;r<256;r++)t.sbox[e][r]=a[e][r]}let i=0;for(let a=0;a<n+2;a++)t.pbox[a]=s[a]^e[i],i++,i>=r&&(i=0);let o=0,h=0,u=0;for(let e=0;e<n+2;e+=2)u=c(t,o,h),o=u.left,h=u.right,t.pbox[e]=o,t.pbox[e+1]=h;for(let e=0;e<4;e++)for(let r=0;r<256;r+=2)u=c(t,o,h),o=u.left,h=u.right,t.sbox[e][r]=o,t.sbox[e][r+1]=h;return!0}var f=i.Blowfish=r.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4;l(o,e,r)}},encryptBlock:function(t,e){var r=c(o,t[e],t[e+1]);t[e]=r.left,t[e+1]=r.right},decryptBlock:function(t,e){var r=u(o,t[e],t[e+1]);t[e]=r.left,t[e+1]=r.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=r._createHelper(f)}(),t.Blowfish}(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())}(blowfish$1,blowfish$1.exports)),blowfish$1.exports}var cryptoJs=cryptoJs$1.exports,hasRequiredCryptoJs;function requireCryptoJs(){return hasRequiredCryptoJs||(hasRequiredCryptoJs=1,function(t){t.exports=function(t){return t}(requireCore(),requireX64Core(),requireLibTypedarrays(),requireEncUtf16(),requireEncBase64(),requireEncBase64url(),requireMd5(),requireSha1(),requireSha256(),requireSha224(),requireSha512(),requireSha384(),requireSha3(),requireRipemd160(),requireHmac(),requirePbkdf2(),requireEvpkdf(),requireCipherCore(),requireModeCfb(),requireModeCtr(),requireModeCtrGladman(),requireModeOfb(),requireModeEcb(),requirePadAnsix923(),requirePadIso10126(),requirePadIso97971(),requirePadZeropadding(),requirePadNopadding(),requireFormatHex(),requireAes(),requireTripledes(),requireRc4(),requireRabbit(),requireRabbitLegacy(),requireBlowfish())}(cryptoJs$1,cryptoJs$1.exports)),cryptoJs$1.exports}var cryptoJsExports=requireCryptoJs(),CryptoJS$1=getDefaultExportFromCjs(cryptoJsExports),MASTER_INSTANCE_NAME="funsdata",DEFAULT_CONFIG={_name:MASTER_INSTANCE_NAME,appId:"",persistence:"localStorage",persistencePrefix:"FunsDataJSSDK",persistenceEnabled:!0,crossSubDomain:!0,maxReferrerStringLength:200,showLog:!0,dataSendTimeout:3e3,useAppTrack:!1,strict:!1,tryCount:3,enableCalibrationTime:!1},FunsDataPersistence=function(t){this._state={},this.crossSubDomain=t.crossSubDomain,this.enabled=t.persistenceEnabled;var e=null;if(this.enabled){if(!1===t.crossSubDomain){var r=_.url("sub",location.href);this.name="string"==typeof r&&""!==r?t.persistencePrefix+"_"+r:t.persistencePrefix+"_root"}else this.name=t.persistencePrefix+"_cross";var i=t.persistence;"cookie"!==i&&"localStorage"!==i&&(Log.i("Unknown persistence type "+i+"; falling back to cookie"),i=t.persistence="cookie"),"localStorage"===i&&_.localStorage.isSupported()?(this.storage=_.localStorage,(e=_.cookie.get(this.name))&&_.cookie.remove(this.name,this.crossSubDomain)):(Log.i("localStorage is not support by the browser; falling back to cookie"),this.storage=_.cookie)}if(this._load(e),!this.getDistinctId()){var n=t.uuid?t.uuid:_.UUID();this._setDeviceId(n),this.setDistinctId(n)}};FunsDataPersistence.prototype._load=function(t){var e;this.enabled&&(null!==(e=null!==t?t:this.storage.get(this.name))&&_.check.isJSONString(e)&&(this._state=_.extend({},JSON.parse(e))),null!==t&&this._save())},FunsDataPersistence.prototype.getDistinctId=function(){return this._state.distinct_id},FunsDataPersistence.prototype.setDistinctId=function(t){this._set("distinct_id",t)},FunsDataPersistence.prototype.setEnableTracking=function(t){this._set("enable_tracking",t)},FunsDataPersistence.prototype.getEnableTracking=function(){return!!_.check.isUndefined(this._state.enable_tracking)||this._state.enable_tracking},FunsDataPersistence.prototype.clear=function(){this._state={},this._save()},FunsDataPersistence.prototype.setOptTracking=function(t){this._set("opt_tracking",t)},FunsDataPersistence.prototype.getOptTracking=function(){return!!_.check.isUndefined(this._state.opt_tracking)||this._state.opt_tracking},FunsDataPersistence.prototype.setDistinctId=function(t){this._set("distinct_id",t)},FunsDataPersistence.prototype.getAccountId=function(){return this._state.account_id},FunsDataPersistence.prototype.setAccountId=function(t){this._set("account_id",t)},FunsDataPersistence.prototype.getDeviceId=function(){return this._state.device_id},FunsDataPersistence.prototype.setSuperProperties=function(t){this._set("super_properties",t)},FunsDataPersistence.prototype.getSuperProperties=function(){return this._state.super_properties||{}},FunsDataPersistence.prototype.setEventTimer=function(t,e){var r=this._state.event_timers||{};r[t]=e,this._set("event_timers",r)},FunsDataPersistence.prototype.clearEventTimer=function(){this._set("event_timers",{})},FunsDataPersistence.prototype.removeEventTimer=function(t){var e=(this._state.event_timers||{})[t];return _.check.isUndefined(e)||(delete this._state.event_timers[t],this._save()),e},FunsDataPersistence.prototype._setDeviceId=function(t){this._state.device_id?Log.w("Current device_id is ",this.getDeviceId(),", it couldn't been set to: ",t):this._set("device_id",t)},FunsDataPersistence.prototype._save=function(){this.enabled&&this.storage.set(this.name,JSON.stringify(this._state),73e3,this.crossSubDomain)},FunsDataPersistence.prototype._set=function(t,e){this._state=this._state||{},this._state[t]=e,this._save()};var FunsDataAnalyticsLib=function(){};FunsDataAnalyticsLib.prototype.trackLink=function(t,e,r){if(!this._isCollectData())return;let i=this._getConfig("strict");if(PropertyChecker.properties(r)||!i){if(t&&_.check.isObject(t)){let n=[];_.each(t,(t,e)=>{t&&_.check.isArray(t)&&_.each(t,t=>{switch(e){case"tag":_.each(document.getElementsByTagName(t),t=>{n.indexOf(t)<0&&n.push(t)});break;case"class":_.each(document.getElementsByClassName(t),t=>{n.indexOf(t)<0&&n.push(t)});break;case"id":var r=document.getElementById(t);null!==r&&n.indexOf(r)<0&&n.push(r)}})}),_.each(n,t=>{if(null!==t){var n=_.extend({},_.info.pageProperties(),r);n["#element_type"]=t.nodeName.toLowerCase(),_.check.isUndefined(n.name)&&(n.name=t.getAttribute("td-name")||t.innerHTML||t.value||"Unable to get Identify"),t.addEventListener("click",()=>{this._sendRequest({type:"track",event:e,properties:i?PropertyChecker.stripProperties(n):n})})}})}}else Log.w("trackLink failed due to invalid properties.")},FunsDataAnalyticsLib.prototype.setPageProperty=function(t){this._isCollectData()&&(PropertyChecker.properties(t)||!this._getConfig("strict")?_.extend(this.currentProps,t):Log.w("Page property setting error"))},FunsDataAnalyticsLib.prototype.getPageProperty=function(){return this.currentProps},FunsDataAnalyticsLib.prototype.getPresetProperties=function(){var t=_.info.properties(),e={};e.os=t["#os"],e.screenWidth=t["#screen_width"],e.screenHeight=t["#screen_height"],e.browser=t["#browser"],e.browserVersion=t["#browser_version"],e.deviceId=this.getDeviceId();let r=0-(new Date).getTimezoneOffset()/60;return this._getConfig("zoneOffset")&&(r=this._getConfig("zoneOffset")),e.zoneOffset=r,e.toEventPresetProperties=function(){return{"#os":e.os,"#screen_width":e.screenWidth,"#screen_height":e.screenHeight,"#browser":e.browser,"#browser_version":e.browserVersion,"#device_id":e.deviceId,"#zone_offset":e.zoneOffset}},e},FunsDataAnalyticsLib.prototype.login=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),PropertyChecker.userId(t)||!this._getConfig("strict")?t!==this.persistence.getAccountId()&&this.persistence.setAccountId(t):Log.e("The parameters of the login API must be strings"))},FunsDataAnalyticsLib.prototype.logout=function(t){if(this._isCollectData()){if(!0===t){var e=_.UUID();this.persistence.setDistinctId(e)}this.persistence.setAccountId("")}},FunsDataAnalyticsLib.prototype.userSet=function(t,e){this._isCollectData()&&(!PropertyChecker.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_set",properties:t},e))},FunsDataAnalyticsLib.prototype.userSetOnce=function(t,e){this._isCollectData()&&(!PropertyChecker.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_setOnce",properties:t},e))},FunsDataAnalyticsLib.prototype.userUnset=function(t,e){if(this._isCollectData()&&(PropertyChecker.propertyName(t)||!this._getConfig("strict"))){var r={};r[t]=0,this._sendRequest({type:"user_unset",properties:r},e)}},FunsDataAnalyticsLib.prototype.userAdd=function(t,e){if(this._isCollectData()){if(_.check.isString(t)){var r=t;(t={})[r]=1}PropertyChecker.propertiesMust(t)&&(!function(t){for(var e in t)if(!/-*\d+/.test(String(t[e])))return!1;return!0}(t)&&this._getConfig("strict")?Log.w("The property value of useradd api must be a number"):this._sendRequest({type:"user_add",properties:t},e))}},FunsDataAnalyticsLib.prototype.userAppend=function(t,e){this._isCollectData()&&(PropertyChecker.propertiesMust(t)&&function(t){for(var e in t)if(!_.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_append",properties:t},e):Log.w("The value in the userAppend property can only be Array"))},FunsDataAnalyticsLib.prototype.userUniqAppend=function(t,e){this._isCollectData()&&(PropertyChecker.propertiesMust(t)&&function(t){for(var e in t)if(!_.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_uniq_append",properties:t},e):Log.w("The value in the userUniqAppend property can only be Array"))},FunsDataAnalyticsLib.prototype.flush=function(){this.batchConsumer&&!this._isDebug()&&this.batchConsumer.flush()},FunsDataAnalyticsLib.prototype.userDel=function(t){this._isCollectData()&&this._sendRequest({type:"user_del"},t)},FunsDataAnalyticsLib.prototype._sendRequest=function(t,e,r,i=!0){var n=_.check.isUndefined(t.time)||!_.check.isDate(t.time)?new Date:t.time,s={data:[{"#type":t.type,"#time":_.formatDate(_.formatTimeZone(n,this._getConfig("zoneOffset"))),"#distinct_id":this.persistence.getDistinctId()}]};this.persistence.getAccountId()&&(s.data[0]["#account_id"]=this.persistence.getAccountId());let a=0-n.getTimezoneOffset()/60;if(s.automaticData=_.extend({},{"#device_id":this.persistence.getDeviceId(),"#zone_offset":a},_.info.properties()),"track"===t.type||"track_update"===t.type||"track_overwrite"===t.type){s.data[0]["#event_name"]=t.event,"track_update"===t.type||"track_overwrite"===t.type?s.data[0]["#event_id"]=t.extraId:t.firstCheckId&&(s.data[0]["#first_check_id"]=t.firstCheckId),this._getConfig("zoneOffset")&&(a=this._getConfig("zoneOffset")),s.data[0].properties=_.extend({},{"#device_id":this.persistence.getDeviceId(),"#zone_offset":a},_.info.properties(),this.getSuperProperties(),this.dynamicProperties?this.dynamicProperties():{},this.getPageProperty());var o=this.persistence.removeEventTimer(t.event);if(!_.check.isUndefined(o)){var h=(new Date).getTime()-o,c=parseFloat((h/1e3).toFixed(3));c>86400&&(c=86400),s.data[0].properties["#duration"]=c}}else s.data[0].properties={};if(_.check.isObject(t.properties)&&!_.check.isEmptyObject(t.properties)&&_.extend(s.data[0].properties,t.properties),_.searchObjDate(s.data[0],this._getConfig("zoneOffset")),s.data[0]=_.generateEncryptyData(s.data[0],this._getConfig("secretKey")),s["#app_id"]=this._getConfig("appId"),s["#flush_time"]=_.formatTimeZone(new Date,this._getConfig("zoneOffset")).getTime(),Log.i(s),this._getConfig("useAppTrack")){var u=window.FunsData_APP_JS_Bridge||{};if("object"==typeof u&&u.funsdata_track)return u.funsdata_track(JSON.stringify(s)),void("function"==typeof e&&e());if(/td-sdk-ios/.test(navigator.userAgent)&&!window.MSStream){var l=document.createElement("iframe");return l.setAttribute("src","funsanalytics://trackEvent?event="+_.encodeURIComponent(JSON.stringify(s))),document.documentElement.appendChild(l),l.parentNode.removeChild(l),l=null,void("function"==typeof e&&e())}}s.data[0]["#uuid"]=_.UUIDv4();const f=JSON.stringify(s);let d=this;if(this._isEncrypt()&&d.crypto){let t=Math.round(1e16*Math.random())+"",e=[];s.data.forEach(r=>{e.push({ekey:d._encryptPass(t,d.crypto.pub_key),pkv:d.crypto.version,payload:d._encryptInfo(JSON.stringify(r),t)})}),s.data=e,s.client="js"}return new AjaxTask(JSON.stringify(s),this._getConfig("serverUrl"),this._getConfig("tryCount"),e,this._isDebug(),i).run(f)};var dataStoragePrefix="ta_",tabStoragePrefix="tab_";function BatchConsumer(t){this.config=t,this.timer=null,this.batchConfig=_.extend({size:5,interval:5e3,storageLimit:200},this.config.batch),this.batchConfig.size<1&&(this.batchConfig.size=1),this.batchConfig.size>30&&(this.batchConfig.size=30),this.prefix=this.config.persistencePrefix,this.tabKey=this.prefix+tabStoragePrefix+this.config.appId,this.storageLimit=this.batchConfig.storageLimit}BatchConsumer.prototype={batchInterval:function(){var t=this;t.timer=setTimeout(function(){t.recycle(),t.send(),clearTimeout(t.timer),t.batchInterval()},this.batchConfig.interval)},add:function(t){var e=t,r=this.prefix+dataStoragePrefix+this.config.appId+"_"+String(_.getRandom()),i=_.localStorage.get(this.tabKey);if((i=null===i?[]:_.safeJSONParse(i)||[]).length<=this.storageLimit)i.push(r),_.localStorage.set(this.tabKey,JSON.stringify(i)),_.saveObjectVal(r,e);else{var n=i.splice(0,20);i.push(r),_.localStorage.set(this.tabKey,JSON.stringify(i)),_.saveObjectVal(r,e);for(var s={},a=[],o=0;o<n.length;o++){var h=_.readObjectVal(n[o]);_.hasEncrypty(h)||(h=_.generateEncryptyData(h,this.config.secretKey)),a.push(h)}s.data=a,s["#app_id"]=this.config.appId,s["#flush_time"]=_.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(s,n)}},flush:function(){clearTimeout(this.timer),this.send(),this.batchInterval()},send:function(){var t=_.localStorage.get(this.tabKey);if(t&&(t=_.safeJSONParse(t)||[]).length){for(var e={},r=[],i=[],n=t.length<this.batchConfig.size?t.length:this.batchConfig.size,s=0;s<n;s++){var a=_.readObjectVal(t[s]);_.hasEncrypty(a)||(a=_.generateEncryptyData(a,this.config.secretKey)),r.push(a),i.push(t[s])}e.data=r,e["#app_id"]=this.config.appId,e["#flush_time"]=_.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(e,i)}},request:function(t,e){var r=this;Log.i("flush data"),Log.i(t);var i=JSON.stringify(t),n=_.base64Encode(i),s="crc="+_.hashCode(n);_.encodeURIComponent(n),_.encodeURIComponent(s),Config$1.LIB_VERSION,new AjaxTask(i,this.config.serverUrl,this.config.tryCount,function(){r.remove(e)},!1).run()},remove:function(t){var e=_.localStorage.get(this.tabKey);if(e){for(var r=_.safeJSONParse(e)||[],i=0;i<t.length;i++){var n=_.indexOf(r,t[i]);n>-1&&r.splice(n,1),_.localStorage.remove(t[i])}_.localStorage.set(this.tabKey,JSON.stringify(r))}},recycle:function(){var t=_.localStorage.get(this.tabKey);if(t&&0===(t=_.safeJSONParse(t)||[]).length){for(var e=0;e<localStorage.length;e++){var r=localStorage.key(e);0===r.indexOf(this.prefix+dataStoragePrefix+this.config.appId)&&t.push(r)}t.length>0&&_.localStorage.set(this.tabKey,JSON.stringify(t))}}};class AjaxTask{constructor(t,e,r,i,n,s=!0){this.data=t,this.serverUrl=e,this.tryCount=r||3,this.callback=i,this.isDebug=n,this.ifSend=s}run(t){var e=null;e=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var r=this;return e.open("post",this.serverUrl,!0),e.setRequestHeader("Content-type",r.isDebug?"application/json;charset=UTF-8":"application/gzip"),e.onreadystatechange=function(){if(4===e.readyState)if(e.status>=200&&e.status<300||304===e.status){if(r.callback&&r.callback(),r.isDebug){var t=JSON.parse(e.response);0!==t.errorLevel?Log.w(t):Log.i(t)}}else r.onFailed()},r.ifSend&&(r.isDebug?e.send(r.data):e.send(pako.gzip(r.data,{to:"string"}))),r.ifSend?new Promise((r,i)=>{e.onload=function(){4===e.readyState&&(200===e.status?r({res:e.responseText,req:t}):i(e))},e.onerror=function(){i(e)}}):t}onFailed(){--this.tryCount>0&&this.run()}}FunsDataAnalyticsLib.prototype._isDebug=function(){return"debug"===this._getConfig("mode")||"debug_only"===this._getConfig("mode")},FunsDataAnalyticsLib.prototype._isEncrypt=function(){return!0===this._getConfig("encrypt")},FunsDataAnalyticsLib.prototype._setEncrypt=function(){let t=this,e=new XMLHttpRequest;e.open("get","https://deapi.funsdata.com/v1/settings",!0),e.send(),e.onload=function(){4===e.readyState&&(200===e.status?t.crypto=JSON.parse(e.responseText).data.crypto:console.error("公钥拉取失败!"))}},FunsDataAnalyticsLib.prototype._encryptInfo=function(t,e){const r=CryptoJS$1.enc.Utf8.parse(e),i=CryptoJS$1.enc.Utf8.parse(t);return CryptoJS$1.AES.encrypt(i,r,{iv:r,mode:CryptoJS$1.mode.CBC,padding:CryptoJS$1.pad.Pkcs7}).toString()},FunsDataAnalyticsLib.prototype._encryptPass=function(t,e){let r=new JSEncrypt$1;return r.setPublicKey(e),r.encrypt(t)},FunsDataAnalyticsLib.prototype.startHeartbeat=function(t=5e3){const e=this;if(e.heartbeatInterval)console.warn("已设置心跳");else{let r={interval:t};e.heartbeatInterval=setInterval(()=>{if(e.heartbeatProps){const t={...r,...e.heartbeatProps};e.track("Heartbeat",t)}else e.track("Heartbeat",r)},t)}},FunsDataAnalyticsLib.prototype.clearHeartbeat=function(){const t=this;t.heartbeatInterval?(clearInterval(t.heartbeatInterval),t.removeHeartbeatProps(),t.heartbeatInterval=void 0):console.warn("未设置心跳")},FunsDataAnalyticsLib.prototype.setHeartbeatProps=function(t){if(!t)return;if("object"!=typeof t||Array.isArray(t))return void console.warn("心跳上报参数不符合规范");const e=this;e.heartbeatProps||(e.heartbeatProps={}),e.heartbeatProps={...e.heartbeatProps,...t}},FunsDataAnalyticsLib.prototype.removeHeartbeatProps=function(t){const e=this;t?"string"==typeof t?e.heartbeatProps[t]&&delete e.heartbeatProps[t]:Array.isArray(t)?t.forEach(t=>{e.heartbeatProps[t]&&delete e.heartbeatProps[t]}):console.warn("删除心跳参数不符合规范"):e.heartbeatProps={}},FunsDataAnalyticsLib.prototype._sendRequestWithImage=function(t,e){function r(t){t&&!t.hasCalled&&(t.hasCalled=!0,t.callback&&t.callback())}var i=(-1!==this._getConfig("serverUrl").indexOf("?")?this._getConfig("serverUrl"):this._getConfig("serverUrl")+"?")+t,n=document.createElement("img");n.callback=e,setTimeout(r,this._getConfig("dataSendTimeout"),n),n.onload=function(){this.onload=null,r(this)},n.onerror=function(){this.onerror=null,r(this)},n.onabort=function(){this.onabort=null,r(this)},n.src=i},FunsDataAnalyticsLib.prototype.track=function(t,e,r,i){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||PropertyChecker.event(t)&&PropertyChecker.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},i):void 0},FunsDataAnalyticsLib.prototype.getTrackData=function(t,e,r,i){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||PropertyChecker.event(t)&&PropertyChecker.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},i,void 0,!1):void 0},FunsDataAnalyticsLib.prototype.trackUpdate=function(t){this._isCollectData()&&(_.check.isObject(t)?(PropertyChecker.event(t.eventName)&&PropertyChecker.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track_update",event:t.eventName,time:t.eventTime,properties:t.properties,extraId:t.eventId},t.callback):Log.e("The parameter of updateble event does not meet the requirements"))},FunsDataAnalyticsLib.prototype.trackOverwrite=function(t){this._isCollectData()&&(_.check.isObject(t)?(PropertyChecker.event(t.eventName)&&PropertyChecker.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track_overwrite",event:t.eventName,time:t.eventTime,properties:t.properties,extraId:t.eventId},t.callback):Log.e("The parameter of overwritable event does not meet the requirements"))},FunsDataAnalyticsLib.prototype.trackFirstEvent=function(t){this._isCollectData()&&(_.check.isObject(t)?(PropertyChecker.event(t.eventName)&&PropertyChecker.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track",event:t.eventName,time:t.eventTime,properties:t.properties,firstCheckId:t.firstCheckId?t.firstCheckId:this.getDeviceId()},t.callback):Log.e("The parameter of first event does not meet the requirements"))},FunsDataAnalyticsLib.prototype.trackWithBeacon=function(t,e,r,i){"ta_page_hide"!==t?(PropertyChecker.event(t)&&PropertyChecker.properties(e)||!this._getConfig("strict"))&&this._sendRequest({type:"track",event:t,time:r,properties:e},i,!0):this._sendRequest({type:"track",event:t,time:r,properties:e},i,!0)},FunsDataAnalyticsLib.prototype.identify=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),PropertyChecker.userId(t)||!this._getConfig("strict")?t!==this.persistence.getDistinctId()&&this.persistence.setDistinctId(t):Log.e("The parameter of identify API requires a string"))},FunsDataAnalyticsLib.prototype.getDistinctId=function(){return this.persistence.getDistinctId()},FunsDataAnalyticsLib.prototype.getDeviceId=function(){return this.persistence.getDeviceId()},FunsDataAnalyticsLib.prototype._isCollectData=function(){return this.persistence.getOptTracking()&&this.persistence.getEnableTracking()},FunsDataAnalyticsLib.prototype.setSuperProperties=function(t){this._isCollectData()&&(PropertyChecker.propertiesMust(t)||!this._getConfig("strict")?this.persistence.setSuperProperties(_.extend({},this.getSuperProperties(),t)):Log.w("The paramater of setSuperProperties API requires object"))},FunsDataAnalyticsLib.prototype.getSuperProperties=function(){return this.persistence.getSuperProperties()},FunsDataAnalyticsLib.prototype.clearSuperProperties=function(){this._isCollectData()&&this.persistence.setSuperProperties({})},FunsDataAnalyticsLib.prototype.unsetSuperProperty=function(t){if(this._isCollectData()&&_.check.isString(t)){var e=this.getSuperProperties();delete e[t],this.persistence.setSuperProperties(e)}},FunsDataAnalyticsLib.prototype.setDynamicSuperProperties=function(t){this._isCollectData()&&("function"==typeof t?PropertyChecker.properties(t())||!this._getConfig("strict")?this.dynamicProperties=t:Log.w("The return value of dynamic properties requires an object"):Log.w("The paramater of setDynamicSuperProperties API requires function type"))},FunsDataAnalyticsLib.prototype.timeEvent=function(t){this._isCollectData()&&(_.check.isUndefined(t)?Log.w("No event name provided to timeEvent"):this.persistence.setEventTimer(t,(new Date).getTime()))},FunsDataAnalyticsLib.prototype.quick=function(t,e){if(this._isCollectData())if("string"==typeof t&&"autoTrack"===t){var r={};PropertyChecker.properties(e)&&_.extend(r,e),this._sendRequest({type:"track",event:"ta_pageview",properties:_.extend(r,_.info.pageProperties())})}else"string"==typeof t&&"siteLinker"===t?siteLinker.init(this,e):Log.w("The quick method does not support the parameter of"+t)},FunsDataAnalyticsLib.prototype._setConfig=function(t){_.check.isObject(t)&&(_.extend(this.config,t),this._getConfig("persistencePrefix")||(this.config.persistencePrefix=this.config.cookiePrefix),this.persistence)},FunsDataAnalyticsLib.prototype._getConfig=function(t){return this.config[t]},FunsDataAnalyticsLib.prototype.init=function(t){if(_.check.isUndefined(this.config)){this.version=Config$1.LIB_VERSION,this.config={},this.currentProps=this.currentProps||{},this._setConfig(_.extend({},DEFAULT_CONFIG,t)),this.persistence=new FunsDataPersistence(this.config);var e=this._getConfig("appId");_.check.isUndefined(e)||this._setConfig({appId:e.replace(/\s*/g,"")}),Log.showLog=this._getConfig("showLog"),this._isDebug()?this._setConfig({serverUrl:t.serverUrl+"/json"}):this._setConfig({serverUrl:t.serverUrl}),this._isEncrypt()&&this._setEncrypt(),void 0!==this._getConfig("batch")&&!1!==this._getConfig("batch")&&_.localStorage.isSupported()&&(this.batchConsumer=new BatchConsumer(this.config),this.batchConsumer.batchInterval()),new PageLifeCycle(this,this._getConfig("autoTrack")).start();var r="normal";this.config.mode&&(r=this.config.mode),Log.i("DataEye Analytics SDK initialized successfully with mode: "+r+", APP ID : "+this.config.appId+", server url: "+this.config.serverUrl+", libversion: "+Config$1.LIB_VERSION)}else Log.i("The FunsData libraray has been initialized.")};class PageLifeCycle{constructor(t,e){this.taLib=t,"Object"===_.paramType(e)&&"Boolean"===_.paramType(e.pageShow)?this.autoPageShow=e.pageShow:this.autoPageShow=!1,"Object"===_.paramType(e)&&"Boolean"===_.paramType(e.pageHide)?this.autoPageHide=e.pageHide:this.autoPageHide=!1}start(){var t=this;t.trackPageShowEvent(),"onvisibilitychange"in document&&_.addEvent(document,"visibilitychange",function(){document.hidden?t.trackPageHideEvent():t.trackPageShowEvent()})}trackPageShowEvent(){this.autoPageShow&&this.taLib.track("ta_page_show",_.info.pageProperties()),this.taLib.timeEvent("ta_page_hide")}trackPageHideEvent(){this.autoPageHide&&this.taLib.trackWithBeacon("ta_page_hide",_.info.pageProperties())}trackPageHideEventOnClose(){this.autoPageHide&&this.isPageShow&&this.taLib.trackWithBeacon("ta_page_hide",_.info.pageProperties())}}FunsDataAnalyticsLib.prototype.initInstance=function(t,e){if(!_.check.isString(t)||!_.check.isUndefined(e)&&!_.check.isObject(e))return Log.w("invalid parameter of initInstance(string, object)."),null;if(this._getConfig("_name")!==MASTER_INSTANCE_NAME)return Log.w("This function is allowed for master instance only"),null;if(t===MASTER_INSTANCE_NAME||this[t])return Log.w("The name ",t," couldn't be used for create new instance."),null;_.check.isUndefined(e)&&(e={});var r=new FunsDataAnalyticsLib,i=_.extend({},this.config,{_name:t,persistenceEnabled:!1,uuid:this.getDeviceId()},e);i.persistenceEnabled&&(i.persistencePrefix=i.persistencePrefix+"_"+t),r.init(i),this[t]=r},FunsDataAnalyticsLib.prototype.enableTracking=function(t){"boolean"==typeof t&&this.persistence.setEnableTracking(t)},FunsDataAnalyticsLib.prototype.optOutTracking=function(){this.persistence.setSuperProperties({}),this.persistence.setAccountId(""),this.persistence.clearEventTimer(),this.persistence.setOptTracking(!1)},FunsDataAnalyticsLib.prototype.optInTracking=function(){this.persistence.setOptTracking(!0)},FunsDataAnalyticsLib.prototype.setTrackStatus=function(t){if(_.check.isObject(t)){var e=t.status;Log.i("swtich track status : "+e),"pause"===e?this.enableTracking(!1):"stop"===e?this.optOutTracking():"normal"===e&&(this.enableTracking(!0),this.optInTracking())}};var siteLinker={},tdMaster;function initAsModule(){return tdMaster=new FunsDataAnalyticsLib}siteLinker.getPartUrl=function(t){var e=this.option.length;if(e)for(var r=0;r<e;r++)if(t.indexOf(this.option[r].part_url)>-1)return!0;return!1},siteLinker.getPartHash=function(t){var e=this.option.length;if(e)for(var r=0;r<e;r++)if(t.indexOf(this.option[r].part_url)>-1)return this.option[r].after_hash;return!1},siteLinker.getCurrenId=function(){var t=this.ta.getDistinctId();return encodeURIComponent("d"+t)},siteLinker.rewriteUrl=function(t,e){var r=/([^?#]+)(\?[^#]*)?(#.*)?/.exec(t),i="";if(r){var n,s=r[1]||"",a=r[2]||"",o=r[3]||"";if(this.getPartHash(t))n=o.indexOf("_tasdk"),i=o.indexOf("?")>-1?n>-1?s+a+"#"+o.substring(1,n)+"_tasdk="+this.getCurrenId():s+a+"#"+o.substring(1)+"&_tasdk="+this.getCurrenId():s+a+"#"+o.substring(1)+"?_tasdk="+this.getCurrenId();else n=a.indexOf("_tasdk"),i=/^\?(\w)+/.test(a)?n>-1?s+"?"+a.substring(1,n)+"_tasdk="+this.getCurrenId()+o:s+"?"+a.substring(1)+"&_tasdk="+this.getCurrenId()+o:s+"?"+a.substring(1)+"_tasdk="+this.getCurrenId()+o;return e&&(e.href=i),i}},siteLinker.addClickListen=function(){var t=this,e=function(e){var r,i,n=e.target,s=n.tagName.toLowerCase(),a=n.parentNode;if("a"===s&&n.href||a&&a.tagName&&"a"===a.tagName.toLowerCase()&&a.href){"a"===s&&n.href?(r=n.href,i=n):(r=a.href,i=a);var o=_.URL(r).protocol;"http:"!==o&&"https:"!==o||t.getPartUrl(r)&&t.rewriteUrl(r,i)}};_.addSiteEvent(document,"mousedown",e),window.PointerEvent&&"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>=0&&_.addSiteEvent(document,"pointerdown",e)},siteLinker.getUrlId=function(){var t=location.href.match(/_tasdk=([aufd][^\?\#\&\=]+)/);return _.check.isArray(t)&&t[1]?decodeURIComponent(t[1]):""},siteLinker.setRefferId=function(){var t=this.ta.getDistinctId(),e=this.getUrlId();if(""===e)return!1;var r="d"===e.substring(0,1);if((e=e.substring(1))===t)return!1;e&&r&&this.ta.identify(e)},siteLinker.init=function(t,e){this.isInited||(this.isInited=!0,this.ta=t,this.setRefferId(),_.check.isObject(e)&&_.check.isArray(e.linker)&&e.linker.length>0&&(this.addClickListen(),this.option=e.linker,this.option=function(t){for(var e=t.length,r=[],i=0;i<e;i++)/[A-Za-z0-9]+\./.test(t[i].part_url)&&"[object Boolean]"===Object.prototype.toString.call(t[i].after_hash)?r.push(t[i]):Log.w("The configuration of linker "+(i+1)+" is not supported.Please check format");return r}(this.option)))};var td=initAsModule();return td});
|
|
3
|
+
* @fileOverview
|
|
4
|
+
* @name asn1-1.0.js
|
|
5
|
+
* @author Kenji Urushima kenji.urushima@gmail.com
|
|
6
|
+
* @version asn1 1.0.13 (2017-Jun-02)
|
|
7
|
+
* @since jsrsasign 2.1
|
|
8
|
+
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
|
|
9
|
+
*/var ce={};void 0!==ce.asn1&&ce.asn1||(ce.asn1={}),ce.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substring(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var r=e.substring(1).length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var i="",n=0;n<r;n++)i+="f";e=new wt(i,16).xor(t).add(wt.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=ce.asn1,r=e.DERBoolean,i=e.DERInteger,n=e.DERBitString,s=e.DEROctetString,o=e.DERNull,a=e.DERObjectIdentifier,h=e.DEREnumerated,c=e.DERUTF8String,u=e.DERNumericString,l=e.DERPrintableString,f=e.DERTeletexString,p=e.DERIA5String,d=e.DERUTCTime,g=e.DERGeneralizedTime,m=e.DERSequence,v=e.DERSet,_=e.DERTaggedObject,y=e.ASN1Util.newObject,b=Object.keys(t);if(1!=b.length)throw"key of param shall be only one.";var w=b[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":"))throw"undefined key: "+w;if("bool"==w)return new r(t[w]);if("int"==w)return new i(t[w]);if("bitstr"==w)return new n(t[w]);if("octstr"==w)return new s(t[w]);if("null"==w)return new o(t[w]);if("oid"==w)return new a(t[w]);if("enum"==w)return new h(t[w]);if("utf8str"==w)return new c(t[w]);if("numstr"==w)return new u(t[w]);if("prnstr"==w)return new l(t[w]);if("telstr"==w)return new f(t[w]);if("ia5str"==w)return new p(t[w]);if("utctime"==w)return new d(t[w]);if("gentime"==w)return new g(t[w]);if("seq"==w){for(var S=t[w],x=[],T=0;T<S.length;T++){var k=y(S[T]);x.push(k)}return new m({array:x})}if("set"==w){for(S=t[w],x=[],T=0;T<S.length;T++){k=y(S[T]);x.push(k)}return new v({array:x})}if("tag"==w){var E=t[w];if("[object Array]"===Object.prototype.toString.call(E)&&3==E.length){var D=y(E[2]);return new _({tag:E[0],explicit:E[1],obj:D})}var O={};if(void 0!==E.explicit&&(O.explicit=E.explicit),void 0!==E.tag&&(O.tag=E.tag),void 0===E.obj)throw"obj shall be specified for 'tag'.";return O.obj=y(E.obj),new _(O)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},ce.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",r=parseInt(t.substring(0,2),16),i=(e=Math.floor(r/40)+"."+r%40,""),n=2;n<t.length;n+=2){var s=("00000000"+parseInt(t.substring(n,n+2),16).toString(2)).slice(-8);if(i+=s.substring(1,8),"0"==s.substring(0,1))e=e+"."+new wt(i,2).toString(10),i=""}return e},ce.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",i=new wt(t,10).toString(2),n=7-i.length%7;7==n&&(n=0);for(var s="",o=0;o<n;o++)s+="0";i=s+i;for(o=0;o<i.length-1;o+=7){var a=i.substring(o,o+7);o!=i.length-7&&(a="1"+a),r+=e(parseInt(a,2))}return r};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",n=t.split("."),s=40*parseInt(n[0])+parseInt(n[1]);i+=e(s),n.splice(0,2);for(var o=0;o<n.length;o++)i+=r(n[o]);return i},ce.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var r=e.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+r).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},ce.asn1.DERAbstractString=function(t){ce.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},he(ce.asn1.DERAbstractString,ce.asn1.ASN1Object),ce.asn1.DERAbstractTime=function(t){ce.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,r){var i=this.zeroPadding,n=this.localDateToUTC(t),s=String(n.getFullYear());"utc"==e&&(s=s.substring(2,4));var o=s+i(String(n.getMonth()+1),2)+i(String(n.getDate()),2)+i(String(n.getHours()),2)+i(String(n.getMinutes()),2)+i(String(n.getSeconds()),2);if(!0===r){var a=n.getMilliseconds();if(0!=a){var h=i(String(a),3);o=o+"."+(h=h.replace(/[0]+$/,""))}}return o+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,r,i,n,s){var o=new Date(Date.UTC(t,e-1,r,i,n,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},he(ce.asn1.DERAbstractTime,ce.asn1.ASN1Object),ce.asn1.DERAbstractStructured=function(t){ce.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},he(ce.asn1.DERAbstractStructured,ce.asn1.ASN1Object),ce.asn1.DERBoolean=function(){ce.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},he(ce.asn1.DERBoolean,ce.asn1.ASN1Object),ce.asn1.DERInteger=function(t){ce.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=ce.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new wt(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},he(ce.asn1.DERInteger,ce.asn1.ASN1Object),ce.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=ce.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}ce.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var r="0"+t;this.hTLV=null,this.isModified=!0,this.hV=r+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var r=0;r<=e;r++)t+="0";var i="";for(r=0;r<t.length-1;r+=8){var n=t.substring(r,r+8),s=parseInt(n,2).toString(16);1==s.length&&(s="0"+s),i+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+e+i},this.setByBooleanArray=function(t){for(var e="",r=0;r<t.length;r++)1==t[r]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},he(ce.asn1.DERBitString,ce.asn1.ASN1Object),ce.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=ce.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}ce.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},he(ce.asn1.DEROctetString,ce.asn1.DERAbstractString),ce.asn1.DERNull=function(){ce.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},he(ce.asn1.DERNull,ce.asn1.ASN1Object),ce.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",i=new wt(t,10).toString(2),n=7-i.length%7;7==n&&(n=0);for(var s="",o=0;o<n;o++)s+="0";i=s+i;for(o=0;o<i.length-1;o+=7){var a=i.substring(o,o+7);o!=i.length-7&&(a="1"+a),r+=e(parseInt(a,2))}return r};ce.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var i="",n=t.split("."),s=40*parseInt(n[0])+parseInt(n[1]);i+=e(s),n.splice(0,2);for(var o=0;o<n.length;o++)i+=r(n[o]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(t){var e=ce.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},he(ce.asn1.DERObjectIdentifier,ce.asn1.ASN1Object),ce.asn1.DEREnumerated=function(t){ce.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=ce.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new wt(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},he(ce.asn1.DEREnumerated,ce.asn1.ASN1Object),ce.asn1.DERUTF8String=function(t){ce.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},he(ce.asn1.DERUTF8String,ce.asn1.DERAbstractString),ce.asn1.DERNumericString=function(t){ce.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},he(ce.asn1.DERNumericString,ce.asn1.DERAbstractString),ce.asn1.DERPrintableString=function(t){ce.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},he(ce.asn1.DERPrintableString,ce.asn1.DERAbstractString),ce.asn1.DERTeletexString=function(t){ce.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},he(ce.asn1.DERTeletexString,ce.asn1.DERAbstractString),ce.asn1.DERIA5String=function(t){ce.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},he(ce.asn1.DERIA5String,ce.asn1.DERAbstractString),ce.asn1.DERUTCTime=function(t){ce.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},he(ce.asn1.DERUTCTime,ce.asn1.DERAbstractTime),ce.asn1.DERGeneralizedTime=function(t){ce.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},he(ce.asn1.DERGeneralizedTime,ce.asn1.DERAbstractTime),ce.asn1.DERSequence=function(t){ce.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},he(ce.asn1.DERSequence,ce.asn1.DERAbstractStructured),ce.asn1.DERSet=function(t){ce.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var r=this.asn1Array[e];t.push(r.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},he(ce.asn1.DERSet,ce.asn1.DERAbstractStructured),ce.asn1.DERTaggedObject=function(t){ce.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,r){this.hT=e,this.isExplicit=t,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},he(ce.asn1.DERTaggedObject,ce.asn1.ASN1Object);var ue,le,fe=(ue=function(t,e){return ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},ue(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}ue(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),pe=function(t){function e(r){var i=t.call(this)||this;return r&&("string"==typeof r?i.parseKey(r):(e.hasPrivateKeyProperty(r)||e.hasPublicKeyProperty(r))&&i.parsePropertiesFrom(r)),i}return fe(e,t),e.prototype.parseKey=function(t){try{var e=0,r=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?ht(t):ct.unarmor(t),n=vt.decode(i);if(3===n.sub.length&&(n=n.sub[2].sub[0]),9===n.sub.length){e=n.sub[1].getHexStringValue(),this.n=Dt(e,16),r=n.sub[2].getHexStringValue(),this.e=parseInt(r,16);var s=n.sub[3].getHexStringValue();this.d=Dt(s,16);var o=n.sub[4].getHexStringValue();this.p=Dt(o,16);var a=n.sub[5].getHexStringValue();this.q=Dt(a,16);var h=n.sub[6].getHexStringValue();this.dmp1=Dt(h,16);var c=n.sub[7].getHexStringValue();this.dmq1=Dt(c,16);var u=n.sub[8].getHexStringValue();this.coeff=Dt(u,16)}else{if(2!==n.sub.length)return!1;if(n.sub[0].sub){var l=n.sub[1].sub[0];e=l.sub[0].getHexStringValue(),this.n=Dt(e,16),r=l.sub[1].getHexStringValue(),this.e=parseInt(r,16)}else e=n.sub[0].getHexStringValue(),this.n=Dt(e,16),r=n.sub[1].getHexStringValue(),this.e=parseInt(r,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new ce.asn1.DERInteger({int:0}),new ce.asn1.DERInteger({bigint:this.n}),new ce.asn1.DERInteger({int:this.e}),new ce.asn1.DERInteger({bigint:this.d}),new ce.asn1.DERInteger({bigint:this.p}),new ce.asn1.DERInteger({bigint:this.q}),new ce.asn1.DERInteger({bigint:this.dmp1}),new ce.asn1.DERInteger({bigint:this.dmq1}),new ce.asn1.DERInteger({bigint:this.coeff})]};return new ce.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return st(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new ce.asn1.DERSequence({array:[new ce.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new ce.asn1.DERNull]}),e=new ce.asn1.DERSequence({array:[new ce.asn1.DERInteger({bigint:this.n}),new ce.asn1.DERInteger({int:this.e})]}),r=new ce.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new ce.asn1.DERSequence({array:[t,r]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return st(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var r="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(r,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(oe),de="undefined"!=typeof process?null===(le=process.env)||void 0===le?void 0:le.npm_package_version:void 0,ge=function(){function t(t){void 0===t&&(t={}),this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=t.key||null}return t.prototype.setKey=function(t){t?(this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new pe(t)):!this.key&&this.log&&console.error("A key was not set.")},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(ot(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return st(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.encryptOAEP=function(t){try{return st(this.getKey().encrypt(t,se))}catch(t){return!1}},t.prototype.sign=function(t,e,r){void 0===e&&(e=function(t){return t}),void 0===r&&(r="");try{return st(this.getKey().sign(t,e,r))}catch(t){return!1}},t.prototype.signSha256=function(t){return this.sign(t,function(t){return Zt(Kt(t))},"sha256")},t.prototype.verify=function(t,e,r){void 0===r&&(r=function(t){return t});try{return this.getKey().verify(t,ot(e),r)}catch(t){return!1}},t.prototype.verifySha256=function(t,e){return this.verify(t,e,function(t){return Zt(Kt(t))})},t.prototype.getKey=function(t){if(!this.key){if(this.key=new pe,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=de,t}(),me={exports:{}};var ve,_e={exports:{}};function ye(){return ve||(ve=1,function(t){t.exports=function(){var t=t||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==S&&S.crypto&&(r=S.crypto),!r)try{r=require("crypto")}catch(t){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),s={},o=s.lib={},a=o.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},h=o.WordArray=a.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var s=0;s<n;s++){var o=r[s>>>2]>>>24-s%4*8&255;e[i+s>>>2]|=o<<24-(i+s)%4*8}else for(var a=0;a<n;a+=4)e[i+a>>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=a.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r<t;r+=4)e.push(i());return new h.init(e,t)}}),c=s.enc={},u=c.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var s=e[n>>>2]>>>24-n%4*8&255;i.push((s>>>4).toString(16)),i.push((15&s).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i+=2)r[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new h.init(r,e/2)}},l=c.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var s=e[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(s))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new h.init(r,e)}},f=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},p=o.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,i=this._data,n=i.words,s=i.sigBytes,o=this.blockSize,a=s/(4*o),c=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*o,u=t.min(4*c,s);if(c){for(var l=0;l<c;l+=o)this._doProcessBlock(n,l);r=n.splice(0,c),i.sigBytes-=u}return new h.init(r,u)},clone:function(){var t=a.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});o.Hasher=p.extend({cfg:a.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new d.HMAC.init(t,r).finalize(e)}}});var d=s.algo={};return s}(Math);return t}()}(_e)),_e.exports}var be;var we,Se=x((be||(be=1,function(t){t.exports=function(t){return t.enc.Utf8}(ye())}(me)),me.exports)),xe={exports:{}},Te={exports:{}};function ke(){return we||(we=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.WordArray;function i(t,e,i){for(var n=[],s=0,o=0;o<e;o++)if(o%4){var a=i[t.charCodeAt(o-1)]<<o%4*2|i[t.charCodeAt(o)]>>>6-o%4*2;n[s>>>2]|=a<<24-s%4*8,s++}return r.create(n,s)}e.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],s=0;s<r;s+=3)for(var o=(e[s>>>2]>>>24-s%4*8&255)<<16|(e[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|e[s+2>>>2]>>>24-(s+2)%4*8&255,a=0;a<4&&s+.75*a<r;a++)n.push(i.charAt(o>>>6*(3-a)&63));var h=i.charAt(64);if(h)for(;n.length%4;)n.push(h);return n.join("")},parse:function(t){var e=t.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var s=0;s<r.length;s++)n[r.charCodeAt(s)]=s}var o=r.charAt(64);if(o){var a=t.indexOf(o);-1!==a&&(e=a)}return i(t,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64}(ye())}(Te)),Te.exports}var Ee,De={exports:{}};function Oe(){return Ee||(Ee=1,function(t){t.exports=function(t){return function(e){var r=t,i=r.lib,n=i.WordArray,s=i.Hasher,o=r.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var h=o.MD5=s.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var s=this._hash.words,o=t[e+0],h=t[e+1],p=t[e+2],d=t[e+3],g=t[e+4],m=t[e+5],v=t[e+6],_=t[e+7],y=t[e+8],b=t[e+9],w=t[e+10],S=t[e+11],x=t[e+12],T=t[e+13],k=t[e+14],E=t[e+15],D=s[0],O=s[1],A=s[2],P=s[3];D=c(D,O,A,P,o,7,a[0]),P=c(P,D,O,A,h,12,a[1]),A=c(A,P,D,O,p,17,a[2]),O=c(O,A,P,D,d,22,a[3]),D=c(D,O,A,P,g,7,a[4]),P=c(P,D,O,A,m,12,a[5]),A=c(A,P,D,O,v,17,a[6]),O=c(O,A,P,D,_,22,a[7]),D=c(D,O,A,P,y,7,a[8]),P=c(P,D,O,A,b,12,a[9]),A=c(A,P,D,O,w,17,a[10]),O=c(O,A,P,D,S,22,a[11]),D=c(D,O,A,P,x,7,a[12]),P=c(P,D,O,A,T,12,a[13]),A=c(A,P,D,O,k,17,a[14]),D=u(D,O=c(O,A,P,D,E,22,a[15]),A,P,h,5,a[16]),P=u(P,D,O,A,v,9,a[17]),A=u(A,P,D,O,S,14,a[18]),O=u(O,A,P,D,o,20,a[19]),D=u(D,O,A,P,m,5,a[20]),P=u(P,D,O,A,w,9,a[21]),A=u(A,P,D,O,E,14,a[22]),O=u(O,A,P,D,g,20,a[23]),D=u(D,O,A,P,b,5,a[24]),P=u(P,D,O,A,k,9,a[25]),A=u(A,P,D,O,d,14,a[26]),O=u(O,A,P,D,y,20,a[27]),D=u(D,O,A,P,T,5,a[28]),P=u(P,D,O,A,p,9,a[29]),A=u(A,P,D,O,_,14,a[30]),D=l(D,O=u(O,A,P,D,x,20,a[31]),A,P,m,4,a[32]),P=l(P,D,O,A,y,11,a[33]),A=l(A,P,D,O,S,16,a[34]),O=l(O,A,P,D,k,23,a[35]),D=l(D,O,A,P,h,4,a[36]),P=l(P,D,O,A,g,11,a[37]),A=l(A,P,D,O,_,16,a[38]),O=l(O,A,P,D,w,23,a[39]),D=l(D,O,A,P,T,4,a[40]),P=l(P,D,O,A,o,11,a[41]),A=l(A,P,D,O,d,16,a[42]),O=l(O,A,P,D,v,23,a[43]),D=l(D,O,A,P,b,4,a[44]),P=l(P,D,O,A,x,11,a[45]),A=l(A,P,D,O,E,16,a[46]),D=f(D,O=l(O,A,P,D,p,23,a[47]),A,P,o,6,a[48]),P=f(P,D,O,A,_,10,a[49]),A=f(A,P,D,O,k,15,a[50]),O=f(O,A,P,D,m,21,a[51]),D=f(D,O,A,P,x,6,a[52]),P=f(P,D,O,A,d,10,a[53]),A=f(A,P,D,O,w,15,a[54]),O=f(O,A,P,D,h,21,a[55]),D=f(D,O,A,P,y,6,a[56]),P=f(P,D,O,A,E,10,a[57]),A=f(A,P,D,O,v,15,a[58]),O=f(O,A,P,D,T,21,a[59]),D=f(D,O,A,P,g,6,a[60]),P=f(P,D,O,A,S,10,a[61]),A=f(A,P,D,O,p,15,a[62]),O=f(O,A,P,D,b,21,a[63]),s[0]=s[0]+D|0,s[1]=s[1]+O|0,s[2]=s[2]+A|0,s[3]=s[3]+P|0},_doFinalize:function(){var t=this._data,r=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;r[n>>>5]|=128<<24-n%32;var s=e.floor(i/4294967296),o=i;r[15+(n+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),r[14+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,h=a.words,c=0;c<4;c++){var u=h[c];h[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,r,i,n,s,o){var a=t+(e&r|~e&i)+n+o;return(a<<s|a>>>32-s)+e}function u(t,e,r,i,n,s,o){var a=t+(e&i|r&~i)+n+o;return(a<<s|a>>>32-s)+e}function l(t,e,r,i,n,s,o){var a=t+(e^r^i)+n+o;return(a<<s|a>>>32-s)+e}function f(t,e,r,i,n,s,o){var a=t+(r^(e|~i))+n+o;return(a<<s|a>>>32-s)+e}r.MD5=s._createHelper(h),r.HmacMD5=s._createHmacHelper(h)}(Math),t.MD5}(ye())}(De)),De.exports}var Ae,Pe={exports:{}},Ce={exports:{}};function Re(){return Ae||(Ae=1,function(t){t.exports=function(t){return r=(e=t).lib,i=r.WordArray,n=r.Hasher,s=e.algo,o=[],a=s.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],s=r[2],a=r[3],h=r[4],c=0;c<80;c++){if(c<16)o[c]=0|t[e+c];else{var u=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=u<<1|u>>>31}var l=(i<<5|i>>>27)+h+o[c];l+=c<20?1518500249+(n&s|~n&a):c<40?1859775393+(n^s^a):c<60?(n&s|n&a|s&a)-1894007588:(n^s^a)-899497514,h=a,a=s,s=n<<30|n>>>2,n=i,i=l}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+s|0,r[3]=r[3]+a|0,r[4]=r[4]+h|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=n._createHelper(a),e.HmacSHA1=n._createHmacHelper(a),t.SHA1;var e,r,i,n,s,o,a}(ye())}(Ce)),Ce.exports}var Ie,Be={exports:{}};var ze;function Ne(){return ze||(ze=1,function(t){t.exports=function(t){return r=(e=t).lib,i=r.Base,n=r.WordArray,s=e.algo,o=s.MD5,a=s.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:o,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r,i=this.cfg,s=i.hasher.create(),o=n.create(),a=o.words,h=i.keySize,c=i.iterations;a.length<h;){r&&s.update(r),r=s.update(t).finalize(e),s.reset();for(var u=1;u<c;u++)r=s.finalize(r),s.reset();o.concat(r)}return o.sigBytes=4*h,o}}),e.EvpKDF=function(t,e,r){return a.create(r).compute(t,e)},t.EvpKDF;var e,r,i,n,s,o,a}(ye(),Re(),Ie||(Ie=1,function(t){t.exports=function(t){var e,r,i;r=(e=t).lib.Base,i=e.enc.Utf8,e.algo.HMAC=r.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=i.parse(e));var r=t.blockSize,n=4*r;e.sigBytes>n&&(e=t.finalize(e)),e.clamp();for(var s=this._oKey=e.clone(),o=this._iKey=e.clone(),a=s.words,h=o.words,c=0;c<r;c++)a[c]^=1549556828,h[c]^=909522486;s.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,r=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(r))}})}(ye())}(Be)))}(Pe)),Pe.exports}var Ue,je={exports:{}};var Le;var Me=(Le||(Le=1,function(t){t.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,i=e.algo,n=[],s=[],o=[],a=[],h=[],c=[],u=[],l=[],f=[],p=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var r=0,i=0;for(e=0;e<256;e++){var d=i^i<<1^i<<2^i<<3^i<<4;d=d>>>8^255&d^99,n[r]=d,s[d]=r;var g=t[r],m=t[g],v=t[m],_=257*t[d]^16843008*d;o[r]=_<<24|_>>>8,a[r]=_<<16|_>>>16,h[r]=_<<8|_>>>24,c[r]=_,_=16843009*v^65537*m^257*g^16843008*r,u[d]=_<<24|_>>>8,l[d]=_<<16|_>>>16,f[d]=_<<8|_>>>24,p[d]=_,r?(r=g^t[t[t[v^g]]],i^=t[t[i]]):r=i=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],g=i.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,i=4*((this._nRounds=r+6)+1),s=this._keySchedule=[],o=0;o<i;o++)o<r?s[o]=e[o]:(c=s[o-1],o%r?r>6&&o%r==4&&(c=n[c>>>24]<<24|n[c>>>16&255]<<16|n[c>>>8&255]<<8|n[255&c]):(c=n[(c=c<<8|c>>>24)>>>24]<<24|n[c>>>16&255]<<16|n[c>>>8&255]<<8|n[255&c],c^=d[o/r|0]<<24),s[o]=s[o-r]^c);for(var a=this._invKeySchedule=[],h=0;h<i;h++){if(o=i-h,h%4)var c=s[o];else c=s[o-4];a[h]=h<4||o<=4?c:u[n[c>>>24]]^l[n[c>>>16&255]]^f[n[c>>>8&255]]^p[n[255&c]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,o,a,h,c,n)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,u,l,f,p,s),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,s,o,a){for(var h=this._nRounds,c=t[e]^r[0],u=t[e+1]^r[1],l=t[e+2]^r[2],f=t[e+3]^r[3],p=4,d=1;d<h;d++){var g=i[c>>>24]^n[u>>>16&255]^s[l>>>8&255]^o[255&f]^r[p++],m=i[u>>>24]^n[l>>>16&255]^s[f>>>8&255]^o[255&c]^r[p++],v=i[l>>>24]^n[f>>>16&255]^s[c>>>8&255]^o[255&u]^r[p++],_=i[f>>>24]^n[c>>>16&255]^s[u>>>8&255]^o[255&l]^r[p++];c=g,u=m,l=v,f=_}g=(a[c>>>24]<<24|a[u>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^r[p++],m=(a[u>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^r[p++],v=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&u])^r[p++],_=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[u>>>8&255]<<8|a[255&l])^r[p++],t[e]=g,t[e+1]=m,t[e+2]=v,t[e+3]=_},keySize:8});e.AES=r._createHelper(g)}(),t.AES}(ye(),ke(),Oe(),Ne(),Ue||(Ue=1,function(t){t.exports=function(t){t.lib.Cipher||function(e){var r=t,i=r.lib,n=i.Base,s=i.WordArray,o=i.BufferedBlockAlgorithm,a=r.enc;a.Utf8;var h=a.Base64,c=r.algo.EvpKDF,u=i.Cipher=o.extend({cfg:n.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?y:v}return function(e){return{encrypt:function(r,i,n){return t(i).encrypt(e,r,i,n)},decrypt:function(r,i,n){return t(i).decrypt(e,r,i,n)}}}}()});i.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=r.mode={},f=i.BlockCipherMode=n.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),p=l.CBC=function(){var t=f.extend();function r(t,r,i){var n,s=this._iv;s?(n=s,this._iv=e):n=this._prevBlock;for(var o=0;o<i;o++)t[r+o]^=n[o]}return t.Encryptor=t.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize;r.call(this,t,e,n),i.encryptBlock(t,e),this._prevBlock=t.slice(e,e+n)}}),t.Decryptor=t.extend({processBlock:function(t,e){var i=this._cipher,n=i.blockSize,s=t.slice(e,e+n);i.decryptBlock(t,e),r.call(this,t,e,n),this._prevBlock=s}}),t}(),d=(r.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,i=r-t.sigBytes%r,n=i<<24|i<<16|i<<8|i,o=[],a=0;a<i;a+=4)o.push(n);var h=s.create(o,i);t.concat(h)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}};i.BlockCipher=u.extend({cfg:u.cfg.extend({mode:p,padding:d}),reset:function(){var t;u.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4});var g=i.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),m=(r.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?s.create([1398893684,1701076831]).concat(r).concat(e):e).toString(h)},parse:function(t){var e,r=h.parse(t),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(e=s.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),g.create({ciphertext:r,salt:e})}},v=i.SerializableCipher=n.extend({cfg:n.extend({format:m}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),s=n.finalize(e),o=n.cfg;return g.create({ciphertext:s,key:r,iv:o.iv,algorithm:t,mode:o.mode,padding:o.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),_=(r.kdf={}).OpenSSL={execute:function(t,e,r,i,n){if(i||(i=s.random(8)),n)o=c.create({keySize:e+r,hasher:n}).compute(t,i);else var o=c.create({keySize:e+r}).compute(t,i);var a=s.create(o.words.slice(e),4*r);return o.sigBytes=4*e,g.create({key:o,iv:a,salt:i})}},y=i.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:_}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize,i.salt,i.hasher);i.iv=n.iv;var s=v.encrypt.call(this,t,e,n.key,i);return s.mixIn(n),s},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt,i.hasher);return i.iv=n.iv,v.decrypt.call(this,t,e,n.key,i)}})}()}(ye(),Ne())}(je)))}(xe)),xe.exports),Ve=x(Me),qe="funsdata",He={_name:qe,appId:"",persistence:"localStorage",persistencePrefix:"FunsDataJSSDK",persistenceEnabled:!0,crossSubDomain:!0,maxReferrerStringLength:200,showLog:!0,dataSendTimeout:3e3,useAppTrack:!1,strict:!1,tryCount:3,enableCalibrationTime:!1},Fe=function(t){this._state={},this.crossSubDomain=t.crossSubDomain,this.enabled=t.persistenceEnabled;var e=null;if(this.enabled){if(!1===t.crossSubDomain){var r=_.url("sub",location.href);this.name="string"==typeof r&&""!==r?t.persistencePrefix+"_"+r:t.persistencePrefix+"_root"}else this.name=t.persistencePrefix+"_cross";var i=t.persistence;"cookie"!==i&&"localStorage"!==i&&(y.i("Unknown persistence type "+i+"; falling back to cookie"),i=t.persistence="cookie"),"localStorage"===i&&_.localStorage.isSupported()?(this.storage=_.localStorage,(e=_.cookie.get(this.name))&&_.cookie.remove(this.name,this.crossSubDomain)):(y.i("localStorage is not support by the browser; falling back to cookie"),this.storage=_.cookie)}if(this._load(e),!this.getDistinctId()){var n=t.uuid?t.uuid:_.UUID();this._setDeviceId(n),this.setDistinctId(n)}};Fe.prototype._load=function(t){var e;this.enabled&&(null!==(e=null!==t?t:this.storage.get(this.name))&&_.check.isJSONString(e)&&(this._state=_.extend({},JSON.parse(e))),null!==t&&this._save())},Fe.prototype.getDistinctId=function(){return this._state.distinct_id},Fe.prototype.setDistinctId=function(t){this._set("distinct_id",t)},Fe.prototype.setEnableTracking=function(t){this._set("enable_tracking",t)},Fe.prototype.getEnableTracking=function(){return!!_.check.isUndefined(this._state.enable_tracking)||this._state.enable_tracking},Fe.prototype.clear=function(){this._state={},this._save()},Fe.prototype.setOptTracking=function(t){this._set("opt_tracking",t)},Fe.prototype.getOptTracking=function(){return!!_.check.isUndefined(this._state.opt_tracking)||this._state.opt_tracking},Fe.prototype.setDistinctId=function(t){this._set("distinct_id",t)},Fe.prototype.getAccountId=function(){return this._state.account_id},Fe.prototype.setAccountId=function(t){this._set("account_id",t)},Fe.prototype.getDeviceId=function(){return this._state.device_id},Fe.prototype.setSuperProperties=function(t){this._set("super_properties",t)},Fe.prototype.getSuperProperties=function(){return this._state.super_properties||{}},Fe.prototype.setEventTimer=function(t,e){var r=this._state.event_timers||{};r[t]=e,this._set("event_timers",r)},Fe.prototype.clearEventTimer=function(){this._set("event_timers",{})},Fe.prototype.removeEventTimer=function(t){var e=(this._state.event_timers||{})[t];return _.check.isUndefined(e)||(delete this._state.event_timers[t],this._save()),e},Fe.prototype._setDeviceId=function(t){this._state.device_id?y.w("Current device_id is ",this.getDeviceId(),", it couldn't been set to: ",t):this._set("device_id",t)},Fe.prototype._save=function(){this.enabled&&this.storage.set(this.name,JSON.stringify(this._state),73e3,this.crossSubDomain)},Fe.prototype._set=function(t,e){this._state=this._state||{},this._state[t]=e,this._save()};var Ke=function(){};Ke.prototype.trackLink=function(t,e,r){var i=this;if(this._isCollectData()){var n=this._getConfig("strict");if(w.properties(r)||!n){if(t&&_.check.isObject(t)){var s=[];_.each(t,function(t,e){t&&_.check.isArray(t)&&_.each(t,function(t){switch(e){case"tag":_.each(document.getElementsByTagName(t),function(t){s.indexOf(t)<0&&s.push(t)});break;case"class":_.each(document.getElementsByClassName(t),function(t){s.indexOf(t)<0&&s.push(t)});break;case"id":var r=document.getElementById(t);null!==r&&s.indexOf(r)<0&&s.push(r)}})}),_.each(s,function(t){if(null!==t){var s=_.extend({},_.info.pageProperties(),r);s["#element_type"]=t.nodeName.toLowerCase(),_.check.isUndefined(s.name)&&(s.name=t.getAttribute("td-name")||t.innerHTML||t.value||"Unable to get Identify"),t.addEventListener("click",function(){i._sendRequest({type:"track",event:e,properties:n?w.stripProperties(s):s})})}})}}else y.w("trackLink failed due to invalid properties.")}},Ke.prototype.setPageProperty=function(t){this._isCollectData()&&(w.properties(t)||!this._getConfig("strict")?_.extend(this.currentProps,t):y.w("Page property setting error"))},Ke.prototype.getPageProperty=function(){return this.currentProps},Ke.prototype.getPresetProperties=function(){var t=_.info.properties(),e={};e.os=t["#os"],e.screenWidth=t["#screen_width"],e.screenHeight=t["#screen_height"],e.browser=t["#browser"],e.browserVersion=t["#browser_version"],e.deviceId=this.getDeviceId();var r=0-(new Date).getTimezoneOffset()/60;return this._getConfig("zoneOffset")&&(r=this._getConfig("zoneOffset")),e.zoneOffset=r,e.toEventPresetProperties=function(){return{"#os":e.os,"#screen_width":e.screenWidth,"#screen_height":e.screenHeight,"#browser":e.browser,"#browser_version":e.browserVersion,"#device_id":e.deviceId,"#zone_offset":e.zoneOffset}},e},Ke.prototype.login=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),w.userId(t)||!this._getConfig("strict")?t!==this.persistence.getAccountId()&&this.persistence.setAccountId(t):y.e("The parameters of the login API must be strings"))},Ke.prototype.logout=function(t){if(this._isCollectData()){if(!0===t){var e=_.UUID();this.persistence.setDistinctId(e)}this.persistence.setAccountId("")}},Ke.prototype.userSet=function(t,e){this._isCollectData()&&(!w.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_set",properties:t},e))},Ke.prototype.userSetOnce=function(t,e){this._isCollectData()&&(!w.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_setOnce",properties:t},e))},Ke.prototype.userUnset=function(t,e){if(this._isCollectData()&&(w.propertyName(t)||!this._getConfig("strict"))){var r={};r[t]=0,this._sendRequest({type:"user_unset",properties:r},e)}},Ke.prototype.userAdd=function(t,e){if(this._isCollectData()){if(_.check.isString(t)){var r=t;(t={})[r]=1}w.propertiesMust(t)&&(!function(t){for(var e in t)if(!/-*\d+/.test(String(t[e])))return!1;return!0}(t)&&this._getConfig("strict")?y.w("The property value of useradd api must be a number"):this._sendRequest({type:"user_add",properties:t},e))}},Ke.prototype.userAppend=function(t,e){this._isCollectData()&&(w.propertiesMust(t)&&function(t){for(var e in t)if(!_.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_append",properties:t},e):y.w("The value in the userAppend property can only be Array"))},Ke.prototype.userUniqAppend=function(t,e){this._isCollectData()&&(w.propertiesMust(t)&&function(t){for(var e in t)if(!_.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_uniq_append",properties:t},e):y.w("The value in the userUniqAppend property can only be Array"))},Ke.prototype.flush=function(){this.batchConsumer&&!this._isDebug()&&this.batchConsumer.flush()},Ke.prototype.userDel=function(t){this._isCollectData()&&this._sendRequest({type:"user_del"},t)},Ke.prototype._sendRequest=function(t,e,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=_.check.isUndefined(t.time)||!_.check.isDate(t.time)?new Date:t.time,s={data:[{"#type":t.type,"#time":_.formatDate(_.formatTimeZone(n,this._getConfig("zoneOffset"))),"#distinct_id":this.persistence.getDistinctId()}]};this.persistence.getAccountId()&&(s.data[0]["#account_id"]=this.persistence.getAccountId());var o=0-n.getTimezoneOffset()/60;if(s.automaticData=_.extend({},{"#device_id":this.persistence.getDeviceId(),"#zone_offset":o},_.info.properties()),"track"===t.type||"track_update"===t.type||"track_overwrite"===t.type){s.data[0]["#event_name"]=t.event,"track_update"===t.type||"track_overwrite"===t.type?s.data[0]["#event_id"]=t.extraId:t.firstCheckId&&(s.data[0]["#first_check_id"]=t.firstCheckId),this._getConfig("zoneOffset")&&(o=this._getConfig("zoneOffset")),s.data[0].properties=_.extend({},{"#device_id":this.persistence.getDeviceId(),"#zone_offset":o},_.info.properties(),this.getSuperProperties(),this.dynamicProperties?this.dynamicProperties():{},this.getPageProperty());var h=this.persistence.removeEventTimer(t.event);if(!_.check.isUndefined(h)){var c=(new Date).getTime()-h,u=parseFloat((c/1e3).toFixed(3));u>86400&&(u=86400),s.data[0].properties["#duration"]=u}}else s.data[0].properties={};if(_.check.isObject(t.properties)&&!_.check.isEmptyObject(t.properties)&&_.extend(s.data[0].properties,t.properties),_.searchObjDate(s.data[0],this._getConfig("zoneOffset")),s.data[0]=_.generateEncryptyData(s.data[0],this._getConfig("secretKey")),s["#app_id"]=this._getConfig("appId"),s["#flush_time"]=_.formatTimeZone(new Date,this._getConfig("zoneOffset")).getTime(),y.i(s),this._getConfig("useAppTrack")){var l=window.FunsData_APP_JS_Bridge||{};if("object"===a(l)&&l.funsdata_track)return l.funsdata_track(JSON.stringify(s)),void("function"==typeof e&&e());if(/td-sdk-ios/.test(navigator.userAgent)&&!window.MSStream){var f=document.createElement("iframe");return f.setAttribute("src","funsanalytics://trackEvent?event="+_.encodeURIComponent(JSON.stringify(s))),document.documentElement.appendChild(f),f.parentNode.removeChild(f),f=null,void("function"==typeof e&&e())}}s.data[0]["#uuid"]=_.UUIDv4();var p=JSON.stringify(s),d=this;if(this._isEncrypt()&&d.crypto){var g=Math.round(1e16*Math.random())+"",m=[];s.data.forEach(function(t){m.push({ekey:d._encryptPass(g,d.crypto.pub_key),pkv:d.crypto.version,payload:d._encryptInfo(JSON.stringify(t),g)})}),s.data=m,s.client="js"}return new Je(JSON.stringify(s),this._getConfig("serverUrl"),this._getConfig("tryCount"),e,this._isDebug(),i).run(p)};function Ze(t){this.config=t,this.timer=null,this.batchConfig=_.extend({size:5,interval:5e3,storageLimit:200},this.config.batch),this.batchConfig.size<1&&(this.batchConfig.size=1),this.batchConfig.size>30&&(this.batchConfig.size=30),this.prefix=this.config.persistencePrefix,this.tabKey=this.prefix+"tab_"+this.config.appId,this.storageLimit=this.batchConfig.storageLimit}Ze.prototype={batchInterval:function(){var t=this;t.timer=setTimeout(function(){t.recycle(),t.send(),clearTimeout(t.timer),t.batchInterval()},this.batchConfig.interval)},add:function(t){var e=t,r=this.prefix+"ta_"+this.config.appId+"_"+String(_.getRandom()),i=_.localStorage.get(this.tabKey);if((i=null===i?[]:_.safeJSONParse(i)||[]).length<=this.storageLimit)i.push(r),_.localStorage.set(this.tabKey,JSON.stringify(i)),_.saveObjectVal(r,e);else{var n=i.splice(0,20);i.push(r),_.localStorage.set(this.tabKey,JSON.stringify(i)),_.saveObjectVal(r,e);for(var s={},o=[],a=0;a<n.length;a++){var h=_.readObjectVal(n[a]);_.hasEncrypty(h)||(h=_.generateEncryptyData(h,this.config.secretKey)),o.push(h)}s.data=o,s["#app_id"]=this.config.appId,s["#flush_time"]=_.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(s,n)}},flush:function(){clearTimeout(this.timer),this.send(),this.batchInterval()},send:function(){var t=_.localStorage.get(this.tabKey);if(t&&(t=_.safeJSONParse(t)||[]).length){for(var e={},r=[],i=[],n=t.length<this.batchConfig.size?t.length:this.batchConfig.size,s=0;s<n;s++){var o=_.readObjectVal(t[s]);_.hasEncrypty(o)||(o=_.generateEncryptyData(o,this.config.secretKey)),r.push(o),i.push(t[s])}e.data=r,e["#app_id"]=this.config.appId,e["#flush_time"]=_.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(e,i)}},request:function(t,e){var r=this;y.i("flush data"),y.i(t);var i=JSON.stringify(t),n=_.base64Encode(i),s="crc="+_.hashCode(n);_.encodeURIComponent(n),_.encodeURIComponent(s),new Je(i,this.config.serverUrl,this.config.tryCount,function(){r.remove(e)},!1).run()},remove:function(t){var e=_.localStorage.get(this.tabKey);if(e){for(var r=_.safeJSONParse(e)||[],i=0;i<t.length;i++){var n=_.indexOf(r,t[i]);n>-1&&r.splice(n,1),_.localStorage.remove(t[i])}_.localStorage.set(this.tabKey,JSON.stringify(r))}},recycle:function(){var t=_.localStorage.get(this.tabKey);if(t&&0===(t=_.safeJSONParse(t)||[]).length){for(var e=0;e<localStorage.length;e++){var r=localStorage.key(e);0===r.indexOf(this.prefix+"ta_"+this.config.appId)&&t.push(r)}t.length>0&&_.localStorage.set(this.tabKey,JSON.stringify(t))}}};var Je=function(){return r(function e(r,i,n,s,o){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];t(this,e),this.data=r,this.serverUrl=i,this.tryCount=n||3,this.callback=s,this.isDebug=o,this.ifSend=a},[{key:"run",value:function(t){var e=null;e=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var r=this;return e.open("post",this.serverUrl,!0),e.setRequestHeader("Content-type",r.isDebug?"application/json;charset=UTF-8":"application/gzip"),e.onreadystatechange=function(){if(4===e.readyState)if(e.status>=200&&e.status<300||304===e.status){if(r.callback&&r.callback(),r.isDebug){var t=JSON.parse(e.response);0!==t.errorLevel?y.w(t):y.i(t)}}else r.onFailed()},r.ifSend&&(r.isDebug?e.send(r.data):e.send(W.gzip(r.data,{to:"string"}))),r.ifSend?new Promise(function(r,i){e.onload=function(){4===e.readyState&&(200===e.status?r({res:e.responseText,req:t}):i(e))},e.onerror=function(){i(e)}}):t}},{key:"onFailed",value:function(){--this.tryCount>0&&this.run()}}])}();Ke.prototype._isDebug=function(){return"debug"===this._getConfig("mode")||"debug_only"===this._getConfig("mode")},Ke.prototype._isEncrypt=function(){return!0===this._getConfig("encrypt")},Ke.prototype._setEncrypt=function(){var t=this,e=new XMLHttpRequest;e.open("get","https://deapi.funsdata.com/v1/settings",!0),e.send(),e.onload=function(){4===e.readyState&&(200===e.status?t.crypto=JSON.parse(e.responseText).data.crypto:console.error("公钥拉取失败!"))}},Ke.prototype._encryptInfo=function(t,e){var r=Se.parse(e),i=Se.parse(t);return Ve.encrypt(i,r,{iv:r}).toString()},Ke.prototype._encryptPass=function(t,e){var r=new ge;return r.setPublicKey(e),r.encrypt(t)},Ke.prototype.startHeartbeat=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,e=this;if(e.heartbeatInterval)console.warn("已设置心跳");else{var r={interval:t};e.heartbeatInterval=setInterval(function(){if(e.heartbeatProps){var t=s(s({},r),e.heartbeatProps);e.track("Heartbeat",t)}else e.track("Heartbeat",r)},t)}},Ke.prototype.clearHeartbeat=function(){var t=this;t.heartbeatInterval?(clearInterval(t.heartbeatInterval),t.removeHeartbeatProps(),t.heartbeatInterval=void 0):console.warn("未设置心跳")},Ke.prototype.setHeartbeatProps=function(t){if(t)if("object"!==a(t)||Array.isArray(t))console.warn("心跳上报参数不符合规范");else{var e=this;e.heartbeatProps||(e.heartbeatProps={}),e.heartbeatProps=s(s({},e.heartbeatProps),t)}},Ke.prototype.removeHeartbeatProps=function(t){var e=this;t?"string"==typeof t?e.heartbeatProps[t]&&delete e.heartbeatProps[t]:Array.isArray(t)?t.forEach(function(t){e.heartbeatProps[t]&&delete e.heartbeatProps[t]}):console.warn("删除心跳参数不符合规范"):e.heartbeatProps={}},Ke.prototype._sendRequestWithImage=function(t,e){function r(t){t&&!t.hasCalled&&(t.hasCalled=!0,t.callback&&t.callback())}var i=(-1!==this._getConfig("serverUrl").indexOf("?")?this._getConfig("serverUrl"):this._getConfig("serverUrl")+"?")+t,n=document.createElement("img");n.callback=e,setTimeout(r,this._getConfig("dataSendTimeout"),n),n.onload=function(){this.onload=null,r(this)},n.onerror=function(){this.onerror=null,r(this)},n.onabort=function(){this.onabort=null,r(this)},n.src=i},Ke.prototype.track=function(t,e,r,i){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||w.event(t)&&w.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},i):void 0},Ke.prototype.getTrackData=function(t,e,r,i){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||w.event(t)&&w.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},i,void 0,!1):void 0},Ke.prototype.trackUpdate=function(t){this._isCollectData()&&(_.check.isObject(t)?(w.event(t.eventName)&&w.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track_update",event:t.eventName,time:t.eventTime,properties:t.properties,extraId:t.eventId},t.callback):y.e("The parameter of updateble event does not meet the requirements"))},Ke.prototype.trackOverwrite=function(t){this._isCollectData()&&(_.check.isObject(t)?(w.event(t.eventName)&&w.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track_overwrite",event:t.eventName,time:t.eventTime,properties:t.properties,extraId:t.eventId},t.callback):y.e("The parameter of overwritable event does not meet the requirements"))},Ke.prototype.trackFirstEvent=function(t){this._isCollectData()&&(_.check.isObject(t)?(w.event(t.eventName)&&w.properties(t.properties)||!this._getConfig("strict"))&&this._sendRequest({type:"track",event:t.eventName,time:t.eventTime,properties:t.properties,firstCheckId:t.firstCheckId?t.firstCheckId:this.getDeviceId()},t.callback):y.e("The parameter of first event does not meet the requirements"))},Ke.prototype.trackWithBeacon=function(t,e,r,i){"ta_page_hide"!==t?(w.event(t)&&w.properties(e)||!this._getConfig("strict"))&&this._sendRequest({type:"track",event:t,time:r,properties:e},i,!0):this._sendRequest({type:"track",event:t,time:r,properties:e},i,!0)},Ke.prototype.identify=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),w.userId(t)||!this._getConfig("strict")?t!==this.persistence.getDistinctId()&&this.persistence.setDistinctId(t):y.e("The parameter of identify API requires a string"))},Ke.prototype.getDistinctId=function(){return this.persistence.getDistinctId()},Ke.prototype.getDeviceId=function(){return this.persistence.getDeviceId()},Ke.prototype._isCollectData=function(){return this.persistence.getOptTracking()&&this.persistence.getEnableTracking()},Ke.prototype.setSuperProperties=function(t){this._isCollectData()&&(w.propertiesMust(t)||!this._getConfig("strict")?this.persistence.setSuperProperties(_.extend({},this.getSuperProperties(),t)):y.w("The paramater of setSuperProperties API requires object"))},Ke.prototype.getSuperProperties=function(){return this.persistence.getSuperProperties()},Ke.prototype.clearSuperProperties=function(){this._isCollectData()&&this.persistence.setSuperProperties({})},Ke.prototype.unsetSuperProperty=function(t){if(this._isCollectData()&&_.check.isString(t)){var e=this.getSuperProperties();delete e[t],this.persistence.setSuperProperties(e)}},Ke.prototype.setDynamicSuperProperties=function(t){this._isCollectData()&&("function"==typeof t?w.properties(t())||!this._getConfig("strict")?this.dynamicProperties=t:y.w("The return value of dynamic properties requires an object"):y.w("The paramater of setDynamicSuperProperties API requires function type"))},Ke.prototype.timeEvent=function(t){this._isCollectData()&&(_.check.isUndefined(t)?y.w("No event name provided to timeEvent"):this.persistence.setEventTimer(t,(new Date).getTime()))},Ke.prototype.quick=function(t,e){if(this._isCollectData())if("string"==typeof t&&"autoTrack"===t){var r={};w.properties(e)&&_.extend(r,e),this._sendRequest({type:"track",event:"ta_pageview",properties:_.extend(r,_.info.pageProperties())})}else"string"==typeof t&&"siteLinker"===t?We.init(this,e):y.w("The quick method does not support the parameter of"+t)},Ke.prototype._setConfig=function(t){_.check.isObject(t)&&(_.extend(this.config,t),this._getConfig("persistencePrefix")||(this.config.persistencePrefix=this.config.cookiePrefix),this.persistence)},Ke.prototype._getConfig=function(t){return this.config[t]},Ke.prototype.init=function(t){if(_.check.isUndefined(this.config)){this.version=c,this.config={},this.currentProps=this.currentProps||{},this._setConfig(_.extend({},He,t)),this.persistence=new Fe(this.config);var e=this._getConfig("appId");_.check.isUndefined(e)||this._setConfig({appId:e.replace(/\s*/g,"")}),y.showLog=this._getConfig("showLog"),this._isDebug()?this._setConfig({serverUrl:t.serverUrl+"/json"}):this._setConfig({serverUrl:t.serverUrl}),this._isEncrypt()&&this._setEncrypt(),void 0!==this._getConfig("batch")&&!1!==this._getConfig("batch")&&_.localStorage.isSupported()&&(this.batchConsumer=new Ze(this.config),this.batchConsumer.batchInterval()),new $e(this,this._getConfig("autoTrack")).start();var r="normal";this.config.mode&&(r=this.config.mode),y.i("DataEye Analytics SDK initialized successfully with mode: "+r+", APP ID : "+this.config.appId+", server url: "+this.config.serverUrl+", libversion: "+c)}else y.i("The FunsData libraray has been initialized.")};var $e=function(){return r(function e(r,i){t(this,e),this.taLib=r,"Object"===_.paramType(i)&&"Boolean"===_.paramType(i.pageShow)?this.autoPageShow=i.pageShow:this.autoPageShow=!1,"Object"===_.paramType(i)&&"Boolean"===_.paramType(i.pageHide)?this.autoPageHide=i.pageHide:this.autoPageHide=!1},[{key:"start",value:function(){var t=this;t.trackPageShowEvent(),"onvisibilitychange"in document&&_.addEvent(document,"visibilitychange",function(){document.hidden?t.trackPageHideEvent():t.trackPageShowEvent()})}},{key:"trackPageShowEvent",value:function(){this.autoPageShow&&this.taLib.track("ta_page_show",_.info.pageProperties()),this.taLib.timeEvent("ta_page_hide")}},{key:"trackPageHideEvent",value:function(){this.autoPageHide&&this.taLib.trackWithBeacon("ta_page_hide",_.info.pageProperties())}},{key:"trackPageHideEventOnClose",value:function(){this.autoPageHide&&this.isPageShow&&this.taLib.trackWithBeacon("ta_page_hide",_.info.pageProperties())}}])}();Ke.prototype.initInstance=function(t,e){if(!_.check.isString(t)||!_.check.isUndefined(e)&&!_.check.isObject(e))return y.w("invalid parameter of initInstance(string, object)."),null;if(this._getConfig("_name")!==qe)return y.w("This function is allowed for master instance only"),null;if(t===qe||this[t])return y.w("The name ",t," couldn't be used for create new instance."),null;_.check.isUndefined(e)&&(e={});var r=new Ke,i=_.extend({},this.config,{_name:t,persistenceEnabled:!1,uuid:this.getDeviceId()},e);i.persistenceEnabled&&(i.persistencePrefix=i.persistencePrefix+"_"+t),r.init(i),this[t]=r},Ke.prototype.enableTracking=function(t){"boolean"==typeof t&&this.persistence.setEnableTracking(t)},Ke.prototype.optOutTracking=function(){this.persistence.setSuperProperties({}),this.persistence.setAccountId(""),this.persistence.clearEventTimer(),this.persistence.setOptTracking(!1)},Ke.prototype.optInTracking=function(){this.persistence.setOptTracking(!0)},Ke.prototype.setTrackStatus=function(t){if(_.check.isObject(t)){var e=t.status;y.i("swtich track status : "+e),"pause"===e?this.enableTracking(!1):"stop"===e?this.optOutTracking():"normal"===e&&(this.enableTracking(!0),this.optInTracking())}};var We={};return We.getPartUrl=function(t){var e=this.option.length;if(e)for(var r=0;r<e;r++)if(t.indexOf(this.option[r].part_url)>-1)return!0;return!1},We.getPartHash=function(t){var e=this.option.length;if(e)for(var r=0;r<e;r++)if(t.indexOf(this.option[r].part_url)>-1)return this.option[r].after_hash;return!1},We.getCurrenId=function(){var t=this.ta.getDistinctId();return encodeURIComponent("d"+t)},We.rewriteUrl=function(t,e){var r=/([^?#]+)(\?[^#]*)?(#.*)?/.exec(t),i="";if(r){var n,s=r[1]||"",o=r[2]||"",a=r[3]||"";if(this.getPartHash(t))n=a.indexOf("_tasdk"),i=a.indexOf("?")>-1?n>-1?s+o+"#"+a.substring(1,n)+"_tasdk="+this.getCurrenId():s+o+"#"+a.substring(1)+"&_tasdk="+this.getCurrenId():s+o+"#"+a.substring(1)+"?_tasdk="+this.getCurrenId();else n=o.indexOf("_tasdk"),i=/^\?(\w)+/.test(o)?n>-1?s+"?"+o.substring(1,n)+"_tasdk="+this.getCurrenId()+a:s+"?"+o.substring(1)+"&_tasdk="+this.getCurrenId()+a:s+"?"+o.substring(1)+"_tasdk="+this.getCurrenId()+a;return e&&(e.href=i),i}},We.addClickListen=function(){var t=this,e=function(e){var r,i,n=e.target,s=n.tagName.toLowerCase(),o=n.parentNode;if("a"===s&&n.href||o&&o.tagName&&"a"===o.tagName.toLowerCase()&&o.href){"a"===s&&n.href?(r=n.href,i=n):(r=o.href,i=o);var a=_.URL(r).protocol;"http:"!==a&&"https:"!==a||t.getPartUrl(r)&&t.rewriteUrl(r,i)}};_.addSiteEvent(document,"mousedown",e),window.PointerEvent&&"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>=0&&_.addSiteEvent(document,"pointerdown",e)},We.getUrlId=function(){var t=location.href.match(/_tasdk=([aufd][^\?\#\&\=]+)/);return _.check.isArray(t)&&t[1]?decodeURIComponent(t[1]):""},We.setRefferId=function(){var t=this.ta.getDistinctId(),e=this.getUrlId();if(""===e)return!1;var r="d"===e.substring(0,1);if((e=e.substring(1))===t)return!1;e&&r&&this.ta.identify(e)},We.init=function(t,e){this.isInited||(this.isInited=!0,this.ta=t,this.setRefferId(),_.check.isObject(e)&&_.check.isArray(e.linker)&&e.linker.length>0&&(this.addClickListen(),this.option=e.linker,this.option=function(t){for(var e=t.length,r=[],i=0;i<e;i++)/[A-Za-z0-9]+\./.test(t[i].part_url)&&"[object Boolean]"===Object.prototype.toString.call(t[i].after_hash)?r.push(t[i]):y.w("The configuration of linker "+(i+1)+" is not supported.Please check format");return r}(this.option)))},new Ke});
|