7 lines
50 KiB
JavaScript
7 lines
50 KiB
JavaScript
|
/**
|
||
|
* minitt-cn-sesdk-umd.prod.js
|
||
|
* version: 1.2.4
|
||
|
* LastModified: 12/10/2024 15:32:34 GMT+0800
|
||
|
*/
|
||
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).SESDK=t()}(this,(function(){"use strict";function e(){return(e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function t(){var e=n.Storage.getItem(n.STORAGE_EVENT_QUEUE,!0,[]);e.forEach((function(e){e.status="toSubmit"})),n.Storage.setItem(n.STORAGE_EVENT_QUEUE,e),n.getStateData("debugModel")||null===this.Storage.getItem(n.STORAGE_IS_FIRST_DAY)&&this.Storage.setItem(n.STORAGE_IS_FIRST_DAY,+new Date)}var n={extend:function(){var e=arguments[0]||{},t=this;for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}};n.extend({init:function(r){r.reportData._session_id=n.generateUUID(),r.reportData._visitor_id=this.Storage.getItem("_visitor_id")||r.reportData._distinct_id,r.reportData._account_id=this.Storage.getItem("_account_id")||"";var i=this.getStateData("reportData"),o={properties:e({},i.properties,r.reportData.properties)},a=n.Storage.getItem("superProperties",!0,{}),s=n.getStateData("externalReportData.superProperties");this.isObject(a)&&(s=Object.assign(s,a)),this.setStateData({"externalReportData.superProperties":s,reportData:e({},i,r.reportData,o)}),t.bind(n)()}});var r={eventList:{},$on:function(e,t){this.eventList[e]||(this.eventList[e]={}),Array.isArray(this.eventList[e].emitList)&&this.eventList[e].emitList.forEach((function(e){return t(e)})),Array.isArray(this.eventList[e].onList)||(this.eventList[e].onList=[]),this.eventList[e].onList.push(t)},$emit:function(e,t){this.eventList[e]||(this.eventList[e]={}),Array.isArray(this.eventList[e].emitList)||(this.eventList[e].emitList=[]),this.eventList[e].emitList.push(t),Array.isArray(this.eventList[e].onList)&&this.eventList[e].onList.forEach((function(e){return e(t)}))},$off:function(e,t){var n,r=null==(n=this.eventList[e])?void 0:n.onList;if(Array.isArray(r))for(var i=0;i<r.length;i++)if(t===r[i]){r.splice(i,1);break}}};function i(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object","[object Symbol]":"symbol","[object BigInt]":"bigInt","[object Promise]":"promise"}[Object.prototype.toString.call(e)]}function o(e){return"object"===i(e)}n.extend({customEvents:r});var a={440100:"Please call method:prevInit before initializing",440101:"Please configure your appKey/userId correctly!",440102:"Please configure the parameter information of trackPageClick correctly!",440103:"Please configure your default parameter configuration correctly, you need to pass Array!",440105:"Illegal parameter format, String needs to be passed!",440106:"Illegal parameter format String must be passed and cannot start with underscore_!",440107:"Initialize A/B test, need to load A/B test plugin!",440108:"Data request failed {#1}",440109:"The plugin is missing the init method!",440116:"Illegal parameter format, Array<object> needs to be passed!",440117:"Illegal parameter format, need to pass parameter value ({#1})!",440119:"Failed to obtain device information!",440120:"Illegal parameter format, Object needs to be passed!",440122:"Illegal parameter format Requires the correct preconfigured event type ({#1}) or all!",440123:"The maximum length of data that can be stored by a single key must be less than 1MB. And the upper limit of all data stores is 10MB",440124:"setStorage error {#1}",440125:"The mini program openid has not been obtained.",440126:"Currently loaded plugin does not match the main SDK runtime environment",440127:"Plugin version must be the same as the main SDK version (plugin version {#1}, main SDK version {#2})",440601:"error: {#1}. The custom event name must be string type.",440602:'error: {#1}. The custom event name must start with a lower
|