PageSourceSearch

https://h5.anhuinews.com/app/post/assets/utils-DChNJKSe.js

js anhuinews.com collected 2026-10-01 10:40:49 UTC 116,821 bytes, 12 lines download raw bytes

1import{i as e}from"./rolldown-runtime-B1FJdls4.js";import{A as t,B as n,C as r,F as i,G as a,H as o,I as s,J as c,K as l,L as u,M as d,Mt as f,N as p,P as m,R as h,Rt as g,S as _,T as v,U as y,V as b,_ as x,a as ee,b as S,bt as C,c as te,g as w,h as T,j as E,k as ne,l as D,m as O,nt as k,o as re,p as ie,q as A,s as j,u as ae,v as oe,w as se,x as M,y as ce,yt as le,z as ue}from"./vendor-HM_DCaYh.js";import{c as de,l as fe,n as N,r as pe}from"./vendor-vant-BaJDcZFV.js";function P(e){e=e||new Map;let t={all:e,on(n,r){let i=e.get(n);return i?i.push(r):e.set(n,[r]),t},off(n,r){let i=e.get(n);return i&&(r?i.splice(i.indexOf(r)>>>0,1):e.set(n,[])),t},emit(n,r){let i=e.get(n);return i&&i.slice().map(e=>{e(r)}),i=e.get(`*`),i&&i.slice().map(e=>{e(n,r)}),t}};return t}var me=P();function he(e,t){for(;e;){if(e.classList.contains(t))return e;e=e.parentElement}return null}function ge(e){e.forEach(e=>{var t;(t=e.parentNode)==null||t.removeChild(e)})}function _e(e,t){var n;let r=document.createElement(`div`);r.innerHTML=t;let i=r.firstElementChild;(n=e.parentNode)==null||n.insertBefore(i,e),i.appendChild(e)}var ve=e=>{let t=e.style.textAlign,n=e.style.color,r=e.style.fontWeight,i=e.style.backgroundColor,a=e.style.backgroundImage,o=e.style.backgroundPosition,s=e.style.backgroundSize,c=e.style.fontSize,l=[`className`,`id`,`data-id`,`data-type`,`class`];Array.from(e.attributes).filter(e=>e.value).forEach(t=>{l.includes(t.name)||e.removeAttribute(t.name)});let u=`text-align:`+t+`;`;u+=n?`color:`+n+`;`:``,u+=r?`font-weight:`+r+`;`:``,u+=i?`background-color:`+i+`;`:``,u+=a?`background-image:`+a+`;`:``,u+=o?`background-position:`+o+`;`:``,u+=s?`background-size:`+s+`;`:``,u+=c?`font-size:`+c+`;`:``,e.style.cssText=u};function ye(e){return!e||e.length==0?``:e.replace(/&amp;/g,`&`).replace(/&nbsp;/g,` `).replace(/&ldquo;/g,`“`).replace(/&rdquo;/g,`”`).replace(/&hellip;/g,`…`).replace(/&mdash;/g,`—`).replace(/&lsquo;/g,`‘`).replace(/&rsquo;/g,`’`).replace(/&sbquo;/g,`‚`).replace(/&middot;/g,`·`).replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/g,``).replace(/[\t]/g,``).trim()}function be(e){return new Promise((t,n)=>{let r=document.createElement(`script`);r.src=e,r.onload=()=>{t()},r.onerror=()=>{n(Error(`Failed to load script: ${e}`))},document.body.appendChild(r)})}var xe=function(e){return e[e.SAMPLE=0]=`SAMPLE`,e[e.COMPLEX=1]=`COMPLEX`,e[e.ABSOLUTE=2]=`ABSOLUTE`,e}({}),F=`https://approute.anhuinews.com`,Se=`https://ad-nftest.southcn.com`,I=`https://u.anhuinews.com`,Ce=`${F}/api/app/node/get/post/one`;`${F}`;var we=`${F}/api/app/dynamic/get`,Te=`${F}/api/app/dynamic/list`,Ee=`${F}/api/app/node/get/nodePost/search`;`${F}`;var De=`${F}/api/app/node/get/post/list`,Oe=`${F}/api/app/node/get/post/getByIds`;`${F}`,`${I}`;var ke=`${F}/api/app/live/projectList`;`${F}`,`${F}`;var Ae=`${F}/api/app/live/projectDetail`;`${F}`,`${F}`;var je=`@get${Se}/api/home/place/ad`,Me=`${F}/api/app/porson/getInfo`,Ne=`${I}/user/getbyuuid`,Pe=`@credentials${F}/webuser/user/info`,Fe=`${F}/api/app/getLocation`,Ie=`@credentials${F}/webuser/frontuser/collectAdd`,Le=`@credentials${F}/webuser/frontuser/collectDel`;`${F}`,`${F}`,`${F}`;var Re=`@credentials${F}/webuser/frontuser/collectGetByUrl`,ze=`@credentials${F}/webuser/frontuser/api/follow`,Be=`@credentials${F}/webuser/frontuser/api/unfollow`,Ve=`@credentials${F}/webuser/frontuser/api/isfollow`,He=`@credentials${F}/webuser/app/login`,Ue=`@credentials${F}/webuser/jf/history`,We=`@credentials${F}/webuser/jf/jf`;`${I}`,`${F}`;var Ge=`@credentials@accept-json${I}/follow`,Ke=`@credentials@accept-json${I}/unfollow`,qe=`@credentials@accept-json${I}/user/follow/list`,Je=`@credentials@accept-json${I}/user/fans/list`,Ye=`@credentials@accept-json${I}/isfollow`;`${I}`,`${F}`,`${F}`,`${I}`,`${I}`;var Xe=`${F}/api/app/getConfigs`,Ze=`@credentials${F}/webuser/node/get/post/comment`,Qe=`@credentials${F}/webuser/post/comment`,$e=`@credentials${F}/webuser/post/addLike`,et=`@credentials${F}/webuser/post/delcomment`,tt=`@credentials${F}/app/post/addLike`,nt=`@credentials${F}/webuser/dynamic/getComment`,rt=`@credentials${F}/webuser/dynamic/addLike`,it=`@credentials${F}/webuser/dynamic/comment`,at=`@credentials${F}/webuser/dynamic/delcomment`,ot=`@credentials${F}/app/dynamic/addLike`,st=`${F}/webuser/set_url`;`${F}`,`${F}`;var ct=`@get${F}/api/appconf/topic`,lt=`${F}
1/api/appconf/topic/data/list`,ut=`${F}/api/appconf/live/project/list`,dt=`${F}/api/appconf/wechat/signature`,ft=`${F}/api/appconf/share/icon/list`,pt=`@get${F}/api/appconf/version/newest`;`${window._CONFIG.track.url}${window._CONFIG.track.reportApi}`;var mt=`EVENT_ALL_PAUSE`,ht=window._CONFIG.pageName,gt=`YXX_BI_DEVICE_ID`,_t=function(e){return e[e.UGC_COLD_START_GUARD_MIN_EXCLUSIVE=5e5]=`UGC_COLD_START_GUARD_MIN_EXCLUSIVE`,e[e.NATIVE_LIKE_SCORE_HANDLED_MIN=500002]=`NATIVE_LIKE_SCORE_HANDLED_MIN`,e}({}),vt=function(e){return e.NATIVE_LIKE_SCORE_HANDLED=`nativeLikeScoreHandled`,e}({}),yt=Pt(`/images/iconX256.png`);Pt(`/images/iconX512.png`);var bt=Pt(`/images/icon_empty.png`),xt=Pt(`/images/icon-default-avatar.png`),St=`中安在线客户端`,Ct=function(e){return e.POST=`post`,e.LIVE=`live`,e.TOPIC=`topic`,e.LIVE_SUBJECT=`liveSubject`,e.SCOOP=`scoop`,e.DEFAULT=`default`,e.WEB_CUSTOM=`webCustom`,e}({}),wt={shareGroup:`ChannelTimeLine`,shareWX:`ChannelWechat`,shareWeibo:`ChannelSina`,shareQQ:`ChannelQQ`},Tt=`Mobile`,Et=`Android`,L=e(a()),Dt={"validation.unique":`系统已存在相同的`},Ot={email:`邮箱`,name:`项目名称`};function kt(e){if(!e)return``;let t=[];return Object.keys(e).forEach(n=>{t.push(e[n].map(e=>`${Dt[e]||``}${Ot[n]||``}`).filter(e=>e).join(`、`))}),t.filter(e=>e).join(`、`)}function At(e){return e.replace(/([A-Z])/g,`_$1`).toLowerCase()}function jt(e){return new e}function R(e,t={}){try{return JSON.parse(e)}catch(e){return t}}function Mt(e){if(e&&!e.startsWith(`http`))return new URLSearchParams(e.startsWith(`?`)?e:`?${e}`);let t=new URL(e||window.location.href),n=t.hash.indexOf(`?`);return n===-1?t.searchParams:new URLSearchParams(t.hash.slice(n))}function Nt(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return`${String(t).padStart(2,`0`)}:${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`}function Pt(e){if(e.startsWith(`http://`)||e.startsWith(`https://`))return e;let t=window.location.pathname;if(t.endsWith(`/`)&&t.length>1)t=t.slice(0,-1);else if(t.includes(`.`)){let e=t.lastIndexOf(`/`);t=e===-1?``:t.substring(0,e)}let n=`${window.location.origin}${t}`,r=e.startsWith(`/`)?e.substring(1):e;return`${n.endsWith(`/`)?n:`${n}/`}${r}`}function Ft(e,t={}){let n=t.format||`YYYY年MM月DD日`,r=typeof e==`number`?L.default.unix(e):(0,L.default)(e);if(t.format===`cn`)return r.year()===(0,L.default)().year()?r.format(`M月D日`):r.format(`YYYY年M月D日`);if(t.type===xe.ABSOLUTE)return r.format(n);let i=t.lang||{},a=(0,L.default)(),o=a.diff(r,`s`),s=``;if(t.type===xe.SAMPLE)return s=o<1800?i.LATEST||`刚刚`:r.format(n)===a.format(n)?r.format(`HH:mm`):t.default===void 0?a.year()==r.year()?r.format(`MM-DD`):r.format(n):t.default,s;if(o<3600){let e=parseInt((o/60).toString());s=`${e.toString()}${i.TIME_MIN_AGO||`分钟前`}`,e<=0&&(s=i.LATEST||`刚刚`)}else s=o<24*3600?`${parseInt((o/3600).toString())}${i.TIME_HOURS_AGO||`小时前`}`:o<24*3600*3?`${parseInt((o/(24*3600)).toString())}${i.TIME_DAYS_AGO||`天前`}`:a.year()==r.year()?r.format(`MM月DD日`):r.format(`YYYY年MM月DD日`);return s}var z=(e,{step:t=100,timeout:n=2e3,callback:r,timeoutReject:i=!1,timeoutResolve:a=!1}={})=>new Promise((o,s)=>{if(e()){o(!0);return}let c=setInterval(()=>{e()&&(o(!0),clearInterval(c)),r==null||r()},t);setTimeout(()=>{clearInterval(c),i?s(Error(`Timeout`)):a&&o(!0)},n)});function It(e){return Lt.apply(this,arguments)}function Lt(){return Lt=l(function*(e){return e.then(e=>[null,e]).catch(e=>[e,null])}),Lt.apply(this,arguments)}var Rt=()=>window._CONFIG.isInApp?Gt()?`IOS`:Et:Kt()?`PC`:Tt;function zt(e){return`dc_${e.type}_${e.id}_${e.subType||e.type}_${e.commentId||e.comment_id||``}`}function Bt(e){let t=1e8,n=1e6,r=1e4;if(e=e||0,e===0)return 0;if(e>=r&&e<n){let t=(e/r).toFixed(2);return`${t.substring(0,t.lastIndexOf(`.`)+2)}万`}else if(e>=n&&e<t)return`${Math.floor(e/r)}万`;else if(e>=t)return`${Math.floor(e/t)}亿`;return e.toString()}function Vt(e){return Ht.apply(this,arguments)}function Ht(){return Ht=l(function*(e){yield _(A(A({},e),{},{name:`commentList`}))}),Ht.apply(this,arguments)}function Ut(e,t){return[...e].sort((e,n)=>t===`good`?n.good-e.good:n.time-e.time)}function B(){return window.navigator.userAgent.toLowerCase().includes(`micromessenger`)}function Wt(){return/android/i.test(window.navigator.userAgent.toLowerCase())}function Gt(){return/iphone|ipad|ipod/i.test(window.navigator.userAgent.toLowerCase())}var Kt=()=>{let e=window.navigator.userAgent;
1return!/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i.test(e)},V=class e{constructor(){c(this,`id`,void 0),c(this,`checked`,!1),c(this,`sort`,-1),c(this,`_fakeId`,void 0),c(this,`updatedAt`,void 0),c(this,`createdAt`,void 0)}get createdAtText(){return this.getTimeText(`createdAt`)}get updatedAtText(){return this.getTimeText(`updatedAt`)}get createdAtTextSamle(){return this.getTimeText(`createdAt`,`YYYY-MM-DD`)}get updatedAtTextSamle(){return this.getTimeText(`updatedAt`,`YYYY-MM-DD`)}get modifiedAtTextSamle(){return this.getTimeText(`modifiedAt`,`YYYY-MM-DD`)}getTimeText(e,t=`YYYY-MM-DD HH:mm:ss`){return this[e]?(0,L.default)(this[e]).format(t):``}get opTime(){return this.updatedAtText||this.createdAtText}createFakeId(){return this._fakeId||(this._fakeId=D())}clone(e={},t=!1){if(t)return Object.assign(y(this),e);let n=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return Object.assign(n,e)}fromJson(e={}){return Object.keys(e).forEach(t=>{let n=e[t];n!==null&&(t=t.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),t in this&&(this[t]=n))}),this}toJson(t=[`checked`,`sort`,`_fakeId`]){let n={};for(let t in this)if(typeof this[t]!=`function`){let r=At(t);this[t]instanceof e&&this[t].toJson?n[r]=this[t].toJson():Array.isArray(this[t])&&this[t].length&&this[t][0]instanceof e?n[r]=this[t].map(e=>e.toJson()):n[r]=this[t]}return t.forEach(e=>{delete n[e]}),n}},H=class extends V{constructor(e){super(),c(this,`current`,1),c(this,`pageSize`,20),c(this,`total`,0),c(this,`showJumper`,!1),this.pageSize=e||20}get offset(){return(this.current-1)*this.pageSize}toJson(){return{limit:this.pageSize,offset:this.offset}}toPageJson(){return{page:this.current,pageSize:this.pageSize}}setLimit(e){return this.pageSize=e,this}setTotal(e){this.total=e}next(e){this.current=e||this.current+1}get isFull(){return this.current*this.pageSize>=this.total}get isEmpty(){return this.total===0}},qt={USER_NO_LOGIN:401,UNPROCESSABLE_ENTITY:422},Jt=[],U={presets:{},store:{API_PREFIX:``},setPreset:function(e,t){U.presets[e]=t},setCsrfToken:function(e){U.store.csrfToken=e},setPkCsrfToken:function(e){U.store.pkCsrfToken=e},setAccessToken:function(e){U.store.accessToken=e},setAppToken:function(e){U.store.appToken=e},checkCsrfToken:function(){return!!U.store.csrfToken},setClientAppId:function(e){U.store.clientAppId=e},setOrgId:function(e){U.store.orgId=e},setCurOrgId:function(e){U.store.curOrgId=e},setPkToken:function(e){U.store.pkToken=e},modifyExtGetArguments:function(e){if(!(e instanceof Object))return e;Object.keys(U.presets).forEach(t=>{t in e||(e[t]=U.presets[t])});let t=!1;if(Object.keys(e).forEach(n=>{(e[n]instanceof window.File||e[n]instanceof window.Blob)&&(t=!0)}),t){let t=new FormData;return Object.keys(e).forEach(n=>{e[n]!==void 0&&t.append(n,e[n])}),t}return Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e},modifyGetArguments:function(e,t){if(t)typeof t==`string`&&(t=JSON.parse(t));else return e;let n=new URLSearchParams(t).toString();return n&&(e=`${e}?${n}`),e},fetchFunc:Zt,setFixHeaders:function(e){U.store.fixHeadersCallback=e}},W={get:(e,t,n={})=>Zt(e,t,Object.assign({method:`GET`},n)),post:(e,t,n={})=>Zt(e,t,Object.assign({method:`POST`},n)),put:(e,t,n={})=>Zt(e,t,Object.assign({method:`PUT`},n)),delete:(e,t,n={})=>Zt(e,t,Object.assign({method:`DELETE`},n)),abortable:(e,t,n={})=>{let r=new AbortController,i=r.signal;return n.method||(n.method=`POST`),n.signal=i,{abort:()=>r.abort(),ready:()=>Zt(e,t,n)}}};function Yt(e){let t=!1,n=!1,r=!1,i=!1,a=e;for(;a.startsWith(`@`);){if(a.startsWith(`@credentials`)){t=!0,a=a.replace(`@credentials`,``);continue}if(a.startsWith(`@accept-json`)){n=!0,a=a.replace(`@accept-json`,``);continue}if(a.startsWith(`@no-accesstoken`)){r=!0,a=a.replace(`@no-accesstoken`,``);continue}if(a.startsWith(`@pk-csrf`)){i=!0,a=a.replace(`@pk-csrf`,``);continue}break}return{isCredentials:t,needAcceptJson:n,noAccessToken:r,usePkCsrf:i,apiUrl:a}}function Xt(e){e.has(`Accept`)||e.append(`Accept`,`application/json`)}function Zt(e,t,n={}){let{modifyExtGetArguments:r,modifyGetArguments:i,store:a}=U,o=r(t),s=o instanceof FormData,c={method:n.method||`POST`,mode:`cors`,credentials:n.credentials,body:s?o:JSON.stringify(o)},{isCredentials:l,needAcceptJson:u,noAccessToken:d,usePkCsrf:f,apiUrl:p}=Yt(e);if(e=p,c.headers=new Headers(n),c.headers){var m;s||c.headers.append(`Content-Type`,`application/json`);let r=f?a.pkCsrfToken:a.csrfToken;
1r&&c.headers.append(`X-CSRF-TOKEN`,r),(a.appToken||n.appToken)&&c.headers.append(`app-token`,String(a.appToken||n.appToken)),a.clientAppId&&c.headers.append(`Client-App-Id`,String(a.clientAppId)),a.orgId&&c.headers.append(`Org-Id`,String(a.orgId)),a.curOrgId&&c.headers.append(`Cur-Org-Id`,String(a.curOrgId)),a.pkToken&&c.headers.append(`pk-token`,a.pkToken),a.accessToken&&!d&&c.headers.append(`AccessToken`,a.accessToken),((m=c.method)==null?void 0:m.toLocaleUpperCase())===`GET`&&(e=i(e,t),delete c.body),c.headers=a.fixHeadersCallback?a.fixHeadersCallback({url:e,options:n,data:t,headers:c.headers}):c.headers,c.headers.delete(`method`),c.headers.delete(`credentials`),c.headers.delete(`appToken`)}return u&&Xt(c.headers),(e!=null&&e.includes(`//pk-nftest`)||e.includes(`//jsv-bl`)||e.includes(`/self`))&&(Xt(c.headers),c.credentials=`include`),n.signal&&(c.signal=n.signal),l&&(c.credentials=`include`),e=`${U.store.API_PREFIX}${e}`,new Promise((t,n)=>{fetch(e,c).then(r=>{if(r.ok)r.json().then(r=>{if(Jt.length&&(r=Jt.reduce((e,t)=>n=>e(t(n)))(r)),r.errcode===400&&!e.includes(`webuser/user/info`)&&a.onNotLogin){a.onNotLogin();return}r.errcode===0||!(`errcode`in r)&&`data`in r?t(r.data):`errcode`in r?n(r):t(r)});else{if(r.status===qt.UNPROCESSABLE_ENTITY){r.json().then(e=>{e.errmessage=`${kt(e.data)}`,n(e)});return}return Promise.reject(r)}}).catch(e=>{e.ok===!1?n({errmessage:`网络错误(${e.status})`}):n(e)})})}var Qt=[`list`,`total`,`data`],G=class e{constructor(){c(this,`urlForGetPage`,``),c(this,`urlForGetDetail`,``),c(this,`urlForSave`,``),c(this,`urlForEdit`,``),c(this,`urlForDelete`,``),c(this,`urlForSort`,``),c(this,`urlForChangeStatus`,``),c(this,`urlForBaseList`,``),c(this,`dataKey`,``),c(this,`entityKey`,`id`)}replaceUrlParams(e,t={}){let n=e,r=A({},t),i=e.match(/\{(\w+)\}/g);return i&&i.forEach(e=>{let t=e.slice(1,-1);t in r&&(n=n.replace(e,String(r[t])),delete r[t])}),{url:n,params:r}}list(e,t){var n=this;return l(function*(){var r,i;let a=t!=null&&t.apiUrl?t==null?void 0:t.apiUrl:n.urlForGetPage;t!=null&&t.apiUrl&&delete t.apiUrl;let o=yield W[a.includes(`@get`)?`get`:`post`](a.replace(`@get`,``),A(A({},e.toJson()),t));if(o===!1)return{data:[],total:0};o.data=Array.isArray(o)?o:(r=(o==null?void 0:o.list)||(o==null?void 0:o.data))==null?void 0:r.map(e=>jt(n.entityClass).fromJson(e));let{list:s,total:c,data:l}=o,u=te(o,Qt);return A({data:o.data,total:o.total||((i=o.meta)==null?void 0:i.count)||o.list_total_num||o.data.length},u)})()}baseList(){var e=this;return l(function*(t={}){var n;if(e.urlForBaseList){var r;let n=yield W[e.urlForBaseList.includes(`@get`)?`get`:`post`](e.urlForBaseList.replace(`@get`,``),t);return(r=(n==null?void 0:n.list)||n)==null?void 0:r.map(t=>jt(e.entityClass).fromJson(t))}let i=yield e.list(new H(999),t);return(n=i.list||i.data)==null?void 0:n.map(t=>jt(e.entityClass).fromJson(t))}).apply(this,arguments)}delete(e){var t=this;return l(function*(e,n={}){let r=A({[t.entityKey]:e},n),{url:i,params:a}=t.replaceUrlParams(t.urlForDelete,r);yield W.post(i,a)}).apply(this,arguments)}save(e){var t=this;return l(function*(e,n={}){return yield W.post(t.urlForSave,A(A({},e.toJson()),n))}).apply(this,arguments)}get(e){var t=this;return l(function*(e,n={}){let r=n!=null&&n.apiUrl?n==null?void 0:n.apiUrl:t.urlForGetDetail;n!=null&&n.apiUrl&&delete n.apiUrl;let i=n==null?void 0:n.entityKey;n!=null&&n.entityKey&&delete n.entityKey;let a=n.method||`post`,o=n==null?void 0:n.injectFunc;delete n.method,delete n.injectFunc,a=r.includes(`@get`)?`get`:a;let s=A({[i||t.entityKey]:e},n),{url:c,params:l}=t.replaceUrlParams(r,s),u=yield W[a](c.replace(`@get`,``),l);return o&&o(u),u||(u={}),jt(t.entityClass).fromJson(t.dataKey?u[t.dataKey]:u)}).apply(this,arguments)}edit(e,t){var n=this;return l(function*(){let r=A({[n.entityKey]:e[n.entityKey]},t||e.toJson()),{url:i,params:a}=n.replaceUrlParams(n.urlForEdit,r);return yield W.post(i,a)})()}sort(e,t){var n=this;return l(function*(){let r={[n.entityKey]:e[n.entityKey],sort:t},{url:i,params:a}=n.replaceUrlParams(n.urlForSort,r);yield W.post(i,a)})()}changeStatus(e,t){var n=this;return l(function*(){let r={[n.entityKey]:e[n.entityKey],status:t},{url:i,params:a}=n.replaceUrlParams(n.urlForChangeStatus,r);yield W.post(i,a)})()}static getInstance(){let t=e.instances.get(this);return t||(t=new this,e.instances.set(this,t)),t}};c(G,`instances`,new Map);var $t=class e extends V{constructor(...e){super(...e),c(this,`siteId`,void 0),c(this,`userId`,void 0),c(this,`parentId`,void 0),c(this,`oldNodeId`,void 0),c(this,`name`,void 0),c(this,`path`,void 0),c(this,`type`,void 0),c(this,`tags`,void 0),c(this,`desc`,void 0),c(this,`iconUrl`,void 0),c(this,`coverUrl`,void 0),c(this,`coverUrls`,void 0),c(this,`url`,void 0),c(this,`maxPageCount`,void 0),c(this,`isHidden`,void 0),c(this,`isInactive`,void 0),c(this,`pcNodeTplId`,void 0),c(this,`pcPostTplId`,void 0),c(this,`mNodeTplId`,void 0),c(this,`mPostTplId`,void 0),c(this,`auditGrade`,void 0),c(this,`postMaxCount`,void 0),c(this,`titleMaxLength`,void 0),c(this,`publishedAt`,void 0),c(this,`postUpdatedAt`,void 0),c(this,`defaultCids`,void 0),c(this,`extInfo`,void 0),c(this,`configInfo`,void 0),c(this,`status`,void 0),c(this,`pathM`,void 0),c(this,`projectId`,void 0),c(this,`parentNode`,void 0),c(this,`pathArray`,[])}get isTopic(){return this.type===`topic`}get parent(){if(this.parentId)return this.pathArray[this.pathArray.length-1]}fromJson(t){return super.fromJson(t),t.parent_node&&typeof t.parent_node==`object`&&`data`in t.parent_node&&(this.parentNode=new e().fromJson(t.parent_node.data)),t.ext_info&&typeof t.ext_info==`string`&&(this.extInfo=R(t.ext_info)),t.path_array&&Array.isArray(t.path_array)&&(this.pathArray=t.path_array.map(t=>new e().fromJson(t)),this.pathArray.forEach((e,t)=>{var n;e.parentId=(n=this.pathArray[t-1])==null?void 0:n.id})),this}},en=class extends V{constructor(...e){super(...e),c(this,`key`,void 0),c(this,`title`,void 0),c(this,`url`,void 0)}},tn=class extends V{constructor(...e){super(...e),c(this,`alt`,void 0),c(this,`url`,void 0),c(this,`title`,void 0)}},nn=class extends V{constructor(...e){super(...e),c(this,`customWidth`,void 0),c(this,`originWidth`,void 0),c(this,`customHeight`,void 0),c(this,`originHeight`,void 0)}setOriginSize(e,t){this.originWidth=e,this.originHeight=t}},rn=class extends V{constructor(...e){super(...e),c(this,`HD`,void 0),c(this,`SD`,void 0),c(this,`LD`,void 0),c(this,`OD`,void 0),c(this,`4K`,void 0)}fromJson(e={}){return super.fromJson(e),Object.keys(e).forEach(t=>{let n=e[t];typeof n==`string`&&n&&(this[t]=n)}),this}},an=class extends V{constructor(...e){super(...e),c(this,`key`,void 0),c(this,`size`,void 0),c(this,`urls`,void 0),c(this,`cover`,void 0),c(this,`title`,void 0),c(this,`duration`,void 0)}get source(){let e=this.urls,t=[`LD`,`SD`,`HD`,`OD`,`4K`].find(t=>typeof(e==null?void 0:e[t])==`string`&&!!String(e[t]).trim());return t?String(e[t]):Object.values(e||{}).find(e=>typeof e==`string`&&!!e.trim())||``}get isUseVideoTag(){return this.key.includes(`video-`)}fromJson(e){return super.fromJson(e),e.size&&typeof e.size==`object`&&(this.size=new nn().fromJson(e.size)),e.urls&&typeof e.urls==`object`?this.urls=new rn().fromJson(e.urls):e.url&&(this.urls=new rn().fromJson({LD:e.url}),this.key=`video-${D()}`),this}},on=class extends V{constructor(...e){super(...e),c(this,`images`,[]),c(this,`videos`,[]),c(this,`audios`,[])}fromJson(e){return super.fromJson(e),e.images&&Array.isArray(e.images)&&(this.images=e.images.map(e=>new tn().fromJson(e))),e.videos&&Array.isArray(e.videos)&&(this.videos=e.videos.map(e=>new an().fromJson(e))),e.audios&&Array.isArray(e.audios)&&(this.audios=e.audios.map(e=>new en().fromJson(e))),this}},sn=class extends V{constructor(...e){super(...e),c(this,`nodeType`,void 0)}},cn=class extends V{constructor(...e){super(...e),c(this,`title`,void 0),c(this,`content`,void 0),c(this,`author`,void 0),c(this,`source`,void 0),c(this,`url`,void 0),c(this,`type`,void 0),c(this,`subType`,void 0),c(this,`copyright`,void 0),c(this,`siteId`,void 0),c(this,`userId`,void 0),c(this,`nodeId`,void 0),c(this,`postId`,void 0),c(this,`extInfo`,void 0),c(this,`priority`,void 0),c(this,`linkInfo`,void 0),c(this,`linkType`,void 0),c(this,`sourceUrl`,void 0),c(this,`wordCount`,void 0),c(this,`isOriginal`,void 0),c(this,`oldPostId`,void 0),c(this,`isSensitive`,void 0),c(this,`contentAsset`,void 0),c(this,`contentSub`,void 0),c(this,`digest`,void 0),c(this,`latestOpAt`,void 0),c(this,`latestOpUserId`,void 0),c(this,`linkSourceNpId`,void 0)}getVideoAssets(e,t){if(!t)return[];let n=Array.from(t.matchAll(/<video[^>]*\s+src\s*=\s*['"]([^'"<>]+)['"][^>]*>/gi)),r=Array.from(t.matchAll(/<video[^>]*\s+poster\s*=\s*['"]([^'"<>]+)['"][^>]*>/gi));return n.map((t,n)=>{var i;let a=(t==null?void 0:t[1])||``,o=(r==null||(i=r[n])==null?void 0:i[1])||``,s={key:`video-${D()}`,urls:{LD:a},cover:o,title:e,size:{}};return new an().fromJson(s)})}
1get firstVideoCover(){var e;return(e=this.contentAsset)!=null&&e.videos.length?this.contentAsset.videos[0].cover:``}fromJson(e){var t;if(super.fromJson(e),e.ext_info&&typeof e.ext_info==`string`&&(this.extInfo=R(e.ext_info)),e.content_asset&&(this.contentAsset=new on().fromJson(typeof e.content_asset==`string`?R(e.content_asset):e.content_asset)),e.link_info&&typeof e.link_info==`string`&&(this.linkInfo=new sn().fromJson(R(e.link_info))),(t=this.contentAsset)!=null&&t.videos.length){var n;let e=this.contentAsset.videos.filter(e=>e.isUseVideoTag),t=/<video\b[^>]*(?:>[\s\S]*?<\/video\s*>|\/>)/gi,r=0;this.content=(n=this.content)==null?void 0:n.replace(t,t=>{let n=e[r];return n?(r+=1,`<div id="${n.key}"></div>`):t})}return this}},ln=class extends V{constructor(...e){super(...e),c(this,`type`,void 0),c(this,`title`,void 0),c(this,`appUrl`,void 0),c(this,`webUrl`,void 0),c(this,`nodeId`,void 0)}fromJson(e){return e&&super.fromJson(e),this}},un=class extends V{constructor(...e){super(...e),c(this,`projectId`,void 0),c(this,`name`,void 0),c(this,`domain`,void 0),c(this,`protocol`,void 0),c(this,`staticHost`,void 0),c(this,`staticPath`,void 0),c(this,`fileStoreType`,void 0),c(this,`auditGrade`,void 0),c(this,`maxPageCount`,void 0),c(this,`isAutoReturnBack`,void 0),c(this,`isPushWorkflow`,void 0),c(this,`isNoticeSyncPost`,void 0),c(this,`minSimScore`,void 0),c(this,`auditIntercept`,void 0),c(this,`extInfo`,void 0),c(this,`status`,void 0)}fromJson(e){return super.fromJson(e),e.ext_info&&typeof e.ext_info==`string`&&(this.extInfo=R(e.ext_info)),this}},dn=class extends V{constructor(...e){super(...e),c(this,`serviceAreaId`,void 0),c(this,`orgId`,void 0),c(this,`name`,void 0),c(this,`ban`,void 0)}},fn=class extends V{constructor(...e){super(...e),c(this,`cid`,void 0),c(this,`key`,void 0),c(this,`cids`,void 0),c(this,`tags`,void 0),c(this,`type`,void 0),c(this,`title`,void 0),c(this,`author`,void 0),c(this,`digest`,void 0),c(this,`editor`,void 0),c(this,`isTop`,void 0),c(this,`source`,void 0),c(this,`status`,void 0),c(this,`nodeId`,void 0),c(this,`postId`,void 0),c(this,`siteId`,void 0),c(this,`userId`,void 0),c(this,`oldSort`,void 0),c(this,`priority`,void 0),c(this,`topSort`,void 0),c(this,`pubTime`,void 0),c(this,`savedAt`,void 0),c(this,`pushedAt`,void 0),c(this,`publishedAt`,void 0),c(this,`firstPublishedAt`,void 0),c(this,`firstPublishedBy`,void 0),c(this,`subType`,void 0),c(this,`copyright`,void 0),c(this,`coverUrl`,void 0),c(this,`coverUrls`,void 0),c(this,`isEdited`,void 0),c(this,`subTitle`,void 0),c(this,`userName`,void 0),c(this,`deletedAt`,void 0),c(this,`extLabels`,void 0),c(this,`headTitle`,void 0),c(this,`audioCount`,void 0),c(this,`imageCount`,void 0),c(this,`videoCount`,void 0),c(this,`attachmentCount`,void 0),c(this,`linkAudioCount`,void 0),c(this,`linkImageCount`,void 0),c(this,`linkVideoCount`,void 0),c(this,`linkAttachmentCount`,void 0),c(this,`proofreader`,void 0),c(this,`relatedIds`,void 0),c(this,`isSensitive`,void 0),c(this,`shareImgUrl`,void 0),c(this,`auditPushedAt`,void 0),c(this,`editorIncharge`,void 0),c(this,`staticNodePath`,void 0),c(this,`path`,void 0),c(this,`pathM`,void 0),c(this,`latestOpAt`,void 0),c(this,`latestOpUserId`,void 0),c(this,`latestOpUserName`,void 0),c(this,`firstPublishedUserName`,void 0),c(this,`post`,void 0),c(this,`site`,void 0),c(this,`project`,void 0),c(this,`node`,void 0)}get duration(){var e;let t=(e=this.post)==null||(e=e.contentAsset)==null||(e=e.videos)==null||(e=e[0])==null?void 0:e.duration;if(!t||t<=0)return``;let n=Math.floor(t),r=Math.floor(n/3600),i=Math.floor(n%3600/60),a=n%60,o=e=>e<10?`0${e}`:String(e);return r>0?`${r}:${o(i)}:${o(a)}`:`${i}:${o(a)}`}get mediaType(){return this.videoCount>0?`video`:this.imageCount>0?`image`:this.audioCount>0?`audio`:`text`}get isFullBanner(){var e;let t=(e=this.extLabels)==null?void 0:e.site_is_fullbanner;return t===1||t===`1`||t===!0||t===`true`}get contentAsset(){return this.post.contentAsset||{}}get speedDisabled(){var e,t;return((e=this.post)==null||(e=e.title)==null?void 0:e.includes(`习近平`))||((t=this.post)==null||(t=t.content)==null?void 0:t.includes(`习近平`))}get executiveEditor(){return this.editorIncharge||this.latestOpUserName||this.userName||``}get share(){return{title:this.title||this.post.title,thumb:this.shareImgUrl||this.coverUrl||``,de
1sc:``,app_url:this.appUrl,dynamic_url:this.appUrl,url:window.location.href,id:this.id,siteId:this.siteId,contentSub:this.post&&this.post.contentSub||``,extLabels:this.extLabels}}get webUrl(){return q(`${window._CONFIG.domainUrl}/app/post/`,{k:this.key})}get appUrl(){return K({module:`post`,post_key:this.key},!0)}get favMeta(){return new ln().fromJson({type:0,title:this.post.title,web_url:this.webUrl,app_url:this.appUrl})}fromJson(e){var t,n,r,i;return super.fromJson(e),e.post&&typeof e.post==`object`&&(this.post=new cn().fromJson(e.post)),e.site&&typeof e.site==`object`&&(this.site=new un().fromJson(e.site)),e.project&&typeof e.project==`object`&&(this.project=new dn().fromJson(e.project)),e.node&&typeof e.node==`object`&&(this.node=new $t().fromJson(e.node)),e.ext_labels&&typeof e.ext_labels==`string`&&(this.extLabels=R(e.ext_labels)),this.editor||(this.editor=this.latestOpUserName||this.userName||``),!this.coverUrl&&this.post.firstVideoCover&&(this.coverUrl=this.post.firstVideoCover),e.cover_urls&&typeof e.cover_urls==`string`&&(this.coverUrls=R(e.cover_urls,[])),(t=this.post.contentAsset)==null||(t=t.videos)==null||t.filter(e=>!e.cover).forEach(e=>{e.cover=this.coverUrl}),!((n=this.contentAsset)==null||(n=n.videos)==null)&&n.length&&((r=this.coverUrls)==null?void 0:r.length)>1&&(this.contentAsset.videos[0].cover=this.coverUrls[2]||this.coverUrls[1]),!this.author&&(i=this.post)!=null&&i.author&&(this.author=this.post.author||``),this.node&&!this.node.id&&this.nodeId&&(this.node.id=this.nodeId),this}},pn=class extends G{constructor(...e){super(...e),c(this,`entityClass`,fn),c(this,`dataKey`,`data`),c(this,`urlForGetDetail`,Ce),c(this,`urlForGetPage`,De)}search(e,t){return super.list(e,A(A({},t),{},{apiUrl:Ee}))}getPostListByTopic(e,t){var n=()=>super.list,r=this;return l(function*(){return n().call(r,e,{apiUrl:Oe,offset:t.offset,limit:t.limit,ids:JSON.stringify(t.ids)})})()}};function mn(e){var t;return(t=window._CONFIG.callAppOptions.find(t=>t.module===e))==null?void 0:t.base}function hn(e){return gn.apply(this,arguments)}function gn(){return gn=l(function*(e){if(me.emit(mt,{audioContinue:window._CONFIG.isInApp}),e.type===`link`&&e.post){yield _n(e);return}else{var t,n;if((e==null||(t=e.extLabels)==null?void 0:t.is_large)===`1`&&!(e==null||(n=e.contentAsset)==null||(n=n.images)==null)&&n.length)return window._CONFIG.isInApp?yield d(K({module:`galleryFlip`,id:e.id},!0)):window.location.href=q(`/app/gallery.html`,{id:e.id});window._CONFIG.isInApp?yield d(K({module:`post`,post_key:e.key},!0)):window.location.href=q(mn(`post`),{k:e.key})}}),gn.apply(this,arguments)}function _n(e){return vn.apply(this,arguments)}function vn(){return vn=l(function*(e){switch(console.log(`routePostByLink`,e),e.post.linkType){case`live`:var t;window._CONFIG.isInApp?d(K({module:`live`,id:(t=e.post.linkInfo)==null?void 0:t.id},!0)):window.location.href=e.post.url;break;case`node`:console.log(`routePostByLink node`,e.post.linkInfo),yield yn(e,e.post.linkInfo);break;case`web`:window._CONFIG.isInApp?wn(e.post.url):location.href=e.post.url;break;case`node_post`:yield xn(e,e.post.linkInfo);break;default:break}}),vn.apply(this,arguments)}function yn(e,t){return bn.apply(this,arguments)}function bn(){return bn=l(function*(e,t){console.log(`routeNode`,e,t);let n=q(mn(`node`),{node_id:t.id});try{if(window._CONFIG.isInApp)return d(K({module:`node`,node_id:t.id},!0));t.nodeType===`topic`&&(window.location.href=q(mn(`topic`),{node_id:t.id}))}catch(e){window.location.href=n}}),bn.apply(this,arguments)}function xn(e,t){return Sn.apply(this,arguments)}function Sn(){return Sn=l(function*(e,t){if(window._CONFIG.isInApp)return d(K({module:`post`,post_id:t.id},!0));try{let e=yield pn.getInstance().get(t.id);window.location.href=q(mn(`post`),{k:e==null?void 0:e.key})}catch(t){window.location.href=q(mn(`post`),{k:e.key})}}),Sn.apply(this,arguments)}function K(e,t=!1){let n=typeof e==`string`?e:new URLSearchParams(e).toString();return t?`ahnews://app.com?${n}`:`app.com?${n}`}function q(e,t){return`${e}?${new URLSearchParams(t).toString()}`}function Cn(e){let t=null;return window._CONFIG.callAppOptions.forEach(function(n){e.includes(n.base)&&(t=n)}),t||(t={module:`h5`,base:``}),t}function wn(e){if(e.match(/(https?):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/g)!==null){let t=Cn(e);switch(t.module){case`post`:En(e,t);break;case`topic`:On(e,t);break;case`live`:kn(e,t);break;case`node`:An(e,t);break;case`h5`:jn(e);break}}}function Tn(e){return e.includes(`://`)&&(e=new URL(e).search),new URLSearchParams(e)}function En(e,t){return Dn.apply(this,arguments)}function Dn(){return Dn=l(function*(e,t){let n=Tn(e).get(`k`);if(!n){window.location.href=e;return}try{yield d(K({module:t.module,post_key:n}))}catch(t){window.location.href=e}}),Dn.apply(this,arguments)}function On(e,t){let n=Tn(e).get(`node_id`);n?d(K({module:t.module,cmdNodeId:n})):window.location.href=e}function kn(e,t){let n=Tn(e).get(`id`);n?d(K({module:t.module,id:n})):window.location.href=e}function An(e,t){let n=Tn(e).get(`node_id`);n?d(K({module:t.module,node_id:n})):window.location.href=e}function jn(e){if(!window._CONFIG.isInApp){window.location.href=e;return}d(K({module:`h5`,url:e}))}function Mn(e,t){let n=`${mn(e)}?${typeof t==`object`?new URLSearchParams(t).toString():t}`;return e===`downloadFile`?`${window._CONFIG.domainUrl}/${n}`:n}var Nn=`__AH_REPORT_USER_INFO__@v1`;function Pn(e){var t,n,r,i,a,o,s;if(!e||typeof e!=`object`)return null;
1let c=(t=e.user)==null?e:t,l=(n=c.person)==null?c:n,u=(r=c.uuid)==null?l==null?void 0:l.uuid:r;return u?{uuid:u,name:(i=(a=c.name)==null?l==null?void 0:l.name:a)==null?``:i,region:(o=l==null?void 0:l.region)==null?``:o,sex:(s=l==null?void 0:l.sex)==null?-1:s}:null}function Fn(e){let t=Pn(e);if(t)try{localStorage.setItem(Nn,JSON.stringify(t))}catch(e){}}function In(){try{let e=localStorage.getItem(Nn);if(!e)return null;let t=JSON.parse(e);return t!=null&&t.uuid?t:null}catch(e){return null}}var Ln={isFunction(e){return Object.prototype.toString.call(e)===`[object Function]`},isEmpty(e){return Array.isArray(e)?!e.length:typeof e==`object`?!e:e===void 0?!0:typeof e==`string`&&!e.trim().length},numeric(e){return!isNaN(parseFloat(e))&&isFinite(e)},email(e){return/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z]{2,4}$/.test(e)},chinese(e){return/^[\u4e00-\u9fa5]{0,}$/.test(e)},english(e){return/^[a-zA-Z]+$/.test(e)},url(e){return/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/.test(e)},idcard(e){return/(^\d{15}$)|(^\d{17}(x|X|\d)$)/.test(e)},mobile(e){return/^1(2|3|4|5|6|7|8|9)[0-9]\d{8}$/.test(e)},word(e){return/\.doc(x?)$/i.test(e)},pdf(e){return/\.pdf$/i.test(e)},document(e){return/\.doc(x?)$|\.xls(x?)$|\.ppt(x?)$|\.wps$|\.pdf$|\.txt$/i.test(e)},image(e){return/\.png|\.jpg$|\.jpeg$|\.bmp$|\.gif$/i.test(e)},video(e){return/\.wmv$|\.avi$|\.mkv$|\.rm$|\.mov$|\.mp4$|\.rmvb$/i.test(e)},audio(e){return/\.mp3/i.test(e)},archive(e){return/\.rar$|\.zip$|\.7z$|\.gzip$|\.tar$|\.iso$/i.test(e)}},Rn=e(re()),zn=class e{static getInstance(t=`cache`){return e._instances[t]||(e._instances[t]=new e(t)),e._instances[t]}constructor(e){c(this,`store`,void 0),c(this,`namespace`,void 0),this.store=Rn.default.createInstance({name:e}),this.namespace=e}set(e,t,n=null){var r=this;return l(function*(){try{let i={value:JSON.parse(JSON.stringify(t)),createTime:Date.now()};return n!==null&&(i.expireTime=Date.now()+n),yield r.store.setItem(e,i),!0}catch(e){return console.error(`缓存存储失败:`,e),!1}})()}get(e,t=null){var n=this;return l(function*(){try{let r=yield n.store.getItem(e);return r?r.expireTime&&r.expireTime<Date.now()?(yield n.remove(e),t):r.value:t}catch(e){return console.error(`缓存读取失败:`,e),t}})()}remove(e){var t=this;return l(function*(){try{return yield t.store.removeItem(e),!0}catch(e){return console.error(`缓存删除失败:`,e),!1}})()}clear(){var e=this;return l(function*(){try{return yield e.store.clear(),!0}catch(e){return console.error(`缓存清除失败:`,e),!1}})()}keys(){var e=this;return l(function*(){try{return yield e.store.keys()}catch(e){return console.error(`获取缓存键失败:`,e),[]}})()}has(e){var t=this;return l(function*(){try{let n=yield t.store.getItem(e);return n?n.expireTime&&n.expireTime<Date.now()?(yield t.remove(e),!1):!0:!1}catch(e){return console.error(`检查缓存键失败:`,e),!1}})()}};c(zn,`_instances`,{}),zn.getInstance;function Bn(e,t,n={}){let r=g(jt(e));n.defaultVal&&(r.value=r.value.fromJson(n.defaultVal));let i=t.getInstance(),a=g(!1);return{refLoading:a,refFormData:r,onAdd:function(){var e=l(function*(e,t={}){try{if(a.value)return;a.value=!0,e!=null&&e.toJson||(e=void 0);let o=yield i.save(e||r.value,Object.assign(t,(n==null?void 0:n.args)||{}));return o!=null&&o.id&&(r.value.id=o.id),o}catch(e){var o;if(n.noThrow)return null;throw(o=n.checkHideErrorTip)!=null&&o.call(n,e)||pe({message:`操作失败:${e.errmessage||e.message||e.toString()}`}),e}finally{a.value=!1}});return function(t){return e.apply(this,arguments)}}(),compEntityKey:k(()=>r.value[i.entityKey])}}var Vn=[`total`,`list`,`data`];function Hn(e,t,n){let r=g((n==null?void 0:n.dataPage)||new H),i=g(!1),a=g(!1),o=t.getInstance(),s=g([]),c=g(``),u=g(``),d=g(),f=g({}),p=g({}),m=g();function h(){return _.apply(this,arguments)}function _(){return _=l(function*(e=1,t){i.value=!0,a.value=!1,e===1&&!(n!=null&&n.keepListOnRefresh)&&(s.value=[]);try{var l;r.value.next(e);let i=A(A(A({},(n==null?void 0:n.initArgs)||{}),t||{}),f.value),u=c.value?A({[(n==null?void 0:n.searchKey)||`kw`]:c.value},i):i;n!=null&&n.handleArgs&&(u=n.handleArgs(u));let m=n==null||(l=n.handleApi)==null?void 0:l.call(n,u,n);
1Object.keys(u).forEach(e=>{e.includes(`.`)&&delete u[e];let t=e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase());e.includes(`_`)&&u[t]&&delete u[t]}),p.value=u;let g=yield o[m||(n==null?void 0:n.api)||`list`](r.value,u),{total:_,list:v,data:y}=g,b=te(g,Vn);r.value.setTotal(_);let x=v||y;d.value=b,e>1&&!(x!=null&&x.length)&&(yield h(1)),n!=null&&n.onFetchComplete&&(yield n==null?void 0:n.onFetchComplete(x)),n!=null&&n.disabledInfiniteScroll||e===1?s.value=x:s.value=s.value.concat(x),a.value=s.value.length===0}catch(e){console.log(e),a.value=!0,n!=null&&n.disabledTips||pe({message:`获取数据失败:${e.errmessage||e.message||e.toString()}`}),m.value=e}finally{i.value=!1}}),_.apply(this,arguments)}function v(){return y.apply(this,arguments)}function y(){return y=l(function*(){r.value.current!==1&&(r.value.current=1),f.value={},yield b(1)}),y.apply(this,arguments)}function b(e,t){return x.apply(this,arguments)}function x(){return x=l(function*(e,t){yield h(e||r.value.current,t)}),x.apply(this,arguments)}let ee=(e,t)=>{t.e.key===`Enter`&&(c.value=e,h(1))},S=function(){var e=l(function*(e){r.value=new H().fromJson(e),yield h(r.value.current)});return function(t){return e.apply(this,arguments)}}(),w=function(){var e=l(function*(){(n==null?void 0:n.delay)===`activated`?yield b():yield h()});return function(){return e.apply(this,arguments)}}();return(n==null?void 0:n.delay)===`activated`?le(w):(n==null?void 0:n.delay)!==`selfControl`&&C(w),{refFilterValue:f,onPageChange:S,refKeyword:c,refLoading:i,onRefresh:v,onSearch:ee,refVirtualKeyword:u,onRefreshCurrentPage:b,onGetList:h,onInit:w,refList:s,refDataPage:r,service:o,refOtherData:d,refExpoertArgs:p,refError:m,refEmpty:a}}function Un(e,t){let n=e.getInstance(),r=g(!1),i=function(){var e=l(function*(e,t){yield N({title:t.tipTitle||`提示`,message:t.tipContent||`是否确认删除?`}),yield a(e,t)});return function(t,n){return e.apply(this,arguments)}}(),a=function(){var e=l(function*(e,i){if(!r.value){r.value=!0;try{yield n[(t==null?void 0:t.api)||`delete`](e==null?void 0:e.id,i)}catch(e){if(t!=null&&t.noThrow)return;throw e}finally{r.value=!1}}});return function(t,n){return e.apply(this,arguments)}}();return{onDeleteWithConfirm:i,onDelete:a}}function Wn(e,t){let n=e.getInstance(),r=g([]),i=g(),a=g(!1);function o(){return s.apply(this,arguments)}function s(){return s=l(function*(e={}){try{a.value=!0,r.value=yield n[(t==null?void 0:t.api)||`baseList`](A(A(A({},(t==null?void 0:t.args)||{}),e),{},{getLabel:void 0}))}catch(e){i.value=e}finally{a.value=!1}}),s.apply(this,arguments)}return t!=null&&t.delay||C(o),{refLoading:a,compOpts:k(()=>{if(!r.value.length)return[];let e=r.value.map(e=>{var n,r;return{label:(t==null||(n=t.getLabel)==null?void 0:n.call(t,e))||e.label||e.name||e.title,value:(t==null||(r=t.getValue)==null?void 0:r.call(t,e))||e.value||e.id,extra:e}});return t!=null&&t.checkAll&&e.unshift({label:`全选`,checkAll:!0}),e}),refList:r,onGetList:o}}function J(e,t={}){let n=e.getInstance(),r=(t==null?void 0:t.refEntity)||g((t==null?void 0:t.defaultVal)||null),i=g(),a=g(!1);return{params:t,refEntity:r,refError:i,refLoading:a,onDetail:function(){var e=l(function*(e,o){try{a.value=!0,r.value=yield n[(t==null?void 0:t.api)||`get`](e==null?void 0:e[n.entityKey],A(A({},t!=null&&t.handleArgs?t.handleArgs(e,t.args||{}):(t==null?void 0:t.args)||{}),o||{}))}catch(e){if(i.value=e,!(t!=null&&t.noThrow))throw e}finally{a.value=!1}});return function(t,n){return e.apply(this,arguments)}}()}}var Gn=class extends V{constructor(...e){super(...e),c(this,`desc`,void 0),c(this,`logo`,void 0),c(this,`name`,void 0),c(this,`type`,void 0),c(this,`orgId`,void 0),c(this,`bigLogo`,void 0),c(this,`gainedAt`,void 0)}},Kn=class extends V{constructor(...e){super(...e),c(this,`orgId`,void 0),c(this,`avatar`,void 0),c(this,`uuid`,void 0),c(this,`name`,void 0),c(this,`description`,void 0),c(this,`dynamicPickNum`,void 0),c(this,`marks`,[]),c(this,`status`,void 0)}fromJson(e){return super.fromJson(e),e.marks&&Array.isArray(e.marks)&&(this.marks=e.marks.map(e=>new Gn().fromJson(e))),this}},qn=class extends an{constructor(...e){super(...e),c(this,`box`,void 0)}fromJson(e){return super.fromJson(e),e.box&&(this.key=e.box),this}},Jn=class extends V{constructor(...e){super(...e),c(this,`audio`,[]),c(this,`image`,[]),c(this,`video`,[])}
1get firstVideoCover(){var e;return((e=this.video)==null||(e=e[0])==null?void 0:e.cover)||``}fromJson(e){return super.fromJson(e),e.video&&Array.isArray(e.video)&&(this.video=e.video.map(e=>new qn().fromJson(e))),this}},Yn=class extends V{constructor(...e){super(...e),c(this,`src`,void 0),c(this,`poster`,void 0),c(this,`title`,void 0)}},Xn=class extends V{constructor(...e){super(...e),c(this,`likes`,void 0),c(this,`publishNum`,void 0),c(this,`topNum`,void 0),c(this,`comments`,void 0),c(this,`likeCode`,void 0),c(this,`sourceId`,void 0),c(this,`name`,void 0),c(this,`userLike`,void 0),c(this,`codeImgClose`,void 0),c(this,`codeImgOpen`,void 0),c(this,`likeStatus`,void 0),c(this,`commentsTotalGoodNum`,void 0)}},Zn=class extends V{constructor(...e){super(...e),c(this,`city`,void 0),c(this,`region`,void 0),c(this,`country`,void 0),c(this,`district`,void 0),c(this,`location`,void 0)}},Qn=class extends V{constructor(...e){super(...e),c(this,`orgId`,void 0),c(this,`title`,void 0),c(this,`cover`,void 0),c(this,`content`,void 0),c(this,`publishTime`,void 0),c(this,`source`,void 0),c(this,`authorship`,void 0),c(this,`visitNum`,void 0),c(this,`authType`,void 0),c(this,`sortPick`,void 0),c(this,`contentAsset`,void 0),c(this,`type`,void 0),c(this,`location`,void 0),c(this,`status`,void 0),c(this,`isPick`,void 0),c(this,`createTime`,void 0),c(this,`module`,void 0),c(this,`authorDetail`,void 0),c(this,`videos`,[]),c(this,`author`,void 0),c(this,`labels`,[]),c(this,`comments`,void 0),c(this,`siteId`,void 0),c(this,`extLabels`,void 0),c(this,`proofreader`,void 0),c(this,`relatedIds`,void 0),c(this,`isSensitive`,void 0),c(this,`shareImgUrl`,void 0),c(this,`auditPushedAt`,void 0),c(this,`editorIncharge`,void 0)}get publishTimeText(){return this.publishTime?L.default.unix(this.publishTime).format(`YYYY-MM-DD HH:mm:ss`):``}get speedDisabled(){var e,t;return((e=this)==null||(e=e.title)==null?void 0:e.includes(`习近平`))||((t=this)==null||(t=t.content)==null?void 0:t.includes(`习近平`))}get appUrl(){return K({module:`dynamic`,dynamic_id:this.id},!0)}get share(){return{title:this.title,thumb:this.shareImgUrl||``,desc:``,app_url:this.appUrl,dynamic_url:this.appUrl,url:window.location.href,id:this.id,siteId:this.siteId,contentSub:this.content&&this.content||``,extLabels:{}}}get mediaType(){var e,t,n;return!((e=this.contentAsset)==null||(e=e.video)==null)&&e.length?`video`:!((t=this.contentAsset)==null||(t=t.image)==null)&&t.length?`image`:!((n=this.contentAsset)==null||(n=n.audio)==null)&&n.length?`audio`:`text`}fromJson(e){return super.fromJson(e),e!=null&&e.content_asset&&typeof(e==null?void 0:e.content_asset)==`object`&&(this.contentAsset=new Jn().fromJson(e.content_asset)),e!=null&&e.location&&typeof(e==null?void 0:e.location)==`object`&&(this.location=new Zn().fromJson(e.location)),e!=null&&e.author_detail&&typeof(e==null?void 0:e.author_detail)==`object`&&(this.authorDetail=new Kn().fromJson(e.author_detail)),e!=null&&e.videos&&Array.isArray(e==null?void 0:e.videos)&&(this.videos=e.videos.map(e=>new Yn().fromJson(e))),e!=null&&e.comments&&typeof(e==null?void 0:e.comments)==`object`&&(this.comments=new Xn().fromJson(e.comments)),this}},$n=class extends G{constructor(...e){super(...e),c(this,`entityClass`,Qn),c(this,`urlForGetDetail`,we),c(this,`urlForGetPage`,Te)}search(e,t){return super.list(e,A(A({},t),{},{apiUrl:Ee}))}},er=class extends V{constructor(...e){super(...e),c(this,`img`,void 0),c(this,`outside`,void 0),c(this,`adFlagPos`,void 0)}},tr=class extends V{constructor(...e){super(...e),c(this,`extInfo`,void 0),c(this,`jumpUrl`,void 0),c(this,`clickUrl`,void 0),c(this,`showAdFlag`,void 0)}fromJson(e){return super.fromJson(e),e.ext_info&&typeof e.ext_info==`object`&&(this.extInfo=new er().fromJson(e.ext_info)),this}},nr=class extends G{constructor(...e){super(...e),c(this,`entityClass`,tr),c(this,`urlForGetDetail`,je)}},rr=class extends V{constructor(...e){super(...e),c(this,`orgId`,void 0),c(this,`clientAppId`,void 0),c(this,`topicId`,void 0),c(this,`type`,void 0),c(this,`cover`,void 0),c(this,`title`,void 0),c(this,`target`,void 0)}get appWakeupOpt(){switch(this.type){case`post`:return{module:`post`,post_key:this.target};case`topic`:return{module:`topic`,topicId:this.target};case`live`:return{module:`live`,id:this.target};
1case`liveTopic`:return{module:`liveSubject`,id:this.target};case`url`:return{module:`h5`,url:this.target};case`cms`:return{module:`post`,[Ln.numeric(this.target)?`post_id`:`post_key`]:this.target}}}},ir=class e extends V{constructor(...e){super(...e),c(this,`orgId`,void 0),c(this,`clientAppId`,void 0),c(this,`title`,void 0),c(this,`data`,void 0),c(this,`pid`,void 0),c(this,`contentType`,void 0),c(this,`icon`,void 0),c(this,`cover`,void 0),c(this,`desc`,void 0),c(this,`cmsNode`,void 0),c(this,`extInfo`,void 0),c(this,`topicTypeId`,void 0),c(this,`status`,void 0),c(this,`deletedAt`,void 0),c(this,`topicMenus`,[]),c(this,`topicColumns`,[])}get isNodePost(){return this.contentType===`postNode`}get dataId(){return this.data[0]}get isSelectPost(){return this.contentType===`post`}get isLive(){return this.contentType.includes(`live`)}get liveIds(){if(this.contentType===`live`){var e;return(e=this.data)==null||(e=e.filter(e=>e))==null?void 0:e.map(e=>e.id)}}get liveSubjectId(){if(this.contentType===`liveTopic`)return this.dataId}get share(){return{title:this.title,thumb:``,desc:this.desc,dynamic_url:K({module:`topic`,cmsNodeId:this.id},!0),url:window.location.href,id:this.id}}fromJson(t){return super.fromJson(t),t.ext_info&&typeof t.ext_info==`string`&&(this.extInfo=R(t.ext_info)),t.topic_menus&&Array.isArray(t.topic_menus)&&(this.topicMenus=t.topic_menus.map(e=>new rr().fromJson(e))),t.topic_columns&&Array.isArray(t.topic_columns)&&(this.topicColumns=t.topic_columns.map(t=>new e().fromJson(t)),this.topicColumns.unshift(new e().fromJson({id:-1,title:`最新文章`,content_type:`postNode`,data:[this.cmsNode]}))),this.cmsNode&&(this.cmsNode=Number(this.cmsNode)),this}},ar=class extends G{constructor(...e){super(...e),c(this,`entityClass`,ir),c(this,`urlForGetDetail`,ct)}dataList(e){return l(function*(){return W.post(lt,e)})()}},or=class extends V{constructor(...e){super(...e),c(this,`area`,void 0),c(this,`city`,void 0),c(this,`cityId`,void 0),c(this,`country`,void 0),c(this,`countryId`,void 0),c(this,`district`,void 0),c(this,`districtId`,void 0),c(this,`isp`,void 0),c(this,`lat`,void 0),c(this,`lng`,void 0),c(this,`location`,void 0),c(this,`region`,void 0),c(this,`regionId`,void 0)}},sr=class extends G{constructor(...e){super(...e),c(this,`entityClass`,or),c(this,`urlForGetDetail`,Fe)}},cr=class extends V{constructor(...e){super(...e),c(this,`orgId`,void 0),c(this,`name`,void 0),c(this,`bigLogo`,void 0),c(this,`logo`,void 0),c(this,`type`,void 0),c(this,`desc`,void 0),c(this,`gainedAt`,void 0)}},lr=class extends V{constructor(...e){super(...e),c(this,`sex`,void 0),c(this,`introduction`,void 0),c(this,`avatar`,void 0),c(this,`background`,void 0),c(this,`region`,void 0),c(this,`community`,void 0)}},ur=class extends V{constructor(...e){super(...e),c(this,`uuid`,void 0),c(this,`showId`,void 0),c(this,`phone`,void 0),c(this,`areaCode`,void 0),c(this,`name`,void 0),c(this,`status`,void 0),c(this,`certLv`,void 0),c(this,`initState`,void 0),c(this,`marks`,void 0),c(this,`fansCnt`,void 0),c(this,`followsCnt`,void 0),c(this,`person`,void 0),c(this,`avatar`,void 0),c(this,`description`,void 0),c(this,`sessionId`,void 0),c(this,`extroInfo`,void 0)}get logo(){var e;return(e=this.marks[0])==null?void 0:e.logo}get isRegisterTimeLessThan7Days(){return(0,L.default)().diff((0,L.default)(this.createdAt),`day`)<7}toTrackJson(){return{id:this.uuid,extro_info:this.extroInfo}}fromJson(e){return super.fromJson(e),e.marks&&Array.isArray(e.marks)&&(this.marks=e.marks.map(e=>new cr().fromJson(e))),e.person&&typeof e.person==`object`&&(this.person=new lr().fromJson(e.person)),this}},dr=class extends V{constructor(...e){super(...e),c(this,`location`,void 0),c(this,`user`,void 0)}fromJson(e){return super.fromJson(e),e.location&&typeof e.location==`object`&&(this.location=new or().fromJson(e.location)),e.user&&typeof e.user==`object`&&(this.user=new ur().fromJson(e.user)),this}},fr=class extends G{constructor(...e){super(...e),c(this,`entityClass`,ur),c(this,`urlForGetDetail`,Pe)}getUserInfo(e){return l(function*(e,t={}){let n=yield W.post(Me,t);return n?new dr().fromJson(n):null}).apply(this,arguments)}getUserInfoByUuid(e){return l(function*(e,t={}){let n=yield W.get(Ne,t);return n?new dr().fromJson(n):null}).apply(this,arguments)}follow(e){return l(function*(){yield W.post(Ge,{follower_uuid:e})})()}unfollow(e){return l(function*(){yield W.post(Ke,{follower_uuid:e})})()}getFollowList(){return l(function*(e={}){return yield W.get(qe,e)}).apply(this,arguments)}getFansList(){return l(function*(e={}){return yield W.get(Je,e)}).apply(this,arguments)}getBatchFollowStatus(e){return l(function*(){if(!e.length)return{};let t=yield W.post(Ye,{follower_uuids:e});return t!=null&&t.list&&typeof t.list==`object`?t.list:{}})()}autoLogin(e=!1){return l(function*(){let t=yield O(e);if(!(t!=null&&t.data))throw Error(`App token is required`);let n=yield W.post(He,{},{appToken:t.data});return new ur().fromJson(n)})()}},pr=class extends V{constructor(...e){super(...e),c(this,`desc`,void 0),c(this,`name`,void 0),c(this,`time`,void 0),c(this,`cover`,void 0),c(this,`group`,void 0),c(this,`skinId`,void 0),c(this,`coverId`,void 0),c(this,`talkers`,void 0),c(this,`functions`,void 0),c(this,`shareMode`,void 0),c(this,`shareCover`,void 0),c(this,`shareTitle`,void 0),c(this,`pushStatus`,void 0),c(this,`pushUserId`,void 0),c(this,`userEndTime`,void 0),c(this,`userStartTime`,void 0)}},mr=class extends V{constructor(...e){super(...e),c(this,`orgId`,void 0),c(this,`subject`,void 0),c(this,`name`,void 0),c(this,`icon`,void 0),c(this,`cover`,void 0),c(this,`shareIcon`,void 0),c(this,`showType`,void 0),c(this,`desc`,void 0),c(this,`level`,void 0),c(this,`parentId`,void 0),c(this,`status`,void 0),c(this,`deletedAt`,void 0)}get share(){return{title:this.name,thumb:this.shareIcon||this.cover,desc:this.desc,dynamic_url:K({module:`liveSubject`,i
1d:this.id},!0),url:window.location.href,contentSub:this.desc||``}}},hr=class extends V{constructor(...e){super(...e),c(this,`orgId`,void 0),c(this,`name`,void 0),c(this,`attr`,void 0),c(this,`group`,void 0),c(this,`startTime`,void 0),c(this,`endTime`,void 0),c(this,`status`,void 0),c(this,`searchDesc`,void 0),c(this,`deletedAt`,void 0),c(this,`commentBlockSourceId`,void 0),c(this,`liveType`,void 0),c(this,`platformId`,void 0),c(this,`time`,void 0),c(this,`watchTime`,void 0),c(this,`yugaoExist`,void 0),c(this,`zhiboExist`,void 0),c(this,`huiguExist`,void 0),c(this,`isCollect`,void 0),c(this,`messageVersion`,void 0),c(this,`commentVersion`,void 0),c(this,`maxOnlineDb`,void 0),c(this,`auditLevel`,void 0),c(this,`curLevel`,void 0),c(this,`openBigMode`,void 0),c(this,`type`,void 0),c(this,`keywords`,void 0),c(this,`vr`,void 0),c(this,`vrWatchTime`,void 0),c(this,`liveStatusDesc`,void 0),c(this,`liveStatusCode`,void 0),c(this,`frontUrl`,void 0),c(this,`liveFormDesc`,void 0),c(this,`pubStatus`,void 0),c(this,`isBooked`,void 0),c(this,`subjectGroups`,[])}get isImageLive(){return this.liveFormDesc===`图文直播`}get startTimeText(){let e=L.default.unix(this.attr.time),t=(0,L.default)();if(e.isAfter(t)){if(e.isToday()||e.isTomorrow()||e.isTheDayAfterTomorrow())return e.format(`HH:mm`)}else if(e.isSame(t,`year`))return e.format(`MM-DD HH:mm`);return e.format(`YYYY-MM-DD HH:mm`)}get statusResult(){return this.liveStatusDesc===`正在直播`?{color:`#FF3333`,label:`直播中`}:this.liveStatusDesc===`直播预告`?{color:`#FF7E33`,label:`预告`}:{color:`#999999`,label:`回放`}}fromJson(e){return super.fromJson(e),e.attr&&typeof e.attr==`string`?this.attr=new pr().fromJson(R(e.attr)):e.attr&&typeof e.attr==`object`&&(this.attr=new pr().fromJson(e.attr)),e.subject_groups&&Array.isArray(e.subject_groups)&&(this.subjectGroups=e.subject_groups.map(e=>new mr().fromJson(e))),this}},gr=class extends G{constructor(...e){super(...e),c(this,`entityClass`,hr),c(this,`dataKey`,`data`),c(this,`urlForGetPage`,ke)}list(e,t){var n=()=>super.list,r=this;return l(function*(){return n().call(r,e,A({page:e.current,pageNum:e.pageSize},t))})()}getDataByIds(e,t){return super.list(e,A({apiUrl:ut},t))}};function _r(e,t){return vr.apply(this,arguments)}function vr(){return vr=l(function*(e,t,n=!1){let{reportAppLogin:r}=Y();r(),yield Rr({redirectUrl:e||window.location.href,appConfig:t},void 0,n)}),vr.apply(this,arguments)}var yr=j(()=>{let{refEntity:e,refLoading:t,onDetail:n}=J(fr),{refEntity:r,refLoading:i,onDetail:a}=J(sr),o=g(!1),s=k(()=>!!e.value),c=k(()=>{var t;return(t=e.value)==null?void 0:t.person}),u=k(()=>{var t;return(t=e.value)==null?void 0:t.uuid}),d=function(){var t=l(function*(){var t,i;let a=[];yield m(),(t=e.value)!=null&&t.uuid||a.push(n()),(i=r.value)!=null&&i.countryId||a.push(f()),yield Promise.all(a),o.value=!0,Fn(e.value)});return function(){return t.apply(this,arguments)}}(),f=function(){var e=l(function*(){if(i.value){yield z(()=>!i.value);return}r.value||(yield a())});return function(){return e.apply(this,arguments)}}(),p=()=>{s.value||_r()},m=function(){var e=l(function*(){if(y.value){yield z(()=>!y.value);return}});return function(){return e.apply(this,arguments)}}(),h=function(){var n=l(function*(n){e.value=n,t.value=!1,Fn(n)});return function(e){return n.apply(this,arguments)}}(),_=()=>{e.value=void 0,o.value=!1,t.value=!1},v=function(){var e=l(function*(e=!1){let[t,n]=yield It(fr.getInstance().autoLogin(e));return t?!1:(h(n),!0)});return function(){return e.apply(this,arguments)}}(),y=k(()=>t.value||i.value);return{refSelfInfo:e,refLocation:r,compIsLoggedIn:s,compCurrentUser:c,compCurrentUserUuid:u,refCompleteFetched:o,onGetUserInfo:d,compIsLoading:y,onGetIpLocation:f,onGoToLogin:p,onUntilUserInfoComplete:m,onSetSelfUserInfo:h,onAutoLogin:v,onClearUserInfo:_}});window.report_queue=window.report_queue||[];var br=new Date().getTime(),xr=`__AH_BI_BROWSER_ID__@v1`,Sr=()=>{try{let e=localStorage.getItem(xr);if(e)return e;let t=D();return localStorage.setItem(xr,t),t}catch(e){return``}};function Y(){let{refSelfInfo:e,refLocation:t,onGetIpLocation:n}=yr(),r={},i=e=>e,a=(t,n={})=>{let r=e.value;if(r){var i,a;t.user_region=(i=r.person)==null?void 0:i.region,t.user_sex=((a=r.person)==null?void 0:a.sex)||-1,t.user_name=r.name,t.user_id=r.uuid;return}let o=n.useCache===!1?null:In();o?(t.user_region=o.region,t.user_sex=o.sex||-1,t.user_name=o.name,t.user_id=o.uuid):(t.user_region=``,t.user_sex=``,t.user_name=`未登录用户`,t.user_id=_())},o=e=>{var n,r;e.ip_region=((n=t.value)==null?void 0:n.region)||``,e.ip_city=((r=t.value)==null?void 0:r.city)||``},s=function(){var e=l(function*(){return yield Promise.all([n(),v()])});return function(){return e.apply(this,arguments)}}(),c=function(){var e=l(function*(e={}){let[,t]=yield s();window.report_queue.push(function(n){let{info:r}=n,{browser:s,screen:c,viewport:l}=r,u={device_id:t,device_type:`browser`,device_brand:s.platform_name,device_model:s.browser_name,os_name:s.os_name,os_version:s.os_version,screen_height:c.screen_height,screen_width:c.screen_width,viewport_height:l.viewport_height,viewport_width:l.viewport_width,is_physical:1,build_num:``,version:``,login_type:e.login_type||`网页授权登录`,
1is_success:1,multi_apps:`ah_app`};return o(u),a(u),{event:`app_login`,data:i(u)}})});return function(){return e.apply(this,arguments)}}(),u=function(){var e=l(function*(e={}){let[,t]=yield s();window.report_queue.push(function(n){let{info:i}=n,{browser:s,screen:c,viewport:l}=i,u=Nt((0,L.default)().unix()-r[e.uuid]);r[e.uuid]=0;let d={event:`web_audio_stop`,data:{device_id:t,duration:u,from:ht[e.from]||e.from,object_id:e.object_id||0,platform_name:s.platform_name,os_name:s.os_name,os_version:s.os_version,screen_height:c.screen_height,screen_width:c.screen_width,browser_name:s.browser_name,browser_version:s.browser_version,viewport_height:l.viewport_height,viewport_width:l.viewport_width,url:window.location.href,title:e.title||document.title}};return o(d),a(d.data),d.data,d})});return function(){return e.apply(this,arguments)}}(),d=function(){var e=l(function*(e={}){let[,t]=yield s();window.report_queue.push(function(n){let{info:i}=n,{browser:s,screen:c,viewport:l}=i;r[e.uuid]=(0,L.default)().unix();let u={event:`web_audio_play`,data:{device_id:t,from:ht[e.from]||e.from,object_id:e.object_id||0,platform_name:s.platform_name,os_name:s.os_name,os_version:s.os_version,screen_height:c.screen_height,screen_width:c.screen_width,browser_name:s.browser_name,browser_version:s.browser_version,viewport_height:l.viewport_height,viewport_width:l.viewport_width,url:window.location.href,title:e.title||document.title}};return o(u),a(u.data),u.data,u})});return function(){return e.apply(this,arguments)}}(),f=function(){var e=l(function*(e={}){let[,t]=yield s(),n=window._CONFIG.isInApp?yield T():{};window.report_queue.push(function(r){let{info:i}=r,{browser:s,screen:c,viewport:l}=i,u={event:`app_hot_click`,data:{screen_height:c.screen_height,screen_width:c.screen_width,viewport_height:l.viewport_height,viewport_width:l.viewport_width,topic_name:e.topic_name,topic_id:e.topic_id,topic_num:e.topic_num,multi_apps:`ah_app`,current_page:e.current_page,device_id:t,device_type:n.device_type||`browser`,device_brand:n.device_brand||s.platform_name,device_model:n.device_model||s.browser_name,os_name:n.os_name||s.os_name,os_version:n.os_version||s.os_version,is_physical:n.is_physical||1,build_num:n.build_num||``,version:n.version||``}};return o(u),a(u.data),u.data,u})});return function(){return e.apply(this,arguments)}}(),p=function(){var e=l(function*(e={}){let t=yield v();window.report_queue.push(function(n){let{info:r}=n,{browser:a,performance:o}=r;return{event:`pageshow`,data:i({device_id:t,title:e.title||document.title,url:location.href,browser_name:a.browser_name,browser_version:a.browser_version,os_name:a.os_name,os_version:a.os_version,platform_name:a.platform_name,first_screen_time:new Date().getTime()-br,loading_time:o.first_dns_time+o.first_tcp_time+o.first_request_time+o.first_response_time})}})});return function(){return e.apply(this,arguments)}}(),m=function(){var e=l(function*(e){let[,t]=yield s();window.report_queue.push(function(n){let r=A(A({},y(n.info)),{},{device_id:t,browser_id:Sr(),from:document.referrer,page_type:e.page_type,page_title:e.title||document.title,object_id:e.object_id||0,title:e.title||document.title,pub_time:e==null?void 0:e.pub_time,published_at:e==null?void 0:e.published_at,site_id:e==null?void 0:e.site_id,node_id:e==null?void 0:e.node_id,source_post_id:e==null?void 0:e.source_post_id,multi_apps:`ah_web`,source_type:window._CONFIG.isInApp?`app`:`web`,parent_id:0});return o(r),a(r),{event:`web_pageview`,data:i(r)}})});return function(t){return e.apply(this,arguments)}}(),h=function(){var e=l(function*(e){if(!(e!=null&&e.key))return;let t=yield v();window.report_queue.push(function(n){let r=A(A({},y(n.info)),{},{device_id:t,title:document.title,referrer:document.referrer,org_id:window._CONFIG.ORGID,site_id:e.siteId,node_id:e.node.id,source_post_id:e.post.id,is_original:e.post.isOriginal,post_id:e.id,post_type:e.post.type,created_by:e.userId||0,published_by:e.firstPublishedBy||0,from:window._CONFIG.isInApp?`app`:`web`,pub_time:e.pubTime,published_at:e.publishedAt,published_at_timestamp:e.pubTime?(0,L.default)(e.pubTime).valueOf():void 0,pub_time_timestamp_two:e.publishedAt?(0,L.default)(e.publishedAt).valueOf():void 0,multi_apps:`ah_cms`});return a(r),{event:`post_pageview`,data:i(r)}})});return function(t){return e.apply(this,arguments)}}(),g=function(){var e=l(function*(e){if(!(e!=null&&e.id))return;let t=yield v();window.report_queue.push(function(n){return{event:`post_pageview`,data:i(A(A({},y(n.info)),{},{device_id:t,title:document.title,referrer:document.referrer,org_id:window._CONFIG.ORGID,site_id:e.siteId,source_post_id:e.id,is_original:e.isPick,post_id:e.id,post_type:e.type,created_by:e.author||0,published_by:e.author||0,pub_time:e.publishTime,from:window._CONFIG.isInApp?`app`:`web`,published_at:e.publishTimeText,published_at_timestamp:e.publishTime?(0,L.default)(e.publishTime).valueOf():void 0,pub_time_timestamp_two:e.publishTime?(0,L.default)(e.publishTime).valueOf():void 0,multi_apps:`ah_cms`}))}})});return function(t){return e.apply(this,arguments)}}(),_=()=>{let e=localStorage.getItem(gt);return e||(e=window.__DEVICE_ID__||D(),localStorage.setItem(gt,e),e)},v=function(){var e=l(function*(){let e=window._CONFIG.isInApp?yield T():{};if(e!=null&&e.device_id)return localStorage.setItem(gt,e.device_id),e.device_id;let t=localStorage.getItem(gt);return t||(t=window.__DEVICE_ID__||D(),localStorage.setItem(gt,t),t)});return function(){return e.apply(this,arguments)}}(),y=e=>{let{browser:t,screen:n,viewport:r}=e;return{platform_name:t.platform_name,os_name:t.os_name,os_version:t.os_version,screen_height:n.screen_height,screen_width:n.screen_width,browser_name:t.browser_name,browser_version:t.browser_version,viewport_height:r.viewport_height,viewport_width:r.viewport_width,url:window.location.href}};return{onGetIpLocation:n,setUserProps:a,setIpLocation:o,reportPageShow:p,reportWebPageView:m,reportAppHotClick:f,reportWebAudioPause:u,reportWebAudioPlay:d,reportNo
1dePageView:function(){var e=l(function*(e){let[,t]=yield s();window.report_queue.push(function(n){let r=A(A({},y(n.info)),{},{device_id:t,title:e.title||document.title,parent_id:e.parent_id,referrer:document.referrer,site_id:e.siteId,node_id:e.nodeId,node_type:e.nodeType,from:window._CONFIG.isInApp?`app`:`web`,multi_apps:`ah_cms`,org_id:window._CONFIG.ORGID});return o(r),a(r),{event:`node_pageview`,data:i(r)}})});return function(t){return e.apply(this,arguments)}}(),reportAppLogin:c,reportPostPageView:h,reportDynamicPageView:g,reportWebInteraction:function(){var e=l(function*(e){let[,t]=yield s();window.report_queue.push(function(n){let r=A(A({},y(n.info)),{},{title:e.title||document.title,device_id:t,interaction_type:e.interaction_type,object_type:e.object_type,object_id:e.object_id,site_id:e.site_id,node_id:e.node_id,source_post_id:e.source_post_id});return o(r),a(r),{event:`web_interaction`,data:i(r)}})});return function(t){return e.apply(this,arguments)}}()}}var Cr=`__AH_QT_COOKIE_ID__@v1`,wr={1:`男`,2:`女`},Tr=null,Er=(e,t)=>{window.aplus_queue=window.aplus_queue||[],window.aplus_queue.push({action:e,arguments:t})},Dr=()=>{try{let e=localStorage.getItem(Cr);if(e)return e;let t=D();return localStorage.setItem(Cr,t),t}catch(e){return``}},Or=function(){var e=l(function*(){return window._CONFIG.isInApp?(Tr||(Tr=T().catch(()=>({}))),Tr):{}});return function(){return e.apply(this,arguments)}}(),kr=()=>{let e=navigator.userAgent,t=e.match(/(?:iPhone|iPad|iPod).*? OS ([\d_]+)/);if(t)return{system:`iOS`,version:t[1].replace(/_/g,`.`)};let n=e.match(/Android[\s/]([\d.]+)/);return n?{system:`Android`,version:n[1]}:{system:``,version:``}},Ar=e=>{let t={};return Object.keys(e).forEach(n=>{let r=e[n];t[n]=r==null?``:r}),t};function jr(){let{refSelfInfo:e,refLocation:t,onGetIpLocation:n}=yr(),r=()=>{let t=e.value;if(t){var n;return{userId:t.uuid,phone:t.phone||``,gender:wr[Number((n=t.person)==null?void 0:n.sex)]||``,firstRegistDate:t.createdAt?(0,L.default)(t.createdAt).valueOf():0}}let r=In();return{userId:(r==null?void 0:r.uuid)||``,phone:``,gender:wr[Number(r==null?void 0:r.sex)]||``,firstRegistDate:0}},i=function(){var e=l(function*(){let[,e]=yield Promise.all([n().catch(()=>void 0),Or()]),i=window._CONFIG.isInApp,a=kr(),o=t.value,s=r();Er(`aplus.setMetaInfo`,[`_user_id`,s.userId]),Er(`aplus.setMetaInfo`,[`globalproperty`,A({registration_source:s.phone,gender:s.gender,age:0,first_account_regist_date:s.firstRegistDate,country:(o==null?void 0:o.country)||``,province:(o==null?void 0:o.region)||``,city:(o==null?void 0:o.city)||``,device_brand:e.device_brand||``,device_model:e.device_model||``,device_system:e.os_name||a.system,device_system_version:e.os_version||a.version,network_access_type:(o==null?void 0:o.isp)||``},i?{device_id:e.device_id||window.__DEVICE_ID__||``}:{cookie_id:Dr()})])});return function(){return e.apply(this,arguments)}}();return{syncCommonProps:i,trackEvent:function(){var e=l(function*(e,t,n={}){yield i(),Er(`aplus.record`,[e,t,Ar(n)])});return function(t,n){return e.apply(this,arguments)}}(),trackPageView:function(){var e=l(function*(e,t={}){yield i(),Er(`aplus.sendPV`,[{is_auto:!1},Ar(A({page_name:e},t))])});return function(t){return e.apply(this,arguments)}}(),getQtCookieId:Dr}}var Mr={normal:`常规`,headline_news:`标题`,gallery_news:`图集`,video_news:`视频`},Nr=g(null);function Pr(){let{trackEvent:e,trackPageView:t}=jr(),n=e=>{var t,n,r,i,a;let o=e.subType||((t=e.post)==null?void 0:t.subType)||``,s=e.title||((n=e.post)==null?void 0:n.title)||``;return{article_name:s,article_type:Mr[o]||Mr.normal,article_id:(r=(i=e.post)==null?void 0:i.id)==null?``:r,originality:(a=e.post)!=null&&a.isOriginal?`是`:`否`,article_author:e.author||``,current_page_name:s,current_page_id:e.key||``}},r=e=>{Nr.value=e};return{setTrackArticle:r,reportArticleDetailsPageView:function(){var e=l(function*(e){e!=null&&e.key&&(r(e),yield t(`article_details_pg`,A(A({},n(e)),{},{current_create_date:e.pubTime?(0,L.default)(e.pubTime).valueOf():0})))});return function(t){return e.apply(this,arguments)}}(),reportArticleDetailsClick:function(){var t=l(function*(t){let r=Nr.value;r&&(yield e(`article_details_clk`,`CLK`,A({button_name:t},n(r))))});return function(e){return t.apply(this,arguments)}}(),reportArticleDetailsResult:function(){var t=l(function*(t){let r=Nr.value;r&&(yield e(`article_details_result`,`OTHER`,A({button_name:t.buttonName,button_status:t.buttonStatus,share_channel_name:t.shareChannelName||``,special_topic_name:t.specialTopicName||``},n(r))))});return function(e){return t.apply(this,arguments)}}()}}function Fr(){let e=g(!1);return{onRoutePost:function(){var t=l(function*(t){if(!(e!=null&&e.value)){e.value=!0;try{hn(t)}catch(e){console.log(e)}finally{e.value=!1}}});return function(e){return t.apply(this,arguments)}}(),refLoading:e}}function Ir(){return Lr.apply(this,arguments)}function Lr(){return Lr=l(function*(e={}){let{redirectUrl:t,appConfig:n,autoLogin:r=!1,state:i}=e,a=i||(yield Gr.getInstance().redirectLoginWx({url:window.btoa(t||window.location.href)})),o=new URLSearchParams({app:window._CONFIG.ucApp,org_id:window._CONFIG.ORGID,state:a,fast_login:String(B()?2:0)});return n&&o.set(`app_config`,n),r&&o.set(`auto_login`,`1`),B()?`${window._CONFIG.ucUrl}/oauth/login?${o.toString()}`:`${window._CONFIG.ucUrl}/applogin?${o.toString()}`}),Lr.apply(this,arguments)}function Rr(e,t){return zr.apply(this,arguments)}function zr(){return zr=l(function*(e,t,n=!1){let r;typeof e==`string`?r=yield Ir({state:e,appConfig:t}):(r=yield Ir(e),n=e.autoLogin||n),n?window.location.replace(r):window.location.href=r}),zr.apply(this,arguments)}var Br=j(()=>{let e=g({}),t={};return{refState:e,setState:(n,r,i=!1)=>(e.value[n]=r,(!t[n]||i)&&(t[n]=k(()=>e.value[n])),t[n]),getState:(e,n)=>t[e]||n}}),Vr=j(()=>{let e=g(!1),t=Mt(window.location.href),n=window._CONFIG.isInApp,{onDetail:r,refEntity:i,refLoading:a,refError:o}=J(pn,{defaultVal:window._POST_DATA_FROM_APP?new fn().fromJson(window._POST_DATA_FROM_APP):void 0,args:{preview:!1,tr_cotent:1,k:t.get(`k`),id:t.get(`id`)}}),s=k(()=>{var e;return K({module:`post`,post_id:(e=i.value)==null?void 0:e.id},!1)}),c=g(!1),u=function(){var e=l(function*(){let e=window.__EARLY_POST_PROMISE__;if(!e)return!1;window.__EARLY_POST_PROMISE__=void 0;try{var t;c.value=!0;let n=yield e,r=(n==null?void 0:n.errcode)===0?n==null||(t=n.data)==null?void 0:t.data:null;return r!=null&&r.id?(i.value=new fn().fromJson(r),!0):!1}catch(e){return!1}finally{c.value=!1}});return function(){return e.apply(this,arguments)}}();return{onGetPostDetail:function(){var e=l(function*(){var e,t;if(window._CONFIG.isInApp&&!((e=i.value)!=null&&e.id))yield z(()=>!!window._POST_DATA_FROM_APP,{step:50,timeoutResolve:!0,timeout:200}),window._POST_DATA_FROM_APP?i.value=new fn().fromJson(window._POST_DATA_FROM_APP):yield r();else if(!((t=i.value)!=null&&t.id)){var n;!(yield u())&&!((n=i.value)!=null&&n.id)&&(yield r())}});return function(){return e.apply(this,arguments)}}(),refPostEntity:i,refPostLoading:k(()=>window._POST_DATA_FROM_APP?!1:c.value||a.value),refPostError:o,compWakeUpPath:s,refPostRealLoginInApp:e,isInApp:n,onGetPostFromRemote:r,setPostRealLoginInApp:t=>{e.value=t}}});j(()=>{let e=Mt(window.location.href),t=window._CONFIG.isInApp,{onDetail:n,refEntity:r,refLoading:i,refError:a}=J($n,{defaultVal:window._POST_DATA_FROM_APP?new Qn().fromJson(window._POST_DATA_FROM_APP):void 0,args:{id:e.get(`id`)}}),o=k(()=>{var e;return K({module:`post`,post_id:(e=r.value)==null?void 0:e.id},!1)});return{onGetDynamicDetail:function(){var e=l(function*(){var e,t;window._CONFIG.isInApp&&!((e=r.value)!=null&&e.id)?(yield z(()=>!!window._POST_DATA_FROM_APP,{step:50,timeoutResolve:!0,timeout:100}),window._POST_DATA_FROM_APP?r.value=new Qn().fromJson(window._POST_DATA_FROM_APP):yield n()):(t=r.value)!=null&&t.id||(yield n())});return function(){return e.apply(this,arguments)}}(),refDynamicEntity:r,refDynamicLoading:k(()=>window._POST_DATA_FROM_APP?!1:i.value),refDynamicError:a,compWakeUpPath:o,isInApp:t,onGetDynamicFromRemote:n}});var Hr=j(()=>{let e=g({}),t=g(!1);return{refAdMap:e,refLoading:t,getAdvertisement:function(){var n=l(function*(n){if(e.value[n.id])return e.value[n.id];t.value=!0;try{let t=nr.getInstance(),r=n.extInfo.video_ad,i=yield t.get(void 0,{apiUrl:r,method:`get`});return i&&(e.value[n.id]=i),i}finally{t.value=!1}});return function(e){return n.apply(this,arguments)}}()}}),Ur=j(()=>{let e=g([]);function t(t){e.value=t}return{refAudioList:e,setAudioSource:t}}),X=e(ee()),Wr=class extends V{constructor(...e){super(...e),c(this,`appId`,void 0),c(this,`nonceStr`,void 0),c(this,`signature`,void 0),c(this,`timestamp`,void 0),c(this,`isReady`,!1)}replaceQueryParam(e,t,n){let r=RegExp(`(${t}=)[^&]*`);return e.match(r)?e.replace(r,`$1${n}`):e.indexOf(`?`)===-1?`${e}?${t}=${n}`:`${e}&${t}=${n}`}setWechat(){let{appId:e,nonceStr:t,signature:n,timestamp:r}=this;e&&(X.default.ready(()=>{this.isReady=!0}),X.default.config({debug:!1,appId:e,timestamp:r,nonceStr:t,signature:n,jsApiList:[`updateAppMessageShareData`,`updateTimelineShareData`,`onMenuShareTimeline`,`hideOptionMenu`,`showMenuItems`],openTagList:[`wx-open-launch-app`,`wx-open-launch-weapp`]}))}disabledWxMenu(){B()&&X.default.ready(function(){X.default.hideOptionMenu()})}showMenuItems(){B()&&X.default.ready(function(){X.default.showMenuItems({menuList:[]})})}setShareMeta({title:e,url:t,desc:n=`中安在线客户端`,thumb:r}){if(!B())return;r||(r=yt);
1let i={title:e||document.title,desc:n,link:t||window.location.href,imgUrl:encodeURI(r)};i.link.includes(`#`)||(i.link=this.replaceQueryParam(i.link,`_r`,Math.random().toString())),X.default.ready(function(){X.default.onMenuShareTimeline(i),X.default.updateAppMessageShareData(i),X.default.updateTimelineShareData(i)})}},Gr=class extends G{constructor(...e){super(...e),c(this,`entityClass`,Wr),c(this,`urlForGetDetail`,dt)}redirectLoginWx(e){return W.post(st,e)}},Kr=class extends V{constructor(...e){super(...e),c(this,`orgId`,void 0),c(this,`clientAppId`,void 0),c(this,`title`,void 0),c(this,`path`,void 0),c(this,`status`,void 0)}},qr=class extends V{constructor(...e){super(...e),c(this,`orgId`,void 0),c(this,`clientAppId`,void 0),c(this,`title`,void 0),c(this,`icon`,void 0),c(this,`summary`,void 0),c(this,`pathId`,void 0),c(this,`defaultSummary`,void 0),c(this,`path`,void 0)}fromJson(e){return super.fromJson(e),e.path&&typeof e.path==`object`&&(this.path=new Kr().fromJson(e.path)),this}getMeta(e,t){return{title:this.getTitle(e),desc:this.getDesc(t)}}getTitle(e){return this.title.replace(/#TITLE#/g,e)}getDesc(e){return(e&&this.summary?this.summary.replace(/#DESC#/g,e).replace(/#CONTENT_SUB#/g,e):this.defaultSummary)||``}},Jr=class extends G{constructor(...e){super(...e),c(this,`entityClass`,qr),c(this,`urlForBaseList`,ft)}},Yr=`中安在线`,Xr=St,Zr=()=>document.title||Yr,Qr=j(()=>{let e=g({}),t=g(!1),{onDetail:n,refEntity:i,refLoading:a}=J(Gr,{noThrow:!0,args:{url:window.location.href.split(`#`)[0]}}),{refList:o,onGetList:s,refLoading:c}=Wn(Jr,{delay:!0});window.addEventListener(b,()=>{t.value=!0});let u=t=>{t&&(e.value=A(A({},e.value),t))},d=()=>!window._CONFIG.isInApp||t.value?!0:z(()=>t.value),p=function(){var e=l(function*(){return window._CONFIG.isInApp||!B()?!0:yield z(()=>{var e;return!!((e=i.value)!=null&&e.isReady)})});return function(){return e.apply(this,arguments)}}(),m=function(){var e=l(function*(){return yield z(()=>y.value)});return function(){return e.apply(this,arguments)}}(),h=function(){var e=l(function*(e,t,n){var a;let o=e.displayTitle||e.title||Zr();if(window._CONFIG.isInApp&&n?document.title=``:document.title=o,!(window._CONFIG.isInApp||B()))return;yield Promise.all([p(),d()]);let s=v.value[t||Ct.WEB_CUSTOM];e.title=e.title||o||Yr,e.desc=e.desc||Xr,s&&(e.title=s.getTitle(e.title)||e.title,e.desc=s.getDesc(e.desc)||e.desc),s!=null&&s.icon&&!e.thumb&&(e.thumb=s.icon),e.title=e.title||o||Yr,e.desc=e.desc||Xr,e.thumb=e.thumb||yt,(a=i.value)==null||a.setShareMeta(e),console.log(`pageMeta`,JSON.stringify(e)),r(e),se({title:n?``:o})});return function(t,n,r){return e.apply(this,arguments)}}(),_=function(){var t=l(function*(t){return u(t),yield Promise.all([!e.value.skipShareIconList&&s(),B()&&n()].filter(Boolean))});return function(e){return t.apply(this,arguments)}}();f(i,e=>{e&&e.setWechat()});let v=k(()=>e.value.skipShareIconList?{}:o.value.reduce((e,t)=>{var n;return e[((n=t.path)==null?void 0:n.path)||Ct.DEFAULT]=t,e},{})),y=k(()=>(e.value.skipShareIconList||!c.value)&&!a.value&&(window._CONFIG.isInApp?t.value:!0));return{onGetWechatDetail:n,refWechatEntity:i,refWechatLoading:a,onSetShareMeta:h,onUntilWechatReady:p,onInitShareInfo:_,setOptions:u,compShareIncoMap:v,onUntilComplete:m,compIsComplete:y}}),$r=e=>{let t=Qr();return t.setOptions(e),t};j(()=>({isInApp:window._CONFIG.isInApp}));var ei=class extends V{constructor(...e){super(...e),c(this,`orgId`,void 0),c(this,`clientAppId`,void 0),c(this,`versionNo`,void 0),c(this,`updateType`,void 0),c(this,`updateNote`,void 0),c(this,`status`,void 0),c(this,`styleInherit`,void 0),c(this,`publishedAt`,void 0),c(this,`apkFileId`,void 0),c(this,`versionName`,void 0),c(this,`apkUrl`,void 0)}},ti=class extends G{constructor(...e){super(...e),c(this,`entityClass`,ei),c(this,`urlForGetDetail`,pt)}};j(()=>{let{onDetail:e,refEntity:t,refLoading:n,refError:r}=J(ti);return C(e),{onGetVersionDetail:e,refVersionEntity:t,refVersionLoading:n,refVersionError:r}});var ni=class extends G{constructor(...e){super(...e),c(this,`entityClass`,mr),c(this,`urlForGetDetail`,Ae)}};j(()=>{let e=Mt(window.location.href),t=window._CONFIG.isInApp,n=g(),{refList:r,refEmpty:i,onRefresh:a,onGetList:o,refDataPage:s,refLoading:c,refError:u}=Hn(hr,gr,{delay:`selfControl`,disabledTips:!0,handleArgs:t=>A({subject_group_id:e.get(`id`)},t)}),{refEntity:d,onDetail:f,refLoading:p,refError:m}=J(ni,{args:{subject_group_id:e.get(`id`)},noThrow:!0}),h=k(()=>K({module:`h5`,url:window.location.href}));return{onRefresh:function(){var e=l(function*(){yield f(),yield a(),n.value=m.value||u.value});return function(){return e.apply(this,arguments)}}(),onLoadMoreLiveProject:o,refDataPage:s,refList:r,refEmpty:i,refLoading:k(()=>c.value||p.value),refLiveProjectLoading:c,compWakeUpPath:h,isInApp:t,refSubjectGroup:d,refError:n}}),j(()=>{let e=window._CONFIG.isInApp;return{compWakeUpPath:k(()=>K({module:`h5`,url:window.location.href},!1)),compHomeWakeUpPath:k(()=>K({module:`home`})),isInApp:e}}),j(()=>({isInApp:window._CONFIG.isInApp})),j(()=>{let e=window._CONFIG.isInApp;return{compWakeUpPath:k(()=>K({module:`h5`,url:window.location.href},!1)),isInApp:e}});var ri=g(!1);function ii(){return{refLoginReady:ri,setLoginReady:()=>{ri.value=!0}}}g(!1),g(!1),j(()=>{let e=window._CONFIG.isInApp;return{compWakeUpPath:k(()=>K({module:`h5`,url:window.location.href},!1)),isInApp:e}}),j(()=>{let e=window._CONFIG.isInApp,t=g(0);return{isInApp:e,refAnonymous:t,setAnonymous:e=>{t.value=e}}});var ai=j(()=>{let e=Aa(),t=g(null),n=g(!1);function r(e){return i.apply(this,arguments)}function i(){return i=l(function*(e){try{let r=yield W.get(Ne,{uuid:e,with_follows_cnt:1}),i=r==null?void 0:r.user;if(i){var n;t.value={id:i.uuid,name:i.name||``,avatar:((n=i.person)==null?void 0:n.avatar)||``}}}catch(e){}}),i.apply(this,arguments)}function a(e){return o.apply(this,arguments)}function o(){return o=l(function*(e){try{var t;let r=yield W.post(Ve,{follower_uuids:[e]});n.value=!!(!(r==null||(t=r.list)==null)&&t[e])}catch(e){}}),o.apply(this,arguments)}function s(e){return c.apply(this,arguments)}function c(){return c=l(function*(t){try{yield W.post(ze,{follower_uuid:t}),n.value=!0,e(`关注成功`)}catch(t){e(`关注失败`)}}),c.apply(this,arguments)}function u(e){return d.apply(this,arguments)}function d(){return d=l(function*(t){try{yield W.post(Be,{follower_uuid:t}),n.value=!1,e(`取消关注成功`)}catch(t){e(`取消关注失败`)}}),d.apply(this,arguments)}return{refAhhAuthor:t,refIsFollowed:n,fetchAhhAuthor:r,checkFollowStatus:a,onFollow:s,onUnfollow:u}}),Z=navigator.userAgent||``,oi=(e,t)=>{let{isNaN:n}=window,r=e.split(`.`),i=t.split(`.`);for(let e=0;e<3;e++){let t=Number(r[e]),a=Number(i[e]);if(t>a)return 1;if(a>t)return-1;if(!n(t)&&n(a))return 1;if(n(t)&&!n(a))return-1}return 0},si=()=>{let e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return Number.parseInt(e[1],10)},ci=()=>navigator.appVersion.match(/micromessenger\/(\d+\.\d+\.\d+)/i)[1],li=/android/i.test(Z)||navigator.platform.toLowerCase().indexOf(`linux`)>-1,ui=/iphone|ipad|ipod/i.test(Z),di=/micromessenger\/([\d.]+)/i.test(Z),fi=/(weibo).*weibo__([\d.]+)/i.test(Z),pi=/(baiduboxapp)\/([\d.]+)/i.test(Z),mi=/qq\/([\d.]+)/i.test(Z),hi=/(qqbrowser)\/([\d.]+)/i.test(Z),gi=/qzone\/.*_qz_([\d.]+)/i.test(Z),_i=!li&&!ui,vi=/chrome\/[\d.]+ mobile safari\/[\d.]+/i.test(Z)&&li&&Z.indexOf(`Version`)<0,yi=e=>{let t=document.createElement(`textarea`);t.value=e,t.style.top=`0`,t.style.left=`0`,t.style.position=`fixed`,t.setAttribute(`readonly`,`readonly`),document.body.append(t),t.focu
1s(),t.setSelectionRange?t.setSelectionRange(0,t.value.length):t.select();try{document.execCommand(`copy`),t.blur(),t.remove(),document.activeElement.blur()}catch(e){}},bi=(e,t)=>window.getComputedStyle(e)[t],xi=(e,t,n)=>{e.style[t]=n};function Si(e){let t=e===void 0?``:Object.keys(e).map(t=>`${t}=${e[t]}`).join(`&`);return t?`?${t}`:``}function Ci(e,t){let{path:n,param:r}=e,{scheme:i,buildScheme:a}=t;if(a!==void 0)return a(e,t);let{host:o,port:s,protocol:c}=i,l=s?`:${s}`:``;return`${c}://${o?`${o}${l}/`:``}${n}${Si(r)}`}function wi(e,t){let{outChain:n}=t,r=Ci(e,t);if(n!==void 0&&n){let{protocol:e,path:t,key:i}=n;r=`${e}://${t}?${i}=${encodeURIComponent(r)}`}return r}function Ti(e,t){let{outChain:n}=t,{intent:r,fallback:i}=t;if(r===void 0)return``;let a=`#Intent;${Object.keys(r).map(e=>`${e}=${r[e]};`).join(``)}S.browser_fallback_url=${encodeURIComponent(i)};end;`,o=Ci(e,t);if(n!==void 0&&n){let{path:e,key:t}=n;return`intent://${e}?${t}=${encodeURIComponent(o)}${a}`}return o=o.slice(o.indexOf(`//`)+2),`intent://${o}${a}`}function Ei(e,t){let{universal:n}=t;if(n===void 0)return``;let{host:r,pathKey:i}=n,{path:a,param:o}=e,s=Si(o),c=`https://${r}/${a}${s}`,l=`https://${r}?${i}=${a}${s.replace(`?`,`&`)}`;return i?l:c}function Di(e,t){let n=wi(e,t);return`${t.yingyongbao}&android_schema=${encodeURIComponent(n)}`}var Oi,ki,Ai;function ji(){typeof document>`u`||(document.hidden===void 0?document.msHidden===void 0?document.webkitHidden!==void 0&&(Oi=`webkitHidden`,ki=`webkitvisibilitychange`):(Oi=`msHidden`,ki=`msvisibilitychange`):(Oi=`hidden`,ki=`visibilitychange`))}ji();function Mi(){return Oi===void 0?!1:document[Oi]}function Q(e){window.top.location.href=e}function Ni(e){let t=document.createElement(`a`);t.setAttribute(`href`,e),t.style.display=`none`,document.body.appendChild(t),t.click()}function Pi(e){Ai||(Ai=document.createElement(`iframe`),Ai.style.cssText=`display:none;border:0;width:0;height:0;`,document.body.append(Ai)),Ai.src=e}function Fi(e,t){let n=setTimeout(()=>{Mi()||e()},t);ki===void 0?window.addEventListener(`pagehide`,()=>{clearTimeout(n)}):document.addEventListener(ki,()=>{clearTimeout(n)})}var Ii=`YXX_BI_DEVICE_ID`,Li=`__AH_BI_BROWSER_ID__@v1`,Ri=e=>{try{let t=localStorage.getItem(e);if(t)return t;let n=D();return localStorage.setItem(e,n),n}catch(e){return``}},zi=class{constructor(e){c(this,`options`,void 0),this.options=Object.assign({scheme:{protocol:`nfwapp`},universal:{host:`xapp-download.southcn.com`},wxTagHost:`xapp.southcn.com`,appstore:`https://apps.apple.com/cn/app/%E7%B2%A4%E5%AD%A6%E4%B9%A0/id1587318994`,fallback:`https://app.southcn.com/m/`,pc:`https://app.southcn.com/`,timeout:3e3,wakeup:{event:`web_wakeup`,multiApps:`yuexuexi_web`},wakeupCallbcak:void 0},e),window.hasOwnProperty(`report_queue`)||Object.assign(window,{report_queue:[]})}generateScheme(e){return wi(e,this.options)}generateIntent(e){return Ti(e,this.options)}generateUniversalLink(e){return Ei(e,this.options)}generateYingYongBao(e){return Di(e,this.options)}wxTags(...e){if(ui)return;let t=new RegExp(this.options.wxTagHost,`i`);!di||!window.location.href.match(t)||e.map((e,t)=>{e.selectors.map((n,r)=>{let i=document.querySelectorAll(n);i&&i.length>0&&i.forEach((n,i)=>{let a=`${this.options.scheme.protocol}://${e.path}`;if(n&&n.innerHTML.match(`<wx-open-launch-app`)){var o;(o=n.querySelector(`wx-open-launch-app`))==null||o.setAttribute(`extinfo`,a);return}if(n){bi(n,`position`)!==`fixed`&&bi(n,`position`)!==`relative`&&bi(n,`position`)!==`absolute`&&xi(n,`position`,`relative`);let o=`wxTag-${new Date().getTime()}-${t}${i}${r}`;n.addEventListener(`click`,e=>{var t,n;e.stopPropagation(),(t=(n=this.options).wakeupCallbcak)==null||t.call(n)},!0),n.innerHTML+=`
2                <wx-open-launch-app
3                  id="${o}"
4                  appid="${e.appid}"
5                  extinfo="${a}"
6                  style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 999;overflow: hidden;"
7                >
8                  <script type="text/wxtag-template">
9                    <button style="width: 100%; height: 600px; background-color: transparent; border: 0; opacity: 0;-webkit-tap-highlight-color: transparent;-webkit-appearance: none;"></button>
10                  <\/script>
11                </wx-open-launch-app>
12              `;let s=document.querySelector(`#${o}`);s&&(s.addEventListener(`launch`,()=>{this.report(e.data)}),s.addEventListener(`error`,()=>{this.open({path:e.path,data:e.data})}))}})})})}checkOpen(e){let{logFunc:t,timeout:n}=this.options;return Fi(()=>{t!==void 0&&t(`failure`),e()},n)}fallToAppStore(){this.checkOpen(()=>{Q(this.options.appstore)})}fallToFbUrl(){this.checkOpen(()=>{Q(this.options.fallback)})}fallToCustomCb(e){this.checkOpen(()=>{e()})}report(e){var t,n;if(!(!((t=this.options)==null||(t=t.wakeup)==null)&&t.multiApps)||!(!((n=this.options)==null||(n=n.wakeup)==null)&&n.event))return;let r={time:new Date().getTime(),url:window.location.href,title:document.title};if(yi(`${JSON.stringify(r)}`),e){let t=e.device_id||Ri(Ii),n=e.browser_id||Ri(Li);window.report_queue.push(r=>{var i,a;let{info:o}=r,{browser:s,screen:c,viewport:l}=o,{title:u,button:d,userName:f,userId:p}=e;return{event:((i=this.options)==null||(i=i.wakeup)==null?void 0:i.event)||`web_wakeup`,data:{event_button:d,is_clipboard:!0,device_id:t,browser_id:n,user_name:f||e.user_name||``,user_id:p||e.user_id||0,platform_name:s.platform_name,os_name:s.os_name,os_version:s.os_version,screen_height:c.screen_height,screen_width:c.screen_width,browser_name:s.browser_name,browser_version:s.browser_version,viewport_height:l.viewport_height,viewport_width:l.viewport_width,url:location.href,ip:e.ip||``,user_sex:e.user_sex||``,user_region:e.user_region||``,ip_region:e.ip_region||``,ip_city:e.ip_city||``,title:u,multi_apps:((a=this.options)==null||(a=a.wakeup)==null?void 0:a.multiApps)||`yuexuexi_web`}}})}}open(e){let{universal:t,appstore:n,logFunc:r,intent:i,pc:a}=this.options,{callback:o,data:s}=e,c=t!==void 0,l=this.generateScheme(e),u;if(_i){Q(a||`https://app.southcn.com/`);return}if(r!==void 0&&r(`pending`),this.report(s),ui?di&&oi(ci(),`7.0.5`)===-1||fi?Q(n):si()<9?(Pi(l),u=this.fallToAppStore):!c||mi||hi||gi||e.notUniversalLink?(Ni(l),u=this.fallToAppStore):Q(this.generateUniversalLink(e)):di?this.options.yingyongbao===void 0?Q(`${this.options.fallback}?path=${encodeURIComponent(e.path)}`):Q(this.generateYingYongBao(e)):vi?i===void 0?(Q(l),u=this.fallToFbUrl):Q(this.generateIntent
12(e)):di||pi||fi||gi?Q(this.options.fallback):(Pi(l),u=this.fallToFbUrl),o!==void 0){this.fallToCustomCb(o);return}u&&u.call(this)}};function Bi(){let e={},t=new zi({scheme:{protocol:`ahnews`},universal:{host:Gt()?window._CONFIG.downloadDomainUrl.replace(`https://`,``):window._CONFIG.domainUrl.replace(`https://`,``)},wxTagHost:window._CONFIG.domainUrl.replace(`https://`,``),appstore:`https://apps.apple.com/cn/app/%E4%B8%AD%E5%AE%89%E6%96%B0%E9%97%BB-%E5%AE%89%E5%BE%BD%E6%96%B0%E9%97%BB/id647670185`,fallback:`${window._CONFIG.domainUrl}/app/mobile/`,pc:`${window._CONFIG.domainUrl}/`,timeout:3e3,wakeup:{event:`web_wakeup`,multiApps:`ah_web,ah_cms`},wakeupCallbcak:()=>{console.log(`wakeupCallbcak`,e)}}),{setIpLocation:n,setUserProps:r,onGetIpLocation:i}=Y(),{onUntilWechatReady:a}=$r();function o(e){n(e.data),r(e.data,{useCache:!1})}function s(e){var t;let n=window.location.href;return{path:e.path||`app.com?module=h5&url=${B()&&!Gt()?n:encodeURIComponent(n)}`,data:A(A({},e.data||{}),{},{button:(t=e.data.button)==null?`打开`:t}),selectors:[e.data.selector]}}function c(e){return u.apply(this,arguments)}function u(){return u=l(function*(e){yield i(),o(e),setTimeout(()=>{t.open(s(e))})}),u.apply(this,arguments)}function d(e,t,n){Wt()&&B()&&setTimeout(()=>{f({path:e,data:{title:document.title,selector:n,button:t}})})}function f(e){return p.apply(this,arguments)}function p(){return p=l(function*(n){let r=window.location.href;yield a(),o(n),e=n,t.wxTags({appid:window._CONFIG.wxLaunchAppId,path:n.path||`app.com?module=h5&url=${B()&&!Gt()?r:encodeURIComponent(r)}`,selectors:[n.data.selector],data:n.data})}),p.apply(this,arguments)}return{callLib:t,setWxTags:f,onSetWxTags:d,wakeupApp:c,onWakeupApp:function(){var e=l(function*(e,t,n){e&&(yield c({path:e,data:{title:document.title,selector:n,button:t}}))});return function(t,n,r){return e.apply(this,arguments)}}()}}g(0);var Vi=function(){var e=l(function*(e){try{return yield ar.getInstance().get(void 0,{cms_node:e})}catch(e){return null}});return function(t){return e.apply(this,arguments)}}(),Hi=function(){var e=l(function*(e){if(!e)return;let t=yield Vi(e.id);if(t)return t;if(e.parentId)return yield Vi(e.parentId)});return function(t){return e.apply(this,arguments)}}();(function(){var e=l(function*(e){return!!(yield Hi(e))});return function(t){return e.apply(this,arguments)}})(),window.NfwApp=E,window.onRedirectLogin=_r;function Ui(){return Wi.apply(this,arguments)}function Wi(){return Wi=l(function*(e=!1){let{onGetUserInfo:t,refSelfInfo:n,onAutoLogin:r}=yr();if(window._CONFIG.isInApp){var i;let[a]=yield Promise.all([It(x()),It(t())]),[,o]=a;if(o!=null&&o.data&&!((i=n.value)!=null&&i.uuid))return yield r(e)}return!0}),Wi.apply(this,arguments)}var Gi=0,Ki=class e{constructor(e,t){c(this,`SDK`,void 0),c(this,`deviceId`,void 0),c(this,`articleId`,void 0),c(this,`userId`,void 0),c(this,`platform`,void 0),c(this,`taskQueue`,[]),c(this,`isSDKReady`,!1),c(this,`isProcessing`,!1),this.articleId=e,this.platform=Rt(),this.userId=t}initSDK(){var e=this;return l(function*(){try{yield e.loadSDK(),e.SDK=window.ZMYDataCollection,e.SDK.init({tenant_code:window._CONFIG.ZMYCollectionCode,key:window._CONFIG.ZMYCollectionKey,domain:window._CONFIG.ZMYCollectionDomain}),e.isSDKReady=!0,yield e.processQueue()}catch(t){console.warn(`ZMY SDK 加载失败,埋点功能将不可用`,t),e.taskQueue=[]}})()}loadSDK(){return l(function*(){return e.sdkLoadPromise?e.sdkLoadPromise:window.ZMYDataCollection?Promise.resolve():(e.sdkLoadPromise=l(function*(){try{yield be(window._CONFIG.ZMYCollectionScript),console.log(`ZMY SDK 加载成功`)}catch(e){throw Error(`ZMY SDK 加载失败: `+e)}})(),e.sdkLoadPromise)})()}processQueue(){var e=this;return l(function*(){if(!(e.isProcessing||!e.isSDKReady)){for(e.isProcessing=!0;e.taskQueue.length>0;){let t=e.taskQueue.shift();if(t)try{yield t()}catch(e){console.warn(`ZMY 埋点任务执行失败`,e)}}e.isProcessing=!1}})()}enqueueTask(e){this.taskQueue.push(e),this.isSDKReady&&this.processQueue()}getDeviceId(){var e=this;return l(function*(){if(window._CONFIG.isInApp){if(e.deviceId)return e.deviceId;e.deviceId=(yield T()).device_id}})()}getParams(){var e=this;return l(function*(t={},n){let r=A({article_id:e.articleId,platform:e.platform,device_id:yield e.getDeviceId(),user_id:e.userId},t);return n&&(r[n]=e.articleId,delete r.article_id),r}).apply(this,arguments)}get second(){return(Math.floor(Math.random()*5)+1)*1e3}open(){var e=this;return l(function*(){e.enqueueTask(l(function*(){e.SDK&&(e.SDK.openArticle(yield e.getParams()),e.keep(()=>e.open()))}))})()}openActivityH5(){var e=this;return l(function*(){e.enqueueTask(l(function*(){e.SDK&&(e.SDK.openActivityH5(yield e.getParams({},`activity_id`)),e.keep(()=>e.openActivityH5()))}))})()}share(e){var t=this;return l(function*(){t.enqueueTask(l(function*(){t.SDK&&(t.SDK.shareArticle(yield t.getParams({share_channel:e})),t.keep(()=>t.share(e)))}))})()}comment(){var e=this;return l(function*(){e.enqueueTask(l(function*(){e.SDK&&(e.SDK.commentArticle(yield e.getParams()),e.keep(()=>e.comment()))}))})()}like(){var e=this;return l(function*(){e.enqueueTask(l(function*(){e.SDK&&(e.SDK.likeArticle(yield e.getParams()),e.keep(()=>e.like()))}))})()}keep(e,t=0){setTimeout(()=>{t>Gi||this.keep(e,++t)},this.second)}static getInstance(t,n){if(!(!this.instance&&!t||window._CONFIG.isInApp||!window._CONFIG.ZMYCollectionEnable))return this.instance||(this.instance=new e(t,n),window._CONFIG.isInApp&&M(`@nfwApp:shared`,e=>{let t=wt[e.type];t&&this.instance.share(t)}
12)),this.instance}};c(Ki,`instance`,void 0),c(Ki,`sdkLoadPromise`,void 0);var qi=class extends V{constructor(...e){super(...e),c(this,`ip`,void 0),c(this,`toUid`,void 0),c(this,`ipRegion`,void 0),c(this,`sourceApp`,void 0),c(this,`sourceUrl`,void 0),c(this,`sourceDataId`,void 0),c(this,`sourceAppName`,void 0),c(this,`sourceDataType`,void 0),c(this,`sourceDataCmsId`,void 0),c(this,`originContent`,void 0)}},$=class e extends V{constructor(...e){super(...e),c(this,`timedesc`,void 0),c(this,`childs`,void 0),c(this,`orgId`,void 0),c(this,`time`,void 0),c(this,`sourceId`,void 0),c(this,`commentId`,void 0),c(this,`type`,void 0),c(this,`content`,void 0),c(this,`levelSourceId`,void 0),c(this,`level`,void 0),c(this,`status`,void 0),c(this,`dataSort`,void 0),c(this,`good`,void 0),c(this,`attr`,void 0),c(this,`ipRegion`,void 0),c(this,`parentCommentId`,void 0),c(this,`parentId`,void 0),c(this,`commentUserId`,void 0),c(this,`commentUserName`,void 0),c(this,`commentUserAvatar`,void 0),c(this,`commentUserStatus`,void 0),c(this,`commentUserMarks`,void 0),c(this,`parentUid`,void 0),c(this,`parentUserName`,void 0),c(this,`parentUserAvatar`,void 0),c(this,`parentUserStatus`,void 0),c(this,`parentUserMarks`,void 0),c(this,`isGood`,void 0),c(this,`isMine`,void 0),c(this,`likeType`,void 0),c(this,`quickCode`,void 0),c(this,`quickly`,void 0)}get isBan(){return this.status==2||this.status==3}get isWaitAudit(){return this.status==0}get timeText(){let e=L.default.unix(this.time),t=(0,L.default)().year();return e.year()===t?e.format(`MM-DD HH:mm`):e.format(`YYYY-MM-DD`)}setGoodState(e){return this.isGood=e,this}setGood(e){return this.good+=e,this}setLikeType(e,t=``,{isMine:n,isLogin:r}={isMine:!1,isLogin:!1}){var i;this.isMine=n||!!(this.commentUserId&&this.commentUserId===t),this.likeType=e,!this.isGood&&!r&&(this.isGood=!!localStorage.getItem(zt({type:this.attr.sourceDataType,subType:`comment`,id:this.attr.sourceDataId,commentId:this.commentId}))),(i=this.childs)==null||i.forEach(e=>{e.isMine=!!(e.commentUserId&&e.commentUserId===t)})}fromJson(t){return super.fromJson(t),!this.commentUserId&&t!=null&&t.comment_user_uid&&(this.commentUserId=t.comment_user_uid),t!=null&&t.attr&&typeof t.attr==`object`&&(this.attr=new qi().fromJson(t.attr)),t!=null&&t.commentUserMarks&&Array.isArray(t.commentUserMarks)&&(this.commentUserMarks=t.commentUserMarks.map(e=>new cr().fromJson(e))),t!=null&&t.childs&&Array.isArray(t.childs)&&(this.childs=t.childs.map(t=>new e().fromJson(t))),this}toJson(){return{comment:this.quickly?``:this.content,quick_code:this.quickly?this.quickCode:``,id:this.sourceId,quickly:this.quickly||0,parent_comment_id:this.parentCommentId}}},Ji=class extends V{constructor(...e){super(...e),c(this,`likes`,void 0),c(this,`publishNum`,void 0),c(this,`topNum`,void 0),c(this,`comments`,void 0),c(this,`likeCode`,void 0),c(this,`sourceId`,void 0),c(this,`name`,void 0),c(this,`userLike`,void 0),c(this,`codeImgClose`,void 0),c(this,`codeImgOpen`,void 0),c(this,`likeStatus`,void 0),c(this,`commentsTotalGoodNum`,void 0),c(this,`totalCommentNum`,void 0)}fromJson(e,t){return super.fromJson(e),t&&!t.isLogin&&this.changeCount(0,t),this}changeCount(e,t){if(this.likes+=e,e===0&&!this.userLike){this.userLike=!!localStorage.getItem(zt(t));return}e===-1?this.userLike=0:e===1&&(this.userLike=1)}},Yi=class extends V{constructor(...e){super(...e),c(this,`commentId`,void 0),c(this,`commentSourceId`,void 0),c(this,`code`,void 0),c(this,`status`,void 0),c(this,`orgId`,void 0),c(this,`name`,void 0),c(this,`attr`,void 0),c(this,`codeImgClose`,void 0),c(this,`codeImgOpen`,void 0)}fromJson(e){return super.fromJson(e),e!=null&&e.attr&&typeof e.attr==`object`&&(this.attr=new qi().fromJson(e.attr)),this}},Xi=class extends G{constructor(...e){super(...e),c(this,`entityClass`,$),c(this,`urlForGetPage`,Ze),c(this,`urlForSave`,Qe),c(this,`urlForDelete`,et),c(this,`uidMaps`,new Map)}getCommentList(e,t){var n=this;return l(function*(){let{countData:r,list:i,top:a,all_types:o,total_comment_num:s=0,likes_type:c,uid_likes:l,my_comment:u}=yield W.post(n.urlForGetPage,A(A({},e.toPageJson()),t)),d=a==null?[]:a,f=i==null?[]:i,p=u==null?[]:u,m=o==null?{}:o,h=c==null?[]:c,g=d.length>0,_=new Map;
12o&&h.length&&h.forEach(e=>{_.set(e.comment_id,new Yi().fromJson(Object.assign(e,m[e.code]||{})))}),Object.keys(m).forEach(e=>{_.set(e,new Yi().fromJson(m[e]))});let v=`${t.uuid}-${t.id}-${t.type}`;Array.isArray(l)&&l.length&&n.uidMaps.set(v,new Set(l.map(e=>e.comment_id)));let[y,b]=[g&&!t.ignoreTop?d:f,p].map(e=>{let r=e===p;return e.map(e=>{var i;let a=jt(n.entityClass).fromJson(e);return a.setGoodState(((i=n.uidMaps.get(v))==null?void 0:i.has(a.commentId))||!1),a.setLikeType(_.get(a.commentId)||_.get(`default`),t.uuid,{isMine:r,isLogin:!!t.isLogin}),a})}),x=new Ji().fromJson(Object.assign(r==null?{}:r,{total_comment_num:s}),{type:t.type,id:t.id,isLogin:!!t.isLogin});return{isHasTop:g,data:y,myComment:b,countData:x,total:x.publishNum}})()}addLikeComment(e){return W.post($e,e,{credentials:`include`})}addLikeCommentInApp(e,t){return l(function*(){let n={credentials:`same-origin`};return t&&(n[`app-token`]=t),yield W.post(tt,e,n)})()}submitLike(e,t){var n=this;return l(function*(){let r=zt(t);t.isLogin||(e===1?localStorage.setItem(r,`1`):localStorage.removeItem(r)),delete t.isLogin,yield n.addLikeComment(t)})()}},Zi=class extends V{constructor(...e){super(...e),c(this,`des`,void 0),c(this,`point`,void 0),c(this,`remark`,void 0),c(this,`ruleName`,void 0),c(this,`title`,void 0),c(this,`totalPoint`,void 0),c(this,`jfTime`,void 0),c(this,`jobId`,void 0)}},Qi=class extends G{constructor(...e){super(...e),c(this,`entityClass`,Zi),c(this,`urlForGetPage`,Ue),c(this,`urlForSave`,We)}},$i=1e3,ea=null;function ta(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function na(e,t=$i){return new Promise(n=>{let r=setTimeout(()=>{n({ok:!1})},t),i;try{i=Promise.resolve(e())}catch(e){clearTimeout(r),n({ok:!1});return}i.then(e=>{clearTimeout(r),n({ok:!0,value:e})}).catch(()=>{clearTimeout(r),n({ok:!1})})})}function ra(e){return ta(e)?`errcode`in e&&e.errcode!==void 0&&e.errcode!==null?String(e.errcode)===`0`?{ok:!0,value:e.data}:{ok:!1}:`data`in e?{ok:!0,value:e.data}:{ok:!0,value:e}:{ok:!0,value:e}}function ia(e){let t=Number(e);return console.log(`normalizedBuildNum`,t),Number.isFinite(t)?t:void 0}function aa(e,t){let n=ia(e);return n!==void 0&&n>=t}function oa(){return ea||(ea=l(function*(){let e=yield na(()=>ie());if(!e.ok)return;let t=ra(e.value);if(t.ok)return ia(t.value)})()),ea}function sa(e){return{[vt.NATIVE_LIKE_SCORE_HANDLED]:aa(e,_t.NATIVE_LIKE_SCORE_HANDLED_MIN)}}function ca(e){window._CONFIG.appBuildCapabilities=A(A({},window._CONFIG.appBuildCapabilities||{}),e)}function la(){var e;return!!(!((e=window._CONFIG)==null||(e=e.appBuildCapabilities)==null)&&e[vt.NATIVE_LIKE_SCORE_HANDLED])}function ua(){return da.apply(this,arguments)}function da(){return da=l(function*(){var e;if(!((e=window._CONFIG)!=null&&e.isInApp)){let e=sa(void 0);return ca(e),e}let t=sa(yield oa());return ca(t),t}),da.apply(this,arguments)}var fa=g({TOP_COMMENT:`精选评论`,NEW_COMMENT:`最新评论`,ALL_COMMENT:`全部评论`,CHECK_ALL_COMMENTS:`查看全部评论`,CHECK_ALL_COMMENTS_ON_APP:`打开APP查看全部评论`,MY_COMMENT:`我的评论`,
12NO_COMMENT:`暂无评论`,REPLY:`回复`,DELETE:`删除`,WRITE_COMMENT:`我来说两句...`}),{getState:pa,setState:ma}=Br(),ha=function(){var e=l(function*(e=!1){let t=pa(`app-token`,``);if(t)return t;if(!(yield w(e)).data)return``;let n=yield O(e);return!e&&(!n||!n.data)?``:(ma(`app-token`,n.data||``),n.data||``)});return function(){return e.apply(this,arguments)}}(),ga=function(){var e=l(function*(e,t,n,r){if(window._CONFIG.isInApp)return!1;let i=q(`/app/comment/`,{id:e,type:t});if(n)return window.location.href=i,!0;try{yield N({message:r,confirmButtonText:`打开APP`,cancelButtonText:`暂不前往`})}catch(e){return n?(window.location.href=i,!0):(yield _r(`${window.location.origin}${i}`,void 0,!0),!0)}});return function(t,n,r,i){return e.apply(this,arguments)}}(),_a=j(()=>{let e=window._CONFIG.isInApp,t=Xi.getInstance(),r=g(new H),a=g({}),o=g([]),s=g([]),c=g(),d=g(!1),f=g(!0),p=g(!1),m=g(),_=g(!1),y=g(!1),b=g(`time`),ee=g(!1),{compIsLoggedIn:S}=yr(),{refFormData:C,onAdd:te}=Bn(Zi,Qi,{noThrow:!0}),w=``,T=``,E={};function D(){return O.apply(this,arguments)}function O(){return O=l(function*(){yield k(r.value.current),r.value.next()}),O.apply(this,arguments)}function k(){return re.apply(this,arguments)}function re(){return re=l(function*(e=1,n={}){y.value=!1,r.value.next(e),d.value=!0;let i=A(A({},a.value),n);delete i.api,delete i.dataPage;try{let{data:i,countData:l,total:u,myComment:d,isHasTop:f}=yield t[a.value.api||`getCommentList`](r.value,A(A(A({},a.value),n),{},{order_by:b.value,order_sort:`desc`,isLogin:S.value,ignoreTop:ee.value}));return r.value.setTotal(u),p.value=f,e===1?o.value=i:o.value=o.value.concat(i),d!=null&&d.length&&(s.value=d),l&&(c.value=l),i.length||(y.value=!0),i}catch(e){console.log(e)}finally{f.value=!1,d.value=!1}}),re.apply(this,arguments)}function ie(e){a.value=(e==null?void 0:e.args)||{},r.value=(e==null?void 0:e.dataPage)||new H}function j(t=!1){if(e){var n;let e={status:!0,placeholder:fa.value.WRITE_COMMENT,uuid:w,immediate:!1,type:2,extra:{id:a.value.id},withIcon:!0,count:(n=c.value)==null?void 0:n.totalCommentNum};v(e).catch(e=>{alert(e.errmessage)}),t||(E=e)}}function se(e,t){return le.apply(this,arguments)}function le(){return le=l(function*(e,t){let n=`${fa.value.REPLY}@${e}: `;E={status:!0,placeholder:n,uuid:w,immediate:!0,extra:{id:a.value.id,parentCommentId:t},type:2},yield v(E),ne(w,n)}),le.apply(this,arguments)}function fe(e){return N.apply(this,arguments)}function N(){return N=l(function*(e){try{if(window._CONFIG.isInApp){let t=yield ae({id:a.value.id,comment_id:e.commentId});if((t==null?void 0:t.data)===!1)return;d.value=!0}else d.value=!0,yield t.delete(a.value.id,{comment_id:e.commentId}),de(`删除成功`);s.value=s.value.filter(t=>t.commentId!==e.commentId),yield P()}finally{d.value=!1}}),N.apply(this,arguments)}function pe(){j(),M(u,()=>{j(!0)}),M(n,function(){P()}),M(h,l(function*(){T||(yield P())})),M(ue,function(){var e=l(function*(e){ma(`app-token`,``),T=``,e!=null&&e.isLogin&&(yield P())});return function(t){return e.apply(this,arguments)}}()),M(i,l(function*(){var e,t;Y().reportWebInteraction({interaction_type:`评论`,object_type:(e=E.extra)!=null&&e.parentCommentId?`评论`:`图文`,object_id:((t=E.extra)==null?void 0:t.parentCommentId)||a.value.id,site_id:a.value.site_id,node_id:a.value.node_id,source_post_id:a.value.source_post_id}),yield P(),j()}))}let P=function(){var e=l(function*(e=!0){try{if(window._CONFIG.isInApp){w=w||(yield oe()).data;let t=yield ha(e);if(t){let{data:e}=yield x();T=e.uuid,a.value.uuid=T,a.value.token=t}}}catch(e){console.log(e)}finally{yield k()}});return function(){return e.apply(this,arguments)}}(),me=function(){var n=l(function*(n){let r=Aa();if(!_.value){_.value=!0;try{var i;let u=n instanceof $?n.isGood:!!((i=c.value)!=null&&i.userLike),d=u?-1:1,f={type:n instanceof $?n.attr.sourceDataType:n.type,subType:n instanceof $?`comment`:n.subType||n.type,id:n instanceof $?n.attr.sourceDataId:n.id,comment_id:n instanceof $?n.commentId:``,status:d,isLogin:S.value},p=!1;if(e){var o;let e={state:d};n instanceof $&&(e.commentId=n.commentId);let t=yield ce(`toggleLike`,e);if(!(!(t==null||(o=t.data)==null)&&o.success))throw Error(`点赞失败`);
12if(!(n instanceof $)){var s;(s=c.value)==null||s.changeCount(d,f),p=!0}}else yield t.submitLike(d,f);if(!u&&S.value&&!(n instanceof $)&&(!e||!la())&&(C.value.fromJson({rule_name:window._CONFIG.jf.name.likeArticle,jf_time:(0,L.default)().unix(),job_id:`like_article_${f.id}`}),(yield te(C.value))!==null&&r(`完成文章点赞,积分+1`)),!u&&Y().reportWebInteraction({interaction_type:`点赞`,object_id:n instanceof $?n.commentId:n.id,object_type:n instanceof $?`评论`:`图文`,site_id:a.value.site_id,node_id:a.value.node_id,source_post_id:a.value.source_post_id}),!(n instanceof $)&&!p){var l;(l=c.value)==null||l.changeCount(d,f),S.value&&k()}else n instanceof $||S.value&&k();n instanceof $&&n.setGoodState(!u).setGood(d)}catch(e){console.log(e)}finally{_.value=!1}}});return function(e){return n.apply(this,arguments)}}();function he(e){return ge.apply(this,arguments)}function ge(){return ge=l(function*(t){ie(t),e?P().then(pe):yield k()}),ge.apply(this,arguments)}function _e(e){b.value=e}function ve(e){ee.value=e}return{onInit:he,refError:m,refList:o,refDataPage:r,refCountData:c,refMineList:s,refLoading:d,refFirstLoading:f,onRefreshComment:P,setReply:se,removeComment:fe,setArgs:ie,refHasTop:p,onSubmitLike:me,refIsFinished:y,onNext:D,compIsLoggedIn:S,refSort:b,setSort:_e,setIgnoreTop:ve}}),va=class extends G{constructor(...e){super(...e),c(this,`entityClass`,$),c(this,`urlForGetPage`,nt),c(this,`urlForSave`,it),c(this,`urlForDelete`,at),c(this,`uidMaps`,new Map)}getCommentList(e,t){var n=this;return l(function*(){let{countData:r,list:i=[],top:a=[],all_types:o={},total_comment_num:s=0,likes_type:c=[],uid_likes:l,my_comment:u=[]}=yield W.post(n.urlForGetPage,A(A({},e.toPageJson()),t)),d=(a==null?void 0:a.length)>0,f=new Map;o&&c.length&&c.forEach(e=>{f.set(e.comment_id,new Yi().fromJson(Object.assign(e,o[e.code]||{})))}),Object.keys(o).forEach(e=>{f.set(e,new Yi().fromJson(o[e]))});let p=`${t.uuid}-${t.id}-${t.type}`;Array.isArray(l)&&l.length&&n.uidMaps.set(p,new Set(l.map(e=>e.comment_id)));let[m,h]=[d?a:i,u].map(e=>{let r=e===u;return e.map(e=>{var i;let a=jt(n.entityClass).fromJson(e);return a.setGoodState(((i=n.uidMaps.get(p))==null?void 0:i.has(a.commentId))||!1),a.setLikeType(f.get(a.commentId)||f.get(`default`),t.uuid,{isMine:r,isLogin:!!t.isLogin}),a})}),g=new Ji().fromJson(Object.assign(r,{total_comment_num:s}),{type:t.type,id:t.id,isLogin:!!t.isLogin});return{isHasTop:d,data:m,myComment:h,countData:g,total:g.publishNum}})()}addLikeComment(e){return W.post(rt,e,{credentials:`include`})}addLikeCommentInApp(e,t){return l(function*(){let n={credentials:`same-origin`};return t&&(n[`app-token`]=t),yield W.post(ot,e,n)})()}submitLike(e,t){var n=this;return l(function*(){let r=zt(t);t.isLogin||(e===1?localStorage.setItem(r,`1`):localStorage.removeItem(r)),delete t.isLogin,yield n.addLikeComment(t)})()}},ya=g({TOP_COMMENT:`精选评论`,NEW_COMMENT:`最新评论`,CHECK_ALL_COMMENTS:`查看全部评论`,CHECK_ALL_COMMENTS_ON_APP:`打开APP查看全部评论`,MY_COMMENT:`我的评论`,
12NO_COMMENT:`暂无评论`,REPLY:`回复`,DELETE:`删除`,WRITE_COMMENT:`我来说两句...`}),{getState:ba,setState:xa}=Br(),Sa=function(){var e=l(function*(e=!1){let t=ba(`app-token`,``);if(t)return t;if(!(yield w(e)).data)return``;let n=yield O(e);return!e&&(!n||!n.data)?``:(xa(`app-token`,n.data||``),n.data||``)});return function(){return e.apply(this,arguments)}}();(function(){var e=l(function*(e,t,n,r){if(window._CONFIG.isInApp)return!1;let i=q(`/app/comment/`,{id:e,type:t});if(n)return window.location.href=i,!0;try{yield N({message:r,confirmButtonText:`打开APP`,cancelButtonText:`暂不前往`})}catch(e){return n?(window.location.href=i,!0):(yield _r(`${window.location.origin}${i}`,void 0,!0),!0)}});return function(t,n,r,i){return e.apply(this,arguments)}})();var Ca=j(()=>{let e=window._CONFIG.isInApp,r=va.getInstance(),a=g(new H),o=g({}),s=g([]),c=g([]),d=g(),f=g(!1),p=g(!0),m=g(!1),_=g(),y=g(!1),b=g(!1),ee=g(`time`),{compIsLoggedIn:S}=yr(),{refFormData:C,onAdd:te}=Bn(Zi,Qi,{noThrow:!0}),w=``,T=``,E={};function D(){return O.apply(this,arguments)}function O(){return O=l(function*(){yield k(a.value.current),a.value.next()}),O.apply(this,arguments)}function k(){return re.apply(this,arguments)}function re(){return re=l(function*(e=1,t={}){b.value=!1,a.value.next(e),f.value=!0;let n=A(A({},o.value),t);delete n.api,delete n.dataPage;try{let{data:n,countData:i,total:l,myComment:u,isHasTop:f}=yield r[o.value.api||`getCommentList`](a.value,A(A(A({},o.value),t),{},{order_by:ee.value,isLogin:S.value}));return a.value.setTotal(l),m.value=f,e===1?s.value=n:s.value=s.value.concat(n),u!=null&&u.length&&(c.value=u),i&&(d.value=i),n.length||(b.value=!0),n}catch(e){console.log(e)}finally{p.value=!1,f.value=!1}}),re.apply(this,arguments)}function ie(e){o.value=(e==null?void 0:e.args)||{},a.value=(e==null?void 0:e.dataPage)||new H}function j(t=!1){if(e){var n;let e={status:!0,placeholder:ya.value.WRITE_COMMENT,uuid:w,immediate:!1,type:2,extra:{id:o.value.id},withIcon:!0,count:(n=d.value)==null?void 0:n.totalCommentNum};v(e).catch(e=>{alert(e.errmessage)}),t||(E=e)}}function se(e,t){return ce.apply(this,arguments)}function ce(){return ce=l(function*(e,t){let n=`${ya.value.REPLY}@${e}: `;E={status:!0,placeholder:n,uuid:w,immediate:!0,extra:{id:o.value.id,parentCommentId:t},type:2},yield v(E),ne(w,n)}),ce.apply(this,arguments)}function le(e){return ue.apply(this,arguments)}function ue(){return ue=l(function*(e){try{window._CONFIG.isInApp?(yield ae({id:o.value.id,comment_id:e.commentId}),f.value=!0):(f.value=!0,yield r.delete(o.value.id,{comment_id:e.commentId}),de(`删除成功`)),c.value=c.value.filter(t=>t.commentId!==e.commentId),yield N()}finally{f.value=!1}}),ue.apply(this,arguments)}function fe(){j(),M(u,()=>{j(!0)}),M(n,function(){N()}),M(h,l(function*(){T||(yield N())})),M(i,l(function*(){var e,t;Y().reportWebInteraction({interaction_type:`评论`,object_type:(e=E.extra)!=null&&e.parentCommentId?`评论`:`图文`,object_id:((t=E.extra)==null?void 0:t.parentCommentId)||o.value.id,site_id:o.value.site_id,node_id:o.value.node_id,source_post_id:o.value.source_post_id}),yield N(),j()}))}let N=function(){var e=l(function*(e=!0){try{if(window._CONFIG.isInApp){w=w||(yield oe()).data;let t=yield Sa(e);if(t){let{data:e}=yield x();T=e.uuid,o.value.uuid=T,o.value.token=t}}}catch(e){console.log(e)}finally{yield k()}});return function(){return e.apply(this,arguments)}}(),pe=function(){var n=l(function*(n){if(!y.value){y.value=!0;try{var i;let s=n instanceof $?n.isGood:!!((i=d.value)!=null&&i.userLike),c=s?-1:1,l={type:n instanceof $?n.attr.sourceDataType:n.type,subType:n instanceof $?`comment`:n.subType||n.type,id:n instanceof $?n.attr.sourceDataId:n.id,comment_id:n instanceof $?n.commentId:``,status:c,isLogin:S.value};if(yield r.submitLike(c,l),!s&&e&&S.value&&!(n instanceof $)&&(C.value.fromJson({rule_name:window._CONFIG.jf.name.likeArticle,jf_time:(0,L.default)().unix(),job_id:`like_article_${l.id}`}),(yield te(C.value))!==null&&t(`完成稿件点赞,积分+1`)),!s&&Y().reportWebInteraction({interaction_type:`点赞`,object_id:n instanceof $?n.c
12ommentId:n.id,object_type:n instanceof $?`评论`:`图文`,site_id:o.value.site_id,node_id:o.value.node_id,source_post_id:o.value.source_post_id}),!(n instanceof $)){var a;(a=d.value)==null||a.changeCount(c,l),S.value&&k()}n instanceof $&&n.setGoodState(!s).setGood(c)}catch(e){console.log(e)}finally{y.value=!1}}});return function(e){return n.apply(this,arguments)}}();(function(){var n=l(function*(n){if(!y.value){y.value=!0;try{var i;let s=n instanceof $?n.isGood:!!((i=d.value)!=null&&i.userLike),c=s?-1:1,l={type:n instanceof $?n.attr.sourceDataType:n.type,subType:n instanceof $?`comment`:n.subType||n.type,id:n instanceof $?n.attr.sourceDataId:n.id,comment_id:n instanceof $?n.commentId:``,status:c,isLogin:S.value};if(yield r.submitLike(c,l),!s&&e&&S.value&&!(n instanceof $)&&(C.value.fromJson({rule_name:window._CONFIG.jf.name.likeArticle,jf_time:(0,L.default)().unix(),job_id:`like_article_${l.id}`}),(yield te(C.value))!==null&&t(`完成稿件点赞,积分+1`)),!s&&Y().reportWebInteraction({interaction_type:`点赞`,object_id:n instanceof $?n.commentId:n.id,object_type:n instanceof $?`评论`:`图文`,site_id:o.value.site_id,node_id:o.value.node_id,source_post_id:o.value.source_post_id}),!(n instanceof $)){var a;(a=d.value)==null||a.changeCount(c,l),S.value&&k()}n instanceof $&&n.setGoodState(!s).setGood(c)}catch(e){console.log(e)}finally{y.value=!1}}});return function(e){return n.apply(this,arguments)}})();function P(e){return me.apply(this,arguments)}function me(){return me=l(function*(t){ie(t),e?N().then(fe):yield k()}),me.apply(this,arguments)}function he(e){ee.value=e}return{onInit:P,refError:_,refList:s,refDataPage:a,refCountData:d,refMineList:c,refLoading:f,refFirstLoading:p,onRefreshComment:N,setReply:se,removeComment:le,setArgs:ie,refHasTop:m,onSubmitLike:pe,refIsFinished:b,onNext:D,compIsLoggedIn:S,refSort:ee,setSort:he}}),wa=class extends G{constructor(...e){super(...e),c(this,`entityClass`,ln),c(this,`dataKey`,`info`),c(this,`urlForGetDetail`,Re),c(this,`urlForSave`,Ie),c(this,`urlForDelete`,Le)}};function Ta(e,t){let n=!1,{refSelfInfo:r}=yr(),{onDetail:i,refEntity:a}=J(wa),{onAdd:o}=Bn(ln,wa,{checkHideErrorTip:()=>!0}),{onDelete:s}=Un(wa),c=function(){var t=l(function*(){r.value&&(yield i(void 0,{app_url:e.value.appUrl,web_url:e.value.webUrl}))});return function(){return t.apply(this,arguments)}}(),u=()=>{window.localStorage.setItem(m.value,e.value.key)},d=function(){var t=l(function*(){if(!n){n=!0;try{r.value?(p.value?yield s(a.value):yield o(e.value.favMeta),yield c()):(yield _r(window.location.href,void 0,!0),u())}catch(e){console.log(e)}finally{n=!1}}});return function(){return t.apply(this,arguments)}}(),f=function(){var e=l(function*(){var e;if((e=a.value)!=null&&e.id||!r.value)return;yield c();let t=!1;return window.localStorage.getItem(m.value)&&!a.value&&r.value&&(yield d(),t=!0),window.localStorage.removeItem(m.value),t});return function(){return e.apply(this,arguments)}}(),p=k(()=>{var e;return!!((e=a.value)!=null&&e.id)}),m=k(()=>`SET_${(t==null?void 0:t.type)||`post`}_FAV_ID_${e.value.id}`);return{onCheckFavStatus:c,onImmediateFav:f,onSetStorageFavKey:u,onFav:d,refFav:a,compIsFav:p,compStorageKey:m,compIcon:k(()=>p.value?Pt(`/images/icon-fav.png`):Pt(`/images/icon-unfav.png`))}}(function(){var e=l(function*(e=375,t=750,n){let r=function(){var n=l(function*(){window.innerWidth||(yield z(()=>window.innerWidth>0,{step:50,timeout:1e3}));let n=Math.min(window.innerWidth,t)/100,r=100/e;document.documentElement.style.setProperty(`--vw`,`${n}px`),document.documentElement.style.setProperty(`--scale`,`${r}`)});return function(){return n.apply(this,arguments)}}();window.addEventListener(`resize`,r),yield r(),n==null||n()});return function(){return e.apply(this,arguments)}})();function Ea(e={}){let t=t=>{if(t.isLogin){var n;(n=e.onLogin)==null||n.call(e,t)}else{var r;(r=e.onLogout)==null||r.call(e,t)}};return M(ue,t),{destroy:()=>{S(ue,t)}}}function Da(e={}){let t=t=>{var n;(n=e.onComplete)==null||n.call(e,t)},n=t=>{var n;(n=e.onQuickComplete)==null||n.call(e,t)};return M(p,t),M(m,n),{destroy:()=>{S(p,t),S(m,n)}}}function Oa(e={}){let t=t=>{var n;console.log(`useAppLikeCompleteListener`,t);let r=t||{};(n=e.onComplete)==null||n.call(e,{userLike:!!r.userLike,likes:Number(r.likes)||0})};return M(o,t),{destroy:()=>{S(o,t)}}}var ka=window._CONFIG.isInApp,Aa=()=>ka?t:fe,ja=`ah-in-app-theme--dark`,Ma=`ah-in-app-theme--light`,Na=`AH_APP_THEME_DEBUG`,Pa=g(`light`),Fa=!1,Ia=!1;function La(){var e;return!!((e=window._CONFIG)!=null&&e.isInApp)}function Ra(){return window.__AH_APP_THEME_DEBUG_ENABLED__===!0}function za(e){if(typeof e!=`object`||!e)return e;let t=e,n=t.detail;if(n&&typeof n==`object`)return za(n);if(t.darkMode!==void 0)return t.darkMode;if(t.isDark!==void 0)return t.isDark;if(t.dark!==void 0)return t.dark;if(t.mode!==void 0)return t.mode;if(t.theme!==void 0)return t.theme;if(t.value!==void 0)return t.value;if(t.data!==void 0)return za(t.data)}function Ba(e){let t=za(e);if(t===!0||t===1)return`dark`;if(t===!1||t===0)return`light`;if(typeof t==`string`){let e=t.trim().toLowerCase();if(e===`dark`||e===`1`||e===`true`||e===`night`)return`dark`;
12if(e===`light`||e===`0`||e===`false`||e===`day`)return`light`}return`light`}function Va(e){let t=za(e);if(t==null||t===``)return null;if(typeof t==`string`){let e=t.trim().toLowerCase();if(e===`off`||e===`reset`||e===`auto`)return null}return Ba(t)}function Ha(){var e;if(!Ra())return null;let t=new URLSearchParams(window.location.search),n=t.get(`ah_theme`)||t.get(`app_theme_debug`),r=Va((e=window.__AH_APP_THEME_DEBUG__)==null?n:e);if(r)return r;try{return Va(localStorage.getItem(Na))}catch(e){return null}}function Ua(e){try{return new URLSearchParams(window.location.search).get(e)}catch(e){return null}}function Wa(e){let t=window.location.hash||``,n=t.indexOf(`?`);if(n===-1)return null;try{return new URLSearchParams(t.slice(n+1)).get(e)}catch(e){return null}}function Ga(){return Ua(`theme`)||Wa(`theme`)}function Ka(e){return String(e||``).trim().toLowerCase().split(`/`)[0]}function qa(){let e=Ka(Ga());return La()&&e===`dark`?`dark`:`light`}function Ja(e){let t=Ba(e);Pa.value=t,[document.documentElement,document.body,document.getElementById(`app`)].filter(e=>!!e).forEach(e=>{e.dataset.appTheme=t,e.classList.toggle(ja,t===`dark`),e.classList.toggle(Ma,t===`light`)})}function Ya(){return Ha()||qa()}function Xa(e){let t=Va(e);try{t?localStorage.setItem(Na,t):localStorage.removeItem(Na)}catch(e){}Ja(Ya())}function Za(){window.__AH_APPLY_IN_APP_THEME__=Ja,window.__AH_SET_IN_APP_THEME_DEBUG__=Xa;function e(t){if(console.log(`onThemeChange`,`payload`,t),arguments.length===0)return e;let n=Ha();return n?(Ja(n),e):(La()&&Ja(Ba(t)),e)}return Fa||(Ja(Ya()),Fa=!0),Ia||(M(s,e),Ia=!0),{refThemeMode:Pa,compIsInAppDarkTheme:k(()=>La()&&Pa.value===`dark`)}}export{bt as $,yr as A,tn as B,Hr as C,Pr as D,Fr as E,wn as F,Kt as G,U as H,pn as I,zt as J,Ft as K,fn as L,Bn as M,K as N,Y as O,Mn as P,xt as Q,an as R,Ur as S,Br as T,H as U,W as V,Gt as W,Bt as X,Vt as Y,Ut as Z,Ui as _,Da as a,he as at,ii as b,Ca as c,_e as ct,_a as d,Ct as et,ua as f,$ as g,Xi as h,Oa as i,ye as it,Hn as j,_r as k,ga as l,me as lt,Zi as m,Za as n,Xe as nt,Ea as o,ve as ot,Qi as p,Pt as q,Aa as r,xe as rt,Ta as s,ge as st,Ya as t,mt as tt,fa as u,Bi as v,Vr as w,$r as x,ai as y,nn as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.