import{Y as P,ac as N,ad as E,r as S,d as v,S as T,u as x}from"./CHwfdtDo.js";const B="$s";function d(...c){const w=typeof c[c.length-1]=="string"?c.pop():void 0;typeof c[0]!="string"&&c.unshift(w);const[l,g]=c;if(!l||typeof l!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+l);if(g!==void 0&&typeof g!="function")throw new Error("[nuxt] [useState] init must be a function: "+g);const u=B+l,m=P(),n=N(m.payload.state,u);if(n.value===void 0&&g){const t=g();if(E(t))return m.payload.state[u]=t,t;n.value=t}return n}const y=S([]),b=S(!1);function D(){const c=()=>document.body.offsetWidth<=768,w=()=>{const n=v(),t=T(),r=n.path||"/";n.query;const e=r.split("/").filter(a=>a!=="");let o="首页",i="";for(let a=0;ap.path===i);if(!s||s.path==="/expird")continue;if(e[a]==="poster-list"){const f=d("posterListBreadcrumbTitle",()=>"").value||s.meta?.pageName||s.meta?.name||"海报列表";o+="/"+f;continue}if(e[a]==="poster-detail"){const f=d("posterDetailBreadcrumbTitle",()=>"").value||s.meta?.pageName||s.meta?.name||"详情";o+="/"+f;continue}const h=s.meta?.pageName||e[a];o+="/"+h}if(e[e.length-1]==="news"){const a=d("newsBreadcrumbTitle",()=>""),s=t.find(h=>h.path==="/news")?.meta?.pageName||"";o+="/"+(a.value||s)}return o},l={adTrack:!1,zgsee:!1,autoTrack:!1,singlePage:!1,duration:!0,updateUtm:!0,storeMode:"storage"},g=()=>new Promise(n=>{if(window.zhuge){n(!0);return}window.zhuge=window.zhuge||[],window.zhuge.methods="_init identify track getDid getSid getKey setSuperProperty setUserProperties setPlatform setWxProperties setUTM".split(" "),window.zhuge.factory=function(e){return function(){var o=Array.prototype.slice.call(arguments);return o.unshift(e),window.zhuge.push(o),window.zhuge}};for(let e=0;e{if(n)return n;const t=v(),e=T().find(i=>i.path===t.path),o=t.path.split("/").filter(i=>i!=="");return t.path=="/poster/poster-list"?d("posterListBreadcrumbTitle",()=>"").value||"":t.path=="/poster/poster-detail"||t.path=="/poster/poster-list/poster-detail"?d("posterDetailBreadcrumbTitle",()=>"").value||"":o[o.length-1]=="news"?d("newsBreadcrumbTitle",()=>"").value||"":e?.meta?.pageName||""};return{zhugeInit:async()=>{await g()},zhugeTrackPage:(n,t="",r={})=>{n==="访问应用"&&(b.value=!0);const e={事件类型:"页面浏览",页面名称:u(t),...r||{}};if(!b.value){y.value.push({name:n,data:e});return}window.zhuge.track(`新官网_${n}`,e),y.value.forEach(o=>window.zhuge.track(`新官网_${o.name}`,o.data)),y.value=[]},zhugeTrackClick:(n,t="",r={})=>{const e={事件类型:"点击事件",页面名称:u(t),...r||{}};window.zhuge.track(`新官网_${n}`,e)},zhugeTrackPlay:(n,t="",r={})=>{const e={事件类型:"播放事件",页面名称:u(t),...r||{}};window.zhuge.track(`新官网_${n}`,e)},zhugeTrackTimer:(n,t="",r={})=>{const e={事件类型:"计时器",页面名称:u(t),...r||{}};window.zhuge.track(`新官网_${n}`,e)},zhugeTrackSearch:(n,t="",r={})=>{const e={事件类型:"站内搜索",页面名称:u(t),...r||{}};window.zhuge.track(`新官网_${n}`,e)},zhugeTrackExposure:(n,t="",r={})=>{const e={事件类型:"曝光事件",页面名称:u(t),...r||{}};window.zhuge.track(`新官网_${n}`,e)},zhugeTrackSuperProperty:()=>{window.zhuge.setSuperProperty({平台:c()?"H5":"PC",当前页面:w()})}}}export{D as Z,d as u};