@xysfe/bug-tap 0.0.0-stage → 0.1.0
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 +69 -0
- package/LICENSE +21 -0
- package/README.md +461 -2
- package/THIRD_PARTY_NOTICES.md +39 -0
- package/dist/bug-tap-screenshot.min.js +10 -0
- package/dist/bug-tap-screenshot.min.js.map +1 -0
- package/dist/bug-tap-vue.cjs +2 -0
- package/dist/bug-tap-vue.cjs.map +1 -0
- package/dist/bug-tap-vue.js +106 -0
- package/dist/bug-tap-vue.js.map +1 -0
- package/dist/bug-tap-vue.min.js +2 -0
- package/dist/bug-tap-vue.min.js.map +1 -0
- package/dist/bug-tap.cjs +2 -0
- package/dist/bug-tap.cjs.map +1 -0
- package/dist/bug-tap.js +13 -0
- package/dist/bug-tap.js.map +1 -0
- package/dist/bug-tap.min.js +508 -0
- package/dist/bug-tap.min.js.map +1 -0
- package/dist/config.d.ts +14 -0
- package/dist/core/body.d.ts +30 -0
- package/dist/core/breadcrumbs.d.ts +85 -0
- package/dist/core/browser-api-errors.d.ts +55 -0
- package/dist/core/byte-buffer.d.ts +43 -0
- package/dist/core/collector.d.ts +34 -0
- package/dist/core/console-collector.d.ts +23 -0
- package/dist/core/env-collector.d.ts +16 -0
- package/dist/core/error-collector.d.ts +48 -0
- package/dist/core/error-noise.d.ts +43 -0
- package/dist/core/network-collector.d.ts +97 -0
- package/dist/core/network-record.d.ts +19 -0
- package/dist/core/resource-timing.d.ts +28 -0
- package/dist/core/ring-buffer.d.ts +22 -0
- package/dist/core/selector.d.ts +3 -0
- package/dist/core/serialize.d.ts +5 -0
- package/dist/core/tongji.d.ts +14 -0
- package/dist/core/user.d.ts +9 -0
- package/dist/index-BBRuTNvo.js +4685 -0
- package/dist/index-BBRuTNvo.js.map +1 -0
- package/dist/index-DCLLRJxX.cjs +488 -0
- package/dist/index-DCLLRJxX.cjs.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/integrations.d.ts +26 -0
- package/dist/panel-mount-Dia21VuZ.cjs +2 -0
- package/dist/panel-mount-Dia21VuZ.cjs.map +1 -0
- package/dist/panel-mount-mAOg572s.js +499 -0
- package/dist/panel-mount-mAOg572s.js.map +1 -0
- package/dist/screenshot-global.d.ts +14 -0
- package/dist/sdk.d.ts +76 -0
- package/dist/transport/log-item.d.ts +2 -0
- package/dist/transport/offline-queue.d.ts +48 -0
- package/dist/transport/payload.d.ts +15 -0
- package/dist/transport/transport.d.ts +57 -0
- package/dist/transport/upload.d.ts +8 -0
- package/dist/types.d.ts +459 -0
- package/dist/ui/element-picker.d.ts +51 -0
- package/dist/ui/floating-button.d.ts +43 -0
- package/dist/ui/icons.d.ts +1 -0
- package/dist/ui/panel-mount.d.ts +20 -0
- package/dist/ui/panel.vue.d.ts +15 -0
- package/dist/ui/screenshot-loader-shared.d.ts +2 -0
- package/dist/ui/screenshot-loader.d.ts +14 -0
- package/dist/ui/screenshot-loader.iife.d.ts +16 -0
- package/dist/ui/screenshot.d.ts +20 -0
- package/dist/ui/shadow-host.d.ts +16 -0
- package/dist/ui/styles.css.d.ts +1 -0
- package/dist/ui/visibility.d.ts +25 -0
- package/dist/utils/match.d.ts +2 -0
- package/dist/utils/ua.d.ts +6 -0
- package/dist/utils/url.d.ts +2 -0
- package/dist/vue-global.d.ts +21 -0
- package/dist/vue.d.ts +49 -0
- package/docs/api.md +257 -0
- package/docs/backend-api.md +401 -0
- package/docs/bundler.md +122 -0
- package/docs/config.md +396 -0
- package/package.json +97 -4
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
var BugTapBundle=(function(Wt){"use strict";/*! @xysfe/bug-tap v0.1.0 | MIT */const $r=["x-request-id","x-trace-id","traceparent","tracestate","x-b3-traceid","x-b3-spanid","server-timing","content-length"];function qe(t,e){try{return t instanceof RegExp?(t.lastIndex=0,t.test(e)):e.includes(t)}catch(r){return!1}}const pa=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications\.$/,/^Cannot redefine property: googletag$/,/can't redefine non-configurable property "solana"/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/],Yi=/^(?:<anonymous>|\[native code\]|data:|blob:|about:|chrome-extension:|moz-extension:)/i,ga=/\bat\s+(?:.*?\s+\()?([^\s()]+):(\d+):(\d+)\)?\s*$/;function Pn(t){if(t)for(const e of t.split(`
|
|
2
|
+
`)){const r=ga.exec(e);if(!r)continue;const n=r[1];if(!n||Yi.test(n))continue;const i=Number(r[2]),s=Number(r[3]);return{url:n,line:Number.isFinite(i)&&i>0?i:void 0,column:Number.isFinite(s)&&s>=0?s:void 0}}}function ma(t,e){const r=Pn(t);if(r)return r.url;if(e&&!Yi.test(e))return e}const ba=/^\[(?:setTimeout|setInterval|requestAnimationFrame)\] /,ya=/^[A-Za-z]*Error: /;function wa(t){const e=new Set([t]),r=t.replace(ba,"");e.add(r);const n=r.replace(ya,"");return e.add(n),Array.from(e)}function va(t,e){return wa(t).some(r=>e.some(n=>qe(n,r)))}function xa(t){const e=(t.message||"").trim(),r=(t.stack||"").trim();return e.length===0&&r.length===0}function Sa(t,e,r){return!(e.length>0&&(!t||!e.some(n=>qe(n,t)))||t&&r.some(n=>qe(n,t)))}const Ea=[/\.(?:js|css|map|png|jpe?g|gif|svg|webp|ico|bmp|woff2?|ttf|eot|otf|mp4|webm|mp3|wav|ogg|avi|mov|zip|gz|pdf)(?:[?#]|$)/i],Gi="/go/SupportTools/logreport",Ji="/platform/file/uploadPicture",Qi="1008";function _a(t){return(String(t!=null?t:"").trim()||Gi).replace(/\/+$/,"")||Gi}function In(t){return Object.prototype.toString.call(t)==="[object Object]"}function Zi(t){if(typeof t=="function")return t;if(!In(t))return;const e={};for(const r of Object.keys(t)){const n=t[r],i=typeof n;(i==="string"||i==="number"||i==="boolean")&&(e[r]=n)}return Object.keys(e).length>0?e:void 0}function it(t,e,r,n){return Math.round(es(t,e,r,n))}function Ca(t){const e=String(t.release||"").trim();if(e)return e;const r=String(t.appVersion||"").trim(),n=String(t.buildId||"").trim();return r&&n?`${r}+${n}`:r||n}function ts(t){return t===!0?!0:Array.isArray(t)?Array.from(new Set(t.map(e=>String(e||"").trim().toLowerCase()).filter(e=>e.length>0))):[]}function Ta(t){if(t===!0)return!0;const e=ts(t);return Array.from(new Set([...$r,"content-type",...e]))}function es(t,e,r,n){const i=typeof t=="number"?t:Number(t);return Number.isFinite(i)?Math.min(r,Math.max(e,i)):n}function rs(t,e){if(!In(t)||!In(e))return e===void 0?t:e;const r={...t};for(const n of Object.keys(e))r[n]=rs(t[n],e[n]);return r}function ka(t,e){return rs(t,e||{})}function Ln(t){var o,l,a,u,c,d,p,x,R,k,N,z,j,F,I,Q,Et,ht,vt,ge,Pt,It,me,xt,ke,lt,J,K,V,at,be,Tt,rt,nt,Fe,rr,qt,ye,ze,Lt,Nr,f,h,m,S,b,v,C,_,E,y,A,T,M,g,w,O,L,U,B,tt,_t,Nt;const e={excludeUrls:Ea.concat(((o=t.privacy)==null?void 0:o.excludeUrls)||[]),excludeConsolePatterns:(((l=t.privacy)==null?void 0:l.excludeConsolePatterns)||[]).slice(),excludeBreadcrumbUrls:(((a=t.privacy)==null?void 0:a.excludeBreadcrumbUrls)||[]).slice()},r=t.filtering||{},n={ignoreErrors:(r.ignoreErrors||[]).slice().concat(r.disableErrorDefaults?[]:pa),denyUrls:(r.denyUrls||[]).slice(),allowUrls:(r.allowUrls||[]).slice()},i=t.hooks||{},s={beforeSend:typeof i.beforeSend=="function"?i.beforeSend:void 0,beforeBreadcrumb:typeof i.beforeBreadcrumb=="function"?i.beforeBreadcrumb:void 0};return{project:String(t.project||"").trim(),endpoint:_a(t.endpoint),environment:String(t.environment||"production").trim()||"production",appVersion:String(t.appVersion||"").trim(),buildId:String(t.buildId||"").trim(),release:Ca(t),debug:t.debug===!0,user:Zi(t.user),reporter:{enabled:((u=t.reporter)==null?void 0:u.enabled)!==!1,position:((c=t.reporter)==null?void 0:c.position)==="bottom-left"?"bottom-left":"bottom-right",theme:((d=t.reporter)==null?void 0:d.theme)==="light"||((p=t.reporter)==null?void 0:p.theme)==="dark"?t.reporter.theme:"auto",text:String(((x=t.reporter)==null?void 0:x.text)||"反馈").slice(0,20),zIndex:it((R=t.reporter)==null?void 0:R.zIndex,1,2147483647,2147483e3),visibility:{mode:((N=(k=t.reporter)==null?void 0:k.visibility)==null?void 0:N.mode)==="triggered"?"triggered":"always",queryParam:String(((j=(z=t.reporter)==null?void 0:z.visibility)==null?void 0:j.queryParam)||"bugtap").trim(),queryValue:((I=(F=t.reporter)==null?void 0:F.visibility)==null?void 0:I.queryValue)===void 0?"1":String(t.reporter.visibility.queryValue),closable:((Et=(Q=t.reporter)==null?void 0:Q.visibility)==null?void 0:Et.closable)!==!1}},collect:{console:((ht=t.collect)==null?void 0:ht.console)!==!1,error:((vt=t.collect)==null?void 0:vt.error)!==!1,network:((ge=t.collect)==null?void 0:ge.network)!==!1,networkBody:((Pt=t.collect)==null?void 0:Pt.networkBody)!==!1,realtime:((It=t.collect)==null?void 0:It.realtime)!==!1,resourceErrors:((me=t.collect)==null?void 0:me.resourceErrors)!==!1,environment:((xt=t.collect)==null?void 0:xt.environment)!==!1,trackIds:((ke=t.collect)==null?void 0:ke.trackIds)!==!1,breadcrumbs:((lt=t.collect)==null?void 0:lt.breadcrumbs)!==!1,maxBreadcrumbs:it((J=t.collect)==null?void 0:J.maxBreadcrumbs,1,200,100),maxConsoleLogs:it((K=t.collect)==null?void 0:K.maxConsoleLogs,1,500,100),maxNetworkRecords:it((V=t.collect)==null?void 0:V.maxNetworkRecords,1,500,200),maxErrors:it((at=t.collect)==null?void 0:at.maxErrors,1,200,50),maxNetworkBytes:it((be=t.collect)==null?void 0:be.maxNetworkBytes,8192,8e6,524288),maxCloneBytes:it((Tt=t.collect)==null?void 0:Tt.maxCloneBytes,1024,5e6,262144),requestHeaders:ts((rt=t.collect)==null?void 0:rt.requestHeaders),responseHeaders:Ta((nt=t.collect)==null?void 0:nt.responseHeaders),maxElements:it((Fe=t.collect)==null?void 0:Fe.maxElements,1,20,5),eventListenerErrors:((rr=t.collect)==null?void 0:rr.eventListenerErrors)!==!1},privacy:e,filtering:n,hooks:s,screenshot:{enabled:((qt=t.screenshot)==null?void 0:qt.enabled)!==!1,auto:((ye=t.screenshot)==null?void 0:ye.auto)!==!1,quality:es((ze=t.screenshot)==null?void 0:ze.quality,.1,1,.8),maxWidth:it((Lt=t.screenshot)==null?void 0:Lt.maxWidth,320,4096,1600),maxSizeKB:it((Nr=t.screenshot)==null?void 0:Nr.maxSizeKB,50,2048,400),scriptUrl:String(((f=t.screenshot)==null?void 0:f.scriptUrl)||"").trim()},transport:{timeoutMs:it((h=t.transport)==null?void 0:h.timeoutMs,1e3,6e4,15e3),retries:it((m=t.transport)==null?void 0:m.retries,0,5,2),headers:{...((S=t.transport)==null?void 0:S.headers)||{}},maxItemBytes:it((b=t.transport)==null?void 0:b.maxItemBytes,5e4,5e6,8e5),totalTimeoutMs:it((v=t.transport)==null?void 0:v.totalTimeoutMs,3e3,6e4,3e4),maxConcurrent:it((C=t.transport)==null?void 0:C.maxConcurrent,1,50,10),logLevel:((_=t.transport)==null?void 0:_.logLevel)===1||((E=t.transport)==null?void 0:E.logLevel)===2||((y=t.transport)==null?void 0:y.logLevel)===3?t.transport.logLevel:void 0,offline:{enabled:((T=(A=t.transport)==null?void 0:A.offline)==null?void 0:T.enabled)!==!1,ttlMs:it((g=(M=t.transport)==null?void 0:M.offline)==null?void 0:g.ttlMs,6e4,6048e5,864e5),maxItems:it((O=(w=t.transport)==null?void 0:w.offline)==null?void 0:O.maxItems,1,100,20)},maxReportsPerSession:it((L=t.transport)==null?void 0:L.maxReportsPerSession,0,1e3,0)},upload:{enabled:((U=t.upload)==null?void 0:U.enabled)!==!1,url:String(((B=t.upload)==null?void 0:B.url)||Ji).trim()||Ji,bizId:String((_t=(tt=t.upload)==null?void 0:tt.bizId)!=null?_t:Qi).trim()||Qi,timeoutMs:it((Nt=t.upload)==null?void 0:Nt.timeoutMs,1e3,12e4,3e4)}}}function Nn(t){const e=[];if(!t||typeof t!="object")return e.push("配置不是对象"),e;if((!t.project||typeof t.project!="string")&&e.push("缺少 project"),t.endpoint!==void 0&&t.endpoint!==null&&String(t.endpoint).trim()!=="")try{const r=new URL(t.endpoint,location.href);r.protocol!=="http:"&&r.protocol!=="https:"&&e.push("endpoint 必须是 http/https 地址")}catch(r){e.push("endpoint 不是合法 URL")}return e}class $n{constructor(e){this.start=0,this.length=0,this.evicted=0,this.capacity=Math.max(1,Math.floor(e)),this.items=new Array(this.capacity)}get size(){return this.length}get limit(){return this.capacity}get droppedCount(){return this.evicted}push(e){if(this.length<this.capacity){this.items[(this.start+this.length)%this.capacity]=e,this.length+=1;return}this.items[this.start]=e,this.start=(this.start+1)%this.capacity,this.evicted+=1}last(){if(this.length!==0)return this.items[(this.start+this.length-1)%this.capacity]}toArray(){const e=[];for(let r=0;r<this.length;r+=1){const n=this.items[(this.start+r)%this.capacity];n!==void 0&&e.push(n)}return e}includes(e){for(let r=0;r<this.length;r+=1)if(this.items[(this.start+r)%this.capacity]===e)return!0;return!1}update(e,r){for(let n=0;n<this.length;n+=1){const i=(this.start+n)%this.capacity,s=this.items[i];if(s!==void 0&&e(s))return this.items[i]=r(s),!0}return!1}updateLast(e){if(this.length===0)return!1;const r=(this.start+this.length-1)%this.capacity,n=this.items[r];return n===void 0?!1:(this.items[r]=e(n),!0)}clear(){this.items=new Array(this.capacity),this.start=0,this.length=0,this.evicted=0}}function ns(t){return t.ok===!1||!!t.error||(t.status||0)>=400}function Ra(t){return t.ok===!0}function is(t){return t?t.droppedCount+t.evictedCount+(t.trimmedCount||0):0}const Aa=60,Ma=40;function ss(t){var e,r,n,i;try{if(!t)return;const s=t.tagName?t.tagName.toLowerCase():"";if(!s)return;const o=t.id?`#${t.id}`:"",l=((e=t.getAttribute)==null?void 0:e.call(t,"data-testid"))||((r=t.getAttribute)==null?void 0:r.call(t,"data-test"))||((n=t.getAttribute)==null?void 0:n.call(t,"data-qa"))||"",a=!o&&l?`[data-testid="${l}"]`:"",u=((i=t.getAttribute)==null?void 0:i.call(t,"name"))||"",c=!o&&!a&&u?`[name="${u}"]`:"",d=typeof t.className=="string"?t.className.trim():"",p=!o&&!a&&!c&&d?`.${d.split(/\s+/).slice(0,2).join(".")}`:"";return`${s}${o}${a}${c}${p}`.slice(0,Aa)}catch(s){return}}function Oa(t,e=Ma){try{const r=((t==null?void 0:t.textContent)||"").replace(/\s+/g," ").trim();return r?r.slice(0,e):void 0}catch(r){return}}function Pa(t){var e;try{const r=(((e=t==null?void 0:t.getAttribute)==null?void 0:e.call(t,"type"))||"").toLowerCase();return r==="password"||r==="hidden"}catch(r){return!0}}function os(t){var r,n;try{if(document.documentElement.hasAttribute("data-bug-tap-picking"))return!0}catch(i){}let e=t;for(;e;)try{if((r=e.hasAttribute)!=null&&r.call(e,"data-bug-tap")||(n=e.hasAttribute)!=null&&n.call(e,"data-bug-tap-picker"))return!0;const i=e.getRootNode?e.getRootNode():null;if(i&&i.host){e=i.host;continue}e=e.parentElement}catch(i){return!1}return!1}function Bn(t){try{const e=new URL(t);return`${e.pathname}${e.search}${e.hash}`.slice(0,300)}catch(e){return t.slice(0,300)}}function Ia(t,e){if(t===e)return!0;if(!t||!e)return!1;try{return JSON.stringify(t)===JSON.stringify(e)}catch(r){return!1}}class La{constructor(e){this.options=e,this.started=!1,this.lastRoute="",this.lastVisibility="",this.navigationDisabled=!1,this.tailSignature="",this.onClick=r=>{if(!(!this.started||!this.options.dom))try{const n=r.target;if(os(n))return;const i=ss(n);if(!i)return;this.push({t:Date.now(),type:"click",selector:i,text:Oa(n)})}catch(n){}},this.onChange=r=>{if(!(!this.started||!this.options.dom))try{const n=r.target;if(!n||os(n)||Pa(n))return;const i=ss(n);if(!i)return;this.push({t:Date.now(),type:"input",selector:i})}catch(n){}},this.onVisibility=()=>{if(this.started)try{const r=document.visibilityState;if(r===this.lastVisibility)return;this.lastVisibility=r,this.push({t:Date.now(),type:"visibility",state:r})}catch(r){}},this.checkRoute=()=>{if(!(!this.started||!this.options.navigation||this.navigationDisabled))try{const r=location.href;if(r===this.lastRoute)return;const n=this.lastRoute;this.lastRoute=r,this.push({t:Date.now(),type:"route",from:Bn(n),to:Bn(r)})}catch(r){}},this.onHistory=()=>{this.navigationDisabled||setTimeout(this.checkRoute,0)},this.originalPush=null,this.originalReplace=null,this.wrappedPush=null,this.wrappedReplace=null,this.routeHook=null,this.buffer=new $n(e.max)}get limit(){return this.buffer.limit}get size(){return this.buffer.size}get evicted(){return this.buffer.droppedCount}start(){if(!this.started){this.started=!0;try{this.lastRoute=location.href,this.lastVisibility=document.visibilityState}catch(e){}this.options.dom&&(window.addEventListener("click",this.onClick,!0),window.addEventListener("change",this.onChange,!0)),this.options.navigation&&!this.navigationDisabled&&(window.addEventListener("popstate",this.checkRoute),window.addEventListener("hashchange",this.checkRoute),window.addEventListener("visibilitychange",this.onVisibility),this.patchHistory())}}stop(){this.started&&(this.started=!1,window.removeEventListener("click",this.onClick,!0),window.removeEventListener("change",this.onChange,!0),window.removeEventListener("popstate",this.checkRoute),window.removeEventListener("hashchange",this.checkRoute),window.removeEventListener("visibilitychange",this.onVisibility),this.unpatchHistory())}getBreadcrumbs(){return this.buffer.toArray()}add(e){this.started&&this.push(e)}disableNavigationCapture(){this.options.navigation&&(this.navigationDisabled=!0,window.removeEventListener("popstate",this.checkRoute),window.removeEventListener("hashchange",this.checkRoute),this.unpatchHistory())}clear(){this.buffer.clear(),this.tailSignature=""}addNetwork(e){var o;if(!this.started||!this.options.network||this.options.excludeUrls&&this.options.excludeUrls.some(l=>qe(l,e.url)))return;const r=Bn(e.url),n=ns(e),i=`${e.method} ${r} ${(o=e.status)!=null?o:""} ${n?1:0}`,s=this.buffer.last();if(s&&s.type==="http"&&this.tailSignature===i){this.buffer.updateLast(l=>({...l,repeat:(l.repeat||1)+1,ref:e.id}));return}this.tailSignature=i,this.push({t:Date.now(),type:"http",method:e.method,url:r,status:e.status,durationMs:e.durationMs,httpError:e.error,ref:e.id})}addError(e){!this.started||!this.options.error||this.push({t:e.timestamp,type:"error",message:e.message.slice(0,200),count:e.count})}push(e){if(!this.started)return;const r=this.applyHook(e);if(!r)return;const n=r;n.type!=="http"&&(this.tailSignature="");const i=this.buffer.last();i&&i.type===n.type&&i.selector===n.selector&&i.to===n.to&&i.state===n.state&&i.ref===n.ref&&i.message===n.message&&Ia(i.data,n.data)||this.buffer.push(n)}applyHook(e){const r=this.options.beforeBreadcrumb;if(!r)return e;try{const n=r(e);return n===null?null:n&&typeof n=="object"?n:e}catch(n){return e}}wrapHistory(e){const r=this,n=function(...i){var o;const s=e.apply(this,i);return(o=r.routeHook)==null||o.call(r),s};return n.__bugTap=!0,n}patchHistory(){try{if(typeof history=="undefined")return;const e=history.pushState,r=history.replaceState;this.originalPush=e,this.originalReplace=r,this.routeHook=()=>this.onHistory(),this.wrappedPush=this.wrapHistory(e),this.wrappedReplace=this.wrapHistory(r),history.pushState=this.wrappedPush,history.replaceState=this.wrappedReplace}catch(e){}}unpatchHistory(){try{this.wrappedPush&&history.pushState===this.wrappedPush&&this.originalPush&&(history.pushState=this.originalPush),this.wrappedReplace&&history.replaceState===this.wrappedReplace&&this.originalReplace&&(history.replaceState=this.originalReplace)}catch(e){}this.routeHook=null,this.originalPush=null,this.originalReplace=null,this.wrappedPush=null,this.wrappedReplace=null}}const ls="__bugTapCaptured";let nr=0,Br=0;function Na(t){try{t&&(typeof t=="object"||typeof t=="function")&&(t[ls]=!0)}catch(e){}}function as(t){try{return!!(t&&typeof t=="object"&&t[ls])}catch(e){return!1}}function $a(){return nr<=0?!1:(nr-=1,!0)}function Ba(){nr+=1;try{Br&&clearTimeout(Br),Br=setTimeout(()=>{nr=0,Br=0},0)}catch(t){nr=0}}const Da="__bugTapWrapped",cs="__bugTapHandleEvent";class Ha{constructor(e){this.options=e,this.patched=[],this.registry=new WeakMap,this.started=!1}start(){this.started||(this.started=!0,this.patchTimer("setTimeout","setTimeout"),this.patchTimer("setInterval","setInterval"),this.patchTimer("requestAnimationFrame","requestAnimationFrame"),this.options.eventListeners!==!1&&this.patchEventTarget())}stop(){if(this.started){this.started=!1;for(const{target:e,key:r,original:n}of this.patched)try{const i=e[r];typeof i=="function"&&i.__bugTap&&(e[r]=n)}catch(i){}this.patched.length=0}}patchTimer(e,r){try{const n=window,i=n[e];if(typeof i!="function"||i.__bugTap)return;this.patched.push({target:n,key:e,original:i});const s=this,o=function(l,...a){if(!s.started||typeof l!="function")return i.apply(this,[l,...a]);const u=s.wrapCallback(l,r);return i.apply(this,[u,...a])};o.__bugTap=!0,n[e]=o}catch(n){}}patchEventTarget(){try{if(typeof EventTarget=="undefined"||!EventTarget.prototype)return;const e=EventTarget.prototype,r=e.addEventListener,n=e.removeEventListener;if(typeof r!="function"||typeof n!="function"||r.__bugTap)return;this.patched.push({target:e,key:"addEventListener",original:r}),this.patched.push({target:e,key:"removeEventListener",original:n});const i=this,s=function(l,a,u){if(!i.started||!a)return r.call(this,l,a,u);if(typeof a=="object"){const d=a;if(typeof d.handleEvent=="function")try{d.handleEvent[cs]||(d.handleEvent=i.wrapCallback(d.handleEvent.bind(a),l,cs))}catch(p){}return r.call(this,l,a,u)}if(typeof a!="function")return r.call(this,l,a,u);const c=i.listenerFor(this,l,a,u);return r.call(this,l,c,u)},o=function(l,a,u){var c,d,p,x;try{const k=a&&(typeof a=="object"||typeof a=="function")?(d=(c=i.registry.get(this))==null?void 0:c.get(Dn(l,u)))==null?void 0:d.get(a):void 0;k&&k!==a&&(n.call(this,l,k,u),(x=(p=i.registry.get(this))==null?void 0:p.get(Dn(l,u)))==null||x.delete(a))}catch(R){}return n.call(this,l,a,u)};s.__bugTap=!0,o.__bugTap=!0,e.addEventListener=s,e.removeEventListener=o}catch(e){}}listenerFor(e,r,n,i){let s=this.registry.get(e);s||(s=new Map,this.registry.set(e,s));const o=Dn(r,i);let l=s.get(o);l||(l=new WeakMap,s.set(o,l));const a=l.get(n);if(a)return a;const u=this.wrapCallback(n,r);return l.set(n,u),u}wrapCallback(e,r,n=Da){const i=this,s=function(...o){try{return e.apply(this,o)}catch(l){try{Na(l),Ba(),i.options.capture(l,r)}catch(a){}throw l}};try{s[n]=e}catch(o){}return s}}function Dn(t,e){const r=typeof e=="boolean"?e:!!(e&&typeof e=="object"&&e.capture);return`${t}|${r?1:0}`}const ja=4,Rt=50,Ua=2e3,us=4e3;function Re(t,e=Ua){return t.length>e?`${t.slice(0,e)}…[${t.length-e} chars truncated]`:t}function Fa(t){const e=typeof t;if(t===null)return"null";if(e==="undefined")return"undefined";if(e==="string")return Re(t);if(e==="number")return Number.isFinite(t),String(t);if(e==="boolean")return String(t);if(e==="bigint")return`${String(t)}n`;if(e==="symbol")return String(t);if(e==="function"){const r=t.name;return`[Function${r?` ${r}`:""}]`}return null}function We(t,e=0,r){const n=Fa(t);if(n!==null)return n;const i=r||new WeakSet,s=t;if(typeof s!="object"||s===null)return String(s);if(i.has(s))return"[Circular]";i.add(s);try{if(t instanceof Error){const a=typeof t.stack=="string"?t.stack.split(`
|
|
3
|
+
`).slice(0,6).join(`
|
|
4
|
+
`):"";return Re(`${t.name||"Error"}: ${t.message}${a?`
|
|
5
|
+
${a}`:""}`,us)}if(t instanceof Date)try{return t.toISOString()}catch(a){return"[Invalid Date]"}if(t instanceof RegExp)return String(t);if(typeof Element!="undefined"&&t instanceof Element){const a=t.tagName.toLowerCase(),u=t.id?`#${t.id}`:"",c=typeof t.className=="string"&&t.className.trim()?`.${t.className.trim().split(/\s+/).slice(0,3).join(".")}`:"";return`<${a}${u}${c}>`}if(typeof Node!="undefined"&&t instanceof Node)return`[Node ${t.nodeName}]`;if(e>=ja)return"[MaxDepth]";if(Array.isArray(t)){const a=t.slice(0,Rt).map(u=>We(u,e+1,i));return t.length>Rt&&a.push(`…[${t.length-Rt} more]`),Re(`[${a.join(", ")}]`)}if(t instanceof Map){const a=[];let u=0;return t.forEach((c,d)=>{u<Rt&&a.push(`${We(d,e+1,i)} => ${We(c,e+1,i)}`),u+=1}),u>Rt&&a.push(`…[${u-Rt} more]`),Re(`Map(${t.size}) {${a.join(", ")}}`)}if(t instanceof Set){const a=[];let u=0;return t.forEach(c=>{u<Rt&&a.push(We(c,e+1,i)),u+=1}),u>Rt&&a.push(`…[${u-Rt} more]`),Re(`Set(${t.size}) {${a.join(", ")}}`)}const o=Object.keys(t),l=[];for(const a of o.slice(0,Rt))try{const u=t[a];l.push(`${a}: ${We(u,e+1,i)}`)}catch(u){l.push(`${a}: [Thrown]`)}return o.length>Rt&&l.push(`…[${o.length-Rt} more keys]`),Re(`{${l.join(", ")}}`)}catch(o){return"[Unserializable]"}finally{i.delete(s)}}function za(t){const e=t.map(n=>We(n)),r=Re(e.join(" "),us);return{args:e,text:r}}const Hn=["log","info","warn","error","debug","trace","assert"];class qa{constructor(e){this.options=e,this.originals=new Map,this.wrapped=new Map,this.originalClear=null,this.wrappedClear=null,this.started=!1,this.capturing=!1,this.dispatching=!1,this.buffer=new $n(e.max)}start(){if(this.started)return;this.started=!0;const e=window.console;for(const n of Hn){const i=e[n];if(typeof i!="function")continue;const s=i;this.originals.set(n,s);const o=this,l=function(...a){o.capture(n,a),o.dispatching=!0;try{return s.apply(this,a)}finally{o.dispatching=!1}};l.__bugTap=!0,this.wrapped.set(n,l);try{e[n]=l}catch(a){}}const r=e.clear;if(typeof r=="function"){this.originalClear=r;const n=this,i=function(){return n.buffer.clear(),n.originalClear.apply(this)};i.__bugTap=!0,this.wrappedClear=i;try{e.clear=i}catch(s){}}}stop(){if(!this.started)return;this.started=!1;const e=window.console;for(const r of Hn){const n=this.wrapped.get(r),i=this.originals.get(r);if(!(!n||!i)&&e[r]===n)try{e[r]=i}catch(s){}}if(this.wrappedClear&&this.originalClear&&e.clear===this.wrappedClear)try{e.clear=this.originalClear}catch(r){}this.wrapped.clear(),this.originals.clear(),this.wrappedClear=null,this.originalClear=null}getLogs(){return this.buffer.toArray()}getPatchState(){if(!this.started)return!1;const e=window.console;for(const r of Hn){const n=this.wrapped.get(r);if(n&&e[r]===n)return!0}return!1}clear(){this.buffer.clear()}capture(e,r){if(!(!this.started||this.capturing||this.dispatching)){this.capturing=!0;try{if(e==="assert"&&r[0])return;const{args:n,text:i}=za(e==="assert"?r.slice(1):r);if(this.options.excludePatterns.some(o=>qe(o,i)))return;const s=this.buffer.last();if(s&&s.level===e&&s.text===i){this.buffer.updateLast(o=>({...o,count:(o.count||1)+1,timestamp:Date.now()}));return}this.buffer.push({level:e,timestamp:Date.now(),args:n,text:i})}catch(n){}finally{this.capturing=!1}}}}const Wa=1e3,fs=200,Va=6e4,Ka=20,Xa=50,Dr=2e3;function ds(t){if(t!=null)try{if(t instanceof Error){const e=`${t.name||"Error"}: ${t.message}`,r=typeof t.stack=="string"?t.stack.split(`
|
|
6
|
+
`).slice(0,6).join(`
|
|
7
|
+
`):"";return(r?`${e}
|
|
8
|
+
${r}`:e).slice(0,Dr)}return typeof t=="string"?t.slice(0,Dr):JSON.stringify(t).slice(0,Dr)}catch(e){return String(t).slice(0,Dr)}}const Ya=/(?:[\\/]src[\\/](?:core|ui|transport)[\\/](?:browser-api-errors|error-collector|console-collector|network-collector|breadcrumbs|collector|resource-timing|body|serialize|selector|user|tongji|error-noise|network-record|ring-buffer|byte-buffer|panel(?:-mount)?|screenshot|element-picker|floating-button|shadow-host|visibility|transport|payload|log-item|upload|offline-queue)\.(?:ts|vue)|[\\/]src[\\/](?:index|sdk|config|integrations)\.ts|@xysfe[\\/]bug-tap|[\\/]bug-tap(?:\.min)?\.js|\bsafeCallback\b)/i;function hs(t){if(!t)return;const e=t.split(`
|
|
9
|
+
`),r=e[0]||"",n=e.slice(1).filter(s=>!Ya.test(s));return[r,...n].slice(0,Ka).join(`
|
|
10
|
+
`)}class Ga{constructor(e){this.options=e,this.signatures=new Map,this.started=!1,this.listener=null,this.onError=r=>{try{if(r.target&&r.target!==window){this.options.resourceErrors!==!1&&this.pushResourceError(r);return}if(as(r.error)||r.error===void 0&&$a())return;const n=(r.message||"Script error.").replace(/^Uncaught\s+/,""),i=r.error,s=i&&typeof i.stack=="string"?i.stack:"";this.push({type:"error",message:this.sanitize(n),filename:r.filename?this.sanitize(r.filename):void 0,lineno:r.lineno||void 0,colno:r.colno||void 0,stack:s?this.sanitize(hs(s)||""):void 0,cause:ds(i==null?void 0:i.cause),timestamp:Date.now(),count:1})}catch(n){}},this.onRejection=r=>{try{const n=r.reason;if(as(n))return;this.push({...this.fromUnknown(n),type:"unhandledrejection"})}catch(n){}},this.buffer=new $n(e.max)}setListener(e){this.listener=e}pushResourceError(e){const r=e.target;if(!r||typeof r.tagName!="string")return;const n=r.tagName.toLowerCase(),i=r.currentSrc||r.getAttribute("src")||r.getAttribute("href")||"";this.push({type:"resource",message:this.sanitize(`Resource load failed: <${n}>${i?` ${i}`:""}`),filename:i?this.sanitize(i):void 0,timestamp:Date.now(),count:1})}captureFromBrowserApi(e,r){try{this.push(this.fromUnknown(e,`[${r}]`,r))}catch(n){}}captureException(e,r){try{this.push(this.fromUnknown(e,"",void 0,r),!1)}catch(n){}}captureMessage(e,r){try{this.push({type:"error",message:this.sanitize(String(e!=null?e:"")),context:r&&Object.keys(r).length>0?r:void 0,timestamp:Date.now(),count:1},!1)}catch(n){}}fromUnknown(e,r="",n,i){let s,o,l;if(e instanceof Error)s=`${e.name||"Error"}: ${e.message}`,o=e.stack,l=ds(e.cause);else if(typeof e=="string")s=e;else try{s=JSON.stringify(e)}catch(c){s=String(e)}const a=o?hs(o):void 0,u=Pn(a);return{type:"error",message:this.sanitize(n?`${r} ${s}`:`${r}${s}`),filename:u!=null&&u.url?this.sanitize(u.url):void 0,lineno:u==null?void 0:u.line,colno:u==null?void 0:u.column,stack:a?this.sanitize(a):void 0,cause:l,context:i&&Object.keys(i).length>0?i:void 0,timestamp:Date.now(),count:1}}start(){if(!this.started){this.started=!0;try{this.previousStackTraceLimit=Error.stackTraceLimit,Error.stackTraceLimit=Xa}catch(e){}window.addEventListener("error",this.onError,!0),window.addEventListener("unhandledrejection",this.onRejection)}}stop(){if(this.started&&(this.started=!1,window.removeEventListener("error",this.onError,!0),window.removeEventListener("unhandledrejection",this.onRejection),this.previousStackTraceLimit!==void 0)){try{Error.stackTraceLimit=this.previousStackTraceLimit}catch(e){}this.previousStackTraceLimit=void 0}}getErrors(){return this.buffer.toArray()}getPatchState(){return this.started}clear(){this.buffer.clear(),this.signatures.clear()}push(e,r=!0){if(r&&this.shouldDrop(e))return;const n=`${e.type}|${e.message}|${e.filename||""}|${e.lineno||""}`,i=this.signatures.get(n),s=e.timestamp;if(r&&i&&s-i.lastTs<Wa){if(this.buffer.includes(i.record)){i.record.count+=1,i.lastTs=s;return}this.signatures.delete(n)}if(this.signatures.size>=fs&&(this.pruneSignatures(s),this.signatures.size>=fs&&this.signatures.clear()),this.signatures.set(n,{record:e,lastTs:s}),this.buffer.push(e),this.listener)try{this.listener(e)}catch(o){}}pruneSignatures(e){for(const[r,n]of this.signatures)(e-n.lastTs>=Va||!this.buffer.includes(n.record))&&this.signatures.delete(r)}shouldDrop(e){const r=this.options.ignoreErrors||[];if(r.length>0&&va(e.message,r)||xa(e))return!0;const n=ma(e.stack,e.filename);return!Sa(n,this.options.allowUrls||[],this.options.denyUrls||[])}sanitize(e){return String(e).slice(0,4e3)}}class Ja{constructor(e,r,n){this.maxItems=e,this.maxBytes=r,this.sizeOf=n,this.items=[],this.sizes=[],this.head=0,this.total=0,this.droppedItems=0,this.droppedBytes=0,this.evictedItems=0,this.evictedBytes=0}get size(){return this.items.length-this.head}get bytes(){return this.total}get dropped(){return{count:this.droppedItems,bytes:this.droppedBytes}}get evicted(){return{count:this.evictedItems,bytes:this.evictedBytes}}push(e){const r=this.sizeOf(e);if(r>this.maxBytes)return this.droppedItems+=1,this.droppedBytes+=r,"dropped";let n=!1;for(;this.size>0&&(this.total+r>this.maxBytes||this.size>=this.maxItems);)this.shift(),n=!0;return this.items.push(e),this.sizes.push(r),this.total+=r,n?"evicted":"ok"}toArray(){return this.items.slice(this.head)}update(e,r){for(let n=this.head;n<this.items.length;n+=1){const i=this.items[n];if(!e(i))continue;const s=r(i),o=this.sizeOf(s),l=o-(this.sizes[n]||0);return this.total+l>this.maxBytes?"dropped":(this.items[n]=s,this.sizes[n]=o,this.total+=l,"ok")}return"missed"}clear(){this.items=[],this.sizes=[],this.head=0,this.total=0,this.droppedItems=0,this.droppedBytes=0,this.evictedItems=0,this.evictedBytes=0}shift(){const e=this.sizes[this.head]||0;this.items[this.head]=void 0,this.head+=1,this.total-=e,this.evictedItems+=1,this.evictedBytes+=e,this.head>=this.items.length?(this.items=[],this.sizes=[],this.head=0):this.head>64&&this.head*2>this.items.length&&(this.items=this.items.slice(this.head),this.sizes=this.sizes.slice(this.head),this.head=0)}}const Qa=/text\/event-stream/i,Za=/^(?:image|video|audio|font)\/|^application\/(?:octet-stream|x-protobuf|protobuf|zip|gzip|x-zip-compressed|pdf|wasm|vnd\.ms-fontobject)/i;function jn(t,e){if(e<=0)return t;let r=0,n=0;for(;n<t.length;){const i=t.charCodeAt(n);let s,o=1;if(i<128?s=1:i<2048?s=2:i<55296||i>=57344?s=3:(s=4,o=i>=56320?1:2),r+s>e)break;r+=s,n+=o}return n>=t.length?t:`${t.slice(0,n)}…[truncated]`}function Vt(t){let e=0;for(let r=0;r<t.length;r+=1){const n=t.charCodeAt(r);n<128?e+=1:n<2048?e+=2:n<55296||n>=57344?e+=3:(e+=4,r+=1)}return e}function tc(t){if(t!=null)try{if(typeof t=="string")return t;if(typeof URLSearchParams!="undefined"&&t instanceof URLSearchParams)return t.toString();if(typeof FormData!="undefined"&&t instanceof FormData){const e=[];return t.forEach((r,n)=>{if(typeof File!="undefined"&&r instanceof File){const i=r.name||"blob",s=r.type||"unknown";e.push(`${n}=[File ${i} ${r.size}B ${s}]`);return}if(typeof Blob!="undefined"&&r instanceof Blob){e.push(`${n}=[Blob ${r.size}B ${r.type||"unknown"}]`);return}e.push(`${n}=${String(r)}`)}),e.join("&")}return typeof Blob!="undefined"&&t instanceof Blob?`[Blob ${t.size}B ${t.type||"unknown"}]`:typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?`[Binary ${t.byteLength}B]`:typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView(t)?`[Binary ${t.byteLength}B]`:typeof ReadableStream!="undefined"&&t instanceof ReadableStream?"[ReadableStream]":`[${Object.prototype.toString.call(t).slice(8,-1)}]`}catch(e){return"[Unreadable]"}}function Ae(t,e=Number.MAX_SAFE_INTEGER){try{return Vt(JSON.stringify(t))}catch(r){return e}}function ps(t,e,r){const n=(t||"").toLowerCase();return!(Qa.test(n)||Za.test(n)||e>0&&e>r)}function gs(t,e){if(typeof t.getReader!="function"||typeof TextDecoder=="undefined")return new Response(t).text();const r=t.getReader(),n=new TextDecoder("utf-8",{fatal:!1}),i=[];let s=0,o=!1;const l=()=>{try{Promise.resolve(r.cancel()).catch(()=>{})}catch(c){}},a=()=>r.read().then(({done:c,value:d})=>c?(i.push(n.decode()),u()):d?(s+=d.byteLength,s>e?(o=!0,l(),u()):(i.push(n.decode(d,{stream:!0})),a())):a(),()=>(o=!0,l(),u())),u=()=>{const c=i.join("");return o?`${c}…[truncated]`:c};return a()}function ec(t,e){try{const r=t.getResponseHeader("content-type"),n=Number(t.getResponseHeader("content-length")||0);if(!ps(r,n,e))return;const i=t.responseType;if(i===""||i==="text"){const s=t.responseText;return s?jn(s,e):void 0}if(i==="json"){const s=t.response;if(s==null)return;try{return jn(JSON.stringify(s),e)}catch(o){return}}return`[${i}]`}catch(r){return}}const rc=2e3,nc=500,ic=1e3;function ir(t){return Number.isFinite(t)&&t>0?Math.round(t):0}function sc(t){return{dns:ir(t.domainLookupEnd-t.domainLookupStart),connect:ir(t.connectEnd-t.connectStart),ttfb:ir(t.responseStart-t.startTime),download:ir(t.responseEnd-t.responseStart),total:ir(t.responseEnd-t.startTime)}}class oc{constructor(){this.started=new Map,this.enabled=!0}remember(e,r,n){if(!(!this.enabled||!Number.isFinite(n))&&(this.started.set(e,{url:r,start:n}),this.started.size>ic)){const i=this.started.keys().next();i.done||this.started.delete(i.value)}}attach(e){if(e.timing)return e;const r=this.started.get(e.id);if(!r)return e;const n=this.find(r.url,r.start);return n?{...e,timing:n}:e}clear(){this.started.clear()}find(e,r){if(this.enabled)try{if(typeof performance=="undefined"||typeof performance.getEntriesByName!="function")return;const n=performance.getEntriesByName(e);if(!n.length||n.length>nc)return;let i,s=1/0;for(const o of n){if(typeof o.responseEnd!="number"||o.responseEnd<=0)continue;const l=Math.abs(o.startTime-r);l<s&&(s=l,i=o)}return!i||s>rc?void 0:sc(i)}catch(n){this.enabled=!1;return}}}function sr(t){try{return new URL(t,location.href).href}catch(e){return t}}const lc=4096,ac=40;function cc(t,e){return e===!0||e.indexOf(t)>=0}function we(t,e,r,n){const i=String(e||"").trim().toLowerCase();if(!i||!cc(i,n)||!(i in t)&&Object.keys(t).length>=ac)return;const s=String(r!=null?r:"").slice(0,lc);s&&(t[i]=s)}function Un(t,e){if(!t)return;const r={};try{if(t&&typeof t.forEach=="function"&&(typeof Headers=="undefined"||t instanceof Headers||typeof t.get=="function"))t.forEach((n,i)=>we(r,i,n,e));else if(t&&typeof t.get=="function"){const n=e===!0?[...$r]:e;for(const i of n){const s=t.get(i);s&&we(r,i,s,!0)}}else if(Array.isArray(t))for(const n of t)Array.isArray(n)&&n.length>=2&&we(r,String(n[0]),n[1],e);else if(typeof t=="object")for(const[n,i]of Object.entries(t))Array.isArray(i)?i.forEach(s=>we(r,n,s,e)):we(r,n,i,e)}catch(n){}return Object.keys(r).length>0?r:void 0}function uc(t,e){return t?e?{...t,...e}:t:e}function fc(t,e){const r={};return t.trim().split(/[\r\n]+/).forEach(n=>{const i=n.indexOf(":");i<=0||we(r,n.slice(0,i),n.slice(i+1).trim(),e)}),Object.keys(r).length>0?r:void 0}function ve(){return typeof performance!="undefined"&&typeof performance.now=="function"?performance.now():Date.now()}function ms(t){try{const e=new URL(t,location.href);return`${e.origin}${e.pathname.replace(/\/+$/,"")||"/"}`}catch(e){return null}}function dc(t){return typeof t=="string"?t:typeof URL!="undefined"&&t instanceof URL?t.href:typeof Request!="undefined"&&t instanceof Request?t.url:String(t)}class hc{constructor(e){this.options=e,this.timing=new oc,this.pendingXhr=new WeakMap,this.originalFetch=null,this.wrappedFetch=null,this.originalOpen=null,this.wrappedOpen=null,this.originalSend=null,this.wrappedSend=null,this.originalSetRequestHeader=null,this.wrappedSetRequestHeader=null,this.originalWebSocket=null,this.wrappedWebSocket=null,this.originalEventSource=null,this.wrappedEventSource=null,this.started=!1,this.seq=0,this.listener=null,this.buffer=new Ja(e.max,e.maxBytes,r=>this.sizeOf(r)),this.selfUrls=(e.selfUrls||[]).filter(Boolean).map(r=>ms(r)).filter(r=>r!==null),this.matchers=(e.excludeUrls||[]).slice(),this.requestHeaderAllow=e.requestHeaders===!0?!0:(e.requestHeaders||[]).map(r=>r.toLowerCase()),this.responseHeaderAllow=e.responseHeaders===!0?!0:Array.from(new Set([...$r,...(e.responseHeaders||[]).map(r=>r.toLowerCase())]))}setListener(e){this.listener=e}skipped(e){try{const r=ms(e);if(r&&this.selfUrls.indexOf(r)>=0)return!0;for(const n of this.matchers)if(qe(n,e))return!0;return!1}catch(r){return!1}}sizeOf(e){let r=0;for(const n of[e.reqHeaders,e.resHeaders])if(n)for(const i of Object.keys(n))r+=Vt(i)+Vt(n[i]||"")+6;return Vt(e.url||"")+Vt(e.reqBody||"")+Vt(e.resBody||"")+Vt(e.error||"")+Vt(e.contentType||"")+r+(e.timing?80:0)+96}start(){if(!this.started&&(this.started=!0,this.patchFetch(),this.patchXhr(),this.options.realtime!==!1))try{this.patchRealtime()}catch(e){}}stop(){if(this.started){if(this.started=!1,this.wrappedFetch&&typeof window.fetch=="function"&&window.fetch===this.wrappedFetch)try{window.fetch=this.originalFetch}catch(e){}if(this.wrappedOpen&&XMLHttpRequest.prototype.open===this.wrappedOpen)try{XMLHttpRequest.prototype.open=this.originalOpen}catch(e){}if(this.wrappedSend&&XMLHttpRequest.prototype.send===this.wrappedSend)try{XMLHttpRequest.prototype.send=this.originalSend}catch(e){}if(this.wrappedSetRequestHeader&&XMLHttpRequest.prototype.setRequestHeader===this.wrappedSetRequestHeader)try{XMLHttpRequest.prototype.setRequestHeader=this.originalSetRequestHeader}catch(e){}if(this.wrappedWebSocket&&window.WebSocket===this.wrappedWebSocket)try{window.WebSocket=this.originalWebSocket}catch(e){}if(this.wrappedEventSource&&window.EventSource===this.wrappedEventSource)try{window.EventSource=this.originalEventSource}catch(e){}this.originalFetch=null,this.wrappedFetch=null,this.originalOpen=null,this.wrappedOpen=null,this.originalSend=null,this.wrappedSend=null,this.originalSetRequestHeader=null,this.wrappedSetRequestHeader=null,this.originalWebSocket=null,this.wrappedWebSocket=null,this.originalEventSource=null,this.wrappedEventSource=null}}getRecords(){return this.buffer.toArray().map(e=>this.timing.attach(e)).sort((e,r)=>e.timestamp-r.timestamp)}getPatchState(){return{fetch:!!this.wrappedFetch&&typeof window.fetch=="function"&&window.fetch===this.wrappedFetch,xhr:typeof XMLHttpRequest!="undefined"&&!!this.wrappedOpen&&!!this.wrappedSend&&XMLHttpRequest.prototype.open===this.wrappedOpen&&XMLHttpRequest.prototype.send===this.wrappedSend,websocket:!!this.wrappedWebSocket&&typeof window.WebSocket=="function"&&window.WebSocket===this.wrappedWebSocket,eventsource:!!this.wrappedEventSource&&typeof window.EventSource=="function"&&window.EventSource===this.wrappedEventSource}}getDropped(){const e=this.buffer.dropped,r=this.buffer.evicted;return{droppedCount:e.count,droppedBytes:e.bytes,evictedCount:r.count,evictedBytes:r.bytes}}clear(){this.buffer.clear(),this.timing.clear()}patchFetch(){if(typeof window.fetch!="function")return;const e=window.fetch;this.originalFetch=e;const r=this,n=function(i,s){if(!r.started)return e.apply(this,arguments);const o=ve(),l=r.nextId(),a=Date.now(),u=dc(i),c=sr(u);if(r.skipped(c))return e.apply(this,arguments);r.timing.remember(l,c,o);const d=(s&&s.method||(typeof Request!="undefined"&&i instanceof Request?i.method:"GET")).toUpperCase(),p=r.requestHeadersOf(s&&s.headers,i),x=r.bodyOf(s&&s.body),R=x===void 0&&r.options.captureBody&&typeof Request!="undefined"&&i instanceof Request?r.requestBodyOf(i):Promise.resolve(x);let k;try{k=e.apply(this,arguments)}catch(N){throw r.record({id:l,type:"fetch",method:d,url:c,reqHeaders:p,reqBody:x,durationMs:Math.round(ve()-o),error:N instanceof Error?N.message:String(N),timestamp:a}),N}return k.then(N=>(r.started&&r.observeResponse(N,{id:l,method:d,url:c,start:o,timestamp:a,reqHeaders:p,reqBody:x,reqBodyLater:R}),N),N=>{throw r.started&&r.recordWithBody({id:l,type:"fetch",method:d,url:c,reqHeaders:p,durationMs:Math.round(ve()-o),error:N instanceof Error?N.message:String(N),timestamp:a},R),N})};n.__bugTap=!0,this.wrappedFetch=n;try{window.fetch=n}catch(i){}}patchXhr(){if(typeof XMLHttpRequest=="undefined")return;const e=this,r=XMLHttpRequest.prototype,n=r.open,i=r.send,s=r.setRequestHeader;this.originalOpen=n,this.originalSend=i,this.originalSetRequestHeader=s;const o=function(u,c){const d=e.requestHeaderAllow;if(e.started&&(d===!0||d.length>0))try{const p=e.pendingXhr.get(this);if(p){const x=p.reqHeaders||{};we(x,String(u),c,d),p.reqHeaders=Object.keys(x).length>0?x:void 0}}catch(p){}return s.call(this,u,c)},l=function(u,c,...d){if(!e.started)return n.apply(this,[u,c,...d]);try{e.pendingXhr.set(this,{id:e.nextId(),method:String(u||"GET").toUpperCase(),url:sr(String(c)),start:0,timestamp:Date.now()})}catch(p){}return n.apply(this,[u,c,...d])},a=function(u){if(!e.started)return i.apply(this,[u]);const c=e.pendingXhr.get(this);if(c&&e.skipped(c.url))return e.pendingXhr.delete(this),i.apply(this,[u]);if(c){c.start=ve(),c.timestamp=Date.now(),c.reqBody=e.bodyOf(u),e.timing.remember(c.id,c.url,c.start);try{this.addEventListener("abort",()=>{c.aborted=!0},{once:!0})}catch(d){}try{this.addEventListener("loadend",()=>{if(e.started)try{const d=this.status,p=c.aborted===!0;e.record({id:c.id,type:"xhr",method:c.method,url:c.url,reqHeaders:c.reqHeaders,reqBody:c.reqBody,resBody:e.options.captureBody?ec(this,e.options.maxCloneBytes):void 0,status:d||void 0,ok:p?void 0:d>=200&&d<400,durationMs:Math.round(ve()-c.start),error:d===0&&!p?"Network Error":void 0,resHeaders:e.xhrResponseHeaders(this),timestamp:c.timestamp})}catch(d){}},{once:!0})}catch(d){}}return i.apply(this,[u])};this.wrappedOpen=l,this.wrappedSend=a,this.wrappedSetRequestHeader=o,this.wrappedOpen.__bugTap=!0,this.wrappedSend.__bugTap=!0,this.wrappedSetRequestHeader.__bugTap=!0;try{r.open=this.wrappedOpen,r.send=this.wrappedSend,r.setRequestHeader=this.wrappedSetRequestHeader}catch(u){}}patchRealtime(){this.patchWebSocket(),this.patchEventSource()}wrapRealtime(e,r,n){if(e.__bugTap)return null;const i=this,s=function(o,l){const a=n(o,l);try{i.observeRealtime(a,r,String(o))}catch(u){}return a};return Object.setPrototypeOf(s,e),s.prototype=e.prototype,s.__bugTap=!0,s}patchWebSocket(){if(typeof window=="undefined"||typeof window.WebSocket!="function")return;const e=window.WebSocket,r=this.wrapRealtime(e,"websocket",(n,i)=>i===void 0?new e(n):new e(n,i));if(r){this.originalWebSocket=e,this.wrappedWebSocket=r;try{window.WebSocket=this.wrappedWebSocket}catch(n){this.originalWebSocket=null,this.wrappedWebSocket=null}}}patchEventSource(){if(typeof window=="undefined"||typeof window.EventSource!="function")return;const e=window.EventSource,r=this.wrapRealtime(e,"eventsource",(n,i)=>i===void 0?new e(n):new e(n,i));if(r){this.originalEventSource=e,this.wrappedEventSource=r;try{window.EventSource=this.wrappedEventSource}catch(n){this.originalEventSource=null,this.wrappedEventSource=null}}}observeRealtime(e,r,n){if(this.started===!1)return;const i=sr(n);if(this.skipped(i))return;const s=this.nextId(),o=ve(),l=Date.now();this.pushRecord({id:s,type:r,method:r==="websocket"?"WS":"SSE",url:i,durationMs:0,timestamp:l});const a=u=>{if(this.started)try{this.buffer.update(c=>c.id===s,c=>({...c,...u,durationMs:Math.round(ve()-o)}))}catch(c){}};try{e.addEventListener("open",()=>a({ok:!0,error:void 0})),e.addEventListener("error",()=>a({ok:!1,error:r==="websocket"?"WebSocket error":"EventSource error"})),e.addEventListener("close",u=>{const c=u,d=typeof c.code=="number"?c.code:void 0,p=typeof c.reason=="string"?c.reason:"";a({status:d,ok:d===1e3||d===1005,error:d!==void 0&&d!==1e3&&d!==1005?`closed (${d}${p?`: ${p}`:""})`:void 0})})}catch(u){}}bodyOf(e){if(this.options.captureBody)return tc(e)}requestHeadersOf(e,r){if(this.requestHeaderAllow!==!0&&this.requestHeaderAllow.length===0)return;const n=Un(e,this.requestHeaderAllow),i=typeof Request!="undefined"&&r instanceof Request?Un(r.headers,this.requestHeaderAllow):void 0;return uc(i,n)}xhrResponseHeaders(e){try{let r;if(this.responseHeaderAllow===!0){const i=e.getAllResponseHeaders?e.getAllResponseHeaders():"";if(i)return fc(i,!0);r=[...$r]}else r=this.responseHeaderAllow;const n={};for(const i of r){const s=e.getResponseHeader(i);s&&we(n,i,s,!0)}return Object.keys(n).length>0?n:void 0}catch(r){return}}textOf(e){return e||void 0}observeResponse(e,r){var i;const{reqBodyLater:n}=r;try{const s={id:r.id,type:"fetch",method:r.method,url:r.url,status:e.status,ok:e.ok,durationMs:Math.round(ve()-r.start),timestamp:r.timestamp,contentType:e.headers.get("content-type")||void 0,reqHeaders:r.reqHeaders,resHeaders:Un(e.headers,this.responseHeaderAllow)};if(!this.options.captureBody){this.recordWithBody(s,n);return}const o=Number(e.headers.get("content-length")||0);if(!ps((i=s.contentType)!=null?i:null,o,this.options.maxCloneBytes)){this.recordWithBody(s,n);return}let l;try{l=e.clone()}catch(u){this.recordWithBody(s,n);return}const a=l.body;if(!a||typeof TextDecoder=="undefined"){l.text().then(u=>this.recordWithBody({...s,resBody:this.textOf(jn(u,this.options.maxCloneBytes))},n),()=>this.recordWithBody(s,n));return}this.recordStreaming(s,n,gs(a,this.options.maxCloneBytes))}catch(s){}}requestBodyOf(e){if(!e.body)return Promise.resolve(void 0);try{const r=e.clone().body;return!r||typeof TextDecoder=="undefined"?Promise.resolve(void 0):gs(r,this.options.maxCloneBytes).then(n=>this.textOf(n),()=>{})}catch(r){return Promise.resolve(void 0)}}recordStreaming(e,r,n){const i=this.recordWithBody(e,r);Promise.all([i,n.catch(()=>"")]).then(([,s])=>{if(!this.started)return;const o=this.textOf(s);o&&this.buffer.update(l=>l.id===e.id,l=>l.resBody?l:{...l,resBody:o})}).catch(()=>{})}record(e){this.recordWithBody(e,Promise.resolve(e.reqBody))}recordWithBody(e,r){return r.catch(()=>{}).then(n=>{this.started&&this.pushRecord(n?{...e,reqBody:n}:e)})}pushRecord(e){try{if(!e.url||e.url.startsWith("data:")||e.url.startsWith("blob:")||this.skipped(e.url))return;if(this.buffer.push({...e}),this.listener)try{this.listener(e)}catch(r){}}catch(r){}}nextId(){return this.seq+=1,`n${Date.now().toString(36)}${this.seq}`}}function pc(){try{if(typeof performance=="undefined")return 0;const t=typeof performance.timeOrigin=="number"?performance.timeOrigin:0,e=typeof performance.getEntriesByType=="function"?performance.getEntriesByType("navigation")[0]:void 0;if(t>0){const r=e&&Number.isFinite(e.startTime)&&e.startTime>0?e.startTime:0;return t+r}if(typeof performance.now=="function"){const r=performance.now();if(Number.isFinite(r)&&r>=0)return Date.now()-r}}catch(t){}return 0}function gc(t){const e=Math.max(1024,Math.floor((t.transport.maxItemBytes-32768)/2));return Math.min(t.collect.maxCloneBytes,e)}class bs{constructor(e){this.config=e,this.consoleCollector=null,this.errorCollector=null,this.networkCollector=null,this.breadcrumbCollector=null,this.browserApiErrors=null,this.startedAt=0}start(){var r,n;const e=this.config;this.startedAt=Date.now(),e.collect.console&&(this.consoleCollector=new qa({max:e.collect.maxConsoleLogs,excludePatterns:e.privacy.excludeConsolePatterns}),this.consoleCollector.start()),this.errorCollector=new Ga({max:e.collect.maxErrors,ignoreErrors:e.filtering.ignoreErrors,denyUrls:e.filtering.denyUrls,allowUrls:e.filtering.allowUrls,resourceErrors:e.collect.resourceErrors}),e.collect.error&&(this.errorCollector.start(),this.browserApiErrors=new Ha({capture:(i,s)=>{var o;return(o=this.errorCollector)==null?void 0:o.captureFromBrowserApi(i,s)},eventListeners:e.collect.eventListenerErrors}),this.browserApiErrors.start()),e.collect.network&&(this.networkCollector=new hc({max:e.collect.maxNetworkRecords,excludeUrls:e.privacy.excludeUrls,selfUrls:[e.endpoint,e.upload.url],captureBody:e.collect.networkBody,realtime:e.collect.realtime,requestHeaders:e.collect.requestHeaders,responseHeaders:e.collect.responseHeaders,maxBytes:e.collect.maxNetworkBytes,maxCloneBytes:gc(e)}),this.networkCollector.start()),e.collect.breadcrumbs&&(this.breadcrumbCollector=new La({max:e.collect.maxBreadcrumbs,dom:!0,navigation:!0,network:e.collect.network,error:e.collect.error,excludeUrls:e.privacy.excludeBreadcrumbUrls,beforeBreadcrumb:e.hooks.beforeBreadcrumb}),this.breadcrumbCollector.start(),(r=this.networkCollector)==null||r.setListener(i=>{var s;return(s=this.breadcrumbCollector)==null?void 0:s.addNetwork(i)}),(n=this.errorCollector)==null||n.setListener(i=>{var s;return(s=this.breadcrumbCollector)==null?void 0:s.addError({message:i.message,timestamp:i.timestamp,count:i.count})}))}stop(){var e,r,n,i,s;(e=this.consoleCollector)==null||e.stop(),(r=this.browserApiErrors)==null||r.stop(),(n=this.errorCollector)==null||n.stop(),(i=this.networkCollector)==null||i.stop(),(s=this.breadcrumbCollector)==null||s.stop(),this.consoleCollector=null,this.errorCollector=null,this.browserApiErrors=null,this.networkCollector=null,this.breadcrumbCollector=null}getData(){const e=this.networkCollector?this.networkCollector.getRecords():[],r=this.consoleCollector?this.consoleCollector.getLogs():[],n=this.errorCollector?this.errorCollector.getErrors():[],i=this.networkCollector?this.networkCollector.getPatchState():{fetch:!1,xhr:!1,websocket:!1,eventsource:!1},s=pc(),o=this.breadcrumbCollector?this.breadcrumbCollector.getBreadcrumbs():void 0;return{logs:r,errors:n,network:e,networkDropped:this.networkCollector?this.networkCollector.getDropped():void 0,collector:{startedAt:this.startedAt,earlyGapMs:s>0&&this.startedAt>s?Math.round(this.startedAt-s):0,patched:{console:this.consoleCollector?this.consoleCollector.getPatchState():!1,fetch:i.fetch,xhr:i.xhr,error:this.errorCollector?this.errorCollector.getPatchState():!1,websocket:i.websocket,eventsource:i.eventsource},counts:{logs:r.length,errors:n.length,network:e.length,breadcrumbs:o?o.length:0},breadcrumbLimit:this.breadcrumbCollector?this.breadcrumbCollector.limit:void 0,breadcrumbEvicted:this.breadcrumbCollector?this.breadcrumbCollector.evicted:void 0},breadcrumbs:o}}clear(){var e,r,n,i;(e=this.consoleCollector)==null||e.clear(),(r=this.errorCollector)==null||r.clear(),(n=this.networkCollector)==null||n.clear(),(i=this.breadcrumbCollector)==null||i.clear()}captureException(e,r){var n;(n=this.errorCollector)==null||n.captureException(e,r)}captureMessage(e,r){var n;(n=this.errorCollector)==null||n.captureMessage(e,r)}addBreadcrumb(e){var r;(r=this.breadcrumbCollector)==null||r.add(e)}disableRouteCapture(){var e;(e=this.breadcrumbCollector)==null||e.disableNavigationCapture()}}const ys="__mcl_session_track__",Fn="_xys_s_id",zn=2628e4,ws="abcdefhijklmnopqrstuvwxyz1234567890",mc=/^cps.*\.(xinhulu|cxmuc)\.com$|^.+\.(kachabao|kachabao100)\.com$/;function vs(){try{return typeof location!="undefined"?location.host:""}catch(t){return""}}function xs(t){return/^niubao.*\.(xinhulu|cxmuc)\.com$/.test(t)||/^.+\.(niubao100|baichuan100)\.com$/.test(t)}function bc(t){return mc.test(t)}function Hr(t){try{const e=new RegExp("(?:^|;+|\\s+)"+t+"=([^;]*)"),r=document.cookie.match(e);return r&&r[1]?r[1]:""}catch(e){return""}}function qn(t,e,r){try{const n=new Date;n.setMinutes(n.getMinutes()+r),document.cookie=`${t}=${escape(e)};expires=${n.toUTCString()};path=/`}catch(n){}}function yc(t){try{if(typeof localStorage!="undefined")return localStorage.getItem(t)}catch(e){}return Hr(t)}function wc(t,e){try{if(typeof localStorage!="undefined"){localStorage.setItem(t,e);return}}catch(r){}qn(t,e,zn)}function Ss(t){let e="";for(let r=0;r<t;r+=1)e+=ws.charAt(Math.floor(Math.random()*ws.length));return e}function vc(){const t=vs();let e="xxid";return bc(t)?e="cps_xxid":xs(t)&&(e="niubao_xxid"),Hr(e)}function xc(){return xs(vs())?Hr("niubao_subid"):null}function Sc(){let t=yc(ys);const e=Hr(Fn);return t?(t!==e&&qn(Fn,t,zn),t):(e?t=e:(t=Ss(24)+Ss(8),qn(Fn,t,zn)),wc(ys,t),t)}function Es(){try{const t=window.tongji;return t&&typeof t=="object"?t:null}catch(t){return null}}function Wn(t,e){let r;if(typeof t=="function")try{r=t.call(Es())}catch(n){}if((r==null||r==="")&&(r=e()),!(r==null||r===""))return String(r)}let Vn,jr=0;const Ec=3e4;function _c(){if(typeof document=="undefined")return;const t=Date.now();if(jr>0&&t-jr<Ec)return Vn;try{const e=Es(),r=Wn(e==null?void 0:e.getXid,vc),n=Wn(e==null?void 0:e.getSubId,xc),i=Wn(e==null?void 0:e.getSessionId,Sc),s=r||n||i?{xid:r,subId:n,sessionId:i}:void 0;return Vn=s,jr=t,s}catch(e){return}}function Cc(){Vn=void 0,jr=0}function _s(t,e){for(const[r,n]of e){const i=t.match(r);if(i)return{name:n,version:i[1]}}return null}function Tc(t){const e=String(t||""),r=_s(e,[[/MicroMessenger\/([\d.]+)/i,"WeChat"],[/AlipayClient\/([\d.]+)/i,"Alipay"],[/Edg\/([\d.]+)/i,"Edge"],[/OPR\/([\d.]+)/i,"Opera"],[/Firefox\/([\d.]+)/i,"Firefox"],[/Chrome\/([\d.]+)/i,"Chrome"],[/Version\/([\d.]+).*Safari/i,"Safari"],[/MSIE ([\d.]+)/i,"IE"],[/Trident\/.*rv:([\d.]+)/i,"IE"]]),n=_s(e,[[/HarmonyOS/i,"HarmonyOS"],[/Windows NT 10\.0/i,"Windows"],[/Windows NT/i,"Windows"],[/Android[ /]([\d.]+)/i,"Android"],[/(?:iPhone|iPad|iPod).*OS ([\d_]+)/i,"iOS"],[/Mac OS X/i,"macOS"],[/Linux/i,"Linux"]]);return{browser:r==null?void 0:r.name,browserVersion:r==null?void 0:r.version,os:n==null?void 0:n.name}}function Cs(){return{url:location.href,referrer:document.referrer&&document.referrer!==location.href?document.referrer:void 0,title:document.title||void 0}}function Ts(t){const e=Number.isFinite(t)&&t>0?t:1;return Math.round(e*100)/100}function kc(t,e,r){return`${t||0}*${e||0} @ ${Ts(r)}x`}function Rc(t){const e=navigator.userAgent,r=Tc(e);let n="";try{n=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(a){n=""}const i=typeof window.screen!="undefined"?window.screen:void 0,s=i&&(i.width||i.availWidth)||0,o=i&&(i.height||i.availHeight)||0,l=Ts(window.devicePixelRatio||1);return{userAgent:e,platform:navigator.platform||void 0,browser:r.browser,browserVersion:r.browserVersion,os:r.os,screenWidth:s,screenHeight:o,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,dpr:l,device:kc(s,o,l),language:navigator.language||"",timezone:n}}function Ac(t){return{page:Cs(),browser:Rc()}}const Mc=30,ks=200;function Oc(t){if(!t)return;let e=t;if(typeof t=="function")try{e=t()}catch(s){return}const r=Zi(e);if(!r||typeof r=="function")return;const n={};let i=0;for(const s of Object.keys(r)){if(i>=Mc)break;const o=String(r[s]).trim();o&&(n[s]=o.length>ks?o.slice(0,ks):o,i+=1)}return i>0?n:void 0}const Pc=200,Ic=5e3,$t=15e5;function se(t,e){return t.length>e?t.slice(0,e):t}function Rs(t){return((String(t||"").split(`
|
|
11
|
+
`)[0]||"").trim()||"页面反馈").slice(0,60)}function Lc(){try{if(typeof crypto!="undefined"&&typeof crypto.randomUUID=="function")return crypto.randomUUID()}catch(t){}return`r${Date.now().toString(36)}${Math.random().toString(36).slice(2,10)}`}const Nc={userAgent:"",screenWidth:0,screenHeight:0,viewportWidth:0,viewportHeight:0,dpr:1,device:"0*0 @ 1x",language:"",timezone:""};function Kn(t){return t&&t.length>0?t:void 0}function $c(t){const{values:e,data:r,config:n}=t,i=n.collect.environment?Ac():{page:Cs(),browser:{...Nc}},s=se(String(e.description||"").trim(),Ic),o=se(String(e.title||"").trim()||Rs(s),Pc),l=Bc(t.elements,n.collect.maxElements),a={project:n.project,environment:n.environment,title:o,description:s,category:e.category?se(String(e.category),40):void 0,severity:e.severity?se(String(e.severity),20):void 0,contact:e.contact?se(String(e.contact),200):void 0,user:Oc(n.user),track:n.collect.trackIds?_c():void 0,page:i.page,browser:i.browser,logs:r.logs,errors:r.errors,network:r.network,networkDropped:Hc(r,n.collect.network),screenshots:Kn(t.screenshots),elements:Kn(l),breadcrumbs:Kn(r.breadcrumbs),collector:r.collector,app:Dc(n),release:n.release||void 0,tags:Xn(t.tags),extra:Xn(t.extra),contexts:Xn(t.contexts),timestamp:Date.now(),sdkVersion:"0.1.0",clientReportId:t.clientReportId||Lc()};return Uc(a)}function Bc(t,e){if(!(!t||t.length===0))return t.slice(-Math.max(1,e)).map(r=>{const n={};return Object.keys(r.attributes||{}).slice(0,20).forEach(i=>{var s;n[i]=se(String((s=r.attributes[i])!=null?s:""),200)}),{...r,selector:se(r.selector,300),text:r.text?se(r.text,200):void 0,attributes:n,path:se(r.path,300)}})}function Xn(t){return t&&Object.keys(t).length>0?t:void 0}function Dc(t){if(!(!t.appVersion&&!t.buildId))return{version:t.appVersion||void 0,buildId:t.buildId||void 0}}function Hc(t,e){if(!e)return{droppedCount:0,droppedBytes:0,evictedCount:0,evictedBytes:0,totalCount:null,sentCount:0};const r=t.networkDropped||{droppedCount:0,droppedBytes:0,evictedCount:0,evictedBytes:0},n=is(r);return{...r,totalCount:n+t.network.length,sentCount:t.network.length}}function Me(t){return Ae(t,$t+1)}function jc(t){return t.map(e=>Ae(e,$t+1)+1)}function or(t,e,r,n){const i=t[e];if(!i||i.length<=r)return;const s=jc(i),o=Ae({...t,[e]:[]},$t+1),l=new Array(i.length+1);l[0]=0;for(let c=0;c<s.length;c+=1)l[c+1]=(l[c]||0)+(s[c]||0);const a=l[i.length]||0;let u=0;for(;i.length-u>r;){const c=i.length-u;if(o+(a-(l[u]||0))-1<=$t)break;u+=Math.max(1,Math.min(n(c),c-r))}u>0&&(t[e]=i.slice(u))}function Ur(t){return e=>Math.ceil(e/t)}function As(t,e){return t.map(r=>e&&!e(r)?r:{...r,reqBody:void 0,resBody:void 0})}function Uc(t){if(Me(t)<=$t)return t;const e=t.network.length;if(t.network=As(t.network,Ra),Me(t)<=$t||(t.network=As(t.network),Me(t)<=$t))return Yn(t,e);if(or(t,"network",0,Ur(8)),or(t,"logs",0,Ur(4)),or(t,"errors",0,Ur(2)),t.screenshots&&Me(t)>$t){const n=t.screenshots.filter(i=>i.source==="manual");n.length>0?t.screenshots=n:delete t.screenshots}return Ms(t,"extra"),Ms(t,"contexts"),or(t,"elements",1,()=>1),t.elements&&Me(t)>$t&&delete t.elements,or(t,"breadcrumbs",10,Ur(2)),t.screenshots&&Me(t)>$t&&delete t.screenshots,Fc(t),zc(t),Yn(t,e)}function Ms(t,e){const r=t[e];if(!r)return;const n=Object.keys(r);for(;n.length>0&&Me(t)>$t;){const i=n.shift();if(i===void 0)break;delete r[i]}Object.keys(r).length===0&&delete t[e]}function Fc(t){if(!t.breadcrumbs||t.breadcrumbs.length===0)return;const e=new Set(t.network.map(r=>r.id));t.breadcrumbs=t.breadcrumbs.map(r=>r.type!=="http"||!r.ref||e.has(r.ref)?r:{...r,ref:void 0,httpError:r.httpError||"[record trimmed]"})}function zc(t){t.collector&&(t.collector={...t.collector,counts:{logs:t.logs.length,errors:t.errors.length,network:t.network.length,breadcrumbs:t.breadcrumbs?t.breadcrumbs.length:0}})}function Yn(t,e){const r=e-t.network.length;return t.networkDropped&&(t.networkDropped={...t.networkDropped,trimmedCount:r,sentCount:t.network.length}),t}const qc=200,Wc=500,Os=32,xe=64,Vc=512;function Kt(t,e){const r=String(t!=null?t:"").replace(/\s+/g," ").trim();return r.length>e?`${r.slice(0,e)}…`:r}function Kc(t){return t.severity==="normal"?2:3}function Xc(t,e){return e===1||e===2||e===3?e:Kc(t)}function Yc(t){return(t.clientReportId.replace(/[^0-9a-zA-Z]/g,"")+"0".repeat(Os)).slice(0,Os)}function Gc(t){let e=t.browser.userAgent;return!e&&typeof navigator!="undefined"&&(e=navigator.userAgent),`H5, ${e||"unknown userAgent"}`}function Ps(t){return t.page.url?t.page.url:typeof location!="undefined"?location.href:""}function Jc(t){var l;const e=t.errors;let r=e.findIndex(a=>a.type!=="resource"&&!!a.stack);r<0&&(r=e.findIndex(a=>a.type!=="resource")),r<0&&(r=e.length>0?0:-1);const n=r>=0?e[r]:void 0,i=n&&(((l=Pn(n.stack))==null?void 0:l.url)||n.filename)||"",s=n?`${n.type}|${n.message}|${i}`:`feedback|${t.project}|${t.title}`;let o=2166136261;for(let a=0;a<s.length;a+=1)o^=s.charCodeAt(a),o=Math.imul(o,16777619);return{primaryIndex:r,fingerprint:`bt-${(o>>>0).toString(16).padStart(8,"0")}`}}function Qc(t){if(!t)return"";const e=Object.keys(t).slice(0,5).map(r=>`${r}=${Kt(t[r],xe)}`);return e.length>0?` ${e.join(" ")}`:""}function Zc(t,e,r){var R,k;const n=Kt(t.title,qc),i=Kt(t.description,Wc),s=i&&i===n?"":i,o=is(t.networkDropped),l=ru(t.user),a=tu(t.track),u=t.collector?Math.round(t.collector.earlyGapMs):0,c=eu(t),d=((R=t.collector)==null?void 0:R.breadcrumbEvicted)||0,p=((k=t.networkDropped)==null?void 0:k.totalCount)===null,x=["【Bug反馈】",n||"(无标题)",s?` | ${s}`:"",t.elements&&t.elements.length>0?` | element=${t.elements.map(N=>N.selector).join(",")}`:"",` | project=${t.project}`,` env=${t.environment}`,l?` user=${l}`:"",a,t.release?` release=${Kt(t.release,xe)}`:"",` fp=${e.fingerprint}`,Qc(t.tags),` reportId=${t.clientReportId}`,p?" | networkDisabled":"",o>0?` | networkDropped=${o}`:"",u>0?` | earlyGap=${u}ms`:"",d>0?` | timelineEvicted=${d}`:"",c?` | ${c}`:""].join("");return!r||r.total<=1?x:`${x} | part=${r.index}/${r.total}`}function tu(t){if(!t)return"";const e=[];return t.xid&&e.push(`xid=${Kt(t.xid,xe)}`),t.subId&&e.push(`subId=${Kt(t.subId,xe)}`),t.sessionId&&e.push(`si=${Kt(t.sessionId,xe)}`),e.length>0?` ${e.join(" ")}`:""}function eu(t){if(!t.app)return"";const e=[];return t.app.version&&e.push(`app=${Kt(t.app.version,xe)}`),t.app.buildId&&e.push(`build=${Kt(t.app.buildId,xe)}`),e.join(" ")}function ru(t){var r,n,i,s;if(!t)return"";const e=(s=(i=(n=(r=t.id)!=null?r:t.name)!=null?n:t.userId)!=null?i:t.account)!=null?s:Object.values(t)[0];return e===void 0?"":Kt(e,xe)}function nu(t){const e={...t.page};return(!e.url||e.url===Ps(t))&&delete e.url,e}function iu(t,e){return{project:t.project,environment:t.environment,sdkVersion:t.sdkVersion,clientReportId:t.clientReportId,release:t.release,fingerprint:e.fingerprint,primaryErrorIndex:e.primaryIndex,title:t.title,description:t.description,category:t.category,severity:t.severity,contact:t.contact,user:t.user,track:t.track,page:nu(t),browser:t.browser,networkDropped:t.networkDropped,collector:t.collector,app:t.app,breadcrumbs:t.breadcrumbs,tags:t.tags,extra:t.extra,contexts:t.contexts}}function su(t){return Ae(t)+1}function Fr(){return{network:[],errors:[],logs:[],bytes:0}}function ou(t,e){const r=[Fr()];let n=e;const i=(l,a)=>{for(const u of l){const c=su(u),d=r[r.length-1],p=d.network.length+d.errors.length+d.logs.length;c>n&&p>0&&(r.push(Fr()),n=e);const x=r[r.length-1];x[a].push(u),x.bytes+=c,n-=c}},s=[],o=[];for(const l of t.network)(ns(l)?s:o).push(l);return i(s,"network"),i(t.errors,"errors"),i(o,"network"),i(t.logs,"logs"),r}function lu(t,e,r){const n=Jc(t),i=iu(t,n),s=t.screenshots&&t.screenshots.length>0?t.screenshots:void 0,o=t.elements&&t.elements.length>0?t.elements:void 0,l=o?Ae(o):0,a=Ae(i)+Vc+(s?Ae(s):0),u=Math.max(1024,e-a),c=ou(t,u),d=c.length>0?c:[Fr()];let p=-1;return o&&(a+d[0].bytes+l+1<=e?p=0:(d.push(Fr()),p=d.length-1)),d.map((x,R)=>{const k={...i};return k.network=x.network.slice().sort((N,z)=>N.timestamp-z.timestamp),k.errors=x.errors,k.logs=x.logs,d.length>1&&(k.part={index:R+1,total:d.length}),R===0&&s&&(k.screenshots=s),R===p&&o&&(k.elements=o),{timestamp:t.timestamp,logLevel:Xc(t,r),userAgent:Gc(t),url:Ps(t),content:Zc(t,n,{index:R+1,total:d.length}),traceId:Yc(t),ext:JSON.stringify(k)}})}const au="bug-tap",Xt="pending",cu=1;function uu(){return typeof indexedDB=="undefined"?Promise.resolve(null):new Promise(t=>{try{const e=indexedDB.open(au,cu);e.onupgradeneeded=()=>{const r=e.result;r.objectStoreNames.contains(Xt)||r.createObjectStore(Xt,{keyPath:"id"})},e.onsuccess=()=>t(e.result),e.onerror=()=>t(null),e.onblocked=()=>t(null)}catch(e){t(null)}})}class fu{constructor(e){this.options=e,this.memory=[],this.db=null}database(){return this.db||(this.db=uu()),this.db}enqueue(e){return this.database().then(r=>{if(!r){this.putMemory(e);return}return this.put(r,e).then(n=>(n||this.putMemory(e),this.prune(r)))})}put(e,r){return new Promise(n=>{try{const i=e.transaction(Xt,"readwrite");i.objectStore(Xt).put(r),i.oncomplete=()=>n(!0),i.onerror=()=>n(!1),i.onabort=()=>n(!1)}catch(i){n(!1)}})}prune(e){return new Promise(r=>{try{const n=e.transaction(Xt,"readwrite"),i=n.objectStore(Xt),s=i.getAll();s.onsuccess=()=>{const o=(s.result||[]).sort((c,d)=>c.createdAt-d.createdAt),l=[],a=[];for(const c of o)(this.isExpired(c)?l:a).push(c);const u=Math.max(0,a.length-this.options.maxItems);l.concat(a.slice(0,u)).forEach(c=>{try{i.delete(c.id)}catch(d){}})},s.onerror=()=>r(),n.oncomplete=()=>r(),n.onerror=()=>r(),n.onabort=()=>r()}catch(n){r()}})}peek(){return this.database().then(e=>e?new Promise(r=>{try{const i=e.transaction(Xt,"readonly").objectStore(Xt).getAll();i.onsuccess=()=>{const s=i.result||[],o=new Set(s.map(a=>a.id)),l=s.concat(this.memory.filter(a=>!o.has(a.id)));r(l.filter(a=>!this.isExpired(a)).sort((a,u)=>a.createdAt-u.createdAt))},i.onerror=()=>r(this.memoryItems())}catch(n){r(this.memoryItems())}}):this.memoryItems())}memoryItems(){return this.memory.filter(e=>!this.isExpired(e)).sort((e,r)=>e.createdAt-r.createdAt)}remove(e){const r=this.memory.findIndex(n=>n.id===e);return r>=0&&this.memory.splice(r,1),this.database().then(n=>{if(n)return new Promise(i=>{try{const s=n.transaction(Xt,"readwrite");s.objectStore(Xt).delete(e),s.oncomplete=()=>i(),s.onerror=()=>i(),s.onabort=()=>i()}catch(s){i()}})})}size(){return this.peek().then(e=>e.length)}isExpired(e){return Date.now()-e.createdAt>this.options.ttlMs}trimMemory(){const e=this.memory.filter(r=>!this.isExpired(r));this.memory.length=0,this.memory.push(...e.slice(-this.options.maxItems))}putMemory(e){const r=this.memory.findIndex(n=>n.id===e.id);r>=0&&this.memory.splice(r,1),this.memory.push(e),this.trimMemory()}}class ct extends Error{constructor(e,r){super(e),this.name="TransportError",this.failure=r.failure,this.status=r.status,this.retryable=r.retryable,this.details=r.details,this.retryAfterMs=r.retryAfterMs,this.queued=r.queued}asQueued(){return new ct(this.message,{failure:this.failure,status:this.status,retryable:this.retryable,details:this.details,retryAfterMs:this.retryAfterMs,queued:!0})}}const du=6e4,hu=15,pu=6e4;function gu(t){return new Promise(e=>setTimeout(e,t))}function mu(t){return 1e3*Math.pow(3,t)+Math.floor(Math.random()*250)}function bu(t,e=Date.now()){if(!t)return;const r=parseInt(t,10);if(!isNaN(r))return r*1e3;const n=Date.parse(t);return isNaN(n)?6e4:Math.max(0,n-e)}class Is{constructor(e){this.config=e,this.pendingCount=0,this.pendingBytes=0,this.successCount=0,this.flushing=null,this.started=!1,this.onOnline=()=>{this.flush()},this.onVisibility=()=>{document.visibilityState==="hidden"&&this.beacon()},this.onPageHide=()=>{this.beacon()};const r=e.transport.offline;this.queue=r.enabled?new fu({ttlMs:r.ttlMs,maxItems:r.maxItems}):null}start(){this.started||typeof window=="undefined"||(this.started=!0,window.addEventListener("online",this.onOnline),window.addEventListener("pagehide",this.onPageHide),document.addEventListener("visibilitychange",this.onVisibility),this.flush())}stop(){this.started&&(this.started=!1,window.removeEventListener("online",this.onOnline),window.removeEventListener("pagehide",this.onPageHide),document.removeEventListener("visibilitychange",this.onVisibility))}send(e){const r=this.config.transport;if(r.maxReportsPerSession>0&&this.successCount>=r.maxReportsPerSession)return Promise.reject(new ct(`本次会话反馈次数已达上限(${r.maxReportsPerSession} 次)`,{failure:"limited",retryable:!1}));if(this.pendingCount>=r.maxConcurrent)return Promise.reject(new ct("正在提交中,请稍后重试",{failure:"busy",retryable:!1}));let n;try{n=JSON.stringify(lu(e,r.maxItemBytes,r.logLevel))}catch(o){return Promise.reject(new ct(`报告序列化失败:${o instanceof Error?o.message:String(o)}`,{failure:"protocol",retryable:!1,details:o}))}const i=Date.now()+r.totalTimeoutMs,s=Vt(n);return this.attempt(n,s,e.clientReportId,0,i,this.config.endpoint).then(o=>(this.successCount+=1,o)).catch(o=>{const l=o instanceof ct?o:this.toTransportError(o);if(!this.shouldQueue(l)||!this.queue)throw l;return this.enqueue(n,s,e.clientReportId).then(()=>{throw l.asQueued()})})}flush(){return this.queue?this.flushing?this.flushing:(this.flushing=this.queue.peek().then(e=>this.flushItems(e,0)).catch(()=>0).finally(()=>{this.flushing=null}),this.flushing):Promise.resolve(0)}flushItems(e,r){var o;const n=e[r];if(!n)return Promise.resolve(0);const i=Date.now()+this.config.transport.timeoutMs,s=(o=n.size)!=null?o:Vt(n.body);return this.once(n.body,s,n.id,i,n.endpoint).then(()=>this.queue.remove(n.id).then(()=>this.flushItems(e,r+1).then(l=>l+1))).catch(l=>{const a=l instanceof ct?l:this.toTransportError(l);return this.shouldQueue(a)?0:this.queue.remove(n.id).then(()=>this.flushItems(e,r+1))})}beacon(){if(this.queue)try{if(typeof navigator=="undefined"||typeof navigator.sendBeacon!="function")return;this.queue.peek().then(e=>{e.forEach(r=>{var n;try{const i=new Blob([r.body],{type:"application/json"});if(i.size>pu)return;navigator.sendBeacon(r.endpoint,i)&&((n=this.queue)==null||n.remove(r.id))}catch(i){}})}).catch(()=>{})}catch(e){}}enqueue(e,r,n){return this.queue?this.queue.enqueue({id:n,endpoint:sr(this.config.endpoint),body:e,size:r,createdAt:Date.now()}):Promise.resolve()}shouldQueue(e){return e.failure==="network"||e.failure==="timeout"?!0:e.failure==="http"&&(e.status===429||(e.status||0)>=500)}attempt(e,r,n,i,s,o){return this.once(e,r,n,s,o).catch(l=>{const a=l instanceof ct?l:this.toTransportError(l),u=this.config.transport.retries;if(i<u&&a.retryable){const c=a.retryAfterMs!==void 0?a.retryAfterMs:mu(i);if(Date.now()+c>=s)throw this.deadlineError(s);return gu(c).then(()=>this.attempt(e,r,n,i+1,s,o))}throw a})}deadlineError(e){return new ct(`提交超时(${Math.round(this.config.transport.totalTimeoutMs/1e3)}s)`,{failure:"timeout",retryable:!1,details:{deadline:e}})}once(e,r,n,i,s){const o=i-Date.now();if(o<=0)return Promise.reject(this.deadlineError(i));const l=new AbortController,a=Math.min(this.config.transport.timeoutMs,o),u=setTimeout(()=>l.abort(),a),c={"Content-Type":"application/json",...this.config.transport.headers};this.pendingCount+=1,this.pendingBytes+=r;const d=this.pendingBytes<=du&&this.pendingCount<hu;return fetch(s,{method:"POST",headers:c,body:e,signal:l.signal,mode:"cors",credentials:"omit",keepalive:d}).then(p=>p.text().then(x=>({response:p,text:x}))).then(({response:p,text:x})=>{let R=null;if(x)try{R=JSON.parse(x)}catch(N){R=x}if(!p.ok){const N=p.status===429||p.status>=500,z=p.status===429?bu(p.headers.get("retry-after")):void 0,j=this.extractMessage(R)||`服务端返回 HTTP ${p.status}`;throw new ct(j,{failure:"http",status:p.status,retryable:N,details:R,retryAfterMs:z})}if(!R||typeof R!="object")throw new ct("服务端响应不是合法 JSON",{failure:"protocol",retryable:!1,details:R});if(R.errCode!==0)throw new ct(this.extractMessage(R)||"上报接口返回失败",{failure:"protocol",retryable:!1,details:R});return{success:!0,reportId:n}}).catch(p=>{throw p instanceof ct?p:p instanceof DOMException&&p.name==="AbortError"?new ct(`请求超时(${Math.round(a/1e3)}s)`,{failure:"timeout",retryable:!0}):new ct(p instanceof Error?p.message:String(p),{failure:"network",retryable:!0})}).finally(()=>{clearTimeout(u),this.pendingCount-=1,this.pendingBytes-=r})}toTransportError(e){return new ct(e instanceof Error?e.message:String(e),{failure:"network",retryable:!0})}extractMessage(e){if(!e||typeof e!="object")return"";const r=e;if(typeof r.errMsg=="string"&&r.errMsg)return r.errMsg;if(typeof r.message=="string")return r.message;const n=r.error;if(n&&typeof n=="object"){const i=n;if(typeof i.message=="string")return i.message}return""}}function yu(t){return Object.keys(t).map(e=>{var r;return`${encodeURIComponent(e)}=${encodeURIComponent((r=t[e])!=null?r:"")}`}).join("&")}function oe(t){return t instanceof Error?t.message:String(t)}function wu(t){if(typeof t=="string")return t;if(t&&typeof t=="object"){const e=t;if(typeof e.url=="string")return e.url;if(typeof e.file_url=="string")return e.file_url}return""}function vu(t,e){if(!t.dataBase64)return Promise.resolve(t.url||"");const r=new AbortController,n=setTimeout(()=>r.abort(),e.timeoutMs),i=`data:${t.mime};base64,${t.dataBase64}`,s=yu({imgdata:i,bizid:e.bizId,name:`bug-report-${Date.now()}.jpg`});return fetch(e.url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:s,credentials:"include",signal:r.signal}).then(o=>o.text().then(l=>({response:o,text:l}))).then(({response:o,text:l})=>{let a=null;try{a=JSON.parse(l)}catch(d){a=null}if(!o.ok)throw new Error(`图片上传失败:HTTP ${o.status}`);if(!a||typeof a!="object")throw new Error("图片上传接口响应不是合法 JSON");const u=a;if(u.ret!==0){const d=typeof u.errmsg=="string"?u.errmsg:"";throw new Error(d||"图片上传失败")}const c=wu(u.data);if(!c)throw new Error("图片上传接口未返回 url");return c}).catch(o=>{throw o instanceof DOMException&&o.name==="AbortError"?new Error(`图片上传超时(${Math.round(e.timeoutMs/1e3)}s)`):new Error(oe(o))}).finally(()=>clearTimeout(n))}const Ls=`
|
|
12
|
+
:host {
|
|
13
|
+
all: initial;
|
|
14
|
+
--br-bg: #ffffff;
|
|
15
|
+
--br-bg-soft: #f6f8fa;
|
|
16
|
+
--br-fg: #1f2328;
|
|
17
|
+
--br-muted: #656d76;
|
|
18
|
+
--br-border: #d0d7de;
|
|
19
|
+
--br-primary: #1d64e0;
|
|
20
|
+
--br-primary-fg: #ffffff;
|
|
21
|
+
--br-danger: #d1242f;
|
|
22
|
+
--br-ok: #1a7f37;
|
|
23
|
+
--br-shadow: 0 8px 30px rgba(15, 23, 42, .18);
|
|
24
|
+
--br-radius: 10px;
|
|
25
|
+
--br-z: 2147483000;
|
|
26
|
+
position: fixed;
|
|
27
|
+
inset: 0;
|
|
28
|
+
z-index: var(--br-z);
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
line-height: 1.6;
|
|
33
|
+
color: var(--br-fg);
|
|
34
|
+
-webkit-font-smoothing: antialiased;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([data-theme="dark"]) {
|
|
38
|
+
--br-bg: #1c2128;
|
|
39
|
+
--br-bg-soft: #22272e;
|
|
40
|
+
--br-fg: #e6edf3;
|
|
41
|
+
--br-muted: #9198a1;
|
|
42
|
+
--br-border: #3d444d;
|
|
43
|
+
--br-primary: #4d8ff0;
|
|
44
|
+
--br-primary-fg: #0d1117;
|
|
45
|
+
--br-danger: #f85149;
|
|
46
|
+
--br-ok: #3fb950;
|
|
47
|
+
--br-shadow: 0 8px 30px rgba(0, 0, 0, .5);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
51
|
+
|
|
52
|
+
.br-fab-wrap {
|
|
53
|
+
position: fixed;
|
|
54
|
+
right: calc(20px + env(safe-area-inset-right, 0px));
|
|
55
|
+
bottom: calc(20px + env(safe-area-inset-bottom, 0px));
|
|
56
|
+
z-index: calc(var(--br-z) + 1);
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
gap: 4px;
|
|
60
|
+
pointer-events: auto;
|
|
61
|
+
touch-action: none;
|
|
62
|
+
transition: opacity .2s ease;
|
|
63
|
+
}
|
|
64
|
+
.br-fab-wrap--left { right: auto; left: calc(20px + env(safe-area-inset-left, 0px)); }
|
|
65
|
+
.br-fab-wrap--hidden { display: none; }
|
|
66
|
+
.br-fab-wrap--free { right: auto; bottom: auto; }
|
|
67
|
+
.br-fab-wrap--dragging { cursor: grabbing; transition: none; }
|
|
68
|
+
/* 滚动时淡化,减少对内容的干扰 */
|
|
69
|
+
.br-fab-wrap--scrolling { opacity: .42; }
|
|
70
|
+
.br-fab-wrap--scrolling .br-fab { box-shadow: 0 2px 8px rgba(15, 23, 42, .16); }
|
|
71
|
+
.br-fab-wrap--dragging .br-fab { transform: scale(1.04); box-shadow: 0 10px 26px rgba(15, 23, 42, .32); }
|
|
72
|
+
|
|
73
|
+
.br-fab-icon {
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
width: 20px;
|
|
78
|
+
height: 20px;
|
|
79
|
+
transition: opacity .15s ease;
|
|
80
|
+
}
|
|
81
|
+
.br-fab-icon svg { display: block; }
|
|
82
|
+
|
|
83
|
+
/* loading:图标淡出,环形指示器覆盖上来 */
|
|
84
|
+
.br-fab--loading { cursor: progress; }
|
|
85
|
+
.br-fab--loading .br-fab-icon { opacity: 0; }
|
|
86
|
+
.br-fab--loading::after {
|
|
87
|
+
content: '';
|
|
88
|
+
position: absolute;
|
|
89
|
+
width: 18px;
|
|
90
|
+
height: 18px;
|
|
91
|
+
border: 2px solid rgba(255, 255, 255, .35);
|
|
92
|
+
border-top-color: var(--br-primary-fg);
|
|
93
|
+
border-radius: 50%;
|
|
94
|
+
animation: br-spin .7s linear infinite;
|
|
95
|
+
}
|
|
96
|
+
@keyframes br-spin { to { transform: rotate(360deg); } }
|
|
97
|
+
@media (prefers-reduced-motion: reduce) {
|
|
98
|
+
.br-fab--loading::after { animation-duration: 2s; }
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.br-fab {
|
|
102
|
+
position: relative;
|
|
103
|
+
display: inline-flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
width: 46px;
|
|
107
|
+
height: 46px;
|
|
108
|
+
padding: 0;
|
|
109
|
+
border: 1px solid rgba(255, 255, 255, .18);
|
|
110
|
+
border-radius: 50%;
|
|
111
|
+
background: var(--br-primary);
|
|
112
|
+
color: var(--br-primary-fg);
|
|
113
|
+
box-shadow: var(--br-shadow);
|
|
114
|
+
cursor: grab;
|
|
115
|
+
pointer-events: auto;
|
|
116
|
+
user-select: none;
|
|
117
|
+
touch-action: none;
|
|
118
|
+
transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
|
|
119
|
+
}
|
|
120
|
+
.br-fab:hover { transform: translateY(-1px); }
|
|
121
|
+
.br-fab:active { cursor: grabbing; }
|
|
122
|
+
.br-fab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
|
|
123
|
+
|
|
124
|
+
.br-overlay {
|
|
125
|
+
position: fixed;
|
|
126
|
+
inset: 0;
|
|
127
|
+
z-index: calc(var(--br-z) + 2);
|
|
128
|
+
display: none;
|
|
129
|
+
background: rgba(15, 23, 42, .38);
|
|
130
|
+
pointer-events: auto;
|
|
131
|
+
}
|
|
132
|
+
.br-overlay--open { display: block; }
|
|
133
|
+
.br-overlay--hidden { display: none; }
|
|
134
|
+
.br-panel--hidden { display: none !important; }
|
|
135
|
+
|
|
136
|
+
.br-panel {
|
|
137
|
+
position: fixed;
|
|
138
|
+
top: 50%;
|
|
139
|
+
left: 50%;
|
|
140
|
+
transform: translate(-50%, -50%);
|
|
141
|
+
width: 640px;
|
|
142
|
+
max-width: calc(100vw - 40px);
|
|
143
|
+
height: 80vh;
|
|
144
|
+
max-height: 900px;
|
|
145
|
+
display: none;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
background: var(--br-bg);
|
|
148
|
+
color: var(--br-fg);
|
|
149
|
+
border-radius: 16px;
|
|
150
|
+
box-shadow: var(--br-shadow);
|
|
151
|
+
pointer-events: auto;
|
|
152
|
+
overflow: hidden;
|
|
153
|
+
}
|
|
154
|
+
.br-panel--open { display: flex; }
|
|
155
|
+
|
|
156
|
+
.br-header {
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
gap: 10px;
|
|
160
|
+
padding: 14px 16px;
|
|
161
|
+
border-bottom: 1px solid var(--br-border);
|
|
162
|
+
background: var(--br-bg);
|
|
163
|
+
}
|
|
164
|
+
.br-heading { flex: 1; margin: 0; font-size: 15px; font-weight: 600; }
|
|
165
|
+
.br-close {
|
|
166
|
+
width: 30px;
|
|
167
|
+
height: 30px;
|
|
168
|
+
border: 1px solid var(--br-border);
|
|
169
|
+
border-radius: 8px;
|
|
170
|
+
background: transparent;
|
|
171
|
+
color: var(--br-muted);
|
|
172
|
+
font: inherit;
|
|
173
|
+
font-size: 16px;
|
|
174
|
+
line-height: 1;
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
}
|
|
177
|
+
.br-close:hover { background: var(--br-bg-soft); color: var(--br-fg); }
|
|
178
|
+
|
|
179
|
+
.br-body {
|
|
180
|
+
flex: 1;
|
|
181
|
+
overflow-y: auto;
|
|
182
|
+
padding: 14px 16px 18px;
|
|
183
|
+
display: flex;
|
|
184
|
+
flex-direction: column;
|
|
185
|
+
gap: 14px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.br-hidden { display: none !important; }
|
|
189
|
+
.br-form { display: flex; flex-direction: column; gap: 14px; }
|
|
190
|
+
.br-field { display: flex; flex-direction: column; gap: 6px; }
|
|
191
|
+
.br-label { font-size: 13px; font-weight: 600; color: var(--br-fg); }
|
|
192
|
+
.br-required { color: var(--br-danger); margin-left: 2px; }
|
|
193
|
+
.br-hint { font-size: 12px; color: var(--br-muted); }
|
|
194
|
+
|
|
195
|
+
.br-input, .br-textarea, .br-select {
|
|
196
|
+
width: 100%;
|
|
197
|
+
border: 1px solid var(--br-border);
|
|
198
|
+
border-radius: 8px;
|
|
199
|
+
background: var(--br-bg);
|
|
200
|
+
color: var(--br-fg);
|
|
201
|
+
font: inherit;
|
|
202
|
+
font-size: 13px;
|
|
203
|
+
padding: 8px 10px;
|
|
204
|
+
outline: none;
|
|
205
|
+
}
|
|
206
|
+
.br-input:focus, .br-textarea:focus, .br-select:focus {
|
|
207
|
+
border-color: var(--br-primary);
|
|
208
|
+
box-shadow: 0 0 0 3px rgba(29, 100, 224, .16);
|
|
209
|
+
}
|
|
210
|
+
.br-textarea { resize: vertical; min-height: 96px; }
|
|
211
|
+
.br-row { display: flex; gap: 10px; }
|
|
212
|
+
.br-row > .br-field { flex: 1; min-width: 0; }
|
|
213
|
+
|
|
214
|
+
.br-shot-preview {
|
|
215
|
+
display: block;
|
|
216
|
+
width: 100%;
|
|
217
|
+
max-height: 220px;
|
|
218
|
+
margin-top: 8px;
|
|
219
|
+
object-fit: contain;
|
|
220
|
+
object-position: top center;
|
|
221
|
+
border: 1px dashed var(--br-border);
|
|
222
|
+
border-radius: 8px;
|
|
223
|
+
background: var(--br-bg-soft);
|
|
224
|
+
}
|
|
225
|
+
.br-shot-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
|
226
|
+
.br-shot-status { font-size: 12px; color: var(--br-muted); }
|
|
227
|
+
.br-btn--link-inline {
|
|
228
|
+
padding: 0;
|
|
229
|
+
border: 0;
|
|
230
|
+
background: transparent;
|
|
231
|
+
color: var(--br-primary);
|
|
232
|
+
font: inherit;
|
|
233
|
+
font-size: 12px;
|
|
234
|
+
cursor: pointer;
|
|
235
|
+
}
|
|
236
|
+
.br-btn--link-inline:hover { text-decoration: underline; }
|
|
237
|
+
.br-element-box { display: flex; flex-direction: column; gap: 8px; }
|
|
238
|
+
.br-element-list { display: flex; flex-direction: column; gap: 4px; }
|
|
239
|
+
.br-element-item {
|
|
240
|
+
display: flex;
|
|
241
|
+
align-items: center;
|
|
242
|
+
gap: 8px;
|
|
243
|
+
padding: 4px 6px 4px 8px;
|
|
244
|
+
border: 1px solid var(--br-border);
|
|
245
|
+
border-radius: 6px;
|
|
246
|
+
background: var(--br-bg-soft);
|
|
247
|
+
}
|
|
248
|
+
.br-element-item-text {
|
|
249
|
+
flex: 1;
|
|
250
|
+
min-width: 0;
|
|
251
|
+
overflow: hidden;
|
|
252
|
+
text-overflow: ellipsis;
|
|
253
|
+
white-space: nowrap;
|
|
254
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
255
|
+
font-size: 12px;
|
|
256
|
+
color: var(--br-fg);
|
|
257
|
+
}
|
|
258
|
+
.br-element-item-del {
|
|
259
|
+
flex: none;
|
|
260
|
+
width: 18px;
|
|
261
|
+
height: 18px;
|
|
262
|
+
padding: 0;
|
|
263
|
+
border: 0;
|
|
264
|
+
border-radius: 4px;
|
|
265
|
+
background: transparent;
|
|
266
|
+
color: var(--br-muted);
|
|
267
|
+
font: inherit;
|
|
268
|
+
font-size: 14px;
|
|
269
|
+
line-height: 1;
|
|
270
|
+
cursor: pointer;
|
|
271
|
+
}
|
|
272
|
+
.br-element-item-del:hover { background: var(--br-border); color: var(--br-fg); }
|
|
273
|
+
|
|
274
|
+
.br-thumb-list { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
275
|
+
.br-attach-row { display: flex; align-items: center; gap: 8px; }
|
|
276
|
+
.br-thumb {
|
|
277
|
+
position: relative;
|
|
278
|
+
width: 72px;
|
|
279
|
+
height: 72px;
|
|
280
|
+
border: 1px solid var(--br-border);
|
|
281
|
+
border-radius: 6px;
|
|
282
|
+
overflow: hidden;
|
|
283
|
+
background: var(--br-bg-soft);
|
|
284
|
+
}
|
|
285
|
+
.br-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
286
|
+
/* 自动截图角标:与用户手动上传的图区分开,避免误以为是自己的图 */
|
|
287
|
+
.br-thumb-tag {
|
|
288
|
+
position: absolute;
|
|
289
|
+
left: 2px;
|
|
290
|
+
bottom: 2px;
|
|
291
|
+
padding: 1px 5px;
|
|
292
|
+
border-radius: 4px;
|
|
293
|
+
background: rgba(15, 23, 42, .62);
|
|
294
|
+
color: #fff;
|
|
295
|
+
font: 11px/1.4 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
|
|
296
|
+
pointer-events: none;
|
|
297
|
+
}
|
|
298
|
+
.br-thumb-del {
|
|
299
|
+
position: absolute;
|
|
300
|
+
top: 2px;
|
|
301
|
+
right: 2px;
|
|
302
|
+
width: 18px;
|
|
303
|
+
height: 18px;
|
|
304
|
+
padding: 0;
|
|
305
|
+
border: 0;
|
|
306
|
+
border-radius: 50%;
|
|
307
|
+
background: rgba(15, 23, 42, .62);
|
|
308
|
+
color: #fff;
|
|
309
|
+
font: inherit;
|
|
310
|
+
font-size: 13px;
|
|
311
|
+
line-height: 1;
|
|
312
|
+
cursor: pointer;
|
|
313
|
+
opacity: 0;
|
|
314
|
+
transition: opacity .15s ease;
|
|
315
|
+
}
|
|
316
|
+
.br-thumb:hover .br-thumb-del,
|
|
317
|
+
.br-thumb-del:focus-visible { opacity: 1; }
|
|
318
|
+
@media (max-width: 560px) {
|
|
319
|
+
.br-thumb-del { opacity: 1; }
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.br-footer {
|
|
323
|
+
display: flex;
|
|
324
|
+
align-items: center;
|
|
325
|
+
gap: 10px;
|
|
326
|
+
padding: 12px 16px;
|
|
327
|
+
border-top: 1px solid var(--br-border);
|
|
328
|
+
background: var(--br-bg);
|
|
329
|
+
}
|
|
330
|
+
.br-footer .br-spacer { flex: 1; }
|
|
331
|
+
|
|
332
|
+
.br-btn {
|
|
333
|
+
border: 1px solid var(--br-border);
|
|
334
|
+
border-radius: 8px;
|
|
335
|
+
background: var(--br-bg);
|
|
336
|
+
color: var(--br-fg);
|
|
337
|
+
font: inherit;
|
|
338
|
+
font-size: 13px;
|
|
339
|
+
padding: 7px 14px;
|
|
340
|
+
cursor: pointer;
|
|
341
|
+
}
|
|
342
|
+
.br-btn:hover { background: var(--br-bg-soft); }
|
|
343
|
+
.br-btn:disabled { opacity: .55; cursor: not-allowed; }
|
|
344
|
+
.br-btn--primary {
|
|
345
|
+
border-color: var(--br-primary);
|
|
346
|
+
background: var(--br-primary);
|
|
347
|
+
color: var(--br-primary-fg);
|
|
348
|
+
}
|
|
349
|
+
.br-btn--primary:hover { filter: brightness(1.05); background: var(--br-primary); }
|
|
350
|
+
.br-btn--ghost { background: transparent; }
|
|
351
|
+
.br-btn--link {
|
|
352
|
+
padding: 0;
|
|
353
|
+
border: 0;
|
|
354
|
+
background: transparent;
|
|
355
|
+
color: var(--br-muted);
|
|
356
|
+
font-size: 12px;
|
|
357
|
+
text-decoration: underline;
|
|
358
|
+
cursor: pointer;
|
|
359
|
+
margin-right: auto;
|
|
360
|
+
}
|
|
361
|
+
.br-btn--link:hover { color: var(--br-fg); }
|
|
362
|
+
.br-btn--sm { padding: 4px 10px; font-size: 12px; }
|
|
363
|
+
|
|
364
|
+
.br-status { font-size: 12px; color: var(--br-muted); min-height: 18px; }
|
|
365
|
+
.br-status--error { color: var(--br-danger); }
|
|
366
|
+
.br-status--ok { color: var(--br-ok); }
|
|
367
|
+
|
|
368
|
+
.br-success { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }
|
|
369
|
+
.br-success-title { font-size: 15px; font-weight: 600; color: var(--br-ok); }
|
|
370
|
+
.br-link { color: var(--br-primary); text-decoration: underline; word-break: break-all; }
|
|
371
|
+
.br-success-actions { display: flex; gap: 8px; margin-top: 4px; }
|
|
372
|
+
|
|
373
|
+
@media (max-width: 560px) {
|
|
374
|
+
.br-panel {
|
|
375
|
+
top: auto;
|
|
376
|
+
left: 0;
|
|
377
|
+
right: 0;
|
|
378
|
+
bottom: 0;
|
|
379
|
+
transform: none;
|
|
380
|
+
width: auto;
|
|
381
|
+
max-width: none;
|
|
382
|
+
height: 75vh;
|
|
383
|
+
max-height: 85vh;
|
|
384
|
+
border-radius: 16px 16px 0 0;
|
|
385
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
386
|
+
}
|
|
387
|
+
.br-row { flex-direction: column; gap: 14px; }
|
|
388
|
+
.br-fab-wrap { right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
|
|
389
|
+
.br-fab-wrap--left { right: auto; left: calc(14px + env(safe-area-inset-left, 0px)); }
|
|
390
|
+
}
|
|
391
|
+
`;class xu{constructor(e,r){this.theme=e,this.media=null,this.onThemeChange=()=>this.applyTheme(),this.host=document.createElement("div"),this.host.setAttribute("data-bug-tap",""),this.host.setAttribute("data-theme",this.resolveTheme()),this.host.style.setProperty("--br-z",String(r)),this.root=this.host.attachShadow({mode:"open"}),this.injectStyles(),this.bindTheme()}mount(){this.host.isConnected||document.documentElement.appendChild(this.host)}unmount(){this.unbindTheme(),this.host.remove()}injectStyles(){try{if(typeof CSSStyleSheet!="undefined"&&"adoptedStyleSheets"in this.root){const r=new CSSStyleSheet;r.replaceSync(Ls),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,r];return}}catch(r){}const e=document.createElement("style");e.textContent=Ls,this.root.appendChild(e)}bindTheme(){if(!(this.theme!=="auto"||typeof window.matchMedia!="function"))try{this.media=window.matchMedia("(prefers-color-scheme: dark)"),typeof this.media.addEventListener=="function"?this.media.addEventListener("change",this.onThemeChange):typeof this.media.addListener=="function"&&this.media.addListener(this.onThemeChange)}catch(e){this.media=null}}unbindTheme(){if(this.media){try{typeof this.media.removeEventListener=="function"?this.media.removeEventListener("change",this.onThemeChange):typeof this.media.removeListener=="function"&&this.media.removeListener(this.onThemeChange)}catch(e){}this.media=null}}applyTheme(){this.host.setAttribute("data-theme",this.resolveTheme())}resolveTheme(){if(this.theme==="light"||this.theme==="dark")return this.theme;try{return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch(e){return"light"}}}const Su=`
|
|
392
|
+
<svg viewBox="0 0 24 24" width="20" height="20" fill="none"
|
|
393
|
+
stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"
|
|
394
|
+
aria-hidden="true" focusable="false">
|
|
395
|
+
<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/>
|
|
396
|
+
<path d="M12 7.6v4.6"/>
|
|
397
|
+
<circle cx="12" cy="15.2" r="1" fill="currentColor" stroke="none"/>
|
|
398
|
+
</svg>`,le=20,Ns=4,$s="bug-tap-fab-position",Eu=46;function zr(t,e,r){return Math.min(r,Math.max(e,t))}function _u(){try{const t=localStorage.getItem($s);if(!t)return null;const e=JSON.parse(t);return e.side!=="left"&&e.side!=="right"||typeof e.top!="number"||!Number.isFinite(e.top)?null:{side:e.side,top:e.top}}catch(t){return null}}function Cu(t){try{localStorage.setItem($s,JSON.stringify(t))}catch(e){}}class Tu{constructor(e){this.options=e,this.startX=0,this.startY=0,this.originLeft=0,this.originTop=0,this.dragging=!1,this.moved=!1,this.suppressClick=!1,this.scrollTimer=0,this.scrolling=!1,this.listeningScroll=!1,this.onScroll=()=>{this.dragging||(this.scrolling||(this.scrolling=!0,this.wrapper.classList.add("br-fab-wrap--scrolling")),this.scrollTimer&&clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.scrolling=!1,this.wrapper.classList.remove("br-fab-wrap--scrolling")},300))},this.onPointerDown=r=>{if(r.button!==0&&r.pointerType==="mouse")return;this.dragging=!0,this.moved=!1,this.startX=r.clientX,this.startY=r.clientY;const n=this.el.getBoundingClientRect();this.originLeft=n.left,this.originTop=n.top;try{this.el.setPointerCapture(r.pointerId)}catch(i){}this.el.addEventListener("pointermove",this.onPointerMove),this.el.addEventListener("pointerup",this.onPointerUp),this.el.addEventListener("pointercancel",this.onPointerUp)},this.onPointerMove=r=>{if(!this.dragging)return;const n=r.clientX-this.startX,i=r.clientY-this.startY;if(!this.moved&&Math.abs(n)<Ns&&Math.abs(i)<Ns)return;this.moved=!0,this.wrapper.classList.add("br-fab-wrap--dragging");const s=this.el.offsetWidth,o=this.el.offsetHeight,l=zr(this.originLeft+n,le,window.innerWidth-s-le),a=zr(this.originTop+i,le,window.innerHeight-o-le);this.applyPosition({left:l,top:a})},this.onPointerUp=r=>{var a,u;if(!this.dragging)return;this.dragging=!1,this.el.removeEventListener("pointermove",this.onPointerMove),this.el.removeEventListener("pointerup",this.onPointerUp),this.el.removeEventListener("pointercancel",this.onPointerUp),this.wrapper.classList.remove("br-fab-wrap--dragging");try{this.el.releasePointerCapture(r.pointerId)}catch(c){}if(r.type==="pointercancel"){this.suppressClick=!1,this.moved=!1;return}if(!this.moved)return;this.suppressClick=!0;const n=this.el.getBoundingClientRect(),s=n.left+n.width/2<window.innerWidth/2?"left":"right",o=zr(n.top,le,window.innerHeight-n.height-le);this.snapTo(s,o);const l={side:s,top:o};Cu(l),(u=(a=this.options).onDragEnd)==null||u.call(a,l)},this.wrapper=document.createElement("div"),this.wrapper.className="br-fab-wrap",e.position==="bottom-left"&&this.wrapper.classList.add("br-fab-wrap--left"),this.el=document.createElement("button"),this.el.type="button",this.el.className="br-fab",this.el.innerHTML=`<span class="br-fab-icon">${Su}</span>`,this.el.title=e.text||"反馈问题",this.el.setAttribute("aria-label",e.text||"打开问题反馈面板"),this.el.setAttribute("aria-haspopup","dialog"),this.wrapper.append(this.el),this.bindEvents(),this.bindScroll()}get element(){return this.wrapper}bindScroll(){this.listeningScroll||(this.listeningScroll=!0,window.addEventListener("scroll",this.onScroll,{capture:!0,passive:!0}))}unbindScroll(){this.listeningScroll&&(this.listeningScroll=!1,window.removeEventListener("scroll",this.onScroll,{capture:!0}),this.scrollTimer&&(clearTimeout(this.scrollTimer),this.scrollTimer=0),this.scrolling=!1,this.wrapper.classList.remove("br-fab-wrap--scrolling"))}bindEvents(){this.el.addEventListener("click",e=>{if(this.suppressClick){this.suppressClick=!1,e.preventDefault(),e.stopPropagation();return}this.options.onClick()}),this.el.addEventListener("pointerdown",this.onPointerDown)}setLoading(e){e?(this.el.classList.add("br-fab--loading"),this.el.setAttribute("aria-busy","true"),this.el.setAttribute("aria-label","正在打开反馈面板")):(this.el.classList.remove("br-fab--loading"),this.el.removeAttribute("aria-busy"),this.el.setAttribute("aria-label",this.el.title))}applyPosition(e){const r=this.wrapper.style;r.left=`${e.left}px`,r.top=`${e.top}px`,r.right="auto",r.bottom="auto",this.wrapper.classList.add("br-fab-wrap--free")}snapTo(e,r){const n=this.wrapper.style;n.removeProperty("left"),n.removeProperty("right"),n.top=`${r}px`,n.bottom="auto",e==="left"?this.wrapper.classList.add("br-fab-wrap--left"):this.wrapper.classList.remove("br-fab-wrap--left"),this.wrapper.classList.remove("br-fab-wrap--free")}restorePosition(){const e=this.el.offsetHeight||Eu,r=_u();if(r){const n=Math.max(le,window.innerHeight-e-le);this.snapTo(r.side,zr(r.top,le,n));return}this.options.position==="bottom-left"&&this.wrapper.classList.add("br-fab-wrap--left")}show(){this.wrapper.classList.remove("br-fab-wrap--hidden")}hide(){this.wrapper.classList.add("br-fab-wrap--hidden")}destroy(){this.unbindScroll(),this.el.removeEventListener("pointerdown",this.onPointerDown)}}function ku(){return window.__BugTapHtml2Canvas}function Ru(t){return new Promise((e,r)=>{const n=`script[data-bug-tap-shot="${t}"]`,i=document.querySelector(n);if(i){i.addEventListener("load",()=>e(),{once:!0}),i.addEventListener("error",()=>r(new Error("截图库加载失败")),{once:!0});return}const s=document.createElement("script");s.src=t,s.async=!0,s.setAttribute("data-bug-tap-shot",t),s.onload=()=>e(),s.onerror=()=>{s.remove(),r(new Error(`截图库加载失败:${t}`))},document.head.appendChild(s)})}function Au(t){return Ru(sr(t)).then(()=>{const e=ku();if(!e)throw new Error("截图库加载完成但未暴露入口");return e})}const Gn="bug-tap-screenshot.min.js";let Bs="";function Mu(t){Bs=String(t||"").trim()}function Ou(){try{const t=document.currentScript;if(t&&t.src)return new URL(Gn,t.src).href;const e=document.querySelectorAll('script[src*="bug-tap"]'),r=e[e.length-1];if(r&&r.src)return new URL(Gn,r.src).href}catch(t){}return Gn}function Pu(){const t=typeof window!="undefined"?window.__BugTapHtml2Canvas:void 0;return t?Promise.resolve(t):Au(Bs||Ou()).then(e=>e)}let qr=null;function Ds(t){Mu(t)}function Hs(){return qr||(qr=Pu().catch(t=>{throw qr=null,t})),qr}function js(){return new Promise(t=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>requestAnimationFrame(()=>t())):setTimeout(t,16)})}function Jn(t,e){const r=t.length-(e>=0?e+1:0);return Math.floor(r*3/4)}function Iu(t){try{return t.hasAttribute("data-bug-tap")||t.hasAttribute("data-bug-tap-ignore")||t instanceof HTMLElement&&t.style.display==="none"&&t.dataset.bugTapHidden==="1"}catch(e){return!1}}function Qn(t,e){let r=t.width,n=t.height,i=t;if(r>e.maxWidth){const d=e.maxWidth/r;r=Math.round(r*d),n=Math.round(n*d);const p=document.createElement("canvas");p.width=r,p.height=n;const x=p.getContext("2d");x&&(x.drawImage(t,0,0,r,n),i=p)}const s=e.maxSizeKB*1024;let o=e.quality,l=i.toDataURL("image/jpeg",o),a=l.indexOf(","),u=Jn(l,a);for(;u>s&&o>.35;)o=Math.max(.35,o-.1),l=i.toDataURL("image/jpeg",o),a=l.indexOf(","),u=Jn(l,a);let c=0;for(;u>s&&c<4;){c+=1;const d=document.createElement("canvas");d.width=Math.max(1,Math.round(i.width*.8)),d.height=Math.max(1,Math.round(i.height*.8));const p=d.getContext("2d");if(!p)break;p.drawImage(i,0,0,d.width,d.height),i=d,l=i.toDataURL("image/jpeg",o),a=l.indexOf(","),u=Jn(l,a)}return{mime:"image/jpeg",dataBase64:l.slice(a+1),width:i.width,height:i.height,size:u,source:e.source||"auto",capturedAt:Date.now()}}function Lu(){return Math.min(2,Math.max(1,window.devicePixelRatio||1))}function Us(t,e){return t(document.documentElement,{x:window.scrollX,y:window.scrollY,width:window.innerWidth,height:window.innerHeight,scrollX:window.scrollX,scrollY:window.scrollY,windowWidth:window.innerWidth,windowHeight:window.innerHeight,scale:Lu(),useCORS:!0,logging:!1,backgroundColor:null,foreignObjectRendering:!1,...e?{ignoreElements:e}:{}})}function Nu(t){const e=t.ignoreElement||null;return Promise.all([js(),Hs()]).then(([,r])=>Us(r,Iu)).then(r=>Qn(r,t)).catch(r=>{if(!e)throw r;const n=e.style.display;return e.style.display="none",Promise.all([js(),Hs()]).then(([,i])=>Us(i)).then(i=>Qn(i,t)).finally(()=>{e.style.display=n})})}function $u(t,e){return new Promise((r,n)=>{if(!t||!/^image\//.test(t.type)){n(new Error("请选择图片文件"));return}const i=URL.createObjectURL(t),s=new Image;s.onload=()=>{try{const o=s.naturalWidth||s.width,l=s.naturalHeight||s.height;if(!o||!l)throw new Error("图片尺寸无效");const a=Math.min(1,e.maxWidth/o),u=document.createElement("canvas");u.width=Math.max(1,Math.round(o*a)),u.height=Math.max(1,Math.round(l*a));const c=u.getContext("2d");if(!c)throw new Error("当前环境不支持 Canvas");c.drawImage(s,0,0,u.width,u.height);const d=Qn(u,{...e,source:"manual"});URL.revokeObjectURL(i),r(d)}catch(o){URL.revokeObjectURL(i),n(o)}},s.onerror=()=>{URL.revokeObjectURL(i),n(new Error("图片读取失败"))},s.src=i})}function Fs(t){return typeof t=="object"&&t!==null&&t.nodeType===Node.ELEMENT_NODE}const lr={NONE:"",DESCENDANT:" ",CHILD:" > "},et={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"};function Bu(t,e){return Object.values(t).includes(e)}const Du="CssSelectorGenerator";function Wr(t="unknown problem",...e){console.warn(`${Du}: ${t}`,...e)}const Hu={selectors:[et.id,et.class,et.tag,et.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY,useScope:!1,ignoreGeneratedClassNames:!1};function ar(t){return!!t}function ju(t){return Array.isArray(t)?t.filter(e=>Bu(et,e)):[]}function zs(t){return t instanceof RegExp}function Uu(t){return["string","function"].includes(typeof t)||zs(t)}function qs(t){return Array.isArray(t)?t.filter(Uu):[]}function Fu(t){return t!=null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function Ws(t){const e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return Fu(t)&&e.includes(t.nodeType)}function Vs(t,e){if(Ws(t))return t.contains(e)||Wr("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will not work as intended."),t;const r=e.getRootNode({composed:!1});return Ws(r)?(r.nodeType!==Node.DOCUMENT_NODE&&Wr("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),r):ei(e)}function Zn(t){return typeof t=="number"?t:Number.POSITIVE_INFINITY}function zu(t,e={}){const r=Object.assign(Object.assign({},Hu),e);return{selectors:ju(r.selectors),whitelist:qs(r.whitelist),blacklist:qs(r.blacklist),root:Vs(r.root,t),combineWithinSelector:ar(r.combineWithinSelector),combineBetweenSelectors:ar(r.combineBetweenSelectors),includeTag:ar(r.includeTag),maxCombinations:Zn(r.maxCombinations),maxCandidates:Zn(r.maxCandidates),useScope:ar(r.useScope),maxResults:Zn(r.maxResults),ignoreGeneratedClassNames:ar(r.ignoreGeneratedClassNames)}}function cr(t=[]){const[e=[],...r]=t;return r.length===0?e:r.reduce((n,i)=>{const s=new Set(i);return n.filter(o=>s.has(o))},e)}function qu(t){return[].concat(...t)}function Wu(t){return t.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")}function Vr(t){const e=t.map(r=>{if(zs(r))return n=>r.test(n);if(typeof r=="function")return n=>{const i=r(n);return typeof i!="boolean"?(Wr("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",r),!1):i};if(typeof r=="string"){const n=new RegExp("^"+Wu(r)+"$");return i=>n.test(i)}return Wr("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",r),()=>!1});return r=>e.some(n=>n(r))}function ti(t,e,r){const n=Vs(r,t[0]).querySelectorAll(e);if(n.length!==t.length)return!1;const i=new Set(n);return t.every(s=>i.has(s))}function Ks(t,e){e=e!=null?e:ei(t);const r=[];let n=t;for(;n&&n!==e;)Fs(n)&&r.push(n),n=n.parentNode;return r}function Vu(t,e){return cr(t.map(r=>Ks(r,e)))}function Ku(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}function ei(t){return t.ownerDocument.querySelector(":root")}const Xs=", ",Xu=new RegExp(["^$","\\s"].join("|")),Yu=new RegExp(["^$"].join("|")),Ys=[et.nthoftype,et.tag,et.id,et.class,et.attribute,et.nthchild],Gu=Vr(["class","id","ng-*"]);function Ju({name:t}){return`[${t}]`}function Qu({name:t,value:e}){return`[${t}='${e}']`}function Zu({nodeName:t,nodeValue:e},r){const n=r.tagName.toLowerCase();return["input","option"].includes(n)&&t==="value"||t==="src"&&(e!=null&&e.startsWith("data:"))?!1:!Gu(t)}function tf({nodeName:t,nodeValue:e}){return{name:Ve(t),value:Ve(e!=null?e:void 0)}}function Gs(t,e){const r=Array.from(t.attributes).filter(n=>Zu(n,t)).map(tf);return[...r.map(Ju),...r.map(Qu)]}function ef(t,e){const r=t.map(n=>Gs(n));return cr(r)}const rf=/^[a-z_-]{3,}$/i,nf=/[bcdfghjklmnpqrstvwxyz]{4,}/i;function sf(t){if(!rf.test(t)||t.includes("_")&&!t.includes("__")||/^(css|sc|jsx|emotion|makeStyles|MuiButton|MuiBox)-/i.test(t))return!1;const e=t.split(/--|__|[-]|(?<=[a-z])(?=[A-Z])/).filter(r=>r.length>0);if(e.length===0||e.length===1&&e[0].length<4)return!1;for(const r of e)if(r.length<=2||nf.test(r))return!1;return!0}function Js(t,e){var r;const n=((r=t.getAttribute("class"))!==null&&r!==void 0?r:"").trim().split(/\s+/).filter(s=>!Yu.test(s));let i=n;if(e!=null&&e.ignoreGeneratedClassNames){const s=Vr(e.whitelist);i=n.filter(o=>{const l=`.${Ve(o)}`;return s(l)?!0:sf(o)})}return i.map(s=>`.${Ve(s)}`)}function of(t,e){const r=t.map(n=>Js(n,e));return cr(r)}function Qs(t,e){var r;const n=(r=t.getAttribute("id"))!==null&&r!==void 0?r:"",i=`#${Ve(n)}`,s=t.getRootNode({composed:!1});return!Xu.test(n)&&ti([t],i,s)?[i]:[]}function lf(t,e){return t.length===0||t.length>1?[]:Qs(t[0])}function Zs(t,e){const r=t.parentNode,n=r&&"children"in r?r.children:null;if(n){for(let i=0;i<n.length;i++)if(n[i]===t)return[`:nth-child(${String(i+1)})`]}return[]}function af(t,e){return cr(t.map(r=>Zs(r)))}function to(t,e){return[Ve(t.tagName.toLowerCase())]}function eo(t,e){const r=[...new Set(qu(t.map(n=>to(n))))];return r.length===0||r.length>1?[]:[r[0]]}function ro(t,e){const r=eo([t])[0],n=t.parentNode,i=n&&"children"in n?n:null;if(i){const o=Array.from(i.children).filter(l=>l.tagName.toLowerCase()===r).indexOf(t);if(o>-1)return[`${r}:nth-of-type(${String(o+1)})`]}return[]}function cf(t,e){return cr(t.map(r=>ro(r)))}function*no(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){let r=0,n=io(1);for(;n.length<=t.length&&r<e;){r+=1;const i=new Array(n.length);for(let s=0;s<n.length;s++)i[s]=t[n[s]];yield i,n=ff(n,t.length-1)}}function uf(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){return Array.from(no(t,{maxResults:e}))}function ff(t=[],e=0){const r=t.length;if(r===0)return t;let n=r-1;for(;n>=0&&t[n]===e-(r-1-n);)n-=1;if(n<0)return io(r+1);t[n]+=1;for(let i=n+1;i<r;i++)t[i]=t[i-1]+1;return t}function io(t=1){const e=new Array(t);for(let r=0;r<t;r++)e[r]=r;return e}function*df(t={}){const e=Object.entries(t);if(e.length===0)return;const r=[{index:e.length-1,partial:{}}];for(;r.length>0;){const n=r.pop();if(!n)break;const{index:i,partial:s}=n;if(i<0){yield s;continue}const[o,l]=e[i];for(let a=l.length-1;a>=0;a--)r.push({index:i-1,partial:Object.assign(Object.assign({},s),{[o]:l[a]})})}}const hf="3a".toUpperCase(),pf=/[ !"#$%&'()[\]{|}<>*+,./;=?@^`~\\]/;function Ve(t=""){return CSS?CSS.escape(t):gf(t)}function gf(t=""){return t.split("").map(e=>e===":"?`\\${hf} `:pf.test(e)?`\\${e}`:escape(e).replace(/%/g,"\\")).join("")}const mf={tag:eo,id:lf,class:of,attribute:ef,nthchild:af,nthoftype:cf},bf={tag:to,id:Qs,class:Js,attribute:Gs,nthchild:Zs,nthoftype:ro};function yf(t,e,r){return bf[e](t,r)}function wf(t,e,r){const n=mf[e];return n(t,r)}function vf(t=[],e,r){return t.filter(n=>r(n)||!e(n))}function xf(t=[],e){return t.sort((r,n)=>{const i=e(r),s=e(n);return i&&!s?-1:!i&&s?1:0})}function Kr(){const t=new Map;let e;return(r,n)=>{if(r.length!==1)return e!=null?e:e=so(r,n);const[i]=r;let s=t.get(i);return s||(s=so(r,n),t.set(i,s)),s}}function*Sf(t,e,r=Kr()){const n=new Set,i=r(t,e);for(const s of Tf(i,e))n.has(s)||(n.add(s),yield s)}function so(t,e){const{blacklist:r,whitelist:n,combineWithinSelector:i,maxCombinations:s}=e,o=Vr(r),l=Vr(n),a=(u,c)=>{const d=wf(t,c,e),p=vf(d,o,l),x=xf(p,l);return u[c]=i?Array.from(no(x,{maxResults:s})):x.map(R=>[R]),u};return Ef(e).reduce(a,{})}function Ef(t){const{selectors:e,includeTag:r}=t,n=[...e];return r&&!n.includes("tag")&&n.push("tag"),n}function _f(t){return t.includes(et.tag)||t.includes(et.nthoftype)?[...t]:[...t,et.tag]}function Cf(t){const{selectors:e,combineBetweenSelectors:r,includeTag:n,maxCandidates:i}=t,s=r?uf(e,{maxResults:i}):e.map(o=>[o]);return n?s.map(_f):s}function*Tf(t,e){for(const r of Cf(e))yield*kf(r,t)}function*kf(t,e){const r={};for(const n of t){const i=e[n];i&&i.length>0&&(r[n]=i)}for(const n of df(r))yield Af(n)}function Rf(t,e){return e[t]?e[t].join(""):""}function Af(t={}){const e=[...Ys];return t[et.tag]&&t[et.nthoftype]&&e.splice(e.indexOf(et.tag),1),e.map(r=>Rf(r,t)).join("")}function Mf(t,e){return[...t.map(r=>e+lr.DESCENDANT+r),...t.map(r=>e+lr.CHILD+r)]}function*Of(t,e){if(e==="")yield*t;else for(const r of t)yield*Mf([r],e)}function*Pf(t,e,r="",n,i=Kr()){const s=Sf(t,n,i);for(const o of Of(s,r))ti(t,o,e)&&(yield o)}function*If(t,e,r="",n,i=Kr()){if(t.length===0)return null;const s=[t.length>1?t:[],...Vu(t,e).map(o=>[o])];for(const o of s)for(const l of Pf(o,e,r,n,i))yield{foundElements:o,selector:l}}function*Lf({elements:t,root:e,rootSelector:r="",options:n}){let i=e,s=r,o=!0;const l=Kr();for(;o;){let a=!1;for(const u of If(t,i,s,n,l)){const{foundElements:c,selector:d}=u;if(a=!0,ti(t,d,e))yield d;else{i=c[0],s=d;break}}a||(o=!1)}}function Nf(t){(t instanceof NodeList||t instanceof HTMLCollection)&&(t=Array.from(t));const e=(Array.isArray(t)?t:[t]).filter(Fs);return[...new Set(e)]}function $f(t){return{value:t,include:!1}}function Bf(t,e,r=lr.NONE){const n={};return e.forEach(i=>{Reflect.set(n,i,yf(t,i).map($f))}),{element:t,operator:r,selectors:n}}function Df({selectors:t,operator:e}){let r=[...Ys];t[et.tag]&&t[et.nthoftype]&&(r=r.filter(i=>i!==et.tag));let n="";return r.forEach(i=>{var s;((s=t[i])!==null&&s!==void 0?s:[]).forEach(({value:l,include:a})=>{a&&(n+=l)})}),e+n}function Hf(t,e){const r=Ks(t,e).reverse(),n=Ku(e),i=r.map((o,l)=>{var a;const u=Bf(o,[et.nthchild],n&&l===0?lr.NONE:lr.CHILD);return((a=u.selectors.nthchild)!==null&&a!==void 0?a:[]).forEach(c=>{c.include=!0}),u});return[n?"":e?":scope":":root",...i.map(Df)].join("")}function jf(t,e){return t.map(r=>Hf(r,e)).join(Xs)}var Uf=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function oo(t,e={}){const r=Object.assign(Object.assign({},e),{maxResults:1});return Ff(t,r).next().value}function*Ff(t,e={}){var r;const n=Nf(t),i=zu(n[0],e),s=(r=i.root)!==null&&r!==void 0?r:ei(n[0]);let o=0;for(const a of Lf({elements:n,options:i,root:s,rootSelector:""}))if(yield a,o++,o>=i.maxResults)return;if(n.length>1){const{maxResults:a}=e,u=Uf(e,["maxResults"]);if(yield n.map(c=>oo(c,u)).join(Xs),o++,o>=i.maxResults)return}const l=e.root!==void 0;yield jf(n,i.useScope||l?s:void 0)}const zf=200,lo=8,qf=["id","name","role","type","aria-label","aria-labelledby","data-testid","data-test","data-qa","placeholder","title","href"],Wf=[/^css-/,/^sc-/,/^emotion-/,/^makeStyles-/,/^jsx-/,/^el-/,/^van-/,/^ant-/,/^svelte-/,/\d{4,}/];function Vf(t){try{return oo(t,{selectors:["id","class","attribute","tag","nthchild"],ignoreGeneratedClassNames:!0,blacklist:Wf,maxCandidates:50,maxCombinations:100})}catch(e){return Kf(t)}}function Kf(t){const e=[];let r=t,n=0;for(;r&&r!==document.documentElement&&n<lo;){let i=r.tagName.toLowerCase();const s=r.parentElement;if(s){const o=Array.prototype.filter.call(s.children,l=>l.tagName===r.tagName);o.length>1&&(i+=`:nth-of-type(${o.indexOf(r)+1})`)}e.unshift(i),r=s,n+=1}return e.join(" > ")||"body"}function Xf(t){const e={};for(const r of qf){const n=t.getAttribute(r);n&&(e[r]=n.slice(0,200))}return e}function Yf(t){const e=[];let r=t,n=0;for(;r&&r!==document.documentElement&&n<lo;)e.unshift(r.tagName.toLowerCase()),r=r.parentElement,n+=1;return e.join(" > ")}function ri(t){const e=t.getBoundingClientRect(),r=(t.textContent||"").replace(/\s+/g," ").trim();return{selector:Vf(t),tag:t.tagName.toLowerCase(),text:r?r.slice(0,zf):void 0,attributes:Xf(t),rect:{x:Math.round(e.left),y:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)},path:Yf(t)}}const Xr=10,ni=`:host { all: initial; position: fixed; inset: 0; z-index: 2147483600; pointer-events: none; }
|
|
399
|
+
.box {
|
|
400
|
+
position: fixed;
|
|
401
|
+
border: 2px solid #1d64e0;
|
|
402
|
+
background: rgba(29, 100, 224, .12);
|
|
403
|
+
border-radius: 3px;
|
|
404
|
+
pointer-events: none;
|
|
405
|
+
}
|
|
406
|
+
.badge {
|
|
407
|
+
position: fixed;
|
|
408
|
+
max-width: 60vw;
|
|
409
|
+
padding: 3px 8px;
|
|
410
|
+
border-radius: 4px;
|
|
411
|
+
background: #1d64e0;
|
|
412
|
+
color: #fff;
|
|
413
|
+
font: 12px/1.4 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
|
|
414
|
+
white-space: nowrap;
|
|
415
|
+
overflow: hidden;
|
|
416
|
+
text-overflow: ellipsis;
|
|
417
|
+
pointer-events: none;
|
|
418
|
+
}
|
|
419
|
+
.bar {
|
|
420
|
+
position: fixed;
|
|
421
|
+
top: 0; left: 0; right: 0;
|
|
422
|
+
display: flex;
|
|
423
|
+
align-items: center;
|
|
424
|
+
gap: 12px;
|
|
425
|
+
padding: 10px 16px;
|
|
426
|
+
background: rgba(29, 100, 224, .96);
|
|
427
|
+
color: #fff;
|
|
428
|
+
font: 13px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
|
|
429
|
+
pointer-events: auto;
|
|
430
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
|
|
431
|
+
}
|
|
432
|
+
.bar span { flex: 1; }
|
|
433
|
+
.bar kbd {
|
|
434
|
+
padding: 1px 6px;
|
|
435
|
+
border-radius: 4px;
|
|
436
|
+
background: rgba(255, 255, 255, .2);
|
|
437
|
+
font: inherit;
|
|
438
|
+
font-size: 12px;
|
|
439
|
+
}
|
|
440
|
+
.bar button {
|
|
441
|
+
padding: 5px 12px;
|
|
442
|
+
border: 1px solid rgba(255, 255, 255, .5);
|
|
443
|
+
border-radius: 6px;
|
|
444
|
+
background: transparent;
|
|
445
|
+
color: #fff;
|
|
446
|
+
font: inherit;
|
|
447
|
+
cursor: pointer;
|
|
448
|
+
}
|
|
449
|
+
.bar button:hover { background: rgba(255, 255, 255, .15); }
|
|
450
|
+
|
|
451
|
+
.confirm {
|
|
452
|
+
position: fixed;
|
|
453
|
+
left: 12px;
|
|
454
|
+
right: 12px;
|
|
455
|
+
bottom: calc(12px + env(safe-area-inset-bottom, 0px));
|
|
456
|
+
display: none;
|
|
457
|
+
align-items: center;
|
|
458
|
+
gap: 10px;
|
|
459
|
+
padding: 10px 12px;
|
|
460
|
+
border-radius: 12px;
|
|
461
|
+
background: #1d64e0;
|
|
462
|
+
color: #fff;
|
|
463
|
+
font: 13px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
|
|
464
|
+
box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
|
|
465
|
+
pointer-events: auto;
|
|
466
|
+
}
|
|
467
|
+
.confirm--show { display: flex; }
|
|
468
|
+
.confirm-text {
|
|
469
|
+
flex: 1;
|
|
470
|
+
min-width: 0;
|
|
471
|
+
overflow: hidden;
|
|
472
|
+
text-overflow: ellipsis;
|
|
473
|
+
white-space: nowrap;
|
|
474
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
475
|
+
font-size: 12px;
|
|
476
|
+
}
|
|
477
|
+
.confirm button {
|
|
478
|
+
flex: none;
|
|
479
|
+
padding: 8px 14px;
|
|
480
|
+
border: 0;
|
|
481
|
+
border-radius: 8px;
|
|
482
|
+
font: inherit;
|
|
483
|
+
cursor: pointer;
|
|
484
|
+
}
|
|
485
|
+
.confirm .ok { background: #fff; color: #1d64e0; font-weight: 600; }
|
|
486
|
+
.confirm .no { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
|
|
487
|
+
`;class Gf{constructor(){this.host=null,this.root=null,this.box=null,this.badge=null,this.confirmBar=null,this.confirmText=null,this.hovered=null,this.pending=null,this.raf=0,this.active=!1,this.lastX=0,this.lastY=0,this.pointerKnown=!1,this.resolve=null,this.previousCursor="",this.altPressed=!1,this.coarsePointer=!1,this.touchStartX=0,this.touchStartY=0,this.touchMoved=!1,this.ignoreElements=[],this.onMouseMove=e=>{this.active&&(this.lastX=e.clientX,this.lastY=e.clientY,this.pointerKnown=!0,!(this.coarsePointer||this.pending)&&this.scheduleUpdate())},this.onScroll=()=>{if(!this.active)return;const e=this.pending||this.hovered;if(e){if(!e.isConnected){this.pending?this.clearPending():this.updateHighlight(null);return}this.scheduleUpdate(e);return}this.pointerKnown&&!this.coarsePointer&&this.scheduleUpdate()},this.onClick=e=>{if(!this.active)return;const r=this.hitTest(e.clientX,e.clientY);if(r){if(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.coarsePointer){this.setPending(r);return}this.finish(ri(r))}},this.onMousePress=e=>{this.active&&(this.isOwnUi(e.target)||(e.preventDefault(),e.stopPropagation()))},this.onPointerPress=e=>{this.active&&e.pointerType!=="touch"&&(this.isOwnUi(e.target)||(e.preventDefault(),e.stopPropagation()))},this.onSuppress=e=>{this.active&&(this.isOwnUi(e.target)||(e.preventDefault(),e.stopPropagation()))},this.onTouchStart=e=>{if(!this.active||this.isOwnUi(e.target))return;e.stopPropagation();const r=e.touches&&e.touches[0];r&&(this.touchStartX=r.clientX,this.touchStartY=r.clientY,this.touchMoved=!1)},this.onTouchEnd=e=>{if(!this.active||this.isOwnUi(e.target))return;const r=e.changedTouches&&e.changedTouches[0];if(!r||this.touchMoved||Math.abs(r.clientX-this.touchStartX)>Xr||Math.abs(r.clientY-this.touchStartY)>Xr)return;e.preventDefault(),e.stopPropagation();const i=this.hitTest(r.clientX,r.clientY);i&&this.setPending(i)},this.onTouchMove=e=>{if(!this.active)return;const r=e.touches&&e.touches[0];r&&(Math.abs(r.clientX-this.touchStartX)>Xr||Math.abs(r.clientY-this.touchStartY)>Xr)&&(this.touchMoved=!0)},this.onKeyDown=e=>{if(this.active){if(e.key==="Escape"){if(e.preventDefault(),e.stopPropagation(),this.pending){this.clearPending();return}this.finish(null);return}e.key==="Alt"&&(this.altPressed=!0)}},this.onKeyUp=e=>{e.key==="Alt"&&(this.altPressed=!1)}}start(e={}){return this.active?Promise.resolve(null):(this.active=!0,this.coarsePointer=this.detectCoarsePointer(),this.mount(e),new Promise(r=>{this.resolve=r,window.addEventListener("mousemove",this.onMouseMove,!0),window.addEventListener("click",this.onClick,!0),window.addEventListener("dblclick",this.onSuppress,!0),window.addEventListener("contextmenu",this.onSuppress,!0),window.addEventListener("mousedown",this.onMousePress,!0),window.addEventListener("pointerdown",this.onPointerPress,!0),window.addEventListener("touchstart",this.onTouchStart,{capture:!0,passive:!0}),window.addEventListener("touchmove",this.onTouchMove,{capture:!0,passive:!0}),window.addEventListener("touchend",this.onTouchEnd,{capture:!0,passive:!1}),window.addEventListener("keydown",this.onKeyDown,!0),window.addEventListener("keyup",this.onKeyUp,!0),window.addEventListener("scroll",this.onScroll,{capture:!0,passive:!0}),window.addEventListener("resize",this.onScroll,{passive:!0})}))}detectCoarsePointer(){try{return typeof window.matchMedia=="function"&&window.matchMedia("(pointer: coarse)").matches?!0:window.innerWidth<=560}catch(e){return!1}}stop(){this.finish(null)}mount(e){const r=document.createElement("div");r.setAttribute("data-bug-tap-picker",""),this.host=r;const n=r.attachShadow({mode:"open"});this.root=n;let i=null;try{if(typeof CSSStyleSheet!="undefined"&&"adoptedStyleSheets"in n){const R=new CSSStyleSheet;R.replaceSync(ni),n.adoptedStyleSheets=[...n.adoptedStyleSheets,R]}else i=document.createElement("style"),i.textContent=ni}catch(R){i=document.createElement("style"),i.textContent=ni}const s=document.createElement("div");s.className="box",s.style.display="none",this.box=s;const o=document.createElement("div");o.className="badge",o.style.display="none",this.badge=o;const l=document.createElement("div");l.className="bar";const a=document.createElement("span");a.innerHTML=this.coarsePointer?"轻点要反馈的页面元素":`${e.hint||"点击要反馈的页面元素"} <kbd>Alt</kbd> 选中父级 <kbd>Esc</kbd> 取消`;const u=document.createElement("button");u.type="button",u.textContent="取消",u.addEventListener("click",()=>this.finish(null)),l.append(a,u);const c=document.createElement("div");c.className="confirm";const d=document.createElement("div");d.className="confirm-text";const p=document.createElement("button");p.type="button",p.className="no",p.textContent="重选",p.addEventListener("click",()=>this.clearPending());const x=document.createElement("button");x.type="button",x.className="ok",x.textContent="确认",x.addEventListener("click",()=>{this.pending&&this.finish(ri(this.pending))}),c.append(d,p,x),this.confirmBar=c,this.confirmText=d,n.append(l,s,o,c),i&&n.append(i),document.documentElement.appendChild(r),this.previousCursor=document.documentElement.style.cursor,document.documentElement.style.cursor=this.coarsePointer?"default":"crosshair";try{document.documentElement.setAttribute("data-bug-tap-picking","")}catch(R){}this.ignoreElements=e.ignoreElements||[]}isIgnored(e){if(!e)return!0;let r=e;for(;r;){if(this.ignoreElements.indexOf(r)>=0||r.hasAttribute&&r.hasAttribute("data-bug-tap-picker"))return!0;const n=r.getRootNode?r.getRootNode():null;if(n&&n.host){r=n.host;continue}r=r.parentElement}return!1}hitTest(e,r){const n=document.elementFromPoint(e,r);if(!n||this.isIgnored(n))return null;if(this.altPressed&&n.parentElement){const i=n.parentElement;if(!this.isIgnored(i))return i}return n}scheduleUpdate(e){this.raf||(this.raf=requestAnimationFrame(()=>{if(this.raf=0,e){this.updateHighlight(e);return}this.updateHighlight(this.hitTest(this.lastX,this.lastY))}))}updateHighlight(e){if(!this.box||!this.badge)return;if(!e){this.box.style.display="none",this.badge.style.display="none",this.hovered=null;return}this.hovered=e;const r=e.getBoundingClientRect();this.box.style.display="block",this.box.style.top=`${r.top}px`,this.box.style.left=`${r.left}px`,this.box.style.width=`${r.width}px`,this.box.style.height=`${r.height}px`;const n=`${e.tagName.toLowerCase()}${e.id?`#${e.id}`:""}`;this.badge.style.display="block",this.badge.textContent=n,this.badge.style.left=`${Math.max(4,r.left)}px`,this.badge.style.top=`${r.top>26?r.top-24:r.bottom+4}px`}isOwnUi(e){if(!e)return!0;let r=e;for(;r;){if(r.hasAttribute&&r.hasAttribute("data-bug-tap-picker"))return!0;const n=r.getRootNode?r.getRootNode():null;if(n&&n.host){r=n.host;continue}r=r.parentElement}return!1}setPending(e){this.pending=e,this.updateHighlight(e),this.confirmBar&&this.confirmText&&(this.confirmText.textContent=ri(e).selector,this.confirmBar.classList.add("confirm--show"))}clearPending(){var e;this.pending=null,(e=this.confirmBar)==null||e.classList.remove("confirm--show"),this.updateHighlight(null)}finish(e){var n;if(!this.active)return;this.active=!1,window.removeEventListener("mousemove",this.onMouseMove,!0),window.removeEventListener("click",this.onClick,!0),window.removeEventListener("dblclick",this.onSuppress,!0),window.removeEventListener("contextmenu",this.onSuppress,!0),window.removeEventListener("mousedown",this.onMousePress,!0),window.removeEventListener("pointerdown",this.onPointerPress,!0),window.removeEventListener("touchstart",this.onTouchStart,{capture:!0}),window.removeEventListener("touchmove",this.onTouchMove,{capture:!0}),window.removeEventListener("touchend",this.onTouchEnd,{capture:!0}),window.removeEventListener("keydown",this.onKeyDown,!0),window.removeEventListener("keyup",this.onKeyUp,!0),window.removeEventListener("scroll",this.onScroll,{capture:!0}),window.removeEventListener("resize",this.onScroll),this.raf&&(cancelAnimationFrame(this.raf),this.raf=0),document.documentElement.style.cursor=this.previousCursor;try{document.documentElement.removeAttribute("data-bug-tap-picking")}catch(i){}(n=this.host)==null||n.remove(),this.host=null,this.root=null,this.box=null,this.badge=null,this.confirmBar=null,this.confirmText=null,this.hovered=null,this.pending=null,this.altPressed=!1,this.ignoreElements=[],this.pointerKnown=!1;const r=this.resolve;this.resolve=null,r&&r(e)}}const ao="bug-tap-enabled";function Jf(){try{const t=localStorage.getItem(ao);return t==="1"||t==="0"?t:null}catch(t){return null}}function co(t){try{localStorage.setItem(ao,t?"1":"0")}catch(e){}}function Qf(t){if(typeof location=="undefined")return null;try{const e=new URLSearchParams(location.search);if(!e.has(t.queryParam)){const r=location.hash.includes("?")?location.hash.slice(location.hash.indexOf("?")+1):"";if(!r)return null;const n=new URLSearchParams(r);return n.has(t.queryParam)?uo(n.get(t.queryParam),t.queryValue):null}return uo(e.get(t.queryParam),t.queryValue)}catch(e){return null}}function uo(t,e){return e?t===e||t==="1"||t==="true":!0}function Zf(t){const e=Qf(t);if(e===!0)return co(!0),!0;if(e===!1)return!1;const r=Jf();return r==="0"?!1:t.mode==="triggered"?r==="1":!0}function td(){if(typeof window=="undefined")return null;const t=window.BugTap;return t&&typeof t.captureException=="function"?t:null}function ur(t){if(!t||typeof t!="object")return;const e=t,r=typeof e.fullPath=="string"?e.fullPath:e.path;return typeof r=="string"?r.slice(0,500):void 0}function ed(t){if(!t||typeof t!="object")return;const e=t.name;return typeof e=="string"?e.slice(0,100):void 0}function rd(){try{return`${location.pathname}${location.search}${location.hash}`.slice(0,500)}catch(t){return}}function nd(t){var s,o,l,a,u,c,d,p,x,R;if(!t||typeof t!="object")return;const e=t,r=(o=(s=e.$)==null?void 0:s.type)!=null?o:e.type,n=e.$options,i=(R=(x=(d=(u=(a=(l=n==null?void 0:n.name)!=null?l:n==null?void 0:n.__name)!=null?a:r==null?void 0:r.name)!=null?u:r==null?void 0:r.__name)!=null?d:(c=e.type)==null?void 0:c.name)!=null?x:(p=e.type)==null?void 0:p.__name)!=null?R:n==null?void 0:n._componentTag;return typeof i=="string"&&i?i:void 0}function id(t){if(!(!t||typeof t!="object"))return ur(t.$route)}function sd(t){var e;return(e=id(t))!=null?e:rd()}function ii(t){return{install(e,r={}){const n=r.client||t||td();if(!n)return()=>{};const i=e.config,s=[];if(r.captureErrors!==!1&&i){const o=i.errorHandler,l=(a,u,c)=>{try{n.captureException(a,{source:"vue",info:c,component:nd(u),route:sd(u)})}catch(d){}typeof o=="function"&&o(a,u,c)};i.errorHandler=l,s.push(()=>{i.errorHandler===l&&(i.errorHandler=o||null)})}if(r.router&&typeof r.router.afterEach=="function"){try{n.disableRouteCapture()}catch(l){}const o=r.router.afterEach((l,a,u)=>{try{if(u){n.captureException(u instanceof Error?u:new Error(String(u)),{source:"vue-router",from:ur(a),to:ur(l)});return}n.addBreadcrumb({type:"route",from:ur(a),to:ur(l),data:{name:ed(l),source:"vue-router"}})}catch(c){}});s.push(()=>{typeof o=="function"&&o()})}return()=>{s.forEach(o=>{try{o()}catch(l){}})}}}}const od=ii();function fo(t,e){return!t||!t.config?()=>{}:ii(e).install(t,{client:e,captureErrors:!0})}function ho(t){const e=(r,n)=>{try{t.captureException(r,{source:"react",componentStack:n&&n.componentStack?n.componentStack.slice(0,4e3):void 0})}catch(i){}};return{onUncaughtError:e,onCaughtError:e,onRecoverableError:e}}const ld=typeof window!="undefined"&&window.console&&typeof window.console.debug=="function"?window.console.debug.bind(window.console):()=>{};class si{constructor(e){this.host=null,this.fab=null,this.panel=null,this.panelLoading=null,this.openCancelled=!1,this.picker=null,this.lastClientReportId=null,this.pendingMount=0,this.configErrors=[],this.tags=new Map,this.extras=new Map,this.contexts=new Map,this.initialized=!1,this.routeCaptureOwned=!1,this.rawConfig=e,this.config=Ln(e),this.collector=new bs(this.config),this.transport=new Is(this.config),Ds(this.config.screenshot.scriptUrl),this.configErrors=Nn(e),this.configErrors.length>0&&this.warn(`配置不完整:${this.configErrors.join(";")}。上报按钮不会显示。`)}init(){this.initialized||(this.initialized=!0,this.collector.start(),this.transport.start(),this.config.reporter.enabled&&this.isConfigured()&&(this.mountFab(),this.applyFabVisibility()))}open(){this.openReporter()}close(){this.closeReporter()}openReporter(){var e,r;if(!this.config.reporter.enabled){this.warn("上报入口已被 reporter.enabled=false 关闭");return}if(!this.isConfigured()){this.warn("缺少 project,无法打开上报面板");return}if(this.panel!==null){this.panel.open(this.config.screenshot.enabled&&this.config.screenshot.auto);return}if(this.panelLoading){this.openCancelled=!1;const n=this.panelLoading;(e=this.fab)==null||e.setLoading(!0),n.then(i=>{var s,o;!i||this.openCancelled||((s=this.panel)==null||s.open(this.config.screenshot.enabled&&this.config.screenshot.auto),(o=this.fab)==null||o.setLoading(!1))});return}this.openCancelled=!1,(r=this.fab)==null||r.setLoading(!0),this.cancelPendingMount(),this.pendingMount=requestAnimationFrame(()=>{this.pendingMount=0;const n=this.mountPanel();this.panelLoading=n,n.then(i=>{var s;!i||this.openCancelled||(s=this.panel)==null||s.open(this.config.screenshot.enabled&&this.config.screenshot.auto)}).catch(i=>{this.warn(`面板挂载失败:${oe(i)}`)}).finally(()=>{var i;this.panelLoading===n&&(this.panelLoading=null),(i=this.fab)==null||i.setLoading(!1)})})}cancelPendingMount(){this.pendingMount&&(cancelAnimationFrame(this.pendingMount),this.pendingMount=0)}closeReporter(){var e,r;this.cancelPendingMount(),this.openCancelled=!0,(e=this.fab)==null||e.setLoading(!1),(r=this.panel)==null||r.close()}setConfig(e){const r=ka(this.rawConfig,e),n=this.config;this.rawConfig=r,this.config=Ln(r),Ds(this.config.screenshot.scriptUrl),this.initialized&&this.transport.stop(),this.transport=new Is(this.config),this.initialized&&this.transport.start(),this.configErrors=Nn(r),this.configErrors.length>0&&this.warn(`配置不完整:${this.configErrors.join(";")}。上报按钮不会显示。`),(JSON.stringify(n.collect)!==JSON.stringify(this.config.collect)||!Ke(n.privacy.excludeUrls,this.config.privacy.excludeUrls)||!Ke(n.privacy.excludeConsolePatterns,this.config.privacy.excludeConsolePatterns)||!Ke(n.privacy.excludeBreadcrumbUrls,this.config.privacy.excludeBreadcrumbUrls)||!Ke(n.filtering.ignoreErrors,this.config.filtering.ignoreErrors)||!Ke(n.filtering.denyUrls,this.config.filtering.denyUrls)||!Ke(n.filtering.allowUrls,this.config.filtering.allowUrls)||n.hooks.beforeBreadcrumb!==this.config.hooks.beforeBreadcrumb||n.endpoint!==this.config.endpoint||n.upload.url!==this.config.upload.url||n.transport.maxItemBytes!==this.config.transport.maxItemBytes)&&(this.collector.stop(),this.collector=new bs(this.config),this.routeCaptureOwned&&this.collector.disableRouteCapture(),this.initialized&&this.collector.start()),this.cancelPendingMount(),this.panelLoading=null;const s=this.panel!==null;this.unmountUi(),this.initialized&&this.config.reporter.enabled&&this.isConfigured()&&(this.mountFab(),s&&this.mountPanel(),this.applyFabVisibility())}setUser(e){this.rawConfig={...this.rawConfig,user:e||void 0},this.config=Ln(this.rawConfig),Cc()}setTag(e,r){oi(this.tags,e,typeof r=="string"?r.slice(0,64):r)}setExtra(e,r){oi(this.extras,e,Gr(r))}setContext(e,r){oi(this.contexts,e,Gr(r))}addBreadcrumb(e){const r={...e,t:Date.now(),type:e.type||"manual"};this.collector.addBreadcrumb(r)}captureException(e,r){this.collector.captureException(e,r)}captureMessage(e,r){this.collector.captureMessage(e,r)}disableRouteCapture(){this.routeCaptureOwned=!0,this.collector.disableRouteCapture()}installVueErrorHandler(e){return fo(e,this)}reactErrorHandlers(){return ho(this)}flush(){return this.transport.flush()}destroy(){var e,r;this.cancelPendingMount(),(e=this.panel)==null||e.close(),(r=this.picker)==null||r.stop(),this.picker=null,this.unmountUi(),this.collector.stop(),this.transport.stop(),this.initialized=!1,this.tags.clear(),this.extras.clear(),this.contexts.clear(),this.lastClientReportId=null}getReport(){const e=this.buildWithHooks({values:{title:"",description:""},data:this.collector.getData(),config:this.config,clientReportId:this.lastClientReportId||void 0,...this.runtimeContext()});if(po(e))throw new Error("hooks.beforeSend 返回了 Promise,getReport 只支持同步钩子");if(!e)throw new Error("报告已被 hooks.beforeSend 丢弃");return e}buildWithHooks(e){const r=$c(e),n=this.config.hooks.beforeSend;if(!n)return r;const i=s=>s===null?null:s&&typeof s=="object"?s:r;try{const s=n(r);return po(s)?s.then(i,o=>(this.warn(`beforeSend 执行失败:${oe(o)}`),r)):i(s)}catch(s){return this.warn(`beforeSend 执行失败:${oe(s)}`),r}}runtimeContext(){const e=r=>r.size>0?Object.fromEntries(r):void 0;return{tags:e(this.tags),extra:e(this.extras),contexts:e(this.contexts)}}mountFab(){this.fab||(this.host=new xu(this.config.reporter.theme,this.config.reporter.zIndex),this.fab=new Tu({text:this.config.reporter.text,position:this.config.reporter.position,onClick:()=>this.openReporter()}),this.host.root.append(this.fab.element),this.host.mount(),this.fab.restorePosition())}mountPanel(){if(this.panel)return Promise.resolve(this.panel);this.host||this.mountFab();const e=this.host;return e?Promise.resolve().then(()=>Cg).then(r=>new r.ReporterPanel({onSubmit:(n,i,s)=>this.submit(n,i,s),onCapture:()=>this.capture(),onUpload:n=>this.upload(n),onPickElement:()=>this.pickElement(),canUploadScreenshot:this.config.screenshot.enabled,maxElements:this.config.collect.maxElements,onDisable:this.config.reporter.visibility.closable?()=>{var n;co(!1),(n=this.fab)==null||n.hide()}:void 0})).then(r=>this.host!==e?(r.unmount(),null):this.panel?(r.unmount(),this.panel):(this.panel=r,e.root.append(r.overlay),r)):Promise.resolve(null)}applyFabVisibility(){if(!this.fab)return;Zf(this.config.reporter.visibility)?this.fab.show():this.fab.hide()}unmountUi(){var e,r,n,i,s;(e=this.picker)==null||e.stop(),this.picker=null,(r=this.panel)==null||r.close(),(n=this.panel)==null||n.unmount(),(i=this.fab)==null||i.destroy(),(s=this.host)==null||s.unmount(),this.host=null,this.fab=null,this.panel=null}capture(){return this.config.screenshot.enabled?this.host?Nu({ignoreElement:this.host.host,quality:this.config.screenshot.quality,maxWidth:this.config.screenshot.maxWidth,maxSizeKB:this.config.screenshot.maxSizeKB,source:"auto"}):Promise.reject(new Error("上报面板未初始化")):Promise.reject(new Error("截图功能已关闭"))}upload(e){return this.config.screenshot.enabled?$u(e,{quality:this.config.screenshot.quality,maxWidth:this.config.screenshot.maxWidth,maxSizeKB:this.config.screenshot.maxSizeKB,source:"manual"}):Promise.reject(new Error("截图功能已关闭"))}submit(e,r,n){return this.isConfigured()?this.prepareScreenshots(r).then(i=>{const s=this.collector.getData(),o=this.buildWithHooks({values:e,data:s,config:this.config,clientReportId:this.lastClientReportId||void 0,screenshots:i.length>0?i:void 0,elements:n.length>0?n:void 0,...this.runtimeContext()});return Promise.resolve(o).then(l=>{if(!l)throw new Error("报告已被 hooks.beforeSend 丢弃");return this.lastClientReportId=l.clientReportId,this.transport.send(l).catch(a=>{if(a instanceof ct&&a.queued)return{success:!0,queued:!0,reportId:l.clientReportId,message:"网络异常,反馈已保存,恢复后会自动提交"};throw a}).finally(()=>{this.lastClientReportId=null})})}):Promise.reject(new Error("缺少 project,无法提交"))}pickElement(){return this.host?(this.picker||(this.picker=new Gf),this.picker.start({ignoreElements:[this.host.host]})):Promise.reject(new Error("上报面板未初始化"))}prepareScreenshots(e){return e.length===0?Promise.resolve([]):Promise.all(e.map(r=>this.prepareScreenshot(r)))}prepareScreenshot(e){return this.config.upload.enabled?vu(e,this.config.upload).then(r=>({...e,url:r,dataBase64:void 0})).catch(r=>(this.warn(`截图上传失败,改为内联提交:${oe(r)}`),e)):Promise.resolve(e)}isConfigured(){return this.configErrors.length===0}warn(e){this.config.debug&&ld(`[bug-tap] ${e}`)}}function po(t){return!!(t&&typeof t.then=="function")}const ad=6,Yr=50,cd=50;function oi(t,e,r){const n=String(e||"").slice(0,64);if(n){if(t.delete(n),t.size>=cd){const i=t.keys().next();i.done||t.delete(i.value)}t.set(n,r)}}function Gr(t,e=0,r){const n=typeof t;if(t===null||n==="string"||n==="number"||n==="boolean")return t;if(n==="undefined"||n==="function"||n==="symbol"||n==="bigint")return n==="bigint"?String(t):void 0;if(t instanceof Date)try{return t.toISOString()}catch(o){return}if(t instanceof Error)return`[Error] ${t.name}: ${t.message}`.slice(0,500);if(t instanceof RegExp)return String(t);if(e>=ad)return"[MaxDepth]";const i=r||new WeakSet,s=t;if(i.has(s))return"[Circular]";i.add(s);try{if(Array.isArray(t)){const a=t.slice(0,Yr).map(u=>{const c=Gr(u,e+1,i);return c===void 0?null:c});return t.length>Yr&&a.push(`…[${t.length-Yr} more]`),a}const o={},l=Object.keys(s).slice(0,Yr);for(const a of l){let u;try{u=s[a]}catch(d){continue}const c=Gr(u,e+1,i);c!==void 0&&(o[a]=c)}return o}catch(o){return"[Unserializable]"}finally{i.delete(s)}}function Ke(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r+=1){const n=t[r],i=e[r];if(n instanceof RegExp||i instanceof RegExp){if(!(n instanceof RegExp)||!(i instanceof RegExp)||n.source!==i.source||n.flags!==i.flags)return!1}else if(n!==i)return!1}return!0}const go="0.1.0";let P=null;function mo(t){if(typeof window=="undefined")return null;try{const e=new si(t);return e.init(),e}catch(e){return Jr(`初始化失败:${e instanceof Error?e.message:String(e)}`),null}}function li(t){if(typeof window=="undefined")return null;if(P)return P;const e=t||window.BugTapConfig||ai();if(!e)return Jr("缺少配置:请在引入脚本前设置 window.BugTapConfig,或调用 BugTap.init(config)"),null;const r=Nn(e);if(r.length>0)return Jr(`配置不完整:${r.join(";")}。未初始化。`),null;try{const n=new si(e);return P=n,n.init(),n}catch(n){try{P==null||P.destroy()}catch(i){}return Jr(`初始化失败:${n instanceof Error?n.message:String(n)}`),P=null,null}}function ai(){try{if(typeof document=="undefined")return null;const t=document.currentScript,e=t&&t.dataset&&t.dataset.project?t:document.querySelector("script[data-project]");if(!e||!e.dataset)return null;const r=e.dataset;return r.project?{project:r.project,endpoint:r.endpoint,environment:r.environment,appVersion:r.appVersion,buildId:r.buildId,release:r.release,debug:r.debug==="true"}:null}catch(t){return null}}const ud={version:go,init:li,createClient:mo,open(){P==null||P.open()},close(){P==null||P.close()},openReporter(){P==null||P.openReporter()},closeReporter(){P==null||P.closeReporter()},setConfig(t){P==null||P.setConfig(t)},setUser(t){P==null||P.setUser(t)},setTag(t,e){P==null||P.setTag(t,e)},setExtra(t,e){P==null||P.setExtra(t,e)},setContext(t,e){P==null||P.setContext(t,e)},addBreadcrumb(t){P==null||P.addBreadcrumb(t)},captureException(t,e){P==null||P.captureException(t,e)},captureMessage(t,e){P==null||P.captureMessage(t,e)},disableRouteCapture(){P==null||P.disableRouteCapture()},installVueErrorHandler(t){return P?P.installVueErrorHandler(t):()=>{}},reactErrorHandlers(){if(P)return P.reactErrorHandlers();const t=()=>{};return{onUncaughtError:t,onCaughtError:t,onRecoverableError:t}},flush(){return P?P.flush():Promise.resolve(0)},destroy(){P==null||P.destroy(),P=null},getReport(){if(!P)throw new Error("[bug-tap] 尚未初始化");return P.getReport()}};function Jr(t){try{window.console&&typeof window.console.warn=="function"&&window.console.warn(`[bug-tap] ${t}`)}catch(e){}}function bo(){if(window.__BUG_TAP__)return;const t=window.BugTapConfig||ai();t&&li(t)&&(window.__BUG_TAP__=!0)}typeof window!="undefined"&&(window.BugTap=ud,window.BugTapConfig||ai()?bo():document.readyState==="loading"&&document.addEventListener("DOMContentLoaded",bo,{once:!0}));/**
|
|
488
|
+
* @vue/shared v3.5.45
|
|
489
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
490
|
+
* @license MIT
|
|
491
|
+
**/function ci(t){const e=Object.create(null);for(const r of t.split(","))e[r]=1;return r=>r in e}const Y={},Oe=[],Yt=()=>{},yo=()=>!1,Qr=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Zr=t=>t.startsWith("onUpdate:"),st=Object.assign,ui=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},fd=Object.prototype.hasOwnProperty,W=(t,e)=>fd.call(t,e),$=Array.isArray,Se=t=>fr(t)==="[object Map]",Pe=t=>fr(t)==="[object Set]",wo=t=>fr(t)==="[object Date]",H=t=>typeof t=="function",Z=t=>typeof t=="string",Gt=t=>typeof t=="symbol",X=t=>t!==null&&typeof t=="object",vo=t=>(X(t)||H(t))&&H(t.then)&&H(t.catch),xo=Object.prototype.toString,fr=t=>xo.call(t),dd=t=>fr(t).slice(8,-1),So=t=>fr(t)==="[object Object]",fi=t=>Z(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,dr=ci(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),tn=t=>{const e=Object.create(null);return(r=>e[r]||(e[r]=t(r)))},hd=/-\w/g,Bt=tn(t=>t.replace(hd,e=>e.slice(1).toUpperCase())),pd=/\B([A-Z])/g,Ie=tn(t=>t.replace(pd,"-$1").toLowerCase()),Eo=tn(t=>t.charAt(0).toUpperCase()+t.slice(1)),di=tn(t=>t?`on${Eo(t)}`:""),Jt=(t,e)=>!Object.is(t,e),en=(t,...e)=>{for(let r=0;r<t.length;r++)t[r](...e)},_o=(t,e,r,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:r})},hr=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Co;const rn=()=>Co||(Co=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function hi(t){if($(t)){const e={};for(let r=0;r<t.length;r++){const n=t[r],i=Z(n)?yd(n):hi(n);if(i)for(const s in i)e[s]=i[s]}return e}else if(Z(t)||X(t))return t}const gd=/;(?![^(]*\))/g,md=/:([^]+)/,bd=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function yd(t){const e={};return t.replace(bd,r=>r.startsWith("/*")?"":r).split(gd).forEach(r=>{if(r){const n=r.split(md);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Xe(t){let e="";if(Z(t))e=t;else if($(t))for(let r=0;r<t.length;r++){const n=Xe(t[r]);n&&(e+=n+" ")}else if(X(t))for(const r in t)t[r]&&(e+=r+" ");return e.trim()}const wd=ci("itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly");function To(t){return!!t||t===""}function vd(t,e,r){if(t.length!==e.length)return!1;let n=!0;for(let i=0;n&&i<t.length;i++)n=Ee(t[i],e[i],r);return n}function ko(t,e,r){if(t.size!==e.size)return!1;const n=Array.from(e),i=new Uint8Array(n.length);for(const s of t){let o=-1;for(let l=0;l<n.length;l++)if(!i[l]&&Ee(s,n[l],r)){o=l;break}if(o<0)return!1;i[o]=1}return!0}function xd(t,e,r){let n=Se(t),i=Se(e);if(n||i||(n=Pe(t),i=Pe(e),n||i))return n&&i?ko(t,e,r):!1;const s=Object.keys(t).length,o=Object.keys(e).length;if(s!==o)return!1;for(const l in t){const a=t.hasOwnProperty(l),u=e.hasOwnProperty(l);if(a&&!u||!a&&u||!Ee(t[l],e[l],r))return!1}return String(t)===String(e)}function Ro(t,e,r,n){r||(r=[new Map,new Map]);const[i,s]=r;if(i.has(t)||s.has(e))return i.get(t)===e&&s.get(e)===t;i.set(t,e),s.set(e,t);const o=n(t,e,r);return i.delete(t),s.delete(e),o}function Ee(t,e,r){if(t===e)return!0;let n=wo(t),i=wo(e);return n||i?n&&i?t.getTime()===e.getTime():!1:(n=Gt(t),i=Gt(e),n||i?t===e:(n=$(t),i=$(e),n||i?n&&i?Ro(t,e,r,vd):!1:(n=X(t),i=X(e),n||i?!n||!i?!1:Ro(t,e,r,xd):String(t)===String(e))))}function Sd(t,e){return t.findIndex(r=>Ee(r,e))}const Ao=t=>!!(t&&t.__v_isRef===!0),Qt=t=>Z(t)?t:t==null?"":$(t)||X(t)&&(t.toString===xo||!H(t.toString))?Ao(t)?Qt(t.value):JSON.stringify(t,Mo,2):String(t),Mo=(t,e)=>Ao(e)?Mo(t,e.value):Se(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,i],s)=>(r[pi(n,s)+" =>"]=i,r),{})}:Pe(e)?{[`Set(${e.size})`]:[...e.values()].map(r=>pi(r))}:Gt(e)?pi(e):X(e)&&!$(e)&&!So(e)?String(e):e,pi=(t,e="")=>{var r;return Gt(t)?`Symbol(${(r=t.description)!=null?r:e})`:t};/**
|
|
492
|
+
* @vue/reactivity v3.5.45
|
|
493
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
494
|
+
* @license MIT
|
|
495
|
+
**/let ut;class Ed{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&ut&&(ut.active?(this.parent=ut,this.index=(ut.scopes||(ut.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,r;if(this.scopes){const n=this.scopes.slice();for(e=0,r=n.length;e<r;e++)n[e].pause()}for(e=0,r=this.effects.length;e<r;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,r;if(this.scopes){const i=this.scopes.slice();for(e=0,r=i.length;e<r;e++)i[e].resume()}const n=this.effects.slice();for(e=0,r=n.length;e<r;e++)n[e].resume()}}run(e){if(this._active){const r=ut;try{return ut=this,e()}finally{ut=r}}}on(){++this._on===1&&(this.prevScope=ut,ut=this)}off(){if(this._on>0&&--this._on===0){if(ut===this)ut=this.prevScope;else{let e=ut;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let r,n;for(r=0,n=this.effects.length;r<n;r++)this.effects[r].stop();for(this.effects.length=0,r=0,n=this.cleanups.length;r<n;r++)this.cleanups[r]();if(this.cleanups.length=0,this.scopes){const i=this.scopes.slice();for(r=0,n=i.length;r<n;r++)i[r].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function _d(){return ut}let G;const gi=new WeakSet;class Oo{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ut&&(ut.active?ut.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,gi.has(this)&&(gi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Io(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Do(this),Lo(this);const e=G,r=Dt;G=this,Dt=!0;try{return this.fn()}finally{No(this),G=e,Dt=r,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)wi(e);this.deps=this.depsTail=void 0,Do(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?gi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){yi(this)&&this.run()}get dirty(){return yi(this)}}let Po=0,pr,gr;function Io(t,e=!1){if(t.flags|=8,e){t.next=gr,gr=t;return}t.next=pr,pr=t}function mi(){Po++}function bi(){if(--Po>0)return;if(gr){let e=gr;for(gr=void 0;e;){const r=e.next;e.next=void 0,e.flags&=-9,e=r}}let t;for(;pr;){let e=pr;for(pr=void 0;e;){const r=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=r}}if(t)throw t}function Lo(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function No(t){let e,r=t.depsTail,n=r;for(;n;){const i=n.prevDep;n.version===-1?(n===r&&(r=i),wi(n),Cd(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}t.deps=e,t.depsTail=r}function yi(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&($o(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function $o(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===mr)||(t.globalVersion=mr,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!yi(t))))return;t.flags|=2;const e=t.dep,r=G,n=Dt;G=t,Dt=!0;try{Lo(t);const i=t.fn(t._value);(e.version===0||Jt(i,t._value))&&(t.flags|=128,t._value=i,e.version++)}catch(i){throw e.version++,i}finally{G=r,Dt=n,No(t),t.flags&=-3}}function wi(t,e=!1){const{dep:r,prevSub:n,nextSub:i}=t;if(n&&(n.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=n,t.nextSub=void 0),r.subs===t&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let s=r.computed.deps;s;s=s.nextDep)wi(s,!0)}!e&&!--r.sc&&r.map&&r.map.delete(r.key)}function Cd(t){const{prevDep:e,nextDep:r}=t;e&&(e.nextDep=r,t.prevDep=void 0),r&&(r.prevDep=e,t.nextDep=void 0)}let Dt=!0;const Bo=[];function Ht(){Bo.push(Dt),Dt=!1}function jt(){const t=Bo.pop();Dt=t===void 0?!0:t}function Do(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const r=G;G=void 0;try{e()}finally{G=r}}}let mr=0;class Td{constructor(e,r){this.sub=e,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class vi{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!G||!Dt||G===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==G)r=this.activeLink=new Td(G,this),G.deps?(r.prevDep=G.depsTail,G.depsTail.nextDep=r,G.depsTail=r):G.deps=G.depsTail=r,Ho(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const n=r.nextDep;n.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=n),r.prevDep=G.depsTail,r.nextDep=void 0,G.depsTail.nextDep=r,G.depsTail=r,G.deps===r&&(G.deps=n)}return r}trigger(e){this.version++,mr++,this.notify(e)}notify(e){mi();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{bi()}}}function Ho(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)Ho(n)}const r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}const xi=new WeakMap,Le=Symbol(""),Si=Symbol(""),br=Symbol("");function dt(t,e,r){if(Dt&&G){let n=xi.get(t);n||xi.set(t,n=new Map);let i=n.get(r);i||(n.set(r,i=new vi),i.map=n,i.key=r),i.track()}}function ae(t,e,r,n,i,s){const o=xi.get(t);if(!o){mr++;return}const l=a=>{a&&a.trigger()};if(mi(),e==="clear")o.forEach(l);else{const a=$(t),u=a&&fi(r);if(a&&r==="length"){const c=Number(n);o.forEach((d,p)=>{(p==="length"||p===br||!Gt(p)&&p>=c)&&l(d)})}else switch((r!==void 0||o.has(void 0))&&l(o.get(r)),u&&l(o.get(br)),e){case"add":a?u&&l(o.get("length")):(l(o.get(Le)),Se(t)&&l(o.get(Si)));break;case"delete":a||(l(o.get(Le)),Se(t)&&l(o.get(Si)));break;case"set":Se(t)&&l(o.get(Le));break}}bi()}function Ye(t){const e=q(t);return e===t||(dt(e,"iterate",br),At(t))?e:te(t)?_e(t)?e.map(r=>Ce(Mt(r))):e.map(Ce):e.map(Mt)}function nn(t){return dt(t=q(t),"iterate",br),t}function Zt(t,e){return te(t)?Ce(_e(t)?Mt(e):e):Mt(e)}const kd={__proto__:null,[Symbol.iterator](){return Ei(this,Symbol.iterator,t=>Zt(this,t))},concat(...t){return Ye(this).concat(...t.map(e=>$(e)?Ye(e):e))},entries(){return Ei(this,"entries",t=>(t[1]=Zt(this,t[1]),t))},every(t,e){return ce(this,"every",t,e,void 0,arguments)},filter(t,e){return ce(this,"filter",t,e,r=>r.map(n=>Zt(this,n)),arguments)},find(t,e){return ce(this,"find",t,e,r=>Zt(this,r),arguments)},findIndex(t,e){return ce(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return ce(this,"findLast",t,e,r=>Zt(this,r),arguments)},findLastIndex(t,e){return ce(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return ce(this,"forEach",t,e,void 0,arguments)},includes(...t){return _i(this,"includes",t)},indexOf(...t){return _i(this,"indexOf",t)},join(t){return Ye(this).join(t)},lastIndexOf(...t){return _i(this,"lastIndexOf",t)},map(t,e){return ce(this,"map",t,e,void 0,arguments)},pop(){return yr(this,"pop")},push(...t){return yr(this,"push",t)},reduce(t,...e){return Fo(this,"reduce",t,e)},reduceRight(t,...e){return Fo(this,"reduceRight",t,e)},shift(){return yr(this,"shift")},some(t,e){return ce(this,"some",t,e,void 0,arguments)},splice(...t){return yr(this,"splice",t)},toReversed(){return Ye(this).toReversed()},toSorted(t){return Ye(this).toSorted(t)},toSpliced(...t){return Ye(this).toSpliced(...t)},unshift(...t){return yr(this,"unshift",t)},values(){return Ei(this,"values",t=>Zt(this,t))}};function Ei(t,e,r){const n=nn(t),i=n[e],s=i.call(n);if(n!==t&&!At(t)){if(s[Symbol.toStringTag]==="Array Iterator"){const o=Object.create(Object.getPrototypeOf(s));return o.next=()=>jo(s.next(),r),i!==Uo[e]&&Object.defineProperties(o,{return:{get(){const l=s.return;return typeof l=="function"?l.bind(s):l}},throw:{get(){const l=s.throw;return typeof l=="function"?l.bind(s):l}}}),o}s._next=s.next,s.next=()=>jo(s._next(),r)}return s}function jo(t,e){return t.done||(t.value=e(t.value)),t}const Uo=Array.prototype;function ce(t,e,r,n,i,s){const o=nn(t),l=o!==t&&!At(t),a=o[e];if(a!==Uo[e]){const d=a.apply(t,s);return l?Mt(d):d}let u=r;o!==t&&(l?u=function(d,p){return r.call(this,Zt(t,d),p,t)}:r.length>2&&(u=function(d,p){return r.call(this,d,p,t)}));const c=a.call(o,u,n);return l&&i?i(c):c}function Fo(t,e,r,n){const i=nn(t),s=i!==t&&!At(t);let o=r,l=!1;i!==t&&(s?(l=n.length===0,o=function(u,c,d){return l&&(l=!1,u=Zt(t,u)),r.call(this,u,Zt(t,c),d,t)}):r.length>3&&(o=function(u,c,d){return r.call(this,u,c,d,t)}));const a=i[e](o,...n);return l?Zt(t,a):a}function _i(t,e,r){const n=q(t);dt(n,"iterate",br);const i=n[e](...r);return(i===-1||i===!1)&&Ri(r[0])?(r[0]=q(r[0]),n[e](...r)):i}function yr(t,e,r=[]){Ht(),mi();const n=q(t)[e].apply(t,r);return bi(),jt(),n}const Rd=ci("__proto__,__v_isRef,__isVue"),zo=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Gt));function Ad(t){Gt(t)||(t=String(t));const e=q(this);return dt(e,"has",t),e.hasOwnProperty(t)}class qo{constructor(e=!1,r=!1){this._isReadonly=e,this._isShallow=r}get(e,r,n){if(r==="__v_skip")return e.__v_skip;const i=this._isReadonly,s=this._isShallow;if(r==="__v_isReactive")return!i;if(r==="__v_isReadonly")return i;if(r==="__v_isShallow")return s;if(r==="__v_raw")return n===(i?s?Go:Yo:s?Xo:Ko).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=$(e);if(!i){let a;if(o&&(a=kd[r]))return a;if(r==="hasOwnProperty")return Ad}const l=Reflect.get(e,r,ft(e)?e:n);if((Gt(r)?zo.has(r):Rd(r))||(i||dt(e,"get",r),s))return l;if(ft(l)){const a=o&&fi(r)?l:l.value;return i&&X(a)?ki(a):a}return X(l)?i?ki(l):Ti(l):l}}class Wo extends qo{constructor(e=!1){super(!1,e)}set(e,r,n,i){let s=e[r];const o=$(e)&&fi(r);if(!this._isShallow){const u=te(s);if(!At(n)&&!te(n)&&(s=q(s),n=q(n)),!o&&ft(s)&&!ft(n))return u||(s.value=n),!0}const l=o?Number(r)<e.length:W(e,r),a=Reflect.set(e,r,n,ft(e)?e:i);return e===q(i)&&a&&(l?Jt(n,s)&&ae(e,"set",r,n):ae(e,"add",r,n)),a}deleteProperty(e,r){const n=W(e,r);e[r];const i=Reflect.deleteProperty(e,r);return i&&n&&ae(e,"delete",r,void 0),i}has(e,r){const n=Reflect.has(e,r);return(!Gt(r)||!zo.has(r))&&dt(e,"has",r),n}ownKeys(e){return dt(e,"iterate",$(e)?"length":Le),Reflect.ownKeys(e)}}class Vo extends qo{constructor(e=!1){super(!0,e)}set(e,r){return!0}deleteProperty(e,r){return!0}}const Md=new Wo,Od=new Vo,Pd=new Wo(!0),Id=new Vo(!0),Ci=t=>t,sn=t=>Reflect.getPrototypeOf(t);function Ld(t,e,r){return function(...n){const i=this.__v_raw,s=q(i),o=Se(s),l=t==="entries"||t===Symbol.iterator&&o,a=t==="keys"&&o,u=i[t](...n),c=r?Ci:e?Ce:Mt;return!e&&dt(s,"iterate",a?Si:Le),st(Object.create(u),{next(){const{value:d,done:p}=u.next();return p?{value:d,done:p}:{value:l?[c(d[0]),c(d[1])]:c(d),done:p}}})}}function on(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Nd(t,e){const r={get(i){const s=this.__v_raw,o=q(s),l=q(i);t||(Jt(i,l)&&dt(o,"get",i),dt(o,"get",l));const{has:a}=sn(o),u=e?Ci:t?Ce:Mt;if(a.call(o,i))return u(s.get(i));if(a.call(o,l))return u(s.get(l));s!==o&&s.get(i)},get size(){const i=this.__v_raw;return!t&&dt(q(i),"iterate",Le),i.size},has(i){const s=this.__v_raw,o=q(s),l=q(i);return t||(Jt(i,l)&&dt(o,"has",i),dt(o,"has",l)),i===l?s.has(i):s.has(i)||s.has(l)},forEach(i,s){const o=this,l=o.__v_raw,a=q(l),u=e?Ci:t?Ce:Mt;return!t&&dt(a,"iterate",Le),l.forEach((c,d)=>i.call(s,u(c),u(d),o))}};return st(r,t?{add:on("add"),set:on("set"),delete:on("delete"),clear:on("clear")}:{add(i){const s=q(this),o=sn(s),l=q(i),a=!e&&!At(i)&&!te(i)?l:i;return o.has.call(s,a)||Jt(i,a)&&o.has.call(s,i)||Jt(l,a)&&o.has.call(s,l)||(s.add(a),ae(s,"add",a,a)),this},set(i,s){!e&&!At(s)&&!te(s)&&(s=q(s));const o=q(this),{has:l,get:a}=sn(o);let u=l.call(o,i);u||(i=q(i),u=l.call(o,i));const c=a.call(o,i);return o.set(i,s),u?Jt(s,c)&&ae(o,"set",i,s):ae(o,"add",i,s),this},delete(i){const s=q(this),{has:o,get:l}=sn(s);let a=o.call(s,i);a||(i=q(i),a=o.call(s,i)),l&&l.call(s,i);const u=s.delete(i);return a&&ae(s,"delete",i,void 0),u},clear(){const i=q(this),s=i.size!==0,o=i.clear();return s&&ae(i,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(i=>{r[i]=Ld(i,t,e)}),r}function ln(t,e){const r=Nd(t,e);return(n,i,s)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_isShallow"?e:i==="__v_raw"?n:Reflect.get(W(r,i)&&i in n?r:n,i,s)}const $d={get:ln(!1,!1)},Bd={get:ln(!1,!0)},Dd={get:ln(!0,!1)},Hd={get:ln(!0,!0)},Ko=new WeakMap,Xo=new WeakMap,Yo=new WeakMap,Go=new WeakMap;function jd(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ti(t){return te(t)?t:an(t,!1,Md,$d,Ko)}function Ud(t){return an(t,!1,Pd,Bd,Xo)}function ki(t){return an(t,!0,Od,Dd,Yo)}function Rg(t){return an(t,!0,Id,Hd,Go)}function an(t,e,r,n,i){if(!X(t)||t.__v_raw&&!(e&&t.__v_isReactive)||t.__v_skip||!Object.isExtensible(t))return t;const s=i.get(t);if(s)return s;const o=jd(dd(t));if(o===0)return t;const l=new Proxy(t,o===2?n:r);return i.set(t,l),l}function _e(t){return te(t)?_e(t.__v_raw):!!(t&&t.__v_isReactive)}function te(t){return!!(t&&t.__v_isReadonly)}function At(t){return!!(t&&t.__v_isShallow)}function Ri(t){return t?!!t.__v_raw:!1}function q(t){const e=t&&t.__v_raw;return e?q(e):t}function Fd(t){return!W(t,"__v_skip")&&Object.isExtensible(t)&&_o(t,"__v_skip",!0),t}const Mt=t=>X(t)?Ti(t):t,Ce=t=>X(t)?ki(t):t;function ft(t){return t?t.__v_isRef===!0:!1}function ot(t){return zd(t,!1)}function zd(t,e){return ft(t)?t:new qd(t,e)}class qd{constructor(e,r){this.dep=new vi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?e:q(e),this._value=r?e:Mt(e),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(e){const r=this._rawValue,n=this.__v_isShallow||At(e)||te(e);e=n?e:q(e),Jt(e,r)&&(this._rawValue=e,this._value=n?e:Mt(e),this.dep.trigger())}}function Wd(t){return ft(t)?t.value:t}const Vd={get:(t,e,r)=>e==="__v_raw"?t:Wd(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const i=t[e];return ft(i)&&!ft(r)?(i.value=r,!0):Reflect.set(t,e,r,n)}};function Jo(t){return _e(t)?t:new Proxy(t,Vd)}class Kd{constructor(e,r,n){this.fn=e,this.setter=r,this._value=void 0,this.dep=new vi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=mr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&G!==this)return Io(this,!0),!0}get value(){const e=this.dep.track();return $o(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Xd(t,e,r=!1){let n,i;return H(t)?n=t:(n=t.get,i=t.set),new Kd(n,i,r)}const cn={},un=new WeakMap;let Ne;function Yd(t,e=!1,r=Ne){if(r){let n=un.get(r);n||un.set(r,n=[]),n.push(t)}}function Gd(t,e,r=Y){const{immediate:n,deep:i,once:s,scheduler:o,augmentJob:l,call:a}=r,u=I=>i?I:At(I)||i===!1||i===0?ue(I,1):ue(I);let c,d,p,x,R=!1,k=!1;if(ft(t)?(d=()=>t.value,R=At(t)):_e(t)?(d=()=>u(t),R=!0):$(t)?(k=!0,R=t.some(I=>_e(I)||At(I)),d=()=>t.map(I=>{if(ft(I))return I.value;if(_e(I))return u(I);if(H(I))return a?a(I,2):I()})):H(t)?e?d=a?()=>a(t,2):t:d=()=>{if(p){Ht();try{p()}finally{jt()}}const I=Ne;Ne=c;try{return a?a(t,3,[x]):t(x)}finally{Ne=I}}:d=Yt,e&&i){const I=d,Q=i===!0?1/0:i;d=()=>ue(I(),Q)}const N=_d(),z=()=>{c.stop(),N&&N.active&&ui(N.effects,c)};if(s&&e){const I=e;e=(...Q)=>{try{return I(...Q)}finally{z()}}}let j=k?new Array(t.length).fill(cn):cn;const F=I=>{if(!(!(c.flags&1)||!c.dirty&&!I))if(e){const Q=c.run();if(I||i||R||(k?Q.some((Et,ht)=>Jt(Et,j[ht])):Jt(Q,j))){const Et=Ne;Ht();try{p&&p(),Ne=c;const ht=[Q,j===cn?void 0:k&&j[0]===cn?[]:j,x];j=Q,a?a(e,3,ht):e(...ht)}finally{Ne=Et,jt()}}}else c.run()};return l&&l(F),c=new Oo(d),c.scheduler=o?()=>o(F,!1):F,x=I=>Yd(I,!1,c),p=c.onStop=()=>{const I=un.get(c);if(I){if(a)a(I,4);else for(const Q of I)Q();un.delete(c)}},e?n?F(!0):j=c.run():o?o(F.bind(null,!0),!0):c.run(),z.pause=c.pause.bind(c),z.resume=c.resume.bind(c),z.stop=z,z}function ue(t,e=1/0,r){if(e<=0||!X(t)||t.__v_skip||(r=r||new Map,(r.get(t)||0)>=e))return t;if(r.set(t,e),e--,ft(t))ue(t.value,e,r);else if($(t))for(let n=0;n<t.length;n++)ue(t[n],e,r);else if(Pe(t)||Se(t))t.forEach(n=>{ue(n,e,r)});else if(So(t)){for(const n in t)ue(t[n],e,r);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&ue(t[n],e,r)}return t}/**
|
|
496
|
+
* @vue/runtime-core v3.5.45
|
|
497
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
498
|
+
* @license MIT
|
|
499
|
+
**/const wr=[];let Ai=!1;function Ag(t,...e){if(Ai)return;Ai=!0,Ht();const r=wr.length?wr[wr.length-1].component:null,n=r&&r.appContext.config.warnHandler,i=Jd();if(n)Ge(n,r,11,[t+e.map(s=>{var o,l;return(l=(o=s.toString)==null?void 0:o.call(s))!=null?l:JSON.stringify(s)}).join(""),r&&r.proxy,i.map(({vnode:s})=>`at <${Xl(r,s.type)}>`).join(`
|
|
500
|
+
`),i]);else{const s=[`[Vue warn]: ${t}`,...e];i.length&&s.push(`
|
|
501
|
+
`,...Qd(i)),console.warn(...s)}jt(),Ai=!1}function Jd(){let t=wr[wr.length-1];if(!t)return[];const e=[];for(;t;){const r=e[0];r&&r.vnode===t?r.recurseCount++:e.push({vnode:t,recurseCount:0});const n=t.component&&t.component.parent;t=n&&n.vnode}return e}function Qd(t){const e=[];return t.forEach((r,n)=>{e.push(...n===0?[]:[`
|
|
502
|
+
`],...Zd(r))}),e}function Zd({vnode:t,recurseCount:e}){const r=e>0?`... (${e} recursive calls)`:"",n=t.component?t.component.parent==null:!1,i=` at <${Xl(t.component,t.type,n)}`,s=">"+r;return t.props?[i,...th(t.props),s]:[i+s]}function th(t){const e=[],r=Object.keys(t);return r.slice(0,3).forEach(n=>{e.push(...Qo(n,t[n]))}),r.length>3&&e.push(" ..."),e}function Qo(t,e,r){return Z(e)?(e=JSON.stringify(e),r?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?r?e:[`${t}=${e}`]:ft(e)?(e=Qo(t,q(e.value),!0),r?e:[`${t}=Ref<`,e,">"]):H(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=q(e),r?e:[`${t}=`,e])}function Ge(t,e,r,n){try{return n?t(...n):t()}catch(i){fn(i,e,r)}}function Ut(t,e,r,n){if(H(t)){const i=Ge(t,e,r,n);return i&&vo(i)&&i.catch(s=>{fn(s,e,r,void 0,!0)}),i}if($(t)){const i=[];for(let s=0;s<t.length;s++)i.push(Ut(t[s],e,r,n));return i}}function fn(t,e,r,n=!0,i=!1){const s=e?e.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:l}=e&&e.appContext.config||Y;if(e){let a=e.parent;const u=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${r}`;for(;a;){const d=a.ec;if(d&&!a.isUnmounted&&(!i||a.scope.active)){for(let p=0;p<d.length;p++)if(d[p](t,u,c)===!1)return}a=a.parent}if(o){Ht(),Ge(o,null,10,[t,u,c]),jt();return}}eh(t,r,s,n,l)}function eh(t,e,r,n=!0,i=!1){if(i)throw t;console.error(t)}const pt=[];let Ft=-1;const ee=[];let Te=null,Je=0;const Zo=Promise.resolve();let dn=null;function hn(t){const e=dn||Zo;return t?e.then(this?t.bind(this):t):e}function rh(t){let e=Ft+1,r=pt.length;for(;e<r;){const n=e+r>>>1,i=pt[n],s=vr(i);s<t||s===t&&i.flags&2?e=n+1:r=n}return e}function Mi(t){if(!(t.flags&1)){const e=vr(t),r=pt[pt.length-1];!r||!(t.flags&2)&&e>=vr(r)?pt.push(t):pt.splice(rh(e),0,t),t.flags|=1,tl()}}function tl(){dn||(dn=Zo.then(nl))}function nh(t){if(!$(t))Te&&t.id===-1?Te.splice(Je+1,0,t):t.flags&1||(ee.push(t),t.flags|=1);else for(let e=0;e<t.length;e++)ee.push(t[e]);tl()}function el(t,e,r,n=Ft+1){for(;n<pt.length;n++){const i=pt[n];if(i&&i.flags&2){if(t&&i.id!==t.uid||e!==void 0&&!(i.id>=e))continue;pt.splice(n,1),n=t?n-1:Ft,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function rl(t,e,r=0){if(ee.length){let n=ee,i=0;if(e){n=[];for(let o=0;o<ee.length;o++){const l=ee[o];(l.i!==void 0?!l.i||l.i.uid<r:e.has(l))?ee[i++]=l:n.push(l)}}const s=[...new Set(n)].sort((o,l)=>vr(o)-vr(l));if(ee.length=i,Te){for(let o=0;o<s.length;o++)Te.push(s[o]);return}for(Te=s,Je=0;Je<Te.length;Je++){const o=Te[Je];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}Te=null,Je=0}}let Oi=!1;function ih(t,e){if(Oi){t();return}const r=e===void 0?void 0:new Set(ee);t(),Oi=!0;try{el(void 0,e),rl(void 0,r,e)}finally{Oi=!1}}const vr=t=>t.id==null?t.flags&2?-1:1/0:t.id;function nl(t){try{for(Ft=0;Ft<pt.length;Ft++){const e=pt[Ft];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),Ge(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Ft<pt.length;Ft++){const e=pt[Ft];e&&(e.flags&=-2)}Ft=-1,pt.length=0,rl(),dn=null,(pt.length||ee.length)&&nl()}}let Ot=null,il=null;function pn(t){const e=Ot;return Ot=t,il=t&&t.type.__scopeId||null,e}function sh(t,e=Ot,r){if(!e||t._n)return t;const n=(...i)=>{n._d&&Dl(-1);const s=pn(e),o=De.length;let l;try{l=t(...i)}finally{for(let a=De.length;a>o;a--)Bl();pn(s),n._d&&Dl(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function Qe(t,e){if(Ot===null)return t;const r=Tn(Ot),n=t.dirs||(t.dirs=[]);for(let i=0;i<e.length;i++){let[s,o,l,a=Y]=e[i];s&&(H(s)&&(s={mounted:s,updated:s}),s.deep&&ue(o),n.push({dir:s,instance:r,value:o,oldValue:void 0,arg:l,modifiers:a}))}return t}function $e(t,e,r,n){let i=t;if(n==="beforeMount")t._mount=t;else if(n==="beforeUpdate"){const l=e&&e._mount;l&&(l._latest=t,t._mount=l)}else if(n==="mounted"){const l=t._latest;t._mount=t._latest=void 0,l&&(i=l,l._mount=void 0)}const s=i.dirs,o=e&&e.dirs;for(let l=0;l<s.length;l++){let a=s[l];o?a.oldValue=o[l].value:n==="mounted"&&a.oldValue!==void 0&&(a=st({},a,{oldValue:void 0}));let u=a.dir[n];u&&(Ht(),Ut(u,r,8,[t.el,a,i,e]),jt())}}function oh(t,e){if(wt){let r=wt.provides;const n=wt.parent&&wt.parent.provides;n===r&&(r=wt.provides=Object.create(n)),r[t]=e}}function gn(t,e,r=!1){const n=lp();if(n||Ze){let i=Ze?Ze._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(i&&t in i)return i[t];if(arguments.length>1)return r&&H(e)?e.call(n&&n.proxy):e}}const lh=Symbol.for("v-scx"),ah=()=>gn(lh);function mn(t,e,r){return sl(t,e,r)}function sl(t,e,r=Y){const{immediate:n,deep:i,flush:s,once:o}=r,l=st({},r),a=e&&n||!e&&s!=="post";let u;if(Pr){if(s==="sync"){const x=ah();u=x.__watcherHandles||(x.__watcherHandles=[])}else if(!a){const x=()=>{};return x.stop=Yt,x.resume=Yt,x.pause=Yt,x}}const c=wt;l.call=(x,R,k)=>Ut(x,c,R,k);let d=!1;s==="post"?l.scheduler=x=>{x.i=c,mt(x,c&&c.suspense)}:s!=="sync"&&(d=!0,l.scheduler=(x,R)=>{R?x():Mi(x)}),l.augmentJob=x=>{e&&(x.flags|=4),d&&(x.flags|=2,c&&(x.id=c.uid,x.i=c))};const p=Gd(t,e,l);return Pr&&(u?u.push(p):a&&p()),p}function ch(t,e,r){const n=this.proxy,i=Z(t)?t.includes(".")?ol(n,t):()=>n[t]:t.bind(n,n);let s;H(e)?s=e:(s=e.handler,r=e);const o=Or(this),l=sl(i,s.bind(n),r);return o(),l}function ol(t,e){const r=e.split(".");return()=>{let n=t;for(let i=0;i<r.length&&n;i++)n=n[r[i]];return n}}const uh=Symbol("_vte"),bn=t=>t.__isTeleport,Pi=Symbol("_leaveCb");function fh(t){let e=t[0];if(t.length>1){for(const r of t)if(r.type!==zt){e=r;break}}return e}function ll(t){if(!Li(t))return bn(t.type)&&t.children?fh(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:r}=t;if(r){if(e&16)return r[0];if(e&32&&H(r.default))return r.default()}}function xr(t,e){if(t.shapeFlag&6&&t.component){t.transition=e;const r=t.component.subTree;xr(bn(r.type)&&ll(r)||r,e)}else if(t.shapeFlag&128){const r=t.suspense;if(r){const n=r.isHydrating?r.pendingBranch:r.activeBranch;n&&xr(n,e.clone(n))}else t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)}else if(t.transition=e,t.type===bt&&$(t.children)){const r=xl(t.children,!1);r&&xr(r,e)}}function Ii(t){if(t.component)return Ii(t.component.subTree);if(t.type===bt){const e=$(t.children)&&xl(t.children,!1);return e?Ii(e):void 0}if(t.type!==zt)return t}function dh(t,e){return H(t)?st({name:t.name},e,{setup:t}):t}function al(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function cl(t,e){let r;return!!((r=Object.getOwnPropertyDescriptor(t,e))&&!r.configurable)}const yn=new WeakMap;function Sr(t,e,r,n,i=!1){if($(t)){t.forEach((k,N)=>Sr(k,e&&($(e)?e[N]:e),r,n,i));return}if(Er(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Sr(t,e,r,n.component.subTree);return}const s=n.shapeFlag&4?Tn(n.component):n.el,o=i?null:s,{i:l,r:a}=t,u=e&&e.r,c=l.refs===Y?l.refs={}:l.refs,d=l.setupState,p=q(d),x=d===Y?yo:k=>cl(c,k)?!1:W(p,k),R=(k,N)=>!(N&&cl(c,N));if(u!=null&&u!==a){if(ul(e),Z(u))c[u]=null,x(u)&&(d[u]=null);else if(ft(u)){const k=e;R(u,k.k)&&(u.value=null),k.k&&(c[k.k]=null)}}if(H(a))Ge(a,l,12,[o,c]);else{const k=Z(a),N=ft(a);if(k||N){const z=()=>{if(t.f){const j=k?x(a)?d[a]:c[a]:R()||!t.k?a.value:c[t.k];if(i)$(j)&&ui(j,s);else if($(j))j.includes(s)||j.push(s);else if(k)c[a]=[s],x(a)&&(d[a]=c[a]);else{const F=[s];R(a,t.k)&&(a.value=F),t.k&&(c[t.k]=F)}}else k?(c[a]=o,x(a)&&(d[a]=o)):N&&(R(a,t.k)&&(a.value=o),t.k&&(c[t.k]=o))};if(o){const j=()=>{z(),yn.delete(t)};j.id=-1,yn.set(t,j),mt(j,r)}else ul(t),z()}}}function ul(t){const e=yn.get(t);e&&(e.flags|=8,yn.delete(t))}rn().requestIdleCallback,rn().cancelIdleCallback;const Er=t=>!!t.type.__asyncLoader,Li=t=>t.type.__isKeepAlive;function hh(t,e){fl(t,"a",e)}function ph(t,e){fl(t,"da",e)}function fl(t,e,r=wt){const n=t.__wdc||(t.__wdc=()=>{let i=r;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(_r(e,n,r),r){let i=r.parent;for(;i&&i.parent;)Li(i.parent.vnode)&&gh(n,e,r,i),i=i.parent}}function gh(t,e,r,n){const i=_r(e,t,n,!0),s=_r("um",()=>ui(n[e],i),r);s.flags=16}function _r(t,e,r=wt,n=!1){if(r){const i=r[t]||(r[t]=[]),s=e.__weh||(e.__weh=(...o)=>{Ht();const l=Or(r),a=Ut(e,r,t,o);return l(),jt(),a});return n?i.unshift(s):i.push(s),s}}const fe=t=>(e,r=wt)=>{(!Pr||t==="sp")&&_r(t,(...n)=>e(...n),r)},mh=fe("bm"),bh=fe("m"),yh=fe("bu"),wh=fe("u"),vh=fe("bum"),xh=fe("um"),Sh=fe("sp"),Eh=fe("rtg"),_h=fe("rtc");function Ch(t,e=wt){_r("ec",t,e)}const Th=Symbol.for("v-ndc");function wn(t,e,r,n){let i;const s=r,o=$(t);if(o||Z(t)){const l=o&&_e(t);let a=!1,u=!1;l&&(a=!At(t),u=te(t),t=nn(t)),i=new Array(t.length);for(let c=0,d=t.length;c<d;c++)i[c]=e(a?u?Ce(Mt(t[c])):Mt(t[c]):t[c],c,void 0,s)}else if(typeof t=="number")if(!Number.isInteger(t)||t<0)i=[];else{i=new Array(t);for(let l=0;l<t;l++)i[l]=e(l+1,l,void 0,s)}else if(X(t))if(t[Symbol.iterator])i=Array.from(t,(l,a)=>e(l,a,void 0,s));else{const l=Object.keys(t);i=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];i[a]=e(t[c],c,a,s)}}else i=[];return i}const Ni=t=>t?ql(t)?Tn(t):Ni(t.parent):null,Cr=st(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Ni(t.parent),$root:t=>Ni(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>gl(t),$forceUpdate:t=>t.f||(t.f=()=>{Mi(t.update)}),$nextTick:t=>t.n||(t.n=hn.bind(t.proxy)),$watch:t=>ch.bind(t)}),$i=(t,e)=>t!==Y&&!t.__isScriptSetup&&W(t,e),kh={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:r,setupState:n,data:i,props:s,accessCache:o,type:l,appContext:a}=t;if(e[0]!=="$"){const p=o[e];if(p!==void 0)switch(p){case 1:return n[e];case 2:return i[e];case 4:return r[e];case 3:return s[e]}else{if($i(n,e))return o[e]=1,n[e];if(i!==Y&&W(i,e))return o[e]=2,i[e];if(W(s,e))return o[e]=3,s[e];if(r!==Y&&W(r,e))return o[e]=4,r[e];Bi&&(o[e]=0)}}const u=Cr[e];let c,d;if(u)return e==="$attrs"&&dt(t.attrs,"get",""),u(t);if((c=l.__cssModules)&&(c=c[e]))return c;if(r!==Y&&W(r,e))return o[e]=4,r[e];if(d=a.config.globalProperties,W(d,e))return d[e]},set({_:t},e,r){const{data:n,setupState:i,ctx:s}=t;return $i(i,e)?(i[e]=r,!0):n!==Y&&W(n,e)?(n[e]=r,!0):W(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:i,props:s,type:o}},l){let a;return!!(r[l]||t!==Y&&l[0]!=="$"&&W(t,l)||$i(e,l)||W(s,l)||W(n,l)||W(Cr,l)||W(i.config.globalProperties,l)||(a=o.__cssModules)&&a[l])},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:W(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function dl(t){return $(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}let Bi=!0;function Rh(t){const e=gl(t),r=t.proxy,n=t.ctx;Bi=!1,e.beforeCreate&&hl(e.beforeCreate,t,"bc");const{data:i,computed:s,methods:o,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:p,beforeUpdate:x,updated:R,activated:k,deactivated:N,beforeDestroy:z,beforeUnmount:j,destroyed:F,unmounted:I,render:Q,renderTracked:Et,renderTriggered:ht,errorCaptured:vt,serverPrefetch:ge,expose:Pt,inheritAttrs:It,components:me,directives:xt,filters:ke}=e;if(u&&Ah(u,n,null),o)for(const K in o){const V=o[K];H(V)&&(n[K]=V.bind(r))}if(i){const K=i.call(r,r);X(K)&&(t.data=Ti(K))}if(Bi=!0,s)for(const K in s){const V=s[K],at=H(V)?V.bind(r,r):H(V.get)?V.get.bind(r,r):Yt,be=!H(V)&&H(V.set)?V.set.bind(r):Yt,Tt=er({get:at,set:be});Object.defineProperty(n,K,{enumerable:!0,configurable:!0,get:()=>Tt.value,set:rt=>Tt.value=rt})}if(l)for(const K in l)pl(l[K],n,r,K);if(a){const K=H(a)?a.call(r):a;Reflect.ownKeys(K).forEach(V=>{oh(V,K[V])})}c&&hl(c,t,"c");function J(K,V){$(V)?V.forEach(at=>K(at.bind(r))):V&&K(V.bind(r))}if(J(mh,d),J(bh,p),J(yh,x),J(wh,R),J(hh,k),J(ph,N),J(Ch,vt),J(_h,Et),J(Eh,ht),J(vh,j),J(xh,I),J(Sh,ge),$(Pt))if(Pt.length){const K=t.exposed||(t.exposed={});Pt.forEach(V=>{Object.defineProperty(K,V,{get:()=>r[V],set:at=>r[V]=at,enumerable:!0})})}else t.exposed||(t.exposed={});Q&&t.render===Yt&&(t.render=Q),It!=null&&(t.inheritAttrs=It),me&&(t.components=me),xt&&(t.directives=xt),ge&&al(t)}function Ah(t,e,r=Yt){$(t)&&(t=Di(t));for(const n in t){const i=t[n];let s;X(i)?"default"in i?s=gn(i.from||n,i.default,!0):s=gn(i.from||n):s=gn(i),ft(s)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[n]=s}}function hl(t,e,r){Ut($(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function pl(t,e,r,n){let i=n.includes(".")?ol(r,n):()=>r[n];if(Z(t)){const s=e[t];H(s)&&mn(i,s)}else if(H(t))mn(i,t.bind(r));else if(X(t))if($(t))t.forEach(s=>pl(s,e,r,n));else{const s=H(t.handler)?t.handler.bind(r):e[t.handler];H(s)&&mn(i,s,t)}}function gl(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:i,optionsCache:s,config:{optionMergeStrategies:o}}=t.appContext,l=s.get(e);let a;return l?a=l:!i.length&&!r&&!n?a=e:(a={},i.length&&i.forEach(u=>vn(a,u,o,!0)),vn(a,e,o)),X(e)&&s.set(e,a),a}function vn(t,e,r,n=!1){const{mixins:i,extends:s}=e;s&&vn(t,s,r,!0),i&&i.forEach(o=>vn(t,o,r,!0));for(const o in e)if(!(n&&o==="expose")){const l=Mh[o]||r&&r[o];t[o]=l?l(t[o],e[o]):e[o]}return t}const Mh={data:ml,props:bl,emits:bl,methods:Tr,computed:Tr,beforeCreate:gt,created:gt,beforeMount:gt,mounted:gt,beforeUpdate:gt,updated:gt,beforeDestroy:gt,beforeUnmount:gt,destroyed:gt,unmounted:gt,activated:gt,deactivated:gt,errorCaptured:gt,serverPrefetch:gt,components:Tr,directives:Tr,watch:Ph,provide:ml,inject:Oh};function ml(t,e){return e?t?function(){return st(H(t)?t.call(this,this):t,H(e)?e.call(this,this):e)}:e:t}function Oh(t,e){return Tr(Di(t),Di(e))}function Di(t){if($(t)){const e={};for(let r=0;r<t.length;r++)e[t[r]]=t[r];return e}return t}function gt(t,e){return t?[...new Set([].concat(t,e))]:e}function Tr(t,e){return t?st(Object.create(null),t,e):e}function bl(t,e){return t?$(t)&&$(e)?[...new Set([...t,...e])]:st(Object.create(null),dl(t),dl(e!=null?e:{})):e}function Ph(t,e){if(!t)return e;if(!e)return t;const r=st(Object.create(null),t);for(const n in e)r[n]=gt(t[n],e[n]);return r}function yl(){return{app:null,config:{isNativeTag:yo,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ih=0;function Lh(t,e){return function(n,i=null){H(n)||(n=st({},n)),i!=null&&!X(i)&&(i=null);const s=yl(),o=new WeakSet,l=[];let a=!1;const u=s.app={_uid:Ih++,_component:n,_props:i,_container:null,_context:s,_instance:null,version:mp,get config(){return s.config},set config(c){},use(c,...d){return o.has(c)||(c&&H(c.install)?(o.add(c),c.install(u,...d)):H(c)&&(o.add(c),c(u,...d))),u},mixin(c){return s.mixins.includes(c)||s.mixins.push(c),u},component(c,d){return d?(s.components[c]=d,u):s.components[c]},directive(c,d){return d?(s.directives[c]=d,u):s.directives[c]},mount(c,d,p){if(!a){const x=u._ceVNode||de(n,i);return x.appContext=s,p===!0?p="svg":p===!1&&(p=void 0),t(x,c,p),a=!0,u._container=c,c.__vue_app__=u,Tn(x.component)}},onUnmount(c){l.push(c)},unmount(){a&&(Ut(l,u._instance,16),t(null,u._container),delete u._container.__vue_app__)},provide(c,d){return s.provides[c]=d,u},runWithContext(c){const d=Ze;Ze=u;try{return c()}finally{Ze=d}}};return u}}let Ze=null;const Nh=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Bt(e)}Modifiers`]||t[`${Ie(e)}Modifiers`];function $h(t,e,...r){if(t.isUnmounted)return;const n=t.vnode.props||Y;let i=r;const s=e.startsWith("update:"),o=s&&Nh(n,e.slice(7));o&&(o.trim&&(i=r.map(c=>Z(c)?c.trim():c)),o.number&&(i=i.map(hr)));let l,a=n[l=di(e)]||n[l=di(Bt(e))];!a&&s&&(a=n[l=di(Ie(e))]),a&&Ut(a,t,6,i);const u=n[l+"Once"];if(u){if(!t.emitted)t.emitted={};else if(t.emitted[l])return;t.emitted[l]=!0,Ut(u,t,6,i)}}const Bh=new WeakMap;function wl(t,e,r=!1){const n=r?Bh:e.emitsCache,i=n.get(t);if(i!==void 0)return i;const s=t.emits;let o={},l=!1;if(!H(t)){const a=u=>{const c=wl(u,e,!0);c&&(l=!0,st(o,c))};!r&&e.mixins.length&&e.mixins.forEach(a),t.extends&&a(t.extends),t.mixins&&t.mixins.forEach(a)}return!s&&!l?(X(t)&&n.set(t,null),null):($(s)?s.forEach(a=>o[a]=null):st(o,s),X(t)&&n.set(t,o),o)}function xn(t,e){return!t||!Qr(e)?!1:(e=e.slice(2),e=e==="Once"?e:e.replace(/Once$/,""),W(t,e[0].toLowerCase()+e.slice(1))||W(t,Ie(e))||W(t,e))}function Mg(){}function vl(t){const{type:e,vnode:r,proxy:n,withProxy:i,propsOptions:[s],slots:o,attrs:l,emit:a,render:u,renderCache:c,props:d,data:p,setupState:x,ctx:R,inheritAttrs:k}=t,N=pn(t);let z,j;try{if(r.shapeFlag&4){const I=i||n,Q=I;z=re(u.call(Q,I,c,d,x,p,R)),j=l}else{const I=e;z=re(I.length>1?I(d,{attrs:l,slots:o,emit:a}):I(d,null)),j=e.props?l:Dh(l)}}catch(I){De.length=0,fn(I,t,1),z=de(zt)}let F=z;if(j&&k!==!1){const I=Object.keys(j),{shapeFlag:Q}=F;I.length&&Q&7&&(s&&I.some(Zr)&&(j=Hh(j,s)),F=tr(F,j,!1,!0))}if(r.dirs&&(F=tr(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(r.dirs):r.dirs),r.transition){const I=bn(F.type)&&ll(F)||F;xr(I,r.transition)}return z=F,pn(N),z}function xl(t,e=!0){let r;for(let n=0;n<t.length;n++){const i=t[n];if(qi(i)){if(i.type!==zt||i.children==="v-if"){if(r)return;r=i}}else return}return r}const Dh=t=>{let e;for(const r in t)(r==="class"||r==="style"||Qr(r))&&((e||(e={}))[r]=t[r]);return e},Hh=(t,e)=>{const r={};for(const n in t)(!Zr(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function jh(t,e,r){const{props:n,children:i,component:s}=t,{props:o,children:l,patchFlag:a}=e,u=s.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&a>=0){if(a&1024)return!0;if(a&16)return n?Sl(n,o,u):!!o;if(a&8){const c=e.dynamicProps;for(let d=0;d<c.length;d++){const p=c[d];if(El(o,n,p)&&!xn(u,p))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:n===o?!1:n?o?Sl(n,o,u):!0:!!o;return!1}function Sl(t,e,r){const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(let i=0;i<n.length;i++){const s=n[i];if(!W(t,s)||El(e,t,s)&&!xn(r,s))return!0}return!1}function El(t,e,r){const n=t[r],i=e[r];return r==="style"&&X(n)&&X(i)?!Ee(n,i):n!==i}function Uh({vnode:t,parent:e,suspense:r},n){for(;e;){const i=e.subTree;if(i.suspense&&i.suspense.activeBranch===t&&(i.suspense.vnode.el=i.el=n,t=i),i===t)(t=e.vnode).el=n,e=e.parent;else break}r&&r.activeBranch===t&&(r.vnode.el=n)}const _l={},Cl=()=>Object.create(_l),Tl=t=>Object.getPrototypeOf(t)===_l;function Fh(t,e,r,n=!1){const i={},s=Cl();t.propsDefaults=Object.create(null),kl(t,e,i,s);for(const o in t.propsOptions[0])o in i||(i[o]=void 0);r?t.props=n?i:Ud(i):t.type.props?t.props=i:t.props=s,t.attrs=s}function zh(t,e,r,n){const{props:i,attrs:s,vnode:{patchFlag:o}}=t,l=q(i),[a]=t.propsOptions;let u=!1;if((n||o>0)&&!(o&16)){if(o&8){const c=t.vnode.dynamicProps;for(let d=0;d<c.length;d++){let p=c[d];if(xn(t.emitsOptions,p))continue;const x=e[p];if(a)if(W(s,p))x!==s[p]&&(s[p]=x,u=!0);else{const R=Bt(p);i[R]=Hi(a,l,R,x,t,!1)}else x!==s[p]&&(s[p]=x,u=!0)}}}else{kl(t,e,i,s)&&(u=!0);let c;for(const d in l)(!e||!W(e,d)&&((c=Ie(d))===d||!W(e,c)))&&(a?r&&(r[d]!==void 0||r[c]!==void 0)&&(i[d]=Hi(a,l,d,void 0,t,!0)):delete i[d]);if(s!==l)for(const d in s)(!e||!W(e,d))&&(delete s[d],u=!0)}u&&ae(t.attrs,"set","")}function kl(t,e,r,n){const[i,s]=t.propsOptions;let o=!1,l;if(e)for(let a in e){if(dr(a))continue;const u=e[a];let c;i&&W(i,c=Bt(a))?!s||!s.includes(c)?r[c]=u:(l||(l={}))[c]=u:xn(t.emitsOptions,a)||(!(a in n)||u!==n[a])&&(n[a]=u,o=!0)}if(s){const a=q(r),u=l||Y;for(let c=0;c<s.length;c++){const d=s[c];r[d]=Hi(i,a,d,u[d],t,!W(u,d))}}return o}function Hi(t,e,r,n,i,s){const o=t[r];if(o!=null){const l=W(o,"default");if(l&&n===void 0){const a=o.default;if(o.type!==Function&&!o.skipFactory&&H(a)){const{propsDefaults:u}=i;if(r in u)n=u[r];else{const c=Or(i);n=u[r]=a.call(null,e),c()}}else n=a;i.ce&&i.ce._setProp(r,n)}o[0]&&(s&&!l?n=!1:o[1]&&(n===""||n===Ie(r))&&(n=!0))}return n}const qh=new WeakMap;function Rl(t,e,r=!1){const n=r?qh:e.propsCache,i=n.get(t);if(i)return i;const s=t.props,o={},l=[];let a=!1;if(!H(t)){const c=d=>{a=!0;const[p,x]=Rl(d,e,!0);st(o,p),x&&l.push(...x)};!r&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}if(!s&&!a)return X(t)&&n.set(t,Oe),Oe;if($(s))for(let c=0;c<s.length;c++){const d=Bt(s[c]);Al(d)&&(o[d]=Y)}else if(s)for(const c in s){const d=Bt(c);if(Al(d)){const p=s[c],x=o[d]=$(p)||H(p)?{type:p}:st({},p),R=x.type;let k=!1,N=!0;if($(R))for(let z=0;z<R.length;++z){const j=R[z],F=H(j)&&j.name;if(F==="Boolean"){k=!0;break}else F==="String"&&(N=!1)}else k=H(R)&&R.name==="Boolean";x[0]=k,x[1]=N,(k||W(x,"default"))&&l.push(d)}}const u=[o,l];return X(t)&&n.set(t,u),u}function Al(t){return t[0]!=="$"&&!dr(t)}const ji=t=>t==="_"||t==="_ctx"||t==="$stable",Ui=t=>$(t)?t.map(re):[re(t)],Wh=(t,e,r)=>{if(e._n)return e;const n=sh((...i)=>Ui(e(...i)),r);return n._c=!1,n},Ml=(t,e,r)=>{const n=t._ctx;for(const i in t){if(ji(i))continue;const s=t[i];if(H(s))e[i]=Wh(i,s,n);else if(s!=null){const o=Ui(s);e[i]=()=>o}}},Ol=(t,e)=>{const r=Ui(e);t.slots.default=()=>r},Pl=(t,e,r)=>{for(const n in e)(r||!ji(n))&&(t[n]=e[n])},Vh=(t,e,r)=>{const n=t.slots=Cl();if(t.vnode.shapeFlag&32){const i=e._;i?(Pl(n,e,r),r&&_o(n,"_",i,!0)):Ml(e,n)}else e&&Ol(t,e)},Kh=(t,e,r)=>{const{vnode:n,slots:i}=t;let s=!0,o=Y;if(n.shapeFlag&32){const l=e._;l?r&&l===1?s=!1:Pl(i,e,r):(s=!e.$stable,Ml(e,i)),o=e}else e&&(Ol(t,e),o={default:1});if(s)for(const l in i)!ji(l)&&o[l]==null&&delete i[l]},mt=Zh;function Xh(t){return Yh(t)}function Yh(t,e){const r=rn();r.__VUE__=!0;const{insert:n,remove:i,patchProp:s,createElement:o,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:p,setScopeId:x=Yt,insertStaticContent:R}=t,k=(f,h,m,S=null,b=null,v=null,C=void 0,_=null,E=!!h.dynamicChildren)=>{if(f===h)return;f&&!Ar(f,h)&&(S=ye(f),rt(f,b,v,!0),f=null),h.patchFlag===-2&&(E=!1,h.dynamicChildren=null),h.dynamicChildren&&f&&f.dynamicChildren&&f.dynamicChildren.hasOnce&&(h.dynamicChildren===Oe&&(h.dynamicChildren=[]),h.dynamicChildren.hasOnce=!0);const{type:y,ref:A,shapeFlag:T}=h;switch(y){case Sn:N(f,h,m,S);break;case zt:z(f,h,m,S);break;case zi:f==null&&j(h,m,S,C);break;case bt:me(f,h,m,S,b,v,C,_,E);break;default:T&1?Q(f,h,m,S,b,v,C,_,E):T&6?xt(f,h,m,S,b,v,C,_,E):(T&64||T&128)&&y.process(f,h,m,S,b,v,C,_,E,Lt)}A!=null&&b?Sr(A,f&&f.ref,v,h||f,!h):A==null&&f&&f.ref!=null&&Sr(f.ref,null,v,f,!0)},N=(f,h,m,S)=>{if(f==null)n(h.el=l(h.children),m,S);else{const b=h.el=f.el;h.children!==f.children&&u(b,h.children)}},z=(f,h,m,S)=>{f==null?n(h.el=a(h.children||""),m,S):h.el=f.el},j=(f,h,m,S)=>{[f.el,f.anchor]=R(f.children,h,m,S,f.el,f.anchor)},F=({el:f,anchor:h},m,S)=>{let b;for(;f&&f!==h;)b=p(f),n(f,m,S),f=b;n(h,m,S)},I=({el:f,anchor:h})=>{let m;for(;f&&f!==h;)m=p(f),i(f),f=m;i(h)},Q=(f,h,m,S,b,v,C,_,E)=>{if(h.type==="svg"?C="svg":h.type==="math"&&(C="mathml"),f==null)Et(h,m,S,b,v,C,_,E);else{const y=f.el&&f.el._isVueCE?f.el:null;try{y&&y._beginPatch(),ge(f,h,b,v,C,_,E)}finally{y&&y._endPatch()}}},Et=(f,h,m,S,b,v,C,_)=>{let E,y;const{props:A,shapeFlag:T,transition:M,dirs:g}=f;if(E=f.el=o(f.type,v,A&&A.is,A),T&8?c(E,f.children):T&16&&vt(f.children,E,null,S,b,Fi(f,v),C,_),g&&$e(f,null,S,"created"),ht(E,f,f.scopeId,C,S),A){for(const O in A)O!=="value"&&!dr(O)&&s(E,O,null,A[O],v,S);"value"in A&&s(E,"value",null,A.value,v),(y=A.onVnodeBeforeMount)&&ne(y,S,f)}g&&$e(f,null,S,"beforeMount");const w=Gh(b,M);w?M.beforeEnter(E):M&&!M.persisted&&(E[Qh]=!0),n(E,h,m),((y=A&&A.onVnodeMounted)||w||g)&&mt(()=>{y&&ne(y,S,f),w&&M.enter(E),g&&$e(f,null,S,"mounted")},b)},ht=(f,h,m,S,b)=>{if(m&&x(f,m),S)for(let v=0;v<S.length;v++)x(f,S[v]);if(b){let v=b.subTree;if(h===v||$l(v.type)&&(v.ssContent===h||v.ssFallback===h)){const C=b.vnode;ht(f,C,C.scopeId,C.slotScopeIds,b.parent)}}},vt=(f,h,m,S,b,v,C,_,E=0)=>{for(let y=E;y<f.length;y++){const A=f[y]=_?he(f[y]):re(f[y]);k(null,A,h,m,S,b,v,C,_)}},ge=(f,h,m,S,b,v,C)=>{const _=h.el=f.el;let{patchFlag:E,dynamicChildren:y,dirs:A}=h;E|=f.patchFlag&16;const T=f.props||Y,M=h.props||Y;let g;if(m&&Be(m,!1),(g=M.onVnodeBeforeUpdate)&&ne(g,m,h,f),A&&$e(h,f,m,"beforeUpdate"),m&&Be(m,!0),y&&(!f.dynamicChildren||f.dynamicChildren.length!==y.length)&&(E=0,C=!1,y=null),(T.innerHTML&&M.innerHTML==null||T.textContent&&M.textContent==null)&&c(_,""),y?Pt(f.dynamicChildren,y,_,m,S,Fi(h,b),v):C||V(f,h,_,null,m,S,Fi(h,b),v,!1),E>0){if(E&16)It(_,T,M,m,b);else if(E&2&&T.class!==M.class&&s(_,"class",null,M.class,b),E&4&&s(_,"style",T.style,M.style,b),E&8){const w=h.dynamicProps;for(let O=0;O<w.length;O++){const L=w[O],U=T[L],B=M[L];(B!==U||L==="value")&&s(_,L,U,B,b,m)}}E&1&&f.children!==h.children&&c(_,h.children)}else!C&&y==null&&It(_,T,M,m,b);((g=M.onVnodeUpdated)||A)&&mt(()=>{g&&ne(g,m,h,f),A&&$e(h,f,m,"updated")},S)},Pt=(f,h,m,S,b,v,C)=>{for(let _=0;_<h.length;_++){const E=f[_],y=h[_],A=E.el||kr(E),T=A&&(E.type===bt||!Ar(E,y)||E.shapeFlag&198)?d(A):m;k(E,y,T,null,S,b,v,C,!0)}},It=(f,h,m,S,b)=>{if(h!==m){if(h!==Y)for(const v in h)!dr(v)&&!(v in m)&&s(f,v,h[v],null,b,S);for(const v in m){if(dr(v))continue;const C=m[v],_=h[v];C!==_&&v!=="value"&&s(f,v,_,C,b,S)}"value"in m&&s(f,"value",h.value,m.value,b)}},me=(f,h,m,S,b,v,C,_,E)=>{const y=h.el=f?f.el:l(""),A=h.anchor=f?f.anchor:l("");let{patchFlag:T,dynamicChildren:M,slotScopeIds:g}=h;g&&(_=_?_.concat(g):g),f==null?(n(y,m,S),n(A,m,S),vt(h.children||[],m,A,b,v,C,_,E)):T>0&&T&64&&M&&f.dynamicChildren&&f.dynamicChildren.length===M.length?(Pt(f.dynamicChildren,M,m,b,v,C,_),(h.key!=null||b&&h===b.subTree)&&Il(f,h,!0)):V(f,h,m,A,b,v,C,_,E)},xt=(f,h,m,S,b,v,C,_,E)=>{h.slotScopeIds=_,f==null?h.shapeFlag&512?b.ctx.activate(h,m,S,C,E):ke(h,m,S,b,v,C,E):lt(f,h,E)},ke=(f,h,m,S,b,v,C)=>{const _=f.component=op(f,S,b);if(Li(f)&&(_.ctx.renderer=Lt),ap(_,!1,C),_.asyncDep){if(b&&b.registerDep(_,J,C,v),!f.el){const E=_.subTree=de(zt);z(null,E,h,m),f.placeholder=E.el}}else J(_,f,h,m,b,v,C)},lt=(f,h,m)=>{const S=h.component=f.component;if(jh(f,h,m))if(S.asyncDep&&!S.asyncResolved){h.el=f.el,h.placeholder=f.placeholder,K(S,h,m);return}else S.next=h,S.update();else h.el=f.el,h.placeholder=f.placeholder,S.vnode=h},J=(f,h,m,S,b,v,C)=>{const _=()=>{if(f.isMounted){let{next:T,bu:M,u:g,parent:w,vnode:O}=f;{const _t=Ll(f);if(_t){T&&(T.el=O.el,K(f,T,C)),_t.asyncDep.then(()=>{const Nt=()=>{f.job.flags&8||(b&&b.pendingBranch?mt(Nt,b):y())};Nt.flags=48,mt(Nt,b)});return}}let L=T,U;Be(f,!1),T?(T.el=O.el,K(f,T,C)):T=O,M&&en(M),(U=T.props&&T.props.onVnodeBeforeUpdate)&&ne(U,w,T,O),Be(f,!0);const B=vl(f),tt=f.subTree;f.subTree=B,k(tt,B,d(tt.el||kr(tt)),ye(tt),f,b,v),T.el=B.el,L===null&&Uh(f,B.el),g&&mt(g,b),(U=T.props&&T.props.onVnodeUpdated)&&mt(()=>ne(U,w,T,O),b)}else{let T;const{el:M,props:g}=h,{bm:w,m:O,parent:L,root:U,type:B}=f,tt=Er(h);Be(f,!1),w&&en(w),!tt&&(T=g&&g.onVnodeBeforeMount)&&ne(T,L,h),Be(f,!0);{U.ce&&U.ce._hasShadowRoot()&&U.ce._injectChildStyle(B,f.parent?f.parent.type:void 0);const _t=f.subTree=vl(f);k(null,_t,m,S,f,b,v),h.el=_t.el}if(O&&mt(O,b),!tt&&(T=g&&g.onVnodeMounted)){const _t=h;mt(()=>ne(T,L,_t),b)}(h.shapeFlag&256||L&&Er(L.vnode)&&L.vnode.shapeFlag&256)&&f.a&&mt(f.a,b),f.isMounted=!0,h=m=S=null}};f.scope.on();const E=f.effect=new Oo(_);f.scope.off();const y=f.update=E.run.bind(E),A=f.job=E.runIfDirty.bind(E);A.i=f,A.id=f.uid,E.scheduler=()=>Mi(A),Be(f,!0),y()},K=(f,h,m)=>{h.component=f;const S=f.vnode.props;f.vnode=h,f.next=null,zh(f,h.props,S,m),Kh(f,h.children,m),Ht(),el(f),jt()},V=(f,h,m,S,b,v,C,_,E=!1)=>{const y=f&&f.children,A=f?f.shapeFlag:0,T=h.children,{patchFlag:M,shapeFlag:g}=h;if(M>0){if(M&128){be(y,T,m,S,b,v,C,_,E);return}else if(M&256){at(y,T,m,S,b,v,C,_,E);return}}g&8?(A&16&&qt(y,b,v),T!==y&&c(m,T)):A&16?g&16?be(y,T,m,S,b,v,C,_,E):qt(y,b,v,!0):(A&8&&c(m,""),g&16&&vt(T,m,S,b,v,C,_,E))},at=(f,h,m,S,b,v,C,_,E)=>{f=f||Oe,h=h||Oe;const y=f.length,A=h.length,T=Math.min(y,A);let M;for(M=0;M<T;M++){const g=h[M]=E?he(h[M]):re(h[M]);k(f[M],g,m,null,b,v,C,_,E)}y>A?qt(f,b,v,!0,!1,T):vt(h,m,S,b,v,C,_,E,T)},be=(f,h,m,S,b,v,C,_,E)=>{let y=0;const A=h.length;let T=f.length-1,M=A-1;for(;y<=T&&y<=M;){const g=f[y],w=h[y]=E?he(h[y]):re(h[y]);if(Ar(g,w))k(g,w,m,null,b,v,C,_,E);else break;y++}for(;y<=T&&y<=M;){const g=f[T],w=h[M]=E?he(h[M]):re(h[M]);if(Ar(g,w))k(g,w,m,null,b,v,C,_,E);else break;T--,M--}if(y>T){if(y<=M){const g=M+1,w=g<A?h[g].el:S;for(;y<=M;)k(null,h[y]=E?he(h[y]):re(h[y]),m,w,b,v,C,_,E),y++}}else if(y>M)for(;y<=T;)rt(f[y],b,v,!0),y++;else{const g=y,w=y,O=new Map;for(y=w;y<=M;y++){const kt=h[y]=E?he(h[y]):re(h[y]);kt.key!=null&&O.set(kt.key,y)}let L,U=0;const B=M-w+1;let tt=!1,_t=0;const Nt=new Array(B);for(y=0;y<B;y++)Nt[y]=0;for(y=g;y<=T;y++){const kt=f[y];if(U>=B){rt(kt,b,v,!0);continue}let ie;if(kt.key!=null)ie=O.get(kt.key);else for(L=w;L<=M;L++)if(Nt[L-w]===0&&Ar(kt,h[L])){ie=L;break}ie===void 0?rt(kt,b,v,!0):(Nt[ie-w]=y+1,ie>=_t?_t=ie:tt=!0,k(kt,h[ie],m,null,b,v,C,_,E),U++)}const fa=tt?Jh(Nt):Oe;for(L=fa.length-1,y=B-1;y>=0;y--){const kt=w+y,ie=h[kt],da=h[kt+1],ha=kt+1<A?da.el||kr(da):S;Nt[y]===0?k(null,ie,m,ha,b,v,C,_,E):tt&&(L<0||y!==fa[L]?Tt(ie,m,ha,2):L--)}}},Tt=(f,h,m,S,b=null)=>{const{el:v,type:C,transition:_,children:E,shapeFlag:y}=f;if(y&6){Tt(f.component.subTree,h,m,S);return}if(y&128){f.suspense.move(h,m,S);return}if(y&64){C.move(f,h,m,Lt);return}if(C===bt){n(v,h,m);for(let T=0;T<E.length;T++)Tt(E[T],h,m,S);n(f.anchor,h,m);return}if(C===zi){F(f,h,m);return}if(S!==2&&y&1&&_)if(S===0)_.persisted&&!v[Pi]?n(v,h,m):(_.beforeEnter(v),n(v,h,m),mt(()=>_.enter(v),b));else{const{leave:T,delayLeave:M,afterLeave:g}=_,w=()=>{f.ctx.isUnmounted?i(v):n(v,h,m)},O=()=>{const L=v._isLeaving||!!v[Pi];v._isLeaving&&v[Pi](!0),_.persisted&&!L?w():T(v,()=>{w(),g&&g()})};M?M(v,w,O):O()}else n(v,h,m)},rt=(f,h,m,S=!1,b=!1)=>{const{type:v,props:C,ref:_,children:E,dynamicChildren:y,shapeFlag:A,patchFlag:T,dirs:M,cacheIndex:g,memo:w}=f;if((T===-2||y&&y.hasOnce)&&(b=!1),_!=null&&(Ht(),Sr(_,null,m,f,!0),jt()),g!=null&&(!f.ctx||f.ctx===h)&&(h.renderCache[g]=void 0),A&256&&h.ctx.deactivate(f))return;const O=A&1&&M,L=!Er(f);let U;if(L&&(U=C&&C.onVnodeBeforeUnmount)&&ne(U,h,f),A&6)rr(f.component,m,S);else{if(A&128){f.suspense.unmount(m,S);return}O&&$e(f,null,h,"beforeUnmount"),A&64?f.type.remove(f,h,m,Lt,S):y&&!y.hasOnce&&(v!==bt||T>0&&T&64)?qt(y,h,m,!1,!0):(v===bt&&T&384||!b&&A&16)&&qt(E,h,m),S&&nt(f)}const B=w!=null&&g==null;(L&&(U=C&&C.onVnodeUnmounted)||O||B)&&mt(()=>{U&&ne(U,h,f),O&&$e(f,null,h,"unmounted"),B&&(f.el=null)},m)},nt=f=>{const{type:h,el:m,anchor:S,transition:b}=f,v=h===bt;if(v&&!b){Fe(m,S);return}if(h===zi){I(f),b&&!b.persisted&&b.afterLeave&&b.afterLeave();return}const C=v?Ii(f):f,_=()=>{v?d(m)&&Fe(m,S):i(m),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(C&&C.shapeFlag&1&&b&&!b.persisted){const{leave:E,delayLeave:y}=b,A=C.el,T=()=>E(A,_);y?y(A,_,T):T()}else _()},Fe=(f,h)=>{let m;for(;f!==h;)m=p(f),i(f),f=m;i(h)},rr=(f,h,m)=>{const{bum:S,scope:b,job:v,subTree:C,um:_,m:E,a:y}=f;Nl(E),Nl(y),S&&en(S),b.stop(),v?(v.flags|=8,rt(C,f,h,m)):C&&(C.transition=f.vnode.transition,rt(C,f,h,m)),_&&mt(_,h);const A=()=>{f.isUnmounted=!0};A.flags=16,mt(A,h)},qt=(f,h,m,S=!1,b=!1,v=0)=>{for(let C=v;C<f.length;C++)rt(f[C],h,m,S,b)},ye=f=>{if(f.shapeFlag&6)return ye(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const h=p(f.anchor||f.el),m=h&&h[uh];return m?p(m):h},ze=(f,h,m)=>{const S=f&&h._vnode?void 0:f&&f.component?f.component.uid:sp();ih(()=>{f==null?h._vnode&&rt(h._vnode,null,null,!0):k(h._vnode||null,f,h,null,null,null,m),h._vnode=f},S)},Lt={p:k,um:rt,m:Tt,r:nt,mt:ke,mc:vt,pc:V,pbc:Pt,n:ye,o:t};return{render:ze,hydrate:void 0,createApp:Lh(ze)}}function Fi({type:t,props:e},r){return r==="svg"&&t==="foreignObject"||r==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:r}function Be({effect:t,job:e},r){r?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function Gh(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function Il(t,e,r=!1){const n=t.children,i=e.children;if($(n)&&$(i))for(let s=0;s<n.length;s++){const o=n[s];let l=i[s];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[s]=he(i[s]),l.el=o.el),!r&&l.patchFlag!==-2&&Il(o,l)),l.type===Sn&&(l.patchFlag===-1&&(l=i[s]=he(l)),l.el=o.el),l.type===zt&&!l.el&&(l.el=o.el)}}function Jh(t){const e=t.slice(),r=[0];let n,i,s,o,l;const a=t.length;for(n=0;n<a;n++){const u=t[n];if(u!==0){if(i=r[r.length-1],t[i]<u){e[n]=i,r.push(n);continue}for(s=0,o=r.length-1;s<o;)l=s+o>>1,t[r[l]]<u?s=l+1:o=l;u<t[r[s]]&&(s>0&&(e[n]=r[s-1]),r[s]=n)}}for(s=r.length,o=r[s-1];s-- >0;)r[s]=o,o=e[o];return r}function Ll(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Ll(e)}function Nl(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function kr(t){if(t.placeholder)return t.placeholder;const e=t.component;if(e)return kr(e.subTree);const r=t.suspense;return r&&r.activeBranch?kr(r.activeBranch):null}const $l=t=>t.__isSuspense,Qh=Symbol("_deferredEnter");function Zh(t,e){e&&e.pendingBranch?$(t)?e.effects.push(...t):e.effects.push(t):nh(t)}const bt=Symbol.for("v-fgt"),Sn=Symbol.for("v-txt"),zt=Symbol.for("v-cmt"),zi=Symbol.for("v-stc"),De=[];let Ct=null;function yt(t=!1){De.push(Ct=t?null:[])}function Bl(){De.pop(),Ct=De[De.length-1]||null}let Rr=1;function Dl(t,e=!1){Rr+=t,t<0&&Ct&&e&&(Ct.hasOnce=!0)}function Hl(t){return t.dynamicChildren=Rr>0?Ct||Oe:null,Bl(),Rr>0&&Ct&&Ct.push(t),t}function St(t,e,r,n,i,s){return Hl(D(t,e,r,n,i,s,!0))}function tp(t,e,r,n,i){return Hl(de(t,e,r,n,i,!0))}function qi(t){return t?t.__v_isVNode===!0:!1}function Ar(t,e){return t.type===e.type&&t.key===e.key}const jl=({key:t})=>t!=null?t:null,En=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?Z(t)||ft(t)||H(t)?{i:Ot,r:t,k:e,f:!!r}:t:null);function D(t,e=null,r=null,n=0,i=null,s=t===bt?0:1,o=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&jl(e),ref:e&&En(e),scopeId:il,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ot};return l?(_n(a,r),s&128&&t.normalize(a)):r&&(a.shapeFlag|=Z(r)?8:16),Rr>0&&!o&&Ct&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&Ct.push(a),a}const de=ep;function ep(t,e=null,r=null,n=0,i=null,s=!1){if((!t||t===Th)&&(t=zt),qi(t)){const l=tr(t,e,!0);return r&&_n(l,r),Rr>0&&!s&&Ct&&(l.shapeFlag&6?Ct[Ct.indexOf(t)]=l:Ct.push(l)),l.patchFlag=-2,l}if(gp(t)&&(t=t.__vccOpts),e){e=rp(e);let{class:l,style:a}=e;l&&!Z(l)&&(e.class=Xe(l)),X(a)&&(Ri(a)&&!$(a)&&(a=st({},a)),e.style=hi(a))}const o=Z(t)?1:$l(t)?128:bn(t)?64:X(t)?4:H(t)?2:0;return D(t,e,r,n,i,o,s,!0)}function rp(t){return t?Ri(t)?st({},t):Tl(t)?st({},t[Kl]||t):t:null}function tr(t,e,r=!1,n=!1){const{props:i,ref:s,patchFlag:o,children:l,transition:a}=t,u=e?np(i||{},e):i,c={__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&jl(u),ref:e&&e.ref?r&&s?$(s)?s.concat(En(e)):[s,En(e)]:En(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:l,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==bt?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:a,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&tr(t.ssContent),ssFallback:t.ssFallback&&tr(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce,cacheIndex:t.cacheIndex};return a&&n&&xr(c,a.clone(c)),c}function Ul(t=" ",e=0){return de(Sn,null,t,e)}function He(t="",e=!1){return e?(yt(),tp(zt,null,t)):de(zt,null,t)}function re(t){return t==null||typeof t=="boolean"?de(zt):$(t)?de(bt,null,t.slice()):qi(t)?he(t):de(Sn,null,String(t))}function he(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:tr(t)}function _n(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if($(e))r=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),_n(t,i()),i._c&&(i._d=!0));return}else{r=32;const i=e._;!i&&!Tl(e)?e._ctx=Ot:i===3&&Ot&&(Ot.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else if(H(e)){if(n&65){_n(t,{default:e});return}e={default:e,_ctx:Ot},r=32}else e=String(e),n&64?(r=16,e=[Ul(e)]):r=8;t.children=e,t.shapeFlag|=r}function np(...t){const e={};for(let r=0;r<t.length;r++){const n=t[r];for(const i in n)if(i==="class")e.class!==n.class&&(e.class=Xe([e.class,n.class]));else if(i==="style")e.style=hi([e.style,n.style]);else if(Qr(i)){const s=e[i],o=n[i];o&&s!==o&&!($(s)&&s.includes(o))?e[i]=s?[].concat(s,o):o:o==null&&s==null&&!Zr(i)&&(e[i]=o)}else i!==""&&(e[i]=n[i])}return e}function ne(t,e,r,n=null){Ut(t,e,7,[r,n])}const ip=yl();let Fl=0;function sp(){return Fl}function op(t,e,r){const n=t.type,i=(e?e.appContext:t.appContext)||ip,s={uid:Fl++,vnode:t,type:n,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ed(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Rl(n,i),emitsOptions:wl(n,i),emit:null,emitted:null,propsDefaults:Y,inheritAttrs:n.inheritAttrs,ctx:Y,data:Y,props:Y,attrs:Y,slots:Y,refs:Y,setupState:Y,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=e?e.root:s,s.emit=$h.bind(null,s),t.ce&&t.ce(s),s}let wt=null;const lp=()=>wt||Ot;let Cn,Mr;{const t=rn(),e=(r,n)=>{let i;return(i=t[r])||(i=t[r]=[]),i.push(n),s=>{i.length>1?i.forEach(o=>o(s)):i[0](s)}};Cn=e("__VUE_INSTANCE_SETTERS__",r=>wt=r),Mr=e("__VUE_SSR_SETTERS__",r=>Pr=r)}const Or=t=>{const e=wt;return Cn(t),t.scope.on(),()=>{t.scope.off(),Cn(e)}},zl=()=>{wt&&wt.scope.off(),Cn(null)};function ql(t){return t.vnode.shapeFlag&4}let Pr=!1;function ap(t,e=!1,r=!1){e&&Mr(e);const{props:n,children:i}=t.vnode,s=ql(t);Fh(t,n,s,e),Vh(t,i,r||e);const o=s?cp(t,e):void 0;return e&&Mr(!1),o}function cp(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,kh);const{setup:n}=r;if(n){Ht();const i=t.setupContext=n.length>1?fp(t):null,s=Or(t),o=Ge(n,t,0,[t.props,i]),l=vo(o);if(jt(),s(),(l||t.sp)&&!Er(t)&&al(t),l){if(o.then(zl,zl),e)return o.then(a=>{Mr(!0);try{Wl(t,a,e)}finally{Mr(!1)}}).catch(a=>{fn(a,t,0,void 0,!0),t.ssrRender=(u,c)=>c("<!---->")});t.asyncDep=o}else Wl(t,o)}else Vl(t)}function Wl(t,e,r){H(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:X(e)&&(t.setupState=Jo(e)),Vl(t)}function Vl(t,e,r){const n=t.type;t.render||(t.render=n.render||Yt);{const i=Or(t);Ht();try{Rh(t)}finally{jt(),i()}}}const Kl=Symbol(),up={get(t,e){return dt(t,"get",""),e===Kl?t:t[e]}};function fp(t){const e=r=>{t.exposed=r||{}};return{attrs:new Proxy(t.attrs,up),slots:t.slots,emit:t.emit,expose:e}}function Tn(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Jo(Fd(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in Cr)return Cr[r](t)},has(e,r){return r in e||r in Cr}})):t.proxy}const dp=/(?:^|[-_])\w/g,hp=t=>t.replace(dp,e=>e.toUpperCase()).replace(/[-_]/g,"");function pp(t,e=!0){return H(t)?t.displayName||t.name:t.name||e&&t.__name}function Xl(t,e,r=!1){let n=pp(e);if(!n&&e.__file){const i=e.__file.match(/([^/\\]+)\.\w+$/);i&&(n=i[1])}if(!n&&t){const i=s=>{for(const o in s)if(s[o]===e)return o};n=i(t.components)||t.parent&&i(t.parent.type.components)||i(t.appContext.components)}return n?hp(n):r?"App":"Anonymous"}function gp(t){return H(t)&&"__vccOpts"in t}const er=(t,e)=>Xd(t,e,Pr),mp="3.5.45";/**
|
|
503
|
+
* @vue/runtime-dom v3.5.45
|
|
504
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
505
|
+
* @license MIT
|
|
506
|
+
**/let Wi;const Yl=typeof window!="undefined"&&window.trustedTypes;if(Yl)try{Wi=Yl.createPolicy("vue",{createHTML:t=>t})}catch(t){}const Gl=Wi?t=>Wi.createHTML(t):t=>t,bp="http://www.w3.org/2000/svg",yp="http://www.w3.org/1998/Math/MathML",pe=typeof document!="undefined"?document:null,Jl=pe&&pe.createElement("template"),wp={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const i=e==="svg"?pe.createElementNS(bp,t):e==="mathml"?pe.createElementNS(yp,t):r?pe.createElement(t,{is:r}):pe.createElement(t);return t==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:t=>pe.createTextNode(t),createComment:t=>pe.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>pe.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,i,s){const o=r?r.previousSibling:e.lastChild;if(i&&(i===s||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),r),!(i===s||!(i=i.nextSibling)););else{Jl.innerHTML=Gl(n==="svg"?`<svg>${t}</svg>`:n==="mathml"?`<math>${t}</math>`:t);const l=Jl.content;if(n==="svg"||n==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}e.insertBefore(l,r)}return[o?o.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}},vp=Symbol("_vtc");function xp(t,e,r){const n=t[vp];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}const kn=Symbol("_vod"),Ql=Symbol("_vsh"),Zl={name:"show",beforeMount(t,{value:e},{transition:r}){t[kn]=t.style.display==="none"?"":t.style.display,r&&e?r.beforeEnter(t):Ir(t,e)},mounted(t,{value:e},{transition:r}){r&&e&&r.enter(t)},updated(t,{value:e,oldValue:r},{transition:n}){!e!=!r&&(n?e?(n.beforeEnter(t),Ir(t,!0),n.enter(t)):n.leave(t,()=>{Ir(t,!1)}):Ir(t,e))},beforeUnmount(t,{value:e}){Ir(t,e)}};function Ir(t,e){t.style.display=e?t[kn]:"none",t[Ql]=!e}const Sp=Symbol(""),Ep=/(?:^|;)\s*display\s*:/;function _p(t,e,r){const n=t.style,i=Z(r);let s=!1;if(r&&!i){if(e)if(Z(e))for(const o of e.split(";")){const l=o.slice(0,o.indexOf(":")).trim();r[l]==null&&Lr(n,l,"")}else for(const o in e)r[o]==null&&Lr(n,o,"");for(const o in r){o==="display"&&(s=!0);const l=r[o];l!=null?Tp(t,o,!Z(e)&&e?e[o]:void 0,l)||Lr(n,o,l):Lr(n,o,"")}}else if(i){if(e!==r){const o=n[Sp];o&&(r+=";"+o),n.cssText=r,s=Ep.test(r)}}else e&&t.removeAttribute("style");kn in t&&((!i||e!==r)&&(t[kn]=s?n.display:""),t[Ql]&&(n.display="none"))}const Rn=/\s*!important$/;function Lr(t,e,r){if($(r))r.forEach(n=>Lr(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))Rn.test(r)?t.setProperty(e,r.replace(Rn,""),"important"):t.setProperty(e,r);else{const n=Cp(t,e);Rn.test(r)?t.setProperty(Ie(n),r.replace(Rn,""),"important"):t[n]=r}}const ta=["Webkit","Moz","ms"],Vi={};function Cp(t,e){const r=Vi[e];if(r)return r;let n=Bt(e);if(n!=="filter"&&n in t)return Vi[e]=n;n=Eo(n);for(let i=0;i<ta.length;i++){const s=ta[i]+n;if(s in t)return Vi[e]=s}return e}function Tp(t,e,r,n){return t.tagName==="TEXTAREA"&&(e==="width"||e==="height")&&Z(n)&&r===n}const ea="http://www.w3.org/1999/xlink";function ra(t,e,r,n,i,s=wd(e)){n&&e.startsWith("xlink:")?r==null?t.removeAttributeNS(ea,e.slice(6,e.length)):t.setAttributeNS(ea,e,r):r==null||s&&!To(r)?t.removeAttribute(e):t.setAttribute(e,s?"":Gt(r)?String(r):r)}function na(t,e,r,n,i){if(e==="innerHTML"||e==="textContent"){r!=null&&(t[e]=e==="innerHTML"?Gl(r):r);return}const s=t.tagName;if(e==="value"&&s!=="PROGRESS"&&!s.includes("-")){const l=s==="OPTION"?t.getAttribute("value")||"":t.value,a=r==null?t.type==="checkbox"?"on":"":String(r);(l!==a||!("_value"in t))&&(t.value=a),r==null&&t.removeAttribute(e),t._value=r;return}let o=!1;if(r===""||r==null){const l=typeof t[e];l==="boolean"?r=To(r):r==null&&l==="string"?(r="",o=!0):l==="number"&&(r=0,o=!0)}try{t[e]=r}catch(l){}o&&t.removeAttribute(i||e)}function je(t,e,r,n){t.addEventListener(e,r,n)}function kp(t,e,r,n){t.removeEventListener(e,r,n)}const ia=Symbol("_vei");function Rp(t,e,r,n,i=null){const s=t[ia]||(t[ia]={}),o=s[e];if(n&&o)o.value=n;else{const[l,a]=Op(e);if(n){const u=s[e]=Lp(n,i);je(t,l,u,a)}else o&&(kp(t,l,o,a),s[e]=void 0)}}const Ap=/(Once|Passive|Capture)$/,Mp=/^on:?(?:Once|Passive|Capture)$/;function Op(t){let e,r;for(;(r=t.match(Ap))&&!Mp.test(t);)e||(e={}),t=t.slice(0,t.length-r[1].length),e[r[1].toLowerCase()]=!0;return[t[2]===":"?t.slice(3):Ie(t.slice(2)),e]}let Ki=0;const Pp=Promise.resolve(),Ip=()=>Ki||(Pp.then(()=>Ki=0),Ki=Date.now());function Lp(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;const i=r.value;if($(i)){const s=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{s.call(n),n._stopped=!0};const o=i.slice(),l=[n];for(let a=0;a<o.length&&!n._stopped;a++){const u=o[a];u&&Ut(u,e,5,l)}}else Ut(i,e,5,[n])};return r.value=t,r.attached=Ip(),r}const sa=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,Np=(t,e,r,n,i,s)=>{const o=i==="svg";e==="class"?xp(t,n,o):e==="style"?_p(t,r,n):Qr(e)?Zr(e)||Rp(t,e,r,n,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):$p(t,e,n,o))?(na(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&ra(t,e,n,o,s,e!=="value")):t._isVueCE&&(Bp(t,e)||t._def.__asyncLoader&&(/[A-Z]/.test(e)||!Z(n)))?na(t,Bt(e),n,s,e):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),ra(t,e,n,o))};function $p(t,e,r,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&sa(e)&&H(r));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=t.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return sa(e)&&Z(r)?!1:e in t}function Bp(t,e){const r=t._def.props;if(!r)return!1;const n=Bt(e);return Array.isArray(r)?r.some(i=>Bt(i)===n):Object.keys(r).some(i=>Bt(i)===n)}const An=t=>{const e=t.props["onUpdate:modelValue"]||!1;return $(e)?r=>en(e,r):e};function Dp(t){t.target.composing=!0}function oa(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Ue=Symbol("_assign"),Mn=Symbol("_initialValue");function Xi(t,e,r){return e&&(t=t.trim()),r&&(t=hr(t)),t}const la={created(t,{modifiers:{lazy:e,trim:r,number:n}},i){t.parentNode&&(t.type==="text"?t[Mn]=t.defaultValue.replace(/[\r\n]/g,""):t.type==="textarea"&&(t[Mn]=t.defaultValue.replace(/\r\n?/g,`
|
|
507
|
+
`))),t[Ue]=An(i);const s=n||i.props&&i.props.type==="number";je(t,e?"change":"input",o=>{o.target.composing||t[Ue](Xi(t.value,r,s))}),(r||s)&&je(t,"change",()=>{t.value=Xi(t.value,r,s)}),e||(je(t,"compositionstart",Dp),je(t,"compositionend",oa),je(t,"change",oa))},mounted(t,{value:e,modifiers:{trim:r,number:n}}){const i=e==null?"":e,s=t[Mn];delete t[Mn],s!==void 0&&(t.type==="text"||t.type==="textarea")&&t.value!==s?t[Ue](Xi(t.value,r,n)):t.value=i},beforeUpdate(t,{value:e,oldValue:r,modifiers:{lazy:n,trim:i,number:s}},o){if(t[Ue]=An(o),t.composing)return;const l=(s||t.type==="number")&&!/^0\d/.test(t.value)?hr(t.value):t.value,a=e==null?"":e;if(l===a)return;const u=t.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===t&&t.type!=="range"&&(n&&e===r||i&&t.value.trim()===a)||(t.value=a)}},aa={deep:!0,created(t,{value:e,modifiers:{number:r}},n){t._modelValue=e,je(t,"change",()=>{const i=Array.prototype.filter.call(t.options,a=>a.selected).map(a=>r?hr(On(a)):On(a)),s=t.multiple,o=s?Pe(t._modelValue)?new Set(i):i:i[0],l=t._pendingValue=[s,s?$(o)?i.slice():i:o];try{t[Ue](o)}finally{hn(()=>{t._pendingValue===l&&(t._pendingValue=void 0)})}}),t[Ue]=An(n)},mounted(t,{value:e,modifiers:{number:r}}){ca(t,e,r)},beforeUpdate(t,{value:e},r){t._modelValue=e,t[Ue]=An(r)},updated(t,{value:e,modifiers:{number:r}}){const n=t._pendingValue;t._pendingValue=void 0,(!n||n[0]!==t.multiple||!Hp(e,n[1],n[0]))&&ca(t,e,r)}};function Hp(t,e,r){if(!r||$(t))return Ee(t,e);if(Pe(t)){if(t.size!==e.length)return!1;for(const n of e)if(!t.has(n))return!1;return!0}return!1}function ca(t,e,r=!1){const n=t.multiple,i=$(e);if(!(n&&!i&&!Pe(e))){for(let s=0,o=t.options.length;s<o;s++){const l=t.options[s],a=On(l);if(n)if(i){const u=typeof a;u==="string"||u==="number"?l.selected=e.some(c=>String(c)===String(a)):l.selected=Sd(e,a)>-1}else l.selected=e.has(a)||r&&typeof a=="string"&&e.has(hr(a));else if(Ee(On(l),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function On(t){return"_value"in t?t._value:t.value}const jp=st({patchProp:Np},wp);let ua;function Up(){return ua||(ua=Xh(jp))}const Fp=((...t)=>{const e=Up().createApp(...t),{mount:r}=e;return e.mount=n=>{const i=qp(n);if(!i)return;const s=e._component;!H(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const o=r(i,!1,zp(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},e});function zp(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function qp(t){return Z(t)?document.querySelector(t):t}const Wp={class:"br-body"},Vp={class:"br-form"},Kp={class:"br-field"},Xp={key:0,class:"br-hint"},Yp={key:1,class:"br-attach-row"},Gp=["disabled"],Jp=["disabled"],Qp={key:2,class:"br-thumb-list"},Zp={key:0,class:"br-thumb"},tg=["src"],eg=["src"],rg=["onClick"],ng={class:"br-row"},ig={class:"br-field"},sg=["value"],og={class:"br-field"},lg=["value"],ag={class:"br-field"},cg={class:"br-field"},ug={class:"br-element-box"},fg={class:"br-shot-actions"},dg=["disabled"],hg={key:0,class:"br-element-list"},pg=["title"],gg=["aria-label","onClick"],mg={key:0,class:"br-success"},bg={class:"br-success-title"},yg={class:"br-hint"},wg={class:"br-footer"},vg=["disabled"],xg=["disabled"],Sg=["disabled"],Eg=dh({__name:"panel",props:{callbacks:{}},setup(t,{expose:e}){const r=t,n=ot(!1),i=ot(!1),s=ot("form"),o=ot(""),l=ot(""),a=ot("normal"),u=ot(""),c=ot([]),d=ot(null),p=ot([]);let x=0;const R=ot(""),k=ot(!1),N=ot(0),z=er(()=>N.value>0),j=ot(null),F=ot(!1);let I=!1;const Q=ot(null),Et=ot(null),ht=ot(null);let vt=null;const ge=[["","请选择"],["functional","功能异常"],["style","样式问题"],["data","数据问题"],["performance","性能问题"],["suggestion","使用建议"],["other","其他"]],Pt=[["normal","一般"],["serious","严重"],["fatal","致命"]],It=er(()=>i.value||z.value),me=er(()=>It.value||J.value),xt=er(()=>r.callbacks.canUploadScreenshot!==!1),ke=er(()=>{const g=p.value.map(w=>w.shot);return d.value&&g.unshift(d.value),g});let lt=null;const J=ot(!1);function K(){hn(()=>{var g;try{(g=Q.value)==null||g.focus()}catch(w){}})}function V(g=!0){!i.value&&(I||s.value==="success")&&rt(),n.value||(vt=document.activeElement||null),n.value=!0,g&&xt.value&&Fe(),K()}function at(){var g,w;n.value&&(n.value=!1,d.value=null,lt=null,J.value=!1,I?(I=!1,rt()):i.value||Tt(),be(),(w=(g=r.callbacks).onClose)==null||w.call(g))}function be(){const g=vt;vt=null,!(!g||!g.isConnected)&&hn(()=>{try{g.focus()}catch(w){}})}function Tt(){s.value="form",i.value=!1,nt("",!1)}function rt(){o.value="",l.value="",a.value="normal",u.value="",c.value=[],d.value=null,lt=null,J.value=!1,p.value=[],N.value=0,R.value="",k.value=!1,I=!1,s.value="form",K()}function nt(g,w){R.value=g,k.value=w}function Fe(){if(lt)return;const g=r.callbacks.onCapture().then(w=>{g!==lt||!n.value||(d.value=w)}).catch(()=>{}).finally(()=>{g===lt&&(lt=null)});lt=g}function rr(){if(J.value||i.value)return;J.value=!0,nt("正在截图…",!1);const g=r.callbacks.onCapture().then(w=>{g!==lt||!n.value||(d.value=w,k.value||nt("截图已更新",!1))}).catch(w=>{nt(`截图失败:${oe(w)}`,!0)}).finally(()=>{g===lt&&(lt=null),J.value=!1});lt=g}function qt(g){return g.dataBase64?`data:${g.mime};base64,${g.dataBase64}`:g.url||""}function ye(g){x+=1,p.value=[...p.value,{id:x,shot:g,preview:qt(g)}]}function ze(g){p.value=p.value.filter(w=>w.id!==g)}function Lt(g){N.value+=1,nt(`上传中(${N.value})…`,!1),r.callbacks.onUpload(g).then(w=>{ye(w)}).catch(w=>{nt(`图片处理失败:${oe(w)}`,!0)}).finally(()=>{N.value=Math.max(0,N.value-1),N.value===0&&!k.value&&nt("",!1)})}function Nr(g){var O;if(!xt.value)return;const w=(O=g.dataTransfer)==null?void 0:O.types;!w||!Array.from(w).includes("Files")||(g.preventDefault(),g.dataTransfer.dropEffect="copy")}function f(g){var L;if(!xt.value)return;const w=Array.from(((L=g.dataTransfer)==null?void 0:L.files)||[]);if(g.preventDefault(),w.length===0)return;const O=w.filter(U=>U.type.startsWith("image/"));if(O.length===0){nt("只支持图片文件",!0);return}O.forEach(U=>Lt(U))}function h(){var g;xt.value&&((g=Et.value)==null||g.click())}function m(g){const w=g.target,O=Array.from(w.files||[]);w.value="",O.forEach(L=>Lt(L))}function S(g){var L;if(!xt.value)return;const w=(L=g.clipboardData)==null?void 0:L.items;if(!w)return;const O=[];for(const U of Array.from(w))if(U.kind==="file"&&U.type.startsWith("image/")){const B=U.getAsFile();B&&O.push(B)}O.length!==0&&(g.preventDefault(),O.forEach(U=>Lt(U)))}function b(){i.value||(F.value=!0,r.callbacks.onPickElement().then(g=>{g&&v(g)}).catch(g=>{nt(`元素拾取失败:${oe(g)}`,!0)}).finally(()=>{F.value=!1}))}function v(g){var O;if(c.value.some(L=>L.selector===g.selector))return;const w=(O=r.callbacks.maxElements)!=null?O:5;if(c.value.length>=w){nt(`最多关联 ${w} 个元素,请先移除一个`,!0);return}c.value=[...c.value,g]}function C(g){c.value=c.value.filter((w,O)=>O!==g)}function _(){return o.value.trim()?"":"请填写问题描述"}function E(g=3e3){const w=lt;if(!w)return Promise.resolve();let O=0;const L=new Promise(U=>{O=window.setTimeout(U,g)});return Promise.race([w,L]).finally(()=>{O&&clearTimeout(O)})}function y(){if(i.value||z.value)return;const g=_();if(g){nt(g,!0);return}const w=o.value.trim(),O={title:Rs(w),description:w,category:l.value||void 0,severity:a.value||void 0,contact:u.value.trim()||void 0};i.value=!0,nt("提交中…",!1),E().then(()=>r.callbacks.onSubmit(O,ke.value,c.value.slice())).then(L=>{if(i.value=!1,nt("",!1),!n.value){rt();return}j.value=L,s.value="success",I=!0}).catch(L=>{nt(oe(L),!0),i.value=!1})}function A(){var g,w;i.value||(at(),(w=(g=r.callbacks).onDisable)==null||w.call(g))}function T(g){g.target===g.currentTarget&&at()}function M(g){if(!n.value)return;if(g.key==="Escape"){g.stopPropagation(),at();return}if(g.key!=="Tab"||F.value)return;const w=ht.value;if(!w)return;const O=Array.from(w.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(tt=>tt.offsetParent!==null);if(O.length===0)return;const L=O[0],U=O[O.length-1];if(!L||!U)return;const B=document.activeElement;g.shiftKey&&B===L?(g.preventDefault(),U.focus()):!g.shiftKey&&B===U&&(g.preventDefault(),L.focus())}return mn(n,g=>{g?document.addEventListener("keydown",M,!0):document.removeEventListener("keydown",M,!0)}),e({show:V,hide:at,resetForm:rt,resetView:Tt}),(g,w)=>{var O,L,U;return yt(),St("div",{class:Xe(["br-overlay",{"br-overlay--open":n.value,"br-overlay--hidden":F.value}]),onClick:T},[D("div",{ref_key:"panelEl",ref:ht,class:Xe(["br-panel",{"br-panel--open":n.value,"br-panel--hidden":F.value}]),role:"dialog","aria-modal":"true","aria-labelledby":"br-heading"},[D("div",{class:"br-header"},[w[4]||(w[4]=D("h2",{id:"br-heading",class:"br-heading"},"反馈问题",-1)),D("button",{class:"br-close",type:"button","aria-label":"关闭",onClick:at},"×")]),D("div",Wp,[Qe(D("div",Vp,[D("div",Kp,[w[6]||(w[6]=D("label",{class:"br-label"},[Ul("问题描述"),D("span",{class:"br-required"},"*")],-1)),Qe(D("textarea",{ref_key:"descriptionEl",ref:Q,"onUpdate:modelValue":w[0]||(w[0]=B=>o.value=B),class:"br-textarea",maxlength:"5000",placeholder:"描述一下现象,比如点了哪个按钮没反应(可直接粘贴或拖入截图)",onPaste:S,onDragover:Nr,onDrop:f},null,544),[[la,o.value]]),z.value?(yt(),St("div",Xp,"图片处理中…")):He("",!0),xt.value?(yt(),St("div",Yp,[D("button",{class:"br-btn--link-inline",type:"button",disabled:me.value,onClick:rr},Qt(J.value?"截图中…":"+ 重新截图"),9,Gp),D("button",{class:"br-btn--link-inline",type:"button",disabled:It.value,onClick:h}," + 上传图片 ",8,Jp),D("input",{ref_key:"imageInputEl",ref:Et,type:"file",accept:"image/*",multiple:"",class:"br-hidden",onChange:m},null,544)])):He("",!0),xt.value&&(p.value.length>0||d.value)?(yt(),St("div",Qp,[d.value?(yt(),St("div",Zp,[D("img",{src:qt(d.value),alt:"自动截图预览"},null,8,tg),w[5]||(w[5]=D("span",{class:"br-thumb-tag"},"自动",-1))])):He("",!0),(yt(!0),St(bt,null,wn(p.value,B=>(yt(),St("div",{key:B.id,class:"br-thumb"},[D("img",{src:B.preview,alt:""},null,8,eg),D("button",{class:"br-thumb-del",type:"button",title:"移除图片","aria-label":"移除图片",onClick:tt=>ze(B.id)}," × ",8,rg)]))),128))])):He("",!0)]),D("div",ng,[D("div",ig,[w[7]||(w[7]=D("label",{class:"br-label"},"问题分类",-1)),Qe(D("select",{"onUpdate:modelValue":w[1]||(w[1]=B=>l.value=B),class:"br-select"},[(yt(),St(bt,null,wn(ge,([B,tt])=>D("option",{key:B||"empty",value:B},Qt(tt),9,sg)),64))],512),[[aa,l.value]])]),D("div",og,[w[8]||(w[8]=D("label",{class:"br-label"},"严重程度",-1)),Qe(D("select",{"onUpdate:modelValue":w[2]||(w[2]=B=>a.value=B),class:"br-select"},[(yt(),St(bt,null,wn(Pt,([B,tt])=>D("option",{key:B,value:B},Qt(tt),9,lg)),64))],512),[[aa,a.value]])])]),D("div",ag,[w[9]||(w[9]=D("label",{class:"br-label"},"联系方式",-1)),Qe(D("input",{"onUpdate:modelValue":w[3]||(w[3]=B=>u.value=B),class:"br-input",type:"text",maxlength:"200",placeholder:"选填,便于开发同学联系你"},null,512),[[la,u.value]])]),D("div",cg,[w[10]||(w[10]=D("div",{class:"br-label"},"关联元素(选填)",-1)),D("div",ug,[D("div",fg,[D("button",{class:"br-btn br-btn--sm",type:"button",disabled:It.value,onClick:b}," 选择页面元素 ",8,dg)]),c.value.length>0?(yt(),St("div",hg,[(yt(!0),St(bt,null,wn(c.value,(B,tt)=>(yt(),St("div",{key:B.selector,class:"br-element-item"},[D("div",{class:"br-element-item-text",title:B.selector}," <"+Qt(B.tag)+"> "+Qt(B.selector),9,pg),D("button",{class:"br-element-item-del",type:"button",title:"移除该元素","aria-label":`移除元素 ${B.selector}`,onClick:_t=>C(tt)}," × ",8,gg)]))),128))])):He("",!0)])])],512),[[Zl,s.value==="form"]]),s.value==="success"?(yt(),St("div",mg,[D("div",bg,Qt((O=j.value)!=null&&O.queued?"已保存":"提交成功"),1),D("div",yg,Qt(((L=j.value)==null?void 0:L.message)||((U=j.value)!=null&&U.reportId?`反馈编号:${j.value.reportId}`:"后端已收到你的反馈")),1),D("div",{class:"br-success-actions"},[D("button",{class:"br-btn",type:"button",onClick:rt},"继续反馈"),D("button",{class:"br-btn br-btn--primary",type:"button",onClick:at},"完成")])])):He("",!0)]),Qe(D("div",wg,[t.callbacks.onDisable?(yt(),St("button",{key:0,class:"br-btn--link",type:"button",title:"隐藏右下角的反馈按钮",disabled:i.value,onClick:A}," 不再显示 ",8,vg)):He("",!0),D("span",{class:Xe(["br-status",{"br-status--error":k.value}]),"aria-live":"polite"},Qt(R.value),3),w[11]||(w[11]=D("span",{class:"br-spacer"},null,-1)),D("button",{class:"br-btn br-btn--ghost",type:"button",disabled:i.value,onClick:at},"取消",8,xg),D("button",{class:"br-btn br-btn--primary",type:"button",disabled:i.value,onClick:y},Qt(i.value?"提交中…":"提交"),9,Sg)],512),[[Zl,s.value==="form"]])],2)],2)}}});class _g{constructor(e){this.overlay=document.createElement("div"),this.overlay.className="br-panel-mount",this.app=Fp(Eg,{callbacks:e});const r=this.app.mount(this.overlay);this.api=r}open(e=!0){this.api.show(e)}close(){this.api.hide()}unmount(){try{this.app.unmount()}catch(e){}}}const Cg=Object.freeze(Object.defineProperty({__proto__:null,ReporterPanel:_g},Symbol.toStringTag,{value:"Module"}));return Wt.BugTap=si,Wt.createClient=mo,Wt.createVuePlugin=ii,Wt.init=li,Wt.installVueErrorHandler=fo,Wt.reactErrorHandlers=ho,Wt.version=go,Wt.vuePlugin=od,Object.defineProperty(Wt,Symbol.toStringTag,{value:"Module"}),Wt})({});
|
|
508
|
+
//# sourceMappingURL=bug-tap.min.js.map
|