var N=Object.defineProperty;var Q=(o,t,e)=>t in o?N(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var h=(o,t,e)=>Q(o,typeof t!="symbol"?t+"":t,e);import{M as S}from"./element-ui-U-9Cc6FF.js";import{aQ as U,bN as A,bO as x,bP as R,V as _,bQ as m,b3 as H,a3 as V,aR as L,bR as f,bS as W,bT as z}from"./vendor-B3imQjJj.js";import{e as g}from"./byted-tea-sdk-73SGiSNt.js";import{_ as G,dA as E,dB as X,a7 as $,w as d,dC as J,dD as j}from"./common-qPHVVqEj.js";function K(o){return typeof o=="function"}function k(o){if(K(o))return new Promise((t,e)=>{const r=o(t,e);A(r)?r.then(t,e):r&&A(r.component)&&t(r.component)}).catch(()=>{})}function D(o){typeof requestIdleCallback=="function"?requestIdleCallback(o):setTimeout(()=>{o()},0)}function O(o,t){const{resolved:e}=o.resolve(t);return[...e.matched].reverse().map(r=>r.components.default)}function q(o,t){var e;(e=navigator.connection)!=null&&e.saveData||D(()=>{O(o,t).forEach(r=>{k(r)})})}function Y(o,t){var e;if(!((e=navigator.connection)!=null&&e.saveData))return Promise.all(O(o,t).map(r=>k(r)))}function be(){const o=U();return function(t){o&&t&&q(o,t)}}function Z(o){if(o)return o.closest("a")}function ee(o,t){var s,n;const e=Z(t.target);if(!e||e.dataset.preloadable)return;let r=(s=e.__vue__)==null?void 0:s.to;if(!r){const a=(n=o.options.base)!=null?n:"/",i=new URL(a.endsWith("/")?a:a+"/",window.location.href).href;e.href.startsWith(i)&&(r="/"+e.href.slice(i.length))}r&&q(o,r)}const y=new WeakMap,we={bind(o,t,e){var s;const r=(s=e.context)==null?void 0:s.$router;if(r){const n=a=>{ee(r,a)};y.set(o,n),o.addEventListener("mouseover",n)}},unbind(o){const t=y.get(o);t&&(o.removeEventListener("mouseover",t),y.delete(o))}};class te{constructor(){h(this,"installed",!1);h(this,"lock",Promise.withResolvers());h(this,"preloadRouteTopxInfo",{});h(this,"fromRoute");h(this,"queue",new x({concurrency:1}))}install(){D(async()=>{try{if(this.installed)return;this.preloadRouteTopxInfo=(await G(async()=>{const{default:t}=await import("./preload-route-topx-DpSsSfGo.js");return{default:t}},[],import.meta.url)).default,this.installed=!0,this.lock.resolve(!0)}catch(t){E("captureException",t)}})}async prefetchTopXRouteResource(t,e){this.installed||this.install(),this.fromRoute=t,await this.lock.promise;const r=this.fromRoute;if(!r.name)return;const s=this.preloadRouteTopxInfo[r.name];s&&s.forEach(n=>{this.queue.add(async()=>{await Y(e,{name:n})})})}clear(){this.queue.clear()}}const P=new te;window.autoPreloadRouteManager=P;class oe{constructor(){h(this,"from",null);h(this,"to",null);h(this,"startTime",0)}send(t,e){E("sendCustomPerfMetric",{name:"each_route_time",value:t,isCustom:!0,type:"spa",extra:e})}isSameRoute(t,e){return(t==null?void 0:t.name)===(e==null?void 0:e.name)&&(t==null?void 0:t.path)===(e==null?void 0:e.path)}isFirstRoute(t){return t.name===null}start(t,e){this.isSameRoute(this.from,e)&&this.isSameRoute(this.to,t)||(this.from=e,this.to=t,this.startTime=Date.now())}end(t,e){if(this.isSameRoute(this.from,e)&&this.isSameRoute(this.to,t)&&this.startTime>0){const r=Date.now();this.send(r-this.startTime,{from:e.name||"",to:t.name||"",from_path:e.path||"",to_path:t.path||"",is_first:this.isFirstRoute(e)?"1":"0"})}this.startTime=0}}const M=o=>{try{o()}catch(t){E("captureException",t)}},ne=o=>{const t=new oe;o.beforeEach((e,r,s)=>{M(()=>{t.start(e,r)}),s()}),o.afterEach((e,r)=>{M(()=>{t.end(e,r)})})};function re(o){return"".concat(o," - 巨量星图")}R.configure({showSpinner:!1});_.use(m);function ge(o){var t;return Array.isArray(o)?(t=z(o,e=>typeof e=="string"))!=null?t:o[0]:o}const ie=(o,t)=>(typeof o=="function"&&(o=o(t)),o&&H()?(location.replace(o),!0):!1);function ye(o){var s;let t=(s=o.base)!=null?s:"/";const e=new m({mode:"history",base:t,routes:o.routes,scrollBehavior(n,a,i){var c;if(!((c=o.scrollWhiteList)!=null&&c.includes(n.name)))return i||{x:0,y:0,behavior:"smooth"}}});ne(e),e.beforeEach((n,a,i)=>{try{P.clear()}finally{i()}}),e.afterEach(n=>{P.prefetchTopXRouteResource(n,e)}),e.beforeEach((n,a,i)=>{var u;ie((u=n.meta.mobile)!=null?u:o.mobile,n)||(g.resetStayParams(window.location.pathname,a.name,window.location.href),i())}),e.beforeEach((n,a,i)=>{X(),i()}),e.beforeEach(async(n,a,i)=>{var I,v,C;const c=window.location.href.includes("www.xingtu.cn/ad")||window.location.href.includes("www-boe.xingtu.cn/ad"),u=window.location.href.includes("www.xingtu.cn/sup")||window.location.href.includes("www-boe.xingtu.cn/sup"),l=window.location.href.includes("www.xingtu.cn/mcn")||window.location.href.includes("www-boe.xingtu.cn/mcn");let p=n.meta.role;u&&!p&&n.name!=="no-role"&&(p=$.PAGE_CREATOR_DEFAULT);const F=["publish-reconstruct","publish-purpose","publish-form"].some(b=>{var w;return(w=n.name)==null?void 0:w.includes(b)});if(c&&(V((I=d())==null?void 0:I.hasRoleToPublish)&&await d().fetchAdHasRoleGoPublish().catch(()=>{}),!((v=d())!=null&&v.hasRoleToPublish)&&F))if(!a.name)i({name:"no-role"});else{S({title:"暂无权限",message:"您的巨量星图平台代理商合作协议尚未生效，暂时无法发布任务。如有疑问，请咨询渠道销售。",confirmButtonText:"知道了",showClose:!1,showCancelButton:!1});return}if(!(c||u||l)||!p)i();else{L(d().ocPermissionInfo)&&(c||u)&&await d().getOccanenginePermissionInfo().catch(()=>{}),L(d().ocPermissionInfo)&&l&&await d().getOceanenginePermissionInfo().catch(()=>{});const{is_authorized:b={},is_owner:w}=(C=d().ocPermissionInfo)!=null?C:{};b!=null&&b[p]||w?i():a.name?S({dangerouslyUseHTMLString:!0,message:'<span>你的角色暂无权限浏览此模块，如有需要请联系你的管理员开通，详见<a href="/help-center/demander/139245" target="_blank">操作手册</a></span>',title:"暂无权限",showClose:!1,showCancelButton:!1}):i({name:"no-role"})}}),e.afterEach(n=>{const a=typeof n.meta.bid=="function"?n.meta.bid(n):n.meta.bid;J(window.location.pathname,a),f.pageInit(),n.meta.frontSource&&j("front_source",n.meta.frontSource)}),e.beforeEach((n,a,i)=>{var u;let c=(u=o.theme)!=null?u:[];Array.isArray(n.meta.theme)&&(c=n.meta.theme.map(l=>typeof l=="function"?l(n,a):l).filter(Boolean)),W(c),i()}),e.beforeEach((n,a,i)=>{a.name&&g.resetStayDuration();const{path:c,fullPath:u,meta:l}=n,p=location.origin+t+u;g.resetStayParams(t+c,l==null?void 0:l.title,p),i()}),e.beforeEach((n,a,i)=>{var u;if(!n.matched.length){i();return}const{components:{default:c}}=n.matched[n.matched.length-1];((u=n.meta)==null?void 0:u.loading)!==!1&&typeof c=="function"&&R.start(),i()}),e.afterEach(()=>{R.done()}),e.onError(n=>{_.config.errorHandler?_.config.errorHandler.call(null,n,e.app,"vue-router navigation"):console.error(n)});const r=document.title;return e.beforeEach((n,a,i)=>{const c=n.meta.title;document.title=c?re(c):r,i()}),e}function Re(o){return o}function B(o){return function(...[t,e,r]){const s=this;let n=r;r&&(n=i=>{m.isNavigationFailure(i)||r(i)});const a=o.call(this,t,e,n);return a&&typeof a.then=="function"?a.then(void 0,i=>{if(m.isNavigationFailure(i))return s.history.pending;throw i}):a}}function ae(o){return typeof o=="string"?{path:o}:o}function se(o,t,e=!1){try{const{btm:r}=f.getFullBtmInfo(o),s=e?f.btmInfo.btm_ppre:f.btmInfo.btm_pre,n=e?f.btmInfo.btm_pre:r,a=e?f.btmInfo.btm_pre_show_id:f.btmInfo.btm_show_id,i={btm_ppre:s||"a0.b0.c0.d0",btm_pre:n||"a0.b0.c0.d0",btm_show_id:a};return(t||f.unitParams)&&(i.btm_pre_unit_params=encodeURIComponent(JSON.stringify(t!=null?t:f.unitParams))),i}catch(r){return{}}finally{f.unitParams=null}}function T(o){return function(...t){const e=ae(t[0]);return e.target&&(e.query={...e.query,...se(e.target,e.unitParams)}),t[0]=e,o.call(this,...t)}}const ce=m.prototype.push;m.prototype.push=B(T(ce));const ue=m.prototype.replace;m.prototype.replace=B(T(ue));const le=m.prototype.resolve;m.prototype.resolve=T(le);export{ge as a,re as b,ye as c,Re as d,ae as n,q as p,ie as r,be as u,we as v};
