!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/ip-show"]=t():e["utils/ip-show"]=t()}(globalThis,(()=>(()=>{"use strict";var e,t,i={206:e=>{e.exports=coreApis.componentApis.utils.commentApis}},s={};function a(e){var t=s[e];if(void 0!==t)return t.exports;var l=s[e]={exports:{}};return i[e](l,l.exports,a),l.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(i,s){if(1&s&&(i=this(i)),8&s)return i;if("object"==typeof i&&i){if(4&s&&i.__esModule)return i;if(16&s&&"function"==typeof i.then)return i}var l=Object.create(null);a.r(l);var n={};e=e||[null,t({}),t([]),t(t)];for(var o=2&s&&i;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>n[e]=()=>i[e]));return n.default=()=>i,a.d(l,n),l},a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{a.d(l,{component:()=>d});const e=coreApis.componentApis.define;let t,i=2;const s=function(e,i,s){const a=this._parentBlacklistDom(e,i,s),l=[`
`,`
${this._createNickNameDom(e)}`,this._createLevelLink(e),this._identity(e.mid,e.assist,e.member.fans_detail),`${this._createNameplate(e.member.nameplate)+this._createUserSailing(e)}
`,this._createMsgContent(e),this._createPerfectReply(e),'
',this._createPlatformDom(e.content.plat),'',''.concat(this._formateTime(e.ctime),""),e?.reply_control?.location?`${e?.reply_control?.location||""}`:"","",e.lottery_id?"":``,e.lottery_id?"":``,e.lottery_id?"":this._createReplyBtn(e.rcount),e.lottery_id&&e.mid!==t.userStatus.mid?"":`
    ${this._canSetTop(e)?`
  • ${e.isUpTop?"取消置顶":"设为置顶"}
  • `:""}${this._canBlackList(e.mid)?'
  • 加入黑名单
  • ':""}${this._canReport(e.mid)?'
  • 举报
  • ':""}${this._canDel(e.mid)&&!e.isTop?`
  • 删除
  • `:""}
`,this._createLotteryContent(e.content),this._createVoteContent(e.content),this._createTags(e),"
",'
',this._createSubReplyList(e.replies,e.rcount,!1,e.rpid,e.folder&&e.folder.has_folded,e.reply_control),"
",'
',"
","
"].join("");return e.state===t.blacklistCode?a:l},n=function(e,t){return[`
`,this._createSubReplyUserFace(e),'
','
',this._createNickNameDom(e),this._createLevelLink(e),this._identity(e.mid),this._createSubMsgContent(e),"
","
",'
','',''.concat(this._formateTime(e.ctime),""),e?.reply_control?.location?`${e?.reply_control?.location||""}`:"","",``,``,'回复',`
    ${this._canBlackList(e.mid)?'
  • 加入黑名单
  • ':""}${this._canReport(e.mid)?'
  • 举报
  • ':""}${this._canDel(e.mid)?`
  • 删除
  • `:""}
`,"
","
"].join("")},o=function(e,t,i){const s=this._parentBlacklistDom(e,t,i),a=[`
`,`
${this._identity(e.mid,e.assist,e.member.fans_detail)}`,`${this._unhtmlFix(e.member.uname)}${this._createNameplate(e.member.nameplate)}${this._createUserSailing(e.member&&e.member.user_sailing||{})}
`,this._createMsgContent(e),'
',e.floor?`#${e.floor}`:"",this._createPlatformDom(e.content.plat),`${this._formateTime(e.ctime)}`,e?.reply_control?.location?`${e?.reply_control?.location||""}`:"",e.lottery_id?"":``,e.lottery_id?"":``,e.lottery_id?"":this._createReplyBtn(e.rcount),e.lottery_id&&e.mid!==this.userStatus.mid?"":`
    ${this._canSetTop(e)?`
  • ${e.isUpTop?"取消置顶":"设为置顶"}
  • `:""}${this._canBlackList(e.mid)?'
  • 加入黑名单
  • ':""}${this._canReport(e.mid)?'
  • 举报
  • ':""}${this._canDel(e.mid)&&!e.isTop?`
  • 删除
  • `:""}
`,this._createLotteryContent(e.content),this._createVoteContent(e.content),this._createTags(e),"
",'
',this._createSubReplyList(e.replies,e.rcount,!1,e.rpid,e.folder&&e.folder.has_folded),"
",'
',"
","
"].join("");return e.state===this.blacklistCode?s:a},r=function(e,t){return[`
`,``,``,"",'
','
',`${this._unhtmlFix(e.member.uname)}`,``,this._createSubMsgContent(e),"
","
",'
',`${this._formateTime(e.ctime)}`,e?.reply_control?.location?`${e?.reply_control?.location||""}`:"",``,``,'回复',`
    ${this._canBlackList(e.mid)?'
  • 加入黑名单
  • ':""}${this._canReport(e.mid)?'
  • 举报
  • ':""}${this._canDel(e.mid)?`
  • 删除
  • `:""}
`,"
","
"].join("")},c=new MutationObserver((e=>{e.forEach((()=>{void 0!==unsafeWindow.bbComment&&(t=unsafeWindow.bbComment,"blackroom"===unsafeWindow.location.href.split("/")[3]?(t.prototype._unhtmlFix=function(e,t){return e? // eslint-disable-next-line @typescript-eslint/no-shadow e.replace(t||/[&<">'](?:(amp|lt|quot|gt|#39|nbsp|#\\d+);)?/g,(function(e,t){return t?e:{"<":"","&":"",'"':"",">":"","'":""}[e]})):""},t.prototype._trimHttpFix=function(e){return e?e.replace(/^http:/,""):""},t.prototype._webpFix=function(e,t){if(!e)return e;const i=e.match(/(.*\\.(jpg|jpeg|gif|png|bmp))(\\?.*)?/);let s=-1!==e.indexOf("/bfs/");return i&&"gif"!==i[2]&&"bmp"!==i[2]&&s?(s=t.w,e=t.h,e=s&&e?`@${s}w_${e}h`:"@",t=i[3]||"",this.isWebp?`${i[1]+e}.webp${t}`:`${i[1]+e}.${i[2]}${t}`):e},t.prototype._createListCon=o,t.prototype._createSubReplyItem=r):(t.prototype._createListCon=s,t.prototype._createSubReplyItem=n),i=1,c.disconnect())}))}));c.observe(document.head,{childList:!0});const p=e=>{e.forEach((e=>{const t=(e=>{const t=e.__vueParentComponent?.props;return(t?.reply??t?.subReply)?.reply_control?.location??void 0})(e.element);if(void 0!==t){const i=e.element.querySelector(".reply-info>.reply-time")??e.element.querySelector(".sub-reply-info>.sub-reply-time");if(0===i.childElementCount){const e=document.createElement("span");e.style.marginLeft="5px",e.innerText=t,i.appendChild(e)}}}))},d=(0,e.defineComponentMetadata)({name:"ipShow",author:{name:"Light_Quanta",link:"https://github.com/LightQuanta"},displayName:"评论区IP属地显示",tags:[componentsTags.utils],entry:async()=>{const{forEachCommentItem:e}=await Promise.resolve().then(a.t.bind(a,206,23));e({added:e=>{2===i&&(p([e,...e.replies]),e.addEventListener("repliesUpdate",(e=>p(e.detail))))}})},description:{"zh-CN":"在评论区显示评论的IP属地信息"},commitHash:"e998998fc03ae60938410eb104a6691b560cf563",coreVersion:"2.8.10"})})(),l=l.component})()));