!function(e,r){function isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}function trim(e){return(e+"").replace(/^\s+|\s+$/gm,"")}function BGField(e,r,t,i){if(!(this instanceof BGField))throw new Error("invalid call");if(this.key=e,this.val=r,this.type=t,this.seq=parseInt(i,10),t===BGReport.TYPE_VECTOR_STRUCT&&!isArray(r))throw new Error("struct/map need param to be array")}function BGReport(e,r){this instanceof BGReport?(this.uri=e,this.aid=r,this.params={}):console.error("wrong use")}function BGMark(t,i,o,n,a){n=n||0,t=trim(t),i=trim(i),o=trim(o);var l=(a=a||{}).event_extra||{};if(l.hash||(l.hash=e.location.hash),t&&i&&o){var p=new BGReport(20191209,66),G=e.navigator,s=0,T=G.userAgent.match(/(?:BIGO-baiguoyuan|CrashX-start) \((.+)\)/i);T&&(s=T[1].split("__")&&T[1].split("__")[7]),p.writeField(new BGField("host",e.location.host,BGReport.TYPE_STRING,6895)),p.writeField(new BGField("path",e.location.pathname,BGReport.TYPE_STRING,6896)),p.writeField(new BGField("querystring",e.location.search.substr(1),BGReport.TYPE_STRING,6897)),p.writeField(new BGField("uid",a.uid||s,BGReport.TYPE_UINT64,6898)),p.writeField(new BGField("appid",a.appid||p.aid,BGReport.TYPE_UINT16,6899)),p.writeField(new BGField("user_agent",G.userAgent,BGReport.TYPE_STRING,6900)),p.writeField(new BGField("os",G.platform,BGReport.TYPE_STRING,6901)),p.writeField(new BGField("os_version",a.os_version||"",BGReport.TYPE_STRING,6902)),p.writeField(new BGField("deviceid",a.deviceid||"",BGReport.TYPE_STRING,6903)),p.writeField(new BGField("client_version",a.client_version||"",BGReport.TYPE_STRING,6904)),p.writeField(new BGField("locale",a.locale||G.language,BGReport.TYPE_STRING,6905)),p.writeField(new BGField("country",a.locale||G.language,BGReport.TYPE_STRING,6906)),p.writeField(new BGField("lang",G.language,BGReport.TYPE_STRING,6907)),p.writeField(new BGField("browser",a.browser||"",BGReport.TYPE_STRING,6908)),p.writeField(new BGField("resolution",[e.screen.width,e.screen.height].join("_"),BGReport.TYPE_STRING,6909)),p.writeField(new BGField("dpr",e.devicePixelRatio||1,BGReport.TYPE_UINT16,6910)),p.writeField(new BGField("channel",a.channel||"",BGReport.TYPE_STRING,6911)),p.writeField(new BGField("model",a.model||"",BGReport.TYPE_STRING,6912)),p.writeField(new BGField("vendor",G.vendor,BGReport.TYPE_STRING,6913)),p.writeField(new BGField("log_extra",a.log_extra||{},BGReport.TYPE_MAP_STRING,6921));var R=new BGField("event",[new BGField("event_id",t,BGReport.TYPE_STRING,6917),new BGField("event_action",i,BGReport.TYPE_STRING,6918),new BGField("event_label",o,BGReport.TYPE_STRING,6919),new BGField("event_value",n,BGReport.TYPE_UINT64,6920)],BGReport.TYPE_VECTOR_STRUCT,6915);p.writeField(R),p.writeField(new BGField("event_extra",l,BGReport.TYPE_MAP_STRING,6914)),p.writeField(new BGField("referer",r.referrer,BGReport.TYPE_STRING,6916)),p.send()}}BGReport.TYPE_UINT8=1,BGReport.TYPE_UINT16=2,BGReport.TYPE_UINT32=3,BGReport.TYPE_UINT64=4,BGReport.TYPE_STRING=5,BGReport.TYPE_VECTOR_STRING=6,BGReport.TYPE_MAP_STRING=7,BGReport.TYPE_VECTOR_STRUCT=8,BGReport.prototype.REPORT_URL="//"+(window.$_CC&&window.$_CC.HOSTNAME_SET&&window.$_CC.HOSTNAME_SET.statHostname?window.$_CC.HOSTNAME_SET.statHostname:"support-json.helloyo.sg")+"/json?uri=#URI#&aid=#AID#",BGReport.prototype.processVal=function(e,r){switch(r){case BGReport.TYPE_UINT8:case BGReport.TYPE_UINT16:case BGReport.TYPE_UINT32:case BGReport.TYPE_UINT64:r===BGReport.TYPE_UINT64&&console.info("not fully support uInt64 now, report may failed, try to use string or not bigger than 53bit"),e=parseInt(e,10)||0;break;case BGReport.TYPE_STRING:e=""+e;break;case BGReport.TYPE_VECTOR_STRING:var t=[];if(!isArray(e))throw new Error("invalid data type of array");for(var i=0,o=e.length;i