找回密码
 立即注册
搜索
热搜: 丝袜 魅魔 黑丝
查看: 7|回复: 0

28119895_严重的后果

[复制链接]

13万

主题

340

回帖

22万

积分

管理员

站长

UID
1
积分
224315
余额
13 R
Moe币
84800
在线时间
264 小时
注册时间
2025-12-28
最后登录
2026-9-19
发表于 2026-9-3 23:00:59 | 显示全部楼层 |阅读模式
value:y-d},{type:"requestDuration",value:y-g},{type:"sslDuration",value:h-(m>0?m:h)},{type:"domParseDuration",value:w-y},{type:"domContentLoadDuration",value:_-v},{type:"ttiDuration",value:w-v},{type:"firstByteDuration",value:d-l},{type:"loadDuration",value:b-v},{type:"resourceDuration",value:b-_}].reduce((function(t,e){var n=e.value;if("number"!=typeof n||n<0||n>1e5)return t;var r=parseFloat(n.toFixed(2)),i=function(t,e){var n;return{type:"performance-".concat(t),content:e.toString(),value:e,_sdkparams:{},url:(null===(n=null===window||void 0===window?void 0:window.location)||void 0===n?void 0:n.href)||"",log_id:it()}}(e.type,r);return t.push(i),t}),[]);!function(e,n,i){if(void 0===n&&(n={}),e.every((function(t){return nt(t)}))){var o=i.dsn;Ce([t(t({},r[o].getConfig()),{logs:e})],{sampleType:n.sampleType},i)}}(k,{sampleType:"performance"},n.contextConfig)}),5e3)},this.contextConfig=e}return e.prototype.init=function(){window.performance&&("complete"===document.readyState?this.pt():window.addEventListener("DOMContentLoaded",this.pt,{once:!0}))},e}(),Ie=function(){function t(t){this.contextConfig={dsn:""},this.contextConfig=t}return t.prototype.init=function(){try{this.initPerformanceTiming()}catch(t){Le(t,this.contextConfig)}},t.prototype.initPerformanceTiming=function(){new Pe(this.contextConfig).init()},t}(),ze=function(){function t(t){this.capacity=t,this.elements=[]}return t.prototype.push=function(t){this.elements.length>=this.capacity&&this.elements.shift(),this.elements.push(t)},t.prototype.getElements=function(){return this.elements},t.prototype.getLastEvent=function(){return this.elements[this.elements.length-1]},t.prototype.clear=function(){this.elements=[]},t}(),Ne=function(t,e,n){try{if("PerformanceObserver"in window){var i=window.PerformanceObserver;if(i&&-1!==(i.supportedEntryTypes||[]).indexOf(t)){var o=new i((function(t){Promise.resolve().then((function(){e(t.getEntries())})).catch((function(t){Le(t,n)}))}));return o.observe({entryTypes:[t]}),function(t,e){var n=e.dsn,i=r[void 0===n?"":n];i&&(i.poLists||(i.poLists=[]),i.poLists.push(t))}(o,n),o}}}catch(t){Le(t,n)}return null};function He(t){return t.reverse().filter((function(t){return t!==document&&t!==window})).map((function(t){var e=t.id,n=t.nodeName,r=t.className;return e?"".concat(null==n?void 0:n.toLowerCase(),"#").concat(e):r&&"string"==typeof r?"".concat(null==n?void 0:n.toLowerCase(),".").concat(r):null==n?void 0:n.toLowerCase()})).join("|")}function Ve(t){var e=t;if(Array.isArray(e))return He(e);for(var n=[];e;)n.push(e),e=e.parentNode;return He(n)}var Je=[5,10],qe=Je[0],Ue=Je[1];function Ke(t){!function(t){try{var e=t.dsn,n=void 0===e?"":e;["click","touchend"].forEach((function(t){document.addEventListener(t,(function(t){var e,i,o;try{for(var s=t.target,a=!1;s instanceof Element;){if(null===(e=null==s?void 0:s.classList)||void 0===e?void 0:e.contains("weboffice-micro-app"))return void(a=!0);s=s.parentElement}if(a)return;null===(o=null===(i=r[n])||void 0===i?void 0:i.eventState)||void 0===o||o.push(t)}catch(t){}}),{capture:!0,passive:!0})}))}catch(t){}}(t);try{Ne("longtask",(function(e){e.forEach((function(e){var n,i,o,s=e.name,a=e.duration,c=function(t,e){var n=e.dsn,i=r[void 0===n?"":n].eventState,o=function(e){return null==i?void 0:i.getElements().filter((function(n){return function(t,e,n){var r=t.timeStamp;return r<e&&r+n>=e}(n,t,e)}))[0]},s=o(qe);return s?{event:s}:{event:o(Ue)}||{event:null==i?void 0:i.getLastEvent(),isCorrect:!1}}(e.startTime,t)||{},u=c.event,f=c.isCorrect;if(a>200&&u&&"self"===s){var l=t.dsn;null===(i=null===(n=r[void 0===l?"":l])||void 0===n?void 0:n.eventState)||void 0===i||i.clear();var h={name:s,eventType:u.type,duration:new Date(a).getTime(),selector:u?Ve(u.path||u.target):"",meta:{isCorrect:f}};Me((o=h,{type:"collection-".concat("longtask"),value:o,_kmonLogConf:{_isFromSdk:!0}}),t)}}))}),t)}catch(e){Le(e,t)}}var We=function(){function t(t,e){this.contextConfig={dsn:""},this.option={isEnableReport:!1},this.option=t,this.contextConfig=e}return t.prototype.initEvent=function(){var t,e=this,n=this.option,i=n.isEnableError,o=void 0!==i&&i,s=n.isEnablePerformance,a=void 0!==s&&s,c=n.isEnableLongTask,u=void 0!==c&&c;o&&new Re(this.contextConfig).init();a&&new Ie(this.contextConfig).init();if(u){var f=this.contextConfig.dsn,l=void 0===f?"":f;r[l]&&(r[l].eventState=new ze(15)),Ke(this.contextConfig)}(null===(t=window.__MONJSPRECOLLECT__)||void 0===t?void 0:t.length)&&(window.__MONJSPRECOLLECT__.forEach((function(t){Me({type:"badjs-js",value:t},e.contextConfig)})),window.__MONJSPRECOLLECT__=[]),(new Fe).init(this.contextConfig)},t}(),Ze=function(){function n(){var t,e,n,r,i;this.dsn="",this.config={userid:"",ver:(e=new Date,n=e.getFullYear(),r=e.getMonth()+1,i=e.getDate(),r>=1&&r<=9&&(r="0"+r),i>=0&&i<=9&&(i="0"+i),"".concat(n,"-").concat(r,"-").concat(i)),sdkver:"1.19.6",env:"kdocs",ua:null===(t=null===window||void 0===window?void 0:window.navigator)||void 0===t?void 0:t.userAgent,referer:"",fileid:"",corpid:""}}return n.prototype.init=function(n){var r=n.dsn,i=e(n,["dsn"]);this.dsn=r,this.config=t(t({},this.config),i)},n.prototype.setDsn=function(t){void 0===t&&(t=""),this.dsn=t},n.prototype.getDsn=function(){return this.dsn},n.prototype.setConfig=function(t){for(var e in void 0===t&&(t={}),this.config){var n=t[e];null!=n&&(this.config[e]="string"==typeof n?n:JSON.stringify(n))}},n.prototype.getConfig=function(){return t(t({},function(e){var n=t({},e);for(var r in n)n.hasOwnProperty(r)&&"string"!=typeof n[r]&&(n[r]=String(n[r]));return n}(this.config)),{time:Date.now().toString()})},n}(),Qe=function(){function e(e,n){if(this.option={isEnableReport:!1},this.dsn="",this.option=t(t({},this.option),n),ot(this.option))console.error("【monjs】SDK功能已关闭");else{var i=e.dsn,o=void 0===i?"":i;if(void 0===(s=o)&&(s=""),s&&"number"!=typeof s&&!(s.indexOf("http")<0)||(console.error("【monjs】请设置正确的dsn参数,初始化失败"),0)){var s;this.dsn=o;var a=new Ze;a.init(e),a.setDsn(o),r[o]=a,new We(this.option,{dsn:o}).initEvent()}}}return e.prototype.setConfig=function(t){var e;!ot(this.option)&&this.dsn&&(null===(e=r[this.dsn])||void 0===e||e.setConfig(t))},e.prototype.getTraceId=function(){return lt(16)},e.prototype.shouldSample=function(t,e){return void 0===e&&(e=0),pt(t,e)},e.prototype.getSpanId=function(){return lt(8)},e.prototype.getTraceContent=function(t){r
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|M男之家

GMT+8, 2026-9-19 18:49 , Processed in 0.045128 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表