@bi_funsdata/js-sdk 1.0.2 → 1.0.3-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 +4 -0
- package/dist/esm.min.js +1 -1
- package/dist/umd.min.js +2 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/esm.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{JSEncrypt as t}from"jsencrypt";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t){return r="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},r(t)}function n(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function i(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,n(i.key),i)}}function s(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o,c="1.0.2",h=Array.prototype,u=Object.prototype,l=h.slice,p=u.toString,f=u.hasOwnProperty,d=h.forEach,_={},g=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],m={};m.each=function(t,e,r){if(null!==t)if(d&&t.forEach===d)t.forEach(e,r);else if(t.length===+t.length){for(var n=0,i=t.length;n<i;n++)if(n in t&&e.call(r,t[n],n,t)===_)return}else for(var s in t)if(f.call(t,s)&&e.call(r,t[s],s,t)===_)return},m.extend=function(t){return m.each(l.call(arguments,1),(function(e){for(var r in e)void 0!==e[r]&&(t[r]=e[r])})),t},m.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},m.formatTimeZone=function(t,e){if("number"!=typeof e)return t;var r=t.getTime(),n=6e4*t.getTimezoneOffset();return new Date(r+n+36e5*e)},m.formatJsonString=function(t){try{return JSON.stringify(t,null,8)}catch(e){return JSON.stringify(t)}},m.searchObjDate=function(t,e){(m.check.isObject(t)||m.check.isArray(t))&&m.each(t,(function(r,n){m.check.isObject(r)||m.check.isArray(r)?m.searchObjDate(t[n],e):m.check.isDate(r)&&(t[n]=m.formatDate(m.formatTimeZone(r,e)))}))},m.check={isUndefined:function(t){return void 0===t},isObject:function(t){return"[object Object]"===p.call(t)&&null!==t},isEmptyObject:function(t){if(m.check.isObject(t)){for(var e in t)if(f.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}},m.UUID=(o=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=o()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var t,e,r=navigator.userAgent,n=[],i=0;function s(t,e){var r,i=0;for(r=0;r<e.length;r++)i|=n[r]<<8*r;return t^i}for(t=0;t<r.length;t++)e=r.charCodeAt(t),n.unshift(255&e),n.length>=4&&(i=s(i,n),n=[]);return n.length>0&&(i=s(i,n)),i.toString(16)}()+"-"+t+"-"+o();return e||(String(Math.random())+String(Math.random())+String(Math.random())).slice(2,15)}),m.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)}))},m.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:"")},m.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,e){var r=t.charAt(0),n=e.split(r);return r===t?n:n[(t=parseInt(t.substring(1),10))<0?n.length+t:t-1]}function r(t,e){for(var r,n=t.charAt(0),i=e.split("&"),s=[],a={},o=[],c=t.substring(1),h=0,u=i.length;h<u;h++)if((s=i[h].match(/(.*?)=(.*)/))||(s=[i[h],i[h],""]),""!==s[1].replace(/\s/g,"")){if(s[2]=(r=s[2]||"",m.decodeURIComponent(r.replace(/\+/g," "))),c===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 n===t?a:a[c]}return function(n,i){var s,a={};if("tld?"===n)return t();if(i=i||window.location.toString(),!n)return i;if(n=n.toString(),s=i.match(/^mailto:([^\/].+)/))a.protocol="mailto",a.email=s[1];else{if((s=i.match(/(.*?)\/#\!(.*)/))&&(i=s[1]+s[2]),(s=i.match(/(.*?)#(.*)/))&&(a.hash=s[2],i=s[1]),a.hash&&n.match(/^#/))return r(n,a.hash);if((s=i.match(/(.*?)\?(.*)/))&&(a.query=s[2],i=s[1]),a.query&&n.match(/^\?/))return r(n,a.query);if((s=i.match(/(.*?)\:?\/\/(.*)/))&&(a.protocol=s[1].toLowerCase(),i=s[2]),(s=i.match(/(.*?)(\/.*)/))&&(a.path=s[2],i=s[1]),a.path=(a.path||"").replace(/^([^\/])/,"/$1").replace(/\/$/,""),n.match(/^[\-0-9]+$/)&&(n=n.replace(/^([^\/])/,"/$1")),n.match(/^\//))return e(n,a.path.substring(1));if((s=e("/-1",a.path.substring(1)))&&(s=s.match(/(.*?)\.(.*)/))&&(a.file=s[0],a.filename=s[1],a.fileext=s[2]),(s=i.match(/(.*)\:([0-9]+)$/))&&(a.port=s[2],i=s[1]),(s=i.match(/(.*?)@(.*)/))&&(a.auth=s[1],i=s[2]),a.auth&&(s=a.auth.match(/(.*)\:(.*)/),a.user=s?s[1]:a.auth,a.pass=s?s[2]:void 0),a.hostname=i.toLowerCase(),"."===n.charAt(0))return e(n,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 n in a?a[n]:"{}"===n?a:""}}(),m.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|=0;return e},m.decodeURIComponent=function(t){var e="";try{e=decodeURIComponent(t)}catch(r){e=t}return e},m.encodeURIComponent=function(t){var e="";try{e=encodeURIComponent(t)}catch(r){e=t}return e},m.utf8Encode=function(t){var e,r,n,i,s="";for(e=r=0,n=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<n;i++){var a=t.charCodeAt(i),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=i+1)}return r>e&&(s+=t.substring(e,t.length)),s},m.base64Encode=function(t){var e,r,n,i,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,c=0,h="",u=[];if(!t)return t;t=m.utf8Encode(t);do{e=(s=t.charCodeAt(o++)<<16|t.charCodeAt(o++)<<8|t.charCodeAt(o++))>>18&63,r=s>>12&63,n=s>>6&63,i=63&s,u[c++]=a.charAt(e)+a.charAt(r)+a.charAt(n)+a.charAt(i)}while(o<t.length);switch(h=u.join(""),t.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"="}return h},m.cookie={get:function(t){for(var e=t+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return m.decodeURIComponent(i.substring(e.length,i.length))}return null},set:function(t,e,r,n,i){var s="",a="",o="";if(r=null===r?73e3:r,n){var c=m.url("domain",location.href);s=c?"; domain=."+c:""}if(r){var h=new Date;"s"===String(r).slice(-1)?h.setTime(h.getTime()+1e3*Number(String(r).slice(0,-1))):h.setTime(h.getTime()+24*r*60*60*1e3),a="; expires="+h.toGMTString()}i&&(o="; secure");var u=t+"="+encodeURIComponent(e)+a+"; path=/"+s+o;return document.cookie=u,u},remove:function(t,e){m.cookie.set(t,"",-1,e)}},m.localStorage={get:function(t){try{return window.localStorage.getItem(t)}catch(t){m.localStorage.error(t)}},parse:function(t){var e;try{e=JSON.parse(m.localStorage.get(t))||null}catch(t){m.localStorage.error(t)}return e},set:function(t,e){try{window.localStorage.setItem(t,e)}catch(t){m.localStorage.error(t)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(t){m.localStorage.error(t)}},error:function(t){console.error("localStorage error: "+t)},isSupported:function(){var t=!0;try{var e="__funsdatasupport__",r="testIsSupportStorage";m.localStorage.set(e,r),m.localStorage.get(e)!==r&&(t=!1),m.localStorage.remove(e)}catch(e){t=!1}return t}},m.stripEmptyProperties=function(t){var e={};return m.each(t,(function(t,r){m.check.isString(t)&&t.length>0&&(e[r]=t)})),e},m.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 n=e.match(/trident\/([\d.]+)/)?e.match(/trident\/([\d.]+)/)[1]:"",i=e.match(/msie ([\d.]+)/)?e.match(/msie ([\d.]+)/)[1]:"";""!==n?t.version=String(parseInt(n)+4):""!==i&&(t.version=i)}else r&&(t.version=e.match(r[0])?e.match(r[0])[1]:"")}catch(t){v.w("getting browser info failed due to ",t)}return t},properties:function(){var t=m.info.browser();return m.extend({"#os":m.info.os(),"#lib_version":c,"#lib":"js","#screen_height":screen.height,"#screen_width":screen.width,"#browser":t.type,"#browser_version":t.version,"#system_language":m.check.isString(navigator.languages[1])?navigator.languages[1].toLowerCase():"Value exception","#ua":m.check.isString(navigator.userAgent)?navigator.userAgent.toLowerCase():"Value exception","#utm":m.getUtm()})},pageProperties:function(){var t=m.getReferrer();return m.stripEmptyProperties({"#referrer":t,"#referrer_host":t?m.url("hostname",t):t,"#url":location.href,"#url_path":location.pathname,"#title":document.title})}},m.getUtm=function(){var t={};return m.each(g,(function(e){var r=m.getQueryParam(location.href,e);r.length&&(t[e]=r)})),JSON.stringify(t)},m.getQueryParam=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),t=m.decodeURIComponent(t);var r=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===r||r&&"string"!=typeof r[1]&&r[1].length?"":m.decodeURIComponent(r[1])},m.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)},m.createAesKey=function(){return m.createString(16)},m.generateEncryptyData=function(t,e){if(void 0===e)return t;var r=e.publicKey,n=e.version;if(void 0===r||void 0===n)return t;if("undefined"==typeof CryptoJS||"undefined"==typeof JSEncrypt)return t;var i=m.createAesKey();try{var s=CryptoJS.enc.Utf8.parse(i),a=CryptoJS.enc.Utf8.parse(JSON.stringify(t)),o=CryptoJS.AES.encrypt(a,s,{mode:CryptoJS.mode.ECB,padding:CryptoJS.pad.Pkcs7}).toString(),c=new JSEncrypt;c.setPublicKey(r);var h=c.encrypt(i);return!1===h?(v.w("encryption failed"),t):{pkv:n,ekey:h,payload:o}}catch(t){v.w("encryption failed")}return t},m.paramType=function(t){return Object.prototype.toString.call(t).replace("[object ","").replace("]","")},m.addEvent=function(t,e,r,n){if(document.addEventListener)if("Array"!==this.paramType(t)&&"HTMLCollection"!==this.paramType(t)||!t.length||t===window)t.addEventListener(e,r,n);else for(var i=0;i<t.length;i++)this.addEvent(t[i],e,r,n);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)}))},m.getRandom=function(){return(new Date).getTime()+"_"+Math.floor(1e6*Math.random())},m.safeJSONParse=function(t){var e=null;try{e=JSON.parse(t)}catch(e){return t}return e},m.saveObjectVal=function(t,e){m.check.isString(e)||(e=JSON.stringify(e)),m.localStorage.set(t,e)},m.readObjectVal=function(t){var e=m.localStorage.get(t);return e?m.safeJSONParse(e):null},m.indexOf=function(t,e){var r=t.indexOf;if(r)return r.call(t,e);for(var n=0;n<t.length;n++)if(e===t[n])return n;return-1},m.hasEncrypty=function(t){return!!m.check.isObject()&&("undefined"!==t.pkv&&"undefined"!==t.ekey&&"undefined"!==t.payload)},m.addSiteEvent=function(t,e,r,n){function i(t){return t&&(t.preventDefault=i.preventDefault,t.stopPropagation=i.stopPropagation,t._getPath=i._getPath),t}i._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};i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0};(function(t,e,r){if(void 0===n&&"click"===e&&(n=!0),t&&t.addEventListener)t.addEventListener(e,(function(t){t._getPath=i._getPath,r.call(this,t)}),n);else{var s="on"+e,a=t[s];t[s]=function(t,e,r,n){var s=function(s){if(s=s||i(window.event)){s.target=s.srcElement;var a,o,c=!0;return"function"==typeof r&&(a=r(s)),o=e.call(t,s),"beforeunload"!==n?(!1!==a&&!1!==o||(c=!1),c):void 0}};return s}(t,r,a,e)}}).apply(null,arguments)},m.getURLSearchParams=function(t){for(var e={},r=(t=t||"").substring(1).split("&"),n=0;n<r.length;n++){var i=r[n].indexOf("=");if(-1!==i){var s=r[n].substring(0,i),a=r[n].substring(i+1);s=m.decodeURIComponent(s),a=m.decodeURIComponent(a),e[s]=a}}return e},m.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"!==r(t))return!1;var e=this._values.QueryString||"";for(var n in t)e=new RegExp(n+"[^&]+").test(e)?e.replace(new RegExp(n+"[^&]+"),n+"="+t[n]):"&"===e.slice(-1)?e+n+"="+t[n]:""===e?n+"="+t[n]:e+"&"+n+"="+t[n];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||v.i("URLParser::_parse -> Invalid URL");var r=t.split("#"),n=r[0],i=r.slice(1).join("#");for(var s in e=this._regex.exec(n),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=i},new e(t)},m.trim=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},m.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=m.getURLSearchParams(r.search),{get:function(t){return e[t]}}));else{m.check.isString(t)||(t=String(t)),t=m.trim(t);if(!1===/^https?:\/\/.+/.test(t))return void v.w("Invalid URL");var n=m.urlParse(t);r.hash=n._values.Fragment,r.host=n._values.Host?n._values.Host+(n._values.Port?":"+n._values.Port:""):"",r.href=n._values.URL,r.password=n._values.Password,r.pathname=n._values.Path,r.port=n._values.Port,r.search=n._values.QueryString?"?"+n._values.QueryString:"",r.username=n._values.Username,r.hostname=n._values.Hostname,r.protocol=n._values.Protocol?n._values.Protocol+":":"",r.origin=n._values.Origin?n._values.Origin+(n._values.Port?":"+n._values.Port:""):"",r.searchParams=function(){var t=m.getURLSearchParams("?"+n._values.QueryString);return{get:function(e){return t[e]}}}()}return r},m.normalizeTopLevelKeys=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("object"!==r(t)||null===t||Array.isArray(t))return{};var n={};for(var i in t){if(Object.hasOwnProperty.call(t,i))n[e&&Object.keys(m.info.pageProperties()).includes(i)?i:i.replace(/^#+/,"").toLowerCase()]=t[i]}return n};var v=function(){return s((function t(){e(this,t)}),null,[{key:"i",value:function(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=m.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":r(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]=m.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":r(console))&&console.warn)try{return console.warn.apply(console,arguments)}catch(t){console.warn(arguments[0])}}}])}(),y=/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/,b=function(){return s((function t(){e(this,t)}),null,[{key:"stripProperties",value:function(t){return m.check.isObject(t)?(m.each(t,(function(t,e){m.check.isString(t)||m.check.isNumber(t)||m.check.isDate(t)||m.check.isBoolean(t)||m.check.isArray(t)||m.check.isObject(t)||v.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 m.each(t,(function(t,r){y.test(r)||(v.w("invalid key: "+r),e=!1)})),e}},{key:"event",value:function(t){return!(!m.check.isString(t)||!y.test(t))||(v.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!(!m.check.isString(t)||!y.test(t))||(v.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||!!m.check.isObject(t)&&(!!this._checkPropertiesKey(t)||(v.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||!m.check.isObject(t)||m.check.isEmptyObject(t)?(v.w("properties must be objects and have values"),!1):!!this._checkPropertiesKey(t)||(v.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!(!m.check.isString(t)||!/^.{1,63}$/.test(t))||(v.w("User id must be a string that cannot be empty and is less than 64 bits"),!1)}}])}(),w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function k(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var S,x,C,z,P,O,E,D,A,I,T={},U={},R={};function B(){if(S)return R;S=1;function t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=256,r=286,n=30,i=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]),a=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]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=new Array(576);t(h);const u=new Array(60);t(u);const l=new Array(512);t(l);const p=new Array(256);t(p);const f=new Array(29);t(f);const d=new Array(n);function _(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let g,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},k=(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)=>{k(t,r[2*e],r[2*e+1])},C=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},z=(t,e,r)=>{const n=new Array(16);let s,a,o=0;for(s=1;s<=i;s++)o=o+r[s-1]<<1,n[s]=o;for(a=0;a<=e;a++){let e=t[2*a+1];0!==e&&(t[2*a]=C(n[e]++,e))}},P=t=>{let e;for(e=0;e<r;e++)t.dyn_ltree[2*e]=0;for(e=0;e<n;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},E=(t,e,r,n)=>{const i=2*e,s=2*r;return t[i]<t[s]||t[i]===t[s]&&n[e]<=n[r]},D=(t,e,r)=>{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i<t.heap_len&&E(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!E(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n},A=(t,r,n)=>{let i,o,c,h,u=0;if(0!==t.sym_next)do{i=255&t.pending_buf[t.sym_buf+u++],i+=(255&t.pending_buf[t.sym_buf+u++])<<8,o=t.pending_buf[t.sym_buf+u++],0===i?x(t,o,r):(c=p[o],x(t,c+e+1,r),h=s[c],0!==h&&(o-=f[c],k(t,o,h)),i--,c=b(i),x(t,c,n),h=a[c],0!==h&&(i-=d[c],k(t,i,h)))}while(u<t.sym_next);x(t,256,r)},I=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,a=e.stat_desc.elems;let o,c,h,u=-1;for(t.heap_len=0,t.heap_max=573,o=0;o<a;o++)0!==r[2*o]?(t.heap[++t.heap_len]=u=o,t.depth[o]=0):r[2*o+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=u<2?++u:0,r[2*h]=1,t.depth[h]=0,t.opt_len--,s&&(t.static_len-=n[2*h+1]);for(e.max_code=u,o=t.heap_len>>1;o>=1;o--)D(t,r,o);h=a;do{o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],D(t,r,1),c=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=c,r[2*h]=r[2*o]+r[2*c],t.depth[h]=(t.depth[o]>=t.depth[c]?t.depth[o]:t.depth[c])+1,r[2*o+1]=r[2*c+1]=h,t.heap[1]=h++,D(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,h=e.stat_desc.max_length;let u,l,p,f,d,_,g=0;for(f=0;f<=i;f++)t.bl_count[f]=0;for(r[2*t.heap[t.heap_max]+1]=0,u=t.heap_max+1;u<573;u++)l=t.heap[u],f=r[2*r[2*l+1]+1]+1,f>h&&(f=h,g++),r[2*l+1]=f,l>n||(t.bl_count[f]++,d=0,l>=c&&(d=o[l-c]),_=r[2*l],t.opt_len+=_*(f+d),a&&(t.static_len+=_*(s[2*l+1]+d)));if(0!==g){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]--,g-=2}while(g>0);for(f=h;0!==f;f--)for(l=t.bl_count[f];0!==l;)p=t.heap[--u],p>n||(r[2*p+1]!==f&&(t.opt_len+=(f-r[2*p+1])*r[2*p],r[2*p+1]=f),l--)}})(t,e),z(r,u,t.bl_count)},T=(t,e,r)=>{let n,i,s=-1,a=e[1],o=0,c=7,h=4;for(0===a&&(c=138,h=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++o<c&&i===a||(o<h?t.bl_tree[2*i]+=o:0!==i?(i!==s&&t.bl_tree[2*i]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=i,0===a?(c=138,h=3):i===a?(c=6,h=3):(c=7,h=4))},U=(t,e,r)=>{let n,i,s=-1,a=e[1],o=0,c=7,h=4;for(0===a&&(c=138,h=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++o<c&&i===a)){if(o<h)do{x(t,i,t.bl_tree)}while(0!=--o);else 0!==i?(i!==s&&(x(t,i,t.bl_tree),o--),x(t,16,t.bl_tree),k(t,o-3,2)):o<=10?(x(t,17,t.bl_tree),k(t,o-3,3)):(x(t,18,t.bl_tree),k(t,o-11,7));o=0,s=i,0===a?(c=138,h=3):i===a?(c=6,h=3):(c=7,h=4)}};let B=!1;const j=(t,e,r,n)=>{k(t,0+(n?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 R._tr_init=t=>{B||((()=>{let t,e,c,y,b;const w=new Array(16);for(c=0,y=0;y<28;y++)for(f[y]=c,t=0;t<1<<s[y];t++)p[c++]=y;for(p[c-1]=y,b=0,y=0;y<16;y++)for(d[y]=b,t=0;t<1<<a[y];t++)l[b++]=y;for(b>>=7;y<n;y++)for(d[y]=b<<7,t=0;t<1<<a[y]-7;t++)l[256+b++]=y;for(e=0;e<=i;e++)w[e]=0;for(t=0;t<=143;)h[2*t+1]=8,t++,w[8]++;for(;t<=255;)h[2*t+1]=9,t++,w[9]++;for(;t<=279;)h[2*t+1]=7,t++,w[7]++;for(;t<=287;)h[2*t+1]=8,t++,w[8]++;for(z(h,287,w),t=0;t<n;t++)u[2*t+1]=5,u[2*t]=C(t,5);g=new _(h,s,257,r,i),m=new _(u,a,0,n,i),v=new _(new Array(0),o,0,19,7)})(),B=!0),t.l_desc=new y(t.dyn_ltree,g),t.d_desc=new y(t.dyn_dtree,m),t.bl_desc=new y(t.bl_tree,v),t.bi_buf=0,t.bi_valid=0,P(t)},R._tr_stored_block=j,R._tr_flush_block=(t,r,n,i)=>{let s,a,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let r,n=4093624447;for(r=0;r<=31;r++,n>>>=1)if(1&n&&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)),I(t,t.l_desc),I(t,t.d_desc),o=(t=>{let e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),s=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=s&&(s=a)):s=a=n+5,n+4<=s&&-1!==r?j(t,r,n,i):4===t.strategy||a===s?(k(t,2+(i?1:0),3),A(t,h,u)):(k(t,4+(i?1:0),3),((t,e,r,n)=>{let i;for(k(t,e-257,5),k(t,r-1,5),k(t,n-4,4),i=0;i<n;i++)k(t,t.bl_tree[2*c[i]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),A(t,t.dyn_ltree,t.dyn_dtree)),P(t),i&&O(t)},R._tr_tally=(t,r,n)=>(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++]=n,0===r?t.dyn_ltree[2*n]++:(t.matches++,r--,t.dyn_ltree[2*(p[n]+e+1)]++,t.dyn_dtree[2*b(r)]++),t.sym_next===t.sym_end),R._tr_align=t=>{k(t,2,3),x(t,256,h),(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)},R}function j(){return E?O:(E=1,O={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 A?D:(A=1,D={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 N(){if(I)return U;I=1;const{_tr_init:t,_tr_stored_block:e,_tr_flush_block:r,_tr_tally:n,_tr_align:i}=B(),s=C?x:(C=1,x=(t,e,r,n)=>{let i=65535&t,s=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+e[n++]|0,s=s+i|0}while(--a);i%=65521,s%=65521}return i|s<<16}),a=function(){if(P)return z;P=1;const t=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());return z=(e,r,n,i)=>{const s=t,a=i+n;e^=-1;for(let t=i;t<a;t++)e=e>>>8^s[255&(e^r[t])];return~e}}(),o=j(),{Z_NO_FLUSH:c,Z_PARTIAL_FLUSH:h,Z_FULL_FLUSH:u,Z_FINISH:l,Z_BLOCK:p,Z_OK:f,Z_STREAM_END:d,Z_STREAM_ERROR:_,Z_DATA_ERROR:g,Z_BUF_ERROR:m,Z_DEFAULT_COMPRESSION:v,Z_FILTERED:y,Z_HUFFMAN_ONLY:b,Z_RLE:w,Z_FIXED:k,Z_DEFAULT_STRATEGY:S,Z_UNKNOWN:O,Z_DEFLATED:E}=L(),D=258,A=262,T=42,R=113,N=666,M=(t,e)=>(t.msg=o[e],e),H=t=>2*t-(t>4?9:0),F=t=>{let e=t.length;for(;--e>=0;)t[e]=0},q=t=>{let e,r,n,i=t.w_size;e=t.hash_size,n=e;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);e=i,n=e;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)};let Z=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const J=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))},K=(t,e)=>{r(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,J(t.strm)},W=(t,e)=>{t.pending_buf[t.pending++]=e},V=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},X=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=s(t.adler,e,i,r):2===t.state.wrap&&(t.adler=a(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Q=(t,e)=>{let r,n,i=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match;const c=t.strstart>t.w_size-A?t.strstart-(t.w_size-A):0,h=t.window,u=t.w_mask,l=t.prev,p=t.strstart+D;let f=h[s+a-1],d=h[s+a];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(r=e,h[r+a]===d&&h[r+a-1]===f&&h[r]===h[s]&&h[++r]===h[s+1]){s+=2,r++;do{}while(h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&s<p);if(n=D-(p-s),s=p-D,n>a){if(t.match_start=e,a=n,n>=o)break;f=h[s+a-1],d=h[s+a]}}}while((e=l[e&u])>c&&0!=--i);return a<=t.lookahead?a:t.lookahead},$=t=>{const e=t.w_size;let r,n,i;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-A)&&(t.window.set(t.window.subarray(e,e+e-n),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),q(t),n+=e),0===t.strm.avail_in)break;if(r=X(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=Z(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=Z(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<A&&0!==t.strm.avail_in)},Y=(t,r)=>{let n,i,s,a=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,o=0,h=t.strm.avail_in;do{if(n=65535,s=t.bi_valid+42>>3,t.strm.avail_out<s)break;if(s=t.strm.avail_out-s,i=t.strstart-t.block_start,n>i+t.strm.avail_in&&(n=i+t.strm.avail_in),n>s&&(n=s),n<a&&(0===n&&r!==l||r===c||n!==i+t.strm.avail_in))break;o=r===l&&n===i+t.strm.avail_in?1:0,e(t,0,0,o),t.pending_buf[t.pending-4]=n,t.pending_buf[t.pending-3]=n>>8,t.pending_buf[t.pending-2]=~n,t.pending_buf[t.pending-1]=~n>>8,J(t.strm),i&&(i>n&&(i=n),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,n-=i),n&&(X(t.strm,t.strm.output,t.strm.next_out,n),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n)}while(0===o);return h-=t.strm.avail_in,h&&(h>=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<=h&&(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-h,t.strm.next_in),t.strstart),t.strstart+=h,t.insert+=h>t.w_size-t.insert?t.w_size-t.insert:h),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),o?4:r!==c&&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&&(X(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,a=s>t.w_size?t.w_size:s,i=t.strstart-t.block_start,(i>=a||(i||r===l)&&r!==c&&0===t.strm.avail_in&&i<=s)&&(n=i>s?s:i,o=r===l&&0===t.strm.avail_in&&n===i?1:0,e(t,t.block_start,n,o),t.block_start+=n,J(t.strm)),o?3:1)},G=(t,e)=>{let r,i;for(;;){if(t.lookahead<A){if($(t),t.lookahead<A&&e===c)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Z(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-A&&(t.match_length=Q(t,r)),t.match_length>=3)if(i=n(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=Z(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=Z(t,t.ins_h,t.window[t.strstart+1]);else i=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(K(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2},tt=(t,e)=>{let r,i,s;for(;;){if(t.lookahead<A){if($(t),t.lookahead<A&&e===c)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Z(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-A&&(t.match_length=Q(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,i=n(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=Z(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++,i&&(K(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=n(t,0,t.window[t.strstart-1]),i&&K(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&&(i=n(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2};function et(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const rt=[new et(0,0,0,0,Y),new et(4,4,8,4,G),new et(4,5,16,8,G),new et(4,6,32,32,G),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 nt(){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=E,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),F(this.dyn_ltree),F(this.dyn_dtree),F(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),F(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),F(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 it=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==T&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==R&&e.status!==N?1:0},st=e=>{if(it(e))return M(e,_);e.total_in=e.total_out=0,e.data_type=O;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?T:R,e.adler=2===r.wrap?0:1,r.last_flush=-2,t(r),f},at=t=>{const e=st(t);var r;return e===f&&((r=t.state).window_size=2*r.w_size,F(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},ot=(t,e,r,n,i,s)=>{if(!t)return _;let a=1;if(e===v&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||r!==E||n<8||n>15||e<0||e>9||s<0||s>k||8===n&&1!==a)return M(t,_);8===n&&(n=9);const o=new nt;return t.state=o,o.strm=t,o.status=T,o.wrap=a,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),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<<i+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,at(t)};return U.deflateInit=(t,e)=>ot(t,e,E,15,8,S),U.deflateInit2=ot,U.deflateReset=at,U.deflateResetKeep=st,U.deflateSetHeader=(t,e)=>it(t)||2!==t.state.wrap?_:(t.state.gzhead=e,f),U.deflate=(t,r)=>{if(it(t)||r>p||r<0)return t?M(t,_):_;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?m:_);const o=s.last_flush;if(s.last_flush=r,0!==s.pending){if(J(t),0===t.avail_out)return s.last_flush=-1,f}else if(0===t.avail_in&&H(r)<=H(o)&&r!==l)return M(t,m);if(s.status===N&&0!==t.avail_in)return M(t,m);if(s.status===T&&0===s.wrap&&(s.status=R),s.status===T){let e=E+(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,V(s,e),0!==s.strstart&&(V(s,t.adler>>>16),V(s,65535&t.adler)),t.adler=1,s.status=R,J(t),0!==s.pending)return s.last_flush=-1,f}if(57===s.status)if(t.adler=0,W(s,31),W(s,139),W(s,8),s.gzhead)W(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)),W(s,255&s.gzhead.time),W(s,s.gzhead.time>>8&255),W(s,s.gzhead.time>>16&255),W(s,s.gzhead.time>>24&255),W(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),W(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(W(s,255&s.gzhead.extra.length),W(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=a(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(W(s,0),W(s,0),W(s,0),W(s,0),W(s,0),W(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),W(s,3),s.status=R,J(t),0!==s.pending)return s.last_flush=-1,f;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 n=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+n),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>e&&(t.adler=a(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex+=n,J(t),0!==s.pending)return s.last_flush=-1,f;e=0,r-=n}let n=new Uint8Array(s.gzhead.extra);s.pending_buf.set(n.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending+=r,s.gzhead.hcrc&&s.pending>e&&(t.adler=a(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=a(t.adler,s.pending_buf,s.pending-r,r)),J(t),0!==s.pending)return s.last_flush=-1,f;r=0}e=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,W(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=a(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=a(t.adler,s.pending_buf,s.pending-r,r)),J(t),0!==s.pending)return s.last_flush=-1,f;r=0}e=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,W(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=a(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&&(J(t),0!==s.pending))return s.last_flush=-1,f;W(s,255&t.adler),W(s,t.adler>>8&255),t.adler=0}if(s.status=R,J(t),0!==s.pending)return s.last_flush=-1,f}if(0!==t.avail_in||0!==s.lookahead||r!==c&&s.status!==N){let a=0===s.level?Y(s,r):s.strategy===b?((t,e)=>{let r;for(;;){if(0===t.lookahead&&($(t),0===t.lookahead)){if(e===c)return 1;break}if(t.match_length=0,r=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(K(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2})(s,r):s.strategy===w?((t,e)=>{let r,i,s,a;const o=t.window;for(;;){if(t.lookahead<=D){if($(t),t.lookahead<=D&&e===c)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(s=t.strstart-1,i=o[s],i===o[++s]&&i===o[++s]&&i===o[++s])){a=t.strstart+D;do{}while(i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&s<a);t.match_length=D-(a-s),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=n(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(K(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2})(s,r):rt[s.level].func(s,r);if(3!==a&&4!==a||(s.status=N),1===a||3===a)return 0===t.avail_out&&(s.last_flush=-1),f;if(2===a&&(r===h?i(s):r!==p&&(e(s,0,0,!1),r===u&&(F(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),J(t),0===t.avail_out))return s.last_flush=-1,f}return r!==l?f:s.wrap<=0?d:(2===s.wrap?(W(s,255&t.adler),W(s,t.adler>>8&255),W(s,t.adler>>16&255),W(s,t.adler>>24&255),W(s,255&t.total_in),W(s,t.total_in>>8&255),W(s,t.total_in>>16&255),W(s,t.total_in>>24&255)):(V(s,t.adler>>>16),V(s,65535&t.adler)),J(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?f:d)},U.deflateEnd=t=>{if(it(t))return _;const e=t.state.status;return t.state=null,e===R?M(t,g):f},U.deflateSetDictionary=(t,e)=>{let r=e.length;if(it(t))return _;const n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==T||n.lookahead)return _;if(1===i&&(t.adler=s(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(F(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const a=t.avail_in,o=t.next_in,c=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,$(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=Z(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,$(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=o,t.input=c,t.avail_in=a,n.wrap=i,f},U.deflateInfo="pako deflate (from Nodeca project)",U}var M,H={};var F,q,Z,J,K={};function W(){if(F)return K;F=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,K.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,s,a=t.length,o=0;for(i=0;i<a;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<a&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(o),s=0,i=0;s<o;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<a&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),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 K.buf2string=(r,n)=>{const i=n||r.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(r.subarray(0,n));let s,a;const o=new Array(2*i);for(a=0,s=0;s<i;){let t=r[s++];if(t<128){o[a++]=t;continue}let n=e[t];if(n>4)o[a++]=65533,s+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&s<i;)t=t<<6|63&r[s++],n--;n>1?o[a++]=65533:t<65536?o[a++]=t:(t-=65536,o[a++]=55296|t>>10&1023,o[a++]=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 n="";for(let t=0;t<r;t++)n+=String.fromCharCode(e[t]);return n})(o,a)},K.utf8border=(t,r)=>{(r=r||t.length)>t.length&&(r=t.length);let n=r-1;for(;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?r:n+e[t[n]]>r?n:r},K}var V=function(){if(J)return T;J=1;const t=N(),e=function(){if(M)return H;M=1;const t=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);return H.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const r in n)t(n,r)&&(e[r]=n[r])}}return e},H.flattenChunks=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,i=t.length;e<i;e++){let i=t[e];r.set(i,n),n+=i.length}return r},H}(),r=W(),n=j(),i=Z?q:(Z=1,q=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:a,Z_SYNC_FLUSH:o,Z_FULL_FLUSH:c,Z_FINISH:h,Z_OK:u,Z_STREAM_END:l,Z_DEFAULT_COMPRESSION:p,Z_DEFAULT_STRATEGY:f,Z_DEFLATED:d}=L();function _(a){this.options=e.assign({level:p,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:f},a||{});let o=this.options;o.raw&&o.windowBits>0?o.windowBits=-o.windowBits:o.gzip&&o.windowBits>0&&o.windowBits<16&&(o.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;let c=t.deflateInit2(this.strm,o.level,o.method,o.windowBits,o.memLevel,o.strategy);if(c!==u)throw new Error(n[c]);if(o.header&&t.deflateSetHeader(this.strm,o.header),o.dictionary){let e;if(e="string"==typeof o.dictionary?r.string2buf(o.dictionary):"[object ArrayBuffer]"===s.call(o.dictionary)?new Uint8Array(o.dictionary):o.dictionary,c=t.deflateSetDictionary(this.strm,e),c!==u)throw new Error(n[c]);this._dict_set=!0}}function g(t,e){const r=new _(e);if(r.push(t,!0),r.err)throw r.msg||n[r.err];return r.result}return _.prototype.push=function(e,n){const i=this.strm,p=this.options.chunkSize;let f,d;if(this.ended)return!1;for(d=n===~~n?n:!0===n?h:a,"string"==typeof e?i.input=r.string2buf(e):"[object ArrayBuffer]"===s.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(p),i.next_out=0,i.avail_out=p),(d===o||d===c)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(f=t.deflate(i,d),f===l)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),f=t.deflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===u;if(0!==i.avail_out){if(d>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},_.prototype.onData=function(t){this.chunks.push(t)},_.prototype.onEnd=function(t){t===u&&(this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},T.Deflate=_,T.deflate=g,T.deflateRaw=function(t,e){return(e=e||{}).raw=!0,g(t,e)},T.gzip=function(t,e){return(e=e||{}).gzip=!0,g(t,e)},T.constants=L(),T}(),X={exports:{}};var Q,$={exports:{}};function Y(){return Q||(Q=1,$.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!==w&&w.crypto&&(r=w.crypto),!r)try{r=require("crypto")}catch(t){}var n=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.")},i=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=i(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)}},c=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,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var s=0;s<i;s++){var a=r[s>>>2]>>>24-s%4*8&255;e[n+s>>>2]|=a<<24-(n+s)%4*8}else for(var o=0;o<i;o+=4)e[n+o>>>2]=r[o>>>2];return this.sigBytes+=i,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(n());return new c.init(e,t)}}),h=s.enc={},u=h.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var s=e[i>>>2]>>>24-i%4*8&255;n.push((s>>>4).toString(16)),n.push((15&s).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new c.init(r,e/2)}},l=h.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var s=e[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(s))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new c.init(r,e)}},p=h.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)))}},f=a.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,n=this._data,i=n.words,s=n.sigBytes,a=this.blockSize,o=s/(4*a),h=(o=e?t.ceil(o):t.max((0|o)-this._minBufferSize,0))*a,u=t.min(4*h,s);if(h){for(var l=0;l<h;l+=a)this._doProcessBlock(i,l);r=i.splice(0,h),n.sigBytes-=u}return new c.init(r,u)},clone:function(){var t=o.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});a.Hasher=f.extend({cfg:o.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.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}()),$.exports}var G;var tt,et=k(G?X.exports:(G=1,X.exports=function(t){return t.enc.Utf8}(Y()))),rt={exports:{}},nt={exports:{}};function it(){return tt?nt.exports:(tt=1,nt.exports=function(t){return function(){var e=t,r=e.lib.WordArray;function n(t,e,n){for(var i=[],s=0,a=0;a<e;a++)if(a%4){var o=n[t.charCodeAt(a-1)]<<a%4*2|n[t.charCodeAt(a)]>>>6-a%4*2;i[s>>>2]|=o<<24-s%4*8,s++}return r.create(i,s)}e.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp();for(var i=[],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++)i.push(n.charAt(a>>>6*(3-o)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(t){var e=t.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var s=0;s<r.length;s++)i[r.charCodeAt(s)]=s}var a=r.charAt(64);if(a){var o=t.indexOf(a);-1!==o&&(e=o)}return n(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64}(Y()))}var st,at={exports:{}};function ot(){return st||(st=1,at.exports=function(t){return function(e){var r=t,n=r.lib,i=n.WordArray,s=n.Hasher,a=r.algo,o=[];!function(){for(var t=0;t<64;t++)o[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=a.MD5=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var n=e+r,i=t[n];t[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var s=this._hash.words,a=t[e+0],c=t[e+1],f=t[e+2],d=t[e+3],_=t[e+4],g=t[e+5],m=t[e+6],v=t[e+7],y=t[e+8],b=t[e+9],w=t[e+10],k=t[e+11],S=t[e+12],x=t[e+13],C=t[e+14],z=t[e+15],P=s[0],O=s[1],E=s[2],D=s[3];P=h(P,O,E,D,a,7,o[0]),D=h(D,P,O,E,c,12,o[1]),E=h(E,D,P,O,f,17,o[2]),O=h(O,E,D,P,d,22,o[3]),P=h(P,O,E,D,_,7,o[4]),D=h(D,P,O,E,g,12,o[5]),E=h(E,D,P,O,m,17,o[6]),O=h(O,E,D,P,v,22,o[7]),P=h(P,O,E,D,y,7,o[8]),D=h(D,P,O,E,b,12,o[9]),E=h(E,D,P,O,w,17,o[10]),O=h(O,E,D,P,k,22,o[11]),P=h(P,O,E,D,S,7,o[12]),D=h(D,P,O,E,x,12,o[13]),E=h(E,D,P,O,C,17,o[14]),P=u(P,O=h(O,E,D,P,z,22,o[15]),E,D,c,5,o[16]),D=u(D,P,O,E,m,9,o[17]),E=u(E,D,P,O,k,14,o[18]),O=u(O,E,D,P,a,20,o[19]),P=u(P,O,E,D,g,5,o[20]),D=u(D,P,O,E,w,9,o[21]),E=u(E,D,P,O,z,14,o[22]),O=u(O,E,D,P,_,20,o[23]),P=u(P,O,E,D,b,5,o[24]),D=u(D,P,O,E,C,9,o[25]),E=u(E,D,P,O,d,14,o[26]),O=u(O,E,D,P,y,20,o[27]),P=u(P,O,E,D,x,5,o[28]),D=u(D,P,O,E,f,9,o[29]),E=u(E,D,P,O,v,14,o[30]),P=l(P,O=u(O,E,D,P,S,20,o[31]),E,D,g,4,o[32]),D=l(D,P,O,E,y,11,o[33]),E=l(E,D,P,O,k,16,o[34]),O=l(O,E,D,P,C,23,o[35]),P=l(P,O,E,D,c,4,o[36]),D=l(D,P,O,E,_,11,o[37]),E=l(E,D,P,O,v,16,o[38]),O=l(O,E,D,P,w,23,o[39]),P=l(P,O,E,D,x,4,o[40]),D=l(D,P,O,E,a,11,o[41]),E=l(E,D,P,O,d,16,o[42]),O=l(O,E,D,P,m,23,o[43]),P=l(P,O,E,D,b,4,o[44]),D=l(D,P,O,E,S,11,o[45]),E=l(E,D,P,O,z,16,o[46]),P=p(P,O=l(O,E,D,P,f,23,o[47]),E,D,a,6,o[48]),D=p(D,P,O,E,v,10,o[49]),E=p(E,D,P,O,C,15,o[50]),O=p(O,E,D,P,g,21,o[51]),P=p(P,O,E,D,S,6,o[52]),D=p(D,P,O,E,d,10,o[53]),E=p(E,D,P,O,w,15,o[54]),O=p(O,E,D,P,c,21,o[55]),P=p(P,O,E,D,y,6,o[56]),D=p(D,P,O,E,z,10,o[57]),E=p(E,D,P,O,m,15,o[58]),O=p(O,E,D,P,x,21,o[59]),P=p(P,O,E,D,_,6,o[60]),D=p(D,P,O,E,k,10,o[61]),E=p(E,D,P,O,f,15,o[62]),O=p(O,E,D,P,b,21,o[63]),s[0]=s[0]+P|0,s[1]=s[1]+O|0,s[2]=s[2]+E|0,s[3]=s[3]+D|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var s=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),r[14+(i+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,c=o.words,h=0;h<4;h++){var u=c[h];c[h]=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 h(t,e,r,n,i,s,a){var o=t+(e&r|~e&n)+i+a;return(o<<s|o>>>32-s)+e}function u(t,e,r,n,i,s,a){var o=t+(e&n|r&~n)+i+a;return(o<<s|o>>>32-s)+e}function l(t,e,r,n,i,s,a){var o=t+(e^r^n)+i+a;return(o<<s|o>>>32-s)+e}function p(t,e,r,n,i,s,a){var o=t+(r^(e|~n))+i+a;return(o<<s|o>>>32-s)+e}r.MD5=s._createHelper(c),r.HmacMD5=s._createHmacHelper(c)}(Math),t.MD5}(Y())),at.exports}var ct,ht={exports:{}},ut={exports:{}};function lt(){return ct?ut.exports:(ct=1,ut.exports=function(t){return r=(e=t).lib,n=r.WordArray,i=r.Hasher,s=e.algo,a=[],o=s.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],i=r[1],s=r[2],o=r[3],c=r[4],h=0;h<80;h++){if(h<16)a[h]=0|t[e+h];else{var u=a[h-3]^a[h-8]^a[h-14]^a[h-16];a[h]=u<<1|u>>>31}var l=(n<<5|n>>>27)+c+a[h];l+=h<20?1518500249+(i&s|~i&o):h<40?1859775393+(i^s^o):h<60?(i&s|i&o|s&o)-1894007588:(i^s^o)-899497514,c=o,o=s,s=i<<30|i>>>2,i=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+s|0,r[3]=r[3]+o|0,r[4]=r[4]+c|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(n+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=i._createHelper(o),e.HmacSHA1=i._createHmacHelper(o),t.SHA1;var e,r,n,i,s,a,o}(Y()))}var pt,ft={exports:{}};var dt;function _t(){return dt?ht.exports:(dt=1,ht.exports=function(t){return function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,s=e.algo,a=s.MD5,o=s.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r,n=this.cfg,s=n.hasher.create(),a=i.create(),o=a.words,c=n.keySize,h=n.iterations;o.length<c;){r&&s.update(r),r=s.update(t).finalize(e),s.reset();for(var u=1;u<h;u++)r=s.finalize(r),s.reset();a.concat(r)}return a.sigBytes=4*c,a}});e.EvpKDF=function(t,e,r){return o.create(r).compute(t,e)}}(),t.EvpKDF}(Y(),lt(),pt||(pt=1,ft.exports=(e=(t=Y()).lib.Base,r=t.enc.Utf8,void(t.algo.HMAC=e.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=r.parse(e));var n=t.blockSize,i=4*n;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var s=this._oKey=e.clone(),a=this._iKey=e.clone(),o=s.words,c=a.words,h=0;h<n;h++)o[h]^=1549556828,c[h]^=909522486;s.sigBytes=a.sigBytes=i,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))}}))))));var t,e,r}var gt,mt={exports:{}};var vt;var yt=(vt||(vt=1,rt.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,n=e.algo,i=[],s=[],a=[],o=[],c=[],h=[],u=[],l=[],p=[],f=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var r=0,n=0;for(e=0;e<256;e++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[r]=d,s[d]=r;var _=t[r],g=t[_],m=t[g],v=257*t[d]^16843008*d;a[r]=v<<24|v>>>8,o[r]=v<<16|v>>>16,c[r]=v<<8|v>>>24,h[r]=v,v=16843009*m^65537*g^257*_^16843008*r,u[d]=v<<24|v>>>8,l[d]=v<<16|v>>>16,p[d]=v<<8|v>>>24,f[d]=v,r?(r=_^t[t[t[m^_]]],n^=t[t[n]]):r=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],_=n.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,n=4*((this._nRounds=r+6)+1),s=this._keySchedule=[],a=0;a<n;a++)a<r?s[a]=e[a]:(h=s[a-1],a%r?r>6&&a%r==4&&(h=i[h>>>24]<<24|i[h>>>16&255]<<16|i[h>>>8&255]<<8|i[255&h]):(h=i[(h=h<<8|h>>>24)>>>24]<<24|i[h>>>16&255]<<16|i[h>>>8&255]<<8|i[255&h],h^=d[a/r|0]<<24),s[a]=s[a-r]^h);for(var o=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var h=s[a];else h=s[a-4];o[c]=c<4||a<=4?h:u[i[h>>>24]]^l[i[h>>>16&255]]^p[i[h>>>8&255]]^f[i[255&h]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,o,c,h,i)},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,p,f,s),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,n,i,s,a,o){for(var c=this._nRounds,h=t[e]^r[0],u=t[e+1]^r[1],l=t[e+2]^r[2],p=t[e+3]^r[3],f=4,d=1;d<c;d++){var _=n[h>>>24]^i[u>>>16&255]^s[l>>>8&255]^a[255&p]^r[f++],g=n[u>>>24]^i[l>>>16&255]^s[p>>>8&255]^a[255&h]^r[f++],m=n[l>>>24]^i[p>>>16&255]^s[h>>>8&255]^a[255&u]^r[f++],v=n[p>>>24]^i[h>>>16&255]^s[u>>>8&255]^a[255&l]^r[f++];h=_,u=g,l=m,p=v}_=(o[h>>>24]<<24|o[u>>>16&255]<<16|o[l>>>8&255]<<8|o[255&p])^r[f++],g=(o[u>>>24]<<24|o[l>>>16&255]<<16|o[p>>>8&255]<<8|o[255&h])^r[f++],m=(o[l>>>24]<<24|o[p>>>16&255]<<16|o[h>>>8&255]<<8|o[255&u])^r[f++],v=(o[p>>>24]<<24|o[h>>>16&255]<<16|o[u>>>8&255]<<8|o[255&l])^r[f++],t[e]=_,t[e+1]=g,t[e+2]=m,t[e+3]=v},keySize:8});e.AES=r._createHelper(_)}(),t.AES}(Y(),it(),ot(),_t(),gt||(gt=1,mt.exports=function(t){t.lib.Cipher||function(e){var r=t,n=r.lib,i=n.Base,s=n.WordArray,a=n.BufferedBlockAlgorithm,o=r.enc;o.Utf8;var c=o.Base64,h=r.algo.EvpKDF,u=n.Cipher=a.extend({cfg:i.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:m}return function(e){return{encrypt:function(r,n,i){return t(n).encrypt(e,r,n,i)},decrypt:function(r,n,i){return t(n).decrypt(e,r,n,i)}}}}()});n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=r.mode={},p=n.BlockCipherMode=i.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}}),f=l.CBC=function(){var t=p.extend();function r(t,r,n){var i,s=this._iv;s?(i=s,this._iv=e):i=this._prevBlock;for(var a=0;a<n;a++)t[r+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize;r.call(this,t,e,i),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),t.Decryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize,s=t.slice(e,e+i);n.decryptBlock(t,e),r.call(this,t,e,i),this._prevBlock=s}}),t}(),d=(r.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,n=r-t.sigBytes%r,i=n<<24|n<<16|n<<8|n,a=[],o=0;o<n;o+=4)a.push(i);var c=s.create(a,n);t.concat(c)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}};n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:d}),reset:function(){var t;u.reset.call(this);var e=this.cfg,r=e.iv,n=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=n.createEncryptor:(t=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(n,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 _=n.CipherParams=i.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(c)},parse:function(t){var e,r=c.parse(t),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=s.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),_.create({ciphertext:r,salt:e})}},m=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var i=t.createEncryptor(r,n),s=i.finalize(e),a=i.cfg;return _.create({ciphertext:s,key:r,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,r,n){return n=this.cfg.extend(n),e=this._parse(e,n.format),t.createDecryptor(r,n).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),v=(r.kdf={}).OpenSSL={execute:function(t,e,r,n,i){if(n||(n=s.random(8)),i)a=h.create({keySize:e+r,hasher:i}).compute(t,n);else var a=h.create({keySize:e+r}).compute(t,n);var o=s.create(a.words.slice(e),4*r);return a.sigBytes=4*e,_.create({key:a,iv:o,salt:n})}},y=n.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:v}),encrypt:function(t,e,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=i.iv;var s=m.encrypt.call(this,t,e,i.key,n);return s.mixIn(i),s},decrypt:function(t,e,r,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var i=n.kdf.execute(r,t.keySize,t.ivSize,e.salt,n.hasher);return n.iv=i.iv,m.decrypt.call(this,t,e,i.key,n)}})}()}(Y(),_t())))),rt.exports),bt=k(yt);function wt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var St="funsdata",xt={_name:St,appId:"",persistence:"localStorage",persistencePrefix:"FunsDataJSSDK",persistenceEnabled:!0,crossSubDomain:!0,maxReferrerStringLength:200,showLog:!0,dataSendTimeout:3e3,useAppTrack:!1,strict:!1,tryCount:3,enableCalibrationTime:!1},Ct=function(t){this._state={},this.crossSubDomain=t.crossSubDomain,this.enabled=t.persistenceEnabled;var e=null;if(this.enabled){if(!1===t.crossSubDomain){var r=m.url("sub",location.href);this.name="string"==typeof r&&""!==r?t.persistencePrefix+"_"+r:t.persistencePrefix+"_root"}else this.name=t.persistencePrefix+"_cross";var n=t.persistence;"cookie"!==n&&"localStorage"!==n&&(v.i("Unknown persistence type "+n+"; falling back to cookie"),n=t.persistence="cookie"),"localStorage"===n&&m.localStorage.isSupported()?(this.storage=m.localStorage,(e=m.cookie.get(this.name))&&m.cookie.remove(this.name,this.crossSubDomain)):(v.i("localStorage is not support by the browser; falling back to cookie"),this.storage=m.cookie)}if(this._load(e),!this.getDistinctId()){var i=t.uuid?t.uuid:m.UUID();this._setDeviceId(i),this.setDistinctId(i)}};Ct.prototype._load=function(t){var e;this.enabled&&(null!==(e=null!==t?t:this.storage.get(this.name))&&m.check.isJSONString(e)&&(this._state=m.extend({},JSON.parse(e))),null!==t&&this._save())},Ct.prototype.getDistinctId=function(){return this._state.distinct_id},Ct.prototype.setDistinctId=function(t){this._set("distinct_id",t)},Ct.prototype.setEnableTracking=function(t){this._set("enable_tracking",t)},Ct.prototype.getEnableTracking=function(){return!!m.check.isUndefined(this._state.enable_tracking)||this._state.enable_tracking},Ct.prototype.clear=function(){this._state={},this._save()},Ct.prototype.setOptTracking=function(t){this._set("opt_tracking",t)},Ct.prototype.getOptTracking=function(){return!!m.check.isUndefined(this._state.opt_tracking)||this._state.opt_tracking},Ct.prototype.setDistinctId=function(t){this._set("distinct_id",t)},Ct.prototype.getAccountId=function(){return this._state.account_id},Ct.prototype.setAccountId=function(t){this._set("account_id",t)},Ct.prototype.getDeviceId=function(){return this._state.device_id},Ct.prototype.setSuperProperties=function(t){this._set("super_properties",t)},Ct.prototype.getSuperProperties=function(){return this._state.super_properties||{}},Ct.prototype.setEventTimer=function(t,e){var r=this._state.event_timers||{};r[t]=e,this._set("event_timers",r)},Ct.prototype.clearEventTimer=function(){this._set("event_timers",{})},Ct.prototype.removeEventTimer=function(t){var e=(this._state.event_timers||{})[t];return m.check.isUndefined(e)||(delete this._state.event_timers[t],this._save()),e},Ct.prototype._setDeviceId=function(t){this._state.device_id?v.w("Current device_id is ",this.getDeviceId(),", it couldn't been set to: ",t):this._set("device_id",t)},Ct.prototype._save=function(){this.enabled&&this.storage.set(this.name,JSON.stringify(this._state),73e3,this.crossSubDomain)},Ct.prototype._set=function(t,e){this._state=this._state||{},this._state[t]=e,this._save()};var zt=function(){};zt.prototype.trackLink=function(t,e,r){var n=this;if(this._isCollectData()){var i=this._getConfig("strict");if(b.properties(r)||!i){if(t&&m.check.isObject(t)){var s=[];m.each(t,(function(t,e){t&&m.check.isArray(t)&&m.each(t,(function(t){switch(e){case"tag":m.each(document.getElementsByTagName(t),(function(t){s.indexOf(t)<0&&s.push(t)}));break;case"class":m.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)}}))})),m.each(s,(function(t){if(null!==t){var s=m.extend({},m.info.pageProperties(),r);s["#element_type"]=t.nodeName.toLowerCase(),m.check.isUndefined(s.name)&&(s.name=t.getAttribute("td-name")||t.innerHTML||t.value||"Unable to get Identify"),t.addEventListener("click",(function(){n._sendRequest({type:"track",event:e,properties:i?b.stripProperties(s):s})}))}}))}}else v.w("trackLink failed due to invalid properties.")}},zt.prototype.setPageProperty=function(t){this._isCollectData()&&(b.properties(t)||!this._getConfig("strict")?m.extend(this.currentProps,t):v.w("Page property setting error"))},zt.prototype.getPageProperty=function(){return this.currentProps},zt.prototype.getPresetProperties=function(){var t=m.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},zt.prototype.login=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),b.userId(t)||!this._getConfig("strict")?t!==this.persistence.getAccountId()&&this.persistence.setAccountId(t):v.e("The parameters of the login API must be strings"))},zt.prototype.logout=function(t){if(this._isCollectData()){if(!0===t){var e=m.UUID();this.persistence.setDistinctId(e)}this.persistence.setAccountId("")}},zt.prototype.userSet=function(t,e){this._isCollectData()&&(!b.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_set",properties:t},e))},zt.prototype.userSetOnce=function(t,e){this._isCollectData()&&(!b.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_setOnce",properties:t},e))},zt.prototype.userUnset=function(t,e){if(this._isCollectData()&&(b.propertyName(t)||!this._getConfig("strict"))){var r={};r[t]=0,this._sendRequest({type:"user_unset",properties:r},e)}},zt.prototype.userAdd=function(t,e){if(this._isCollectData()){if(m.check.isString(t)){var r=t;(t={})[r]=1}b.propertiesMust(t)&&(!function(t){for(var e in t)if(!/-*\d+/.test(String(t[e])))return!1;return!0}(t)&&this._getConfig("strict")?v.w("The property value of useradd api must be a number"):this._sendRequest({type:"user_add",properties:t},e))}},zt.prototype.userAppend=function(t,e){this._isCollectData()&&(b.propertiesMust(t)&&function(t){for(var e in t)if(!m.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_append",properties:t},e):v.w("The value in the userAppend property can only be Array"))},zt.prototype.userUniqAppend=function(t,e){this._isCollectData()&&(b.propertiesMust(t)&&function(t){for(var e in t)if(!m.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_uniq_append",properties:t},e):v.w("The value in the userUniqAppend property can only be Array"))},zt.prototype.flush=function(){this.batchConsumer&&!this._isDebug()&&this.batchConsumer.flush()},zt.prototype.userDel=function(t){this._isCollectData()&&this._sendRequest({type:"user_del"},t)},zt.prototype._sendRequest=function(t,e,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=m.check.isUndefined(t.time)||!m.check.isDate(t.time)?new Date:t.time,a={data:[{"#type":t.type,"#time":m.formatDate(m.formatTimeZone(s,this._getConfig("zoneOffset"))),"#distinct_id":this.persistence.getDistinctId()}]};this.persistence.getAccountId()&&(a.data[0]["#account_id"]=this.persistence.getAccountId());var o=0-s.getTimezoneOffset()/60;if(a.automaticData=m.extend({},{"#device_id":this.persistence.getDeviceId(),"#zone_offset":o},m.info.properties()),"track"===t.type||"track_update"===t.type||"track_overwrite"===t.type){a.data[0]["#event_name"]=t.event,"track_update"===t.type||"track_overwrite"===t.type?a.data[0]["#event_id"]=t.extraId:t.firstCheckId&&(a.data[0]["#first_check_id"]=t.firstCheckId),a.data[0].properties=m.extend({},m.normalizeTopLevelKeys(kt(kt(kt({},this.getSuperProperties()),this.dynamicProperties?this.dynamicProperties():{}),this.getPageProperty())));var c=this.persistence.removeEventTimer(t.event);if(!m.check.isUndefined(c)){var h=(new Date).getTime()-c,u=parseFloat((h/1e3).toFixed(3));u>86400&&(u=86400),a.data[0].properties["#duration"]=u}}else a.data[0].properties={};if(m.check.isObject(t.properties)&&!m.check.isEmptyObject(t.properties)&&m.extend(a.data[0].properties,m.normalizeTopLevelKeys(t.properties,!0)),m.searchObjDate(a.data[0],this._getConfig("zoneOffset")),a.data[0]=m.generateEncryptyData(a.data[0],this._getConfig("secretKey")),a["#app_id"]=this._getConfig("appId"),a["#flush_time"]=m.formatTimeZone(new Date,this._getConfig("zoneOffset")).getTime(),v.i(a),this._getConfig("useAppTrack")){var l=window.FunsData_APP_JS_Bridge||{};if("object"===r(l)&&l.funsdata_track)return l.funsdata_track(JSON.stringify(a)),void("function"==typeof e&&e());if(/td-sdk-ios/.test(navigator.userAgent)&&!window.MSStream){var p=document.createElement("iframe");return p.setAttribute("src","funsanalytics://trackEvent?event="+m.encodeURIComponent(JSON.stringify(a))),document.documentElement.appendChild(p),p.parentNode.removeChild(p),p=null,void("function"==typeof e&&e())}}a.data[0]["#uuid"]=m.UUIDv4();var f=JSON.stringify(a),d=this;if(this._isEncrypt()&&d.crypto){var _=Math.round(1e16*Math.random())+"",g=[];a.data.forEach((function(t){g.push({ekey:d._encryptPass(_,d.crypto.pub_key),pkv:d.crypto.version,payload:d._encryptInfo(JSON.stringify(t),_)})})),a.data=g,a.client="js"}return new Ot(JSON.stringify(a),this._getConfig("serverUrl"),this._getConfig("tryCount"),e,this._isDebug(),i).run(f)};function Pt(t){this.config=t,this.timer=null,this.batchConfig=m.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}Pt.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(m.getRandom()),n=m.localStorage.get(this.tabKey);if((n=null===n?[]:m.safeJSONParse(n)||[]).length<=this.storageLimit)n.push(r),m.localStorage.set(this.tabKey,JSON.stringify(n)),m.saveObjectVal(r,e);else{var i=n.splice(0,20);n.push(r),m.localStorage.set(this.tabKey,JSON.stringify(n)),m.saveObjectVal(r,e);for(var s={},a=[],o=0;o<i.length;o++){var c=m.readObjectVal(i[o]);m.hasEncrypty(c)||(c=m.generateEncryptyData(c,this.config.secretKey)),a.push(c)}s.data=a,s["#app_id"]=this.config.appId,s["#flush_time"]=m.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(s,i)}},flush:function(){clearTimeout(this.timer),this.send(),this.batchInterval()},send:function(){var t=m.localStorage.get(this.tabKey);if(t&&(t=m.safeJSONParse(t)||[]).length){for(var e={},r=[],n=[],i=t.length<this.batchConfig.size?t.length:this.batchConfig.size,s=0;s<i;s++){var a=m.readObjectVal(t[s]);m.hasEncrypty(a)||(a=m.generateEncryptyData(a,this.config.secretKey)),r.push(a),n.push(t[s])}e.data=r,e["#app_id"]=this.config.appId,e["#flush_time"]=m.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(e,n)}},request:function(t,e){var r=this;v.i("flush data"),v.i(t);var n=JSON.stringify(t),i=m.base64Encode(n),s="crc="+m.hashCode(i);m.encodeURIComponent(i),m.encodeURIComponent(s),new Ot(n,this.config.serverUrl,this.config.tryCount,(function(){r.remove(e)}),!1).run()},remove:function(t){var e=m.localStorage.get(this.tabKey);if(e){for(var r=m.safeJSONParse(e)||[],n=0;n<t.length;n++){var i=m.indexOf(r,t[n]);i>-1&&r.splice(i,1),m.localStorage.remove(t[n])}m.localStorage.set(this.tabKey,JSON.stringify(r))}},recycle:function(){var t=m.localStorage.get(this.tabKey);if(t&&0===(t=m.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&&m.localStorage.set(this.tabKey,JSON.stringify(t))}}};var Ot=function(){return s((function t(r,n,i,s,a){var o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];e(this,t),this.data=r,this.serverUrl=n,this.tryCount=i||3,this.callback=s,this.isDebug=a,this.ifSend=o}),[{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?v.w(t):v.i(t)}}else r.onFailed()},r.ifSend&&(r.isDebug?e.send(r.data):e.send(V.gzip(r.data,{to:"string"}))),r.ifSend?new Promise((function(r,n){e.onload=function(){4===e.readyState&&(200===e.status?r({res:e.responseText,req:t}):n(e))},e.onerror=function(){n(e)}})):t}},{key:"onFailed",value:function(){--this.tryCount>0&&this.run()}}])}();zt.prototype._isDebug=function(){return"debug"===this._getConfig("mode")||"debug_only"===this._getConfig("mode")},zt.prototype._isEncrypt=function(){return!0===this._getConfig("encrypt")},zt.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("公钥拉取失败!"))}},zt.prototype._encryptInfo=function(t,e){var r=et.parse(e),n=et.parse(t);return bt.encrypt(n,r,{iv:r}).toString()},zt.prototype._encryptPass=function(e,r){var n=new t;return n.setPublicKey(r),n.encrypt(e)},zt.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=kt(kt({},r),e.heartbeatProps);e.track("Heartbeat",t)}else e.track("Heartbeat",r)}),t)}},zt.prototype.clearHeartbeat=function(){var t=this;t.heartbeatInterval?(clearInterval(t.heartbeatInterval),t.removeHeartbeatProps(),t.heartbeatInterval=void 0):console.warn("未设置心跳")},zt.prototype.setHeartbeatProps=function(t){if(t)if("object"!==r(t)||Array.isArray(t))console.warn("心跳上报参数不符合规范");else{var e=this;e.heartbeatProps||(e.heartbeatProps={}),e.heartbeatProps=kt(kt({},e.heartbeatProps),t)}},zt.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={}},zt.prototype._sendRequestWithImage=function(t,e){function r(t){t&&!t.hasCalled&&(t.hasCalled=!0,t.callback&&t.callback())}var n=(-1!==this._getConfig("serverUrl").indexOf("?")?this._getConfig("serverUrl"):this._getConfig("serverUrl")+"?")+t,i=document.createElement("img");i.callback=e,setTimeout(r,this._getConfig("dataSendTimeout"),i),i.onload=function(){this.onload=null,r(this)},i.onerror=function(){this.onerror=null,r(this)},i.onabort=function(){this.onabort=null,r(this)},i.src=n},zt.prototype.track=function(t,e,r,n){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||b.event(t)&&b.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},n):void 0},zt.prototype.getTrackData=function(t,e,r,n){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||b.event(t)&&b.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},n,void 0,!1):void 0},zt.prototype.trackUpdate=function(t){this._isCollectData()&&(m.check.isObject(t)?(b.event(t.eventName)&&b.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):v.e("The parameter of updateble event does not meet the requirements"))},zt.prototype.trackOverwrite=function(t){this._isCollectData()&&(m.check.isObject(t)?(b.event(t.eventName)&&b.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):v.e("The parameter of overwritable event does not meet the requirements"))},zt.prototype.trackFirstEvent=function(t){this._isCollectData()&&(m.check.isObject(t)?(b.event(t.eventName)&&b.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):v.e("The parameter of first event does not meet the requirements"))},zt.prototype.trackWithBeacon=function(t,e,r,n){"ta_page_hide"!==t?(b.event(t)&&b.properties(e)||!this._getConfig("strict"))&&this._sendRequest({type:"track",event:t,time:r,properties:e},n,!0):this._sendRequest({type:"track",event:t,time:r,properties:e},n,!0)},zt.prototype.identify=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),b.userId(t)||!this._getConfig("strict")?t!==this.persistence.getDistinctId()&&this.persistence.setDistinctId(t):v.e("The parameter of identify API requires a string"))},zt.prototype.getDistinctId=function(){return this.persistence.getDistinctId()},zt.prototype.getDeviceId=function(){return this.persistence.getDeviceId()},zt.prototype._isCollectData=function(){return this.persistence.getOptTracking()&&this.persistence.getEnableTracking()},zt.prototype.setSuperProperties=function(t){this._isCollectData()&&(b.propertiesMust(t)||!this._getConfig("strict")?this.persistence.setSuperProperties(m.extend({},this.getSuperProperties(),t)):v.w("The paramater of setSuperProperties API requires object"))},zt.prototype.getSuperProperties=function(){return this.persistence.getSuperProperties()},zt.prototype.clearSuperProperties=function(){this._isCollectData()&&this.persistence.setSuperProperties({})},zt.prototype.unsetSuperProperty=function(t){if(this._isCollectData()&&m.check.isString(t)){var e=this.getSuperProperties();delete e[t],this.persistence.setSuperProperties(e)}},zt.prototype.setDynamicSuperProperties=function(t){this._isCollectData()&&("function"==typeof t?b.properties(t())||!this._getConfig("strict")?this.dynamicProperties=t:v.w("The return value of dynamic properties requires an object"):v.w("The paramater of setDynamicSuperProperties API requires function type"))},zt.prototype.timeEvent=function(t){this._isCollectData()&&(m.check.isUndefined(t)?v.w("No event name provided to timeEvent"):this.persistence.setEventTimer(t,(new Date).getTime()))},zt.prototype.quick=function(t,e){if(this._isCollectData())if("string"==typeof t&&"autoTrack"===t){var r={};b.properties(e)&&m.extend(r,e),this._sendRequest({type:"track",event:"ta_pageview",properties:m.extend(r,m.info.pageProperties())})}else"string"==typeof t&&"siteLinker"===t?Dt.init(this,e):v.w("The quick method does not support the parameter of"+t)},zt.prototype._setConfig=function(t){m.check.isObject(t)&&(m.extend(this.config,t),this._getConfig("persistencePrefix")||(this.config.persistencePrefix=this.config.cookiePrefix),this.persistence)},zt.prototype._getConfig=function(t){return this.config[t]},zt.prototype.init=function(t){if(m.check.isUndefined(this.config)){this.version=c,this.config={},this.currentProps=this.currentProps||{},this._setConfig(m.extend({},xt,t)),this.persistence=new Ct(this.config);var e=this._getConfig("appId");m.check.isUndefined(e)||this._setConfig({appId:e.replace(/\s*/g,"")}),v.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")&&m.localStorage.isSupported()&&(this.batchConsumer=new Pt(this.config),this.batchConsumer.batchInterval()),new Et(this,this._getConfig("autoTrack")).start();var r="normal";this.config.mode&&(r=this.config.mode),v.i("DataEye Analytics SDK initialized successfully with mode: "+r+", APP ID : "+this.config.appId+", server url: "+this.config.serverUrl+", libversion: "+c)}else v.i("The FunsData libraray has been initialized.")};var Et=function(){return s((function t(r,n){e(this,t),this.taLib=r,"Object"===m.paramType(n)&&"Boolean"===m.paramType(n.pageShow)?this.autoPageShow=n.pageShow:this.autoPageShow=!1,"Object"===m.paramType(n)&&"Boolean"===m.paramType(n.pageHide)?this.autoPageHide=n.pageHide:this.autoPageHide=!1}),[{key:"start",value:function(){var t=this;t.trackPageShowEvent(),"onvisibilitychange"in document&&m.addEvent(document,"visibilitychange",(function(){document.hidden?t.trackPageHideEvent():t.trackPageShowEvent()}))}},{key:"trackPageShowEvent",value:function(){this.autoPageShow&&this.taLib.track("ta_page_show",m.info.pageProperties()),this.taLib.timeEvent("ta_page_hide")}},{key:"trackPageHideEvent",value:function(){this.autoPageHide&&this.taLib.trackWithBeacon("ta_page_hide",m.info.pageProperties())}},{key:"trackPageHideEventOnClose",value:function(){this.autoPageHide&&this.isPageShow&&this.taLib.trackWithBeacon("ta_page_hide",m.info.pageProperties())}}])}();zt.prototype.initInstance=function(t,e){if(!m.check.isString(t)||!m.check.isUndefined(e)&&!m.check.isObject(e))return v.w("invalid parameter of initInstance(string, object)."),null;if(this._getConfig("_name")!==St)return v.w("This function is allowed for master instance only"),null;if(t===St||this[t])return v.w("The name ",t," couldn't be used for create new instance."),null;m.check.isUndefined(e)&&(e={});var r=new zt,n=m.extend({},this.config,{_name:t,persistenceEnabled:!1,uuid:this.getDeviceId()},e);n.persistenceEnabled&&(n.persistencePrefix=n.persistencePrefix+"_"+t),r.init(n),this[t]=r},zt.prototype.enableTracking=function(t){"boolean"==typeof t&&this.persistence.setEnableTracking(t)},zt.prototype.optOutTracking=function(){this.persistence.setSuperProperties({}),this.persistence.setAccountId(""),this.persistence.clearEventTimer(),this.persistence.setOptTracking(!1)},zt.prototype.optInTracking=function(){this.persistence.setOptTracking(!0)},zt.prototype.setTrackStatus=function(t){if(m.check.isObject(t)){var e=t.status;v.i("swtich track status : "+e),"pause"===e?this.enableTracking(!1):"stop"===e?this.optOutTracking():"normal"===e&&(this.enableTracking(!0),this.optInTracking())}};var Dt={};Dt.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},Dt.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},Dt.getCurrenId=function(){var t=this.ta.getDistinctId();return encodeURIComponent("d"+t)},Dt.rewriteUrl=function(t,e){var r=/([^?#]+)(\?[^#]*)?(#.*)?/.exec(t),n="";if(r){var i,s=r[1]||"",a=r[2]||"",o=r[3]||"";if(this.getPartHash(t))i=o.indexOf("_tasdk"),n=o.indexOf("?")>-1?i>-1?s+a+"#"+o.substring(1,i)+"_tasdk="+this.getCurrenId():s+a+"#"+o.substring(1)+"&_tasdk="+this.getCurrenId():s+a+"#"+o.substring(1)+"?_tasdk="+this.getCurrenId();else i=a.indexOf("_tasdk"),n=/^\?(\w)+/.test(a)?i>-1?s+"?"+a.substring(1,i)+"_tasdk="+this.getCurrenId()+o:s+"?"+a.substring(1)+"&_tasdk="+this.getCurrenId()+o:s+"?"+a.substring(1)+"_tasdk="+this.getCurrenId()+o;return e&&(e.href=n),n}},Dt.addClickListen=function(){var t=this,e=function(e){var r,n,i=e.target,s=i.tagName.toLowerCase(),a=i.parentNode;if("a"===s&&i.href||a&&a.tagName&&"a"===a.tagName.toLowerCase()&&a.href){"a"===s&&i.href?(r=i.href,n=i):(r=a.href,n=a);var o=m.URL(r).protocol;"http:"!==o&&"https:"!==o||t.getPartUrl(r)&&t.rewriteUrl(r,n)}};m.addSiteEvent(document,"mousedown",e),window.PointerEvent&&"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>=0&&m.addSiteEvent(document,"pointerdown",e)},Dt.getUrlId=function(){var t=location.href.match(/_tasdk=([aufd][^\?\#\&\=]+)/);return m.check.isArray(t)&&t[1]?decodeURIComponent(t[1]):""},Dt.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)},Dt.init=function(t,e){this.isInited||(this.isInited=!0,this.ta=t,this.setRefferId(),m.check.isObject(e)&&m.check.isArray(e.linker)&&e.linker.length>0&&(this.addClickListen(),this.option=e.linker,this.option=function(t){for(var e=t.length,r=[],n=0;n<e;n++)/[A-Za-z0-9]+\./.test(t[n].part_url)&&"[object Boolean]"===Object.prototype.toString.call(t[n].after_hash)?r.push(t[n]):v.w("The configuration of linker "+(n+1)+" is not supported.Please check format");return r}(this.option)))};var At=new zt;export{At as default};
|
|
1
|
+
import{JSEncrypt as t}from"jsencrypt";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t){return r="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},r(t)}function n(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function i(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,n(i.key),i)}}function s(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o,c="1.0.3-beta.1",h=Array.prototype,u=Object.prototype,l=h.slice,p=u.toString,d=u.hasOwnProperty,f=h.forEach,_={},g=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],m={};m.each=function(t,e,r){if(null!==t)if(f&&t.forEach===f)t.forEach(e,r);else if(t.length===+t.length){for(var n=0,i=t.length;n<i;n++)if(n in t&&e.call(r,t[n],n,t)===_)return}else for(var s in t)if(d.call(t,s)&&e.call(r,t[s],s,t)===_)return},m.extend=function(t){return m.each(l.call(arguments,1),function(e){for(var r in e)void 0!==e[r]&&(t[r]=e[r])}),t},m.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},m.formatTimeZone=function(t,e){if("number"!=typeof e)return t;var r=t.getTime(),n=6e4*t.getTimezoneOffset();return new Date(r+n+36e5*e)},m.formatJsonString=function(t){try{return JSON.stringify(t,null,8)}catch(e){return JSON.stringify(t)}},m.searchObjDate=function(t,e){(m.check.isObject(t)||m.check.isArray(t))&&m.each(t,function(r,n){m.check.isObject(r)||m.check.isArray(r)?m.searchObjDate(t[n],e):m.check.isDate(r)&&(t[n]=m.formatDate(m.formatTimeZone(r,e)))})},m.check={isUndefined:function(t){return void 0===t},isObject:function(t){return"[object Object]"===p.call(t)&&null!==t},isEmptyObject:function(t){if(m.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}},m.UUID=(o=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=o()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var t,e,r=navigator.userAgent,n=[],i=0;function s(t,e){var r,i=0;for(r=0;r<e.length;r++)i|=n[r]<<8*r;return t^i}for(t=0;t<r.length;t++)e=r.charCodeAt(t),n.unshift(255&e),n.length>=4&&(i=s(i,n),n=[]);return n.length>0&&(i=s(i,n)),i.toString(16)}()+"-"+t+"-"+o();return e||(String(Math.random())+String(Math.random())+String(Math.random())).slice(2,15)}),m.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)})},m.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:"")},m.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 m.decodeURIComponent(t.replace(/\+/g," "))}function r(t,e){var r=t.charAt(0),n=e.split(r);return r===t?n:n[(t=parseInt(t.substring(1),10))<0?n.length+t:t-1]}function n(t,r){for(var n=t.charAt(0),i=r.split("&"),s=[],a={},o=[],c=t.substring(1),h=0,u=i.length;h<u;h++)if((s=i[h].match(/(.*?)=(.*)/))||(s=[i[h],i[h],""]),""!==s[1].replace(/\s/g,"")){if(s[2]=e(s[2]||""),c===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 n===t?a:a[c]}return function(e,i){var s,a={};if("tld?"===e)return t();if(i=i||window.location.toString(),!e)return i;if(e=e.toString(),s=i.match(/^mailto:([^\/].+)/))a.protocol="mailto",a.email=s[1];else{if((s=i.match(/(.*?)\/#\!(.*)/))&&(i=s[1]+s[2]),(s=i.match(/(.*?)#(.*)/))&&(a.hash=s[2],i=s[1]),a.hash&&e.match(/^#/))return n(e,a.hash);if((s=i.match(/(.*?)\?(.*)/))&&(a.query=s[2],i=s[1]),a.query&&e.match(/^\?/))return n(e,a.query);if((s=i.match(/(.*?)\:?\/\/(.*)/))&&(a.protocol=s[1].toLowerCase(),i=s[2]),(s=i.match(/(.*?)(\/.*)/))&&(a.path=s[2],i=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=i.match(/(.*)\:([0-9]+)$/))&&(a.port=s[2],i=s[1]),(s=i.match(/(.*?)@(.*)/))&&(a.auth=s[1],i=s[2]),a.auth&&(s=a.auth.match(/(.*)\:(.*)/),a.user=s?s[1]:a.auth,a.pass=s?s[2]:void 0),a.hostname=i.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:""}}(),m.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},m.decodeURIComponent=function(t){var e="";try{e=decodeURIComponent(t)}catch(r){e=t}return e},m.encodeURIComponent=function(t){var e="";try{e=encodeURIComponent(t)}catch(r){e=t}return e},m.utf8Encode=function(t){var e,r,n,i,s="";for(e=r=0,n=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<n;i++){var a=t.charCodeAt(i),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=i+1)}return r>e&&(s+=t.substring(e,t.length)),s},m.base64Encode=function(t){var e,r,n,i,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,c=0,h="",u=[];if(!t)return t;t=m.utf8Encode(t);do{e=(s=t.charCodeAt(o++)<<16|t.charCodeAt(o++)<<8|t.charCodeAt(o++))>>18&63,r=s>>12&63,n=s>>6&63,i=63&s,u[c++]=a.charAt(e)+a.charAt(r)+a.charAt(n)+a.charAt(i)}while(o<t.length);switch(h=u.join(""),t.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"="}return h},m.cookie={get:function(t){for(var e=t+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return m.decodeURIComponent(i.substring(e.length,i.length))}return null},set:function(t,e,r,n,i){var s="",a="",o="";if(r=null===r?73e3:r,n){var c=m.url("domain",location.href);s=c?"; domain=."+c:""}if(r){var h=new Date;"s"===String(r).slice(-1)?h.setTime(h.getTime()+1e3*Number(String(r).slice(0,-1))):h.setTime(h.getTime()+24*r*60*60*1e3),a="; expires="+h.toGMTString()}i&&(o="; secure");var u=t+"="+encodeURIComponent(e)+a+"; path=/"+s+o;return document.cookie=u,u},remove:function(t,e){m.cookie.set(t,"",-1,e)}},m.localStorage={get:function(t){try{return window.localStorage.getItem(t)}catch(t){m.localStorage.error(t)}},parse:function(t){var e;try{e=JSON.parse(m.localStorage.get(t))||null}catch(t){m.localStorage.error(t)}return e},set:function(t,e){try{window.localStorage.setItem(t,e)}catch(t){m.localStorage.error(t)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(t){m.localStorage.error(t)}},error:function(t){console.error("localStorage error: "+t)},isSupported:function(){var t=!0;try{var e="__funsdatasupport__",r="testIsSupportStorage";m.localStorage.set(e,r),m.localStorage.get(e)!==r&&(t=!1),m.localStorage.remove(e)}catch(e){t=!1}return t}},m.stripEmptyProperties=function(t){var e={};return m.each(t,function(t,r){m.check.isString(t)&&t.length>0&&(e[r]=t)}),e},m.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 n=e.match(/trident\/([\d.]+)/)?e.match(/trident\/([\d.]+)/)[1]:"",i=e.match(/msie ([\d.]+)/)?e.match(/msie ([\d.]+)/)[1]:"";""!==n?t.version=String(parseInt(n)+4):""!==i&&(t.version=i)}else r&&(t.version=e.match(r[0])?e.match(r[0])[1]:"")}catch(t){v.w("getting browser info failed due to ",t)}return t},properties:function(){var t=m.info.browser();return m.extend({"#os":m.info.os(),"#lib_version":c,"#lib":"js","#screen_height":screen.height,"#screen_width":screen.width,"#browser":t.type,"#browser_version":t.version,"#system_language":m.check.isString(navigator.languages[1])?navigator.languages[1].toLowerCase():"Value exception","#ua":m.check.isString(navigator.userAgent)?navigator.userAgent.toLowerCase():"Value exception","#utm":m.getUtm()})},pageProperties:function(){var t=m.getReferrer();return m.stripEmptyProperties({"#referrer":t,"#referrer_host":t?m.url("hostname",t):t,"#url":location.href,"#url_path":location.pathname,"#title":document.title})}},m.getUtm=function(){var t={};return m.each(g,function(e){var r=m.getQueryParam(location.href,e);r.length&&(t[e]=r)}),JSON.stringify(t)},m.getQueryParam=function(t,e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),t=m.decodeURIComponent(t);var r=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===r||r&&"string"!=typeof r[1]&&r[1].length?"":m.decodeURIComponent(r[1])},m.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)},m.createAesKey=function(){return m.createString(16)},m.generateEncryptyData=function(t,e){if(void 0===e)return t;var r=e.publicKey,n=e.version;if(void 0===r||void 0===n)return t;if("undefined"==typeof CryptoJS||"undefined"==typeof JSEncrypt)return t;var i=m.createAesKey();try{var s=CryptoJS.enc.Utf8.parse(i),a=CryptoJS.enc.Utf8.parse(JSON.stringify(t)),o=CryptoJS.AES.encrypt(a,s,{mode:CryptoJS.mode.ECB,padding:CryptoJS.pad.Pkcs7}).toString(),c=new JSEncrypt;c.setPublicKey(r);var h=c.encrypt(i);return!1===h?(v.w("encryption failed"),t):{pkv:n,ekey:h,payload:o}}catch(t){v.w("encryption failed")}return t},m.paramType=function(t){return Object.prototype.toString.call(t).replace("[object ","").replace("]","")},m.addEvent=function(t,e,r,n){if(document.addEventListener)if("Array"!==this.paramType(t)&&"HTMLCollection"!==this.paramType(t)||!t.length||t===window)t.addEventListener(e,r,n);else for(var i=0;i<t.length;i++)this.addEvent(t[i],e,r,n);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)})},m.getRandom=function(){return(new Date).getTime()+"_"+Math.floor(1e6*Math.random())},m.safeJSONParse=function(t){var e=null;try{e=JSON.parse(t)}catch(e){return t}return e},m.saveObjectVal=function(t,e){m.check.isString(e)||(e=JSON.stringify(e)),m.localStorage.set(t,e)},m.readObjectVal=function(t){var e=m.localStorage.get(t);return e?m.safeJSONParse(e):null},m.indexOf=function(t,e){var r=t.indexOf;if(r)return r.call(t,e);for(var n=0;n<t.length;n++)if(e===t[n])return n;return-1},m.hasEncrypty=function(t){return!!m.check.isObject()&&("undefined"!==t.pkv&&"undefined"!==t.ekey&&"undefined"!==t.payload)},m.addSiteEvent=function(t,e,r,n){function i(t){return t&&(t.preventDefault=i.preventDefault,t.stopPropagation=i.stopPropagation,t._getPath=i._getPath),t}i._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};i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0};(function(t,e,r){if(void 0===n&&"click"===e&&(n=!0),t&&t.addEventListener)t.addEventListener(e,function(t){t._getPath=i._getPath,r.call(this,t)},n);else{var s="on"+e,a=t[s];t[s]=function(t,e,r,n){var s=function(s){if(s=s||i(window.event)){s.target=s.srcElement;var a,o,c=!0;return"function"==typeof r&&(a=r(s)),o=e.call(t,s),"beforeunload"!==n?(!1!==a&&!1!==o||(c=!1),c):void 0}};return s}(t,r,a,e)}}).apply(null,arguments)},m.getURLSearchParams=function(t){for(var e={},r=(t=t||"").substring(1).split("&"),n=0;n<r.length;n++){var i=r[n].indexOf("=");if(-1!==i){var s=r[n].substring(0,i),a=r[n].substring(i+1);s=m.decodeURIComponent(s),a=m.decodeURIComponent(a),e[s]=a}}return e},m.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"!==r(t))return!1;var e=this._values.QueryString||"";for(var n in t)e=new RegExp(n+"[^&]+").test(e)?e.replace(new RegExp(n+"[^&]+"),n+"="+t[n]):"&"===e.slice(-1)?e+n+"="+t[n]:""===e?n+"="+t[n]:e+"&"+n+"="+t[n];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||v.i("URLParser::_parse -> Invalid URL");var r=t.split("#"),n=r[0],i=r.slice(1).join("#");for(var s in e=this._regex.exec(n),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=i},new e(t)},m.trim=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},m.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=m.getURLSearchParams(r.search),{get:function(t){return e[t]}}));else{m.check.isString(t)||(t=String(t)),t=m.trim(t);if(!1===/^https?:\/\/.+/.test(t))return void v.w("Invalid URL");var n=m.urlParse(t);r.hash=n._values.Fragment,r.host=n._values.Host?n._values.Host+(n._values.Port?":"+n._values.Port:""):"",r.href=n._values.URL,r.password=n._values.Password,r.pathname=n._values.Path,r.port=n._values.Port,r.search=n._values.QueryString?"?"+n._values.QueryString:"",r.username=n._values.Username,r.hostname=n._values.Hostname,r.protocol=n._values.Protocol?n._values.Protocol+":":"",r.origin=n._values.Origin?n._values.Origin+(n._values.Port?":"+n._values.Port:""):"",r.searchParams=function(){var t=m.getURLSearchParams("?"+n._values.QueryString);return{get:function(e){return t[e]}}}()}return r},m.normalizeTopLevelKeys=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("object"!==r(t)||null===t||Array.isArray(t))return{};var n={};for(var i in t){if(Object.hasOwnProperty.call(t,i))n[e&&Object.keys(m.info.pageProperties()).includes(i)?i:i.replace(/^#+/,"").toLowerCase()]=t[i]}return n};var v=function(){return s(function t(){e(this,t)},null,[{key:"i",value:function(){if(!this.showLog)return!1;if(!0!==this.showLog&&"string"!==this.showLog||(arguments[0]=m.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":r(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]=m.formatJsonString(arguments[0])),"object"===("undefined"==typeof console?"undefined":r(console))&&console.warn)try{return console.warn.apply(console,arguments)}catch(t){console.warn(arguments[0])}}}])}(),y=/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/,b=function(){return s(function t(){e(this,t)},null,[{key:"stripProperties",value:function(t){return m.check.isObject(t)?(m.each(t,function(t,e){m.check.isString(t)||m.check.isNumber(t)||m.check.isDate(t)||m.check.isBoolean(t)||m.check.isArray(t)||m.check.isObject(t)||v.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 m.each(t,function(t,r){y.test(r)||(v.w("invalid key: "+r),e=!1)}),e}},{key:"event",value:function(t){return!(!m.check.isString(t)||!y.test(t))||(v.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!(!m.check.isString(t)||!y.test(t))||(v.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||!!m.check.isObject(t)&&(!!this._checkPropertiesKey(t)||(v.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||!m.check.isObject(t)||m.check.isEmptyObject(t)?(v.w("properties must be objects and have values"),!1):!!this._checkPropertiesKey(t)||(v.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!(!m.check.isString(t)||!/^.{1,63}$/.test(t))||(v.w("User id must be a string that cannot be empty and is less than 64 bits"),!1)}}])}(),w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function k(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var S,x,C,z,P,O,E,D,A,I,T={},U={},R={};function B(){if(S)return R;S=1;function t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=256,r=286,n=30,i=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]),a=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]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=new Array(576);t(h);const u=new Array(60);t(u);const l=new Array(512);t(l);const p=new Array(256);t(p);const d=new Array(29);t(d);const f=new Array(n);function _(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let g,m,v;function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(f);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},k=(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)=>{k(t,r[2*e],r[2*e+1])},C=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},z=(t,e,r)=>{const n=new Array(16);let s,a,o=0;for(s=1;s<=i;s++)o=o+r[s-1]<<1,n[s]=o;for(a=0;a<=e;a++){let e=t[2*a+1];0!==e&&(t[2*a]=C(n[e]++,e))}},P=t=>{let e;for(e=0;e<r;e++)t.dyn_ltree[2*e]=0;for(e=0;e<n;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},E=(t,e,r,n)=>{const i=2*e,s=2*r;return t[i]<t[s]||t[i]===t[s]&&n[e]<=n[r]},D=(t,e,r)=>{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i<t.heap_len&&E(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!E(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n},A=(t,r,n)=>{let i,o,c,h,u=0;if(0!==t.sym_next)do{i=255&t.pending_buf[t.sym_buf+u++],i+=(255&t.pending_buf[t.sym_buf+u++])<<8,o=t.pending_buf[t.sym_buf+u++],0===i?x(t,o,r):(c=p[o],x(t,c+e+1,r),h=s[c],0!==h&&(o-=d[c],k(t,o,h)),i--,c=b(i),x(t,c,n),h=a[c],0!==h&&(i-=f[c],k(t,i,h)))}while(u<t.sym_next);x(t,256,r)},I=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,a=e.stat_desc.elems;let o,c,h,u=-1;for(t.heap_len=0,t.heap_max=573,o=0;o<a;o++)0!==r[2*o]?(t.heap[++t.heap_len]=u=o,t.depth[o]=0):r[2*o+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=u<2?++u:0,r[2*h]=1,t.depth[h]=0,t.opt_len--,s&&(t.static_len-=n[2*h+1]);for(e.max_code=u,o=t.heap_len>>1;o>=1;o--)D(t,r,o);h=a;do{o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],D(t,r,1),c=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=c,r[2*h]=r[2*o]+r[2*c],t.depth[h]=(t.depth[o]>=t.depth[c]?t.depth[o]:t.depth[c])+1,r[2*o+1]=r[2*c+1]=h,t.heap[1]=h++,D(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,h=e.stat_desc.max_length;let u,l,p,d,f,_,g=0;for(d=0;d<=i;d++)t.bl_count[d]=0;for(r[2*t.heap[t.heap_max]+1]=0,u=t.heap_max+1;u<573;u++)l=t.heap[u],d=r[2*r[2*l+1]+1]+1,d>h&&(d=h,g++),r[2*l+1]=d,l>n||(t.bl_count[d]++,f=0,l>=c&&(f=o[l-c]),_=r[2*l],t.opt_len+=_*(d+f),a&&(t.static_len+=_*(s[2*l+1]+f)));if(0!==g){do{for(d=h-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[h]--,g-=2}while(g>0);for(d=h;0!==d;d--)for(l=t.bl_count[d];0!==l;)p=t.heap[--u],p>n||(r[2*p+1]!==d&&(t.opt_len+=(d-r[2*p+1])*r[2*p],r[2*p+1]=d),l--)}})(t,e),z(r,u,t.bl_count)},T=(t,e,r)=>{let n,i,s=-1,a=e[1],o=0,c=7,h=4;for(0===a&&(c=138,h=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++o<c&&i===a||(o<h?t.bl_tree[2*i]+=o:0!==i?(i!==s&&t.bl_tree[2*i]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=i,0===a?(c=138,h=3):i===a?(c=6,h=3):(c=7,h=4))},U=(t,e,r)=>{let n,i,s=-1,a=e[1],o=0,c=7,h=4;for(0===a&&(c=138,h=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++o<c&&i===a)){if(o<h)do{x(t,i,t.bl_tree)}while(0!==--o);else 0!==i?(i!==s&&(x(t,i,t.bl_tree),o--),x(t,16,t.bl_tree),k(t,o-3,2)):o<=10?(x(t,17,t.bl_tree),k(t,o-3,3)):(x(t,18,t.bl_tree),k(t,o-11,7));o=0,s=i,0===a?(c=138,h=3):i===a?(c=6,h=3):(c=7,h=4)}};let B=!1;const j=(t,e,r,n)=>{k(t,0+(n?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 R._tr_init=t=>{B||((()=>{let t,e,c,y,b;const w=new Array(16);for(c=0,y=0;y<28;y++)for(d[y]=c,t=0;t<1<<s[y];t++)p[c++]=y;for(p[c-1]=y,b=0,y=0;y<16;y++)for(f[y]=b,t=0;t<1<<a[y];t++)l[b++]=y;for(b>>=7;y<n;y++)for(f[y]=b<<7,t=0;t<1<<a[y]-7;t++)l[256+b++]=y;for(e=0;e<=i;e++)w[e]=0;for(t=0;t<=143;)h[2*t+1]=8,t++,w[8]++;for(;t<=255;)h[2*t+1]=9,t++,w[9]++;for(;t<=279;)h[2*t+1]=7,t++,w[7]++;for(;t<=287;)h[2*t+1]=8,t++,w[8]++;for(z(h,287,w),t=0;t<n;t++)u[2*t+1]=5,u[2*t]=C(t,5);g=new _(h,s,257,r,i),m=new _(u,a,0,n,i),v=new _(new Array(0),o,0,19,7)})(),B=!0),t.l_desc=new y(t.dyn_ltree,g),t.d_desc=new y(t.dyn_dtree,m),t.bl_desc=new y(t.bl_tree,v),t.bi_buf=0,t.bi_valid=0,P(t)},R._tr_stored_block=j,R._tr_flush_block=(t,r,n,i)=>{let s,a,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let r,n=4093624447;for(r=0;r<=31;r++,n>>>=1)if(1&n&&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)),I(t,t.l_desc),I(t,t.d_desc),o=(t=>{let e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),s=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=s&&(s=a)):s=a=n+5,n+4<=s&&-1!==r?j(t,r,n,i):4===t.strategy||a===s?(k(t,2+(i?1:0),3),A(t,h,u)):(k(t,4+(i?1:0),3),((t,e,r,n)=>{let i;for(k(t,e-257,5),k(t,r-1,5),k(t,n-4,4),i=0;i<n;i++)k(t,t.bl_tree[2*c[i]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),A(t,t.dyn_ltree,t.dyn_dtree)),P(t),i&&O(t)},R._tr_tally=(t,r,n)=>(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++]=n,0===r?t.dyn_ltree[2*n]++:(t.matches++,r--,t.dyn_ltree[2*(p[n]+e+1)]++,t.dyn_dtree[2*b(r)]++),t.sym_next===t.sym_end),R._tr_align=t=>{k(t,2,3),x(t,256,h),(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)},R}function j(){return E?O:(E=1,O={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 A?D:(A=1,D={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 N(){if(I)return U;I=1;const{_tr_init:t,_tr_stored_block:e,_tr_flush_block:r,_tr_tally:n,_tr_align:i}=B(),s=C?x:(C=1,x=(t,e,r,n)=>{let i=65535&t,s=t>>>16&65535,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+e[n++]|0,s=s+i|0}while(--a);i%=65521,s%=65521}return i|s<<16}),a=function(){if(P)return z;P=1;const t=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());return z=(e,r,n,i)=>{const s=t,a=i+n;e^=-1;for(let t=i;t<a;t++)e=e>>>8^s[255&(e^r[t])];return-1^e}}(),o=j(),{Z_NO_FLUSH:c,Z_PARTIAL_FLUSH:h,Z_FULL_FLUSH:u,Z_FINISH:l,Z_BLOCK:p,Z_OK:d,Z_STREAM_END:f,Z_STREAM_ERROR:_,Z_DATA_ERROR:g,Z_BUF_ERROR:m,Z_DEFAULT_COMPRESSION:v,Z_FILTERED:y,Z_HUFFMAN_ONLY:b,Z_RLE:w,Z_FIXED:k,Z_DEFAULT_STRATEGY:S,Z_UNKNOWN:O,Z_DEFLATED:E}=L(),D=258,A=262,T=42,R=113,N=666,M=(t,e)=>(t.msg=o[e],e),H=t=>2*t-(t>4?9:0),F=t=>{let e=t.length;for(;--e>=0;)t[e]=0},q=t=>{let e,r,n,i=t.w_size;e=t.hash_size,n=e;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);e=i,n=e;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)};let Z=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const J=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))},K=(t,e)=>{r(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,J(t.strm)},W=(t,e)=>{t.pending_buf[t.pending++]=e},V=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},X=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=s(t.adler,e,i,r):2===t.state.wrap&&(t.adler=a(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Q=(t,e)=>{let r,n,i=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match;const c=t.strstart>t.w_size-A?t.strstart-(t.w_size-A):0,h=t.window,u=t.w_mask,l=t.prev,p=t.strstart+D;let d=h[s+a-1],f=h[s+a];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(r=e,h[r+a]===f&&h[r+a-1]===d&&h[r]===h[s]&&h[++r]===h[s+1]){s+=2,r++;do{}while(h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&h[++s]===h[++r]&&s<p);if(n=D-(p-s),s=p-D,n>a){if(t.match_start=e,a=n,n>=o)break;d=h[s+a-1],f=h[s+a]}}}while((e=l[e&u])>c&&0!==--i);return a<=t.lookahead?a:t.lookahead},$=t=>{const e=t.w_size;let r,n,i;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-A)&&(t.window.set(t.window.subarray(e,e+e-n),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),q(t),n+=e),0===t.strm.avail_in)break;if(r=X(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=Z(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=Z(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<A&&0!==t.strm.avail_in)},Y=(t,r)=>{let n,i,s,a=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,o=0,h=t.strm.avail_in;do{if(n=65535,s=t.bi_valid+42>>3,t.strm.avail_out<s)break;if(s=t.strm.avail_out-s,i=t.strstart-t.block_start,n>i+t.strm.avail_in&&(n=i+t.strm.avail_in),n>s&&(n=s),n<a&&(0===n&&r!==l||r===c||n!==i+t.strm.avail_in))break;o=r===l&&n===i+t.strm.avail_in?1:0,e(t,0,0,o),t.pending_buf[t.pending-4]=n,t.pending_buf[t.pending-3]=n>>8,t.pending_buf[t.pending-2]=~n,t.pending_buf[t.pending-1]=~n>>8,J(t.strm),i&&(i>n&&(i=n),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,n-=i),n&&(X(t.strm,t.strm.output,t.strm.next_out,n),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n)}while(0===o);return h-=t.strm.avail_in,h&&(h>=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<=h&&(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-h,t.strm.next_in),t.strstart),t.strstart+=h,t.insert+=h>t.w_size-t.insert?t.w_size-t.insert:h),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),o?4:r!==c&&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&&(X(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,a=s>t.w_size?t.w_size:s,i=t.strstart-t.block_start,(i>=a||(i||r===l)&&r!==c&&0===t.strm.avail_in&&i<=s)&&(n=i>s?s:i,o=r===l&&0===t.strm.avail_in&&n===i?1:0,e(t,t.block_start,n,o),t.block_start+=n,J(t.strm)),o?3:1)},G=(t,e)=>{let r,i;for(;;){if(t.lookahead<A){if($(t),t.lookahead<A&&e===c)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Z(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-A&&(t.match_length=Q(t,r)),t.match_length>=3)if(i=n(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=Z(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=Z(t,t.ins_h,t.window[t.strstart+1]);else i=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(K(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2},tt=(t,e)=>{let r,i,s;for(;;){if(t.lookahead<A){if($(t),t.lookahead<A&&e===c)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Z(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-A&&(t.match_length=Q(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,i=n(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=Z(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++,i&&(K(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=n(t,0,t.window[t.strstart-1]),i&&K(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&&(i=n(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2};function et(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const rt=[new et(0,0,0,0,Y),new et(4,4,8,4,G),new et(4,5,16,8,G),new et(4,6,32,32,G),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 nt(){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=E,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),F(this.dyn_ltree),F(this.dyn_dtree),F(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),F(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),F(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 it=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==T&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==R&&e.status!==N?1:0},st=e=>{if(it(e))return M(e,_);e.total_in=e.total_out=0,e.data_type=O;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?T:R,e.adler=2===r.wrap?0:1,r.last_flush=-2,t(r),d},at=t=>{const e=st(t);var r;return e===d&&((r=t.state).window_size=2*r.w_size,F(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},ot=(t,e,r,n,i,s)=>{if(!t)return _;let a=1;if(e===v&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||r!==E||n<8||n>15||e<0||e>9||s<0||s>k||8===n&&1!==a)return M(t,_);8===n&&(n=9);const o=new nt;return t.state=o,o.strm=t,o.status=T,o.wrap=a,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),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<<i+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,at(t)};return U.deflateInit=(t,e)=>ot(t,e,E,15,8,S),U.deflateInit2=ot,U.deflateReset=at,U.deflateResetKeep=st,U.deflateSetHeader=(t,e)=>it(t)||2!==t.state.wrap?_:(t.state.gzhead=e,d),U.deflate=(t,r)=>{if(it(t)||r>p||r<0)return t?M(t,_):_;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?m:_);const o=s.last_flush;if(s.last_flush=r,0!==s.pending){if(J(t),0===t.avail_out)return s.last_flush=-1,d}else if(0===t.avail_in&&H(r)<=H(o)&&r!==l)return M(t,m);if(s.status===N&&0!==t.avail_in)return M(t,m);if(s.status===T&&0===s.wrap&&(s.status=R),s.status===T){let e=E+(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,V(s,e),0!==s.strstart&&(V(s,t.adler>>>16),V(s,65535&t.adler)),t.adler=1,s.status=R,J(t),0!==s.pending)return s.last_flush=-1,d}if(57===s.status)if(t.adler=0,W(s,31),W(s,139),W(s,8),s.gzhead)W(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)),W(s,255&s.gzhead.time),W(s,s.gzhead.time>>8&255),W(s,s.gzhead.time>>16&255),W(s,s.gzhead.time>>24&255),W(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),W(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(W(s,255&s.gzhead.extra.length),W(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=a(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(W(s,0),W(s,0),W(s,0),W(s,0),W(s,0),W(s,9===s.level?2:s.strategy>=b||s.level<2?4:0),W(s,3),s.status=R,J(t),0!==s.pending)return s.last_flush=-1,d;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 n=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+n),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>e&&(t.adler=a(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex+=n,J(t),0!==s.pending)return s.last_flush=-1,d;e=0,r-=n}let n=new Uint8Array(s.gzhead.extra);s.pending_buf.set(n.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending+=r,s.gzhead.hcrc&&s.pending>e&&(t.adler=a(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=a(t.adler,s.pending_buf,s.pending-r,r)),J(t),0!==s.pending)return s.last_flush=-1,d;r=0}e=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,W(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=a(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=a(t.adler,s.pending_buf,s.pending-r,r)),J(t),0!==s.pending)return s.last_flush=-1,d;r=0}e=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,W(s,e)}while(0!==e);s.gzhead.hcrc&&s.pending>r&&(t.adler=a(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&&(J(t),0!==s.pending))return s.last_flush=-1,d;W(s,255&t.adler),W(s,t.adler>>8&255),t.adler=0}if(s.status=R,J(t),0!==s.pending)return s.last_flush=-1,d}if(0!==t.avail_in||0!==s.lookahead||r!==c&&s.status!==N){let a=0===s.level?Y(s,r):s.strategy===b?((t,e)=>{let r;for(;;){if(0===t.lookahead&&($(t),0===t.lookahead)){if(e===c)return 1;break}if(t.match_length=0,r=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(K(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2})(s,r):s.strategy===w?((t,e)=>{let r,i,s,a;const o=t.window;for(;;){if(t.lookahead<=D){if($(t),t.lookahead<=D&&e===c)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(s=t.strstart-1,i=o[s],i===o[++s]&&i===o[++s]&&i===o[++s])){a=t.strstart+D;do{}while(i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&i===o[++s]&&s<a);t.match_length=D-(a-s),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=n(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=n(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(K(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===l?(K(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(K(t,!1),0===t.strm.avail_out)?1:2})(s,r):rt[s.level].func(s,r);if(3!==a&&4!==a||(s.status=N),1===a||3===a)return 0===t.avail_out&&(s.last_flush=-1),d;if(2===a&&(r===h?i(s):r!==p&&(e(s,0,0,!1),r===u&&(F(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),J(t),0===t.avail_out))return s.last_flush=-1,d}return r!==l?d:s.wrap<=0?f:(2===s.wrap?(W(s,255&t.adler),W(s,t.adler>>8&255),W(s,t.adler>>16&255),W(s,t.adler>>24&255),W(s,255&t.total_in),W(s,t.total_in>>8&255),W(s,t.total_in>>16&255),W(s,t.total_in>>24&255)):(V(s,t.adler>>>16),V(s,65535&t.adler)),J(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?d:f)},U.deflateEnd=t=>{if(it(t))return _;const e=t.state.status;return t.state=null,e===R?M(t,g):d},U.deflateSetDictionary=(t,e)=>{let r=e.length;if(it(t))return _;const n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==T||n.lookahead)return _;if(1===i&&(t.adler=s(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(F(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const a=t.avail_in,o=t.next_in,c=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,$(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=Z(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,$(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=o,t.input=c,t.avail_in=a,n.wrap=i,d},U.deflateInfo="pako deflate (from Nodeca project)",U}var M,H={};var F,q,Z,J,K={};function W(){if(F)return K;F=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,K.string2buf=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,s,a=t.length,o=0;for(i=0;i<a;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<a&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),o+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(o),s=0,i=0;s<o;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<a&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),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 K.buf2string=(r,n)=>{const i=n||r.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(r.subarray(0,n));let s,a;const o=new Array(2*i);for(a=0,s=0;s<i;){let t=r[s++];if(t<128){o[a++]=t;continue}let n=e[t];if(n>4)o[a++]=65533,s+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&s<i;)t=t<<6|63&r[s++],n--;n>1?o[a++]=65533:t<65536?o[a++]=t:(t-=65536,o[a++]=55296|t>>10&1023,o[a++]=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 n="";for(let t=0;t<r;t++)n+=String.fromCharCode(e[t]);return n})(o,a)},K.utf8border=(t,r)=>{(r=r||t.length)>t.length&&(r=t.length);let n=r-1;for(;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?r:n+e[t[n]]>r?n:r},K}var V=function(){if(J)return T;J=1;const t=N(),e=function(){if(M)return H;M=1;const t=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);return H.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const r in n)t(n,r)&&(e[r]=n[r])}}return e},H.flattenChunks=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,i=t.length;e<i;e++){let i=t[e];r.set(i,n),n+=i.length}return r},H}(),r=W(),n=j(),i=Z?q:(Z=1,q=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:a,Z_SYNC_FLUSH:o,Z_FULL_FLUSH:c,Z_FINISH:h,Z_OK:u,Z_STREAM_END:l,Z_DEFAULT_COMPRESSION:p,Z_DEFAULT_STRATEGY:d,Z_DEFLATED:f}=L();function _(a){this.options=e.assign({level:p,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:d},a||{});let o=this.options;o.raw&&o.windowBits>0?o.windowBits=-o.windowBits:o.gzip&&o.windowBits>0&&o.windowBits<16&&(o.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;let c=t.deflateInit2(this.strm,o.level,o.method,o.windowBits,o.memLevel,o.strategy);if(c!==u)throw new Error(n[c]);if(o.header&&t.deflateSetHeader(this.strm,o.header),o.dictionary){let e;if(e="string"==typeof o.dictionary?r.string2buf(o.dictionary):"[object ArrayBuffer]"===s.call(o.dictionary)?new Uint8Array(o.dictionary):o.dictionary,c=t.deflateSetDictionary(this.strm,e),c!==u)throw new Error(n[c]);this._dict_set=!0}}function g(t,e){const r=new _(e);if(r.push(t,!0),r.err)throw r.msg||n[r.err];return r.result}return _.prototype.push=function(e,n){const i=this.strm,p=this.options.chunkSize;let d,f;if(this.ended)return!1;for(f=n===~~n?n:!0===n?h:a,"string"==typeof e?i.input=r.string2buf(e):"[object ArrayBuffer]"===s.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(p),i.next_out=0,i.avail_out=p),(f===o||f===c)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(d=t.deflate(i,f),d===l)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),d=t.deflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===u;if(0!==i.avail_out){if(f>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},_.prototype.onData=function(t){this.chunks.push(t)},_.prototype.onEnd=function(t){t===u&&(this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},T.Deflate=_,T.deflate=g,T.deflateRaw=function(t,e){return(e=e||{}).raw=!0,g(t,e)},T.gzip=function(t,e){return(e=e||{}).gzip=!0,g(t,e)},T.constants=L(),T}(),X={exports:{}};var Q,$={exports:{}};function Y(){return Q||(Q=1,$.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!==w&&w.crypto&&(r=w.crypto),!r)try{r=require("crypto")}catch(t){}var n=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.")},i=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=i(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)}},c=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,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var s=0;s<i;s++){var a=r[s>>>2]>>>24-s%4*8&255;e[n+s>>>2]|=a<<24-(n+s)%4*8}else for(var o=0;o<i;o+=4)e[n+o>>>2]=r[o>>>2];return this.sigBytes+=i,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(n());return new c.init(e,t)}}),h=s.enc={},u=h.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var s=e[i>>>2]>>>24-i%4*8&255;n.push((s>>>4).toString(16)),n.push((15&s).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new c.init(r,e/2)}},l=h.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i<r;i++){var s=e[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(s))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new c.init(r,e)}},p=h.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 c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,n=this._data,i=n.words,s=n.sigBytes,a=this.blockSize,o=s/(4*a),h=(o=e?t.ceil(o):t.max((0|o)-this._minBufferSize,0))*a,u=t.min(4*h,s);if(h){for(var l=0;l<h;l+=a)this._doProcessBlock(i,l);r=i.splice(0,h),n.sigBytes-=u}return new c.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 f.HMAC.init(t,r).finalize(e)}}});var f=s.algo={};return s}(Math);return t}()),$.exports}var G;var tt,et=k(G?X.exports:(G=1,X.exports=function(t){return t.enc.Utf8}(Y()))),rt={exports:{}},nt={exports:{}};function it(){return tt?nt.exports:(tt=1,nt.exports=function(t){return function(){var e=t,r=e.lib.WordArray;function n(t,e,n){for(var i=[],s=0,a=0;a<e;a++)if(a%4){var o=n[t.charCodeAt(a-1)]<<a%4*2|n[t.charCodeAt(a)]>>>6-a%4*2;i[s>>>2]|=o<<24-s%4*8,s++}return r.create(i,s)}e.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp();for(var i=[],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++)i.push(n.charAt(a>>>6*(3-o)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(t){var e=t.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var s=0;s<r.length;s++)i[r.charCodeAt(s)]=s}var a=r.charAt(64);if(a){var o=t.indexOf(a);-1!==o&&(e=o)}return n(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64}(Y()))}var st,at={exports:{}};function ot(){return st||(st=1,at.exports=function(t){return function(e){var r=t,n=r.lib,i=n.WordArray,s=n.Hasher,a=r.algo,o=[];!function(){for(var t=0;t<64;t++)o[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=a.MD5=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var n=e+r,i=t[n];t[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var s=this._hash.words,a=t[e+0],c=t[e+1],d=t[e+2],f=t[e+3],_=t[e+4],g=t[e+5],m=t[e+6],v=t[e+7],y=t[e+8],b=t[e+9],w=t[e+10],k=t[e+11],S=t[e+12],x=t[e+13],C=t[e+14],z=t[e+15],P=s[0],O=s[1],E=s[2],D=s[3];P=h(P,O,E,D,a,7,o[0]),D=h(D,P,O,E,c,12,o[1]),E=h(E,D,P,O,d,17,o[2]),O=h(O,E,D,P,f,22,o[3]),P=h(P,O,E,D,_,7,o[4]),D=h(D,P,O,E,g,12,o[5]),E=h(E,D,P,O,m,17,o[6]),O=h(O,E,D,P,v,22,o[7]),P=h(P,O,E,D,y,7,o[8]),D=h(D,P,O,E,b,12,o[9]),E=h(E,D,P,O,w,17,o[10]),O=h(O,E,D,P,k,22,o[11]),P=h(P,O,E,D,S,7,o[12]),D=h(D,P,O,E,x,12,o[13]),E=h(E,D,P,O,C,17,o[14]),P=u(P,O=h(O,E,D,P,z,22,o[15]),E,D,c,5,o[16]),D=u(D,P,O,E,m,9,o[17]),E=u(E,D,P,O,k,14,o[18]),O=u(O,E,D,P,a,20,o[19]),P=u(P,O,E,D,g,5,o[20]),D=u(D,P,O,E,w,9,o[21]),E=u(E,D,P,O,z,14,o[22]),O=u(O,E,D,P,_,20,o[23]),P=u(P,O,E,D,b,5,o[24]),D=u(D,P,O,E,C,9,o[25]),E=u(E,D,P,O,f,14,o[26]),O=u(O,E,D,P,y,20,o[27]),P=u(P,O,E,D,x,5,o[28]),D=u(D,P,O,E,d,9,o[29]),E=u(E,D,P,O,v,14,o[30]),P=l(P,O=u(O,E,D,P,S,20,o[31]),E,D,g,4,o[32]),D=l(D,P,O,E,y,11,o[33]),E=l(E,D,P,O,k,16,o[34]),O=l(O,E,D,P,C,23,o[35]),P=l(P,O,E,D,c,4,o[36]),D=l(D,P,O,E,_,11,o[37]),E=l(E,D,P,O,v,16,o[38]),O=l(O,E,D,P,w,23,o[39]),P=l(P,O,E,D,x,4,o[40]),D=l(D,P,O,E,a,11,o[41]),E=l(E,D,P,O,f,16,o[42]),O=l(O,E,D,P,m,23,o[43]),P=l(P,O,E,D,b,4,o[44]),D=l(D,P,O,E,S,11,o[45]),E=l(E,D,P,O,z,16,o[46]),P=p(P,O=l(O,E,D,P,d,23,o[47]),E,D,a,6,o[48]),D=p(D,P,O,E,v,10,o[49]),E=p(E,D,P,O,C,15,o[50]),O=p(O,E,D,P,g,21,o[51]),P=p(P,O,E,D,S,6,o[52]),D=p(D,P,O,E,f,10,o[53]),E=p(E,D,P,O,w,15,o[54]),O=p(O,E,D,P,c,21,o[55]),P=p(P,O,E,D,y,6,o[56]),D=p(D,P,O,E,z,10,o[57]),E=p(E,D,P,O,m,15,o[58]),O=p(O,E,D,P,x,21,o[59]),P=p(P,O,E,D,_,6,o[60]),D=p(D,P,O,E,k,10,o[61]),E=p(E,D,P,O,d,15,o[62]),O=p(O,E,D,P,b,21,o[63]),s[0]=s[0]+P|0,s[1]=s[1]+O|0,s[2]=s[2]+E|0,s[3]=s[3]+D|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var s=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),r[14+(i+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,c=o.words,h=0;h<4;h++){var u=c[h];c[h]=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 h(t,e,r,n,i,s,a){var o=t+(e&r|~e&n)+i+a;return(o<<s|o>>>32-s)+e}function u(t,e,r,n,i,s,a){var o=t+(e&n|r&~n)+i+a;return(o<<s|o>>>32-s)+e}function l(t,e,r,n,i,s,a){var o=t+(e^r^n)+i+a;return(o<<s|o>>>32-s)+e}function p(t,e,r,n,i,s,a){var o=t+(r^(e|~n))+i+a;return(o<<s|o>>>32-s)+e}r.MD5=s._createHelper(c),r.HmacMD5=s._createHmacHelper(c)}(Math),t.MD5}(Y())),at.exports}var ct,ht={exports:{}},ut={exports:{}};function lt(){return ct?ut.exports:(ct=1,ut.exports=function(t){return r=(e=t).lib,n=r.WordArray,i=r.Hasher,s=e.algo,a=[],o=s.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],i=r[1],s=r[2],o=r[3],c=r[4],h=0;h<80;h++){if(h<16)a[h]=0|t[e+h];else{var u=a[h-3]^a[h-8]^a[h-14]^a[h-16];a[h]=u<<1|u>>>31}var l=(n<<5|n>>>27)+c+a[h];l+=h<20?1518500249+(i&s|~i&o):h<40?1859775393+(i^s^o):h<60?(i&s|i&o|s&o)-1894007588:(i^s^o)-899497514,c=o,o=s,s=i<<30|i>>>2,i=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+s|0,r[3]=r[3]+o|0,r[4]=r[4]+c|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(n+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=i._createHelper(o),e.HmacSHA1=i._createHmacHelper(o),t.SHA1;var e,r,n,i,s,a,o}(Y()))}var pt,dt={exports:{}};var ft;function _t(){return ft?ht.exports:(ft=1,ht.exports=function(t){return function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,s=e.algo,a=s.MD5,o=s.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r,n=this.cfg,s=n.hasher.create(),a=i.create(),o=a.words,c=n.keySize,h=n.iterations;o.length<c;){r&&s.update(r),r=s.update(t).finalize(e),s.reset();for(var u=1;u<h;u++)r=s.finalize(r),s.reset();a.concat(r)}return a.sigBytes=4*c,a}});e.EvpKDF=function(t,e,r){return o.create(r).compute(t,e)}}(),t.EvpKDF}(Y(),lt(),pt||(pt=1,dt.exports=(e=(t=Y()).lib.Base,r=t.enc.Utf8,void(t.algo.HMAC=e.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=r.parse(e));var n=t.blockSize,i=4*n;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var s=this._oKey=e.clone(),a=this._iKey=e.clone(),o=s.words,c=a.words,h=0;h<n;h++)o[h]^=1549556828,c[h]^=909522486;s.sigBytes=a.sigBytes=i,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))}}))))));var t,e,r}var gt,mt={exports:{}};var vt;var yt=(vt||(vt=1,rt.exports=function(t){return function(){var e=t,r=e.lib.BlockCipher,n=e.algo,i=[],s=[],a=[],o=[],c=[],h=[],u=[],l=[],p=[],d=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var r=0,n=0;for(e=0;e<256;e++){var f=n^n<<1^n<<2^n<<3^n<<4;f=f>>>8^255&f^99,i[r]=f,s[f]=r;var _=t[r],g=t[_],m=t[g],v=257*t[f]^16843008*f;a[r]=v<<24|v>>>8,o[r]=v<<16|v>>>16,c[r]=v<<8|v>>>24,h[r]=v,v=16843009*m^65537*g^257*_^16843008*r,u[f]=v<<24|v>>>8,l[f]=v<<16|v>>>16,p[f]=v<<8|v>>>24,d[f]=v,r?(r=_^t[t[t[m^_]]],n^=t[t[n]]):r=n=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],_=n.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,n=4*((this._nRounds=r+6)+1),s=this._keySchedule=[],a=0;a<n;a++)a<r?s[a]=e[a]:(h=s[a-1],a%r?r>6&&a%r==4&&(h=i[h>>>24]<<24|i[h>>>16&255]<<16|i[h>>>8&255]<<8|i[255&h]):(h=i[(h=h<<8|h>>>24)>>>24]<<24|i[h>>>16&255]<<16|i[h>>>8&255]<<8|i[255&h],h^=f[a/r|0]<<24),s[a]=s[a-r]^h);for(var o=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var h=s[a];else h=s[a-4];o[c]=c<4||a<=4?h:u[i[h>>>24]]^l[i[h>>>16&255]]^p[i[h>>>8&255]]^d[i[255&h]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,o,c,h,i)},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,p,d,s),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,n,i,s,a,o){for(var c=this._nRounds,h=t[e]^r[0],u=t[e+1]^r[1],l=t[e+2]^r[2],p=t[e+3]^r[3],d=4,f=1;f<c;f++){var _=n[h>>>24]^i[u>>>16&255]^s[l>>>8&255]^a[255&p]^r[d++],g=n[u>>>24]^i[l>>>16&255]^s[p>>>8&255]^a[255&h]^r[d++],m=n[l>>>24]^i[p>>>16&255]^s[h>>>8&255]^a[255&u]^r[d++],v=n[p>>>24]^i[h>>>16&255]^s[u>>>8&255]^a[255&l]^r[d++];h=_,u=g,l=m,p=v}_=(o[h>>>24]<<24|o[u>>>16&255]<<16|o[l>>>8&255]<<8|o[255&p])^r[d++],g=(o[u>>>24]<<24|o[l>>>16&255]<<16|o[p>>>8&255]<<8|o[255&h])^r[d++],m=(o[l>>>24]<<24|o[p>>>16&255]<<16|o[h>>>8&255]<<8|o[255&u])^r[d++],v=(o[p>>>24]<<24|o[h>>>16&255]<<16|o[u>>>8&255]<<8|o[255&l])^r[d++],t[e]=_,t[e+1]=g,t[e+2]=m,t[e+3]=v},keySize:8});e.AES=r._createHelper(_)}(),t.AES}(Y(),it(),ot(),_t(),gt||(gt=1,mt.exports=function(t){t.lib.Cipher||function(e){var r=t,n=r.lib,i=n.Base,s=n.WordArray,a=n.BufferedBlockAlgorithm,o=r.enc;o.Utf8;var c=o.Base64,h=r.algo.EvpKDF,u=n.Cipher=a.extend({cfg:i.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:m}return function(e){return{encrypt:function(r,n,i){return t(n).encrypt(e,r,n,i)},decrypt:function(r,n,i){return t(n).decrypt(e,r,n,i)}}}}()});n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=r.mode={},p=n.BlockCipherMode=i.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=p.extend();function r(t,r,n){var i,s=this._iv;s?(i=s,this._iv=e):i=this._prevBlock;for(var a=0;a<n;a++)t[r+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize;r.call(this,t,e,i),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),t.Decryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize,s=t.slice(e,e+i);n.decryptBlock(t,e),r.call(this,t,e,i),this._prevBlock=s}}),t}(),f=(r.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,n=r-t.sigBytes%r,i=n<<24|n<<16|n<<8|n,a=[],o=0;o<n;o+=4)a.push(i);var c=s.create(a,n);t.concat(c)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}};n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:d,padding:f}),reset:function(){var t;u.reset.call(this);var e=this.cfg,r=e.iv,n=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=n.createEncryptor:(t=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(n,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 _=n.CipherParams=i.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(c)},parse:function(t){var e,r=c.parse(t),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=s.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),_.create({ciphertext:r,salt:e})}},m=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var i=t.createEncryptor(r,n),s=i.finalize(e),a=i.cfg;return _.create({ciphertext:s,key:r,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,r,n){return n=this.cfg.extend(n),e=this._parse(e,n.format),t.createDecryptor(r,n).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),v=(r.kdf={}).OpenSSL={execute:function(t,e,r,n,i){if(n||(n=s.random(8)),i)a=h.create({keySize:e+r,hasher:i}).compute(t,n);else var a=h.create({keySize:e+r}).compute(t,n);var o=s.create(a.words.slice(e),4*r);return a.sigBytes=4*e,_.create({key:a,iv:o,salt:n})}},y=n.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:v}),encrypt:function(t,e,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,t.keySize,t.ivSize,n.salt,n.hasher);n.iv=i.iv;var s=m.encrypt.call(this,t,e,i.key,n);return s.mixIn(i),s},decrypt:function(t,e,r,n){n=this.cfg.extend(n),e=this._parse(e,n.format);var i=n.kdf.execute(r,t.keySize,t.ivSize,e.salt,n.hasher);return n.iv=i.iv,m.decrypt.call(this,t,e,i.key,n)}})}()}(Y(),_t())))),rt.exports),bt=k(yt);function wt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var St="distinct_id_origin",xt="identify",Ct="logout",zt="init",Pt="funsdata",Ot={_name:Pt,appId:"",persistence:"localStorage",persistencePrefix:"FunsDataJSSDK",persistenceEnabled:!0,crossSubDomain:!0,maxReferrerStringLength:200,showLog:!0,dataSendTimeout:3e3,useAppTrack:!1,strict:!1,tryCount:3,enableCalibrationTime:!1},Et=function(t){this._state={},this.crossSubDomain=t.crossSubDomain,this.enabled=t.persistenceEnabled;var e=null;if(this.enabled){if(!1===t.crossSubDomain){var r=m.url("sub",location.href);this.name="string"==typeof r&&""!==r?t.persistencePrefix+"_"+r:t.persistencePrefix+"_root"}else this.name=t.persistencePrefix+"_cross";var n=t.persistence;"cookie"!==n&&"localStorage"!==n&&(v.i("Unknown persistence type "+n+"; falling back to cookie"),n=t.persistence="cookie"),"localStorage"===n&&m.localStorage.isSupported()?(this.storage=m.localStorage,(e=m.cookie.get(this.name))&&m.cookie.remove(this.name,this.crossSubDomain)):(v.i("localStorage is not support by the browser; falling back to cookie"),this.storage=m.cookie)}if(this._load(e),!this.getDistinctId()){var i=t.uuid?t.uuid:m.UUID();this._setDeviceId(i),this.setDistinctId(i,zt)}};Et.prototype._load=function(t){var e;this.enabled&&(null!==(e=null!==t?t:this.storage.get(this.name))&&m.check.isJSONString(e)&&(this._state=m.extend({},JSON.parse(e))),null!==t&&this._save())},Et.prototype.getDistinctId=function(){return this._state.distinct_id},Et.prototype.setDistinctId=function(t,e){this._set("distinct_id",t),this._set(St,e)},Et.prototype.setEnableTracking=function(t){this._set("enable_tracking",t)},Et.prototype.getEnableTracking=function(){return!!m.check.isUndefined(this._state.enable_tracking)||this._state.enable_tracking},Et.prototype.clear=function(){this._state={},this._save()},Et.prototype.setOptTracking=function(t){this._set("opt_tracking",t)},Et.prototype.getOptTracking=function(){return!!m.check.isUndefined(this._state.opt_tracking)||this._state.opt_tracking},Et.prototype.getAccountId=function(){return this._state.account_id},Et.prototype.setAccountId=function(t){this._set("account_id",t)},Et.prototype.getDeviceId=function(){return this._state.device_id},Et.prototype.setSuperProperties=function(t){this._set("super_properties",t)},Et.prototype.getSuperProperties=function(){return this._state.super_properties||{}},Et.prototype.setEventTimer=function(t,e){var r=this._state.event_timers||{};r[t]=e,this._set("event_timers",r)},Et.prototype.clearEventTimer=function(){this._set("event_timers",{})},Et.prototype.removeEventTimer=function(t){var e=(this._state.event_timers||{})[t];return m.check.isUndefined(e)||(delete this._state.event_timers[t],this._save()),e},Et.prototype._setDeviceId=function(t){this._state.device_id?v.w("Current device_id is ",this.getDeviceId(),", it couldn't been set to: ",t):this._set("device_id",t)},Et.prototype._save=function(){this.enabled&&this.storage.set(this.name,JSON.stringify(this._state),73e3,this.crossSubDomain)},Et.prototype._set=function(t,e){this._state=this._state||{},this._state[t]=e,this._save()};var Dt=function(){};Dt.prototype.trackLink=function(t,e,r){var n=this;if(this._isCollectData()){var i=this._getConfig("strict");if(b.properties(r)||!i){if(t&&m.check.isObject(t)){var s=[];m.each(t,function(t,e){t&&m.check.isArray(t)&&m.each(t,function(t){switch(e){case"tag":m.each(document.getElementsByTagName(t),function(t){s.indexOf(t)<0&&s.push(t)});break;case"class":m.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)}})}),m.each(s,function(t){if(null!==t){var s=m.extend({},m.info.pageProperties(),r);s["#element_type"]=t.nodeName.toLowerCase(),m.check.isUndefined(s.name)&&(s.name=t.getAttribute("td-name")||t.innerHTML||t.value||"Unable to get Identify"),t.addEventListener("click",function(){n._sendRequest({type:"track",event:e,properties:i?b.stripProperties(s):s})})}})}}else v.w("trackLink failed due to invalid properties.")}},Dt.prototype.setPageProperty=function(t){this._isCollectData()&&(b.properties(t)||!this._getConfig("strict")?m.extend(this.currentProps,t):v.w("Page property setting error"))},Dt.prototype.getPageProperty=function(){return this.currentProps},Dt.prototype.getPresetProperties=function(){var t=m.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},Dt.prototype.login=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),b.userId(t)||!this._getConfig("strict")?t!==this.persistence.getAccountId()&&this.persistence.setAccountId(t):v.e("The parameters of the login API must be strings"))},Dt.prototype.logout=function(t){if(this._isCollectData()){if(!0===t){var e=m.UUID();this.persistence.setDistinctId(e,Ct)}this.persistence.setAccountId("")}},Dt.prototype.userSet=function(t,e){this._isCollectData()&&(!b.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_set",properties:t},e))},Dt.prototype.userSetOnce=function(t,e){this._isCollectData()&&(!b.propertiesMust(t)&&this._getConfig("strict")||this._sendRequest({type:"user_setOnce",properties:t},e))},Dt.prototype.userUnset=function(t,e){if(this._isCollectData()&&(b.propertyName(t)||!this._getConfig("strict"))){var r={};r[t]=0,this._sendRequest({type:"user_unset",properties:r},e)}},Dt.prototype.userAdd=function(t,e){if(this._isCollectData()){if(m.check.isString(t)){var r=t;(t={})[r]=1}b.propertiesMust(t)&&(!function(t){for(var e in t)if(!/-*\d+/.test(String(t[e])))return!1;return!0}(t)&&this._getConfig("strict")?v.w("The property value of useradd api must be a number"):this._sendRequest({type:"user_add",properties:t},e))}},Dt.prototype.userAppend=function(t,e){this._isCollectData()&&(b.propertiesMust(t)&&function(t){for(var e in t)if(!m.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_append",properties:t},e):v.w("The value in the userAppend property can only be Array"))},Dt.prototype.userUniqAppend=function(t,e){this._isCollectData()&&(b.propertiesMust(t)&&function(t){for(var e in t)if(!m.check.isArray(t[e]))return!1;return!0}(t)||!this._getConfig("strict")?this._sendRequest({type:"user_uniq_append",properties:t},e):v.w("The value in the userUniqAppend property can only be Array"))},Dt.prototype.flush=function(){this.batchConsumer&&!this._isDebug()&&this.batchConsumer.flush()},Dt.prototype.userDel=function(t){this._isCollectData()&&this._sendRequest({type:"user_del"},t)},Dt.prototype._sendRequest=function(t,e,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=m.check.isUndefined(t.time)||!m.check.isDate(t.time)?new Date:t.time,o={data:[{"#type":t.type,"#time":m.formatDate(m.formatTimeZone(s,this._getConfig("zoneOffset"))),"#distinct_id":this.persistence.getDistinctId()}]};this.persistence.getAccountId()&&(o.data[0]["#account_id"]=this.persistence.getAccountId());var c=0-s.getTimezoneOffset()/60;if(o.automaticData=m.extend({},{"#device_id":this.persistence.getDeviceId(),"#zone_offset":c},m.info.properties()),"track"===t.type||"track_update"===t.type||"track_overwrite"===t.type){o.data[0]["#event_name"]=t.event,"track_update"===t.type||"track_overwrite"===t.type?o.data[0]["#event_id"]=t.extraId:t.firstCheckId&&(o.data[0]["#first_check_id"]=t.firstCheckId),o.data[0].properties=m.extend({},m.normalizeTopLevelKeys(kt(kt(kt({},this.getSuperProperties()),this.dynamicProperties?this.dynamicProperties():{}),this.getPageProperty())));var h=this.persistence.removeEventTimer(t.event);if(!m.check.isUndefined(h)){var u=(new Date).getTime()-h,l=parseFloat((u/1e3).toFixed(3));l>86400&&(l=86400),o.data[0].properties["#duration"]=l}}else o.data[0].properties={};if(m.check.isObject(t.properties)&&!m.check.isEmptyObject(t.properties)&&m.extend(o.data[0].properties,m.normalizeTopLevelKeys(t.properties,!0)),m.searchObjDate(o.data[0],this._getConfig("zoneOffset")),o.data[0]=m.generateEncryptyData(o.data[0],this._getConfig("secretKey")),o["#app_id"]=this._getConfig("appId"),o["#flush_time"]=m.formatTimeZone(new Date,this._getConfig("zoneOffset")).getTime(),v.i(o),this._getConfig("useAppTrack")){var p=window.FunsData_APP_JS_Bridge||{};if("object"===r(p)&&p.funsdata_track)return p.funsdata_track(JSON.stringify(o)),void("function"==typeof e&&e());if(/td-sdk-ios/.test(navigator.userAgent)&&!window.MSStream){var d=document.createElement("iframe");return d.setAttribute("src","funsanalytics://trackEvent?event="+m.encodeURIComponent(JSON.stringify(o))),document.documentElement.appendChild(d),d.parentNode.removeChild(d),d=null,void("function"==typeof e&&e())}}o.data[0]["#uuid"]=m.UUIDv4();var f=JSON.stringify(o),_=this;if(this._isEncrypt()&&_.crypto){var g=Math.round(1e16*Math.random())+"",y=[];o.data.forEach(function(t){y.push({ekey:_._encryptPass(g,_.crypto.pub_key),pkv:_.crypto.version,payload:_._encryptInfo(JSON.stringify(t),g)})}),o.data=y,o.client="js"}return o.data[0].properties._debugData=a(a(a(a({},St,this.persistence._state[St]),"account_id",this.persistence.getAccountId()),"distinct_id",this.persistence.getDistinctId()),"device_id",this.persistence.getDeviceId()),new It(JSON.stringify(o),this._getConfig("serverUrl"),this._getConfig("tryCount"),e,this._isDebug(),i).run(f)};function At(t){this.config=t,this.timer=null,this.batchConfig=m.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}At.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(m.getRandom()),n=m.localStorage.get(this.tabKey);if((n=null===n?[]:m.safeJSONParse(n)||[]).length<=this.storageLimit)n.push(r),m.localStorage.set(this.tabKey,JSON.stringify(n)),m.saveObjectVal(r,e);else{var i=n.splice(0,20);n.push(r),m.localStorage.set(this.tabKey,JSON.stringify(n)),m.saveObjectVal(r,e);for(var s={},a=[],o=0;o<i.length;o++){var c=m.readObjectVal(i[o]);m.hasEncrypty(c)||(c=m.generateEncryptyData(c,this.config.secretKey)),a.push(c)}s.data=a,s["#app_id"]=this.config.appId,s["#flush_time"]=m.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(s,i)}},flush:function(){clearTimeout(this.timer),this.send(),this.batchInterval()},send:function(){var t=m.localStorage.get(this.tabKey);if(t&&(t=m.safeJSONParse(t)||[]).length){for(var e={},r=[],n=[],i=t.length<this.batchConfig.size?t.length:this.batchConfig.size,s=0;s<i;s++){var a=m.readObjectVal(t[s]);m.hasEncrypty(a)||(a=m.generateEncryptyData(a,this.config.secretKey)),r.push(a),n.push(t[s])}e.data=r,e["#app_id"]=this.config.appId,e["#flush_time"]=m.formatTimeZone(new Date,this.config.zoneOffset).getTime(),this.request(e,n)}},request:function(t,e){var r=this;v.i("flush data"),v.i(t);var n=JSON.stringify(t),i=m.base64Encode(n),s="crc="+m.hashCode(i);m.encodeURIComponent(i),m.encodeURIComponent(s),new It(n,this.config.serverUrl,this.config.tryCount,function(){r.remove(e)},!1).run()},remove:function(t){var e=m.localStorage.get(this.tabKey);if(e){for(var r=m.safeJSONParse(e)||[],n=0;n<t.length;n++){var i=m.indexOf(r,t[n]);i>-1&&r.splice(i,1),m.localStorage.remove(t[n])}m.localStorage.set(this.tabKey,JSON.stringify(r))}},recycle:function(){var t=m.localStorage.get(this.tabKey);if(t&&0===(t=m.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&&m.localStorage.set(this.tabKey,JSON.stringify(t))}}};var It=function(){return s(function t(r,n,i,s,a){var o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];e(this,t),this.data=r,this.serverUrl=n,this.tryCount=i||3,this.callback=s,this.isDebug=a,this.ifSend=o},[{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?v.w(t):v.i(t)}}else r.onFailed()},r.ifSend&&(r.isDebug?e.send(r.data):e.send(V.gzip(r.data,{to:"string"}))),r.ifSend?new Promise(function(r,n){e.onload=function(){4===e.readyState&&(200===e.status?r({res:e.responseText,req:t}):n(e))},e.onerror=function(){n(e)}}):t}},{key:"onFailed",value:function(){--this.tryCount>0&&this.run()}}])}();Dt.prototype._isDebug=function(){return"debug"===this._getConfig("mode")||"debug_only"===this._getConfig("mode")},Dt.prototype._isEncrypt=function(){return!0===this._getConfig("encrypt")},Dt.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("公钥拉取失败!"))}},Dt.prototype._encryptInfo=function(t,e){var r=et.parse(e),n=et.parse(t);return bt.encrypt(n,r,{iv:r}).toString()},Dt.prototype._encryptPass=function(e,r){var n=new t;return n.setPublicKey(r),n.encrypt(e)},Dt.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=kt(kt({},r),e.heartbeatProps);e.track("Heartbeat",t)}else e.track("Heartbeat",r)},t)}},Dt.prototype.clearHeartbeat=function(){var t=this;t.heartbeatInterval?(clearInterval(t.heartbeatInterval),t.removeHeartbeatProps(),t.heartbeatInterval=void 0):console.warn("未设置心跳")},Dt.prototype.setHeartbeatProps=function(t){if(t)if("object"!==r(t)||Array.isArray(t))console.warn("心跳上报参数不符合规范");else{var e=this;e.heartbeatProps||(e.heartbeatProps={}),e.heartbeatProps=kt(kt({},e.heartbeatProps),t)}},Dt.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={}},Dt.prototype._sendRequestWithImage=function(t,e){function r(t){t&&!t.hasCalled&&(t.hasCalled=!0,t.callback&&t.callback())}var n=(-1!==this._getConfig("serverUrl").indexOf("?")?this._getConfig("serverUrl"):this._getConfig("serverUrl")+"?")+t,i=document.createElement("img");i.callback=e,setTimeout(r,this._getConfig("dataSendTimeout"),i),i.onload=function(){this.onload=null,r(this)},i.onerror=function(){this.onerror=null,r(this)},i.onabort=function(){this.onabort=null,r(this)},i.src=n},Dt.prototype.track=function(t,e,r,n){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||b.event(t)&&b.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},n):void 0},Dt.prototype.getTrackData=function(t,e,r,n){if(this._isCollectData())return"ta_page_show"===t||"ta_page_hide"===t||b.event(t)&&b.properties(e)||!this._getConfig("strict")?this._sendRequest({type:"track",event:t,time:r,properties:e},n,void 0,!1):void 0},Dt.prototype.trackUpdate=function(t){this._isCollectData()&&(m.check.isObject(t)?(b.event(t.eventName)&&b.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):v.e("The parameter of updateble event does not meet the requirements"))},Dt.prototype.trackOverwrite=function(t){this._isCollectData()&&(m.check.isObject(t)?(b.event(t.eventName)&&b.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):v.e("The parameter of overwritable event does not meet the requirements"))},Dt.prototype.trackFirstEvent=function(t){this._isCollectData()&&(m.check.isObject(t)?(b.event(t.eventName)&&b.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):v.e("The parameter of first event does not meet the requirements"))},Dt.prototype.trackWithBeacon=function(t,e,r,n){"ta_page_hide"!==t?(b.event(t)&&b.properties(e)||!this._getConfig("strict"))&&this._sendRequest({type:"track",event:t,time:r,properties:e},n,!0):this._sendRequest({type:"track",event:t,time:r,properties:e},n,!0)},Dt.prototype.identify=function(t){this._isCollectData()&&("number"==typeof t&&(t=String(t)),b.userId(t)||!this._getConfig("strict")?t!==this.persistence.getDistinctId()&&this.persistence.setDistinctId(t,xt):v.e("The parameter of identify API requires a string"))},Dt.prototype.getDistinctId=function(){return this.persistence.getDistinctId()},Dt.prototype.getDeviceId=function(){return this.persistence.getDeviceId()},Dt.prototype._isCollectData=function(){return this.persistence.getOptTracking()&&this.persistence.getEnableTracking()},Dt.prototype.setSuperProperties=function(t){this._isCollectData()&&(b.propertiesMust(t)||!this._getConfig("strict")?this.persistence.setSuperProperties(m.extend({},this.getSuperProperties(),t)):v.w("The paramater of setSuperProperties API requires object"))},Dt.prototype.getSuperProperties=function(){return this.persistence.getSuperProperties()},Dt.prototype.clearSuperProperties=function(){this._isCollectData()&&this.persistence.setSuperProperties({})},Dt.prototype.unsetSuperProperty=function(t){if(this._isCollectData()&&m.check.isString(t)){var e=this.getSuperProperties();delete e[t],this.persistence.setSuperProperties(e)}},Dt.prototype.setDynamicSuperProperties=function(t){this._isCollectData()&&("function"==typeof t?b.properties(t())||!this._getConfig("strict")?this.dynamicProperties=t:v.w("The return value of dynamic properties requires an object"):v.w("The paramater of setDynamicSuperProperties API requires function type"))},Dt.prototype.timeEvent=function(t){this._isCollectData()&&(m.check.isUndefined(t)?v.w("No event name provided to timeEvent"):this.persistence.setEventTimer(t,(new Date).getTime()))},Dt.prototype.quick=function(t,e){if(this._isCollectData())if("string"==typeof t&&"autoTrack"===t){var r={};b.properties(e)&&m.extend(r,e),this._sendRequest({type:"track",event:"ta_pageview",properties:m.extend(r,m.info.pageProperties())})}else"string"==typeof t&&"siteLinker"===t?Ut.init(this,e):v.w("The quick method does not support the parameter of"+t)},Dt.prototype._setConfig=function(t){m.check.isObject(t)&&(m.extend(this.config,t),this._getConfig("persistencePrefix")||(this.config.persistencePrefix=this.config.cookiePrefix),this.persistence)},Dt.prototype._getConfig=function(t){return this.config[t]},Dt.prototype.init=function(t){if(m.check.isUndefined(this.config)){this.version=c,this.config={},this.currentProps=this.currentProps||{},this._setConfig(m.extend({},Ot,t)),this.persistence=new Et(this.config);var e=this._getConfig("appId");m.check.isUndefined(e)||this._setConfig({appId:e.replace(/\s*/g,"")}),v.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")&&m.localStorage.isSupported()&&(this.batchConsumer=new At(this.config),this.batchConsumer.batchInterval()),new Tt(this,this._getConfig("autoTrack")).start();var r="normal";this.config.mode&&(r=this.config.mode),v.i("DataEye Analytics SDK initialized successfully with mode: "+r+", APP ID : "+this.config.appId+", server url: "+this.config.serverUrl+", libversion: "+c)}else v.i("The FunsData libraray has been initialized.")};var Tt=function(){return s(function t(r,n){e(this,t),this.taLib=r,"Object"===m.paramType(n)&&"Boolean"===m.paramType(n.pageShow)?this.autoPageShow=n.pageShow:this.autoPageShow=!1,"Object"===m.paramType(n)&&"Boolean"===m.paramType(n.pageHide)?this.autoPageHide=n.pageHide:this.autoPageHide=!1},[{key:"start",value:function(){var t=this;t.trackPageShowEvent(),"onvisibilitychange"in document&&m.addEvent(document,"visibilitychange",function(){document.hidden?t.trackPageHideEvent():t.trackPageShowEvent()})}},{key:"trackPageShowEvent",value:function(){this.autoPageShow&&this.taLib.track("ta_page_show",m.info.pageProperties()),this.taLib.timeEvent("ta_page_hide")}},{key:"trackPageHideEvent",value:function(){this.autoPageHide&&this.taLib.trackWithBeacon("ta_page_hide",m.info.pageProperties())}},{key:"trackPageHideEventOnClose",value:function(){this.autoPageHide&&this.isPageShow&&this.taLib.trackWithBeacon("ta_page_hide",m.info.pageProperties())}}])}();Dt.prototype.initInstance=function(t,e){if(!m.check.isString(t)||!m.check.isUndefined(e)&&!m.check.isObject(e))return v.w("invalid parameter of initInstance(string, object)."),null;if(this._getConfig("_name")!==Pt)return v.w("This function is allowed for master instance only"),null;if(t===Pt||this[t])return v.w("The name ",t," couldn't be used for create new instance."),null;m.check.isUndefined(e)&&(e={});var r=new Dt,n=m.extend({},this.config,{_name:t,persistenceEnabled:!1,uuid:this.getDeviceId()},e);n.persistenceEnabled&&(n.persistencePrefix=n.persistencePrefix+"_"+t),r.init(n),this[t]=r},Dt.prototype.enableTracking=function(t){"boolean"==typeof t&&this.persistence.setEnableTracking(t)},Dt.prototype.optOutTracking=function(){this.persistence.setSuperProperties({}),this.persistence.setAccountId(""),this.persistence.clearEventTimer(),this.persistence.setOptTracking(!1)},Dt.prototype.optInTracking=function(){this.persistence.setOptTracking(!0)},Dt.prototype.setTrackStatus=function(t){if(m.check.isObject(t)){var e=t.status;v.i("swtich track status : "+e),"pause"===e?this.enableTracking(!1):"stop"===e?this.optOutTracking():"normal"===e&&(this.enableTracking(!0),this.optInTracking())}};var Ut={};Ut.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},Ut.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},Ut.getCurrenId=function(){var t=this.ta.getDistinctId();return encodeURIComponent("d"+t)},Ut.rewriteUrl=function(t,e){var r=/([^?#]+)(\?[^#]*)?(#.*)?/.exec(t),n="";if(r){var i,s=r[1]||"",a=r[2]||"",o=r[3]||"";if(this.getPartHash(t))i=o.indexOf("_tasdk"),n=o.indexOf("?")>-1?i>-1?s+a+"#"+o.substring(1,i)+"_tasdk="+this.getCurrenId():s+a+"#"+o.substring(1)+"&_tasdk="+this.getCurrenId():s+a+"#"+o.substring(1)+"?_tasdk="+this.getCurrenId();else i=a.indexOf("_tasdk"),n=/^\?(\w)+/.test(a)?i>-1?s+"?"+a.substring(1,i)+"_tasdk="+this.getCurrenId()+o:s+"?"+a.substring(1)+"&_tasdk="+this.getCurrenId()+o:s+"?"+a.substring(1)+"_tasdk="+this.getCurrenId()+o;return e&&(e.href=n),n}},Ut.addClickListen=function(){var t=this,e=function(e){var r,n,i=e.target,s=i.tagName.toLowerCase(),a=i.parentNode;if("a"===s&&i.href||a&&a.tagName&&"a"===a.tagName.toLowerCase()&&a.href){"a"===s&&i.href?(r=i.href,n=i):(r=a.href,n=a);var o=m.URL(r).protocol;"http:"!==o&&"https:"!==o||t.getPartUrl(r)&&t.rewriteUrl(r,n)}};m.addSiteEvent(document,"mousedown",e),window.PointerEvent&&"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>=0&&m.addSiteEvent(document,"pointerdown",e)},Ut.getUrlId=function(){var t=location.href.match(/_tasdk=([aufd][^\?\#\&\=]+)/);return m.check.isArray(t)&&t[1]?decodeURIComponent(t[1]):""},Ut.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)},Ut.init=function(t,e){this.isInited||(this.isInited=!0,this.ta=t,this.setRefferId(),m.check.isObject(e)&&m.check.isArray(e.linker)&&e.linker.length>0&&(this.addClickListen(),this.option=e.linker,this.option=function(t){for(var e=t.length,r=[],n=0;n<e;n++)/[A-Za-z0-9]+\./.test(t[n].part_url)&&"[object Boolean]"===Object.prototype.toString.call(t[n].after_hash)?r.push(t[n]):v.w("The configuration of linker "+(n+1)+" is not supported.Please check format");return r}(this.option)))};var Rt=new Dt;export{Rt as default};
|